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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (375) 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/index.js +1 -1
  151. package/lib/commands/issue/nudge.js +1 -1
  152. package/lib/commands/issue/report.js +1 -1
  153. package/lib/commands/issue/shared.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/kb-search-client.js +1 -1
  301. package/lib/core/page/file-system.js +1 -1
  302. package/lib/core/page/hash.js +1 -1
  303. package/lib/core/page/lock.js +1 -1
  304. package/lib/core/page/lr-smart-jsx.js +1 -1
  305. package/lib/core/sql-index-auditor.js +1 -1
  306. package/lib/core/sql-sync/config.js +1 -1
  307. package/lib/core/sql-sync/file-system.js +1 -1
  308. package/lib/core/sql-sync/hash.js +1 -1
  309. package/lib/core/sql-sync/lock.js +1 -1
  310. package/lib/core/sql-sync/utils.js +1 -1
  311. package/lib/core/sql-validator.js +1 -1
  312. package/lib/errors.js +1 -1
  313. package/lib/framework/build-all-flags.js +1 -1
  314. package/lib/framework/error-output.js +1 -1
  315. package/lib/framework/explicit-yes.js +1 -1
  316. package/lib/framework/flags.js +1 -1
  317. package/lib/framework/help.js +1 -1
  318. package/lib/framework/index.js +1 -1
  319. package/lib/framework/output.js +1 -1
  320. package/lib/framework/response.js +1 -1
  321. package/lib/framework/runner-alias.js +1 -1
  322. package/lib/framework/runner.js +1 -1
  323. package/lib/framework/schema-export.js +1 -1
  324. package/lib/framework/supported-flags.js +1 -1
  325. package/lib/framework/types.js +1 -1
  326. package/lib/generated/build-info.d.ts +4 -4
  327. package/lib/generated/build-info.js +1 -1
  328. package/lib/generated/official-routing.js +1 -1
  329. package/lib/generated/routing-contract.js +1 -1
  330. package/lib/help.js +1 -1
  331. package/lib/postinstall.js +1 -1
  332. package/lib/runtime/confirmation.js +1 -1
  333. package/lib/runtime/event.js +1 -1
  334. package/lib/runtime/index.js +1 -1
  335. package/lib/runtime/queue.js +1 -1
  336. package/lib/runtime/resolve.js +1 -1
  337. package/lib/services/dataset-design/checkpoint.js +1 -1
  338. package/lib/services/dataset-design/commands.js +1 -1
  339. package/lib/services/dataset-design/contract.js +1 -1
  340. package/lib/skills/builtin-skill.js +1 -1
  341. package/lib/skills/main.js +1 -1
  342. package/lib/skills/npx-skills-add.js +1 -1
  343. package/lib/skills/skill-presence.js +1 -1
  344. package/lib/telemetry/cli-command-trace.js +1 -1
  345. package/lib/telemetry/cli-help-trace.js +1 -1
  346. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  347. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  348. package/lib/telemetry/send-cli-trace-log.js +1 -1
  349. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  350. package/lib/utils/ai_config.js +1 -1
  351. package/lib/utils/apply-jq-filter.js +1 -1
  352. package/lib/utils/cdn-config.js +1 -1
  353. package/lib/utils/check-sdk-version.js +1 -1
  354. package/lib/utils/cli-version-check.js +1 -1
  355. package/lib/utils/cli-version-policy.js +1 -1
  356. package/lib/utils/config.js +1 -1
  357. package/lib/utils/entity-with-id.js +1 -1
  358. package/lib/utils/file-utils.js +1 -1
  359. package/lib/utils/guides-cdn.js +1 -1
  360. package/lib/utils/http-client.js +1 -1
  361. package/lib/utils/is-non-interactive.js +1 -1
  362. package/lib/utils/logger.js +1 -1
  363. package/lib/utils/params.js +1 -1
  364. package/lib/utils/platform.js +1 -1
  365. package/lib/utils/sleep.js +1 -1
  366. package/lib/utils/template-replacer.js +1 -1
  367. package/lib/utils/update-notice.js +1 -1
  368. package/lib/utils/version.js +1 -1
  369. package/lib/utils/with-active-cookie.js +1 -1
  370. package/lib/utils/write-cli-side-channel.js +1 -1
  371. package/package.json +1 -1
  372. package/skills/rabetbase/SKILL.md +1 -1
  373. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  374. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  375. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- function a225_0x2a8c(){const _0x20eda9=['Code\x20format\x20completed','Starting\x20code\x20format','1062708VNCZuu','Code\x20format\x20failed','36620QASWeC','error','format','48aBrsDm','1115kSBGsO','1387200FoIKIY','--write','cwd','npx','4948353nNvleu','message','1608879RHPjYr','now','info','13888TYxSFO','success','3422377ylOaJh','resolve'];a225_0x2a8c=function(){return _0x20eda9;};return a225_0x2a8c();}(function(_0x5cdc47,_0xfec7bb){const _0x56b1b1=a225_0x4e46,_0x3645e8=_0x5cdc47();while(!![]){try{const _0xb9df1b=-parseInt(_0x56b1b1(0x1eb))/0x1*(parseInt(_0x56b1b1(0x1ee))/0x2)+parseInt(_0x56b1b1(0x1f6))/0x3+parseInt(_0x56b1b1(0x1f9))/0x4*(parseInt(_0x56b1b1(0x1ef))/0x5)+-parseInt(_0x56b1b1(0x1e9))/0x6+-parseInt(_0x56b1b1(0x1e5))/0x7+parseInt(_0x56b1b1(0x1f0))/0x8+parseInt(_0x56b1b1(0x1f4))/0x9;if(_0xb9df1b===_0xfec7bb)break;else _0x3645e8['push'](_0x3645e8['shift']());}catch(_0x3ae09a){_0x3645e8['push'](_0x3645e8['shift']());}}}(a225_0x2a8c,0x77599));import a225_0x4c8f03 from'node:path';import{execa}from'execa';function a225_0x4e46(_0x15fe27,_0x25cef9){_0x15fe27=_0x15fe27-0x1e5;const _0x2a8c36=a225_0x2a8c();let _0x4e4631=_0x2a8c36[_0x15fe27];return _0x4e4631;}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(_0x4b7171){const _0x1be387=a225_0x4e46,_0xc8ed9=Date[_0x1be387(0x1f7)](),_0x9ae863=a225_0x4c8f03[_0x1be387(0x1e6)](process[_0x1be387(0x1f2)](),_0x4b7171);try{logger[_0x1be387(0x1f8)]('format',_0x1be387(0x1e8),{'projectCode':_0x4b7171}),await execa(resolveNpmBin(_0x1be387(0x1f3)),['prettier',_0x1be387(0x1f1),'.'],{'cwd':_0x9ae863});const _0x4fb4ce=Date[_0x1be387(0x1f7)]()-_0xc8ed9;logger[_0x1be387(0x1fa)](_0x1be387(0x1ed),_0x1be387(0x1e7),_0x4fb4ce,{'projectCode':_0x4b7171});}catch(_0x5293e6){const _0x50af92=Date['now']()-_0xc8ed9;logger[_0x1be387(0x1ec)](_0x1be387(0x1ed),_0x1be387(0x1ea),{'projectCode':_0x4b7171,'error':_0x5293e6 instanceof Error?_0x5293e6[_0x1be387(0x1f5)]:String(_0x5293e6),'duration':_0x50af92});throw _0x5293e6;}return formatElapsed(_0xc8ed9);}
