@lovrabet/rabetbase-cli 2.3.13 → 2.3.14

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 (263) 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/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.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/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.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/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-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/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/asset-update.js +1 -1
  103. package/lib/commands/menu/delete.js +1 -1
  104. package/lib/commands/menu/external-link-create.js +1 -1
  105. package/lib/commands/menu/external-link-update.js +1 -1
  106. package/lib/commands/menu/group-create.js +1 -1
  107. package/lib/commands/menu/group-update.js +1 -1
  108. package/lib/commands/menu/index.js +1 -1
  109. package/lib/commands/menu/list.js +1 -1
  110. package/lib/commands/menu/move.js +1 -1
  111. package/lib/commands/menu/regroup-start.js +1 -1
  112. package/lib/commands/menu/shared/compare-table.js +1 -1
  113. package/lib/commands/menu/shared/delete-plan.js +1 -1
  114. package/lib/commands/menu/shared/facts.js +1 -1
  115. package/lib/commands/menu/shared/index.js +1 -1
  116. package/lib/commands/menu/shared/inquirer.js +1 -1
  117. package/lib/commands/menu/shared/local-pages.js +1 -1
  118. package/lib/commands/menu/shared/logic.js +1 -1
  119. package/lib/commands/menu/shared/mutations.js +1 -1
  120. package/lib/commands/menu/shared/service.js +1 -1
  121. package/lib/commands/menu/shared/sync-core.js +1 -1
  122. package/lib/commands/menu/shared/update-core.js +1 -1
  123. package/lib/commands/menu/shared/valid-url.js +1 -1
  124. package/lib/commands/menu/sync.js +1 -1
  125. package/lib/commands/notification/config-list.js +1 -1
  126. package/lib/commands/notification/index.js +1 -1
  127. package/lib/commands/ocr/index.js +1 -0
  128. package/lib/commands/page/generate-start.js +1 -1
  129. package/lib/commands/page/generate-status.js +1 -1
  130. package/lib/commands/page/index.js +1 -1
  131. package/lib/commands/page/pull.js +1 -1
  132. package/lib/commands/page/push.js +1 -1
  133. package/lib/commands/page/relation-audit.js +1 -1
  134. package/lib/commands/page/restore.js +1 -0
  135. package/lib/commands/page/shared.js +1 -1
  136. package/lib/commands/page/standard-page-status.js +1 -1
  137. package/lib/commands/page/sync.js +1 -1
  138. package/lib/commands/permit/index.js +1 -1
  139. package/lib/commands/permit/page-get.js +1 -1
  140. package/lib/commands/permit/page-set.js +1 -1
  141. package/lib/commands/permit/role-apis-set.js +1 -1
  142. package/lib/commands/permit/role-menus-set.js +1 -1
  143. package/lib/commands/permit/role-menus.js +1 -1
  144. package/lib/commands/permit/shared.js +1 -1
  145. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  146. package/lib/commands/project/create/format-elapsed.js +1 -1
  147. package/lib/commands/project/create/main.js +1 -1
  148. package/lib/commands/project/create/non-interactive.js +1 -1
  149. package/lib/commands/project/create/project-template-path.js +1 -1
  150. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  151. package/lib/commands/project/create/use-format-code.js +1 -1
  152. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  153. package/lib/commands/project/index.js +1 -1
  154. package/lib/commands/project/init.js +1 -1
  155. package/lib/commands/project/upgrade.js +1 -1
  156. package/lib/commands/registry.js +1 -1
  157. package/lib/commands/role/create.js +1 -1
  158. package/lib/commands/role/delete.js +1 -1
  159. package/lib/commands/role/detail.js +1 -1
  160. package/lib/commands/role/index.js +1 -1
  161. package/lib/commands/role/list.js +1 -1
  162. package/lib/commands/role/shared.js +1 -1
  163. package/lib/commands/role/update.js +1 -1
  164. package/lib/commands/role/user-add.js +1 -1
  165. package/lib/commands/role/user-remove.js +1 -1
  166. package/lib/commands/role/user-resolve.js +1 -1
  167. package/lib/commands/run/index.js +1 -1
  168. package/lib/commands/schema.js +1 -1
  169. package/lib/commands/sql/create.js +1 -1
  170. package/lib/commands/sql/delete.js +1 -1
  171. package/lib/commands/sql/detail.js +1 -1
  172. package/lib/commands/sql/exec.js +1 -1
  173. package/lib/commands/sql/index.js +1 -1
  174. package/lib/commands/sql/list.js +1 -1
  175. package/lib/commands/sql/pull.js +1 -1
  176. package/lib/commands/sql/push.js +1 -1
  177. package/lib/commands/sql/save.js +1 -1
  178. package/lib/commands/sql/shared.js +1 -1
  179. package/lib/commands/sql/status.js +1 -1
  180. package/lib/commands/sql/validate.js +1 -1
  181. package/lib/commands/task/index.js +1 -1
  182. package/lib/commands/task/status.js +1 -1
  183. package/lib/commands/workspace/add.js +1 -1
  184. package/lib/commands/workspace/index.js +1 -1
  185. package/lib/commands/workspace/remove.js +1 -1
  186. package/lib/config/schema.js +1 -1
  187. package/lib/constant/cdn.js +1 -1
  188. package/lib/constant/cli.js +1 -1
  189. package/lib/constant/defaults.js +1 -1
  190. package/lib/constant/domain.js +1 -1
  191. package/lib/constant/env.js +1 -1
  192. package/lib/constant/output.js +1 -1
  193. package/lib/constant/paths.js +1 -1
  194. package/lib/constant/risk.js +1 -1
  195. package/lib/context/app-resolver.js +1 -1
  196. package/lib/context/auth-resolver.js +1 -1
  197. package/lib/context/config-loader.js +1 -1
  198. package/lib/context.js +1 -1
  199. package/lib/core/alias-resolver.js +1 -1
  200. package/lib/core/api-client.js +1 -1
  201. package/lib/core/bff/config.js +1 -1
  202. package/lib/core/bff/file-system.js +1 -1
  203. package/lib/core/bff/hash.js +1 -1
  204. package/lib/core/bff/lock.js +1 -1
  205. package/lib/core/bff/utils.js +1 -1
  206. package/lib/core/db-resolver.js +1 -1
  207. package/lib/core/page/file-system.js +1 -1
  208. package/lib/core/page/hash.js +1 -1
  209. package/lib/core/page/lock.js +1 -1
  210. package/lib/core/sql-index-auditor.js +1 -1
  211. package/lib/core/sql-sync/config.js +1 -1
  212. package/lib/core/sql-sync/file-system.js +1 -1
  213. package/lib/core/sql-sync/hash.js +1 -1
  214. package/lib/core/sql-sync/lock.js +1 -1
  215. package/lib/core/sql-sync/utils.js +1 -1
  216. package/lib/core/sql-validator.js +1 -1
  217. package/lib/errors.js +1 -1
  218. package/lib/framework/build-all-flags.js +1 -1
  219. package/lib/framework/error-output.js +1 -1
  220. package/lib/framework/explicit-yes.js +1 -1
  221. package/lib/framework/flags.js +1 -1
  222. package/lib/framework/help.js +1 -1
  223. package/lib/framework/index.js +1 -1
  224. package/lib/framework/output.js +1 -1
  225. package/lib/framework/response.js +1 -1
  226. package/lib/framework/runner-alias.js +1 -1
  227. package/lib/framework/runner.js +1 -1
  228. package/lib/framework/schema-export.js +1 -1
  229. package/lib/framework/types.js +1 -1
  230. package/lib/generated/build-info.js +1 -1
  231. package/lib/help.js +1 -1
  232. package/lib/skills/main.js +1 -1
  233. package/lib/skills/npx-skills-add.js +1 -1
  234. package/lib/telemetry/cli-command-trace.js +1 -1
  235. package/lib/telemetry/cli-help-trace.js +1 -1
  236. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  237. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  238. package/lib/telemetry/send-cli-trace-log.js +1 -1
  239. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  240. package/lib/utils/ai_config.js +1 -1
  241. package/lib/utils/apply-jq-filter.js +1 -1
  242. package/lib/utils/cdn-config.js +1 -1
  243. package/lib/utils/check-sdk-version.js +1 -1
  244. package/lib/utils/cli-version-check.js +1 -1
  245. package/lib/utils/cli-version-policy.js +1 -1
  246. package/lib/utils/config.js +1 -1
  247. package/lib/utils/copy-directory.js +1 -1
  248. package/lib/utils/entity-with-id.js +1 -1
  249. package/lib/utils/file-utils.js +1 -1
  250. package/lib/utils/guides-cdn.js +1 -1
  251. package/lib/utils/http-client.js +1 -1
  252. package/lib/utils/is-non-interactive.js +1 -1
  253. package/lib/utils/logger.js +1 -1
  254. package/lib/utils/params.js +1 -1
  255. package/lib/utils/platform.js +1 -1
  256. package/lib/utils/rules-cdn.js +1 -1
  257. package/lib/utils/sleep.js +1 -1
  258. package/lib/utils/template-replacer.js +1 -1
  259. package/lib/utils/update-notice.js +1 -1
  260. package/lib/utils/version.js +1 -1
  261. package/lib/utils/with-active-cookie.js +1 -1
  262. package/lib/utils/write-cli-side-channel.js +1 -1
  263. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x52b8cd,_0xd07df2){const _0x1c642f=a146_0x4bc1,_0x30a06e=_0x52b8cd();while(!![]){try{const _0x535693=parseInt(_0x1c642f(0x19e))/0x1*(-parseInt(_0x1c642f(0x19b))/0x2)+-parseInt(_0x1c642f(0x1a4))/0x3+-parseInt(_0x1c642f(0x186))/0x4*(-parseInt(_0x1c642f(0x174))/0x5)+-parseInt(_0x1c642f(0x193))/0x6*(parseInt(_0x1c642f(0x1a3))/0x7)+parseInt(_0x1c642f(0x183))/0x8*(-parseInt(_0x1c642f(0x181))/0x9)+-parseInt(_0x1c642f(0x1a5))/0xa+parseInt(_0x1c642f(0x187))/0xb*(parseInt(_0x1c642f(0x177))/0xc);if(_0x535693===_0xd07df2)break;else _0x30a06e['push'](_0x30a06e['shift']());}catch(_0xc31d6b){_0x30a06e['push'](_0x30a06e['shift']());}}}(a146_0x2052,0x4d768));import a146_0x10bda4 from'path';import a146_0x3767a0 from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';function a146_0x2052(){const _0x4cc133=['readFile','36KNVhDh','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','7048aUqlMJ','\x20\x20√\x20Configuration\x20file\x20created','test','1093208zZKClj','7476447tsZyee','toLocaleString','access','\x20\x20Pulling\x20API\x20configuration...','env','\x20\x20rabetbase\x20run\x20start\x0a','belowMinimum','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','W_OK','modelCount','resolve','Use\x20a\x20different\x20project\x20name.','306zTtElh','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','length','constants','\x20\x20Installing\x20dependencies...','\x0a\x20\x20cd\x20','\x20api\x20pull`\x20manually\x20later.','writeFile','88212XWcbTE','Project\x20directory\x20\x22','stringify','8KzPgJJ','\x20\x20√\x20Pulled\x20','parse','Check\x20directory\x20permissions.','\x0a√\x20Project\x20','38703gxZjoS','21462ledbdm','2634880ikxkHo','\x20created\x20successfully!','chdir','bun','validation','cwd','needsUpgrade','*\x20Creating\x20project\x20','10CcMFrK','npm','ignore','12CyugjO','trim','bun\x20run\x20format','Project\x20name\x20contains\x20invalid\x20characters.','\x20model(s)','join','utf-8','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','log'];a146_0x2052=function(){return _0x4cc133;};return a146_0x2052();}import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x5429e1,_0x595c4a,_0x5c3597,_0x1a9b09){const _0x582544=a146_0x4bc1,_0x12a7b5=await checkCliVersion();(_0x12a7b5[_0x582544(0x1ab)]||_0x12a7b5[_0x582544(0x18d)])&&(printCliUpgradeWarning(_0x12a7b5),assertCliVersionSupported(_0x12a7b5));if(!_0x5429e1||_0x5429e1[_0x582544(0x178)]()==='')throw CliErrors[_0x582544(0x1a9)]('Project\x20name\x20cannot\x20be\x20empty.');const _0x36f043=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x36f043[_0x582544(0x185)](_0x5429e1))throw CliErrors[_0x582544(0x1a9)](_0x582544(0x17a),'Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x5429e1[_0x582544(0x195)]>0x64)throw CliErrors[_0x582544(0x1a9)](_0x582544(0x18e));const _0x177964=a146_0x10bda4[_0x582544(0x191)](process[_0x582544(0x1aa)](),_0x5429e1);if(existsSync(_0x177964))throw CliErrors[_0x582544(0x1a9)](_0x582544(0x19c)+_0x5429e1+'\x22\x20already\x20exists.',_0x582544(0x192));try{const _0x4112d0=a146_0x10bda4['dirname'](_0x177964);await a146_0x3767a0[_0x582544(0x189)](_0x4112d0,a146_0x3767a0[_0x582544(0x196)][_0x582544(0x18f)]);}catch{throw CliErrors['validation']('Cannot\x20create\x20project\x20in\x20current\x20directory.',_0x582544(0x1a1));}try{console[_0x582544(0x17f)](_0x582544(0x1ac)+_0x5429e1+'...');const _0x5d0aa9=getSubAppReactDemoTemplateDir();await copyDirectory(_0x5d0aa9,_0x177964),console[_0x582544(0x17f)]('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x5429e1),console[_0x582544(0x17f)]('\x20\x20√\x20package.json\x20updated'),console[_0x582544(0x17f)](_0x582544(0x197)),console[_0x582544(0x17f)](_0x582544(0x194)),await formatCode(_0x177964),console['log']('\x20\x20√\x20Code\x20formatted'),await configureProject(_0x5429e1,_0x5c3597,_0x595c4a),console['log'](_0x582544(0x184)),_0x5c3597&&await pullApiConfig(_0x177964,_0x5c3597,_0x595c4a,_0x1a9b09),console['log'](_0x582544(0x1a2)+_0x5429e1+_0x582544(0x1a6)),console[_0x582544(0x17f)](_0x582544(0x198)+_0x5429e1),console[_0x582544(0x17f)](_0x582544(0x18c));}catch(_0xd93cd){try{existsSync(_0x177964)&&await a146_0x3767a0['rm'](_0x177964,{'recursive':!![],'force':!![]});}catch{}throw _0xd93cd;}}async function updatePackageJsonName(_0x3d1c04){const _0x470157=a146_0x4bc1,_0x3b7161=a146_0x10bda4['resolve'](process[_0x470157(0x1aa)](),_0x3d1c04),_0x23bb2b=a146_0x10bda4['join'](_0x3b7161,'package.json'),_0x206f20=await a146_0x3767a0[_0x470157(0x180)](_0x23bb2b,_0x470157(0x17d)),_0x89bbbd=JSON[_0x470157(0x1a0)](_0x206f20);_0x89bbbd['name']=_0x3d1c04,_0x89bbbd['description']=_0x470157(0x182),await a146_0x3767a0[_0x470157(0x19a)](_0x23bb2b,JSON[_0x470157(0x19d)](_0x89bbbd,null,0x2)+'\x0a');}function detectPackageManager(){const _0x3061ac=a146_0x4bc1;try{return execSync('bun\x20--version',{'stdio':_0x3061ac(0x176)}),_0x3061ac(0x1a8);}catch{return _0x3061ac(0x175);}}async function formatCode(_0x104535){const _0x2ce841=a146_0x4bc1;try{await execAsync(_0x2ce841(0x179),{'cwd':_0x104535});}catch{}}async function configureProject(_0x5f076b,_0x5b5fa4,_0x29aab5){const _0xdeccc5=a146_0x4bc1,_0x56d08f=a146_0x10bda4['resolve'](process[_0xdeccc5(0x1aa)](),_0x5f076b),_0x5601e6=a146_0x10bda4[_0xdeccc5(0x17c)](_0x56d08f,NEW_CONFIG_NAME),_0x5774a8=readConfig(),_0x27dcb9=typeof _0x5774a8[_0xdeccc5(0x18b)]==='string'?_0x5774a8[_0xdeccc5(0x18b)]:undefined,_0x4fe27f={};for(const _0x29ebe9 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x5774a8[_0x29ebe9]!=null)_0x4fe27f[_0x29ebe9]=_0x5774a8[_0x29ebe9];}const _0x28f68f=buildCanonicalProjectConfig(_0x4fe27f,{'appCodes':_0x5b5fa4?[_0x5b5fa4]:[],'env':_0x29aab5||_0x27dcb9||'production','metadata':{'createdAt':new Date()[_0xdeccc5(0x188)](),'version':getCliVersion()}});writeConfigFile(_0x5601e6,_0x28f68f);}function a146_0x4bc1(_0x180e5e,_0x4a7af1){_0x180e5e=_0x180e5e-0x174;const _0x2052e4=a146_0x2052();let _0x4bc13c=_0x2052e4[_0x180e5e];return _0x4bc13c;}async function pullApiConfig(_0x3b5435,_0x2a3d1f,_0x3f973d,_0x394ca9){const _0x284519=a146_0x4bc1,_0x114763=process[_0x284519(0x1aa)]();try{process[_0x284519(0x1a7)](_0x3b5435);const _0x5bf5d4=_0x3f973d||'production';initEnv(_0x5bf5d4),console['log'](_0x284519(0x18a));const {configArray:_0x212c0b}=await fetchModelList(_0x2a3d1f,_0x394ca9||''),_0x4528dd=await generateApiFile(_0x212c0b,'',_0x2a3d1f,!![],_0x5bf5d4,DEFAULT_API_DIR);console['log'](_0x284519(0x19f)+_0x212c0b[_0x284519(0x195)]+'\x20dataset(s),\x20generated\x20'+_0x4528dd[_0x284519(0x190)]+_0x284519(0x17b));}catch(_0x334a05){console[_0x284519(0x17f)](_0x284519(0x17e)+CLI_BIN_NAME+_0x284519(0x199));}finally{process['chdir'](_0x114763);}}
1
+ (function(_0x26b25d,_0x23eb4b){const _0x45de23=a148_0x4e72,_0x1e1a32=_0x26b25d();while(!![]){try{const _0x122648=parseInt(_0x45de23(0x19e))/0x1*(-parseInt(_0x45de23(0x19a))/0x2)+-parseInt(_0x45de23(0x19c))/0x3+parseInt(_0x45de23(0x191))/0x4*(parseInt(_0x45de23(0x16c))/0x5)+-parseInt(_0x45de23(0x175))/0x6+-parseInt(_0x45de23(0x19b))/0x7+-parseInt(_0x45de23(0x183))/0x8+-parseInt(_0x45de23(0x179))/0x9*(-parseInt(_0x45de23(0x181))/0xa);if(_0x122648===_0x23eb4b)break;else _0x1e1a32['push'](_0x1e1a32['shift']());}catch(_0x4357b2){_0x1e1a32['push'](_0x1e1a32['shift']());}}}(a148_0xa278,0x7b881));import a148_0x15d145 from'path';import a148_0x295087 from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';function a148_0x4e72(_0x2caa4f,_0x30c0a0){_0x2caa4f=_0x2caa4f-0x16c;const _0xa2788=a148_0xa278();let _0x4e72e0=_0xa2788[_0x2caa4f];return _0x4e72e0;}import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x1d8689,_0x4d3b2e,_0x12c532,_0x2aa32b){const _0x415449=a148_0x4e72,_0x4083a8=await checkCliVersion();(_0x4083a8[_0x415449(0x16e)]||_0x4083a8[_0x415449(0x172)])&&(printCliUpgradeWarning(_0x4083a8),assertCliVersionSupported(_0x4083a8));if(!_0x1d8689||_0x1d8689[_0x415449(0x19d)]()==='')throw CliErrors[_0x415449(0x18a)]('Project\x20name\x20cannot\x20be\x20empty.');const _0x243a81=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x243a81[_0x415449(0x17f)](_0x1d8689))throw CliErrors['validation'](_0x415449(0x17b),_0x415449(0x193));if(_0x1d8689[_0x415449(0x184)]>0x64)throw CliErrors['validation'](_0x415449(0x16f));const _0x12539c=a148_0x15d145['resolve'](process[_0x415449(0x16d)](),_0x1d8689);if(existsSync(_0x12539c))throw CliErrors[_0x415449(0x18a)](_0x415449(0x182)+_0x1d8689+_0x415449(0x199),_0x415449(0x192));try{const _0x43bd2d=a148_0x15d145['dirname'](_0x12539c);await a148_0x295087[_0x415449(0x17c)](_0x43bd2d,a148_0x295087['constants'][_0x415449(0x18e)]);}catch{throw CliErrors[_0x415449(0x18a)](_0x415449(0x177),'Check\x20directory\x20permissions.');}try{console[_0x415449(0x17d)]('*\x20Creating\x20project\x20'+_0x1d8689+_0x415449(0x18b));const _0x20191a=getSubAppReactDemoTemplateDir();await copyDirectory(_0x20191a,_0x12539c),console[_0x415449(0x17d)]('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x1d8689),console['log']('\x20\x20√\x20package.json\x20updated'),console[_0x415449(0x17d)]('\x20\x20Installing\x20dependencies...'),console[_0x415449(0x17d)](_0x415449(0x180)),await formatCode(_0x12539c),console[_0x415449(0x17d)](_0x415449(0x198)),await configureProject(_0x1d8689,_0x12c532,_0x4d3b2e),console[_0x415449(0x17d)]('\x20\x20√\x20Configuration\x20file\x20created'),_0x12c532&&await pullApiConfig(_0x12539c,_0x12c532,_0x4d3b2e,_0x2aa32b),console['log'](_0x415449(0x197)+_0x1d8689+_0x415449(0x187)),console[_0x415449(0x17d)]('\x0a\x20\x20cd\x20'+_0x1d8689),console[_0x415449(0x17d)]('\x20\x20rabetbase\x20run\x20start\x0a');}catch(_0x32ba92){try{existsSync(_0x12539c)&&await a148_0x295087['rm'](_0x12539c,{'recursive':!![],'force':!![]});}catch{}throw _0x32ba92;}}async function updatePackageJsonName(_0x46ebda){const _0xf2ff12=a148_0x4e72,_0x1dd2f0=a148_0x15d145[_0xf2ff12(0x18c)](process['cwd'](),_0x46ebda),_0xa9c3a6=a148_0x15d145[_0xf2ff12(0x18f)](_0x1dd2f0,_0xf2ff12(0x178)),_0x49af48=await a148_0x295087[_0xf2ff12(0x185)](_0xa9c3a6,_0xf2ff12(0x194)),_0x386f9e=JSON[_0xf2ff12(0x189)](_0x49af48);_0x386f9e[_0xf2ff12(0x19f)]=_0x46ebda,_0x386f9e['description']='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a148_0x295087['writeFile'](_0xa9c3a6,JSON[_0xf2ff12(0x171)](_0x386f9e,null,0x2)+'\x0a');}function detectPackageManager(){const _0x5ffdac=a148_0x4e72;try{return execSync(_0x5ffdac(0x17a),{'stdio':_0x5ffdac(0x190)}),_0x5ffdac(0x18d);}catch{return _0x5ffdac(0x195);}}async function formatCode(_0x13b2aa){try{await execAsync('bun\x20run\x20format',{'cwd':_0x13b2aa});}catch{}}async function configureProject(_0x4e9f0d,_0x23b925,_0x81a447){const _0x5dd35b=a148_0x4e72,_0x5476c4=a148_0x15d145[_0x5dd35b(0x18c)](process[_0x5dd35b(0x16d)](),_0x4e9f0d),_0x5ee042=a148_0x15d145[_0x5dd35b(0x18f)](_0x5476c4,NEW_CONFIG_NAME),_0x36820e=readConfig(),_0x40766e=typeof _0x36820e[_0x5dd35b(0x17e)]===_0x5dd35b(0x1a0)?_0x36820e[_0x5dd35b(0x17e)]:undefined,_0x50d6a0={};for(const _0x4e22d3 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x36820e[_0x4e22d3]!=null)_0x50d6a0[_0x4e22d3]=_0x36820e[_0x4e22d3];}const _0x2cf335=buildCanonicalProjectConfig(_0x50d6a0,{'appCodes':_0x23b925?[_0x23b925]:[],'env':_0x81a447||_0x40766e||_0x5dd35b(0x176),'metadata':{'createdAt':new Date()[_0x5dd35b(0x170)](),'version':getCliVersion()}});writeConfigFile(_0x5ee042,_0x2cf335);}function a148_0xa278(){const _0xb1dc75=['ignore','104NzSJNz','Use\x20a\x20different\x20project\x20name.','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','utf-8','npm','\x20\x20√\x20Pulled\x20','\x0a√\x20Project\x20','\x20\x20√\x20Code\x20formatted','\x22\x20already\x20exists.','267052YSnEHg','1430688vJWTNj','612708NqdpxZ','trim','4uvKtHG','name','string','122105wqQHbm','cwd','needsUpgrade','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','toLocaleString','stringify','belowMinimum','\x20api\x20pull`\x20manually\x20later.','chdir','1573632aOgRwH','production','Cannot\x20create\x20project\x20in\x20current\x20directory.','package.json','9ulaSae','bun\x20--version','Project\x20name\x20contains\x20invalid\x20characters.','access','log','env','test','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','19726040YTIpMo','Project\x20directory\x20\x22','7172552AmLLQE','length','readFile','\x20dataset(s),\x20generated\x20','\x20created\x20successfully!','modelCount','parse','validation','...','resolve','bun','W_OK','join'];a148_0xa278=function(){return _0xb1dc75;};return a148_0xa278();}async function pullApiConfig(_0x38c39b,_0x374fb2,_0x3ab824,_0x57b514){const _0x5eaed6=a148_0x4e72,_0x6d29c8=process['cwd']();try{process[_0x5eaed6(0x174)](_0x38c39b);const _0x4094e6=_0x3ab824||_0x5eaed6(0x176);initEnv(_0x4094e6),console['log']('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x26e104}=await fetchModelList(_0x374fb2,_0x57b514||''),_0x1b41ac=await generateApiFile(_0x26e104,'',_0x374fb2,!![],_0x4094e6,DEFAULT_API_DIR);console[_0x5eaed6(0x17d)](_0x5eaed6(0x196)+_0x26e104['length']+_0x5eaed6(0x186)+_0x1b41ac[_0x5eaed6(0x188)]+'\x20model(s)');}catch(_0x3d98d2){console[_0x5eaed6(0x17d)]('\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`'+CLI_BIN_NAME+_0x5eaed6(0x173));}finally{process[_0x5eaed6(0x174)](_0x6d29c8);}}
@@ -1 +1 @@
1
- function a147_0x57b7(_0x452045,_0xab3e55){_0x452045=_0x452045-0x14f;const _0x4dc182=a147_0x4dc1();let _0x57b7e4=_0x4dc182[_0x452045];return _0x57b7e4;}const a147_0x5e42ea=a147_0x57b7;(function(_0x564108,_0x4883b9){const _0x110fcd=a147_0x57b7,_0x28193f=_0x564108();while(!![]){try{const _0xa9e4e9=parseInt(_0x110fcd(0x159))/0x1+parseInt(_0x110fcd(0x15c))/0x2+-parseInt(_0x110fcd(0x154))/0x3*(-parseInt(_0x110fcd(0x156))/0x4)+-parseInt(_0x110fcd(0x155))/0x5*(parseInt(_0x110fcd(0x157))/0x6)+parseInt(_0x110fcd(0x150))/0x7*(-parseInt(_0x110fcd(0x14f))/0x8)+-parseInt(_0x110fcd(0x151))/0x9+parseInt(_0x110fcd(0x152))/0xa;if(_0xa9e4e9===_0x4883b9)break;else _0x28193f['push'](_0x28193f['shift']());}catch(_0x4b0014){_0x28193f['push'](_0x28193f['shift']());}}}(a147_0x4dc1,0xa16bf));import a147_0x47248d from'node:path';function a147_0x4dc1(){const _0xfbd7b9=['3269745tbbpcq','16156400ccuqMe','join','1959WBkgip','694885zzrwEK','3980BMScLn','54hyAkwI','sub-app-react-demo','190049ioBihW','dirname','../../../../','1140448Pxvbuw','82232wOOjem','511byYQAN'];a147_0x4dc1=function(){return _0xfbd7b9;};return a147_0x4dc1();}import{fileURLToPath}from'node:url';const __dirname=a147_0x47248d[a147_0x5e42ea(0x15a)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x1814fd=a147_0x5e42ea;return a147_0x47248d['resolve'](__dirname,_0x1814fd(0x15b));}export function getSubAppReactDemoTemplateDir(){const _0xa1dfd8=a147_0x5e42ea;return a147_0x47248d[_0xa1dfd8(0x153)](getRabetbaseCliPackageRoot(),'templates','projects',_0xa1dfd8(0x158));}
1
+ function a149_0x2344(_0xa2d445,_0x5b5592){_0xa2d445=_0xa2d445-0x185;const _0x731cbf=a149_0x731c();let _0x23441e=_0x731cbf[_0xa2d445];return _0x23441e;}(function(_0x446147,_0x5f3dc9){const _0x13ddab=a149_0x2344,_0x22fc38=_0x446147();while(!![]){try{const _0x4f83dd=-parseInt(_0x13ddab(0x190))/0x1+-parseInt(_0x13ddab(0x188))/0x2+-parseInt(_0x13ddab(0x18c))/0x3+-parseInt(_0x13ddab(0x186))/0x4*(-parseInt(_0x13ddab(0x18f))/0x5)+-parseInt(_0x13ddab(0x185))/0x6+-parseInt(_0x13ddab(0x18b))/0x7*(parseInt(_0x13ddab(0x189))/0x8)+parseInt(_0x13ddab(0x187))/0x9;if(_0x4f83dd===_0x5f3dc9)break;else _0x22fc38['push'](_0x22fc38['shift']());}catch(_0x1af5ab){_0x22fc38['push'](_0x22fc38['shift']());}}}(a149_0x731c,0x4a871));function a149_0x731c(){const _0x540ef5=['join','2499670CMdJxn','542478uXGABk','2515668gaIiVM','4MPhRZy','16509708OAPgai','1151704byCoLc','1480QVbYhy','../../../../','16387eseXRy','175164jbHepQ','sub-app-react-demo'];a149_0x731c=function(){return _0x540ef5;};return a149_0x731c();}import a149_0x26f8d6 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a149_0x26f8d6['dirname'](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x283452=a149_0x2344;return a149_0x26f8d6['resolve'](__dirname,_0x283452(0x18a));}export function getSubAppReactDemoTemplateDir(){const _0x2138b8=a149_0x2344;return a149_0x26f8d6[_0x2138b8(0x18e)](getRabetbaseCliPackageRoot(),'templates','projects',_0x2138b8(0x18d));}
@@ -1 +1 @@
1
- (function(_0x2722e7,_0x381326){const _0x351817=a148_0x31d4,_0x162ee1=_0x2722e7();while(!![]){try{const _0x458fa0=-parseInt(_0x351817(0x99))/0x1*(parseInt(_0x351817(0x98))/0x2)+-parseInt(_0x351817(0xa1))/0x3*(parseInt(_0x351817(0xa3))/0x4)+-parseInt(_0x351817(0x96))/0x5*(parseInt(_0x351817(0x97))/0x6)+parseInt(_0x351817(0x95))/0x7*(parseInt(_0x351817(0x9c))/0x8)+parseInt(_0x351817(0x9d))/0x9+-parseInt(_0x351817(0x9b))/0xa*(-parseInt(_0x351817(0xa2))/0xb)+-parseInt(_0x351817(0x92))/0xc*(-parseInt(_0x351817(0xa5))/0xd);if(_0x458fa0===_0x381326)break;else _0x162ee1['push'](_0x162ee1['shift']());}catch(_0x5a37ff){_0x162ee1['push'](_0x162ee1['shift']());}}}(a148_0x2656,0xc331b));import a148_0x881df7 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';function a148_0x31d4(_0x10f0e8,_0x300568){_0x10f0e8=_0x10f0e8-0x92;const _0x2656ca=a148_0x2656();let _0x31d406=_0x2656ca[_0x10f0e8];return _0x31d406;}const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x190547){const _0x3f3199=a148_0x31d4,_0x549256=Date[_0x3f3199(0x9e)](),_0x5bb718=a148_0x881df7[_0x3f3199(0xa4)](process[_0x3f3199(0x9f)](),_0x190547);try{logger['info'](_0x3f3199(0x94),_0x3f3199(0xa0),{'projectCode':_0x190547,'templateDir':templateDir}),await copyDirectory(templateDir,_0x5bb718);const _0x2c6f5c=Date[_0x3f3199(0x9e)]()-_0x549256;logger[_0x3f3199(0x9a)]('copy',_0x3f3199(0x93),_0x2c6f5c,{'projectCode':_0x190547});}catch(_0x27bb48){const _0x3d4c1c=Date[_0x3f3199(0x9e)]()-_0x549256;logger[_0x3f3199(0xa6)](_0x3f3199(0x94),'项目模板复制失败',{'projectCode':_0x190547,'error':_0x27bb48 instanceof Error?_0x27bb48['message']:String(_0x27bb48),'duration':_0x3d4c1c});throw _0x27bb48;}return formatElapsed(_0x549256);}function a148_0x2656(){const _0x19f56b=['cwd','开始复制项目模板','3LkSzex','11605jYhxtQ','4604656GUnvvO','resolve','13352716SfOtZR','error','12phMPvJ','项目模板复制完成','copy','7WyzEYt','15eNmRiP','417018QXvDVG','2szFyJK','925672XOqfWu','success','5540hwCcFK','8318872VWlaDz','3900591dUsOQt','now'];a148_0x2656=function(){return _0x19f56b;};return a148_0x2656();}
1
+ (function(_0x2dbb32,_0x19135f){const _0x4b0041=a150_0x508d,_0x44187f=_0x2dbb32();while(!![]){try{const _0x2d4b46=-parseInt(_0x4b0041(0x12c))/0x1+parseInt(_0x4b0041(0x140))/0x2*(parseInt(_0x4b0041(0x136))/0x3)+-parseInt(_0x4b0041(0x12d))/0x4*(parseInt(_0x4b0041(0x13b))/0x5)+-parseInt(_0x4b0041(0x133))/0x6*(parseInt(_0x4b0041(0x13e))/0x7)+parseInt(_0x4b0041(0x138))/0x8*(-parseInt(_0x4b0041(0x13d))/0x9)+parseInt(_0x4b0041(0x130))/0xa+parseInt(_0x4b0041(0x13c))/0xb;if(_0x2d4b46===_0x19135f)break;else _0x44187f['push'](_0x44187f['shift']());}catch(_0x1816f2){_0x44187f['push'](_0x44187f['shift']());}}}(a150_0x53b1,0xb2c61));import a150_0xe83559 from'node:path';function a150_0x508d(_0x3dcf5c,_0x372c31){_0x3dcf5c=_0x3dcf5c-0x12c;const _0x53b1f4=a150_0x53b1();let _0x508d52=_0x53b1f4[_0x3dcf5c];return _0x508d52;}import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a150_0x53b1(){const _0x90f9ca=['项目模板复制完成','resolve','5175300nuGbki','message','copy','30948TSCYej','error','now','117TcXGfv','success','398472aQElll','项目模板复制失败','cwd','13520tiwiRg','36026452RSVIHx','9EFzPSs','1673TLqAvj','开始复制项目模板','5596ckKend','943260MsYsgU','1396DOUwzP'];a150_0x53b1=function(){return _0x90f9ca;};return a150_0x53b1();}import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x3e2f97){const _0xe6121b=a150_0x508d,_0x176847=Date['now'](),_0x170ad7=a150_0xe83559[_0xe6121b(0x12f)](process[_0xe6121b(0x13a)](),_0x3e2f97);try{logger['info'](_0xe6121b(0x132),_0xe6121b(0x13f),{'projectCode':_0x3e2f97,'templateDir':templateDir}),await copyDirectory(templateDir,_0x170ad7);const _0x58920d=Date[_0xe6121b(0x135)]()-_0x176847;logger[_0xe6121b(0x137)](_0xe6121b(0x132),_0xe6121b(0x12e),_0x58920d,{'projectCode':_0x3e2f97});}catch(_0x301270){const _0x5f28af=Date[_0xe6121b(0x135)]()-_0x176847;logger[_0xe6121b(0x134)](_0xe6121b(0x132),_0xe6121b(0x139),{'projectCode':_0x3e2f97,'error':_0x301270 instanceof Error?_0x301270[_0xe6121b(0x131)]:String(_0x301270),'duration':_0x5f28af});throw _0x301270;}return formatElapsed(_0x176847);}
@@ -1 +1 @@
1
- function a149_0x26ba(_0x472a1b,_0x3f0822){_0x472a1b=_0x472a1b-0x1b3;const _0xc6aab1=a149_0xc6aa();let _0x26ba2e=_0xc6aab1[_0x472a1b];return _0x26ba2e;}(function(_0x4e0809,_0x2470df){const _0x181747=a149_0x26ba,_0x377406=_0x4e0809();while(!![]){try{const _0x61b12f=parseInt(_0x181747(0x1b7))/0x1*(-parseInt(_0x181747(0x1be))/0x2)+-parseInt(_0x181747(0x1bb))/0x3*(-parseInt(_0x181747(0x1c7))/0x4)+-parseInt(_0x181747(0x1c8))/0x5+parseInt(_0x181747(0x1b3))/0x6*(-parseInt(_0x181747(0x1bc))/0x7)+-parseInt(_0x181747(0x1b9))/0x8*(parseInt(_0x181747(0x1c2))/0x9)+parseInt(_0x181747(0x1c9))/0xa*(parseInt(_0x181747(0x1bd))/0xb)+-parseInt(_0x181747(0x1c3))/0xc*(-parseInt(_0x181747(0x1c1))/0xd);if(_0x61b12f===_0x2470df)break;else _0x377406['push'](_0x377406['shift']());}catch(_0x439a21){_0x377406['push'](_0x377406['shift']());}}}(a149_0xc6aa,0x91a1a));import a149_0x47d5dd from'node:path';function a149_0xc6aa(){const _0x3e6cc3=['format','info','4770vjtiwR','开始格式化代码','cwd','success','1ahplTB','error','35048PVHHXQ','prettier','82263iMlTyL','7861qmgpSt','1165978XqJZpf','1951358HoBlob','now','npx','13VrfDoS','1314HvJTBx','26833284KzYwSv','--write','message','resolve','32LbHiUA','464325iGDCcP','70ONMzbP'];a149_0xc6aa=function(){return _0x3e6cc3;};return a149_0xc6aa();}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x23b69b){const _0x52accc=a149_0x26ba,_0x108fc0=Date[_0x52accc(0x1bf)](),_0x3490da=a149_0x47d5dd[_0x52accc(0x1c6)](process[_0x52accc(0x1b5)](),_0x23b69b);try{logger[_0x52accc(0x1cb)]('format',_0x52accc(0x1b4),{'projectCode':_0x23b69b}),await execa(resolveNpmBin(_0x52accc(0x1c0)),[_0x52accc(0x1ba),_0x52accc(0x1c4),'.'],{'cwd':_0x3490da});const _0xc4f448=Date[_0x52accc(0x1bf)]()-_0x108fc0;logger[_0x52accc(0x1b6)](_0x52accc(0x1ca),'代码格式化完成',_0xc4f448,{'projectCode':_0x23b69b});}catch(_0x586c1c){const _0x55fbca=Date[_0x52accc(0x1bf)]()-_0x108fc0;logger[_0x52accc(0x1b8)]('format','代码格式化失败',{'projectCode':_0x23b69b,'error':_0x586c1c instanceof Error?_0x586c1c[_0x52accc(0x1c5)]:String(_0x586c1c),'duration':_0x55fbca});throw _0x586c1c;}return formatElapsed(_0x108fc0);}
1
+ (function(_0x403552,_0x5f2f1b){const _0x35bd0a=a151_0x487e,_0x4e9855=_0x403552();while(!![]){try{const _0x3f6d57=parseInt(_0x35bd0a(0xec))/0x1+-parseInt(_0x35bd0a(0xee))/0x2+parseInt(_0x35bd0a(0xeb))/0x3*(-parseInt(_0x35bd0a(0xf1))/0x4)+-parseInt(_0x35bd0a(0xe8))/0x5*(-parseInt(_0x35bd0a(0xf4))/0x6)+-parseInt(_0x35bd0a(0xe7))/0x7*(parseInt(_0x35bd0a(0xe9))/0x8)+parseInt(_0x35bd0a(0xe5))/0x9+parseInt(_0x35bd0a(0xf0))/0xa*(-parseInt(_0x35bd0a(0xe0))/0xb);if(_0x3f6d57===_0x5f2f1b)break;else _0x4e9855['push'](_0x4e9855['shift']());}catch(_0x550b3c){_0x4e9855['push'](_0x4e9855['shift']());}}}(a151_0x367a,0xbc53f));function a151_0x367a(){const _0x46cd78=['message','error','10289331nUeNOK','cwd','302694pZEZcS','40PJONAW','192bMJIMy','info','783894lWzXhK','1104204vmzoUF','now','1264832XkLNbo','success','56180uiHpTd','4mzrJZI','resolve','npx','371082zecFlq','--write','prettier','77BtzveH','代码格式化失败','format'];a151_0x367a=function(){return _0x46cd78;};return a151_0x367a();}import a151_0x1a41b3 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a151_0x487e(_0x586bc5,_0x4bfedf){_0x586bc5=_0x586bc5-0xde;const _0x367ad9=a151_0x367a();let _0x487ef6=_0x367ad9[_0x586bc5];return _0x487ef6;}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x21b479){const _0x29e0a5=a151_0x487e,_0xb4fd68=Date[_0x29e0a5(0xed)](),_0x3ed2c4=a151_0x1a41b3[_0x29e0a5(0xf2)](process[_0x29e0a5(0xe6)](),_0x21b479);try{logger[_0x29e0a5(0xea)](_0x29e0a5(0xe2),'开始格式化代码',{'projectCode':_0x21b479}),await execa(resolveNpmBin(_0x29e0a5(0xf3)),[_0x29e0a5(0xdf),_0x29e0a5(0xde),'.'],{'cwd':_0x3ed2c4});const _0x1e9762=Date[_0x29e0a5(0xed)]()-_0xb4fd68;logger[_0x29e0a5(0xef)](_0x29e0a5(0xe2),'代码格式化完成',_0x1e9762,{'projectCode':_0x21b479});}catch(_0x5ca9b3){const _0x50841d=Date[_0x29e0a5(0xed)]()-_0xb4fd68;logger[_0x29e0a5(0xe4)]('format',_0x29e0a5(0xe1),{'projectCode':_0x21b479,'error':_0x5ca9b3 instanceof Error?_0x5ca9b3[_0x29e0a5(0xe3)]:String(_0x5ca9b3),'duration':_0x50841d});throw _0x5ca9b3;}return formatElapsed(_0xb4fd68);}
@@ -1 +1 @@
1
- (function(_0x1cf409,_0x43d5e8){const _0x5bd600=a150_0x2277,_0x15064d=_0x1cf409();while(!![]){try{const _0x25ed47=-parseInt(_0x5bd600(0xcd))/0x1+-parseInt(_0x5bd600(0xd3))/0x2*(parseInt(_0x5bd600(0xd4))/0x3)+parseInt(_0x5bd600(0xd6))/0x4*(parseInt(_0x5bd600(0xc0))/0x5)+parseInt(_0x5bd600(0xc1))/0x6*(-parseInt(_0x5bd600(0xc4))/0x7)+parseInt(_0x5bd600(0xd1))/0x8*(parseInt(_0x5bd600(0xcb))/0x9)+parseInt(_0x5bd600(0xcc))/0xa*(-parseInt(_0x5bd600(0xc5))/0xb)+-parseInt(_0x5bd600(0xc9))/0xc*(-parseInt(_0x5bd600(0xd0))/0xd);if(_0x25ed47===_0x43d5e8)break;else _0x15064d['push'](_0x15064d['shift']());}catch(_0x5613ac){_0x15064d['push'](_0x15064d['shift']());}}}(a150_0x4b93,0xb08a6));import a150_0x105d31 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a150_0x2277(_0x5a003d,_0x3c9e24){_0x5a003d=_0x5a003d-0xc0;const _0x4b93cc=a150_0x4b93();let _0x227746=_0x4b93cc[_0x5a003d];return _0x227746;}import{resolveNpmBin}from'../../../utils/platform.js';function a150_0x4b93(){const _0x45e69c=['36534ebfHGG','error','install','91QujWCD','1464661wDzULj','--registry','开始安装依赖','success','12osuRwk','npm','1009080kyPGnS','80wyJBfb','952682CrKBZt','message','info','36780796QBWphm','40HpeaZj','now','12AYxLEp','625359zgpuTC','https://registry.npmmirror.com','2723932lDLFKl','resolve','依赖安装完成','5TgKPQh'];a150_0x4b93=function(){return _0x45e69c;};return a150_0x4b93();}export async function installDependencies(_0x509d0c){const _0x1c6bb5=a150_0x2277,_0x3f9106=Date[_0x1c6bb5(0xd2)](),_0x5e2f1e=a150_0x105d31[_0x1c6bb5(0xd7)](process['cwd'](),_0x509d0c);try{logger[_0x1c6bb5(0xcf)]('install',_0x1c6bb5(0xc7),{'projectCode':_0x509d0c,'registry':_0x1c6bb5(0xd5)}),await execa(resolveNpmBin(_0x1c6bb5(0xca)),['install',_0x1c6bb5(0xc6),'https://registry.npmmirror.com'],{'cwd':_0x5e2f1e});const _0x58619c=Date[_0x1c6bb5(0xd2)]()-_0x3f9106;logger[_0x1c6bb5(0xc8)](_0x1c6bb5(0xc3),_0x1c6bb5(0xd8),_0x58619c,{'projectCode':_0x509d0c});}catch(_0x59a019){const _0xe8fc18=Date[_0x1c6bb5(0xd2)]()-_0x3f9106;logger[_0x1c6bb5(0xc2)]('install','依赖安装失败',{'projectCode':_0x509d0c,'error':_0x59a019 instanceof Error?_0x59a019[_0x1c6bb5(0xce)]:String(_0x59a019),'duration':_0xe8fc18});throw _0x59a019;}return formatElapsed(_0x3f9106);}
1
+ (function(_0x4b2aa0,_0x52f3ef){const _0x3615ef=a152_0x1c2c,_0x633e16=_0x4b2aa0();while(!![]){try{const _0x2b100f=-parseInt(_0x3615ef(0x1a6))/0x1*(parseInt(_0x3615ef(0x1b0))/0x2)+-parseInt(_0x3615ef(0x1ae))/0x3*(-parseInt(_0x3615ef(0x1af))/0x4)+-parseInt(_0x3615ef(0x1b2))/0x5*(-parseInt(_0x3615ef(0x1a9))/0x6)+-parseInt(_0x3615ef(0x19f))/0x7+parseInt(_0x3615ef(0x1ab))/0x8+-parseInt(_0x3615ef(0x1b1))/0x9+-parseInt(_0x3615ef(0x1a4))/0xa;if(_0x2b100f===_0x52f3ef)break;else _0x633e16['push'](_0x633e16['shift']());}catch(_0x671b90){_0x633e16['push'](_0x633e16['shift']());}}}(a152_0x4043,0xccf24));import a152_0x3831f0 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a152_0x1c2c(_0x542f87,_0x471909){_0x542f87=_0x542f87-0x19f;const _0x4043da=a152_0x4043();let _0x1c2ca2=_0x4043da[_0x542f87];return _0x1c2ca2;}import{resolveNpmBin}from'../../../utils/platform.js';function a152_0x4043(){const _0x2c730c=['message','1128afBtSK','https://registry.npmmirror.com','9683392qiSIoj','--registry','依赖安装失败','12087bvAHoJ','1424oeCcAM','14852sfnTPS','797832vqPSnX','34540CopzBw','7526631iJuvkq','success','now','install','依赖安装完成','18435730LCZpCL','resolve','13LuJtQg','cwd'];a152_0x4043=function(){return _0x2c730c;};return a152_0x4043();}export async function installDependencies(_0x350790){const _0xe34b55=a152_0x1c2c,_0x46784a=Date[_0xe34b55(0x1a1)](),_0x1639e3=a152_0x3831f0[_0xe34b55(0x1a5)](process[_0xe34b55(0x1a7)](),_0x350790);try{logger['info']('install','开始安装依赖',{'projectCode':_0x350790,'registry':_0xe34b55(0x1aa)}),await execa(resolveNpmBin('npm'),[_0xe34b55(0x1a2),_0xe34b55(0x1ac),_0xe34b55(0x1aa)],{'cwd':_0x1639e3});const _0x5b78dc=Date[_0xe34b55(0x1a1)]()-_0x46784a;logger[_0xe34b55(0x1a0)](_0xe34b55(0x1a2),_0xe34b55(0x1a3),_0x5b78dc,{'projectCode':_0x350790});}catch(_0x5d368a){const _0x28b516=Date[_0xe34b55(0x1a1)]()-_0x46784a;logger['error']('install',_0xe34b55(0x1ad),{'projectCode':_0x350790,'error':_0x5d368a instanceof Error?_0x5d368a[_0xe34b55(0x1a8)]:String(_0x5d368a),'duration':_0x28b516});throw _0x5d368a;}return formatElapsed(_0x46784a);}
@@ -1 +1 @@
1
- function a151_0x4458(){const _0x31d828=['Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','864fAUQgN','220297pUoEDS','nonInteractive','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','upgrade','7853990KAjzHL','str','63YuFZeL','write','yes','string','project-name','35010rJBfVG','2899778NEIDDP','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','Target\x20environment','bool','17ebDslK','init','2026-07','env','Create\x20a\x20new\x20project','Skip\x20confirmation\x20prompt','../../commands/project/create/non-interactive.js','boolean','../../commands/project/create/main.js','3040zukQAx','276GTQJHS','100106yvfFDY','validation','270128UfeFcv','appcode','args','cookie','App\x20code\x20to\x20initialize','2448wCvWAp','project','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','\x20workspace\x20init'];a151_0x4458=function(){return _0x31d828;};return a151_0x4458();}const a151_0x3a2dba=a151_0x2719;(function(_0x3484f9,_0x18d830){const _0x4f4c6b=a151_0x2719,_0x10e21f=_0x3484f9();while(!![]){try{const _0x30a624=parseInt(_0x4f4c6b(0x79))/0x1*(parseInt(_0x4f4c6b(0x84))/0x2)+parseInt(_0x4f4c6b(0x74))/0x3*(parseInt(_0x4f4c6b(0x83))/0x4)+parseInt(_0x4f4c6b(0x82))/0x5*(parseInt(_0x4f4c6b(0x8b))/0x6)+-parseInt(_0x4f4c6b(0x75))/0x7+parseInt(_0x4f4c6b(0x86))/0x8*(-parseInt(_0x4f4c6b(0x6f))/0x9)+parseInt(_0x4f4c6b(0x6d))/0xa+-parseInt(_0x4f4c6b(0x91))/0xb*(parseInt(_0x4f4c6b(0x90))/0xc);if(_0x30a624===_0x18d830)break;else _0x10e21f['push'](_0x10e21f['shift']());}catch(_0x132817){_0x10e21f['push'](_0x10e21f['shift']());}}}(a151_0x4458,0x91c2a));import{CliErrors}from'../../errors.js';function a151_0x2719(_0x16cbc1,_0x27390b){_0x16cbc1=_0x16cbc1-0x6b;const _0x44585b=a151_0x4458();let _0x271907=_0x44585b[_0x16cbc1];return _0x271907;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a151_0x3a2dba(0x87),'type':'string','description':a151_0x3a2dba(0x8a)},{'name':a151_0x3a2dba(0x7c),'type':a151_0x3a2dba(0x72),'description':a151_0x3a2dba(0x77)},{'name':a151_0x3a2dba(0x71),'type':a151_0x3a2dba(0x80),'description':'Auto-confirm\x20prompts','default':![]}],createFlags=[{'name':'name','type':a151_0x3a2dba(0x72),'description':'Project\x20name'},{'name':'env','type':a151_0x3a2dba(0x72),'description':a151_0x3a2dba(0x77)},{'name':a151_0x3a2dba(0x87),'type':a151_0x3a2dba(0x72),'description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'}],upgradeFlags=[{'name':a151_0x3a2dba(0x71),'type':a151_0x3a2dba(0x80),'description':a151_0x3a2dba(0x7e),'default':![]}];export const projectDefinitions=[{'service':'project','command':a151_0x3a2dba(0x7a),'description':a151_0x3a2dba(0x8d),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a151_0x3a2dba(0x8e),'since':a151_0x3a2dba(0x7b)},'flags':initFlags,async 'execute'(_0x4097ea){const _0x166763=a151_0x3a2dba;return await initConfig({'appcode':_0x4097ea[_0x166763(0x6e)](_0x166763(0x87))||undefined,'env':_0x4097ea[_0x166763(0x6e)](_0x166763(0x7c))||undefined,'autoYes':_0x4097ea['bool'](_0x166763(0x71))}),{'ok':!![]};}},{'service':a151_0x3a2dba(0x8c),'command':'create','description':a151_0x3a2dba(0x7d),'risk':a151_0x3a2dba(0x70),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a151_0x3a2dba(0x73),'description':a151_0x3a2dba(0x6b),'required':![]}],'flags':createFlags,async 'execute'(_0x22ebdf){const _0x88fc30=a151_0x3a2dba,{createApp:_0x345549}=await import(_0x88fc30(0x81)),{createProjectNonInteractive:_0x3cc35d}=await import(_0x88fc30(0x7f)),_0x21099f=_0x22ebdf[_0x88fc30(0x6e)]('name')['trim']()||_0x22ebdf[_0x88fc30(0x88)][0x0]?.['trim'](),_0x23ff79=_0x22ebdf[_0x88fc30(0x6e)](_0x88fc30(0x7c))||undefined,_0x3f47b0=_0x22ebdf[_0x88fc30(0x6e)](_0x88fc30(0x87))||undefined;if(_0x22ebdf[_0x88fc30(0x92)]){if(!_0x21099f)throw CliErrors[_0x88fc30(0x85)](_0x88fc30(0x8f),'Usage:\x20'+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x3cc35d(_0x21099f,_0x23ff79,_0x3f47b0,_0x22ebdf[_0x88fc30(0x89)]);}else await _0x345549({'projectCode':_0x21099f,'appCode':_0x3f47b0,'env':_0x23ff79,'cookie':_0x22ebdf[_0x88fc30(0x89)]});return{'ok':!![]};}},{'service':a151_0x3a2dba(0x8c),'command':a151_0x3a2dba(0x6c),'description':a151_0x3a2dba(0x76),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x20a73d){const _0x3df709=a151_0x3a2dba;return await upgradeApp(_0x20a73d[_0x3df709(0x92)],{'yes':_0x20a73d[_0x3df709(0x78)](_0x3df709(0x71))}),{'ok':!![]};}}];
1
+ const a153_0x4cfcae=a153_0x3b21;(function(_0x2fef25,_0x2bf492){const _0x572291=a153_0x3b21,_0x19c9fd=_0x2fef25();while(!![]){try{const _0x9dd1e2=parseInt(_0x572291(0x119))/0x1+-parseInt(_0x572291(0x10e))/0x2*(parseInt(_0x572291(0x11f))/0x3)+-parseInt(_0x572291(0x11e))/0x4*(-parseInt(_0x572291(0xfe))/0x5)+-parseInt(_0x572291(0x101))/0x6*(-parseInt(_0x572291(0x10d))/0x7)+-parseInt(_0x572291(0x113))/0x8+parseInt(_0x572291(0xf6))/0x9*(-parseInt(_0x572291(0x117))/0xa)+parseInt(_0x572291(0xfd))/0xb*(-parseInt(_0x572291(0x109))/0xc);if(_0x9dd1e2===_0x2bf492)break;else _0x19c9fd['push'](_0x19c9fd['shift']());}catch(_0x198d32){_0x19c9fd['push'](_0x19c9fd['shift']());}}}(a153_0x5d11,0x65ec9));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a153_0x5d11(){const _0x35f79e=['1030AkiGpk','../../commands/project/create/main.js','674654VHLypk','args','name','create','../../commands/project/create/non-interactive.js','76UzjEKB','99QeyJLo','15894LZReiS','cookie','yes','trim','string','init','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','22PkYOAH','166510sLymFR','Create\x20a\x20new\x20project','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','127056SamapL','validation','App\x20code\x20to\x20initialize','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','project','write','project-name','Project\x20name','4598052RLkOMz','env','bool','2026-07','140pnHmCX','13812SVmiOD','Skip\x20confirmation\x20prompt','boolean','str','appcode','1098344mZBXfC','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','Target\x20environment'];a153_0x5d11=function(){return _0x35f79e;};return a153_0x5d11();}import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a153_0x4cfcae(0x112),'type':a153_0x4cfcae(0xfa),'description':a153_0x4cfcae(0x103)},{'name':a153_0x4cfcae(0x10a),'type':a153_0x4cfcae(0xfa),'description':a153_0x4cfcae(0x116)},{'name':a153_0x4cfcae(0xf8),'type':'boolean','description':'Auto-confirm\x20prompts','default':![]}],createFlags=[{'name':'name','type':'string','description':a153_0x4cfcae(0x108)},{'name':a153_0x4cfcae(0x10a),'type':a153_0x4cfcae(0xfa),'description':a153_0x4cfcae(0x116)},{'name':a153_0x4cfcae(0x112),'type':a153_0x4cfcae(0xfa),'description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'}],upgradeFlags=[{'name':'yes','type':a153_0x4cfcae(0x110),'description':a153_0x4cfcae(0x10f),'default':![]}];function a153_0x3b21(_0x144b9f,_0x196ec5){_0x144b9f=_0x144b9f-0xf6;const _0x5d11a7=a153_0x5d11();let _0x3b2102=_0x5d11a7[_0x144b9f];return _0x3b2102;}export const projectDefinitions=[{'service':a153_0x4cfcae(0x105),'command':a153_0x4cfcae(0xfb),'description':a153_0x4cfcae(0x115),'risk':a153_0x4cfcae(0x106),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+'\x20workspace\x20init','since':a153_0x4cfcae(0x10c)},'flags':initFlags,async 'execute'(_0x3feb6b){const _0x2635b4=a153_0x4cfcae;return await initConfig({'appcode':_0x3feb6b[_0x2635b4(0x111)]('appcode')||undefined,'env':_0x3feb6b[_0x2635b4(0x111)](_0x2635b4(0x10a))||undefined,'autoYes':_0x3feb6b['bool'](_0x2635b4(0xf8))}),{'ok':!![]};}},{'service':a153_0x4cfcae(0x105),'command':a153_0x4cfcae(0x11c),'description':a153_0x4cfcae(0xff),'risk':a153_0x4cfcae(0x106),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a153_0x4cfcae(0x107),'description':a153_0x4cfcae(0xfc),'required':![]}],'flags':createFlags,async 'execute'(_0xca4d3){const _0x5e0c4f=a153_0x4cfcae,{createApp:_0xfe1373}=await import(_0x5e0c4f(0x118)),{createProjectNonInteractive:_0x269f5e}=await import(_0x5e0c4f(0x11d)),_0x418c25=_0xca4d3['str'](_0x5e0c4f(0x11b))['trim']()||_0xca4d3[_0x5e0c4f(0x11a)][0x0]?.[_0x5e0c4f(0xf9)](),_0x3a7e0f=_0xca4d3[_0x5e0c4f(0x111)](_0x5e0c4f(0x10a))||undefined,_0x20a049=_0xca4d3['str'](_0x5e0c4f(0x112))||undefined;if(_0xca4d3['nonInteractive']){if(!_0x418c25)throw CliErrors[_0x5e0c4f(0x102)](_0x5e0c4f(0x114),'Usage:\x20'+CLI_BIN_NAME+_0x5e0c4f(0x104));await _0x269f5e(_0x418c25,_0x3a7e0f,_0x20a049,_0xca4d3[_0x5e0c4f(0xf7)]);}else await _0xfe1373({'projectCode':_0x418c25,'appCode':_0x20a049,'env':_0x3a7e0f,'cookie':_0xca4d3[_0x5e0c4f(0xf7)]});return{'ok':!![]};}},{'service':a153_0x4cfcae(0x105),'command':'upgrade','description':a153_0x4cfcae(0x100),'risk':a153_0x4cfcae(0x106),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x117a35){const _0x26e2ec=a153_0x4cfcae;return await upgradeApp(_0x117a35['nonInteractive'],{'yes':_0x117a35[_0x26e2ec(0x10b)]('yes')}),{'ok':!![]};}}];
@@ -1 +1 @@
1
- (function(_0x3c0622,_0x5c417c){const _0x11fc3b=a152_0x5485,_0x21e365=_0x3c0622();while(!![]){try{const _0x5badf9=parseInt(_0x11fc3b(0xd9))/0x1*(-parseInt(_0x11fc3b(0xd2))/0x2)+-parseInt(_0x11fc3b(0xd7))/0x3*(parseInt(_0x11fc3b(0xd1))/0x4)+-parseInt(_0x11fc3b(0xce))/0x5*(parseInt(_0x11fc3b(0xf7))/0x6)+parseInt(_0x11fc3b(0xf2))/0x7*(-parseInt(_0x11fc3b(0x100))/0x8)+parseInt(_0x11fc3b(0xd5))/0x9+-parseInt(_0x11fc3b(0xdd))/0xa*(-parseInt(_0x11fc3b(0xd3))/0xb)+-parseInt(_0x11fc3b(0xff))/0xc*(-parseInt(_0x11fc3b(0xf9))/0xd);if(_0x5badf9===_0x5c417c)break;else _0x21e365['push'](_0x21e365['shift']());}catch(_0x50b899){_0x21e365['push'](_0x21e365['shift']());}}}(a152_0x380b,0x43baf));import{readFileSync,existsSync,renameSync}from'node:fs';function a152_0x5485(_0x5a9471,_0x21146d){_0x5a9471=_0x5a9471-0xcc;const _0x380b37=a152_0x380b();let _0x54854b=_0x380b37[_0x5a9471];return _0x54854b;}function a152_0x380b(){const _0x5c2650=['defaultApp','init','\x20\x20Default:\x20','trim','gray','apps','cwd','join','string','\x20\x20appcode:\x20','parse','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','Please\x20enter\x20App\x20Code:','version','7RKWiXQ','\x20api\x20pull\x27','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','\x20api\x20generate\x27\x20and\x20\x27','appcode','354pimBIR','log','520XvMejW','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','Invalid\x20App\x20Code','green','\x20\x20Apps:\x20','1.0.0','180816LtAeCi','611416IHKQHK','production','app','bold','info','.bak','46370oMNzZf','setLogPath','utf8','1308KdDAWw','148qEuZJW','1284019EhDbNo','\x20→\x20.rabetbase.json','4578669hwCLyY','env','141UwcCGr','\x20workspace\x20init`\x20to\x20start\x20fresh.','5791otgApW','keys','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','Migration\x20cancelled.\x20Run\x20`','20erSlbw','Upgrade\x20it\x20to\x20','cyan','yellow','✓\x20Upgraded\x20','toLocaleString','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory'];a152_0x380b=function(){return _0x5c2650;};return a152_0x380b();}import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a152_0x1b33e8 from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../../context.js';import{validateAppcode}from'../../commands/common/validate.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x299672){const _0x1b2105=a152_0x5485,{appcode:_0x38d39b,env:_0x4c1e94,autoYes:_0x484e72}=_0x299672,_0x1d9c02=process[_0x1b2105(0xea)]();if(getProjectConfigPath())throw new Error(_0x1b2105(0xdb));let _0xc02eb2;for(const _0x4cee30 of LEGACY_CONFIG_NAMES){const _0x237760=resolve(_0x1d9c02,_0x4cee30);if(existsSync(_0x237760)){_0xc02eb2=_0x237760;break;}}if(_0xc02eb2){let _0x1735f4={};try{_0x1735f4=JSON[_0x1b2105(0xee)](readFileSync(_0xc02eb2,_0x1b2105(0xd0)));}catch{}const _0x128749=basename(_0xc02eb2),_0x5913ce=_0x1735f4?.['appcode']||_0x1735f4?.[_0x1b2105(0x102)];let _0x46bf61=_0x484e72;!_0x484e72&&(console[_0x1b2105(0xf8)](a152_0x1b33e8[_0x1b2105(0xe0)](_0x1b2105(0xfa)+a152_0x1b33e8[_0x1b2105(0x103)](_0x128749))),_0x5913ce&&console[_0x1b2105(0xf8)](a152_0x1b33e8[_0x1b2105(0xdf)](_0x1b2105(0xed)+_0x5913ce)),_0x46bf61=await confirm({'message':_0x1b2105(0xde)+a152_0x1b33e8[_0x1b2105(0x103)]('.rabetbase.json')+'?\x20(Old\x20file\x20→\x20*.bak)','default':!![]}));if(!_0x46bf61){console[_0x1b2105(0xf8)](_0x1b2105(0xdc)+CLI_BIN_NAME+_0x1b2105(0xd8));return;}const _0x180d22=resolve(_0x1d9c02,NEW_CONFIG_NAME),_0x1f9441=getCliVersionFromPkg(),_0x42b8fe=readRawConfig(),_0x55d369=_0x38d39b||(typeof _0x1735f4?.[_0x1b2105(0xf6)]==='string'?_0x1735f4[_0x1b2105(0xf6)]:undefined)||(typeof _0x1735f4?.['app']===_0x1b2105(0xec)?_0x1735f4[_0x1b2105(0x102)]:undefined)||await askAppcode(),_0x3bab13=typeof _0x1735f4?.[_0x1b2105(0xd6)]===_0x1b2105(0xec)?_0x1735f4['env']:typeof _0x42b8fe[_0x1b2105(0xd6)]===_0x1b2105(0xec)?_0x42b8fe[_0x1b2105(0xd6)]:_0x1b2105(0x101),_0x5b2536=buildCanonicalProjectConfig({..._0x42b8fe,..._0x1735f4},{'appCodes':[_0x55d369],'env':_0x3bab13,'metadata':{'version':_0x1f9441,'migratedAt':new Date()[_0x1b2105(0xe2)](),'migratedFrom':_0xc02eb2}});writeConfigFile(_0x180d22,_0x5b2536);const _0x217df4=_0xc02eb2+_0x1b2105(0xcd);renameSync(_0xc02eb2,_0x217df4),logger[_0x1b2105(0xcf)](_0x1d9c02),logger[_0x1b2105(0xcc)](_0x1b2105(0xe5),'从旧配置文件升级成功',{'from':_0xc02eb2,'to':_0x180d22,'appcode':_0x55d369,'env':_0x5b2536[_0x1b2105(0xd6)]}),console['log'](a152_0x1b33e8['green'](_0x1b2105(0xe1)+_0x128749+_0x1b2105(0xd4))),console[_0x1b2105(0xf8)](a152_0x1b33e8['cyan'](_0x1b2105(0xfd)+Object[_0x1b2105(0xda)](_0x5b2536[_0x1b2105(0xe9)]||{})[_0x1b2105(0xeb)](',\x20'))),console['log'](a152_0x1b33e8['cyan'](_0x1b2105(0xe6)+_0x5b2536[_0x1b2105(0xe4)])),console[_0x1b2105(0xf8)](a152_0x1b33e8[_0x1b2105(0xe8)](_0x1b2105(0xf4)+_0x128749+_0x1b2105(0xcd)));return;}const _0x36184a=_0x38d39b||await askAppcode(),_0x428fc0=resolve(_0x1d9c02,NEW_CONFIG_NAME),_0x33efdf=getCliVersionFromPkg(),_0x1554eb=readRawConfig(),_0x65ae29=typeof _0x1554eb[_0x1b2105(0xd6)]===_0x1b2105(0xec)?_0x1554eb[_0x1b2105(0xd6)]:undefined,_0x435036=buildCanonicalProjectConfig({},{'appCodes':[_0x36184a],'env':_0x4c1e94||_0x65ae29||_0x1b2105(0x101),'metadata':{'version':_0x33efdf,'createdAt':new Date()['toLocaleString']()}});writeConfigFile(_0x428fc0,_0x435036),logger[_0x1b2105(0xcf)](_0x1d9c02),logger[_0x1b2105(0xcc)](_0x1b2105(0xe5),'初始化项目配置文件成功',{'appcode':_0x36184a,'env':_0x435036[_0x1b2105(0xd6)],'version':_0x435036[_0x1b2105(0xf1)],'configPath':_0x428fc0}),console[_0x1b2105(0xf8)](a152_0x1b33e8[_0x1b2105(0xfc)](_0x1b2105(0xe3))),console[_0x1b2105(0xf8)](a152_0x1b33e8['cyan']('\x20\x20Apps:\x20'+Object[_0x1b2105(0xda)](_0x435036[_0x1b2105(0xe9)]||{})[_0x1b2105(0xeb)](',\x20'))),console[_0x1b2105(0xf8)](a152_0x1b33e8[_0x1b2105(0xdf)](_0x1b2105(0xe6)+_0x435036['defaultApp'])),console[_0x1b2105(0xf8)](_0x1b2105(0xef)+CLI_BIN_NAME+_0x1b2105(0xf5)+CLI_BIN_NAME+_0x1b2105(0xf3));}function askAppcode(){const _0x117bbb=a152_0x5485;return input({'message':_0x117bbb(0xf0),'validate':_0x5207a2=>{const _0x4af41f=_0x117bbb;if(!_0x5207a2[_0x4af41f(0xe7)]())return'App\x20Code\x20cannot\x20be\x20empty';const {valid:_0x5e7590,message:_0x1f16a3}=validateAppcode(_0x5207a2[_0x4af41f(0xe7)]());return _0x5e7590||_0x1f16a3||_0x4af41f(0xfb);}});}function getCliVersionFromPkg(){const _0x3f871b=a152_0x5485;try{const _0x55a448=fileURLToPath(import.meta.url),_0x668f3d=resolve(dirname(_0x55a448),'../..'),_0x24062a=JSON[_0x3f871b(0xee)](readFileSync(resolve(_0x668f3d,'package.json'),'utf8'));return _0x24062a[_0x3f871b(0xf1)]||_0x3f871b(0xfe);}catch{return _0x3f871b(0xfe);}}
1
+ (function(_0xbac0f4,_0x5e2576){const _0x1302e7=a154_0x9052,_0x595b88=_0xbac0f4();while(!![]){try{const _0x19a697=parseInt(_0x1302e7(0x125))/0x1*(-parseInt(_0x1302e7(0x121))/0x2)+-parseInt(_0x1302e7(0x11e))/0x3+-parseInt(_0x1302e7(0x13e))/0x4*(-parseInt(_0x1302e7(0x134))/0x5)+parseInt(_0x1302e7(0x12c))/0x6+-parseInt(_0x1302e7(0x13a))/0x7*(parseInt(_0x1302e7(0x135))/0x8)+parseInt(_0x1302e7(0x124))/0x9+parseInt(_0x1302e7(0x136))/0xa*(-parseInt(_0x1302e7(0x138))/0xb);if(_0x19a697===_0x5e2576)break;else _0x595b88['push'](_0x595b88['shift']());}catch(_0x3ba3c3){_0x595b88['push'](_0x595b88['shift']());}}}(a154_0x2a07,0xe40e0));function a154_0x9052(_0x10d989,_0x56c243){_0x10d989=_0x10d989-0x11c;const _0x2a07d8=a154_0x2a07();let _0x9052a5=_0x2a07d8[_0x10d989];return _0x9052a5;}import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a154_0x174cb3 from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../../context.js';import{validateAppcode}from'../../commands/common/validate.js';function a154_0x2a07(){const _0x446640=['../..','✓\x20Upgraded\x20','cwd','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','log','utf8','从旧配置文件升级成功','version','\x20\x20appcode:\x20','初始化项目配置文件成功','1.0.0','toLocaleString','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','\x20\x20Apps:\x20','934719ThLYyk','keys','info','26elKVHR','setLogPath','.rabetbase.json','952020UaSUgz','53986JLXfQG','defaultApp','cyan','parse','app','trim','Migration\x20cancelled.\x20Run\x20`','11200332ovsmYR','.bak','green','Please\x20enter\x20App\x20Code:','Upgrade\x20it\x20to\x20','\x20\x20Default:\x20','bold','apps','140UTgYAC','16vHubcP','112210fxBhrS','gray','869ZMeHmp','env','300132Fiebzh','appcode','string','production','135316XuYGPc','join'];a154_0x2a07=function(){return _0x446640;};return a154_0x2a07();}import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x36d084){const _0x31399f=a154_0x9052,{appcode:_0x5405d5,env:_0x236643,autoYes:_0x88508}=_0x36d084,_0x161003=process[_0x31399f(0x142)]();if(getProjectConfigPath())throw new Error(_0x31399f(0x11c));let _0x4c199e;for(const _0x36dea4 of LEGACY_CONFIG_NAMES){const _0x1c3fe2=resolve(_0x161003,_0x36dea4);if(existsSync(_0x1c3fe2)){_0x4c199e=_0x1c3fe2;break;}}if(_0x4c199e){let _0x3c1135={};try{_0x3c1135=JSON[_0x31399f(0x128)](readFileSync(_0x4c199e,_0x31399f(0x145)));}catch{}const _0x3ec8b3=basename(_0x4c199e),_0x2646b0=_0x3c1135?.[_0x31399f(0x13b)]||_0x3c1135?.['app'];let _0x1d9033=_0x88508;!_0x88508&&(console[_0x31399f(0x144)](a154_0x174cb3['yellow'](_0x31399f(0x143)+a154_0x174cb3['bold'](_0x3ec8b3))),_0x2646b0&&console['log'](a154_0x174cb3['cyan'](_0x31399f(0x148)+_0x2646b0)),_0x1d9033=await confirm({'message':_0x31399f(0x130)+a154_0x174cb3[_0x31399f(0x132)](_0x31399f(0x123))+'?\x20(Old\x20file\x20→\x20*.bak)','default':!![]}));if(!_0x1d9033){console[_0x31399f(0x144)](_0x31399f(0x12b)+CLI_BIN_NAME+'\x20workspace\x20init`\x20to\x20start\x20fresh.');return;}const _0x5bc243=resolve(_0x161003,NEW_CONFIG_NAME),_0x11321f=getCliVersionFromPkg(),_0x2d63a8=readRawConfig(),_0x55169c=_0x5405d5||(typeof _0x3c1135?.[_0x31399f(0x13b)]===_0x31399f(0x13c)?_0x3c1135['appcode']:undefined)||(typeof _0x3c1135?.[_0x31399f(0x129)]===_0x31399f(0x13c)?_0x3c1135['app']:undefined)||await askAppcode(),_0x11fc48=typeof _0x3c1135?.[_0x31399f(0x139)]==='string'?_0x3c1135['env']:typeof _0x2d63a8['env']===_0x31399f(0x13c)?_0x2d63a8['env']:_0x31399f(0x13d),_0x43bcec=buildCanonicalProjectConfig({..._0x2d63a8,..._0x3c1135},{'appCodes':[_0x55169c],'env':_0x11fc48,'metadata':{'version':_0x11321f,'migratedAt':new Date()[_0x31399f(0x14b)](),'migratedFrom':_0x4c199e}});writeConfigFile(_0x5bc243,_0x43bcec);const _0x5d383f=_0x4c199e+_0x31399f(0x12d);renameSync(_0x4c199e,_0x5d383f),logger['setLogPath'](_0x161003),logger[_0x31399f(0x120)]('init',_0x31399f(0x146),{'from':_0x4c199e,'to':_0x5bc243,'appcode':_0x55169c,'env':_0x43bcec['env']}),console[_0x31399f(0x144)](a154_0x174cb3[_0x31399f(0x12e)](_0x31399f(0x141)+_0x3ec8b3+'\x20→\x20.rabetbase.json')),console[_0x31399f(0x144)](a154_0x174cb3['cyan'](_0x31399f(0x11d)+Object[_0x31399f(0x11f)](_0x43bcec[_0x31399f(0x133)]||{})[_0x31399f(0x13f)](',\x20'))),console[_0x31399f(0x144)](a154_0x174cb3[_0x31399f(0x127)](_0x31399f(0x131)+_0x43bcec[_0x31399f(0x126)])),console[_0x31399f(0x144)](a154_0x174cb3[_0x31399f(0x137)]('\x20\x20Old\x20file\x20backed\x20up\x20as\x20'+_0x3ec8b3+_0x31399f(0x12d)));return;}const _0x5edd1a=_0x5405d5||await askAppcode(),_0x55484f=resolve(_0x161003,NEW_CONFIG_NAME),_0x836fd2=getCliVersionFromPkg(),_0x8628a2=readRawConfig(),_0x107bc0=typeof _0x8628a2[_0x31399f(0x139)]===_0x31399f(0x13c)?_0x8628a2[_0x31399f(0x139)]:undefined,_0x1e6807=buildCanonicalProjectConfig({},{'appCodes':[_0x5edd1a],'env':_0x236643||_0x107bc0||_0x31399f(0x13d),'metadata':{'version':_0x836fd2,'createdAt':new Date()[_0x31399f(0x14b)]()}});writeConfigFile(_0x55484f,_0x1e6807),logger[_0x31399f(0x122)](_0x161003),logger[_0x31399f(0x120)]('init',_0x31399f(0x149),{'appcode':_0x5edd1a,'env':_0x1e6807['env'],'version':_0x1e6807[_0x31399f(0x147)],'configPath':_0x55484f}),console['log'](a154_0x174cb3[_0x31399f(0x12e)]('✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory')),console[_0x31399f(0x144)](a154_0x174cb3[_0x31399f(0x127)](_0x31399f(0x11d)+Object[_0x31399f(0x11f)](_0x1e6807[_0x31399f(0x133)]||{})[_0x31399f(0x13f)](',\x20'))),console[_0x31399f(0x144)](a154_0x174cb3[_0x31399f(0x127)]('\x20\x20Default:\x20'+_0x1e6807[_0x31399f(0x126)])),console[_0x31399f(0x144)]('\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27'+CLI_BIN_NAME+'\x20api\x20generate\x27\x20and\x20\x27'+CLI_BIN_NAME+'\x20api\x20pull\x27');}function askAppcode(){const _0x3edf72=a154_0x9052;return input({'message':_0x3edf72(0x12f),'validate':_0x580810=>{const _0x521007=_0x3edf72;if(!_0x580810[_0x521007(0x12a)]())return'App\x20Code\x20cannot\x20be\x20empty';const {valid:_0x54878c,message:_0x108a13}=validateAppcode(_0x580810[_0x521007(0x12a)]());return _0x54878c||_0x108a13||'Invalid\x20App\x20Code';}});}function getCliVersionFromPkg(){const _0x171e5=a154_0x9052;try{const _0x3f7fb2=fileURLToPath(import.meta.url),_0x2d7fa2=resolve(dirname(_0x3f7fb2),_0x171e5(0x140)),_0x1aa228=JSON[_0x171e5(0x128)](readFileSync(resolve(_0x2d7fa2,'package.json'),_0x171e5(0x145)));return _0x1aa228['version']||_0x171e5(0x14a);}catch{return _0x171e5(0x14a);}}
@@ -1 +1 @@
1
- (function(_0x4f287a,_0x2da52f){const _0x5c2ef4=a153_0x2726,_0x4d21bd=_0x4f287a();while(!![]){try{const _0x115568=-parseInt(_0x5c2ef4(0x184))/0x1*(parseInt(_0x5c2ef4(0x153))/0x2)+-parseInt(_0x5c2ef4(0x13a))/0x3+parseInt(_0x5c2ef4(0x140))/0x4+parseInt(_0x5c2ef4(0x141))/0x5+parseInt(_0x5c2ef4(0x15a))/0x6*(parseInt(_0x5c2ef4(0x199))/0x7)+-parseInt(_0x5c2ef4(0x17a))/0x8*(-parseInt(_0x5c2ef4(0x155))/0x9)+-parseInt(_0x5c2ef4(0x167))/0xa;if(_0x115568===_0x2da52f)break;else _0x4d21bd['push'](_0x4d21bd['shift']());}catch(_0x431e98){_0x4d21bd['push'](_0x4d21bd['shift']());}}}(a153_0x4b98,0xb716b));import a153_0x23fde0 from'chalk';import a153_0xa7ecf1 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';function a153_0x4b98(){const _0x2c2e9a=['.lovrabet','\x20\x20New\x20config\x20(.rabetbase.json):\x20','Clean\x20MCP\x20config','Upgrade\x20cancelled.','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','3650703RJfNpO','not\x20needed','inherit','some','path','oldPath','2610804KMxhao','6983130yCFCgu','isDirectory','configMigration','red','.cursor/rules/lovrabet_rules.mdc','sdkUpgrade','not\x20found\x20(will\x20create)','latest','removed\x20','oldArtifacts','step','Legacy\x20artifacts:','status','lovrabet/rabetbase','oldMcpConfig','white','args','keys','6VezTRe','dependencies','65115ThexPj','values','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','@lovrabet/dataset-mcp-server','\x20→\x20','2431056ChWjgU','\x20\x20Action:\x20delete','\x20\x20bun\x20install','yellow','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','push','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','\x20(backup:\x20','files','Remove\x20.lovrabet/','.cursor/mcp.json','object','info','2882310VqEWzy','detail','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','stringify','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','MCP\x20config:','fields','lovrabet/rabetbase\x20installed\x20globally','package.json','undefined','mcpServers','\x20→\x20latest','Remove\x20legacy\x20artifacts','@lovrabet/sdk','length','@lovrabet/sdk:','includes','start','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','1128TYpFEP','fail','devDependencies','===\x20Upgrade\x20Analysis\x20===','Step\x201/7:\x20Config\x20migration\x20—\x20','no\x20legacy\x20entry','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','skipped','lovrabet/lovrabet-skill\x20removed','no\x20matching\x20entry\x20found','406525zUhpKC','[\x22@lovrabet/sdk\x22]:\x20','filter','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','\x20removed\x20(','error','exit\x20','utf8','already\x20exists\x20(will\x20merge)','isArray','\x20\x20Fields\x20to\x20migrate:\x20','no\x20legacy\x20config\x20found','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','done','green','Config\x20file:','needed','parse','Config\x20migration','string','7kDJreh','hasNewConfig','gray','FAIL','entries','yes','none\x20found','.bak','\x20removed','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','not\x20found\x20or\x20already\x20at\x20latest','label','failed','bold','Step\x204/7:\x20MCP\x20config\x20—\x20','message','\x20\x20npm\x20install','Step\x205/7:\x20Removing\x20old\x20skill...','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','succeed','CANCEL','\x20\x20Current\x20version\x20in\x20','Proceed\x20with\x20upgrade?','\x20\x20\x20\x20\x20\x20\x20','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','log','.claude/skills/lovrabet','join','Remove\x20old\x20skill','cyan','\x20\x20Step\x20'];a153_0x4b98=function(){return _0x2c2e9a;};return a153_0x4b98();}import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0x42e3b9=>_0x42e3b9!==NEW_CONFIG_NAME);function a153_0x2726(_0x21801b,_0x54e83a){_0x21801b=_0x21801b-0x11c;const _0x4b983e=a153_0x4b98();let _0x272658=_0x4b983e[_0x21801b];return _0x272658;}function collectIdeSkillFiles(_0x2e503a){const _0x3c94bd=a153_0x2726,_0x1346da=[];for(const _0x584903 of Object[_0x3c94bd(0x156)](CORE_IDE_CONFIGS)){if(_0x584903[_0x3c94bd(0x162)])for(const _0x3a87d5 of _0x584903[_0x3c94bd(0x162)]){_0x1346da['push'](resolve(_0x2e503a,_0x3a87d5[_0x3c94bd(0x13e)]));}}return _0x1346da;}function analyse(_0x182cd7){const _0x215e00=a153_0x2726;let _0x187a47=null;const _0x580cd5=resolve(_0x182cd7,NEW_CONFIG_NAME),_0x377199=existsSync(_0x580cd5);for(const _0x5cfdf1 of LEGACY_CONFIG_NAMES){const _0x5cdb1b=resolve(_0x182cd7,_0x5cfdf1);if(existsSync(_0x5cdb1b)){const _0x38742=readConfigFile(_0x5cdb1b),_0x4db9f0=Object['keys'](_0x38742)[_0x215e00(0x186)](_0x26da52=>typeof _0x38742[_0x26da52]!==_0x215e00(0x170));_0x187a47={'oldPath':_0x5cdb1b,'hasNewConfig':_0x377199,'fields':_0x4db9f0};break;}}const _0x14b6ca=[],_0x22d9f6=resolve(_0x182cd7,_0x215e00(0x135));if(existsSync(_0x22d9f6))_0x14b6ca['push'](_0x22d9f6);const _0x2e6bb8=resolve(_0x182cd7,_0x215e00(0x145));if(existsSync(_0x2e6bb8))_0x14b6ca['push'](_0x2e6bb8);const _0x54e56d=resolve(_0x182cd7,_0x215e00(0x130));if(existsSync(_0x54e56d))_0x14b6ca[_0x215e00(0x15f)](_0x54e56d);for(const _0x22bf5b of collectIdeSkillFiles(_0x182cd7)){if(existsSync(_0x22bf5b))_0x14b6ca[_0x215e00(0x15f)](_0x22bf5b);}let _0x1e387a=null;const _0x57bff7=resolve(_0x182cd7,_0x215e00(0x164));if(existsSync(_0x57bff7))try{const _0x1eaac5=JSON[_0x215e00(0x196)](readFileSync(_0x57bff7,_0x215e00(0x18b)));if(_0x1eaac5?.[_0x215e00(0x171)]&&typeof _0x1eaac5['mcpServers']===_0x215e00(0x165)){const _0x516da1=[];for(const [_0x4578bc,_0x55dd08]of Object['entries'](_0x1eaac5[_0x215e00(0x171)])){const _0x470c23=_0x55dd08;_0x470c23?.[_0x215e00(0x151)]&&Array[_0x215e00(0x18d)](_0x470c23[_0x215e00(0x151)])&&_0x470c23[_0x215e00(0x151)]['some'](_0x23f523=>typeof _0x23f523===_0x215e00(0x198)&&_0x23f523[_0x215e00(0x177)]('@lovrabet/dataset-mcp-server'))&&_0x516da1[_0x215e00(0x15f)](_0x4578bc);}_0x516da1[_0x215e00(0x175)]>0x0&&(_0x1e387a={'path':_0x57bff7,'keys':_0x516da1});}}catch{}const _0x12e216=_0x14b6ca['length']>0x0||_0x187a47!==null;let _0x3ab1ca=null;const _0x707759=resolve(_0x182cd7,_0x215e00(0x16f));if(existsSync(_0x707759))try{const _0x4ab80d=JSON[_0x215e00(0x196)](readFileSync(_0x707759,_0x215e00(0x18b)));for(const _0xbbd0bc of[_0x215e00(0x154),_0x215e00(0x17c)]){const _0x2f61c2=_0x4ab80d?.[_0xbbd0bc]?.[_0x215e00(0x174)];if(typeof _0x2f61c2==='string'){_0x2f61c2!==_0x215e00(0x148)&&(_0x3ab1ca={'pkgPath':_0x707759,'currentVersion':_0x2f61c2,'field':_0xbbd0bc});break;}}}catch{}return{'configMigration':_0x187a47,'oldArtifacts':_0x14b6ca,'oldMcpConfig':_0x1e387a,'needsSkillSwap':_0x12e216,'sdkUpgrade':_0x3ab1ca};}function printReport(_0x7c3cc4){const _0x48929a=a153_0x2726,{configMigration:_0x2962d4,oldArtifacts:_0x1bd004,oldMcpConfig:_0x53c17f,needsSkillSwap:_0x305a43}=_0x7c3cc4;console['log'](''),console['log'](a153_0x23fde0[_0x48929a(0x123)](_0x48929a(0x17d))),console[_0x48929a(0x12f)]('');_0x2962d4?(console[_0x48929a(0x12f)](a153_0x23fde0['cyan'](_0x48929a(0x194))+('\x20\x20'+a153_0x23fde0[_0x48929a(0x15d)](_0x2962d4[_0x48929a(0x13f)]))),console[_0x48929a(0x12f)](_0x48929a(0x136)+(_0x2962d4[_0x48929a(0x19a)]?a153_0x23fde0[_0x48929a(0x193)](_0x48929a(0x18c)):a153_0x23fde0[_0x48929a(0x19b)](_0x48929a(0x147)))),console['log'](_0x48929a(0x18e)+_0x2962d4[_0x48929a(0x16d)][_0x48929a(0x131)](',\x20')),console[_0x48929a(0x12f)](_0x48929a(0x179))):console['log'](a153_0x23fde0[_0x48929a(0x133)](_0x48929a(0x194))+'\x20\x20'+a153_0x23fde0['gray'](_0x48929a(0x18f)));console[_0x48929a(0x12f)]('');if(_0x1bd004[_0x48929a(0x175)]>0x0){console[_0x48929a(0x12f)](a153_0x23fde0[_0x48929a(0x133)](_0x48929a(0x14c)));for(const _0x1108bc of _0x1bd004){console[_0x48929a(0x12f)]('\x20\x20'+a153_0x23fde0[_0x48929a(0x144)]('FOUND')+'\x20\x20'+_0x1108bc);}console['log'](_0x48929a(0x15b));}else console['log'](a153_0x23fde0['cyan'](_0x48929a(0x14c))+'\x20\x20'+a153_0x23fde0['gray'](_0x48929a(0x11c)));console[_0x48929a(0x12f)]('');_0x53c17f?(console[_0x48929a(0x12f)](a153_0x23fde0['cyan'](_0x48929a(0x16c))+('\x20\x20'+a153_0x23fde0['yellow'](_0x53c17f[_0x48929a(0x13e)])+'\x20→\x20keys:\x20'+_0x53c17f[_0x48929a(0x152)][_0x48929a(0x131)](',\x20'))),console['log'](_0x48929a(0x139))):console['log'](a153_0x23fde0[_0x48929a(0x133)](_0x48929a(0x16c))+'\x20\x20'+a153_0x23fde0[_0x48929a(0x19b)](_0x48929a(0x17f)));console[_0x48929a(0x12f)](''),console[_0x48929a(0x12f)](a153_0x23fde0[_0x48929a(0x133)]('Skill\x20swap:')+('\x20\x20'+(_0x305a43?a153_0x23fde0[_0x48929a(0x15d)](_0x48929a(0x195)):a153_0x23fde0[_0x48929a(0x193)](_0x48929a(0x13b)))));_0x305a43&&console[_0x48929a(0x12f)](_0x48929a(0x160)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x48929a(0x12f)]('');if(_0x7c3cc4['sdkUpgrade']){const {currentVersion:_0x37fa6c,field:_0x1b85c1,pkgPath:_0x30d898}=_0x7c3cc4[_0x48929a(0x146)];console[_0x48929a(0x12f)](a153_0x23fde0[_0x48929a(0x133)]('@lovrabet/sdk:')+('\x20\x20'+a153_0x23fde0[_0x48929a(0x15d)](_0x30d898))),console[_0x48929a(0x12f)](_0x48929a(0x12b)+_0x1b85c1+':\x20'+a153_0x23fde0[_0x48929a(0x15d)](_0x37fa6c)+_0x48929a(0x159)+a153_0x23fde0['green'](_0x48929a(0x148))),console['log'](_0x48929a(0x11f));}else console[_0x48929a(0x12f)](a153_0x23fde0[_0x48929a(0x133)](_0x48929a(0x176))+'\x20\x20'+a153_0x23fde0[_0x48929a(0x19b)](_0x48929a(0x120)));console['log']('');}function execConfigMigration(_0x1cfbb9,_0x252880){const _0x24b1fe=a153_0x2726,{configMigration:_0x2b6a2d}=_0x1cfbb9;if(!_0x2b6a2d?.[_0x24b1fe(0x13f)])return{'step':0x1,'label':_0x24b1fe(0x197),'ok':!![],'detail':'skipped\x20(no\x20legacy\x20config)'};const _0x3a4a41=readConfigFile(_0x2b6a2d['oldPath']),_0xeb1a50=resolve(_0x252880,NEW_CONFIG_NAME),_0x1cc63e=_0x2b6a2d[_0x24b1fe(0x19a)]?readConfigFile(_0xeb1a50):{};for(const [_0x3505b1,_0x3138f8]of Object[_0x24b1fe(0x19d)](_0x3a4a41)){!(_0x3505b1 in _0x1cc63e)&&(_0x1cc63e[_0x3505b1]=_0x3138f8);}writeConfigFile(_0xeb1a50,_0x1cc63e);const _0x2d36a7=_0x2b6a2d[_0x24b1fe(0x13f)]+_0x24b1fe(0x11d);return renameSync(_0x2b6a2d[_0x24b1fe(0x13f)],_0x2d36a7),{'step':0x1,'label':_0x24b1fe(0x197),'ok':!![],'detail':_0x2b6a2d[_0x24b1fe(0x13f)]+_0x24b1fe(0x159)+_0xeb1a50+_0x24b1fe(0x161)+_0x2d36a7+')'};}function execRemoveOldArtifacts(_0x4b73d0){const _0x19c30d=a153_0x2726,_0x5101c8=[];for(const _0x1b47c9 of _0x4b73d0){try{if(!existsSync(_0x1b47c9))continue;const _0x57db27=tryStat(_0x1b47c9);_0x57db27?.[_0x19c30d(0x142)]()?rmSync(_0x1b47c9,{'recursive':!![],'force':!![]}):unlinkSync(_0x1b47c9);}catch(_0x375763){_0x5101c8[_0x19c30d(0x15f)](_0x1b47c9+':\x20'+_0x375763[_0x19c30d(0x125)]);}}return{'step':0x3,'label':_0x19c30d(0x173),'ok':_0x5101c8[_0x19c30d(0x175)]===0x0,'detail':_0x5101c8[_0x19c30d(0x175)]>0x0?_0x4b73d0['length']-_0x5101c8[_0x19c30d(0x175)]+'/'+_0x4b73d0['length']+_0x19c30d(0x188)+_0x5101c8[_0x19c30d(0x131)](';\x20')+')':_0x4b73d0[_0x19c30d(0x175)]+_0x19c30d(0x11e)};}function execCleanMcp(_0x5015fe){const _0xa591ee=a153_0x2726;if(!_0x5015fe[_0xa591ee(0x14f)])return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0xa591ee(0x181)};try{const _0x569c68=readFileSync(_0x5015fe['oldMcpConfig'][_0xa591ee(0x13e)],_0xa591ee(0x18b)),_0x47f536=JSON['parse'](_0x569c68);if(_0x47f536?.[_0xa591ee(0x171)]&&typeof _0x47f536[_0xa591ee(0x171)]===_0xa591ee(0x165)){const _0x2f0699=[];for(const [_0x2b6f1b,_0x3d857a]of Object[_0xa591ee(0x19d)](_0x47f536[_0xa591ee(0x171)])){_0x3d857a?.[_0xa591ee(0x151)]&&Array[_0xa591ee(0x18d)](_0x3d857a[_0xa591ee(0x151)])&&_0x3d857a[_0xa591ee(0x151)]['some'](_0x151dde=>typeof _0x151dde===_0xa591ee(0x198)&&_0x151dde[_0xa591ee(0x177)](_0xa591ee(0x158)))&&_0x2f0699[_0xa591ee(0x15f)](_0x2b6f1b);}for(const _0x349286 of _0x2f0699){delete _0x47f536[_0xa591ee(0x171)][_0x349286];}return _0x2f0699[_0xa591ee(0x175)]>0x0&&writeFileSync(_0x5015fe[_0xa591ee(0x14f)][_0xa591ee(0x13e)],JSON[_0xa591ee(0x16a)](_0x47f536,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':_0xa591ee(0x137),'ok':!![],'detail':_0xa591ee(0x149)+_0x2f0699[_0xa591ee(0x131)](',\x20')+'\x20from\x20'+_0x5015fe[_0xa591ee(0x14f)][_0xa591ee(0x13e)]};}return{'step':0x4,'label':_0xa591ee(0x137),'ok':!![],'detail':_0xa591ee(0x183)};}catch(_0x49b0bd){return{'step':0x4,'label':_0xa591ee(0x137),'ok':![],'detail':_0x49b0bd['message']};}}function execSkillsRemove(_0x103fe9,_0xcf30ce){const _0x4b4989=a153_0x2726,_0x353910=runNpxSkillsRemove(_0x103fe9,{'stdio':_0x4b4989(0x13c),'yes':_0xcf30ce});return{'step':0x5,'label':_0x4b4989(0x132),'ok':_0x353910['ok'],'detail':_0x353910['ok']?_0x4b4989(0x182):_0x353910[_0x4b4989(0x189)]??_0x4b4989(0x18a)+_0x353910['status']};}function execSkillsAdd(_0x271a33,_0x300257){const _0xcf52fe=a153_0x2726,_0x2d69df=runNpxSkillsAddGlobal(_0x271a33,_0xcf52fe(0x14e),{'stdio':_0xcf52fe(0x13c),'yes':_0x300257});return{'step':0x6,'label':'Install\x20new\x20skill','ok':_0x2d69df['ok'],'detail':_0x2d69df['ok']?_0xcf52fe(0x16e):_0x2d69df[_0xcf52fe(0x189)]??'exit\x20'+_0x2d69df[_0xcf52fe(0x14d)]};}function execUpgradeSdk(_0x1651f9){const _0x252c62=a153_0x2726;if(!_0x1651f9[_0x252c62(0x146)])return{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0x252c62(0x169)};const {pkgPath:_0x294286,currentVersion:_0x10257c,field:_0x2ecde9}=_0x1651f9['sdkUpgrade'];try{const _0x2b2dc6=readFileSync(_0x294286,_0x252c62(0x18b)),_0x2df023=JSON['parse'](_0x2b2dc6);return _0x2df023[_0x2ecde9][_0x252c62(0x174)]=_0x252c62(0x148),writeFileSync(_0x294286,JSON[_0x252c62(0x16a)](_0x2df023,null,0x2)+'\x0a',_0x252c62(0x18b)),{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0x2ecde9+_0x252c62(0x185)+_0x10257c+_0x252c62(0x172)};}catch(_0x204166){return{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':![],'detail':_0x204166[_0x252c62(0x125)]};}}function tryStat(_0x123b8e){try{return statSync(_0x123b8e);}catch{return undefined;}}function printSummary(_0x2cb9f4){const _0x511e3f=a153_0x2726;console[_0x511e3f(0x12f)](''),console[_0x511e3f(0x12f)](a153_0x23fde0['bold']('===\x20Upgrade\x20Summary\x20===')),console[_0x511e3f(0x12f)]('');for(const _0x351297 of _0x2cb9f4){const _0x58aba8=_0x351297['ok']?a153_0x23fde0[_0x511e3f(0x193)]('OK'):a153_0x23fde0[_0x511e3f(0x144)](_0x511e3f(0x19c));console['log']('\x20\x20'+_0x58aba8+_0x511e3f(0x134)+_0x351297[_0x511e3f(0x14b)]+':\x20'+_0x351297[_0x511e3f(0x121)]);if(_0x351297[_0x511e3f(0x168)])console[_0x511e3f(0x12f)](_0x511e3f(0x12d)+a153_0x23fde0['gray'](_0x351297[_0x511e3f(0x168)]));}console[_0x511e3f(0x12f)]('');}export async function upgradeApp(_0x52b61f,_0x3311a4){const _0x214de5=a153_0x2726,_0x11f982=process['cwd'](),_0x2ec4de=analyse(_0x11f982),_0x568e6d=!_0x2ec4de[_0x214de5(0x143)]&&_0x2ec4de[_0x214de5(0x14a)][_0x214de5(0x175)]===0x0&&!_0x2ec4de[_0x214de5(0x14f)]&&!_0x2ec4de['needsSkillSwap']&&!_0x2ec4de['sdkUpgrade'];if(_0x568e6d){console[_0x214de5(0x12f)](a153_0x23fde0[_0x214de5(0x193)](_0x214de5(0x191)));return;}printReport(_0x2ec4de);const _0x4ee774=!!(_0x3311a4[_0x214de5(0x19e)]||_0x3311a4['Y']||_0x52b61f);if(!_0x4ee774)try{const _0x54c90e=await askConfirm(_0x214de5(0x12c));if(!_0x54c90e){console[_0x214de5(0x12f)](a153_0x23fde0[_0x214de5(0x19b)](_0x214de5(0x138)));return;}}catch(_0x87da76){if(_0x87da76?.['message']===_0x214de5(0x12a)){console['log'](a153_0x23fde0[_0x214de5(0x19b)](_0x214de5(0x138)));return;}throw _0x87da76;}const _0x12a8e9=[],_0x3bca7a=a153_0xa7ecf1({'text':'Step\x201/7:\x20Migrating\x20config...','color':_0x214de5(0x133)})[_0x214de5(0x178)](),_0x406887=execConfigMigration(_0x2ec4de,_0x11f982);_0x12a8e9['push'](_0x406887),_0x3bca7a[_0x406887['ok']?_0x214de5(0x129):_0x214de5(0x17b)](_0x214de5(0x17e)+(_0x406887[_0x214de5(0x168)]??(_0x406887['ok']?'done':_0x214de5(0x122))));const _0x59de64=resolve(_0x11f982,_0x214de5(0x135)),_0x241307=a153_0xa7ecf1({'text':_0x214de5(0x187),'color':'cyan'})[_0x214de5(0x178)]();if(existsSync(_0x59de64))try{rmSync(_0x59de64,{'recursive':!![],'force':!![]}),_0x241307[_0x214de5(0x129)](_0x214de5(0x16b)),_0x12a8e9[_0x214de5(0x15f)]({'step':0x2,'label':_0x214de5(0x163),'ok':!![]});}catch(_0x206e64){_0x241307[_0x214de5(0x17b)](_0x214de5(0x128)+_0x206e64['message']),_0x12a8e9[_0x214de5(0x15f)]({'step':0x2,'label':_0x214de5(0x163),'ok':![],'detail':_0x206e64[_0x214de5(0x125)]});}else _0x241307[_0x214de5(0x166)]('Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped'),_0x12a8e9[_0x214de5(0x15f)]({'step':0x2,'label':_0x214de5(0x163),'ok':!![],'detail':_0x214de5(0x181)});const _0x4e9f2a=a153_0xa7ecf1({'text':'Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','color':'cyan'})[_0x214de5(0x178)](),_0x532cfc=execRemoveOldArtifacts(_0x2ec4de['oldArtifacts']);_0x12a8e9[_0x214de5(0x15f)](_0x532cfc),_0x4e9f2a[_0x532cfc['ok']?_0x214de5(0x129):_0x214de5(0x17b)](_0x214de5(0x15e)+(_0x532cfc[_0x214de5(0x168)]??(_0x532cfc['ok']?_0x214de5(0x192):_0x214de5(0x122))));const _0x1b8732=a153_0xa7ecf1({'text':'Step\x204/7:\x20Cleaning\x20MCP\x20config...','color':'cyan'})['start'](),_0x34c8be=execCleanMcp(_0x2ec4de);_0x12a8e9[_0x214de5(0x15f)](_0x34c8be),_0x1b8732[_0x34c8be['ok']?_0x214de5(0x129):'fail'](_0x214de5(0x124)+(_0x34c8be[_0x214de5(0x168)]??(_0x34c8be['ok']?_0x214de5(0x192):_0x214de5(0x122))));const _0x2ea465=a153_0xa7ecf1({'text':_0x214de5(0x127),'color':_0x214de5(0x133)})[_0x214de5(0x178)](),_0x1b501c=execSkillsRemove(_0x11f982,_0x4ee774);_0x12a8e9['push'](_0x1b501c),_0x2ea465[_0x1b501c['ok']?'succeed':'fail']('Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20'+(_0x1b501c[_0x214de5(0x168)]??(_0x1b501c['ok']?_0x214de5(0x192):_0x214de5(0x122))));const _0x349889=a153_0xa7ecf1({'text':'Step\x206/7:\x20Installing\x20new\x20skill...','color':_0x214de5(0x133)})['start'](),_0x266bb5=execSkillsAdd(_0x11f982,_0x4ee774);_0x12a8e9['push'](_0x266bb5),_0x349889[_0x266bb5['ok']?_0x214de5(0x129):_0x214de5(0x17b)](_0x214de5(0x12e)+(_0x266bb5[_0x214de5(0x168)]??(_0x266bb5['ok']?_0x214de5(0x192):_0x214de5(0x122))));const _0xb6aab3=a153_0xa7ecf1({'text':_0x214de5(0x190),'color':_0x214de5(0x133)})[_0x214de5(0x178)](),_0x1ba154=execUpgradeSdk(_0x2ec4de);_0x12a8e9[_0x214de5(0x15f)](_0x1ba154),_0xb6aab3[_0x1ba154['ok']?_0x214de5(0x129):_0x214de5(0x17b)](_0x214de5(0x157)+(_0x1ba154[_0x214de5(0x168)]??(_0x1ba154['ok']?_0x214de5(0x192):'failed'))),printSummary(_0x12a8e9);const _0x522e65=_0x12a8e9[_0x214de5(0x13d)](_0x2550fe=>!_0x2550fe['ok']);_0x522e65?console[_0x214de5(0x12f)](a153_0x23fde0[_0x214de5(0x15d)](_0x214de5(0x180))):console['log'](a153_0x23fde0[_0x214de5(0x193)]('Upgrade\x20completed\x20successfully!')),_0x1ba154['ok']&&_0x2ec4de[_0x214de5(0x146)]&&(console[_0x214de5(0x12f)](''),console[_0x214de5(0x12f)](a153_0x23fde0[_0x214de5(0x123)][_0x214de5(0x133)]('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console[_0x214de5(0x12f)](a153_0x23fde0[_0x214de5(0x133)]('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console['log'](''),console['log'](a153_0x23fde0['white'](_0x214de5(0x126))),console[_0x214de5(0x12f)](a153_0x23fde0[_0x214de5(0x150)]('\x20\x20#\x20or')),console[_0x214de5(0x12f)](a153_0x23fde0[_0x214de5(0x150)](_0x214de5(0x15c))),console[_0x214de5(0x12f)](''));}
1
+ const a155_0x4705f5=a155_0x5ba0;(function(_0x1b3c5c,_0x3220a7){const _0x4c8149=a155_0x5ba0,_0x700387=_0x1b3c5c();while(!![]){try{const _0x3119b4=parseInt(_0x4c8149(0x1dd))/0x1*(parseInt(_0x4c8149(0x1eb))/0x2)+parseInt(_0x4c8149(0x23e))/0x3*(-parseInt(_0x4c8149(0x200))/0x4)+parseInt(_0x4c8149(0x22c))/0x5+parseInt(_0x4c8149(0x22d))/0x6+parseInt(_0x4c8149(0x205))/0x7+parseInt(_0x4c8149(0x1dc))/0x8*(parseInt(_0x4c8149(0x23a))/0x9)+-parseInt(_0x4c8149(0x1e6))/0xa*(parseInt(_0x4c8149(0x243))/0xb);if(_0x3119b4===_0x3220a7)break;else _0x700387['push'](_0x700387['shift']());}catch(_0x39a134){_0x700387['push'](_0x700387['shift']());}}}(a155_0x2806,0x79793));import a155_0x3b0fbc from'chalk';import a155_0x190b8e from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,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=CONFIG_NAMES[a155_0x4705f5(0x204)](_0x206efb=>_0x206efb!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x581c38){const _0x383281=a155_0x4705f5,_0x1b9832=[];for(const _0x5ca1a2 of Object[_0x383281(0x212)](CORE_IDE_CONFIGS)){if(_0x5ca1a2['files'])for(const _0x29caa4 of _0x5ca1a2[_0x383281(0x236)]){_0x1b9832[_0x383281(0x1f5)](resolve(_0x581c38,_0x29caa4['path']));}}return _0x1b9832;}function analyse(_0x484e81){const _0x52f2b5=a155_0x4705f5;let _0x6ecfd2=null;const _0x526432=resolve(_0x484e81,NEW_CONFIG_NAME),_0x52af8d=existsSync(_0x526432);for(const _0xa2217e of LEGACY_CONFIG_NAMES){const _0x71e4aa=resolve(_0x484e81,_0xa2217e);if(existsSync(_0x71e4aa)){const _0x1374cc=readConfigFile(_0x71e4aa),_0x206b75=Object[_0x52f2b5(0x208)](_0x1374cc)[_0x52f2b5(0x204)](_0x299216=>typeof _0x1374cc[_0x299216]!==_0x52f2b5(0x1e2));_0x6ecfd2={'oldPath':_0x71e4aa,'hasNewConfig':_0x52af8d,'fields':_0x206b75};break;}}const _0x182bf2=[],_0x3cf6f0=resolve(_0x484e81,_0x52f2b5(0x1d7));if(existsSync(_0x3cf6f0))_0x182bf2['push'](_0x3cf6f0);const _0x4b3dc6=resolve(_0x484e81,_0x52f2b5(0x240));if(existsSync(_0x4b3dc6))_0x182bf2[_0x52f2b5(0x1f5)](_0x4b3dc6);const _0x5853f4=resolve(_0x484e81,_0x52f2b5(0x234));if(existsSync(_0x5853f4))_0x182bf2[_0x52f2b5(0x1f5)](_0x5853f4);for(const _0x503ae5 of collectIdeSkillFiles(_0x484e81)){if(existsSync(_0x503ae5))_0x182bf2[_0x52f2b5(0x1f5)](_0x503ae5);}let _0x2dbbd7=null;const _0xbb5757=resolve(_0x484e81,'.cursor/mcp.json');if(existsSync(_0xbb5757))try{const _0x3cb5a2=JSON[_0x52f2b5(0x229)](readFileSync(_0xbb5757,_0x52f2b5(0x252)));if(_0x3cb5a2?.[_0x52f2b5(0x248)]&&typeof _0x3cb5a2['mcpServers']===_0x52f2b5(0x21e)){const _0x2da1b7=[];for(const [_0x8aeac3,_0x7db0f3]of Object[_0x52f2b5(0x1e9)](_0x3cb5a2[_0x52f2b5(0x248)])){const _0x40bfc0=_0x7db0f3;_0x40bfc0?.[_0x52f2b5(0x223)]&&Array['isArray'](_0x40bfc0[_0x52f2b5(0x223)])&&_0x40bfc0[_0x52f2b5(0x223)][_0x52f2b5(0x239)](_0x44683b=>typeof _0x44683b===_0x52f2b5(0x1e3)&&_0x44683b[_0x52f2b5(0x1ef)](_0x52f2b5(0x24e)))&&_0x2da1b7['push'](_0x8aeac3);}_0x2da1b7[_0x52f2b5(0x224)]>0x0&&(_0x2dbbd7={'path':_0xbb5757,'keys':_0x2da1b7});}}catch{}const _0x6653a3=_0x182bf2['length']>0x0||_0x6ecfd2!==null;let _0x4bec7a=null;const _0x18f90d=resolve(_0x484e81,_0x52f2b5(0x1da));if(existsSync(_0x18f90d))try{const _0x2c6b48=JSON[_0x52f2b5(0x229)](readFileSync(_0x18f90d,_0x52f2b5(0x252)));for(const _0x5275a8 of[_0x52f2b5(0x21d),_0x52f2b5(0x202)]){const _0x290d82=_0x2c6b48?.[_0x5275a8]?.[_0x52f2b5(0x211)];if(typeof _0x290d82===_0x52f2b5(0x1e3)){_0x290d82!==_0x52f2b5(0x228)&&(_0x4bec7a={'pkgPath':_0x18f90d,'currentVersion':_0x290d82,'field':_0x5275a8});break;}}}catch{}return{'configMigration':_0x6ecfd2,'oldArtifacts':_0x182bf2,'oldMcpConfig':_0x2dbbd7,'needsSkillSwap':_0x6653a3,'sdkUpgrade':_0x4bec7a};}function printReport(_0x49f63c){const _0x69174b=a155_0x4705f5,{configMigration:_0x15d277,oldArtifacts:_0x47a9fb,oldMcpConfig:_0x349572,needsSkillSwap:_0xab4139}=_0x49f63c;console[_0x69174b(0x203)](''),console['log'](a155_0x3b0fbc[_0x69174b(0x22e)](_0x69174b(0x231))),console['log']('');_0x15d277?(console[_0x69174b(0x203)](a155_0x3b0fbc[_0x69174b(0x242)](_0x69174b(0x1d5))+('\x20\x20'+a155_0x3b0fbc[_0x69174b(0x1d2)](_0x15d277[_0x69174b(0x222)]))),console[_0x69174b(0x203)](_0x69174b(0x210)+(_0x15d277[_0x69174b(0x1de)]?a155_0x3b0fbc[_0x69174b(0x1f3)]('already\x20exists\x20(will\x20merge)'):a155_0x3b0fbc['gray']('not\x20found\x20(will\x20create)'))),console[_0x69174b(0x203)]('\x20\x20Fields\x20to\x20migrate:\x20'+_0x15d277[_0x69174b(0x23b)][_0x69174b(0x23c)](',\x20')),console[_0x69174b(0x203)](_0x69174b(0x1d9))):console['log'](a155_0x3b0fbc[_0x69174b(0x242)](_0x69174b(0x1d5))+'\x20\x20'+a155_0x3b0fbc[_0x69174b(0x20b)](_0x69174b(0x219)));console['log']('');if(_0x47a9fb['length']>0x0){console['log'](a155_0x3b0fbc[_0x69174b(0x242)](_0x69174b(0x21c)));for(const _0x532019 of _0x47a9fb){console[_0x69174b(0x203)]('\x20\x20'+a155_0x3b0fbc[_0x69174b(0x206)](_0x69174b(0x1cf))+'\x20\x20'+_0x532019);}console[_0x69174b(0x203)](_0x69174b(0x1d8));}else console['log'](a155_0x3b0fbc[_0x69174b(0x242)](_0x69174b(0x21c))+'\x20\x20'+a155_0x3b0fbc['gray'](_0x69174b(0x1f6)));console['log']('');_0x349572?(console[_0x69174b(0x203)](a155_0x3b0fbc[_0x69174b(0x242)]('MCP\x20config:')+('\x20\x20'+a155_0x3b0fbc[_0x69174b(0x1d2)](_0x349572['path'])+_0x69174b(0x227)+_0x349572[_0x69174b(0x208)][_0x69174b(0x23c)](',\x20'))),console['log'](_0x69174b(0x1e8))):console[_0x69174b(0x203)](a155_0x3b0fbc['cyan'](_0x69174b(0x1d1))+'\x20\x20'+a155_0x3b0fbc[_0x69174b(0x20b)](_0x69174b(0x249)));console[_0x69174b(0x203)](''),console[_0x69174b(0x203)](a155_0x3b0fbc[_0x69174b(0x242)]('Skill\x20swap:')+('\x20\x20'+(_0xab4139?a155_0x3b0fbc['yellow'](_0x69174b(0x1ea)):a155_0x3b0fbc[_0x69174b(0x1f3)]('not\x20needed'))));_0xab4139&&console[_0x69174b(0x203)]('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x69174b(0x203)]('');if(_0x49f63c[_0x69174b(0x1fd)]){const {currentVersion:_0x11f1e1,field:_0x7ddae4,pkgPath:_0x1376e4}=_0x49f63c[_0x69174b(0x1fd)];console[_0x69174b(0x203)](a155_0x3b0fbc[_0x69174b(0x242)](_0x69174b(0x246))+('\x20\x20'+a155_0x3b0fbc[_0x69174b(0x1d2)](_0x1376e4))),console[_0x69174b(0x203)](_0x69174b(0x20e)+_0x7ddae4+':\x20'+a155_0x3b0fbc[_0x69174b(0x1d2)](_0x11f1e1)+'\x20→\x20'+a155_0x3b0fbc[_0x69174b(0x1f3)](_0x69174b(0x228))),console[_0x69174b(0x203)](_0x69174b(0x237));}else console['log'](a155_0x3b0fbc[_0x69174b(0x242)](_0x69174b(0x246))+'\x20\x20'+a155_0x3b0fbc['gray'](_0x69174b(0x241)));console['log']('');}function execConfigMigration(_0x5bac63,_0x10c112){const _0x5ad91b=a155_0x4705f5,{configMigration:_0x28727c}=_0x5bac63;if(!_0x28727c?.['oldPath'])return{'step':0x1,'label':_0x5ad91b(0x214),'ok':!![],'detail':_0x5ad91b(0x24b)};const _0x177743=readConfigFile(_0x28727c[_0x5ad91b(0x222)]),_0x4f848d=resolve(_0x10c112,NEW_CONFIG_NAME),_0x1a69b5=_0x28727c[_0x5ad91b(0x1de)]?readConfigFile(_0x4f848d):{};for(const [_0x46868f,_0x2b1c8a]of Object[_0x5ad91b(0x1e9)](_0x177743)){!(_0x46868f in _0x1a69b5)&&(_0x1a69b5[_0x46868f]=_0x2b1c8a);}writeConfigFile(_0x4f848d,_0x1a69b5);const _0x3ef69b=_0x28727c[_0x5ad91b(0x222)]+_0x5ad91b(0x1db);return renameSync(_0x28727c['oldPath'],_0x3ef69b),{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x28727c[_0x5ad91b(0x222)]+_0x5ad91b(0x1e5)+_0x4f848d+_0x5ad91b(0x1e1)+_0x3ef69b+')'};}function a155_0x2806(){const _0x3c8e88=['.lovrabet','\x20\x20Action:\x20delete','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','package.json','.bak','80VbVNlM','11cKFNrs','hasNewConfig','CANCEL','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','\x20(backup:\x20','undefined','string','\x20\x20bun\x20install','\x20→\x20','48610yyyMTW','oldMcpConfig','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','entries','needed','112618VyalBC','stringify','\x20removed\x20(','FAIL','includes','no\x20matching\x20entry\x20found','succeed','Remove\x20legacy\x20artifacts','green','Proceed\x20with\x20upgrade?','push','none\x20found','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','isArray','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','failed','Clean\x20MCP\x20config','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','sdkUpgrade','[\x22@lovrabet/sdk\x22]:\x20','Upgrade\x20@lovrabet/sdk','375644LjzDdt','removed\x20','devDependencies','log','filter','1387645NnfNxP','red','Remove\x20old\x20skill','keys','Upgrade\x20cancelled.','fail','gray','start','white','\x20\x20Current\x20version\x20in\x20','\x20\x20\x20\x20\x20\x20\x20','\x20\x20New\x20config\x20(.rabetbase.json):\x20','@lovrabet/sdk','values','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','Config\x20migration','Step\x205/7:\x20Removing\x20old\x20skill...','yes','\x20→\x20latest','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','no\x20legacy\x20config\x20found','oldArtifacts','Step\x204/7:\x20MCP\x20config\x20—\x20','Legacy\x20artifacts:','dependencies','object','exit\x20','Upgrade\x20completed\x20successfully!','\x20removed','oldPath','args','length','\x20\x20Step\x20','\x20\x20#\x20or','\x20→\x20keys:\x20','latest','parse','error','cwd','83105ISRCij','3838650BVJOxP','bold','skipped','Step\x204/7:\x20Cleaning\x20MCP\x20config...','===\x20Upgrade\x20Analysis\x20===','Remove\x20.lovrabet/','lovrabet/lovrabet-skill\x20removed','.claude/skills/lovrabet','\x20\x20npm\x20install','files','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','configMigration','some','513603bjlImo','fields','join','detail','12elncTu','needsSkillSwap','.cursor/rules/lovrabet_rules.mdc','not\x20found\x20or\x20already\x20at\x20latest','cyan','2651ddKBDw','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','message','@lovrabet/sdk:','status','mcpServers','no\x20legacy\x20entry','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','skipped\x20(no\x20legacy\x20config)','path','lovrabet/rabetbase\x20installed\x20globally','@lovrabet/dataset-mcp-server','info','Step\x206/7:\x20Installing\x20new\x20skill...','Install\x20new\x20skill','utf8','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','FOUND','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','MCP\x20config:','yellow','isDirectory','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','Config\x20file:','done'];a155_0x2806=function(){return _0x3c8e88;};return a155_0x2806();}function execRemoveOldArtifacts(_0x1c75d0){const _0x2974dc=a155_0x4705f5,_0x336d6a=[];for(const _0x571c91 of _0x1c75d0){try{if(!existsSync(_0x571c91))continue;const _0x423ea2=tryStat(_0x571c91);_0x423ea2?.[_0x2974dc(0x1d3)]()?rmSync(_0x571c91,{'recursive':!![],'force':!![]}):unlinkSync(_0x571c91);}catch(_0x10cf08){_0x336d6a[_0x2974dc(0x1f5)](_0x571c91+':\x20'+_0x10cf08[_0x2974dc(0x245)]);}}return{'step':0x3,'label':_0x2974dc(0x1f2),'ok':_0x336d6a[_0x2974dc(0x224)]===0x0,'detail':_0x336d6a[_0x2974dc(0x224)]>0x0?_0x1c75d0[_0x2974dc(0x224)]-_0x336d6a[_0x2974dc(0x224)]+'/'+_0x1c75d0[_0x2974dc(0x224)]+_0x2974dc(0x1ed)+_0x336d6a[_0x2974dc(0x23c)](';\x20')+')':_0x1c75d0[_0x2974dc(0x224)]+_0x2974dc(0x221)};}function execCleanMcp(_0x2eb49f){const _0x3d651f=a155_0x4705f5;if(!_0x2eb49f[_0x3d651f(0x1e7)])return{'step':0x4,'label':_0x3d651f(0x1fb),'ok':!![],'detail':_0x3d651f(0x22f)};try{const _0x5a56e3=readFileSync(_0x2eb49f[_0x3d651f(0x1e7)]['path'],_0x3d651f(0x252)),_0x1a8d36=JSON[_0x3d651f(0x229)](_0x5a56e3);if(_0x1a8d36?.['mcpServers']&&typeof _0x1a8d36['mcpServers']==='object'){const _0x5398e9=[];for(const [_0x5f4915,_0x2126ac]of Object['entries'](_0x1a8d36['mcpServers'])){_0x2126ac?.['args']&&Array[_0x3d651f(0x1f8)](_0x2126ac[_0x3d651f(0x223)])&&_0x2126ac[_0x3d651f(0x223)]['some'](_0x5deddf=>typeof _0x5deddf==='string'&&_0x5deddf[_0x3d651f(0x1ef)](_0x3d651f(0x24e)))&&_0x5398e9[_0x3d651f(0x1f5)](_0x5f4915);}for(const _0xc25bcd of _0x5398e9){delete _0x1a8d36['mcpServers'][_0xc25bcd];}return _0x5398e9[_0x3d651f(0x224)]>0x0&&writeFileSync(_0x2eb49f[_0x3d651f(0x1e7)]['path'],JSON[_0x3d651f(0x1ec)](_0x1a8d36,null,0x2)+'\x0a',_0x3d651f(0x252)),{'step':0x4,'label':_0x3d651f(0x1fb),'ok':!![],'detail':_0x3d651f(0x201)+_0x5398e9[_0x3d651f(0x23c)](',\x20')+'\x20from\x20'+_0x2eb49f[_0x3d651f(0x1e7)][_0x3d651f(0x24c)]};}return{'step':0x4,'label':_0x3d651f(0x1fb),'ok':!![],'detail':_0x3d651f(0x1f0)};}catch(_0x3b19b4){return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':![],'detail':_0x3b19b4[_0x3d651f(0x245)]};}}function a155_0x5ba0(_0x2a3f8b,_0x50b872){_0x2a3f8b=_0x2a3f8b-0x1cf;const _0x280601=a155_0x2806();let _0x5ba0f7=_0x280601[_0x2a3f8b];return _0x5ba0f7;}function execSkillsRemove(_0x24b048,_0x332bba){const _0x2a5ff5=a155_0x4705f5,_0x3d38b3=runNpxSkillsRemove(_0x24b048,{'stdio':'inherit','yes':_0x332bba});return{'step':0x5,'label':_0x2a5ff5(0x207),'ok':_0x3d38b3['ok'],'detail':_0x3d38b3['ok']?_0x2a5ff5(0x233):_0x3d38b3[_0x2a5ff5(0x22a)]??_0x2a5ff5(0x21f)+_0x3d38b3['status']};}function execSkillsAdd(_0x58a051,_0x8c78ef){const _0x5e4594=a155_0x4705f5,_0x26b528=runNpxSkillsAddGlobal(_0x58a051,'lovrabet/rabetbase',{'stdio':'inherit','yes':_0x8c78ef});return{'step':0x6,'label':_0x5e4594(0x251),'ok':_0x26b528['ok'],'detail':_0x26b528['ok']?_0x5e4594(0x24d):_0x26b528[_0x5e4594(0x22a)]??_0x5e4594(0x21f)+_0x26b528[_0x5e4594(0x247)]};}function execUpgradeSdk(_0x1d05dd){const _0x39d817=a155_0x4705f5;if(!_0x1d05dd[_0x39d817(0x1fd)])return{'step':0x7,'label':_0x39d817(0x1ff),'ok':!![],'detail':_0x39d817(0x213)};const {pkgPath:_0x1cf89e,currentVersion:_0x4ab820,field:_0x8ef9d4}=_0x1d05dd['sdkUpgrade'];try{const _0x5a7967=readFileSync(_0x1cf89e,_0x39d817(0x252)),_0x33916f=JSON[_0x39d817(0x229)](_0x5a7967);return _0x33916f[_0x8ef9d4][_0x39d817(0x211)]=_0x39d817(0x228),writeFileSync(_0x1cf89e,JSON[_0x39d817(0x1ec)](_0x33916f,null,0x2)+'\x0a',_0x39d817(0x252)),{'step':0x7,'label':_0x39d817(0x1ff),'ok':!![],'detail':_0x8ef9d4+_0x39d817(0x1fe)+_0x4ab820+_0x39d817(0x217)};}catch(_0xf038d1){return{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':![],'detail':_0xf038d1[_0x39d817(0x245)]};}}function tryStat(_0x2eefe6){try{return statSync(_0x2eefe6);}catch{return undefined;}}function printSummary(_0x43f961){const _0x2ad75e=a155_0x4705f5;console[_0x2ad75e(0x203)](''),console[_0x2ad75e(0x203)](a155_0x3b0fbc[_0x2ad75e(0x22e)]('===\x20Upgrade\x20Summary\x20===')),console[_0x2ad75e(0x203)]('');for(const _0x49db30 of _0x43f961){const _0x4dada8=_0x49db30['ok']?a155_0x3b0fbc[_0x2ad75e(0x1f3)]('OK'):a155_0x3b0fbc[_0x2ad75e(0x206)](_0x2ad75e(0x1ee));console['log']('\x20\x20'+_0x4dada8+_0x2ad75e(0x225)+_0x49db30['step']+':\x20'+_0x49db30['label']);if(_0x49db30['detail'])console[_0x2ad75e(0x203)](_0x2ad75e(0x20f)+a155_0x3b0fbc[_0x2ad75e(0x20b)](_0x49db30['detail']));}console[_0x2ad75e(0x203)]('');}export async function upgradeApp(_0x3e0685,_0x3841c5){const _0x37810b=a155_0x4705f5,_0x19332d=process[_0x37810b(0x22b)](),_0x278d39=analyse(_0x19332d),_0x3e6ff1=!_0x278d39[_0x37810b(0x238)]&&_0x278d39['oldArtifacts'][_0x37810b(0x224)]===0x0&&!_0x278d39[_0x37810b(0x1e7)]&&!_0x278d39[_0x37810b(0x23f)]&&!_0x278d39[_0x37810b(0x1fd)];if(_0x3e6ff1){console[_0x37810b(0x203)](a155_0x3b0fbc['green'](_0x37810b(0x218)));return;}printReport(_0x278d39);const _0x257092=!!(_0x3841c5[_0x37810b(0x216)]||_0x3841c5['Y']||_0x3e0685);if(!_0x257092)try{const _0x11db57=await askConfirm(_0x37810b(0x1f4));if(!_0x11db57){console[_0x37810b(0x203)](a155_0x3b0fbc['gray'](_0x37810b(0x209)));return;}}catch(_0x4405f3){if(_0x4405f3?.[_0x37810b(0x245)]===_0x37810b(0x1df)){console[_0x37810b(0x203)](a155_0x3b0fbc[_0x37810b(0x20b)]('Upgrade\x20cancelled.'));return;}throw _0x4405f3;}const _0x1f25d3=[],_0x303c13=a155_0x190b8e({'text':'Step\x201/7:\x20Migrating\x20config...','color':_0x37810b(0x242)})[_0x37810b(0x20c)](),_0x3069c0=execConfigMigration(_0x278d39,_0x19332d);_0x1f25d3[_0x37810b(0x1f5)](_0x3069c0),_0x303c13[_0x3069c0['ok']?_0x37810b(0x1f1):_0x37810b(0x20a)]('Step\x201/7:\x20Config\x20migration\x20—\x20'+(_0x3069c0[_0x37810b(0x23d)]??(_0x3069c0['ok']?_0x37810b(0x1d6):_0x37810b(0x1fa))));const _0x70063f=resolve(_0x19332d,_0x37810b(0x1d7)),_0x4848f4=a155_0x190b8e({'text':_0x37810b(0x1d0),'color':_0x37810b(0x242)})[_0x37810b(0x20c)]();if(existsSync(_0x70063f))try{rmSync(_0x70063f,{'recursive':!![],'force':!![]}),_0x4848f4[_0x37810b(0x1f1)](_0x37810b(0x244)),_0x1f25d3['push']({'step':0x2,'label':_0x37810b(0x232),'ok':!![]});}catch(_0x2f7147){_0x4848f4['fail']('Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0x2f7147['message']),_0x1f25d3[_0x37810b(0x1f5)]({'step':0x2,'label':_0x37810b(0x232),'ok':![],'detail':_0x2f7147[_0x37810b(0x245)]});}else _0x4848f4[_0x37810b(0x24f)](_0x37810b(0x1f9)),_0x1f25d3['push']({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![],'detail':_0x37810b(0x22f)});const _0x329b05=a155_0x190b8e({'text':_0x37810b(0x1d4),'color':_0x37810b(0x242)})[_0x37810b(0x20c)](),_0x2543d1=execRemoveOldArtifacts(_0x278d39[_0x37810b(0x21a)]);_0x1f25d3['push'](_0x2543d1),_0x329b05[_0x2543d1['ok']?_0x37810b(0x1f1):_0x37810b(0x20a)]('Step\x203/7:\x20Legacy\x20artifacts\x20—\x20'+(_0x2543d1['detail']??(_0x2543d1['ok']?_0x37810b(0x1d6):'failed')));const _0x243b6a=a155_0x190b8e({'text':_0x37810b(0x230),'color':'cyan'})[_0x37810b(0x20c)](),_0x19f50c=execCleanMcp(_0x278d39);_0x1f25d3[_0x37810b(0x1f5)](_0x19f50c),_0x243b6a[_0x19f50c['ok']?_0x37810b(0x1f1):_0x37810b(0x20a)](_0x37810b(0x21b)+(_0x19f50c[_0x37810b(0x23d)]??(_0x19f50c['ok']?_0x37810b(0x1d6):_0x37810b(0x1fa))));const _0x2d73b4=a155_0x190b8e({'text':_0x37810b(0x215),'color':_0x37810b(0x242)})[_0x37810b(0x20c)](),_0x1cfa80=execSkillsRemove(_0x19332d,_0x257092);_0x1f25d3[_0x37810b(0x1f5)](_0x1cfa80),_0x2d73b4[_0x1cfa80['ok']?_0x37810b(0x1f1):'fail'](_0x37810b(0x253)+(_0x1cfa80[_0x37810b(0x23d)]??(_0x1cfa80['ok']?'done':_0x37810b(0x1fa))));const _0x24519e=a155_0x190b8e({'text':_0x37810b(0x250),'color':_0x37810b(0x242)})[_0x37810b(0x20c)](),_0x35c87b=execSkillsAdd(_0x19332d,_0x257092);_0x1f25d3[_0x37810b(0x1f5)](_0x35c87b),_0x24519e[_0x35c87b['ok']?_0x37810b(0x1f1):_0x37810b(0x20a)](_0x37810b(0x1f7)+(_0x35c87b[_0x37810b(0x23d)]??(_0x35c87b['ok']?_0x37810b(0x1d6):_0x37810b(0x1fa))));const _0x2fc66d=a155_0x190b8e({'text':_0x37810b(0x1e0),'color':_0x37810b(0x242)})['start'](),_0x42e290=execUpgradeSdk(_0x278d39);_0x1f25d3[_0x37810b(0x1f5)](_0x42e290),_0x2fc66d[_0x42e290['ok']?_0x37810b(0x1f1):_0x37810b(0x20a)](_0x37810b(0x24a)+(_0x42e290[_0x37810b(0x23d)]??(_0x42e290['ok']?_0x37810b(0x1d6):'failed'))),printSummary(_0x1f25d3);const _0x314478=_0x1f25d3[_0x37810b(0x239)](_0x3de35a=>!_0x3de35a['ok']);_0x314478?console[_0x37810b(0x203)](a155_0x3b0fbc[_0x37810b(0x1d2)]('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console['log'](a155_0x3b0fbc['green'](_0x37810b(0x220))),_0x42e290['ok']&&_0x278d39[_0x37810b(0x1fd)]&&(console[_0x37810b(0x203)](''),console['log'](a155_0x3b0fbc[_0x37810b(0x22e)][_0x37810b(0x242)](_0x37810b(0x1fc))),console[_0x37810b(0x203)](a155_0x3b0fbc[_0x37810b(0x242)]('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x37810b(0x203)](''),console['log'](a155_0x3b0fbc['white'](_0x37810b(0x235))),console['log'](a155_0x3b0fbc[_0x37810b(0x20d)](_0x37810b(0x226))),console[_0x37810b(0x203)](a155_0x3b0fbc['white'](_0x37810b(0x1e4))),console[_0x37810b(0x203)](''));}
@@ -1 +1 @@
1
- const a154_0x4684b4=a154_0x39bd;(function(_0x4897bf,_0x321df4){const _0x275cd4=a154_0x39bd,_0x5cc3b1=_0x4897bf();while(!![]){try{const _0x69d71d=parseInt(_0x275cd4(0xa5))/0x1+parseInt(_0x275cd4(0xcd))/0x2*(parseInt(_0x275cd4(0xc5))/0x3)+parseInt(_0x275cd4(0xe3))/0x4*(parseInt(_0x275cd4(0xd7))/0x5)+parseInt(_0x275cd4(0xc4))/0x6*(parseInt(_0x275cd4(0xbd))/0x7)+-parseInt(_0x275cd4(0xc3))/0x8+-parseInt(_0x275cd4(0xbf))/0x9*(parseInt(_0x275cd4(0xce))/0xa)+-parseInt(_0x275cd4(0xb9))/0xb;if(_0x69d71d===_0x321df4)break;else _0x5cc3b1['push'](_0x5cc3b1['shift']());}catch(_0x4ae1f0){_0x5cc3b1['push'](_0x5cc3b1['shift']());}}}(a154_0x2274,0xabaa8));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{dataDefinitions}from'../commands/data/index.js';import{dbDefinitions}from'../commands/db/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{taskDefinitions}from'../commands/task/index.js';import{roleDefinitions}from'../commands/role/index.js';import{permitDefinitions}from'../commands/permit/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/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{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/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(_0x217c32){const _0x3bba26=a154_0x39bd;for(const _0x1efa5e of _0x217c32){definitions['set'](_0x1efa5e[_0x3bba26(0xe1)]+':'+_0x1efa5e[_0x3bba26(0xa9)],_0x1efa5e);let _0x5cbf6e=serviceGroups[_0x3bba26(0xa1)](_0x1efa5e[_0x3bba26(0xe1)]);!_0x5cbf6e&&(_0x5cbf6e=[],serviceGroups[_0x3bba26(0xcb)](_0x1efa5e[_0x3bba26(0xe1)],_0x5cbf6e)),_0x5cbf6e['push'](_0x1efa5e);}}function registerDeclarativeService(_0x405db5,_0x557b4d,_0x2e819f){const _0x539583=a154_0x39bd;registerDefinitions(_0x557b4d);_0x2e819f?.[_0x539583(0xa6)]&&registerDefinitions([_0x2e819f['wildcardDef']]);const _0x57847c=_0x2638ad=>_0x2638ad==='read'?'':_0x2638ad==='write'?_0x539583(0xdd):_0x539583(0xaf),_0x426ef1={'service':_0x557b4d[0x0][_0x539583(0xe1)],'label':_0x405db5,'commands':_0x557b4d['filter'](_0x9a4840=>!_0x9a4840[_0x539583(0xd0)])[_0x539583(0xd9)](_0x6c781=>({'command':_0x6c781['command'],'description':_0x6c781[_0x539583(0xcf)],'tag':_0x57847c(_0x6c781[_0x539583(0xa7)])})),'declarative':!![],'defaultCommand':_0x2e819f?.['defaultCommand']??(_0x2e819f?.['isSingleCommand']?_0x557b4d[0x0][_0x539583(0xa9)]:undefined),'wildcardDef':_0x2e819f?.['wildcardDef'],'isSingleCommand':_0x2e819f?.[_0x539583(0xac)]};serviceRegistry[_0x539583(0xb2)](_0x426ef1),serviceByName[_0x539583(0xcb)](_0x426ef1['service'],_0x426ef1);}registerDeclarativeService('Quick\x20Start',initDefinitions,{'defaultCommand':a154_0x4684b4(0xde),'isSingleCommand':!![]}),registerDeclarativeService(a154_0x4684b4(0xbc),projectDefinitions),registerDeclarativeService(a154_0x4684b4(0xe6),workspaceDefinitions),registerDeclarativeService(a154_0x4684b4(0xbe),appDefinitions),registerDeclarativeService(a154_0x4684b4(0xbb),authDefinitions,{'defaultCommand':a154_0x4684b4(0xaa)}),registerDeclarativeService(a154_0x4684b4(0xc8),datasetDefinitions),registerDeclarativeService(a154_0x4684b4(0xe7),pageDefinitions),registerDeclarativeService('API\x20Development',apiDefinitions),registerDeclarativeService(a154_0x4684b4(0xc2),dataDefinitions),registerDeclarativeService(a154_0x4684b4(0xba),bffDefinitions),registerDeclarativeService('Notification\x20Configuration',notificationDefinitions),registerDeclarativeService(a154_0x4684b4(0xda),sqlDefinitions),registerDeclarativeService('Database\x20Connections',dbDefinitions),registerDeclarativeService(a154_0x4684b4(0xa8),menuDefinitions),registerDeclarativeService(a154_0x4684b4(0xdf),taskDefinitions),registerDeclarativeService(a154_0x4684b4(0xd5),roleDefinitions),registerDeclarativeService('Permissions',permitDefinitions),registerDeclarativeService(a154_0x4684b4(0xd3),appConfigDefinitions),registerDeclarativeService(a154_0x4684b4(0xdc),issueDefinitions),registerDeclarativeService(a154_0x4684b4(0xb7),fileDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService(a154_0x4684b4(0xb1),configDefinitions),registerDeclarativeService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a154_0x4684b4(0xc7),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a154_0x4684b4(0xb6),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a154_0x4684b4(0xdb),cliSkillDefinitions,{'defaultCommand':a154_0x4684b4(0xa2)}),registerDeclarativeService(a154_0x4684b4(0xe5),logsDefinitions,{'defaultCommand':a154_0x4684b4(0xe8)}),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a154_0x4684b4(0xae)]-0x1];last[a154_0x4684b4(0xd6)]=[{'command':'<script>','description':a154_0x4684b4(0xc0),'tag':''}];}export const deprecatedAliases={'create':{'service':a154_0x4684b4(0xb0),'command':'create'},'start':{'service':a154_0x4684b4(0xde),'command':a154_0x4684b4(0xb4)},'build':{'service':a154_0x4684b4(0xde),'command':a154_0x4684b4(0xa3)},'preview':{'service':'run','command':a154_0x4684b4(0xe2)},'logout':{'service':a154_0x4684b4(0xb5),'command':a154_0x4684b4(0xa4)}};const CLI_SKILL_INSTALL_REMOVED_HINT='Use\x20`rabetbase\x20cli-skill\x20install`\x20to\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill.\x20To\x20install\x20business\x20Skills,\x20use\x20`lovrabet\x20skill\x20install`.',APP_REMOTE_REMOVED_HINT=a154_0x4684b4(0xad),APP_USE_REMOVED_HINT='Use\x20`rabetbase\x20workspace\x20use\x20--app\x20<name>`\x20instead.';export function resolveRemovedCommand(_0x1101d3,_0x31f5ea){const _0x5e9bf5=a154_0x4684b4;if(_0x1101d3==='skill'){const _0x2691af=_0x31f5ea?_0x5e9bf5(0xd2)+_0x31f5ea:_0x5e9bf5(0xb3);return{'command':_0x2691af,'message':_0x5e9bf5(0xe0)+_0x2691af+_0x5e9bf5(0xab),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};}if(_0x1101d3===_0x5e9bf5(0xd8))return{'command':_0x5e9bf5(0xd8),'message':'`rabetbase\x20skills`\x20has\x20been\x20removed.','hint':CLI_SKILL_INSTALL_REMOVED_HINT};if(_0x1101d3===_0x5e9bf5(0xca)&&_0x31f5ea==='remote')return{'command':_0x5e9bf5(0xd4),'message':_0x5e9bf5(0xe4),'hint':APP_REMOTE_REMOVED_HINT};if(_0x1101d3===_0x5e9bf5(0xca)&&_0x31f5ea===_0x5e9bf5(0xcc))return{'command':_0x5e9bf5(0xd1),'message':_0x5e9bf5(0xc1),'hint':APP_USE_REMOVED_HINT};return undefined;}function a154_0x2274(){const _0xf95f33=['349014JcRhPV','from','Schema','Dataset\x20&\x20Operations','has','app','set','use','6ngKImn','382810zHonfb','description','hidden','app\x20use','skill\x20','Runtime\x20App\x20Config\x20Management','app\x20remote','Roles','commands','10VrzySI','skills','map','SQL\x20Queries','CLI\x20Built-in\x20Skill','Platform\x20Issue','\x20\x20[write]','run','Async\x20Tasks','`rabetbase\x20','service','preview','1689284LJlNAm','`rabetbase\x20app\x20remote`\x20has\x20been\x20removed.','Logs','Workspace','Smart\x20List\x20Pages','show','get','install','build','logout','1050967BxRTTG','wildcardDef','risk','Menu','command','login','`\x20has\x20been\x20removed.','isSingleCommand','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20instead.','length','\x20\x20[high-risk-write]','project','Configuration','push','skill','start','auth','Self\x20Update','File','create','9080038clYIei','BFF\x20Scripts','Authentication','Project','218393oljgEH','App\x20Management','207nMMjyr','Run\x20any\x20package.json\x20script','`rabetbase\x20app\x20use`\x20has\x20been\x20removed.','Instant\x20API','7170592ydFTjY','204REeTxq'];a154_0x2274=function(){return _0xf95f33;};return a154_0x2274();}export const deprecatedSubcommands={'bff':{'new':a154_0x4684b4(0xb8)},'sql':{'new':'create'},'menu':{'update':'asset-update'}};export function resolveDeprecatedSubcommand(_0x13da23,_0x31a8fd){return deprecatedSubcommands[_0x13da23]?.[_0x31a8fd];}function a154_0x39bd(_0x42fed9,_0x4e9af3){_0x42fed9=_0x42fed9-0xa1;const _0x2274dd=a154_0x2274();let _0x39bd79=_0x2274dd[_0x42fed9];return _0x39bd79;}export function findDefinition(_0x18b5a1,_0x3aa13d){const _0x2fc322=a154_0x4684b4;return definitions[_0x2fc322(0xa1)](_0x18b5a1+':'+_0x3aa13d);}export function isKnownService(_0x401949){const _0x293087=a154_0x4684b4;return serviceByName[_0x293087(0xc9)](_0x401949);}export function isDeclarativeService(_0x3f259a){const _0x1923c5=a154_0x4684b4;return serviceGroups[_0x1923c5(0xc9)](_0x3f259a)||serviceByName[_0x1923c5(0xa1)](_0x3f259a)?.[_0x1923c5(0xa6)]!==undefined;}export function getServiceEntry(_0x265e49){const _0x3c818b=a154_0x4684b4;return serviceByName[_0x3c818b(0xa1)](_0x265e49);}export function getLegacyHandler(_0x2be41d,_0x4c5331){return undefined;}export function getAllDefinitions(){const _0x4e9d96=a154_0x4684b4;return Array[_0x4e9d96(0xc6)](definitions['values']());}
1
+ const a156_0x4e1468=a156_0x14cc;(function(_0x32e98e,_0x1dbbc2){const _0x1d6f67=a156_0x14cc,_0x5f1c87=_0x32e98e();while(!![]){try{const _0x4e7472=-parseInt(_0x1d6f67(0x119))/0x1*(-parseInt(_0x1d6f67(0x10f))/0x2)+parseInt(_0x1d6f67(0x13e))/0x3*(-parseInt(_0x1d6f67(0x134))/0x4)+-parseInt(_0x1d6f67(0x11d))/0x5*(parseInt(_0x1d6f67(0x10a))/0x6)+-parseInt(_0x1d6f67(0x135))/0x7*(parseInt(_0x1d6f67(0x108))/0x8)+-parseInt(_0x1d6f67(0x117))/0x9*(-parseInt(_0x1d6f67(0xf7))/0xa)+-parseInt(_0x1d6f67(0x103))/0xb+parseInt(_0x1d6f67(0x115))/0xc*(parseInt(_0x1d6f67(0x114))/0xd);if(_0x4e7472===_0x1dbbc2)break;else _0x5f1c87['push'](_0x5f1c87['shift']());}catch(_0x313c9d){_0x5f1c87['push'](_0x5f1c87['shift']());}}}(a156_0x61b2,0xb7871));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{dataDefinitions}from'../commands/data/index.js';import{dbDefinitions}from'../commands/db/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{taskDefinitions}from'../commands/task/index.js';import{roleDefinitions}from'../commands/role/index.js';import{permitDefinitions}from'../commands/permit/index.js';function a156_0x14cc(_0x5b2eea,_0x1224c6){_0x5b2eea=_0x5b2eea-0xf0;const _0x61b291=a156_0x61b2();let _0x14cc16=_0x61b291[_0x5b2eea];return _0x14cc16;}import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/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{authDefinitions}from'../commands/auth/index.js';function a156_0x61b2(){const _0x138f02=['2878948UXpAyN','161dDpVpx','<script>','map','risk','commands','asset-update','hidden','preview','service','3qmozlx','create','`rabetbase\x20skills`\x20has\x20been\x20removed.','wildcardDef','Authentication','Async\x20Tasks','Permissions','login','length','940ciGVFB','Logs','app','has','Schema','Diagnostics','values','get','use','push','App\x20Management','logout','3636589aNEuzB','defaultCommand','app\x20remote','project','Use\x20`rabetbase\x20cli-skill\x20install`\x20to\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill.\x20To\x20install\x20business\x20Skills,\x20use\x20`lovrabet\x20skill\x20install`.','275128HXgBAk','`rabetbase\x20','102TQgmLE','OCR','skills','CLI\x20Built-in\x20Skill','show','8TGIPjr','File','command','Code\x20Generation','app\x20use','3222869YLgzpH','12rwbKuw','filter','97821RozCrI','BFF\x20Scripts','353734IKEsvq','Database\x20Connections','Platform\x20Issue','\x20\x20[write]','26905BurfZb','isSingleCommand','Smart\x20List\x20Pages','build','\x20\x20[high-risk-write]','Instant\x20API','Use\x20`rabetbase\x20workspace\x20use\x20--app\x20<name>`\x20instead.','start','run','Dataset\x20&\x20Operations','skill\x20','Project','Run\x20any\x20package.json\x20script','`rabetbase\x20app\x20remote`\x20has\x20been\x20removed.','write','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20instead.','Workspace','`\x20has\x20been\x20removed.','Runtime\x20App\x20Config\x20Management','read','Roles','set','auth'];a156_0x61b2=function(){return _0x138f02;};return a156_0x61b2();}import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/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(_0xc5286b){const _0x5d586a=a156_0x14cc;for(const _0x23b2a9 of _0xc5286b){definitions[_0x5d586a(0x132)](_0x23b2a9['service']+':'+_0x23b2a9[_0x5d586a(0x111)],_0x23b2a9);let _0x56a9bc=serviceGroups['get'](_0x23b2a9[_0x5d586a(0x13d)]);!_0x56a9bc&&(_0x56a9bc=[],serviceGroups[_0x5d586a(0x132)](_0x23b2a9[_0x5d586a(0x13d)],_0x56a9bc)),_0x56a9bc[_0x5d586a(0x100)](_0x23b2a9);}}function registerDeclarativeService(_0x27fb11,_0x11148e,_0xaabdee){const _0x40740e=a156_0x14cc;registerDefinitions(_0x11148e);_0xaabdee?.['wildcardDef']&&registerDefinitions([_0xaabdee[_0x40740e(0xf1)]]);const _0xb12d29=_0x3e8b17=>_0x3e8b17===_0x40740e(0x130)?'':_0x3e8b17===_0x40740e(0x12b)?_0x40740e(0x11c):_0x40740e(0x121),_0x411f26={'service':_0x11148e[0x0]['service'],'label':_0x27fb11,'commands':_0x11148e[_0x40740e(0x116)](_0x4f3c6c=>!_0x4f3c6c[_0x40740e(0x13b)])[_0x40740e(0x137)](_0x10b94b=>({'command':_0x10b94b[_0x40740e(0x111)],'description':_0x10b94b['description'],'tag':_0xb12d29(_0x10b94b[_0x40740e(0x138)])})),'declarative':!![],'defaultCommand':_0xaabdee?.[_0x40740e(0x104)]??(_0xaabdee?.[_0x40740e(0x11e)]?_0x11148e[0x0][_0x40740e(0x111)]:undefined),'wildcardDef':_0xaabdee?.[_0x40740e(0xf1)],'isSingleCommand':_0xaabdee?.[_0x40740e(0x11e)]};serviceRegistry[_0x40740e(0x100)](_0x411f26),serviceByName[_0x40740e(0x132)](_0x411f26[_0x40740e(0x13d)],_0x411f26);}registerDeclarativeService('Quick\x20Start',initDefinitions,{'defaultCommand':a156_0x4e1468(0x125),'isSingleCommand':!![]}),registerDeclarativeService(a156_0x4e1468(0x128),projectDefinitions),registerDeclarativeService(a156_0x4e1468(0x12d),workspaceDefinitions),registerDeclarativeService(a156_0x4e1468(0x101),appDefinitions),registerDeclarativeService(a156_0x4e1468(0xf2),authDefinitions,{'defaultCommand':a156_0x4e1468(0xf5)}),registerDeclarativeService(a156_0x4e1468(0x126),datasetDefinitions),registerDeclarativeService(a156_0x4e1468(0x11f),pageDefinitions),registerDeclarativeService('API\x20Development',apiDefinitions),registerDeclarativeService(a156_0x4e1468(0x122),dataDefinitions),registerDeclarativeService(a156_0x4e1468(0x118),bffDefinitions),registerDeclarativeService('Notification\x20Configuration',notificationDefinitions),registerDeclarativeService('SQL\x20Queries',sqlDefinitions),registerDeclarativeService(a156_0x4e1468(0x11a),dbDefinitions),registerDeclarativeService('Menu',menuDefinitions),registerDeclarativeService(a156_0x4e1468(0xf3),taskDefinitions),registerDeclarativeService(a156_0x4e1468(0x131),roleDefinitions),registerDeclarativeService(a156_0x4e1468(0xf4),permitDefinitions),registerDeclarativeService(a156_0x4e1468(0x12f),appConfigDefinitions),registerDeclarativeService(a156_0x4e1468(0x11b),issueDefinitions),registerDeclarativeService(a156_0x4e1468(0x110),fileDefinitions),registerDeclarativeService(a156_0x4e1468(0x10b),ocrDefinitions),registerDeclarativeService(a156_0x4e1468(0x112),codegenDefinitions),registerDeclarativeService('Configuration',configDefinitions),registerDeclarativeService(a156_0x4e1468(0xfc),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a156_0x4e1468(0xfb),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a156_0x4e1468(0x10d),cliSkillDefinitions,{'defaultCommand':'install'}),registerDeclarativeService(a156_0x4e1468(0xf8),logsDefinitions,{'defaultCommand':a156_0x4e1468(0x10e)}),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a156_0x4e1468(0xf6)]-0x1];last[a156_0x4e1468(0x139)]=[{'command':a156_0x4e1468(0x136),'description':a156_0x4e1468(0x129),'tag':''}];}export const deprecatedAliases={'create':{'service':a156_0x4e1468(0x106),'command':a156_0x4e1468(0x13f)},'start':{'service':a156_0x4e1468(0x125),'command':a156_0x4e1468(0x124)},'build':{'service':a156_0x4e1468(0x125),'command':a156_0x4e1468(0x120)},'preview':{'service':a156_0x4e1468(0x125),'command':a156_0x4e1468(0x13c)},'logout':{'service':a156_0x4e1468(0x133),'command':a156_0x4e1468(0x102)}};const CLI_SKILL_INSTALL_REMOVED_HINT=a156_0x4e1468(0x107),APP_REMOTE_REMOVED_HINT=a156_0x4e1468(0x12c),APP_USE_REMOVED_HINT=a156_0x4e1468(0x123);export function resolveRemovedCommand(_0x362ade,_0x29eb6f){const _0x3f05ac=a156_0x4e1468;if(_0x362ade==='skill'){const _0x27d8cd=_0x29eb6f?_0x3f05ac(0x127)+_0x29eb6f:'skill';return{'command':_0x27d8cd,'message':_0x3f05ac(0x109)+_0x27d8cd+_0x3f05ac(0x12e),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};}if(_0x362ade===_0x3f05ac(0x10c))return{'command':_0x3f05ac(0x10c),'message':_0x3f05ac(0xf0),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};if(_0x362ade===_0x3f05ac(0xf9)&&_0x29eb6f==='remote')return{'command':_0x3f05ac(0x105),'message':_0x3f05ac(0x12a),'hint':APP_REMOTE_REMOVED_HINT};if(_0x362ade===_0x3f05ac(0xf9)&&_0x29eb6f===_0x3f05ac(0xff))return{'command':_0x3f05ac(0x113),'message':'`rabetbase\x20app\x20use`\x20has\x20been\x20removed.','hint':APP_USE_REMOVED_HINT};return undefined;}export const deprecatedSubcommands={'bff':{'new':'create'},'sql':{'new':a156_0x4e1468(0x13f)},'menu':{'update':a156_0x4e1468(0x13a)}};export function resolveDeprecatedSubcommand(_0xea4ed8,_0x264df5){return deprecatedSubcommands[_0xea4ed8]?.[_0x264df5];}export function findDefinition(_0x587ea4,_0x3292ec){const _0x16e554=a156_0x4e1468;return definitions[_0x16e554(0xfe)](_0x587ea4+':'+_0x3292ec);}export function isKnownService(_0x45bdab){const _0x358a34=a156_0x4e1468;return serviceByName[_0x358a34(0xfa)](_0x45bdab);}export function isDeclarativeService(_0xd58295){const _0x1b354b=a156_0x4e1468;return serviceGroups[_0x1b354b(0xfa)](_0xd58295)||serviceByName['get'](_0xd58295)?.[_0x1b354b(0xf1)]!==undefined;}export function getServiceEntry(_0x259983){return serviceByName['get'](_0x259983);}export function getLegacyHandler(_0x8ee0bf,_0x12ca62){return undefined;}export function getAllDefinitions(){const _0x202de8=a156_0x4e1468;return Array['from'](definitions[_0x202de8(0xfd)]());}
@@ -1 +1 @@
1
- const a155_0x38e860=a155_0x27c4;(function(_0x3bc10c,_0x147141){const _0x10e7ac=a155_0x27c4,_0x2694b5=_0x3bc10c();while(!![]){try{const _0x2feb61=parseInt(_0x10e7ac(0x71))/0x1+-parseInt(_0x10e7ac(0x6a))/0x2+parseInt(_0x10e7ac(0x6b))/0x3*(parseInt(_0x10e7ac(0x73))/0x4)+parseInt(_0x10e7ac(0x72))/0x5*(-parseInt(_0x10e7ac(0x6e))/0x6)+-parseInt(_0x10e7ac(0x7c))/0x7*(-parseInt(_0x10e7ac(0x6d))/0x8)+parseInt(_0x10e7ac(0x7a))/0x9+parseInt(_0x10e7ac(0x6c))/0xa*(-parseInt(_0x10e7ac(0x76))/0xb);if(_0x2feb61===_0x147141)break;else _0x2694b5['push'](_0x2694b5['shift']());}catch(_0x3b6e72){_0x2694b5['push'](_0x2694b5['shift']());}}}(a155_0x1c05,0x3933f));import{createAppRole}from'../../core/api-client.js';function a155_0x27c4(_0x2fa752,_0x25e94){_0x2fa752=_0x2fa752-0x68;const _0x1c0552=a155_0x1c05();let _0x27c483=_0x1c0552[_0x2fa752];return _0x27c483;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{NAME_FLAG,REMARK_FLAG,projectRole}from'../../commands/role/shared.js';function a155_0x1c05(){const _0x414984=['63815CKoDfG','20nixeHE','Create\x20a\x20CUSTOM\x20user\x20group\x20(role)','CUSTOM','59323bByLmH','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','appCode','str','1622466kGCeqx','Pass\x20--name\x20<roleName>.','371mUaAGD','create','Created\x20role\x20','trim','remark','462756abQkbz','211143Qumdwh','810dPxoZB','12696dhUFWz','36ysKQAs','/smartapi/permit/role/create','POST','362802JBVUMy'];a155_0x1c05=function(){return _0x414984;};return a155_0x1c05();}const CREATE_PATH=a155_0x38e860(0x6f);function readName(_0x5b02e6){const _0x23949d=a155_0x38e860,_0x54251e=_0x5b02e6[_0x23949d(0x79)]('name')[_0x23949d(0x68)]();if(!_0x54251e)throw CliErrors['flagMissing']('name',_0x23949d(0x7b));if(_0x54251e['length']>0x40)throw CliErrors['validation'](_0x23949d(0x77));return _0x54251e;}export const roleCreate={'service':'role','command':a155_0x38e860(0x7d),'description':a155_0x38e860(0x74),'risk':'write','flags':[NAME_FLAG,REMARK_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x413b5c){readName(_0x413b5c);},async 'dryRun'(_0x413c2c){const _0x32fe8e=a155_0x38e860,_0x21c0c7=readName(_0x413c2c),_0x534e49=_0x413c2c[_0x32fe8e(0x79)](_0x32fe8e(0x69))[_0x32fe8e(0x68)]()||undefined;return asDryRunResult({'operation':_0x32fe8e(0x7d),'selector':{'appCode':_0x413c2c['appCode'],'roleName':_0x21c0c7},'before':null,'after':{'roleName':_0x21c0c7,'roleType':_0x32fe8e(0x75),'remark':_0x534e49},'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[]},{'method':_0x32fe8e(0x70),'url':CREATE_PATH});},async 'execute'(_0x2a8943){const _0x1c67c9=a155_0x38e860,_0x5ccb80=readName(_0x2a8943),_0xa9ff4d=_0x2a8943[_0x1c67c9(0x79)](_0x1c67c9(0x69))[_0x1c67c9(0x68)]()||undefined,_0x4d3dfa=await createAppRole({'appCode':_0x2a8943[_0x1c67c9(0x78)],'roleName':_0x5ccb80,..._0xa9ff4d?{'remark':_0xa9ff4d}:{}});return{'ok':!![],'data':{'operation':_0x1c67c9(0x7d),'selector':{'appCode':_0x2a8943['appCode'],'roleId':_0x4d3dfa['id'],'roleName':_0x5ccb80},'before':null,'after':projectRole(_0x4d3dfa),'dryRun':![],'backend':{'method':_0x1c67c9(0x70),'path':CREATE_PATH},'warnings':[]},'message':_0x1c67c9(0x7e)+_0x4d3dfa['roleName']+'\x20(id='+_0x4d3dfa['id']+')'};}};
1
+ const a157_0x363151=a157_0xf853;(function(_0x537fba,_0x32c2dd){const _0x4ceccc=a157_0xf853,_0x2d74f8=_0x537fba();while(!![]){try{const _0x56abe5=-parseInt(_0x4ceccc(0x1b8))/0x1+-parseInt(_0x4ceccc(0x1a8))/0x2*(parseInt(_0x4ceccc(0x1af))/0x3)+-parseInt(_0x4ceccc(0x1bb))/0x4*(-parseInt(_0x4ceccc(0x1ba))/0x5)+-parseInt(_0x4ceccc(0x1b3))/0x6*(parseInt(_0x4ceccc(0x1b4))/0x7)+parseInt(_0x4ceccc(0x1a2))/0x8+parseInt(_0x4ceccc(0x1bc))/0x9*(-parseInt(_0x4ceccc(0x1ad))/0xa)+parseInt(_0x4ceccc(0x1b6))/0xb;if(_0x56abe5===_0x32c2dd)break;else _0x2d74f8['push'](_0x2d74f8['shift']());}catch(_0x1bd058){_0x2d74f8['push'](_0x2d74f8['shift']());}}}(a157_0x41dd,0x31b91));function a157_0xf853(_0x371a29,_0x50626f){_0x371a29=_0x371a29-0x1a2;const _0x41dd24=a157_0x41dd();let _0xf8534=_0x41dd24[_0x371a29];return _0xf8534;}import{createAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{NAME_FLAG,REMARK_FLAG,projectRole}from'../../commands/role/shared.js';function a157_0x41dd(){const _0x1c3a1b=['39321YsBsLF','POST','1974192Bwseds','\x20(id=','trim','write','flagMissing','appCode','4wxuSDG','Pass\x20--name\x20<roleName>.','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','create','validation','230GxeezZ','remark','156111rhpMEF','str','Create\x20a\x20CUSTOM\x20user\x20group\x20(role)','length','36DLzsXi','185773XEGwFy','/smartapi/permit/role/create','3336696Zzbcnw','name','3254iRroTq','roleName','51510sRILoJ','8XPdEGY'];a157_0x41dd=function(){return _0x1c3a1b;};return a157_0x41dd();}const CREATE_PATH=a157_0x363151(0x1b5);function readName(_0x5df6ed){const _0x130521=a157_0x363151,_0x86a0d1=_0x5df6ed[_0x130521(0x1b0)](_0x130521(0x1b7))[_0x130521(0x1a4)]();if(!_0x86a0d1)throw CliErrors[_0x130521(0x1a6)]('name',_0x130521(0x1a9));if(_0x86a0d1[_0x130521(0x1b2)]>0x40)throw CliErrors[_0x130521(0x1ac)](_0x130521(0x1aa));return _0x86a0d1;}export const roleCreate={'service':'role','command':a157_0x363151(0x1ab),'description':a157_0x363151(0x1b1),'risk':a157_0x363151(0x1a5),'flags':[NAME_FLAG,REMARK_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2e21a8){readName(_0x2e21a8);},async 'dryRun'(_0x3637cb){const _0x2ce884=a157_0x363151,_0x1c2bf0=readName(_0x3637cb),_0x1b83f7=_0x3637cb['str'](_0x2ce884(0x1ae))[_0x2ce884(0x1a4)]()||undefined;return asDryRunResult({'operation':_0x2ce884(0x1ab),'selector':{'appCode':_0x3637cb['appCode'],'roleName':_0x1c2bf0},'before':null,'after':{'roleName':_0x1c2bf0,'roleType':'CUSTOM','remark':_0x1b83f7},'dryRun':!![],'backend':{'method':_0x2ce884(0x1bd),'path':CREATE_PATH},'warnings':[]},{'method':_0x2ce884(0x1bd),'url':CREATE_PATH});},async 'execute'(_0x1a8c9a){const _0x11f3d3=a157_0x363151,_0x18450b=readName(_0x1a8c9a),_0x23a2cd=_0x1a8c9a[_0x11f3d3(0x1b0)](_0x11f3d3(0x1ae))['trim']()||undefined,_0x1ea3fa=await createAppRole({'appCode':_0x1a8c9a[_0x11f3d3(0x1a7)],'roleName':_0x18450b,..._0x23a2cd?{'remark':_0x23a2cd}:{}});return{'ok':!![],'data':{'operation':_0x11f3d3(0x1ab),'selector':{'appCode':_0x1a8c9a['appCode'],'roleId':_0x1ea3fa['id'],'roleName':_0x18450b},'before':null,'after':projectRole(_0x1ea3fa),'dryRun':![],'backend':{'method':_0x11f3d3(0x1bd),'path':CREATE_PATH},'warnings':[]},'message':'Created\x20role\x20'+_0x1ea3fa[_0x11f3d3(0x1b9)]+_0x11f3d3(0x1a3)+_0x1ea3fa['id']+')'};}};
@@ -1 +1 @@
1
- const a156_0x201b30=a156_0x1796;function a156_0x4e12(){const _0x4a2a83=['51770qonHNi','\x20(id=','role','POST','appCode','7694640aEcJrH','10100lQeKbC','/smartapi/permit/role/delete','87JacJes','33985HqNvBc','Role\x20still\x20has\x20','270feuHGN','userCount','roleName','delete','221332VBxLfE','Deleted\x20role\x20','87222ZKqWOk','num','1536448YtWDDU','high-risk-write'];a156_0x4e12=function(){return _0x4a2a83;};return a156_0x4e12();}function a156_0x1796(_0x467016,_0x2372c7){_0x467016=_0x467016-0xb9;const _0x4e1294=a156_0x4e12();let _0x17961b=_0x4e1294[_0x467016];return _0x17961b;}(function(_0x8dc180,_0x58d80c){const _0x4595d1=a156_0x1796,_0x29ffbd=_0x8dc180();while(!![]){try{const _0x3ddbee=-parseInt(_0x4595d1(0xbc))/0x1+-parseInt(_0x4595d1(0xbe))/0x2+-parseInt(_0x4595d1(0xca))/0x3*(parseInt(_0x4595d1(0xc8))/0x4)+parseInt(_0x4595d1(0xc2))/0x5+parseInt(_0x4595d1(0xcd))/0x6*(-parseInt(_0x4595d1(0xcb))/0x7)+-parseInt(_0x4595d1(0xc0))/0x8+parseInt(_0x4595d1(0xc7))/0x9;if(_0x3ddbee===_0x58d80c)break;else _0x29ffbd['push'](_0x29ffbd['shift']());}catch(_0x234dcc){_0x29ffbd['push'](_0x29ffbd['shift']());}}}(a156_0x4e12,0x1c787));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH=a156_0x201b30(0xc9);export const roleDelete={'service':a156_0x201b30(0xc4),'command':a156_0x201b30(0xbb),'description':'Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','risk':a156_0x201b30(0xc1),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0xc12e6d){const _0x47851b=a156_0x201b30,_0x3a6368=_0xc12e6d[_0x47851b(0xbf)]('id'),_0xd54bc0=await getRoleById(_0xc12e6d['appCode'],_0x3a6368);return assertCustomRole(_0xd54bc0,_0x47851b(0xbb)),asDryRunResult({'operation':_0x47851b(0xbb),'selector':{'appCode':_0xc12e6d[_0x47851b(0xc6)],'roleId':_0x3a6368,'roleName':_0xd54bc0['roleName']},'before':projectRole(_0xd54bc0),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0xd54bc0[_0x47851b(0xb9)]>0x0?[_0x47851b(0xcc)+_0xd54bc0[_0x47851b(0xb9)]+'\x20member(s);\x20they\x20will\x20lose\x20this\x20group.']:[]},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x4d578e){const _0x2c6ff5=a156_0x201b30,_0x31740d=_0x4d578e['num']('id'),_0x3ce641=await getRoleById(_0x4d578e[_0x2c6ff5(0xc6)],_0x31740d);return assertCustomRole(_0x3ce641,'delete'),await deleteAppRole(_0x31740d),{'ok':!![],'data':{'operation':_0x2c6ff5(0xbb),'selector':{'appCode':_0x4d578e['appCode'],'roleId':_0x31740d,'roleName':_0x3ce641[_0x2c6ff5(0xba)]},'before':projectRole(_0x3ce641),'after':null,'dryRun':![],'backend':{'method':_0x2c6ff5(0xc5),'path':DELETE_PATH},'warnings':[]},'message':_0x2c6ff5(0xbd)+_0x3ce641[_0x2c6ff5(0xba)]+_0x2c6ff5(0xc3)+_0x31740d+')'};}};
1
+ const a158_0x1f0320=a158_0x532d;(function(_0x3112e9,_0x6f3d2b){const _0xefb320=a158_0x532d,_0x33a5de=_0x3112e9();while(!![]){try{const _0x251722=parseInt(_0xefb320(0x1dd))/0x1*(-parseInt(_0xefb320(0x1ce))/0x2)+-parseInt(_0xefb320(0x1da))/0x3+-parseInt(_0xefb320(0x1d6))/0x4+parseInt(_0xefb320(0x1d8))/0x5*(-parseInt(_0xefb320(0x1cf))/0x6)+parseInt(_0xefb320(0x1db))/0x7*(-parseInt(_0xefb320(0x1d3))/0x8)+-parseInt(_0xefb320(0x1e0))/0x9*(parseInt(_0xefb320(0x1de))/0xa)+parseInt(_0xefb320(0x1dc))/0xb;if(_0x251722===_0x6f3d2b)break;else _0x33a5de['push'](_0x33a5de['shift']());}catch(_0x16fcb8){_0x33a5de['push'](_0x33a5de['shift']());}}}(a158_0x2644,0x6012a));import{deleteAppRole}from'../../core/api-client.js';function a158_0x2644(){const _0x34a80b=['39078nWTyDa','appCode','delete','num','/smartapi/permit/role/delete','roleName','670502ffuysu','418686cIdxXI','Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','high-risk-write','Deleted\x20role\x20','8orLMZv','POST','\x20(id=','2151180oNftkm','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','5WGQqjR','userCount','1644900oMkbFx','2402092FCknRd','27562535LdLyiy','1phsGVi','640RMDAKw','role'];a158_0x2644=function(){return _0x34a80b;};return a158_0x2644();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH=a158_0x1f0320(0x1cc);function a158_0x532d(_0x264975,_0x4f5666){_0x264975=_0x264975-0x1c9;const _0x26440d=a158_0x2644();let _0x532d08=_0x26440d[_0x264975];return _0x532d08;}export const roleDelete={'service':a158_0x1f0320(0x1df),'command':a158_0x1f0320(0x1ca),'description':a158_0x1f0320(0x1d0),'risk':a158_0x1f0320(0x1d1),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x4adb96){const _0x20c577=a158_0x1f0320,_0x5782a4=_0x4adb96[_0x20c577(0x1cb)]('id'),_0x255306=await getRoleById(_0x4adb96[_0x20c577(0x1c9)],_0x5782a4);return assertCustomRole(_0x255306,_0x20c577(0x1ca)),asDryRunResult({'operation':_0x20c577(0x1ca),'selector':{'appCode':_0x4adb96[_0x20c577(0x1c9)],'roleId':_0x5782a4,'roleName':_0x255306[_0x20c577(0x1cd)]},'before':projectRole(_0x255306),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x255306[_0x20c577(0x1d9)]>0x0?['Role\x20still\x20has\x20'+_0x255306[_0x20c577(0x1d9)]+_0x20c577(0x1d7)]:[]},{'method':_0x20c577(0x1d4),'url':DELETE_PATH});},async 'execute'(_0xfd73a8){const _0x126540=a158_0x1f0320,_0x123bbd=_0xfd73a8['num']('id'),_0x5a4714=await getRoleById(_0xfd73a8[_0x126540(0x1c9)],_0x123bbd);return assertCustomRole(_0x5a4714,_0x126540(0x1ca)),await deleteAppRole(_0x123bbd),{'ok':!![],'data':{'operation':'delete','selector':{'appCode':_0xfd73a8['appCode'],'roleId':_0x123bbd,'roleName':_0x5a4714[_0x126540(0x1cd)]},'before':projectRole(_0x5a4714),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[]},'message':_0x126540(0x1d2)+_0x5a4714[_0x126540(0x1cd)]+_0x126540(0x1d5)+_0x123bbd+')'};}};
@@ -1 +1 @@
1
- const a157_0x337051=a157_0x63a4;(function(_0x4ba4bb,_0x3a7a71){const _0x68cab0=a157_0x63a4,_0x42e299=_0x4ba4bb();while(!![]){try{const _0x3bc3cc=parseInt(_0x68cab0(0x17e))/0x1*(parseInt(_0x68cab0(0x18b))/0x2)+-parseInt(_0x68cab0(0x180))/0x3+parseInt(_0x68cab0(0x184))/0x4+parseInt(_0x68cab0(0x189))/0x5+parseInt(_0x68cab0(0x187))/0x6+-parseInt(_0x68cab0(0x18c))/0x7+parseInt(_0x68cab0(0x182))/0x8*(-parseInt(_0x68cab0(0x186))/0x9);if(_0x3bc3cc===_0x3a7a71)break;else _0x42e299['push'](_0x42e299['shift']());}catch(_0x228dcd){_0x42e299['push'](_0x42e299['shift']());}}}(a157_0x4db9,0x7c688));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a157_0x337051(0x17f),'command':a157_0x337051(0x18a),'description':a157_0x337051(0x181),'risk':'read','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x51a86f){const _0x38c432=a157_0x337051,_0x36ddc8=_0x51a86f['num']('id'),_0x2c1e83=await getRoleById(_0x51a86f[_0x38c432(0x188)],_0x36ddc8);return{'ok':!![],'data':{'role':projectRole(_0x2c1e83)},'message':_0x38c432(0x18d)+_0x2c1e83[_0x38c432(0x183)]+'\x20('+_0x2c1e83[_0x38c432(0x185)]+')'};}};function a157_0x63a4(_0x5cde08,_0xdba7fe){_0x5cde08=_0x5cde08-0x17e;const _0x4db93d=a157_0x4db9();let _0x63a4ae=_0x4db93d[_0x5cde08];return _0x63a4ae;}function a157_0x4db9(){const _0x316a4e=['appCode','285160yGRJKd','detail','176tGYZHp','2602369gZupdw','Role\x20','9586YNIJHA','role','1936701whWWqb','Show\x20a\x20single\x20role\x27s\x20detail','2479096XPPfoi','roleName','3570800PGerTC','roleType','36mBuYwm','5838948MxrBLd'];a157_0x4db9=function(){return _0x316a4e;};return a157_0x4db9();}
1
+ function a159_0x4e9c(){const _0x30b89c=['596734lDMBvV','4375683zMfBYk','appCode','182694rEMYgz','Show\x20a\x20single\x20role\x27s\x20detail','4381075pcqCjq','8fmRBaI','148LorTnE','read','17637830jZkUnd','roleType','81402byeqwx','roleName','223285nYRMtd','role','63lULcvw'];a159_0x4e9c=function(){return _0x30b89c;};return a159_0x4e9c();}const a159_0x50d714=a159_0x5678;(function(_0x311c4e,_0x391aee){const _0x4533ab=a159_0x5678,_0x59e1e5=_0x311c4e();while(!![]){try{const _0x152124=parseInt(_0x4533ab(0x76))/0x1+parseInt(_0x4533ab(0x79))/0x2+parseInt(_0x4533ab(0x74))/0x3*(parseInt(_0x4533ab(0x80))/0x4)+parseInt(_0x4533ab(0x7e))/0x5+-parseInt(_0x4533ab(0x7c))/0x6*(parseInt(_0x4533ab(0x78))/0x7)+-parseInt(_0x4533ab(0x7f))/0x8*(-parseInt(_0x4533ab(0x7a))/0x9)+-parseInt(_0x4533ab(0x82))/0xa;if(_0x152124===_0x391aee)break;else _0x59e1e5['push'](_0x59e1e5['shift']());}catch(_0x522a2e){_0x59e1e5['push'](_0x59e1e5['shift']());}}}(a159_0x4e9c,0xcf90c));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a159_0x5678(_0x3e1f73,_0x289d31){_0x3e1f73=_0x3e1f73-0x74;const _0x4e9c1b=a159_0x4e9c();let _0x5678b6=_0x4e9c1b[_0x3e1f73];return _0x5678b6;}import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a159_0x50d714(0x77),'command':'detail','description':a159_0x50d714(0x7d),'risk':a159_0x50d714(0x81),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1b7f1f){const _0x940e7c=a159_0x50d714,_0x1061e5=_0x1b7f1f['num']('id'),_0x2fe76a=await getRoleById(_0x1b7f1f[_0x940e7c(0x7b)],_0x1061e5);return{'ok':!![],'data':{'role':projectRole(_0x2fe76a)},'message':'Role\x20'+_0x2fe76a[_0x940e7c(0x75)]+'\x20('+_0x2fe76a[_0x940e7c(0x83)]+')'};}};
@@ -1 +1 @@
1
- (function(_0x106a07,_0x366870){const _0x5f3783=a158_0x2eb0,_0x5f3b44=_0x106a07();while(!![]){try{const _0x9a9766=-parseInt(_0x5f3783(0x1cf))/0x1+parseInt(_0x5f3783(0x1cb))/0x2+parseInt(_0x5f3783(0x1cc))/0x3*(-parseInt(_0x5f3783(0x1d2))/0x4)+-parseInt(_0x5f3783(0x1cd))/0x5*(parseInt(_0x5f3783(0x1d0))/0x6)+parseInt(_0x5f3783(0x1d4))/0x7*(-parseInt(_0x5f3783(0x1ce))/0x8)+-parseInt(_0x5f3783(0x1d3))/0x9+parseInt(_0x5f3783(0x1d1))/0xa;if(_0x9a9766===_0x366870)break;else _0x5f3b44['push'](_0x5f3b44['shift']());}catch(_0x20d780){_0x5f3b44['push'](_0x5f3b44['shift']());}}}(a158_0x1287,0xad8f2));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleCreate}from'../../commands/role/create.js';import{roleUpdate}from'../../commands/role/update.js';function a158_0x2eb0(_0x556e5c,_0x2a72aa){_0x556e5c=_0x556e5c-0x1cb;const _0x1287dc=a158_0x1287();let _0x2eb0fd=_0x1287dc[_0x556e5c];return _0x2eb0fd;}import{roleDelete}from'../../commands/role/delete.js';function a158_0x1287(){const _0x1e9581=['1565474uwfTVi','51oORoMO','45aignlO','9320zzKThL','35232XxEUkl','835608nwfikN','34021820BjOQYq','175964yGSbjp','9236565CMnjJr','2471AjvmQt'];a158_0x1287=function(){return _0x1e9581;};return a158_0x1287();}import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
1
+ (function(_0x2523f8,_0x4eecc3){const _0x2ddb86=a160_0x19a8,_0x2dc258=_0x2523f8();while(!![]){try{const _0x1bae8c=-parseInt(_0x2ddb86(0x18c))/0x1*(parseInt(_0x2ddb86(0x18f))/0x2)+parseInt(_0x2ddb86(0x189))/0x3*(parseInt(_0x2ddb86(0x18e))/0x4)+-parseInt(_0x2ddb86(0x192))/0x5*(-parseInt(_0x2ddb86(0x18d))/0x6)+-parseInt(_0x2ddb86(0x18a))/0x7*(-parseInt(_0x2ddb86(0x190))/0x8)+parseInt(_0x2ddb86(0x18b))/0x9*(-parseInt(_0x2ddb86(0x191))/0xa)+parseInt(_0x2ddb86(0x193))/0xb+-parseInt(_0x2ddb86(0x188))/0xc*(parseInt(_0x2ddb86(0x194))/0xd);if(_0x1bae8c===_0x4eecc3)break;else _0x2dc258['push'](_0x2dc258['shift']());}catch(_0x16d994){_0x2dc258['push'](_0x2dc258['shift']());}}}(a160_0x3e4b,0x74140));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleCreate}from'../../commands/role/create.js';import{roleUpdate}from'../../commands/role/update.js';function a160_0x19a8(_0xbe250e,_0x431144){_0xbe250e=_0xbe250e-0x188;const _0x3e4b80=a160_0x3e4b();let _0x19a83e=_0x3e4b80[_0xbe250e];return _0x19a83e;}import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';function a160_0x3e4b(){const _0x2b10a9=['2584520ccjfhl','239354zsPsQJ','136qXNRKk','180rbRMol','20uexNrZ','4269199sHiCaI','637pTjPHn','372420UXBPLm','3GXkjsz','329273PLfsgO','298989WOanws','1MABosb','1319886BwjgsP'];a160_0x3e4b=function(){return _0x2b10a9;};return a160_0x3e4b();}import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
@@ -1 +1 @@
1
- const a159_0x290d29=a159_0x3de4;(function(_0x46a04d,_0x412a61){const _0x36a329=a159_0x3de4,_0x4cf52c=_0x46a04d();while(!![]){try{const _0x56e09b=parseInt(_0x36a329(0x110))/0x1*(parseInt(_0x36a329(0x100))/0x2)+parseInt(_0x36a329(0x107))/0x3+-parseInt(_0x36a329(0x113))/0x4+-parseInt(_0x36a329(0x112))/0x5+parseInt(_0x36a329(0x118))/0x6*(-parseInt(_0x36a329(0x11e))/0x7)+-parseInt(_0x36a329(0xff))/0x8+parseInt(_0x36a329(0x116))/0x9;if(_0x56e09b===_0x412a61)break;else _0x4cf52c['push'](_0x4cf52c['shift']());}catch(_0x2cf96a){_0x4cf52c['push'](_0x4cf52c['shift']());}}}(a159_0x1f42,0xadfdd));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a159_0x3de4(_0x6577a1,_0x37c878){_0x6577a1=_0x6577a1-0xfd;const _0x1f421d=a159_0x1f42();let _0x3de493=_0x1f421d[_0x6577a1];return _0x3de493;}function a159_0x1f42(){const _0x368f7c=['num','list','6818784fgKSdT','12ygNPIS','number','appCode','validation','type','pagesize','Found\x20','4178220jEjsbb','join','CUSTOM','page','read','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','roleType','toUpperCase','trim','103925mOssyz','str','6369930doYZOu','4384080LDslNn','length','string','22182084oPuJFD','Page\x20index\x20(1-based)','1091886WbFwAb','role','ADMIN','\x20role(s)','DEV','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','21auapRJ'];a159_0x1f42=function(){return _0x368f7c;};return a159_0x1f42();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a159_0x290d29(0x11a),a159_0x290d29(0x11c),'USER',a159_0x290d29(0x109)];export const roleList={'service':a159_0x290d29(0x119),'command':a159_0x290d29(0xfe),'description':a159_0x290d29(0x11d),'risk':a159_0x290d29(0x10b),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a159_0x290d29(0x104),'type':a159_0x290d29(0x115),'required':![],'description':'Filter\x20by\x20role\x20type','enum':ROLE_TYPES},{'name':a159_0x290d29(0x10a),'type':a159_0x290d29(0x101),'description':a159_0x290d29(0x117),'default':0x1},{'name':a159_0x290d29(0x105),'type':a159_0x290d29(0x101),'description':'Page\x20size\x20(1-100)','default':0x64}],async 'validate'(_0x3bcdd8){const _0x1de836=a159_0x290d29,_0x2eabb4=_0x3bcdd8[_0x1de836(0x111)]('type')[_0x1de836(0x10f)]();if(_0x2eabb4&&!ROLE_TYPES['includes'](_0x2eabb4[_0x1de836(0x10e)]()))throw CliErrors[_0x1de836(0x103)]('Invalid\x20--type\x20\x22'+_0x2eabb4+'\x22.','Use\x20one\x20of:\x20'+ROLE_TYPES[_0x1de836(0x108)](',\x20')+'.');const _0x3e1543=_0x3bcdd8[_0x1de836(0xfd)](_0x1de836(0x10a),0x1),_0x6fbb1b=_0x3bcdd8[_0x1de836(0xfd)](_0x1de836(0x105),0x64);if(_0x3e1543<0x1)throw CliErrors[_0x1de836(0x103)](_0x1de836(0x10c));if(_0x6fbb1b<0x1||_0x6fbb1b>0x64)throw CliErrors[_0x1de836(0x103)]('--pagesize\x20must\x20be\x20between\x201\x20and\x20100.');},async 'execute'(_0x16f1ac){const _0x561eb5=a159_0x290d29,_0x4821b3=_0x16f1ac['num'](_0x561eb5(0x10a),0x1)||0x1,_0x24dd54=_0x16f1ac[_0x561eb5(0xfd)](_0x561eb5(0x105),0x64)||0x64,_0x795ef1=_0x16f1ac[_0x561eb5(0x111)]('type')[_0x561eb5(0x10f)]()[_0x561eb5(0x10e)](),{items:_0x364030,paging:_0x1febb5}=await listAppRoles(_0x16f1ac[_0x561eb5(0x102)],{'currentPage':_0x4821b3,'pageSize':_0x24dd54}),_0x4cfaf8=_0x795ef1?_0x364030['filter'](_0x47e70a=>_0x47e70a[_0x561eb5(0x10d)]===_0x795ef1):_0x364030,_0x5e06ef=_0x4cfaf8['map'](projectRole);return{'ok':!![],'data':{'roles':_0x5e06ef,'paging':_0x1febb5},'message':_0x561eb5(0x106)+_0x5e06ef[_0x561eb5(0x114)]+_0x561eb5(0x11b)};}};
1
+ function a161_0x4fef(){const _0x48f81b=['join','1431544juoxte','25740GHkmjC','validation','pagesize','num','read','6imDqOx','number','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','1243875WYzAdW','Found\x20','type','filter','map','role','Filter\x20by\x20role\x20type','includes','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','Page\x20size\x20(1-100)','USER','str','trim','\x20role(s)','1675888tuPFsE','toUpperCase','6Tpnmcv','111303SjQUED','1175419Bvolrc','1170HHCgkU','length','string','roleType','214784rrzHTe','page','Page\x20index\x20(1-based)'];a161_0x4fef=function(){return _0x48f81b;};return a161_0x4fef();}const a161_0x2162e9=a161_0x15af;(function(_0x3c4189,_0x179588){const _0x399d1d=a161_0x15af,_0x5ecc62=_0x3c4189();while(!![]){try{const _0xb49eea=-parseInt(_0x399d1d(0x19f))/0x1+parseInt(_0x399d1d(0x1a9))/0x2*(-parseInt(_0x399d1d(0x199))/0x3)+parseInt(_0x399d1d(0x196))/0x4+-parseInt(_0x399d1d(0x188))/0x5+-parseInt(_0x399d1d(0x198))/0x6*(-parseInt(_0x399d1d(0x19a))/0x7)+parseInt(_0x399d1d(0x1a3))/0x8+parseInt(_0x399d1d(0x1a4))/0x9*(parseInt(_0x399d1d(0x19b))/0xa);if(_0xb49eea===_0x179588)break;else _0x5ecc62['push'](_0x5ecc62['shift']());}catch(_0x2342c3){_0x5ecc62['push'](_0x5ecc62['shift']());}}}(a161_0x4fef,0x80516));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a161_0x15af(_0x155e3c,_0x3821b1){_0x155e3c=_0x155e3c-0x186;const _0x4fefdc=a161_0x4fef();let _0x15af1b=_0x4fefdc[_0x155e3c];return _0x15af1b;}import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=['ADMIN','DEV',a161_0x2162e9(0x192),'CUSTOM'];export const roleList={'service':a161_0x2162e9(0x18d),'command':'list','description':a161_0x2162e9(0x187),'risk':a161_0x2162e9(0x1a8),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a161_0x2162e9(0x18a),'type':a161_0x2162e9(0x19d),'required':![],'description':a161_0x2162e9(0x18e),'enum':ROLE_TYPES},{'name':a161_0x2162e9(0x1a0),'type':a161_0x2162e9(0x186),'description':a161_0x2162e9(0x1a1),'default':0x1},{'name':a161_0x2162e9(0x1a6),'type':a161_0x2162e9(0x186),'description':a161_0x2162e9(0x191),'default':0x64}],async 'validate'(_0x3684b9){const _0x573236=a161_0x2162e9,_0x491c3d=_0x3684b9['str'](_0x573236(0x18a))[_0x573236(0x194)]();if(_0x491c3d&&!ROLE_TYPES[_0x573236(0x18f)](_0x491c3d['toUpperCase']()))throw CliErrors[_0x573236(0x1a5)]('Invalid\x20--type\x20\x22'+_0x491c3d+'\x22.','Use\x20one\x20of:\x20'+ROLE_TYPES[_0x573236(0x1a2)](',\x20')+'.');const _0x3e42bd=_0x3684b9[_0x573236(0x1a7)](_0x573236(0x1a0),0x1),_0x5b2d32=_0x3684b9[_0x573236(0x1a7)]('pagesize',0x64);if(_0x3e42bd<0x1)throw CliErrors[_0x573236(0x1a5)]('--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.');if(_0x5b2d32<0x1||_0x5b2d32>0x64)throw CliErrors[_0x573236(0x1a5)](_0x573236(0x190));},async 'execute'(_0x4d2aaf){const _0x520c8d=a161_0x2162e9,_0x37bb94=_0x4d2aaf[_0x520c8d(0x1a7)](_0x520c8d(0x1a0),0x1)||0x1,_0x5c4b07=_0x4d2aaf[_0x520c8d(0x1a7)](_0x520c8d(0x1a6),0x64)||0x64,_0x22f8e7=_0x4d2aaf[_0x520c8d(0x193)](_0x520c8d(0x18a))['trim']()[_0x520c8d(0x197)](),{items:_0x33e38f,paging:_0x51a7d6}=await listAppRoles(_0x4d2aaf['appCode'],{'currentPage':_0x37bb94,'pageSize':_0x5c4b07}),_0x275353=_0x22f8e7?_0x33e38f[_0x520c8d(0x18b)](_0x379f34=>_0x379f34[_0x520c8d(0x19e)]===_0x22f8e7):_0x33e38f,_0x5c7c74=_0x275353[_0x520c8d(0x18c)](projectRole);return{'ok':!![],'data':{'roles':_0x5c7c74,'paging':_0x51a7d6},'message':_0x520c8d(0x189)+_0x5c7c74[_0x520c8d(0x19c)]+_0x520c8d(0x195)};}};