@lovrabet/rabetbase-cli 2.2.4-beta.4 → 2.2.4-beta.6

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 (209) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/discover.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app/use.js +1 -1
  26. package/lib/commands/auth/index.js +1 -1
  27. package/lib/commands/bff/create.js +1 -1
  28. package/lib/commands/bff/delete.js +1 -1
  29. package/lib/commands/bff/detail.js +1 -1
  30. package/lib/commands/bff/index.js +1 -1
  31. package/lib/commands/bff/list.js +1 -1
  32. package/lib/commands/bff/pull.js +1 -1
  33. package/lib/commands/bff/push.js +1 -1
  34. package/lib/commands/bff/status.js +1 -1
  35. package/lib/commands/cli-update.js +1 -1
  36. package/lib/commands/codegen/index.js +1 -1
  37. package/lib/commands/codegen/sdk.js +1 -1
  38. package/lib/commands/codegen/sql.js +1 -1
  39. package/lib/commands/common/app-selector.js +1 -1
  40. package/lib/commands/common/flags.js +1 -1
  41. package/lib/commands/common/validate.js +1 -1
  42. package/lib/commands/config/get.js +1 -1
  43. package/lib/commands/config/index.js +1 -1
  44. package/lib/commands/config/list.js +1 -1
  45. package/lib/commands/config/set.js +1 -1
  46. package/lib/commands/config/shared.js +1 -1
  47. package/lib/commands/data/filter.js +1 -1
  48. package/lib/commands/data/getOne.js +1 -1
  49. package/lib/commands/data/index.js +1 -1
  50. package/lib/commands/data/shared.js +1 -1
  51. package/lib/commands/dataset/capability.js +1 -1
  52. package/lib/commands/dataset/delete.js +1 -1
  53. package/lib/commands/dataset/detail.js +1 -1
  54. package/lib/commands/dataset/extend-update.js +1 -1
  55. package/lib/commands/dataset/field-update.js +1 -1
  56. package/lib/commands/dataset/index.js +1 -1
  57. package/lib/commands/dataset/list.js +1 -1
  58. package/lib/commands/dataset/operations.js +1 -1
  59. package/lib/commands/dataset/relation-create.js +1 -1
  60. package/lib/commands/dataset/relation-delete.js +1 -1
  61. package/lib/commands/dataset/relation-shared.js +1 -1
  62. package/lib/commands/dataset/relation-update.js +1 -1
  63. package/lib/commands/dataset/relations.js +1 -1
  64. package/lib/commands/dataset/rename.js +1 -1
  65. package/lib/commands/db/analyze-cancel.js +1 -1
  66. package/lib/commands/db/analyze-start.js +1 -1
  67. package/lib/commands/db/analyze-status.js +1 -1
  68. package/lib/commands/db/create.js +1 -1
  69. package/lib/commands/db/delete.js +1 -1
  70. package/lib/commands/db/detail.js +1 -1
  71. package/lib/commands/db/diff.js +1 -1
  72. package/lib/commands/db/index.js +1 -1
  73. package/lib/commands/db/list.js +1 -1
  74. package/lib/commands/db/shared.js +1 -1
  75. package/lib/commands/db/tables.js +1 -1
  76. package/lib/commands/db/test.js +1 -1
  77. package/lib/commands/db/update.js +1 -1
  78. package/lib/commands/doctor.js +1 -1
  79. package/lib/commands/init/index.js +1 -1
  80. package/lib/commands/issue/index.js +1 -1
  81. package/lib/commands/issue/nudge.js +1 -1
  82. package/lib/commands/issue/report.js +1 -1
  83. package/lib/commands/issue/shared.js +1 -1
  84. package/lib/commands/logs/index.js +1 -1
  85. package/lib/commands/menu/index.js +1 -1
  86. package/lib/commands/menu/list.js +1 -1
  87. package/lib/commands/menu/shared/compare-table.js +1 -1
  88. package/lib/commands/menu/shared/index.js +1 -1
  89. package/lib/commands/menu/shared/inquirer.js +1 -1
  90. package/lib/commands/menu/shared/local-pages.js +1 -1
  91. package/lib/commands/menu/shared/logic.js +1 -1
  92. package/lib/commands/menu/shared/service.js +1 -1
  93. package/lib/commands/menu/shared/sync-core.js +1 -1
  94. package/lib/commands/menu/shared/update-core.js +1 -1
  95. package/lib/commands/menu/shared/valid-url.js +1 -1
  96. package/lib/commands/menu/sync.js +1 -1
  97. package/lib/commands/menu/update.js +1 -1
  98. package/lib/commands/page/generate-start.js +1 -1
  99. package/lib/commands/page/generate-status.js +1 -1
  100. package/lib/commands/page/index.js +1 -1
  101. package/lib/commands/page/pull.js +1 -1
  102. package/lib/commands/page/push.js +1 -1
  103. package/lib/commands/page/relation-audit.js +1 -1
  104. package/lib/commands/page/shared.js +1 -1
  105. package/lib/commands/page/standard-page-status.js +1 -1
  106. package/lib/commands/page/sync.js +1 -1
  107. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  108. package/lib/commands/project/create/format-elapsed.js +1 -1
  109. package/lib/commands/project/create/main.js +1 -1
  110. package/lib/commands/project/create/non-interactive.js +1 -1
  111. package/lib/commands/project/create/project-template-path.js +1 -1
  112. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  113. package/lib/commands/project/create/use-format-code.js +1 -1
  114. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  115. package/lib/commands/project/index.js +1 -1
  116. package/lib/commands/project/init.js +1 -1
  117. package/lib/commands/project/upgrade.js +1 -1
  118. package/lib/commands/registry.js +1 -1
  119. package/lib/commands/run/index.js +1 -1
  120. package/lib/commands/schema.js +1 -1
  121. package/lib/commands/skill/index.js +1 -1
  122. package/lib/commands/sql/create.js +1 -1
  123. package/lib/commands/sql/delete.js +1 -1
  124. package/lib/commands/sql/detail.js +1 -1
  125. package/lib/commands/sql/exec.js +1 -1
  126. package/lib/commands/sql/index.js +1 -1
  127. package/lib/commands/sql/list.js +1 -1
  128. package/lib/commands/sql/pull.js +1 -1
  129. package/lib/commands/sql/push.js +1 -1
  130. package/lib/commands/sql/save.js +1 -1
  131. package/lib/commands/sql/shared.js +1 -1
  132. package/lib/commands/sql/status.js +1 -1
  133. package/lib/commands/sql/validate.js +1 -1
  134. package/lib/commands/workspace/index.js +1 -0
  135. package/lib/config/schema.js +1 -1
  136. package/lib/constant/cdn.js +1 -1
  137. package/lib/constant/cli.js +1 -1
  138. package/lib/constant/defaults.js +1 -1
  139. package/lib/constant/domain.js +1 -1
  140. package/lib/constant/env.js +1 -1
  141. package/lib/constant/output.js +1 -1
  142. package/lib/constant/paths.js +1 -1
  143. package/lib/constant/risk.js +1 -1
  144. package/lib/context/app-resolver.js +1 -0
  145. package/lib/context/auth-resolver.js +1 -0
  146. package/lib/context/config-loader.js +1 -0
  147. package/lib/context.js +1 -1
  148. package/lib/core/alias-resolver.js +1 -1
  149. package/lib/core/api-client.js +1 -1
  150. package/lib/core/bff/config.js +1 -1
  151. package/lib/core/bff/file-system.js +1 -1
  152. package/lib/core/bff/hash.js +1 -1
  153. package/lib/core/bff/lock.js +1 -1
  154. package/lib/core/bff/utils.js +1 -1
  155. package/lib/core/db-resolver.js +1 -1
  156. package/lib/core/page/file-system.js +1 -1
  157. package/lib/core/page/hash.js +1 -1
  158. package/lib/core/page/lock.js +1 -1
  159. package/lib/core/sql-sync/config.js +1 -1
  160. package/lib/core/sql-sync/file-system.js +1 -1
  161. package/lib/core/sql-sync/hash.js +1 -1
  162. package/lib/core/sql-sync/lock.js +1 -1
  163. package/lib/core/sql-sync/utils.js +1 -1
  164. package/lib/core/sql-validator.js +1 -1
  165. package/lib/errors.js +1 -1
  166. package/lib/framework/build-all-flags.js +1 -1
  167. package/lib/framework/flags.js +1 -1
  168. package/lib/framework/help.js +1 -1
  169. package/lib/framework/index.js +1 -1
  170. package/lib/framework/output.js +1 -1
  171. package/lib/framework/response.js +1 -1
  172. package/lib/framework/runner-alias.js +1 -1
  173. package/lib/framework/runner.js +1 -1
  174. package/lib/framework/schema-export.js +1 -1
  175. package/lib/framework/types.js +1 -1
  176. package/lib/generated/build-info.js +1 -1
  177. package/lib/help.js +1 -1
  178. package/lib/skills/main.js +1 -1
  179. package/lib/skills/npx-skills-add.js +1 -1
  180. package/lib/telemetry/cli-command-trace.js +1 -1
  181. package/lib/telemetry/cli-help-trace.js +1 -1
  182. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  183. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  184. package/lib/telemetry/send-cli-trace-log.js +1 -1
  185. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  186. package/lib/utils/ai_config.js +1 -1
  187. package/lib/utils/apply-jq-filter.js +1 -1
  188. package/lib/utils/cdn-config.js +1 -1
  189. package/lib/utils/check-sdk-version.js +1 -1
  190. package/lib/utils/cli-version-check.js +1 -1
  191. package/lib/utils/cli-version-policy.js +1 -1
  192. package/lib/utils/config.js +1 -1
  193. package/lib/utils/copy-directory.js +1 -1
  194. package/lib/utils/entity-with-id.js +1 -1
  195. package/lib/utils/file-utils.js +1 -1
  196. package/lib/utils/guides-cdn.js +1 -1
  197. package/lib/utils/http-client.js +1 -1
  198. package/lib/utils/is-non-interactive.js +1 -1
  199. package/lib/utils/logger.js +1 -1
  200. package/lib/utils/params.js +1 -1
  201. package/lib/utils/platform.js +1 -1
  202. package/lib/utils/rules-cdn.js +1 -1
  203. package/lib/utils/sleep.js +1 -1
  204. package/lib/utils/template-replacer.js +1 -1
  205. package/lib/utils/update-notice.js +1 -1
  206. package/lib/utils/version.js +1 -1
  207. package/lib/utils/with-active-cookie.js +1 -1
  208. package/lib/utils/write-cli-side-channel.js +1 -1
  209. package/package.json +2 -2
