@lovrabet/rabetbase-cli 2.0.9 → 2.0.11

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 (138) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/logout.js +1 -1
  11. package/lib/cli-flags.js +1 -1
  12. package/lib/cli.js +1 -1
  13. package/lib/commands/api/doc.js +1 -1
  14. package/lib/commands/api/index.js +1 -1
  15. package/lib/commands/api/list.js +1 -1
  16. package/lib/commands/api/pull.js +1 -1
  17. package/lib/commands/api/shared.js +1 -1
  18. package/lib/commands/app/add.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/remote.js +1 -1
  22. package/lib/commands/app/remove.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app/use.js +1 -1
  25. package/lib/commands/auth/index.js +1 -1
  26. package/lib/commands/bff/delete.js +1 -1
  27. package/lib/commands/bff/detail.js +1 -1
  28. package/lib/commands/bff/index.js +1 -1
  29. package/lib/commands/bff/list.js +1 -1
  30. package/lib/commands/bff/new.js +1 -1
  31. package/lib/commands/bff/pull.js +1 -1
  32. package/lib/commands/bff/push.js +1 -1
  33. package/lib/commands/bff/status.js +1 -1
  34. package/lib/commands/cli-update.js +1 -1
  35. package/lib/commands/codegen/index.js +1 -1
  36. package/lib/commands/codegen/sdk.js +1 -1
  37. package/lib/commands/codegen/sql.js +1 -1
  38. package/lib/commands/common/app-selector.js +1 -1
  39. package/lib/commands/common/flags.js +1 -1
  40. package/lib/commands/common/validate.js +1 -1
  41. package/lib/commands/config/get.js +1 -1
  42. package/lib/commands/config/index.js +1 -1
  43. package/lib/commands/config/list.js +1 -1
  44. package/lib/commands/config/set.js +1 -1
  45. package/lib/commands/config/shared.js +1 -1
  46. package/lib/commands/dataset/detail.js +1 -1
  47. package/lib/commands/dataset/index.js +1 -1
  48. package/lib/commands/dataset/links.js +1 -1
  49. package/lib/commands/dataset/list.js +1 -1
  50. package/lib/commands/dataset/operations.js +1 -1
  51. package/lib/commands/doctor.js +1 -1
  52. package/lib/commands/init/index.js +1 -1
  53. package/lib/commands/logs/index.js +1 -1
  54. package/lib/commands/menu/index.js +1 -1
  55. package/lib/commands/menu/shared/compare-table.js +1 -1
  56. package/lib/commands/menu/shared/index.js +1 -1
  57. package/lib/commands/menu/shared/inquirer.js +1 -1
  58. package/lib/commands/menu/shared/local-pages.js +1 -1
  59. package/lib/commands/menu/shared/logic.js +1 -1
  60. package/lib/commands/menu/shared/service.js +1 -1
  61. package/lib/commands/menu/shared/sync-core.js +1 -1
  62. package/lib/commands/menu/shared/update-core.js +1 -1
  63. package/lib/commands/menu/shared/valid-url.js +1 -1
  64. package/lib/commands/menu/sync.js +1 -1
  65. package/lib/commands/menu/update.js +1 -1
  66. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  67. package/lib/commands/project/create/format-elapsed.js +1 -1
  68. package/lib/commands/project/create/main.js +1 -1
  69. package/lib/commands/project/create/non-interactive.js +1 -1
  70. package/lib/commands/project/create/project-template-path.js +1 -1
  71. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  72. package/lib/commands/project/create/use-format-code.js +1 -1
  73. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  74. package/lib/commands/project/index.js +1 -1
  75. package/lib/commands/project/init.js +1 -1
  76. package/lib/commands/project/upgrade.js +1 -1
  77. package/lib/commands/registry.js +1 -1
  78. package/lib/commands/run/index.js +1 -1
  79. package/lib/commands/schema.js +1 -1
  80. package/lib/commands/skill/index.js +1 -1
  81. package/lib/commands/sql/detail.js +1 -1
  82. package/lib/commands/sql/exec.js +1 -1
  83. package/lib/commands/sql/index.js +1 -1
  84. package/lib/commands/sql/list.js +1 -1
  85. package/lib/commands/sql/save.js +1 -1
  86. package/lib/commands/sql/validate.js +1 -1
  87. package/lib/constant/cli.js +1 -1
  88. package/lib/constant/domain.js +1 -1
  89. package/lib/constant/env.js +1 -1
  90. package/lib/constant/paths.js +1 -0
  91. package/lib/context.js +1 -1
  92. package/lib/core/alias-resolver.js +1 -1
  93. package/lib/core/api-client.js +1 -1
  94. package/lib/core/bff/config.js +1 -1
  95. package/lib/core/bff/file-system.js +1 -1
  96. package/lib/core/bff/hash.js +1 -1
  97. package/lib/core/bff/lock.js +1 -1
  98. package/lib/core/bff/utils.js +1 -1
  99. package/lib/core/db-resolver.js +1 -1
  100. package/lib/core/sql-validator.js +1 -1
  101. package/lib/errors.js +1 -1
  102. package/lib/framework/build-all-flags.js +1 -1
  103. package/lib/framework/flags.js +1 -1
  104. package/lib/framework/help.js +1 -1
  105. package/lib/framework/index.js +1 -1
  106. package/lib/framework/output.js +1 -1
  107. package/lib/framework/response.js +1 -1
  108. package/lib/framework/runner.js +1 -1
  109. package/lib/framework/schema-export.js +1 -1
  110. package/lib/framework/types.js +1 -1
  111. package/lib/generated/build-info.js +1 -1
  112. package/lib/help.js +1 -1
  113. package/lib/skills/main.js +1 -1
  114. package/lib/skills/npx-skills-add.js +1 -1
  115. package/lib/telemetry/cli-command-trace.js +1 -1
  116. package/lib/telemetry/cli-help-trace.js +1 -1
  117. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  118. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  119. package/lib/telemetry/send-cli-trace-log.js +1 -1
  120. package/lib/utils/ai_config.js +1 -1
  121. package/lib/utils/apply-jq-filter.js +1 -1
  122. package/lib/utils/cdn-config.js +1 -1
  123. package/lib/utils/check-sdk-version.js +1 -1
  124. package/lib/utils/cli-version-check.js +1 -1
  125. package/lib/utils/config.js +1 -1
  126. package/lib/utils/copy-directory.js +1 -1
  127. package/lib/utils/file-utils.js +1 -1
  128. package/lib/utils/guides-cdn.js +1 -1
  129. package/lib/utils/http-client.js +1 -1
  130. package/lib/utils/is-non-interactive.js +1 -1
  131. package/lib/utils/logger.js +1 -1
  132. package/lib/utils/platform.js +1 -1
  133. package/lib/utils/rules-cdn.js +1 -1
  134. package/lib/utils/sleep.js +1 -1
  135. package/lib/utils/template-replacer.js +1 -1
  136. package/lib/utils/version.js +1 -1
  137. package/lib/utils/with-active-cookie.js +1 -1
  138. package/package.json +2 -2
