@lovrabet/rabetbase-cli 2.5.4-beta.5 → 2.5.4

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 (358) 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/detail.js +1 -1
  77. package/lib/commands/dataset/extend-update.js +1 -1
  78. package/lib/commands/dataset/field-restore.js +1 -1
  79. package/lib/commands/dataset/field-update.js +1 -1
  80. package/lib/commands/dataset/generate.js +1 -1
  81. package/lib/commands/dataset/index.js +1 -1
  82. package/lib/commands/dataset/list.js +1 -1
  83. package/lib/commands/dataset/operations.js +1 -1
  84. package/lib/commands/dataset/relation-audit.js +1 -1
  85. package/lib/commands/dataset/relation-create.js +1 -1
  86. package/lib/commands/dataset/relation-delete.js +1 -1
  87. package/lib/commands/dataset/relation-shared.js +1 -1
  88. package/lib/commands/dataset/relation-update.js +1 -1
  89. package/lib/commands/dataset/relations.js +1 -1
  90. package/lib/commands/dataset/rename.js +1 -1
  91. package/lib/commands/dataset/restore.js +1 -1
  92. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  93. package/lib/commands/db/analysis-batching.js +1 -1
  94. package/lib/commands/db/analyze-batch-plan.js +1 -1
  95. package/lib/commands/db/analyze-cancel.js +1 -1
  96. package/lib/commands/db/analyze-start.js +1 -1
  97. package/lib/commands/db/analyze-status.js +1 -1
  98. package/lib/commands/db/create.js +1 -1
  99. package/lib/commands/db/delete.js +1 -1
  100. package/lib/commands/db/detail.js +1 -1
  101. package/lib/commands/db/diff-refresh-start.js +1 -1
  102. package/lib/commands/db/diff-refresh-status.js +1 -1
  103. package/lib/commands/db/diff.js +1 -1
  104. package/lib/commands/db/index.js +1 -1
  105. package/lib/commands/db/list.js +1 -1
  106. package/lib/commands/db/shared.js +1 -1
  107. package/lib/commands/db/table-diff-shared.js +1 -1
  108. package/lib/commands/db/tables.js +1 -1
  109. package/lib/commands/db/test.js +1 -1
  110. package/lib/commands/db/update.js +1 -1
  111. package/lib/commands/deployment/index.js +1 -1
  112. package/lib/commands/deployment/sync-all.js +1 -1
  113. package/lib/commands/deployment/sync-jobs.js +1 -1
  114. package/lib/commands/deployment/sync-status.js +1 -1
  115. package/lib/commands/doctor.js +1 -1
  116. package/lib/commands/file/index.js +1 -1
  117. package/lib/commands/flow/create.js +1 -1
  118. package/lib/commands/flow/detail.js +1 -1
  119. package/lib/commands/flow/index.js +1 -1
  120. package/lib/commands/flow/list.js +1 -1
  121. package/lib/commands/flow/publish.js +1 -1
  122. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  123. package/lib/commands/flow/runtime-role-list.js +1 -1
  124. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  125. package/lib/commands/flow/runtime-user-search.js +1 -1
  126. package/lib/commands/flow/shared.js +1 -1
  127. package/lib/commands/flow/update.js +1 -1
  128. package/lib/commands/flow/validate.js +1 -1
  129. package/lib/commands/instant-api-policy/current.js +1 -1
  130. package/lib/commands/instant-api-policy/index.js +1 -1
  131. package/lib/commands/instant-api-policy/init.js +1 -1
  132. package/lib/commands/instant-api-policy/publish.js +1 -1
  133. package/lib/commands/instant-api-policy/pull.js +1 -1
  134. package/lib/commands/instant-api-policy/revision.js +1 -1
  135. package/lib/commands/instant-api-policy/revisions.js +1 -1
  136. package/lib/commands/instant-api-policy/rollback.js +1 -1
  137. package/lib/commands/instant-api-policy/shared.js +1 -1
  138. package/lib/commands/instant-api-policy/validate.js +1 -1
  139. package/lib/commands/issue/index.js +1 -1
  140. package/lib/commands/issue/nudge.js +1 -1
  141. package/lib/commands/issue/report.js +1 -1
  142. package/lib/commands/issue/shared.js +1 -1
  143. package/lib/commands/kb/create.js +1 -1
  144. package/lib/commands/kb/delete.js +1 -1
  145. package/lib/commands/kb/detail.js +1 -1
  146. package/lib/commands/kb/index.js +1 -1
  147. package/lib/commands/kb/list.js +1 -1
  148. package/lib/commands/kb/search.js +1 -1
  149. package/lib/commands/kb/shared.js +1 -1
  150. package/lib/commands/kb/update.js +1 -1
  151. package/lib/commands/logs/index.js +1 -1
  152. package/lib/commands/menu/asset-update.js +1 -1
  153. package/lib/commands/menu/delete.js +1 -1
  154. package/lib/commands/menu/external-link-create.js +1 -1
  155. package/lib/commands/menu/external-link-update.js +1 -1
  156. package/lib/commands/menu/group-create.js +1 -1
  157. package/lib/commands/menu/group-update.js +1 -1
  158. package/lib/commands/menu/index.js +1 -1
  159. package/lib/commands/menu/list.js +1 -1
  160. package/lib/commands/menu/move.js +1 -1
  161. package/lib/commands/menu/regroup-start.js +1 -1
  162. package/lib/commands/menu/rename.js +1 -1
  163. package/lib/commands/menu/shared/compare-table.js +1 -1
  164. package/lib/commands/menu/shared/delete-plan.js +1 -1
  165. package/lib/commands/menu/shared/facts.js +1 -1
  166. package/lib/commands/menu/shared/index.js +1 -1
  167. package/lib/commands/menu/shared/inquirer.js +1 -1
  168. package/lib/commands/menu/shared/local-pages.js +1 -1
  169. package/lib/commands/menu/shared/logic.js +1 -1
  170. package/lib/commands/menu/shared/mutations.js +1 -1
  171. package/lib/commands/menu/shared/path.js +1 -1
  172. package/lib/commands/menu/shared/service.js +1 -1
  173. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  174. package/lib/commands/menu/shared/sync-core.js +1 -1
  175. package/lib/commands/menu/shared/update-core.js +1 -1
  176. package/lib/commands/menu/shared/valid-url.js +1 -1
  177. package/lib/commands/menu/subapp-assets-status.js +1 -1
  178. package/lib/commands/menu/subapp-assets-update.js +1 -1
  179. package/lib/commands/menu/sync.js +1 -1
  180. package/lib/commands/menu/visibility-update.js +1 -1
  181. package/lib/commands/notification/config-create.js +1 -1
  182. package/lib/commands/notification/config-delete.js +1 -1
  183. package/lib/commands/notification/config-list.js +1 -1
  184. package/lib/commands/notification/config-update.js +1 -1
  185. package/lib/commands/notification/index.js +1 -1
  186. package/lib/commands/notification/shared.js +1 -1
  187. package/lib/commands/ocr/index.js +1 -1
  188. package/lib/commands/page/create.js +1 -1
  189. package/lib/commands/page/custom/detail.js +1 -1
  190. package/lib/commands/page/custom/list.js +1 -1
  191. package/lib/commands/page/custom/publish.js +1 -1
  192. package/lib/commands/page/custom/shared.js +1 -1
  193. package/lib/commands/page/custom/syntax.js +1 -1
  194. package/lib/commands/page/custom/update.js +1 -1
  195. package/lib/commands/page/data-list-status.js +1 -1
  196. package/lib/commands/page/generate-start.js +1 -1
  197. package/lib/commands/page/generate-status.js +1 -1
  198. package/lib/commands/page/index.js +1 -1
  199. package/lib/commands/page/pull.js +1 -1
  200. package/lib/commands/page/push.js +1 -1
  201. package/lib/commands/page/relation-audit.js +1 -1
  202. package/lib/commands/page/restore.js +1 -1
  203. package/lib/commands/page/shared.js +1 -1
  204. package/lib/commands/page/sync.js +1 -1
  205. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  206. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  207. package/lib/commands/project/create/format-elapsed.js +1 -1
  208. package/lib/commands/project/create/main.js +1 -1
  209. package/lib/commands/project/create/materialize-project-template.js +1 -1
  210. package/lib/commands/project/create/project-name.js +1 -1
  211. package/lib/commands/project/create/project-template-archive.js +1 -1
  212. package/lib/commands/project/create/project-template-path.js +1 -1
  213. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  214. package/lib/commands/project/create/use-format-code.js +1 -1
  215. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  216. package/lib/commands/project/domain-routing-sync.js +1 -1
  217. package/lib/commands/project/index.js +1 -1
  218. package/lib/commands/project/upgrade.js +1 -1
  219. package/lib/commands/registry.js +1 -1
  220. package/lib/commands/role/delete.js +1 -1
  221. package/lib/commands/role/detail.js +1 -1
  222. package/lib/commands/role/index.js +1 -1
  223. package/lib/commands/role/list.js +1 -1
  224. package/lib/commands/role/shared.js +1 -1
  225. package/lib/commands/role/update.js +1 -1
  226. package/lib/commands/role/user-add.js +1 -1
  227. package/lib/commands/role/user-remove.js +1 -1
  228. package/lib/commands/role/user-resolve.js +1 -1
  229. package/lib/commands/rule/get.js +1 -1
  230. package/lib/commands/rule/index.js +1 -1
  231. package/lib/commands/rule/list.js +1 -1
  232. package/lib/commands/rule/set.js +1 -1
  233. package/lib/commands/rule/shared.js +1 -1
  234. package/lib/commands/run/index.js +1 -1
  235. package/lib/commands/schema.js +1 -1
  236. package/lib/commands/sql/create.js +1 -1
  237. package/lib/commands/sql/delete.js +1 -1
  238. package/lib/commands/sql/detail.js +1 -1
  239. package/lib/commands/sql/exec.js +1 -1
  240. package/lib/commands/sql/index.js +1 -1
  241. package/lib/commands/sql/list.js +1 -1
  242. package/lib/commands/sql/pull.js +1 -1
  243. package/lib/commands/sql/push.js +1 -1
  244. package/lib/commands/sql/shared.js +1 -1
  245. package/lib/commands/sql/status.js +1 -1
  246. package/lib/commands/sql/validate.js +1 -1
  247. package/lib/commands/task/index.js +1 -1
  248. package/lib/commands/task/status.js +1 -1
  249. package/lib/commands/tenant/index.js +1 -1
  250. package/lib/commands/tenant/members-list.js +1 -1
  251. package/lib/commands/tenant/shared.js +1 -1
  252. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  253. package/lib/commands/user-account/feishu-bind.js +1 -1
  254. package/lib/commands/user-account/index.js +1 -1
  255. package/lib/commands/workspace/add.js +1 -1
  256. package/lib/commands/workspace/index.js +1 -1
  257. package/lib/commands/workspace/remove.js +1 -1
  258. package/lib/config/domain-config.js +1 -1
  259. package/lib/config/project-domain-routing.js +1 -1
  260. package/lib/config/region-config.js +1 -1
  261. package/lib/config/schema.js +1 -1
  262. package/lib/constant/cdn.js +1 -1
  263. package/lib/constant/cli.js +1 -1
  264. package/lib/constant/defaults.js +1 -1
  265. package/lib/constant/domain.js +1 -1
  266. package/lib/constant/env.js +1 -1
  267. package/lib/constant/output.js +1 -1
  268. package/lib/constant/paths.js +1 -1
  269. package/lib/constant/region.js +1 -1
  270. package/lib/constant/risk.js +1 -1
  271. package/lib/constant/routing-profile.js +1 -1
  272. package/lib/context/app-resolver.js +1 -1
  273. package/lib/context/auth-resolver.js +1 -1
  274. package/lib/context/config-loader.js +1 -1
  275. package/lib/context.js +1 -1
  276. package/lib/core/alias-resolver.js +1 -1
  277. package/lib/core/api-client.js +1 -1
  278. package/lib/core/bff/config.js +1 -1
  279. package/lib/core/bff/file-system.js +1 -1
  280. package/lib/core/bff/hash.js +1 -1
  281. package/lib/core/bff/hook-directory.js +1 -1
  282. package/lib/core/bff/lock.js +1 -1
  283. package/lib/core/bff/utils.js +1 -1
  284. package/lib/core/cross-db-relation.js +1 -1
  285. package/lib/core/db-resolver.js +1 -1
  286. package/lib/core/flow-config.js +1 -1
  287. package/lib/core/instant-api-policy/config.js +1 -1
  288. package/lib/core/kb-search-client.js +1 -1
  289. package/lib/core/page/file-system.js +1 -1
  290. package/lib/core/page/hash.js +1 -1
  291. package/lib/core/page/lock.js +1 -1
  292. package/lib/core/page/lr-smart-jsx.js +1 -1
  293. package/lib/core/sql-index-auditor.js +1 -1
  294. package/lib/core/sql-sync/config.js +1 -1
  295. package/lib/core/sql-sync/file-system.js +1 -1
  296. package/lib/core/sql-sync/hash.js +1 -1
  297. package/lib/core/sql-sync/lock.js +1 -1
  298. package/lib/core/sql-sync/utils.js +1 -1
  299. package/lib/core/sql-validator.js +1 -1
  300. package/lib/errors.js +1 -1
  301. package/lib/framework/build-all-flags.js +1 -1
  302. package/lib/framework/error-output.js +1 -1
  303. package/lib/framework/explicit-yes.js +1 -1
  304. package/lib/framework/flags.js +1 -1
  305. package/lib/framework/help.js +1 -1
  306. package/lib/framework/index.js +1 -1
  307. package/lib/framework/output.js +1 -1
  308. package/lib/framework/response.js +1 -1
  309. package/lib/framework/runner-alias.js +1 -1
  310. package/lib/framework/runner.js +1 -1
  311. package/lib/framework/schema-export.js +1 -1
  312. package/lib/framework/supported-flags.js +1 -1
  313. package/lib/framework/types.js +1 -1
  314. package/lib/generated/build-info.d.ts +4 -4
  315. package/lib/generated/build-info.js +1 -1
  316. package/lib/generated/official-routing.js +1 -1
  317. package/lib/generated/routing-contract.js +1 -1
  318. package/lib/help.js +1 -1
  319. package/lib/postinstall.js +1 -1
  320. package/lib/runtime/confirmation.js +1 -1
  321. package/lib/runtime/event.js +1 -1
  322. package/lib/runtime/index.js +1 -1
  323. package/lib/runtime/queue.js +1 -1
  324. package/lib/runtime/resolve.js +1 -1
  325. package/lib/skills/builtin-skill.js +1 -1
  326. package/lib/skills/main.js +1 -1
  327. package/lib/skills/npx-skills-add.js +1 -1
  328. package/lib/skills/skill-presence.js +1 -1
  329. package/lib/telemetry/cli-command-trace.js +1 -1
  330. package/lib/telemetry/cli-help-trace.js +1 -1
  331. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  332. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  333. package/lib/telemetry/send-cli-trace-log.js +1 -1
  334. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  335. package/lib/utils/ai_config.js +1 -1
  336. package/lib/utils/apply-jq-filter.js +1 -1
  337. package/lib/utils/cdn-config.js +1 -1
  338. package/lib/utils/check-sdk-version.js +1 -1
  339. package/lib/utils/cli-version-check.js +1 -1
  340. package/lib/utils/cli-version-policy.js +1 -1
  341. package/lib/utils/config.js +1 -1
  342. package/lib/utils/entity-with-id.js +1 -1
  343. package/lib/utils/file-utils.js +1 -1
  344. package/lib/utils/guides-cdn.js +1 -1
  345. package/lib/utils/http-client.js +1 -1
  346. package/lib/utils/is-non-interactive.js +1 -1
  347. package/lib/utils/logger.js +1 -1
  348. package/lib/utils/params.js +1 -1
  349. package/lib/utils/platform.js +1 -1
  350. package/lib/utils/sleep.js +1 -1
  351. package/lib/utils/template-replacer.js +1 -1
  352. package/lib/utils/update-notice.js +1 -1
  353. package/lib/utils/version.js +1 -1
  354. package/lib/utils/with-active-cookie.js +1 -1
  355. package/lib/utils/write-cli-side-channel.js +1 -1
  356. package/package.json +1 -1
  357. package/skills/rabetbase/SKILL.md +1 -1
  358. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- (function(_0x2b9825,_0x23da5c){const _0x2e7983=a214_0x1d67,_0xe2a8b2=_0x2b9825();while(!![]){try{const _0x4b0872=-parseInt(_0x2e7983(0xdc))/0x1*(-parseInt(_0x2e7983(0xe1))/0x2)+parseInt(_0x2e7983(0xd9))/0x3+-parseInt(_0x2e7983(0xda))/0x4+parseInt(_0x2e7983(0xdb))/0x5*(parseInt(_0x2e7983(0xe7))/0x6)+-parseInt(_0x2e7983(0xd6))/0x7+parseInt(_0x2e7983(0xe8))/0x8+-parseInt(_0x2e7983(0xd7))/0x9*(parseInt(_0x2e7983(0xe4))/0xa);if(_0x4b0872===_0x23da5c)break;else _0xe2a8b2['push'](_0xe2a8b2['shift']());}catch(_0xd8492b){_0xe2a8b2['push'](_0xe2a8b2['shift']());}}}(a214_0x13bd,0xc7001));import a214_0x55fed5 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a214_0x13bd(){const _0x1b6ebe=['115oTLKCr','1jPttSk','format','npx','Code\x20format\x20completed','cwd','2015878fKIOHk','message','info','10uafKOX','prettier','Code\x20format\x20failed','105834XxHoYF','11971592WqqZfd','now','Starting\x20code\x20format','resolve','3148404odnruV','24747813sDLueQ','success','3711834rWbAIG','530916PsXppR'];a214_0x13bd=function(){return _0x1b6ebe;};return a214_0x13bd();}import{logger}from'../../../utils/logger.js';function a214_0x1d67(_0x37514f,_0x51df9c){_0x37514f=_0x37514f-0xd3;const _0x13bd0c=a214_0x13bd();let _0x1d679c=_0x13bd0c[_0x37514f];return _0x1d679c;}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x5b9b1a){const _0x2acf13=a214_0x1d67,_0x4b9bcd=Date['now'](),_0x161591=a214_0x55fed5[_0x2acf13(0xd5)](process[_0x2acf13(0xe0)](),_0x5b9b1a);try{logger[_0x2acf13(0xe3)](_0x2acf13(0xdd),_0x2acf13(0xd4),{'projectCode':_0x5b9b1a}),await execa(resolveNpmBin(_0x2acf13(0xde)),[_0x2acf13(0xe5),'--write','.'],{'cwd':_0x161591});const _0x2392de=Date[_0x2acf13(0xd3)]()-_0x4b9bcd;logger[_0x2acf13(0xd8)](_0x2acf13(0xdd),_0x2acf13(0xdf),_0x2392de,{'projectCode':_0x5b9b1a});}catch(_0x569b61){const _0x3fcf20=Date['now']()-_0x4b9bcd;logger['error'](_0x2acf13(0xdd),_0x2acf13(0xe6),{'projectCode':_0x5b9b1a,'error':_0x569b61 instanceof Error?_0x569b61[_0x2acf13(0xe2)]:String(_0x569b61),'duration':_0x3fcf20});throw _0x569b61;}return formatElapsed(_0x4b9bcd);}
