@lovrabet/rabetbase-cli 2.5.1-beta.5 → 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 (319) 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.d.ts +0 -16
  237. package/lib/core/api-client.js +1 -1
  238. package/lib/core/bff/config.js +1 -1
  239. package/lib/core/bff/file-system.js +1 -1
  240. package/lib/core/bff/hash.js +1 -1
  241. package/lib/core/bff/lock.js +1 -1
  242. package/lib/core/bff/utils.js +1 -1
  243. package/lib/core/db-resolver.js +1 -1
  244. package/lib/core/kb-search-client.d.ts +30 -0
  245. package/lib/core/kb-search-client.js +1 -0
  246. package/lib/core/page/file-system.js +1 -1
  247. package/lib/core/page/hash.js +1 -1
  248. package/lib/core/page/lock.js +1 -1
  249. package/lib/core/sql-index-auditor.js +1 -1
  250. package/lib/core/sql-sync/config.js +1 -1
  251. package/lib/core/sql-sync/file-system.js +1 -1
  252. package/lib/core/sql-sync/hash.js +1 -1
  253. package/lib/core/sql-sync/lock.js +1 -1
  254. package/lib/core/sql-sync/utils.js +1 -1
  255. package/lib/core/sql-validator.js +1 -1
  256. package/lib/errors.js +1 -1
  257. package/lib/framework/build-all-flags.js +1 -1
  258. package/lib/framework/error-output.js +1 -1
  259. package/lib/framework/explicit-yes.js +1 -1
  260. package/lib/framework/flags.js +1 -1
  261. package/lib/framework/help.js +1 -1
  262. package/lib/framework/index.js +1 -1
  263. package/lib/framework/output.js +1 -1
  264. package/lib/framework/response.js +1 -1
  265. package/lib/framework/runner-alias.js +1 -1
  266. package/lib/framework/runner.js +1 -1
  267. package/lib/framework/schema-export.js +1 -1
  268. package/lib/framework/types.d.ts +1 -0
  269. package/lib/framework/types.js +1 -1
  270. package/lib/generated/build-info.d.ts +4 -4
  271. package/lib/generated/build-info.js +1 -1
  272. package/lib/generated/official-routing.js +1 -1
  273. package/lib/generated/routing-contract.js +1 -1
  274. package/lib/help.js +1 -1
  275. package/lib/postinstall.js +1 -1
  276. package/lib/runtime/confirmation.js +1 -1
  277. package/lib/runtime/event.js +1 -1
  278. package/lib/runtime/index.js +1 -1
  279. package/lib/runtime/queue.js +1 -1
  280. package/lib/runtime/resolve.js +1 -1
  281. package/lib/skills/builtin-skill.js +1 -1
  282. package/lib/skills/main.js +1 -1
  283. package/lib/skills/npx-skills-add.js +1 -1
  284. package/lib/skills/skill-presence.js +1 -1
  285. package/lib/telemetry/cli-command-trace.js +1 -1
  286. package/lib/telemetry/cli-help-trace.js +1 -1
  287. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  288. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  289. package/lib/telemetry/send-cli-trace-log.js +1 -1
  290. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  291. package/lib/utils/ai_config.js +1 -1
  292. package/lib/utils/apply-jq-filter.js +1 -1
  293. package/lib/utils/cdn-config.js +1 -1
  294. package/lib/utils/check-sdk-version.js +1 -1
  295. package/lib/utils/cli-version-check.js +1 -1
  296. package/lib/utils/cli-version-policy.js +1 -1
  297. package/lib/utils/config.js +1 -1
  298. package/lib/utils/entity-with-id.js +1 -1
  299. package/lib/utils/file-utils.js +1 -1
  300. package/lib/utils/guides-cdn.js +1 -1
  301. package/lib/utils/http-client.js +1 -1
  302. package/lib/utils/is-non-interactive.js +1 -1
  303. package/lib/utils/logger.js +1 -1
  304. package/lib/utils/params.js +1 -1
  305. package/lib/utils/platform.js +1 -1
  306. package/lib/utils/sleep.js +1 -1
  307. package/lib/utils/template-replacer.js +1 -1
  308. package/lib/utils/update-notice.js +1 -1
  309. package/lib/utils/version.js +1 -1
  310. package/lib/utils/with-active-cookie.js +1 -1
  311. package/lib/utils/write-cli-side-channel.js +1 -1
  312. package/package.json +1 -1
  313. package/skills/rabetbase/SKILL.md +3 -3
  314. package/skills/rabetbase/references/rabetbase-config.md +1 -1
  315. package/skills/rabetbase/references/rabetbase-database-template.md +36 -0
  316. package/skills/rabetbase/references/rabetbase-doctor.md +1 -1
  317. package/skills/rabetbase/references/rabetbase-kb.md +8 -7
  318. package/skills/rabetbase/references/rabetbase-rule.md +15 -0
  319. package/skills/rabetbase.manifest.json +4 -3
