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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (263) hide show
  1. package/README.md +1 -1
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/add.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/remove.js +1 -1
  25. package/lib/commands/app/shared.js +1 -1
  26. package/lib/commands/app-config/delete.js +1 -1
  27. package/lib/commands/app-config/get.js +1 -1
  28. package/lib/commands/app-config/index.js +1 -1
  29. package/lib/commands/app-config/list.js +1 -1
  30. package/lib/commands/app-config/set.js +1 -1
  31. package/lib/commands/app-config/shared.js +1 -1
  32. package/lib/commands/auth/index.js +1 -1
  33. package/lib/commands/bff/create.js +1 -1
  34. package/lib/commands/bff/delete.js +1 -1
  35. package/lib/commands/bff/detail.js +1 -1
  36. package/lib/commands/bff/index.js +1 -1
  37. package/lib/commands/bff/list.js +1 -1
  38. package/lib/commands/bff/pull.js +1 -1
  39. package/lib/commands/bff/push.js +1 -1
  40. package/lib/commands/bff/status.js +1 -1
  41. package/lib/commands/cli-skill/index.js +1 -1
  42. package/lib/commands/cli-update.js +1 -1
  43. package/lib/commands/codegen/index.js +1 -1
  44. package/lib/commands/codegen/sdk.js +1 -1
  45. package/lib/commands/codegen/sql.js +1 -1
  46. package/lib/commands/common/app-registry.js +1 -1
  47. package/lib/commands/common/app-selector.js +1 -1
  48. package/lib/commands/common/async-task.js +1 -1
  49. package/lib/commands/common/dry-run.js +1 -1
  50. package/lib/commands/common/flags.js +1 -1
  51. package/lib/commands/common/local-file.js +1 -1
  52. package/lib/commands/common/validate.js +1 -1
  53. package/lib/commands/config/get.js +1 -1
  54. package/lib/commands/config/index.js +1 -1
  55. package/lib/commands/config/list.js +1 -1
  56. package/lib/commands/config/set.js +1 -1
  57. package/lib/commands/config/shared.js +1 -1
  58. package/lib/commands/data/filter.js +1 -1
  59. package/lib/commands/data/getOne.js +1 -1
  60. package/lib/commands/data/index.js +1 -1
  61. package/lib/commands/data/shared.js +1 -1
  62. package/lib/commands/dataset/business-group-update.js +1 -1
  63. package/lib/commands/dataset/capability.js +1 -1
  64. package/lib/commands/dataset/delete.js +1 -1
  65. package/lib/commands/dataset/detail.js +1 -1
  66. package/lib/commands/dataset/extend-update.js +1 -1
  67. package/lib/commands/dataset/field-update.js +1 -1
  68. package/lib/commands/dataset/generate.js +1 -1
  69. package/lib/commands/dataset/index.js +1 -1
  70. package/lib/commands/dataset/list.js +1 -1
  71. package/lib/commands/dataset/operations.js +1 -1
  72. package/lib/commands/dataset/relation-audit.js +1 -1
  73. package/lib/commands/dataset/relation-create.js +1 -1
  74. package/lib/commands/dataset/relation-delete.js +1 -1
  75. package/lib/commands/dataset/relation-shared.js +1 -1
  76. package/lib/commands/dataset/relation-update.js +1 -1
  77. package/lib/commands/dataset/relations.js +1 -1
  78. package/lib/commands/dataset/rename.js +1 -1
  79. package/lib/commands/dataset/restore.js +1 -1
  80. package/lib/commands/db/analysis-batching.js +1 -1
  81. package/lib/commands/db/analyze-batch-plan.js +1 -1
  82. package/lib/commands/db/analyze-cancel.js +1 -1
  83. package/lib/commands/db/analyze-start.js +1 -1
  84. package/lib/commands/db/analyze-status.js +1 -1
  85. package/lib/commands/db/create.js +1 -1
  86. package/lib/commands/db/delete.js +1 -1
  87. package/lib/commands/db/detail.js +1 -1
  88. package/lib/commands/db/diff.js +1 -1
  89. package/lib/commands/db/index.js +1 -1
  90. package/lib/commands/db/list.js +1 -1
  91. package/lib/commands/db/shared.js +1 -1
  92. package/lib/commands/db/tables.js +1 -1
  93. package/lib/commands/db/test.js +1 -1
  94. package/lib/commands/db/update.js +1 -1
  95. package/lib/commands/doctor.js +1 -1
  96. package/lib/commands/file/index.js +1 -1
  97. package/lib/commands/init/index.js +1 -1
  98. package/lib/commands/issue/index.js +1 -1
  99. package/lib/commands/issue/nudge.js +1 -1
  100. package/lib/commands/issue/report.js +1 -1
  101. package/lib/commands/issue/shared.js +1 -1
  102. package/lib/commands/logs/index.js +1 -1
  103. package/lib/commands/menu/asset-update.js +1 -0
  104. package/lib/commands/menu/delete.js +1 -1
  105. package/lib/commands/menu/external-link-create.js +1 -1
  106. package/lib/commands/menu/external-link-update.js +1 -0
  107. package/lib/commands/menu/group-create.js +1 -1
  108. package/lib/commands/menu/group-update.js +1 -1
  109. package/lib/commands/menu/index.js +1 -1
  110. package/lib/commands/menu/list.js +1 -1
  111. package/lib/commands/menu/move.js +1 -1
  112. package/lib/commands/menu/regroup-start.js +1 -1
  113. package/lib/commands/menu/shared/compare-table.js +1 -1
  114. package/lib/commands/menu/shared/delete-plan.js +1 -1
  115. package/lib/commands/menu/shared/facts.js +1 -1
  116. package/lib/commands/menu/shared/index.js +1 -1
  117. package/lib/commands/menu/shared/inquirer.js +1 -1
  118. package/lib/commands/menu/shared/local-pages.js +1 -1
  119. package/lib/commands/menu/shared/logic.js +1 -1
  120. package/lib/commands/menu/shared/mutations.js +1 -1
  121. package/lib/commands/menu/shared/service.js +1 -1
  122. package/lib/commands/menu/shared/sync-core.js +1 -1
  123. package/lib/commands/menu/shared/update-core.js +1 -1
  124. package/lib/commands/menu/shared/valid-url.js +1 -1
  125. package/lib/commands/menu/sync.js +1 -1
  126. package/lib/commands/notification/config-list.js +1 -1
  127. package/lib/commands/notification/index.js +1 -1
  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/shared.js +1 -1
  135. package/lib/commands/page/standard-page-status.js +1 -1
  136. package/lib/commands/page/sync.js +1 -1
  137. package/lib/commands/permit/index.js +1 -1
  138. package/lib/commands/permit/page-get.js +1 -1
  139. package/lib/commands/permit/page-set.js +1 -1
  140. package/lib/commands/permit/role-apis-set.js +1 -1
  141. package/lib/commands/permit/role-menus-set.js +1 -1
  142. package/lib/commands/permit/role-menus.js +1 -1
  143. package/lib/commands/permit/shared.js +1 -1
  144. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  145. package/lib/commands/project/create/format-elapsed.js +1 -1
  146. package/lib/commands/project/create/main.js +1 -1
  147. package/lib/commands/project/create/non-interactive.js +1 -1
  148. package/lib/commands/project/create/project-template-path.js +1 -1
  149. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  150. package/lib/commands/project/create/use-format-code.js +1 -1
  151. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  152. package/lib/commands/project/index.js +1 -1
  153. package/lib/commands/project/init.js +1 -1
  154. package/lib/commands/project/upgrade.js +1 -1
  155. package/lib/commands/registry.js +1 -1
  156. package/lib/commands/role/create.js +1 -1
  157. package/lib/commands/role/delete.js +1 -1
  158. package/lib/commands/role/detail.js +1 -1
  159. package/lib/commands/role/index.js +1 -1
  160. package/lib/commands/role/list.js +1 -1
  161. package/lib/commands/role/shared.js +1 -1
  162. package/lib/commands/role/update.js +1 -1
  163. package/lib/commands/role/user-add.js +1 -1
  164. package/lib/commands/role/user-remove.js +1 -1
  165. package/lib/commands/role/user-resolve.js +1 -1
  166. package/lib/commands/run/index.js +1 -1
  167. package/lib/commands/schema.js +1 -1
  168. package/lib/commands/sql/create.js +1 -1
  169. package/lib/commands/sql/delete.js +1 -1
  170. package/lib/commands/sql/detail.js +1 -1
  171. package/lib/commands/sql/exec.js +1 -1
  172. package/lib/commands/sql/index.js +1 -1
  173. package/lib/commands/sql/list.js +1 -1
  174. package/lib/commands/sql/pull.js +1 -1
  175. package/lib/commands/sql/push.js +1 -1
  176. package/lib/commands/sql/save.js +1 -1
  177. package/lib/commands/sql/shared.js +1 -1
  178. package/lib/commands/sql/status.js +1 -1
  179. package/lib/commands/sql/validate.js +1 -1
  180. package/lib/commands/task/index.js +1 -1
  181. package/lib/commands/task/status.js +1 -1
  182. package/lib/commands/workspace/add.js +1 -1
  183. package/lib/commands/workspace/index.js +1 -1
  184. package/lib/commands/workspace/remove.js +1 -1
  185. package/lib/config/schema.js +1 -1
  186. package/lib/constant/cdn.js +1 -1
  187. package/lib/constant/cli.js +1 -1
  188. package/lib/constant/defaults.js +1 -1
  189. package/lib/constant/domain.js +1 -1
  190. package/lib/constant/env.js +1 -1
  191. package/lib/constant/output.js +1 -1
  192. package/lib/constant/paths.js +1 -1
  193. package/lib/constant/risk.js +1 -1
  194. package/lib/context/app-resolver.js +1 -1
  195. package/lib/context/auth-resolver.js +1 -1
  196. package/lib/context/config-loader.js +1 -1
  197. package/lib/context.js +1 -1
  198. package/lib/core/alias-resolver.js +1 -1
  199. package/lib/core/api-client.js +1 -1
  200. package/lib/core/bff/config.js +1 -1
  201. package/lib/core/bff/file-system.js +1 -1
  202. package/lib/core/bff/hash.js +1 -1
  203. package/lib/core/bff/lock.js +1 -1
  204. package/lib/core/bff/utils.js +1 -1
  205. package/lib/core/db-resolver.js +1 -1
  206. package/lib/core/page/file-system.js +1 -1
  207. package/lib/core/page/hash.js +1 -1
  208. package/lib/core/page/lock.js +1 -1
  209. package/lib/core/sql-index-auditor.js +1 -1
  210. package/lib/core/sql-sync/config.js +1 -1
  211. package/lib/core/sql-sync/file-system.js +1 -1
  212. package/lib/core/sql-sync/hash.js +1 -1
  213. package/lib/core/sql-sync/lock.js +1 -1
  214. package/lib/core/sql-sync/utils.js +1 -1
  215. package/lib/core/sql-validator.js +1 -1
  216. package/lib/errors.js +1 -1
  217. package/lib/framework/build-all-flags.js +1 -1
  218. package/lib/framework/error-output.js +1 -1
  219. package/lib/framework/explicit-yes.js +1 -1
  220. package/lib/framework/flags.js +1 -1
  221. package/lib/framework/help.js +1 -1
  222. package/lib/framework/index.js +1 -1
  223. package/lib/framework/output.js +1 -1
  224. package/lib/framework/response.js +1 -1
  225. package/lib/framework/runner-alias.js +1 -1
  226. package/lib/framework/runner.js +1 -1
  227. package/lib/framework/schema-export.js +1 -1
  228. package/lib/framework/types.js +1 -1
  229. package/lib/generated/build-info.js +1 -1
  230. package/lib/help.js +1 -1
  231. package/lib/skills/main.js +1 -1
  232. package/lib/skills/npx-skills-add.js +1 -1
  233. package/lib/telemetry/cli-command-trace.js +1 -1
  234. package/lib/telemetry/cli-help-trace.js +1 -1
  235. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  236. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  237. package/lib/telemetry/send-cli-trace-log.js +1 -1
  238. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  239. package/lib/utils/ai_config.js +1 -1
  240. package/lib/utils/apply-jq-filter.js +1 -1
  241. package/lib/utils/cdn-config.js +1 -1
  242. package/lib/utils/check-sdk-version.js +1 -1
  243. package/lib/utils/cli-version-check.js +1 -1
  244. package/lib/utils/cli-version-policy.js +1 -1
  245. package/lib/utils/config.js +1 -1
  246. package/lib/utils/copy-directory.js +1 -1
  247. package/lib/utils/entity-with-id.js +1 -1
  248. package/lib/utils/file-utils.js +1 -1
  249. package/lib/utils/guides-cdn.js +1 -1
  250. package/lib/utils/http-client.js +1 -1
  251. package/lib/utils/is-non-interactive.js +1 -1
  252. package/lib/utils/logger.js +1 -1
  253. package/lib/utils/params.js +1 -1
  254. package/lib/utils/platform.js +1 -1
  255. package/lib/utils/rules-cdn.js +1 -1
  256. package/lib/utils/sleep.js +1 -1
  257. package/lib/utils/template-replacer.js +1 -1
  258. package/lib/utils/update-notice.js +1 -1
  259. package/lib/utils/version.js +1 -1
  260. package/lib/utils/with-active-cookie.js +1 -1
  261. package/lib/utils/write-cli-side-channel.js +1 -1
  262. package/package.json +1 -1
  263. package/lib/commands/menu/update.js +0 -1