1
+ (function(_0x2656d2,_0xafe93f){const _0x58344d=a214_0x497e,_0x231d35=_0x2656d2();while(!![]){try{const _0x4c3024=-parseInt(_0x58344d(0x179))/0x1+-parseInt(_0x58344d(0x17e))/0x2*(-parseInt(_0x58344d(0x177))/0x3)+-parseInt(_0x58344d(0x17d))/0x4*(parseInt(_0x58344d(0x188))/0x5)+-parseInt(_0x58344d(0x180))/0x6+parseInt(_0x58344d(0x178))/0x7+parseInt(_0x58344d(0x17a))/0x8+parseInt(_0x58344d(0x17c))/0x9;if(_0x4c3024===_0xafe93f)break;else _0x231d35['push'](_0x231d35['shift']());}catch(_0x3f9bc7){_0x231d35['push'](_0x231d35['shift']());}}}(a214_0x8cd3,0x8567c));function a214_0x8cd3(){const _0x382b94=['now','Code\x20format\x20failed','prettier','npx','3470wNUIEs','--write','Starting\x20code\x20format','54trAJnQ','6963306TzcKBI','1020609SdkuRU','1037128KsRsNG','message','11492001uUpNUn','940fGTKwh','25378SprMHK','info','5397378LrXYbA','error','format','resolve'];a214_0x8cd3=function(){return _0x382b94;};return a214_0x8cd3();}import a214_0x2e29be from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a214_0x497e(_0x38e5dd,_0x42123c){_0x38e5dd=_0x38e5dd-0x176;const _0x8cd37f=a214_0x8cd3();let _0x497e80=_0x8cd37f[_0x38e5dd];return _0x497e80;}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x5d425a){const _0x51ce8e=a214_0x497e,_0x5d6b6e=Date[_0x51ce8e(0x184)](),_0x3e3d0d=a214_0x2e29be[_0x51ce8e(0x183)](process['cwd'](),_0x5d425a);try{logger[_0x51ce8e(0x17f)](_0x51ce8e(0x182),_0x51ce8e(0x176),{'projectCode':_0x5d425a}),await execa(resolveNpmBin(_0x51ce8e(0x187)),[_0x51ce8e(0x186),_0x51ce8e(0x189),'.'],{'cwd':_0x3e3d0d});const _0x4d228a=Date['now']()-_0x5d6b6e;logger['success'](_0x51ce8e(0x182),'Code\x20format\x20completed',_0x4d228a,{'projectCode':_0x5d425a});}catch(_0x2f9c93){const _0x5ac443=Date[_0x51ce8e(0x184)]()-_0x5d6b6e;logger[_0x51ce8e(0x181)]('format',_0x51ce8e(0x185),{'projectCode':_0x5d425a,'error':_0x2f9c93 instanceof Error?_0x2f9c93[_0x51ce8e(0x17b)]:String(_0x2f9c93),'duration':_0x5ac443});throw _0x2f9c93;}return formatElapsed(_0x5d6b6e);}
@@ -1 +1 @@
1
- (function(_0x172060,_0x1a88a5){const _0x3de055=a215_0x5d53,_0x11e37b=_0x172060();while(!![]){try{const _0xcc00a9=-parseInt(_0x3de055(0x1f9))/0x1*(-parseInt(_0x3de055(0x1f8))/0x2)+parseInt(_0x3de055(0x1fd))/0x3*(-parseInt(_0x3de055(0x1f5))/0x4)+parseInt(_0x3de055(0x1e8))/0x5+parseInt(_0x3de055(0x1ff))/0x6*(parseInt(_0x3de055(0x1fc))/0x7)+parseInt(_0x3de055(0x1ef))/0x8+parseInt(_0x3de055(0x1f3))/0x9*(parseInt(_0x3de055(0x1f6))/0xa)+-parseInt(_0x3de055(0x1e9))/0xb*(parseInt(_0x3de055(0x1f0))/0xc);if(_0xcc00a9===_0x1a88a5)break;else _0x11e37b['push'](_0x11e37b['shift']());}catch(_0x132aa5){_0x11e37b['push'](_0x11e37b['shift']());}}}(a215_0x5529,0xa2819));import a215_0x2d826b from'node:path';function a215_0x5529(){const _0x220799=['npm','1945468hEjOxt','1658469OjuvmD','install','24EiWyCd','--registry','1436950JjqbeP','11XwqJTK','Dependency\x20install\x20completed','error','success','info','now','8741760HkBDcR','25550124WQjDhN','https://registry.npmmirror.com','cwd','3186nMuzHQ','resolve','4GaJmhz','7960CqhOVQ','message','154lyYEcz','7455BrPAZg','Starting\x20dependency\x20install'];a215_0x5529=function(){return _0x220799;};return a215_0x5529();}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a215_0x5d53(_0x32cbc1,_0x274765){_0x32cbc1=_0x32cbc1-0x1e7;const _0x55293c=a215_0x5529();let _0x5d53a2=_0x55293c[_0x32cbc1];return _0x5d53a2;}import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x3f02a7){const _0x694a20=a215_0x5d53,_0x5142cf=Date[_0x694a20(0x1ee)](),_0x375d6c=a215_0x2d826b[_0x694a20(0x1f4)](process[_0x694a20(0x1f2)](),_0x3f02a7);try{logger[_0x694a20(0x1ed)](_0x694a20(0x1fe),_0x694a20(0x1fa),{'projectCode':_0x3f02a7,'registry':_0x694a20(0x1f1)}),await execa(resolveNpmBin(_0x694a20(0x1fb)),['install',_0x694a20(0x1e7),_0x694a20(0x1f1)],{'cwd':_0x375d6c});const _0x34fc6e=Date[_0x694a20(0x1ee)]()-_0x5142cf;logger[_0x694a20(0x1ec)](_0x694a20(0x1fe),_0x694a20(0x1ea),_0x34fc6e,{'projectCode':_0x3f02a7});}catch(_0x3b2c22){const _0x341e32=Date[_0x694a20(0x1ee)]()-_0x5142cf;logger[_0x694a20(0x1eb)](_0x694a20(0x1fe),'Dependency\x20install\x20failed',{'projectCode':_0x3f02a7,'error':_0x3b2c22 instanceof Error?_0x3b2c22[_0x694a20(0x1f7)]:String(_0x3b2c22),'duration':_0x341e32});throw _0x3b2c22;}return formatElapsed(_0x5142cf);}
1
+ function a215_0x5dd9(){const _0x242a95=['info','2836535ggHdnL','cwd','--registry','https://registry.npmmirror.com','resolve','3824032BKFuMC','510gqeUiY','error','install','2jJmMkG','Dependency\x20install\x20failed','1242656NsZpqL','message','8766738PXfjIw','8392936ZQNLel','now','98665iKzjmx','Dependency\x20install\x20completed','204423uidhcu'];a215_0x5dd9=function(){return _0x242a95;};return a215_0x5dd9();}(function(_0x207d7f,_0x4c3015){const _0xb2f99c=a215_0x3567,_0x50f1bc=_0x207d7f();while(!![]){try{const _0x1f3464=parseInt(_0xb2f99c(0xa9))/0x1+-parseInt(_0xb2f99c(0xbb))/0x2*(parseInt(_0xb2f99c(0xb0))/0x3)+parseInt(_0xb2f99c(0xb7))/0x4+-parseInt(_0xb2f99c(0xb2))/0x5+-parseInt(_0xb2f99c(0xb8))/0x6*(-parseInt(_0xb2f99c(0xae))/0x7)+-parseInt(_0xb2f99c(0xac))/0x8+-parseInt(_0xb2f99c(0xab))/0x9;if(_0x1f3464===_0x4c3015)break;else _0x50f1bc['push'](_0x50f1bc['shift']());}catch(_0x4d75f4){_0x50f1bc['push'](_0x50f1bc['shift']());}}}(a215_0x5dd9,0xb432c));import a215_0x523195 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 a215_0x3567(_0x69d2b,_0x51392a){_0x69d2b=_0x69d2b-0xa8;const _0x5dd9ac=a215_0x5dd9();let _0x356791=_0x5dd9ac[_0x69d2b];return _0x356791;}export async function installDependencies(_0xd77cf5){const _0xd45445=a215_0x3567,_0x470333=Date[_0xd45445(0xad)](),_0x299322=a215_0x523195[_0xd45445(0xb6)](process[_0xd45445(0xb3)](),_0xd77cf5);try{logger[_0xd45445(0xb1)](_0xd45445(0xba),'Starting\x20dependency\x20install',{'projectCode':_0xd77cf5,'registry':_0xd45445(0xb5)}),await execa(resolveNpmBin('npm'),[_0xd45445(0xba),_0xd45445(0xb4),_0xd45445(0xb5)],{'cwd':_0x299322});const _0x257291=Date[_0xd45445(0xad)]()-_0x470333;logger['success']('install',_0xd45445(0xaf),_0x257291,{'projectCode':_0xd77cf5});}catch(_0x4e17ff){const _0xc017d3=Date['now']()-_0x470333;logger[_0xd45445(0xb9)]('install',_0xd45445(0xa8),{'projectCode':_0xd77cf5,'error':_0x4e17ff instanceof Error?_0x4e17ff[_0xd45445(0xaa)]:String(_0x4e17ff),'duration':_0xc017d3});throw _0x4e17ff;}return formatElapsed(_0x470333);}
@@ -1 +1 @@
1
- const a216_0x378216=a216_0xdb00;(function(_0x27418b,_0x249f37){const _0x3d5ca3=a216_0xdb00,_0x1d56cc=_0x27418b();while(!![]){try{const _0x9973d8=parseInt(_0x3d5ca3(0xc2))/0x1+parseInt(_0x3d5ca3(0xcd))/0x2+parseInt(_0x3d5ca3(0xc7))/0x3+parseInt(_0x3d5ca3(0xc1))/0x4*(parseInt(_0x3d5ca3(0xd0))/0x5)+parseInt(_0x3d5ca3(0xca))/0x6*(-parseInt(_0x3d5ca3(0xcc))/0x7)+-parseInt(_0x3d5ca3(0xc0))/0x8*(parseInt(_0x3d5ca3(0xcb))/0x9)+-parseInt(_0x3d5ca3(0xce))/0xa;if(_0x9973d8===_0x249f37)break;else _0x1d56cc['push'](_0x1d56cc['shift']());}catch(_0x394b4a){_0x1d56cc['push'](_0x1d56cc['shift']());}}}(a216_0x40a0,0xb27fa));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';function a216_0xdb00(_0x3a3a08,_0xdafcb3){_0x3a3a08=_0x3a3a08-0xc0;const _0x40a066=a216_0x40a0();let _0xdb00b4=_0x40a066[_0x3a3a08];return _0xdb00b4;}export const projectDomainRoutingSyncDefinition={'service':a216_0x378216(0xc8),'command':a216_0x378216(0xc5),'description':'Synchronize\x20the\x20current\x20project\x27s\x20public\x20Domain\x20routing','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(){const _0xc0468d=a216_0x378216,_0x5dd94a=findProjectRootDirectory();if(!resolveConfigPath(_0x5dd94a))throw CliErrors[_0xc0468d(0xc9)](_0xc0468d(0xcf),'Run\x20'+CLI_BIN_NAME+_0xc0468d(0xc4));const _0x5355d6=writeProjectDomainRoutingManifest(_0x5dd94a);return{'ok':!![],'message':_0xc0468d(0xc6)+_0x5355d6[_0xc0468d(0xc3)],'data':_0x5355d6};}};function a216_0x40a0(){const _0x51cf55=['524yPUCVx','572610ufHoFC','path','\x20workspace\x20init\x20--appcode\x20<code>\x20in\x20the\x20project\x20directory\x20first.','domain-routing-sync','Domain\x20routing\x20synchronized:\x20','3817437dbYPcF','project','validation','3330ohtytq','3950631JAzUoe','12271GwxOWX','738110AanrnR','13646340bmxmjs','No\x20Rabetbase\x20project\x20configuration\x20was\x20found.','49370rafeYD','8clorxf'];a216_0x40a0=function(){return _0x51cf55;};return a216_0x40a0();}
1
+ const a216_0x2af4e4=a216_0x5ee9;(function(_0x292f64,_0x43822d){const _0x4b8b2b=a216_0x5ee9,_0x2822f8=_0x292f64();while(!![]){try{const _0x371c20=-parseInt(_0x4b8b2b(0x165))/0x1+parseInt(_0x4b8b2b(0x163))/0x2+parseInt(_0x4b8b2b(0x16c))/0x3*(-parseInt(_0x4b8b2b(0x15b))/0x4)+-parseInt(_0x4b8b2b(0x161))/0x5*(-parseInt(_0x4b8b2b(0x166))/0x6)+-parseInt(_0x4b8b2b(0x15f))/0x7*(-parseInt(_0x4b8b2b(0x169))/0x8)+parseInt(_0x4b8b2b(0x15c))/0x9+-parseInt(_0x4b8b2b(0x16a))/0xa;if(_0x371c20===_0x43822d)break;else _0x2822f8['push'](_0x2822f8['shift']());}catch(_0x2b2cb3){_0x2822f8['push'](_0x2822f8['shift']());}}}(a216_0x17f4,0x6a48e));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a216_0x17f4(){const _0x43fb9c=['2150496Rszuox','project','domain-routing-sync','76097gsoJRq','Domain\x20routing\x20synchronized:\x20','152245jRPUKQ','No\x20Rabetbase\x20project\x20configuration\x20was\x20found.','1247064mEwTxU','path','485413mLcpGG','54eTaYUL','read','\x20workspace\x20init\x20--appcode\x20<code>\x20in\x20the\x20project\x20directory\x20first.','160JalgkP','3256390bWusGQ','Run\x20','129FpZBix','Synchronize\x20the\x20current\x20project\x27s\x20public\x20Domain\x20routing','10004ptiXlN'];a216_0x17f4=function(){return _0x43fb9c;};return a216_0x17f4();}import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';function a216_0x5ee9(_0x57d175,_0x11039d){_0x57d175=_0x57d175-0x15a;const _0x17f48d=a216_0x17f4();let _0x5ee9a8=_0x17f48d[_0x57d175];return _0x5ee9a8;}import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';export const projectDomainRoutingSyncDefinition={'service':a216_0x2af4e4(0x15d),'command':a216_0x2af4e4(0x15e),'description':a216_0x2af4e4(0x15a),'risk':a216_0x2af4e4(0x167),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(){const _0x2128d6=a216_0x2af4e4,_0x5f909c=findProjectRootDirectory();if(!resolveConfigPath(_0x5f909c))throw CliErrors['validation'](_0x2128d6(0x162),_0x2128d6(0x16b)+CLI_BIN_NAME+_0x2128d6(0x168));const _0x23270a=writeProjectDomainRoutingManifest(_0x5f909c);return{'ok':!![],'message':_0x2128d6(0x160)+_0x23270a[_0x2128d6(0x164)],'data':_0x23270a};}};
@@ -1 +1 @@
1
- const a217_0x1a8932=a217_0x582c;(function(_0x12feae,_0x54c0ca){const _0x21192e=a217_0x582c,_0x40bea7=_0x12feae();while(!![]){try{const _0x171f94=-parseInt(_0x21192e(0x1c7))/0x1+parseInt(_0x21192e(0x1ec))/0x2*(-parseInt(_0x21192e(0x1d1))/0x3)+parseInt(_0x21192e(0x1f5))/0x4+-parseInt(_0x21192e(0x1d7))/0x5+parseInt(_0x21192e(0x1d4))/0x6+parseInt(_0x21192e(0x1f2))/0x7+-parseInt(_0x21192e(0x1cd))/0x8;if(_0x171f94===_0x54c0ca)break;else _0x40bea7['push'](_0x40bea7['shift']());}catch(_0x59fa6e){_0x40bea7['push'](_0x40bea7['shift']());}}}(a217_0x28d4,0x4a791));function a217_0x582c(_0x151d1d,_0xf37b62){_0x151d1d=_0x151d1d-0x1c7;const _0x28d42a=a217_0x28d4();let _0x582c54=_0x28d42a[_0x151d1d];return _0x582c54;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a217_0x28d4(){const _0x592be4=['\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]\x20from\x20the\x20empty\x20target\x20directory.','../../commands/project/create/main.js','str','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','upgrade','Upgrade\x20cancelled.','PATCH','name','current-dir','Usage:\x20','cwd','env','completed','Skip\x20confirmation\x20prompt','Create\x20a\x20new\x20project','boolean','cookie','project-name','429274RJaphG','yes','Upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure','Would\x20upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure\x20without\x20overwriting\x20project-owned\x20entrypoints','write','validation','1863540xFyziG','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','string','482112GcmzTf','appcode','bool','Prepared\x20local\x20project\x20template\x20directory','98096ktHEkw','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]','--current-dir\x20cannot\x20be\x20combined\x20with\x20a\x20project\x20name.','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]\x20or\x20','nonInteractive','create','1129704bNDQbV','cancelled','Initialize\x20the\x20current\x20empty\x20directory\x20instead\x20of\x20creating\x20a\x20child\x20directory','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','3MpgysZ','project','Project\x20upgrade\x20completed.','3144132tMYeWO','Target\x20environment','template-source','758915mBbCvW','args','trim'];a217_0x28d4=function(){return _0x592be4;};return a217_0x28d4();}import{analyseProjectUpgrade,upgradeApp}from'../../commands/project/upgrade.js';import{projectDomainRoutingSyncDefinition}from'../../commands/project/domain-routing-sync.js';const createFlags=[{'name':a217_0x1a8932(0x1e1),'type':a217_0x1a8932(0x1f4),'description':'Project\x20name'},{'name':a217_0x1a8932(0x1e5),'type':a217_0x1a8932(0x1f4),'description':a217_0x1a8932(0x1d5)},{'name':'appcode','type':a217_0x1a8932(0x1f4),'description':a217_0x1a8932(0x1f3)},{'name':'current-dir','type':a217_0x1a8932(0x1e9),'description':a217_0x1a8932(0x1cf),'default':![]},{'name':a217_0x1a8932(0x1d6),'type':a217_0x1a8932(0x1f4),'description':a217_0x1a8932(0x1f8)}],upgradeFlags=[{'name':a217_0x1a8932(0x1ed),'type':a217_0x1a8932(0x1e9),'description':a217_0x1a8932(0x1e7),'default':![]}];export const projectDefinitions=[{'service':a217_0x1a8932(0x1d2),'command':a217_0x1a8932(0x1cc),'description':a217_0x1a8932(0x1e8),'risk':a217_0x1a8932(0x1f0),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a217_0x1a8932(0x1eb),'description':a217_0x1a8932(0x1d0),'required':![]}],'flags':createFlags,async 'execute'(_0x3a8686){const _0x30a5d9=a217_0x1a8932,{createApp:_0x4fba3c}=await import(_0x30a5d9(0x1db)),_0x127774=_0x3a8686[_0x30a5d9(0x1dc)](_0x30a5d9(0x1e1))[_0x30a5d9(0x1d9)]()||_0x3a8686[_0x30a5d9(0x1d8)][0x0]?.[_0x30a5d9(0x1d9)](),_0x4bf416=_0x3a8686[_0x30a5d9(0x1dc)](_0x30a5d9(0x1e5))||undefined,_0x1a0ce6=_0x3a8686[_0x30a5d9(0x1dc)](_0x30a5d9(0x1f6))||undefined,_0x14b4ea=_0x3a8686[_0x30a5d9(0x1dc)]('template-source')['trim']()||undefined,_0x18f574=_0x3a8686[_0x30a5d9(0x1f7)](_0x30a5d9(0x1e2));if(_0x18f574&&_0x127774)throw CliErrors[_0x30a5d9(0x1f1)](_0x30a5d9(0x1c9),'Run\x20'+CLI_BIN_NAME+_0x30a5d9(0x1da));if(_0x3a8686['nonInteractive']){if(!_0x127774&&!_0x18f574)throw CliErrors[_0x30a5d9(0x1f1)](_0x30a5d9(0x1dd),_0x30a5d9(0x1e3)+CLI_BIN_NAME+_0x30a5d9(0x1ca)+CLI_BIN_NAME+_0x30a5d9(0x1c8));await _0x4fba3c({'projectCode':_0x127774,'appCode':_0x1a0ce6,'env':_0x4bf416,'cookie':_0x3a8686[_0x30a5d9(0x1ea)],'currentDir':_0x18f574,'nonInteractive':!![],'templateSource':_0x14b4ea});}else await _0x4fba3c({'projectCode':_0x127774,'appCode':_0x1a0ce6,'env':_0x4bf416,'cookie':_0x3a8686['cookie'],'currentDir':_0x18f574,'templateSource':_0x14b4ea});return{'ok':!![]};}},projectDomainRoutingSyncDefinition,{'service':a217_0x1a8932(0x1d2),'command':a217_0x1a8932(0x1de),'description':a217_0x1a8932(0x1ee),'risk':a217_0x1a8932(0x1f0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'dryRun'(){const _0x2cc83e=a217_0x1a8932,_0x5c2ee3=analyseProjectUpgrade(process[_0x2cc83e(0x1e4)]());return{'method':_0x2cc83e(0x1e0),'url':process['cwd'](),'body':_0x5c2ee3,'description':_0x2cc83e(0x1ef)};},async 'execute'(_0x1463b2){const _0x24252d=a217_0x1a8932,_0x54f2a5=await upgradeApp(_0x1463b2[_0x24252d(0x1cb)],{'yes':_0x1463b2[_0x24252d(0x1f7)](_0x24252d(0x1ed))});return{'ok':_0x54f2a5[_0x24252d(0x1e6)]||_0x54f2a5[_0x24252d(0x1ce)]===!![],'message':_0x54f2a5[_0x24252d(0x1ce)]?_0x24252d(0x1df):_0x54f2a5[_0x24252d(0x1e6)]?_0x24252d(0x1d3):'Project\x20upgrade\x20completed\x20with\x20follow-up\x20work.','data':_0x54f2a5};}}];
1
+ const a217_0x4a722f=a217_0x1f41;(function(_0x260692,_0x416d5c){const _0x5b5e33=a217_0x1f41,_0x11217b=_0x260692();while(!![]){try{const _0x15e770=parseInt(_0x5b5e33(0xd0))/0x1+parseInt(_0x5b5e33(0xd1))/0x2*(parseInt(_0x5b5e33(0xcf))/0x3)+-parseInt(_0x5b5e33(0xd6))/0x4+-parseInt(_0x5b5e33(0xdc))/0x5*(parseInt(_0x5b5e33(0xe3))/0x6)+parseInt(_0x5b5e33(0xc0))/0x7*(parseInt(_0x5b5e33(0xc7))/0x8)+parseInt(_0x5b5e33(0xba))/0x9*(-parseInt(_0x5b5e33(0xdb))/0xa)+parseInt(_0x5b5e33(0xd9))/0xb;if(_0x15e770===_0x416d5c)break;else _0x11217b['push'](_0x11217b['shift']());}catch(_0x91bc20){_0x11217b['push'](_0x11217b['shift']());}}}(a217_0x474e,0x1cf44));function a217_0x1f41(_0x35f3f1,_0x22fd1c){_0x35f3f1=_0x35f3f1-0xb8;const _0x474e76=a217_0x474e();let _0x1f41ea=_0x474e76[_0x35f3f1];return _0x1f41ea;}function a217_0x474e(){const _0x11ada6=['current-dir','Project\x20name','Skip\x20confirmation\x20prompt','bool','641488qVoKvv','yes','cancelled','2049245URIckU','Create\x20a\x20new\x20project','10NGbkSN','1865gwQFjJ','template-source','project','Prepared\x20local\x20project\x20template\x20directory','appcode','validation','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','294VQgrZW','write','nonInteractive','1945611OzcCkS','Initialize\x20the\x20current\x20empty\x20directory\x20instead\x20of\x20creating\x20a\x20child\x20directory','Usage:\x20','boolean','str','env','63yKKfCJ','Upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]\x20or\x20','create','trim','--current-dir\x20cannot\x20be\x20combined\x20with\x20a\x20project\x20name.','string','41816LhLWKl','Project\x20upgrade\x20completed\x20with\x20follow-up\x20work.','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]','cwd','Project\x20upgrade\x20completed.','project-name','upgrade','../../commands/project/create/main.js','21jSXiWl','232241DwplOL','13670sUnZvI'];a217_0x474e=function(){return _0x11ada6;};return a217_0x474e();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{analyseProjectUpgrade,upgradeApp}from'../../commands/project/upgrade.js';import{projectDomainRoutingSyncDefinition}from'../../commands/project/domain-routing-sync.js';const createFlags=[{'name':'name','type':'string','description':a217_0x4a722f(0xd3)},{'name':a217_0x4a722f(0xbf),'type':a217_0x4a722f(0xc6),'description':'Target\x20environment'},{'name':a217_0x4a722f(0xe0),'type':'string','description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'},{'name':a217_0x4a722f(0xd2),'type':a217_0x4a722f(0xbd),'description':a217_0x4a722f(0xbb),'default':![]},{'name':a217_0x4a722f(0xdd),'type':a217_0x4a722f(0xc6),'description':a217_0x4a722f(0xdf)}],upgradeFlags=[{'name':a217_0x4a722f(0xd7),'type':'boolean','description':a217_0x4a722f(0xd4),'default':![]}];export const projectDefinitions=[{'service':a217_0x4a722f(0xde),'command':a217_0x4a722f(0xc3),'description':a217_0x4a722f(0xda),'risk':a217_0x4a722f(0xb8),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a217_0x4a722f(0xcc),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x14d07f){const _0x4c6610=a217_0x4a722f,{createApp:_0xd18332}=await import(_0x4c6610(0xce)),_0x442c69=_0x14d07f['str']('name')[_0x4c6610(0xc4)]()||_0x14d07f['args'][0x0]?.[_0x4c6610(0xc4)](),_0x1e0114=_0x14d07f[_0x4c6610(0xbe)]('env')||undefined,_0x313ce4=_0x14d07f[_0x4c6610(0xbe)](_0x4c6610(0xe0))||undefined,_0x2ee886=_0x14d07f[_0x4c6610(0xbe)]('template-source')[_0x4c6610(0xc4)]()||undefined,_0x128b85=_0x14d07f[_0x4c6610(0xd5)]('current-dir');if(_0x128b85&&_0x442c69)throw CliErrors[_0x4c6610(0xe1)](_0x4c6610(0xc5),'Run\x20'+CLI_BIN_NAME+'\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]\x20from\x20the\x20empty\x20target\x20directory.');if(_0x14d07f[_0x4c6610(0xb9)]){if(!_0x442c69&&!_0x128b85)throw CliErrors[_0x4c6610(0xe1)](_0x4c6610(0xe2),_0x4c6610(0xbc)+CLI_BIN_NAME+_0x4c6610(0xc2)+CLI_BIN_NAME+_0x4c6610(0xc9));await _0xd18332({'projectCode':_0x442c69,'appCode':_0x313ce4,'env':_0x1e0114,'cookie':_0x14d07f['cookie'],'currentDir':_0x128b85,'nonInteractive':!![],'templateSource':_0x2ee886});}else await _0xd18332({'projectCode':_0x442c69,'appCode':_0x313ce4,'env':_0x1e0114,'cookie':_0x14d07f['cookie'],'currentDir':_0x128b85,'templateSource':_0x2ee886});return{'ok':!![]};}},projectDomainRoutingSyncDefinition,{'service':a217_0x4a722f(0xde),'command':a217_0x4a722f(0xcd),'description':a217_0x4a722f(0xc1),'risk':a217_0x4a722f(0xb8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'dryRun'(){const _0x2a5585=a217_0x4a722f,_0x4b4afa=analyseProjectUpgrade(process[_0x2a5585(0xca)]());return{'method':'PATCH','url':process['cwd'](),'body':_0x4b4afa,'description':'Would\x20upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure\x20without\x20overwriting\x20project-owned\x20entrypoints'};},async 'execute'(_0x1977a8){const _0x487ae0=a217_0x4a722f,_0x951bc5=await upgradeApp(_0x1977a8[_0x487ae0(0xb9)],{'yes':_0x1977a8[_0x487ae0(0xd5)](_0x487ae0(0xd7))});return{'ok':_0x951bc5['completed']||_0x951bc5[_0x487ae0(0xd8)]===!![],'message':_0x951bc5[_0x487ae0(0xd8)]?'Upgrade\x20cancelled.':_0x951bc5['completed']?_0x487ae0(0xcb):_0x487ae0(0xc8),'data':_0x951bc5};}}];
@@ -1 +1 @@
1
- (function(_0x346c56,_0x7612e5){const _0x1d83c5=a218_0x3f4b,_0x500ea5=_0x346c56();while(!![]){try{const _0x456512=-parseInt(_0x1d83c5(0x1e4))/0x1*(parseInt(_0x1d83c5(0x1d4))/0x2)+parseInt(_0x1d83c5(0x1f1))/0x3+-parseInt(_0x1d83c5(0x1c4))/0x4+parseInt(_0x1d83c5(0x1e2))/0x5+parseInt(_0x1d83c5(0x1e5))/0x6+-parseInt(_0x1d83c5(0x1f0))/0x7+parseInt(_0x1d83c5(0x1e9))/0x8;if(_0x456512===_0x7612e5)break;else _0x500ea5['push'](_0x500ea5['shift']());}catch(_0x1eb592){_0x500ea5['push'](_0x500ea5['shift']());}}}(a218_0x5bc9,0x29bce));import a218_0x2937ef from'chalk';import a218_0x448a82 from'ora';function a218_0x5bc9(){const _0x8ab71f=['candidatePath','1493768HcNGLz','done','\x20\x20npm\x20install','utf8','padEnd','sdkUpgrade','needed','723583Vglkrd','772530VgKGqi','cyan','Step\x202/2:\x20Application\x20source\x20—\x20','some','message','\x20\x20Step\x20','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','Step\x201/2:\x20@lovrabet/sdk\x20—\x20','action','Step\x202/2:\x20Upgrading\x20application\x20source\x20structure...','stringify','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','Upgrade\x20application\x20source','start','gray','push','log','@lovrabet/sdk:','Upgrade\x20candidates\x20were\x20written,\x20but\x20project-owned\x20source\x20files\x20still\x20require\x20manual\x20merging.','CANCEL','apiArchitecture','\x20\x20Historical\x20ungrouped\x20multi-app\x20directories\x20keep\x20their\x20prefixed\x20API\x20files.','FAIL','white','red','1114216OalSPO','groups','Application\x20source:','up-to-date','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','bold','Upgrade\x20cancelled.','object','Your\x20project\x20is\x20already\x20up-to-date.','devDependencies','Step\x201/2:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','label','succeed','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','length','===\x20Upgrade\x20Analysis\x20===','50HFZDnI','join','Upgrade\x20completed\x20successfully!','step','@lovrabet/sdk','manualMergeRequired','failed','upgrade\x20needed','Upgrade\x20@lovrabet/sdk','fail','yellow','parse','green','package.json','217380aCYGqD','detail','1021wXWBPx','544194GrTpwx','string','latest'];a218_0x5bc9=function(){return _0x8ab71f;};return a218_0x5bc9();}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(_0x3ef0f2){const _0x518998=a218_0x3f4b;try{const _0x192c44=JSON[_0x518998(0x1df)](readFileSync(_0x3ef0f2,_0x518998(0x1ec)));return _0x192c44&&typeof _0x192c44===_0x518998(0x1cb)?_0x192c44:{};}catch{return{};}}function a218_0x3f4b(_0x5ea2bd,_0x438fb9){_0x5ea2bd=_0x5ea2bd-0x1b3;const _0x5bc9f6=a218_0x5bc9();let _0x3f4bf0=_0x5bc9f6[_0x5ea2bd];return _0x3f4bf0;}export function analyseProjectUpgrade(_0x34b25b){const _0x1b4272=a218_0x3f4b;let _0x3567ee=null;const _0x4d8664=resolve(_0x34b25b,_0x1b4272(0x1e1));if(existsSync(_0x4d8664))try{const _0x25135e=JSON['parse'](readFileSync(_0x4d8664,_0x1b4272(0x1ec)));for(const _0x18de93 of['dependencies',_0x1b4272(0x1cd)]){const _0x1a5e9f=_0x25135e?.[_0x18de93]?.[_0x1b4272(0x1d8)];if(typeof _0x1a5e9f===_0x1b4272(0x1e6)){_0x1a5e9f!==_0x1b4272(0x1e7)&&(_0x3567ee={'pkgPath':_0x4d8664,'currentVersion':_0x1a5e9f,'field':_0x18de93});break;}}}catch{}const _0x369647=resolve(_0x34b25b,NEW_CONFIG_NAME),_0x45a736=existsSync(_0x369647)?readProjectConfig(_0x369647):{},_0x2c0060=analyzeProjectApiArchitecture(_0x34b25b,_0x45a736);return{'sdkUpgrade':_0x3567ee,'apiArchitecture':_0x2c0060};}function printReport(_0x5f077e){const _0xed5fbd=a218_0x3f4b;console[_0xed5fbd(0x1bb)](''),console[_0xed5fbd(0x1bb)](a218_0x2937ef[_0xed5fbd(0x1c9)](_0xed5fbd(0x1d3))),console[_0xed5fbd(0x1bb)](''),console[_0xed5fbd(0x1bb)](a218_0x2937ef[_0xed5fbd(0x1f2)](_0xed5fbd(0x1c6))+('\x20\x20'+(_0x5f077e[_0xed5fbd(0x1bf)][_0xed5fbd(0x1ef)]?a218_0x2937ef[_0xed5fbd(0x1de)](_0xed5fbd(0x1db)):a218_0x2937ef[_0xed5fbd(0x1e0)](_0xed5fbd(0x1c7)))));for(const _0x371918 of _0x5f077e[_0xed5fbd(0x1bf)][_0xed5fbd(0x1c5)]){console[_0xed5fbd(0x1bb)]('\x20\x20'+_0x371918['apiDir']+'\x20('+_0x371918['profiles'][_0xed5fbd(0x1d5)](',\x20')+')');for(const _0x4590b8 of _0x371918['files']){console[_0xed5fbd(0x1bb)]('\x20\x20\x20\x20'+_0x4590b8[_0xed5fbd(0x1b3)][_0xed5fbd(0x1ed)](0x11)+'\x20'+_0x4590b8['path']),_0x4590b8[_0xed5fbd(0x1e8)]&&console['log']('\x20\x20\x20\x20\x20\x20candidate:\x20'+_0x4590b8[_0xed5fbd(0x1e8)]);}}_0x5f077e[_0xed5fbd(0x1bf)]['skippedLegacyDirectories'][_0xed5fbd(0x1d2)]>0x0&&console[_0xed5fbd(0x1bb)](_0xed5fbd(0x1c0));console[_0xed5fbd(0x1bb)]('');if(_0x5f077e[_0xed5fbd(0x1ee)]){const {currentVersion:_0x595ada,field:_0x31ee5d,pkgPath:_0x225c53}=_0x5f077e[_0xed5fbd(0x1ee)];console['log'](a218_0x2937ef[_0xed5fbd(0x1f2)](_0xed5fbd(0x1bc))+('\x20\x20'+a218_0x2937ef['yellow'](_0x225c53))),console[_0xed5fbd(0x1bb)]('\x20\x20Current\x20version\x20in\x20'+_0x31ee5d+':\x20'+a218_0x2937ef[_0xed5fbd(0x1de)](_0x595ada)+'\x20→\x20'+a218_0x2937ef['green'](_0xed5fbd(0x1e7))),console[_0xed5fbd(0x1bb)](_0xed5fbd(0x1f7));}else console[_0xed5fbd(0x1bb)](a218_0x2937ef[_0xed5fbd(0x1f2)](_0xed5fbd(0x1bc))+'\x20\x20'+a218_0x2937ef[_0xed5fbd(0x1b9)]('not\x20found\x20or\x20already\x20at\x20latest'));console[_0xed5fbd(0x1bb)]('');}function execUpgradeSdk(_0x29207d){const _0x410168=a218_0x3f4b;if(!_0x29207d['sdkUpgrade'])return{'step':0x1,'label':_0x410168(0x1dc),'ok':!![],'detail':_0x410168(0x1d1)};const {pkgPath:_0x7bbfe1,currentVersion:_0x3aef4d,field:_0x4a0f60}=_0x29207d['sdkUpgrade'];try{const _0x4700c3=readFileSync(_0x7bbfe1,_0x410168(0x1ec)),_0x456951=JSON[_0x410168(0x1df)](_0x4700c3);return _0x456951[_0x4a0f60][_0x410168(0x1d8)]=_0x410168(0x1e7),writeFileSync(_0x7bbfe1,JSON[_0x410168(0x1b5)](_0x456951,null,0x2)+'\x0a',_0x410168(0x1ec)),{'step':0x1,'label':_0x410168(0x1dc),'ok':!![],'detail':_0x4a0f60+'[\x22@lovrabet/sdk\x22]:\x20'+_0x3aef4d+'\x20→\x20latest'};}catch(_0x5d0006){return{'step':0x1,'label':_0x410168(0x1dc),'ok':![],'detail':_0x5d0006 instanceof Error?_0x5d0006['message']:String(_0x5d0006)};}}function printSummary(_0xdb4854){const _0x511532=a218_0x3f4b;console[_0x511532(0x1bb)](''),console[_0x511532(0x1bb)](a218_0x2937ef['bold']('===\x20Upgrade\x20Summary\x20===')),console[_0x511532(0x1bb)]('');for(const _0x3fdbcc of _0xdb4854){const _0x2f75fa=_0x3fdbcc['ok']?a218_0x2937ef[_0x511532(0x1e0)]('OK'):a218_0x2937ef[_0x511532(0x1c3)](_0x511532(0x1c1));console[_0x511532(0x1bb)]('\x20\x20'+_0x2f75fa+_0x511532(0x1f6)+_0x3fdbcc[_0x511532(0x1d7)]+':\x20'+_0x3fdbcc[_0x511532(0x1cf)]);if(_0x3fdbcc[_0x511532(0x1e3)])console[_0x511532(0x1bb)]('\x20\x20\x20\x20\x20\x20\x20'+a218_0x2937ef[_0x511532(0x1b9)](_0x3fdbcc[_0x511532(0x1e3)]));}console['log']('');}export async function upgradeApp(_0x59e126,_0x394125){const _0x2fda52=a218_0x3f4b,_0x4ae44e=process['cwd'](),_0x36dc19=analyseProjectUpgrade(_0x4ae44e);if(!_0x36dc19[_0x2fda52(0x1ee)]&&!_0x36dc19['apiArchitecture'][_0x2fda52(0x1ef)])return console['log'](a218_0x2937ef['green'](_0x2fda52(0x1cc))),{'analysis':_0x36dc19,'steps':[],'completed':!![]};printReport(_0x36dc19);const _0x129ed0=!!(_0x394125['yes']||_0x394125['Y']||_0x59e126);if(!_0x129ed0)try{const _0x1acfee=await askConfirm('Proceed\x20with\x20upgrade?');if(!_0x1acfee)return console['log'](a218_0x2937ef['gray'](_0x2fda52(0x1ca))),{'analysis':_0x36dc19,'steps':[],'completed':![],'cancelled':!![]};}catch(_0x50432c){if(_0x50432c?.[_0x2fda52(0x1f5)]===_0x2fda52(0x1be))return console['log'](a218_0x2937ef[_0x2fda52(0x1b9)](_0x2fda52(0x1ca))),{'analysis':_0x36dc19,'steps':[],'completed':![],'cancelled':!![]};throw _0x50432c;}const _0x2e5e4a=[],_0x384203=a218_0x448a82({'text':_0x2fda52(0x1ce),'color':'cyan'})[_0x2fda52(0x1b8)](),_0x51e6dc=execUpgradeSdk(_0x36dc19);_0x2e5e4a[_0x2fda52(0x1ba)](_0x51e6dc),_0x384203[_0x51e6dc['ok']?_0x2fda52(0x1d0):_0x2fda52(0x1dd)](_0x2fda52(0x1f8)+(_0x51e6dc[_0x2fda52(0x1e3)]??(_0x51e6dc['ok']?_0x2fda52(0x1ea):_0x2fda52(0x1da))));const _0x1f348f=a218_0x448a82({'text':_0x2fda52(0x1b4),'color':_0x2fda52(0x1f2)})[_0x2fda52(0x1b8)]();let _0x47b42e;try{_0x47b42e=await upgradeProjectApiArchitecture(_0x4ae44e);const _0x4a6d3c=_0x47b42e[_0x2fda52(0x1d9)]?'candidate\x20entrypoints\x20written;\x20manual\x20merge\x20required':'source\x20structure\x20is\x20current';_0x1f348f[_0x2fda52(0x1d0)](_0x2fda52(0x1f3)+_0x4a6d3c),_0x2e5e4a[_0x2fda52(0x1ba)]({'step':0x2,'label':_0x2fda52(0x1b7),'ok':!![],'detail':_0x4a6d3c});}catch(_0x2eeaa6){const _0x44c1b6=_0x2eeaa6 instanceof Error?_0x2eeaa6['message']:String(_0x2eeaa6);_0x1f348f[_0x2fda52(0x1dd)]('Step\x202/2:\x20Application\x20source\x20—\x20'+_0x44c1b6),_0x2e5e4a[_0x2fda52(0x1ba)]({'step':0x2,'label':'Upgrade\x20application\x20source','ok':![],'detail':_0x44c1b6});}printSummary(_0x2e5e4a);const _0xe351d4=_0x2e5e4a[_0x2fda52(0x1f4)](_0x307f2d=>!_0x307f2d['ok']);if(_0xe351d4)console[_0x2fda52(0x1bb)](a218_0x2937ef[_0x2fda52(0x1de)](_0x2fda52(0x1c8)));else _0x47b42e?.[_0x2fda52(0x1d9)]?console[_0x2fda52(0x1bb)](a218_0x2937ef[_0x2fda52(0x1de)](_0x2fda52(0x1bd))):console[_0x2fda52(0x1bb)](a218_0x2937ef['green'](_0x2fda52(0x1d6)));return _0x51e6dc['ok']&&_0x36dc19[_0x2fda52(0x1ee)]&&(console[_0x2fda52(0x1bb)](''),console[_0x2fda52(0x1bb)](a218_0x2937ef[_0x2fda52(0x1c9)][_0x2fda52(0x1f2)](_0x2fda52(0x1b6))),console['log'](a218_0x2937ef['cyan']('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x2fda52(0x1bb)](''),console[_0x2fda52(0x1bb)](a218_0x2937ef['white'](_0x2fda52(0x1eb))),console[_0x2fda52(0x1bb)](a218_0x2937ef[_0x2fda52(0x1c2)]('\x20\x20#\x20or')),console['log'](a218_0x2937ef[_0x2fda52(0x1c2)]('\x20\x20bun\x20install')),console[_0x2fda52(0x1bb)]('')),{'analysis':_0x36dc19,'steps':_0x2e5e4a,'apiArchitecture':_0x47b42e,'completed':!_0xe351d4&&!_0x47b42e?.[_0x2fda52(0x1d9)]};}
1
+ function a218_0x4b8b(_0x3c56fd,_0x1b1407){_0x3c56fd=_0x3c56fd-0x1c4;const _0x221591=a218_0x2215();let _0x4b8b39=_0x221591[_0x3c56fd];return _0x4b8b39;}(function(_0x303b63,_0x55549e){const _0x14d946=a218_0x4b8b,_0x3aa865=_0x303b63();while(!![]){try{const _0x27c3e1=-parseInt(_0x14d946(0x1e3))/0x1+parseInt(_0x14d946(0x1ec))/0x2*(-parseInt(_0x14d946(0x1c4))/0x3)+parseInt(_0x14d946(0x20b))/0x4*(-parseInt(_0x14d946(0x1f7))/0x5)+-parseInt(_0x14d946(0x1f8))/0x6+-parseInt(_0x14d946(0x1fa))/0x7+parseInt(_0x14d946(0x1f5))/0x8+parseInt(_0x14d946(0x1e1))/0x9;if(_0x27c3e1===_0x55549e)break;else _0x3aa865['push'](_0x3aa865['shift']());}catch(_0x5dc53b){_0x3aa865['push'](_0x3aa865['shift']());}}}(a218_0x2215,0x95836));import a218_0x19cf55 from'chalk';import a218_0x46ff55 from'ora';import{existsSync,readFileSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{askConfirm}from'../../commands/menu/shared/inquirer.js';function a218_0x2215(){const _0x5ec745=['\x20\x20npm\x20install','gray','\x20→\x20latest','action','latest','Upgrade\x20cancelled.','Upgrade\x20application\x20source','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','[\x22@lovrabet/sdk\x22]:\x20','4azmYzY','step','Step\x201/2:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','object','Upgrade\x20@lovrabet/sdk','path','start','yes','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','label','6ZqaNdh','Application\x20source:','files','\x20\x20\x20\x20\x20\x20\x20','\x20\x20Step\x20','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','push','@lovrabet/sdk','FAIL','succeed','===\x20Upgrade\x20Summary\x20===','utf8','needed','\x20\x20#\x20or','CANCEL','Step\x202/2:\x20Upgrading\x20application\x20source\x20structure...','parse','stringify','join','not\x20found\x20or\x20already\x20at\x20latest','upgrade\x20needed','devDependencies','padEnd','candidatePath','green','apiArchitecture','detail','log','done','27272322lRhTlo','Step\x202/2:\x20Application\x20source\x20—\x20','463846widGbG','fail','Proceed\x20with\x20upgrade?','\x20\x20bun\x20install','\x20→\x20','candidate\x20entrypoints\x20written;\x20manual\x20merge\x20required','\x20\x20Current\x20version\x20in\x20','red','yellow','512508KTyUBe','\x20\x20Historical\x20ungrouped\x20multi-app\x20directories\x20keep\x20their\x20prefixed\x20API\x20files.','cyan','\x20\x20\x20\x20\x20\x20candidate:\x20','apiDir','message','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','sdkUpgrade','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','9576136lcMBZi','profiles','3932770HyQOic','3787956PYDDsT','@lovrabet/sdk:','8544445aXQPiY','failed','cwd','manualMergeRequired','bold','white','Upgrade\x20candidates\x20were\x20written,\x20but\x20project-owned\x20source\x20files\x20still\x20require\x20manual\x20merging.','package.json'];a218_0x2215=function(){return _0x5ec745;};return a218_0x2215();}import{analyzeProjectApiArchitecture,upgradeProjectApiArchitecture}from'../../commands/project/api-architecture-upgrade.js';import{NEW_CONFIG_NAME}from'../../context.js';function readProjectConfig(_0x2c1c82){const _0x39a908=a218_0x4b8b;try{const _0x5d1dc7=JSON[_0x39a908(0x1d4)](readFileSync(_0x2c1c82,'utf8'));return _0x5d1dc7&&typeof _0x5d1dc7===_0x39a908(0x20e)?_0x5d1dc7:{};}catch{return{};}}export function analyseProjectUpgrade(_0x1b11c7){const _0x272f2e=a218_0x4b8b;let _0x2882f2=null;const _0x13c4df=resolve(_0x1b11c7,_0x272f2e(0x201));if(existsSync(_0x13c4df))try{const _0x37292d=JSON[_0x272f2e(0x1d4)](readFileSync(_0x13c4df,_0x272f2e(0x1cf)));for(const _0x30e973 of['dependencies',_0x272f2e(0x1d9)]){const _0x3d74cb=_0x37292d?.[_0x30e973]?.[_0x272f2e(0x1cb)];if(typeof _0x3d74cb==='string'){_0x3d74cb!==_0x272f2e(0x206)&&(_0x2882f2={'pkgPath':_0x13c4df,'currentVersion':_0x3d74cb,'field':_0x30e973});break;}}}catch{}const _0x475744=resolve(_0x1b11c7,NEW_CONFIG_NAME),_0x44c472=existsSync(_0x475744)?readProjectConfig(_0x475744):{},_0x4f4b9d=analyzeProjectApiArchitecture(_0x1b11c7,_0x44c472);return{'sdkUpgrade':_0x2882f2,'apiArchitecture':_0x4f4b9d};}function printReport(_0x583672){const _0x450f02=a218_0x4b8b;console[_0x450f02(0x1df)](''),console[_0x450f02(0x1df)](a218_0x19cf55[_0x450f02(0x1fe)]('===\x20Upgrade\x20Analysis\x20===')),console['log'](''),console['log'](a218_0x19cf55[_0x450f02(0x1ee)](_0x450f02(0x1c5))+('\x20\x20'+(_0x583672[_0x450f02(0x1dd)][_0x450f02(0x1d0)]?a218_0x19cf55[_0x450f02(0x1eb)](_0x450f02(0x1d8)):a218_0x19cf55[_0x450f02(0x1dc)]('up-to-date'))));for(const _0x4e2775 of _0x583672['apiArchitecture']['groups']){console['log']('\x20\x20'+_0x4e2775[_0x450f02(0x1f0)]+'\x20('+_0x4e2775[_0x450f02(0x1f6)][_0x450f02(0x1d6)](',\x20')+')');for(const _0x3ae1f2 of _0x4e2775[_0x450f02(0x1c6)]){console['log']('\x20\x20\x20\x20'+_0x3ae1f2[_0x450f02(0x205)][_0x450f02(0x1da)](0x11)+'\x20'+_0x3ae1f2[_0x450f02(0x210)]),_0x3ae1f2[_0x450f02(0x1db)]&&console['log'](_0x450f02(0x1ef)+_0x3ae1f2[_0x450f02(0x1db)]);}}_0x583672[_0x450f02(0x1dd)]['skippedLegacyDirectories']['length']>0x0&&console[_0x450f02(0x1df)](_0x450f02(0x1ed));console['log']('');if(_0x583672[_0x450f02(0x1f3)]){const {currentVersion:_0x13f595,field:_0x3f0904,pkgPath:_0x394b9e}=_0x583672[_0x450f02(0x1f3)];console[_0x450f02(0x1df)](a218_0x19cf55[_0x450f02(0x1ee)](_0x450f02(0x1f9))+('\x20\x20'+a218_0x19cf55[_0x450f02(0x1eb)](_0x394b9e))),console[_0x450f02(0x1df)](_0x450f02(0x1e9)+_0x3f0904+':\x20'+a218_0x19cf55['yellow'](_0x13f595)+_0x450f02(0x1e7)+a218_0x19cf55['green'](_0x450f02(0x206))),console[_0x450f02(0x1df)](_0x450f02(0x1c9));}else console['log'](a218_0x19cf55[_0x450f02(0x1ee)]('@lovrabet/sdk:')+'\x20\x20'+a218_0x19cf55[_0x450f02(0x203)](_0x450f02(0x1d7)));console[_0x450f02(0x1df)]('');}function execUpgradeSdk(_0x4a47c1){const _0x558ec0=a218_0x4b8b;if(!_0x4a47c1[_0x558ec0(0x1f3)])return{'step':0x1,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0x558ec0(0x209)};const {pkgPath:_0x96a8e3,currentVersion:_0x39929d,field:_0x47ae72}=_0x4a47c1[_0x558ec0(0x1f3)];try{const _0xd38bdb=readFileSync(_0x96a8e3,_0x558ec0(0x1cf)),_0x2c0891=JSON[_0x558ec0(0x1d4)](_0xd38bdb);return _0x2c0891[_0x47ae72][_0x558ec0(0x1cb)]='latest',writeFileSync(_0x96a8e3,JSON[_0x558ec0(0x1d5)](_0x2c0891,null,0x2)+'\x0a',_0x558ec0(0x1cf)),{'step':0x1,'label':_0x558ec0(0x20f),'ok':!![],'detail':_0x47ae72+_0x558ec0(0x20a)+_0x39929d+_0x558ec0(0x204)};}catch(_0x1c1048){return{'step':0x1,'label':_0x558ec0(0x20f),'ok':![],'detail':_0x1c1048 instanceof Error?_0x1c1048[_0x558ec0(0x1f1)]:String(_0x1c1048)};}}function printSummary(_0x117425){const _0x27ea80=a218_0x4b8b;console['log'](''),console[_0x27ea80(0x1df)](a218_0x19cf55[_0x27ea80(0x1fe)](_0x27ea80(0x1ce))),console['log']('');for(const _0x45fe7b of _0x117425){const _0x198f4c=_0x45fe7b['ok']?a218_0x19cf55[_0x27ea80(0x1dc)]('OK'):a218_0x19cf55[_0x27ea80(0x1ea)](_0x27ea80(0x1cc));console[_0x27ea80(0x1df)]('\x20\x20'+_0x198f4c+_0x27ea80(0x1c8)+_0x45fe7b[_0x27ea80(0x20c)]+':\x20'+_0x45fe7b[_0x27ea80(0x214)]);if(_0x45fe7b[_0x27ea80(0x1de)])console['log'](_0x27ea80(0x1c7)+a218_0x19cf55['gray'](_0x45fe7b[_0x27ea80(0x1de)]));}console[_0x27ea80(0x1df)]('');}export async function upgradeApp(_0x380f1f,_0x5a9ed1){const _0x316688=a218_0x4b8b,_0x28b160=process[_0x316688(0x1fc)](),_0x3f9a4e=analyseProjectUpgrade(_0x28b160);if(!_0x3f9a4e['sdkUpgrade']&&!_0x3f9a4e[_0x316688(0x1dd)][_0x316688(0x1d0)])return console[_0x316688(0x1df)](a218_0x19cf55['green']('Your\x20project\x20is\x20already\x20up-to-date.')),{'analysis':_0x3f9a4e,'steps':[],'completed':!![]};printReport(_0x3f9a4e);const _0x3b9690=!!(_0x5a9ed1[_0x316688(0x212)]||_0x5a9ed1['Y']||_0x380f1f);if(!_0x3b9690)try{const _0x499dee=await askConfirm(_0x316688(0x1e5));if(!_0x499dee)return console[_0x316688(0x1df)](a218_0x19cf55[_0x316688(0x203)](_0x316688(0x207))),{'analysis':_0x3f9a4e,'steps':[],'completed':![],'cancelled':!![]};}catch(_0x59fd0d){if(_0x59fd0d?.[_0x316688(0x1f1)]===_0x316688(0x1d2))return console[_0x316688(0x1df)](a218_0x19cf55[_0x316688(0x203)](_0x316688(0x207))),{'analysis':_0x3f9a4e,'steps':[],'completed':![],'cancelled':!![]};throw _0x59fd0d;}const _0x519509=[],_0x2c156d=a218_0x46ff55({'text':_0x316688(0x20d),'color':_0x316688(0x1ee)})['start'](),_0x12b160=execUpgradeSdk(_0x3f9a4e);_0x519509['push'](_0x12b160),_0x2c156d[_0x12b160['ok']?'succeed':_0x316688(0x1e4)]('Step\x201/2:\x20@lovrabet/sdk\x20—\x20'+(_0x12b160[_0x316688(0x1de)]??(_0x12b160['ok']?_0x316688(0x1e0):_0x316688(0x1fb))));const _0x46cdba=a218_0x46ff55({'text':_0x316688(0x1d3),'color':'cyan'})[_0x316688(0x211)]();let _0x1c8c28;try{_0x1c8c28=await upgradeProjectApiArchitecture(_0x28b160);const _0x40b1e4=_0x1c8c28[_0x316688(0x1fd)]?_0x316688(0x1e8):'source\x20structure\x20is\x20current';_0x46cdba[_0x316688(0x1cd)](_0x316688(0x1e2)+_0x40b1e4),_0x519509[_0x316688(0x1ca)]({'step':0x2,'label':_0x316688(0x208),'ok':!![],'detail':_0x40b1e4});}catch(_0x46679b){const _0x3f0c76=_0x46679b instanceof Error?_0x46679b[_0x316688(0x1f1)]:String(_0x46679b);_0x46cdba[_0x316688(0x1e4)](_0x316688(0x1e2)+_0x3f0c76),_0x519509['push']({'step':0x2,'label':_0x316688(0x208),'ok':![],'detail':_0x3f0c76});}printSummary(_0x519509);const _0x201f1b=_0x519509['some'](_0x14d8aa=>!_0x14d8aa['ok']);if(_0x201f1b)console[_0x316688(0x1df)](a218_0x19cf55[_0x316688(0x1eb)](_0x316688(0x213)));else _0x1c8c28?.[_0x316688(0x1fd)]?console[_0x316688(0x1df)](a218_0x19cf55[_0x316688(0x1eb)](_0x316688(0x200))):console[_0x316688(0x1df)](a218_0x19cf55[_0x316688(0x1dc)]('Upgrade\x20completed\x20successfully!'));return _0x12b160['ok']&&_0x3f9a4e[_0x316688(0x1f3)]&&(console['log'](''),console[_0x316688(0x1df)](a218_0x19cf55['bold'][_0x316688(0x1ee)](_0x316688(0x1f2))),console[_0x316688(0x1df)](a218_0x19cf55[_0x316688(0x1ee)](_0x316688(0x1f4))),console[_0x316688(0x1df)](''),console[_0x316688(0x1df)](a218_0x19cf55[_0x316688(0x1ff)](_0x316688(0x202))),console[_0x316688(0x1df)](a218_0x19cf55[_0x316688(0x1ff)](_0x316688(0x1d1))),console['log'](a218_0x19cf55[_0x316688(0x1ff)](_0x316688(0x1e6))),console['log']('')),{'analysis':_0x3f9a4e,'steps':_0x519509,'apiArchitecture':_0x1c8c28,'completed':!_0x201f1b&&!_0x1c8c28?.[_0x316688(0x1fd)]};}
@@ -1 +1 @@
1
- const a219_0x5a3d1c=a219_0x339a;(function(_0x5915fc,_0x596fa3){const _0x264455=a219_0x339a,_0x2df770=_0x5915fc();while(!![]){try{const _0x4c25a9=parseInt(_0x264455(0x231))/0x1*(parseInt(_0x264455(0x259))/0x2)+-parseInt(_0x264455(0x233))/0x3*(parseInt(_0x264455(0x1fa))/0x4)+parseInt(_0x264455(0x1ee))/0x5+-parseInt(_0x264455(0x256))/0x6*(parseInt(_0x264455(0x240))/0x7)+-parseInt(_0x264455(0x209))/0x8*(-parseInt(_0x264455(0x1e7))/0x9)+parseInt(_0x264455(0x215))/0xa+-parseInt(_0x264455(0x250))/0xb;if(_0x4c25a9===_0x596fa3)break;else _0x2df770['push'](_0x2df770['shift']());}catch(_0x2ae01d){_0x2df770['push'](_0x2df770['shift']());}}}(a219_0xa45b,0x6d7a2));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';function a219_0xa45b(){const _0x56f002=['User\x20Accounts','defaultCommand','1336716qvNzfC','set','Roles','sql:new','app:use','values','549ryCAiW','data:filter','<script>','rabetbase\x20run\x20start','Company\x20Knowledge\x20Base','from','data:getOne','1414245LUPNlU','`\x20instead.','permit:role-menus','Agent\x20Context\x20Rules','Approval\x20Flows','page:react-publish','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','rabetbase\x20kb\x20update','Diagnostics','Logs','rabetbase\x20kb\x20delete','filter','188OagmPq','knowledge-base:update','rabetbase\x20project\x20create\x20<project-name>','`rabetbase\x20','app:remove','Instant\x20API\x20Policy','permit:page-get','Async\x20Tasks','Configuration','Code\x20Generation','flow:disable','rabetbase\x20run\x20preview','Run\x20Scripts','rabetbase\x20page\x20custom-detail','push','7032beXrsh','SQL\x20Queries','bff:new','read','\x20\x20[','Data\x20List\x20Pages\x20&\x20Custom\x20Pages','wildcardDef','rabetbase\x20cli-skill\x20install','Database\x20Connections','knowledge-base:detail','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','rabetbase\x20kb\x20create','5059440pLaQVM','rabetbase\x20bff\x20create','app:assets-update','Platform\x20Issue','risk','build','Project','sql:save','get','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','page:custom-create','page:react-create','rabetbase\x20sql\x20create','page:react-update','permit:role-menus-set','rabetbase\x20run\x20build','rabetbase\x20page\x20data-list-status','app:assets-status','flow:enable','rabetbase\x20kb\x20list','service','app:add','has','Use\x20`','Self\x20Update','length','`\x20has\x20been\x20removed.','menu:update','1lAGBpw','commands','17283QCaNyN','skills:install','Backend\x20Function\x20Scripts','rabetbase\x20page\x20custom-list','description','This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.','Notification\x20Configuration','command','knowledge-base:create','API\x20Development','deployment:sync','preview','write','130522fmTxuH','project:init','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','page:react-detail','isSingleCommand','page:react-list','OCR','Dataset\x20&\x20Operations','\x20\x20[write]','Tenant\x20Members','app:remote','Workspace','File','skill:install','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','1118513RSAJzJ','rabetbase\x20role\x20list','CLI\x20Built-in\x20Skill','knowledge-base:list','rabetbase\x20menu\x20asset-update','rabetbase\x20kb\x20detail','222uQUvnn'];a219_0xa45b=function(){return _0x56f002;};return a219_0xa45b();}import{deploymentDefinitions}from'../commands/deployment/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{taskDefinitions}from'../commands/task/index.js';import{tenantDefinitions}from'../commands/tenant/index.js';import{roleDefinitions}from'../commands/role/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{ruleDefinitions}from'../commands/rule/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{instantApiPolicyDefinitions}from'../commands/instant-api-policy/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{userAccountDefinitions}from'../commands/user-account/index.js';import{flowDefinitions}from'../commands/flow/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x41204c){const _0x1efaa7=a219_0x339a;for(const _0x50f1b8 of _0x41204c){definitions[_0x1efaa7(0x25a)](_0x50f1b8['service']+':'+_0x50f1b8[_0x1efaa7(0x23a)],_0x50f1b8);let _0x228b7a=serviceGroups[_0x1efaa7(0x21d)](_0x50f1b8[_0x1efaa7(0x229)]);!_0x228b7a&&(_0x228b7a=[],serviceGroups[_0x1efaa7(0x25a)](_0x50f1b8[_0x1efaa7(0x229)],_0x228b7a)),_0x228b7a['push'](_0x50f1b8);}}function registerDeclarativeService(_0x520bee,_0x2f8029,_0x5d3c99){const _0x2e7fed=a219_0x339a;registerDefinitions(_0x2f8029);_0x5d3c99?.[_0x2e7fed(0x20f)]&&registerDefinitions([_0x5d3c99['wildcardDef']]);const _0xf4cc7f=_0x3c07c0=>_0x3c07c0===_0x2e7fed(0x20c)?'':_0x3c07c0===_0x2e7fed(0x23f)?_0x2e7fed(0x249):'\x20\x20[high-risk-write]',_0x3336b9={'service':_0x2f8029[0x0][_0x2e7fed(0x229)],'label':_0x520bee,'commands':_0x2f8029[_0x2e7fed(0x1f9)](_0x43efb5=>!_0x43efb5['hidden'])['map'](_0x35fbe0=>({'command':_0x35fbe0['command'],'description':_0x35fbe0[_0x2e7fed(0x237)],'tag':_0xf4cc7f(_0x35fbe0[_0x2e7fed(0x219)])})),'declarative':!![],'defaultCommand':_0x5d3c99?.[_0x2e7fed(0x258)]??(_0x5d3c99?.[_0x2e7fed(0x245)]?_0x2f8029[0x0][_0x2e7fed(0x23a)]:undefined),'wildcardDef':_0x5d3c99?.[_0x2e7fed(0x20f)],'isSingleCommand':_0x5d3c99?.[_0x2e7fed(0x245)]};serviceRegistry[_0x2e7fed(0x208)](_0x3336b9),serviceByName[_0x2e7fed(0x25a)](_0x3336b9[_0x2e7fed(0x229)],_0x3336b9);}registerDeclarativeService(a219_0x5a3d1c(0x21b),projectDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x24c),workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService('Authentication',authDefinitions,{'defaultCommand':'login'}),registerDeclarativeService(a219_0x5a3d1c(0x24a),tenantDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x257),userAccountDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x248),datasetDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x20e),pageDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x23c),apiDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x235),bffDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x1ff),instantApiPolicyDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x239),notificationDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x20a),sqlDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x211),dbDefinitions),registerDeclarativeService('Deployment',deploymentDefinitions),registerDeclarativeService('Menu',menuDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x201),taskDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x1e3),roleDefinitions),registerDeclarativeService('Runtime\x20App\x20Config\x20Management',appConfigDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x1eb),kbDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x1f1),ruleDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x218),issueDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x24d),fileDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x247),ocrDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x203),codegenDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x202),configDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x1f6),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a219_0x5a3d1c(0x22d),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a219_0x5a3d1c(0x252),cliSkillDefinitions,{'defaultCommand':'install'}),registerDeclarativeService(a219_0x5a3d1c(0x1f2),flowDefinitions),registerDeclarativeService(a219_0x5a3d1c(0x1f7),logsDefinitions,{'defaultCommand':'show'}),registerDeclarativeService(a219_0x5a3d1c(0x206),[runDefinition],{'wildcardDef':runDefinition});function a219_0x339a(_0xd93f3e,_0xa1fa12){_0xd93f3e=_0xd93f3e-0x1e3;const _0xa45b96=a219_0xa45b();let _0x339afb=_0xa45b96[_0xd93f3e];return _0x339afb;}{const last=serviceRegistry[serviceRegistry[a219_0x5a3d1c(0x22e)]-0x1];last[a219_0x5a3d1c(0x232)]=[{'command':a219_0x5a3d1c(0x1e9),'description':'Run\x20any\x20package.json\x20script','tag':a219_0x5a3d1c(0x20d)+runDefinition[a219_0x5a3d1c(0x219)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a219_0x5a3d1c(0x21c),a219_0x5a3d1c(0x242)],[a219_0x5a3d1c(0x20b),a219_0x5a3d1c(0x216)],[a219_0x5a3d1c(0x1e4),a219_0x5a3d1c(0x221)],[a219_0x5a3d1c(0x230),a219_0x5a3d1c(0x254)],[a219_0x5a3d1c(0x241),a219_0x5a3d1c(0x21e)],['skill:','rabetbase\x20cli-skill\x20install'],[a219_0x5a3d1c(0x24e),a219_0x5a3d1c(0x210)],['skills:','rabetbase\x20cli-skill\x20install'],[a219_0x5a3d1c(0x234),a219_0x5a3d1c(0x210)],[a219_0x5a3d1c(0x226),'rabetbase\x20menu\x20subapp-assets-status\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>'],[a219_0x5a3d1c(0x217),'rabetbase\x20menu\x20subapp-assets-update\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>\x20--resources\x20\x27<json>\x27'],[a219_0x5a3d1c(0x24b),'rabetbase\x20app\x20list\x20--remote'],[a219_0x5a3d1c(0x1e5),'rabetbase\x20workspace\x20use\x20--app\x20<name>'],[a219_0x5a3d1c(0x22a),'rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>'],[a219_0x5a3d1c(0x1fe),'rabetbase\x20workspace\x20remove\x20<name>'],[a219_0x5a3d1c(0x253),a219_0x5a3d1c(0x228)],[a219_0x5a3d1c(0x212),a219_0x5a3d1c(0x255)],[a219_0x5a3d1c(0x23b),a219_0x5a3d1c(0x214)],[a219_0x5a3d1c(0x1fb),a219_0x5a3d1c(0x1f5)],['knowledge-base:delete',a219_0x5a3d1c(0x1f8)],['role:create',a219_0x5a3d1c(0x251)],[a219_0x5a3d1c(0x1e8),a219_0x5a3d1c(0x243)],[a219_0x5a3d1c(0x1ed),a219_0x5a3d1c(0x213)],['page:standard-page-status',a219_0x5a3d1c(0x225)],[a219_0x5a3d1c(0x220),a219_0x5a3d1c(0x24f)],[a219_0x5a3d1c(0x21f),'rabetbase\x20page\x20create\x20--page-pattern\x20BLANK'],[a219_0x5a3d1c(0x246),a219_0x5a3d1c(0x236)],[a219_0x5a3d1c(0x244),a219_0x5a3d1c(0x207)],[a219_0x5a3d1c(0x222),'rabetbase\x20page\x20custom-update'],[a219_0x5a3d1c(0x1f3),'rabetbase\x20page\x20custom-publish']]),REMOVED_COMMAND_HINTS=new Map([[a219_0x5a3d1c(0x227),a219_0x5a3d1c(0x238)],[a219_0x5a3d1c(0x204),'This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.'],[a219_0x5a3d1c(0x23d),'Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.'],[a219_0x5a3d1c(0x200),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],['permit:page-set',a219_0x5a3d1c(0x1f4)],[a219_0x5a3d1c(0x1f0),a219_0x5a3d1c(0x1f4)],[a219_0x5a3d1c(0x223),a219_0x5a3d1c(0x1f4)],['permit:role-apis-set',a219_0x5a3d1c(0x1f4)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([['create',a219_0x5a3d1c(0x1fc)],['start',a219_0x5a3d1c(0x1ea)],[a219_0x5a3d1c(0x21a),a219_0x5a3d1c(0x224)],[a219_0x5a3d1c(0x23e),a219_0x5a3d1c(0x205)],['logout','rabetbase\x20auth\x20logout']]);export function resolveRemovedCommand(_0x44c607,_0x233179){const _0x493b64=a219_0x5a3d1c;if(!_0x44c607)return undefined;const _0x1f4ef6=REMOVED_COMMAND_REPLACEMENTS[_0x493b64(0x21d)](_0x44c607+':'+(_0x233179??'')),_0x1d04a8=REMOVED_FLAT_COMMAND_REPLACEMENTS['get'](_0x44c607),_0x20099c=_0x1f4ef6??_0x1d04a8,_0x162689=REMOVED_COMMAND_HINTS[_0x493b64(0x21d)](_0x44c607+':'+(_0x233179??''));if(!_0x20099c&&!_0x162689)return undefined;const _0x5b8c5d=_0x1d04a8?_0x44c607:_0x233179?_0x44c607+'\x20'+_0x233179:_0x44c607;return{'command':_0x5b8c5d,'message':_0x493b64(0x1fd)+_0x5b8c5d+_0x493b64(0x22f),'hint':_0x162689??_0x493b64(0x22c)+_0x20099c+_0x493b64(0x1ef)};}export function findDefinition(_0x4ce73e,_0xf6353e){const _0x2ecfdd=a219_0x5a3d1c;return definitions[_0x2ecfdd(0x21d)](_0x4ce73e+':'+_0xf6353e);}export function isKnownService(_0x30a050){return serviceByName['has'](_0x30a050);}export function isDeclarativeService(_0x5d14f1){const _0x33c448=a219_0x5a3d1c;return serviceGroups[_0x33c448(0x22b)](_0x5d14f1)||serviceByName['get'](_0x5d14f1)?.['wildcardDef']!==undefined;}export function getServiceEntry(_0x16c32a){const _0x11a4e7=a219_0x5a3d1c;return serviceByName[_0x11a4e7(0x21d)](_0x16c32a);}export function getLegacyHandler(_0x198269,_0x33f4a2){return undefined;}export function getAllDefinitions(){const _0x45b0ac=a219_0x5a3d1c;return Array[_0x45b0ac(0x1ec)](definitions[_0x45b0ac(0x1e6)]());}
1
+ const a219_0x5afdfa=a219_0x44a6;(function(_0x312a40,_0x25eafb){const _0x54d848=a219_0x44a6,_0x22da27=_0x312a40();while(!![]){try{const _0x8e7727=parseInt(_0x54d848(0xe4))/0x1*(parseInt(_0x54d848(0xcc))/0x2)+parseInt(_0x54d848(0x110))/0x3*(-parseInt(_0x54d848(0x117))/0x4)+-parseInt(_0x54d848(0xf9))/0x5+parseInt(_0x54d848(0xdb))/0x6+-parseInt(_0x54d848(0x100))/0x7+-parseInt(_0x54d848(0xa9))/0x8*(parseInt(_0x54d848(0xab))/0x9)+parseInt(_0x54d848(0xbb))/0xa*(parseInt(_0x54d848(0xe9))/0xb);if(_0x8e7727===_0x25eafb)break;else _0x22da27['push'](_0x22da27['shift']());}catch(_0x157437){_0x22da27['push'](_0x22da27['shift']());}}}(a219_0x3fec,0x4a25c));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dbDefinitions}from'../commands/db/index.js';import{deploymentDefinitions}from'../commands/deployment/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{taskDefinitions}from'../commands/task/index.js';import{tenantDefinitions}from'../commands/tenant/index.js';import{roleDefinitions}from'../commands/role/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{ruleDefinitions}from'../commands/rule/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{instantApiPolicyDefinitions}from'../commands/instant-api-policy/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';function a219_0x3fec(){const _0x1fbe3c=['Agent\x20Context\x20Rules','rabetbase\x20menu\x20asset-update','hidden','start','1980255rvipIS','rabetbase\x20run\x20start','Approval\x20Flows','rabetbase\x20menu\x20subapp-assets-status\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>','app:use','rabetbase\x20project\x20create\x20<project-name>','page:standard-page-status','1694721GyJppv','rabetbase\x20kb\x20delete','Run\x20any\x20package.json\x20script','Resource\x20saves\x20are\x20synchronized\x20automatically\x20by\x20the\x20server;\x20no\x20manual\x20CLI\x20replacement\x20is\x20required.','from','rabetbase\x20sql\x20create','length','rabetbase\x20page\x20custom-update','get','knowledge-base:detail','rabetbase\x20role\x20list','app:add','skill:','defaultCommand','knowledge-base:delete','rabetbase\x20run\x20build','9yjDsLR','Dataset\x20&\x20Operations','data:getOne','rabetbase\x20bff\x20create','rabetbase\x20run\x20preview','This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.','\x20\x20[write]','357856ViAXvS','Project','sql:save','skills:install','`\x20has\x20been\x20removed.','knowledge-base:list','`rabetbase\x20','Notification\x20Configuration','command','build','Roles','1888yPCeJL','Platform\x20Issue','15129ojZaqB','Data\x20List\x20Pages\x20&\x20Custom\x20Pages','rabetbase\x20workspace\x20use\x20--app\x20<name>','data:filter','Runtime\x20App\x20Config\x20Management','skill:install','rabetbase\x20workspace\x20remove\x20<name>','wildcardDef','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','App\x20Management','isSingleCommand','push','sql:new','User\x20Accounts','permit:role-menus-set','rabetbase\x20page\x20custom-publish','2570ZAvogB','Backend\x20Function\x20Scripts','filter','Deployment','`\x20instead.','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','app:assets-update','flow:disable','Menu','page:custom-create','login','Instant\x20API\x20Policy','app:remove','API\x20Development','permit:page-set','Use\x20`','Company\x20Knowledge\x20Base','1114438GZTsSL','Code\x20Generation','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','permit:role-apis-set','Database\x20Connections','Async\x20Tasks','rabetbase\x20page\x20custom-list','has','rabetbase\x20cli-skill\x20install','Diagnostics','logout','Self\x20Update','description','page:react-detail','set','2323230kTokQC','read','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','service','risk','install','File','app:remote','rabetbase\x20page\x20data-list-status','1ocTLqv','\x20\x20[','rabetbase\x20page\x20custom-detail','OCR','rabetbase\x20kb\x20update','28358cRkUhR','page:react-list','role:create','rabetbase\x20menu\x20subapp-assets-update\x20--appcode\x20<host-appcode>\x20--app-name\x20<name>\x20--resources\x20\x27<json>\x27','page:react-update','rabetbase\x20app\x20list\x20--remote','Logs','map','permit:page-get','project:init','create','Tenant\x20Members'];a219_0x3fec=function(){return _0x1fbe3c;};return a219_0x3fec();}import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';function a219_0x44a6(_0x183bfd,_0x24cd47){_0x183bfd=_0x183bfd-0xa2;const _0x3fec2a=a219_0x3fec();let _0x44a6d3=_0x3fec2a[_0x183bfd];return _0x44a6d3;}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(_0x1e26c0){const _0x14a962=a219_0x44a6;for(const _0x5116e0 of _0x1e26c0){definitions[_0x14a962(0xda)](_0x5116e0['service']+':'+_0x5116e0[_0x14a962(0xa6)],_0x5116e0);let _0x51144c=serviceGroups[_0x14a962(0x108)](_0x5116e0[_0x14a962(0xde)]);!_0x51144c&&(_0x51144c=[],serviceGroups[_0x14a962(0xda)](_0x5116e0['service'],_0x51144c)),_0x51144c[_0x14a962(0xb6)](_0x5116e0);}}function registerDeclarativeService(_0x1fd41b,_0x488c40,_0x391c99){const _0x33b931=a219_0x44a6;registerDefinitions(_0x488c40);_0x391c99?.[_0x33b931(0xb2)]&&registerDefinitions([_0x391c99['wildcardDef']]);const _0x1a746f=_0x26e249=>_0x26e249===_0x33b931(0xdc)?'':_0x26e249==='write'?_0x33b931(0x116):'\x20\x20[high-risk-write]',_0x3f8bef={'service':_0x488c40[0x0][_0x33b931(0xde)],'label':_0x1fd41b,'commands':_0x488c40[_0x33b931(0xbd)](_0xc5ff79=>!_0xc5ff79[_0x33b931(0xf7)])[_0x33b931(0xf0)](_0x5d4e67=>({'command':_0x5d4e67[_0x33b931(0xa6)],'description':_0x5d4e67[_0x33b931(0xd8)],'tag':_0x1a746f(_0x5d4e67[_0x33b931(0xdf)])})),'declarative':!![],'defaultCommand':_0x391c99?.[_0x33b931(0x10d)]??(_0x391c99?.[_0x33b931(0xb5)]?_0x488c40[0x0][_0x33b931(0xa6)]:undefined),'wildcardDef':_0x391c99?.['wildcardDef'],'isSingleCommand':_0x391c99?.[_0x33b931(0xb5)]};serviceRegistry[_0x33b931(0xb6)](_0x3f8bef),serviceByName[_0x33b931(0xda)](_0x3f8bef['service'],_0x3f8bef);}registerDeclarativeService(a219_0x5afdfa(0x118),projectDefinitions),registerDeclarativeService('Workspace',workspaceDefinitions),registerDeclarativeService(a219_0x5afdfa(0xb4),appDefinitions),registerDeclarativeService('Authentication',authDefinitions,{'defaultCommand':a219_0x5afdfa(0xc5)}),registerDeclarativeService(a219_0x5afdfa(0xf4),tenantDefinitions),registerDeclarativeService(a219_0x5afdfa(0xb8),userAccountDefinitions),registerDeclarativeService(a219_0x5afdfa(0x111),datasetDefinitions),registerDeclarativeService(a219_0x5afdfa(0xac),pageDefinitions),registerDeclarativeService(a219_0x5afdfa(0xc8),apiDefinitions),registerDeclarativeService(a219_0x5afdfa(0xbc),bffDefinitions),registerDeclarativeService(a219_0x5afdfa(0xc6),instantApiPolicyDefinitions),registerDeclarativeService(a219_0x5afdfa(0xa5),notificationDefinitions),registerDeclarativeService('SQL\x20Queries',sqlDefinitions),registerDeclarativeService(a219_0x5afdfa(0xd0),dbDefinitions),registerDeclarativeService(a219_0x5afdfa(0xbe),deploymentDefinitions),registerDeclarativeService(a219_0x5afdfa(0xc3),menuDefinitions),registerDeclarativeService(a219_0x5afdfa(0xd1),taskDefinitions),registerDeclarativeService(a219_0x5afdfa(0xa8),roleDefinitions),registerDeclarativeService(a219_0x5afdfa(0xaf),appConfigDefinitions),registerDeclarativeService(a219_0x5afdfa(0xcb),kbDefinitions),registerDeclarativeService(a219_0x5afdfa(0xf5),ruleDefinitions),registerDeclarativeService(a219_0x5afdfa(0xaa),issueDefinitions),registerDeclarativeService(a219_0x5afdfa(0xe1),fileDefinitions),registerDeclarativeService(a219_0x5afdfa(0xe7),ocrDefinitions),registerDeclarativeService(a219_0x5afdfa(0xcd),codegenDefinitions),registerDeclarativeService('Configuration',configDefinitions),registerDeclarativeService(a219_0x5afdfa(0xd5),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a219_0x5afdfa(0xd7),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':a219_0x5afdfa(0xe0)}),registerDeclarativeService(a219_0x5afdfa(0xfb),flowDefinitions),registerDeclarativeService(a219_0x5afdfa(0xef),logsDefinitions,{'defaultCommand':'show'}),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a219_0x5afdfa(0x106)]-0x1];last['commands']=[{'command':'<script>','description':a219_0x5afdfa(0x102),'tag':a219_0x5afdfa(0xe5)+runDefinition[a219_0x5afdfa(0xdf)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a219_0x5afdfa(0x119),'rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml'],['bff:new',a219_0x5afdfa(0x113)],[a219_0x5afdfa(0xb7),a219_0x5afdfa(0x105)],['menu:update',a219_0x5afdfa(0xf6)],[a219_0x5afdfa(0xf2),'rabetbase\x20workspace\x20init\x20--appcode\x20<code>'],[a219_0x5afdfa(0x10c),a219_0x5afdfa(0xd4)],[a219_0x5afdfa(0xb0),'rabetbase\x20cli-skill\x20install'],['skills:','rabetbase\x20cli-skill\x20install'],[a219_0x5afdfa(0x11a),'rabetbase\x20cli-skill\x20install'],['app:assets-status',a219_0x5afdfa(0xfc)],[a219_0x5afdfa(0xc1),a219_0x5afdfa(0xec)],[a219_0x5afdfa(0xe2),a219_0x5afdfa(0xee)],[a219_0x5afdfa(0xfd),a219_0x5afdfa(0xad)],[a219_0x5afdfa(0x10b),'rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>'],[a219_0x5afdfa(0xc7),a219_0x5afdfa(0xb1)],[a219_0x5afdfa(0xa3),'rabetbase\x20kb\x20list'],[a219_0x5afdfa(0x109),'rabetbase\x20kb\x20detail'],['knowledge-base:create','rabetbase\x20kb\x20create'],['knowledge-base:update',a219_0x5afdfa(0xe8)],[a219_0x5afdfa(0x10e),a219_0x5afdfa(0x101)],[a219_0x5afdfa(0xeb),a219_0x5afdfa(0x10a)],[a219_0x5afdfa(0xae),a219_0x5afdfa(0xdd)],[a219_0x5afdfa(0x112),a219_0x5afdfa(0xce)],[a219_0x5afdfa(0xff),a219_0x5afdfa(0xe3)],['page:react-create',a219_0x5afdfa(0xb3)],[a219_0x5afdfa(0xc4),a219_0x5afdfa(0xb3)],[a219_0x5afdfa(0xea),a219_0x5afdfa(0xd2)],[a219_0x5afdfa(0xd9),a219_0x5afdfa(0xe6)],[a219_0x5afdfa(0xed),a219_0x5afdfa(0x107)],['page:react-publish',a219_0x5afdfa(0xba)]]),REMOVED_COMMAND_HINTS=new Map([['flow:enable','This\x20lifecycle\x20operation\x20is\x20no\x20longer\x20exposed\x20by\x20Rabetbase\x20CLI;\x20no\x20replacement\x20command\x20is\x20available.'],[a219_0x5afdfa(0xc2),a219_0x5afdfa(0x115)],['deployment:sync',a219_0x5afdfa(0x103)],[a219_0x5afdfa(0xf1),a219_0x5afdfa(0xc0)],[a219_0x5afdfa(0xc9),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],['permit:role-menus',a219_0x5afdfa(0xc0)],[a219_0x5afdfa(0xb9),a219_0x5afdfa(0xc0)],[a219_0x5afdfa(0xcf),a219_0x5afdfa(0xc0)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a219_0x5afdfa(0xf3),a219_0x5afdfa(0xfe)],[a219_0x5afdfa(0xf8),a219_0x5afdfa(0xfa)],[a219_0x5afdfa(0xa7),a219_0x5afdfa(0x10f)],['preview',a219_0x5afdfa(0x114)],[a219_0x5afdfa(0xd6),'rabetbase\x20auth\x20logout']]);export function resolveRemovedCommand(_0x21f6cd,_0x1e3aef){const _0x45f531=a219_0x5afdfa;if(!_0x21f6cd)return undefined;const _0x3a008e=REMOVED_COMMAND_REPLACEMENTS[_0x45f531(0x108)](_0x21f6cd+':'+(_0x1e3aef??'')),_0x622074=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x45f531(0x108)](_0x21f6cd),_0xb82c41=_0x3a008e??_0x622074,_0x407065=REMOVED_COMMAND_HINTS[_0x45f531(0x108)](_0x21f6cd+':'+(_0x1e3aef??''));if(!_0xb82c41&&!_0x407065)return undefined;const _0x31cef6=_0x622074?_0x21f6cd:_0x1e3aef?_0x21f6cd+'\x20'+_0x1e3aef:_0x21f6cd;return{'command':_0x31cef6,'message':_0x45f531(0xa4)+_0x31cef6+_0x45f531(0xa2),'hint':_0x407065??_0x45f531(0xca)+_0xb82c41+_0x45f531(0xbf)};}export function findDefinition(_0x1aa807,_0x468ef2){const _0x1a7d0b=a219_0x5afdfa;return definitions[_0x1a7d0b(0x108)](_0x1aa807+':'+_0x468ef2);}export function isKnownService(_0x4de158){const _0x55f705=a219_0x5afdfa;return serviceByName[_0x55f705(0xd3)](_0x4de158);}export function isDeclarativeService(_0x492e5d){const _0x3d4bef=a219_0x5afdfa;return serviceGroups['has'](_0x492e5d)||serviceByName[_0x3d4bef(0x108)](_0x492e5d)?.[_0x3d4bef(0xb2)]!==undefined;}export function getServiceEntry(_0x21d49a){const _0x49f733=a219_0x5afdfa;return serviceByName[_0x49f733(0x108)](_0x21d49a);}export function getLegacyHandler(_0x34e36c,_0x181366){return undefined;}export function getAllDefinitions(){const _0x5a5159=a219_0x5afdfa;return Array[_0x5a5159(0x104)](definitions['values']());}
@@ -1 +1 @@
1
- const a220_0x4677e1=a220_0x1008;function a220_0x1008(_0x21f640,_0xf47d5f){_0x21f640=_0x21f640-0xdf;const _0x576d22=a220_0x576d();let _0x1008b5=_0x576d22[_0x21f640];return _0x1008b5;}(function(_0x6af173,_0x1c2840){const _0x46b98c=a220_0x1008,_0x3cf0b0=_0x6af173();while(!![]){try{const _0x554b8e=parseInt(_0x46b98c(0xf4))/0x1*(-parseInt(_0x46b98c(0xdf))/0x2)+-parseInt(_0x46b98c(0xec))/0x3+-parseInt(_0x46b98c(0xe0))/0x4*(parseInt(_0x46b98c(0xed))/0x5)+-parseInt(_0x46b98c(0xf0))/0x6*(parseInt(_0x46b98c(0xe3))/0x7)+parseInt(_0x46b98c(0xe4))/0x8+-parseInt(_0x46b98c(0xe6))/0x9+parseInt(_0x46b98c(0xf3))/0xa;if(_0x554b8e===_0x1c2840)break;else _0x3cf0b0['push'](_0x3cf0b0['shift']());}catch(_0x2af782){_0x3cf0b0['push'](_0x3cf0b0['shift']());}}}(a220_0x576d,0x586cc));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a220_0x576d(){const _0x236dd8=['13LEIjrp','65316MyhiYf','394248qcThKZ','POST','roleName','4077913NhdAKU','2763456dROPyh','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','6317100WzGZxS','userCount','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','appCode','\x20(id=','Role\x20still\x20has\x20','299586HkVLmJ','35ridxoB','delete','high-risk-write','6QqNdbr','role','num','25155650iEpFHK'];a220_0x576d=function(){return _0x236dd8;};return a220_0x576d();}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':a220_0x4677e1(0xf1),'command':a220_0x4677e1(0xee),'description':a220_0x4677e1(0xe5),'risk':a220_0x4677e1(0xef),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x2e1b16){const _0x1a05dd=a220_0x4677e1,_0x9470b7=_0x2e1b16[_0x1a05dd(0xf2)]('id'),_0x3fee1e=await getRoleById(_0x2e1b16[_0x1a05dd(0xe9)],_0x9470b7);return assertCustomRole(_0x3fee1e,_0x1a05dd(0xee)),asDryRunResult({'scope':'dev','operation':'delete','selector':{'appCode':_0x2e1b16['appCode'],'roleId':_0x9470b7,'roleName':_0x3fee1e[_0x1a05dd(0xe2)]},'before':projectRole(_0x3fee1e),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x3fee1e[_0x1a05dd(0xe7)]>0x0?[_0x1a05dd(0xeb)+_0x3fee1e[_0x1a05dd(0xe7)]+_0x1a05dd(0xe8)]:[]},{'method':_0x1a05dd(0xe1),'url':DELETE_PATH});},async 'execute'(_0x10c6db){const _0x3f83c8=a220_0x4677e1,_0x507fef=_0x10c6db['num']('id'),_0xe65133=await getRoleById(_0x10c6db['appCode'],_0x507fef);return assertCustomRole(_0xe65133,_0x3f83c8(0xee)),await deleteAppRole(_0x507fef),{'ok':!![],'data':{'scope':'dev','operation':_0x3f83c8(0xee),'selector':{'appCode':_0x10c6db[_0x3f83c8(0xe9)],'roleId':_0x507fef,'roleName':_0xe65133[_0x3f83c8(0xe2)]},'before':projectRole(_0xe65133),'after':null,'dryRun':![],'backend':{'method':_0x3f83c8(0xe1),'path':DELETE_PATH},'warnings':[]},'message':'Deleted\x20role\x20'+_0xe65133['roleName']+_0x3f83c8(0xea)+_0x507fef+')'};}};
1
+ function a220_0xa975(_0x34d86b,_0x2fa4ba){_0x34d86b=_0x34d86b-0x19a;const _0x7a4ac2=a220_0x7a4a();let _0xa9759a=_0x7a4ac2[_0x34d86b];return _0xa9759a;}const a220_0x15a776=a220_0xa975;(function(_0x573593,_0x40d4ad){const _0x30112d=a220_0xa975,_0x4fab41=_0x573593();while(!![]){try{const _0x1c325c=-parseInt(_0x30112d(0x1ab))/0x1+-parseInt(_0x30112d(0x19a))/0x2*(parseInt(_0x30112d(0x1a9))/0x3)+-parseInt(_0x30112d(0x1a6))/0x4+-parseInt(_0x30112d(0x19d))/0x5+-parseInt(_0x30112d(0x1ad))/0x6*(-parseInt(_0x30112d(0x19c))/0x7)+-parseInt(_0x30112d(0x1ac))/0x8*(parseInt(_0x30112d(0x1a7))/0x9)+parseInt(_0x30112d(0x1a3))/0xa;if(_0x1c325c===_0x40d4ad)break;else _0x4fab41['push'](_0x4fab41['shift']());}catch(_0x758575){_0x4fab41['push'](_0x4fab41['shift']());}}}(a220_0x7a4a,0x27035));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a220_0x7a4a(){const _0xedfa42=['Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','\x20(id=','high-risk-write','dev','appCode','9382110tdSemV','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','userCount','452164rBoEsD','9qsdTFp','roleName','81402zeLanc','delete','135533xABklG','2224496IeDStR','3126imapkh','num','Deleted\x20role\x20','12FToFhV','POST','798WGbXnR','741840sAkqWd'];a220_0x7a4a=function(){return _0xedfa42;};return a220_0x7a4a();}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':'role','command':a220_0x15a776(0x1aa),'description':a220_0x15a776(0x19e),'risk':a220_0x15a776(0x1a0),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x1e5a8b){const _0x124c63=a220_0x15a776,_0x4efd68=_0x1e5a8b[_0x124c63(0x1ae)]('id'),_0x29c9b5=await getRoleById(_0x1e5a8b[_0x124c63(0x1a2)],_0x4efd68);return assertCustomRole(_0x29c9b5,_0x124c63(0x1aa)),asDryRunResult({'scope':'dev','operation':_0x124c63(0x1aa),'selector':{'appCode':_0x1e5a8b[_0x124c63(0x1a2)],'roleId':_0x4efd68,'roleName':_0x29c9b5[_0x124c63(0x1a8)]},'before':projectRole(_0x29c9b5),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x29c9b5[_0x124c63(0x1a5)]>0x0?['Role\x20still\x20has\x20'+_0x29c9b5[_0x124c63(0x1a5)]+_0x124c63(0x1a4)]:[]},{'method':_0x124c63(0x19b),'url':DELETE_PATH});},async 'execute'(_0xb7cb15){const _0x21f297=a220_0x15a776,_0x18e3dc=_0xb7cb15[_0x21f297(0x1ae)]('id'),_0x4bd561=await getRoleById(_0xb7cb15[_0x21f297(0x1a2)],_0x18e3dc);return assertCustomRole(_0x4bd561,_0x21f297(0x1aa)),await deleteAppRole(_0x18e3dc),{'ok':!![],'data':{'scope':_0x21f297(0x1a1),'operation':_0x21f297(0x1aa),'selector':{'appCode':_0xb7cb15['appCode'],'roleId':_0x18e3dc,'roleName':_0x4bd561['roleName']},'before':projectRole(_0x4bd561),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[]},'message':_0x21f297(0x1af)+_0x4bd561[_0x21f297(0x1a8)]+_0x21f297(0x19f)+_0x18e3dc+')'};}};
@@ -1 +1 @@
1
- const a221_0x1b7012=a221_0x1a3f;(function(_0x302184,_0x21f97b){const _0x364e73=a221_0x1a3f,_0x1742ba=_0x302184();while(!![]){try{const _0x5334d9=-parseInt(_0x364e73(0xe6))/0x1+-parseInt(_0x364e73(0xdb))/0x2*(parseInt(_0x364e73(0xd9))/0x3)+-parseInt(_0x364e73(0xdd))/0x4+parseInt(_0x364e73(0xde))/0x5*(-parseInt(_0x364e73(0xe4))/0x6)+parseInt(_0x364e73(0xd7))/0x7*(-parseInt(_0x364e73(0xe2))/0x8)+parseInt(_0x364e73(0xe1))/0x9+-parseInt(_0x364e73(0xe5))/0xa*(-parseInt(_0x364e73(0xe3))/0xb);if(_0x5334d9===_0x21f97b)break;else _0x1742ba['push'](_0x1742ba['shift']());}catch(_0x5c8837){_0x1742ba['push'](_0x1742ba['shift']());}}}(a221_0x350f,0x31d5f));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a221_0x1a3f(_0x1830a9,_0xdb18cb){_0x1830a9=_0x1830a9-0xd5;const _0x350fb6=a221_0x350f();let _0x1a3f75=_0x350fb6[_0x1830a9];return _0x1a3f75;}export const roleDetail={'service':a221_0x1b7012(0xdf),'command':a221_0x1b7012(0xd5),'description':a221_0x1b7012(0xdc),'risk':'read','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x25293e){const _0x36309d=a221_0x1b7012,_0xcfbbfb=_0x25293e[_0x36309d(0xda)]('id'),_0x1e64dd=await getRoleById(_0x25293e[_0x36309d(0xd8)],_0xcfbbfb);return{'ok':!![],'data':{'scope':'dev','role':projectRole(_0x1e64dd)},'message':_0x36309d(0xd6)+_0x1e64dd[_0x36309d(0xe0)]+'\x20('+_0x1e64dd[_0x36309d(0xe7)]+')'};}};function a221_0x350f(){const _0x5c681d=['role','roleName','1298583QgVShg','208yREwCi','66DtbzLo','6tGFiPR','1365020UYMdAq','53107wBVSNI','roleType','detail','Role\x20','39473XGCOyx','appCode','825144XDubhz','num','2pkBdvx','Show\x20a\x20single\x20role\x27s\x20detail','480152MHXEcR','821825uyBalD'];a221_0x350f=function(){return _0x5c681d;};return a221_0x350f();}
1
+ function a221_0xb3b8(_0x37aabe,_0x54774c){_0x37aabe=_0x37aabe-0x18d;const _0x1cc8d8=a221_0x1cc8();let _0xb3b8eb=_0x1cc8d8[_0x37aabe];return _0xb3b8eb;}const a221_0x36a1fa=a221_0xb3b8;function a221_0x1cc8(){const _0x327443=['145144dFTqoK','num','detail','9mxfIjr','5yptLFo','dev','4491444QhJjft','Role\x20','roleName','14kCcAXb','6233420ruPSfm','676438MilUTK','read','3356588AcTgaF','33ZqyTJm','18766lqUcGz','appCode','1370172cDYGFZ','roleType','366JhWPbq'];a221_0x1cc8=function(){return _0x327443;};return a221_0x1cc8();}(function(_0x1ca8c9,_0x8dae61){const _0x5a7bc2=a221_0xb3b8,_0x13a0d1=_0x1ca8c9();while(!![]){try{const _0x5db9c9=parseInt(_0x5a7bc2(0x196))/0x1+parseInt(_0x5a7bc2(0x19a))/0x2*(parseInt(_0x5a7bc2(0x19e))/0x3)+parseInt(_0x5a7bc2(0x198))/0x4*(-parseInt(_0x5a7bc2(0x18f))/0x5)+parseInt(_0x5a7bc2(0x19c))/0x6+-parseInt(_0x5a7bc2(0x194))/0x7*(parseInt(_0x5a7bc2(0x19f))/0x8)+parseInt(_0x5a7bc2(0x18e))/0x9*(parseInt(_0x5a7bc2(0x195))/0xa)+-parseInt(_0x5a7bc2(0x199))/0xb*(parseInt(_0x5a7bc2(0x191))/0xc);if(_0x5db9c9===_0x8dae61)break;else _0x13a0d1['push'](_0x13a0d1['shift']());}catch(_0x387b5a){_0x13a0d1['push'](_0x13a0d1['shift']());}}}(a221_0x1cc8,0xa4b0e));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':a221_0x36a1fa(0x18d),'description':'Show\x20a\x20single\x20role\x27s\x20detail','risk':a221_0x36a1fa(0x197),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x4d4f98){const _0x7631b4=a221_0x36a1fa,_0x2da362=_0x4d4f98[_0x7631b4(0x1a0)]('id'),_0x24825b=await getRoleById(_0x4d4f98[_0x7631b4(0x19b)],_0x2da362);return{'ok':!![],'data':{'scope':_0x7631b4(0x190),'role':projectRole(_0x24825b)},'message':_0x7631b4(0x192)+_0x24825b[_0x7631b4(0x193)]+'\x20('+_0x24825b[_0x7631b4(0x19d)]+')'};}};
@@ -1 +1 @@
1
- (function(_0x17dcb5,_0x1ddf8f){const _0x97013c=a222_0x4a75,_0x153eb7=_0x17dcb5();while(!![]){try{const _0x3c0f59=-parseInt(_0x97013c(0x181))/0x1*(-parseInt(_0x97013c(0x186))/0x2)+-parseInt(_0x97013c(0x182))/0x3+parseInt(_0x97013c(0x180))/0x4+-parseInt(_0x97013c(0x185))/0x5*(parseInt(_0x97013c(0x184))/0x6)+-parseInt(_0x97013c(0x188))/0x7+-parseInt(_0x97013c(0x187))/0x8*(parseInt(_0x97013c(0x17f))/0x9)+parseInt(_0x97013c(0x183))/0xa;if(_0x3c0f59===_0x1ddf8f)break;else _0x153eb7['push'](_0x153eb7['shift']());}catch(_0x3a43d0){_0x153eb7['push'](_0x153eb7['shift']());}}}(a222_0x1670,0xf0460));function a222_0x1670(){const _0x31daab=['757426VxCICo','7692376ZiNVwk','9345952NBwoYa','18favtKy','7433860uGvIVI','2ifrPje','5867736EYCiwp','36830670UDGvRl','36moMgbw','83880GKpyag'];a222_0x1670=function(){return _0x31daab;};return a222_0x1670();}import{roleList}from'../../commands/role/list.js';function a222_0x4a75(_0x51d1d0,_0x1b1f8b){_0x51d1d0=_0x51d1d0-0x17f;const _0x1670cc=a222_0x1670();let _0x4a75bd=_0x1670cc[_0x51d1d0];return _0x4a75bd;}import{roleDetail}from'../../commands/role/detail.js';import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
1
+ (function(_0x45d8db,_0x3625a9){const _0x3cb670=a222_0x3782,_0x3bc9b4=_0x45d8db();while(!![]){try{const _0x2af7f7=-parseInt(_0x3cb670(0x18a))/0x1+parseInt(_0x3cb670(0x187))/0x2+-parseInt(_0x3cb670(0x186))/0x3+parseInt(_0x3cb670(0x188))/0x4*(-parseInt(_0x3cb670(0x182))/0x5)+parseInt(_0x3cb670(0x184))/0x6+parseInt(_0x3cb670(0x189))/0x7*(parseInt(_0x3cb670(0x185))/0x8)+parseInt(_0x3cb670(0x183))/0x9;if(_0x2af7f7===_0x3625a9)break;else _0x3bc9b4['push'](_0x3bc9b4['shift']());}catch(_0x58196e){_0x3bc9b4['push'](_0x3bc9b4['shift']());}}}(a222_0x1805,0x967a1));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 a222_0x1805(){const _0x564146=['495576BCQuhW','212523IeXsFJ','779358JbSxiT','4nRSkTd','70xcqaaw','402365hEDFPi','3469505ZSencC','2846313aHVqlO','2748324TZbKle'];a222_0x1805=function(){return _0x564146;};return a222_0x1805();}import{roleUserResolve}from'../../commands/role/user-resolve.js';function a222_0x3782(_0x123eb2,_0xe75bb8){_0x123eb2=_0x123eb2-0x182;const _0x1805fb=a222_0x1805();let _0x37825b=_0x1805fb[_0x123eb2];return _0x37825b;}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 a223_0x502ba9=a223_0x761c;(function(_0x1e4709,_0x5e9bcd){const _0x2d38de=a223_0x761c,_0x512a69=_0x1e4709();while(!![]){try{const _0x13a32b=parseInt(_0x2d38de(0x183))/0x1*(parseInt(_0x2d38de(0x195))/0x2)+parseInt(_0x2d38de(0x185))/0x3+-parseInt(_0x2d38de(0x18a))/0x4+parseInt(_0x2d38de(0x189))/0x5+-parseInt(_0x2d38de(0x19b))/0x6+parseInt(_0x2d38de(0x1a3))/0x7+-parseInt(_0x2d38de(0x17f))/0x8;if(_0x13a32b===_0x5e9bcd)break;else _0x512a69['push'](_0x512a69['shift']());}catch(_0xa9b54b){_0x512a69['push'](_0x512a69['shift']());}}}(a223_0x2b01,0x5b272));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a223_0x761c(_0x5967d8,_0x566b07){_0x5967d8=_0x5967d8-0x17e;const _0x2b01c8=a223_0x2b01();let _0x761c06=_0x2b01c8[_0x5967d8];return _0x761c06;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a223_0x2b01(){const _0x217380=['roleType','list','Found\x20','toUpperCase','ADMIN','dev','pagesize','2GYveIJ','OWNER','str','Invalid\x20--type\x20\x22','DEV','num','881214JsJCwr','Page\x20size\x20(1-100)','\x20role(s)','validation','Page\x20index\x20(1-based)','Filter\x20by\x20role\x20type','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','appCode','2595614AOzIid','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','length','14239440JdUWop','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','string','type','723941HakGvY','map','1869771LTiUWa','includes','number','filter','3410500vXBcuD','399756MPhOwE','CUSTOM','page','trim'];a223_0x2b01=function(){return _0x217380;};return a223_0x2b01();}import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a223_0x502ba9(0x192),a223_0x502ba9(0x199),a223_0x502ba9(0x196),a223_0x502ba9(0x18b)];export const roleList={'service':'role','command':a223_0x502ba9(0x18f),'description':a223_0x502ba9(0x1a4),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a223_0x502ba9(0x182),'type':a223_0x502ba9(0x181),'required':![],'description':a223_0x502ba9(0x1a0),'enum':ROLE_TYPES},{'name':a223_0x502ba9(0x18c),'type':a223_0x502ba9(0x187),'description':a223_0x502ba9(0x19f),'default':0x1},{'name':a223_0x502ba9(0x194),'type':'number','description':a223_0x502ba9(0x19c),'default':0x64}],async 'validate'(_0x297fb2){const _0x1fd041=a223_0x502ba9,_0x1bea6f=_0x297fb2[_0x1fd041(0x197)](_0x1fd041(0x182))['trim']();if(_0x1bea6f&&!ROLE_TYPES[_0x1fd041(0x186)](_0x1bea6f['toUpperCase']()))throw CliErrors[_0x1fd041(0x19e)](_0x1fd041(0x198)+_0x1bea6f+'\x22.','Use\x20one\x20of:\x20'+ROLE_TYPES['join'](',\x20')+'.');const _0x18661a=_0x297fb2[_0x1fd041(0x19a)]('page',0x1),_0x57bfc8=_0x297fb2['num'](_0x1fd041(0x194),0x64);if(_0x18661a<0x1)throw CliErrors[_0x1fd041(0x19e)](_0x1fd041(0x1a1));if(_0x57bfc8<0x1||_0x57bfc8>0x64)throw CliErrors[_0x1fd041(0x19e)](_0x1fd041(0x180));},async 'execute'(_0x2ce608){const _0x244074=a223_0x502ba9,_0x10ae7e=_0x2ce608['num'](_0x244074(0x18c),0x1)||0x1,_0x33155b=_0x2ce608[_0x244074(0x19a)]('pagesize',0x64)||0x64,_0x581027=_0x2ce608[_0x244074(0x197)]('type')[_0x244074(0x18d)]()[_0x244074(0x191)](),{items:_0x3589f5,paging:_0x5079ab}=await listAppRoles(_0x2ce608[_0x244074(0x1a2)],{'currentPage':_0x10ae7e,'pageSize':_0x33155b}),_0x6b6d9b=_0x581027?_0x3589f5[_0x244074(0x188)](_0x227946=>_0x227946[_0x244074(0x18e)]===_0x581027):_0x3589f5,_0x361344=_0x6b6d9b[_0x244074(0x184)](projectRole);return{'ok':!![],'data':{'scope':_0x244074(0x193),'roles':_0x361344,'paging':_0x5079ab},'message':_0x244074(0x190)+_0x361344[_0x244074(0x17e)]+_0x244074(0x19d)};}};
1
+ const a223_0x548247=a223_0x1aca;function a223_0x1aca(_0x378f04,_0x3a534a){_0x378f04=_0x378f04-0x1c8;const _0x292925=a223_0x2929();let _0x1aca0a=_0x292925[_0x378f04];return _0x1aca0a;}(function(_0x496a52,_0x1a0b18){const _0xf459cb=a223_0x1aca,_0x3ac2f6=_0x496a52();while(!![]){try{const _0x1a6f98=parseInt(_0xf459cb(0x1d7))/0x1*(-parseInt(_0xf459cb(0x1e2))/0x2)+parseInt(_0xf459cb(0x1de))/0x3+parseInt(_0xf459cb(0x1ce))/0x4+parseInt(_0xf459cb(0x1ec))/0x5+-parseInt(_0xf459cb(0x1e7))/0x6*(-parseInt(_0xf459cb(0x1cb))/0x7)+parseInt(_0xf459cb(0x1e6))/0x8+-parseInt(_0xf459cb(0x1db))/0x9*(parseInt(_0xf459cb(0x1e0))/0xa);if(_0x1a6f98===_0x1a0b18)break;else _0x3ac2f6['push'](_0x3ac2f6['shift']());}catch(_0xc372ad){_0x3ac2f6['push'](_0x3ac2f6['shift']());}}}(a223_0x2929,0xf109e));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';function a223_0x2929(){const _0x7fb83f=['OWNER','542BgjRHN','filter','pagesize','num','6511392aRVBqd','18IEjgCP','Page\x20index\x20(1-based)','\x20role(s)','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','trim','3460895VZxDiJ','validation','toUpperCase','Filter\x20by\x20role\x20type','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','length','string','100289IROTxn','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','Found\x20','4391928LgQKaw','type','roleType','Invalid\x20--type\x20\x22','join','role','appCode','includes','dev','7279PxvyMK','map','Page\x20size\x20(1-100)','str','9SdVkNi','page','ADMIN','1784514yxQWyk','DEV','2820010aSsMmS'];a223_0x2929=function(){return _0x7fb83f;};return a223_0x2929();}const ROLE_TYPES=[a223_0x548247(0x1dd),a223_0x548247(0x1df),a223_0x548247(0x1e1),'CUSTOM'];export const roleList={'service':a223_0x548247(0x1d3),'command':'list','description':a223_0x548247(0x1c8),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a223_0x548247(0x1cf),'type':a223_0x548247(0x1ca),'required':![],'description':a223_0x548247(0x1ef),'enum':ROLE_TYPES},{'name':a223_0x548247(0x1dc),'type':'number','description':a223_0x548247(0x1e8),'default':0x1},{'name':a223_0x548247(0x1e4),'type':'number','description':a223_0x548247(0x1d9),'default':0x64}],async 'validate'(_0x77cd21){const _0x12f4b1=a223_0x548247,_0xa09b29=_0x77cd21[_0x12f4b1(0x1da)](_0x12f4b1(0x1cf))['trim']();if(_0xa09b29&&!ROLE_TYPES[_0x12f4b1(0x1d5)](_0xa09b29[_0x12f4b1(0x1ee)]()))throw CliErrors[_0x12f4b1(0x1ed)](_0x12f4b1(0x1d1)+_0xa09b29+'\x22.','Use\x20one\x20of:\x20'+ROLE_TYPES[_0x12f4b1(0x1d2)](',\x20')+'.');const _0x2a0c17=_0x77cd21['num'](_0x12f4b1(0x1dc),0x1),_0x41f10d=_0x77cd21[_0x12f4b1(0x1e5)](_0x12f4b1(0x1e4),0x64);if(_0x2a0c17<0x1)throw CliErrors[_0x12f4b1(0x1ed)](_0x12f4b1(0x1ea));if(_0x41f10d<0x1||_0x41f10d>0x64)throw CliErrors[_0x12f4b1(0x1ed)](_0x12f4b1(0x1cc));},async 'execute'(_0x79c1b1){const _0x25fc4a=a223_0x548247,_0x5d17b8=_0x79c1b1[_0x25fc4a(0x1e5)]('page',0x1)||0x1,_0x2ea804=_0x79c1b1[_0x25fc4a(0x1e5)]('pagesize',0x64)||0x64,_0x19260a=_0x79c1b1[_0x25fc4a(0x1da)](_0x25fc4a(0x1cf))[_0x25fc4a(0x1eb)]()['toUpperCase'](),{items:_0x4c6ef9,paging:_0xfc7d68}=await listAppRoles(_0x79c1b1[_0x25fc4a(0x1d4)],{'currentPage':_0x5d17b8,'pageSize':_0x2ea804}),_0xa7b6cf=_0x19260a?_0x4c6ef9[_0x25fc4a(0x1e3)](_0x5f2723=>_0x5f2723[_0x25fc4a(0x1d0)]===_0x19260a):_0x4c6ef9,_0x3a21ec=_0xa7b6cf[_0x25fc4a(0x1d8)](projectRole);return{'ok':!![],'data':{'scope':_0x25fc4a(0x1d6),'roles':_0x3a21ec,'paging':_0xfc7d68},'message':_0x25fc4a(0x1cd)+_0x3a21ec[_0x25fc4a(0x1c9)]+_0x25fc4a(0x1e9)};}};
@@ -1 +1 @@
1
- const a224_0x1b57ec=a224_0x3568;(function(_0xab357d,_0x7e0e59){const _0x234731=a224_0x3568,_0x24d5be=_0xab357d();while(!![]){try{const _0x198863=-parseInt(_0x234731(0x1b3))/0x1*(-parseInt(_0x234731(0x1f1))/0x2)+-parseInt(_0x234731(0x1d9))/0x3*(-parseInt(_0x234731(0x1f5))/0x4)+-parseInt(_0x234731(0x1cd))/0x5+parseInt(_0x234731(0x1f4))/0x6+-parseInt(_0x234731(0x1d5))/0x7*(parseInt(_0x234731(0x1bf))/0x8)+parseInt(_0x234731(0x1b1))/0x9+-parseInt(_0x234731(0x1dc))/0xa;if(_0x198863===_0x7e0e59)break;else _0x24d5be['push'](_0x24d5be['shift']());}catch(_0x136d4a){_0x24d5be['push'](_0x24d5be['shift']());}}}(a224_0x57b0,0x75db6));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':a224_0x1b57ec(0x1ba),'required':!![],'description':a224_0x1b57ec(0x1b4)};export const ROLE_REF_FLAG={'name':a224_0x1b57ec(0x1e1),'type':a224_0x1b57ec(0x1f2),'required':!![],'description':a224_0x1b57ec(0x1cc)};export const USER_REF_FLAG={'name':a224_0x1b57ec(0x1b9),'type':a224_0x1b57ec(0x1f2),'required':!![],'description':a224_0x1b57ec(0x1ea)};export const NAME_FLAG={'name':a224_0x1b57ec(0x1e5),'type':a224_0x1b57ec(0x1f2),'required':!![],'description':a224_0x1b57ec(0x1ef)};export const USER_NAME_FLAG={'name':'name','type':a224_0x1b57ec(0x1f2),'required':!![],'description':'Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId'};export const REMARK_FLAG={'name':a224_0x1b57ec(0x1d2),'type':a224_0x1b57ec(0x1f2),'required':![],'description':a224_0x1b57ec(0x1f8)};function a224_0x57b0(){const _0xec8024=['7MixJcB','Pass\x20--user\x20<id|name>.','expect-user-count','\x22\x20not\x20found\x20in\x20app\x20','660741mmhKHf','tenant_code','Pass\x20--role\x20<id|name>.','10098050ZqnkvU','map','expectUserCount','user-add','test','role','trim','\x22\x20is\x20ambiguous\x20(ids:\x20','roleType','name','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','nickname','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','length','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','totalCount','Cannot\x20','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','push','Role\x20name','flag','2HZTZde','string','/smartapi/permit/user-role/create','2854842EMhiQc','16xuWzPA','No\x20tenant\x20member\x20matches\x20\x22','Anti-drift\x20check\x20failed:\x20expected\x20','Optional\x20role\x20remark/description','dryRun','OWNER','str','validation','flagMissing','8577936RVXwNa','tenant','257576WtXDqq','Role\x20id\x20(from\x20`role\x20list`)','\x22:\x20','User\x20','Role\x20name\x20\x22','\x20built-in\x20role\x20','user','number','includes','userCount','DEV','\x20member(s)\x20but\x20role\x20has\x20','4768984Rpdmrx','/smartapi/permit/user-role/delete','POST','ADMIN','appCode','toLowerCase','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','Missing\x20user\x20reference.','roleName','\x20duplicate\x20memberships\x20for\x20user\x20','filter','\x20not\x20found\x20in\x20app\x20','userId','Role\x20id\x20or\x20exact\x20role\x20name','2394025mEZFHq','username','find','Pass\x20--user\x20<id>.','Check\x20the\x20nickname/username.\x20','remark','Missing\x20role\x20reference.',';\x20no\x20change.'];a224_0x57b0=function(){return _0xec8024;};return a224_0x57b0();}export const EXPECT_USER_COUNT_FLAG={'name':a224_0x1b57ec(0x1d7),'type':a224_0x1b57ec(0x1ba),'required':![],'description':a224_0x1b57ec(0x1e6)};export const BUILTIN_ROLE_TYPES=[a224_0x1b57ec(0x1c2),a224_0x1b57ec(0x1bd),a224_0x1b57ec(0x1ad)];export function isBuiltinRole(_0x538472){return BUILTIN_ROLE_TYPES['includes'](_0x538472);}export function assertCustomRole(_0x15a896,_0x17bcaa){const _0x22770c=a224_0x1b57ec;if(_0x15a896[_0x22770c(0x1e4)]!=='CUSTOM')throw CliErrors[_0x22770c(0x1af)]('Cannot\x20'+_0x17bcaa+_0x22770c(0x1b8)+_0x15a896[_0x22770c(0x1c7)]+'\x20('+_0x15a896[_0x22770c(0x1e4)]+').','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.');}export function projectRole(_0x3bd23a){const _0x2067c5=a224_0x1b57ec;return{'id':_0x3bd23a['id'],'roleName':_0x3bd23a[_0x2067c5(0x1c7)],'roleType':_0x3bd23a[_0x2067c5(0x1e4)],'remark':_0x3bd23a[_0x2067c5(0x1d2)],'userCount':_0x3bd23a[_0x2067c5(0x1bc)],'permitCount':_0x3bd23a['permitCount'],'builtin':isBuiltinRole(_0x3bd23a[_0x2067c5(0x1e4)])};}export async function resolveRoleRef(_0x48b443,_0x399dc3){const _0x542108=a224_0x1b57ec,_0x25d848=_0x399dc3['trim']();if(!_0x25d848)throw CliErrors[_0x542108(0x1af)](_0x542108(0x1d3),_0x542108(0x1db));if(/^\d+$/[_0x542108(0x1e0)](_0x25d848))return getRoleById(_0x48b443,Number(_0x25d848));const _0x5af235=await listAllAppRoles(_0x48b443),_0x17da94=_0x5af235[_0x542108(0x1c9)](_0x4bcde2=>_0x4bcde2[_0x542108(0x1c7)]===_0x25d848);if(_0x17da94['length']===0x0)throw CliErrors['validation'](_0x542108(0x1b7)+_0x25d848+_0x542108(0x1d8)+_0x48b443+'.',_0x542108(0x1ed));if(_0x17da94[_0x542108(0x1e9)]>0x1){const _0x25f217=_0x17da94[_0x542108(0x1dd)](_0x2ac3f0=>_0x2ac3f0['id'])['join'](',\x20');throw CliErrors[_0x542108(0x1af)](_0x542108(0x1b7)+_0x25d848+_0x542108(0x1e3)+_0x25f217+').','Disambiguate\x20with\x20--role\x20<id>.');}return _0x17da94[0x0];}export async function getRoleById(_0x766a48,_0x16aae8){const _0x11b70f=a224_0x1b57ec,_0x3a8b52=await listAllAppRoles(_0x766a48),_0x3b86f4=_0x3a8b52['filter'](_0x5701c5=>_0x5701c5['id']===_0x16aae8&&(!_0x5701c5[_0x11b70f(0x1c3)]||_0x5701c5[_0x11b70f(0x1c3)]===_0x766a48));if(_0x3b86f4[_0x11b70f(0x1e9)]!==0x1)throw CliErrors[_0x11b70f(0x1af)]('Role\x20id\x20'+_0x16aae8+_0x11b70f(0x1ca)+_0x766a48+'.',_0x11b70f(0x1e8));return _0x3b86f4[0x0];}async function listAllAppRoles(_0x1d2ac7){const _0xf63b5f=a224_0x1b57ec,_0x1cd17d=0x64,_0x1c81b8=[];for(let _0x2de09e=0x1;;_0x2de09e+=0x1){const {items:_0x107895,paging:_0x5e95d7}=await listAppRoles(_0x1d2ac7,{'currentPage':_0x2de09e,'pageSize':_0x1cd17d});_0x1c81b8[_0xf63b5f(0x1ee)](..._0x107895);if(_0x107895[_0xf63b5f(0x1e9)]<_0x1cd17d||_0x5e95d7&&_0x1c81b8['length']>=_0x5e95d7['totalCount'])return _0x1c81b8;}}export async function resolveTenantCode(){const _0x3953e4=a224_0x1b57ec,_0x2e4935=await getSessionUserInfo(),_0x3c0bde=_0x2e4935?.[_0x3953e4(0x1b9)]?.[_0x3953e4(0x1b2)]?.[_0x3953e4(0x1da)];if(!_0x3c0bde)throw CliErrors['authRequired'](_0x3953e4(0x1c5));return _0x3c0bde;}function matchMember(_0x5aa4de,_0x10e4b1){const _0x3962a0=a224_0x1b57ec,_0x2fe7d0=_0x10e4b1['trim']()[_0x3962a0(0x1c4)]();return(_0x5aa4de[_0x3962a0(0x1e7)]??'')[_0x3962a0(0x1c4)]()===_0x2fe7d0||(_0x5aa4de[_0x3962a0(0x1ce)]??'')[_0x3962a0(0x1c4)]()===_0x2fe7d0;}export async function resolveUserRef(_0x29fe09,_0x217641=a224_0x1b57ec(0x1d0)){const _0x12bd08=a224_0x1b57ec,_0x181e1a=_0x29fe09[_0x12bd08(0x1e2)]();if(!_0x181e1a)throw CliErrors[_0x12bd08(0x1af)](_0x12bd08(0x1c6),_0x12bd08(0x1d6));const _0x34e9d4=await resolveTenantCode(),_0xcebff9=await getTenantMembers(_0x34e9d4);if(/^\d+$/[_0x12bd08(0x1e0)](_0x181e1a)){const _0x2d3cb3=Number(_0x181e1a),_0x276161=_0xcebff9[_0x12bd08(0x1cf)](_0x18c460=>_0x18c460[_0x12bd08(0x1cb)]===_0x2d3cb3);return{'userId':_0x2d3cb3,'username':_0x276161?.[_0x12bd08(0x1ce)]??String(_0x2d3cb3),'nickname':_0x276161?.['nickname'],'matchedBy':'id'};}const _0x68785f=_0xcebff9[_0x12bd08(0x1c9)](_0x5255c5=>matchMember(_0x5255c5,_0x181e1a));if(_0x68785f[_0x12bd08(0x1e9)]===0x0)throw CliErrors['validation'](_0x12bd08(0x1f6)+_0x181e1a+'\x22.',_0x12bd08(0x1d1)+_0x217641);if(_0x68785f['length']>0x1){const _0x375dc3=_0x68785f[_0x12bd08(0x1dd)](_0x2cd2c9=>(_0x2cd2c9[_0x12bd08(0x1e7)]??_0x2cd2c9[_0x12bd08(0x1ce)]??'?')+'('+_0x2cd2c9[_0x12bd08(0x1cb)]+')')['join'](',\x20');throw CliErrors[_0x12bd08(0x1af)]('Multiple\x20tenant\x20members\x20match\x20\x22'+_0x181e1a+_0x12bd08(0x1b5)+_0x375dc3+'.',_0x217641);}const _0xf18907=_0x68785f[0x0];return{'userId':_0xf18907['userId'],'username':_0xf18907['username']??String(_0xf18907[_0x12bd08(0x1cb)]),'nickname':_0xf18907[_0x12bd08(0x1e7)],'matchedBy':_0x12bd08(0x1e5)};}export const CREATE_USER_ROLE_PATH=a224_0x1b57ec(0x1f3);export const DELETE_USER_ROLE_PATH=a224_0x1b57ec(0x1c0);function a224_0x3568(_0x57a723,_0x456e3b){_0x57a723=_0x57a723-0x1ac;const _0x57b024=a224_0x57b0();let _0x3568b6=_0x57b024[_0x57a723];return _0x3568b6;}export function computeRoleUserMutation(_0x51002a){const _0x3ee2fc=a224_0x1b57ec,{operation:_0x11fec6,appCode:_0x228629,role:_0x427206,relations:_0x3fe66d,user:_0x1e2055}=_0x51002a,_0x199a96=[...new Set(_0x3fe66d[_0x3ee2fc(0x1dd)](_0x35ef96=>_0x35ef96[_0x3ee2fc(0x1cb)]))],_0x38caf1=[];if(_0x51002a[_0x3ee2fc(0x1de)]!==undefined&&_0x51002a[_0x3ee2fc(0x1de)]!==_0x199a96['length'])throw CliErrors[_0x3ee2fc(0x1af)](_0x3ee2fc(0x1f7)+_0x51002a['expectUserCount']+_0x3ee2fc(0x1be)+_0x199a96[_0x3ee2fc(0x1e9)]+'.','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.');const _0x324705=_0x199a96[_0x3ee2fc(0x1bb)](_0x1e2055[_0x3ee2fc(0x1cb)]),_0x23f85f=_0x3fe66d[_0x3ee2fc(0x1c9)](_0x279082=>_0x279082['userId']===_0x1e2055[_0x3ee2fc(0x1cb)])[_0x3ee2fc(0x1dd)](_0x275f2a=>_0x275f2a['id']),_0x1e6398=_0x11fec6===_0x3ee2fc(0x1df)?!_0x324705:_0x324705;let _0x54245b=_0x199a96;_0x11fec6==='user-add'?_0x324705?_0x38caf1[_0x3ee2fc(0x1ee)](_0x3ee2fc(0x1b6)+_0x1e2055[_0x3ee2fc(0x1cb)]+'\x20is\x20already\x20a\x20member\x20of\x20role\x20'+_0x427206[_0x3ee2fc(0x1c7)]+_0x3ee2fc(0x1d4)):_0x54245b=[..._0x199a96,_0x1e2055[_0x3ee2fc(0x1cb)]]:!_0x324705?_0x38caf1['push']('User\x20'+_0x1e2055['userId']+'\x20is\x20not\x20a\x20member\x20of\x20role\x20'+_0x427206['roleName']+';\x20no\x20change.'):(_0x54245b=_0x199a96[_0x3ee2fc(0x1c9)](_0x222d98=>_0x222d98!==_0x1e2055[_0x3ee2fc(0x1cb)]),_0x23f85f[_0x3ee2fc(0x1e9)]>0x1&&_0x38caf1['push']('Removed\x20'+_0x23f85f[_0x3ee2fc(0x1e9)]+_0x3ee2fc(0x1c8)+_0x1e2055[_0x3ee2fc(0x1cb)]+'.'));const _0x5df5f7={'scope':'dev','operation':_0x11fec6,'selector':{'appCode':_0x228629,'roleId':_0x427206['id'],'roleName':_0x427206['roleName'],'userId':_0x1e2055[_0x3ee2fc(0x1cb)]},'before':{'userIds':_0x199a96},'after':{'userIds':_0x54245b},'dryRun':_0x51002a[_0x3ee2fc(0x1ac)],'backend':{'method':_0x3ee2fc(0x1c1),'path':_0x11fec6==='user-add'?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x38caf1};return{'mutation':_0x5df5f7,'changed':_0x1e6398,'matchingRelationIds':_0x23f85f};}export async function loadDevRoleRelations(_0xf531af,_0x1540e4){const _0x584e92=a224_0x1b57ec,_0x27d7b7=0x64,_0x411f26=[];for(let _0x833128=0x1;;_0x833128+=0x1){const {items:_0x55d883,paging:_0x58b36b}=await listDevUserRoleRelations(_0xf531af,{'roleId':_0x1540e4,'currentPage':_0x833128,'pageSize':_0x27d7b7});_0x411f26[_0x584e92(0x1ee)](..._0x55d883);if(_0x55d883[_0x584e92(0x1e9)]<_0x27d7b7||_0x58b36b&&_0x411f26[_0x584e92(0x1e9)]>=_0x58b36b[_0x584e92(0x1eb)])return _0x411f26;}}export function readRoleRef(_0x41e86c){const _0x1cbbcc=a224_0x1b57ec,_0x2a4403=_0x41e86c[_0x1cbbcc(0x1ae)](_0x1cbbcc(0x1e1))[_0x1cbbcc(0x1e2)]();if(!_0x2a4403)throw CliErrors[_0x1cbbcc(0x1b0)](_0x1cbbcc(0x1e1),_0x1cbbcc(0x1db));return _0x2a4403;}export async function prepareUserMutation(_0x3b68df,_0x1f798b,_0x2d13e3){const _0x45b4e8=a224_0x1b57ec,_0x335e2c=readRoleRef(_0x3b68df),_0x10336e=_0x3b68df[_0x45b4e8(0x1ae)](_0x45b4e8(0x1b9))['trim']();if(!_0x10336e)throw CliErrors[_0x45b4e8(0x1b0)]('user',_0x45b4e8(0x1d6));const _0x5694a5=_0x3b68df[_0x45b4e8(0x1f0)](_0x45b4e8(0x1d7)),_0x2b7538=_0x5694a5===undefined||_0x5694a5===null?undefined:Number(_0x5694a5),_0x597476=await resolveRoleRef(_0x3b68df['appCode'],_0x335e2c);if(_0x597476['roleType']===_0x45b4e8(0x1ad))throw CliErrors[_0x45b4e8(0x1af)](_0x45b4e8(0x1ec)+_0x1f798b+'\x20members\x20of\x20the\x20OWNER\x20role.','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.');const _0x3d8f1f=await resolveUserRef(_0x10336e),_0x551d64=await loadDevRoleRelations(_0x3b68df[_0x45b4e8(0x1c3)],_0x597476['id']);return{...computeRoleUserMutation({'operation':_0x1f798b,'appCode':_0x3b68df['appCode'],'role':_0x597476,'relations':_0x551d64,'user':{'userId':_0x3d8f1f[_0x45b4e8(0x1cb)],'username':_0x3d8f1f[_0x45b4e8(0x1ce)],'nickname':_0x3d8f1f['nickname']},'dryRun':_0x2d13e3,..._0x2b7538!==undefined?{'expectUserCount':_0x2b7538}:{}}),'role':_0x597476,'user':_0x3d8f1f};}
1
+ const a224_0x13a989=a224_0x3862;(function(_0x3d750c,_0x3eeaf8){const _0x1ec2ad=a224_0x3862,_0x1278ef=_0x3d750c();while(!![]){try{const _0x3b27a7=parseInt(_0x1ec2ad(0xb8))/0x1+-parseInt(_0x1ec2ad(0xc7))/0x2+-parseInt(_0x1ec2ad(0xeb))/0x3+parseInt(_0x1ec2ad(0xd2))/0x4*(-parseInt(_0x1ec2ad(0xc5))/0x5)+parseInt(_0x1ec2ad(0xba))/0x6+-parseInt(_0x1ec2ad(0xd1))/0x7*(parseInt(_0x1ec2ad(0xea))/0x8)+parseInt(_0x1ec2ad(0xd3))/0x9;if(_0x3b27a7===_0x3eeaf8)break;else _0x1278ef['push'](_0x1278ef['shift']());}catch(_0x5df6ab){_0x1278ef['push'](_0x1278ef['shift']());}}}(a224_0x10bc,0x3e6ca));import{getTenantMembers,listDevUserRoleRelations,listAppRoles}from'../../core/api-client.js';import{getSessionUserInfo}from'../../auth/get-session-user.js';import{CliErrors}from'../../errors.js';function a224_0x10bc(){const _0x3491d8=['flagMissing','Role\x20name','string','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','expectUserCount','No\x20tenant\x20member\x20matches\x20\x22','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','Disambiguate\x20with\x20--role\x20<id>.','nickname','push','Missing\x20user\x20reference.','Pass\x20--role\x20<id|name>.','Role\x20id\x20or\x20exact\x20role\x20name','Anti-drift\x20check\x20failed:\x20expected\x20','Pass\x20--user\x20<id|name>.','Cannot\x20',';\x20no\x20change.','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.','ADMIN','user','510258dDlwqm','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','2081046pQSyMt','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','includes','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','dryRun','OWNER','role','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','\x20duplicate\x20memberships\x20for\x20user\x20','validation','\x20is\x20already\x20a\x20member\x20of\x20role\x20','720740HxFwQT','remark','391520doLJaB','/smartapi/permit/user-role/create','dev','totalCount','appCode','user-add','expect-user-count','test','DEV','\x20members\x20of\x20the\x20OWNER\x20role.','8218IwaZoF','12gDrkHQ','5955597rMrNMk','filter','name','trim','map','userId','\x20built-in\x20role\x20','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','Multiple\x20tenant\x20members\x20match\x20\x22','\x22:\x20','tenant_code','str','Role\x20name\x20\x22','Role\x20id\x20','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','username','CUSTOM','toLowerCase','roleType','number','roleName','Check\x20the\x20nickname/username.\x20','User\x20','1552zXDLQT','1221546EpSTxM','length','join','\x20is\x20not\x20a\x20member\x20of\x20role\x20'];a224_0x10bc=function(){return _0x3491d8;};return a224_0x10bc();}export const ROLE_ID_FLAG={'name':'id','type':'number','required':!![],'description':'Role\x20id\x20(from\x20`role\x20list`)'};export const ROLE_REF_FLAG={'name':a224_0x13a989(0xc0),'type':a224_0x13a989(0xf1),'required':!![],'description':a224_0x13a989(0xfb)};export const USER_REF_FLAG={'name':'user','type':a224_0x13a989(0xf1),'required':!![],'description':a224_0x13a989(0xda)};export const NAME_FLAG={'name':a224_0x13a989(0xd5),'type':a224_0x13a989(0xf1),'required':!![],'description':a224_0x13a989(0xf0)};export const USER_NAME_FLAG={'name':a224_0x13a989(0xd5),'type':a224_0x13a989(0xf1),'required':!![],'description':a224_0x13a989(0xc1)};export const REMARK_FLAG={'name':a224_0x13a989(0xc6),'type':'string','required':![],'description':'Optional\x20role\x20remark/description'};export const EXPECT_USER_COUNT_FLAG={'name':a224_0x13a989(0xcd),'type':a224_0x13a989(0xe6),'required':![],'description':a224_0x13a989(0xbd)};export const BUILTIN_ROLE_TYPES=[a224_0x13a989(0x101),a224_0x13a989(0xcf),a224_0x13a989(0xbf)];export function isBuiltinRole(_0x34331b){return BUILTIN_ROLE_TYPES['includes'](_0x34331b);}export function assertCustomRole(_0x558208,_0x1058e0){const _0x20f4e4=a224_0x13a989;if(_0x558208[_0x20f4e4(0xe5)]!==_0x20f4e4(0xe3))throw CliErrors[_0x20f4e4(0xc3)](_0x20f4e4(0xfe)+_0x1058e0+_0x20f4e4(0xd9)+_0x558208['roleName']+'\x20('+_0x558208[_0x20f4e4(0xe5)]+').',_0x20f4e4(0xbb));}export function projectRole(_0x552e1e){const _0x32f6c7=a224_0x13a989;return{'id':_0x552e1e['id'],'roleName':_0x552e1e['roleName'],'roleType':_0x552e1e[_0x32f6c7(0xe5)],'remark':_0x552e1e[_0x32f6c7(0xc6)],'userCount':_0x552e1e['userCount'],'permitCount':_0x552e1e['permitCount'],'builtin':isBuiltinRole(_0x552e1e[_0x32f6c7(0xe5)])};}export async function resolveRoleRef(_0x4fbf47,_0x38a803){const _0x246ddc=a224_0x13a989,_0x2f5085=_0x38a803[_0x246ddc(0xd6)]();if(!_0x2f5085)throw CliErrors[_0x246ddc(0xc3)]('Missing\x20role\x20reference.',_0x246ddc(0xfa));if(/^\d+$/[_0x246ddc(0xce)](_0x2f5085))return getRoleById(_0x4fbf47,Number(_0x2f5085));const _0xe52568=await listAllAppRoles(_0x4fbf47),_0x215c81=_0xe52568['filter'](_0x4ba6ed=>_0x4ba6ed[_0x246ddc(0xe7)]===_0x2f5085);if(_0x215c81[_0x246ddc(0xec)]===0x0)throw CliErrors[_0x246ddc(0xc3)](_0x246ddc(0xdf)+_0x2f5085+'\x22\x20not\x20found\x20in\x20app\x20'+_0x4fbf47+'.',_0x246ddc(0xf2));if(_0x215c81['length']>0x1){const _0x10da1f=_0x215c81[_0x246ddc(0xd7)](_0x8f35f9=>_0x8f35f9['id'])[_0x246ddc(0xed)](',\x20');throw CliErrors[_0x246ddc(0xc3)](_0x246ddc(0xdf)+_0x2f5085+'\x22\x20is\x20ambiguous\x20(ids:\x20'+_0x10da1f+').',_0x246ddc(0xf6));}return _0x215c81[0x0];}export async function getRoleById(_0x89ead5,_0x385935){const _0x5164b2=a224_0x13a989,_0x29527c=await listAllAppRoles(_0x89ead5),_0x5ed7ae=_0x29527c['filter'](_0x1ae5b6=>_0x1ae5b6['id']===_0x385935&&(!_0x1ae5b6[_0x5164b2(0xcb)]||_0x1ae5b6[_0x5164b2(0xcb)]===_0x89ead5));if(_0x5ed7ae['length']!==0x1)throw CliErrors[_0x5164b2(0xc3)](_0x5164b2(0xe0)+_0x385935+'\x20not\x20found\x20in\x20app\x20'+_0x89ead5+'.',_0x5164b2(0xb9));return _0x5ed7ae[0x0];}async function listAllAppRoles(_0x11b06a){const _0x3e5722=a224_0x13a989,_0x4b3298=0x64,_0x1844b1=[];for(let _0x5dddd8=0x1;;_0x5dddd8+=0x1){const {items:_0x233a77,paging:_0x5588b6}=await listAppRoles(_0x11b06a,{'currentPage':_0x5dddd8,'pageSize':_0x4b3298});_0x1844b1[_0x3e5722(0xf8)](..._0x233a77);if(_0x233a77['length']<_0x4b3298||_0x5588b6&&_0x1844b1[_0x3e5722(0xec)]>=_0x5588b6[_0x3e5722(0xca)])return _0x1844b1;}}export async function resolveTenantCode(){const _0xd467eb=a224_0x13a989,_0x183c70=await getSessionUserInfo(),_0x49a378=_0x183c70?.[_0xd467eb(0x102)]?.['tenant']?.[_0xd467eb(0xdd)];if(!_0x49a378)throw CliErrors['authRequired'](_0xd467eb(0xe1));return _0x49a378;}function matchMember(_0x177ee8,_0x284817){const _0x43e3ff=a224_0x13a989,_0x3ad84b=_0x284817['trim']()[_0x43e3ff(0xe4)]();return(_0x177ee8[_0x43e3ff(0xf7)]??'')[_0x43e3ff(0xe4)]()===_0x3ad84b||(_0x177ee8['username']??'')[_0x43e3ff(0xe4)]()===_0x3ad84b;}export async function resolveUserRef(_0x282482,_0x229115='Pass\x20--user\x20<id>.'){const _0x25187c=a224_0x13a989,_0x47f415=_0x282482[_0x25187c(0xd6)]();if(!_0x47f415)throw CliErrors['validation'](_0x25187c(0xf9),'Pass\x20--user\x20<id|name>.');const _0xf39834=await resolveTenantCode(),_0x47811e=await getTenantMembers(_0xf39834);if(/^\d+$/['test'](_0x47f415)){const _0x4a59ad=Number(_0x47f415),_0x5c1567=_0x47811e['find'](_0x80ec02=>_0x80ec02[_0x25187c(0xd8)]===_0x4a59ad);return{'userId':_0x4a59ad,'username':_0x5c1567?.[_0x25187c(0xe2)]??String(_0x4a59ad),'nickname':_0x5c1567?.[_0x25187c(0xf7)],'matchedBy':'id'};}const _0x38d031=_0x47811e[_0x25187c(0xd4)](_0x448984=>matchMember(_0x448984,_0x47f415));if(_0x38d031['length']===0x0)throw CliErrors[_0x25187c(0xc3)](_0x25187c(0xf4)+_0x47f415+'\x22.',_0x25187c(0xe8)+_0x229115);if(_0x38d031[_0x25187c(0xec)]>0x1){const _0x243847=_0x38d031[_0x25187c(0xd7)](_0x2b63dd=>(_0x2b63dd[_0x25187c(0xf7)]??_0x2b63dd[_0x25187c(0xe2)]??'?')+'('+_0x2b63dd[_0x25187c(0xd8)]+')')[_0x25187c(0xed)](',\x20');throw CliErrors['validation'](_0x25187c(0xdb)+_0x47f415+_0x25187c(0xdc)+_0x243847+'.',_0x229115);}const _0x4b3668=_0x38d031[0x0];return{'userId':_0x4b3668[_0x25187c(0xd8)],'username':_0x4b3668[_0x25187c(0xe2)]??String(_0x4b3668['userId']),'nickname':_0x4b3668['nickname'],'matchedBy':_0x25187c(0xd5)};}export const CREATE_USER_ROLE_PATH=a224_0x13a989(0xc8);export const DELETE_USER_ROLE_PATH='/smartapi/permit/user-role/delete';function a224_0x3862(_0x560146,_0x5a7f4e){_0x560146=_0x560146-0xb8;const _0x10bce1=a224_0x10bc();let _0x3862b4=_0x10bce1[_0x560146];return _0x3862b4;}export function computeRoleUserMutation(_0x7c936f){const _0x4bd4fc=a224_0x13a989,{operation:_0x3dc7e7,appCode:_0x4a19fd,role:_0x2a4949,relations:_0x5bf429,user:_0x103820}=_0x7c936f,_0x4003c2=[...new Set(_0x5bf429[_0x4bd4fc(0xd7)](_0x402a16=>_0x402a16['userId']))],_0x21c3d2=[];if(_0x7c936f[_0x4bd4fc(0xf3)]!==undefined&&_0x7c936f[_0x4bd4fc(0xf3)]!==_0x4003c2['length'])throw CliErrors[_0x4bd4fc(0xc3)](_0x4bd4fc(0xfc)+_0x7c936f[_0x4bd4fc(0xf3)]+'\x20member(s)\x20but\x20role\x20has\x20'+_0x4003c2[_0x4bd4fc(0xec)]+'.',_0x4bd4fc(0xf5));const _0x405259=_0x4003c2[_0x4bd4fc(0xbc)](_0x103820[_0x4bd4fc(0xd8)]),_0x42fdaa=_0x5bf429[_0x4bd4fc(0xd4)](_0x4252bb=>_0x4252bb[_0x4bd4fc(0xd8)]===_0x103820[_0x4bd4fc(0xd8)])[_0x4bd4fc(0xd7)](_0x5a5718=>_0x5a5718['id']),_0x14cc8f=_0x3dc7e7===_0x4bd4fc(0xcc)?!_0x405259:_0x405259;let _0xdef93c=_0x4003c2;_0x3dc7e7==='user-add'?_0x405259?_0x21c3d2[_0x4bd4fc(0xf8)](_0x4bd4fc(0xe9)+_0x103820['userId']+_0x4bd4fc(0xc4)+_0x2a4949[_0x4bd4fc(0xe7)]+_0x4bd4fc(0xff)):_0xdef93c=[..._0x4003c2,_0x103820[_0x4bd4fc(0xd8)]]:!_0x405259?_0x21c3d2['push'](_0x4bd4fc(0xe9)+_0x103820[_0x4bd4fc(0xd8)]+_0x4bd4fc(0xee)+_0x2a4949[_0x4bd4fc(0xe7)]+';\x20no\x20change.'):(_0xdef93c=_0x4003c2[_0x4bd4fc(0xd4)](_0x2fde82=>_0x2fde82!==_0x103820[_0x4bd4fc(0xd8)]),_0x42fdaa[_0x4bd4fc(0xec)]>0x1&&_0x21c3d2['push']('Removed\x20'+_0x42fdaa['length']+_0x4bd4fc(0xc2)+_0x103820[_0x4bd4fc(0xd8)]+'.'));const _0xfef06d={'scope':_0x4bd4fc(0xc9),'operation':_0x3dc7e7,'selector':{'appCode':_0x4a19fd,'roleId':_0x2a4949['id'],'roleName':_0x2a4949[_0x4bd4fc(0xe7)],'userId':_0x103820[_0x4bd4fc(0xd8)]},'before':{'userIds':_0x4003c2},'after':{'userIds':_0xdef93c},'dryRun':_0x7c936f[_0x4bd4fc(0xbe)],'backend':{'method':'POST','path':_0x3dc7e7===_0x4bd4fc(0xcc)?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x21c3d2};return{'mutation':_0xfef06d,'changed':_0x14cc8f,'matchingRelationIds':_0x42fdaa};}export async function loadDevRoleRelations(_0x346e4a,_0x484887){const _0x2cafde=a224_0x13a989,_0x4f479f=0x64,_0x197634=[];for(let _0xd44399=0x1;;_0xd44399+=0x1){const {items:_0x102670,paging:_0x461099}=await listDevUserRoleRelations(_0x346e4a,{'roleId':_0x484887,'currentPage':_0xd44399,'pageSize':_0x4f479f});_0x197634['push'](..._0x102670);if(_0x102670[_0x2cafde(0xec)]<_0x4f479f||_0x461099&&_0x197634[_0x2cafde(0xec)]>=_0x461099[_0x2cafde(0xca)])return _0x197634;}}export function readRoleRef(_0xfd6f83){const _0x1ebec6=a224_0x13a989,_0x14c8da=_0xfd6f83[_0x1ebec6(0xde)](_0x1ebec6(0xc0))[_0x1ebec6(0xd6)]();if(!_0x14c8da)throw CliErrors[_0x1ebec6(0xef)](_0x1ebec6(0xc0),_0x1ebec6(0xfa));return _0x14c8da;}export async function prepareUserMutation(_0x1110c4,_0x42870c,_0x5aebe9){const _0x2e52e6=a224_0x13a989,_0x29adf8=readRoleRef(_0x1110c4),_0x4cc5c3=_0x1110c4[_0x2e52e6(0xde)](_0x2e52e6(0x102))[_0x2e52e6(0xd6)]();if(!_0x4cc5c3)throw CliErrors[_0x2e52e6(0xef)](_0x2e52e6(0x102),_0x2e52e6(0xfd));const _0x488be6=_0x1110c4['flag'](_0x2e52e6(0xcd)),_0x15cd91=_0x488be6===undefined||_0x488be6===null?undefined:Number(_0x488be6),_0xe39348=await resolveRoleRef(_0x1110c4[_0x2e52e6(0xcb)],_0x29adf8);if(_0xe39348['roleType']===_0x2e52e6(0xbf))throw CliErrors['validation'](_0x2e52e6(0xfe)+_0x42870c+_0x2e52e6(0xd0),_0x2e52e6(0x100));const _0x161078=await resolveUserRef(_0x4cc5c3),_0x33f0ae=await loadDevRoleRelations(_0x1110c4['appCode'],_0xe39348['id']);return{...computeRoleUserMutation({'operation':_0x42870c,'appCode':_0x1110c4[_0x2e52e6(0xcb)],'role':_0xe39348,'relations':_0x33f0ae,'user':{'userId':_0x161078[_0x2e52e6(0xd8)],'username':_0x161078[_0x2e52e6(0xe2)],'nickname':_0x161078['nickname']},'dryRun':_0x5aebe9,..._0x15cd91!==undefined?{'expectUserCount':_0x15cd91}:{}}),'role':_0xe39348,'user':_0x161078};}
@@ -1 +1 @@
1
- const a225_0x5cdae4=a225_0x33b2;(function(_0x3a7047,_0x25b5af){const _0x4950e2=a225_0x33b2,_0x38b263=_0x3a7047();while(!![]){try{const _0x478796=-parseInt(_0x4950e2(0x80))/0x1+-parseInt(_0x4950e2(0x7a))/0x2*(-parseInt(_0x4950e2(0x87))/0x3)+parseInt(_0x4950e2(0x7d))/0x4*(-parseInt(_0x4950e2(0x7f))/0x5)+parseInt(_0x4950e2(0x8c))/0x6*(parseInt(_0x4950e2(0x8a))/0x7)+-parseInt(_0x4950e2(0x78))/0x8+parseInt(_0x4950e2(0x73))/0x9+parseInt(_0x4950e2(0x82))/0xa*(parseInt(_0x4950e2(0x89))/0xb);if(_0x478796===_0x25b5af)break;else _0x38b263['push'](_0x38b263['shift']());}catch(_0x15fe79){_0x38b263['push'](_0x38b263['shift']());}}}(a225_0x38fb,0xc3557));import{updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a225_0x33b2(_0x3c13ef,_0x9d33d7){_0x3c13ef=_0x3c13ef-0x6e;const _0x38fbb6=a225_0x38fb();let _0x33b285=_0x38fbb6[_0x3c13ef];return _0x33b285;}function a225_0x38fb(){const _0xcbd77e=['trim','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.','name','roleName','\x20(id=','10909350ftscIH','update','Nothing\x20to\x20update.','appCode','dev','10868880XWplWg','string','346jvQwCn','validation','remark','3252thBqpJ','flag','20svyOEx','1536221WVIJNS','--name\x20cannot\x20be\x20empty.','10BovXzg','num','/smartapi/permit/role/update','role','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','25377pKjSWF','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','4235759OhVzTZ','557851nUFXfj','POST','48juxLPZ'];a225_0x38fb=function(){return _0xcbd77e;};return a225_0x38fb();}import{assertCustomRole,getRoleById,projectRole,REMARK_FLAG,ROLE_ID_FLAG}from'../../commands/role/shared.js';const UPDATE_PATH=a225_0x5cdae4(0x84);function readPatch(_0x598248){const _0x39023e=a225_0x5cdae4,_0xca85f7=_0x598248[_0x39023e(0x7e)](_0x39023e(0x70)),_0x5d7719=_0x598248[_0x39023e(0x7e)](_0x39023e(0x7c)),_0x3f5805={};if(_0xca85f7!==undefined&&_0xca85f7!==null){const _0x59a3a6=String(_0xca85f7)[_0x39023e(0x6e)]();if(!_0x59a3a6)throw CliErrors[_0x39023e(0x7b)](_0x39023e(0x81));if(_0x59a3a6['length']>0x40)throw CliErrors[_0x39023e(0x7b)](_0x39023e(0x86));_0x3f5805[_0x39023e(0x71)]=_0x59a3a6;}_0x5d7719!==undefined&&_0x5d7719!==null&&(_0x3f5805['remark']=String(_0x5d7719));if(_0x3f5805[_0x39023e(0x71)]===undefined&&_0x3f5805[_0x39023e(0x7c)]===undefined)throw CliErrors['validation'](_0x39023e(0x75),_0x39023e(0x6f));return _0x3f5805;}export const roleUpdate={'service':a225_0x5cdae4(0x85),'command':a225_0x5cdae4(0x74),'description':a225_0x5cdae4(0x88),'risk':'write','flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a225_0x5cdae4(0x70),'type':a225_0x5cdae4(0x79),'required':![],'description':'New\x20role\x20name'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x579e2a){readPatch(_0x579e2a);},async 'dryRun'(_0x53cab1){const _0x1f06e6=a225_0x5cdae4,_0x58e0d0=_0x53cab1[_0x1f06e6(0x83)]('id'),_0x1eb6c3=readPatch(_0x53cab1),_0x10e299=await getRoleById(_0x53cab1['appCode'],_0x58e0d0);return assertCustomRole(_0x10e299,_0x1f06e6(0x74)),asDryRunResult({'scope':_0x1f06e6(0x77),'operation':'update','selector':{'appCode':_0x53cab1['appCode'],'roleId':_0x58e0d0,'roleName':_0x10e299[_0x1f06e6(0x71)]},'before':projectRole(_0x10e299),'after':projectRole({..._0x10e299,..._0x1eb6c3[_0x1f06e6(0x71)]!==undefined?{'roleName':_0x1eb6c3['roleName']}:{},..._0x1eb6c3['remark']!==undefined?{'remark':_0x1eb6c3[_0x1f06e6(0x7c)]}:{}}),'dryRun':!![],'backend':{'method':_0x1f06e6(0x8b),'path':UPDATE_PATH},'warnings':[]},{'method':_0x1f06e6(0x8b),'url':UPDATE_PATH});},async 'execute'(_0x52ce86){const _0x26559a=a225_0x5cdae4,_0x3f178a=_0x52ce86[_0x26559a(0x83)]('id'),_0x2971c7=readPatch(_0x52ce86),_0x475405=await getRoleById(_0x52ce86[_0x26559a(0x76)],_0x3f178a);assertCustomRole(_0x475405,'update'),await updateAppRole({'id':_0x3f178a,'appCode':_0x52ce86['appCode'],..._0x2971c7[_0x26559a(0x71)]!==undefined?{'roleName':_0x2971c7[_0x26559a(0x71)]}:{},..._0x2971c7[_0x26559a(0x7c)]!==undefined?{'remark':_0x2971c7['remark']}:{}});const _0x1cfe9a=await getRoleById(_0x52ce86[_0x26559a(0x76)],_0x3f178a);return{'ok':!![],'data':{'scope':_0x26559a(0x77),'operation':_0x26559a(0x74),'selector':{'appCode':_0x52ce86['appCode'],'roleId':_0x3f178a,'roleName':_0x1cfe9a[_0x26559a(0x71)]},'before':projectRole(_0x475405),'after':projectRole(_0x1cfe9a),'dryRun':![],'backend':{'method':_0x26559a(0x8b),'path':UPDATE_PATH},'warnings':[]},'message':'Updated\x20role\x20'+_0x1cfe9a[_0x26559a(0x71)]+_0x26559a(0x72)+_0x3f178a+')'};}};
1
+ const a225_0x4f7d4f=a225_0x50c9;function a225_0x50c9(_0x3d79f1,_0x2c667e){_0x3d79f1=_0x3d79f1-0x1bb;const _0x73f32a=a225_0x73f3();let _0x50c9e4=_0x73f32a[_0x3d79f1];return _0x50c9e4;}function a225_0x73f3(){const _0x179e80=['New\x20role\x20name','dev','roleName','94JrVxvG','349745uUinBO','validation','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','/smartapi/permit/role/update','trim','length','16019ypKZIp','update','10lJZquF','remark','7581717pFHDfQ','num','name','8ZIzTYH','776PxwlDQ','flag','role','--name\x20cannot\x20be\x20empty.','40859687flZjra','POST','appCode','2730225wJDuGa','48937EwixiF','Nothing\x20to\x20update.','write','5151276DGXmKR','\x20(id=','Role\x20name\x20cannot\x20exceed\x2064\x20characters.'];a225_0x73f3=function(){return _0x179e80;};return a225_0x73f3();}(function(_0x579f06,_0x99e4f3){const _0x2c9ad9=a225_0x50c9,_0x4a6ce6=_0x579f06();while(!![]){try{const _0x28041a=-parseInt(_0x2c9ad9(0x1d0))/0x1*(-parseInt(_0x2c9ad9(0x1c9))/0x2)+parseInt(_0x2c9ad9(0x1bf))/0x3+parseInt(_0x2c9ad9(0x1d7))/0x4*(parseInt(_0x2c9ad9(0x1ca))/0x5)+parseInt(_0x2c9ad9(0x1c3))/0x6+-parseInt(_0x2c9ad9(0x1c0))/0x7*(-parseInt(_0x2c9ad9(0x1d8))/0x8)+parseInt(_0x2c9ad9(0x1d4))/0x9+-parseInt(_0x2c9ad9(0x1d2))/0xa*(parseInt(_0x2c9ad9(0x1bc))/0xb);if(_0x28041a===_0x99e4f3)break;else _0x4a6ce6['push'](_0x4a6ce6['shift']());}catch(_0x4b895c){_0x4a6ce6['push'](_0x4a6ce6['shift']());}}}(a225_0x73f3,0x721eb));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=a225_0x4f7d4f(0x1cd);function readPatch(_0x1eff98){const _0x10cdea=a225_0x4f7d4f,_0x1bc04e=_0x1eff98[_0x10cdea(0x1d9)](_0x10cdea(0x1d6)),_0x7fd07e=_0x1eff98[_0x10cdea(0x1d9)]('remark'),_0xf4a86c={};if(_0x1bc04e!==undefined&&_0x1bc04e!==null){const _0x38320d=String(_0x1bc04e)[_0x10cdea(0x1ce)]();if(!_0x38320d)throw CliErrors[_0x10cdea(0x1cb)](_0x10cdea(0x1bb));if(_0x38320d[_0x10cdea(0x1cf)]>0x40)throw CliErrors['validation'](_0x10cdea(0x1c5));_0xf4a86c[_0x10cdea(0x1c8)]=_0x38320d;}_0x7fd07e!==undefined&&_0x7fd07e!==null&&(_0xf4a86c[_0x10cdea(0x1d3)]=String(_0x7fd07e));if(_0xf4a86c['roleName']===undefined&&_0xf4a86c['remark']===undefined)throw CliErrors[_0x10cdea(0x1cb)](_0x10cdea(0x1c1),'Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.');return _0xf4a86c;}export const roleUpdate={'service':a225_0x4f7d4f(0x1da),'command':'update','description':a225_0x4f7d4f(0x1cc),'risk':a225_0x4f7d4f(0x1c2),'flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a225_0x4f7d4f(0x1d6),'type':'string','required':![],'description':a225_0x4f7d4f(0x1c6)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1737d8){readPatch(_0x1737d8);},async 'dryRun'(_0x468e7d){const _0x103ef0=a225_0x4f7d4f,_0x5687ac=_0x468e7d[_0x103ef0(0x1d5)]('id'),_0x1179fe=readPatch(_0x468e7d),_0x234a94=await getRoleById(_0x468e7d[_0x103ef0(0x1be)],_0x5687ac);return assertCustomRole(_0x234a94,_0x103ef0(0x1d1)),asDryRunResult({'scope':'dev','operation':_0x103ef0(0x1d1),'selector':{'appCode':_0x468e7d['appCode'],'roleId':_0x5687ac,'roleName':_0x234a94['roleName']},'before':projectRole(_0x234a94),'after':projectRole({..._0x234a94,..._0x1179fe['roleName']!==undefined?{'roleName':_0x1179fe[_0x103ef0(0x1c8)]}:{},..._0x1179fe[_0x103ef0(0x1d3)]!==undefined?{'remark':_0x1179fe[_0x103ef0(0x1d3)]}:{}}),'dryRun':!![],'backend':{'method':_0x103ef0(0x1bd),'path':UPDATE_PATH},'warnings':[]},{'method':_0x103ef0(0x1bd),'url':UPDATE_PATH});},async 'execute'(_0x39ca27){const _0x537942=a225_0x4f7d4f,_0x6b9051=_0x39ca27[_0x537942(0x1d5)]('id'),_0x142342=readPatch(_0x39ca27),_0x33e37a=await getRoleById(_0x39ca27[_0x537942(0x1be)],_0x6b9051);assertCustomRole(_0x33e37a,_0x537942(0x1d1)),await updateAppRole({'id':_0x6b9051,'appCode':_0x39ca27[_0x537942(0x1be)],..._0x142342['roleName']!==undefined?{'roleName':_0x142342[_0x537942(0x1c8)]}:{},..._0x142342[_0x537942(0x1d3)]!==undefined?{'remark':_0x142342[_0x537942(0x1d3)]}:{}});const _0xc00cba=await getRoleById(_0x39ca27[_0x537942(0x1be)],_0x6b9051);return{'ok':!![],'data':{'scope':_0x537942(0x1c7),'operation':'update','selector':{'appCode':_0x39ca27[_0x537942(0x1be)],'roleId':_0x6b9051,'roleName':_0xc00cba[_0x537942(0x1c8)]},'before':projectRole(_0x33e37a),'after':projectRole(_0xc00cba),'dryRun':![],'backend':{'method':_0x537942(0x1bd),'path':UPDATE_PATH},'warnings':[]},'message':'Updated\x20role\x20'+_0xc00cba['roleName']+_0x537942(0x1c4)+_0x6b9051+')'};}};
@@ -1 +1 @@
1
- const a226_0x441d56=a226_0x3107;(function(_0x5ed8ab,_0x591e74){const _0x2da0ec=a226_0x3107,_0x1c1052=_0x5ed8ab();while(!![]){try{const _0x210cc8=parseInt(_0x2da0ec(0x8d))/0x1*(parseInt(_0x2da0ec(0x94))/0x2)+-parseInt(_0x2da0ec(0x9c))/0x3+parseInt(_0x2da0ec(0x95))/0x4*(parseInt(_0x2da0ec(0x92))/0x5)+-parseInt(_0x2da0ec(0x97))/0x6*(-parseInt(_0x2da0ec(0xa1))/0x7)+parseInt(_0x2da0ec(0x9f))/0x8+-parseInt(_0x2da0ec(0x8b))/0x9*(-parseInt(_0x2da0ec(0x91))/0xa)+-parseInt(_0x2da0ec(0x8f))/0xb;if(_0x210cc8===_0x591e74)break;else _0x1c1052['push'](_0x1c1052['shift']());}catch(_0x261917){_0x1c1052['push'](_0x1c1052['shift']());}}}(a226_0x283a,0xa8f85));import{createDevUserRole}from'../../core/api-client.js';function a226_0x283a(){const _0x527090=['Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','roleId','102321slTNcr','\x20already\x20in\x20role\x20','1RjxFua','\x20to\x20role\x20','18724882ygsbdF','Added\x20user\x20','90EEjJcw','4840IWTOjA','username','2359274rAXhxv','2208mvuNVv','selector','448218KjmGdf','appCode','userId','No\x20change:\x20user\x20','high-risk-write','1898379QtvvwM','user-add','role','7894024KZVtLO','roleName','21WTmKrr'];a226_0x283a=function(){return _0x527090;};return a226_0x283a();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a226_0x3107(_0x484bf2,_0xf6e4eb){_0x484bf2=_0x484bf2-0x8b;const _0x283a75=a226_0x283a();let _0x3107bd=_0x283a75[_0x484bf2];return _0x3107bd;}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':a226_0x441d56(0x9e),'command':a226_0x441d56(0x9d),'description':a226_0x441d56(0xa2),'risk':a226_0x441d56(0x9b),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x5e7e9f){const _0x19d2e4=a226_0x441d56,{mutation:_0x4d21be}=await prepareUserMutation(_0x5e7e9f,_0x19d2e4(0x9d),!![]);return asDryRunResult(_0x4d21be,{'method':'POST','url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x46769f){const _0x1b0153=a226_0x441d56,{mutation:_0x36f251,changed:_0x2195e8,role:_0x33271d,user:_0x257d24}=await prepareUserMutation(_0x46769f,'user-add',![]);return _0x2195e8&&await createDevUserRole({'appCode':_0x46769f[_0x1b0153(0x98)],'userId':_0x257d24[_0x1b0153(0x99)],'username':_0x257d24[_0x1b0153(0x93)],'roleType':_0x33271d['roleType'],'roleId':_0x36f251[_0x1b0153(0x96)][_0x1b0153(0xa3)]}),{'ok':!![],'data':_0x36f251,'message':_0x2195e8?_0x1b0153(0x90)+_0x36f251[_0x1b0153(0x96)][_0x1b0153(0x99)]+_0x1b0153(0x8e)+_0x36f251['selector'][_0x1b0153(0xa0)]:_0x1b0153(0x9a)+_0x36f251[_0x1b0153(0x96)][_0x1b0153(0x99)]+_0x1b0153(0x8c)+_0x36f251[_0x1b0153(0x96)][_0x1b0153(0xa0)]};}};
1
+ function a226_0x24c1(_0xbe052b,_0x53afb3){_0xbe052b=_0xbe052b-0x7d;const _0x3685ce=a226_0x3685();let _0x24c105=_0x3685ce[_0xbe052b];return _0x24c105;}const a226_0x59bc1b=a226_0x24c1;(function(_0x688a11,_0x2f9551){const _0x41bb5e=a226_0x24c1,_0x4fb034=_0x688a11();while(!![]){try{const _0x5118d0=parseInt(_0x41bb5e(0x89))/0x1*(-parseInt(_0x41bb5e(0x95))/0x2)+parseInt(_0x41bb5e(0x7d))/0x3+-parseInt(_0x41bb5e(0x83))/0x4*(parseInt(_0x41bb5e(0x91))/0x5)+parseInt(_0x41bb5e(0x8a))/0x6*(parseInt(_0x41bb5e(0x8c))/0x7)+-parseInt(_0x41bb5e(0x7e))/0x8*(parseInt(_0x41bb5e(0x7f))/0x9)+-parseInt(_0x41bb5e(0x88))/0xa+-parseInt(_0x41bb5e(0x8f))/0xb*(-parseInt(_0x41bb5e(0x85))/0xc);if(_0x5118d0===_0x2f9551)break;else _0x4fb034['push'](_0x4fb034['shift']());}catch(_0x33ea92){_0x4fb034['push'](_0x4fb034['shift']());}}}(a226_0x3685,0x6e27a));import{createDevUserRole}from'../../core/api-client.js';function a226_0x3685(){const _0x1ef3c7=['31048LTwaKJ','1449HsKQVk','userId','No\x20change:\x20user\x20','Added\x20user\x20','124808vIJrxO','roleId','12WHlvRW','username','roleType','6729690OQUOMH','11959ARBmWt','114IZnukK','\x20to\x20role\x20','294616HRBVkR','roleName','user-add','20186584uQGfPG','Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','70cdUzvi','appCode','POST','selector','76IzSroU','high-risk-write','16374MGUfbe'];a226_0x3685=function(){return _0x1ef3c7;};return a226_0x3685();}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':'role','command':a226_0x59bc1b(0x8e),'description':a226_0x59bc1b(0x90),'risk':a226_0x59bc1b(0x96),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x315036){const _0x48d903=a226_0x59bc1b,{mutation:_0x35d0c3}=await prepareUserMutation(_0x315036,_0x48d903(0x8e),!![]);return asDryRunResult(_0x35d0c3,{'method':_0x48d903(0x93),'url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x1c74f7){const _0x29bf5a=a226_0x59bc1b,{mutation:_0x44cca0,changed:_0x3c58c1,role:_0x57ec25,user:_0x9ac33e}=await prepareUserMutation(_0x1c74f7,'user-add',![]);return _0x3c58c1&&await createDevUserRole({'appCode':_0x1c74f7[_0x29bf5a(0x92)],'userId':_0x9ac33e[_0x29bf5a(0x80)],'username':_0x9ac33e[_0x29bf5a(0x86)],'roleType':_0x57ec25[_0x29bf5a(0x87)],'roleId':_0x44cca0[_0x29bf5a(0x94)][_0x29bf5a(0x84)]}),{'ok':!![],'data':_0x44cca0,'message':_0x3c58c1?_0x29bf5a(0x82)+_0x44cca0[_0x29bf5a(0x94)][_0x29bf5a(0x80)]+_0x29bf5a(0x8b)+_0x44cca0[_0x29bf5a(0x94)][_0x29bf5a(0x8d)]:_0x29bf5a(0x81)+_0x44cca0[_0x29bf5a(0x94)]['userId']+'\x20already\x20in\x20role\x20'+_0x44cca0[_0x29bf5a(0x94)]['roleName']};}};
@@ -1 +1 @@
1
- const a227_0x2b5fc8=a227_0x4c2e;(function(_0x1fe7f5,_0x500f3d){const _0x5347ba=a227_0x4c2e,_0x29b370=_0x1fe7f5();while(!![]){try{const _0x1d3706=parseInt(_0x5347ba(0x7f))/0x1+parseInt(_0x5347ba(0x89))/0x2+-parseInt(_0x5347ba(0x7d))/0x3*(-parseInt(_0x5347ba(0x8b))/0x4)+-parseInt(_0x5347ba(0x8d))/0x5+parseInt(_0x5347ba(0x81))/0x6+-parseInt(_0x5347ba(0x80))/0x7*(parseInt(_0x5347ba(0x82))/0x8)+parseInt(_0x5347ba(0x83))/0x9;if(_0x1d3706===_0x500f3d)break;else _0x29b370['push'](_0x29b370['shift']());}catch(_0xa04261){_0x29b370['push'](_0x29b370['shift']());}}}(a227_0x3812,0x9253c));import{deleteDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,DELETE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';function a227_0x3812(){const _0x27f5e9=['693243xHJbDf','No\x20change:\x20user\x20','POST','user-remove','Removed\x20user\x20','userId','1048118iMfIBE','selector','4eltOsE','Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','961130eRJOGQ','roleName','role','2358987oncAKm','\x20not\x20in\x20role\x20','60344BtYHMy','15477IvIvQl','2138766QbXpkS','3664oCTPZK'];a227_0x3812=function(){return _0x27f5e9;};return a227_0x3812();}function a227_0x4c2e(_0xd8d8,_0x23c70f){_0xd8d8=_0xd8d8-0x7c;const _0x3812ce=a227_0x3812();let _0x4c2ecb=_0x3812ce[_0xd8d8];return _0x4c2ecb;}export const roleUserRemove={'service':a227_0x2b5fc8(0x7c),'command':a227_0x2b5fc8(0x86),'description':a227_0x2b5fc8(0x8c),'risk':'high-risk-write','flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x2ca067){const _0x14e129=a227_0x2b5fc8,{mutation:_0x46c249}=await prepareUserMutation(_0x2ca067,_0x14e129(0x86),!![]);return asDryRunResult(_0x46c249,{'method':_0x14e129(0x85),'url':DELETE_USER_ROLE_PATH});},async 'execute'(_0x36ff4d){const _0x56b82e=a227_0x2b5fc8,{matchingRelationIds:_0x476a44,mutation:_0x44def6,changed:_0x5e152a}=await prepareUserMutation(_0x36ff4d,_0x56b82e(0x86),![]);if(_0x5e152a)for(const _0x3d1235 of _0x476a44){await deleteDevUserRole(_0x3d1235);}return{'ok':!![],'data':_0x44def6,'message':_0x5e152a?_0x56b82e(0x87)+_0x44def6[_0x56b82e(0x8a)][_0x56b82e(0x88)]+'\x20from\x20role\x20'+_0x44def6[_0x56b82e(0x8a)][_0x56b82e(0x8e)]:_0x56b82e(0x84)+_0x44def6[_0x56b82e(0x8a)][_0x56b82e(0x88)]+_0x56b82e(0x7e)+_0x44def6['selector']['roleName']};}};
1
+ const a227_0x39bf9b=a227_0x311a;(function(_0x1c5e17,_0x1bc4e2){const _0x119988=a227_0x311a,_0x10ec19=_0x1c5e17();while(!![]){try{const _0x28b554=parseInt(_0x119988(0x194))/0x1*(parseInt(_0x119988(0x19b))/0x2)+-parseInt(_0x119988(0x197))/0x3*(parseInt(_0x119988(0x199))/0x4)+parseInt(_0x119988(0x1a0))/0x5*(-parseInt(_0x119988(0x19f))/0x6)+-parseInt(_0x119988(0x19e))/0x7+-parseInt(_0x119988(0x192))/0x8+parseInt(_0x119988(0x198))/0x9*(-parseInt(_0x119988(0x18b))/0xa)+parseInt(_0x119988(0x18f))/0xb;if(_0x28b554===_0x1bc4e2)break;else _0x10ec19['push'](_0x10ec19['shift']());}catch(_0x23af57){_0x10ec19['push'](_0x10ec19['shift']());}}}(a227_0x12ef,0x4986f));function a227_0x12ef(){const _0xafa19b=['selector','1211DcYzfc','high-risk-write','user-remove','330tJjSHn','4266909YWfIDw','6824xSPiyj','roleName','436IwzXXV','POST','Removed\x20user\x20','3334499kHpfZk','318fEKJMU','51415UKVQkN','10bahvit','role','\x20from\x20role\x20','No\x20change:\x20user\x20','24612973aqOsRI','\x20not\x20in\x20role\x20','userId','4138056nXwWZo'];a227_0x12ef=function(){return _0xafa19b;};return a227_0x12ef();}import{deleteDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,DELETE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';function a227_0x311a(_0x2b1417,_0x310b10){_0x2b1417=_0x2b1417-0x18b;const _0x12ef26=a227_0x12ef();let _0x311a8d=_0x12ef26[_0x2b1417];return _0x311a8d;}export const roleUserRemove={'service':a227_0x39bf9b(0x18c),'command':a227_0x39bf9b(0x196),'description':'Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','risk':a227_0x39bf9b(0x195),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x5542ce){const _0x103701=a227_0x39bf9b,{mutation:_0x41ac39}=await prepareUserMutation(_0x5542ce,_0x103701(0x196),!![]);return asDryRunResult(_0x41ac39,{'method':_0x103701(0x19c),'url':DELETE_USER_ROLE_PATH});},async 'execute'(_0x33ba46){const _0x284fc2=a227_0x39bf9b,{matchingRelationIds:_0x4f856e,mutation:_0x325871,changed:_0x3bc160}=await prepareUserMutation(_0x33ba46,'user-remove',![]);if(_0x3bc160)for(const _0x404385 of _0x4f856e){await deleteDevUserRole(_0x404385);}return{'ok':!![],'data':_0x325871,'message':_0x3bc160?_0x284fc2(0x19d)+_0x325871[_0x284fc2(0x193)][_0x284fc2(0x191)]+_0x284fc2(0x18d)+_0x325871[_0x284fc2(0x193)][_0x284fc2(0x19a)]:_0x284fc2(0x18e)+_0x325871['selector'][_0x284fc2(0x191)]+_0x284fc2(0x190)+_0x325871[_0x284fc2(0x193)][_0x284fc2(0x19a)]};}};
@@ -1 +1 @@
1
- const a228_0x49122d=a228_0x15fc;(function(_0x353e11,_0x371e47){const _0xe0cdc3=a228_0x15fc,_0x3744c3=_0x353e11();while(!![]){try{const _0x82d6a0=parseInt(_0xe0cdc3(0xc1))/0x1+-parseInt(_0xe0cdc3(0xc0))/0x2*(parseInt(_0xe0cdc3(0xc5))/0x3)+parseInt(_0xe0cdc3(0xbc))/0x4*(-parseInt(_0xe0cdc3(0xc3))/0x5)+-parseInt(_0xe0cdc3(0xc4))/0x6*(parseInt(_0xe0cdc3(0xb3))/0x7)+parseInt(_0xe0cdc3(0xbb))/0x8*(parseInt(_0xe0cdc3(0xba))/0x9)+-parseInt(_0xe0cdc3(0xbd))/0xa*(-parseInt(_0xe0cdc3(0xb6))/0xb)+parseInt(_0xe0cdc3(0xb1))/0xc*(parseInt(_0xe0cdc3(0xbf))/0xd);if(_0x82d6a0===_0x371e47)break;else _0x3744c3['push'](_0x3744c3['shift']());}catch(_0x447342){_0x3744c3['push'](_0x3744c3['shift']());}}}(a228_0x4012,0x89347));import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a228_0x15fc(_0x21f1f8,_0x59be71){_0x21f1f8=_0x21f1f8-0xb0;const _0x4012b5=a228_0x4012();let _0x15fcd3=_0x4012b5[_0x21f1f8];return _0x15fcd3;}function a228_0x4012(){const _0x256d18=['54700DSgmGE','12JJrEJf','63HtKyYn','flagMissing','role','565800RdikPv','str','3839087PqMBil','username','userId','112596VRlYCd','read','Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.','Resolved\x20\x22','205047pwghQv','232nPGIdc','80zxlQQx','70yjdxLu','\x22\x20→\x20userId\x20','351BkrhMS','63698rijWaF','541093lIwMLz','trim'];a228_0x4012=function(){return _0x256d18;};return a228_0x4012();}import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';export const roleUserResolve={'service':a228_0x49122d(0xb0),'command':'user-resolve','description':'Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','risk':a228_0x49122d(0xb7),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x26d4d7){const _0x230382=a228_0x49122d;if(!_0x26d4d7[_0x230382(0xb2)]('name')[_0x230382(0xc2)]())throw CliErrors[_0x230382(0xc6)]('name','Pass\x20--name\x20<nickname|username>.');},async 'execute'(_0x7547e3){const _0x516e54=a228_0x49122d,_0x26750c=_0x7547e3[_0x516e54(0xb2)]('name')['trim'](),_0x402ce8=await resolveUserRef(_0x26750c,_0x516e54(0xb8));return{'ok':!![],'data':{'user':{'userId':_0x402ce8[_0x516e54(0xb5)],'username':_0x402ce8[_0x516e54(0xb4)],'nickname':_0x402ce8['nickname'],'matchedBy':_0x402ce8['matchedBy']}},'message':_0x516e54(0xb9)+_0x26750c+_0x516e54(0xbe)+_0x402ce8[_0x516e54(0xb5)]};}};
1
+ const a228_0x3a5805=a228_0x151a;(function(_0x1cd5dc,_0x6e6ba4){const _0x354320=a228_0x151a,_0x7aa84e=_0x1cd5dc();while(!![]){try{const _0x351028=-parseInt(_0x354320(0x1f9))/0x1+parseInt(_0x354320(0x202))/0x2+parseInt(_0x354320(0x1fb))/0x3+parseInt(_0x354320(0x203))/0x4*(parseInt(_0x354320(0x206))/0x5)+parseInt(_0x354320(0x1f3))/0x6*(parseInt(_0x354320(0x1f4))/0x7)+-parseInt(_0x354320(0x1f2))/0x8*(parseInt(_0x354320(0x1fc))/0x9)+-parseInt(_0x354320(0x1fa))/0xa;if(_0x351028===_0x6e6ba4)break;else _0x7aa84e['push'](_0x7aa84e['shift']());}catch(_0x48893e){_0x7aa84e['push'](_0x7aa84e['shift']());}}}(a228_0x2d8d,0xb34e2));import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a228_0x151a(_0xf78f98,_0xb1c517){_0xf78f98=_0xf78f98-0x1f0;const _0x2d8d27=a228_0x2d8d();let _0x151a24=_0x2d8d27[_0xf78f98];return _0x151a24;}import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';function a228_0x2d8d(){const _0x4f3f37=['38322gviEvE','matchedBy','nickname','Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.','role','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','1432828Mclnqy','5785204rXXVjs','Resolved\x20\x22','flagMissing','5lfRMYg','trim','read','520MxObQZ','583014rXymTV','7ueUNKB','name','str','\x22\x20→\x20userId\x20','Pass\x20--name\x20<nickname|username>.','1306878kDyCey','6901640QDySIR','2245086GZiTGD'];a228_0x2d8d=function(){return _0x4f3f37;};return a228_0x2d8d();}export const roleUserResolve={'service':a228_0x3a5805(0x200),'command':'user-resolve','description':a228_0x3a5805(0x201),'risk':a228_0x3a5805(0x1f1),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1f7dd5){const _0x45a248=a228_0x3a5805;if(!_0x1f7dd5[_0x45a248(0x1f6)](_0x45a248(0x1f5))['trim']())throw CliErrors[_0x45a248(0x205)](_0x45a248(0x1f5),_0x45a248(0x1f8));},async 'execute'(_0x2c8d51){const _0x4b83b7=a228_0x3a5805,_0xa6badb=_0x2c8d51[_0x4b83b7(0x1f6)](_0x4b83b7(0x1f5))[_0x4b83b7(0x1f0)](),_0x4e09d4=await resolveUserRef(_0xa6badb,_0x4b83b7(0x1ff));return{'ok':!![],'data':{'user':{'userId':_0x4e09d4['userId'],'username':_0x4e09d4['username'],'nickname':_0x4e09d4[_0x4b83b7(0x1fe)],'matchedBy':_0x4e09d4[_0x4b83b7(0x1fd)]}},'message':_0x4b83b7(0x204)+_0xa6badb+_0x4b83b7(0x1f7)+_0x4e09d4['userId']};}};
@@ -1 +1 @@
1
- const a229_0xbf1087=a229_0x4e91;function a229_0xb586(){const _0x445055=['appCode','Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app','132674sLqKsu','\x20for\x20','Loaded\x20','6ghkjWN','2871918vgvphc','read','Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20','1724716qyKhPZ','4092SyEwUn','cookie','3041950jynViO','8GIfpRS','906SnZcyC','26356462nzeWsX','6ocrGaq','app_rule_not_found','content','2556495LYUPDQ','\x20is\x20not\x20configured\x20for\x20app\x20'];a229_0xb586=function(){return _0x445055;};return a229_0xb586();}(function(_0x51711a,_0x569031){const _0x5c92e0=a229_0x4e91,_0x39f7c8=_0x51711a();while(!![]){try{const _0xc35f74=-parseInt(_0x5c92e0(0xd2))/0x1*(parseInt(_0x5c92e0(0xd5))/0x2)+parseInt(_0x5c92e0(0xc9))/0x3*(-parseInt(_0x5c92e0(0xc5))/0x4)+parseInt(_0x5c92e0(0xce))/0x5*(-parseInt(_0x5c92e0(0xcb))/0x6)+-parseInt(_0x5c92e0(0xd9))/0x7+-parseInt(_0x5c92e0(0xc8))/0x8*(parseInt(_0x5c92e0(0xd6))/0x9)+-parseInt(_0x5c92e0(0xc7))/0xa+parseInt(_0x5c92e0(0xca))/0xb;if(_0xc35f74===_0x569031)break;else _0x39f7c8['push'](_0x39f7c8['shift']());}catch(_0x209fb4){_0x39f7c8['push'](_0x39f7c8['shift']());}}}(a229_0xb586,0x4b37a));function a229_0x4e91(_0xe37ad9,_0x373abe){_0xe37ad9=_0xe37ad9-0xc5;const _0xb5864=a229_0xb586();let _0x4e91d1=_0xb5864[_0xe37ad9];return _0x4e91d1;}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':'rule','command':'get','description':a229_0xbf1087(0xd1),'risk':a229_0xbf1087(0xd7),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0x2ba519){readAppRuleType(_0x2ba519);},async 'execute'(_0x27a4c4){const _0x59bedd=a229_0xbf1087,_0x1fcbf0=readAppRuleType(_0x27a4c4),_0x53f630=await getAppRule(_0x27a4c4[_0x59bedd(0xc6)],{'appCode':_0x27a4c4[_0x59bedd(0xd0)],'type':_0x1fcbf0});if(!_0x53f630)throw appRuleError(_0x59bedd(0xcc),appRuleFileName(_0x1fcbf0)+_0x59bedd(0xcf)+_0x27a4c4[_0x59bedd(0xd0)]+'.',_0x59bedd(0xd8)+_0x1fcbf0+'\x20--file\x20<path>\x20--dry-run`.');return{'ok':!![],'data':{'rule':{...projectAppRule(_0x1fcbf0,_0x53f630),'content':_0x53f630[_0x59bedd(0xcd)]}},'message':_0x59bedd(0xd4)+appRuleFileName(_0x1fcbf0)+_0x59bedd(0xd3)+_0x27a4c4[_0x59bedd(0xd0)]};}};
1
+ function a229_0x4ceb(){const _0x6c45d7=['13660641XWDDqc','read','5499rJgaln','3093910anurAS','926112RLKCiq','Loaded\x20','content','\x20is\x20not\x20configured\x20for\x20app\x20','2000WefNDD','Create\x20it\x20with\x20`rabetbase\x20rule\x20set\x20--type\x20','appCode','Get\x20one\x20agent\x20context\x20rule\x20for\x20the\x20resolved\x20app','\x20for\x20','31395zZqvDe','2919008PObvLW','158nzGOLT','rule','450078qpvPqD'];a229_0x4ceb=function(){return _0x6c45d7;};return a229_0x4ceb();}const a229_0x47af6d=a229_0x440e;(function(_0x26ea98,_0x3e249b){const _0x6026ac=a229_0x440e,_0x48aeb3=_0x26ea98();while(!![]){try{const _0x4f99f0=-parseInt(_0x6026ac(0xcb))/0x1+parseInt(_0x6026ac(0xc4))/0x2*(parseInt(_0x6026ac(0xc9))/0x3)+-parseInt(_0x6026ac(0xc3))/0x4+-parseInt(_0x6026ac(0xca))/0x5+parseInt(_0x6026ac(0xc6))/0x6+-parseInt(_0x6026ac(0xc2))/0x7*(-parseInt(_0x6026ac(0xbd))/0x8)+parseInt(_0x6026ac(0xc7))/0x9;if(_0x4f99f0===_0x3e249b)break;else _0x48aeb3['push'](_0x48aeb3['shift']());}catch(_0x24a2de){_0x48aeb3['push'](_0x48aeb3['shift']());}}}(a229_0x4ceb,0x8ea51));function a229_0x440e(_0x5646cd,_0x258242){_0x5646cd=_0x5646cd-0xbb;const _0x4ceb39=a229_0x4ceb();let _0x440e42=_0x4ceb39[_0x5646cd];return _0x440e42;}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':a229_0x47af6d(0xc5),'command':'get','description':a229_0x47af6d(0xc0),'risk':a229_0x47af6d(0xc8),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG],async 'validate'(_0x573013){readAppRuleType(_0x573013);},async 'execute'(_0x39d82f){const _0x4b35cb=a229_0x47af6d,_0x5212db=readAppRuleType(_0x39d82f),_0x2fed62=await getAppRule(_0x39d82f['cookie'],{'appCode':_0x39d82f['appCode'],'type':_0x5212db});if(!_0x2fed62)throw appRuleError('app_rule_not_found',appRuleFileName(_0x5212db)+_0x4b35cb(0xbc)+_0x39d82f[_0x4b35cb(0xbf)]+'.',_0x4b35cb(0xbe)+_0x5212db+'\x20--file\x20<path>\x20--dry-run`.');return{'ok':!![],'data':{'rule':{...projectAppRule(_0x5212db,_0x2fed62),'content':_0x2fed62[_0x4b35cb(0xbb)]}},'message':_0x4b35cb(0xcc)+appRuleFileName(_0x5212db)+_0x4b35cb(0xc1)+_0x39d82f[_0x4b35cb(0xbf)]};}};
@@ -1 +1 @@
1
- (function(_0x530105,_0x507c8d){const _0xa4246b=a230_0x2b2a,_0x515c70=_0x530105();while(!![]){try{const _0xec0721=parseInt(_0xa4246b(0x19f))/0x1*(parseInt(_0xa4246b(0x1a1))/0x2)+parseInt(_0xa4246b(0x1a7))/0x3+parseInt(_0xa4246b(0x1a2))/0x4*(parseInt(_0xa4246b(0x1a6))/0x5)+-parseInt(_0xa4246b(0x1a5))/0x6+-parseInt(_0xa4246b(0x19e))/0x7+-parseInt(_0xa4246b(0x1a4))/0x8*(-parseInt(_0xa4246b(0x1a0))/0x9)+-parseInt(_0xa4246b(0x1a3))/0xa;if(_0xec0721===_0x507c8d)break;else _0x515c70['push'](_0x515c70['shift']());}catch(_0x3f8086){_0x515c70['push'](_0x515c70['shift']());}}}(a230_0x39e5,0xcd94e));import{ruleGet}from'../../commands/rule/get.js';import{ruleList}from'../../commands/rule/list.js';function a230_0x2b2a(_0x3a6cea,_0x146542){_0x3a6cea=_0x3a6cea-0x19e;const _0x39e5f8=a230_0x39e5();let _0x2b2acc=_0x39e5f8[_0x3a6cea];return _0x2b2acc;}import{ruleSet}from'../../commands/rule/set.js';function a230_0x39e5(){const _0x105e2b=['2624532PDAUCS','155nLnyut','4918278iXwtNH','8958978mWiosl','34PGoMrI','1431uRRSsA','92930PAuLEO','210932RGIEXv','36529580dhVUyJ','68344fYPezJ'];a230_0x39e5=function(){return _0x105e2b;};return a230_0x39e5();}export const ruleDefinitions=[ruleList,ruleGet,ruleSet];
1
+ function a230_0x5b9a(_0x14c777,_0x4b7a47){_0x14c777=_0x14c777-0x1e2;const _0x558598=a230_0x5585();let _0x5b9aa2=_0x558598[_0x14c777];return _0x5b9aa2;}function a230_0x5585(){const _0x32f302=['1556224SOBKsV','75GiKuoS','1526744EfRXUU','430588TJmfRU','130upRpvg','3110715JoSHVC','1456355JierAs','1064106wInFvt','56KKJWhj','3459705CTryfl'];a230_0x5585=function(){return _0x32f302;};return a230_0x5585();}(function(_0x443add,_0x164124){const _0xd524fa=a230_0x5b9a,_0x3e0946=_0x443add();while(!![]){try{const _0x2989e6=-parseInt(_0xd524fa(0x1eb))/0x1+-parseInt(_0xd524fa(0x1e5))/0x2+-parseInt(_0xd524fa(0x1e4))/0x3+parseInt(_0xd524fa(0x1e8))/0x4*(-parseInt(_0xd524fa(0x1e6))/0x5)+-parseInt(_0xd524fa(0x1e2))/0x6+-parseInt(_0xd524fa(0x1e3))/0x7*(-parseInt(_0xd524fa(0x1e7))/0x8)+-parseInt(_0xd524fa(0x1ea))/0x9*(-parseInt(_0xd524fa(0x1e9))/0xa);if(_0x2989e6===_0x164124)break;else _0x3e0946['push'](_0x3e0946['shift']());}catch(_0x59bd2a){_0x3e0946['push'](_0x3e0946['shift']());}}}(a230_0x5585,0xcd231));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];