@lovrabet/rabetbase-cli 2.5.10 → 2.5.11

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 (376) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/detail.js +1 -1
  26. package/lib/commands/app/index.js +1 -1
  27. package/lib/commands/app/list.js +1 -1
  28. package/lib/commands/app/members-list.js +1 -1
  29. package/lib/commands/app/remote-directory.js +1 -1
  30. package/lib/commands/app/shared.js +1 -1
  31. package/lib/commands/app-config/delete.js +1 -1
  32. package/lib/commands/app-config/get.js +1 -1
  33. package/lib/commands/app-config/index.js +1 -1
  34. package/lib/commands/app-config/list.js +1 -1
  35. package/lib/commands/app-config/set.js +1 -1
  36. package/lib/commands/app-config/shared.js +1 -1
  37. package/lib/commands/auth/index.js +1 -1
  38. package/lib/commands/bff/create.js +1 -1
  39. package/lib/commands/bff/delete.js +1 -1
  40. package/lib/commands/bff/detail.js +1 -1
  41. package/lib/commands/bff/index.js +1 -1
  42. package/lib/commands/bff/list.js +1 -1
  43. package/lib/commands/bff/logs.js +1 -1
  44. package/lib/commands/bff/pull.js +1 -1
  45. package/lib/commands/bff/push.js +1 -1
  46. package/lib/commands/bff/status.js +1 -1
  47. package/lib/commands/cli-skill/index.js +1 -1
  48. package/lib/commands/cli-update.js +1 -1
  49. package/lib/commands/codegen/index.js +1 -1
  50. package/lib/commands/codegen/sdk.js +1 -1
  51. package/lib/commands/codegen/sql.js +1 -1
  52. package/lib/commands/common/app-registry.js +1 -1
  53. package/lib/commands/common/app-selector.js +1 -1
  54. package/lib/commands/common/async-task.js +1 -1
  55. package/lib/commands/common/dry-run.js +1 -1
  56. package/lib/commands/common/flags.js +1 -1
  57. package/lib/commands/common/local-file.js +1 -1
  58. package/lib/commands/common/validate.js +1 -1
  59. package/lib/commands/config/delete.js +1 -1
  60. package/lib/commands/config/get.js +1 -1
  61. package/lib/commands/config/index.js +1 -1
  62. package/lib/commands/config/init.js +1 -1
  63. package/lib/commands/config/list.js +1 -1
  64. package/lib/commands/config/set.js +1 -1
  65. package/lib/commands/config/shared.js +1 -1
  66. package/lib/commands/dataset/batch-design.js +1 -1
  67. package/lib/commands/dataset/business-group-update.js +1 -1
  68. package/lib/commands/dataset/business-groups.js +1 -1
  69. package/lib/commands/dataset/capability.js +1 -1
  70. package/lib/commands/dataset/cross-relation-create.js +1 -1
  71. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  72. package/lib/commands/dataset/cross-relation-list.js +1 -1
  73. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  74. package/lib/commands/dataset/cross-relation-update.js +1 -1
  75. package/lib/commands/dataset/delete.js +1 -1
  76. package/lib/commands/dataset/design-context.js +1 -1
  77. package/lib/commands/dataset/design-start.js +1 -1
  78. package/lib/commands/dataset/design-status.js +1 -1
  79. package/lib/commands/dataset/design-sync-retry.js +1 -1
  80. package/lib/commands/dataset/design-sync-status.js +1 -1
  81. package/lib/commands/dataset/design-validate.js +1 -1
  82. package/lib/commands/dataset/detail.js +1 -1
  83. package/lib/commands/dataset/extend-update.js +1 -1
  84. package/lib/commands/dataset/field-restore.js +1 -1
  85. package/lib/commands/dataset/field-update.js +1 -1
  86. package/lib/commands/dataset/generate.js +1 -1
  87. package/lib/commands/dataset/index.js +1 -1
  88. package/lib/commands/dataset/list.js +1 -1
  89. package/lib/commands/dataset/operations.js +1 -1
  90. package/lib/commands/dataset/relation-audit.js +1 -1
  91. package/lib/commands/dataset/relation-create.js +1 -1
  92. package/lib/commands/dataset/relation-delete.js +1 -1
  93. package/lib/commands/dataset/relation-shared.js +1 -1
  94. package/lib/commands/dataset/relation-update.js +1 -1
  95. package/lib/commands/dataset/relations.js +1 -1
  96. package/lib/commands/dataset/rename.js +1 -1
  97. package/lib/commands/dataset/restore.js +1 -1
  98. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  99. package/lib/commands/db/analysis-batching.js +1 -1
  100. package/lib/commands/db/analyze-batch-plan.js +1 -1
  101. package/lib/commands/db/analyze-cancel.js +1 -1
  102. package/lib/commands/db/analyze-start.js +1 -1
  103. package/lib/commands/db/analyze-status.js +1 -1
  104. package/lib/commands/db/create.js +1 -1
  105. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  106. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  107. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  109. package/lib/commands/db/delete.js +1 -1
  110. package/lib/commands/db/detail.js +1 -1
  111. package/lib/commands/db/diff-refresh-start.js +1 -1
  112. package/lib/commands/db/diff-refresh-status.js +1 -1
  113. package/lib/commands/db/diff.js +1 -1
  114. package/lib/commands/db/index.js +1 -1
  115. package/lib/commands/db/list.js +1 -1
  116. package/lib/commands/db/shared.js +1 -1
  117. package/lib/commands/db/table-diff-shared.js +1 -1
  118. package/lib/commands/db/tables.js +1 -1
  119. package/lib/commands/db/test.js +1 -1
  120. package/lib/commands/db/update.js +1 -1
  121. package/lib/commands/deployment/index.js +1 -1
  122. package/lib/commands/deployment/sync-all.js +1 -1
  123. package/lib/commands/deployment/sync-jobs.js +1 -1
  124. package/lib/commands/deployment/sync-status.js +1 -1
  125. package/lib/commands/doctor.js +1 -1
  126. package/lib/commands/file/index.js +1 -1
  127. package/lib/commands/flow/create.js +1 -1
  128. package/lib/commands/flow/detail.js +1 -1
  129. package/lib/commands/flow/index.js +1 -1
  130. package/lib/commands/flow/list.js +1 -1
  131. package/lib/commands/flow/page-list.js +1 -1
  132. package/lib/commands/flow/publish.js +1 -1
  133. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  134. package/lib/commands/flow/runtime-role-list.js +1 -1
  135. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  136. package/lib/commands/flow/runtime-user-search.js +1 -1
  137. package/lib/commands/flow/shared.js +1 -1
  138. package/lib/commands/flow/update.js +1 -1
  139. package/lib/commands/flow/validate.js +1 -1
  140. package/lib/commands/instant-api-policy/current.js +1 -1
  141. package/lib/commands/instant-api-policy/index.js +1 -1
  142. package/lib/commands/instant-api-policy/init.js +1 -1
  143. package/lib/commands/instant-api-policy/publish.js +1 -1
  144. package/lib/commands/instant-api-policy/pull.js +1 -1
  145. package/lib/commands/instant-api-policy/revision.js +1 -1
  146. package/lib/commands/instant-api-policy/revisions.js +1 -1
  147. package/lib/commands/instant-api-policy/rollback.js +1 -1
  148. package/lib/commands/instant-api-policy/shared.js +1 -1
  149. package/lib/commands/instant-api-policy/validate.js +1 -1
  150. package/lib/commands/issue/context.js +1 -1
  151. package/lib/commands/issue/index.js +1 -1
  152. package/lib/commands/issue/nudge.js +1 -1
  153. package/lib/commands/issue/report.js +1 -1
  154. package/lib/commands/kb/create.js +1 -1
  155. package/lib/commands/kb/delete.js +1 -1
  156. package/lib/commands/kb/detail.js +1 -1
  157. package/lib/commands/kb/index.js +1 -1
  158. package/lib/commands/kb/list.js +1 -1
  159. package/lib/commands/kb/search.js +1 -1
  160. package/lib/commands/kb/shared.js +1 -1
  161. package/lib/commands/kb/update.js +1 -1
  162. package/lib/commands/logs/index.js +1 -1
  163. package/lib/commands/menu/asset-update.js +1 -1
  164. package/lib/commands/menu/delete.js +1 -1
  165. package/lib/commands/menu/external-link-create.js +1 -1
  166. package/lib/commands/menu/external-link-update.js +1 -1
  167. package/lib/commands/menu/group-create.js +1 -1
  168. package/lib/commands/menu/group-update.js +1 -1
  169. package/lib/commands/menu/index.js +1 -1
  170. package/lib/commands/menu/list.js +1 -1
  171. package/lib/commands/menu/move.js +1 -1
  172. package/lib/commands/menu/regroup-start.js +1 -1
  173. package/lib/commands/menu/rename.js +1 -1
  174. package/lib/commands/menu/shared/compare-table.js +1 -1
  175. package/lib/commands/menu/shared/delete-plan.js +1 -1
  176. package/lib/commands/menu/shared/facts.js +1 -1
  177. package/lib/commands/menu/shared/index.js +1 -1
  178. package/lib/commands/menu/shared/inquirer.js +1 -1
  179. package/lib/commands/menu/shared/local-pages.js +1 -1
  180. package/lib/commands/menu/shared/logic.js +1 -1
  181. package/lib/commands/menu/shared/mutations.js +1 -1
  182. package/lib/commands/menu/shared/path.js +1 -1
  183. package/lib/commands/menu/shared/service.js +1 -1
  184. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  185. package/lib/commands/menu/shared/sync-core.js +1 -1
  186. package/lib/commands/menu/shared/update-core.js +1 -1
  187. package/lib/commands/menu/shared/valid-url.js +1 -1
  188. package/lib/commands/menu/subapp-assets-status.js +1 -1
  189. package/lib/commands/menu/subapp-assets-update.js +1 -1
  190. package/lib/commands/menu/sync.js +1 -1
  191. package/lib/commands/menu/visibility-update.js +1 -1
  192. package/lib/commands/notification/config-create.js +1 -1
  193. package/lib/commands/notification/config-delete.js +1 -1
  194. package/lib/commands/notification/config-list.js +1 -1
  195. package/lib/commands/notification/config-update.js +1 -1
  196. package/lib/commands/notification/index.js +1 -1
  197. package/lib/commands/notification/shared.js +1 -1
  198. package/lib/commands/ocr/index.js +1 -1
  199. package/lib/commands/page/create.js +1 -1
  200. package/lib/commands/page/custom/detail.js +1 -1
  201. package/lib/commands/page/custom/list.js +1 -1
  202. package/lib/commands/page/custom/publish.js +1 -1
  203. package/lib/commands/page/custom/shared.js +1 -1
  204. package/lib/commands/page/custom/syntax.js +1 -1
  205. package/lib/commands/page/custom/update.js +1 -1
  206. package/lib/commands/page/data-list-status.js +1 -1
  207. package/lib/commands/page/generate-start.js +1 -1
  208. package/lib/commands/page/generate-status.js +1 -1
  209. package/lib/commands/page/index.js +1 -1
  210. package/lib/commands/page/pull.js +1 -1
  211. package/lib/commands/page/push.js +1 -1
  212. package/lib/commands/page/relation-audit.js +1 -1
  213. package/lib/commands/page/restore.js +1 -1
  214. package/lib/commands/page/shared.js +1 -1
  215. package/lib/commands/page/sync.js +1 -1
  216. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  217. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  218. package/lib/commands/project/create/format-elapsed.js +1 -1
  219. package/lib/commands/project/create/main.js +1 -1
  220. package/lib/commands/project/create/materialize-project-template.js +1 -1
  221. package/lib/commands/project/create/project-name.js +1 -1
  222. package/lib/commands/project/create/project-template-archive.js +1 -1
  223. package/lib/commands/project/create/project-template-path.js +1 -1
  224. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  225. package/lib/commands/project/create/use-format-code.js +1 -1
  226. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  227. package/lib/commands/project/domain-routing-sync.js +1 -1
  228. package/lib/commands/project/index.js +1 -1
  229. package/lib/commands/project/upgrade.js +1 -1
  230. package/lib/commands/registry.js +1 -1
  231. package/lib/commands/role/delete.js +1 -1
  232. package/lib/commands/role/detail.js +1 -1
  233. package/lib/commands/role/index.js +1 -1
  234. package/lib/commands/role/list.js +1 -1
  235. package/lib/commands/role/shared.js +1 -1
  236. package/lib/commands/role/update.js +1 -1
  237. package/lib/commands/role/user-add.js +1 -1
  238. package/lib/commands/role/user-remove.js +1 -1
  239. package/lib/commands/role/user-resolve.js +1 -1
  240. package/lib/commands/rule/get.js +1 -1
  241. package/lib/commands/rule/index.js +1 -1
  242. package/lib/commands/rule/list.js +1 -1
  243. package/lib/commands/rule/set.js +1 -1
  244. package/lib/commands/rule/shared.js +1 -1
  245. package/lib/commands/run/index.js +1 -1
  246. package/lib/commands/schema.js +1 -1
  247. package/lib/commands/sql/create.js +1 -1
  248. package/lib/commands/sql/delete.js +1 -1
  249. package/lib/commands/sql/detail.js +1 -1
  250. package/lib/commands/sql/exec.js +1 -1
  251. package/lib/commands/sql/index.js +1 -1
  252. package/lib/commands/sql/list.js +1 -1
  253. package/lib/commands/sql/pull.js +1 -1
  254. package/lib/commands/sql/push.js +1 -1
  255. package/lib/commands/sql/shared.js +1 -1
  256. package/lib/commands/sql/status.js +1 -1
  257. package/lib/commands/sql/validate.js +1 -1
  258. package/lib/commands/task/index.js +1 -1
  259. package/lib/commands/task/status.js +1 -1
  260. package/lib/commands/tenant/index.js +1 -1
  261. package/lib/commands/tenant/members-list.js +1 -1
  262. package/lib/commands/tenant/shared.js +1 -1
  263. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  264. package/lib/commands/user-account/feishu-bind.js +1 -1
  265. package/lib/commands/user-account/index.js +1 -1
  266. package/lib/commands/workspace/add.js +1 -1
  267. package/lib/commands/workspace/index.js +1 -1
  268. package/lib/commands/workspace/remove.js +1 -1
  269. package/lib/config/domain-config.js +1 -1
  270. package/lib/config/project-domain-routing.js +1 -1
  271. package/lib/config/region-config.js +1 -1
  272. package/lib/config/schema.js +1 -1
  273. package/lib/constant/cdn.js +1 -1
  274. package/lib/constant/cli.js +1 -1
  275. package/lib/constant/defaults.js +1 -1
  276. package/lib/constant/domain.js +1 -1
  277. package/lib/constant/env.js +1 -1
  278. package/lib/constant/output.js +1 -1
  279. package/lib/constant/paths.js +1 -1
  280. package/lib/constant/region.js +1 -1
  281. package/lib/constant/risk.js +1 -1
  282. package/lib/constant/routing-profile.js +1 -1
  283. package/lib/context/app-resolver.js +1 -1
  284. package/lib/context/auth-resolver.js +1 -1
  285. package/lib/context/config-loader.js +1 -1
  286. package/lib/context.js +1 -1
  287. package/lib/core/alias-resolver.js +1 -1
  288. package/lib/core/api-client.js +1 -1
  289. package/lib/core/bff/config.js +1 -1
  290. package/lib/core/bff/file-system.js +1 -1
  291. package/lib/core/bff/hash.js +1 -1
  292. package/lib/core/bff/hook-directory.js +1 -1
  293. package/lib/core/bff/lock.js +1 -1
  294. package/lib/core/bff/utils.js +1 -1
  295. package/lib/core/cross-db-analysis.js +1 -1
  296. package/lib/core/cross-db-relation.js +1 -1
  297. package/lib/core/db-resolver.js +1 -1
  298. package/lib/core/flow-config.js +1 -1
  299. package/lib/core/instant-api-policy/config.js +1 -1
  300. package/lib/core/instant-api-policy/endpoints.js +1 -1
  301. package/lib/core/kb-management-client.js +1 -1
  302. package/lib/core/kb-search-client.js +1 -1
  303. package/lib/core/page/file-system.js +1 -1
  304. package/lib/core/page/hash.js +1 -1
  305. package/lib/core/page/lock.js +1 -1
  306. package/lib/core/page/lr-smart-jsx.js +1 -1
  307. package/lib/core/sql-index-auditor.js +1 -1
  308. package/lib/core/sql-sync/config.js +1 -1
  309. package/lib/core/sql-sync/file-system.js +1 -1
  310. package/lib/core/sql-sync/hash.js +1 -1
  311. package/lib/core/sql-sync/lock.js +1 -1
  312. package/lib/core/sql-sync/utils.js +1 -1
  313. package/lib/core/sql-validator.js +1 -1
  314. package/lib/errors.js +1 -1
  315. package/lib/framework/build-all-flags.js +1 -1
  316. package/lib/framework/error-output.js +1 -1
  317. package/lib/framework/explicit-yes.js +1 -1
  318. package/lib/framework/flags.js +1 -1
  319. package/lib/framework/help.js +1 -1
  320. package/lib/framework/index.js +1 -1
  321. package/lib/framework/output.js +1 -1
  322. package/lib/framework/response.js +1 -1
  323. package/lib/framework/runner-alias.js +1 -1
  324. package/lib/framework/runner.js +1 -1
  325. package/lib/framework/schema-export.js +1 -1
  326. package/lib/framework/supported-flags.js +1 -1
  327. package/lib/framework/types.js +1 -1
  328. package/lib/generated/build-info.d.ts +4 -4
  329. package/lib/generated/build-info.js +1 -1
  330. package/lib/generated/official-routing.js +1 -1
  331. package/lib/generated/routing-contract.js +1 -1
  332. package/lib/help.js +1 -1
  333. package/lib/postinstall.js +1 -1
  334. package/lib/runtime/confirmation.js +1 -1
  335. package/lib/runtime/event.js +1 -1
  336. package/lib/runtime/index.js +1 -1
  337. package/lib/runtime/queue.js +1 -1
  338. package/lib/runtime/resolve.js +1 -1
  339. package/lib/services/dataset-design/checkpoint.js +1 -1
  340. package/lib/services/dataset-design/commands.js +1 -1
  341. package/lib/services/dataset-design/contract.js +1 -1
  342. package/lib/skills/builtin-skill.js +1 -1
  343. package/lib/skills/main.js +1 -1
  344. package/lib/skills/npx-skills-add.js +1 -1
  345. package/lib/skills/skill-presence.js +1 -1
  346. package/lib/telemetry/cli-command-trace.js +1 -1
  347. package/lib/telemetry/cli-help-trace.js +1 -1
  348. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  349. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  350. package/lib/telemetry/send-cli-trace-log.js +1 -1
  351. package/lib/utils/ai_config.js +1 -1
  352. package/lib/utils/apply-jq-filter.js +1 -1
  353. package/lib/utils/cdn-config.js +1 -1
  354. package/lib/utils/check-sdk-version.js +1 -1
  355. package/lib/utils/cli-version-check.js +1 -1
  356. package/lib/utils/cli-version-policy.js +1 -1
  357. package/lib/utils/config.js +1 -1
  358. package/lib/utils/entity-with-id.js +1 -1
  359. package/lib/utils/file-utils.js +1 -1
  360. package/lib/utils/guides-cdn.js +1 -1
  361. package/lib/utils/http-client.js +1 -1
  362. package/lib/utils/is-non-interactive.js +1 -1
  363. package/lib/utils/logger.js +1 -1
  364. package/lib/utils/params.js +1 -1
  365. package/lib/utils/platform.js +1 -1
  366. package/lib/utils/sleep.js +1 -1
  367. package/lib/utils/template-replacer.js +1 -1
  368. package/lib/utils/update-notice.js +1 -1
  369. package/lib/utils/version.js +1 -1
  370. package/lib/utils/with-active-cookie.js +1 -1
  371. package/lib/utils/write-cli-side-channel.js +1 -1
  372. package/package.json +1 -1
  373. package/skills/rabetbase/SKILL.md +1 -1
  374. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  375. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  376. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- (function(_0x2c3b7c,_0x24f3e1){const _0x284916=a225_0x5efb,_0x52e502=_0x2c3b7c();while(!![]){try{const _0x1980e0=parseInt(_0x284916(0xbc))/0x1*(-parseInt(_0x284916(0xb0))/0x2)+parseInt(_0x284916(0xc0))/0x3*(-parseInt(_0x284916(0xb2))/0x4)+parseInt(_0x284916(0xb5))/0x5*(-parseInt(_0x284916(0xb7))/0x6)+-parseInt(_0x284916(0xb8))/0x7+parseInt(_0x284916(0xc6))/0x8+-parseInt(_0x284916(0xb9))/0x9+parseInt(_0x284916(0xc2))/0xa*(parseInt(_0x284916(0xc5))/0xb);if(_0x1980e0===_0x24f3e1)break;else _0x52e502['push'](_0x52e502['shift']());}catch(_0x52419d){_0x52e502['push'](_0x52e502['shift']());}}}(a225_0x5e49,0x705d4));function a225_0x5efb(_0x2c2a48,_0x188f81){_0x2c2a48=_0x2c2a48-0xb0;const _0x5e495d=a225_0x5e49();let _0x5efb3f=_0x5e495d[_0x2c2a48];return _0x5efb3f;}function a225_0x5e49(){const _0x2532c0=['resolve','--write','147945OMnkta','message','6sicxXm','3273620MsSHgZ','7383438zzDxWZ','npx','error','23492DHDDUd','Starting\x20code\x20format','Code\x20format\x20failed','now','4269pmxeCa','prettier','1094560TWsHdo','info','cwd','165jkrMDw','4805856KIVljA','14YsShhE','Code\x20format\x20completed','844Vamghq'];a225_0x5e49=function(){return _0x2532c0;};return a225_0x5e49();}import a225_0x5bd653 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 formatProjectCode(_0x3df36a){const _0xbb990a=a225_0x5efb,_0x7d071f=Date['now'](),_0x1e296b=a225_0x5bd653[_0xbb990a(0xb3)](process[_0xbb990a(0xc4)](),_0x3df36a);try{logger[_0xbb990a(0xc3)]('format',_0xbb990a(0xbd),{'projectCode':_0x3df36a}),await execa(resolveNpmBin(_0xbb990a(0xba)),[_0xbb990a(0xc1),_0xbb990a(0xb4),'.'],{'cwd':_0x1e296b});const _0x26971d=Date[_0xbb990a(0xbf)]()-_0x7d071f;logger['success']('format',_0xbb990a(0xb1),_0x26971d,{'projectCode':_0x3df36a});}catch(_0x2a514b){const _0x23a276=Date[_0xbb990a(0xbf)]()-_0x7d071f;logger[_0xbb990a(0xbb)]('format',_0xbb990a(0xbe),{'projectCode':_0x3df36a,'error':_0x2a514b instanceof Error?_0x2a514b[_0xbb990a(0xb6)]:String(_0x2a514b),'duration':_0x23a276});throw _0x2a514b;}return formatElapsed(_0x7d071f);}