1
+ (function(_0xbb7c3f,_0x1aad10){const _0x344718=a225_0x539d,_0x3be4bc=_0xbb7c3f();while(!![]){try{const _0x4b710c=-parseInt(_0x344718(0x95))/0x1+parseInt(_0x344718(0x97))/0x2+-parseInt(_0x344718(0x96))/0x3+parseInt(_0x344718(0x99))/0x4*(-parseInt(_0x344718(0xa3))/0x5)+parseInt(_0x344718(0x92))/0x6+parseInt(_0x344718(0xa2))/0x7*(parseInt(_0x344718(0x93))/0x8)+-parseInt(_0x344718(0xa4))/0x9*(-parseInt(_0x344718(0xa0))/0xa);if(_0x4b710c===_0x1aad10)break;else _0x3be4bc['push'](_0x3be4bc['shift']());}catch(_0x27c06d){_0x3be4bc['push'](_0x3be4bc['shift']());}}}(a225_0x4ea9,0x41077));import a225_0x235db from'node:path';import{execa}from'execa';function a225_0x4ea9(){const _0x515ed2=['prettier','Starting\x20code\x20format','1608708HYWYDa','16RjwMrp','cwd','218831tifkqs','999633PFYFDO','284870LPYwjl','Code\x20format\x20completed','8nzVdzP','Code\x20format\x20failed','info','format','now','success','resolve','168020bsYmXS','message','351484yZBjKb','449585bAsZvn','261TtIOUW'];a225_0x4ea9=function(){return _0x515ed2;};return a225_0x4ea9();}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';function a225_0x539d(_0x1d584c,_0x20d7f0){_0x1d584c=_0x1d584c-0x92;const _0x4ea9be=a225_0x4ea9();let _0x539d46=_0x4ea9be[_0x1d584c];return _0x539d46;}export async function formatProjectCode(_0x24d511){const _0x4bb837=a225_0x539d,_0x425003=Date[_0x4bb837(0x9d)](),_0x5daf38=a225_0x235db[_0x4bb837(0x9f)](process[_0x4bb837(0x94)](),_0x24d511);try{logger[_0x4bb837(0x9b)](_0x4bb837(0x9c),_0x4bb837(0xa6),{'projectCode':_0x24d511}),await execa(resolveNpmBin('npx'),[_0x4bb837(0xa5),'--write','.'],{'cwd':_0x5daf38});const _0x9b9cc9=Date[_0x4bb837(0x9d)]()-_0x425003;logger[_0x4bb837(0x9e)](_0x4bb837(0x9c),_0x4bb837(0x98),_0x9b9cc9,{'projectCode':_0x24d511});}catch(_0x5e9daf){const _0xab607e=Date['now']()-_0x425003;logger['error']('format',_0x4bb837(0x9a),{'projectCode':_0x24d511,'error':_0x5e9daf instanceof Error?_0x5e9daf[_0x4bb837(0xa1)]:String(_0x5e9daf),'duration':_0xab607e});throw _0x5e9daf;}return formatElapsed(_0x425003);}
@@ -1 +1 @@
1
- (function(_0x53f7be,_0xd73759){const _0x1add38=a226_0x2cfb,_0x24354e=_0x53f7be();while(!![]){try{const _0x3b6f17=parseInt(_0x1add38(0xb1))/0x1+parseInt(_0x1add38(0xb3))/0x2*(-parseInt(_0x1add38(0xbe))/0x3)+parseInt(_0x1add38(0xb2))/0x4*(parseInt(_0x1add38(0xb9))/0x5)+-parseInt(_0x1add38(0xbc))/0x6*(parseInt(_0x1add38(0xaa))/0x7)+parseInt(_0x1add38(0xb7))/0x8*(parseInt(_0x1add38(0xa7))/0x9)+parseInt(_0x1add38(0xa6))/0xa*(parseInt(_0x1add38(0xb4))/0xb)+parseInt(_0x1add38(0xad))/0xc*(-parseInt(_0x1add38(0xa9))/0xd);if(_0x3b6f17===_0xd73759)break;else _0x24354e['push'](_0x24354e['shift']());}catch(_0x288f65){_0x24354e['push'](_0x24354e['shift']());}}}(a226_0x2762,0xd111a));function a226_0x2cfb(_0x3075d7,_0x369e60){_0x3075d7=_0x3075d7-0xa6;const _0x2762ea=a226_0x2762();let _0x2cfb36=_0x2762ea[_0x3075d7];return _0x2cfb36;}import a226_0x34e279 from'node:path';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';function a226_0x2762(){const _0xfde0be=['7fRQVvr','now','Dependency\x20install\x20failed','1668bkJhyr','npm','cwd','resolve','522796nZWIGN','4gQFSrC','4SQDvpJ','10648IuqrBV','error','install','2990376yFlCvk','Starting\x20dependency\x20install','5669225PGZGaR','--registry','info','10120698xRbklx','Dependency\x20install\x20completed','236448yfKcqv','message','8870UHyKKf','27jydNuW','https://registry.npmmirror.com','87529afLbCX'];a226_0x2762=function(){return _0xfde0be;};return a226_0x2762();}export async function installDependencies(_0x30f71e){const _0x579e74=a226_0x2cfb,_0x256274=Date[_0x579e74(0xab)](),_0x13588b=a226_0x34e279[_0x579e74(0xb0)](process[_0x579e74(0xaf)](),_0x30f71e);try{logger[_0x579e74(0xbb)](_0x579e74(0xb6),_0x579e74(0xb8),{'projectCode':_0x30f71e,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin(_0x579e74(0xae)),[_0x579e74(0xb6),_0x579e74(0xba),_0x579e74(0xa8)],{'cwd':_0x13588b});const _0x1375c5=Date['now']()-_0x256274;logger['success'](_0x579e74(0xb6),_0x579e74(0xbd),_0x1375c5,{'projectCode':_0x30f71e});}catch(_0x1c481c){const _0xa8eb65=Date[_0x579e74(0xab)]()-_0x256274;logger[_0x579e74(0xb5)](_0x579e74(0xb6),_0x579e74(0xac),{'projectCode':_0x30f71e,'error':_0x1c481c instanceof Error?_0x1c481c[_0x579e74(0xbf)]:String(_0x1c481c),'duration':_0xa8eb65});throw _0x1c481c;}return formatElapsed(_0x256274);}
1
+ (function(_0x44e7b9,_0x32a877){const _0x1773e3=a226_0x28e1,_0x48d56f=_0x44e7b9();while(!![]){try{const _0x4cc3a1=-parseInt(_0x1773e3(0xb8))/0x1*(-parseInt(_0x1773e3(0xc0))/0x2)+parseInt(_0x1773e3(0xaf))/0x3*(parseInt(_0x1773e3(0xac))/0x4)+-parseInt(_0x1773e3(0xb5))/0x5+-parseInt(_0x1773e3(0xb1))/0x6+parseInt(_0x1773e3(0xbc))/0x7+-parseInt(_0x1773e3(0xb7))/0x8*(parseInt(_0x1773e3(0xbf))/0x9)+parseInt(_0x1773e3(0xb0))/0xa;if(_0x4cc3a1===_0x32a877)break;else _0x48d56f['push'](_0x48d56f['shift']());}catch(_0x2b6ec6){_0x48d56f['push'](_0x48d56f['shift']());}}}(a226_0x1890,0xead6a));function a226_0x1890(){const _0x6313da=['2539230dzbobG','7805586piUlzJ','Dependency\x20install\x20failed','install','now','1459485VDJhjb','https://registry.npmmirror.com','8nCqRYV','319391mKSgae','info','message','resolve','8172311HzLbiS','cwd','success','9044199mYTFfl','6TjfCig','27128JzNdip','--registry','Dependency\x20install\x20completed','522JcSxUN'];a226_0x1890=function(){return _0x6313da;};return a226_0x1890();}function a226_0x28e1(_0x43427e,_0x3440ed){_0x43427e=_0x43427e-0xac;const _0x1890fb=a226_0x1890();let _0x28e1a8=_0x1890fb[_0x43427e];return _0x28e1a8;}import a226_0x2c6a62 from'node:path';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 installDependencies(_0x23f56b){const _0x224a13=a226_0x28e1,_0x1493c8=Date[_0x224a13(0xb4)](),_0x40f59a=a226_0x2c6a62[_0x224a13(0xbb)](process[_0x224a13(0xbd)](),_0x23f56b);try{logger[_0x224a13(0xb9)](_0x224a13(0xb3),'Starting\x20dependency\x20install',{'projectCode':_0x23f56b,'registry':_0x224a13(0xb6)}),await execa(resolveNpmBin('npm'),[_0x224a13(0xb3),_0x224a13(0xad),_0x224a13(0xb6)],{'cwd':_0x40f59a});const _0xc1c1a8=Date[_0x224a13(0xb4)]()-_0x1493c8;logger[_0x224a13(0xbe)](_0x224a13(0xb3),_0x224a13(0xae),_0xc1c1a8,{'projectCode':_0x23f56b});}catch(_0x55ce65){const _0x393c4c=Date['now']()-_0x1493c8;logger['error']('install',_0x224a13(0xb2),{'projectCode':_0x23f56b,'error':_0x55ce65 instanceof Error?_0x55ce65[_0x224a13(0xba)]:String(_0x55ce65),'duration':_0x393c4c});throw _0x55ce65;}return formatElapsed(_0x1493c8);}
@@ -1 +1 @@
1
- const a227_0x77ab16=a227_0x5883;(function(_0x215bb5,_0x1a84c8){const _0x1dc613=a227_0x5883,_0x1e9bad=_0x215bb5();while(!![]){try{const _0x34b68a=-parseInt(_0x1dc613(0x11b))/0x1+parseInt(_0x1dc613(0x121))/0x2*(parseInt(_0x1dc613(0x124))/0x3)+-parseInt(_0x1dc613(0x123))/0x4*(parseInt(_0x1dc613(0x119))/0x5)+parseInt(_0x1dc613(0x120))/0x6*(parseInt(_0x1dc613(0x112))/0x7)+parseInt(_0x1dc613(0x116))/0x8+-parseInt(_0x1dc613(0x11c))/0x9*(parseInt(_0x1dc613(0x11d))/0xa)+-parseInt(_0x1dc613(0x113))/0xb;if(_0x34b68a===_0x1a84c8)break;else _0x1e9bad['push'](_0x1e9bad['shift']());}catch(_0x59606b){_0x1e9bad['push'](_0x1e9bad['shift']());}}}(a227_0x294c,0xbc823));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a227_0x294c(){const _0x3b6ce5=['8VJtmFX','path','4jDHjKO','620097nHOJsv','7nxNxjo','5585085pnlgWC','Synchronize\x20the\x20current\x20project\x27s\x20public\x20Domain\x20routing','\x20workspace\x20init\x20--appcode\x20<code>\x20in\x20the\x20project\x20directory\x20first.','8420064jfoJTx','Run\x20','domain-routing-sync','1451630wpNzHl','read','221404BcmFjS','35406FYRksO','3830fDrcQX','Domain\x20routing\x20synchronized:\x20','validation','8514084QtGctA'];a227_0x294c=function(){return _0x3b6ce5;};return a227_0x294c();}import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';function a227_0x5883(_0x8b38d2,_0x3afb82){_0x8b38d2=_0x8b38d2-0x112;const _0x294cc2=a227_0x294c();let _0x5883ab=_0x294cc2[_0x8b38d2];return _0x5883ab;}import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';export const projectDomainRoutingSyncDefinition={'service':'project','command':a227_0x77ab16(0x118),'description':a227_0x77ab16(0x114),'risk':a227_0x77ab16(0x11a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(){const _0x279ef4=a227_0x77ab16,_0x5cd626=findProjectRootDirectory();if(!resolveConfigPath(_0x5cd626))throw CliErrors[_0x279ef4(0x11f)]('No\x20Rabetbase\x20project\x20configuration\x20was\x20found.',_0x279ef4(0x117)+CLI_BIN_NAME+_0x279ef4(0x115));const _0x4f3de2=writeProjectDomainRoutingManifest(_0x5cd626);return{'ok':!![],'message':_0x279ef4(0x11e)+_0x4f3de2[_0x279ef4(0x122)],'data':_0x4f3de2};}};
1
+ const a227_0x10ad08=a227_0x361d;function a227_0x1703(){const _0x1009f6=['1716984frHrGU','read','Synchronize\x20the\x20current\x20project\x27s\x20public\x20Domain\x20routing','\x20workspace\x20init\x20--appcode\x20<code>\x20in\x20the\x20project\x20directory\x20first.','5515435AldgaL','project','2342880suvIwj','Run\x20','4WuJenE','domain-routing-sync','890382NGbccA','10ZtcIXn','6MnvUbf','No\x20Rabetbase\x20project\x20configuration\x20was\x20found.','validation','6gWhxcq','3948800yipuBT','path','2997029TQhbls','7961239CxoCIS'];a227_0x1703=function(){return _0x1009f6;};return a227_0x1703();}(function(_0x10b8da,_0xb13873){const _0x1a39dc=a227_0x361d,_0x1d08f8=_0x10b8da();while(!![]){try{const _0x2325e9=parseInt(_0x1a39dc(0x1ea))/0x1+-parseInt(_0x1a39dc(0x1ef))/0x2*(-parseInt(_0x1a39dc(0x1e0))/0x3)+-parseInt(_0x1a39dc(0x1e8))/0x4*(parseInt(_0x1a39dc(0x1e4))/0x5)+-parseInt(_0x1a39dc(0x1ec))/0x6*(-parseInt(_0x1a39dc(0x1de))/0x7)+-parseInt(_0x1a39dc(0x1f0))/0x8+parseInt(_0x1a39dc(0x1e6))/0x9+-parseInt(_0x1a39dc(0x1eb))/0xa*(parseInt(_0x1a39dc(0x1df))/0xb);if(_0x2325e9===_0xb13873)break;else _0x1d08f8['push'](_0x1d08f8['shift']());}catch(_0x4ca909){_0x1d08f8['push'](_0x1d08f8['shift']());}}}(a227_0x1703,0xee225));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a227_0x361d(_0x2b85b1,_0x2a6de1){_0x2b85b1=_0x2b85b1-0x1dd;const _0x17031d=a227_0x1703();let _0x361d8=_0x17031d[_0x2b85b1];return _0x361d8;}import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';export const projectDomainRoutingSyncDefinition={'service':a227_0x10ad08(0x1e5),'command':a227_0x10ad08(0x1e9),'description':a227_0x10ad08(0x1e2),'risk':a227_0x10ad08(0x1e1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(){const _0x1af607=a227_0x10ad08,_0xc9a1b4=findProjectRootDirectory();if(!resolveConfigPath(_0xc9a1b4))throw CliErrors[_0x1af607(0x1ee)](_0x1af607(0x1ed),_0x1af607(0x1e7)+CLI_BIN_NAME+_0x1af607(0x1e3));const _0x4b40af=writeProjectDomainRoutingManifest(_0xc9a1b4);return{'ok':!![],'message':'Domain\x20routing\x20synchronized:\x20'+_0x4b40af[_0x1af607(0x1dd)],'data':_0x4b40af};}};
@@ -1 +1 @@
1
- const a228_0x2b3e1a=a228_0x4b45;(function(_0x52c81d,_0x29e385){const _0x50e082=a228_0x4b45,_0x53ff29=_0x52c81d();while(!![]){try{const _0x3ffdb3=-parseInt(_0x50e082(0x181))/0x1*(-parseInt(_0x50e082(0x175))/0x2)+parseInt(_0x50e082(0x161))/0x3+parseInt(_0x50e082(0x16e))/0x4+parseInt(_0x50e082(0x185))/0x5*(parseInt(_0x50e082(0x15f))/0x6)+parseInt(_0x50e082(0x187))/0x7*(parseInt(_0x50e082(0x188))/0x8)+-parseInt(_0x50e082(0x17c))/0x9+parseInt(_0x50e082(0x168))/0xa*(-parseInt(_0x50e082(0x15e))/0xb);if(_0x3ffdb3===_0x29e385)break;else _0x53ff29['push'](_0x53ff29['shift']());}catch(_0x61c1ac){_0x53ff29['push'](_0x53ff29['shift']());}}}(a228_0x5347,0xbc571));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';function a228_0x5347(){const _0x2327b2=['3671080HEhPrn','nonInteractive','243999wXxJZH','176uJBBEJ','env','Would\x20upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure\x20without\x20overwriting\x20project-owned\x20entrypoints','bool','Skip\x20confirmation\x20prompt','project-name','Initialize\x20the\x20current\x20empty\x20directory\x20instead\x20of\x20creating\x20a\x20child\x20directory','completed','20649794BiBYKf','12PEWQVA','cookie','1387236MKHAZd','PATCH','cancelled','project','write','trim','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]','10mWNjlc','string','Project\x20upgrade\x20completed\x20with\x20follow-up\x20work.','Create\x20a\x20new\x20project','boolean','str','3610288eEtTQO','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]\x20from\x20the\x20empty\x20target\x20directory.','Upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','--current-dir\x20cannot\x20be\x20combined\x20with\x20a\x20project\x20name.','Prepared\x20local\x20project\x20template\x20directory','name','79042OgpRpV','appcode','template-source','Project\x20upgrade\x20completed.','cwd','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]\x20or\x20','current-dir','11053998HQElUn','../../commands/project/create/main.js','Project\x20name','yes','validation','7yeMtKa','Upgrade\x20cancelled.','Run\x20','Target\x20environment'];a228_0x5347=function(){return _0x2327b2;};return a228_0x5347();}const createFlags=[{'name':a228_0x2b3e1a(0x174),'type':'string','description':a228_0x2b3e1a(0x17e)},{'name':a228_0x2b3e1a(0x189),'type':'string','description':a228_0x2b3e1a(0x184)},{'name':a228_0x2b3e1a(0x176),'type':a228_0x2b3e1a(0x169),'description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'},{'name':a228_0x2b3e1a(0x17b),'type':'boolean','description':a228_0x2b3e1a(0x15c),'default':![]},{'name':'template-source','type':a228_0x2b3e1a(0x169),'description':a228_0x2b3e1a(0x173)}],upgradeFlags=[{'name':a228_0x2b3e1a(0x17f),'type':a228_0x2b3e1a(0x16c),'description':a228_0x2b3e1a(0x18c),'default':![]}];function a228_0x4b45(_0x255fb7,_0x27e07e){_0x255fb7=_0x255fb7-0x15c;const _0x5347ff=a228_0x5347();let _0x4b457c=_0x5347ff[_0x255fb7];return _0x4b457c;}export const projectDefinitions=[{'service':a228_0x2b3e1a(0x164),'command':'create','description':a228_0x2b3e1a(0x16b),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a228_0x2b3e1a(0x18d),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x28a104){const _0x381992=a228_0x2b3e1a,{createApp:_0x25d267}=await import(_0x381992(0x17d)),_0x2902f2=_0x28a104[_0x381992(0x16d)](_0x381992(0x174))[_0x381992(0x166)]()||_0x28a104['args'][0x0]?.['trim'](),_0x5a0f89=_0x28a104['str'](_0x381992(0x189))||undefined,_0x55e1b8=_0x28a104[_0x381992(0x16d)](_0x381992(0x176))||undefined,_0x1e813d=_0x28a104[_0x381992(0x16d)](_0x381992(0x177))[_0x381992(0x166)]()||undefined,_0x46bfa9=_0x28a104[_0x381992(0x18b)](_0x381992(0x17b));if(_0x46bfa9&&_0x2902f2)throw CliErrors[_0x381992(0x180)](_0x381992(0x172),_0x381992(0x183)+CLI_BIN_NAME+_0x381992(0x16f));if(_0x28a104[_0x381992(0x186)]){if(!_0x2902f2&&!_0x46bfa9)throw CliErrors[_0x381992(0x180)](_0x381992(0x171),'Usage:\x20'+CLI_BIN_NAME+_0x381992(0x17a)+CLI_BIN_NAME+_0x381992(0x167));await _0x25d267({'projectCode':_0x2902f2,'appCode':_0x55e1b8,'env':_0x5a0f89,'cookie':_0x28a104[_0x381992(0x160)],'currentDir':_0x46bfa9,'nonInteractive':!![],'templateSource':_0x1e813d});}else await _0x25d267({'projectCode':_0x2902f2,'appCode':_0x55e1b8,'env':_0x5a0f89,'cookie':_0x28a104[_0x381992(0x160)],'currentDir':_0x46bfa9,'templateSource':_0x1e813d});return{'ok':!![]};}},projectDomainRoutingSyncDefinition,{'service':a228_0x2b3e1a(0x164),'command':'upgrade','description':a228_0x2b3e1a(0x170),'risk':a228_0x2b3e1a(0x165),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'dryRun'(){const _0x3a1e03=a228_0x2b3e1a,_0x33106e=analyseProjectUpgrade(process[_0x3a1e03(0x179)]());return{'method':_0x3a1e03(0x162),'url':process[_0x3a1e03(0x179)](),'body':_0x33106e,'description':_0x3a1e03(0x18a)};},async 'execute'(_0x401797){const _0x58d3c1=a228_0x2b3e1a,_0x1d9727=await upgradeApp(_0x401797[_0x58d3c1(0x186)],{'yes':_0x401797['bool'](_0x58d3c1(0x17f))});return{'ok':_0x1d9727[_0x58d3c1(0x15d)]||_0x1d9727['cancelled']===!![],'message':_0x1d9727[_0x58d3c1(0x163)]?_0x58d3c1(0x182):_0x1d9727['completed']?_0x58d3c1(0x178):_0x58d3c1(0x16a),'data':_0x1d9727};}}];
1
+ function a228_0x4e8b(_0x59377d,_0x2baead){_0x59377d=_0x59377d-0x9e;const _0x18e9da=a228_0x18e9();let _0x4e8bf6=_0x18e9da[_0x59377d];return _0x4e8bf6;}const a228_0x3f6c64=a228_0x4e8b;(function(_0x1b1f0a,_0xacdb8){const _0x58a2ba=a228_0x4e8b,_0x53455e=_0x1b1f0a();while(!![]){try{const _0x5555b6=-parseInt(_0x58a2ba(0xbc))/0x1+parseInt(_0x58a2ba(0xa2))/0x2*(-parseInt(_0x58a2ba(0xac))/0x3)+-parseInt(_0x58a2ba(0xb4))/0x4*(parseInt(_0x58a2ba(0xc2))/0x5)+parseInt(_0x58a2ba(0xb7))/0x6+parseInt(_0x58a2ba(0xa7))/0x7+parseInt(_0x58a2ba(0xb3))/0x8+parseInt(_0x58a2ba(0xbd))/0x9;if(_0x5555b6===_0xacdb8)break;else _0x53455e['push'](_0x53455e['shift']());}catch(_0x5e6cef){_0x53455e['push'](_0x53455e['shift']());}}}(a228_0x18e9,0x3fc8b));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{analyseProjectUpgrade,upgradeApp}from'../../commands/project/upgrade.js';function a228_0x18e9(){const _0x263e40=['Upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure','yes','write','Would\x20upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure\x20without\x20overwriting\x20project-owned\x20entrypoints','3260768wjaCCj','1614812ivkgDj','Initialize\x20the\x20current\x20empty\x20directory\x20instead\x20of\x20creating\x20a\x20child\x20directory','boolean','530322spbRnw','Project\x20name','../../commands/project/create/main.js','cookie','--current-dir\x20cannot\x20be\x20combined\x20with\x20a\x20project\x20name.','481074YPCwmq','6353577pawCPA','PATCH','current-dir','appcode','validation','5kcgsDt','nonInteractive','str','Create\x20a\x20new\x20project','cwd','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]\x20from\x20the\x20empty\x20target\x20directory.','bool','Usage:\x20','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]\x20or\x20','upgrade','string','trim','Skip\x20confirmation\x20prompt','Project\x20upgrade\x20completed.','139798gUZzPB','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','Target\x20environment','project','env','1076579hhWZxE','template-source','cancelled','Prepared\x20local\x20project\x20template\x20directory','Upgrade\x20cancelled.','9RJGcNS','name','completed'];a228_0x18e9=function(){return _0x263e40;};return a228_0x18e9();}import{projectDomainRoutingSyncDefinition}from'../../commands/project/domain-routing-sync.js';const createFlags=[{'name':a228_0x3f6c64(0xad),'type':a228_0x3f6c64(0x9e),'description':a228_0x3f6c64(0xb8)},{'name':'env','type':a228_0x3f6c64(0x9e),'description':a228_0x3f6c64(0xa4)},{'name':a228_0x3f6c64(0xc0),'type':a228_0x3f6c64(0x9e),'description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'},{'name':a228_0x3f6c64(0xbf),'type':a228_0x3f6c64(0xb6),'description':a228_0x3f6c64(0xb5),'default':![]},{'name':a228_0x3f6c64(0xa8),'type':a228_0x3f6c64(0x9e),'description':a228_0x3f6c64(0xaa)}],upgradeFlags=[{'name':a228_0x3f6c64(0xb0),'type':'boolean','description':a228_0x3f6c64(0xa0),'default':![]}];export const projectDefinitions=[{'service':'project','command':'create','description':a228_0x3f6c64(0xc5),'risk':a228_0x3f6c64(0xb1),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'project-name','description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x282306){const _0x2ceef3=a228_0x3f6c64,{createApp:_0x57ff0d}=await import(_0x2ceef3(0xb9)),_0xec69d8=_0x282306['str']('name')[_0x2ceef3(0x9f)]()||_0x282306['args'][0x0]?.['trim'](),_0x2377f8=_0x282306[_0x2ceef3(0xc4)](_0x2ceef3(0xa6))||undefined,_0x550d14=_0x282306[_0x2ceef3(0xc4)](_0x2ceef3(0xc0))||undefined,_0x55f036=_0x282306[_0x2ceef3(0xc4)](_0x2ceef3(0xa8))[_0x2ceef3(0x9f)]()||undefined,_0x537f9a=_0x282306[_0x2ceef3(0xc8)](_0x2ceef3(0xbf));if(_0x537f9a&&_0xec69d8)throw CliErrors[_0x2ceef3(0xc1)](_0x2ceef3(0xbb),'Run\x20'+CLI_BIN_NAME+_0x2ceef3(0xc7));if(_0x282306['nonInteractive']){if(!_0xec69d8&&!_0x537f9a)throw CliErrors[_0x2ceef3(0xc1)](_0x2ceef3(0xa3),_0x2ceef3(0xc9)+CLI_BIN_NAME+_0x2ceef3(0xca)+CLI_BIN_NAME+'\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]');await _0x57ff0d({'projectCode':_0xec69d8,'appCode':_0x550d14,'env':_0x2377f8,'cookie':_0x282306[_0x2ceef3(0xba)],'currentDir':_0x537f9a,'nonInteractive':!![],'templateSource':_0x55f036});}else await _0x57ff0d({'projectCode':_0xec69d8,'appCode':_0x550d14,'env':_0x2377f8,'cookie':_0x282306[_0x2ceef3(0xba)],'currentDir':_0x537f9a,'templateSource':_0x55f036});return{'ok':!![]};}},projectDomainRoutingSyncDefinition,{'service':a228_0x3f6c64(0xa5),'command':a228_0x3f6c64(0xcb),'description':a228_0x3f6c64(0xaf),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'dryRun'(){const _0x4d759c=a228_0x3f6c64,_0x2ac73b=analyseProjectUpgrade(process['cwd']());return{'method':_0x4d759c(0xbe),'url':process[_0x4d759c(0xc6)](),'body':_0x2ac73b,'description':_0x4d759c(0xb2)};},async 'execute'(_0x523c6d){const _0x4b5c51=a228_0x3f6c64,_0x238529=await upgradeApp(_0x523c6d[_0x4b5c51(0xc3)],{'yes':_0x523c6d[_0x4b5c51(0xc8)](_0x4b5c51(0xb0))});return{'ok':_0x238529[_0x4b5c51(0xae)]||_0x238529[_0x4b5c51(0xa9)]===!![],'message':_0x238529[_0x4b5c51(0xa9)]?_0x4b5c51(0xab):_0x238529[_0x4b5c51(0xae)]?_0x4b5c51(0xa1):'Project\x20upgrade\x20completed\x20with\x20follow-up\x20work.','data':_0x238529};}}];
@@ -1 +1 @@
1
- (function(_0x55d2c6,_0x5777c7){const _0x4adf94=a229_0x267c,_0x485801=_0x55d2c6();while(!![]){try{const _0x48c1e9=-parseInt(_0x4adf94(0x141))/0x1*(-parseInt(_0x4adf94(0x115))/0x2)+parseInt(_0x4adf94(0x149))/0x3*(parseInt(_0x4adf94(0x118))/0x4)+-parseInt(_0x4adf94(0x14c))/0x5*(parseInt(_0x4adf94(0x15d))/0x6)+parseInt(_0x4adf94(0x12e))/0x7*(parseInt(_0x4adf94(0x15f))/0x8)+-parseInt(_0x4adf94(0x121))/0x9+-parseInt(_0x4adf94(0x134))/0xa*(parseInt(_0x4adf94(0x151))/0xb)+parseInt(_0x4adf94(0x159))/0xc*(parseInt(_0x4adf94(0x14b))/0xd);if(_0x48c1e9===_0x5777c7)break;else _0x485801['push'](_0x485801['shift']());}catch(_0x7e81fc){_0x485801['push'](_0x485801['shift']());}}}(a229_0x1246,0x31de8));import a229_0x2d86af from'chalk';import a229_0x5b4dc9 from'ora';function a229_0x1246(){const _0x4b6aa2=['devDependencies','yellow','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','action','6IJUspK','length','13LITqRB','130VmmENE','some','\x20\x20\x20\x20','bold','Proceed\x20with\x20upgrade?','2409THgbSA','string','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','cyan','FAIL','source\x20structure\x20is\x20current','\x20\x20Current\x20version\x20in\x20','parse','600924BsNplH','Upgrade\x20candidates\x20were\x20written,\x20but\x20project-owned\x20source\x20files\x20still\x20require\x20manual\x20merging.','\x20\x20Historical\x20ungrouped\x20multi-app\x20directories\x20keep\x20their\x20prefixed\x20API\x20files.','path','89928kfeSKA','needed','644792srGRuR','message','profiles','start','gray','@lovrabet/sdk','Step\x201/2:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','object','sdkUpgrade','338962IYPReb','Step\x202/2:\x20Application\x20source\x20—\x20','white','694704dbQOEz','Upgrade\x20cancelled.','groups','up-to-date','succeed','utf8','Upgrade\x20@lovrabet/sdk','candidate\x20entrypoints\x20written;\x20manual\x20merge\x20required','Upgrade\x20application\x20source','1501209SeTWen','skippedLegacyDirectories','detail','step','label','manualMergeRequired','push','files','package.json','done','\x20\x20bun\x20install','[\x22@lovrabet/sdk\x22]:\x20','failed','28otCzQg','apiDir','apiArchitecture','dependencies','\x20\x20#\x20or','\x20\x20npm\x20install','5870asrdog','\x20→\x20','latest','log','join','green','@lovrabet/sdk:','fail','upgrade\x20needed','\x20\x20Step\x20','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','\x20→\x20latest','\x20\x20\x20\x20\x20\x20candidate:\x20','1tAKkkz','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','Your\x20project\x20is\x20already\x20up-to-date.','===\x20Upgrade\x20Analysis\x20==='];a229_0x1246=function(){return _0x4b6aa2;};return a229_0x1246();}import{existsSync,readFileSync,writeFileSync}from'node:fs';import{resolve}from'node:path';function a229_0x267c(_0x31187b,_0x595c90){_0x31187b=_0x31187b-0x111;const _0x124629=a229_0x1246();let _0x267c66=_0x124629[_0x31187b];return _0x267c66;}import{askConfirm}from'../../commands/menu/shared/inquirer.js';import{analyzeProjectApiArchitecture,upgradeProjectApiArchitecture}from'../../commands/project/api-architecture-upgrade.js';import{NEW_CONFIG_NAME}from'../../context.js';function readProjectConfig(_0x139d7e){const _0x105a3b=a229_0x267c;try{const _0x4da154=JSON['parse'](readFileSync(_0x139d7e,_0x105a3b(0x11d)));return _0x4da154&&typeof _0x4da154===_0x105a3b(0x113)?_0x4da154:{};}catch{return{};}}export function analyseProjectUpgrade(_0x4f2aef){const _0x51b3e4=a229_0x267c;let _0x3a854e=null;const _0x4b4f54=resolve(_0x4f2aef,_0x51b3e4(0x129));if(existsSync(_0x4b4f54))try{const _0x4f9985=JSON[_0x51b3e4(0x158)](readFileSync(_0x4b4f54,_0x51b3e4(0x11d)));for(const _0xa022f9 of[_0x51b3e4(0x131),_0x51b3e4(0x145)]){const _0x1d9f76=_0x4f9985?.[_0xa022f9]?.[_0x51b3e4(0x111)];if(typeof _0x1d9f76===_0x51b3e4(0x152)){_0x1d9f76!==_0x51b3e4(0x136)&&(_0x3a854e={'pkgPath':_0x4b4f54,'currentVersion':_0x1d9f76,'field':_0xa022f9});break;}}}catch{}const _0xb1ac8b=resolve(_0x4f2aef,NEW_CONFIG_NAME),_0x41e7df=existsSync(_0xb1ac8b)?readProjectConfig(_0xb1ac8b):{},_0xd87ecb=analyzeProjectApiArchitecture(_0x4f2aef,_0x41e7df);return{'sdkUpgrade':_0x3a854e,'apiArchitecture':_0xd87ecb};}function printReport(_0x39bd72){const _0x14497a=a229_0x267c;console[_0x14497a(0x137)](''),console[_0x14497a(0x137)](a229_0x2d86af[_0x14497a(0x14f)](_0x14497a(0x144))),console[_0x14497a(0x137)](''),console[_0x14497a(0x137)](a229_0x2d86af[_0x14497a(0x154)]('Application\x20source:')+('\x20\x20'+(_0x39bd72['apiArchitecture'][_0x14497a(0x15e)]?a229_0x2d86af[_0x14497a(0x146)](_0x14497a(0x13c)):a229_0x2d86af['green'](_0x14497a(0x11b)))));for(const _0x4a254a of _0x39bd72[_0x14497a(0x130)][_0x14497a(0x11a)]){console[_0x14497a(0x137)]('\x20\x20'+_0x4a254a[_0x14497a(0x12f)]+'\x20('+_0x4a254a[_0x14497a(0x161)][_0x14497a(0x138)](',\x20')+')');for(const _0x3abcb3 of _0x4a254a[_0x14497a(0x128)]){console[_0x14497a(0x137)](_0x14497a(0x14e)+_0x3abcb3[_0x14497a(0x148)]['padEnd'](0x11)+'\x20'+_0x3abcb3[_0x14497a(0x15c)]),_0x3abcb3['candidatePath']&&console['log'](_0x14497a(0x140)+_0x3abcb3['candidatePath']);}}_0x39bd72[_0x14497a(0x130)][_0x14497a(0x122)][_0x14497a(0x14a)]>0x0&&console['log'](_0x14497a(0x15b));console['log']('');if(_0x39bd72[_0x14497a(0x114)]){const {currentVersion:_0x1132f7,field:_0xdf490b,pkgPath:_0x28c2f7}=_0x39bd72[_0x14497a(0x114)];console[_0x14497a(0x137)](a229_0x2d86af[_0x14497a(0x154)](_0x14497a(0x13a))+('\x20\x20'+a229_0x2d86af['yellow'](_0x28c2f7))),console['log'](_0x14497a(0x157)+_0xdf490b+':\x20'+a229_0x2d86af[_0x14497a(0x146)](_0x1132f7)+_0x14497a(0x135)+a229_0x2d86af[_0x14497a(0x139)](_0x14497a(0x136))),console[_0x14497a(0x137)](_0x14497a(0x13e));}else console[_0x14497a(0x137)](a229_0x2d86af[_0x14497a(0x154)]('@lovrabet/sdk:')+'\x20\x20'+a229_0x2d86af[_0x14497a(0x163)]('not\x20found\x20or\x20already\x20at\x20latest'));console[_0x14497a(0x137)]('');}function execUpgradeSdk(_0x2d0ee0){const _0x4c8b5a=a229_0x267c;if(!_0x2d0ee0[_0x4c8b5a(0x114)])return{'step':0x1,'label':_0x4c8b5a(0x11e),'ok':!![],'detail':'skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)'};const {pkgPath:_0x42a4e4,currentVersion:_0x5558b2,field:_0x3aae87}=_0x2d0ee0[_0x4c8b5a(0x114)];try{const _0x17ba89=readFileSync(_0x42a4e4,'utf8'),_0x875cd3=JSON[_0x4c8b5a(0x158)](_0x17ba89);return _0x875cd3[_0x3aae87][_0x4c8b5a(0x111)]=_0x4c8b5a(0x136),writeFileSync(_0x42a4e4,JSON['stringify'](_0x875cd3,null,0x2)+'\x0a','utf8'),{'step':0x1,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0x3aae87+_0x4c8b5a(0x12c)+_0x5558b2+_0x4c8b5a(0x13f)};}catch(_0x15f08e){return{'step':0x1,'label':_0x4c8b5a(0x11e),'ok':![],'detail':_0x15f08e instanceof Error?_0x15f08e['message']:String(_0x15f08e)};}}function printSummary(_0x138d45){const _0x4e2e4a=a229_0x267c;console[_0x4e2e4a(0x137)](''),console[_0x4e2e4a(0x137)](a229_0x2d86af[_0x4e2e4a(0x14f)]('===\x20Upgrade\x20Summary\x20===')),console[_0x4e2e4a(0x137)]('');for(const _0x1c6b2d of _0x138d45){const _0x1f3c61=_0x1c6b2d['ok']?a229_0x2d86af[_0x4e2e4a(0x139)]('OK'):a229_0x2d86af['red'](_0x4e2e4a(0x155));console[_0x4e2e4a(0x137)]('\x20\x20'+_0x1f3c61+_0x4e2e4a(0x13d)+_0x1c6b2d[_0x4e2e4a(0x124)]+':\x20'+_0x1c6b2d[_0x4e2e4a(0x125)]);if(_0x1c6b2d['detail'])console[_0x4e2e4a(0x137)]('\x20\x20\x20\x20\x20\x20\x20'+a229_0x2d86af[_0x4e2e4a(0x163)](_0x1c6b2d[_0x4e2e4a(0x123)]));}console[_0x4e2e4a(0x137)]('');}export async function upgradeApp(_0x5b6516,_0xe24933){const _0x469f63=a229_0x267c,_0x3e6cb0=process['cwd'](),_0xa1ee86=analyseProjectUpgrade(_0x3e6cb0);if(!_0xa1ee86[_0x469f63(0x114)]&&!_0xa1ee86[_0x469f63(0x130)][_0x469f63(0x15e)])return console['log'](a229_0x2d86af[_0x469f63(0x139)](_0x469f63(0x143))),{'analysis':_0xa1ee86,'steps':[],'completed':!![]};printReport(_0xa1ee86);const _0x3e2412=!!(_0xe24933['yes']||_0xe24933['Y']||_0x5b6516);if(!_0x3e2412)try{const _0x36bcf8=await askConfirm(_0x469f63(0x150));if(!_0x36bcf8)return console[_0x469f63(0x137)](a229_0x2d86af[_0x469f63(0x163)](_0x469f63(0x119))),{'analysis':_0xa1ee86,'steps':[],'completed':![],'cancelled':!![]};}catch(_0x27ccdf){if(_0x27ccdf?.[_0x469f63(0x160)]==='CANCEL')return console[_0x469f63(0x137)](a229_0x2d86af[_0x469f63(0x163)](_0x469f63(0x119))),{'analysis':_0xa1ee86,'steps':[],'completed':![],'cancelled':!![]};throw _0x27ccdf;}const _0x35a918=[],_0x353200=a229_0x5b4dc9({'text':_0x469f63(0x112),'color':'cyan'})[_0x469f63(0x162)](),_0x4783c1=execUpgradeSdk(_0xa1ee86);_0x35a918[_0x469f63(0x127)](_0x4783c1),_0x353200[_0x4783c1['ok']?_0x469f63(0x11c):_0x469f63(0x13b)]('Step\x201/2:\x20@lovrabet/sdk\x20—\x20'+(_0x4783c1[_0x469f63(0x123)]??(_0x4783c1['ok']?_0x469f63(0x12a):_0x469f63(0x12d))));const _0x297585=a229_0x5b4dc9({'text':'Step\x202/2:\x20Upgrading\x20application\x20source\x20structure...','color':_0x469f63(0x154)})[_0x469f63(0x162)]();let _0x3c448f;try{_0x3c448f=await upgradeProjectApiArchitecture(_0x3e6cb0);const _0xf112dc=_0x3c448f[_0x469f63(0x126)]?_0x469f63(0x11f):_0x469f63(0x156);_0x297585['succeed'](_0x469f63(0x116)+_0xf112dc),_0x35a918[_0x469f63(0x127)]({'step':0x2,'label':'Upgrade\x20application\x20source','ok':!![],'detail':_0xf112dc});}catch(_0x22f7ba){const _0xeac11f=_0x22f7ba instanceof Error?_0x22f7ba['message']:String(_0x22f7ba);_0x297585[_0x469f63(0x13b)](_0x469f63(0x116)+_0xeac11f),_0x35a918[_0x469f63(0x127)]({'step':0x2,'label':_0x469f63(0x120),'ok':![],'detail':_0xeac11f});}printSummary(_0x35a918);const _0x128e44=_0x35a918[_0x469f63(0x14d)](_0x513b84=>!_0x513b84['ok']);if(_0x128e44)console[_0x469f63(0x137)](a229_0x2d86af[_0x469f63(0x146)](_0x469f63(0x142)));else _0x3c448f?.['manualMergeRequired']?console[_0x469f63(0x137)](a229_0x2d86af[_0x469f63(0x146)](_0x469f63(0x15a))):console[_0x469f63(0x137)](a229_0x2d86af['green']('Upgrade\x20completed\x20successfully!'));return _0x4783c1['ok']&&_0xa1ee86[_0x469f63(0x114)]&&(console[_0x469f63(0x137)](''),console[_0x469f63(0x137)](a229_0x2d86af[_0x469f63(0x14f)]['cyan'](_0x469f63(0x153))),console[_0x469f63(0x137)](a229_0x2d86af[_0x469f63(0x154)](_0x469f63(0x147))),console[_0x469f63(0x137)](''),console['log'](a229_0x2d86af[_0x469f63(0x117)](_0x469f63(0x133))),console[_0x469f63(0x137)](a229_0x2d86af[_0x469f63(0x117)](_0x469f63(0x132))),console[_0x469f63(0x137)](a229_0x2d86af[_0x469f63(0x117)](_0x469f63(0x12b))),console[_0x469f63(0x137)]('')),{'analysis':_0xa1ee86,'steps':_0x35a918,'apiArchitecture':_0x3c448f,'completed':!_0x128e44&&!_0x3c448f?.[_0x469f63(0x126)]};}
1
+ function a229_0x580c(_0xb615b5,_0x2f93a6){_0xb615b5=_0xb615b5-0xb2;const _0x5dac38=a229_0x5dac();let _0x580c5e=_0x5dac38[_0xb615b5];return _0x580c5e;}(function(_0x4ed4e5,_0xae29d1){const _0x364fbc=a229_0x580c,_0x11cf18=_0x4ed4e5();while(!![]){try{const _0x418365=-parseInt(_0x364fbc(0xe8))/0x1*(parseInt(_0x364fbc(0x100))/0x2)+-parseInt(_0x364fbc(0xcd))/0x3*(-parseInt(_0x364fbc(0xdc))/0x4)+parseInt(_0x364fbc(0xf3))/0x5+parseInt(_0x364fbc(0x104))/0x6+parseInt(_0x364fbc(0x101))/0x7*(parseInt(_0x364fbc(0xbc))/0x8)+-parseInt(_0x364fbc(0xba))/0x9*(parseInt(_0x364fbc(0xf4))/0xa)+-parseInt(_0x364fbc(0xcc))/0xb;if(_0x418365===_0xae29d1)break;else _0x11cf18['push'](_0x11cf18['shift']());}catch(_0x2dcfba){_0x11cf18['push'](_0x11cf18['shift']());}}}(a229_0x5dac,0x301ee));import a229_0x55c8fa from'chalk';import a229_0x2d8669 from'ora';function a229_0x5dac(){const _0x488b7c=['candidatePath','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','20682AJxdzp','Upgrade\x20application\x20source','8eZlqoG','push','upgrade\x20needed','Step\x202/2:\x20Application\x20source\x20—\x20','up-to-date','Step\x202/2:\x20Upgrading\x20application\x20source\x20structure...','green','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','not\x20found\x20or\x20already\x20at\x20latest','\x20\x20\x20\x20','\x20→\x20','string','sdkUpgrade','log','join','devDependencies','8453555zGnhqu','9YvbyLG','@lovrabet/sdk:','Proceed\x20with\x20upgrade?','package.json','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','failed','Upgrade\x20cancelled.','candidate\x20entrypoints\x20written;\x20manual\x20merge\x20required','cwd','bold','cyan','message','apiDir','groups','object','274676RiEbdX','Application\x20source:','white','done','apiArchitecture','CANCEL','label','\x20\x20\x20\x20\x20\x20\x20','stringify','Step\x201/2:\x20@lovrabet/sdk\x20—\x20','parse','red','1rYdFRh','\x20\x20Current\x20version\x20in\x20','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','dependencies','\x20\x20npm\x20install','yes','some','latest','Your\x20project\x20is\x20already\x20up-to-date.','source\x20structure\x20is\x20current','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','1827005fEFuvX','630hyQWaa','yellow','files','path','detail','===\x20Upgrade\x20Summary\x20===','\x20\x20bun\x20install','gray','Upgrade\x20candidates\x20were\x20written,\x20but\x20project-owned\x20source\x20files\x20still\x20require\x20manual\x20merging.','manualMergeRequired','Upgrade\x20@lovrabet/sdk','[\x22@lovrabet/sdk\x22]:\x20','42062ZrSfWD','2050447rqhWnT','step','Upgrade\x20completed\x20successfully!','1602498HUubih','@lovrabet/sdk','needed','FAIL','profiles','utf8','\x20\x20Historical\x20ungrouped\x20multi-app\x20directories\x20keep\x20their\x20prefixed\x20API\x20files.','start','\x20\x20Step\x20'];a229_0x5dac=function(){return _0x488b7c;};return a229_0x5dac();}import{existsSync,readFileSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{askConfirm}from'../../commands/menu/shared/inquirer.js';import{analyzeProjectApiArchitecture,upgradeProjectApiArchitecture}from'../../commands/project/api-architecture-upgrade.js';import{NEW_CONFIG_NAME}from'../../context.js';function readProjectConfig(_0x223ba4){const _0x49b218=a229_0x580c;try{const _0x2ce7bf=JSON[_0x49b218(0xe6)](readFileSync(_0x223ba4,_0x49b218(0xb4)));return _0x2ce7bf&&typeof _0x2ce7bf===_0x49b218(0xdb)?_0x2ce7bf:{};}catch{return{};}}export function analyseProjectUpgrade(_0x5c3492){const _0x2b3f40=a229_0x580c;let _0x41ec80=null;const _0x333ab5=resolve(_0x5c3492,_0x2b3f40(0xd0));if(existsSync(_0x333ab5))try{const _0x197cd2=JSON[_0x2b3f40(0xe6)](readFileSync(_0x333ab5,'utf8'));for(const _0xf734f5 of[_0x2b3f40(0xeb),_0x2b3f40(0xcb)]){const _0x3f0c3b=_0x197cd2?.[_0xf734f5]?.[_0x2b3f40(0x105)];if(typeof _0x3f0c3b===_0x2b3f40(0xc7)){_0x3f0c3b!=='latest'&&(_0x41ec80={'pkgPath':_0x333ab5,'currentVersion':_0x3f0c3b,'field':_0xf734f5});break;}}}catch{}const _0x3f64d4=resolve(_0x5c3492,NEW_CONFIG_NAME),_0x15cca2=existsSync(_0x3f64d4)?readProjectConfig(_0x3f64d4):{},_0x109a22=analyzeProjectApiArchitecture(_0x5c3492,_0x15cca2);return{'sdkUpgrade':_0x41ec80,'apiArchitecture':_0x109a22};}function printReport(_0x322327){const _0x4a355f=a229_0x580c;console[_0x4a355f(0xc9)](''),console[_0x4a355f(0xc9)](a229_0x55c8fa[_0x4a355f(0xd6)]('===\x20Upgrade\x20Analysis\x20===')),console['log'](''),console[_0x4a355f(0xc9)](a229_0x55c8fa[_0x4a355f(0xd7)](_0x4a355f(0xdd))+('\x20\x20'+(_0x322327[_0x4a355f(0xe0)][_0x4a355f(0x106)]?a229_0x55c8fa['yellow'](_0x4a355f(0xbe)):a229_0x55c8fa['green'](_0x4a355f(0xc0)))));for(const _0x1c2125 of _0x322327['apiArchitecture'][_0x4a355f(0xda)]){console['log']('\x20\x20'+_0x1c2125[_0x4a355f(0xd9)]+'\x20('+_0x1c2125[_0x4a355f(0xb3)][_0x4a355f(0xca)](',\x20')+')');for(const _0x253761 of _0x1c2125[_0x4a355f(0xf6)]){console['log'](_0x4a355f(0xc5)+_0x253761['action']['padEnd'](0x11)+'\x20'+_0x253761[_0x4a355f(0xf7)]),_0x253761[_0x4a355f(0xb8)]&&console['log']('\x20\x20\x20\x20\x20\x20candidate:\x20'+_0x253761[_0x4a355f(0xb8)]);}}_0x322327[_0x4a355f(0xe0)]['skippedLegacyDirectories']['length']>0x0&&console[_0x4a355f(0xc9)](_0x4a355f(0xb5));console['log']('');if(_0x322327[_0x4a355f(0xc8)]){const {currentVersion:_0x5f1f7f,field:_0x53d352,pkgPath:_0x59ace0}=_0x322327[_0x4a355f(0xc8)];console['log'](a229_0x55c8fa[_0x4a355f(0xd7)](_0x4a355f(0xce))+('\x20\x20'+a229_0x55c8fa['yellow'](_0x59ace0))),console[_0x4a355f(0xc9)](_0x4a355f(0xe9)+_0x53d352+':\x20'+a229_0x55c8fa[_0x4a355f(0xf5)](_0x5f1f7f)+_0x4a355f(0xc6)+a229_0x55c8fa[_0x4a355f(0xc2)](_0x4a355f(0xef))),console['log'](_0x4a355f(0xb9));}else console['log'](a229_0x55c8fa[_0x4a355f(0xd7)](_0x4a355f(0xce))+'\x20\x20'+a229_0x55c8fa['gray'](_0x4a355f(0xc4)));console[_0x4a355f(0xc9)]('');}function execUpgradeSdk(_0x34435a){const _0x33cd9e=a229_0x580c;if(!_0x34435a[_0x33cd9e(0xc8)])return{'step':0x1,'label':_0x33cd9e(0xfe),'ok':!![],'detail':_0x33cd9e(0xea)};const {pkgPath:_0x279130,currentVersion:_0x4fda7c,field:_0x9a1736}=_0x34435a[_0x33cd9e(0xc8)];try{const _0x1c53bc=readFileSync(_0x279130,_0x33cd9e(0xb4)),_0xfc3745=JSON[_0x33cd9e(0xe6)](_0x1c53bc);return _0xfc3745[_0x9a1736]['@lovrabet/sdk']=_0x33cd9e(0xef),writeFileSync(_0x279130,JSON[_0x33cd9e(0xe4)](_0xfc3745,null,0x2)+'\x0a',_0x33cd9e(0xb4)),{'step':0x1,'label':_0x33cd9e(0xfe),'ok':!![],'detail':_0x9a1736+_0x33cd9e(0xff)+_0x4fda7c+'\x20→\x20latest'};}catch(_0x5da3e9){return{'step':0x1,'label':'Upgrade\x20@lovrabet/sdk','ok':![],'detail':_0x5da3e9 instanceof Error?_0x5da3e9[_0x33cd9e(0xd8)]:String(_0x5da3e9)};}}function printSummary(_0x43db98){const _0x24ec05=a229_0x580c;console[_0x24ec05(0xc9)](''),console[_0x24ec05(0xc9)](a229_0x55c8fa['bold'](_0x24ec05(0xf9))),console[_0x24ec05(0xc9)]('');for(const _0x45582e of _0x43db98){const _0x564e01=_0x45582e['ok']?a229_0x55c8fa[_0x24ec05(0xc2)]('OK'):a229_0x55c8fa[_0x24ec05(0xe7)](_0x24ec05(0xb2));console['log']('\x20\x20'+_0x564e01+_0x24ec05(0xb7)+_0x45582e[_0x24ec05(0x102)]+':\x20'+_0x45582e[_0x24ec05(0xe2)]);if(_0x45582e['detail'])console['log'](_0x24ec05(0xe3)+a229_0x55c8fa['gray'](_0x45582e[_0x24ec05(0xf8)]));}console['log']('');}export async function upgradeApp(_0x1e3222,_0x6b2056){const _0xc0be80=a229_0x580c,_0x1727d0=process[_0xc0be80(0xd5)](),_0x2bcdaf=analyseProjectUpgrade(_0x1727d0);if(!_0x2bcdaf['sdkUpgrade']&&!_0x2bcdaf[_0xc0be80(0xe0)]['needed'])return console[_0xc0be80(0xc9)](a229_0x55c8fa[_0xc0be80(0xc2)](_0xc0be80(0xf0))),{'analysis':_0x2bcdaf,'steps':[],'completed':!![]};printReport(_0x2bcdaf);const _0x36a4fd=!!(_0x6b2056[_0xc0be80(0xed)]||_0x6b2056['Y']||_0x1e3222);if(!_0x36a4fd)try{const _0x15d09e=await askConfirm(_0xc0be80(0xcf));if(!_0x15d09e)return console[_0xc0be80(0xc9)](a229_0x55c8fa[_0xc0be80(0xfb)]('Upgrade\x20cancelled.')),{'analysis':_0x2bcdaf,'steps':[],'completed':![],'cancelled':!![]};}catch(_0x4d9cf9){if(_0x4d9cf9?.[_0xc0be80(0xd8)]===_0xc0be80(0xe1))return console[_0xc0be80(0xc9)](a229_0x55c8fa[_0xc0be80(0xfb)](_0xc0be80(0xd3))),{'analysis':_0x2bcdaf,'steps':[],'completed':![],'cancelled':!![]};throw _0x4d9cf9;}const _0x2723d2=[],_0x232683=a229_0x2d8669({'text':'Step\x201/2:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','color':_0xc0be80(0xd7)})[_0xc0be80(0xb6)](),_0xe9979b=execUpgradeSdk(_0x2bcdaf);_0x2723d2[_0xc0be80(0xbd)](_0xe9979b),_0x232683[_0xe9979b['ok']?'succeed':'fail'](_0xc0be80(0xe5)+(_0xe9979b[_0xc0be80(0xf8)]??(_0xe9979b['ok']?_0xc0be80(0xdf):_0xc0be80(0xd2))));const _0x32b6ca=a229_0x2d8669({'text':_0xc0be80(0xc1),'color':'cyan'})[_0xc0be80(0xb6)]();let _0x42916e;try{_0x42916e=await upgradeProjectApiArchitecture(_0x1727d0);const _0x2e8cc6=_0x42916e['manualMergeRequired']?_0xc0be80(0xd4):_0xc0be80(0xf1);_0x32b6ca['succeed'](_0xc0be80(0xbf)+_0x2e8cc6),_0x2723d2[_0xc0be80(0xbd)]({'step':0x2,'label':_0xc0be80(0xbb),'ok':!![],'detail':_0x2e8cc6});}catch(_0x285ec6){const _0x40b7d8=_0x285ec6 instanceof Error?_0x285ec6[_0xc0be80(0xd8)]:String(_0x285ec6);_0x32b6ca['fail']('Step\x202/2:\x20Application\x20source\x20—\x20'+_0x40b7d8),_0x2723d2[_0xc0be80(0xbd)]({'step':0x2,'label':_0xc0be80(0xbb),'ok':![],'detail':_0x40b7d8});}printSummary(_0x2723d2);const _0x361bf7=_0x2723d2[_0xc0be80(0xee)](_0x1b2f49=>!_0x1b2f49['ok']);if(_0x361bf7)console[_0xc0be80(0xc9)](a229_0x55c8fa[_0xc0be80(0xf5)](_0xc0be80(0xc3)));else _0x42916e?.['manualMergeRequired']?console[_0xc0be80(0xc9)](a229_0x55c8fa[_0xc0be80(0xf5)](_0xc0be80(0xfc))):console[_0xc0be80(0xc9)](a229_0x55c8fa['green'](_0xc0be80(0x103)));return _0xe9979b['ok']&&_0x2bcdaf[_0xc0be80(0xc8)]&&(console[_0xc0be80(0xc9)](''),console[_0xc0be80(0xc9)](a229_0x55c8fa[_0xc0be80(0xd6)][_0xc0be80(0xd7)](_0xc0be80(0xd1))),console[_0xc0be80(0xc9)](a229_0x55c8fa['cyan'](_0xc0be80(0xf2))),console['log'](''),console[_0xc0be80(0xc9)](a229_0x55c8fa[_0xc0be80(0xde)](_0xc0be80(0xec))),console[_0xc0be80(0xc9)](a229_0x55c8fa[_0xc0be80(0xde)]('\x20\x20#\x20or')),console['log'](a229_0x55c8fa[_0xc0be80(0xde)](_0xc0be80(0xfa))),console['log']('')),{'analysis':_0x2bcdaf,'steps':_0x2723d2,'apiArchitecture':_0x42916e,'completed':!_0x361bf7&&!_0x42916e?.[_0xc0be80(0xfd)]};}
@@ -1 +1 @@
1
- const a230_0x40f642=a230_0x1f90;(function(_0x123dcf,_0x5b4a4a){const _0x4f427e=a230_0x1f90,_0x1b52cf=_0x123dcf();while(!![]){try{const _0x1a5834=-parseInt(_0x4f427e(0x193))/0x1*(-parseInt(_0x4f427e(0x172))/0x2)+parseInt(_0x4f427e(0x16a))/0x3*(parseInt(_0x4f427e(0x143))/0x4)+parseInt(_0x4f427e(0x19d))/0x5*(parseInt(_0x4f427e(0x18b))/0x6)+parseInt(_0x4f427e(0x190))/0x7+parseInt(_0x4f427e(0x175))/0x8+parseInt(_0x4f427e(0x15c))/0x9+parseInt(_0x4f427e(0x176))/0xa*(-parseInt(_0x4f427e(0x17f))/0xb);if(_0x1a5834===_0x5b4a4a)break;else _0x1b52cf['push'](_0x1b52cf['shift']());}catch(_0x57532c){_0x1b52cf['push'](_0x1b52cf['shift']());}}}(a230_0x2331,0xf1537));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';function a230_0x1f90(_0x3488ac,_0x30ea5f){_0x3488ac=_0x3488ac-0x13a;const _0x233192=a230_0x2331();let _0x1f9087=_0x233192[_0x3488ac];return _0x1f9087;}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';function a230_0x2331(){const _0x182e25=['rabetbase\x20menu\x20asset-update','permit:role-apis-set','data:getOne','rabetbase\x20page\x20custom-update','knowledge-base:detail','app:assets-update','project:init','start','preview','12602574Thjuzg','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.','create','description','Notification\x20Configuration','has','Instant\x20API\x20Policy','data:filter','Async\x20Tasks','page:react-publish','Platform\x20Issue','page:custom-create','rabetbase\x20app\x20list\x20--remote','59673jdYJtJ','skill:','rabetbase\x20kb\x20update','rabetbase\x20kb\x20create','User\x20Accounts','push','Approval\x20Flows','Menu','439384SOKSlK','app:remove','Deployment','11019856MaSCLE','427240TkXeBw','get','knowledge-base:delete','`\x20has\x20been\x20removed.','app:use','login','page:react-update','rabetbase\x20kb\x20detail','Database\x20Connections','1177kUuaHs','app:remote','rabetbase\x20page\x20custom-detail','rabetbase\x20auth\x20logout','Run\x20Scripts','Tenant\x20Members','rabetbase\x20page\x20custom-publish','Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.','rabetbase\x20run\x20preview','permit:page-get','Diagnostics','rabetbase\x20workspace\x20remove\x20<name>','1860618EWvLRo','rabetbase\x20kb\x20list','rabetbase\x20menu\x20subapp-assets-update\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>\x20--resources\x20\x27<json>\x27','rabetbase\x20sql\x20create','Authentication','583562hCuOtf','CLI\x20Built-in\x20Skill','Schema','2vuIcmB','knowledge-base:update','Data\x20List\x20Pages\x20&\x20Custom\x20Pages','Configuration','Workspace','from','rabetbase\x20menu\x20subapp-assets-status\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','service','SQL\x20Queries','5lRCSSs','risk','rabetbase\x20role\x20list','read','Project','build','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','wildcardDef','role:create','map','\x20\x20[high-risk-write]','command','Run\x20any\x20package.json\x20script','flow:disable','API\x20Development','Company\x20Knowledge\x20Base','defaultCommand','skills:','filter','app:assets-status','rabetbase\x20cli-skill\x20install','menu:update','rabetbase\x20dataset\x20design-start\x20--file\x20<manifest.json>','Code\x20Generation','write','\x20\x20[','rabetbase\x20kb\x20delete','rabetbase\x20run\x20build','dataset:generate-start','rabetbase\x20bff\x20create','Runtime\x20App\x20Config\x20Management','skill:install','Dataset\x20&\x20Operations','rabetbase\x20page\x20data-list-status','deployment:sync','bff:new','page:react-list','dataset:generate-status','392LcuQpF','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','App\x20Management','set','Roles','isSingleCommand','rabetbase\x20project\x20create\x20<project-name>','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','sql:save','Self\x20Update','permit:page-set','permit:role-menus-set','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','length','knowledge-base:create','Agent\x20Context\x20Rules'];a230_0x2331=function(){return _0x182e25;};return a230_0x2331();}import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{userAccountDefinitions}from'../commands/user-account/index.js';import{flowDefinitions}from'../commands/flow/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x575ac2){const _0x4a9489=a230_0x1f90;for(const _0x5ca8dc of _0x575ac2){definitions[_0x4a9489(0x146)](_0x5ca8dc[_0x4a9489(0x19b)]+':'+_0x5ca8dc[_0x4a9489(0x1a8)],_0x5ca8dc);let _0x3010fc=serviceGroups['get'](_0x5ca8dc[_0x4a9489(0x19b)]);!_0x3010fc&&(_0x3010fc=[],serviceGroups['set'](_0x5ca8dc[_0x4a9489(0x19b)],_0x3010fc)),_0x3010fc[_0x4a9489(0x16f)](_0x5ca8dc);}}function registerDeclarativeService(_0x52923b,_0x31be19,_0x3cad2d){const _0x320479=a230_0x1f90;registerDefinitions(_0x31be19);_0x3cad2d?.[_0x320479(0x1a4)]&&registerDefinitions([_0x3cad2d['wildcardDef']]);const _0x451c1d=_0x15d393=>_0x15d393===_0x320479(0x1a0)?'':_0x15d393===_0x320479(0x1b5)?'\x20\x20[write]':_0x320479(0x1a7),_0x32279f={'service':_0x31be19[0x0][_0x320479(0x19b)],'label':_0x52923b,'commands':_0x31be19[_0x320479(0x1af)](_0x456f6a=>!_0x456f6a['hidden'])[_0x320479(0x1a6)](_0x8c2dab=>({'command':_0x8c2dab[_0x320479(0x1a8)],'description':_0x8c2dab[_0x320479(0x160)],'tag':_0x451c1d(_0x8c2dab[_0x320479(0x19e)])})),'declarative':!![],'defaultCommand':_0x3cad2d?.[_0x320479(0x1ad)]??(_0x3cad2d?.[_0x320479(0x148)]?_0x31be19[0x0][_0x320479(0x1a8)]:undefined),'wildcardDef':_0x3cad2d?.['wildcardDef'],'isSingleCommand':_0x3cad2d?.['isSingleCommand']};serviceRegistry[_0x320479(0x16f)](_0x32279f),serviceByName[_0x320479(0x146)](_0x32279f[_0x320479(0x19b)],_0x32279f);}registerDeclarativeService(a230_0x40f642(0x1a1),projectDefinitions),registerDeclarativeService(a230_0x40f642(0x197),workspaceDefinitions),registerDeclarativeService(a230_0x40f642(0x145),appDefinitions),registerDeclarativeService(a230_0x40f642(0x18f),authDefinitions,{'defaultCommand':a230_0x40f642(0x17b)}),registerDeclarativeService(a230_0x40f642(0x184),tenantDefinitions),registerDeclarativeService(a230_0x40f642(0x16e),userAccountDefinitions),registerDeclarativeService(a230_0x40f642(0x13d),datasetDefinitions),registerDeclarativeService(a230_0x40f642(0x195),pageDefinitions),registerDeclarativeService(a230_0x40f642(0x1ab),apiDefinitions),registerDeclarativeService('Backend\x20Function\x20Scripts',bffDefinitions),registerDeclarativeService(a230_0x40f642(0x163),instantApiPolicyDefinitions),registerDeclarativeService(a230_0x40f642(0x161),notificationDefinitions),registerDeclarativeService(a230_0x40f642(0x19c),sqlDefinitions),registerDeclarativeService(a230_0x40f642(0x17e),dbDefinitions),registerDeclarativeService(a230_0x40f642(0x174),deploymentDefinitions),registerDeclarativeService(a230_0x40f642(0x171),menuDefinitions),registerDeclarativeService(a230_0x40f642(0x165),taskDefinitions),registerDeclarativeService(a230_0x40f642(0x147),roleDefinitions),registerDeclarativeService(a230_0x40f642(0x13b),appConfigDefinitions),registerDeclarativeService(a230_0x40f642(0x1ac),kbDefinitions),registerDeclarativeService(a230_0x40f642(0x152),ruleDefinitions),registerDeclarativeService(a230_0x40f642(0x167),issueDefinitions),registerDeclarativeService('File',fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService(a230_0x40f642(0x1b4),codegenDefinitions),registerDeclarativeService(a230_0x40f642(0x196),configDefinitions),registerDeclarativeService(a230_0x40f642(0x189),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0x40f642(0x192),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0x40f642(0x14c),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0x40f642(0x191),cliSkillDefinitions,{'defaultCommand':'install'}),registerDeclarativeService(a230_0x40f642(0x170),flowDefinitions),registerDeclarativeService('Logs',logsDefinitions,{'defaultCommand':'show'}),registerDeclarativeService(a230_0x40f642(0x183),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a230_0x40f642(0x150)]-0x1];last['commands']=[{'command':'<script>','description':a230_0x40f642(0x1a9),'tag':a230_0x40f642(0x1b6)+runDefinition['risk']+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a230_0x40f642(0x1b9),a230_0x40f642(0x1b3)],[a230_0x40f642(0x142),'rabetbase\x20dataset\x20design-status\x20--operation-id\x20<id>'],[a230_0x40f642(0x14b),a230_0x40f642(0x144)],[a230_0x40f642(0x140),a230_0x40f642(0x13a)],['sql:new',a230_0x40f642(0x18e)],[a230_0x40f642(0x1b2),a230_0x40f642(0x153)],[a230_0x40f642(0x159),a230_0x40f642(0x14f)],[a230_0x40f642(0x16b),'rabetbase\x20cli-skill\x20install'],[a230_0x40f642(0x13c),'rabetbase\x20cli-skill\x20install'],[a230_0x40f642(0x1ae),'rabetbase\x20cli-skill\x20install'],['skills:install',a230_0x40f642(0x1b1)],[a230_0x40f642(0x1b0),a230_0x40f642(0x199)],[a230_0x40f642(0x158),a230_0x40f642(0x18d)],[a230_0x40f642(0x180),a230_0x40f642(0x169)],[a230_0x40f642(0x17a),'rabetbase\x20workspace\x20use\x20--app\x20<name>'],['app:add',a230_0x40f642(0x15d)],[a230_0x40f642(0x173),a230_0x40f642(0x18a)],['knowledge-base:list',a230_0x40f642(0x18c)],[a230_0x40f642(0x157),a230_0x40f642(0x17d)],[a230_0x40f642(0x151),a230_0x40f642(0x16d)],[a230_0x40f642(0x194),a230_0x40f642(0x16c)],[a230_0x40f642(0x178),a230_0x40f642(0x1b7)],[a230_0x40f642(0x1a5),a230_0x40f642(0x19f)],[a230_0x40f642(0x164),a230_0x40f642(0x19a)],[a230_0x40f642(0x155),'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27'],['page:standard-page-status',a230_0x40f642(0x13e)],['page:react-create','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK'],[a230_0x40f642(0x168),a230_0x40f642(0x14a)],[a230_0x40f642(0x141),'rabetbase\x20page\x20custom-list'],['page:react-detail',a230_0x40f642(0x181)],[a230_0x40f642(0x17c),a230_0x40f642(0x156)],[a230_0x40f642(0x166),a230_0x40f642(0x185)]]),REMOVED_COMMAND_HINTS=new Map([['flow:enable',a230_0x40f642(0x15e)],[a230_0x40f642(0x1aa),a230_0x40f642(0x15e)],[a230_0x40f642(0x13f),a230_0x40f642(0x186)],[a230_0x40f642(0x188),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a230_0x40f642(0x14d),a230_0x40f642(0x1a3)],['permit:role-menus','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a230_0x40f642(0x14e),a230_0x40f642(0x1a3)],[a230_0x40f642(0x154),a230_0x40f642(0x1a3)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a230_0x40f642(0x15f),a230_0x40f642(0x149)],[a230_0x40f642(0x15a),'rabetbase\x20run\x20start'],[a230_0x40f642(0x1a2),a230_0x40f642(0x1b8)],[a230_0x40f642(0x15b),a230_0x40f642(0x187)],['logout',a230_0x40f642(0x182)]]);export function resolveRemovedCommand(_0x32a55f,_0x3dfe84){const _0x18587a=a230_0x40f642;if(!_0x32a55f)return undefined;const _0x44ca2=REMOVED_COMMAND_REPLACEMENTS[_0x18587a(0x177)](_0x32a55f+':'+(_0x3dfe84??'')),_0x41b3f7=REMOVED_FLAT_COMMAND_REPLACEMENTS['get'](_0x32a55f),_0x398086=_0x44ca2??_0x41b3f7,_0x38716d=REMOVED_COMMAND_HINTS[_0x18587a(0x177)](_0x32a55f+':'+(_0x3dfe84??''));if(!_0x398086&&!_0x38716d)return undefined;const _0x35fe6=_0x41b3f7?_0x32a55f:_0x3dfe84?_0x32a55f+'\x20'+_0x3dfe84:_0x32a55f;return{'command':_0x35fe6,'message':'`rabetbase\x20'+_0x35fe6+_0x18587a(0x179),'hint':_0x38716d??'Use\x20`'+_0x398086+'`\x20instead.'};}export function findDefinition(_0x226bbb,_0x9f7b84){const _0x482b41=a230_0x40f642;return definitions[_0x482b41(0x177)](_0x226bbb+':'+_0x9f7b84);}export function isKnownService(_0x2a32e9){const _0x401f34=a230_0x40f642;return serviceByName[_0x401f34(0x162)](_0x2a32e9);}export function isDeclarativeService(_0x17de4d){const _0x439cf8=a230_0x40f642;return serviceGroups[_0x439cf8(0x162)](_0x17de4d)||serviceByName[_0x439cf8(0x177)](_0x17de4d)?.[_0x439cf8(0x1a4)]!==undefined;}export function getServiceEntry(_0x3d28e0){const _0x3a7c62=a230_0x40f642;return serviceByName[_0x3a7c62(0x177)](_0x3d28e0);}export function getLegacyHandler(_0x26e00d,_0x52d751){return undefined;}export function getAllDefinitions(){const _0x35dcaf=a230_0x40f642;return Array[_0x35dcaf(0x198)](definitions['values']());}
1
+ const a230_0x1d4100=a230_0x5db6;(function(_0x22d77e,_0x3c4b91){const _0x66404b=a230_0x5db6,_0x18506b=_0x22d77e();while(!![]){try{const _0x27e16a=-parseInt(_0x66404b(0x1b4))/0x1+parseInt(_0x66404b(0x1b2))/0x2+parseInt(_0x66404b(0x152))/0x3*(-parseInt(_0x66404b(0x13d))/0x4)+-parseInt(_0x66404b(0x1b5))/0x5+-parseInt(_0x66404b(0x17f))/0x6*(parseInt(_0x66404b(0x14f))/0x7)+parseInt(_0x66404b(0x1af))/0x8+-parseInt(_0x66404b(0x16b))/0x9*(-parseInt(_0x66404b(0x177))/0xa);if(_0x27e16a===_0x3c4b91)break;else _0x18506b['push'](_0x18506b['shift']());}catch(_0x4a0feb){_0x18506b['push'](_0x18506b['shift']());}}}(a230_0x3a71,0x58341));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';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=[];function a230_0x5db6(_0x22f0dd,_0x4656b6){_0x22f0dd=_0x22f0dd-0x139;const _0x3a7108=a230_0x3a71();let _0x5db6da=_0x3a7108[_0x22f0dd];return _0x5db6da;}const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function a230_0x3a71(){const _0x484dd9=['rabetbase\x20kb\x20update','OCR','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','786YpldnE','\x20\x20[','filter','Workspace','Authentication','project:init','start','Project','rabetbase\x20cli-skill\x20install','flow:disable','knowledge-base:detail','Tenant\x20Members','\x20\x20[write]','menu:update','Logs','Company\x20Knowledge\x20Base','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','API\x20Development','Run\x20Scripts','rabetbase\x20page\x20custom-update','rabetbase\x20run\x20start','rabetbase\x20menu\x20subapp-assets-update\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>\x20--resources\x20\x27<json>\x27','Run\x20any\x20package.json\x20script','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','commands','create','show','app:assets-status','page:custom-create','rabetbase\x20run\x20preview','permit:role-menus-set','Dataset\x20&\x20Operations','Async\x20Tasks','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','rabetbase\x20run\x20build','rabetbase\x20page\x20custom-publish','Configuration','skills:install','sql:save','isSingleCommand','knowledge-base:update','skills:','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','Schema','rabetbase\x20dataset\x20design-start\x20--file\x20<manifest.json>','data:getOne','dataset:generate-start','Runtime\x20App\x20Config\x20Management','1602760nRBVnv','read','rabetbase\x20page\x20data-list-status','45896Toyzes','Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.','696506XPUfdU','239580AxHjcn','deployment:sync','`\x20has\x20been\x20removed.','bff:new','dataset:generate-status','page:react-update','57844BeAfwW','app:assets-update','rabetbase\x20project\x20create\x20<project-name>','push','command','app:remove','values','role:create','page:react-publish','rabetbase\x20kb\x20create','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','preview','get','Use\x20`','Backend\x20Function\x20Scripts','map','data:filter','service','18907oOZlfb','page:react-create','defaultCommand','54dVdfGN','rabetbase\x20menu\x20subapp-assets-status\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>','logout','CLI\x20Built-in\x20Skill','description','Menu','rabetbase\x20kb\x20delete','SQL\x20Queries','set','skill:install','hidden','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','risk','wildcardDef','write','page:standard-page-status','has','rabetbase\x20page\x20custom-list','build','permit:page-set','Deployment','skill:','page:react-list','permit:role-menus','rabetbase\x20app\x20list\x20--remote','3663yWRXQs','permit:page-get','app:use','rabetbase\x20page\x20custom-detail','permit:role-apis-set','This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.','rabetbase\x20role\x20list','\x20\x20[high-risk-write]','Agent\x20Context\x20Rules','rabetbase\x20menu\x20asset-update','Instant\x20API\x20Policy','length','36770xHNGOh','rabetbase\x20dataset\x20design-status\x20--operation-id\x20<id>','page:react-detail','rabetbase\x20bff\x20create','Roles'];a230_0x3a71=function(){return _0x484dd9;};return a230_0x3a71();}function registerDefinitions(_0x3672c2){const _0x5f40fb=a230_0x5db6;for(const _0x166286 of _0x3672c2){definitions['set'](_0x166286[_0x5f40fb(0x14e)]+':'+_0x166286[_0x5f40fb(0x141)],_0x166286);let _0x3e8491=serviceGroups[_0x5f40fb(0x149)](_0x166286[_0x5f40fb(0x14e)]);!_0x3e8491&&(_0x3e8491=[],serviceGroups[_0x5f40fb(0x15a)](_0x166286[_0x5f40fb(0x14e)],_0x3e8491)),_0x3e8491[_0x5f40fb(0x140)](_0x166286);}}function registerDeclarativeService(_0x1fcb59,_0x2a9fdf,_0x46d820){const _0x3d8cdd=a230_0x5db6;registerDefinitions(_0x2a9fdf);_0x46d820?.[_0x3d8cdd(0x15f)]&&registerDefinitions([_0x46d820['wildcardDef']]);const _0x719a80=_0x3b7084=>_0x3b7084===_0x3d8cdd(0x1b0)?'':_0x3b7084===_0x3d8cdd(0x160)?_0x3d8cdd(0x18b):_0x3d8cdd(0x172),_0x95310={'service':_0x2a9fdf[0x0]['service'],'label':_0x1fcb59,'commands':_0x2a9fdf[_0x3d8cdd(0x181)](_0x1d342b=>!_0x1d342b[_0x3d8cdd(0x15c)])[_0x3d8cdd(0x14c)](_0x29748c=>({'command':_0x29748c[_0x3d8cdd(0x141)],'description':_0x29748c[_0x3d8cdd(0x156)],'tag':_0x719a80(_0x29748c[_0x3d8cdd(0x15e)])})),'declarative':!![],'defaultCommand':_0x46d820?.[_0x3d8cdd(0x151)]??(_0x46d820?.[_0x3d8cdd(0x1a6)]?_0x2a9fdf[0x0][_0x3d8cdd(0x141)]:undefined),'wildcardDef':_0x46d820?.[_0x3d8cdd(0x15f)],'isSingleCommand':_0x46d820?.[_0x3d8cdd(0x1a6)]};serviceRegistry[_0x3d8cdd(0x140)](_0x95310),serviceByName['set'](_0x95310['service'],_0x95310);}registerDeclarativeService(a230_0x1d4100(0x186),projectDefinitions),registerDeclarativeService(a230_0x1d4100(0x182),workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a230_0x1d4100(0x183),authDefinitions,{'defaultCommand':'login'}),registerDeclarativeService(a230_0x1d4100(0x18a),tenantDefinitions),registerDeclarativeService('User\x20Accounts',userAccountDefinitions),registerDeclarativeService(a230_0x1d4100(0x19e),datasetDefinitions),registerDeclarativeService('Data\x20List\x20Pages\x20&\x20Custom\x20Pages',pageDefinitions),registerDeclarativeService(a230_0x1d4100(0x190),apiDefinitions),registerDeclarativeService(a230_0x1d4100(0x14b),bffDefinitions),registerDeclarativeService(a230_0x1d4100(0x175),instantApiPolicyDefinitions),registerDeclarativeService('Notification\x20Configuration',notificationDefinitions),registerDeclarativeService(a230_0x1d4100(0x159),sqlDefinitions),registerDeclarativeService('Database\x20Connections',dbDefinitions),registerDeclarativeService(a230_0x1d4100(0x166),deploymentDefinitions),registerDeclarativeService(a230_0x1d4100(0x157),menuDefinitions),registerDeclarativeService(a230_0x1d4100(0x19f),taskDefinitions),registerDeclarativeService(a230_0x1d4100(0x17b),roleDefinitions),registerDeclarativeService(a230_0x1d4100(0x1ae),appConfigDefinitions),registerDeclarativeService(a230_0x1d4100(0x18e),kbDefinitions),registerDeclarativeService(a230_0x1d4100(0x173),ruleDefinitions),registerDeclarativeService('Platform\x20Issue',issueDefinitions),registerDeclarativeService('File',fileDefinitions),registerDeclarativeService(a230_0x1d4100(0x17d),ocrDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService(a230_0x1d4100(0x1a3),configDefinitions),registerDeclarativeService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0x1d4100(0x1aa),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0x1d4100(0x155),cliSkillDefinitions,{'defaultCommand':'install'}),registerDeclarativeService('Approval\x20Flows',flowDefinitions),registerDeclarativeService(a230_0x1d4100(0x18d),logsDefinitions,{'defaultCommand':a230_0x1d4100(0x199)}),registerDeclarativeService(a230_0x1d4100(0x191),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a230_0x1d4100(0x176)]-0x1];last[a230_0x1d4100(0x197)]=[{'command':'<script>','description':a230_0x1d4100(0x195),'tag':a230_0x1d4100(0x180)+runDefinition[a230_0x1d4100(0x15e)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a230_0x1d4100(0x1ad),a230_0x1d4100(0x1ab)],[a230_0x1d4100(0x13b),a230_0x1d4100(0x178)],[a230_0x1d4100(0x1a5),a230_0x1d4100(0x1a9)],[a230_0x1d4100(0x13a),a230_0x1d4100(0x17a)],['sql:new','rabetbase\x20sql\x20create'],[a230_0x1d4100(0x18c),a230_0x1d4100(0x174)],[a230_0x1d4100(0x184),a230_0x1d4100(0x15d)],[a230_0x1d4100(0x167),a230_0x1d4100(0x187)],[a230_0x1d4100(0x15b),a230_0x1d4100(0x187)],[a230_0x1d4100(0x1a8),a230_0x1d4100(0x187)],[a230_0x1d4100(0x1a4),a230_0x1d4100(0x187)],[a230_0x1d4100(0x19a),a230_0x1d4100(0x153)],[a230_0x1d4100(0x13e),a230_0x1d4100(0x194)],['app:remote',a230_0x1d4100(0x16a)],[a230_0x1d4100(0x16d),'rabetbase\x20workspace\x20use\x20--app\x20<name>'],['app:add',a230_0x1d4100(0x17e)],[a230_0x1d4100(0x142),'rabetbase\x20workspace\x20remove\x20<name>'],['knowledge-base:list','rabetbase\x20kb\x20list'],[a230_0x1d4100(0x189),'rabetbase\x20kb\x20detail'],['knowledge-base:create',a230_0x1d4100(0x146)],[a230_0x1d4100(0x1a7),a230_0x1d4100(0x17c)],['knowledge-base:delete',a230_0x1d4100(0x158)],[a230_0x1d4100(0x144),a230_0x1d4100(0x171)],[a230_0x1d4100(0x14d),a230_0x1d4100(0x1a0)],[a230_0x1d4100(0x1ac),a230_0x1d4100(0x18f)],[a230_0x1d4100(0x161),a230_0x1d4100(0x1b1)],[a230_0x1d4100(0x150),a230_0x1d4100(0x196)],[a230_0x1d4100(0x19b),a230_0x1d4100(0x196)],[a230_0x1d4100(0x168),a230_0x1d4100(0x163)],[a230_0x1d4100(0x179),a230_0x1d4100(0x16e)],[a230_0x1d4100(0x13c),a230_0x1d4100(0x192)],[a230_0x1d4100(0x145),a230_0x1d4100(0x1a2)]]),REMOVED_COMMAND_HINTS=new Map([['flow:enable',a230_0x1d4100(0x170)],[a230_0x1d4100(0x188),'This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.'],[a230_0x1d4100(0x1b6),a230_0x1d4100(0x1b3)],[a230_0x1d4100(0x16c),a230_0x1d4100(0x147)],[a230_0x1d4100(0x165),a230_0x1d4100(0x147)],[a230_0x1d4100(0x169),a230_0x1d4100(0x147)],[a230_0x1d4100(0x19d),a230_0x1d4100(0x147)],[a230_0x1d4100(0x16f),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.']]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a230_0x1d4100(0x198),a230_0x1d4100(0x13f)],[a230_0x1d4100(0x185),a230_0x1d4100(0x193)],[a230_0x1d4100(0x164),a230_0x1d4100(0x1a1)],[a230_0x1d4100(0x148),a230_0x1d4100(0x19c)],[a230_0x1d4100(0x154),'rabetbase\x20auth\x20logout']]);export function resolveRemovedCommand(_0x8b551d,_0x31770a){const _0x96d775=a230_0x1d4100;if(!_0x8b551d)return undefined;const _0x4c75e4=REMOVED_COMMAND_REPLACEMENTS['get'](_0x8b551d+':'+(_0x31770a??'')),_0x5772c7=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x96d775(0x149)](_0x8b551d),_0x18bd20=_0x4c75e4??_0x5772c7,_0x5b976c=REMOVED_COMMAND_HINTS['get'](_0x8b551d+':'+(_0x31770a??''));if(!_0x18bd20&&!_0x5b976c)return undefined;const _0x225809=_0x5772c7?_0x8b551d:_0x31770a?_0x8b551d+'\x20'+_0x31770a:_0x8b551d;return{'command':_0x225809,'message':'`rabetbase\x20'+_0x225809+_0x96d775(0x139),'hint':_0x5b976c??_0x96d775(0x14a)+_0x18bd20+'`\x20instead.'};}export function findDefinition(_0x4266d2,_0x49a9d7){const _0x3700cd=a230_0x1d4100;return definitions[_0x3700cd(0x149)](_0x4266d2+':'+_0x49a9d7);}export function isKnownService(_0x2e08d2){return serviceByName['has'](_0x2e08d2);}export function isDeclarativeService(_0x40b251){const _0x375f19=a230_0x1d4100;return serviceGroups[_0x375f19(0x162)](_0x40b251)||serviceByName[_0x375f19(0x149)](_0x40b251)?.['wildcardDef']!==undefined;}export function getServiceEntry(_0x30a65b){const _0xc9f9d=a230_0x1d4100;return serviceByName[_0xc9f9d(0x149)](_0x30a65b);}export function getLegacyHandler(_0x449097,_0x1ef3dc){return undefined;}export function getAllDefinitions(){const _0x27f4e5=a230_0x1d4100;return Array['from'](definitions[_0x27f4e5(0x143)]());}
@@ -1 +1 @@
1
- const a231_0x174704=a231_0x51ac;(function(_0x30741e,_0x3c4e45){const _0x3290eb=a231_0x51ac,_0x384b89=_0x30741e();while(!![]){try{const _0x3904c9=-parseInt(_0x3290eb(0xc7))/0x1*(parseInt(_0x3290eb(0xc2))/0x2)+-parseInt(_0x3290eb(0xc6))/0x3+parseInt(_0x3290eb(0xc0))/0x4*(parseInt(_0x3290eb(0xbd))/0x5)+-parseInt(_0x3290eb(0xbc))/0x6+parseInt(_0x3290eb(0xce))/0x7+parseInt(_0x3290eb(0xd2))/0x8*(parseInt(_0x3290eb(0xd1))/0x9)+-parseInt(_0x3290eb(0xc4))/0xa*(-parseInt(_0x3290eb(0xd0))/0xb);if(_0x3904c9===_0x3c4e45)break;else _0x384b89['push'](_0x384b89['shift']());}catch(_0x141f93){_0x384b89['push'](_0x384b89['shift']());}}}(a231_0x2173,0xcbb61));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a231_0x51ac(_0x293adb,_0x3a3cc1){_0x293adb=_0x293adb-0xba;const _0x217352=a231_0x2173();let _0x51ac75=_0x217352[_0x293adb];return _0x51ac75;}import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a231_0x2173(){const _0x4a6cbd=['num','roleName','dev','705824UfLsGs','high-risk-write','106315arXrWd','10050813pumVQG','8yTKPkJ','appCode','role','874926VdlXQp','848270jdkBoA','Deleted\x20role\x20','userCount','20vlUxZw','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','1564636FSojED','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','660jCpcbx','POST','476673lxkkpi','2FqyakG','\x20(id=','Role\x20still\x20has\x20','delete'];a231_0x2173=function(){return _0x4a6cbd;};return a231_0x2173();}const DELETE_PATH='/smartapi/permit/role/delete';export const roleDelete={'service':a231_0x174704(0xbb),'command':a231_0x174704(0xca),'description':a231_0x174704(0xc3),'risk':a231_0x174704(0xcf),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x125180){const _0x1972a5=a231_0x174704,_0x2ed68e=_0x125180[_0x1972a5(0xcb)]('id'),_0x19bd60=await getRoleById(_0x125180['appCode'],_0x2ed68e);return assertCustomRole(_0x19bd60,'delete'),asDryRunResult({'scope':'dev','operation':_0x1972a5(0xca),'selector':{'appCode':_0x125180[_0x1972a5(0xba)],'roleId':_0x2ed68e,'roleName':_0x19bd60[_0x1972a5(0xcc)]},'before':projectRole(_0x19bd60),'after':null,'dryRun':!![],'backend':{'method':_0x1972a5(0xc5),'path':DELETE_PATH},'warnings':_0x19bd60[_0x1972a5(0xbf)]>0x0?[_0x1972a5(0xc9)+_0x19bd60['userCount']+_0x1972a5(0xc1)]:[]},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0xb05b10){const _0x5b9c8a=a231_0x174704,_0x37c480=_0xb05b10['num']('id'),_0x35da55=await getRoleById(_0xb05b10['appCode'],_0x37c480);return assertCustomRole(_0x35da55,'delete'),await deleteAppRole(_0x37c480),{'ok':!![],'data':{'scope':_0x5b9c8a(0xcd),'operation':'delete','selector':{'appCode':_0xb05b10['appCode'],'roleId':_0x37c480,'roleName':_0x35da55[_0x5b9c8a(0xcc)]},'before':projectRole(_0x35da55),'after':null,'dryRun':![],'backend':{'method':_0x5b9c8a(0xc5),'path':DELETE_PATH},'warnings':[]},'message':_0x5b9c8a(0xbe)+_0x35da55[_0x5b9c8a(0xcc)]+_0x5b9c8a(0xc8)+_0x37c480+')'};}};
1
+ const a231_0x537460=a231_0x1310;function a231_0x35eb(){const _0x43e1d7=['appCode','10utRSje','304wdyeqb','254601jnPgek','POST','delete','num','1486422jOhgpI','high-risk-write','role','dev','2404200vOCqkI','/smartapi/permit/role/delete','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','563148bBXwhI','608250PpRHkS','11zIhBfI','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','797001Zfmmij','10TgZYRf','Role\x20still\x20has\x20','6021550zbvzuv','roleName','userCount','Deleted\x20role\x20'];a231_0x35eb=function(){return _0x43e1d7;};return a231_0x35eb();}(function(_0x59b7d2,_0x23e42d){const _0x510dc9=a231_0x1310,_0x1997de=_0x59b7d2();while(!![]){try{const _0x1dd7db=parseInt(_0x510dc9(0x89))/0x1+-parseInt(_0x510dc9(0x8a))/0x2*(-parseInt(_0x510dc9(0x9f))/0x3)+parseInt(_0x510dc9(0x9e))/0x4*(parseInt(_0x510dc9(0x91))/0x5)+parseInt(_0x510dc9(0x9b))/0x6+-parseInt(_0x510dc9(0x97))/0x7+-parseInt(_0x510dc9(0x92))/0x8*(parseInt(_0x510dc9(0x93))/0x9)+parseInt(_0x510dc9(0x8c))/0xa*(-parseInt(_0x510dc9(0xa0))/0xb);if(_0x1dd7db===_0x23e42d)break;else _0x1997de['push'](_0x1997de['shift']());}catch(_0x57561a){_0x1997de['push'](_0x1997de['shift']());}}}(a231_0x35eb,0x93596));function a231_0x1310(_0x45c3cb,_0x243cdb){_0x45c3cb=_0x45c3cb-0x89;const _0x35eb60=a231_0x35eb();let _0x1310de=_0x35eb60[_0x45c3cb];return _0x1310de;}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_0x537460(0x9c);export const roleDelete={'service':a231_0x537460(0x99),'command':'delete','description':a231_0x537460(0x9d),'risk':a231_0x537460(0x98),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x54ad3f){const _0xa70711=a231_0x537460,_0x4cf56a=_0x54ad3f['num']('id'),_0x583a82=await getRoleById(_0x54ad3f[_0xa70711(0x90)],_0x4cf56a);return assertCustomRole(_0x583a82,_0xa70711(0x95)),asDryRunResult({'scope':'dev','operation':_0xa70711(0x95),'selector':{'appCode':_0x54ad3f[_0xa70711(0x90)],'roleId':_0x4cf56a,'roleName':_0x583a82['roleName']},'before':projectRole(_0x583a82),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x583a82[_0xa70711(0x8e)]>0x0?[_0xa70711(0x8b)+_0x583a82[_0xa70711(0x8e)]+_0xa70711(0xa1)]:[]},{'method':_0xa70711(0x94),'url':DELETE_PATH});},async 'execute'(_0x8a6ca4){const _0x5240ad=a231_0x537460,_0x3b5257=_0x8a6ca4[_0x5240ad(0x96)]('id'),_0x1657d8=await getRoleById(_0x8a6ca4[_0x5240ad(0x90)],_0x3b5257);return assertCustomRole(_0x1657d8,_0x5240ad(0x95)),await deleteAppRole(_0x3b5257),{'ok':!![],'data':{'scope':_0x5240ad(0x9a),'operation':_0x5240ad(0x95),'selector':{'appCode':_0x8a6ca4[_0x5240ad(0x90)],'roleId':_0x3b5257,'roleName':_0x1657d8[_0x5240ad(0x8d)]},'before':projectRole(_0x1657d8),'after':null,'dryRun':![],'backend':{'method':_0x5240ad(0x94),'path':DELETE_PATH},'warnings':[]},'message':_0x5240ad(0x8f)+_0x1657d8[_0x5240ad(0x8d)]+'\x20(id='+_0x3b5257+')'};}};
@@ -1 +1 @@
1
- const a232_0x56c3dd=a232_0x4980;function a232_0x4980(_0x389e26,_0x3dcc21){_0x389e26=_0x389e26-0x19b;const _0x5574ee=a232_0x5574();let _0x4980a0=_0x5574ee[_0x389e26];return _0x4980a0;}(function(_0x55ac1a,_0x4c2e03){const _0x52502e=a232_0x4980,_0x275e0f=_0x55ac1a();while(!![]){try{const _0x4550de=-parseInt(_0x52502e(0x1a7))/0x1+parseInt(_0x52502e(0x19d))/0x2*(parseInt(_0x52502e(0x1a5))/0x3)+parseInt(_0x52502e(0x19c))/0x4+-parseInt(_0x52502e(0x1aa))/0x5*(parseInt(_0x52502e(0x19e))/0x6)+parseInt(_0x52502e(0x1ab))/0x7*(-parseInt(_0x52502e(0x1a3))/0x8)+-parseInt(_0x52502e(0x1a0))/0x9*(-parseInt(_0x52502e(0x1a6))/0xa)+parseInt(_0x52502e(0x19b))/0xb*(parseInt(_0x52502e(0x1a1))/0xc);if(_0x4550de===_0x4c2e03)break;else _0x275e0f['push'](_0x275e0f['shift']());}catch(_0x2d4ee6){_0x275e0f['push'](_0x275e0f['shift']());}}}(a232_0x5574,0x48ad1));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a232_0x5574(){const _0x389e86=['roleName','17811nrSdMz','1185020BeUDSE','465366XiUNTk','role','Show\x20a\x20single\x20role\x27s\x20detail','770mWSmkp','10563zVjpjN','3275349mWPEGf','1830632HKQyOw','2Tdndqb','22818sUsMem','read','27miLvNs','36BvmBKX','num','1928eBfWzr'];a232_0x5574=function(){return _0x389e86;};return a232_0x5574();}import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a232_0x56c3dd(0x1a8),'command':'detail','description':a232_0x56c3dd(0x1a9),'risk':a232_0x56c3dd(0x19f),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x295c3a){const _0x3de477=a232_0x56c3dd,_0x1730f6=_0x295c3a[_0x3de477(0x1a2)]('id'),_0x1f836c=await getRoleById(_0x295c3a['appCode'],_0x1730f6);return{'ok':!![],'data':{'scope':'dev','role':projectRole(_0x1f836c)},'message':'Role\x20'+_0x1f836c[_0x3de477(0x1a4)]+'\x20('+_0x1f836c['roleType']+')'};}};
1
+ const a232_0x1f7d72=a232_0x1022;(function(_0xc5e7bf,_0x1ab3c2){const _0x52736f=a232_0x1022,_0x501fe0=_0xc5e7bf();while(!![]){try{const _0x1772dc=parseInt(_0x52736f(0x12e))/0x1*(parseInt(_0x52736f(0x131))/0x2)+-parseInt(_0x52736f(0x13a))/0x3+parseInt(_0x52736f(0x12a))/0x4+parseInt(_0x52736f(0x132))/0x5+parseInt(_0x52736f(0x12c))/0x6+parseInt(_0x52736f(0x136))/0x7+-parseInt(_0x52736f(0x138))/0x8*(parseInt(_0x52736f(0x129))/0x9);if(_0x1772dc===_0x1ab3c2)break;else _0x501fe0['push'](_0x501fe0['shift']());}catch(_0x204e06){_0x501fe0['push'](_0x501fe0['shift']());}}}(a232_0x3513,0xb14fe));function a232_0x1022(_0x43ca65,_0x5a343c){_0x43ca65=_0x43ca65-0x129;const _0x3513a7=a232_0x3513();let _0x1022b6=_0x3513a7[_0x43ca65];return _0x1022b6;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a232_0x3513(){const _0x472380=['num','92940fOSRTh','roleType','5pCgBUE','dev','role','103920biIpHQ','4341310JTQGmz','Show\x20a\x20single\x20role\x27s\x20detail','roleName','appCode','761579PgFUsR','detail','8heSXtn','read','2692443CSJWQR','Role\x20','7446429NxfNZb','4795132GwuRBQ'];a232_0x3513=function(){return _0x472380;};return a232_0x3513();}export const roleDetail={'service':a232_0x1f7d72(0x130),'command':a232_0x1f7d72(0x137),'description':a232_0x1f7d72(0x133),'risk':a232_0x1f7d72(0x139),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x92e83d){const _0x1bf04a=a232_0x1f7d72,_0xc90eed=_0x92e83d[_0x1bf04a(0x12b)]('id'),_0x13a641=await getRoleById(_0x92e83d[_0x1bf04a(0x135)],_0xc90eed);return{'ok':!![],'data':{'scope':_0x1bf04a(0x12f),'role':projectRole(_0x13a641)},'message':_0x1bf04a(0x13b)+_0x13a641[_0x1bf04a(0x134)]+'\x20('+_0x13a641[_0x1bf04a(0x12d)]+')'};}};
@@ -1 +1 @@
1
- (function(_0x27fb7c,_0x1ebd2a){const _0x1b1623=a233_0x3123,_0x12eaf3=_0x27fb7c();while(!![]){try{const _0x38b2a1=parseInt(_0x1b1623(0xf4))/0x1*(parseInt(_0x1b1623(0xf6))/0x2)+-parseInt(_0x1b1623(0xf7))/0x3*(parseInt(_0x1b1623(0xf1))/0x4)+parseInt(_0x1b1623(0xf0))/0x5+-parseInt(_0x1b1623(0xf2))/0x6+parseInt(_0x1b1623(0xf5))/0x7+parseInt(_0x1b1623(0xef))/0x8*(-parseInt(_0x1b1623(0xf3))/0x9)+-parseInt(_0x1b1623(0xf8))/0xa;if(_0x38b2a1===_0x1ebd2a)break;else _0x12eaf3['push'](_0x12eaf3['shift']());}catch(_0x13a886){_0x12eaf3['push'](_0x12eaf3['shift']());}}}(a233_0x2404,0x64192));import{roleList}from'../../commands/role/list.js';function a233_0x3123(_0x2eefd8,_0x5ce8b7){_0x2eefd8=_0x2eefd8-0xef;const _0x24047a=a233_0x2404();let _0x31230c=_0x24047a[_0x2eefd8];return _0x31230c;}import{roleDetail}from'../../commands/role/detail.js';function a233_0x2404(){const _0x23cd4b=['434WiJQAj','3yMTOZI','2137040GSWSQw','8hOUzqV','598185oFBeSp','825152lqwUbC','622824BOHzWa','1647819jtwrBg','2721YObuzB','2847565ovgNjR'];a233_0x2404=function(){return _0x23cd4b;};return a233_0x2404();}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(_0x4e5981,_0x194ffa){const _0x4ca4fb=a233_0x58b4,_0x2d72d2=_0x4e5981();while(!![]){try{const _0x46777f=-parseInt(_0x4ca4fb(0x1f4))/0x1+parseInt(_0x4ca4fb(0x1f9))/0x2+-parseInt(_0x4ca4fb(0x1f7))/0x3*(-parseInt(_0x4ca4fb(0x1fd))/0x4)+parseInt(_0x4ca4fb(0x1fb))/0x5*(parseInt(_0x4ca4fb(0x1f5))/0x6)+-parseInt(_0x4ca4fb(0x1f8))/0x7*(-parseInt(_0x4ca4fb(0x1f6))/0x8)+-parseInt(_0x4ca4fb(0x1fa))/0x9+-parseInt(_0x4ca4fb(0x1fc))/0xa*(parseInt(_0x4ca4fb(0x1f3))/0xb);if(_0x46777f===_0x194ffa)break;else _0x2d72d2['push'](_0x2d72d2['shift']());}catch(_0x1a0404){_0x2d72d2['push'](_0x2d72d2['shift']());}}}(a233_0x563c,0x96914));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';function a233_0x58b4(_0x4c2d01,_0x37c78c){_0x4c2d01=_0x4c2d01-0x1f3;const _0x563c82=a233_0x563c();let _0x58b458=_0x563c82[_0x4c2d01];return _0x58b458;}export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];function a233_0x563c(){const _0x55171e=['3087843GaqPKV','1155251xdnRyi','3341148eTIBkj','8084184cSWvyH','15bRtbzF','7vudBxM','1319252qqKzaM','3047904GkaZau','10fuknmw','30FcvpHd','135124wngvYr'];a233_0x563c=function(){return _0x55171e;};return a233_0x563c();}
@@ -1 +1 @@
1
- const a234_0x41a1a6=a234_0x3c0f;(function(_0x184054,_0x45ece2){const _0x556a47=a234_0x3c0f,_0x4b9f2c=_0x184054();while(!![]){try{const _0x18c559=-parseInt(_0x556a47(0x1ac))/0x1*(parseInt(_0x556a47(0x1b4))/0x2)+parseInt(_0x556a47(0x1bb))/0x3*(parseInt(_0x556a47(0x1cb))/0x4)+-parseInt(_0x556a47(0x1c7))/0x5*(-parseInt(_0x556a47(0x1ca))/0x6)+-parseInt(_0x556a47(0x1c5))/0x7+-parseInt(_0x556a47(0x1bd))/0x8+parseInt(_0x556a47(0x1c9))/0x9+parseInt(_0x556a47(0x1b3))/0xa;if(_0x18c559===_0x45ece2)break;else _0x4b9f2c['push'](_0x4b9f2c['shift']());}catch(_0x2a5ad1){_0x4b9f2c['push'](_0x4b9f2c['shift']());}}}(a234_0x560b,0xb1153));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a234_0x3c0f(_0x585719,_0x7bfcd9){_0x585719=_0x585719-0x1a9;const _0x560bb5=a234_0x560b();let _0x3c0f7d=_0x560bb5[_0x585719];return _0x3c0f7d;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a234_0x41a1a6(0x1c0),'DEV','OWNER',a234_0x41a1a6(0x1b6)];function a234_0x560b(){const _0x5a6c59=['toUpperCase','3SLuKis','page','7916632MJXvRf','number','length','ADMIN','Invalid\x20--type\x20\x22','num','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','Page\x20index\x20(1-based)','9601123oxFoBg','list','2195iAzJxC','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','12565242vLlZQU','6474SZkpCK','3591932VePmXh','pagesize','type','validation','67874UAzmzp','str','role','Filter\x20by\x20role\x20type','Use\x20one\x20of:\x20','filter','trim','9974370izsjty','20Hnfjvu','read','CUSTOM','map','Found\x20','appCode'];a234_0x560b=function(){return _0x5a6c59;};return a234_0x560b();}export const roleList={'service':a234_0x41a1a6(0x1ae),'command':a234_0x41a1a6(0x1c6),'description':'List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','risk':a234_0x41a1a6(0x1b5),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a234_0x41a1a6(0x1aa),'type':'string','required':![],'description':a234_0x41a1a6(0x1af),'enum':ROLE_TYPES},{'name':a234_0x41a1a6(0x1bc),'type':a234_0x41a1a6(0x1be),'description':a234_0x41a1a6(0x1c4),'default':0x1},{'name':a234_0x41a1a6(0x1a9),'type':a234_0x41a1a6(0x1be),'description':'Page\x20size\x20(1-100)','default':0x64}],async 'validate'(_0x4344a1){const _0x29b18f=a234_0x41a1a6,_0x41289c=_0x4344a1[_0x29b18f(0x1ad)](_0x29b18f(0x1aa))[_0x29b18f(0x1b2)]();if(_0x41289c&&!ROLE_TYPES['includes'](_0x41289c[_0x29b18f(0x1ba)]()))throw CliErrors['validation'](_0x29b18f(0x1c1)+_0x41289c+'\x22.',_0x29b18f(0x1b0)+ROLE_TYPES['join'](',\x20')+'.');const _0x21e495=_0x4344a1[_0x29b18f(0x1c2)](_0x29b18f(0x1bc),0x1),_0x196a7f=_0x4344a1[_0x29b18f(0x1c2)]('pagesize',0x64);if(_0x21e495<0x1)throw CliErrors[_0x29b18f(0x1ab)](_0x29b18f(0x1c8));if(_0x196a7f<0x1||_0x196a7f>0x64)throw CliErrors[_0x29b18f(0x1ab)](_0x29b18f(0x1c3));},async 'execute'(_0xff2a29){const _0x59014c=a234_0x41a1a6,_0x27c4fb=_0xff2a29[_0x59014c(0x1c2)](_0x59014c(0x1bc),0x1)||0x1,_0xec843e=_0xff2a29[_0x59014c(0x1c2)](_0x59014c(0x1a9),0x64)||0x64,_0x399730=_0xff2a29['str']('type')['trim']()[_0x59014c(0x1ba)](),{items:_0x5eeaaa,paging:_0x1ce6f9}=await listAppRoles(_0xff2a29[_0x59014c(0x1b9)],{'currentPage':_0x27c4fb,'pageSize':_0xec843e}),_0x35eced=_0x399730?_0x5eeaaa[_0x59014c(0x1b1)](_0x83b26c=>_0x83b26c['roleType']===_0x399730):_0x5eeaaa,_0x2d838f=_0x35eced[_0x59014c(0x1b7)](projectRole);return{'ok':!![],'data':{'scope':'dev','roles':_0x2d838f,'paging':_0x1ce6f9},'message':_0x59014c(0x1b8)+_0x2d838f[_0x59014c(0x1bf)]+'\x20role(s)'};}};
1
+ function a234_0x2fcb(_0x518cf6,_0x3669bd){_0x518cf6=_0x518cf6-0xea;const _0x1467e2=a234_0x1467();let _0x2fcb83=_0x1467e2[_0x518cf6];return _0x2fcb83;}const a234_0x11a102=a234_0x2fcb;(function(_0x5da16f,_0x30d4ad){const _0x532fbd=a234_0x2fcb,_0x149fb8=_0x5da16f();while(!![]){try{const _0x438779=-parseInt(_0x532fbd(0xeb))/0x1*(parseInt(_0x532fbd(0xf1))/0x2)+-parseInt(_0x532fbd(0xfe))/0x3+parseInt(_0x532fbd(0x102))/0x4*(parseInt(_0x532fbd(0xff))/0x5)+-parseInt(_0x532fbd(0xfc))/0x6+parseInt(_0x532fbd(0x110))/0x7+parseInt(_0x532fbd(0x103))/0x8*(-parseInt(_0x532fbd(0x106))/0x9)+parseInt(_0x532fbd(0x100))/0xa*(parseInt(_0x532fbd(0xf4))/0xb);if(_0x438779===_0x30d4ad)break;else _0x149fb8['push'](_0x149fb8['shift']());}catch(_0x28d472){_0x149fb8['push'](_0x149fb8['shift']());}}}(a234_0x1467,0xae492));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a234_0x1467(){const _0x17de41=['Use\x20one\x20of:\x20','num','validation','\x20role(s)','includes','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','7363476TaoBYQ','OWNER','1272894dZFXmu','3214045ZleHUl','37010gBSUwa','length','4XRJaLb','8TAEyFU','Page\x20index\x20(1-based)','Filter\x20by\x20role\x20type','967437TQVuft','toUpperCase','pagesize','filter','page','map','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','trim','string','CUSTOM','4886427eySQhe','Invalid\x20--type\x20\x22','Found\x20','roleType','ADMIN','1mMMGyn','DEV','join','str','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','type','681914fnYhWO','number','role','4378kyFHcJ','dev'];a234_0x1467=function(){return _0x17de41;};return a234_0x1467();}import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a234_0x11a102(0xea),a234_0x11a102(0xec),a234_0x11a102(0xfd),a234_0x11a102(0x10f)];export const roleList={'service':a234_0x11a102(0xf3),'command':'list','description':a234_0x11a102(0x10c),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a234_0x11a102(0xf0),'type':a234_0x11a102(0x10e),'required':![],'description':a234_0x11a102(0x105),'enum':ROLE_TYPES},{'name':a234_0x11a102(0x10a),'type':a234_0x11a102(0xf2),'description':a234_0x11a102(0x104),'default':0x1},{'name':a234_0x11a102(0x108),'type':a234_0x11a102(0xf2),'description':'Page\x20size\x20(1-100)','default':0x64}],async 'validate'(_0x19a16c){const _0x271b02=a234_0x11a102,_0x137c23=_0x19a16c[_0x271b02(0xee)]('type')[_0x271b02(0x10d)]();if(_0x137c23&&!ROLE_TYPES[_0x271b02(0xfa)](_0x137c23[_0x271b02(0x107)]()))throw CliErrors[_0x271b02(0xf8)](_0x271b02(0x111)+_0x137c23+'\x22.',_0x271b02(0xf6)+ROLE_TYPES[_0x271b02(0xed)](',\x20')+'.');const _0x270282=_0x19a16c['num'](_0x271b02(0x10a),0x1),_0x34b175=_0x19a16c[_0x271b02(0xf7)](_0x271b02(0x108),0x64);if(_0x270282<0x1)throw CliErrors[_0x271b02(0xf8)](_0x271b02(0xfb));if(_0x34b175<0x1||_0x34b175>0x64)throw CliErrors[_0x271b02(0xf8)](_0x271b02(0xef));},async 'execute'(_0x1dc5a3){const _0x424b4e=a234_0x11a102,_0x5e1fb3=_0x1dc5a3['num'](_0x424b4e(0x10a),0x1)||0x1,_0x3ab992=_0x1dc5a3[_0x424b4e(0xf7)]('pagesize',0x64)||0x64,_0x158332=_0x1dc5a3['str'](_0x424b4e(0xf0))['trim']()[_0x424b4e(0x107)](),{items:_0x191119,paging:_0x228716}=await listAppRoles(_0x1dc5a3['appCode'],{'currentPage':_0x5e1fb3,'pageSize':_0x3ab992}),_0x5f56aa=_0x158332?_0x191119[_0x424b4e(0x109)](_0x17df12=>_0x17df12[_0x424b4e(0x113)]===_0x158332):_0x191119,_0x2b33cc=_0x5f56aa[_0x424b4e(0x10b)](projectRole);return{'ok':!![],'data':{'scope':_0x424b4e(0xf5),'roles':_0x2b33cc,'paging':_0x228716},'message':_0x424b4e(0x112)+_0x2b33cc[_0x424b4e(0x101)]+_0x424b4e(0xf9)};}};
@@ -1 +1 @@
1
- const a235_0x33f649=a235_0x12cd;(function(_0x323245,_0x170c30){const _0x5d1179=a235_0x12cd,_0x3838d7=_0x323245();while(!![]){try{const _0x4bc158=-parseInt(_0x5d1179(0x151))/0x1*(parseInt(_0x5d1179(0x163))/0x2)+-parseInt(_0x5d1179(0x154))/0x3+parseInt(_0x5d1179(0x16c))/0x4*(parseInt(_0x5d1179(0x126))/0x5)+-parseInt(_0x5d1179(0x168))/0x6+parseInt(_0x5d1179(0x170))/0x7+-parseInt(_0x5d1179(0x165))/0x8*(-parseInt(_0x5d1179(0x155))/0x9)+parseInt(_0x5d1179(0x13c))/0xa;if(_0x4bc158===_0x170c30)break;else _0x3838d7['push'](_0x3838d7['shift']());}catch(_0x58f709){_0x3838d7['push'](_0x3838d7['shift']());}}}(a235_0x5e39,0x9bbe1));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_0x33f649(0x130),'required':!![],'description':a235_0x33f649(0x124)};function a235_0x5e39(){const _0x37ae3b=['roleName','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','\x20member(s)\x20but\x20role\x20has\x20','join','test','find','str','Role\x20id\x20or\x20exact\x20role\x20name','Role\x20id\x20','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','role','934294aaoFTd','length','80aPFVnw','\x20members\x20of\x20the\x20OWNER\x20role.','user-add','5623230KTmVAw','\x22:\x20','roleType','\x20duplicate\x20memberships\x20for\x20user\x20','12BASJDr','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','toLowerCase','2919434KrEdOJ','expectUserCount','Role\x20name','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','authRequired','Role\x20id\x20(from\x20`role\x20list`)','flagMissing','82435vkJcSP','userId','Missing\x20user\x20reference.','Cannot\x20','Check\x20the\x20nickname/username.\x20','dev','filter','validation','remark','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','number','User\x20','string','Multiple\x20tenant\x20members\x20match\x20\x22',';\x20no\x20change.','Removed\x20','push','totalCount','Pass\x20--user\x20<id|name>.','trim','appCode','\x20is\x20already\x20a\x20member\x20of\x20role\x20','22524010XvoWiq','includes','username','user','map','permitCount','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','\x22\x20is\x20ambiguous\x20(ids:\x20','name','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','Optional\x20role\x20remark/description','DEV','CUSTOM','Pass\x20--user\x20<id>.','No\x20tenant\x20member\x20matches\x20\x22','tenant_code','\x20is\x20not\x20a\x20member\x20of\x20role\x20','Role\x20name\x20\x22','userCount','expect-user-count','/smartapi/permit/user-role/delete','2QhPwXF','OWNER','flag','1346862pBkfER','215505kucAJM','nickname','/smartapi/permit/user-role/create'];a235_0x5e39=function(){return _0x37ae3b;};return a235_0x5e39();}export const ROLE_REF_FLAG={'name':a235_0x33f649(0x162),'type':'string','required':!![],'description':a235_0x33f649(0x15f)};export const USER_REF_FLAG={'name':a235_0x33f649(0x13f),'type':a235_0x33f649(0x132),'required':!![],'description':a235_0x33f649(0x142)};export const NAME_FLAG={'name':'name','type':a235_0x33f649(0x132),'required':!![],'description':a235_0x33f649(0x172)};export const USER_NAME_FLAG={'name':'name','type':a235_0x33f649(0x132),'required':!![],'description':'Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId'};export const REMARK_FLAG={'name':a235_0x33f649(0x12e),'type':a235_0x33f649(0x132),'required':![],'description':a235_0x33f649(0x146)};export const EXPECT_USER_COUNT_FLAG={'name':'expect-user-count','type':'number','required':![],'description':a235_0x33f649(0x161)};export const BUILTIN_ROLE_TYPES=['ADMIN',a235_0x33f649(0x147),a235_0x33f649(0x152)];export function isBuiltinRole(_0x255413){return BUILTIN_ROLE_TYPES['includes'](_0x255413);}export function assertCustomRole(_0x4e0d0b,_0x1ce7e7){const _0x41337c=a235_0x33f649;if(_0x4e0d0b[_0x41337c(0x16a)]!==_0x41337c(0x148))throw CliErrors[_0x41337c(0x12d)](_0x41337c(0x129)+_0x1ce7e7+'\x20built-in\x20role\x20'+_0x4e0d0b[_0x41337c(0x158)]+'\x20('+_0x4e0d0b[_0x41337c(0x16a)]+').',_0x41337c(0x16e));}export function projectRole(_0xfef809){const _0x746767=a235_0x33f649;return{'id':_0xfef809['id'],'roleName':_0xfef809[_0x746767(0x158)],'roleType':_0xfef809[_0x746767(0x16a)],'remark':_0xfef809[_0x746767(0x12e)],'userCount':_0xfef809[_0x746767(0x14e)],'permitCount':_0xfef809[_0x746767(0x141)],'builtin':isBuiltinRole(_0xfef809[_0x746767(0x16a)])};}export async function resolveRoleRef(_0x2eb882,_0x135f49){const _0x44de88=a235_0x33f649,_0x21f72c=_0x135f49[_0x44de88(0x139)]();if(!_0x21f72c)throw CliErrors[_0x44de88(0x12d)]('Missing\x20role\x20reference.','Pass\x20--role\x20<id|name>.');if(/^\d+$/[_0x44de88(0x15c)](_0x21f72c))return getRoleById(_0x2eb882,Number(_0x21f72c));const _0x3bb640=await listAllAppRoles(_0x2eb882),_0x5e036f=_0x3bb640[_0x44de88(0x12c)](_0x117dae=>_0x117dae[_0x44de88(0x158)]===_0x21f72c);if(_0x5e036f[_0x44de88(0x164)]===0x0)throw CliErrors[_0x44de88(0x12d)](_0x44de88(0x14d)+_0x21f72c+'\x22\x20not\x20found\x20in\x20app\x20'+_0x2eb882+'.',_0x44de88(0x159));if(_0x5e036f[_0x44de88(0x164)]>0x1){const _0x2b4307=_0x5e036f[_0x44de88(0x140)](_0x2471c=>_0x2471c['id'])[_0x44de88(0x15b)](',\x20');throw CliErrors[_0x44de88(0x12d)](_0x44de88(0x14d)+_0x21f72c+_0x44de88(0x143)+_0x2b4307+').','Disambiguate\x20with\x20--role\x20<id>.');}return _0x5e036f[0x0];}export async function getRoleById(_0x3407fb,_0x52d368){const _0x95b281=a235_0x33f649,_0x217b7c=await listAllAppRoles(_0x3407fb),_0x3ff3b5=_0x217b7c[_0x95b281(0x12c)](_0x3affe1=>_0x3affe1['id']===_0x52d368&&(!_0x3affe1[_0x95b281(0x13a)]||_0x3affe1[_0x95b281(0x13a)]===_0x3407fb));if(_0x3ff3b5[_0x95b281(0x164)]!==0x1)throw CliErrors[_0x95b281(0x12d)](_0x95b281(0x160)+_0x52d368+'\x20not\x20found\x20in\x20app\x20'+_0x3407fb+'.',_0x95b281(0x145));return _0x3ff3b5[0x0];}async function listAllAppRoles(_0x528822){const _0x11a0e3=a235_0x33f649,_0x4ab2da=0x64,_0x4113a=[];for(let _0x674a28=0x1;;_0x674a28+=0x1){const {items:_0x602515,paging:_0x510f8e}=await listAppRoles(_0x528822,{'currentPage':_0x674a28,'pageSize':_0x4ab2da});_0x4113a[_0x11a0e3(0x136)](..._0x602515);if(_0x602515[_0x11a0e3(0x164)]<_0x4ab2da||_0x510f8e&&_0x4113a[_0x11a0e3(0x164)]>=_0x510f8e['totalCount'])return _0x4113a;}}export async function resolveTenantCode(){const _0x58596b=a235_0x33f649,_0x1efbd8=await getSessionUserInfo(),_0xf78495=_0x1efbd8?.[_0x58596b(0x13f)]?.['tenant']?.[_0x58596b(0x14b)];if(!_0xf78495)throw CliErrors[_0x58596b(0x123)](_0x58596b(0x173));return _0xf78495;}function matchMember(_0xd57a2c,_0x56a8c8){const _0x388d91=a235_0x33f649,_0x78e218=_0x56a8c8['trim']()[_0x388d91(0x16f)]();return(_0xd57a2c[_0x388d91(0x156)]??'')[_0x388d91(0x16f)]()===_0x78e218||(_0xd57a2c['username']??'')[_0x388d91(0x16f)]()===_0x78e218;}export async function resolveUserRef(_0x1f6e62,_0x18bc71=a235_0x33f649(0x149)){const _0x32478e=a235_0x33f649,_0x39983d=_0x1f6e62[_0x32478e(0x139)]();if(!_0x39983d)throw CliErrors['validation'](_0x32478e(0x128),_0x32478e(0x138));const _0x3509cc=await resolveTenantCode(),_0x290e54=await getTenantMembers(_0x3509cc);if(/^\d+$/[_0x32478e(0x15c)](_0x39983d)){const _0x2e8236=Number(_0x39983d),_0x2c6b89=_0x290e54[_0x32478e(0x15d)](_0xe9e43f=>_0xe9e43f['userId']===_0x2e8236);return{'userId':_0x2e8236,'username':_0x2c6b89?.[_0x32478e(0x13e)]??String(_0x2e8236),'nickname':_0x2c6b89?.[_0x32478e(0x156)],'matchedBy':'id'};}const _0x19bc87=_0x290e54['filter'](_0x54ab08=>matchMember(_0x54ab08,_0x39983d));if(_0x19bc87[_0x32478e(0x164)]===0x0)throw CliErrors['validation'](_0x32478e(0x14a)+_0x39983d+'\x22.',_0x32478e(0x12a)+_0x18bc71);if(_0x19bc87['length']>0x1){const _0x367bbc=_0x19bc87['map'](_0x2869ea=>(_0x2869ea[_0x32478e(0x156)]??_0x2869ea[_0x32478e(0x13e)]??'?')+'('+_0x2869ea[_0x32478e(0x127)]+')')['join'](',\x20');throw CliErrors[_0x32478e(0x12d)](_0x32478e(0x133)+_0x39983d+_0x32478e(0x169)+_0x367bbc+'.',_0x18bc71);}const _0x9637c7=_0x19bc87[0x0];return{'userId':_0x9637c7['userId'],'username':_0x9637c7[_0x32478e(0x13e)]??String(_0x9637c7['userId']),'nickname':_0x9637c7[_0x32478e(0x156)],'matchedBy':_0x32478e(0x144)};}export const CREATE_USER_ROLE_PATH=a235_0x33f649(0x157);export const DELETE_USER_ROLE_PATH=a235_0x33f649(0x150);function a235_0x12cd(_0x309356,_0x3f6edc){_0x309356=_0x309356-0x123;const _0x5e3978=a235_0x5e39();let _0x12cd78=_0x5e3978[_0x309356];return _0x12cd78;}export function computeRoleUserMutation(_0x52089f){const _0x5f00ed=a235_0x33f649,{operation:_0x337bd0,appCode:_0x4a894e,role:_0x3171ce,relations:_0x49e356,user:_0x494c35}=_0x52089f,_0x5d5040=[...new Set(_0x49e356['map'](_0x54f456=>_0x54f456['userId']))],_0x357514=[];if(_0x52089f[_0x5f00ed(0x171)]!==undefined&&_0x52089f[_0x5f00ed(0x171)]!==_0x5d5040['length'])throw CliErrors['validation']('Anti-drift\x20check\x20failed:\x20expected\x20'+_0x52089f[_0x5f00ed(0x171)]+_0x5f00ed(0x15a)+_0x5d5040[_0x5f00ed(0x164)]+'.',_0x5f00ed(0x12f));const _0x1bfe33=_0x5d5040[_0x5f00ed(0x13d)](_0x494c35['userId']),_0x42cfaa=_0x49e356['filter'](_0x4a42fb=>_0x4a42fb['userId']===_0x494c35[_0x5f00ed(0x127)])[_0x5f00ed(0x140)](_0x53b9b3=>_0x53b9b3['id']),_0x536553=_0x337bd0==='user-add'?!_0x1bfe33:_0x1bfe33;let _0xfeeaf9=_0x5d5040;_0x337bd0===_0x5f00ed(0x167)?_0x1bfe33?_0x357514[_0x5f00ed(0x136)](_0x5f00ed(0x131)+_0x494c35['userId']+_0x5f00ed(0x13b)+_0x3171ce[_0x5f00ed(0x158)]+_0x5f00ed(0x134)):_0xfeeaf9=[..._0x5d5040,_0x494c35[_0x5f00ed(0x127)]]:!_0x1bfe33?_0x357514[_0x5f00ed(0x136)](_0x5f00ed(0x131)+_0x494c35[_0x5f00ed(0x127)]+_0x5f00ed(0x14c)+_0x3171ce[_0x5f00ed(0x158)]+';\x20no\x20change.'):(_0xfeeaf9=_0x5d5040['filter'](_0x4063bb=>_0x4063bb!==_0x494c35[_0x5f00ed(0x127)]),_0x42cfaa[_0x5f00ed(0x164)]>0x1&&_0x357514[_0x5f00ed(0x136)](_0x5f00ed(0x135)+_0x42cfaa[_0x5f00ed(0x164)]+_0x5f00ed(0x16b)+_0x494c35[_0x5f00ed(0x127)]+'.'));const _0x266cba={'scope':_0x5f00ed(0x12b),'operation':_0x337bd0,'selector':{'appCode':_0x4a894e,'roleId':_0x3171ce['id'],'roleName':_0x3171ce[_0x5f00ed(0x158)],'userId':_0x494c35[_0x5f00ed(0x127)]},'before':{'userIds':_0x5d5040},'after':{'userIds':_0xfeeaf9},'dryRun':_0x52089f['dryRun'],'backend':{'method':'POST','path':_0x337bd0===_0x5f00ed(0x167)?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x357514};return{'mutation':_0x266cba,'changed':_0x536553,'matchingRelationIds':_0x42cfaa};}export async function loadDevRoleRelations(_0x47046e,_0x2e00f2){const _0x2468f2=a235_0x33f649,_0x16ba5e=0x64,_0x3465f2=[];for(let _0x5860d4=0x1;;_0x5860d4+=0x1){const {items:_0x59a61c,paging:_0x5f8439}=await listDevUserRoleRelations(_0x47046e,{'roleId':_0x2e00f2,'currentPage':_0x5860d4,'pageSize':_0x16ba5e});_0x3465f2[_0x2468f2(0x136)](..._0x59a61c);if(_0x59a61c[_0x2468f2(0x164)]<_0x16ba5e||_0x5f8439&&_0x3465f2['length']>=_0x5f8439[_0x2468f2(0x137)])return _0x3465f2;}}export function readRoleRef(_0x507e12){const _0x5c8daa=a235_0x33f649,_0x4dae85=_0x507e12[_0x5c8daa(0x15e)](_0x5c8daa(0x162))[_0x5c8daa(0x139)]();if(!_0x4dae85)throw CliErrors['flagMissing']('role','Pass\x20--role\x20<id|name>.');return _0x4dae85;}export async function prepareUserMutation(_0x258131,_0x1a78c1,_0x479b47){const _0x3c3ccb=a235_0x33f649,_0x317f85=readRoleRef(_0x258131),_0x31ee5a=_0x258131[_0x3c3ccb(0x15e)](_0x3c3ccb(0x13f))[_0x3c3ccb(0x139)]();if(!_0x31ee5a)throw CliErrors[_0x3c3ccb(0x125)](_0x3c3ccb(0x13f),_0x3c3ccb(0x138));const _0xb925c5=_0x258131[_0x3c3ccb(0x153)](_0x3c3ccb(0x14f)),_0x3ab232=_0xb925c5===undefined||_0xb925c5===null?undefined:Number(_0xb925c5),_0x5efe18=await resolveRoleRef(_0x258131[_0x3c3ccb(0x13a)],_0x317f85);if(_0x5efe18[_0x3c3ccb(0x16a)]===_0x3c3ccb(0x152))throw CliErrors['validation']('Cannot\x20'+_0x1a78c1+_0x3c3ccb(0x166),_0x3c3ccb(0x16d));const _0x34337c=await resolveUserRef(_0x31ee5a),_0x4f6cc1=await loadDevRoleRelations(_0x258131[_0x3c3ccb(0x13a)],_0x5efe18['id']);return{...computeRoleUserMutation({'operation':_0x1a78c1,'appCode':_0x258131[_0x3c3ccb(0x13a)],'role':_0x5efe18,'relations':_0x4f6cc1,'user':{'userId':_0x34337c[_0x3c3ccb(0x127)],'username':_0x34337c[_0x3c3ccb(0x13e)],'nickname':_0x34337c[_0x3c3ccb(0x156)]},'dryRun':_0x479b47,..._0x3ab232!==undefined?{'expectUserCount':_0x3ab232}:{}}),'role':_0x5efe18,'user':_0x34337c};}
1
+ const a235_0x135c9c=a235_0x15aa;(function(_0x5c4ca5,_0x49eda1){const _0x2a4c53=a235_0x15aa,_0x5fa276=_0x5c4ca5();while(!![]){try{const _0x204bdc=-parseInt(_0x2a4c53(0x1b4))/0x1+parseInt(_0x2a4c53(0x1e2))/0x2*(parseInt(_0x2a4c53(0x1fa))/0x3)+parseInt(_0x2a4c53(0x1e8))/0x4+-parseInt(_0x2a4c53(0x1fb))/0x5+-parseInt(_0x2a4c53(0x1eb))/0x6*(parseInt(_0x2a4c53(0x1af))/0x7)+parseInt(_0x2a4c53(0x1e3))/0x8*(parseInt(_0x2a4c53(0x1fc))/0x9)+parseInt(_0x2a4c53(0x1cc))/0xa*(-parseInt(_0x2a4c53(0x1d1))/0xb);if(_0x204bdc===_0x49eda1)break;else _0x5fa276['push'](_0x5fa276['shift']());}catch(_0x19d35f){_0x5fa276['push'](_0x5fa276['shift']());}}}(a235_0x2a71,0x55f85));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_0x135c9c(0x1f2),'required':!![],'description':a235_0x135c9c(0x1f0)};export const ROLE_REF_FLAG={'name':a235_0x135c9c(0x1f9),'type':a235_0x135c9c(0x1d9),'required':!![],'description':a235_0x135c9c(0x1e4)};export const USER_REF_FLAG={'name':a235_0x135c9c(0x1ea),'type':a235_0x135c9c(0x1d9),'required':!![],'description':a235_0x135c9c(0x1c1)};export const NAME_FLAG={'name':a235_0x135c9c(0x1cd),'type':a235_0x135c9c(0x1d9),'required':!![],'description':a235_0x135c9c(0x1c4)};export const USER_NAME_FLAG={'name':a235_0x135c9c(0x1cd),'type':'string','required':!![],'description':'Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId'};export const REMARK_FLAG={'name':'remark','type':a235_0x135c9c(0x1d9),'required':![],'description':'Optional\x20role\x20remark/description'};export const EXPECT_USER_COUNT_FLAG={'name':a235_0x135c9c(0x1e1),'type':a235_0x135c9c(0x1f2),'required':![],'description':'Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs'};function a235_0x15aa(_0x4bac61,_0x2987ee){_0x4bac61=_0x4bac61-0x1af;const _0x2a71d4=a235_0x2a71();let _0x15aa5e=_0x2a71d4[_0x4bac61];return _0x15aa5e;}export const BUILTIN_ROLE_TYPES=[a235_0x135c9c(0x1f4),'DEV',a235_0x135c9c(0x1d5)];function a235_0x2a71(){const _0x25da88=['User\x20','Check\x20the\x20nickname/username.\x20','\x20not\x20found\x20in\x20app\x20','\x20member(s)\x20but\x20role\x20has\x20','Role\x20name\x20\x22','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','roleName','Anti-drift\x20check\x20failed:\x20expected\x20','Role\x20name','/smartapi/permit/user-role/create','expectUserCount','userCount','\x20is\x20not\x20a\x20member\x20of\x20role\x20','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.',';\x20no\x20change.','/smartapi/permit/user-role/delete','80hIvBNO','name','push','validation','includes','477697LHApHe','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','\x20members\x20of\x20the\x20OWNER\x20role.','user-add','OWNER','Multiple\x20tenant\x20members\x20match\x20\x22','CUSTOM','appCode','string','trim','Pass\x20--role\x20<id|name>.','totalCount','Pass\x20--user\x20<id>.','Cannot\x20','filter','\x22\x20is\x20ambiguous\x20(ids:\x20','expect-user-count','103130RcJKeZ','120rSihCm','Role\x20id\x20or\x20exact\x20role\x20name','Removed\x20','username','Missing\x20role\x20reference.','1738436ViwMRN','Missing\x20user\x20reference.','user','30738IYnqxI','\x22:\x20','find','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','flag','Role\x20id\x20(from\x20`role\x20list`)','dev','number','POST','ADMIN','tenant','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.','nickname','test','role','36ipaShb','2355935jUGyZQ','356652rZcGDm','join','roleType','\x22\x20not\x20found\x20in\x20app\x20','flagMissing','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','toLowerCase','35JPEqNV','map','Pass\x20--user\x20<id|name>.','Disambiguate\x20with\x20--role\x20<id>.','\x20duplicate\x20memberships\x20for\x20user\x20','451458nhwXIi','Role\x20id\x20','authRequired','userId','No\x20tenant\x20member\x20matches\x20\x22','length','tenant_code','str'];a235_0x2a71=function(){return _0x25da88;};return a235_0x2a71();}export function isBuiltinRole(_0x224dc5){const _0x112e8d=a235_0x135c9c;return BUILTIN_ROLE_TYPES[_0x112e8d(0x1d0)](_0x224dc5);}export function assertCustomRole(_0x2e44eb,_0x28468f){const _0x2ea542=a235_0x135c9c;if(_0x2e44eb[_0x2ea542(0x1fe)]!==_0x2ea542(0x1d7))throw CliErrors['validation'](_0x2ea542(0x1de)+_0x28468f+'\x20built-in\x20role\x20'+_0x2e44eb[_0x2ea542(0x1c2)]+'\x20('+_0x2e44eb[_0x2ea542(0x1fe)]+').',_0x2ea542(0x1d2));}export function projectRole(_0x4cbd42){const _0x702183=a235_0x135c9c;return{'id':_0x4cbd42['id'],'roleName':_0x4cbd42['roleName'],'roleType':_0x4cbd42[_0x702183(0x1fe)],'remark':_0x4cbd42['remark'],'userCount':_0x4cbd42[_0x702183(0x1c7)],'permitCount':_0x4cbd42['permitCount'],'builtin':isBuiltinRole(_0x4cbd42[_0x702183(0x1fe)])};}export async function resolveRoleRef(_0x4f2592,_0x17c52c){const _0x515921=a235_0x135c9c,_0xe7f11d=_0x17c52c[_0x515921(0x1da)]();if(!_0xe7f11d)throw CliErrors[_0x515921(0x1cf)](_0x515921(0x1e7),_0x515921(0x1db));if(/^\d+$/[_0x515921(0x1f8)](_0xe7f11d))return getRoleById(_0x4f2592,Number(_0xe7f11d));const _0x2e8b47=await listAllAppRoles(_0x4f2592),_0x5a9c86=_0x2e8b47[_0x515921(0x1df)](_0x2693a5=>_0x2693a5['roleName']===_0xe7f11d);if(_0x5a9c86[_0x515921(0x1b9)]===0x0)throw CliErrors['validation']('Role\x20name\x20\x22'+_0xe7f11d+_0x515921(0x1ff)+_0x4f2592+'.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.');if(_0x5a9c86[_0x515921(0x1b9)]>0x1){const _0x1dc9dc=_0x5a9c86[_0x515921(0x1b0)](_0x2584f5=>_0x2584f5['id'])[_0x515921(0x1fd)](',\x20');throw CliErrors[_0x515921(0x1cf)](_0x515921(0x1c0)+_0xe7f11d+_0x515921(0x1e0)+_0x1dc9dc+').',_0x515921(0x1b2));}return _0x5a9c86[0x0];}export async function getRoleById(_0xc102f8,_0x58118b){const _0x538d26=a235_0x135c9c,_0xf949ed=await listAllAppRoles(_0xc102f8),_0x2f3000=_0xf949ed[_0x538d26(0x1df)](_0xa0fc0c=>_0xa0fc0c['id']===_0x58118b&&(!_0xa0fc0c[_0x538d26(0x1d8)]||_0xa0fc0c[_0x538d26(0x1d8)]===_0xc102f8));if(_0x2f3000[_0x538d26(0x1b9)]!==0x1)throw CliErrors['validation'](_0x538d26(0x1b5)+_0x58118b+_0x538d26(0x1be)+_0xc102f8+'.',_0x538d26(0x1c9));return _0x2f3000[0x0];}async function listAllAppRoles(_0x2d3bb9){const _0x117be0=a235_0x135c9c,_0x178d45=0x64,_0x41a37c=[];for(let _0x515dab=0x1;;_0x515dab+=0x1){const {items:_0xfde362,paging:_0x492305}=await listAppRoles(_0x2d3bb9,{'currentPage':_0x515dab,'pageSize':_0x178d45});_0x41a37c['push'](..._0xfde362);if(_0xfde362[_0x117be0(0x1b9)]<_0x178d45||_0x492305&&_0x41a37c[_0x117be0(0x1b9)]>=_0x492305[_0x117be0(0x1dc)])return _0x41a37c;}}export async function resolveTenantCode(){const _0x40ae9c=a235_0x135c9c,_0x56b37c=await getSessionUserInfo(),_0x538bbd=_0x56b37c?.[_0x40ae9c(0x1ea)]?.[_0x40ae9c(0x1f5)]?.[_0x40ae9c(0x1ba)];if(!_0x538bbd)throw CliErrors[_0x40ae9c(0x1b6)](_0x40ae9c(0x201));return _0x538bbd;}function matchMember(_0x4c1e95,_0x38c4ed){const _0x24281d=a235_0x135c9c,_0x18f5f2=_0x38c4ed['trim']()[_0x24281d(0x202)]();return(_0x4c1e95[_0x24281d(0x1f7)]??'')['toLowerCase']()===_0x18f5f2||(_0x4c1e95['username']??'')[_0x24281d(0x202)]()===_0x18f5f2;}export async function resolveUserRef(_0x54ad27,_0x29fd21=a235_0x135c9c(0x1dd)){const _0x3b2455=a235_0x135c9c,_0x3acc63=_0x54ad27[_0x3b2455(0x1da)]();if(!_0x3acc63)throw CliErrors[_0x3b2455(0x1cf)](_0x3b2455(0x1e9),_0x3b2455(0x1b1));const _0x1028ea=await resolveTenantCode(),_0x4fe484=await getTenantMembers(_0x1028ea);if(/^\d+$/[_0x3b2455(0x1f8)](_0x3acc63)){const _0x2bde33=Number(_0x3acc63),_0x36fa1b=_0x4fe484[_0x3b2455(0x1ed)](_0x168944=>_0x168944[_0x3b2455(0x1b7)]===_0x2bde33);return{'userId':_0x2bde33,'username':_0x36fa1b?.[_0x3b2455(0x1e6)]??String(_0x2bde33),'nickname':_0x36fa1b?.['nickname'],'matchedBy':'id'};}const _0x1746e1=_0x4fe484[_0x3b2455(0x1df)](_0x5dfb03=>matchMember(_0x5dfb03,_0x3acc63));if(_0x1746e1[_0x3b2455(0x1b9)]===0x0)throw CliErrors['validation'](_0x3b2455(0x1b8)+_0x3acc63+'\x22.',_0x3b2455(0x1bd)+_0x29fd21);if(_0x1746e1[_0x3b2455(0x1b9)]>0x1){const _0x204df5=_0x1746e1[_0x3b2455(0x1b0)](_0x5ebce0=>(_0x5ebce0[_0x3b2455(0x1f7)]??_0x5ebce0[_0x3b2455(0x1e6)]??'?')+'('+_0x5ebce0[_0x3b2455(0x1b7)]+')')[_0x3b2455(0x1fd)](',\x20');throw CliErrors[_0x3b2455(0x1cf)](_0x3b2455(0x1d6)+_0x3acc63+_0x3b2455(0x1ec)+_0x204df5+'.',_0x29fd21);}const _0x5254c5=_0x1746e1[0x0];return{'userId':_0x5254c5[_0x3b2455(0x1b7)],'username':_0x5254c5[_0x3b2455(0x1e6)]??String(_0x5254c5['userId']),'nickname':_0x5254c5[_0x3b2455(0x1f7)],'matchedBy':_0x3b2455(0x1cd)};}export const CREATE_USER_ROLE_PATH=a235_0x135c9c(0x1c5);export const DELETE_USER_ROLE_PATH=a235_0x135c9c(0x1cb);export function computeRoleUserMutation(_0x50e2c5){const _0x58e2a1=a235_0x135c9c,{operation:_0xa71258,appCode:_0x484976,role:_0xcc83c0,relations:_0x43d164,user:_0x3ce173}=_0x50e2c5,_0x1e3c15=[...new Set(_0x43d164[_0x58e2a1(0x1b0)](_0x4aa6b3=>_0x4aa6b3[_0x58e2a1(0x1b7)]))],_0x17a376=[];if(_0x50e2c5[_0x58e2a1(0x1c6)]!==undefined&&_0x50e2c5['expectUserCount']!==_0x1e3c15[_0x58e2a1(0x1b9)])throw CliErrors[_0x58e2a1(0x1cf)](_0x58e2a1(0x1c3)+_0x50e2c5['expectUserCount']+_0x58e2a1(0x1bf)+_0x1e3c15['length']+'.',_0x58e2a1(0x1ee));const _0x41ce6e=_0x1e3c15[_0x58e2a1(0x1d0)](_0x3ce173[_0x58e2a1(0x1b7)]),_0xfe5f67=_0x43d164[_0x58e2a1(0x1df)](_0x438ab1=>_0x438ab1[_0x58e2a1(0x1b7)]===_0x3ce173[_0x58e2a1(0x1b7)])[_0x58e2a1(0x1b0)](_0x4b29d8=>_0x4b29d8['id']),_0x322202=_0xa71258===_0x58e2a1(0x1d4)?!_0x41ce6e:_0x41ce6e;let _0x14eb37=_0x1e3c15;_0xa71258==='user-add'?_0x41ce6e?_0x17a376[_0x58e2a1(0x1ce)](_0x58e2a1(0x1bc)+_0x3ce173[_0x58e2a1(0x1b7)]+'\x20is\x20already\x20a\x20member\x20of\x20role\x20'+_0xcc83c0['roleName']+_0x58e2a1(0x1ca)):_0x14eb37=[..._0x1e3c15,_0x3ce173['userId']]:!_0x41ce6e?_0x17a376[_0x58e2a1(0x1ce)]('User\x20'+_0x3ce173['userId']+_0x58e2a1(0x1c8)+_0xcc83c0[_0x58e2a1(0x1c2)]+';\x20no\x20change.'):(_0x14eb37=_0x1e3c15[_0x58e2a1(0x1df)](_0x5ac4f1=>_0x5ac4f1!==_0x3ce173[_0x58e2a1(0x1b7)]),_0xfe5f67[_0x58e2a1(0x1b9)]>0x1&&_0x17a376[_0x58e2a1(0x1ce)](_0x58e2a1(0x1e5)+_0xfe5f67[_0x58e2a1(0x1b9)]+_0x58e2a1(0x1b3)+_0x3ce173['userId']+'.'));const _0x549ec2={'scope':_0x58e2a1(0x1f1),'operation':_0xa71258,'selector':{'appCode':_0x484976,'roleId':_0xcc83c0['id'],'roleName':_0xcc83c0[_0x58e2a1(0x1c2)],'userId':_0x3ce173['userId']},'before':{'userIds':_0x1e3c15},'after':{'userIds':_0x14eb37},'dryRun':_0x50e2c5['dryRun'],'backend':{'method':_0x58e2a1(0x1f3),'path':_0xa71258===_0x58e2a1(0x1d4)?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x17a376};return{'mutation':_0x549ec2,'changed':_0x322202,'matchingRelationIds':_0xfe5f67};}export async function loadDevRoleRelations(_0x3257d8,_0x4c2ae0){const _0x339291=a235_0x135c9c,_0xa9da6d=0x64,_0x4c23a6=[];for(let _0x546dc5=0x1;;_0x546dc5+=0x1){const {items:_0x20a5aa,paging:_0x853e00}=await listDevUserRoleRelations(_0x3257d8,{'roleId':_0x4c2ae0,'currentPage':_0x546dc5,'pageSize':_0xa9da6d});_0x4c23a6[_0x339291(0x1ce)](..._0x20a5aa);if(_0x20a5aa[_0x339291(0x1b9)]<_0xa9da6d||_0x853e00&&_0x4c23a6[_0x339291(0x1b9)]>=_0x853e00['totalCount'])return _0x4c23a6;}}export function readRoleRef(_0x48cb2b){const _0x4f1abc=a235_0x135c9c,_0x1b0397=_0x48cb2b[_0x4f1abc(0x1bb)](_0x4f1abc(0x1f9))[_0x4f1abc(0x1da)]();if(!_0x1b0397)throw CliErrors[_0x4f1abc(0x200)](_0x4f1abc(0x1f9),_0x4f1abc(0x1db));return _0x1b0397;}export async function prepareUserMutation(_0x1c263a,_0x5bd608,_0x39dd5b){const _0x342908=a235_0x135c9c,_0x419bfc=readRoleRef(_0x1c263a),_0x88d823=_0x1c263a[_0x342908(0x1bb)](_0x342908(0x1ea))[_0x342908(0x1da)]();if(!_0x88d823)throw CliErrors[_0x342908(0x200)](_0x342908(0x1ea),_0x342908(0x1b1));const _0x258972=_0x1c263a[_0x342908(0x1ef)](_0x342908(0x1e1)),_0x1321ba=_0x258972===undefined||_0x258972===null?undefined:Number(_0x258972),_0xc98269=await resolveRoleRef(_0x1c263a[_0x342908(0x1d8)],_0x419bfc);if(_0xc98269[_0x342908(0x1fe)]==='OWNER')throw CliErrors[_0x342908(0x1cf)](_0x342908(0x1de)+_0x5bd608+_0x342908(0x1d3),_0x342908(0x1f6));const _0x1c9222=await resolveUserRef(_0x88d823),_0x120ca0=await loadDevRoleRelations(_0x1c263a['appCode'],_0xc98269['id']);return{...computeRoleUserMutation({'operation':_0x5bd608,'appCode':_0x1c263a[_0x342908(0x1d8)],'role':_0xc98269,'relations':_0x120ca0,'user':{'userId':_0x1c9222[_0x342908(0x1b7)],'username':_0x1c9222[_0x342908(0x1e6)],'nickname':_0x1c9222[_0x342908(0x1f7)]},'dryRun':_0x39dd5b,..._0x1321ba!==undefined?{'expectUserCount':_0x1321ba}:{}}),'role':_0xc98269,'user':_0x1c9222};}
@@ -1 +1 @@
1
- const a236_0x295c6f=a236_0x2f36;function a236_0xee2b(){const _0x41043e=['remark','27736foPGGq','name','/smartapi/permit/role/update','string','dev','validation','2648088FQySnO','flag','appCode','Updated\x20role\x20','572AKvGaF','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','250gHjqkh','45CipLTB','\x20(id=','num','roleName','POST','2357792crmPFV','write','1435698nMKmHF','202190JMlAJE','length','1037930XQeRGO','New\x20role\x20name','7LeayKX','2268UkCnLy','--name\x20cannot\x20be\x20empty.','update'];a236_0xee2b=function(){return _0x41043e;};return a236_0xee2b();}(function(_0x502ddd,_0x7c8c55){const _0x39b5ac=a236_0x2f36,_0x5569c6=_0x502ddd();while(!![]){try{const _0x3c33dc=-parseInt(_0x39b5ac(0x8c))/0x1*(-parseInt(_0x39b5ac(0x9a))/0x2)+parseInt(_0x39b5ac(0x8d))/0x3*(-parseInt(_0x39b5ac(0x7f))/0x4)+parseInt(_0x39b5ac(0x97))/0x5+parseInt(_0x39b5ac(0x94))/0x6+-parseInt(_0x39b5ac(0x99))/0x7*(-parseInt(_0x39b5ac(0x92))/0x8)+parseInt(_0x39b5ac(0x85))/0x9+parseInt(_0x39b5ac(0x95))/0xa*(-parseInt(_0x39b5ac(0x89))/0xb);if(_0x3c33dc===_0x7c8c55)break;else _0x5569c6['push'](_0x5569c6['shift']());}catch(_0x599e43){_0x5569c6['push'](_0x5569c6['shift']());}}}(a236_0xee2b,0x28057));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_0x295c6f(0x81);function readPatch(_0x4f87c6){const _0x5441e7=a236_0x295c6f,_0x4fbd29=_0x4f87c6[_0x5441e7(0x86)](_0x5441e7(0x80)),_0x596b91=_0x4f87c6[_0x5441e7(0x86)](_0x5441e7(0x7e)),_0x410de4={};if(_0x4fbd29!==undefined&&_0x4fbd29!==null){const _0x3ada25=String(_0x4fbd29)['trim']();if(!_0x3ada25)throw CliErrors['validation'](_0x5441e7(0x7c));if(_0x3ada25[_0x5441e7(0x96)]>0x40)throw CliErrors[_0x5441e7(0x84)](_0x5441e7(0x8b));_0x410de4[_0x5441e7(0x90)]=_0x3ada25;}_0x596b91!==undefined&&_0x596b91!==null&&(_0x410de4[_0x5441e7(0x7e)]=String(_0x596b91));if(_0x410de4[_0x5441e7(0x90)]===undefined&&_0x410de4[_0x5441e7(0x7e)]===undefined)throw CliErrors[_0x5441e7(0x84)]('Nothing\x20to\x20update.','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.');return _0x410de4;}function a236_0x2f36(_0xc007d5,_0xef9979){_0xc007d5=_0xc007d5-0x7c;const _0xee2b44=a236_0xee2b();let _0x2f361b=_0xee2b44[_0xc007d5];return _0x2f361b;}export const roleUpdate={'service':'role','command':'update','description':a236_0x295c6f(0x8a),'risk':a236_0x295c6f(0x93),'flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a236_0x295c6f(0x80),'type':a236_0x295c6f(0x82),'required':![],'description':a236_0x295c6f(0x98)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2f1d03){readPatch(_0x2f1d03);},async 'dryRun'(_0x304210){const _0x391b91=a236_0x295c6f,_0xd218e1=_0x304210['num']('id'),_0x2e8ea1=readPatch(_0x304210),_0x26922e=await getRoleById(_0x304210[_0x391b91(0x87)],_0xd218e1);return assertCustomRole(_0x26922e,_0x391b91(0x7d)),asDryRunResult({'scope':_0x391b91(0x83),'operation':_0x391b91(0x7d),'selector':{'appCode':_0x304210[_0x391b91(0x87)],'roleId':_0xd218e1,'roleName':_0x26922e[_0x391b91(0x90)]},'before':projectRole(_0x26922e),'after':projectRole({..._0x26922e,..._0x2e8ea1['roleName']!==undefined?{'roleName':_0x2e8ea1[_0x391b91(0x90)]}:{},..._0x2e8ea1['remark']!==undefined?{'remark':_0x2e8ea1['remark']}:{}}),'dryRun':!![],'backend':{'method':_0x391b91(0x91),'path':UPDATE_PATH},'warnings':[]},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x4aeebf){const _0x1f58bc=a236_0x295c6f,_0x400e18=_0x4aeebf[_0x1f58bc(0x8f)]('id'),_0x30e0c1=readPatch(_0x4aeebf),_0x2e4cd1=await getRoleById(_0x4aeebf[_0x1f58bc(0x87)],_0x400e18);assertCustomRole(_0x2e4cd1,'update'),await updateAppRole({'id':_0x400e18,'appCode':_0x4aeebf[_0x1f58bc(0x87)],..._0x30e0c1[_0x1f58bc(0x90)]!==undefined?{'roleName':_0x30e0c1[_0x1f58bc(0x90)]}:{},..._0x30e0c1['remark']!==undefined?{'remark':_0x30e0c1['remark']}:{}});const _0x1df2b5=await getRoleById(_0x4aeebf[_0x1f58bc(0x87)],_0x400e18);return{'ok':!![],'data':{'scope':_0x1f58bc(0x83),'operation':'update','selector':{'appCode':_0x4aeebf[_0x1f58bc(0x87)],'roleId':_0x400e18,'roleName':_0x1df2b5[_0x1f58bc(0x90)]},'before':projectRole(_0x2e4cd1),'after':projectRole(_0x1df2b5),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[]},'message':_0x1f58bc(0x88)+_0x1df2b5['roleName']+_0x1f58bc(0x8e)+_0x400e18+')'};}};
1
+ const a236_0x4dc7a5=a236_0x52a2;(function(_0x55bd23,_0x45b8d9){const _0x55966d=a236_0x52a2,_0x219a7f=_0x55bd23();while(!![]){try{const _0x416bbf=-parseInt(_0x55966d(0x154))/0x1*(-parseInt(_0x55966d(0x144))/0x2)+parseInt(_0x55966d(0x15c))/0x3+parseInt(_0x55966d(0x153))/0x4+parseInt(_0x55966d(0x146))/0x5*(-parseInt(_0x55966d(0x160))/0x6)+parseInt(_0x55966d(0x15b))/0x7*(-parseInt(_0x55966d(0x15f))/0x8)+-parseInt(_0x55966d(0x161))/0x9*(-parseInt(_0x55966d(0x14a))/0xa)+-parseInt(_0x55966d(0x156))/0xb;if(_0x416bbf===_0x45b8d9)break;else _0x219a7f['push'](_0x219a7f['shift']());}catch(_0x94a0e9){_0x219a7f['push'](_0x219a7f['shift']());}}}(a236_0x15f3,0x4a477));import{updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a236_0x52a2(_0x2adf85,_0x24d0ea){_0x2adf85=_0x2adf85-0x143;const _0x15f387=a236_0x15f3();let _0x52a205=_0x15f387[_0x2adf85];return _0x52a205;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a236_0x15f3(){const _0x381871=['name','POST','New\x20role\x20name','update','validation','remark','1883316SGctWb','2ockxFV','roleName','13336862lsZrru','length','trim','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','/smartapi/permit/role/update','7JTJCyv','1709967bsQAeu','role','Updated\x20role\x20','3084808ZbbZWA','150582PlSCPc','5270211iihVeg','dev','401378VPwnhm','appCode','25mMdSSq','Nothing\x20to\x20update.','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','flag','10PBwDPd','--name\x20cannot\x20be\x20empty.','num'];a236_0x15f3=function(){return _0x381871;};return a236_0x15f3();}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_0x4dc7a5(0x15a);function readPatch(_0xf5603f){const _0x295a81=a236_0x4dc7a5,_0x557589=_0xf5603f[_0x295a81(0x149)](_0x295a81(0x14d)),_0x56803e=_0xf5603f['flag']('remark'),_0x3359cd={};if(_0x557589!==undefined&&_0x557589!==null){const _0x48b529=String(_0x557589)[_0x295a81(0x158)]();if(!_0x48b529)throw CliErrors[_0x295a81(0x151)](_0x295a81(0x14b));if(_0x48b529[_0x295a81(0x157)]>0x40)throw CliErrors[_0x295a81(0x151)](_0x295a81(0x148));_0x3359cd['roleName']=_0x48b529;}_0x56803e!==undefined&&_0x56803e!==null&&(_0x3359cd[_0x295a81(0x152)]=String(_0x56803e));if(_0x3359cd[_0x295a81(0x155)]===undefined&&_0x3359cd[_0x295a81(0x152)]===undefined)throw CliErrors[_0x295a81(0x151)](_0x295a81(0x147),'Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.');return _0x3359cd;}export const roleUpdate={'service':a236_0x4dc7a5(0x15d),'command':'update','description':a236_0x4dc7a5(0x159),'risk':'write','flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':'name','type':'string','required':![],'description':a236_0x4dc7a5(0x14f)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x18f2ba){readPatch(_0x18f2ba);},async 'dryRun'(_0x55fc9d){const _0x1c6bcd=a236_0x4dc7a5,_0x100d1a=_0x55fc9d[_0x1c6bcd(0x14c)]('id'),_0x37b365=readPatch(_0x55fc9d),_0x1d2c7a=await getRoleById(_0x55fc9d['appCode'],_0x100d1a);return assertCustomRole(_0x1d2c7a,_0x1c6bcd(0x150)),asDryRunResult({'scope':_0x1c6bcd(0x143),'operation':_0x1c6bcd(0x150),'selector':{'appCode':_0x55fc9d['appCode'],'roleId':_0x100d1a,'roleName':_0x1d2c7a['roleName']},'before':projectRole(_0x1d2c7a),'after':projectRole({..._0x1d2c7a,..._0x37b365[_0x1c6bcd(0x155)]!==undefined?{'roleName':_0x37b365[_0x1c6bcd(0x155)]}:{},..._0x37b365['remark']!==undefined?{'remark':_0x37b365[_0x1c6bcd(0x152)]}:{}}),'dryRun':!![],'backend':{'method':_0x1c6bcd(0x14e),'path':UPDATE_PATH},'warnings':[]},{'method':_0x1c6bcd(0x14e),'url':UPDATE_PATH});},async 'execute'(_0xb080a0){const _0x38361e=a236_0x4dc7a5,_0x281058=_0xb080a0['num']('id'),_0x45c8a9=readPatch(_0xb080a0),_0x4e877d=await getRoleById(_0xb080a0[_0x38361e(0x145)],_0x281058);assertCustomRole(_0x4e877d,_0x38361e(0x150)),await updateAppRole({'id':_0x281058,'appCode':_0xb080a0['appCode'],..._0x45c8a9[_0x38361e(0x155)]!==undefined?{'roleName':_0x45c8a9[_0x38361e(0x155)]}:{},..._0x45c8a9[_0x38361e(0x152)]!==undefined?{'remark':_0x45c8a9[_0x38361e(0x152)]}:{}});const _0xdaf9e8=await getRoleById(_0xb080a0[_0x38361e(0x145)],_0x281058);return{'ok':!![],'data':{'scope':_0x38361e(0x143),'operation':_0x38361e(0x150),'selector':{'appCode':_0xb080a0[_0x38361e(0x145)],'roleId':_0x281058,'roleName':_0xdaf9e8[_0x38361e(0x155)]},'before':projectRole(_0x4e877d),'after':projectRole(_0xdaf9e8),'dryRun':![],'backend':{'method':_0x38361e(0x14e),'path':UPDATE_PATH},'warnings':[]},'message':_0x38361e(0x15e)+_0xdaf9e8['roleName']+'\x20(id='+_0x281058+')'};}};
@@ -1 +1 @@
1
- const a237_0x2901a9=a237_0x18f1;function a237_0x3dc0(){const _0x4df742=['user-add','313058oXOUXc','role','roleName','328832rQhGLm','Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','appCode','\x20to\x20role\x20','userId','\x20already\x20in\x20role\x20','81EIgIol','1319490BFrSpl','246771SdfaSE','username','2dYxNRf','1371080qXOEpN','roleType','POST','2408466mQLUeB','high-risk-write','298983QLYwZS','Added\x20user\x20','selector','No\x20change:\x20user\x20','roleId'];a237_0x3dc0=function(){return _0x4df742;};return a237_0x3dc0();}(function(_0x96a1f6,_0x23c370){const _0x3f5455=a237_0x18f1,_0x52a60c=_0x96a1f6();while(!![]){try{const _0x175df0=-parseInt(_0x3f5455(0xf6))/0x1*(-parseInt(_0x3f5455(0xe9))/0x2)+parseInt(_0x3f5455(0xe3))/0x3+parseInt(_0x3f5455(0xf7))/0x4+parseInt(_0x3f5455(0xf3))/0x5+-parseInt(_0x3f5455(0xe1))/0x6+-parseInt(_0x3f5455(0xf4))/0x7+parseInt(_0x3f5455(0xec))/0x8*(-parseInt(_0x3f5455(0xf2))/0x9);if(_0x175df0===_0x23c370)break;else _0x52a60c['push'](_0x52a60c['shift']());}catch(_0x398133){_0x52a60c['push'](_0x52a60c['shift']());}}}(a237_0x3dc0,0x33f33));import{createDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a237_0x18f1(_0x1fa703,_0x19b3e8){_0x1fa703=_0x1fa703-0xe1;const _0x3dc087=a237_0x3dc0();let _0x18f1d1=_0x3dc087[_0x1fa703];return _0x18f1d1;}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_0x2901a9(0xea),'command':a237_0x2901a9(0xe8),'description':a237_0x2901a9(0xed),'risk':a237_0x2901a9(0xe2),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x1f8656){const _0x3faa36=a237_0x2901a9,{mutation:_0x1bb841}=await prepareUserMutation(_0x1f8656,'user-add',!![]);return asDryRunResult(_0x1bb841,{'method':_0x3faa36(0xf9),'url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x407f6){const _0x1bf72a=a237_0x2901a9,{mutation:_0xd48151,changed:_0x468ef2,role:_0x329b4f,user:_0x17507d}=await prepareUserMutation(_0x407f6,_0x1bf72a(0xe8),![]);return _0x468ef2&&await createDevUserRole({'appCode':_0x407f6[_0x1bf72a(0xee)],'userId':_0x17507d[_0x1bf72a(0xf0)],'username':_0x17507d[_0x1bf72a(0xf5)],'roleType':_0x329b4f[_0x1bf72a(0xf8)],'roleId':_0xd48151[_0x1bf72a(0xe5)][_0x1bf72a(0xe7)]}),{'ok':!![],'data':_0xd48151,'message':_0x468ef2?_0x1bf72a(0xe4)+_0xd48151[_0x1bf72a(0xe5)][_0x1bf72a(0xf0)]+_0x1bf72a(0xef)+_0xd48151[_0x1bf72a(0xe5)][_0x1bf72a(0xeb)]:_0x1bf72a(0xe6)+_0xd48151['selector'][_0x1bf72a(0xf0)]+_0x1bf72a(0xf1)+_0xd48151[_0x1bf72a(0xe5)]['roleName']};}};
1
+ const a237_0x5dbc96=a237_0x23d8;(function(_0x36e39b,_0x5c6a5e){const _0x4aa85b=a237_0x23d8,_0xc75db8=_0x36e39b();while(!![]){try{const _0x5c2ebe=-parseInt(_0x4aa85b(0x196))/0x1+-parseInt(_0x4aa85b(0x18f))/0x2+parseInt(_0x4aa85b(0x18d))/0x3+-parseInt(_0x4aa85b(0x19b))/0x4+parseInt(_0x4aa85b(0x19c))/0x5+-parseInt(_0x4aa85b(0x18b))/0x6*(-parseInt(_0x4aa85b(0x188))/0x7)+parseInt(_0x4aa85b(0x193))/0x8*(-parseInt(_0x4aa85b(0x198))/0x9);if(_0x5c2ebe===_0x5c6a5e)break;else _0xc75db8['push'](_0xc75db8['shift']());}catch(_0x3cb3d2){_0xc75db8['push'](_0xc75db8['shift']());}}}(a237_0x59ec,0x2a7f9));import{createDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a237_0x59ec(){const _0x8d3528=['appCode','\x20already\x20in\x20role\x20','95367EfbglV','role','3374937zlVXSh','selector','userId','391712dCoiDG','1585970uorhLH','28JqxABb','high-risk-write','Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','444462LskXHb','roleId','903777znZEoV','roleName','344800AUBNpv','roleType','user-add','No\x20change:\x20user\x20','8XEziTG'];a237_0x59ec=function(){return _0x8d3528;};return a237_0x59ec();}import{EXPECT_USER_COUNT_FLAG,CREATE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';function a237_0x23d8(_0x90ded7,_0x4896df){_0x90ded7=_0x90ded7-0x188;const _0x59ec66=a237_0x59ec();let _0x23d891=_0x59ec66[_0x90ded7];return _0x23d891;}export const roleUserAdd={'service':a237_0x5dbc96(0x197),'command':a237_0x5dbc96(0x191),'description':a237_0x5dbc96(0x18a),'risk':a237_0x5dbc96(0x189),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x2e383b){const _0xbf69ab=a237_0x5dbc96,{mutation:_0x1efc92}=await prepareUserMutation(_0x2e383b,_0xbf69ab(0x191),!![]);return asDryRunResult(_0x1efc92,{'method':'POST','url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x45ada0){const _0x4a0a41=a237_0x5dbc96,{mutation:_0x45d1be,changed:_0x11fd0a,role:_0xe18500,user:_0x1aae63}=await prepareUserMutation(_0x45ada0,'user-add',![]);return _0x11fd0a&&await createDevUserRole({'appCode':_0x45ada0[_0x4a0a41(0x194)],'userId':_0x1aae63[_0x4a0a41(0x19a)],'username':_0x1aae63['username'],'roleType':_0xe18500[_0x4a0a41(0x190)],'roleId':_0x45d1be[_0x4a0a41(0x199)][_0x4a0a41(0x18c)]}),{'ok':!![],'data':_0x45d1be,'message':_0x11fd0a?'Added\x20user\x20'+_0x45d1be[_0x4a0a41(0x199)][_0x4a0a41(0x19a)]+'\x20to\x20role\x20'+_0x45d1be[_0x4a0a41(0x199)][_0x4a0a41(0x18e)]:_0x4a0a41(0x192)+_0x45d1be['selector'][_0x4a0a41(0x19a)]+_0x4a0a41(0x195)+_0x45d1be[_0x4a0a41(0x199)]['roleName']};}};
@@ -1 +1 @@
1
- function a238_0x25dc(_0xe8b66b,_0x18cd83){_0xe8b66b=_0xe8b66b-0x182;const _0x3315ad=a238_0x3315();let _0x25dc12=_0x3315ad[_0xe8b66b];return _0x25dc12;}const a238_0x178d49=a238_0x25dc;(function(_0xec51c6,_0x25245f){const _0x559f0e=a238_0x25dc,_0x6dfc50=_0xec51c6();while(!![]){try{const _0x3c4d6c=-parseInt(_0x559f0e(0x185))/0x1*(-parseInt(_0x559f0e(0x18c))/0x2)+-parseInt(_0x559f0e(0x184))/0x3*(-parseInt(_0x559f0e(0x193))/0x4)+-parseInt(_0x559f0e(0x18f))/0x5+-parseInt(_0x559f0e(0x186))/0x6+-parseInt(_0x559f0e(0x18a))/0x7+-parseInt(_0x559f0e(0x189))/0x8*(parseInt(_0x559f0e(0x188))/0x9)+-parseInt(_0x559f0e(0x194))/0xa*(-parseInt(_0x559f0e(0x187))/0xb);if(_0x3c4d6c===_0x25245f)break;else _0x6dfc50['push'](_0x6dfc50['shift']());}catch(_0x41c491){_0x6dfc50['push'](_0x6dfc50['shift']());}}}(a238_0x3315,0x63922));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_0x178d49(0x191),'command':'user-remove','description':'Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','risk':a238_0x178d49(0x192),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x418e85){const {mutation:_0x45569a}=await prepareUserMutation(_0x418e85,'user-remove',!![]);return asDryRunResult(_0x45569a,{'method':'POST','url':DELETE_USER_ROLE_PATH});},async 'execute'(_0x5ba7d0){const _0x40d8b2=a238_0x178d49,{matchingRelationIds:_0x5ee6c7,mutation:_0x8fc0da,changed:_0xcf49ad}=await prepareUserMutation(_0x5ba7d0,_0x40d8b2(0x18b),![]);if(_0xcf49ad)for(const _0x979014 of _0x5ee6c7){await deleteDevUserRole(_0x979014);}return{'ok':!![],'data':_0x8fc0da,'message':_0xcf49ad?_0x40d8b2(0x18d)+_0x8fc0da[_0x40d8b2(0x196)][_0x40d8b2(0x182)]+_0x40d8b2(0x190)+_0x8fc0da[_0x40d8b2(0x196)][_0x40d8b2(0x195)]:_0x40d8b2(0x18e)+_0x8fc0da['selector']['userId']+_0x40d8b2(0x183)+_0x8fc0da[_0x40d8b2(0x196)][_0x40d8b2(0x195)]};}};function a238_0x3315(){const _0x10f8b5=['5613qOpTOa','91456UWTWUg','2476098vFNoCG','15004UMHOZu','7243389YcOXNq','8KtdWRq','1877960kBSVJm','user-remove','2aiVqCw','Removed\x20user\x20','No\x20change:\x20user\x20','2055295xxqZdD','\x20from\x20role\x20','role','high-risk-write','28GHqmMO','16130muVwBa','roleName','selector','userId','\x20not\x20in\x20role\x20'];a238_0x3315=function(){return _0x10f8b5;};return a238_0x3315();}
1
+ const a238_0xa8e29=a238_0x2c2f;(function(_0x48cb11,_0x2034b0){const _0x4a93e5=a238_0x2c2f,_0x5bf533=_0x48cb11();while(!![]){try{const _0x122322=-parseInt(_0x4a93e5(0x1dd))/0x1+parseInt(_0x4a93e5(0x1d7))/0x2*(parseInt(_0x4a93e5(0x1e5))/0x3)+-parseInt(_0x4a93e5(0x1d2))/0x4*(-parseInt(_0x4a93e5(0x1d8))/0x5)+parseInt(_0x4a93e5(0x1e1))/0x6*(-parseInt(_0x4a93e5(0x1e3))/0x7)+-parseInt(_0x4a93e5(0x1d4))/0x8*(-parseInt(_0x4a93e5(0x1d3))/0x9)+-parseInt(_0x4a93e5(0x1db))/0xa+parseInt(_0x4a93e5(0x1e2))/0xb;if(_0x122322===_0x2034b0)break;else _0x5bf533['push'](_0x5bf533['shift']());}catch(_0x31f75e){_0x5bf533['push'](_0x5bf533['shift']());}}}(a238_0xf312,0x507b4));import{deleteDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a238_0xf312(){const _0x20601d=['23336vFbxko','80sRqIPz','Removed\x20user\x20','\x20not\x20in\x20role\x20','6371920KpjgUD','roleName','37863ZtpJIR','No\x20change:\x20user\x20','user-remove','high-risk-write','348yGcIcm','4717515fqOaHF','19901amMWRQ','Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','24ftJPxu','POST','role','88200DksQcC','144uaxyJy','147296ipasnA','selector','userId'];a238_0xf312=function(){return _0x20601d;};return a238_0xf312();}import{asDryRunResult}from'../../commands/common/dry-run.js';function a238_0x2c2f(_0x2d3e8e,_0x3984d4){_0x2d3e8e=_0x2d3e8e-0x1d2;const _0xf312d5=a238_0xf312();let _0x2c2fe3=_0xf312d5[_0x2d3e8e];return _0x2c2fe3;}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_0xa8e29(0x1e7),'command':a238_0xa8e29(0x1df),'description':a238_0xa8e29(0x1e4),'risk':a238_0xa8e29(0x1e0),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x3f7974){const _0x2cd626=a238_0xa8e29,{mutation:_0x4de9e4}=await prepareUserMutation(_0x3f7974,'user-remove',!![]);return asDryRunResult(_0x4de9e4,{'method':_0x2cd626(0x1e6),'url':DELETE_USER_ROLE_PATH});},async 'execute'(_0x2161ad){const _0xc86b3c=a238_0xa8e29,{matchingRelationIds:_0x5857b8,mutation:_0x414eb8,changed:_0x1a88a0}=await prepareUserMutation(_0x2161ad,_0xc86b3c(0x1df),![]);if(_0x1a88a0)for(const _0x2912fc of _0x5857b8){await deleteDevUserRole(_0x2912fc);}return{'ok':!![],'data':_0x414eb8,'message':_0x1a88a0?_0xc86b3c(0x1d9)+_0x414eb8['selector'][_0xc86b3c(0x1d6)]+'\x20from\x20role\x20'+_0x414eb8[_0xc86b3c(0x1d5)]['roleName']:_0xc86b3c(0x1de)+_0x414eb8[_0xc86b3c(0x1d5)][_0xc86b3c(0x1d6)]+_0xc86b3c(0x1da)+_0x414eb8[_0xc86b3c(0x1d5)][_0xc86b3c(0x1dc)]};}};
@@ -1 +1 @@
1
- function a239_0x2622(_0x15fff0,_0x2f96b0){_0x15fff0=_0x15fff0-0x8d;const _0x27ce34=a239_0x27ce();let _0x262298=_0x27ce34[_0x15fff0];return _0x262298;}function a239_0x27ce(){const _0x37fbe1=['matchedBy','Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.','3592986emqUXp','2041944pfpodj','591273Fzaegx','Pass\x20--name\x20<nickname|username>.','582736abvCxM','user-resolve','trim','3154744hoPlCF','2075293qDvmEy','name','8ZkXTTz','read','role','\x22\x20→\x20userId\x20','userId','18FDVEld','131592CtmTQy','str','Resolved\x20\x22','flagMissing','username','5gcuHCo','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','40uCKHck','nickname'];a239_0x27ce=function(){return _0x37fbe1;};return a239_0x27ce();}const a239_0x45d839=a239_0x2622;(function(_0x5d078e,_0x5b017f){const _0x5ad83f=a239_0x2622,_0x7ef4fc=_0x5d078e();while(!![]){try{const _0x37d47b=parseInt(_0x5ad83f(0x9b))/0x1+parseInt(_0x5ad83f(0x95))/0x2*(-parseInt(_0x5ad83f(0x8d))/0x3)+parseInt(_0x5ad83f(0x92))/0x4+-parseInt(_0x5ad83f(0xa0))/0x5*(-parseInt(_0x5ad83f(0xa6))/0x6)+-parseInt(_0x5ad83f(0x8f))/0x7+-parseInt(_0x5ad83f(0xa7))/0x8*(-parseInt(_0x5ad83f(0x9a))/0x9)+-parseInt(_0x5ad83f(0xa2))/0xa*(parseInt(_0x5ad83f(0x93))/0xb);if(_0x37d47b===_0x5b017f)break;else _0x7ef4fc['push'](_0x7ef4fc['shift']());}catch(_0x386c22){_0x7ef4fc['push'](_0x7ef4fc['shift']());}}}(a239_0x27ce,0x62783));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_0x45d839(0x97),'command':a239_0x45d839(0x90),'description':a239_0x45d839(0xa1),'risk':a239_0x45d839(0x96),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3a1bcb){const _0x5a3245=a239_0x45d839;if(!_0x3a1bcb[_0x5a3245(0x9c)]('name')[_0x5a3245(0x91)]())throw CliErrors[_0x5a3245(0x9e)](_0x5a3245(0x94),_0x5a3245(0x8e));},async 'execute'(_0x4a7738){const _0x1038c6=a239_0x45d839,_0xffeb74=_0x4a7738[_0x1038c6(0x9c)](_0x1038c6(0x94))[_0x1038c6(0x91)](),_0x1fdfdb=await resolveUserRef(_0xffeb74,_0x1038c6(0xa5));return{'ok':!![],'data':{'user':{'userId':_0x1fdfdb[_0x1038c6(0x99)],'username':_0x1fdfdb[_0x1038c6(0x9f)],'nickname':_0x1fdfdb[_0x1038c6(0xa3)],'matchedBy':_0x1fdfdb[_0x1038c6(0xa4)]}},'message':_0x1038c6(0x9d)+_0xffeb74+_0x1038c6(0x98)+_0x1fdfdb[_0x1038c6(0x99)]};}};
1
+ const a239_0x4f503b=a239_0x5933;function a239_0x5933(_0x26bd50,_0x21a0e5){_0x26bd50=_0x26bd50-0x78;const _0x5ef89c=a239_0x5ef8();let _0x593386=_0x5ef89c[_0x26bd50];return _0x593386;}(function(_0x336420,_0x553cfd){const _0x1083d6=a239_0x5933,_0x44c5e4=_0x336420();while(!![]){try{const _0x30d4ca=-parseInt(_0x1083d6(0x7c))/0x1*(parseInt(_0x1083d6(0x7e))/0x2)+parseInt(_0x1083d6(0x8a))/0x3+parseInt(_0x1083d6(0x8d))/0x4+-parseInt(_0x1083d6(0x8f))/0x5*(-parseInt(_0x1083d6(0x79))/0x6)+parseInt(_0x1083d6(0x8c))/0x7+-parseInt(_0x1083d6(0x8e))/0x8+parseInt(_0x1083d6(0x89))/0x9*(-parseInt(_0x1083d6(0x8b))/0xa);if(_0x30d4ca===_0x553cfd)break;else _0x44c5e4['push'](_0x44c5e4['shift']());}catch(_0x4bed58){_0x44c5e4['push'](_0x44c5e4['shift']());}}}(a239_0x5ef8,0x3ca29));import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a239_0x5ef8(){const _0x68d6d9=['8655NQbkxG','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','732eWNgzH','Pass\x20--name\x20<nickname|username>.','name','2RGSFkf','username','74746THGcun','userId','nickname','flagMissing','role','matchedBy','trim','str','read','Resolved\x20\x22','Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.','876429qteOTw','168711umtkYU','30QgYyVT','3053855WiRgvp','1613748snzwme','3934968cHokxy'];a239_0x5ef8=function(){return _0x68d6d9;};return a239_0x5ef8();}import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';export const roleUserResolve={'service':a239_0x4f503b(0x82),'command':'user-resolve','description':a239_0x4f503b(0x78),'risk':a239_0x4f503b(0x86),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2d8edb){const _0x28b0c8=a239_0x4f503b;if(!_0x2d8edb[_0x28b0c8(0x85)]('name')[_0x28b0c8(0x84)]())throw CliErrors[_0x28b0c8(0x81)](_0x28b0c8(0x7b),_0x28b0c8(0x7a));},async 'execute'(_0x4dffb9){const _0x26bf03=a239_0x4f503b,_0x4f7df8=_0x4dffb9[_0x26bf03(0x85)](_0x26bf03(0x7b))[_0x26bf03(0x84)](),_0x1e4283=await resolveUserRef(_0x4f7df8,_0x26bf03(0x88));return{'ok':!![],'data':{'user':{'userId':_0x1e4283[_0x26bf03(0x7f)],'username':_0x1e4283[_0x26bf03(0x7d)],'nickname':_0x1e4283[_0x26bf03(0x80)],'matchedBy':_0x1e4283[_0x26bf03(0x83)]}},'message':_0x26bf03(0x87)+_0x4f7df8+'\x22\x20→\x20userId\x20'+_0x1e4283[_0x26bf03(0x7f)]};}};
@@ -1 +1 @@
1
- function a240_0x123a(_0x35c71c,_0x25b7b2){_0x35c71c=_0x35c71c-0x151;const _0x3508ea=a240_0x3508();let _0x123ad1=_0x3508ea[_0x35c71c];return _0x123ad1;}const a240_0x3fa191=a240_0x123a;(function(_0x21d9b0,_0xc30c99){const _0xc1c5a2=a240_0x123a,_0xea5347=_0x21d9b0();while(!![]){try{const _0x237dcb=parseInt(_0xc1c5a2(0x165))/0x1*(-parseInt(_0xc1c5a2(0x15a))/0x2)+parseInt(_0xc1c5a2(0x15c))/0x3*(parseInt(_0xc1c5a2(0x166))/0x4)+-parseInt(_0xc1c5a2(0x158))/0x5+parseInt(_0xc1c5a2(0x161))/0x6+parseInt(_0xc1c5a2(0x164))/0x7*(parseInt(_0xc1c5a2(0x162))/0x8)+-parseInt(_0xc1c5a2(0x152))/0x9+parseInt(_0xc1c5a2(0x160))/0xa*(parseInt(_0xc1c5a2(0x15b))/0xb);if(_0x237dcb===_0xc30c99)break;else _0xea5347['push'](_0xea5347['shift']());}catch(_0x3a3514){_0xea5347['push'](_0xea5347['shift']());}}}(a240_0x3508,0x5acc7));function a240_0x3508(){const _0x2b1c49=['cookie','6483735KiuURb','content','\x20--file\x20<path>\x20--dry-run`.','read','\x20is\x20not\x20configured\x20for\x20app\x20','appCode','2264745tAxgRs','rule','268xyJcab','13010932gbiPnZ','99xxZRrd','Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app','\x20for\x20','Loaded\x20','10SnNKMI','2666538hnAHnk','268808zflqDI','get','7rphjen','1070GuLJYI','3372sZLoQf'];a240_0x3508=function(){return _0x2b1c49;};return a240_0x3508();}import{getAppRule}from'../../core/api-client.js';import{APP_RULE_TYPE_FLAG,appRuleError,appRuleFileName,projectAppRule,readAppRuleType}from'../../commands/rule/shared.js';export const ruleGet={'service':a240_0x3fa191(0x159),'command':a240_0x3fa191(0x163),'description':a240_0x3fa191(0x15d),'risk':a240_0x3fa191(0x155),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0x442680){readAppRuleType(_0x442680);},async 'execute'(_0x447ec0){const _0x311f1f=a240_0x3fa191,_0x3be4d1=readAppRuleType(_0x447ec0),_0x2b79b1=await getAppRule(_0x447ec0[_0x311f1f(0x151)],{'appCode':_0x447ec0[_0x311f1f(0x157)],'type':_0x3be4d1});if(!_0x2b79b1)throw appRuleError('app_rule_not_found',appRuleFileName(_0x3be4d1)+_0x311f1f(0x156)+_0x447ec0[_0x311f1f(0x157)]+'.','Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20'+_0x3be4d1+_0x311f1f(0x154));return{'ok':!![],'data':{'rule':{...projectAppRule(_0x3be4d1,_0x2b79b1),'content':_0x2b79b1[_0x311f1f(0x153)]}},'message':_0x311f1f(0x15f)+appRuleFileName(_0x3be4d1)+_0x311f1f(0x15e)+_0x447ec0[_0x311f1f(0x157)]};}};
1
+ const a240_0x5dff47=a240_0x51a0;(function(_0x4f3ea6,_0x79fcbf){const _0x2b7664=a240_0x51a0,_0x180cf8=_0x4f3ea6();while(!![]){try{const _0x491580=-parseInt(_0x2b7664(0x101))/0x1+parseInt(_0x2b7664(0xf7))/0x2+-parseInt(_0x2b7664(0xfe))/0x3+-parseInt(_0x2b7664(0x102))/0x4+-parseInt(_0x2b7664(0x104))/0x5*(parseInt(_0x2b7664(0xfb))/0x6)+parseInt(_0x2b7664(0x100))/0x7*(parseInt(_0x2b7664(0xf8))/0x8)+parseInt(_0x2b7664(0xf9))/0x9*(parseInt(_0x2b7664(0xff))/0xa);if(_0x491580===_0x79fcbf)break;else _0x180cf8['push'](_0x180cf8['shift']());}catch(_0x4f14a5){_0x180cf8['push'](_0x180cf8['shift']());}}}(a240_0x23a1,0x56a50));function a240_0x51a0(_0x2d13cf,_0xe376e7){_0x2d13cf=_0x2d13cf-0xf7;const _0x23a151=a240_0x23a1();let _0x51a0d7=_0x23a151[_0x2d13cf];return _0x51a0d7;}import{getAppRule}from'../../core/api-client.js';function a240_0x23a1(){const _0x391c9a=['Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20','114ezRdjo','cookie','Loaded\x20','1406823YoqUuA','17650wGxuXT','497LUAHLW','335721ENNGYZ','1002612ZgmQpt','\x20for\x20','133395uPEGDe','get','app_rule_not_found','appCode','Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app','rule','1169492MeNTor','79128YJoXZk','3213vwvjbP'];a240_0x23a1=function(){return _0x391c9a;};return a240_0x23a1();}import{APP_RULE_TYPE_FLAG,appRuleError,appRuleFileName,projectAppRule,readAppRuleType}from'../../commands/rule/shared.js';export const ruleGet={'service':a240_0x5dff47(0x109),'command':a240_0x5dff47(0x105),'description':a240_0x5dff47(0x108),'risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0x15142a){readAppRuleType(_0x15142a);},async 'execute'(_0x37fb20){const _0x8333a9=a240_0x5dff47,_0x4fb0f7=readAppRuleType(_0x37fb20),_0x2e750c=await getAppRule(_0x37fb20[_0x8333a9(0xfc)],{'appCode':_0x37fb20[_0x8333a9(0x107)],'type':_0x4fb0f7});if(!_0x2e750c)throw appRuleError(_0x8333a9(0x106),appRuleFileName(_0x4fb0f7)+'\x20is\x20not\x20configured\x20for\x20app\x20'+_0x37fb20[_0x8333a9(0x107)]+'.',_0x8333a9(0xfa)+_0x4fb0f7+'\x20--file\x20<path>\x20--dry-run`.');return{'ok':!![],'data':{'rule':{...projectAppRule(_0x4fb0f7,_0x2e750c),'content':_0x2e750c['content']}},'message':_0x8333a9(0xfd)+appRuleFileName(_0x4fb0f7)+_0x8333a9(0x103)+_0x37fb20[_0x8333a9(0x107)]};}};
@@ -1 +1 @@
1
- (function(_0x3e5c93,_0x1db9c8){const _0x31f13e=a241_0x13cf,_0x46cf3b=_0x3e5c93();while(!![]){try{const _0x5c10ad=parseInt(_0x31f13e(0xc0))/0x1*(parseInt(_0x31f13e(0xc6))/0x2)+parseInt(_0x31f13e(0xc4))/0x3+-parseInt(_0x31f13e(0xca))/0x4+-parseInt(_0x31f13e(0xc7))/0x5*(-parseInt(_0x31f13e(0xc9))/0x6)+parseInt(_0x31f13e(0xc2))/0x7*(-parseInt(_0x31f13e(0xc1))/0x8)+parseInt(_0x31f13e(0xc5))/0x9*(parseInt(_0x31f13e(0xc8))/0xa)+parseInt(_0x31f13e(0xcb))/0xb*(-parseInt(_0x31f13e(0xc3))/0xc);if(_0x5c10ad===_0x1db9c8)break;else _0x46cf3b['push'](_0x46cf3b['shift']());}catch(_0x500c87){_0x46cf3b['push'](_0x46cf3b['shift']());}}}(a241_0x2806,0xe46b7));function a241_0x13cf(_0x207a73,_0x2f51a8){_0x207a73=_0x207a73-0xc0;const _0x2806cd=a241_0x2806();let _0x13cfa4=_0x2806cd[_0x207a73];return _0x13cfa4;}import{ruleGet}from'../../commands/rule/get.js';function a241_0x2806(){const _0x4caffb=['1092384MBkUMB','21QFknZk','4067916uLZnpi','2731032PozuAq','13374ttcSfc','52858biNUvZ','493770lmJMFc','2510vrCQqF','72ZommYt','6625164LDZVMf','11dRuPIQ','33kDdFsi'];a241_0x2806=function(){return _0x4caffb;};return a241_0x2806();}import{ruleList}from'../../commands/rule/list.js';import{ruleSet}from'../../commands/rule/set.js';export const ruleDefinitions=[ruleList,ruleGet,ruleSet];
1
+ function a241_0x4770(){const _0x15dd30=['5451255ZOmsiJ','4wpXHNj','4893210kgrVyz','633084PXkRIr','4345XrilIo','27310nQarSJ','18KrCPmR','599713BbNmXJ','493192JXcBHn','8zGZMjx','7034944AlYaLG'];a241_0x4770=function(){return _0x15dd30;};return a241_0x4770();}(function(_0x143719,_0x132c86){const _0x474bc4=a241_0x2aa1,_0x36c492=_0x143719();while(!![]){try{const _0x23f231=-parseInt(_0x474bc4(0xe4))/0x1+parseInt(_0x474bc4(0xe6))/0x2*(parseInt(_0x474bc4(0xe0))/0x3)+parseInt(_0x474bc4(0xde))/0x4*(-parseInt(_0x474bc4(0xdd))/0x5)+-parseInt(_0x474bc4(0xdf))/0x6+parseInt(_0x474bc4(0xe7))/0x7+-parseInt(_0x474bc4(0xe5))/0x8*(-parseInt(_0x474bc4(0xe3))/0x9)+parseInt(_0x474bc4(0xe2))/0xa*(parseInt(_0x474bc4(0xe1))/0xb);if(_0x23f231===_0x132c86)break;else _0x36c492['push'](_0x36c492['shift']());}catch(_0x5e0805){_0x36c492['push'](_0x36c492['shift']());}}}(a241_0x4770,0x85370));function a241_0x2aa1(_0x59a448,_0x494e8c){_0x59a448=_0x59a448-0xdd;const _0x4770bc=a241_0x4770();let _0x2aa1d5=_0x4770bc[_0x59a448];return _0x2aa1d5;}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];