@lovrabet/rabetbase-cli 2.5.1-beta.6 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) 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/domain-routing-sync.js +1 -1
  177. package/lib/commands/project/index.js +1 -1
  178. package/lib/commands/project/upgrade.js +1 -1
  179. package/lib/commands/registry.js +1 -1
  180. package/lib/commands/role/delete.js +1 -1
  181. package/lib/commands/role/detail.js +1 -1
  182. package/lib/commands/role/index.js +1 -1
  183. package/lib/commands/role/list.js +1 -1
  184. package/lib/commands/role/shared.js +1 -1
  185. package/lib/commands/role/update.js +1 -1
  186. package/lib/commands/role/user-add.js +1 -1
  187. package/lib/commands/role/user-remove.js +1 -1
  188. package/lib/commands/role/user-resolve.js +1 -1
  189. package/lib/commands/rule/get.js +1 -1
  190. package/lib/commands/rule/index.js +1 -1
  191. package/lib/commands/rule/list.js +1 -1
  192. package/lib/commands/rule/set.js +1 -1
  193. package/lib/commands/rule/shared.js +1 -1
  194. package/lib/commands/run/index.js +1 -1
  195. package/lib/commands/schema.js +1 -1
  196. package/lib/commands/sql/create.js +1 -1
  197. package/lib/commands/sql/delete.js +1 -1
  198. package/lib/commands/sql/detail.js +1 -1
  199. package/lib/commands/sql/exec.js +1 -1
  200. package/lib/commands/sql/index.js +1 -1
  201. package/lib/commands/sql/list.js +1 -1
  202. package/lib/commands/sql/pull.js +1 -1
  203. package/lib/commands/sql/push.js +1 -1
  204. package/lib/commands/sql/shared.js +1 -1
  205. package/lib/commands/sql/status.js +1 -1
  206. package/lib/commands/sql/validate.js +1 -1
  207. package/lib/commands/task/index.js +1 -1
  208. package/lib/commands/task/status.js +1 -1
  209. package/lib/commands/tenant/index.js +1 -1
  210. package/lib/commands/tenant/members-list.js +1 -1
  211. package/lib/commands/tenant/shared.js +1 -1
  212. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  213. package/lib/commands/user-account/index.js +1 -1
  214. package/lib/commands/workspace/add.js +1 -1
  215. package/lib/commands/workspace/index.js +1 -1
  216. package/lib/commands/workspace/remove.js +1 -1
  217. package/lib/config/deployment-sync.js +1 -1
  218. package/lib/config/domain-config.js +1 -1
  219. package/lib/config/project-domain-routing.js +1 -1
  220. package/lib/config/schema.js +1 -1
  221. package/lib/constant/cdn.js +1 -1
  222. package/lib/constant/cli.js +1 -1
  223. package/lib/constant/defaults.js +1 -1
  224. package/lib/constant/domain.js +1 -1
  225. package/lib/constant/env.js +1 -1
  226. package/lib/constant/output.js +1 -1
  227. package/lib/constant/paths.js +1 -1
  228. package/lib/constant/region.js +1 -1
  229. package/lib/constant/risk.js +1 -1
  230. package/lib/constant/routing-profile.js +1 -1
  231. package/lib/context/app-resolver.js +1 -1
  232. package/lib/context/auth-resolver.js +1 -1
  233. package/lib/context/config-loader.js +1 -1
  234. package/lib/context.js +1 -1
  235. package/lib/core/alias-resolver.js +1 -1
  236. package/lib/core/api-client.js +1 -1
  237. package/lib/core/bff/config.js +1 -1
  238. package/lib/core/bff/file-system.js +1 -1
  239. package/lib/core/bff/hash.js +1 -1
  240. package/lib/core/bff/lock.js +1 -1
  241. package/lib/core/bff/utils.js +1 -1
  242. package/lib/core/db-resolver.js +1 -1
  243. package/lib/core/kb-search-client.js +1 -1
  244. package/lib/core/page/file-system.js +1 -1
  245. package/lib/core/page/hash.js +1 -1
  246. package/lib/core/page/lock.js +1 -1
  247. package/lib/core/sql-index-auditor.js +1 -1
  248. package/lib/core/sql-sync/config.js +1 -1
  249. package/lib/core/sql-sync/file-system.js +1 -1
  250. package/lib/core/sql-sync/hash.js +1 -1
  251. package/lib/core/sql-sync/lock.js +1 -1
  252. package/lib/core/sql-sync/utils.js +1 -1
  253. package/lib/core/sql-validator.js +1 -1
  254. package/lib/errors.js +1 -1
  255. package/lib/framework/build-all-flags.js +1 -1
  256. package/lib/framework/error-output.js +1 -1
  257. package/lib/framework/explicit-yes.js +1 -1
  258. package/lib/framework/flags.js +1 -1
  259. package/lib/framework/help.js +1 -1
  260. package/lib/framework/index.js +1 -1
  261. package/lib/framework/output.js +1 -1
  262. package/lib/framework/response.js +1 -1
  263. package/lib/framework/runner-alias.js +1 -1
  264. package/lib/framework/runner.js +1 -1
  265. package/lib/framework/schema-export.js +1 -1
  266. package/lib/framework/types.js +1 -1
  267. package/lib/generated/build-info.d.ts +4 -4
  268. package/lib/generated/build-info.js +1 -1
  269. package/lib/generated/official-routing.js +1 -1
  270. package/lib/generated/routing-contract.js +1 -1
  271. package/lib/help.js +1 -1
  272. package/lib/postinstall.js +1 -1
  273. package/lib/runtime/confirmation.js +1 -1
  274. package/lib/runtime/event.js +1 -1
  275. package/lib/runtime/index.js +1 -1
  276. package/lib/runtime/queue.js +1 -1
  277. package/lib/runtime/resolve.js +1 -1
  278. package/lib/skills/builtin-skill.js +1 -1
  279. package/lib/skills/main.js +1 -1
  280. package/lib/skills/npx-skills-add.js +1 -1
  281. package/lib/skills/skill-presence.js +1 -1
  282. package/lib/telemetry/cli-command-trace.js +1 -1
  283. package/lib/telemetry/cli-help-trace.js +1 -1
  284. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  285. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  286. package/lib/telemetry/send-cli-trace-log.js +1 -1
  287. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  288. package/lib/utils/ai_config.js +1 -1
  289. package/lib/utils/apply-jq-filter.js +1 -1
  290. package/lib/utils/cdn-config.js +1 -1
  291. package/lib/utils/check-sdk-version.js +1 -1
  292. package/lib/utils/cli-version-check.js +1 -1
  293. package/lib/utils/cli-version-policy.js +1 -1
  294. package/lib/utils/config.js +1 -1
  295. package/lib/utils/entity-with-id.js +1 -1
  296. package/lib/utils/file-utils.js +1 -1
  297. package/lib/utils/guides-cdn.js +1 -1
  298. package/lib/utils/http-client.js +1 -1
  299. package/lib/utils/is-non-interactive.js +1 -1
  300. package/lib/utils/logger.js +1 -1
  301. package/lib/utils/params.js +1 -1
  302. package/lib/utils/platform.js +1 -1
  303. package/lib/utils/sleep.js +1 -1
  304. package/lib/utils/template-replacer.js +1 -1
  305. package/lib/utils/update-notice.js +1 -1
  306. package/lib/utils/version.js +1 -1
  307. package/lib/utils/with-active-cookie.js +1 -1
  308. package/lib/utils/write-cli-side-channel.js +1 -1
  309. package/package.json +1 -1
  310. package/skills/rabetbase/SKILL.md +1 -1
  311. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- function a171_0x5745(_0xb9b940,_0x5bd73a){_0xb9b940=_0xb9b940-0xe7;const _0x134321=a171_0x1343();let _0x574578=_0x134321[_0xb9b940];return _0x574578;}(function(_0x2a1d82,_0x54ebed){const _0x47a7d8=a171_0x5745,_0x4815d9=_0x2a1d82();while(!![]){try{const _0x4dad82=parseInt(_0x47a7d8(0x10b))/0x1+-parseInt(_0x47a7d8(0xfb))/0x2*(parseInt(_0x47a7d8(0x100))/0x3)+parseInt(_0x47a7d8(0x10e))/0x4*(-parseInt(_0x47a7d8(0xff))/0x5)+parseInt(_0x47a7d8(0x107))/0x6+parseInt(_0x47a7d8(0xf7))/0x7*(parseInt(_0x47a7d8(0xe9))/0x8)+parseInt(_0x47a7d8(0xe7))/0x9*(parseInt(_0x47a7d8(0x103))/0xa)+-parseInt(_0x47a7d8(0x10c))/0xb*(parseInt(_0x47a7d8(0xee))/0xc);if(_0x4dad82===_0x54ebed)break;else _0x4815d9['push'](_0x4815d9['shift']());}catch(_0x1705c1){_0x4815d9['push'](_0x4815d9['shift']());}}}(a171_0x1343,0x5b735));import{createWriteStream}from'node:fs';function a171_0x1343(){const _0x17c69b=['mkdir','openReadStream','4054326yNKQGU','entry','toLocaleLowerCase','test','151873BPJhWn','8206yDPbcP','Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20','4cfrhQI','close','replace','Unable\x20to\x20read\x20ZIP\x20entry:\x20','144cexqXx','sep','8OLeeit','endsWith','set','externalFileAttributes','split','1332GUYEny','Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20','slice','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.','resolve','catch','Case-conflicting\x20ZIP\x20entry\x20path:\x20','join','once','275163FtBoIF','en-US','isEncrypted','Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20','100348nbywkK','has','readEntry','Project\x20template\x20ZIP\x20exceeds\x20','199340NwWDeo','24rOKxbc','fileName','length','19840OzaqEe','startsWith'];a171_0x1343=function(){return _0x17c69b;};return a171_0x1343();}import a171_0x1a4432 from'node:fs/promises';import a171_0x15c2e1 from'node:path';import{pipeline}from'node:stream/promises';import a171_0x440fb5 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(_0x304092){return new Promise((_0xf360e2,_0x24cba6)=>{a171_0x440fb5['open'](_0x304092,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x105bc8,_0x2d4956)=>{if(_0x105bc8||!_0x2d4956){_0x24cba6(_0x105bc8||new Error('Unable\x20to\x20open\x20project\x20template\x20archive.'));return;}_0xf360e2(_0x2d4956);});});}function openEntryStream(_0x110b66,_0x16003f){return new Promise((_0x62f7b1,_0x53b859)=>{const _0x221149=a171_0x5745;_0x110b66[_0x221149(0x106)](_0x16003f,(_0x15536d,_0x2beb76)=>{const _0x549b0b=_0x221149;if(_0x15536d||!_0x2beb76){_0x53b859(_0x15536d||new Error(_0x549b0b(0x111)+_0x16003f['fileName']));return;}_0x62f7b1(_0x2beb76);});});}function validateEntryPath(_0x45aac0){const _0x9b159a=a171_0x5745,_0x1901e1=_0x45aac0[_0x9b159a(0x110)](/\\/g,'/'),_0x7f8d24=_0x1901e1['endsWith']('/'),_0x3e36fb=_0x7f8d24?_0x1901e1['slice'](0x0,-0x1):_0x1901e1;if(!_0x3e36fb||_0x1901e1['startsWith']('/')||/^[A-Za-z]:\//['test'](_0x1901e1))throw new Error('Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20'+_0x45aac0);const _0x1287ef=_0x3e36fb[_0x9b159a(0xed)]('/');for(const _0x3ad70b of _0x1287ef){if(!_0x3ad70b||_0x3ad70b==='.'||_0x3ad70b==='..'||_0x3ad70b[_0x9b159a(0xea)]('.')||_0x3ad70b[_0x9b159a(0xea)]('\x20')||WINDOWS_INVALID_CHAR['test'](_0x3ad70b)||WINDOWS_RESERVED_NAME[_0x9b159a(0x10a)](_0x3ad70b))throw new Error('Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20'+_0x45aac0);}return{'relativePath':_0x1287ef['join'](a171_0x15c2e1[_0x9b159a(0xe8)]),'directory':_0x7f8d24};}function isSymbolicLink(_0x2469df){const _0x2a9e78=a171_0x5745,_0x5e9149=_0x2469df[_0x2a9e78(0xec)]>>>0x10&0xffff;return(_0x5e9149&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0x41e351,_0x5b1b96){const _0xe55a8e=a171_0x5745,_0x3c6f76=await openZip(_0x41e351),_0x69e2b4=a171_0x15c2e1['resolve'](_0x5b1b96),_0x25e1bb=new Set(),_0x568fb1=new Map();let _0x565269=0x0,_0x3da47=0x0;await a171_0x1a4432[_0xe55a8e(0x105)](_0x69e2b4,{'recursive':!![]}),await new Promise((_0x446333,_0x22c5ba)=>{const _0x261f19=_0xe55a8e;let _0x220fa5=![];const _0x292529=_0x2de211=>{const _0x346b1b=a171_0x5745;if(_0x220fa5)return;_0x220fa5=!![],_0x3c6f76[_0x346b1b(0x10f)](),_0x22c5ba(_0x2de211 instanceof Error?_0x2de211:new Error(String(_0x2de211)));};_0x3c6f76[_0x261f19(0xf6)]('error',_0x292529),_0x3c6f76[_0x261f19(0xf6)]('end',()=>{if(_0x220fa5)return;_0x220fa5=!![],_0x446333();}),_0x3c6f76['on'](_0x261f19(0x108),_0x4003c6=>{const _0x37503e=_0x261f19;void(async()=>{const _0x77c7f=a171_0x5745;_0x565269+=0x1,_0x3da47+=_0x4003c6['uncompressedSize'];if(_0x565269>MAX_ENTRY_COUNT)throw new Error(_0x77c7f(0xfe)+MAX_ENTRY_COUNT+'\x20entries.');if(_0x3da47>MAX_UNCOMPRESSED_SIZE)throw new Error(_0x77c7f(0xf1));if(_0x4003c6[_0x77c7f(0xf9)]())throw new Error(_0x77c7f(0x10d)+_0x4003c6[_0x77c7f(0x101)]);if(isSymbolicLink(_0x4003c6))throw new Error(_0x77c7f(0xef)+_0x4003c6[_0x77c7f(0x101)]);const {relativePath:_0x5af2bb,directory:_0x350917}=validateEntryPath(_0x4003c6[_0x77c7f(0x101)]),_0x5b7e3f=_0x5af2bb['split'](a171_0x15c2e1[_0x77c7f(0xe8)]);for(let _0x40014e=0x1;_0x40014e<=_0x5b7e3f[_0x77c7f(0x102)];_0x40014e+=0x1){const _0x429a12=_0x5b7e3f[_0x77c7f(0xf0)](0x0,_0x40014e)[_0x77c7f(0xf5)](a171_0x15c2e1[_0x77c7f(0xe8)]),_0x44f6ba=_0x429a12['toLocaleLowerCase'](_0x77c7f(0xf8)),_0x3262de=_0x568fb1['get'](_0x44f6ba);if(_0x3262de&&_0x3262de!==_0x429a12)throw new Error(_0x77c7f(0xf4)+_0x4003c6[_0x77c7f(0x101)]);_0x568fb1[_0x77c7f(0xeb)](_0x44f6ba,_0x429a12);}const _0x193760=_0x5af2bb[_0x77c7f(0x109)]('en-US');if(_0x25e1bb[_0x77c7f(0xfc)](_0x193760))throw new Error(_0x77c7f(0xfa)+_0x4003c6[_0x77c7f(0x101)]);_0x25e1bb['add'](_0x193760);const _0x3c89a9=a171_0x15c2e1[_0x77c7f(0xf2)](_0x69e2b4,_0x5af2bb);if(_0x3c89a9!==_0x69e2b4&&!_0x3c89a9[_0x77c7f(0x104)](''+_0x69e2b4+a171_0x15c2e1[_0x77c7f(0xe8)]))throw new Error('ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20'+_0x4003c6['fileName']);if(_0x350917)await a171_0x1a4432[_0x77c7f(0x105)](_0x3c89a9,{'recursive':!![]});else{await a171_0x1a4432[_0x77c7f(0x105)](a171_0x15c2e1['dirname'](_0x3c89a9),{'recursive':!![]});const _0x7e09b1=await openEntryStream(_0x3c6f76,_0x4003c6);await pipeline(_0x7e09b1,createWriteStream(_0x3c89a9,{'flags':'wx','mode':0x1a4}));}_0x3c6f76[_0x77c7f(0xfd)]();})()[_0x37503e(0xf3)](_0x292529);}),_0x3c6f76[_0x261f19(0xfd)]();});}
1
+ (function(_0x2b473a,_0x5abe1d){const _0x350e07=a171_0x57f4,_0x2c1112=_0x2b473a();while(!![]){try{const _0x4acef0=parseInt(_0x350e07(0x1b2))/0x1+-parseInt(_0x350e07(0x1bb))/0x2*(-parseInt(_0x350e07(0x1b8))/0x3)+parseInt(_0x350e07(0x1b4))/0x4+parseInt(_0x350e07(0x1a4))/0x5+parseInt(_0x350e07(0x19e))/0x6*(parseInt(_0x350e07(0x1b1))/0x7)+parseInt(_0x350e07(0x19b))/0x8+-parseInt(_0x350e07(0x1a9))/0x9;if(_0x4acef0===_0x5abe1d)break;else _0x2c1112['push'](_0x2c1112['shift']());}catch(_0x501aa7){_0x2c1112['push'](_0x2c1112['shift']());}}}(a171_0x1076,0xa7379));import{createWriteStream}from'node:fs';import a171_0x39c831 from'node:fs/promises';function a171_0x57f4(_0x1e08b4,_0x3c15cb){_0x1e08b4=_0x1e08b4-0x198;const _0x1076dd=a171_0x1076();let _0x57f497=_0x1076dd[_0x1e08b4];return _0x57f497;}import a171_0x223976 from'node:path';import{pipeline}from'node:stream/promises';import a171_0x4809ea 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 a171_0x1076(){const _0x2ff802=['once','1926218VZoJOe','789428NCyHLy','openReadStream','1487968pEYRrq','uncompressedSize','en-US','dirname','3489cyEkOY','open','Unable\x20to\x20read\x20ZIP\x20entry:\x20','2094JivlAw','startsWith','fileName','error','ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20','slice','test','Case-conflicting\x20ZIP\x20entry\x20path:\x20','toLocaleLowerCase','has','length','endsWith','2386776MMKWTb','replace','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.','12WvFNCS','entry','sep','resolve','set','Project\x20template\x20ZIP\x20exceeds\x20','3216280MiYgPu','Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20','readEntry','Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20','\x20entries.','28674999EihAqO','Unable\x20to\x20open\x20project\x20template\x20archive.','get','mkdir','catch','add','Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20'];a171_0x1076=function(){return _0x2ff802;};return a171_0x1076();}function openZip(_0x523acd){return new Promise((_0xbc801e,_0x427550)=>{const _0x33092a=a171_0x57f4;a171_0x4809ea[_0x33092a(0x1b9)](_0x523acd,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x21b2fa,_0xd47259)=>{const _0x5dd95f=_0x33092a;if(_0x21b2fa||!_0xd47259){_0x427550(_0x21b2fa||new Error(_0x5dd95f(0x1aa)));return;}_0xbc801e(_0xd47259);});});}function openEntryStream(_0x1ecbef,_0x4cfc3f){return new Promise((_0x46a652,_0x2791a1)=>{const _0x1d19d0=a171_0x57f4;_0x1ecbef[_0x1d19d0(0x1b3)](_0x4cfc3f,(_0x4e3492,_0x297048)=>{const _0x50af39=_0x1d19d0;if(_0x4e3492||!_0x297048){_0x2791a1(_0x4e3492||new Error(_0x50af39(0x1ba)+_0x4cfc3f[_0x50af39(0x1bd)]));return;}_0x46a652(_0x297048);});});}function validateEntryPath(_0x139859){const _0x354cd2=a171_0x57f4,_0x444297=_0x139859[_0x354cd2(0x19c)](/\\/g,'/'),_0x958712=_0x444297[_0x354cd2(0x19a)]('/'),_0x254d4d=_0x958712?_0x444297[_0x354cd2(0x1c0)](0x0,-0x1):_0x444297;if(!_0x254d4d||_0x444297[_0x354cd2(0x1bc)]('/')||/^[A-Za-z]:\//[_0x354cd2(0x1c1)](_0x444297))throw new Error(_0x354cd2(0x1a5)+_0x139859);const _0x55946b=_0x254d4d['split']('/');for(const _0x2fd096 of _0x55946b){if(!_0x2fd096||_0x2fd096==='.'||_0x2fd096==='..'||_0x2fd096['endsWith']('.')||_0x2fd096[_0x354cd2(0x19a)]('\x20')||WINDOWS_INVALID_CHAR['test'](_0x2fd096)||WINDOWS_RESERVED_NAME[_0x354cd2(0x1c1)](_0x2fd096))throw new Error('Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20'+_0x139859);}return{'relativePath':_0x55946b['join'](a171_0x223976[_0x354cd2(0x1a0)]),'directory':_0x958712};}function isSymbolicLink(_0x7717ea){const _0x4bc3fc=_0x7717ea['externalFileAttributes']>>>0x10&0xffff;return(_0x4bc3fc&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0x1797d4,_0x3bf2e2){const _0x4b2b8e=a171_0x57f4,_0x7c5012=await openZip(_0x1797d4),_0x53ff5f=a171_0x223976[_0x4b2b8e(0x1a1)](_0x3bf2e2),_0x454078=new Set(),_0x311b2c=new Map();let _0x3d09cb=0x0,_0x3d61a2=0x0;await a171_0x39c831[_0x4b2b8e(0x1ac)](_0x53ff5f,{'recursive':!![]}),await new Promise((_0x2e9cad,_0x3fee73)=>{const _0x4bad23=_0x4b2b8e;let _0x89c76b=![];const _0x424443=_0x14c7a9=>{if(_0x89c76b)return;_0x89c76b=!![],_0x7c5012['close'](),_0x3fee73(_0x14c7a9 instanceof Error?_0x14c7a9:new Error(String(_0x14c7a9)));};_0x7c5012[_0x4bad23(0x1b0)](_0x4bad23(0x1be),_0x424443),_0x7c5012[_0x4bad23(0x1b0)]('end',()=>{if(_0x89c76b)return;_0x89c76b=!![],_0x2e9cad();}),_0x7c5012['on'](_0x4bad23(0x19f),_0x44a142=>{const _0x23ee81=_0x4bad23;void(async()=>{const _0xff2943=a171_0x57f4;_0x3d09cb+=0x1,_0x3d61a2+=_0x44a142[_0xff2943(0x1b5)];if(_0x3d09cb>MAX_ENTRY_COUNT)throw new Error(_0xff2943(0x1a3)+MAX_ENTRY_COUNT+_0xff2943(0x1a8));if(_0x3d61a2>MAX_UNCOMPRESSED_SIZE)throw new Error(_0xff2943(0x19d));if(_0x44a142['isEncrypted']())throw new Error('Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20'+_0x44a142[_0xff2943(0x1bd)]);if(isSymbolicLink(_0x44a142))throw new Error(_0xff2943(0x1af)+_0x44a142[_0xff2943(0x1bd)]);const {relativePath:_0x5166ba,directory:_0x1be718}=validateEntryPath(_0x44a142[_0xff2943(0x1bd)]),_0x6d63db=_0x5166ba['split'](a171_0x223976[_0xff2943(0x1a0)]);for(let _0x42d68e=0x1;_0x42d68e<=_0x6d63db[_0xff2943(0x199)];_0x42d68e+=0x1){const _0xf4561f=_0x6d63db[_0xff2943(0x1c0)](0x0,_0x42d68e)['join'](a171_0x223976[_0xff2943(0x1a0)]),_0xb846bb=_0xf4561f[_0xff2943(0x1c3)](_0xff2943(0x1b6)),_0x218144=_0x311b2c[_0xff2943(0x1ab)](_0xb846bb);if(_0x218144&&_0x218144!==_0xf4561f)throw new Error(_0xff2943(0x1c2)+_0x44a142[_0xff2943(0x1bd)]);_0x311b2c[_0xff2943(0x1a2)](_0xb846bb,_0xf4561f);}const _0x52fe3c=_0x5166ba[_0xff2943(0x1c3)](_0xff2943(0x1b6));if(_0x454078[_0xff2943(0x198)](_0x52fe3c))throw new Error(_0xff2943(0x1a7)+_0x44a142[_0xff2943(0x1bd)]);_0x454078[_0xff2943(0x1ae)](_0x52fe3c);const _0x1d513b=a171_0x223976[_0xff2943(0x1a1)](_0x53ff5f,_0x5166ba);if(_0x1d513b!==_0x53ff5f&&!_0x1d513b['startsWith'](''+_0x53ff5f+a171_0x223976[_0xff2943(0x1a0)]))throw new Error(_0xff2943(0x1bf)+_0x44a142[_0xff2943(0x1bd)]);if(_0x1be718)await a171_0x39c831[_0xff2943(0x1ac)](_0x1d513b,{'recursive':!![]});else{await a171_0x39c831[_0xff2943(0x1ac)](a171_0x223976[_0xff2943(0x1b7)](_0x1d513b),{'recursive':!![]});const _0x46379b=await openEntryStream(_0x7c5012,_0x44a142);await pipeline(_0x46379b,createWriteStream(_0x1d513b,{'flags':'wx','mode':0x1a4}));}_0x7c5012['readEntry']();})()[_0x23ee81(0x1ad)](_0x424443);}),_0x7c5012[_0x4bad23(0x1a6)]();});}
@@ -1 +1 @@
1
- const a172_0x35f49f=a172_0x291c;(function(_0x1c6897,_0x498f28){const _0x20c820=a172_0x291c,_0x5190c8=_0x1c6897();while(!![]){try{const _0x3bead0=-parseInt(_0x20c820(0x1a9))/0x1*(parseInt(_0x20c820(0x1a2))/0x2)+parseInt(_0x20c820(0x1a0))/0x3+parseInt(_0x20c820(0x19e))/0x4*(-parseInt(_0x20c820(0x19d))/0x5)+-parseInt(_0x20c820(0x1a5))/0x6*(-parseInt(_0x20c820(0x1a1))/0x7)+parseInt(_0x20c820(0x1aa))/0x8*(-parseInt(_0x20c820(0x19f))/0x9)+-parseInt(_0x20c820(0x1a7))/0xa*(-parseInt(_0x20c820(0x1a6))/0xb)+parseInt(_0x20c820(0x1a3))/0xc*(parseInt(_0x20c820(0x19c))/0xd);if(_0x3bead0===_0x498f28)break;else _0x5190c8['push'](_0x5190c8['shift']());}catch(_0xc7b7a8){_0x5190c8['push'](_0x5190c8['shift']());}}}(a172_0x221c,0x4563c));import a172_0x39e3f4 from'node:path';import{fileURLToPath}from'node:url';function a172_0x291c(_0xbe94fe,_0x193b6b){_0xbe94fe=_0xbe94fe-0x19c;const _0x221cfb=a172_0x221c();let _0x291c0f=_0x221cfb[_0xbe94fe];return _0x291c0f;}function a172_0x221c(){const _0x1c235c=['368475VZNgwu','462259YQIDwU','76926mjuGtY','3836472TfMQqW','resolve','24oRqBHA','33zUDEpz','713630IQFwzk','dirname','14ZEDqRc','38288COWwmd','../../../../','39hLBHud','60695slMGWH','120jdOzfL','702CJdvqe'];a172_0x221c=function(){return _0x1c235c;};return a172_0x221c();}const __dirname=a172_0x39e3f4[a172_0x35f49f(0x1a8)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x40c52e=a172_0x35f49f;return a172_0x39e3f4[_0x40c52e(0x1a4)](__dirname,_0x40c52e(0x1ab));}
1
+ const a172_0x42165c=a172_0x29c9;(function(_0x1a31eb,_0x4b0cd6){const _0xb0f218=a172_0x29c9,_0x285ba4=_0x1a31eb();while(!![]){try{const _0x3f2d81=parseInt(_0xb0f218(0x121))/0x1*(-parseInt(_0xb0f218(0x12a))/0x2)+-parseInt(_0xb0f218(0x128))/0x3+parseInt(_0xb0f218(0x126))/0x4+parseInt(_0xb0f218(0x124))/0x5+-parseInt(_0xb0f218(0x125))/0x6+-parseInt(_0xb0f218(0x12b))/0x7*(-parseInt(_0xb0f218(0x123))/0x8)+parseInt(_0xb0f218(0x122))/0x9*(-parseInt(_0xb0f218(0x127))/0xa);if(_0x3f2d81===_0x4b0cd6)break;else _0x285ba4['push'](_0x285ba4['shift']());}catch(_0x312502){_0x285ba4['push'](_0x285ba4['shift']());}}}(a172_0x432f,0xe0d8d));function a172_0x432f(){const _0x5a6d88=['266cdcjbI','../../../../','dirname','26678BuSktD','51750fSehWl','238208CzWDDa','7187075xaNNev','3251346VUfvKa','4799764SomTFp','310ijETmQ','2301456uLECpX','resolve','102HHVuUi'];a172_0x432f=function(){return _0x5a6d88;};return a172_0x432f();}function a172_0x29c9(_0xde2dd1,_0x5069bc){_0xde2dd1=_0xde2dd1-0x11f;const _0x432f43=a172_0x432f();let _0x29c989=_0x432f43[_0xde2dd1];return _0x29c989;}import a172_0x435c61 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a172_0x435c61[a172_0x42165c(0x120)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x56d2b6=a172_0x42165c;return a172_0x435c61[_0x56d2b6(0x129)](__dirname,_0x56d2b6(0x11f));}
@@ -1 +1 @@
1
- function a173_0x4026(_0x2dcf2d,_0x547a5d){_0x2dcf2d=_0x2dcf2d-0x119;const _0x41f8fe=a173_0x41f8();let _0x40263c=_0x41f8fe[_0x2dcf2d];return _0x40263c;}(function(_0x3b659f,_0x5c1742){const _0x50e228=a173_0x4026,_0x3ee673=_0x3b659f();while(!![]){try{const _0x1d39f1=parseInt(_0x50e228(0x128))/0x1*(-parseInt(_0x50e228(0x11c))/0x2)+-parseInt(_0x50e228(0x11e))/0x3*(-parseInt(_0x50e228(0x11f))/0x4)+-parseInt(_0x50e228(0x12a))/0x5+-parseInt(_0x50e228(0x12e))/0x6*(-parseInt(_0x50e228(0x121))/0x7)+parseInt(_0x50e228(0x120))/0x8*(parseInt(_0x50e228(0x127))/0x9)+-parseInt(_0x50e228(0x123))/0xa*(parseInt(_0x50e228(0x125))/0xb)+parseInt(_0x50e228(0x11a))/0xc*(parseInt(_0x50e228(0x11d))/0xd);if(_0x1d39f1===_0x5c1742)break;else _0x3ee673['push'](_0x3ee673['shift']());}catch(_0x3c73d3){_0x3ee673['push'](_0x3ee673['shift']());}}}(a173_0x41f8,0x74970));import a173_0x38678c from'node:path';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a173_0x41f8(){const _0x30efb0=['284eDbsfP','1504472LViqXA','4420451oafSXH','now','248680bZvvwy','success','297FrAYil','cwd','9LtSPpu','2BQKWlx','Project\x20template\x20created','2705500FmwRzM','resolve','error','copy','6YhIvZV','Failed\x20to\x20copy\x20project\x20template','768FLRFDr','version','212074iZdAfG','147017GhunOZ','15162BqsrmP'];a173_0x41f8=function(){return _0x30efb0;};return a173_0x41f8();}import{materializeLocalProjectTemplate,materializeProjectTemplate}from'../../../commands/project/create/materialize-project-template.js';export async function copyProjectTemplate(_0x379b5b,_0x52cf04,_0x25515c){const _0x52c75d=a173_0x4026,_0x32b28f=Date[_0x52c75d(0x122)](),_0x366001=a173_0x38678c[_0x52c75d(0x12b)](process[_0x52c75d(0x126)](),_0x379b5b);try{logger['info'](_0x52c75d(0x12d),'Starting\x20project\x20template\x20creation',{'projectCode':_0x379b5b});const _0x361291=_0x25515c?await materializeLocalProjectTemplate(_0x25515c,_0x366001,_0x52cf04):await materializeProjectTemplate(_0x366001,_0x52cf04),_0x4ff1eb=Date[_0x52c75d(0x122)]()-_0x32b28f;logger[_0x52c75d(0x124)](_0x52c75d(0x12d),_0x52c75d(0x129),_0x4ff1eb,{'projectCode':_0x379b5b,'templateSource':_0x361291['source'],'templateVersion':_0x361291[_0x52c75d(0x11b)]});}catch(_0x6a7ca0){const _0x16703a=Date[_0x52c75d(0x122)]()-_0x32b28f;logger[_0x52c75d(0x12c)](_0x52c75d(0x12d),_0x52c75d(0x119),{'projectCode':_0x379b5b,'error':_0x6a7ca0 instanceof Error?_0x6a7ca0['message']:String(_0x6a7ca0),'duration':_0x16703a});throw _0x6a7ca0;}return formatElapsed(_0x32b28f);}
1
+ (function(_0x3f6c06,_0xb003fa){const _0x450eb9=a173_0x21f6,_0x391bfc=_0x3f6c06();while(!![]){try{const _0x14470c=parseInt(_0x450eb9(0x12f))/0x1+-parseInt(_0x450eb9(0x12e))/0x2*(-parseInt(_0x450eb9(0x124))/0x3)+parseInt(_0x450eb9(0x12d))/0x4*(parseInt(_0x450eb9(0x11f))/0x5)+-parseInt(_0x450eb9(0x129))/0x6+-parseInt(_0x450eb9(0x121))/0x7*(-parseInt(_0x450eb9(0x126))/0x8)+-parseInt(_0x450eb9(0x11c))/0x9+parseInt(_0x450eb9(0x12c))/0xa;if(_0x14470c===_0xb003fa)break;else _0x391bfc['push'](_0x391bfc['shift']());}catch(_0x17f448){_0x391bfc['push'](_0x391bfc['shift']());}}}(a173_0x4892,0xab73e));import a173_0x743f07 from'node:path';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a173_0x21f6(_0x590fdb,_0x15beb0){_0x590fdb=_0x590fdb-0x11a;const _0x489246=a173_0x4892();let _0x21f6f4=_0x489246[_0x590fdb];return _0x21f6f4;}function a173_0x4892(){const _0x4554e3=['success','148017NnkMSf','message','7816RbvXIf','Starting\x20project\x20template\x20creation','version','5461110ZopqUY','copy','error','9117450cVhCwm','4812aLisCU','14dzcaYB','568331qmeiEg','now','Failed\x20to\x20copy\x20project\x20template','6136686BIdZsJ','resolve','cwd','1165NWJhVl','source','1351lSXpKp','Project\x20template\x20created'];a173_0x4892=function(){return _0x4554e3;};return a173_0x4892();}import{materializeLocalProjectTemplate,materializeProjectTemplate}from'../../../commands/project/create/materialize-project-template.js';export async function copyProjectTemplate(_0x6fead6,_0xac0589,_0x578671){const _0x3b8e00=a173_0x21f6,_0x152b67=Date[_0x3b8e00(0x11a)](),_0x1b5145=a173_0x743f07[_0x3b8e00(0x11d)](process[_0x3b8e00(0x11e)](),_0x6fead6);try{logger['info'](_0x3b8e00(0x12a),_0x3b8e00(0x127),{'projectCode':_0x6fead6});const _0x2fb653=_0x578671?await materializeLocalProjectTemplate(_0x578671,_0x1b5145,_0xac0589):await materializeProjectTemplate(_0x1b5145,_0xac0589),_0x33ec7f=Date[_0x3b8e00(0x11a)]()-_0x152b67;logger[_0x3b8e00(0x123)](_0x3b8e00(0x12a),_0x3b8e00(0x122),_0x33ec7f,{'projectCode':_0x6fead6,'templateSource':_0x2fb653[_0x3b8e00(0x120)],'templateVersion':_0x2fb653[_0x3b8e00(0x128)]});}catch(_0x2ce091){const _0xeb8cb=Date[_0x3b8e00(0x11a)]()-_0x152b67;logger[_0x3b8e00(0x12b)](_0x3b8e00(0x12a),_0x3b8e00(0x11b),{'projectCode':_0x6fead6,'error':_0x2ce091 instanceof Error?_0x2ce091[_0x3b8e00(0x125)]:String(_0x2ce091),'duration':_0xeb8cb});throw _0x2ce091;}return formatElapsed(_0x152b67);}
@@ -1 +1 @@
1
- function a174_0x3ec6(_0xa7468f,_0x171589){_0xa7468f=_0xa7468f-0x179;const _0x209eb4=a174_0x209e();let _0x3ec631=_0x209eb4[_0xa7468f];return _0x3ec631;}(function(_0x257e62,_0x235367){const _0x300795=a174_0x3ec6,_0x313ca3=_0x257e62();while(!![]){try{const _0x13f8a3=-parseInt(_0x300795(0x17e))/0x1*(-parseInt(_0x300795(0x17d))/0x2)+-parseInt(_0x300795(0x18c))/0x3*(-parseInt(_0x300795(0x181))/0x4)+-parseInt(_0x300795(0x18a))/0x5*(parseInt(_0x300795(0x187))/0x6)+parseInt(_0x300795(0x185))/0x7+-parseInt(_0x300795(0x18e))/0x8+-parseInt(_0x300795(0x18f))/0x9+-parseInt(_0x300795(0x18b))/0xa*(-parseInt(_0x300795(0x186))/0xb);if(_0x13f8a3===_0x235367)break;else _0x313ca3['push'](_0x313ca3['shift']());}catch(_0x2af4f5){_0x313ca3['push'](_0x313ca3['shift']());}}}(a174_0x209e,0xc2ab1));import a174_0x47ffff from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x58598a){const _0x258ac4=a174_0x3ec6,_0x172145=Date[_0x258ac4(0x17c)](),_0x390f97=a174_0x47ffff[_0x258ac4(0x189)](process[_0x258ac4(0x180)](),_0x58598a);try{logger[_0x258ac4(0x18d)](_0x258ac4(0x183),_0x258ac4(0x179),{'projectCode':_0x58598a}),await execa(resolveNpmBin(_0x258ac4(0x17a)),[_0x258ac4(0x190),'--write','.'],{'cwd':_0x390f97});const _0x1da9b3=Date['now']()-_0x172145;logger[_0x258ac4(0x17b)](_0x258ac4(0x183),_0x258ac4(0x184),_0x1da9b3,{'projectCode':_0x58598a});}catch(_0x41db83){const _0x5ec59d=Date['now']()-_0x172145;logger[_0x258ac4(0x188)](_0x258ac4(0x183),_0x258ac4(0x17f),{'projectCode':_0x58598a,'error':_0x41db83 instanceof Error?_0x41db83[_0x258ac4(0x182)]:String(_0x41db83),'duration':_0x5ec59d});throw _0x41db83;}return formatElapsed(_0x172145);}function a174_0x209e(){const _0x56087f=['7535268XSseWR','prettier','Starting\x20code\x20format','npx','success','now','13428FWaIRX','183CuIdcu','Code\x20format\x20failed','cwd','3888044yYmRCP','message','format','Code\x20format\x20completed','338793vVPnDS','382019tYfkKc','1604706OaAldX','error','resolve','25OezRQT','410HnHYuB','3xfAIxB','info','5608744PIfwbO'];a174_0x209e=function(){return _0x56087f;};return a174_0x209e();}
1
+ (function(_0x55f62c,_0x3f5803){const _0x10796b=a174_0xe35f,_0x5117a8=_0x55f62c();while(!![]){try{const _0x4b6f8a=parseInt(_0x10796b(0x1ca))/0x1*(parseInt(_0x10796b(0x1cd))/0x2)+-parseInt(_0x10796b(0x1cf))/0x3*(-parseInt(_0x10796b(0x1c8))/0x4)+-parseInt(_0x10796b(0x1be))/0x5*(-parseInt(_0x10796b(0x1c4))/0x6)+parseInt(_0x10796b(0x1cb))/0x7+-parseInt(_0x10796b(0x1bf))/0x8*(-parseInt(_0x10796b(0x1c9))/0x9)+-parseInt(_0x10796b(0x1c0))/0xa*(parseInt(_0x10796b(0x1c7))/0xb)+parseInt(_0x10796b(0x1d1))/0xc*(-parseInt(_0x10796b(0x1ce))/0xd);if(_0x4b6f8a===_0x3f5803)break;else _0x5117a8['push'](_0x5117a8['shift']());}catch(_0x523df8){_0x5117a8['push'](_0x5117a8['shift']());}}}(a174_0x118e,0xefcc0));function a174_0x118e(){const _0x3ba0e5=['32WgeFXf','136220ZpVxea','error','--write','format','90BZeQtR','npx','message','1199IuQJDa','226316mplQKy','1003437ZemDOe','1883267ZhwOOJ','10588172XpjzkP','info','2gRtRIa','1521kcpwas','21IvMbip','Code\x20format\x20failed','241212yYisWp','now','193645CTKwlx'];a174_0x118e=function(){return _0x3ba0e5;};return a174_0x118e();}import a174_0x53d17b from'node:path';import{execa}from'execa';function a174_0xe35f(_0x25af25,_0x1b0592){_0x25af25=_0x25af25-0x1be;const _0x118e33=a174_0x118e();let _0xe35f39=_0x118e33[_0x25af25];return _0xe35f39;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x19df66){const _0x510412=a174_0xe35f,_0x560d62=Date['now'](),_0x4daff9=a174_0x53d17b['resolve'](process['cwd'](),_0x19df66);try{logger[_0x510412(0x1cc)]('format','Starting\x20code\x20format',{'projectCode':_0x19df66}),await execa(resolveNpmBin(_0x510412(0x1c5)),['prettier',_0x510412(0x1c2),'.'],{'cwd':_0x4daff9});const _0x3df4ba=Date[_0x510412(0x1d2)]()-_0x560d62;logger['success'](_0x510412(0x1c3),'Code\x20format\x20completed',_0x3df4ba,{'projectCode':_0x19df66});}catch(_0x1521b8){const _0x5b8673=Date[_0x510412(0x1d2)]()-_0x560d62;logger[_0x510412(0x1c1)](_0x510412(0x1c3),_0x510412(0x1d0),{'projectCode':_0x19df66,'error':_0x1521b8 instanceof Error?_0x1521b8[_0x510412(0x1c6)]:String(_0x1521b8),'duration':_0x5b8673});throw _0x1521b8;}return formatElapsed(_0x560d62);}
@@ -1 +1 @@
1
- (function(_0x36bf14,_0x49fd34){const _0x5cf0ee=a175_0x1796,_0x4b2275=_0x36bf14();while(!![]){try{const _0x527bb3=parseInt(_0x5cf0ee(0xa0))/0x1*(parseInt(_0x5cf0ee(0x94))/0x2)+parseInt(_0x5cf0ee(0x91))/0x3+-parseInt(_0x5cf0ee(0x95))/0x4+-parseInt(_0x5cf0ee(0x97))/0x5*(-parseInt(_0x5cf0ee(0x92))/0x6)+parseInt(_0x5cf0ee(0x9c))/0x7+parseInt(_0x5cf0ee(0x90))/0x8+-parseInt(_0x5cf0ee(0x9f))/0x9*(parseInt(_0x5cf0ee(0x96))/0xa);if(_0x527bb3===_0x49fd34)break;else _0x4b2275['push'](_0x4b2275['shift']());}catch(_0x5146e2){_0x4b2275['push'](_0x4b2275['shift']());}}}(a175_0x406a,0xdda3a));function a175_0x1796(_0x25da5e,_0xc71767){_0x25da5e=_0x25da5e-0x8e;const _0x406a1c=a175_0x406a();let _0x179617=_0x406a1c[_0x25da5e];return _0x179617;}import a175_0x3a6e2a from'node:path';import{execa}from'execa';function a175_0x406a(){const _0x1eb636=['resolve','9789290drfEpU','cwd','success','2173023aivSlz','4LvOlMo','Dependency\x20install\x20completed','--registry','4437792AUqMyt','1377258ptkOUO','2214lGamAZ','info','502906qykzvP','4105600skwPwm','70fkuraX','2795obKuIi','install','npm','now'];a175_0x406a=function(){return _0x1eb636;};return a175_0x406a();}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x6d23ad){const _0x482c16=a175_0x1796,_0x57c19a=Date[_0x482c16(0x9a)](),_0x3a328b=a175_0x3a6e2a[_0x482c16(0x9b)](process[_0x482c16(0x9d)](),_0x6d23ad);try{logger[_0x482c16(0x93)](_0x482c16(0x98),'Starting\x20dependency\x20install',{'projectCode':_0x6d23ad,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin(_0x482c16(0x99)),[_0x482c16(0x98),_0x482c16(0x8f),'https://registry.npmmirror.com'],{'cwd':_0x3a328b});const _0x4590d3=Date[_0x482c16(0x9a)]()-_0x57c19a;logger[_0x482c16(0x9e)]('install',_0x482c16(0x8e),_0x4590d3,{'projectCode':_0x6d23ad});}catch(_0x156943){const _0x43d21d=Date[_0x482c16(0x9a)]()-_0x57c19a;logger['error']('install','Dependency\x20install\x20failed',{'projectCode':_0x6d23ad,'error':_0x156943 instanceof Error?_0x156943['message']:String(_0x156943),'duration':_0x43d21d});throw _0x156943;}return formatElapsed(_0x57c19a);}
1
+ (function(_0x2d013c,_0x2ee0e2){const _0x4b4806=a175_0x1afe,_0x151be6=_0x2d013c();while(!![]){try{const _0x4bc259=parseInt(_0x4b4806(0x8b))/0x1+-parseInt(_0x4b4806(0x8a))/0x2*(-parseInt(_0x4b4806(0x7d))/0x3)+parseInt(_0x4b4806(0x85))/0x4+-parseInt(_0x4b4806(0x76))/0x5*(-parseInt(_0x4b4806(0x88))/0x6)+-parseInt(_0x4b4806(0x7c))/0x7+-parseInt(_0x4b4806(0x7e))/0x8+parseInt(_0x4b4806(0x84))/0x9*(-parseInt(_0x4b4806(0x75))/0xa);if(_0x4bc259===_0x2ee0e2)break;else _0x151be6['push'](_0x151be6['shift']());}catch(_0xf8c020){_0x151be6['push'](_0x151be6['shift']());}}}(a175_0x5b83,0x198fc));import a175_0x461d16 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 a175_0x5b83(){const _0x15aa6e=['5GbAtpk','Dependency\x20install\x20completed','success','cwd','Dependency\x20install\x20failed','Starting\x20dependency\x20install','394282SttWTE','24diloey','175416kvswDB','info','resolve','npm','error','install','9YbxCGE','396208ijQsDR','--registry','message','954606DCRjWS','now','30110ssBuOP','199065LYoJip','https://registry.npmmirror.com','3947050nGFthe'];a175_0x5b83=function(){return _0x15aa6e;};return a175_0x5b83();}function a175_0x1afe(_0x10b7f7,_0x4e42ad){_0x10b7f7=_0x10b7f7-0x75;const _0x5b83ca=a175_0x5b83();let _0x1afe8b=_0x5b83ca[_0x10b7f7];return _0x1afe8b;}export async function installDependencies(_0x358c55){const _0x1fa09f=a175_0x1afe,_0x261dcc=Date[_0x1fa09f(0x89)](),_0xffc5a2=a175_0x461d16[_0x1fa09f(0x80)](process[_0x1fa09f(0x79)](),_0x358c55);try{logger[_0x1fa09f(0x7f)](_0x1fa09f(0x83),_0x1fa09f(0x7b),{'projectCode':_0x358c55,'registry':_0x1fa09f(0x8c)}),await execa(resolveNpmBin(_0x1fa09f(0x81)),['install',_0x1fa09f(0x86),_0x1fa09f(0x8c)],{'cwd':_0xffc5a2});const _0x5b1f76=Date[_0x1fa09f(0x89)]()-_0x261dcc;logger[_0x1fa09f(0x78)](_0x1fa09f(0x83),_0x1fa09f(0x77),_0x5b1f76,{'projectCode':_0x358c55});}catch(_0x1116c4){const _0x152865=Date['now']()-_0x261dcc;logger[_0x1fa09f(0x82)]('install',_0x1fa09f(0x7a),{'projectCode':_0x358c55,'error':_0x1116c4 instanceof Error?_0x1116c4[_0x1fa09f(0x87)]:String(_0x1116c4),'duration':_0x152865});throw _0x1116c4;}return formatElapsed(_0x261dcc);}
@@ -1 +1 @@
1
- const a176_0xa5ef43=a176_0x5ca4;(function(_0x260d13,_0x1703fd){const _0x2c8961=a176_0x5ca4,_0x20283a=_0x260d13();while(!![]){try{const _0x1a19fb=-parseInt(_0x2c8961(0x130))/0x1*(parseInt(_0x2c8961(0x134))/0x2)+-parseInt(_0x2c8961(0x12f))/0x3+parseInt(_0x2c8961(0x138))/0x4+parseInt(_0x2c8961(0x12e))/0x5*(parseInt(_0x2c8961(0x135))/0x6)+-parseInt(_0x2c8961(0x132))/0x7*(-parseInt(_0x2c8961(0x133))/0x8)+parseInt(_0x2c8961(0x13b))/0x9*(parseInt(_0x2c8961(0x12c))/0xa)+-parseInt(_0x2c8961(0x128))/0xb*(parseInt(_0x2c8961(0x13c))/0xc);if(_0x1a19fb===_0x1703fd)break;else _0x20283a['push'](_0x20283a['shift']());}catch(_0x161cc3){_0x20283a['push'](_0x20283a['shift']());}}}(a176_0x4398,0x26e50));function a176_0x5ca4(_0x3c70e8,_0x4c4f47){_0x3c70e8=_0x3c70e8-0x128;const _0x4398d3=a176_0x4398();let _0x5ca4fd=_0x4398d3[_0x3c70e8];return _0x5ca4fd;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';export const projectDomainRoutingSyncDefinition={'service':a176_0xa5ef43(0x136),'command':a176_0xa5ef43(0x129),'description':a176_0xa5ef43(0x12a),'risk':a176_0xa5ef43(0x12b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(){const _0xad8466=a176_0xa5ef43,_0x21446e=findProjectRootDirectory();if(!resolveConfigPath(_0x21446e))throw CliErrors['validation'](_0xad8466(0x131),_0xad8466(0x139)+CLI_BIN_NAME+_0xad8466(0x12d));const _0x1cd13b=writeProjectDomainRoutingManifest(_0x21446e);return{'ok':!![],'message':_0xad8466(0x13a)+_0x1cd13b[_0xad8466(0x137)],'data':_0x1cd13b};}};function a176_0x4398(){const _0x4a2870=['path','1031280tGbtRJ','Run\x20','Domain\x20routing\x20synchronized:\x20','7146lFgYkJ','48UoSdSa','824417SvakXe','domain-routing-sync','Synchronize\x20the\x20current\x20project\x27s\x20public\x20Domain\x20routing','read','720CXfsWu','\x20workspace\x20init\x20--appcode\x20<code>\x20in\x20the\x20project\x20directory\x20first.','5BBiSej','107847wjePPw','10DUauLq','No\x20Rabetbase\x20project\x20configuration\x20was\x20found.','265524esKFGG','40JqMYRs','7080XSPlAT','154806KtavQQ','project'];a176_0x4398=function(){return _0x4a2870;};return a176_0x4398();}
1
+ const a176_0x307efb=a176_0x375c;(function(_0x486507,_0x296485){const _0x429726=a176_0x375c,_0x519721=_0x486507();while(!![]){try{const _0x1643a4=-parseInt(_0x429726(0x16c))/0x1*(-parseInt(_0x429726(0x16b))/0x2)+-parseInt(_0x429726(0x168))/0x3+-parseInt(_0x429726(0x16d))/0x4+parseInt(_0x429726(0x16a))/0x5*(parseInt(_0x429726(0x163))/0x6)+-parseInt(_0x429726(0x164))/0x7*(parseInt(_0x429726(0x171))/0x8)+parseInt(_0x429726(0x169))/0x9*(parseInt(_0x429726(0x16e))/0xa)+parseInt(_0x429726(0x167))/0xb*(-parseInt(_0x429726(0x166))/0xc);if(_0x1643a4===_0x296485)break;else _0x519721['push'](_0x519721['shift']());}catch(_0x2a3545){_0x519721['push'](_0x519721['shift']());}}}(a176_0xa932,0x269ff));function a176_0x375c(_0x38b531,_0x5bf8e5){_0x38b531=_0x38b531-0x160;const _0xa93237=a176_0xa932();let _0x375c23=_0xa93237[_0x38b531];return _0x375c23;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';function a176_0xa932(){const _0x717ca4=['161OStwOR','\x20workspace\x20init\x20--appcode\x20<code>\x20in\x20the\x20project\x20directory\x20first.','120gONhlj','99033eoAGCa','47400XNbcLg','36BwUsQs','1243605HKbPVU','334VIkLus','1287gUGxdx','1254380qomlsj','747140dgiVcg','read','Run\x20','64304BBChYN','project','validation','No\x20Rabetbase\x20project\x20configuration\x20was\x20found.','Synchronize\x20the\x20current\x20project\x27s\x20public\x20Domain\x20routing','6dTrnvT'];a176_0xa932=function(){return _0x717ca4;};return a176_0xa932();}import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';export const projectDomainRoutingSyncDefinition={'service':a176_0x307efb(0x172),'command':'domain-routing-sync','description':a176_0x307efb(0x162),'risk':a176_0x307efb(0x16f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(){const _0x3b9448=a176_0x307efb,_0x3f6e49=findProjectRootDirectory();if(!resolveConfigPath(_0x3f6e49))throw CliErrors[_0x3b9448(0x160)](_0x3b9448(0x161),_0x3b9448(0x170)+CLI_BIN_NAME+_0x3b9448(0x165));const _0x19cddf=writeProjectDomainRoutingManifest(_0x3f6e49);return{'ok':!![],'message':'Domain\x20routing\x20synchronized:\x20'+_0x19cddf['path'],'data':_0x19cddf};}};
@@ -1 +1 @@
1
- const a177_0x56e73f=a177_0x1b88;(function(_0x2496f6,_0x58ae96){const _0xdd89ea=a177_0x1b88,_0x3e0632=_0x2496f6();while(!![]){try{const _0x228a2f=-parseInt(_0xdd89ea(0x9f))/0x1*(parseInt(_0xdd89ea(0xba))/0x2)+-parseInt(_0xdd89ea(0xb5))/0x3*(parseInt(_0xdd89ea(0xa9))/0x4)+-parseInt(_0xdd89ea(0xb8))/0x5*(parseInt(_0xdd89ea(0xbe))/0x6)+parseInt(_0xdd89ea(0x9c))/0x7+-parseInt(_0xdd89ea(0xb3))/0x8+parseInt(_0xdd89ea(0x97))/0x9*(parseInt(_0xdd89ea(0xa8))/0xa)+parseInt(_0xdd89ea(0xae))/0xb;if(_0x228a2f===_0x58ae96)break;else _0x3e0632['push'](_0x3e0632['shift']());}catch(_0x1461b3){_0x3e0632['push'](_0x3e0632['shift']());}}}(a177_0x387a,0x5e31f));import{CliErrors}from'../../errors.js';function a177_0x387a(){const _0x2b49c2=['cookie','appcode','validation','bool','2112264kZaLLE','trim','7272GYKQnr','write','nonInteractive','20UEdaFb','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','789424vAheTM','boolean','string','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]\x20or\x20','489492LUsALA','name','9SDVrct','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]','args','../../commands/project/create/main.js','Project\x20name','2506672Ferelf','create','Prepared\x20local\x20project\x20template\x20directory','1gsfpjS','template-source','yes','str','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','project','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','Run\x20','Create\x20a\x20new\x20project','7387150NwMkrQ','24LqXZms','current-dir','Usage:\x20','env','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]\x20from\x20the\x20empty\x20target\x20directory.','3174919UYjZVd'];a177_0x387a=function(){return _0x2b49c2;};return a177_0x387a();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';function a177_0x1b88(_0x103c34,_0x12888c){_0x103c34=_0x103c34-0x97;const _0x387afa=a177_0x387a();let _0x1b88d9=_0x387afa[_0x103c34];return _0x1b88d9;}import{projectDomainRoutingSyncDefinition}from'../../commands/project/domain-routing-sync.js';const createFlags=[{'name':a177_0x56e73f(0xbf),'type':a177_0x56e73f(0xbc),'description':a177_0x56e73f(0x9b)},{'name':a177_0x56e73f(0xac),'type':a177_0x56e73f(0xbc),'description':'Target\x20environment'},{'name':a177_0x56e73f(0xb0),'type':a177_0x56e73f(0xbc),'description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'},{'name':a177_0x56e73f(0xaa),'type':a177_0x56e73f(0xbb),'description':'Initialize\x20the\x20current\x20empty\x20directory\x20instead\x20of\x20creating\x20a\x20child\x20directory','default':![]},{'name':a177_0x56e73f(0xa0),'type':a177_0x56e73f(0xbc),'description':a177_0x56e73f(0x9e)}],upgradeFlags=[{'name':a177_0x56e73f(0xa1),'type':a177_0x56e73f(0xbb),'description':'Skip\x20confirmation\x20prompt','default':![]}];export const projectDefinitions=[{'service':a177_0x56e73f(0xa4),'command':a177_0x56e73f(0x9d),'description':a177_0x56e73f(0xa7),'risk':a177_0x56e73f(0xb6),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'project-name','description':a177_0x56e73f(0xa3),'required':![]}],'flags':createFlags,async 'execute'(_0x5316a7){const _0x100821=a177_0x56e73f,{createApp:_0x3e7878}=await import(_0x100821(0x9a)),_0x58fa15=_0x5316a7['str']('name')['trim']()||_0x5316a7[_0x100821(0x99)][0x0]?.['trim'](),_0x5851fd=_0x5316a7[_0x100821(0xa2)](_0x100821(0xac))||undefined,_0x47b4f6=_0x5316a7[_0x100821(0xa2)](_0x100821(0xb0))||undefined,_0xd3577e=_0x5316a7[_0x100821(0xa2)](_0x100821(0xa0))[_0x100821(0xb4)]()||undefined,_0x5e0f1c=_0x5316a7[_0x100821(0xb2)](_0x100821(0xaa));if(_0x5e0f1c&&_0x58fa15)throw CliErrors[_0x100821(0xb1)]('--current-dir\x20cannot\x20be\x20combined\x20with\x20a\x20project\x20name.',_0x100821(0xa6)+CLI_BIN_NAME+_0x100821(0xad));if(_0x5316a7[_0x100821(0xb7)]){if(!_0x58fa15&&!_0x5e0f1c)throw CliErrors[_0x100821(0xb1)](_0x100821(0xb9),_0x100821(0xab)+CLI_BIN_NAME+_0x100821(0xbd)+CLI_BIN_NAME+_0x100821(0x98));await _0x3e7878({'projectCode':_0x58fa15,'appCode':_0x47b4f6,'env':_0x5851fd,'cookie':_0x5316a7[_0x100821(0xaf)],'currentDir':_0x5e0f1c,'nonInteractive':!![],'templateSource':_0xd3577e});}else await _0x3e7878({'projectCode':_0x58fa15,'appCode':_0x47b4f6,'env':_0x5851fd,'cookie':_0x5316a7[_0x100821(0xaf)],'currentDir':_0x5e0f1c,'templateSource':_0xd3577e});return{'ok':!![]};}},projectDomainRoutingSyncDefinition,{'service':'project','command':'upgrade','description':a177_0x56e73f(0xa5),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x289753){const _0x1573a7=a177_0x56e73f;return await upgradeApp(_0x289753[_0x1573a7(0xb7)],{'yes':_0x289753[_0x1573a7(0xb2)](_0x1573a7(0xa1))}),{'ok':!![]};}}];
1
+ const a177_0x1f32c1=a177_0x1a0f;(function(_0x43768b,_0x44d059){const _0x7cb94e=a177_0x1a0f,_0x5c30ce=_0x43768b();while(!![]){try{const _0x5c4141=-parseInt(_0x7cb94e(0x1dd))/0x1*(-parseInt(_0x7cb94e(0x207))/0x2)+-parseInt(_0x7cb94e(0x1fb))/0x3*(-parseInt(_0x7cb94e(0x1fa))/0x4)+parseInt(_0x7cb94e(0x1f5))/0x5*(-parseInt(_0x7cb94e(0x1f9))/0x6)+-parseInt(_0x7cb94e(0x204))/0x7*(parseInt(_0x7cb94e(0x1f0))/0x8)+-parseInt(_0x7cb94e(0x1fe))/0x9*(-parseInt(_0x7cb94e(0x1df))/0xa)+parseInt(_0x7cb94e(0x1fd))/0xb*(-parseInt(_0x7cb94e(0x1f4))/0xc)+parseInt(_0x7cb94e(0x1f7))/0xd;if(_0x5c4141===_0x44d059)break;else _0x5c30ce['push'](_0x5c30ce['shift']());}catch(_0x4c4e57){_0x5c30ce['push'](_0x5c30ce['shift']());}}}(a177_0x14d1,0x1b099));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';function a177_0x14d1(){const _0x408c69=['boolean','Prepared\x20local\x20project\x20template\x20directory','Run\x20','Create\x20a\x20new\x20project','77IVQeuv','bool','upgrade','2sgPxvM','cookie','75441YabzLx','--current-dir\x20cannot\x20be\x20combined\x20with\x20a\x20project\x20name.','794290UoWwTC','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]\x20from\x20the\x20empty\x20target\x20directory.','current-dir','string','template-source','../../commands/project/create/main.js','trim','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]\x20or\x20','nonInteractive','name','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]','Target\x20environment','project','validation','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','create','str','134240JPbbTa','Initialize\x20the\x20current\x20empty\x20directory\x20instead\x20of\x20creating\x20a\x20child\x20directory','yes','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','252732BfTvks','5AXrLvu','project-name','3258710mbhjgG','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','945426xmEMbh','273668yvZyre','3DpGZaK','write','11UxznGM','9hhdbza','env'];a177_0x14d1=function(){return _0x408c69;};return a177_0x14d1();}function a177_0x1a0f(_0x24e0d9,_0x14ea52){_0x24e0d9=_0x24e0d9-0x1dc;const _0x14d19c=a177_0x14d1();let _0x1a0fa4=_0x14d19c[_0x24e0d9];return _0x1a0fa4;}import{projectDomainRoutingSyncDefinition}from'../../commands/project/domain-routing-sync.js';const createFlags=[{'name':a177_0x1f32c1(0x1e8),'type':a177_0x1f32c1(0x1e2),'description':'Project\x20name'},{'name':a177_0x1f32c1(0x1ff),'type':a177_0x1f32c1(0x1e2),'description':a177_0x1f32c1(0x1ea)},{'name':'appcode','type':'string','description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'},{'name':a177_0x1f32c1(0x1e1),'type':'boolean','description':a177_0x1f32c1(0x1f1),'default':![]},{'name':'template-source','type':'string','description':a177_0x1f32c1(0x201)}],upgradeFlags=[{'name':a177_0x1f32c1(0x1f2),'type':a177_0x1f32c1(0x200),'description':'Skip\x20confirmation\x20prompt','default':![]}];export const projectDefinitions=[{'service':'project','command':a177_0x1f32c1(0x1ee),'description':a177_0x1f32c1(0x203),'risk':a177_0x1f32c1(0x1fc),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a177_0x1f32c1(0x1f6),'description':a177_0x1f32c1(0x1ed),'required':![]}],'flags':createFlags,async 'execute'(_0x3ff50c){const _0x5a16ae=a177_0x1f32c1,{createApp:_0x99ec9}=await import(_0x5a16ae(0x1e4)),_0x33b2a8=_0x3ff50c['str']('name')['trim']()||_0x3ff50c['args'][0x0]?.[_0x5a16ae(0x1e5)](),_0x366592=_0x3ff50c[_0x5a16ae(0x1ef)]('env')||undefined,_0x21ccbd=_0x3ff50c[_0x5a16ae(0x1ef)]('appcode')||undefined,_0x22626e=_0x3ff50c[_0x5a16ae(0x1ef)](_0x5a16ae(0x1e3))[_0x5a16ae(0x1e5)]()||undefined,_0x1975c0=_0x3ff50c[_0x5a16ae(0x205)](_0x5a16ae(0x1e1));if(_0x1975c0&&_0x33b2a8)throw CliErrors[_0x5a16ae(0x1ec)](_0x5a16ae(0x1de),_0x5a16ae(0x202)+CLI_BIN_NAME+_0x5a16ae(0x1e0));if(_0x3ff50c[_0x5a16ae(0x1e7)]){if(!_0x33b2a8&&!_0x1975c0)throw CliErrors[_0x5a16ae(0x1ec)](_0x5a16ae(0x1f3),'Usage:\x20'+CLI_BIN_NAME+_0x5a16ae(0x1e6)+CLI_BIN_NAME+_0x5a16ae(0x1e9));await _0x99ec9({'projectCode':_0x33b2a8,'appCode':_0x21ccbd,'env':_0x366592,'cookie':_0x3ff50c[_0x5a16ae(0x1dc)],'currentDir':_0x1975c0,'nonInteractive':!![],'templateSource':_0x22626e});}else await _0x99ec9({'projectCode':_0x33b2a8,'appCode':_0x21ccbd,'env':_0x366592,'cookie':_0x3ff50c[_0x5a16ae(0x1dc)],'currentDir':_0x1975c0,'templateSource':_0x22626e});return{'ok':!![]};}},projectDomainRoutingSyncDefinition,{'service':a177_0x1f32c1(0x1eb),'command':a177_0x1f32c1(0x206),'description':a177_0x1f32c1(0x1f8),'risk':a177_0x1f32c1(0x1fc),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x412c6c){const _0x3028ff=a177_0x1f32c1;return await upgradeApp(_0x412c6c[_0x3028ff(0x1e7)],{'yes':_0x412c6c[_0x3028ff(0x205)]('yes')}),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a178_0x30f31b=a178_0x36b7;function a178_0x56f0(){const _0x3bf6cb=['FAIL','Skill\x20swap:','gray','red','\x20\x20#\x20or','Step\x206/7:\x20Installing\x20new\x20skill...','utf8','\x20\x20Fields\x20to\x20migrate:\x20','\x20→\x20keys:\x20','oldPath','cwd','80wrszSK','string','failed','done','cyan','error','skipped','Remove\x20.lovrabet/','join','mcpServers','7xRyzLR','Clean\x20MCP\x20config','@lovrabet/dataset-mcp-server','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','not\x20found\x20(will\x20create)','sdkUpgrade','bold','isArray','push','\x20(backup:\x20','@lovrabet/sdk','2183910OHkRkA','info','already\x20exists\x20(will\x20merge)','detail','keys','Step\x201/7:\x20Config\x20migration\x20—\x20','===\x20Upgrade\x20Analysis\x20===','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','\x20\x20bun\x20install','Step\x201/7:\x20Migrating\x20config...','1391XnYZSx','undefined','message','20csVCmQ','.bak','2vnBDjH','\x20from\x20','hasNewConfig','\x20\x20Current\x20version\x20in\x20','Upgrade\x20cancelled.','no\x20legacy\x20entry','===\x20Upgrade\x20Summary\x20===','stringify','.lovrabet.json','1235632BTzONA','.lovrabet','not\x20needed','needed','values','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','start','some','skipped\x20(no\x20legacy\x20config)','no\x20matching\x20entry\x20found','log','succeed','args','removed\x20','inherit','Proceed\x20with\x20upgrade?','Step\x204/7:\x20MCP\x20config\x20—\x20','status','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','dependencies','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','not\x20found\x20or\x20already\x20at\x20latest','MCP\x20config:','871101pmscGl','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','\x20\x20Action:\x20delete','yes','path','no\x20legacy\x20config\x20found','fail','oldArtifacts','package.json','\x20\x20\x20\x20\x20\x20\x20','fields','\x20→\x20','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','\x20\x20New\x20config\x20(.rabetbase.json):\x20','length','Upgrade\x20completed\x20successfully!','step','9GlGGAa','784232dCTRlM','\x20removed\x20(','\x20→\x20latest','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','139452cqqIUY','151020UMLruX','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','devDependencies','object','white','includes','green','\x20removed','label','FOUND','files','oldMcpConfig','Step\x204/7:\x20Cleaning\x20MCP\x20config...','isDirectory','@lovrabet/sdk:','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','configMigration','Remove\x20old\x20skill','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','parse','Upgrade\x20@lovrabet/sdk','Config\x20migration','Legacy\x20artifacts:','2859972KgITkB','Step\x205/7:\x20Removing\x20old\x20skill...','Config\x20file:','[\x22@lovrabet/sdk\x22]:\x20','entries','Remove\x20legacy\x20artifacts','yellow','latest'];a178_0x56f0=function(){return _0x3bf6cb;};return a178_0x56f0();}(function(_0x5194b9,_0x415ca8){const _0x59f85e=a178_0x36b7,_0x44b246=_0x5194b9();while(!![]){try{const _0x27a551=parseInt(_0x59f85e(0x79))/0x1*(-parseInt(_0x59f85e(0xab))/0x2)+parseInt(_0x59f85e(0xaa))/0x3*(parseInt(_0x59f85e(0x82))/0x4)+-parseInt(_0x59f85e(0xf0))/0x5+-parseInt(_0x59f85e(0xc8))/0x6*(parseInt(_0x59f85e(0xe5))/0x7)+parseInt(_0x59f85e(0xdb))/0x8*(parseInt(_0x59f85e(0xb0))/0x9)+-parseInt(_0x59f85e(0x77))/0xa*(parseInt(_0x59f85e(0x99))/0xb)+parseInt(_0x59f85e(0xaf))/0xc*(parseInt(_0x59f85e(0xfa))/0xd);if(_0x27a551===_0x415ca8)break;else _0x44b246['push'](_0x44b246['shift']());}catch(_0x28dc89){_0x44b246['push'](_0x44b246['shift']());}}}(a178_0x56f0,0x75a79));import a178_0x4b0b44 from'chalk';import a178_0xbe745c 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=[a178_0x30f31b(0x81),'.lovrabetrc'];function collectIdeSkillFiles(_0x183b9a){const _0x352493=a178_0x30f31b,_0x4a83bb=[];for(const _0x5736bf of Object[_0x352493(0x86)](CORE_IDE_CONFIGS)){if(_0x5736bf[_0x352493(0xba)])for(const _0x1f83d8 of _0x5736bf[_0x352493(0xba)]){_0x4a83bb[_0x352493(0xed)](resolve(_0x183b9a,_0x1f83d8[_0x352493(0x9d)]));}}return _0x4a83bb;}function analyse(_0x5f4a34){const _0x150d8c=a178_0x30f31b;let _0x1460bd=null;const _0x510953=resolve(_0x5f4a34,NEW_CONFIG_NAME),_0x1a8b4f=existsSync(_0x510953);for(const _0x3f20e1 of LEGACY_CONFIG_NAMES){const _0x1c4d6a=resolve(_0x5f4a34,_0x3f20e1);if(existsSync(_0x1c4d6a)){const _0x30653c=readConfigFile(_0x1c4d6a),_0x55bda6=Object[_0x150d8c(0xf4)](_0x30653c)['filter'](_0x384351=>typeof _0x30653c[_0x384351]!==_0x150d8c(0x75));_0x1460bd={'oldPath':_0x1c4d6a,'hasNewConfig':_0x1a8b4f,'fields':_0x55bda6};break;}}const _0x17b5da=[],_0x51974b=resolve(_0x5f4a34,_0x150d8c(0x83));if(existsSync(_0x51974b))_0x17b5da[_0x150d8c(0xed)](_0x51974b);const _0x3512bf=resolve(_0x5f4a34,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x3512bf))_0x17b5da[_0x150d8c(0xed)](_0x3512bf);const _0x3be91b=resolve(_0x5f4a34,'.claude/skills/lovrabet');if(existsSync(_0x3be91b))_0x17b5da['push'](_0x3be91b);for(const _0x4af730 of collectIdeSkillFiles(_0x5f4a34)){if(existsSync(_0x4af730))_0x17b5da['push'](_0x4af730);}let _0x42480e=null;const _0x4db023=resolve(_0x5f4a34,'.cursor/mcp.json');if(existsSync(_0x4db023))try{const _0x29be22=JSON['parse'](readFileSync(_0x4db023,_0x150d8c(0xd6)));if(_0x29be22?.[_0x150d8c(0xe4)]&&typeof _0x29be22['mcpServers']===_0x150d8c(0xb3)){const _0x6b9e63=[];for(const [_0x4e6c77,_0x5cf585]of Object['entries'](_0x29be22['mcpServers'])){const _0xa1a5b2=_0x5cf585;_0xa1a5b2?.[_0x150d8c(0x8e)]&&Array[_0x150d8c(0xec)](_0xa1a5b2[_0x150d8c(0x8e)])&&_0xa1a5b2[_0x150d8c(0x8e)][_0x150d8c(0x89)](_0x2cacb1=>typeof _0x2cacb1===_0x150d8c(0xdc)&&_0x2cacb1[_0x150d8c(0xb5)](_0x150d8c(0xe7)))&&_0x6b9e63[_0x150d8c(0xed)](_0x4e6c77);}_0x6b9e63['length']>0x0&&(_0x42480e={'path':_0x4db023,'keys':_0x6b9e63});}}catch{}const _0x9e1974=_0x17b5da[_0x150d8c(0xa7)]>0x0||_0x1460bd!==null;let _0x292a3e=null;const _0x22840d=resolve(_0x5f4a34,_0x150d8c(0xa1));if(existsSync(_0x22840d))try{const _0x4960f1=JSON[_0x150d8c(0xc4)](readFileSync(_0x22840d,_0x150d8c(0xd6)));for(const _0xa1f3e of[_0x150d8c(0x95),_0x150d8c(0xb2)]){const _0x727643=_0x4960f1?.[_0xa1f3e]?.[_0x150d8c(0xef)];if(typeof _0x727643===_0x150d8c(0xdc)){_0x727643!==_0x150d8c(0xcf)&&(_0x292a3e={'pkgPath':_0x22840d,'currentVersion':_0x727643,'field':_0xa1f3e});break;}}}catch{}return{'configMigration':_0x1460bd,'oldArtifacts':_0x17b5da,'oldMcpConfig':_0x42480e,'needsSkillSwap':_0x9e1974,'sdkUpgrade':_0x292a3e};}function a178_0x36b7(_0x26bf8e,_0x52d3c7){_0x26bf8e=_0x26bf8e-0x75;const _0x56f03f=a178_0x56f0();let _0x36b73e=_0x56f03f[_0x26bf8e];return _0x36b73e;}function printReport(_0x457a01){const _0x4e9b80=a178_0x30f31b,{configMigration:_0x20907e,oldArtifacts:_0x267a63,oldMcpConfig:_0x3ce850,needsSkillSwap:_0x506dcd}=_0x457a01;console['log'](''),console['log'](a178_0x4b0b44[_0x4e9b80(0xeb)](_0x4e9b80(0xf6))),console[_0x4e9b80(0x8c)]('');_0x20907e?(console['log'](a178_0x4b0b44[_0x4e9b80(0xdf)](_0x4e9b80(0xca))+('\x20\x20'+a178_0x4b0b44[_0x4e9b80(0xce)](_0x20907e[_0x4e9b80(0xd9)]))),console[_0x4e9b80(0x8c)](_0x4e9b80(0xa6)+(_0x20907e['hasNewConfig']?a178_0x4b0b44['green'](_0x4e9b80(0xf2)):a178_0x4b0b44['gray'](_0x4e9b80(0xe9)))),console[_0x4e9b80(0x8c)](_0x4e9b80(0xd7)+_0x20907e[_0x4e9b80(0xa3)][_0x4e9b80(0xe3)](',\x20')),console['log']('\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak')):console[_0x4e9b80(0x8c)](a178_0x4b0b44[_0x4e9b80(0xdf)](_0x4e9b80(0xca))+'\x20\x20'+a178_0x4b0b44[_0x4e9b80(0xd2)](_0x4e9b80(0x9e)));console[_0x4e9b80(0x8c)]('');if(_0x267a63['length']>0x0){console['log'](a178_0x4b0b44[_0x4e9b80(0xdf)](_0x4e9b80(0xc7)));for(const _0x261b84 of _0x267a63){console[_0x4e9b80(0x8c)]('\x20\x20'+a178_0x4b0b44['red'](_0x4e9b80(0xb9))+'\x20\x20'+_0x261b84);}console['log'](_0x4e9b80(0x9b));}else console[_0x4e9b80(0x8c)](a178_0x4b0b44[_0x4e9b80(0xdf)](_0x4e9b80(0xc7))+'\x20\x20'+a178_0x4b0b44['gray']('none\x20found'));console[_0x4e9b80(0x8c)]('');_0x3ce850?(console[_0x4e9b80(0x8c)](a178_0x4b0b44[_0x4e9b80(0xdf)](_0x4e9b80(0x98))+('\x20\x20'+a178_0x4b0b44[_0x4e9b80(0xce)](_0x3ce850['path'])+_0x4e9b80(0xd8)+_0x3ce850[_0x4e9b80(0xf4)][_0x4e9b80(0xe3)](',\x20'))),console['log'](_0x4e9b80(0xa5))):console['log'](a178_0x4b0b44['cyan'](_0x4e9b80(0x98))+'\x20\x20'+a178_0x4b0b44[_0x4e9b80(0xd2)](_0x4e9b80(0x7e)));console[_0x4e9b80(0x8c)](''),console[_0x4e9b80(0x8c)](a178_0x4b0b44[_0x4e9b80(0xdf)](_0x4e9b80(0xd1))+('\x20\x20'+(_0x506dcd?a178_0x4b0b44[_0x4e9b80(0xce)](_0x4e9b80(0x85)):a178_0x4b0b44['green'](_0x4e9b80(0x84)))));_0x506dcd&&console['log'](_0x4e9b80(0x9a)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console['log']('');if(_0x457a01[_0x4e9b80(0xea)]){const {currentVersion:_0x3d2b08,field:_0xc7d2a4,pkgPath:_0x5170ed}=_0x457a01[_0x4e9b80(0xea)];console[_0x4e9b80(0x8c)](a178_0x4b0b44[_0x4e9b80(0xdf)](_0x4e9b80(0xbe))+('\x20\x20'+a178_0x4b0b44['yellow'](_0x5170ed))),console[_0x4e9b80(0x8c)](_0x4e9b80(0x7c)+_0xc7d2a4+':\x20'+a178_0x4b0b44[_0x4e9b80(0xce)](_0x3d2b08)+_0x4e9b80(0xa4)+a178_0x4b0b44['green'](_0x4e9b80(0xcf))),console[_0x4e9b80(0x8c)]('\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)');}else console[_0x4e9b80(0x8c)](a178_0x4b0b44[_0x4e9b80(0xdf)](_0x4e9b80(0xbe))+'\x20\x20'+a178_0x4b0b44['gray'](_0x4e9b80(0x97)));console[_0x4e9b80(0x8c)]('');}function execConfigMigration(_0x7721c6,_0x3e07a6){const _0x28d873=a178_0x30f31b,{configMigration:_0x10530a}=_0x7721c6;if(!_0x10530a?.['oldPath'])return{'step':0x1,'label':_0x28d873(0xc6),'ok':!![],'detail':_0x28d873(0x8a)};const _0x538885=readConfigFile(_0x10530a[_0x28d873(0xd9)]),_0x4c5c4b=resolve(_0x3e07a6,NEW_CONFIG_NAME),_0x1dbab5=_0x10530a[_0x28d873(0x7b)]?readConfigFile(_0x4c5c4b):{};for(const [_0x42d433,_0xd0a6ff]of Object[_0x28d873(0xcc)](_0x538885)){!(_0x42d433 in _0x1dbab5)&&(_0x1dbab5[_0x42d433]=_0xd0a6ff);}writeConfigFile(_0x4c5c4b,_0x1dbab5);const _0x5a0ff3=_0x10530a['oldPath']+_0x28d873(0x78);return renameSync(_0x10530a[_0x28d873(0xd9)],_0x5a0ff3),{'step':0x1,'label':_0x28d873(0xc6),'ok':!![],'detail':_0x10530a[_0x28d873(0xd9)]+'\x20→\x20'+_0x4c5c4b+_0x28d873(0xee)+_0x5a0ff3+')'};}function execRemoveOldArtifacts(_0x362060){const _0x1ae349=a178_0x30f31b,_0x2f901f=[];for(const _0x3e2c0c of _0x362060){try{if(!existsSync(_0x3e2c0c))continue;const _0x3e457f=tryStat(_0x3e2c0c);_0x3e457f?.[_0x1ae349(0xbd)]()?rmSync(_0x3e2c0c,{'recursive':!![],'force':!![]}):unlinkSync(_0x3e2c0c);}catch(_0x1f8e95){_0x2f901f[_0x1ae349(0xed)](_0x3e2c0c+':\x20'+_0x1f8e95[_0x1ae349(0x76)]);}}return{'step':0x3,'label':_0x1ae349(0xcd),'ok':_0x2f901f[_0x1ae349(0xa7)]===0x0,'detail':_0x2f901f[_0x1ae349(0xa7)]>0x0?_0x362060[_0x1ae349(0xa7)]-_0x2f901f[_0x1ae349(0xa7)]+'/'+_0x362060[_0x1ae349(0xa7)]+_0x1ae349(0xac)+_0x2f901f['join'](';\x20')+')':_0x362060[_0x1ae349(0xa7)]+_0x1ae349(0xb7)};}function execCleanMcp(_0x235dee){const _0x261770=a178_0x30f31b;if(!_0x235dee[_0x261770(0xbb)])return{'step':0x4,'label':_0x261770(0xe6),'ok':!![],'detail':_0x261770(0xe1)};try{const _0x1207ef=readFileSync(_0x235dee['oldMcpConfig']['path'],_0x261770(0xd6)),_0x595450=JSON[_0x261770(0xc4)](_0x1207ef);if(_0x595450?.['mcpServers']&&typeof _0x595450[_0x261770(0xe4)]===_0x261770(0xb3)){const _0xc719aa=[];for(const [_0x1a0214,_0x496834]of Object[_0x261770(0xcc)](_0x595450[_0x261770(0xe4)])){_0x496834?.[_0x261770(0x8e)]&&Array[_0x261770(0xec)](_0x496834[_0x261770(0x8e)])&&_0x496834[_0x261770(0x8e)]['some'](_0x2e3d17=>typeof _0x2e3d17===_0x261770(0xdc)&&_0x2e3d17[_0x261770(0xb5)](_0x261770(0xe7)))&&_0xc719aa['push'](_0x1a0214);}for(const _0x40ba6e of _0xc719aa){delete _0x595450['mcpServers'][_0x40ba6e];}return _0xc719aa[_0x261770(0xa7)]>0x0&&writeFileSync(_0x235dee[_0x261770(0xbb)][_0x261770(0x9d)],JSON[_0x261770(0x80)](_0x595450,null,0x2)+'\x0a',_0x261770(0xd6)),{'step':0x4,'label':_0x261770(0xe6),'ok':!![],'detail':_0x261770(0x8f)+_0xc719aa[_0x261770(0xe3)](',\x20')+_0x261770(0x7a)+_0x235dee[_0x261770(0xbb)][_0x261770(0x9d)]};}return{'step':0x4,'label':_0x261770(0xe6),'ok':!![],'detail':_0x261770(0x8b)};}catch(_0x2a3aed){return{'step':0x4,'label':_0x261770(0xe6),'ok':![],'detail':_0x2a3aed['message']};}}function execSkillsRemove(_0x1df977,_0x939d09){const _0x1cbdf9=a178_0x30f31b,_0x1940b5=runNpxSkillsRemove(_0x1df977,{'stdio':_0x1cbdf9(0x90),'yes':_0x939d09});return{'step':0x5,'label':_0x1cbdf9(0xc2),'ok':_0x1940b5['ok'],'detail':_0x1940b5['ok']?'lovrabet/lovrabet-skill\x20removed':_0x1940b5['error']??'exit\x20'+_0x1940b5[_0x1cbdf9(0x93)]};}function execSkillsAdd(_0x53cb87,_0xe06067){const _0x553f7d=a178_0x30f31b,_0x3f8896=runNpxSkillsAddGlobal(_0x53cb87,'lovrabet/rabetbase',{'stdio':'inherit','yes':_0xe06067});return{'step':0x6,'label':'Install\x20new\x20skill','ok':_0x3f8896['ok'],'detail':_0x3f8896['ok']?'lovrabet/rabetbase\x20installed\x20globally':_0x3f8896[_0x553f7d(0xe0)]??'exit\x20'+_0x3f8896[_0x553f7d(0x93)]};}function execUpgradeSdk(_0x575b55){const _0x43b7f0=a178_0x30f31b;if(!_0x575b55['sdkUpgrade'])return{'step':0x7,'label':_0x43b7f0(0xc5),'ok':!![],'detail':_0x43b7f0(0x96)};const {pkgPath:_0x49eb13,currentVersion:_0x40f441,field:_0x55e87b}=_0x575b55['sdkUpgrade'];try{const _0x57dae4=readFileSync(_0x49eb13,'utf8'),_0x5226ad=JSON[_0x43b7f0(0xc4)](_0x57dae4);return _0x5226ad[_0x55e87b][_0x43b7f0(0xef)]=_0x43b7f0(0xcf),writeFileSync(_0x49eb13,JSON[_0x43b7f0(0x80)](_0x5226ad,null,0x2)+'\x0a','utf8'),{'step':0x7,'label':_0x43b7f0(0xc5),'ok':!![],'detail':_0x55e87b+_0x43b7f0(0xcb)+_0x40f441+_0x43b7f0(0xad)};}catch(_0x590da5){return{'step':0x7,'label':_0x43b7f0(0xc5),'ok':![],'detail':_0x590da5[_0x43b7f0(0x76)]};}}function tryStat(_0x353338){try{return statSync(_0x353338);}catch{return undefined;}}function printSummary(_0x2b331a){const _0x5f531f=a178_0x30f31b;console[_0x5f531f(0x8c)](''),console[_0x5f531f(0x8c)](a178_0x4b0b44[_0x5f531f(0xeb)](_0x5f531f(0x7f))),console[_0x5f531f(0x8c)]('');for(const _0x379433 of _0x2b331a){const _0x1401bb=_0x379433['ok']?a178_0x4b0b44[_0x5f531f(0xb6)]('OK'):a178_0x4b0b44[_0x5f531f(0xd3)](_0x5f531f(0xd0));console['log']('\x20\x20'+_0x1401bb+'\x20\x20Step\x20'+_0x379433[_0x5f531f(0xa9)]+':\x20'+_0x379433[_0x5f531f(0xb8)]);if(_0x379433['detail'])console[_0x5f531f(0x8c)](_0x5f531f(0xa2)+a178_0x4b0b44[_0x5f531f(0xd2)](_0x379433[_0x5f531f(0xf3)]));}console[_0x5f531f(0x8c)]('');}export async function upgradeApp(_0x58cefe,_0x3c6d62){const _0x5af07a=a178_0x30f31b,_0x416cb2=process[_0x5af07a(0xda)](),_0x588e82=analyse(_0x416cb2),_0xf162ba=!_0x588e82[_0x5af07a(0xc1)]&&_0x588e82[_0x5af07a(0xa0)][_0x5af07a(0xa7)]===0x0&&!_0x588e82[_0x5af07a(0xbb)]&&!_0x588e82['needsSkillSwap']&&!_0x588e82[_0x5af07a(0xea)];if(_0xf162ba){console[_0x5af07a(0x8c)](a178_0x4b0b44[_0x5af07a(0xb6)](_0x5af07a(0xb1)));return;}printReport(_0x588e82);const _0x4bd5f8=!!(_0x3c6d62[_0x5af07a(0x9c)]||_0x3c6d62['Y']||_0x58cefe);if(!_0x4bd5f8)try{const _0x2acb4c=await askConfirm(_0x5af07a(0x91));if(!_0x2acb4c){console[_0x5af07a(0x8c)](a178_0x4b0b44[_0x5af07a(0xd2)]('Upgrade\x20cancelled.'));return;}}catch(_0xa356bd){if(_0xa356bd?.[_0x5af07a(0x76)]==='CANCEL'){console['log'](a178_0x4b0b44['gray'](_0x5af07a(0x7d)));return;}throw _0xa356bd;}const _0x5af1e4=[],_0x4935a9=a178_0xbe745c({'text':_0x5af07a(0xf9),'color':'cyan'})['start'](),_0x4072eb=execConfigMigration(_0x588e82,_0x416cb2);_0x5af1e4[_0x5af07a(0xed)](_0x4072eb),_0x4935a9[_0x4072eb['ok']?_0x5af07a(0x8d):_0x5af07a(0x9f)](_0x5af07a(0xf5)+(_0x4072eb['detail']??(_0x4072eb['ok']?'done':_0x5af07a(0xdd))));const _0x599903=resolve(_0x416cb2,'.lovrabet'),_0x3b6c3a=a178_0xbe745c({'text':_0x5af07a(0xbf),'color':_0x5af07a(0xdf)})[_0x5af07a(0x88)]();if(existsSync(_0x599903))try{rmSync(_0x599903,{'recursive':!![],'force':!![]}),_0x3b6c3a[_0x5af07a(0x8d)](_0x5af07a(0xe8)),_0x5af1e4['push']({'step':0x2,'label':_0x5af07a(0xe2),'ok':!![]});}catch(_0x468e0a){_0x3b6c3a[_0x5af07a(0x9f)](_0x5af07a(0xc0)+_0x468e0a[_0x5af07a(0x76)]),_0x5af1e4[_0x5af07a(0xed)]({'step':0x2,'label':_0x5af07a(0xe2),'ok':![],'detail':_0x468e0a['message']});}else _0x3b6c3a[_0x5af07a(0xf1)](_0x5af07a(0xf7)),_0x5af1e4[_0x5af07a(0xed)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![],'detail':_0x5af07a(0xe1)});const _0x345f5e=a178_0xbe745c({'text':_0x5af07a(0x94),'color':'cyan'})[_0x5af07a(0x88)](),_0x35f0d4=execRemoveOldArtifacts(_0x588e82['oldArtifacts']);_0x5af1e4[_0x5af07a(0xed)](_0x35f0d4),_0x345f5e[_0x35f0d4['ok']?'succeed':_0x5af07a(0x9f)](_0x5af07a(0xc3)+(_0x35f0d4['detail']??(_0x35f0d4['ok']?'done':_0x5af07a(0xdd))));const _0x3fbd61=a178_0xbe745c({'text':_0x5af07a(0xbc),'color':_0x5af07a(0xdf)})[_0x5af07a(0x88)](),_0x3cf643=execCleanMcp(_0x588e82);_0x5af1e4['push'](_0x3cf643),_0x3fbd61[_0x3cf643['ok']?_0x5af07a(0x8d):_0x5af07a(0x9f)](_0x5af07a(0x92)+(_0x3cf643[_0x5af07a(0xf3)]??(_0x3cf643['ok']?_0x5af07a(0xde):_0x5af07a(0xdd))));const _0x3ca7c6=a178_0xbe745c({'text':_0x5af07a(0xc9),'color':_0x5af07a(0xdf)})[_0x5af07a(0x88)](),_0x53c314=execSkillsRemove(_0x416cb2,_0x4bd5f8);_0x5af1e4[_0x5af07a(0xed)](_0x53c314),_0x3ca7c6[_0x53c314['ok']?_0x5af07a(0x8d):_0x5af07a(0x9f)]('Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20'+(_0x53c314['detail']??(_0x53c314['ok']?_0x5af07a(0xde):'failed')));const _0x42020d=a178_0xbe745c({'text':_0x5af07a(0xd5),'color':_0x5af07a(0xdf)})[_0x5af07a(0x88)](),_0x49dc36=execSkillsAdd(_0x416cb2,_0x4bd5f8);_0x5af1e4[_0x5af07a(0xed)](_0x49dc36),_0x42020d[_0x49dc36['ok']?_0x5af07a(0x8d):'fail']('Step\x206/7:\x20Install\x20new\x20skill\x20—\x20'+(_0x49dc36[_0x5af07a(0xf3)]??(_0x49dc36['ok']?'done':'failed')));const _0x39be0a=a178_0xbe745c({'text':_0x5af07a(0x87),'color':'cyan'})[_0x5af07a(0x88)](),_0x3cfc5b=execUpgradeSdk(_0x588e82);_0x5af1e4['push'](_0x3cfc5b),_0x39be0a[_0x3cfc5b['ok']?_0x5af07a(0x8d):_0x5af07a(0x9f)]('Step\x207/7:\x20@lovrabet/sdk\x20—\x20'+(_0x3cfc5b['detail']??(_0x3cfc5b['ok']?_0x5af07a(0xde):'failed'))),printSummary(_0x5af1e4);const _0x30c513=_0x5af1e4[_0x5af07a(0x89)](_0x39899d=>!_0x39899d['ok']);_0x30c513?console[_0x5af07a(0x8c)](a178_0x4b0b44['yellow']('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console[_0x5af07a(0x8c)](a178_0x4b0b44[_0x5af07a(0xb6)](_0x5af07a(0xa8))),_0x3cfc5b['ok']&&_0x588e82[_0x5af07a(0xea)]&&(console[_0x5af07a(0x8c)](''),console['log'](a178_0x4b0b44[_0x5af07a(0xeb)][_0x5af07a(0xdf)](_0x5af07a(0xae))),console[_0x5af07a(0x8c)](a178_0x4b0b44[_0x5af07a(0xdf)]('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x5af07a(0x8c)](''),console['log'](a178_0x4b0b44[_0x5af07a(0xb4)]('\x20\x20npm\x20install')),console[_0x5af07a(0x8c)](a178_0x4b0b44[_0x5af07a(0xb4)](_0x5af07a(0xd4))),console['log'](a178_0x4b0b44[_0x5af07a(0xb4)](_0x5af07a(0xf8))),console[_0x5af07a(0x8c)](''));}
1
+ const a178_0x567882=a178_0x28e0;(function(_0x3cf5c8,_0x4bef32){const _0x3b62ac=a178_0x28e0,_0x5b2748=_0x3cf5c8();while(!![]){try{const _0x535742=parseInt(_0x3b62ac(0xe2))/0x1+-parseInt(_0x3b62ac(0xd3))/0x2*(parseInt(_0x3b62ac(0xc8))/0x3)+parseInt(_0x3b62ac(0xfe))/0x4+parseInt(_0x3b62ac(0x11c))/0x5*(parseInt(_0x3b62ac(0xc7))/0x6)+-parseInt(_0x3b62ac(0xd2))/0x7+parseInt(_0x3b62ac(0xfd))/0x8+parseInt(_0x3b62ac(0xff))/0x9*(-parseInt(_0x3b62ac(0xe8))/0xa);if(_0x535742===_0x4bef32)break;else _0x5b2748['push'](_0x5b2748['shift']());}catch(_0x29217a){_0x5b2748['push'](_0x5b2748['shift']());}}}(a178_0x3069,0x6bd31));import a178_0x521e32 from'chalk';function a178_0x28e0(_0x1e6ddf,_0x623363){_0x1e6ddf=_0x1e6ddf-0x9f;const _0x306947=a178_0x3069();let _0x28e094=_0x306947[_0x1e6ddf];return _0x28e094;}import a178_0x56b65b 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=[a178_0x567882(0xe4),a178_0x567882(0xbc)];function collectIdeSkillFiles(_0x594e69){const _0x1405ff=a178_0x567882,_0x33e539=[];for(const _0x48ca24 of Object[_0x1405ff(0x11a)](CORE_IDE_CONFIGS)){if(_0x48ca24['files'])for(const _0x2037b6 of _0x48ca24[_0x1405ff(0xc4)]){_0x33e539[_0x1405ff(0x11b)](resolve(_0x594e69,_0x2037b6[_0x1405ff(0xac)]));}}return _0x33e539;}function analyse(_0x2d61ff){const _0x23eb70=a178_0x567882;let _0x415b26=null;const _0x5a65aa=resolve(_0x2d61ff,NEW_CONFIG_NAME),_0x247a80=existsSync(_0x5a65aa);for(const _0x37ce8e of LEGACY_CONFIG_NAMES){const _0x52cbe1=resolve(_0x2d61ff,_0x37ce8e);if(existsSync(_0x52cbe1)){const _0x2ae112=readConfigFile(_0x52cbe1),_0x14763f=Object[_0x23eb70(0xef)](_0x2ae112)['filter'](_0x3bf85d=>typeof _0x2ae112[_0x3bf85d]!==_0x23eb70(0xc6));_0x415b26={'oldPath':_0x52cbe1,'hasNewConfig':_0x247a80,'fields':_0x14763f};break;}}const _0x406d56=[],_0x9159ba=resolve(_0x2d61ff,_0x23eb70(0xb0));if(existsSync(_0x9159ba))_0x406d56['push'](_0x9159ba);const _0x35f5fc=resolve(_0x2d61ff,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x35f5fc))_0x406d56[_0x23eb70(0x11b)](_0x35f5fc);const _0x52010c=resolve(_0x2d61ff,_0x23eb70(0x10b));if(existsSync(_0x52010c))_0x406d56[_0x23eb70(0x11b)](_0x52010c);for(const _0x3558ef of collectIdeSkillFiles(_0x2d61ff)){if(existsSync(_0x3558ef))_0x406d56[_0x23eb70(0x11b)](_0x3558ef);}let _0x4d8ac2=null;const _0xaf1f39=resolve(_0x2d61ff,_0x23eb70(0xa0));if(existsSync(_0xaf1f39))try{const _0x4533f5=JSON[_0x23eb70(0xa8)](readFileSync(_0xaf1f39,_0x23eb70(0xe1)));if(_0x4533f5?.[_0x23eb70(0xd1)]&&typeof _0x4533f5[_0x23eb70(0xd1)]===_0x23eb70(0xf3)){const _0x3f164c=[];for(const [_0x46a09d,_0x3e9fac]of Object[_0x23eb70(0x9f)](_0x4533f5['mcpServers'])){const _0x161c99=_0x3e9fac;_0x161c99?.[_0x23eb70(0xda)]&&Array[_0x23eb70(0xa5)](_0x161c99[_0x23eb70(0xda)])&&_0x161c99[_0x23eb70(0xda)][_0x23eb70(0x110)](_0xcd0cc5=>typeof _0xcd0cc5===_0x23eb70(0xed)&&_0xcd0cc5[_0x23eb70(0x108)](_0x23eb70(0xcf)))&&_0x3f164c['push'](_0x46a09d);}_0x3f164c[_0x23eb70(0xce)]>0x0&&(_0x4d8ac2={'path':_0xaf1f39,'keys':_0x3f164c});}}catch{}const _0x35bb1a=_0x406d56[_0x23eb70(0xce)]>0x0||_0x415b26!==null;let _0x2fd3f2=null;const _0x5f2e49=resolve(_0x2d61ff,_0x23eb70(0xdf));if(existsSync(_0x5f2e49))try{const _0x4eb304=JSON[_0x23eb70(0xa8)](readFileSync(_0x5f2e49,_0x23eb70(0xe1)));for(const _0x1e9719 of[_0x23eb70(0xd9),_0x23eb70(0xf7)]){const _0x4fd0c8=_0x4eb304?.[_0x1e9719]?.['@lovrabet/sdk'];if(typeof _0x4fd0c8===_0x23eb70(0xed)){_0x4fd0c8!==_0x23eb70(0xbe)&&(_0x2fd3f2={'pkgPath':_0x5f2e49,'currentVersion':_0x4fd0c8,'field':_0x1e9719});break;}}}catch{}return{'configMigration':_0x415b26,'oldArtifacts':_0x406d56,'oldMcpConfig':_0x4d8ac2,'needsSkillSwap':_0x35bb1a,'sdkUpgrade':_0x2fd3f2};}function printReport(_0x28fa38){const _0x456982=a178_0x567882,{configMigration:_0x1ce8f3,oldArtifacts:_0x599a5f,oldMcpConfig:_0x3039d7,needsSkillSwap:_0x609d65}=_0x28fa38;console[_0x456982(0x106)](''),console[_0x456982(0x106)](a178_0x521e32[_0x456982(0x115)](_0x456982(0xb6))),console['log']('');_0x1ce8f3?(console[_0x456982(0x106)](a178_0x521e32[_0x456982(0xea)]('Config\x20file:')+('\x20\x20'+a178_0x521e32['yellow'](_0x1ce8f3[_0x456982(0xb5)]))),console[_0x456982(0x106)]('\x20\x20New\x20config\x20(.rabetbase.json):\x20'+(_0x1ce8f3[_0x456982(0x105)]?a178_0x521e32[_0x456982(0x117)](_0x456982(0x11e)):a178_0x521e32[_0x456982(0x10e)](_0x456982(0xa9)))),console[_0x456982(0x106)](_0x456982(0xb1)+_0x1ce8f3[_0x456982(0x101)][_0x456982(0x10f)](',\x20')),console[_0x456982(0x106)](_0x456982(0x118))):console[_0x456982(0x106)](a178_0x521e32[_0x456982(0xea)](_0x456982(0x103))+'\x20\x20'+a178_0x521e32[_0x456982(0x10e)]('no\x20legacy\x20config\x20found'));console[_0x456982(0x106)]('');if(_0x599a5f[_0x456982(0xce)]>0x0){console['log'](a178_0x521e32[_0x456982(0xea)]('Legacy\x20artifacts:'));for(const _0x5b7d11 of _0x599a5f){console['log']('\x20\x20'+a178_0x521e32[_0x456982(0xde)](_0x456982(0xb7))+'\x20\x20'+_0x5b7d11);}console[_0x456982(0x106)](_0x456982(0xbb));}else console[_0x456982(0x106)](a178_0x521e32[_0x456982(0xea)](_0x456982(0xe7))+'\x20\x20'+a178_0x521e32[_0x456982(0x10e)](_0x456982(0xd6)));console['log']('');_0x3039d7?(console[_0x456982(0x106)](a178_0x521e32['cyan'](_0x456982(0xb3))+('\x20\x20'+a178_0x521e32['yellow'](_0x3039d7[_0x456982(0xac)])+'\x20→\x20keys:\x20'+_0x3039d7[_0x456982(0xef)][_0x456982(0x10f)](',\x20'))),console[_0x456982(0x106)](_0x456982(0xe0))):console['log'](a178_0x521e32[_0x456982(0xea)]('MCP\x20config:')+'\x20\x20'+a178_0x521e32[_0x456982(0x10e)]('no\x20legacy\x20entry'));console[_0x456982(0x106)](''),console[_0x456982(0x106)](a178_0x521e32['cyan'](_0x456982(0x116))+('\x20\x20'+(_0x609d65?a178_0x521e32[_0x456982(0xd5)](_0x456982(0xb9)):a178_0x521e32[_0x456982(0x117)]('not\x20needed'))));_0x609d65&&console[_0x456982(0x106)](_0x456982(0xb2)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console['log']('');if(_0x28fa38['sdkUpgrade']){const {currentVersion:_0x34c8e0,field:_0x328e6b,pkgPath:_0x11210e}=_0x28fa38[_0x456982(0xfb)];console[_0x456982(0x106)](a178_0x521e32[_0x456982(0xea)]('@lovrabet/sdk:')+('\x20\x20'+a178_0x521e32['yellow'](_0x11210e))),console[_0x456982(0x106)]('\x20\x20Current\x20version\x20in\x20'+_0x328e6b+':\x20'+a178_0x521e32['yellow'](_0x34c8e0)+_0x456982(0xa1)+a178_0x521e32['green'](_0x456982(0xbe))),console[_0x456982(0x106)](_0x456982(0x111));}else console[_0x456982(0x106)](a178_0x521e32['cyan'](_0x456982(0xf4))+'\x20\x20'+a178_0x521e32[_0x456982(0x10e)](_0x456982(0xa6)));console[_0x456982(0x106)]('');}function execConfigMigration(_0x5c9124,_0x34b26a){const _0x47df04=a178_0x567882,{configMigration:_0x3fdf91}=_0x5c9124;if(!_0x3fdf91?.['oldPath'])return{'step':0x1,'label':_0x47df04(0xbf),'ok':!![],'detail':'skipped\x20(no\x20legacy\x20config)'};const _0x1d5cf9=readConfigFile(_0x3fdf91[_0x47df04(0xb5)]),_0xabb429=resolve(_0x34b26a,NEW_CONFIG_NAME),_0x43b4b3=_0x3fdf91[_0x47df04(0x105)]?readConfigFile(_0xabb429):{};for(const [_0x46d03d,_0x3876b3]of Object['entries'](_0x1d5cf9)){!(_0x46d03d in _0x43b4b3)&&(_0x43b4b3[_0x46d03d]=_0x3876b3);}writeConfigFile(_0xabb429,_0x43b4b3);const _0x58960c=_0x3fdf91['oldPath']+_0x47df04(0xfc);return renameSync(_0x3fdf91[_0x47df04(0xb5)],_0x58960c),{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x3fdf91[_0x47df04(0xb5)]+_0x47df04(0xa1)+_0xabb429+_0x47df04(0xad)+_0x58960c+')'};}function execRemoveOldArtifacts(_0x389fda){const _0x1cfc4e=a178_0x567882,_0x504670=[];for(const _0x231a34 of _0x389fda){try{if(!existsSync(_0x231a34))continue;const _0x1e39e9=tryStat(_0x231a34);_0x1e39e9?.[_0x1cfc4e(0x10a)]()?rmSync(_0x231a34,{'recursive':!![],'force':!![]}):unlinkSync(_0x231a34);}catch(_0x53926b){_0x504670[_0x1cfc4e(0x11b)](_0x231a34+':\x20'+_0x53926b[_0x1cfc4e(0xfa)]);}}return{'step':0x3,'label':_0x1cfc4e(0xa3),'ok':_0x504670['length']===0x0,'detail':_0x504670[_0x1cfc4e(0xce)]>0x0?_0x389fda['length']-_0x504670[_0x1cfc4e(0xce)]+'/'+_0x389fda[_0x1cfc4e(0xce)]+_0x1cfc4e(0xc0)+_0x504670['join'](';\x20')+')':_0x389fda[_0x1cfc4e(0xce)]+'\x20removed'};}function execCleanMcp(_0x5f1fa1){const _0x2916e2=a178_0x567882;if(!_0x5f1fa1['oldMcpConfig'])return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x2916e2(0xba)};try{const _0x4d5e4b=readFileSync(_0x5f1fa1['oldMcpConfig'][_0x2916e2(0xac)],'utf8'),_0x3cc0ad=JSON[_0x2916e2(0xa8)](_0x4d5e4b);if(_0x3cc0ad?.[_0x2916e2(0xd1)]&&typeof _0x3cc0ad[_0x2916e2(0xd1)]===_0x2916e2(0xf3)){const _0x2b42af=[];for(const [_0x57de80,_0x1361c2]of Object['entries'](_0x3cc0ad[_0x2916e2(0xd1)])){_0x1361c2?.[_0x2916e2(0xda)]&&Array['isArray'](_0x1361c2[_0x2916e2(0xda)])&&_0x1361c2[_0x2916e2(0xda)][_0x2916e2(0x110)](_0x4b0883=>typeof _0x4b0883===_0x2916e2(0xed)&&_0x4b0883[_0x2916e2(0x108)](_0x2916e2(0xcf)))&&_0x2b42af[_0x2916e2(0x11b)](_0x57de80);}for(const _0x537b4c of _0x2b42af){delete _0x3cc0ad['mcpServers'][_0x537b4c];}return _0x2b42af[_0x2916e2(0xce)]>0x0&&writeFileSync(_0x5f1fa1[_0x2916e2(0xdc)][_0x2916e2(0xac)],JSON[_0x2916e2(0xc1)](_0x3cc0ad,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':_0x2916e2(0xee),'ok':!![],'detail':_0x2916e2(0xaf)+_0x2b42af['join'](',\x20')+'\x20from\x20'+_0x5f1fa1[_0x2916e2(0xdc)][_0x2916e2(0xac)]};}return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x2916e2(0xec)};}catch(_0x3c2d9d){return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':![],'detail':_0x3c2d9d[_0x2916e2(0xfa)]};}}function execSkillsRemove(_0x32cca4,_0x15e0af){const _0x1586e4=a178_0x567882,_0x2db24e=runNpxSkillsRemove(_0x32cca4,{'stdio':_0x1586e4(0xc3),'yes':_0x15e0af});return{'step':0x5,'label':'Remove\x20old\x20skill','ok':_0x2db24e['ok'],'detail':_0x2db24e['ok']?_0x1586e4(0xa7):_0x2db24e['error']??_0x1586e4(0xca)+_0x2db24e[_0x1586e4(0xc5)]};}function execSkillsAdd(_0x12bd7a,_0x6063e3){const _0xdf053c=a178_0x567882,_0x36e298=runNpxSkillsAddGlobal(_0x12bd7a,_0xdf053c(0xb4),{'stdio':'inherit','yes':_0x6063e3});return{'step':0x6,'label':'Install\x20new\x20skill','ok':_0x36e298['ok'],'detail':_0x36e298['ok']?'lovrabet/rabetbase\x20installed\x20globally':_0x36e298[_0xdf053c(0xd8)]??_0xdf053c(0xca)+_0x36e298[_0xdf053c(0xc5)]};}function execUpgradeSdk(_0x495c9d){const _0x2368ce=a178_0x567882;if(!_0x495c9d['sdkUpgrade'])return{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0x2368ce(0xe9)};const {pkgPath:_0x4e1029,currentVersion:_0x33e6e8,field:_0x45f5cf}=_0x495c9d[_0x2368ce(0xfb)];try{const _0x20ab25=readFileSync(_0x4e1029,_0x2368ce(0xe1)),_0x3fa010=JSON[_0x2368ce(0xa8)](_0x20ab25);return _0x3fa010[_0x45f5cf]['@lovrabet/sdk']=_0x2368ce(0xbe),writeFileSync(_0x4e1029,JSON[_0x2368ce(0xc1)](_0x3fa010,null,0x2)+'\x0a','utf8'),{'step':0x7,'label':_0x2368ce(0xc9),'ok':!![],'detail':_0x45f5cf+_0x2368ce(0xd0)+_0x33e6e8+'\x20→\x20latest'};}catch(_0x1f0118){return{'step':0x7,'label':_0x2368ce(0xc9),'ok':![],'detail':_0x1f0118[_0x2368ce(0xfa)]};}}function tryStat(_0xe23791){try{return statSync(_0xe23791);}catch{return undefined;}}function printSummary(_0x2c13a1){const _0x190e2f=a178_0x567882;console[_0x190e2f(0x106)](''),console[_0x190e2f(0x106)](a178_0x521e32[_0x190e2f(0x115)](_0x190e2f(0xe5))),console[_0x190e2f(0x106)]('');for(const _0x22bdf3 of _0x2c13a1){const _0x578865=_0x22bdf3['ok']?a178_0x521e32[_0x190e2f(0x117)]('OK'):a178_0x521e32[_0x190e2f(0xde)](_0x190e2f(0xcd));console['log']('\x20\x20'+_0x578865+'\x20\x20Step\x20'+_0x22bdf3['step']+':\x20'+_0x22bdf3[_0x190e2f(0x10c)]);if(_0x22bdf3['detail'])console[_0x190e2f(0x106)](_0x190e2f(0xcb)+a178_0x521e32[_0x190e2f(0x10e)](_0x22bdf3[_0x190e2f(0xf1)]));}console[_0x190e2f(0x106)]('');}export async function upgradeApp(_0x8c1c1,_0x46029f){const _0x123f90=a178_0x567882,_0x58da5c=process[_0x123f90(0xf6)](),_0x4f3681=analyse(_0x58da5c),_0x282a4f=!_0x4f3681[_0x123f90(0x104)]&&_0x4f3681[_0x123f90(0xb8)]['length']===0x0&&!_0x4f3681['oldMcpConfig']&&!_0x4f3681[_0x123f90(0xa4)]&&!_0x4f3681[_0x123f90(0xfb)];if(_0x282a4f){console['log'](a178_0x521e32[_0x123f90(0x117)]('No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.'));return;}printReport(_0x4f3681);const _0x56da7e=!!(_0x46029f['yes']||_0x46029f['Y']||_0x8c1c1);if(!_0x56da7e)try{const _0x234171=await askConfirm(_0x123f90(0x119));if(!_0x234171){console[_0x123f90(0x106)](a178_0x521e32[_0x123f90(0x10e)](_0x123f90(0xdb)));return;}}catch(_0x1f2a22){if(_0x1f2a22?.['message']===_0x123f90(0xf9)){console[_0x123f90(0x106)](a178_0x521e32[_0x123f90(0x10e)]('Upgrade\x20cancelled.'));return;}throw _0x1f2a22;}const _0x2089ff=[],_0xb5d610=a178_0x56b65b({'text':_0x123f90(0x100),'color':_0x123f90(0xea)})['start'](),_0x57eff0=execConfigMigration(_0x4f3681,_0x58da5c);_0x2089ff[_0x123f90(0x11b)](_0x57eff0),_0xb5d610[_0x57eff0['ok']?'succeed':'fail'](_0x123f90(0xf8)+(_0x57eff0['detail']??(_0x57eff0['ok']?_0x123f90(0x113):'failed')));const _0x14e16e=resolve(_0x58da5c,_0x123f90(0xb0)),_0xea4f7c=a178_0x56b65b({'text':_0x123f90(0xf2),'color':_0x123f90(0xea)})[_0x123f90(0xeb)]();if(existsSync(_0x14e16e))try{rmSync(_0x14e16e,{'recursive':!![],'force':!![]}),_0xea4f7c[_0x123f90(0xd7)](_0x123f90(0xe6)),_0x2089ff['push']({'step':0x2,'label':_0x123f90(0x114),'ok':!![]});}catch(_0x24bd79){_0xea4f7c['fail'](_0x123f90(0x11d)+_0x24bd79[_0x123f90(0xfa)]),_0x2089ff[_0x123f90(0x11b)]({'step':0x2,'label':_0x123f90(0x114),'ok':![],'detail':_0x24bd79[_0x123f90(0xfa)]});}else _0xea4f7c['info'](_0x123f90(0xaa)),_0x2089ff[_0x123f90(0x11b)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![],'detail':_0x123f90(0xba)});const _0x1bd6d5=a178_0x56b65b({'text':_0x123f90(0x102),'color':_0x123f90(0xea)})[_0x123f90(0xeb)](),_0x32935c=execRemoveOldArtifacts(_0x4f3681[_0x123f90(0xb8)]);_0x2089ff[_0x123f90(0x11b)](_0x32935c),_0x1bd6d5[_0x32935c['ok']?_0x123f90(0xd7):_0x123f90(0xf5)](_0x123f90(0xf0)+(_0x32935c['detail']??(_0x32935c['ok']?'done':'failed')));const _0x39a0dd=a178_0x56b65b({'text':_0x123f90(0xa2),'color':_0x123f90(0xea)})[_0x123f90(0xeb)](),_0x110f85=execCleanMcp(_0x4f3681);_0x2089ff['push'](_0x110f85),_0x39a0dd[_0x110f85['ok']?_0x123f90(0xd7):_0x123f90(0xf5)](_0x123f90(0x10d)+(_0x110f85[_0x123f90(0xf1)]??(_0x110f85['ok']?'done':_0x123f90(0x112))));const _0x28fb5a=a178_0x56b65b({'text':_0x123f90(0xe3),'color':_0x123f90(0xea)})[_0x123f90(0xeb)](),_0x25bdd9=execSkillsRemove(_0x58da5c,_0x56da7e);_0x2089ff[_0x123f90(0x11b)](_0x25bdd9),_0x28fb5a[_0x25bdd9['ok']?'succeed':_0x123f90(0xf5)](_0x123f90(0xab)+(_0x25bdd9[_0x123f90(0xf1)]??(_0x25bdd9['ok']?_0x123f90(0x113):_0x123f90(0x112))));const _0x48115d=a178_0x56b65b({'text':'Step\x206/7:\x20Installing\x20new\x20skill...','color':_0x123f90(0xea)})['start'](),_0x30d76f=execSkillsAdd(_0x58da5c,_0x56da7e);_0x2089ff[_0x123f90(0x11b)](_0x30d76f),_0x48115d[_0x30d76f['ok']?'succeed':_0x123f90(0xf5)](_0x123f90(0xc2)+(_0x30d76f['detail']??(_0x30d76f['ok']?_0x123f90(0x113):'failed')));const _0x1d3943=a178_0x56b65b({'text':'Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','color':_0x123f90(0xea)})['start'](),_0x5c37ba=execUpgradeSdk(_0x4f3681);_0x2089ff[_0x123f90(0x11b)](_0x5c37ba),_0x1d3943[_0x5c37ba['ok']?_0x123f90(0xd7):_0x123f90(0xf5)](_0x123f90(0x109)+(_0x5c37ba[_0x123f90(0xf1)]??(_0x5c37ba['ok']?_0x123f90(0x113):_0x123f90(0x112)))),printSummary(_0x2089ff);const _0x13f297=_0x2089ff[_0x123f90(0x110)](_0x223297=>!_0x223297['ok']);_0x13f297?console['log'](a178_0x521e32[_0x123f90(0xd5)](_0x123f90(0x107))):console['log'](a178_0x521e32[_0x123f90(0x117)]('Upgrade\x20completed\x20successfully!')),_0x5c37ba['ok']&&_0x4f3681[_0x123f90(0xfb)]&&(console[_0x123f90(0x106)](''),console[_0x123f90(0x106)](a178_0x521e32[_0x123f90(0x115)]['cyan'](_0x123f90(0xcc))),console[_0x123f90(0x106)](a178_0x521e32[_0x123f90(0xea)](_0x123f90(0xd4))),console[_0x123f90(0x106)](''),console['log'](a178_0x521e32[_0x123f90(0xae)](_0x123f90(0xbd))),console[_0x123f90(0x106)](a178_0x521e32[_0x123f90(0xae)](_0x123f90(0xdd))),console[_0x123f90(0x106)](a178_0x521e32[_0x123f90(0xae)]('\x20\x20bun\x20install')),console['log'](''));}function a178_0x3069(){const _0x12c2e4=['status','undefined','6ZjmrQX','318sJTgEX','Upgrade\x20@lovrabet/sdk','exit\x20','\x20\x20\x20\x20\x20\x20\x20','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','FAIL','length','@lovrabet/dataset-mcp-server','[\x22@lovrabet/sdk\x22]:\x20','mcpServers','452347KKWFwW','11944eaZvJX','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','yellow','none\x20found','succeed','error','dependencies','args','Upgrade\x20cancelled.','oldMcpConfig','\x20\x20#\x20or','red','package.json','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','utf8','863676PddmnP','Step\x205/7:\x20Removing\x20old\x20skill...','.lovrabet.json','===\x20Upgrade\x20Summary\x20===','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','Legacy\x20artifacts:','80740qSiQJA','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','cyan','start','no\x20matching\x20entry\x20found','string','Clean\x20MCP\x20config','keys','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','detail','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','object','@lovrabet/sdk:','fail','cwd','devDependencies','Step\x201/7:\x20Config\x20migration\x20—\x20','CANCEL','message','sdkUpgrade','.bak','3269304uceBqV','1679900upoRjm','864FyZmoB','Step\x201/7:\x20Migrating\x20config...','fields','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','Config\x20file:','configMigration','hasNewConfig','log','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','includes','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','isDirectory','.claude/skills/lovrabet','label','Step\x204/7:\x20MCP\x20config\x20—\x20','gray','join','some','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','failed','done','Remove\x20.lovrabet/','bold','Skill\x20swap:','green','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','Proceed\x20with\x20upgrade?','values','push','1110460RfjJhA','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','already\x20exists\x20(will\x20merge)','entries','.cursor/mcp.json','\x20→\x20','Step\x204/7:\x20Cleaning\x20MCP\x20config...','Remove\x20legacy\x20artifacts','needsSkillSwap','isArray','not\x20found\x20or\x20already\x20at\x20latest','lovrabet/lovrabet-skill\x20removed','parse','not\x20found\x20(will\x20create)','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','path','\x20(backup:\x20','white','removed\x20','.lovrabet','\x20\x20Fields\x20to\x20migrate:\x20','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','MCP\x20config:','lovrabet/rabetbase','oldPath','===\x20Upgrade\x20Analysis\x20===','FOUND','oldArtifacts','needed','skipped','\x20\x20Action:\x20delete','.lovrabetrc','\x20\x20npm\x20install','latest','Config\x20migration','\x20removed\x20(','stringify','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','inherit','files'];a178_0x3069=function(){return _0x12c2e4;};return a178_0x3069();}
@@ -1 +1 @@
1
- const a179_0x33ef69=a179_0x22f8;(function(_0xa64ddf,_0x2d68a1){const _0x2ca75a=a179_0x22f8,_0x5260b1=_0xa64ddf();while(!![]){try{const _0x3e56e2=parseInt(_0x2ca75a(0xcd))/0x1+parseInt(_0x2ca75a(0xd0))/0x2*(-parseInt(_0x2ca75a(0xfd))/0x3)+parseInt(_0x2ca75a(0xe0))/0x4+parseInt(_0x2ca75a(0xe1))/0x5+parseInt(_0x2ca75a(0xf4))/0x6+parseInt(_0x2ca75a(0x102))/0x7*(parseInt(_0x2ca75a(0xce))/0x8)+-parseInt(_0x2ca75a(0xc3))/0x9;if(_0x3e56e2===_0x2d68a1)break;else _0x5260b1['push'](_0x5260b1['shift']());}catch(_0x3c0e8f){_0x5260b1['push'](_0x5260b1['shift']());}}}(a179_0x13ac,0xdcb5a));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dbDefinitions}from'../commands/db/index.js';import{deploymentDefinitions}from'../commands/deployment/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{taskDefinitions}from'../commands/task/index.js';import{tenantDefinitions}from'../commands/tenant/index.js';import{roleDefinitions}from'../commands/role/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{ruleDefinitions}from'../commands/rule/index.js';function a179_0x22f8(_0x368eec,_0x46ee86){_0x368eec=_0x368eec-0x9d;const _0x13acb4=a179_0x13ac();let _0x22f802=_0x13acb4[_0x368eec];return _0x22f802;}import{notificationDefinitions}from'../commands/notification/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{userAccountDefinitions}from'../commands/user-account/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x115609){const _0x3cbeb9=a179_0x22f8;for(const _0x2937b2 of _0x115609){definitions[_0x3cbeb9(0x110)](_0x2937b2['service']+':'+_0x2937b2['command'],_0x2937b2);let _0x38068b=serviceGroups[_0x3cbeb9(0xed)](_0x2937b2[_0x3cbeb9(0xd9)]);!_0x38068b&&(_0x38068b=[],serviceGroups[_0x3cbeb9(0x110)](_0x2937b2[_0x3cbeb9(0xd9)],_0x38068b)),_0x38068b[_0x3cbeb9(0xdc)](_0x2937b2);}}function registerDeclarativeService(_0x1954f5,_0x36daa6,_0x3d5d5c){const _0x116fec=a179_0x22f8;registerDefinitions(_0x36daa6);_0x3d5d5c?.[_0x116fec(0xe5)]&&registerDefinitions([_0x3d5d5c['wildcardDef']]);const _0x43829e=_0x4ea348=>_0x4ea348===_0x116fec(0x106)?'':_0x4ea348===_0x116fec(0xb5)?_0x116fec(0xaa):_0x116fec(0xfe),_0x1b9a93={'service':_0x36daa6[0x0]['service'],'label':_0x1954f5,'commands':_0x36daa6['filter'](_0x1b2e83=>!_0x1b2e83[_0x116fec(0xb9)])[_0x116fec(0xc0)](_0x1c993a=>({'command':_0x1c993a['command'],'description':_0x1c993a[_0x116fec(0xe6)],'tag':_0x43829e(_0x1c993a['risk'])})),'declarative':!![],'defaultCommand':_0x3d5d5c?.[_0x116fec(0xa4)]??(_0x3d5d5c?.[_0x116fec(0xde)]?_0x36daa6[0x0][_0x116fec(0xff)]:undefined),'wildcardDef':_0x3d5d5c?.[_0x116fec(0xe5)],'isSingleCommand':_0x3d5d5c?.[_0x116fec(0xde)]};serviceRegistry[_0x116fec(0xdc)](_0x1b9a93),serviceByName['set'](_0x1b9a93[_0x116fec(0xd9)],_0x1b9a93);}registerDeclarativeService(a179_0x33ef69(0xd4),projectDefinitions),registerDeclarativeService(a179_0x33ef69(0xd2),workspaceDefinitions),registerDeclarativeService(a179_0x33ef69(0xe9),appDefinitions),registerDeclarativeService(a179_0x33ef69(0xf2),authDefinitions,{'defaultCommand':a179_0x33ef69(0xda)}),registerDeclarativeService(a179_0x33ef69(0x10d),tenantDefinitions),registerDeclarativeService(a179_0x33ef69(0xc9),userAccountDefinitions),registerDeclarativeService(a179_0x33ef69(0xea),datasetDefinitions),registerDeclarativeService(a179_0x33ef69(0xee),pageDefinitions),registerDeclarativeService(a179_0x33ef69(0xab),apiDefinitions),registerDeclarativeService(a179_0x33ef69(0xb6),bffDefinitions),registerDeclarativeService(a179_0x33ef69(0xf0),notificationDefinitions),registerDeclarativeService(a179_0x33ef69(0xd6),sqlDefinitions),registerDeclarativeService(a179_0x33ef69(0xf9),dbDefinitions),registerDeclarativeService(a179_0x33ef69(0xec),deploymentDefinitions),registerDeclarativeService(a179_0x33ef69(0x10c),menuDefinitions),registerDeclarativeService(a179_0x33ef69(0xbb),taskDefinitions),registerDeclarativeService(a179_0x33ef69(0xa6),roleDefinitions),registerDeclarativeService(a179_0x33ef69(0x10e),appConfigDefinitions),registerDeclarativeService(a179_0x33ef69(0xef),kbDefinitions),registerDeclarativeService('Agent\x20Context\x20Rules',ruleDefinitions),registerDeclarativeService(a179_0x33ef69(0xac),issueDefinitions),registerDeclarativeService(a179_0x33ef69(0xcf),fileDefinitions),registerDeclarativeService(a179_0x33ef69(0xc7),ocrDefinitions),registerDeclarativeService(a179_0x33ef69(0xb1),codegenDefinitions),registerDeclarativeService(a179_0x33ef69(0xd1),configDefinitions),registerDeclarativeService(a179_0x33ef69(0xc1),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a179_0x33ef69(0xbc),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a179_0x33ef69(0x9d),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a179_0x33ef69(0x100),cliSkillDefinitions,{'defaultCommand':a179_0x33ef69(0x103)}),registerDeclarativeService(a179_0x33ef69(0xf6),logsDefinitions,{'defaultCommand':a179_0x33ef69(0x9e)}),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a179_0x33ef69(0xc8)]-0x1];last[a179_0x33ef69(0xd8)]=[{'command':a179_0x33ef69(0xa0),'description':'Run\x20any\x20package.json\x20script','tag':a179_0x33ef69(0x109)+runDefinition[a179_0x33ef69(0xb2)]+']'}];}function a179_0x13ac(){const _0x5d0a63=['Company\x20Knowledge\x20Base','Notification\x20Configuration','app:use','Authentication','role:create','1347864bbkQQU','rabetbase\x20sql\x20create','Logs','page:react-detail','rabetbase\x20page\x20data-list-status','Database\x20Connections','rabetbase\x20run\x20preview','data:getOne','page:react-publish','60693gmzJzn','\x20\x20[high-risk-write]','command','CLI\x20Built-in\x20Skill','sql:new','478163lxTICh','install','rabetbase\x20page\x20custom-publish','skill:','read','Use\x20`','data:filter','\x20\x20[','skills:','rabetbase\x20workspace\x20use\x20--app\x20<name>','Menu','Tenant\x20Members','Runtime\x20App\x20Config\x20Management','knowledge-base:create','set','Self\x20Update','show','page:react-create','<script>','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','rabetbase\x20project\x20create\x20<project-name>','rabetbase\x20kb\x20create','defaultCommand','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','Roles','create','rabetbase\x20kb\x20delete','rabetbase\x20bff\x20create','\x20\x20[write]','API\x20Development','Platform\x20Issue','skill:install','rabetbase\x20cli-skill\x20install','permit:page-get','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','Code\x20Generation','risk','knowledge-base:list','skills:install','write','Backend\x20Function\x20Scripts','rabetbase\x20page\x20custom-update','rabetbase\x20role\x20list','hidden','menu:update','Async\x20Tasks','Schema','from','rabetbase\x20menu\x20asset-update','knowledge-base:update','map','Diagnostics','rabetbase\x20kb\x20list','18516276tmDNct','rabetbase\x20page\x20custom-list','permit:role-menus-set','app:add','OCR','length','User\x20Accounts','has','`\x20instead.','page:react-update','1050041GYmxBE','32rLZWhe','File','2BEYMKO','Configuration','Workspace','permit:role-menus','Project','values','SQL\x20Queries','`\x20has\x20been\x20removed.','commands','service','login','rabetbase\x20workspace\x20remove\x20<name>','push','page:custom-create','isSingleCommand','rabetbase\x20auth\x20logout','280844tCMMyq','6817445iHAzKo','rabetbase\x20kb\x20detail','start','`rabetbase\x20','wildcardDef','description','app:remove','rabetbase\x20kb\x20update','App\x20Management','Dataset\x20&\x20Operations','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','Deployment','get','Data\x20List\x20Pages\x20&\x20Custom\x20Pages'];a179_0x13ac=function(){return _0x5d0a63;};return a179_0x13ac();}const REMOVED_COMMAND_REPLACEMENTS=new Map([['sql:save','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml'],['bff:new',a179_0x33ef69(0xa9)],[a179_0x33ef69(0x101),a179_0x33ef69(0xf5)],[a179_0x33ef69(0xba),a179_0x33ef69(0xbe)],['project:init',a179_0x33ef69(0xeb)],[a179_0x33ef69(0x105),a179_0x33ef69(0xae)],[a179_0x33ef69(0xad),a179_0x33ef69(0xae)],[a179_0x33ef69(0x10a),a179_0x33ef69(0xae)],[a179_0x33ef69(0xb4),a179_0x33ef69(0xae)],['app:remote','rabetbase\x20app\x20list\x20--remote'],[a179_0x33ef69(0xf1),a179_0x33ef69(0x10b)],[a179_0x33ef69(0xc6),'rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>'],[a179_0x33ef69(0xe7),a179_0x33ef69(0xdb)],[a179_0x33ef69(0xb3),a179_0x33ef69(0xc2)],['knowledge-base:detail',a179_0x33ef69(0xe2)],[a179_0x33ef69(0x10f),a179_0x33ef69(0xa3)],[a179_0x33ef69(0xbf),a179_0x33ef69(0xe8)],['knowledge-base:delete',a179_0x33ef69(0xa8)],[a179_0x33ef69(0xf3),a179_0x33ef69(0xb8)],[a179_0x33ef69(0x108),'lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27'],[a179_0x33ef69(0xfb),a179_0x33ef69(0xa1)],['page:standard-page-status',a179_0x33ef69(0xf8)],[a179_0x33ef69(0x9f),a179_0x33ef69(0xb0)],[a179_0x33ef69(0xdd),'rabetbase\x20page\x20create\x20--page-pattern\x20BLANK'],['page:react-list',a179_0x33ef69(0xc4)],[a179_0x33ef69(0xf7),'rabetbase\x20page\x20custom-detail'],[a179_0x33ef69(0xcc),a179_0x33ef69(0xb7)],[a179_0x33ef69(0xfc),a179_0x33ef69(0x104)]]),REMOVED_COMMAND_HINTS=new Map([[a179_0x33ef69(0xaf),a179_0x33ef69(0xa5)],['permit:page-set',a179_0x33ef69(0xa5)],[a179_0x33ef69(0xd3),a179_0x33ef69(0xa5)],[a179_0x33ef69(0xc5),a179_0x33ef69(0xa5)],['permit:role-apis-set',a179_0x33ef69(0xa5)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a179_0x33ef69(0xa7),a179_0x33ef69(0xa2)],[a179_0x33ef69(0xe3),'rabetbase\x20run\x20start'],['build','rabetbase\x20run\x20build'],['preview',a179_0x33ef69(0xfa)],['logout',a179_0x33ef69(0xdf)]]);export function resolveRemovedCommand(_0x45bf80,_0x20fa01){const _0x40548c=a179_0x33ef69;if(!_0x45bf80)return undefined;const _0xb79f8d=REMOVED_COMMAND_REPLACEMENTS['get'](_0x45bf80+':'+(_0x20fa01??'')),_0x3c6a7b=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x40548c(0xed)](_0x45bf80),_0x75af50=_0xb79f8d??_0x3c6a7b,_0x567b86=REMOVED_COMMAND_HINTS[_0x40548c(0xed)](_0x45bf80+':'+(_0x20fa01??''));if(!_0x75af50&&!_0x567b86)return undefined;const _0xbc61ab=_0x3c6a7b?_0x45bf80:_0x20fa01?_0x45bf80+'\x20'+_0x20fa01:_0x45bf80;return{'command':_0xbc61ab,'message':_0x40548c(0xe4)+_0xbc61ab+_0x40548c(0xd7),'hint':_0x567b86??_0x40548c(0x107)+_0x75af50+_0x40548c(0xcb)};}export function findDefinition(_0x3f4826,_0xd5ae88){return definitions['get'](_0x3f4826+':'+_0xd5ae88);}export function isKnownService(_0x4b29c9){const _0x5d7a96=a179_0x33ef69;return serviceByName[_0x5d7a96(0xca)](_0x4b29c9);}export function isDeclarativeService(_0x324630){const _0x2b075d=a179_0x33ef69;return serviceGroups['has'](_0x324630)||serviceByName[_0x2b075d(0xed)](_0x324630)?.[_0x2b075d(0xe5)]!==undefined;}export function getServiceEntry(_0x2a9692){const _0x35c5d8=a179_0x33ef69;return serviceByName[_0x35c5d8(0xed)](_0x2a9692);}export function getLegacyHandler(_0x2b2bb0,_0x54f597){return undefined;}export function getAllDefinitions(){const _0x364328=a179_0x33ef69;return Array[_0x364328(0xbd)](definitions[_0x364328(0xd5)]());}
1
+ const a179_0x1a541c=a179_0x2c9c;(function(_0x1a5ef9,_0x9d6ce0){const _0x28b57f=a179_0x2c9c,_0x268cb7=_0x1a5ef9();while(!![]){try{const _0x3cca13=-parseInt(_0x28b57f(0x140))/0x1*(-parseInt(_0x28b57f(0x123))/0x2)+-parseInt(_0x28b57f(0x160))/0x3*(parseInt(_0x28b57f(0x124))/0x4)+-parseInt(_0x28b57f(0x134))/0x5*(parseInt(_0x28b57f(0x146))/0x6)+parseInt(_0x28b57f(0x108))/0x7*(-parseInt(_0x28b57f(0x101))/0x8)+parseInt(_0x28b57f(0x135))/0x9*(-parseInt(_0x28b57f(0x102))/0xa)+-parseInt(_0x28b57f(0x10c))/0xb+parseInt(_0x28b57f(0x115))/0xc*(parseInt(_0x28b57f(0x138))/0xd);if(_0x3cca13===_0x9d6ce0)break;else _0x268cb7['push'](_0x268cb7['shift']());}catch(_0x998b58){_0x268cb7['push'](_0x268cb7['shift']());}}}(a179_0x5b08,0xd583e));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dbDefinitions}from'../commands/db/index.js';import{deploymentDefinitions}from'../commands/deployment/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{taskDefinitions}from'../commands/task/index.js';import{tenantDefinitions}from'../commands/tenant/index.js';import{roleDefinitions}from'../commands/role/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{ruleDefinitions}from'../commands/rule/index.js';function a179_0x2c9c(_0x5bfda2,_0x2fe180){_0x5bfda2=_0x5bfda2-0xfe;const _0x5b0815=a179_0x5b08();let _0x2c9c38=_0x5b0815[_0x5bfda2];return _0x2c9c38;}import{notificationDefinitions}from'../commands/notification/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{userAccountDefinitions}from'../commands/user-account/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x44734a){const _0x54b11c=a179_0x2c9c;for(const _0x1c7f65 of _0x44734a){definitions['set'](_0x1c7f65['service']+':'+_0x1c7f65[_0x54b11c(0x100)],_0x1c7f65);let _0xf03cb5=serviceGroups[_0x54b11c(0x15f)](_0x1c7f65[_0x54b11c(0x11c)]);!_0xf03cb5&&(_0xf03cb5=[],serviceGroups[_0x54b11c(0x14f)](_0x1c7f65[_0x54b11c(0x11c)],_0xf03cb5)),_0xf03cb5[_0x54b11c(0x130)](_0x1c7f65);}}function registerDeclarativeService(_0x1adc03,_0x25c535,_0x27bd01){const _0x313dad=a179_0x2c9c;registerDefinitions(_0x25c535);_0x27bd01?.[_0x313dad(0x122)]&&registerDefinitions([_0x27bd01[_0x313dad(0x122)]]);const _0x427c04=_0x28d32d=>_0x28d32d===_0x313dad(0xff)?'':_0x28d32d===_0x313dad(0x10b)?_0x313dad(0x13b):_0x313dad(0x12e),_0x4dccf5={'service':_0x25c535[0x0][_0x313dad(0x11c)],'label':_0x1adc03,'commands':_0x25c535[_0x313dad(0x12a)](_0x1b7a3d=>!_0x1b7a3d[_0x313dad(0x144)])[_0x313dad(0x132)](_0x3c17f2=>({'command':_0x3c17f2[_0x313dad(0x100)],'description':_0x3c17f2[_0x313dad(0x109)],'tag':_0x427c04(_0x3c17f2['risk'])})),'declarative':!![],'defaultCommand':_0x27bd01?.['defaultCommand']??(_0x27bd01?.[_0x313dad(0x10e)]?_0x25c535[0x0][_0x313dad(0x100)]:undefined),'wildcardDef':_0x27bd01?.[_0x313dad(0x122)],'isSingleCommand':_0x27bd01?.[_0x313dad(0x10e)]};serviceRegistry[_0x313dad(0x130)](_0x4dccf5),serviceByName['set'](_0x4dccf5['service'],_0x4dccf5);}registerDeclarativeService(a179_0x1a541c(0x11a),projectDefinitions),registerDeclarativeService(a179_0x1a541c(0x139),workspaceDefinitions),registerDeclarativeService(a179_0x1a541c(0x119),appDefinitions),registerDeclarativeService(a179_0x1a541c(0x11b),authDefinitions,{'defaultCommand':a179_0x1a541c(0x121)}),registerDeclarativeService('Tenant\x20Members',tenantDefinitions),registerDeclarativeService('User\x20Accounts',userAccountDefinitions),registerDeclarativeService('Dataset\x20&\x20Operations',datasetDefinitions),registerDeclarativeService(a179_0x1a541c(0x14c),pageDefinitions),registerDeclarativeService(a179_0x1a541c(0x127),apiDefinitions),registerDeclarativeService('Backend\x20Function\x20Scripts',bffDefinitions),registerDeclarativeService(a179_0x1a541c(0x10f),notificationDefinitions),registerDeclarativeService(a179_0x1a541c(0x155),sqlDefinitions),registerDeclarativeService(a179_0x1a541c(0x133),dbDefinitions),registerDeclarativeService(a179_0x1a541c(0x125),deploymentDefinitions),registerDeclarativeService(a179_0x1a541c(0x136),menuDefinitions),registerDeclarativeService(a179_0x1a541c(0x15b),taskDefinitions),registerDeclarativeService(a179_0x1a541c(0x129),roleDefinitions),registerDeclarativeService(a179_0x1a541c(0x13c),appConfigDefinitions),registerDeclarativeService(a179_0x1a541c(0x110),kbDefinitions),registerDeclarativeService(a179_0x1a541c(0x10a),ruleDefinitions),registerDeclarativeService(a179_0x1a541c(0x113),issueDefinitions),registerDeclarativeService('File',fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService(a179_0x1a541c(0x142),codegenDefinitions),registerDeclarativeService(a179_0x1a541c(0x14d),configDefinitions),registerDeclarativeService(a179_0x1a541c(0x10d),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a179_0x1a541c(0x153),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a179_0x1a541c(0x161),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a179_0x1a541c(0x13f),cliSkillDefinitions,{'defaultCommand':a179_0x1a541c(0x117)}),registerDeclarativeService('Logs',logsDefinitions,{'defaultCommand':a179_0x1a541c(0x116)}),registerDeclarativeService(a179_0x1a541c(0xfe),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry['length']-0x1];last[a179_0x1a541c(0x112)]=[{'command':'<script>','description':a179_0x1a541c(0x13a),'tag':a179_0x1a541c(0x167)+runDefinition[a179_0x1a541c(0x165)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a179_0x1a541c(0x14a),'rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml'],[a179_0x1a541c(0x103),'rabetbase\x20bff\x20create'],[a179_0x1a541c(0x120),a179_0x1a541c(0x14b)],[a179_0x1a541c(0x159),a179_0x1a541c(0x148)],[a179_0x1a541c(0x11d),a179_0x1a541c(0x106)],[a179_0x1a541c(0x11e),'rabetbase\x20cli-skill\x20install'],[a179_0x1a541c(0x169),'rabetbase\x20cli-skill\x20install'],['skills:',a179_0x1a541c(0x149)],[a179_0x1a541c(0x12d),'rabetbase\x20cli-skill\x20install'],[a179_0x1a541c(0x12f),a179_0x1a541c(0x104)],['app:use','rabetbase\x20workspace\x20use\x20--app\x20<name>'],[a179_0x1a541c(0x157),a179_0x1a541c(0x107)],['app:remove',a179_0x1a541c(0x166)],['knowledge-base:list','rabetbase\x20kb\x20list'],[a179_0x1a541c(0x145),'rabetbase\x20kb\x20detail'],[a179_0x1a541c(0x12c),a179_0x1a541c(0x13d)],[a179_0x1a541c(0x131),'rabetbase\x20kb\x20update'],[a179_0x1a541c(0x163),'rabetbase\x20kb\x20delete'],[a179_0x1a541c(0x128),'rabetbase\x20role\x20list'],[a179_0x1a541c(0x114),a179_0x1a541c(0x154)],['data:getOne',a179_0x1a541c(0x15a)],[a179_0x1a541c(0x137),'rabetbase\x20page\x20data-list-status'],[a179_0x1a541c(0x147),a179_0x1a541c(0x15d)],['page:custom-create','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK'],[a179_0x1a541c(0x118),a179_0x1a541c(0x168)],['page:react-detail','rabetbase\x20page\x20custom-detail'],[a179_0x1a541c(0x14e),'rabetbase\x20page\x20custom-update'],['page:react-publish',a179_0x1a541c(0x15c)]]),REMOVED_COMMAND_HINTS=new Map([[a179_0x1a541c(0x152),a179_0x1a541c(0x15e)],['permit:page-set',a179_0x1a541c(0x15e)],[a179_0x1a541c(0x156),a179_0x1a541c(0x15e)],['permit:role-menus-set',a179_0x1a541c(0x15e)],['permit:role-apis-set','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.']]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a179_0x1a541c(0x143),a179_0x1a541c(0x150)],['start',a179_0x1a541c(0x111)],[a179_0x1a541c(0x126),a179_0x1a541c(0x13e)],[a179_0x1a541c(0x105),a179_0x1a541c(0x164)],[a179_0x1a541c(0x162),a179_0x1a541c(0x151)]]);export function resolveRemovedCommand(_0x212aa5,_0x216ab0){const _0x2f27a8=a179_0x1a541c;if(!_0x212aa5)return undefined;const _0x225f21=REMOVED_COMMAND_REPLACEMENTS[_0x2f27a8(0x15f)](_0x212aa5+':'+(_0x216ab0??'')),_0x5e9255=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x2f27a8(0x15f)](_0x212aa5),_0xe8ca40=_0x225f21??_0x5e9255,_0x1bc274=REMOVED_COMMAND_HINTS['get'](_0x212aa5+':'+(_0x216ab0??''));if(!_0xe8ca40&&!_0x1bc274)return undefined;const _0x4be9e8=_0x5e9255?_0x212aa5:_0x216ab0?_0x212aa5+'\x20'+_0x216ab0:_0x212aa5;return{'command':_0x4be9e8,'message':'`rabetbase\x20'+_0x4be9e8+_0x2f27a8(0x158),'hint':_0x1bc274??_0x2f27a8(0x141)+_0xe8ca40+'`\x20instead.'};}function a179_0x5b08(){const _0x3dd03a=['rabetbase\x20page\x20custom-publish','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','get','9813gYhJdI','Self\x20Update','logout','knowledge-base:delete','rabetbase\x20run\x20preview','risk','rabetbase\x20workspace\x20remove\x20<name>','\x20\x20[','rabetbase\x20page\x20custom-list','skill:install','Run\x20Scripts','read','command','5523736YleyMh','10tjyAVd','bff:new','rabetbase\x20app\x20list\x20--remote','preview','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','7YoHMIo','description','Agent\x20Context\x20Rules','write','13466541MyGoxX','Diagnostics','isSingleCommand','Notification\x20Configuration','Company\x20Knowledge\x20Base','rabetbase\x20run\x20start','commands','Platform\x20Issue','data:filter','32964rFPRHs','show','install','page:react-list','App\x20Management','Project','Authentication','service','project:init','skill:','from','sql:new','login','wildcardDef','2qQqCAu','868nQTuBz','Deployment','build','API\x20Development','role:create','Roles','filter','has','knowledge-base:create','skills:install','\x20\x20[high-risk-write]','app:remote','push','knowledge-base:update','map','Database\x20Connections','6681265nvzagS','3738258VZAyYg','Menu','page:standard-page-status','17615sKslCG','Workspace','Run\x20any\x20package.json\x20script','\x20\x20[write]','Runtime\x20App\x20Config\x20Management','rabetbase\x20kb\x20create','rabetbase\x20run\x20build','CLI\x20Built-in\x20Skill','1528493hThWQS','Use\x20`','Code\x20Generation','create','hidden','knowledge-base:detail','6SkBBUf','page:react-create','rabetbase\x20menu\x20asset-update','rabetbase\x20cli-skill\x20install','sql:save','rabetbase\x20sql\x20create','Data\x20List\x20Pages\x20&\x20Custom\x20Pages','Configuration','page:react-update','set','rabetbase\x20project\x20create\x20<project-name>','rabetbase\x20auth\x20logout','permit:page-get','Schema','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','SQL\x20Queries','permit:role-menus','app:add','`\x20has\x20been\x20removed.','menu:update','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','Async\x20Tasks'];a179_0x5b08=function(){return _0x3dd03a;};return a179_0x5b08();}export function findDefinition(_0x1379f,_0x2385f4){return definitions['get'](_0x1379f+':'+_0x2385f4);}export function isKnownService(_0x1a3cce){const _0x28c6aa=a179_0x1a541c;return serviceByName[_0x28c6aa(0x12b)](_0x1a3cce);}export function isDeclarativeService(_0x5c3fd0){const _0x4aa553=a179_0x1a541c;return serviceGroups[_0x4aa553(0x12b)](_0x5c3fd0)||serviceByName[_0x4aa553(0x15f)](_0x5c3fd0)?.['wildcardDef']!==undefined;}export function getServiceEntry(_0x21e95a){const _0x7c49db=a179_0x1a541c;return serviceByName[_0x7c49db(0x15f)](_0x21e95a);}export function getLegacyHandler(_0x5eade3,_0x1a2288){return undefined;}export function getAllDefinitions(){const _0x43cf9a=a179_0x1a541c;return Array[_0x43cf9a(0x11f)](definitions['values']());}
@@ -1 +1 @@
1
- const a180_0x13e7d2=a180_0x1de4;(function(_0x9e8750,_0x550203){const _0x274bb5=a180_0x1de4,_0xec34c0=_0x9e8750();while(!![]){try{const _0xebe70f=-parseInt(_0x274bb5(0x185))/0x1*(parseInt(_0x274bb5(0x18e))/0x2)+parseInt(_0x274bb5(0x18a))/0x3+-parseInt(_0x274bb5(0x188))/0x4+-parseInt(_0x274bb5(0x184))/0x5+parseInt(_0x274bb5(0x18d))/0x6+parseInt(_0x274bb5(0x183))/0x7+-parseInt(_0x274bb5(0x187))/0x8*(parseInt(_0x274bb5(0x181))/0x9);if(_0xebe70f===_0x550203)break;else _0xec34c0['push'](_0xec34c0['shift']());}catch(_0x2d1d5a){_0xec34c0['push'](_0xec34c0['shift']());}}}(a180_0x2b78,0x9f22d));import{deleteAppRole}from'../../core/api-client.js';function a180_0x1de4(_0x198784,_0x3446c3){_0x198784=_0x198784-0x17c;const _0x2b785d=a180_0x2b78();let _0x1de4c6=_0x2b785d[_0x198784];return _0x1de4c6;}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=a180_0x13e7d2(0x180);function a180_0x2b78(){const _0x302e73=['2532476IClnkJ','num','1827870RpmsKe','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','appCode','6319356EemqnP','778HWOajG','role','dev','delete','userCount','roleName','high-risk-write','POST','/smartapi/permit/role/delete','4338lsOIie','Deleted\x20role\x20','4915400cYYpYx','3959125umdBkI','143wqyGnC','\x20(id=','3856EKFIAM'];a180_0x2b78=function(){return _0x302e73;};return a180_0x2b78();}export const roleDelete={'service':a180_0x13e7d2(0x18f),'command':a180_0x13e7d2(0x191),'description':'Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','risk':a180_0x13e7d2(0x17e),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x9b2294){const _0x41ffa4=a180_0x13e7d2,_0x4bb6c3=_0x9b2294[_0x41ffa4(0x189)]('id'),_0x283a44=await getRoleById(_0x9b2294[_0x41ffa4(0x18c)],_0x4bb6c3);return assertCustomRole(_0x283a44,_0x41ffa4(0x191)),asDryRunResult({'scope':_0x41ffa4(0x190),'operation':_0x41ffa4(0x191),'selector':{'appCode':_0x9b2294['appCode'],'roleId':_0x4bb6c3,'roleName':_0x283a44[_0x41ffa4(0x17d)]},'before':projectRole(_0x283a44),'after':null,'dryRun':!![],'backend':{'method':_0x41ffa4(0x17f),'path':DELETE_PATH},'warnings':_0x283a44[_0x41ffa4(0x17c)]>0x0?['Role\x20still\x20has\x20'+_0x283a44[_0x41ffa4(0x17c)]+_0x41ffa4(0x18b)]:[]},{'method':_0x41ffa4(0x17f),'url':DELETE_PATH});},async 'execute'(_0x51f867){const _0x19399b=a180_0x13e7d2,_0x61f5a2=_0x51f867[_0x19399b(0x189)]('id'),_0xe8ab8d=await getRoleById(_0x51f867['appCode'],_0x61f5a2);return assertCustomRole(_0xe8ab8d,_0x19399b(0x191)),await deleteAppRole(_0x61f5a2),{'ok':!![],'data':{'scope':_0x19399b(0x190),'operation':_0x19399b(0x191),'selector':{'appCode':_0x51f867[_0x19399b(0x18c)],'roleId':_0x61f5a2,'roleName':_0xe8ab8d[_0x19399b(0x17d)]},'before':projectRole(_0xe8ab8d),'after':null,'dryRun':![],'backend':{'method':_0x19399b(0x17f),'path':DELETE_PATH},'warnings':[]},'message':_0x19399b(0x182)+_0xe8ab8d[_0x19399b(0x17d)]+_0x19399b(0x186)+_0x61f5a2+')'};}};
1
+ const a180_0x42aede=a180_0x41c7;(function(_0x5bc30c,_0x235a5d){const _0x3f13c3=a180_0x41c7,_0x1f1350=_0x5bc30c();while(!![]){try{const _0x28a663=parseInt(_0x3f13c3(0x1e3))/0x1*(parseInt(_0x3f13c3(0x1e2))/0x2)+parseInt(_0x3f13c3(0x1ef))/0x3*(parseInt(_0x3f13c3(0x1f0))/0x4)+-parseInt(_0x3f13c3(0x1ea))/0x5+-parseInt(_0x3f13c3(0x1ed))/0x6+parseInt(_0x3f13c3(0x1e4))/0x7+parseInt(_0x3f13c3(0x1ec))/0x8+-parseInt(_0x3f13c3(0x1e0))/0x9;if(_0x28a663===_0x235a5d)break;else _0x1f1350['push'](_0x1f1350['shift']());}catch(_0x10b23b){_0x1f1350['push'](_0x1f1350['shift']());}}}(a180_0x2060,0xa0a1c));import{deleteAppRole}from'../../core/api-client.js';function a180_0x2060(){const _0x2f57e7=['/smartapi/permit/role/delete','high-risk-write','Deleted\x20role\x20','POST','3555875lTRNxn','userCount','8739592yQiESD','4712688ubIJjk','delete','33882HNJHcx','184EUiGMX','appCode','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','num','Role\x20still\x20has\x20','11188071PeAQUl','roleName','4822IrZYfi','337QROTUu','6812470jLUxKe','dev'];a180_0x2060=function(){return _0x2f57e7;};return a180_0x2060();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a180_0x41c7(_0x451b4f,_0xf37616){_0x451b4f=_0x451b4f-0x1e0;const _0x2060ce=a180_0x2060();let _0x41c787=_0x2060ce[_0x451b4f];return _0x41c787;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH=a180_0x42aede(0x1e6);export const roleDelete={'service':'role','command':a180_0x42aede(0x1ee),'description':a180_0x42aede(0x1f2),'risk':a180_0x42aede(0x1e7),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x824381){const _0x1a08b4=a180_0x42aede,_0x22d6d8=_0x824381[_0x1a08b4(0x1f3)]('id'),_0x50cd1d=await getRoleById(_0x824381[_0x1a08b4(0x1f1)],_0x22d6d8);return assertCustomRole(_0x50cd1d,_0x1a08b4(0x1ee)),asDryRunResult({'scope':_0x1a08b4(0x1e5),'operation':_0x1a08b4(0x1ee),'selector':{'appCode':_0x824381[_0x1a08b4(0x1f1)],'roleId':_0x22d6d8,'roleName':_0x50cd1d[_0x1a08b4(0x1e1)]},'before':projectRole(_0x50cd1d),'after':null,'dryRun':!![],'backend':{'method':_0x1a08b4(0x1e9),'path':DELETE_PATH},'warnings':_0x50cd1d[_0x1a08b4(0x1eb)]>0x0?[_0x1a08b4(0x1f4)+_0x50cd1d[_0x1a08b4(0x1eb)]+'\x20member(s);\x20they\x20will\x20lose\x20this\x20group.']:[]},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x5e7709){const _0x341f5=a180_0x42aede,_0x565ac0=_0x5e7709['num']('id'),_0x22ccf9=await getRoleById(_0x5e7709[_0x341f5(0x1f1)],_0x565ac0);return assertCustomRole(_0x22ccf9,'delete'),await deleteAppRole(_0x565ac0),{'ok':!![],'data':{'scope':_0x341f5(0x1e5),'operation':_0x341f5(0x1ee),'selector':{'appCode':_0x5e7709[_0x341f5(0x1f1)],'roleId':_0x565ac0,'roleName':_0x22ccf9['roleName']},'before':projectRole(_0x22ccf9),'after':null,'dryRun':![],'backend':{'method':_0x341f5(0x1e9),'path':DELETE_PATH},'warnings':[]},'message':_0x341f5(0x1e8)+_0x22ccf9[_0x341f5(0x1e1)]+'\x20(id='+_0x565ac0+')'};}};
@@ -1 +1 @@
1
- function a181_0x4c38(_0x1f754f,_0x2ca3fc){_0x1f754f=_0x1f754f-0x1db;const _0x587962=a181_0x5879();let _0x4c3847=_0x587962[_0x1f754f];return _0x4c3847;}const a181_0x199f0c=a181_0x4c38;(function(_0x2eea7f,_0x1af8b1){const _0x59901f=a181_0x4c38,_0x111b21=_0x2eea7f();while(!![]){try{const _0x56f663=parseInt(_0x59901f(0x1e4))/0x1*(parseInt(_0x59901f(0x1e6))/0x2)+-parseInt(_0x59901f(0x1e8))/0x3+-parseInt(_0x59901f(0x1dd))/0x4*(parseInt(_0x59901f(0x1ea))/0x5)+-parseInt(_0x59901f(0x1e7))/0x6*(parseInt(_0x59901f(0x1e5))/0x7)+-parseInt(_0x59901f(0x1e9))/0x8+parseInt(_0x59901f(0x1dc))/0x9+parseInt(_0x59901f(0x1df))/0xa*(-parseInt(_0x59901f(0x1eb))/0xb);if(_0x56f663===_0x1af8b1)break;else _0x111b21['push'](_0x111b21['shift']());}catch(_0x1424a9){_0x111b21['push'](_0x111b21['shift']());}}}(a181_0x5879,0x3c872));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':'role','command':a181_0x199f0c(0x1e2),'description':a181_0x199f0c(0x1ec),'risk':a181_0x199f0c(0x1e3),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x473f5f){const _0x2f2602=a181_0x199f0c,_0x24b01b=_0x473f5f[_0x2f2602(0x1db)]('id'),_0x4594ad=await getRoleById(_0x473f5f[_0x2f2602(0x1e1)],_0x24b01b);return{'ok':!![],'data':{'scope':_0x2f2602(0x1de),'role':projectRole(_0x4594ad)},'message':_0x2f2602(0x1ed)+_0x4594ad['roleName']+'\x20('+_0x4594ad[_0x2f2602(0x1e0)]+')'};}};function a181_0x5879(){const _0x5a27e7=['dev','154730lZTgzR','roleType','appCode','detail','read','2725zrgNJM','79457SzIksb','354vcZwlE','96VndZXR','97467HCaBrf','3568000YmRokL','2155KwoQcG','22BClJtz','Show\x20a\x20single\x20role\x27s\x20detail','Role\x20','num','4315419DfLzyp','212sOMDRu'];a181_0x5879=function(){return _0x5a27e7;};return a181_0x5879();}
1
+ const a181_0x180e97=a181_0x2db2;function a181_0x2db2(_0x1eca7e,_0x2f252a){_0x1eca7e=_0x1eca7e-0x13f;const _0x24281e=a181_0x2428();let _0x2db245=_0x24281e[_0x1eca7e];return _0x2db245;}(function(_0x103e78,_0x12fc38){const _0x3db346=a181_0x2db2,_0x40feb2=_0x103e78();while(!![]){try{const _0x337e81=parseInt(_0x3db346(0x149))/0x1*(parseInt(_0x3db346(0x148))/0x2)+-parseInt(_0x3db346(0x145))/0x3+parseInt(_0x3db346(0x146))/0x4+-parseInt(_0x3db346(0x14c))/0x5*(parseInt(_0x3db346(0x14a))/0x6)+parseInt(_0x3db346(0x142))/0x7+parseInt(_0x3db346(0x14f))/0x8*(-parseInt(_0x3db346(0x144))/0x9)+parseInt(_0x3db346(0x141))/0xa;if(_0x337e81===_0x12fc38)break;else _0x40feb2['push'](_0x40feb2['shift']());}catch(_0x3cbb78){_0x40feb2['push'](_0x40feb2['shift']());}}}(a181_0x2428,0x35980));function a181_0x2428(){const _0x88fdf9=['4616vSqGIP','871806zngfIs','roleName','10jXkWoR','appCode','Role\x20','968XehXgA','roleType','role','Show\x20a\x20single\x20role\x27s\x20detail','3791610XwotdA','753662xaVGoV','detail','15669CRHXxh','537705AqItjg','415676SUarls','num','134kWnjYl'];a181_0x2428=function(){return _0x88fdf9;};return a181_0x2428();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a181_0x180e97(0x13f),'command':a181_0x180e97(0x143),'description':a181_0x180e97(0x140),'risk':'read','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x442120){const _0x31994c=a181_0x180e97,_0x5a5292=_0x442120[_0x31994c(0x147)]('id'),_0x255aa3=await getRoleById(_0x442120[_0x31994c(0x14d)],_0x5a5292);return{'ok':!![],'data':{'scope':'dev','role':projectRole(_0x255aa3)},'message':_0x31994c(0x14e)+_0x255aa3[_0x31994c(0x14b)]+'\x20('+_0x255aa3[_0x31994c(0x150)]+')'};}};
@@ -1 +1 @@
1
- (function(_0x1fddc0,_0x596483){const _0x233a0b=a182_0x2f7c,_0xae2cd0=_0x1fddc0();while(!![]){try{const _0x4e5fa3=parseInt(_0x233a0b(0xf9))/0x1*(parseInt(_0x233a0b(0xf7))/0x2)+-parseInt(_0x233a0b(0xf3))/0x3*(parseInt(_0x233a0b(0xf4))/0x4)+parseInt(_0x233a0b(0xf6))/0x5+-parseInt(_0x233a0b(0xf5))/0x6+-parseInt(_0x233a0b(0xf1))/0x7+-parseInt(_0x233a0b(0xf2))/0x8*(parseInt(_0x233a0b(0xf8))/0x9)+parseInt(_0x233a0b(0xfa))/0xa;if(_0x4e5fa3===_0x596483)break;else _0xae2cd0['push'](_0xae2cd0['shift']());}catch(_0x297ecd){_0xae2cd0['push'](_0xae2cd0['shift']());}}}(a182_0x59ed,0x93331));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';function a182_0x59ed(){const _0x57f203=['26667660ivBdHb','7283591wrPhvl','43184Ahtbzv','252573aDyPRc','4iUydXj','6403044OPNRRK','1561705ojSknA','1671844gsVKzq','1701HyIegv','1PHEwDB'];a182_0x59ed=function(){return _0x57f203;};return a182_0x59ed();}function a182_0x2f7c(_0x5bc3af,_0x1dbb98){_0x5bc3af=_0x5bc3af-0xf1;const _0x59ed10=a182_0x59ed();let _0x2f7ca9=_0x59ed10[_0x5bc3af];return _0x2f7ca9;}export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
1
+ (function(_0x59254c,_0x3b3a97){const _0x48b335=a182_0x1471,_0x17a0f4=_0x59254c();while(!![]){try{const _0x37806b=parseInt(_0x48b335(0x1c6))/0x1+-parseInt(_0x48b335(0x1c1))/0x2+parseInt(_0x48b335(0x1be))/0x3+parseInt(_0x48b335(0x1c2))/0x4*(-parseInt(_0x48b335(0x1c5))/0x5)+-parseInt(_0x48b335(0x1c4))/0x6+-parseInt(_0x48b335(0x1c7))/0x7*(-parseInt(_0x48b335(0x1c3))/0x8)+-parseInt(_0x48b335(0x1bf))/0x9*(-parseInt(_0x48b335(0x1c0))/0xa);if(_0x37806b===_0x3b3a97)break;else _0x17a0f4['push'](_0x17a0f4['shift']());}catch(_0x2e0fd8){_0x17a0f4['push'](_0x17a0f4['shift']());}}}(a182_0x221a,0x63bf3));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';function a182_0x221a(){const _0x35b7e0=['20qWuZPJ','970074peYCEp','56XWkwvs','8czSudQ','2330640HdhLRP','104355EZSoXL','532016qaTjgQ','1044309TDHJIa','1887615GTlSes','1187217WrntOw'];a182_0x221a=function(){return _0x35b7e0;};return a182_0x221a();}import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';function a182_0x1471(_0x58572c,_0x44b507){_0x58572c=_0x58572c-0x1be;const _0x221a1a=a182_0x221a();let _0x1471ca=_0x221a1a[_0x58572c];return _0x1471ca;}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
- function a183_0x45b9(_0x410814,_0x416de8){_0x410814=_0x410814-0x1d7;const _0x143afb=a183_0x143a();let _0x45b927=_0x143afb[_0x410814];return _0x45b927;}const a183_0x279335=a183_0x45b9;(function(_0x230af9,_0x5f1bda){const _0xb9a566=a183_0x45b9,_0x5def5b=_0x230af9();while(!![]){try{const _0x34437c=-parseInt(_0xb9a566(0x1da))/0x1*(-parseInt(_0xb9a566(0x1db))/0x2)+-parseInt(_0xb9a566(0x1e0))/0x3*(-parseInt(_0xb9a566(0x1ec))/0x4)+-parseInt(_0xb9a566(0x1ee))/0x5+-parseInt(_0xb9a566(0x1f7))/0x6+parseInt(_0xb9a566(0x1e4))/0x7*(parseInt(_0xb9a566(0x1ff))/0x8)+-parseInt(_0xb9a566(0x1f1))/0x9+-parseInt(_0xb9a566(0x1f2))/0xa*(-parseInt(_0xb9a566(0x1fa))/0xb);if(_0x34437c===_0x5f1bda)break;else _0x5def5b['push'](_0x5def5b['shift']());}catch(_0x596d3d){_0x5def5b['push'](_0x5def5b['shift']());}}}(a183_0x143a,0xe6d0a));function a183_0x143a(){const _0x2e6286=['trim','Filter\x20by\x20role\x20type','ADMIN','number','3WdDNJK','OWNER','includes','Page\x20index\x20(1-based)','339451LdmSTu','dev','DEV','length','read','CUSTOM','validation','Use\x20one\x20of:\x20','5411228zFWJIJ','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','135560PAepWS','Invalid\x20--type\x20\x22','list','14983470RFPoZD','159890NxnXTM','appCode','Found\x20','page','pagesize','7055412GZzTzQ','toUpperCase','\x20role(s)','187NomfzW','type','num','Page\x20size\x20(1-100)','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','296izYnQp','str','join','string','3RQnMoC','262934ceacFb'];a183_0x143a=function(){return _0x2e6286;};return a183_0x143a();}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=[a183_0x279335(0x1de),a183_0x279335(0x1e6),a183_0x279335(0x1e1),a183_0x279335(0x1e9)];export const roleList={'service':'role','command':a183_0x279335(0x1f0),'description':a183_0x279335(0x1fe),'risk':a183_0x279335(0x1e8),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a183_0x279335(0x1d9),'required':![],'description':a183_0x279335(0x1dd),'enum':ROLE_TYPES},{'name':a183_0x279335(0x1f5),'type':a183_0x279335(0x1df),'description':a183_0x279335(0x1e3),'default':0x1},{'name':a183_0x279335(0x1f6),'type':a183_0x279335(0x1df),'description':a183_0x279335(0x1fd),'default':0x64}],async 'validate'(_0x311fa5){const _0x108424=a183_0x279335,_0x3137a8=_0x311fa5[_0x108424(0x1d7)](_0x108424(0x1fb))['trim']();if(_0x3137a8&&!ROLE_TYPES[_0x108424(0x1e2)](_0x3137a8[_0x108424(0x1f8)]()))throw CliErrors[_0x108424(0x1ea)](_0x108424(0x1ef)+_0x3137a8+'\x22.',_0x108424(0x1eb)+ROLE_TYPES[_0x108424(0x1d8)](',\x20')+'.');const _0x3013e7=_0x311fa5['num'](_0x108424(0x1f5),0x1),_0x3374c7=_0x311fa5['num'](_0x108424(0x1f6),0x64);if(_0x3013e7<0x1)throw CliErrors[_0x108424(0x1ea)]('--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.');if(_0x3374c7<0x1||_0x3374c7>0x64)throw CliErrors['validation'](_0x108424(0x1ed));},async 'execute'(_0x1a8660){const _0x5c77c1=a183_0x279335,_0x609aed=_0x1a8660[_0x5c77c1(0x1fc)](_0x5c77c1(0x1f5),0x1)||0x1,_0x7876f1=_0x1a8660[_0x5c77c1(0x1fc)](_0x5c77c1(0x1f6),0x64)||0x64,_0x4ff361=_0x1a8660[_0x5c77c1(0x1d7)](_0x5c77c1(0x1fb))[_0x5c77c1(0x1dc)]()[_0x5c77c1(0x1f8)](),{items:_0x197386,paging:_0x145ee2}=await listAppRoles(_0x1a8660[_0x5c77c1(0x1f3)],{'currentPage':_0x609aed,'pageSize':_0x7876f1}),_0x2e542d=_0x4ff361?_0x197386['filter'](_0x5b76b7=>_0x5b76b7['roleType']===_0x4ff361):_0x197386,_0x260259=_0x2e542d['map'](projectRole);return{'ok':!![],'data':{'scope':_0x5c77c1(0x1e5),'roles':_0x260259,'paging':_0x145ee2},'message':_0x5c77c1(0x1f4)+_0x260259[_0x5c77c1(0x1e7)]+_0x5c77c1(0x1f9)};}};
1
+ const a183_0x3c756d=a183_0x149b;(function(_0x3a28b2,_0x482ee5){const _0x59ac85=a183_0x149b,_0x12f29e=_0x3a28b2();while(!![]){try{const _0x4e2da7=parseInt(_0x59ac85(0x1cf))/0x1+parseInt(_0x59ac85(0x1c6))/0x2*(-parseInt(_0x59ac85(0x1bf))/0x3)+parseInt(_0x59ac85(0x1de))/0x4+-parseInt(_0x59ac85(0x1d5))/0x5+parseInt(_0x59ac85(0x1c2))/0x6+-parseInt(_0x59ac85(0x1da))/0x7+-parseInt(_0x59ac85(0x1d4))/0x8*(-parseInt(_0x59ac85(0x1d7))/0x9);if(_0x4e2da7===_0x482ee5)break;else _0x12f29e['push'](_0x12f29e['shift']());}catch(_0xcb3910){_0x12f29e['push'](_0x12f29e['shift']());}}}(a183_0x3ea9,0x6f85e));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=[a183_0x3c756d(0x1cc),a183_0x3c756d(0x1c1),a183_0x3c756d(0x1c5),a183_0x3c756d(0x1dd)];function a183_0x3ea9(){const _0x2b88e1=['4630074wkatvZ','list','validation','OWNER','1270OzSOtS','pagesize','Use\x20one\x20of:\x20','map','string','filter','ADMIN','roleType','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','689385HAmoqk','Invalid\x20--type\x20\x22','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','trim','appCode','1048DaBFGa','4252420ermnmA','str','28467ppjzOJ','\x20role(s)','Page\x20size\x20(1-100)','4071599BobHBA','role','page','CUSTOM','2251188Gqdokd','type','includes','join','num','read','dev','Found\x20','number','toUpperCase','2595rMyaOO','Filter\x20by\x20role\x20type','DEV'];a183_0x3ea9=function(){return _0x2b88e1;};return a183_0x3ea9();}function a183_0x149b(_0x193a97,_0x20bc65){_0x193a97=_0x193a97-0x1be;const _0x3ea960=a183_0x3ea9();let _0x149b2c=_0x3ea960[_0x193a97];return _0x149b2c;}export const roleList={'service':a183_0x3c756d(0x1db),'command':a183_0x3c756d(0x1c3),'description':a183_0x3c756d(0x1d1),'risk':a183_0x3c756d(0x1e3),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a183_0x3c756d(0x1df),'type':a183_0x3c756d(0x1ca),'required':![],'description':a183_0x3c756d(0x1c0),'enum':ROLE_TYPES},{'name':a183_0x3c756d(0x1dc),'type':a183_0x3c756d(0x1e6),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':a183_0x3c756d(0x1c7),'type':a183_0x3c756d(0x1e6),'description':a183_0x3c756d(0x1d9),'default':0x64}],async 'validate'(_0xf5a961){const _0x4f4bc0=a183_0x3c756d,_0x19bb79=_0xf5a961[_0x4f4bc0(0x1d6)]('type')[_0x4f4bc0(0x1d2)]();if(_0x19bb79&&!ROLE_TYPES[_0x4f4bc0(0x1e0)](_0x19bb79[_0x4f4bc0(0x1be)]()))throw CliErrors[_0x4f4bc0(0x1c4)](_0x4f4bc0(0x1d0)+_0x19bb79+'\x22.',_0x4f4bc0(0x1c8)+ROLE_TYPES[_0x4f4bc0(0x1e1)](',\x20')+'.');const _0x4645a7=_0xf5a961[_0x4f4bc0(0x1e2)](_0x4f4bc0(0x1dc),0x1),_0x58fd32=_0xf5a961[_0x4f4bc0(0x1e2)](_0x4f4bc0(0x1c7),0x64);if(_0x4645a7<0x1)throw CliErrors[_0x4f4bc0(0x1c4)]('--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.');if(_0x58fd32<0x1||_0x58fd32>0x64)throw CliErrors[_0x4f4bc0(0x1c4)](_0x4f4bc0(0x1ce));},async 'execute'(_0x1086d7){const _0x57af66=a183_0x3c756d,_0x55532f=_0x1086d7[_0x57af66(0x1e2)](_0x57af66(0x1dc),0x1)||0x1,_0x7dcf48=_0x1086d7['num'](_0x57af66(0x1c7),0x64)||0x64,_0x401c43=_0x1086d7[_0x57af66(0x1d6)](_0x57af66(0x1df))['trim']()[_0x57af66(0x1be)](),{items:_0x214256,paging:_0x1d06fe}=await listAppRoles(_0x1086d7[_0x57af66(0x1d3)],{'currentPage':_0x55532f,'pageSize':_0x7dcf48}),_0x58d1ea=_0x401c43?_0x214256[_0x57af66(0x1cb)](_0x36f1b5=>_0x36f1b5[_0x57af66(0x1cd)]===_0x401c43):_0x214256,_0x39698d=_0x58d1ea[_0x57af66(0x1c9)](projectRole);return{'ok':!![],'data':{'scope':_0x57af66(0x1e4),'roles':_0x39698d,'paging':_0x1d06fe},'message':_0x57af66(0x1e5)+_0x39698d['length']+_0x57af66(0x1d8)};}};
@@ -1 +1 @@
1
- function a184_0x560f(_0xf7543d,_0x2fda02){_0xf7543d=_0xf7543d-0x156;const _0x28b181=a184_0x28b1();let _0x560f1a=_0x28b181[_0xf7543d];return _0x560f1a;}const a184_0x467833=a184_0x560f;(function(_0x360247,_0x114e42){const _0x4666a0=a184_0x560f,_0x176e0a=_0x360247();while(!![]){try{const _0x30f8fb=-parseInt(_0x4666a0(0x1a2))/0x1*(-parseInt(_0x4666a0(0x193))/0x2)+parseInt(_0x4666a0(0x15f))/0x3+-parseInt(_0x4666a0(0x197))/0x4+-parseInt(_0x4666a0(0x170))/0x5+parseInt(_0x4666a0(0x18c))/0x6+-parseInt(_0x4666a0(0x176))/0x7+parseInt(_0x4666a0(0x161))/0x8;if(_0x30f8fb===_0x114e42)break;else _0x176e0a['push'](_0x176e0a['shift']());}catch(_0x33b5fc){_0x176e0a['push'](_0x176e0a['shift']());}}}(a184_0x28b1,0x4bbc5));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':'number','required':!![],'description':a184_0x467833(0x187)};export const ROLE_REF_FLAG={'name':'role','type':a184_0x467833(0x17b),'required':!![],'description':'Role\x20id\x20or\x20exact\x20role\x20name'};export const USER_REF_FLAG={'name':a184_0x467833(0x164),'type':a184_0x467833(0x17b),'required':!![],'description':a184_0x467833(0x16a)};export const NAME_FLAG={'name':'name','type':'string','required':!![],'description':a184_0x467833(0x181)};export const USER_NAME_FLAG={'name':a184_0x467833(0x19e),'type':a184_0x467833(0x17b),'required':!![],'description':a184_0x467833(0x15a)};export const REMARK_FLAG={'name':a184_0x467833(0x1a7),'type':'string','required':![],'description':'Optional\x20role\x20remark/description'};export const EXPECT_USER_COUNT_FLAG={'name':a184_0x467833(0x17f),'type':a184_0x467833(0x157),'required':![],'description':'Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs'};export const BUILTIN_ROLE_TYPES=['ADMIN',a184_0x467833(0x1a0),a184_0x467833(0x18d)];export function isBuiltinRole(_0x6b80ba){const _0x53666f=a184_0x467833;return BUILTIN_ROLE_TYPES[_0x53666f(0x163)](_0x6b80ba);}export function assertCustomRole(_0x250db4,_0x4c0dc9){const _0x134277=a184_0x467833;if(_0x250db4[_0x134277(0x188)]!==_0x134277(0x18b))throw CliErrors[_0x134277(0x190)](_0x134277(0x15d)+_0x4c0dc9+'\x20built-in\x20role\x20'+_0x250db4['roleName']+'\x20('+_0x250db4[_0x134277(0x188)]+').','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.');}export function projectRole(_0x379cc3){const _0x56cd51=a184_0x467833;return{'id':_0x379cc3['id'],'roleName':_0x379cc3[_0x56cd51(0x156)],'roleType':_0x379cc3['roleType'],'remark':_0x379cc3[_0x56cd51(0x1a7)],'userCount':_0x379cc3[_0x56cd51(0x1a3)],'permitCount':_0x379cc3[_0x56cd51(0x198)],'builtin':isBuiltinRole(_0x379cc3[_0x56cd51(0x188)])};}export async function resolveRoleRef(_0x2af5f6,_0x4203e3){const _0xe01000=a184_0x467833,_0x47c7f3=_0x4203e3['trim']();if(!_0x47c7f3)throw CliErrors['validation'](_0xe01000(0x19d),_0xe01000(0x15e));if(/^\d+$/[_0xe01000(0x174)](_0x47c7f3))return getRoleById(_0x2af5f6,Number(_0x47c7f3));const _0x2c55ea=await listAllAppRoles(_0x2af5f6),_0x2bc36a=_0x2c55ea[_0xe01000(0x159)](_0x2c4596=>_0x2c4596[_0xe01000(0x156)]===_0x47c7f3);if(_0x2bc36a[_0xe01000(0x191)]===0x0)throw CliErrors[_0xe01000(0x190)](_0xe01000(0x16d)+_0x47c7f3+_0xe01000(0x178)+_0x2af5f6+'.',_0xe01000(0x18a));if(_0x2bc36a[_0xe01000(0x191)]>0x1){const _0x57e82e=_0x2bc36a[_0xe01000(0x16f)](_0x38328c=>_0x38328c['id'])[_0xe01000(0x182)](',\x20');throw CliErrors['validation'](_0xe01000(0x16d)+_0x47c7f3+_0xe01000(0x177)+_0x57e82e+').',_0xe01000(0x16c));}return _0x2bc36a[0x0];}function a184_0x28b1(){const _0x3234e4=['112440bmHaap','OWNER','Pass\x20--user\x20<id>.','No\x20tenant\x20member\x20matches\x20\x22','validation','length','totalCount','316CWFvqt','\x20is\x20already\x20a\x20member\x20of\x20role\x20','\x20duplicate\x20memberships\x20for\x20user\x20','Role\x20id\x20','277940ddicoF','permitCount','Removed\x20','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.','User\x20','push','Missing\x20role\x20reference.','name','str','DEV','role','3829OEfjTv','userCount','/smartapi/permit/user-role/delete','\x20is\x20not\x20a\x20member\x20of\x20role\x20','nickname','remark','roleName','number','\x20not\x20found\x20in\x20app\x20','filter','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','tenant_code','dryRun','Cannot\x20','Pass\x20--role\x20<id|name>.','1001166KrsURl','dev','764672YMVFoj','Missing\x20user\x20reference.','includes','user','trim','Multiple\x20tenant\x20members\x20match\x20\x22','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','POST',';\x20no\x20change.','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','username','Disambiguate\x20with\x20--role\x20<id>.','Role\x20name\x20\x22','tenant','map','2548675TnpQJc','flagMissing','\x20members\x20of\x20the\x20OWNER\x20role.','authRequired','test','Check\x20the\x20nickname/username.\x20','1145165APLzzb','\x22\x20is\x20ambiguous\x20(ids:\x20','\x22\x20not\x20found\x20in\x20app\x20','flag','userId','string','/smartapi/permit/user-role/create','expectUserCount','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','expect-user-count','user-add','Role\x20name','join','\x22:\x20','toLowerCase','appCode','Anti-drift\x20check\x20failed:\x20expected\x20','Role\x20id\x20(from\x20`role\x20list`)','roleType','Pass\x20--user\x20<id|name>.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','CUSTOM'];a184_0x28b1=function(){return _0x3234e4;};return a184_0x28b1();}export async function getRoleById(_0x3e91c8,_0x50c8cb){const _0x54ce12=a184_0x467833,_0x169f97=await listAllAppRoles(_0x3e91c8),_0x5eb662=_0x169f97['filter'](_0x5b98b3=>_0x5b98b3['id']===_0x50c8cb&&(!_0x5b98b3[_0x54ce12(0x185)]||_0x5b98b3[_0x54ce12(0x185)]===_0x3e91c8));if(_0x5eb662['length']!==0x1)throw CliErrors[_0x54ce12(0x190)](_0x54ce12(0x196)+_0x50c8cb+_0x54ce12(0x158)+_0x3e91c8+'.',_0x54ce12(0x17e));return _0x5eb662[0x0];}async function listAllAppRoles(_0x1a4f72){const _0x32ff51=a184_0x467833,_0x2483ea=0x64,_0x2d527a=[];for(let _0x9cb439=0x1;;_0x9cb439+=0x1){const {items:_0x5d4b3a,paging:_0x22f745}=await listAppRoles(_0x1a4f72,{'currentPage':_0x9cb439,'pageSize':_0x2483ea});_0x2d527a[_0x32ff51(0x19c)](..._0x5d4b3a);if(_0x5d4b3a[_0x32ff51(0x191)]<_0x2483ea||_0x22f745&&_0x2d527a[_0x32ff51(0x191)]>=_0x22f745[_0x32ff51(0x192)])return _0x2d527a;}}export async function resolveTenantCode(){const _0x3b5e38=a184_0x467833,_0x5329ef=await getSessionUserInfo(),_0x598b48=_0x5329ef?.[_0x3b5e38(0x164)]?.[_0x3b5e38(0x16e)]?.[_0x3b5e38(0x15b)];if(!_0x598b48)throw CliErrors[_0x3b5e38(0x173)]('Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.');return _0x598b48;}function matchMember(_0x18993c,_0x31e033){const _0x10121a=a184_0x467833,_0x45ab9a=_0x31e033['trim']()['toLowerCase']();return(_0x18993c['nickname']??'')[_0x10121a(0x184)]()===_0x45ab9a||(_0x18993c[_0x10121a(0x16b)]??'')[_0x10121a(0x184)]()===_0x45ab9a;}export async function resolveUserRef(_0x103e5e,_0x2055b9=a184_0x467833(0x18e)){const _0x43bd89=a184_0x467833,_0xfdb4d8=_0x103e5e[_0x43bd89(0x165)]();if(!_0xfdb4d8)throw CliErrors[_0x43bd89(0x190)](_0x43bd89(0x162),_0x43bd89(0x189));const _0x5f58f3=await resolveTenantCode(),_0x576041=await getTenantMembers(_0x5f58f3);if(/^\d+$/['test'](_0xfdb4d8)){const _0x59a847=Number(_0xfdb4d8),_0x1b2b3e=_0x576041['find'](_0x235524=>_0x235524['userId']===_0x59a847);return{'userId':_0x59a847,'username':_0x1b2b3e?.[_0x43bd89(0x16b)]??String(_0x59a847),'nickname':_0x1b2b3e?.[_0x43bd89(0x1a6)],'matchedBy':'id'};}const _0x257e6d=_0x576041[_0x43bd89(0x159)](_0x203444=>matchMember(_0x203444,_0xfdb4d8));if(_0x257e6d[_0x43bd89(0x191)]===0x0)throw CliErrors[_0x43bd89(0x190)](_0x43bd89(0x18f)+_0xfdb4d8+'\x22.',_0x43bd89(0x175)+_0x2055b9);if(_0x257e6d['length']>0x1){const _0x55cf07=_0x257e6d[_0x43bd89(0x16f)](_0x5d73d5=>(_0x5d73d5[_0x43bd89(0x1a6)]??_0x5d73d5['username']??'?')+'('+_0x5d73d5['userId']+')')[_0x43bd89(0x182)](',\x20');throw CliErrors[_0x43bd89(0x190)](_0x43bd89(0x166)+_0xfdb4d8+_0x43bd89(0x183)+_0x55cf07+'.',_0x2055b9);}const _0x247797=_0x257e6d[0x0];return{'userId':_0x247797['userId'],'username':_0x247797[_0x43bd89(0x16b)]??String(_0x247797[_0x43bd89(0x17a)]),'nickname':_0x247797['nickname'],'matchedBy':_0x43bd89(0x19e)};}export const CREATE_USER_ROLE_PATH=a184_0x467833(0x17c);export const DELETE_USER_ROLE_PATH=a184_0x467833(0x1a4);export function computeRoleUserMutation(_0x327007){const _0x4d6e93=a184_0x467833,{operation:_0x3c7067,appCode:_0x484c69,role:_0x185d2a,relations:_0x388f66,user:_0x1c4b07}=_0x327007,_0x3de02b=[...new Set(_0x388f66['map'](_0xb6b267=>_0xb6b267[_0x4d6e93(0x17a)]))],_0x4569ba=[];if(_0x327007[_0x4d6e93(0x17d)]!==undefined&&_0x327007['expectUserCount']!==_0x3de02b[_0x4d6e93(0x191)])throw CliErrors['validation'](_0x4d6e93(0x186)+_0x327007[_0x4d6e93(0x17d)]+'\x20member(s)\x20but\x20role\x20has\x20'+_0x3de02b['length']+'.',_0x4d6e93(0x167));const _0x2d29ce=_0x3de02b[_0x4d6e93(0x163)](_0x1c4b07[_0x4d6e93(0x17a)]),_0x4ecf46=_0x388f66[_0x4d6e93(0x159)](_0x308a7e=>_0x308a7e[_0x4d6e93(0x17a)]===_0x1c4b07['userId'])[_0x4d6e93(0x16f)](_0x437e55=>_0x437e55['id']),_0x2769eb=_0x3c7067===_0x4d6e93(0x180)?!_0x2d29ce:_0x2d29ce;let _0x2a3706=_0x3de02b;_0x3c7067===_0x4d6e93(0x180)?_0x2d29ce?_0x4569ba[_0x4d6e93(0x19c)](_0x4d6e93(0x19b)+_0x1c4b07[_0x4d6e93(0x17a)]+_0x4d6e93(0x194)+_0x185d2a[_0x4d6e93(0x156)]+_0x4d6e93(0x169)):_0x2a3706=[..._0x3de02b,_0x1c4b07['userId']]:!_0x2d29ce?_0x4569ba['push'](_0x4d6e93(0x19b)+_0x1c4b07['userId']+_0x4d6e93(0x1a5)+_0x185d2a['roleName']+_0x4d6e93(0x169)):(_0x2a3706=_0x3de02b[_0x4d6e93(0x159)](_0x1fa498=>_0x1fa498!==_0x1c4b07[_0x4d6e93(0x17a)]),_0x4ecf46[_0x4d6e93(0x191)]>0x1&&_0x4569ba[_0x4d6e93(0x19c)](_0x4d6e93(0x199)+_0x4ecf46[_0x4d6e93(0x191)]+_0x4d6e93(0x195)+_0x1c4b07[_0x4d6e93(0x17a)]+'.'));const _0x59dc47={'scope':_0x4d6e93(0x160),'operation':_0x3c7067,'selector':{'appCode':_0x484c69,'roleId':_0x185d2a['id'],'roleName':_0x185d2a[_0x4d6e93(0x156)],'userId':_0x1c4b07[_0x4d6e93(0x17a)]},'before':{'userIds':_0x3de02b},'after':{'userIds':_0x2a3706},'dryRun':_0x327007[_0x4d6e93(0x15c)],'backend':{'method':_0x4d6e93(0x168),'path':_0x3c7067==='user-add'?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x4569ba};return{'mutation':_0x59dc47,'changed':_0x2769eb,'matchingRelationIds':_0x4ecf46};}export async function loadDevRoleRelations(_0x15b478,_0x3d2bdb){const _0x2277ea=a184_0x467833,_0x459ece=0x64,_0x48b370=[];for(let _0x2bec90=0x1;;_0x2bec90+=0x1){const {items:_0x1b4774,paging:_0x31d521}=await listDevUserRoleRelations(_0x15b478,{'roleId':_0x3d2bdb,'currentPage':_0x2bec90,'pageSize':_0x459ece});_0x48b370[_0x2277ea(0x19c)](..._0x1b4774);if(_0x1b4774['length']<_0x459ece||_0x31d521&&_0x48b370[_0x2277ea(0x191)]>=_0x31d521[_0x2277ea(0x192)])return _0x48b370;}}export function readRoleRef(_0x4d8b37){const _0x82f583=a184_0x467833,_0x179b8d=_0x4d8b37['str'](_0x82f583(0x1a1))[_0x82f583(0x165)]();if(!_0x179b8d)throw CliErrors[_0x82f583(0x171)](_0x82f583(0x1a1),_0x82f583(0x15e));return _0x179b8d;}export async function prepareUserMutation(_0x56b0e3,_0x12c79d,_0xa524f7){const _0x3ad07a=a184_0x467833,_0x39086d=readRoleRef(_0x56b0e3),_0x29a224=_0x56b0e3[_0x3ad07a(0x19f)](_0x3ad07a(0x164))[_0x3ad07a(0x165)]();if(!_0x29a224)throw CliErrors[_0x3ad07a(0x171)](_0x3ad07a(0x164),_0x3ad07a(0x189));const _0x23123d=_0x56b0e3[_0x3ad07a(0x179)]('expect-user-count'),_0x21cf81=_0x23123d===undefined||_0x23123d===null?undefined:Number(_0x23123d),_0x29acb8=await resolveRoleRef(_0x56b0e3[_0x3ad07a(0x185)],_0x39086d);if(_0x29acb8[_0x3ad07a(0x188)]==='OWNER')throw CliErrors[_0x3ad07a(0x190)](_0x3ad07a(0x15d)+_0x12c79d+_0x3ad07a(0x172),_0x3ad07a(0x19a));const _0x59f1b4=await resolveUserRef(_0x29a224),_0x31fb45=await loadDevRoleRelations(_0x56b0e3[_0x3ad07a(0x185)],_0x29acb8['id']);return{...computeRoleUserMutation({'operation':_0x12c79d,'appCode':_0x56b0e3[_0x3ad07a(0x185)],'role':_0x29acb8,'relations':_0x31fb45,'user':{'userId':_0x59f1b4[_0x3ad07a(0x17a)],'username':_0x59f1b4['username'],'nickname':_0x59f1b4[_0x3ad07a(0x1a6)]},'dryRun':_0xa524f7,..._0x21cf81!==undefined?{'expectUserCount':_0x21cf81}:{}}),'role':_0x29acb8,'user':_0x59f1b4};}
1
+ const a184_0x2422c2=a184_0x305a;function a184_0x61ab(){const _0x25aa8a=['1871622WOxIOL','name','map','No\x20tenant\x20member\x20matches\x20\x22','Missing\x20role\x20reference.','718883qRwWGS','toLowerCase','\x20built-in\x20role\x20','380380FehUoC','5lshgvx','tenant_code','includes','user-add','string','str','16RVSwVt','username','join','ADMIN','\x22\x20not\x20found\x20in\x20app\x20','permitCount','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.','validation','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs',';\x20no\x20change.','Multiple\x20tenant\x20members\x20match\x20\x22','tenant','\x20member(s)\x20but\x20role\x20has\x20','trim','\x22:\x20','Pass\x20--user\x20<id|name>.','\x20duplicate\x20memberships\x20for\x20user\x20','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','\x20members\x20of\x20the\x20OWNER\x20role.','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','filter','733781RUCFyn','Removed\x20','OWNER','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','Optional\x20role\x20remark/description','userCount','Role\x20id\x20or\x20exact\x20role\x20name','flag','Cannot\x20','Pass\x20--role\x20<id|name>.','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','find','Role\x20id\x20','userId','Role\x20id\x20(from\x20`role\x20list`)','user','User\x20','role','Anti-drift\x20check\x20failed:\x20expected\x20','3rgXcLi','flagMissing','\x22\x20is\x20ambiguous\x20(ids:\x20','Check\x20the\x20nickname/username.\x20','appCode','number','10Wahcej','1497276HCAqwY','DEV','POST','test','expectUserCount','nickname','expect-user-count','length','authRequired','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','totalCount','push','\x20is\x20already\x20a\x20member\x20of\x20role\x20','1325680gqNtSH','roleType','3060186xdsKGe','roleName','Role\x20name\x20\x22','Disambiguate\x20with\x20--role\x20<id>.','Role\x20name'];a184_0x61ab=function(){return _0x25aa8a;};return a184_0x61ab();}(function(_0x1ed78d,_0x62d308){const _0x5890d2=a184_0x305a,_0x13cf4e=_0x1ed78d();while(!![]){try{const _0x61c2d6=-parseInt(_0x5890d2(0x11f))/0x1+parseInt(_0x5890d2(0x139))/0x2+parseInt(_0x5890d2(0x132))/0x3*(parseInt(_0x5890d2(0x146))/0x4)+-parseInt(_0x5890d2(0x156))/0x5*(-parseInt(_0x5890d2(0x148))/0x6)+-parseInt(_0x5890d2(0x155))/0x7+parseInt(_0x5890d2(0x15c))/0x8*(-parseInt(_0x5890d2(0x14d))/0x9)+-parseInt(_0x5890d2(0x138))/0xa*(-parseInt(_0x5890d2(0x152))/0xb);if(_0x61c2d6===_0x62d308)break;else _0x13cf4e['push'](_0x13cf4e['shift']());}catch(_0x4e6c58){_0x13cf4e['push'](_0x13cf4e['shift']());}}}(a184_0x61ab,0x6e34d));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':a184_0x2422c2(0x137),'required':!![],'description':a184_0x2422c2(0x12d)};export const ROLE_REF_FLAG={'name':a184_0x2422c2(0x130),'type':'string','required':!![],'description':a184_0x2422c2(0x125)};export const USER_REF_FLAG={'name':a184_0x2422c2(0x12e),'type':a184_0x2422c2(0x15a),'required':!![],'description':a184_0x2422c2(0x129)};export const NAME_FLAG={'name':a184_0x2422c2(0x14e),'type':a184_0x2422c2(0x15a),'required':!![],'description':a184_0x2422c2(0x14c)};export const USER_NAME_FLAG={'name':a184_0x2422c2(0x14e),'type':a184_0x2422c2(0x15a),'required':!![],'description':a184_0x2422c2(0x11d)};export const REMARK_FLAG={'name':'remark','type':a184_0x2422c2(0x15a),'required':![],'description':a184_0x2422c2(0x123)};export const EXPECT_USER_COUNT_FLAG={'name':a184_0x2422c2(0x13f),'type':'number','required':![],'description':a184_0x2422c2(0x112)};export const BUILTIN_ROLE_TYPES=[a184_0x2422c2(0x15f),a184_0x2422c2(0x13a),'OWNER'];export function isBuiltinRole(_0x568921){const _0x557685=a184_0x2422c2;return BUILTIN_ROLE_TYPES[_0x557685(0x158)](_0x568921);}export function assertCustomRole(_0x13027e,_0x443125){const _0x5c86c5=a184_0x2422c2;if(_0x13027e['roleType']!=='CUSTOM')throw CliErrors[_0x5c86c5(0x111)](_0x5c86c5(0x127)+_0x443125+_0x5c86c5(0x154)+_0x13027e[_0x5c86c5(0x149)]+'\x20('+_0x13027e['roleType']+').',_0x5c86c5(0x122));}export function projectRole(_0x30a947){const _0x1f3d16=a184_0x2422c2;return{'id':_0x30a947['id'],'roleName':_0x30a947[_0x1f3d16(0x149)],'roleType':_0x30a947[_0x1f3d16(0x147)],'remark':_0x30a947['remark'],'userCount':_0x30a947[_0x1f3d16(0x124)],'permitCount':_0x30a947[_0x1f3d16(0x10f)],'builtin':isBuiltinRole(_0x30a947['roleType'])};}export async function resolveRoleRef(_0x38ccab,_0x15f584){const _0x4b17ea=a184_0x2422c2,_0x5aa474=_0x15f584[_0x4b17ea(0x117)]();if(!_0x5aa474)throw CliErrors[_0x4b17ea(0x111)](_0x4b17ea(0x151),_0x4b17ea(0x128));if(/^\d+$/[_0x4b17ea(0x13c)](_0x5aa474))return getRoleById(_0x38ccab,Number(_0x5aa474));const _0x311684=await listAllAppRoles(_0x38ccab),_0x443b72=_0x311684[_0x4b17ea(0x11e)](_0x10c797=>_0x10c797['roleName']===_0x5aa474);if(_0x443b72[_0x4b17ea(0x140)]===0x0)throw CliErrors[_0x4b17ea(0x111)]('Role\x20name\x20\x22'+_0x5aa474+_0x4b17ea(0x160)+_0x38ccab+'.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.');if(_0x443b72[_0x4b17ea(0x140)]>0x1){const _0x31df42=_0x443b72['map'](_0x520fc5=>_0x520fc5['id'])['join'](',\x20');throw CliErrors[_0x4b17ea(0x111)](_0x4b17ea(0x14a)+_0x5aa474+_0x4b17ea(0x134)+_0x31df42+').',_0x4b17ea(0x14b));}return _0x443b72[0x0];}export async function getRoleById(_0x374d44,_0x49b2a9){const _0x499680=a184_0x2422c2,_0x211356=await listAllAppRoles(_0x374d44),_0x2cf66d=_0x211356[_0x499680(0x11e)](_0x23a966=>_0x23a966['id']===_0x49b2a9&&(!_0x23a966[_0x499680(0x136)]||_0x23a966[_0x499680(0x136)]===_0x374d44));if(_0x2cf66d[_0x499680(0x140)]!==0x1)throw CliErrors[_0x499680(0x111)](_0x499680(0x12b)+_0x49b2a9+'\x20not\x20found\x20in\x20app\x20'+_0x374d44+'.',_0x499680(0x11b));return _0x2cf66d[0x0];}function a184_0x305a(_0x1123d0,_0x40c7bc){_0x1123d0=_0x1123d0-0x10f;const _0x61ab87=a184_0x61ab();let _0x305a47=_0x61ab87[_0x1123d0];return _0x305a47;}async function listAllAppRoles(_0x29b162){const _0x1ebacb=a184_0x2422c2,_0x56292c=0x64,_0x14da4d=[];for(let _0x1be1fa=0x1;;_0x1be1fa+=0x1){const {items:_0x27b29e,paging:_0x43cd65}=await listAppRoles(_0x29b162,{'currentPage':_0x1be1fa,'pageSize':_0x56292c});_0x14da4d[_0x1ebacb(0x144)](..._0x27b29e);if(_0x27b29e[_0x1ebacb(0x140)]<_0x56292c||_0x43cd65&&_0x14da4d[_0x1ebacb(0x140)]>=_0x43cd65[_0x1ebacb(0x143)])return _0x14da4d;}}export async function resolveTenantCode(){const _0x4c52e4=a184_0x2422c2,_0x54364f=await getSessionUserInfo(),_0x11e94b=_0x54364f?.[_0x4c52e4(0x12e)]?.[_0x4c52e4(0x115)]?.[_0x4c52e4(0x157)];if(!_0x11e94b)throw CliErrors[_0x4c52e4(0x141)]('Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.');return _0x11e94b;}function matchMember(_0x36e2a4,_0x5b4ecb){const _0x15593b=a184_0x2422c2,_0x4e376f=_0x5b4ecb['trim']()['toLowerCase']();return(_0x36e2a4[_0x15593b(0x13e)]??'')[_0x15593b(0x153)]()===_0x4e376f||(_0x36e2a4['username']??'')[_0x15593b(0x153)]()===_0x4e376f;}export async function resolveUserRef(_0x475c2f,_0x13d61e='Pass\x20--user\x20<id>.'){const _0x15421d=a184_0x2422c2,_0x4801be=_0x475c2f['trim']();if(!_0x4801be)throw CliErrors['validation']('Missing\x20user\x20reference.','Pass\x20--user\x20<id|name>.');const _0x50bdde=await resolveTenantCode(),_0x13afea=await getTenantMembers(_0x50bdde);if(/^\d+$/[_0x15421d(0x13c)](_0x4801be)){const _0xaa5706=Number(_0x4801be),_0x42e8ff=_0x13afea[_0x15421d(0x12a)](_0x23ffa8=>_0x23ffa8[_0x15421d(0x12c)]===_0xaa5706);return{'userId':_0xaa5706,'username':_0x42e8ff?.[_0x15421d(0x15d)]??String(_0xaa5706),'nickname':_0x42e8ff?.[_0x15421d(0x13e)],'matchedBy':'id'};}const _0x516e1e=_0x13afea[_0x15421d(0x11e)](_0x515a88=>matchMember(_0x515a88,_0x4801be));if(_0x516e1e['length']===0x0)throw CliErrors[_0x15421d(0x111)](_0x15421d(0x150)+_0x4801be+'\x22.',_0x15421d(0x135)+_0x13d61e);if(_0x516e1e[_0x15421d(0x140)]>0x1){const _0x406530=_0x516e1e[_0x15421d(0x14f)](_0x48adf8=>(_0x48adf8[_0x15421d(0x13e)]??_0x48adf8['username']??'?')+'('+_0x48adf8[_0x15421d(0x12c)]+')')[_0x15421d(0x15e)](',\x20');throw CliErrors[_0x15421d(0x111)](_0x15421d(0x114)+_0x4801be+_0x15421d(0x118)+_0x406530+'.',_0x13d61e);}const _0x2c77ee=_0x516e1e[0x0];return{'userId':_0x2c77ee['userId'],'username':_0x2c77ee[_0x15421d(0x15d)]??String(_0x2c77ee[_0x15421d(0x12c)]),'nickname':_0x2c77ee['nickname'],'matchedBy':_0x15421d(0x14e)};}export const CREATE_USER_ROLE_PATH='/smartapi/permit/user-role/create';export const DELETE_USER_ROLE_PATH='/smartapi/permit/user-role/delete';export function computeRoleUserMutation(_0x40e4de){const _0x43c459=a184_0x2422c2,{operation:_0x593ae4,appCode:_0x57920e,role:_0x27ec3c,relations:_0x486b6d,user:_0x1f3539}=_0x40e4de,_0x29d052=[...new Set(_0x486b6d[_0x43c459(0x14f)](_0xca4b07=>_0xca4b07[_0x43c459(0x12c)]))],_0x4326d0=[];if(_0x40e4de['expectUserCount']!==undefined&&_0x40e4de[_0x43c459(0x13d)]!==_0x29d052['length'])throw CliErrors['validation'](_0x43c459(0x131)+_0x40e4de[_0x43c459(0x13d)]+_0x43c459(0x116)+_0x29d052[_0x43c459(0x140)]+'.',_0x43c459(0x142));const _0x499a9e=_0x29d052['includes'](_0x1f3539[_0x43c459(0x12c)]),_0x29b70d=_0x486b6d[_0x43c459(0x11e)](_0x394412=>_0x394412[_0x43c459(0x12c)]===_0x1f3539[_0x43c459(0x12c)])[_0x43c459(0x14f)](_0x2772ad=>_0x2772ad['id']),_0x538988=_0x593ae4===_0x43c459(0x159)?!_0x499a9e:_0x499a9e;let _0x282298=_0x29d052;_0x593ae4===_0x43c459(0x159)?_0x499a9e?_0x4326d0[_0x43c459(0x144)](_0x43c459(0x12f)+_0x1f3539[_0x43c459(0x12c)]+_0x43c459(0x145)+_0x27ec3c[_0x43c459(0x149)]+_0x43c459(0x113)):_0x282298=[..._0x29d052,_0x1f3539['userId']]:!_0x499a9e?_0x4326d0[_0x43c459(0x144)](_0x43c459(0x12f)+_0x1f3539['userId']+'\x20is\x20not\x20a\x20member\x20of\x20role\x20'+_0x27ec3c['roleName']+_0x43c459(0x113)):(_0x282298=_0x29d052[_0x43c459(0x11e)](_0x3abd9b=>_0x3abd9b!==_0x1f3539[_0x43c459(0x12c)]),_0x29b70d[_0x43c459(0x140)]>0x1&&_0x4326d0[_0x43c459(0x144)](_0x43c459(0x120)+_0x29b70d[_0x43c459(0x140)]+_0x43c459(0x11a)+_0x1f3539[_0x43c459(0x12c)]+'.'));const _0x1ae02b={'scope':'dev','operation':_0x593ae4,'selector':{'appCode':_0x57920e,'roleId':_0x27ec3c['id'],'roleName':_0x27ec3c[_0x43c459(0x149)],'userId':_0x1f3539['userId']},'before':{'userIds':_0x29d052},'after':{'userIds':_0x282298},'dryRun':_0x40e4de['dryRun'],'backend':{'method':_0x43c459(0x13b),'path':_0x593ae4===_0x43c459(0x159)?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x4326d0};return{'mutation':_0x1ae02b,'changed':_0x538988,'matchingRelationIds':_0x29b70d};}export async function loadDevRoleRelations(_0x210d93,_0x14aa2a){const _0xb62307=a184_0x2422c2,_0x10cb61=0x64,_0x5dab1d=[];for(let _0x5b160c=0x1;;_0x5b160c+=0x1){const {items:_0x53d9c1,paging:_0x1cbff4}=await listDevUserRoleRelations(_0x210d93,{'roleId':_0x14aa2a,'currentPage':_0x5b160c,'pageSize':_0x10cb61});_0x5dab1d[_0xb62307(0x144)](..._0x53d9c1);if(_0x53d9c1[_0xb62307(0x140)]<_0x10cb61||_0x1cbff4&&_0x5dab1d[_0xb62307(0x140)]>=_0x1cbff4[_0xb62307(0x143)])return _0x5dab1d;}}export function readRoleRef(_0x376d23){const _0x77e397=a184_0x2422c2,_0xcb5c54=_0x376d23['str'](_0x77e397(0x130))[_0x77e397(0x117)]();if(!_0xcb5c54)throw CliErrors[_0x77e397(0x133)](_0x77e397(0x130),_0x77e397(0x128));return _0xcb5c54;}export async function prepareUserMutation(_0x3f2cab,_0x3c8d6f,_0x472b08){const _0x2e29fb=a184_0x2422c2,_0x1f2709=readRoleRef(_0x3f2cab),_0x442c2e=_0x3f2cab[_0x2e29fb(0x15b)](_0x2e29fb(0x12e))[_0x2e29fb(0x117)]();if(!_0x442c2e)throw CliErrors[_0x2e29fb(0x133)]('user',_0x2e29fb(0x119));const _0x50a04a=_0x3f2cab[_0x2e29fb(0x126)](_0x2e29fb(0x13f)),_0x5e0e95=_0x50a04a===undefined||_0x50a04a===null?undefined:Number(_0x50a04a),_0x3f9baf=await resolveRoleRef(_0x3f2cab[_0x2e29fb(0x136)],_0x1f2709);if(_0x3f9baf[_0x2e29fb(0x147)]===_0x2e29fb(0x121))throw CliErrors[_0x2e29fb(0x111)]('Cannot\x20'+_0x3c8d6f+_0x2e29fb(0x11c),_0x2e29fb(0x110));const _0x311a9c=await resolveUserRef(_0x442c2e),_0x1bc505=await loadDevRoleRelations(_0x3f2cab[_0x2e29fb(0x136)],_0x3f9baf['id']);return{...computeRoleUserMutation({'operation':_0x3c8d6f,'appCode':_0x3f2cab[_0x2e29fb(0x136)],'role':_0x3f9baf,'relations':_0x1bc505,'user':{'userId':_0x311a9c[_0x2e29fb(0x12c)],'username':_0x311a9c[_0x2e29fb(0x15d)],'nickname':_0x311a9c[_0x2e29fb(0x13e)]},'dryRun':_0x472b08,..._0x5e0e95!==undefined?{'expectUserCount':_0x5e0e95}:{}}),'role':_0x3f9baf,'user':_0x311a9c};}