1
+ (function(_0x2a8c08,_0x2627cf){const _0x10dbeb=a225_0x4a45,_0xf4c7cb=_0x2a8c08();while(!![]){try{const _0x587476=-parseInt(_0x10dbeb(0xd5))/0x1+parseInt(_0x10dbeb(0xd3))/0x2+-parseInt(_0x10dbeb(0xd8))/0x3+parseInt(_0x10dbeb(0xdb))/0x4+parseInt(_0x10dbeb(0xd0))/0x5+parseInt(_0x10dbeb(0xd4))/0x6*(-parseInt(_0x10dbeb(0xdd))/0x7)+parseInt(_0x10dbeb(0xde))/0x8*(parseInt(_0x10dbeb(0xd6))/0x9);if(_0x587476===_0x2627cf)break;else _0xf4c7cb['push'](_0xf4c7cb['shift']());}catch(_0x4a7f1b){_0xf4c7cb['push'](_0xf4c7cb['shift']());}}}(a225_0x175c,0xc251d));import a225_0x57dbc6 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 a225_0x175c(){const _0x154ba0=['message','npx','1677196RWLWub','resolve','35INbamd','16jIjyAO','Code\x20format\x20failed','success','error','format','2766160rMbpfT','now','cwd','129336tGSkpV','1727640tcxTdT','136691hTXiyA','6898149DdzQKm','Code\x20format\x20completed','593391zgTtAE'];a225_0x175c=function(){return _0x154ba0;};return a225_0x175c();}function a225_0x4a45(_0x56c216,_0x5e4e96){_0x56c216=_0x56c216-0xcc;const _0x175c28=a225_0x175c();let _0x4a4517=_0x175c28[_0x56c216];return _0x4a4517;}export async function formatProjectCode(_0x1c2961){const _0x5b76a7=a225_0x4a45,_0xfd3293=Date[_0x5b76a7(0xd1)](),_0x4aefa1=a225_0x57dbc6[_0x5b76a7(0xdc)](process[_0x5b76a7(0xd2)](),_0x1c2961);try{logger['info'](_0x5b76a7(0xcf),'Starting\x20code\x20format',{'projectCode':_0x1c2961}),await execa(resolveNpmBin(_0x5b76a7(0xda)),['prettier','--write','.'],{'cwd':_0x4aefa1});const _0x818ade=Date[_0x5b76a7(0xd1)]()-_0xfd3293;logger[_0x5b76a7(0xcd)](_0x5b76a7(0xcf),_0x5b76a7(0xd7),_0x818ade,{'projectCode':_0x1c2961});}catch(_0x265844){const _0x4c5157=Date[_0x5b76a7(0xd1)]()-_0xfd3293;logger[_0x5b76a7(0xce)](_0x5b76a7(0xcf),_0x5b76a7(0xcc),{'projectCode':_0x1c2961,'error':_0x265844 instanceof Error?_0x265844[_0x5b76a7(0xd9)]:String(_0x265844),'duration':_0x4c5157});throw _0x265844;}return formatElapsed(_0xfd3293);}
@@ -1 +1 @@
1
- (function(_0x5aac6c,_0x49443f){const _0x24d29b=a226_0xc5b7,_0x975edd=_0x5aac6c();while(!![]){try{const _0x2abbe8=-parseInt(_0x24d29b(0xae))/0x1+-parseInt(_0x24d29b(0xbb))/0x2*(parseInt(_0x24d29b(0xbd))/0x3)+parseInt(_0x24d29b(0xb2))/0x4*(parseInt(_0x24d29b(0xb6))/0x5)+-parseInt(_0x24d29b(0xb5))/0x6+-parseInt(_0x24d29b(0xbc))/0x7+-parseInt(_0x24d29b(0xb1))/0x8*(parseInt(_0x24d29b(0xb0))/0x9)+parseInt(_0x24d29b(0xb3))/0xa;if(_0x2abbe8===_0x49443f)break;else _0x975edd['push'](_0x975edd['shift']());}catch(_0x2bfa64){_0x975edd['push'](_0x975edd['shift']());}}}(a226_0x4e7d,0xd6c1f));import a226_0x48ca8e from'node:path';function a226_0x4e7d(){const _0x52f52e=['success','2330YAggBu','3897299DIkPpu','2823yUCzNs','Dependency\x20install\x20completed','info','Dependency\x20install\x20failed','install','now','64240ONwfMx','error','7839441ahUBix','8NpgWvK','8mHUczU','45930610LlcWPs','--registry','8300502gkXech','645785CnrYga','resolve','https://registry.npmmirror.com','npm'];a226_0x4e7d=function(){return _0x52f52e;};return a226_0x4e7d();}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a226_0xc5b7(_0x3cbf64,_0x6e0145){_0x3cbf64=_0x3cbf64-0xae;const _0x4e7d64=a226_0x4e7d();let _0xc5b749=_0x4e7d64[_0x3cbf64];return _0xc5b749;}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x2bfeb7){const _0x2db4ae=a226_0xc5b7,_0x42f69f=Date[_0x2db4ae(0xc2)](),_0x5411ab=a226_0x48ca8e[_0x2db4ae(0xb7)](process['cwd'](),_0x2bfeb7);try{logger[_0x2db4ae(0xbf)](_0x2db4ae(0xc1),'Starting\x20dependency\x20install',{'projectCode':_0x2bfeb7,'registry':_0x2db4ae(0xb8)}),await execa(resolveNpmBin(_0x2db4ae(0xb9)),['install',_0x2db4ae(0xb4),'https://registry.npmmirror.com'],{'cwd':_0x5411ab});const _0x4d5e90=Date[_0x2db4ae(0xc2)]()-_0x42f69f;logger[_0x2db4ae(0xba)](_0x2db4ae(0xc1),_0x2db4ae(0xbe),_0x4d5e90,{'projectCode':_0x2bfeb7});}catch(_0x2dfa7e){const _0x22422a=Date[_0x2db4ae(0xc2)]()-_0x42f69f;logger[_0x2db4ae(0xaf)]('install',_0x2db4ae(0xc0),{'projectCode':_0x2bfeb7,'error':_0x2dfa7e instanceof Error?_0x2dfa7e['message']:String(_0x2dfa7e),'duration':_0x22422a});throw _0x2dfa7e;}return formatElapsed(_0x42f69f);}
1
+ (function(_0x44a615,_0x4bae48){const _0x4bbef2=a226_0x5cf2,_0x1a06e0=_0x44a615();while(!![]){try{const _0x5c6410=parseInt(_0x4bbef2(0x1a0))/0x1+parseInt(_0x4bbef2(0x19f))/0x2*(-parseInt(_0x4bbef2(0x19d))/0x3)+-parseInt(_0x4bbef2(0x18f))/0x4*(-parseInt(_0x4bbef2(0x191))/0x5)+-parseInt(_0x4bbef2(0x18c))/0x6+parseInt(_0x4bbef2(0x19b))/0x7*(parseInt(_0x4bbef2(0x194))/0x8)+parseInt(_0x4bbef2(0x19c))/0x9+-parseInt(_0x4bbef2(0x193))/0xa;if(_0x5c6410===_0x4bae48)break;else _0x1a06e0['push'](_0x1a06e0['shift']());}catch(_0x33ba99){_0x1a06e0['push'](_0x1a06e0['shift']());}}}(a226_0xe72d,0x4c15b));import a226_0x4843fe from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a226_0xe72d(){const _0x3a0108=['resolve','4wdinyX','233651GWcUtF','install','Dependency\x20install\x20failed','2311758NuQJza','info','now','23768lBWogr','message','405yfNEjh','https://registry.npmmirror.com','3095330TZxPIF','696NFryKW','Dependency\x20install\x20completed','success','error','cwd','--registry','npm','25291wHLlQx','4151133AJYqsR','726078rKxHLQ'];a226_0xe72d=function(){return _0x3a0108;};return a226_0xe72d();}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';function a226_0x5cf2(_0x55b14d,_0x5a71a7){_0x55b14d=_0x55b14d-0x18b;const _0xe72de6=a226_0xe72d();let _0x5cf20c=_0xe72de6[_0x55b14d];return _0x5cf20c;}export async function installDependencies(_0x435247){const _0x2172a1=a226_0x5cf2,_0x4bd565=Date[_0x2172a1(0x18e)](),_0x107371=a226_0x4843fe[_0x2172a1(0x19e)](process[_0x2172a1(0x198)](),_0x435247);try{logger[_0x2172a1(0x18d)](_0x2172a1(0x1a1),'Starting\x20dependency\x20install',{'projectCode':_0x435247,'registry':_0x2172a1(0x192)}),await execa(resolveNpmBin(_0x2172a1(0x19a)),[_0x2172a1(0x1a1),_0x2172a1(0x199),_0x2172a1(0x192)],{'cwd':_0x107371});const _0x453aeb=Date['now']()-_0x4bd565;logger[_0x2172a1(0x196)](_0x2172a1(0x1a1),_0x2172a1(0x195),_0x453aeb,{'projectCode':_0x435247});}catch(_0x1884a2){const _0x19e149=Date[_0x2172a1(0x18e)]()-_0x4bd565;logger[_0x2172a1(0x197)](_0x2172a1(0x1a1),_0x2172a1(0x18b),{'projectCode':_0x435247,'error':_0x1884a2 instanceof Error?_0x1884a2[_0x2172a1(0x190)]:String(_0x1884a2),'duration':_0x19e149});throw _0x1884a2;}return formatElapsed(_0x4bd565);}
@@ -1 +1 @@
1
- const a227_0x2bf077=a227_0x4afe;(function(_0x3bebdb,_0x72a035){const _0x40de8b=a227_0x4afe,_0x2a6132=_0x3bebdb();while(!![]){try{const _0x55e15e=-parseInt(_0x40de8b(0x1b7))/0x1*(-parseInt(_0x40de8b(0x1b5))/0x2)+-parseInt(_0x40de8b(0x1b9))/0x3+parseInt(_0x40de8b(0x1b6))/0x4*(parseInt(_0x40de8b(0x1b8))/0x5)+parseInt(_0x40de8b(0x1be))/0x6+parseInt(_0x40de8b(0x1b1))/0x7*(parseInt(_0x40de8b(0x1ab))/0x8)+parseInt(_0x40de8b(0x1b0))/0x9*(-parseInt(_0x40de8b(0x1ae))/0xa)+parseInt(_0x40de8b(0x1bc))/0xb*(-parseInt(_0x40de8b(0x1af))/0xc);if(_0x55e15e===_0x72a035)break;else _0x2a6132['push'](_0x2a6132['shift']());}catch(_0x2a8c09){_0x2a6132['push'](_0x2a6132['shift']());}}}(a227_0xaf96,0xc0dc0));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a227_0xaf96(){const _0x65a52a=['read','2192522QCdEeM','1105836sQhdep','1ONOEoT','10peYlGR','67407nijPCA','path','\x20workspace\x20init\x20--appcode\x20<code>\x20in\x20the\x20project\x20directory\x20first.','3927484uWPSwc','No\x20Rabetbase\x20project\x20configuration\x20was\x20found.','3256374eBwwkr','1144pmSslJ','validation','project','5370hHmQUP','60Darlie','12366fNVegg','55979keJCZz','domain-routing-sync','Domain\x20routing\x20synchronized:\x20'];a227_0xaf96=function(){return _0x65a52a;};return a227_0xaf96();}function a227_0x4afe(_0x124c7b,_0x19cb7e){_0x124c7b=_0x124c7b-0x1ab;const _0xaf96f9=a227_0xaf96();let _0x4afeeb=_0xaf96f9[_0x124c7b];return _0x4afeeb;}import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';export const projectDomainRoutingSyncDefinition={'service':a227_0x2bf077(0x1ad),'command':a227_0x2bf077(0x1b2),'description':'Synchronize\x20the\x20current\x20project\x27s\x20public\x20Domain\x20routing','risk':a227_0x2bf077(0x1b4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(){const _0x5c0c6a=a227_0x2bf077,_0x57f109=findProjectRootDirectory();if(!resolveConfigPath(_0x57f109))throw CliErrors[_0x5c0c6a(0x1ac)](_0x5c0c6a(0x1bd),'Run\x20'+CLI_BIN_NAME+_0x5c0c6a(0x1bb));const _0x1e6170=writeProjectDomainRoutingManifest(_0x57f109);return{'ok':!![],'message':_0x5c0c6a(0x1b3)+_0x1e6170[_0x5c0c6a(0x1ba)],'data':_0x1e6170};}};
1
+ const a227_0x2b07f1=a227_0xf777;(function(_0xc7c623,_0x30e9f0){const _0x5eb505=a227_0xf777,_0x34e41a=_0xc7c623();while(!![]){try{const _0x4bea66=-parseInt(_0x5eb505(0x95))/0x1*(-parseInt(_0x5eb505(0xa0))/0x2)+-parseInt(_0x5eb505(0x99))/0x3+-parseInt(_0x5eb505(0x98))/0x4+-parseInt(_0x5eb505(0xa3))/0x5+parseInt(_0x5eb505(0x9b))/0x6+-parseInt(_0x5eb505(0x9a))/0x7*(parseInt(_0x5eb505(0x9f))/0x8)+parseInt(_0x5eb505(0xa2))/0x9;if(_0x4bea66===_0x30e9f0)break;else _0x34e41a['push'](_0x34e41a['shift']());}catch(_0xc754d9){_0x34e41a['push'](_0x34e41a['shift']());}}}(a227_0x150a,0x9e59f));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';function a227_0xf777(_0x530118,_0x18caaa){_0x530118=_0x530118-0x95;const _0x150a66=a227_0x150a();let _0xf77746=_0x150a66[_0x530118];return _0xf77746;}import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';export const projectDomainRoutingSyncDefinition={'service':a227_0x2b07f1(0x9e),'command':a227_0x2b07f1(0x9c),'description':'Synchronize\x20the\x20current\x20project\x27s\x20public\x20Domain\x20routing','risk':a227_0x2b07f1(0x96),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(){const _0x566a62=a227_0x2b07f1,_0x271bd2=findProjectRootDirectory();if(!resolveConfigPath(_0x271bd2))throw CliErrors['validation'](_0x566a62(0xa4),_0x566a62(0x9d)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>\x20in\x20the\x20project\x20directory\x20first.');const _0x50ba54=writeProjectDomainRoutingManifest(_0x271bd2);return{'ok':!![],'message':_0x566a62(0xa1)+_0x50ba54[_0x566a62(0x97)],'data':_0x50ba54};}};function a227_0x150a(){const _0x334103=['5688110EvuaBT','No\x20Rabetbase\x20project\x20configuration\x20was\x20found.','803037Mjpnid','read','path','4996108aZRocC','3285348IpgCCt','7qcDAhc','1275048wocmxC','domain-routing-sync','Run\x20','project','3564328qnIqDM','2OvXbQl','Domain\x20routing\x20synchronized:\x20','32043312MNlwmh'];a227_0x150a=function(){return _0x334103;};return a227_0x150a();}
@@ -1 +1 @@
1
- const a228_0x539197=a228_0x3107;function a228_0x3107(_0x2424fb,_0x347b95){_0x2424fb=_0x2424fb-0x1e0;const _0xc1b2fe=a228_0xc1b2();let _0x310729=_0xc1b2fe[_0x2424fb];return _0x310729;}(function(_0x5e222e,_0x2c4775){const _0x5a93b9=a228_0x3107,_0x3b67e2=_0x5e222e();while(!![]){try{const _0x25f6e3=parseInt(_0x5a93b9(0x1f7))/0x1+parseInt(_0x5a93b9(0x20f))/0x2*(parseInt(_0x5a93b9(0x20d))/0x3)+-parseInt(_0x5a93b9(0x1f5))/0x4*(-parseInt(_0x5a93b9(0x1fb))/0x5)+-parseInt(_0x5a93b9(0x212))/0x6*(parseInt(_0x5a93b9(0x1f4))/0x7)+-parseInt(_0x5a93b9(0x1e7))/0x8*(-parseInt(_0x5a93b9(0x20b))/0x9)+parseInt(_0x5a93b9(0x1f1))/0xa*(parseInt(_0x5a93b9(0x1fa))/0xb)+-parseInt(_0x5a93b9(0x1e8))/0xc*(parseInt(_0x5a93b9(0x1ec))/0xd);if(_0x25f6e3===_0x2c4775)break;else _0x3b67e2['push'](_0x3b67e2['shift']());}catch(_0x2ae5b0){_0x3b67e2['push'](_0x3b67e2['shift']());}}}(a228_0xc1b2,0x1957e));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_0xc1b2(){const _0x26df54=['string','Would\x20upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure\x20without\x20overwriting\x20project-owned\x20entrypoints','cookie','721214hLbmiz','trim','../../commands/project/create/main.js','boolean','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]','50TdnxYP','--current-dir\x20cannot\x20be\x20combined\x20with\x20a\x20project\x20name.','PATCH','84xzShfN','255908AETXXR','template-source','126290hwpLTE','Run\x20','Upgrade\x20cancelled.','201883KSakZK','5zqVncP','Project\x20name','Initialize\x20the\x20current\x20empty\x20directory\x20instead\x20of\x20creating\x20a\x20child\x20directory','args','cancelled','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]\x20from\x20the\x20empty\x20target\x20directory.','Project\x20upgrade\x20completed.','create','Skip\x20confirmation\x20prompt','Usage:\x20','project-name','write','cwd','Prepared\x20local\x20project\x20template\x20directory','validation','9lltFJX','yes','84885jGgOql','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]\x20or\x20','6ILMDsW','str','Create\x20a\x20new\x20project','77454LpHycM','Target\x20environment','project','completed','bool','appcode','name','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','current-dir','upgrade','Upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure','nonInteractive','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','1353496DUMEGl','60GSJwRr'];a228_0xc1b2=function(){return _0x26df54;};return a228_0xc1b2();}const createFlags=[{'name':a228_0x539197(0x1e0),'type':a228_0x539197(0x1e9),'description':a228_0x539197(0x1fc)},{'name':'env','type':a228_0x539197(0x1e9),'description':a228_0x539197(0x213)},{'name':a228_0x539197(0x217),'type':'string','description':a228_0x539197(0x1e1)},{'name':a228_0x539197(0x1e2),'type':'boolean','description':a228_0x539197(0x1fd),'default':![]},{'name':a228_0x539197(0x1f6),'type':'string','description':a228_0x539197(0x209)}],upgradeFlags=[{'name':a228_0x539197(0x20c),'type':a228_0x539197(0x1ef),'description':a228_0x539197(0x204),'default':![]}];export const projectDefinitions=[{'service':'project','command':a228_0x539197(0x203),'description':a228_0x539197(0x211),'risk':a228_0x539197(0x207),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a228_0x539197(0x206),'description':a228_0x539197(0x200),'required':![]}],'flags':createFlags,async 'execute'(_0x34c9fe){const _0x91387=a228_0x539197,{createApp:_0x4948f6}=await import(_0x91387(0x1ee)),_0x49118d=_0x34c9fe[_0x91387(0x210)](_0x91387(0x1e0))[_0x91387(0x1ed)]()||_0x34c9fe[_0x91387(0x1fe)][0x0]?.[_0x91387(0x1ed)](),_0x10a149=_0x34c9fe['str']('env')||undefined,_0x324ca0=_0x34c9fe[_0x91387(0x210)](_0x91387(0x217))||undefined,_0x5cc740=_0x34c9fe[_0x91387(0x210)](_0x91387(0x1f6))[_0x91387(0x1ed)]()||undefined,_0xec3865=_0x34c9fe[_0x91387(0x216)](_0x91387(0x1e2));if(_0xec3865&&_0x49118d)throw CliErrors[_0x91387(0x20a)](_0x91387(0x1f2),_0x91387(0x1f8)+CLI_BIN_NAME+_0x91387(0x201));if(_0x34c9fe[_0x91387(0x1e5)]){if(!_0x49118d&&!_0xec3865)throw CliErrors[_0x91387(0x20a)](_0x91387(0x1e6),_0x91387(0x205)+CLI_BIN_NAME+_0x91387(0x20e)+CLI_BIN_NAME+_0x91387(0x1f0));await _0x4948f6({'projectCode':_0x49118d,'appCode':_0x324ca0,'env':_0x10a149,'cookie':_0x34c9fe['cookie'],'currentDir':_0xec3865,'nonInteractive':!![],'templateSource':_0x5cc740});}else await _0x4948f6({'projectCode':_0x49118d,'appCode':_0x324ca0,'env':_0x10a149,'cookie':_0x34c9fe[_0x91387(0x1eb)],'currentDir':_0xec3865,'templateSource':_0x5cc740});return{'ok':!![]};}},projectDomainRoutingSyncDefinition,{'service':a228_0x539197(0x214),'command':a228_0x539197(0x1e3),'description':a228_0x539197(0x1e4),'risk':a228_0x539197(0x207),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'dryRun'(){const _0x442bb7=a228_0x539197,_0x21e4dd=analyseProjectUpgrade(process[_0x442bb7(0x208)]());return{'method':_0x442bb7(0x1f3),'url':process['cwd'](),'body':_0x21e4dd,'description':_0x442bb7(0x1ea)};},async 'execute'(_0x1174f6){const _0x1f068d=a228_0x539197,_0x174c7b=await upgradeApp(_0x1174f6[_0x1f068d(0x1e5)],{'yes':_0x1174f6[_0x1f068d(0x216)](_0x1f068d(0x20c))});return{'ok':_0x174c7b['completed']||_0x174c7b['cancelled']===!![],'message':_0x174c7b[_0x1f068d(0x1ff)]?_0x1f068d(0x1f9):_0x174c7b[_0x1f068d(0x215)]?_0x1f068d(0x202):'Project\x20upgrade\x20completed\x20with\x20follow-up\x20work.','data':_0x174c7b};}}];
1
+ const a228_0x18111f=a228_0x4a93;(function(_0x3ada81,_0xe3ae07){const _0x34d9ee=a228_0x4a93,_0x24ad7b=_0x3ada81();while(!![]){try{const _0x2461d9=-parseInt(_0x34d9ee(0x1de))/0x1*(-parseInt(_0x34d9ee(0x1f0))/0x2)+parseInt(_0x34d9ee(0x204))/0x3+parseInt(_0x34d9ee(0x1e1))/0x4*(parseInt(_0x34d9ee(0x1e0))/0x5)+parseInt(_0x34d9ee(0x1fe))/0x6+parseInt(_0x34d9ee(0x1da))/0x7+-parseInt(_0x34d9ee(0x1fd))/0x8+-parseInt(_0x34d9ee(0x1ef))/0x9;if(_0x2461d9===_0xe3ae07)break;else _0x24ad7b['push'](_0x24ad7b['shift']());}catch(_0x29adea){_0x24ad7b['push'](_0x24ad7b['shift']());}}}(a228_0x5136,0x39332));import{CliErrors}from'../../errors.js';function a228_0x5136(){const _0x2c1b82=['Project\x20name','string','validation','Upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure','env','appcode','Project\x20upgrade\x20completed.','bool','Would\x20upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure\x20without\x20overwriting\x20project-owned\x20entrypoints','args','Usage:\x20','trim','1860976dXtiNu','2526618mdGOZW','yes','--current-dir\x20cannot\x20be\x20combined\x20with\x20a\x20project\x20name.','project-name','Upgrade\x20cancelled.','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','1105623mxZtST','Create\x20a\x20new\x20project','template-source','completed','current-dir','create','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','3229604CvzwuS','Skip\x20confirmation\x20prompt','boolean','cwd','8497KwUpNs','upgrade','79110VWShfg','88yModgr','name','str','Target\x20environment','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','Run\x20','write','cookie','cancelled','Initialize\x20the\x20current\x20empty\x20directory\x20instead\x20of\x20creating\x20a\x20child\x20directory','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]','project','PATCH','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]\x20from\x20the\x20empty\x20target\x20directory.','11795625eCfkBZ','42uTfUsl'];a228_0x5136=function(){return _0x2c1b82;};return a228_0x5136();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{analyseProjectUpgrade,upgradeApp}from'../../commands/project/upgrade.js';import{projectDomainRoutingSyncDefinition}from'../../commands/project/domain-routing-sync.js';const createFlags=[{'name':a228_0x18111f(0x1e2),'type':a228_0x18111f(0x1f2),'description':a228_0x18111f(0x1f1)},{'name':a228_0x18111f(0x1f5),'type':a228_0x18111f(0x1f2),'description':a228_0x18111f(0x1e4)},{'name':a228_0x18111f(0x1f6),'type':a228_0x18111f(0x1f2),'description':a228_0x18111f(0x1e5)},{'name':a228_0x18111f(0x208),'type':'boolean','description':a228_0x18111f(0x1ea),'default':![]},{'name':'template-source','type':a228_0x18111f(0x1f2),'description':'Prepared\x20local\x20project\x20template\x20directory'}],upgradeFlags=[{'name':a228_0x18111f(0x1ff),'type':a228_0x18111f(0x1dc),'description':a228_0x18111f(0x1db),'default':![]}];function a228_0x4a93(_0x460a8c,_0xe33fcf){_0x460a8c=_0x460a8c-0x1d8;const _0x5136fd=a228_0x5136();let _0x4a9337=_0x5136fd[_0x460a8c];return _0x4a9337;}export const projectDefinitions=[{'service':a228_0x18111f(0x1ec),'command':a228_0x18111f(0x1d8),'description':a228_0x18111f(0x205),'risk':a228_0x18111f(0x1e7),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a228_0x18111f(0x201),'description':a228_0x18111f(0x1d9),'required':![]}],'flags':createFlags,async 'execute'(_0x34ae88){const _0x35ba84=a228_0x18111f,{createApp:_0x2863b4}=await import('../../commands/project/create/main.js'),_0x594d17=_0x34ae88[_0x35ba84(0x1e3)](_0x35ba84(0x1e2))['trim']()||_0x34ae88[_0x35ba84(0x1fa)][0x0]?.[_0x35ba84(0x1fc)](),_0x5e2ed8=_0x34ae88[_0x35ba84(0x1e3)]('env')||undefined,_0x53df31=_0x34ae88[_0x35ba84(0x1e3)]('appcode')||undefined,_0x3ec6b3=_0x34ae88[_0x35ba84(0x1e3)](_0x35ba84(0x206))[_0x35ba84(0x1fc)]()||undefined,_0x392828=_0x34ae88[_0x35ba84(0x1f8)](_0x35ba84(0x208));if(_0x392828&&_0x594d17)throw CliErrors[_0x35ba84(0x1f3)](_0x35ba84(0x200),_0x35ba84(0x1e6)+CLI_BIN_NAME+_0x35ba84(0x1ee));if(_0x34ae88['nonInteractive']){if(!_0x594d17&&!_0x392828)throw CliErrors['validation'](_0x35ba84(0x203),_0x35ba84(0x1fb)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]\x20or\x20'+CLI_BIN_NAME+_0x35ba84(0x1eb));await _0x2863b4({'projectCode':_0x594d17,'appCode':_0x53df31,'env':_0x5e2ed8,'cookie':_0x34ae88[_0x35ba84(0x1e8)],'currentDir':_0x392828,'nonInteractive':!![],'templateSource':_0x3ec6b3});}else await _0x2863b4({'projectCode':_0x594d17,'appCode':_0x53df31,'env':_0x5e2ed8,'cookie':_0x34ae88['cookie'],'currentDir':_0x392828,'templateSource':_0x3ec6b3});return{'ok':!![]};}},projectDomainRoutingSyncDefinition,{'service':a228_0x18111f(0x1ec),'command':a228_0x18111f(0x1df),'description':a228_0x18111f(0x1f4),'risk':a228_0x18111f(0x1e7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'dryRun'(){const _0x2597ef=a228_0x18111f,_0x2cb409=analyseProjectUpgrade(process[_0x2597ef(0x1dd)]());return{'method':_0x2597ef(0x1ed),'url':process[_0x2597ef(0x1dd)](),'body':_0x2cb409,'description':_0x2597ef(0x1f9)};},async 'execute'(_0x4ff066){const _0x3cc77f=a228_0x18111f,_0x41ec68=await upgradeApp(_0x4ff066['nonInteractive'],{'yes':_0x4ff066[_0x3cc77f(0x1f8)](_0x3cc77f(0x1ff))});return{'ok':_0x41ec68[_0x3cc77f(0x207)]||_0x41ec68[_0x3cc77f(0x1e9)]===!![],'message':_0x41ec68[_0x3cc77f(0x1e9)]?_0x3cc77f(0x202):_0x41ec68[_0x3cc77f(0x207)]?_0x3cc77f(0x1f7):'Project\x20upgrade\x20completed\x20with\x20follow-up\x20work.','data':_0x41ec68};}}];
@@ -1 +1 @@
1
- (function(_0x3350ac,_0x3b7a66){const _0x2e1717=a229_0x5128,_0x4a3103=_0x3350ac();while(!![]){try{const _0x3d3027=-parseInt(_0x2e1717(0x212))/0x1+-parseInt(_0x2e1717(0x1c5))/0x2+parseInt(_0x2e1717(0x1d0))/0x3*(-parseInt(_0x2e1717(0x216))/0x4)+-parseInt(_0x2e1717(0x1d1))/0x5*(parseInt(_0x2e1717(0x1d9))/0x6)+-parseInt(_0x2e1717(0x1ea))/0x7+-parseInt(_0x2e1717(0x1d8))/0x8+-parseInt(_0x2e1717(0x205))/0x9*(-parseInt(_0x2e1717(0x214))/0xa);if(_0x3d3027===_0x3b7a66)break;else _0x4a3103['push'](_0x4a3103['shift']());}catch(_0x3dc704){_0x4a3103['push'](_0x4a3103['shift']());}}}(a229_0xa043,0xa2ea4));import a229_0xab505e from'chalk';import a229_0x1f1944 from'ora';import{existsSync,readFileSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{askConfirm}from'../../commands/menu/shared/inquirer.js';import{analyzeProjectApiArchitecture,upgradeProjectApiArchitecture}from'../../commands/project/api-architecture-upgrade.js';function a229_0xa043(){const _0x579dec=['7313754ISwdkP','upgrade\x20needed','green','\x20\x20Current\x20version\x20in\x20','failed','log','devDependencies','succeed','push','Upgrade\x20candidates\x20were\x20written,\x20but\x20project-owned\x20source\x20files\x20still\x20require\x20manual\x20merging.','some','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','candidate\x20entrypoints\x20written;\x20manual\x20merge\x20required','Step\x202/2:\x20Upgrading\x20application\x20source\x20structure...','FAIL','files','label','\x20\x20bun\x20install','manualMergeRequired','parse','cwd','start','===\x20Upgrade\x20Analysis\x20===','join','latest','Upgrade\x20application\x20source','length','1131264yOChnz','path','\x20\x20Historical\x20ungrouped\x20multi-app\x20directories\x20keep\x20their\x20prefixed\x20API\x20files.','message','Upgrade\x20cancelled.','step','fail','Proceed\x20with\x20upgrade?','@lovrabet/sdk','cyan','yes','source\x20structure\x20is\x20current','\x20\x20\x20\x20\x20\x20\x20','857217MatPwk','CANCEL','360ylfvVz','string','202892juApmg','Upgrade\x20@lovrabet/sdk','apiArchitecture','726610zNVqNM','white','gray','object','[\x22@lovrabet/sdk\x22]:\x20','stringify','Upgrade\x20completed\x20successfully!','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','package.json','up-to-date','action','57oVGtak','1199330EZSrlz','\x20\x20\x20\x20','Step\x201/2:\x20@lovrabet/sdk\x20—\x20','detail','groups','candidatePath','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','3110472MFaWkL','6oaLQYP','Step\x202/2:\x20Application\x20source\x20—\x20','\x20\x20npm\x20install','profiles','Step\x201/2:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','apiDir','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','\x20→\x20latest','bold','@lovrabet/sdk:','skippedLegacyDirectories','dependencies','yellow','\x20\x20\x20\x20\x20\x20candidate:\x20','\x20→\x20','utf8','sdkUpgrade'];a229_0xa043=function(){return _0x579dec;};return a229_0xa043();}import{NEW_CONFIG_NAME}from'../../context.js';function readProjectConfig(_0x5de824){const _0x16e000=a229_0x5128;try{const _0x33c1d5=JSON[_0x16e000(0x1fd)](readFileSync(_0x5de824,_0x16e000(0x1e8)));return _0x33c1d5&&typeof _0x33c1d5===_0x16e000(0x1c8)?_0x33c1d5:{};}catch{return{};}}export function analyseProjectUpgrade(_0x5da83b){const _0x14e98d=a229_0x5128;let _0x47259b=null;const _0x2b1acc=resolve(_0x5da83b,_0x14e98d(0x1cd));if(existsSync(_0x2b1acc))try{const _0x43be6f=JSON['parse'](readFileSync(_0x2b1acc,'utf8'));for(const _0x3351ea of[_0x14e98d(0x1e4),_0x14e98d(0x1f0)]){const _0x50e143=_0x43be6f?.[_0x3351ea]?.[_0x14e98d(0x20d)];if(typeof _0x50e143===_0x14e98d(0x215)){_0x50e143!=='latest'&&(_0x47259b={'pkgPath':_0x2b1acc,'currentVersion':_0x50e143,'field':_0x3351ea});break;}}}catch{}const _0x330bed=resolve(_0x5da83b,NEW_CONFIG_NAME),_0x2a1fcd=existsSync(_0x330bed)?readProjectConfig(_0x330bed):{},_0x347f7b=analyzeProjectApiArchitecture(_0x5da83b,_0x2a1fcd);return{'sdkUpgrade':_0x47259b,'apiArchitecture':_0x347f7b};}function printReport(_0x9fbadd){const _0x4c1d53=a229_0x5128;console[_0x4c1d53(0x1ef)](''),console[_0x4c1d53(0x1ef)](a229_0xab505e[_0x4c1d53(0x1e1)](_0x4c1d53(0x200))),console[_0x4c1d53(0x1ef)](''),console['log'](a229_0xab505e['cyan']('Application\x20source:')+('\x20\x20'+(_0x9fbadd['apiArchitecture']['needed']?a229_0xab505e[_0x4c1d53(0x1e5)](_0x4c1d53(0x1eb)):a229_0xab505e[_0x4c1d53(0x1ec)](_0x4c1d53(0x1ce)))));for(const _0x4b8c7e of _0x9fbadd[_0x4c1d53(0x1c4)][_0x4c1d53(0x1d5)]){console[_0x4c1d53(0x1ef)]('\x20\x20'+_0x4b8c7e[_0x4c1d53(0x1de)]+'\x20('+_0x4b8c7e[_0x4c1d53(0x1dc)][_0x4c1d53(0x201)](',\x20')+')');for(const _0x5a805d of _0x4b8c7e[_0x4c1d53(0x1f9)]){console[_0x4c1d53(0x1ef)](_0x4c1d53(0x1d2)+_0x5a805d[_0x4c1d53(0x1cf)]['padEnd'](0x11)+'\x20'+_0x5a805d[_0x4c1d53(0x206)]),_0x5a805d[_0x4c1d53(0x1d6)]&&console[_0x4c1d53(0x1ef)](_0x4c1d53(0x1e6)+_0x5a805d[_0x4c1d53(0x1d6)]);}}_0x9fbadd[_0x4c1d53(0x1c4)][_0x4c1d53(0x1e3)][_0x4c1d53(0x204)]>0x0&&console[_0x4c1d53(0x1ef)](_0x4c1d53(0x207));console[_0x4c1d53(0x1ef)]('');if(_0x9fbadd['sdkUpgrade']){const {currentVersion:_0x208295,field:_0x14c7d0,pkgPath:_0x3e586c}=_0x9fbadd['sdkUpgrade'];console[_0x4c1d53(0x1ef)](a229_0xab505e['cyan'](_0x4c1d53(0x1e2))+('\x20\x20'+a229_0xab505e[_0x4c1d53(0x1e5)](_0x3e586c))),console[_0x4c1d53(0x1ef)](_0x4c1d53(0x1ed)+_0x14c7d0+':\x20'+a229_0xab505e[_0x4c1d53(0x1e5)](_0x208295)+_0x4c1d53(0x1e7)+a229_0xab505e[_0x4c1d53(0x1ec)](_0x4c1d53(0x202))),console[_0x4c1d53(0x1ef)](_0x4c1d53(0x1cc));}else console[_0x4c1d53(0x1ef)](a229_0xab505e['cyan'](_0x4c1d53(0x1e2))+'\x20\x20'+a229_0xab505e['gray']('not\x20found\x20or\x20already\x20at\x20latest'));console[_0x4c1d53(0x1ef)]('');}function a229_0x5128(_0x551533,_0x37ec8c){_0x551533=_0x551533-0x1c3;const _0xa04324=a229_0xa043();let _0x512884=_0xa04324[_0x551533];return _0x512884;}function execUpgradeSdk(_0x1cbf6e){const _0x5a9f95=a229_0x5128;if(!_0x1cbf6e[_0x5a9f95(0x1e9)])return{'step':0x1,'label':_0x5a9f95(0x1c3),'ok':!![],'detail':'skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)'};const {pkgPath:_0x52e8b6,currentVersion:_0x733672,field:_0x372c91}=_0x1cbf6e['sdkUpgrade'];try{const _0x155973=readFileSync(_0x52e8b6,_0x5a9f95(0x1e8)),_0x42898a=JSON['parse'](_0x155973);return _0x42898a[_0x372c91][_0x5a9f95(0x20d)]=_0x5a9f95(0x202),writeFileSync(_0x52e8b6,JSON[_0x5a9f95(0x1ca)](_0x42898a,null,0x2)+'\x0a',_0x5a9f95(0x1e8)),{'step':0x1,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0x372c91+_0x5a9f95(0x1c9)+_0x733672+_0x5a9f95(0x1e0)};}catch(_0x5b67ec){return{'step':0x1,'label':_0x5a9f95(0x1c3),'ok':![],'detail':_0x5b67ec instanceof Error?_0x5b67ec[_0x5a9f95(0x208)]:String(_0x5b67ec)};}}function printSummary(_0x254440){const _0x25749a=a229_0x5128;console[_0x25749a(0x1ef)](''),console[_0x25749a(0x1ef)](a229_0xab505e[_0x25749a(0x1e1)]('===\x20Upgrade\x20Summary\x20===')),console[_0x25749a(0x1ef)]('');for(const _0x238d1c of _0x254440){const _0x11a008=_0x238d1c['ok']?a229_0xab505e[_0x25749a(0x1ec)]('OK'):a229_0xab505e['red'](_0x25749a(0x1f8));console['log']('\x20\x20'+_0x11a008+'\x20\x20Step\x20'+_0x238d1c[_0x25749a(0x20a)]+':\x20'+_0x238d1c[_0x25749a(0x1fa)]);if(_0x238d1c['detail'])console['log'](_0x25749a(0x211)+a229_0xab505e[_0x25749a(0x1c7)](_0x238d1c[_0x25749a(0x1d4)]));}console[_0x25749a(0x1ef)]('');}export async function upgradeApp(_0x1e3ae2,_0x3d3687){const _0x539a1a=a229_0x5128,_0x201595=process[_0x539a1a(0x1fe)](),_0xcca8de=analyseProjectUpgrade(_0x201595);if(!_0xcca8de['sdkUpgrade']&&!_0xcca8de[_0x539a1a(0x1c4)]['needed'])return console[_0x539a1a(0x1ef)](a229_0xab505e[_0x539a1a(0x1ec)]('Your\x20project\x20is\x20already\x20up-to-date.')),{'analysis':_0xcca8de,'steps':[],'completed':!![]};printReport(_0xcca8de);const _0xdf68b0=!!(_0x3d3687[_0x539a1a(0x20f)]||_0x3d3687['Y']||_0x1e3ae2);if(!_0xdf68b0)try{const _0x5a247d=await askConfirm(_0x539a1a(0x20c));if(!_0x5a247d)return console['log'](a229_0xab505e[_0x539a1a(0x1c7)](_0x539a1a(0x209))),{'analysis':_0xcca8de,'steps':[],'completed':![],'cancelled':!![]};}catch(_0x46b434){if(_0x46b434?.['message']===_0x539a1a(0x213))return console[_0x539a1a(0x1ef)](a229_0xab505e['gray'](_0x539a1a(0x209))),{'analysis':_0xcca8de,'steps':[],'completed':![],'cancelled':!![]};throw _0x46b434;}const _0x559360=[],_0x5c8342=a229_0x1f1944({'text':_0x539a1a(0x1dd),'color':_0x539a1a(0x20e)})[_0x539a1a(0x1ff)](),_0x9e3501=execUpgradeSdk(_0xcca8de);_0x559360[_0x539a1a(0x1f2)](_0x9e3501),_0x5c8342[_0x9e3501['ok']?_0x539a1a(0x1f1):_0x539a1a(0x20b)](_0x539a1a(0x1d3)+(_0x9e3501[_0x539a1a(0x1d4)]??(_0x9e3501['ok']?'done':_0x539a1a(0x1ee))));const _0x146387=a229_0x1f1944({'text':_0x539a1a(0x1f7),'color':_0x539a1a(0x20e)})[_0x539a1a(0x1ff)]();let _0x4387da;try{_0x4387da=await upgradeProjectApiArchitecture(_0x201595);const _0x5ba0c6=_0x4387da['manualMergeRequired']?_0x539a1a(0x1f6):_0x539a1a(0x210);_0x146387[_0x539a1a(0x1f1)](_0x539a1a(0x1da)+_0x5ba0c6),_0x559360[_0x539a1a(0x1f2)]({'step':0x2,'label':_0x539a1a(0x203),'ok':!![],'detail':_0x5ba0c6});}catch(_0x17223b){const _0x38c82f=_0x17223b instanceof Error?_0x17223b['message']:String(_0x17223b);_0x146387['fail'](_0x539a1a(0x1da)+_0x38c82f),_0x559360[_0x539a1a(0x1f2)]({'step':0x2,'label':'Upgrade\x20application\x20source','ok':![],'detail':_0x38c82f});}printSummary(_0x559360);const _0x436fe1=_0x559360[_0x539a1a(0x1f4)](_0x287ecf=>!_0x287ecf['ok']);if(_0x436fe1)console[_0x539a1a(0x1ef)](a229_0xab505e[_0x539a1a(0x1e5)](_0x539a1a(0x1d7)));else _0x4387da?.[_0x539a1a(0x1fc)]?console[_0x539a1a(0x1ef)](a229_0xab505e['yellow'](_0x539a1a(0x1f3))):console[_0x539a1a(0x1ef)](a229_0xab505e['green'](_0x539a1a(0x1cb)));return _0x9e3501['ok']&&_0xcca8de['sdkUpgrade']&&(console[_0x539a1a(0x1ef)](''),console['log'](a229_0xab505e[_0x539a1a(0x1e1)][_0x539a1a(0x20e)](_0x539a1a(0x1df))),console[_0x539a1a(0x1ef)](a229_0xab505e[_0x539a1a(0x20e)](_0x539a1a(0x1f5))),console['log'](''),console[_0x539a1a(0x1ef)](a229_0xab505e['white'](_0x539a1a(0x1db))),console[_0x539a1a(0x1ef)](a229_0xab505e[_0x539a1a(0x1c6)]('\x20\x20#\x20or')),console[_0x539a1a(0x1ef)](a229_0xab505e['white'](_0x539a1a(0x1fb))),console[_0x539a1a(0x1ef)]('')),{'analysis':_0xcca8de,'steps':_0x559360,'apiArchitecture':_0x4387da,'completed':!_0x436fe1&&!_0x4387da?.[_0x539a1a(0x1fc)]};}
1
+ (function(_0x498b9a,_0x4cdc33){const _0x163f03=a229_0x3ce5,_0x26627b=_0x498b9a();while(!![]){try{const _0x3716fc=-parseInt(_0x163f03(0x132))/0x1+parseInt(_0x163f03(0x11c))/0x2+-parseInt(_0x163f03(0x13c))/0x3+parseInt(_0x163f03(0x13d))/0x4*(parseInt(_0x163f03(0x12c))/0x5)+-parseInt(_0x163f03(0x101))/0x6+-parseInt(_0x163f03(0x134))/0x7+parseInt(_0x163f03(0x13e))/0x8;if(_0x3716fc===_0x4cdc33)break;else _0x26627b['push'](_0x26627b['shift']());}catch(_0x358cdd){_0x26627b['push'](_0x26627b['shift']());}}}(a229_0x4178,0x69877));import a229_0x1fe583 from'chalk';import a229_0x159575 from'ora';import{existsSync,readFileSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{askConfirm}from'../../commands/menu/shared/inquirer.js';import{analyzeProjectApiArchitecture,upgradeProjectApiArchitecture}from'../../commands/project/api-architecture-upgrade.js';import{NEW_CONFIG_NAME}from'../../context.js';function readProjectConfig(_0x1a447c){const _0x178160=a229_0x3ce5;try{const _0x5dc6a6=JSON[_0x178160(0x131)](readFileSync(_0x1a447c,_0x178160(0x122)));return _0x5dc6a6&&typeof _0x5dc6a6===_0x178160(0x11a)?_0x5dc6a6:{};}catch{return{};}}function a229_0x4178(){const _0x188813=['Upgrade\x20candidates\x20were\x20written,\x20but\x20project-owned\x20source\x20files\x20still\x20require\x20manual\x20merging.','not\x20found\x20or\x20already\x20at\x20latest','object','@lovrabet/sdk','1270806VyLEhh','Upgrade\x20@lovrabet/sdk','yes','up-to-date','yellow','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','utf8','manualMergeRequired','Step\x201/2:\x20@lovrabet/sdk\x20—\x20','\x20\x20\x20\x20\x20\x20candidate:\x20','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','fail','succeed','dependencies','stringify','1070vIcGrs','candidatePath','Upgrade\x20application\x20source','\x20\x20npm\x20install','needed','parse','293859ouvHIg','files','642054amMaVw','package.json','\x20\x20Current\x20version\x20in\x20','done','log','\x20\x20\x20\x20','cyan','upgrade\x20needed','1077969ZTKdek','6428PqSqBm','1992632DelUjE','label','Proceed\x20with\x20upgrade?','[\x22@lovrabet/sdk\x22]:\x20','failed','message','white','source\x20structure\x20is\x20current','Application\x20source:','red','@lovrabet/sdk:','Upgrade\x20completed\x20successfully!','Step\x202/2:\x20Application\x20source\x20—\x20','join','\x20→\x20latest','Step\x201/2:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','\x20\x20bun\x20install','latest','\x20\x20#\x20or','307374KdMziu','length','FAIL','CANCEL','groups','gray','bold','sdkUpgrade','start','candidate\x20entrypoints\x20written;\x20manual\x20merge\x20required','\x20\x20Step\x20','Upgrade\x20cancelled.','detail','green','push','step','apiArchitecture','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','\x20\x20\x20\x20\x20\x20\x20','some','Your\x20project\x20is\x20already\x20up-to-date.','apiDir','action'];a229_0x4178=function(){return _0x188813;};return a229_0x4178();}export function analyseProjectUpgrade(_0x13d610){const _0x1fa065=a229_0x3ce5;let _0x118e8b=null;const _0x127b1f=resolve(_0x13d610,_0x1fa065(0x135));if(existsSync(_0x127b1f))try{const _0x17ef93=JSON[_0x1fa065(0x131)](readFileSync(_0x127b1f,_0x1fa065(0x122)));for(const _0x42c0e6 of[_0x1fa065(0x12a),'devDependencies']){const _0x2a1105=_0x17ef93?.[_0x42c0e6]?.[_0x1fa065(0x11b)];if(typeof _0x2a1105==='string'){_0x2a1105!=='latest'&&(_0x118e8b={'pkgPath':_0x127b1f,'currentVersion':_0x2a1105,'field':_0x42c0e6});break;}}}catch{}const _0x1ea599=resolve(_0x13d610,NEW_CONFIG_NAME),_0x3329e9=existsSync(_0x1ea599)?readProjectConfig(_0x1ea599):{},_0x473c00=analyzeProjectApiArchitecture(_0x13d610,_0x3329e9);return{'sdkUpgrade':_0x118e8b,'apiArchitecture':_0x473c00};}function printReport(_0x38e64e){const _0x491a66=a229_0x3ce5;console[_0x491a66(0x138)](''),console[_0x491a66(0x138)](a229_0x1fe583[_0x491a66(0x107)]('===\x20Upgrade\x20Analysis\x20===')),console[_0x491a66(0x138)](''),console['log'](a229_0x1fe583[_0x491a66(0x13a)](_0x491a66(0xf6))+('\x20\x20'+(_0x38e64e[_0x491a66(0x111)][_0x491a66(0x130)]?a229_0x1fe583[_0x491a66(0x120)](_0x491a66(0x13b)):a229_0x1fe583[_0x491a66(0x10e)](_0x491a66(0x11f)))));for(const _0x4288ce of _0x38e64e['apiArchitecture'][_0x491a66(0x105)]){console[_0x491a66(0x138)]('\x20\x20'+_0x4288ce[_0x491a66(0x116)]+'\x20('+_0x4288ce['profiles'][_0x491a66(0xfb)](',\x20')+')');for(const _0x36f921 of _0x4288ce[_0x491a66(0x133)]){console[_0x491a66(0x138)](_0x491a66(0x139)+_0x36f921[_0x491a66(0x117)]['padEnd'](0x11)+'\x20'+_0x36f921['path']),_0x36f921[_0x491a66(0x12d)]&&console['log'](_0x491a66(0x125)+_0x36f921[_0x491a66(0x12d)]);}}_0x38e64e[_0x491a66(0x111)]['skippedLegacyDirectories'][_0x491a66(0x102)]>0x0&&console[_0x491a66(0x138)]('\x20\x20Historical\x20ungrouped\x20multi-app\x20directories\x20keep\x20their\x20prefixed\x20API\x20files.');console[_0x491a66(0x138)]('');if(_0x38e64e[_0x491a66(0x108)]){const {currentVersion:_0x4583a2,field:_0x2f7b91,pkgPath:_0x1c57dd}=_0x38e64e['sdkUpgrade'];console['log'](a229_0x1fe583[_0x491a66(0x13a)](_0x491a66(0xf8))+('\x20\x20'+a229_0x1fe583[_0x491a66(0x120)](_0x1c57dd))),console[_0x491a66(0x138)](_0x491a66(0x136)+_0x2f7b91+':\x20'+a229_0x1fe583[_0x491a66(0x120)](_0x4583a2)+'\x20→\x20'+a229_0x1fe583[_0x491a66(0x10e)](_0x491a66(0xff))),console[_0x491a66(0x138)](_0x491a66(0x121));}else console[_0x491a66(0x138)](a229_0x1fe583[_0x491a66(0x13a)](_0x491a66(0xf8))+'\x20\x20'+a229_0x1fe583[_0x491a66(0x106)](_0x491a66(0x119)));console[_0x491a66(0x138)]('');}function execUpgradeSdk(_0x581948){const _0x32e9d1=a229_0x3ce5;if(!_0x581948['sdkUpgrade'])return{'step':0x1,'label':_0x32e9d1(0x11d),'ok':!![],'detail':_0x32e9d1(0x112)};const {pkgPath:_0x4e8bd6,currentVersion:_0x4a25b6,field:_0x3fd849}=_0x581948[_0x32e9d1(0x108)];try{const _0x3904e0=readFileSync(_0x4e8bd6,_0x32e9d1(0x122)),_0x4f92c1=JSON[_0x32e9d1(0x131)](_0x3904e0);return _0x4f92c1[_0x3fd849][_0x32e9d1(0x11b)]='latest',writeFileSync(_0x4e8bd6,JSON[_0x32e9d1(0x12b)](_0x4f92c1,null,0x2)+'\x0a','utf8'),{'step':0x1,'label':_0x32e9d1(0x11d),'ok':!![],'detail':_0x3fd849+_0x32e9d1(0x141)+_0x4a25b6+_0x32e9d1(0xfc)};}catch(_0x323999){return{'step':0x1,'label':_0x32e9d1(0x11d),'ok':![],'detail':_0x323999 instanceof Error?_0x323999[_0x32e9d1(0x143)]:String(_0x323999)};}}function a229_0x3ce5(_0x22872a,_0xc5fb6d){_0x22872a=_0x22872a-0xf5;const _0x4178e8=a229_0x4178();let _0x3ce5fe=_0x4178e8[_0x22872a];return _0x3ce5fe;}function printSummary(_0x5e5321){const _0x163cd4=a229_0x3ce5;console[_0x163cd4(0x138)](''),console['log'](a229_0x1fe583['bold']('===\x20Upgrade\x20Summary\x20===')),console[_0x163cd4(0x138)]('');for(const _0x2b8e43 of _0x5e5321){const _0x1a2f2d=_0x2b8e43['ok']?a229_0x1fe583[_0x163cd4(0x10e)]('OK'):a229_0x1fe583[_0x163cd4(0xf7)](_0x163cd4(0x103));console[_0x163cd4(0x138)]('\x20\x20'+_0x1a2f2d+_0x163cd4(0x10b)+_0x2b8e43[_0x163cd4(0x110)]+':\x20'+_0x2b8e43[_0x163cd4(0x13f)]);if(_0x2b8e43[_0x163cd4(0x10d)])console[_0x163cd4(0x138)](_0x163cd4(0x113)+a229_0x1fe583[_0x163cd4(0x106)](_0x2b8e43[_0x163cd4(0x10d)]));}console['log']('');}export async function upgradeApp(_0x34f32a,_0xe6c1e3){const _0x5807f5=a229_0x3ce5,_0x579a90=process['cwd'](),_0x1fe041=analyseProjectUpgrade(_0x579a90);if(!_0x1fe041['sdkUpgrade']&&!_0x1fe041[_0x5807f5(0x111)][_0x5807f5(0x130)])return console[_0x5807f5(0x138)](a229_0x1fe583['green'](_0x5807f5(0x115))),{'analysis':_0x1fe041,'steps':[],'completed':!![]};printReport(_0x1fe041);const _0x165e86=!!(_0xe6c1e3[_0x5807f5(0x11e)]||_0xe6c1e3['Y']||_0x34f32a);if(!_0x165e86)try{const _0x555f80=await askConfirm(_0x5807f5(0x140));if(!_0x555f80)return console[_0x5807f5(0x138)](a229_0x1fe583[_0x5807f5(0x106)](_0x5807f5(0x10c))),{'analysis':_0x1fe041,'steps':[],'completed':![],'cancelled':!![]};}catch(_0x1571e8){if(_0x1571e8?.['message']===_0x5807f5(0x104))return console[_0x5807f5(0x138)](a229_0x1fe583['gray'](_0x5807f5(0x10c))),{'analysis':_0x1fe041,'steps':[],'completed':![],'cancelled':!![]};throw _0x1571e8;}const _0x2a45ad=[],_0x317bb7=a229_0x159575({'text':_0x5807f5(0xfd),'color':_0x5807f5(0x13a)})[_0x5807f5(0x109)](),_0x50572b=execUpgradeSdk(_0x1fe041);_0x2a45ad[_0x5807f5(0x10f)](_0x50572b),_0x317bb7[_0x50572b['ok']?'succeed':_0x5807f5(0x128)](_0x5807f5(0x124)+(_0x50572b[_0x5807f5(0x10d)]??(_0x50572b['ok']?_0x5807f5(0x137):_0x5807f5(0x142))));const _0x1f0665=a229_0x159575({'text':'Step\x202/2:\x20Upgrading\x20application\x20source\x20structure...','color':_0x5807f5(0x13a)})[_0x5807f5(0x109)]();let _0x4e6b2f;try{_0x4e6b2f=await upgradeProjectApiArchitecture(_0x579a90);const _0x5d06eb=_0x4e6b2f['manualMergeRequired']?_0x5807f5(0x10a):_0x5807f5(0xf5);_0x1f0665[_0x5807f5(0x129)](_0x5807f5(0xfa)+_0x5d06eb),_0x2a45ad[_0x5807f5(0x10f)]({'step':0x2,'label':_0x5807f5(0x12e),'ok':!![],'detail':_0x5d06eb});}catch(_0x20d087){const _0x534879=_0x20d087 instanceof Error?_0x20d087[_0x5807f5(0x143)]:String(_0x20d087);_0x1f0665[_0x5807f5(0x128)](_0x5807f5(0xfa)+_0x534879),_0x2a45ad['push']({'step':0x2,'label':_0x5807f5(0x12e),'ok':![],'detail':_0x534879});}printSummary(_0x2a45ad);const _0xea6c46=_0x2a45ad[_0x5807f5(0x114)](_0xaee1ee=>!_0xaee1ee['ok']);if(_0xea6c46)console['log'](a229_0x1fe583['yellow']('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.'));else _0x4e6b2f?.[_0x5807f5(0x123)]?console[_0x5807f5(0x138)](a229_0x1fe583['yellow'](_0x5807f5(0x118))):console[_0x5807f5(0x138)](a229_0x1fe583[_0x5807f5(0x10e)](_0x5807f5(0xf9)));return _0x50572b['ok']&&_0x1fe041[_0x5807f5(0x108)]&&(console[_0x5807f5(0x138)](''),console[_0x5807f5(0x138)](a229_0x1fe583[_0x5807f5(0x107)][_0x5807f5(0x13a)](_0x5807f5(0x126))),console[_0x5807f5(0x138)](a229_0x1fe583[_0x5807f5(0x13a)](_0x5807f5(0x127))),console[_0x5807f5(0x138)](''),console[_0x5807f5(0x138)](a229_0x1fe583[_0x5807f5(0x144)](_0x5807f5(0x12f))),console[_0x5807f5(0x138)](a229_0x1fe583[_0x5807f5(0x144)](_0x5807f5(0x100))),console[_0x5807f5(0x138)](a229_0x1fe583['white'](_0x5807f5(0xfe))),console[_0x5807f5(0x138)]('')),{'analysis':_0x1fe041,'steps':_0x2a45ad,'apiArchitecture':_0x4e6b2f,'completed':!_0xea6c46&&!_0x4e6b2f?.['manualMergeRequired']};}
@@ -1 +1 @@
1
- const a230_0xdea0fd=a230_0x2190;(function(_0x3d6d13,_0x599503){const _0x1bb5e0=a230_0x2190,_0x3d7395=_0x3d6d13();while(!![]){try{const _0x4b9978=-parseInt(_0x1bb5e0(0xca))/0x1+-parseInt(_0x1bb5e0(0x96))/0x2*(parseInt(_0x1bb5e0(0xf1))/0x3)+parseInt(_0x1bb5e0(0xe7))/0x4*(-parseInt(_0x1bb5e0(0xa5))/0x5)+parseInt(_0x1bb5e0(0x97))/0x6+parseInt(_0x1bb5e0(0x94))/0x7*(parseInt(_0x1bb5e0(0x84))/0x8)+parseInt(_0x1bb5e0(0xd8))/0x9*(parseInt(_0x1bb5e0(0xce))/0xa)+-parseInt(_0x1bb5e0(0xd9))/0xb;if(_0x4b9978===_0x599503)break;else _0x3d7395['push'](_0x3d7395['shift']());}catch(_0xeb7946){_0x3d7395['push'](_0x3d7395['shift']());}}}(a230_0x327b,0xca0d0));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';function a230_0x327b(){const _0x39c676=['rabetbase\x20kb\x20create','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','App\x20Management','build','rabetbase\x20page\x20custom-publish','start','Platform\x20Issue','`\x20instead.','knowledge-base:list','login','service','knowledge-base:update','length','rabetbase\x20run\x20preview','Schema','Data\x20List\x20Pages\x20&\x20Custom\x20Pages','Logs','wildcardDef','CLI\x20Built-in\x20Skill','permit:role-menus-set','rabetbase\x20menu\x20asset-update','rabetbase\x20page\x20custom-detail','page:react-update','permit:page-get','rabetbase\x20workspace\x20use\x20--app\x20<name>','page:react-detail','permit:role-apis-set','flow:enable','765594BDOdAf','dataset:generate-start','rabetbase\x20workspace\x20remove\x20<name>','commands','10910630fydZvR','Configuration','rabetbase\x20dataset\x20design-status\x20--operation-id\x20<id>','rabetbase\x20project\x20create\x20<project-name>','Authentication','File','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','rabetbase\x20menu\x20subapp-assets-update\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>\x20--resources\x20\x27<json>\x27','skill:','push','9FpOrZi','2091936WztVFN','page:react-list','has','Run\x20Scripts','rabetbase\x20run\x20start','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','rabetbase\x20cli-skill\x20install','hidden','logout','risk','read','Approval\x20Flows','skills:install','defaultCommand','7012mTueLz','rabetbase\x20kb\x20update','rabetbase\x20kb\x20delete','Self\x20Update','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','rabetbase\x20bff\x20create','get','Async\x20Tasks','filter','rabetbase\x20app\x20list\x20--remote','245685cfKDgO','isSingleCommand','Diagnostics','Project','rabetbase\x20run\x20build','rabetbase\x20role\x20list','Run\x20any\x20package.json\x20script','rabetbase\x20kb\x20detail','app:assets-update','deployment:sync','create','app:add','page:standard-page-status','permit:page-set','install','dataset:generate-status','Notification\x20Configuration','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','rabetbase\x20kb\x20list','Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.','page:react-publish','skill:install','skills:','set','5902264vWRjKC','<script>','permit:role-menus','page:custom-create','Agent\x20Context\x20Rules','Use\x20`','\x20\x20[','This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.','rabetbase\x20page\x20custom-list','OCR','\x20\x20[write]','rabetbase\x20page\x20data-list-status','preview','User\x20Accounts','knowledge-base:delete','show','7vHbYNH','app:remove','4ORheSa','5043300HfbJXe','sql:save','rabetbase\x20page\x20custom-update','Dataset\x20&\x20Operations','bff:new','Runtime\x20App\x20Config\x20Management','SQL\x20Queries','role:create','Roles','API\x20Development','knowledge-base:create','command','rabetbase\x20auth\x20logout','app:assets-status','2060eSqyyQ','flow:disable','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','data:getOne','sql:new','values','rabetbase\x20menu\x20subapp-assets-status\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>','Instant\x20API\x20Policy','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK'];a230_0x327b=function(){return _0x39c676;};return a230_0x327b();}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';function a230_0x2190(_0x10c4c7,_0x2e5a4d){_0x10c4c7=_0x10c4c7-0x84;const _0x327b35=a230_0x327b();let _0x2190f6=_0x327b35[_0x10c4c7];return _0x2190f6;}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=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x437d3d){const _0x249380=a230_0x2190;for(const _0x4398c8 of _0x437d3d){definitions['set'](_0x4398c8[_0x249380(0xb8)]+':'+_0x4398c8['command'],_0x4398c8);let _0x35a1fb=serviceGroups[_0x249380(0xed)](_0x4398c8['service']);!_0x35a1fb&&(_0x35a1fb=[],serviceGroups[_0x249380(0x108)](_0x4398c8[_0x249380(0xb8)],_0x35a1fb)),_0x35a1fb[_0x249380(0xd7)](_0x4398c8);}}function registerDeclarativeService(_0x544485,_0x147e29,_0x1de9b1){const _0x4a94a4=a230_0x2190;registerDefinitions(_0x147e29);_0x1de9b1?.[_0x4a94a4(0xbf)]&&registerDefinitions([_0x1de9b1[_0x4a94a4(0xbf)]]);const _0x5f0e23=_0x424532=>_0x424532===_0x4a94a4(0xe3)?'':_0x424532==='write'?_0x4a94a4(0x8e):'\x20\x20[high-risk-write]',_0x4e7aad={'service':_0x147e29[0x0][_0x4a94a4(0xb8)],'label':_0x544485,'commands':_0x147e29[_0x4a94a4(0xef)](_0x4cd843=>!_0x4cd843[_0x4a94a4(0xe0)])['map'](_0x5477c1=>({'command':_0x5477c1[_0x4a94a4(0xa2)],'description':_0x5477c1['description'],'tag':_0x5f0e23(_0x5477c1['risk'])})),'declarative':!![],'defaultCommand':_0x1de9b1?.[_0x4a94a4(0xe6)]??(_0x1de9b1?.['isSingleCommand']?_0x147e29[0x0][_0x4a94a4(0xa2)]:undefined),'wildcardDef':_0x1de9b1?.['wildcardDef'],'isSingleCommand':_0x1de9b1?.[_0x4a94a4(0xf2)]};serviceRegistry[_0x4a94a4(0xd7)](_0x4e7aad),serviceByName['set'](_0x4e7aad['service'],_0x4e7aad);}registerDeclarativeService(a230_0xdea0fd(0xf4),projectDefinitions),registerDeclarativeService('Workspace',workspaceDefinitions),registerDeclarativeService(a230_0xdea0fd(0xb0),appDefinitions),registerDeclarativeService(a230_0xdea0fd(0xd2),authDefinitions,{'defaultCommand':a230_0xdea0fd(0xb7)}),registerDeclarativeService('Tenant\x20Members',tenantDefinitions),registerDeclarativeService(a230_0xdea0fd(0x91),userAccountDefinitions),registerDeclarativeService(a230_0xdea0fd(0x9a),datasetDefinitions),registerDeclarativeService(a230_0xdea0fd(0xbd),pageDefinitions),registerDeclarativeService(a230_0xdea0fd(0xa0),apiDefinitions),registerDeclarativeService('Backend\x20Function\x20Scripts',bffDefinitions),registerDeclarativeService(a230_0xdea0fd(0xac),instantApiPolicyDefinitions),registerDeclarativeService(a230_0xdea0fd(0x101),notificationDefinitions),registerDeclarativeService(a230_0xdea0fd(0x9d),sqlDefinitions),registerDeclarativeService('Database\x20Connections',dbDefinitions),registerDeclarativeService('Deployment',deploymentDefinitions),registerDeclarativeService('Menu',menuDefinitions),registerDeclarativeService(a230_0xdea0fd(0xee),taskDefinitions),registerDeclarativeService(a230_0xdea0fd(0x9f),roleDefinitions),registerDeclarativeService(a230_0xdea0fd(0x9c),appConfigDefinitions),registerDeclarativeService('Company\x20Knowledge\x20Base',kbDefinitions),registerDeclarativeService(a230_0xdea0fd(0x88),ruleDefinitions),registerDeclarativeService(a230_0xdea0fd(0xb4),issueDefinitions),registerDeclarativeService(a230_0xdea0fd(0xd3),fileDefinitions),registerDeclarativeService(a230_0xdea0fd(0x8d),ocrDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService(a230_0xdea0fd(0xcf),configDefinitions),registerDeclarativeService(a230_0xdea0fd(0xf3),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0xdea0fd(0xbc),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0xdea0fd(0xea),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0xdea0fd(0xc0),cliSkillDefinitions,{'defaultCommand':a230_0xdea0fd(0xff)}),registerDeclarativeService(a230_0xdea0fd(0xe4),flowDefinitions),registerDeclarativeService(a230_0xdea0fd(0xbe),logsDefinitions,{'defaultCommand':a230_0xdea0fd(0x93)}),registerDeclarativeService(a230_0xdea0fd(0xdc),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a230_0xdea0fd(0xba)]-0x1];last[a230_0xdea0fd(0xcd)]=[{'command':a230_0xdea0fd(0x85),'description':a230_0xdea0fd(0xf7),'tag':a230_0xdea0fd(0x8a)+runDefinition[a230_0xdea0fd(0xe2)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a230_0xdea0fd(0xcb),'rabetbase\x20dataset\x20design-start\x20--file\x20<manifest.json>'],[a230_0xdea0fd(0x100),a230_0xdea0fd(0xd0)],[a230_0xdea0fd(0x98),a230_0xdea0fd(0xa7)],[a230_0xdea0fd(0x9b),a230_0xdea0fd(0xec)],[a230_0xdea0fd(0xa9),'rabetbase\x20sql\x20create'],['menu:update',a230_0xdea0fd(0xc2)],['project:init',a230_0xdea0fd(0xaf)],[a230_0xdea0fd(0xd6),a230_0xdea0fd(0xdf)],[a230_0xdea0fd(0x106),a230_0xdea0fd(0xdf)],[a230_0xdea0fd(0x107),a230_0xdea0fd(0xdf)],[a230_0xdea0fd(0xe5),a230_0xdea0fd(0xdf)],[a230_0xdea0fd(0xa4),a230_0xdea0fd(0xab)],[a230_0xdea0fd(0xf9),a230_0xdea0fd(0xd5)],['app:remote',a230_0xdea0fd(0xf0)],['app:use',a230_0xdea0fd(0xc6)],[a230_0xdea0fd(0xfc),a230_0xdea0fd(0xeb)],[a230_0xdea0fd(0x95),a230_0xdea0fd(0xcc)],[a230_0xdea0fd(0xb6),a230_0xdea0fd(0x103)],['knowledge-base:detail',a230_0xdea0fd(0xf8)],[a230_0xdea0fd(0xa1),a230_0xdea0fd(0xae)],[a230_0xdea0fd(0xb9),a230_0xdea0fd(0xe8)],[a230_0xdea0fd(0x92),a230_0xdea0fd(0xe9)],[a230_0xdea0fd(0x9e),a230_0xdea0fd(0xf6)],['data:filter',a230_0xdea0fd(0xde)],[a230_0xdea0fd(0xa8),a230_0xdea0fd(0x102)],[a230_0xdea0fd(0xfd),a230_0xdea0fd(0x8f)],['page:react-create',a230_0xdea0fd(0xad)],[a230_0xdea0fd(0x87),a230_0xdea0fd(0xad)],[a230_0xdea0fd(0xda),a230_0xdea0fd(0x8c)],[a230_0xdea0fd(0xc7),a230_0xdea0fd(0xc3)],[a230_0xdea0fd(0xc4),a230_0xdea0fd(0x99)],[a230_0xdea0fd(0x105),a230_0xdea0fd(0xb2)]]),REMOVED_COMMAND_HINTS=new Map([[a230_0xdea0fd(0xc9),a230_0xdea0fd(0x8b)],[a230_0xdea0fd(0xa6),a230_0xdea0fd(0x8b)],[a230_0xdea0fd(0xfa),a230_0xdea0fd(0x104)],[a230_0xdea0fd(0xc5),a230_0xdea0fd(0xd4)],[a230_0xdea0fd(0xfe),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a230_0xdea0fd(0x86),a230_0xdea0fd(0xd4)],[a230_0xdea0fd(0xc1),a230_0xdea0fd(0xd4)],[a230_0xdea0fd(0xc8),a230_0xdea0fd(0xd4)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a230_0xdea0fd(0xfb),a230_0xdea0fd(0xd1)],[a230_0xdea0fd(0xb3),a230_0xdea0fd(0xdd)],[a230_0xdea0fd(0xb1),a230_0xdea0fd(0xf5)],[a230_0xdea0fd(0x90),a230_0xdea0fd(0xbb)],[a230_0xdea0fd(0xe1),a230_0xdea0fd(0xa3)]]);export function resolveRemovedCommand(_0x4b92b4,_0x14d982){const _0x3b45b1=a230_0xdea0fd;if(!_0x4b92b4)return undefined;const _0x13c350=REMOVED_COMMAND_REPLACEMENTS[_0x3b45b1(0xed)](_0x4b92b4+':'+(_0x14d982??'')),_0x2c28e5=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x3b45b1(0xed)](_0x4b92b4),_0x582673=_0x13c350??_0x2c28e5,_0x343ef2=REMOVED_COMMAND_HINTS[_0x3b45b1(0xed)](_0x4b92b4+':'+(_0x14d982??''));if(!_0x582673&&!_0x343ef2)return undefined;const _0x4cd699=_0x2c28e5?_0x4b92b4:_0x14d982?_0x4b92b4+'\x20'+_0x14d982:_0x4b92b4;return{'command':_0x4cd699,'message':'`rabetbase\x20'+_0x4cd699+'`\x20has\x20been\x20removed.','hint':_0x343ef2??_0x3b45b1(0x89)+_0x582673+_0x3b45b1(0xb5)};}export function findDefinition(_0x419533,_0x4d730f){const _0x9ffe17=a230_0xdea0fd;return definitions[_0x9ffe17(0xed)](_0x419533+':'+_0x4d730f);}export function isKnownService(_0x19c9f4){const _0x41c8d9=a230_0xdea0fd;return serviceByName[_0x41c8d9(0xdb)](_0x19c9f4);}export function isDeclarativeService(_0x2c9903){const _0x113d9d=a230_0xdea0fd;return serviceGroups[_0x113d9d(0xdb)](_0x2c9903)||serviceByName[_0x113d9d(0xed)](_0x2c9903)?.[_0x113d9d(0xbf)]!==undefined;}export function getServiceEntry(_0x346bfb){const _0x5225bd=a230_0xdea0fd;return serviceByName[_0x5225bd(0xed)](_0x346bfb);}export function getLegacyHandler(_0x49d6d6,_0x3df38f){return undefined;}export function getAllDefinitions(){const _0x1d4d4c=a230_0xdea0fd;return Array['from'](definitions[_0x1d4d4c(0xaa)]());}
1
+ const a230_0x52e481=a230_0x3f8c;(function(_0x1f3341,_0x3cd2c1){const _0x78b93f=a230_0x3f8c,_0x4b5fb2=_0x1f3341();while(!![]){try{const _0x4bdc76=-parseInt(_0x78b93f(0x1ad))/0x1+parseInt(_0x78b93f(0x1cc))/0x2*(parseInt(_0x78b93f(0x18e))/0x3)+-parseInt(_0x78b93f(0x1bc))/0x4+-parseInt(_0x78b93f(0x1bd))/0x5+-parseInt(_0x78b93f(0x1ba))/0x6*(parseInt(_0x78b93f(0x17e))/0x7)+parseInt(_0x78b93f(0x1b5))/0x8*(parseInt(_0x78b93f(0x185))/0x9)+parseInt(_0x78b93f(0x1c0))/0xa;if(_0x4bdc76===_0x3cd2c1)break;else _0x4b5fb2['push'](_0x4b5fb2['shift']());}catch(_0x12eb2e){_0x4b5fb2['push'](_0x4b5fb2['shift']());}}}(a230_0x4aac,0x1ce1e));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';function a230_0x3f8c(_0x4c23c3,_0x24433f){_0x4c23c3=_0x4c23c3-0x15f;const _0x4aac0d=a230_0x4aac();let _0x3f8c17=_0x4aac0d[_0x4c23c3];return _0x3f8c17;}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';function a230_0x4aac(){const _0xad8a8b=['page:react-publish','rabetbase\x20kb\x20delete','Diagnostics','preview','dataset:generate-status','page:react-list','`rabetbase\x20','rabetbase\x20kb\x20update','rabetbase\x20dataset\x20design-status\x20--operation-id\x20<id>','write','bff:new','permit:role-apis-set','permit:role-menus','File','wildcardDef','rabetbase\x20run\x20start','app:remote','rabetbase\x20run\x20preview','This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.','rabetbase\x20dataset\x20design-start\x20--file\x20<manifest.json>','page:standard-page-status','values','Run\x20Scripts','risk','skills:','Database\x20Connections','service','Backend\x20Function\x20Scripts','page:react-detail','command','set','knowledge-base:list','Project','Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.','Company\x20Knowledge\x20Base','show','Self\x20Update','sql:save','app:use','knowledge-base:detail','login','app:assets-update','72275SByUGK','read','get','permit:page-set','data:getOne','rabetbase\x20page\x20data-list-status','Dataset\x20&\x20Operations','149409uuGAsB','OCR','API\x20Development','App\x20Management','rabetbase\x20page\x20custom-update','Platform\x20Issue','build','`\x20has\x20been\x20removed.','skill:','3cnxYnT','data:filter','page:custom-create','rabetbase\x20menu\x20asset-update','SQL\x20Queries','page:react-create','length','app:add','rabetbase\x20sql\x20create','rabetbase\x20kb\x20list','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','defaultCommand','Instant\x20API\x20Policy','logout','Run\x20any\x20package.json\x20script','isSingleCommand','permit:page-get','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','filter','\x20\x20[write]','rabetbase\x20kb\x20detail','User\x20Accounts','`\x20instead.','rabetbase\x20run\x20build','app:assets-status','Schema','push','Logs','flow:disable','has','rabetbase\x20cli-skill\x20install','158135tFhSbS','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','rabetbase\x20workspace\x20use\x20--app\x20<name>','deployment:sync','Approval\x20Flows','menu:update','rabetbase\x20page\x20custom-publish','Code\x20Generation','112kHGQzM','Agent\x20Context\x20Rules','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','project:init','Configuration','114gMDXGe','hidden','235756doZeqZ','1094340IbAyWN','skill:install','Deployment','3994240WtTPiE','rabetbase\x20menu\x20subapp-assets-update\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>\x20--resources\x20\x27<json>\x27','rabetbase\x20app\x20list\x20--remote','role:create','permit:role-menus-set','rabetbase\x20role\x20list','page:react-update','start','skills:install','rabetbase\x20kb\x20create','knowledge-base:create','Tenant\x20Members','237162IcxNMn','<script>','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','Notification\x20Configuration','Menu'];a230_0x4aac=function(){return _0xad8a8b;};return a230_0x4aac();}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(_0x128f6a){const _0x3a6575=a230_0x3f8c;for(const _0x5e1c3b of _0x128f6a){definitions['set'](_0x5e1c3b[_0x3a6575(0x16e)]+':'+_0x5e1c3b[_0x3a6575(0x171)],_0x5e1c3b);let _0x52a88d=serviceGroups[_0x3a6575(0x180)](_0x5e1c3b[_0x3a6575(0x16e)]);!_0x52a88d&&(_0x52a88d=[],serviceGroups[_0x3a6575(0x172)](_0x5e1c3b[_0x3a6575(0x16e)],_0x52a88d)),_0x52a88d[_0x3a6575(0x1a8)](_0x5e1c3b);}}function registerDeclarativeService(_0x50d804,_0x55616c,_0x113b75){const _0x310aad=a230_0x3f8c;registerDefinitions(_0x55616c);_0x113b75?.[_0x310aad(0x162)]&&registerDefinitions([_0x113b75[_0x310aad(0x162)]]);const _0x41516e=_0x905e18=>_0x905e18===_0x310aad(0x17f)?'':_0x905e18===_0x310aad(0x1da)?_0x310aad(0x1a1):'\x20\x20[high-risk-write]',_0x3e5653={'service':_0x55616c[0x0][_0x310aad(0x16e)],'label':_0x50d804,'commands':_0x55616c[_0x310aad(0x1a0)](_0x5669f3=>!_0x5669f3[_0x310aad(0x1bb)])['map'](_0x394a04=>({'command':_0x394a04['command'],'description':_0x394a04['description'],'tag':_0x41516e(_0x394a04[_0x310aad(0x16b)])})),'declarative':!![],'defaultCommand':_0x113b75?.[_0x310aad(0x199)]??(_0x113b75?.[_0x310aad(0x19d)]?_0x55616c[0x0][_0x310aad(0x171)]:undefined),'wildcardDef':_0x113b75?.[_0x310aad(0x162)],'isSingleCommand':_0x113b75?.[_0x310aad(0x19d)]};serviceRegistry[_0x310aad(0x1a8)](_0x3e5653),serviceByName[_0x310aad(0x172)](_0x3e5653[_0x310aad(0x16e)],_0x3e5653);}registerDeclarativeService(a230_0x52e481(0x174),projectDefinitions),registerDeclarativeService('Workspace',workspaceDefinitions),registerDeclarativeService(a230_0x52e481(0x188),appDefinitions),registerDeclarativeService('Authentication',authDefinitions,{'defaultCommand':a230_0x52e481(0x17c)}),registerDeclarativeService(a230_0x52e481(0x1cb),tenantDefinitions),registerDeclarativeService(a230_0x52e481(0x1a3),userAccountDefinitions),registerDeclarativeService(a230_0x52e481(0x184),datasetDefinitions),registerDeclarativeService('Data\x20List\x20Pages\x20&\x20Custom\x20Pages',pageDefinitions),registerDeclarativeService(a230_0x52e481(0x187),apiDefinitions),registerDeclarativeService(a230_0x52e481(0x16f),bffDefinitions),registerDeclarativeService(a230_0x52e481(0x19a),instantApiPolicyDefinitions),registerDeclarativeService(a230_0x52e481(0x1cf),notificationDefinitions),registerDeclarativeService(a230_0x52e481(0x192),sqlDefinitions),registerDeclarativeService(a230_0x52e481(0x16d),dbDefinitions),registerDeclarativeService(a230_0x52e481(0x1bf),deploymentDefinitions),registerDeclarativeService(a230_0x52e481(0x1d0),menuDefinitions),registerDeclarativeService('Async\x20Tasks',taskDefinitions),registerDeclarativeService('Roles',roleDefinitions),registerDeclarativeService('Runtime\x20App\x20Config\x20Management',appConfigDefinitions),registerDeclarativeService(a230_0x52e481(0x176),kbDefinitions),registerDeclarativeService(a230_0x52e481(0x1b6),ruleDefinitions),registerDeclarativeService(a230_0x52e481(0x18a),issueDefinitions),registerDeclarativeService(a230_0x52e481(0x161),fileDefinitions),registerDeclarativeService(a230_0x52e481(0x186),ocrDefinitions),registerDeclarativeService(a230_0x52e481(0x1b4),codegenDefinitions),registerDeclarativeService(a230_0x52e481(0x1b9),configDefinitions),registerDeclarativeService(a230_0x52e481(0x1d3),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0x52e481(0x1a7),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a230_0x52e481(0x178),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':'install'}),registerDeclarativeService(a230_0x52e481(0x1b1),flowDefinitions),registerDeclarativeService(a230_0x52e481(0x1a9),logsDefinitions,{'defaultCommand':a230_0x52e481(0x177)}),registerDeclarativeService(a230_0x52e481(0x16a),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a230_0x52e481(0x194)]-0x1];last['commands']=[{'command':a230_0x52e481(0x1cd),'description':a230_0x52e481(0x19c),'tag':'\x20\x20['+runDefinition[a230_0x52e481(0x16b)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([['dataset:generate-start',a230_0x52e481(0x167)],[a230_0x52e481(0x1d5),a230_0x52e481(0x1d9)],[a230_0x52e481(0x179),'rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml'],[a230_0x52e481(0x1db),'rabetbase\x20bff\x20create'],['sql:new',a230_0x52e481(0x196)],[a230_0x52e481(0x1b2),a230_0x52e481(0x191)],[a230_0x52e481(0x1b8),a230_0x52e481(0x1b7)],[a230_0x52e481(0x18d),a230_0x52e481(0x1ac)],[a230_0x52e481(0x1be),a230_0x52e481(0x1ac)],[a230_0x52e481(0x16c),a230_0x52e481(0x1ac)],[a230_0x52e481(0x1c8),'rabetbase\x20cli-skill\x20install'],[a230_0x52e481(0x1a6),'rabetbase\x20menu\x20subapp-assets-status\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>'],[a230_0x52e481(0x17d),a230_0x52e481(0x1c1)],[a230_0x52e481(0x164),a230_0x52e481(0x1c2)],[a230_0x52e481(0x17a),a230_0x52e481(0x1af)],[a230_0x52e481(0x195),a230_0x52e481(0x198)],['app:remove','rabetbase\x20workspace\x20remove\x20<name>'],[a230_0x52e481(0x173),a230_0x52e481(0x197)],[a230_0x52e481(0x17b),a230_0x52e481(0x1a2)],[a230_0x52e481(0x1ca),a230_0x52e481(0x1c9)],['knowledge-base:update',a230_0x52e481(0x1d8)],['knowledge-base:delete',a230_0x52e481(0x1d2)],[a230_0x52e481(0x1c3),a230_0x52e481(0x1c5)],[a230_0x52e481(0x18f),a230_0x52e481(0x1ce)],[a230_0x52e481(0x182),'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27'],[a230_0x52e481(0x168),a230_0x52e481(0x183)],[a230_0x52e481(0x193),'rabetbase\x20page\x20create\x20--page-pattern\x20BLANK'],[a230_0x52e481(0x190),a230_0x52e481(0x1ae)],[a230_0x52e481(0x1d6),'rabetbase\x20page\x20custom-list'],[a230_0x52e481(0x170),'rabetbase\x20page\x20custom-detail'],[a230_0x52e481(0x1c6),a230_0x52e481(0x189)],[a230_0x52e481(0x1d1),a230_0x52e481(0x1b3)]]),REMOVED_COMMAND_HINTS=new Map([['flow:enable',a230_0x52e481(0x166)],[a230_0x52e481(0x1aa),a230_0x52e481(0x166)],[a230_0x52e481(0x1b0),a230_0x52e481(0x175)],[a230_0x52e481(0x19e),a230_0x52e481(0x19f)],[a230_0x52e481(0x181),a230_0x52e481(0x19f)],[a230_0x52e481(0x160),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a230_0x52e481(0x1c4),a230_0x52e481(0x19f)],[a230_0x52e481(0x15f),a230_0x52e481(0x19f)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([['create','rabetbase\x20project\x20create\x20<project-name>'],[a230_0x52e481(0x1c7),a230_0x52e481(0x163)],[a230_0x52e481(0x18b),a230_0x52e481(0x1a5)],[a230_0x52e481(0x1d4),a230_0x52e481(0x165)],[a230_0x52e481(0x19b),'rabetbase\x20auth\x20logout']]);export function resolveRemovedCommand(_0x38c4fc,_0x469188){const _0x66b71f=a230_0x52e481;if(!_0x38c4fc)return undefined;const _0x464317=REMOVED_COMMAND_REPLACEMENTS[_0x66b71f(0x180)](_0x38c4fc+':'+(_0x469188??'')),_0xa4a0c9=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x66b71f(0x180)](_0x38c4fc),_0x2f6b8c=_0x464317??_0xa4a0c9,_0x46cfd7=REMOVED_COMMAND_HINTS['get'](_0x38c4fc+':'+(_0x469188??''));if(!_0x2f6b8c&&!_0x46cfd7)return undefined;const _0x16812e=_0xa4a0c9?_0x38c4fc:_0x469188?_0x38c4fc+'\x20'+_0x469188:_0x38c4fc;return{'command':_0x16812e,'message':_0x66b71f(0x1d7)+_0x16812e+_0x66b71f(0x18c),'hint':_0x46cfd7??'Use\x20`'+_0x2f6b8c+_0x66b71f(0x1a4)};}export function findDefinition(_0x36b0de,_0x26dfbf){return definitions['get'](_0x36b0de+':'+_0x26dfbf);}export function isKnownService(_0x97a98){const _0x430ccc=a230_0x52e481;return serviceByName[_0x430ccc(0x1ab)](_0x97a98);}export function isDeclarativeService(_0x4a90bf){const _0x2e7cdb=a230_0x52e481;return serviceGroups[_0x2e7cdb(0x1ab)](_0x4a90bf)||serviceByName[_0x2e7cdb(0x180)](_0x4a90bf)?.[_0x2e7cdb(0x162)]!==undefined;}export function getServiceEntry(_0x394ca1){const _0x520073=a230_0x52e481;return serviceByName[_0x520073(0x180)](_0x394ca1);}export function getLegacyHandler(_0x3c7250,_0x33e245){return undefined;}export function getAllDefinitions(){const _0x3fc156=a230_0x52e481;return Array['from'](definitions[_0x3fc156(0x169)]());}
@@ -1 +1 @@
1
- const a231_0x584c51=a231_0x2475;(function(_0x19f55d,_0x44105d){const _0x2c89d9=a231_0x2475,_0x21eda7=_0x19f55d();while(!![]){try{const _0xc0f5d6=parseInt(_0x2c89d9(0xf6))/0x1+parseInt(_0x2c89d9(0x107))/0x2+parseInt(_0x2c89d9(0xf8))/0x3*(parseInt(_0x2c89d9(0xf4))/0x4)+-parseInt(_0x2c89d9(0x105))/0x5*(-parseInt(_0x2c89d9(0x109))/0x6)+-parseInt(_0x2c89d9(0xfd))/0x7+-parseInt(_0x2c89d9(0x104))/0x8*(parseInt(_0x2c89d9(0xfa))/0x9)+parseInt(_0x2c89d9(0x100))/0xa*(-parseInt(_0x2c89d9(0x102))/0xb);if(_0xc0f5d6===_0x44105d)break;else _0x21eda7['push'](_0x21eda7['shift']());}catch(_0x48a2d6){_0x21eda7['push'](_0x21eda7['shift']());}}}(a231_0xefef,0xca96f));function a231_0x2475(_0x53221c,_0x3d965a){_0x53221c=_0x53221c-0xf4;const _0xefefbd=a231_0xefef();let _0x2475fa=_0xefefbd[_0x53221c];return _0x2475fa;}import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a231_0xefef(){const _0x586c8e=['964TdBFKh','dev','311303PEeTlt','Deleted\x20role\x20','11619Bqzejr','/smartapi/permit/role/delete','6360381VQyASw','num','Role\x20still\x20has\x20','3767379VAJczk','role','POST','7082110ubPDiG','delete','11ljcKEX','userCount','8vBNBEw','4362415RNfJIK','roleName','1331490CAYpXx','appCode','6BnLliO'];a231_0xefef=function(){return _0x586c8e;};return a231_0xefef();}const DELETE_PATH=a231_0x584c51(0xf9);export const roleDelete={'service':a231_0x584c51(0xfe),'command':a231_0x584c51(0x101),'description':'Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','risk':'high-risk-write','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x1f203a){const _0x395846=a231_0x584c51,_0x342de6=_0x1f203a[_0x395846(0xfb)]('id'),_0x2e1fbd=await getRoleById(_0x1f203a[_0x395846(0x108)],_0x342de6);return assertCustomRole(_0x2e1fbd,_0x395846(0x101)),asDryRunResult({'scope':'dev','operation':_0x395846(0x101),'selector':{'appCode':_0x1f203a[_0x395846(0x108)],'roleId':_0x342de6,'roleName':_0x2e1fbd[_0x395846(0x106)]},'before':projectRole(_0x2e1fbd),'after':null,'dryRun':!![],'backend':{'method':_0x395846(0xff),'path':DELETE_PATH},'warnings':_0x2e1fbd[_0x395846(0x103)]>0x0?[_0x395846(0xfc)+_0x2e1fbd[_0x395846(0x103)]+'\x20member(s);\x20they\x20will\x20lose\x20this\x20group.']:[]},{'method':_0x395846(0xff),'url':DELETE_PATH});},async 'execute'(_0x4ea5d1){const _0x3f7643=a231_0x584c51,_0x10e7db=_0x4ea5d1['num']('id'),_0x2bba6a=await getRoleById(_0x4ea5d1[_0x3f7643(0x108)],_0x10e7db);return assertCustomRole(_0x2bba6a,_0x3f7643(0x101)),await deleteAppRole(_0x10e7db),{'ok':!![],'data':{'scope':_0x3f7643(0xf5),'operation':'delete','selector':{'appCode':_0x4ea5d1[_0x3f7643(0x108)],'roleId':_0x10e7db,'roleName':_0x2bba6a[_0x3f7643(0x106)]},'before':projectRole(_0x2bba6a),'after':null,'dryRun':![],'backend':{'method':_0x3f7643(0xff),'path':DELETE_PATH},'warnings':[]},'message':_0x3f7643(0xf7)+_0x2bba6a[_0x3f7643(0x106)]+'\x20(id='+_0x10e7db+')'};}};
1
+ const a231_0x313d39=a231_0x4de2;(function(_0x4bc1bf,_0x104959){const _0x193f07=a231_0x4de2,_0x5d9195=_0x4bc1bf();while(!![]){try{const _0x5e57e9=parseInt(_0x193f07(0x1ed))/0x1+-parseInt(_0x193f07(0x1ea))/0x2+-parseInt(_0x193f07(0x1df))/0x3+parseInt(_0x193f07(0x1dd))/0x4+-parseInt(_0x193f07(0x1da))/0x5*(-parseInt(_0x193f07(0x1e9))/0x6)+-parseInt(_0x193f07(0x1d9))/0x7+-parseInt(_0x193f07(0x1e1))/0x8*(-parseInt(_0x193f07(0x1ec))/0x9);if(_0x5e57e9===_0x104959)break;else _0x5d9195['push'](_0x5d9195['shift']());}catch(_0xef3e9b){_0x5d9195['push'](_0x5d9195['shift']());}}}(a231_0x4800,0xa31d8));function a231_0x4de2(_0x489cc5,_0x2822ca){_0x489cc5=_0x489cc5-0x1d9;const _0x4800b3=a231_0x4800();let _0x4de23a=_0x4800b3[_0x489cc5];return _0x4de23a;}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='/smartapi/permit/role/delete';export const roleDelete={'service':a231_0x313d39(0x1ee),'command':a231_0x313d39(0x1eb),'description':a231_0x313d39(0x1de),'risk':a231_0x313d39(0x1e0),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0xadb008){const _0x310e76=a231_0x313d39,_0x161e8b=_0xadb008[_0x310e76(0x1e7)]('id'),_0xbc918f=await getRoleById(_0xadb008['appCode'],_0x161e8b);return assertCustomRole(_0xbc918f,_0x310e76(0x1eb)),asDryRunResult({'scope':_0x310e76(0x1dc),'operation':_0x310e76(0x1eb),'selector':{'appCode':_0xadb008[_0x310e76(0x1db)],'roleId':_0x161e8b,'roleName':_0xbc918f[_0x310e76(0x1e8)]},'before':projectRole(_0xbc918f),'after':null,'dryRun':!![],'backend':{'method':_0x310e76(0x1e6),'path':DELETE_PATH},'warnings':_0xbc918f['userCount']>0x0?[_0x310e76(0x1e5)+_0xbc918f[_0x310e76(0x1e2)]+_0x310e76(0x1e3)]:[]},{'method':_0x310e76(0x1e6),'url':DELETE_PATH});},async 'execute'(_0x3129ad){const _0x55217a=a231_0x313d39,_0x4088b0=_0x3129ad['num']('id'),_0x1fac54=await getRoleById(_0x3129ad[_0x55217a(0x1db)],_0x4088b0);return assertCustomRole(_0x1fac54,_0x55217a(0x1eb)),await deleteAppRole(_0x4088b0),{'ok':!![],'data':{'scope':_0x55217a(0x1dc),'operation':_0x55217a(0x1eb),'selector':{'appCode':_0x3129ad[_0x55217a(0x1db)],'roleId':_0x4088b0,'roleName':_0x1fac54[_0x55217a(0x1e8)]},'before':projectRole(_0x1fac54),'after':null,'dryRun':![],'backend':{'method':_0x55217a(0x1e6),'path':DELETE_PATH},'warnings':[]},'message':'Deleted\x20role\x20'+_0x1fac54[_0x55217a(0x1e8)]+_0x55217a(0x1e4)+_0x4088b0+')'};}};function a231_0x4800(){const _0xf080c1=['num','roleName','12xiXXgw','2149948nTXZhN','delete','9040347Fcrsgw','1110611mgzkZo','role','8326619gzyJmb','987955EJFJdF','appCode','dev','3302840LCmxoP','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','1210125uoYPyo','high-risk-write','8gRnhTS','userCount','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','\x20(id=','Role\x20still\x20has\x20','POST'];a231_0x4800=function(){return _0xf080c1;};return a231_0x4800();}
@@ -1 +1 @@
1
- function a232_0x4e91(_0x2e9841,_0x21986e){_0x2e9841=_0x2e9841-0x10c;const _0x1f8a87=a232_0x1f8a();let _0x4e91e6=_0x1f8a87[_0x2e9841];return _0x4e91e6;}function a232_0x1f8a(){const _0x452568=['591124zLLHap','Show\x20a\x20single\x20role\x27s\x20detail','1092VquOVs','33516750FRyKsn','267580nSiqGb','Role\x20','appCode','roleType','read','4211259urSXyM','detail','4PDRzPs','5607RfkpdB','5769834CcEaJI','18952Oeogbu','17060qeegbf','num','roleName'];a232_0x1f8a=function(){return _0x452568;};return a232_0x1f8a();}const a232_0x4f377a=a232_0x4e91;(function(_0x2676ff,_0x2ebc97){const _0x428f56=a232_0x4e91,_0x329522=_0x2676ff();while(!![]){try{const _0x3e1c02=parseInt(_0x428f56(0x11b))/0x1*(-parseInt(_0x428f56(0x110))/0x2)+-parseInt(_0x428f56(0x119))/0x3+parseInt(_0x428f56(0x114))/0x4+parseInt(_0x428f56(0x10d))/0x5*(-parseInt(_0x428f56(0x112))/0x6)+-parseInt(_0x428f56(0x11d))/0x7+-parseInt(_0x428f56(0x10c))/0x8*(-parseInt(_0x428f56(0x11c))/0x9)+parseInt(_0x428f56(0x113))/0xa;if(_0x3e1c02===_0x2ebc97)break;else _0x329522['push'](_0x329522['shift']());}catch(_0x3e5b69){_0x329522['push'](_0x329522['shift']());}}}(a232_0x1f8a,0xd2bea));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':'role','command':a232_0x4f377a(0x11a),'description':a232_0x4f377a(0x111),'risk':a232_0x4f377a(0x118),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x40bfee){const _0x1ba50c=a232_0x4f377a,_0x32ea4f=_0x40bfee[_0x1ba50c(0x10e)]('id'),_0x280fe4=await getRoleById(_0x40bfee[_0x1ba50c(0x116)],_0x32ea4f);return{'ok':!![],'data':{'scope':'dev','role':projectRole(_0x280fe4)},'message':_0x1ba50c(0x115)+_0x280fe4[_0x1ba50c(0x10f)]+'\x20('+_0x280fe4[_0x1ba50c(0x117)]+')'};}};
1
+ const a232_0x433962=a232_0x7bde;(function(_0x35505a,_0x3416a9){const _0x35fb4f=a232_0x7bde,_0xc56ebd=_0x35505a();while(!![]){try{const _0x369863=parseInt(_0x35fb4f(0x102))/0x1*(-parseInt(_0x35fb4f(0xfa))/0x2)+parseInt(_0x35fb4f(0xfd))/0x3+-parseInt(_0x35fb4f(0xfe))/0x4*(-parseInt(_0x35fb4f(0xf7))/0x5)+-parseInt(_0x35fb4f(0xff))/0x6+-parseInt(_0x35fb4f(0x101))/0x7+-parseInt(_0x35fb4f(0xf3))/0x8+parseInt(_0x35fb4f(0xf8))/0x9;if(_0x369863===_0x3416a9)break;else _0xc56ebd['push'](_0xc56ebd['shift']());}catch(_0x4cd405){_0xc56ebd['push'](_0xc56ebd['shift']());}}}(a232_0x34e8,0x5174c));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a232_0x7bde(_0x2e91df,_0x554f8a){_0x2e91df=_0x2e91df-0xf1;const _0x34e820=a232_0x34e8();let _0x7bdeff=_0x34e820[_0x2e91df];return _0x7bdeff;}function a232_0x34e8(){const _0x343802=['288204kYDLOU','dev','1341480ymGlRI','651613NYrOwV','detail','roleName','4262144IszMNB','read','roleType','num','1698445jgfZGZ','8482554vPoMEg','Role\x20','2KaqyNo','appCode','Show\x20a\x20single\x20role\x27s\x20detail','1426512OJuAyK','4XBnZTA'];a232_0x34e8=function(){return _0x343802;};return a232_0x34e8();}import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':'role','command':a232_0x433962(0xf1),'description':a232_0x433962(0xfc),'risk':a232_0x433962(0xf4),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5917a6){const _0x392c38=a232_0x433962,_0x43a865=_0x5917a6[_0x392c38(0xf6)]('id'),_0x42f9dc=await getRoleById(_0x5917a6[_0x392c38(0xfb)],_0x43a865);return{'ok':!![],'data':{'scope':_0x392c38(0x100),'role':projectRole(_0x42f9dc)},'message':_0x392c38(0xf9)+_0x42f9dc[_0x392c38(0xf2)]+'\x20('+_0x42f9dc[_0x392c38(0xf5)]+')'};}};
@@ -1 +1 @@
1
- function a233_0x5494(){const _0x5523b8=['268404zuUCtN','4613xRYpwO','625816aIFxTF','583749aOKeQI','294955rYnGbd','1595000Yzkyif','3752jcnNLz','1721715lNCZAw'];a233_0x5494=function(){return _0x5523b8;};return a233_0x5494();}(function(_0x52eb9b,_0xca0d4b){const _0x37d751=a233_0x5cde,_0x452477=_0x52eb9b();while(!![]){try{const _0x54cc4e=parseInt(_0x37d751(0x14c))/0x1+-parseInt(_0x37d751(0x14a))/0x2+-parseInt(_0x37d751(0x14b))/0x3+parseInt(_0x37d751(0x14d))/0x4+parseInt(_0x37d751(0x14f))/0x5+parseInt(_0x37d751(0x148))/0x6+-parseInt(_0x37d751(0x149))/0x7*(parseInt(_0x37d751(0x14e))/0x8);if(_0x54cc4e===_0xca0d4b)break;else _0x452477['push'](_0x452477['shift']());}catch(_0x28948b){_0x452477['push'](_0x452477['shift']());}}}(a233_0x5494,0x40fec));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';function a233_0x5cde(_0x14c057,_0x57ee24){_0x14c057=_0x14c057-0x148;const _0x5494e2=a233_0x5494();let _0x5cde3f=_0x5494e2[_0x14c057];return _0x5cde3f;}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(_0x401911,_0x1ca192){const _0x4a63cf=a233_0x4b8a,_0x342eb2=_0x401911();while(!![]){try{const _0x19cbc1=parseInt(_0x4a63cf(0xfd))/0x1+-parseInt(_0x4a63cf(0xfe))/0x2+-parseInt(_0x4a63cf(0x101))/0x3+parseInt(_0x4a63cf(0xfb))/0x4*(parseInt(_0x4a63cf(0xff))/0x5)+parseInt(_0x4a63cf(0xfc))/0x6*(parseInt(_0x4a63cf(0x102))/0x7)+-parseInt(_0x4a63cf(0x100))/0x8+parseInt(_0x4a63cf(0xfa))/0x9;if(_0x19cbc1===_0x1ca192)break;else _0x342eb2['push'](_0x342eb2['shift']());}catch(_0x271c79){_0x342eb2['push'](_0x342eb2['shift']());}}}(a233_0x180c,0xcd7aa));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';function a233_0x180c(){const _0x54ebe6=['1537116gwQuBD','240415qBRSyn','10831080BIQxNI','2987802hohUHK','46249rEXCzl','13020417aMtqMq','28JFYikm','696kZLJap','1410313gNVwBT'];a233_0x180c=function(){return _0x54ebe6;};return a233_0x180c();}function a233_0x4b8a(_0x54033f,_0x4103fb){_0x54033f=_0x54033f-0xfa;const _0x180c98=a233_0x180c();let _0x4b8a8f=_0x180c98[_0x54033f];return _0x4b8a8f;}import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
@@ -1 +1 @@
1
- const a234_0x151818=a234_0x313f;function a234_0x18f3(){const _0xbb2ad9=['--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','\x20role(s)','Page\x20index\x20(1-based)','Invalid\x20--type\x20\x22','659853yiNkjF','Use\x20one\x20of:\x20','2028750MibRlW','validation','ADMIN','OWNER','8AOYQdy','CUSTOM','Filter\x20by\x20role\x20type','number','list','string','666690CYIBFG','Found\x20','join','page','type','pagesize','Page\x20size\x20(1-100)','map','4333194gFWMyp','2lmuQIc','1717872TXzCjE','trim','11bdcpsW','str','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','includes','filter','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','toUpperCase','21452150gVDZqy','2849360hIVfEd','DEV','14UtrldA','num','roleType'];a234_0x18f3=function(){return _0xbb2ad9;};return a234_0x18f3();}(function(_0x4b7e5b,_0x1cc146){const _0x2e72ee=a234_0x313f,_0x2bebe0=_0x4b7e5b();while(!![]){try{const _0x1f189a=-parseInt(_0x2e72ee(0x189))/0x1+-parseInt(_0x2e72ee(0x192))/0x2*(parseInt(_0x2e72ee(0x17d))/0x3)+parseInt(_0x2e72ee(0x174))/0x4+-parseInt(_0x2e72ee(0x17f))/0x5+-parseInt(_0x2e72ee(0x193))/0x6*(parseInt(_0x2e72ee(0x176))/0x7)+-parseInt(_0x2e72ee(0x183))/0x8*(parseInt(_0x2e72ee(0x191))/0x9)+-parseInt(_0x2e72ee(0x173))/0xa*(-parseInt(_0x2e72ee(0x16c))/0xb);if(_0x1f189a===_0x1cc146)break;else _0x2bebe0['push'](_0x2bebe0['shift']());}catch(_0x48db1f){_0x2bebe0['push'](_0x2bebe0['shift']());}}}(a234_0x18f3,0x7cc62));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a234_0x313f(_0x3b7d02,_0xde5d9c){_0x3b7d02=_0x3b7d02-0x16b;const _0x18f3da=a234_0x18f3();let _0x313f79=_0x18f3da[_0x3b7d02];return _0x313f79;}import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a234_0x151818(0x181),a234_0x151818(0x175),a234_0x151818(0x182),a234_0x151818(0x184)];export const roleList={'service':'role','command':a234_0x151818(0x187),'description':a234_0x151818(0x16e),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a234_0x151818(0x188),'required':![],'description':a234_0x151818(0x185),'enum':ROLE_TYPES},{'name':'page','type':a234_0x151818(0x186),'description':a234_0x151818(0x17b),'default':0x1},{'name':a234_0x151818(0x18e),'type':a234_0x151818(0x186),'description':a234_0x151818(0x18f),'default':0x64}],async 'validate'(_0x663ce3){const _0x383056=a234_0x151818,_0x3cfe0c=_0x663ce3[_0x383056(0x16d)](_0x383056(0x18d))['trim']();if(_0x3cfe0c&&!ROLE_TYPES[_0x383056(0x16f)](_0x3cfe0c[_0x383056(0x172)]()))throw CliErrors[_0x383056(0x180)](_0x383056(0x17c)+_0x3cfe0c+'\x22.',_0x383056(0x17e)+ROLE_TYPES[_0x383056(0x18b)](',\x20')+'.');const _0xe846be=_0x663ce3['num'](_0x383056(0x18c),0x1),_0x333c33=_0x663ce3['num']('pagesize',0x64);if(_0xe846be<0x1)throw CliErrors['validation'](_0x383056(0x171));if(_0x333c33<0x1||_0x333c33>0x64)throw CliErrors[_0x383056(0x180)](_0x383056(0x179));},async 'execute'(_0x587e9d){const _0x4d13d2=a234_0x151818,_0x2def81=_0x587e9d[_0x4d13d2(0x177)](_0x4d13d2(0x18c),0x1)||0x1,_0x407cc8=_0x587e9d[_0x4d13d2(0x177)](_0x4d13d2(0x18e),0x64)||0x64,_0x12e612=_0x587e9d[_0x4d13d2(0x16d)](_0x4d13d2(0x18d))[_0x4d13d2(0x16b)]()[_0x4d13d2(0x172)](),{items:_0x542078,paging:_0x2acf8d}=await listAppRoles(_0x587e9d['appCode'],{'currentPage':_0x2def81,'pageSize':_0x407cc8}),_0x601e29=_0x12e612?_0x542078[_0x4d13d2(0x170)](_0x530b8f=>_0x530b8f[_0x4d13d2(0x178)]===_0x12e612):_0x542078,_0x234784=_0x601e29[_0x4d13d2(0x190)](projectRole);return{'ok':!![],'data':{'scope':'dev','roles':_0x234784,'paging':_0x2acf8d},'message':_0x4d13d2(0x18a)+_0x234784['length']+_0x4d13d2(0x17a)};}};
1
+ const a234_0x2734bf=a234_0x15b0;function a234_0x1f50(){const _0x2dfbe1=['appCode','4YslMRg','number','string','352CddGDo','CUSTOM','str','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','Page\x20index\x20(1-based)','type','read','876WKWTlk','join','list','num','filter','roleType','2519444fhLQNg','pagesize','includes','21686740aGrHpe','page','1382238tbBOIO','validation','Invalid\x20--type\x20\x22','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','56861NqJoGe','Found\x20','ADMIN','22430jquclF','7321239zWqxjL','843503jKPaGc','OWNER','role','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','trim','Use\x20one\x20of:\x20','11BiwNVh','length','toUpperCase'];a234_0x1f50=function(){return _0x2dfbe1;};return a234_0x1f50();}function a234_0x15b0(_0x555664,_0x90bcb7){_0x555664=_0x555664-0x11f;const _0x1f50f0=a234_0x1f50();let _0x15b056=_0x1f50f0[_0x555664];return _0x15b056;}(function(_0x441517,_0x327c77){const _0x597f49=a234_0x15b0,_0x2e7ee2=_0x441517();while(!![]){try{const _0x3e2fc2=-parseInt(_0x597f49(0x139))/0x1+parseInt(_0x597f49(0x143))/0x2*(-parseInt(_0x597f49(0x130))/0x3)+parseInt(_0x597f49(0x12b))/0x4+-parseInt(_0x597f49(0x137))/0x5*(-parseInt(_0x597f49(0x125))/0x6)+-parseInt(_0x597f49(0x134))/0x7*(parseInt(_0x597f49(0x146))/0x8)+-parseInt(_0x597f49(0x138))/0x9+-parseInt(_0x597f49(0x12e))/0xa*(-parseInt(_0x597f49(0x13f))/0xb);if(_0x3e2fc2===_0x327c77)break;else _0x2e7ee2['push'](_0x2e7ee2['shift']());}catch(_0x50c9ce){_0x2e7ee2['push'](_0x2e7ee2['shift']());}}}(a234_0x1f50,0x7e5ed));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a234_0x2734bf(0x136),'DEV',a234_0x2734bf(0x13a),a234_0x2734bf(0x11f)];export const roleList={'service':a234_0x2734bf(0x13b),'command':a234_0x2734bf(0x127),'description':a234_0x2734bf(0x13c),'risk':a234_0x2734bf(0x124),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a234_0x2734bf(0x123),'type':a234_0x2734bf(0x145),'required':![],'description':'Filter\x20by\x20role\x20type','enum':ROLE_TYPES},{'name':a234_0x2734bf(0x12f),'type':a234_0x2734bf(0x144),'description':a234_0x2734bf(0x122),'default':0x1},{'name':a234_0x2734bf(0x12c),'type':a234_0x2734bf(0x144),'description':'Page\x20size\x20(1-100)','default':0x64}],async 'validate'(_0x1258fc){const _0x39efe3=a234_0x2734bf,_0x2c1f90=_0x1258fc[_0x39efe3(0x120)]('type')[_0x39efe3(0x13d)]();if(_0x2c1f90&&!ROLE_TYPES[_0x39efe3(0x12d)](_0x2c1f90['toUpperCase']()))throw CliErrors[_0x39efe3(0x131)](_0x39efe3(0x132)+_0x2c1f90+'\x22.',_0x39efe3(0x13e)+ROLE_TYPES[_0x39efe3(0x126)](',\x20')+'.');const _0x2c7aca=_0x1258fc[_0x39efe3(0x128)]('page',0x1),_0xd2d724=_0x1258fc[_0x39efe3(0x128)](_0x39efe3(0x12c),0x64);if(_0x2c7aca<0x1)throw CliErrors['validation'](_0x39efe3(0x121));if(_0xd2d724<0x1||_0xd2d724>0x64)throw CliErrors['validation'](_0x39efe3(0x133));},async 'execute'(_0x3507fb){const _0x68ac4b=a234_0x2734bf,_0x29f433=_0x3507fb[_0x68ac4b(0x128)](_0x68ac4b(0x12f),0x1)||0x1,_0x48493c=_0x3507fb[_0x68ac4b(0x128)](_0x68ac4b(0x12c),0x64)||0x64,_0x46e63c=_0x3507fb[_0x68ac4b(0x120)](_0x68ac4b(0x123))[_0x68ac4b(0x13d)]()[_0x68ac4b(0x141)](),{items:_0x4de313,paging:_0x2b01ef}=await listAppRoles(_0x3507fb[_0x68ac4b(0x142)],{'currentPage':_0x29f433,'pageSize':_0x48493c}),_0x36f1d2=_0x46e63c?_0x4de313[_0x68ac4b(0x129)](_0x871adf=>_0x871adf[_0x68ac4b(0x12a)]===_0x46e63c):_0x4de313,_0x57ea0c=_0x36f1d2['map'](projectRole);return{'ok':!![],'data':{'scope':'dev','roles':_0x57ea0c,'paging':_0x2b01ef},'message':_0x68ac4b(0x135)+_0x57ea0c[_0x68ac4b(0x140)]+'\x20role(s)'};}};
@@ -1 +1 @@
1
- const a235_0x4704d6=a235_0x1601;(function(_0x52491c,_0x1320c8){const _0x10df1f=a235_0x1601,_0x1f4d4f=_0x52491c();while(!![]){try{const _0x5340bd=-parseInt(_0x10df1f(0x168))/0x1*(parseInt(_0x10df1f(0x188))/0x2)+parseInt(_0x10df1f(0x14e))/0x3+parseInt(_0x10df1f(0x17d))/0x4*(-parseInt(_0x10df1f(0x13b))/0x5)+parseInt(_0x10df1f(0x13d))/0x6+-parseInt(_0x10df1f(0x179))/0x7*(-parseInt(_0x10df1f(0x145))/0x8)+parseInt(_0x10df1f(0x14c))/0x9+parseInt(_0x10df1f(0x173))/0xa;if(_0x5340bd===_0x1320c8)break;else _0x1f4d4f['push'](_0x1f4d4f['shift']());}catch(_0x373e1d){_0x1f4d4f['push'](_0x1f4d4f['shift']());}}}(a235_0xea02,0x378dc));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_0x4704d6(0x15b),'required':!![],'description':a235_0x4704d6(0x164)};export const ROLE_REF_FLAG={'name':'role','type':a235_0x4704d6(0x17f),'required':!![],'description':a235_0x4704d6(0x14f)};export const USER_REF_FLAG={'name':a235_0x4704d6(0x153),'type':'string','required':!![],'description':a235_0x4704d6(0x182)};export const NAME_FLAG={'name':a235_0x4704d6(0x185),'type':a235_0x4704d6(0x17f),'required':!![],'description':a235_0x4704d6(0x15e)};export const USER_NAME_FLAG={'name':a235_0x4704d6(0x185),'type':a235_0x4704d6(0x17f),'required':!![],'description':'Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId'};export const REMARK_FLAG={'name':a235_0x4704d6(0x141),'type':a235_0x4704d6(0x17f),'required':![],'description':a235_0x4704d6(0x140)};export const EXPECT_USER_COUNT_FLAG={'name':'expect-user-count','type':a235_0x4704d6(0x15b),'required':![],'description':'Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs'};export const BUILTIN_ROLE_TYPES=[a235_0x4704d6(0x181),a235_0x4704d6(0x169),a235_0x4704d6(0x15a)];export function isBuiltinRole(_0x2ed7ec){const _0x1256b1=a235_0x4704d6;return BUILTIN_ROLE_TYPES[_0x1256b1(0x13c)](_0x2ed7ec);}export function assertCustomRole(_0x1a0f65,_0x527a24){const _0x2b5fa3=a235_0x4704d6;if(_0x1a0f65['roleType']!==_0x2b5fa3(0x155))throw CliErrors[_0x2b5fa3(0x171)](_0x2b5fa3(0x158)+_0x527a24+_0x2b5fa3(0x160)+_0x1a0f65['roleName']+'\x20('+_0x1a0f65[_0x2b5fa3(0x152)]+').','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.');}export function projectRole(_0x42205f){const _0x42957f=a235_0x4704d6;return{'id':_0x42205f['id'],'roleName':_0x42205f[_0x42957f(0x146)],'roleType':_0x42205f['roleType'],'remark':_0x42205f['remark'],'userCount':_0x42205f[_0x42957f(0x142)],'permitCount':_0x42205f['permitCount'],'builtin':isBuiltinRole(_0x42205f['roleType'])};}export async function resolveRoleRef(_0x1d26de,_0x3c2770){const _0x254879=a235_0x4704d6,_0x13bc8b=_0x3c2770[_0x254879(0x170)]();if(!_0x13bc8b)throw CliErrors[_0x254879(0x171)](_0x254879(0x167),'Pass\x20--role\x20<id|name>.');if(/^\d+$/['test'](_0x13bc8b))return getRoleById(_0x1d26de,Number(_0x13bc8b));const _0x31be14=await listAllAppRoles(_0x1d26de),_0x1e5ddf=_0x31be14['filter'](_0x415245=>_0x415245[_0x254879(0x146)]===_0x13bc8b);if(_0x1e5ddf[_0x254879(0x13e)]===0x0)throw CliErrors[_0x254879(0x171)](_0x254879(0x144)+_0x13bc8b+'\x22\x20not\x20found\x20in\x20app\x20'+_0x1d26de+'.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.');if(_0x1e5ddf[_0x254879(0x13e)]>0x1){const _0x3fa095=_0x1e5ddf[_0x254879(0x138)](_0x278122=>_0x278122['id'])[_0x254879(0x183)](',\x20');throw CliErrors[_0x254879(0x171)]('Role\x20name\x20\x22'+_0x13bc8b+_0x254879(0x17a)+_0x3fa095+').',_0x254879(0x14d));}return _0x1e5ddf[0x0];}export async function getRoleById(_0x30c368,_0x444f71){const _0x3ab03b=a235_0x4704d6,_0x22a0d0=await listAllAppRoles(_0x30c368),_0xce9043=_0x22a0d0[_0x3ab03b(0x151)](_0x3ce0cb=>_0x3ce0cb['id']===_0x444f71&&(!_0x3ce0cb[_0x3ab03b(0x178)]||_0x3ce0cb['appCode']===_0x30c368));if(_0xce9043[_0x3ab03b(0x13e)]!==0x1)throw CliErrors[_0x3ab03b(0x171)](_0x3ab03b(0x17c)+_0x444f71+_0x3ab03b(0x175)+_0x30c368+'.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.');return _0xce9043[0x0];}async function listAllAppRoles(_0x103ef4){const _0x2d7fa6=a235_0x4704d6,_0x31cc35=0x64,_0x10297c=[];for(let _0x2cb0d0=0x1;;_0x2cb0d0+=0x1){const {items:_0xebdba4,paging:_0xc791fb}=await listAppRoles(_0x103ef4,{'currentPage':_0x2cb0d0,'pageSize':_0x31cc35});_0x10297c['push'](..._0xebdba4);if(_0xebdba4[_0x2d7fa6(0x13e)]<_0x31cc35||_0xc791fb&&_0x10297c['length']>=_0xc791fb['totalCount'])return _0x10297c;}}export async function resolveTenantCode(){const _0x48b6f2=a235_0x4704d6,_0x4d688a=await getSessionUserInfo(),_0x598fc7=_0x4d688a?.['user']?.[_0x48b6f2(0x147)]?.[_0x48b6f2(0x15c)];if(!_0x598fc7)throw CliErrors[_0x48b6f2(0x16f)](_0x48b6f2(0x174));return _0x598fc7;}function matchMember(_0xc52cac,_0x47afbd){const _0x37ec97=a235_0x4704d6,_0x5585b6=_0x47afbd[_0x37ec97(0x170)]()[_0x37ec97(0x14b)]();return(_0xc52cac[_0x37ec97(0x186)]??'')[_0x37ec97(0x14b)]()===_0x5585b6||(_0xc52cac[_0x37ec97(0x166)]??'')[_0x37ec97(0x14b)]()===_0x5585b6;}export async function resolveUserRef(_0x3232a7,_0x49773d=a235_0x4704d6(0x17e)){const _0x1ced8b=a235_0x4704d6,_0x450de8=_0x3232a7['trim']();if(!_0x450de8)throw CliErrors[_0x1ced8b(0x171)](_0x1ced8b(0x184),_0x1ced8b(0x157));const _0x4a1aa2=await resolveTenantCode(),_0x3a7898=await getTenantMembers(_0x4a1aa2);if(/^\d+$/[_0x1ced8b(0x139)](_0x450de8)){const _0x3a0772=Number(_0x450de8),_0x5e9712=_0x3a7898[_0x1ced8b(0x16d)](_0xc5469d=>_0xc5469d[_0x1ced8b(0x162)]===_0x3a0772);return{'userId':_0x3a0772,'username':_0x5e9712?.[_0x1ced8b(0x166)]??String(_0x3a0772),'nickname':_0x5e9712?.[_0x1ced8b(0x186)],'matchedBy':'id'};}const _0x422e38=_0x3a7898[_0x1ced8b(0x151)](_0x315434=>matchMember(_0x315434,_0x450de8));if(_0x422e38['length']===0x0)throw CliErrors[_0x1ced8b(0x171)](_0x1ced8b(0x154)+_0x450de8+'\x22.','Check\x20the\x20nickname/username.\x20'+_0x49773d);if(_0x422e38[_0x1ced8b(0x13e)]>0x1){const _0x215f8e=_0x422e38[_0x1ced8b(0x138)](_0x1525b5=>(_0x1525b5['nickname']??_0x1525b5[_0x1ced8b(0x166)]??'?')+'('+_0x1525b5['userId']+')')['join'](',\x20');throw CliErrors[_0x1ced8b(0x171)](_0x1ced8b(0x180)+_0x450de8+'\x22:\x20'+_0x215f8e+'.',_0x49773d);}const _0x8c0a6=_0x422e38[0x0];return{'userId':_0x8c0a6[_0x1ced8b(0x162)],'username':_0x8c0a6[_0x1ced8b(0x166)]??String(_0x8c0a6['userId']),'nickname':_0x8c0a6[_0x1ced8b(0x186)],'matchedBy':_0x1ced8b(0x185)};}export const CREATE_USER_ROLE_PATH=a235_0x4704d6(0x187);export const DELETE_USER_ROLE_PATH=a235_0x4704d6(0x149);export function computeRoleUserMutation(_0x7ebbdc){const _0x55b616=a235_0x4704d6,{operation:_0x48cbf7,appCode:_0x222114,role:_0x23bbdb,relations:_0x4a74eb,user:_0x2802fd}=_0x7ebbdc,_0x20a675=[...new Set(_0x4a74eb['map'](_0x57b7b6=>_0x57b7b6[_0x55b616(0x162)]))],_0x3e393c=[];if(_0x7ebbdc['expectUserCount']!==undefined&&_0x7ebbdc[_0x55b616(0x177)]!==_0x20a675[_0x55b616(0x13e)])throw CliErrors['validation'](_0x55b616(0x148)+_0x7ebbdc['expectUserCount']+_0x55b616(0x161)+_0x20a675[_0x55b616(0x13e)]+'.',_0x55b616(0x159));const _0x1ee467=_0x20a675[_0x55b616(0x13c)](_0x2802fd[_0x55b616(0x162)]),_0x4103e8=_0x4a74eb[_0x55b616(0x151)](_0x488c75=>_0x488c75[_0x55b616(0x162)]===_0x2802fd[_0x55b616(0x162)])[_0x55b616(0x138)](_0x406ce9=>_0x406ce9['id']),_0x48c782=_0x48cbf7==='user-add'?!_0x1ee467:_0x1ee467;let _0x16f70f=_0x20a675;_0x48cbf7==='user-add'?_0x1ee467?_0x3e393c[_0x55b616(0x176)](_0x55b616(0x163)+_0x2802fd[_0x55b616(0x162)]+'\x20is\x20already\x20a\x20member\x20of\x20role\x20'+_0x23bbdb['roleName']+';\x20no\x20change.'):_0x16f70f=[..._0x20a675,_0x2802fd[_0x55b616(0x162)]]:!_0x1ee467?_0x3e393c[_0x55b616(0x176)](_0x55b616(0x163)+_0x2802fd['userId']+_0x55b616(0x165)+_0x23bbdb['roleName']+_0x55b616(0x17b)):(_0x16f70f=_0x20a675[_0x55b616(0x151)](_0x19ff70=>_0x19ff70!==_0x2802fd[_0x55b616(0x162)]),_0x4103e8[_0x55b616(0x13e)]>0x1&&_0x3e393c[_0x55b616(0x176)](_0x55b616(0x16e)+_0x4103e8[_0x55b616(0x13e)]+_0x55b616(0x13a)+_0x2802fd[_0x55b616(0x162)]+'.'));const _0x340805={'scope':_0x55b616(0x15d),'operation':_0x48cbf7,'selector':{'appCode':_0x222114,'roleId':_0x23bbdb['id'],'roleName':_0x23bbdb[_0x55b616(0x146)],'userId':_0x2802fd[_0x55b616(0x162)]},'before':{'userIds':_0x20a675},'after':{'userIds':_0x16f70f},'dryRun':_0x7ebbdc[_0x55b616(0x143)],'backend':{'method':_0x55b616(0x13f),'path':_0x48cbf7==='user-add'?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x3e393c};return{'mutation':_0x340805,'changed':_0x48c782,'matchingRelationIds':_0x4103e8};}export async function loadDevRoleRelations(_0x921e68,_0x29f61a){const _0x59ff33=a235_0x4704d6,_0x4442f4=0x64,_0x25bd0d=[];for(let _0x3eaa99=0x1;;_0x3eaa99+=0x1){const {items:_0x5e444c,paging:_0x4f0910}=await listDevUserRoleRelations(_0x921e68,{'roleId':_0x29f61a,'currentPage':_0x3eaa99,'pageSize':_0x4442f4});_0x25bd0d['push'](..._0x5e444c);if(_0x5e444c[_0x59ff33(0x13e)]<_0x4442f4||_0x4f0910&&_0x25bd0d[_0x59ff33(0x13e)]>=_0x4f0910[_0x59ff33(0x172)])return _0x25bd0d;}}function a235_0xea02(){const _0x513f97=['Removed\x20','authRequired','trim','validation','totalCount','753370NWfTgR','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','\x20not\x20found\x20in\x20app\x20','push','expectUserCount','appCode','91126CMMgbz','\x22\x20is\x20ambiguous\x20(ids:\x20',';\x20no\x20change.','Role\x20id\x20','3372FZyCnl','Pass\x20--user\x20<id>.','string','Multiple\x20tenant\x20members\x20match\x20\x22','ADMIN','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','join','Missing\x20user\x20reference.','name','nickname','/smartapi/permit/user-role/create','5962SAEDPB','Pass\x20--role\x20<id|name>.','map','test','\x20duplicate\x20memberships\x20for\x20user\x20','2515saRrxj','includes','796254WLBWLS','length','POST','Optional\x20role\x20remark/description','remark','userCount','dryRun','Role\x20name\x20\x22','112PFLZPT','roleName','tenant','Anti-drift\x20check\x20failed:\x20expected\x20','/smartapi/permit/user-role/delete','\x20members\x20of\x20the\x20OWNER\x20role.','toLowerCase','400311hlpbUe','Disambiguate\x20with\x20--role\x20<id>.','1258524axUfIW','Role\x20id\x20or\x20exact\x20role\x20name','flag','filter','roleType','user','No\x20tenant\x20member\x20matches\x20\x22','CUSTOM','role','Pass\x20--user\x20<id|name>.','Cannot\x20','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','OWNER','number','tenant_code','dev','Role\x20name','flagMissing','\x20built-in\x20role\x20','\x20member(s)\x20but\x20role\x20has\x20','userId','User\x20','Role\x20id\x20(from\x20`role\x20list`)','\x20is\x20not\x20a\x20member\x20of\x20role\x20','username','Missing\x20role\x20reference.','68buiPAL','DEV','expect-user-count','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.','str','find'];a235_0xea02=function(){return _0x513f97;};return a235_0xea02();}export function readRoleRef(_0x1022aa){const _0x151602=a235_0x4704d6,_0x751e4d=_0x1022aa['str'](_0x151602(0x156))[_0x151602(0x170)]();if(!_0x751e4d)throw CliErrors[_0x151602(0x15f)](_0x151602(0x156),_0x151602(0x189));return _0x751e4d;}function a235_0x1601(_0x5206d4,_0x5abf7e){_0x5206d4=_0x5206d4-0x138;const _0xea0229=a235_0xea02();let _0x1601dc=_0xea0229[_0x5206d4];return _0x1601dc;}export async function prepareUserMutation(_0x33d5d3,_0x59515b,_0x414906){const _0x4cd48e=a235_0x4704d6,_0x202088=readRoleRef(_0x33d5d3),_0x5b2632=_0x33d5d3[_0x4cd48e(0x16c)](_0x4cd48e(0x153))[_0x4cd48e(0x170)]();if(!_0x5b2632)throw CliErrors[_0x4cd48e(0x15f)](_0x4cd48e(0x153),_0x4cd48e(0x157));const _0x2f38cb=_0x33d5d3[_0x4cd48e(0x150)](_0x4cd48e(0x16a)),_0x537d5f=_0x2f38cb===undefined||_0x2f38cb===null?undefined:Number(_0x2f38cb),_0xedb88b=await resolveRoleRef(_0x33d5d3[_0x4cd48e(0x178)],_0x202088);if(_0xedb88b[_0x4cd48e(0x152)]==='OWNER')throw CliErrors[_0x4cd48e(0x171)](_0x4cd48e(0x158)+_0x59515b+_0x4cd48e(0x14a),_0x4cd48e(0x16b));const _0x3c4c4b=await resolveUserRef(_0x5b2632),_0x29c8d8=await loadDevRoleRelations(_0x33d5d3[_0x4cd48e(0x178)],_0xedb88b['id']);return{...computeRoleUserMutation({'operation':_0x59515b,'appCode':_0x33d5d3['appCode'],'role':_0xedb88b,'relations':_0x29c8d8,'user':{'userId':_0x3c4c4b['userId'],'username':_0x3c4c4b[_0x4cd48e(0x166)],'nickname':_0x3c4c4b['nickname']},'dryRun':_0x414906,..._0x537d5f!==undefined?{'expectUserCount':_0x537d5f}:{}}),'role':_0xedb88b,'user':_0x3c4c4b};}
1
+ const a235_0x4625a3=a235_0x3de6;(function(_0x5f47d4,_0x275507){const _0x3c571a=a235_0x3de6,_0x5c9ca3=_0x5f47d4();while(!![]){try{const _0x328bfd=parseInt(_0x3c571a(0xd3))/0x1*(-parseInt(_0x3c571a(0xef))/0x2)+parseInt(_0x3c571a(0xf3))/0x3+-parseInt(_0x3c571a(0xfc))/0x4+parseInt(_0x3c571a(0xcb))/0x5+-parseInt(_0x3c571a(0xd1))/0x6*(parseInt(_0x3c571a(0xf6))/0x7)+-parseInt(_0x3c571a(0xe4))/0x8*(-parseInt(_0x3c571a(0xd7))/0x9)+-parseInt(_0x3c571a(0x10b))/0xa;if(_0x328bfd===_0x275507)break;else _0x5c9ca3['push'](_0x5c9ca3['shift']());}catch(_0x1c675a){_0x5c9ca3['push'](_0x5c9ca3['shift']());}}}(a235_0x162a,0x49e16));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_0x4625a3(0x112),'required':!![],'description':'Role\x20id\x20(from\x20`role\x20list`)'};export const ROLE_REF_FLAG={'name':'role','type':'string','required':!![],'description':'Role\x20id\x20or\x20exact\x20role\x20name'};export const USER_REF_FLAG={'name':'user','type':'string','required':!![],'description':a235_0x4625a3(0x100)};export const NAME_FLAG={'name':a235_0x4625a3(0x103),'type':a235_0x4625a3(0xe3),'required':!![],'description':a235_0x4625a3(0xe0)};function a235_0x3de6(_0x30c043,_0x48964d){_0x30c043=_0x30c043-0xc8;const _0x162a43=a235_0x162a();let _0x3de66e=_0x162a43[_0x30c043];return _0x3de66e;}export const USER_NAME_FLAG={'name':'name','type':a235_0x4625a3(0xe3),'required':!![],'description':'Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId'};export const REMARK_FLAG={'name':a235_0x4625a3(0x105),'type':a235_0x4625a3(0xe3),'required':![],'description':a235_0x4625a3(0x10f)};export const EXPECT_USER_COUNT_FLAG={'name':'expect-user-count','type':a235_0x4625a3(0x112),'required':![],'description':'Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs'};export const BUILTIN_ROLE_TYPES=[a235_0x4625a3(0x104),'DEV',a235_0x4625a3(0xcd)];export function isBuiltinRole(_0x4d15f9){const _0x270dd8=a235_0x4625a3;return BUILTIN_ROLE_TYPES[_0x270dd8(0xcc)](_0x4d15f9);}export function assertCustomRole(_0x1c975a,_0x45c5ec){const _0x820a1f=a235_0x4625a3;if(_0x1c975a[_0x820a1f(0xec)]!==_0x820a1f(0xf5))throw CliErrors[_0x820a1f(0xd4)](_0x820a1f(0x113)+_0x45c5ec+_0x820a1f(0xe6)+_0x1c975a[_0x820a1f(0xc8)]+'\x20('+_0x1c975a['roleType']+').',_0x820a1f(0xde));}export function projectRole(_0x36f6e9){const _0x113beb=a235_0x4625a3;return{'id':_0x36f6e9['id'],'roleName':_0x36f6e9[_0x113beb(0xc8)],'roleType':_0x36f6e9[_0x113beb(0xec)],'remark':_0x36f6e9[_0x113beb(0x105)],'userCount':_0x36f6e9['userCount'],'permitCount':_0x36f6e9['permitCount'],'builtin':isBuiltinRole(_0x36f6e9['roleType'])};}export async function resolveRoleRef(_0x1b0783,_0x3fae53){const _0x5e62bd=a235_0x4625a3,_0x1c4dcf=_0x3fae53[_0x5e62bd(0xff)]();if(!_0x1c4dcf)throw CliErrors['validation'](_0x5e62bd(0xeb),_0x5e62bd(0xfb));if(/^\d+$/[_0x5e62bd(0xdc)](_0x1c4dcf))return getRoleById(_0x1b0783,Number(_0x1c4dcf));const _0x3edf86=await listAllAppRoles(_0x1b0783),_0xaaa540=_0x3edf86[_0x5e62bd(0xed)](_0x5259ef=>_0x5259ef['roleName']===_0x1c4dcf);if(_0xaaa540['length']===0x0)throw CliErrors[_0x5e62bd(0xd4)](_0x5e62bd(0xd5)+_0x1c4dcf+'\x22\x20not\x20found\x20in\x20app\x20'+_0x1b0783+'.',_0x5e62bd(0xf0));if(_0xaaa540['length']>0x1){const _0x36f314=_0xaaa540[_0x5e62bd(0x10d)](_0x491abe=>_0x491abe['id'])['join'](',\x20');throw CliErrors[_0x5e62bd(0xd4)](_0x5e62bd(0xd5)+_0x1c4dcf+_0x5e62bd(0x106)+_0x36f314+').',_0x5e62bd(0xc9));}return _0xaaa540[0x0];}export async function getRoleById(_0x441ffc,_0x2058f9){const _0x1860ac=a235_0x4625a3,_0x149f6a=await listAllAppRoles(_0x441ffc),_0x5ca7e0=_0x149f6a[_0x1860ac(0xed)](_0xdd6b53=>_0xdd6b53['id']===_0x2058f9&&(!_0xdd6b53[_0x1860ac(0xce)]||_0xdd6b53[_0x1860ac(0xce)]===_0x441ffc));if(_0x5ca7e0[_0x1860ac(0xd8)]!==0x1)throw CliErrors[_0x1860ac(0xd4)](_0x1860ac(0x10e)+_0x2058f9+_0x1860ac(0xda)+_0x441ffc+'.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.');return _0x5ca7e0[0x0];}async function listAllAppRoles(_0x435abc){const _0x14cd8d=a235_0x4625a3,_0x1690bb=0x64,_0x5b6188=[];for(let _0x3f7887=0x1;;_0x3f7887+=0x1){const {items:_0x4207e1,paging:_0x4dbc94}=await listAppRoles(_0x435abc,{'currentPage':_0x3f7887,'pageSize':_0x1690bb});_0x5b6188[_0x14cd8d(0xdb)](..._0x4207e1);if(_0x4207e1[_0x14cd8d(0xd8)]<_0x1690bb||_0x4dbc94&&_0x5b6188['length']>=_0x4dbc94[_0x14cd8d(0x10a)])return _0x5b6188;}}export async function resolveTenantCode(){const _0x89c860=a235_0x4625a3,_0x49aa5a=await getSessionUserInfo(),_0x2ee9a7=_0x49aa5a?.[_0x89c860(0xca)]?.[_0x89c860(0xf2)]?.['tenant_code'];if(!_0x2ee9a7)throw CliErrors[_0x89c860(0xfe)](_0x89c860(0x111));return _0x2ee9a7;}function matchMember(_0x3aea6a,_0x26a3ad){const _0x48a848=a235_0x4625a3,_0x346af0=_0x26a3ad[_0x48a848(0xff)]()['toLowerCase']();return(_0x3aea6a[_0x48a848(0xd2)]??'')[_0x48a848(0xf7)]()===_0x346af0||(_0x3aea6a[_0x48a848(0xdd)]??'')[_0x48a848(0xf7)]()===_0x346af0;}export async function resolveUserRef(_0x98308a,_0x5ac47c=a235_0x4625a3(0xe2)){const _0x456165=a235_0x4625a3,_0x3d3aa8=_0x98308a[_0x456165(0xff)]();if(!_0x3d3aa8)throw CliErrors['validation'](_0x456165(0x107),_0x456165(0xf9));const _0x1da376=await resolveTenantCode(),_0xb44cb6=await getTenantMembers(_0x1da376);if(/^\d+$/[_0x456165(0xdc)](_0x3d3aa8)){const _0x2a856b=Number(_0x3d3aa8),_0x2c6f82=_0xb44cb6[_0x456165(0xf8)](_0x5a0e8e=>_0x5a0e8e[_0x456165(0xcf)]===_0x2a856b);return{'userId':_0x2a856b,'username':_0x2c6f82?.['username']??String(_0x2a856b),'nickname':_0x2c6f82?.[_0x456165(0xd2)],'matchedBy':'id'};}const _0x53fda2=_0xb44cb6[_0x456165(0xed)](_0x3a51d9=>matchMember(_0x3a51d9,_0x3d3aa8));if(_0x53fda2[_0x456165(0xd8)]===0x0)throw CliErrors[_0x456165(0xd4)](_0x456165(0xfd)+_0x3d3aa8+'\x22.',_0x456165(0xd6)+_0x5ac47c);if(_0x53fda2[_0x456165(0xd8)]>0x1){const _0xa492e5=_0x53fda2[_0x456165(0x10d)](_0x2030a5=>(_0x2030a5['nickname']??_0x2030a5[_0x456165(0xdd)]??'?')+'('+_0x2030a5['userId']+')')['join'](',\x20');throw CliErrors[_0x456165(0xd4)]('Multiple\x20tenant\x20members\x20match\x20\x22'+_0x3d3aa8+_0x456165(0xea)+_0xa492e5+'.',_0x5ac47c);}const _0x100a88=_0x53fda2[0x0];return{'userId':_0x100a88[_0x456165(0xcf)],'username':_0x100a88['username']??String(_0x100a88['userId']),'nickname':_0x100a88[_0x456165(0xd2)],'matchedBy':'name'};}export const CREATE_USER_ROLE_PATH=a235_0x4625a3(0xe9);function a235_0x162a(){const _0x3bcb22=['User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','POST','dryRun','name','ADMIN','remark','\x22\x20is\x20ambiguous\x20(ids:\x20','Missing\x20user\x20reference.','/smartapi/permit/user-role/delete','User\x20','totalCount','49890pJinsV','\x20duplicate\x20memberships\x20for\x20user\x20','map','Role\x20id\x20','Optional\x20role\x20remark/description','Removed\x20','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','number','Cannot\x20','roleName','Disambiguate\x20with\x20--role\x20<id>.','user','2978125EhwItv','includes','OWNER','appCode','userId','expect-user-count','4494dOCYgS','nickname','5Ggfysw','validation','Role\x20name\x20\x22','Check\x20the\x20nickname/username.\x20','2179557jpMInp','length','\x20is\x20already\x20a\x20member\x20of\x20role\x20','\x20not\x20found\x20in\x20app\x20','push','test','username','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','expectUserCount','Role\x20name','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','Pass\x20--user\x20<id>.','string','8RkeIEY','str','\x20built-in\x20role\x20','Anti-drift\x20check\x20failed:\x20expected\x20','flagMissing','/smartapi/permit/user-role/create','\x22:\x20','Missing\x20role\x20reference.','roleType','filter','role','29996EJnRGc','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','user-add','tenant','189426nIFAid',';\x20no\x20change.','CUSTOM','3829pfhOBR','toLowerCase','find','Pass\x20--user\x20<id|name>.','flag','Pass\x20--role\x20<id|name>.','434576ZolkEA','No\x20tenant\x20member\x20matches\x20\x22','authRequired','trim'];a235_0x162a=function(){return _0x3bcb22;};return a235_0x162a();}export const DELETE_USER_ROLE_PATH=a235_0x4625a3(0x108);export function computeRoleUserMutation(_0x429443){const _0x216b5c=a235_0x4625a3,{operation:_0x637185,appCode:_0x293b07,role:_0x5f11e7,relations:_0x4aaaa7,user:_0x15469a}=_0x429443,_0x3e6651=[...new Set(_0x4aaaa7[_0x216b5c(0x10d)](_0x170551=>_0x170551[_0x216b5c(0xcf)]))],_0x19d3dc=[];if(_0x429443['expectUserCount']!==undefined&&_0x429443['expectUserCount']!==_0x3e6651[_0x216b5c(0xd8)])throw CliErrors[_0x216b5c(0xd4)](_0x216b5c(0xe7)+_0x429443[_0x216b5c(0xdf)]+'\x20member(s)\x20but\x20role\x20has\x20'+_0x3e6651['length']+'.',_0x216b5c(0xe1));const _0x5c0dd0=_0x3e6651[_0x216b5c(0xcc)](_0x15469a[_0x216b5c(0xcf)]),_0x161168=_0x4aaaa7[_0x216b5c(0xed)](_0xf6e72b=>_0xf6e72b[_0x216b5c(0xcf)]===_0x15469a[_0x216b5c(0xcf)])[_0x216b5c(0x10d)](_0x50855f=>_0x50855f['id']),_0x30b3f3=_0x637185===_0x216b5c(0xf1)?!_0x5c0dd0:_0x5c0dd0;let _0x30417c=_0x3e6651;_0x637185===_0x216b5c(0xf1)?_0x5c0dd0?_0x19d3dc[_0x216b5c(0xdb)](_0x216b5c(0x109)+_0x15469a[_0x216b5c(0xcf)]+_0x216b5c(0xd9)+_0x5f11e7['roleName']+_0x216b5c(0xf4)):_0x30417c=[..._0x3e6651,_0x15469a[_0x216b5c(0xcf)]]:!_0x5c0dd0?_0x19d3dc[_0x216b5c(0xdb)]('User\x20'+_0x15469a[_0x216b5c(0xcf)]+'\x20is\x20not\x20a\x20member\x20of\x20role\x20'+_0x5f11e7[_0x216b5c(0xc8)]+_0x216b5c(0xf4)):(_0x30417c=_0x3e6651[_0x216b5c(0xed)](_0x43fe01=>_0x43fe01!==_0x15469a['userId']),_0x161168[_0x216b5c(0xd8)]>0x1&&_0x19d3dc[_0x216b5c(0xdb)](_0x216b5c(0x110)+_0x161168[_0x216b5c(0xd8)]+_0x216b5c(0x10c)+_0x15469a[_0x216b5c(0xcf)]+'.'));const _0x4a90cf={'scope':'dev','operation':_0x637185,'selector':{'appCode':_0x293b07,'roleId':_0x5f11e7['id'],'roleName':_0x5f11e7[_0x216b5c(0xc8)],'userId':_0x15469a['userId']},'before':{'userIds':_0x3e6651},'after':{'userIds':_0x30417c},'dryRun':_0x429443[_0x216b5c(0x102)],'backend':{'method':_0x216b5c(0x101),'path':_0x637185==='user-add'?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x19d3dc};return{'mutation':_0x4a90cf,'changed':_0x30b3f3,'matchingRelationIds':_0x161168};}export async function loadDevRoleRelations(_0x2f4aa1,_0x1bea0d){const _0x2720c1=a235_0x4625a3,_0x38c299=0x64,_0x389459=[];for(let _0xffced2=0x1;;_0xffced2+=0x1){const {items:_0x28039b,paging:_0x1b9875}=await listDevUserRoleRelations(_0x2f4aa1,{'roleId':_0x1bea0d,'currentPage':_0xffced2,'pageSize':_0x38c299});_0x389459[_0x2720c1(0xdb)](..._0x28039b);if(_0x28039b['length']<_0x38c299||_0x1b9875&&_0x389459[_0x2720c1(0xd8)]>=_0x1b9875[_0x2720c1(0x10a)])return _0x389459;}}export function readRoleRef(_0x3c1519){const _0x2c5ef0=a235_0x4625a3,_0x2b0d10=_0x3c1519[_0x2c5ef0(0xe5)](_0x2c5ef0(0xee))[_0x2c5ef0(0xff)]();if(!_0x2b0d10)throw CliErrors['flagMissing'](_0x2c5ef0(0xee),'Pass\x20--role\x20<id|name>.');return _0x2b0d10;}export async function prepareUserMutation(_0x517b5c,_0x51bb36,_0x1d62ff){const _0x519104=a235_0x4625a3,_0x128f2a=readRoleRef(_0x517b5c),_0x4435e1=_0x517b5c['str']('user')[_0x519104(0xff)]();if(!_0x4435e1)throw CliErrors[_0x519104(0xe8)]('user',_0x519104(0xf9));const _0x56b89e=_0x517b5c[_0x519104(0xfa)](_0x519104(0xd0)),_0x440d54=_0x56b89e===undefined||_0x56b89e===null?undefined:Number(_0x56b89e),_0x4f38cc=await resolveRoleRef(_0x517b5c[_0x519104(0xce)],_0x128f2a);if(_0x4f38cc[_0x519104(0xec)]===_0x519104(0xcd))throw CliErrors[_0x519104(0xd4)](_0x519104(0x113)+_0x51bb36+'\x20members\x20of\x20the\x20OWNER\x20role.','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.');const _0x112afe=await resolveUserRef(_0x4435e1),_0x229605=await loadDevRoleRelations(_0x517b5c[_0x519104(0xce)],_0x4f38cc['id']);return{...computeRoleUserMutation({'operation':_0x51bb36,'appCode':_0x517b5c[_0x519104(0xce)],'role':_0x4f38cc,'relations':_0x229605,'user':{'userId':_0x112afe[_0x519104(0xcf)],'username':_0x112afe[_0x519104(0xdd)],'nickname':_0x112afe[_0x519104(0xd2)]},'dryRun':_0x1d62ff,..._0x440d54!==undefined?{'expectUserCount':_0x440d54}:{}}),'role':_0x4f38cc,'user':_0x112afe};}
@@ -1 +1 @@
1
- const a236_0x2127e1=a236_0x4699;(function(_0x5c0ac8,_0x42cc50){const _0x2ca8b0=a236_0x4699,_0x158a71=_0x5c0ac8();while(!![]){try{const _0x4236c8=parseInt(_0x2ca8b0(0x85))/0x1+parseInt(_0x2ca8b0(0x77))/0x2*(-parseInt(_0x2ca8b0(0x7f))/0x3)+parseInt(_0x2ca8b0(0x88))/0x4*(parseInt(_0x2ca8b0(0x70))/0x5)+parseInt(_0x2ca8b0(0x7c))/0x6*(-parseInt(_0x2ca8b0(0x79))/0x7)+-parseInt(_0x2ca8b0(0x8b))/0x8*(parseInt(_0x2ca8b0(0x71))/0x9)+parseInt(_0x2ca8b0(0x83))/0xa+parseInt(_0x2ca8b0(0x8d))/0xb;if(_0x4236c8===_0x42cc50)break;else _0x158a71['push'](_0x158a71['shift']());}catch(_0x35adb7){_0x158a71['push'](_0x158a71['shift']());}}}(a236_0x582f,0xc3901));import{updateAppRole}from'../../core/api-client.js';function a236_0x582f(){const _0x134653=['num','56593aICMtu','write','flag','380JjVkHz','validation','/smartapi/permit/role/update','8ZgyLDU','appCode','27938669XZsTVF','POST','19905VWQVqW','7884603AknTDH','dev','trim','role','--name\x20cannot\x20be\x20empty.','remark','2SKoNCM','name','7UIXLPH','update','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','4950234RiKlZS','\x20(id=','Nothing\x20to\x20update.','3959088tjcTZP','Updated\x20role\x20','New\x20role\x20name','roleName','8471600cTUidE'];a236_0x582f=function(){return _0x134653;};return a236_0x582f();}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_0x2127e1(0x8a);function a236_0x4699(_0x420bdc,_0xf94d56){_0x420bdc=_0x420bdc-0x70;const _0x582fe6=a236_0x582f();let _0x469930=_0x582fe6[_0x420bdc];return _0x469930;}function readPatch(_0x53332c){const _0x110259=a236_0x2127e1,_0xf9351a=_0x53332c[_0x110259(0x87)](_0x110259(0x78)),_0x3499ee=_0x53332c[_0x110259(0x87)](_0x110259(0x76)),_0x26ed43={};if(_0xf9351a!==undefined&&_0xf9351a!==null){const _0x42e256=String(_0xf9351a)[_0x110259(0x73)]();if(!_0x42e256)throw CliErrors['validation'](_0x110259(0x75));if(_0x42e256['length']>0x40)throw CliErrors['validation']('Role\x20name\x20cannot\x20exceed\x2064\x20characters.');_0x26ed43[_0x110259(0x82)]=_0x42e256;}_0x3499ee!==undefined&&_0x3499ee!==null&&(_0x26ed43[_0x110259(0x76)]=String(_0x3499ee));if(_0x26ed43[_0x110259(0x82)]===undefined&&_0x26ed43[_0x110259(0x76)]===undefined)throw CliErrors[_0x110259(0x89)](_0x110259(0x7e),'Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.');return _0x26ed43;}export const roleUpdate={'service':a236_0x2127e1(0x74),'command':a236_0x2127e1(0x7a),'description':a236_0x2127e1(0x7b),'risk':a236_0x2127e1(0x86),'flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a236_0x2127e1(0x78),'type':'string','required':![],'description':a236_0x2127e1(0x81)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x135ed7){readPatch(_0x135ed7);},async 'dryRun'(_0x4e9ab4){const _0x1244f2=a236_0x2127e1,_0x5e7355=_0x4e9ab4[_0x1244f2(0x84)]('id'),_0x4d1e05=readPatch(_0x4e9ab4),_0x4b1b80=await getRoleById(_0x4e9ab4[_0x1244f2(0x8c)],_0x5e7355);return assertCustomRole(_0x4b1b80,_0x1244f2(0x7a)),asDryRunResult({'scope':_0x1244f2(0x72),'operation':_0x1244f2(0x7a),'selector':{'appCode':_0x4e9ab4['appCode'],'roleId':_0x5e7355,'roleName':_0x4b1b80[_0x1244f2(0x82)]},'before':projectRole(_0x4b1b80),'after':projectRole({..._0x4b1b80,..._0x4d1e05[_0x1244f2(0x82)]!==undefined?{'roleName':_0x4d1e05['roleName']}:{},..._0x4d1e05['remark']!==undefined?{'remark':_0x4d1e05[_0x1244f2(0x76)]}:{}}),'dryRun':!![],'backend':{'method':_0x1244f2(0x8e),'path':UPDATE_PATH},'warnings':[]},{'method':_0x1244f2(0x8e),'url':UPDATE_PATH});},async 'execute'(_0x2f3d1d){const _0x10685f=a236_0x2127e1,_0x27ac7e=_0x2f3d1d[_0x10685f(0x84)]('id'),_0x5ef191=readPatch(_0x2f3d1d),_0x3acc24=await getRoleById(_0x2f3d1d[_0x10685f(0x8c)],_0x27ac7e);assertCustomRole(_0x3acc24,'update'),await updateAppRole({'id':_0x27ac7e,'appCode':_0x2f3d1d[_0x10685f(0x8c)],..._0x5ef191[_0x10685f(0x82)]!==undefined?{'roleName':_0x5ef191[_0x10685f(0x82)]}:{},..._0x5ef191[_0x10685f(0x76)]!==undefined?{'remark':_0x5ef191['remark']}:{}});const _0x1b1d8d=await getRoleById(_0x2f3d1d[_0x10685f(0x8c)],_0x27ac7e);return{'ok':!![],'data':{'scope':'dev','operation':_0x10685f(0x7a),'selector':{'appCode':_0x2f3d1d[_0x10685f(0x8c)],'roleId':_0x27ac7e,'roleName':_0x1b1d8d['roleName']},'before':projectRole(_0x3acc24),'after':projectRole(_0x1b1d8d),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[]},'message':_0x10685f(0x80)+_0x1b1d8d[_0x10685f(0x82)]+_0x10685f(0x7d)+_0x27ac7e+')'};}};
1
+ const a236_0x422e36=a236_0x12b7;function a236_0x4d8f(){const _0x309331=['102080TcnTIs','remark','New\x20role\x20name','num','2TFKUWn','name','/smartapi/permit/role/update','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','dev','--name\x20cannot\x20be\x20empty.','roleName','39244byzoBX','Nothing\x20to\x20update.','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','update','1010qxPyhk','795906tPBbam','appCode','464Sesnzc','9isAmUz','write','84195zKiTIy','2161545MlUmtP','validation','5661803xJYibx','865397KeGlAo','role','trim','\x20(id=','flag'];a236_0x4d8f=function(){return _0x309331;};return a236_0x4d8f();}(function(_0x2a7e48,_0x11df11){const _0x1947ab=a236_0x12b7,_0xf99b2a=_0x2a7e48();while(!![]){try{const _0x52c818=parseInt(_0x1947ab(0x141))/0x1*(parseInt(_0x1947ab(0x14a))/0x2)+parseInt(_0x1947ab(0x159))/0x3*(-parseInt(_0x1947ab(0x151))/0x4)+-parseInt(_0x1947ab(0x13e))/0x5+-parseInt(_0x1947ab(0x156))/0x6+parseInt(_0x1947ab(0x140))/0x7+-parseInt(_0x1947ab(0x158))/0x8*(-parseInt(_0x1947ab(0x15b))/0x9)+-parseInt(_0x1947ab(0x155))/0xa*(parseInt(_0x1947ab(0x146))/0xb);if(_0x52c818===_0x11df11)break;else _0xf99b2a['push'](_0xf99b2a['shift']());}catch(_0x375f96){_0xf99b2a['push'](_0xf99b2a['shift']());}}}(a236_0x4d8f,0xa7457));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_0x422e36(0x14c);function readPatch(_0x3fffda){const _0x5a5f18=a236_0x422e36,_0x52119d=_0x3fffda[_0x5a5f18(0x145)](_0x5a5f18(0x14b)),_0x20b50b=_0x3fffda[_0x5a5f18(0x145)](_0x5a5f18(0x147)),_0xe6d16d={};if(_0x52119d!==undefined&&_0x52119d!==null){const _0x121fdf=String(_0x52119d)[_0x5a5f18(0x143)]();if(!_0x121fdf)throw CliErrors[_0x5a5f18(0x13f)](_0x5a5f18(0x14f));if(_0x121fdf['length']>0x40)throw CliErrors['validation'](_0x5a5f18(0x153));_0xe6d16d[_0x5a5f18(0x150)]=_0x121fdf;}_0x20b50b!==undefined&&_0x20b50b!==null&&(_0xe6d16d[_0x5a5f18(0x147)]=String(_0x20b50b));if(_0xe6d16d['roleName']===undefined&&_0xe6d16d[_0x5a5f18(0x147)]===undefined)throw CliErrors[_0x5a5f18(0x13f)](_0x5a5f18(0x152),'Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.');return _0xe6d16d;}function a236_0x12b7(_0x5960a3,_0x3a531b){_0x5960a3=_0x5960a3-0x13e;const _0x4d8f10=a236_0x4d8f();let _0x12b7e0=_0x4d8f10[_0x5960a3];return _0x12b7e0;}export const roleUpdate={'service':a236_0x422e36(0x142),'command':a236_0x422e36(0x154),'description':a236_0x422e36(0x14d),'risk':a236_0x422e36(0x15a),'flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a236_0x422e36(0x14b),'type':'string','required':![],'description':a236_0x422e36(0x148)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x22288e){readPatch(_0x22288e);},async 'dryRun'(_0x27e9e6){const _0x5b7ad8=a236_0x422e36,_0x33c7f2=_0x27e9e6['num']('id'),_0xd27724=readPatch(_0x27e9e6),_0x79fd4f=await getRoleById(_0x27e9e6[_0x5b7ad8(0x157)],_0x33c7f2);return assertCustomRole(_0x79fd4f,_0x5b7ad8(0x154)),asDryRunResult({'scope':_0x5b7ad8(0x14e),'operation':_0x5b7ad8(0x154),'selector':{'appCode':_0x27e9e6[_0x5b7ad8(0x157)],'roleId':_0x33c7f2,'roleName':_0x79fd4f[_0x5b7ad8(0x150)]},'before':projectRole(_0x79fd4f),'after':projectRole({..._0x79fd4f,..._0xd27724[_0x5b7ad8(0x150)]!==undefined?{'roleName':_0xd27724['roleName']}:{},..._0xd27724[_0x5b7ad8(0x147)]!==undefined?{'remark':_0xd27724[_0x5b7ad8(0x147)]}:{}}),'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[]},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x5b0876){const _0xd43264=a236_0x422e36,_0x12fb1e=_0x5b0876[_0xd43264(0x149)]('id'),_0x8d7575=readPatch(_0x5b0876),_0x34c345=await getRoleById(_0x5b0876[_0xd43264(0x157)],_0x12fb1e);assertCustomRole(_0x34c345,'update'),await updateAppRole({'id':_0x12fb1e,'appCode':_0x5b0876[_0xd43264(0x157)],..._0x8d7575[_0xd43264(0x150)]!==undefined?{'roleName':_0x8d7575[_0xd43264(0x150)]}:{},..._0x8d7575[_0xd43264(0x147)]!==undefined?{'remark':_0x8d7575[_0xd43264(0x147)]}:{}});const _0x9777b6=await getRoleById(_0x5b0876[_0xd43264(0x157)],_0x12fb1e);return{'ok':!![],'data':{'scope':_0xd43264(0x14e),'operation':_0xd43264(0x154),'selector':{'appCode':_0x5b0876[_0xd43264(0x157)],'roleId':_0x12fb1e,'roleName':_0x9777b6[_0xd43264(0x150)]},'before':projectRole(_0x34c345),'after':projectRole(_0x9777b6),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[]},'message':'Updated\x20role\x20'+_0x9777b6[_0xd43264(0x150)]+_0xd43264(0x144)+_0x12fb1e+')'};}};
@@ -1 +1 @@
1
- function a237_0x4162(){const _0x3ab6df=['roleType','roleName','POST','273825RQosBO','username','3212235dlVSKw','53158850MlhLVp','1986WTzqjm','user-add','7576vvNWNX','8063070XtaZbg','userId','\x20already\x20in\x20role\x20','8vImfYe','2933700cvlyVn','role','988654VamSaA','roleId','Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','selector','2PAZbRX'];a237_0x4162=function(){return _0x3ab6df;};return a237_0x4162();}const a237_0x4c04f5=a237_0x16af;(function(_0x4cea09,_0x110737){const _0x5d0c76=a237_0x16af,_0x26050a=_0x4cea09();while(!![]){try{const _0x3077fe=parseInt(_0x5d0c76(0x100))/0x1*(-parseInt(_0x5d0c76(0x104))/0x2)+-parseInt(_0x5d0c76(0x10c))/0x3*(parseInt(_0x5d0c76(0x10e))/0x4)+-parseInt(_0x5d0c76(0x10a))/0x5+-parseInt(_0x5d0c76(0xfa))/0x6+-parseInt(_0x5d0c76(0xfe))/0x7+parseInt(_0x5d0c76(0xfd))/0x8*(parseInt(_0x5d0c76(0x108))/0x9)+parseInt(_0x5d0c76(0x10b))/0xa;if(_0x3077fe===_0x110737)break;else _0x26050a['push'](_0x26050a['shift']());}catch(_0x77e91a){_0x26050a['push'](_0x26050a['shift']());}}}(a237_0x4162,0xaa844));function a237_0x16af(_0x27e67d,_0x476294){_0x27e67d=_0x27e67d-0xfa;const _0x41629b=a237_0x4162();let _0x16af7f=_0x41629b[_0x27e67d];return _0x16af7f;}import{createDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,CREATE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':a237_0x4c04f5(0xff),'command':a237_0x4c04f5(0x10d),'description':a237_0x4c04f5(0x102),'risk':'high-risk-write','flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x51f944){const _0x1593c8=a237_0x4c04f5,{mutation:_0x71481e}=await prepareUserMutation(_0x51f944,_0x1593c8(0x10d),!![]);return asDryRunResult(_0x71481e,{'method':_0x1593c8(0x107),'url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x312e32){const _0x16100f=a237_0x4c04f5,{mutation:_0x48cd53,changed:_0x21c823,role:_0xce48f3,user:_0x116bf6}=await prepareUserMutation(_0x312e32,_0x16100f(0x10d),![]);return _0x21c823&&await createDevUserRole({'appCode':_0x312e32['appCode'],'userId':_0x116bf6[_0x16100f(0xfb)],'username':_0x116bf6[_0x16100f(0x109)],'roleType':_0xce48f3[_0x16100f(0x105)],'roleId':_0x48cd53[_0x16100f(0x103)][_0x16100f(0x101)]}),{'ok':!![],'data':_0x48cd53,'message':_0x21c823?'Added\x20user\x20'+_0x48cd53[_0x16100f(0x103)][_0x16100f(0xfb)]+'\x20to\x20role\x20'+_0x48cd53['selector'][_0x16100f(0x106)]:'No\x20change:\x20user\x20'+_0x48cd53[_0x16100f(0x103)][_0x16100f(0xfb)]+_0x16100f(0xfc)+_0x48cd53[_0x16100f(0x103)][_0x16100f(0x106)]};}};
1
+ const a237_0x3118a7=a237_0x269d;(function(_0x39b8eb,_0x27e041){const _0x45c6b9=a237_0x269d,_0x885dfa=_0x39b8eb();while(!![]){try{const _0x3f1419=-parseInt(_0x45c6b9(0x107))/0x1*(-parseInt(_0x45c6b9(0x104))/0x2)+-parseInt(_0x45c6b9(0x106))/0x3+-parseInt(_0x45c6b9(0xf5))/0x4+-parseInt(_0x45c6b9(0xf3))/0x5*(parseInt(_0x45c6b9(0xfd))/0x6)+-parseInt(_0x45c6b9(0x103))/0x7*(parseInt(_0x45c6b9(0xff))/0x8)+parseInt(_0x45c6b9(0xfb))/0x9*(-parseInt(_0x45c6b9(0xf1))/0xa)+parseInt(_0x45c6b9(0x100))/0xb;if(_0x3f1419===_0x27e041)break;else _0x885dfa['push'](_0x885dfa['shift']());}catch(_0x59b5ef){_0x885dfa['push'](_0x885dfa['shift']());}}}(a237_0x3cb2,0x7a8d5));import{createDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a237_0x269d(_0x56af1f,_0x278b9b){_0x56af1f=_0x56af1f-0xf0;const _0x3cb283=a237_0x3cb2();let _0x269d25=_0x3cb283[_0x56af1f];return _0x269d25;}import{asDryRunResult}from'../../commands/common/dry-run.js';function a237_0x3cb2(){const _0x49977a=['23442hPyvfK','Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','485343rVGgKu','3YeXiHP','POST','username','5033590nxewVK','selector','376180fRRtFQ','Added\x20user\x20','2619900MhukYx','high-risk-write','user-add','userId','role','roleName','9Mztkat','\x20to\x20role\x20','18ZkzVhz','roleType','169248dmbtuG','25396987qWiNFK','appCode','\x20already\x20in\x20role\x20','98GdTYkf'];a237_0x3cb2=function(){return _0x49977a;};return a237_0x3cb2();}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_0x3118a7(0xf9),'command':'user-add','description':a237_0x3118a7(0x105),'risk':a237_0x3118a7(0xf6),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x549bee){const _0x229729=a237_0x3118a7,{mutation:_0x5f02fc}=await prepareUserMutation(_0x549bee,_0x229729(0xf7),!![]);return asDryRunResult(_0x5f02fc,{'method':_0x229729(0x108),'url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x1619e6){const _0x39af81=a237_0x3118a7,{mutation:_0x149cfb,changed:_0x2c4e1c,role:_0x28bdf8,user:_0x5d5a7b}=await prepareUserMutation(_0x1619e6,_0x39af81(0xf7),![]);return _0x2c4e1c&&await createDevUserRole({'appCode':_0x1619e6[_0x39af81(0x101)],'userId':_0x5d5a7b[_0x39af81(0xf8)],'username':_0x5d5a7b[_0x39af81(0xf0)],'roleType':_0x28bdf8[_0x39af81(0xfe)],'roleId':_0x149cfb[_0x39af81(0xf2)]['roleId']}),{'ok':!![],'data':_0x149cfb,'message':_0x2c4e1c?_0x39af81(0xf4)+_0x149cfb[_0x39af81(0xf2)][_0x39af81(0xf8)]+_0x39af81(0xfc)+_0x149cfb[_0x39af81(0xf2)][_0x39af81(0xfa)]:'No\x20change:\x20user\x20'+_0x149cfb[_0x39af81(0xf2)][_0x39af81(0xf8)]+_0x39af81(0x102)+_0x149cfb[_0x39af81(0xf2)]['roleName']};}};
@@ -1 +1 @@
1
- const a238_0x139d18=a238_0x5ee9;(function(_0x5a036d,_0x5b0bea){const _0x3c1ef4=a238_0x5ee9,_0x594179=_0x5a036d();while(!![]){try{const _0x1bd90f=parseInt(_0x3c1ef4(0x1cd))/0x1*(parseInt(_0x3c1ef4(0x1c0))/0x2)+parseInt(_0x3c1ef4(0x1d0))/0x3+-parseInt(_0x3c1ef4(0x1be))/0x4*(parseInt(_0x3c1ef4(0x1c8))/0x5)+parseInt(_0x3c1ef4(0x1c6))/0x6+parseInt(_0x3c1ef4(0x1cb))/0x7*(parseInt(_0x3c1ef4(0x1bf))/0x8)+-parseInt(_0x3c1ef4(0x1ca))/0x9*(parseInt(_0x3c1ef4(0x1c3))/0xa)+-parseInt(_0x3c1ef4(0x1c4))/0xb;if(_0x1bd90f===_0x5b0bea)break;else _0x594179['push'](_0x594179['shift']());}catch(_0x5cac00){_0x594179['push'](_0x594179['shift']());}}}(a238_0x33be,0x2d265));import{deleteDevUserRole}from'../../core/api-client.js';function a238_0x33be(){const _0x549030=['Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','No\x20change:\x20user\x20','545901nZFYMg','user-remove','selector','1956pmSKtU','1712bPVNZW','2LBvLRl','role','Removed\x20user\x20','2209150NbjLDG','2851277CSlTri','high-risk-write','2084304kwgZWN','roleName','3095INiLwD','userId','9YXNAzS','6139Syqqde','\x20not\x20in\x20role\x20','250717FKbvfL'];a238_0x33be=function(){return _0x549030;};return a238_0x33be();}function a238_0x5ee9(_0x401946,_0x1badd9){_0x401946=_0x401946-0x1bc;const _0x33beb3=a238_0x33be();let _0x5ee90f=_0x33beb3[_0x401946];return _0x5ee90f;}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_0x139d18(0x1c1),'command':a238_0x139d18(0x1bc),'description':a238_0x139d18(0x1ce),'risk':a238_0x139d18(0x1c5),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x9f1908){const _0x85ee47=a238_0x139d18,{mutation:_0xe65ce4}=await prepareUserMutation(_0x9f1908,_0x85ee47(0x1bc),!![]);return asDryRunResult(_0xe65ce4,{'method':'POST','url':DELETE_USER_ROLE_PATH});},async 'execute'(_0x4d6868){const _0x2d58fe=a238_0x139d18,{matchingRelationIds:_0x315d9d,mutation:_0x436c37,changed:_0x1d63e7}=await prepareUserMutation(_0x4d6868,_0x2d58fe(0x1bc),![]);if(_0x1d63e7)for(const _0x38d9d6 of _0x315d9d){await deleteDevUserRole(_0x38d9d6);}return{'ok':!![],'data':_0x436c37,'message':_0x1d63e7?_0x2d58fe(0x1c2)+_0x436c37[_0x2d58fe(0x1bd)][_0x2d58fe(0x1c9)]+'\x20from\x20role\x20'+_0x436c37[_0x2d58fe(0x1bd)][_0x2d58fe(0x1c7)]:_0x2d58fe(0x1cf)+_0x436c37[_0x2d58fe(0x1bd)]['userId']+_0x2d58fe(0x1cc)+_0x436c37[_0x2d58fe(0x1bd)][_0x2d58fe(0x1c7)]};}};
1
+ const a238_0x5ef0c5=a238_0x4499;(function(_0xe98b55,_0x211265){const _0x4e4611=a238_0x4499,_0x33ec5d=_0xe98b55();while(!![]){try{const _0x1987d1=parseInt(_0x4e4611(0x10f))/0x1*(parseInt(_0x4e4611(0x10a))/0x2)+-parseInt(_0x4e4611(0x115))/0x3+-parseInt(_0x4e4611(0x105))/0x4*(-parseInt(_0x4e4611(0x108))/0x5)+-parseInt(_0x4e4611(0xfe))/0x6*(parseInt(_0x4e4611(0x106))/0x7)+-parseInt(_0x4e4611(0x109))/0x8+-parseInt(_0x4e4611(0x100))/0x9*(parseInt(_0x4e4611(0xff))/0xa)+-parseInt(_0x4e4611(0x10d))/0xb*(-parseInt(_0x4e4611(0x113))/0xc);if(_0x1987d1===_0x211265)break;else _0x33ec5d['push'](_0x33ec5d['shift']());}catch(_0x202ccd){_0x33ec5d['push'](_0x33ec5d['shift']());}}}(a238_0x35e1,0x7e92f));function a238_0x4499(_0x8b365e,_0x5af37b){_0x8b365e=_0x8b365e-0xfe;const _0x35e121=a238_0x35e1();let _0x4499ec=_0x35e121[_0x8b365e];return _0x4499ec;}function a238_0x35e1(){const _0x331c94=['13326laKAON','36070wPQBcq','459MtkeYT','userId','No\x20change:\x20user\x20','POST','high-risk-write','12myuRXY','2149EARprQ','role','1156585WDjUxm','281136FxTQyf','22dbmViv','user-remove','\x20from\x20role\x20','11zqANBr','Removed\x20user\x20','31216wFzQlb','selector','roleName','\x20not\x20in\x20role\x20','16395708wFJdji','Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','2952729wJvOkk'];a238_0x35e1=function(){return _0x331c94;};return a238_0x35e1();}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_0x5ef0c5(0x107),'command':a238_0x5ef0c5(0x10b),'description':a238_0x5ef0c5(0x114),'risk':a238_0x5ef0c5(0x104),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x581643){const _0x1f6949=a238_0x5ef0c5,{mutation:_0x5ed2a0}=await prepareUserMutation(_0x581643,_0x1f6949(0x10b),!![]);return asDryRunResult(_0x5ed2a0,{'method':_0x1f6949(0x103),'url':DELETE_USER_ROLE_PATH});},async 'execute'(_0xa756db){const _0x1912ce=a238_0x5ef0c5,{matchingRelationIds:_0x584287,mutation:_0x44b0ce,changed:_0x56782a}=await prepareUserMutation(_0xa756db,_0x1912ce(0x10b),![]);if(_0x56782a)for(const _0x5cf5b9 of _0x584287){await deleteDevUserRole(_0x5cf5b9);}return{'ok':!![],'data':_0x44b0ce,'message':_0x56782a?_0x1912ce(0x10e)+_0x44b0ce[_0x1912ce(0x110)][_0x1912ce(0x101)]+_0x1912ce(0x10c)+_0x44b0ce[_0x1912ce(0x110)][_0x1912ce(0x111)]:_0x1912ce(0x102)+_0x44b0ce[_0x1912ce(0x110)]['userId']+_0x1912ce(0x112)+_0x44b0ce[_0x1912ce(0x110)][_0x1912ce(0x111)]};}};
@@ -1 +1 @@
1
- const a239_0x21607a=a239_0x3a21;function a239_0x14bb(){const _0x45fd52=['32otnpIf','nickname','role','886062OsoYZU','Pass\x20--name\x20<nickname|username>.','6476zuQRMx','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','read','665410QoatKa','1415Qcdcfm','\x22\x20→\x20userId\x20','flagMissing','23630751dlaiwT','userId','561806uZNtfa','name','trim','str','Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.','matchedBy','Resolved\x20\x22','1097656gxyFKq','671349BCYGMr'];a239_0x14bb=function(){return _0x45fd52;};return a239_0x14bb();}(function(_0x2cbb96,_0x17bdd0){const _0x122e10=a239_0x3a21,_0x569c5c=_0x2cbb96();while(!![]){try{const _0x452194=-parseInt(_0x122e10(0x115))/0x1+-parseInt(_0x122e10(0x122))/0x2+-parseInt(_0x122e10(0x123))/0x3+parseInt(_0x122e10(0x112))/0x4*(-parseInt(_0x122e10(0x116))/0x5)+parseInt(_0x122e10(0x110))/0x6+-parseInt(_0x122e10(0x11b))/0x7*(parseInt(_0x122e10(0x124))/0x8)+parseInt(_0x122e10(0x119))/0x9;if(_0x452194===_0x17bdd0)break;else _0x569c5c['push'](_0x569c5c['shift']());}catch(_0x2fe089){_0x569c5c['push'](_0x569c5c['shift']());}}}(a239_0x14bb,0x87c36));import{CliErrors}from'../../errors.js';function a239_0x3a21(_0x540e9b,_0x4f409b){_0x540e9b=_0x540e9b-0x10f;const _0x14bb22=a239_0x14bb();let _0x3a2142=_0x14bb22[_0x540e9b];return _0x3a2142;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';export const roleUserResolve={'service':a239_0x21607a(0x10f),'command':'user-resolve','description':a239_0x21607a(0x113),'risk':a239_0x21607a(0x114),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x20e90a){const _0x392081=a239_0x21607a;if(!_0x20e90a[_0x392081(0x11e)](_0x392081(0x11c))[_0x392081(0x11d)]())throw CliErrors[_0x392081(0x118)]('name',_0x392081(0x111));},async 'execute'(_0x4dab04){const _0x5dac76=a239_0x21607a,_0x19b413=_0x4dab04[_0x5dac76(0x11e)](_0x5dac76(0x11c))['trim'](),_0x4ee466=await resolveUserRef(_0x19b413,_0x5dac76(0x11f));return{'ok':!![],'data':{'user':{'userId':_0x4ee466[_0x5dac76(0x11a)],'username':_0x4ee466['username'],'nickname':_0x4ee466[_0x5dac76(0x125)],'matchedBy':_0x4ee466[_0x5dac76(0x120)]}},'message':_0x5dac76(0x121)+_0x19b413+_0x5dac76(0x117)+_0x4ee466[_0x5dac76(0x11a)]};}};
1
+ const a239_0xebfa89=a239_0x8b16;(function(_0x287af1,_0x354bcf){const _0xc3a20a=a239_0x8b16,_0x4b8bb8=_0x287af1();while(!![]){try{const _0x4e7213=-parseInt(_0xc3a20a(0x1ab))/0x1*(-parseInt(_0xc3a20a(0x1af))/0x2)+-parseInt(_0xc3a20a(0x1b2))/0x3+parseInt(_0xc3a20a(0x1b7))/0x4+-parseInt(_0xc3a20a(0x1ae))/0x5*(-parseInt(_0xc3a20a(0x1ad))/0x6)+parseInt(_0xc3a20a(0x1a8))/0x7*(parseInt(_0xc3a20a(0x1b4))/0x8)+-parseInt(_0xc3a20a(0x1b0))/0x9*(parseInt(_0xc3a20a(0x1bc))/0xa)+parseInt(_0xc3a20a(0x1b1))/0xb*(parseInt(_0xc3a20a(0x1ba))/0xc);if(_0x4e7213===_0x354bcf)break;else _0x4b8bb8['push'](_0x4b8bb8['shift']());}catch(_0x40c5ef){_0x4b8bb8['push'](_0x4b8bb8['shift']());}}}(a239_0x245c,0x1a2e4));function a239_0x245c(){const _0x4141d0=['userId','7gBklRI','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','role','5LxYNoB','user-resolve','6lvlvbd','569085IaybiB','4082ycaNfr','63dlVGth','11vEltHx','633432oFttVT','Resolved\x20\x22','1261192CWcazL','Pass\x20--name\x20<nickname|username>.','str','46328VoKcqN','trim','username','1971612PIVJhX','name','198820lMvwOv'];a239_0x245c=function(){return _0x4141d0;};return a239_0x245c();}function a239_0x8b16(_0x261b4a,_0x5134e9){_0x261b4a=_0x261b4a-0x1a8;const _0x245c4b=a239_0x245c();let _0x8b164c=_0x245c4b[_0x261b4a];return _0x8b164c;}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_0xebfa89(0x1aa),'command':a239_0xebfa89(0x1ac),'description':a239_0xebfa89(0x1a9),'risk':'read','flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5021c9){const _0x5d7197=a239_0xebfa89;if(!_0x5021c9[_0x5d7197(0x1b6)](_0x5d7197(0x1bb))[_0x5d7197(0x1b8)]())throw CliErrors['flagMissing'](_0x5d7197(0x1bb),_0x5d7197(0x1b5));},async 'execute'(_0x1df88b){const _0x29fcfa=a239_0xebfa89,_0x4f5b50=_0x1df88b[_0x29fcfa(0x1b6)]('name')[_0x29fcfa(0x1b8)](),_0x438498=await resolveUserRef(_0x4f5b50,'Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.');return{'ok':!![],'data':{'user':{'userId':_0x438498[_0x29fcfa(0x1bd)],'username':_0x438498[_0x29fcfa(0x1b9)],'nickname':_0x438498['nickname'],'matchedBy':_0x438498['matchedBy']}},'message':_0x29fcfa(0x1b3)+_0x4f5b50+'\x22\x20→\x20userId\x20'+_0x438498[_0x29fcfa(0x1bd)]};}};
@@ -1 +1 @@
1
- const a240_0x3523fa=a240_0x2347;function a240_0xf2ae(){const _0x4d95f0=['Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20','\x20is\x20not\x20configured\x20for\x20app\x20','cookie','70sEIgEX','Loaded\x20','28957511GjxjGa','312qHhJSX','1327230famIcX','277333dacRlu','421164FLOeNO','3170wDSzkH','app_rule_not_found','read','rule','get','2323756TgNOKe','645dTTjOB','1236080rzZHVA','6MBHrvV','\x20for\x20','content','appCode'];a240_0xf2ae=function(){return _0x4d95f0;};return a240_0xf2ae();}(function(_0x4631cc,_0x1c3842){const _0x92b8cc=a240_0x2347,_0x59a2c6=_0x4631cc();while(!![]){try{const _0x5a573c=-parseInt(_0x92b8cc(0x90))/0x1*(-parseInt(_0x92b8cc(0x8a))/0x2)+-parseInt(_0x92b8cc(0x92))/0x3*(parseInt(_0x92b8cc(0x8f))/0x4)+-parseInt(_0x92b8cc(0x91))/0x5+-parseInt(_0x92b8cc(0x9d))/0x6+parseInt(_0x92b8cc(0x88))/0x7*(-parseInt(_0x92b8cc(0x9c))/0x8)+parseInt(_0x92b8cc(0x89))/0x9*(parseInt(_0x92b8cc(0x99))/0xa)+parseInt(_0x92b8cc(0x9b))/0xb;if(_0x5a573c===_0x1c3842)break;else _0x59a2c6['push'](_0x59a2c6['shift']());}catch(_0x1138bf){_0x59a2c6['push'](_0x59a2c6['shift']());}}}(a240_0xf2ae,0xc502e));import{getAppRule}from'../../core/api-client.js';function a240_0x2347(_0x42045b,_0x555ec5){_0x42045b=_0x42045b-0x88;const _0xf2ae92=a240_0xf2ae();let _0x2347db=_0xf2ae92[_0x42045b];return _0x2347db;}import{APP_RULE_TYPE_FLAG,appRuleError,appRuleFileName,projectAppRule,readAppRuleType}from'../../commands/rule/shared.js';export const ruleGet={'service':a240_0x3523fa(0x8d),'command':a240_0x3523fa(0x8e),'description':'Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app','risk':a240_0x3523fa(0x8c),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0x529f69){readAppRuleType(_0x529f69);},async 'execute'(_0x47919c){const _0x571301=a240_0x3523fa,_0x4cf9c3=readAppRuleType(_0x47919c),_0xfa5027=await getAppRule(_0x47919c[_0x571301(0x98)],{'appCode':_0x47919c['appCode'],'type':_0x4cf9c3});if(!_0xfa5027)throw appRuleError(_0x571301(0x8b),appRuleFileName(_0x4cf9c3)+_0x571301(0x97)+_0x47919c[_0x571301(0x95)]+'.',_0x571301(0x96)+_0x4cf9c3+'\x20--file\x20<path>\x20--dry-run`.');return{'ok':!![],'data':{'rule':{...projectAppRule(_0x4cf9c3,_0xfa5027),'content':_0xfa5027[_0x571301(0x94)]}},'message':_0x571301(0x9a)+appRuleFileName(_0x4cf9c3)+_0x571301(0x93)+_0x47919c[_0x571301(0x95)]};}};
1
+ const a240_0x17e939=a240_0x2246;(function(_0x4fde5c,_0x14e6cc){const _0x22058d=a240_0x2246,_0x45e4c7=_0x4fde5c();while(!![]){try{const _0x2f7752=-parseInt(_0x22058d(0x94))/0x1+parseInt(_0x22058d(0x93))/0x2+-parseInt(_0x22058d(0x8c))/0x3+-parseInt(_0x22058d(0x9d))/0x4+-parseInt(_0x22058d(0x9a))/0x5*(-parseInt(_0x22058d(0x92))/0x6)+-parseInt(_0x22058d(0xa2))/0x7*(-parseInt(_0x22058d(0x9e))/0x8)+-parseInt(_0x22058d(0x95))/0x9*(-parseInt(_0x22058d(0x8e))/0xa);if(_0x2f7752===_0x14e6cc)break;else _0x45e4c7['push'](_0x45e4c7['shift']());}catch(_0x5d566b){_0x45e4c7['push'](_0x45e4c7['shift']());}}}(a240_0x14b1,0xc48f7));function a240_0x14b1(){const _0x342415=['6gupyyn','2989414UWDwxv','973627PoQKhs','238599idshmA','\x20--file\x20<path>\x20--dry-run`.','\x20for\x20','get','appCode','6070105cCsYpb','Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app','read','2584880pSVyQG','11544ZbYvUA','Loaded\x20','app_rule_not_found','content','1967osGpsb','2147292UnzDmz','\x20is\x20not\x20configured\x20for\x20app\x20','10YsPVoL','cookie','Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20','rule'];a240_0x14b1=function(){return _0x342415;};return a240_0x14b1();}function a240_0x2246(_0x1a39cd,_0x58bfec){_0x1a39cd=_0x1a39cd-0x8c;const _0x14b14e=a240_0x14b1();let _0x2246c3=_0x14b14e[_0x1a39cd];return _0x2246c3;}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_0x17e939(0x91),'command':a240_0x17e939(0x98),'description':a240_0x17e939(0x9b),'risk':a240_0x17e939(0x9c),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0x5a9fa8){readAppRuleType(_0x5a9fa8);},async 'execute'(_0x3ad14e){const _0x5c6b88=a240_0x17e939,_0x17060e=readAppRuleType(_0x3ad14e),_0x23bbba=await getAppRule(_0x3ad14e[_0x5c6b88(0x8f)],{'appCode':_0x3ad14e['appCode'],'type':_0x17060e});if(!_0x23bbba)throw appRuleError(_0x5c6b88(0xa0),appRuleFileName(_0x17060e)+_0x5c6b88(0x8d)+_0x3ad14e[_0x5c6b88(0x99)]+'.',_0x5c6b88(0x90)+_0x17060e+_0x5c6b88(0x96));return{'ok':!![],'data':{'rule':{...projectAppRule(_0x17060e,_0x23bbba),'content':_0x23bbba[_0x5c6b88(0xa1)]}},'message':_0x5c6b88(0x9f)+appRuleFileName(_0x17060e)+_0x5c6b88(0x97)+_0x3ad14e['appCode']};}};
@@ -1 +1 @@
1
- const a241_0x99a3c8=a241_0x4bba;(function(_0x96835f,_0x36afc6){const _0x211fab=a241_0x4bba,_0x5d90a8=_0x96835f();while(!![]){try{const _0x158eee=parseInt(_0x211fab(0x18b))/0x1*(-parseInt(_0x211fab(0x18f))/0x2)+-parseInt(_0x211fab(0x18c))/0x3*(-parseInt(_0x211fab(0x192))/0x4)+-parseInt(_0x211fab(0x191))/0x5*(parseInt(_0x211fab(0x18e))/0x6)+-parseInt(_0x211fab(0x196))/0x7*(-parseInt(_0x211fab(0x195))/0x8)+parseInt(_0x211fab(0x18d))/0x9+parseInt(_0x211fab(0x18a))/0xa+-parseInt(_0x211fab(0x189))/0xb;if(_0x158eee===_0x36afc6)break;else _0x5d90a8['push'](_0x5d90a8['shift']());}catch(_0x4d2633){_0x5d90a8['push'](_0x5d90a8['shift']());}}}(a241_0x3f4b,0x2adcf));import{withKbManagementSession}from'../../core/kb-management-client.js';import{ruleGet}from'../../commands/rule/get.js';function a241_0x4bba(_0x5e3938,_0x254719){_0x5e3938=_0x5e3938-0x189;const _0x3f4b0c=a241_0x3f4b();let _0x4bba85=_0x3f4b0c[_0x5e3938];return _0x4bba85;}function a241_0x3f4b(){const _0x304cac=['signal','17905ejxFEv','16xSMZAN','dryRun','map','88vSmoRA','95809pKkbnF','1221242SBhUrf','997130lhKWOc','61678GjrMcL','128031dOJXTF','2221191veuveO','432HiOGZZ','4ZMghGL'];a241_0x3f4b=function(){return _0x304cac;};return a241_0x3f4b();}import{ruleList}from'../../commands/rule/list.js';import{ruleSet}from'../../commands/rule/set.js';export const ruleDefinitions=[ruleList,ruleGet,ruleSet][a241_0x99a3c8(0x194)](_0x2c3b61=>({..._0x2c3b61,'execute':_0x106589=>withKbManagementSession(_0x106589[a241_0x99a3c8(0x190)],()=>_0x2c3b61['execute'](_0x106589)),..._0x2c3b61[a241_0x99a3c8(0x193)]?{'dryRun':_0x2c93fa=>withKbManagementSession(_0x2c93fa[a241_0x99a3c8(0x190)],()=>_0x2c3b61[a241_0x99a3c8(0x193)](_0x2c93fa))}:{}}));
1
+ function a241_0x2a89(){const _0x3bc11e=['246CTzOIQ','3325hpviAy','6597720ZwLcfW','map','15426RmDxmI','signal','27129GbwgTM','1128834BjpCvU','execute','632pHYDWD','147843UpuvUX','798000SWigzw','10MLThuf','dryRun','5759853AmnYna'];a241_0x2a89=function(){return _0x3bc11e;};return a241_0x2a89();}const a241_0x147eb1=a241_0x412c;function a241_0x412c(_0x24f1f7,_0x3cda37){_0x24f1f7=_0x24f1f7-0x116;const _0x2a8991=a241_0x2a89();let _0x412c22=_0x2a8991[_0x24f1f7];return _0x412c22;}(function(_0xd26f00,_0xd36f04){const _0x49b630=a241_0x412c,_0x2ca8ca=_0xd26f00();while(!![]){try{const _0x386947=parseInt(_0x49b630(0x119))/0x1+-parseInt(_0x49b630(0x121))/0x2*(parseInt(_0x49b630(0x118))/0x3)+parseInt(_0x49b630(0x123))/0x4+-parseInt(_0x49b630(0x11d))/0x5+parseInt(_0x49b630(0x116))/0x6*(parseInt(_0x49b630(0x122))/0x7)+-parseInt(_0x49b630(0x11b))/0x8*(parseInt(_0x49b630(0x11c))/0x9)+parseInt(_0x49b630(0x11e))/0xa*(-parseInt(_0x49b630(0x120))/0xb);if(_0x386947===_0xd36f04)break;else _0x2ca8ca['push'](_0x2ca8ca['shift']());}catch(_0x21fa8f){_0x2ca8ca['push'](_0x2ca8ca['shift']());}}}(a241_0x2a89,0xdd404));import{withKbManagementSession}from'../../core/kb-management-client.js';import{ruleGet}from'../../commands/rule/get.js';import{ruleList}from'../../commands/rule/list.js';import{ruleSet}from'../../commands/rule/set.js';export const ruleDefinitions=[ruleList,ruleGet,ruleSet][a241_0x147eb1(0x124)](_0x5479e0=>({..._0x5479e0,'execute':_0x110e6e=>withKbManagementSession(_0x110e6e[a241_0x147eb1(0x117)],()=>_0x5479e0[a241_0x147eb1(0x11a)](_0x110e6e)),..._0x5479e0[a241_0x147eb1(0x11f)]?{'dryRun':_0x103c5f=>withKbManagementSession(_0x103c5f[a241_0x147eb1(0x117)],()=>_0x5479e0[a241_0x147eb1(0x11f)](_0x103c5f))}:{}}));