@lovrabet/rabetbase-cli 2.5.1-beta.2 → 2.5.1-beta.3

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 (314) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/api/generate-sdk-config-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/delete.js +1 -1
  53. package/lib/commands/config/get.js +1 -1
  54. package/lib/commands/config/index.js +1 -1
  55. package/lib/commands/config/init.d.ts +1 -1
  56. package/lib/commands/config/init.js +1 -1
  57. package/lib/commands/config/list.js +1 -1
  58. package/lib/commands/config/set.js +1 -1
  59. package/lib/commands/config/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/business-groups.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-restore.js +1 -1
  67. package/lib/commands/dataset/field-update.js +1 -1
  68. package/lib/commands/dataset/generate.js +1 -1
  69. package/lib/commands/dataset/index.js +1 -1
  70. package/lib/commands/dataset/list.js +1 -1
  71. package/lib/commands/dataset/operations.js +1 -1
  72. package/lib/commands/dataset/relation-audit.js +1 -1
  73. package/lib/commands/dataset/relation-create.js +1 -1
  74. package/lib/commands/dataset/relation-delete.js +1 -1
  75. package/lib/commands/dataset/relation-shared.js +1 -1
  76. package/lib/commands/dataset/relation-update.js +1 -1
  77. package/lib/commands/dataset/relations.js +1 -1
  78. package/lib/commands/dataset/rename.js +1 -1
  79. package/lib/commands/dataset/restore.js +1 -1
  80. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  81. package/lib/commands/db/analysis-batching.js +1 -1
  82. package/lib/commands/db/analyze-batch-plan.js +1 -1
  83. package/lib/commands/db/analyze-cancel.js +1 -1
  84. package/lib/commands/db/analyze-start.js +1 -1
  85. package/lib/commands/db/analyze-status.js +1 -1
  86. package/lib/commands/db/create.js +1 -1
  87. package/lib/commands/db/delete.js +1 -1
  88. package/lib/commands/db/detail.js +1 -1
  89. package/lib/commands/db/diff-refresh-start.js +1 -1
  90. package/lib/commands/db/diff-refresh-status.js +1 -1
  91. package/lib/commands/db/diff.js +1 -1
  92. package/lib/commands/db/index.js +1 -1
  93. package/lib/commands/db/list.js +1 -1
  94. package/lib/commands/db/shared.js +1 -1
  95. package/lib/commands/db/table-diff-shared.js +1 -1
  96. package/lib/commands/db/tables.js +1 -1
  97. package/lib/commands/db/test.js +1 -1
  98. package/lib/commands/db/update.js +1 -1
  99. package/lib/commands/deployment/auto-sync.js +1 -1
  100. package/lib/commands/deployment/index.js +1 -1
  101. package/lib/commands/deployment/sync.js +1 -1
  102. package/lib/commands/doctor.js +1 -1
  103. package/lib/commands/file/index.js +1 -1
  104. package/lib/commands/issue/index.js +1 -1
  105. package/lib/commands/issue/nudge.js +1 -1
  106. package/lib/commands/issue/report.js +1 -1
  107. package/lib/commands/issue/shared.js +1 -1
  108. package/lib/commands/kb/create.js +1 -1
  109. package/lib/commands/kb/delete.js +1 -1
  110. package/lib/commands/kb/detail.js +1 -1
  111. package/lib/commands/kb/index.js +1 -1
  112. package/lib/commands/kb/list.js +1 -1
  113. package/lib/commands/kb/search.js +1 -1
  114. package/lib/commands/kb/shared.js +1 -1
  115. package/lib/commands/kb/update.js +1 -1
  116. package/lib/commands/logs/index.js +1 -1
  117. package/lib/commands/menu/asset-update.js +1 -1
  118. package/lib/commands/menu/delete.js +1 -1
  119. package/lib/commands/menu/external-link-create.js +1 -1
  120. package/lib/commands/menu/external-link-update.js +1 -1
  121. package/lib/commands/menu/group-create.js +1 -1
  122. package/lib/commands/menu/group-update.js +1 -1
  123. package/lib/commands/menu/index.js +1 -1
  124. package/lib/commands/menu/list.js +1 -1
  125. package/lib/commands/menu/move.js +1 -1
  126. package/lib/commands/menu/regroup-start.js +1 -1
  127. package/lib/commands/menu/rename.js +1 -1
  128. package/lib/commands/menu/shared/compare-table.js +1 -1
  129. package/lib/commands/menu/shared/delete-plan.js +1 -1
  130. package/lib/commands/menu/shared/facts.js +1 -1
  131. package/lib/commands/menu/shared/index.js +1 -1
  132. package/lib/commands/menu/shared/inquirer.js +1 -1
  133. package/lib/commands/menu/shared/local-pages.js +1 -1
  134. package/lib/commands/menu/shared/logic.js +1 -1
  135. package/lib/commands/menu/shared/mutations.js +1 -1
  136. package/lib/commands/menu/shared/service.js +1 -1
  137. package/lib/commands/menu/shared/sync-core.js +1 -1
  138. package/lib/commands/menu/shared/update-core.js +1 -1
  139. package/lib/commands/menu/shared/valid-url.js +1 -1
  140. package/lib/commands/menu/sync.js +1 -1
  141. package/lib/commands/menu/visibility-update.js +1 -1
  142. package/lib/commands/notification/config-create.js +1 -1
  143. package/lib/commands/notification/config-delete.js +1 -1
  144. package/lib/commands/notification/config-list.js +1 -1
  145. package/lib/commands/notification/config-update.js +1 -1
  146. package/lib/commands/notification/index.js +1 -1
  147. package/lib/commands/notification/shared.js +1 -1
  148. package/lib/commands/ocr/index.js +1 -1
  149. package/lib/commands/page/create.js +1 -1
  150. package/lib/commands/page/custom/detail.js +1 -1
  151. package/lib/commands/page/custom/list.js +1 -1
  152. package/lib/commands/page/custom/publish.js +1 -1
  153. package/lib/commands/page/custom/shared.js +1 -1
  154. package/lib/commands/page/custom/syntax.js +1 -1
  155. package/lib/commands/page/custom/template.js +1 -1
  156. package/lib/commands/page/custom/update.js +1 -1
  157. package/lib/commands/page/data-list-status.js +1 -1
  158. package/lib/commands/page/generate-start.js +1 -1
  159. package/lib/commands/page/generate-status.js +1 -1
  160. package/lib/commands/page/index.js +1 -1
  161. package/lib/commands/page/pull.js +1 -1
  162. package/lib/commands/page/push.js +1 -1
  163. package/lib/commands/page/relation-audit.js +1 -1
  164. package/lib/commands/page/restore.js +1 -1
  165. package/lib/commands/page/shared.js +1 -1
  166. package/lib/commands/page/sync.js +1 -1
  167. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  168. package/lib/commands/project/create/format-elapsed.js +1 -1
  169. package/lib/commands/project/create/main.js +1 -1
  170. package/lib/commands/project/create/materialize-project-template.js +1 -1
  171. package/lib/commands/project/create/project-name.js +1 -1
  172. package/lib/commands/project/create/project-template-archive.js +1 -1
  173. package/lib/commands/project/create/project-template-path.js +1 -1
  174. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  175. package/lib/commands/project/create/use-format-code.js +1 -1
  176. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  177. package/lib/commands/project/index.js +1 -1
  178. package/lib/commands/project/upgrade.js +1 -1
  179. package/lib/commands/registry.js +1 -1
  180. package/lib/commands/role/delete.js +1 -1
  181. package/lib/commands/role/detail.js +1 -1
  182. package/lib/commands/role/index.js +1 -1
  183. package/lib/commands/role/list.js +1 -1
  184. package/lib/commands/role/shared.js +1 -1
  185. package/lib/commands/role/update.js +1 -1
  186. package/lib/commands/role/user-add.js +1 -1
  187. package/lib/commands/role/user-remove.js +1 -1
  188. package/lib/commands/role/user-resolve.js +1 -1
  189. package/lib/commands/run/index.js +1 -1
  190. package/lib/commands/schema.js +1 -1
  191. package/lib/commands/sql/create.js +1 -1
  192. package/lib/commands/sql/delete.js +1 -1
  193. package/lib/commands/sql/detail.js +1 -1
  194. package/lib/commands/sql/exec.js +1 -1
  195. package/lib/commands/sql/index.js +1 -1
  196. package/lib/commands/sql/list.js +1 -1
  197. package/lib/commands/sql/pull.js +1 -1
  198. package/lib/commands/sql/push.js +1 -1
  199. package/lib/commands/sql/shared.js +1 -1
  200. package/lib/commands/sql/status.js +1 -1
  201. package/lib/commands/sql/validate.js +1 -1
  202. package/lib/commands/task/index.js +1 -1
  203. package/lib/commands/task/status.js +1 -1
  204. package/lib/commands/tenant/index.js +1 -1
  205. package/lib/commands/tenant/members-list.js +1 -1
  206. package/lib/commands/tenant/shared.js +1 -1
  207. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  208. package/lib/commands/user-account/index.js +1 -1
  209. package/lib/commands/workspace/add.js +1 -1
  210. package/lib/commands/workspace/index.js +1 -1
  211. package/lib/commands/workspace/remove.js +1 -1
  212. package/lib/config/deployment-sync.js +1 -1
  213. package/lib/config/domain-config.d.ts +1 -1
  214. package/lib/config/domain-config.js +1 -1
  215. package/lib/config/project-routing.js +1 -1
  216. package/lib/config/schema.d.ts +1 -1
  217. package/lib/config/schema.js +1 -1
  218. package/lib/constant/cdn.js +1 -1
  219. package/lib/constant/cli.js +1 -1
  220. package/lib/constant/defaults.js +1 -1
  221. package/lib/constant/domain.d.ts +2 -0
  222. package/lib/constant/domain.js +1 -1
  223. package/lib/constant/env.js +1 -1
  224. package/lib/constant/output.js +1 -1
  225. package/lib/constant/paths.js +1 -1
  226. package/lib/constant/region.js +1 -1
  227. package/lib/constant/risk.js +1 -1
  228. package/lib/constant/routing-profile.js +1 -1
  229. package/lib/context/app-resolver.js +1 -1
  230. package/lib/context/auth-resolver.js +1 -1
  231. package/lib/context/config-loader.js +1 -1
  232. package/lib/context.js +1 -1
  233. package/lib/core/alias-resolver.js +1 -1
  234. package/lib/core/api-client.d.ts +0 -16
  235. package/lib/core/api-client.js +1 -1
  236. package/lib/core/bff/config.js +1 -1
  237. package/lib/core/bff/file-system.js +1 -1
  238. package/lib/core/bff/hash.js +1 -1
  239. package/lib/core/bff/lock.js +1 -1
  240. package/lib/core/bff/utils.js +1 -1
  241. package/lib/core/db-resolver.js +1 -1
  242. package/lib/core/kb-search-client.d.ts +30 -0
  243. package/lib/core/kb-search-client.js +1 -0
  244. package/lib/core/page/file-system.js +1 -1
  245. package/lib/core/page/hash.js +1 -1
  246. package/lib/core/page/lock.js +1 -1
  247. package/lib/core/sql-index-auditor.js +1 -1
  248. package/lib/core/sql-sync/config.js +1 -1
  249. package/lib/core/sql-sync/file-system.js +1 -1
  250. package/lib/core/sql-sync/hash.js +1 -1
  251. package/lib/core/sql-sync/lock.js +1 -1
  252. package/lib/core/sql-sync/utils.js +1 -1
  253. package/lib/core/sql-validator.js +1 -1
  254. package/lib/errors.js +1 -1
  255. package/lib/framework/build-all-flags.js +1 -1
  256. package/lib/framework/error-output.js +1 -1
  257. package/lib/framework/explicit-yes.js +1 -1
  258. package/lib/framework/flags.js +1 -1
  259. package/lib/framework/help.js +1 -1
  260. package/lib/framework/index.js +1 -1
  261. package/lib/framework/output.js +1 -1
  262. package/lib/framework/response.js +1 -1
  263. package/lib/framework/runner-alias.js +1 -1
  264. package/lib/framework/runner.js +1 -1
  265. package/lib/framework/schema-export.js +1 -1
  266. package/lib/framework/types.d.ts +1 -0
  267. package/lib/framework/types.js +1 -1
  268. package/lib/generated/build-info.d.ts +4 -4
  269. package/lib/generated/build-info.js +1 -1
  270. package/lib/help.js +1 -1
  271. package/lib/postinstall.js +1 -1
  272. package/lib/runtime/confirmation.js +1 -1
  273. package/lib/runtime/event.js +1 -1
  274. package/lib/runtime/index.js +1 -1
  275. package/lib/runtime/queue.js +1 -1
  276. package/lib/runtime/resolve.js +1 -1
  277. package/lib/skills/builtin-skill.js +1 -1
  278. package/lib/skills/main.js +1 -1
  279. package/lib/skills/npx-skills-add.js +1 -1
  280. package/lib/skills/skill-presence.js +1 -1
  281. package/lib/telemetry/cli-command-trace.js +1 -1
  282. package/lib/telemetry/cli-help-trace.js +1 -1
  283. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  284. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  285. package/lib/telemetry/send-cli-trace-log.js +1 -1
  286. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  287. package/lib/utils/ai_config.js +1 -1
  288. package/lib/utils/apply-jq-filter.js +1 -1
  289. package/lib/utils/cdn-config.js +1 -1
  290. package/lib/utils/check-sdk-version.js +1 -1
  291. package/lib/utils/cli-version-check.js +1 -1
  292. package/lib/utils/cli-version-policy.js +1 -1
  293. package/lib/utils/config.js +1 -1
  294. package/lib/utils/entity-with-id.js +1 -1
  295. package/lib/utils/file-utils.js +1 -1
  296. package/lib/utils/guides-cdn.js +1 -1
  297. package/lib/utils/http-client.js +1 -1
  298. package/lib/utils/is-non-interactive.js +1 -1
  299. package/lib/utils/logger.js +1 -1
  300. package/lib/utils/params.js +1 -1
  301. package/lib/utils/platform.js +1 -1
  302. package/lib/utils/sleep.js +1 -1
  303. package/lib/utils/template-replacer.js +1 -1
  304. package/lib/utils/update-notice.js +1 -1
  305. package/lib/utils/version.js +1 -1
  306. package/lib/utils/with-active-cookie.js +1 -1
  307. package/lib/utils/write-cli-side-channel.js +1 -1
  308. package/package.json +1 -1
  309. package/skills/rabetbase/SKILL.md +2 -2
  310. package/skills/rabetbase/references/rabetbase-config.md +4 -1
  311. package/skills/rabetbase/references/rabetbase-doctor.md +1 -1
  312. package/skills/rabetbase/references/rabetbase-init.md +2 -0
  313. package/skills/rabetbase/references/rabetbase-kb.md +7 -7
  314. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- (function(_0x4e06c3,_0x27d9d8){const _0x1cdda5=a171_0x4d81,_0xbf066=_0x4e06c3();while(!![]){try{const _0xa3b27b=parseInt(_0x1cdda5(0x19b))/0x1+-parseInt(_0x1cdda5(0x1b1))/0x2+parseInt(_0x1cdda5(0x193))/0x3*(parseInt(_0x1cdda5(0x1b6))/0x4)+-parseInt(_0x1cdda5(0x1af))/0x5+parseInt(_0x1cdda5(0x1b0))/0x6*(-parseInt(_0x1cdda5(0x192))/0x7)+-parseInt(_0x1cdda5(0x1b3))/0x8+parseInt(_0x1cdda5(0x1a1))/0x9*(parseInt(_0x1cdda5(0x1aa))/0xa);if(_0xa3b27b===_0x27d9d8)break;else _0xbf066['push'](_0xbf066['shift']());}catch(_0x47b8c5){_0xbf066['push'](_0xbf066['shift']());}}}(a171_0x4a9e,0xcfa9b));import{createWriteStream}from'node:fs';function a171_0x4a9e(){const _0x5f315a=['toLocaleLowerCase','openReadStream','endsWith','startsWith','uncompressedSize','fileName','1435958TcHzuU','Unable\x20to\x20open\x20project\x20template\x20archive.','once','test','add','Project\x20template\x20ZIP\x20exceeds\x20','6816006UXxNvs','mkdir','Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20','Unable\x20to\x20read\x20ZIP\x20entry:\x20','open','split','resolve','entry','readEntry','50ipZdae','sep','error','en-US','isEncrypted','6172335cnutXW','112740fcbOta','2260980DZwWKD','Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20','12700296SbShUm','length','dirname','68QWoPKi','Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20','Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20','slice','Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20','externalFileAttributes','join','553fBhYXo','187917SNfSnR','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.'];a171_0x4a9e=function(){return _0x5f315a;};return a171_0x4a9e();}import a171_0x531141 from'node:fs/promises';import a171_0x205fa1 from'node:path';import{pipeline}from'node:stream/promises';import a171_0x2ef305 from'yauzl';const MAX_ENTRY_COUNT=0x7d0,MAX_UNCOMPRESSED_SIZE=0x32*0x400*0x400,WINDOWS_RESERVED_NAME=/^(con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\..*)?$/i,WINDOWS_INVALID_CHAR=/[<>:"|?*\x00-\x1f]/;function openZip(_0x4c97dc){return new Promise((_0x2f9598,_0x318992)=>{const _0x3e0f3f=a171_0x4d81;a171_0x2ef305[_0x3e0f3f(0x1a5)](_0x4c97dc,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x2fd9a2,_0x5930f9)=>{const _0x5c1250=_0x3e0f3f;if(_0x2fd9a2||!_0x5930f9){_0x318992(_0x2fd9a2||new Error(_0x5c1250(0x19c)));return;}_0x2f9598(_0x5930f9);});});}function a171_0x4d81(_0x5aca8f,_0x316784){_0x5aca8f=_0x5aca8f-0x18c;const _0x4a9e2a=a171_0x4a9e();let _0x4d81cd=_0x4a9e2a[_0x5aca8f];return _0x4d81cd;}function openEntryStream(_0x3d87f6,_0x59927e){return new Promise((_0x44f4d0,_0x1872de)=>{const _0x491eb3=a171_0x4d81;_0x3d87f6[_0x491eb3(0x196)](_0x59927e,(_0x32f263,_0x99b4e1)=>{const _0x2bb6ba=_0x491eb3;if(_0x32f263||!_0x99b4e1){_0x1872de(_0x32f263||new Error(_0x2bb6ba(0x1a4)+_0x59927e[_0x2bb6ba(0x19a)]));return;}_0x44f4d0(_0x99b4e1);});});}function validateEntryPath(_0x596654){const _0xd057fc=a171_0x4d81,_0x193d17=_0x596654['replace'](/\\/g,'/'),_0x1ee077=_0x193d17[_0xd057fc(0x197)]('/'),_0x286dd3=_0x1ee077?_0x193d17[_0xd057fc(0x18e)](0x0,-0x1):_0x193d17;if(!_0x286dd3||_0x193d17[_0xd057fc(0x198)]('/')||/^[A-Za-z]:\//[_0xd057fc(0x19e)](_0x193d17))throw new Error(_0xd057fc(0x18d)+_0x596654);const _0x1bfe93=_0x286dd3['split']('/');for(const _0x66dc3b of _0x1bfe93){if(!_0x66dc3b||_0x66dc3b==='.'||_0x66dc3b==='..'||_0x66dc3b['endsWith']('.')||_0x66dc3b[_0xd057fc(0x197)]('\x20')||WINDOWS_INVALID_CHAR[_0xd057fc(0x19e)](_0x66dc3b)||WINDOWS_RESERVED_NAME[_0xd057fc(0x19e)](_0x66dc3b))throw new Error(_0xd057fc(0x18c)+_0x596654);}return{'relativePath':_0x1bfe93[_0xd057fc(0x191)](a171_0x205fa1['sep']),'directory':_0x1ee077};}function isSymbolicLink(_0x1be8c9){const _0x33e0f9=a171_0x4d81,_0x5591d7=_0x1be8c9[_0x33e0f9(0x190)]>>>0x10&0xffff;return(_0x5591d7&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0x35478e,_0x3ed457){const _0x3a43d1=a171_0x4d81,_0x2e0159=await openZip(_0x35478e),_0x1c57e9=a171_0x205fa1[_0x3a43d1(0x1a7)](_0x3ed457),_0xaa3856=new Set(),_0x4659bf=new Map();let _0x3f75a1=0x0,_0x478b48=0x0;await a171_0x531141[_0x3a43d1(0x1a2)](_0x1c57e9,{'recursive':!![]}),await new Promise((_0x9a4ad4,_0x1121ec)=>{const _0x3e563e=_0x3a43d1;let _0x345ad3=![];const _0x4aab27=_0x4d3570=>{if(_0x345ad3)return;_0x345ad3=!![],_0x2e0159['close'](),_0x1121ec(_0x4d3570 instanceof Error?_0x4d3570:new Error(String(_0x4d3570)));};_0x2e0159[_0x3e563e(0x19d)](_0x3e563e(0x1ac),_0x4aab27),_0x2e0159['once']('end',()=>{if(_0x345ad3)return;_0x345ad3=!![],_0x9a4ad4();}),_0x2e0159['on'](_0x3e563e(0x1a8),_0x2ff9dc=>{void(async()=>{const _0x15e884=a171_0x4d81;_0x3f75a1+=0x1,_0x478b48+=_0x2ff9dc[_0x15e884(0x199)];if(_0x3f75a1>MAX_ENTRY_COUNT)throw new Error(_0x15e884(0x1a0)+MAX_ENTRY_COUNT+'\x20entries.');if(_0x478b48>MAX_UNCOMPRESSED_SIZE)throw new Error(_0x15e884(0x194));if(_0x2ff9dc[_0x15e884(0x1ae)]())throw new Error(_0x15e884(0x18f)+_0x2ff9dc[_0x15e884(0x19a)]);if(isSymbolicLink(_0x2ff9dc))throw new Error(_0x15e884(0x1a3)+_0x2ff9dc[_0x15e884(0x19a)]);const {relativePath:_0x2ae76d,directory:_0x4fbdae}=validateEntryPath(_0x2ff9dc[_0x15e884(0x19a)]),_0x291ce6=_0x2ae76d[_0x15e884(0x1a6)](a171_0x205fa1[_0x15e884(0x1ab)]);for(let _0x58987a=0x1;_0x58987a<=_0x291ce6[_0x15e884(0x1b4)];_0x58987a+=0x1){const _0x50316d=_0x291ce6[_0x15e884(0x18e)](0x0,_0x58987a)['join'](a171_0x205fa1['sep']),_0x524981=_0x50316d['toLocaleLowerCase']('en-US'),_0x52ee9e=_0x4659bf['get'](_0x524981);if(_0x52ee9e&&_0x52ee9e!==_0x50316d)throw new Error('Case-conflicting\x20ZIP\x20entry\x20path:\x20'+_0x2ff9dc['fileName']);_0x4659bf['set'](_0x524981,_0x50316d);}const _0x15fd39=_0x2ae76d[_0x15e884(0x195)](_0x15e884(0x1ad));if(_0xaa3856['has'](_0x15fd39))throw new Error(_0x15e884(0x1b2)+_0x2ff9dc['fileName']);_0xaa3856[_0x15e884(0x19f)](_0x15fd39);const _0x3339ce=a171_0x205fa1[_0x15e884(0x1a7)](_0x1c57e9,_0x2ae76d);if(_0x3339ce!==_0x1c57e9&&!_0x3339ce[_0x15e884(0x198)](''+_0x1c57e9+a171_0x205fa1[_0x15e884(0x1ab)]))throw new Error('ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20'+_0x2ff9dc[_0x15e884(0x19a)]);if(_0x4fbdae)await a171_0x531141[_0x15e884(0x1a2)](_0x3339ce,{'recursive':!![]});else{await a171_0x531141[_0x15e884(0x1a2)](a171_0x205fa1[_0x15e884(0x1b5)](_0x3339ce),{'recursive':!![]});const _0x509207=await openEntryStream(_0x2e0159,_0x2ff9dc);await pipeline(_0x509207,createWriteStream(_0x3339ce,{'flags':'wx','mode':0x1a4}));}_0x2e0159[_0x15e884(0x1a9)]();})()['catch'](_0x4aab27);}),_0x2e0159[_0x3e563e(0x1a9)]();});}
1
+ (function(_0x13c3be,_0x5276c9){const _0xe0b786=a171_0x5da6,_0x2d7252=_0x13c3be();while(!![]){try{const _0x1137fa=-parseInt(_0xe0b786(0x1ef))/0x1*(parseInt(_0xe0b786(0x1e3))/0x2)+parseInt(_0xe0b786(0x1fb))/0x3*(-parseInt(_0xe0b786(0x1fa))/0x4)+parseInt(_0xe0b786(0x1d1))/0x5+-parseInt(_0xe0b786(0x1de))/0x6+-parseInt(_0xe0b786(0x1d9))/0x7*(parseInt(_0xe0b786(0x1f9))/0x8)+parseInt(_0xe0b786(0x1f8))/0x9*(-parseInt(_0xe0b786(0x1df))/0xa)+-parseInt(_0xe0b786(0x1cf))/0xb*(-parseInt(_0xe0b786(0x1db))/0xc);if(_0x1137fa===_0x5276c9)break;else _0x2d7252['push'](_0x2d7252['shift']());}catch(_0x4eb6a3){_0x2d7252['push'](_0x2d7252['shift']());}}}(a171_0x15b5,0xa5a4f));import{createWriteStream}from'node:fs';import a171_0x2ea070 from'node:fs/promises';import a171_0x5d641c from'node:path';import{pipeline}from'node:stream/promises';function a171_0x15b5(){const _0x46088f=['length','end','fileName','dirname','get','has','136449eQDTFM','15848mcXqyL','181284ZAKvuw','33tEAwxK','openReadStream','en-US','55lgtiVj','error','1884060abMrNf','externalFileAttributes','readEntry','set','Case-conflicting\x20ZIP\x20entry\x20path:\x20','add','Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20','Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20','2275AErsuE','mkdir','8407740WdAcaP','Unable\x20to\x20read\x20ZIP\x20entry:\x20','slice','2968368PboFga','730WBdgdP','close','sep','uncompressedSize','22HotNcX','resolve','entry','endsWith','catch','split','join','startsWith','ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20','once','\x20entries.','Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20','41611CddBFK','Project\x20template\x20ZIP\x20exceeds\x20','test'];a171_0x15b5=function(){return _0x46088f;};return a171_0x15b5();}import a171_0x40f3d3 from'yauzl';const MAX_ENTRY_COUNT=0x7d0,MAX_UNCOMPRESSED_SIZE=0x32*0x400*0x400,WINDOWS_RESERVED_NAME=/^(con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\..*)?$/i,WINDOWS_INVALID_CHAR=/[<>:"|?*\x00-\x1f]/;function openZip(_0x3c5035){return new Promise((_0xe38b83,_0x375b32)=>{a171_0x40f3d3['open'](_0x3c5035,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x10fcf8,_0x5b03d0)=>{if(_0x10fcf8||!_0x5b03d0){_0x375b32(_0x10fcf8||new Error('Unable\x20to\x20open\x20project\x20template\x20archive.'));return;}_0xe38b83(_0x5b03d0);});});}function openEntryStream(_0x429d17,_0x796bc6){return new Promise((_0x1bfa21,_0x246c5a)=>{const _0x5646d3=a171_0x5da6;_0x429d17[_0x5646d3(0x1cd)](_0x796bc6,(_0x349354,_0x2e09cd)=>{const _0x191a7c=_0x5646d3;if(_0x349354||!_0x2e09cd){_0x246c5a(_0x349354||new Error(_0x191a7c(0x1dc)+_0x796bc6['fileName']));return;}_0x1bfa21(_0x2e09cd);});});}function a171_0x5da6(_0x50d41a,_0x4cf656){_0x50d41a=_0x50d41a-0x1cd;const _0x15b504=a171_0x15b5();let _0x5da63d=_0x15b504[_0x50d41a];return _0x5da63d;}function validateEntryPath(_0x4aa55a){const _0x53af79=a171_0x5da6,_0x3707fb=_0x4aa55a['replace'](/\\/g,'/'),_0x21bca0=_0x3707fb['endsWith']('/'),_0x3d886d=_0x21bca0?_0x3707fb[_0x53af79(0x1dd)](0x0,-0x1):_0x3707fb;if(!_0x3d886d||_0x3707fb[_0x53af79(0x1ea)]('/')||/^[A-Za-z]:\//[_0x53af79(0x1f1)](_0x3707fb))throw new Error(_0x53af79(0x1d8)+_0x4aa55a);const _0x3dc4ad=_0x3d886d[_0x53af79(0x1e8)]('/');for(const _0x2fec4b of _0x3dc4ad){if(!_0x2fec4b||_0x2fec4b==='.'||_0x2fec4b==='..'||_0x2fec4b[_0x53af79(0x1e6)]('.')||_0x2fec4b[_0x53af79(0x1e6)]('\x20')||WINDOWS_INVALID_CHAR[_0x53af79(0x1f1)](_0x2fec4b)||WINDOWS_RESERVED_NAME[_0x53af79(0x1f1)](_0x2fec4b))throw new Error('Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20'+_0x4aa55a);}return{'relativePath':_0x3dc4ad[_0x53af79(0x1e9)](a171_0x5d641c['sep']),'directory':_0x21bca0};}function isSymbolicLink(_0x548987){const _0x3d03a4=a171_0x5da6,_0x2d858a=_0x548987[_0x3d03a4(0x1d2)]>>>0x10&0xffff;return(_0x2d858a&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0x334968,_0x3633da){const _0x30bc45=a171_0x5da6,_0x5836aa=await openZip(_0x334968),_0x4d711e=a171_0x5d641c[_0x30bc45(0x1e4)](_0x3633da),_0x1297d0=new Set(),_0x442860=new Map();let _0x5756db=0x0,_0x1fa348=0x0;await a171_0x2ea070[_0x30bc45(0x1da)](_0x4d711e,{'recursive':!![]}),await new Promise((_0x5923ac,_0x77de95)=>{const _0x43ba5b=_0x30bc45;let _0x403a7b=![];const _0x532388=_0x2772e6=>{const _0xc0973e=a171_0x5da6;if(_0x403a7b)return;_0x403a7b=!![],_0x5836aa[_0xc0973e(0x1e0)](),_0x77de95(_0x2772e6 instanceof Error?_0x2772e6:new Error(String(_0x2772e6)));};_0x5836aa[_0x43ba5b(0x1ec)](_0x43ba5b(0x1d0),_0x532388),_0x5836aa[_0x43ba5b(0x1ec)](_0x43ba5b(0x1f3),()=>{if(_0x403a7b)return;_0x403a7b=!![],_0x5923ac();}),_0x5836aa['on'](_0x43ba5b(0x1e5),_0x2d65de=>{const _0x5974f3=_0x43ba5b;void(async()=>{const _0x31aab0=a171_0x5da6;_0x5756db+=0x1,_0x1fa348+=_0x2d65de[_0x31aab0(0x1e2)];if(_0x5756db>MAX_ENTRY_COUNT)throw new Error(_0x31aab0(0x1f0)+MAX_ENTRY_COUNT+_0x31aab0(0x1ed));if(_0x1fa348>MAX_UNCOMPRESSED_SIZE)throw new Error('Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.');if(_0x2d65de['isEncrypted']())throw new Error(_0x31aab0(0x1ee)+_0x2d65de[_0x31aab0(0x1f4)]);if(isSymbolicLink(_0x2d65de))throw new Error(_0x31aab0(0x1d7)+_0x2d65de[_0x31aab0(0x1f4)]);const {relativePath:_0x472beb,directory:_0x2c05c3}=validateEntryPath(_0x2d65de[_0x31aab0(0x1f4)]),_0x4436ed=_0x472beb[_0x31aab0(0x1e8)](a171_0x5d641c[_0x31aab0(0x1e1)]);for(let _0x35a440=0x1;_0x35a440<=_0x4436ed[_0x31aab0(0x1f2)];_0x35a440+=0x1){const _0x2d98af=_0x4436ed[_0x31aab0(0x1dd)](0x0,_0x35a440)[_0x31aab0(0x1e9)](a171_0x5d641c[_0x31aab0(0x1e1)]),_0x2b175f=_0x2d98af['toLocaleLowerCase'](_0x31aab0(0x1ce)),_0x96be6c=_0x442860[_0x31aab0(0x1f6)](_0x2b175f);if(_0x96be6c&&_0x96be6c!==_0x2d98af)throw new Error(_0x31aab0(0x1d5)+_0x2d65de[_0x31aab0(0x1f4)]);_0x442860[_0x31aab0(0x1d4)](_0x2b175f,_0x2d98af);}const _0x34e04a=_0x472beb['toLocaleLowerCase'](_0x31aab0(0x1ce));if(_0x1297d0[_0x31aab0(0x1f7)](_0x34e04a))throw new Error('Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20'+_0x2d65de[_0x31aab0(0x1f4)]);_0x1297d0[_0x31aab0(0x1d6)](_0x34e04a);const _0x1a50cb=a171_0x5d641c[_0x31aab0(0x1e4)](_0x4d711e,_0x472beb);if(_0x1a50cb!==_0x4d711e&&!_0x1a50cb[_0x31aab0(0x1ea)](''+_0x4d711e+a171_0x5d641c[_0x31aab0(0x1e1)]))throw new Error(_0x31aab0(0x1eb)+_0x2d65de[_0x31aab0(0x1f4)]);if(_0x2c05c3)await a171_0x2ea070[_0x31aab0(0x1da)](_0x1a50cb,{'recursive':!![]});else{await a171_0x2ea070[_0x31aab0(0x1da)](a171_0x5d641c[_0x31aab0(0x1f5)](_0x1a50cb),{'recursive':!![]});const _0x2c360b=await openEntryStream(_0x5836aa,_0x2d65de);await pipeline(_0x2c360b,createWriteStream(_0x1a50cb,{'flags':'wx','mode':0x1a4}));}_0x5836aa[_0x31aab0(0x1d3)]();})()[_0x5974f3(0x1e7)](_0x532388);}),_0x5836aa[_0x43ba5b(0x1d3)]();});}
@@ -1 +1 @@
1
- const a172_0xf06ca0=a172_0xd775;(function(_0xdb878,_0x10659f){const _0x2c5aa=a172_0xd775,_0x41eb8b=_0xdb878();while(!![]){try{const _0x4b61c4=-parseInt(_0x2c5aa(0x19d))/0x1+-parseInt(_0x2c5aa(0x1a8))/0x2*(parseInt(_0x2c5aa(0x1a7))/0x3)+-parseInt(_0x2c5aa(0x1a9))/0x4+-parseInt(_0x2c5aa(0x1a2))/0x5*(parseInt(_0x2c5aa(0x1a5))/0x6)+parseInt(_0x2c5aa(0x1a1))/0x7*(-parseInt(_0x2c5aa(0x1a4))/0x8)+-parseInt(_0x2c5aa(0x1a6))/0x9*(parseInt(_0x2c5aa(0x1a0))/0xa)+parseInt(_0x2c5aa(0x19f))/0xb;if(_0x4b61c4===_0x10659f)break;else _0x41eb8b['push'](_0x41eb8b['shift']());}catch(_0x5b2f03){_0x41eb8b['push'](_0x41eb8b['shift']());}}}(a172_0x5dd0,0xca0a9));function a172_0x5dd0(){const _0x2d0669=['1870862FehHVB','20725KrKnTH','dirname','40GsAFGh','210iujfld','10514394ULwHNC','431562ZApbbW','14TRTboo','2198912UeOfdL','../../../../','132054JonizG','resolve','56825912ttUOqO','10wJCOFP'];a172_0x5dd0=function(){return _0x2d0669;};return a172_0x5dd0();}import a172_0x10ca42 from'node:path';function a172_0xd775(_0x43f9c2,_0x260612){_0x43f9c2=_0x43f9c2-0x19c;const _0x5dd09a=a172_0x5dd0();let _0xd77545=_0x5dd09a[_0x43f9c2];return _0xd77545;}import{fileURLToPath}from'node:url';const __dirname=a172_0x10ca42[a172_0xf06ca0(0x1a3)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x43ab01=a172_0xf06ca0;return a172_0x10ca42[_0x43ab01(0x19e)](__dirname,_0x43ab01(0x19c));}
1
+ const a172_0x2d72ea=a172_0xc494;function a172_0xc494(_0x23183c,_0x5d6212){_0x23183c=_0x23183c-0x1d6;const _0x2bf6fc=a172_0x2bf6();let _0xc4948e=_0x2bf6fc[_0x23183c];return _0xc4948e;}(function(_0x37bbea,_0x3c056c){const _0x2a30f8=a172_0xc494,_0x5cc53a=_0x37bbea();while(!![]){try{const _0x5815c7=-parseInt(_0x2a30f8(0x1d9))/0x1*(-parseInt(_0x2a30f8(0x1dd))/0x2)+-parseInt(_0x2a30f8(0x1dc))/0x3*(-parseInt(_0x2a30f8(0x1e1))/0x4)+parseInt(_0x2a30f8(0x1d6))/0x5*(-parseInt(_0x2a30f8(0x1db))/0x6)+-parseInt(_0x2a30f8(0x1d7))/0x7*(parseInt(_0x2a30f8(0x1d8))/0x8)+parseInt(_0x2a30f8(0x1e3))/0x9+parseInt(_0x2a30f8(0x1e2))/0xa*(parseInt(_0x2a30f8(0x1e0))/0xb)+-parseInt(_0x2a30f8(0x1de))/0xc;if(_0x5815c7===_0x3c056c)break;else _0x5cc53a['push'](_0x5cc53a['shift']());}catch(_0x3588d0){_0x5cc53a['push'](_0x5cc53a['shift']());}}}(a172_0x2bf6,0x1e669));function a172_0x2bf6(){const _0x5d58d3=['6050fjbMcJ','2034414ISdcFU','805IDqwzl','122619lxSdSc','32FTIpIY','404ObzjLy','dirname','3282kSRktZ','8754dAdCgK','154cpfkgv','3006168SSTkeh','resolve','3586DLjcMY','108RmWbXs'];a172_0x2bf6=function(){return _0x5d58d3;};return a172_0x2bf6();}import a172_0x1d9ef2 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a172_0x1d9ef2[a172_0x2d72ea(0x1da)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x2d8c6e=a172_0x2d72ea;return a172_0x1d9ef2[_0x2d8c6e(0x1df)](__dirname,'../../../../');}
@@ -1 +1 @@
1
- (function(_0x4c093d,_0x465e75){const _0x41eaa0=a173_0x5898,_0x4d0cfc=_0x4c093d();while(!![]){try{const _0x39cedb=parseInt(_0x41eaa0(0x1b7))/0x1*(parseInt(_0x41eaa0(0x1b4))/0x2)+parseInt(_0x41eaa0(0x1b0))/0x3*(-parseInt(_0x41eaa0(0x1b3))/0x4)+parseInt(_0x41eaa0(0x1a8))/0x5+-parseInt(_0x41eaa0(0x1aa))/0x6+-parseInt(_0x41eaa0(0x1a6))/0x7*(-parseInt(_0x41eaa0(0x1b9))/0x8)+-parseInt(_0x41eaa0(0x1b8))/0x9+parseInt(_0x41eaa0(0x1b5))/0xa;if(_0x39cedb===_0x465e75)break;else _0x4d0cfc['push'](_0x4d0cfc['shift']());}catch(_0x518832){_0x4d0cfc['push'](_0x4d0cfc['shift']());}}}(a173_0xcebd,0x7a456));import a173_0x5d63c1 from'node:path';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a173_0x5898(_0x3031f4,_0x5907af){_0x3031f4=_0x3031f4-0x1a6;const _0xcebd9a=a173_0xcebd();let _0x58983b=_0xcebd9a[_0x3031f4];return _0x58983b;}import{logger}from'../../../utils/logger.js';import{materializeLocalProjectTemplate,materializeProjectTemplate}from'../../../commands/project/create/materialize-project-template.js';function a173_0xcebd(){const _0x1bfc3c=['copy','info','1551781NTYYAh','Failed\x20to\x20copy\x20project\x20template','2069545miqQIA','error','109482RsSmcn','resolve','Starting\x20project\x20template\x20creation','now','success','cwd','458511yknczb','source','message','4KycBvm','201996eokRnY','968170MEnWdR','Project\x20template\x20created','1YgjiwT','3448656MsUSOd','16HfJbQe','version'];a173_0xcebd=function(){return _0x1bfc3c;};return a173_0xcebd();}export async function copyProjectTemplate(_0x4011bb,_0x744b1d,_0x4cc4c1){const _0x42a40d=a173_0x5898,_0x2b8170=Date[_0x42a40d(0x1ad)](),_0x19e836=a173_0x5d63c1[_0x42a40d(0x1ab)](process[_0x42a40d(0x1af)](),_0x4011bb);try{logger[_0x42a40d(0x1bc)](_0x42a40d(0x1bb),_0x42a40d(0x1ac),{'projectCode':_0x4011bb});const _0x32ed18=_0x4cc4c1?await materializeLocalProjectTemplate(_0x4cc4c1,_0x19e836,_0x744b1d):await materializeProjectTemplate(_0x19e836,_0x744b1d),_0x4e1ec1=Date[_0x42a40d(0x1ad)]()-_0x2b8170;logger[_0x42a40d(0x1ae)](_0x42a40d(0x1bb),_0x42a40d(0x1b6),_0x4e1ec1,{'projectCode':_0x4011bb,'templateSource':_0x32ed18[_0x42a40d(0x1b1)],'templateVersion':_0x32ed18[_0x42a40d(0x1ba)]});}catch(_0x5ae609){const _0x4e374f=Date[_0x42a40d(0x1ad)]()-_0x2b8170;logger[_0x42a40d(0x1a9)](_0x42a40d(0x1bb),_0x42a40d(0x1a7),{'projectCode':_0x4011bb,'error':_0x5ae609 instanceof Error?_0x5ae609[_0x42a40d(0x1b2)]:String(_0x5ae609),'duration':_0x4e374f});throw _0x5ae609;}return formatElapsed(_0x2b8170);}
1
+ function a173_0x401c(_0x1bee50,_0x289321){_0x1bee50=_0x1bee50-0x1e9;const _0x2a1222=a173_0x2a12();let _0x401c92=_0x2a1222[_0x1bee50];return _0x401c92;}(function(_0x152008,_0x55ccf3){const _0x2fca3e=a173_0x401c,_0x2aa2b8=_0x152008();while(!![]){try{const _0x459424=parseInt(_0x2fca3e(0x1fc))/0x1+parseInt(_0x2fca3e(0x1f8))/0x2*(-parseInt(_0x2fca3e(0x1f1))/0x3)+parseInt(_0x2fca3e(0x1f5))/0x4+parseInt(_0x2fca3e(0x1f7))/0x5+-parseInt(_0x2fca3e(0x1f6))/0x6*(-parseInt(_0x2fca3e(0x1ed))/0x7)+parseInt(_0x2fca3e(0x1ee))/0x8*(-parseInt(_0x2fca3e(0x1ef))/0x9)+-parseInt(_0x2fca3e(0x1fb))/0xa;if(_0x459424===_0x55ccf3)break;else _0x2aa2b8['push'](_0x2aa2b8['shift']());}catch(_0x3b518e){_0x2aa2b8['push'](_0x2aa2b8['shift']());}}}(a173_0x2a12,0xdcfe0));import a173_0x14f8cd from'node:path';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a173_0x2a12(){const _0x4e5c82=['5146398hOJuxN','now','cwd','success','6793936TuAUAt','9699702vJXAnQ','431830VjwLsA','2REkJsP','Project\x20template\x20created','Starting\x20project\x20template\x20creation','2038620BvqANO','156884dQrOdU','info','Failed\x20to\x20copy\x20project\x20template','version','source','copy','7SkLVcB','408fszkJR','129501cIJQFA','resolve'];a173_0x2a12=function(){return _0x4e5c82;};return a173_0x2a12();}import{materializeLocalProjectTemplate,materializeProjectTemplate}from'../../../commands/project/create/materialize-project-template.js';export async function copyProjectTemplate(_0x55e608,_0x234104,_0x15419b){const _0x5746f0=a173_0x401c,_0xc4be0c=Date['now'](),_0x4cf827=a173_0x14f8cd[_0x5746f0(0x1f0)](process[_0x5746f0(0x1f3)](),_0x55e608);try{logger[_0x5746f0(0x1fd)]('copy',_0x5746f0(0x1fa),{'projectCode':_0x55e608});const _0x2e88e1=_0x15419b?await materializeLocalProjectTemplate(_0x15419b,_0x4cf827,_0x234104):await materializeProjectTemplate(_0x4cf827,_0x234104),_0x5bcdd8=Date[_0x5746f0(0x1f2)]()-_0xc4be0c;logger[_0x5746f0(0x1f4)](_0x5746f0(0x1ec),_0x5746f0(0x1f9),_0x5bcdd8,{'projectCode':_0x55e608,'templateSource':_0x2e88e1[_0x5746f0(0x1eb)],'templateVersion':_0x2e88e1[_0x5746f0(0x1ea)]});}catch(_0x410d7f){const _0x45e0e8=Date[_0x5746f0(0x1f2)]()-_0xc4be0c;logger['error']('copy',_0x5746f0(0x1e9),{'projectCode':_0x55e608,'error':_0x410d7f instanceof Error?_0x410d7f['message']:String(_0x410d7f),'duration':_0x45e0e8});throw _0x410d7f;}return formatElapsed(_0xc4be0c);}
@@ -1 +1 @@
1
- (function(_0x473b81,_0x5581e1){const _0x59ae4e=a174_0x5c7e,_0x5cde79=_0x473b81();while(!![]){try{const _0x456dfb=parseInt(_0x59ae4e(0x161))/0x1+-parseInt(_0x59ae4e(0x167))/0x2*(parseInt(_0x59ae4e(0x163))/0x3)+parseInt(_0x59ae4e(0x166))/0x4+parseInt(_0x59ae4e(0x162))/0x5+parseInt(_0x59ae4e(0x154))/0x6*(parseInt(_0x59ae4e(0x158))/0x7)+parseInt(_0x59ae4e(0x168))/0x8*(-parseInt(_0x59ae4e(0x164))/0x9)+parseInt(_0x59ae4e(0x160))/0xa*(parseInt(_0x59ae4e(0x15a))/0xb);if(_0x456dfb===_0x5581e1)break;else _0x5cde79['push'](_0x5cde79['shift']());}catch(_0x5620a1){_0x5cde79['push'](_0x5cde79['shift']());}}}(a174_0x1a0f,0x608cc));import a174_0x129adc 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 a174_0x5c7e(_0x24a77d,_0x2b431c){_0x24a77d=_0x24a77d-0x153;const _0x1a0f3b=a174_0x1a0f();let _0x5c7e19=_0x1a0f3b[_0x24a77d];return _0x5c7e19;}function a174_0x1a0f(){const _0x5d239a=['Starting\x20code\x20format','now','prettier','21deTGLZ','resolve','428593gJqvkw','npx','cwd','format','Code\x20format\x20completed','error','50hLwpoK','400267nEAhni','1604140BdCHnb','1995576dLYaiw','9rdiJBw','--write','123428THZKwD','2nMAStB','2564896hWiDKv','message','869010sJsEuW'];a174_0x1a0f=function(){return _0x5d239a;};return a174_0x1a0f();}export async function formatProjectCode(_0x248470){const _0x3051a3=a174_0x5c7e,_0x436dcb=Date['now'](),_0x561cb3=a174_0x129adc[_0x3051a3(0x159)](process[_0x3051a3(0x15c)](),_0x248470);try{logger['info']('format',_0x3051a3(0x155),{'projectCode':_0x248470}),await execa(resolveNpmBin(_0x3051a3(0x15b)),[_0x3051a3(0x157),_0x3051a3(0x165),'.'],{'cwd':_0x561cb3});const _0x51d8cb=Date[_0x3051a3(0x156)]()-_0x436dcb;logger['success']('format',_0x3051a3(0x15e),_0x51d8cb,{'projectCode':_0x248470});}catch(_0x2a7a2f){const _0x5aee0c=Date[_0x3051a3(0x156)]()-_0x436dcb;logger[_0x3051a3(0x15f)](_0x3051a3(0x15d),'Code\x20format\x20failed',{'projectCode':_0x248470,'error':_0x2a7a2f instanceof Error?_0x2a7a2f[_0x3051a3(0x153)]:String(_0x2a7a2f),'duration':_0x5aee0c});throw _0x2a7a2f;}return formatElapsed(_0x436dcb);}
1
+ (function(_0x2c9de2,_0x1f14c2){const _0x160ae1=a174_0x132f,_0x5bc1f3=_0x2c9de2();while(!![]){try{const _0x128108=parseInt(_0x160ae1(0x7b))/0x1+parseInt(_0x160ae1(0x87))/0x2*(-parseInt(_0x160ae1(0x80))/0x3)+parseInt(_0x160ae1(0x81))/0x4*(-parseInt(_0x160ae1(0x76))/0x5)+-parseInt(_0x160ae1(0x75))/0x6*(-parseInt(_0x160ae1(0x79))/0x7)+parseInt(_0x160ae1(0x86))/0x8+parseInt(_0x160ae1(0x74))/0x9*(-parseInt(_0x160ae1(0x88))/0xa)+parseInt(_0x160ae1(0x7e))/0xb;if(_0x128108===_0x1f14c2)break;else _0x5bc1f3['push'](_0x5bc1f3['shift']());}catch(_0x17bb1f){_0x5bc1f3['push'](_0x5bc1f3['shift']());}}}(a174_0x2137,0xd9f70));function a174_0x132f(_0x4f3323,_0x3f812e){_0x4f3323=_0x4f3323-0x74;const _0x21378f=a174_0x2137();let _0x132f92=_0x21378f[_0x4f3323];return _0x132f92;}import a174_0x139790 from'node:path';import{execa}from'execa';function a174_0x2137(){const _0x51b888=['15435zJYgrV','1283404AodecD','success','cwd','npx','--write','1247016jqKGQC','86iBmuRQ','110pAYRmz','1149102YiUGFu','410682ojnXYw','20gGelyx','info','message','147vtqWEu','prettier','673231yskTGM','now','error','16889246OmkcuV','format'];a174_0x2137=function(){return _0x51b888;};return a174_0x2137();}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x14ab30){const _0x215484=a174_0x132f,_0x2499bd=Date['now'](),_0x2b5e08=a174_0x139790['resolve'](process[_0x215484(0x83)](),_0x14ab30);try{logger[_0x215484(0x77)](_0x215484(0x7f),'Starting\x20code\x20format',{'projectCode':_0x14ab30}),await execa(resolveNpmBin(_0x215484(0x84)),[_0x215484(0x7a),_0x215484(0x85),'.'],{'cwd':_0x2b5e08});const _0x5d4584=Date[_0x215484(0x7c)]()-_0x2499bd;logger[_0x215484(0x82)]('format','Code\x20format\x20completed',_0x5d4584,{'projectCode':_0x14ab30});}catch(_0x5d545e){const _0x462138=Date[_0x215484(0x7c)]()-_0x2499bd;logger[_0x215484(0x7d)](_0x215484(0x7f),'Code\x20format\x20failed',{'projectCode':_0x14ab30,'error':_0x5d545e instanceof Error?_0x5d545e[_0x215484(0x78)]:String(_0x5d545e),'duration':_0x462138});throw _0x5d545e;}return formatElapsed(_0x2499bd);}
@@ -1 +1 @@
1
- (function(_0x4d7fb2,_0xde469d){const _0xbd2369=a175_0x8088,_0x1867eb=_0x4d7fb2();while(!![]){try{const _0x40b99b=parseInt(_0xbd2369(0xf0))/0x1+-parseInt(_0xbd2369(0xfc))/0x2+parseInt(_0xbd2369(0xef))/0x3*(-parseInt(_0xbd2369(0xfd))/0x4)+parseInt(_0xbd2369(0xfe))/0x5*(parseInt(_0xbd2369(0xf1))/0x6)+-parseInt(_0xbd2369(0xf5))/0x7*(parseInt(_0xbd2369(0xf9))/0x8)+parseInt(_0xbd2369(0xf2))/0x9*(-parseInt(_0xbd2369(0xf8))/0xa)+-parseInt(_0xbd2369(0xff))/0xb*(-parseInt(_0xbd2369(0xf7))/0xc);if(_0x40b99b===_0xde469d)break;else _0x1867eb['push'](_0x1867eb['shift']());}catch(_0x4ee19d){_0x1867eb['push'](_0x1867eb['shift']());}}}(a175_0x1538,0x99baa));import a175_0x4af9d6 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a175_0x8088(_0x308d52,_0x5e4eb9){_0x308d52=_0x308d52-0xeb;const _0x153827=a175_0x1538();let _0x8088e9=_0x153827[_0x308d52];return _0x8088e9;}import{resolveNpmBin}from'../../../utils/platform.js';function a175_0x1538(){const _0x32ef3a=['now','18654LlCMQY','1033949rNdIcf','12aPkCME','1593IuDxsF','error','https://registry.npmmirror.com','301IeZLKi','Dependency\x20install\x20failed','12rtXxin','59810nNKFKK','12120QvznUU','Dependency\x20install\x20completed','success','1640888cgPkfW','404KbAzZo','1726135WoDnLM','16252665HoPYeZ','install','npm','--registry','cwd'];a175_0x1538=function(){return _0x32ef3a;};return a175_0x1538();}export async function installDependencies(_0x52db18){const _0x2cc964=a175_0x8088,_0xfdeebb=Date[_0x2cc964(0xee)](),_0xd7eecb=a175_0x4af9d6['resolve'](process[_0x2cc964(0xed)](),_0x52db18);try{logger['info'](_0x2cc964(0x100),'Starting\x20dependency\x20install',{'projectCode':_0x52db18,'registry':_0x2cc964(0xf4)}),await execa(resolveNpmBin(_0x2cc964(0xeb)),[_0x2cc964(0x100),_0x2cc964(0xec),_0x2cc964(0xf4)],{'cwd':_0xd7eecb});const _0x2c1e96=Date[_0x2cc964(0xee)]()-_0xfdeebb;logger[_0x2cc964(0xfb)](_0x2cc964(0x100),_0x2cc964(0xfa),_0x2c1e96,{'projectCode':_0x52db18});}catch(_0x76b72d){const _0x271e91=Date[_0x2cc964(0xee)]()-_0xfdeebb;logger[_0x2cc964(0xf3)](_0x2cc964(0x100),_0x2cc964(0xf6),{'projectCode':_0x52db18,'error':_0x76b72d instanceof Error?_0x76b72d['message']:String(_0x76b72d),'duration':_0x271e91});throw _0x76b72d;}return formatElapsed(_0xfdeebb);}
1
+ (function(_0x225ad6,_0xcd6802){const _0x456d34=a175_0x1fc3,_0x14bccc=_0x225ad6();while(!![]){try{const _0x42e80c=parseInt(_0x456d34(0x19d))/0x1*(-parseInt(_0x456d34(0x1ad))/0x2)+parseInt(_0x456d34(0x1a0))/0x3*(-parseInt(_0x456d34(0x1a1))/0x4)+-parseInt(_0x456d34(0x1a9))/0x5*(-parseInt(_0x456d34(0x1a7))/0x6)+parseInt(_0x456d34(0x1a3))/0x7+-parseInt(_0x456d34(0x1b0))/0x8+-parseInt(_0x456d34(0x1ab))/0x9+parseInt(_0x456d34(0x1ae))/0xa;if(_0x42e80c===_0xcd6802)break;else _0x14bccc['push'](_0x14bccc['shift']());}catch(_0x526f59){_0x14bccc['push'](_0x14bccc['shift']());}}}(a175_0x459d,0xcbc65));import a175_0x415ef1 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a175_0x1fc3(_0x5e45af,_0x5dd0ba){_0x5e45af=_0x5e45af-0x19d;const _0x459ddf=a175_0x459d();let _0x1fc317=_0x459ddf[_0x5e45af];return _0x1fc317;}function a175_0x459d(){const _0x5b4ef8=['Starting\x20dependency\x20install','2318135eHsLJc','--registry','14602446gQePsS','Dependency\x20install\x20completed','945016vZoKFU','34972220fuICWN','npm','7414128hLlQcx','install','2fplTDe','message','resolve','219vJulYm','50084lzRnvG','info','8974847SuFaCs','https://registry.npmmirror.com','now','error','6djmWjO'];a175_0x459d=function(){return _0x5b4ef8;};return a175_0x459d();}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x4968f0){const _0x30db93=a175_0x1fc3,_0x3fe204=Date[_0x30db93(0x1a5)](),_0x59100b=a175_0x415ef1[_0x30db93(0x19f)](process['cwd'](),_0x4968f0);try{logger[_0x30db93(0x1a2)](_0x30db93(0x1b1),_0x30db93(0x1a8),{'projectCode':_0x4968f0,'registry':_0x30db93(0x1a4)}),await execa(resolveNpmBin(_0x30db93(0x1af)),[_0x30db93(0x1b1),_0x30db93(0x1aa),'https://registry.npmmirror.com'],{'cwd':_0x59100b});const _0x446166=Date[_0x30db93(0x1a5)]()-_0x3fe204;logger['success'](_0x30db93(0x1b1),_0x30db93(0x1ac),_0x446166,{'projectCode':_0x4968f0});}catch(_0x286b4b){const _0x3a9b5e=Date[_0x30db93(0x1a5)]()-_0x3fe204;logger[_0x30db93(0x1a6)]('install','Dependency\x20install\x20failed',{'projectCode':_0x4968f0,'error':_0x286b4b instanceof Error?_0x286b4b[_0x30db93(0x19e)]:String(_0x286b4b),'duration':_0x3a9b5e});throw _0x286b4b;}return formatElapsed(_0x3fe204);}
@@ -1 +1 @@
1
- const a176_0x361806=a176_0x3a4c;(function(_0x55709b,_0x3f7bba){const _0x2c1310=a176_0x3a4c,_0x2e531c=_0x55709b();while(!![]){try{const _0x4f5ef4=parseInt(_0x2c1310(0x145))/0x1+parseInt(_0x2c1310(0x139))/0x2*(-parseInt(_0x2c1310(0x146))/0x3)+-parseInt(_0x2c1310(0x12c))/0x4+-parseInt(_0x2c1310(0x12d))/0x5*(-parseInt(_0x2c1310(0x138))/0x6)+-parseInt(_0x2c1310(0x147))/0x7+-parseInt(_0x2c1310(0x132))/0x8+parseInt(_0x2c1310(0x135))/0x9;if(_0x4f5ef4===_0x3f7bba)break;else _0x2e531c['push'](_0x2e531c['shift']());}catch(_0x96aa7f){_0x2e531c['push'](_0x2e531c['shift']());}}}(a176_0x2d66,0xc5485));function a176_0x3a4c(_0x2778d0,_0x2937fc){_0x2778d0=_0x2778d0-0x127;const _0x2d667f=a176_0x2d66();let _0x3a4c6e=_0x2d667f[_0x2778d0];return _0x3a4c6e;}import{CliErrors}from'../../errors.js';function a176_0x2d66(){const _0x106607=['create','../../commands/project/create/main.js','yes','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','env','validation','Create\x20a\x20new\x20project','924162AkBxcU','3501345aOuRAD','7589386rKeLle','Usage:\x20','trim','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','project','Prepared\x20local\x20project\x20template\x20directory','write','nonInteractive','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','356028gvDQAi','19315gZLUGs','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','Project\x20name','project-name','cookie','5239264bWkJYC','string','template-source','21670641pGBgpb','args','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','732FpKARY','2lnquAU','upgrade','bool','name','boolean'];a176_0x2d66=function(){return _0x106607;};return a176_0x2d66();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';const createFlags=[{'name':a176_0x361806(0x13c),'type':'string','description':a176_0x361806(0x12f)},{'name':a176_0x361806(0x142),'type':a176_0x361806(0x133),'description':'Target\x20environment'},{'name':'appcode','type':a176_0x361806(0x133),'description':a176_0x361806(0x141)},{'name':a176_0x361806(0x134),'type':a176_0x361806(0x133),'description':a176_0x361806(0x128)}],upgradeFlags=[{'name':'yes','type':a176_0x361806(0x13d),'description':'Skip\x20confirmation\x20prompt','default':![]}];export const projectDefinitions=[{'service':'project','command':a176_0x361806(0x13e),'description':a176_0x361806(0x144),'risk':a176_0x361806(0x129),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a176_0x361806(0x130),'description':a176_0x361806(0x14a),'required':![]}],'flags':createFlags,async 'execute'(_0x186dea){const _0x3b060e=a176_0x361806,{createApp:_0x150745}=await import(_0x3b060e(0x13f)),_0x4811ca=_0x186dea['str'](_0x3b060e(0x13c))[_0x3b060e(0x149)]()||_0x186dea[_0x3b060e(0x136)][0x0]?.[_0x3b060e(0x149)](),_0x2ff654=_0x186dea['str'](_0x3b060e(0x142))||undefined,_0x50db1d=_0x186dea['str']('appcode')||undefined,_0x3ed0e0=_0x186dea['str'](_0x3b060e(0x134))['trim']()||undefined;if(_0x186dea[_0x3b060e(0x12a)]){if(!_0x4811ca)throw CliErrors[_0x3b060e(0x143)](_0x3b060e(0x12b),_0x3b060e(0x148)+CLI_BIN_NAME+_0x3b060e(0x12e));await _0x150745({'projectCode':_0x4811ca,'appCode':_0x50db1d,'env':_0x2ff654,'cookie':_0x186dea[_0x3b060e(0x131)],'nonInteractive':!![],'templateSource':_0x3ed0e0});}else await _0x150745({'projectCode':_0x4811ca,'appCode':_0x50db1d,'env':_0x2ff654,'cookie':_0x186dea[_0x3b060e(0x131)],'templateSource':_0x3ed0e0});return{'ok':!![]};}},{'service':a176_0x361806(0x127),'command':a176_0x361806(0x13a),'description':a176_0x361806(0x137),'risk':a176_0x361806(0x129),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x3de1e2){const _0x6b98e4=a176_0x361806;return await upgradeApp(_0x3de1e2[_0x6b98e4(0x12a)],{'yes':_0x3de1e2[_0x6b98e4(0x13b)](_0x6b98e4(0x140))}),{'ok':!![]};}}];
1
+ const a176_0x37b6aa=a176_0x5c31;(function(_0x2f9816,_0x55e41c){const _0x4d3a9d=a176_0x5c31,_0x422000=_0x2f9816();while(!![]){try{const _0x4579cf=parseInt(_0x4d3a9d(0x1cd))/0x1*(parseInt(_0x4d3a9d(0x1b8))/0x2)+-parseInt(_0x4d3a9d(0x1d1))/0x3*(-parseInt(_0x4d3a9d(0x1bf))/0x4)+parseInt(_0x4d3a9d(0x1b9))/0x5+parseInt(_0x4d3a9d(0x1bb))/0x6*(-parseInt(_0x4d3a9d(0x1c5))/0x7)+parseInt(_0x4d3a9d(0x1d7))/0x8+-parseInt(_0x4d3a9d(0x1c4))/0x9+parseInt(_0x4d3a9d(0x1c0))/0xa;if(_0x4579cf===_0x55e41c)break;else _0x422000['push'](_0x422000['shift']());}catch(_0x52567c){_0x422000['push'](_0x422000['shift']());}}}(a176_0x2278,0x7ce41));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';function a176_0x5c31(_0x4b5422,_0x5af7b1){_0x4b5422=_0x4b5422-0x1b7;const _0x2278f7=a176_0x2278();let _0x5c3159=_0x2278f7[_0x4b5422];return _0x5c3159;}const createFlags=[{'name':a176_0x37b6aa(0x1d8),'type':a176_0x37b6aa(0x1d4),'description':a176_0x37b6aa(0x1c7)},{'name':a176_0x37b6aa(0x1d3),'type':a176_0x37b6aa(0x1d4),'description':a176_0x37b6aa(0x1c1)},{'name':'appcode','type':a176_0x37b6aa(0x1d4),'description':a176_0x37b6aa(0x1c3)},{'name':a176_0x37b6aa(0x1d6),'type':a176_0x37b6aa(0x1d4),'description':'Prepared\x20local\x20project\x20template\x20directory'}],upgradeFlags=[{'name':'yes','type':a176_0x37b6aa(0x1cc),'description':'Skip\x20confirmation\x20prompt','default':![]}];export const projectDefinitions=[{'service':a176_0x37b6aa(0x1ce),'command':a176_0x37b6aa(0x1b7),'description':a176_0x37b6aa(0x1d2),'risk':a176_0x37b6aa(0x1bc),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'project-name','description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x16f5be){const _0x55160a=a176_0x37b6aa,{createApp:_0x452b58}=await import(_0x55160a(0x1cb)),_0x3202be=_0x16f5be['str']('name')[_0x55160a(0x1c9)]()||_0x16f5be[_0x55160a(0x1c6)][0x0]?.[_0x55160a(0x1c9)](),_0x2c4c6c=_0x16f5be[_0x55160a(0x1be)](_0x55160a(0x1d3))||undefined,_0x46fcb3=_0x16f5be[_0x55160a(0x1be)]('appcode')||undefined,_0x47e79a=_0x16f5be[_0x55160a(0x1be)](_0x55160a(0x1d6))[_0x55160a(0x1c9)]()||undefined;if(_0x16f5be[_0x55160a(0x1ca)]){if(!_0x3202be)throw CliErrors[_0x55160a(0x1c8)](_0x55160a(0x1d0),'Usage:\x20'+CLI_BIN_NAME+_0x55160a(0x1d5));await _0x452b58({'projectCode':_0x3202be,'appCode':_0x46fcb3,'env':_0x2c4c6c,'cookie':_0x16f5be[_0x55160a(0x1ba)],'nonInteractive':!![],'templateSource':_0x47e79a});}else await _0x452b58({'projectCode':_0x3202be,'appCode':_0x46fcb3,'env':_0x2c4c6c,'cookie':_0x16f5be[_0x55160a(0x1ba)],'templateSource':_0x47e79a});return{'ok':!![]};}},{'service':'project','command':a176_0x37b6aa(0x1bd),'description':a176_0x37b6aa(0x1cf),'risk':a176_0x37b6aa(0x1bc),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x4a212e){const _0x1fefd2=a176_0x37b6aa;return await upgradeApp(_0x4a212e['nonInteractive'],{'yes':_0x4a212e['bool'](_0x1fefd2(0x1c2))}),{'ok':!![]};}}];function a176_0x2278(){const _0x5f284d=['6014216mlUXDJ','name','create','254ggQxhI','2066705vfSNBG','cookie','832902nRLlda','write','upgrade','str','122152AYqrCH','2597090BDPvCY','Target\x20environment','yes','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','8204643MJKDLF','28DeyNpe','args','Project\x20name','validation','trim','nonInteractive','../../commands/project/create/main.js','boolean','31GffUcG','project','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','54afkZtQ','Create\x20a\x20new\x20project','env','string','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','template-source'];a176_0x2278=function(){return _0x5f284d;};return a176_0x2278();}
@@ -1 +1 @@
1
- const a177_0x56b8d7=a177_0x547a;(function(_0x45619b,_0x5c62ab){const _0x4f6c70=a177_0x547a,_0x4f4db4=_0x45619b();while(!![]){try{const _0x4f23b8=parseInt(_0x4f6c70(0x11f))/0x1*(parseInt(_0x4f6c70(0x161))/0x2)+parseInt(_0x4f6c70(0x12a))/0x3*(parseInt(_0x4f6c70(0xf9))/0x4)+parseInt(_0x4f6c70(0x121))/0x5+parseInt(_0x4f6c70(0x109))/0x6*(-parseInt(_0x4f6c70(0x149))/0x7)+parseInt(_0x4f6c70(0x128))/0x8+parseInt(_0x4f6c70(0xfa))/0x9*(parseInt(_0x4f6c70(0x171))/0xa)+-parseInt(_0x4f6c70(0x104))/0xb;if(_0x4f23b8===_0x5c62ab)break;else _0x4f4db4['push'](_0x4f4db4['shift']());}catch(_0x3f6926){_0x4f4db4['push'](_0x4f4db4['shift']());}}}(a177_0xa052,0x8ee96));function a177_0x547a(_0x3daf8b,_0x12fd4c){_0x3daf8b=_0x3daf8b-0xec;const _0xa05212=a177_0xa052();let _0x547a83=_0xa05212[_0x3daf8b];return _0x547a83;}import a177_0x41aefe from'chalk';import a177_0x5b82b8 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=[a177_0x56b8d7(0xed),a177_0x56b8d7(0x16e)];function collectIdeSkillFiles(_0x30e8f5){const _0x3142df=a177_0x56b8d7,_0x43c2cf=[];for(const _0x4c2369 of Object['values'](CORE_IDE_CONFIGS)){if(_0x4c2369[_0x3142df(0xf6)])for(const _0x195317 of _0x4c2369[_0x3142df(0xf6)]){_0x43c2cf[_0x3142df(0x136)](resolve(_0x30e8f5,_0x195317['path']));}}return _0x43c2cf;}function analyse(_0x34ce8d){const _0x37767b=a177_0x56b8d7;let _0x2a0835=null;const _0x23a28b=resolve(_0x34ce8d,NEW_CONFIG_NAME),_0x457af6=existsSync(_0x23a28b);for(const _0x9056a3 of LEGACY_CONFIG_NAMES){const _0x25942b=resolve(_0x34ce8d,_0x9056a3);if(existsSync(_0x25942b)){const _0x126e87=readConfigFile(_0x25942b),_0x439ec8=Object[_0x37767b(0xfc)](_0x126e87)[_0x37767b(0x162)](_0x342594=>typeof _0x126e87[_0x342594]!==_0x37767b(0x142));_0x2a0835={'oldPath':_0x25942b,'hasNewConfig':_0x457af6,'fields':_0x439ec8};break;}}const _0x3a1ea0=[],_0x28182c=resolve(_0x34ce8d,_0x37767b(0x151));if(existsSync(_0x28182c))_0x3a1ea0['push'](_0x28182c);const _0x557fb2=resolve(_0x34ce8d,_0x37767b(0x12f));if(existsSync(_0x557fb2))_0x3a1ea0[_0x37767b(0x136)](_0x557fb2);const _0x9b9887=resolve(_0x34ce8d,_0x37767b(0x14e));if(existsSync(_0x9b9887))_0x3a1ea0[_0x37767b(0x136)](_0x9b9887);for(const _0x22196b of collectIdeSkillFiles(_0x34ce8d)){if(existsSync(_0x22196b))_0x3a1ea0[_0x37767b(0x136)](_0x22196b);}let _0x5bd50b=null;const _0x378303=resolve(_0x34ce8d,_0x37767b(0xfb));if(existsSync(_0x378303))try{const _0x416bdc=JSON[_0x37767b(0x156)](readFileSync(_0x378303,_0x37767b(0x113)));if(_0x416bdc?.['mcpServers']&&typeof _0x416bdc[_0x37767b(0x16d)]==='object'){const _0x36ee48=[];for(const [_0x147451,_0x2efd7e]of Object[_0x37767b(0x147)](_0x416bdc[_0x37767b(0x16d)])){const _0x205e39=_0x2efd7e;_0x205e39?.[_0x37767b(0x158)]&&Array[_0x37767b(0x124)](_0x205e39[_0x37767b(0x158)])&&_0x205e39[_0x37767b(0x158)][_0x37767b(0x120)](_0x471519=>typeof _0x471519===_0x37767b(0xef)&&_0x471519['includes'](_0x37767b(0x138)))&&_0x36ee48[_0x37767b(0x136)](_0x147451);}_0x36ee48[_0x37767b(0x13f)]>0x0&&(_0x5bd50b={'path':_0x378303,'keys':_0x36ee48});}}catch{}const _0x4107c6=_0x3a1ea0[_0x37767b(0x13f)]>0x0||_0x2a0835!==null;let _0x591625=null;const _0x3e7b09=resolve(_0x34ce8d,'package.json');if(existsSync(_0x3e7b09))try{const _0x3b954=JSON['parse'](readFileSync(_0x3e7b09,_0x37767b(0x113)));for(const _0x2ad216 of[_0x37767b(0x11e),_0x37767b(0x13b)]){const _0x318a62=_0x3b954?.[_0x2ad216]?.['@lovrabet/sdk'];if(typeof _0x318a62===_0x37767b(0xef)){_0x318a62!==_0x37767b(0x107)&&(_0x591625={'pkgPath':_0x3e7b09,'currentVersion':_0x318a62,'field':_0x2ad216});break;}}}catch{}return{'configMigration':_0x2a0835,'oldArtifacts':_0x3a1ea0,'oldMcpConfig':_0x5bd50b,'needsSkillSwap':_0x4107c6,'sdkUpgrade':_0x591625};}function printReport(_0x20fcf7){const _0x199baa=a177_0x56b8d7,{configMigration:_0x45c663,oldArtifacts:_0x565482,oldMcpConfig:_0x45054e,needsSkillSwap:_0x32a278}=_0x20fcf7;console[_0x199baa(0x155)](''),console['log'](a177_0x41aefe[_0x199baa(0x14f)](_0x199baa(0x137))),console[_0x199baa(0x155)]('');_0x45c663?(console['log'](a177_0x41aefe[_0x199baa(0x10d)](_0x199baa(0x108))+('\x20\x20'+a177_0x41aefe[_0x199baa(0xff)](_0x45c663[_0x199baa(0x118)]))),console[_0x199baa(0x155)]('\x20\x20New\x20config\x20(.rabetbase.json):\x20'+(_0x45c663[_0x199baa(0x148)]?a177_0x41aefe['green'](_0x199baa(0x139)):a177_0x41aefe[_0x199baa(0x111)](_0x199baa(0x106)))),console['log']('\x20\x20Fields\x20to\x20migrate:\x20'+_0x45c663[_0x199baa(0xf2)][_0x199baa(0x145)](',\x20')),console[_0x199baa(0x155)](_0x199baa(0x10f))):console[_0x199baa(0x155)](a177_0x41aefe[_0x199baa(0x10d)](_0x199baa(0x108))+'\x20\x20'+a177_0x41aefe['gray'](_0x199baa(0x10a)));console['log']('');if(_0x565482[_0x199baa(0x13f)]>0x0){console[_0x199baa(0x155)](a177_0x41aefe[_0x199baa(0x10d)]('Legacy\x20artifacts:'));for(const _0x393c25 of _0x565482){console[_0x199baa(0x155)]('\x20\x20'+a177_0x41aefe[_0x199baa(0x169)](_0x199baa(0x167))+'\x20\x20'+_0x393c25);}console['log']('\x20\x20Action:\x20delete');}else console['log'](a177_0x41aefe[_0x199baa(0x10d)](_0x199baa(0xf3))+'\x20\x20'+a177_0x41aefe['gray'](_0x199baa(0x100)));console['log']('');_0x45054e?(console[_0x199baa(0x155)](a177_0x41aefe[_0x199baa(0x10d)](_0x199baa(0xf4))+('\x20\x20'+a177_0x41aefe[_0x199baa(0xff)](_0x45054e[_0x199baa(0x123)])+_0x199baa(0x15e)+_0x45054e[_0x199baa(0xfc)]['join'](',\x20'))),console[_0x199baa(0x155)](_0x199baa(0x166))):console[_0x199baa(0x155)](a177_0x41aefe[_0x199baa(0x10d)](_0x199baa(0xf4))+'\x20\x20'+a177_0x41aefe[_0x199baa(0x111)]('no\x20legacy\x20entry'));console[_0x199baa(0x155)](''),console['log'](a177_0x41aefe['cyan'](_0x199baa(0x170))+('\x20\x20'+(_0x32a278?a177_0x41aefe['yellow']('needed'):a177_0x41aefe[_0x199baa(0x130)](_0x199baa(0x133)))));_0x32a278&&console[_0x199baa(0x155)]('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x199baa(0x155)]('');if(_0x20fcf7[_0x199baa(0x119)]){const {currentVersion:_0x23f0c3,field:_0x5ac817,pkgPath:_0x93bfd9}=_0x20fcf7[_0x199baa(0x119)];console[_0x199baa(0x155)](a177_0x41aefe['cyan'](_0x199baa(0x16f))+('\x20\x20'+a177_0x41aefe[_0x199baa(0xff)](_0x93bfd9))),console[_0x199baa(0x155)](_0x199baa(0x12b)+_0x5ac817+':\x20'+a177_0x41aefe[_0x199baa(0xff)](_0x23f0c3)+'\x20→\x20'+a177_0x41aefe[_0x199baa(0x130)](_0x199baa(0x107))),console['log'](_0x199baa(0x160));}else console[_0x199baa(0x155)](a177_0x41aefe[_0x199baa(0x10d)]('@lovrabet/sdk:')+'\x20\x20'+a177_0x41aefe[_0x199baa(0x111)](_0x199baa(0x129)));console[_0x199baa(0x155)]('');}function execConfigMigration(_0x1df987,_0x44dd12){const _0x415b51=a177_0x56b8d7,{configMigration:_0x3f2a28}=_0x1df987;if(!_0x3f2a28?.[_0x415b51(0x118)])return{'step':0x1,'label':_0x415b51(0x131),'ok':!![],'detail':'skipped\x20(no\x20legacy\x20config)'};const _0x4d616b=readConfigFile(_0x3f2a28[_0x415b51(0x118)]),_0xc6d82c=resolve(_0x44dd12,NEW_CONFIG_NAME),_0x17f8ec=_0x3f2a28[_0x415b51(0x148)]?readConfigFile(_0xc6d82c):{};for(const [_0x44316d,_0x75fb93]of Object[_0x415b51(0x147)](_0x4d616b)){!(_0x44316d in _0x17f8ec)&&(_0x17f8ec[_0x44316d]=_0x75fb93);}writeConfigFile(_0xc6d82c,_0x17f8ec);const _0x775feb=_0x3f2a28[_0x415b51(0x118)]+_0x415b51(0x125);return renameSync(_0x3f2a28['oldPath'],_0x775feb),{'step':0x1,'label':_0x415b51(0x131),'ok':!![],'detail':_0x3f2a28[_0x415b51(0x118)]+_0x415b51(0x13a)+_0xc6d82c+'\x20(backup:\x20'+_0x775feb+')'};}function execRemoveOldArtifacts(_0x57721d){const _0x2f5f66=a177_0x56b8d7,_0x479bff=[];for(const _0x3f8a63 of _0x57721d){try{if(!existsSync(_0x3f8a63))continue;const _0x46599e=tryStat(_0x3f8a63);_0x46599e?.['isDirectory']()?rmSync(_0x3f8a63,{'recursive':!![],'force':!![]}):unlinkSync(_0x3f8a63);}catch(_0x32b37e){_0x479bff[_0x2f5f66(0x136)](_0x3f8a63+':\x20'+_0x32b37e[_0x2f5f66(0x14b)]);}}return{'step':0x3,'label':_0x2f5f66(0xf7),'ok':_0x479bff[_0x2f5f66(0x13f)]===0x0,'detail':_0x479bff['length']>0x0?_0x57721d[_0x2f5f66(0x13f)]-_0x479bff['length']+'/'+_0x57721d[_0x2f5f66(0x13f)]+_0x2f5f66(0x15c)+_0x479bff[_0x2f5f66(0x145)](';\x20')+')':_0x57721d[_0x2f5f66(0x13f)]+_0x2f5f66(0xf1)};}function execCleanMcp(_0x14922a){const _0xf51d8b=a177_0x56b8d7;if(!_0x14922a['oldMcpConfig'])return{'step':0x4,'label':_0xf51d8b(0x127),'ok':!![],'detail':_0xf51d8b(0xee)};try{const _0x4b9518=readFileSync(_0x14922a[_0xf51d8b(0x132)]['path'],_0xf51d8b(0x113)),_0x39b7e5=JSON[_0xf51d8b(0x156)](_0x4b9518);if(_0x39b7e5?.[_0xf51d8b(0x16d)]&&typeof _0x39b7e5[_0xf51d8b(0x16d)]===_0xf51d8b(0x110)){const _0x1d7690=[];for(const [_0xfe3b3f,_0x23a4e5]of Object['entries'](_0x39b7e5[_0xf51d8b(0x16d)])){_0x23a4e5?.['args']&&Array[_0xf51d8b(0x124)](_0x23a4e5['args'])&&_0x23a4e5[_0xf51d8b(0x158)][_0xf51d8b(0x120)](_0x3d15d0=>typeof _0x3d15d0===_0xf51d8b(0xef)&&_0x3d15d0[_0xf51d8b(0x163)]('@lovrabet/dataset-mcp-server'))&&_0x1d7690['push'](_0xfe3b3f);}for(const _0x12ca16 of _0x1d7690){delete _0x39b7e5[_0xf51d8b(0x16d)][_0x12ca16];}return _0x1d7690[_0xf51d8b(0x13f)]>0x0&&writeFileSync(_0x14922a[_0xf51d8b(0x132)][_0xf51d8b(0x123)],JSON[_0xf51d8b(0x14c)](_0x39b7e5,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':_0xf51d8b(0x127),'ok':!![],'detail':_0xf51d8b(0x157)+_0x1d7690[_0xf51d8b(0x145)](',\x20')+_0xf51d8b(0x16a)+_0x14922a['oldMcpConfig'][_0xf51d8b(0x123)]};}return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0xf51d8b(0x12c)};}catch(_0x4f7a01){return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':![],'detail':_0x4f7a01['message']};}}function execSkillsRemove(_0x164813,_0x39488c){const _0x8a13a7=a177_0x56b8d7,_0x9bd62d=runNpxSkillsRemove(_0x164813,{'stdio':_0x8a13a7(0xfe),'yes':_0x39488c});return{'step':0x5,'label':_0x8a13a7(0xf0),'ok':_0x9bd62d['ok'],'detail':_0x9bd62d['ok']?_0x8a13a7(0x140):_0x9bd62d[_0x8a13a7(0x168)]??_0x8a13a7(0x13c)+_0x9bd62d[_0x8a13a7(0x10e)]};}function execSkillsAdd(_0x5882da,_0x28c92b){const _0x24d176=a177_0x56b8d7,_0x3b296b=runNpxSkillsAddGlobal(_0x5882da,_0x24d176(0x116),{'stdio':_0x24d176(0xfe),'yes':_0x28c92b});return{'step':0x6,'label':_0x24d176(0xf8),'ok':_0x3b296b['ok'],'detail':_0x3b296b['ok']?'lovrabet/rabetbase\x20installed\x20globally':_0x3b296b['error']??_0x24d176(0x13c)+_0x3b296b[_0x24d176(0x10e)]};}function a177_0xa052(){const _0xf077c=['lovrabet/lovrabet-skill\x20removed','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','undefined','failed','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','join','Step\x206/7:\x20Installing\x20new\x20skill...','entries','hasNewConfig','16681fdqTBX','Upgrade\x20cancelled.','message','stringify','Step\x204/7:\x20Cleaning\x20MCP\x20config...','.claude/skills/lovrabet','bold','succeed','.lovrabet','@lovrabet/sdk','cwd','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','log','parse','removed\x20','args','\x20→\x20latest','done','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','\x20removed\x20(','Step\x205/7:\x20Removing\x20old\x20skill...','\x20→\x20keys:\x20','Proceed\x20with\x20upgrade?','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','14LLtxvF','filter','includes','needsSkillSwap','Remove\x20.lovrabet/','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','FOUND','error','red','\x20from\x20','\x20\x20bun\x20install','Upgrade\x20@lovrabet/sdk','mcpServers','.lovrabetrc','@lovrabet/sdk:','Skill\x20swap:','2930DxUsJh','Step\x201/7:\x20Config\x20migration\x20—\x20','.lovrabet.json','skipped','string','Remove\x20old\x20skill','\x20removed','fields','Legacy\x20artifacts:','MCP\x20config:','label','files','Remove\x20legacy\x20artifacts','Install\x20new\x20skill','284656qjQHOt','17649LkOPDb','.cursor/mcp.json','keys','[\x22@lovrabet/sdk\x22]:\x20','inherit','yellow','none\x20found','Step\x201/7:\x20Migrating\x20config...','Step\x204/7:\x20MCP\x20config\x20—\x20','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','16871217cAkGBY','\x20\x20npm\x20install','not\x20found\x20(will\x20create)','latest','Config\x20file:','1002ZvxmNe','no\x20legacy\x20config\x20found','yes','\x20\x20Step\x20','cyan','status','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','object','gray','fail','utf8','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','lovrabet/rabetbase','info','oldPath','sdkUpgrade','oldArtifacts','detail','start','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','dependencies','133813PTePhG','some','3648080JNrFRw','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','path','isArray','.bak','white','Clean\x20MCP\x20config','501616lUUdpn','not\x20found\x20or\x20already\x20at\x20latest','9sAzjPy','\x20\x20Current\x20version\x20in\x20','no\x20matching\x20entry\x20found','\x20\x20\x20\x20\x20\x20\x20','Upgrade\x20completed\x20successfully!','.cursor/rules/lovrabet_rules.mdc','green','Config\x20migration','oldMcpConfig','not\x20needed','CANCEL','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','push','===\x20Upgrade\x20Analysis\x20===','@lovrabet/dataset-mcp-server','already\x20exists\x20(will\x20merge)','\x20→\x20','devDependencies','exit\x20','FAIL','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','length'];a177_0xa052=function(){return _0xf077c;};return a177_0xa052();}function execUpgradeSdk(_0x19a3e0){const _0x20a57c=a177_0x56b8d7;if(!_0x19a3e0[_0x20a57c(0x119)])return{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':'skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)'};const {pkgPath:_0xb4a10a,currentVersion:_0x454979,field:_0x2543a7}=_0x19a3e0[_0x20a57c(0x119)];try{const _0x2322fc=readFileSync(_0xb4a10a,'utf8'),_0x2a67d3=JSON['parse'](_0x2322fc);return _0x2a67d3[_0x2543a7][_0x20a57c(0x152)]=_0x20a57c(0x107),writeFileSync(_0xb4a10a,JSON[_0x20a57c(0x14c)](_0x2a67d3,null,0x2)+'\x0a',_0x20a57c(0x113)),{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0x2543a7+_0x20a57c(0xfd)+_0x454979+_0x20a57c(0x159)};}catch(_0x29be2d){return{'step':0x7,'label':_0x20a57c(0x16c),'ok':![],'detail':_0x29be2d[_0x20a57c(0x14b)]};}}function tryStat(_0x1c1054){try{return statSync(_0x1c1054);}catch{return undefined;}}function printSummary(_0xab7481){const _0x587f86=a177_0x56b8d7;console[_0x587f86(0x155)](''),console[_0x587f86(0x155)](a177_0x41aefe[_0x587f86(0x14f)]('===\x20Upgrade\x20Summary\x20===')),console[_0x587f86(0x155)]('');for(const _0x39063b of _0xab7481){const _0x25c9d0=_0x39063b['ok']?a177_0x41aefe[_0x587f86(0x130)]('OK'):a177_0x41aefe[_0x587f86(0x169)](_0x587f86(0x13d));console['log']('\x20\x20'+_0x25c9d0+_0x587f86(0x10c)+_0x39063b['step']+':\x20'+_0x39063b[_0x587f86(0xf5)]);if(_0x39063b[_0x587f86(0x11b)])console[_0x587f86(0x155)](_0x587f86(0x12d)+a177_0x41aefe[_0x587f86(0x111)](_0x39063b[_0x587f86(0x11b)]));}console[_0x587f86(0x155)]('');}export async function upgradeApp(_0x100ad3,_0x3ce145){const _0x5e5fcb=a177_0x56b8d7,_0x1ee9d0=process[_0x5e5fcb(0x153)](),_0x508cd2=analyse(_0x1ee9d0),_0x2a2860=!_0x508cd2['configMigration']&&_0x508cd2[_0x5e5fcb(0x11a)]['length']===0x0&&!_0x508cd2[_0x5e5fcb(0x132)]&&!_0x508cd2[_0x5e5fcb(0x164)]&&!_0x508cd2[_0x5e5fcb(0x119)];if(_0x2a2860){console[_0x5e5fcb(0x155)](a177_0x41aefe[_0x5e5fcb(0x130)](_0x5e5fcb(0x115)));return;}printReport(_0x508cd2);const _0xa9706b=!!(_0x3ce145[_0x5e5fcb(0x10b)]||_0x3ce145['Y']||_0x100ad3);if(!_0xa9706b)try{const _0x548446=await askConfirm(_0x5e5fcb(0x15f));if(!_0x548446){console[_0x5e5fcb(0x155)](a177_0x41aefe[_0x5e5fcb(0x111)]('Upgrade\x20cancelled.'));return;}}catch(_0x1a178d){if(_0x1a178d?.[_0x5e5fcb(0x14b)]===_0x5e5fcb(0x134)){console['log'](a177_0x41aefe[_0x5e5fcb(0x111)](_0x5e5fcb(0x14a)));return;}throw _0x1a178d;}const _0x4e4507=[],_0x525b18=a177_0x5b82b8({'text':_0x5e5fcb(0x101),'color':'cyan'})['start'](),_0x28c8a9=execConfigMigration(_0x508cd2,_0x1ee9d0);_0x4e4507['push'](_0x28c8a9),_0x525b18[_0x28c8a9['ok']?_0x5e5fcb(0x150):_0x5e5fcb(0x112)](_0x5e5fcb(0xec)+(_0x28c8a9[_0x5e5fcb(0x11b)]??(_0x28c8a9['ok']?_0x5e5fcb(0x15a):_0x5e5fcb(0x143))));const _0x471974=resolve(_0x1ee9d0,_0x5e5fcb(0x151)),_0x5ab628=a177_0x5b82b8({'text':'Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','color':_0x5e5fcb(0x10d)})[_0x5e5fcb(0x11c)]();if(existsSync(_0x471974))try{rmSync(_0x471974,{'recursive':!![],'force':!![]}),_0x5ab628[_0x5e5fcb(0x150)](_0x5e5fcb(0x114)),_0x4e4507[_0x5e5fcb(0x136)]({'step':0x2,'label':_0x5e5fcb(0x165),'ok':!![]});}catch(_0x233256){_0x5ab628[_0x5e5fcb(0x112)](_0x5e5fcb(0x15b)+_0x233256[_0x5e5fcb(0x14b)]),_0x4e4507[_0x5e5fcb(0x136)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':![],'detail':_0x233256[_0x5e5fcb(0x14b)]});}else _0x5ab628[_0x5e5fcb(0x117)](_0x5e5fcb(0x13e)),_0x4e4507['push']({'step':0x2,'label':_0x5e5fcb(0x165),'ok':!![],'detail':'skipped'});const _0x283fb7=a177_0x5b82b8({'text':'Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','color':_0x5e5fcb(0x10d)})['start'](),_0x39f9a5=execRemoveOldArtifacts(_0x508cd2[_0x5e5fcb(0x11a)]);_0x4e4507['push'](_0x39f9a5),_0x283fb7[_0x39f9a5['ok']?'succeed':_0x5e5fcb(0x112)](_0x5e5fcb(0x11d)+(_0x39f9a5[_0x5e5fcb(0x11b)]??(_0x39f9a5['ok']?_0x5e5fcb(0x15a):_0x5e5fcb(0x143))));const _0x5f483a=a177_0x5b82b8({'text':_0x5e5fcb(0x14d),'color':'cyan'})[_0x5e5fcb(0x11c)](),_0x4de4fa=execCleanMcp(_0x508cd2);_0x4e4507[_0x5e5fcb(0x136)](_0x4de4fa),_0x5f483a[_0x4de4fa['ok']?'succeed':'fail'](_0x5e5fcb(0x102)+(_0x4de4fa['detail']??(_0x4de4fa['ok']?_0x5e5fcb(0x15a):_0x5e5fcb(0x143))));const _0x58de04=a177_0x5b82b8({'text':_0x5e5fcb(0x15d),'color':_0x5e5fcb(0x10d)})[_0x5e5fcb(0x11c)](),_0x3e4996=execSkillsRemove(_0x1ee9d0,_0xa9706b);_0x4e4507['push'](_0x3e4996),_0x58de04[_0x3e4996['ok']?_0x5e5fcb(0x150):_0x5e5fcb(0x112)](_0x5e5fcb(0x144)+(_0x3e4996[_0x5e5fcb(0x11b)]??(_0x3e4996['ok']?'done':_0x5e5fcb(0x143))));const _0x223fb8=a177_0x5b82b8({'text':_0x5e5fcb(0x146),'color':'cyan'})[_0x5e5fcb(0x11c)](),_0x4980a2=execSkillsAdd(_0x1ee9d0,_0xa9706b);_0x4e4507[_0x5e5fcb(0x136)](_0x4980a2),_0x223fb8[_0x4980a2['ok']?_0x5e5fcb(0x150):'fail'](_0x5e5fcb(0x122)+(_0x4980a2[_0x5e5fcb(0x11b)]??(_0x4980a2['ok']?_0x5e5fcb(0x15a):_0x5e5fcb(0x143))));const _0x430e24=a177_0x5b82b8({'text':_0x5e5fcb(0x141),'color':_0x5e5fcb(0x10d)})[_0x5e5fcb(0x11c)](),_0x2693af=execUpgradeSdk(_0x508cd2);_0x4e4507[_0x5e5fcb(0x136)](_0x2693af),_0x430e24[_0x2693af['ok']?_0x5e5fcb(0x150):'fail'](_0x5e5fcb(0x135)+(_0x2693af['detail']??(_0x2693af['ok']?_0x5e5fcb(0x15a):_0x5e5fcb(0x143)))),printSummary(_0x4e4507);const _0x473703=_0x4e4507[_0x5e5fcb(0x120)](_0x29c6bc=>!_0x29c6bc['ok']);_0x473703?console[_0x5e5fcb(0x155)](a177_0x41aefe[_0x5e5fcb(0xff)](_0x5e5fcb(0x154))):console[_0x5e5fcb(0x155)](a177_0x41aefe[_0x5e5fcb(0x130)](_0x5e5fcb(0x12e))),_0x2693af['ok']&&_0x508cd2[_0x5e5fcb(0x119)]&&(console['log'](''),console[_0x5e5fcb(0x155)](a177_0x41aefe['bold'][_0x5e5fcb(0x10d)]('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console['log'](a177_0x41aefe[_0x5e5fcb(0x10d)](_0x5e5fcb(0x103))),console['log'](''),console[_0x5e5fcb(0x155)](a177_0x41aefe[_0x5e5fcb(0x126)](_0x5e5fcb(0x105))),console[_0x5e5fcb(0x155)](a177_0x41aefe[_0x5e5fcb(0x126)]('\x20\x20#\x20or')),console[_0x5e5fcb(0x155)](a177_0x41aefe[_0x5e5fcb(0x126)](_0x5e5fcb(0x16b))),console[_0x5e5fcb(0x155)](''));}
1
+ const a177_0xe76108=a177_0xe287;(function(_0xd53f8f,_0x5351eb){const _0x2eb8a9=a177_0xe287,_0x58e750=_0xd53f8f();while(!![]){try{const _0x43626b=-parseInt(_0x2eb8a9(0xbd))/0x1*(-parseInt(_0x2eb8a9(0x138))/0x2)+parseInt(_0x2eb8a9(0x120))/0x3+parseInt(_0x2eb8a9(0xcc))/0x4+-parseInt(_0x2eb8a9(0xf0))/0x5*(parseInt(_0x2eb8a9(0x12a))/0x6)+parseInt(_0x2eb8a9(0x10d))/0x7+-parseInt(_0x2eb8a9(0x11a))/0x8+parseInt(_0x2eb8a9(0x126))/0x9*(parseInt(_0x2eb8a9(0x11e))/0xa);if(_0x43626b===_0x5351eb)break;else _0x58e750['push'](_0x58e750['shift']());}catch(_0x3324d1){_0x58e750['push'](_0x58e750['shift']());}}}(a177_0x120f,0x7a3a0));import a177_0x592bca from'chalk';import a177_0xa97341 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';function a177_0xe287(_0x2e620b,_0x6e3518){_0x2e620b=_0x2e620b-0xbd;const _0x120f9d=a177_0x120f();let _0xe287dc=_0x120f9d[_0x2e620b];return _0xe287dc;}import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=[a177_0xe76108(0xf7),a177_0xe76108(0x118)];function collectIdeSkillFiles(_0xa97e65){const _0x57df41=a177_0xe76108,_0x26a942=[];for(const _0x20d463 of Object[_0x57df41(0x13e)](CORE_IDE_CONFIGS)){if(_0x20d463[_0x57df41(0xd6)])for(const _0x2d73d9 of _0x20d463[_0x57df41(0xd6)]){_0x26a942[_0x57df41(0x11c)](resolve(_0xa97e65,_0x2d73d9[_0x57df41(0xe8)]));}}return _0x26a942;}function analyse(_0x1c2037){const _0x341ec2=a177_0xe76108;let _0xb1a4e=null;const _0x3c3ffd=resolve(_0x1c2037,NEW_CONFIG_NAME),_0x3c7f4d=existsSync(_0x3c3ffd);for(const _0x11a314 of LEGACY_CONFIG_NAMES){const _0x5e7ded=resolve(_0x1c2037,_0x11a314);if(existsSync(_0x5e7ded)){const _0x168527=readConfigFile(_0x5e7ded),_0x55f627=Object[_0x341ec2(0x103)](_0x168527)[_0x341ec2(0x115)](_0x4ada08=>typeof _0x168527[_0x4ada08]!=='undefined');_0xb1a4e={'oldPath':_0x5e7ded,'hasNewConfig':_0x3c7f4d,'fields':_0x55f627};break;}}const _0x2eba2f=[],_0x219b73=resolve(_0x1c2037,_0x341ec2(0xc5));if(existsSync(_0x219b73))_0x2eba2f[_0x341ec2(0x11c)](_0x219b73);const _0x3c448=resolve(_0x1c2037,_0x341ec2(0x109));if(existsSync(_0x3c448))_0x2eba2f[_0x341ec2(0x11c)](_0x3c448);const _0x3ea581=resolve(_0x1c2037,_0x341ec2(0x11d));if(existsSync(_0x3ea581))_0x2eba2f[_0x341ec2(0x11c)](_0x3ea581);for(const _0x221030 of collectIdeSkillFiles(_0x1c2037)){if(existsSync(_0x221030))_0x2eba2f['push'](_0x221030);}let _0x553b8f=null;const _0x5ad4b2=resolve(_0x1c2037,_0x341ec2(0xef));if(existsSync(_0x5ad4b2))try{const _0x328237=JSON[_0x341ec2(0xe2)](readFileSync(_0x5ad4b2,_0x341ec2(0x128)));if(_0x328237?.[_0x341ec2(0x10f)]&&typeof _0x328237['mcpServers']===_0x341ec2(0xf3)){const _0x4ab8dc=[];for(const [_0x47b7ed,_0xa6d7fc]of Object[_0x341ec2(0x129)](_0x328237[_0x341ec2(0x10f)])){const _0x21fba7=_0xa6d7fc;_0x21fba7?.[_0x341ec2(0xe5)]&&Array[_0x341ec2(0x10a)](_0x21fba7[_0x341ec2(0xe5)])&&_0x21fba7['args'][_0x341ec2(0x131)](_0x3ebe3b=>typeof _0x3ebe3b===_0x341ec2(0xcd)&&_0x3ebe3b[_0x341ec2(0xd3)](_0x341ec2(0xdf)))&&_0x4ab8dc['push'](_0x47b7ed);}_0x4ab8dc['length']>0x0&&(_0x553b8f={'path':_0x5ad4b2,'keys':_0x4ab8dc});}}catch{}const _0x4033c4=_0x2eba2f[_0x341ec2(0xda)]>0x0||_0xb1a4e!==null;let _0x4e64c7=null;const _0x221ee1=resolve(_0x1c2037,_0x341ec2(0x12c));if(existsSync(_0x221ee1))try{const _0x5e26b1=JSON[_0x341ec2(0xe2)](readFileSync(_0x221ee1,_0x341ec2(0x128)));for(const _0x533e22 of[_0x341ec2(0xdc),_0x341ec2(0xe7)]){const _0x598474=_0x5e26b1?.[_0x533e22]?.['@lovrabet/sdk'];if(typeof _0x598474===_0x341ec2(0xcd)){_0x598474!==_0x341ec2(0x140)&&(_0x4e64c7={'pkgPath':_0x221ee1,'currentVersion':_0x598474,'field':_0x533e22});break;}}}catch{}return{'configMigration':_0xb1a4e,'oldArtifacts':_0x2eba2f,'oldMcpConfig':_0x553b8f,'needsSkillSwap':_0x4033c4,'sdkUpgrade':_0x4e64c7};}function printReport(_0x5552b7){const _0x3ab4c7=a177_0xe76108,{configMigration:_0x10f628,oldArtifacts:_0x448c9c,oldMcpConfig:_0xdbc359,needsSkillSwap:_0x52450b}=_0x5552b7;console['log'](''),console[_0x3ab4c7(0x112)](a177_0x592bca[_0x3ab4c7(0x141)](_0x3ab4c7(0xd5))),console[_0x3ab4c7(0x112)]('');_0x10f628?(console[_0x3ab4c7(0x112)](a177_0x592bca[_0x3ab4c7(0x11f)](_0x3ab4c7(0x101))+('\x20\x20'+a177_0x592bca[_0x3ab4c7(0x10e)](_0x10f628[_0x3ab4c7(0xc7)]))),console[_0x3ab4c7(0x112)](_0x3ab4c7(0x133)+(_0x10f628[_0x3ab4c7(0x119)]?a177_0x592bca[_0x3ab4c7(0x104)](_0x3ab4c7(0xd8)):a177_0x592bca['gray'](_0x3ab4c7(0x137)))),console['log'](_0x3ab4c7(0xfb)+_0x10f628[_0x3ab4c7(0xf8)]['join'](',\x20')),console[_0x3ab4c7(0x112)](_0x3ab4c7(0xdd))):console[_0x3ab4c7(0x112)](a177_0x592bca[_0x3ab4c7(0x11f)]('Config\x20file:')+'\x20\x20'+a177_0x592bca[_0x3ab4c7(0x114)](_0x3ab4c7(0xf5)));console['log']('');if(_0x448c9c['length']>0x0){console[_0x3ab4c7(0x112)](a177_0x592bca[_0x3ab4c7(0x11f)](_0x3ab4c7(0xf9)));for(const _0x1edefb of _0x448c9c){console['log']('\x20\x20'+a177_0x592bca[_0x3ab4c7(0x12b)]('FOUND')+'\x20\x20'+_0x1edefb);}console['log']('\x20\x20Action:\x20delete');}else console[_0x3ab4c7(0x112)](a177_0x592bca[_0x3ab4c7(0x11f)]('Legacy\x20artifacts:')+'\x20\x20'+a177_0x592bca[_0x3ab4c7(0x114)](_0x3ab4c7(0x111)));console['log']('');_0xdbc359?(console[_0x3ab4c7(0x112)](a177_0x592bca['cyan'](_0x3ab4c7(0xe4))+('\x20\x20'+a177_0x592bca[_0x3ab4c7(0x10e)](_0xdbc359[_0x3ab4c7(0xe8)])+'\x20→\x20keys:\x20'+_0xdbc359[_0x3ab4c7(0x103)][_0x3ab4c7(0xc9)](',\x20'))),console['log']('\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server')):console['log'](a177_0x592bca[_0x3ab4c7(0x11f)](_0x3ab4c7(0xe4))+'\x20\x20'+a177_0x592bca['gray'](_0x3ab4c7(0x105)));console['log'](''),console['log'](a177_0x592bca[_0x3ab4c7(0x11f)](_0x3ab4c7(0xeb))+('\x20\x20'+(_0x52450b?a177_0x592bca[_0x3ab4c7(0x10e)](_0x3ab4c7(0xd4)):a177_0x592bca[_0x3ab4c7(0x104)](_0x3ab4c7(0x123)))));_0x52450b&&console[_0x3ab4c7(0x112)](_0x3ab4c7(0xec)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x3ab4c7(0x112)]('');if(_0x5552b7[_0x3ab4c7(0x134)]){const {currentVersion:_0xc9972b,field:_0x51fc81,pkgPath:_0x242586}=_0x5552b7[_0x3ab4c7(0x134)];console[_0x3ab4c7(0x112)](a177_0x592bca[_0x3ab4c7(0x11f)]('@lovrabet/sdk:')+('\x20\x20'+a177_0x592bca[_0x3ab4c7(0x10e)](_0x242586))),console[_0x3ab4c7(0x112)](_0x3ab4c7(0xe1)+_0x51fc81+':\x20'+a177_0x592bca[_0x3ab4c7(0x10e)](_0xc9972b)+_0x3ab4c7(0x100)+a177_0x592bca[_0x3ab4c7(0x104)](_0x3ab4c7(0x140))),console[_0x3ab4c7(0x112)]('\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)');}else console[_0x3ab4c7(0x112)](a177_0x592bca[_0x3ab4c7(0x11f)](_0x3ab4c7(0x113))+'\x20\x20'+a177_0x592bca[_0x3ab4c7(0x114)](_0x3ab4c7(0x135)));console[_0x3ab4c7(0x112)]('');}function execConfigMigration(_0x459143,_0xf10e3){const _0x33eff3=a177_0xe76108,{configMigration:_0x14989c}=_0x459143;if(!_0x14989c?.[_0x33eff3(0xc7)])return{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x33eff3(0xed)};const _0x7265a2=readConfigFile(_0x14989c[_0x33eff3(0xc7)]),_0x1f3d3a=resolve(_0xf10e3,NEW_CONFIG_NAME),_0x5b35a5=_0x14989c['hasNewConfig']?readConfigFile(_0x1f3d3a):{};for(const [_0x16abc2,_0x2a1db1]of Object['entries'](_0x7265a2)){!(_0x16abc2 in _0x5b35a5)&&(_0x5b35a5[_0x16abc2]=_0x2a1db1);}writeConfigFile(_0x1f3d3a,_0x5b35a5);const _0x22c6a5=_0x14989c[_0x33eff3(0xc7)]+'.bak';return renameSync(_0x14989c[_0x33eff3(0xc7)],_0x22c6a5),{'step':0x1,'label':_0x33eff3(0xcf),'ok':!![],'detail':_0x14989c[_0x33eff3(0xc7)]+_0x33eff3(0x100)+_0x1f3d3a+_0x33eff3(0x139)+_0x22c6a5+')'};}function execRemoveOldArtifacts(_0x3e6580){const _0x452430=a177_0xe76108,_0x164f9a=[];for(const _0x16dc2d of _0x3e6580){try{if(!existsSync(_0x16dc2d))continue;const _0x5cda6c=tryStat(_0x16dc2d);_0x5cda6c?.[_0x452430(0xc4)]()?rmSync(_0x16dc2d,{'recursive':!![],'force':!![]}):unlinkSync(_0x16dc2d);}catch(_0x3859ce){_0x164f9a[_0x452430(0x11c)](_0x16dc2d+':\x20'+_0x3859ce[_0x452430(0x12f)]);}}return{'step':0x3,'label':_0x452430(0x136),'ok':_0x164f9a['length']===0x0,'detail':_0x164f9a[_0x452430(0xda)]>0x0?_0x3e6580[_0x452430(0xda)]-_0x164f9a[_0x452430(0xda)]+'/'+_0x3e6580[_0x452430(0xda)]+_0x452430(0xf4)+_0x164f9a[_0x452430(0xc9)](';\x20')+')':_0x3e6580[_0x452430(0xda)]+_0x452430(0xfc)};}function execCleanMcp(_0x25370c){const _0x13fc82=a177_0xe76108;if(!_0x25370c[_0x13fc82(0x122)])return{'step':0x4,'label':_0x13fc82(0xbf),'ok':!![],'detail':_0x13fc82(0xc2)};try{const _0x362512=readFileSync(_0x25370c[_0x13fc82(0x122)][_0x13fc82(0xe8)],_0x13fc82(0x128)),_0x455370=JSON[_0x13fc82(0xe2)](_0x362512);if(_0x455370?.['mcpServers']&&typeof _0x455370[_0x13fc82(0x10f)]===_0x13fc82(0xf3)){const _0x1cb431=[];for(const [_0x32c355,_0x2ae7e6]of Object[_0x13fc82(0x129)](_0x455370['mcpServers'])){_0x2ae7e6?.['args']&&Array[_0x13fc82(0x10a)](_0x2ae7e6[_0x13fc82(0xe5)])&&_0x2ae7e6['args'][_0x13fc82(0x131)](_0x233af5=>typeof _0x233af5===_0x13fc82(0xcd)&&_0x233af5['includes'](_0x13fc82(0xdf)))&&_0x1cb431[_0x13fc82(0x11c)](_0x32c355);}for(const _0x3d6b5c of _0x1cb431){delete _0x455370[_0x13fc82(0x10f)][_0x3d6b5c];}return _0x1cb431[_0x13fc82(0xda)]>0x0&&writeFileSync(_0x25370c[_0x13fc82(0x122)][_0x13fc82(0xe8)],JSON[_0x13fc82(0xca)](_0x455370,null,0x2)+'\x0a',_0x13fc82(0x128)),{'step':0x4,'label':_0x13fc82(0xbf),'ok':!![],'detail':_0x13fc82(0xc3)+_0x1cb431[_0x13fc82(0xc9)](',\x20')+'\x20from\x20'+_0x25370c[_0x13fc82(0x122)][_0x13fc82(0xe8)]};}return{'step':0x4,'label':_0x13fc82(0xbf),'ok':!![],'detail':_0x13fc82(0x110)};}catch(_0x2f41d0){return{'step':0x4,'label':_0x13fc82(0xbf),'ok':![],'detail':_0x2f41d0[_0x13fc82(0x12f)]};}}function execSkillsRemove(_0x37ac38,_0x29f44a){const _0x4f8e50=a177_0xe76108,_0x439eb3=runNpxSkillsRemove(_0x37ac38,{'stdio':'inherit','yes':_0x29f44a});return{'step':0x5,'label':_0x4f8e50(0x117),'ok':_0x439eb3['ok'],'detail':_0x439eb3['ok']?_0x4f8e50(0xf6):_0x439eb3['error']??'exit\x20'+_0x439eb3[_0x4f8e50(0x121)]};}function execSkillsAdd(_0x42d7f4,_0xc576f8){const _0x130993=a177_0xe76108,_0x29bf5d=runNpxSkillsAddGlobal(_0x42d7f4,_0x130993(0xf1),{'stdio':_0x130993(0xe0),'yes':_0xc576f8});return{'step':0x6,'label':_0x130993(0xfe),'ok':_0x29bf5d['ok'],'detail':_0x29bf5d['ok']?'lovrabet/rabetbase\x20installed\x20globally':_0x29bf5d[_0x130993(0xea)]??'exit\x20'+_0x29bf5d[_0x130993(0x121)]};}function execUpgradeSdk(_0x30bc6c){const _0x2044f3=a177_0xe76108;if(!_0x30bc6c[_0x2044f3(0x134)])return{'step':0x7,'label':_0x2044f3(0x124),'ok':!![],'detail':_0x2044f3(0x13d)};const {pkgPath:_0x16008c,currentVersion:_0x5b7e83,field:_0x3eb8bc}=_0x30bc6c[_0x2044f3(0x134)];try{const _0x3f120a=readFileSync(_0x16008c,_0x2044f3(0x128)),_0xeea447=JSON[_0x2044f3(0xe2)](_0x3f120a);return _0xeea447[_0x3eb8bc][_0x2044f3(0xee)]=_0x2044f3(0x140),writeFileSync(_0x16008c,JSON['stringify'](_0xeea447,null,0x2)+'\x0a','utf8'),{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0x3eb8bc+_0x2044f3(0xc1)+_0x5b7e83+_0x2044f3(0xc0)};}catch(_0x1fb689){return{'step':0x7,'label':_0x2044f3(0x124),'ok':![],'detail':_0x1fb689[_0x2044f3(0x12f)]};}}function tryStat(_0x27f61c){try{return statSync(_0x27f61c);}catch{return undefined;}}function a177_0x120f(){const _0x6be047=['3982008nSoqTd','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','push','.claude/skills/lovrabet','480HVLFZx','cyan','1108572lvrIAc','status','oldMcpConfig','not\x20needed','Upgrade\x20@lovrabet/sdk','===\x20Upgrade\x20Summary\x20===','122157cSZyGY','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','utf8','entries','24dQKyBe','red','package.json','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','message','fail','some','start','\x20\x20New\x20config\x20(.rabetbase.json):\x20','sdkUpgrade','not\x20found\x20or\x20already\x20at\x20latest','Remove\x20legacy\x20artifacts','not\x20found\x20(will\x20create)','28248DfFLvL','\x20(backup:\x20','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','\x20\x20\x20\x20\x20\x20\x20','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','values','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','latest','bold','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','Step\x206/7:\x20Installing\x20new\x20skill...','\x20\x20bun\x20install','4bcrkaR','step','Clean\x20MCP\x20config','\x20→\x20latest','[\x22@lovrabet/sdk\x22]:\x20','skipped','removed\x20','isDirectory','.lovrabet','Step\x204/7:\x20Cleaning\x20MCP\x20config...','oldPath','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','join','stringify','white','2053144PIkYMT','string','detail','Config\x20migration','failed','Proceed\x20with\x20upgrade?','\x20\x20#\x20or','includes','needed','===\x20Upgrade\x20Analysis\x20===','files','oldArtifacts','already\x20exists\x20(will\x20merge)','Upgrade\x20completed\x20successfully!','length','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','dependencies','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','Step\x204/7:\x20MCP\x20config\x20—\x20','@lovrabet/dataset-mcp-server','inherit','\x20\x20Current\x20version\x20in\x20','parse','Step\x201/7:\x20Config\x20migration\x20—\x20','MCP\x20config:','args','Remove\x20.lovrabet/','devDependencies','path','cwd','error','Skill\x20swap:','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','skipped\x20(no\x20legacy\x20config)','@lovrabet/sdk','.cursor/mcp.json','1106845SCVvLN','lovrabet/rabetbase','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','object','\x20removed\x20(','no\x20legacy\x20config\x20found','lovrabet/lovrabet-skill\x20removed','.lovrabet.json','fields','Legacy\x20artifacts:','Upgrade\x20cancelled.','\x20\x20Fields\x20to\x20migrate:\x20','\x20removed','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','Install\x20new\x20skill','\x20\x20Step\x20','\x20→\x20','Config\x20file:','succeed','keys','green','no\x20legacy\x20entry','yes','done','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','.cursor/rules/lovrabet_rules.mdc','isArray','info','FAIL','2051399ftCJFn','yellow','mcpServers','no\x20matching\x20entry\x20found','none\x20found','log','@lovrabet/sdk:','gray','filter','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','Remove\x20old\x20skill','.lovrabetrc','hasNewConfig'];a177_0x120f=function(){return _0x6be047;};return a177_0x120f();}function printSummary(_0x3200a7){const _0x39715f=a177_0xe76108;console[_0x39715f(0x112)](''),console[_0x39715f(0x112)](a177_0x592bca[_0x39715f(0x141)](_0x39715f(0x125))),console[_0x39715f(0x112)]('');for(const _0x38cf54 of _0x3200a7){const _0x8aed67=_0x38cf54['ok']?a177_0x592bca[_0x39715f(0x104)]('OK'):a177_0x592bca['red'](_0x39715f(0x10c));console['log']('\x20\x20'+_0x8aed67+_0x39715f(0xff)+_0x38cf54[_0x39715f(0xbe)]+':\x20'+_0x38cf54['label']);if(_0x38cf54[_0x39715f(0xce)])console[_0x39715f(0x112)](_0x39715f(0x13c)+a177_0x592bca[_0x39715f(0x114)](_0x38cf54[_0x39715f(0xce)]));}console[_0x39715f(0x112)]('');}export async function upgradeApp(_0x200b6a,_0x3131d0){const _0x552f59=a177_0xe76108,_0x49b660=process[_0x552f59(0xe9)](),_0x1b36b1=analyse(_0x49b660),_0x58ec7d=!_0x1b36b1['configMigration']&&_0x1b36b1[_0x552f59(0xd7)][_0x552f59(0xda)]===0x0&&!_0x1b36b1['oldMcpConfig']&&!_0x1b36b1['needsSkillSwap']&&!_0x1b36b1[_0x552f59(0x134)];if(_0x58ec7d){console[_0x552f59(0x112)](a177_0x592bca['green'](_0x552f59(0x12e)));return;}printReport(_0x1b36b1);const _0x3fab8c=!!(_0x3131d0[_0x552f59(0x106)]||_0x3131d0['Y']||_0x200b6a);if(!_0x3fab8c)try{const _0x3e0552=await askConfirm(_0x552f59(0xd1));if(!_0x3e0552){console[_0x552f59(0x112)](a177_0x592bca[_0x552f59(0x114)](_0x552f59(0xfa)));return;}}catch(_0x397986){if(_0x397986?.[_0x552f59(0x12f)]==='CANCEL'){console[_0x552f59(0x112)](a177_0x592bca[_0x552f59(0x114)](_0x552f59(0xfa)));return;}throw _0x397986;}const _0x5f5653=[],_0x4743be=a177_0xa97341({'text':'Step\x201/7:\x20Migrating\x20config...','color':_0x552f59(0x11f)})['start'](),_0x4fa16d=execConfigMigration(_0x1b36b1,_0x49b660);_0x5f5653[_0x552f59(0x11c)](_0x4fa16d),_0x4743be[_0x4fa16d['ok']?'succeed':_0x552f59(0x130)](_0x552f59(0xe3)+(_0x4fa16d[_0x552f59(0xce)]??(_0x4fa16d['ok']?'done':_0x552f59(0xd0))));const _0x5cc2a9=resolve(_0x49b660,_0x552f59(0xc5)),_0x5ff077=a177_0xa97341({'text':_0x552f59(0x12d),'color':_0x552f59(0x11f)})[_0x552f59(0x132)]();if(existsSync(_0x5cc2a9))try{rmSync(_0x5cc2a9,{'recursive':!![],'force':!![]}),_0x5ff077[_0x552f59(0x102)](_0x552f59(0x142)),_0x5f5653[_0x552f59(0x11c)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0x1093cf){_0x5ff077[_0x552f59(0x130)](_0x552f59(0xf2)+_0x1093cf[_0x552f59(0x12f)]),_0x5f5653[_0x552f59(0x11c)]({'step':0x2,'label':_0x552f59(0xe6),'ok':![],'detail':_0x1093cf[_0x552f59(0x12f)]});}else _0x5ff077[_0x552f59(0x10b)](_0x552f59(0xdb)),_0x5f5653['push']({'step':0x2,'label':_0x552f59(0xe6),'ok':!![],'detail':_0x552f59(0xc2)});const _0x163891=a177_0xa97341({'text':_0x552f59(0xfd),'color':'cyan'})[_0x552f59(0x132)](),_0x3d5e49=execRemoveOldArtifacts(_0x1b36b1['oldArtifacts']);_0x5f5653[_0x552f59(0x11c)](_0x3d5e49),_0x163891[_0x3d5e49['ok']?'succeed':_0x552f59(0x130)](_0x552f59(0x116)+(_0x3d5e49['detail']??(_0x3d5e49['ok']?_0x552f59(0x107):_0x552f59(0xd0))));const _0x4afdc4=a177_0xa97341({'text':_0x552f59(0xc6),'color':'cyan'})[_0x552f59(0x132)](),_0x3fe0ef=execCleanMcp(_0x1b36b1);_0x5f5653[_0x552f59(0x11c)](_0x3fe0ef),_0x4afdc4[_0x3fe0ef['ok']?_0x552f59(0x102):_0x552f59(0x130)](_0x552f59(0xde)+(_0x3fe0ef['detail']??(_0x3fe0ef['ok']?_0x552f59(0x107):_0x552f59(0xd0))));const _0x1a0b18=a177_0xa97341({'text':'Step\x205/7:\x20Removing\x20old\x20skill...','color':_0x552f59(0x11f)})[_0x552f59(0x132)](),_0x39bd8b=execSkillsRemove(_0x49b660,_0x3fab8c);_0x5f5653[_0x552f59(0x11c)](_0x39bd8b),_0x1a0b18[_0x39bd8b['ok']?'succeed':'fail'](_0x552f59(0x108)+(_0x39bd8b[_0x552f59(0xce)]??(_0x39bd8b['ok']?'done':_0x552f59(0xd0))));const _0x111d9a=a177_0xa97341({'text':_0x552f59(0x143),'color':_0x552f59(0x11f)})['start'](),_0x5db4f4=execSkillsAdd(_0x49b660,_0x3fab8c);_0x5f5653[_0x552f59(0x11c)](_0x5db4f4),_0x111d9a[_0x5db4f4['ok']?_0x552f59(0x102):_0x552f59(0x130)](_0x552f59(0x13a)+(_0x5db4f4[_0x552f59(0xce)]??(_0x5db4f4['ok']?_0x552f59(0x107):'failed')));const _0x5f8df=a177_0xa97341({'text':_0x552f59(0x13b),'color':'cyan'})[_0x552f59(0x132)](),_0x17af60=execUpgradeSdk(_0x1b36b1);_0x5f5653[_0x552f59(0x11c)](_0x17af60),_0x5f8df[_0x17af60['ok']?'succeed':_0x552f59(0x130)](_0x552f59(0x13f)+(_0x17af60[_0x552f59(0xce)]??(_0x17af60['ok']?'done':'failed'))),printSummary(_0x5f5653);const _0x4ad47e=_0x5f5653[_0x552f59(0x131)](_0x470643=>!_0x470643['ok']);_0x4ad47e?console[_0x552f59(0x112)](a177_0x592bca['yellow'](_0x552f59(0x11b))):console[_0x552f59(0x112)](a177_0x592bca[_0x552f59(0x104)](_0x552f59(0xd9))),_0x17af60['ok']&&_0x1b36b1[_0x552f59(0x134)]&&(console[_0x552f59(0x112)](''),console[_0x552f59(0x112)](a177_0x592bca[_0x552f59(0x141)][_0x552f59(0x11f)](_0x552f59(0x127))),console[_0x552f59(0x112)](a177_0x592bca[_0x552f59(0x11f)](_0x552f59(0xc8))),console[_0x552f59(0x112)](''),console[_0x552f59(0x112)](a177_0x592bca['white']('\x20\x20npm\x20install')),console[_0x552f59(0x112)](a177_0x592bca[_0x552f59(0xcb)](_0x552f59(0xd2))),console['log'](a177_0x592bca[_0x552f59(0xcb)](_0x552f59(0x144))),console[_0x552f59(0x112)](''));}
@@ -1 +1 @@
1
- const a178_0x13b4d9=a178_0x5088;(function(_0x1ad2f1,_0x2a8f45){const _0x5653e0=a178_0x5088,_0x24d6bd=_0x1ad2f1();while(!![]){try{const _0x116bfe=-parseInt(_0x5653e0(0x17b))/0x1*(-parseInt(_0x5653e0(0x16c))/0x2)+-parseInt(_0x5653e0(0x153))/0x3+parseInt(_0x5653e0(0x162))/0x4+parseInt(_0x5653e0(0x15b))/0x5+-parseInt(_0x5653e0(0x184))/0x6*(-parseInt(_0x5653e0(0x17c))/0x7)+-parseInt(_0x5653e0(0x160))/0x8*(parseInt(_0x5653e0(0x165))/0x9)+-parseInt(_0x5653e0(0x166))/0xa;if(_0x116bfe===_0x2a8f45)break;else _0x24d6bd['push'](_0x24d6bd['shift']());}catch(_0x357907){_0x24d6bd['push'](_0x24d6bd['shift']());}}}(a178_0x200a,0x6a9de));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';function a178_0x5088(_0x171245,_0x40bd0b){_0x171245=_0x171245-0x138;const _0x200aba=a178_0x200a();let _0x5088ff=_0x200aba[_0x171245];return _0x5088ff;}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{notificationDefinitions}from'../commands/notification/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{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();function a178_0x200a(){const _0x31dadc=['start','Platform\x20Issue','rabetbase\x20bff\x20create','Use\x20`','API\x20Development','Schema','rabetbase\x20workspace\x20use\x20--app\x20<name>','preview','Self\x20Update','commands','User\x20Accounts','page:react-publish','Authentication','service','rabetbase\x20page\x20data-list-status','page:custom-create','\x20\x20[write]','page:react-list','Run\x20Scripts','risk','defaultCommand','rabetbase\x20kb\x20update','<script>','Workspace','sql:new','description','knowledge-base:create','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','rabetbase\x20page\x20custom-update','`\x20instead.','Project','rabetbase\x20kb\x20create','388080TKdmwW','logout','rabetbase\x20kb\x20detail','permit:role-apis-set','rabetbase\x20app\x20list\x20--remote','menu:update','skills:install','rabetbase\x20cli-skill\x20install','3385745aANvqu','Notification\x20Configuration','permit:page-set','command','rabetbase\x20workspace\x20remove\x20<name>','1154960ZSGgmA','install','2697396RrLUEE','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','get','9OJaJEc','15768140MhtRJJ','build','Diagnostics','isSingleCommand','`rabetbase\x20','rabetbase\x20kb\x20list','2580LTZsag','Dataset\x20&\x20Operations','show','permit:role-menus','rabetbase\x20menu\x20asset-update','app:add','rabetbase\x20project\x20create\x20<project-name>','Deployment','knowledge-base:update','knowledge-base:list','Company\x20Knowledge\x20Base','page:standard-page-status','wildcardDef','Runtime\x20App\x20Config\x20Management','Backend\x20Function\x20Scripts','134diJwxa','890036kbhfDz','knowledge-base:delete','rabetbase\x20sql\x20create','Run\x20any\x20package.json\x20script','page:react-update','Tenant\x20Members','App\x20Management','File','36EpKtIZ','Async\x20Tasks','has','app:use','skill:','push','bff:new','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','write','app:remove','Menu','Database\x20Connections','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','`\x20has\x20been\x20removed.','read','rabetbase\x20page\x20custom-detail','set','data:getOne','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','from','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','Data\x20List\x20Pages\x20&\x20Custom\x20Pages','page:react-create','length','map','permit:page-get','values','CLI\x20Built-in\x20Skill','Configuration'];a178_0x200a=function(){return _0x31dadc;};return a178_0x200a();}export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x382a29){const _0x11400d=a178_0x5088;for(const _0x3ff978 of _0x382a29){definitions[_0x11400d(0x195)](_0x3ff978[_0x11400d(0x140)]+':'+_0x3ff978[_0x11400d(0x15e)],_0x3ff978);let _0x3c508c=serviceGroups['get'](_0x3ff978[_0x11400d(0x140)]);!_0x3c508c&&(_0x3c508c=[],serviceGroups[_0x11400d(0x195)](_0x3ff978[_0x11400d(0x140)],_0x3c508c)),_0x3c508c[_0x11400d(0x189)](_0x3ff978);}}function registerDeclarativeService(_0x3dc38c,_0x2ce073,_0x2cf569){const _0xeb6e45=a178_0x5088;registerDefinitions(_0x2ce073);_0x2cf569?.[_0xeb6e45(0x178)]&&registerDefinitions([_0x2cf569[_0xeb6e45(0x178)]]);const _0x500879=_0x2c7704=>_0x2c7704===_0xeb6e45(0x193)?'':_0x2c7704===_0xeb6e45(0x18c)?_0xeb6e45(0x143):'\x20\x20[high-risk-write]',_0x422629={'service':_0x2ce073[0x0]['service'],'label':_0x3dc38c,'commands':_0x2ce073['filter'](_0x3b31f4=>!_0x3b31f4['hidden'])[_0xeb6e45(0x19d)](_0x1d3a13=>({'command':_0x1d3a13['command'],'description':_0x1d3a13[_0xeb6e45(0x14c)],'tag':_0x500879(_0x1d3a13[_0xeb6e45(0x146)])})),'declarative':!![],'defaultCommand':_0x2cf569?.[_0xeb6e45(0x147)]??(_0x2cf569?.[_0xeb6e45(0x169)]?_0x2ce073[0x0][_0xeb6e45(0x15e)]:undefined),'wildcardDef':_0x2cf569?.['wildcardDef'],'isSingleCommand':_0x2cf569?.[_0xeb6e45(0x169)]};serviceRegistry['push'](_0x422629),serviceByName[_0xeb6e45(0x195)](_0x422629[_0xeb6e45(0x140)],_0x422629);}registerDeclarativeService(a178_0x13b4d9(0x151),projectDefinitions),registerDeclarativeService(a178_0x13b4d9(0x14a),workspaceDefinitions),registerDeclarativeService(a178_0x13b4d9(0x182),appDefinitions),registerDeclarativeService(a178_0x13b4d9(0x13f),authDefinitions,{'defaultCommand':'login'}),registerDeclarativeService(a178_0x13b4d9(0x181),tenantDefinitions),registerDeclarativeService(a178_0x13b4d9(0x13d),userAccountDefinitions),registerDeclarativeService(a178_0x13b4d9(0x16d),datasetDefinitions),registerDeclarativeService(a178_0x13b4d9(0x19a),pageDefinitions),registerDeclarativeService(a178_0x13b4d9(0x1a6),apiDefinitions),registerDeclarativeService(a178_0x13b4d9(0x17a),bffDefinitions),registerDeclarativeService(a178_0x13b4d9(0x15c),notificationDefinitions),registerDeclarativeService('SQL\x20Queries',sqlDefinitions),registerDeclarativeService(a178_0x13b4d9(0x18f),dbDefinitions),registerDeclarativeService(a178_0x13b4d9(0x173),deploymentDefinitions),registerDeclarativeService(a178_0x13b4d9(0x18e),menuDefinitions),registerDeclarativeService(a178_0x13b4d9(0x185),taskDefinitions),registerDeclarativeService('Roles',roleDefinitions),registerDeclarativeService(a178_0x13b4d9(0x179),appConfigDefinitions),registerDeclarativeService(a178_0x13b4d9(0x176),kbDefinitions),registerDeclarativeService(a178_0x13b4d9(0x1a3),issueDefinitions),registerDeclarativeService(a178_0x13b4d9(0x183),fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService(a178_0x13b4d9(0x1a1),configDefinitions),registerDeclarativeService(a178_0x13b4d9(0x168),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a178_0x13b4d9(0x138),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a178_0x13b4d9(0x13b),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a178_0x13b4d9(0x1a0),cliSkillDefinitions,{'defaultCommand':a178_0x13b4d9(0x161)}),registerDeclarativeService('Logs',logsDefinitions,{'defaultCommand':a178_0x13b4d9(0x16e)}),registerDeclarativeService(a178_0x13b4d9(0x145),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a178_0x13b4d9(0x19c)]-0x1];last[a178_0x13b4d9(0x13c)]=[{'command':a178_0x13b4d9(0x149),'description':a178_0x13b4d9(0x17f),'tag':'\x20\x20['+runDefinition[a178_0x13b4d9(0x146)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([['sql:save',a178_0x13b4d9(0x190)],[a178_0x13b4d9(0x18a),a178_0x13b4d9(0x1a4)],[a178_0x13b4d9(0x14b),a178_0x13b4d9(0x17e)],[a178_0x13b4d9(0x158),a178_0x13b4d9(0x170)],['project:init',a178_0x13b4d9(0x18b)],[a178_0x13b4d9(0x188),a178_0x13b4d9(0x15a)],['skill:install','rabetbase\x20cli-skill\x20install'],['skills:',a178_0x13b4d9(0x15a)],[a178_0x13b4d9(0x159),a178_0x13b4d9(0x15a)],['app:remote',a178_0x13b4d9(0x157)],[a178_0x13b4d9(0x187),a178_0x13b4d9(0x139)],[a178_0x13b4d9(0x171),a178_0x13b4d9(0x199)],[a178_0x13b4d9(0x18d),a178_0x13b4d9(0x15f)],[a178_0x13b4d9(0x175),a178_0x13b4d9(0x16b)],['knowledge-base:detail',a178_0x13b4d9(0x155)],[a178_0x13b4d9(0x14d),a178_0x13b4d9(0x152)],[a178_0x13b4d9(0x174),a178_0x13b4d9(0x148)],[a178_0x13b4d9(0x17d),'rabetbase\x20kb\x20delete'],['role:create','rabetbase\x20role\x20list'],['data:filter',a178_0x13b4d9(0x197)],[a178_0x13b4d9(0x196),a178_0x13b4d9(0x14e)],[a178_0x13b4d9(0x177),a178_0x13b4d9(0x141)],[a178_0x13b4d9(0x19b),a178_0x13b4d9(0x191)],[a178_0x13b4d9(0x142),a178_0x13b4d9(0x191)],[a178_0x13b4d9(0x144),'rabetbase\x20page\x20custom-list'],['page:react-detail',a178_0x13b4d9(0x194)],[a178_0x13b4d9(0x180),a178_0x13b4d9(0x14f)],[a178_0x13b4d9(0x13e),'rabetbase\x20page\x20custom-publish']]),REMOVED_COMMAND_HINTS=new Map([[a178_0x13b4d9(0x19e),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a178_0x13b4d9(0x15d),a178_0x13b4d9(0x163)],[a178_0x13b4d9(0x16f),a178_0x13b4d9(0x163)],['permit:role-menus-set',a178_0x13b4d9(0x163)],[a178_0x13b4d9(0x156),a178_0x13b4d9(0x163)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([['create',a178_0x13b4d9(0x172)],[a178_0x13b4d9(0x1a2),'rabetbase\x20run\x20start'],[a178_0x13b4d9(0x167),'rabetbase\x20run\x20build'],[a178_0x13b4d9(0x13a),'rabetbase\x20run\x20preview'],[a178_0x13b4d9(0x154),'rabetbase\x20auth\x20logout']]);export function resolveRemovedCommand(_0x1aeb05,_0x3b8397){const _0x1b94cb=a178_0x13b4d9;if(!_0x1aeb05)return undefined;const _0x5af7ae=REMOVED_COMMAND_REPLACEMENTS['get'](_0x1aeb05+':'+(_0x3b8397??'')),_0x344a0b=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x1b94cb(0x164)](_0x1aeb05),_0x3cbba0=_0x5af7ae??_0x344a0b,_0x692ff=REMOVED_COMMAND_HINTS[_0x1b94cb(0x164)](_0x1aeb05+':'+(_0x3b8397??''));if(!_0x3cbba0&&!_0x692ff)return undefined;const _0x130712=_0x344a0b?_0x1aeb05:_0x3b8397?_0x1aeb05+'\x20'+_0x3b8397:_0x1aeb05;return{'command':_0x130712,'message':_0x1b94cb(0x16a)+_0x130712+_0x1b94cb(0x192),'hint':_0x692ff??_0x1b94cb(0x1a5)+_0x3cbba0+_0x1b94cb(0x150)};}export function findDefinition(_0x15ace3,_0x4e6599){const _0x481316=a178_0x13b4d9;return definitions[_0x481316(0x164)](_0x15ace3+':'+_0x4e6599);}export function isKnownService(_0x3e9f06){const _0xa828a1=a178_0x13b4d9;return serviceByName[_0xa828a1(0x186)](_0x3e9f06);}export function isDeclarativeService(_0x174bdb){const _0x377383=a178_0x13b4d9;return serviceGroups['has'](_0x174bdb)||serviceByName[_0x377383(0x164)](_0x174bdb)?.['wildcardDef']!==undefined;}export function getServiceEntry(_0x462544){const _0x1740d7=a178_0x13b4d9;return serviceByName[_0x1740d7(0x164)](_0x462544);}export function getLegacyHandler(_0x517389,_0x97fea8){return undefined;}export function getAllDefinitions(){const _0xf830ac=a178_0x13b4d9;return Array[_0xf830ac(0x198)](definitions[_0xf830ac(0x19f)]());}
1
+ const a178_0x5ec3ef=a178_0x509d;(function(_0x30707a,_0x30825f){const _0x3c761a=a178_0x509d,_0x3e7cf1=_0x30707a();while(!![]){try{const _0x970350=-parseInt(_0x3c761a(0x14a))/0x1*(parseInt(_0x3c761a(0x13b))/0x2)+parseInt(_0x3c761a(0x188))/0x3+parseInt(_0x3c761a(0x159))/0x4*(-parseInt(_0x3c761a(0x180))/0x5)+-parseInt(_0x3c761a(0x187))/0x6*(-parseInt(_0x3c761a(0x129))/0x7)+parseInt(_0x3c761a(0x177))/0x8*(-parseInt(_0x3c761a(0x142))/0x9)+parseInt(_0x3c761a(0x17a))/0xa*(-parseInt(_0x3c761a(0x13c))/0xb)+parseInt(_0x3c761a(0x16b))/0xc*(parseInt(_0x3c761a(0x12e))/0xd);if(_0x970350===_0x30825f)break;else _0x3e7cf1['push'](_0x3e7cf1['shift']());}catch(_0x1eda7c){_0x3e7cf1['push'](_0x3e7cf1['shift']());}}}(a178_0x4ef1,0xd82a5));import{apiDefinitions}from'../commands/api/index.js';function a178_0x4ef1(){const _0x15638f=['permit:role-menus','rabetbase\x20kb\x20delete','CLI\x20Built-in\x20Skill','page:react-create','page:react-list','service','login','rabetbase\x20role\x20list','rabetbase\x20kb\x20update','rabetbase\x20cli-skill\x20install','Workspace','rabetbase\x20sql\x20create','2MDKILv','4130863njUUYj','project:init','start','rabetbase\x20bff\x20create','risk','get','18ODniGZ','Platform\x20Issue','sql:new','`\x20has\x20been\x20removed.','permit:page-set','Self\x20Update','page:react-update','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','70936OaQNdY','Data\x20List\x20Pages\x20&\x20Custom\x20Pages','rabetbase\x20page\x20custom-publish','menu:update','rabetbase\x20app\x20list\x20--remote','build','rabetbase\x20run\x20preview','rabetbase\x20page\x20custom-list','User\x20Accounts','wildcardDef','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','`\x20instead.','Company\x20Knowledge\x20Base','permit:role-apis-set','Menu','2404vLHmPV','has','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','app:add','isSingleCommand','rabetbase\x20menu\x20asset-update','Configuration','preview','Run\x20Scripts','Use\x20`','knowledge-base:update','API\x20Development','Code\x20Generation','show','defaultCommand','skills:','knowledge-base:create','description','204ZhlUJK','page:react-publish','Project','app:remote','set','Runtime\x20App\x20Config\x20Management','rabetbase\x20page\x20custom-update','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','rabetbase\x20kb\x20list','permit:role-menus-set','skills:install','read','1422824YdLyrA','app:use','app:remove','40pLpdIy','knowledge-base:detail','sql:save','File','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','Tenant\x20Members','590uypaRg','rabetbase\x20auth\x20logout','logout','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','OCR','rabetbase\x20workspace\x20use\x20--app\x20<name>','data:getOne','36eFMpYy','3554028aUXrzz','commands','skill:install','command','`rabetbase\x20','Notification\x20Configuration','length','rabetbase\x20project\x20create\x20<project-name>','Authentication','rabetbase\x20kb\x20create','permit:page-get','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','<script>','Deployment','Async\x20Tasks','\x20\x20[write]','role:create','298774LMjBxW','skill:','Diagnostics','values','bff:new','1104493trNKgI'];a178_0x4ef1=function(){return _0x15638f;};return a178_0x4ef1();}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{notificationDefinitions}from'../commands/notification/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{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(_0x2d332a){const _0x4cbb24=a178_0x509d;for(const _0x2e2188 of _0x2d332a){definitions[_0x4cbb24(0x16f)](_0x2e2188[_0x4cbb24(0x134)]+':'+_0x2e2188['command'],_0x2e2188);let _0x2dcdcd=serviceGroups['get'](_0x2e2188[_0x4cbb24(0x134)]);!_0x2dcdcd&&(_0x2dcdcd=[],serviceGroups[_0x4cbb24(0x16f)](_0x2e2188[_0x4cbb24(0x134)],_0x2dcdcd)),_0x2dcdcd['push'](_0x2e2188);}}function registerDeclarativeService(_0xa63187,_0x5b9f73,_0x7131c2){const _0x3626a1=a178_0x509d;registerDefinitions(_0x5b9f73);_0x7131c2?.[_0x3626a1(0x153)]&&registerDefinitions([_0x7131c2[_0x3626a1(0x153)]]);const _0x1b4e67=_0x6eefe8=>_0x6eefe8===_0x3626a1(0x176)?'':_0x6eefe8==='write'?_0x3626a1(0x197):'\x20\x20[high-risk-write]',_0x1a1cf9={'service':_0x5b9f73[0x0][_0x3626a1(0x134)],'label':_0xa63187,'commands':_0x5b9f73['filter'](_0x47dcec=>!_0x47dcec['hidden'])['map'](_0x3e6668=>({'command':_0x3e6668[_0x3626a1(0x18b)],'description':_0x3e6668[_0x3626a1(0x16a)],'tag':_0x1b4e67(_0x3e6668[_0x3626a1(0x140)])})),'declarative':!![],'defaultCommand':_0x7131c2?.[_0x3626a1(0x167)]??(_0x7131c2?.[_0x3626a1(0x15d)]?_0x5b9f73[0x0][_0x3626a1(0x18b)]:undefined),'wildcardDef':_0x7131c2?.[_0x3626a1(0x153)],'isSingleCommand':_0x7131c2?.['isSingleCommand']};serviceRegistry['push'](_0x1a1cf9),serviceByName['set'](_0x1a1cf9['service'],_0x1a1cf9);}registerDeclarativeService(a178_0x5ec3ef(0x16d),projectDefinitions),registerDeclarativeService(a178_0x5ec3ef(0x139),workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a178_0x5ec3ef(0x190),authDefinitions,{'defaultCommand':a178_0x5ec3ef(0x135)}),registerDeclarativeService(a178_0x5ec3ef(0x17f),tenantDefinitions),registerDeclarativeService(a178_0x5ec3ef(0x152),userAccountDefinitions),registerDeclarativeService('Dataset\x20&\x20Operations',datasetDefinitions),registerDeclarativeService(a178_0x5ec3ef(0x14b),pageDefinitions),registerDeclarativeService(a178_0x5ec3ef(0x164),apiDefinitions),registerDeclarativeService('Backend\x20Function\x20Scripts',bffDefinitions),registerDeclarativeService(a178_0x5ec3ef(0x18d),notificationDefinitions),registerDeclarativeService('SQL\x20Queries',sqlDefinitions),registerDeclarativeService('Database\x20Connections',dbDefinitions),registerDeclarativeService(a178_0x5ec3ef(0x195),deploymentDefinitions),registerDeclarativeService(a178_0x5ec3ef(0x158),menuDefinitions),registerDeclarativeService(a178_0x5ec3ef(0x196),taskDefinitions),registerDeclarativeService('Roles',roleDefinitions),registerDeclarativeService(a178_0x5ec3ef(0x170),appConfigDefinitions),registerDeclarativeService(a178_0x5ec3ef(0x156),kbDefinitions),registerDeclarativeService(a178_0x5ec3ef(0x143),issueDefinitions),registerDeclarativeService(a178_0x5ec3ef(0x17d),fileDefinitions),registerDeclarativeService(a178_0x5ec3ef(0x184),ocrDefinitions),registerDeclarativeService(a178_0x5ec3ef(0x165),codegenDefinitions),registerDeclarativeService(a178_0x5ec3ef(0x15f),configDefinitions),registerDeclarativeService(a178_0x5ec3ef(0x12b),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a178_0x5ec3ef(0x147),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a178_0x5ec3ef(0x131),cliSkillDefinitions,{'defaultCommand':'install'}),registerDeclarativeService('Logs',logsDefinitions,{'defaultCommand':a178_0x5ec3ef(0x166)}),registerDeclarativeService(a178_0x5ec3ef(0x161),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a178_0x5ec3ef(0x18e)]-0x1];last[a178_0x5ec3ef(0x189)]=[{'command':a178_0x5ec3ef(0x194),'description':'Run\x20any\x20package.json\x20script','tag':'\x20\x20['+runDefinition['risk']+']'}];}function a178_0x509d(_0x431877,_0x5b2d4b){_0x431877=_0x431877-0x128;const _0x4ef177=a178_0x4ef1();let _0x509d4e=_0x4ef177[_0x431877];return _0x509d4e;}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a178_0x5ec3ef(0x17c),a178_0x5ec3ef(0x15b)],[a178_0x5ec3ef(0x12d),a178_0x5ec3ef(0x13f)],[a178_0x5ec3ef(0x144),a178_0x5ec3ef(0x13a)],[a178_0x5ec3ef(0x14d),a178_0x5ec3ef(0x15e)],[a178_0x5ec3ef(0x13d),a178_0x5ec3ef(0x193)],[a178_0x5ec3ef(0x12a),a178_0x5ec3ef(0x138)],[a178_0x5ec3ef(0x18a),a178_0x5ec3ef(0x138)],[a178_0x5ec3ef(0x168),'rabetbase\x20cli-skill\x20install'],[a178_0x5ec3ef(0x175),'rabetbase\x20cli-skill\x20install'],[a178_0x5ec3ef(0x16e),a178_0x5ec3ef(0x14e)],[a178_0x5ec3ef(0x178),a178_0x5ec3ef(0x185)],[a178_0x5ec3ef(0x15c),a178_0x5ec3ef(0x154)],[a178_0x5ec3ef(0x179),'rabetbase\x20workspace\x20remove\x20<name>'],['knowledge-base:list',a178_0x5ec3ef(0x173)],[a178_0x5ec3ef(0x17b),'rabetbase\x20kb\x20detail'],[a178_0x5ec3ef(0x169),a178_0x5ec3ef(0x191)],[a178_0x5ec3ef(0x163),a178_0x5ec3ef(0x137)],['knowledge-base:delete',a178_0x5ec3ef(0x130)],[a178_0x5ec3ef(0x128),a178_0x5ec3ef(0x136)],['data:filter',a178_0x5ec3ef(0x149)],[a178_0x5ec3ef(0x186),a178_0x5ec3ef(0x183)],['page:standard-page-status','rabetbase\x20page\x20data-list-status'],[a178_0x5ec3ef(0x132),a178_0x5ec3ef(0x17e)],['page:custom-create',a178_0x5ec3ef(0x17e)],[a178_0x5ec3ef(0x133),a178_0x5ec3ef(0x151)],['page:react-detail','rabetbase\x20page\x20custom-detail'],[a178_0x5ec3ef(0x148),a178_0x5ec3ef(0x171)],[a178_0x5ec3ef(0x16c),a178_0x5ec3ef(0x14c)]]),REMOVED_COMMAND_HINTS=new Map([[a178_0x5ec3ef(0x192),a178_0x5ec3ef(0x172)],[a178_0x5ec3ef(0x146),a178_0x5ec3ef(0x172)],[a178_0x5ec3ef(0x12f),a178_0x5ec3ef(0x172)],[a178_0x5ec3ef(0x174),a178_0x5ec3ef(0x172)],[a178_0x5ec3ef(0x157),a178_0x5ec3ef(0x172)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([['create',a178_0x5ec3ef(0x18f)],[a178_0x5ec3ef(0x13e),'rabetbase\x20run\x20start'],[a178_0x5ec3ef(0x14f),'rabetbase\x20run\x20build'],[a178_0x5ec3ef(0x160),a178_0x5ec3ef(0x150)],[a178_0x5ec3ef(0x182),a178_0x5ec3ef(0x181)]]);export function resolveRemovedCommand(_0x7efe8c,_0x18fa8b){const _0x431634=a178_0x5ec3ef;if(!_0x7efe8c)return undefined;const _0x2477fe=REMOVED_COMMAND_REPLACEMENTS[_0x431634(0x141)](_0x7efe8c+':'+(_0x18fa8b??'')),_0x3a6ccd=REMOVED_FLAT_COMMAND_REPLACEMENTS['get'](_0x7efe8c),_0x5515a6=_0x2477fe??_0x3a6ccd,_0x41d838=REMOVED_COMMAND_HINTS['get'](_0x7efe8c+':'+(_0x18fa8b??''));if(!_0x5515a6&&!_0x41d838)return undefined;const _0x2940d2=_0x3a6ccd?_0x7efe8c:_0x18fa8b?_0x7efe8c+'\x20'+_0x18fa8b:_0x7efe8c;return{'command':_0x2940d2,'message':_0x431634(0x18c)+_0x2940d2+_0x431634(0x145),'hint':_0x41d838??_0x431634(0x162)+_0x5515a6+_0x431634(0x155)};}export function findDefinition(_0x54bf82,_0xea5ed6){const _0xcb63dc=a178_0x5ec3ef;return definitions[_0xcb63dc(0x141)](_0x54bf82+':'+_0xea5ed6);}export function isKnownService(_0x4cfe12){const _0x500a06=a178_0x5ec3ef;return serviceByName[_0x500a06(0x15a)](_0x4cfe12);}export function isDeclarativeService(_0xd7c805){const _0x41f347=a178_0x5ec3ef;return serviceGroups[_0x41f347(0x15a)](_0xd7c805)||serviceByName[_0x41f347(0x141)](_0xd7c805)?.[_0x41f347(0x153)]!==undefined;}export function getServiceEntry(_0x5b3139){const _0x509b2f=a178_0x5ec3ef;return serviceByName[_0x509b2f(0x141)](_0x5b3139);}export function getLegacyHandler(_0x3f2933,_0x2b4a5c){return undefined;}export function getAllDefinitions(){const _0x10fc57=a178_0x5ec3ef;return Array['from'](definitions[_0x10fc57(0x12c)]());}
@@ -1 +1 @@
1
- const a179_0x4744b2=a179_0x1236;function a179_0x1d24(){const _0x52cae8=['\x20(id=','delete','userCount','8wiwAPc','1286870VJUJLo','POST','565097TihkWt','3360644IJhJkC','Deleted\x20role\x20','role','Role\x20still\x20has\x20','high-risk-write','dev','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','appCode','621507okyLEc','596JxAHHi','7146351yErwPY','17230PURfKA','num','roleName','1730472SVBkRW'];a179_0x1d24=function(){return _0x52cae8;};return a179_0x1d24();}function a179_0x1236(_0x31e0f9,_0xdf737c){_0x31e0f9=_0x31e0f9-0x6a;const _0x1d24f5=a179_0x1d24();let _0x12361e=_0x1d24f5[_0x31e0f9];return _0x12361e;}(function(_0x42e8bb,_0x2b57ea){const _0x27cef0=a179_0x1236,_0x370cf3=_0x42e8bb();while(!![]){try{const _0x3a8237=-parseInt(_0x27cef0(0x75))/0x1+parseInt(_0x27cef0(0x73))/0x2+-parseInt(_0x27cef0(0x7e))/0x3+-parseInt(_0x27cef0(0x7f))/0x4*(parseInt(_0x27cef0(0x6b))/0x5)+-parseInt(_0x27cef0(0x6e))/0x6+parseInt(_0x27cef0(0x76))/0x7+-parseInt(_0x27cef0(0x72))/0x8*(-parseInt(_0x27cef0(0x6a))/0x9);if(_0x3a8237===_0x2b57ea)break;else _0x370cf3['push'](_0x370cf3['shift']());}catch(_0x271c09){_0x370cf3['push'](_0x370cf3['shift']());}}}(a179_0x1d24,0x53d8a));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH='/smartapi/permit/role/delete';export const roleDelete={'service':a179_0x4744b2(0x78),'command':'delete','description':a179_0x4744b2(0x7c),'risk':a179_0x4744b2(0x7a),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x21cd5c){const _0x2a5fd8=a179_0x4744b2,_0x3c02ad=_0x21cd5c[_0x2a5fd8(0x6c)]('id'),_0x207fbf=await getRoleById(_0x21cd5c[_0x2a5fd8(0x7d)],_0x3c02ad);return assertCustomRole(_0x207fbf,'delete'),asDryRunResult({'scope':_0x2a5fd8(0x7b),'operation':_0x2a5fd8(0x70),'selector':{'appCode':_0x21cd5c[_0x2a5fd8(0x7d)],'roleId':_0x3c02ad,'roleName':_0x207fbf[_0x2a5fd8(0x6d)]},'before':projectRole(_0x207fbf),'after':null,'dryRun':!![],'backend':{'method':_0x2a5fd8(0x74),'path':DELETE_PATH},'warnings':_0x207fbf['userCount']>0x0?[_0x2a5fd8(0x79)+_0x207fbf[_0x2a5fd8(0x71)]+'\x20member(s);\x20they\x20will\x20lose\x20this\x20group.']:[]},{'method':_0x2a5fd8(0x74),'url':DELETE_PATH});},async 'execute'(_0x4ad069){const _0x5d4a00=a179_0x4744b2,_0x4d3479=_0x4ad069[_0x5d4a00(0x6c)]('id'),_0x31f0c5=await getRoleById(_0x4ad069[_0x5d4a00(0x7d)],_0x4d3479);return assertCustomRole(_0x31f0c5,'delete'),await deleteAppRole(_0x4d3479),{'ok':!![],'data':{'scope':_0x5d4a00(0x7b),'operation':_0x5d4a00(0x70),'selector':{'appCode':_0x4ad069[_0x5d4a00(0x7d)],'roleId':_0x4d3479,'roleName':_0x31f0c5[_0x5d4a00(0x6d)]},'before':projectRole(_0x31f0c5),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[]},'message':_0x5d4a00(0x77)+_0x31f0c5['roleName']+_0x5d4a00(0x6f)+_0x4d3479+')'};}};
1
+ const a179_0x5c98e7=a179_0x1955;(function(_0x4d0624,_0x3521a7){const _0x22851c=a179_0x1955,_0x4fd409=_0x4d0624();while(!![]){try{const _0x1d097d=parseInt(_0x22851c(0x19f))/0x1+parseInt(_0x22851c(0x192))/0x2*(parseInt(_0x22851c(0x197))/0x3)+-parseInt(_0x22851c(0x1a1))/0x4+-parseInt(_0x22851c(0x191))/0x5+-parseInt(_0x22851c(0x194))/0x6+parseInt(_0x22851c(0x19b))/0x7*(-parseInt(_0x22851c(0x19a))/0x8)+parseInt(_0x22851c(0x198))/0x9*(parseInt(_0x22851c(0x1a3))/0xa);if(_0x1d097d===_0x3521a7)break;else _0x4fd409['push'](_0x4fd409['shift']());}catch(_0x28258e){_0x4fd409['push'](_0x4fd409['shift']());}}}(a179_0x5801,0x58f6e));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a179_0x5801(){const _0x44e4d9=['dev','\x20(id=','3140015yQDMwC','26WlevBZ','roleName','761610nEfLcj','delete','high-risk-write','119478aEQRhy','9WrmPqh','appCode','3969176jcGbup','7WLIXZs','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','num','Deleted\x20role\x20','448911XnzBoU','Role\x20still\x20has\x20','521980aZRHvm','userCount','7793290IrsbLk','POST','role'];a179_0x5801=function(){return _0x44e4d9;};return a179_0x5801();}import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a179_0x1955(_0x3cbcf0,_0x559c83){_0x3cbcf0=_0x3cbcf0-0x191;const _0x5801be=a179_0x5801();let _0x195528=_0x5801be[_0x3cbcf0];return _0x195528;}const DELETE_PATH='/smartapi/permit/role/delete';export const roleDelete={'service':a179_0x5c98e7(0x1a5),'command':'delete','description':'Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','risk':a179_0x5c98e7(0x196),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x53e4ec){const _0x4f178e=a179_0x5c98e7,_0x123ec6=_0x53e4ec[_0x4f178e(0x19d)]('id'),_0x2976c6=await getRoleById(_0x53e4ec[_0x4f178e(0x199)],_0x123ec6);return assertCustomRole(_0x2976c6,_0x4f178e(0x195)),asDryRunResult({'scope':_0x4f178e(0x1a6),'operation':_0x4f178e(0x195),'selector':{'appCode':_0x53e4ec[_0x4f178e(0x199)],'roleId':_0x123ec6,'roleName':_0x2976c6['roleName']},'before':projectRole(_0x2976c6),'after':null,'dryRun':!![],'backend':{'method':_0x4f178e(0x1a4),'path':DELETE_PATH},'warnings':_0x2976c6[_0x4f178e(0x1a2)]>0x0?[_0x4f178e(0x1a0)+_0x2976c6[_0x4f178e(0x1a2)]+_0x4f178e(0x19c)]:[]},{'method':_0x4f178e(0x1a4),'url':DELETE_PATH});},async 'execute'(_0x4ac405){const _0x29cbc4=a179_0x5c98e7,_0x4530d9=_0x4ac405['num']('id'),_0x11a686=await getRoleById(_0x4ac405['appCode'],_0x4530d9);return assertCustomRole(_0x11a686,_0x29cbc4(0x195)),await deleteAppRole(_0x4530d9),{'ok':!![],'data':{'scope':_0x29cbc4(0x1a6),'operation':'delete','selector':{'appCode':_0x4ac405['appCode'],'roleId':_0x4530d9,'roleName':_0x11a686[_0x29cbc4(0x193)]},'before':projectRole(_0x11a686),'after':null,'dryRun':![],'backend':{'method':_0x29cbc4(0x1a4),'path':DELETE_PATH},'warnings':[]},'message':_0x29cbc4(0x19e)+_0x11a686[_0x29cbc4(0x193)]+_0x29cbc4(0x1a7)+_0x4530d9+')'};}};
@@ -1 +1 @@
1
- const a180_0x2679b6=a180_0x31a1;function a180_0x31a1(_0x58dcd3,_0x5a6637){_0x58dcd3=_0x58dcd3-0x177;const _0x3e7eab=a180_0x3e7e();let _0x31a11c=_0x3e7eab[_0x58dcd3];return _0x31a11c;}function a180_0x3e7e(){const _0x731f46=['87HwpqoV','124748iRemOQ','6uoZrce','873351pKDrwR','5841544gUIsWq','6ySTZRf','num','3218677zbYICy','read','11QqXlmP','role','appCode','127207BniiRF','90eBuaLn','1062350glKALg','roleType','Show\x20a\x20single\x20role\x27s\x20detail','16968012WsZMzi'];a180_0x3e7e=function(){return _0x731f46;};return a180_0x3e7e();}(function(_0x19b2ad,_0x55d6c1){const _0x4c58f5=a180_0x31a1,_0x4053c6=_0x19b2ad();while(!![]){try{const _0x4f51c4=-parseInt(_0x4c58f5(0x187))/0x1*(parseInt(_0x4c58f5(0x17d))/0x2)+-parseInt(_0x4c58f5(0x17b))/0x3*(-parseInt(_0x4c58f5(0x17c))/0x4)+parseInt(_0x4c58f5(0x177))/0x5+-parseInt(_0x4c58f5(0x180))/0x6*(parseInt(_0x4c58f5(0x182))/0x7)+parseInt(_0x4c58f5(0x17f))/0x8+-parseInt(_0x4c58f5(0x17e))/0x9*(-parseInt(_0x4c58f5(0x188))/0xa)+parseInt(_0x4c58f5(0x184))/0xb*(-parseInt(_0x4c58f5(0x17a))/0xc);if(_0x4f51c4===_0x55d6c1)break;else _0x4053c6['push'](_0x4053c6['shift']());}catch(_0x22259f){_0x4053c6['push'](_0x4053c6['shift']());}}}(a180_0x3e7e,0x7186c));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a180_0x2679b6(0x185),'command':'detail','description':a180_0x2679b6(0x179),'risk':a180_0x2679b6(0x183),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x418260){const _0x488ee0=a180_0x2679b6,_0x25f160=_0x418260[_0x488ee0(0x181)]('id'),_0x4e4576=await getRoleById(_0x418260[_0x488ee0(0x186)],_0x25f160);return{'ok':!![],'data':{'scope':'dev','role':projectRole(_0x4e4576)},'message':'Role\x20'+_0x4e4576['roleName']+'\x20('+_0x4e4576[_0x488ee0(0x178)]+')'};}};
1
+ function a180_0x348c(_0x299ae1,_0x2e1634){_0x299ae1=_0x299ae1-0x177;const _0x898e=a180_0x898e();let _0x348c00=_0x898e[_0x299ae1];return _0x348c00;}function a180_0x898e(){const _0x126c20=['7570435IrZggk','num','read','2DnVwWy','7135618EPnnxu','roleName','2395116vIUeNe','5765968RncKds','3268626tsEHch','detail','Role\x20','1360529LmvEdN','Show\x20a\x20single\x20role\x27s\x20detail','9051592TVlTDc'];a180_0x898e=function(){return _0x126c20;};return a180_0x898e();}const a180_0x2ebcf9=a180_0x348c;(function(_0xee948a,_0x5e3383){const _0x2ac628=a180_0x348c,_0x1f5a34=_0xee948a();while(!![]){try{const _0x406220=parseInt(_0x2ac628(0x178))/0x1*(parseInt(_0x2ac628(0x17e))/0x2)+-parseInt(_0x2ac628(0x181))/0x3+parseInt(_0x2ac628(0x182))/0x4+-parseInt(_0x2ac628(0x17b))/0x5+parseInt(_0x2ac628(0x183))/0x6+parseInt(_0x2ac628(0x17f))/0x7+-parseInt(_0x2ac628(0x17a))/0x8;if(_0x406220===_0x5e3383)break;else _0x1f5a34['push'](_0x1f5a34['shift']());}catch(_0x26d0eb){_0x1f5a34['push'](_0x1f5a34['shift']());}}}(a180_0x898e,0xe1292));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':a180_0x2ebcf9(0x184),'description':a180_0x2ebcf9(0x179),'risk':a180_0x2ebcf9(0x17d),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3d353b){const _0x293d3d=a180_0x2ebcf9,_0x5f407a=_0x3d353b[_0x293d3d(0x17c)]('id'),_0xe3b0b3=await getRoleById(_0x3d353b['appCode'],_0x5f407a);return{'ok':!![],'data':{'scope':'dev','role':projectRole(_0xe3b0b3)},'message':_0x293d3d(0x177)+_0xe3b0b3[_0x293d3d(0x180)]+'\x20('+_0xe3b0b3['roleType']+')'};}};
@@ -1 +1 @@
1
- (function(_0x32a8a3,_0x3e7cd0){const _0x3f7ad3=a181_0xd669,_0x2e27fc=_0x32a8a3();while(!![]){try{const _0x3676c4=parseInt(_0x3f7ad3(0x104))/0x1+parseInt(_0x3f7ad3(0x101))/0x2+parseInt(_0x3f7ad3(0x100))/0x3+-parseInt(_0x3f7ad3(0x102))/0x4*(parseInt(_0x3f7ad3(0xff))/0x5)+parseInt(_0x3f7ad3(0x106))/0x6*(-parseInt(_0x3f7ad3(0x103))/0x7)+parseInt(_0x3f7ad3(0xfe))/0x8+parseInt(_0x3f7ad3(0x105))/0x9;if(_0x3676c4===_0x3e7cd0)break;else _0x2e27fc['push'](_0x2e27fc['shift']());}catch(_0x20c60c){_0x2e27fc['push'](_0x2e27fc['shift']());}}}(a181_0x21ad,0x69d56));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 a181_0x21ad(){const _0x207176=['55TGSyQu','1555545GHbjip','336476jaQJSm','261628YlATqY','7DaXwTV','239197cCAffd','5497794WaCUrk','2984532lPQJDI','908616XkmcHv'];a181_0x21ad=function(){return _0x207176;};return a181_0x21ad();}import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';function a181_0xd669(_0x8587e8,_0x566d1e){_0x8587e8=_0x8587e8-0xfe;const _0x21adbc=a181_0x21ad();let _0xd669e1=_0x21adbc[_0x8587e8];return _0xd669e1;}export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
1
+ (function(_0x5e1736,_0x3b4189){const _0x16ccbb=a181_0x55d3,_0x4c2ea2=_0x5e1736();while(!![]){try{const _0x4788b3=-parseInt(_0x16ccbb(0x13f))/0x1*(-parseInt(_0x16ccbb(0x142))/0x2)+-parseInt(_0x16ccbb(0x140))/0x3+-parseInt(_0x16ccbb(0x143))/0x4+-parseInt(_0x16ccbb(0x13c))/0x5+-parseInt(_0x16ccbb(0x144))/0x6*(parseInt(_0x16ccbb(0x141))/0x7)+-parseInt(_0x16ccbb(0x13b))/0x8*(parseInt(_0x16ccbb(0x13d))/0x9)+parseInt(_0x16ccbb(0x13e))/0xa;if(_0x4788b3===_0x3b4189)break;else _0x4c2ea2['push'](_0x4c2ea2['shift']());}catch(_0x77be40){_0x4c2ea2['push'](_0x4c2ea2['shift']());}}}(a181_0x27ec,0xc9dc7));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleUpdate}from'../../commands/role/update.js';function a181_0x55d3(_0x4c50d3,_0x183d16){_0x4c50d3=_0x4c50d3-0x13b;const _0x27ec99=a181_0x27ec();let _0x55d374=_0x27ec99[_0x4c50d3];return _0x55d374;}import{roleDelete}from'../../commands/role/delete.js';function a181_0x27ec(){const _0x32210e=['981dejtvz','29589560ykvyyR','60807YuLvAK','1249779sGPcoh','5201cFFLJc','38aUHmPe','4063880eoSiwJ','2928EUQAVn','109184GmEIDv','23435vqJiKb'];a181_0x27ec=function(){return _0x32210e;};return a181_0x27ec();}import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
@@ -1 +1 @@
1
- const a182_0x514ebe=a182_0x4268;function a182_0x4268(_0x2ffc3c,_0x158736){_0x2ffc3c=_0x2ffc3c-0x164;const _0x3b2e2c=a182_0x3b2e();let _0x426899=_0x3b2e2c[_0x2ffc3c];return _0x426899;}(function(_0x5e2ddb,_0x1c790f){const _0x52119b=a182_0x4268,_0x314413=_0x5e2ddb();while(!![]){try{const _0x20e46f=-parseInt(_0x52119b(0x188))/0x1*(parseInt(_0x52119b(0x16b))/0x2)+parseInt(_0x52119b(0x176))/0x3+parseInt(_0x52119b(0x16c))/0x4+-parseInt(_0x52119b(0x166))/0x5*(parseInt(_0x52119b(0x174))/0x6)+parseInt(_0x52119b(0x16a))/0x7+parseInt(_0x52119b(0x177))/0x8+parseInt(_0x52119b(0x173))/0x9*(-parseInt(_0x52119b(0x17d))/0xa);if(_0x20e46f===_0x1c790f)break;else _0x314413['push'](_0x314413['shift']());}catch(_0x350175){_0x314413['push'](_0x314413['shift']());}}}(a182_0x3b2e,0x5d795));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=['ADMIN','DEV',a182_0x514ebe(0x184),a182_0x514ebe(0x16e)];function a182_0x3b2e(){const _0x412c0e=['map','478455hwVUlh','3703480DVOEIx','number','Invalid\x20--type\x20\x22','includes','list','page','10XkjFuu','Page\x20index\x20(1-based)','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','toUpperCase','filter','roleType','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','OWNER','Found\x20','Use\x20one\x20of:\x20','pagesize','499879fvGTiK','validation','type','read','5HcgIrI','\x20role(s)','string','Filter\x20by\x20role\x20type','4214105tvMzER','2SSwDdF','475160cCrLmh','Page\x20size\x20(1-100)','CUSTOM','trim','str','num','join','15084QQhcej','2752806TWmXwZ'];a182_0x3b2e=function(){return _0x412c0e;};return a182_0x3b2e();}export const roleList={'service':'role','command':a182_0x514ebe(0x17b),'description':a182_0x514ebe(0x17f),'risk':a182_0x514ebe(0x165),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a182_0x514ebe(0x168),'required':![],'description':a182_0x514ebe(0x169),'enum':ROLE_TYPES},{'name':a182_0x514ebe(0x17c),'type':a182_0x514ebe(0x178),'description':a182_0x514ebe(0x17e),'default':0x1},{'name':'pagesize','type':a182_0x514ebe(0x178),'description':a182_0x514ebe(0x16d),'default':0x64}],async 'validate'(_0x37f84c){const _0x13b47c=a182_0x514ebe,_0x25fb79=_0x37f84c['str'](_0x13b47c(0x164))['trim']();if(_0x25fb79&&!ROLE_TYPES[_0x13b47c(0x17a)](_0x25fb79['toUpperCase']()))throw CliErrors[_0x13b47c(0x189)](_0x13b47c(0x179)+_0x25fb79+'\x22.',_0x13b47c(0x186)+ROLE_TYPES[_0x13b47c(0x172)](',\x20')+'.');const _0x1f1ada=_0x37f84c[_0x13b47c(0x171)]('page',0x1),_0x4065ec=_0x37f84c[_0x13b47c(0x171)]('pagesize',0x64);if(_0x1f1ada<0x1)throw CliErrors[_0x13b47c(0x189)](_0x13b47c(0x183));if(_0x4065ec<0x1||_0x4065ec>0x64)throw CliErrors[_0x13b47c(0x189)]('--pagesize\x20must\x20be\x20between\x201\x20and\x20100.');},async 'execute'(_0x58e72){const _0x171414=a182_0x514ebe,_0x30d632=_0x58e72[_0x171414(0x171)](_0x171414(0x17c),0x1)||0x1,_0x1b889c=_0x58e72[_0x171414(0x171)](_0x171414(0x187),0x64)||0x64,_0x40579d=_0x58e72[_0x171414(0x170)]('type')[_0x171414(0x16f)]()[_0x171414(0x180)](),{items:_0x6fc5c,paging:_0x19840f}=await listAppRoles(_0x58e72['appCode'],{'currentPage':_0x30d632,'pageSize':_0x1b889c}),_0x4d3ed0=_0x40579d?_0x6fc5c[_0x171414(0x181)](_0x3b7552=>_0x3b7552[_0x171414(0x182)]===_0x40579d):_0x6fc5c,_0x2aed3a=_0x4d3ed0[_0x171414(0x175)](projectRole);return{'ok':!![],'data':{'scope':'dev','roles':_0x2aed3a,'paging':_0x19840f},'message':_0x171414(0x185)+_0x2aed3a['length']+_0x171414(0x167)};}};
1
+ const a182_0x11ea8d=a182_0x440d;(function(_0x103867,_0x19ffa7){const _0x52ce55=a182_0x440d,_0x1e2a10=_0x103867();while(!![]){try{const _0x5aee53=parseInt(_0x52ce55(0xf6))/0x1*(parseInt(_0x52ce55(0xe5))/0x2)+parseInt(_0x52ce55(0xf9))/0x3*(parseInt(_0x52ce55(0xd6))/0x4)+-parseInt(_0x52ce55(0xde))/0x5+-parseInt(_0x52ce55(0xe0))/0x6*(-parseInt(_0x52ce55(0xdb))/0x7)+parseInt(_0x52ce55(0xeb))/0x8*(-parseInt(_0x52ce55(0xe8))/0x9)+parseInt(_0x52ce55(0xfa))/0xa+-parseInt(_0x52ce55(0xe9))/0xb;if(_0x5aee53===_0x19ffa7)break;else _0x1e2a10['push'](_0x1e2a10['shift']());}catch(_0x33e3c0){_0x1e2a10['push'](_0x1e2a10['shift']());}}}(a182_0x291e,0x746d9));import{listAppRoles}from'../../core/api-client.js';function a182_0x291e(){const _0x31cb03=['Filter\x20by\x20role\x20type','433131exluXs','7030150lbXePi','string','4Jwkcge','number','appCode','Use\x20one\x20of:\x20','pagesize','83573sABoyj','\x20role(s)','read','4591420DEfbwH','Found\x20','318ZpIOqL','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','CUSTOM','filter','type','4zglziU','validation','toUpperCase','1318635usTxPL','1585408hFEvRz','roleType','32vQTHUg','list','num','str','Invalid\x20--type\x20\x22','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','OWNER','role','trim','map','DEV','322601RSnwxC','page'];a182_0x291e=function(){return _0x31cb03;};return a182_0x291e();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a182_0x440d(_0x110fab,_0x2161a2){_0x110fab=_0x110fab-0xd6;const _0x291e5e=a182_0x291e();let _0x440db0=_0x291e5e[_0x110fab];return _0x440db0;}import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=['ADMIN',a182_0x11ea8d(0xf5),a182_0x11ea8d(0xf1),a182_0x11ea8d(0xe2)];export const roleList={'service':a182_0x11ea8d(0xf2),'command':a182_0x11ea8d(0xec),'description':a182_0x11ea8d(0xf0),'risk':a182_0x11ea8d(0xdd),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a182_0x11ea8d(0xe4),'type':a182_0x11ea8d(0xfb),'required':![],'description':a182_0x11ea8d(0xf8),'enum':ROLE_TYPES},{'name':a182_0x11ea8d(0xf7),'type':'number','description':'Page\x20index\x20(1-based)','default':0x1},{'name':a182_0x11ea8d(0xda),'type':a182_0x11ea8d(0xd7),'description':'Page\x20size\x20(1-100)','default':0x64}],async 'validate'(_0x3e79db){const _0x433e80=a182_0x11ea8d,_0x4d6cec=_0x3e79db[_0x433e80(0xee)](_0x433e80(0xe4))[_0x433e80(0xf3)]();if(_0x4d6cec&&!ROLE_TYPES['includes'](_0x4d6cec[_0x433e80(0xe7)]()))throw CliErrors['validation'](_0x433e80(0xef)+_0x4d6cec+'\x22.',_0x433e80(0xd9)+ROLE_TYPES['join'](',\x20')+'.');const _0x17ff84=_0x3e79db[_0x433e80(0xed)]('page',0x1),_0x26bfe6=_0x3e79db[_0x433e80(0xed)](_0x433e80(0xda),0x64);if(_0x17ff84<0x1)throw CliErrors['validation'](_0x433e80(0xe1));if(_0x26bfe6<0x1||_0x26bfe6>0x64)throw CliErrors[_0x433e80(0xe6)]('--pagesize\x20must\x20be\x20between\x201\x20and\x20100.');},async 'execute'(_0x45c085){const _0x68f561=a182_0x11ea8d,_0x29bdee=_0x45c085[_0x68f561(0xed)](_0x68f561(0xf7),0x1)||0x1,_0x540429=_0x45c085[_0x68f561(0xed)]('pagesize',0x64)||0x64,_0xbc1414=_0x45c085[_0x68f561(0xee)](_0x68f561(0xe4))['trim']()[_0x68f561(0xe7)](),{items:_0xe98a5c,paging:_0x1e13d1}=await listAppRoles(_0x45c085[_0x68f561(0xd8)],{'currentPage':_0x29bdee,'pageSize':_0x540429}),_0x1f933f=_0xbc1414?_0xe98a5c[_0x68f561(0xe3)](_0x56b4ef=>_0x56b4ef[_0x68f561(0xea)]===_0xbc1414):_0xe98a5c,_0x30f884=_0x1f933f[_0x68f561(0xf4)](projectRole);return{'ok':!![],'data':{'scope':'dev','roles':_0x30f884,'paging':_0x1e13d1},'message':_0x68f561(0xdf)+_0x30f884['length']+_0x68f561(0xdc)};}};
@@ -1 +1 @@
1
- const a183_0x2451d0=a183_0x8262;(function(_0x5d95be,_0x287b39){const _0x1e630a=a183_0x8262,_0x48752e=_0x5d95be();while(!![]){try{const _0x26e2a9=parseInt(_0x1e630a(0xc0))/0x1+parseInt(_0x1e630a(0xbf))/0x2+parseInt(_0x1e630a(0xa7))/0x3*(-parseInt(_0x1e630a(0x90))/0x4)+-parseInt(_0x1e630a(0x8a))/0x5*(parseInt(_0x1e630a(0xad))/0x6)+-parseInt(_0x1e630a(0xc4))/0x7*(parseInt(_0x1e630a(0xa4))/0x8)+parseInt(_0x1e630a(0xce))/0x9*(-parseInt(_0x1e630a(0x86))/0xa)+parseInt(_0x1e630a(0x83))/0xb;if(_0x26e2a9===_0x287b39)break;else _0x48752e['push'](_0x48752e['shift']());}catch(_0x5c1255){_0x48752e['push'](_0x48752e['shift']());}}}(a183_0x246c,0x88fae));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':a183_0x2451d0(0xb3),'required':!![],'description':a183_0x2451d0(0x98)};export const ROLE_REF_FLAG={'name':a183_0x2451d0(0xcb),'type':a183_0x2451d0(0xb8),'required':!![],'description':a183_0x2451d0(0x82)};export const USER_REF_FLAG={'name':a183_0x2451d0(0x8d),'type':'string','required':!![],'description':'User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId'};export const NAME_FLAG={'name':'name','type':a183_0x2451d0(0xb8),'required':!![],'description':a183_0x2451d0(0xb1)};export const USER_NAME_FLAG={'name':a183_0x2451d0(0xbd),'type':'string','required':!![],'description':a183_0x2451d0(0xaf)};function a183_0x8262(_0x342ac1,_0x59115c){_0x342ac1=_0x342ac1-0x82;const _0x246c4b=a183_0x246c();let _0x826231=_0x246c4b[_0x342ac1];return _0x826231;}export const REMARK_FLAG={'name':a183_0x2451d0(0xb4),'type':a183_0x2451d0(0xb8),'required':![],'description':a183_0x2451d0(0x92)};export const EXPECT_USER_COUNT_FLAG={'name':a183_0x2451d0(0xa6),'type':'number','required':![],'description':a183_0x2451d0(0xa8)};function a183_0x246c(){const _0x4f40d0=['Role\x20id\x20(from\x20`role\x20list`)','tenant','nickname','\x20duplicate\x20memberships\x20for\x20user\x20','No\x20tenant\x20member\x20matches\x20\x22','includes','find','\x20not\x20found\x20in\x20app\x20','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.','User\x20','validation','tenant_code','7789048pTLSlc','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','expect-user-count','578268DTgzYA','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','userId','/smartapi/permit/user-role/delete','permitCount','Missing\x20user\x20reference.','126dBHpjx','authRequired','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','Pass\x20--user\x20<id|name>.','Role\x20name','Missing\x20role\x20reference.','number','remark','\x20built-in\x20role\x20','roleName','POST','string','OWNER','appCode','filter','totalCount','name','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','1413980ehiwEG','228775dPtpGd','length','CUSTOM','Cannot\x20','7otJoPz','push','/smartapi/permit/user-role/create','username','map','Anti-drift\x20check\x20failed:\x20expected\x20','Multiple\x20tenant\x20members\x20match\x20\x22','role','Check\x20the\x20nickname/username.\x20',';\x20no\x20change.','9963144QzafAr','str','Role\x20id\x20or\x20exact\x20role\x20name','22688743pGByrN','expectUserCount','Pass\x20--role\x20<id|name>.','10BgGlcw','join','test','Role\x20name\x20\x22','39025yEWGVQ','\x20member(s)\x20but\x20role\x20has\x20','Pass\x20--user\x20<id>.','user','toLowerCase','flagMissing','4JCmYIF','ADMIN','Optional\x20role\x20remark/description','roleType','\x20members\x20of\x20the\x20OWNER\x20role.','trim','userCount','\x20is\x20already\x20a\x20member\x20of\x20role\x20'];a183_0x246c=function(){return _0x4f40d0;};return a183_0x246c();}export const BUILTIN_ROLE_TYPES=[a183_0x2451d0(0x91),'DEV',a183_0x2451d0(0xb9)];export function isBuiltinRole(_0x242769){return BUILTIN_ROLE_TYPES['includes'](_0x242769);}export function assertCustomRole(_0x55bcac,_0x3442f0){const _0x195357=a183_0x2451d0;if(_0x55bcac[_0x195357(0x93)]!==_0x195357(0xc2))throw CliErrors[_0x195357(0xa2)](_0x195357(0xc3)+_0x3442f0+_0x195357(0xb5)+_0x55bcac['roleName']+'\x20('+_0x55bcac[_0x195357(0x93)]+').','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.');}export function projectRole(_0x5d479c){const _0x2d0192=a183_0x2451d0;return{'id':_0x5d479c['id'],'roleName':_0x5d479c[_0x2d0192(0xb6)],'roleType':_0x5d479c[_0x2d0192(0x93)],'remark':_0x5d479c[_0x2d0192(0xb4)],'userCount':_0x5d479c[_0x2d0192(0x96)],'permitCount':_0x5d479c[_0x2d0192(0xab)],'builtin':isBuiltinRole(_0x5d479c[_0x2d0192(0x93)])};}export async function resolveRoleRef(_0x254b38,_0x58ce03){const _0x2a6e78=a183_0x2451d0,_0x31db6b=_0x58ce03[_0x2a6e78(0x95)]();if(!_0x31db6b)throw CliErrors[_0x2a6e78(0xa2)](_0x2a6e78(0xb2),_0x2a6e78(0x85));if(/^\d+$/[_0x2a6e78(0x88)](_0x31db6b))return getRoleById(_0x254b38,Number(_0x31db6b));const _0x2d6efb=await listAllAppRoles(_0x254b38),_0x5973dd=_0x2d6efb[_0x2a6e78(0xbb)](_0x2f2117=>_0x2f2117[_0x2a6e78(0xb6)]===_0x31db6b);if(_0x5973dd['length']===0x0)throw CliErrors['validation'](_0x2a6e78(0x89)+_0x31db6b+'\x22\x20not\x20found\x20in\x20app\x20'+_0x254b38+'.',_0x2a6e78(0xa5));if(_0x5973dd['length']>0x1){const _0x530900=_0x5973dd[_0x2a6e78(0xc8)](_0x3465d0=>_0x3465d0['id'])[_0x2a6e78(0x87)](',\x20');throw CliErrors[_0x2a6e78(0xa2)]('Role\x20name\x20\x22'+_0x31db6b+'\x22\x20is\x20ambiguous\x20(ids:\x20'+_0x530900+').','Disambiguate\x20with\x20--role\x20<id>.');}return _0x5973dd[0x0];}export async function getRoleById(_0x1d30c1,_0xc6f3e8){const _0x56daa5=a183_0x2451d0,_0x57e643=await listAllAppRoles(_0x1d30c1),_0x5661a1=_0x57e643[_0x56daa5(0xbb)](_0xf37dd1=>_0xf37dd1['id']===_0xc6f3e8&&(!_0xf37dd1['appCode']||_0xf37dd1[_0x56daa5(0xba)]===_0x1d30c1));if(_0x5661a1[_0x56daa5(0xc1)]!==0x1)throw CliErrors['validation']('Role\x20id\x20'+_0xc6f3e8+_0x56daa5(0x9f)+_0x1d30c1+'.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.');return _0x5661a1[0x0];}async function listAllAppRoles(_0xf86274){const _0x575287=a183_0x2451d0,_0x565610=0x64,_0x58ee79=[];for(let _0x384dfd=0x1;;_0x384dfd+=0x1){const {items:_0x163194,paging:_0xcfe13a}=await listAppRoles(_0xf86274,{'currentPage':_0x384dfd,'pageSize':_0x565610});_0x58ee79[_0x575287(0xc5)](..._0x163194);if(_0x163194[_0x575287(0xc1)]<_0x565610||_0xcfe13a&&_0x58ee79[_0x575287(0xc1)]>=_0xcfe13a[_0x575287(0xbc)])return _0x58ee79;}}export async function resolveTenantCode(){const _0x1864f7=a183_0x2451d0,_0x258f94=await getSessionUserInfo(),_0x419fe8=_0x258f94?.[_0x1864f7(0x8d)]?.[_0x1864f7(0x99)]?.[_0x1864f7(0xa3)];if(!_0x419fe8)throw CliErrors[_0x1864f7(0xae)]('Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.');return _0x419fe8;}function matchMember(_0x2b94a8,_0x9f8978){const _0x41f7ab=a183_0x2451d0,_0x45b44f=_0x9f8978[_0x41f7ab(0x95)]()[_0x41f7ab(0x8e)]();return(_0x2b94a8[_0x41f7ab(0x9a)]??'')['toLowerCase']()===_0x45b44f||(_0x2b94a8[_0x41f7ab(0xc7)]??'')[_0x41f7ab(0x8e)]()===_0x45b44f;}export async function resolveUserRef(_0x378c64,_0x11b8d9=a183_0x2451d0(0x8c)){const _0x473738=a183_0x2451d0,_0x47a530=_0x378c64['trim']();if(!_0x47a530)throw CliErrors[_0x473738(0xa2)](_0x473738(0xac),'Pass\x20--user\x20<id|name>.');const _0x20f783=await resolveTenantCode(),_0x47e8dc=await getTenantMembers(_0x20f783);if(/^\d+$/[_0x473738(0x88)](_0x47a530)){const _0x27a557=Number(_0x47a530),_0x28a90b=_0x47e8dc[_0x473738(0x9e)](_0x3c2af4=>_0x3c2af4[_0x473738(0xa9)]===_0x27a557);return{'userId':_0x27a557,'username':_0x28a90b?.[_0x473738(0xc7)]??String(_0x27a557),'nickname':_0x28a90b?.[_0x473738(0x9a)],'matchedBy':'id'};}const _0x3cbec0=_0x47e8dc[_0x473738(0xbb)](_0x40e49b=>matchMember(_0x40e49b,_0x47a530));if(_0x3cbec0[_0x473738(0xc1)]===0x0)throw CliErrors[_0x473738(0xa2)](_0x473738(0x9c)+_0x47a530+'\x22.',_0x473738(0xcc)+_0x11b8d9);if(_0x3cbec0[_0x473738(0xc1)]>0x1){const _0x4d2413=_0x3cbec0[_0x473738(0xc8)](_0x2a08ff=>(_0x2a08ff[_0x473738(0x9a)]??_0x2a08ff[_0x473738(0xc7)]??'?')+'('+_0x2a08ff['userId']+')')['join'](',\x20');throw CliErrors[_0x473738(0xa2)](_0x473738(0xca)+_0x47a530+'\x22:\x20'+_0x4d2413+'.',_0x11b8d9);}const _0x596b8d=_0x3cbec0[0x0];return{'userId':_0x596b8d[_0x473738(0xa9)],'username':_0x596b8d[_0x473738(0xc7)]??String(_0x596b8d[_0x473738(0xa9)]),'nickname':_0x596b8d['nickname'],'matchedBy':'name'};}export const CREATE_USER_ROLE_PATH=a183_0x2451d0(0xc6);export const DELETE_USER_ROLE_PATH=a183_0x2451d0(0xaa);export function computeRoleUserMutation(_0x152c38){const _0x308a68=a183_0x2451d0,{operation:_0x2e8c80,appCode:_0x3e49bf,role:_0x1cec48,relations:_0x926f94,user:_0x17c684}=_0x152c38,_0x200238=[...new Set(_0x926f94[_0x308a68(0xc8)](_0x4280cf=>_0x4280cf[_0x308a68(0xa9)]))],_0x322f19=[];if(_0x152c38[_0x308a68(0x84)]!==undefined&&_0x152c38[_0x308a68(0x84)]!==_0x200238[_0x308a68(0xc1)])throw CliErrors[_0x308a68(0xa2)](_0x308a68(0xc9)+_0x152c38['expectUserCount']+_0x308a68(0x8b)+_0x200238[_0x308a68(0xc1)]+'.',_0x308a68(0xbe));const _0x223812=_0x200238[_0x308a68(0x9d)](_0x17c684['userId']),_0x4851ca=_0x926f94[_0x308a68(0xbb)](_0x4861bc=>_0x4861bc[_0x308a68(0xa9)]===_0x17c684[_0x308a68(0xa9)])['map'](_0x380917=>_0x380917['id']),_0x2e31df=_0x2e8c80==='user-add'?!_0x223812:_0x223812;let _0x1d0529=_0x200238;_0x2e8c80==='user-add'?_0x223812?_0x322f19[_0x308a68(0xc5)](_0x308a68(0xa1)+_0x17c684[_0x308a68(0xa9)]+_0x308a68(0x97)+_0x1cec48[_0x308a68(0xb6)]+';\x20no\x20change.'):_0x1d0529=[..._0x200238,_0x17c684['userId']]:!_0x223812?_0x322f19[_0x308a68(0xc5)]('User\x20'+_0x17c684['userId']+'\x20is\x20not\x20a\x20member\x20of\x20role\x20'+_0x1cec48['roleName']+_0x308a68(0xcd)):(_0x1d0529=_0x200238[_0x308a68(0xbb)](_0x352690=>_0x352690!==_0x17c684[_0x308a68(0xa9)]),_0x4851ca[_0x308a68(0xc1)]>0x1&&_0x322f19['push']('Removed\x20'+_0x4851ca[_0x308a68(0xc1)]+_0x308a68(0x9b)+_0x17c684['userId']+'.'));const _0x1ce71c={'scope':'dev','operation':_0x2e8c80,'selector':{'appCode':_0x3e49bf,'roleId':_0x1cec48['id'],'roleName':_0x1cec48[_0x308a68(0xb6)],'userId':_0x17c684[_0x308a68(0xa9)]},'before':{'userIds':_0x200238},'after':{'userIds':_0x1d0529},'dryRun':_0x152c38['dryRun'],'backend':{'method':_0x308a68(0xb7),'path':_0x2e8c80==='user-add'?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x322f19};return{'mutation':_0x1ce71c,'changed':_0x2e31df,'matchingRelationIds':_0x4851ca};}export async function loadDevRoleRelations(_0x2ab50b,_0x5d21fb){const _0x9fc468=a183_0x2451d0,_0x128e27=0x64,_0x23ee10=[];for(let _0x5f9d5a=0x1;;_0x5f9d5a+=0x1){const {items:_0x39b197,paging:_0x3b65b4}=await listDevUserRoleRelations(_0x2ab50b,{'roleId':_0x5d21fb,'currentPage':_0x5f9d5a,'pageSize':_0x128e27});_0x23ee10['push'](..._0x39b197);if(_0x39b197['length']<_0x128e27||_0x3b65b4&&_0x23ee10[_0x9fc468(0xc1)]>=_0x3b65b4[_0x9fc468(0xbc)])return _0x23ee10;}}export function readRoleRef(_0xc1b68){const _0xd1835f=a183_0x2451d0,_0x79a855=_0xc1b68[_0xd1835f(0xcf)](_0xd1835f(0xcb))[_0xd1835f(0x95)]();if(!_0x79a855)throw CliErrors['flagMissing'](_0xd1835f(0xcb),_0xd1835f(0x85));return _0x79a855;}export async function prepareUserMutation(_0x237b90,_0x2aab57,_0x3c994b){const _0x5ad3d5=a183_0x2451d0,_0x35b1a9=readRoleRef(_0x237b90),_0x143869=_0x237b90[_0x5ad3d5(0xcf)](_0x5ad3d5(0x8d))['trim']();if(!_0x143869)throw CliErrors[_0x5ad3d5(0x8f)](_0x5ad3d5(0x8d),_0x5ad3d5(0xb0));const _0x228b21=_0x237b90['flag']('expect-user-count'),_0x1a3b03=_0x228b21===undefined||_0x228b21===null?undefined:Number(_0x228b21),_0x549399=await resolveRoleRef(_0x237b90[_0x5ad3d5(0xba)],_0x35b1a9);if(_0x549399['roleType']===_0x5ad3d5(0xb9))throw CliErrors[_0x5ad3d5(0xa2)](_0x5ad3d5(0xc3)+_0x2aab57+_0x5ad3d5(0x94),_0x5ad3d5(0xa0));const _0x499bfb=await resolveUserRef(_0x143869),_0xe33048=await loadDevRoleRelations(_0x237b90[_0x5ad3d5(0xba)],_0x549399['id']);return{...computeRoleUserMutation({'operation':_0x2aab57,'appCode':_0x237b90[_0x5ad3d5(0xba)],'role':_0x549399,'relations':_0xe33048,'user':{'userId':_0x499bfb[_0x5ad3d5(0xa9)],'username':_0x499bfb['username'],'nickname':_0x499bfb[_0x5ad3d5(0x9a)]},'dryRun':_0x3c994b,..._0x1a3b03!==undefined?{'expectUserCount':_0x1a3b03}:{}}),'role':_0x549399,'user':_0x499bfb};}
1
+ const a183_0x2fa888=a183_0x10f5;(function(_0x5fb75a,_0xb24b56){const _0x270034=a183_0x10f5,_0x43f5b9=_0x5fb75a();while(!![]){try{const _0x5eacc4=parseInt(_0x270034(0x1bd))/0x1+-parseInt(_0x270034(0x194))/0x2*(parseInt(_0x270034(0x193))/0x3)+-parseInt(_0x270034(0x182))/0x4*(parseInt(_0x270034(0x1b9))/0x5)+-parseInt(_0x270034(0x191))/0x6*(-parseInt(_0x270034(0x1a0))/0x7)+-parseInt(_0x270034(0x196))/0x8+parseInt(_0x270034(0x197))/0x9+parseInt(_0x270034(0x188))/0xa;if(_0x5eacc4===_0xb24b56)break;else _0x43f5b9['push'](_0x43f5b9['shift']());}catch(_0x3dba07){_0x43f5b9['push'](_0x43f5b9['shift']());}}}(a183_0x3db8,0xd0bb8));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':a183_0x2fa888(0x1ac),'required':!![],'description':'Role\x20id\x20(from\x20`role\x20list`)'};export const ROLE_REF_FLAG={'name':'role','type':a183_0x2fa888(0x187),'required':!![],'description':a183_0x2fa888(0x1b5)};export const USER_REF_FLAG={'name':a183_0x2fa888(0x181),'type':a183_0x2fa888(0x187),'required':!![],'description':a183_0x2fa888(0x1b4)};export const NAME_FLAG={'name':a183_0x2fa888(0x17d),'type':a183_0x2fa888(0x187),'required':!![],'description':'Role\x20name'};export const USER_NAME_FLAG={'name':a183_0x2fa888(0x17d),'type':a183_0x2fa888(0x187),'required':!![],'description':a183_0x2fa888(0x1bc)};export const REMARK_FLAG={'name':a183_0x2fa888(0x1be),'type':a183_0x2fa888(0x187),'required':![],'description':a183_0x2fa888(0x1aa)};function a183_0x10f5(_0x1971bd,_0x56b871){_0x1971bd=_0x1971bd-0x176;const _0x3db873=a183_0x3db8();let _0x10f52e=_0x3db873[_0x1971bd];return _0x10f52e;}export const EXPECT_USER_COUNT_FLAG={'name':'expect-user-count','type':a183_0x2fa888(0x1ac),'required':![],'description':a183_0x2fa888(0x17b)};export const BUILTIN_ROLE_TYPES=[a183_0x2fa888(0x19e),'DEV',a183_0x2fa888(0x19c)];export function isBuiltinRole(_0x4aaead){return BUILTIN_ROLE_TYPES['includes'](_0x4aaead);}export function assertCustomRole(_0x1f9d28,_0xb6f5d1){const _0x37786f=a183_0x2fa888;if(_0x1f9d28[_0x37786f(0x185)]!==_0x37786f(0x19f))throw CliErrors[_0x37786f(0x1ae)](_0x37786f(0x18b)+_0xb6f5d1+_0x37786f(0x1ad)+_0x1f9d28[_0x37786f(0x1a1)]+'\x20('+_0x1f9d28[_0x37786f(0x185)]+').',_0x37786f(0x186));}export function projectRole(_0x4f4c8e){const _0x102497=a183_0x2fa888;return{'id':_0x4f4c8e['id'],'roleName':_0x4f4c8e['roleName'],'roleType':_0x4f4c8e[_0x102497(0x185)],'remark':_0x4f4c8e[_0x102497(0x1be)],'userCount':_0x4f4c8e[_0x102497(0x1a2)],'permitCount':_0x4f4c8e[_0x102497(0x1c0)],'builtin':isBuiltinRole(_0x4f4c8e['roleType'])};}export async function resolveRoleRef(_0x15b1b5,_0x35f8bf){const _0x925af=a183_0x2fa888,_0x32ac65=_0x35f8bf[_0x925af(0x18c)]();if(!_0x32ac65)throw CliErrors['validation'](_0x925af(0x195),_0x925af(0x1b6));if(/^\d+$/[_0x925af(0x18e)](_0x32ac65))return getRoleById(_0x15b1b5,Number(_0x32ac65));const _0x311458=await listAllAppRoles(_0x15b1b5),_0x37c44e=_0x311458[_0x925af(0x179)](_0x111bb4=>_0x111bb4[_0x925af(0x1a1)]===_0x32ac65);if(_0x37c44e[_0x925af(0x1a7)]===0x0)throw CliErrors[_0x925af(0x1ae)](_0x925af(0x1b1)+_0x32ac65+_0x925af(0x19a)+_0x15b1b5+'.',_0x925af(0x190));if(_0x37c44e[_0x925af(0x1a7)]>0x1){const _0x1ae402=_0x37c44e[_0x925af(0x1b8)](_0x1b6f72=>_0x1b6f72['id'])[_0x925af(0x19d)](',\x20');throw CliErrors[_0x925af(0x1ae)]('Role\x20name\x20\x22'+_0x32ac65+_0x925af(0x1ab)+_0x1ae402+').',_0x925af(0x180));}return _0x37c44e[0x0];}export async function getRoleById(_0x88715,_0xfea55c){const _0x466edf=a183_0x2fa888,_0x10ee44=await listAllAppRoles(_0x88715),_0xff5291=_0x10ee44[_0x466edf(0x179)](_0x3db15f=>_0x3db15f['id']===_0xfea55c&&(!_0x3db15f[_0x466edf(0x189)]||_0x3db15f['appCode']===_0x88715));if(_0xff5291[_0x466edf(0x1a7)]!==0x1)throw CliErrors['validation'](_0x466edf(0x1c1)+_0xfea55c+_0x466edf(0x198)+_0x88715+'.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.');return _0xff5291[0x0];}async function listAllAppRoles(_0x14b530){const _0x70bbc5=a183_0x2fa888,_0x266cf8=0x64,_0x2d47b4=[];for(let _0x5f3c6e=0x1;;_0x5f3c6e+=0x1){const {items:_0x2edeb9,paging:_0x54b6f4}=await listAppRoles(_0x14b530,{'currentPage':_0x5f3c6e,'pageSize':_0x266cf8});_0x2d47b4[_0x70bbc5(0x1b0)](..._0x2edeb9);if(_0x2edeb9[_0x70bbc5(0x1a7)]<_0x266cf8||_0x54b6f4&&_0x2d47b4[_0x70bbc5(0x1a7)]>=_0x54b6f4[_0x70bbc5(0x1b3)])return _0x2d47b4;}}export async function resolveTenantCode(){const _0x286fc9=a183_0x2fa888,_0x328c51=await getSessionUserInfo(),_0x20e9bd=_0x328c51?.[_0x286fc9(0x181)]?.[_0x286fc9(0x18d)]?.[_0x286fc9(0x1bb)];if(!_0x20e9bd)throw CliErrors['authRequired']('Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.');return _0x20e9bd;}function matchMember(_0x13af5d,_0x59c544){const _0x47616d=a183_0x2fa888,_0x35aca0=_0x59c544[_0x47616d(0x18c)]()[_0x47616d(0x192)]();return(_0x13af5d['nickname']??'')[_0x47616d(0x192)]()===_0x35aca0||(_0x13af5d[_0x47616d(0x1a5)]??'')[_0x47616d(0x192)]()===_0x35aca0;}export async function resolveUserRef(_0x2e9e93,_0x21cb8e=a183_0x2fa888(0x17c)){const _0x4250d8=a183_0x2fa888,_0x4fbe5a=_0x2e9e93[_0x4250d8(0x18c)]();if(!_0x4fbe5a)throw CliErrors['validation']('Missing\x20user\x20reference.',_0x4250d8(0x1c2));const _0x4a1039=await resolveTenantCode(),_0x59f608=await getTenantMembers(_0x4a1039);if(/^\d+$/[_0x4250d8(0x18e)](_0x4fbe5a)){const _0x5ebd1f=Number(_0x4fbe5a),_0x385b45=_0x59f608['find'](_0x2028df=>_0x2028df['userId']===_0x5ebd1f);return{'userId':_0x5ebd1f,'username':_0x385b45?.['username']??String(_0x5ebd1f),'nickname':_0x385b45?.[_0x4250d8(0x1a4)],'matchedBy':'id'};}const _0x548b7e=_0x59f608[_0x4250d8(0x179)](_0x39bda9=>matchMember(_0x39bda9,_0x4fbe5a));if(_0x548b7e[_0x4250d8(0x1a7)]===0x0)throw CliErrors[_0x4250d8(0x1ae)]('No\x20tenant\x20member\x20matches\x20\x22'+_0x4fbe5a+'\x22.',_0x4250d8(0x1a6)+_0x21cb8e);if(_0x548b7e[_0x4250d8(0x1a7)]>0x1){const _0x45040b=_0x548b7e[_0x4250d8(0x1b8)](_0xafe42f=>(_0xafe42f['nickname']??_0xafe42f[_0x4250d8(0x1a5)]??'?')+'('+_0xafe42f['userId']+')')[_0x4250d8(0x19d)](',\x20');throw CliErrors[_0x4250d8(0x1ae)](_0x4250d8(0x178)+_0x4fbe5a+'\x22:\x20'+_0x45040b+'.',_0x21cb8e);}const _0x3ee10a=_0x548b7e[0x0];return{'userId':_0x3ee10a['userId'],'username':_0x3ee10a[_0x4250d8(0x1a5)]??String(_0x3ee10a['userId']),'nickname':_0x3ee10a['nickname'],'matchedBy':'name'};}export const CREATE_USER_ROLE_PATH=a183_0x2fa888(0x184);function a183_0x3db8(){const _0x152c5d=['trim','tenant','test','/smartapi/permit/user-role/delete','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','6pThLay','toLowerCase','15015DNojDq','618hCqPKF','Missing\x20role\x20reference.','13310040BNifcM','2386512JEuGlM','\x20not\x20found\x20in\x20app\x20','role','\x22\x20not\x20found\x20in\x20app\x20','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','OWNER','join','ADMIN','CUSTOM','5627951HtRorC','roleName','userCount','POST','nickname','username','Check\x20the\x20nickname/username.\x20','length','\x20is\x20already\x20a\x20member\x20of\x20role\x20','flagMissing','Optional\x20role\x20remark/description','\x22\x20is\x20ambiguous\x20(ids:\x20','number','\x20built-in\x20role\x20','validation','includes','push','Role\x20name\x20\x22','userId','totalCount','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','Role\x20id\x20or\x20exact\x20role\x20name','Pass\x20--role\x20<id|name>.','User\x20','map','838355nbhWcT','dryRun','tenant_code','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','429729ulSlqQ','remark','Removed\x20','permitCount','Role\x20id\x20','Pass\x20--user\x20<id|name>.','\x20is\x20not\x20a\x20member\x20of\x20role\x20','\x20member(s)\x20but\x20role\x20has\x20','expectUserCount','Multiple\x20tenant\x20members\x20match\x20\x22','filter','\x20members\x20of\x20the\x20OWNER\x20role.','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','Pass\x20--user\x20<id>.','name','user-add','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.','Disambiguate\x20with\x20--role\x20<id>.','user','20XoAJPV',';\x20no\x20change.','/smartapi/permit/user-role/create','roleType','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','string','34047330jBgQwk','appCode','str','Cannot\x20'];a183_0x3db8=function(){return _0x152c5d;};return a183_0x3db8();}export const DELETE_USER_ROLE_PATH=a183_0x2fa888(0x18f);export function computeRoleUserMutation(_0x437285){const _0x26631f=a183_0x2fa888,{operation:_0x4824bd,appCode:_0x5a765b,role:_0x18929b,relations:_0x5418b0,user:_0x49bb81}=_0x437285,_0x4bcf50=[...new Set(_0x5418b0[_0x26631f(0x1b8)](_0x1444ba=>_0x1444ba[_0x26631f(0x1b2)]))],_0x46ab12=[];if(_0x437285[_0x26631f(0x177)]!==undefined&&_0x437285[_0x26631f(0x177)]!==_0x4bcf50['length'])throw CliErrors[_0x26631f(0x1ae)]('Anti-drift\x20check\x20failed:\x20expected\x20'+_0x437285[_0x26631f(0x177)]+_0x26631f(0x176)+_0x4bcf50[_0x26631f(0x1a7)]+'.',_0x26631f(0x19b));const _0x1ce92d=_0x4bcf50[_0x26631f(0x1af)](_0x49bb81[_0x26631f(0x1b2)]),_0x5ce56e=_0x5418b0[_0x26631f(0x179)](_0x3437ef=>_0x3437ef['userId']===_0x49bb81[_0x26631f(0x1b2)])[_0x26631f(0x1b8)](_0x278152=>_0x278152['id']),_0x3b8433=_0x4824bd===_0x26631f(0x17e)?!_0x1ce92d:_0x1ce92d;let _0x48dee0=_0x4bcf50;_0x4824bd===_0x26631f(0x17e)?_0x1ce92d?_0x46ab12['push'](_0x26631f(0x1b7)+_0x49bb81[_0x26631f(0x1b2)]+_0x26631f(0x1a8)+_0x18929b[_0x26631f(0x1a1)]+_0x26631f(0x183)):_0x48dee0=[..._0x4bcf50,_0x49bb81[_0x26631f(0x1b2)]]:!_0x1ce92d?_0x46ab12[_0x26631f(0x1b0)](_0x26631f(0x1b7)+_0x49bb81['userId']+_0x26631f(0x1c3)+_0x18929b[_0x26631f(0x1a1)]+_0x26631f(0x183)):(_0x48dee0=_0x4bcf50[_0x26631f(0x179)](_0x5767e7=>_0x5767e7!==_0x49bb81[_0x26631f(0x1b2)]),_0x5ce56e[_0x26631f(0x1a7)]>0x1&&_0x46ab12[_0x26631f(0x1b0)](_0x26631f(0x1bf)+_0x5ce56e[_0x26631f(0x1a7)]+'\x20duplicate\x20memberships\x20for\x20user\x20'+_0x49bb81[_0x26631f(0x1b2)]+'.'));const _0x1a58a7={'scope':'dev','operation':_0x4824bd,'selector':{'appCode':_0x5a765b,'roleId':_0x18929b['id'],'roleName':_0x18929b['roleName'],'userId':_0x49bb81[_0x26631f(0x1b2)]},'before':{'userIds':_0x4bcf50},'after':{'userIds':_0x48dee0},'dryRun':_0x437285[_0x26631f(0x1ba)],'backend':{'method':_0x26631f(0x1a3),'path':_0x4824bd===_0x26631f(0x17e)?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x46ab12};return{'mutation':_0x1a58a7,'changed':_0x3b8433,'matchingRelationIds':_0x5ce56e};}export async function loadDevRoleRelations(_0x2fe9b0,_0x66ced8){const _0x528b06=a183_0x2fa888,_0x11308d=0x64,_0x1d645d=[];for(let _0x1995aa=0x1;;_0x1995aa+=0x1){const {items:_0x4e4ad7,paging:_0x5edf5c}=await listDevUserRoleRelations(_0x2fe9b0,{'roleId':_0x66ced8,'currentPage':_0x1995aa,'pageSize':_0x11308d});_0x1d645d[_0x528b06(0x1b0)](..._0x4e4ad7);if(_0x4e4ad7[_0x528b06(0x1a7)]<_0x11308d||_0x5edf5c&&_0x1d645d[_0x528b06(0x1a7)]>=_0x5edf5c[_0x528b06(0x1b3)])return _0x1d645d;}}export function readRoleRef(_0x1b12ed){const _0x572b8f=a183_0x2fa888,_0x1c1cf7=_0x1b12ed[_0x572b8f(0x18a)](_0x572b8f(0x199))[_0x572b8f(0x18c)]();if(!_0x1c1cf7)throw CliErrors[_0x572b8f(0x1a9)](_0x572b8f(0x199),_0x572b8f(0x1b6));return _0x1c1cf7;}export async function prepareUserMutation(_0xb47837,_0x18913f,_0xbd547){const _0x1be621=a183_0x2fa888,_0x356ff9=readRoleRef(_0xb47837),_0x492773=_0xb47837[_0x1be621(0x18a)]('user')[_0x1be621(0x18c)]();if(!_0x492773)throw CliErrors[_0x1be621(0x1a9)]('user','Pass\x20--user\x20<id|name>.');const _0x42e9ad=_0xb47837['flag']('expect-user-count'),_0x1b6127=_0x42e9ad===undefined||_0x42e9ad===null?undefined:Number(_0x42e9ad),_0x5605ce=await resolveRoleRef(_0xb47837[_0x1be621(0x189)],_0x356ff9);if(_0x5605ce[_0x1be621(0x185)]===_0x1be621(0x19c))throw CliErrors[_0x1be621(0x1ae)](_0x1be621(0x18b)+_0x18913f+_0x1be621(0x17a),_0x1be621(0x17f));const _0xed6e1d=await resolveUserRef(_0x492773),_0xaf9992=await loadDevRoleRelations(_0xb47837[_0x1be621(0x189)],_0x5605ce['id']);return{...computeRoleUserMutation({'operation':_0x18913f,'appCode':_0xb47837[_0x1be621(0x189)],'role':_0x5605ce,'relations':_0xaf9992,'user':{'userId':_0xed6e1d[_0x1be621(0x1b2)],'username':_0xed6e1d[_0x1be621(0x1a5)],'nickname':_0xed6e1d['nickname']},'dryRun':_0xbd547,..._0x1b6127!==undefined?{'expectUserCount':_0x1b6127}:{}}),'role':_0x5605ce,'user':_0xed6e1d};}
@@ -1 +1 @@
1
- function a184_0x3799(){const _0x34c4ed=['Role\x20name\x20cannot\x20exceed\x2064\x20characters.','17139280CcuveZ','5060315hRlYlv','New\x20role\x20name','name','update','POST','roleName','dev','validation','remark','3750076RVlRli','6563547fpowZv','126daowSL','3034008KSKTRr','string','flag','\x20(id=','Nothing\x20to\x20update.','1Sdzpts','215425gOhBTz','3yNgKsa','appCode','1004474MsDCss','/smartapi/permit/role/update','num'];a184_0x3799=function(){return _0x34c4ed;};return a184_0x3799();}const a184_0x2e61ab=a184_0xf998;(function(_0x205403,_0x441081){const _0x5be66a=a184_0xf998,_0x52700a=_0x205403();while(!![]){try{const _0x1af1b5=-parseInt(_0x5be66a(0x131))/0x1*(-parseInt(_0x5be66a(0x135))/0x2)+parseInt(_0x5be66a(0x133))/0x3*(-parseInt(_0x5be66a(0x129))/0x4)+-parseInt(_0x5be66a(0x120))/0x5+-parseInt(_0x5be66a(0x12b))/0x6*(-parseInt(_0x5be66a(0x132))/0x7)+parseInt(_0x5be66a(0x12c))/0x8+-parseInt(_0x5be66a(0x12a))/0x9+parseInt(_0x5be66a(0x11f))/0xa;if(_0x1af1b5===_0x441081)break;else _0x52700a['push'](_0x52700a['shift']());}catch(_0x5eda81){_0x52700a['push'](_0x52700a['shift']());}}}(a184_0x3799,0x8968a));function a184_0xf998(_0x485df3,_0x1bf112){_0x485df3=_0x485df3-0x11d;const _0x37993e=a184_0x3799();let _0xf998a=_0x37993e[_0x485df3];return _0xf998a;}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=a184_0x2e61ab(0x136);function readPatch(_0x2c224b){const _0x25e6ae=a184_0x2e61ab,_0x13ccc4=_0x2c224b['flag']('name'),_0x2e65a6=_0x2c224b[_0x25e6ae(0x12e)](_0x25e6ae(0x128)),_0x56b4a9={};if(_0x13ccc4!==undefined&&_0x13ccc4!==null){const _0x19ce5f=String(_0x13ccc4)['trim']();if(!_0x19ce5f)throw CliErrors['validation']('--name\x20cannot\x20be\x20empty.');if(_0x19ce5f['length']>0x40)throw CliErrors[_0x25e6ae(0x127)](_0x25e6ae(0x11e));_0x56b4a9['roleName']=_0x19ce5f;}_0x2e65a6!==undefined&&_0x2e65a6!==null&&(_0x56b4a9[_0x25e6ae(0x128)]=String(_0x2e65a6));if(_0x56b4a9[_0x25e6ae(0x125)]===undefined&&_0x56b4a9[_0x25e6ae(0x128)]===undefined)throw CliErrors[_0x25e6ae(0x127)](_0x25e6ae(0x130),'Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.');return _0x56b4a9;}export const roleUpdate={'service':'role','command':'update','description':'Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','risk':'write','flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a184_0x2e61ab(0x122),'type':a184_0x2e61ab(0x12d),'required':![],'description':a184_0x2e61ab(0x121)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xdbbae4){readPatch(_0xdbbae4);},async 'dryRun'(_0x4af5e3){const _0x5e55b5=a184_0x2e61ab,_0x33ee22=_0x4af5e3[_0x5e55b5(0x11d)]('id'),_0x5d25f2=readPatch(_0x4af5e3),_0x1e5899=await getRoleById(_0x4af5e3[_0x5e55b5(0x134)],_0x33ee22);return assertCustomRole(_0x1e5899,_0x5e55b5(0x123)),asDryRunResult({'scope':_0x5e55b5(0x126),'operation':'update','selector':{'appCode':_0x4af5e3[_0x5e55b5(0x134)],'roleId':_0x33ee22,'roleName':_0x1e5899[_0x5e55b5(0x125)]},'before':projectRole(_0x1e5899),'after':projectRole({..._0x1e5899,..._0x5d25f2['roleName']!==undefined?{'roleName':_0x5d25f2[_0x5e55b5(0x125)]}:{},..._0x5d25f2[_0x5e55b5(0x128)]!==undefined?{'remark':_0x5d25f2[_0x5e55b5(0x128)]}:{}}),'dryRun':!![],'backend':{'method':_0x5e55b5(0x124),'path':UPDATE_PATH},'warnings':[]},{'method':_0x5e55b5(0x124),'url':UPDATE_PATH});},async 'execute'(_0x37d0d7){const _0x1990c6=a184_0x2e61ab,_0x118b59=_0x37d0d7[_0x1990c6(0x11d)]('id'),_0x3d9397=readPatch(_0x37d0d7),_0x4cbd51=await getRoleById(_0x37d0d7['appCode'],_0x118b59);assertCustomRole(_0x4cbd51,_0x1990c6(0x123)),await updateAppRole({'id':_0x118b59,'appCode':_0x37d0d7[_0x1990c6(0x134)],..._0x3d9397['roleName']!==undefined?{'roleName':_0x3d9397[_0x1990c6(0x125)]}:{},..._0x3d9397[_0x1990c6(0x128)]!==undefined?{'remark':_0x3d9397[_0x1990c6(0x128)]}:{}});const _0x56c14f=await getRoleById(_0x37d0d7[_0x1990c6(0x134)],_0x118b59);return{'ok':!![],'data':{'scope':'dev','operation':_0x1990c6(0x123),'selector':{'appCode':_0x37d0d7[_0x1990c6(0x134)],'roleId':_0x118b59,'roleName':_0x56c14f[_0x1990c6(0x125)]},'before':projectRole(_0x4cbd51),'after':projectRole(_0x56c14f),'dryRun':![],'backend':{'method':_0x1990c6(0x124),'path':UPDATE_PATH},'warnings':[]},'message':'Updated\x20role\x20'+_0x56c14f[_0x1990c6(0x125)]+_0x1990c6(0x12f)+_0x118b59+')'};}};
1
+ const a184_0x1ee1ef=a184_0x3bef;function a184_0x3bef(_0x4a5a87,_0x1bc6a8){_0x4a5a87=_0x4a5a87-0xd5;const _0x413de1=a184_0x413d();let _0x3befc3=_0x413de1[_0x4a5a87];return _0x3befc3;}(function(_0x3e9da2,_0x1b6310){const _0x2469dd=a184_0x3bef,_0x398cb0=_0x3e9da2();while(!![]){try{const _0x50f8ad=parseInt(_0x2469dd(0xd5))/0x1+-parseInt(_0x2469dd(0xe6))/0x2+-parseInt(_0x2469dd(0xe5))/0x3+-parseInt(_0x2469dd(0xde))/0x4*(parseInt(_0x2469dd(0xf1))/0x5)+parseInt(_0x2469dd(0xe7))/0x6+-parseInt(_0x2469dd(0xdf))/0x7+parseInt(_0x2469dd(0xe0))/0x8;if(_0x50f8ad===_0x1b6310)break;else _0x398cb0['push'](_0x398cb0['shift']());}catch(_0x3ce05a){_0x398cb0['push'](_0x398cb0['shift']());}}}(a184_0x413d,0xb4dbb));function a184_0x413d(){const _0x3adaf7=['POST','/smartapi/permit/role/update','152417PlMTrn','appCode','\x20(id=','New\x20role\x20name','num','length','roleName','remark','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','20fPuXgq','5721030WbZHuT','25425560GFTagc','role','trim','Updated\x20role\x20','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.','1055349EzPjwR','917908adjNkB','198000rhWNtC','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','write','dev','name','update','flag','validation','string','Nothing\x20to\x20update.','994790LqgItW'];a184_0x413d=function(){return _0x3adaf7;};return a184_0x413d();}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=a184_0x1ee1ef(0xf3);function readPatch(_0x2100f2){const _0x410923=a184_0x1ee1ef,_0xb356d7=_0x2100f2['flag']('name'),_0xe39810=_0x2100f2[_0x410923(0xed)](_0x410923(0xdc)),_0xa618e={};if(_0xb356d7!==undefined&&_0xb356d7!==null){const _0x2fb057=String(_0xb356d7)[_0x410923(0xe2)]();if(!_0x2fb057)throw CliErrors[_0x410923(0xee)]('--name\x20cannot\x20be\x20empty.');if(_0x2fb057[_0x410923(0xda)]>0x40)throw CliErrors[_0x410923(0xee)](_0x410923(0xe8));_0xa618e[_0x410923(0xdb)]=_0x2fb057;}_0xe39810!==undefined&&_0xe39810!==null&&(_0xa618e['remark']=String(_0xe39810));if(_0xa618e[_0x410923(0xdb)]===undefined&&_0xa618e[_0x410923(0xdc)]===undefined)throw CliErrors[_0x410923(0xee)](_0x410923(0xf0),_0x410923(0xe4));return _0xa618e;}export const roleUpdate={'service':a184_0x1ee1ef(0xe1),'command':'update','description':a184_0x1ee1ef(0xdd),'risk':a184_0x1ee1ef(0xe9),'flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a184_0x1ee1ef(0xeb),'type':a184_0x1ee1ef(0xef),'required':![],'description':a184_0x1ee1ef(0xd8)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x20e3de){readPatch(_0x20e3de);},async 'dryRun'(_0x14bad3){const _0x559cdf=a184_0x1ee1ef,_0x4bd541=_0x14bad3[_0x559cdf(0xd9)]('id'),_0x27aa43=readPatch(_0x14bad3),_0x19e9d5=await getRoleById(_0x14bad3[_0x559cdf(0xd6)],_0x4bd541);return assertCustomRole(_0x19e9d5,'update'),asDryRunResult({'scope':_0x559cdf(0xea),'operation':'update','selector':{'appCode':_0x14bad3[_0x559cdf(0xd6)],'roleId':_0x4bd541,'roleName':_0x19e9d5[_0x559cdf(0xdb)]},'before':projectRole(_0x19e9d5),'after':projectRole({..._0x19e9d5,..._0x27aa43['roleName']!==undefined?{'roleName':_0x27aa43[_0x559cdf(0xdb)]}:{},..._0x27aa43[_0x559cdf(0xdc)]!==undefined?{'remark':_0x27aa43[_0x559cdf(0xdc)]}:{}}),'dryRun':!![],'backend':{'method':_0x559cdf(0xf2),'path':UPDATE_PATH},'warnings':[]},{'method':'POST','url':UPDATE_PATH});},async 'execute'(_0x37591d){const _0x1870f2=a184_0x1ee1ef,_0x597537=_0x37591d[_0x1870f2(0xd9)]('id'),_0x1aa128=readPatch(_0x37591d),_0x348eab=await getRoleById(_0x37591d[_0x1870f2(0xd6)],_0x597537);assertCustomRole(_0x348eab,_0x1870f2(0xec)),await updateAppRole({'id':_0x597537,'appCode':_0x37591d[_0x1870f2(0xd6)],..._0x1aa128[_0x1870f2(0xdb)]!==undefined?{'roleName':_0x1aa128[_0x1870f2(0xdb)]}:{},..._0x1aa128[_0x1870f2(0xdc)]!==undefined?{'remark':_0x1aa128[_0x1870f2(0xdc)]}:{}});const _0x57adae=await getRoleById(_0x37591d[_0x1870f2(0xd6)],_0x597537);return{'ok':!![],'data':{'scope':_0x1870f2(0xea),'operation':_0x1870f2(0xec),'selector':{'appCode':_0x37591d[_0x1870f2(0xd6)],'roleId':_0x597537,'roleName':_0x57adae[_0x1870f2(0xdb)]},'before':projectRole(_0x348eab),'after':projectRole(_0x57adae),'dryRun':![],'backend':{'method':_0x1870f2(0xf2),'path':UPDATE_PATH},'warnings':[]},'message':_0x1870f2(0xe3)+_0x57adae[_0x1870f2(0xdb)]+_0x1870f2(0xd7)+_0x597537+')'};}};