@@ -1 +1 @@
1
- (function(_0x546e3d,_0x4fb388){const _0x217ce3=a110_0x4028,_0x19851e=_0x546e3d();while(!![]){try{const _0xcf6ec=-parseInt(_0x217ce3(0x15e))/0x1*(parseInt(_0x217ce3(0x163))/0x2)+-parseInt(_0x217ce3(0x15d))/0x3+-parseInt(_0x217ce3(0x15c))/0x4+-parseInt(_0x217ce3(0x170))/0x5*(parseInt(_0x217ce3(0x16b))/0x6)+parseInt(_0x217ce3(0x162))/0x7+parseInt(_0x217ce3(0x184))/0x8+parseInt(_0x217ce3(0x161))/0x9*(parseInt(_0x217ce3(0x171))/0xa);if(_0xcf6ec===_0x4fb388)break;else _0x19851e['push'](_0x19851e['shift']());}catch(_0x31ab7e){_0x19851e['push'](_0x19851e['shift']());}}}(a110_0x5b80,0x796cb));import a110_0x567535 from'path';import a110_0x391ad9 from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../api/fetch-model-list.js';function a110_0x5b80(){const _0x116dc4=['Project\x20name\x20cannot\x20be\x20empty.','33095uMXklq','70yyrVFa','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','cwd','parse','writeFile','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','validation','chdir','log','utf-8','toLocaleString','\x20\x20Pulling\x20API\x20configuration...','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','belowMinimum','package.json','\x20\x20√\x20Pulled\x20','bun','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','Use\x20a\x20different\x20project\x20name.','2126648VSWuSa','\x20dataset(s),\x20generated\x20','ignore','resolve','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','\x22\x20already\x20exists.','access','length','bun\x20--version','\x20api\x20pull`\x20manually\x20later.','readFile','2789252WrWXbl','1991643qDWZeP','1CasgDt','\x20model(s)','\x20\x20√\x20Project\x20template\x20created','2983977UWiijX','4249mrffhQ','1047142UEHqkz','*\x20Creating\x20project\x20','Check\x20directory\x20permissions.','join','\x20\x20√\x20Code\x20formatted','\x20\x20√\x20package.json\x20updated','\x20\x20rabetbase\x20run\x20start\x0a','Cannot\x20create\x20project\x20in\x20current\x20directory.','186xEswyY','env','dirname','\x20\x20Installing\x20dependencies...'];a110_0x5b80=function(){return _0x116dc4;};return a110_0x5b80();}import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';function a110_0x4028(_0x469700,_0x1fbed7){_0x469700=_0x469700-0x152;const _0x5b80af=a110_0x5b80();let _0x4028c3=_0x5b80af[_0x469700];return _0x4028c3;}import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x404a9e,_0x1f99de,_0x46548e,_0x1066c9){const _0x4eabc1=a110_0x4028,_0x12978d=await checkCliVersion();(_0x12978d['needsUpgrade']||_0x12978d[_0x4eabc1(0x17e)])&&(printCliUpgradeWarning(_0x12978d),assertCliVersionSupported(_0x12978d));if(!_0x404a9e||_0x404a9e['trim']()==='')throw CliErrors[_0x4eabc1(0x177)](_0x4eabc1(0x16f));const _0x222834=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x222834['test'](_0x404a9e))throw CliErrors[_0x4eabc1(0x177)]('Project\x20name\x20contains\x20invalid\x20characters.',_0x4eabc1(0x155));if(_0x404a9e['length']>0x64)throw CliErrors[_0x4eabc1(0x177)](_0x4eabc1(0x182));const _0x29b3ec=a110_0x567535[_0x4eabc1(0x154)](process[_0x4eabc1(0x173)](),_0x404a9e);if(existsSync(_0x29b3ec))throw CliErrors[_0x4eabc1(0x177)]('Project\x20directory\x20\x22'+_0x404a9e+_0x4eabc1(0x156),_0x4eabc1(0x183));try{const _0x2669b5=a110_0x567535[_0x4eabc1(0x16d)](_0x29b3ec);await a110_0x391ad9[_0x4eabc1(0x157)](_0x2669b5,a110_0x391ad9['constants']['W_OK']);}catch{throw CliErrors[_0x4eabc1(0x177)](_0x4eabc1(0x16a),_0x4eabc1(0x165));}try{console[_0x4eabc1(0x179)](_0x4eabc1(0x164)+_0x404a9e+'...');const _0x4c0992=getSubAppReactDemoTemplateDir();await copyDirectory(_0x4c0992,_0x29b3ec),console[_0x4eabc1(0x179)](_0x4eabc1(0x160)),await updatePackageJsonName(_0x404a9e),console['log'](_0x4eabc1(0x168)),console[_0x4eabc1(0x179)](_0x4eabc1(0x16e)),console[_0x4eabc1(0x179)](_0x4eabc1(0x172)),await formatCode(_0x29b3ec),console[_0x4eabc1(0x179)](_0x4eabc1(0x167)),await configureProject(_0x404a9e,_0x46548e,_0x1f99de),console['log']('\x20\x20√\x20Configuration\x20file\x20created'),_0x46548e&&await pullApiConfig(_0x29b3ec,_0x46548e,_0x1f99de,_0x1066c9),console[_0x4eabc1(0x179)]('\x0a√\x20Project\x20'+_0x404a9e+'\x20created\x20successfully!'),console['log']('\x0a\x20\x20cd\x20'+_0x404a9e),console[_0x4eabc1(0x179)](_0x4eabc1(0x169));}catch(_0x59ec78){try{existsSync(_0x29b3ec)&&await a110_0x391ad9['rm'](_0x29b3ec,{'recursive':!![],'force':!![]});}catch{}throw _0x59ec78;}}async function updatePackageJsonName(_0x51967a){const _0xbb444=a110_0x4028,_0x3c5c03=a110_0x567535[_0xbb444(0x154)](process[_0xbb444(0x173)](),_0x51967a),_0x3962ef=a110_0x567535[_0xbb444(0x166)](_0x3c5c03,_0xbb444(0x17f)),_0x36266f=await a110_0x391ad9[_0xbb444(0x15b)](_0x3962ef,_0xbb444(0x17a)),_0x3c31ba=JSON[_0xbb444(0x174)](_0x36266f);_0x3c31ba['name']=_0x51967a,_0x3c31ba['description']=_0xbb444(0x17d),await a110_0x391ad9[_0xbb444(0x175)](_0x3962ef,JSON['stringify'](_0x3c31ba,null,0x2)+'\x0a');}function detectPackageManager(){const _0x31310f=a110_0x4028;try{return execSync(_0x31310f(0x159),{'stdio':_0x31310f(0x153)}),_0x31310f(0x181);}catch{return'npm';}}async function formatCode(_0x5b574e){try{await execAsync('bun\x20run\x20format',{'cwd':_0x5b574e});}catch{}}async function configureProject(_0xcfa2d3,_0x153a98,_0x5bfe38){const _0x402662=a110_0x4028,_0x40e239=a110_0x567535[_0x402662(0x154)](process[_0x402662(0x173)](),_0xcfa2d3),_0x357283=a110_0x567535[_0x402662(0x166)](_0x40e239,NEW_CONFIG_NAME),_0x8c289d=readConfig(),_0xde8ee3=typeof _0x8c289d[_0x402662(0x16c)]==='string'?_0x8c289d[_0x402662(0x16c)]:undefined,_0x3dadf6={};for(const _0x2958ca of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x8c289d[_0x2958ca]!=null)_0x3dadf6[_0x2958ca]=_0x8c289d[_0x2958ca];}const _0x3e49d1=buildCanonicalProjectConfig(_0x3dadf6,{'appCodes':_0x153a98?[_0x153a98]:[],'env':_0x5bfe38||_0xde8ee3||'production','metadata':{'createdAt':new Date()[_0x402662(0x17b)](),'version':getCliVersion()}});writeConfigFile(_0x357283,_0x3e49d1);}async function pullApiConfig(_0x818449,_0x2b0d50,_0x29bd37,_0x139ddd){const _0x26bfed=a110_0x4028,_0x480983=process[_0x26bfed(0x173)]();try{process[_0x26bfed(0x178)](_0x818449);const _0x1357e0=_0x29bd37||'production';initEnv(_0x1357e0),console[_0x26bfed(0x179)](_0x26bfed(0x17c));const {configArray:_0x1ba111}=await fetchModelList(_0x2b0d50,_0x139ddd||''),_0x262b34=await generateApiFile(_0x1ba111,'',_0x2b0d50,!![],_0x1357e0,DEFAULT_API_DIR);console[_0x26bfed(0x179)](_0x26bfed(0x180)+_0x1ba111[_0x26bfed(0x158)]+_0x26bfed(0x152)+_0x262b34['modelCount']+_0x26bfed(0x15f));}catch(_0x4cb91c){console['log'](_0x26bfed(0x176)+CLI_BIN_NAME+_0x26bfed(0x15a));}finally{process[_0x26bfed(0x178)](_0x480983);}}
1
+ (function(_0x3895bd,_0x5cc743){const _0x258617=a110_0x1c50,_0x4e2236=_0x3895bd();while(!![]){try{const _0xbbc3d9=parseInt(_0x258617(0x1de))/0x1+parseInt(_0x258617(0x1f7))/0x2*(-parseInt(_0x258617(0x1e8))/0x3)+-parseInt(_0x258617(0x1e9))/0x4*(-parseInt(_0x258617(0x1ec))/0x5)+-parseInt(_0x258617(0x20e))/0x6*(-parseInt(_0x258617(0x20a))/0x7)+-parseInt(_0x258617(0x1ed))/0x8*(parseInt(_0x258617(0x1fc))/0x9)+-parseInt(_0x258617(0x201))/0xa+parseInt(_0x258617(0x20c))/0xb*(parseInt(_0x258617(0x1ee))/0xc);if(_0xbbc3d9===_0x5cc743)break;else _0x4e2236['push'](_0x4e2236['shift']());}catch(_0x26bce9){_0x4e2236['push'](_0x4e2236['shift']());}}}(a110_0x5e7d,0x8350f));import a110_0x8eda48 from'path';import a110_0x2bc7eb from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';function a110_0x5e7d(){const _0x4a9d9e=['\x20\x20√\x20Project\x20template\x20created','resolve','101481FKUchx','4412OUJfxW','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','\x20dataset(s),\x20generated\x20','4240EGwlwL','296BCOrWH','24NPHlDW','ignore','\x20api\x20pull`\x20manually\x20later.','...','modelCount','utf-8','bun','test','\x20\x20√\x20Code\x20formatted','6avKXZs','package.json','log','belowMinimum','readFile','93249cUWbRA','name','length','validation','npm','8370500qnXeGz','chdir','Cannot\x20create\x20project\x20in\x20current\x20directory.','needsUpgrade','env','stringify','\x20\x20√\x20Configuration\x20file\x20created','\x20\x20rabetbase\x20run\x20start\x0a','bun\x20run\x20format','1338897IRXbNw','bun\x20--version','861377FQljNz','Check\x20directory\x20permissions.','18ONijAz','constants','dirname','\x20created\x20successfully!','Project\x20name\x20contains\x20invalid\x20characters.','\x20model(s)','\x20\x20Pulling\x20API\x20configuration...','\x0a√\x20Project\x20','access','toLocaleString','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','join','\x20\x20√\x20package.json\x20updated','description','193988QZvbZU','Project\x20directory\x20\x22','production','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','*\x20Creating\x20project\x20','\x20\x20Installing\x20dependencies...','cwd','string'];a110_0x5e7d=function(){return _0x4a9d9e;};return a110_0x5e7d();}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';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x518e30,_0x348c9d,_0x1651da,_0x25b514){const _0x154b57=a110_0x1c50,_0x3dc1af=await checkCliVersion();(_0x3dc1af[_0x154b57(0x204)]||_0x3dc1af[_0x154b57(0x1fa)])&&(printCliUpgradeWarning(_0x3dc1af),assertCliVersionSupported(_0x3dc1af));if(!_0x518e30||_0x518e30['trim']()==='')throw CliErrors['validation']('Project\x20name\x20cannot\x20be\x20empty.');const _0x33614e=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x33614e[_0x154b57(0x1f5)](_0x518e30))throw CliErrors[_0x154b57(0x1ff)](_0x154b57(0x212),'Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x518e30[_0x154b57(0x1fe)]>0x64)throw CliErrors[_0x154b57(0x1ff)](_0x154b57(0x1ea));const _0x2c0970=a110_0x8eda48[_0x154b57(0x1e7)](process[_0x154b57(0x1e4)](),_0x518e30);if(existsSync(_0x2c0970))throw CliErrors[_0x154b57(0x1ff)](_0x154b57(0x1df)+_0x518e30+'\x22\x20already\x20exists.','Use\x20a\x20different\x20project\x20name.');try{const _0x26aaa=a110_0x8eda48[_0x154b57(0x210)](_0x2c0970);await a110_0x2bc7eb[_0x154b57(0x1d8)](_0x26aaa,a110_0x2bc7eb[_0x154b57(0x20f)]['W_OK']);}catch{throw CliErrors[_0x154b57(0x1ff)](_0x154b57(0x203),_0x154b57(0x20d));}try{console[_0x154b57(0x1f9)](_0x154b57(0x1e2)+_0x518e30+_0x154b57(0x1f1));const _0x2e9387=getSubAppReactDemoTemplateDir();await copyDirectory(_0x2e9387,_0x2c0970),console[_0x154b57(0x1f9)](_0x154b57(0x1e6)),await updatePackageJsonName(_0x518e30),console[_0x154b57(0x1f9)](_0x154b57(0x1dc)),console[_0x154b57(0x1f9)](_0x154b57(0x1e3)),console[_0x154b57(0x1f9)](_0x154b57(0x1da)),await formatCode(_0x2c0970),console[_0x154b57(0x1f9)](_0x154b57(0x1f6)),await configureProject(_0x518e30,_0x1651da,_0x348c9d),console[_0x154b57(0x1f9)](_0x154b57(0x207)),_0x1651da&&await pullApiConfig(_0x2c0970,_0x1651da,_0x348c9d,_0x25b514),console[_0x154b57(0x1f9)](_0x154b57(0x1d7)+_0x518e30+_0x154b57(0x211)),console[_0x154b57(0x1f9)]('\x0a\x20\x20cd\x20'+_0x518e30),console[_0x154b57(0x1f9)](_0x154b57(0x208));}catch(_0x121dae){try{existsSync(_0x2c0970)&&await a110_0x2bc7eb['rm'](_0x2c0970,{'recursive':!![],'force':!![]});}catch{}throw _0x121dae;}}async function updatePackageJsonName(_0x295775){const _0x19e976=a110_0x1c50,_0x54b492=a110_0x8eda48[_0x19e976(0x1e7)](process['cwd'](),_0x295775),_0x24651a=a110_0x8eda48[_0x19e976(0x1db)](_0x54b492,_0x19e976(0x1f8)),_0x454fe7=await a110_0x2bc7eb[_0x19e976(0x1fb)](_0x24651a,_0x19e976(0x1f3)),_0x8c77e8=JSON['parse'](_0x454fe7);_0x8c77e8[_0x19e976(0x1fd)]=_0x295775,_0x8c77e8[_0x19e976(0x1dd)]='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a110_0x2bc7eb['writeFile'](_0x24651a,JSON[_0x19e976(0x206)](_0x8c77e8,null,0x2)+'\x0a');}function detectPackageManager(){const _0x14de45=a110_0x1c50;try{return execSync(_0x14de45(0x20b),{'stdio':_0x14de45(0x1ef)}),_0x14de45(0x1f4);}catch{return _0x14de45(0x200);}}async function formatCode(_0x135128){const _0x4babf0=a110_0x1c50;try{await execAsync(_0x4babf0(0x209),{'cwd':_0x135128});}catch{}}function a110_0x1c50(_0x54e37e,_0x504d44){_0x54e37e=_0x54e37e-0x1d5;const _0x5e7dcf=a110_0x5e7d();let _0x1c509b=_0x5e7dcf[_0x54e37e];return _0x1c509b;}async function configureProject(_0x52dfd7,_0x28b312,_0x5bc832){const _0x1b09d6=a110_0x1c50,_0x4a00f2=a110_0x8eda48[_0x1b09d6(0x1e7)](process[_0x1b09d6(0x1e4)](),_0x52dfd7),_0x5300b7=a110_0x8eda48['join'](_0x4a00f2,NEW_CONFIG_NAME),_0x1d7f01=readConfig(),_0x335ed4=typeof _0x1d7f01[_0x1b09d6(0x205)]===_0x1b09d6(0x1e5)?_0x1d7f01['env']:undefined,_0x118598={};for(const _0x405c12 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x1d7f01[_0x405c12]!=null)_0x118598[_0x405c12]=_0x1d7f01[_0x405c12];}const _0x405136=buildCanonicalProjectConfig(_0x118598,{'appCodes':_0x28b312?[_0x28b312]:[],'env':_0x5bc832||_0x335ed4||_0x1b09d6(0x1e0),'metadata':{'createdAt':new Date()[_0x1b09d6(0x1d9)](),'version':getCliVersion()}});writeConfigFile(_0x5300b7,_0x405136);}async function pullApiConfig(_0x11ece1,_0x5b0610,_0x555ebf,_0x221eda){const _0x2ff5d4=a110_0x1c50,_0x2ecae8=process[_0x2ff5d4(0x1e4)]();try{process[_0x2ff5d4(0x202)](_0x11ece1);const _0x331d9f=_0x555ebf||'production';initEnv(_0x331d9f),console[_0x2ff5d4(0x1f9)](_0x2ff5d4(0x1d6));const {configArray:_0x205404}=await fetchModelList(_0x5b0610,_0x221eda||''),_0x2555fe=await generateApiFile(_0x205404,'',_0x5b0610,!![],_0x331d9f,DEFAULT_API_DIR);console['log']('\x20\x20√\x20Pulled\x20'+_0x205404[_0x2ff5d4(0x1fe)]+_0x2ff5d4(0x1eb)+_0x2555fe[_0x2ff5d4(0x1f2)]+_0x2ff5d4(0x1d5));}catch(_0x20a719){console['log'](_0x2ff5d4(0x1e1)+CLI_BIN_NAME+_0x2ff5d4(0x1f0));}finally{process[_0x2ff5d4(0x202)](_0x2ecae8);}}
@@ -1 +1 @@
1
- function a111_0x4eaf(){const _0x27b2da=['886804juMSuv','sub-app-react-demo','projects','../../../../','1260308SbDpku','1049304cDUeVc','2843985xwbxWi','21EnedEX','375762XgEpxQ','3024572EueBGG','templates','resolve','2451204hYuGMT'];a111_0x4eaf=function(){return _0x27b2da;};return a111_0x4eaf();}(function(_0x2dd01b,_0x3be521){const _0x5ba242=a111_0x138e,_0x593ca4=_0x2dd01b();while(!![]){try{const _0x3e9430=-parseInt(_0x5ba242(0x147))/0x1+parseInt(_0x5ba242(0x13e))/0x2+parseInt(_0x5ba242(0x142))/0x3+-parseInt(_0x5ba242(0x143))/0x4+parseInt(_0x5ba242(0x140))/0x5+parseInt(_0x5ba242(0x146))/0x6+-parseInt(_0x5ba242(0x141))/0x7*(-parseInt(_0x5ba242(0x13f))/0x8);if(_0x3e9430===_0x3be521)break;else _0x593ca4['push'](_0x593ca4['shift']());}catch(_0x52fd0b){_0x593ca4['push'](_0x593ca4['shift']());}}}(a111_0x4eaf,0x75fd1));import a111_0x5c791d from'node:path';import{fileURLToPath}from'node:url';const __dirname=a111_0x5c791d['dirname'](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x16bc81=a111_0x138e;return a111_0x5c791d[_0x16bc81(0x145)](__dirname,_0x16bc81(0x13d));}function a111_0x138e(_0x940f97,_0x1b046c){_0x940f97=_0x940f97-0x13d;const _0x4eaf8d=a111_0x4eaf();let _0x138e94=_0x4eaf8d[_0x940f97];return _0x138e94;}export function getSubAppReactDemoTemplateDir(){const _0x58f4f7=a111_0x138e;return a111_0x5c791d['join'](getRabetbaseCliPackageRoot(),_0x58f4f7(0x144),_0x58f4f7(0x149),_0x58f4f7(0x148));}
1
+ const a111_0x46b46f=a111_0x3878;(function(_0x298d59,_0x11ad9c){const _0x4fb4b4=a111_0x3878,_0x46f09f=_0x298d59();while(!![]){try{const _0x54bb39=parseInt(_0x4fb4b4(0x15f))/0x1+-parseInt(_0x4fb4b4(0x163))/0x2*(parseInt(_0x4fb4b4(0x167))/0x3)+parseInt(_0x4fb4b4(0x169))/0x4+parseInt(_0x4fb4b4(0x160))/0x5*(-parseInt(_0x4fb4b4(0x161))/0x6)+parseInt(_0x4fb4b4(0x164))/0x7+parseInt(_0x4fb4b4(0x15e))/0x8*(-parseInt(_0x4fb4b4(0x162))/0x9)+-parseInt(_0x4fb4b4(0x166))/0xa;if(_0x54bb39===_0x11ad9c)break;else _0x46f09f['push'](_0x46f09f['shift']());}catch(_0x3d5c84){_0x46f09f['push'](_0x46f09f['shift']());}}}(a111_0x5ebd,0xf2b3b));import a111_0x22b6ce from'node:path';import{fileURLToPath}from'node:url';const __dirname=a111_0x22b6ce[a111_0x46b46f(0x165)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x467465=a111_0x46b46f;return a111_0x22b6ce[_0x467465(0x168)](__dirname,'../../../../');}function a111_0x3878(_0x55d3ab,_0x4197d0){_0x55d3ab=_0x55d3ab-0x15c;const _0x5ebd6e=a111_0x5ebd();let _0x387874=_0x5ebd6e[_0x55d3ab];return _0x387874;}function a111_0x5ebd(){const _0x3b629c=['sub-app-react-demo','8SjNeKG','1034054ZAiDXQ','305495lmAPlF','66wvmWLQ','2464335zTpMoI','6igqHFv','11613126aJybJV','dirname','18591800XKgWEn','219249XbzEOV','resolve','5301472AhTMFl','templates'];a111_0x5ebd=function(){return _0x3b629c;};return a111_0x5ebd();}export function getSubAppReactDemoTemplateDir(){const _0x5a9497=a111_0x46b46f;return a111_0x22b6ce['join'](getRabetbaseCliPackageRoot(),_0x5a9497(0x15c),'projects',_0x5a9497(0x15d));}
@@ -1 +1 @@
1
- (function(_0x5e250b,_0x29502d){const _0x44bf08=a112_0x11c0,_0x53d6fe=_0x5e250b();while(!![]){try{const _0x58a5a9=-parseInt(_0x44bf08(0x184))/0x1+parseInt(_0x44bf08(0x17c))/0x2*(parseInt(_0x44bf08(0x17f))/0x3)+-parseInt(_0x44bf08(0x188))/0x4+-parseInt(_0x44bf08(0x181))/0x5+-parseInt(_0x44bf08(0x180))/0x6*(-parseInt(_0x44bf08(0x17b))/0x7)+-parseInt(_0x44bf08(0x18b))/0x8+parseInt(_0x44bf08(0x18c))/0x9*(parseInt(_0x44bf08(0x183))/0xa);if(_0x58a5a9===_0x29502d)break;else _0x53d6fe['push'](_0x53d6fe['shift']());}catch(_0x1126f6){_0x53d6fe['push'](_0x53d6fe['shift']());}}}(a112_0x5347,0xa9748));function a112_0x5347(){const _0x38313e=['message','90UMmjkf','935186CPUiTQ','info','now','项目模板复制完成','5168596sVTbLP','success','cwd','10365152urtYVO','2989629vXjzfz','175RoBUpl','2yglNlH','error','copy','1820475HpWovP','324078NRuNtZ','3648560UYLKum'];a112_0x5347=function(){return _0x38313e;};return a112_0x5347();}function a112_0x11c0(_0x32bb36,_0x258dc){_0x32bb36=_0x32bb36-0x17b;const _0x5347a6=a112_0x5347();let _0x11c0f0=_0x5347a6[_0x32bb36];return _0x11c0f0;}import a112_0xb5e2b9 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';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x10ea15){const _0x1ff948=a112_0x11c0,_0x576b5b=Date['now'](),_0x3b3d3a=a112_0xb5e2b9['resolve'](process[_0x1ff948(0x18a)](),_0x10ea15);try{logger[_0x1ff948(0x185)](_0x1ff948(0x17e),'开始复制项目模板',{'projectCode':_0x10ea15,'templateDir':templateDir}),await copyDirectory(templateDir,_0x3b3d3a);const _0x46a7d3=Date[_0x1ff948(0x186)]()-_0x576b5b;logger[_0x1ff948(0x189)](_0x1ff948(0x17e),_0x1ff948(0x187),_0x46a7d3,{'projectCode':_0x10ea15});}catch(_0x4cd22c){const _0x32e997=Date[_0x1ff948(0x186)]()-_0x576b5b;logger[_0x1ff948(0x17d)]('copy','项目模板复制失败',{'projectCode':_0x10ea15,'error':_0x4cd22c instanceof Error?_0x4cd22c[_0x1ff948(0x182)]:String(_0x4cd22c),'duration':_0x32e997});throw _0x4cd22c;}return formatElapsed(_0x576b5b);}
1
+ (function(_0x4b0fc1,_0x3af501){const _0x354673=a112_0x5e23,_0x2ba6a1=_0x4b0fc1();while(!![]){try{const _0x19fdc1=-parseInt(_0x354673(0x94))/0x1+parseInt(_0x354673(0x90))/0x2+parseInt(_0x354673(0x9d))/0x3*(-parseInt(_0x354673(0x9f))/0x4)+parseInt(_0x354673(0x9c))/0x5*(parseInt(_0x354673(0xa1))/0x6)+-parseInt(_0x354673(0x95))/0x7*(parseInt(_0x354673(0x99))/0x8)+parseInt(_0x354673(0x8f))/0x9+parseInt(_0x354673(0x93))/0xa*(parseInt(_0x354673(0x96))/0xb);if(_0x19fdc1===_0x3af501)break;else _0x2ba6a1['push'](_0x2ba6a1['shift']());}catch(_0x601e7b){_0x2ba6a1['push'](_0x2ba6a1['shift']());}}}(a112_0x1e02,0x5deec));import a112_0xccb8c5 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';function a112_0x1e02(){const _0x10479e=['976036PKrcKV','now','2802dITMnd','363024klNblv','1386030FLiFtE','resolve','copy','113110jGkbkb','693382BHXOdF','322gsGKfb','1287GbgeMM','项目模板复制完成','error','126416woFEuU','cwd','项目模板复制失败','2530TQazrJ','6nnlDlx','info'];a112_0x1e02=function(){return _0x10479e;};return a112_0x1e02();}function a112_0x5e23(_0x3fca79,_0x52238c){_0x3fca79=_0x3fca79-0x8f;const _0x1e0218=a112_0x1e02();let _0x5e2312=_0x1e0218[_0x3fca79];return _0x5e2312;}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0xe29c04){const _0x22628d=a112_0x5e23,_0x50d7ed=Date['now'](),_0x594825=a112_0xccb8c5[_0x22628d(0x91)](process[_0x22628d(0x9a)](),_0xe29c04);try{logger[_0x22628d(0x9e)](_0x22628d(0x92),'开始复制项目模板',{'projectCode':_0xe29c04,'templateDir':templateDir}),await copyDirectory(templateDir,_0x594825);const _0x2849f4=Date[_0x22628d(0xa0)]()-_0x50d7ed;logger['success']('copy',_0x22628d(0x97),_0x2849f4,{'projectCode':_0xe29c04});}catch(_0x59fdb9){const _0x2cf1f1=Date[_0x22628d(0xa0)]()-_0x50d7ed;logger[_0x22628d(0x98)](_0x22628d(0x92),_0x22628d(0x9b),{'projectCode':_0xe29c04,'error':_0x59fdb9 instanceof Error?_0x59fdb9['message']:String(_0x59fdb9),'duration':_0x2cf1f1});throw _0x59fdb9;}return formatElapsed(_0x50d7ed);}
@@ -1 +1 @@
1
- (function(_0x27d59e,_0x5aa346){const _0x43b5fb=a113_0x1638,_0x14c31e=_0x27d59e();while(!![]){try{const _0x3fc630=parseInt(_0x43b5fb(0x125))/0x1*(-parseInt(_0x43b5fb(0x130))/0x2)+parseInt(_0x43b5fb(0x12d))/0x3*(parseInt(_0x43b5fb(0x133))/0x4)+parseInt(_0x43b5fb(0x126))/0x5+parseInt(_0x43b5fb(0x123))/0x6*(parseInt(_0x43b5fb(0x12f))/0x7)+-parseInt(_0x43b5fb(0x12e))/0x8*(-parseInt(_0x43b5fb(0x134))/0x9)+-parseInt(_0x43b5fb(0x121))/0xa+-parseInt(_0x43b5fb(0x12c))/0xb;if(_0x3fc630===_0x5aa346)break;else _0x14c31e['push'](_0x14c31e['shift']());}catch(_0x5b5ed5){_0x14c31e['push'](_0x14c31e['shift']());}}}(a113_0x59fd,0x76838));import a113_0xbc5683 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a113_0x1638(_0x5ac2ab,_0x1a3e97){_0x5ac2ab=_0x5ac2ab-0x121;const _0x59fd76=a113_0x59fd();let _0x16382e=_0x59fd76[_0x5ac2ab];return _0x16382e;}function a113_0x59fd(){const _0x5a6e2e=['883822CYzvLr','开始格式化代码','now','296OMuipd','9tbAiGm','--write','prettier','error','5241660RQSWsc','resolve','5764254uPgeCe','代码格式化失败','1UPzleC','1060970IoBGpE','npx','info','message','代码格式化完成','format','8587029JNBeqi','22686HWTKfz','3997256GMAvcU','7YUlGjR'];a113_0x59fd=function(){return _0x5a6e2e;};return a113_0x59fd();}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x4b74b8){const _0x6b4f9d=a113_0x1638,_0x301b9c=Date['now'](),_0x209fa8=a113_0xbc5683[_0x6b4f9d(0x122)](process['cwd'](),_0x4b74b8);try{logger[_0x6b4f9d(0x128)](_0x6b4f9d(0x12b),_0x6b4f9d(0x131),{'projectCode':_0x4b74b8}),await execa(resolveNpmBin(_0x6b4f9d(0x127)),[_0x6b4f9d(0x136),_0x6b4f9d(0x135),'.'],{'cwd':_0x209fa8});const _0x31bb46=Date[_0x6b4f9d(0x132)]()-_0x301b9c;logger['success'](_0x6b4f9d(0x12b),_0x6b4f9d(0x12a),_0x31bb46,{'projectCode':_0x4b74b8});}catch(_0x5d00f1){const _0x2cda23=Date['now']()-_0x301b9c;logger[_0x6b4f9d(0x137)](_0x6b4f9d(0x12b),_0x6b4f9d(0x124),{'projectCode':_0x4b74b8,'error':_0x5d00f1 instanceof Error?_0x5d00f1[_0x6b4f9d(0x129)]:String(_0x5d00f1),'duration':_0x2cda23});throw _0x5d00f1;}return formatElapsed(_0x301b9c);}
1
+ (function(_0x1076c0,_0x57ee35){const _0x8648fa=a113_0x1a9d,_0x2ebb16=_0x1076c0();while(!![]){try{const _0x324fa4=parseInt(_0x8648fa(0x1d8))/0x1+-parseInt(_0x8648fa(0x1db))/0x2+-parseInt(_0x8648fa(0x1df))/0x3*(-parseInt(_0x8648fa(0x1d2))/0x4)+parseInt(_0x8648fa(0x1d7))/0x5*(parseInt(_0x8648fa(0x1d4))/0x6)+-parseInt(_0x8648fa(0x1e4))/0x7*(-parseInt(_0x8648fa(0x1da))/0x8)+parseInt(_0x8648fa(0x1d9))/0x9*(-parseInt(_0x8648fa(0x1e8))/0xa)+-parseInt(_0x8648fa(0x1e2))/0xb;if(_0x324fa4===_0x57ee35)break;else _0x2ebb16['push'](_0x2ebb16['shift']());}catch(_0x177765){_0x2ebb16['push'](_0x2ebb16['shift']());}}}(a113_0x258b,0x7a41e));import a113_0x246366 from'node:path';import{execa}from'execa';function a113_0x1a9d(_0x3a7d70,_0xd75a6f){_0x3a7d70=_0x3a7d70-0x1d2;const _0x258b6c=a113_0x258b();let _0x1a9d74=_0x258b6c[_0x3a7d70];return _0x1a9d74;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a113_0x258b(){const _0x250301=['--write','resolve','6042520cXFhfj','代码格式化完成','987Temjsg','开始格式化代码','prettier','success','4428890GObqmU','394300yMZrGb','info','1146942zWSmIM','npx','error','10etYldJ','438719CEClaR','9IXDswz','7776mEapZd','310270mBPciy','message','now','代码格式化失败','21vyaGeG'];a113_0x258b=function(){return _0x250301;};return a113_0x258b();}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x1bd58e){const _0x3cbfb2=a113_0x1a9d,_0x309fd8=Date[_0x3cbfb2(0x1dd)](),_0x5be6b9=a113_0x246366[_0x3cbfb2(0x1e1)](process['cwd'](),_0x1bd58e);try{logger[_0x3cbfb2(0x1d3)]('format',_0x3cbfb2(0x1e5),{'projectCode':_0x1bd58e}),await execa(resolveNpmBin(_0x3cbfb2(0x1d5)),[_0x3cbfb2(0x1e6),_0x3cbfb2(0x1e0),'.'],{'cwd':_0x5be6b9});const _0xbf68f4=Date[_0x3cbfb2(0x1dd)]()-_0x309fd8;logger[_0x3cbfb2(0x1e7)]('format',_0x3cbfb2(0x1e3),_0xbf68f4,{'projectCode':_0x1bd58e});}catch(_0x338dd3){const _0x3dabaf=Date[_0x3cbfb2(0x1dd)]()-_0x309fd8;logger[_0x3cbfb2(0x1d6)]('format',_0x3cbfb2(0x1de),{'projectCode':_0x1bd58e,'error':_0x338dd3 instanceof Error?_0x338dd3[_0x3cbfb2(0x1dc)]:String(_0x338dd3),'duration':_0x3dabaf});throw _0x338dd3;}return formatElapsed(_0x309fd8);}
@@ -1 +1 @@
1
- (function(_0x4e35a4,_0x26b753){const _0xcaba37=a114_0x4bf7,_0x38bdbb=_0x4e35a4();while(!![]){try{const _0x58aca2=-parseInt(_0xcaba37(0x1d7))/0x1+parseInt(_0xcaba37(0x1ec))/0x2*(parseInt(_0xcaba37(0x1e5))/0x3)+-parseInt(_0xcaba37(0x1dd))/0x4+parseInt(_0xcaba37(0x1e0))/0x5*(-parseInt(_0xcaba37(0x1dc))/0x6)+parseInt(_0xcaba37(0x1ea))/0x7+-parseInt(_0xcaba37(0x1e8))/0x8+parseInt(_0xcaba37(0x1e6))/0x9;if(_0x58aca2===_0x26b753)break;else _0x38bdbb['push'](_0x38bdbb['shift']());}catch(_0x250d44){_0x38bdbb['push'](_0x38bdbb['shift']());}}}(a114_0x1e0e,0x3a61d));function a114_0x1e0e(){const _0x372d7c=['1048446XWQEJa','info','6VClUla','183943KTELwP','依赖安装失败','--registry','install','依赖安装完成','761892iJDrgl','819324HyTpWp','success','开始安装依赖','15FHStiU','message','error','now','resolve','166959UCNshj','10081188PGPBup','https://registry.npmmirror.com','3424128dcmVjH','cwd'];a114_0x1e0e=function(){return _0x372d7c;};return a114_0x1e0e();}import a114_0x2f2673 from'node:path';function a114_0x4bf7(_0x455531,_0x2d7c9a){_0x455531=_0x455531-0x1d7;const _0x1e0e87=a114_0x1e0e();let _0x4bf7d7=_0x1e0e87[_0x455531];return _0x4bf7d7;}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(_0x1c8676){const _0x1e6ed0=a114_0x4bf7,_0x46db56=Date['now'](),_0x276bd5=a114_0x2f2673[_0x1e6ed0(0x1e4)](process[_0x1e6ed0(0x1e9)](),_0x1c8676);try{logger[_0x1e6ed0(0x1eb)]('install',_0x1e6ed0(0x1df),{'projectCode':_0x1c8676,'registry':_0x1e6ed0(0x1e7)}),await execa(resolveNpmBin('npm'),[_0x1e6ed0(0x1da),_0x1e6ed0(0x1d9),'https://registry.npmmirror.com'],{'cwd':_0x276bd5});const _0x3a4e20=Date[_0x1e6ed0(0x1e3)]()-_0x46db56;logger[_0x1e6ed0(0x1de)](_0x1e6ed0(0x1da),_0x1e6ed0(0x1db),_0x3a4e20,{'projectCode':_0x1c8676});}catch(_0x4b763d){const _0x94fecb=Date[_0x1e6ed0(0x1e3)]()-_0x46db56;logger[_0x1e6ed0(0x1e2)](_0x1e6ed0(0x1da),_0x1e6ed0(0x1d8),{'projectCode':_0x1c8676,'error':_0x4b763d instanceof Error?_0x4b763d[_0x1e6ed0(0x1e1)]:String(_0x4b763d),'duration':_0x94fecb});throw _0x4b763d;}return formatElapsed(_0x46db56);}
1
+ (function(_0x1e4c06,_0x3563cb){const _0x2f6446=a114_0x43a0,_0x1e7127=_0x1e4c06();while(!![]){try{const _0x547cc6=-parseInt(_0x2f6446(0x156))/0x1+-parseInt(_0x2f6446(0x157))/0x2*(parseInt(_0x2f6446(0x147))/0x3)+-parseInt(_0x2f6446(0x14b))/0x4+parseInt(_0x2f6446(0x146))/0x5*(parseInt(_0x2f6446(0x155))/0x6)+-parseInt(_0x2f6446(0x152))/0x7*(-parseInt(_0x2f6446(0x148))/0x8)+-parseInt(_0x2f6446(0x14e))/0x9*(-parseInt(_0x2f6446(0x153))/0xa)+-parseInt(_0x2f6446(0x14f))/0xb;if(_0x547cc6===_0x3563cb)break;else _0x1e7127['push'](_0x1e7127['shift']());}catch(_0x430cc2){_0x1e7127['push'](_0x1e7127['shift']());}}}(a114_0x4f00,0xdce94));function a114_0x43a0(_0x34cea5,_0x122fe5){_0x34cea5=_0x34cea5-0x145;const _0x4f0069=a114_0x4f00();let _0x43a09f=_0x4f0069[_0x34cea5];return _0x43a09f;}function a114_0x4f00(){const _0x9bf096=['18saWZxm','417142oFrNpk','2nzvIBV','resolve','1901635nyghop','2779269mGMGLL','632tISZRs','https://registry.npmmirror.com','--registry','1441960rKRsBw','now','success','108gpCTcY','10846099BqoxiD','开始安装依赖','info','126259DVDiMR','857510Yitjtl','install'];a114_0x4f00=function(){return _0x9bf096;};return a114_0x4f00();}import a114_0x34a0dd 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(_0x1450f9){const _0x41fb50=a114_0x43a0,_0x42aab8=Date[_0x41fb50(0x14c)](),_0x1e39f1=a114_0x34a0dd[_0x41fb50(0x145)](process['cwd'](),_0x1450f9);try{logger[_0x41fb50(0x151)](_0x41fb50(0x154),_0x41fb50(0x150),{'projectCode':_0x1450f9,'registry':_0x41fb50(0x149)}),await execa(resolveNpmBin('npm'),[_0x41fb50(0x154),_0x41fb50(0x14a),_0x41fb50(0x149)],{'cwd':_0x1e39f1});const _0x3be13c=Date[_0x41fb50(0x14c)]()-_0x42aab8;logger[_0x41fb50(0x14d)](_0x41fb50(0x154),'依赖安装完成',_0x3be13c,{'projectCode':_0x1450f9});}catch(_0x59434d){const _0x41b51a=Date[_0x41fb50(0x14c)]()-_0x42aab8;logger['error'](_0x41fb50(0x154),'依赖安装失败',{'projectCode':_0x1450f9,'error':_0x59434d instanceof Error?_0x59434d['message']:String(_0x59434d),'duration':_0x41b51a});throw _0x59434d;}return formatElapsed(_0x42aab8);}
@@ -1 +1 @@
1
- const a115_0x41a25e=a115_0x532c;function a115_0x532c(_0x4d8d52,_0x35a8d4){_0x4d8d52=_0x4d8d52-0x1df;const _0x48f82d=a115_0x48f8();let _0x532c79=_0x48f82d[_0x4d8d52];return _0x532c79;}function a115_0x48f8(){const _0x8b8025=['\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','appcode','Auto-confirm\x20prompts','project','16360sKrYWI','string','43209tFBSoK','../../commands/project/create/non-interactive.js','upgrade','10bHFXKG','trim','nonInteractive','init','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','5901328MZeepf','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','30QsUTQA','280788DUGGRp','706636QlTQjq','2LfkCPd','../../commands/project/create/main.js','str','args','cookie','972538MewXfz','Project\x20name','Skip\x20confirmation\x20prompt','project-name','5QIItuE','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','793NkdPhs','11882629xTElMu','boolean','9bGqaui','bool','Target\x20environment','create','env','yes','Usage:\x20','App\x20code\x20to\x20initialize','write','Initialize\x20.rabetbase.json\x20config\x20in\x20existing\x20project'];a115_0x48f8=function(){return _0x8b8025;};return a115_0x48f8();}(function(_0x204d63,_0x5a0118){const _0x38b37f=a115_0x532c,_0x275856=_0x204d63();while(!![]){try{const _0x22ab29=-parseInt(_0x38b37f(0x1ed))/0x1+parseInt(_0x38b37f(0x1fd))/0x2*(parseInt(_0x38b37f(0x1ef))/0x3)+parseInt(_0x38b37f(0x1fc))/0x4*(-parseInt(_0x38b37f(0x206))/0x5)+parseInt(_0x38b37f(0x1fa))/0x6*(-parseInt(_0x38b37f(0x202))/0x7)+-parseInt(_0x38b37f(0x1f8))/0x8*(parseInt(_0x38b37f(0x1df))/0x9)+-parseInt(_0x38b37f(0x1f2))/0xa*(-parseInt(_0x38b37f(0x209))/0xb)+-parseInt(_0x38b37f(0x1fb))/0xc*(-parseInt(_0x38b37f(0x208))/0xd);if(_0x22ab29===_0x5a0118)break;else _0x275856['push'](_0x275856['shift']());}catch(_0x2aa0e7){_0x275856['push'](_0x275856['shift']());}}}(a115_0x48f8,0xdae72));import{CliErrors}from'../../errors.js';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':'appcode','type':'string','description':a115_0x41a25e(0x1e6)},{'name':a115_0x41a25e(0x1e3),'type':a115_0x41a25e(0x1ee),'description':a115_0x41a25e(0x1e1)},{'name':a115_0x41a25e(0x1e4),'type':a115_0x41a25e(0x20a),'description':a115_0x41a25e(0x1eb),'default':![]}],createFlags=[{'name':'name','type':'string','description':a115_0x41a25e(0x203)},{'name':'env','type':a115_0x41a25e(0x1ee),'description':'Target\x20environment'},{'name':a115_0x41a25e(0x1ea),'type':'string','description':a115_0x41a25e(0x1f6)}],upgradeFlags=[{'name':a115_0x41a25e(0x1e4),'type':a115_0x41a25e(0x20a),'description':a115_0x41a25e(0x204),'default':![]}];export const projectDefinitions=[{'service':a115_0x41a25e(0x1ec),'command':a115_0x41a25e(0x1f5),'description':a115_0x41a25e(0x1e8),'risk':a115_0x41a25e(0x1e7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x4ae009){const _0x57e4c9=a115_0x41a25e;return await initConfig({'appcode':_0x4ae009[_0x57e4c9(0x1ff)](_0x57e4c9(0x1ea))||undefined,'env':_0x4ae009[_0x57e4c9(0x1ff)](_0x57e4c9(0x1e3))||undefined,'autoYes':_0x4ae009['bool'](_0x57e4c9(0x1e4))}),{'ok':!![]};}},{'service':a115_0x41a25e(0x1ec),'command':a115_0x41a25e(0x1e2),'description':'Create\x20a\x20new\x20project','risk':a115_0x41a25e(0x1e7),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a115_0x41a25e(0x205),'description':a115_0x41a25e(0x207),'required':![]}],'flags':createFlags,async 'execute'(_0x20b371){const _0x447d4f=a115_0x41a25e,{createApp:_0x21d20f}=await import(_0x447d4f(0x1fe)),{createProjectNonInteractive:_0x4a13ef}=await import(_0x447d4f(0x1f0)),_0x3c4343=_0x20b371[_0x447d4f(0x1ff)]('name')[_0x447d4f(0x1f3)]()||_0x20b371[_0x447d4f(0x200)][0x0]?.[_0x447d4f(0x1f3)](),_0x496384=_0x20b371['str']('env')||undefined,_0x3a66f7=_0x20b371[_0x447d4f(0x1ff)](_0x447d4f(0x1ea))||undefined;if(_0x20b371['nonInteractive']){if(!_0x3c4343)throw CliErrors['validation'](_0x447d4f(0x1f7),_0x447d4f(0x1e5)+CLI_BIN_NAME+_0x447d4f(0x1e9));await _0x4a13ef(_0x3c4343,_0x496384,_0x3a66f7,_0x20b371[_0x447d4f(0x201)]);}else await _0x21d20f({'projectCode':_0x3c4343,'appCode':_0x3a66f7,'env':_0x496384,'cookie':_0x20b371[_0x447d4f(0x201)]});return{'ok':!![]};}},{'service':a115_0x41a25e(0x1ec),'command':a115_0x41a25e(0x1f1),'description':a115_0x41a25e(0x1f9),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x229518){const _0x43afed=a115_0x41a25e;return await upgradeApp(_0x229518[_0x43afed(0x1f4)],{'yes':_0x229518[_0x43afed(0x1e0)]('yes')}),{'ok':!![]};}}];
1
+ const a115_0x4bf271=a115_0x3b15;function a115_0x3b15(_0x5df3bd,_0x393407){_0x5df3bd=_0x5df3bd-0x14e;const _0x13dd24=a115_0x13dd();let _0x3b15fd=_0x13dd24[_0x5df3bd];return _0x3b15fd;}(function(_0x4da4cc,_0x229992){const _0x3ef697=a115_0x3b15,_0x307420=_0x4da4cc();while(!![]){try{const _0x326bb9=parseInt(_0x3ef697(0x14e))/0x1+-parseInt(_0x3ef697(0x152))/0x2+parseInt(_0x3ef697(0x162))/0x3+parseInt(_0x3ef697(0x160))/0x4*(-parseInt(_0x3ef697(0x168))/0x5)+parseInt(_0x3ef697(0x153))/0x6+parseInt(_0x3ef697(0x165))/0x7+-parseInt(_0x3ef697(0x158))/0x8;if(_0x326bb9===_0x229992)break;else _0x307420['push'](_0x307420['shift']());}catch(_0x53ce13){_0x307420['push'](_0x307420['shift']());}}}(a115_0x13dd,0x2a4b3));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a115_0x13dd(){const _0x3de5b0=['Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','199499WmbpXI','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','write','116536XyOKpY','1745364WIkMyL','project','Initialize\x20.rabetbase.json\x20config\x20in\x20existing\x20project','env','App\x20code\x20to\x20initialize','4198968xMmBAl','yes','str','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','trim','string','project-name','Project\x20name','4gIGUoJ','validation','895680NyLUYy','appcode','Auto-confirm\x20prompts','1980902CzXDZG','args','nonInteractive','1577825XqVonl','bool','name','../../commands/project/create/main.js','Target\x20environment','boolean','../../commands/project/create/non-interactive.js','create','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli'];a115_0x13dd=function(){return _0x3de5b0;};return a115_0x13dd();}import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a115_0x4bf271(0x163),'type':a115_0x4bf271(0x15d),'description':a115_0x4bf271(0x157)},{'name':a115_0x4bf271(0x156),'type':a115_0x4bf271(0x15d),'description':a115_0x4bf271(0x16c)},{'name':a115_0x4bf271(0x159),'type':a115_0x4bf271(0x16d),'description':a115_0x4bf271(0x164),'default':![]}],createFlags=[{'name':a115_0x4bf271(0x16a),'type':a115_0x4bf271(0x15d),'description':a115_0x4bf271(0x15f)},{'name':a115_0x4bf271(0x156),'type':a115_0x4bf271(0x15d),'description':a115_0x4bf271(0x16c)},{'name':a115_0x4bf271(0x163),'type':'string','description':a115_0x4bf271(0x14f)}],upgradeFlags=[{'name':a115_0x4bf271(0x159),'type':a115_0x4bf271(0x16d),'description':'Skip\x20confirmation\x20prompt','default':![]}];export const projectDefinitions=[{'service':a115_0x4bf271(0x154),'command':'init','description':a115_0x4bf271(0x155),'risk':a115_0x4bf271(0x151),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x3a28d6){const _0xd7e30d=a115_0x4bf271;return await initConfig({'appcode':_0x3a28d6[_0xd7e30d(0x15a)](_0xd7e30d(0x163))||undefined,'env':_0x3a28d6[_0xd7e30d(0x15a)]('env')||undefined,'autoYes':_0x3a28d6[_0xd7e30d(0x169)]('yes')}),{'ok':!![]};}},{'service':a115_0x4bf271(0x154),'command':a115_0x4bf271(0x16f),'description':'Create\x20a\x20new\x20project','risk':a115_0x4bf271(0x151),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a115_0x4bf271(0x15e),'description':a115_0x4bf271(0x171),'required':![]}],'flags':createFlags,async 'execute'(_0x366d81){const _0x3861c1=a115_0x4bf271,{createApp:_0x483448}=await import(_0x3861c1(0x16b)),{createProjectNonInteractive:_0x2da4fc}=await import(_0x3861c1(0x16e)),_0x5e2932=_0x366d81[_0x3861c1(0x15a)](_0x3861c1(0x16a))['trim']()||_0x366d81[_0x3861c1(0x166)][0x0]?.[_0x3861c1(0x15c)](),_0x12101a=_0x366d81['str'](_0x3861c1(0x156))||undefined,_0x1e1406=_0x366d81[_0x3861c1(0x15a)](_0x3861c1(0x163))||undefined;if(_0x366d81[_0x3861c1(0x167)]){if(!_0x5e2932)throw CliErrors[_0x3861c1(0x161)](_0x3861c1(0x15b),'Usage:\x20'+CLI_BIN_NAME+_0x3861c1(0x150));await _0x2da4fc(_0x5e2932,_0x12101a,_0x1e1406,_0x366d81['cookie']);}else await _0x483448({'projectCode':_0x5e2932,'appCode':_0x1e1406,'env':_0x12101a,'cookie':_0x366d81['cookie']});return{'ok':!![]};}},{'service':a115_0x4bf271(0x154),'command':'upgrade','description':a115_0x4bf271(0x170),'risk':a115_0x4bf271(0x151),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x3b261d){const _0x37a3a5=a115_0x4bf271;return await upgradeApp(_0x3b261d[_0x37a3a5(0x167)],{'yes':_0x3b261d['bool']('yes')}),{'ok':!![]};}}];
@@ -1 +1 @@
1
- (function(_0x46e578,_0x1ac099){const _0x4a30e2=a116_0x3c7c,_0x4aa638=_0x46e578();while(!![]){try{const _0x29f54e=parseInt(_0x4a30e2(0xa8))/0x1*(parseInt(_0x4a30e2(0x8d))/0x2)+-parseInt(_0x4a30e2(0x8f))/0x3+parseInt(_0x4a30e2(0x9f))/0x4+-parseInt(_0x4a30e2(0x83))/0x5+-parseInt(_0x4a30e2(0xa1))/0x6*(parseInt(_0x4a30e2(0xa0))/0x7)+parseInt(_0x4a30e2(0x9c))/0x8+-parseInt(_0x4a30e2(0x7f))/0x9;if(_0x29f54e===_0x1ac099)break;else _0x4aa638['push'](_0x4aa638['shift']());}catch(_0x1c7975){_0x4aa638['push'](_0x4aa638['shift']());}}}(a116_0x5544,0xaa2a2));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a116_0x4b1c4d from'chalk';function a116_0x3c7c(_0x3aefcd,_0xb4586e){_0x3aefcd=_0x3aefcd-0x7d;const _0x55442f=a116_0x5544();let _0x3c7c8e=_0x55442f[_0x3aefcd];return _0x3c7c8e;}import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../../context.js';import{validateAppcode}from'../../commands/common/validate.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x3b11b9){const _0x32d837=a116_0x3c7c,{appcode:_0x177359,env:_0x38ee7a,autoYes:_0x2d3fbd}=_0x3b11b9,_0xce2525=process['cwd']();if(getProjectConfigPath())throw new Error(_0x32d837(0x8b));let _0x36e33d;for(const _0x5454d4 of LEGACY_CONFIG_NAMES){const _0x214f83=resolve(_0xce2525,_0x5454d4);if(existsSync(_0x214f83)){_0x36e33d=_0x214f83;break;}}if(_0x36e33d){let _0x199d2a={};try{_0x199d2a=JSON[_0x32d837(0x8c)](readFileSync(_0x36e33d,_0x32d837(0x88)));}catch{}const _0xb74af7=basename(_0x36e33d),_0x2ce191=_0x199d2a?.[_0x32d837(0x89)]||_0x199d2a?.[_0x32d837(0x90)];let _0x4d8b92=_0x2d3fbd;!_0x2d3fbd&&(console[_0x32d837(0x87)](a116_0x4b1c4d['yellow'](_0x32d837(0x9d)+a116_0x4b1c4d[_0x32d837(0xa2)](_0xb74af7))),_0x2ce191&&console[_0x32d837(0x87)](a116_0x4b1c4d['cyan'](_0x32d837(0x81)+_0x2ce191)),_0x4d8b92=await confirm({'message':_0x32d837(0xaa)+a116_0x4b1c4d[_0x32d837(0xa2)](_0x32d837(0xa7))+_0x32d837(0x82),'default':!![]}));if(!_0x4d8b92){console[_0x32d837(0x87)](_0x32d837(0x91)+CLI_BIN_NAME+'\x20project\x20init`\x20to\x20start\x20fresh.');return;}const _0x327d4a=resolve(_0xce2525,NEW_CONFIG_NAME),_0x322029=getCliVersionFromPkg(),_0x1efc18=readRawConfig(),_0x4c87d8=_0x177359||(typeof _0x199d2a?.[_0x32d837(0x89)]===_0x32d837(0x9a)?_0x199d2a[_0x32d837(0x89)]:undefined)||(typeof _0x199d2a?.[_0x32d837(0x90)]===_0x32d837(0x9a)?_0x199d2a[_0x32d837(0x90)]:undefined)||await askAppcode(),_0xde1013=typeof _0x199d2a?.[_0x32d837(0x92)]==='string'?_0x199d2a['env']:typeof _0x1efc18['env']==='string'?_0x1efc18[_0x32d837(0x92)]:_0x32d837(0xad),_0x3047b0=buildCanonicalProjectConfig({..._0x1efc18,..._0x199d2a},{'appCodes':[_0x4c87d8],'env':_0xde1013,'metadata':{'version':_0x322029,'migratedAt':new Date()['toLocaleString'](),'migratedFrom':_0x36e33d}});writeConfigFile(_0x327d4a,_0x3047b0);const _0x4490d4=_0x36e33d+'.bak';renameSync(_0x36e33d,_0x4490d4),logger[_0x32d837(0x85)](_0xce2525),logger[_0x32d837(0x9b)]('init',_0x32d837(0xa3),{'from':_0x36e33d,'to':_0x327d4a,'appcode':_0x4c87d8,'env':_0x3047b0[_0x32d837(0x92)]}),console['log'](a116_0x4b1c4d[_0x32d837(0x84)](_0x32d837(0x95)+_0xb74af7+'\x20→\x20.rabetbase.json')),console[_0x32d837(0x87)](a116_0x4b1c4d[_0x32d837(0x96)]('\x20\x20Apps:\x20'+Object[_0x32d837(0xae)](_0x3047b0[_0x32d837(0x8a)]||{})[_0x32d837(0x80)](',\x20'))),console['log'](a116_0x4b1c4d[_0x32d837(0x96)](_0x32d837(0x94)+_0x3047b0[_0x32d837(0x99)])),console[_0x32d837(0x87)](a116_0x4b1c4d[_0x32d837(0xa4)]('\x20\x20Old\x20file\x20backed\x20up\x20as\x20'+_0xb74af7+_0x32d837(0x98)));return;}const _0x58f94c=_0x177359||await askAppcode(),_0x452efa=resolve(_0xce2525,NEW_CONFIG_NAME),_0x48626c=getCliVersionFromPkg(),_0x2d0b7=readRawConfig(),_0x1edd44=typeof _0x2d0b7[_0x32d837(0x92)]==='string'?_0x2d0b7['env']:undefined,_0x141873=buildCanonicalProjectConfig({},{'appCodes':[_0x58f94c],'env':_0x38ee7a||_0x1edd44||_0x32d837(0xad),'metadata':{'version':_0x48626c,'createdAt':new Date()[_0x32d837(0xa5)]()}});writeConfigFile(_0x452efa,_0x141873),logger['setLogPath'](_0xce2525),logger['info'](_0x32d837(0x93),_0x32d837(0xa6),{'appcode':_0x58f94c,'env':_0x141873['env'],'version':_0x141873[_0x32d837(0xac)],'configPath':_0x452efa}),console[_0x32d837(0x87)](a116_0x4b1c4d['green'](_0x32d837(0x8e))),console['log'](a116_0x4b1c4d['cyan']('\x20\x20Apps:\x20'+Object['keys'](_0x141873[_0x32d837(0x8a)]||{})[_0x32d837(0x80)](',\x20'))),console[_0x32d837(0x87)](a116_0x4b1c4d['cyan'](_0x32d837(0x94)+_0x141873[_0x32d837(0x99)])),console[_0x32d837(0x87)]('\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27'+CLI_BIN_NAME+'\x20api\x20generate\x27\x20and\x20\x27'+CLI_BIN_NAME+'\x20api\x20pull\x27');}function askAppcode(){const _0x9bdbdd=a116_0x3c7c;return input({'message':_0x9bdbdd(0x86),'validate':_0x4572f4=>{const _0x16fe56=_0x9bdbdd;if(!_0x4572f4[_0x16fe56(0x7e)]())return _0x16fe56(0xab);const {valid:_0xe60dc3,message:_0x49eddb}=validateAppcode(_0x4572f4['trim']());return _0xe60dc3||_0x49eddb||_0x16fe56(0x9e);}});}function a116_0x5544(){const _0x8d545f=['production','keys','../..','trim','1815354gtAwpD','join','\x20\x20appcode:\x20','?\x20(Old\x20file\x20→\x20*.bak)','2371455erbKwa','green','setLogPath','Please\x20enter\x20App\x20Code:','log','utf8','appcode','apps','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','parse','2XjtojQ','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','800796MfJsuj','app','Migration\x20cancelled.\x20Run\x20`','env','init','\x20\x20Default:\x20','✓\x20Upgraded\x20','cyan','1.0.0','.bak','defaultApp','string','info','8367672nVlgvP','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','Invalid\x20App\x20Code','1248976HECQlx','7xDdrtb','3790788EJJQvj','bold','从旧配置文件升级成功','gray','toLocaleString','初始化项目配置文件成功','.rabetbase.json','913518DSYXqI','package.json','Upgrade\x20it\x20to\x20','App\x20Code\x20cannot\x20be\x20empty','version'];a116_0x5544=function(){return _0x8d545f;};return a116_0x5544();}function getCliVersionFromPkg(){const _0x39c3f6=a116_0x3c7c;try{const _0x3878d8=fileURLToPath(import.meta.url),_0x2eb48d=resolve(dirname(_0x3878d8),_0x39c3f6(0x7d)),_0x1547d8=JSON[_0x39c3f6(0x8c)](readFileSync(resolve(_0x2eb48d,_0x39c3f6(0xa9)),'utf8'));return _0x1547d8[_0x39c3f6(0xac)]||_0x39c3f6(0x97);}catch{return _0x39c3f6(0x97);}}
1
+ function a116_0x2979(){const _0x26d6f4=['30SiGSTI','trim','\x20\x20Default:\x20','110271NGLaUi','1890456oUeWtV','Upgrade\x20it\x20to\x20','join','✓\x20Upgraded\x20','481194BlgQsh','cyan','setLogPath','utf8','\x20\x20appcode:\x20','package.json','version','687376QnNnqo','\x20api\x20generate\x27\x20and\x20\x27','1BMwadd','?\x20(Old\x20file\x20→\x20*.bak)','30XYMKvv','log','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','1.0.0','Invalid\x20App\x20Code','parse','yellow','env','.bak','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','appcode','.rabetbase.json','green','\x20\x20Apps:\x20','string','app','初始化项目配置文件成功','App\x20Code\x20cannot\x20be\x20empty','\x20api\x20pull\x27','97875aSoHJU','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','../..','bold','cwd','1695796dQFtPt','apps','keys','init','defaultApp','1920856gpPuDS','info','toLocaleString','production','\x20project\x20init`\x20to\x20start\x20fresh.','\x20→\x20.rabetbase.json'];a116_0x2979=function(){return _0x26d6f4;};return a116_0x2979();}(function(_0xe9ff91,_0x3756ef){const _0x51a972=a116_0x4bdd,_0x5dc33f=_0xe9ff91();while(!![]){try{const _0x22856b=parseInt(_0x51a972(0xca))/0x1*(-parseInt(_0x51a972(0xc8))/0x2)+-parseInt(_0x51a972(0xf2))/0x3+parseInt(_0x51a972(0xe4))/0x4+parseInt(_0x51a972(0xdf))/0x5*(parseInt(_0x51a972(0xcc))/0x6)+-parseInt(_0x51a972(0xe9))/0x7+parseInt(_0x51a972(0xbd))/0x8+parseInt(_0x51a972(0xc1))/0x9*(parseInt(_0x51a972(0xef))/0xa);if(_0x22856b===_0x3756ef)break;else _0x5dc33f['push'](_0x5dc33f['shift']());}catch(_0x179dc6){_0x5dc33f['push'](_0x5dc33f['shift']());}}}(a116_0x2979,0x405fc));function a116_0x4bdd(_0x180f13,_0x1eff22){_0x180f13=_0x180f13-0xbd;const _0x297998=a116_0x2979();let _0x4bdde6=_0x297998[_0x180f13];return _0x4bdde6;}import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a116_0xb15959 from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../../context.js';import{validateAppcode}from'../../commands/common/validate.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x16e6da){const _0x43ef2b=a116_0x4bdd,{appcode:_0x1e4740,env:_0x1a7391,autoYes:_0x5ba501}=_0x16e6da,_0x4c7a2b=process[_0x43ef2b(0xe3)]();if(getProjectConfigPath())throw new Error('.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.');let _0x158bc3;for(const _0x5c0fd7 of LEGACY_CONFIG_NAMES){const _0x1862a6=resolve(_0x4c7a2b,_0x5c0fd7);if(existsSync(_0x1862a6)){_0x158bc3=_0x1862a6;break;}}if(_0x158bc3){let _0x57893d={};try{_0x57893d=JSON[_0x43ef2b(0xd1)](readFileSync(_0x158bc3,_0x43ef2b(0xc4)));}catch{}const _0x27c3ee=basename(_0x158bc3),_0x5d9e66=_0x57893d?.[_0x43ef2b(0xd6)]||_0x57893d?.[_0x43ef2b(0xdb)];let _0x1bfda6=_0x5ba501;!_0x5ba501&&(console[_0x43ef2b(0xcd)](a116_0xb15959[_0x43ef2b(0xd2)](_0x43ef2b(0xd5)+a116_0xb15959[_0x43ef2b(0xe2)](_0x27c3ee))),_0x5d9e66&&console['log'](a116_0xb15959['cyan'](_0x43ef2b(0xc5)+_0x5d9e66)),_0x1bfda6=await confirm({'message':_0x43ef2b(0xbe)+a116_0xb15959[_0x43ef2b(0xe2)](_0x43ef2b(0xd7))+_0x43ef2b(0xcb),'default':!![]}));if(!_0x1bfda6){console[_0x43ef2b(0xcd)]('Migration\x20cancelled.\x20Run\x20`'+CLI_BIN_NAME+_0x43ef2b(0xed));return;}const _0x2e84d8=resolve(_0x4c7a2b,NEW_CONFIG_NAME),_0x2f5d64=getCliVersionFromPkg(),_0xba6f5=readRawConfig(),_0x1d829f=_0x1e4740||(typeof _0x57893d?.[_0x43ef2b(0xd6)]===_0x43ef2b(0xda)?_0x57893d[_0x43ef2b(0xd6)]:undefined)||(typeof _0x57893d?.['app']===_0x43ef2b(0xda)?_0x57893d[_0x43ef2b(0xdb)]:undefined)||await askAppcode(),_0x468cf3=typeof _0x57893d?.[_0x43ef2b(0xd3)]===_0x43ef2b(0xda)?_0x57893d[_0x43ef2b(0xd3)]:typeof _0xba6f5['env']==='string'?_0xba6f5['env']:_0x43ef2b(0xec),_0x2447fe=buildCanonicalProjectConfig({..._0xba6f5,..._0x57893d},{'appCodes':[_0x1d829f],'env':_0x468cf3,'metadata':{'version':_0x2f5d64,'migratedAt':new Date()[_0x43ef2b(0xeb)](),'migratedFrom':_0x158bc3}});writeConfigFile(_0x2e84d8,_0x2447fe);const _0x58de24=_0x158bc3+_0x43ef2b(0xd4);renameSync(_0x158bc3,_0x58de24),logger[_0x43ef2b(0xc3)](_0x4c7a2b),logger[_0x43ef2b(0xea)](_0x43ef2b(0xe7),'从旧配置文件升级成功',{'from':_0x158bc3,'to':_0x2e84d8,'appcode':_0x1d829f,'env':_0x2447fe[_0x43ef2b(0xd3)]}),console[_0x43ef2b(0xcd)](a116_0xb15959[_0x43ef2b(0xd8)](_0x43ef2b(0xc0)+_0x27c3ee+_0x43ef2b(0xee))),console['log'](a116_0xb15959[_0x43ef2b(0xc2)](_0x43ef2b(0xd9)+Object[_0x43ef2b(0xe6)](_0x2447fe[_0x43ef2b(0xe5)]||{})[_0x43ef2b(0xbf)](',\x20'))),console[_0x43ef2b(0xcd)](a116_0xb15959[_0x43ef2b(0xc2)]('\x20\x20Default:\x20'+_0x2447fe['defaultApp'])),console['log'](a116_0xb15959['gray']('\x20\x20Old\x20file\x20backed\x20up\x20as\x20'+_0x27c3ee+_0x43ef2b(0xd4)));return;}const _0x34f0f7=_0x1e4740||await askAppcode(),_0x2f744c=resolve(_0x4c7a2b,NEW_CONFIG_NAME),_0x5ddecf=getCliVersionFromPkg(),_0x4cd6e8=readRawConfig(),_0x1fe75c=typeof _0x4cd6e8['env']===_0x43ef2b(0xda)?_0x4cd6e8[_0x43ef2b(0xd3)]:undefined,_0x400a1f=buildCanonicalProjectConfig({},{'appCodes':[_0x34f0f7],'env':_0x1a7391||_0x1fe75c||_0x43ef2b(0xec),'metadata':{'version':_0x5ddecf,'createdAt':new Date()[_0x43ef2b(0xeb)]()}});writeConfigFile(_0x2f744c,_0x400a1f),logger[_0x43ef2b(0xc3)](_0x4c7a2b),logger[_0x43ef2b(0xea)]('init',_0x43ef2b(0xdc),{'appcode':_0x34f0f7,'env':_0x400a1f['env'],'version':_0x400a1f[_0x43ef2b(0xc7)],'configPath':_0x2f744c}),console['log'](a116_0xb15959['green'](_0x43ef2b(0xce))),console[_0x43ef2b(0xcd)](a116_0xb15959[_0x43ef2b(0xc2)](_0x43ef2b(0xd9)+Object[_0x43ef2b(0xe6)](_0x400a1f[_0x43ef2b(0xe5)]||{})[_0x43ef2b(0xbf)](',\x20'))),console[_0x43ef2b(0xcd)](a116_0xb15959[_0x43ef2b(0xc2)](_0x43ef2b(0xf1)+_0x400a1f[_0x43ef2b(0xe8)])),console[_0x43ef2b(0xcd)](_0x43ef2b(0xe0)+CLI_BIN_NAME+_0x43ef2b(0xc9)+CLI_BIN_NAME+_0x43ef2b(0xde));}function askAppcode(){return input({'message':'Please\x20enter\x20App\x20Code:','validate':_0x48c6d8=>{const _0x2b9407=a116_0x4bdd;if(!_0x48c6d8[_0x2b9407(0xf0)]())return _0x2b9407(0xdd);const {valid:_0x3017e7,message:_0x3abadb}=validateAppcode(_0x48c6d8[_0x2b9407(0xf0)]());return _0x3017e7||_0x3abadb||_0x2b9407(0xd0);}});}function getCliVersionFromPkg(){const _0x120385=a116_0x4bdd;try{const _0x12666c=fileURLToPath(import.meta.url),_0x2dee63=resolve(dirname(_0x12666c),_0x120385(0xe1)),_0x4c8b04=JSON[_0x120385(0xd1)](readFileSync(resolve(_0x2dee63,_0x120385(0xc6)),_0x120385(0xc4)));return _0x4c8b04[_0x120385(0xc7)]||_0x120385(0xcf);}catch{return _0x120385(0xcf);}}
@@ -1 +1 @@
1
- (function(_0x10093b,_0x422c9f){const _0x230690=a117_0x22cd,_0x3c4aee=_0x10093b();while(!![]){try{const _0x1866af=-parseInt(_0x230690(0x212))/0x1+-parseInt(_0x230690(0x1fb))/0x2+parseInt(_0x230690(0x1fe))/0x3*(-parseInt(_0x230690(0x203))/0x4)+-parseInt(_0x230690(0x1a5))/0x5*(parseInt(_0x230690(0x1c7))/0x6)+-parseInt(_0x230690(0x202))/0x7*(-parseInt(_0x230690(0x1d9))/0x8)+-parseInt(_0x230690(0x1a4))/0x9*(parseInt(_0x230690(0x19f))/0xa)+parseInt(_0x230690(0x20e))/0xb;if(_0x1866af===_0x422c9f)break;else _0x3c4aee['push'](_0x3c4aee['shift']());}catch(_0x29f512){_0x3c4aee['push'](_0x3c4aee['shift']());}}}(a117_0x42f4,0x6d831));import a117_0x435e8d from'chalk';import a117_0x154fa2 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0x48a68e=>_0x48a68e!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x918ce6){const _0x49c61c=a117_0x22cd,_0xcf416c=[];for(const _0x1ad336 of Object[_0x49c61c(0x205)](CORE_IDE_CONFIGS)){if(_0x1ad336[_0x49c61c(0x1c6)])for(const _0x352fff of _0x1ad336[_0x49c61c(0x1c6)]){_0xcf416c[_0x49c61c(0x1ff)](resolve(_0x918ce6,_0x352fff[_0x49c61c(0x1d4)]));}}return _0xcf416c;}function analyse(_0x459f1c){const _0x548987=a117_0x22cd;let _0xf9c92d=null;const _0x15ce11=resolve(_0x459f1c,NEW_CONFIG_NAME),_0x118b7b=existsSync(_0x15ce11);for(const _0x3b90bf of LEGACY_CONFIG_NAMES){const _0x1a548c=resolve(_0x459f1c,_0x3b90bf);if(existsSync(_0x1a548c)){const _0x54038d=readConfigFile(_0x1a548c),_0x1f33ea=Object['keys'](_0x54038d)['filter'](_0x2b1137=>typeof _0x54038d[_0x2b1137]!==_0x548987(0x1b4));_0xf9c92d={'oldPath':_0x1a548c,'hasNewConfig':_0x118b7b,'fields':_0x1f33ea};break;}}const _0x508a35=[],_0x139b70=resolve(_0x459f1c,_0x548987(0x1cb));if(existsSync(_0x139b70))_0x508a35[_0x548987(0x1ff)](_0x139b70);const _0x33a248=resolve(_0x459f1c,_0x548987(0x201));if(existsSync(_0x33a248))_0x508a35[_0x548987(0x1ff)](_0x33a248);const _0x4b6706=resolve(_0x459f1c,_0x548987(0x1df));if(existsSync(_0x4b6706))_0x508a35[_0x548987(0x1ff)](_0x4b6706);for(const _0x11cc7d of collectIdeSkillFiles(_0x459f1c)){if(existsSync(_0x11cc7d))_0x508a35['push'](_0x11cc7d);}let _0x2e503d=null;const _0x1df22e=resolve(_0x459f1c,'.cursor/mcp.json');if(existsSync(_0x1df22e))try{const _0x4ea31b=JSON[_0x548987(0x219)](readFileSync(_0x1df22e,'utf8'));if(_0x4ea31b?.['mcpServers']&&typeof _0x4ea31b[_0x548987(0x1f6)]===_0x548987(0x1c2)){const _0xe61f8f=[];for(const [_0x50765a,_0x1f85b5]of Object[_0x548987(0x1ec)](_0x4ea31b[_0x548987(0x1f6)])){const _0xa7784e=_0x1f85b5;_0xa7784e?.[_0x548987(0x1b9)]&&Array['isArray'](_0xa7784e[_0x548987(0x1b9)])&&_0xa7784e[_0x548987(0x1b9)]['some'](_0x46b8d4=>typeof _0x46b8d4===_0x548987(0x1c9)&&_0x46b8d4['includes']('@lovrabet/dataset-mcp-server'))&&_0xe61f8f[_0x548987(0x1ff)](_0x50765a);}_0xe61f8f['length']>0x0&&(_0x2e503d={'path':_0x1df22e,'keys':_0xe61f8f});}}catch{}const _0x586e2b=_0x508a35[_0x548987(0x1e0)]>0x0||_0xf9c92d!==null;let _0x305996=null;const _0x1c26ee=resolve(_0x459f1c,'package.json');if(existsSync(_0x1c26ee))try{const _0xec61c9=JSON[_0x548987(0x219)](readFileSync(_0x1c26ee,_0x548987(0x214)));for(const _0x3dd7aa of[_0x548987(0x1cd),_0x548987(0x1d8)]){const _0x5bcdba=_0xec61c9?.[_0x3dd7aa]?.[_0x548987(0x1b0)];if(typeof _0x5bcdba===_0x548987(0x1c9)){_0x5bcdba!==_0x548987(0x1c0)&&(_0x305996={'pkgPath':_0x1c26ee,'currentVersion':_0x5bcdba,'field':_0x3dd7aa});break;}}}catch{}return{'configMigration':_0xf9c92d,'oldArtifacts':_0x508a35,'oldMcpConfig':_0x2e503d,'needsSkillSwap':_0x586e2b,'sdkUpgrade':_0x305996};}function printReport(_0x8987ee){const _0x6cbfb7=a117_0x22cd,{configMigration:_0x4a5874,oldArtifacts:_0x569990,oldMcpConfig:_0x103dfa,needsSkillSwap:_0x37b215}=_0x8987ee;console[_0x6cbfb7(0x1b5)](''),console['log'](a117_0x435e8d[_0x6cbfb7(0x213)](_0x6cbfb7(0x19e))),console['log']('');_0x4a5874?(console[_0x6cbfb7(0x1b5)](a117_0x435e8d[_0x6cbfb7(0x1b8)](_0x6cbfb7(0x204))+('\x20\x20'+a117_0x435e8d[_0x6cbfb7(0x1f5)](_0x4a5874[_0x6cbfb7(0x1a2)]))),console['log'](_0x6cbfb7(0x20c)+(_0x4a5874[_0x6cbfb7(0x1fd)]?a117_0x435e8d['green']('already\x20exists\x20(will\x20merge)'):a117_0x435e8d[_0x6cbfb7(0x1bd)](_0x6cbfb7(0x210)))),console['log'](_0x6cbfb7(0x1ab)+_0x4a5874[_0x6cbfb7(0x1d1)]['join'](',\x20')),console[_0x6cbfb7(0x1b5)](_0x6cbfb7(0x1bb))):console[_0x6cbfb7(0x1b5)](a117_0x435e8d[_0x6cbfb7(0x1b8)](_0x6cbfb7(0x204))+'\x20\x20'+a117_0x435e8d[_0x6cbfb7(0x1bd)](_0x6cbfb7(0x1ed)));console[_0x6cbfb7(0x1b5)]('');if(_0x569990[_0x6cbfb7(0x1e0)]>0x0){console['log'](a117_0x435e8d['cyan'](_0x6cbfb7(0x1e6)));for(const _0x37ece1 of _0x569990){console['log']('\x20\x20'+a117_0x435e8d['red'](_0x6cbfb7(0x1ee))+'\x20\x20'+_0x37ece1);}console[_0x6cbfb7(0x1b5)](_0x6cbfb7(0x1bf));}else console[_0x6cbfb7(0x1b5)](a117_0x435e8d[_0x6cbfb7(0x1b8)](_0x6cbfb7(0x1e6))+'\x20\x20'+a117_0x435e8d[_0x6cbfb7(0x1bd)](_0x6cbfb7(0x1c4)));console[_0x6cbfb7(0x1b5)]('');_0x103dfa?(console[_0x6cbfb7(0x1b5)](a117_0x435e8d[_0x6cbfb7(0x1b8)](_0x6cbfb7(0x1d6))+('\x20\x20'+a117_0x435e8d['yellow'](_0x103dfa[_0x6cbfb7(0x1d4)])+_0x6cbfb7(0x1ae)+_0x103dfa['keys'][_0x6cbfb7(0x19c)](',\x20'))),console[_0x6cbfb7(0x1b5)]('\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server')):console[_0x6cbfb7(0x1b5)](a117_0x435e8d[_0x6cbfb7(0x1b8)](_0x6cbfb7(0x1d6))+'\x20\x20'+a117_0x435e8d[_0x6cbfb7(0x1bd)]('no\x20legacy\x20entry'));console[_0x6cbfb7(0x1b5)](''),console[_0x6cbfb7(0x1b5)](a117_0x435e8d['cyan'](_0x6cbfb7(0x1f1))+('\x20\x20'+(_0x37b215?a117_0x435e8d[_0x6cbfb7(0x1f5)]('needed'):a117_0x435e8d[_0x6cbfb7(0x1a8)](_0x6cbfb7(0x1da)))));_0x37b215&&console[_0x6cbfb7(0x1b5)](_0x6cbfb7(0x1b1)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x6cbfb7(0x1b5)]('');if(_0x8987ee[_0x6cbfb7(0x1f7)]){const {currentVersion:_0x80ae66,field:_0x18477d,pkgPath:_0x3266ea}=_0x8987ee['sdkUpgrade'];console[_0x6cbfb7(0x1b5)](a117_0x435e8d[_0x6cbfb7(0x1b8)](_0x6cbfb7(0x1ba))+('\x20\x20'+a117_0x435e8d[_0x6cbfb7(0x1f5)](_0x3266ea))),console[_0x6cbfb7(0x1b5)](_0x6cbfb7(0x217)+_0x18477d+':\x20'+a117_0x435e8d[_0x6cbfb7(0x1f5)](_0x80ae66)+_0x6cbfb7(0x1dc)+a117_0x435e8d[_0x6cbfb7(0x1a8)](_0x6cbfb7(0x1c0))),console[_0x6cbfb7(0x1b5)](_0x6cbfb7(0x218));}else console['log'](a117_0x435e8d[_0x6cbfb7(0x1b8)](_0x6cbfb7(0x1ba))+'\x20\x20'+a117_0x435e8d['gray'](_0x6cbfb7(0x1a3)));console[_0x6cbfb7(0x1b5)]('');}function execConfigMigration(_0x4e3f53,_0x31b715){const _0x24b308=a117_0x22cd,{configMigration:_0x51ae41}=_0x4e3f53;if(!_0x51ae41?.[_0x24b308(0x1a2)])return{'step':0x1,'label':_0x24b308(0x1b2),'ok':!![],'detail':_0x24b308(0x1d7)};const _0x54f1be=readConfigFile(_0x51ae41[_0x24b308(0x1a2)]),_0x1bb06c=resolve(_0x31b715,NEW_CONFIG_NAME),_0x560264=_0x51ae41[_0x24b308(0x1fd)]?readConfigFile(_0x1bb06c):{};for(const [_0x1443eb,_0x12810b]of Object[_0x24b308(0x1ec)](_0x54f1be)){!(_0x1443eb in _0x560264)&&(_0x560264[_0x1443eb]=_0x12810b);}writeConfigFile(_0x1bb06c,_0x560264);const _0x272e20=_0x51ae41[_0x24b308(0x1a2)]+'.bak';return renameSync(_0x51ae41['oldPath'],_0x272e20),{'step':0x1,'label':_0x24b308(0x1b2),'ok':!![],'detail':_0x51ae41['oldPath']+'\x20→\x20'+_0x1bb06c+_0x24b308(0x1d0)+_0x272e20+')'};}function execRemoveOldArtifacts(_0x3b47cd){const _0x167dbc=a117_0x22cd,_0x12714b=[];for(const _0x1b565a of _0x3b47cd){try{if(!existsSync(_0x1b565a))continue;const _0x2dbef6=tryStat(_0x1b565a);_0x2dbef6?.[_0x167dbc(0x1ac)]()?rmSync(_0x1b565a,{'recursive':!![],'force':!![]}):unlinkSync(_0x1b565a);}catch(_0x22b9ba){_0x12714b[_0x167dbc(0x1ff)](_0x1b565a+':\x20'+_0x22b9ba[_0x167dbc(0x1de)]);}}return{'step':0x3,'label':'Remove\x20legacy\x20artifacts','ok':_0x12714b[_0x167dbc(0x1e0)]===0x0,'detail':_0x12714b[_0x167dbc(0x1e0)]>0x0?_0x3b47cd[_0x167dbc(0x1e0)]-_0x12714b['length']+'/'+_0x3b47cd[_0x167dbc(0x1e0)]+'\x20removed\x20('+_0x12714b[_0x167dbc(0x19c)](';\x20')+')':_0x3b47cd[_0x167dbc(0x1e0)]+_0x167dbc(0x1eb)};}function execCleanMcp(_0x228778){const _0x5c26aa=a117_0x22cd;if(!_0x228778[_0x5c26aa(0x216)])return{'step':0x4,'label':_0x5c26aa(0x19d),'ok':!![],'detail':_0x5c26aa(0x1e1)};try{const _0x48444b=readFileSync(_0x228778['oldMcpConfig'][_0x5c26aa(0x1d4)],_0x5c26aa(0x214)),_0x1fe1a6=JSON[_0x5c26aa(0x219)](_0x48444b);if(_0x1fe1a6?.[_0x5c26aa(0x1f6)]&&typeof _0x1fe1a6[_0x5c26aa(0x1f6)]===_0x5c26aa(0x1c2)){const _0x72dbf=[];for(const [_0x2d1289,_0x1f2572]of Object['entries'](_0x1fe1a6[_0x5c26aa(0x1f6)])){_0x1f2572?.[_0x5c26aa(0x1b9)]&&Array[_0x5c26aa(0x20d)](_0x1f2572[_0x5c26aa(0x1b9)])&&_0x1f2572[_0x5c26aa(0x1b9)][_0x5c26aa(0x1b6)](_0x166156=>typeof _0x166156===_0x5c26aa(0x1c9)&&_0x166156[_0x5c26aa(0x1b3)]('@lovrabet/dataset-mcp-server'))&&_0x72dbf[_0x5c26aa(0x1ff)](_0x2d1289);}for(const _0x178001 of _0x72dbf){delete _0x1fe1a6[_0x5c26aa(0x1f6)][_0x178001];}return _0x72dbf[_0x5c26aa(0x1e0)]>0x0&&writeFileSync(_0x228778[_0x5c26aa(0x216)][_0x5c26aa(0x1d4)],JSON['stringify'](_0x1fe1a6,null,0x2)+'\x0a',_0x5c26aa(0x214)),{'step':0x4,'label':_0x5c26aa(0x19d),'ok':!![],'detail':'removed\x20'+_0x72dbf[_0x5c26aa(0x19c)](',\x20')+'\x20from\x20'+_0x228778[_0x5c26aa(0x216)][_0x5c26aa(0x1d4)]};}return{'step':0x4,'label':_0x5c26aa(0x19d),'ok':!![],'detail':_0x5c26aa(0x1b7)};}catch(_0x4d74c6){return{'step':0x4,'label':_0x5c26aa(0x19d),'ok':![],'detail':_0x4d74c6['message']};}}function a117_0x42f4(){const _0x16ea51=['Step\x201/7:\x20Migrating\x20config...','Upgrade\x20@lovrabet/sdk','\x20\x20\x20\x20\x20\x20\x20','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','step','Proceed\x20with\x20upgrade?','\x20\x20New\x20config\x20(.rabetbase.json):\x20','isArray','33480502kDneGl','red','not\x20found\x20(will\x20create)','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','852611GEjBBT','bold','utf8','lovrabet/lovrabet-skill\x20removed','oldMcpConfig','\x20\x20Current\x20version\x20in\x20','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','parse','oldArtifacts','join','Clean\x20MCP\x20config','===\x20Upgrade\x20Analysis\x20===','10jSDYea','start','status','oldPath','not\x20found\x20or\x20already\x20at\x20latest','6354756yavEDJ','5FpTeML','Install\x20new\x20skill','cwd','green','info','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','\x20\x20Fields\x20to\x20migrate:\x20','isDirectory','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','\x20→\x20keys:\x20','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','@lovrabet/sdk','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','Config\x20migration','includes','undefined','log','some','no\x20matching\x20entry\x20found','cyan','args','@lovrabet/sdk:','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','gray','inherit','\x20\x20Action:\x20delete','latest','detail','object','fail','none\x20found','lovrabet/rabetbase\x20installed\x20globally','files','2081976PsfnhQ','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','string','configMigration','.lovrabet','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','dependencies','Step\x206/7:\x20Installing\x20new\x20skill...','===\x20Upgrade\x20Summary\x20===','\x20(backup:\x20','fields','succeed','\x20\x20npm\x20install','path','error','MCP\x20config:','skipped\x20(no\x20legacy\x20config)','devDependencies','8NtMhHW','not\x20needed','\x20\x20Step\x20','\x20→\x20','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','message','.claude/skills/lovrabet','length','skipped','Remove\x20.lovrabet/','done','Step\x204/7:\x20Cleaning\x20MCP\x20config...','label','Legacy\x20artifacts:','failed','\x20\x20#\x20or','needsSkillSwap','Step\x204/7:\x20MCP\x20config\x20—\x20','\x20removed','entries','no\x20legacy\x20config\x20found','FOUND','Remove\x20old\x20skill','FAIL','Skill\x20swap:','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','Upgrade\x20cancelled.','yellow','mcpServers','sdkUpgrade','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','exit\x20','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','1326600WGRwpS','Upgrade\x20completed\x20successfully!','hasNewConfig','859458MvuMeg','push','white','.cursor/rules/lovrabet_rules.mdc','1822492MEwcre','4gYiEPD','Config\x20file:','values'];a117_0x42f4=function(){return _0x16ea51;};return a117_0x42f4();}function execSkillsRemove(_0x4a0e27,_0x13d833){const _0x280f7c=a117_0x22cd,_0x29d43d=runNpxSkillsRemove(_0x4a0e27,{'stdio':_0x280f7c(0x1be),'yes':_0x13d833});return{'step':0x5,'label':_0x280f7c(0x1ef),'ok':_0x29d43d['ok'],'detail':_0x29d43d['ok']?_0x280f7c(0x215):_0x29d43d[_0x280f7c(0x1d5)]??_0x280f7c(0x1f9)+_0x29d43d[_0x280f7c(0x1a1)]};}function execSkillsAdd(_0xfdd563,_0x48b3f5){const _0x4c7b44=a117_0x22cd,_0x33308a=runNpxSkillsAddGlobal(_0xfdd563,'lovrabet/rabetbase',{'stdio':_0x4c7b44(0x1be),'yes':_0x48b3f5});return{'step':0x6,'label':_0x4c7b44(0x1a6),'ok':_0x33308a['ok'],'detail':_0x33308a['ok']?_0x4c7b44(0x1c5):_0x33308a['error']??_0x4c7b44(0x1f9)+_0x33308a[_0x4c7b44(0x1a1)]};}function execUpgradeSdk(_0x323859){const _0xb9ae40=a117_0x22cd;if(!_0x323859['sdkUpgrade'])return{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0xb9ae40(0x1fa)};const {pkgPath:_0x25d906,currentVersion:_0x110fee,field:_0x8b861e}=_0x323859[_0xb9ae40(0x1f7)];try{const _0x2b239f=readFileSync(_0x25d906,_0xb9ae40(0x214)),_0x2455ec=JSON[_0xb9ae40(0x219)](_0x2b239f);return _0x2455ec[_0x8b861e][_0xb9ae40(0x1b0)]=_0xb9ae40(0x1c0),writeFileSync(_0x25d906,JSON['stringify'](_0x2455ec,null,0x2)+'\x0a',_0xb9ae40(0x214)),{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0x8b861e+'[\x22@lovrabet/sdk\x22]:\x20'+_0x110fee+'\x20→\x20latest'};}catch(_0x1cac18){return{'step':0x7,'label':_0xb9ae40(0x207),'ok':![],'detail':_0x1cac18[_0xb9ae40(0x1de)]};}}function tryStat(_0x268b5c){try{return statSync(_0x268b5c);}catch{return undefined;}}function a117_0x22cd(_0x26a425,_0xe560de){_0x26a425=_0x26a425-0x19c;const _0x42f444=a117_0x42f4();let _0x22cdc6=_0x42f444[_0x26a425];return _0x22cdc6;}function printSummary(_0x194593){const _0x59eb55=a117_0x22cd;console[_0x59eb55(0x1b5)](''),console[_0x59eb55(0x1b5)](a117_0x435e8d[_0x59eb55(0x213)](_0x59eb55(0x1cf))),console['log']('');for(const _0x3aa831 of _0x194593){const _0x395f38=_0x3aa831['ok']?a117_0x435e8d[_0x59eb55(0x1a8)]('OK'):a117_0x435e8d[_0x59eb55(0x20f)](_0x59eb55(0x1f0));console[_0x59eb55(0x1b5)]('\x20\x20'+_0x395f38+_0x59eb55(0x1db)+_0x3aa831[_0x59eb55(0x20a)]+':\x20'+_0x3aa831[_0x59eb55(0x1e5)]);if(_0x3aa831[_0x59eb55(0x1c1)])console['log'](_0x59eb55(0x208)+a117_0x435e8d[_0x59eb55(0x1bd)](_0x3aa831[_0x59eb55(0x1c1)]));}console[_0x59eb55(0x1b5)]('');}export async function upgradeApp(_0x4723f0,_0xc919aa){const _0x2f49c7=a117_0x22cd,_0x332191=process[_0x2f49c7(0x1a7)](),_0xaf091c=analyse(_0x332191),_0x1640e8=!_0xaf091c[_0x2f49c7(0x1ca)]&&_0xaf091c[_0x2f49c7(0x21a)][_0x2f49c7(0x1e0)]===0x0&&!_0xaf091c[_0x2f49c7(0x216)]&&!_0xaf091c[_0x2f49c7(0x1e9)]&&!_0xaf091c[_0x2f49c7(0x1f7)];if(_0x1640e8){console[_0x2f49c7(0x1b5)](a117_0x435e8d['green'](_0x2f49c7(0x1dd)));return;}printReport(_0xaf091c);const _0xb2a274=!!(_0xc919aa['yes']||_0xc919aa['Y']||_0x4723f0);if(!_0xb2a274)try{const _0xa36ce4=await askConfirm(_0x2f49c7(0x20b));if(!_0xa36ce4){console[_0x2f49c7(0x1b5)](a117_0x435e8d[_0x2f49c7(0x1bd)](_0x2f49c7(0x1f4)));return;}}catch(_0x2b7d84){if(_0x2b7d84?.[_0x2f49c7(0x1de)]==='CANCEL'){console['log'](a117_0x435e8d[_0x2f49c7(0x1bd)](_0x2f49c7(0x1f4)));return;}throw _0x2b7d84;}const _0x472e87=[],_0x6192af=a117_0x154fa2({'text':_0x2f49c7(0x206),'color':_0x2f49c7(0x1b8)})[_0x2f49c7(0x1a0)](),_0x17436b=execConfigMigration(_0xaf091c,_0x332191);_0x472e87[_0x2f49c7(0x1ff)](_0x17436b),_0x6192af[_0x17436b['ok']?_0x2f49c7(0x1d2):'fail']('Step\x201/7:\x20Config\x20migration\x20—\x20'+(_0x17436b[_0x2f49c7(0x1c1)]??(_0x17436b['ok']?_0x2f49c7(0x1e3):_0x2f49c7(0x1e7))));const _0x33ffe3=resolve(_0x332191,_0x2f49c7(0x1cb)),_0x37aa46=a117_0x154fa2({'text':_0x2f49c7(0x1f2),'color':_0x2f49c7(0x1b8)})[_0x2f49c7(0x1a0)]();if(existsSync(_0x33ffe3))try{rmSync(_0x33ffe3,{'recursive':!![],'force':!![]}),_0x37aa46['succeed'](_0x2f49c7(0x1cc)),_0x472e87['push']({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0x3bec21){_0x37aa46['fail']('Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0x3bec21[_0x2f49c7(0x1de)]),_0x472e87[_0x2f49c7(0x1ff)]({'step':0x2,'label':_0x2f49c7(0x1e2),'ok':![],'detail':_0x3bec21[_0x2f49c7(0x1de)]});}else _0x37aa46[_0x2f49c7(0x1a9)](_0x2f49c7(0x1af)),_0x472e87['push']({'step':0x2,'label':_0x2f49c7(0x1e2),'ok':!![],'detail':_0x2f49c7(0x1e1)});const _0x5d5e75=a117_0x154fa2({'text':_0x2f49c7(0x1ad),'color':_0x2f49c7(0x1b8)})[_0x2f49c7(0x1a0)](),_0x4d34cf=execRemoveOldArtifacts(_0xaf091c[_0x2f49c7(0x21a)]);_0x472e87[_0x2f49c7(0x1ff)](_0x4d34cf),_0x5d5e75[_0x4d34cf['ok']?_0x2f49c7(0x1d2):_0x2f49c7(0x1c3)](_0x2f49c7(0x1aa)+(_0x4d34cf[_0x2f49c7(0x1c1)]??(_0x4d34cf['ok']?_0x2f49c7(0x1e3):'failed')));const _0x3bdbd6=a117_0x154fa2({'text':_0x2f49c7(0x1e4),'color':_0x2f49c7(0x1b8)})['start'](),_0x4fd5c7=execCleanMcp(_0xaf091c);_0x472e87[_0x2f49c7(0x1ff)](_0x4fd5c7),_0x3bdbd6[_0x4fd5c7['ok']?'succeed':_0x2f49c7(0x1c3)](_0x2f49c7(0x1ea)+(_0x4fd5c7['detail']??(_0x4fd5c7['ok']?_0x2f49c7(0x1e3):_0x2f49c7(0x1e7))));const _0x186808=a117_0x154fa2({'text':'Step\x205/7:\x20Removing\x20old\x20skill...','color':_0x2f49c7(0x1b8)})['start'](),_0x3f77cf=execSkillsRemove(_0x332191,_0xb2a274);_0x472e87['push'](_0x3f77cf),_0x186808[_0x3f77cf['ok']?_0x2f49c7(0x1d2):_0x2f49c7(0x1c3)](_0x2f49c7(0x211)+(_0x3f77cf[_0x2f49c7(0x1c1)]??(_0x3f77cf['ok']?'done':_0x2f49c7(0x1e7))));const _0x296093=a117_0x154fa2({'text':_0x2f49c7(0x1ce),'color':_0x2f49c7(0x1b8)})['start'](),_0xb3dc1e=execSkillsAdd(_0x332191,_0xb2a274);_0x472e87[_0x2f49c7(0x1ff)](_0xb3dc1e),_0x296093[_0xb3dc1e['ok']?'succeed':'fail']('Step\x206/7:\x20Install\x20new\x20skill\x20—\x20'+(_0xb3dc1e['detail']??(_0xb3dc1e['ok']?_0x2f49c7(0x1e3):'failed')));const _0x3bd710=a117_0x154fa2({'text':_0x2f49c7(0x1bc),'color':'cyan'})[_0x2f49c7(0x1a0)](),_0x168d3e=execUpgradeSdk(_0xaf091c);_0x472e87[_0x2f49c7(0x1ff)](_0x168d3e),_0x3bd710[_0x168d3e['ok']?_0x2f49c7(0x1d2):_0x2f49c7(0x1c3)](_0x2f49c7(0x1c8)+(_0x168d3e['detail']??(_0x168d3e['ok']?_0x2f49c7(0x1e3):_0x2f49c7(0x1e7)))),printSummary(_0x472e87);const _0x1a9781=_0x472e87[_0x2f49c7(0x1b6)](_0x2d4910=>!_0x2d4910['ok']);_0x1a9781?console[_0x2f49c7(0x1b5)](a117_0x435e8d[_0x2f49c7(0x1f5)](_0x2f49c7(0x209))):console[_0x2f49c7(0x1b5)](a117_0x435e8d[_0x2f49c7(0x1a8)](_0x2f49c7(0x1fc))),_0x168d3e['ok']&&_0xaf091c[_0x2f49c7(0x1f7)]&&(console['log'](''),console[_0x2f49c7(0x1b5)](a117_0x435e8d[_0x2f49c7(0x213)][_0x2f49c7(0x1b8)](_0x2f49c7(0x1f8))),console[_0x2f49c7(0x1b5)](a117_0x435e8d[_0x2f49c7(0x1b8)](_0x2f49c7(0x1f3))),console[_0x2f49c7(0x1b5)](''),console[_0x2f49c7(0x1b5)](a117_0x435e8d['white'](_0x2f49c7(0x1d3))),console[_0x2f49c7(0x1b5)](a117_0x435e8d[_0x2f49c7(0x200)](_0x2f49c7(0x1e8))),console[_0x2f49c7(0x1b5)](a117_0x435e8d[_0x2f49c7(0x200)]('\x20\x20bun\x20install')),console[_0x2f49c7(0x1b5)](''));}
1
+ const a117_0x523c0e=a117_0x4fcd;(function(_0x9996e5,_0x439b4c){const _0x51a7dd=a117_0x4fcd,_0x375927=_0x9996e5();while(!![]){try{const _0x266ee6=parseInt(_0x51a7dd(0x135))/0x1+parseInt(_0x51a7dd(0xda))/0x2*(-parseInt(_0x51a7dd(0xd7))/0x3)+-parseInt(_0x51a7dd(0x10e))/0x4+parseInt(_0x51a7dd(0x11a))/0x5*(parseInt(_0x51a7dd(0xf7))/0x6)+-parseInt(_0x51a7dd(0x11c))/0x7+parseInt(_0x51a7dd(0xe1))/0x8+parseInt(_0x51a7dd(0xf8))/0x9*(parseInt(_0x51a7dd(0xfe))/0xa);if(_0x266ee6===_0x439b4c)break;else _0x375927['push'](_0x375927['shift']());}catch(_0xfcffbe){_0x375927['push'](_0x375927['shift']());}}}(a117_0x221a,0xc4838));import a117_0x259e33 from'chalk';import a117_0x3bcf88 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a117_0x523c0e(0x133)](_0x210ddf=>_0x210ddf!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x4a94bd){const _0x4d17f4=a117_0x523c0e,_0x41910b=[];for(const _0x5c6aff of Object['values'](CORE_IDE_CONFIGS)){if(_0x5c6aff[_0x4d17f4(0xf5)])for(const _0x42ce6f of _0x5c6aff[_0x4d17f4(0xf5)]){_0x41910b['push'](resolve(_0x4a94bd,_0x42ce6f['path']));}}return _0x41910b;}function analyse(_0x2bbd28){const _0x456416=a117_0x523c0e;let _0x2d3766=null;const _0x712470=resolve(_0x2bbd28,NEW_CONFIG_NAME),_0x49379f=existsSync(_0x712470);for(const _0x2989a0 of LEGACY_CONFIG_NAMES){const _0x1963e2=resolve(_0x2bbd28,_0x2989a0);if(existsSync(_0x1963e2)){const _0x30e334=readConfigFile(_0x1963e2),_0x4e72d0=Object[_0x456416(0x13b)](_0x30e334)['filter'](_0x4af244=>typeof _0x30e334[_0x4af244]!==_0x456416(0x13a));_0x2d3766={'oldPath':_0x1963e2,'hasNewConfig':_0x49379f,'fields':_0x4e72d0};break;}}const _0x3e0350=[],_0x5e77f9=resolve(_0x2bbd28,_0x456416(0xd2));if(existsSync(_0x5e77f9))_0x3e0350[_0x456416(0xeb)](_0x5e77f9);const _0x2b5524=resolve(_0x2bbd28,_0x456416(0xdc));if(existsSync(_0x2b5524))_0x3e0350['push'](_0x2b5524);const _0x14f79c=resolve(_0x2bbd28,_0x456416(0x121));if(existsSync(_0x14f79c))_0x3e0350[_0x456416(0xeb)](_0x14f79c);for(const _0x132039 of collectIdeSkillFiles(_0x2bbd28)){if(existsSync(_0x132039))_0x3e0350[_0x456416(0xeb)](_0x132039);}let _0xbdf9b1=null;const _0x2bcde6=resolve(_0x2bbd28,_0x456416(0x106));if(existsSync(_0x2bcde6))try{const _0x569dad=JSON[_0x456416(0xf9)](readFileSync(_0x2bcde6,_0x456416(0x116)));if(_0x569dad?.[_0x456416(0xd3)]&&typeof _0x569dad['mcpServers']===_0x456416(0x132)){const _0x10360d=[];for(const [_0x32fbbf,_0x39fc5f]of Object['entries'](_0x569dad['mcpServers'])){const _0xb77311=_0x39fc5f;_0xb77311?.[_0x456416(0xea)]&&Array[_0x456416(0xf4)](_0xb77311[_0x456416(0xea)])&&_0xb77311[_0x456416(0xea)]['some'](_0x34a262=>typeof _0x34a262===_0x456416(0x12f)&&_0x34a262[_0x456416(0x14a)](_0x456416(0xe5)))&&_0x10360d[_0x456416(0xeb)](_0x32fbbf);}_0x10360d['length']>0x0&&(_0xbdf9b1={'path':_0x2bcde6,'keys':_0x10360d});}}catch{}const _0x4eaee6=_0x3e0350[_0x456416(0xf6)]>0x0||_0x2d3766!==null;let _0x2707fa=null;const _0x7791e=resolve(_0x2bbd28,_0x456416(0xf3));if(existsSync(_0x7791e))try{const _0xf9dc6e=JSON['parse'](readFileSync(_0x7791e,_0x456416(0x116)));for(const _0x5f054c of[_0x456416(0xd9),_0x456416(0xfa)]){const _0x6ed482=_0xf9dc6e?.[_0x5f054c]?.['@lovrabet/sdk'];if(typeof _0x6ed482===_0x456416(0x12f)){_0x6ed482!==_0x456416(0x112)&&(_0x2707fa={'pkgPath':_0x7791e,'currentVersion':_0x6ed482,'field':_0x5f054c});break;}}}catch{}return{'configMigration':_0x2d3766,'oldArtifacts':_0x3e0350,'oldMcpConfig':_0xbdf9b1,'needsSkillSwap':_0x4eaee6,'sdkUpgrade':_0x2707fa};}function printReport(_0x1f3a78){const _0x112721=a117_0x523c0e,{configMigration:_0x5786ea,oldArtifacts:_0xbe1a48,oldMcpConfig:_0xd6df0a,needsSkillSwap:_0x416049}=_0x1f3a78;console[_0x112721(0x10b)](''),console[_0x112721(0x10b)](a117_0x259e33[_0x112721(0xfb)](_0x112721(0x130))),console[_0x112721(0x10b)]('');_0x5786ea?(console[_0x112721(0x10b)](a117_0x259e33[_0x112721(0xdf)](_0x112721(0x11e))+('\x20\x20'+a117_0x259e33[_0x112721(0x144)](_0x5786ea['oldPath']))),console[_0x112721(0x10b)](_0x112721(0xf0)+(_0x5786ea[_0x112721(0x141)]?a117_0x259e33[_0x112721(0x12d)]('already\x20exists\x20(will\x20merge)'):a117_0x259e33['gray']('not\x20found\x20(will\x20create)'))),console[_0x112721(0x10b)](_0x112721(0x13d)+_0x5786ea[_0x112721(0x147)][_0x112721(0x143)](',\x20')),console[_0x112721(0x10b)]('\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak')):console[_0x112721(0x10b)](a117_0x259e33[_0x112721(0xdf)](_0x112721(0x11e))+'\x20\x20'+a117_0x259e33['gray'](_0x112721(0x100)));console[_0x112721(0x10b)]('');if(_0xbe1a48[_0x112721(0xf6)]>0x0){console[_0x112721(0x10b)](a117_0x259e33[_0x112721(0xdf)](_0x112721(0x127)));for(const _0x3c2f4a of _0xbe1a48){console['log']('\x20\x20'+a117_0x259e33[_0x112721(0x115)](_0x112721(0x149))+'\x20\x20'+_0x3c2f4a);}console[_0x112721(0x10b)]('\x20\x20Action:\x20delete');}else console[_0x112721(0x10b)](a117_0x259e33[_0x112721(0xdf)](_0x112721(0x127))+'\x20\x20'+a117_0x259e33[_0x112721(0x10c)](_0x112721(0x123)));console[_0x112721(0x10b)]('');_0xd6df0a?(console[_0x112721(0x10b)](a117_0x259e33['cyan'](_0x112721(0x138))+('\x20\x20'+a117_0x259e33[_0x112721(0x144)](_0xd6df0a[_0x112721(0x14b)])+_0x112721(0xe3)+_0xd6df0a[_0x112721(0x13b)][_0x112721(0x143)](',\x20'))),console['log'](_0x112721(0xee))):console['log'](a117_0x259e33[_0x112721(0xdf)](_0x112721(0x138))+'\x20\x20'+a117_0x259e33[_0x112721(0x10c)](_0x112721(0x109)));console[_0x112721(0x10b)](''),console[_0x112721(0x10b)](a117_0x259e33[_0x112721(0xdf)](_0x112721(0x101))+('\x20\x20'+(_0x416049?a117_0x259e33[_0x112721(0x144)](_0x112721(0xde)):a117_0x259e33[_0x112721(0x12d)](_0x112721(0xe2)))));_0x416049&&console[_0x112721(0x10b)](_0x112721(0x110)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console['log']('');if(_0x1f3a78[_0x112721(0x111)]){const {currentVersion:_0x13f6ac,field:_0x3de602,pkgPath:_0x421bea}=_0x1f3a78['sdkUpgrade'];console[_0x112721(0x10b)](a117_0x259e33['cyan'](_0x112721(0x11b))+('\x20\x20'+a117_0x259e33['yellow'](_0x421bea))),console[_0x112721(0x10b)](_0x112721(0xd8)+_0x3de602+':\x20'+a117_0x259e33[_0x112721(0x144)](_0x13f6ac)+_0x112721(0xfd)+a117_0x259e33[_0x112721(0x12d)]('latest')),console['log']('\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)');}else console[_0x112721(0x10b)](a117_0x259e33[_0x112721(0xdf)](_0x112721(0x11b))+'\x20\x20'+a117_0x259e33['gray'](_0x112721(0x142)));console[_0x112721(0x10b)]('');}function execConfigMigration(_0x2c433f,_0x336a7e){const _0x23528a=a117_0x523c0e,{configMigration:_0x311ce4}=_0x2c433f;if(!_0x311ce4?.['oldPath'])return{'step':0x1,'label':_0x23528a(0x10a),'ok':!![],'detail':_0x23528a(0x113)};const _0x41ed2d=readConfigFile(_0x311ce4['oldPath']),_0x5758bf=resolve(_0x336a7e,NEW_CONFIG_NAME),_0x204f85=_0x311ce4[_0x23528a(0x141)]?readConfigFile(_0x5758bf):{};for(const [_0x39b0cc,_0x56b417]of Object['entries'](_0x41ed2d)){!(_0x39b0cc in _0x204f85)&&(_0x204f85[_0x39b0cc]=_0x56b417);}writeConfigFile(_0x5758bf,_0x204f85);const _0x2b9d89=_0x311ce4[_0x23528a(0x114)]+'.bak';return renameSync(_0x311ce4[_0x23528a(0x114)],_0x2b9d89),{'step':0x1,'label':_0x23528a(0x10a),'ok':!![],'detail':_0x311ce4[_0x23528a(0x114)]+'\x20→\x20'+_0x5758bf+'\x20(backup:\x20'+_0x2b9d89+')'};}function execRemoveOldArtifacts(_0x1a3917){const _0x466f72=a117_0x523c0e,_0x2a187b=[];for(const _0x47d429 of _0x1a3917){try{if(!existsSync(_0x47d429))continue;const _0x5da095=tryStat(_0x47d429);_0x5da095?.[_0x466f72(0xe6)]()?rmSync(_0x47d429,{'recursive':!![],'force':!![]}):unlinkSync(_0x47d429);}catch(_0x22eaf8){_0x2a187b[_0x466f72(0xeb)](_0x47d429+':\x20'+_0x22eaf8[_0x466f72(0x136)]);}}return{'step':0x3,'label':_0x466f72(0x10f),'ok':_0x2a187b[_0x466f72(0xf6)]===0x0,'detail':_0x2a187b['length']>0x0?_0x1a3917[_0x466f72(0xf6)]-_0x2a187b['length']+'/'+_0x1a3917[_0x466f72(0xf6)]+'\x20removed\x20('+_0x2a187b[_0x466f72(0x143)](';\x20')+')':_0x1a3917['length']+_0x466f72(0x118)};}function execCleanMcp(_0x123e5c){const _0x599b5a=a117_0x523c0e;if(!_0x123e5c['oldMcpConfig'])return{'step':0x4,'label':_0x599b5a(0xd6),'ok':!![],'detail':_0x599b5a(0xe0)};try{const _0x359b65=readFileSync(_0x123e5c['oldMcpConfig'][_0x599b5a(0x14b)],_0x599b5a(0x116)),_0xc3c6a6=JSON[_0x599b5a(0xf9)](_0x359b65);if(_0xc3c6a6?.['mcpServers']&&typeof _0xc3c6a6[_0x599b5a(0xd3)]===_0x599b5a(0x132)){const _0x3d7869=[];for(const [_0x5132b5,_0x5dec73]of Object[_0x599b5a(0x11d)](_0xc3c6a6[_0x599b5a(0xd3)])){_0x5dec73?.[_0x599b5a(0xea)]&&Array['isArray'](_0x5dec73[_0x599b5a(0xea)])&&_0x5dec73[_0x599b5a(0xea)][_0x599b5a(0x117)](_0x47d138=>typeof _0x47d138===_0x599b5a(0x12f)&&_0x47d138[_0x599b5a(0x14a)](_0x599b5a(0xe5)))&&_0x3d7869[_0x599b5a(0xeb)](_0x5132b5);}for(const _0x20ed4c of _0x3d7869){delete _0xc3c6a6[_0x599b5a(0xd3)][_0x20ed4c];}return _0x3d7869[_0x599b5a(0xf6)]>0x0&&writeFileSync(_0x123e5c['oldMcpConfig'][_0x599b5a(0x14b)],JSON[_0x599b5a(0x126)](_0xc3c6a6,null,0x2)+'\x0a',_0x599b5a(0x116)),{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':'removed\x20'+_0x3d7869['join'](',\x20')+_0x599b5a(0x119)+_0x123e5c[_0x599b5a(0x122)][_0x599b5a(0x14b)]};}return{'step':0x4,'label':_0x599b5a(0xd6),'ok':!![],'detail':_0x599b5a(0x12a)};}catch(_0x472a92){return{'step':0x4,'label':_0x599b5a(0xd6),'ok':![],'detail':_0x472a92[_0x599b5a(0x136)]};}}function execSkillsRemove(_0x2f3314,_0xa5ffb6){const _0x22d807=a117_0x523c0e,_0x23f1c7=runNpxSkillsRemove(_0x2f3314,{'stdio':_0x22d807(0x10d),'yes':_0xa5ffb6});return{'step':0x5,'label':_0x22d807(0xef),'ok':_0x23f1c7['ok'],'detail':_0x23f1c7['ok']?_0x22d807(0x104):_0x23f1c7[_0x22d807(0xed)]??_0x22d807(0x131)+_0x23f1c7[_0x22d807(0xf1)]};}function execSkillsAdd(_0x522810,_0x258a4d){const _0x1d54c4=a117_0x523c0e,_0x27df84=runNpxSkillsAddGlobal(_0x522810,_0x1d54c4(0xdd),{'stdio':_0x1d54c4(0x10d),'yes':_0x258a4d});return{'step':0x6,'label':_0x1d54c4(0x139),'ok':_0x27df84['ok'],'detail':_0x27df84['ok']?'lovrabet/rabetbase\x20installed\x20globally':_0x27df84[_0x1d54c4(0xed)]??_0x1d54c4(0x131)+_0x27df84[_0x1d54c4(0xf1)]};}function a117_0x4fcd(_0x2e1459,_0x4e579e){_0x2e1459=_0x2e1459-0xd2;const _0x221aca=a117_0x221a();let _0x4fcdd=_0x221aca[_0x2e1459];return _0x4fcdd;}function execUpgradeSdk(_0x23d894){const _0x2a1bce=a117_0x523c0e;if(!_0x23d894[_0x2a1bce(0x111)])return{'step':0x7,'label':_0x2a1bce(0x13f),'ok':!![],'detail':_0x2a1bce(0x14d)};const {pkgPath:_0x47ad85,currentVersion:_0x4cb0c1,field:_0x43cca5}=_0x23d894[_0x2a1bce(0x111)];try{const _0xacd0b7=readFileSync(_0x47ad85,'utf8'),_0x4757e3=JSON[_0x2a1bce(0xf9)](_0xacd0b7);return _0x4757e3[_0x43cca5][_0x2a1bce(0x125)]='latest',writeFileSync(_0x47ad85,JSON[_0x2a1bce(0x126)](_0x4757e3,null,0x2)+'\x0a',_0x2a1bce(0x116)),{'step':0x7,'label':_0x2a1bce(0x13f),'ok':!![],'detail':_0x43cca5+_0x2a1bce(0x13c)+_0x4cb0c1+'\x20→\x20latest'};}catch(_0x588841){return{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':![],'detail':_0x588841['message']};}}function tryStat(_0x21e38d){try{return statSync(_0x21e38d);}catch{return undefined;}}function printSummary(_0x16be07){const _0x13e867=a117_0x523c0e;console[_0x13e867(0x10b)](''),console[_0x13e867(0x10b)](a117_0x259e33[_0x13e867(0xfb)](_0x13e867(0x129))),console[_0x13e867(0x10b)]('');for(const _0x4795b8 of _0x16be07){const _0x472b71=_0x4795b8['ok']?a117_0x259e33[_0x13e867(0x12d)]('OK'):a117_0x259e33[_0x13e867(0x115)]('FAIL');console['log']('\x20\x20'+_0x472b71+'\x20\x20Step\x20'+_0x4795b8[_0x13e867(0xd4)]+':\x20'+_0x4795b8[_0x13e867(0x102)]);if(_0x4795b8[_0x13e867(0x12b)])console[_0x13e867(0x10b)]('\x20\x20\x20\x20\x20\x20\x20'+a117_0x259e33[_0x13e867(0x10c)](_0x4795b8['detail']));}console[_0x13e867(0x10b)]('');}export async function upgradeApp(_0xcad3bf,_0x19b851){const _0x8dbf10=a117_0x523c0e,_0x28133f=process[_0x8dbf10(0x137)](),_0xd96bff=analyse(_0x28133f),_0xc99060=!_0xd96bff[_0x8dbf10(0x11f)]&&_0xd96bff['oldArtifacts'][_0x8dbf10(0xf6)]===0x0&&!_0xd96bff[_0x8dbf10(0x122)]&&!_0xd96bff['needsSkillSwap']&&!_0xd96bff[_0x8dbf10(0x111)];if(_0xc99060){console[_0x8dbf10(0x10b)](a117_0x259e33[_0x8dbf10(0x12d)]('No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.'));return;}printReport(_0xd96bff);const _0x5ece88=!!(_0x19b851[_0x8dbf10(0xe9)]||_0x19b851['Y']||_0xcad3bf);if(!_0x5ece88)try{const _0x42939e=await askConfirm(_0x8dbf10(0x148));if(!_0x42939e){console['log'](a117_0x259e33[_0x8dbf10(0x10c)]('Upgrade\x20cancelled.'));return;}}catch(_0x24a759){if(_0x24a759?.[_0x8dbf10(0x136)]===_0x8dbf10(0xfc)){console[_0x8dbf10(0x10b)](a117_0x259e33[_0x8dbf10(0x10c)]('Upgrade\x20cancelled.'));return;}throw _0x24a759;}const _0x267ecc=[],_0x4a29d9=a117_0x3bcf88({'text':_0x8dbf10(0xe8),'color':_0x8dbf10(0xdf)})[_0x8dbf10(0xdb)](),_0x23c78a=execConfigMigration(_0xd96bff,_0x28133f);_0x267ecc[_0x8dbf10(0xeb)](_0x23c78a),_0x4a29d9[_0x23c78a['ok']?_0x8dbf10(0xf2):_0x8dbf10(0x134)](_0x8dbf10(0x146)+(_0x23c78a[_0x8dbf10(0x12b)]??(_0x23c78a['ok']?_0x8dbf10(0xec):_0x8dbf10(0x12c))));const _0x1c64f3=resolve(_0x28133f,'.lovrabet'),_0x4a345e=a117_0x3bcf88({'text':_0x8dbf10(0x128),'color':_0x8dbf10(0xdf)})[_0x8dbf10(0xdb)]();if(existsSync(_0x1c64f3))try{rmSync(_0x1c64f3,{'recursive':!![],'force':!![]}),_0x4a345e[_0x8dbf10(0xf2)]('Step\x202/7:\x20.lovrabet/\x20directory\x20removed'),_0x267ecc['push']({'step':0x2,'label':_0x8dbf10(0x105),'ok':!![]});}catch(_0x4d5306){_0x4a345e[_0x8dbf10(0x134)](_0x8dbf10(0x108)+_0x4d5306[_0x8dbf10(0x136)]),_0x267ecc[_0x8dbf10(0xeb)]({'step':0x2,'label':_0x8dbf10(0x105),'ok':![],'detail':_0x4d5306[_0x8dbf10(0x136)]});}else _0x4a345e[_0x8dbf10(0x14c)]('Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped'),_0x267ecc[_0x8dbf10(0xeb)]({'step':0x2,'label':_0x8dbf10(0x105),'ok':!![],'detail':_0x8dbf10(0xe0)});const _0x581eb8=a117_0x3bcf88({'text':_0x8dbf10(0xe4),'color':_0x8dbf10(0xdf)})[_0x8dbf10(0xdb)](),_0x213d43=execRemoveOldArtifacts(_0xd96bff[_0x8dbf10(0x124)]);_0x267ecc[_0x8dbf10(0xeb)](_0x213d43),_0x581eb8[_0x213d43['ok']?_0x8dbf10(0xf2):_0x8dbf10(0x134)](_0x8dbf10(0x12e)+(_0x213d43['detail']??(_0x213d43['ok']?_0x8dbf10(0xec):_0x8dbf10(0x12c))));const _0x547262=a117_0x3bcf88({'text':_0x8dbf10(0x107),'color':_0x8dbf10(0xdf)})['start'](),_0x4351e3=execCleanMcp(_0xd96bff);_0x267ecc['push'](_0x4351e3),_0x547262[_0x4351e3['ok']?'succeed':_0x8dbf10(0x134)](_0x8dbf10(0x103)+(_0x4351e3['detail']??(_0x4351e3['ok']?_0x8dbf10(0xec):_0x8dbf10(0x12c))));const _0x20ad19=a117_0x3bcf88({'text':_0x8dbf10(0xd5),'color':_0x8dbf10(0xdf)})[_0x8dbf10(0xdb)](),_0x191281=execSkillsRemove(_0x28133f,_0x5ece88);_0x267ecc['push'](_0x191281),_0x20ad19[_0x191281['ok']?_0x8dbf10(0xf2):'fail'](_0x8dbf10(0x145)+(_0x191281[_0x8dbf10(0x12b)]??(_0x191281['ok']?_0x8dbf10(0xec):_0x8dbf10(0x12c))));const _0x29e29d=a117_0x3bcf88({'text':'Step\x206/7:\x20Installing\x20new\x20skill...','color':_0x8dbf10(0xdf)})['start'](),_0x2a4be0=execSkillsAdd(_0x28133f,_0x5ece88);_0x267ecc[_0x8dbf10(0xeb)](_0x2a4be0),_0x29e29d[_0x2a4be0['ok']?_0x8dbf10(0xf2):_0x8dbf10(0x134)]('Step\x206/7:\x20Install\x20new\x20skill\x20—\x20'+(_0x2a4be0[_0x8dbf10(0x12b)]??(_0x2a4be0['ok']?_0x8dbf10(0xec):_0x8dbf10(0x12c))));const _0x2c5f3d=a117_0x3bcf88({'text':'Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','color':_0x8dbf10(0xdf)})[_0x8dbf10(0xdb)](),_0x18c462=execUpgradeSdk(_0xd96bff);_0x267ecc['push'](_0x18c462),_0x2c5f3d[_0x18c462['ok']?'succeed':_0x8dbf10(0x134)]('Step\x207/7:\x20@lovrabet/sdk\x20—\x20'+(_0x18c462[_0x8dbf10(0x12b)]??(_0x18c462['ok']?_0x8dbf10(0xec):'failed'))),printSummary(_0x267ecc);const _0x14f739=_0x267ecc[_0x8dbf10(0x117)](_0x1b2862=>!_0x1b2862['ok']);_0x14f739?console['log'](a117_0x259e33[_0x8dbf10(0x144)]('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console[_0x8dbf10(0x10b)](a117_0x259e33[_0x8dbf10(0x12d)](_0x8dbf10(0x140))),_0x18c462['ok']&&_0xd96bff[_0x8dbf10(0x111)]&&(console[_0x8dbf10(0x10b)](''),console['log'](a117_0x259e33[_0x8dbf10(0xfb)][_0x8dbf10(0xdf)]('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console[_0x8dbf10(0x10b)](a117_0x259e33[_0x8dbf10(0xdf)](_0x8dbf10(0xff))),console[_0x8dbf10(0x10b)](''),console['log'](a117_0x259e33[_0x8dbf10(0x120)](_0x8dbf10(0xe7))),console[_0x8dbf10(0x10b)](a117_0x259e33[_0x8dbf10(0x120)](_0x8dbf10(0x13e))),console[_0x8dbf10(0x10b)](a117_0x259e33[_0x8dbf10(0x120)]('\x20\x20bun\x20install')),console[_0x8dbf10(0x10b)](''));}function a117_0x221a(){const _0x131bc5=['.cursor/rules/lovrabet_rules.mdc','lovrabet/rabetbase','needed','cyan','skipped','10543560jNnjxg','not\x20needed','\x20→\x20keys:\x20','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','@lovrabet/dataset-mcp-server','isDirectory','\x20\x20npm\x20install','Step\x201/7:\x20Migrating\x20config...','yes','args','push','done','error','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','Remove\x20old\x20skill','\x20\x20New\x20config\x20(.rabetbase.json):\x20','status','succeed','package.json','isArray','files','length','268698keteJx','18PkINEQ','parse','devDependencies','bold','CANCEL','\x20→\x20','675460GCiHCy','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','no\x20legacy\x20config\x20found','Skill\x20swap:','label','Step\x204/7:\x20MCP\x20config\x20—\x20','lovrabet/lovrabet-skill\x20removed','Remove\x20.lovrabet/','.cursor/mcp.json','Step\x204/7:\x20Cleaning\x20MCP\x20config...','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','no\x20legacy\x20entry','Config\x20migration','log','gray','inherit','382044IbdMJU','Remove\x20legacy\x20artifacts','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','sdkUpgrade','latest','skipped\x20(no\x20legacy\x20config)','oldPath','red','utf8','some','\x20removed','\x20from\x20','35wGUxXL','@lovrabet/sdk:','3053512KKPIPr','entries','Config\x20file:','configMigration','white','.claude/skills/lovrabet','oldMcpConfig','none\x20found','oldArtifacts','@lovrabet/sdk','stringify','Legacy\x20artifacts:','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','===\x20Upgrade\x20Summary\x20===','no\x20matching\x20entry\x20found','detail','failed','green','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','string','===\x20Upgrade\x20Analysis\x20===','exit\x20','object','filter','fail','114990NnKbXK','message','cwd','MCP\x20config:','Install\x20new\x20skill','undefined','keys','[\x22@lovrabet/sdk\x22]:\x20','\x20\x20Fields\x20to\x20migrate:\x20','\x20\x20#\x20or','Upgrade\x20@lovrabet/sdk','Upgrade\x20completed\x20successfully!','hasNewConfig','not\x20found\x20or\x20already\x20at\x20latest','join','yellow','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','Step\x201/7:\x20Config\x20migration\x20—\x20','fields','Proceed\x20with\x20upgrade?','FOUND','includes','path','info','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','.lovrabet','mcpServers','step','Step\x205/7:\x20Removing\x20old\x20skill...','Clean\x20MCP\x20config','3vfXinE','\x20\x20Current\x20version\x20in\x20','dependencies','1089722OJLKHW','start'];a117_0x221a=function(){return _0x131bc5;};return a117_0x221a();}
@@ -1 +1 @@
1
- const a118_0x30fcb3=a118_0x1b99;(function(_0x9044e3,_0x1e9eef){const _0x2ebf5d=a118_0x1b99,_0x141bce=_0x9044e3();while(!![]){try{const _0x53b0f8=parseInt(_0x2ebf5d(0x13b))/0x1*(parseInt(_0x2ebf5d(0x14c))/0x2)+-parseInt(_0x2ebf5d(0x164))/0x3+parseInt(_0x2ebf5d(0x136))/0x4+parseInt(_0x2ebf5d(0x138))/0x5*(-parseInt(_0x2ebf5d(0x15f))/0x6)+parseInt(_0x2ebf5d(0x140))/0x7*(parseInt(_0x2ebf5d(0x141))/0x8)+-parseInt(_0x2ebf5d(0x160))/0x9*(parseInt(_0x2ebf5d(0x156))/0xa)+-parseInt(_0x2ebf5d(0x158))/0xb*(-parseInt(_0x2ebf5d(0x132))/0xc);if(_0x53b0f8===_0x1e9eef)break;else _0x141bce['push'](_0x141bce['shift']());}catch(_0x50cdc9){_0x141bce['push'](_0x141bce['shift']());}}}(a118_0x576d,0xbe161));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dataDefinitions}from'../commands/data/index.js';import{dbDefinitions}from'../commands/db/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{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{issueDefinitions}from'../commands/issue/index.js';import{authDefinitions}from'../commands/auth/index.js';function a118_0x576d(){const _0x216933=['Smart\x20List\x20Pages','service','6luCnCe','738sLqNmI','write','wildcardDef','Menu','4012032DynqxX','skill','Project','logout','values','App\x20Management','Dataset\x20&\x20Operations','24zWrOsC','map','defaultCommand','BFF\x20Scripts','1152756qpMzDv','run','1175800qmgqCz','Instant\x20API','create','58171GRGbLY','start','install','from','set','21zhejxh','2917664GRqOKP','commands','Run\x20any\x20package.json\x20script','Database\x20Connections','risk','length','login','auth','Run\x20Scripts','Self\x20Update','Code\x20Generation','4gNcbls','\x20\x20[high-risk-write]','Schema','build','<script>','push','description','read','preview','Configuration','159070dmpHcZ','\x20\x20[write]','11862488pANgOq','has','Quick\x20Start','API','get'];a118_0x576d=function(){return _0x216933;};return a118_0x576d();}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();function a118_0x1b99(_0x1e83c0,_0x471565){_0x1e83c0=_0x1e83c0-0x131;const _0x576d0e=a118_0x576d();let _0x1b996b=_0x576d0e[_0x1e83c0];return _0x1b996b;}export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x29f8f9){const _0x1d95a1=a118_0x1b99;for(const _0x212469 of _0x29f8f9){definitions['set'](_0x212469[_0x1d95a1(0x15e)]+':'+_0x212469['command'],_0x212469);let _0x58825a=serviceGroups[_0x1d95a1(0x15c)](_0x212469[_0x1d95a1(0x15e)]);!_0x58825a&&(_0x58825a=[],serviceGroups[_0x1d95a1(0x13f)](_0x212469[_0x1d95a1(0x15e)],_0x58825a)),_0x58825a[_0x1d95a1(0x151)](_0x212469);}}function registerDeclarativeService(_0x522d9f,_0x17e8f4,_0x45172b){const _0x2b072b=a118_0x1b99;registerDefinitions(_0x17e8f4);_0x45172b?.[_0x2b072b(0x162)]&&registerDefinitions([_0x45172b[_0x2b072b(0x162)]]);const _0x541dc0=_0x65f97a=>_0x65f97a===_0x2b072b(0x153)?'':_0x65f97a===_0x2b072b(0x161)?_0x2b072b(0x157):_0x2b072b(0x14d),_0x22a46d={'service':_0x17e8f4[0x0][_0x2b072b(0x15e)],'label':_0x522d9f,'commands':_0x17e8f4[_0x2b072b(0x133)](_0x878ff6=>({'command':_0x878ff6['command'],'description':_0x878ff6[_0x2b072b(0x152)],'tag':_0x541dc0(_0x878ff6[_0x2b072b(0x145)])})),'declarative':!![],'defaultCommand':_0x45172b?.[_0x2b072b(0x134)]??(_0x45172b?.['isSingleCommand']?_0x17e8f4[0x0]['command']:undefined),'wildcardDef':_0x45172b?.[_0x2b072b(0x162)],'isSingleCommand':_0x45172b?.['isSingleCommand']};serviceRegistry[_0x2b072b(0x151)](_0x22a46d),serviceByName['set'](_0x22a46d[_0x2b072b(0x15e)],_0x22a46d);}registerDeclarativeService(a118_0x30fcb3(0x15a),initDefinitions,{'defaultCommand':a118_0x30fcb3(0x137),'isSingleCommand':!![]}),registerDeclarativeService(a118_0x30fcb3(0x166),projectDefinitions),registerDeclarativeService(a118_0x30fcb3(0x169),appDefinitions),registerDeclarativeService(a118_0x30fcb3(0x149),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a118_0x30fcb3(0x146)]-0x1];last[a118_0x30fcb3(0x142)]=[{'command':a118_0x30fcb3(0x150),'description':a118_0x30fcb3(0x143),'tag':''}];}registerDeclarativeService('Authentication',authDefinitions,{'defaultCommand':a118_0x30fcb3(0x147)}),registerDeclarativeService(a118_0x30fcb3(0x14a),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a118_0x30fcb3(0x14e),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a118_0x30fcb3(0x155),configDefinitions),registerDeclarativeService('Platform\x20Issue',issueDefinitions),registerDeclarativeService(a118_0x30fcb3(0x15b),apiDefinitions),registerDeclarativeService(a118_0x30fcb3(0x163),menuDefinitions),registerDeclarativeService(a118_0x30fcb3(0x144),dbDefinitions),registerDeclarativeService(a118_0x30fcb3(0x131),datasetDefinitions),registerDeclarativeService(a118_0x30fcb3(0x15d),pageDefinitions),registerDeclarativeService(a118_0x30fcb3(0x139),dataDefinitions),registerDeclarativeService(a118_0x30fcb3(0x135),bffDefinitions),registerDeclarativeService('SQL\x20Queries',sqlDefinitions),registerDeclarativeService(a118_0x30fcb3(0x14b),codegenDefinitions),registerDeclarativeService('Skills',skillDefinitions),registerDeclarativeService('Logs',logsDefinitions,{'defaultCommand':'show'});export const deprecatedAliases={'create':{'service':'project','command':a118_0x30fcb3(0x13a)},'start':{'service':a118_0x30fcb3(0x137),'command':a118_0x30fcb3(0x13c)},'build':{'service':a118_0x30fcb3(0x137),'command':a118_0x30fcb3(0x14f)},'preview':{'service':a118_0x30fcb3(0x137),'command':a118_0x30fcb3(0x154)},'logout':{'service':a118_0x30fcb3(0x148),'command':a118_0x30fcb3(0x167)},'skills':{'service':a118_0x30fcb3(0x165),'command':a118_0x30fcb3(0x13d)}};export const deprecatedSubcommands={'bff':{'new':a118_0x30fcb3(0x13a)},'sql':{'new':'create'}};export function resolveDeprecatedSubcommand(_0x468a19,_0x32c275){return deprecatedSubcommands[_0x468a19]?.[_0x32c275];}export function findDefinition(_0x201458,_0x1653cc){return definitions['get'](_0x201458+':'+_0x1653cc);}export function isKnownService(_0x4f2c63){const _0x4f8034=a118_0x30fcb3;return serviceByName[_0x4f8034(0x159)](_0x4f2c63);}export function isDeclarativeService(_0x141d76){const _0x492e26=a118_0x30fcb3;return serviceGroups[_0x492e26(0x159)](_0x141d76)||serviceByName[_0x492e26(0x15c)](_0x141d76)?.[_0x492e26(0x162)]!==undefined;}export function getServiceEntry(_0x31d0af){const _0x5d5604=a118_0x30fcb3;return serviceByName[_0x5d5604(0x15c)](_0x31d0af);}export function getLegacyHandler(_0x40fa37,_0x4cf01b){return undefined;}export function getAllDefinitions(){const _0x2f3556=a118_0x30fcb3;return Array[_0x2f3556(0x13e)](definitions[_0x2f3556(0x168)]());}
1
+ const a118_0x33c4a8=a118_0x47fe;(function(_0x39befd,_0x36534b){const _0x1bfa0d=a118_0x47fe,_0x4bd5fa=_0x39befd();while(!![]){try{const _0x37606f=parseInt(_0x1bfa0d(0x1ca))/0x1*(parseInt(_0x1bfa0d(0x1b0))/0x2)+-parseInt(_0x1bfa0d(0x1df))/0x3*(parseInt(_0x1bfa0d(0x1d1))/0x4)+-parseInt(_0x1bfa0d(0x1e0))/0x5*(-parseInt(_0x1bfa0d(0x1bb))/0x6)+-parseInt(_0x1bfa0d(0x1b4))/0x7+-parseInt(_0x1bfa0d(0x1c1))/0x8*(parseInt(_0x1bfa0d(0x1d3))/0x9)+-parseInt(_0x1bfa0d(0x1ba))/0xa+parseInt(_0x1bfa0d(0x1bd))/0xb;if(_0x37606f===_0x36534b)break;else _0x4bd5fa['push'](_0x4bd5fa['shift']());}catch(_0x33b623){_0x4bd5fa['push'](_0x4bd5fa['shift']());}}}(a118_0x1640,0x1c8ae));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dataDefinitions}from'../commands/data/index.js';import{dbDefinitions}from'../commands/db/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{appDefinitions}from'../commands/app/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';function a118_0x1640(){const _0xde29a=['defaultCommand','Menu','Run\x20Scripts','150278cthHwN','run','skill','Self\x20Update','1406468MaWwOg','Platform\x20Issue','Dataset\x20&\x20Operations','Code\x20Generation','API','read','1129680yckIRV','17646KsPgzD','login','4365603hziCmx','project','command','get','127384pawmXc','push','isSingleCommand','wildcardDef','\x20\x20[high-risk-write]','SQL\x20Queries','create','write','build','2VDvBdJ','has','App\x20Management','start','commands','Logs','Database\x20Connections','3532zvbwcD','BFF\x20Scripts','9CQMjrZ','Instant\x20API','auth','from','service','Quick\x20Start','<script>','Schema','map','values','install','set','591VskhvL','125OlUKGI','description','Smart\x20List\x20Pages','Project'];a118_0x1640=function(){return _0xde29a;};return a118_0x1640();}import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{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';function a118_0x47fe(_0x1fae89,_0x5f510b){_0x1fae89=_0x1fae89-0x1aa;const _0x164020=a118_0x1640();let _0x47fe67=_0x164020[_0x1fae89];return _0x47fe67;}export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x2a1a5f){const _0xdd2237=a118_0x47fe;for(const _0x471dd0 of _0x2a1a5f){definitions[_0xdd2237(0x1de)](_0x471dd0[_0xdd2237(0x1d7)]+':'+_0x471dd0[_0xdd2237(0x1bf)],_0x471dd0);let _0x40e123=serviceGroups[_0xdd2237(0x1c0)](_0x471dd0[_0xdd2237(0x1d7)]);!_0x40e123&&(_0x40e123=[],serviceGroups[_0xdd2237(0x1de)](_0x471dd0[_0xdd2237(0x1d7)],_0x40e123)),_0x40e123[_0xdd2237(0x1c2)](_0x471dd0);}}function registerDeclarativeService(_0x5b8e18,_0x3ee035,_0x5a9c30){const _0xf9c64a=a118_0x47fe;registerDefinitions(_0x3ee035);_0x5a9c30?.[_0xf9c64a(0x1c4)]&&registerDefinitions([_0x5a9c30['wildcardDef']]);const _0x4f5996=_0x33a139=>_0x33a139===_0xf9c64a(0x1b9)?'':_0x33a139===_0xf9c64a(0x1c8)?'\x20\x20[write]':_0xf9c64a(0x1c5),_0x4de65a={'service':_0x3ee035[0x0][_0xf9c64a(0x1d7)],'label':_0x5b8e18,'commands':_0x3ee035[_0xf9c64a(0x1db)](_0x356754=>({'command':_0x356754['command'],'description':_0x356754[_0xf9c64a(0x1aa)],'tag':_0x4f5996(_0x356754['risk'])})),'declarative':!![],'defaultCommand':_0x5a9c30?.[_0xf9c64a(0x1ad)]??(_0x5a9c30?.[_0xf9c64a(0x1c3)]?_0x3ee035[0x0][_0xf9c64a(0x1bf)]:undefined),'wildcardDef':_0x5a9c30?.[_0xf9c64a(0x1c4)],'isSingleCommand':_0x5a9c30?.['isSingleCommand']};serviceRegistry['push'](_0x4de65a),serviceByName[_0xf9c64a(0x1de)](_0x4de65a[_0xf9c64a(0x1d7)],_0x4de65a);}registerDeclarativeService(a118_0x33c4a8(0x1d8),initDefinitions,{'defaultCommand':'run','isSingleCommand':!![]}),registerDeclarativeService(a118_0x33c4a8(0x1ac),projectDefinitions),registerDeclarativeService('Workspace',workspaceDefinitions),registerDeclarativeService(a118_0x33c4a8(0x1cc),appDefinitions),registerDeclarativeService(a118_0x33c4a8(0x1af),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry['length']-0x1];last[a118_0x33c4a8(0x1ce)]=[{'command':a118_0x33c4a8(0x1d9),'description':'Run\x20any\x20package.json\x20script','tag':''}];}registerDeclarativeService('Authentication',authDefinitions,{'defaultCommand':a118_0x33c4a8(0x1bc)}),registerDeclarativeService(a118_0x33c4a8(0x1b3),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a118_0x33c4a8(0x1da),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Configuration',configDefinitions),registerDeclarativeService(a118_0x33c4a8(0x1b5),issueDefinitions),registerDeclarativeService(a118_0x33c4a8(0x1b8),apiDefinitions),registerDeclarativeService(a118_0x33c4a8(0x1ae),menuDefinitions),registerDeclarativeService(a118_0x33c4a8(0x1d0),dbDefinitions),registerDeclarativeService(a118_0x33c4a8(0x1b6),datasetDefinitions),registerDeclarativeService(a118_0x33c4a8(0x1ab),pageDefinitions),registerDeclarativeService(a118_0x33c4a8(0x1d4),dataDefinitions),registerDeclarativeService(a118_0x33c4a8(0x1d2),bffDefinitions),registerDeclarativeService(a118_0x33c4a8(0x1c6),sqlDefinitions),registerDeclarativeService(a118_0x33c4a8(0x1b7),codegenDefinitions),registerDeclarativeService('Skills',skillDefinitions),registerDeclarativeService(a118_0x33c4a8(0x1cf),logsDefinitions,{'defaultCommand':'show'});export const deprecatedAliases={'create':{'service':a118_0x33c4a8(0x1be),'command':a118_0x33c4a8(0x1c7)},'start':{'service':a118_0x33c4a8(0x1b1),'command':a118_0x33c4a8(0x1cd)},'build':{'service':a118_0x33c4a8(0x1b1),'command':a118_0x33c4a8(0x1c9)},'preview':{'service':'run','command':'preview'},'logout':{'service':a118_0x33c4a8(0x1d5),'command':'logout'},'skills':{'service':a118_0x33c4a8(0x1b2),'command':a118_0x33c4a8(0x1dd)}};export const deprecatedSubcommands={'bff':{'new':a118_0x33c4a8(0x1c7)},'sql':{'new':a118_0x33c4a8(0x1c7)}};export function resolveDeprecatedSubcommand(_0x583921,_0x54825a){return deprecatedSubcommands[_0x583921]?.[_0x54825a];}export function findDefinition(_0x2d6b91,_0x4d75fd){const _0x296574=a118_0x33c4a8;return definitions[_0x296574(0x1c0)](_0x2d6b91+':'+_0x4d75fd);}export function isKnownService(_0x1faf97){const _0x8d3476=a118_0x33c4a8;return serviceByName[_0x8d3476(0x1cb)](_0x1faf97);}export function isDeclarativeService(_0x58594d){const _0x47ac27=a118_0x33c4a8;return serviceGroups[_0x47ac27(0x1cb)](_0x58594d)||serviceByName[_0x47ac27(0x1c0)](_0x58594d)?.['wildcardDef']!==undefined;}export function getServiceEntry(_0x1c5163){const _0x5dd3cb=a118_0x33c4a8;return serviceByName[_0x5dd3cb(0x1c0)](_0x1c5163);}export function getLegacyHandler(_0x5c8fbb,_0x79e52d){return undefined;}export function getAllDefinitions(){const _0xc9c0d1=a118_0x33c4a8;return Array[_0xc9c0d1(0x1d6)](definitions[_0xc9c0d1(0x1dc)]());}
@@ -1 +1 @@
1
- function a119_0x2757(_0x4e94a8,_0x355c41){_0x4e94a8=_0x4e94a8-0xf5;const _0x25bde4=a119_0x25bd();let _0x27579b=_0x25bde4[_0x4e94a8];return _0x27579b;}function a119_0x25bd(){const _0x57b288=['map','padEnd','keys','boolean','184068qzYCLi','\x20run\x20build','yarn.lock','\x20run\x20start','No\x20package.json\x20found\x20in\x20current\x20directory.','preview','belowMinimum','has','push','watch','vite\x20preview\x20exited\x20with\x20code\x20','all','build','error','validation','15164tzTSCU','16163ztuGGX','entries','cwd','1888230BMKHTb','yarn','start','log','\x20exited\x20with\x20code\x20','close','\x20\x20\x20\x20','456xZqerQ','join','read','152pMbrJQ','1320360HAuWlD','186SwgmrG','needsUpgrade','node_modules','npm','bun.lockb','Enable\x20watch\x20mode\x20for\x20preview','bool','pnpm','13496hVjeCK','\x0a\x20\x20Available\x20scripts:\x0a','2FjLeAl','No\x20scripts\x20defined\x20in\x20package.json.','80267HQAFVU','slice','\x20run\x20','inherit','script','.bin','Script\x20name\x20defined\x20in\x20package.json','\x20\x20EXAMPLES','utf-8','189eiSolC','bun.lock','parse','\x20run\x20preview\x20--watch\x20\x20\x20#\x20parallel\x20build\x20--watch\x20+\x20preview','length','(none)'];a119_0x25bd=function(){return _0x57b288;};return a119_0x25bd();}const a119_0x4aa18d=a119_0x2757;(function(_0x41fd83,_0x325ce7){const _0xfb213a=a119_0x2757,_0x241715=_0x41fd83();while(!![]){try{const _0x64f792=parseInt(_0xfb213a(0x129))/0x1*(-parseInt(_0xfb213a(0x127))/0x2)+-parseInt(_0xfb213a(0xf6))/0x3*(parseInt(_0xfb213a(0x10f))/0x4)+parseInt(_0xfb213a(0x113))/0x5+parseInt(_0xfb213a(0x11f))/0x6*(parseInt(_0xfb213a(0x110))/0x7)+-parseInt(_0xfb213a(0x11d))/0x8*(parseInt(_0xfb213a(0x100))/0x9)+parseInt(_0xfb213a(0x11e))/0xa+-parseInt(_0xfb213a(0x12b))/0xb*(-parseInt(_0xfb213a(0x11a))/0xc);if(_0x64f792===_0x325ce7)break;else _0x241715['push'](_0x241715['shift']());}catch(_0x5ad41e){_0x241715['push'](_0x241715['shift']());}}}(a119_0x25bd,0x3521e));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{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set([a119_0x4aa18d(0x115),'dev']);function readPackageScripts(_0x4854d9){const _0x91fa9d=a119_0x4aa18d,_0x1f0e85=resolve(_0x4854d9,'package.json');if(!existsSync(_0x1f0e85))return null;try{const _0x1ba30b=JSON[_0x91fa9d(0xf8)](readFileSync(_0x1f0e85,_0x91fa9d(0xf5)));return _0x1ba30b['scripts']??{};}catch{return null;}}function detectPackageManager(_0x9c6bf3){const _0x40fd84=a119_0x4aa18d;if(existsSync(resolve(_0x9c6bf3,_0x40fd84(0x123)))||existsSync(resolve(_0x9c6bf3,_0x40fd84(0xf7))))return'bun';if(existsSync(resolve(_0x9c6bf3,'pnpm-lock.yaml')))return _0x40fd84(0x126);if(existsSync(resolve(_0x9c6bf3,_0x40fd84(0x102))))return _0x40fd84(0x114);return _0x40fd84(0x122);}async function versionCheck(_0x17db71){const _0x57ca42=a119_0x4aa18d,_0x370ea9=await checkCliVersion();(_0x370ea9[_0x57ca42(0x120)]||_0x370ea9[_0x57ca42(0x106)])&&(printCliUpgradeWarning(_0x370ea9),assertCliVersionSupported(_0x370ea9));const _0x1655bf=await checkSdkVersion(_0x17db71);if(_0x1655bf[_0x57ca42(0x120)])printSdkUpgradeWarning(_0x1655bf);}function spawnScript(_0x213841,_0x5a7cd1,_0x1bd7ae,_0x152c93){return new Promise((_0x436f92,_0x261a83)=>{const _0x3fe27e=a119_0x2757,_0x6785ec=['run',_0x5a7cd1,..._0x1bd7ae],_0x562d31=spawn(_0x213841,_0x6785ec,{'cwd':_0x152c93,'stdio':_0x3fe27e(0x12e),'shell':!![],'env':{...process.env,'PATH':''+join(_0x152c93,'node_modules',_0x3fe27e(0x130))+delimiter+process.env.PATH}});_0x562d31['on'](_0x3fe27e(0x118),_0x3bcc86=>{const _0x384305=_0x3fe27e;if(_0x3bcc86===0x0||_0x3bcc86===null)_0x436f92();else _0x261a83(new Error(_0x213841+'\x20run\x20'+_0x5a7cd1+_0x384305(0x117)+_0x3bcc86));}),_0x562d31['on'](_0x3fe27e(0x10d),_0x261a83);});}function spawnViteBuildWatch(_0x4ecf9b){return new Promise((_0x237f7f,_0x33bc4c)=>{const _0x2ecfff=a119_0x2757,_0x1f15c0=spawn('vite',[_0x2ecfff(0x10c),'--watch'],{'cwd':_0x4ecf9b,'stdio':'inherit','shell':!![],'env':{...process.env,'PATH':''+join(_0x4ecf9b,_0x2ecfff(0x121),_0x2ecfff(0x130))+delimiter+process.env.PATH}});_0x1f15c0['on'](_0x2ecfff(0x118),_0x2fd4fc=>{if(_0x2fd4fc===0x0||_0x2fd4fc===null)_0x237f7f();else _0x33bc4c(new Error('vite\x20build\x20--watch\x20exited\x20with\x20code\x20'+_0x2fd4fc));}),_0x1f15c0['on'](_0x2ecfff(0x10d),_0x33bc4c);});}function spawnVitePreview(_0x2ffaa9){return new Promise((_0x851294,_0x31fd75)=>{const _0x1adee9=a119_0x2757,_0x5370a6=spawn('vite',[_0x1adee9(0x105)],{'cwd':_0x2ffaa9,'stdio':_0x1adee9(0x12e),'shell':!![],'env':{...process.env,'PATH':''+join(_0x2ffaa9,_0x1adee9(0x121),_0x1adee9(0x130))+delimiter+process.env.PATH}});_0x5370a6['on'](_0x1adee9(0x118),_0x1a8775=>{const _0xada277=_0x1adee9;if(_0x1a8775===0x0||_0x1a8775===null)_0x851294();else _0x31fd75(new Error(_0xada277(0x10a)+_0x1a8775));}),_0x5370a6['on'](_0x1adee9(0x10d),_0x31fd75);});}const runFlags=[{'name':a119_0x4aa18d(0x109),'type':a119_0x4aa18d(0xff),'description':a119_0x4aa18d(0x124),'default':![]}];export const runDefinition={'service':'run','command':'run','description':'Run\x20a\x20package.json\x20script','risk':a119_0x4aa18d(0x11c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a119_0x4aa18d(0x12f),'description':a119_0x4aa18d(0x131),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x5d50d9=a119_0x4aa18d,_0x1b7916=readPackageScripts(process[_0x5d50d9(0x112)]()),_0x257576=[];if(_0x1b7916&&Object[_0x5d50d9(0xfe)](_0x1b7916)[_0x5d50d9(0xfa)]>0x0){const _0xd5c592=Object[_0x5d50d9(0xfe)](_0x1b7916),_0x326451=Math['max'](..._0xd5c592[_0x5d50d9(0xfc)](_0x3e8393=>_0x3e8393[_0x5d50d9(0xfa)]));_0x257576[_0x5d50d9(0x108)]('\x20\x20AVAILABLE\x20SCRIPTS\x20\x20(current\x20project)');for(const [_0x738aec,_0x203b66]of Object[_0x5d50d9(0x111)](_0x1b7916)){_0x257576[_0x5d50d9(0x108)](_0x5d50d9(0x119)+CLI_BIN_NAME+_0x5d50d9(0x12d)+_0x738aec[_0x5d50d9(0xfd)](_0x326451+0x2)+'#\x20'+_0x203b66);}}else _0x257576[_0x5d50d9(0x108)](_0x5d50d9(0x132)),_0x257576[_0x5d50d9(0x108)](_0x5d50d9(0x119)+CLI_BIN_NAME+_0x5d50d9(0x103)),_0x257576[_0x5d50d9(0x108)](_0x5d50d9(0x119)+CLI_BIN_NAME+_0x5d50d9(0x101)),_0x257576[_0x5d50d9(0x108)]('\x20\x20\x20\x20'+CLI_BIN_NAME+'\x20run\x20preview'),_0x257576[_0x5d50d9(0x108)](_0x5d50d9(0x119)+CLI_BIN_NAME+_0x5d50d9(0xf9));return _0x257576[_0x5d50d9(0x11b)]('\x0a');},async 'execute'(_0x52dcf9){const _0x374262=a119_0x4aa18d,_0x1f025=process[_0x374262(0x112)](),_0x40ac74=_0x52dcf9['args'][0x0],_0x5090f8=_0x52dcf9['args'][_0x374262(0x12c)](0x1),_0x1e6b3a=readPackageScripts(_0x1f025);if(!_0x1e6b3a)throw CliErrors[_0x374262(0x10e)](_0x374262(0x104));if(!_0x40ac74){const _0xb88b05=Object[_0x374262(0xfe)](_0x1e6b3a);if(_0xb88b05[_0x374262(0xfa)]===0x0)console[_0x374262(0x116)](_0x374262(0x12a));else{console[_0x374262(0x116)](_0x374262(0x128));const _0x18144f=Math['max'](..._0xb88b05[_0x374262(0xfc)](_0xc376e=>_0xc376e['length']));for(const [_0x10993a,_0x67a3b9]of Object[_0x374262(0x111)](_0x1e6b3a)){console[_0x374262(0x116)](_0x374262(0x119)+_0x10993a[_0x374262(0xfd)](_0x18144f+0x2)+_0x67a3b9);}console[_0x374262(0x116)]('\x0a\x20\x20Usage:\x20'+CLI_BIN_NAME+'\x20run\x20<script>\x0a');}return{'ok':!![]};}if(!_0x1e6b3a[_0x40ac74])throw CliErrors['validation']('Script\x20\x22'+_0x40ac74+'\x22\x20not\x20found\x20in\x20package.json.','Available:\x20'+(Object[_0x374262(0xfe)](_0x1e6b3a)[_0x374262(0x11b)](',\x20')||_0x374262(0xfb)));const _0x3aa3a8=detectPackageManager(_0x1f025);VERSION_CHECK_SCRIPTS[_0x374262(0x107)](_0x40ac74)&&await versionCheck(_0x1f025);if(_0x40ac74===_0x374262(0x105)&&_0x52dcf9[_0x374262(0x125)](_0x374262(0x109)))return await Promise[_0x374262(0x10b)]([spawnViteBuildWatch(_0x1f025),spawnVitePreview(_0x1f025)]),{'ok':!![]};return await spawnScript(_0x3aa3a8,_0x40ac74,_0x5090f8,_0x1f025),{'ok':!![]};}};
1
+ const a119_0x40940f=a119_0x301f;(function(_0x4fc9e8,_0x324851){const _0xa4aa37=a119_0x301f,_0x4f7803=_0x4fc9e8();while(!![]){try{const _0x4f347a=parseInt(_0xa4aa37(0x71))/0x1+-parseInt(_0xa4aa37(0xa1))/0x2+parseInt(_0xa4aa37(0x91))/0x3+parseInt(_0xa4aa37(0x8c))/0x4*(-parseInt(_0xa4aa37(0x6d))/0x5)+parseInt(_0xa4aa37(0x9d))/0x6+parseInt(_0xa4aa37(0x7c))/0x7+-parseInt(_0xa4aa37(0x76))/0x8*(parseInt(_0xa4aa37(0x90))/0x9);if(_0x4f347a===_0x324851)break;else _0x4f7803['push'](_0x4f7803['shift']());}catch(_0xb7a24){_0x4f7803['push'](_0x4f7803['shift']());}}}(a119_0x1e6e,0x389ec));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{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set([a119_0x40940f(0xa4),a119_0x40940f(0x96)]);function readPackageScripts(_0x470864){const _0x5e1ed6=a119_0x40940f,_0x54e815=resolve(_0x470864,_0x5e1ed6(0x67));if(!existsSync(_0x54e815))return null;try{const _0x37c8e9=JSON[_0x5e1ed6(0x97)](readFileSync(_0x54e815,_0x5e1ed6(0xa7)));return _0x37c8e9[_0x5e1ed6(0xa6)]??{};}catch{return null;}}function detectPackageManager(_0x4ebbea){const _0x3e912f=a119_0x40940f;if(existsSync(resolve(_0x4ebbea,_0x3e912f(0x89)))||existsSync(resolve(_0x4ebbea,_0x3e912f(0xa8))))return _0x3e912f(0x80);if(existsSync(resolve(_0x4ebbea,_0x3e912f(0x88))))return'pnpm';if(existsSync(resolve(_0x4ebbea,_0x3e912f(0xa3))))return _0x3e912f(0x7f);return _0x3e912f(0x68);}function a119_0x301f(_0x2bf042,_0x512d15){_0x2bf042=_0x2bf042-0x66;const _0x1e6ec6=a119_0x1e6e();let _0x301fa1=_0x1e6ec6[_0x2bf042];return _0x301fa1;}async function versionCheck(_0x26f2d2){const _0x395053=a119_0x40940f,_0x27dd84=await checkCliVersion();(_0x27dd84[_0x395053(0x9f)]||_0x27dd84[_0x395053(0x87)])&&(printCliUpgradeWarning(_0x27dd84),assertCliVersionSupported(_0x27dd84));const _0x678080=await checkSdkVersion(_0x26f2d2);if(_0x678080[_0x395053(0x9f)])printSdkUpgradeWarning(_0x678080);}function spawnScript(_0x7ba801,_0x5bf82e,_0x2903f9,_0x281c3b){return new Promise((_0x485502,_0x16796d)=>{const _0x5111db=a119_0x301f,_0x957102=[_0x5111db(0x7d),_0x5bf82e,..._0x2903f9],_0x2b9d14=spawn(_0x7ba801,_0x957102,{'cwd':_0x281c3b,'stdio':_0x5111db(0x74),'shell':!![],'env':{...process.env,'PATH':''+join(_0x281c3b,'node_modules',_0x5111db(0x9a))+delimiter+process.env.PATH}});_0x2b9d14['on'](_0x5111db(0x7b),_0x287e5b=>{const _0x3671dc=_0x5111db;if(_0x287e5b===0x0||_0x287e5b===null)_0x485502();else _0x16796d(new Error(_0x7ba801+_0x3671dc(0x85)+_0x5bf82e+_0x3671dc(0xa9)+_0x287e5b));}),_0x2b9d14['on'](_0x5111db(0x8e),_0x16796d);});}function spawnViteBuildWatch(_0xe438e1){return new Promise((_0x2ec153,_0x452e6d)=>{const _0x36a998=a119_0x301f,_0x7e9c3=spawn('vite',['build',_0x36a998(0x8f)],{'cwd':_0xe438e1,'stdio':_0x36a998(0x74),'shell':!![],'env':{...process.env,'PATH':''+join(_0xe438e1,_0x36a998(0x98),_0x36a998(0x9a))+delimiter+process.env.PATH}});_0x7e9c3['on']('close',_0x2005a1=>{const _0x4573bc=_0x36a998;if(_0x2005a1===0x0||_0x2005a1===null)_0x2ec153();else _0x452e6d(new Error(_0x4573bc(0xa2)+_0x2005a1));}),_0x7e9c3['on']('error',_0x452e6d);});}function spawnVitePreview(_0x379955){return new Promise((_0x133e1b,_0x4994)=>{const _0x435bb7=a119_0x301f,_0x59cc45=spawn(_0x435bb7(0x99),[_0x435bb7(0x6e)],{'cwd':_0x379955,'stdio':_0x435bb7(0x74),'shell':!![],'env':{...process.env,'PATH':''+join(_0x379955,_0x435bb7(0x98),_0x435bb7(0x9a))+delimiter+process.env.PATH}});_0x59cc45['on'](_0x435bb7(0x7b),_0x5b0d19=>{const _0x39815a=_0x435bb7;if(_0x5b0d19===0x0||_0x5b0d19===null)_0x133e1b();else _0x4994(new Error(_0x39815a(0x83)+_0x5b0d19));}),_0x59cc45['on'](_0x435bb7(0x8e),_0x4994);});}const runFlags=[{'name':a119_0x40940f(0x7e),'type':'boolean','description':a119_0x40940f(0x73),'default':![]}];function a119_0x1e6e(){const _0x47b307=['\x20run\x20preview','max','\x22\x20not\x20found\x20in\x20package.json.','dev','parse','node_modules','vite','.bin','args','entries','1748118tDwaom','slice','needsUpgrade','\x0a\x20\x20Usage:\x20','891534vkGLGf','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','yarn.lock','start','log','scripts','utf-8','bun.lock','\x20exited\x20with\x20code\x20','join','package.json','npm','has','cwd','map','validation','58205UxAJZo','preview','\x20run\x20build','script','455251lULmNg','Script\x20\x22','Enable\x20watch\x20mode\x20for\x20preview','inherit','\x0a\x20\x20Available\x20scripts:\x0a','9888UgXziP','\x20run\x20<script>\x0a','length','No\x20package.json\x20found\x20in\x20current\x20directory.','all','close','1094646tVefYP','run','watch','yarn','bun','Available:\x20','read','vite\x20preview\x20exited\x20with\x20code\x20','\x20run\x20start','\x20run\x20','keys','belowMinimum','pnpm-lock.yaml','bun.lockb','(none)','push','12WvVnJT','\x20\x20\x20\x20','error','--watch','1467JQrQfr','33276REZsom','Script\x20name\x20defined\x20in\x20package.json'];a119_0x1e6e=function(){return _0x47b307;};return a119_0x1e6e();}export const runDefinition={'service':'run','command':a119_0x40940f(0x7d),'description':'Run\x20a\x20package.json\x20script','risk':a119_0x40940f(0x82),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a119_0x40940f(0x70),'description':a119_0x40940f(0x92),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x30bf3b=a119_0x40940f,_0x400e25=readPackageScripts(process[_0x30bf3b(0x6a)]()),_0x18e14e=[];if(_0x400e25&&Object[_0x30bf3b(0x86)](_0x400e25)[_0x30bf3b(0x78)]>0x0){const _0xe143e=Object[_0x30bf3b(0x86)](_0x400e25),_0x35c7e1=Math[_0x30bf3b(0x94)](..._0xe143e[_0x30bf3b(0x6b)](_0x27feb6=>_0x27feb6[_0x30bf3b(0x78)]));_0x18e14e[_0x30bf3b(0x8b)]('\x20\x20AVAILABLE\x20SCRIPTS\x20\x20(current\x20project)');for(const [_0x44167f,_0x32eb5d]of Object[_0x30bf3b(0x9c)](_0x400e25)){_0x18e14e[_0x30bf3b(0x8b)](_0x30bf3b(0x8d)+CLI_BIN_NAME+'\x20run\x20'+_0x44167f['padEnd'](_0x35c7e1+0x2)+'#\x20'+_0x32eb5d);}}else _0x18e14e['push']('\x20\x20EXAMPLES'),_0x18e14e[_0x30bf3b(0x8b)](_0x30bf3b(0x8d)+CLI_BIN_NAME+_0x30bf3b(0x84)),_0x18e14e[_0x30bf3b(0x8b)](_0x30bf3b(0x8d)+CLI_BIN_NAME+_0x30bf3b(0x6f)),_0x18e14e[_0x30bf3b(0x8b)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x30bf3b(0x93)),_0x18e14e[_0x30bf3b(0x8b)](_0x30bf3b(0x8d)+CLI_BIN_NAME+'\x20run\x20preview\x20--watch\x20\x20\x20#\x20parallel\x20build\x20--watch\x20+\x20preview');return _0x18e14e[_0x30bf3b(0x66)]('\x0a');},async 'execute'(_0x314937){const _0x2c57f7=a119_0x40940f,_0x459b0b=process[_0x2c57f7(0x6a)](),_0x1d7fed=_0x314937[_0x2c57f7(0x9b)][0x0],_0x483ed0=_0x314937['args'][_0x2c57f7(0x9e)](0x1),_0x14e12d=readPackageScripts(_0x459b0b);if(!_0x14e12d)throw CliErrors[_0x2c57f7(0x6c)](_0x2c57f7(0x79));if(!_0x1d7fed){const _0x49c23e=Object[_0x2c57f7(0x86)](_0x14e12d);if(_0x49c23e[_0x2c57f7(0x78)]===0x0)console[_0x2c57f7(0xa5)]('No\x20scripts\x20defined\x20in\x20package.json.');else{console[_0x2c57f7(0xa5)](_0x2c57f7(0x75));const _0x42efee=Math[_0x2c57f7(0x94)](..._0x49c23e['map'](_0x23ed8a=>_0x23ed8a[_0x2c57f7(0x78)]));for(const [_0x35afdf,_0x551dfb]of Object['entries'](_0x14e12d)){console[_0x2c57f7(0xa5)](_0x2c57f7(0x8d)+_0x35afdf['padEnd'](_0x42efee+0x2)+_0x551dfb);}console[_0x2c57f7(0xa5)](_0x2c57f7(0xa0)+CLI_BIN_NAME+_0x2c57f7(0x77));}return{'ok':!![]};}if(!_0x14e12d[_0x1d7fed])throw CliErrors[_0x2c57f7(0x6c)](_0x2c57f7(0x72)+_0x1d7fed+_0x2c57f7(0x95),_0x2c57f7(0x81)+(Object['keys'](_0x14e12d)[_0x2c57f7(0x66)](',\x20')||_0x2c57f7(0x8a)));const _0x4f3281=detectPackageManager(_0x459b0b);VERSION_CHECK_SCRIPTS[_0x2c57f7(0x69)](_0x1d7fed)&&await versionCheck(_0x459b0b);if(_0x1d7fed===_0x2c57f7(0x6e)&&_0x314937['bool'](_0x2c57f7(0x7e)))return await Promise[_0x2c57f7(0x7a)]([spawnViteBuildWatch(_0x459b0b),spawnVitePreview(_0x459b0b)]),{'ok':!![]};return await spawnScript(_0x4f3281,_0x1d7fed,_0x483ed0,_0x459b0b),{'ok':!![]};}};
@@ -1 +1 @@
1
- const a120_0xbacafb=a120_0x1bdf;function a120_0x1bdf(_0x4b8d03,_0x5f03a6){_0x4b8d03=_0x4b8d03-0x6c;const _0x19d56b=a120_0x19d5();let _0x1bdf10=_0x19d56b[_0x4b8d03];return _0x1bdf10;}(function(_0x1b2e72,_0x4aa56e){const _0xaf5d37=a120_0x1bdf,_0x322618=_0x1b2e72();while(!![]){try{const _0x1c5607=-parseInt(_0xaf5d37(0x78))/0x1*(parseInt(_0xaf5d37(0x7a))/0x2)+-parseInt(_0xaf5d37(0x77))/0x3*(-parseInt(_0xaf5d37(0x76))/0x4)+-parseInt(_0xaf5d37(0x6f))/0x5*(-parseInt(_0xaf5d37(0x72))/0x6)+parseInt(_0xaf5d37(0x74))/0x7*(-parseInt(_0xaf5d37(0x6d))/0x8)+-parseInt(_0xaf5d37(0x6c))/0x9+parseInt(_0xaf5d37(0x7b))/0xa*(parseInt(_0xaf5d37(0x75))/0xb)+-parseInt(_0xaf5d37(0x6e))/0xc;if(_0x1c5607===_0x4aa56e)break;else _0x322618['push'](_0x322618['shift']());}catch(_0x1a18e0){_0x322618['push'](_0x322618['shift']());}}}(a120_0x19d5,0x2e0bb));import{buildSchemaPayload}from'../framework/schema-export.js';function a120_0x19d5(){const _0x54d423=['57msGoTX','7345usiouO','export','30KVbqIG','494930wGHJPG','2727243egTcHZ','507176kNhcht','733296gNwkWe','2095MaAFGy','json','Export\x20machine-readable\x20command\x20schema\x20(JSON)','978mnLwLU','read','7RosmLg','77qaHVdG','65592dXQyIg'];a120_0x19d5=function(){return _0x54d423;};return a120_0x19d5();}async function execute(_0x2b3a27){const _0x38ca29=await buildSchemaPayload();return{'ok':!![],'data':_0x38ca29};}export const schemaDefinition={'service':'schema','command':a120_0xbacafb(0x79),'description':a120_0xbacafb(0x71),'risk':a120_0xbacafb(0x73),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a120_0xbacafb(0x70),'flags':[],'execute':execute};
1
+ const a120_0x2f198c=a120_0x2486;function a120_0x2486(_0x5c6d88,_0x25de77){_0x5c6d88=_0x5c6d88-0x1c6;const _0x20d477=a120_0x20d4();let _0x248673=_0x20d477[_0x5c6d88];return _0x248673;}function a120_0x20d4(){const _0x215cdd=['Export\x20machine-readable\x20command\x20schema\x20(JSON)','6HrhGmI','5190828wnQyqz','1159308BQQKyK','6kTgAdE','2020149vSjOeS','export','1268395XmKlWy','13587ReqNnQ','883778dxcvoi','read','20mDAFBD','25133oxfMqz','11ZOKcmI','520siDjnr','schema'];a120_0x20d4=function(){return _0x215cdd;};return a120_0x20d4();}(function(_0x5e32f0,_0x11c2b7){const _0x4ee0d0=a120_0x2486,_0x208bb1=_0x5e32f0();while(!![]){try{const _0x156eaa=-parseInt(_0x4ee0d0(0x1c7))/0x1+-parseInt(_0x4ee0d0(0x1d4))/0x2*(-parseInt(_0x4ee0d0(0x1cf))/0x3)+parseInt(_0x4ee0d0(0x1ce))/0x4+-parseInt(_0x4ee0d0(0x1d2))/0x5*(parseInt(_0x4ee0d0(0x1cc))/0x6)+-parseInt(_0x4ee0d0(0x1d3))/0x7*(parseInt(_0x4ee0d0(0x1c9))/0x8)+-parseInt(_0x4ee0d0(0x1d0))/0x9*(-parseInt(_0x4ee0d0(0x1c6))/0xa)+parseInt(_0x4ee0d0(0x1c8))/0xb*(-parseInt(_0x4ee0d0(0x1cd))/0xc);if(_0x156eaa===_0x11c2b7)break;else _0x208bb1['push'](_0x208bb1['shift']());}catch(_0xc0681a){_0x208bb1['push'](_0x208bb1['shift']());}}}(a120_0x20d4,0xbfa55));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x5f59b9){const _0x60e58c=await buildSchemaPayload();return{'ok':!![],'data':_0x60e58c};}export const schemaDefinition={'service':a120_0x2f198c(0x1ca),'command':a120_0x2f198c(0x1d1),'description':a120_0x2f198c(0x1cb),'risk':a120_0x2f198c(0x1d5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':'json','flags':[],'execute':execute};
@@ -1 +1 @@
1
- function a121_0x3685(){const _0x30ac7f=['skill','cwd','inherit','9buXRtU','npx\x20skills\x20add\x20failed:\x20','76TZhKxr',')...','lovrabet/rabetbase','write','Install\x20developer\x20skill\x20package','1385490rSQDWQ','Installing\x20official\x20skill\x20via\x20npx\x20(','Check\x20network\x20connectivity\x20and\x20try\x20again.','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20skill\x20is\x20already\x20present.','error','apiError','unknown','11626pebdel','log','24651612WbecUw','8355128lEWlyh','6194482yimqOr','pipe','873129bODLTv','564NYovbZ','11rHJTCP','8Cmsbjx','35695qwCSvb'];a121_0x3685=function(){return _0x30ac7f;};return a121_0x3685();}const a121_0x410fb9=a121_0x507a;function a121_0x507a(_0x58c7cc,_0x2b58c7){_0x58c7cc=_0x58c7cc-0xd1;const _0x368579=a121_0x3685();let _0x507a18=_0x368579[_0x58c7cc];return _0x507a18;}(function(_0x427197,_0x5eb496){const _0x4acb6a=a121_0x507a,_0x4381f3=_0x427197();while(!![]){try{const _0x2c3e9=-parseInt(_0x4acb6a(0xe7))/0x1*(parseInt(_0x4acb6a(0xdb))/0x2)+-parseInt(_0x4acb6a(0xd1))/0x3*(-parseInt(_0x4acb6a(0xd4))/0x4)+-parseInt(_0x4acb6a(0xd5))/0x5*(-parseInt(_0x4acb6a(0xd2))/0x6)+parseInt(_0x4acb6a(0xeb))/0x7+parseInt(_0x4acb6a(0xea))/0x8*(parseInt(_0x4acb6a(0xd9))/0x9)+-parseInt(_0x4acb6a(0xe0))/0xa*(parseInt(_0x4acb6a(0xd3))/0xb)+-parseInt(_0x4acb6a(0xe9))/0xc;if(_0x2c3e9===_0x5eb496)break;else _0x4381f3['push'](_0x4381f3['shift']());}catch(_0x28b870){_0x4381f3['push'](_0x4381f3['shift']());}}}(a121_0x3685,0x85bf7));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE}from'../../skills/npx-skills-add.js';export const skillDefinitions=[{'service':a121_0x410fb9(0xd6),'command':'install','description':a121_0x410fb9(0xdf),'risk':a121_0x410fb9(0xde),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x41aa62){const _0x2069a3=a121_0x410fb9;logger['setLogPath'](process['cwd']()),logger['info']('skill-install','执行安装技能包命令(委托给\x20npx\x20skills\x20add\x20-g\x20-y)');const {runNpxSkillsAddGlobal:_0x36973e}=await import('../../skills/npx-skills-add.js'),_0x391865=_0x41aa62['nonInteractive']?_0x2069a3(0xec):_0x2069a3(0xd8);console[_0x2069a3(0xe8)](_0x2069a3(0xe1)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+_0x2069a3(0xdc));const _0x468c47=_0x36973e(process[_0x2069a3(0xd7)](),_0x2069a3(0xdd),{'stdio':_0x391865});if(_0x468c47['skipped'])console[_0x2069a3(0xe8)](_0x2069a3(0xe3));else{if(_0x468c47['ok'])console[_0x2069a3(0xe8)](CLI_BIN_NAME+'\x20skill\x20installed');else throw CliErrors[_0x2069a3(0xe5)](_0x2069a3(0xda)+(_0x468c47[_0x2069a3(0xe4)]||_0x2069a3(0xe6)),_0x2069a3(0xe2));}return{'ok':!![]};}}];
1
+ function a121_0x37b2(_0x4bad08,_0x9f7ac8){_0x4bad08=_0x4bad08-0x1aa;const _0x1cfc16=a121_0x1cfc();let _0x37b26a=_0x1cfc16[_0x4bad08];return _0x37b26a;}function a121_0x1cfc(){const _0x11874d=['install','427390LXmXDJ','pipe','Check\x20network\x20connectivity\x20and\x20try\x20again.','write','skipped','\x20skill\x20installed','info','error','log','6739101CBiSUn','Install\x20developer\x20skill\x20package','10786888XsLtQG','132NWmKts','186347DAsbiI','39BpjbPO','186154ZibYwn','1912awRRPq','5180ZAjqdD','npx\x20skills\x20add\x20failed:\x20','setLogPath','86527oBvLKZ','lovrabet/rabetbase','执行安装技能包命令(委托给\x20npx\x20skills\x20add\x20-g\x20-y)','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20skill\x20is\x20already\x20present.','skill','Installing\x20official\x20skill\x20via\x20npx\x20(','unknown','407NzJkRI','inherit','cwd'];a121_0x1cfc=function(){return _0x11874d;};return a121_0x1cfc();}const a121_0x171b1b=a121_0x37b2;(function(_0x175f97,_0x20be80){const _0x43553d=a121_0x37b2,_0x2b124b=_0x175f97();while(!![]){try{const _0x32a3dc=parseInt(_0x43553d(0x1ab))/0x1+-parseInt(_0x43553d(0x1c5))/0x2*(-parseInt(_0x43553d(0x1c4))/0x3)+-parseInt(_0x43553d(0x1c6))/0x4*(-parseInt(_0x43553d(0x1c7))/0x5)+parseInt(_0x43553d(0x1c2))/0x6*(-parseInt(_0x43553d(0x1c3))/0x7)+-parseInt(_0x43553d(0x1c1))/0x8+-parseInt(_0x43553d(0x1bf))/0x9+-parseInt(_0x43553d(0x1b6))/0xa*(-parseInt(_0x43553d(0x1b2))/0xb);if(_0x32a3dc===_0x20be80)break;else _0x2b124b['push'](_0x2b124b['shift']());}catch(_0x5eb0c3){_0x2b124b['push'](_0x2b124b['shift']());}}}(a121_0x1cfc,0xa885b));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE}from'../../skills/npx-skills-add.js';export const skillDefinitions=[{'service':a121_0x171b1b(0x1af),'command':a121_0x171b1b(0x1b5),'description':a121_0x171b1b(0x1c0),'risk':a121_0x171b1b(0x1b9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0xbbc191){const _0x139bf8=a121_0x171b1b;logger[_0x139bf8(0x1aa)](process[_0x139bf8(0x1b4)]()),logger[_0x139bf8(0x1bc)]('skill-install',_0x139bf8(0x1ad));const {runNpxSkillsAddGlobal:_0x103fc2}=await import('../../skills/npx-skills-add.js'),_0x47f297=_0xbbc191['nonInteractive']?_0x139bf8(0x1b7):_0x139bf8(0x1b3);console[_0x139bf8(0x1be)](_0x139bf8(0x1b0)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+')...');const _0x37d716=_0x103fc2(process[_0x139bf8(0x1b4)](),_0x139bf8(0x1ac),{'stdio':_0x47f297});if(_0x37d716[_0x139bf8(0x1ba)])console[_0x139bf8(0x1be)](_0x139bf8(0x1ae));else{if(_0x37d716['ok'])console[_0x139bf8(0x1be)](CLI_BIN_NAME+_0x139bf8(0x1bb));else throw CliErrors['apiError'](_0x139bf8(0x1c8)+(_0x37d716[_0x139bf8(0x1bd)]||_0x139bf8(0x1b1)),_0x139bf8(0x1b8));}return{'ok':!![]};}}];