@@ -1 +1 @@
1
- (function(_0x2e24ba,_0x45771b){const _0x240da8=a145_0x37ce,_0x4f23eb=_0x2e24ba();while(!![]){try{const _0x4fddb8=parseInt(_0x240da8(0x17e))/0x1+-parseInt(_0x240da8(0x1a5))/0x2*(parseInt(_0x240da8(0x18b))/0x3)+-parseInt(_0x240da8(0x1a3))/0x4*(-parseInt(_0x240da8(0x1a9))/0x5)+parseInt(_0x240da8(0x19b))/0x6*(-parseInt(_0x240da8(0x19a))/0x7)+-parseInt(_0x240da8(0x191))/0x8*(parseInt(_0x240da8(0x18e))/0x9)+parseInt(_0x240da8(0x1a1))/0xa+parseInt(_0x240da8(0x1a7))/0xb;if(_0x4fddb8===_0x45771b)break;else _0x4f23eb['push'](_0x4f23eb['shift']());}catch(_0x462c2b){_0x4f23eb['push'](_0x4f23eb['shift']());}}}(a145_0x1a3b,0x5c383));import a145_0x3150b8 from'path';import a145_0x467332 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';function a145_0x1a3b(){const _0x464a03=['\x20api\x20pull`\x20manually\x20later.','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','trim','\x0a\x20\x20cd\x20','string','resolve','bun\x20run\x20format','Use\x20a\x20different\x20project\x20name.','28tnVOjb','34824ljiRCZ','env','chdir','stringify','dirname','\x20\x20√\x20Configuration\x20file\x20created','193260XBcEUs','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','243428SKyizS','cwd','4pMyPRt','toLocaleString','4282531iJidZD','name','50TZkDnv','length','test','access','\x0a√\x20Project\x20','validation','production','ignore','\x22\x20already\x20exists.','Project\x20directory\x20\x22','584139PUAVdJ','W_OK','\x20dataset(s),\x20generated\x20','join','utf-8','\x20model(s)','readFile','modelCount','log','*\x20Creating\x20project\x20','description','belowMinimum','\x20\x20√\x20Pulled\x20','1066647YCaEcW','Cannot\x20create\x20project\x20in\x20current\x20directory.','\x20\x20√\x20package.json\x20updated','41157JOiNZb','package.json','needsUpgrade','856kobwBV'];a145_0x1a3b=function(){return _0x464a03;};return a145_0x1a3b();}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(_0x105325,_0x10a9d2,_0xf87bfd,_0x182c73){const _0x3c1255=a145_0x37ce,_0x296db4=await checkCliVersion();(_0x296db4[_0x3c1255(0x190)]||_0x296db4[_0x3c1255(0x189)])&&(printCliUpgradeWarning(_0x296db4),assertCliVersionSupported(_0x296db4));if(!_0x105325||_0x105325[_0x3c1255(0x194)]()==='')throw CliErrors[_0x3c1255(0x1ae)]('Project\x20name\x20cannot\x20be\x20empty.');const _0x162b22=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x162b22[_0x3c1255(0x1ab)](_0x105325))throw CliErrors[_0x3c1255(0x1ae)]('Project\x20name\x20contains\x20invalid\x20characters.','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x105325[_0x3c1255(0x1aa)]>0x64)throw CliErrors[_0x3c1255(0x1ae)]('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.');const _0x59f51a=a145_0x3150b8[_0x3c1255(0x197)](process['cwd'](),_0x105325);if(existsSync(_0x59f51a))throw CliErrors[_0x3c1255(0x1ae)](_0x3c1255(0x17d)+_0x105325+_0x3c1255(0x17c),_0x3c1255(0x199));try{const _0x13f498=a145_0x3150b8[_0x3c1255(0x19f)](_0x59f51a);await a145_0x467332[_0x3c1255(0x1ac)](_0x13f498,a145_0x467332['constants'][_0x3c1255(0x17f)]);}catch{throw CliErrors[_0x3c1255(0x1ae)](_0x3c1255(0x18c),'Check\x20directory\x20permissions.');}try{console[_0x3c1255(0x186)](_0x3c1255(0x187)+_0x105325+'...');const _0x22f1ec=getSubAppReactDemoTemplateDir();await copyDirectory(_0x22f1ec,_0x59f51a),console[_0x3c1255(0x186)]('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x105325),console['log'](_0x3c1255(0x18d)),console['log']('\x20\x20Installing\x20dependencies...'),console[_0x3c1255(0x186)]('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x59f51a),console[_0x3c1255(0x186)]('\x20\x20√\x20Code\x20formatted'),await configureProject(_0x105325,_0xf87bfd,_0x10a9d2),console[_0x3c1255(0x186)](_0x3c1255(0x1a0)),_0xf87bfd&&await pullApiConfig(_0x59f51a,_0xf87bfd,_0x10a9d2,_0x182c73),console[_0x3c1255(0x186)](_0x3c1255(0x1ad)+_0x105325+'\x20created\x20successfully!'),console[_0x3c1255(0x186)](_0x3c1255(0x195)+_0x105325),console[_0x3c1255(0x186)]('\x20\x20rabetbase\x20run\x20start\x0a');}catch(_0x1361ef){try{existsSync(_0x59f51a)&&await a145_0x467332['rm'](_0x59f51a,{'recursive':!![],'force':!![]});}catch{}throw _0x1361ef;}}async function updatePackageJsonName(_0x4324cf){const _0x34b5a4=a145_0x37ce,_0x5400a0=a145_0x3150b8[_0x34b5a4(0x197)](process[_0x34b5a4(0x1a4)](),_0x4324cf),_0x1aeb4d=a145_0x3150b8[_0x34b5a4(0x181)](_0x5400a0,_0x34b5a4(0x18f)),_0x107c26=await a145_0x467332[_0x34b5a4(0x184)](_0x1aeb4d,_0x34b5a4(0x182)),_0x3efc7a=JSON['parse'](_0x107c26);_0x3efc7a[_0x34b5a4(0x1a8)]=_0x4324cf,_0x3efc7a[_0x34b5a4(0x188)]=_0x34b5a4(0x1a2),await a145_0x467332['writeFile'](_0x1aeb4d,JSON[_0x34b5a4(0x19e)](_0x3efc7a,null,0x2)+'\x0a');}function detectPackageManager(){const _0x2e068c=a145_0x37ce;try{return execSync('bun\x20--version',{'stdio':_0x2e068c(0x17b)}),'bun';}catch{return'npm';}}function a145_0x37ce(_0xb25f06,_0x2ce973){_0xb25f06=_0xb25f06-0x17b;const _0x1a3bc1=a145_0x1a3b();let _0x37ce0c=_0x1a3bc1[_0xb25f06];return _0x37ce0c;}async function formatCode(_0x24e410){const _0x33ff34=a145_0x37ce;try{await execAsync(_0x33ff34(0x198),{'cwd':_0x24e410});}catch{}}async function configureProject(_0x29d4bb,_0x425f0f,_0x4b8688){const _0x170f21=a145_0x37ce,_0x36f128=a145_0x3150b8[_0x170f21(0x197)](process[_0x170f21(0x1a4)](),_0x29d4bb),_0x5437d3=a145_0x3150b8[_0x170f21(0x181)](_0x36f128,NEW_CONFIG_NAME),_0x3d1f76=readConfig(),_0x18510a=typeof _0x3d1f76[_0x170f21(0x19c)]===_0x170f21(0x196)?_0x3d1f76['env']:undefined,_0x567e77={};for(const _0x310b56 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x3d1f76[_0x310b56]!=null)_0x567e77[_0x310b56]=_0x3d1f76[_0x310b56];}const _0xf8e4ee=buildCanonicalProjectConfig(_0x567e77,{'appCodes':_0x425f0f?[_0x425f0f]:[],'env':_0x4b8688||_0x18510a||_0x170f21(0x1af),'metadata':{'createdAt':new Date()[_0x170f21(0x1a6)](),'version':getCliVersion()}});writeConfigFile(_0x5437d3,_0xf8e4ee);}async function pullApiConfig(_0x5d58f2,_0xcb58c7,_0x15c631,_0x42dced){const _0x3401e4=a145_0x37ce,_0x25d7f3=process[_0x3401e4(0x1a4)]();try{process[_0x3401e4(0x19d)](_0x5d58f2);const _0x26f57e=_0x15c631||_0x3401e4(0x1af);initEnv(_0x26f57e),console[_0x3401e4(0x186)]('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x12d386}=await fetchModelList(_0xcb58c7,_0x42dced||''),_0x1c584b=await generateApiFile(_0x12d386,'',_0xcb58c7,!![],_0x26f57e,DEFAULT_API_DIR);console['log'](_0x3401e4(0x18a)+_0x12d386[_0x3401e4(0x1aa)]+_0x3401e4(0x180)+_0x1c584b[_0x3401e4(0x185)]+_0x3401e4(0x183));}catch(_0x4edda1){console[_0x3401e4(0x186)](_0x3401e4(0x193)+CLI_BIN_NAME+_0x3401e4(0x192));}finally{process['chdir'](_0x25d7f3);}}
1
+ (function(_0x227371,_0x5bfbae){const _0x32f355=a146_0x3672,_0x279df4=_0x227371();while(!![]){try{const _0x2a67db=parseInt(_0x32f355(0x9d))/0x1+parseInt(_0x32f355(0x89))/0x2*(parseInt(_0x32f355(0x80))/0x3)+-parseInt(_0x32f355(0x78))/0x4*(parseInt(_0x32f355(0x70))/0x5)+parseInt(_0x32f355(0x7f))/0x6+parseInt(_0x32f355(0x8b))/0x7*(parseInt(_0x32f355(0x9a))/0x8)+parseInt(_0x32f355(0x9e))/0x9+-parseInt(_0x32f355(0x8f))/0xa;if(_0x2a67db===_0x5bfbae)break;else _0x279df4['push'](_0x279df4['shift']());}catch(_0x65cf74){_0x279df4['push'](_0x279df4['shift']());}}}(a146_0x3a2a,0x79f90));import a146_0xa43529 from'path';import a146_0x500c52 from'fs/promises';import{existsSync}from'fs';function a146_0x3672(_0x27c1b4,_0x1ff8ea){_0x27c1b4=_0x27c1b4-0x6b;const _0x3a2aee=a146_0x3a2a();let _0x3672b9=_0x3a2aee[_0x27c1b4];return _0x3672b9;}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';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(_0x37a756,_0xf855b9,_0xb83759,_0x2fdbc7){const _0x2bebf3=a146_0x3672,_0x304581=await checkCliVersion();(_0x304581[_0x2bebf3(0x7c)]||_0x304581[_0x2bebf3(0x9b)])&&(printCliUpgradeWarning(_0x304581),assertCliVersionSupported(_0x304581));if(!_0x37a756||_0x37a756[_0x2bebf3(0x6d)]()==='')throw CliErrors[_0x2bebf3(0x87)]('Project\x20name\x20cannot\x20be\x20empty.');const _0x59802a=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x59802a[_0x2bebf3(0x86)](_0x37a756))throw CliErrors[_0x2bebf3(0x87)](_0x2bebf3(0x88),'Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x37a756[_0x2bebf3(0x84)]>0x64)throw CliErrors[_0x2bebf3(0x87)]('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.');const _0x581ab6=a146_0xa43529['resolve'](process[_0x2bebf3(0x7d)](),_0x37a756);if(existsSync(_0x581ab6))throw CliErrors[_0x2bebf3(0x87)](_0x2bebf3(0x6f)+_0x37a756+_0x2bebf3(0x8e),_0x2bebf3(0xa4));try{const _0x2ae858=a146_0xa43529[_0x2bebf3(0x94)](_0x581ab6);await a146_0x500c52['access'](_0x2ae858,a146_0x500c52[_0x2bebf3(0x72)][_0x2bebf3(0x74)]);}catch{throw CliErrors[_0x2bebf3(0x87)](_0x2bebf3(0x9c),_0x2bebf3(0x96));}try{console['log'](_0x2bebf3(0x76)+_0x37a756+_0x2bebf3(0x97));const _0x24509d=getSubAppReactDemoTemplateDir();await copyDirectory(_0x24509d,_0x581ab6),console[_0x2bebf3(0x93)]('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x37a756),console[_0x2bebf3(0x93)]('\x20\x20√\x20package.json\x20updated'),console['log'](_0x2bebf3(0x8a)),console[_0x2bebf3(0x93)]('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x581ab6),console['log'](_0x2bebf3(0x6c)),await configureProject(_0x37a756,_0xb83759,_0xf855b9),console[_0x2bebf3(0x93)]('\x20\x20√\x20Configuration\x20file\x20created'),_0xb83759&&await pullApiConfig(_0x581ab6,_0xb83759,_0xf855b9,_0x2fdbc7),console['log'](_0x2bebf3(0x82)+_0x37a756+_0x2bebf3(0x83)),console[_0x2bebf3(0x93)]('\x0a\x20\x20cd\x20'+_0x37a756),console[_0x2bebf3(0x93)](_0x2bebf3(0x85));}catch(_0x42403a){try{existsSync(_0x581ab6)&&await a146_0x500c52['rm'](_0x581ab6,{'recursive':!![],'force':!![]});}catch{}throw _0x42403a;}}function a146_0x3a2a(){const _0x8883=['join','readFile','\x20\x20Pulling\x20API\x20configuration...','production','parse','Use\x20a\x20different\x20project\x20name.','chdir','\x20\x20√\x20Code\x20formatted','trim','\x20dataset(s),\x20generated\x20','Project\x20directory\x20\x22','4412855mGUEMI','\x20model(s)','constants','package.json','W_OK','\x20api\x20pull`\x20manually\x20later.','*\x20Creating\x20project\x20','bun\x20run\x20format','4ZlxVZC','bun\x20--version','stringify','string','needsUpgrade','cwd','bun','5102322QSzcgS','91452sPxhAx','modelCount','\x0a√\x20Project\x20','\x20created\x20successfully!','length','\x20\x20rabetbase\x20run\x20start\x0a','test','validation','Project\x20name\x20contains\x20invalid\x20characters.','52bUETlU','\x20\x20Installing\x20dependencies...','4397827RYxowj','env','npm','\x22\x20already\x20exists.','12755920uZrCHH','\x20\x20√\x20Pulled\x20','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','name','log','dirname','utf-8','Check\x20directory\x20permissions.','...','resolve','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','8FpMrCL','belowMinimum','Cannot\x20create\x20project\x20in\x20current\x20directory.','280525qfkdPT','954054BJjDUN'];a146_0x3a2a=function(){return _0x8883;};return a146_0x3a2a();}async function updatePackageJsonName(_0x36f2a2){const _0x429209=a146_0x3672,_0x323a88=a146_0xa43529[_0x429209(0x98)](process['cwd'](),_0x36f2a2),_0x1df7b4=a146_0xa43529['join'](_0x323a88,_0x429209(0x73)),_0x104ea7=await a146_0x500c52[_0x429209(0xa0)](_0x1df7b4,_0x429209(0x95)),_0x5b5a00=JSON[_0x429209(0xa3)](_0x104ea7);_0x5b5a00[_0x429209(0x92)]=_0x36f2a2,_0x5b5a00['description']=_0x429209(0x91),await a146_0x500c52['writeFile'](_0x1df7b4,JSON[_0x429209(0x7a)](_0x5b5a00,null,0x2)+'\x0a');}function detectPackageManager(){const _0x121dd4=a146_0x3672;try{return execSync(_0x121dd4(0x79),{'stdio':'ignore'}),_0x121dd4(0x7e);}catch{return _0x121dd4(0x8d);}}async function formatCode(_0x2a2a54){const _0x5069d2=a146_0x3672;try{await execAsync(_0x5069d2(0x77),{'cwd':_0x2a2a54});}catch{}}async function configureProject(_0xb3eaed,_0x31451b,_0xed9294){const _0x448eac=a146_0x3672,_0x161160=a146_0xa43529[_0x448eac(0x98)](process[_0x448eac(0x7d)](),_0xb3eaed),_0x5d9bd1=a146_0xa43529[_0x448eac(0x9f)](_0x161160,NEW_CONFIG_NAME),_0x205823=readConfig(),_0x40a873=typeof _0x205823[_0x448eac(0x8c)]===_0x448eac(0x7b)?_0x205823[_0x448eac(0x8c)]:undefined,_0x27c98a={};for(const _0x3b5530 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x205823[_0x3b5530]!=null)_0x27c98a[_0x3b5530]=_0x205823[_0x3b5530];}const _0x3d5a82=buildCanonicalProjectConfig(_0x27c98a,{'appCodes':_0x31451b?[_0x31451b]:[],'env':_0xed9294||_0x40a873||_0x448eac(0xa2),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':getCliVersion()}});writeConfigFile(_0x5d9bd1,_0x3d5a82);}async function pullApiConfig(_0x54b4f3,_0x504ac7,_0x57d2c4,_0x15f6e5){const _0x34a866=a146_0x3672,_0x368a72=process[_0x34a866(0x7d)]();try{process[_0x34a866(0x6b)](_0x54b4f3);const _0x4d2241=_0x57d2c4||_0x34a866(0xa2);initEnv(_0x4d2241),console[_0x34a866(0x93)](_0x34a866(0xa1));const {configArray:_0x435de4}=await fetchModelList(_0x504ac7,_0x15f6e5||''),_0x11b426=await generateApiFile(_0x435de4,'',_0x504ac7,!![],_0x4d2241,DEFAULT_API_DIR);console[_0x34a866(0x93)](_0x34a866(0x90)+_0x435de4[_0x34a866(0x84)]+_0x34a866(0x6e)+_0x11b426[_0x34a866(0x81)]+_0x34a866(0x71));}catch(_0x1f8e50){console[_0x34a866(0x93)](_0x34a866(0x99)+CLI_BIN_NAME+_0x34a866(0x75));}finally{process[_0x34a866(0x6b)](_0x368a72);}}
@@ -1 +1 @@
1
- const a146_0x2d27f3=a146_0x2abe;function a146_0x54e0(){const _0x55c978=['5793816pzoiPi','templates','1943522VSZnKK','2MXGnYO','5ijaLKE','1064606XznTco','sub-app-react-demo','108654miKVCF','dirname','1560228yXCtZS','resolve','../../../../','projects','32420430ZypCIK','join','2701032JmFZtN'];a146_0x54e0=function(){return _0x55c978;};return a146_0x54e0();}(function(_0x2a4281,_0x3f202b){const _0xcad578=a146_0x2abe,_0x42a8c6=_0x2a4281();while(!![]){try{const _0x1659ce=parseInt(_0xcad578(0x9d))/0x1*(-parseInt(_0xcad578(0x9f))/0x2)+parseInt(_0xcad578(0xa1))/0x3+-parseInt(_0xcad578(0x9a))/0x4+parseInt(_0xcad578(0x9e))/0x5*(parseInt(_0xcad578(0x93))/0x6)+-parseInt(_0xcad578(0x9c))/0x7+-parseInt(_0xcad578(0x99))/0x8+parseInt(_0xcad578(0x97))/0x9;if(_0x1659ce===_0x3f202b)break;else _0x42a8c6['push'](_0x42a8c6['shift']());}catch(_0x15db4d){_0x42a8c6['push'](_0x42a8c6['shift']());}}}(a146_0x54e0,0xbc08f));import a146_0x4138b1 from'node:path';import{fileURLToPath}from'node:url';function a146_0x2abe(_0x5bd966,_0x48d9dc){_0x5bd966=_0x5bd966-0x93;const _0x54e0a7=a146_0x54e0();let _0x2abe3d=_0x54e0a7[_0x5bd966];return _0x2abe3d;}const __dirname=a146_0x4138b1[a146_0x2d27f3(0xa2)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x1f7821=a146_0x2d27f3;return a146_0x4138b1[_0x1f7821(0x94)](__dirname,_0x1f7821(0x95));}export function getSubAppReactDemoTemplateDir(){const _0x21804e=a146_0x2d27f3;return a146_0x4138b1[_0x21804e(0x98)](getRabetbaseCliPackageRoot(),_0x21804e(0x9b),_0x21804e(0x96),_0x21804e(0xa0));}
1
+ function a147_0x1ddd(){const _0x9ff46a=['601461aOrZfs','291NORFGv','6498359YmIvTU','692RFIFlp','projects','3296WzNGgR','260pnLTMG','dirname','5102592cGPVhc','66060cDcIGd','7023696vxUsrv','join','6294005xOuyDY','sub-app-react-demo','templates'];a147_0x1ddd=function(){return _0x9ff46a;};return a147_0x1ddd();}const a147_0x4845af=a147_0x2bf8;(function(_0x311bff,_0x34c937){const _0x400f0f=a147_0x2bf8,_0x206096=_0x311bff();while(!![]){try{const _0x4b19e5=parseInt(_0x400f0f(0x130))/0x1*(-parseInt(_0x400f0f(0x12e))/0x2)+-parseInt(_0x400f0f(0x12c))/0x3*(-parseInt(_0x400f0f(0x125))/0x4)+parseInt(_0x400f0f(0x128))/0x5+parseInt(_0x400f0f(0x124))/0x6+parseInt(_0x400f0f(0x12d))/0x7+-parseInt(_0x400f0f(0x126))/0x8+parseInt(_0x400f0f(0x12b))/0x9*(-parseInt(_0x400f0f(0x122))/0xa);if(_0x4b19e5===_0x34c937)break;else _0x206096['push'](_0x206096['shift']());}catch(_0x5b3447){_0x206096['push'](_0x206096['shift']());}}}(a147_0x1ddd,0xd7b89));import a147_0x3937d8 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a147_0x3937d8[a147_0x4845af(0x123)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){return a147_0x3937d8['resolve'](__dirname,'../../../../');}function a147_0x2bf8(_0x4a5363,_0x26c08d){_0x4a5363=_0x4a5363-0x122;const _0x1ddd23=a147_0x1ddd();let _0x2bf89d=_0x1ddd23[_0x4a5363];return _0x2bf89d;}export function getSubAppReactDemoTemplateDir(){const _0x329e0b=a147_0x4845af;return a147_0x3937d8[_0x329e0b(0x127)](getRabetbaseCliPackageRoot(),_0x329e0b(0x12a),_0x329e0b(0x12f),_0x329e0b(0x129));}
@@ -1 +1 @@
1
- (function(_0x4eb1cf,_0xbaf7e5){const _0x2a5535=a147_0x33e2,_0x2d6732=_0x4eb1cf();while(!![]){try{const _0x28bc29=parseInt(_0x2a5535(0xfe))/0x1*(parseInt(_0x2a5535(0xfa))/0x2)+parseInt(_0x2a5535(0xff))/0x3+-parseInt(_0x2a5535(0xf8))/0x4*(parseInt(_0x2a5535(0xf2))/0x5)+-parseInt(_0x2a5535(0xfc))/0x6+parseInt(_0x2a5535(0x100))/0x7*(-parseInt(_0x2a5535(0x103))/0x8)+parseInt(_0x2a5535(0xfb))/0x9+parseInt(_0x2a5535(0x105))/0xa;if(_0x28bc29===_0xbaf7e5)break;else _0x2d6732['push'](_0x2d6732['shift']());}catch(_0x270d16){_0x2d6732['push'](_0x2d6732['shift']());}}}(a147_0x15cd,0xb0bec));import a147_0x20186e from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a147_0x15cd(){const _0x2bfc83=['now','项目模板复制失败','resolve','message','info','352fJQYAl','cwd','2NVolGz','4712904geXccW','412374eiCPWM','项目模板复制完成','1194185ffmyNs','2675499ruLSzZ','434DYASjy','开始复制项目模板','error','158272hYmEoi','copy','4640270iYSZaL','59910MxLDeO'];a147_0x15cd=function(){return _0x2bfc83;};return a147_0x15cd();}import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';function a147_0x33e2(_0x56ed84,_0x29591d){_0x56ed84=_0x56ed84-0xf2;const _0x15cd3f=a147_0x15cd();let _0x33e285=_0x15cd3f[_0x56ed84];return _0x33e285;}const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x5a61a9){const _0x2c0020=a147_0x33e2,_0x48c38c=Date[_0x2c0020(0xf3)](),_0x5a0346=a147_0x20186e[_0x2c0020(0xf5)](process[_0x2c0020(0xf9)](),_0x5a61a9);try{logger[_0x2c0020(0xf7)](_0x2c0020(0x104),_0x2c0020(0x101),{'projectCode':_0x5a61a9,'templateDir':templateDir}),await copyDirectory(templateDir,_0x5a0346);const _0x57cfa3=Date[_0x2c0020(0xf3)]()-_0x48c38c;logger['success'](_0x2c0020(0x104),_0x2c0020(0xfd),_0x57cfa3,{'projectCode':_0x5a61a9});}catch(_0x2b1f50){const _0xdd5d0a=Date[_0x2c0020(0xf3)]()-_0x48c38c;logger[_0x2c0020(0x102)](_0x2c0020(0x104),_0x2c0020(0xf4),{'projectCode':_0x5a61a9,'error':_0x2b1f50 instanceof Error?_0x2b1f50[_0x2c0020(0xf6)]:String(_0x2b1f50),'duration':_0xdd5d0a});throw _0x2b1f50;}return formatElapsed(_0x48c38c);}
1
+ (function(_0x401cfe,_0x42c3f4){const _0x1b714b=a148_0x12c7,_0x85c9e7=_0x401cfe();while(!![]){try{const _0x5dcbba=-parseInt(_0x1b714b(0xbf))/0x1*(parseInt(_0x1b714b(0xc2))/0x2)+-parseInt(_0x1b714b(0xbe))/0x3+parseInt(_0x1b714b(0xc1))/0x4+-parseInt(_0x1b714b(0xc3))/0x5+-parseInt(_0x1b714b(0xbd))/0x6+parseInt(_0x1b714b(0xc0))/0x7+parseInt(_0x1b714b(0xb9))/0x8*(parseInt(_0x1b714b(0xba))/0x9);if(_0x5dcbba===_0x42c3f4)break;else _0x85c9e7['push'](_0x85c9e7['shift']());}catch(_0x4d656c){_0x85c9e7['push'](_0x85c9e7['shift']());}}}(a148_0x1226,0xce6f6));import a148_0xb6c99c from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a148_0x1226(){const _0x294a1a=['开始复制项目模板','4042770QoVoxE','4024182tPemqZ','31rLeosL','1957284CwsCyh','4997268CKAVok','92222TnDBrQ','6717120TYpfYu','success','now','message','copy','resolve','info','cwd','88FlCzgC','3358377UmEkzg','项目模板复制完成'];a148_0x1226=function(){return _0x294a1a;};return a148_0x1226();}import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';function a148_0x12c7(_0x5a2de2,_0x3996fb){_0x5a2de2=_0x5a2de2-0xb5;const _0x1226f9=a148_0x1226();let _0x12c7c5=_0x1226f9[_0x5a2de2];return _0x12c7c5;}const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x4a9835){const _0x3938a9=a148_0x12c7,_0x16b286=Date[_0x3938a9(0xc5)](),_0xa9288a=a148_0xb6c99c[_0x3938a9(0xb6)](process[_0x3938a9(0xb8)](),_0x4a9835);try{logger[_0x3938a9(0xb7)]('copy',_0x3938a9(0xbc),{'projectCode':_0x4a9835,'templateDir':templateDir}),await copyDirectory(templateDir,_0xa9288a);const _0x28a959=Date[_0x3938a9(0xc5)]()-_0x16b286;logger[_0x3938a9(0xc4)]('copy',_0x3938a9(0xbb),_0x28a959,{'projectCode':_0x4a9835});}catch(_0x59bbac){const _0x4dad01=Date['now']()-_0x16b286;logger['error'](_0x3938a9(0xb5),'项目模板复制失败',{'projectCode':_0x4a9835,'error':_0x59bbac instanceof Error?_0x59bbac[_0x3938a9(0xc6)]:String(_0x59bbac),'duration':_0x4dad01});throw _0x59bbac;}return formatElapsed(_0x16b286);}
@@ -1 +1 @@
1
- function a148_0x2965(){const _0x1c7176=['resolve','522810dSYQrq','2935656pIppzV','7wtoYLk','159fbwhdi','cwd','npx','format','now','339190GEZCms','842xHuRmL','代码格式化完成','--write','info','message','246102ENngjS','prettier','180848QbVKIS','1414926wOwQLk'];a148_0x2965=function(){return _0x1c7176;};return a148_0x2965();}(function(_0x509d7e,_0x4f4092){const _0x5e7c7d=a148_0x56d6,_0x1d4271=_0x509d7e();while(!![]){try{const _0x4a7516=parseInt(_0x5e7c7d(0x174))/0x1*(parseInt(_0x5e7c7d(0x17a))/0x2)+-parseInt(_0x5e7c7d(0x17f))/0x3+-parseInt(_0x5e7c7d(0x16e))/0x4+parseInt(_0x5e7c7d(0x179))/0x5+-parseInt(_0x5e7c7d(0x16f))/0x6+-parseInt(_0x5e7c7d(0x173))/0x7*(-parseInt(_0x5e7c7d(0x172))/0x8)+parseInt(_0x5e7c7d(0x171))/0x9;if(_0x4a7516===_0x4f4092)break;else _0x1d4271['push'](_0x1d4271['shift']());}catch(_0x53bf1a){_0x1d4271['push'](_0x1d4271['shift']());}}}(a148_0x2965,0x30095));function a148_0x56d6(_0x55c9bb,_0x48faec){_0x55c9bb=_0x55c9bb-0x16d;const _0x296590=a148_0x2965();let _0x56d682=_0x296590[_0x55c9bb];return _0x56d682;}import a148_0x262ba6 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x54d8f0){const _0x1f4aef=a148_0x56d6,_0x5eea18=Date['now'](),_0x56dabe=a148_0x262ba6[_0x1f4aef(0x170)](process[_0x1f4aef(0x175)](),_0x54d8f0);try{logger[_0x1f4aef(0x17d)](_0x1f4aef(0x177),'开始格式化代码',{'projectCode':_0x54d8f0}),await execa(resolveNpmBin(_0x1f4aef(0x176)),[_0x1f4aef(0x16d),_0x1f4aef(0x17c),'.'],{'cwd':_0x56dabe});const _0x19e757=Date[_0x1f4aef(0x178)]()-_0x5eea18;logger['success'](_0x1f4aef(0x177),_0x1f4aef(0x17b),_0x19e757,{'projectCode':_0x54d8f0});}catch(_0x1d3e34){const _0x250c44=Date[_0x1f4aef(0x178)]()-_0x5eea18;logger['error']('format','代码格式化失败',{'projectCode':_0x54d8f0,'error':_0x1d3e34 instanceof Error?_0x1d3e34[_0x1f4aef(0x17e)]:String(_0x1d3e34),'duration':_0x250c44});throw _0x1d3e34;}return formatElapsed(_0x5eea18);}
1
+ (function(_0x45f8ea,_0x5d4ea1){const _0x159088=a149_0x1e7a,_0x4c1756=_0x45f8ea();while(!![]){try{const _0x623874=-parseInt(_0x159088(0xce))/0x1*(parseInt(_0x159088(0xcc))/0x2)+-parseInt(_0x159088(0xca))/0x3*(parseInt(_0x159088(0xcf))/0x4)+parseInt(_0x159088(0xcb))/0x5*(-parseInt(_0x159088(0xd5))/0x6)+-parseInt(_0x159088(0xd4))/0x7+-parseInt(_0x159088(0xd0))/0x8*(parseInt(_0x159088(0xd3))/0x9)+parseInt(_0x159088(0xc5))/0xa+parseInt(_0x159088(0xc3))/0xb*(parseInt(_0x159088(0xc9))/0xc);if(_0x623874===_0x5d4ea1)break;else _0x4c1756['push'](_0x4c1756['shift']());}catch(_0x2bf4bc){_0x4c1756['push'](_0x4c1756['shift']());}}}(a149_0x2051,0x38b34));import a149_0x143674 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a149_0x2051(){const _0x1996ca=['173636wMShkz','56BKPXyG','error','info','408636OSCSpI','2590756vVHVTk','18VWZcUO','开始格式化代码','resolve','3561811drZlhS','now','1198910nPTjhd','cwd','prettier','代码格式化完成','60AsmSnJ','21FWKHVJ','180365JyoULU','406634qTxzIy','success','2FtswGL'];a149_0x2051=function(){return _0x1996ca;};return a149_0x2051();}function a149_0x1e7a(_0x1d2a18,_0x438efa){_0x1d2a18=_0x1d2a18-0xc2;const _0x205118=a149_0x2051();let _0x1e7a37=_0x205118[_0x1d2a18];return _0x1e7a37;}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x148753){const _0x222530=a149_0x1e7a,_0x1b4cbb=Date['now'](),_0x399e2d=a149_0x143674[_0x222530(0xc2)](process[_0x222530(0xc6)](),_0x148753);try{logger[_0x222530(0xd2)]('format',_0x222530(0xd6),{'projectCode':_0x148753}),await execa(resolveNpmBin('npx'),[_0x222530(0xc7),'--write','.'],{'cwd':_0x399e2d});const _0x3d6e1a=Date[_0x222530(0xc4)]()-_0x1b4cbb;logger[_0x222530(0xcd)]('format',_0x222530(0xc8),_0x3d6e1a,{'projectCode':_0x148753});}catch(_0x56a387){const _0x76e428=Date[_0x222530(0xc4)]()-_0x1b4cbb;logger[_0x222530(0xd1)]('format','代码格式化失败',{'projectCode':_0x148753,'error':_0x56a387 instanceof Error?_0x56a387['message']:String(_0x56a387),'duration':_0x76e428});throw _0x56a387;}return formatElapsed(_0x1b4cbb);}
@@ -1 +1 @@
1
- (function(_0x2503be,_0x524321){const _0x54d598=a149_0x424a,_0x3ad6c=_0x2503be();while(!![]){try{const _0x297b07=parseInt(_0x54d598(0x1e7))/0x1+-parseInt(_0x54d598(0x1f5))/0x2+parseInt(_0x54d598(0x1f3))/0x3+-parseInt(_0x54d598(0x1ec))/0x4+parseInt(_0x54d598(0x1f2))/0x5+parseInt(_0x54d598(0x1f1))/0x6+-parseInt(_0x54d598(0x1f6))/0x7;if(_0x297b07===_0x524321)break;else _0x3ad6c['push'](_0x3ad6c['shift']());}catch(_0x155f94){_0x3ad6c['push'](_0x3ad6c['shift']());}}}(a149_0x2565,0x9bdaf));import a149_0x50ae81 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a149_0x424a(_0x2034df,_0x50ee89){_0x2034df=_0x2034df-0x1e5;const _0x2565a4=a149_0x2565();let _0x424ad3=_0x2565a4[_0x2034df];return _0x424ad3;}function a149_0x2565(){const _0x165caa=['8066317lBsUiX','message','依赖安装完成','info','451339IYrRoH','install','--registry','开始安装依赖','success','1033520Uhompo','依赖安装失败','now','https://registry.npmmirror.com','npm','4641438yxjExQ','4650215ZRsBEQ','2638860VpFQVL','cwd','1970962fHYahQ'];a149_0x2565=function(){return _0x165caa;};return a149_0x2565();}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x34bbaa){const _0xb36683=a149_0x424a,_0x262bb5=Date['now'](),_0x3db45d=a149_0x50ae81['resolve'](process[_0xb36683(0x1f4)](),_0x34bbaa);try{logger[_0xb36683(0x1e6)](_0xb36683(0x1e8),_0xb36683(0x1ea),{'projectCode':_0x34bbaa,'registry':_0xb36683(0x1ef)}),await execa(resolveNpmBin(_0xb36683(0x1f0)),['install',_0xb36683(0x1e9),_0xb36683(0x1ef)],{'cwd':_0x3db45d});const _0x2c061d=Date['now']()-_0x262bb5;logger[_0xb36683(0x1eb)](_0xb36683(0x1e8),_0xb36683(0x1e5),_0x2c061d,{'projectCode':_0x34bbaa});}catch(_0x1e1a2){const _0x39d153=Date[_0xb36683(0x1ee)]()-_0x262bb5;logger['error'](_0xb36683(0x1e8),_0xb36683(0x1ed),{'projectCode':_0x34bbaa,'error':_0x1e1a2 instanceof Error?_0x1e1a2[_0xb36683(0x1f7)]:String(_0x1e1a2),'duration':_0x39d153});throw _0x1e1a2;}return formatElapsed(_0x262bb5);}
1
+ function a150_0x40b4(){const _0x2ac7d7=['install','依赖安装完成','error','183943fAdIWp','npm','10ZreZmo','36639075Fadwaz','2745940VuxZkZ','now','1464486WoTREE','cwd','12QpCcUf','https://registry.npmmirror.com','49763RClJrJ','依赖安装失败','728478QctViv','12XMGMsm','848vBhGlv','1593369pglIvP','--registry'];a150_0x40b4=function(){return _0x2ac7d7;};return a150_0x40b4();}function a150_0x53d5(_0x1aafa1,_0xfd6300){_0x1aafa1=_0x1aafa1-0xeb;const _0x40b439=a150_0x40b4();let _0x53d509=_0x40b439[_0x1aafa1];return _0x53d509;}(function(_0x573370,_0xe6d5c1){const _0x4ccbe0=a150_0x53d5,_0x11554b=_0x573370();while(!![]){try{const _0x2ea094=-parseInt(_0x4ccbe0(0xf6))/0x1*(parseInt(_0x4ccbe0(0xfe))/0x2)+parseInt(_0x4ccbe0(0xee))/0x3*(-parseInt(_0x4ccbe0(0xef))/0x4)+-parseInt(_0x4ccbe0(0xfa))/0x5+parseInt(_0x4ccbe0(0xfc))/0x6+-parseInt(_0x4ccbe0(0xec))/0x7*(parseInt(_0x4ccbe0(0xf0))/0x8)+parseInt(_0x4ccbe0(0xf1))/0x9*(parseInt(_0x4ccbe0(0xf8))/0xa)+parseInt(_0x4ccbe0(0xf9))/0xb;if(_0x2ea094===_0xe6d5c1)break;else _0x11554b['push'](_0x11554b['shift']());}catch(_0x212fd8){_0x11554b['push'](_0x11554b['shift']());}}}(a150_0x40b4,0x96a6d));import a150_0x3f8c2e from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x34031d){const _0x458827=a150_0x53d5,_0x1866c3=Date['now'](),_0xfead49=a150_0x3f8c2e['resolve'](process[_0x458827(0xfd)](),_0x34031d);try{logger['info'](_0x458827(0xf3),'开始安装依赖',{'projectCode':_0x34031d,'registry':_0x458827(0xeb)}),await execa(resolveNpmBin(_0x458827(0xf7)),['install',_0x458827(0xf2),_0x458827(0xeb)],{'cwd':_0xfead49});const _0xc91317=Date[_0x458827(0xfb)]()-_0x1866c3;logger['success'](_0x458827(0xf3),_0x458827(0xf4),_0xc91317,{'projectCode':_0x34031d});}catch(_0x2bb1a5){const _0x5592cf=Date[_0x458827(0xfb)]()-_0x1866c3;logger[_0x458827(0xf5)](_0x458827(0xf3),_0x458827(0xed),{'projectCode':_0x34031d,'error':_0x2bb1a5 instanceof Error?_0x2bb1a5['message']:String(_0x2bb1a5),'duration':_0x5592cf});throw _0x2bb1a5;}return formatElapsed(_0x1866c3);}
@@ -1 +1 @@
1
- const a150_0x2725de=a150_0x251a;(function(_0x3a58a8,_0x2b87fd){const _0x117655=a150_0x251a,_0x281f09=_0x3a58a8();while(!![]){try{const _0x5af72e=parseInt(_0x117655(0x1a5))/0x1*(-parseInt(_0x117655(0x1b3))/0x2)+parseInt(_0x117655(0x1a9))/0x3+-parseInt(_0x117655(0x1a7))/0x4*(parseInt(_0x117655(0x19e))/0x5)+parseInt(_0x117655(0x1a6))/0x6*(parseInt(_0x117655(0x1a2))/0x7)+parseInt(_0x117655(0x19b))/0x8*(parseInt(_0x117655(0x1ae))/0x9)+parseInt(_0x117655(0x1a1))/0xa+-parseInt(_0x117655(0x199))/0xb;if(_0x5af72e===_0x2b87fd)break;else _0x281f09['push'](_0x281f09['shift']());}catch(_0x2d43d1){_0x281f09['push'](_0x281f09['shift']());}}}(a150_0x4ed6,0x6b8e9));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';function a150_0x251a(_0x237bef,_0x1b08b6){_0x237bef=_0x237bef-0x194;const _0x4ed680=a150_0x4ed6();let _0x251af3=_0x4ed680[_0x237bef];return _0x251af3;}function a150_0x4ed6(){const _0x122f1b=['Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','660078sqPDFt','project','Auto-confirm\x20prompts','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','trim','6KVuwwM','string','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','bool','env','project-name','upgrade','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','name','init','\x20workspace\x20init','../../commands/project/create/non-interactive.js','write','yes','App\x20code\x20to\x20initialize','args','10346699EwJRcP','boolean','24hsJsCG','create','Usage:\x20','176955QmQZlb','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','Skip\x20confirmation\x20prompt','4987330epaGEb','14jfqFEc','../../commands/project/create/main.js','2026-07','3344aSwWtx','2106042eREFHn','92qIxUjk','Project\x20name','2353242nCBnqC','str','appcode','cookie'];a150_0x4ed6=function(){return _0x122f1b;};return a150_0x4ed6();}import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a150_0x2725de(0x1ab),'type':'string','description':a150_0x2725de(0x197)},{'name':a150_0x2725de(0x1b7),'type':a150_0x2725de(0x1b4),'description':'Target\x20environment'},{'name':'yes','type':'boolean','description':a150_0x2725de(0x1b0),'default':![]}],createFlags=[{'name':a150_0x2725de(0x1bb),'type':a150_0x2725de(0x1b4),'description':a150_0x2725de(0x1a8)},{'name':'env','type':a150_0x2725de(0x1b4),'description':'Target\x20environment'},{'name':'appcode','type':a150_0x2725de(0x1b4),'description':a150_0x2725de(0x1b1)}],upgradeFlags=[{'name':a150_0x2725de(0x196),'type':a150_0x2725de(0x19a),'description':a150_0x2725de(0x1a0),'default':![]}];export const projectDefinitions=[{'service':a150_0x2725de(0x1af),'command':a150_0x2725de(0x1bc),'description':a150_0x2725de(0x1b5),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a150_0x2725de(0x1bd),'since':a150_0x2725de(0x1a4)},'flags':initFlags,async 'execute'(_0x24ba97){const _0xc6efc5=a150_0x2725de;return await initConfig({'appcode':_0x24ba97[_0xc6efc5(0x1aa)](_0xc6efc5(0x1ab))||undefined,'env':_0x24ba97[_0xc6efc5(0x1aa)](_0xc6efc5(0x1b7))||undefined,'autoYes':_0x24ba97[_0xc6efc5(0x1b6)](_0xc6efc5(0x196))}),{'ok':!![]};}},{'service':'project','command':a150_0x2725de(0x19c),'description':'Create\x20a\x20new\x20project','risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a150_0x2725de(0x1b8),'description':a150_0x2725de(0x19f),'required':![]}],'flags':createFlags,async 'execute'(_0x3d3cfe){const _0xe704df=a150_0x2725de,{createApp:_0x2b095b}=await import(_0xe704df(0x1a3)),{createProjectNonInteractive:_0x3ad812}=await import(_0xe704df(0x194)),_0xc18f04=_0x3d3cfe[_0xe704df(0x1aa)](_0xe704df(0x1bb))[_0xe704df(0x1b2)]()||_0x3d3cfe[_0xe704df(0x198)][0x0]?.[_0xe704df(0x1b2)](),_0x26f0e5=_0x3d3cfe[_0xe704df(0x1aa)](_0xe704df(0x1b7))||undefined,_0x2e7636=_0x3d3cfe[_0xe704df(0x1aa)](_0xe704df(0x1ab))||undefined;if(_0x3d3cfe['nonInteractive']){if(!_0xc18f04)throw CliErrors['validation'](_0xe704df(0x1ba),_0xe704df(0x19d)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x3ad812(_0xc18f04,_0x26f0e5,_0x2e7636,_0x3d3cfe['cookie']);}else await _0x2b095b({'projectCode':_0xc18f04,'appCode':_0x2e7636,'env':_0x26f0e5,'cookie':_0x3d3cfe[_0xe704df(0x1ac)]});return{'ok':!![]};}},{'service':a150_0x2725de(0x1af),'command':a150_0x2725de(0x1b9),'description':a150_0x2725de(0x1ad),'risk':a150_0x2725de(0x195),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x28407e){const _0x563955=a150_0x2725de;return await upgradeApp(_0x28407e['nonInteractive'],{'yes':_0x28407e[_0x563955(0x1b6)](_0x563955(0x196))}),{'ok':!![]};}}];
1
+ const a151_0x1b428b=a151_0x49a3;(function(_0x480fb6,_0x574868){const _0x13d0f3=a151_0x49a3,_0x454cef=_0x480fb6();while(!![]){try{const _0x464aef=-parseInt(_0x13d0f3(0x190))/0x1*(-parseInt(_0x13d0f3(0x180))/0x2)+parseInt(_0x13d0f3(0x17f))/0x3*(-parseInt(_0x13d0f3(0x19f))/0x4)+parseInt(_0x13d0f3(0x1a3))/0x5*(-parseInt(_0x13d0f3(0x19d))/0x6)+parseInt(_0x13d0f3(0x196))/0x7*(-parseInt(_0x13d0f3(0x183))/0x8)+parseInt(_0x13d0f3(0x18c))/0x9+-parseInt(_0x13d0f3(0x193))/0xa*(parseInt(_0x13d0f3(0x1a2))/0xb)+-parseInt(_0x13d0f3(0x17c))/0xc*(-parseInt(_0x13d0f3(0x189))/0xd);if(_0x464aef===_0x574868)break;else _0x454cef['push'](_0x454cef['shift']());}catch(_0x28d59b){_0x454cef['push'](_0x454cef['shift']());}}}(a151_0x3275,0xd957e));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a151_0x49a3(_0x5e234,_0x1acfab){_0x5e234=_0x5e234-0x17b;const _0x32759a=a151_0x3275();let _0x49a349=_0x32759a[_0x5e234];return _0x49a349;}import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a151_0x1b428b(0x1a4),'type':'string','description':'App\x20code\x20to\x20initialize'},{'name':'env','type':a151_0x1b428b(0x17d),'description':a151_0x1b428b(0x192)},{'name':a151_0x1b428b(0x195),'type':a151_0x1b428b(0x19a),'description':a151_0x1b428b(0x1a5),'default':![]}],createFlags=[{'name':a151_0x1b428b(0x1a0),'type':'string','description':a151_0x1b428b(0x181)},{'name':a151_0x1b428b(0x18f),'type':a151_0x1b428b(0x17d),'description':a151_0x1b428b(0x192)},{'name':a151_0x1b428b(0x1a4),'type':'string','description':a151_0x1b428b(0x1a1)}],upgradeFlags=[{'name':'yes','type':a151_0x1b428b(0x19a),'description':a151_0x1b428b(0x185),'default':![]}];export const projectDefinitions=[{'service':'project','command':a151_0x1b428b(0x18a),'description':'Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','risk':a151_0x1b428b(0x1a6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a151_0x1b428b(0x19b),'since':a151_0x1b428b(0x199)},'flags':initFlags,async 'execute'(_0x424ab4){const _0x177fe1=a151_0x1b428b;return await initConfig({'appcode':_0x424ab4[_0x177fe1(0x18b)](_0x177fe1(0x1a4))||undefined,'env':_0x424ab4['str'](_0x177fe1(0x18f))||undefined,'autoYes':_0x424ab4[_0x177fe1(0x19c)](_0x177fe1(0x195))}),{'ok':!![]};}},{'service':a151_0x1b428b(0x17e),'command':a151_0x1b428b(0x19e),'description':a151_0x1b428b(0x186),'risk':a151_0x1b428b(0x1a6),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a151_0x1b428b(0x197),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x272a92){const _0x50577e=a151_0x1b428b,{createApp:_0x2ae993}=await import(_0x50577e(0x182)),{createProjectNonInteractive:_0x5df000}=await import(_0x50577e(0x18e)),_0x2b7652=_0x272a92[_0x50577e(0x18b)](_0x50577e(0x1a0))[_0x50577e(0x188)]()||_0x272a92[_0x50577e(0x187)][0x0]?.['trim'](),_0x47345f=_0x272a92[_0x50577e(0x18b)](_0x50577e(0x18f))||undefined,_0x6e7db6=_0x272a92['str'](_0x50577e(0x1a4))||undefined;if(_0x272a92[_0x50577e(0x184)]){if(!_0x2b7652)throw CliErrors['validation'](_0x50577e(0x198),_0x50577e(0x18d)+CLI_BIN_NAME+_0x50577e(0x17b));await _0x5df000(_0x2b7652,_0x47345f,_0x6e7db6,_0x272a92[_0x50577e(0x194)]);}else await _0x2ae993({'projectCode':_0x2b7652,'appCode':_0x6e7db6,'env':_0x47345f,'cookie':_0x272a92['cookie']});return{'ok':!![]};}},{'service':a151_0x1b428b(0x17e),'command':'upgrade','description':a151_0x1b428b(0x191),'risk':a151_0x1b428b(0x1a6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x277edd){const _0x448549=a151_0x1b428b;return await upgradeApp(_0x277edd['nonInteractive'],{'yes':_0x277edd[_0x448549(0x19c)]('yes')}),{'ok':!![]};}}];function a151_0x3275(){const _0x3cdbd6=['project-name','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','2026-07','boolean','\x20workspace\x20init','bool','712230TvsuYM','create','3863668WeWRPG','name','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','5514245CtlMrG','55dyopSK','appcode','Auto-confirm\x20prompts','write','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','12514416tsoIVu','string','project','3XPrBLc','3177802rTLckz','Project\x20name','../../commands/project/create/main.js','1645408OvZiMo','nonInteractive','Skip\x20confirmation\x20prompt','Create\x20a\x20new\x20project','args','trim','13xMnFcZ','init','str','11134008liJVvQ','Usage:\x20','../../commands/project/create/non-interactive.js','env','1viZOmN','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','Target\x20environment','10rjYqdh','cookie','yes','7VxhuOE'];a151_0x3275=function(){return _0x3cdbd6;};return a151_0x3275();}
@@ -1 +1 @@
1
- (function(_0x3da65a,_0x46c9d4){const _0x48c13d=a151_0x2e2b,_0x4b7caf=_0x3da65a();while(!![]){try{const _0x184c52=parseInt(_0x48c13d(0xbd))/0x1+parseInt(_0x48c13d(0xba))/0x2*(-parseInt(_0x48c13d(0xa8))/0x3)+-parseInt(_0x48c13d(0xbc))/0x4+-parseInt(_0x48c13d(0xbe))/0x5+parseInt(_0x48c13d(0xb6))/0x6*(parseInt(_0x48c13d(0x9f))/0x7)+-parseInt(_0x48c13d(0x99))/0x8*(parseInt(_0x48c13d(0xa2))/0x9)+-parseInt(_0x48c13d(0xca))/0xa*(-parseInt(_0x48c13d(0x98))/0xb);if(_0x184c52===_0x46c9d4)break;else _0x4b7caf['push'](_0x4b7caf['shift']());}catch(_0x1fb717){_0x4b7caf['push'](_0x4b7caf['shift']());}}}(a151_0x3646,0xc7cc8));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a151_0x34f7fc from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';function a151_0x2e2b(_0x50a2c0,_0x4012d0){_0x50a2c0=_0x50a2c0-0x98;const _0x364694=a151_0x3646();let _0x2e2b80=_0x364694[_0x50a2c0];return _0x2e2b80;}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';function a151_0x3646(){const _0x4b6fbe=['string','cyan','.bak','147282Qermiu','.rabetbase.json','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','join','2ihYUui','appcode','6418780BYHOrp','267158CAjVwH','6946060lxToMK','Migration\x20cancelled.\x20Run\x20`','utf8','trim','\x20\x20appcode:\x20','env','Please\x20enter\x20App\x20Code:','?\x20(Old\x20file\x20→\x20*.bak)','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','\x20workspace\x20init`\x20to\x20start\x20fresh.','init','App\x20Code\x20cannot\x20be\x20empty','10560510qCzYll','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','55sksMKS','8179064uLeiOb','1.0.0','log','green','keys','Invalid\x20App\x20Code','259hcKRPI','info','Upgrade\x20it\x20to\x20','9rkJJmH','yellow','version','setLogPath','\x20\x20Apps:\x20','parse','4862958wIOdTh','\x20→\x20.rabetbase.json','apps','✓\x20Upgraded\x20','package.json','gray','\x20\x20Default:\x20','toLocaleString','app','cwd','production'];a151_0x3646=function(){return _0x4b6fbe;};return a151_0x3646();}export async function initConfig(_0x570849){const _0x55c44b=a151_0x2e2b,{appcode:_0x153fef,env:_0x1b8cf6,autoYes:_0x1e319d}=_0x570849,_0x2108c8=process[_0x55c44b(0xb1)]();if(getProjectConfigPath())throw new Error(_0x55c44b(0xb8));let _0x1b3708;for(const _0x3aab01 of LEGACY_CONFIG_NAMES){const _0x2f1e5b=resolve(_0x2108c8,_0x3aab01);if(existsSync(_0x2f1e5b)){_0x1b3708=_0x2f1e5b;break;}}if(_0x1b3708){let _0x2aa5b1={};try{_0x2aa5b1=JSON[_0x55c44b(0xa7)](readFileSync(_0x1b3708,_0x55c44b(0xc0)));}catch{}const _0x904083=basename(_0x1b3708),_0x28c81e=_0x2aa5b1?.[_0x55c44b(0xbb)]||_0x2aa5b1?.['app'];let _0x324bed=_0x1e319d;!_0x1e319d&&(console[_0x55c44b(0x9b)](a151_0x34f7fc[_0x55c44b(0xa3)](_0x55c44b(0xcb)+a151_0x34f7fc['bold'](_0x904083))),_0x28c81e&&console[_0x55c44b(0x9b)](a151_0x34f7fc[_0x55c44b(0xb4)](_0x55c44b(0xc2)+_0x28c81e)),_0x324bed=await confirm({'message':_0x55c44b(0xa1)+a151_0x34f7fc['bold'](_0x55c44b(0xb7))+_0x55c44b(0xc5),'default':!![]}));if(!_0x324bed){console['log'](_0x55c44b(0xbf)+CLI_BIN_NAME+_0x55c44b(0xc7));return;}const _0x17bed5=resolve(_0x2108c8,NEW_CONFIG_NAME),_0x474ca8=getCliVersionFromPkg(),_0x23b43e=readRawConfig(),_0x20a4b8=_0x153fef||(typeof _0x2aa5b1?.[_0x55c44b(0xbb)]===_0x55c44b(0xb3)?_0x2aa5b1[_0x55c44b(0xbb)]:undefined)||(typeof _0x2aa5b1?.[_0x55c44b(0xb0)]==='string'?_0x2aa5b1[_0x55c44b(0xb0)]:undefined)||await askAppcode(),_0xb8f4eb=typeof _0x2aa5b1?.[_0x55c44b(0xc3)]===_0x55c44b(0xb3)?_0x2aa5b1[_0x55c44b(0xc3)]:typeof _0x23b43e[_0x55c44b(0xc3)]===_0x55c44b(0xb3)?_0x23b43e[_0x55c44b(0xc3)]:'production',_0x227202=buildCanonicalProjectConfig({..._0x23b43e,..._0x2aa5b1},{'appCodes':[_0x20a4b8],'env':_0xb8f4eb,'metadata':{'version':_0x474ca8,'migratedAt':new Date()['toLocaleString'](),'migratedFrom':_0x1b3708}});writeConfigFile(_0x17bed5,_0x227202);const _0xe05498=_0x1b3708+_0x55c44b(0xb5);renameSync(_0x1b3708,_0xe05498),logger[_0x55c44b(0xa5)](_0x2108c8),logger[_0x55c44b(0xa0)]('init','从旧配置文件升级成功',{'from':_0x1b3708,'to':_0x17bed5,'appcode':_0x20a4b8,'env':_0x227202[_0x55c44b(0xc3)]}),console[_0x55c44b(0x9b)](a151_0x34f7fc[_0x55c44b(0x9c)](_0x55c44b(0xab)+_0x904083+_0x55c44b(0xa9))),console[_0x55c44b(0x9b)](a151_0x34f7fc[_0x55c44b(0xb4)]('\x20\x20Apps:\x20'+Object[_0x55c44b(0x9d)](_0x227202[_0x55c44b(0xaa)]||{})[_0x55c44b(0xb9)](',\x20'))),console[_0x55c44b(0x9b)](a151_0x34f7fc[_0x55c44b(0xb4)](_0x55c44b(0xae)+_0x227202['defaultApp'])),console[_0x55c44b(0x9b)](a151_0x34f7fc[_0x55c44b(0xad)]('\x20\x20Old\x20file\x20backed\x20up\x20as\x20'+_0x904083+_0x55c44b(0xb5)));return;}const _0x5e443b=_0x153fef||await askAppcode(),_0x4b15ca=resolve(_0x2108c8,NEW_CONFIG_NAME),_0x5bca1b=getCliVersionFromPkg(),_0x53b699=readRawConfig(),_0x55f16e=typeof _0x53b699[_0x55c44b(0xc3)]===_0x55c44b(0xb3)?_0x53b699[_0x55c44b(0xc3)]:undefined,_0x137169=buildCanonicalProjectConfig({},{'appCodes':[_0x5e443b],'env':_0x1b8cf6||_0x55f16e||_0x55c44b(0xb2),'metadata':{'version':_0x5bca1b,'createdAt':new Date()[_0x55c44b(0xaf)]()}});writeConfigFile(_0x4b15ca,_0x137169),logger[_0x55c44b(0xa5)](_0x2108c8),logger[_0x55c44b(0xa0)](_0x55c44b(0xc8),'初始化项目配置文件成功',{'appcode':_0x5e443b,'env':_0x137169['env'],'version':_0x137169[_0x55c44b(0xa4)],'configPath':_0x4b15ca}),console['log'](a151_0x34f7fc[_0x55c44b(0x9c)]('✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory')),console[_0x55c44b(0x9b)](a151_0x34f7fc[_0x55c44b(0xb4)](_0x55c44b(0xa6)+Object[_0x55c44b(0x9d)](_0x137169[_0x55c44b(0xaa)]||{})[_0x55c44b(0xb9)](',\x20'))),console[_0x55c44b(0x9b)](a151_0x34f7fc[_0x55c44b(0xb4)](_0x55c44b(0xae)+_0x137169['defaultApp'])),console[_0x55c44b(0x9b)](_0x55c44b(0xc6)+CLI_BIN_NAME+'\x20api\x20generate\x27\x20and\x20\x27'+CLI_BIN_NAME+'\x20api\x20pull\x27');}function askAppcode(){const _0x4587e1=a151_0x2e2b;return input({'message':_0x4587e1(0xc4),'validate':_0x243d5c=>{const _0xb123ab=_0x4587e1;if(!_0x243d5c[_0xb123ab(0xc1)]())return _0xb123ab(0xc9);const {valid:_0xfac906,message:_0x156616}=validateAppcode(_0x243d5c[_0xb123ab(0xc1)]());return _0xfac906||_0x156616||_0xb123ab(0x9e);}});}function getCliVersionFromPkg(){const _0x41491f=a151_0x2e2b;try{const _0x535290=fileURLToPath(import.meta.url),_0x1371ed=resolve(dirname(_0x535290),'../..'),_0x3f5f00=JSON[_0x41491f(0xa7)](readFileSync(resolve(_0x1371ed,_0x41491f(0xac)),'utf8'));return _0x3f5f00['version']||_0x41491f(0x9a);}catch{return _0x41491f(0x9a);}}
1
+ function a152_0x499b(){const _0x43900c=['1571546GPlcMN','从旧配置文件升级成功','5610805uhcqqN','init','env','app','trim','yellow','.bak','toLocaleString','App\x20Code\x20cannot\x20be\x20empty','8DiVZDQ','info','string','46841000UXHbuL','../..','green','parse','.rabetbase.json','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','defaultApp','\x20→\x20.rabetbase.json','1.0.0','Please\x20enter\x20App\x20Code:','keys','462702EPqRZk','\x20\x20Default:\x20','\x20\x20Apps:\x20','gray','log','utf8','version','Migration\x20cancelled.\x20Run\x20`','join','6UmeUSO','bold','apps','Upgrade\x20it\x20to\x20','package.json','6941361MahXTF','production','cyan','3FFwekZ','3474156zPiFJC','✓\x20Upgraded\x20','Invalid\x20App\x20Code','1600785ZvKdLr','初始化项目配置文件成功','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','?\x20(Old\x20file\x20→\x20*.bak)','appcode'];a152_0x499b=function(){return _0x43900c;};return a152_0x499b();}(function(_0x575665,_0x307708){const _0x16534e=a152_0x343a,_0x2dd7e3=_0x575665();while(!![]){try{const _0x45ac24=-parseInt(_0x16534e(0xbe))/0x1+parseInt(_0x16534e(0xd8))/0x2*(-parseInt(_0x16534e(0xcf))/0x3)+-parseInt(_0x16534e(0xd0))/0x4+-parseInt(_0x16534e(0xda))/0x5*(parseInt(_0x16534e(0xc7))/0x6)+-parseInt(_0x16534e(0xcc))/0x7+parseInt(_0x16534e(0xe3))/0x8*(parseInt(_0x16534e(0xd3))/0x9)+parseInt(_0x16534e(0xe6))/0xa;if(_0x45ac24===_0x307708)break;else _0x2dd7e3['push'](_0x2dd7e3['shift']());}catch(_0x17b19c){_0x2dd7e3['push'](_0x2dd7e3['shift']());}}}(a152_0x499b,0x9a17f));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a152_0x3ee650 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(_0x35a2ad){const _0xb7a659=a152_0x343a,{appcode:_0x44a0ac,env:_0x3bbb94,autoYes:_0x37675a}=_0x35a2ad,_0x3045d9=process['cwd']();if(getProjectConfigPath())throw new Error(_0xb7a659(0xeb));let _0x4f5643;for(const _0xae9a3 of LEGACY_CONFIG_NAMES){const _0x902564=resolve(_0x3045d9,_0xae9a3);if(existsSync(_0x902564)){_0x4f5643=_0x902564;break;}}if(_0x4f5643){let _0x3c7094={};try{_0x3c7094=JSON[_0xb7a659(0xe9)](readFileSync(_0x4f5643,_0xb7a659(0xc3)));}catch{}const _0x4a4613=basename(_0x4f5643),_0x57e9af=_0x3c7094?.['appcode']||_0x3c7094?.[_0xb7a659(0xdd)];let _0x37bda5=_0x37675a;!_0x37675a&&(console['log'](a152_0x3ee650[_0xb7a659(0xdf)]('⚠\x20Found\x20legacy\x20configuration\x20file:\x20'+a152_0x3ee650['bold'](_0x4a4613))),_0x57e9af&&console['log'](a152_0x3ee650[_0xb7a659(0xce)]('\x20\x20appcode:\x20'+_0x57e9af)),_0x37bda5=await confirm({'message':_0xb7a659(0xca)+a152_0x3ee650[_0xb7a659(0xc8)](_0xb7a659(0xea))+_0xb7a659(0xd6),'default':!![]}));if(!_0x37bda5){console[_0xb7a659(0xc2)](_0xb7a659(0xc5)+CLI_BIN_NAME+'\x20workspace\x20init`\x20to\x20start\x20fresh.');return;}const _0x5af158=resolve(_0x3045d9,NEW_CONFIG_NAME),_0x1622dd=getCliVersionFromPkg(),_0x34951d=readRawConfig(),_0x620e8d=_0x44a0ac||(typeof _0x3c7094?.[_0xb7a659(0xd7)]==='string'?_0x3c7094['appcode']:undefined)||(typeof _0x3c7094?.[_0xb7a659(0xdd)]===_0xb7a659(0xe5)?_0x3c7094[_0xb7a659(0xdd)]:undefined)||await askAppcode(),_0x4ba0e1=typeof _0x3c7094?.[_0xb7a659(0xdc)]===_0xb7a659(0xe5)?_0x3c7094[_0xb7a659(0xdc)]:typeof _0x34951d[_0xb7a659(0xdc)]===_0xb7a659(0xe5)?_0x34951d[_0xb7a659(0xdc)]:_0xb7a659(0xcd),_0x3e76ce=buildCanonicalProjectConfig({..._0x34951d,..._0x3c7094},{'appCodes':[_0x620e8d],'env':_0x4ba0e1,'metadata':{'version':_0x1622dd,'migratedAt':new Date()[_0xb7a659(0xe1)](),'migratedFrom':_0x4f5643}});writeConfigFile(_0x5af158,_0x3e76ce);const _0x57cee4=_0x4f5643+_0xb7a659(0xe0);renameSync(_0x4f5643,_0x57cee4),logger['setLogPath'](_0x3045d9),logger[_0xb7a659(0xe4)](_0xb7a659(0xdb),_0xb7a659(0xd9),{'from':_0x4f5643,'to':_0x5af158,'appcode':_0x620e8d,'env':_0x3e76ce['env']}),console[_0xb7a659(0xc2)](a152_0x3ee650[_0xb7a659(0xe8)](_0xb7a659(0xd1)+_0x4a4613+_0xb7a659(0xba))),console[_0xb7a659(0xc2)](a152_0x3ee650['cyan'](_0xb7a659(0xc0)+Object[_0xb7a659(0xbd)](_0x3e76ce[_0xb7a659(0xc9)]||{})[_0xb7a659(0xc6)](',\x20'))),console[_0xb7a659(0xc2)](a152_0x3ee650[_0xb7a659(0xce)](_0xb7a659(0xbf)+_0x3e76ce[_0xb7a659(0xec)])),console[_0xb7a659(0xc2)](a152_0x3ee650[_0xb7a659(0xc1)]('\x20\x20Old\x20file\x20backed\x20up\x20as\x20'+_0x4a4613+'.bak'));return;}const _0x1ef616=_0x44a0ac||await askAppcode(),_0x489d1e=resolve(_0x3045d9,NEW_CONFIG_NAME),_0x2a7a2b=getCliVersionFromPkg(),_0x7e45e7=readRawConfig(),_0x4651c9=typeof _0x7e45e7[_0xb7a659(0xdc)]===_0xb7a659(0xe5)?_0x7e45e7[_0xb7a659(0xdc)]:undefined,_0x2e6ae0=buildCanonicalProjectConfig({},{'appCodes':[_0x1ef616],'env':_0x3bbb94||_0x4651c9||_0xb7a659(0xcd),'metadata':{'version':_0x2a7a2b,'createdAt':new Date()[_0xb7a659(0xe1)]()}});writeConfigFile(_0x489d1e,_0x2e6ae0),logger['setLogPath'](_0x3045d9),logger[_0xb7a659(0xe4)]('init',_0xb7a659(0xd4),{'appcode':_0x1ef616,'env':_0x2e6ae0[_0xb7a659(0xdc)],'version':_0x2e6ae0[_0xb7a659(0xc4)],'configPath':_0x489d1e}),console[_0xb7a659(0xc2)](a152_0x3ee650[_0xb7a659(0xe8)]('✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory')),console[_0xb7a659(0xc2)](a152_0x3ee650[_0xb7a659(0xce)](_0xb7a659(0xc0)+Object[_0xb7a659(0xbd)](_0x2e6ae0[_0xb7a659(0xc9)]||{})[_0xb7a659(0xc6)](',\x20'))),console[_0xb7a659(0xc2)](a152_0x3ee650[_0xb7a659(0xce)](_0xb7a659(0xbf)+_0x2e6ae0[_0xb7a659(0xec)])),console[_0xb7a659(0xc2)](_0xb7a659(0xd5)+CLI_BIN_NAME+'\x20api\x20generate\x27\x20and\x20\x27'+CLI_BIN_NAME+'\x20api\x20pull\x27');}function a152_0x343a(_0x230543,_0x2d7fc5){_0x230543=_0x230543-0xba;const _0x499b6c=a152_0x499b();let _0x343ac2=_0x499b6c[_0x230543];return _0x343ac2;}function askAppcode(){const _0x34476c=a152_0x343a;return input({'message':_0x34476c(0xbc),'validate':_0x4d0909=>{const _0x4c974f=_0x34476c;if(!_0x4d0909[_0x4c974f(0xde)]())return _0x4c974f(0xe2);const {valid:_0xacc668,message:_0x2d4855}=validateAppcode(_0x4d0909['trim']());return _0xacc668||_0x2d4855||_0x4c974f(0xd2);}});}function getCliVersionFromPkg(){const _0x3a38b1=a152_0x343a;try{const _0x1de252=fileURLToPath(import.meta.url),_0x77043=resolve(dirname(_0x1de252),_0x3a38b1(0xe7)),_0x677b97=JSON[_0x3a38b1(0xe9)](readFileSync(resolve(_0x77043,_0x3a38b1(0xcb)),_0x3a38b1(0xc3)));return _0x677b97[_0x3a38b1(0xc4)]||_0x3a38b1(0xbb);}catch{return _0x3a38b1(0xbb);}}
@@ -1 +1 @@
1
- (function(_0x46e4a3,_0x3eaeb1){const _0x5138b0=a152_0x372a,_0x3e365c=_0x46e4a3();while(!![]){try{const _0x211288=-parseInt(_0x5138b0(0xc3))/0x1*(-parseInt(_0x5138b0(0xbf))/0x2)+parseInt(_0x5138b0(0x9f))/0x3*(parseInt(_0x5138b0(0xe5))/0x4)+-parseInt(_0x5138b0(0xdd))/0x5*(parseInt(_0x5138b0(0x7c))/0x6)+parseInt(_0x5138b0(0x93))/0x7*(-parseInt(_0x5138b0(0xb4))/0x8)+-parseInt(_0x5138b0(0x96))/0x9*(-parseInt(_0x5138b0(0xe3))/0xa)+parseInt(_0x5138b0(0xbc))/0xb*(-parseInt(_0x5138b0(0x9c))/0xc)+parseInt(_0x5138b0(0xc1))/0xd*(parseInt(_0x5138b0(0xa1))/0xe);if(_0x211288===_0x3eaeb1)break;else _0x3e365c['push'](_0x3e365c['shift']());}catch(_0x183a6b){_0x3e365c['push'](_0x3e365c['shift']());}}}(a152_0xf7d8,0x70fad));import a152_0x409791 from'chalk';import a152_0x529bab from'ora';function a152_0x372a(_0x508130,_0x3c9e5e){_0x508130=_0x508130-0x70;const _0xf7d8e4=a152_0xf7d8();let _0x372aa4=_0xf7d8e4[_0x508130];return _0x372aa4;}function a152_0xf7d8(){const _0x2306b2=['latest','not\x20found\x20(will\x20create)','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','===\x20Upgrade\x20Analysis\x20===','detail','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','args','lovrabet/rabetbase\x20installed\x20globally','failed','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','yes','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','\x20→\x20keys:\x20','48sgoWpY','mcpServers','none\x20found','undefined','stringify','Skill\x20swap:','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','bold','error','\x20removed\x20(','status','keys','\x20\x20npm\x20install','Config\x20migration','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','white','@lovrabet/sdk:','inherit','filter','Config\x20file:','\x20\x20Step\x20','gray','7whgHuc','FOUND','Step\x204/7:\x20MCP\x20config\x20—\x20','414myoEPz','entries','FAIL','\x20from\x20','\x20\x20New\x20config\x20(.rabetbase.json):\x20','push','9744HWZeLo','Step\x204/7:\x20Cleaning\x20MCP\x20config...','.cursor/rules/lovrabet_rules.mdc','3IeKMwm','lovrabet/rabetbase','28jiTCIG','utf8','needed','hasNewConfig','\x20\x20\x20\x20\x20\x20\x20','oldMcpConfig','red','some','skipped\x20(no\x20legacy\x20config)','needsSkillSwap','isArray','oldArtifacts','skipped','already\x20exists\x20(will\x20merge)','object','join','package.json','@lovrabet/sdk','Upgrade\x20@lovrabet/sdk','3156688GqCkbf','.claude/skills/lovrabet','step','\x20\x20#\x20or','values','path','info','Clean\x20MCP\x20config','5203fFZZdK','done','not\x20found\x20or\x20already\x20at\x20latest','32EooehF','[\x22@lovrabet/sdk\x22]:\x20','182767exGWGn','fail','40427WbwAnD','message','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','string','no\x20legacy\x20entry','log','Remove\x20.lovrabet/','start','succeed','yellow','.lovrabet','green','configMigration','cyan','Step\x206/7:\x20Installing\x20new\x20skill...','===\x20Upgrade\x20Summary\x20===','\x20\x20Action:\x20delete','parse','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','oldPath','MCP\x20config:','cwd','Legacy\x20artifacts:','\x20→\x20latest','.bak','176080Cbufkc','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','\x20(backup:\x20','Remove\x20old\x20skill','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','69670fFdbae','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','2110892weDANL','files','label','\x20\x20Fields\x20to\x20migrate:\x20','Upgrade\x20cancelled.','removed\x20','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','Step\x201/7:\x20Migrating\x20config...','isDirectory','@lovrabet/dataset-mcp-server','length','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','no\x20legacy\x20config\x20found','no\x20matching\x20entry\x20found','\x20\x20Current\x20version\x20in\x20','CANCEL','Remove\x20legacy\x20artifacts','Step\x205/7:\x20Removing\x20old\x20skill...','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','Upgrade\x20completed\x20successfully!','\x20removed','sdkUpgrade'];a152_0xf7d8=function(){return _0x2306b2;};return a152_0xf7d8();}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['filter'](_0x3e1847=>_0x3e1847!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0xe7d6be){const _0x2bba22=a152_0x372a,_0x487cb7=[];for(const _0x561a4b of Object[_0x2bba22(0xb8)](CORE_IDE_CONFIGS)){if(_0x561a4b[_0x2bba22(0xe6)])for(const _0x4ecca8 of _0x561a4b[_0x2bba22(0xe6)]){_0x487cb7[_0x2bba22(0x9b)](resolve(_0xe7d6be,_0x4ecca8['path']));}}return _0x487cb7;}function analyse(_0x6a6278){const _0x3c459c=a152_0x372a;let _0x57971d=null;const _0x2f51a7=resolve(_0x6a6278,NEW_CONFIG_NAME),_0x4aab94=existsSync(_0x2f51a7);for(const _0x4a04f2 of LEGACY_CONFIG_NAMES){const _0x6a65ba=resolve(_0x6a6278,_0x4a04f2);if(existsSync(_0x6a65ba)){const _0x22d670=readConfigFile(_0x6a65ba),_0x131c86=Object[_0x3c459c(0x87)](_0x22d670)[_0x3c459c(0x8f)](_0x557b2d=>typeof _0x22d670[_0x557b2d]!==_0x3c459c(0x7f));_0x57971d={'oldPath':_0x6a65ba,'hasNewConfig':_0x4aab94,'fields':_0x131c86};break;}}const _0x1f8fcd=[],_0x3716ad=resolve(_0x6a6278,_0x3c459c(0xcd));if(existsSync(_0x3716ad))_0x1f8fcd[_0x3c459c(0x9b)](_0x3716ad);const _0x184d61=resolve(_0x6a6278,_0x3c459c(0x9e));if(existsSync(_0x184d61))_0x1f8fcd[_0x3c459c(0x9b)](_0x184d61);const _0x220073=resolve(_0x6a6278,_0x3c459c(0xb5));if(existsSync(_0x220073))_0x1f8fcd[_0x3c459c(0x9b)](_0x220073);for(const _0x1a6068 of collectIdeSkillFiles(_0x6a6278)){if(existsSync(_0x1a6068))_0x1f8fcd[_0x3c459c(0x9b)](_0x1a6068);}let _0x10b3d8=null;const _0x487ee1=resolve(_0x6a6278,'.cursor/mcp.json');if(existsSync(_0x487ee1))try{const _0x7a5707=JSON[_0x3c459c(0xd4)](readFileSync(_0x487ee1,_0x3c459c(0xa2)));if(_0x7a5707?.[_0x3c459c(0x7d)]&&typeof _0x7a5707[_0x3c459c(0x7d)]==='object'){const _0x36c219=[];for(const [_0x446661,_0x3893fd]of Object[_0x3c459c(0x97)](_0x7a5707[_0x3c459c(0x7d)])){const _0x1bc0bb=_0x3893fd;_0x1bc0bb?.[_0x3c459c(0x75)]&&Array[_0x3c459c(0xab)](_0x1bc0bb[_0x3c459c(0x75)])&&_0x1bc0bb[_0x3c459c(0x75)]['some'](_0x186e2e=>typeof _0x186e2e===_0x3c459c(0xc6)&&_0x186e2e['includes'](_0x3c459c(0xee)))&&_0x36c219[_0x3c459c(0x9b)](_0x446661);}_0x36c219[_0x3c459c(0xef)]>0x0&&(_0x10b3d8={'path':_0x487ee1,'keys':_0x36c219});}}catch{}const _0x58b31e=_0x1f8fcd[_0x3c459c(0xef)]>0x0||_0x57971d!==null;let _0x59c869=null;const _0x120934=resolve(_0x6a6278,_0x3c459c(0xb1));if(existsSync(_0x120934))try{const _0x3e0659=JSON[_0x3c459c(0xd4)](readFileSync(_0x120934,_0x3c459c(0xa2)));for(const _0x41acf5 of['dependencies','devDependencies']){const _0x20bb91=_0x3e0659?.[_0x41acf5]?.['@lovrabet/sdk'];if(typeof _0x20bb91===_0x3c459c(0xc6)){_0x20bb91!==_0x3c459c(0xfb)&&(_0x59c869={'pkgPath':_0x120934,'currentVersion':_0x20bb91,'field':_0x41acf5});break;}}}catch{}return{'configMigration':_0x57971d,'oldArtifacts':_0x1f8fcd,'oldMcpConfig':_0x10b3d8,'needsSkillSwap':_0x58b31e,'sdkUpgrade':_0x59c869};}function printReport(_0x879684){const _0x4ce5bb=a152_0x372a,{configMigration:_0x2eb345,oldArtifacts:_0x114cdc,oldMcpConfig:_0x2c23f4,needsSkillSwap:_0x2df0d}=_0x879684;console['log'](''),console[_0x4ce5bb(0xc8)](a152_0x409791[_0x4ce5bb(0x83)](_0x4ce5bb(0x72))),console[_0x4ce5bb(0xc8)]('');_0x2eb345?(console[_0x4ce5bb(0xc8)](a152_0x409791[_0x4ce5bb(0xd0)](_0x4ce5bb(0x90))+('\x20\x20'+a152_0x409791[_0x4ce5bb(0xcc)](_0x2eb345[_0x4ce5bb(0xd7)]))),console[_0x4ce5bb(0xc8)](_0x4ce5bb(0x9a)+(_0x2eb345['hasNewConfig']?a152_0x409791['green'](_0x4ce5bb(0xae)):a152_0x409791['gray'](_0x4ce5bb(0x70)))),console['log'](_0x4ce5bb(0xe8)+_0x2eb345['fields'][_0x4ce5bb(0xb0)](',\x20')),console[_0x4ce5bb(0xc8)](_0x4ce5bb(0x78))):console[_0x4ce5bb(0xc8)](a152_0x409791['cyan'](_0x4ce5bb(0x90))+'\x20\x20'+a152_0x409791[_0x4ce5bb(0x92)](_0x4ce5bb(0xf1)));console['log']('');if(_0x114cdc[_0x4ce5bb(0xef)]>0x0){console[_0x4ce5bb(0xc8)](a152_0x409791['cyan'](_0x4ce5bb(0xda)));for(const _0x4e8e79 of _0x114cdc){console[_0x4ce5bb(0xc8)]('\x20\x20'+a152_0x409791[_0x4ce5bb(0xa7)](_0x4ce5bb(0x94))+'\x20\x20'+_0x4e8e79);}console[_0x4ce5bb(0xc8)](_0x4ce5bb(0xd3));}else console[_0x4ce5bb(0xc8)](a152_0x409791[_0x4ce5bb(0xd0)](_0x4ce5bb(0xda))+'\x20\x20'+a152_0x409791[_0x4ce5bb(0x92)](_0x4ce5bb(0x7e)));console[_0x4ce5bb(0xc8)]('');_0x2c23f4?(console[_0x4ce5bb(0xc8)](a152_0x409791[_0x4ce5bb(0xd0)](_0x4ce5bb(0xd8))+('\x20\x20'+a152_0x409791[_0x4ce5bb(0xcc)](_0x2c23f4['path'])+_0x4ce5bb(0x7b)+_0x2c23f4['keys']['join'](',\x20'))),console['log'](_0x4ce5bb(0xc5))):console[_0x4ce5bb(0xc8)](a152_0x409791[_0x4ce5bb(0xd0)]('MCP\x20config:')+'\x20\x20'+a152_0x409791['gray'](_0x4ce5bb(0xc7)));console[_0x4ce5bb(0xc8)](''),console['log'](a152_0x409791[_0x4ce5bb(0xd0)](_0x4ce5bb(0x81))+('\x20\x20'+(_0x2df0d?a152_0x409791[_0x4ce5bb(0xcc)](_0x4ce5bb(0xa3)):a152_0x409791[_0x4ce5bb(0xce)]('not\x20needed'))));_0x2df0d&&console[_0x4ce5bb(0xc8)](_0x4ce5bb(0xd5)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x4ce5bb(0xc8)]('');if(_0x879684[_0x4ce5bb(0xfa)]){const {currentVersion:_0x1c25c2,field:_0x4c0bdc,pkgPath:_0x21ae05}=_0x879684[_0x4ce5bb(0xfa)];console[_0x4ce5bb(0xc8)](a152_0x409791['cyan'](_0x4ce5bb(0x8d))+('\x20\x20'+a152_0x409791[_0x4ce5bb(0xcc)](_0x21ae05))),console[_0x4ce5bb(0xc8)](_0x4ce5bb(0xf3)+_0x4c0bdc+':\x20'+a152_0x409791[_0x4ce5bb(0xcc)](_0x1c25c2)+'\x20→\x20'+a152_0x409791['green'](_0x4ce5bb(0xfb))),console[_0x4ce5bb(0xc8)](_0x4ce5bb(0xd6));}else console[_0x4ce5bb(0xc8)](a152_0x409791['cyan'](_0x4ce5bb(0x8d))+'\x20\x20'+a152_0x409791[_0x4ce5bb(0x92)](_0x4ce5bb(0xbe)));console[_0x4ce5bb(0xc8)]('');}function execConfigMigration(_0x5d0e16,_0x6f995){const _0x7cb939=a152_0x372a,{configMigration:_0x550778}=_0x5d0e16;if(!_0x550778?.[_0x7cb939(0xd7)])return{'step':0x1,'label':_0x7cb939(0x89),'ok':!![],'detail':_0x7cb939(0xa9)};const _0x2bf5ef=readConfigFile(_0x550778[_0x7cb939(0xd7)]),_0x216819=resolve(_0x6f995,NEW_CONFIG_NAME),_0xf73fdb=_0x550778[_0x7cb939(0xa4)]?readConfigFile(_0x216819):{};for(const [_0x857c6b,_0x590f7f]of Object['entries'](_0x2bf5ef)){!(_0x857c6b in _0xf73fdb)&&(_0xf73fdb[_0x857c6b]=_0x590f7f);}writeConfigFile(_0x216819,_0xf73fdb);const _0x2f636f=_0x550778['oldPath']+_0x7cb939(0xdc);return renameSync(_0x550778['oldPath'],_0x2f636f),{'step':0x1,'label':_0x7cb939(0x89),'ok':!![],'detail':_0x550778[_0x7cb939(0xd7)]+'\x20→\x20'+_0x216819+_0x7cb939(0xe0)+_0x2f636f+')'};}function execRemoveOldArtifacts(_0x1a87d5){const _0x25f35f=a152_0x372a,_0x188185=[];for(const _0x2c8710 of _0x1a87d5){try{if(!existsSync(_0x2c8710))continue;const _0x5c24d2=tryStat(_0x2c8710);_0x5c24d2?.[_0x25f35f(0xed)]()?rmSync(_0x2c8710,{'recursive':!![],'force':!![]}):unlinkSync(_0x2c8710);}catch(_0x193700){_0x188185['push'](_0x2c8710+':\x20'+_0x193700[_0x25f35f(0xc4)]);}}return{'step':0x3,'label':_0x25f35f(0xf5),'ok':_0x188185[_0x25f35f(0xef)]===0x0,'detail':_0x188185[_0x25f35f(0xef)]>0x0?_0x1a87d5[_0x25f35f(0xef)]-_0x188185['length']+'/'+_0x1a87d5['length']+_0x25f35f(0x85)+_0x188185[_0x25f35f(0xb0)](';\x20')+')':_0x1a87d5[_0x25f35f(0xef)]+_0x25f35f(0xf9)};}function execCleanMcp(_0x2b41b4){const _0x2fc2a7=a152_0x372a;if(!_0x2b41b4[_0x2fc2a7(0xa6)])return{'step':0x4,'label':_0x2fc2a7(0xbb),'ok':!![],'detail':_0x2fc2a7(0xad)};try{const _0x228f53=readFileSync(_0x2b41b4[_0x2fc2a7(0xa6)][_0x2fc2a7(0xb9)],_0x2fc2a7(0xa2)),_0x12d184=JSON[_0x2fc2a7(0xd4)](_0x228f53);if(_0x12d184?.[_0x2fc2a7(0x7d)]&&typeof _0x12d184[_0x2fc2a7(0x7d)]===_0x2fc2a7(0xaf)){const _0x43f3f2=[];for(const [_0x302f71,_0x263cb0]of Object[_0x2fc2a7(0x97)](_0x12d184[_0x2fc2a7(0x7d)])){_0x263cb0?.[_0x2fc2a7(0x75)]&&Array['isArray'](_0x263cb0[_0x2fc2a7(0x75)])&&_0x263cb0[_0x2fc2a7(0x75)]['some'](_0xda61da=>typeof _0xda61da===_0x2fc2a7(0xc6)&&_0xda61da['includes'](_0x2fc2a7(0xee)))&&_0x43f3f2[_0x2fc2a7(0x9b)](_0x302f71);}for(const _0x1f18ff of _0x43f3f2){delete _0x12d184['mcpServers'][_0x1f18ff];}return _0x43f3f2[_0x2fc2a7(0xef)]>0x0&&writeFileSync(_0x2b41b4[_0x2fc2a7(0xa6)][_0x2fc2a7(0xb9)],JSON[_0x2fc2a7(0x80)](_0x12d184,null,0x2)+'\x0a',_0x2fc2a7(0xa2)),{'step':0x4,'label':_0x2fc2a7(0xbb),'ok':!![],'detail':_0x2fc2a7(0xea)+_0x43f3f2[_0x2fc2a7(0xb0)](',\x20')+_0x2fc2a7(0x99)+_0x2b41b4['oldMcpConfig'][_0x2fc2a7(0xb9)]};}return{'step':0x4,'label':_0x2fc2a7(0xbb),'ok':!![],'detail':_0x2fc2a7(0xf2)};}catch(_0x55c507){return{'step':0x4,'label':_0x2fc2a7(0xbb),'ok':![],'detail':_0x55c507[_0x2fc2a7(0xc4)]};}}function execSkillsRemove(_0x53d0fc,_0x2cb861){const _0x3c0f62=a152_0x372a,_0x26aeb7=runNpxSkillsRemove(_0x53d0fc,{'stdio':_0x3c0f62(0x8e),'yes':_0x2cb861});return{'step':0x5,'label':_0x3c0f62(0xe1),'ok':_0x26aeb7['ok'],'detail':_0x26aeb7['ok']?'lovrabet/lovrabet-skill\x20removed':_0x26aeb7[_0x3c0f62(0x84)]??'exit\x20'+_0x26aeb7['status']};}function execSkillsAdd(_0x48644d,_0x1632e4){const _0x5a67f5=a152_0x372a,_0x38ba53=runNpxSkillsAddGlobal(_0x48644d,_0x5a67f5(0xa0),{'stdio':_0x5a67f5(0x8e),'yes':_0x1632e4});return{'step':0x6,'label':'Install\x20new\x20skill','ok':_0x38ba53['ok'],'detail':_0x38ba53['ok']?_0x5a67f5(0x76):_0x38ba53[_0x5a67f5(0x84)]??'exit\x20'+_0x38ba53[_0x5a67f5(0x86)]};}function execUpgradeSdk(_0x144b69){const _0x5edbeb=a152_0x372a;if(!_0x144b69['sdkUpgrade'])return{'step':0x7,'label':_0x5edbeb(0xb3),'ok':!![],'detail':_0x5edbeb(0xe4)};const {pkgPath:_0xcf0c61,currentVersion:_0x463aff,field:_0x1a899a}=_0x144b69[_0x5edbeb(0xfa)];try{const _0x1b8817=readFileSync(_0xcf0c61,_0x5edbeb(0xa2)),_0x4a5042=JSON[_0x5edbeb(0xd4)](_0x1b8817);return _0x4a5042[_0x1a899a][_0x5edbeb(0xb2)]='latest',writeFileSync(_0xcf0c61,JSON[_0x5edbeb(0x80)](_0x4a5042,null,0x2)+'\x0a',_0x5edbeb(0xa2)),{'step':0x7,'label':_0x5edbeb(0xb3),'ok':!![],'detail':_0x1a899a+_0x5edbeb(0xc0)+_0x463aff+_0x5edbeb(0xdb)};}catch(_0xff0316){return{'step':0x7,'label':_0x5edbeb(0xb3),'ok':![],'detail':_0xff0316['message']};}}function tryStat(_0x248ebf){try{return statSync(_0x248ebf);}catch{return undefined;}}function printSummary(_0x471d1f){const _0x3d9cf2=a152_0x372a;console[_0x3d9cf2(0xc8)](''),console[_0x3d9cf2(0xc8)](a152_0x409791[_0x3d9cf2(0x83)](_0x3d9cf2(0xd2))),console[_0x3d9cf2(0xc8)]('');for(const _0x38810c of _0x471d1f){const _0xe6fbe=_0x38810c['ok']?a152_0x409791['green']('OK'):a152_0x409791['red'](_0x3d9cf2(0x98));console[_0x3d9cf2(0xc8)]('\x20\x20'+_0xe6fbe+_0x3d9cf2(0x91)+_0x38810c[_0x3d9cf2(0xb6)]+':\x20'+_0x38810c[_0x3d9cf2(0xe7)]);if(_0x38810c['detail'])console[_0x3d9cf2(0xc8)](_0x3d9cf2(0xa5)+a152_0x409791[_0x3d9cf2(0x92)](_0x38810c[_0x3d9cf2(0x73)]));}console[_0x3d9cf2(0xc8)]('');}export async function upgradeApp(_0x4a7a63,_0x152404){const _0x52325b=a152_0x372a,_0x43f379=process[_0x52325b(0xd9)](),_0x5806ae=analyse(_0x43f379),_0x30c753=!_0x5806ae[_0x52325b(0xcf)]&&_0x5806ae['oldArtifacts'][_0x52325b(0xef)]===0x0&&!_0x5806ae[_0x52325b(0xa6)]&&!_0x5806ae[_0x52325b(0xaa)]&&!_0x5806ae[_0x52325b(0xfa)];if(_0x30c753){console[_0x52325b(0xc8)](a152_0x409791[_0x52325b(0xce)](_0x52325b(0xf0)));return;}printReport(_0x5806ae);const _0x512d76=!!(_0x152404[_0x52325b(0x79)]||_0x152404['Y']||_0x4a7a63);if(!_0x512d76)try{const _0x32b174=await askConfirm('Proceed\x20with\x20upgrade?');if(!_0x32b174){console['log'](a152_0x409791['gray'](_0x52325b(0xe9)));return;}}catch(_0x2dad9d){if(_0x2dad9d?.['message']===_0x52325b(0xf4)){console[_0x52325b(0xc8)](a152_0x409791[_0x52325b(0x92)](_0x52325b(0xe9)));return;}throw _0x2dad9d;}const _0x56cad5=[],_0x337ce5=a152_0x529bab({'text':_0x52325b(0xec),'color':_0x52325b(0xd0)})[_0x52325b(0xca)](),_0x5b7487=execConfigMigration(_0x5806ae,_0x43f379);_0x56cad5[_0x52325b(0x9b)](_0x5b7487),_0x337ce5[_0x5b7487['ok']?_0x52325b(0xcb):_0x52325b(0xc2)]('Step\x201/7:\x20Config\x20migration\x20—\x20'+(_0x5b7487[_0x52325b(0x73)]??(_0x5b7487['ok']?_0x52325b(0xbd):'failed')));const _0x1e6367=resolve(_0x43f379,_0x52325b(0xcd)),_0x1b766e=a152_0x529bab({'text':_0x52325b(0x74),'color':'cyan'})['start']();if(existsSync(_0x1e6367))try{rmSync(_0x1e6367,{'recursive':!![],'force':!![]}),_0x1b766e[_0x52325b(0xcb)](_0x52325b(0x8a)),_0x56cad5[_0x52325b(0x9b)]({'step':0x2,'label':_0x52325b(0xc9),'ok':!![]});}catch(_0x1a35aa){_0x1b766e[_0x52325b(0xc2)](_0x52325b(0xeb)+_0x1a35aa[_0x52325b(0xc4)]),_0x56cad5[_0x52325b(0x9b)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':![],'detail':_0x1a35aa[_0x52325b(0xc4)]});}else _0x1b766e[_0x52325b(0xba)](_0x52325b(0x8b)),_0x56cad5[_0x52325b(0x9b)]({'step':0x2,'label':_0x52325b(0xc9),'ok':!![],'detail':'skipped'});const _0xe74b25=a152_0x529bab({'text':'Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','color':'cyan'})[_0x52325b(0xca)](),_0x14021b=execRemoveOldArtifacts(_0x5806ae[_0x52325b(0xac)]);_0x56cad5[_0x52325b(0x9b)](_0x14021b),_0xe74b25[_0x14021b['ok']?'succeed':'fail'](_0x52325b(0x7a)+(_0x14021b[_0x52325b(0x73)]??(_0x14021b['ok']?_0x52325b(0xbd):'failed')));const _0x47fabf=a152_0x529bab({'text':_0x52325b(0x9d),'color':_0x52325b(0xd0)})[_0x52325b(0xca)](),_0x44e417=execCleanMcp(_0x5806ae);_0x56cad5['push'](_0x44e417),_0x47fabf[_0x44e417['ok']?'succeed':_0x52325b(0xc2)](_0x52325b(0x95)+(_0x44e417[_0x52325b(0x73)]??(_0x44e417['ok']?_0x52325b(0xbd):_0x52325b(0x77))));const _0x54961a=a152_0x529bab({'text':_0x52325b(0xf6),'color':_0x52325b(0xd0)})[_0x52325b(0xca)](),_0x23651f=execSkillsRemove(_0x43f379,_0x512d76);_0x56cad5[_0x52325b(0x9b)](_0x23651f),_0x54961a[_0x23651f['ok']?_0x52325b(0xcb):_0x52325b(0xc2)](_0x52325b(0xdf)+(_0x23651f[_0x52325b(0x73)]??(_0x23651f['ok']?'done':'failed')));const _0x153c59=a152_0x529bab({'text':_0x52325b(0xd1),'color':_0x52325b(0xd0)})[_0x52325b(0xca)](),_0x45986a=execSkillsAdd(_0x43f379,_0x512d76);_0x56cad5[_0x52325b(0x9b)](_0x45986a),_0x153c59[_0x45986a['ok']?_0x52325b(0xcb):_0x52325b(0xc2)](_0x52325b(0xf7)+(_0x45986a['detail']??(_0x45986a['ok']?_0x52325b(0xbd):'failed')));const _0x3be9c2=a152_0x529bab({'text':_0x52325b(0x71),'color':'cyan'})[_0x52325b(0xca)](),_0x662423=execUpgradeSdk(_0x5806ae);_0x56cad5['push'](_0x662423),_0x3be9c2[_0x662423['ok']?_0x52325b(0xcb):_0x52325b(0xc2)](_0x52325b(0xde)+(_0x662423[_0x52325b(0x73)]??(_0x662423['ok']?'done':'failed'))),printSummary(_0x56cad5);const _0x161905=_0x56cad5[_0x52325b(0xa8)](_0x29a6ad=>!_0x29a6ad['ok']);_0x161905?console[_0x52325b(0xc8)](a152_0x409791[_0x52325b(0xcc)](_0x52325b(0xe2))):console['log'](a152_0x409791[_0x52325b(0xce)](_0x52325b(0xf8))),_0x662423['ok']&&_0x5806ae[_0x52325b(0xfa)]&&(console[_0x52325b(0xc8)](''),console[_0x52325b(0xc8)](a152_0x409791[_0x52325b(0x83)][_0x52325b(0xd0)](_0x52325b(0x82))),console[_0x52325b(0xc8)](a152_0x409791[_0x52325b(0xd0)]('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x52325b(0xc8)](''),console['log'](a152_0x409791[_0x52325b(0x8c)](_0x52325b(0x88))),console[_0x52325b(0xc8)](a152_0x409791[_0x52325b(0x8c)](_0x52325b(0xb7))),console[_0x52325b(0xc8)](a152_0x409791[_0x52325b(0x8c)]('\x20\x20bun\x20install')),console['log'](''));}
1
+ (function(_0x137b80,_0x1b9fd6){const _0xf99e6a=a153_0xceae,_0x2a170f=_0x137b80();while(!![]){try{const _0xb97df9=parseInt(_0xf99e6a(0x10f))/0x1+-parseInt(_0xf99e6a(0x13b))/0x2*(-parseInt(_0xf99e6a(0x149))/0x3)+parseInt(_0xf99e6a(0x170))/0x4*(parseInt(_0xf99e6a(0x13c))/0x5)+-parseInt(_0xf99e6a(0x165))/0x6*(parseInt(_0xf99e6a(0x12f))/0x7)+parseInt(_0xf99e6a(0x152))/0x8+-parseInt(_0xf99e6a(0x18a))/0x9+parseInt(_0xf99e6a(0x14a))/0xa;if(_0xb97df9===_0x1b9fd6)break;else _0x2a170f['push'](_0x2a170f['shift']());}catch(_0x13dc3f){_0x2a170f['push'](_0x2a170f['shift']());}}}(a153_0x3e9f,0x262b6));import a153_0x895096 from'chalk';import a153_0x31d6bd 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';function a153_0xceae(_0x23ad7a,_0x1f79d2){_0x23ad7a=_0x23ad7a-0x10e;const _0x3e9f6f=a153_0x3e9f();let _0xceae1e=_0x3e9f6f[_0x23ad7a];return _0xceae1e;}const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0x5f5876=>_0x5f5876!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0xb38e46){const _0x302c90=a153_0xceae,_0x313b47=[];for(const _0x207421 of Object[_0x302c90(0x180)](CORE_IDE_CONFIGS)){if(_0x207421['files'])for(const _0x496a78 of _0x207421[_0x302c90(0x15c)]){_0x313b47[_0x302c90(0x142)](resolve(_0xb38e46,_0x496a78[_0x302c90(0x17f)]));}}return _0x313b47;}function analyse(_0x5033c8){const _0x559b66=a153_0xceae;let _0x23cade=null;const _0x5cca36=resolve(_0x5033c8,NEW_CONFIG_NAME),_0x1c75e7=existsSync(_0x5cca36);for(const _0x288164 of LEGACY_CONFIG_NAMES){const _0x50ddc9=resolve(_0x5033c8,_0x288164);if(existsSync(_0x50ddc9)){const _0x3c995e=readConfigFile(_0x50ddc9),_0x4b8c39=Object[_0x559b66(0x179)](_0x3c995e)[_0x559b66(0x11b)](_0x612ef8=>typeof _0x3c995e[_0x612ef8]!==_0x559b66(0x18d));_0x23cade={'oldPath':_0x50ddc9,'hasNewConfig':_0x1c75e7,'fields':_0x4b8c39};break;}}const _0x4443a0=[],_0x15bc7d=resolve(_0x5033c8,'.lovrabet');if(existsSync(_0x15bc7d))_0x4443a0[_0x559b66(0x142)](_0x15bc7d);const _0x24ec65=resolve(_0x5033c8,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x24ec65))_0x4443a0[_0x559b66(0x142)](_0x24ec65);const _0x954260=resolve(_0x5033c8,_0x559b66(0x13e));if(existsSync(_0x954260))_0x4443a0[_0x559b66(0x142)](_0x954260);for(const _0x1b6fad of collectIdeSkillFiles(_0x5033c8)){if(existsSync(_0x1b6fad))_0x4443a0[_0x559b66(0x142)](_0x1b6fad);}let _0x440f7b=null;const _0x23800e=resolve(_0x5033c8,_0x559b66(0x148));if(existsSync(_0x23800e))try{const _0x18b337=JSON[_0x559b66(0x144)](readFileSync(_0x23800e,_0x559b66(0x167)));if(_0x18b337?.[_0x559b66(0x15f)]&&typeof _0x18b337['mcpServers']===_0x559b66(0x14b)){const _0x464047=[];for(const [_0x5fcc85,_0x968fc0]of Object[_0x559b66(0x10e)](_0x18b337[_0x559b66(0x15f)])){const _0x5aa368=_0x968fc0;_0x5aa368?.[_0x559b66(0x182)]&&Array[_0x559b66(0x15d)](_0x5aa368[_0x559b66(0x182)])&&_0x5aa368[_0x559b66(0x182)]['some'](_0x5b5c25=>typeof _0x5b5c25===_0x559b66(0x112)&&_0x5b5c25[_0x559b66(0x12d)]('@lovrabet/dataset-mcp-server'))&&_0x464047[_0x559b66(0x142)](_0x5fcc85);}_0x464047[_0x559b66(0x134)]>0x0&&(_0x440f7b={'path':_0x23800e,'keys':_0x464047});}}catch{}const _0x55c926=_0x4443a0[_0x559b66(0x134)]>0x0||_0x23cade!==null;let _0x29978d=null;const _0x35c496=resolve(_0x5033c8,_0x559b66(0x17b));if(existsSync(_0x35c496))try{const _0x3af10a=JSON[_0x559b66(0x144)](readFileSync(_0x35c496,_0x559b66(0x167)));for(const _0xc750aa of['dependencies',_0x559b66(0x121)]){const _0x2b5a1d=_0x3af10a?.[_0xc750aa]?.['@lovrabet/sdk'];if(typeof _0x2b5a1d===_0x559b66(0x112)){_0x2b5a1d!=='latest'&&(_0x29978d={'pkgPath':_0x35c496,'currentVersion':_0x2b5a1d,'field':_0xc750aa});break;}}}catch{}return{'configMigration':_0x23cade,'oldArtifacts':_0x4443a0,'oldMcpConfig':_0x440f7b,'needsSkillSwap':_0x55c926,'sdkUpgrade':_0x29978d};}function printReport(_0x12929d){const _0x2fd230=a153_0xceae,{configMigration:_0x2b0a9a,oldArtifacts:_0xd4badc,oldMcpConfig:_0x4b342e,needsSkillSwap:_0x29a679}=_0x12929d;console['log'](''),console[_0x2fd230(0x110)](a153_0x895096['bold'](_0x2fd230(0x16b))),console[_0x2fd230(0x110)]('');_0x2b0a9a?(console['log'](a153_0x895096[_0x2fd230(0x175)](_0x2fd230(0x154))+('\x20\x20'+a153_0x895096[_0x2fd230(0x11a)](_0x2b0a9a['oldPath']))),console['log'](_0x2fd230(0x129)+(_0x2b0a9a[_0x2fd230(0x120)]?a153_0x895096['green'](_0x2fd230(0x14c)):a153_0x895096['gray'](_0x2fd230(0x164)))),console['log'](_0x2fd230(0x169)+_0x2b0a9a[_0x2fd230(0x161)][_0x2fd230(0x12e)](',\x20')),console[_0x2fd230(0x110)]('\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak')):console[_0x2fd230(0x110)](a153_0x895096['cyan'](_0x2fd230(0x154))+'\x20\x20'+a153_0x895096['gray'](_0x2fd230(0x18e)));console[_0x2fd230(0x110)]('');if(_0xd4badc[_0x2fd230(0x134)]>0x0){console[_0x2fd230(0x110)](a153_0x895096[_0x2fd230(0x175)]('Legacy\x20artifacts:'));for(const _0x3dbd8f of _0xd4badc){console[_0x2fd230(0x110)]('\x20\x20'+a153_0x895096[_0x2fd230(0x156)](_0x2fd230(0x16a))+'\x20\x20'+_0x3dbd8f);}console[_0x2fd230(0x110)](_0x2fd230(0x186));}else console['log'](a153_0x895096['cyan']('Legacy\x20artifacts:')+'\x20\x20'+a153_0x895096[_0x2fd230(0x139)]('none\x20found'));console[_0x2fd230(0x110)]('');_0x4b342e?(console[_0x2fd230(0x110)](a153_0x895096[_0x2fd230(0x175)](_0x2fd230(0x113))+('\x20\x20'+a153_0x895096[_0x2fd230(0x11a)](_0x4b342e[_0x2fd230(0x17f)])+_0x2fd230(0x11e)+_0x4b342e[_0x2fd230(0x179)]['join'](',\x20'))),console[_0x2fd230(0x110)](_0x2fd230(0x153))):console['log'](a153_0x895096['cyan'](_0x2fd230(0x113))+'\x20\x20'+a153_0x895096[_0x2fd230(0x139)](_0x2fd230(0x157)));console['log'](''),console['log'](a153_0x895096[_0x2fd230(0x175)](_0x2fd230(0x126))+('\x20\x20'+(_0x29a679?a153_0x895096[_0x2fd230(0x11a)](_0x2fd230(0x11f)):a153_0x895096['green'](_0x2fd230(0x174)))));_0x29a679&&console[_0x2fd230(0x110)]('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console['log']('');if(_0x12929d['sdkUpgrade']){const {currentVersion:_0x184c9f,field:_0x2dfec6,pkgPath:_0x4107e5}=_0x12929d[_0x2fd230(0x114)];console[_0x2fd230(0x110)](a153_0x895096[_0x2fd230(0x175)](_0x2fd230(0x151))+('\x20\x20'+a153_0x895096[_0x2fd230(0x11a)](_0x4107e5))),console[_0x2fd230(0x110)](_0x2fd230(0x115)+_0x2dfec6+':\x20'+a153_0x895096[_0x2fd230(0x11a)](_0x184c9f)+_0x2fd230(0x137)+a153_0x895096[_0x2fd230(0x143)](_0x2fd230(0x116))),console[_0x2fd230(0x110)](_0x2fd230(0x135));}else console[_0x2fd230(0x110)](a153_0x895096[_0x2fd230(0x175)](_0x2fd230(0x151))+'\x20\x20'+a153_0x895096[_0x2fd230(0x139)](_0x2fd230(0x123)));console[_0x2fd230(0x110)]('');}function execConfigMigration(_0x25a871,_0x5dcc2e){const _0x2e6e45=a153_0xceae,{configMigration:_0x551079}=_0x25a871;if(!_0x551079?.[_0x2e6e45(0x14f)])return{'step':0x1,'label':_0x2e6e45(0x14e),'ok':!![],'detail':_0x2e6e45(0x181)};const _0x313aab=readConfigFile(_0x551079['oldPath']),_0xcd500e=resolve(_0x5dcc2e,NEW_CONFIG_NAME),_0x39f366=_0x551079[_0x2e6e45(0x120)]?readConfigFile(_0xcd500e):{};for(const [_0x2a2e44,_0x5a42f4]of Object['entries'](_0x313aab)){!(_0x2a2e44 in _0x39f366)&&(_0x39f366[_0x2a2e44]=_0x5a42f4);}writeConfigFile(_0xcd500e,_0x39f366);const _0x4457cd=_0x551079[_0x2e6e45(0x14f)]+'.bak';return renameSync(_0x551079[_0x2e6e45(0x14f)],_0x4457cd),{'step':0x1,'label':_0x2e6e45(0x14e),'ok':!![],'detail':_0x551079[_0x2e6e45(0x14f)]+_0x2e6e45(0x137)+_0xcd500e+_0x2e6e45(0x159)+_0x4457cd+')'};}function execRemoveOldArtifacts(_0x21363c){const _0x1da56c=a153_0xceae,_0x11a81b=[];for(const _0xa01b10 of _0x21363c){try{if(!existsSync(_0xa01b10))continue;const _0x162a18=tryStat(_0xa01b10);_0x162a18?.[_0x1da56c(0x12c)]()?rmSync(_0xa01b10,{'recursive':!![],'force':!![]}):unlinkSync(_0xa01b10);}catch(_0x318843){_0x11a81b[_0x1da56c(0x142)](_0xa01b10+':\x20'+_0x318843[_0x1da56c(0x13d)]);}}return{'step':0x3,'label':'Remove\x20legacy\x20artifacts','ok':_0x11a81b[_0x1da56c(0x134)]===0x0,'detail':_0x11a81b[_0x1da56c(0x134)]>0x0?_0x21363c[_0x1da56c(0x134)]-_0x11a81b[_0x1da56c(0x134)]+'/'+_0x21363c[_0x1da56c(0x134)]+_0x1da56c(0x133)+_0x11a81b[_0x1da56c(0x12e)](';\x20')+')':_0x21363c[_0x1da56c(0x134)]+_0x1da56c(0x173)};}function execCleanMcp(_0x4c8bb1){const _0x16f671=a153_0xceae;if(!_0x4c8bb1[_0x16f671(0x171)])return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x16f671(0x184)};try{const _0x2ff3a3=readFileSync(_0x4c8bb1[_0x16f671(0x171)][_0x16f671(0x17f)],_0x16f671(0x167)),_0x4cb1a1=JSON[_0x16f671(0x144)](_0x2ff3a3);if(_0x4cb1a1?.[_0x16f671(0x15f)]&&typeof _0x4cb1a1[_0x16f671(0x15f)]===_0x16f671(0x14b)){const _0x1b8b0f=[];for(const [_0x22bd2f,_0x58ac7d]of Object[_0x16f671(0x10e)](_0x4cb1a1[_0x16f671(0x15f)])){_0x58ac7d?.[_0x16f671(0x182)]&&Array[_0x16f671(0x15d)](_0x58ac7d[_0x16f671(0x182)])&&_0x58ac7d['args'][_0x16f671(0x119)](_0x8b4c2a=>typeof _0x8b4c2a===_0x16f671(0x112)&&_0x8b4c2a[_0x16f671(0x12d)](_0x16f671(0x127)))&&_0x1b8b0f['push'](_0x22bd2f);}for(const _0x321c5f of _0x1b8b0f){delete _0x4cb1a1['mcpServers'][_0x321c5f];}return _0x1b8b0f[_0x16f671(0x134)]>0x0&&writeFileSync(_0x4c8bb1[_0x16f671(0x171)][_0x16f671(0x17f)],JSON['stringify'](_0x4cb1a1,null,0x2)+'\x0a',_0x16f671(0x167)),{'step':0x4,'label':_0x16f671(0x163),'ok':!![],'detail':'removed\x20'+_0x1b8b0f[_0x16f671(0x12e)](',\x20')+'\x20from\x20'+_0x4c8bb1[_0x16f671(0x171)][_0x16f671(0x17f)]};}return{'step':0x4,'label':_0x16f671(0x163),'ok':!![],'detail':_0x16f671(0x147)};}catch(_0x5dac1b){return{'step':0x4,'label':_0x16f671(0x163),'ok':![],'detail':_0x5dac1b[_0x16f671(0x13d)]};}}function execSkillsRemove(_0x3deeb4,_0x44264a){const _0x3ace4a=a153_0xceae,_0x3bd456=runNpxSkillsRemove(_0x3deeb4,{'stdio':'inherit','yes':_0x44264a});return{'step':0x5,'label':_0x3ace4a(0x16c),'ok':_0x3bd456['ok'],'detail':_0x3bd456['ok']?_0x3ace4a(0x166):_0x3bd456[_0x3ace4a(0x189)]??_0x3ace4a(0x145)+_0x3bd456[_0x3ace4a(0x13f)]};}function a153_0x3e9f(){const _0x34173d=['needed','hasNewConfig','devDependencies','step','not\x20found\x20or\x20already\x20at\x20latest','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','done','Skill\x20swap:','@lovrabet/dataset-mcp-server','FAIL','\x20\x20New\x20config\x20(.rabetbase.json):\x20','Step\x204/7:\x20MCP\x20config\x20—\x20','Upgrade\x20cancelled.','isDirectory','includes','join','1939TmAvgC','\x20\x20Step\x20','oldArtifacts','Step\x206/7:\x20Installing\x20new\x20skill...','\x20removed\x20(','length','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','Upgrade\x20completed\x20successfully!','\x20→\x20','bold','gray','needsSkillSwap','278dycomD','5jMuNKG','message','.claude/skills/lovrabet','status','lovrabet/rabetbase\x20installed\x20globally','Remove\x20.lovrabet/','push','green','parse','exit\x20','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','no\x20matching\x20entry\x20found','.cursor/mcp.json','3150QFieVr','2370780DxxJeh','object','already\x20exists\x20(will\x20merge)','Upgrade\x20@lovrabet/sdk','Config\x20migration','oldPath','Step\x204/7:\x20Cleaning\x20MCP\x20config...','@lovrabet/sdk:','406464CqdrGN','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','Config\x20file:','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','red','no\x20legacy\x20entry','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','\x20(backup:\x20','start','[\x22@lovrabet/sdk\x22]:\x20','files','isArray','lovrabet/rabetbase','mcpServers','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','fields','detail','Clean\x20MCP\x20config','not\x20found\x20(will\x20create)','6294IiyCJO','lovrabet/lovrabet-skill\x20removed','utf8','Step\x205/7:\x20Removing\x20old\x20skill...','\x20\x20Fields\x20to\x20migrate:\x20','FOUND','===\x20Upgrade\x20Analysis\x20===','Remove\x20old\x20skill','succeed','===\x20Upgrade\x20Summary\x20===','\x20→\x20latest','840916ESrkRj','oldMcpConfig','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','\x20removed','not\x20needed','cyan','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','\x20\x20#\x20or','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','keys','white','package.json','failed','configMigration','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','path','values','skipped\x20(no\x20legacy\x20config)','args','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','skipped','\x20\x20bun\x20install','\x20\x20Action:\x20delete','info','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','error','2758986XYgAjD','@lovrabet/sdk','CANCEL','undefined','no\x20legacy\x20config\x20found','entries','109404oksVNR','log','Step\x201/7:\x20Config\x20migration\x20—\x20','string','MCP\x20config:','sdkUpgrade','\x20\x20Current\x20version\x20in\x20','latest','cwd','fail','some','yellow','filter','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','Install\x20new\x20skill','\x20→\x20keys:\x20'];a153_0x3e9f=function(){return _0x34173d;};return a153_0x3e9f();}function execSkillsAdd(_0x2ceacd,_0x44c0f1){const _0x572448=a153_0xceae,_0xa9eb3e=runNpxSkillsAddGlobal(_0x2ceacd,_0x572448(0x15e),{'stdio':'inherit','yes':_0x44c0f1});return{'step':0x6,'label':_0x572448(0x11d),'ok':_0xa9eb3e['ok'],'detail':_0xa9eb3e['ok']?_0x572448(0x140):_0xa9eb3e[_0x572448(0x189)]??'exit\x20'+_0xa9eb3e[_0x572448(0x13f)]};}function execUpgradeSdk(_0x2ac850){const _0x2afd0b=a153_0xceae;if(!_0x2ac850[_0x2afd0b(0x114)])return{'step':0x7,'label':_0x2afd0b(0x14d),'ok':!![],'detail':_0x2afd0b(0x178)};const {pkgPath:_0x3bb55f,currentVersion:_0x6ed49b,field:_0x422eea}=_0x2ac850['sdkUpgrade'];try{const _0x19108f=readFileSync(_0x3bb55f,'utf8'),_0x1a292d=JSON[_0x2afd0b(0x144)](_0x19108f);return _0x1a292d[_0x422eea][_0x2afd0b(0x18b)]='latest',writeFileSync(_0x3bb55f,JSON['stringify'](_0x1a292d,null,0x2)+'\x0a',_0x2afd0b(0x167)),{'step':0x7,'label':_0x2afd0b(0x14d),'ok':!![],'detail':_0x422eea+_0x2afd0b(0x15b)+_0x6ed49b+_0x2afd0b(0x16f)};}catch(_0x4e84e9){return{'step':0x7,'label':_0x2afd0b(0x14d),'ok':![],'detail':_0x4e84e9[_0x2afd0b(0x13d)]};}}function tryStat(_0x7c0bdf){try{return statSync(_0x7c0bdf);}catch{return undefined;}}function printSummary(_0x30910e){const _0x6bb010=a153_0xceae;console[_0x6bb010(0x110)](''),console['log'](a153_0x895096[_0x6bb010(0x138)](_0x6bb010(0x16e))),console['log']('');for(const _0x9ded70 of _0x30910e){const _0x37e858=_0x9ded70['ok']?a153_0x895096[_0x6bb010(0x143)]('OK'):a153_0x895096['red'](_0x6bb010(0x128));console[_0x6bb010(0x110)]('\x20\x20'+_0x37e858+_0x6bb010(0x130)+_0x9ded70[_0x6bb010(0x122)]+':\x20'+_0x9ded70['label']);if(_0x9ded70[_0x6bb010(0x162)])console[_0x6bb010(0x110)]('\x20\x20\x20\x20\x20\x20\x20'+a153_0x895096['gray'](_0x9ded70['detail']));}console[_0x6bb010(0x110)]('');}export async function upgradeApp(_0x426a56,_0x840105){const _0x213308=a153_0xceae,_0x37d83b=process[_0x213308(0x117)](),_0x3e5e7a=analyse(_0x37d83b),_0xf7c31f=!_0x3e5e7a[_0x213308(0x17d)]&&_0x3e5e7a[_0x213308(0x131)]['length']===0x0&&!_0x3e5e7a[_0x213308(0x171)]&&!_0x3e5e7a[_0x213308(0x13a)]&&!_0x3e5e7a[_0x213308(0x114)];if(_0xf7c31f){console[_0x213308(0x110)](a153_0x895096[_0x213308(0x143)](_0x213308(0x183)));return;}printReport(_0x3e5e7a);const _0x492be8=!!(_0x840105['yes']||_0x840105['Y']||_0x426a56);if(!_0x492be8)try{const _0x2fcd09=await askConfirm('Proceed\x20with\x20upgrade?');if(!_0x2fcd09){console[_0x213308(0x110)](a153_0x895096[_0x213308(0x139)](_0x213308(0x12b)));return;}}catch(_0x1b9c11){if(_0x1b9c11?.[_0x213308(0x13d)]===_0x213308(0x18c)){console['log'](a153_0x895096[_0x213308(0x139)](_0x213308(0x12b)));return;}throw _0x1b9c11;}const _0x38f269=[],_0x198dbf=a153_0x31d6bd({'text':'Step\x201/7:\x20Migrating\x20config...','color':'cyan'})['start'](),_0x511bb7=execConfigMigration(_0x3e5e7a,_0x37d83b);_0x38f269[_0x213308(0x142)](_0x511bb7),_0x198dbf[_0x511bb7['ok']?'succeed':_0x213308(0x118)](_0x213308(0x111)+(_0x511bb7[_0x213308(0x162)]??(_0x511bb7['ok']?_0x213308(0x125):_0x213308(0x17c))));const _0x2a2e57=resolve(_0x37d83b,'.lovrabet'),_0x4eb122=a153_0x31d6bd({'text':_0x213308(0x188),'color':_0x213308(0x175)})[_0x213308(0x15a)]();if(existsSync(_0x2a2e57))try{rmSync(_0x2a2e57,{'recursive':!![],'force':!![]}),_0x4eb122[_0x213308(0x16d)](_0x213308(0x172)),_0x38f269[_0x213308(0x142)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0x562c85){_0x4eb122['fail'](_0x213308(0x160)+_0x562c85['message']),_0x38f269['push']({'step':0x2,'label':_0x213308(0x141),'ok':![],'detail':_0x562c85['message']});}else _0x4eb122[_0x213308(0x187)]('Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped'),_0x38f269[_0x213308(0x142)]({'step':0x2,'label':_0x213308(0x141),'ok':!![],'detail':_0x213308(0x184)});const _0x5a6285=a153_0x31d6bd({'text':'Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','color':_0x213308(0x175)})['start'](),_0x442554=execRemoveOldArtifacts(_0x3e5e7a[_0x213308(0x131)]);_0x38f269[_0x213308(0x142)](_0x442554),_0x5a6285[_0x442554['ok']?_0x213308(0x16d):_0x213308(0x118)](_0x213308(0x158)+(_0x442554[_0x213308(0x162)]??(_0x442554['ok']?_0x213308(0x125):'failed')));const _0x40e3e4=a153_0x31d6bd({'text':_0x213308(0x150),'color':'cyan'})[_0x213308(0x15a)](),_0x3cf9a7=execCleanMcp(_0x3e5e7a);_0x38f269[_0x213308(0x142)](_0x3cf9a7),_0x40e3e4[_0x3cf9a7['ok']?_0x213308(0x16d):_0x213308(0x118)](_0x213308(0x12a)+(_0x3cf9a7[_0x213308(0x162)]??(_0x3cf9a7['ok']?_0x213308(0x125):_0x213308(0x17c))));const _0x41475d=a153_0x31d6bd({'text':_0x213308(0x168),'color':_0x213308(0x175)})['start'](),_0x21c0fc=execSkillsRemove(_0x37d83b,_0x492be8);_0x38f269[_0x213308(0x142)](_0x21c0fc),_0x41475d[_0x21c0fc['ok']?_0x213308(0x16d):_0x213308(0x118)](_0x213308(0x17e)+(_0x21c0fc[_0x213308(0x162)]??(_0x21c0fc['ok']?_0x213308(0x125):_0x213308(0x17c))));const _0x5a32a9=a153_0x31d6bd({'text':_0x213308(0x132),'color':'cyan'})[_0x213308(0x15a)](),_0x397f68=execSkillsAdd(_0x37d83b,_0x492be8);_0x38f269[_0x213308(0x142)](_0x397f68),_0x5a32a9[_0x397f68['ok']?'succeed':'fail'](_0x213308(0x155)+(_0x397f68[_0x213308(0x162)]??(_0x397f68['ok']?_0x213308(0x125):'failed')));const _0x7dda5=a153_0x31d6bd({'text':_0x213308(0x124),'color':'cyan'})[_0x213308(0x15a)](),_0x16302e=execUpgradeSdk(_0x3e5e7a);_0x38f269[_0x213308(0x142)](_0x16302e),_0x7dda5[_0x16302e['ok']?_0x213308(0x16d):_0x213308(0x118)](_0x213308(0x146)+(_0x16302e[_0x213308(0x162)]??(_0x16302e['ok']?'done':_0x213308(0x17c)))),printSummary(_0x38f269);const _0x49551e=_0x38f269['some'](_0x29df42=>!_0x29df42['ok']);_0x49551e?console[_0x213308(0x110)](a153_0x895096['yellow'](_0x213308(0x176))):console[_0x213308(0x110)](a153_0x895096[_0x213308(0x143)](_0x213308(0x136))),_0x16302e['ok']&&_0x3e5e7a[_0x213308(0x114)]&&(console[_0x213308(0x110)](''),console['log'](a153_0x895096[_0x213308(0x138)][_0x213308(0x175)](_0x213308(0x11c))),console[_0x213308(0x110)](a153_0x895096['cyan']('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x213308(0x110)](''),console[_0x213308(0x110)](a153_0x895096[_0x213308(0x17a)]('\x20\x20npm\x20install')),console[_0x213308(0x110)](a153_0x895096[_0x213308(0x17a)](_0x213308(0x177))),console[_0x213308(0x110)](a153_0x895096[_0x213308(0x17a)](_0x213308(0x185))),console['log'](''));}
@@ -1 +1 @@
1
- const a153_0x45799f=a153_0x2017;(function(_0x3a9688,_0x185c4f){const _0xcc3c47=a153_0x2017,_0x462470=_0x3a9688();while(!![]){try{const _0x55fc39=-parseInt(_0xcc3c47(0x11e))/0x1+-parseInt(_0xcc3c47(0x11f))/0x2+-parseInt(_0xcc3c47(0x117))/0x3+-parseInt(_0xcc3c47(0x109))/0x4+-parseInt(_0xcc3c47(0x10f))/0x5*(parseInt(_0xcc3c47(0x110))/0x6)+parseInt(_0xcc3c47(0x116))/0x7+parseInt(_0xcc3c47(0x10b))/0x8;if(_0x55fc39===_0x185c4f)break;else _0x462470['push'](_0x462470['shift']());}catch(_0x3cdb35){_0x462470['push'](_0x462470['shift']());}}}(a153_0x7c05,0x68fa6));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';function a153_0x7c05(){const _0x4b5e7a=['skills','Notification\x20Configuration','push','Dataset\x20&\x20Operations','skill\x20','Menu','Runtime\x20App\x20Config\x20Management','run','app\x20use','CLI\x20Built-in\x20Skill','build','Run\x20any\x20package.json\x20script','Schema','map','Async\x20Tasks','API\x20Development','description','project','<script>','Smart\x20List\x20Pages','preview','App\x20Management','Database\x20Connections','use','has','risk','skill','auth','\x20\x20[write]','\x20\x20[high-risk-write]','install','get','Code\x20Generation','set','Use\x20`rabetbase\x20workspace\x20use\x20--app\x20<name>`\x20instead.','SQL\x20Queries','1243876nAtPmN','length','18386280VkvlqM','Run\x20Scripts','show','`rabetbase\x20app\x20remote`\x20has\x20been\x20removed.','20555XjmAmW','348fMnMfm','create','Roles','Quick\x20Start','read','hidden','932652EFpwaO','1962537rplYMk','Diagnostics','filter','isSingleCommand','command','Platform\x20Issue','Project','538120TgnNDC','519650bFaEhm','BFF\x20Scripts','app','Permissions','defaultCommand','login','service','remote','commands','Authentication','wildcardDef','`rabetbase\x20'];a153_0x7c05=function(){return _0x4b5e7a;};return a153_0x7c05();}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(_0x4e55d5){const _0xbea04c=a153_0x2017;for(const _0x3b3899 of _0x4e55d5){definitions[_0xbea04c(0x106)](_0x3b3899[_0xbea04c(0x125)]+':'+_0x3b3899['command'],_0x3b3899);let _0x590169=serviceGroups[_0xbea04c(0x104)](_0x3b3899[_0xbea04c(0x125)]);!_0x590169&&(_0x590169=[],serviceGroups[_0xbea04c(0x106)](_0x3b3899[_0xbea04c(0x125)],_0x590169)),_0x590169[_0xbea04c(0x12d)](_0x3b3899);}}function registerDeclarativeService(_0x1525eb,_0x25af59,_0x3aebfe){const _0x117486=a153_0x2017;registerDefinitions(_0x25af59);_0x3aebfe?.[_0x117486(0x129)]&&registerDefinitions([_0x3aebfe[_0x117486(0x129)]]);const _0x5699d4=_0x434530=>_0x434530===_0x117486(0x114)?'':_0x434530==='write'?_0x117486(0x101):_0x117486(0x102),_0x4d1e49={'service':_0x25af59[0x0]['service'],'label':_0x1525eb,'commands':_0x25af59[_0x117486(0x119)](_0x863abe=>!_0x863abe[_0x117486(0x115)])[_0x117486(0xf2)](_0x418dbd=>({'command':_0x418dbd[_0x117486(0x11b)],'description':_0x418dbd[_0x117486(0xf5)],'tag':_0x5699d4(_0x418dbd[_0x117486(0xfe)])})),'declarative':!![],'defaultCommand':_0x3aebfe?.[_0x117486(0x123)]??(_0x3aebfe?.[_0x117486(0x11a)]?_0x25af59[0x0][_0x117486(0x11b)]:undefined),'wildcardDef':_0x3aebfe?.[_0x117486(0x129)],'isSingleCommand':_0x3aebfe?.['isSingleCommand']};serviceRegistry[_0x117486(0x12d)](_0x4d1e49),serviceByName[_0x117486(0x106)](_0x4d1e49['service'],_0x4d1e49);}registerDeclarativeService(a153_0x45799f(0x113),initDefinitions,{'defaultCommand':'run','isSingleCommand':!![]}),registerDeclarativeService(a153_0x45799f(0x11d),projectDefinitions),registerDeclarativeService('Workspace',workspaceDefinitions),registerDeclarativeService(a153_0x45799f(0xfa),appDefinitions),registerDeclarativeService(a153_0x45799f(0x128),authDefinitions,{'defaultCommand':a153_0x45799f(0x124)}),registerDeclarativeService(a153_0x45799f(0x12e),datasetDefinitions),registerDeclarativeService(a153_0x45799f(0xf8),pageDefinitions),registerDeclarativeService(a153_0x45799f(0xf4),apiDefinitions),registerDeclarativeService('Instant\x20API',dataDefinitions),registerDeclarativeService(a153_0x45799f(0x120),bffDefinitions),registerDeclarativeService(a153_0x45799f(0x12c),notificationDefinitions),registerDeclarativeService(a153_0x45799f(0x108),sqlDefinitions),registerDeclarativeService(a153_0x45799f(0xfb),dbDefinitions),registerDeclarativeService(a153_0x45799f(0xea),menuDefinitions),registerDeclarativeService(a153_0x45799f(0xf3),taskDefinitions),registerDeclarativeService(a153_0x45799f(0x112),roleDefinitions),registerDeclarativeService(a153_0x45799f(0x122),permitDefinitions),registerDeclarativeService(a153_0x45799f(0xeb),appConfigDefinitions),registerDeclarativeService(a153_0x45799f(0x11c),issueDefinitions),registerDeclarativeService('File',fileDefinitions),registerDeclarativeService(a153_0x45799f(0x105),codegenDefinitions),registerDeclarativeService('Configuration',configDefinitions),registerDeclarativeService(a153_0x45799f(0x118),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a153_0x45799f(0xf1),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a153_0x45799f(0xee),cliSkillDefinitions,{'defaultCommand':a153_0x45799f(0x103)}),registerDeclarativeService('Logs',logsDefinitions,{'defaultCommand':a153_0x45799f(0x10d)}),registerDeclarativeService(a153_0x45799f(0x10c),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a153_0x45799f(0x10a)]-0x1];last[a153_0x45799f(0x127)]=[{'command':a153_0x45799f(0xf7),'description':a153_0x45799f(0xf0),'tag':''}];}function a153_0x2017(_0x202b4e,_0x171763){_0x202b4e=_0x202b4e-0xe9;const _0x7c05fd=a153_0x7c05();let _0x2017df=_0x7c05fd[_0x202b4e];return _0x2017df;}export const deprecatedAliases={'create':{'service':a153_0x45799f(0xf6),'command':a153_0x45799f(0x111)},'start':{'service':'run','command':'start'},'build':{'service':a153_0x45799f(0xec),'command':a153_0x45799f(0xef)},'preview':{'service':a153_0x45799f(0xec),'command':a153_0x45799f(0xf9)},'logout':{'service':a153_0x45799f(0x100),'command':'logout'}};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='Use\x20`rabetbase\x20app\x20list\x20--remote`\x20instead.',APP_USE_REMOVED_HINT=a153_0x45799f(0x107);export function resolveRemovedCommand(_0x2cf024,_0x3456c2){const _0xabb4c0=a153_0x45799f;if(_0x2cf024===_0xabb4c0(0xff)){const _0x6268c1=_0x3456c2?_0xabb4c0(0xe9)+_0x3456c2:_0xabb4c0(0xff);return{'command':_0x6268c1,'message':_0xabb4c0(0x12a)+_0x6268c1+'`\x20has\x20been\x20removed.','hint':CLI_SKILL_INSTALL_REMOVED_HINT};}if(_0x2cf024===_0xabb4c0(0x12b))return{'command':_0xabb4c0(0x12b),'message':'`rabetbase\x20skills`\x20has\x20been\x20removed.','hint':CLI_SKILL_INSTALL_REMOVED_HINT};if(_0x2cf024==='app'&&_0x3456c2===_0xabb4c0(0x126))return{'command':'app\x20remote','message':_0xabb4c0(0x10e),'hint':APP_REMOTE_REMOVED_HINT};if(_0x2cf024===_0xabb4c0(0x121)&&_0x3456c2===_0xabb4c0(0xfc))return{'command':_0xabb4c0(0xed),'message':'`rabetbase\x20app\x20use`\x20has\x20been\x20removed.','hint':APP_USE_REMOVED_HINT};return undefined;}export const deprecatedSubcommands={'bff':{'new':a153_0x45799f(0x111)},'sql':{'new':'create'}};export function resolveDeprecatedSubcommand(_0x2c8f80,_0x527b7e){return deprecatedSubcommands[_0x2c8f80]?.[_0x527b7e];}export function findDefinition(_0x53e2a1,_0x2b9bf2){const _0x19950f=a153_0x45799f;return definitions[_0x19950f(0x104)](_0x53e2a1+':'+_0x2b9bf2);}export function isKnownService(_0x1c64fc){return serviceByName['has'](_0x1c64fc);}export function isDeclarativeService(_0xb9ec0c){const _0x416406=a153_0x45799f;return serviceGroups[_0x416406(0xfd)](_0xb9ec0c)||serviceByName[_0x416406(0x104)](_0xb9ec0c)?.['wildcardDef']!==undefined;}export function getServiceEntry(_0x2a0880){const _0x245284=a153_0x45799f;return serviceByName[_0x245284(0x104)](_0x2a0880);}export function getLegacyHandler(_0x36f8a6,_0x464f5f){return undefined;}export function getAllDefinitions(){return Array['from'](definitions['values']());}
1
+ const a154_0x1ff2aa=a154_0x21ec;(function(_0x376b6e,_0x33fb76){const _0x4b8214=a154_0x21ec,_0x7919c1=_0x376b6e();while(!![]){try{const _0x37b89b=parseInt(_0x4b8214(0x1b4))/0x1*(parseInt(_0x4b8214(0x19f))/0x2)+parseInt(_0x4b8214(0x1b7))/0x3*(parseInt(_0x4b8214(0x19b))/0x4)+parseInt(_0x4b8214(0x1bb))/0x5*(parseInt(_0x4b8214(0x188))/0x6)+parseInt(_0x4b8214(0x1b0))/0x7+-parseInt(_0x4b8214(0x18d))/0x8*(parseInt(_0x4b8214(0x181))/0x9)+parseInt(_0x4b8214(0x1bf))/0xa+-parseInt(_0x4b8214(0x17f))/0xb;if(_0x37b89b===_0x33fb76)break;else _0x7919c1['push'](_0x7919c1['shift']());}catch(_0x506a32){_0x7919c1['push'](_0x7919c1['shift']());}}}(a154_0x44f2,0x37d19));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 a154_0x44f2(){const _0x56c7ff=['CLI\x20Built-in\x20Skill','20gGmQoc','run','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20instead.','command','2277450OgZXTX','map','risk','File','Workspace','use','wildcardDef','app','Notification\x20Configuration','length','defaultCommand','`rabetbase\x20app\x20remote`\x20has\x20been\x20removed.','Permissions','10428440uSclot','from','27iYPudX','set','`\x20has\x20been\x20removed.','login','Diagnostics','has','Roles','502746sPiQLx','<script>','values','Use\x20`rabetbase\x20cli-skill\x20install`\x20to\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill.\x20To\x20install\x20business\x20Skills,\x20use\x20`lovrabet\x20skill\x20install`.','filter','393288epfWVo','`rabetbase\x20','Self\x20Update','Async\x20Tasks','write','build','Project','Schema','get','auth','Database\x20Connections','show','service','Code\x20Generation','4fdSkPp','Menu','Authentication','skills','12RvDlfc','\x20\x20[write]','create','preview','Smart\x20List\x20Pages','remote','skill\x20','install','Platform\x20Issue','read','Dataset\x20&\x20Operations','Logs','app\x20use','push','API\x20Development','description','Instant\x20API','3085264xJlfGV','app\x20remote','Use\x20`rabetbase\x20workspace\x20use\x20--app\x20<name>`\x20instead.','Quick\x20Start','41802onVDvB','\x20\x20[high-risk-write]','commands','209049VzjEnk','Configuration','skill'];a154_0x44f2=function(){return _0x56c7ff;};return a154_0x44f2();}function registerDefinitions(_0x51533b){const _0x361a43=a154_0x21ec;for(const _0x318179 of _0x51533b){definitions[_0x361a43(0x182)](_0x318179[_0x361a43(0x199)]+':'+_0x318179[_0x361a43(0x1be)],_0x318179);let _0x3733b6=serviceGroups['get'](_0x318179['service']);!_0x3733b6&&(_0x3733b6=[],serviceGroups[_0x361a43(0x182)](_0x318179[_0x361a43(0x199)],_0x3733b6)),_0x3733b6[_0x361a43(0x1ac)](_0x318179);}}function registerDeclarativeService(_0x300e41,_0x3f8ac9,_0x1b278e){const _0xaff232=a154_0x21ec;registerDefinitions(_0x3f8ac9);_0x1b278e?.[_0xaff232(0x1c5)]&&registerDefinitions([_0x1b278e['wildcardDef']]);const _0x1ff4ea=_0x4b27b0=>_0x4b27b0===_0xaff232(0x1a8)?'':_0x4b27b0===_0xaff232(0x191)?_0xaff232(0x1a0):_0xaff232(0x1b5),_0x4ee141={'service':_0x3f8ac9[0x0][_0xaff232(0x199)],'label':_0x300e41,'commands':_0x3f8ac9[_0xaff232(0x18c)](_0x405560=>!_0x405560['hidden'])[_0xaff232(0x1c0)](_0x40ffec=>({'command':_0x40ffec[_0xaff232(0x1be)],'description':_0x40ffec[_0xaff232(0x1ae)],'tag':_0x1ff4ea(_0x40ffec[_0xaff232(0x1c1)])})),'declarative':!![],'defaultCommand':_0x1b278e?.[_0xaff232(0x1c9)]??(_0x1b278e?.['isSingleCommand']?_0x3f8ac9[0x0][_0xaff232(0x1be)]:undefined),'wildcardDef':_0x1b278e?.[_0xaff232(0x1c5)],'isSingleCommand':_0x1b278e?.['isSingleCommand']};serviceRegistry['push'](_0x4ee141),serviceByName['set'](_0x4ee141['service'],_0x4ee141);}registerDeclarativeService(a154_0x1ff2aa(0x1b3),initDefinitions,{'defaultCommand':a154_0x1ff2aa(0x1bc),'isSingleCommand':!![]}),registerDeclarativeService(a154_0x1ff2aa(0x193),projectDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x1c3),workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x19d),authDefinitions,{'defaultCommand':a154_0x1ff2aa(0x184)}),registerDeclarativeService(a154_0x1ff2aa(0x1a9),datasetDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x1a3),pageDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x1ad),apiDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x1af),dataDefinitions),registerDeclarativeService('BFF\x20Scripts',bffDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x1c7),notificationDefinitions),registerDeclarativeService('SQL\x20Queries',sqlDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x197),dbDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x19c),menuDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x190),taskDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x187),roleDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x17e),permitDefinitions),registerDeclarativeService('Runtime\x20App\x20Config\x20Management',appConfigDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x1a7),issueDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x1c2),fileDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x19a),codegenDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x1b8),configDefinitions),registerDeclarativeService(a154_0x1ff2aa(0x185),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a154_0x1ff2aa(0x194),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a154_0x1ff2aa(0x18f),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a154_0x1ff2aa(0x1ba),cliSkillDefinitions,{'defaultCommand':a154_0x1ff2aa(0x1a6)}),registerDeclarativeService(a154_0x1ff2aa(0x1aa),logsDefinitions,{'defaultCommand':a154_0x1ff2aa(0x198)}),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a154_0x1ff2aa(0x1c8)]-0x1];last[a154_0x1ff2aa(0x1b6)]=[{'command':a154_0x1ff2aa(0x189),'description':'Run\x20any\x20package.json\x20script','tag':''}];}export const deprecatedAliases={'create':{'service':'project','command':a154_0x1ff2aa(0x1a1)},'start':{'service':a154_0x1ff2aa(0x1bc),'command':'start'},'build':{'service':a154_0x1ff2aa(0x1bc),'command':a154_0x1ff2aa(0x192)},'preview':{'service':'run','command':a154_0x1ff2aa(0x1a2)},'logout':{'service':a154_0x1ff2aa(0x196),'command':'logout'}};function a154_0x21ec(_0x595beb,_0x33b13f){_0x595beb=_0x595beb-0x17e;const _0x44f28c=a154_0x44f2();let _0x21eca2=_0x44f28c[_0x595beb];return _0x21eca2;}const CLI_SKILL_INSTALL_REMOVED_HINT=a154_0x1ff2aa(0x18b),APP_REMOTE_REMOVED_HINT=a154_0x1ff2aa(0x1bd),APP_USE_REMOVED_HINT=a154_0x1ff2aa(0x1b2);export function resolveRemovedCommand(_0x50f2c9,_0x5f27b0){const _0x5ddd17=a154_0x1ff2aa;if(_0x50f2c9===_0x5ddd17(0x1b9)){const _0x2d1a8f=_0x5f27b0?_0x5ddd17(0x1a5)+_0x5f27b0:_0x5ddd17(0x1b9);return{'command':_0x2d1a8f,'message':_0x5ddd17(0x18e)+_0x2d1a8f+_0x5ddd17(0x183),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};}if(_0x50f2c9===_0x5ddd17(0x19e))return{'command':_0x5ddd17(0x19e),'message':'`rabetbase\x20skills`\x20has\x20been\x20removed.','hint':CLI_SKILL_INSTALL_REMOVED_HINT};if(_0x50f2c9===_0x5ddd17(0x1c6)&&_0x5f27b0===_0x5ddd17(0x1a4))return{'command':_0x5ddd17(0x1b1),'message':_0x5ddd17(0x1ca),'hint':APP_REMOTE_REMOVED_HINT};if(_0x50f2c9===_0x5ddd17(0x1c6)&&_0x5f27b0===_0x5ddd17(0x1c4))return{'command':_0x5ddd17(0x1ab),'message':'`rabetbase\x20app\x20use`\x20has\x20been\x20removed.','hint':APP_USE_REMOVED_HINT};return undefined;}export const deprecatedSubcommands={'bff':{'new':'create'},'sql':{'new':a154_0x1ff2aa(0x1a1)},'menu':{'update':'asset-update'}};export function resolveDeprecatedSubcommand(_0x2c1024,_0xcfe373){return deprecatedSubcommands[_0x2c1024]?.[_0xcfe373];}export function findDefinition(_0x1b3270,_0x10408d){const _0x1617d7=a154_0x1ff2aa;return definitions[_0x1617d7(0x195)](_0x1b3270+':'+_0x10408d);}export function isKnownService(_0x1405a1){const _0x4267a0=a154_0x1ff2aa;return serviceByName[_0x4267a0(0x186)](_0x1405a1);}export function isDeclarativeService(_0x19c1cf){const _0x499519=a154_0x1ff2aa;return serviceGroups[_0x499519(0x186)](_0x19c1cf)||serviceByName[_0x499519(0x195)](_0x19c1cf)?.[_0x499519(0x1c5)]!==undefined;}export function getServiceEntry(_0x435a7d){return serviceByName['get'](_0x435a7d);}export function getLegacyHandler(_0x2f0ed8,_0x59dd07){return undefined;}export function getAllDefinitions(){const _0x6113ec=a154_0x1ff2aa;return Array[_0x6113ec(0x180)](definitions[_0x6113ec(0x18a)]());}
@@ -1 +1 @@
1
- const a154_0x154467=a154_0x3411;(function(_0x46ae9e,_0x163aea){const _0x1cfc02=a154_0x3411,_0x49e347=_0x46ae9e();while(!![]){try{const _0x2e263b=parseInt(_0x1cfc02(0xc7))/0x1*(-parseInt(_0x1cfc02(0xc6))/0x2)+parseInt(_0x1cfc02(0xcd))/0x3+parseInt(_0x1cfc02(0xcc))/0x4*(-parseInt(_0x1cfc02(0xc5))/0x5)+parseInt(_0x1cfc02(0xc2))/0x6+parseInt(_0x1cfc02(0xd2))/0x7+parseInt(_0x1cfc02(0xbd))/0x8+parseInt(_0x1cfc02(0xbe))/0x9;if(_0x2e263b===_0x163aea)break;else _0x49e347['push'](_0x49e347['shift']());}catch(_0x22918d){_0x49e347['push'](_0x49e347['shift']());}}}(a154_0x3dcf,0xa46d9));import{createAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a154_0x3dcf(){const _0x503c7b=['name','2822561NkMPqs','write','create','POST','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','215264LWDRwE','9989496IApqcz','Created\x20role\x20','trim','roleName','831942ipXdlE','length','flagMissing','87005MOdHWg','2056398IIjsYe','1NSJYUa','/smartapi/permit/role/create','appCode','role','validation','92dzSzlc','1269561tHbzPG','CUSTOM','str','Pass\x20--name\x20<roleName>.'];a154_0x3dcf=function(){return _0x503c7b;};return a154_0x3dcf();}import{asDryRunResult}from'../../commands/common/dry-run.js';function a154_0x3411(_0x5babe1,_0x114b48){_0x5babe1=_0x5babe1-0xb9;const _0x3dcf4d=a154_0x3dcf();let _0x3411e3=_0x3dcf4d[_0x5babe1];return _0x3411e3;}import{NAME_FLAG,REMARK_FLAG,projectRole}from'../../commands/role/shared.js';const CREATE_PATH=a154_0x154467(0xc8);function readName(_0x28cb16){const _0x2c28f4=a154_0x154467,_0x5b9576=_0x28cb16[_0x2c28f4(0xcf)](_0x2c28f4(0xd1))[_0x2c28f4(0xc0)]();if(!_0x5b9576)throw CliErrors[_0x2c28f4(0xc4)](_0x2c28f4(0xd1),_0x2c28f4(0xd0));if(_0x5b9576[_0x2c28f4(0xc3)]>0x40)throw CliErrors[_0x2c28f4(0xcb)](_0x2c28f4(0xbc));return _0x5b9576;}export const roleCreate={'service':a154_0x154467(0xca),'command':'create','description':'Create\x20a\x20CUSTOM\x20user\x20group\x20(role)','risk':a154_0x154467(0xb9),'flags':[NAME_FLAG,REMARK_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4daddb){readName(_0x4daddb);},async 'dryRun'(_0x4ab168){const _0x563a42=a154_0x154467,_0x35ec4a=readName(_0x4ab168),_0x573626=_0x4ab168[_0x563a42(0xcf)]('remark')[_0x563a42(0xc0)]()||undefined;return asDryRunResult({'operation':'create','selector':{'appCode':_0x4ab168[_0x563a42(0xc9)],'roleName':_0x35ec4a},'before':null,'after':{'roleName':_0x35ec4a,'roleType':_0x563a42(0xce),'remark':_0x573626},'dryRun':!![],'backend':{'method':_0x563a42(0xbb),'path':CREATE_PATH},'warnings':[]},{'method':_0x563a42(0xbb),'url':CREATE_PATH});},async 'execute'(_0x21a9fa){const _0x5e5a3e=a154_0x154467,_0x1355d9=readName(_0x21a9fa),_0x2bcb9b=_0x21a9fa['str']('remark')['trim']()||undefined,_0x5cd9ab=await createAppRole({'appCode':_0x21a9fa[_0x5e5a3e(0xc9)],'roleName':_0x1355d9,..._0x2bcb9b?{'remark':_0x2bcb9b}:{}});return{'ok':!![],'data':{'operation':_0x5e5a3e(0xba),'selector':{'appCode':_0x21a9fa[_0x5e5a3e(0xc9)],'roleId':_0x5cd9ab['id'],'roleName':_0x1355d9},'before':null,'after':projectRole(_0x5cd9ab),'dryRun':![],'backend':{'method':_0x5e5a3e(0xbb),'path':CREATE_PATH},'warnings':[]},'message':_0x5e5a3e(0xbf)+_0x5cd9ab[_0x5e5a3e(0xc1)]+'\x20(id='+_0x5cd9ab['id']+')'};}};
1
+ const a155_0x29c059=a155_0x4d73;(function(_0x2537fc,_0x1878e3){const _0x54fbac=a155_0x4d73,_0x3783a8=_0x2537fc();while(!![]){try{const _0xc38d77=parseInt(_0x54fbac(0x1bc))/0x1*(-parseInt(_0x54fbac(0x1b1))/0x2)+-parseInt(_0x54fbac(0x1b3))/0x3*(parseInt(_0x54fbac(0x1ca))/0x4)+-parseInt(_0x54fbac(0x1c5))/0x5*(-parseInt(_0x54fbac(0x1bd))/0x6)+-parseInt(_0x54fbac(0x1be))/0x7*(-parseInt(_0x54fbac(0x1b7))/0x8)+parseInt(_0x54fbac(0x1b8))/0x9*(parseInt(_0x54fbac(0x1b9))/0xa)+-parseInt(_0x54fbac(0x1ac))/0xb+-parseInt(_0x54fbac(0x1c8))/0xc*(parseInt(_0x54fbac(0x1b6))/0xd);if(_0xc38d77===_0x1878e3)break;else _0x3783a8['push'](_0x3783a8['shift']());}catch(_0x4d2483){_0x3783a8['push'](_0x3783a8['shift']());}}}(a155_0x31ab,0xecdfa));function a155_0x31ab(){const _0xb38c72=['8042538waTsOP','Create\x20a\x20CUSTOM\x20user\x20group\x20(role)','CUSTOM','create','length','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','flagMissing','3201315pKtRLv','POST','write','25572hawfKs','trim','12WzpoAb','12317492jBQKrW','name','roleName','appCode','Pass\x20--name\x20<roleName>.','2pIeaSv','validation','1172058AgcZEp','str','remark','91skuAwy','8UnhGQW','15142050pzyIhD','10RDZbEB','role','/smartapi/permit/role/create','834929MJcjvh','12DYcpEy'];a155_0x31ab=function(){return _0xb38c72;};return a155_0x31ab();}import{createAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a155_0x4d73(_0x4f610a,_0x8620ce){_0x4f610a=_0x4f610a-0x1ac;const _0x31ab5b=a155_0x31ab();let _0x4d73b0=_0x31ab5b[_0x4f610a];return _0x4d73b0;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{NAME_FLAG,REMARK_FLAG,projectRole}from'../../commands/role/shared.js';const CREATE_PATH=a155_0x29c059(0x1bb);function readName(_0x3c2380){const _0x3b4f27=a155_0x29c059,_0x1ac7c6=_0x3c2380[_0x3b4f27(0x1b4)](_0x3b4f27(0x1ad))[_0x3b4f27(0x1c9)]();if(!_0x1ac7c6)throw CliErrors[_0x3b4f27(0x1c4)](_0x3b4f27(0x1ad),_0x3b4f27(0x1b0));if(_0x1ac7c6[_0x3b4f27(0x1c2)]>0x40)throw CliErrors[_0x3b4f27(0x1b2)](_0x3b4f27(0x1c3));return _0x1ac7c6;}export const roleCreate={'service':a155_0x29c059(0x1ba),'command':a155_0x29c059(0x1c1),'description':a155_0x29c059(0x1bf),'risk':a155_0x29c059(0x1c7),'flags':[NAME_FLAG,REMARK_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4a3596){readName(_0x4a3596);},async 'dryRun'(_0x1b8f33){const _0x47f36e=a155_0x29c059,_0xc2e156=readName(_0x1b8f33),_0x4d40cd=_0x1b8f33[_0x47f36e(0x1b4)](_0x47f36e(0x1b5))[_0x47f36e(0x1c9)]()||undefined;return asDryRunResult({'operation':_0x47f36e(0x1c1),'selector':{'appCode':_0x1b8f33[_0x47f36e(0x1af)],'roleName':_0xc2e156},'before':null,'after':{'roleName':_0xc2e156,'roleType':_0x47f36e(0x1c0),'remark':_0x4d40cd},'dryRun':!![],'backend':{'method':_0x47f36e(0x1c6),'path':CREATE_PATH},'warnings':[]},{'method':_0x47f36e(0x1c6),'url':CREATE_PATH});},async 'execute'(_0x40c16a){const _0x4e6817=a155_0x29c059,_0x2fdf61=readName(_0x40c16a),_0x30090e=_0x40c16a[_0x4e6817(0x1b4)](_0x4e6817(0x1b5))['trim']()||undefined,_0x459693=await createAppRole({'appCode':_0x40c16a[_0x4e6817(0x1af)],'roleName':_0x2fdf61,..._0x30090e?{'remark':_0x30090e}:{}});return{'ok':!![],'data':{'operation':_0x4e6817(0x1c1),'selector':{'appCode':_0x40c16a[_0x4e6817(0x1af)],'roleId':_0x459693['id'],'roleName':_0x2fdf61},'before':null,'after':projectRole(_0x459693),'dryRun':![],'backend':{'method':_0x4e6817(0x1c6),'path':CREATE_PATH},'warnings':[]},'message':'Created\x20role\x20'+_0x459693[_0x4e6817(0x1ae)]+'\x20(id='+_0x459693['id']+')'};}};
@@ -1 +1 @@
1
- const a155_0x22ed38=a155_0x3ead;function a155_0x11bd(){const _0x29c04e=['\x20(id=','Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','role','appCode','Deleted\x20role\x20','4694400iNVeVX','delete','3727878hijLku','/smartapi/permit/role/delete','1225358RXGNib','7vBhujs','2080688WoPtSb','userCount','2532365FinieJ','Role\x20still\x20has\x20','3266166BsvtJb','high-risk-write','1171060DUJANU','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','POST','num','roleName'];a155_0x11bd=function(){return _0x29c04e;};return a155_0x11bd();}(function(_0x39dc8e,_0x158701){const _0x367870=a155_0x3ead,_0x44fa03=_0x39dc8e();while(!![]){try{const _0x3657de=-parseInt(_0x367870(0x76))/0x1+parseInt(_0x367870(0x6e))/0x2+parseInt(_0x367870(0x6c))/0x3+parseInt(_0x367870(0x70))/0x4+-parseInt(_0x367870(0x72))/0x5+-parseInt(_0x367870(0x74))/0x6*(-parseInt(_0x367870(0x6f))/0x7)+-parseInt(_0x367870(0x6a))/0x8;if(_0x3657de===_0x158701)break;else _0x44fa03['push'](_0x44fa03['shift']());}catch(_0x45bdf0){_0x44fa03['push'](_0x44fa03['shift']());}}}(a155_0x11bd,0xa0091));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a155_0x3ead(_0x156ee1,_0x2af492){_0x156ee1=_0x156ee1-0x66;const _0x11bd60=a155_0x11bd();let _0x3ead73=_0x11bd60[_0x156ee1];return _0x3ead73;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH=a155_0x22ed38(0x6d);export const roleDelete={'service':a155_0x22ed38(0x67),'command':a155_0x22ed38(0x6b),'description':a155_0x22ed38(0x66),'risk':a155_0x22ed38(0x75),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x1657cb){const _0x3b2117=a155_0x22ed38,_0x4e7245=_0x1657cb[_0x3b2117(0x79)]('id'),_0x824c76=await getRoleById(_0x1657cb['appCode'],_0x4e7245);return assertCustomRole(_0x824c76,'delete'),asDryRunResult({'operation':'delete','selector':{'appCode':_0x1657cb[_0x3b2117(0x68)],'roleId':_0x4e7245,'roleName':_0x824c76['roleName']},'before':projectRole(_0x824c76),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x824c76['userCount']>0x0?[_0x3b2117(0x73)+_0x824c76[_0x3b2117(0x71)]+_0x3b2117(0x77)]:[]},{'method':_0x3b2117(0x78),'url':DELETE_PATH});},async 'execute'(_0x5e1af9){const _0x10b031=a155_0x22ed38,_0x3b8f51=_0x5e1af9['num']('id'),_0x123050=await getRoleById(_0x5e1af9[_0x10b031(0x68)],_0x3b8f51);return assertCustomRole(_0x123050,_0x10b031(0x6b)),await deleteAppRole(_0x3b8f51),{'ok':!![],'data':{'operation':_0x10b031(0x6b),'selector':{'appCode':_0x5e1af9['appCode'],'roleId':_0x3b8f51,'roleName':_0x123050[_0x10b031(0x7a)]},'before':projectRole(_0x123050),'after':null,'dryRun':![],'backend':{'method':_0x10b031(0x78),'path':DELETE_PATH},'warnings':[]},'message':_0x10b031(0x69)+_0x123050[_0x10b031(0x7a)]+_0x10b031(0x7b)+_0x3b8f51+')'};}};
1
+ const a156_0x4c8b01=a156_0x4909;(function(_0x439503,_0x5e17f3){const _0x198a81=a156_0x4909,_0x5602df=_0x439503();while(!![]){try{const _0xae1949=parseInt(_0x198a81(0x88))/0x1*(parseInt(_0x198a81(0x8b))/0x2)+-parseInt(_0x198a81(0x99))/0x3*(-parseInt(_0x198a81(0x90))/0x4)+-parseInt(_0x198a81(0x93))/0x5+-parseInt(_0x198a81(0x96))/0x6*(-parseInt(_0x198a81(0x84))/0x7)+-parseInt(_0x198a81(0x9a))/0x8*(-parseInt(_0x198a81(0x8a))/0x9)+parseInt(_0x198a81(0x95))/0xa*(-parseInt(_0x198a81(0x94))/0xb)+-parseInt(_0x198a81(0x98))/0xc;if(_0xae1949===_0x5e17f3)break;else _0x5602df['push'](_0x5602df['shift']());}catch(_0x6169d1){_0x5602df['push'](_0x5602df['shift']());}}}(a156_0x5818,0xbef4b));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_0x4c8b01(0x8f);function a156_0x4909(_0x51ac2d,_0x206462){_0x51ac2d=_0x51ac2d-0x84;const _0x581879=a156_0x5818();let _0x4909c2=_0x581879[_0x51ac2d];return _0x4909c2;}export const roleDelete={'service':a156_0x4c8b01(0x86),'command':a156_0x4c8b01(0x92),'description':'Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','risk':a156_0x4c8b01(0x97),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x244a4d){const _0x22f3bc=a156_0x4c8b01,_0x3a6604=_0x244a4d[_0x22f3bc(0x8d)]('id'),_0x2bf377=await getRoleById(_0x244a4d[_0x22f3bc(0x9b)],_0x3a6604);return assertCustomRole(_0x2bf377,'delete'),asDryRunResult({'operation':'delete','selector':{'appCode':_0x244a4d[_0x22f3bc(0x9b)],'roleId':_0x3a6604,'roleName':_0x2bf377['roleName']},'before':projectRole(_0x2bf377),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x2bf377[_0x22f3bc(0x89)]>0x0?[_0x22f3bc(0x8c)+_0x2bf377['userCount']+_0x22f3bc(0x8e)]:[]},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x19300c){const _0xbc69c5=a156_0x4c8b01,_0xa9eac7=_0x19300c[_0xbc69c5(0x8d)]('id'),_0x19cbe6=await getRoleById(_0x19300c['appCode'],_0xa9eac7);return assertCustomRole(_0x19cbe6,_0xbc69c5(0x92)),await deleteAppRole(_0xa9eac7),{'ok':!![],'data':{'operation':_0xbc69c5(0x92),'selector':{'appCode':_0x19300c['appCode'],'roleId':_0xa9eac7,'roleName':_0x19cbe6[_0xbc69c5(0x87)]},'before':projectRole(_0x19cbe6),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[]},'message':_0xbc69c5(0x85)+_0x19cbe6[_0xbc69c5(0x87)]+_0xbc69c5(0x91)+_0xa9eac7+')'};}};function a156_0x5818(){const _0x5eabf3=['num','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','/smartapi/permit/role/delete','94924vttDOm','\x20(id=','delete','4698485otvmeS','11pxTiJY','3963230LOUotW','15330bfMeLQ','high-risk-write','16369452WEvIpj','183ArlkCR','8qhVDxu','appCode','1253CtUAds','Deleted\x20role\x20','role','roleName','15843FMaxzI','userCount','2361519vZSLqo','166lQeoDt','Role\x20still\x20has\x20'];a156_0x5818=function(){return _0x5eabf3;};return a156_0x5818();}
@@ -1 +1 @@
1
- const a156_0x5e77da=a156_0x5d6f;(function(_0x54eda6,_0x5c5956){const _0x435312=a156_0x5d6f,_0x18119c=_0x54eda6();while(!![]){try{const _0x46ecdf=-parseInt(_0x435312(0x73))/0x1*(parseInt(_0x435312(0x7b))/0x2)+parseInt(_0x435312(0x74))/0x3+parseInt(_0x435312(0x75))/0x4*(-parseInt(_0x435312(0x72))/0x5)+parseInt(_0x435312(0x77))/0x6*(parseInt(_0x435312(0x6c))/0x7)+parseInt(_0x435312(0x76))/0x8*(-parseInt(_0x435312(0x70))/0x9)+parseInt(_0x435312(0x6f))/0xa+parseInt(_0x435312(0x7c))/0xb;if(_0x46ecdf===_0x5c5956)break;else _0x18119c['push'](_0x18119c['shift']());}catch(_0x14cf79){_0x18119c['push'](_0x18119c['shift']());}}}(a156_0x336c,0xaf896));function a156_0x5d6f(_0x2fb3d1,_0x5ee7fc){_0x2fb3d1=_0x2fb3d1-0x6b;const _0x336cfa=a156_0x336c();let _0x5d6f18=_0x336cfa[_0x2fb3d1];return _0x5d6f18;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a156_0x336c(){const _0x1b5e06=['12dHKuvn','16zUxtyS','6rwZcsl','appCode','read','Role\x20','86aaqaDR','14003638sfhLRx','detail','Show\x20a\x20single\x20role\x27s\x20detail','4381993pBgQiT','roleType','role','3841570GWfLsI','5591493GZrRlG','roleName','1034080bdlXyM','3877iTGZBA','1396491JEakXR'];a156_0x336c=function(){return _0x1b5e06;};return a156_0x336c();}export const roleDetail={'service':a156_0x5e77da(0x6e),'command':a156_0x5e77da(0x7d),'description':a156_0x5e77da(0x6b),'risk':a156_0x5e77da(0x79),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x515711){const _0x13ec05=a156_0x5e77da,_0x479567=_0x515711['num']('id'),_0x203d7f=await getRoleById(_0x515711[_0x13ec05(0x78)],_0x479567);return{'ok':!![],'data':{'role':projectRole(_0x203d7f)},'message':_0x13ec05(0x7a)+_0x203d7f[_0x13ec05(0x71)]+'\x20('+_0x203d7f[_0x13ec05(0x6d)]+')'};}};
1
+ const a157_0x57786c=a157_0x37b1;(function(_0x290c60,_0x2cad40){const _0x3d5e01=a157_0x37b1,_0x1726c8=_0x290c60();while(!![]){try{const _0xc8a609=parseInt(_0x3d5e01(0x11e))/0x1+parseInt(_0x3d5e01(0x119))/0x2+-parseInt(_0x3d5e01(0x120))/0x3*(-parseInt(_0x3d5e01(0x121))/0x4)+-parseInt(_0x3d5e01(0x117))/0x5+parseInt(_0x3d5e01(0x11f))/0x6*(parseInt(_0x3d5e01(0x124))/0x7)+-parseInt(_0x3d5e01(0x122))/0x8*(-parseInt(_0x3d5e01(0x11b))/0x9)+-parseInt(_0x3d5e01(0x118))/0xa;if(_0xc8a609===_0x2cad40)break;else _0x1726c8['push'](_0x1726c8['shift']());}catch(_0x48b952){_0x1726c8['push'](_0x1726c8['shift']());}}}(a157_0x1af5,0xe0948));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a157_0x1af5(){const _0x423609=['19636090AimHrq','241876JXxojI','appCode','98181xJOLmT','Role\x20','num','1511092GLRxAD','1345854cSftUv','2945742cHwrKX','4aWlfkm','712HvaJRq','roleName','21FvysrI','role','detail','roleType','6871415DullGV'];a157_0x1af5=function(){return _0x423609;};return a157_0x1af5();}function a157_0x37b1(_0x328e2d,_0x1f7b96){_0x328e2d=_0x328e2d-0x115;const _0x1af5af=a157_0x1af5();let _0x37b19b=_0x1af5af[_0x328e2d];return _0x37b19b;}export const roleDetail={'service':a157_0x57786c(0x125),'command':a157_0x57786c(0x115),'description':'Show\x20a\x20single\x20role\x27s\x20detail','risk':'read','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x553376){const _0x1dcecd=a157_0x57786c,_0xb0c813=_0x553376[_0x1dcecd(0x11d)]('id'),_0x51b96d=await getRoleById(_0x553376[_0x1dcecd(0x11a)],_0xb0c813);return{'ok':!![],'data':{'role':projectRole(_0x51b96d)},'message':_0x1dcecd(0x11c)+_0x51b96d[_0x1dcecd(0x123)]+'\x20('+_0x51b96d[_0x1dcecd(0x116)]+')'};}};
@@ -1 +1 @@
1
- (function(_0x3e5b7d,_0x397777){const _0x59d15a=a157_0x281e,_0xf98b3=_0x3e5b7d();while(!![]){try{const _0x2ffa73=-parseInt(_0x59d15a(0x88))/0x1+-parseInt(_0x59d15a(0x8c))/0x2+-parseInt(_0x59d15a(0x82))/0x3*(-parseInt(_0x59d15a(0x8a))/0x4)+parseInt(_0x59d15a(0x85))/0x5*(parseInt(_0x59d15a(0x8b))/0x6)+-parseInt(_0x59d15a(0x83))/0x7+parseInt(_0x59d15a(0x89))/0x8*(-parseInt(_0x59d15a(0x86))/0x9)+-parseInt(_0x59d15a(0x87))/0xa*(-parseInt(_0x59d15a(0x84))/0xb);if(_0x2ffa73===_0x397777)break;else _0xf98b3['push'](_0xf98b3['shift']());}catch(_0x51d4c7){_0xf98b3['push'](_0xf98b3['shift']());}}}(a157_0x458f,0x6454e));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 a157_0x281e(_0x250c0b,_0x914817){_0x250c0b=_0x250c0b-0x82;const _0x458fbc=a157_0x458f();let _0x281e0e=_0x458fbc[_0x250c0b];return _0x281e0e;}import{roleDelete}from'../../commands/role/delete.js';function a157_0x458f(){const _0x3010ce=['388812PNNigS','2172684BYxmgy','1385426hOfzTv','5192176hyIyQz','35xXIwQT','1017qaHKEM','20afhObA','551628xyazDg','22696rKWnNu','4uNuGUa','6198FsAvKe'];a157_0x458f=function(){return _0x3010ce;};return a157_0x458f();}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(_0x260c2d,_0x50aaec){const _0xa8b7e9=a158_0x1fef,_0x1fdfef=_0x260c2d();while(!![]){try{const _0x2237f6=parseInt(_0xa8b7e9(0x13c))/0x1+-parseInt(_0xa8b7e9(0x13e))/0x2*(-parseInt(_0xa8b7e9(0x139))/0x3)+-parseInt(_0xa8b7e9(0x140))/0x4+parseInt(_0xa8b7e9(0x13b))/0x5+parseInt(_0xa8b7e9(0x13d))/0x6*(-parseInt(_0xa8b7e9(0x137))/0x7)+-parseInt(_0xa8b7e9(0x13a))/0x8*(parseInt(_0xa8b7e9(0x141))/0x9)+-parseInt(_0xa8b7e9(0x13f))/0xa*(-parseInt(_0xa8b7e9(0x138))/0xb);if(_0x2237f6===_0x50aaec)break;else _0x1fdfef['push'](_0x1fdfef['shift']());}catch(_0x22564e){_0x1fdfef['push'](_0x1fdfef['shift']());}}}(a158_0x451c,0xa7cba));function a158_0x451c(){const _0x30b125=['7104186DnFdeH','2064yHhaBL','26090IqcVFu','4430080aTgxAA','225864JiQFsr','7qVwPdr','2519LZHvjm','1977ufrfNt','16XqBjbX','4114585fJGYUM','928567ZfxtFL'];a158_0x451c=function(){return _0x30b125;};return a158_0x451c();}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';import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';function a158_0x1fef(_0x5d145f,_0x2d5594){_0x5d145f=_0x5d145f-0x137;const _0x451cbc=a158_0x451c();let _0x1fef64=_0x451cbc[_0x5d145f];return _0x1fef64;}export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
@@ -1 +1 @@
1
- const a158_0x21ed9e=a158_0x3404;(function(_0x457747,_0xa0118a){const _0x3326f3=a158_0x3404,_0x519955=_0x457747();while(!![]){try{const _0x154b61=parseInt(_0x3326f3(0x10a))/0x1*(parseInt(_0x3326f3(0x104))/0x2)+parseInt(_0x3326f3(0xf5))/0x3*(-parseInt(_0x3326f3(0x103))/0x4)+parseInt(_0x3326f3(0x101))/0x5*(parseInt(_0x3326f3(0xf7))/0x6)+parseInt(_0x3326f3(0x10e))/0x7*(parseInt(_0x3326f3(0xfe))/0x8)+-parseInt(_0x3326f3(0x116))/0x9*(-parseInt(_0x3326f3(0x110))/0xa)+-parseInt(_0x3326f3(0x10b))/0xb*(-parseInt(_0x3326f3(0x105))/0xc)+parseInt(_0x3326f3(0x102))/0xd;if(_0x154b61===_0xa0118a)break;else _0x519955['push'](_0x519955['shift']());}catch(_0x4c6f28){_0x519955['push'](_0x519955['shift']());}}}(a158_0x25e5,0x42773));function a158_0x3404(_0x1bbf56,_0x158543){_0x1bbf56=_0x1bbf56-0xf3;const _0x25e54a=a158_0x25e5();let _0x34047d=_0x25e54a[_0x1bbf56];return _0x34047d;}import{listAppRoles}from'../../core/api-client.js';function a158_0x25e5(){const _0x4315d5=['validation','number','read','includes','map','Found\x20','33SMNUVF','DEV','24YozHFG','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','appCode','Page\x20index\x20(1-based)','num','page','Filter\x20by\x20role\x20type','101224xnvkvo','toUpperCase','trim','101825dxSRYi','1217970cSPbeA','113908evFUJN','33946GJfbkw','84QfDSjr','join','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','ADMIN','type','1VTLNAN','979DgRlgy','string','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','161afXRoy','str','1017250aBvAdQ','roleType','Page\x20size\x20(1-100)','Use\x20one\x20of:\x20','Invalid\x20--type\x20\x22','CUSTOM','9AiLhHP','pagesize','\x20role(s)'];a158_0x25e5=function(){return _0x4315d5;};return a158_0x25e5();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a158_0x21ed9e(0x108),a158_0x21ed9e(0xf6),'USER',a158_0x21ed9e(0x115)];export const roleList={'service':'role','command':'list','description':a158_0x21ed9e(0x107),'risk':a158_0x21ed9e(0x11b),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a158_0x21ed9e(0x10c),'required':![],'description':a158_0x21ed9e(0xfd),'enum':ROLE_TYPES},{'name':a158_0x21ed9e(0xfc),'type':'number','description':a158_0x21ed9e(0xfa),'default':0x1},{'name':a158_0x21ed9e(0x117),'type':a158_0x21ed9e(0x11a),'description':a158_0x21ed9e(0x112),'default':0x64}],async 'validate'(_0x3d4c01){const _0x111713=a158_0x21ed9e,_0x1a2cee=_0x3d4c01[_0x111713(0x10f)](_0x111713(0x109))['trim']();if(_0x1a2cee&&!ROLE_TYPES[_0x111713(0x11c)](_0x1a2cee[_0x111713(0xff)]()))throw CliErrors[_0x111713(0x119)](_0x111713(0x114)+_0x1a2cee+'\x22.',_0x111713(0x113)+ROLE_TYPES[_0x111713(0x106)](',\x20')+'.');const _0x119625=_0x3d4c01[_0x111713(0xfb)](_0x111713(0xfc),0x1),_0x21672f=_0x3d4c01['num']('pagesize',0x64);if(_0x119625<0x1)throw CliErrors[_0x111713(0x119)](_0x111713(0xf8));if(_0x21672f<0x1||_0x21672f>0x64)throw CliErrors[_0x111713(0x119)](_0x111713(0x10d));},async 'execute'(_0x40457b){const _0xde7c7c=a158_0x21ed9e,_0x3e2169=_0x40457b[_0xde7c7c(0xfb)](_0xde7c7c(0xfc),0x1)||0x1,_0x22cf4a=_0x40457b['num'](_0xde7c7c(0x117),0x64)||0x64,_0x27ee00=_0x40457b[_0xde7c7c(0x10f)]('type')[_0xde7c7c(0x100)]()[_0xde7c7c(0xff)](),{items:_0x58e6c7,paging:_0x515b42}=await listAppRoles(_0x40457b[_0xde7c7c(0xf9)],{'currentPage':_0x3e2169,'pageSize':_0x22cf4a}),_0x43f953=_0x27ee00?_0x58e6c7['filter'](_0x54f8b8=>_0x54f8b8[_0xde7c7c(0x111)]===_0x27ee00):_0x58e6c7,_0x1f80a4=_0x43f953[_0xde7c7c(0xf3)](projectRole);return{'ok':!![],'data':{'roles':_0x1f80a4,'paging':_0x515b42},'message':_0xde7c7c(0xf4)+_0x1f80a4['length']+_0xde7c7c(0x118)};}};
1
+ const a159_0x475955=a159_0x46d0;(function(_0x106eeb,_0xe00b8){const _0x5dba3a=a159_0x46d0,_0x45949b=_0x106eeb();while(!![]){try{const _0x211f62=parseInt(_0x5dba3a(0x84))/0x1*(parseInt(_0x5dba3a(0x7e))/0x2)+parseInt(_0x5dba3a(0x8c))/0x3*(parseInt(_0x5dba3a(0x6d))/0x4)+parseInt(_0x5dba3a(0x76))/0x5*(-parseInt(_0x5dba3a(0x6c))/0x6)+-parseInt(_0x5dba3a(0x89))/0x7*(parseInt(_0x5dba3a(0x71))/0x8)+parseInt(_0x5dba3a(0x74))/0x9*(parseInt(_0x5dba3a(0x8a))/0xa)+-parseInt(_0x5dba3a(0x7a))/0xb+parseInt(_0x5dba3a(0x93))/0xc;if(_0x211f62===_0xe00b8)break;else _0x45949b['push'](_0x45949b['shift']());}catch(_0xc7a463){_0x45949b['push'](_0x45949b['shift']());}}}(a159_0x51cf,0x38344));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a159_0x51cf(){const _0x2b8db1=['number','Use\x20one\x20of:\x20','Page\x20size\x20(1-100)','Invalid\x20--type\x20\x22','1312787CkdIev','10vbvFXo','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','66JRJged','page','toUpperCase','pagesize','join','appCode','\x20role(s)','7629216DbzbzJ','12eoOFfs','24068bJCnzj','str','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','CUSTOM','16IFAPYi','string','filter','1075005ZNcCXy','Found\x20','674375nsbWMZ','roleType','Page\x20index\x20(1-based)','role','2399661bwJPtf','DEV','validation','trim','137072JkebqL','num','type','list','Filter\x20by\x20role\x20type','map','3beuuPw'];a159_0x51cf=function(){return _0x2b8db1;};return a159_0x51cf();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=['ADMIN',a159_0x475955(0x7b),'USER',a159_0x475955(0x70)];function a159_0x46d0(_0x5024df,_0xb01ac5){_0x5024df=_0x5024df-0x6c;const _0x51cf63=a159_0x51cf();let _0x46d050=_0x51cf63[_0x5024df];return _0x46d050;}export const roleList={'service':a159_0x475955(0x79),'command':a159_0x475955(0x81),'description':a159_0x475955(0x8b),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a159_0x475955(0x72),'required':![],'description':a159_0x475955(0x82),'enum':ROLE_TYPES},{'name':a159_0x475955(0x8d),'type':'number','description':a159_0x475955(0x78),'default':0x1},{'name':a159_0x475955(0x8f),'type':a159_0x475955(0x85),'description':a159_0x475955(0x87),'default':0x64}],async 'validate'(_0x45c49e){const _0x3d95ae=a159_0x475955,_0x39b892=_0x45c49e['str'](_0x3d95ae(0x80))[_0x3d95ae(0x7d)]();if(_0x39b892&&!ROLE_TYPES['includes'](_0x39b892['toUpperCase']()))throw CliErrors[_0x3d95ae(0x7c)](_0x3d95ae(0x88)+_0x39b892+'\x22.',_0x3d95ae(0x86)+ROLE_TYPES[_0x3d95ae(0x90)](',\x20')+'.');const _0x33a186=_0x45c49e[_0x3d95ae(0x7f)]('page',0x1),_0x1165f3=_0x45c49e[_0x3d95ae(0x7f)](_0x3d95ae(0x8f),0x64);if(_0x33a186<0x1)throw CliErrors[_0x3d95ae(0x7c)]('--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.');if(_0x1165f3<0x1||_0x1165f3>0x64)throw CliErrors['validation'](_0x3d95ae(0x6f));},async 'execute'(_0x565730){const _0x33f089=a159_0x475955,_0x59acf7=_0x565730['num']('page',0x1)||0x1,_0x2a4772=_0x565730[_0x33f089(0x7f)](_0x33f089(0x8f),0x64)||0x64,_0x36562d=_0x565730[_0x33f089(0x6e)](_0x33f089(0x80))[_0x33f089(0x7d)]()[_0x33f089(0x8e)](),{items:_0x52702c,paging:_0x1d30b3}=await listAppRoles(_0x565730[_0x33f089(0x91)],{'currentPage':_0x59acf7,'pageSize':_0x2a4772}),_0x448cea=_0x36562d?_0x52702c[_0x33f089(0x73)](_0x2289f4=>_0x2289f4[_0x33f089(0x77)]===_0x36562d):_0x52702c,_0x21293e=_0x448cea[_0x33f089(0x83)](projectRole);return{'ok':!![],'data':{'roles':_0x21293e,'paging':_0x1d30b3},'message':_0x33f089(0x75)+_0x21293e['length']+_0x33f089(0x92)};}};