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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (309) 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.js +1 -1
  56. package/lib/commands/config/list.js +1 -1
  57. package/lib/commands/config/set.js +1 -1
  58. package/lib/commands/config/shared.js +1 -1
  59. package/lib/commands/dataset/business-group-update.js +1 -1
  60. package/lib/commands/dataset/business-groups.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-restore.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  80. package/lib/commands/db/analysis-batching.js +1 -1
  81. package/lib/commands/db/analyze-batch-plan.js +1 -1
  82. package/lib/commands/db/analyze-cancel.js +1 -1
  83. package/lib/commands/db/analyze-start.js +1 -1
  84. package/lib/commands/db/analyze-status.js +1 -1
  85. package/lib/commands/db/create.js +1 -1
  86. package/lib/commands/db/delete.js +1 -1
  87. package/lib/commands/db/detail.js +1 -1
  88. package/lib/commands/db/diff-refresh-start.js +1 -1
  89. package/lib/commands/db/diff-refresh-status.js +1 -1
  90. package/lib/commands/db/diff.js +1 -1
  91. package/lib/commands/db/index.js +1 -1
  92. package/lib/commands/db/list.js +1 -1
  93. package/lib/commands/db/shared.js +1 -1
  94. package/lib/commands/db/table-diff-shared.js +1 -1
  95. package/lib/commands/db/tables.js +1 -1
  96. package/lib/commands/db/test.js +1 -1
  97. package/lib/commands/db/update.js +1 -1
  98. package/lib/commands/deployment/auto-sync.js +1 -1
  99. package/lib/commands/deployment/index.js +1 -1
  100. package/lib/commands/deployment/sync.js +1 -1
  101. package/lib/commands/doctor.js +1 -1
  102. package/lib/commands/file/index.js +1 -1
  103. package/lib/commands/issue/index.js +1 -1
  104. package/lib/commands/issue/nudge.js +1 -1
  105. package/lib/commands/issue/report.js +1 -1
  106. package/lib/commands/issue/shared.js +1 -1
  107. package/lib/commands/kb/create.js +1 -1
  108. package/lib/commands/kb/delete.js +1 -1
  109. package/lib/commands/kb/detail.js +1 -1
  110. package/lib/commands/kb/index.js +1 -1
  111. package/lib/commands/kb/list.js +1 -1
  112. package/lib/commands/kb/search.js +1 -1
  113. package/lib/commands/kb/shared.js +1 -1
  114. package/lib/commands/kb/update.js +1 -1
  115. package/lib/commands/logs/index.js +1 -1
  116. package/lib/commands/menu/asset-update.js +1 -1
  117. package/lib/commands/menu/delete.js +1 -1
  118. package/lib/commands/menu/external-link-create.js +1 -1
  119. package/lib/commands/menu/external-link-update.js +1 -1
  120. package/lib/commands/menu/group-create.js +1 -1
  121. package/lib/commands/menu/group-update.js +1 -1
  122. package/lib/commands/menu/index.js +1 -1
  123. package/lib/commands/menu/list.js +1 -1
  124. package/lib/commands/menu/move.js +1 -1
  125. package/lib/commands/menu/regroup-start.js +1 -1
  126. package/lib/commands/menu/rename.js +1 -1
  127. package/lib/commands/menu/shared/compare-table.js +1 -1
  128. package/lib/commands/menu/shared/delete-plan.js +1 -1
  129. package/lib/commands/menu/shared/facts.js +1 -1
  130. package/lib/commands/menu/shared/index.js +1 -1
  131. package/lib/commands/menu/shared/inquirer.js +1 -1
  132. package/lib/commands/menu/shared/local-pages.js +1 -1
  133. package/lib/commands/menu/shared/logic.js +1 -1
  134. package/lib/commands/menu/shared/mutations.js +1 -1
  135. package/lib/commands/menu/shared/service.js +1 -1
  136. package/lib/commands/menu/shared/sync-core.js +1 -1
  137. package/lib/commands/menu/shared/update-core.js +1 -1
  138. package/lib/commands/menu/shared/valid-url.js +1 -1
  139. package/lib/commands/menu/sync.js +1 -1
  140. package/lib/commands/menu/visibility-update.js +1 -1
  141. package/lib/commands/notification/config-create.js +1 -1
  142. package/lib/commands/notification/config-delete.js +1 -1
  143. package/lib/commands/notification/config-list.js +1 -1
  144. package/lib/commands/notification/config-update.js +1 -1
  145. package/lib/commands/notification/index.js +1 -1
  146. package/lib/commands/notification/shared.js +1 -1
  147. package/lib/commands/ocr/index.js +1 -1
  148. package/lib/commands/page/create.js +1 -1
  149. package/lib/commands/page/custom/detail.js +1 -1
  150. package/lib/commands/page/custom/list.js +1 -1
  151. package/lib/commands/page/custom/publish.js +1 -1
  152. package/lib/commands/page/custom/shared.js +1 -1
  153. package/lib/commands/page/custom/syntax.js +1 -1
  154. package/lib/commands/page/custom/template.js +1 -1
  155. package/lib/commands/page/custom/update.js +1 -1
  156. package/lib/commands/page/data-list-status.js +1 -1
  157. package/lib/commands/page/generate-start.js +1 -1
  158. package/lib/commands/page/generate-status.js +1 -1
  159. package/lib/commands/page/index.js +1 -1
  160. package/lib/commands/page/pull.js +1 -1
  161. package/lib/commands/page/push.js +1 -1
  162. package/lib/commands/page/relation-audit.js +1 -1
  163. package/lib/commands/page/restore.js +1 -1
  164. package/lib/commands/page/shared.js +1 -1
  165. package/lib/commands/page/sync.js +1 -1
  166. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  167. package/lib/commands/project/create/format-elapsed.js +1 -1
  168. package/lib/commands/project/create/main.js +1 -1
  169. package/lib/commands/project/create/materialize-project-template.js +1 -1
  170. package/lib/commands/project/create/project-name.js +1 -1
  171. package/lib/commands/project/create/project-template-archive.js +1 -1
  172. package/lib/commands/project/create/project-template-path.js +1 -1
  173. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  174. package/lib/commands/project/create/use-format-code.js +1 -1
  175. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  176. package/lib/commands/project/index.js +1 -1
  177. package/lib/commands/project/upgrade.js +1 -1
  178. package/lib/commands/registry.js +1 -1
  179. package/lib/commands/role/delete.js +1 -1
  180. package/lib/commands/role/detail.js +1 -1
  181. package/lib/commands/role/index.js +1 -1
  182. package/lib/commands/role/list.js +1 -1
  183. package/lib/commands/role/shared.js +1 -1
  184. package/lib/commands/role/update.js +1 -1
  185. package/lib/commands/role/user-add.js +1 -1
  186. package/lib/commands/role/user-remove.js +1 -1
  187. package/lib/commands/role/user-resolve.js +1 -1
  188. package/lib/commands/run/index.js +1 -1
  189. package/lib/commands/schema.js +1 -1
  190. package/lib/commands/sql/create.js +1 -1
  191. package/lib/commands/sql/delete.js +1 -1
  192. package/lib/commands/sql/detail.js +1 -1
  193. package/lib/commands/sql/exec.js +1 -1
  194. package/lib/commands/sql/index.js +1 -1
  195. package/lib/commands/sql/list.js +1 -1
  196. package/lib/commands/sql/pull.js +1 -1
  197. package/lib/commands/sql/push.js +1 -1
  198. package/lib/commands/sql/shared.js +1 -1
  199. package/lib/commands/sql/status.js +1 -1
  200. package/lib/commands/sql/validate.js +1 -1
  201. package/lib/commands/task/index.js +1 -1
  202. package/lib/commands/task/status.js +1 -1
  203. package/lib/commands/tenant/index.js +1 -1
  204. package/lib/commands/tenant/members-list.js +1 -1
  205. package/lib/commands/tenant/shared.js +1 -1
  206. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  207. package/lib/commands/user-account/index.js +1 -1
  208. package/lib/commands/workspace/add.js +1 -1
  209. package/lib/commands/workspace/index.js +1 -1
  210. package/lib/commands/workspace/remove.js +1 -1
  211. package/lib/config/deployment-sync.js +1 -1
  212. package/lib/config/domain-config.js +1 -1
  213. package/lib/config/project-routing.js +1 -1
  214. package/lib/config/schema.js +1 -1
  215. package/lib/constant/cdn.js +1 -1
  216. package/lib/constant/cli.js +1 -1
  217. package/lib/constant/defaults.js +1 -1
  218. package/lib/constant/domain.js +1 -1
  219. package/lib/constant/env.js +1 -1
  220. package/lib/constant/output.js +1 -1
  221. package/lib/constant/paths.js +1 -1
  222. package/lib/constant/region.js +1 -1
  223. package/lib/constant/risk.js +1 -1
  224. package/lib/constant/routing-profile.js +1 -1
  225. package/lib/context/app-resolver.js +1 -1
  226. package/lib/context/auth-resolver.js +1 -1
  227. package/lib/context/config-loader.js +1 -1
  228. package/lib/context.js +1 -1
  229. package/lib/core/alias-resolver.js +1 -1
  230. package/lib/core/api-client.d.ts +0 -16
  231. package/lib/core/api-client.js +1 -1
  232. package/lib/core/bff/config.js +1 -1
  233. package/lib/core/bff/file-system.js +1 -1
  234. package/lib/core/bff/hash.js +1 -1
  235. package/lib/core/bff/lock.js +1 -1
  236. package/lib/core/bff/utils.js +1 -1
  237. package/lib/core/db-resolver.js +1 -1
  238. package/lib/core/kb-search-client.d.ts +30 -0
  239. package/lib/core/kb-search-client.js +1 -0
  240. package/lib/core/page/file-system.js +1 -1
  241. package/lib/core/page/hash.js +1 -1
  242. package/lib/core/page/lock.js +1 -1
  243. package/lib/core/sql-index-auditor.js +1 -1
  244. package/lib/core/sql-sync/config.js +1 -1
  245. package/lib/core/sql-sync/file-system.js +1 -1
  246. package/lib/core/sql-sync/hash.js +1 -1
  247. package/lib/core/sql-sync/lock.js +1 -1
  248. package/lib/core/sql-sync/utils.js +1 -1
  249. package/lib/core/sql-validator.js +1 -1
  250. package/lib/errors.js +1 -1
  251. package/lib/framework/build-all-flags.js +1 -1
  252. package/lib/framework/error-output.js +1 -1
  253. package/lib/framework/explicit-yes.js +1 -1
  254. package/lib/framework/flags.js +1 -1
  255. package/lib/framework/help.js +1 -1
  256. package/lib/framework/index.js +1 -1
  257. package/lib/framework/output.js +1 -1
  258. package/lib/framework/response.js +1 -1
  259. package/lib/framework/runner-alias.js +1 -1
  260. package/lib/framework/runner.js +1 -1
  261. package/lib/framework/schema-export.js +1 -1
  262. package/lib/framework/types.d.ts +1 -0
  263. package/lib/framework/types.js +1 -1
  264. package/lib/generated/build-info.d.ts +4 -4
  265. package/lib/generated/build-info.js +1 -1
  266. package/lib/help.js +1 -1
  267. package/lib/postinstall.js +1 -1
  268. package/lib/runtime/confirmation.js +1 -1
  269. package/lib/runtime/event.js +1 -1
  270. package/lib/runtime/index.js +1 -1
  271. package/lib/runtime/queue.js +1 -1
  272. package/lib/runtime/resolve.js +1 -1
  273. package/lib/skills/builtin-skill.js +1 -1
  274. package/lib/skills/main.js +1 -1
  275. package/lib/skills/npx-skills-add.js +1 -1
  276. package/lib/skills/skill-presence.js +1 -1
  277. package/lib/telemetry/cli-command-trace.js +1 -1
  278. package/lib/telemetry/cli-help-trace.js +1 -1
  279. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  280. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  281. package/lib/telemetry/send-cli-trace-log.js +1 -1
  282. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  283. package/lib/utils/ai_config.js +1 -1
  284. package/lib/utils/apply-jq-filter.js +1 -1
  285. package/lib/utils/cdn-config.js +1 -1
  286. package/lib/utils/check-sdk-version.js +1 -1
  287. package/lib/utils/cli-version-check.js +1 -1
  288. package/lib/utils/cli-version-policy.js +1 -1
  289. package/lib/utils/config.js +1 -1
  290. package/lib/utils/entity-with-id.js +1 -1
  291. package/lib/utils/file-utils.js +1 -1
  292. package/lib/utils/guides-cdn.js +1 -1
  293. package/lib/utils/http-client.js +1 -1
  294. package/lib/utils/is-non-interactive.js +1 -1
  295. package/lib/utils/logger.js +1 -1
  296. package/lib/utils/params.js +1 -1
  297. package/lib/utils/platform.js +1 -1
  298. package/lib/utils/sleep.js +1 -1
  299. package/lib/utils/template-replacer.js +1 -1
  300. package/lib/utils/update-notice.js +1 -1
  301. package/lib/utils/version.js +1 -1
  302. package/lib/utils/with-active-cookie.js +1 -1
  303. package/lib/utils/write-cli-side-channel.js +1 -1
  304. package/package.json +1 -1
  305. package/skills/rabetbase/SKILL.md +2 -2
  306. package/skills/rabetbase/references/rabetbase-config.md +1 -1
  307. package/skills/rabetbase/references/rabetbase-doctor.md +1 -1
  308. package/skills/rabetbase/references/rabetbase-kb.md +8 -7
  309. 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(_0x3daa56,_0x19f1da){const _0x34dc27=a171_0x3a53,_0x1e548e=_0x3daa56();while(!![]){try{const _0x7a12bf=parseInt(_0x34dc27(0xdd))/0x1+-parseInt(_0x34dc27(0xe4))/0x2*(-parseInt(_0x34dc27(0xfe))/0x3)+parseInt(_0x34dc27(0xdf))/0x4*(-parseInt(_0x34dc27(0xec))/0x5)+-parseInt(_0x34dc27(0xf3))/0x6*(parseInt(_0x34dc27(0x101))/0x7)+-parseInt(_0x34dc27(0xde))/0x8+-parseInt(_0x34dc27(0xdb))/0x9+parseInt(_0x34dc27(0xe5))/0xa;if(_0x7a12bf===_0x19f1da)break;else _0x1e548e['push'](_0x1e548e['shift']());}catch(_0x292919){_0x1e548e['push'](_0x1e548e['shift']());}}}(a171_0x4faa,0x42735));import{createWriteStream}from'node:fs';import a171_0x425a9a from'node:fs/promises';import a171_0x1f600 from'node:path';import{pipeline}from'node:stream/promises';import a171_0x250cad 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(_0xb1de31){return new Promise((_0x4a2438,_0x892c72)=>{a171_0x250cad['open'](_0xb1de31,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x258915,_0x1d1c73)=>{const _0x1e2009=a171_0x3a53;if(_0x258915||!_0x1d1c73){_0x892c72(_0x258915||new Error(_0x1e2009(0xe3)));return;}_0x4a2438(_0x1d1c73);});});}function openEntryStream(_0x1ae1b9,_0x163642){return new Promise((_0x3818e5,_0x94a4bc)=>{const _0x35951a=a171_0x3a53;_0x1ae1b9[_0x35951a(0xe7)](_0x163642,(_0x1b8de0,_0x5a6e1c)=>{if(_0x1b8de0||!_0x5a6e1c){_0x94a4bc(_0x1b8de0||new Error('Unable\x20to\x20read\x20ZIP\x20entry:\x20'+_0x163642['fileName']));return;}_0x3818e5(_0x5a6e1c);});});}function validateEntryPath(_0x1ac3de){const _0x26e088=a171_0x3a53,_0x23f756=_0x1ac3de[_0x26e088(0xe9)](/\\/g,'/'),_0x2eabdf=_0x23f756['endsWith']('/'),_0x3118f3=_0x2eabdf?_0x23f756[_0x26e088(0xf2)](0x0,-0x1):_0x23f756;if(!_0x3118f3||_0x23f756['startsWith']('/')||/^[A-Za-z]:\//[_0x26e088(0xe8)](_0x23f756))throw new Error('Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20'+_0x1ac3de);const _0x1fbba7=_0x3118f3['split']('/');for(const _0x328363 of _0x1fbba7){if(!_0x328363||_0x328363==='.'||_0x328363==='..'||_0x328363[_0x26e088(0xf9)]('.')||_0x328363[_0x26e088(0xf9)]('\x20')||WINDOWS_INVALID_CHAR['test'](_0x328363)||WINDOWS_RESERVED_NAME['test'](_0x328363))throw new Error(_0x26e088(0xfa)+_0x1ac3de);}return{'relativePath':_0x1fbba7[_0x26e088(0xdc)](a171_0x1f600[_0x26e088(0xe6)]),'directory':_0x2eabdf};}function isSymbolicLink(_0x177515){const _0x5b48b4=a171_0x3a53,_0x40b5d1=_0x177515[_0x5b48b4(0xfc)]>>>0x10&0xffff;return(_0x40b5d1&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0x54388a,_0x5d9693){const _0xb2bae8=a171_0x3a53,_0x167aba=await openZip(_0x54388a),_0x4ebee2=a171_0x1f600[_0xb2bae8(0xf6)](_0x5d9693),_0x4a9b05=new Set(),_0x8bd16f=new Map();let _0x347435=0x0,_0x38f8a3=0x0;await a171_0x425a9a[_0xb2bae8(0xeb)](_0x4ebee2,{'recursive':!![]}),await new Promise((_0x345d4f,_0x50b926)=>{const _0x5044b3=_0xb2bae8;let _0x5a950a=![];const _0xb04b77=_0x2c7e81=>{const _0x82ed0f=a171_0x3a53;if(_0x5a950a)return;_0x5a950a=!![],_0x167aba[_0x82ed0f(0xee)](),_0x50b926(_0x2c7e81 instanceof Error?_0x2c7e81:new Error(String(_0x2c7e81)));};_0x167aba[_0x5044b3(0x102)](_0x5044b3(0xef),_0xb04b77),_0x167aba[_0x5044b3(0x102)]('end',()=>{if(_0x5a950a)return;_0x5a950a=!![],_0x345d4f();}),_0x167aba['on'](_0x5044b3(0xf8),_0x1f149f=>{void(async()=>{const _0x24a465=a171_0x3a53;_0x347435+=0x1,_0x38f8a3+=_0x1f149f[_0x24a465(0xe0)];if(_0x347435>MAX_ENTRY_COUNT)throw new Error(_0x24a465(0xf4)+MAX_ENTRY_COUNT+_0x24a465(0x103));if(_0x38f8a3>MAX_UNCOMPRESSED_SIZE)throw new Error(_0x24a465(0xfd));if(_0x1f149f[_0x24a465(0xff)]())throw new Error(_0x24a465(0x100)+_0x1f149f[_0x24a465(0xf1)]);if(isSymbolicLink(_0x1f149f))throw new Error('Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20'+_0x1f149f['fileName']);const {relativePath:_0x3ecb3b,directory:_0x392c9c}=validateEntryPath(_0x1f149f[_0x24a465(0xf1)]),_0x2956f5=_0x3ecb3b[_0x24a465(0xf0)](a171_0x1f600[_0x24a465(0xe6)]);for(let _0x23cd95=0x1;_0x23cd95<=_0x2956f5['length'];_0x23cd95+=0x1){const _0x4b283d=_0x2956f5[_0x24a465(0xf2)](0x0,_0x23cd95)[_0x24a465(0xdc)](a171_0x1f600['sep']),_0x5cac3b=_0x4b283d['toLocaleLowerCase']('en-US'),_0x4822d5=_0x8bd16f['get'](_0x5cac3b);if(_0x4822d5&&_0x4822d5!==_0x4b283d)throw new Error(_0x24a465(0xda)+_0x1f149f['fileName']);_0x8bd16f[_0x24a465(0xfb)](_0x5cac3b,_0x4b283d);}const _0x5d8e6b=_0x3ecb3b[_0x24a465(0xed)]('en-US');if(_0x4a9b05['has'](_0x5d8e6b))throw new Error(_0x24a465(0xf7)+_0x1f149f[_0x24a465(0xf1)]);_0x4a9b05['add'](_0x5d8e6b);const _0x235ec7=a171_0x1f600[_0x24a465(0xf6)](_0x4ebee2,_0x3ecb3b);if(_0x235ec7!==_0x4ebee2&&!_0x235ec7[_0x24a465(0xf5)](''+_0x4ebee2+a171_0x1f600[_0x24a465(0xe6)]))throw new Error(_0x24a465(0xea)+_0x1f149f[_0x24a465(0xf1)]);if(_0x392c9c)await a171_0x425a9a[_0x24a465(0xeb)](_0x235ec7,{'recursive':!![]});else{await a171_0x425a9a[_0x24a465(0xeb)](a171_0x1f600[_0x24a465(0xe2)](_0x235ec7),{'recursive':!![]});const _0x296965=await openEntryStream(_0x167aba,_0x1f149f);await pipeline(_0x296965,createWriteStream(_0x235ec7,{'flags':'wx','mode':0x1a4}));}_0x167aba[_0x24a465(0xe1)]();})()['catch'](_0xb04b77);}),_0x167aba['readEntry']();});}function a171_0x3a53(_0x483ea6,_0x309317){_0x483ea6=_0x483ea6-0xda;const _0x4faa0a=a171_0x4faa();let _0x3a53af=_0x4faa0a[_0x483ea6];return _0x3a53af;}function a171_0x4faa(){const _0x359ffd=['uncompressedSize','readEntry','dirname','Unable\x20to\x20open\x20project\x20template\x20archive.','2fhEFfH','4801040kDcdvy','sep','openReadStream','test','replace','ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20','mkdir','5dGeWJr','toLocaleLowerCase','close','error','split','fileName','slice','6UfnZRU','Project\x20template\x20ZIP\x20exceeds\x20','startsWith','resolve','Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20','entry','endsWith','Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20','set','externalFileAttributes','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.','1181781ZAxcaa','isEncrypted','Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20','1817501AlBvaQ','once','\x20entries.','Case-conflicting\x20ZIP\x20entry\x20path:\x20','2176911KevPzD','join','258198YNKgAI','1070520JFXBUU','898844FjPFdQ'];a171_0x4faa=function(){return _0x359ffd;};return a171_0x4faa();}
@@ -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
+ (function(_0x1d64f0,_0x33ee95){const _0x207644=a172_0x4a8d,_0x20929b=_0x1d64f0();while(!![]){try{const _0x34c022=-parseInt(_0x207644(0x1b8))/0x1*(parseInt(_0x207644(0x1ae))/0x2)+parseInt(_0x207644(0x1b5))/0x3+-parseInt(_0x207644(0x1af))/0x4+-parseInt(_0x207644(0x1b9))/0x5*(parseInt(_0x207644(0x1b2))/0x6)+-parseInt(_0x207644(0x1b4))/0x7*(parseInt(_0x207644(0x1b1))/0x8)+-parseInt(_0x207644(0x1b7))/0x9*(-parseInt(_0x207644(0x1b0))/0xa)+parseInt(_0x207644(0x1ad))/0xb*(parseInt(_0x207644(0x1b6))/0xc);if(_0x34c022===_0x33ee95)break;else _0x20929b['push'](_0x20929b['shift']());}catch(_0x1efa0e){_0x20929b['push'](_0x20929b['shift']());}}}(a172_0x1042,0xdd074));function a172_0x1042(){const _0x95f6a=['2753254egRWGx','2956656eYfzsU','12VtKMNn','846vgRECE','7BIlxIb','3480YOzPvh','../../../../','15208237UqyqQI','180428GAmTtN','136364NJfEQy','25820yZaXZh','8gwmTaL','5574oanraY','resolve'];a172_0x1042=function(){return _0x95f6a;};return a172_0x1042();}import a172_0x54ed9c from'node:path';import{fileURLToPath}from'node:url';function a172_0x4a8d(_0x243181,_0x367156){_0x243181=_0x243181-0x1ad;const _0x104271=a172_0x1042();let _0x4a8dd3=_0x104271[_0x243181];return _0x4a8dd3;}const __dirname=a172_0x54ed9c['dirname'](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x32aef8=a172_0x4a8d;return a172_0x54ed9c[_0x32aef8(0x1b3)](__dirname,_0x32aef8(0x1ba));}
@@ -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(_0x33295f,_0x18f1c8){const _0x1803fb=a173_0xb364,_0x390279=_0x33295f();while(!![]){try{const _0x21c451=-parseInt(_0x1803fb(0x188))/0x1+parseInt(_0x1803fb(0x186))/0x2+parseInt(_0x1803fb(0x18a))/0x3+parseInt(_0x1803fb(0x17e))/0x4*(-parseInt(_0x1803fb(0x18e))/0x5)+-parseInt(_0x1803fb(0x181))/0x6*(parseInt(_0x1803fb(0x17c))/0x7)+-parseInt(_0x1803fb(0x182))/0x8*(parseInt(_0x1803fb(0x189))/0x9)+parseInt(_0x1803fb(0x185))/0xa;if(_0x21c451===_0x18f1c8)break;else _0x390279['push'](_0x390279['shift']());}catch(_0x1b8929){_0x390279['push'](_0x390279['shift']());}}}(a173_0x5006,0x339df));import a173_0x2d8e69 from'node:path';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{materializeLocalProjectTemplate,materializeProjectTemplate}from'../../../commands/project/create/materialize-project-template.js';function a173_0xb364(_0x288808,_0x41cc2b){_0x288808=_0x288808-0x17c;const _0x500669=a173_0x5006();let _0xb36416=_0x500669[_0x288808];return _0xb36416;}function a173_0x5006(){const _0x1bba01=['398661idGTRd','Failed\x20to\x20copy\x20project\x20template','cwd','resolve','5VobvsO','497WurCKr','copy','197468XUpkHV','Project\x20template\x20created','success','30246enfGiC','6792rkBUEJ','now','error','4526530fJErZA','327362PUVnAq','source','94013TZQRNE','387wvaDAd'];a173_0x5006=function(){return _0x1bba01;};return a173_0x5006();}export async function copyProjectTemplate(_0xbabda2,_0x2d223a,_0x4f78e3){const _0x519e6b=a173_0xb364,_0x567db4=Date[_0x519e6b(0x183)](),_0x4d39c3=a173_0x2d8e69[_0x519e6b(0x18d)](process[_0x519e6b(0x18c)](),_0xbabda2);try{logger['info'](_0x519e6b(0x17d),'Starting\x20project\x20template\x20creation',{'projectCode':_0xbabda2});const _0x311896=_0x4f78e3?await materializeLocalProjectTemplate(_0x4f78e3,_0x4d39c3,_0x2d223a):await materializeProjectTemplate(_0x4d39c3,_0x2d223a),_0x25c909=Date[_0x519e6b(0x183)]()-_0x567db4;logger[_0x519e6b(0x180)]('copy',_0x519e6b(0x17f),_0x25c909,{'projectCode':_0xbabda2,'templateSource':_0x311896[_0x519e6b(0x187)],'templateVersion':_0x311896['version']});}catch(_0x3f35cc){const _0x1f8ecf=Date[_0x519e6b(0x183)]()-_0x567db4;logger[_0x519e6b(0x184)]('copy',_0x519e6b(0x18b),{'projectCode':_0xbabda2,'error':_0x3f35cc instanceof Error?_0x3f35cc['message']:String(_0x3f35cc),'duration':_0x1f8ecf});throw _0x3f35cc;}return formatElapsed(_0x567db4);}
@@ -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(_0x597b0c,_0x38aa51){const _0x437a09=a174_0x1841,_0xd6de96=_0x597b0c();while(!![]){try{const _0x12d64c=parseInt(_0x437a09(0x1f1))/0x1*(parseInt(_0x437a09(0x1f8))/0x2)+-parseInt(_0x437a09(0x1ea))/0x3*(-parseInt(_0x437a09(0x1f5))/0x4)+-parseInt(_0x437a09(0x1ed))/0x5*(-parseInt(_0x437a09(0x1fb))/0x6)+parseInt(_0x437a09(0x1f2))/0x7*(-parseInt(_0x437a09(0x1f9))/0x8)+-parseInt(_0x437a09(0x1ee))/0x9+parseInt(_0x437a09(0x1f7))/0xa+parseInt(_0x437a09(0x1fe))/0xb*(parseInt(_0x437a09(0x1f6))/0xc);if(_0x12d64c===_0x38aa51)break;else _0xd6de96['push'](_0xd6de96['shift']());}catch(_0x5157a0){_0xd6de96['push'](_0xd6de96['shift']());}}}(a174_0x4100,0x359b6));import a174_0x48a17d from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a174_0x1841(_0x45983c,_0x1b1148){_0x45983c=_0x45983c-0x1ea;const _0x4100b6=a174_0x4100();let _0x184113=_0x4100b6[_0x45983c];return _0x184113;}import{logger}from'../../../utils/logger.js';function a174_0x4100(){const _0x6d80b=['Starting\x20code\x20format','npx','4oWxhvC','276DflrmW','1523090vwjLrf','4ercJAp','28504jsPdoQ','now','2406522MjDqig','success','error','72017zBhymE','153957xuxEBM','info','prettier','5PJllQJ','3136842qLLRyb','Code\x20format\x20completed','format','38239VrXkvk','518wusiCd'];a174_0x4100=function(){return _0x6d80b;};return a174_0x4100();}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x37cc75){const _0x19a125=a174_0x1841,_0x4f867c=Date[_0x19a125(0x1fa)](),_0x1a19c4=a174_0x48a17d['resolve'](process['cwd'](),_0x37cc75);try{logger[_0x19a125(0x1eb)](_0x19a125(0x1f0),_0x19a125(0x1f3),{'projectCode':_0x37cc75}),await execa(resolveNpmBin(_0x19a125(0x1f4)),[_0x19a125(0x1ec),'--write','.'],{'cwd':_0x1a19c4});const _0x3cfdf8=Date[_0x19a125(0x1fa)]()-_0x4f867c;logger[_0x19a125(0x1fc)](_0x19a125(0x1f0),_0x19a125(0x1ef),_0x3cfdf8,{'projectCode':_0x37cc75});}catch(_0x21f392){const _0x3e2a24=Date['now']()-_0x4f867c;logger[_0x19a125(0x1fd)](_0x19a125(0x1f0),'Code\x20format\x20failed',{'projectCode':_0x37cc75,'error':_0x21f392 instanceof Error?_0x21f392['message']:String(_0x21f392),'duration':_0x3e2a24});throw _0x21f392;}return formatElapsed(_0x4f867c);}
@@ -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(_0x1749a5,_0x47c66b){const _0x5ef397=a175_0x3394,_0x245b38=_0x1749a5();while(!![]){try{const _0x5cd3d9=-parseInt(_0x5ef397(0xc6))/0x1+parseInt(_0x5ef397(0xc8))/0x2*(-parseInt(_0x5ef397(0xce))/0x3)+-parseInt(_0x5ef397(0xc7))/0x4+-parseInt(_0x5ef397(0xca))/0x5+parseInt(_0x5ef397(0xcc))/0x6+-parseInt(_0x5ef397(0xc9))/0x7*(-parseInt(_0x5ef397(0xcf))/0x8)+parseInt(_0x5ef397(0xcb))/0x9*(parseInt(_0x5ef397(0xc4))/0xa);if(_0x5cd3d9===_0x47c66b)break;else _0x245b38['push'](_0x245b38['shift']());}catch(_0x280099){_0x245b38['push'](_0x245b38['shift']());}}}(a175_0x39a9,0x4293f));function a175_0x3394(_0x154d49,_0x3a60f5){_0x154d49=_0x154d49-0xbb;const _0x39a90d=a175_0x39a9();let _0x3394c7=_0x39a90d[_0x154d49];return _0x3394c7;}import a175_0x11aa23 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a175_0x39a9(){const _0x1ebb2f=['resolve','--registry','info','https://registry.npmmirror.com','install','70axJwPE','now','180001jbfUya','1788968fyWQxS','932BiGdse','1395380ElnWIf','1362315qWteGv','1242027RbWpgx','330924eOUAcX','npm','1593fgrWRj','16sHZVQl','Dependency\x20install\x20completed','error','cwd','success'];a175_0x39a9=function(){return _0x1ebb2f;};return a175_0x39a9();}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x525287){const _0x223fb8=a175_0x3394,_0x455d75=Date['now'](),_0x28e962=a175_0x11aa23[_0x223fb8(0xbf)](process[_0x223fb8(0xbd)](),_0x525287);try{logger[_0x223fb8(0xc1)](_0x223fb8(0xc3),'Starting\x20dependency\x20install',{'projectCode':_0x525287,'registry':_0x223fb8(0xc2)}),await execa(resolveNpmBin(_0x223fb8(0xcd)),[_0x223fb8(0xc3),_0x223fb8(0xc0),_0x223fb8(0xc2)],{'cwd':_0x28e962});const _0x19d124=Date['now']()-_0x455d75;logger[_0x223fb8(0xbe)](_0x223fb8(0xc3),_0x223fb8(0xbb),_0x19d124,{'projectCode':_0x525287});}catch(_0x3eac88){const _0x36a37f=Date[_0x223fb8(0xc5)]()-_0x455d75;logger[_0x223fb8(0xbc)](_0x223fb8(0xc3),'Dependency\x20install\x20failed',{'projectCode':_0x525287,'error':_0x3eac88 instanceof Error?_0x3eac88['message']:String(_0x3eac88),'duration':_0x36a37f});throw _0x3eac88;}return formatElapsed(_0x455d75);}
@@ -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_0x9152c=a176_0x3758;(function(_0x5b0669,_0x339a41){const _0x44c795=a176_0x3758,_0x435387=_0x5b0669();while(!![]){try{const _0x411943=-parseInt(_0x44c795(0x1ef))/0x1*(-parseInt(_0x44c795(0x1fc))/0x2)+-parseInt(_0x44c795(0x1f2))/0x3+parseInt(_0x44c795(0x205))/0x4*(parseInt(_0x44c795(0x209))/0x5)+-parseInt(_0x44c795(0x1f9))/0x6+parseInt(_0x44c795(0x1fb))/0x7*(parseInt(_0x44c795(0x1f0))/0x8)+-parseInt(_0x44c795(0x1e7))/0x9*(parseInt(_0x44c795(0x206))/0xa)+-parseInt(_0x44c795(0x20a))/0xb*(-parseInt(_0x44c795(0x1f3))/0xc);if(_0x411943===_0x339a41)break;else _0x435387['push'](_0x435387['shift']());}catch(_0x2bbda9){_0x435387['push'](_0x435387['shift']());}}}(a176_0x1c8e,0x9ad42));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';function a176_0x3758(_0x5d5cc0,_0x46270d){_0x5d5cc0=_0x5d5cc0-0x1e5;const _0x1c8ef6=a176_0x1c8e();let _0x3758ff=_0x1c8ef6[_0x5d5cc0];return _0x3758ff;}const createFlags=[{'name':a176_0x9152c(0x1f7),'type':a176_0x9152c(0x201),'description':a176_0x9152c(0x20c)},{'name':a176_0x9152c(0x1f6),'type':a176_0x9152c(0x201),'description':a176_0x9152c(0x1f1)},{'name':a176_0x9152c(0x1fa),'type':'string','description':a176_0x9152c(0x1ff)},{'name':a176_0x9152c(0x203),'type':'string','description':a176_0x9152c(0x1ec)}],upgradeFlags=[{'name':a176_0x9152c(0x1f5),'type':a176_0x9152c(0x1e5),'description':a176_0x9152c(0x1eb),'default':![]}];export const projectDefinitions=[{'service':a176_0x9152c(0x1e6),'command':a176_0x9152c(0x1ea),'description':a176_0x9152c(0x202),'risk':a176_0x9152c(0x1f8),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a176_0x9152c(0x1fd),'description':a176_0x9152c(0x1e8),'required':![]}],'flags':createFlags,async 'execute'(_0x7ca49c){const _0x4f77a0=a176_0x9152c,{createApp:_0xc04e19}=await import(_0x4f77a0(0x1e9)),_0x4b7b50=_0x7ca49c['str']('name')[_0x4f77a0(0x1ee)]()||_0x7ca49c[_0x4f77a0(0x200)][0x0]?.[_0x4f77a0(0x1ee)](),_0x46f283=_0x7ca49c[_0x4f77a0(0x20d)]('env')||undefined,_0x20c827=_0x7ca49c[_0x4f77a0(0x20d)]('appcode')||undefined,_0x2c3229=_0x7ca49c[_0x4f77a0(0x20d)]('template-source')[_0x4f77a0(0x1ee)]()||undefined;if(_0x7ca49c[_0x4f77a0(0x1ed)]){if(!_0x4b7b50)throw CliErrors['validation'](_0x4f77a0(0x20b),_0x4f77a0(0x1f4)+CLI_BIN_NAME+_0x4f77a0(0x1fe));await _0xc04e19({'projectCode':_0x4b7b50,'appCode':_0x20c827,'env':_0x46f283,'cookie':_0x7ca49c[_0x4f77a0(0x204)],'nonInteractive':!![],'templateSource':_0x2c3229});}else await _0xc04e19({'projectCode':_0x4b7b50,'appCode':_0x20c827,'env':_0x46f283,'cookie':_0x7ca49c[_0x4f77a0(0x204)],'templateSource':_0x2c3229});return{'ok':!![]};}},{'service':a176_0x9152c(0x1e6),'command':'upgrade','description':a176_0x9152c(0x208),'risk':a176_0x9152c(0x1f8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x4667bc){const _0x4eaee5=a176_0x9152c;return await upgradeApp(_0x4667bc['nonInteractive'],{'yes':_0x4667bc[_0x4eaee5(0x207)](_0x4eaee5(0x1f5))}),{'ok':!![]};}}];function a176_0x1c8e(){const _0x1ae9e4=['Skip\x20confirmation\x20prompt','Prepared\x20local\x20project\x20template\x20directory','nonInteractive','trim','287998kWrrfG','35592rjDVdU','Target\x20environment','1533270DhLLCL','7405620fUFQEl','Usage:\x20','yes','env','name','write','4745328rBBgDX','appcode','1456MbeRPd','2VutCRR','project-name','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','args','string','Create\x20a\x20new\x20project','template-source','cookie','2754892BAftbf','10pDcBLi','bool','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','5umIOZG','22kRVJNb','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','Project\x20name','str','boolean','project','10802043ZpKTvG','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','../../commands/project/create/main.js','create'];a176_0x1c8e=function(){return _0x1ae9e4;};return a176_0x1c8e();}
@@ -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_0x18e75b=a177_0x4974;(function(_0x4a3f5b,_0x5da251){const _0x173c95=a177_0x4974,_0x125f89=_0x4a3f5b();while(!![]){try{const _0x597354=parseInt(_0x173c95(0x12e))/0x1+parseInt(_0x173c95(0x149))/0x2*(parseInt(_0x173c95(0x117))/0x3)+parseInt(_0x173c95(0x146))/0x4*(-parseInt(_0x173c95(0x11e))/0x5)+-parseInt(_0x173c95(0x10f))/0x6*(parseInt(_0x173c95(0x158))/0x7)+parseInt(_0x173c95(0x113))/0x8*(parseInt(_0x173c95(0x10e))/0x9)+-parseInt(_0x173c95(0x114))/0xa*(-parseInt(_0x173c95(0x15d))/0xb)+parseInt(_0x173c95(0x105))/0xc;if(_0x597354===_0x5da251)break;else _0x125f89['push'](_0x125f89['shift']());}catch(_0xf75836){_0x125f89['push'](_0x125f89['shift']());}}}(a177_0x33f0,0x56668));import a177_0x2a984f from'chalk';import a177_0x4f3194 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_0x18e75b(0x167),a177_0x18e75b(0xf5)];function collectIdeSkillFiles(_0x4fb05b){const _0x17185a=a177_0x18e75b,_0x43e917=[];for(const _0x32e562 of Object['values'](CORE_IDE_CONFIGS)){if(_0x32e562[_0x17185a(0x125)])for(const _0x371de2 of _0x32e562[_0x17185a(0x125)]){_0x43e917[_0x17185a(0x10a)](resolve(_0x4fb05b,_0x371de2[_0x17185a(0xed)]));}}return _0x43e917;}function a177_0x33f0(){const _0x413674=['inherit','4LGsVdM','Upgrade\x20@lovrabet/sdk','devDependencies','12aEcSvl','isArray','\x20\x20Action:\x20delete','exit\x20','white','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','Upgrade\x20completed\x20successfully!','sdkUpgrade','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','green','\x20from\x20','detail','yes','===\x20Upgrade\x20Analysis\x20===','Install\x20new\x20skill','4280017PmkuUp','step','Remove\x20.lovrabet/','failed','cwd','3872495dyqoZN','\x20→\x20keys:\x20','@lovrabet/dataset-mcp-server','Step\x205/7:\x20Removing\x20old\x20skill...','.cursor/mcp.json','bold','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','\x20\x20npm\x20install','parse','hasNewConfig','.lovrabet.json','done','\x20→\x20','log','removed\x20','join','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','dependencies','no\x20matching\x20entry\x20found','@lovrabet/sdk:','cyan','Upgrade\x20cancelled.','isDirectory','path','utf8','configMigration','Config\x20file:','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','stringify','needed','includes','.lovrabetrc','Clean\x20MCP\x20config','Legacy\x20artifacts:','lovrabet/rabetbase','status','Step\x206/7:\x20Installing\x20new\x20skill...','.claude/skills/lovrabet','length','Remove\x20legacy\x20artifacts','\x20\x20#\x20or','error','\x20\x20Fields\x20to\x20migrate:\x20','\x20removed','skipped','CANCEL','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','49440KOjjsi','.lovrabet','entries','fail','[\x22@lovrabet/sdk\x22]:\x20','push','message','oldArtifacts','lovrabet/rabetbase\x20installed\x20globally','27VqkOKd','6zgupvh','args','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','Remove\x20old\x20skill','498856AwxEmD','10IwycrG','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','288567HDAfxV','mcpServers','@lovrabet/sdk','\x20\x20\x20\x20\x20\x20\x20','string','filter','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','1672480ydPIrk','Step\x204/7:\x20MCP\x20config\x20—\x20','not\x20found\x20(will\x20create)','undefined','label','\x20\x20Current\x20version\x20in\x20','\x20\x20bun\x20install','files','yellow','FOUND','.bak','succeed','not\x20needed','MCP\x20config:','none\x20found','not\x20found\x20or\x20already\x20at\x20latest','179453EPbGDT','Skill\x20swap:','skipped\x20(no\x20legacy\x20config)','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','Config\x20migration','already\x20exists\x20(will\x20merge)','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','latest','\x20\x20New\x20config\x20(.rabetbase.json):\x20','object','oldMcpConfig','\x20\x20Step\x20','some','oldPath','\x20→\x20latest','fields','Step\x201/7:\x20Config\x20migration\x20—\x20','===\x20Upgrade\x20Summary\x20===','Proceed\x20with\x20upgrade?','red','start','info','gray'];a177_0x33f0=function(){return _0x413674;};return a177_0x33f0();}function analyse(_0x47eb68){const _0x2a34aa=a177_0x18e75b;let _0x4b8da4=null;const _0x3db9c8=resolve(_0x47eb68,NEW_CONFIG_NAME),_0x119f61=existsSync(_0x3db9c8);for(const _0x491594 of LEGACY_CONFIG_NAMES){const _0x3bf0dc=resolve(_0x47eb68,_0x491594);if(existsSync(_0x3bf0dc)){const _0x2caf0b=readConfigFile(_0x3bf0dc),_0x26eb85=Object['keys'](_0x2caf0b)[_0x2a34aa(0x11c)](_0x5ef158=>typeof _0x2caf0b[_0x5ef158]!==_0x2a34aa(0x121));_0x4b8da4={'oldPath':_0x3bf0dc,'hasNewConfig':_0x119f61,'fields':_0x26eb85};break;}}const _0x20724b=[],_0x2ce463=resolve(_0x47eb68,_0x2a34aa(0x106));if(existsSync(_0x2ce463))_0x20724b[_0x2a34aa(0x10a)](_0x2ce463);const _0x173b71=resolve(_0x47eb68,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x173b71))_0x20724b[_0x2a34aa(0x10a)](_0x173b71);const _0x22e6ff=resolve(_0x47eb68,_0x2a34aa(0xfb));if(existsSync(_0x22e6ff))_0x20724b['push'](_0x22e6ff);for(const _0x453ddb of collectIdeSkillFiles(_0x47eb68)){if(existsSync(_0x453ddb))_0x20724b[_0x2a34aa(0x10a)](_0x453ddb);}let _0x1552d8=null;const _0x8f0c70=resolve(_0x47eb68,_0x2a34aa(0x161));if(existsSync(_0x8f0c70))try{const _0x50fcfe=JSON[_0x2a34aa(0x165)](readFileSync(_0x8f0c70,_0x2a34aa(0xee)));if(_0x50fcfe?.['mcpServers']&&typeof _0x50fcfe[_0x2a34aa(0x118)]===_0x2a34aa(0x137)){const _0x51eb13=[];for(const [_0x460fb4,_0x59b464]of Object[_0x2a34aa(0x107)](_0x50fcfe[_0x2a34aa(0x118)])){const _0x18d64b=_0x59b464;_0x18d64b?.[_0x2a34aa(0x110)]&&Array[_0x2a34aa(0x14a)](_0x18d64b[_0x2a34aa(0x110)])&&_0x18d64b[_0x2a34aa(0x110)]['some'](_0x5c3d55=>typeof _0x5c3d55===_0x2a34aa(0x11b)&&_0x5c3d55[_0x2a34aa(0xf4)](_0x2a34aa(0x15f)))&&_0x51eb13[_0x2a34aa(0x10a)](_0x460fb4);}_0x51eb13[_0x2a34aa(0xfc)]>0x0&&(_0x1552d8={'path':_0x8f0c70,'keys':_0x51eb13});}}catch{}const _0x22ce18=_0x20724b[_0x2a34aa(0xfc)]>0x0||_0x4b8da4!==null;let _0x3c5856=null;const _0x2cf872=resolve(_0x47eb68,'package.json');if(existsSync(_0x2cf872))try{const _0x3bb2a8=JSON[_0x2a34aa(0x165)](readFileSync(_0x2cf872,_0x2a34aa(0xee)));for(const _0x479308 of[_0x2a34aa(0xe7),_0x2a34aa(0x148)]){const _0x58cc70=_0x3bb2a8?.[_0x479308]?.[_0x2a34aa(0x119)];if(typeof _0x58cc70===_0x2a34aa(0x11b)){_0x58cc70!==_0x2a34aa(0x135)&&(_0x3c5856={'pkgPath':_0x2cf872,'currentVersion':_0x58cc70,'field':_0x479308});break;}}}catch{}return{'configMigration':_0x4b8da4,'oldArtifacts':_0x20724b,'oldMcpConfig':_0x1552d8,'needsSkillSwap':_0x22ce18,'sdkUpgrade':_0x3c5856};}function printReport(_0x2a63f1){const _0x321f67=a177_0x18e75b,{configMigration:_0x2a33bc,oldArtifacts:_0xa8e971,oldMcpConfig:_0x33115e,needsSkillSwap:_0x513132}=_0x2a63f1;console[_0x321f67(0xe3)](''),console[_0x321f67(0xe3)](a177_0x2a984f[_0x321f67(0x162)](_0x321f67(0x156))),console[_0x321f67(0xe3)]('');_0x2a33bc?(console[_0x321f67(0xe3)](a177_0x2a984f[_0x321f67(0xea)](_0x321f67(0xf0))+('\x20\x20'+a177_0x2a984f['yellow'](_0x2a33bc[_0x321f67(0x13b)]))),console[_0x321f67(0xe3)](_0x321f67(0x136)+(_0x2a33bc[_0x321f67(0x166)]?a177_0x2a984f['green'](_0x321f67(0x133)):a177_0x2a984f[_0x321f67(0x144)](_0x321f67(0x120)))),console['log'](_0x321f67(0x100)+_0x2a33bc[_0x321f67(0x13d)][_0x321f67(0xe5)](',\x20')),console[_0x321f67(0xe3)](_0x321f67(0x11d))):console[_0x321f67(0xe3)](a177_0x2a984f[_0x321f67(0xea)]('Config\x20file:')+'\x20\x20'+a177_0x2a984f[_0x321f67(0x144)]('no\x20legacy\x20config\x20found'));console[_0x321f67(0xe3)]('');if(_0xa8e971[_0x321f67(0xfc)]>0x0){console[_0x321f67(0xe3)](a177_0x2a984f[_0x321f67(0xea)](_0x321f67(0xf7)));for(const _0xee6249 of _0xa8e971){console[_0x321f67(0xe3)]('\x20\x20'+a177_0x2a984f['red'](_0x321f67(0x127))+'\x20\x20'+_0xee6249);}console[_0x321f67(0xe3)](_0x321f67(0x14b));}else console[_0x321f67(0xe3)](a177_0x2a984f['cyan'](_0x321f67(0xf7))+'\x20\x20'+a177_0x2a984f[_0x321f67(0x144)](_0x321f67(0x12c)));console['log']('');_0x33115e?(console[_0x321f67(0xe3)](a177_0x2a984f[_0x321f67(0xea)](_0x321f67(0x12b))+('\x20\x20'+a177_0x2a984f[_0x321f67(0x126)](_0x33115e['path'])+_0x321f67(0x15e)+_0x33115e['keys'][_0x321f67(0xe5)](',\x20'))),console[_0x321f67(0xe3)]('\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server')):console[_0x321f67(0xe3)](a177_0x2a984f['cyan']('MCP\x20config:')+'\x20\x20'+a177_0x2a984f[_0x321f67(0x144)]('no\x20legacy\x20entry'));console[_0x321f67(0xe3)](''),console[_0x321f67(0xe3)](a177_0x2a984f[_0x321f67(0xea)](_0x321f67(0x12f))+('\x20\x20'+(_0x513132?a177_0x2a984f['yellow'](_0x321f67(0xf3)):a177_0x2a984f['green'](_0x321f67(0x12a)))));_0x513132&&console[_0x321f67(0xe3)](_0x321f67(0x131)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x321f67(0xe3)]('');if(_0x2a63f1[_0x321f67(0x150)]){const {currentVersion:_0xe4f01f,field:_0x426a8f,pkgPath:_0x4c011d}=_0x2a63f1['sdkUpgrade'];console['log'](a177_0x2a984f['cyan'](_0x321f67(0xe9))+('\x20\x20'+a177_0x2a984f[_0x321f67(0x126)](_0x4c011d))),console['log'](_0x321f67(0x123)+_0x426a8f+':\x20'+a177_0x2a984f[_0x321f67(0x126)](_0xe4f01f)+_0x321f67(0x169)+a177_0x2a984f[_0x321f67(0x152)]('latest')),console['log'](_0x321f67(0x151));}else console[_0x321f67(0xe3)](a177_0x2a984f[_0x321f67(0xea)](_0x321f67(0xe9))+'\x20\x20'+a177_0x2a984f[_0x321f67(0x144)](_0x321f67(0x12d)));console[_0x321f67(0xe3)]('');}function execConfigMigration(_0x246e9c,_0x4ee308){const _0x5319cc=a177_0x18e75b,{configMigration:_0x4c4693}=_0x246e9c;if(!_0x4c4693?.[_0x5319cc(0x13b)])return{'step':0x1,'label':_0x5319cc(0x132),'ok':!![],'detail':_0x5319cc(0x130)};const _0x51f7af=readConfigFile(_0x4c4693[_0x5319cc(0x13b)]),_0x879959=resolve(_0x4ee308,NEW_CONFIG_NAME),_0x4b24d4=_0x4c4693[_0x5319cc(0x166)]?readConfigFile(_0x879959):{};for(const [_0x4cd515,_0x34ba3a]of Object[_0x5319cc(0x107)](_0x51f7af)){!(_0x4cd515 in _0x4b24d4)&&(_0x4b24d4[_0x4cd515]=_0x34ba3a);}writeConfigFile(_0x879959,_0x4b24d4);const _0x4460c9=_0x4c4693['oldPath']+_0x5319cc(0x128);return renameSync(_0x4c4693[_0x5319cc(0x13b)],_0x4460c9),{'step':0x1,'label':_0x5319cc(0x132),'ok':!![],'detail':_0x4c4693[_0x5319cc(0x13b)]+_0x5319cc(0x169)+_0x879959+'\x20(backup:\x20'+_0x4460c9+')'};}function execRemoveOldArtifacts(_0x597621){const _0x54b189=a177_0x18e75b,_0x399378=[];for(const _0x2e705a of _0x597621){try{if(!existsSync(_0x2e705a))continue;const _0x5193e7=tryStat(_0x2e705a);_0x5193e7?.[_0x54b189(0xec)]()?rmSync(_0x2e705a,{'recursive':!![],'force':!![]}):unlinkSync(_0x2e705a);}catch(_0x52446c){_0x399378[_0x54b189(0x10a)](_0x2e705a+':\x20'+_0x52446c[_0x54b189(0x10b)]);}}return{'step':0x3,'label':_0x54b189(0xfd),'ok':_0x399378[_0x54b189(0xfc)]===0x0,'detail':_0x399378[_0x54b189(0xfc)]>0x0?_0x597621['length']-_0x399378[_0x54b189(0xfc)]+'/'+_0x597621[_0x54b189(0xfc)]+'\x20removed\x20('+_0x399378['join'](';\x20')+')':_0x597621[_0x54b189(0xfc)]+_0x54b189(0x101)};}function execCleanMcp(_0x222a61){const _0x34ab55=a177_0x18e75b;if(!_0x222a61[_0x34ab55(0x138)])return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':'skipped'};try{const _0x254374=readFileSync(_0x222a61[_0x34ab55(0x138)][_0x34ab55(0xed)],_0x34ab55(0xee)),_0x391fa8=JSON[_0x34ab55(0x165)](_0x254374);if(_0x391fa8?.[_0x34ab55(0x118)]&&typeof _0x391fa8[_0x34ab55(0x118)]===_0x34ab55(0x137)){const _0x249e6b=[];for(const [_0x1c584a,_0x497b64]of Object[_0x34ab55(0x107)](_0x391fa8['mcpServers'])){_0x497b64?.[_0x34ab55(0x110)]&&Array[_0x34ab55(0x14a)](_0x497b64['args'])&&_0x497b64['args'][_0x34ab55(0x13a)](_0x38183b=>typeof _0x38183b===_0x34ab55(0x11b)&&_0x38183b[_0x34ab55(0xf4)](_0x34ab55(0x15f)))&&_0x249e6b['push'](_0x1c584a);}for(const _0x350086 of _0x249e6b){delete _0x391fa8['mcpServers'][_0x350086];}return _0x249e6b[_0x34ab55(0xfc)]>0x0&&writeFileSync(_0x222a61[_0x34ab55(0x138)]['path'],JSON[_0x34ab55(0xf2)](_0x391fa8,null,0x2)+'\x0a',_0x34ab55(0xee)),{'step':0x4,'label':_0x34ab55(0xf6),'ok':!![],'detail':_0x34ab55(0xe4)+_0x249e6b[_0x34ab55(0xe5)](',\x20')+_0x34ab55(0x153)+_0x222a61['oldMcpConfig'][_0x34ab55(0xed)]};}return{'step':0x4,'label':_0x34ab55(0xf6),'ok':!![],'detail':_0x34ab55(0xe8)};}catch(_0x31b90a){return{'step':0x4,'label':_0x34ab55(0xf6),'ok':![],'detail':_0x31b90a['message']};}}function a177_0x4974(_0x556107,_0x1572d4){_0x556107=_0x556107-0xe3;const _0x33f075=a177_0x33f0();let _0x497418=_0x33f075[_0x556107];return _0x497418;}function execSkillsRemove(_0x27af27,_0x3a776b){const _0x36a2f3=a177_0x18e75b,_0x45c37e=runNpxSkillsRemove(_0x27af27,{'stdio':_0x36a2f3(0x145),'yes':_0x3a776b});return{'step':0x5,'label':_0x36a2f3(0x112),'ok':_0x45c37e['ok'],'detail':_0x45c37e['ok']?'lovrabet/lovrabet-skill\x20removed':_0x45c37e['error']??_0x36a2f3(0x14c)+_0x45c37e[_0x36a2f3(0xf9)]};}function execSkillsAdd(_0x1b8493,_0x3420aa){const _0x4322ad=a177_0x18e75b,_0x1b163b=runNpxSkillsAddGlobal(_0x1b8493,_0x4322ad(0xf8),{'stdio':_0x4322ad(0x145),'yes':_0x3420aa});return{'step':0x6,'label':_0x4322ad(0x157),'ok':_0x1b163b['ok'],'detail':_0x1b163b['ok']?_0x4322ad(0x10d):_0x1b163b[_0x4322ad(0xff)]??'exit\x20'+_0x1b163b[_0x4322ad(0xf9)]};}function execUpgradeSdk(_0x249f4f){const _0x31b17d=a177_0x18e75b;if(!_0x249f4f[_0x31b17d(0x150)])return{'step':0x7,'label':_0x31b17d(0x147),'ok':!![],'detail':_0x31b17d(0x104)};const {pkgPath:_0xdd3b80,currentVersion:_0x20daa9,field:_0x8347eb}=_0x249f4f[_0x31b17d(0x150)];try{const _0x1f16a3=readFileSync(_0xdd3b80,_0x31b17d(0xee)),_0x326cbe=JSON[_0x31b17d(0x165)](_0x1f16a3);return _0x326cbe[_0x8347eb][_0x31b17d(0x119)]=_0x31b17d(0x135),writeFileSync(_0xdd3b80,JSON[_0x31b17d(0xf2)](_0x326cbe,null,0x2)+'\x0a',_0x31b17d(0xee)),{'step':0x7,'label':_0x31b17d(0x147),'ok':!![],'detail':_0x8347eb+_0x31b17d(0x109)+_0x20daa9+_0x31b17d(0x13c)};}catch(_0x1e2c9d){return{'step':0x7,'label':_0x31b17d(0x147),'ok':![],'detail':_0x1e2c9d[_0x31b17d(0x10b)]};}}function tryStat(_0xfe8d2d){try{return statSync(_0xfe8d2d);}catch{return undefined;}}function printSummary(_0x56d43f){const _0x178dba=a177_0x18e75b;console[_0x178dba(0xe3)](''),console[_0x178dba(0xe3)](a177_0x2a984f[_0x178dba(0x162)](_0x178dba(0x13f))),console[_0x178dba(0xe3)]('');for(const _0x51572e of _0x56d43f){const _0x280228=_0x51572e['ok']?a177_0x2a984f[_0x178dba(0x152)]('OK'):a177_0x2a984f[_0x178dba(0x141)]('FAIL');console['log']('\x20\x20'+_0x280228+_0x178dba(0x139)+_0x51572e[_0x178dba(0x159)]+':\x20'+_0x51572e[_0x178dba(0x122)]);if(_0x51572e[_0x178dba(0x154)])console[_0x178dba(0xe3)](_0x178dba(0x11a)+a177_0x2a984f['gray'](_0x51572e[_0x178dba(0x154)]));}console['log']('');}export async function upgradeApp(_0xb0b68b,_0x1eee91){const _0x5a235c=a177_0x18e75b,_0x213252=process[_0x5a235c(0x15c)](),_0x475196=analyse(_0x213252),_0x406b62=!_0x475196[_0x5a235c(0xef)]&&_0x475196[_0x5a235c(0x10c)]['length']===0x0&&!_0x475196[_0x5a235c(0x138)]&&!_0x475196['needsSkillSwap']&&!_0x475196[_0x5a235c(0x150)];if(_0x406b62){console[_0x5a235c(0xe3)](a177_0x2a984f[_0x5a235c(0x152)](_0x5a235c(0x163)));return;}printReport(_0x475196);const _0x65b2f2=!!(_0x1eee91[_0x5a235c(0x155)]||_0x1eee91['Y']||_0xb0b68b);if(!_0x65b2f2)try{const _0x2fe954=await askConfirm(_0x5a235c(0x140));if(!_0x2fe954){console[_0x5a235c(0xe3)](a177_0x2a984f[_0x5a235c(0x144)](_0x5a235c(0xeb)));return;}}catch(_0x14ab72){if(_0x14ab72?.[_0x5a235c(0x10b)]===_0x5a235c(0x103)){console[_0x5a235c(0xe3)](a177_0x2a984f['gray'](_0x5a235c(0xeb)));return;}throw _0x14ab72;}const _0x1303a7=[],_0x5dd3ba=a177_0x4f3194({'text':'Step\x201/7:\x20Migrating\x20config...','color':_0x5a235c(0xea)})[_0x5a235c(0x142)](),_0x5632a6=execConfigMigration(_0x475196,_0x213252);_0x1303a7[_0x5a235c(0x10a)](_0x5632a6),_0x5dd3ba[_0x5632a6['ok']?'succeed':_0x5a235c(0x108)](_0x5a235c(0x13e)+(_0x5632a6['detail']??(_0x5632a6['ok']?_0x5a235c(0x168):_0x5a235c(0x15b))));const _0x31d287=resolve(_0x213252,_0x5a235c(0x106)),_0x3db492=a177_0x4f3194({'text':_0x5a235c(0x111),'color':_0x5a235c(0xea)})[_0x5a235c(0x142)]();if(existsSync(_0x31d287))try{rmSync(_0x31d287,{'recursive':!![],'force':!![]}),_0x3db492[_0x5a235c(0x129)](_0x5a235c(0x116)),_0x1303a7[_0x5a235c(0x10a)]({'step':0x2,'label':_0x5a235c(0x15a),'ok':!![]});}catch(_0x43b66d){_0x3db492[_0x5a235c(0x108)]('Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0x43b66d[_0x5a235c(0x10b)]),_0x1303a7[_0x5a235c(0x10a)]({'step':0x2,'label':_0x5a235c(0x15a),'ok':![],'detail':_0x43b66d['message']});}else _0x3db492[_0x5a235c(0x143)](_0x5a235c(0x115)),_0x1303a7['push']({'step':0x2,'label':_0x5a235c(0x15a),'ok':!![],'detail':_0x5a235c(0x102)});const _0x298797=a177_0x4f3194({'text':'Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','color':_0x5a235c(0xea)})[_0x5a235c(0x142)](),_0xd8da87=execRemoveOldArtifacts(_0x475196['oldArtifacts']);_0x1303a7[_0x5a235c(0x10a)](_0xd8da87),_0x298797[_0xd8da87['ok']?'succeed':'fail'](_0x5a235c(0xe6)+(_0xd8da87[_0x5a235c(0x154)]??(_0xd8da87['ok']?_0x5a235c(0x168):_0x5a235c(0x15b))));const _0x4de687=a177_0x4f3194({'text':'Step\x204/7:\x20Cleaning\x20MCP\x20config...','color':_0x5a235c(0xea)})['start'](),_0x2e2d21=execCleanMcp(_0x475196);_0x1303a7['push'](_0x2e2d21),_0x4de687[_0x2e2d21['ok']?_0x5a235c(0x129):_0x5a235c(0x108)](_0x5a235c(0x11f)+(_0x2e2d21[_0x5a235c(0x154)]??(_0x2e2d21['ok']?_0x5a235c(0x168):_0x5a235c(0x15b))));const _0x4894f3=a177_0x4f3194({'text':_0x5a235c(0x160),'color':'cyan'})[_0x5a235c(0x142)](),_0xb08b70=execSkillsRemove(_0x213252,_0x65b2f2);_0x1303a7[_0x5a235c(0x10a)](_0xb08b70),_0x4894f3[_0xb08b70['ok']?_0x5a235c(0x129):_0x5a235c(0x108)](_0x5a235c(0xf1)+(_0xb08b70[_0x5a235c(0x154)]??(_0xb08b70['ok']?'done':_0x5a235c(0x15b))));const _0x20651a=a177_0x4f3194({'text':_0x5a235c(0xfa),'color':_0x5a235c(0xea)})[_0x5a235c(0x142)](),_0x4ee324=execSkillsAdd(_0x213252,_0x65b2f2);_0x1303a7[_0x5a235c(0x10a)](_0x4ee324),_0x20651a[_0x4ee324['ok']?_0x5a235c(0x129):_0x5a235c(0x108)](_0x5a235c(0x14e)+(_0x4ee324[_0x5a235c(0x154)]??(_0x4ee324['ok']?_0x5a235c(0x168):_0x5a235c(0x15b))));const _0x4370b3=a177_0x4f3194({'text':'Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','color':_0x5a235c(0xea)})[_0x5a235c(0x142)](),_0x31711a=execUpgradeSdk(_0x475196);_0x1303a7[_0x5a235c(0x10a)](_0x31711a),_0x4370b3[_0x31711a['ok']?_0x5a235c(0x129):_0x5a235c(0x108)]('Step\x207/7:\x20@lovrabet/sdk\x20—\x20'+(_0x31711a[_0x5a235c(0x154)]??(_0x31711a['ok']?_0x5a235c(0x168):_0x5a235c(0x15b)))),printSummary(_0x1303a7);const _0x428d41=_0x1303a7[_0x5a235c(0x13a)](_0x2cb117=>!_0x2cb117['ok']);_0x428d41?console[_0x5a235c(0xe3)](a177_0x2a984f[_0x5a235c(0x126)]('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console[_0x5a235c(0xe3)](a177_0x2a984f[_0x5a235c(0x152)](_0x5a235c(0x14f))),_0x31711a['ok']&&_0x475196['sdkUpgrade']&&(console['log'](''),console['log'](a177_0x2a984f[_0x5a235c(0x162)][_0x5a235c(0xea)]('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console[_0x5a235c(0xe3)](a177_0x2a984f[_0x5a235c(0xea)](_0x5a235c(0x134))),console['log'](''),console[_0x5a235c(0xe3)](a177_0x2a984f[_0x5a235c(0x14d)](_0x5a235c(0x164))),console[_0x5a235c(0xe3)](a177_0x2a984f[_0x5a235c(0x14d)](_0x5a235c(0xfe))),console[_0x5a235c(0xe3)](a177_0x2a984f[_0x5a235c(0x14d)](_0x5a235c(0x124))),console[_0x5a235c(0xe3)](''));}
@@ -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_0x514f49=a178_0x4148;(function(_0x33bd61,_0x35d9d3){const _0x420546=a178_0x4148,_0x59f35e=_0x33bd61();while(!![]){try{const _0x54ee3e=parseInt(_0x420546(0x7c))/0x1*(parseInt(_0x420546(0xc0))/0x2)+parseInt(_0x420546(0x97))/0x3+parseInt(_0x420546(0xdc))/0x4+-parseInt(_0x420546(0xd0))/0x5*(-parseInt(_0x420546(0x9d))/0x6)+-parseInt(_0x420546(0xca))/0x7*(parseInt(_0x420546(0x91))/0x8)+parseInt(_0x420546(0xcc))/0x9*(-parseInt(_0x420546(0x94))/0xa)+parseInt(_0x420546(0xae))/0xb*(-parseInt(_0x420546(0xc3))/0xc);if(_0x54ee3e===_0x35d9d3)break;else _0x59f35e['push'](_0x59f35e['shift']());}catch(_0xf3ce1){_0x59f35e['push'](_0x59f35e['shift']());}}}(a178_0x2253,0x8eb5c));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dbDefinitions}from'../commands/db/index.js';import{deploymentDefinitions}from'../commands/deployment/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{taskDefinitions}from'../commands/task/index.js';import{tenantDefinitions}from'../commands/tenant/index.js';import{roleDefinitions}from'../commands/role/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{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';function a178_0x2253(){const _0x5d5bc7=['\x20\x20[high-risk-write]','Run\x20Scripts','Schema','`\x20has\x20been\x20removed.','service','Async\x20Tasks','1RRzHwR','data:filter','Use\x20`','menu:update','<script>','skills:','rabetbase\x20cli-skill\x20install','description','skills:install','knowledge-base:detail','bff:new','permit:page-get','rabetbase\x20sql\x20create','rabetbase\x20page\x20custom-detail','wildcardDef','skill:install','from','sql:new','Workspace','CLI\x20Built-in\x20Skill','preview','608LzGRPj','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','push','1889520mfGhNp','defaultCommand','project:init','959235rwauBL','`rabetbase\x20','rabetbase\x20kb\x20delete','rabetbase\x20app\x20list\x20--remote','Tenant\x20Members','app:add','6zEjknj','rabetbase\x20run\x20preview','rabetbase\x20kb\x20create','page:react-create','build','Code\x20Generation','Authentication','rabetbase\x20run\x20start','Roles','permit:role-menus-set','role:create','knowledge-base:create','page:custom-create','start','rabetbase\x20page\x20custom-list','has','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','1433102BSWlgb','File','Run\x20any\x20package.json\x20script','rabetbase\x20workspace\x20remove\x20<name>','Database\x20Connections','Notification\x20Configuration','hidden','knowledge-base:delete','length','isSingleCommand','set','install','rabetbase\x20workspace\x20use\x20--app\x20<name>','map','write','Diagnostics','permit:role-apis-set','Project','1362694aEtJhb','risk','get','60RTcWMR','Dataset\x20&\x20Operations','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','rabetbase\x20project\x20create\x20<project-name>','filter','Runtime\x20App\x20Config\x20Management','create','2037hFQeFj','Logs','45hXelKf','rabetbase\x20menu\x20asset-update','knowledge-base:update','rabetbase\x20page\x20custom-publish','1876610wtOhMx','User\x20Accounts','values','page:standard-page-status','rabetbase\x20run\x20build','sql:save','rabetbase\x20kb\x20list','app:remove','permit:role-menus','rabetbase\x20kb\x20detail','knowledge-base:list','skill:','3305648evtIrt'];a178_0x2253=function(){return _0x5d5bc7;};return a178_0x2253();}import{fileDefinitions}from'../commands/file/index.js';function a178_0x4148(_0x3dcaf2,_0x25f9f2){_0x3dcaf2=_0x3dcaf2-0x79;const _0x225372=a178_0x2253();let _0x4148c4=_0x225372[_0x3dcaf2];return _0x4148c4;}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(_0x1a7bca){const _0x20b7f2=a178_0x4148;for(const _0x39e8d9 of _0x1a7bca){definitions[_0x20b7f2(0xb8)](_0x39e8d9[_0x20b7f2(0x7a)]+':'+_0x39e8d9['command'],_0x39e8d9);let _0x57ed7f=serviceGroups[_0x20b7f2(0xc2)](_0x39e8d9[_0x20b7f2(0x7a)]);!_0x57ed7f&&(_0x57ed7f=[],serviceGroups['set'](_0x39e8d9[_0x20b7f2(0x7a)],_0x57ed7f)),_0x57ed7f[_0x20b7f2(0x93)](_0x39e8d9);}}function registerDeclarativeService(_0x50dfdf,_0x13e30f,_0x29f1a){const _0x46b96c=a178_0x4148;registerDefinitions(_0x13e30f);_0x29f1a?.[_0x46b96c(0x8a)]&&registerDefinitions([_0x29f1a[_0x46b96c(0x8a)]]);const _0x2177e7=_0x38a5fb=>_0x38a5fb==='read'?'':_0x38a5fb===_0x46b96c(0xbc)?'\x20\x20[write]':_0x46b96c(0xdd),_0x4920f3={'service':_0x13e30f[0x0]['service'],'label':_0x50dfdf,'commands':_0x13e30f[_0x46b96c(0xc7)](_0x5cdc5c=>!_0x5cdc5c[_0x46b96c(0xb4)])[_0x46b96c(0xbb)](_0x2d3bc1=>({'command':_0x2d3bc1['command'],'description':_0x2d3bc1[_0x46b96c(0x83)],'tag':_0x2177e7(_0x2d3bc1[_0x46b96c(0xc1)])})),'declarative':!![],'defaultCommand':_0x29f1a?.[_0x46b96c(0x95)]??(_0x29f1a?.[_0x46b96c(0xb7)]?_0x13e30f[0x0]['command']:undefined),'wildcardDef':_0x29f1a?.[_0x46b96c(0x8a)],'isSingleCommand':_0x29f1a?.[_0x46b96c(0xb7)]};serviceRegistry[_0x46b96c(0x93)](_0x4920f3),serviceByName[_0x46b96c(0xb8)](_0x4920f3['service'],_0x4920f3);}registerDeclarativeService(a178_0x514f49(0xbf),projectDefinitions),registerDeclarativeService(a178_0x514f49(0x8e),workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a178_0x514f49(0xa3),authDefinitions,{'defaultCommand':'login'}),registerDeclarativeService(a178_0x514f49(0x9b),tenantDefinitions),registerDeclarativeService(a178_0x514f49(0xd1),userAccountDefinitions),registerDeclarativeService(a178_0x514f49(0xc4),datasetDefinitions),registerDeclarativeService('Data\x20List\x20Pages\x20&\x20Custom\x20Pages',pageDefinitions),registerDeclarativeService('API\x20Development',apiDefinitions),registerDeclarativeService('Backend\x20Function\x20Scripts',bffDefinitions),registerDeclarativeService(a178_0x514f49(0xb3),notificationDefinitions),registerDeclarativeService('SQL\x20Queries',sqlDefinitions),registerDeclarativeService(a178_0x514f49(0xb2),dbDefinitions),registerDeclarativeService('Deployment',deploymentDefinitions),registerDeclarativeService('Menu',menuDefinitions),registerDeclarativeService(a178_0x514f49(0x7b),taskDefinitions),registerDeclarativeService(a178_0x514f49(0xa5),roleDefinitions),registerDeclarativeService(a178_0x514f49(0xc8),appConfigDefinitions),registerDeclarativeService('Company\x20Knowledge\x20Base',kbDefinitions),registerDeclarativeService('Platform\x20Issue',issueDefinitions),registerDeclarativeService(a178_0x514f49(0xaf),fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService(a178_0x514f49(0xa2),codegenDefinitions),registerDeclarativeService('Configuration',configDefinitions),registerDeclarativeService(a178_0x514f49(0xbd),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a178_0x514f49(0xdf),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a178_0x514f49(0x8f),cliSkillDefinitions,{'defaultCommand':a178_0x514f49(0xb9)}),registerDeclarativeService(a178_0x514f49(0xcb),logsDefinitions,{'defaultCommand':'show'}),registerDeclarativeService(a178_0x514f49(0xde),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a178_0x514f49(0xb6)]-0x1];last['commands']=[{'command':a178_0x514f49(0x80),'description':a178_0x514f49(0xb0),'tag':'\x20\x20['+runDefinition[a178_0x514f49(0xc1)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a178_0x514f49(0xd5),'rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml'],[a178_0x514f49(0x86),'rabetbase\x20bff\x20create'],[a178_0x514f49(0x8d),a178_0x514f49(0x88)],[a178_0x514f49(0x7f),a178_0x514f49(0xcd)],[a178_0x514f49(0x96),'rabetbase\x20workspace\x20init\x20--appcode\x20<code>'],[a178_0x514f49(0xdb),a178_0x514f49(0x82)],[a178_0x514f49(0x8b),a178_0x514f49(0x82)],[a178_0x514f49(0x81),'rabetbase\x20cli-skill\x20install'],[a178_0x514f49(0x84),a178_0x514f49(0x82)],['app:remote',a178_0x514f49(0x9a)],['app:use',a178_0x514f49(0xba)],[a178_0x514f49(0x9c),a178_0x514f49(0x92)],[a178_0x514f49(0xd7),a178_0x514f49(0xb1)],[a178_0x514f49(0xda),a178_0x514f49(0xd6)],[a178_0x514f49(0x85),a178_0x514f49(0xd9)],[a178_0x514f49(0xa8),a178_0x514f49(0x9f)],[a178_0x514f49(0xce),'rabetbase\x20kb\x20update'],[a178_0x514f49(0xb5),a178_0x514f49(0x99)],[a178_0x514f49(0xa7),'rabetbase\x20role\x20list'],[a178_0x514f49(0x7d),'lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27'],['data:getOne','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27'],[a178_0x514f49(0xd3),'rabetbase\x20page\x20data-list-status'],[a178_0x514f49(0xa0),a178_0x514f49(0xad)],[a178_0x514f49(0xa9),a178_0x514f49(0xad)],['page:react-list',a178_0x514f49(0xab)],['page:react-detail',a178_0x514f49(0x89)],['page:react-update','rabetbase\x20page\x20custom-update'],['page:react-publish',a178_0x514f49(0xcf)]]),REMOVED_COMMAND_HINTS=new Map([[a178_0x514f49(0x87),a178_0x514f49(0xc5)],['permit:page-set','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a178_0x514f49(0xd8),a178_0x514f49(0xc5)],[a178_0x514f49(0xa6),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a178_0x514f49(0xbe),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.']]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a178_0x514f49(0xc9),a178_0x514f49(0xc6)],[a178_0x514f49(0xaa),a178_0x514f49(0xa4)],[a178_0x514f49(0xa1),a178_0x514f49(0xd4)],[a178_0x514f49(0x90),a178_0x514f49(0x9e)],['logout','rabetbase\x20auth\x20logout']]);export function resolveRemovedCommand(_0x2ed674,_0x3ab9e4){const _0x2ae599=a178_0x514f49;if(!_0x2ed674)return undefined;const _0x57c5cf=REMOVED_COMMAND_REPLACEMENTS[_0x2ae599(0xc2)](_0x2ed674+':'+(_0x3ab9e4??'')),_0x1ad3b4=REMOVED_FLAT_COMMAND_REPLACEMENTS['get'](_0x2ed674),_0x2a291f=_0x57c5cf??_0x1ad3b4,_0x4b6f0c=REMOVED_COMMAND_HINTS[_0x2ae599(0xc2)](_0x2ed674+':'+(_0x3ab9e4??''));if(!_0x2a291f&&!_0x4b6f0c)return undefined;const _0x373000=_0x1ad3b4?_0x2ed674:_0x3ab9e4?_0x2ed674+'\x20'+_0x3ab9e4:_0x2ed674;return{'command':_0x373000,'message':_0x2ae599(0x98)+_0x373000+_0x2ae599(0x79),'hint':_0x4b6f0c??_0x2ae599(0x7e)+_0x2a291f+'`\x20instead.'};}export function findDefinition(_0x3d3617,_0x3de0f0){const _0x3ff173=a178_0x514f49;return definitions[_0x3ff173(0xc2)](_0x3d3617+':'+_0x3de0f0);}export function isKnownService(_0x2f2217){const _0x516dfc=a178_0x514f49;return serviceByName[_0x516dfc(0xac)](_0x2f2217);}export function isDeclarativeService(_0x557c70){const _0x4fb4ee=a178_0x514f49;return serviceGroups[_0x4fb4ee(0xac)](_0x557c70)||serviceByName['get'](_0x557c70)?.[_0x4fb4ee(0x8a)]!==undefined;}export function getServiceEntry(_0x382ad2){const _0x13d317=a178_0x514f49;return serviceByName[_0x13d317(0xc2)](_0x382ad2);}export function getLegacyHandler(_0x3ab441,_0x188b45){return undefined;}export function getAllDefinitions(){const _0x4d6815=a178_0x514f49;return Array[_0x4d6815(0x8c)](definitions[_0x4d6815(0xd2)]());}
@@ -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
+ function a179_0xf621(){const _0x2407a8=['POST','11201200QmWBsf','24NLgymK','appCode','dev','95417mEYRKO','213224GaLHxI','4xALvGL','5787828hXcTdW','delete','18rGywML','334737weMcpi','high-risk-write','3uhTbmF','13004849gxNQsy','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','num','\x20(id=','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','5265220AGYKKh','Deleted\x20role\x20','roleName'];a179_0xf621=function(){return _0x2407a8;};return a179_0xf621();}const a179_0x3e84a5=a179_0x13fb;(function(_0x1c6400,_0xf60e4c){const _0x513f81=a179_0x13fb,_0x24f1b3=_0x1c6400();while(!![]){try{const _0x6c1980=parseInt(_0x513f81(0x88))/0x1*(parseInt(_0x513f81(0x89))/0x2)+-parseInt(_0x513f81(0x8f))/0x3*(-parseInt(_0x513f81(0x8a))/0x4)+-parseInt(_0x513f81(0x95))/0x5+-parseInt(_0x513f81(0x8c))/0x6*(-parseInt(_0x513f81(0x87))/0x7)+parseInt(_0x513f81(0x9a))/0x8*(-parseInt(_0x513f81(0x8d))/0x9)+-parseInt(_0x513f81(0x99))/0xa+parseInt(_0x513f81(0x90))/0xb;if(_0x6c1980===_0xf60e4c)break;else _0x24f1b3['push'](_0x24f1b3['shift']());}catch(_0x305481){_0x24f1b3['push'](_0x24f1b3['shift']());}}}(a179_0xf621,0xc6326));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a179_0x13fb(_0x4cdec1,_0x21bfd8){_0x4cdec1=_0x4cdec1-0x86;const _0xf621d9=a179_0xf621();let _0x13fb2b=_0xf621d9[_0x4cdec1];return _0x13fb2b;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH='/smartapi/permit/role/delete';export const roleDelete={'service':'role','command':'delete','description':a179_0x3e84a5(0x91),'risk':a179_0x3e84a5(0x8e),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x26032a){const _0x360fe1=a179_0x3e84a5,_0x2ac26c=_0x26032a[_0x360fe1(0x92)]('id'),_0x3ea075=await getRoleById(_0x26032a[_0x360fe1(0x9b)],_0x2ac26c);return assertCustomRole(_0x3ea075,_0x360fe1(0x8b)),asDryRunResult({'scope':_0x360fe1(0x86),'operation':_0x360fe1(0x8b),'selector':{'appCode':_0x26032a['appCode'],'roleId':_0x2ac26c,'roleName':_0x3ea075[_0x360fe1(0x97)]},'before':projectRole(_0x3ea075),'after':null,'dryRun':!![],'backend':{'method':_0x360fe1(0x98),'path':DELETE_PATH},'warnings':_0x3ea075['userCount']>0x0?['Role\x20still\x20has\x20'+_0x3ea075['userCount']+_0x360fe1(0x94)]:[]},{'method':_0x360fe1(0x98),'url':DELETE_PATH});},async 'execute'(_0x27dcf6){const _0x1a818e=a179_0x3e84a5,_0x3c7cb8=_0x27dcf6[_0x1a818e(0x92)]('id'),_0x89348d=await getRoleById(_0x27dcf6[_0x1a818e(0x9b)],_0x3c7cb8);return assertCustomRole(_0x89348d,_0x1a818e(0x8b)),await deleteAppRole(_0x3c7cb8),{'ok':!![],'data':{'scope':'dev','operation':_0x1a818e(0x8b),'selector':{'appCode':_0x27dcf6[_0x1a818e(0x9b)],'roleId':_0x3c7cb8,'roleName':_0x89348d[_0x1a818e(0x97)]},'before':projectRole(_0x89348d),'after':null,'dryRun':![],'backend':{'method':_0x1a818e(0x98),'path':DELETE_PATH},'warnings':[]},'message':_0x1a818e(0x96)+_0x89348d[_0x1a818e(0x97)]+_0x1a818e(0x93)+_0x3c7cb8+')'};}};
@@ -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
+ const a180_0xc24ce5=a180_0x58da;(function(_0x59291e,_0x2bf076){const _0x192efe=a180_0x58da,_0x34582c=_0x59291e();while(!![]){try{const _0x7a8305=parseInt(_0x192efe(0x135))/0x1+-parseInt(_0x192efe(0x138))/0x2+-parseInt(_0x192efe(0x13a))/0x3+parseInt(_0x192efe(0x139))/0x4+parseInt(_0x192efe(0x13c))/0x5+parseInt(_0x192efe(0x13b))/0x6+-parseInt(_0x192efe(0x131))/0x7;if(_0x7a8305===_0x2bf076)break;else _0x34582c['push'](_0x34582c['shift']());}catch(_0x2195c4){_0x34582c['push'](_0x34582c['shift']());}}}(a180_0x4954,0x2b11c));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a180_0x58da(_0x4051c6,_0x25a561){_0x4051c6=_0x4051c6-0x12f;const _0x49543a=a180_0x4954();let _0x58da45=_0x49543a[_0x4051c6];return _0x58da45;}function a180_0x4954(){const _0x38e164=['1443820sAcdxz','detail','role','6643UAdyai','appCode','roleName','num','3829NLaZZA','Show\x20a\x20single\x20role\x27s\x20detail','roleType','45766INgadp','396988bROboU','661485mBBlLX','173394MJVTgk'];a180_0x4954=function(){return _0x38e164;};return a180_0x4954();}export const roleDetail={'service':a180_0xc24ce5(0x130),'command':a180_0xc24ce5(0x12f),'description':a180_0xc24ce5(0x136),'risk':'read','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0xa89e79){const _0x36c736=a180_0xc24ce5,_0x169684=_0xa89e79[_0x36c736(0x134)]('id'),_0x2d06b0=await getRoleById(_0xa89e79[_0x36c736(0x132)],_0x169684);return{'ok':!![],'data':{'scope':'dev','role':projectRole(_0x2d06b0)},'message':'Role\x20'+_0x2d06b0[_0x36c736(0x133)]+'\x20('+_0x2d06b0[_0x36c736(0x137)]+')'};}};
@@ -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 a181_0x1451(_0x544140,_0x47b43d){_0x544140=_0x544140-0x1cf;const _0x4f6352=a181_0x4f63();let _0x1451ad=_0x4f6352[_0x544140];return _0x1451ad;}(function(_0x7b8c36,_0x4eb440){const _0x5aa197=a181_0x1451,_0x1aa7a0=_0x7b8c36();while(!![]){try{const _0x13664a=parseInt(_0x5aa197(0x1d4))/0x1+parseInt(_0x5aa197(0x1d0))/0x2*(parseInt(_0x5aa197(0x1d1))/0x3)+parseInt(_0x5aa197(0x1cf))/0x4+parseInt(_0x5aa197(0x1d2))/0x5+parseInt(_0x5aa197(0x1d3))/0x6+parseInt(_0x5aa197(0x1d5))/0x7+-parseInt(_0x5aa197(0x1d6))/0x8;if(_0x13664a===_0x4eb440)break;else _0x1aa7a0['push'](_0x1aa7a0['shift']());}catch(_0x5cb323){_0x1aa7a0['push'](_0x1aa7a0['shift']());}}}(a181_0x4f63,0x6552a));import{roleList}from'../../commands/role/list.js';function a181_0x4f63(){const _0x2fa442=['64220XhsqMJ','3779994fSmXIG','501709QVjLDi','1997793vJFaJW','13858240DrrhZA','882980maSVhg','1174RWAnfi','2538cLTrKo'];a181_0x4f63=function(){return _0x2fa442;};return a181_0x4f63();}import{roleDetail}from'../../commands/role/detail.js';import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
@@ -1 +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_0x36cd46=a182_0xbf1b;(function(_0x498231,_0x54b4da){const _0x4d397a=a182_0xbf1b,_0x436137=_0x498231();while(!![]){try{const _0x2e7746=-parseInt(_0x4d397a(0x1ea))/0x1*(-parseInt(_0x4d397a(0x1d8))/0x2)+-parseInt(_0x4d397a(0x1c9))/0x3*(parseInt(_0x4d397a(0x1ec))/0x4)+parseInt(_0x4d397a(0x1ce))/0x5+parseInt(_0x4d397a(0x1cd))/0x6*(-parseInt(_0x4d397a(0x1ed))/0x7)+parseInt(_0x4d397a(0x1e5))/0x8+parseInt(_0x4d397a(0x1d1))/0x9*(-parseInt(_0x4d397a(0x1e3))/0xa)+parseInt(_0x4d397a(0x1dc))/0xb;if(_0x2e7746===_0x54b4da)break;else _0x436137['push'](_0x436137['shift']());}catch(_0x3f3c46){_0x436137['push'](_0x436137['shift']());}}}(a182_0x4b55,0xe819b));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a182_0xbf1b(_0x531050,_0x3e35b1){_0x531050=_0x531050-0x1c7;const _0x4b55ab=a182_0x4b55();let _0xbf1bd0=_0x4b55ab[_0x531050];return _0xbf1bd0;}import{projectRole}from'../../commands/role/shared.js';function a182_0x4b55(){const _0x386f6b=['validation','56EncqAa','9875677SYzTxI','CUSTOM','roleType','43698sRaBJz','str','page','Use\x20one\x20of:\x20','6MAQpNF','2950725Egwtpk','map','join','703773vrkuoZ','Page\x20index\x20(1-based)','toUpperCase','includes','list','Invalid\x20--type\x20\x22','string','20906TfFsMg','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','DEV','OWNER','9654128WTrAEY','pagesize','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','num','length','role','trim','30awKKgz','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','8065384mDvRKL','filter','Filter\x20by\x20role\x20type','ADMIN','number','31hbalPC'];a182_0x4b55=function(){return _0x386f6b;};return a182_0x4b55();}const ROLE_TYPES=[a182_0x36cd46(0x1e8),a182_0x36cd46(0x1da),a182_0x36cd46(0x1db),a182_0x36cd46(0x1c7)];export const roleList={'service':a182_0x36cd46(0x1e1),'command':a182_0x36cd46(0x1d5),'description':a182_0x36cd46(0x1e4),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a182_0x36cd46(0x1d7),'required':![],'description':a182_0x36cd46(0x1e7),'enum':ROLE_TYPES},{'name':'page','type':a182_0x36cd46(0x1e9),'description':a182_0x36cd46(0x1d2),'default':0x1},{'name':a182_0x36cd46(0x1dd),'type':'number','description':'Page\x20size\x20(1-100)','default':0x64}],async 'validate'(_0x486f32){const _0x2c251f=a182_0x36cd46,_0x3e2546=_0x486f32['str']('type')[_0x2c251f(0x1e2)]();if(_0x3e2546&&!ROLE_TYPES[_0x2c251f(0x1d4)](_0x3e2546[_0x2c251f(0x1d3)]()))throw CliErrors['validation'](_0x2c251f(0x1d6)+_0x3e2546+'\x22.',_0x2c251f(0x1cc)+ROLE_TYPES[_0x2c251f(0x1d0)](',\x20')+'.');const _0x45947c=_0x486f32['num'](_0x2c251f(0x1cb),0x1),_0x3d3bed=_0x486f32['num'](_0x2c251f(0x1dd),0x64);if(_0x45947c<0x1)throw CliErrors['validation'](_0x2c251f(0x1de));if(_0x3d3bed<0x1||_0x3d3bed>0x64)throw CliErrors[_0x2c251f(0x1eb)](_0x2c251f(0x1d9));},async 'execute'(_0x357d6c){const _0x8af1ec=a182_0x36cd46,_0x1581a9=_0x357d6c[_0x8af1ec(0x1df)](_0x8af1ec(0x1cb),0x1)||0x1,_0x11b1dd=_0x357d6c['num'](_0x8af1ec(0x1dd),0x64)||0x64,_0x38d748=_0x357d6c[_0x8af1ec(0x1ca)]('type')[_0x8af1ec(0x1e2)]()[_0x8af1ec(0x1d3)](),{items:_0x4dc97a,paging:_0x1a543d}=await listAppRoles(_0x357d6c['appCode'],{'currentPage':_0x1581a9,'pageSize':_0x11b1dd}),_0x46551d=_0x38d748?_0x4dc97a[_0x8af1ec(0x1e6)](_0x5eb79c=>_0x5eb79c[_0x8af1ec(0x1c8)]===_0x38d748):_0x4dc97a,_0x5204ab=_0x46551d[_0x8af1ec(0x1cf)](projectRole);return{'ok':!![],'data':{'scope':'dev','roles':_0x5204ab,'paging':_0x1a543d},'message':'Found\x20'+_0x5204ab[_0x8af1ec(0x1e0)]+'\x20role(s)'};}};
@@ -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_0x4ca391=a183_0x4615;(function(_0x1311ce,_0x2c6b5c){const _0x3eb036=a183_0x4615,_0x411c77=_0x1311ce();while(!![]){try{const _0x56009b=-parseInt(_0x3eb036(0xfd))/0x1+parseInt(_0x3eb036(0x11d))/0x2+-parseInt(_0x3eb036(0x105))/0x3*(parseInt(_0x3eb036(0x134))/0x4)+-parseInt(_0x3eb036(0x10e))/0x5*(parseInt(_0x3eb036(0x10c))/0x6)+-parseInt(_0x3eb036(0x113))/0x7+-parseInt(_0x3eb036(0x139))/0x8*(parseInt(_0x3eb036(0x106))/0x9)+parseInt(_0x3eb036(0x123))/0xa*(parseInt(_0x3eb036(0x110))/0xb);if(_0x56009b===_0x2c6b5c)break;else _0x411c77['push'](_0x411c77['shift']());}catch(_0x117493){_0x411c77['push'](_0x411c77['shift']());}}}(a183_0x49ab,0xe349b));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_0x4ca391(0xf8),'required':!![],'description':a183_0x4ca391(0x137)};export const ROLE_REF_FLAG={'name':a183_0x4ca391(0xfc),'type':a183_0x4ca391(0xf9),'required':!![],'description':a183_0x4ca391(0x10d)};export const USER_REF_FLAG={'name':'user','type':a183_0x4ca391(0xf9),'required':!![],'description':'User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId'};function a183_0x49ab(){const _0x12b635=['1285440Mitvct','Check\x20the\x20nickname/username.\x20','expectUserCount','\x22\x20is\x20ambiguous\x20(ids:\x20','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','roleName','user','length','5091771LYwxHu','9GMRBcm','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','\x20is\x20not\x20a\x20member\x20of\x20role\x20','Role\x20id\x20','roleType','remark','96ncrKzF','Role\x20id\x20or\x20exact\x20role\x20name','263225ttDtIX','map','9911LRDbdL','Multiple\x20tenant\x20members\x20match\x20\x22','includes','4195541DeAPXx','Anti-drift\x20check\x20failed:\x20expected\x20','find','/smartapi/permit/user-role/delete','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','No\x20tenant\x20member\x20matches\x20\x22','userId','Disambiguate\x20with\x20--role\x20<id>.','Pass\x20--role\x20<id|name>.','Role\x20name','1927454SxPUyK','nickname','Pass\x20--user\x20<id|name>.','test',';\x20no\x20change.','\x20duplicate\x20memberships\x20for\x20user\x20','69070KUSFkI','\x20is\x20already\x20a\x20member\x20of\x20role\x20','flagMissing','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','toLowerCase','expect-user-count','tenant_code','user-add','OWNER','Cannot\x20','\x20built-in\x20role\x20','User\x20','username','push','validation','CUSTOM','join','4nAldpD','filter','Optional\x20role\x20remark/description','Role\x20id\x20(from\x20`role\x20list`)','userCount','14652664VGMsOf','\x22\x20not\x20found\x20in\x20app\x20','\x22:\x20','trim','Role\x20name\x20\x22','name','appCode','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','\x20not\x20found\x20in\x20app\x20','number','string','Pass\x20--user\x20<id>.','Missing\x20user\x20reference.','role'];a183_0x49ab=function(){return _0x12b635;};return a183_0x49ab();}export const NAME_FLAG={'name':'name','type':a183_0x4ca391(0xf9),'required':!![],'description':a183_0x4ca391(0x11c)};export const USER_NAME_FLAG={'name':'name','type':'string','required':!![],'description':'Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId'};export const REMARK_FLAG={'name':'remark','type':'string','required':![],'description':a183_0x4ca391(0x136)};export const EXPECT_USER_COUNT_FLAG={'name':'expect-user-count','type':a183_0x4ca391(0xf8),'required':![],'description':a183_0x4ca391(0x117)};function a183_0x4615(_0x549b75,_0x49ab3d){_0x549b75=_0x549b75-0xf6;const _0x49abf5=a183_0x49ab();let _0x46156=_0x49abf5[_0x549b75];return _0x46156;}export const BUILTIN_ROLE_TYPES=['ADMIN','DEV',a183_0x4ca391(0x12b)];export function isBuiltinRole(_0x560922){const _0x5ebed4=a183_0x4ca391;return BUILTIN_ROLE_TYPES[_0x5ebed4(0x112)](_0x560922);}export function assertCustomRole(_0x1f4dcc,_0x47f48b){const _0x16d94=a183_0x4ca391;if(_0x1f4dcc[_0x16d94(0x10a)]!==_0x16d94(0x132))throw CliErrors[_0x16d94(0x131)](_0x16d94(0x12c)+_0x47f48b+_0x16d94(0x12d)+_0x1f4dcc['roleName']+'\x20('+_0x1f4dcc['roleType']+').',_0x16d94(0x126));}export function projectRole(_0x430c36){const _0x2b6df5=a183_0x4ca391;return{'id':_0x430c36['id'],'roleName':_0x430c36['roleName'],'roleType':_0x430c36['roleType'],'remark':_0x430c36[_0x2b6df5(0x10b)],'userCount':_0x430c36[_0x2b6df5(0x138)],'permitCount':_0x430c36['permitCount'],'builtin':isBuiltinRole(_0x430c36[_0x2b6df5(0x10a)])};}export async function resolveRoleRef(_0x2e072e,_0x387a6b){const _0xe60e10=a183_0x4ca391,_0x4ea008=_0x387a6b[_0xe60e10(0x13c)]();if(!_0x4ea008)throw CliErrors['validation']('Missing\x20role\x20reference.','Pass\x20--role\x20<id|name>.');if(/^\d+$/[_0xe60e10(0x120)](_0x4ea008))return getRoleById(_0x2e072e,Number(_0x4ea008));const _0x2996e6=await listAllAppRoles(_0x2e072e),_0x49e954=_0x2996e6[_0xe60e10(0x135)](_0x5babc5=>_0x5babc5[_0xe60e10(0x102)]===_0x4ea008);if(_0x49e954[_0xe60e10(0x104)]===0x0)throw CliErrors[_0xe60e10(0x131)](_0xe60e10(0x13d)+_0x4ea008+_0xe60e10(0x13a)+_0x2e072e+'.',_0xe60e10(0x107));if(_0x49e954[_0xe60e10(0x104)]>0x1){const _0x5606c0=_0x49e954[_0xe60e10(0x10f)](_0x2bf8ca=>_0x2bf8ca['id'])[_0xe60e10(0x133)](',\x20');throw CliErrors['validation'](_0xe60e10(0x13d)+_0x4ea008+_0xe60e10(0x100)+_0x5606c0+').',_0xe60e10(0x11a));}return _0x49e954[0x0];}export async function getRoleById(_0x102bfa,_0x48bdb4){const _0x7b9520=a183_0x4ca391,_0x3bd9e5=await listAllAppRoles(_0x102bfa),_0x5965de=_0x3bd9e5['filter'](_0x4049df=>_0x4049df['id']===_0x48bdb4&&(!_0x4049df[_0x7b9520(0x13f)]||_0x4049df[_0x7b9520(0x13f)]===_0x102bfa));if(_0x5965de[_0x7b9520(0x104)]!==0x1)throw CliErrors['validation'](_0x7b9520(0x109)+_0x48bdb4+_0x7b9520(0xf7)+_0x102bfa+'.',_0x7b9520(0x101));return _0x5965de[0x0];}async function listAllAppRoles(_0x1dcf92){const _0x4bd5a3=a183_0x4ca391,_0x494a8f=0x64,_0x548324=[];for(let _0x52f027=0x1;;_0x52f027+=0x1){const {items:_0x3e0325,paging:_0x7ce731}=await listAppRoles(_0x1dcf92,{'currentPage':_0x52f027,'pageSize':_0x494a8f});_0x548324[_0x4bd5a3(0x130)](..._0x3e0325);if(_0x3e0325['length']<_0x494a8f||_0x7ce731&&_0x548324[_0x4bd5a3(0x104)]>=_0x7ce731['totalCount'])return _0x548324;}}export async function resolveTenantCode(){const _0x5d8561=a183_0x4ca391,_0x140d28=await getSessionUserInfo(),_0x90be34=_0x140d28?.[_0x5d8561(0x103)]?.['tenant']?.[_0x5d8561(0x129)];if(!_0x90be34)throw CliErrors['authRequired'](_0x5d8561(0xf6));return _0x90be34;}function matchMember(_0x3d567f,_0x29f8fe){const _0x15203b=a183_0x4ca391,_0x332c5a=_0x29f8fe[_0x15203b(0x13c)]()[_0x15203b(0x127)]();return(_0x3d567f[_0x15203b(0x11e)]??'')[_0x15203b(0x127)]()===_0x332c5a||(_0x3d567f[_0x15203b(0x12f)]??'')['toLowerCase']()===_0x332c5a;}export async function resolveUserRef(_0x17466a,_0x42607f=a183_0x4ca391(0xfa)){const _0x3544bc=a183_0x4ca391,_0x29ec3b=_0x17466a['trim']();if(!_0x29ec3b)throw CliErrors[_0x3544bc(0x131)](_0x3544bc(0xfb),_0x3544bc(0x11f));const _0x2db8ba=await resolveTenantCode(),_0x8a248c=await getTenantMembers(_0x2db8ba);if(/^\d+$/[_0x3544bc(0x120)](_0x29ec3b)){const _0x58e159=Number(_0x29ec3b),_0x40ba80=_0x8a248c[_0x3544bc(0x115)](_0x12901e=>_0x12901e[_0x3544bc(0x119)]===_0x58e159);return{'userId':_0x58e159,'username':_0x40ba80?.[_0x3544bc(0x12f)]??String(_0x58e159),'nickname':_0x40ba80?.[_0x3544bc(0x11e)],'matchedBy':'id'};}const _0x1883ab=_0x8a248c[_0x3544bc(0x135)](_0x1144c6=>matchMember(_0x1144c6,_0x29ec3b));if(_0x1883ab[_0x3544bc(0x104)]===0x0)throw CliErrors[_0x3544bc(0x131)](_0x3544bc(0x118)+_0x29ec3b+'\x22.',_0x3544bc(0xfe)+_0x42607f);if(_0x1883ab[_0x3544bc(0x104)]>0x1){const _0x326283=_0x1883ab['map'](_0x3ec402=>(_0x3ec402['nickname']??_0x3ec402[_0x3544bc(0x12f)]??'?')+'('+_0x3ec402[_0x3544bc(0x119)]+')')[_0x3544bc(0x133)](',\x20');throw CliErrors[_0x3544bc(0x131)](_0x3544bc(0x111)+_0x29ec3b+_0x3544bc(0x13b)+_0x326283+'.',_0x42607f);}const _0x195def=_0x1883ab[0x0];return{'userId':_0x195def[_0x3544bc(0x119)],'username':_0x195def['username']??String(_0x195def[_0x3544bc(0x119)]),'nickname':_0x195def[_0x3544bc(0x11e)],'matchedBy':_0x3544bc(0x13e)};}export const CREATE_USER_ROLE_PATH='/smartapi/permit/user-role/create';export const DELETE_USER_ROLE_PATH=a183_0x4ca391(0x116);export function computeRoleUserMutation(_0x55f4b5){const _0x34c5a6=a183_0x4ca391,{operation:_0x219395,appCode:_0x38c778,role:_0x128915,relations:_0xde97c8,user:_0x3b2419}=_0x55f4b5,_0x1600e9=[...new Set(_0xde97c8[_0x34c5a6(0x10f)](_0x5349e3=>_0x5349e3[_0x34c5a6(0x119)]))],_0x3e7c0d=[];if(_0x55f4b5[_0x34c5a6(0xff)]!==undefined&&_0x55f4b5[_0x34c5a6(0xff)]!==_0x1600e9[_0x34c5a6(0x104)])throw CliErrors[_0x34c5a6(0x131)](_0x34c5a6(0x114)+_0x55f4b5[_0x34c5a6(0xff)]+'\x20member(s)\x20but\x20role\x20has\x20'+_0x1600e9[_0x34c5a6(0x104)]+'.','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.');const _0x594316=_0x1600e9[_0x34c5a6(0x112)](_0x3b2419['userId']),_0x193898=_0xde97c8['filter'](_0x4acbd3=>_0x4acbd3[_0x34c5a6(0x119)]===_0x3b2419['userId'])[_0x34c5a6(0x10f)](_0x418e69=>_0x418e69['id']),_0x409b98=_0x219395===_0x34c5a6(0x12a)?!_0x594316:_0x594316;let _0x27f8a6=_0x1600e9;_0x219395===_0x34c5a6(0x12a)?_0x594316?_0x3e7c0d[_0x34c5a6(0x130)](_0x34c5a6(0x12e)+_0x3b2419[_0x34c5a6(0x119)]+_0x34c5a6(0x124)+_0x128915[_0x34c5a6(0x102)]+_0x34c5a6(0x121)):_0x27f8a6=[..._0x1600e9,_0x3b2419[_0x34c5a6(0x119)]]:!_0x594316?_0x3e7c0d['push'](_0x34c5a6(0x12e)+_0x3b2419['userId']+_0x34c5a6(0x108)+_0x128915[_0x34c5a6(0x102)]+_0x34c5a6(0x121)):(_0x27f8a6=_0x1600e9[_0x34c5a6(0x135)](_0x38af34=>_0x38af34!==_0x3b2419[_0x34c5a6(0x119)]),_0x193898[_0x34c5a6(0x104)]>0x1&&_0x3e7c0d[_0x34c5a6(0x130)]('Removed\x20'+_0x193898[_0x34c5a6(0x104)]+_0x34c5a6(0x122)+_0x3b2419[_0x34c5a6(0x119)]+'.'));const _0x307e69={'scope':'dev','operation':_0x219395,'selector':{'appCode':_0x38c778,'roleId':_0x128915['id'],'roleName':_0x128915[_0x34c5a6(0x102)],'userId':_0x3b2419[_0x34c5a6(0x119)]},'before':{'userIds':_0x1600e9},'after':{'userIds':_0x27f8a6},'dryRun':_0x55f4b5['dryRun'],'backend':{'method':'POST','path':_0x219395===_0x34c5a6(0x12a)?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x3e7c0d};return{'mutation':_0x307e69,'changed':_0x409b98,'matchingRelationIds':_0x193898};}export async function loadDevRoleRelations(_0x17b5cf,_0x5e88c9){const _0x28cc53=a183_0x4ca391,_0xfd2038=0x64,_0x30ddc5=[];for(let _0x3dc0d5=0x1;;_0x3dc0d5+=0x1){const {items:_0x2a6172,paging:_0x1ef9db}=await listDevUserRoleRelations(_0x17b5cf,{'roleId':_0x5e88c9,'currentPage':_0x3dc0d5,'pageSize':_0xfd2038});_0x30ddc5[_0x28cc53(0x130)](..._0x2a6172);if(_0x2a6172[_0x28cc53(0x104)]<_0xfd2038||_0x1ef9db&&_0x30ddc5['length']>=_0x1ef9db['totalCount'])return _0x30ddc5;}}export function readRoleRef(_0x1517b3){const _0x34988b=a183_0x4ca391,_0xa06f2=_0x1517b3['str'](_0x34988b(0xfc))['trim']();if(!_0xa06f2)throw CliErrors['flagMissing'](_0x34988b(0xfc),_0x34988b(0x11b));return _0xa06f2;}export async function prepareUserMutation(_0x9d1fa5,_0x310448,_0x3ee277){const _0x46c0ba=a183_0x4ca391,_0x580896=readRoleRef(_0x9d1fa5),_0x2d09a3=_0x9d1fa5['str'](_0x46c0ba(0x103))['trim']();if(!_0x2d09a3)throw CliErrors[_0x46c0ba(0x125)](_0x46c0ba(0x103),_0x46c0ba(0x11f));const _0x43ef1b=_0x9d1fa5['flag'](_0x46c0ba(0x128)),_0x51d8d0=_0x43ef1b===undefined||_0x43ef1b===null?undefined:Number(_0x43ef1b),_0x1deef4=await resolveRoleRef(_0x9d1fa5['appCode'],_0x580896);if(_0x1deef4[_0x46c0ba(0x10a)]==='OWNER')throw CliErrors[_0x46c0ba(0x131)](_0x46c0ba(0x12c)+_0x310448+'\x20members\x20of\x20the\x20OWNER\x20role.','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.');const _0x182b4c=await resolveUserRef(_0x2d09a3),_0x4287c9=await loadDevRoleRelations(_0x9d1fa5[_0x46c0ba(0x13f)],_0x1deef4['id']);return{...computeRoleUserMutation({'operation':_0x310448,'appCode':_0x9d1fa5[_0x46c0ba(0x13f)],'role':_0x1deef4,'relations':_0x4287c9,'user':{'userId':_0x182b4c[_0x46c0ba(0x119)],'username':_0x182b4c[_0x46c0ba(0x12f)],'nickname':_0x182b4c['nickname']},'dryRun':_0x3ee277,..._0x51d8d0!==undefined?{'expectUserCount':_0x51d8d0}:{}}),'role':_0x1deef4,'user':_0x182b4c};}
@@ -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_0x53267e=a184_0x1362;function a184_0x471c(){const _0x5a98fc=['Updated\x20role\x20','1078656FWzqOB','flag','remark','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','10980FwnsEN','--name\x20cannot\x20be\x20empty.','update','132zYBPmk','209eMZbmh','186280cbxjTx','5336oSVYHO','Nothing\x20to\x20update.','129orXbkG','POST','30194VLwJLy','157742JTZnJW','write','4716131AeFByB','name','string','appCode','80740dBOtbz','validation','roleName','dev','trim','num','length','role','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)'];a184_0x471c=function(){return _0x5a98fc;};return a184_0x471c();}(function(_0x1a4d72,_0x3d9569){const _0x317c4e=a184_0x1362,_0x59621a=_0x1a4d72();while(!![]){try{const _0x76d029=parseInt(_0x317c4e(0x1a3))/0x1+parseInt(_0x317c4e(0x1a2))/0x2*(parseInt(_0x317c4e(0x1a0))/0x3)+parseInt(_0x317c4e(0x194))/0x4+-parseInt(_0x317c4e(0x18a))/0x5*(parseInt(_0x317c4e(0x19b))/0x6)+-parseInt(_0x317c4e(0x1a5))/0x7+-parseInt(_0x317c4e(0x19e))/0x8*(-parseInt(_0x317c4e(0x198))/0x9)+-parseInt(_0x317c4e(0x19d))/0xa*(parseInt(_0x317c4e(0x19c))/0xb);if(_0x76d029===_0x3d9569)break;else _0x59621a['push'](_0x59621a['shift']());}catch(_0x2d62ee){_0x59621a['push'](_0x59621a['shift']());}}}(a184_0x471c,0x7be04));import{updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a184_0x1362(_0x11988d,_0x54cdbe){_0x11988d=_0x11988d-0x188;const _0x471cef=a184_0x471c();let _0x1362e7=_0x471cef[_0x11988d];return _0x1362e7;}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='/smartapi/permit/role/update';function readPatch(_0x452218){const _0x1c2965=a184_0x1362,_0xcc4741=_0x452218[_0x1c2965(0x195)](_0x1c2965(0x1a6)),_0x11c63c=_0x452218['flag'](_0x1c2965(0x196)),_0x49fadc={};if(_0xcc4741!==undefined&&_0xcc4741!==null){const _0x2b613e=String(_0xcc4741)[_0x1c2965(0x18e)]();if(!_0x2b613e)throw CliErrors['validation'](_0x1c2965(0x199));if(_0x2b613e[_0x1c2965(0x190)]>0x40)throw CliErrors['validation'](_0x1c2965(0x197));_0x49fadc['roleName']=_0x2b613e;}_0x11c63c!==undefined&&_0x11c63c!==null&&(_0x49fadc['remark']=String(_0x11c63c));if(_0x49fadc[_0x1c2965(0x18c)]===undefined&&_0x49fadc[_0x1c2965(0x196)]===undefined)throw CliErrors[_0x1c2965(0x18b)](_0x1c2965(0x19f),'Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.');return _0x49fadc;}export const roleUpdate={'service':a184_0x53267e(0x191),'command':a184_0x53267e(0x19a),'description':a184_0x53267e(0x192),'risk':a184_0x53267e(0x1a4),'flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a184_0x53267e(0x1a6),'type':a184_0x53267e(0x188),'required':![],'description':'New\x20role\x20name'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1b7011){readPatch(_0x1b7011);},async 'dryRun'(_0x11243b){const _0x42e0e9=a184_0x53267e,_0x2051c8=_0x11243b[_0x42e0e9(0x18f)]('id'),_0x29e29c=readPatch(_0x11243b),_0x4b857b=await getRoleById(_0x11243b[_0x42e0e9(0x189)],_0x2051c8);return assertCustomRole(_0x4b857b,'update'),asDryRunResult({'scope':_0x42e0e9(0x18d),'operation':_0x42e0e9(0x19a),'selector':{'appCode':_0x11243b[_0x42e0e9(0x189)],'roleId':_0x2051c8,'roleName':_0x4b857b[_0x42e0e9(0x18c)]},'before':projectRole(_0x4b857b),'after':projectRole({..._0x4b857b,..._0x29e29c[_0x42e0e9(0x18c)]!==undefined?{'roleName':_0x29e29c[_0x42e0e9(0x18c)]}:{},..._0x29e29c[_0x42e0e9(0x196)]!==undefined?{'remark':_0x29e29c[_0x42e0e9(0x196)]}:{}}),'dryRun':!![],'backend':{'method':_0x42e0e9(0x1a1),'path':UPDATE_PATH},'warnings':[]},{'method':_0x42e0e9(0x1a1),'url':UPDATE_PATH});},async 'execute'(_0x38ac4d){const _0x4a3b45=a184_0x53267e,_0x57f40f=_0x38ac4d[_0x4a3b45(0x18f)]('id'),_0x2799b7=readPatch(_0x38ac4d),_0x33501a=await getRoleById(_0x38ac4d[_0x4a3b45(0x189)],_0x57f40f);assertCustomRole(_0x33501a,_0x4a3b45(0x19a)),await updateAppRole({'id':_0x57f40f,'appCode':_0x38ac4d[_0x4a3b45(0x189)],..._0x2799b7[_0x4a3b45(0x18c)]!==undefined?{'roleName':_0x2799b7[_0x4a3b45(0x18c)]}:{},..._0x2799b7[_0x4a3b45(0x196)]!==undefined?{'remark':_0x2799b7[_0x4a3b45(0x196)]}:{}});const _0x42e9c7=await getRoleById(_0x38ac4d[_0x4a3b45(0x189)],_0x57f40f);return{'ok':!![],'data':{'scope':'dev','operation':'update','selector':{'appCode':_0x38ac4d[_0x4a3b45(0x189)],'roleId':_0x57f40f,'roleName':_0x42e9c7[_0x4a3b45(0x18c)]},'before':projectRole(_0x33501a),'after':projectRole(_0x42e9c7),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[]},'message':_0x4a3b45(0x193)+_0x42e9c7['roleName']+'\x20(id='+_0x57f40f+')'};}};