@@ -1 +1 @@
1
- function a67_0x2b34(_0x35a152,_0x1f8676){_0x35a152=_0x35a152-0xcc;const _0x4fed50=a67_0x4fed();let _0x2b346c=_0x4fed50[_0x35a152];return _0x2b346c;}(function(_0x39f032,_0x2a3687){const _0x307c56=a67_0x2b34,_0xd1a9bf=_0x39f032();while(!![]){try{const _0x1578c3=-parseInt(_0x307c56(0xcf))/0x1*(parseInt(_0x307c56(0xd6))/0x2)+-parseInt(_0x307c56(0xd3))/0x3*(parseInt(_0x307c56(0xd1))/0x4)+-parseInt(_0x307c56(0xd7))/0x5+-parseInt(_0x307c56(0xcd))/0x6+parseInt(_0x307c56(0xd0))/0x7+-parseInt(_0x307c56(0xd2))/0x8*(parseInt(_0x307c56(0xcc))/0x9)+parseInt(_0x307c56(0xd4))/0xa;if(_0x1578c3===_0x2a3687)break;else _0xd1a9bf['push'](_0xd1a9bf['shift']());}catch(_0x378fba){_0xd1a9bf['push'](_0xd1a9bf['shift']());}}}(a67_0x4fed,0x651ea));function a67_0x4fed(){const _0x26306e=['134984hUGXNX','2719087MsKFtD','428728QvrDIe','104ETVajS','6gDteka','17301250ANCCbw','toFixed','2ZtrcLa','103370VeZoFI','526077rDparz','3446814fByrFt','replace'];a67_0x4fed=function(){return _0x26306e;};return a67_0x4fed();}export function formatElapsed(_0x2e7ea9){const _0xd3b8e1=a67_0x2b34,_0x30a29c=Date['now']()-_0x2e7ea9;if(_0x30a29c<0x3e8)return _0x30a29c+'ms';const _0xbc6fe9=(_0x30a29c/0x3e8)[_0xd3b8e1(0xd5)](0x2),_0x2de29c=_0xbc6fe9[_0xd3b8e1(0xce)](/\.?0+$/u,'');return _0x2de29c+'s';}
1
+ function a67_0x11f7(){const _0x51d913=['now','24088020oMHciE','97321ixWYJO','1300149AYuCoV','24ceBufI','10fwPTns','1329KdVsXX','696792bnVPqQ','5972628JuCkTH','562GMzzGh','536XLbukV','651020CgLYmP'];a67_0x11f7=function(){return _0x51d913;};return a67_0x11f7();}function a67_0x1ac6(_0x3b0790,_0x503241){_0x3b0790=_0x3b0790-0xfb;const _0x11f7de=a67_0x11f7();let _0x1ac639=_0x11f7de[_0x3b0790];return _0x1ac639;}(function(_0xc62398,_0x5a05dd){const _0x245b36=a67_0x1ac6,_0x380a91=_0xc62398();while(!![]){try{const _0x456e52=-parseInt(_0x245b36(0xfe))/0x1+parseInt(_0x245b36(0x100))/0x2*(parseInt(_0x245b36(0xfd))/0x3)+-parseInt(_0x245b36(0xfb))/0x4*(parseInt(_0x245b36(0x102))/0x5)+-parseInt(_0x245b36(0xff))/0x6+parseInt(_0x245b36(0x105))/0x7*(parseInt(_0x245b36(0x101))/0x8)+-parseInt(_0x245b36(0x106))/0x9+-parseInt(_0x245b36(0xfc))/0xa*(-parseInt(_0x245b36(0x104))/0xb);if(_0x456e52===_0x5a05dd)break;else _0x380a91['push'](_0x380a91['shift']());}catch(_0x3d7d7c){_0x380a91['push'](_0x380a91['shift']());}}}(a67_0x11f7,0x994b1));export function formatElapsed(_0x308c4b){const _0x18ca16=a67_0x1ac6,_0x5b1eb9=Date[_0x18ca16(0x103)]()-_0x308c4b;if(_0x5b1eb9<0x3e8)return _0x5b1eb9+'ms';const _0x2dc62b=(_0x5b1eb9/0x3e8)['toFixed'](0x2),_0x5b9f43=_0x2dc62b['replace'](/\.?0+$/u,'');return _0x5b9f43+'s';}
@@ -1 +1 @@
1
- (function(_0xe030a9,_0x570baa){const _0x5eb33e=a68_0x2890,_0x397bbc=_0xe030a9();while(!![]){try{const _0x3a1115=parseInt(_0x5eb33e(0xa4))/0x1*(parseInt(_0x5eb33e(0xc6))/0x2)+parseInt(_0x5eb33e(0xce))/0x3*(parseInt(_0x5eb33e(0xc9))/0x4)+parseInt(_0x5eb33e(0xf6))/0x5*(parseInt(_0x5eb33e(0xf4))/0x6)+-parseInt(_0x5eb33e(0xf1))/0x7*(-parseInt(_0x5eb33e(0xc7))/0x8)+-parseInt(_0x5eb33e(0xe2))/0x9*(parseInt(_0x5eb33e(0xb5))/0xa)+-parseInt(_0x5eb33e(0xb0))/0xb+parseInt(_0x5eb33e(0xbf))/0xc;if(_0x3a1115===_0x570baa)break;else _0x397bbc['push'](_0x397bbc['shift']());}catch(_0x3ecac5){_0x397bbc['push'](_0x397bbc['shift']());}}}(a68_0x10ba,0x8f240));function a68_0x10ba(){const _0x17a854=['fail','length','start','Copy\x20project\x20files','更新\x20package.json\x20失败','existsSync','gray','join','CLI\x20版本检查','env','Format\x20code','1.0.0','*\x20Configuring\x20AppCode\x20for\x20project\x20','stableVersion','info','81OaBcvA','trim','清理项目目录失败:\x20','readFileSync','√\x20package.json\x20updated:\x20name=','projectCode','Project\x20directory\x20','needsUpgrade','toLocaleString','error','utf8','\x20Generated\x20by\x20rabetbase\x20cli\x20','更新\x20package.json\x20name','writeFileSync','\x20|\x20AppCode:\x20','64421gdrqAE','API\x20配置拉取异常','package.json','126wQenMA','./src/api/','10885rGVZTv','cwd','currentVersion','\x20\x202.\x20Pull\x20API\x20configuration:\x20','cookie','parse','description','...','2641CUeLbX','\x20√\x20','项目创建完成:\x20','Project\x20name\x20cannot\x20be\x20empty','string','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','chdir','accessSync','Install\x20dependencies','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','\x20dataset(s),\x20generated\x20','开始创建项目:\x20','414073PJYQcz','\x20model(s)','\x20\x201.\x20Start\x20project:\x20','version','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','960790bHrurk','配置应用AppCode:\x20','create','resolve','message','repeat','cd\x20','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','🚀\x20Next\x20Steps:','√\x20Pulled\x20','4564860UABAis','√\x20Configuration\x20file\x20created,\x20AppCode:\x20','log','rmSync','appCode','name','bold','66coDNaz','632UJumyF','*\x20Pulling\x20API\x20configuration...','28CiodiS','test','green','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','projectName','106434ZkUtOM','stringify','cyan','modelCount','\x20api\x20pull'];a68_0x10ba=function(){return _0x17a854;};return a68_0x10ba();}import a68_0x2c5919 from'path';import a68_0x5c215e from'fs';import a68_0x556ec1 from'chalk';import a68_0x1559b7 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../api/fetch-model-list.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';function a68_0x2890(_0x112f07,_0x4ba4bf){_0x112f07=_0x112f07-0xa4;const _0x10baa3=a68_0x10ba();let _0x28901a=_0x10baa3[_0x112f07];return _0x28901a;}import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x34a92e){const _0x265ace=a68_0x2890,_0x3499b8=await checkCliVersion();_0x3499b8[_0x265ace(0xe9)]&&(printCliUpgradeWarning(_0x3499b8),logger[_0x265ace(0xe1)]('create',_0x265ace(0xdb),{'currentVersion':_0x3499b8[_0x265ace(0xf8)],'stableVersion':_0x3499b8[_0x265ace(0xe0)],'needsUpgrade':_0x3499b8[_0x265ace(0xe9)]}));if(_0x34a92e[_0x265ace(0xe7)]&&_0x34a92e[_0x265ace(0xc3)])await runCreate({'projectName':_0x34a92e[_0x265ace(0xe7)],'appCode':_0x34a92e[_0x265ace(0xc3)],'env':_0x34a92e[_0x265ace(0xdc)]},_0x34a92e);else{if(_0x34a92e[_0x265ace(0xe7)]){const _0x3ed2a1=await selectSingleAppcode(_0x34a92e[_0x265ace(0xfa)]);await runCreate({'projectName':_0x34a92e[_0x265ace(0xe7)],'appCode':_0x3ed2a1||undefined,'env':_0x34a92e[_0x265ace(0xdc)]},_0x34a92e);}else await guidedCreateProject(_0xe68afe=>runCreate(_0xe68afe,_0x34a92e),_0x34a92e[_0x265ace(0xdc)],_0x34a92e[_0x265ace(0xfa)]);}}async function runCreate(_0x42795b,_0x56f5a3){const _0x45336=a68_0x2890;if(!_0x42795b[_0x45336(0xcd)]||_0x42795b[_0x45336(0xcd)][_0x45336(0xe3)]()==='')throw new Error(_0x45336(0xa7));const _0xd62afa=/[<>:"|?*\x00-\x1f\x7f]/;if(_0xd62afa[_0x45336(0xca)](_0x42795b['projectName']))throw new Error(_0x45336(0xbc));if(_0x42795b[_0x45336(0xcd)]['length']>0x64)throw new Error('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters');const _0x19a52a=a68_0x2c5919['resolve'](process['cwd'](),_0x42795b[_0x45336(0xcd)]);if(a68_0x5c215e[_0x45336(0xd8)](_0x19a52a))throw new Error(_0x45336(0xe8)+_0x42795b[_0x45336(0xcd)]+'\x20already\x20exists');try{a68_0x5c215e[_0x45336(0xab)](a68_0x2c5919['dirname'](_0x19a52a),a68_0x5c215e['constants']['W_OK']);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger['setLogPath'](_0x19a52a),logger[_0x45336(0xe1)](_0x45336(0xb7),_0x45336(0xaf)+_0x42795b[_0x45336(0xcd)],{'projectDir':_0x19a52a,'appCode':_0x42795b[_0x45336(0xc3)]}),console['log'](),console[_0x45336(0xc1)](a68_0x556ec1[_0x45336(0xcb)](_0x45336(0xa5))+'Project\x20name:\x20'+a68_0x556ec1['green'](_0x42795b[_0x45336(0xcd)])+(_0x42795b['appCode']?_0x45336(0xf0)+a68_0x556ec1[_0x45336(0xd0)](_0x42795b[_0x45336(0xc3)]):''));try{await runTask(_0x45336(0xd6),()=>copyProjectTemplate(_0x42795b['projectName'])),await updatePackageJsonName(_0x42795b[_0x45336(0xcd)]),await runTask(_0x45336(0xac),()=>installDependencies(_0x42795b['projectName'])),await runTask(_0x45336(0xdd),()=>formatProjectCode(_0x42795b[_0x45336(0xcd)])),await configureAppCode(_0x42795b[_0x45336(0xcd)],_0x42795b[_0x45336(0xc3)]||'',_0x42795b[_0x45336(0xdc)]);let _0x264c8a=![];if(_0x42795b[_0x45336(0xc3)]){console[_0x45336(0xc1)](_0x45336(0xc8));const _0x1c994d=process[_0x45336(0xf7)]();try{process[_0x45336(0xaa)](_0x19a52a);const _0xab4084=_0x42795b['env']||'production';initEnv(_0xab4084);const {configArray:_0x43735b}=await fetchModelList(_0x42795b[_0x45336(0xc3)],_0x56f5a3[_0x45336(0xfa)]||''),_0x5f2e4f=_0x45336(0xf5),_0x27a34e=await generateApiFile(_0x43735b,'',_0x42795b[_0x45336(0xc3)],!![],_0xab4084,_0x5f2e4f);console['log'](_0x45336(0xbe)+_0x43735b[_0x45336(0xd4)]+_0x45336(0xae)+_0x27a34e[_0x45336(0xd1)]+_0x45336(0xb1)),logger[_0x45336(0xe1)]('create','API\x20configuration\x20pulled:\x20'+_0x42795b[_0x45336(0xc3)]);}catch(_0x12dfe3){_0x264c8a=!![],console[_0x45336(0xc1)](_0x45336(0xad)),logger['warn'](_0x45336(0xb7),_0x45336(0xf2),{'error':_0x12dfe3 instanceof Error?_0x12dfe3['message']:String(_0x12dfe3)});}finally{process['chdir'](_0x1c994d);}}logger['success'](_0x45336(0xb7),_0x45336(0xa6)+_0x42795b[_0x45336(0xcd)]),console[_0x45336(0xc1)](),console[_0x45336(0xc1)](a68_0x556ec1[_0x45336(0xcb)]('─'[_0x45336(0xba)](0x3c))),console[_0x45336(0xc1)](a68_0x556ec1[_0x45336(0xd0)][_0x45336(0xc5)](_0x45336(0xbd))),console[_0x45336(0xc1)](),console[_0x45336(0xc1)](_0x45336(0xb2)+a68_0x556ec1[_0x45336(0xd0)][_0x45336(0xc5)](_0x45336(0xbb)+_0x42795b[_0x45336(0xcd)]+'\x20&&\x20'+CLI_BIN_NAME+'\x20run\x20start')),_0x264c8a&&console[_0x45336(0xc1)](_0x45336(0xf9)+a68_0x556ec1[_0x45336(0xd0)][_0x45336(0xc5)](CLI_BIN_NAME+_0x45336(0xd2))),console['log'](a68_0x556ec1['green']('─'[_0x45336(0xba)](0x3c)));}catch(_0x2df544){logger[_0x45336(0xeb)](_0x45336(0xb7),'项目创建失败:\x20'+_0x42795b[_0x45336(0xcd)],{'error':_0x2df544 instanceof Error?_0x2df544[_0x45336(0xb9)]:String(_0x2df544)});try{a68_0x5c215e[_0x45336(0xd8)](_0x19a52a)&&(console[_0x45336(0xc1)](_0x45336(0xcc)+_0x19a52a),a68_0x5c215e[_0x45336(0xc2)](_0x19a52a,{'recursive':!![],'force':!![]}));}catch{logger['warn'](_0x45336(0xb7),_0x45336(0xe4)+_0x19a52a);}throw _0x2df544;}}async function runTask(_0x4b34ce,_0x427c3a){const _0x335ee7=a68_0x2890,_0x2f5d96=a68_0x1559b7(_0x4b34ce+_0x335ee7(0xfd))[_0x335ee7(0xd5)]();try{const _0x3cea13=await _0x427c3a();_0x2f5d96['stop'](),console['log'](''+a68_0x556ec1[_0x335ee7(0xcb)](_0x335ee7(0xa5))+_0x4b34ce+'\x20'+a68_0x556ec1[_0x335ee7(0xd9)]('['+_0x3cea13+']'));}catch(_0x4df7de){_0x2f5d96[_0x335ee7(0xd3)](_0x4b34ce);throw _0x4df7de;}}async function updatePackageJsonName(_0x565f9d){const _0x473dc6=a68_0x2890,_0x5d11e8=a68_0x2c5919[_0x473dc6(0xb8)](process[_0x473dc6(0xf7)](),_0x565f9d),_0x4d2564=a68_0x2c5919[_0x473dc6(0xda)](_0x5d11e8,_0x473dc6(0xf3));try{console['log'](_0x473dc6(0xa9));const _0xf7b40a=getRabetbaseCliPackageRoot(),_0x936bc4=a68_0x2c5919[_0x473dc6(0xda)](_0xf7b40a,_0x473dc6(0xf3));let _0x4063a9=_0x473dc6(0xde);try{const _0xbf70a0=JSON[_0x473dc6(0xfb)](a68_0x5c215e['readFileSync'](_0x936bc4,_0x473dc6(0xec)));_0x4063a9=_0xbf70a0[_0x473dc6(0xb3)]||_0x473dc6(0xde);}catch{}const _0x5f2dff=a68_0x5c215e[_0x473dc6(0xe5)](_0x4d2564,_0x473dc6(0xec)),_0x28fb9c=JSON[_0x473dc6(0xfb)](_0x5f2dff);_0x28fb9c[_0x473dc6(0xc4)]=_0x565f9d,_0x28fb9c[_0x473dc6(0xfc)]=_0x565f9d+_0x473dc6(0xed)+_0x4063a9,a68_0x5c215e[_0x473dc6(0xef)](_0x4d2564,JSON[_0x473dc6(0xcf)](_0x28fb9c,null,0x2)+'\x0a','utf8'),console[_0x473dc6(0xc1)](_0x473dc6(0xe6)+_0x565f9d),logger['info'](_0x473dc6(0xb7),_0x473dc6(0xee));}catch(_0x1a30e5){logger[_0x473dc6(0xeb)](_0x473dc6(0xb7),_0x473dc6(0xd7));throw _0x1a30e5;}}async function configureAppCode(_0x2cc5b5,_0x268230,_0x5fc81c){const _0x2fb4ba=a68_0x2890,_0x23b768=a68_0x2c5919[_0x2fb4ba(0xb8)](process['cwd'](),_0x2cc5b5),_0x2c0e29=a68_0x2c5919['join'](_0x23b768,NEW_CONFIG_NAME);try{_0x268230?console['log'](_0x2fb4ba(0xdf)+_0x2cc5b5+':\x20'+_0x268230):console[_0x2fb4ba(0xc1)](_0x2fb4ba(0xb4)+_0x2cc5b5);const _0x5126ef=getRabetbaseCliPackageRoot(),_0x4a8afe=a68_0x2c5919['join'](_0x5126ef,_0x2fb4ba(0xf3));let _0xa82476=_0x2fb4ba(0xde);try{const _0x42f401=JSON['parse'](a68_0x5c215e['readFileSync'](_0x4a8afe,'utf8'));_0xa82476=_0x42f401[_0x2fb4ba(0xb3)]||_0x2fb4ba(0xde);}catch{}const _0x94bd0c=readConfig(),_0x136cde=typeof _0x94bd0c[_0x2fb4ba(0xdc)]===_0x2fb4ba(0xa8)?_0x94bd0c['env']:undefined,{app:_0x47d23b,appcode:_0x28e007,..._0x50a125}=_0x94bd0c,_0x297674={..._0x50a125,'appcode':_0x268230||'','env':_0x5fc81c||_0x136cde||'production','createdAt':new Date()[_0x2fb4ba(0xea)](),'version':_0xa82476};writeConfigFile(_0x2c0e29,_0x297674),_0x268230?console['log'](_0x2fb4ba(0xc0)+_0x268230):console['log']('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+'\x20config\x20set\x20appcode\x20<app-code>\x27'),logger[_0x2fb4ba(0xe1)](_0x2fb4ba(0xb7),_0x2fb4ba(0xb6)+_0x268230);}catch(_0x456602){logger['error'](_0x2fb4ba(0xb7),'配置应用AppCode失败');}}
1
+ (function(_0x14076f,_0x3d2b4d){const _0x2aacc7=a68_0x4bf1,_0x1bb760=_0x14076f();while(!![]){try{const _0x5b6f69=parseInt(_0x2aacc7(0x132))/0x1+-parseInt(_0x2aacc7(0x15a))/0x2+-parseInt(_0x2aacc7(0x15b))/0x3*(parseInt(_0x2aacc7(0x152))/0x4)+parseInt(_0x2aacc7(0x150))/0x5+-parseInt(_0x2aacc7(0x130))/0x6+parseInt(_0x2aacc7(0x153))/0x7*(-parseInt(_0x2aacc7(0x163))/0x8)+parseInt(_0x2aacc7(0x120))/0x9;if(_0x5b6f69===_0x3d2b4d)break;else _0x1bb760['push'](_0x1bb760['shift']());}catch(_0x2f7aa4){_0x1bb760['push'](_0x1bb760['shift']());}}}(a68_0x4ca9,0x1da13));import a68_0x1037ca from'path';import a68_0x4be052 from'fs';import a68_0x7fc951 from'chalk';import a68_0x37cc91 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../api/fetch-model-list.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';function a68_0x4bf1(_0x8ac2f2,_0x1c41fb){_0x8ac2f2=_0x8ac2f2-0x119;const _0x4ca9f9=a68_0x4ca9();let _0x4bf184=_0x4ca9f9[_0x8ac2f2];return _0x4bf184;}import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';function a68_0x4ca9(){const _0x2d3047=['length','W_OK','stableVersion','...','\x20Generated\x20by\x20rabetbase\x20cli\x20','更新\x20package.json\x20失败','√\x20Pulled\x20','name','API\x20configuration\x20pulled:\x20','toLocaleString','constants','package.json','490896TellWG','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','60184pioffX','\x20run\x20start','setLogPath','green','message','1.0.0','projectName','utf8','bold','error','create','writeFileSync','\x20\x202.\x20Pull\x20API\x20configuration:\x20','API\x20配置拉取异常','cookie','success','accessSync','join','readFileSync','warn','\x20&&\x20','配置应用AppCode失败','√\x20package.json\x20updated:\x20name=','stringify','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','currentVersion','Project\x20name\x20cannot\x20be\x20empty','清理项目目录失败:\x20','version','\x20dataset(s),\x20generated\x20','650140sUGqmF','env','1912JPBdvD','7JXeXRb','appCode','existsSync','项目创建失败:\x20','CLI\x20版本检查','parse','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','219470TUezjl','261GqQnRO','start','resolve','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','info','开始创建项目:\x20','gray','string','734680juRCiv','production','配置应用AppCode:\x20','*\x20Configuring\x20AppCode\x20for\x20project\x20','\x20√\x20','fail','项目创建完成:\x20','cyan','Format\x20code','dirname','cwd','needsUpgrade','🚀\x20Next\x20Steps:','\x20model(s)','log','modelCount','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','projectCode','2305107rEBJcI','rmSync','trim','stop'];a68_0x4ca9=function(){return _0x2d3047;};return a68_0x4ca9();}import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x3bc626){const _0x10315a=a68_0x4bf1,_0x45c21e=await checkCliVersion();_0x45c21e[_0x10315a(0x119)]&&(printCliUpgradeWarning(_0x45c21e),logger['info']('create',_0x10315a(0x157),{'currentVersion':_0x45c21e[_0x10315a(0x14b)],'stableVersion':_0x45c21e[_0x10315a(0x126)],'needsUpgrade':_0x45c21e[_0x10315a(0x119)]}));if(_0x3bc626[_0x10315a(0x11f)]&&_0x3bc626[_0x10315a(0x154)])await runCreate({'projectName':_0x3bc626['projectCode'],'appCode':_0x3bc626[_0x10315a(0x154)],'env':_0x3bc626[_0x10315a(0x151)]},_0x3bc626);else{if(_0x3bc626[_0x10315a(0x11f)]){const _0x5add19=await selectSingleAppcode(_0x3bc626[_0x10315a(0x140)]);await runCreate({'projectName':_0x3bc626[_0x10315a(0x11f)],'appCode':_0x5add19||undefined,'env':_0x3bc626[_0x10315a(0x151)]},_0x3bc626);}else await guidedCreateProject(_0x3e90e3=>runCreate(_0x3e90e3,_0x3bc626),_0x3bc626[_0x10315a(0x151)],_0x3bc626[_0x10315a(0x140)]);}}async function runCreate(_0x37813b,_0x7d56b7){const _0x2dc5f8=a68_0x4bf1;if(!_0x37813b[_0x2dc5f8(0x138)]||_0x37813b[_0x2dc5f8(0x138)][_0x2dc5f8(0x122)]()==='')throw new Error(_0x2dc5f8(0x14c));const _0x5e6be9=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x5e6be9['test'](_0x37813b['projectName']))throw new Error(_0x2dc5f8(0x11e));if(_0x37813b[_0x2dc5f8(0x138)][_0x2dc5f8(0x124)]>0x64)throw new Error(_0x2dc5f8(0x15e));const _0x225524=a68_0x1037ca['resolve'](process['cwd'](),_0x37813b[_0x2dc5f8(0x138)]);if(a68_0x4be052[_0x2dc5f8(0x155)](_0x225524))throw new Error('Project\x20directory\x20'+_0x37813b['projectName']+'\x20already\x20exists');try{a68_0x4be052[_0x2dc5f8(0x142)](a68_0x1037ca[_0x2dc5f8(0x16c)](_0x225524),a68_0x4be052[_0x2dc5f8(0x12e)][_0x2dc5f8(0x125)]);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x2dc5f8(0x134)](_0x225524),logger[_0x2dc5f8(0x15f)](_0x2dc5f8(0x13c),_0x2dc5f8(0x160)+_0x37813b[_0x2dc5f8(0x138)],{'projectDir':_0x225524,'appCode':_0x37813b[_0x2dc5f8(0x154)]}),console[_0x2dc5f8(0x11c)](),console[_0x2dc5f8(0x11c)](a68_0x7fc951['green'](_0x2dc5f8(0x167))+'Project\x20name:\x20'+a68_0x7fc951[_0x2dc5f8(0x135)](_0x37813b[_0x2dc5f8(0x138)])+(_0x37813b[_0x2dc5f8(0x154)]?'\x20|\x20AppCode:\x20'+a68_0x7fc951[_0x2dc5f8(0x16a)](_0x37813b[_0x2dc5f8(0x154)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x37813b[_0x2dc5f8(0x138)])),await updatePackageJsonName(_0x37813b['projectName']),await runTask('Install\x20dependencies',()=>installDependencies(_0x37813b['projectName'])),await runTask(_0x2dc5f8(0x16b),()=>formatProjectCode(_0x37813b['projectName'])),await configureAppCode(_0x37813b['projectName'],_0x37813b['appCode']||'',_0x37813b['env']);let _0x1fd39d=![];if(_0x37813b[_0x2dc5f8(0x154)]){console['log']('*\x20Pulling\x20API\x20configuration...');const _0x458dfe=process[_0x2dc5f8(0x16d)]();try{process['chdir'](_0x225524);const _0x108e98=_0x37813b[_0x2dc5f8(0x151)]||_0x2dc5f8(0x164);initEnv(_0x108e98);const {configArray:_0x4b13f8}=await fetchModelList(_0x37813b[_0x2dc5f8(0x154)],_0x7d56b7[_0x2dc5f8(0x140)]||''),_0x30dfc7=DEFAULT_API_DIR,_0x30f484=await generateApiFile(_0x4b13f8,'',_0x37813b[_0x2dc5f8(0x154)],!![],_0x108e98,_0x30dfc7);console['log'](_0x2dc5f8(0x12a)+_0x4b13f8[_0x2dc5f8(0x124)]+_0x2dc5f8(0x14f)+_0x30f484[_0x2dc5f8(0x11d)]+_0x2dc5f8(0x11b)),logger[_0x2dc5f8(0x15f)](_0x2dc5f8(0x13c),_0x2dc5f8(0x12c)+_0x37813b['appCode']);}catch(_0x143391){_0x1fd39d=!![],console['log'](_0x2dc5f8(0x159)),logger[_0x2dc5f8(0x145)](_0x2dc5f8(0x13c),_0x2dc5f8(0x13f),{'error':_0x143391 instanceof Error?_0x143391[_0x2dc5f8(0x136)]:String(_0x143391)});}finally{process['chdir'](_0x458dfe);}}logger[_0x2dc5f8(0x141)](_0x2dc5f8(0x13c),_0x2dc5f8(0x169)+_0x37813b['projectName']),console[_0x2dc5f8(0x11c)](),console[_0x2dc5f8(0x11c)](a68_0x7fc951[_0x2dc5f8(0x135)]('─'['repeat'](0x3c))),console[_0x2dc5f8(0x11c)](a68_0x7fc951['cyan'][_0x2dc5f8(0x13a)](_0x2dc5f8(0x11a))),console['log'](),console[_0x2dc5f8(0x11c)]('\x20\x201.\x20Start\x20project:\x20'+a68_0x7fc951['cyan'][_0x2dc5f8(0x13a)]('cd\x20'+_0x37813b[_0x2dc5f8(0x138)]+_0x2dc5f8(0x146)+CLI_BIN_NAME+_0x2dc5f8(0x133))),_0x1fd39d&&console[_0x2dc5f8(0x11c)](_0x2dc5f8(0x13e)+a68_0x7fc951['cyan'][_0x2dc5f8(0x13a)](CLI_BIN_NAME+'\x20api\x20pull')),console[_0x2dc5f8(0x11c)](a68_0x7fc951[_0x2dc5f8(0x135)]('─'['repeat'](0x3c)));}catch(_0x2ff0d8){logger[_0x2dc5f8(0x13b)](_0x2dc5f8(0x13c),_0x2dc5f8(0x156)+_0x37813b[_0x2dc5f8(0x138)],{'error':_0x2ff0d8 instanceof Error?_0x2ff0d8[_0x2dc5f8(0x136)]:String(_0x2ff0d8)});try{a68_0x4be052['existsSync'](_0x225524)&&(console[_0x2dc5f8(0x11c)](_0x2dc5f8(0x131)+_0x225524),a68_0x4be052[_0x2dc5f8(0x121)](_0x225524,{'recursive':!![],'force':!![]}));}catch{logger[_0x2dc5f8(0x145)](_0x2dc5f8(0x13c),_0x2dc5f8(0x14d)+_0x225524);}throw _0x2ff0d8;}}async function runTask(_0xf628a8,_0xc4f9e4){const _0x3368cf=a68_0x4bf1,_0x4282e5=a68_0x37cc91(_0xf628a8+_0x3368cf(0x127))[_0x3368cf(0x15c)]();try{const _0x110616=await _0xc4f9e4();_0x4282e5[_0x3368cf(0x123)](),console['log'](''+a68_0x7fc951[_0x3368cf(0x135)](_0x3368cf(0x167))+_0xf628a8+'\x20'+a68_0x7fc951[_0x3368cf(0x161)]('['+_0x110616+']'));}catch(_0x93d1d7){_0x4282e5[_0x3368cf(0x168)](_0xf628a8);throw _0x93d1d7;}}async function updatePackageJsonName(_0x269cea){const _0x56acba=a68_0x4bf1,_0x157aca=a68_0x1037ca[_0x56acba(0x15d)](process[_0x56acba(0x16d)](),_0x269cea),_0x44e455=a68_0x1037ca[_0x56acba(0x143)](_0x157aca,_0x56acba(0x12f));try{console[_0x56acba(0x11c)](_0x56acba(0x14a));const _0x40d3da=getRabetbaseCliPackageRoot(),_0xa57789=a68_0x1037ca['join'](_0x40d3da,_0x56acba(0x12f));let _0x216036=_0x56acba(0x137);try{const _0xf0fe1f=JSON[_0x56acba(0x158)](a68_0x4be052[_0x56acba(0x144)](_0xa57789,'utf8'));_0x216036=_0xf0fe1f[_0x56acba(0x14e)]||_0x56acba(0x137);}catch{}const _0x30ae17=a68_0x4be052['readFileSync'](_0x44e455,_0x56acba(0x139)),_0x13a2d8=JSON[_0x56acba(0x158)](_0x30ae17);_0x13a2d8[_0x56acba(0x12b)]=_0x269cea,_0x13a2d8['description']=_0x269cea+_0x56acba(0x128)+_0x216036,a68_0x4be052[_0x56acba(0x13d)](_0x44e455,JSON[_0x56acba(0x149)](_0x13a2d8,null,0x2)+'\x0a','utf8'),console[_0x56acba(0x11c)](_0x56acba(0x148)+_0x269cea),logger[_0x56acba(0x15f)](_0x56acba(0x13c),'更新\x20package.json\x20name');}catch(_0x35a758){logger[_0x56acba(0x13b)](_0x56acba(0x13c),_0x56acba(0x129));throw _0x35a758;}}async function configureAppCode(_0x33ee1e,_0x3b58b9,_0x29c596){const _0x1e5916=a68_0x4bf1,_0x58b67b=a68_0x1037ca[_0x1e5916(0x15d)](process[_0x1e5916(0x16d)](),_0x33ee1e),_0x2f40c3=a68_0x1037ca[_0x1e5916(0x143)](_0x58b67b,NEW_CONFIG_NAME);try{_0x3b58b9?console[_0x1e5916(0x11c)](_0x1e5916(0x166)+_0x33ee1e+':\x20'+_0x3b58b9):console[_0x1e5916(0x11c)]('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x33ee1e);const _0x2abe8f=getRabetbaseCliPackageRoot(),_0x5c3c40=a68_0x1037ca[_0x1e5916(0x143)](_0x2abe8f,_0x1e5916(0x12f));let _0x583eb9=_0x1e5916(0x137);try{const _0x24532d=JSON[_0x1e5916(0x158)](a68_0x4be052[_0x1e5916(0x144)](_0x5c3c40,_0x1e5916(0x139)));_0x583eb9=_0x24532d['version']||_0x1e5916(0x137);}catch{}const _0x4db077=readConfig(),_0x2ec136=typeof _0x4db077[_0x1e5916(0x151)]===_0x1e5916(0x162)?_0x4db077[_0x1e5916(0x151)]:undefined,{app:_0x160e3d,appcode:_0x155cff,..._0x245bd4}=_0x4db077,_0x3627f0={..._0x245bd4,'appcode':_0x3b58b9||'','env':_0x29c596||_0x2ec136||'production','createdAt':new Date()[_0x1e5916(0x12d)](),'version':_0x583eb9};writeConfigFile(_0x2f40c3,_0x3627f0),_0x3b58b9?console[_0x1e5916(0x11c)]('√\x20Configuration\x20file\x20created,\x20AppCode:\x20'+_0x3b58b9):console[_0x1e5916(0x11c)]('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+'\x20config\x20set\x20appcode\x20<app-code>\x27'),logger[_0x1e5916(0x15f)](_0x1e5916(0x13c),_0x1e5916(0x165)+_0x3b58b9);}catch(_0x4ee399){logger[_0x1e5916(0x13b)](_0x1e5916(0x13c),_0x1e5916(0x147));}}
@@ -1 +1 @@
1
- (function(_0x3fe79d,_0x5a2196){const _0x1969bd=a69_0x44b9,_0x491036=_0x3fe79d();while(!![]){try{const _0x2441e0=-parseInt(_0x1969bd(0x148))/0x1+parseInt(_0x1969bd(0x143))/0x2*(parseInt(_0x1969bd(0x157))/0x3)+parseInt(_0x1969bd(0x15e))/0x4+-parseInt(_0x1969bd(0x146))/0x5*(parseInt(_0x1969bd(0x168))/0x6)+parseInt(_0x1969bd(0x15a))/0x7*(-parseInt(_0x1969bd(0x158))/0x8)+-parseInt(_0x1969bd(0x175))/0x9+parseInt(_0x1969bd(0x14c))/0xa;if(_0x2441e0===_0x5a2196)break;else _0x491036['push'](_0x491036['shift']());}catch(_0x2777d4){_0x491036['push'](_0x491036['shift']());}}}(a69_0x1e14,0x1c8a3));import a69_0x34e9f7 from'path';import a69_0x961478 from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{exec,execSync}from'child_process';function a69_0x1e14(){const _0x279fa2=['*\x20Creating\x20project\x20','./src/api/','Use\x20a\x20different\x20project\x20name.','bun\x20run\x20format','\x20dataset(s),\x20generated\x20','\x20\x20√\x20Project\x20template\x20created','dirname','Project\x20name\x20cannot\x20be\x20empty.','constants','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','6svEOrM','8kgsXCp','\x20created\x20successfully!','261058OSiVll','parse','trim','production','209784EFfILs','\x0a\x20\x20cd\x20','\x20\x20√\x20Pulled\x20','\x20\x20rabetbase\x20run\x20start\x0a','\x20\x20√\x20package.json\x20updated','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','validation','Cannot\x20create\x20project\x20in\x20current\x20directory.','length','\x20\x20√\x20Code\x20formatted','11514EqfOOO','log','\x20\x20√\x20Configuration\x20file\x20created','modelCount','env','needsUpgrade','...','readFile','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','join','resolve','Check\x20directory\x20permissions.','access','1906956jmqXyB','\x20\x20Pulling\x20API\x20configuration...','cwd','Project\x20name\x20contains\x20invalid\x20characters.','name','137614NQEiMD','package.json','bun\x20--version','40CqRkkx','\x20api\x20pull`\x20manually\x20later.','145747sBrPyP','string','\x0a√\x20Project\x20','writeFile','3371160tmEPbT'];a69_0x1e14=function(){return _0x279fa2;};return a69_0x1e14();}import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{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'../../../api/fetch-model-list.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';const execAsync=promisify(exec);function a69_0x44b9(_0x2f3fba,_0x1ea2ad){_0x2f3fba=_0x2f3fba-0x143;const _0x1e14e8=a69_0x1e14();let _0x44b97b=_0x1e14e8[_0x2f3fba];return _0x44b97b;}export async function createProjectNonInteractive(_0x2ebdb0,_0x1909dd,_0x1987a5,_0x223978){const _0x540807=a69_0x44b9,_0x15018e=await checkCliVersion();_0x15018e[_0x540807(0x16d)]&&printCliUpgradeWarning(_0x15018e);if(!_0x2ebdb0||_0x2ebdb0[_0x540807(0x15c)]()==='')throw CliErrors[_0x540807(0x164)](_0x540807(0x154));const _0x520d15=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x520d15['test'](_0x2ebdb0))throw CliErrors[_0x540807(0x164)](_0x540807(0x178),_0x540807(0x156));if(_0x2ebdb0[_0x540807(0x166)]>0x64)throw CliErrors['validation'](_0x540807(0x163));const _0x17e8be=a69_0x34e9f7[_0x540807(0x172)](process['cwd'](),_0x2ebdb0);if(existsSync(_0x17e8be))throw CliErrors['validation']('Project\x20directory\x20\x22'+_0x2ebdb0+'\x22\x20already\x20exists.',_0x540807(0x14f));try{const _0x5744f4=a69_0x34e9f7[_0x540807(0x153)](_0x17e8be);await a69_0x961478[_0x540807(0x174)](_0x5744f4,a69_0x961478[_0x540807(0x155)]['W_OK']);}catch{throw CliErrors[_0x540807(0x164)](_0x540807(0x165),_0x540807(0x173));}try{console['log'](_0x540807(0x14d)+_0x2ebdb0+_0x540807(0x16e));const _0x3ac29a=getSubAppReactDemoTemplateDir();await copyDirectory(_0x3ac29a,_0x17e8be),console[_0x540807(0x169)](_0x540807(0x152)),await updatePackageJsonName(_0x2ebdb0),console[_0x540807(0x169)](_0x540807(0x162)),console[_0x540807(0x169)]('\x20\x20Installing\x20dependencies...'),console[_0x540807(0x169)]('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x17e8be),console[_0x540807(0x169)](_0x540807(0x167)),await configureProject(_0x2ebdb0,_0x1987a5,_0x1909dd),console[_0x540807(0x169)](_0x540807(0x16a)),_0x1987a5&&await pullApiConfig(_0x17e8be,_0x1987a5,_0x1909dd,_0x223978),console[_0x540807(0x169)](_0x540807(0x14a)+_0x2ebdb0+_0x540807(0x159)),console[_0x540807(0x169)](_0x540807(0x15f)+_0x2ebdb0),console[_0x540807(0x169)](_0x540807(0x161));}catch(_0x32fdfb){try{existsSync(_0x17e8be)&&await a69_0x961478['rm'](_0x17e8be,{'recursive':!![],'force':!![]});}catch{}throw _0x32fdfb;}}async function updatePackageJsonName(_0x42d933){const _0x304fba=a69_0x44b9,_0x1f81cf=a69_0x34e9f7[_0x304fba(0x172)](process[_0x304fba(0x177)](),_0x42d933),_0x3f3f18=a69_0x34e9f7[_0x304fba(0x171)](_0x1f81cf,_0x304fba(0x144)),_0x31b901=await a69_0x961478[_0x304fba(0x16f)](_0x3f3f18,'utf-8'),_0x4fd148=JSON[_0x304fba(0x15b)](_0x31b901);_0x4fd148[_0x304fba(0x179)]=_0x42d933,_0x4fd148['description']='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a69_0x961478[_0x304fba(0x14b)](_0x3f3f18,JSON['stringify'](_0x4fd148,null,0x2)+'\x0a');}function detectPackageManager(){const _0x26bdef=a69_0x44b9;try{return execSync(_0x26bdef(0x145),{'stdio':'ignore'}),'bun';}catch{return'npm';}}async function formatCode(_0x579bee){const _0x1a8af2=a69_0x44b9;try{await execAsync(_0x1a8af2(0x150),{'cwd':_0x579bee});}catch{}}async function configureProject(_0xc0db25,_0x37101b,_0x42c331){const _0x483672=a69_0x44b9,_0x395448=a69_0x34e9f7[_0x483672(0x172)](process['cwd'](),_0xc0db25),_0xd93427=a69_0x34e9f7[_0x483672(0x171)](_0x395448,NEW_CONFIG_NAME),_0xa7fbcc=readConfig(),_0x5ccef5=typeof _0xa7fbcc[_0x483672(0x16c)]===_0x483672(0x149)?_0xa7fbcc[_0x483672(0x16c)]:undefined,{app:_0x202c67,appcode:_0x296354,..._0x217297}=_0xa7fbcc,_0x2c994d={..._0x217297,'appcode':_0x37101b||'','env':_0x42c331||_0x5ccef5||_0x483672(0x15d),'createdAt':new Date()['toLocaleString'](),'version':getCliVersion()};writeConfigFile(_0xd93427,_0x2c994d);}async function pullApiConfig(_0x4c2c0e,_0x5ee663,_0x2adb9a,_0x40e4d9){const _0x59dbd7=a69_0x44b9,_0x315b94=process[_0x59dbd7(0x177)]();try{process['chdir'](_0x4c2c0e);const _0x579f3c=_0x2adb9a||_0x59dbd7(0x15d);initEnv(_0x579f3c),console[_0x59dbd7(0x169)](_0x59dbd7(0x176));const {configArray:_0x3fbd7a}=await fetchModelList(_0x5ee663,_0x40e4d9||''),_0x1d1758=await generateApiFile(_0x3fbd7a,'',_0x5ee663,!![],_0x579f3c,_0x59dbd7(0x14e));console['log'](_0x59dbd7(0x160)+_0x3fbd7a['length']+_0x59dbd7(0x151)+_0x1d1758[_0x59dbd7(0x16b)]+'\x20model(s)');}catch(_0x22c625){console[_0x59dbd7(0x169)](_0x59dbd7(0x170)+CLI_BIN_NAME+_0x59dbd7(0x147));}finally{process['chdir'](_0x315b94);}}
1
+ (function(_0x352b49,_0x3da1e3){const _0x400c0b=a69_0x50af,_0x2d0a06=_0x352b49();while(!![]){try{const _0x476c00=parseInt(_0x400c0b(0x141))/0x1*(parseInt(_0x400c0b(0x148))/0x2)+parseInt(_0x400c0b(0x16a))/0x3+-parseInt(_0x400c0b(0x160))/0x4*(parseInt(_0x400c0b(0x145))/0x5)+-parseInt(_0x400c0b(0x149))/0x6+-parseInt(_0x400c0b(0x16b))/0x7+-parseInt(_0x400c0b(0x169))/0x8*(parseInt(_0x400c0b(0x143))/0x9)+parseInt(_0x400c0b(0x142))/0xa;if(_0x476c00===_0x3da1e3)break;else _0x2d0a06['push'](_0x2d0a06['shift']());}catch(_0x37c97f){_0x2d0a06['push'](_0x2d0a06['shift']());}}}(a69_0x21bf,0x99672));function a69_0x50af(_0x3edf5a,_0x13ddd7){_0x3edf5a=_0x3edf5a-0x13c;const _0x21bf6a=a69_0x21bf();let _0x50af0e=_0x21bf6a[_0x3edf5a];return _0x50af0e;}import a69_0x258d53 from'path';import a69_0xc884a7 from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{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'../../../api/fetch-model-list.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';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0xe046f0,_0x3fb8fe,_0x5b268a,_0x3974ab){const _0x439270=a69_0x50af,_0x498422=await checkCliVersion();_0x498422[_0x439270(0x140)]&&printCliUpgradeWarning(_0x498422);if(!_0xe046f0||_0xe046f0[_0x439270(0x14f)]()==='')throw CliErrors[_0x439270(0x14a)](_0x439270(0x13e));const _0x552267=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x552267['test'](_0xe046f0))throw CliErrors[_0x439270(0x14a)]('Project\x20name\x20contains\x20invalid\x20characters.',_0x439270(0x16c));if(_0xe046f0['length']>0x64)throw CliErrors[_0x439270(0x14a)](_0x439270(0x161));const _0x39ca8a=a69_0x258d53[_0x439270(0x13f)](process[_0x439270(0x15d)](),_0xe046f0);if(existsSync(_0x39ca8a))throw CliErrors[_0x439270(0x14a)](_0x439270(0x150)+_0xe046f0+_0x439270(0x159),_0x439270(0x163));try{const _0x2821e8=a69_0x258d53['dirname'](_0x39ca8a);await a69_0xc884a7['access'](_0x2821e8,a69_0xc884a7[_0x439270(0x166)][_0x439270(0x168)]);}catch{throw CliErrors[_0x439270(0x14a)]('Cannot\x20create\x20project\x20in\x20current\x20directory.','Check\x20directory\x20permissions.');}try{console[_0x439270(0x162)]('*\x20Creating\x20project\x20'+_0xe046f0+'...');const _0x461a00=getSubAppReactDemoTemplateDir();await copyDirectory(_0x461a00,_0x39ca8a),console[_0x439270(0x162)](_0x439270(0x156)),await updatePackageJsonName(_0xe046f0),console['log'](_0x439270(0x146)),console[_0x439270(0x162)]('\x20\x20Installing\x20dependencies...'),console['log']('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x39ca8a),console[_0x439270(0x162)](_0x439270(0x147)),await configureProject(_0xe046f0,_0x5b268a,_0x3fb8fe),console[_0x439270(0x162)]('\x20\x20√\x20Configuration\x20file\x20created'),_0x5b268a&&await pullApiConfig(_0x39ca8a,_0x5b268a,_0x3fb8fe,_0x3974ab),console[_0x439270(0x162)](_0x439270(0x14e)+_0xe046f0+_0x439270(0x13d)),console[_0x439270(0x162)](_0x439270(0x153)+_0xe046f0),console[_0x439270(0x162)](_0x439270(0x15f));}catch(_0x4fe12d){try{existsSync(_0x39ca8a)&&await a69_0xc884a7['rm'](_0x39ca8a,{'recursive':!![],'force':!![]});}catch{}throw _0x4fe12d;}}async function updatePackageJsonName(_0x52e2fc){const _0x573fcf=a69_0x50af,_0x2f7f66=a69_0x258d53['resolve'](process[_0x573fcf(0x15d)](),_0x52e2fc),_0x259f61=a69_0x258d53[_0x573fcf(0x15c)](_0x2f7f66,_0x573fcf(0x13c)),_0x1b4672=await a69_0xc884a7[_0x573fcf(0x15a)](_0x259f61,'utf-8'),_0x22d839=JSON['parse'](_0x1b4672);_0x22d839[_0x573fcf(0x165)]=_0x52e2fc,_0x22d839['description']='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a69_0xc884a7['writeFile'](_0x259f61,JSON[_0x573fcf(0x155)](_0x22d839,null,0x2)+'\x0a');}function detectPackageManager(){const _0x37508d=a69_0x50af;try{return execSync('bun\x20--version',{'stdio':_0x37508d(0x152)}),'bun';}catch{return'npm';}}async function formatCode(_0x3bf8d6){const _0x5a425c=a69_0x50af;try{await execAsync(_0x5a425c(0x157),{'cwd':_0x3bf8d6});}catch{}}async function configureProject(_0xb52d8,_0x5c2536,_0x1bae37){const _0x569c14=a69_0x50af,_0x2be01b=a69_0x258d53['resolve'](process['cwd'](),_0xb52d8),_0x5dcea2=a69_0x258d53[_0x569c14(0x15c)](_0x2be01b,NEW_CONFIG_NAME),_0x58224f=readConfig(),_0x460a0a=typeof _0x58224f[_0x569c14(0x164)]===_0x569c14(0x167)?_0x58224f['env']:undefined,{app:_0x4eee8c,appcode:_0x2fc693,..._0x214db9}=_0x58224f,_0x26ea02={..._0x214db9,'appcode':_0x5c2536||'','env':_0x1bae37||_0x460a0a||_0x569c14(0x144),'createdAt':new Date()[_0x569c14(0x154)](),'version':getCliVersion()};writeConfigFile(_0x5dcea2,_0x26ea02);}function a69_0x21bf(){const _0x582843=['cwd','chdir','\x20\x20rabetbase\x20run\x20start\x0a','67316DOisLQ','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','log','Use\x20a\x20different\x20project\x20name.','env','name','constants','string','W_OK','521752pdguCW','826839NmuRnI','6820681svtFji','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','package.json','\x20created\x20successfully!','Project\x20name\x20cannot\x20be\x20empty.','resolve','needsUpgrade','10Nrcult','24027610SJKHSr','54wKKodQ','production','160rUBUjy','\x20\x20√\x20package.json\x20updated','\x20\x20√\x20Code\x20formatted','172586byeJKF','6052446sxokkj','validation','\x20\x20√\x20Pulled\x20','modelCount','length','\x0a√\x20Project\x20','trim','Project\x20directory\x20\x22','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','ignore','\x0a\x20\x20cd\x20','toLocaleString','stringify','\x20\x20√\x20Project\x20template\x20created','bun\x20run\x20format','\x20api\x20pull`\x20manually\x20later.','\x22\x20already\x20exists.','readFile','\x20model(s)','join'];a69_0x21bf=function(){return _0x582843;};return a69_0x21bf();}async function pullApiConfig(_0x1ab559,_0x5ce7be,_0x987868,_0xde1df2){const _0x46927a=a69_0x50af,_0x5d8663=process[_0x46927a(0x15d)]();try{process['chdir'](_0x1ab559);const _0x57de13=_0x987868||'production';initEnv(_0x57de13),console['log']('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x465f43}=await fetchModelList(_0x5ce7be,_0xde1df2||''),_0x18f046=await generateApiFile(_0x465f43,'',_0x5ce7be,!![],_0x57de13,DEFAULT_API_DIR);console[_0x46927a(0x162)](_0x46927a(0x14b)+_0x465f43[_0x46927a(0x14d)]+'\x20dataset(s),\x20generated\x20'+_0x18f046[_0x46927a(0x14c)]+_0x46927a(0x15b));}catch(_0x1e34c0){console[_0x46927a(0x162)](_0x46927a(0x151)+CLI_BIN_NAME+_0x46927a(0x158));}finally{process[_0x46927a(0x15e)](_0x5d8663);}}
@@ -1 +1 @@
1
- const a70_0x1e8a01=a70_0xbf48;(function(_0x4810d6,_0xe0ef75){const _0x2489cc=a70_0xbf48,_0x4ba79f=_0x4810d6();while(!![]){try{const _0x11df59=-parseInt(_0x2489cc(0x166))/0x1*(-parseInt(_0x2489cc(0x168))/0x2)+-parseInt(_0x2489cc(0x164))/0x3+-parseInt(_0x2489cc(0x163))/0x4*(parseInt(_0x2489cc(0x16c))/0x5)+parseInt(_0x2489cc(0x15d))/0x6+-parseInt(_0x2489cc(0x16d))/0x7+parseInt(_0x2489cc(0x15f))/0x8*(parseInt(_0x2489cc(0x162))/0x9)+-parseInt(_0x2489cc(0x16a))/0xa*(-parseInt(_0x2489cc(0x167))/0xb);if(_0x11df59===_0xe0ef75)break;else _0x4ba79f['push'](_0x4ba79f['shift']());}catch(_0x38a5b1){_0x4ba79f['push'](_0x4ba79f['shift']());}}}(a70_0x38cc,0x4469a));import a70_0x48f6a1 from'node:path';function a70_0x38cc(){const _0xcf1d25=['dirname','32BIbwrH','../../../../','resolve','327897qQybIW','8416iQLUML','510486OhltWZ','join','59MvDTYf','3484228mLsbjv','3352sPZMua','projects','20FXOMMg','templates','895kTFwIw','2284884xDtVhE','1651776ERlGFh'];a70_0x38cc=function(){return _0xcf1d25;};return a70_0x38cc();}import{fileURLToPath}from'node:url';const __dirname=a70_0x48f6a1[a70_0x1e8a01(0x15e)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x17338c=a70_0x1e8a01;return a70_0x48f6a1[_0x17338c(0x161)](__dirname,_0x17338c(0x160));}function a70_0xbf48(_0x35039e,_0x43663c){_0x35039e=_0x35039e-0x15d;const _0x38ccaa=a70_0x38cc();let _0xbf48ab=_0x38ccaa[_0x35039e];return _0xbf48ab;}export function getSubAppReactDemoTemplateDir(){const _0x4ba467=a70_0x1e8a01;return a70_0x48f6a1[_0x4ba467(0x165)](getRabetbaseCliPackageRoot(),_0x4ba467(0x16b),_0x4ba467(0x169),'sub-app-react-demo');}
1
+ const a70_0x514733=a70_0x2313;(function(_0xea1cff,_0x55935e){const _0x27e201=a70_0x2313,_0x5d5a1e=_0xea1cff();while(!![]){try{const _0x343aea=parseInt(_0x27e201(0x77))/0x1*(parseInt(_0x27e201(0x7a))/0x2)+-parseInt(_0x27e201(0x7c))/0x3*(parseInt(_0x27e201(0x74))/0x4)+-parseInt(_0x27e201(0x72))/0x5+parseInt(_0x27e201(0x6f))/0x6*(parseInt(_0x27e201(0x79))/0x7)+parseInt(_0x27e201(0x76))/0x8+-parseInt(_0x27e201(0x71))/0x9*(parseInt(_0x27e201(0x75))/0xa)+parseInt(_0x27e201(0x78))/0xb;if(_0x343aea===_0x55935e)break;else _0x5d5a1e['push'](_0x5d5a1e['shift']());}catch(_0x1101ab){_0x5d5a1e['push'](_0x5d5a1e['shift']());}}}(a70_0x3e62,0x8f63e));import a70_0x6602d6 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a70_0x6602d6[a70_0x514733(0x73)](fileURLToPath(import.meta.url));function a70_0x3e62(){const _0x1f1eef=['10zPbsIk','7897376BfQLhl','305ufDjEK','11539407bFAdez','6356DSIGme','766fgDrXn','sub-app-react-demo','2649CnqPiG','join','templates','546uGQKrP','resolve','5748417cOghoX','4429965BBAxgM','dirname','560LxLtJv'];a70_0x3e62=function(){return _0x1f1eef;};return a70_0x3e62();}function a70_0x2313(_0x320c4c,_0x32bfdc){_0x320c4c=_0x320c4c-0x6d;const _0x3e62db=a70_0x3e62();let _0x231391=_0x3e62db[_0x320c4c];return _0x231391;}export function getRabetbaseCliPackageRoot(){const _0x27e6a0=a70_0x514733;return a70_0x6602d6[_0x27e6a0(0x70)](__dirname,'../../../../');}export function getSubAppReactDemoTemplateDir(){const _0x16f8a5=a70_0x514733;return a70_0x6602d6[_0x16f8a5(0x6d)](getRabetbaseCliPackageRoot(),_0x16f8a5(0x6e),'projects',_0x16f8a5(0x7b));}
@@ -1 +1 @@
1
- (function(_0x53d737,_0x3643c7){const _0x3ef42f=a71_0x4bed,_0x198b3=_0x53d737();while(!![]){try{const _0x4b6391=parseInt(_0x3ef42f(0xe4))/0x1+parseInt(_0x3ef42f(0xe9))/0x2+parseInt(_0x3ef42f(0xed))/0x3*(-parseInt(_0x3ef42f(0xdf))/0x4)+-parseInt(_0x3ef42f(0xec))/0x5+parseInt(_0x3ef42f(0xe8))/0x6*(parseInt(_0x3ef42f(0xe1))/0x7)+parseInt(_0x3ef42f(0xe0))/0x8+-parseInt(_0x3ef42f(0xe5))/0x9;if(_0x4b6391===_0x3643c7)break;else _0x198b3['push'](_0x198b3['shift']());}catch(_0x19e2ea){_0x198b3['push'](_0x198b3['shift']());}}}(a71_0x466a,0x3043b));import a71_0x1f9041 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';function a71_0x4bed(_0x41dbd6,_0x57bb80){_0x41dbd6=_0x41dbd6-0xdc;const _0x466ab0=a71_0x466a();let _0x4bedb7=_0x466ab0[_0x41dbd6];return _0x4bedb7;}function a71_0x466a(){const _0x472fb0=['499640lIaTgR','开始复制项目模板','now','1058665pAwyYp','21MyFwNj','resolve','error','info','169772AuKBEt','1664144dkUbqd','32767AyimYm','cwd','项目模板复制失败','277017hNvaDM','760518oKzHEw','message','copy','72QhCgsw'];a71_0x466a=function(){return _0x472fb0;};return a71_0x466a();}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x55e25a){const _0x11efef=a71_0x4bed,_0x48f187=Date[_0x11efef(0xeb)](),_0x4b75c7=a71_0x1f9041[_0x11efef(0xdc)](process[_0x11efef(0xe2)](),_0x55e25a);try{logger[_0x11efef(0xde)](_0x11efef(0xe7),_0x11efef(0xea),{'projectCode':_0x55e25a,'templateDir':templateDir}),await copyDirectory(templateDir,_0x4b75c7);const _0x504a51=Date[_0x11efef(0xeb)]()-_0x48f187;logger['success'](_0x11efef(0xe7),'项目模板复制完成',_0x504a51,{'projectCode':_0x55e25a});}catch(_0x529bd5){const _0x17a4d7=Date[_0x11efef(0xeb)]()-_0x48f187;logger[_0x11efef(0xdd)](_0x11efef(0xe7),_0x11efef(0xe3),{'projectCode':_0x55e25a,'error':_0x529bd5 instanceof Error?_0x529bd5[_0x11efef(0xe6)]:String(_0x529bd5),'duration':_0x17a4d7});throw _0x529bd5;}return formatElapsed(_0x48f187);}
1
+ function a71_0x47fc(_0x552caa,_0x490c09){_0x552caa=_0x552caa-0x17f;const _0x47ee53=a71_0x47ee();let _0x47fc48=_0x47ee53[_0x552caa];return _0x47fc48;}(function(_0x13c85f,_0x253b23){const _0x555311=a71_0x47fc,_0x20fd96=_0x13c85f();while(!![]){try{const _0x59e4b0=parseInt(_0x555311(0x181))/0x1+-parseInt(_0x555311(0x182))/0x2*(parseInt(_0x555311(0x17f))/0x3)+-parseInt(_0x555311(0x18f))/0x4*(-parseInt(_0x555311(0x18b))/0x5)+parseInt(_0x555311(0x180))/0x6+-parseInt(_0x555311(0x183))/0x7+-parseInt(_0x555311(0x18c))/0x8*(parseInt(_0x555311(0x18e))/0x9)+-parseInt(_0x555311(0x186))/0xa*(parseInt(_0x555311(0x191))/0xb);if(_0x59e4b0===_0x253b23)break;else _0x20fd96['push'](_0x20fd96['shift']());}catch(_0x48bb22){_0x20fd96['push'](_0x20fd96['shift']());}}}(a71_0x47ee,0x24f8f));import a71_0x31aa1e from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';function a71_0x47ee(){const _0x129af8=['854946epamzt','4zGuMdK','项目模板复制失败','286SgnPxB','copy','192kGQeqc','1577880pxuvPo','191883kwEIzB','1896xnguAb','1279159WirGxm','开始复制项目模板','error','63790CuZzfT','now','resolve','cwd','项目模板复制完成','1004165QumvdD','8vPgghT','success'];a71_0x47ee=function(){return _0x129af8;};return a71_0x47ee();}const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x397a6a){const _0x25d271=a71_0x47fc,_0x104c21=Date['now'](),_0x49b0a9=a71_0x31aa1e[_0x25d271(0x188)](process[_0x25d271(0x189)](),_0x397a6a);try{logger['info'](_0x25d271(0x192),_0x25d271(0x184),{'projectCode':_0x397a6a,'templateDir':templateDir}),await copyDirectory(templateDir,_0x49b0a9);const _0x209567=Date[_0x25d271(0x187)]()-_0x104c21;logger[_0x25d271(0x18d)](_0x25d271(0x192),_0x25d271(0x18a),_0x209567,{'projectCode':_0x397a6a});}catch(_0x183c08){const _0x5dfc42=Date[_0x25d271(0x187)]()-_0x104c21;logger[_0x25d271(0x185)]('copy',_0x25d271(0x190),{'projectCode':_0x397a6a,'error':_0x183c08 instanceof Error?_0x183c08['message']:String(_0x183c08),'duration':_0x5dfc42});throw _0x183c08;}return formatElapsed(_0x104c21);}
@@ -1 +1 @@
1
- (function(_0xb999bf,_0xec4945){const _0x2eb20b=a72_0x17bd,_0x25e5a2=_0xb999bf();while(!![]){try{const _0x26fb14=parseInt(_0x2eb20b(0x126))/0x1*(-parseInt(_0x2eb20b(0x12f))/0x2)+-parseInt(_0x2eb20b(0x121))/0x3+parseInt(_0x2eb20b(0x134))/0x4+-parseInt(_0x2eb20b(0x133))/0x5*(-parseInt(_0x2eb20b(0x132))/0x6)+-parseInt(_0x2eb20b(0x12e))/0x7*(-parseInt(_0x2eb20b(0x12a))/0x8)+-parseInt(_0x2eb20b(0x130))/0x9+parseInt(_0x2eb20b(0x122))/0xa*(-parseInt(_0x2eb20b(0x128))/0xb);if(_0x26fb14===_0xec4945)break;else _0x25e5a2['push'](_0x25e5a2['shift']());}catch(_0x5ed976){_0x25e5a2['push'](_0x25e5a2['shift']());}}}(a72_0x5dff,0x9a66a));import a72_0x54ffb5 from'node:path';function a72_0x17bd(_0x32e81f,_0x4cfe7e){_0x32e81f=_0x32e81f-0x121;const _0x5dff04=a72_0x5dff();let _0x17bd7f=_0x5dff04[_0x32e81f];return _0x17bd7f;}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(_0x2e3936){const _0x53dcb1=a72_0x17bd,_0x54d51f=Date[_0x53dcb1(0x12d)](),_0x3d7fdf=a72_0x54ffb5[_0x53dcb1(0x12b)](process[_0x53dcb1(0x123)](),_0x2e3936);try{logger[_0x53dcb1(0x129)]('format',_0x53dcb1(0x131),{'projectCode':_0x2e3936}),await execa(resolveNpmBin('npx'),[_0x53dcb1(0x125),'--write','.'],{'cwd':_0x3d7fdf});const _0x12b2dd=Date['now']()-_0x54d51f;logger['success'](_0x53dcb1(0x124),_0x53dcb1(0x127),_0x12b2dd,{'projectCode':_0x2e3936});}catch(_0x3e8fe8){const _0x4fcb2f=Date[_0x53dcb1(0x12d)]()-_0x54d51f;logger[_0x53dcb1(0x12c)](_0x53dcb1(0x124),_0x53dcb1(0x135),{'projectCode':_0x2e3936,'error':_0x3e8fe8 instanceof Error?_0x3e8fe8['message']:String(_0x3e8fe8),'duration':_0x4fcb2f});throw _0x3e8fe8;}return formatElapsed(_0x54d51f);}function a72_0x5dff(){const _0x4c0ca4=['16rPorAD','resolve','error','now','762727cvaelr','502mUrFvF','10161486rkWEWj','开始格式化代码','1362AtiLYd','26395VVNpnc','3025336NpAlrS','代码格式化失败','390258GizTRL','10BJrZjO','cwd','format','prettier','51nEeSIU','代码格式化完成','2950442GxSFus','info'];a72_0x5dff=function(){return _0x4c0ca4;};return a72_0x5dff();}
1
+ (function(_0x1b74f6,_0x2da4b0){const _0x57d2fd=a72_0x2047,_0x41b162=_0x1b74f6();while(!![]){try{const _0x1bd371=parseInt(_0x57d2fd(0xfe))/0x1+parseInt(_0x57d2fd(0x103))/0x2+parseInt(_0x57d2fd(0x105))/0x3*(parseInt(_0x57d2fd(0x101))/0x4)+-parseInt(_0x57d2fd(0x102))/0x5*(parseInt(_0x57d2fd(0x100))/0x6)+parseInt(_0x57d2fd(0xfa))/0x7+parseInt(_0x57d2fd(0xfd))/0x8+-parseInt(_0x57d2fd(0x104))/0x9*(parseInt(_0x57d2fd(0xf9))/0xa);if(_0x1bd371===_0x2da4b0)break;else _0x41b162['push'](_0x41b162['shift']());}catch(_0x56f102){_0x41b162['push'](_0x41b162['shift']());}}}(a72_0x31eb,0xd6fee));import a72_0x3ec649 from'node:path';function a72_0x31eb(){const _0x44e569=['error','16656sDaHxQ','5432YXmZEk','1510FQoHpZ','2463172eiCnLK','18aeuiuv','2673jkIGie','resolve','info','代码格式化完成','开始格式化代码','代码格式化失败','format','message','now','16005540HcTpSH','5920838KVnZeV','npx','success','9695912xkyQIr','420695yKxDyL'];a72_0x31eb=function(){return _0x44e569;};return a72_0x31eb();}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a72_0x2047(_0x8be011,_0x115c77){_0x8be011=_0x8be011-0xf9;const _0x31ebf3=a72_0x31eb();let _0x2047c3=_0x31ebf3[_0x8be011];return _0x2047c3;}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x5b328f){const _0x1af992=a72_0x2047,_0x27f8d2=Date[_0x1af992(0x10d)](),_0x6345f4=a72_0x3ec649[_0x1af992(0x106)](process['cwd'](),_0x5b328f);try{logger[_0x1af992(0x107)](_0x1af992(0x10b),_0x1af992(0x109),{'projectCode':_0x5b328f}),await execa(resolveNpmBin(_0x1af992(0xfb)),['prettier','--write','.'],{'cwd':_0x6345f4});const _0x5446bf=Date['now']()-_0x27f8d2;logger[_0x1af992(0xfc)](_0x1af992(0x10b),_0x1af992(0x108),_0x5446bf,{'projectCode':_0x5b328f});}catch(_0x5a6cf0){const _0x357af0=Date[_0x1af992(0x10d)]()-_0x27f8d2;logger[_0x1af992(0xff)](_0x1af992(0x10b),_0x1af992(0x10a),{'projectCode':_0x5b328f,'error':_0x5a6cf0 instanceof Error?_0x5a6cf0[_0x1af992(0x10c)]:String(_0x5a6cf0),'duration':_0x357af0});throw _0x5a6cf0;}return formatElapsed(_0x27f8d2);}
@@ -1 +1 @@
1
- function a73_0x4300(_0x33e5ec,_0x3f0409){_0x33e5ec=_0x33e5ec-0x118;const _0x32f9e3=a73_0x32f9();let _0x43009a=_0x32f9e3[_0x33e5ec];return _0x43009a;}function a73_0x32f9(){const _0x3fdf62=['开始安装依赖','npm','https://registry.npmmirror.com','info','47835FMQdun','947065gkhQsy','resolve','11248GIMfjw','226656iNLjKB','cwd','7BIDvVi','message','246pNIeCk','604854lYGSzS','error','依赖安装完成','74128ZexVWl','2236140tpmwHa','install','now'];a73_0x32f9=function(){return _0x3fdf62;};return a73_0x32f9();}(function(_0x2fcbc3,_0x3e760e){const _0x3d3a55=a73_0x4300,_0x5cb5e5=_0x2fcbc3();while(!![]){try{const _0x3bc678=-parseInt(_0x3d3a55(0x118))/0x1+parseInt(_0x3d3a55(0x124))/0x2+-parseInt(_0x3d3a55(0x120))/0x3*(parseInt(_0x3d3a55(0x11b))/0x4)+parseInt(_0x3d3a55(0x119))/0x5+parseInt(_0x3d3a55(0x121))/0x6*(-parseInt(_0x3d3a55(0x11e))/0x7)+parseInt(_0x3d3a55(0x11c))/0x8+parseInt(_0x3d3a55(0x125))/0x9;if(_0x3bc678===_0x3e760e)break;else _0x5cb5e5['push'](_0x5cb5e5['shift']());}catch(_0x364b05){_0x5cb5e5['push'](_0x5cb5e5['shift']());}}}(a73_0x32f9,0x1e489));import a73_0x435414 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(_0x107ebd){const _0x49ec9d=a73_0x4300,_0x405755=Date[_0x49ec9d(0x127)](),_0x123e55=a73_0x435414[_0x49ec9d(0x11a)](process[_0x49ec9d(0x11d)](),_0x107ebd);try{logger[_0x49ec9d(0x12b)](_0x49ec9d(0x126),_0x49ec9d(0x128),{'projectCode':_0x107ebd,'registry':_0x49ec9d(0x12a)}),await execa(resolveNpmBin(_0x49ec9d(0x129)),[_0x49ec9d(0x126),'--registry',_0x49ec9d(0x12a)],{'cwd':_0x123e55});const _0x3af61a=Date[_0x49ec9d(0x127)]()-_0x405755;logger['success'](_0x49ec9d(0x126),_0x49ec9d(0x123),_0x3af61a,{'projectCode':_0x107ebd});}catch(_0x461bcd){const _0x4f4807=Date[_0x49ec9d(0x127)]()-_0x405755;logger[_0x49ec9d(0x122)]('install','依赖安装失败',{'projectCode':_0x107ebd,'error':_0x461bcd instanceof Error?_0x461bcd[_0x49ec9d(0x11f)]:String(_0x461bcd),'duration':_0x4f4807});throw _0x461bcd;}return formatElapsed(_0x405755);}
1
+ (function(_0x5d716e,_0x5d8698){const _0x48294d=a73_0x413e,_0xc90f66=_0x5d716e();while(!![]){try{const _0x514634=parseInt(_0x48294d(0xa9))/0x1*(-parseInt(_0x48294d(0xae))/0x2)+parseInt(_0x48294d(0xb5))/0x3*(parseInt(_0x48294d(0xb0))/0x4)+-parseInt(_0x48294d(0xb8))/0x5*(-parseInt(_0x48294d(0xb3))/0x6)+-parseInt(_0x48294d(0xbb))/0x7+-parseInt(_0x48294d(0xb6))/0x8*(parseInt(_0x48294d(0xb9))/0x9)+parseInt(_0x48294d(0xb4))/0xa+-parseInt(_0x48294d(0xba))/0xb*(-parseInt(_0x48294d(0xb2))/0xc);if(_0x514634===_0x5d8698)break;else _0xc90f66['push'](_0xc90f66['shift']());}catch(_0x8b801f){_0xc90f66['push'](_0xc90f66['shift']());}}}(a73_0x5903,0x99736));import a73_0x6ac43a from'node:path';import{execa}from'execa';function a73_0x5903(){const _0x15d9ae=['install','9725zylOoD','9gEPkMn','16839163mKegKZ','6118413NvgVwk','success','依赖安装完成','message','开始安装依赖','resolve','https://registry.npmmirror.com','2485VNHoZc','error','cwd','npm','now','728gAOjZh','依赖安装失败','3963976sRiiIh','info','12pkMRzj','642bpSNDT','6191420MedMvW','3TCpysI','7535608cgYkuf'];a73_0x5903=function(){return _0x15d9ae;};return a73_0x5903();}function a73_0x413e(_0x3f5393,_0x30d2df){_0x3f5393=_0x3f5393-0xa7;const _0x590335=a73_0x5903();let _0x413e18=_0x590335[_0x3f5393];return _0x413e18;}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(_0x23b836){const _0x426154=a73_0x413e,_0x54f4d9=Date[_0x426154(0xad)](),_0x5638fd=a73_0x6ac43a[_0x426154(0xa7)](process[_0x426154(0xab)](),_0x23b836);try{logger[_0x426154(0xb1)](_0x426154(0xb7),_0x426154(0xbf),{'projectCode':_0x23b836,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin(_0x426154(0xac)),[_0x426154(0xb7),'--registry',_0x426154(0xa8)],{'cwd':_0x5638fd});const _0x2626de=Date['now']()-_0x54f4d9;logger[_0x426154(0xbc)](_0x426154(0xb7),_0x426154(0xbd),_0x2626de,{'projectCode':_0x23b836});}catch(_0x389545){const _0x1c8f22=Date[_0x426154(0xad)]()-_0x54f4d9;logger[_0x426154(0xaa)](_0x426154(0xb7),_0x426154(0xaf),{'projectCode':_0x23b836,'error':_0x389545 instanceof Error?_0x389545[_0x426154(0xbe)]:String(_0x389545),'duration':_0x1c8f22});throw _0x389545;}return formatElapsed(_0x54f4d9);}
@@ -1 +1 @@
1
- const a74_0x4ea72c=a74_0x42e0;(function(_0x3df80e,_0x5e6064){const _0x5dfb2b=a74_0x42e0,_0xffedc9=_0x3df80e();while(!![]){try{const _0x2f2116=-parseInt(_0x5dfb2b(0x1f0))/0x1+parseInt(_0x5dfb2b(0x1e8))/0x2*(parseInt(_0x5dfb2b(0x201))/0x3)+parseInt(_0x5dfb2b(0x1fd))/0x4*(-parseInt(_0x5dfb2b(0x202))/0x5)+-parseInt(_0x5dfb2b(0x1e9))/0x6*(-parseInt(_0x5dfb2b(0x208))/0x7)+parseInt(_0x5dfb2b(0x1ee))/0x8*(-parseInt(_0x5dfb2b(0x205))/0x9)+parseInt(_0x5dfb2b(0x1fc))/0xa+parseInt(_0x5dfb2b(0x1f8))/0xb*(parseInt(_0x5dfb2b(0x1f5))/0xc);if(_0x2f2116===_0x5e6064)break;else _0xffedc9['push'](_0xffedc9['shift']());}catch(_0x16ba1f){_0xffedc9['push'](_0xffedc9['shift']());}}}(a74_0x5449,0x9e45a));import{CliErrors}from'../../errors.js';function a74_0x42e0(_0x447803,_0x1d091a){_0x447803=_0x447803-0x1e5;const _0x5449c9=a74_0x5449();let _0x42e0a9=_0x5449c9[_0x447803];return _0x42e0a9;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a74_0x4ea72c(0x1ff),'type':a74_0x4ea72c(0x1ed),'description':'App\x20code\x20to\x20initialize'},{'name':'env','type':a74_0x4ea72c(0x1ed),'description':a74_0x4ea72c(0x1ef)},{'name':'yes','type':a74_0x4ea72c(0x1f9),'description':a74_0x4ea72c(0x1e6),'default':![]}],createFlags=[{'name':a74_0x4ea72c(0x1fe),'type':'string','description':a74_0x4ea72c(0x1e7)},{'name':'env','type':a74_0x4ea72c(0x1ed),'description':a74_0x4ea72c(0x1ef)},{'name':a74_0x4ea72c(0x1ff),'type':a74_0x4ea72c(0x1ed),'description':a74_0x4ea72c(0x209)}],upgradeFlags=[{'name':a74_0x4ea72c(0x1eb),'type':'boolean','description':a74_0x4ea72c(0x1f2),'default':![]}];export const projectDefinitions=[{'service':a74_0x4ea72c(0x1f6),'command':'init','description':a74_0x4ea72c(0x20a),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x35e6cc){const _0x1cf244=a74_0x4ea72c;return await initConfig({'appcode':_0x35e6cc[_0x1cf244(0x1ea)](_0x1cf244(0x1ff))||undefined,'env':_0x35e6cc[_0x1cf244(0x1ea)](_0x1cf244(0x200))||undefined,'autoYes':_0x35e6cc[_0x1cf244(0x1fa)](_0x1cf244(0x1eb))}),{'ok':!![]};}},{'service':'project','command':a74_0x4ea72c(0x20c),'description':a74_0x4ea72c(0x206),'risk':a74_0x4ea72c(0x1f1),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a74_0x4ea72c(0x20b),'description':a74_0x4ea72c(0x1f4),'required':![]}],'flags':createFlags,async 'execute'(_0x3cb499){const _0x883d9a=a74_0x4ea72c,{createApp:_0x13bccd}=await import(_0x883d9a(0x1f7)),{createProjectNonInteractive:_0x5ba800}=await import(_0x883d9a(0x1ec)),_0xdb1b03=_0x3cb499[_0x883d9a(0x1ea)]('name')['trim']()||_0x3cb499[_0x883d9a(0x1e5)][0x0]?.[_0x883d9a(0x20d)](),_0x1476d0=_0x3cb499[_0x883d9a(0x1ea)](_0x883d9a(0x200))||undefined,_0x5141c2=_0x3cb499[_0x883d9a(0x1ea)](_0x883d9a(0x1ff))||undefined;if(_0x3cb499[_0x883d9a(0x204)]){if(!_0xdb1b03)throw CliErrors['validation'](_0x883d9a(0x207),_0x883d9a(0x1fb)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x5ba800(_0xdb1b03,_0x1476d0,_0x5141c2,_0x3cb499[_0x883d9a(0x203)]);}else await _0x13bccd({'projectCode':_0xdb1b03,'appCode':_0x5141c2,'env':_0x1476d0,'cookie':_0x3cb499['cookie']});return{'ok':!![]};}},{'service':a74_0x4ea72c(0x1f6),'command':a74_0x4ea72c(0x1f3),'description':'Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','risk':a74_0x4ea72c(0x1f1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x5c4813){const _0x1bcd8d=a74_0x4ea72c;return await upgradeApp(_0x5c4813[_0x1bcd8d(0x204)],{'yes':_0x5c4813[_0x1bcd8d(0x1fa)](_0x1bcd8d(0x1eb))}),{'ok':!![]};}}];function a74_0x5449(){const _0x35b384=['create','trim','args','Auto-confirm\x20prompts','Project\x20name','637134EUiYTy','172284mHNtJV','str','yes','../../commands/project/create/non-interactive.js','string','65168InLFws','Target\x20environment','938809ODKnUg','write','Skip\x20confirmation\x20prompt','upgrade','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','24pxwqLU','project','../../commands/project/create/main.js','3186106dpEppX','boolean','bool','Usage:\x20','11163050oMCEzp','287932oeIVKe','name','appcode','env','3jPvfuK','65MyYNYC','cookie','nonInteractive','9IQVKzt','Create\x20a\x20new\x20project','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','126Pdflrv','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','Initialize\x20.rabetbase.json\x20config\x20in\x20existing\x20project','project-name'];a74_0x5449=function(){return _0x35b384;};return a74_0x5449();}
1
+ const a74_0x3607bc=a74_0x174c;(function(_0x89362b,_0x241305){const _0x476d1c=a74_0x174c,_0x53cd4f=_0x89362b();while(!![]){try{const _0x20271f=parseInt(_0x476d1c(0x136))/0x1+-parseInt(_0x476d1c(0x153))/0x2*(-parseInt(_0x476d1c(0x13d))/0x3)+-parseInt(_0x476d1c(0x147))/0x4+parseInt(_0x476d1c(0x131))/0x5*(-parseInt(_0x476d1c(0x13f))/0x6)+-parseInt(_0x476d1c(0x13b))/0x7*(-parseInt(_0x476d1c(0x130))/0x8)+parseInt(_0x476d1c(0x14e))/0x9+-parseInt(_0x476d1c(0x134))/0xa;if(_0x20271f===_0x241305)break;else _0x53cd4f['push'](_0x53cd4f['shift']());}catch(_0x1d6410){_0x53cd4f['push'](_0x53cd4f['shift']());}}}(a74_0x1d7c,0x43f74));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a74_0x1d7c(){const _0x2df6d6=['args','Auto-confirm\x20prompts','7602170YKWiXq','appcode','526603bQIGNf','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','project-name','str','73003RdZRia','project','1186089kyzbiZ','yes','6ojEyms','Project\x20name','string','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','write','init','nonInteractive','boolean','506524dMvazN','cookie','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','validation','name','Usage:\x20','env','3142224pdVVWF','Initialize\x20.rabetbase.json\x20config\x20in\x20existing\x20project','bool','App\x20code\x20to\x20initialize','trim','2uTSToh','Target\x20environment','upgrade','104rfFlSg','1207215NnPWke'];a74_0x1d7c=function(){return _0x2df6d6;};return a74_0x1d7c();}import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a74_0x3607bc(0x135),'type':a74_0x3607bc(0x141),'description':a74_0x3607bc(0x151)},{'name':'env','type':'string','description':'Target\x20environment'},{'name':a74_0x3607bc(0x13e),'type':a74_0x3607bc(0x146),'description':a74_0x3607bc(0x133),'default':![]}],createFlags=[{'name':a74_0x3607bc(0x14b),'type':a74_0x3607bc(0x141),'description':a74_0x3607bc(0x140)},{'name':'env','type':'string','description':a74_0x3607bc(0x154)},{'name':a74_0x3607bc(0x135),'type':a74_0x3607bc(0x141),'description':a74_0x3607bc(0x138)}],upgradeFlags=[{'name':a74_0x3607bc(0x13e),'type':'boolean','description':'Skip\x20confirmation\x20prompt','default':![]}];function a74_0x174c(_0x122bd6,_0x5dd9e6){_0x122bd6=_0x122bd6-0x130;const _0x1d7cc0=a74_0x1d7c();let _0x174c87=_0x1d7cc0[_0x122bd6];return _0x174c87;}export const projectDefinitions=[{'service':a74_0x3607bc(0x13c),'command':a74_0x3607bc(0x144),'description':a74_0x3607bc(0x14f),'risk':a74_0x3607bc(0x143),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x190bff){const _0x404ec0=a74_0x3607bc;return await initConfig({'appcode':_0x190bff[_0x404ec0(0x13a)](_0x404ec0(0x135))||undefined,'env':_0x190bff[_0x404ec0(0x13a)](_0x404ec0(0x14d))||undefined,'autoYes':_0x190bff[_0x404ec0(0x150)]('yes')}),{'ok':!![]};}},{'service':'project','command':'create','description':'Create\x20a\x20new\x20project','risk':a74_0x3607bc(0x143),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a74_0x3607bc(0x139),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x49fca5){const _0x3bed34=a74_0x3607bc,{createApp:_0xc9b544}=await import('../../commands/project/create/main.js'),{createProjectNonInteractive:_0x45762c}=await import('../../commands/project/create/non-interactive.js'),_0x44170a=_0x49fca5[_0x3bed34(0x13a)]('name')[_0x3bed34(0x152)]()||_0x49fca5[_0x3bed34(0x132)][0x0]?.[_0x3bed34(0x152)](),_0x4e77ec=_0x49fca5[_0x3bed34(0x13a)](_0x3bed34(0x14d))||undefined,_0x440ad5=_0x49fca5['str'](_0x3bed34(0x135))||undefined;if(_0x49fca5[_0x3bed34(0x145)]){if(!_0x44170a)throw CliErrors[_0x3bed34(0x14a)](_0x3bed34(0x137),_0x3bed34(0x14c)+CLI_BIN_NAME+_0x3bed34(0x149));await _0x45762c(_0x44170a,_0x4e77ec,_0x440ad5,_0x49fca5[_0x3bed34(0x148)]);}else await _0xc9b544({'projectCode':_0x44170a,'appCode':_0x440ad5,'env':_0x4e77ec,'cookie':_0x49fca5[_0x3bed34(0x148)]});return{'ok':!![]};}},{'service':a74_0x3607bc(0x13c),'command':a74_0x3607bc(0x155),'description':a74_0x3607bc(0x142),'risk':a74_0x3607bc(0x143),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x5b2cd9){const _0x4d9d6e=a74_0x3607bc;return await upgradeApp(_0x5b2cd9[_0x4d9d6e(0x145)],{'yes':_0x5b2cd9[_0x4d9d6e(0x150)](_0x4d9d6e(0x13e))}),{'ok':!![]};}}];
@@ -1 +1 @@
1
- (function(_0x4b3c84,_0x4a4306){const _0x430d96=a75_0x1614,_0x397b83=_0x4b3c84();while(!![]){try{const _0x377540=parseInt(_0x430d96(0xfd))/0x1+parseInt(_0x430d96(0x10f))/0x2+-parseInt(_0x430d96(0x11a))/0x3+-parseInt(_0x430d96(0x101))/0x4+parseInt(_0x430d96(0x10e))/0x5+-parseInt(_0x430d96(0xf4))/0x6+parseInt(_0x430d96(0x117))/0x7;if(_0x377540===_0x4a4306)break;else _0x397b83['push'](_0x397b83['shift']());}catch(_0xd8c3ec){_0x397b83['push'](_0x397b83['shift']());}}}(a75_0x56c6,0x47cc6));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';function a75_0x56c6(){const _0x28f94b=['Please\x20enter\x20App\x20Code:','../..','1780660MfIZFP','1120658YudJQp','appcode','trim','Upgrade\x20it\x20to\x20','.bak','\x20project\x20init`\x20to\x20start\x20fresh.','green','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','1600725VUfWvr','初始化项目配置文件成功','✓\x20Upgraded\x20','1545786mAWhFF','package.json','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','version','bold','env','cyan','\x20\x20appcode:\x20','1981776NamuKs','string','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','\x20api\x20pull\x27','log','\x20→\x20.rabetbase.json','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','info','527841opfpDX','yellow','toLocaleString','从旧配置文件升级成功','2133332FGRYGP','utf8','parse','.rabetbase.json','init','cwd','1.0.0','setLogPath','?\x20(Old\x20file\x20→\x20*.bak)','\x20\x20AppCode:\x20','production'];a75_0x56c6=function(){return _0x28f94b;};return a75_0x56c6();}import{fileURLToPath}from'node:url';import a75_0xefd7ee from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';function a75_0x1614(_0x3f3542,_0x239eb4){_0x3f3542=_0x3f3542-0xee;const _0x56c62=a75_0x56c6();let _0x1614c2=_0x56c62[_0x3f3542];return _0x1614c2;}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';export async function initConfig(_0x2a71ca){const _0x4d3547=a75_0x1614,{appcode:_0x3e6d22,env:_0xf2fdb6,autoYes:_0x3019a4}=_0x2a71ca,_0x3627cd=process[_0x4d3547(0x106)]();if(getProjectConfigPath())throw new Error(_0x4d3547(0xf6));let _0xb6733a;for(const _0x52799f of LEGACY_CONFIG_NAMES){const _0xd194e4=resolve(_0x3627cd,_0x52799f);if(existsSync(_0xd194e4)){_0xb6733a=_0xd194e4;break;}}if(_0xb6733a){let _0xcef706={};try{_0xcef706=JSON[_0x4d3547(0x103)](readFileSync(_0xb6733a,_0x4d3547(0x102)));}catch{}const _0x84074c=basename(_0xb6733a),_0x27e9e3=_0xcef706?.[_0x4d3547(0x110)]||_0xcef706?.['app'];let _0x562bbe=_0x3019a4;!_0x3019a4&&(console['log'](a75_0xefd7ee[_0x4d3547(0xfe)](_0x4d3547(0xfb)+a75_0xefd7ee[_0x4d3547(0xf0)](_0x84074c))),_0x27e9e3&&console[_0x4d3547(0xf8)](a75_0xefd7ee[_0x4d3547(0xf2)](_0x4d3547(0xf3)+_0x27e9e3)),_0x562bbe=await confirm({'message':_0x4d3547(0x112)+a75_0xefd7ee['bold'](_0x4d3547(0x104))+_0x4d3547(0x109),'default':!![]}));if(!_0x562bbe){console[_0x4d3547(0xf8)]('Migration\x20cancelled.\x20Run\x20`'+CLI_BIN_NAME+_0x4d3547(0x114));return;}const _0x48b63b=resolve(_0x3627cd,NEW_CONFIG_NAME),_0x1f9a8b=getCliVersionFromPkg(),_0x1309fb=readRawConfig(),_0x247517={..._0x1309fb,..._0xcef706,'version':_0x1f9a8b,'migratedAt':new Date()[_0x4d3547(0xff)](),'migratedFrom':_0xb6733a};if(!_0x247517[_0x4d3547(0x110)]&&!_0x247517['app']){if(!_0x3e6d22){const _0x2a7851=await askAppcode();_0x247517['appcode']=_0x2a7851;}else _0x247517[_0x4d3547(0x110)]=_0x3e6d22;}if(_0x247517['env']&&typeof _0x247517[_0x4d3547(0xf1)]!=='string')delete _0x247517[_0x4d3547(0xf1)];else!_0x247517[_0x4d3547(0xf1)]&&(_0x247517['env']=_0x1309fb['env']||_0x4d3547(0x10b));writeConfigFile(_0x48b63b,_0x247517);const _0x268878=_0xb6733a+_0x4d3547(0x113);renameSync(_0xb6733a,_0x268878),logger[_0x4d3547(0x108)](_0x3627cd),logger[_0x4d3547(0xfc)](_0x4d3547(0x105),_0x4d3547(0x100),{'from':_0xb6733a,'to':_0x48b63b,'appcode':_0x247517[_0x4d3547(0x110)]||_0x247517['app'],'env':_0x247517[_0x4d3547(0xf1)]}),console[_0x4d3547(0xf8)](a75_0xefd7ee[_0x4d3547(0x115)](_0x4d3547(0x119)+_0x84074c+_0x4d3547(0xf9))),console[_0x4d3547(0xf8)](a75_0xefd7ee[_0x4d3547(0xf2)]('\x20\x20AppCode:\x20'+(_0x247517['appcode']||_0x247517['app']))),console[_0x4d3547(0xf8)](a75_0xefd7ee['gray'](_0x4d3547(0xfa)+_0x84074c+_0x4d3547(0x113)));return;}const _0x42b4f9=_0x3e6d22||await askAppcode(),_0x541a0b=resolve(_0x3627cd,NEW_CONFIG_NAME),_0x19c3de=getCliVersionFromPkg(),_0x5ea44d=readRawConfig(),_0x31e096=typeof _0x5ea44d[_0x4d3547(0xf1)]===_0x4d3547(0xf5)?_0x5ea44d[_0x4d3547(0xf1)]:undefined,_0x523680={'version':_0x19c3de,'createdAt':new Date()[_0x4d3547(0xff)](),'appcode':_0x42b4f9,'env':_0xf2fdb6||_0x31e096||_0x4d3547(0x10b)};writeConfigFile(_0x541a0b,_0x523680),logger[_0x4d3547(0x108)](_0x3627cd),logger[_0x4d3547(0xfc)](_0x4d3547(0x105),_0x4d3547(0x118),{'appcode':_0x523680[_0x4d3547(0x110)],'env':_0x523680['env'],'version':_0x523680['version'],'configPath':_0x541a0b}),console[_0x4d3547(0xf8)](a75_0xefd7ee[_0x4d3547(0x115)](_0x4d3547(0xee))),console[_0x4d3547(0xf8)](a75_0xefd7ee[_0x4d3547(0xf2)](_0x4d3547(0x10a)+_0x42b4f9)),console[_0x4d3547(0xf8)](_0x4d3547(0x116)+CLI_BIN_NAME+'\x20api\x20doc\x27\x20and\x20\x27'+CLI_BIN_NAME+_0x4d3547(0xf7));}function askAppcode(){const _0x37c9f2=a75_0x1614;return input({'message':_0x37c9f2(0x10c),'validate':_0x3d975d=>{const _0x5506bb=_0x37c9f2;if(!_0x3d975d['trim']())return'App\x20Code\x20cannot\x20be\x20empty';const {valid:_0x1a02ea,message:_0xb88ed2}=validateAppcode(_0x3d975d[_0x5506bb(0x111)]());return _0x1a02ea||_0xb88ed2||'Invalid\x20App\x20Code';}});}function getCliVersionFromPkg(){const _0x572ed0=a75_0x1614;try{const _0x41d7b7=fileURLToPath(import.meta.url),_0x3452a0=resolve(dirname(_0x41d7b7),_0x572ed0(0x10d)),_0x89be71=JSON['parse'](readFileSync(resolve(_0x3452a0,_0x572ed0(0x11b)),_0x572ed0(0x102)));return _0x89be71[_0x572ed0(0xef)]||_0x572ed0(0x107);}catch{return _0x572ed0(0x107);}}
1
+ (function(_0x495ebd,_0x35c73a){const _0x2ae852=a75_0x1c3a,_0x1d510e=_0x495ebd();while(!![]){try{const _0x4fa07d=-parseInt(_0x2ae852(0x8a))/0x1*(parseInt(_0x2ae852(0x82))/0x2)+-parseInt(_0x2ae852(0x8e))/0x3*(parseInt(_0x2ae852(0x9d))/0x4)+-parseInt(_0x2ae852(0x7f))/0x5*(-parseInt(_0x2ae852(0x7e))/0x6)+parseInt(_0x2ae852(0x89))/0x7*(-parseInt(_0x2ae852(0x81))/0x8)+-parseInt(_0x2ae852(0x9c))/0x9*(parseInt(_0x2ae852(0x7c))/0xa)+-parseInt(_0x2ae852(0x7d))/0xb+parseInt(_0x2ae852(0x83))/0xc;if(_0x4fa07d===_0x35c73a)break;else _0x1d510e['push'](_0x1d510e['shift']());}catch(_0x3eb317){_0x1d510e['push'](_0x1d510e['shift']());}}}(a75_0x3a1c,0x5ed8d));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a75_0x385cd5 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';export async function initConfig(_0xcef7b6){const _0x11c6f2=a75_0x1c3a,{appcode:_0x8eb91a,env:_0x9f7464,autoYes:_0x70e0a9}=_0xcef7b6,_0x4e9581=process[_0x11c6f2(0x86)]();if(getProjectConfigPath())throw new Error(_0x11c6f2(0x84));let _0x12eabc;for(const _0x1f89cb of LEGACY_CONFIG_NAMES){const _0x27e488=resolve(_0x4e9581,_0x1f89cb);if(existsSync(_0x27e488)){_0x12eabc=_0x27e488;break;}}if(_0x12eabc){let _0x28c6e5={};try{_0x28c6e5=JSON[_0x11c6f2(0xa4)](readFileSync(_0x12eabc,'utf8'));}catch{}const _0x209903=basename(_0x12eabc),_0x3a16f3=_0x28c6e5?.['appcode']||_0x28c6e5?.[_0x11c6f2(0x94)];let _0x326d9b=_0x70e0a9;!_0x70e0a9&&(console[_0x11c6f2(0x96)](a75_0x385cd5[_0x11c6f2(0xaa)]('⚠\x20Found\x20legacy\x20configuration\x20file:\x20'+a75_0x385cd5['bold'](_0x209903))),_0x3a16f3&&console[_0x11c6f2(0x96)](a75_0x385cd5['cyan'](_0x11c6f2(0xa7)+_0x3a16f3)),_0x326d9b=await confirm({'message':'Upgrade\x20it\x20to\x20'+a75_0x385cd5[_0x11c6f2(0x95)](_0x11c6f2(0x99))+_0x11c6f2(0xa8),'default':!![]}));if(!_0x326d9b){console['log'](_0x11c6f2(0xa2)+CLI_BIN_NAME+_0x11c6f2(0x9e));return;}const _0x13ce9a=resolve(_0x4e9581,NEW_CONFIG_NAME),_0x2e8b70=getCliVersionFromPkg(),_0x592e63=readRawConfig(),_0x4b2cb1={..._0x592e63,..._0x28c6e5,'version':_0x2e8b70,'migratedAt':new Date()[_0x11c6f2(0x8d)](),'migratedFrom':_0x12eabc};if(!_0x4b2cb1[_0x11c6f2(0x9f)]&&!_0x4b2cb1[_0x11c6f2(0x94)]){if(!_0x8eb91a){const _0x19da0b=await askAppcode();_0x4b2cb1['appcode']=_0x19da0b;}else _0x4b2cb1[_0x11c6f2(0x9f)]=_0x8eb91a;}if(_0x4b2cb1[_0x11c6f2(0x8f)]&&typeof _0x4b2cb1[_0x11c6f2(0x8f)]!==_0x11c6f2(0x8b))delete _0x4b2cb1[_0x11c6f2(0x8f)];else!_0x4b2cb1[_0x11c6f2(0x8f)]&&(_0x4b2cb1[_0x11c6f2(0x8f)]=_0x592e63[_0x11c6f2(0x8f)]||_0x11c6f2(0x98));writeConfigFile(_0x13ce9a,_0x4b2cb1);const _0x4062d8=_0x12eabc+_0x11c6f2(0xa5);renameSync(_0x12eabc,_0x4062d8),logger[_0x11c6f2(0xa6)](_0x4e9581),logger[_0x11c6f2(0x9a)]('init','从旧配置文件升级成功',{'from':_0x12eabc,'to':_0x13ce9a,'appcode':_0x4b2cb1[_0x11c6f2(0x9f)]||_0x4b2cb1[_0x11c6f2(0x94)],'env':_0x4b2cb1[_0x11c6f2(0x8f)]}),console['log'](a75_0x385cd5[_0x11c6f2(0xa1)](_0x11c6f2(0x91)+_0x209903+_0x11c6f2(0x90))),console[_0x11c6f2(0x96)](a75_0x385cd5[_0x11c6f2(0x80)](_0x11c6f2(0x88)+(_0x4b2cb1[_0x11c6f2(0x9f)]||_0x4b2cb1[_0x11c6f2(0x94)]))),console[_0x11c6f2(0x96)](a75_0x385cd5['gray'](_0x11c6f2(0x7b)+_0x209903+_0x11c6f2(0xa5)));return;}const _0x1f01ca=_0x8eb91a||await askAppcode(),_0x1d07e4=resolve(_0x4e9581,NEW_CONFIG_NAME),_0x1f7ef9=getCliVersionFromPkg(),_0x4245ba=readRawConfig(),_0x847cfd=typeof _0x4245ba['env']===_0x11c6f2(0x8b)?_0x4245ba[_0x11c6f2(0x8f)]:undefined,_0x5ba44b={'version':_0x1f7ef9,'createdAt':new Date()['toLocaleString'](),'appcode':_0x1f01ca,'env':_0x9f7464||_0x847cfd||_0x11c6f2(0x98)};writeConfigFile(_0x1d07e4,_0x5ba44b),logger[_0x11c6f2(0xa6)](_0x4e9581),logger['info'](_0x11c6f2(0x8c),_0x11c6f2(0x87),{'appcode':_0x5ba44b[_0x11c6f2(0x9f)],'env':_0x5ba44b['env'],'version':_0x5ba44b['version'],'configPath':_0x1d07e4}),console[_0x11c6f2(0x96)](a75_0x385cd5[_0x11c6f2(0xa1)]('✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory')),console[_0x11c6f2(0x96)](a75_0x385cd5[_0x11c6f2(0x80)]('\x20\x20AppCode:\x20'+_0x1f01ca)),console['log'](_0x11c6f2(0x85)+CLI_BIN_NAME+'\x20api\x20doc\x27\x20and\x20\x27'+CLI_BIN_NAME+_0x11c6f2(0x93));}function a75_0x3a1c(){const _0x9894ca=['string','init','toLocaleString','50661spdeCg','env','\x20→\x20.rabetbase.json','✓\x20Upgraded\x20','../..','\x20api\x20pull\x27','app','bold','log','App\x20Code\x20cannot\x20be\x20empty','production','.rabetbase.json','info','Please\x20enter\x20App\x20Code:','36fPiHre','4BiwpiF','\x20project\x20init`\x20to\x20start\x20fresh.','appcode','1.0.0','green','Migration\x20cancelled.\x20Run\x20`','trim','parse','.bak','setLogPath','\x20\x20appcode:\x20','?\x20(Old\x20file\x20→\x20*.bak)','version','yellow','utf8','Invalid\x20App\x20Code','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','58690jKbWnM','679877NVLSNm','1472178ilUdRQ','15SJzUHj','cyan','8RfiwqJ','11054LWoEor','14711472rtpdfL','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','cwd','初始化项目配置文件成功','\x20\x20AppCode:\x20','4921903mbDmzg','139OoPDGu'];a75_0x3a1c=function(){return _0x9894ca;};return a75_0x3a1c();}function a75_0x1c3a(_0x129ba2,_0x4e73a0){_0x129ba2=_0x129ba2-0x79;const _0x3a1cb9=a75_0x3a1c();let _0x1c3a23=_0x3a1cb9[_0x129ba2];return _0x1c3a23;}function askAppcode(){const _0xae4376=a75_0x1c3a;return input({'message':_0xae4376(0x9b),'validate':_0x487fa0=>{const _0x2bfa17=_0xae4376;if(!_0x487fa0['trim']())return _0x2bfa17(0x97);const {valid:_0x1c7566,message:_0x59ea27}=validateAppcode(_0x487fa0[_0x2bfa17(0xa3)]());return _0x1c7566||_0x59ea27||_0x2bfa17(0x7a);}});}function getCliVersionFromPkg(){const _0x281b45=a75_0x1c3a;try{const _0x34434a=fileURLToPath(import.meta.url),_0x2a30e7=resolve(dirname(_0x34434a),_0x281b45(0x92)),_0x2c3e94=JSON['parse'](readFileSync(resolve(_0x2a30e7,'package.json'),_0x281b45(0x79)));return _0x2c3e94[_0x281b45(0xa9)]||_0x281b45(0xa0);}catch{return _0x281b45(0xa0);}}
@@ -1 +1 @@
1
- const a76_0x1c1d99=a76_0x5036;(function(_0x344173,_0x5aab61){const _0x4f5cd3=a76_0x5036,_0x1c4d49=_0x344173();while(!![]){try{const _0x818ce1=-parseInt(_0x4f5cd3(0x11b))/0x1+-parseInt(_0x4f5cd3(0x113))/0x2+-parseInt(_0x4f5cd3(0xe7))/0x3*(parseInt(_0x4f5cd3(0x13c))/0x4)+-parseInt(_0x4f5cd3(0xe6))/0x5+parseInt(_0x4f5cd3(0x131))/0x6*(-parseInt(_0x4f5cd3(0x11a))/0x7)+-parseInt(_0x4f5cd3(0x122))/0x8+parseInt(_0x4f5cd3(0x157))/0x9;if(_0x818ce1===_0x5aab61)break;else _0x1c4d49['push'](_0x1c4d49['shift']());}catch(_0x4d624b){_0x1c4d49['push'](_0x1c4d49['shift']());}}}(a76_0x3de2,0x8f881));import a76_0x212cf3 from'chalk';import a76_0x2dfc40 from'ora';function a76_0x3de2(){const _0x13b80a=['@lovrabet/sdk','failed','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','\x20\x20Action:\x20delete','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','\x20removed','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20lovrabet/rabetbase\x20--global','\x20removed\x20(','\x20\x20bun\x20install','Legacy\x20artifacts:','skipped\x20(no\x20legacy\x20config)','dependencies','.cursor/mcp.json','2196160VykUiI','687NBqogH','===\x20Upgrade\x20Analysis\x20===','utf8','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','status','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','[\x22@lovrabet/sdk\x22]:\x20','\x20→\x20keys:\x20','keys','\x20\x20New\x20config\x20(.rabetbase.json):\x20','.lovrabet','label','Step\x204/7:\x20Cleaning\x20MCP\x20config...','Clean\x20MCP\x20config','needed','push','Config\x20migration','path','entries','stringify','none\x20found','filter','lovrabet/rabetbase\x20installed\x20globally','succeed','package.json','isDirectory','skipped','start','\x20\x20#\x20or','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','values','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','inherit','latest','files','gray','Upgrade\x20cancelled.','\x20→\x20','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','configMigration','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','not\x20needed','1781390LSKnDn','no\x20legacy\x20entry','Step\x204/7:\x20MCP\x20config\x20—\x20','Skill\x20swap:','message','no\x20legacy\x20config\x20found','hasNewConfig','70xxQHqF','20228YZdBlT','object','bold','error','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','not\x20found\x20or\x20already\x20at\x20latest','\x20\x20Current\x20version\x20in\x20','4004096gXLDzJ','.claude/skills/lovrabet','Upgrade\x20completed\x20successfully!','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','some','parse','not\x20found\x20(will\x20create)','sdkUpgrade','exit\x20','\x20(backup:\x20','lovrabet/rabetbase','log','fail','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','devDependencies','141870nyXWcr','green','yes','oldPath','Upgrade\x20@lovrabet/sdk','\x20\x20npm\x20install','info','Config\x20file:','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','===\x20Upgrade\x20Summary\x20===','MCP\x20config:','18508YxyYzt','cwd','undefined','white','.cursor/rules/lovrabet_rules.mdc','string','Remove\x20.lovrabet/','@lovrabet/sdk:','Step\x205/7:\x20Removing\x20old\x20skill...','Remove\x20old\x20skill','\x20→\x20latest','args','oldMcpConfig','Step\x201/7:\x20Migrating\x20config...','isArray','FOUND','mcpServers','fields','already\x20exists\x20(will\x20merge)','join','done','Step\x201/7:\x20Config\x20migration\x20—\x20','red','no\x20matching\x20entry\x20found','yellow','@lovrabet/dataset-mcp-server','cyan','33611445vtncss','detail','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','length','step','lovrabet/lovrabet-skill\x20removed','includes'];a76_0x3de2=function(){return _0x13b80a;};return a76_0x3de2();}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{runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a76_0x1c1d99(0xfd)](_0x5e5a4a=>_0x5e5a4a!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0xc834d9){const _0x2800cd=a76_0x1c1d99,_0x55c0ee=[];for(const _0x10e003 of Object[_0x2800cd(0x106)](CORE_IDE_CONFIGS)){if(_0x10e003[_0x2800cd(0x10a)])for(const _0x403108 of _0x10e003[_0x2800cd(0x10a)]){_0x55c0ee[_0x2800cd(0xf7)](resolve(_0xc834d9,_0x403108[_0x2800cd(0xf9)]));}}return _0x55c0ee;}function analyse(_0x3fcc55){const _0x32d595=a76_0x1c1d99;let _0xbac8a9=null;const _0x505a4a=resolve(_0x3fcc55,NEW_CONFIG_NAME),_0x3f5e15=existsSync(_0x505a4a);for(const _0x53f70a of LEGACY_CONFIG_NAMES){const _0x889c24=resolve(_0x3fcc55,_0x53f70a);if(existsSync(_0x889c24)){const _0x198623=readConfigFile(_0x889c24),_0xd706d9=Object[_0x32d595(0xf0)](_0x198623)['filter'](_0x5260a1=>typeof _0x198623[_0x5260a1]!==_0x32d595(0x13e));_0xbac8a9={'oldPath':_0x889c24,'hasNewConfig':_0x3f5e15,'fields':_0xd706d9};break;}}const _0x2d336d=[],_0x279306=resolve(_0x3fcc55,_0x32d595(0xf2));if(existsSync(_0x279306))_0x2d336d[_0x32d595(0xf7)](_0x279306);const _0x442c45=resolve(_0x3fcc55,_0x32d595(0x140));if(existsSync(_0x442c45))_0x2d336d[_0x32d595(0xf7)](_0x442c45);const _0x242588=resolve(_0x3fcc55,_0x32d595(0x123));if(existsSync(_0x242588))_0x2d336d[_0x32d595(0xf7)](_0x242588);for(const _0x5bc622 of collectIdeSkillFiles(_0x3fcc55)){if(existsSync(_0x5bc622))_0x2d336d[_0x32d595(0xf7)](_0x5bc622);}let _0xcd2430=null;const _0x657f77=resolve(_0x3fcc55,_0x32d595(0xe5));if(existsSync(_0x657f77))try{const _0x18320e=JSON[_0x32d595(0x127)](readFileSync(_0x657f77,_0x32d595(0xe9)));if(_0x18320e?.[_0x32d595(0x14c)]&&typeof _0x18320e['mcpServers']===_0x32d595(0x11c)){const _0x1d1535=[];for(const [_0x578a73,_0x2d139a]of Object['entries'](_0x18320e[_0x32d595(0x14c)])){const _0x51c2c4=_0x2d139a;_0x51c2c4?.[_0x32d595(0x147)]&&Array[_0x32d595(0x14a)](_0x51c2c4[_0x32d595(0x147)])&&_0x51c2c4['args'][_0x32d595(0x126)](_0x16586c=>typeof _0x16586c==='string'&&_0x16586c[_0x32d595(0x15d)](_0x32d595(0x155)))&&_0x1d1535[_0x32d595(0xf7)](_0x578a73);}_0x1d1535[_0x32d595(0x15a)]>0x0&&(_0xcd2430={'path':_0x657f77,'keys':_0x1d1535});}}catch{}const _0x2dbf39=_0x2d336d[_0x32d595(0x15a)]>0x0||_0xbac8a9!==null;let _0x165d62=null;const _0x35c51d=resolve(_0x3fcc55,_0x32d595(0x100));if(existsSync(_0x35c51d))try{const _0x554d4c=JSON[_0x32d595(0x127)](readFileSync(_0x35c51d,_0x32d595(0xe9)));for(const _0x2e6eb2 of[_0x32d595(0xe4),_0x32d595(0x130)]){const _0x37f169=_0x554d4c?.[_0x2e6eb2]?.[_0x32d595(0x15e)];if(typeof _0x37f169===_0x32d595(0x141)){_0x37f169!==_0x32d595(0x109)&&(_0x165d62={'pkgPath':_0x35c51d,'currentVersion':_0x37f169,'field':_0x2e6eb2});break;}}}catch{}return{'configMigration':_0xbac8a9,'oldArtifacts':_0x2d336d,'oldMcpConfig':_0xcd2430,'needsSkillSwap':_0x2dbf39,'sdkUpgrade':_0x165d62};}function a76_0x5036(_0x50585d,_0x174b39){_0x50585d=_0x50585d-0xda;const _0x3de217=a76_0x3de2();let _0x5036fc=_0x3de217[_0x50585d];return _0x5036fc;}function printReport(_0x39fb3a){const _0x5e6623=a76_0x1c1d99,{configMigration:_0x1e459a,oldArtifacts:_0x2e17f3,oldMcpConfig:_0x48e7fe,needsSkillSwap:_0x5a4919}=_0x39fb3a;console[_0x5e6623(0x12d)](''),console[_0x5e6623(0x12d)](a76_0x212cf3[_0x5e6623(0x11d)](_0x5e6623(0xe8))),console[_0x5e6623(0x12d)]('');_0x1e459a?(console[_0x5e6623(0x12d)](a76_0x212cf3[_0x5e6623(0x156)]('Config\x20file:')+('\x20\x20'+a76_0x212cf3[_0x5e6623(0x154)](_0x1e459a['oldPath']))),console[_0x5e6623(0x12d)](_0x5e6623(0xf1)+(_0x1e459a[_0x5e6623(0x119)]?a76_0x212cf3[_0x5e6623(0x132)](_0x5e6623(0x14e)):a76_0x212cf3['gray'](_0x5e6623(0x128)))),console[_0x5e6623(0x12d)]('\x20\x20Fields\x20to\x20migrate:\x20'+_0x1e459a[_0x5e6623(0x14d)][_0x5e6623(0x14f)](',\x20')),console['log'](_0x5e6623(0x11f))):console[_0x5e6623(0x12d)](a76_0x212cf3[_0x5e6623(0x156)](_0x5e6623(0x138))+'\x20\x20'+a76_0x212cf3['gray'](_0x5e6623(0x118)));console[_0x5e6623(0x12d)]('');if(_0x2e17f3[_0x5e6623(0x15a)]>0x0){console[_0x5e6623(0x12d)](a76_0x212cf3[_0x5e6623(0x156)]('Legacy\x20artifacts:'));for(const _0x2b9423 of _0x2e17f3){console[_0x5e6623(0x12d)]('\x20\x20'+a76_0x212cf3[_0x5e6623(0x152)](_0x5e6623(0x14b))+'\x20\x20'+_0x2b9423);}console[_0x5e6623(0x12d)](_0x5e6623(0xdc));}else console['log'](a76_0x212cf3[_0x5e6623(0x156)](_0x5e6623(0xe2))+'\x20\x20'+a76_0x212cf3[_0x5e6623(0x10b)](_0x5e6623(0xfc)));console[_0x5e6623(0x12d)]('');_0x48e7fe?(console[_0x5e6623(0x12d)](a76_0x212cf3['cyan'](_0x5e6623(0x13b))+('\x20\x20'+a76_0x212cf3[_0x5e6623(0x154)](_0x48e7fe['path'])+_0x5e6623(0xef)+_0x48e7fe[_0x5e6623(0xf0)]['join'](',\x20'))),console[_0x5e6623(0x12d)](_0x5e6623(0x10f))):console['log'](a76_0x212cf3[_0x5e6623(0x156)]('MCP\x20config:')+'\x20\x20'+a76_0x212cf3[_0x5e6623(0x10b)](_0x5e6623(0x114)));console['log'](''),console[_0x5e6623(0x12d)](a76_0x212cf3[_0x5e6623(0x156)](_0x5e6623(0x116))+('\x20\x20'+(_0x5a4919?a76_0x212cf3[_0x5e6623(0x154)](_0x5e6623(0xf6)):a76_0x212cf3[_0x5e6623(0x132)](_0x5e6623(0x112)))));_0x5a4919&&console['log'](_0x5e6623(0xdf));console[_0x5e6623(0x12d)]('');if(_0x39fb3a[_0x5e6623(0x129)]){const {currentVersion:_0x343497,field:_0x4d3b4b,pkgPath:_0x2b7679}=_0x39fb3a[_0x5e6623(0x129)];console[_0x5e6623(0x12d)](a76_0x212cf3['cyan']('@lovrabet/sdk:')+('\x20\x20'+a76_0x212cf3[_0x5e6623(0x154)](_0x2b7679))),console[_0x5e6623(0x12d)](_0x5e6623(0x121)+_0x4d3b4b+':\x20'+a76_0x212cf3[_0x5e6623(0x154)](_0x343497)+'\x20→\x20'+a76_0x212cf3[_0x5e6623(0x132)](_0x5e6623(0x109))),console['log'](_0x5e6623(0x10e));}else console[_0x5e6623(0x12d)](a76_0x212cf3[_0x5e6623(0x156)](_0x5e6623(0x143))+'\x20\x20'+a76_0x212cf3[_0x5e6623(0x10b)](_0x5e6623(0x120)));console[_0x5e6623(0x12d)]('');}function execConfigMigration(_0x5ee59f,_0x370016){const _0x33df0a=a76_0x1c1d99,{configMigration:_0x44c6b2}=_0x5ee59f;if(!_0x44c6b2?.[_0x33df0a(0x134)])return{'step':0x1,'label':_0x33df0a(0xf8),'ok':!![],'detail':_0x33df0a(0xe3)};const _0x39d837=readConfigFile(_0x44c6b2[_0x33df0a(0x134)]),_0x46e209=resolve(_0x370016,NEW_CONFIG_NAME),_0x3d58c3=_0x44c6b2[_0x33df0a(0x119)]?readConfigFile(_0x46e209):{};for(const [_0x12b48e,_0x5cca78]of Object[_0x33df0a(0xfa)](_0x39d837)){!(_0x12b48e in _0x3d58c3)&&(_0x3d58c3[_0x12b48e]=_0x5cca78);}writeConfigFile(_0x46e209,_0x3d58c3);const _0x183b22=_0x44c6b2[_0x33df0a(0x134)]+'.bak';return renameSync(_0x44c6b2[_0x33df0a(0x134)],_0x183b22),{'step':0x1,'label':_0x33df0a(0xf8),'ok':!![],'detail':_0x44c6b2[_0x33df0a(0x134)]+_0x33df0a(0x10d)+_0x46e209+_0x33df0a(0x12b)+_0x183b22+')'};}function execRemoveOldArtifacts(_0x440284){const _0x347c22=a76_0x1c1d99,_0x3b687e=[];for(const _0x3c290d of _0x440284){try{if(!existsSync(_0x3c290d))continue;const _0x2dc3f3=tryStat(_0x3c290d);_0x2dc3f3?.[_0x347c22(0x101)]()?rmSync(_0x3c290d,{'recursive':!![],'force':!![]}):unlinkSync(_0x3c290d);}catch(_0x2c543d){_0x3b687e[_0x347c22(0xf7)](_0x3c290d+':\x20'+_0x2c543d[_0x347c22(0x117)]);}}return{'step':0x3,'label':'Remove\x20legacy\x20artifacts','ok':_0x3b687e['length']===0x0,'detail':_0x3b687e[_0x347c22(0x15a)]>0x0?_0x440284[_0x347c22(0x15a)]-_0x3b687e[_0x347c22(0x15a)]+'/'+_0x440284[_0x347c22(0x15a)]+_0x347c22(0xe0)+_0x3b687e[_0x347c22(0x14f)](';\x20')+')':_0x440284[_0x347c22(0x15a)]+_0x347c22(0xde)};}function execCleanMcp(_0x196a49){const _0x6275a4=a76_0x1c1d99;if(!_0x196a49[_0x6275a4(0x148)])return{'step':0x4,'label':_0x6275a4(0xf5),'ok':!![],'detail':'skipped'};try{const _0x1f4acb=readFileSync(_0x196a49[_0x6275a4(0x148)][_0x6275a4(0xf9)],'utf8'),_0x18ce80=JSON[_0x6275a4(0x127)](_0x1f4acb);if(_0x18ce80?.['mcpServers']&&typeof _0x18ce80[_0x6275a4(0x14c)]===_0x6275a4(0x11c)){const _0x33655e=[];for(const [_0x211ccb,_0x17e6cb]of Object[_0x6275a4(0xfa)](_0x18ce80[_0x6275a4(0x14c)])){_0x17e6cb?.[_0x6275a4(0x147)]&&Array['isArray'](_0x17e6cb[_0x6275a4(0x147)])&&_0x17e6cb[_0x6275a4(0x147)][_0x6275a4(0x126)](_0x3d4d3a=>typeof _0x3d4d3a===_0x6275a4(0x141)&&_0x3d4d3a[_0x6275a4(0x15d)](_0x6275a4(0x155)))&&_0x33655e[_0x6275a4(0xf7)](_0x211ccb);}for(const _0x2b5df4 of _0x33655e){delete _0x18ce80[_0x6275a4(0x14c)][_0x2b5df4];}return _0x33655e[_0x6275a4(0x15a)]>0x0&&writeFileSync(_0x196a49[_0x6275a4(0x148)]['path'],JSON[_0x6275a4(0xfb)](_0x18ce80,null,0x2)+'\x0a',_0x6275a4(0xe9)),{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':'removed\x20'+_0x33655e[_0x6275a4(0x14f)](',\x20')+'\x20from\x20'+_0x196a49[_0x6275a4(0x148)]['path']};}return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x6275a4(0x153)};}catch(_0x3e3d04){return{'step':0x4,'label':_0x6275a4(0xf5),'ok':![],'detail':_0x3e3d04['message']};}}function execSkillsRemove(_0x3e4717){const _0x125644=a76_0x1c1d99,_0x4daa90=runNpxSkillsRemove(_0x3e4717,{'stdio':_0x125644(0x108)});return{'step':0x5,'label':_0x125644(0x145),'ok':_0x4daa90['ok'],'detail':_0x4daa90['ok']?_0x125644(0x15c):_0x4daa90[_0x125644(0x11e)]??_0x125644(0x12a)+_0x4daa90[_0x125644(0xeb)]};}function execSkillsAdd(_0x13101a){const _0x3b75be=a76_0x1c1d99,_0x392006=runNpxSkillsAddGlobal(_0x13101a,_0x3b75be(0x12c),{'stdio':_0x3b75be(0x108)});return{'step':0x6,'label':'Install\x20new\x20skill','ok':_0x392006['ok'],'detail':_0x392006['ok']?_0x3b75be(0xfe):_0x392006[_0x3b75be(0x11e)]??_0x3b75be(0x12a)+_0x392006[_0x3b75be(0xeb)]};}function execUpgradeSdk(_0x377150){const _0xc55ab3=a76_0x1c1d99;if(!_0x377150[_0xc55ab3(0x129)])return{'step':0x7,'label':_0xc55ab3(0x135),'ok':!![],'detail':'skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)'};const {pkgPath:_0x1528b3,currentVersion:_0x200aa0,field:_0x942dac}=_0x377150['sdkUpgrade'];try{const _0x5b0e59=readFileSync(_0x1528b3,_0xc55ab3(0xe9)),_0xf73fda=JSON['parse'](_0x5b0e59);return _0xf73fda[_0x942dac][_0xc55ab3(0x15e)]='latest',writeFileSync(_0x1528b3,JSON[_0xc55ab3(0xfb)](_0xf73fda,null,0x2)+'\x0a',_0xc55ab3(0xe9)),{'step':0x7,'label':_0xc55ab3(0x135),'ok':!![],'detail':_0x942dac+_0xc55ab3(0xee)+_0x200aa0+_0xc55ab3(0x146)};}catch(_0x5d4675){return{'step':0x7,'label':_0xc55ab3(0x135),'ok':![],'detail':_0x5d4675[_0xc55ab3(0x117)]};}}function tryStat(_0x4d884b){try{return statSync(_0x4d884b);}catch{return undefined;}}function printSummary(_0x32cf19){const _0x169201=a76_0x1c1d99;console[_0x169201(0x12d)](''),console[_0x169201(0x12d)](a76_0x212cf3['bold'](_0x169201(0x13a))),console[_0x169201(0x12d)]('');for(const _0x479aaf of _0x32cf19){const _0x3af223=_0x479aaf['ok']?a76_0x212cf3[_0x169201(0x132)]('OK'):a76_0x212cf3['red']('FAIL');console[_0x169201(0x12d)]('\x20\x20'+_0x3af223+'\x20\x20Step\x20'+_0x479aaf[_0x169201(0x15b)]+':\x20'+_0x479aaf[_0x169201(0xf3)]);if(_0x479aaf[_0x169201(0x158)])console[_0x169201(0x12d)]('\x20\x20\x20\x20\x20\x20\x20'+a76_0x212cf3[_0x169201(0x10b)](_0x479aaf[_0x169201(0x158)]));}console[_0x169201(0x12d)]('');}export async function upgradeApp(_0x320aa6,_0x56d332){const _0x12e385=a76_0x1c1d99,_0x3d6f4d=process[_0x12e385(0x13d)](),_0x34d404=analyse(_0x3d6f4d),_0xa0b783=!_0x34d404[_0x12e385(0x110)]&&_0x34d404['oldArtifacts'][_0x12e385(0x15a)]===0x0&&!_0x34d404[_0x12e385(0x148)]&&!_0x34d404['needsSkillSwap']&&!_0x34d404[_0x12e385(0x129)];if(_0xa0b783){console[_0x12e385(0x12d)](a76_0x212cf3[_0x12e385(0x132)](_0x12e385(0xec)));return;}printReport(_0x34d404);const _0x1d15b2=_0x56d332[_0x12e385(0x133)]||_0x56d332['Y']||_0x320aa6;if(!_0x1d15b2)try{const _0x245326=await askConfirm('Proceed\x20with\x20upgrade?');if(!_0x245326){console[_0x12e385(0x12d)](a76_0x212cf3[_0x12e385(0x10b)](_0x12e385(0x10c)));return;}}catch(_0x2d6088){if(_0x2d6088?.[_0x12e385(0x117)]==='CANCEL'){console[_0x12e385(0x12d)](a76_0x212cf3[_0x12e385(0x10b)](_0x12e385(0x10c)));return;}throw _0x2d6088;}const _0x92418b=[],_0x4ac0d3=a76_0x2dfc40({'text':_0x12e385(0x149),'color':_0x12e385(0x156)})[_0x12e385(0x103)](),_0x47af90=execConfigMigration(_0x34d404,_0x3d6f4d);_0x92418b['push'](_0x47af90),_0x4ac0d3[_0x47af90['ok']?'succeed':_0x12e385(0x12e)](_0x12e385(0x151)+(_0x47af90['detail']??(_0x47af90['ok']?_0x12e385(0x150):_0x12e385(0xda))));const _0x562063=resolve(_0x3d6f4d,_0x12e385(0xf2)),_0x4cc0ea=a76_0x2dfc40({'text':_0x12e385(0x111),'color':'cyan'})[_0x12e385(0x103)]();if(existsSync(_0x562063))try{rmSync(_0x562063,{'recursive':!![],'force':!![]}),_0x4cc0ea['succeed']('Step\x202/7:\x20.lovrabet/\x20directory\x20removed'),_0x92418b[_0x12e385(0xf7)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0x3fb88a){_0x4cc0ea[_0x12e385(0x12e)](_0x12e385(0x12f)+_0x3fb88a['message']),_0x92418b['push']({'step':0x2,'label':'Remove\x20.lovrabet/','ok':![],'detail':_0x3fb88a[_0x12e385(0x117)]});}else _0x4cc0ea[_0x12e385(0x137)](_0x12e385(0xdd)),_0x92418b[_0x12e385(0xf7)]({'step':0x2,'label':_0x12e385(0x142),'ok':!![],'detail':_0x12e385(0x102)});const _0x21f380=a76_0x2dfc40({'text':_0x12e385(0xdb),'color':_0x12e385(0x156)})[_0x12e385(0x103)](),_0x5e21c7=execRemoveOldArtifacts(_0x34d404['oldArtifacts']);_0x92418b[_0x12e385(0xf7)](_0x5e21c7),_0x21f380[_0x5e21c7['ok']?_0x12e385(0xff):_0x12e385(0x12e)](_0x12e385(0x139)+(_0x5e21c7[_0x12e385(0x158)]??(_0x5e21c7['ok']?_0x12e385(0x150):_0x12e385(0xda))));const _0x5cbaf5=a76_0x2dfc40({'text':_0x12e385(0xf4),'color':'cyan'})[_0x12e385(0x103)](),_0x4cd6d1=execCleanMcp(_0x34d404);_0x92418b['push'](_0x4cd6d1),_0x5cbaf5[_0x4cd6d1['ok']?_0x12e385(0xff):'fail'](_0x12e385(0x115)+(_0x4cd6d1['detail']??(_0x4cd6d1['ok']?'done':_0x12e385(0xda))));const _0x382409=a76_0x2dfc40({'text':_0x12e385(0x144),'color':'cyan'})[_0x12e385(0x103)](),_0x472c99=execSkillsRemove(_0x3d6f4d);_0x92418b[_0x12e385(0xf7)](_0x472c99),_0x382409[_0x472c99['ok']?_0x12e385(0xff):_0x12e385(0x12e)](_0x12e385(0xed)+(_0x472c99[_0x12e385(0x158)]??(_0x472c99['ok']?_0x12e385(0x150):_0x12e385(0xda))));const _0x160e63=a76_0x2dfc40({'text':'Step\x206/7:\x20Installing\x20new\x20skill...','color':'cyan'})[_0x12e385(0x103)](),_0x4316c3=execSkillsAdd(_0x3d6f4d);_0x92418b[_0x12e385(0xf7)](_0x4316c3),_0x160e63[_0x4316c3['ok']?_0x12e385(0xff):_0x12e385(0x12e)](_0x12e385(0x107)+(_0x4316c3[_0x12e385(0x158)]??(_0x4316c3['ok']?_0x12e385(0x150):'failed')));const _0x3e012d=a76_0x2dfc40({'text':_0x12e385(0x159),'color':'cyan'})[_0x12e385(0x103)](),_0x464b99=execUpgradeSdk(_0x34d404);_0x92418b[_0x12e385(0xf7)](_0x464b99),_0x3e012d[_0x464b99['ok']?_0x12e385(0xff):_0x12e385(0x12e)](_0x12e385(0xea)+(_0x464b99['detail']??(_0x464b99['ok']?_0x12e385(0x150):_0x12e385(0xda)))),printSummary(_0x92418b);const _0x2e37ae=_0x92418b[_0x12e385(0x126)](_0x2d0536=>!_0x2d0536['ok']);_0x2e37ae?console[_0x12e385(0x12d)](a76_0x212cf3['yellow']('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console[_0x12e385(0x12d)](a76_0x212cf3[_0x12e385(0x132)](_0x12e385(0x124))),_0x464b99['ok']&&_0x34d404[_0x12e385(0x129)]&&(console['log'](''),console[_0x12e385(0x12d)](a76_0x212cf3[_0x12e385(0x11d)][_0x12e385(0x156)](_0x12e385(0x125))),console['log'](a76_0x212cf3[_0x12e385(0x156)](_0x12e385(0x105))),console[_0x12e385(0x12d)](''),console['log'](a76_0x212cf3[_0x12e385(0x13f)](_0x12e385(0x136))),console['log'](a76_0x212cf3[_0x12e385(0x13f)](_0x12e385(0x104))),console[_0x12e385(0x12d)](a76_0x212cf3['white'](_0x12e385(0xe1))),console[_0x12e385(0x12d)](''));}
1
+ (function(_0x460667,_0x13becc){const _0x4ce876=a76_0x48da,_0x3ce3a7=_0x460667();while(!![]){try{const _0x35293d=-parseInt(_0x4ce876(0x20f))/0x1*(parseInt(_0x4ce876(0x1f4))/0x2)+parseInt(_0x4ce876(0x1a7))/0x3*(-parseInt(_0x4ce876(0x204))/0x4)+parseInt(_0x4ce876(0x20c))/0x5*(-parseInt(_0x4ce876(0x217))/0x6)+-parseInt(_0x4ce876(0x1b5))/0x7+-parseInt(_0x4ce876(0x1f0))/0x8*(-parseInt(_0x4ce876(0x208))/0x9)+parseInt(_0x4ce876(0x1d7))/0xa*(parseInt(_0x4ce876(0x1fd))/0xb)+parseInt(_0x4ce876(0x207))/0xc;if(_0x35293d===_0x13becc)break;else _0x3ce3a7['push'](_0x3ce3a7['shift']());}catch(_0x431e82){_0x3ce3a7['push'](_0x3ce3a7['shift']());}}}(a76_0x5e02,0xd9f0e));import a76_0x55f13d from'chalk';import a76_0x4ff77e from'ora';function a76_0x5e02(){const _0x35c99c=['\x20\x20#\x20or','Legacy\x20artifacts:','@lovrabet/sdk','\x20\x20npm\x20install','cyan','push','27TJijRB','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','@lovrabet/sdk:','path','stringify','latest','lovrabet/rabetbase','Remove\x20.lovrabet/','FOUND','\x20removed','.cursor/mcp.json','no\x20matching\x20entry\x20found','Upgrade\x20@lovrabet/sdk','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','4288291IPAKhi','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','hasNewConfig','not\x20needed','Upgrade\x20cancelled.','exit\x20','\x20\x20New\x20config\x20(.rabetbase.json):\x20','.claude/skills/lovrabet','===\x20Upgrade\x20Summary\x20===','not\x20found\x20(will\x20create)','needsSkillSwap','values','configMigration','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','error','\x20→\x20latest','white','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','Remove\x20old\x20skill','files','step','not\x20found\x20or\x20already\x20at\x20latest','cwd','mcpServers','gray','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','\x20→\x20keys:\x20','entries','succeed','keys','yellow','info','Step\x204/7:\x20MCP\x20config\x20—\x20','green','10zRCxbW','\x20\x20Current\x20version\x20in\x20','log','package.json','Config\x20file:','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','message','===\x20Upgrade\x20Analysis\x20===','Step\x206/7:\x20Installing\x20new\x20skill...','length','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','fields','Skill\x20swap:','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','\x20\x20Step\x20','\x20→\x20','\x20\x20Fields\x20to\x20migrate:\x20','Remove\x20legacy\x20artifacts','@lovrabet/dataset-mcp-server','args','.lovrabet','includes','undefined','failed','isArray','342184TZyEfU','fail','Proceed\x20with\x20upgrade?','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','66SkUCFH','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','string','status','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','done','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','some','oldPath','11981585jYPrID','yes','.bak','MCP\x20config:','join','Config\x20migration','Step\x204/7:\x20Cleaning\x20MCP\x20config...','226260hfsrtb','Install\x20new\x20skill','bold','25281288kkxZWY','90aePDPU','inherit','utf8','\x20from\x20','379720AEarJG','no\x20legacy\x20config\x20found','oldArtifacts','39563eSxCPz','start','devDependencies','needed','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','removed\x20','sdkUpgrade','object','24tSktcN','[\x22@lovrabet/sdk\x22]:\x20','\x20\x20Action:\x20delete','detail','skipped','FAIL','no\x20legacy\x20entry','oldMcpConfig','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','none\x20found','red','already\x20exists\x20(will\x20merge)','Clean\x20MCP\x20config','CANCEL','parse'];a76_0x5e02=function(){return _0x35c99c;};return a76_0x5e02();}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{runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';function a76_0x48da(_0x9bba86,_0x357ba5){_0x9bba86=_0x9bba86-0x19c;const _0x5e0234=a76_0x5e02();let _0x48da1f=_0x5e0234[_0x9bba86];return _0x48da1f;}const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0x75adfa=>_0x75adfa!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x3a6529){const _0x56c67c=a76_0x48da,_0x179d27=[];for(const _0xa26b70 of Object[_0x56c67c(0x1c0)](CORE_IDE_CONFIGS)){if(_0xa26b70['files'])for(const _0x4fd10e of _0xa26b70[_0x56c67c(0x1c8)]){_0x179d27[_0x56c67c(0x1a6)](resolve(_0x3a6529,_0x4fd10e['path']));}}return _0x179d27;}function analyse(_0x1d9305){const _0x259024=a76_0x48da;let _0x2817c7=null;const _0x1e5cba=resolve(_0x1d9305,NEW_CONFIG_NAME),_0x5e1051=existsSync(_0x1e5cba);for(const _0x290ed3 of LEGACY_CONFIG_NAMES){const _0x51ba7c=resolve(_0x1d9305,_0x290ed3);if(existsSync(_0x51ba7c)){const _0x1ceee9=readConfigFile(_0x51ba7c),_0x33c536=Object['keys'](_0x1ceee9)['filter'](_0x25da2d=>typeof _0x1ceee9[_0x25da2d]!==_0x259024(0x1ed));_0x2817c7={'oldPath':_0x51ba7c,'hasNewConfig':_0x5e1051,'fields':_0x33c536};break;}}const _0x72b1d8=[],_0x12625c=resolve(_0x1d9305,_0x259024(0x1eb));if(existsSync(_0x12625c))_0x72b1d8['push'](_0x12625c);const _0x118675=resolve(_0x1d9305,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x118675))_0x72b1d8[_0x259024(0x1a6)](_0x118675);const _0x125998=resolve(_0x1d9305,_0x259024(0x1bc));if(existsSync(_0x125998))_0x72b1d8[_0x259024(0x1a6)](_0x125998);for(const _0xa4d71d of collectIdeSkillFiles(_0x1d9305)){if(existsSync(_0xa4d71d))_0x72b1d8[_0x259024(0x1a6)](_0xa4d71d);}let _0x5379e7=null;const _0x120d6a=resolve(_0x1d9305,_0x259024(0x1b1));if(existsSync(_0x120d6a))try{const _0x163bf5=JSON['parse'](readFileSync(_0x120d6a,'utf8'));if(_0x163bf5?.['mcpServers']&&typeof _0x163bf5[_0x259024(0x1cc)]===_0x259024(0x216)){const _0x94f17f=[];for(const [_0x282fb9,_0xe7b2bf]of Object[_0x259024(0x1d0)](_0x163bf5[_0x259024(0x1cc)])){const _0x3bb567=_0xe7b2bf;_0x3bb567?.['args']&&Array[_0x259024(0x1ef)](_0x3bb567[_0x259024(0x1ea)])&&_0x3bb567[_0x259024(0x1ea)][_0x259024(0x1fb)](_0x45aecb=>typeof _0x45aecb===_0x259024(0x1f6)&&_0x45aecb[_0x259024(0x1ec)](_0x259024(0x1e9)))&&_0x94f17f[_0x259024(0x1a6)](_0x282fb9);}_0x94f17f[_0x259024(0x1e0)]>0x0&&(_0x5379e7={'path':_0x120d6a,'keys':_0x94f17f});}}catch{}const _0x905826=_0x72b1d8[_0x259024(0x1e0)]>0x0||_0x2817c7!==null;let _0x181f58=null;const _0x485dde=resolve(_0x1d9305,_0x259024(0x1da));if(existsSync(_0x485dde))try{const _0x47dec6=JSON[_0x259024(0x1a0)](readFileSync(_0x485dde,_0x259024(0x20a)));for(const _0x28ff40 of['dependencies',_0x259024(0x211)]){const _0x2e6f80=_0x47dec6?.[_0x28ff40]?.['@lovrabet/sdk'];if(typeof _0x2e6f80===_0x259024(0x1f6)){_0x2e6f80!==_0x259024(0x1ac)&&(_0x181f58={'pkgPath':_0x485dde,'currentVersion':_0x2e6f80,'field':_0x28ff40});break;}}}catch{}return{'configMigration':_0x2817c7,'oldArtifacts':_0x72b1d8,'oldMcpConfig':_0x5379e7,'needsSkillSwap':_0x905826,'sdkUpgrade':_0x181f58};}function printReport(_0x4768b5){const _0x5947d0=a76_0x48da,{configMigration:_0x301e71,oldArtifacts:_0x1adb9d,oldMcpConfig:_0x5175a2,needsSkillSwap:_0x170f6d}=_0x4768b5;console[_0x5947d0(0x1d9)](''),console[_0x5947d0(0x1d9)](a76_0x55f13d[_0x5947d0(0x206)](_0x5947d0(0x1de))),console['log']('');_0x301e71?(console[_0x5947d0(0x1d9)](a76_0x55f13d[_0x5947d0(0x1a5)](_0x5947d0(0x1db))+('\x20\x20'+a76_0x55f13d[_0x5947d0(0x1d3)](_0x301e71['oldPath']))),console[_0x5947d0(0x1d9)](_0x5947d0(0x1bb)+(_0x301e71[_0x5947d0(0x1b7)]?a76_0x55f13d[_0x5947d0(0x1d6)](_0x5947d0(0x19d)):a76_0x55f13d['gray'](_0x5947d0(0x1be)))),console['log'](_0x5947d0(0x1e7)+_0x301e71[_0x5947d0(0x1e2)][_0x5947d0(0x201)](',\x20')),console['log'](_0x5947d0(0x1ce))):console['log'](a76_0x55f13d[_0x5947d0(0x1a5)]('Config\x20file:')+'\x20\x20'+a76_0x55f13d['gray'](_0x5947d0(0x20d)));console['log']('');if(_0x1adb9d[_0x5947d0(0x1e0)]>0x0){console[_0x5947d0(0x1d9)](a76_0x55f13d[_0x5947d0(0x1a5)](_0x5947d0(0x1a2)));for(const _0x4457fb of _0x1adb9d){console[_0x5947d0(0x1d9)]('\x20\x20'+a76_0x55f13d[_0x5947d0(0x19c)](_0x5947d0(0x1af))+'\x20\x20'+_0x4457fb);}console['log'](_0x5947d0(0x219));}else console[_0x5947d0(0x1d9)](a76_0x55f13d['cyan']('Legacy\x20artifacts:')+'\x20\x20'+a76_0x55f13d['gray'](_0x5947d0(0x220)));console[_0x5947d0(0x1d9)]('');_0x5175a2?(console[_0x5947d0(0x1d9)](a76_0x55f13d['cyan']('MCP\x20config:')+('\x20\x20'+a76_0x55f13d[_0x5947d0(0x1d3)](_0x5175a2['path'])+_0x5947d0(0x1cf)+_0x5175a2[_0x5947d0(0x1d2)][_0x5947d0(0x201)](',\x20'))),console[_0x5947d0(0x1d9)](_0x5947d0(0x1f8))):console[_0x5947d0(0x1d9)](a76_0x55f13d[_0x5947d0(0x1a5)](_0x5947d0(0x200))+'\x20\x20'+a76_0x55f13d['gray'](_0x5947d0(0x21d)));console[_0x5947d0(0x1d9)](''),console[_0x5947d0(0x1d9)](a76_0x55f13d[_0x5947d0(0x1a5)](_0x5947d0(0x1e3))+('\x20\x20'+(_0x170f6d?a76_0x55f13d[_0x5947d0(0x1d3)](_0x5947d0(0x212)):a76_0x55f13d[_0x5947d0(0x1d6)](_0x5947d0(0x1b8)))));_0x170f6d&&console[_0x5947d0(0x1d9)]('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20lovrabet/rabetbase\x20--global');console['log']('');if(_0x4768b5[_0x5947d0(0x215)]){const {currentVersion:_0x20a619,field:_0x549a1d,pkgPath:_0x6ad629}=_0x4768b5['sdkUpgrade'];console['log'](a76_0x55f13d[_0x5947d0(0x1a5)](_0x5947d0(0x1a9))+('\x20\x20'+a76_0x55f13d[_0x5947d0(0x1d3)](_0x6ad629))),console[_0x5947d0(0x1d9)](_0x5947d0(0x1d8)+_0x549a1d+':\x20'+a76_0x55f13d[_0x5947d0(0x1d3)](_0x20a619)+_0x5947d0(0x1e6)+a76_0x55f13d[_0x5947d0(0x1d6)](_0x5947d0(0x1ac))),console[_0x5947d0(0x1d9)](_0x5947d0(0x1b4));}else console['log'](a76_0x55f13d[_0x5947d0(0x1a5)]('@lovrabet/sdk:')+'\x20\x20'+a76_0x55f13d[_0x5947d0(0x1cd)](_0x5947d0(0x1ca)));console[_0x5947d0(0x1d9)]('');}function execConfigMigration(_0x51497b,_0x5ca250){const _0x2bdfd8=a76_0x48da,{configMigration:_0x56304a}=_0x51497b;if(!_0x56304a?.['oldPath'])return{'step':0x1,'label':_0x2bdfd8(0x202),'ok':!![],'detail':'skipped\x20(no\x20legacy\x20config)'};const _0x312fbd=readConfigFile(_0x56304a[_0x2bdfd8(0x1fc)]),_0x454679=resolve(_0x5ca250,NEW_CONFIG_NAME),_0x27fcae=_0x56304a['hasNewConfig']?readConfigFile(_0x454679):{};for(const [_0x3aa65f,_0x14b090]of Object[_0x2bdfd8(0x1d0)](_0x312fbd)){!(_0x3aa65f in _0x27fcae)&&(_0x27fcae[_0x3aa65f]=_0x14b090);}writeConfigFile(_0x454679,_0x27fcae);const _0x5a431c=_0x56304a[_0x2bdfd8(0x1fc)]+_0x2bdfd8(0x1ff);return renameSync(_0x56304a['oldPath'],_0x5a431c),{'step':0x1,'label':_0x2bdfd8(0x202),'ok':!![],'detail':_0x56304a[_0x2bdfd8(0x1fc)]+_0x2bdfd8(0x1e6)+_0x454679+'\x20(backup:\x20'+_0x5a431c+')'};}function execRemoveOldArtifacts(_0x1b8cfd){const _0x544907=a76_0x48da,_0x29254e=[];for(const _0x1de39c of _0x1b8cfd){try{if(!existsSync(_0x1de39c))continue;const _0x307f2b=tryStat(_0x1de39c);_0x307f2b?.['isDirectory']()?rmSync(_0x1de39c,{'recursive':!![],'force':!![]}):unlinkSync(_0x1de39c);}catch(_0x346592){_0x29254e[_0x544907(0x1a6)](_0x1de39c+':\x20'+_0x346592[_0x544907(0x1dd)]);}}return{'step':0x3,'label':_0x544907(0x1e8),'ok':_0x29254e['length']===0x0,'detail':_0x29254e[_0x544907(0x1e0)]>0x0?_0x1b8cfd[_0x544907(0x1e0)]-_0x29254e['length']+'/'+_0x1b8cfd[_0x544907(0x1e0)]+'\x20removed\x20('+_0x29254e[_0x544907(0x201)](';\x20')+')':_0x1b8cfd[_0x544907(0x1e0)]+_0x544907(0x1b0)};}function execCleanMcp(_0xcd6145){const _0xbdb712=a76_0x48da;if(!_0xcd6145[_0xbdb712(0x21e)])return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0xbdb712(0x21b)};try{const _0x453b68=readFileSync(_0xcd6145[_0xbdb712(0x21e)]['path'],'utf8'),_0x1a1ff4=JSON[_0xbdb712(0x1a0)](_0x453b68);if(_0x1a1ff4?.['mcpServers']&&typeof _0x1a1ff4[_0xbdb712(0x1cc)]==='object'){const _0x409add=[];for(const [_0x3b3fbf,_0x45fda8]of Object[_0xbdb712(0x1d0)](_0x1a1ff4[_0xbdb712(0x1cc)])){_0x45fda8?.[_0xbdb712(0x1ea)]&&Array[_0xbdb712(0x1ef)](_0x45fda8[_0xbdb712(0x1ea)])&&_0x45fda8[_0xbdb712(0x1ea)][_0xbdb712(0x1fb)](_0x4e5ee0=>typeof _0x4e5ee0===_0xbdb712(0x1f6)&&_0x4e5ee0[_0xbdb712(0x1ec)](_0xbdb712(0x1e9)))&&_0x409add['push'](_0x3b3fbf);}for(const _0x2c27e4 of _0x409add){delete _0x1a1ff4[_0xbdb712(0x1cc)][_0x2c27e4];}return _0x409add[_0xbdb712(0x1e0)]>0x0&&writeFileSync(_0xcd6145[_0xbdb712(0x21e)][_0xbdb712(0x1aa)],JSON[_0xbdb712(0x1ab)](_0x1a1ff4,null,0x2)+'\x0a',_0xbdb712(0x20a)),{'step':0x4,'label':_0xbdb712(0x19e),'ok':!![],'detail':_0xbdb712(0x214)+_0x409add['join'](',\x20')+_0xbdb712(0x20b)+_0xcd6145[_0xbdb712(0x21e)][_0xbdb712(0x1aa)]};}return{'step':0x4,'label':_0xbdb712(0x19e),'ok':!![],'detail':_0xbdb712(0x1b2)};}catch(_0x46f4dc){return{'step':0x4,'label':_0xbdb712(0x19e),'ok':![],'detail':_0x46f4dc[_0xbdb712(0x1dd)]};}}function execSkillsRemove(_0x11605b,_0x3d5253){const _0xa8181c=a76_0x48da,_0x4f22a9=runNpxSkillsRemove(_0x11605b,{'stdio':_0xa8181c(0x209),'yes':_0x3d5253});return{'step':0x5,'label':_0xa8181c(0x1c7),'ok':_0x4f22a9['ok'],'detail':_0x4f22a9['ok']?'lovrabet/lovrabet-skill\x20removed':_0x4f22a9['error']??'exit\x20'+_0x4f22a9[_0xa8181c(0x1f7)]};}function execSkillsAdd(_0x543f88,_0x1f893c){const _0x46bfd0=a76_0x48da,_0xdd2b98=runNpxSkillsAddGlobal(_0x543f88,_0x46bfd0(0x1ad),{'stdio':_0x46bfd0(0x209),'yes':_0x1f893c});return{'step':0x6,'label':_0x46bfd0(0x205),'ok':_0xdd2b98['ok'],'detail':_0xdd2b98['ok']?'lovrabet/rabetbase\x20installed\x20globally':_0xdd2b98[_0x46bfd0(0x1c3)]??_0x46bfd0(0x1ba)+_0xdd2b98[_0x46bfd0(0x1f7)]};}function execUpgradeSdk(_0x50e1cb){const _0x53850c=a76_0x48da;if(!_0x50e1cb[_0x53850c(0x215)])return{'step':0x7,'label':_0x53850c(0x1b3),'ok':!![],'detail':_0x53850c(0x1f3)};const {pkgPath:_0x1e4d4a,currentVersion:_0x32bfbb,field:_0x3c2a85}=_0x50e1cb[_0x53850c(0x215)];try{const _0x148b27=readFileSync(_0x1e4d4a,'utf8'),_0x3f416f=JSON[_0x53850c(0x1a0)](_0x148b27);return _0x3f416f[_0x3c2a85][_0x53850c(0x1a3)]=_0x53850c(0x1ac),writeFileSync(_0x1e4d4a,JSON[_0x53850c(0x1ab)](_0x3f416f,null,0x2)+'\x0a',_0x53850c(0x20a)),{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0x3c2a85+_0x53850c(0x218)+_0x32bfbb+_0x53850c(0x1c4)};}catch(_0x249483){return{'step':0x7,'label':_0x53850c(0x1b3),'ok':![],'detail':_0x249483[_0x53850c(0x1dd)]};}}function tryStat(_0x5698bb){try{return statSync(_0x5698bb);}catch{return undefined;}}function printSummary(_0x444666){const _0x8b26c5=a76_0x48da;console[_0x8b26c5(0x1d9)](''),console['log'](a76_0x55f13d[_0x8b26c5(0x206)](_0x8b26c5(0x1bd))),console[_0x8b26c5(0x1d9)]('');for(const _0x2f2e64 of _0x444666){const _0x13450c=_0x2f2e64['ok']?a76_0x55f13d[_0x8b26c5(0x1d6)]('OK'):a76_0x55f13d[_0x8b26c5(0x19c)](_0x8b26c5(0x21c));console[_0x8b26c5(0x1d9)]('\x20\x20'+_0x13450c+_0x8b26c5(0x1e5)+_0x2f2e64[_0x8b26c5(0x1c9)]+':\x20'+_0x2f2e64['label']);if(_0x2f2e64['detail'])console[_0x8b26c5(0x1d9)]('\x20\x20\x20\x20\x20\x20\x20'+a76_0x55f13d[_0x8b26c5(0x1cd)](_0x2f2e64['detail']));}console[_0x8b26c5(0x1d9)]('');}export async function upgradeApp(_0x5710a9,_0xa29625){const _0x533ae1=a76_0x48da,_0x5a1b26=process[_0x533ae1(0x1cb)](),_0x502e63=analyse(_0x5a1b26),_0x11429f=!_0x502e63[_0x533ae1(0x1c1)]&&_0x502e63[_0x533ae1(0x20e)][_0x533ae1(0x1e0)]===0x0&&!_0x502e63['oldMcpConfig']&&!_0x502e63[_0x533ae1(0x1bf)]&&!_0x502e63[_0x533ae1(0x215)];if(_0x11429f){console[_0x533ae1(0x1d9)](a76_0x55f13d[_0x533ae1(0x1d6)](_0x533ae1(0x1dc)));return;}printReport(_0x502e63);const _0x997690=!!(_0xa29625[_0x533ae1(0x1fe)]||_0xa29625['Y']||_0x5710a9);if(!_0x997690)try{const _0x226583=await askConfirm(_0x533ae1(0x1f2));if(!_0x226583){console['log'](a76_0x55f13d[_0x533ae1(0x1cd)](_0x533ae1(0x1b9)));return;}}catch(_0x46d886){if(_0x46d886?.['message']===_0x533ae1(0x19f)){console[_0x533ae1(0x1d9)](a76_0x55f13d[_0x533ae1(0x1cd)](_0x533ae1(0x1b9)));return;}throw _0x46d886;}const _0x476f1a=[],_0x123fac=a76_0x4ff77e({'text':'Step\x201/7:\x20Migrating\x20config...','color':_0x533ae1(0x1a5)})[_0x533ae1(0x210)](),_0x21a81e=execConfigMigration(_0x502e63,_0x5a1b26);_0x476f1a['push'](_0x21a81e),_0x123fac[_0x21a81e['ok']?_0x533ae1(0x1d1):_0x533ae1(0x1f1)]('Step\x201/7:\x20Config\x20migration\x20—\x20'+(_0x21a81e[_0x533ae1(0x21a)]??(_0x21a81e['ok']?_0x533ae1(0x1f9):_0x533ae1(0x1ee))));const _0x2b4a82=resolve(_0x5a1b26,_0x533ae1(0x1eb)),_0x4c043c=a76_0x4ff77e({'text':_0x533ae1(0x1a8),'color':_0x533ae1(0x1a5)})[_0x533ae1(0x210)]();if(existsSync(_0x2b4a82))try{rmSync(_0x2b4a82,{'recursive':!![],'force':!![]}),_0x4c043c[_0x533ae1(0x1d1)](_0x533ae1(0x1e4)),_0x476f1a[_0x533ae1(0x1a6)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0x4b5a9f){_0x4c043c[_0x533ae1(0x1f1)](_0x533ae1(0x1b6)+_0x4b5a9f['message']),_0x476f1a[_0x533ae1(0x1a6)]({'step':0x2,'label':_0x533ae1(0x1ae),'ok':![],'detail':_0x4b5a9f[_0x533ae1(0x1dd)]});}else _0x4c043c[_0x533ae1(0x1d4)]('Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped'),_0x476f1a[_0x533ae1(0x1a6)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![],'detail':_0x533ae1(0x21b)});const _0x3c296b=a76_0x4ff77e({'text':_0x533ae1(0x21f),'color':'cyan'})['start'](),_0x181e4b=execRemoveOldArtifacts(_0x502e63[_0x533ae1(0x20e)]);_0x476f1a[_0x533ae1(0x1a6)](_0x181e4b),_0x3c296b[_0x181e4b['ok']?'succeed':_0x533ae1(0x1f1)](_0x533ae1(0x1e1)+(_0x181e4b['detail']??(_0x181e4b['ok']?'done':_0x533ae1(0x1ee))));const _0x454302=a76_0x4ff77e({'text':_0x533ae1(0x203),'color':'cyan'})['start'](),_0x1646ca=execCleanMcp(_0x502e63);_0x476f1a['push'](_0x1646ca),_0x454302[_0x1646ca['ok']?_0x533ae1(0x1d1):'fail'](_0x533ae1(0x1d5)+(_0x1646ca[_0x533ae1(0x21a)]??(_0x1646ca['ok']?_0x533ae1(0x1f9):'failed')));const _0x136d7f=a76_0x4ff77e({'text':'Step\x205/7:\x20Removing\x20old\x20skill...','color':'cyan'})[_0x533ae1(0x210)](),_0x4e91e9=execSkillsRemove(_0x5a1b26,_0x997690);_0x476f1a['push'](_0x4e91e9),_0x136d7f[_0x4e91e9['ok']?'succeed':_0x533ae1(0x1f1)](_0x533ae1(0x1fa)+(_0x4e91e9['detail']??(_0x4e91e9['ok']?_0x533ae1(0x1f9):_0x533ae1(0x1ee))));const _0x4cdd06=a76_0x4ff77e({'text':_0x533ae1(0x1df),'color':'cyan'})['start'](),_0x1e2e88=execSkillsAdd(_0x5a1b26,_0x997690);_0x476f1a['push'](_0x1e2e88),_0x4cdd06[_0x1e2e88['ok']?'succeed':_0x533ae1(0x1f1)]('Step\x206/7:\x20Install\x20new\x20skill\x20—\x20'+(_0x1e2e88[_0x533ae1(0x21a)]??(_0x1e2e88['ok']?_0x533ae1(0x1f9):_0x533ae1(0x1ee))));const _0x695ebd=a76_0x4ff77e({'text':_0x533ae1(0x1c2),'color':_0x533ae1(0x1a5)})['start'](),_0x1c5655=execUpgradeSdk(_0x502e63);_0x476f1a[_0x533ae1(0x1a6)](_0x1c5655),_0x695ebd[_0x1c5655['ok']?'succeed':_0x533ae1(0x1f1)]('Step\x207/7:\x20@lovrabet/sdk\x20—\x20'+(_0x1c5655[_0x533ae1(0x21a)]??(_0x1c5655['ok']?_0x533ae1(0x1f9):'failed'))),printSummary(_0x476f1a);const _0x12d0f9=_0x476f1a[_0x533ae1(0x1fb)](_0x3a8ded=>!_0x3a8ded['ok']);_0x12d0f9?console[_0x533ae1(0x1d9)](a76_0x55f13d['yellow'](_0x533ae1(0x1c6))):console[_0x533ae1(0x1d9)](a76_0x55f13d[_0x533ae1(0x1d6)]('Upgrade\x20completed\x20successfully!')),_0x1c5655['ok']&&_0x502e63[_0x533ae1(0x215)]&&(console['log'](''),console[_0x533ae1(0x1d9)](a76_0x55f13d[_0x533ae1(0x206)]['cyan'](_0x533ae1(0x213))),console[_0x533ae1(0x1d9)](a76_0x55f13d[_0x533ae1(0x1a5)](_0x533ae1(0x1f5))),console[_0x533ae1(0x1d9)](''),console[_0x533ae1(0x1d9)](a76_0x55f13d[_0x533ae1(0x1c5)](_0x533ae1(0x1a4))),console[_0x533ae1(0x1d9)](a76_0x55f13d[_0x533ae1(0x1c5)](_0x533ae1(0x1a1))),console[_0x533ae1(0x1d9)](a76_0x55f13d[_0x533ae1(0x1c5)]('\x20\x20bun\x20install')),console['log'](''));}
@@ -1 +1 @@
1
- const a77_0xc91123=a77_0xa90a;function a77_0xa90a(_0x22876d,_0x355eeb){_0x22876d=_0x22876d-0x155;const _0x5b300d=a77_0x5b30();let _0xa90a43=_0x5b300d[_0x22876d];return _0xa90a43;}(function(_0xb73be5,_0x5db749){const _0x1ed030=a77_0xa90a,_0x3e5193=_0xb73be5();while(!![]){try{const _0x2488b5=-parseInt(_0x1ed030(0x15d))/0x1*(parseInt(_0x1ed030(0x17e))/0x2)+parseInt(_0x1ed030(0x170))/0x3*(-parseInt(_0x1ed030(0x176))/0x4)+-parseInt(_0x1ed030(0x182))/0x5+-parseInt(_0x1ed030(0x171))/0x6+-parseInt(_0x1ed030(0x161))/0x7+-parseInt(_0x1ed030(0x16a))/0x8+-parseInt(_0x1ed030(0x160))/0x9*(-parseInt(_0x1ed030(0x173))/0xa);if(_0x2488b5===_0x5db749)break;else _0x3e5193['push'](_0x3e5193['shift']());}catch(_0x5f52cc){_0x3e5193['push'](_0x3e5193['shift']());}}}(a77_0x5b30,0xa3248));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{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{appDefinitions}from'../commands/app/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{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/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(_0x14ea19){const _0x315f0b=a77_0xa90a;for(const _0x3daf97 of _0x14ea19){definitions[_0x315f0b(0x175)](_0x3daf97['service']+':'+_0x3daf97[_0x315f0b(0x167)],_0x3daf97);let _0x19e8b7=serviceGroups[_0x315f0b(0x159)](_0x3daf97['service']);!_0x19e8b7&&(_0x19e8b7=[],serviceGroups[_0x315f0b(0x175)](_0x3daf97[_0x315f0b(0x162)],_0x19e8b7)),_0x19e8b7['push'](_0x3daf97);}}function registerDeclarativeService(_0x453c82,_0xe06cc3,_0x289f47){const _0x3e5fa3=a77_0xa90a;registerDefinitions(_0xe06cc3);_0x289f47?.[_0x3e5fa3(0x17a)]&&registerDefinitions([_0x289f47['wildcardDef']]);const _0x43de6f=_0x34672d=>_0x34672d===_0x3e5fa3(0x174)?'':_0x34672d==='write'?'\x20\x20[write]':_0x3e5fa3(0x15f),_0xd9fbd8={'service':_0xe06cc3[0x0][_0x3e5fa3(0x162)],'label':_0x453c82,'commands':_0xe06cc3[_0x3e5fa3(0x166)](_0x39b2fb=>({'command':_0x39b2fb[_0x3e5fa3(0x167)],'description':_0x39b2fb[_0x3e5fa3(0x15c)],'tag':_0x43de6f(_0x39b2fb[_0x3e5fa3(0x17b)])})),'declarative':!![],'defaultCommand':_0x289f47?.[_0x3e5fa3(0x17d)]??(_0x289f47?.['isSingleCommand']?_0xe06cc3[0x0][_0x3e5fa3(0x167)]:undefined),'wildcardDef':_0x289f47?.[_0x3e5fa3(0x17a)],'isSingleCommand':_0x289f47?.['isSingleCommand']};serviceRegistry['push'](_0xd9fbd8),serviceByName['set'](_0xd9fbd8[_0x3e5fa3(0x162)],_0xd9fbd8);}function a77_0x5b30(){const _0x1ec5c5=['read','set','805780AfrmFP','logout','Authentication','auth','wildcardDef','risk','login','defaultCommand','18994kMLgXR','create','<script>','length','5524685fixrzC','commands','Logs','API','Run\x20Scripts','Quick\x20Start','Configuration','get','Run\x20any\x20package.json\x20script','BFF\x20Scripts','description','87EOamlv','Diagnostics','\x20\x20[high-risk-write]','20106DmWWZl','7066948JZRlCU','service','values','Dataset\x20&\x20Operations','Menu','map','command','has','Self\x20Update','1957480omVBzs','Project','Schema','show','skill','from','3ArygQH','3978636iprsHf','run','21120vNUbaU'];a77_0x5b30=function(){return _0x1ec5c5;};return a77_0x5b30();}registerDeclarativeService(a77_0xc91123(0x157),initDefinitions,{'defaultCommand':a77_0xc91123(0x172),'isSingleCommand':!![]}),registerDeclarativeService(a77_0xc91123(0x16b),projectDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a77_0xc91123(0x156),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a77_0xc91123(0x181)]-0x1];last[a77_0xc91123(0x183)]=[{'command':a77_0xc91123(0x180),'description':a77_0xc91123(0x15a),'tag':''}];}registerDeclarativeService(a77_0xc91123(0x178),authDefinitions,{'defaultCommand':a77_0xc91123(0x17c)}),registerDeclarativeService(a77_0xc91123(0x169),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a77_0xc91123(0x15e),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a77_0xc91123(0x16c),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a77_0xc91123(0x158),configDefinitions),registerDeclarativeService(a77_0xc91123(0x155),apiDefinitions),registerDeclarativeService(a77_0xc91123(0x165),menuDefinitions),registerDeclarativeService(a77_0xc91123(0x164),datasetDefinitions),registerDeclarativeService(a77_0xc91123(0x15b),bffDefinitions),registerDeclarativeService('SQL\x20Queries',sqlDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService('Skills',skillDefinitions),registerDeclarativeService(a77_0xc91123(0x184),logsDefinitions,{'defaultCommand':a77_0xc91123(0x16d)});export const deprecatedAliases={'create':{'service':'project','command':a77_0xc91123(0x17f)},'start':{'service':a77_0xc91123(0x172),'command':'start'},'build':{'service':a77_0xc91123(0x172),'command':'build'},'preview':{'service':a77_0xc91123(0x172),'command':'preview'},'logout':{'service':a77_0xc91123(0x179),'command':a77_0xc91123(0x177)},'skills':{'service':a77_0xc91123(0x16e),'command':'install'}};export function findDefinition(_0x32309c,_0x3d870e){const _0x40b218=a77_0xc91123;return definitions[_0x40b218(0x159)](_0x32309c+':'+_0x3d870e);}export function isKnownService(_0x3c98c5){const _0x72f2d=a77_0xc91123;return serviceByName[_0x72f2d(0x168)](_0x3c98c5);}export function isDeclarativeService(_0xf3641c){const _0x2ced0d=a77_0xc91123;return serviceGroups[_0x2ced0d(0x168)](_0xf3641c)||serviceByName[_0x2ced0d(0x159)](_0xf3641c)?.[_0x2ced0d(0x17a)]!==undefined;}export function getServiceEntry(_0x2af0e3){return serviceByName['get'](_0x2af0e3);}export function getLegacyHandler(_0x45f16a,_0x3fc0b7){return undefined;}export function getAllDefinitions(){const _0x4de97a=a77_0xc91123;return Array[_0x4de97a(0x16f)](definitions[_0x4de97a(0x163)]());}
1
+ const a77_0x529c3d=a77_0x7c68;(function(_0x43ad90,_0x328d27){const _0x354168=a77_0x7c68,_0x573b93=_0x43ad90();while(!![]){try{const _0x42a943=-parseInt(_0x354168(0x163))/0x1*(-parseInt(_0x354168(0x16c))/0x2)+parseInt(_0x354168(0x179))/0x3+-parseInt(_0x354168(0x157))/0x4*(-parseInt(_0x354168(0x158))/0x5)+parseInt(_0x354168(0x150))/0x6*(parseInt(_0x354168(0x160))/0x7)+-parseInt(_0x354168(0x170))/0x8*(parseInt(_0x354168(0x169))/0x9)+-parseInt(_0x354168(0x183))/0xa+-parseInt(_0x354168(0x17f))/0xb;if(_0x42a943===_0x328d27)break;else _0x573b93['push'](_0x573b93['shift']());}catch(_0x2458b2){_0x573b93['push'](_0x573b93['shift']());}}}(a77_0x32e8,0x67a3e));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{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{appDefinitions}from'../commands/app/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{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{projectDefinitions}from'../commands/project/index.js';function a77_0x32e8(){const _0x399b3d=['Diagnostics','description','4qQgwFV','1615545bVRzbQ','Run\x20any\x20package.json\x20script','Menu','run','Schema','Configuration','SQL\x20Queries','show','2495038LWzpkB','App\x20Management','from','6BYyuLS','command','auth','push','Skills','API','69939qIGayk','map','values','257434YdILAA','write','read','BFF\x20Scripts','312jsTrRy','\x20\x20[write]','Logs','preview','Code\x20Generation','Dataset\x20&\x20Operations','commands','service','<script>','1978869ocoWbu','isSingleCommand','Self\x20Update','risk','Quick\x20Start','create','6460509YNwrab','Authentication','Project','has','7965700JYIfdD','wildcardDef','project','set','6PqBLJw','build','skill','get','install'];a77_0x32e8=function(){return _0x399b3d;};return a77_0x32e8();}import{initDefinitions}from'../commands/init/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();function a77_0x7c68(_0xb1fed,_0x1e41d5){_0xb1fed=_0xb1fed-0x14e;const _0x32e838=a77_0x32e8();let _0x7c68cf=_0x32e838[_0xb1fed];return _0x7c68cf;}export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x2289c1){const _0x2cb516=a77_0x7c68;for(const _0x22e8e6 of _0x2289c1){definitions[_0x2cb516(0x14f)](_0x22e8e6[_0x2cb516(0x177)]+':'+_0x22e8e6[_0x2cb516(0x164)],_0x22e8e6);let _0x1dee0e=serviceGroups[_0x2cb516(0x153)](_0x22e8e6[_0x2cb516(0x177)]);!_0x1dee0e&&(_0x1dee0e=[],serviceGroups[_0x2cb516(0x14f)](_0x22e8e6[_0x2cb516(0x177)],_0x1dee0e)),_0x1dee0e['push'](_0x22e8e6);}}function registerDeclarativeService(_0x33f6b8,_0x37602c,_0x265570){const _0x1d5412=a77_0x7c68;registerDefinitions(_0x37602c);_0x265570?.['wildcardDef']&&registerDefinitions([_0x265570[_0x1d5412(0x184)]]);const _0x539d4c=_0x4e51e9=>_0x4e51e9===_0x1d5412(0x16e)?'':_0x4e51e9===_0x1d5412(0x16d)?_0x1d5412(0x171):'\x20\x20[high-risk-write]',_0x14a9c8={'service':_0x37602c[0x0][_0x1d5412(0x177)],'label':_0x33f6b8,'commands':_0x37602c[_0x1d5412(0x16a)](_0x523493=>({'command':_0x523493[_0x1d5412(0x164)],'description':_0x523493[_0x1d5412(0x156)],'tag':_0x539d4c(_0x523493[_0x1d5412(0x17c)])})),'declarative':!![],'defaultCommand':_0x265570?.['defaultCommand']??(_0x265570?.[_0x1d5412(0x17a)]?_0x37602c[0x0][_0x1d5412(0x164)]:undefined),'wildcardDef':_0x265570?.['wildcardDef'],'isSingleCommand':_0x265570?.[_0x1d5412(0x17a)]};serviceRegistry[_0x1d5412(0x166)](_0x14a9c8),serviceByName['set'](_0x14a9c8[_0x1d5412(0x177)],_0x14a9c8);}registerDeclarativeService(a77_0x529c3d(0x17d),initDefinitions,{'defaultCommand':a77_0x529c3d(0x15b),'isSingleCommand':!![]}),registerDeclarativeService(a77_0x529c3d(0x181),projectDefinitions),registerDeclarativeService(a77_0x529c3d(0x161),appDefinitions),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry['length']-0x1];last[a77_0x529c3d(0x176)]=[{'command':a77_0x529c3d(0x178),'description':a77_0x529c3d(0x159),'tag':''}];}registerDeclarativeService(a77_0x529c3d(0x180),authDefinitions,{'defaultCommand':'login'}),registerDeclarativeService(a77_0x529c3d(0x17b),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a77_0x529c3d(0x155),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a77_0x529c3d(0x15c),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a77_0x529c3d(0x15d),configDefinitions),registerDeclarativeService(a77_0x529c3d(0x168),apiDefinitions),registerDeclarativeService(a77_0x529c3d(0x15a),menuDefinitions),registerDeclarativeService(a77_0x529c3d(0x175),datasetDefinitions),registerDeclarativeService(a77_0x529c3d(0x16f),bffDefinitions),registerDeclarativeService(a77_0x529c3d(0x15e),sqlDefinitions),registerDeclarativeService(a77_0x529c3d(0x174),codegenDefinitions),registerDeclarativeService(a77_0x529c3d(0x167),skillDefinitions),registerDeclarativeService(a77_0x529c3d(0x172),logsDefinitions,{'defaultCommand':a77_0x529c3d(0x15f)});export const deprecatedAliases={'create':{'service':a77_0x529c3d(0x14e),'command':a77_0x529c3d(0x17e)},'start':{'service':a77_0x529c3d(0x15b),'command':'start'},'build':{'service':a77_0x529c3d(0x15b),'command':a77_0x529c3d(0x151)},'preview':{'service':'run','command':a77_0x529c3d(0x173)},'logout':{'service':a77_0x529c3d(0x165),'command':'logout'},'skills':{'service':a77_0x529c3d(0x152),'command':a77_0x529c3d(0x154)}};export function findDefinition(_0xd36710,_0xd61d16){const _0x4a4efc=a77_0x529c3d;return definitions[_0x4a4efc(0x153)](_0xd36710+':'+_0xd61d16);}export function isKnownService(_0x401c3d){const _0xbd4bf=a77_0x529c3d;return serviceByName[_0xbd4bf(0x182)](_0x401c3d);}export function isDeclarativeService(_0x57eab4){const _0x4984cd=a77_0x529c3d;return serviceGroups[_0x4984cd(0x182)](_0x57eab4)||serviceByName[_0x4984cd(0x153)](_0x57eab4)?.[_0x4984cd(0x184)]!==undefined;}export function getServiceEntry(_0x10b3cc){return serviceByName['get'](_0x10b3cc);}export function getLegacyHandler(_0x3cb181,_0x37499f){return undefined;}export function getAllDefinitions(){const _0x9eb0b0=a77_0x529c3d;return Array[_0x9eb0b0(0x162)](definitions[_0x9eb0b0(0x16b)]());}
@@ -1 +1 @@
1
- function a78_0x350f(_0x25614a,_0x3e8190){_0x25614a=_0x25614a-0x73;const _0x5eda34=a78_0x5eda();let _0x350fcc=_0x5eda34[_0x25614a];return _0x350fcc;}const a78_0x5c42cb=a78_0x350f;(function(_0x3fa536,_0x24d296){const _0x579e94=a78_0x350f,_0x2b999c=_0x3fa536();while(!![]){try{const _0x3ab962=parseInt(_0x579e94(0xb2))/0x1+-parseInt(_0x579e94(0x7b))/0x2+parseInt(_0x579e94(0xb9))/0x3+parseInt(_0x579e94(0x87))/0x4*(-parseInt(_0x579e94(0x8d))/0x5)+parseInt(_0x579e94(0xa9))/0x6*(parseInt(_0x579e94(0x79))/0x7)+parseInt(_0x579e94(0xa7))/0x8+parseInt(_0x579e94(0x7d))/0x9*(-parseInt(_0x579e94(0x86))/0xa);if(_0x3ab962===_0x24d296)break;else _0x2b999c['push'](_0x2b999c['shift']());}catch(_0xfda949){_0x2b999c['push'](_0x2b999c['shift']());}}}(a78_0x5eda,0x8e7da));function a78_0x5eda(){const _0x2bacc2=['read','watch','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','No\x20package.json\x20found\x20in\x20current\x20directory.','package.json','\x0a\x20\x20Available\x20scripts:\x0a','validation','yarn.lock','length','5002808cyqwgl','bool','6THnXTk','\x20\x20EXAMPLES','max','(none)','Available:\x20','npm','cwd','map','build','673870oppryw','error','yarn','Script\x20\x22','\x22\x20not\x20found\x20in\x20package.json.','vite\x20preview\x20exited\x20with\x20code\x20','Run\x20a\x20package.json\x20script','678864nRDdmI','entries','.bin','start','join','bun.lockb','log','parse','inherit','3330201xbLTfM','\x0a\x20\x20Usage:\x20','1917308CBCagP','script','1278rIJZua','\x20exited\x20with\x20code\x20','\x20run\x20start','vite','\x20\x20AVAILABLE\x20SCRIPTS\x20\x20(current\x20project)','Enable\x20watch\x20mode\x20for\x20preview','pnpm','node_modules','slice','16990hPrpBg','156FAmcPe','\x20run\x20preview\x20--watch\x20\x20\x20#\x20parallel\x20build\x20--watch\x20+\x20preview','args','pnpm-lock.yaml','padEnd','boolean','27910ZBEnRE','all','\x20run\x20','scripts','utf-8','run','push','Script\x20name\x20defined\x20in\x20package.json','keys','bun.lock','No\x20scripts\x20defined\x20in\x20package.json.','preview','close','needsUpgrade','\x20run\x20preview','\x20run\x20build','\x20\x20\x20\x20'];a78_0x5eda=function(){return _0x2bacc2;};return a78_0x5eda();}import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';import{resolve,delimiter,join}from'node:path';import{spawn}from'node:child_process';import{CliErrors}from'../../errors.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';import{checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set([a78_0x5c42cb(0x73),'dev']);function readPackageScripts(_0x1a0afc){const _0x7ae51c=a78_0x5c42cb,_0x54faa4=resolve(_0x1a0afc,_0x7ae51c(0xa2));if(!existsSync(_0x54faa4))return null;try{const _0x4e967f=JSON[_0x7ae51c(0x77)](readFileSync(_0x54faa4,_0x7ae51c(0x91)));return _0x4e967f[_0x7ae51c(0x90)]??{};}catch{return null;}}function detectPackageManager(_0x3f8f77){const _0x32c120=a78_0x5c42cb;if(existsSync(resolve(_0x3f8f77,_0x32c120(0x75)))||existsSync(resolve(_0x3f8f77,_0x32c120(0x96))))return'bun';if(existsSync(resolve(_0x3f8f77,_0x32c120(0x8a))))return _0x32c120(0x83);if(existsSync(resolve(_0x3f8f77,_0x32c120(0xa5))))return _0x32c120(0xb4);return _0x32c120(0xae);}async function versionCheck(_0x14884f){const _0x5eb1fa=a78_0x5c42cb,_0x470e08=await checkCliVersion();if(_0x470e08[_0x5eb1fa(0x9a)])printCliUpgradeWarning(_0x470e08);const _0x52a9f5=await checkSdkVersion(_0x14884f);if(_0x52a9f5[_0x5eb1fa(0x9a)])printSdkUpgradeWarning(_0x52a9f5);}function spawnScript(_0x4e9f3b,_0x172182,_0x2f353e,_0x12d99f){return new Promise((_0x2c8b66,_0x5a5a47)=>{const _0x5c4387=a78_0x350f,_0x3397f4=['run',_0x172182,..._0x2f353e],_0x48f6a4=spawn(_0x4e9f3b,_0x3397f4,{'cwd':_0x12d99f,'stdio':_0x5c4387(0x78),'shell':!![],'env':{...process.env,'PATH':''+join(_0x12d99f,_0x5c4387(0x84),_0x5c4387(0xbb))+delimiter+process.env.PATH}});_0x48f6a4['on'](_0x5c4387(0x99),_0x4b37fc=>{const _0x439ac3=_0x5c4387;if(_0x4b37fc===0x0||_0x4b37fc===null)_0x2c8b66();else _0x5a5a47(new Error(_0x4e9f3b+_0x439ac3(0x8f)+_0x172182+_0x439ac3(0x7e)+_0x4b37fc));}),_0x48f6a4['on'](_0x5c4387(0xb3),_0x5a5a47);});}function spawnViteBuildWatch(_0x479e4f){return new Promise((_0x110c26,_0x423239)=>{const _0x276c85=a78_0x350f,_0x37977a=spawn(_0x276c85(0x80),[_0x276c85(0xb1),'--watch'],{'cwd':_0x479e4f,'stdio':'inherit','shell':!![],'env':{...process.env,'PATH':''+join(_0x479e4f,_0x276c85(0x84),_0x276c85(0xbb))+delimiter+process.env.PATH}});_0x37977a['on'](_0x276c85(0x99),_0x8c4eeb=>{const _0x5d6230=_0x276c85;if(_0x8c4eeb===0x0||_0x8c4eeb===null)_0x110c26();else _0x423239(new Error(_0x5d6230(0xa0)+_0x8c4eeb));}),_0x37977a['on']('error',_0x423239);});}function spawnVitePreview(_0x5587ca){return new Promise((_0x7582c2,_0xdd64df)=>{const _0x2ec661=a78_0x350f,_0x262e57=spawn(_0x2ec661(0x80),[_0x2ec661(0x98)],{'cwd':_0x5587ca,'stdio':_0x2ec661(0x78),'shell':!![],'env':{...process.env,'PATH':''+join(_0x5587ca,_0x2ec661(0x84),_0x2ec661(0xbb))+delimiter+process.env.PATH}});_0x262e57['on'](_0x2ec661(0x99),_0x369b0f=>{const _0x22442b=_0x2ec661;if(_0x369b0f===0x0||_0x369b0f===null)_0x7582c2();else _0xdd64df(new Error(_0x22442b(0xb7)+_0x369b0f));}),_0x262e57['on'](_0x2ec661(0xb3),_0xdd64df);});}const runFlags=[{'name':a78_0x5c42cb(0x9f),'type':a78_0x5c42cb(0x8c),'description':a78_0x5c42cb(0x82),'default':![]}];export const runDefinition={'service':a78_0x5c42cb(0x92),'command':a78_0x5c42cb(0x92),'description':a78_0x5c42cb(0xb8),'risk':a78_0x5c42cb(0x9e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a78_0x5c42cb(0x7c),'description':a78_0x5c42cb(0x94),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x505c90=a78_0x5c42cb,_0x42fcc7=readPackageScripts(process[_0x505c90(0xaf)]()),_0x32a2e9=[];if(_0x42fcc7&&Object[_0x505c90(0x95)](_0x42fcc7)[_0x505c90(0xa6)]>0x0){const _0x1b701c=Object['keys'](_0x42fcc7),_0x33e5e2=Math[_0x505c90(0xab)](..._0x1b701c[_0x505c90(0xb0)](_0x38c73b=>_0x38c73b[_0x505c90(0xa6)]));_0x32a2e9[_0x505c90(0x93)](_0x505c90(0x81));for(const [_0x4e91f5,_0x4d54ed]of Object[_0x505c90(0xba)](_0x42fcc7)){_0x32a2e9[_0x505c90(0x93)](_0x505c90(0x9d)+CLI_BIN_NAME+_0x505c90(0x8f)+_0x4e91f5[_0x505c90(0x8b)](_0x33e5e2+0x2)+'#\x20'+_0x4d54ed);}}else _0x32a2e9[_0x505c90(0x93)](_0x505c90(0xaa)),_0x32a2e9['push'](_0x505c90(0x9d)+CLI_BIN_NAME+_0x505c90(0x7f)),_0x32a2e9[_0x505c90(0x93)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x505c90(0x9c)),_0x32a2e9[_0x505c90(0x93)](_0x505c90(0x9d)+CLI_BIN_NAME+_0x505c90(0x9b)),_0x32a2e9[_0x505c90(0x93)](_0x505c90(0x9d)+CLI_BIN_NAME+_0x505c90(0x88));return _0x32a2e9[_0x505c90(0x74)]('\x0a');},async 'execute'(_0x13e314){const _0x137786=a78_0x5c42cb,_0x23d5b0=process[_0x137786(0xaf)](),_0x6627c1=_0x13e314[_0x137786(0x89)][0x0],_0x57d611=_0x13e314[_0x137786(0x89)][_0x137786(0x85)](0x1),_0x4621c2=readPackageScripts(_0x23d5b0);if(!_0x4621c2)throw CliErrors[_0x137786(0xa4)](_0x137786(0xa1));if(!_0x6627c1){const _0x39e4f1=Object['keys'](_0x4621c2);if(_0x39e4f1['length']===0x0)console['log'](_0x137786(0x97));else{console['log'](_0x137786(0xa3));const _0x4328ae=Math[_0x137786(0xab)](..._0x39e4f1[_0x137786(0xb0)](_0x3c6627=>_0x3c6627[_0x137786(0xa6)]));for(const [_0x309ecf,_0x1366e8]of Object[_0x137786(0xba)](_0x4621c2)){console[_0x137786(0x76)]('\x20\x20\x20\x20'+_0x309ecf[_0x137786(0x8b)](_0x4328ae+0x2)+_0x1366e8);}console['log'](_0x137786(0x7a)+CLI_BIN_NAME+'\x20run\x20<script>\x0a');}return{'ok':!![]};}if(!_0x4621c2[_0x6627c1])throw CliErrors[_0x137786(0xa4)](_0x137786(0xb5)+_0x6627c1+_0x137786(0xb6),_0x137786(0xad)+(Object[_0x137786(0x95)](_0x4621c2)[_0x137786(0x74)](',\x20')||_0x137786(0xac)));const _0x4317ef=detectPackageManager(_0x23d5b0);VERSION_CHECK_SCRIPTS['has'](_0x6627c1)&&await versionCheck(_0x23d5b0);if(_0x6627c1==='preview'&&_0x13e314[_0x137786(0xa8)](_0x137786(0x9f)))return await Promise[_0x137786(0x8e)]([spawnViteBuildWatch(_0x23d5b0),spawnVitePreview(_0x23d5b0)]),{'ok':!![]};return await spawnScript(_0x4317ef,_0x6627c1,_0x57d611,_0x23d5b0),{'ok':!![]};}};
1
+ const a78_0x1baf21=a78_0x24d5;(function(_0x1482ed,_0x522321){const _0x275e30=a78_0x24d5,_0x29bf0b=_0x1482ed();while(!![]){try{const _0x2569a0=parseInt(_0x275e30(0x1df))/0x1+parseInt(_0x275e30(0x1f3))/0x2+-parseInt(_0x275e30(0x1c2))/0x3*(-parseInt(_0x275e30(0x1c6))/0x4)+parseInt(_0x275e30(0x1fd))/0x5*(parseInt(_0x275e30(0x1d1))/0x6)+-parseInt(_0x275e30(0x1dd))/0x7+-parseInt(_0x275e30(0x1e5))/0x8+-parseInt(_0x275e30(0x1ef))/0x9;if(_0x2569a0===_0x522321)break;else _0x29bf0b['push'](_0x29bf0b['shift']());}catch(_0x390661){_0x29bf0b['push'](_0x29bf0b['shift']());}}}(a78_0x5e4e,0xc9d64));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';import{resolve,delimiter,join}from'node:path';import{spawn}from'node:child_process';import{CliErrors}from'../../errors.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';function a78_0x5e4e(){const _0x27784d=['preview','285jPTyiQ','push','.bin','package.json','38020jeFPxi','close','scripts','\x20\x20\x20\x20','\x20\x20AVAILABLE\x20SCRIPTS\x20\x20(current\x20project)','Available:\x20','validation','\x20run\x20','No\x20scripts\x20defined\x20in\x20package.json.','run','args','254526JqWaWx','log','\x20run\x20build','watch','node_modules','yarn','Script\x20name\x20defined\x20in\x20package.json','\x0a\x20\x20Available\x20scripts:\x0a','vite\x20preview\x20exited\x20with\x20code\x20','padEnd','has','(none)','128198JAbSvO','Enable\x20watch\x20mode\x20for\x20preview','1234818MyzkxG','\x20exited\x20with\x20code\x20','join','vite','utf-8','\x20run\x20preview','3717464Fxhvcd','length','inherit','parse','--watch','\x20\x20EXAMPLES','error','bun','needsUpgrade','entries','18592641hTaUCH','dev','start','keys','1796818TPcYJx','\x20run\x20preview\x20--watch\x20\x20\x20#\x20parallel\x20build\x20--watch\x20+\x20preview','Run\x20a\x20package.json\x20script','\x20run\x20<script>\x0a','bun.lockb','pnpm','\x20run\x20start','boolean','map','cwd','40sUDWQU'];a78_0x5e4e=function(){return _0x27784d;};return a78_0x5e4e();}import{checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';function a78_0x24d5(_0x210fa7,_0x5e8a9e){_0x210fa7=_0x210fa7-0x1c2;const _0x5e4e1d=a78_0x5e4e();let _0x24d563=_0x5e4e1d[_0x210fa7];return _0x24d563;}const VERSION_CHECK_SCRIPTS=new Set([a78_0x1baf21(0x1f1),a78_0x1baf21(0x1f0)]);function readPackageScripts(_0x4ba54d){const _0x24be22=a78_0x1baf21,_0x369753=resolve(_0x4ba54d,_0x24be22(0x1c5));if(!existsSync(_0x369753))return null;try{const _0x305933=JSON[_0x24be22(0x1e8)](readFileSync(_0x369753,_0x24be22(0x1e3)));return _0x305933[_0x24be22(0x1c8)]??{};}catch{return null;}}function detectPackageManager(_0x5cd8f3){const _0x1a5500=a78_0x1baf21;if(existsSync(resolve(_0x5cd8f3,_0x1a5500(0x1f7)))||existsSync(resolve(_0x5cd8f3,'bun.lock')))return _0x1a5500(0x1ec);if(existsSync(resolve(_0x5cd8f3,'pnpm-lock.yaml')))return _0x1a5500(0x1f8);if(existsSync(resolve(_0x5cd8f3,'yarn.lock')))return _0x1a5500(0x1d6);return'npm';}async function versionCheck(_0x51c749){const _0x6d5177=a78_0x1baf21,_0x100534=await checkCliVersion();if(_0x100534[_0x6d5177(0x1ed)])printCliUpgradeWarning(_0x100534);const _0x51e7dc=await checkSdkVersion(_0x51c749);if(_0x51e7dc[_0x6d5177(0x1ed)])printSdkUpgradeWarning(_0x51e7dc);}function spawnScript(_0x58376a,_0x426780,_0x4eeb4a,_0x6e8e23){return new Promise((_0x5875f9,_0x5ba6d0)=>{const _0x2c7395=a78_0x24d5,_0x57d415=[_0x2c7395(0x1cf),_0x426780,..._0x4eeb4a],_0x5d5903=spawn(_0x58376a,_0x57d415,{'cwd':_0x6e8e23,'stdio':_0x2c7395(0x1e7),'shell':!![],'env':{...process.env,'PATH':''+join(_0x6e8e23,_0x2c7395(0x1d5),_0x2c7395(0x1c4))+delimiter+process.env.PATH}});_0x5d5903['on'](_0x2c7395(0x1c7),_0x34e40c=>{const _0x7bd639=_0x2c7395;if(_0x34e40c===0x0||_0x34e40c===null)_0x5875f9();else _0x5ba6d0(new Error(_0x58376a+'\x20run\x20'+_0x426780+_0x7bd639(0x1e0)+_0x34e40c));}),_0x5d5903['on'](_0x2c7395(0x1eb),_0x5ba6d0);});}function spawnViteBuildWatch(_0x2848e9){return new Promise((_0x263110,_0x478f65)=>{const _0x265f3c=a78_0x24d5,_0x2f0cdc=spawn(_0x265f3c(0x1e2),['build',_0x265f3c(0x1e9)],{'cwd':_0x2848e9,'stdio':_0x265f3c(0x1e7),'shell':!![],'env':{...process.env,'PATH':''+join(_0x2848e9,_0x265f3c(0x1d5),'.bin')+delimiter+process.env.PATH}});_0x2f0cdc['on']('close',_0x3f157b=>{if(_0x3f157b===0x0||_0x3f157b===null)_0x263110();else _0x478f65(new Error('vite\x20build\x20--watch\x20exited\x20with\x20code\x20'+_0x3f157b));}),_0x2f0cdc['on'](_0x265f3c(0x1eb),_0x478f65);});}function spawnVitePreview(_0x2ad812){return new Promise((_0x3580fe,_0x8867ae)=>{const _0xaa5e2f=a78_0x24d5,_0x4f5681=spawn(_0xaa5e2f(0x1e2),[_0xaa5e2f(0x1fe)],{'cwd':_0x2ad812,'stdio':_0xaa5e2f(0x1e7),'shell':!![],'env':{...process.env,'PATH':''+join(_0x2ad812,_0xaa5e2f(0x1d5),_0xaa5e2f(0x1c4))+delimiter+process.env.PATH}});_0x4f5681['on']('close',_0x425372=>{const _0x26a2ac=_0xaa5e2f;if(_0x425372===0x0||_0x425372===null)_0x3580fe();else _0x8867ae(new Error(_0x26a2ac(0x1d9)+_0x425372));}),_0x4f5681['on']('error',_0x8867ae);});}const runFlags=[{'name':a78_0x1baf21(0x1d4),'type':a78_0x1baf21(0x1fa),'description':a78_0x1baf21(0x1de),'default':![]}];export const runDefinition={'service':a78_0x1baf21(0x1cf),'command':'run','description':a78_0x1baf21(0x1f5),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'script','description':a78_0x1baf21(0x1d7),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x4aabf1=a78_0x1baf21,_0x1b1605=readPackageScripts(process[_0x4aabf1(0x1fc)]()),_0x4939f5=[];if(_0x1b1605&&Object[_0x4aabf1(0x1f2)](_0x1b1605)[_0x4aabf1(0x1e6)]>0x0){const _0x40ce19=Object['keys'](_0x1b1605),_0x21dabb=Math['max'](..._0x40ce19[_0x4aabf1(0x1fb)](_0x78c698=>_0x78c698[_0x4aabf1(0x1e6)]));_0x4939f5['push'](_0x4aabf1(0x1ca));for(const [_0x467126,_0x224e5d]of Object[_0x4aabf1(0x1ee)](_0x1b1605)){_0x4939f5[_0x4aabf1(0x1c3)](_0x4aabf1(0x1c9)+CLI_BIN_NAME+_0x4aabf1(0x1cd)+_0x467126[_0x4aabf1(0x1da)](_0x21dabb+0x2)+'#\x20'+_0x224e5d);}}else _0x4939f5[_0x4aabf1(0x1c3)](_0x4aabf1(0x1ea)),_0x4939f5[_0x4aabf1(0x1c3)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x4aabf1(0x1f9)),_0x4939f5['push'](_0x4aabf1(0x1c9)+CLI_BIN_NAME+_0x4aabf1(0x1d3)),_0x4939f5['push'](_0x4aabf1(0x1c9)+CLI_BIN_NAME+_0x4aabf1(0x1e4)),_0x4939f5['push'](_0x4aabf1(0x1c9)+CLI_BIN_NAME+_0x4aabf1(0x1f4));return _0x4939f5[_0x4aabf1(0x1e1)]('\x0a');},async 'execute'(_0x393e97){const _0xfef0=a78_0x1baf21,_0x27e955=process['cwd'](),_0x30e617=_0x393e97[_0xfef0(0x1d0)][0x0],_0x263d0e=_0x393e97[_0xfef0(0x1d0)]['slice'](0x1),_0x34ed7d=readPackageScripts(_0x27e955);if(!_0x34ed7d)throw CliErrors[_0xfef0(0x1cc)]('No\x20package.json\x20found\x20in\x20current\x20directory.');if(!_0x30e617){const _0x368094=Object[_0xfef0(0x1f2)](_0x34ed7d);if(_0x368094[_0xfef0(0x1e6)]===0x0)console[_0xfef0(0x1d2)](_0xfef0(0x1ce));else{console[_0xfef0(0x1d2)](_0xfef0(0x1d8));const _0x3bebfe=Math['max'](..._0x368094[_0xfef0(0x1fb)](_0x497cf6=>_0x497cf6[_0xfef0(0x1e6)]));for(const [_0x5a795a,_0x3bda09]of Object['entries'](_0x34ed7d)){console[_0xfef0(0x1d2)](_0xfef0(0x1c9)+_0x5a795a[_0xfef0(0x1da)](_0x3bebfe+0x2)+_0x3bda09);}console[_0xfef0(0x1d2)]('\x0a\x20\x20Usage:\x20'+CLI_BIN_NAME+_0xfef0(0x1f6));}return{'ok':!![]};}if(!_0x34ed7d[_0x30e617])throw CliErrors[_0xfef0(0x1cc)]('Script\x20\x22'+_0x30e617+'\x22\x20not\x20found\x20in\x20package.json.',_0xfef0(0x1cb)+(Object[_0xfef0(0x1f2)](_0x34ed7d)[_0xfef0(0x1e1)](',\x20')||_0xfef0(0x1dc)));const _0x481cbd=detectPackageManager(_0x27e955);VERSION_CHECK_SCRIPTS[_0xfef0(0x1db)](_0x30e617)&&await versionCheck(_0x27e955);if(_0x30e617==='preview'&&_0x393e97['bool']('watch'))return await Promise['all']([spawnViteBuildWatch(_0x27e955),spawnVitePreview(_0x27e955)]),{'ok':!![]};return await spawnScript(_0x481cbd,_0x30e617,_0x263d0e,_0x27e955),{'ok':!![]};}};
@@ -1 +1 @@
1
- const a79_0x5f1bd2=a79_0x3f29;function a79_0x398a(){const _0x1668a8=['5541294dTlggR','export','1859170xwGNGR','schema','Export\x20machine-readable\x20command\x20schema\x20(JSON)','30lXlibP','7562149NYezAC','8175832WOlSDC','81neIuhD','548607Xwfrlo','582088BxYjZe','2eOMaOS','1998390yBOYJw'];a79_0x398a=function(){return _0x1668a8;};return a79_0x398a();}(function(_0x23f358,_0x90831f){const _0x24e689=a79_0x3f29,_0x10ca92=_0x23f358();while(!![]){try{const _0x4852c9=parseInt(_0x24e689(0xa0))/0x1*(-parseInt(_0x24e689(0xa2))/0x2)+parseInt(_0x24e689(0xa3))/0x3+-parseInt(_0x24e689(0xa1))/0x4*(parseInt(_0x24e689(0xa9))/0x5)+parseInt(_0x24e689(0xa4))/0x6+parseInt(_0x24e689(0xaa))/0x7+parseInt(_0x24e689(0x9e))/0x8+parseInt(_0x24e689(0x9f))/0x9*(-parseInt(_0x24e689(0xa6))/0xa);if(_0x4852c9===_0x90831f)break;else _0x10ca92['push'](_0x10ca92['shift']());}catch(_0x107d4b){_0x10ca92['push'](_0x10ca92['shift']());}}}(a79_0x398a,0x91bed));import{buildSchemaPayload}from'../framework/schema-export.js';function a79_0x3f29(_0x364501,_0x470807){_0x364501=_0x364501-0x9e;const _0x398acb=a79_0x398a();let _0x3f2941=_0x398acb[_0x364501];return _0x3f2941;}async function execute(_0x393894){const _0x586b72=await buildSchemaPayload();return{'ok':!![],'data':_0x586b72};}export const schemaDefinition={'service':a79_0x5f1bd2(0xa7),'command':a79_0x5f1bd2(0xa5),'description':a79_0x5f1bd2(0xa8),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':'json','flags':[],'execute':execute};
1
+ const a79_0x267637=a79_0x58be;(function(_0x524d04,_0x4a9406){const _0xd39569=a79_0x58be,_0x111ec6=_0x524d04();while(!![]){try{const _0x9c8e59=-parseInt(_0xd39569(0x1a3))/0x1*(-parseInt(_0xd39569(0x19c))/0x2)+parseInt(_0xd39569(0x1a7))/0x3+-parseInt(_0xd39569(0x1a5))/0x4+-parseInt(_0xd39569(0x19e))/0x5*(parseInt(_0xd39569(0x1a6))/0x6)+-parseInt(_0xd39569(0x19f))/0x7*(-parseInt(_0xd39569(0x1a4))/0x8)+-parseInt(_0xd39569(0x19d))/0x9+parseInt(_0xd39569(0x1a2))/0xa;if(_0x9c8e59===_0x4a9406)break;else _0x111ec6['push'](_0x111ec6['shift']());}catch(_0x3725bb){_0x111ec6['push'](_0x111ec6['shift']());}}}(a79_0x5982,0xb7c3a));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x2b72d8){const _0x3b18be=await buildSchemaPayload();return{'ok':!![],'data':_0x3b18be};}function a79_0x58be(_0x3bf146,_0x387f14){_0x3bf146=_0x3bf146-0x19c;const _0x598252=a79_0x5982();let _0x58becb=_0x598252[_0x3bf146];return _0x58becb;}function a79_0x5982(){const _0x2fc417=['1131350BgjVya','5446LkitqJ','Export\x20machine-readable\x20command\x20schema\x20(JSON)','export','5849080SsVqZf','42oXvpRE','32BvnDUr','1685548DtVykF','18uwHnoJ','4231551Gpyjlk','38474phZXMc','8582364lKcnJV'];a79_0x5982=function(){return _0x2fc417;};return a79_0x5982();}export const schemaDefinition={'service':'schema','command':a79_0x267637(0x1a1),'description':a79_0x267637(0x1a0),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':'json','flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a80_0x42458e=a80_0x380f;(function(_0x7958ab,_0x451892){const _0x2d037d=a80_0x380f,_0x4d1bac=_0x7958ab();while(!![]){try{const _0x3a8c26=-parseInt(_0x2d037d(0xe3))/0x1*(parseInt(_0x2d037d(0xe0))/0x2)+-parseInt(_0x2d037d(0xdd))/0x3+-parseInt(_0x2d037d(0xe1))/0x4+parseInt(_0x2d037d(0xdc))/0x5+-parseInt(_0x2d037d(0xe9))/0x6+-parseInt(_0x2d037d(0xe7))/0x7+parseInt(_0x2d037d(0xe8))/0x8*(parseInt(_0x2d037d(0xe5))/0x9);if(_0x3a8c26===_0x451892)break;else _0x4d1bac['push'](_0x4d1bac['shift']());}catch(_0x265865){_0x4d1bac['push'](_0x4d1bac['shift']());}}}(a80_0x4ec8,0x7da1f));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';export const skillDefinitions=[{'service':a80_0x42458e(0xd4),'command':'install','description':a80_0x42458e(0xd5),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5245fc){const _0x5186ac=a80_0x42458e;logger[_0x5186ac(0xde)](process[_0x5186ac(0xd2)]()),logger[_0x5186ac(0xe4)](_0x5186ac(0xdf),'执行安装技能包命令(委托给\x20npx\x20skills\x20--global)');const {runNpxSkillsAddGlobal:_0x20c5e5}=await import(_0x5186ac(0xe2)),_0x433c42=_0x5245fc['nonInteractive']?_0x5186ac(0xd7):_0x5186ac(0xe6);console[_0x5186ac(0xdb)](_0x5186ac(0xd0));const _0x267482=_0x20c5e5(process[_0x5186ac(0xd2)](),_0x5186ac(0xda),{'stdio':_0x433c42});if(_0x267482[_0x5186ac(0xd1)])console[_0x5186ac(0xdb)](_0x5186ac(0xd6));else{if(_0x267482['ok'])console[_0x5186ac(0xdb)](CLI_BIN_NAME+'\x20skill\x20installed');else throw CliErrors[_0x5186ac(0xd3)](_0x5186ac(0xd8)+(_0x267482[_0x5186ac(0xd9)]||_0x5186ac(0xea)),'Check\x20network\x20connectivity\x20and\x20try\x20again.');}return{'ok':!![]};}}];function a80_0x380f(_0x10ca4e,_0x5c8979){_0x10ca4e=_0x10ca4e-0xd0;const _0x4ec8f4=a80_0x4ec8();let _0x380fa4=_0x4ec8f4[_0x10ca4e];return _0x380fa4;}function a80_0x4ec8(){const _0x158e72=['703224QIgzGf','unknown','Installing\x20official\x20skill\x20via\x20npx\x20(npx\x20-y\x20skills\x20add\x20lovrabet/rabetbase\x20--global)...','skipped','cwd','apiError','skill','Install\x20developer\x20skill\x20package','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20skill\x20is\x20already\x20present.','pipe','npx\x20skills\x20add\x20failed:\x20','error','lovrabet/rabetbase','log','189460YvrYOc','2605344WCDNrf','setLogPath','skill-install','1008662ntwzQE','3369856CEMeup','../../skills/npx-skills-add.js','2XJfIdF','info','16611246SVnuLd','inherit','2645377Oayhkp','16fFABvR'];a80_0x4ec8=function(){return _0x158e72;};return a80_0x4ec8();}
1
+ const a80_0xd5f6b1=a80_0x4b1e;function a80_0x3157(){const _0x8ebbe0=['cwd','skipped','796901JHyiNK','9070dXgSpk','log','3225270qKOQEC','90lEEvNu','inherit','3397310Tnepjd','4263796gFQCwf','pipe','执行安装技能包命令(委托给\x20npx\x20skills\x20--global)','Check\x20network\x20connectivity\x20and\x20try\x20again.','lovrabet/rabetbase','apiError','skill','105dppgRo','write','info','\x20skill\x20installed','../../skills/npx-skills-add.js','install','177RinQvq','451848ahPzaI','124788QFBldf'];a80_0x3157=function(){return _0x8ebbe0;};return a80_0x3157();}function a80_0x4b1e(_0x2f20e9,_0x4b7c18){_0x2f20e9=_0x2f20e9-0xe6;const _0x315701=a80_0x3157();let _0x4b1ee9=_0x315701[_0x2f20e9];return _0x4b1ee9;}(function(_0x4fcf84,_0xed8ba){const _0x4e976e=a80_0x4b1e,_0x410b1f=_0x4fcf84();while(!![]){try{const _0x2d441c=-parseInt(_0x4e976e(0xfc))/0x1+parseInt(_0x4e976e(0xfd))/0x2*(-parseInt(_0x4e976e(0xf7))/0x3)+parseInt(_0x4e976e(0xea))/0x4+parseInt(_0x4e976e(0xe9))/0x5+-parseInt(_0x4e976e(0xf9))/0x6*(-parseInt(_0x4e976e(0xf1))/0x7)+parseInt(_0x4e976e(0xf8))/0x8*(-parseInt(_0x4e976e(0xe7))/0x9)+parseInt(_0x4e976e(0xe6))/0xa;if(_0x2d441c===_0xed8ba)break;else _0x410b1f['push'](_0x410b1f['shift']());}catch(_0x3407a2){_0x410b1f['push'](_0x410b1f['shift']());}}}(a80_0x3157,0xb7428));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';export const skillDefinitions=[{'service':a80_0xd5f6b1(0xf0),'command':a80_0xd5f6b1(0xf6),'description':'Install\x20developer\x20skill\x20package','risk':a80_0xd5f6b1(0xf2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x358c91){const _0x4acaa3=a80_0xd5f6b1;logger['setLogPath'](process[_0x4acaa3(0xfa)]()),logger[_0x4acaa3(0xf3)]('skill-install',_0x4acaa3(0xec));const {runNpxSkillsAddGlobal:_0x5b601b}=await import(_0x4acaa3(0xf5)),_0x624e25=_0x358c91['nonInteractive']?_0x4acaa3(0xeb):_0x4acaa3(0xe8);console[_0x4acaa3(0xfe)]('Installing\x20official\x20skill\x20via\x20npx\x20(npx\x20-y\x20skills\x20add\x20lovrabet/rabetbase\x20--global)...');const _0x19ca8c=_0x5b601b(process['cwd'](),_0x4acaa3(0xee),{'stdio':_0x624e25});if(_0x19ca8c[_0x4acaa3(0xfb)])console[_0x4acaa3(0xfe)]('Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20skill\x20is\x20already\x20present.');else{if(_0x19ca8c['ok'])console[_0x4acaa3(0xfe)](CLI_BIN_NAME+_0x4acaa3(0xf4));else throw CliErrors[_0x4acaa3(0xef)]('npx\x20skills\x20add\x20failed:\x20'+(_0x19ca8c['error']||'unknown'),_0x4acaa3(0xed));}return{'ok':!![]};}}];