@@ -1 +1 @@
1
- (function(_0x2307e4,_0x306440){const _0x53336e=a171_0x508f,_0x557311=_0x2307e4();while(!![]){try{const _0x28cd75=parseInt(_0x53336e(0x12f))/0x1+parseInt(_0x53336e(0x151))/0x2*(-parseInt(_0x53336e(0x13e))/0x3)+-parseInt(_0x53336e(0x12a))/0x4*(-parseInt(_0x53336e(0x141))/0x5)+parseInt(_0x53336e(0x14e))/0x6*(-parseInt(_0x53336e(0x14d))/0x7)+parseInt(_0x53336e(0x12e))/0x8*(-parseInt(_0x53336e(0x131))/0x9)+parseInt(_0x53336e(0x147))/0xa*(-parseInt(_0x53336e(0x13a))/0xb)+parseInt(_0x53336e(0x135))/0xc;if(_0x28cd75===_0x306440)break;else _0x557311['push'](_0x557311['shift']());}catch(_0x4018f7){_0x557311['push'](_0x557311['shift']());}}}(a171_0x48a9,0x2d9a5));import{createWriteStream}from'node:fs';import a171_0x51163b from'node:fs/promises';import a171_0x53faac from'node:path';import{pipeline}from'node:stream/promises';import a171_0x28283c from'yauzl';function a171_0x508f(_0x4884ef,_0x33b4c2){_0x4884ef=_0x4884ef-0x125;const _0x48a9f3=a171_0x48a9();let _0x508f26=_0x48a9f3[_0x4884ef];return _0x508f26;}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(_0x429fd8){return new Promise((_0x53fc7a,_0x459159)=>{a171_0x28283c['open'](_0x429fd8,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x286ce5,_0x1ccfe2)=>{const _0x14ff1f=a171_0x508f;if(_0x286ce5||!_0x1ccfe2){_0x459159(_0x286ce5||new Error(_0x14ff1f(0x13c)));return;}_0x53fc7a(_0x1ccfe2);});});}function openEntryStream(_0x58cb05,_0xdfd256){return new Promise((_0x1ae391,_0x51069c)=>{const _0x37b651=a171_0x508f;_0x58cb05[_0x37b651(0x14a)](_0xdfd256,(_0x771295,_0x346a97)=>{const _0x29ff76=_0x37b651;if(_0x771295||!_0x346a97){_0x51069c(_0x771295||new Error('Unable\x20to\x20read\x20ZIP\x20entry:\x20'+_0xdfd256[_0x29ff76(0x137)]));return;}_0x1ae391(_0x346a97);});});}function validateEntryPath(_0x5ebd94){const _0x5917fb=a171_0x508f,_0x1bc078=_0x5ebd94[_0x5917fb(0x126)](/\\/g,'/'),_0x188083=_0x1bc078[_0x5917fb(0x138)]('/'),_0x4a0f49=_0x188083?_0x1bc078[_0x5917fb(0x12d)](0x0,-0x1):_0x1bc078;if(!_0x4a0f49||_0x1bc078[_0x5917fb(0x150)]('/')||/^[A-Za-z]:\//[_0x5917fb(0x139)](_0x1bc078))throw new Error(_0x5917fb(0x132)+_0x5ebd94);const _0x29151b=_0x4a0f49[_0x5917fb(0x127)]('/');for(const _0x574bca of _0x29151b){if(!_0x574bca||_0x574bca==='.'||_0x574bca==='..'||_0x574bca[_0x5917fb(0x138)]('.')||_0x574bca['endsWith']('\x20')||WINDOWS_INVALID_CHAR[_0x5917fb(0x139)](_0x574bca)||WINDOWS_RESERVED_NAME['test'](_0x574bca))throw new Error('Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20'+_0x5ebd94);}return{'relativePath':_0x29151b[_0x5917fb(0x146)](a171_0x53faac[_0x5917fb(0x144)]),'directory':_0x188083};}function isSymbolicLink(_0x2d94cc){const _0x457ac3=_0x2d94cc['externalFileAttributes']>>>0x10&0xffff;return(_0x457ac3&0xf000)===0xa000;}function a171_0x48a9(){const _0x403188=['error','startsWith','27826pjNpXm','add','replace','split','dirname','en-US','76QhiXFN','entry','has','slice','1528tLxZFa','233237pVTcRA','mkdir','3303IOOREM','Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20','\x20entries.','ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20','8716896FXZPrS','Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20','fileName','endsWith','test','1672eUsGjC','once','Unable\x20to\x20open\x20project\x20template\x20archive.','get','57cVyMmo','close','Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20','26295hvkaWJ','Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20','readEntry','sep','end','join','11870mpTNCF','resolve','uncompressedSize','openReadStream','isEncrypted','Project\x20template\x20ZIP\x20exceeds\x20','2505363aQKyqL','6KDStJP'];a171_0x48a9=function(){return _0x403188;};return a171_0x48a9();}export async function extractProjectTemplateArchive(_0x151664,_0x3264a3){const _0x562418=a171_0x508f,_0x470271=await openZip(_0x151664),_0x38805f=a171_0x53faac[_0x562418(0x148)](_0x3264a3),_0x4e986b=new Set(),_0x991ba5=new Map();let _0xb7f5b=0x0,_0x454196=0x0;await a171_0x51163b[_0x562418(0x130)](_0x38805f,{'recursive':!![]}),await new Promise((_0x336a78,_0x558e8f)=>{const _0x20a5d7=_0x562418;let _0x3ed171=![];const _0x4ec62f=_0x531b35=>{const _0x52283e=a171_0x508f;if(_0x3ed171)return;_0x3ed171=!![],_0x470271[_0x52283e(0x13f)](),_0x558e8f(_0x531b35 instanceof Error?_0x531b35:new Error(String(_0x531b35)));};_0x470271[_0x20a5d7(0x13b)](_0x20a5d7(0x14f),_0x4ec62f),_0x470271['once'](_0x20a5d7(0x145),()=>{if(_0x3ed171)return;_0x3ed171=!![],_0x336a78();}),_0x470271['on'](_0x20a5d7(0x12b),_0x23c23b=>{void(async()=>{const _0x58580a=a171_0x508f;_0xb7f5b+=0x1,_0x454196+=_0x23c23b[_0x58580a(0x149)];if(_0xb7f5b>MAX_ENTRY_COUNT)throw new Error(_0x58580a(0x14c)+MAX_ENTRY_COUNT+_0x58580a(0x133));if(_0x454196>MAX_UNCOMPRESSED_SIZE)throw new Error('Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.');if(_0x23c23b[_0x58580a(0x14b)]())throw new Error(_0x58580a(0x142)+_0x23c23b[_0x58580a(0x137)]);if(isSymbolicLink(_0x23c23b))throw new Error(_0x58580a(0x136)+_0x23c23b[_0x58580a(0x137)]);const {relativePath:_0x3f8e19,directory:_0x5eaebb}=validateEntryPath(_0x23c23b[_0x58580a(0x137)]),_0x31f6a4=_0x3f8e19['split'](a171_0x53faac[_0x58580a(0x144)]);for(let _0x2a43f5=0x1;_0x2a43f5<=_0x31f6a4['length'];_0x2a43f5+=0x1){const _0x3696e6=_0x31f6a4[_0x58580a(0x12d)](0x0,_0x2a43f5)[_0x58580a(0x146)](a171_0x53faac[_0x58580a(0x144)]),_0x1ea3e4=_0x3696e6['toLocaleLowerCase'](_0x58580a(0x129)),_0x44669b=_0x991ba5[_0x58580a(0x13d)](_0x1ea3e4);if(_0x44669b&&_0x44669b!==_0x3696e6)throw new Error('Case-conflicting\x20ZIP\x20entry\x20path:\x20'+_0x23c23b['fileName']);_0x991ba5['set'](_0x1ea3e4,_0x3696e6);}const _0x8a5ca8=_0x3f8e19['toLocaleLowerCase'](_0x58580a(0x129));if(_0x4e986b[_0x58580a(0x12c)](_0x8a5ca8))throw new Error(_0x58580a(0x140)+_0x23c23b['fileName']);_0x4e986b[_0x58580a(0x125)](_0x8a5ca8);const _0x590c9d=a171_0x53faac['resolve'](_0x38805f,_0x3f8e19);if(_0x590c9d!==_0x38805f&&!_0x590c9d[_0x58580a(0x150)](''+_0x38805f+a171_0x53faac[_0x58580a(0x144)]))throw new Error(_0x58580a(0x134)+_0x23c23b[_0x58580a(0x137)]);if(_0x5eaebb)await a171_0x51163b[_0x58580a(0x130)](_0x590c9d,{'recursive':!![]});else{await a171_0x51163b['mkdir'](a171_0x53faac[_0x58580a(0x128)](_0x590c9d),{'recursive':!![]});const _0x24544b=await openEntryStream(_0x470271,_0x23c23b);await pipeline(_0x24544b,createWriteStream(_0x590c9d,{'flags':'wx','mode':0x1a4}));}_0x470271[_0x58580a(0x143)]();})()['catch'](_0x4ec62f);}),_0x470271[_0x20a5d7(0x143)]();});}
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_0x955976=a172_0x4d74;function a172_0x5540(){const _0x55bdfa=['70230qqNnKO','3829653fTLNMP','1116728CuMhBs','2879598Tyjvjn','396fSpeJC','dirname','2234798CnWRdx','../../../../','6425251XYtrHG','99xlzsQk','resolve','1179425ojWvdn'];a172_0x5540=function(){return _0x55bdfa;};return a172_0x5540();}(function(_0x527f24,_0x57fb1){const _0x2f704c=a172_0x4d74,_0x35924a=_0x527f24();while(!![]){try{const _0x19430c=parseInt(_0x2f704c(0x14c))/0x1+-parseInt(_0x2f704c(0x153))/0x2+parseInt(_0x2f704c(0x14e))/0x3+-parseInt(_0x2f704c(0x151))/0x4*(-parseInt(_0x2f704c(0x14d))/0x5)+parseInt(_0x2f704c(0x150))/0x6+-parseInt(_0x2f704c(0x155))/0x7+parseInt(_0x2f704c(0x14f))/0x8*(-parseInt(_0x2f704c(0x156))/0x9);if(_0x19430c===_0x57fb1)break;else _0x35924a['push'](_0x35924a['shift']());}catch(_0x49a9ac){_0x35924a['push'](_0x35924a['shift']());}}}(a172_0x5540,0xb87d6));import a172_0x9c936e from'node:path';import{fileURLToPath}from'node:url';const __dirname=a172_0x9c936e[a172_0x955976(0x152)](fileURLToPath(import.meta.url));function a172_0x4d74(_0x46c69f,_0x41cc4f){_0x46c69f=_0x46c69f-0x14c;const _0x5540d3=a172_0x5540();let _0x4d749a=_0x5540d3[_0x46c69f];return _0x4d749a;}export function getRabetbaseCliPackageRoot(){const _0x25380a=a172_0x955976;return a172_0x9c936e[_0x25380a(0x157)](__dirname,_0x25380a(0x154));}
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_0x4f9e(){const _0x4c7491=['930270mihWAG','resolve','success','error','version','now','1842vqfTqL','142aRwFhD','12229lFOqCv','749785cVqtPy','80Zixrja','11322216yGRkrh','info','11JzsTyA','428552OMpgrg','4jxZYLq','Project\x20template\x20created','copy','14461HbtaKs','source','892629wKTWAF','cwd'];a173_0x4f9e=function(){return _0x4c7491;};return a173_0x4f9e();}function a173_0xb6a0(_0x17b146,_0x363529){_0x17b146=_0x17b146-0x103;const _0x4f9ebd=a173_0x4f9e();let _0xb6a024=_0x4f9ebd[_0x17b146];return _0xb6a024;}(function(_0x3d50da,_0x3771b9){const _0x3cc1f3=a173_0xb6a0,_0x519059=_0x3d50da();while(!![]){try{const _0x388e09=-parseInt(_0x3cc1f3(0x112))/0x1*(-parseInt(_0x3cc1f3(0x107))/0x2)+parseInt(_0x3cc1f3(0x116))/0x3+parseInt(_0x3cc1f3(0x10f))/0x4*(-parseInt(_0x3cc1f3(0x109))/0x5)+parseInt(_0x3cc1f3(0x106))/0x6*(-parseInt(_0x3cc1f3(0x108))/0x7)+parseInt(_0x3cc1f3(0x10e))/0x8+-parseInt(_0x3cc1f3(0x114))/0x9*(-parseInt(_0x3cc1f3(0x10a))/0xa)+parseInt(_0x3cc1f3(0x10d))/0xb*(-parseInt(_0x3cc1f3(0x10b))/0xc);if(_0x388e09===_0x3771b9)break;else _0x519059['push'](_0x519059['shift']());}catch(_0x51ac2e){_0x519059['push'](_0x519059['shift']());}}}(a173_0x4f9e,0x87432));import a173_0x5ce79e from'node:path';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{materializeLocalProjectTemplate,materializeProjectTemplate}from'../../../commands/project/create/materialize-project-template.js';export async function copyProjectTemplate(_0x5d301b,_0x3686da,_0x415e69){const _0xf73af2=a173_0xb6a0,_0x329eb4=Date[_0xf73af2(0x105)](),_0x17f55c=a173_0x5ce79e[_0xf73af2(0x117)](process[_0xf73af2(0x115)](),_0x5d301b);try{logger[_0xf73af2(0x10c)]('copy','Starting\x20project\x20template\x20creation',{'projectCode':_0x5d301b});const _0x39e966=_0x415e69?await materializeLocalProjectTemplate(_0x415e69,_0x17f55c,_0x3686da):await materializeProjectTemplate(_0x17f55c,_0x3686da),_0x496d9e=Date[_0xf73af2(0x105)]()-_0x329eb4;logger[_0xf73af2(0x118)]('copy',_0xf73af2(0x110),_0x496d9e,{'projectCode':_0x5d301b,'templateSource':_0x39e966[_0xf73af2(0x113)],'templateVersion':_0x39e966[_0xf73af2(0x104)]});}catch(_0x1caa2b){const _0x172eff=Date[_0xf73af2(0x105)]()-_0x329eb4;logger[_0xf73af2(0x103)](_0xf73af2(0x111),'Failed\x20to\x20copy\x20project\x20template',{'projectCode':_0x5d301b,'error':_0x1caa2b instanceof Error?_0x1caa2b['message']:String(_0x1caa2b),'duration':_0x172eff});throw _0x1caa2b;}return formatElapsed(_0x329eb4);}
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(_0x547958,_0x402955){const _0x5c5163=a174_0x1efc,_0x50437c=_0x547958();while(!![]){try{const _0x2c262a=parseInt(_0x5c5163(0x18e))/0x1*(parseInt(_0x5c5163(0x199))/0x2)+-parseInt(_0x5c5163(0x187))/0x3+-parseInt(_0x5c5163(0x193))/0x4+-parseInt(_0x5c5163(0x198))/0x5*(-parseInt(_0x5c5163(0x194))/0x6)+parseInt(_0x5c5163(0x190))/0x7+parseInt(_0x5c5163(0x18d))/0x8+-parseInt(_0x5c5163(0x18f))/0x9;if(_0x2c262a===_0x402955)break;else _0x50437c['push'](_0x50437c['shift']());}catch(_0x4f1ab4){_0x50437c['push'](_0x50437c['shift']());}}}(a174_0xcbd2,0xa943e));import a174_0x118613 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a174_0xcbd2(){const _0x194705=['735618QLOTCP','format','--write','message','50ZwGKeP','94xQNRrL','Code\x20format\x20failed','error','success','3744507OrRZLx','prettier','resolve','Starting\x20code\x20format','now','cwd','10437200mGFcSg','2066nGOxcU','10773099FDHcBi','9379937pURIYL','info','npx','3317132boSAaV'];a174_0xcbd2=function(){return _0x194705;};return a174_0xcbd2();}function a174_0x1efc(_0x33fcb2,_0x4e280b){_0x33fcb2=_0x33fcb2-0x186;const _0xcbd20c=a174_0xcbd2();let _0x1efc10=_0xcbd20c[_0x33fcb2];return _0x1efc10;}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x3c51ff){const _0x145249=a174_0x1efc,_0x392019=Date[_0x145249(0x18b)](),_0x4901f9=a174_0x118613[_0x145249(0x189)](process[_0x145249(0x18c)](),_0x3c51ff);try{logger[_0x145249(0x191)]('format',_0x145249(0x18a),{'projectCode':_0x3c51ff}),await execa(resolveNpmBin(_0x145249(0x192)),[_0x145249(0x188),_0x145249(0x196),'.'],{'cwd':_0x4901f9});const _0x3c4b6a=Date['now']()-_0x392019;logger[_0x145249(0x186)](_0x145249(0x195),'Code\x20format\x20completed',_0x3c4b6a,{'projectCode':_0x3c51ff});}catch(_0x2b3ae1){const _0x29457f=Date[_0x145249(0x18b)]()-_0x392019;logger[_0x145249(0x19b)](_0x145249(0x195),_0x145249(0x19a),{'projectCode':_0x3c51ff,'error':_0x2b3ae1 instanceof Error?_0x2b3ae1[_0x145249(0x197)]:String(_0x2b3ae1),'duration':_0x29457f});throw _0x2b3ae1;}return formatElapsed(_0x392019);}
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(_0x565571,_0x555d69){const _0x25bd5f=a175_0x588d,_0x508c13=_0x565571();while(!![]){try{const _0x55ed66=-parseInt(_0x25bd5f(0x94))/0x1*(-parseInt(_0x25bd5f(0x91))/0x2)+parseInt(_0x25bd5f(0x97))/0x3+-parseInt(_0x25bd5f(0x8c))/0x4+parseInt(_0x25bd5f(0x8f))/0x5+-parseInt(_0x25bd5f(0x93))/0x6+-parseInt(_0x25bd5f(0x87))/0x7*(parseInt(_0x25bd5f(0x8e))/0x8)+parseInt(_0x25bd5f(0x89))/0x9;if(_0x55ed66===_0x555d69)break;else _0x508c13['push'](_0x508c13['shift']());}catch(_0x22f740){_0x508c13['push'](_0x508c13['shift']());}}}(a175_0x2253,0xafdaa));import a175_0x24eaa2 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a175_0x2253(){const _0x312876=['Dependency\x20install\x20completed','3866AMJpca','https://registry.npmmirror.com','6831504SshNCt','469FxAnjG','message','--registry','2393631ZyJRpS','npm','install','cwd','resolve','57442vQxMBC','now','2926440ysJUyl','Starting\x20dependency\x20install','error','4316836fibTZK','Dependency\x20install\x20failed','168cswjRf','5404015gMzmol'];a175_0x2253=function(){return _0x312876;};return a175_0x2253();}function a175_0x588d(_0x2ec374,_0xa7b420){_0x2ec374=_0x2ec374-0x85;const _0x2253b7=a175_0x2253();let _0x588d06=_0x2253b7[_0x2ec374];return _0x588d06;}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x497e27){const _0x4fb83a=a175_0x588d,_0x21db77=Date[_0x4fb83a(0x88)](),_0x52a59a=a175_0x24eaa2[_0x4fb83a(0x86)](process[_0x4fb83a(0x85)](),_0x497e27);try{logger['info'](_0x4fb83a(0x99),_0x4fb83a(0x8a),{'projectCode':_0x497e27,'registry':_0x4fb83a(0x92)}),await execa(resolveNpmBin(_0x4fb83a(0x98)),[_0x4fb83a(0x99),_0x4fb83a(0x96),_0x4fb83a(0x92)],{'cwd':_0x52a59a});const _0x2db3cb=Date[_0x4fb83a(0x88)]()-_0x21db77;logger['success'](_0x4fb83a(0x99),_0x4fb83a(0x90),_0x2db3cb,{'projectCode':_0x497e27});}catch(_0x41ced1){const _0x5c891d=Date['now']()-_0x21db77;logger[_0x4fb83a(0x8b)](_0x4fb83a(0x99),_0x4fb83a(0x8d),{'projectCode':_0x497e27,'error':_0x41ced1 instanceof Error?_0x41ced1[_0x4fb83a(0x95)]:String(_0x41ced1),'duration':_0x5c891d});throw _0x41ced1;}return formatElapsed(_0x21db77);}
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_0x5c7c93=a176_0x1f68;function a176_0x1f68(_0x5180b5,_0x422b83){_0x5180b5=_0x5180b5-0x1c5;const _0x18091d=a176_0x1809();let _0x1f68f3=_0x18091d[_0x5180b5];return _0x1f68f3;}function a176_0x1809(){const _0x4bdbfa=['Run\x20','880135dPsDMN','6204910BYGgBr','13111rfAXXj','Domain\x20routing\x20synchronized:\x20','validation','74784AwLrBl','project','4xAwMZP','5155975GgRUSr','328oMBlcX','\x20workspace\x20init\x20--appcode\x20<code>\x20in\x20the\x20project\x20directory\x20first.','9ZmvRWd','2cOFveg','path','763662fUaJkV','No\x20Rabetbase\x20project\x20configuration\x20was\x20found.','read','6013482RCemai'];a176_0x1809=function(){return _0x4bdbfa;};return a176_0x1809();}(function(_0x54e4e8,_0x2952aa){const _0x54b3ac=a176_0x1f68,_0x2932bb=_0x54e4e8();while(!![]){try{const _0x3df7a4=-parseInt(_0x54b3ac(0x1d3))/0x1*(parseInt(_0x54b3ac(0x1d1))/0x2)+-parseInt(_0x54b3ac(0x1ca))/0x3*(parseInt(_0x54b3ac(0x1cc))/0x4)+parseInt(_0x54b3ac(0x1c5))/0x5+parseInt(_0x54b3ac(0x1d6))/0x6+parseInt(_0x54b3ac(0x1c7))/0x7*(parseInt(_0x54b3ac(0x1ce))/0x8)+parseInt(_0x54b3ac(0x1d0))/0x9*(parseInt(_0x54b3ac(0x1c6))/0xa)+-parseInt(_0x54b3ac(0x1cd))/0xb;if(_0x3df7a4===_0x2952aa)break;else _0x2932bb['push'](_0x2932bb['shift']());}catch(_0x1acc67){_0x2932bb['push'](_0x2932bb['shift']());}}}(a176_0x1809,0x96f03));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_0x5c7c93(0x1cb),'command':'domain-routing-sync','description':'Synchronize\x20the\x20current\x20project\x27s\x20public\x20Domain\x20routing','risk':a176_0x5c7c93(0x1d5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(){const _0x57c539=a176_0x5c7c93,_0x1f2b1d=findProjectRootDirectory();if(!resolveConfigPath(_0x1f2b1d))throw CliErrors[_0x57c539(0x1c9)](_0x57c539(0x1d4),_0x57c539(0x1d7)+CLI_BIN_NAME+_0x57c539(0x1cf));const _0x417771=writeProjectDomainRoutingManifest(_0x1f2b1d);return{'ok':!![],'message':_0x57c539(0x1c8)+_0x417771[_0x57c539(0x1d2)],'data':_0x417771};}};
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_0x11f9a8=a177_0x3617;(function(_0x4a8e78,_0x5ba94b){const _0x5a1a1a=a177_0x3617,_0x23434a=_0x4a8e78();while(!![]){try{const _0xd88c77=parseInt(_0x5a1a1a(0x143))/0x1*(parseInt(_0x5a1a1a(0x155))/0x2)+-parseInt(_0x5a1a1a(0x157))/0x3*(-parseInt(_0x5a1a1a(0x140))/0x4)+-parseInt(_0x5a1a1a(0x149))/0x5*(-parseInt(_0x5a1a1a(0x152))/0x6)+-parseInt(_0x5a1a1a(0x141))/0x7*(parseInt(_0x5a1a1a(0x13c))/0x8)+parseInt(_0x5a1a1a(0x153))/0x9*(parseInt(_0x5a1a1a(0x156))/0xa)+-parseInt(_0x5a1a1a(0x147))/0xb+-parseInt(_0x5a1a1a(0x159))/0xc*(parseInt(_0x5a1a1a(0x14f))/0xd);if(_0xd88c77===_0x5ba94b)break;else _0x23434a['push'](_0x23434a['shift']());}catch(_0x481e6c){_0x23434a['push'](_0x23434a['shift']());}}}(a177_0x20ac,0x2856b));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a177_0x3617(_0x2cc0bb,_0x34345e){_0x2cc0bb=_0x2cc0bb-0x136;const _0x20ac43=a177_0x20ac();let _0x3617ab=_0x20ac43[_0x2cc0bb];return _0x3617ab;}function a177_0x20ac(){const _0x417f33=['boolean','844962XolqOX','9yJdhJo','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','424892vfaecS','1805410WvnYEl','524958mqXAyr','string','36uIdYxc','create','str','yes','cookie','current-dir','project','write','project-name','appcode','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]','Usage:\x20','validation','Prepared\x20local\x20project\x20template\x20directory','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','16040TtpGXg','name','../../commands/project/create/main.js','trim','4JhWGSM','259uvSirU','Skip\x20confirmation\x20prompt','1NJqvjb','upgrade','Initialize\x20the\x20current\x20empty\x20directory\x20instead\x20of\x20creating\x20a\x20child\x20directory','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','106150xvYEiT','template-source','5NiAffm','bool','env','Target\x20environment','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]\x20from\x20the\x20empty\x20target\x20directory.','--current-dir\x20cannot\x20be\x20combined\x20with\x20a\x20project\x20name.','1992198nceDSm','Create\x20a\x20new\x20project'];a177_0x20ac=function(){return _0x417f33;};return a177_0x20ac();}import{upgradeApp}from'../../commands/project/upgrade.js';import{projectDomainRoutingSyncDefinition}from'../../commands/project/domain-routing-sync.js';const createFlags=[{'name':a177_0x11f9a8(0x13d),'type':'string','description':'Project\x20name'},{'name':a177_0x11f9a8(0x14b),'type':a177_0x11f9a8(0x158),'description':a177_0x11f9a8(0x14c)},{'name':a177_0x11f9a8(0x136),'type':a177_0x11f9a8(0x158),'description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'},{'name':'current-dir','type':a177_0x11f9a8(0x151),'description':a177_0x11f9a8(0x145),'default':![]},{'name':a177_0x11f9a8(0x148),'type':a177_0x11f9a8(0x158),'description':a177_0x11f9a8(0x13a)}],upgradeFlags=[{'name':a177_0x11f9a8(0x15c),'type':a177_0x11f9a8(0x151),'description':a177_0x11f9a8(0x142),'default':![]}];export const projectDefinitions=[{'service':a177_0x11f9a8(0x15f),'command':a177_0x11f9a8(0x15a),'description':a177_0x11f9a8(0x150),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a177_0x11f9a8(0x161),'description':a177_0x11f9a8(0x13b),'required':![]}],'flags':createFlags,async 'execute'(_0x578b51){const _0x5d79f3=a177_0x11f9a8,{createApp:_0x36ca72}=await import(_0x5d79f3(0x13e)),_0x269cf0=_0x578b51[_0x5d79f3(0x15b)]('name')[_0x5d79f3(0x13f)]()||_0x578b51['args'][0x0]?.[_0x5d79f3(0x13f)](),_0x455b94=_0x578b51[_0x5d79f3(0x15b)](_0x5d79f3(0x14b))||undefined,_0x23fbde=_0x578b51[_0x5d79f3(0x15b)](_0x5d79f3(0x136))||undefined,_0x2f2ff5=_0x578b51[_0x5d79f3(0x15b)](_0x5d79f3(0x148))[_0x5d79f3(0x13f)]()||undefined,_0x223af9=_0x578b51['bool'](_0x5d79f3(0x15e));if(_0x223af9&&_0x269cf0)throw CliErrors[_0x5d79f3(0x139)](_0x5d79f3(0x14e),'Run\x20'+CLI_BIN_NAME+_0x5d79f3(0x14d));if(_0x578b51['nonInteractive']){if(!_0x269cf0&&!_0x223af9)throw CliErrors[_0x5d79f3(0x139)](_0x5d79f3(0x146),_0x5d79f3(0x138)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]\x20or\x20'+CLI_BIN_NAME+_0x5d79f3(0x137));await _0x36ca72({'projectCode':_0x269cf0,'appCode':_0x23fbde,'env':_0x455b94,'cookie':_0x578b51[_0x5d79f3(0x15d)],'currentDir':_0x223af9,'nonInteractive':!![],'templateSource':_0x2f2ff5});}else await _0x36ca72({'projectCode':_0x269cf0,'appCode':_0x23fbde,'env':_0x455b94,'cookie':_0x578b51['cookie'],'currentDir':_0x223af9,'templateSource':_0x2f2ff5});return{'ok':!![]};}},projectDomainRoutingSyncDefinition,{'service':a177_0x11f9a8(0x15f),'command':a177_0x11f9a8(0x144),'description':a177_0x11f9a8(0x154),'risk':a177_0x11f9a8(0x160),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x397120){const _0x2a8090=a177_0x11f9a8;return await upgradeApp(_0x397120['nonInteractive'],{'yes':_0x397120[_0x2a8090(0x14a)](_0x2a8090(0x15c))}),{'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_0x12f29b=a178_0x3569;(function(_0x31f9f0,_0x31c593){const _0x1ac801=a178_0x3569,_0x575f2b=_0x31f9f0();while(!![]){try{const _0x2679c7=parseInt(_0x1ac801(0xdf))/0x1*(-parseInt(_0x1ac801(0xf1))/0x2)+-parseInt(_0x1ac801(0x114))/0x3*(parseInt(_0x1ac801(0xba))/0x4)+-parseInt(_0x1ac801(0x11c))/0x5+-parseInt(_0x1ac801(0x102))/0x6+parseInt(_0x1ac801(0xb5))/0x7+parseInt(_0x1ac801(0xca))/0x8+parseInt(_0x1ac801(0x125))/0x9*(parseInt(_0x1ac801(0xd6))/0xa);if(_0x2679c7===_0x31c593)break;else _0x575f2b['push'](_0x575f2b['shift']());}catch(_0x3f867b){_0x575f2b['push'](_0x575f2b['shift']());}}}(a178_0x38ec,0x53ebe));import a178_0x5b32c1 from'chalk';function a178_0x38ec(){const _0x1ffec6=['not\x20needed','red','sdkUpgrade','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','\x20\x20#\x20or','2402260rtpiYM','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','utf8','Install\x20new\x20skill','oldPath','\x20removed\x20(','===\x20Upgrade\x20Summary\x20===','===\x20Upgrade\x20Analysis\x20===','\x20\x20Current\x20version\x20in\x20','3501JGMauT','values','files','white','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','log','green','status','[\x22@lovrabet/sdk\x22]:\x20','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','needsSkillSwap','inherit','Config\x20file:','parse','Skill\x20swap:','stringify','push','.cursor/rules/lovrabet_rules.mdc','error','862190mhHMxG','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','FAIL','Legacy\x20artifacts:','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','1386592RZJBHh','string','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','keys','\x20\x20Fields\x20to\x20migrate:\x20','entries','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','lovrabet/rabetbase','no\x20legacy\x20entry','oldArtifacts','\x20from\x20','Upgrade\x20completed\x20successfully!','no\x20matching\x20entry\x20found','\x20→\x20','removed\x20','needed','1695944TYibYH','Remove\x20.lovrabet/','latest','skipped','Upgrade\x20@lovrabet/sdk','yellow','\x20\x20\x20\x20\x20\x20\x20','fail','cwd','devDependencies','MCP\x20config:','includes','31310ilXklc','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','\x20\x20Step\x20','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','lovrabet/lovrabet-skill\x20removed','hasNewConfig','dependencies','message','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','1254UqyeuY','CANCEL','lovrabet/rabetbase\x20installed\x20globally','object','gray','join','Step\x204/7:\x20MCP\x20config\x20—\x20','.cursor/mcp.json','\x20\x20New\x20config\x20(.rabetbase.json):\x20','Remove\x20legacy\x20artifacts','none\x20found','path','\x20\x20bun\x20install','some','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','skipped\x20(no\x20legacy\x20config)','not\x20found\x20or\x20already\x20at\x20latest','@lovrabet/sdk:','36uBYCdt','detail','length','Clean\x20MCP\x20config','oldMcpConfig','Step\x206/7:\x20Installing\x20new\x20skill...','@lovrabet/dataset-mcp-server','Step\x204/7:\x20Cleaning\x20MCP\x20config...','already\x20exists\x20(will\x20merge)','\x20\x20Action:\x20delete','FOUND','bold','Step\x201/7:\x20Migrating\x20config...','succeed','done','.bak','mcpServers','2158248PxLLxq','Upgrade\x20cancelled.','label','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','@lovrabet/sdk','Config\x20migration','.lovrabet.json','not\x20found\x20(will\x20create)','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','args','.lovrabetrc','.lovrabet','yes','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','exit\x20','failed','cyan','\x20→\x20keys:\x20','3DwEDJu','start','undefined'];a178_0x38ec=function(){return _0x1ffec6;};return a178_0x38ec();}function a178_0x3569(_0x2bea17,_0x307ee3){_0x2bea17=_0x2bea17-0xac;const _0x38ec97=a178_0x38ec();let _0x3569b5=_0x38ec97[_0x2bea17];return _0x3569b5;}import a178_0x35ebd0 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_0x12f29b(0x108),a178_0x12f29b(0x10c)];function collectIdeSkillFiles(_0x4c5321){const _0x56734f=a178_0x12f29b,_0x4d60f0=[];for(const _0x5b55f7 of Object[_0x56734f(0x126)](CORE_IDE_CONFIGS)){if(_0x5b55f7[_0x56734f(0x127)])for(const _0x598e0a of _0x5b55f7['files']){_0x4d60f0[_0x56734f(0xb2)](resolve(_0x4c5321,_0x598e0a[_0x56734f(0xea)]));}}return _0x4d60f0;}function analyse(_0x8ef786){const _0x4cefb9=a178_0x12f29b;let _0x18bfe0=null;const _0x310283=resolve(_0x8ef786,NEW_CONFIG_NAME),_0x121fe6=existsSync(_0x310283);for(const _0x56cc99 of LEGACY_CONFIG_NAMES){const _0x3f1217=resolve(_0x8ef786,_0x56cc99);if(existsSync(_0x3f1217)){const _0x9847a2=readConfigFile(_0x3f1217),_0x305f93=Object[_0x4cefb9(0xbd)](_0x9847a2)['filter'](_0x5b6e61=>typeof _0x9847a2[_0x5b6e61]!==_0x4cefb9(0x116));_0x18bfe0={'oldPath':_0x3f1217,'hasNewConfig':_0x121fe6,'fields':_0x305f93};break;}}const _0x440003=[],_0x203815=resolve(_0x8ef786,_0x4cefb9(0x10d));if(existsSync(_0x203815))_0x440003['push'](_0x203815);const _0x926891=resolve(_0x8ef786,_0x4cefb9(0xb3));if(existsSync(_0x926891))_0x440003[_0x4cefb9(0xb2)](_0x926891);const _0xd9ad90=resolve(_0x8ef786,'.claude/skills/lovrabet');if(existsSync(_0xd9ad90))_0x440003[_0x4cefb9(0xb2)](_0xd9ad90);for(const _0x3de9c8 of collectIdeSkillFiles(_0x8ef786)){if(existsSync(_0x3de9c8))_0x440003['push'](_0x3de9c8);}let _0x4b00dd=null;const _0x352265=resolve(_0x8ef786,_0x4cefb9(0xe6));if(existsSync(_0x352265))try{const _0x129d44=JSON[_0x4cefb9(0xaf)](readFileSync(_0x352265,_0x4cefb9(0x11e)));if(_0x129d44?.[_0x4cefb9(0x101)]&&typeof _0x129d44[_0x4cefb9(0x101)]===_0x4cefb9(0xe2)){const _0x420099=[];for(const [_0x2b1a38,_0x402d5b]of Object['entries'](_0x129d44[_0x4cefb9(0x101)])){const _0x52a70b=_0x402d5b;_0x52a70b?.[_0x4cefb9(0x10b)]&&Array['isArray'](_0x52a70b[_0x4cefb9(0x10b)])&&_0x52a70b[_0x4cefb9(0x10b)][_0x4cefb9(0xec)](_0x4543b9=>typeof _0x4543b9===_0x4cefb9(0xbb)&&_0x4543b9[_0x4cefb9(0xd5)](_0x4cefb9(0xf7)))&&_0x420099[_0x4cefb9(0xb2)](_0x2b1a38);}_0x420099[_0x4cefb9(0xf3)]>0x0&&(_0x4b00dd={'path':_0x352265,'keys':_0x420099});}}catch{}const _0x44d1fc=_0x440003['length']>0x0||_0x18bfe0!==null;let _0x56a47a=null;const _0x41a8cb=resolve(_0x8ef786,'package.json');if(existsSync(_0x41a8cb))try{const _0x597ebe=JSON[_0x4cefb9(0xaf)](readFileSync(_0x41a8cb,_0x4cefb9(0x11e)));for(const _0x58e497 of[_0x4cefb9(0xdc),_0x4cefb9(0xd3)]){const _0x42a59a=_0x597ebe?.[_0x58e497]?.[_0x4cefb9(0x106)];if(typeof _0x42a59a===_0x4cefb9(0xbb)){_0x42a59a!==_0x4cefb9(0xcc)&&(_0x56a47a={'pkgPath':_0x41a8cb,'currentVersion':_0x42a59a,'field':_0x58e497});break;}}}catch{}return{'configMigration':_0x18bfe0,'oldArtifacts':_0x440003,'oldMcpConfig':_0x4b00dd,'needsSkillSwap':_0x44d1fc,'sdkUpgrade':_0x56a47a};}function printReport(_0xc6e15f){const _0x438221=a178_0x12f29b,{configMigration:_0x282a79,oldArtifacts:_0xdd4301,oldMcpConfig:_0x23e3ca,needsSkillSwap:_0x27f44b}=_0xc6e15f;console[_0x438221(0x12a)](''),console['log'](a178_0x5b32c1[_0x438221(0xfc)](_0x438221(0x123))),console[_0x438221(0x12a)]('');_0x282a79?(console[_0x438221(0x12a)](a178_0x5b32c1[_0x438221(0x112)](_0x438221(0xae))+('\x20\x20'+a178_0x5b32c1['yellow'](_0x282a79[_0x438221(0x120)]))),console['log'](_0x438221(0xe7)+(_0x282a79['hasNewConfig']?a178_0x5b32c1['green'](_0x438221(0xf9)):a178_0x5b32c1['gray'](_0x438221(0x109)))),console[_0x438221(0x12a)](_0x438221(0xbe)+_0x282a79['fields'][_0x438221(0xe4)](',\x20')),console['log'](_0x438221(0x10a))):console[_0x438221(0x12a)](a178_0x5b32c1[_0x438221(0x112)](_0x438221(0xae))+'\x20\x20'+a178_0x5b32c1[_0x438221(0xe3)]('no\x20legacy\x20config\x20found'));console['log']('');if(_0xdd4301[_0x438221(0xf3)]>0x0){console[_0x438221(0x12a)](a178_0x5b32c1['cyan']('Legacy\x20artifacts:'));for(const _0x5a72f9 of _0xdd4301){console[_0x438221(0x12a)]('\x20\x20'+a178_0x5b32c1[_0x438221(0x118)](_0x438221(0xfb))+'\x20\x20'+_0x5a72f9);}console[_0x438221(0x12a)](_0x438221(0xfa));}else console[_0x438221(0x12a)](a178_0x5b32c1[_0x438221(0x112)](_0x438221(0xb8))+'\x20\x20'+a178_0x5b32c1['gray'](_0x438221(0xe9)));console[_0x438221(0x12a)]('');_0x23e3ca?(console['log'](a178_0x5b32c1[_0x438221(0x112)](_0x438221(0xd4))+('\x20\x20'+a178_0x5b32c1[_0x438221(0xcf)](_0x23e3ca[_0x438221(0xea)])+_0x438221(0x113)+_0x23e3ca[_0x438221(0xbd)][_0x438221(0xe4)](',\x20'))),console[_0x438221(0x12a)](_0x438221(0xc0))):console[_0x438221(0x12a)](a178_0x5b32c1[_0x438221(0x112)](_0x438221(0xd4))+'\x20\x20'+a178_0x5b32c1[_0x438221(0xe3)](_0x438221(0xc2)));console[_0x438221(0x12a)](''),console['log'](a178_0x5b32c1['cyan'](_0x438221(0xb0))+('\x20\x20'+(_0x27f44b?a178_0x5b32c1[_0x438221(0xcf)](_0x438221(0xc9)):a178_0x5b32c1['green'](_0x438221(0x117)))));_0x27f44b&&console[_0x438221(0x12a)]('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x438221(0x12a)]('');if(_0xc6e15f[_0x438221(0x119)]){const {currentVersion:_0x1171a3,field:_0x5835c5,pkgPath:_0x3d39db}=_0xc6e15f[_0x438221(0x119)];console[_0x438221(0x12a)](a178_0x5b32c1['cyan']('@lovrabet/sdk:')+('\x20\x20'+a178_0x5b32c1[_0x438221(0xcf)](_0x3d39db))),console['log'](_0x438221(0x124)+_0x5835c5+':\x20'+a178_0x5b32c1[_0x438221(0xcf)](_0x1171a3)+_0x438221(0xc7)+a178_0x5b32c1[_0x438221(0x12b)]('latest')),console[_0x438221(0x12a)](_0x438221(0xb9));}else console['log'](a178_0x5b32c1['cyan'](_0x438221(0xf0))+'\x20\x20'+a178_0x5b32c1['gray'](_0x438221(0xef)));console[_0x438221(0x12a)]('');}function execConfigMigration(_0x14c99c,_0x2fc1d6){const _0x11873d=a178_0x12f29b,{configMigration:_0x3c9fa6}=_0x14c99c;if(!_0x3c9fa6?.['oldPath'])return{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x11873d(0xee)};const _0x5a71ea=readConfigFile(_0x3c9fa6['oldPath']),_0x1d3d5d=resolve(_0x2fc1d6,NEW_CONFIG_NAME),_0x429425=_0x3c9fa6[_0x11873d(0xdb)]?readConfigFile(_0x1d3d5d):{};for(const [_0x4ad3f7,_0x38218f]of Object[_0x11873d(0xbf)](_0x5a71ea)){!(_0x4ad3f7 in _0x429425)&&(_0x429425[_0x4ad3f7]=_0x38218f);}writeConfigFile(_0x1d3d5d,_0x429425);const _0x385a3a=_0x3c9fa6[_0x11873d(0x120)]+_0x11873d(0x100);return renameSync(_0x3c9fa6['oldPath'],_0x385a3a),{'step':0x1,'label':_0x11873d(0x107),'ok':!![],'detail':_0x3c9fa6['oldPath']+_0x11873d(0xc7)+_0x1d3d5d+'\x20(backup:\x20'+_0x385a3a+')'};}function execRemoveOldArtifacts(_0x1b9038){const _0x1f7962=a178_0x12f29b,_0x24ab1c=[];for(const _0x40a1f7 of _0x1b9038){try{if(!existsSync(_0x40a1f7))continue;const _0x3ae979=tryStat(_0x40a1f7);_0x3ae979?.['isDirectory']()?rmSync(_0x40a1f7,{'recursive':!![],'force':!![]}):unlinkSync(_0x40a1f7);}catch(_0x1667e1){_0x24ab1c[_0x1f7962(0xb2)](_0x40a1f7+':\x20'+_0x1667e1[_0x1f7962(0xdd)]);}}return{'step':0x3,'label':_0x1f7962(0xe8),'ok':_0x24ab1c['length']===0x0,'detail':_0x24ab1c['length']>0x0?_0x1b9038[_0x1f7962(0xf3)]-_0x24ab1c['length']+'/'+_0x1b9038[_0x1f7962(0xf3)]+_0x1f7962(0x121)+_0x24ab1c[_0x1f7962(0xe4)](';\x20')+')':_0x1b9038[_0x1f7962(0xf3)]+'\x20removed'};}function execCleanMcp(_0x3b9179){const _0x2391c4=a178_0x12f29b;if(!_0x3b9179[_0x2391c4(0xf5)])return{'step':0x4,'label':_0x2391c4(0xf4),'ok':!![],'detail':'skipped'};try{const _0x4d18be=readFileSync(_0x3b9179[_0x2391c4(0xf5)][_0x2391c4(0xea)],_0x2391c4(0x11e)),_0xe1ace8=JSON['parse'](_0x4d18be);if(_0xe1ace8?.['mcpServers']&&typeof _0xe1ace8['mcpServers']===_0x2391c4(0xe2)){const _0x2c53ee=[];for(const [_0x4e24a5,_0x30409a]of Object[_0x2391c4(0xbf)](_0xe1ace8['mcpServers'])){_0x30409a?.[_0x2391c4(0x10b)]&&Array['isArray'](_0x30409a[_0x2391c4(0x10b)])&&_0x30409a['args'][_0x2391c4(0xec)](_0x2751e8=>typeof _0x2751e8===_0x2391c4(0xbb)&&_0x2751e8[_0x2391c4(0xd5)]('@lovrabet/dataset-mcp-server'))&&_0x2c53ee['push'](_0x4e24a5);}for(const _0x57ec25 of _0x2c53ee){delete _0xe1ace8[_0x2391c4(0x101)][_0x57ec25];}return _0x2c53ee['length']>0x0&&writeFileSync(_0x3b9179[_0x2391c4(0xf5)][_0x2391c4(0xea)],JSON['stringify'](_0xe1ace8,null,0x2)+'\x0a',_0x2391c4(0x11e)),{'step':0x4,'label':_0x2391c4(0xf4),'ok':!![],'detail':_0x2391c4(0xc8)+_0x2c53ee[_0x2391c4(0xe4)](',\x20')+_0x2391c4(0xc4)+_0x3b9179['oldMcpConfig'][_0x2391c4(0xea)]};}return{'step':0x4,'label':_0x2391c4(0xf4),'ok':!![],'detail':_0x2391c4(0xc6)};}catch(_0xa92672){return{'step':0x4,'label':_0x2391c4(0xf4),'ok':![],'detail':_0xa92672[_0x2391c4(0xdd)]};}}function execSkillsRemove(_0x1e1523,_0x2cc1d1){const _0x55be30=a178_0x12f29b,_0x1610e6=runNpxSkillsRemove(_0x1e1523,{'stdio':_0x55be30(0xad),'yes':_0x2cc1d1});return{'step':0x5,'label':'Remove\x20old\x20skill','ok':_0x1610e6['ok'],'detail':_0x1610e6['ok']?_0x55be30(0xda):_0x1610e6[_0x55be30(0xb4)]??_0x55be30(0x110)+_0x1610e6[_0x55be30(0x12c)]};}function execSkillsAdd(_0x255503,_0xf0bc90){const _0x124e0a=a178_0x12f29b,_0x23d3dc=runNpxSkillsAddGlobal(_0x255503,_0x124e0a(0xc1),{'stdio':_0x124e0a(0xad),'yes':_0xf0bc90});return{'step':0x6,'label':_0x124e0a(0x11f),'ok':_0x23d3dc['ok'],'detail':_0x23d3dc['ok']?_0x124e0a(0xe1):_0x23d3dc[_0x124e0a(0xb4)]??_0x124e0a(0x110)+_0x23d3dc[_0x124e0a(0x12c)]};}function execUpgradeSdk(_0x8f64d8){const _0x21d4c7=a178_0x12f29b;if(!_0x8f64d8[_0x21d4c7(0x119)])return{'step':0x7,'label':_0x21d4c7(0xce),'ok':!![],'detail':'skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)'};const {pkgPath:_0x2c5644,currentVersion:_0x3ab5ad,field:_0x29b91b}=_0x8f64d8['sdkUpgrade'];try{const _0x1b7524=readFileSync(_0x2c5644,_0x21d4c7(0x11e)),_0x1ec5f4=JSON['parse'](_0x1b7524);return _0x1ec5f4[_0x29b91b][_0x21d4c7(0x106)]=_0x21d4c7(0xcc),writeFileSync(_0x2c5644,JSON[_0x21d4c7(0xb1)](_0x1ec5f4,null,0x2)+'\x0a',_0x21d4c7(0x11e)),{'step':0x7,'label':_0x21d4c7(0xce),'ok':!![],'detail':_0x29b91b+_0x21d4c7(0x12d)+_0x3ab5ad+'\x20→\x20latest'};}catch(_0x56452b){return{'step':0x7,'label':_0x21d4c7(0xce),'ok':![],'detail':_0x56452b[_0x21d4c7(0xdd)]};}}function tryStat(_0x41c4a9){try{return statSync(_0x41c4a9);}catch{return undefined;}}function printSummary(_0x41b53c){const _0x5c36f2=a178_0x12f29b;console['log'](''),console[_0x5c36f2(0x12a)](a178_0x5b32c1['bold'](_0x5c36f2(0x122))),console['log']('');for(const _0x586d5a of _0x41b53c){const _0x2ed855=_0x586d5a['ok']?a178_0x5b32c1['green']('OK'):a178_0x5b32c1[_0x5c36f2(0x118)](_0x5c36f2(0xb7));console[_0x5c36f2(0x12a)]('\x20\x20'+_0x2ed855+_0x5c36f2(0xd8)+_0x586d5a['step']+':\x20'+_0x586d5a[_0x5c36f2(0x104)]);if(_0x586d5a[_0x5c36f2(0xf2)])console[_0x5c36f2(0x12a)](_0x5c36f2(0xd0)+a178_0x5b32c1[_0x5c36f2(0xe3)](_0x586d5a[_0x5c36f2(0xf2)]));}console[_0x5c36f2(0x12a)]('');}export async function upgradeApp(_0x20b859,_0x1fe784){const _0x3b4134=a178_0x12f29b,_0x50402d=process[_0x3b4134(0xd2)](),_0x2feb56=analyse(_0x50402d),_0x4cc09a=!_0x2feb56['configMigration']&&_0x2feb56[_0x3b4134(0xc3)]['length']===0x0&&!_0x2feb56[_0x3b4134(0xf5)]&&!_0x2feb56[_0x3b4134(0xac)]&&!_0x2feb56[_0x3b4134(0x119)];if(_0x4cc09a){console[_0x3b4134(0x12a)](a178_0x5b32c1['green'](_0x3b4134(0xbc)));return;}printReport(_0x2feb56);const _0x2dc71a=!!(_0x1fe784[_0x3b4134(0x10e)]||_0x1fe784['Y']||_0x20b859);if(!_0x2dc71a)try{const _0x51ae43=await askConfirm('Proceed\x20with\x20upgrade?');if(!_0x51ae43){console['log'](a178_0x5b32c1[_0x3b4134(0xe3)](_0x3b4134(0x103)));return;}}catch(_0x3c7dc1){if(_0x3c7dc1?.['message']===_0x3b4134(0xe0)){console[_0x3b4134(0x12a)](a178_0x5b32c1['gray'](_0x3b4134(0x103)));return;}throw _0x3c7dc1;}const _0x15b130=[],_0x44a250=a178_0x35ebd0({'text':_0x3b4134(0xfd),'color':'cyan'})[_0x3b4134(0x115)](),_0x568420=execConfigMigration(_0x2feb56,_0x50402d);_0x15b130[_0x3b4134(0xb2)](_0x568420),_0x44a250[_0x568420['ok']?_0x3b4134(0xfe):_0x3b4134(0xd1)]('Step\x201/7:\x20Config\x20migration\x20—\x20'+(_0x568420[_0x3b4134(0xf2)]??(_0x568420['ok']?_0x3b4134(0xff):_0x3b4134(0x111))));const _0x3ca20b=resolve(_0x50402d,'.lovrabet'),_0x467a2f=a178_0x35ebd0({'text':_0x3b4134(0xd9),'color':_0x3b4134(0x112)})['start']();if(existsSync(_0x3ca20b))try{rmSync(_0x3ca20b,{'recursive':!![],'force':!![]}),_0x467a2f[_0x3b4134(0xfe)]('Step\x202/7:\x20.lovrabet/\x20directory\x20removed'),_0x15b130[_0x3b4134(0xb2)]({'step':0x2,'label':_0x3b4134(0xcb),'ok':!![]});}catch(_0x41bf59){_0x467a2f[_0x3b4134(0xd1)]('Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0x41bf59[_0x3b4134(0xdd)]),_0x15b130[_0x3b4134(0xb2)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':![],'detail':_0x41bf59[_0x3b4134(0xdd)]});}else _0x467a2f['info'](_0x3b4134(0xde)),_0x15b130[_0x3b4134(0xb2)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![],'detail':_0x3b4134(0xcd)});const _0x7af9ee=a178_0x35ebd0({'text':_0x3b4134(0xed),'color':_0x3b4134(0x112)})[_0x3b4134(0x115)](),_0x58baf3=execRemoveOldArtifacts(_0x2feb56['oldArtifacts']);_0x15b130['push'](_0x58baf3),_0x7af9ee[_0x58baf3['ok']?_0x3b4134(0xfe):'fail'](_0x3b4134(0x105)+(_0x58baf3[_0x3b4134(0xf2)]??(_0x58baf3['ok']?_0x3b4134(0xff):_0x3b4134(0x111))));const _0x5f5576=a178_0x35ebd0({'text':_0x3b4134(0xf8),'color':'cyan'})[_0x3b4134(0x115)](),_0x27af8e=execCleanMcp(_0x2feb56);_0x15b130[_0x3b4134(0xb2)](_0x27af8e),_0x5f5576[_0x27af8e['ok']?_0x3b4134(0xfe):_0x3b4134(0xd1)](_0x3b4134(0xe5)+(_0x27af8e[_0x3b4134(0xf2)]??(_0x27af8e['ok']?_0x3b4134(0xff):_0x3b4134(0x111))));const _0x4a3d63=a178_0x35ebd0({'text':'Step\x205/7:\x20Removing\x20old\x20skill...','color':_0x3b4134(0x112)})['start'](),_0x2ee913=execSkillsRemove(_0x50402d,_0x2dc71a);_0x15b130[_0x3b4134(0xb2)](_0x2ee913),_0x4a3d63[_0x2ee913['ok']?_0x3b4134(0xfe):_0x3b4134(0xd1)](_0x3b4134(0x11a)+(_0x2ee913['detail']??(_0x2ee913['ok']?_0x3b4134(0xff):'failed')));const _0x5c48f0=a178_0x35ebd0({'text':_0x3b4134(0xf6),'color':_0x3b4134(0x112)})['start'](),_0x2fa6b2=execSkillsAdd(_0x50402d,_0x2dc71a);_0x15b130[_0x3b4134(0xb2)](_0x2fa6b2),_0x5c48f0[_0x2fa6b2['ok']?'succeed':_0x3b4134(0xd1)](_0x3b4134(0x10f)+(_0x2fa6b2[_0x3b4134(0xf2)]??(_0x2fa6b2['ok']?_0x3b4134(0xff):'failed')));const _0x376dbc=a178_0x35ebd0({'text':_0x3b4134(0xd7),'color':_0x3b4134(0x112)})[_0x3b4134(0x115)](),_0x3fc242=execUpgradeSdk(_0x2feb56);_0x15b130[_0x3b4134(0xb2)](_0x3fc242),_0x376dbc[_0x3fc242['ok']?_0x3b4134(0xfe):_0x3b4134(0xd1)](_0x3b4134(0x129)+(_0x3fc242[_0x3b4134(0xf2)]??(_0x3fc242['ok']?_0x3b4134(0xff):'failed'))),printSummary(_0x15b130);const _0x1f7b4f=_0x15b130[_0x3b4134(0xec)](_0x5e2ae4=>!_0x5e2ae4['ok']);_0x1f7b4f?console[_0x3b4134(0x12a)](a178_0x5b32c1[_0x3b4134(0xcf)](_0x3b4134(0x11d))):console[_0x3b4134(0x12a)](a178_0x5b32c1[_0x3b4134(0x12b)](_0x3b4134(0xc5))),_0x3fc242['ok']&&_0x2feb56[_0x3b4134(0x119)]&&(console[_0x3b4134(0x12a)](''),console[_0x3b4134(0x12a)](a178_0x5b32c1[_0x3b4134(0xfc)][_0x3b4134(0x112)](_0x3b4134(0x12e))),console[_0x3b4134(0x12a)](a178_0x5b32c1[_0x3b4134(0x112)](_0x3b4134(0xb6))),console[_0x3b4134(0x12a)](''),console[_0x3b4134(0x12a)](a178_0x5b32c1[_0x3b4134(0x128)]('\x20\x20npm\x20install')),console[_0x3b4134(0x12a)](a178_0x5b32c1[_0x3b4134(0x128)](_0x3b4134(0x11b))),console['log'](a178_0x5b32c1['white'](_0x3b4134(0xeb))),console[_0x3b4134(0x12a)](''));}
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_0x4b1819=a179_0x4fb4;(function(_0x5957f9,_0x1c0095){const _0x101be5=a179_0x4fb4,_0x163679=_0x5957f9();while(!![]){try{const _0x59dab6=-parseInt(_0x101be5(0xce))/0x1*(parseInt(_0x101be5(0x91))/0x2)+-parseInt(_0x101be5(0x8c))/0x3+parseInt(_0x101be5(0xa6))/0x4+parseInt(_0x101be5(0x6d))/0x5*(-parseInt(_0x101be5(0xd6))/0x6)+-parseInt(_0x101be5(0xa8))/0x7+-parseInt(_0x101be5(0x70))/0x8+parseInt(_0x101be5(0xae))/0x9;if(_0x59dab6===_0x1c0095)break;else _0x163679['push'](_0x163679['shift']());}catch(_0x2cc89f){_0x163679['push'](_0x163679['shift']());}}}(a179_0x2a06,0x95406));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';function a179_0x4fb4(_0x3f19f5,_0x58d2d2){_0x3f19f5=_0x3f19f5-0x6d;const _0x2a06a0=a179_0x2a06();let _0x4fb418=_0x2a06a0[_0x3f19f5];return _0x4fb418;}import{kbDefinitions}from'../commands/kb/index.js';import{ruleDefinitions}from'../commands/rule/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{userAccountDefinitions}from'../commands/user-account/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x3c0b32){const _0x2dc871=a179_0x4fb4;for(const _0x4a8cfc of _0x3c0b32){definitions[_0x2dc871(0x9f)](_0x4a8cfc[_0x2dc871(0xaf)]+':'+_0x4a8cfc[_0x2dc871(0xcd)],_0x4a8cfc);let _0x14cb6a=serviceGroups[_0x2dc871(0x79)](_0x4a8cfc[_0x2dc871(0xaf)]);!_0x14cb6a&&(_0x14cb6a=[],serviceGroups[_0x2dc871(0x9f)](_0x4a8cfc[_0x2dc871(0xaf)],_0x14cb6a)),_0x14cb6a[_0x2dc871(0xc6)](_0x4a8cfc);}}function registerDeclarativeService(_0x21972c,_0x23e4a2,_0x5cdd3a){const _0x32491d=a179_0x4fb4;registerDefinitions(_0x23e4a2);_0x5cdd3a?.['wildcardDef']&&registerDefinitions([_0x5cdd3a['wildcardDef']]);const _0x21845b=_0x329cbb=>_0x329cbb==='read'?'':_0x329cbb===_0x32491d(0x7b)?_0x32491d(0x8d):_0x32491d(0xd0),_0x5aae06={'service':_0x23e4a2[0x0][_0x32491d(0xaf)],'label':_0x21972c,'commands':_0x23e4a2[_0x32491d(0xd3)](_0x5c5fdd=>!_0x5c5fdd[_0x32491d(0x77)])['map'](_0x5b2b57=>({'command':_0x5b2b57[_0x32491d(0xcd)],'description':_0x5b2b57[_0x32491d(0x73)],'tag':_0x21845b(_0x5b2b57[_0x32491d(0xd2)])})),'declarative':!![],'defaultCommand':_0x5cdd3a?.['defaultCommand']??(_0x5cdd3a?.[_0x32491d(0xc1)]?_0x23e4a2[0x0][_0x32491d(0xcd)]:undefined),'wildcardDef':_0x5cdd3a?.['wildcardDef'],'isSingleCommand':_0x5cdd3a?.[_0x32491d(0xc1)]};serviceRegistry[_0x32491d(0xc6)](_0x5aae06),serviceByName['set'](_0x5aae06[_0x32491d(0xaf)],_0x5aae06);}registerDeclarativeService(a179_0x4b1819(0xd5),projectDefinitions),registerDeclarativeService('Workspace',workspaceDefinitions),registerDeclarativeService(a179_0x4b1819(0xa9),appDefinitions),registerDeclarativeService('Authentication',authDefinitions,{'defaultCommand':a179_0x4b1819(0x98)}),registerDeclarativeService(a179_0x4b1819(0xa2),tenantDefinitions),registerDeclarativeService(a179_0x4b1819(0xc5),userAccountDefinitions),registerDeclarativeService(a179_0x4b1819(0x85),datasetDefinitions),registerDeclarativeService(a179_0x4b1819(0xab),pageDefinitions),registerDeclarativeService(a179_0x4b1819(0x72),apiDefinitions),registerDeclarativeService(a179_0x4b1819(0xc2),bffDefinitions),registerDeclarativeService(a179_0x4b1819(0x80),notificationDefinitions),registerDeclarativeService('SQL\x20Queries',sqlDefinitions),registerDeclarativeService('Database\x20Connections',dbDefinitions),registerDeclarativeService('Deployment',deploymentDefinitions),registerDeclarativeService(a179_0x4b1819(0xbf),menuDefinitions),registerDeclarativeService(a179_0x4b1819(0xb2),taskDefinitions),registerDeclarativeService(a179_0x4b1819(0x94),roleDefinitions),registerDeclarativeService(a179_0x4b1819(0x76),appConfigDefinitions),registerDeclarativeService(a179_0x4b1819(0x81),kbDefinitions),registerDeclarativeService(a179_0x4b1819(0xc7),ruleDefinitions),registerDeclarativeService('Platform\x20Issue',issueDefinitions),registerDeclarativeService(a179_0x4b1819(0x87),fileDefinitions),registerDeclarativeService(a179_0x4b1819(0x9c),ocrDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService(a179_0x4b1819(0xb3),configDefinitions),registerDeclarativeService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a179_0x4b1819(0x83),cliSkillDefinitions,{'defaultCommand':a179_0x4b1819(0xcc)}),registerDeclarativeService(a179_0x4b1819(0xa0),logsDefinitions,{'defaultCommand':'show'}),registerDeclarativeService(a179_0x4b1819(0xb6),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a179_0x4b1819(0x8e)]-0x1];last[a179_0x4b1819(0xa1)]=[{'command':a179_0x4b1819(0xcb),'description':'Run\x20any\x20package.json\x20script','tag':a179_0x4b1819(0x6f)+runDefinition[a179_0x4b1819(0xd2)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a179_0x4b1819(0xa5),a179_0x4b1819(0x8b)],['bff:new',a179_0x4b1819(0xb0)],['sql:new',a179_0x4b1819(0xa4)],[a179_0x4b1819(0xb7),a179_0x4b1819(0x8a)],['project:init',a179_0x4b1819(0xca)],[a179_0x4b1819(0x89),'rabetbase\x20cli-skill\x20install'],['skill:install','rabetbase\x20cli-skill\x20install'],[a179_0x4b1819(0x86),a179_0x4b1819(0x99)],[a179_0x4b1819(0x96),a179_0x4b1819(0x99)],['app:remote','rabetbase\x20app\x20list\x20--remote'],[a179_0x4b1819(0x7f),a179_0x4b1819(0xd1)],['app:add',a179_0x4b1819(0x93)],['app:remove',a179_0x4b1819(0xba)],[a179_0x4b1819(0x78),'rabetbase\x20kb\x20list'],[a179_0x4b1819(0x71),a179_0x4b1819(0x9b)],[a179_0x4b1819(0x90),a179_0x4b1819(0x74)],['knowledge-base:update',a179_0x4b1819(0xd4)],['knowledge-base:delete',a179_0x4b1819(0xc8)],['role:create',a179_0x4b1819(0x9e)],[a179_0x4b1819(0x7d),a179_0x4b1819(0x9a)],[a179_0x4b1819(0xbe),a179_0x4b1819(0xbd)],[a179_0x4b1819(0x82),'rabetbase\x20page\x20data-list-status'],[a179_0x4b1819(0xa3),'rabetbase\x20page\x20create\x20--page-pattern\x20BLANK'],[a179_0x4b1819(0x8f),a179_0x4b1819(0x92)],[a179_0x4b1819(0x7a),a179_0x4b1819(0xac)],[a179_0x4b1819(0xb8),a179_0x4b1819(0xb1)],[a179_0x4b1819(0x88),a179_0x4b1819(0x84)],[a179_0x4b1819(0xb9),a179_0x4b1819(0x6e)]]),REMOVED_COMMAND_HINTS=new Map([[a179_0x4b1819(0xaa),a179_0x4b1819(0xc3)],[a179_0x4b1819(0xad),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],['permit:role-menus',a179_0x4b1819(0xc3)],[a179_0x4b1819(0xa7),a179_0x4b1819(0xc3)],[a179_0x4b1819(0x7e),a179_0x4b1819(0xc3)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a179_0x4b1819(0x95),a179_0x4b1819(0xd7)],[a179_0x4b1819(0xb5),a179_0x4b1819(0x7c)],['build',a179_0x4b1819(0xbc)],[a179_0x4b1819(0xb4),'rabetbase\x20run\x20preview'],[a179_0x4b1819(0xcf),'rabetbase\x20auth\x20logout']]);function a179_0x2a06(){const _0x106325=['rabetbase\x20menu\x20asset-update','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','1194045ZbfpKT','\x20\x20[write]','length','page:custom-create','knowledge-base:create','434qQOCxR','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','Roles','create','skills:install','wildcardDef','login','rabetbase\x20cli-skill\x20install','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','rabetbase\x20kb\x20detail','OCR','`\x20instead.','rabetbase\x20role\x20list','set','Logs','commands','Tenant\x20Members','page:react-create','rabetbase\x20sql\x20create','sql:save','1135748okmrkR','permit:role-menus-set','800219tzHMkL','App\x20Management','permit:page-get','Data\x20List\x20Pages\x20&\x20Custom\x20Pages','rabetbase\x20page\x20custom-list','permit:page-set','33038973ifgnOb','service','rabetbase\x20bff\x20create','rabetbase\x20page\x20custom-detail','Async\x20Tasks','Configuration','preview','start','Run\x20Scripts','menu:update','page:react-detail','page:react-publish','rabetbase\x20workspace\x20remove\x20<name>','Use\x20`','rabetbase\x20run\x20build','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','data:getOne','Menu','has','isSingleCommand','Backend\x20Function\x20Scripts','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','from','User\x20Accounts','push','Agent\x20Context\x20Rules','rabetbase\x20kb\x20delete','`\x20has\x20been\x20removed.','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','<script>','install','command','2822SbWKeQ','logout','\x20\x20[high-risk-write]','rabetbase\x20workspace\x20use\x20--app\x20<name>','risk','filter','rabetbase\x20kb\x20update','Project','2300874tDKeFg','rabetbase\x20project\x20create\x20<project-name>','15fORaVM','rabetbase\x20page\x20custom-publish','\x20\x20[','8547656QfURnA','knowledge-base:detail','API\x20Development','description','rabetbase\x20kb\x20create','values','Runtime\x20App\x20Config\x20Management','hidden','knowledge-base:list','get','page:react-list','write','rabetbase\x20run\x20start','data:filter','permit:role-apis-set','app:use','Notification\x20Configuration','Company\x20Knowledge\x20Base','page:standard-page-status','CLI\x20Built-in\x20Skill','rabetbase\x20page\x20custom-update','Dataset\x20&\x20Operations','skills:','File','page:react-update','skill:'];a179_0x2a06=function(){return _0x106325;};return a179_0x2a06();}export function resolveRemovedCommand(_0x55d92f,_0x355598){const _0x19da3d=a179_0x4b1819;if(!_0x55d92f)return undefined;const _0x14b803=REMOVED_COMMAND_REPLACEMENTS[_0x19da3d(0x79)](_0x55d92f+':'+(_0x355598??'')),_0x4c4911=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x19da3d(0x79)](_0x55d92f),_0x508d02=_0x14b803??_0x4c4911,_0x5248bc=REMOVED_COMMAND_HINTS['get'](_0x55d92f+':'+(_0x355598??''));if(!_0x508d02&&!_0x5248bc)return undefined;const _0x8237c2=_0x4c4911?_0x55d92f:_0x355598?_0x55d92f+'\x20'+_0x355598:_0x55d92f;return{'command':_0x8237c2,'message':'`rabetbase\x20'+_0x8237c2+_0x19da3d(0xc9),'hint':_0x5248bc??_0x19da3d(0xbb)+_0x508d02+_0x19da3d(0x9d)};}export function findDefinition(_0x4eeedf,_0x459b2d){const _0x11a4a0=a179_0x4b1819;return definitions[_0x11a4a0(0x79)](_0x4eeedf+':'+_0x459b2d);}export function isKnownService(_0x233e30){const _0x4280ce=a179_0x4b1819;return serviceByName[_0x4280ce(0xc0)](_0x233e30);}export function isDeclarativeService(_0x713b2b){const _0xd79b96=a179_0x4b1819;return serviceGroups['has'](_0x713b2b)||serviceByName['get'](_0x713b2b)?.[_0xd79b96(0x97)]!==undefined;}export function getServiceEntry(_0x441a58){const _0x4aad1b=a179_0x4b1819;return serviceByName[_0x4aad1b(0x79)](_0x441a58);}export function getLegacyHandler(_0xc6af39,_0x4099cd){return undefined;}export function getAllDefinitions(){const _0x5d019a=a179_0x4b1819;return Array[_0x5d019a(0xc4)](definitions[_0x5d019a(0x75)]());}
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_0x58ed05=a180_0x580f;(function(_0x260467,_0x3c494e){const _0x413883=a180_0x580f,_0x39a531=_0x260467();while(!![]){try{const _0x17ff91=parseInt(_0x413883(0x145))/0x1+-parseInt(_0x413883(0x142))/0x2*(parseInt(_0x413883(0x148))/0x3)+-parseInt(_0x413883(0x133))/0x4*(-parseInt(_0x413883(0x13d))/0x5)+-parseInt(_0x413883(0x137))/0x6+-parseInt(_0x413883(0x146))/0x7+parseInt(_0x413883(0x13e))/0x8+parseInt(_0x413883(0x134))/0x9*(parseInt(_0x413883(0x140))/0xa);if(_0x17ff91===_0x3c494e)break;else _0x39a531['push'](_0x39a531['shift']());}catch(_0x394a8f){_0x39a531['push'](_0x39a531['shift']());}}}(a180_0x5701,0x924cf));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a180_0x5701(){const _0x7e3bb6=['Deleted\x20role\x20','333179gThKON','1709127gFRmSg','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','27609bZpRIY','76ZZeTHu','90xFGSJb','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','roleName','3301368UfUPdW','appCode','dev','POST','delete','userCount','505WYPTse','7736736aNzYIP','Role\x20still\x20has\x20','165070OjnCRm','role','16BmFhWQ','num'];a180_0x5701=function(){return _0x7e3bb6;};return a180_0x5701();}import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a180_0x580f(_0x490bcf,_0x5d339f){_0x490bcf=_0x490bcf-0x133;const _0x57015c=a180_0x5701();let _0x580f05=_0x57015c[_0x490bcf];return _0x580f05;}const DELETE_PATH='/smartapi/permit/role/delete';export const roleDelete={'service':a180_0x58ed05(0x141),'command':'delete','description':a180_0x58ed05(0x135),'risk':'high-risk-write','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x446c2f){const _0x2866a7=a180_0x58ed05,_0x1cdc81=_0x446c2f[_0x2866a7(0x143)]('id'),_0x482b2d=await getRoleById(_0x446c2f[_0x2866a7(0x138)],_0x1cdc81);return assertCustomRole(_0x482b2d,_0x2866a7(0x13b)),asDryRunResult({'scope':_0x2866a7(0x139),'operation':_0x2866a7(0x13b),'selector':{'appCode':_0x446c2f[_0x2866a7(0x138)],'roleId':_0x1cdc81,'roleName':_0x482b2d[_0x2866a7(0x136)]},'before':projectRole(_0x482b2d),'after':null,'dryRun':!![],'backend':{'method':_0x2866a7(0x13a),'path':DELETE_PATH},'warnings':_0x482b2d[_0x2866a7(0x13c)]>0x0?[_0x2866a7(0x13f)+_0x482b2d['userCount']+_0x2866a7(0x147)]:[]},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x2e163b){const _0xef3571=a180_0x58ed05,_0x49ff31=_0x2e163b['num']('id'),_0x5aa4af=await getRoleById(_0x2e163b[_0xef3571(0x138)],_0x49ff31);return assertCustomRole(_0x5aa4af,_0xef3571(0x13b)),await deleteAppRole(_0x49ff31),{'ok':!![],'data':{'scope':'dev','operation':_0xef3571(0x13b),'selector':{'appCode':_0x2e163b[_0xef3571(0x138)],'roleId':_0x49ff31,'roleName':_0x5aa4af[_0xef3571(0x136)]},'before':projectRole(_0x5aa4af),'after':null,'dryRun':![],'backend':{'method':_0xef3571(0x13a),'path':DELETE_PATH},'warnings':[]},'message':_0xef3571(0x144)+_0x5aa4af[_0xef3571(0x136)]+'\x20(id='+_0x49ff31+')'};}};
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_0x5e8c(){const _0x2ece72=['8xMUHjl','detail','262947GQcjjm','num','role','dev','appCode','read','5291808InyHgy','26630uRTWLz','10288411rvkAhv','7557sHkVkk','28ucarNx','Show\x20a\x20single\x20role\x27s\x20detail','Role\x20','3687735bzokGC','roleName','163uArYar','5553gIdlvh','12162JavxDt','49836xgRWTk','roleType'];a181_0x5e8c=function(){return _0x2ece72;};return a181_0x5e8c();}const a181_0x2ef38b=a181_0xd623;(function(_0x4e6e60,_0x56480a){const _0x22b259=a181_0xd623,_0x39357=_0x4e6e60();while(!![]){try{const _0x2324b4=parseInt(_0x22b259(0x10f))/0x1*(-parseInt(_0x22b259(0x111))/0x2)+-parseInt(_0x22b259(0x100))/0x3*(-parseInt(_0x22b259(0x10a))/0x4)+parseInt(_0x22b259(0x10d))/0x5+parseInt(_0x22b259(0x106))/0x6+-parseInt(_0x22b259(0x108))/0x7*(parseInt(_0x22b259(0x114))/0x8)+-parseInt(_0x22b259(0x110))/0x9*(parseInt(_0x22b259(0x107))/0xa)+-parseInt(_0x22b259(0x109))/0xb*(-parseInt(_0x22b259(0x112))/0xc);if(_0x2324b4===_0x56480a)break;else _0x39357['push'](_0x39357['shift']());}catch(_0x3c1a2f){_0x39357['push'](_0x39357['shift']());}}}(a181_0x5e8c,0xefc6a));function a181_0xd623(_0x275288,_0x4bf149){_0x275288=_0x275288-0xff;const _0x5e8ca1=a181_0x5e8c();let _0xd62354=_0x5e8ca1[_0x275288];return _0xd62354;}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_0x2ef38b(0x102),'command':a181_0x2ef38b(0xff),'description':a181_0x2ef38b(0x10b),'risk':a181_0x2ef38b(0x105),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x574dba){const _0x201fa2=a181_0x2ef38b,_0x54260c=_0x574dba[_0x201fa2(0x101)]('id'),_0x507915=await getRoleById(_0x574dba[_0x201fa2(0x104)],_0x54260c);return{'ok':!![],'data':{'scope':_0x201fa2(0x103),'role':projectRole(_0x507915)},'message':_0x201fa2(0x10c)+_0x507915[_0x201fa2(0x10e)]+'\x20('+_0x507915[_0x201fa2(0x113)]+')'};}};
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(_0x445aae,_0x26baff){const _0x4ea0eb=a182_0x1664,_0x3bf161=_0x445aae();while(!![]){try{const _0x18a91b=parseInt(_0x4ea0eb(0x183))/0x1+-parseInt(_0x4ea0eb(0x18b))/0x2+parseInt(_0x4ea0eb(0x187))/0x3+parseInt(_0x4ea0eb(0x186))/0x4*(parseInt(_0x4ea0eb(0x185))/0x5)+-parseInt(_0x4ea0eb(0x184))/0x6+parseInt(_0x4ea0eb(0x189))/0x7*(-parseInt(_0x4ea0eb(0x18c))/0x8)+parseInt(_0x4ea0eb(0x188))/0x9*(parseInt(_0x4ea0eb(0x18a))/0xa);if(_0x18a91b===_0x26baff)break;else _0x3bf161['push'](_0x3bf161['shift']());}catch(_0x1a8404){_0x3bf161['push'](_0x3bf161['shift']());}}}(a182_0x5cd7,0x51f7e));function a182_0x1664(_0x5f590d,_0x3e6fd0){_0x5f590d=_0x5f590d-0x183;const _0x5cd779=a182_0x5cd7();let _0x1664dd=_0x5cd779[_0x5f590d];return _0x1664dd;}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';function a182_0x5cd7(){const _0x2b19da=['723842cupiVz','10uUNelO','1211454ODQFPw','8UeOPHq','12814NXZKBp','2781024OMZrcE','655ZulbTK','6344pkYvNs','1889232TjatoO','5922495KOEbOc'];a182_0x5cd7=function(){return _0x2b19da;};return a182_0x5cd7();}import{roleUserRemove}from'../../commands/role/user-remove.js';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_0x3697(){const _0x2d9142=['includes','pagesize','OWNER','216152bKfdqJ','1292lgFnxg','253YWriuD','join','2771udLDYz','str','number','140bUxDoO','type','num','Use\x20one\x20of:\x20','role','DEV','list','77694420bAqruW','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','dev','appCode','filter','Page\x20index\x20(1-based)','Filter\x20by\x20role\x20type','trim','page','toUpperCase','16mKHzSL','CUSTOM','5587677NvUaRK','Page\x20size\x20(1-100)','170990SIwjiF','22254NHPAfY','map','string','validation','4120950DfZNZY','1435WfQsGh'];a183_0x3697=function(){return _0x2d9142;};return a183_0x3697();}const a183_0x110d26=a183_0x4fa2;(function(_0x5269fa,_0x1bd05a){const _0x56ae98=a183_0x4fa2,_0x458449=_0x5269fa();while(!![]){try{const _0x500191=-parseInt(_0x56ae98(0xdf))/0x1*(parseInt(_0x56ae98(0xdc))/0x2)+-parseInt(_0x56ae98(0xd6))/0x3+-parseInt(_0x56ae98(0xdb))/0x4*(parseInt(_0x56ae98(0xe2))/0x5)+-parseInt(_0x56ae98(0xd2))/0x6*(-parseInt(_0x56ae98(0xd7))/0x7)+parseInt(_0x56ae98(0xcd))/0x8*(-parseInt(_0x56ae98(0xcf))/0x9)+-parseInt(_0x56ae98(0xd1))/0xa*(parseInt(_0x56ae98(0xdd))/0xb)+parseInt(_0x56ae98(0xc2))/0xc;if(_0x500191===_0x1bd05a)break;else _0x458449['push'](_0x458449['shift']());}catch(_0x33ea4f){_0x458449['push'](_0x458449['shift']());}}}(a183_0x3697,0xe15ed));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a183_0x4fa2(_0xf53696,_0xaaf5d8){_0xf53696=_0xf53696-0xbd;const _0x369733=a183_0x3697();let _0x4fa2c5=_0x369733[_0xf53696];return _0x4fa2c5;}import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=['ADMIN',a183_0x110d26(0xc0),a183_0x110d26(0xda),a183_0x110d26(0xce)];export const roleList={'service':a183_0x110d26(0xbf),'command':a183_0x110d26(0xc1),'description':'List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a183_0x110d26(0xe3),'type':a183_0x110d26(0xd4),'required':![],'description':a183_0x110d26(0xc9),'enum':ROLE_TYPES},{'name':a183_0x110d26(0xcb),'type':a183_0x110d26(0xe1),'description':a183_0x110d26(0xc8),'default':0x1},{'name':a183_0x110d26(0xd9),'type':a183_0x110d26(0xe1),'description':a183_0x110d26(0xd0),'default':0x64}],async 'validate'(_0xec0204){const _0x2340ca=a183_0x110d26,_0x35cae5=_0xec0204[_0x2340ca(0xe0)](_0x2340ca(0xe3))[_0x2340ca(0xca)]();if(_0x35cae5&&!ROLE_TYPES[_0x2340ca(0xd8)](_0x35cae5[_0x2340ca(0xcc)]()))throw CliErrors[_0x2340ca(0xd5)]('Invalid\x20--type\x20\x22'+_0x35cae5+'\x22.',_0x2340ca(0xbe)+ROLE_TYPES[_0x2340ca(0xde)](',\x20')+'.');const _0x470df6=_0xec0204[_0x2340ca(0xbd)](_0x2340ca(0xcb),0x1),_0x442604=_0xec0204[_0x2340ca(0xbd)](_0x2340ca(0xd9),0x64);if(_0x470df6<0x1)throw CliErrors[_0x2340ca(0xd5)](_0x2340ca(0xc3));if(_0x442604<0x1||_0x442604>0x64)throw CliErrors[_0x2340ca(0xd5)](_0x2340ca(0xc4));},async 'execute'(_0x2a189b){const _0x3bef87=a183_0x110d26,_0x48412e=_0x2a189b[_0x3bef87(0xbd)]('page',0x1)||0x1,_0x3d1db7=_0x2a189b[_0x3bef87(0xbd)](_0x3bef87(0xd9),0x64)||0x64,_0x5c2593=_0x2a189b[_0x3bef87(0xe0)](_0x3bef87(0xe3))[_0x3bef87(0xca)]()[_0x3bef87(0xcc)](),{items:_0x4bd786,paging:_0x74e36d}=await listAppRoles(_0x2a189b[_0x3bef87(0xc6)],{'currentPage':_0x48412e,'pageSize':_0x3d1db7}),_0x38f3aa=_0x5c2593?_0x4bd786[_0x3bef87(0xc7)](_0x1e5a8b=>_0x1e5a8b['roleType']===_0x5c2593):_0x4bd786,_0x17656c=_0x38f3aa[_0x3bef87(0xd3)](projectRole);return{'ok':!![],'data':{'scope':_0x3bef87(0xc5),'roles':_0x17656c,'paging':_0x74e36d},'message':'Found\x20'+_0x17656c['length']+'\x20role(s)'};}};
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
- const a184_0x42a533=a184_0x2509;(function(_0xd53d17,_0x3257cc){const _0x5b4416=a184_0x2509,_0x1b037c=_0xd53d17();while(!![]){try{const _0x1917db=-parseInt(_0x5b4416(0xbd))/0x1*(parseInt(_0x5b4416(0xa4))/0x2)+-parseInt(_0x5b4416(0x96))/0x3*(parseInt(_0x5b4416(0x81))/0x4)+-parseInt(_0x5b4416(0x78))/0x5+-parseInt(_0x5b4416(0xaf))/0x6+-parseInt(_0x5b4416(0x9d))/0x7*(-parseInt(_0x5b4416(0x86))/0x8)+parseInt(_0x5b4416(0x7f))/0x9*(parseInt(_0x5b4416(0xad))/0xa)+parseInt(_0x5b4416(0x9e))/0xb;if(_0x1917db===_0x3257cc)break;else _0x1b037c['push'](_0x1b037c['shift']());}catch(_0x4134c4){_0x1b037c['push'](_0x1b037c['shift']());}}}(a184_0x2a0f,0x5d18c));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_0x42a533(0x99),'required':!![],'description':a184_0x42a533(0xb2)};export const ROLE_REF_FLAG={'name':a184_0x42a533(0xb5),'type':a184_0x42a533(0xb7),'required':!![],'description':a184_0x42a533(0x94)};export const USER_REF_FLAG={'name':a184_0x42a533(0xbe),'type':a184_0x42a533(0xb7),'required':!![],'description':a184_0x42a533(0xa1)};export const NAME_FLAG={'name':a184_0x42a533(0xb8),'type':a184_0x42a533(0xb7),'required':!![],'description':'Role\x20name'};export const USER_NAME_FLAG={'name':a184_0x42a533(0xb8),'type':a184_0x42a533(0xb7),'required':!![],'description':a184_0x42a533(0x9b)};export const REMARK_FLAG={'name':a184_0x42a533(0x93),'type':a184_0x42a533(0xb7),'required':![],'description':'Optional\x20role\x20remark/description'};export const EXPECT_USER_COUNT_FLAG={'name':a184_0x42a533(0x7b),'type':a184_0x42a533(0x99),'required':![],'description':a184_0x42a533(0xa0)};export const BUILTIN_ROLE_TYPES=[a184_0x42a533(0x9a),'DEV',a184_0x42a533(0x76)];export function isBuiltinRole(_0x273f6a){const _0x259449=a184_0x42a533;return BUILTIN_ROLE_TYPES[_0x259449(0x9f)](_0x273f6a);}export function assertCustomRole(_0xccfb39,_0x1b2c3c){const _0x3200cb=a184_0x42a533;if(_0xccfb39[_0x3200cb(0xa2)]!==_0x3200cb(0x92))throw CliErrors[_0x3200cb(0x8a)](_0x3200cb(0xa5)+_0x1b2c3c+_0x3200cb(0x72)+_0xccfb39[_0x3200cb(0x74)]+'\x20('+_0xccfb39[_0x3200cb(0xa2)]+').','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.');}export function projectRole(_0x58edc6){const _0x768cc0=a184_0x42a533;return{'id':_0x58edc6['id'],'roleName':_0x58edc6[_0x768cc0(0x74)],'roleType':_0x58edc6[_0x768cc0(0xa2)],'remark':_0x58edc6[_0x768cc0(0x93)],'userCount':_0x58edc6['userCount'],'permitCount':_0x58edc6[_0x768cc0(0x75)],'builtin':isBuiltinRole(_0x58edc6[_0x768cc0(0xa2)])};}export async function resolveRoleRef(_0x141df2,_0x1968b6){const _0x595e08=a184_0x42a533,_0x51108b=_0x1968b6[_0x595e08(0xb4)]();if(!_0x51108b)throw CliErrors[_0x595e08(0x8a)](_0x595e08(0xa6),_0x595e08(0xa3));if(/^\d+$/['test'](_0x51108b))return getRoleById(_0x141df2,Number(_0x51108b));const _0x254406=await listAllAppRoles(_0x141df2),_0x2f6525=_0x254406[_0x595e08(0x84)](_0x5d7df9=>_0x5d7df9[_0x595e08(0x74)]===_0x51108b);if(_0x2f6525[_0x595e08(0x73)]===0x0)throw CliErrors['validation']('Role\x20name\x20\x22'+_0x51108b+_0x595e08(0x8c)+_0x141df2+'.',_0x595e08(0xb3));if(_0x2f6525[_0x595e08(0x73)]>0x1){const _0x53bb75=_0x2f6525[_0x595e08(0x80)](_0x2ab50a=>_0x2ab50a['id'])['join'](',\x20');throw CliErrors[_0x595e08(0x8a)](_0x595e08(0x90)+_0x51108b+_0x595e08(0xb1)+_0x53bb75+').',_0x595e08(0x7e));}return _0x2f6525[0x0];}export async function getRoleById(_0x1a8099,_0x3b6909){const _0x337856=a184_0x42a533,_0x1cba20=await listAllAppRoles(_0x1a8099),_0x4c5dd6=_0x1cba20[_0x337856(0x84)](_0x17d006=>_0x17d006['id']===_0x3b6909&&(!_0x17d006[_0x337856(0x8e)]||_0x17d006[_0x337856(0x8e)]===_0x1a8099));if(_0x4c5dd6[_0x337856(0x73)]!==0x1)throw CliErrors[_0x337856(0x8a)](_0x337856(0xbf)+_0x3b6909+_0x337856(0x77)+_0x1a8099+'.',_0x337856(0xb0));return _0x4c5dd6[0x0];}async function listAllAppRoles(_0x38b3ce){const _0x9ac5ee=a184_0x42a533,_0x4c3758=0x64,_0x496952=[];for(let _0x562c3f=0x1;;_0x562c3f+=0x1){const {items:_0x1d7a09,paging:_0x23c1ee}=await listAppRoles(_0x38b3ce,{'currentPage':_0x562c3f,'pageSize':_0x4c3758});_0x496952[_0x9ac5ee(0x8b)](..._0x1d7a09);if(_0x1d7a09[_0x9ac5ee(0x73)]<_0x4c3758||_0x23c1ee&&_0x496952['length']>=_0x23c1ee[_0x9ac5ee(0xaa)])return _0x496952;}}function a184_0x2509(_0x6bf0a3,_0x55dc7e){_0x6bf0a3=_0x6bf0a3-0x72;const _0x2a0f03=a184_0x2a0f();let _0x250975=_0x2a0f03[_0x6bf0a3];return _0x250975;}export async function resolveTenantCode(){const _0x562657=a184_0x42a533,_0x28dd30=await getSessionUserInfo(),_0x430726=_0x28dd30?.[_0x562657(0xbe)]?.['tenant']?.[_0x562657(0x9c)];if(!_0x430726)throw CliErrors['authRequired'](_0x562657(0x79));return _0x430726;}function matchMember(_0x28fe85,_0x52a98e){const _0xee7c01=a184_0x42a533,_0x516918=_0x52a98e[_0xee7c01(0xb4)]()[_0xee7c01(0x7c)]();return(_0x28fe85[_0xee7c01(0x97)]??'')[_0xee7c01(0x7c)]()===_0x516918||(_0x28fe85[_0xee7c01(0xb6)]??'')[_0xee7c01(0x7c)]()===_0x516918;}export async function resolveUserRef(_0x5c38f0,_0x316323=a184_0x42a533(0x91)){const _0x4f374a=a184_0x42a533,_0x5037fc=_0x5c38f0[_0x4f374a(0xb4)]();if(!_0x5037fc)throw CliErrors[_0x4f374a(0x8a)]('Missing\x20user\x20reference.','Pass\x20--user\x20<id|name>.');const _0x5b9117=await resolveTenantCode(),_0x41c40a=await getTenantMembers(_0x5b9117);if(/^\d+$/['test'](_0x5037fc)){const _0x1d929d=Number(_0x5037fc),_0x39c180=_0x41c40a['find'](_0xeab3c2=>_0xeab3c2[_0x4f374a(0x83)]===_0x1d929d);return{'userId':_0x1d929d,'username':_0x39c180?.[_0x4f374a(0xb6)]??String(_0x1d929d),'nickname':_0x39c180?.[_0x4f374a(0x97)],'matchedBy':'id'};}const _0x38d7a8=_0x41c40a[_0x4f374a(0x84)](_0x522b1b=>matchMember(_0x522b1b,_0x5037fc));if(_0x38d7a8[_0x4f374a(0x73)]===0x0)throw CliErrors[_0x4f374a(0x8a)](_0x4f374a(0xac)+_0x5037fc+'\x22.',_0x4f374a(0x8d)+_0x316323);if(_0x38d7a8[_0x4f374a(0x73)]>0x1){const _0x372c8f=_0x38d7a8[_0x4f374a(0x80)](_0x4df93f=>(_0x4df93f[_0x4f374a(0x97)]??_0x4df93f[_0x4f374a(0xb6)]??'?')+'('+_0x4df93f[_0x4f374a(0x83)]+')')[_0x4f374a(0x7d)](',\x20');throw CliErrors[_0x4f374a(0x8a)](_0x4f374a(0x88)+_0x5037fc+_0x4f374a(0x89)+_0x372c8f+'.',_0x316323);}const _0x5e8787=_0x38d7a8[0x0];return{'userId':_0x5e8787[_0x4f374a(0x83)],'username':_0x5e8787[_0x4f374a(0xb6)]??String(_0x5e8787[_0x4f374a(0x83)]),'nickname':_0x5e8787[_0x4f374a(0x97)],'matchedBy':_0x4f374a(0xb8)};}function a184_0x2a0f(){const _0x309866=['1552JvOEPt','user-add','Multiple\x20tenant\x20members\x20match\x20\x22','\x22:\x20','validation','push','\x22\x20not\x20found\x20in\x20app\x20','Check\x20the\x20nickname/username.\x20','appCode',';\x20no\x20change.','Role\x20name\x20\x22','Pass\x20--user\x20<id>.','CUSTOM','remark','Role\x20id\x20or\x20exact\x20role\x20name','/smartapi/permit/user-role/create','9EXXXpn','nickname','Anti-drift\x20check\x20failed:\x20expected\x20','number','ADMIN','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','tenant_code','13188WUrqvc','18307223GEMsWw','includes','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','roleType','Pass\x20--role\x20<id|name>.','28822VuuRBg','Cannot\x20','Missing\x20role\x20reference.','str','POST','\x20is\x20already\x20a\x20member\x20of\x20role\x20','totalCount','dev','No\x20tenant\x20member\x20matches\x20\x22','20UdnNkV','\x20duplicate\x20memberships\x20for\x20user\x20','3530964XdNcLH','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','\x22\x20is\x20ambiguous\x20(ids:\x20','Role\x20id\x20(from\x20`role\x20list`)','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','trim','role','username','string','name','expectUserCount','flagMissing','/smartapi/permit/user-role/delete','Pass\x20--user\x20<id|name>.','48gFRMSz','user','Role\x20id\x20','\x20built-in\x20role\x20','length','roleName','permitCount','OWNER','\x20not\x20found\x20in\x20app\x20','1200015wWwlAs','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.','expect-user-count','toLowerCase','join','Disambiguate\x20with\x20--role\x20<id>.','1159371tFbevV','map','514504caslaB','\x20is\x20not\x20a\x20member\x20of\x20role\x20','userId','filter','User\x20'];a184_0x2a0f=function(){return _0x309866;};return a184_0x2a0f();}export const CREATE_USER_ROLE_PATH=a184_0x42a533(0x95);export const DELETE_USER_ROLE_PATH=a184_0x42a533(0xbb);export function computeRoleUserMutation(_0x3fa870){const _0x4a309a=a184_0x42a533,{operation:_0x52d563,appCode:_0x307fb9,role:_0x352533,relations:_0x3f9b94,user:_0x3d117c}=_0x3fa870,_0x398ed0=[...new Set(_0x3f9b94['map'](_0x4163d8=>_0x4163d8[_0x4a309a(0x83)]))],_0x3eae85=[];if(_0x3fa870[_0x4a309a(0xb9)]!==undefined&&_0x3fa870['expectUserCount']!==_0x398ed0['length'])throw CliErrors[_0x4a309a(0x8a)](_0x4a309a(0x98)+_0x3fa870['expectUserCount']+'\x20member(s)\x20but\x20role\x20has\x20'+_0x398ed0[_0x4a309a(0x73)]+'.','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.');const _0x1647c3=_0x398ed0[_0x4a309a(0x9f)](_0x3d117c[_0x4a309a(0x83)]),_0xbeadfc=_0x3f9b94[_0x4a309a(0x84)](_0x397084=>_0x397084['userId']===_0x3d117c[_0x4a309a(0x83)])[_0x4a309a(0x80)](_0x15efba=>_0x15efba['id']),_0x552832=_0x52d563===_0x4a309a(0x87)?!_0x1647c3:_0x1647c3;let _0x6a0b75=_0x398ed0;_0x52d563===_0x4a309a(0x87)?_0x1647c3?_0x3eae85[_0x4a309a(0x8b)](_0x4a309a(0x85)+_0x3d117c['userId']+_0x4a309a(0xa9)+_0x352533[_0x4a309a(0x74)]+_0x4a309a(0x8f)):_0x6a0b75=[..._0x398ed0,_0x3d117c['userId']]:!_0x1647c3?_0x3eae85[_0x4a309a(0x8b)]('User\x20'+_0x3d117c[_0x4a309a(0x83)]+_0x4a309a(0x82)+_0x352533[_0x4a309a(0x74)]+';\x20no\x20change.'):(_0x6a0b75=_0x398ed0[_0x4a309a(0x84)](_0xeb196f=>_0xeb196f!==_0x3d117c[_0x4a309a(0x83)]),_0xbeadfc[_0x4a309a(0x73)]>0x1&&_0x3eae85[_0x4a309a(0x8b)]('Removed\x20'+_0xbeadfc['length']+_0x4a309a(0xae)+_0x3d117c[_0x4a309a(0x83)]+'.'));const _0x21f393={'scope':_0x4a309a(0xab),'operation':_0x52d563,'selector':{'appCode':_0x307fb9,'roleId':_0x352533['id'],'roleName':_0x352533[_0x4a309a(0x74)],'userId':_0x3d117c[_0x4a309a(0x83)]},'before':{'userIds':_0x398ed0},'after':{'userIds':_0x6a0b75},'dryRun':_0x3fa870['dryRun'],'backend':{'method':_0x4a309a(0xa8),'path':_0x52d563===_0x4a309a(0x87)?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x3eae85};return{'mutation':_0x21f393,'changed':_0x552832,'matchingRelationIds':_0xbeadfc};}export async function loadDevRoleRelations(_0x573460,_0x547c3b){const _0x158de0=a184_0x42a533,_0x19cfb3=0x64,_0x1c039f=[];for(let _0x30a19c=0x1;;_0x30a19c+=0x1){const {items:_0x3f694b,paging:_0x2a50f0}=await listDevUserRoleRelations(_0x573460,{'roleId':_0x547c3b,'currentPage':_0x30a19c,'pageSize':_0x19cfb3});_0x1c039f[_0x158de0(0x8b)](..._0x3f694b);if(_0x3f694b['length']<_0x19cfb3||_0x2a50f0&&_0x1c039f[_0x158de0(0x73)]>=_0x2a50f0[_0x158de0(0xaa)])return _0x1c039f;}}export function readRoleRef(_0x219499){const _0x244eca=a184_0x42a533,_0x465d69=_0x219499[_0x244eca(0xa7)](_0x244eca(0xb5))['trim']();if(!_0x465d69)throw CliErrors['flagMissing'](_0x244eca(0xb5),_0x244eca(0xa3));return _0x465d69;}export async function prepareUserMutation(_0x52536c,_0x27c8a0,_0x3a63a0){const _0x1a1116=a184_0x42a533,_0x28e7ef=readRoleRef(_0x52536c),_0x2f02c9=_0x52536c[_0x1a1116(0xa7)]('user')[_0x1a1116(0xb4)]();if(!_0x2f02c9)throw CliErrors[_0x1a1116(0xba)](_0x1a1116(0xbe),_0x1a1116(0xbc));const _0x5e60f3=_0x52536c['flag'](_0x1a1116(0x7b)),_0xf680b2=_0x5e60f3===undefined||_0x5e60f3===null?undefined:Number(_0x5e60f3),_0x59e74f=await resolveRoleRef(_0x52536c[_0x1a1116(0x8e)],_0x28e7ef);if(_0x59e74f[_0x1a1116(0xa2)]===_0x1a1116(0x76))throw CliErrors[_0x1a1116(0x8a)](_0x1a1116(0xa5)+_0x27c8a0+'\x20members\x20of\x20the\x20OWNER\x20role.',_0x1a1116(0x7a));const _0x21363e=await resolveUserRef(_0x2f02c9),_0x5212ee=await loadDevRoleRelations(_0x52536c[_0x1a1116(0x8e)],_0x59e74f['id']);return{...computeRoleUserMutation({'operation':_0x27c8a0,'appCode':_0x52536c[_0x1a1116(0x8e)],'role':_0x59e74f,'relations':_0x5212ee,'user':{'userId':_0x21363e[_0x1a1116(0x83)],'username':_0x21363e[_0x1a1116(0xb6)],'nickname':_0x21363e['nickname']},'dryRun':_0x3a63a0,..._0xf680b2!==undefined?{'expectUserCount':_0xf680b2}:{}}),'role':_0x59e74f,'user':_0x21363e};}
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};}