@lovrabet/rabetbase-cli 2.1.2 → 2.1.3-beta.0

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 (187) 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 -0
  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/dataset/detail.js +1 -1
  48. package/lib/commands/dataset/index.js +1 -1
  49. package/lib/commands/dataset/links.js +1 -1
  50. package/lib/commands/dataset/list.js +1 -1
  51. package/lib/commands/dataset/operations.js +1 -1
  52. package/lib/commands/db/analyze-cancel.js +1 -1
  53. package/lib/commands/db/analyze-start.js +1 -1
  54. package/lib/commands/db/analyze-status.js +1 -1
  55. package/lib/commands/db/create.js +1 -1
  56. package/lib/commands/db/delete.js +1 -1
  57. package/lib/commands/db/detail.js +1 -1
  58. package/lib/commands/db/diff.js +1 -1
  59. package/lib/commands/db/index.js +1 -1
  60. package/lib/commands/db/list.js +1 -1
  61. package/lib/commands/db/shared.js +1 -1
  62. package/lib/commands/db/tables.js +1 -1
  63. package/lib/commands/db/test.js +1 -1
  64. package/lib/commands/db/update.js +1 -1
  65. package/lib/commands/doctor.js +1 -1
  66. package/lib/commands/init/index.js +1 -1
  67. package/lib/commands/logs/index.js +1 -1
  68. package/lib/commands/menu/index.js +1 -1
  69. package/lib/commands/menu/shared/compare-table.js +1 -1
  70. package/lib/commands/menu/shared/index.js +1 -1
  71. package/lib/commands/menu/shared/inquirer.js +1 -1
  72. package/lib/commands/menu/shared/local-pages.js +1 -1
  73. package/lib/commands/menu/shared/logic.js +1 -1
  74. package/lib/commands/menu/shared/service.js +1 -1
  75. package/lib/commands/menu/shared/sync-core.js +1 -1
  76. package/lib/commands/menu/shared/update-core.js +1 -1
  77. package/lib/commands/menu/shared/valid-url.js +1 -1
  78. package/lib/commands/menu/sync.js +1 -1
  79. package/lib/commands/menu/update.js +1 -1
  80. package/lib/commands/page/generate-start.js +1 -0
  81. package/lib/commands/page/generate-status.js +1 -0
  82. package/lib/commands/page/index.js +1 -0
  83. package/lib/commands/page/pull.js +1 -0
  84. package/lib/commands/page/push.js +1 -0
  85. package/lib/commands/page/shared.js +1 -0
  86. package/lib/commands/page/standard-page-status.js +1 -0
  87. package/lib/commands/page/sync.js +1 -0
  88. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  89. package/lib/commands/project/create/format-elapsed.js +1 -1
  90. package/lib/commands/project/create/main.js +1 -1
  91. package/lib/commands/project/create/non-interactive.js +1 -1
  92. package/lib/commands/project/create/project-template-path.js +1 -1
  93. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  94. package/lib/commands/project/create/use-format-code.js +1 -1
  95. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  96. package/lib/commands/project/index.js +1 -1
  97. package/lib/commands/project/init.js +1 -1
  98. package/lib/commands/project/upgrade.js +1 -1
  99. package/lib/commands/registry.js +1 -1
  100. package/lib/commands/run/index.js +1 -1
  101. package/lib/commands/schema.js +1 -1
  102. package/lib/commands/skill/index.js +1 -1
  103. package/lib/commands/sql/create.js +1 -0
  104. package/lib/commands/sql/delete.js +1 -0
  105. package/lib/commands/sql/detail.js +1 -1
  106. package/lib/commands/sql/exec.js +1 -1
  107. package/lib/commands/sql/index.js +1 -1
  108. package/lib/commands/sql/list.js +1 -1
  109. package/lib/commands/sql/pull.js +1 -1
  110. package/lib/commands/sql/push.js +1 -0
  111. package/lib/commands/sql/save.js +1 -1
  112. package/lib/commands/sql/shared.js +1 -1
  113. package/lib/commands/sql/status.js +1 -0
  114. package/lib/commands/sql/validate.js +1 -1
  115. package/lib/config/schema.js +1 -1
  116. package/lib/constant/cdn.js +1 -0
  117. package/lib/constant/cli.js +1 -1
  118. package/lib/constant/defaults.js +1 -1
  119. package/lib/constant/domain.js +1 -1
  120. package/lib/constant/env.js +1 -1
  121. package/lib/constant/output.js +1 -1
  122. package/lib/constant/paths.js +1 -1
  123. package/lib/constant/risk.js +1 -1
  124. package/lib/context.js +1 -1
  125. package/lib/core/alias-resolver.js +1 -1
  126. package/lib/core/api-client.js +1 -1
  127. package/lib/core/bff/config.js +1 -1
  128. package/lib/core/bff/file-system.js +1 -1
  129. package/lib/core/bff/hash.js +1 -1
  130. package/lib/core/bff/lock.js +1 -1
  131. package/lib/core/bff/utils.js +1 -1
  132. package/lib/core/db-resolver.js +1 -1
  133. package/lib/core/page/file-system.js +1 -0
  134. package/lib/core/page/hash.js +1 -0
  135. package/lib/core/page/lock.js +1 -0
  136. package/lib/core/page/types.js +1 -0
  137. package/lib/core/sql-sync/config.js +1 -0
  138. package/lib/core/sql-sync/file-system.js +1 -0
  139. package/lib/core/sql-sync/hash.js +1 -0
  140. package/lib/core/sql-sync/lock.js +1 -0
  141. package/lib/core/sql-sync/types.js +1 -0
  142. package/lib/core/sql-sync/utils.js +1 -0
  143. package/lib/core/sql-validator.js +1 -1
  144. package/lib/errors.js +1 -1
  145. package/lib/framework/build-all-flags.js +1 -1
  146. package/lib/framework/flags.js +1 -1
  147. package/lib/framework/help.js +1 -1
  148. package/lib/framework/index.js +1 -1
  149. package/lib/framework/output.js +1 -1
  150. package/lib/framework/response.js +1 -1
  151. package/lib/framework/runner-alias.js +1 -1
  152. package/lib/framework/runner.js +1 -1
  153. package/lib/framework/schema-export.js +1 -1
  154. package/lib/framework/types.js +1 -1
  155. package/lib/generated/build-info.js +1 -1
  156. package/lib/help.js +1 -1
  157. package/lib/skills/main.js +1 -1
  158. package/lib/skills/npx-skills-add.js +1 -1
  159. package/lib/telemetry/cli-command-trace.js +1 -1
  160. package/lib/telemetry/cli-help-trace.js +1 -1
  161. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  162. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  163. package/lib/telemetry/send-cli-trace-log.js +1 -1
  164. package/lib/utils/ai_config.js +1 -1
  165. package/lib/utils/apply-jq-filter.js +1 -1
  166. package/lib/utils/cdn-config.js +1 -1
  167. package/lib/utils/check-sdk-version.js +1 -1
  168. package/lib/utils/cli-version-check.js +1 -1
  169. package/lib/utils/cli-version-policy.js +1 -0
  170. package/lib/utils/config.js +1 -1
  171. package/lib/utils/copy-directory.js +1 -1
  172. package/lib/utils/entity-with-id.js +1 -1
  173. package/lib/utils/file-utils.js +1 -1
  174. package/lib/utils/guides-cdn.js +1 -1
  175. package/lib/utils/http-client.js +1 -1
  176. package/lib/utils/is-non-interactive.js +1 -1
  177. package/lib/utils/logger.js +1 -1
  178. package/lib/utils/platform.js +1 -1
  179. package/lib/utils/rules-cdn.js +1 -1
  180. package/lib/utils/sleep.js +1 -1
  181. package/lib/utils/template-replacer.js +1 -1
  182. package/lib/utils/version.js +1 -1
  183. package/lib/utils/with-active-cookie.js +1 -1
  184. package/lib/utils/write-cli-side-channel.js +1 -1
  185. package/package.json +3 -2
  186. package/templates/skill/SKILL.md.tpl +1 -1
  187. package/lib/commands/bff/new.js +0 -1
@@ -1 +1 @@
1
- function a66_0x3006(_0xd7289c,_0x2e6119){_0xd7289c=_0xd7289c-0x105;const _0x50c48b=a66_0x50c4();let _0x3006b3=_0x50c48b[_0xd7289c];return _0x3006b3;}function a66_0x50c4(){const _0x5dca78=['1644807XngVzD','508dWyfqp','3400ixizUi','18242818VUeRTW','8BVSuCs','6762940hthrnd','9clHuNe','now','7110212fKRzkP','24pNgtKi','5758732TkJKXI','30tFVVtP','752142RgxrBK'];a66_0x50c4=function(){return _0x5dca78;};return a66_0x50c4();}(function(_0x2b3cfe,_0x36372f){const _0x75b316=a66_0x3006,_0x42a550=_0x2b3cfe();while(!![]){try{const _0x2e4427=-parseInt(_0x75b316(0x109))/0x1*(-parseInt(_0x75b316(0x108))/0x2)+-parseInt(_0x75b316(0x107))/0x3+-parseInt(_0x75b316(0x10f))/0x4+-parseInt(_0x75b316(0x105))/0x5*(parseInt(_0x75b316(0x106))/0x6)+parseInt(_0x75b316(0x111))/0x7*(-parseInt(_0x75b316(0x10b))/0x8)+-parseInt(_0x75b316(0x10d))/0x9*(-parseInt(_0x75b316(0x10c))/0xa)+-parseInt(_0x75b316(0x10a))/0xb*(-parseInt(_0x75b316(0x110))/0xc);if(_0x2e4427===_0x36372f)break;else _0x42a550['push'](_0x42a550['shift']());}catch(_0x10365c){_0x42a550['push'](_0x42a550['shift']());}}}(a66_0x50c4,0xe96e2));export function formatElapsed(_0x5eb721){const _0x1c98ca=a66_0x3006,_0x368295=Date[_0x1c98ca(0x10e)]()-_0x5eb721;if(_0x368295<0x3e8)return _0x368295+'ms';const _0x5e9524=(_0x368295/0x3e8)['toFixed'](0x2),_0x2bfe46=_0x5e9524['replace'](/\.?0+$/u,'');return _0x2bfe46+'s';}
1
+ function a89_0x35d6(_0x27447b,_0x2a94e3){_0x27447b=_0x27447b-0x10b;const _0x1f9c82=a89_0x1f9c();let _0x35d676=_0x1f9c82[_0x27447b];return _0x35d676;}(function(_0x4b94be,_0x1bc833){const _0xdb0793=a89_0x35d6,_0x3e55ec=_0x4b94be();while(!![]){try{const _0x381039=-parseInt(_0xdb0793(0x111))/0x1*(-parseInt(_0xdb0793(0x115))/0x2)+parseInt(_0xdb0793(0x117))/0x3*(parseInt(_0xdb0793(0x110))/0x4)+-parseInt(_0xdb0793(0x10b))/0x5+-parseInt(_0xdb0793(0x113))/0x6+parseInt(_0xdb0793(0x10f))/0x7*(-parseInt(_0xdb0793(0x10c))/0x8)+-parseInt(_0xdb0793(0x112))/0x9*(-parseInt(_0xdb0793(0x10d))/0xa)+parseInt(_0xdb0793(0x10e))/0xb*(-parseInt(_0xdb0793(0x116))/0xc);if(_0x381039===_0x1bc833)break;else _0x3e55ec['push'](_0x3e55ec['shift']());}catch(_0x5d1bce){_0x3e55ec['push'](_0x3e55ec['shift']());}}}(a89_0x1f9c,0xd57d4));function a89_0x1f9c(){const _0x36a594=['805JYpiQJ','8FDNzgw','88PpSeBr','98397puVWux','3730326weQeax','now','26282vTPrpa','24uQhRMA','2331639fkMTJM','6637240BhYVoz','10288bCSbeu','830ElRdMA','3557191htocNi'];a89_0x1f9c=function(){return _0x36a594;};return a89_0x1f9c();}export function formatElapsed(_0x441d3b){const _0x535b85=a89_0x35d6,_0x57ecc4=Date[_0x535b85(0x114)]()-_0x441d3b;if(_0x57ecc4<0x3e8)return _0x57ecc4+'ms';const _0x273f45=(_0x57ecc4/0x3e8)['toFixed'](0x2),_0x248a0a=_0x273f45['replace'](/\.?0+$/u,'');return _0x248a0a+'s';}
@@ -1 +1 @@
1
- (function(_0x506459,_0x25f164){const _0x274396=a67_0x121b,_0x3c04ef=_0x506459();while(!![]){try{const _0x4dbe7f=-parseInt(_0x274396(0xf3))/0x1+-parseInt(_0x274396(0xf4))/0x2+-parseInt(_0x274396(0xf9))/0x3+-parseInt(_0x274396(0x133))/0x4*(parseInt(_0x274396(0xe6))/0x5)+-parseInt(_0x274396(0xf7))/0x6+parseInt(_0x274396(0x132))/0x7+parseInt(_0x274396(0x127))/0x8;if(_0x4dbe7f===_0x25f164)break;else _0x3c04ef['push'](_0x3c04ef['shift']());}catch(_0x4579f3){_0x3c04ef['push'](_0x3c04ef['shift']());}}}(a67_0x4206,0x5687d));import a67_0x317c8f from'path';import a67_0x1a089c from'fs';import a67_0x56368a from'chalk';function a67_0x4206(){const _0x5e09ae=['error','配置应用AppCode:\x20','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','\x20Generated\x20by\x20rabetbase\x20cli\x20','\x20dataset(s),\x20generated\x20','info','message','log','dirname','rmSync','parse','description','清理项目目录失败:\x20','name','cookie','√\x20package.json\x20updated:\x20name=','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','√\x20Pulled\x20','length','trim','更新\x20package.json\x20name','\x20already\x20exists','\x20api\x20pull','Project\x20name:\x20','constants','projectCode','\x20|\x20Default:\x20','accessSync','\x20run\x20start','配置应用AppCode失败','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','readFileSync','\x20model(s)','existsSync','package.json','🚀\x20Next\x20Steps:','keys','warn','开始创建项目:\x20','bold','Project\x20directory\x20','Project\x20name\x20cannot\x20be\x20empty','Format\x20code','\x20&&\x20','11548416aJqMpX','Copy\x20project\x20files','modelCount','CLI\x20版本检查','create','join','更新\x20package.json\x20失败','env','success','API\x20配置拉取异常','needsUpgrade','1680476cSkqeA','41196bTxejn','projectName','setLogPath','utf8','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','\x20√\x20','green','chdir','gray','120ktardw','appCode','\x20|\x20AppCode:\x20','version','string','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','\x20config\x20set\x20appcode\x20<app-code>\x27','1.0.0','...','writeFileSync','fail','cwd','cyan','75291OKufVy','531688ogLMHE','production','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','2220318UQKTkx','defaultApp','1112481duHrgD'];a67_0x4206=function(){return _0x5e09ae;};return a67_0x4206();}import a67_0x13aa8b from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../api/fetch-model-list.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';function a67_0x121b(_0x44f572,_0x5947f9){_0x44f572=_0x44f572-0xde;const _0x420636=a67_0x4206();let _0x121be0=_0x420636[_0x44f572];return _0x121be0;}import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x478f19){const _0x48d436=a67_0x121b,_0x2f3fae=await checkCliVersion();_0x2f3fae[_0x48d436(0x131)]&&(printCliUpgradeWarning(_0x2f3fae),logger['info'](_0x48d436(0x12b),_0x48d436(0x12a),{'currentVersion':_0x2f3fae['currentVersion'],'stableVersion':_0x2f3fae['stableVersion'],'needsUpgrade':_0x2f3fae[_0x48d436(0x131)]}));if(_0x478f19[_0x48d436(0x114)]&&_0x478f19[_0x48d436(0xe7)])await runCreate({'projectName':_0x478f19[_0x48d436(0x114)],'appCode':_0x478f19['appCode'],'env':_0x478f19['env']},_0x478f19);else{if(_0x478f19['projectCode']){const _0x446b46=await selectSingleAppcode(_0x478f19[_0x48d436(0x109)]);await runCreate({'projectName':_0x478f19[_0x48d436(0x114)],'appCode':_0x446b46||undefined,'env':_0x478f19[_0x48d436(0x12e)]},_0x478f19);}else await guidedCreateProject(_0x17476b=>runCreate(_0x17476b,_0x478f19),_0x478f19[_0x48d436(0x12e)],_0x478f19[_0x48d436(0x109)]);}}async function runCreate(_0x3099c5,_0x435f10){const _0x1d1a2b=a67_0x121b;if(!_0x3099c5[_0x1d1a2b(0xde)]||_0x3099c5[_0x1d1a2b(0xde)][_0x1d1a2b(0x10e)]()==='')throw new Error(_0x1d1a2b(0x124));const _0x2df16a=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x2df16a['test'](_0x3099c5['projectName']))throw new Error(_0x1d1a2b(0xfd));if(_0x3099c5[_0x1d1a2b(0xde)][_0x1d1a2b(0x10d)]>0x64)throw new Error(_0x1d1a2b(0x119));const _0x1ce210=a67_0x317c8f['resolve'](process[_0x1d1a2b(0xf1)](),_0x3099c5[_0x1d1a2b(0xde)]);if(a67_0x1a089c[_0x1d1a2b(0x11c)](_0x1ce210))throw new Error(_0x1d1a2b(0x123)+_0x3099c5['projectName']+_0x1d1a2b(0x110));try{a67_0x1a089c[_0x1d1a2b(0x116)](a67_0x317c8f[_0x1d1a2b(0x103)](_0x1ce210),a67_0x1a089c[_0x1d1a2b(0x113)]['W_OK']);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x1d1a2b(0xdf)](_0x1ce210),logger[_0x1d1a2b(0x100)](_0x1d1a2b(0x12b),_0x1d1a2b(0x121)+_0x3099c5['projectName'],{'projectDir':_0x1ce210,'appCode':_0x3099c5[_0x1d1a2b(0xe7)]}),console['log'](),console[_0x1d1a2b(0x102)](a67_0x56368a[_0x1d1a2b(0xe3)](_0x1d1a2b(0xe2))+_0x1d1a2b(0x112)+a67_0x56368a['green'](_0x3099c5['projectName'])+(_0x3099c5[_0x1d1a2b(0xe7)]?_0x1d1a2b(0xe8)+a67_0x56368a[_0x1d1a2b(0xf2)](_0x3099c5[_0x1d1a2b(0xe7)]):''));try{await runTask(_0x1d1a2b(0x128),()=>copyProjectTemplate(_0x3099c5[_0x1d1a2b(0xde)])),await updatePackageJsonName(_0x3099c5[_0x1d1a2b(0xde)]),await runTask('Install\x20dependencies',()=>installDependencies(_0x3099c5[_0x1d1a2b(0xde)])),await runTask(_0x1d1a2b(0x125),()=>formatProjectCode(_0x3099c5[_0x1d1a2b(0xde)])),await configureAppCode(_0x3099c5['projectName'],_0x3099c5[_0x1d1a2b(0xe7)]||'',_0x3099c5[_0x1d1a2b(0x12e)]);let _0x16920e=![];if(_0x3099c5[_0x1d1a2b(0xe7)]){console[_0x1d1a2b(0x102)]('*\x20Pulling\x20API\x20configuration...');const _0x289115=process['cwd']();try{process['chdir'](_0x1ce210);const _0x7e552a=_0x3099c5[_0x1d1a2b(0x12e)]||'production';initEnv(_0x7e552a);const {configArray:_0x49c0ad}=await fetchModelList(_0x3099c5[_0x1d1a2b(0xe7)],_0x435f10['cookie']||''),_0x3d5e8a=DEFAULT_API_DIR,_0x45e046=await generateApiFile(_0x49c0ad,'',_0x3099c5[_0x1d1a2b(0xe7)],!![],_0x7e552a,_0x3d5e8a);console['log'](_0x1d1a2b(0x10c)+_0x49c0ad[_0x1d1a2b(0x10d)]+_0x1d1a2b(0xff)+_0x45e046[_0x1d1a2b(0x129)]+_0x1d1a2b(0x11b)),logger[_0x1d1a2b(0x100)](_0x1d1a2b(0x12b),'API\x20configuration\x20pulled:\x20'+_0x3099c5[_0x1d1a2b(0xe7)]);}catch(_0x34de3f){_0x16920e=!![],console[_0x1d1a2b(0x102)](_0x1d1a2b(0xfc)),logger[_0x1d1a2b(0x120)](_0x1d1a2b(0x12b),_0x1d1a2b(0x130),{'error':_0x34de3f instanceof Error?_0x34de3f[_0x1d1a2b(0x101)]:String(_0x34de3f)});}finally{process[_0x1d1a2b(0xe4)](_0x289115);}}logger[_0x1d1a2b(0x12f)](_0x1d1a2b(0x12b),'项目创建完成:\x20'+_0x3099c5['projectName']),console[_0x1d1a2b(0x102)](),console[_0x1d1a2b(0x102)](a67_0x56368a['green']('─'['repeat'](0x3c))),console['log'](a67_0x56368a[_0x1d1a2b(0xf2)][_0x1d1a2b(0x122)](_0x1d1a2b(0x11e))),console[_0x1d1a2b(0x102)](),console[_0x1d1a2b(0x102)]('\x20\x201.\x20Start\x20project:\x20'+a67_0x56368a[_0x1d1a2b(0xf2)]['bold']('cd\x20'+_0x3099c5[_0x1d1a2b(0xde)]+_0x1d1a2b(0x126)+CLI_BIN_NAME+_0x1d1a2b(0x117))),_0x16920e&&console['log']('\x20\x202.\x20Pull\x20API\x20configuration:\x20'+a67_0x56368a['cyan'][_0x1d1a2b(0x122)](CLI_BIN_NAME+_0x1d1a2b(0x111))),console[_0x1d1a2b(0x102)](a67_0x56368a[_0x1d1a2b(0xe3)]('─'['repeat'](0x3c)));}catch(_0x4b766f){logger[_0x1d1a2b(0xfa)](_0x1d1a2b(0x12b),'项目创建失败:\x20'+_0x3099c5[_0x1d1a2b(0xde)],{'error':_0x4b766f instanceof Error?_0x4b766f[_0x1d1a2b(0x101)]:String(_0x4b766f)});try{a67_0x1a089c['existsSync'](_0x1ce210)&&(console[_0x1d1a2b(0x102)](_0x1d1a2b(0xeb)+_0x1ce210),a67_0x1a089c[_0x1d1a2b(0x104)](_0x1ce210,{'recursive':!![],'force':!![]}));}catch{logger[_0x1d1a2b(0x120)](_0x1d1a2b(0x12b),_0x1d1a2b(0x107)+_0x1ce210);}throw _0x4b766f;}}async function runTask(_0x456ed2,_0x5ca313){const _0x4fc09f=a67_0x121b,_0x12d96a=a67_0x13aa8b(_0x456ed2+_0x4fc09f(0xee))['start']();try{const _0x4e4634=await _0x5ca313();_0x12d96a['stop'](),console[_0x4fc09f(0x102)](''+a67_0x56368a['green'](_0x4fc09f(0xe2))+_0x456ed2+'\x20'+a67_0x56368a[_0x4fc09f(0xe5)]('['+_0x4e4634+']'));}catch(_0x18c244){_0x12d96a[_0x4fc09f(0xf0)](_0x456ed2);throw _0x18c244;}}async function updatePackageJsonName(_0x17ea77){const _0x5d1bbf=a67_0x121b,_0x10bef6=a67_0x317c8f['resolve'](process[_0x5d1bbf(0xf1)](),_0x17ea77),_0x7a952e=a67_0x317c8f[_0x5d1bbf(0x12c)](_0x10bef6,'package.json');try{console[_0x5d1bbf(0x102)](_0x5d1bbf(0xe1));const _0xc9088a=getRabetbaseCliPackageRoot(),_0x4b153d=a67_0x317c8f[_0x5d1bbf(0x12c)](_0xc9088a,_0x5d1bbf(0x11d));let _0x566890=_0x5d1bbf(0xed);try{const _0x4c0938=JSON[_0x5d1bbf(0x105)](a67_0x1a089c['readFileSync'](_0x4b153d,_0x5d1bbf(0xe0)));_0x566890=_0x4c0938[_0x5d1bbf(0xe9)]||_0x5d1bbf(0xed);}catch{}const _0x45c31c=a67_0x1a089c[_0x5d1bbf(0x11a)](_0x7a952e,_0x5d1bbf(0xe0)),_0x3df0a1=JSON[_0x5d1bbf(0x105)](_0x45c31c);_0x3df0a1[_0x5d1bbf(0x108)]=_0x17ea77,_0x3df0a1[_0x5d1bbf(0x106)]=_0x17ea77+_0x5d1bbf(0xfe)+_0x566890,a67_0x1a089c[_0x5d1bbf(0xef)](_0x7a952e,JSON['stringify'](_0x3df0a1,null,0x2)+'\x0a',_0x5d1bbf(0xe0)),console[_0x5d1bbf(0x102)](_0x5d1bbf(0x10a)+_0x17ea77),logger[_0x5d1bbf(0x100)]('create',_0x5d1bbf(0x10f));}catch(_0x73a160){logger[_0x5d1bbf(0xfa)](_0x5d1bbf(0x12b),_0x5d1bbf(0x12d));throw _0x73a160;}}async function configureAppCode(_0x13c730,_0x15e171,_0x201398){const _0x4aedd6=a67_0x121b,_0x355805=a67_0x317c8f['resolve'](process[_0x4aedd6(0xf1)](),_0x13c730),_0x41c7cf=a67_0x317c8f[_0x4aedd6(0x12c)](_0x355805,NEW_CONFIG_NAME);try{_0x15e171?console[_0x4aedd6(0x102)]('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x13c730+':\x20'+_0x15e171):console['log'](_0x4aedd6(0xf6)+_0x13c730);const _0x5a5ad6=getRabetbaseCliPackageRoot(),_0xc37e27=a67_0x317c8f['join'](_0x5a5ad6,_0x4aedd6(0x11d));let _0x39fb3f='1.0.0';try{const _0xeb3b78=JSON['parse'](a67_0x1a089c[_0x4aedd6(0x11a)](_0xc37e27,_0x4aedd6(0xe0)));_0x39fb3f=_0xeb3b78[_0x4aedd6(0xe9)]||_0x4aedd6(0xed);}catch{}const _0x1b3f15=readConfig(),_0x15931e=typeof _0x1b3f15[_0x4aedd6(0x12e)]===_0x4aedd6(0xea)?_0x1b3f15[_0x4aedd6(0x12e)]:undefined,_0x32106e={};for(const _0x4df6e1 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x1b3f15[_0x4df6e1]!=null)_0x32106e[_0x4df6e1]=_0x1b3f15[_0x4df6e1];}const _0x2f03e0=buildCanonicalProjectConfig(_0x32106e,{'appCodes':_0x15e171?[_0x15e171]:[],'env':_0x201398||_0x15931e||_0x4aedd6(0xf5),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x39fb3f}});writeConfigFile(_0x41c7cf,_0x2f03e0),_0x15e171?console[_0x4aedd6(0x102)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object[_0x4aedd6(0x11f)](_0x2f03e0['apps']||{})['join'](',\x20')+_0x4aedd6(0x115)+_0x2f03e0[_0x4aedd6(0xf8)]):console[_0x4aedd6(0x102)](_0x4aedd6(0x10b)+CLI_BIN_NAME+_0x4aedd6(0xec)),logger['info'](_0x4aedd6(0x12b),_0x4aedd6(0xfb)+_0x15e171);}catch(_0x59ba34){logger[_0x4aedd6(0xfa)]('create',_0x4aedd6(0x118));}}
1
+ function a90_0x3c03(){const _0x167dba=['log','name','CLI\x20版本检查','\x20model(s)','resolve','production','dirname','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','utf8','package.json','keys','create','join','projectCode','cyan','W_OK','setLogPath','\x20\x202.\x20Pull\x20API\x20configuration:\x20','cookie','needsUpgrade','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','cd\x20','length','parse','\x20&&\x20','1669632wbvvFQ','\x20dataset(s),\x20generated\x20','cwd','7yMMTKr','34218LBIEUG','stringify','370vpyEvX','gray','stableVersion','defaultApp','existsSync','√\x20Configuration\x20file\x20created,\x20Apps:\x20','2386020ZjWNVp','info','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','chdir','580LzykEN','\x20√\x20','开始创建项目:\x20','start','version','\x20|\x20AppCode:\x20','\x20config\x20set\x20appcode\x20<app-code>\x27','repeat','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','2255508cdpFWc','writeFileSync','green','Project\x20name:\x20','minimumVersion','bold','projectName','Copy\x20project\x20files','fail','test','363024slBqYL','3822nGhVac','appCode','rmSync','配置应用AppCode:\x20','description','trim','\x20Generated\x20by\x20rabetbase\x20cli\x20','Project\x20name\x20cannot\x20be\x20empty','清理项目目录失败:\x20','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','env','\x20api\x20pull','*\x20Pulling\x20API\x20configuration...','Install\x20dependencies','warn','message','belowMinimum','API\x20配置拉取异常','更新\x20package.json\x20失败','🚀\x20Next\x20Steps:','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','1.0.0','233163lEJnVR','√\x20package.json\x20updated:\x20name=','stop','error','\x20\x201.\x20Start\x20project:\x20','success','readFileSync','\x20already\x20exists','...','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'];a90_0x3c03=function(){return _0x167dba;};return a90_0x3c03();}(function(_0x41e939,_0x460a10){const _0x4591f7=a90_0x1f01,_0x3a1b3b=_0x41e939();while(!![]){try{const _0x10eb35=-parseInt(_0x4591f7(0x1c9))/0x1+-parseInt(_0x4591f7(0x1e8))/0x2+-parseInt(_0x4591f7(0x1e9))/0x3*(parseInt(_0x4591f7(0x1d5))/0x4)+-parseInt(_0x4591f7(0x1d1))/0x5+-parseInt(_0x4591f7(0x1de))/0x6*(-parseInt(_0x4591f7(0x1c8))/0x7)+-parseInt(_0x4591f7(0x1c5))/0x8+parseInt(_0x4591f7(0x1ff))/0x9*(parseInt(_0x4591f7(0x1cb))/0xa);if(_0x10eb35===_0x460a10)break;else _0x3a1b3b['push'](_0x3a1b3b['shift']());}catch(_0x595d81){_0x3a1b3b['push'](_0x3a1b3b['shift']());}}}(a90_0x3c03,0x3c92d));import a90_0xd8ba55 from'path';import a90_0x5fec7a from'fs';import a90_0x4ab2d4 from'chalk';import a90_0x5d6bf4 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../api/fetch-model-list.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';function a90_0x1f01(_0x43f8c5,_0x37eac5){_0x43f8c5=_0x43f8c5-0x1ba;const _0x3c0398=a90_0x3c03();let _0x1f01a2=_0x3c0398[_0x43f8c5];return _0x1f01a2;}import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x397c6d){const _0x26409d=a90_0x1f01,_0xb7de43=await checkCliVersion();(_0xb7de43['needsUpgrade']||_0xb7de43[_0x26409d(0x1f9)])&&(printCliUpgradeWarning(_0xb7de43),assertCliVersionSupported(_0xb7de43),logger[_0x26409d(0x1d2)]('create',_0x26409d(0x20b),{'currentVersion':_0xb7de43['currentVersion'],'stableVersion':_0xb7de43[_0x26409d(0x1cd)],'minimumVersion':_0xb7de43[_0x26409d(0x1e2)],'needsUpgrade':_0xb7de43[_0x26409d(0x1bf)],'belowMinimum':_0xb7de43[_0x26409d(0x1f9)]}));if(_0x397c6d[_0x26409d(0x216)]&&_0x397c6d[_0x26409d(0x1ea)])await runCreate({'projectName':_0x397c6d[_0x26409d(0x216)],'appCode':_0x397c6d['appCode'],'env':_0x397c6d[_0x26409d(0x1f3)]},_0x397c6d);else{if(_0x397c6d[_0x26409d(0x216)]){const _0x5425fe=await selectSingleAppcode(_0x397c6d[_0x26409d(0x1be)]);await runCreate({'projectName':_0x397c6d[_0x26409d(0x216)],'appCode':_0x5425fe||undefined,'env':_0x397c6d['env']},_0x397c6d);}else await guidedCreateProject(_0x52f47a=>runCreate(_0x52f47a,_0x397c6d),_0x397c6d[_0x26409d(0x1f3)],_0x397c6d['cookie']);}}async function runCreate(_0x346193,_0xe4bfe7){const _0x468170=a90_0x1f01;if(!_0x346193[_0x468170(0x1e4)]||_0x346193[_0x468170(0x1e4)][_0x468170(0x1ee)]()==='')throw new Error(_0x468170(0x1f0));const _0x15c783=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x15c783[_0x468170(0x1e7)](_0x346193[_0x468170(0x1e4)]))throw new Error(_0x468170(0x210));if(_0x346193[_0x468170(0x1e4)][_0x468170(0x1c2)]>0x64)throw new Error(_0x468170(0x1fd));const _0x33d3da=a90_0xd8ba55[_0x468170(0x20d)](process['cwd'](),_0x346193[_0x468170(0x1e4)]);if(a90_0x5fec7a[_0x468170(0x1cf)](_0x33d3da))throw new Error('Project\x20directory\x20'+_0x346193[_0x468170(0x1e4)]+_0x468170(0x206));try{a90_0x5fec7a['accessSync'](a90_0xd8ba55[_0x468170(0x20f)](_0x33d3da),a90_0x5fec7a['constants'][_0x468170(0x1bb)]);}catch{throw new Error(_0x468170(0x1c0));}logger[_0x468170(0x1bc)](_0x33d3da),logger[_0x468170(0x1d2)](_0x468170(0x214),_0x468170(0x1d7)+_0x346193['projectName'],{'projectDir':_0x33d3da,'appCode':_0x346193[_0x468170(0x1ea)]}),console[_0x468170(0x209)](),console['log'](a90_0x4ab2d4[_0x468170(0x1e0)](_0x468170(0x1d6))+_0x468170(0x1e1)+a90_0x4ab2d4[_0x468170(0x1e0)](_0x346193[_0x468170(0x1e4)])+(_0x346193[_0x468170(0x1ea)]?_0x468170(0x1da)+a90_0x4ab2d4['cyan'](_0x346193[_0x468170(0x1ea)]):''));try{await runTask(_0x468170(0x1e5),()=>copyProjectTemplate(_0x346193[_0x468170(0x1e4)])),await updatePackageJsonName(_0x346193[_0x468170(0x1e4)]),await runTask(_0x468170(0x1f6),()=>installDependencies(_0x346193[_0x468170(0x1e4)])),await runTask('Format\x20code',()=>formatProjectCode(_0x346193[_0x468170(0x1e4)])),await configureAppCode(_0x346193[_0x468170(0x1e4)],_0x346193[_0x468170(0x1ea)]||'',_0x346193[_0x468170(0x1f3)]);let _0xf18dcc=![];if(_0x346193['appCode']){console['log'](_0x468170(0x1f5));const _0x25914a=process[_0x468170(0x1c7)]();try{process[_0x468170(0x1d4)](_0x33d3da);const _0x165d55=_0x346193['env']||_0x468170(0x20e);initEnv(_0x165d55);const {configArray:_0x2f74a5}=await fetchModelList(_0x346193[_0x468170(0x1ea)],_0xe4bfe7[_0x468170(0x1be)]||''),_0x39f50d=DEFAULT_API_DIR,_0x4cbf1a=await generateApiFile(_0x2f74a5,'',_0x346193[_0x468170(0x1ea)],!![],_0x165d55,_0x39f50d);console[_0x468170(0x209)]('√\x20Pulled\x20'+_0x2f74a5[_0x468170(0x1c2)]+_0x468170(0x1c6)+_0x4cbf1a['modelCount']+_0x468170(0x20c)),logger[_0x468170(0x1d2)](_0x468170(0x214),'API\x20configuration\x20pulled:\x20'+_0x346193['appCode']);}catch(_0x1f5f9c){_0xf18dcc=!![],console[_0x468170(0x209)]('!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull'),logger[_0x468170(0x1f7)]('create',_0x468170(0x1fa),{'error':_0x1f5f9c instanceof Error?_0x1f5f9c['message']:String(_0x1f5f9c)});}finally{process['chdir'](_0x25914a);}}logger[_0x468170(0x204)](_0x468170(0x214),'项目创建完成:\x20'+_0x346193[_0x468170(0x1e4)]),console['log'](),console[_0x468170(0x209)](a90_0x4ab2d4[_0x468170(0x1e0)]('─'[_0x468170(0x1dc)](0x3c))),console[_0x468170(0x209)](a90_0x4ab2d4['cyan'][_0x468170(0x1e3)](_0x468170(0x1fc))),console['log'](),console['log'](_0x468170(0x203)+a90_0x4ab2d4['cyan'][_0x468170(0x1e3)](_0x468170(0x1c1)+_0x346193[_0x468170(0x1e4)]+_0x468170(0x1c4)+CLI_BIN_NAME+'\x20run\x20start')),_0xf18dcc&&console['log'](_0x468170(0x1bd)+a90_0x4ab2d4[_0x468170(0x1ba)][_0x468170(0x1e3)](CLI_BIN_NAME+_0x468170(0x1f4))),console['log'](a90_0x4ab2d4['green']('─'['repeat'](0x3c)));}catch(_0x5b7c7c){logger['error'](_0x468170(0x214),'项目创建失败:\x20'+_0x346193[_0x468170(0x1e4)],{'error':_0x5b7c7c instanceof Error?_0x5b7c7c[_0x468170(0x1f8)]:String(_0x5b7c7c)});try{a90_0x5fec7a[_0x468170(0x1cf)](_0x33d3da)&&(console[_0x468170(0x209)](_0x468170(0x1d3)+_0x33d3da),a90_0x5fec7a[_0x468170(0x1eb)](_0x33d3da,{'recursive':!![],'force':!![]}));}catch{logger[_0x468170(0x1f7)]('create',_0x468170(0x1f1)+_0x33d3da);}throw _0x5b7c7c;}}async function runTask(_0x4873e7,_0x24f2ff){const _0x2fa005=a90_0x1f01,_0x188dad=a90_0x5d6bf4(_0x4873e7+_0x2fa005(0x207))[_0x2fa005(0x1d8)]();try{const _0x1115a9=await _0x24f2ff();_0x188dad[_0x2fa005(0x201)](),console['log'](''+a90_0x4ab2d4[_0x2fa005(0x1e0)](_0x2fa005(0x1d6))+_0x4873e7+'\x20'+a90_0x4ab2d4[_0x2fa005(0x1cc)]('['+_0x1115a9+']'));}catch(_0x2f54a7){_0x188dad[_0x2fa005(0x1e6)](_0x4873e7);throw _0x2f54a7;}}async function updatePackageJsonName(_0x440ffe){const _0x36a6b2=a90_0x1f01,_0x1e08d8=a90_0xd8ba55[_0x36a6b2(0x20d)](process[_0x36a6b2(0x1c7)](),_0x440ffe),_0x3f26f7=a90_0xd8ba55['join'](_0x1e08d8,_0x36a6b2(0x212));try{console['log'](_0x36a6b2(0x1f2));const _0x47757f=getRabetbaseCliPackageRoot(),_0x3091f6=a90_0xd8ba55['join'](_0x47757f,_0x36a6b2(0x212));let _0x15e69e=_0x36a6b2(0x1fe);try{const _0x39eeb0=JSON[_0x36a6b2(0x1c3)](a90_0x5fec7a[_0x36a6b2(0x205)](_0x3091f6,_0x36a6b2(0x211)));_0x15e69e=_0x39eeb0['version']||_0x36a6b2(0x1fe);}catch{}const _0x5f32d3=a90_0x5fec7a['readFileSync'](_0x3f26f7,_0x36a6b2(0x211)),_0x435fdd=JSON['parse'](_0x5f32d3);_0x435fdd[_0x36a6b2(0x20a)]=_0x440ffe,_0x435fdd[_0x36a6b2(0x1ed)]=_0x440ffe+_0x36a6b2(0x1ef)+_0x15e69e,a90_0x5fec7a[_0x36a6b2(0x1df)](_0x3f26f7,JSON[_0x36a6b2(0x1ca)](_0x435fdd,null,0x2)+'\x0a',_0x36a6b2(0x211)),console[_0x36a6b2(0x209)](_0x36a6b2(0x200)+_0x440ffe),logger[_0x36a6b2(0x1d2)](_0x36a6b2(0x214),'更新\x20package.json\x20name');}catch(_0x4c75ae){logger['error'](_0x36a6b2(0x214),_0x36a6b2(0x1fb));throw _0x4c75ae;}}async function configureAppCode(_0x343f72,_0x3b440c,_0x36237a){const _0x5ca339=a90_0x1f01,_0x5c689c=a90_0xd8ba55[_0x5ca339(0x20d)](process['cwd'](),_0x343f72),_0x510786=a90_0xd8ba55[_0x5ca339(0x215)](_0x5c689c,NEW_CONFIG_NAME);try{_0x3b440c?console[_0x5ca339(0x209)]('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x343f72+':\x20'+_0x3b440c):console[_0x5ca339(0x209)](_0x5ca339(0x1dd)+_0x343f72);const _0x1e72fe=getRabetbaseCliPackageRoot(),_0x19f18b=a90_0xd8ba55[_0x5ca339(0x215)](_0x1e72fe,_0x5ca339(0x212));let _0x1f7cdc=_0x5ca339(0x1fe);try{const _0x25eed3=JSON['parse'](a90_0x5fec7a[_0x5ca339(0x205)](_0x19f18b,_0x5ca339(0x211)));_0x1f7cdc=_0x25eed3[_0x5ca339(0x1d9)]||_0x5ca339(0x1fe);}catch{}const _0x398b99=readConfig(),_0xd6e5d4=typeof _0x398b99['env']==='string'?_0x398b99[_0x5ca339(0x1f3)]:undefined,_0x246575={};for(const _0x1115f1 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x398b99[_0x1115f1]!=null)_0x246575[_0x1115f1]=_0x398b99[_0x1115f1];}const _0x1dd570=buildCanonicalProjectConfig(_0x246575,{'appCodes':_0x3b440c?[_0x3b440c]:[],'env':_0x36237a||_0xd6e5d4||_0x5ca339(0x20e),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x1f7cdc}});writeConfigFile(_0x510786,_0x1dd570),_0x3b440c?console[_0x5ca339(0x209)](_0x5ca339(0x1d0)+Object[_0x5ca339(0x213)](_0x1dd570['apps']||{})[_0x5ca339(0x215)](',\x20')+'\x20|\x20Default:\x20'+_0x1dd570[_0x5ca339(0x1ce)]):console[_0x5ca339(0x209)](_0x5ca339(0x208)+CLI_BIN_NAME+_0x5ca339(0x1db)),logger['info']('create',_0x5ca339(0x1ec)+_0x3b440c);}catch(_0x4b9ef8){logger[_0x5ca339(0x202)]('create','配置应用AppCode失败');}}
@@ -1 +1 @@
1
- (function(_0xa4db88,_0x2e067d){const _0x4c10dc=a61_0x3074,_0x3da6c5=_0xa4db88();while(!![]){try{const _0x4c87e8=parseInt(_0x4c10dc(0x192))/0x1*(-parseInt(_0x4c10dc(0x1b0))/0x2)+parseInt(_0x4c10dc(0x18b))/0x3+-parseInt(_0x4c10dc(0x19f))/0x4+-parseInt(_0x4c10dc(0x1c2))/0x5+-parseInt(_0x4c10dc(0x1bf))/0x6*(-parseInt(_0x4c10dc(0x1a8))/0x7)+parseInt(_0x4c10dc(0x1c0))/0x8+parseInt(_0x4c10dc(0x1b2))/0x9;if(_0x4c87e8===_0x2e067d)break;else _0x3da6c5['push'](_0x3da6c5['shift']());}catch(_0x3cab2f){_0x3da6c5['push'](_0x3da6c5['shift']());}}}(a61_0x193f,0x44451));import a61_0x3355ab from'path';import a61_0x3896f9 from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';function a61_0x193f(){const _0x486298=['\x20\x20√\x20Project\x20template\x20created','parse','\x20\x20rabetbase\x20run\x20start\x0a','Cannot\x20create\x20project\x20in\x20current\x20directory.','\x0a\x20\x20cd\x20','name','1boDCzy','join','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','\x20api\x20pull`\x20manually\x20later.','modelCount','resolve','\x20dataset(s),\x20generated\x20','\x0a√\x20Project\x20','cwd','production','\x22\x20already\x20exists.','npm','validation','1750176EMyYbi','\x20\x20√\x20Code\x20formatted','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','...','bun\x20--version','needsUpgrade','string','chdir','bun','2255827aihSKt','constants','bun\x20run\x20format','trim','ignore','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','length','*\x20Creating\x20project\x20','842082oDWkGC','utf-8','929025umfMUS','env','log','\x20\x20Installing\x20dependencies...','\x20\x20√\x20Pulled\x20','writeFile','Project\x20directory\x20\x22','access','\x20\x20√\x20package.json\x20updated','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','description','stringify','readFile','6SqDEeU','4014656McZXak','Project\x20name\x20contains\x20invalid\x20characters.','649110YTOjxm','toLocaleString','\x20model(s)','1022166WBATkh'];a61_0x193f=function(){return _0x486298;};return a61_0x193f();}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);function a61_0x3074(_0x1c91f3,_0x13d474){_0x1c91f3=_0x1c91f3-0x18b;const _0x193fb2=a61_0x193f();let _0x307416=_0x193fb2[_0x1c91f3];return _0x307416;}export async function createProjectNonInteractive(_0x131c4b,_0x388d31,_0x487970,_0x56ea6d){const _0x76845f=a61_0x3074,_0x36728e=await checkCliVersion();_0x36728e[_0x76845f(0x1a4)]&&printCliUpgradeWarning(_0x36728e);if(!_0x131c4b||_0x131c4b[_0x76845f(0x1ab)]()==='')throw CliErrors[_0x76845f(0x19e)]('Project\x20name\x20cannot\x20be\x20empty.');const _0x139dc3=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x139dc3['test'](_0x131c4b))throw CliErrors[_0x76845f(0x19e)](_0x76845f(0x1c1),_0x76845f(0x1ad));if(_0x131c4b[_0x76845f(0x1ae)]>0x64)throw CliErrors[_0x76845f(0x19e)](_0x76845f(0x1a1));const _0x43d0af=a61_0x3355ab[_0x76845f(0x197)](process[_0x76845f(0x19a)](),_0x131c4b);if(existsSync(_0x43d0af))throw CliErrors[_0x76845f(0x19e)](_0x76845f(0x1b8)+_0x131c4b+_0x76845f(0x19c),'Use\x20a\x20different\x20project\x20name.');try{const _0x45af04=a61_0x3355ab['dirname'](_0x43d0af);await a61_0x3896f9[_0x76845f(0x1b9)](_0x45af04,a61_0x3896f9[_0x76845f(0x1a9)]['W_OK']);}catch{throw CliErrors[_0x76845f(0x19e)](_0x76845f(0x18f),'Check\x20directory\x20permissions.');}try{console[_0x76845f(0x1b4)](_0x76845f(0x1af)+_0x131c4b+_0x76845f(0x1a2));const _0x174ecf=getSubAppReactDemoTemplateDir();await copyDirectory(_0x174ecf,_0x43d0af),console['log'](_0x76845f(0x18c)),await updatePackageJsonName(_0x131c4b),console[_0x76845f(0x1b4)](_0x76845f(0x1ba)),console['log'](_0x76845f(0x1b5)),console[_0x76845f(0x1b4)]('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x43d0af),console['log'](_0x76845f(0x1a0)),await configureProject(_0x131c4b,_0x487970,_0x388d31),console[_0x76845f(0x1b4)]('\x20\x20√\x20Configuration\x20file\x20created'),_0x487970&&await pullApiConfig(_0x43d0af,_0x487970,_0x388d31,_0x56ea6d),console[_0x76845f(0x1b4)](_0x76845f(0x199)+_0x131c4b+'\x20created\x20successfully!'),console[_0x76845f(0x1b4)](_0x76845f(0x190)+_0x131c4b),console[_0x76845f(0x1b4)](_0x76845f(0x18e));}catch(_0x376949){try{existsSync(_0x43d0af)&&await a61_0x3896f9['rm'](_0x43d0af,{'recursive':!![],'force':!![]});}catch{}throw _0x376949;}}async function updatePackageJsonName(_0x4e8d99){const _0x734ac4=a61_0x3074,_0xe77c08=a61_0x3355ab[_0x734ac4(0x197)](process['cwd'](),_0x4e8d99),_0x58107e=a61_0x3355ab[_0x734ac4(0x193)](_0xe77c08,'package.json'),_0x5c40f9=await a61_0x3896f9[_0x734ac4(0x1be)](_0x58107e,_0x734ac4(0x1b1)),_0x55aabb=JSON[_0x734ac4(0x18d)](_0x5c40f9);_0x55aabb[_0x734ac4(0x191)]=_0x4e8d99,_0x55aabb[_0x734ac4(0x1bc)]=_0x734ac4(0x194),await a61_0x3896f9[_0x734ac4(0x1b7)](_0x58107e,JSON[_0x734ac4(0x1bd)](_0x55aabb,null,0x2)+'\x0a');}function detectPackageManager(){const _0x2deccd=a61_0x3074;try{return execSync(_0x2deccd(0x1a3),{'stdio':_0x2deccd(0x1ac)}),_0x2deccd(0x1a7);}catch{return _0x2deccd(0x19d);}}async function formatCode(_0x23879e){const _0x59e3e9=a61_0x3074;try{await execAsync(_0x59e3e9(0x1aa),{'cwd':_0x23879e});}catch{}}async function configureProject(_0x4b61e2,_0x51c24a,_0x5c4d29){const _0x480b9b=a61_0x3074,_0x18760f=a61_0x3355ab[_0x480b9b(0x197)](process['cwd'](),_0x4b61e2),_0x257410=a61_0x3355ab[_0x480b9b(0x193)](_0x18760f,NEW_CONFIG_NAME),_0x1a43cc=readConfig(),_0x483b35=typeof _0x1a43cc[_0x480b9b(0x1b3)]===_0x480b9b(0x1a5)?_0x1a43cc['env']:undefined,_0x49d92f={};for(const _0x4fc57d of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x1a43cc[_0x4fc57d]!=null)_0x49d92f[_0x4fc57d]=_0x1a43cc[_0x4fc57d];}const _0xaed72b=buildCanonicalProjectConfig(_0x49d92f,{'appCodes':_0x51c24a?[_0x51c24a]:[],'env':_0x5c4d29||_0x483b35||_0x480b9b(0x19b),'metadata':{'createdAt':new Date()[_0x480b9b(0x1c3)](),'version':getCliVersion()}});writeConfigFile(_0x257410,_0xaed72b);}async function pullApiConfig(_0x2aead4,_0x101388,_0x418de2,_0x3edfc2){const _0x3e2251=a61_0x3074,_0x2f45e5=process[_0x3e2251(0x19a)]();try{process[_0x3e2251(0x1a6)](_0x2aead4);const _0x4b6764=_0x418de2||_0x3e2251(0x19b);initEnv(_0x4b6764),console[_0x3e2251(0x1b4)]('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x1739db}=await fetchModelList(_0x101388,_0x3edfc2||''),_0x378a81=await generateApiFile(_0x1739db,'',_0x101388,!![],_0x4b6764,DEFAULT_API_DIR);console['log'](_0x3e2251(0x1b6)+_0x1739db['length']+_0x3e2251(0x198)+_0x378a81[_0x3e2251(0x196)]+_0x3e2251(0x1c4));}catch(_0x4e5143){console[_0x3e2251(0x1b4)](_0x3e2251(0x1bb)+CLI_BIN_NAME+_0x3e2251(0x195));}finally{process[_0x3e2251(0x1a6)](_0x2f45e5);}}
1
+ (function(_0x5af14a,_0x47573a){const _0x2a56a1=a91_0x2ad4,_0x4e2ad9=_0x5af14a();while(!![]){try{const _0x79cc02=-parseInt(_0x2a56a1(0xdd))/0x1*(-parseInt(_0x2a56a1(0xcc))/0x2)+parseInt(_0x2a56a1(0xd1))/0x3*(parseInt(_0x2a56a1(0xd9))/0x4)+parseInt(_0x2a56a1(0xd3))/0x5*(parseInt(_0x2a56a1(0xde))/0x6)+parseInt(_0x2a56a1(0xf5))/0x7+-parseInt(_0x2a56a1(0xdc))/0x8+parseInt(_0x2a56a1(0xee))/0x9*(-parseInt(_0x2a56a1(0x100))/0xa)+-parseInt(_0x2a56a1(0xe3))/0xb*(parseInt(_0x2a56a1(0xd2))/0xc);if(_0x79cc02===_0x47573a)break;else _0x4e2ad9['push'](_0x4e2ad9['shift']());}catch(_0x3d39d9){_0x4e2ad9['push'](_0x4e2ad9['shift']());}}}(a91_0x1357,0xd23f7));import a91_0x3bd1e8 from'path';import a91_0x5467ef from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';function a91_0x2ad4(_0x142be3,_0x3eb257){_0x142be3=_0x142be3-0xc9;const _0x13571e=a91_0x1357();let _0x2ad4a5=_0x13571e[_0x142be3];return _0x2ad4a5;}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';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(_0x40f952,_0x4d43b6,_0x172001,_0x13b041){const _0x192cb7=a91_0x2ad4,_0x6b885a=await checkCliVersion();(_0x6b885a['needsUpgrade']||_0x6b885a[_0x192cb7(0xe0)])&&(printCliUpgradeWarning(_0x6b885a),assertCliVersionSupported(_0x6b885a));if(!_0x40f952||_0x40f952[_0x192cb7(0xfc)]()==='')throw CliErrors[_0x192cb7(0xc9)](_0x192cb7(0xe5));const _0x54e81a=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x54e81a[_0x192cb7(0xfb)](_0x40f952))throw CliErrors[_0x192cb7(0xc9)](_0x192cb7(0xf8),'Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x40f952[_0x192cb7(0xd7)]>0x64)throw CliErrors[_0x192cb7(0xc9)]('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.');const _0x3b4e48=a91_0x3bd1e8[_0x192cb7(0xce)](process[_0x192cb7(0xe7)](),_0x40f952);if(existsSync(_0x3b4e48))throw CliErrors[_0x192cb7(0xc9)](_0x192cb7(0xea)+_0x40f952+_0x192cb7(0xe4),_0x192cb7(0xec));try{const _0x49b44b=a91_0x3bd1e8[_0x192cb7(0xcd)](_0x3b4e48);await a91_0x5467ef['access'](_0x49b44b,a91_0x5467ef['constants'][_0x192cb7(0xfd)]);}catch{throw CliErrors[_0x192cb7(0xc9)](_0x192cb7(0xf1),_0x192cb7(0xe9));}try{console['log'](_0x192cb7(0xf0)+_0x40f952+_0x192cb7(0xf3));const _0x3ee10e=getSubAppReactDemoTemplateDir();await copyDirectory(_0x3ee10e,_0x3b4e48),console[_0x192cb7(0xf6)]('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x40f952),console[_0x192cb7(0xf6)](_0x192cb7(0xdb)),console['log'](_0x192cb7(0xca)),console[_0x192cb7(0xf6)]('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x3b4e48),console[_0x192cb7(0xf6)](_0x192cb7(0xd5)),await configureProject(_0x40f952,_0x172001,_0x4d43b6),console[_0x192cb7(0xf6)](_0x192cb7(0xf2)),_0x172001&&await pullApiConfig(_0x3b4e48,_0x172001,_0x4d43b6,_0x13b041),console[_0x192cb7(0xf6)]('\x0a√\x20Project\x20'+_0x40f952+_0x192cb7(0xfa)),console[_0x192cb7(0xf6)](_0x192cb7(0xef)+_0x40f952),console[_0x192cb7(0xf6)](_0x192cb7(0xf7));}catch(_0x408e32){try{existsSync(_0x3b4e48)&&await a91_0x5467ef['rm'](_0x3b4e48,{'recursive':!![],'force':!![]});}catch{}throw _0x408e32;}}function a91_0x1357(){const _0x186e38=['\x20created\x20successfully!','test','trim','W_OK','production','\x20api\x20pull`\x20manually\x20later.','10RWCINU','validation','\x20\x20Installing\x20dependencies...','toLocaleString','4zoSgzp','dirname','resolve','\x20model(s)','modelCount','1503NjeWOw','961032NjKxYD','95GmwYJX','bun\x20run\x20format','\x20\x20√\x20Code\x20formatted','bun','length','\x20\x20Pulling\x20API\x20configuration...','10656HftkJw','npm','\x20\x20√\x20package.json\x20updated','13103408CSFTcU','258674kvLvCn','378270tHfxIF','env','belowMinimum','chdir','readFile','209PnVPCz','\x22\x20already\x20exists.','Project\x20name\x20cannot\x20be\x20empty.','writeFile','cwd','\x20dataset(s),\x20generated\x20','Check\x20directory\x20permissions.','Project\x20directory\x20\x22','\x20\x20√\x20Pulled\x20','Use\x20a\x20different\x20project\x20name.','bun\x20--version','3844521LOUSoS','\x0a\x20\x20cd\x20','*\x20Creating\x20project\x20','Cannot\x20create\x20project\x20in\x20current\x20directory.','\x20\x20√\x20Configuration\x20file\x20created','...','stringify','9786259DCksMJ','log','\x20\x20rabetbase\x20run\x20start\x0a','Project\x20name\x20contains\x20invalid\x20characters.','join'];a91_0x1357=function(){return _0x186e38;};return a91_0x1357();}async function updatePackageJsonName(_0x1c1b88){const _0x35f7ff=a91_0x2ad4,_0x519921=a91_0x3bd1e8[_0x35f7ff(0xce)](process['cwd'](),_0x1c1b88),_0x799277=a91_0x3bd1e8[_0x35f7ff(0xf9)](_0x519921,'package.json'),_0x511403=await a91_0x5467ef[_0x35f7ff(0xe2)](_0x799277,'utf-8'),_0x40cfff=JSON['parse'](_0x511403);_0x40cfff['name']=_0x1c1b88,_0x40cfff['description']='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a91_0x5467ef[_0x35f7ff(0xe6)](_0x799277,JSON[_0x35f7ff(0xf4)](_0x40cfff,null,0x2)+'\x0a');}function detectPackageManager(){const _0x4dde23=a91_0x2ad4;try{return execSync(_0x4dde23(0xed),{'stdio':'ignore'}),_0x4dde23(0xd6);}catch{return _0x4dde23(0xda);}}async function formatCode(_0x47102a){const _0x49e093=a91_0x2ad4;try{await execAsync(_0x49e093(0xd4),{'cwd':_0x47102a});}catch{}}async function configureProject(_0x22cda4,_0x1ab523,_0x26cbb2){const _0x34a535=a91_0x2ad4,_0x1fe924=a91_0x3bd1e8[_0x34a535(0xce)](process[_0x34a535(0xe7)](),_0x22cda4),_0x41421b=a91_0x3bd1e8[_0x34a535(0xf9)](_0x1fe924,NEW_CONFIG_NAME),_0x460300=readConfig(),_0x4aa08c=typeof _0x460300[_0x34a535(0xdf)]==='string'?_0x460300['env']:undefined,_0x49cc25={};for(const _0x39c0b8 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x460300[_0x39c0b8]!=null)_0x49cc25[_0x39c0b8]=_0x460300[_0x39c0b8];}const _0x3f1de8=buildCanonicalProjectConfig(_0x49cc25,{'appCodes':_0x1ab523?[_0x1ab523]:[],'env':_0x26cbb2||_0x4aa08c||'production','metadata':{'createdAt':new Date()[_0x34a535(0xcb)](),'version':getCliVersion()}});writeConfigFile(_0x41421b,_0x3f1de8);}async function pullApiConfig(_0x5e8206,_0x86db31,_0x57648a,_0x307084){const _0x3ad185=a91_0x2ad4,_0x384dc9=process[_0x3ad185(0xe7)]();try{process[_0x3ad185(0xe1)](_0x5e8206);const _0x2e2392=_0x57648a||_0x3ad185(0xfe);initEnv(_0x2e2392),console[_0x3ad185(0xf6)](_0x3ad185(0xd8));const {configArray:_0x2565a0}=await fetchModelList(_0x86db31,_0x307084||''),_0x3a3b48=await generateApiFile(_0x2565a0,'',_0x86db31,!![],_0x2e2392,DEFAULT_API_DIR);console[_0x3ad185(0xf6)](_0x3ad185(0xeb)+_0x2565a0[_0x3ad185(0xd7)]+_0x3ad185(0xe8)+_0x3a3b48[_0x3ad185(0xd0)]+_0x3ad185(0xcf));}catch(_0x5afde9){console[_0x3ad185(0xf6)]('\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`'+CLI_BIN_NAME+_0x3ad185(0xff));}finally{process['chdir'](_0x384dc9);}}
@@ -1 +1 @@
1
- const a65_0x667533=a65_0x3b30;(function(_0x16fa42,_0x52e78e){const _0x41700e=a65_0x3b30,_0x53fd80=_0x16fa42();while(!![]){try{const _0x10a01d=parseInt(_0x41700e(0xb3))/0x1*(-parseInt(_0x41700e(0xbf))/0x2)+-parseInt(_0x41700e(0xb1))/0x3*(-parseInt(_0x41700e(0xb5))/0x4)+parseInt(_0x41700e(0xb4))/0x5*(parseInt(_0x41700e(0xc1))/0x6)+parseInt(_0x41700e(0xc0))/0x7+parseInt(_0x41700e(0xb8))/0x8*(-parseInt(_0x41700e(0xc2))/0x9)+-parseInt(_0x41700e(0xb7))/0xa+-parseInt(_0x41700e(0xbc))/0xb*(-parseInt(_0x41700e(0xbe))/0xc);if(_0x10a01d===_0x52e78e)break;else _0x53fd80['push'](_0x53fd80['shift']());}catch(_0x22e925){_0x53fd80['push'](_0x53fd80['shift']());}}}(a65_0x1a50,0xa10e8));import a65_0x5d0fae from'node:path';function a65_0x1a50(){const _0x39f5b1=['7291400fvsxyf','1501496sBtXDf','sub-app-react-demo','templates','join','345796VpBGqw','../../../../','240tMPGxn','4gwrNpB','4822811emrQvo','34590cJKqem','36yqaBNd','dirname','87uKHYpA','resolve','438307KwsLkU','1115tismPv','56952npZumC','projects'];a65_0x1a50=function(){return _0x39f5b1;};return a65_0x1a50();}import{fileURLToPath}from'node:url';const __dirname=a65_0x5d0fae[a65_0x667533(0xb0)](fileURLToPath(import.meta.url));function a65_0x3b30(_0x2ab58f,_0x3cc728){_0x2ab58f=_0x2ab58f-0xb0;const _0x1a502a=a65_0x1a50();let _0x3b3062=_0x1a502a[_0x2ab58f];return _0x3b3062;}export function getRabetbaseCliPackageRoot(){const _0x34892e=a65_0x667533;return a65_0x5d0fae[_0x34892e(0xb2)](__dirname,_0x34892e(0xbd));}export function getSubAppReactDemoTemplateDir(){const _0x2e19c0=a65_0x667533;return a65_0x5d0fae[_0x2e19c0(0xbb)](getRabetbaseCliPackageRoot(),_0x2e19c0(0xba),_0x2e19c0(0xb6),_0x2e19c0(0xb9));}
1
+ const a92_0x2a56f8=a92_0x5d9b;function a92_0x5d9b(_0x53526f,_0x216312){_0x53526f=_0x53526f-0x1aa;const _0x190d24=a92_0x190d();let _0x5d9b5b=_0x190d24[_0x53526f];return _0x5d9b5b;}(function(_0x81ae11,_0x31d4c1){const _0xc2fcb2=a92_0x5d9b,_0x15af47=_0x81ae11();while(!![]){try{const _0x536638=-parseInt(_0xc2fcb2(0x1b3))/0x1+parseInt(_0xc2fcb2(0x1b2))/0x2+-parseInt(_0xc2fcb2(0x1ae))/0x3+-parseInt(_0xc2fcb2(0x1aa))/0x4+parseInt(_0xc2fcb2(0x1ab))/0x5+parseInt(_0xc2fcb2(0x1b4))/0x6+-parseInt(_0xc2fcb2(0x1af))/0x7*(-parseInt(_0xc2fcb2(0x1ad))/0x8);if(_0x536638===_0x31d4c1)break;else _0x15af47['push'](_0x15af47['shift']());}catch(_0x5c461c){_0x15af47['push'](_0x15af47['shift']());}}}(a92_0x190d,0xa3a71));function a92_0x190d(){const _0x45e774=['5050575lmtrwz','sub-app-react-demo','3063112RBtkuq','2068143YIeveL','7qmQmIF','templates','dirname','75686LuUvuC','240479SRctSY','2592780ejzLQB','join','resolve','projects','1051184asNKGI'];a92_0x190d=function(){return _0x45e774;};return a92_0x190d();}import a92_0x20e651 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a92_0x20e651[a92_0x2a56f8(0x1b1)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x3654b3=a92_0x2a56f8;return a92_0x20e651[_0x3654b3(0x1b6)](__dirname,'../../../../');}export function getSubAppReactDemoTemplateDir(){const _0x543ecd=a92_0x2a56f8;return a92_0x20e651[_0x543ecd(0x1b5)](getRabetbaseCliPackageRoot(),_0x543ecd(0x1b0),_0x543ecd(0x1b7),_0x543ecd(0x1ac));}
@@ -1 +1 @@
1
- (function(_0x11950c,_0x36a3c0){const _0x2a3542=a60_0x25e0,_0x4b14eb=_0x11950c();while(!![]){try{const _0x24a275=-parseInt(_0x2a3542(0xc7))/0x1+parseInt(_0x2a3542(0xc6))/0x2*(parseInt(_0x2a3542(0xc5))/0x3)+-parseInt(_0x2a3542(0xd0))/0x4*(parseInt(_0x2a3542(0xc9))/0x5)+-parseInt(_0x2a3542(0xcc))/0x6+parseInt(_0x2a3542(0xc4))/0x7+parseInt(_0x2a3542(0xd2))/0x8+parseInt(_0x2a3542(0xcb))/0x9;if(_0x24a275===_0x36a3c0)break;else _0x4b14eb['push'](_0x4b14eb['shift']());}catch(_0x39bf9c){_0x4b14eb['push'](_0x4b14eb['shift']());}}}(a60_0x5147,0x4fc1f));function a60_0x25e0(_0x472e81,_0x179cc0){_0x472e81=_0x472e81-0xc4;const _0x514787=a60_0x5147();let _0x25e004=_0x514787[_0x472e81];return _0x25e004;}import a60_0x358579 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 a60_0x5147(){const _0x2af9e7=['copy','5iwBnWR','项目模板复制失败','7660764blCbnb','3643440IesBLN','info','开始复制项目模板','success','824988bapflj','resolve','2710408LkLHAn','项目模板复制完成','error','message','now','569632jDGVac','6363uTXCqz','386uvJDih','540552ALzwKI'];a60_0x5147=function(){return _0x2af9e7;};return a60_0x5147();}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x53861d){const _0x14eefc=a60_0x25e0,_0x20e6a3=Date[_0x14eefc(0xd6)](),_0x33c390=a60_0x358579[_0x14eefc(0xd1)](process['cwd'](),_0x53861d);try{logger[_0x14eefc(0xcd)](_0x14eefc(0xc8),_0x14eefc(0xce),{'projectCode':_0x53861d,'templateDir':templateDir}),await copyDirectory(templateDir,_0x33c390);const _0x4569c9=Date['now']()-_0x20e6a3;logger[_0x14eefc(0xcf)](_0x14eefc(0xc8),_0x14eefc(0xd3),_0x4569c9,{'projectCode':_0x53861d});}catch(_0xf9429){const _0x5a63d0=Date[_0x14eefc(0xd6)]()-_0x20e6a3;logger[_0x14eefc(0xd4)]('copy',_0x14eefc(0xca),{'projectCode':_0x53861d,'error':_0xf9429 instanceof Error?_0xf9429[_0x14eefc(0xd5)]:String(_0xf9429),'duration':_0x5a63d0});throw _0xf9429;}return formatElapsed(_0x20e6a3);}
1
+ (function(_0x2a1706,_0x224c84){const _0xfe1d73=a93_0x18ff,_0x136851=_0x2a1706();while(!![]){try{const _0x318c7f=-parseInt(_0xfe1d73(0xa5))/0x1+parseInt(_0xfe1d73(0xab))/0x2*(parseInt(_0xfe1d73(0xa9))/0x3)+-parseInt(_0xfe1d73(0xa2))/0x4+parseInt(_0xfe1d73(0xa1))/0x5*(-parseInt(_0xfe1d73(0xad))/0x6)+parseInt(_0xfe1d73(0x9d))/0x7*(-parseInt(_0xfe1d73(0xaa))/0x8)+parseInt(_0xfe1d73(0xa4))/0x9*(-parseInt(_0xfe1d73(0xa0))/0xa)+parseInt(_0xfe1d73(0xa7))/0xb;if(_0x318c7f===_0x224c84)break;else _0x136851['push'](_0x136851['shift']());}catch(_0x43683a){_0x136851['push'](_0x136851['shift']());}}}(a93_0x1bd7,0x7bc4e));function a93_0x18ff(_0x55b823,_0x4721bb){_0x55b823=_0x55b823-0x9c;const _0x1bd771=a93_0x1bd7();let _0x18ff3c=_0x1bd771[_0x55b823];return _0x18ff3c;}import a93_0x1113b9 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 a93_0x1bd7(){const _0x138abf=['282ccdeAQ','开始复制项目模板','error','项目模板复制失败','7dAcJsW','now','success','715180VrcbRo','98355LjfJWj','181820eSmupQ','cwd','18YhsSdJ','348478sbUMEX','info','27487988kGBzXl','copy','273QwBftm','5176120mwciOH','2562NTFZeO','项目模板复制完成'];a93_0x1bd7=function(){return _0x138abf;};return a93_0x1bd7();}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x50ad8c){const _0x267eb1=a93_0x18ff,_0x11df39=Date['now'](),_0x64ab=a93_0x1113b9['resolve'](process[_0x267eb1(0xa3)](),_0x50ad8c);try{logger[_0x267eb1(0xa6)](_0x267eb1(0xa8),_0x267eb1(0xae),{'projectCode':_0x50ad8c,'templateDir':templateDir}),await copyDirectory(templateDir,_0x64ab);const _0xe51f89=Date[_0x267eb1(0x9e)]()-_0x11df39;logger[_0x267eb1(0x9f)](_0x267eb1(0xa8),_0x267eb1(0xac),_0xe51f89,{'projectCode':_0x50ad8c});}catch(_0x17edb3){const _0x57d79a=Date[_0x267eb1(0x9e)]()-_0x11df39;logger[_0x267eb1(0xaf)](_0x267eb1(0xa8),_0x267eb1(0x9c),{'projectCode':_0x50ad8c,'error':_0x17edb3 instanceof Error?_0x17edb3['message']:String(_0x17edb3),'duration':_0x57d79a});throw _0x17edb3;}return formatElapsed(_0x11df39);}
@@ -1 +1 @@
1
- (function(_0x297f45,_0x2fdd52){const _0x22e76f=a63_0x496d,_0x376d2c=_0x297f45();while(!![]){try{const _0x4a48f3=parseInt(_0x22e76f(0xd2))/0x1+parseInt(_0x22e76f(0xd4))/0x2*(parseInt(_0x22e76f(0xd1))/0x3)+-parseInt(_0x22e76f(0xd8))/0x4*(parseInt(_0x22e76f(0xcd))/0x5)+parseInt(_0x22e76f(0xc3))/0x6*(parseInt(_0x22e76f(0xd3))/0x7)+parseInt(_0x22e76f(0xc2))/0x8*(parseInt(_0x22e76f(0xc9))/0x9)+-parseInt(_0x22e76f(0xd0))/0xa+parseInt(_0x22e76f(0xc7))/0xb;if(_0x4a48f3===_0x2fdd52)break;else _0x376d2c['push'](_0x376d2c['shift']());}catch(_0x24a2bc){_0x376d2c['push'](_0x376d2c['shift']());}}}(a63_0x12b9,0xeab0d));import a63_0xe2200c from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';function a63_0x12b9(){const _0x520d5c=['1138736tCGJeH','1458FvJRBr','代码格式化失败','npx','now','6947457ZnxQcU','error','18vJBtlA','success','开始格式化代码','format','2200qXzyNH','info','cwd','13552860LoCcMX','48KjgksD','221913OcpnPc','22799bGmXkq','194118ELfqAl','message','prettier','代码格式化完成','10600XFpCbO','--write'];a63_0x12b9=function(){return _0x520d5c;};return a63_0x12b9();}function a63_0x496d(_0x14509b,_0x44d70d){_0x14509b=_0x14509b-0xc1;const _0x12b990=a63_0x12b9();let _0x496d7f=_0x12b990[_0x14509b];return _0x496d7f;}export async function formatProjectCode(_0x4f877d){const _0x28ab79=a63_0x496d,_0x51594f=Date['now'](),_0x32057c=a63_0xe2200c['resolve'](process[_0x28ab79(0xcf)](),_0x4f877d);try{logger[_0x28ab79(0xce)](_0x28ab79(0xcc),_0x28ab79(0xcb),{'projectCode':_0x4f877d}),await execa(resolveNpmBin(_0x28ab79(0xc5)),[_0x28ab79(0xd6),_0x28ab79(0xc1),'.'],{'cwd':_0x32057c});const _0x4ff661=Date[_0x28ab79(0xc6)]()-_0x51594f;logger[_0x28ab79(0xca)]('format',_0x28ab79(0xd7),_0x4ff661,{'projectCode':_0x4f877d});}catch(_0x5d39c5){const _0x43e845=Date[_0x28ab79(0xc6)]()-_0x51594f;logger[_0x28ab79(0xc8)](_0x28ab79(0xcc),_0x28ab79(0xc4),{'projectCode':_0x4f877d,'error':_0x5d39c5 instanceof Error?_0x5d39c5[_0x28ab79(0xd5)]:String(_0x5d39c5),'duration':_0x43e845});throw _0x5d39c5;}return formatElapsed(_0x51594f);}
1
+ function a94_0x135f(_0x256cc9,_0x260e38){_0x256cc9=_0x256cc9-0x8e;const _0x9d23cc=a94_0x9d23();let _0x135f72=_0x9d23cc[_0x256cc9];return _0x135f72;}function a94_0x9d23(){const _0x1b3a53=['33msqZRZ','49701yzssEZ','--write','40fPLrSq','prettier','4OsXyVe','info','30yxsQkc','代码格式化完成','npx','546098KGDDfH','3364980yJeKwn','251388Cpgjwd','format','638285vOqCcq','代码格式化失败','3576960gzeVWI','success','开始格式化代码','2160414mfKAoP','now','error','cwd'];a94_0x9d23=function(){return _0x1b3a53;};return a94_0x9d23();}(function(_0x4ab526,_0x5255b8){const _0x19e802=a94_0x135f,_0x5cb0e2=_0x4ab526();while(!![]){try{const _0x137712=-parseInt(_0x19e802(0x95))/0x1+-parseInt(_0x19e802(0x90))/0x2*(parseInt(_0x19e802(0xa1))/0x3)+-parseInt(_0x19e802(0x8e))/0x4*(-parseInt(_0x19e802(0x97))/0x5)+-parseInt(_0x19e802(0x9c))/0x6+-parseInt(_0x19e802(0x93))/0x7*(-parseInt(_0x19e802(0xa3))/0x8)+-parseInt(_0x19e802(0x99))/0x9+-parseInt(_0x19e802(0x94))/0xa*(-parseInt(_0x19e802(0xa0))/0xb);if(_0x137712===_0x5255b8)break;else _0x5cb0e2['push'](_0x5cb0e2['shift']());}catch(_0x45a940){_0x5cb0e2['push'](_0x5cb0e2['shift']());}}}(a94_0x9d23,0x41dfb));import a94_0x5b5f3b from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x41029){const _0x1d7ee4=a94_0x135f,_0x59af94=Date[_0x1d7ee4(0x9d)](),_0x1626a2=a94_0x5b5f3b['resolve'](process[_0x1d7ee4(0x9f)](),_0x41029);try{logger[_0x1d7ee4(0x8f)]('format',_0x1d7ee4(0x9b),{'projectCode':_0x41029}),await execa(resolveNpmBin(_0x1d7ee4(0x92)),[_0x1d7ee4(0xa4),_0x1d7ee4(0xa2),'.'],{'cwd':_0x1626a2});const _0x508f1e=Date['now']()-_0x59af94;logger[_0x1d7ee4(0x9a)](_0x1d7ee4(0x96),_0x1d7ee4(0x91),_0x508f1e,{'projectCode':_0x41029});}catch(_0x19483a){const _0x39955b=Date[_0x1d7ee4(0x9d)]()-_0x59af94;logger[_0x1d7ee4(0x9e)](_0x1d7ee4(0x96),_0x1d7ee4(0x98),{'projectCode':_0x41029,'error':_0x19483a instanceof Error?_0x19483a['message']:String(_0x19483a),'duration':_0x39955b});throw _0x19483a;}return formatElapsed(_0x59af94);}
@@ -1 +1 @@
1
- (function(_0x32732e,_0x2d84f4){const _0x3ec602=a62_0x822d,_0x44afae=_0x32732e();while(!![]){try{const _0x10eac5=parseInt(_0x3ec602(0xc9))/0x1*(-parseInt(_0x3ec602(0xc4))/0x2)+-parseInt(_0x3ec602(0xc8))/0x3+-parseInt(_0x3ec602(0xd0))/0x4*(parseInt(_0x3ec602(0xbf))/0x5)+-parseInt(_0x3ec602(0xca))/0x6+parseInt(_0x3ec602(0xcf))/0x7*(parseInt(_0x3ec602(0xc7))/0x8)+parseInt(_0x3ec602(0xc1))/0x9+-parseInt(_0x3ec602(0xcc))/0xa*(-parseInt(_0x3ec602(0xc2))/0xb);if(_0x10eac5===_0x2d84f4)break;else _0x44afae['push'](_0x44afae['shift']());}catch(_0x5d731e){_0x44afae['push'](_0x44afae['shift']());}}}(a62_0x2c36,0xc1c2f));import a62_0x4108a1 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a62_0x822d(_0xcdecea,_0x3e1a8f){_0xcdecea=_0xcdecea-0xbf;const _0x2c3631=a62_0x2c36();let _0x822d3e=_0x2c3631[_0xcdecea];return _0x822d3e;}function a62_0x2c36(){const _0x11cfa7=['install','28FRUdxA','3667760bjCncT','5VSmuer','message','5649003JaSfVs','63371MuczYL','now','76pZdoKd','success','resolve','1819712sXyYYl','3562434eoUFzV','13279ByaCIR','7405644AyTLGs','cwd','5380mJVROl','依赖安装完成'];a62_0x2c36=function(){return _0x11cfa7;};return a62_0x2c36();}import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x31f7eb){const _0x529f3e=a62_0x822d,_0x97ed87=Date[_0x529f3e(0xc3)](),_0x2232f5=a62_0x4108a1[_0x529f3e(0xc6)](process[_0x529f3e(0xcb)](),_0x31f7eb);try{logger['info']('install','开始安装依赖',{'projectCode':_0x31f7eb,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin('npm'),[_0x529f3e(0xce),'--registry','https://registry.npmmirror.com'],{'cwd':_0x2232f5});const _0x5b8511=Date[_0x529f3e(0xc3)]()-_0x97ed87;logger[_0x529f3e(0xc5)](_0x529f3e(0xce),_0x529f3e(0xcd),_0x5b8511,{'projectCode':_0x31f7eb});}catch(_0x529966){const _0x31dd43=Date['now']()-_0x97ed87;logger['error'](_0x529f3e(0xce),'依赖安装失败',{'projectCode':_0x31f7eb,'error':_0x529966 instanceof Error?_0x529966[_0x529f3e(0xc0)]:String(_0x529966),'duration':_0x31dd43});throw _0x529966;}return formatElapsed(_0x97ed87);}
1
+ function a95_0x82f6(){const _0x3d1b0a=['https://registry.npmmirror.com','106780TLCLpm','cwd','依赖安装完成','install','3EQCZlf','--registry','message','依赖安装失败','resolve','success','354090DlOzAd','1308vfWOTe','now','29020XADsgV','error','654010Qrqrxe','63fjtySB','190zqdndK','258744QcVjot','235132DgZCrR'];a95_0x82f6=function(){return _0x3d1b0a;};return a95_0x82f6();}(function(_0xfaa468,_0x2e7729){const _0x1adc0b=a95_0x21f0,_0x5eb905=_0xfaa468();while(!![]){try{const _0x554e7b=parseInt(_0x1adc0b(0x125))/0x1+parseInt(_0x1adc0b(0x122))/0x2+-parseInt(_0x1adc0b(0x11c))/0x3*(parseInt(_0x1adc0b(0x12b))/0x4)+-parseInt(_0x1adc0b(0x129))/0x5*(parseInt(_0x1adc0b(0x123))/0x6)+parseInt(_0x1adc0b(0x127))/0x7+-parseInt(_0x1adc0b(0x12a))/0x8+parseInt(_0x1adc0b(0x128))/0x9*(-parseInt(_0x1adc0b(0x12d))/0xa);if(_0x554e7b===_0x2e7729)break;else _0x5eb905['push'](_0x5eb905['shift']());}catch(_0x418990){_0x5eb905['push'](_0x5eb905['shift']());}}}(a95_0x82f6,0x1e99b));import a95_0x27da97 from'node:path';function a95_0x21f0(_0x4185b7,_0x223f77){_0x4185b7=_0x4185b7-0x11a;const _0x82f6ac=a95_0x82f6();let _0x21f04c=_0x82f6ac[_0x4185b7];return _0x21f04c;}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(_0x1778d7){const _0x5142c0=a95_0x21f0,_0x52e1a7=Date[_0x5142c0(0x124)](),_0x39a529=a95_0x27da97[_0x5142c0(0x120)](process[_0x5142c0(0x12e)](),_0x1778d7);try{logger['info']('install','开始安装依赖',{'projectCode':_0x1778d7,'registry':_0x5142c0(0x12c)}),await execa(resolveNpmBin('npm'),[_0x5142c0(0x11b),_0x5142c0(0x11d),_0x5142c0(0x12c)],{'cwd':_0x39a529});const _0x22b5b8=Date[_0x5142c0(0x124)]()-_0x52e1a7;logger[_0x5142c0(0x121)](_0x5142c0(0x11b),_0x5142c0(0x11a),_0x22b5b8,{'projectCode':_0x1778d7});}catch(_0x51c57c){const _0x2b967f=Date[_0x5142c0(0x124)]()-_0x52e1a7;logger[_0x5142c0(0x126)](_0x5142c0(0x11b),_0x5142c0(0x11f),{'projectCode':_0x1778d7,'error':_0x51c57c instanceof Error?_0x51c57c[_0x5142c0(0x11e)]:String(_0x51c57c),'duration':_0x2b967f});throw _0x51c57c;}return formatElapsed(_0x52e1a7);}
@@ -1 +1 @@
1
- function a59_0x2fdf(_0x5ba0bb,_0x5cdde1){_0x5ba0bb=_0x5ba0bb-0x1bf;const _0x409d28=a59_0x409d();let _0x2fdfcd=_0x409d28[_0x5ba0bb];return _0x2fdfcd;}const a59_0x4aa110=a59_0x2fdf;(function(_0x24b7c8,_0x1f0dde){const _0x4d1f78=a59_0x2fdf,_0x36d6ee=_0x24b7c8();while(!![]){try{const _0x18f9fc=parseInt(_0x4d1f78(0x1d3))/0x1+-parseInt(_0x4d1f78(0x1c3))/0x2*(parseInt(_0x4d1f78(0x1d2))/0x3)+parseInt(_0x4d1f78(0x1d6))/0x4+-parseInt(_0x4d1f78(0x1db))/0x5*(parseInt(_0x4d1f78(0x1c5))/0x6)+-parseInt(_0x4d1f78(0x1d1))/0x7+parseInt(_0x4d1f78(0x1d0))/0x8*(-parseInt(_0x4d1f78(0x1da))/0x9)+parseInt(_0x4d1f78(0x1cd))/0xa;if(_0x18f9fc===_0x1f0dde)break;else _0x36d6ee['push'](_0x36d6ee['shift']());}catch(_0x5721ec){_0x36d6ee['push'](_0x36d6ee['shift']());}}}(a59_0x409d,0x329fa));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';function a59_0x409d(){const _0x47dba3=['App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','string','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','name','str','yes','env','upgrade','Initialize\x20.rabetbase.json\x20config\x20in\x20existing\x20project','bool','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','4148LCDROP','Target\x20environment','6LrVoDe','../../commands/project/create/non-interactive.js','boolean','write','project','appcode','args','trim','7902180JjxGsx','cookie','../../commands/project/create/main.js','16TaaWIH','2666839PtOVBy','273fWPdmE','113161ByXRfE','create','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','1401932snmtDS','validation','Skip\x20confirmation\x20prompt','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','1724967HHvFMe','467355BjmMnE','nonInteractive'];a59_0x409d=function(){return _0x47dba3;};return a59_0x409d();}const initFlags=[{'name':a59_0x4aa110(0x1ca),'type':'string','description':'App\x20code\x20to\x20initialize'},{'name':a59_0x4aa110(0x1e3),'type':a59_0x4aa110(0x1de),'description':'Target\x20environment'},{'name':'yes','type':a59_0x4aa110(0x1c7),'description':'Auto-confirm\x20prompts','default':![]}],createFlags=[{'name':'name','type':a59_0x4aa110(0x1de),'description':'Project\x20name'},{'name':a59_0x4aa110(0x1e3),'type':'string','description':a59_0x4aa110(0x1c4)},{'name':'appcode','type':a59_0x4aa110(0x1de),'description':a59_0x4aa110(0x1dd)}],upgradeFlags=[{'name':a59_0x4aa110(0x1e2),'type':a59_0x4aa110(0x1c7),'description':a59_0x4aa110(0x1d8),'default':![]}];export const projectDefinitions=[{'service':a59_0x4aa110(0x1c9),'command':'init','description':a59_0x4aa110(0x1c0),'risk':a59_0x4aa110(0x1c8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x4c8cd1){const _0xaea120=a59_0x4aa110;return await initConfig({'appcode':_0x4c8cd1[_0xaea120(0x1e1)](_0xaea120(0x1ca))||undefined,'env':_0x4c8cd1[_0xaea120(0x1e1)]('env')||undefined,'autoYes':_0x4c8cd1['bool'](_0xaea120(0x1e2))}),{'ok':!![]};}},{'service':a59_0x4aa110(0x1c9),'command':a59_0x4aa110(0x1d4),'description':'Create\x20a\x20new\x20project','risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'project-name','description':a59_0x4aa110(0x1d9),'required':![]}],'flags':createFlags,async 'execute'(_0x365c8a){const _0x5f3ac9=a59_0x4aa110,{createApp:_0x57e9ef}=await import(_0x5f3ac9(0x1cf)),{createProjectNonInteractive:_0x1370e6}=await import(_0x5f3ac9(0x1c6)),_0x25c36b=_0x365c8a[_0x5f3ac9(0x1e1)](_0x5f3ac9(0x1e0))[_0x5f3ac9(0x1cc)]()||_0x365c8a[_0x5f3ac9(0x1cb)][0x0]?.[_0x5f3ac9(0x1cc)](),_0x17e524=_0x365c8a[_0x5f3ac9(0x1e1)](_0x5f3ac9(0x1e3))||undefined,_0x5bb03b=_0x365c8a[_0x5f3ac9(0x1e1)](_0x5f3ac9(0x1ca))||undefined;if(_0x365c8a['nonInteractive']){if(!_0x25c36b)throw CliErrors[_0x5f3ac9(0x1d7)](_0x5f3ac9(0x1df),'Usage:\x20'+CLI_BIN_NAME+_0x5f3ac9(0x1c2));await _0x1370e6(_0x25c36b,_0x17e524,_0x5bb03b,_0x365c8a['cookie']);}else await _0x57e9ef({'projectCode':_0x25c36b,'appCode':_0x5bb03b,'env':_0x17e524,'cookie':_0x365c8a[_0x5f3ac9(0x1ce)]});return{'ok':!![]};}},{'service':a59_0x4aa110(0x1c9),'command':a59_0x4aa110(0x1bf),'description':a59_0x4aa110(0x1d5),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x4139a0){const _0x4aea8a=a59_0x4aa110;return await upgradeApp(_0x4139a0[_0x4aea8a(0x1dc)],{'yes':_0x4139a0[_0x4aea8a(0x1c1)](_0x4aea8a(0x1e2))}),{'ok':!![]};}}];
1
+ const a96_0x358777=a96_0x26bc;function a96_0x26bc(_0x43114e,_0x4a5684){_0x43114e=_0x43114e-0x1e0;const _0x46aa48=a96_0x46aa();let _0x26bca5=_0x46aa48[_0x43114e];return _0x26bca5;}(function(_0x2191ee,_0x4dbcf0){const _0x4f6eb5=a96_0x26bc,_0x169298=_0x2191ee();while(!![]){try{const _0x45e58a=parseInt(_0x4f6eb5(0x200))/0x1*(-parseInt(_0x4f6eb5(0x1fc))/0x2)+parseInt(_0x4f6eb5(0x1f7))/0x3+parseInt(_0x4f6eb5(0x202))/0x4*(-parseInt(_0x4f6eb5(0x1e9))/0x5)+-parseInt(_0x4f6eb5(0x1e5))/0x6+-parseInt(_0x4f6eb5(0x1ee))/0x7+parseInt(_0x4f6eb5(0x206))/0x8+parseInt(_0x4f6eb5(0x207))/0x9*(parseInt(_0x4f6eb5(0x1e0))/0xa);if(_0x45e58a===_0x4dbcf0)break;else _0x169298['push'](_0x169298['shift']());}catch(_0x451e7e){_0x169298['push'](_0x169298['shift']());}}}(a96_0x46aa,0xe4d15));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';function a96_0x46aa(){const _0xc97dee=['Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','args','Target\x20environment','nonInteractive','9142614pucRdV','name','write','Skip\x20confirmation\x20prompt','8668355GosTqp','upgrade','trim','App\x20code\x20to\x20initialize','project-name','5128256VPgBCi','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','Usage:\x20','bool','create','project','../../commands/project/create/non-interactive.js','boolean','Auto-confirm\x20prompts','4707858VxIYuq','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','string','str','Create\x20a\x20new\x20project','2934644mAjamg','Project\x20name','appcode','env','1OvbAcD','cookie','4EmWtOS','yes','../../commands/project/create/main.js','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','6319920NFvqBR','333WRndOd','1090630gQqqXg'];a96_0x46aa=function(){return _0xc97dee;};return a96_0x46aa();}const initFlags=[{'name':'appcode','type':a96_0x358777(0x1f9),'description':a96_0x358777(0x1ec)},{'name':'env','type':'string','description':a96_0x358777(0x1e3)},{'name':a96_0x358777(0x203),'type':a96_0x358777(0x1f5),'description':a96_0x358777(0x1f6),'default':![]}],createFlags=[{'name':a96_0x358777(0x1e6),'type':a96_0x358777(0x1f9),'description':a96_0x358777(0x1fd)},{'name':a96_0x358777(0x1ff),'type':a96_0x358777(0x1f9),'description':a96_0x358777(0x1e3)},{'name':a96_0x358777(0x1fe),'type':'string','description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'}],upgradeFlags=[{'name':'yes','type':'boolean','description':a96_0x358777(0x1e8),'default':![]}];export const projectDefinitions=[{'service':a96_0x358777(0x1f3),'command':'init','description':'Initialize\x20.rabetbase.json\x20config\x20in\x20existing\x20project','risk':a96_0x358777(0x1e7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x1d4b22){const _0x2fd51b=a96_0x358777;return await initConfig({'appcode':_0x1d4b22[_0x2fd51b(0x1fa)](_0x2fd51b(0x1fe))||undefined,'env':_0x1d4b22[_0x2fd51b(0x1fa)](_0x2fd51b(0x1ff))||undefined,'autoYes':_0x1d4b22['bool'](_0x2fd51b(0x203))}),{'ok':!![]};}},{'service':a96_0x358777(0x1f3),'command':a96_0x358777(0x1f2),'description':a96_0x358777(0x1fb),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a96_0x358777(0x1ed),'description':a96_0x358777(0x1ef),'required':![]}],'flags':createFlags,async 'execute'(_0x20ce81){const _0x142a94=a96_0x358777,{createApp:_0x4811d5}=await import(_0x142a94(0x204)),{createProjectNonInteractive:_0x551599}=await import(_0x142a94(0x1f4)),_0x2907ef=_0x20ce81['str'](_0x142a94(0x1e6))[_0x142a94(0x1eb)]()||_0x20ce81[_0x142a94(0x1e2)][0x0]?.[_0x142a94(0x1eb)](),_0x53f72a=_0x20ce81[_0x142a94(0x1fa)](_0x142a94(0x1ff))||undefined,_0x559a24=_0x20ce81[_0x142a94(0x1fa)](_0x142a94(0x1fe))||undefined;if(_0x20ce81[_0x142a94(0x1e4)]){if(!_0x2907ef)throw CliErrors['validation'](_0x142a94(0x205),_0x142a94(0x1f0)+CLI_BIN_NAME+_0x142a94(0x1f8));await _0x551599(_0x2907ef,_0x53f72a,_0x559a24,_0x20ce81[_0x142a94(0x201)]);}else await _0x4811d5({'projectCode':_0x2907ef,'appCode':_0x559a24,'env':_0x53f72a,'cookie':_0x20ce81[_0x142a94(0x201)]});return{'ok':!![]};}},{'service':a96_0x358777(0x1f3),'command':a96_0x358777(0x1ea),'description':a96_0x358777(0x1e1),'risk':a96_0x358777(0x1e7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x5de14c){const _0x17a66d=a96_0x358777;return await upgradeApp(_0x5de14c['nonInteractive'],{'yes':_0x5de14c[_0x17a66d(0x1f1)](_0x17a66d(0x203))}),{'ok':!![]};}}];
@@ -1 +1 @@
1
- (function(_0xf29d0d,_0x96f66b){const _0x599016=a58_0x4db8,_0x129188=_0xf29d0d();while(!![]){try{const _0x3c375e=parseInt(_0x599016(0x8b))/0x1*(-parseInt(_0x599016(0xa2))/0x2)+parseInt(_0x599016(0xa3))/0x3*(-parseInt(_0x599016(0x6f))/0x4)+parseInt(_0x599016(0x9c))/0x5+parseInt(_0x599016(0x77))/0x6+parseInt(_0x599016(0x97))/0x7*(parseInt(_0x599016(0x76))/0x8)+parseInt(_0x599016(0x95))/0x9+-parseInt(_0x599016(0x94))/0xa;if(_0x3c375e===_0x96f66b)break;else _0x129188['push'](_0x129188['shift']());}catch(_0x2fd017){_0x129188['push'](_0x129188['shift']());}}}(a58_0x1f6d,0xe6a27));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a58_0x5dee97 from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../../context.js';import{validateAppcode}from'../../commands/common/validate.js';function a58_0x4db8(_0x3cd7cd,_0x536aa7){_0x3cd7cd=_0x3cd7cd-0x6f;const _0x1f6db5=a58_0x1f6d();let _0x4db811=_0x1f6db5[_0x3cd7cd];return _0x4db811;}function a58_0x1f6d(){const _0x160318=['.rabetbase.json','312992pdtGbx','8581056vpWnAE','trim','init','join','初始化项目配置文件成功','apps','cyan','parse','appcode','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','package.json','Upgrade\x20it\x20to\x20','cwd','\x20\x20Default:\x20','yellow','.bak','utf8','\x20project\x20init`\x20to\x20start\x20fresh.','toLocaleString','setLogPath','999ZQSzUC','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','env','keys','\x20\x20appcode:\x20','Migration\x20cancelled.\x20Run\x20`','\x20api\x20pull\x27','log','bold','10257490pocdzT','12383667XnPkSZ','../..','77yCpzHE','production','app','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','info','894470QNaibi','gray','?\x20(Old\x20file\x20→\x20*.bak)','从旧配置文件升级成功','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','version','2106ecTviu','84219PcFxeX','Invalid\x20App\x20Code','56aiidPI','string','✓\x20Upgraded\x20','App\x20Code\x20cannot\x20be\x20empty','\x20\x20Apps:\x20','green'];a58_0x1f6d=function(){return _0x160318;};return a58_0x1f6d();}import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x356635){const _0x1b5c93=a58_0x4db8,{appcode:_0x3b1811,env:_0x385d7f,autoYes:_0x29278f}=_0x356635,_0x2033ea=process[_0x1b5c93(0x83)]();if(getProjectConfigPath())throw new Error(_0x1b5c93(0xa0));let _0x2cfa7c;for(const _0x507781 of LEGACY_CONFIG_NAMES){const _0x2a8a41=resolve(_0x2033ea,_0x507781);if(existsSync(_0x2a8a41)){_0x2cfa7c=_0x2a8a41;break;}}if(_0x2cfa7c){let _0x3b55f9={};try{_0x3b55f9=JSON[_0x1b5c93(0x7e)](readFileSync(_0x2cfa7c,_0x1b5c93(0x87)));}catch{}const _0x2914c5=basename(_0x2cfa7c),_0x5eb78c=_0x3b55f9?.[_0x1b5c93(0x7f)]||_0x3b55f9?.[_0x1b5c93(0x99)];let _0x4b5420=_0x29278f;!_0x29278f&&(console[_0x1b5c93(0x92)](a58_0x5dee97[_0x1b5c93(0x85)](_0x1b5c93(0x8c)+a58_0x5dee97[_0x1b5c93(0x93)](_0x2914c5))),_0x5eb78c&&console[_0x1b5c93(0x92)](a58_0x5dee97[_0x1b5c93(0x7d)](_0x1b5c93(0x8f)+_0x5eb78c)),_0x4b5420=await confirm({'message':_0x1b5c93(0x82)+a58_0x5dee97[_0x1b5c93(0x93)](_0x1b5c93(0x75))+_0x1b5c93(0x9e),'default':!![]}));if(!_0x4b5420){console[_0x1b5c93(0x92)](_0x1b5c93(0x90)+CLI_BIN_NAME+_0x1b5c93(0x88));return;}const _0x3804ab=resolve(_0x2033ea,NEW_CONFIG_NAME),_0x228be8=getCliVersionFromPkg(),_0x65e271=readRawConfig(),_0x3ff058=_0x3b1811||(typeof _0x3b55f9?.[_0x1b5c93(0x7f)]===_0x1b5c93(0x70)?_0x3b55f9[_0x1b5c93(0x7f)]:undefined)||(typeof _0x3b55f9?.[_0x1b5c93(0x99)]===_0x1b5c93(0x70)?_0x3b55f9['app']:undefined)||await askAppcode(),_0x3b148c=typeof _0x3b55f9?.[_0x1b5c93(0x8d)]===_0x1b5c93(0x70)?_0x3b55f9[_0x1b5c93(0x8d)]:typeof _0x65e271['env']===_0x1b5c93(0x70)?_0x65e271[_0x1b5c93(0x8d)]:_0x1b5c93(0x98),_0x245f55=buildCanonicalProjectConfig({..._0x65e271,..._0x3b55f9},{'appCodes':[_0x3ff058],'env':_0x3b148c,'metadata':{'version':_0x228be8,'migratedAt':new Date()[_0x1b5c93(0x89)](),'migratedFrom':_0x2cfa7c}});writeConfigFile(_0x3804ab,_0x245f55);const _0x4dec32=_0x2cfa7c+_0x1b5c93(0x86);renameSync(_0x2cfa7c,_0x4dec32),logger[_0x1b5c93(0x8a)](_0x2033ea),logger[_0x1b5c93(0x9b)](_0x1b5c93(0x79),_0x1b5c93(0x9f),{'from':_0x2cfa7c,'to':_0x3804ab,'appcode':_0x3ff058,'env':_0x245f55[_0x1b5c93(0x8d)]}),console[_0x1b5c93(0x92)](a58_0x5dee97[_0x1b5c93(0x74)](_0x1b5c93(0x71)+_0x2914c5+'\x20→\x20.rabetbase.json')),console[_0x1b5c93(0x92)](a58_0x5dee97[_0x1b5c93(0x7d)](_0x1b5c93(0x73)+Object[_0x1b5c93(0x8e)](_0x245f55[_0x1b5c93(0x7c)]||{})[_0x1b5c93(0x7a)](',\x20'))),console[_0x1b5c93(0x92)](a58_0x5dee97[_0x1b5c93(0x7d)](_0x1b5c93(0x84)+_0x245f55['defaultApp'])),console['log'](a58_0x5dee97[_0x1b5c93(0x9d)](_0x1b5c93(0x9a)+_0x2914c5+'.bak'));return;}const _0x20501f=_0x3b1811||await askAppcode(),_0x3b9f1b=resolve(_0x2033ea,NEW_CONFIG_NAME),_0x346310=getCliVersionFromPkg(),_0x52664c=readRawConfig(),_0x34eda8=typeof _0x52664c[_0x1b5c93(0x8d)]===_0x1b5c93(0x70)?_0x52664c[_0x1b5c93(0x8d)]:undefined,_0x35d1ff=buildCanonicalProjectConfig({},{'appCodes':[_0x20501f],'env':_0x385d7f||_0x34eda8||_0x1b5c93(0x98),'metadata':{'version':_0x346310,'createdAt':new Date()[_0x1b5c93(0x89)]()}});writeConfigFile(_0x3b9f1b,_0x35d1ff),logger[_0x1b5c93(0x8a)](_0x2033ea),logger['info'](_0x1b5c93(0x79),_0x1b5c93(0x7b),{'appcode':_0x20501f,'env':_0x35d1ff[_0x1b5c93(0x8d)],'version':_0x35d1ff[_0x1b5c93(0xa1)],'configPath':_0x3b9f1b}),console['log'](a58_0x5dee97['green']('✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory')),console[_0x1b5c93(0x92)](a58_0x5dee97[_0x1b5c93(0x7d)](_0x1b5c93(0x73)+Object['keys'](_0x35d1ff[_0x1b5c93(0x7c)]||{})[_0x1b5c93(0x7a)](',\x20'))),console[_0x1b5c93(0x92)](a58_0x5dee97[_0x1b5c93(0x7d)](_0x1b5c93(0x84)+_0x35d1ff['defaultApp'])),console[_0x1b5c93(0x92)](_0x1b5c93(0x80)+CLI_BIN_NAME+'\x20api\x20generate\x27\x20and\x20\x27'+CLI_BIN_NAME+_0x1b5c93(0x91));}function askAppcode(){return input({'message':'Please\x20enter\x20App\x20Code:','validate':_0xf8e1cf=>{const _0x1b6936=a58_0x4db8;if(!_0xf8e1cf[_0x1b6936(0x78)]())return _0x1b6936(0x72);const {valid:_0x1184ad,message:_0x17bb1a}=validateAppcode(_0xf8e1cf[_0x1b6936(0x78)]());return _0x1184ad||_0x17bb1a||_0x1b6936(0xa4);}});}function getCliVersionFromPkg(){const _0x3009f2=a58_0x4db8;try{const _0x881d12=fileURLToPath(import.meta.url),_0x4d19b7=resolve(dirname(_0x881d12),_0x3009f2(0x96)),_0x5eff11=JSON[_0x3009f2(0x7e)](readFileSync(resolve(_0x4d19b7,_0x3009f2(0x81)),'utf8'));return _0x5eff11['version']||'1.0.0';}catch{return'1.0.0';}}
1
+ (function(_0xa032f3,_0x2113be){const _0x18cfee=a97_0x147e,_0x40d80d=_0xa032f3();while(!![]){try{const _0x2ef64b=parseInt(_0x18cfee(0x1c7))/0x1+parseInt(_0x18cfee(0x1de))/0x2*(-parseInt(_0x18cfee(0x1d3))/0x3)+-parseInt(_0x18cfee(0x1df))/0x4+parseInt(_0x18cfee(0x1ca))/0x5*(parseInt(_0x18cfee(0x1d9))/0x6)+parseInt(_0x18cfee(0x1d6))/0x7+parseInt(_0x18cfee(0x1e2))/0x8*(parseInt(_0x18cfee(0x1c5))/0x9)+parseInt(_0x18cfee(0x1b7))/0xa;if(_0x2ef64b===_0x2113be)break;else _0x40d80d['push'](_0x40d80d['shift']());}catch(_0x1f092a){_0x40d80d['push'](_0x40d80d['shift']());}}}(a97_0x2d24,0xc2a31));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a97_0x35b417 from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';function a97_0x2d24(){const _0x125d9b=['cwd','join','App\x20Code\x20cannot\x20be\x20empty','从旧配置文件升级成功','string','初始化项目配置文件成功','log','1.0.0','yellow','env','apps','9mmmgNV','.bak','172278JIkPSP','parse','\x20\x20Default:\x20','3808165yeRFuD','init','\x20→\x20.rabetbase.json','production','green','defaultApp','cyan','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','\x20api\x20generate\x27\x20and\x20\x27','562278DnjexS','Invalid\x20App\x20Code','✓\x20Upgraded\x20','1268722FwCrIC','trim','Upgrade\x20it\x20to\x20','6SLszXL','keys','package.json','bold','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','14scjBPi','4168004OtyYDF','app','.rabetbase.json','9147760HQmBHD','setLogPath','appcode','\x20project\x20init`\x20to\x20start\x20fresh.','Please\x20enter\x20App\x20Code:','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','../..','\x20\x20appcode:\x20','gray','info','8925890HmYugH','Migration\x20cancelled.\x20Run\x20`','toLocaleString'];a97_0x2d24=function(){return _0x125d9b;};return a97_0x2d24();}function a97_0x147e(_0x4aeb64,_0x1ad945){_0x4aeb64=_0x4aeb64-0x1ae;const _0x2d24b6=a97_0x2d24();let _0x147e62=_0x2d24b6[_0x4aeb64];return _0x147e62;}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(_0x49be3d){const _0xc498d3=a97_0x147e,{appcode:_0x62b462,env:_0x51415a,autoYes:_0x1a8044}=_0x49be3d,_0x1ed416=process[_0xc498d3(0x1ba)]();if(getProjectConfigPath())throw new Error(_0xc498d3(0x1d1));let _0xf3b87a;for(const _0x5cac3c of LEGACY_CONFIG_NAMES){const _0x247d51=resolve(_0x1ed416,_0x5cac3c);if(existsSync(_0x247d51)){_0xf3b87a=_0x247d51;break;}}if(_0xf3b87a){let _0x3c2287={};try{_0x3c2287=JSON[_0xc498d3(0x1c8)](readFileSync(_0xf3b87a,'utf8'));}catch{}const _0x22f32e=basename(_0xf3b87a),_0xa903b=_0x3c2287?.['appcode']||_0x3c2287?.['app'];let _0x13d33f=_0x1a8044;!_0x1a8044&&(console[_0xc498d3(0x1c0)](a97_0x35b417[_0xc498d3(0x1c2)]('⚠\x20Found\x20legacy\x20configuration\x20file:\x20'+a97_0x35b417[_0xc498d3(0x1dc)](_0x22f32e))),_0xa903b&&console[_0xc498d3(0x1c0)](a97_0x35b417[_0xc498d3(0x1d0)](_0xc498d3(0x1b4)+_0xa903b)),_0x13d33f=await confirm({'message':_0xc498d3(0x1d8)+a97_0x35b417['bold'](_0xc498d3(0x1e1))+'?\x20(Old\x20file\x20→\x20*.bak)','default':!![]}));if(!_0x13d33f){console['log'](_0xc498d3(0x1b8)+CLI_BIN_NAME+_0xc498d3(0x1b0));return;}const _0x3466e6=resolve(_0x1ed416,NEW_CONFIG_NAME),_0x6dcc64=getCliVersionFromPkg(),_0x4abe62=readRawConfig(),_0x38bc94=_0x62b462||(typeof _0x3c2287?.[_0xc498d3(0x1af)]==='string'?_0x3c2287[_0xc498d3(0x1af)]:undefined)||(typeof _0x3c2287?.['app']==='string'?_0x3c2287[_0xc498d3(0x1e0)]:undefined)||await askAppcode(),_0x58fd69=typeof _0x3c2287?.['env']===_0xc498d3(0x1be)?_0x3c2287[_0xc498d3(0x1c3)]:typeof _0x4abe62[_0xc498d3(0x1c3)]===_0xc498d3(0x1be)?_0x4abe62[_0xc498d3(0x1c3)]:_0xc498d3(0x1cd),_0x49d82c=buildCanonicalProjectConfig({..._0x4abe62,..._0x3c2287},{'appCodes':[_0x38bc94],'env':_0x58fd69,'metadata':{'version':_0x6dcc64,'migratedAt':new Date()[_0xc498d3(0x1b9)](),'migratedFrom':_0xf3b87a}});writeConfigFile(_0x3466e6,_0x49d82c);const _0x5ebb4f=_0xf3b87a+_0xc498d3(0x1c6);renameSync(_0xf3b87a,_0x5ebb4f),logger[_0xc498d3(0x1ae)](_0x1ed416),logger[_0xc498d3(0x1b6)](_0xc498d3(0x1cb),_0xc498d3(0x1bd),{'from':_0xf3b87a,'to':_0x3466e6,'appcode':_0x38bc94,'env':_0x49d82c[_0xc498d3(0x1c3)]}),console[_0xc498d3(0x1c0)](a97_0x35b417[_0xc498d3(0x1ce)](_0xc498d3(0x1d5)+_0x22f32e+_0xc498d3(0x1cc))),console[_0xc498d3(0x1c0)](a97_0x35b417[_0xc498d3(0x1d0)]('\x20\x20Apps:\x20'+Object[_0xc498d3(0x1da)](_0x49d82c[_0xc498d3(0x1c4)]||{})[_0xc498d3(0x1bb)](',\x20'))),console[_0xc498d3(0x1c0)](a97_0x35b417['cyan'](_0xc498d3(0x1c9)+_0x49d82c[_0xc498d3(0x1cf)])),console[_0xc498d3(0x1c0)](a97_0x35b417[_0xc498d3(0x1b5)](_0xc498d3(0x1b2)+_0x22f32e+_0xc498d3(0x1c6)));return;}const _0xedb8a1=_0x62b462||await askAppcode(),_0x2a64fb=resolve(_0x1ed416,NEW_CONFIG_NAME),_0x508fa8=getCliVersionFromPkg(),_0x4f10f9=readRawConfig(),_0x365b62=typeof _0x4f10f9[_0xc498d3(0x1c3)]===_0xc498d3(0x1be)?_0x4f10f9['env']:undefined,_0x210f1a=buildCanonicalProjectConfig({},{'appCodes':[_0xedb8a1],'env':_0x51415a||_0x365b62||_0xc498d3(0x1cd),'metadata':{'version':_0x508fa8,'createdAt':new Date()['toLocaleString']()}});writeConfigFile(_0x2a64fb,_0x210f1a),logger[_0xc498d3(0x1ae)](_0x1ed416),logger[_0xc498d3(0x1b6)](_0xc498d3(0x1cb),_0xc498d3(0x1bf),{'appcode':_0xedb8a1,'env':_0x210f1a[_0xc498d3(0x1c3)],'version':_0x210f1a['version'],'configPath':_0x2a64fb}),console['log'](a97_0x35b417[_0xc498d3(0x1ce)](_0xc498d3(0x1dd))),console['log'](a97_0x35b417[_0xc498d3(0x1d0)]('\x20\x20Apps:\x20'+Object[_0xc498d3(0x1da)](_0x210f1a[_0xc498d3(0x1c4)]||{})[_0xc498d3(0x1bb)](',\x20'))),console[_0xc498d3(0x1c0)](a97_0x35b417[_0xc498d3(0x1d0)](_0xc498d3(0x1c9)+_0x210f1a[_0xc498d3(0x1cf)])),console[_0xc498d3(0x1c0)]('\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27'+CLI_BIN_NAME+_0xc498d3(0x1d2)+CLI_BIN_NAME+'\x20api\x20pull\x27');}function askAppcode(){const _0x29fadd=a97_0x147e;return input({'message':_0x29fadd(0x1b1),'validate':_0x58cfba=>{const _0x399c06=_0x29fadd;if(!_0x58cfba[_0x399c06(0x1d7)]())return _0x399c06(0x1bc);const {valid:_0x201fac,message:_0x3edfbc}=validateAppcode(_0x58cfba['trim']());return _0x201fac||_0x3edfbc||_0x399c06(0x1d4);}});}function getCliVersionFromPkg(){const _0x6abbdc=a97_0x147e;try{const _0x4e80dd=fileURLToPath(import.meta.url),_0xd07e66=resolve(dirname(_0x4e80dd),_0x6abbdc(0x1b3)),_0x513f02=JSON[_0x6abbdc(0x1c8)](readFileSync(resolve(_0xd07e66,_0x6abbdc(0x1db)),'utf8'));return _0x513f02['version']||'1.0.0';}catch{return _0x6abbdc(0x1c1);}}
@@ -1 +1 @@
1
- const a57_0x55de1b=a57_0x3981;(function(_0x12a4d3,_0x1e5e6f){const _0x3154db=a57_0x3981,_0x3caf1c=_0x12a4d3();while(!![]){try{const _0xbfa4f7=parseInt(_0x3154db(0x1a7))/0x1*(-parseInt(_0x3154db(0x1f9))/0x2)+-parseInt(_0x3154db(0x1b0))/0x3+-parseInt(_0x3154db(0x214))/0x4*(parseInt(_0x3154db(0x1a9))/0x5)+parseInt(_0x3154db(0x1f5))/0x6*(-parseInt(_0x3154db(0x1bb))/0x7)+parseInt(_0x3154db(0x1e0))/0x8*(parseInt(_0x3154db(0x1fa))/0x9)+parseInt(_0x3154db(0x1eb))/0xa*(-parseInt(_0x3154db(0x1b7))/0xb)+parseInt(_0x3154db(0x220))/0xc*(parseInt(_0x3154db(0x1c4))/0xd);if(_0xbfa4f7===_0x1e5e6f)break;else _0x3caf1c['push'](_0x3caf1c['shift']());}catch(_0x119123){_0x3caf1c['push'](_0x3caf1c['shift']());}}}(a57_0x35ad,0x5bfb6));import a57_0x379a8a from'chalk';function a57_0x3981(_0x38161c,_0x2715a1){_0x38161c=_0x38161c-0x1a7;const _0x35ad53=a57_0x35ad();let _0x39811b=_0x35ad53[_0x38161c];return _0x39811b;}import a57_0x588080 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{runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a57_0x55de1b(0x206)](_0x5dd7b7=>_0x5dd7b7!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x2b8189){const _0x19eac2=a57_0x55de1b,_0x48a92a=[];for(const _0x3631e6 of Object[_0x19eac2(0x1f6)](CORE_IDE_CONFIGS)){if(_0x3631e6[_0x19eac2(0x1ee)])for(const _0x4a891b of _0x3631e6[_0x19eac2(0x1ee)]){_0x48a92a[_0x19eac2(0x1fb)](resolve(_0x2b8189,_0x4a891b[_0x19eac2(0x223)]));}}return _0x48a92a;}function a57_0x35ad(){const _0x372cbc=['start','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','cyan','Legacy\x20artifacts:','yellow','@lovrabet/sdk:','\x20→\x20latest','includes','28377780iTTmFY','detail','Step\x201/7:\x20Migrating\x20config...','path','Upgrade\x20@lovrabet/sdk','.bak','1039VPpfKP','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','190QlsCXU','FAIL','done','.lovrabet','\x20\x20bun\x20install','dependencies','hasNewConfig','1262238vTFnBw','succeed','package.json','no\x20legacy\x20config\x20found','oldMcpConfig','length','\x20\x20npm\x20install','88OMAUcR','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','\x20\x20New\x20config\x20(.rabetbase.json):\x20','Step\x201/7:\x20Config\x20migration\x20—\x20','7EYetWT','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','yes','Install\x20new\x20skill','none\x20found','.cursor/rules/lovrabet_rules.mdc','mcpServers','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','parse','13REuakg','join','inherit','string','exit\x20','sdkUpgrade','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','not\x20found\x20or\x20already\x20at\x20latest','log','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','needed','object','cwd','args','entries','Clean\x20MCP\x20config','\x20→\x20keys:\x20','\x20(backup:\x20','lovrabet/rabetbase\x20installed\x20globally','not\x20found\x20(will\x20create)','Config\x20file:','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','label','.claude/skills/lovrabet','gray','bold','Proceed\x20with\x20upgrade?','utf8','1473816quxeMX','skipped\x20(no\x20legacy\x20config)','.cursor/mcp.json','white','info','green','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','Config\x20migration','Upgrade\x20cancelled.','lovrabet/lovrabet-skill\x20removed','some','636590xiAQKi','skipped','===\x20Upgrade\x20Analysis\x20===','files','CANCEL','undefined','error','oldArtifacts','fail','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','4173402DkhDcR','values','MCP\x20config:','Skill\x20swap:','414Ajgumz','9QjNSsg','push','Step\x206/7:\x20Installing\x20new\x20skill...','isArray','keys','no\x20legacy\x20entry','status','Step\x205/7:\x20Removing\x20old\x20skill...','failed','===\x20Upgrade\x20Summary\x20===','\x20\x20Action:\x20delete','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','filter','latest','fields','\x20\x20Fields\x20to\x20migrate:\x20','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','oldPath','Step\x204/7:\x20MCP\x20config\x20—\x20','@lovrabet/sdk','message','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','\x20\x20#\x20or','red','isDirectory','Remove\x20legacy\x20artifacts','34908zEYfTF','stringify','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','\x20removed'];a57_0x35ad=function(){return _0x372cbc;};return a57_0x35ad();}function analyse(_0x27742b){const _0x4e526a=a57_0x55de1b;let _0x5c2e47=null;const _0x25780d=resolve(_0x27742b,NEW_CONFIG_NAME),_0x87506c=existsSync(_0x25780d);for(const _0x44e536 of LEGACY_CONFIG_NAMES){const _0x5430f3=resolve(_0x27742b,_0x44e536);if(existsSync(_0x5430f3)){const _0x20ac29=readConfigFile(_0x5430f3),_0x10caec=Object[_0x4e526a(0x1fe)](_0x20ac29)['filter'](_0x42919d=>typeof _0x20ac29[_0x42919d]!==_0x4e526a(0x1f0));_0x5c2e47={'oldPath':_0x5430f3,'hasNewConfig':_0x87506c,'fields':_0x10caec};break;}}const _0x1c0c51=[],_0x5b5a35=resolve(_0x27742b,_0x4e526a(0x1ac));if(existsSync(_0x5b5a35))_0x1c0c51[_0x4e526a(0x1fb)](_0x5b5a35);const _0xf4e66e=resolve(_0x27742b,_0x4e526a(0x1c0));if(existsSync(_0xf4e66e))_0x1c0c51[_0x4e526a(0x1fb)](_0xf4e66e);const _0x1463e6=resolve(_0x27742b,_0x4e526a(0x1db));if(existsSync(_0x1463e6))_0x1c0c51['push'](_0x1463e6);for(const _0x398418 of collectIdeSkillFiles(_0x27742b)){if(existsSync(_0x398418))_0x1c0c51['push'](_0x398418);}let _0x3a6051=null;const _0x223c87=resolve(_0x27742b,_0x4e526a(0x1e2));if(existsSync(_0x223c87))try{const _0x32d84c=JSON[_0x4e526a(0x1c3)](readFileSync(_0x223c87,_0x4e526a(0x1df)));if(_0x32d84c?.[_0x4e526a(0x1c1)]&&typeof _0x32d84c[_0x4e526a(0x1c1)]===_0x4e526a(0x1cf)){const _0x1e444b=[];for(const [_0x443cd2,_0xf05755]of Object['entries'](_0x32d84c[_0x4e526a(0x1c1)])){const _0x3131b8=_0xf05755;_0x3131b8?.[_0x4e526a(0x1d1)]&&Array[_0x4e526a(0x1fd)](_0x3131b8['args'])&&_0x3131b8['args'][_0x4e526a(0x1ea)](_0x479c65=>typeof _0x479c65==='string'&&_0x479c65[_0x4e526a(0x21f)]('@lovrabet/dataset-mcp-server'))&&_0x1e444b[_0x4e526a(0x1fb)](_0x443cd2);}_0x1e444b[_0x4e526a(0x1b5)]>0x0&&(_0x3a6051={'path':_0x223c87,'keys':_0x1e444b});}}catch{}const _0x72cffd=_0x1c0c51['length']>0x0||_0x5c2e47!==null;let _0x40bdbb=null;const _0x4becc4=resolve(_0x27742b,_0x4e526a(0x1b2));if(existsSync(_0x4becc4))try{const _0x21fd30=JSON[_0x4e526a(0x1c3)](readFileSync(_0x4becc4,_0x4e526a(0x1df)));for(const _0x1a32a0 of[_0x4e526a(0x1ae),'devDependencies']){const _0x59d60d=_0x21fd30?.[_0x1a32a0]?.[_0x4e526a(0x20d)];if(typeof _0x59d60d===_0x4e526a(0x1c7)){_0x59d60d!==_0x4e526a(0x207)&&(_0x40bdbb={'pkgPath':_0x4becc4,'currentVersion':_0x59d60d,'field':_0x1a32a0});break;}}}catch{}return{'configMigration':_0x5c2e47,'oldArtifacts':_0x1c0c51,'oldMcpConfig':_0x3a6051,'needsSkillSwap':_0x72cffd,'sdkUpgrade':_0x40bdbb};}function printReport(_0x2a3fda){const _0x30c745=a57_0x55de1b,{configMigration:_0x4166bd,oldArtifacts:_0xd5ec5c,oldMcpConfig:_0x1fb4ee,needsSkillSwap:_0x585743}=_0x2a3fda;console['log'](''),console[_0x30c745(0x1cc)](a57_0x379a8a['bold'](_0x30c745(0x1ed))),console[_0x30c745(0x1cc)]('');_0x4166bd?(console[_0x30c745(0x1cc)](a57_0x379a8a[_0x30c745(0x21a)]('Config\x20file:')+('\x20\x20'+a57_0x379a8a[_0x30c745(0x21c)](_0x4166bd['oldPath']))),console[_0x30c745(0x1cc)](_0x30c745(0x1b9)+(_0x4166bd[_0x30c745(0x1af)]?a57_0x379a8a[_0x30c745(0x1e5)]('already\x20exists\x20(will\x20merge)'):a57_0x379a8a[_0x30c745(0x1dc)](_0x30c745(0x1d7)))),console['log'](_0x30c745(0x209)+_0x4166bd[_0x30c745(0x208)]['join'](',\x20')),console['log'](_0x30c745(0x1f4))):console[_0x30c745(0x1cc)](a57_0x379a8a['cyan'](_0x30c745(0x1d8))+'\x20\x20'+a57_0x379a8a[_0x30c745(0x1dc)](_0x30c745(0x1b3)));console[_0x30c745(0x1cc)]('');if(_0xd5ec5c[_0x30c745(0x1b5)]>0x0){console['log'](a57_0x379a8a[_0x30c745(0x21a)](_0x30c745(0x21b)));for(const _0x253686 of _0xd5ec5c){console[_0x30c745(0x1cc)]('\x20\x20'+a57_0x379a8a[_0x30c745(0x211)]('FOUND')+'\x20\x20'+_0x253686);}console['log'](_0x30c745(0x204));}else console['log'](a57_0x379a8a[_0x30c745(0x21a)](_0x30c745(0x21b))+'\x20\x20'+a57_0x379a8a['gray'](_0x30c745(0x1bf)));console['log']('');_0x1fb4ee?(console[_0x30c745(0x1cc)](a57_0x379a8a[_0x30c745(0x21a)](_0x30c745(0x1f7))+('\x20\x20'+a57_0x379a8a[_0x30c745(0x21c)](_0x1fb4ee[_0x30c745(0x223)])+_0x30c745(0x1d4)+_0x1fb4ee[_0x30c745(0x1fe)][_0x30c745(0x1c5)](',\x20'))),console[_0x30c745(0x1cc)]('\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server')):console[_0x30c745(0x1cc)](a57_0x379a8a[_0x30c745(0x21a)](_0x30c745(0x1f7))+'\x20\x20'+a57_0x379a8a[_0x30c745(0x1dc)](_0x30c745(0x1ff)));console[_0x30c745(0x1cc)](''),console[_0x30c745(0x1cc)](a57_0x379a8a[_0x30c745(0x21a)](_0x30c745(0x1f8))+('\x20\x20'+(_0x585743?a57_0x379a8a['yellow'](_0x30c745(0x1ce)):a57_0x379a8a[_0x30c745(0x1e5)]('not\x20needed'))));_0x585743&&console[_0x30c745(0x1cc)]('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20lovrabet/rabetbase\x20--global');console[_0x30c745(0x1cc)]('');if(_0x2a3fda[_0x30c745(0x1c9)]){const {currentVersion:_0x908cf1,field:_0x4bd1b1,pkgPath:_0x169c05}=_0x2a3fda[_0x30c745(0x1c9)];console[_0x30c745(0x1cc)](a57_0x379a8a[_0x30c745(0x21a)](_0x30c745(0x21d))+('\x20\x20'+a57_0x379a8a['yellow'](_0x169c05))),console[_0x30c745(0x1cc)]('\x20\x20Current\x20version\x20in\x20'+_0x4bd1b1+':\x20'+a57_0x379a8a[_0x30c745(0x21c)](_0x908cf1)+'\x20→\x20'+a57_0x379a8a['green'](_0x30c745(0x207))),console['log'](_0x30c745(0x216));}else console[_0x30c745(0x1cc)](a57_0x379a8a[_0x30c745(0x21a)](_0x30c745(0x21d))+'\x20\x20'+a57_0x379a8a['gray'](_0x30c745(0x1cb)));console[_0x30c745(0x1cc)]('');}function execConfigMigration(_0x189295,_0x44b4bc){const _0x10ed10=a57_0x55de1b,{configMigration:_0x4e799b}=_0x189295;if(!_0x4e799b?.[_0x10ed10(0x20b)])return{'step':0x1,'label':_0x10ed10(0x1e7),'ok':!![],'detail':_0x10ed10(0x1e1)};const _0x4a60a7=readConfigFile(_0x4e799b[_0x10ed10(0x20b)]),_0x25e1fd=resolve(_0x44b4bc,NEW_CONFIG_NAME),_0x2d0f0a=_0x4e799b['hasNewConfig']?readConfigFile(_0x25e1fd):{};for(const [_0x4bd362,_0x4f694c]of Object['entries'](_0x4a60a7)){!(_0x4bd362 in _0x2d0f0a)&&(_0x2d0f0a[_0x4bd362]=_0x4f694c);}writeConfigFile(_0x25e1fd,_0x2d0f0a);const _0x2fe3a8=_0x4e799b['oldPath']+_0x10ed10(0x225);return renameSync(_0x4e799b[_0x10ed10(0x20b)],_0x2fe3a8),{'step':0x1,'label':_0x10ed10(0x1e7),'ok':!![],'detail':_0x4e799b[_0x10ed10(0x20b)]+'\x20→\x20'+_0x25e1fd+_0x10ed10(0x1d5)+_0x2fe3a8+')'};}function execRemoveOldArtifacts(_0xc94979){const _0xabe3b5=a57_0x55de1b,_0x4a6be1=[];for(const _0x5e2107 of _0xc94979){try{if(!existsSync(_0x5e2107))continue;const _0x15fa8f=tryStat(_0x5e2107);_0x15fa8f?.[_0xabe3b5(0x212)]()?rmSync(_0x5e2107,{'recursive':!![],'force':!![]}):unlinkSync(_0x5e2107);}catch(_0x1550d0){_0x4a6be1['push'](_0x5e2107+':\x20'+_0x1550d0[_0xabe3b5(0x20e)]);}}return{'step':0x3,'label':_0xabe3b5(0x213),'ok':_0x4a6be1[_0xabe3b5(0x1b5)]===0x0,'detail':_0x4a6be1[_0xabe3b5(0x1b5)]>0x0?_0xc94979[_0xabe3b5(0x1b5)]-_0x4a6be1[_0xabe3b5(0x1b5)]+'/'+_0xc94979[_0xabe3b5(0x1b5)]+'\x20removed\x20('+_0x4a6be1[_0xabe3b5(0x1c5)](';\x20')+')':_0xc94979['length']+_0xabe3b5(0x217)};}function execCleanMcp(_0x224bfc){const _0x2142e3=a57_0x55de1b;if(!_0x224bfc[_0x2142e3(0x1b4)])return{'step':0x4,'label':_0x2142e3(0x1d3),'ok':!![],'detail':_0x2142e3(0x1ec)};try{const _0x41a697=readFileSync(_0x224bfc['oldMcpConfig'][_0x2142e3(0x223)],_0x2142e3(0x1df)),_0xd1c8ba=JSON[_0x2142e3(0x1c3)](_0x41a697);if(_0xd1c8ba?.['mcpServers']&&typeof _0xd1c8ba[_0x2142e3(0x1c1)]===_0x2142e3(0x1cf)){const _0x80649c=[];for(const [_0x439c62,_0x2367c7]of Object[_0x2142e3(0x1d2)](_0xd1c8ba['mcpServers'])){_0x2367c7?.[_0x2142e3(0x1d1)]&&Array['isArray'](_0x2367c7['args'])&&_0x2367c7['args'][_0x2142e3(0x1ea)](_0x40ebe5=>typeof _0x40ebe5===_0x2142e3(0x1c7)&&_0x40ebe5[_0x2142e3(0x21f)]('@lovrabet/dataset-mcp-server'))&&_0x80649c[_0x2142e3(0x1fb)](_0x439c62);}for(const _0x5ed6bc of _0x80649c){delete _0xd1c8ba[_0x2142e3(0x1c1)][_0x5ed6bc];}return _0x80649c[_0x2142e3(0x1b5)]>0x0&&writeFileSync(_0x224bfc[_0x2142e3(0x1b4)][_0x2142e3(0x223)],JSON[_0x2142e3(0x215)](_0xd1c8ba,null,0x2)+'\x0a',_0x2142e3(0x1df)),{'step':0x4,'label':_0x2142e3(0x1d3),'ok':!![],'detail':'removed\x20'+_0x80649c[_0x2142e3(0x1c5)](',\x20')+'\x20from\x20'+_0x224bfc[_0x2142e3(0x1b4)][_0x2142e3(0x223)]};}return{'step':0x4,'label':_0x2142e3(0x1d3),'ok':!![],'detail':'no\x20matching\x20entry\x20found'};}catch(_0x2a14e7){return{'step':0x4,'label':_0x2142e3(0x1d3),'ok':![],'detail':_0x2a14e7[_0x2142e3(0x20e)]};}}function execSkillsRemove(_0x27ade0,_0x51db99){const _0x463c60=a57_0x55de1b,_0x2bb398=runNpxSkillsRemove(_0x27ade0,{'stdio':_0x463c60(0x1c6),'yes':_0x51db99});return{'step':0x5,'label':'Remove\x20old\x20skill','ok':_0x2bb398['ok'],'detail':_0x2bb398['ok']?_0x463c60(0x1e9):_0x2bb398['error']??_0x463c60(0x1c8)+_0x2bb398[_0x463c60(0x200)]};}function execSkillsAdd(_0x1cab5d,_0x19b113){const _0xb7618d=a57_0x55de1b,_0x55b309=runNpxSkillsAddGlobal(_0x1cab5d,'lovrabet/rabetbase',{'stdio':_0xb7618d(0x1c6),'yes':_0x19b113});return{'step':0x6,'label':_0xb7618d(0x1be),'ok':_0x55b309['ok'],'detail':_0x55b309['ok']?_0xb7618d(0x1d6):_0x55b309[_0xb7618d(0x1f1)]??_0xb7618d(0x1c8)+_0x55b309[_0xb7618d(0x200)]};}function execUpgradeSdk(_0x3f6495){const _0x256311=a57_0x55de1b;if(!_0x3f6495[_0x256311(0x1c9)])return{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':'skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)'};const {pkgPath:_0x42b735,currentVersion:_0x306421,field:_0x3593fc}=_0x3f6495[_0x256311(0x1c9)];try{const _0x2b546b=readFileSync(_0x42b735,_0x256311(0x1df)),_0x4842bb=JSON[_0x256311(0x1c3)](_0x2b546b);return _0x4842bb[_0x3593fc][_0x256311(0x20d)]=_0x256311(0x207),writeFileSync(_0x42b735,JSON[_0x256311(0x215)](_0x4842bb,null,0x2)+'\x0a',_0x256311(0x1df)),{'step':0x7,'label':_0x256311(0x224),'ok':!![],'detail':_0x3593fc+'[\x22@lovrabet/sdk\x22]:\x20'+_0x306421+_0x256311(0x21e)};}catch(_0x25a435){return{'step':0x7,'label':_0x256311(0x224),'ok':![],'detail':_0x25a435[_0x256311(0x20e)]};}}function tryStat(_0x360818){try{return statSync(_0x360818);}catch{return undefined;}}function printSummary(_0x443097){const _0x403656=a57_0x55de1b;console[_0x403656(0x1cc)](''),console[_0x403656(0x1cc)](a57_0x379a8a[_0x403656(0x1dd)](_0x403656(0x203))),console[_0x403656(0x1cc)]('');for(const _0x1f2a62 of _0x443097){const _0x5097c4=_0x1f2a62['ok']?a57_0x379a8a[_0x403656(0x1e5)]('OK'):a57_0x379a8a[_0x403656(0x211)](_0x403656(0x1aa));console[_0x403656(0x1cc)]('\x20\x20'+_0x5097c4+'\x20\x20Step\x20'+_0x1f2a62['step']+':\x20'+_0x1f2a62[_0x403656(0x1da)]);if(_0x1f2a62[_0x403656(0x221)])console[_0x403656(0x1cc)]('\x20\x20\x20\x20\x20\x20\x20'+a57_0x379a8a[_0x403656(0x1dc)](_0x1f2a62[_0x403656(0x221)]));}console['log']('');}export async function upgradeApp(_0x3eb52e,_0x1a896b){const _0x2f145f=a57_0x55de1b,_0x546694=process[_0x2f145f(0x1d0)](),_0x2af8a1=analyse(_0x546694),_0x337b36=!_0x2af8a1['configMigration']&&_0x2af8a1[_0x2f145f(0x1f2)]['length']===0x0&&!_0x2af8a1[_0x2f145f(0x1b4)]&&!_0x2af8a1['needsSkillSwap']&&!_0x2af8a1[_0x2f145f(0x1c9)];if(_0x337b36){console[_0x2f145f(0x1cc)](a57_0x379a8a[_0x2f145f(0x1e5)](_0x2f145f(0x20a)));return;}printReport(_0x2af8a1);const _0x2bdcb6=!!(_0x1a896b[_0x2f145f(0x1bd)]||_0x1a896b['Y']||_0x3eb52e);if(!_0x2bdcb6)try{const _0x9997c1=await askConfirm(_0x2f145f(0x1de));if(!_0x9997c1){console[_0x2f145f(0x1cc)](a57_0x379a8a['gray'](_0x2f145f(0x1e8)));return;}}catch(_0x499d4a){if(_0x499d4a?.[_0x2f145f(0x20e)]===_0x2f145f(0x1ef)){console[_0x2f145f(0x1cc)](a57_0x379a8a['gray'](_0x2f145f(0x1e8)));return;}throw _0x499d4a;}const _0x1a9ef5=[],_0x113168=a57_0x588080({'text':_0x2f145f(0x222),'color':'cyan'})[_0x2f145f(0x218)](),_0xba73ba=execConfigMigration(_0x2af8a1,_0x546694);_0x1a9ef5[_0x2f145f(0x1fb)](_0xba73ba),_0x113168[_0xba73ba['ok']?_0x2f145f(0x1b1):'fail'](_0x2f145f(0x1ba)+(_0xba73ba['detail']??(_0xba73ba['ok']?_0x2f145f(0x1ab):_0x2f145f(0x202))));const _0x237aef=resolve(_0x546694,_0x2f145f(0x1ac)),_0x37f3cc=a57_0x588080({'text':'Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','color':_0x2f145f(0x21a)})[_0x2f145f(0x218)]();if(existsSync(_0x237aef))try{rmSync(_0x237aef,{'recursive':!![],'force':!![]}),_0x37f3cc[_0x2f145f(0x1b1)](_0x2f145f(0x1e6)),_0x1a9ef5[_0x2f145f(0x1fb)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0x3fd36d){_0x37f3cc[_0x2f145f(0x1f3)](_0x2f145f(0x205)+_0x3fd36d[_0x2f145f(0x20e)]),_0x1a9ef5[_0x2f145f(0x1fb)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':![],'detail':_0x3fd36d['message']});}else _0x37f3cc[_0x2f145f(0x1e4)](_0x2f145f(0x1a8)),_0x1a9ef5[_0x2f145f(0x1fb)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![],'detail':_0x2f145f(0x1ec)});const _0x514d54=a57_0x588080({'text':_0x2f145f(0x1c2),'color':_0x2f145f(0x21a)})['start'](),_0x2aea3a=execRemoveOldArtifacts(_0x2af8a1[_0x2f145f(0x1f2)]);_0x1a9ef5['push'](_0x2aea3a),_0x514d54[_0x2aea3a['ok']?_0x2f145f(0x1b1):_0x2f145f(0x1f3)](_0x2f145f(0x20f)+(_0x2aea3a[_0x2f145f(0x221)]??(_0x2aea3a['ok']?_0x2f145f(0x1ab):_0x2f145f(0x202))));const _0x26c747=a57_0x588080({'text':'Step\x204/7:\x20Cleaning\x20MCP\x20config...','color':_0x2f145f(0x21a)})[_0x2f145f(0x218)](),_0x5838df=execCleanMcp(_0x2af8a1);_0x1a9ef5[_0x2f145f(0x1fb)](_0x5838df),_0x26c747[_0x5838df['ok']?_0x2f145f(0x1b1):_0x2f145f(0x1f3)](_0x2f145f(0x20c)+(_0x5838df[_0x2f145f(0x221)]??(_0x5838df['ok']?_0x2f145f(0x1ab):_0x2f145f(0x202))));const _0x3a5ac0=a57_0x588080({'text':_0x2f145f(0x201),'color':_0x2f145f(0x21a)})[_0x2f145f(0x218)](),_0xc099d5=execSkillsRemove(_0x546694,_0x2bdcb6);_0x1a9ef5[_0x2f145f(0x1fb)](_0xc099d5),_0x3a5ac0[_0xc099d5['ok']?_0x2f145f(0x1b1):_0x2f145f(0x1f3)](_0x2f145f(0x219)+(_0xc099d5[_0x2f145f(0x221)]??(_0xc099d5['ok']?_0x2f145f(0x1ab):_0x2f145f(0x202))));const _0x4f3db2=a57_0x588080({'text':_0x2f145f(0x1fc),'color':_0x2f145f(0x21a)})[_0x2f145f(0x218)](),_0x3081c0=execSkillsAdd(_0x546694,_0x2bdcb6);_0x1a9ef5['push'](_0x3081c0),_0x4f3db2[_0x3081c0['ok']?_0x2f145f(0x1b1):'fail'](_0x2f145f(0x1b8)+(_0x3081c0[_0x2f145f(0x221)]??(_0x3081c0['ok']?_0x2f145f(0x1ab):_0x2f145f(0x202))));const _0x498a4d=a57_0x588080({'text':_0x2f145f(0x1ca),'color':'cyan'})['start'](),_0x402c12=execUpgradeSdk(_0x2af8a1);_0x1a9ef5[_0x2f145f(0x1fb)](_0x402c12),_0x498a4d[_0x402c12['ok']?_0x2f145f(0x1b1):_0x2f145f(0x1f3)](_0x2f145f(0x1d9)+(_0x402c12['detail']??(_0x402c12['ok']?_0x2f145f(0x1ab):_0x2f145f(0x202)))),printSummary(_0x1a9ef5);const _0x48a35e=_0x1a9ef5['some'](_0x339db6=>!_0x339db6['ok']);_0x48a35e?console[_0x2f145f(0x1cc)](a57_0x379a8a[_0x2f145f(0x21c)]('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console['log'](a57_0x379a8a[_0x2f145f(0x1e5)]('Upgrade\x20completed\x20successfully!')),_0x402c12['ok']&&_0x2af8a1[_0x2f145f(0x1c9)]&&(console[_0x2f145f(0x1cc)](''),console[_0x2f145f(0x1cc)](a57_0x379a8a['bold'][_0x2f145f(0x21a)](_0x2f145f(0x1cd))),console['log'](a57_0x379a8a[_0x2f145f(0x21a)](_0x2f145f(0x1bc))),console[_0x2f145f(0x1cc)](''),console[_0x2f145f(0x1cc)](a57_0x379a8a['white'](_0x2f145f(0x1b6))),console[_0x2f145f(0x1cc)](a57_0x379a8a[_0x2f145f(0x1e3)](_0x2f145f(0x210))),console[_0x2f145f(0x1cc)](a57_0x379a8a[_0x2f145f(0x1e3)](_0x2f145f(0x1ad))),console[_0x2f145f(0x1cc)](''));}
1
+ const a98_0x490ca7=a98_0x5eff;(function(_0x22d7be,_0x499974){const _0x2e867f=a98_0x5eff,_0x5d2596=_0x22d7be();while(!![]){try{const _0x579ae0=-parseInt(_0x2e867f(0xbb))/0x1+parseInt(_0x2e867f(0xeb))/0x2*(-parseInt(_0x2e867f(0x99))/0x3)+parseInt(_0x2e867f(0xab))/0x4+-parseInt(_0x2e867f(0x103))/0x5*(-parseInt(_0x2e867f(0x9d))/0x6)+-parseInt(_0x2e867f(0xce))/0x7*(-parseInt(_0x2e867f(0x9b))/0x8)+parseInt(_0x2e867f(0xda))/0x9*(-parseInt(_0x2e867f(0xf7))/0xa)+parseInt(_0x2e867f(0x98))/0xb;if(_0x579ae0===_0x499974)break;else _0x5d2596['push'](_0x5d2596['shift']());}catch(_0x483376){_0x5d2596['push'](_0x5d2596['shift']());}}}(a98_0xd5ff,0x98502));import a98_0x5d9caf from'chalk';import a98_0x14b741 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{runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a98_0x490ca7(0xe6)](_0xbd9f58=>_0xbd9f58!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x3eec16){const _0x2248db=a98_0x490ca7,_0x386c5e=[];for(const _0x283338 of Object[_0x2248db(0xca)](CORE_IDE_CONFIGS)){if(_0x283338[_0x2248db(0xf2)])for(const _0x434f97 of _0x283338[_0x2248db(0xf2)]){_0x386c5e['push'](resolve(_0x3eec16,_0x434f97[_0x2248db(0xa4)]));}}return _0x386c5e;}function a98_0x5eff(_0x5a5548,_0x27c317){_0x5a5548=_0x5a5548-0x8a;const _0xd5ff3a=a98_0xd5ff();let _0x5eff20=_0xd5ff3a[_0x5a5548];return _0x5eff20;}function analyse(_0x10ab77){const _0x3aee66=a98_0x490ca7;let _0x41abfd=null;const _0x32483e=resolve(_0x10ab77,NEW_CONFIG_NAME),_0x145ec7=existsSync(_0x32483e);for(const _0x318c76 of LEGACY_CONFIG_NAMES){const _0x29b437=resolve(_0x10ab77,_0x318c76);if(existsSync(_0x29b437)){const _0x3a0af6=readConfigFile(_0x29b437),_0x2974c9=Object[_0x3aee66(0x93)](_0x3a0af6)['filter'](_0x3d9e06=>typeof _0x3a0af6[_0x3d9e06]!=='undefined');_0x41abfd={'oldPath':_0x29b437,'hasNewConfig':_0x145ec7,'fields':_0x2974c9};break;}}const _0x497b2b=[],_0x11a63d=resolve(_0x10ab77,_0x3aee66(0xae));if(existsSync(_0x11a63d))_0x497b2b[_0x3aee66(0xe5)](_0x11a63d);const _0x1cd342=resolve(_0x10ab77,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x1cd342))_0x497b2b['push'](_0x1cd342);const _0x2ee320=resolve(_0x10ab77,_0x3aee66(0xdc));if(existsSync(_0x2ee320))_0x497b2b['push'](_0x2ee320);for(const _0x21d784 of collectIdeSkillFiles(_0x10ab77)){if(existsSync(_0x21d784))_0x497b2b[_0x3aee66(0xe5)](_0x21d784);}let _0x4233ea=null;const _0x3426b7=resolve(_0x10ab77,_0x3aee66(0xb7));if(existsSync(_0x3426b7))try{const _0x5d00ad=JSON[_0x3aee66(0xc5)](readFileSync(_0x3426b7,_0x3aee66(0xa7)));if(_0x5d00ad?.[_0x3aee66(0xbf)]&&typeof _0x5d00ad[_0x3aee66(0xbf)]===_0x3aee66(0xf6)){const _0x4a2bb2=[];for(const [_0x4bbff5,_0x2ff599]of Object['entries'](_0x5d00ad[_0x3aee66(0xbf)])){const _0x5417d5=_0x2ff599;_0x5417d5?.[_0x3aee66(0xa5)]&&Array[_0x3aee66(0xaf)](_0x5417d5[_0x3aee66(0xa5)])&&_0x5417d5[_0x3aee66(0xa5)][_0x3aee66(0xac)](_0x29ddc2=>typeof _0x29ddc2==='string'&&_0x29ddc2['includes'](_0x3aee66(0xa0)))&&_0x4a2bb2[_0x3aee66(0xe5)](_0x4bbff5);}_0x4a2bb2['length']>0x0&&(_0x4233ea={'path':_0x3426b7,'keys':_0x4a2bb2});}}catch{}const _0x5ea656=_0x497b2b[_0x3aee66(0xfb)]>0x0||_0x41abfd!==null;let _0x351a3d=null;const _0x24e04d=resolve(_0x10ab77,_0x3aee66(0xe8));if(existsSync(_0x24e04d))try{const _0x38a9e1=JSON['parse'](readFileSync(_0x24e04d,'utf8'));for(const _0x40ac08 of['dependencies',_0x3aee66(0xde)]){const _0x548700=_0x38a9e1?.[_0x40ac08]?.[_0x3aee66(0xb3)];if(typeof _0x548700===_0x3aee66(0xe4)){_0x548700!==_0x3aee66(0x97)&&(_0x351a3d={'pkgPath':_0x24e04d,'currentVersion':_0x548700,'field':_0x40ac08});break;}}}catch{}return{'configMigration':_0x41abfd,'oldArtifacts':_0x497b2b,'oldMcpConfig':_0x4233ea,'needsSkillSwap':_0x5ea656,'sdkUpgrade':_0x351a3d};}function printReport(_0x593aaa){const _0x51d92a=a98_0x490ca7,{configMigration:_0x2bc0b7,oldArtifacts:_0x476157,oldMcpConfig:_0x14a36a,needsSkillSwap:_0x2e9765}=_0x593aaa;console[_0x51d92a(0xcc)](''),console[_0x51d92a(0xcc)](a98_0x5d9caf[_0x51d92a(0xc7)](_0x51d92a(0xb8))),console[_0x51d92a(0xcc)]('');_0x2bc0b7?(console['log'](a98_0x5d9caf[_0x51d92a(0xb0)](_0x51d92a(0xed))+('\x20\x20'+a98_0x5d9caf[_0x51d92a(0xa3)](_0x2bc0b7['oldPath']))),console['log'](_0x51d92a(0x8d)+(_0x2bc0b7[_0x51d92a(0xcb)]?a98_0x5d9caf[_0x51d92a(0xd2)](_0x51d92a(0xcd)):a98_0x5d9caf[_0x51d92a(0xbe)](_0x51d92a(0xf4)))),console[_0x51d92a(0xcc)]('\x20\x20Fields\x20to\x20migrate:\x20'+_0x2bc0b7[_0x51d92a(0xc0)][_0x51d92a(0xc3)](',\x20')),console[_0x51d92a(0xcc)]('\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak')):console[_0x51d92a(0xcc)](a98_0x5d9caf[_0x51d92a(0xb0)](_0x51d92a(0xed))+'\x20\x20'+a98_0x5d9caf[_0x51d92a(0xbe)]('no\x20legacy\x20config\x20found'));console[_0x51d92a(0xcc)]('');if(_0x476157[_0x51d92a(0xfb)]>0x0){console[_0x51d92a(0xcc)](a98_0x5d9caf[_0x51d92a(0xb0)]('Legacy\x20artifacts:'));for(const _0x49239c of _0x476157){console[_0x51d92a(0xcc)]('\x20\x20'+a98_0x5d9caf[_0x51d92a(0xe2)](_0x51d92a(0xba))+'\x20\x20'+_0x49239c);}console[_0x51d92a(0xcc)](_0x51d92a(0xd0));}else console[_0x51d92a(0xcc)](a98_0x5d9caf[_0x51d92a(0xb0)](_0x51d92a(0xb6))+'\x20\x20'+a98_0x5d9caf[_0x51d92a(0xbe)](_0x51d92a(0xe9)));console[_0x51d92a(0xcc)]('');_0x14a36a?(console[_0x51d92a(0xcc)](a98_0x5d9caf['cyan']('MCP\x20config:')+('\x20\x20'+a98_0x5d9caf[_0x51d92a(0xa3)](_0x14a36a[_0x51d92a(0xa4)])+'\x20→\x20keys:\x20'+_0x14a36a[_0x51d92a(0x93)][_0x51d92a(0xc3)](',\x20'))),console['log']('\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server')):console['log'](a98_0x5d9caf['cyan'](_0x51d92a(0xfc))+'\x20\x20'+a98_0x5d9caf[_0x51d92a(0xbe)](_0x51d92a(0xc1)));console[_0x51d92a(0xcc)](''),console[_0x51d92a(0xcc)](a98_0x5d9caf['cyan'](_0x51d92a(0x92))+('\x20\x20'+(_0x2e9765?a98_0x5d9caf[_0x51d92a(0xa3)]('needed'):a98_0x5d9caf[_0x51d92a(0xd2)](_0x51d92a(0xfa)))));_0x2e9765&&console[_0x51d92a(0xcc)](_0x51d92a(0xc9));console[_0x51d92a(0xcc)]('');if(_0x593aaa[_0x51d92a(0xea)]){const {currentVersion:_0x82b1c8,field:_0x171c33,pkgPath:_0x33c092}=_0x593aaa[_0x51d92a(0xea)];console[_0x51d92a(0xcc)](a98_0x5d9caf[_0x51d92a(0xb0)](_0x51d92a(0x9c))+('\x20\x20'+a98_0x5d9caf['yellow'](_0x33c092))),console[_0x51d92a(0xcc)](_0x51d92a(0xd8)+_0x171c33+':\x20'+a98_0x5d9caf['yellow'](_0x82b1c8)+'\x20→\x20'+a98_0x5d9caf['green'](_0x51d92a(0x97))),console[_0x51d92a(0xcc)](_0x51d92a(0xd9));}else console[_0x51d92a(0xcc)](a98_0x5d9caf['cyan']('@lovrabet/sdk:')+'\x20\x20'+a98_0x5d9caf[_0x51d92a(0xbe)](_0x51d92a(0xf5)));console[_0x51d92a(0xcc)]('');}function execConfigMigration(_0x36c1e5,_0x39cba8){const _0x86b825=a98_0x490ca7,{configMigration:_0xc4fe93}=_0x36c1e5;if(!_0xc4fe93?.[_0x86b825(0xd4)])return{'step':0x1,'label':_0x86b825(0xbd),'ok':!![],'detail':_0x86b825(0xb9)};const _0x17f430=readConfigFile(_0xc4fe93[_0x86b825(0xd4)]),_0x334d83=resolve(_0x39cba8,NEW_CONFIG_NAME),_0x209145=_0xc4fe93[_0x86b825(0xcb)]?readConfigFile(_0x334d83):{};for(const [_0x439769,_0x32540d]of Object[_0x86b825(0x95)](_0x17f430)){!(_0x439769 in _0x209145)&&(_0x209145[_0x439769]=_0x32540d);}writeConfigFile(_0x334d83,_0x209145);const _0x5285ed=_0xc4fe93[_0x86b825(0xd4)]+_0x86b825(0x102);return renameSync(_0xc4fe93[_0x86b825(0xd4)],_0x5285ed),{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0xc4fe93['oldPath']+_0x86b825(0x8c)+_0x334d83+'\x20(backup:\x20'+_0x5285ed+')'};}function execRemoveOldArtifacts(_0x3c2400){const _0x293100=a98_0x490ca7,_0x368b3e=[];for(const _0x438ea1 of _0x3c2400){try{if(!existsSync(_0x438ea1))continue;const _0xd10275=tryStat(_0x438ea1);_0xd10275?.[_0x293100(0xb2)]()?rmSync(_0x438ea1,{'recursive':!![],'force':!![]}):unlinkSync(_0x438ea1);}catch(_0x1e2be0){_0x368b3e[_0x293100(0xe5)](_0x438ea1+':\x20'+_0x1e2be0['message']);}}return{'step':0x3,'label':_0x293100(0xc4),'ok':_0x368b3e[_0x293100(0xfb)]===0x0,'detail':_0x368b3e[_0x293100(0xfb)]>0x0?_0x3c2400[_0x293100(0xfb)]-_0x368b3e[_0x293100(0xfb)]+'/'+_0x3c2400[_0x293100(0xfb)]+_0x293100(0xfd)+_0x368b3e['join'](';\x20')+')':_0x3c2400[_0x293100(0xfb)]+'\x20removed'};}function execCleanMcp(_0x74796c){const _0x205fe3=a98_0x490ca7;if(!_0x74796c[_0x205fe3(0xd6)])return{'step':0x4,'label':_0x205fe3(0xf1),'ok':!![],'detail':_0x205fe3(0x9f)};try{const _0x2df8f7=readFileSync(_0x74796c[_0x205fe3(0xd6)]['path'],_0x205fe3(0xa7)),_0x3fca52=JSON[_0x205fe3(0xc5)](_0x2df8f7);if(_0x3fca52?.[_0x205fe3(0xbf)]&&typeof _0x3fca52['mcpServers']===_0x205fe3(0xf6)){const _0x4e11b4=[];for(const [_0xe42dc6,_0x39c067]of Object['entries'](_0x3fca52[_0x205fe3(0xbf)])){_0x39c067?.[_0x205fe3(0xa5)]&&Array['isArray'](_0x39c067[_0x205fe3(0xa5)])&&_0x39c067[_0x205fe3(0xa5)]['some'](_0x364050=>typeof _0x364050===_0x205fe3(0xe4)&&_0x364050['includes']('@lovrabet/dataset-mcp-server'))&&_0x4e11b4[_0x205fe3(0xe5)](_0xe42dc6);}for(const _0x11b18e of _0x4e11b4){delete _0x3fca52[_0x205fe3(0xbf)][_0x11b18e];}return _0x4e11b4[_0x205fe3(0xfb)]>0x0&&writeFileSync(_0x74796c[_0x205fe3(0xd6)][_0x205fe3(0xa4)],JSON[_0x205fe3(0xcf)](_0x3fca52,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':_0x205fe3(0xf1),'ok':!![],'detail':_0x205fe3(0xc6)+_0x4e11b4['join'](',\x20')+_0x205fe3(0xe0)+_0x74796c['oldMcpConfig'][_0x205fe3(0xa4)]};}return{'step':0x4,'label':_0x205fe3(0xf1),'ok':!![],'detail':_0x205fe3(0xf8)};}catch(_0xa442a2){return{'step':0x4,'label':_0x205fe3(0xf1),'ok':![],'detail':_0xa442a2[_0x205fe3(0x8b)]};}}function execSkillsRemove(_0x2a98f2,_0x25da96){const _0x18df6f=a98_0x490ca7,_0x59b90e=runNpxSkillsRemove(_0x2a98f2,{'stdio':_0x18df6f(0x100),'yes':_0x25da96});return{'step':0x5,'label':'Remove\x20old\x20skill','ok':_0x59b90e['ok'],'detail':_0x59b90e['ok']?_0x18df6f(0xa1):_0x59b90e['error']??_0x18df6f(0xa8)+_0x59b90e['status']};}function a98_0xd5ff(){const _0x206add=['latest','13325367QSjXRX','183HkNOaO','error','21160OitnTI','@lovrabet/sdk:','798DAEixi','Step\x201/7:\x20Config\x20migration\x20—\x20','skipped','@lovrabet/dataset-mcp-server','lovrabet/lovrabet-skill\x20removed','oldArtifacts','yellow','path','args','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','utf8','exit\x20','FAIL','detail','4521900ijroDc','some','status','.lovrabet','isArray','cyan','Step\x201/7:\x20Migrating\x20config...','isDirectory','@lovrabet/sdk','cwd','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','Legacy\x20artifacts:','.cursor/mcp.json','===\x20Upgrade\x20Analysis\x20===','skipped\x20(no\x20legacy\x20config)','FOUND','607005zEwjJs','configMigration','Config\x20migration','gray','mcpServers','fields','no\x20legacy\x20entry','Proceed\x20with\x20upgrade?','join','Remove\x20legacy\x20artifacts','parse','removed\x20','bold','done','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20lovrabet/rabetbase\x20--global','values','hasNewConfig','log','already\x20exists\x20(will\x20merge)','1099RqmDZf','stringify','\x20\x20Action:\x20delete','Upgrade\x20completed\x20successfully!','green','Step\x204/7:\x20MCP\x20config\x20—\x20','oldPath','white','oldMcpConfig','\x20\x20\x20\x20\x20\x20\x20','\x20\x20Current\x20version\x20in\x20','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','1376379aevXSy','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','.claude/skills/lovrabet','start','devDependencies','succeed','\x20from\x20','Step\x205/7:\x20Removing\x20old\x20skill...','red','info','string','push','filter','Remove\x20.lovrabet/','package.json','none\x20found','sdkUpgrade','26746vdKnXS','Step\x206/7:\x20Installing\x20new\x20skill...','Config\x20file:','fail','Install\x20new\x20skill','Step\x204/7:\x20Cleaning\x20MCP\x20config...','Clean\x20MCP\x20config','files','CANCEL','not\x20found\x20(will\x20create)','not\x20found\x20or\x20already\x20at\x20latest','object','60FSpEeM','no\x20matching\x20entry\x20found','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','not\x20needed','length','MCP\x20config:','\x20removed\x20(','Upgrade\x20cancelled.','lovrabet/rabetbase','inherit','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','.bak','7785ZJIhbz','\x20\x20bun\x20install','message','\x20→\x20','\x20\x20New\x20config\x20(.rabetbase.json):\x20','\x20\x20Step\x20','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','Upgrade\x20@lovrabet/sdk','Skill\x20swap:','keys','\x20\x20#\x20or','entries','failed'];a98_0xd5ff=function(){return _0x206add;};return a98_0xd5ff();}function execSkillsAdd(_0x4767a7,_0x28584f){const _0x2a6956=a98_0x490ca7,_0x27f108=runNpxSkillsAddGlobal(_0x4767a7,_0x2a6956(0xff),{'stdio':_0x2a6956(0x100),'yes':_0x28584f});return{'step':0x6,'label':_0x2a6956(0xef),'ok':_0x27f108['ok'],'detail':_0x27f108['ok']?'lovrabet/rabetbase\x20installed\x20globally':_0x27f108[_0x2a6956(0x9a)]??_0x2a6956(0xa8)+_0x27f108[_0x2a6956(0xad)]};}function execUpgradeSdk(_0x3429ce){const _0x154e08=a98_0x490ca7;if(!_0x3429ce['sdkUpgrade'])return{'step':0x7,'label':_0x154e08(0x91),'ok':!![],'detail':'skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)'};const {pkgPath:_0xbac01d,currentVersion:_0x175931,field:_0x340e35}=_0x3429ce[_0x154e08(0xea)];try{const _0x106bf5=readFileSync(_0xbac01d,_0x154e08(0xa7)),_0x5b0dd7=JSON[_0x154e08(0xc5)](_0x106bf5);return _0x5b0dd7[_0x340e35][_0x154e08(0xb3)]='latest',writeFileSync(_0xbac01d,JSON['stringify'](_0x5b0dd7,null,0x2)+'\x0a',_0x154e08(0xa7)),{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0x340e35+'[\x22@lovrabet/sdk\x22]:\x20'+_0x175931+'\x20→\x20latest'};}catch(_0x15262f){return{'step':0x7,'label':_0x154e08(0x91),'ok':![],'detail':_0x15262f[_0x154e08(0x8b)]};}}function tryStat(_0x46cdf6){try{return statSync(_0x46cdf6);}catch{return undefined;}}function printSummary(_0x39189c){const _0x13c4a1=a98_0x490ca7;console['log'](''),console['log'](a98_0x5d9caf[_0x13c4a1(0xc7)]('===\x20Upgrade\x20Summary\x20===')),console[_0x13c4a1(0xcc)]('');for(const _0xed2f38 of _0x39189c){const _0x366c5d=_0xed2f38['ok']?a98_0x5d9caf[_0x13c4a1(0xd2)]('OK'):a98_0x5d9caf[_0x13c4a1(0xe2)](_0x13c4a1(0xa9));console[_0x13c4a1(0xcc)]('\x20\x20'+_0x366c5d+_0x13c4a1(0x8e)+_0xed2f38['step']+':\x20'+_0xed2f38['label']);if(_0xed2f38['detail'])console[_0x13c4a1(0xcc)](_0x13c4a1(0xd7)+a98_0x5d9caf[_0x13c4a1(0xbe)](_0xed2f38[_0x13c4a1(0xaa)]));}console[_0x13c4a1(0xcc)]('');}export async function upgradeApp(_0x5b325c,_0x2b0838){const _0x2a7609=a98_0x490ca7,_0x6610e0=process[_0x2a7609(0xb4)](),_0x366855=analyse(_0x6610e0),_0x23562d=!_0x366855[_0x2a7609(0xbc)]&&_0x366855[_0x2a7609(0xa2)]['length']===0x0&&!_0x366855['oldMcpConfig']&&!_0x366855['needsSkillSwap']&&!_0x366855['sdkUpgrade'];if(_0x23562d){console['log'](a98_0x5d9caf[_0x2a7609(0xd2)](_0x2a7609(0xa6)));return;}printReport(_0x366855);const _0x9a37e7=!!(_0x2b0838['yes']||_0x2b0838['Y']||_0x5b325c);if(!_0x9a37e7)try{const _0x2cfd86=await askConfirm(_0x2a7609(0xc2));if(!_0x2cfd86){console[_0x2a7609(0xcc)](a98_0x5d9caf[_0x2a7609(0xbe)](_0x2a7609(0xfe)));return;}}catch(_0x1cc611){if(_0x1cc611?.[_0x2a7609(0x8b)]===_0x2a7609(0xf3)){console[_0x2a7609(0xcc)](a98_0x5d9caf[_0x2a7609(0xbe)](_0x2a7609(0xfe)));return;}throw _0x1cc611;}const _0x4d6064=[],_0x275a39=a98_0x14b741({'text':_0x2a7609(0xb1),'color':_0x2a7609(0xb0)})[_0x2a7609(0xdd)](),_0x53faa9=execConfigMigration(_0x366855,_0x6610e0);_0x4d6064['push'](_0x53faa9),_0x275a39[_0x53faa9['ok']?'succeed':_0x2a7609(0xee)](_0x2a7609(0x9e)+(_0x53faa9['detail']??(_0x53faa9['ok']?_0x2a7609(0xc8):'failed')));const _0x2d1e73=resolve(_0x6610e0,_0x2a7609(0xae)),_0x8be637=a98_0x14b741({'text':_0x2a7609(0x101),'color':'cyan'})[_0x2a7609(0xdd)]();if(existsSync(_0x2d1e73))try{rmSync(_0x2d1e73,{'recursive':!![],'force':!![]}),_0x8be637[_0x2a7609(0xdf)]('Step\x202/7:\x20.lovrabet/\x20directory\x20removed'),_0x4d6064['push']({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0x66636d){_0x8be637[_0x2a7609(0xee)](_0x2a7609(0x8f)+_0x66636d[_0x2a7609(0x8b)]),_0x4d6064[_0x2a7609(0xe5)]({'step':0x2,'label':_0x2a7609(0xe7),'ok':![],'detail':_0x66636d[_0x2a7609(0x8b)]});}else _0x8be637[_0x2a7609(0xe3)]('Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped'),_0x4d6064[_0x2a7609(0xe5)]({'step':0x2,'label':_0x2a7609(0xe7),'ok':!![],'detail':_0x2a7609(0x9f)});const _0x2df4e5=a98_0x14b741({'text':'Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','color':'cyan'})['start'](),_0x383ce1=execRemoveOldArtifacts(_0x366855['oldArtifacts']);_0x4d6064[_0x2a7609(0xe5)](_0x383ce1),_0x2df4e5[_0x383ce1['ok']?_0x2a7609(0xdf):_0x2a7609(0xee)]('Step\x203/7:\x20Legacy\x20artifacts\x20—\x20'+(_0x383ce1[_0x2a7609(0xaa)]??(_0x383ce1['ok']?_0x2a7609(0xc8):_0x2a7609(0x96))));const _0x2e0275=a98_0x14b741({'text':_0x2a7609(0xf0),'color':'cyan'})[_0x2a7609(0xdd)](),_0x70064f=execCleanMcp(_0x366855);_0x4d6064['push'](_0x70064f),_0x2e0275[_0x70064f['ok']?_0x2a7609(0xdf):_0x2a7609(0xee)](_0x2a7609(0xd3)+(_0x70064f[_0x2a7609(0xaa)]??(_0x70064f['ok']?_0x2a7609(0xc8):'failed')));const _0x23861e=a98_0x14b741({'text':_0x2a7609(0xe1),'color':_0x2a7609(0xb0)})[_0x2a7609(0xdd)](),_0x5163e9=execSkillsRemove(_0x6610e0,_0x9a37e7);_0x4d6064[_0x2a7609(0xe5)](_0x5163e9),_0x23861e[_0x5163e9['ok']?_0x2a7609(0xdf):_0x2a7609(0xee)](_0x2a7609(0xdb)+(_0x5163e9[_0x2a7609(0xaa)]??(_0x5163e9['ok']?_0x2a7609(0xc8):_0x2a7609(0x96))));const _0x4bc06c=a98_0x14b741({'text':_0x2a7609(0xec),'color':_0x2a7609(0xb0)})['start'](),_0x42766c=execSkillsAdd(_0x6610e0,_0x9a37e7);_0x4d6064['push'](_0x42766c),_0x4bc06c[_0x42766c['ok']?_0x2a7609(0xdf):_0x2a7609(0xee)]('Step\x206/7:\x20Install\x20new\x20skill\x20—\x20'+(_0x42766c[_0x2a7609(0xaa)]??(_0x42766c['ok']?_0x2a7609(0xc8):'failed')));const _0x5a9a64=a98_0x14b741({'text':_0x2a7609(0xf9),'color':_0x2a7609(0xb0)})[_0x2a7609(0xdd)](),_0x1b994f=execUpgradeSdk(_0x366855);_0x4d6064[_0x2a7609(0xe5)](_0x1b994f),_0x5a9a64[_0x1b994f['ok']?'succeed':_0x2a7609(0xee)]('Step\x207/7:\x20@lovrabet/sdk\x20—\x20'+(_0x1b994f[_0x2a7609(0xaa)]??(_0x1b994f['ok']?_0x2a7609(0xc8):_0x2a7609(0x96)))),printSummary(_0x4d6064);const _0x182e39=_0x4d6064[_0x2a7609(0xac)](_0x59c1fb=>!_0x59c1fb['ok']);_0x182e39?console['log'](a98_0x5d9caf[_0x2a7609(0xa3)](_0x2a7609(0xb5))):console[_0x2a7609(0xcc)](a98_0x5d9caf[_0x2a7609(0xd2)](_0x2a7609(0xd1))),_0x1b994f['ok']&&_0x366855[_0x2a7609(0xea)]&&(console[_0x2a7609(0xcc)](''),console['log'](a98_0x5d9caf[_0x2a7609(0xc7)]['cyan']('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console[_0x2a7609(0xcc)](a98_0x5d9caf[_0x2a7609(0xb0)](_0x2a7609(0x90))),console['log'](''),console[_0x2a7609(0xcc)](a98_0x5d9caf[_0x2a7609(0xd5)]('\x20\x20npm\x20install')),console[_0x2a7609(0xcc)](a98_0x5d9caf[_0x2a7609(0xd5)](_0x2a7609(0x94))),console[_0x2a7609(0xcc)](a98_0x5d9caf[_0x2a7609(0xd5)](_0x2a7609(0x8a))),console[_0x2a7609(0xcc)](''));}
@@ -1 +1 @@
1
- const a108_0x34607b=a108_0x139a;function a108_0x158b(){const _0x320892=['70IIDOZM','18EESJuS','SQL\x20Queries','6067782SRuQzZ','4382680njPRsu','preview','login','Code\x20Generation','Diagnostics','1675653HRuQKt','run','5907077xZODPk','Configuration','install','logout','125jTEgbI','get','Authentication','write','isSingleCommand','\x20\x20[write]','auth','Skills','145112xHiOVh','from','has','commands','service','wildcardDef','push','<script>','Database\x20Connections','Menu','map','Quick\x20Start','3225733HrlnFX','values','command','defaultCommand','Project','1CRFkNu','risk','length','684884GwPiLO','App\x20Management','Schema','create','Dataset\x20&\x20Operations','skill','show','description','Self\x20Update','project','set','Logs','start','\x20\x20[high-risk-write]'];a108_0x158b=function(){return _0x320892;};return a108_0x158b();}(function(_0x24adf4,_0x149119){const _0x2df7d6=a108_0x139a,_0x44283f=_0x24adf4();while(!![]){try{const _0x1a66a4=parseInt(_0x2df7d6(0xbb))/0x1*(parseInt(_0x2df7d6(0xbe))/0x2)+parseInt(_0x2df7d6(0xd5))/0x3+-parseInt(_0x2df7d6(0xaa))/0x4*(-parseInt(_0x2df7d6(0xa2))/0x5)+parseInt(_0x2df7d6(0xcf))/0x6+parseInt(_0x2df7d6(0xb6))/0x7+-parseInt(_0x2df7d6(0xd0))/0x8*(-parseInt(_0x2df7d6(0xcd))/0x9)+-parseInt(_0x2df7d6(0xcc))/0xa*(parseInt(_0x2df7d6(0x9e))/0xb);if(_0x1a66a4===_0x149119)break;else _0x44283f['push'](_0x44283f['shift']());}catch(_0x2ec6cb){_0x44283f['push'](_0x44283f['shift']());}}}(a108_0x158b,0x968e8));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{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{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];function a108_0x139a(_0x49e836,_0x3636fb){_0x49e836=_0x49e836-0x9d;const _0x158b8a=a108_0x158b();let _0x139a63=_0x158b8a[_0x49e836];return _0x139a63;}const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x2640d3){const _0x16366c=a108_0x139a;for(const _0x40cb4e of _0x2640d3){definitions[_0x16366c(0xc8)](_0x40cb4e[_0x16366c(0xae)]+':'+_0x40cb4e[_0x16366c(0xb8)],_0x40cb4e);let _0xe1a01e=serviceGroups['get'](_0x40cb4e[_0x16366c(0xae)]);!_0xe1a01e&&(_0xe1a01e=[],serviceGroups[_0x16366c(0xc8)](_0x40cb4e[_0x16366c(0xae)],_0xe1a01e)),_0xe1a01e['push'](_0x40cb4e);}}function registerDeclarativeService(_0x4f9d1a,_0x456c82,_0x5222f3){const _0x447e83=a108_0x139a;registerDefinitions(_0x456c82);_0x5222f3?.[_0x447e83(0xaf)]&&registerDefinitions([_0x5222f3['wildcardDef']]);const _0x446bcb=_0x1de8b4=>_0x1de8b4==='read'?'':_0x1de8b4===_0x447e83(0xa5)?_0x447e83(0xa7):_0x447e83(0xcb),_0x361d91={'service':_0x456c82[0x0][_0x447e83(0xae)],'label':_0x4f9d1a,'commands':_0x456c82[_0x447e83(0xb4)](_0x2309a3=>({'command':_0x2309a3[_0x447e83(0xb8)],'description':_0x2309a3[_0x447e83(0xc5)],'tag':_0x446bcb(_0x2309a3[_0x447e83(0xbc)])})),'declarative':!![],'defaultCommand':_0x5222f3?.[_0x447e83(0xb9)]??(_0x5222f3?.[_0x447e83(0xa6)]?_0x456c82[0x0]['command']:undefined),'wildcardDef':_0x5222f3?.['wildcardDef'],'isSingleCommand':_0x5222f3?.[_0x447e83(0xa6)]};serviceRegistry[_0x447e83(0xb0)](_0x361d91),serviceByName['set'](_0x361d91['service'],_0x361d91);}registerDeclarativeService(a108_0x34607b(0xb5),initDefinitions,{'defaultCommand':'run','isSingleCommand':!![]}),registerDeclarativeService(a108_0x34607b(0xba),projectDefinitions),registerDeclarativeService(a108_0x34607b(0xbf),appDefinitions),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a108_0x34607b(0xbd)]-0x1];last[a108_0x34607b(0xad)]=[{'command':a108_0x34607b(0xb1),'description':'Run\x20any\x20package.json\x20script','tag':''}];}registerDeclarativeService(a108_0x34607b(0xa4),authDefinitions,{'defaultCommand':a108_0x34607b(0xd2)}),registerDeclarativeService(a108_0x34607b(0xc6),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a108_0x34607b(0xd4),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a108_0x34607b(0xc0),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a108_0x34607b(0x9f),configDefinitions),registerDeclarativeService('API',apiDefinitions),registerDeclarativeService(a108_0x34607b(0xb3),menuDefinitions),registerDeclarativeService(a108_0x34607b(0xb2),dbDefinitions),registerDeclarativeService(a108_0x34607b(0xc2),datasetDefinitions),registerDeclarativeService('BFF\x20Scripts',bffDefinitions),registerDeclarativeService(a108_0x34607b(0xce),sqlDefinitions),registerDeclarativeService(a108_0x34607b(0xd3),codegenDefinitions),registerDeclarativeService(a108_0x34607b(0xa9),skillDefinitions),registerDeclarativeService(a108_0x34607b(0xc9),logsDefinitions,{'defaultCommand':a108_0x34607b(0xc4)});export const deprecatedAliases={'create':{'service':a108_0x34607b(0xc7),'command':a108_0x34607b(0xc1)},'start':{'service':'run','command':a108_0x34607b(0xca)},'build':{'service':a108_0x34607b(0x9d),'command':'build'},'preview':{'service':a108_0x34607b(0x9d),'command':a108_0x34607b(0xd1)},'logout':{'service':a108_0x34607b(0xa8),'command':a108_0x34607b(0xa1)},'skills':{'service':a108_0x34607b(0xc3),'command':a108_0x34607b(0xa0)}};export function findDefinition(_0x4d863e,_0x5d2f64){const _0x1d161e=a108_0x34607b;return definitions[_0x1d161e(0xa3)](_0x4d863e+':'+_0x5d2f64);}export function isKnownService(_0x5318e6){const _0x105064=a108_0x34607b;return serviceByName[_0x105064(0xac)](_0x5318e6);}export function isDeclarativeService(_0x2056ec){const _0x513d66=a108_0x34607b;return serviceGroups[_0x513d66(0xac)](_0x2056ec)||serviceByName['get'](_0x2056ec)?.[_0x513d66(0xaf)]!==undefined;}export function getServiceEntry(_0x572fb5){const _0x36b607=a108_0x34607b;return serviceByName[_0x36b607(0xa3)](_0x572fb5);}export function getLegacyHandler(_0x2b41e9,_0x55bed4){return undefined;}export function getAllDefinitions(){const _0x26ca8d=a108_0x34607b;return Array[_0x26ca8d(0xab)](definitions[_0x26ca8d(0xb7)]());}
1
+ const a99_0x29b7c4=a99_0x24d7;(function(_0x19a3d4,_0x4e56aa){const _0x450066=a99_0x24d7,_0x4ab4f3=_0x19a3d4();while(!![]){try{const _0x23b402=parseInt(_0x450066(0x145))/0x1*(-parseInt(_0x450066(0x158))/0x2)+-parseInt(_0x450066(0x16b))/0x3+parseInt(_0x450066(0x153))/0x4*(parseInt(_0x450066(0x16d))/0x5)+parseInt(_0x450066(0x169))/0x6+-parseInt(_0x450066(0x15a))/0x7+parseInt(_0x450066(0x15f))/0x8*(-parseInt(_0x450066(0x150))/0x9)+parseInt(_0x450066(0x164))/0xa;if(_0x23b402===_0x4e56aa)break;else _0x4ab4f3['push'](_0x4ab4f3['shift']());}catch(_0x536c48){_0x4ab4f3['push'](_0x4ab4f3['shift']());}}}(a99_0x2361,0x8e628));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dbDefinitions}from'../commands/db/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';function a99_0x2361(){const _0x1b14a2=['Configuration','Dataset\x20&\x20Operations','description','has','write','commands','login','\x20\x20[high-risk-write]','22093hhPXvY','set','create','service','Run\x20Scripts','risk','preview','auth','from','length','push','7422021TMjILz','Project','\x20\x20[write]','136FBYwva','run','Skills','isSingleCommand','install','54EyfTGP','get','3558037RIaxaq','Authentication','<script>','App\x20Management','BFF\x20Scripts','8GlEDso','API','Menu','read','command','15339220wQJqJt','start','Diagnostics','Run\x20any\x20package.json\x20script','values','6852498Lvdssq','Schema','2719596lFmvuE','project','109295DKZRkZ','SQL\x20Queries','wildcardDef','skill','Database\x20Connections','Logs','Self\x20Update','logout'];a99_0x2361=function(){return _0x1b14a2;};return a99_0x2361();}import{menuDefinitions}from'../commands/menu/index.js';import{appDefinitions}from'../commands/app/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/index.js';import{runDefinition}from'../commands/run/index.js';function a99_0x24d7(_0x4aa1f7,_0x269a44){_0x4aa1f7=_0x4aa1f7-0x140;const _0x236176=a99_0x2361();let _0x24d77b=_0x236176[_0x4aa1f7];return _0x24d77b;}export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x20d244){const _0x1d3b8d=a99_0x24d7;for(const _0xbc7d10 of _0x20d244){definitions[_0x1d3b8d(0x146)](_0xbc7d10[_0x1d3b8d(0x148)]+':'+_0xbc7d10['command'],_0xbc7d10);let _0x4457b=serviceGroups[_0x1d3b8d(0x159)](_0xbc7d10['service']);!_0x4457b&&(_0x4457b=[],serviceGroups['set'](_0xbc7d10[_0x1d3b8d(0x148)],_0x4457b)),_0x4457b[_0x1d3b8d(0x14f)](_0xbc7d10);}}function registerDeclarativeService(_0x289e36,_0x11e3a1,_0x407fc1){const _0x367f1d=a99_0x24d7;registerDefinitions(_0x11e3a1);_0x407fc1?.[_0x367f1d(0x16f)]&&registerDefinitions([_0x407fc1[_0x367f1d(0x16f)]]);const _0x4fdf96=_0x199c2f=>_0x199c2f===_0x367f1d(0x162)?'':_0x199c2f===_0x367f1d(0x141)?_0x367f1d(0x152):_0x367f1d(0x144),_0x39db49={'service':_0x11e3a1[0x0][_0x367f1d(0x148)],'label':_0x289e36,'commands':_0x11e3a1['map'](_0xe54855=>({'command':_0xe54855[_0x367f1d(0x163)],'description':_0xe54855[_0x367f1d(0x177)],'tag':_0x4fdf96(_0xe54855[_0x367f1d(0x14a)])})),'declarative':!![],'defaultCommand':_0x407fc1?.['defaultCommand']??(_0x407fc1?.[_0x367f1d(0x156)]?_0x11e3a1[0x0][_0x367f1d(0x163)]:undefined),'wildcardDef':_0x407fc1?.[_0x367f1d(0x16f)],'isSingleCommand':_0x407fc1?.[_0x367f1d(0x156)]};serviceRegistry[_0x367f1d(0x14f)](_0x39db49),serviceByName['set'](_0x39db49[_0x367f1d(0x148)],_0x39db49);}registerDeclarativeService('Quick\x20Start',initDefinitions,{'defaultCommand':a99_0x29b7c4(0x154),'isSingleCommand':!![]}),registerDeclarativeService(a99_0x29b7c4(0x151),projectDefinitions),registerDeclarativeService(a99_0x29b7c4(0x15d),appDefinitions),registerDeclarativeService(a99_0x29b7c4(0x149),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a99_0x29b7c4(0x14e)]-0x1];last[a99_0x29b7c4(0x142)]=[{'command':a99_0x29b7c4(0x15c),'description':a99_0x29b7c4(0x167),'tag':''}];}registerDeclarativeService(a99_0x29b7c4(0x15b),authDefinitions,{'defaultCommand':a99_0x29b7c4(0x143)}),registerDeclarativeService(a99_0x29b7c4(0x173),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a99_0x29b7c4(0x166),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a99_0x29b7c4(0x16a),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a99_0x29b7c4(0x175),configDefinitions),registerDeclarativeService(a99_0x29b7c4(0x160),apiDefinitions),registerDeclarativeService(a99_0x29b7c4(0x161),menuDefinitions),registerDeclarativeService(a99_0x29b7c4(0x171),dbDefinitions),registerDeclarativeService(a99_0x29b7c4(0x176),datasetDefinitions),registerDeclarativeService('Pages',pageDefinitions),registerDeclarativeService(a99_0x29b7c4(0x15e),bffDefinitions),registerDeclarativeService(a99_0x29b7c4(0x16e),sqlDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService(a99_0x29b7c4(0x155),skillDefinitions),registerDeclarativeService(a99_0x29b7c4(0x172),logsDefinitions,{'defaultCommand':'show'});export const deprecatedAliases={'create':{'service':a99_0x29b7c4(0x16c),'command':a99_0x29b7c4(0x147)},'start':{'service':a99_0x29b7c4(0x154),'command':a99_0x29b7c4(0x165)},'build':{'service':a99_0x29b7c4(0x154),'command':'build'},'preview':{'service':a99_0x29b7c4(0x154),'command':a99_0x29b7c4(0x14b)},'logout':{'service':a99_0x29b7c4(0x14c),'command':a99_0x29b7c4(0x174)},'skills':{'service':a99_0x29b7c4(0x170),'command':a99_0x29b7c4(0x157)}};export const deprecatedSubcommands={'bff':{'new':'create'},'sql':{'new':a99_0x29b7c4(0x147)}};export function resolveDeprecatedSubcommand(_0x11a3a4,_0x20cf07){return deprecatedSubcommands[_0x11a3a4]?.[_0x20cf07];}export function findDefinition(_0x1bf0da,_0x17ea23){return definitions['get'](_0x1bf0da+':'+_0x17ea23);}export function isKnownService(_0x465b2c){const _0x2fe4f0=a99_0x29b7c4;return serviceByName[_0x2fe4f0(0x140)](_0x465b2c);}export function isDeclarativeService(_0x517513){const _0x3dcaf6=a99_0x29b7c4;return serviceGroups['has'](_0x517513)||serviceByName['get'](_0x517513)?.[_0x3dcaf6(0x16f)]!==undefined;}export function getServiceEntry(_0x12ec0a){return serviceByName['get'](_0x12ec0a);}export function getLegacyHandler(_0x14226e,_0x268ff8){return undefined;}export function getAllDefinitions(){const _0xaa41fe=a99_0x29b7c4;return Array[_0xaa41fe(0x14d)](definitions[_0xaa41fe(0x168)]());}
@@ -1 +1 @@
1
- const a90_0x1460bd=a90_0x4def;function a90_0x4def(_0x5e372f,_0x56b233){_0x5e372f=_0x5e372f-0x16a;const _0x181460=a90_0x1814();let _0x4def15=_0x181460[_0x5e372f];return _0x4def15;}(function(_0x3de827,_0xf44f43){const _0x1c76af=a90_0x4def,_0x3cff9f=_0x3de827();while(!![]){try{const _0x147a7c=-parseInt(_0x1c76af(0x1ac))/0x1*(-parseInt(_0x1c76af(0x1ae))/0x2)+parseInt(_0x1c76af(0x191))/0x3*(-parseInt(_0x1c76af(0x16e))/0x4)+-parseInt(_0x1c76af(0x198))/0x5+parseInt(_0x1c76af(0x197))/0x6+-parseInt(_0x1c76af(0x19b))/0x7*(-parseInt(_0x1c76af(0x1aa))/0x8)+-parseInt(_0x1c76af(0x199))/0x9*(parseInt(_0x1c76af(0x187))/0xa)+parseInt(_0x1c76af(0x192))/0xb;if(_0x147a7c===_0xf44f43)break;else _0x3cff9f['push'](_0x3cff9f['shift']());}catch(_0x35e1c9){_0x3cff9f['push'](_0x3cff9f['shift']());}}}(a90_0x1814,0x90573));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';import{resolve,delimiter,join}from'node:path';function a90_0x1814(){const _0x167d32=['pnpm-lock.yaml','No\x20scripts\x20defined\x20in\x20package.json.','\x20exited\x20with\x20code\x20','max','boolean','start','\x20\x20EXAMPLES','keys','vite\x20preview\x20exited\x20with\x20code\x20','close','error','Available:\x20','\x20\x20\x20\x20','90uMZrsv','node_modules','has','bun.lockb','.bin','map','Script\x20\x22','watch','(none)','build','12rhKCdI','1379114euSuba','\x22\x20not\x20found\x20in\x20package.json.','slice','padEnd','vite','4867782AFfpcj','724380iDlPZa','1007037lUcltl','run','2157995vsuUDf','\x20run\x20start','yarn','preview','scripts','entries','needsUpgrade','No\x20package.json\x20found\x20in\x20current\x20directory.','\x0a\x20\x20Usage:\x20','pnpm','utf-8','all','npm','Run\x20a\x20package.json\x20script','args','8TeVMAl','length','4ZRisBg','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','575636yXmNqU','Script\x20name\x20defined\x20in\x20package.json','push','parse','bun','yarn.lock','cwd','653096quQPTF','--watch','inherit','\x20run\x20preview\x20--watch\x20\x20\x20#\x20parallel\x20build\x20--watch\x20+\x20preview','\x20run\x20preview','package.json','\x20run\x20','validation','log','join','\x20run\x20build','\x0a\x20\x20Available\x20scripts:\x0a'];a90_0x1814=function(){return _0x167d32;};return a90_0x1814();}import{spawn}from'node:child_process';import{CliErrors}from'../../errors.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';import{checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set([a90_0x1460bd(0x17f),'dev']);function readPackageScripts(_0x522394){const _0x270d42=a90_0x1460bd,_0x2860f9=resolve(_0x522394,_0x270d42(0x173));if(!existsSync(_0x2860f9))return null;try{const _0x33ae7d=JSON[_0x270d42(0x16a)](readFileSync(_0x2860f9,_0x270d42(0x1a5)));return _0x33ae7d[_0x270d42(0x19f)]??{};}catch{return null;}}function detectPackageManager(_0x2d9a1a){const _0x42946b=a90_0x1460bd;if(existsSync(resolve(_0x2d9a1a,_0x42946b(0x18a)))||existsSync(resolve(_0x2d9a1a,'bun.lock')))return _0x42946b(0x16b);if(existsSync(resolve(_0x2d9a1a,_0x42946b(0x17a))))return _0x42946b(0x1a4);if(existsSync(resolve(_0x2d9a1a,_0x42946b(0x16c))))return _0x42946b(0x19d);return _0x42946b(0x1a7);}async function versionCheck(_0x5724b7){const _0x4cf555=a90_0x1460bd,_0x284085=await checkCliVersion();if(_0x284085[_0x4cf555(0x1a1)])printCliUpgradeWarning(_0x284085);const _0x360dda=await checkSdkVersion(_0x5724b7);if(_0x360dda[_0x4cf555(0x1a1)])printSdkUpgradeWarning(_0x360dda);}function spawnScript(_0x2810f4,_0x5033c9,_0x574523,_0x38e3d4){return new Promise((_0x2d082e,_0x3a2a24)=>{const _0x3591e6=a90_0x4def,_0x1427cc=[_0x3591e6(0x19a),_0x5033c9,..._0x574523],_0x55e57c=spawn(_0x2810f4,_0x1427cc,{'cwd':_0x38e3d4,'stdio':_0x3591e6(0x170),'shell':!![],'env':{...process.env,'PATH':''+join(_0x38e3d4,_0x3591e6(0x188),'.bin')+delimiter+process.env.PATH}});_0x55e57c['on'](_0x3591e6(0x183),_0x3b3f07=>{const _0x4895e7=_0x3591e6;if(_0x3b3f07===0x0||_0x3b3f07===null)_0x2d082e();else _0x3a2a24(new Error(_0x2810f4+_0x4895e7(0x174)+_0x5033c9+_0x4895e7(0x17c)+_0x3b3f07));}),_0x55e57c['on'](_0x3591e6(0x184),_0x3a2a24);});}function spawnViteBuildWatch(_0x506803){return new Promise((_0x2ba3b4,_0x4cfe4d)=>{const _0x128a4f=a90_0x4def,_0x39ef3b=spawn(_0x128a4f(0x196),[_0x128a4f(0x190),_0x128a4f(0x16f)],{'cwd':_0x506803,'stdio':'inherit','shell':!![],'env':{...process.env,'PATH':''+join(_0x506803,_0x128a4f(0x188),'.bin')+delimiter+process.env.PATH}});_0x39ef3b['on'](_0x128a4f(0x183),_0x2cd3b4=>{const _0x4ae1cb=_0x128a4f;if(_0x2cd3b4===0x0||_0x2cd3b4===null)_0x2ba3b4();else _0x4cfe4d(new Error(_0x4ae1cb(0x1ad)+_0x2cd3b4));}),_0x39ef3b['on'](_0x128a4f(0x184),_0x4cfe4d);});}function spawnVitePreview(_0x5399de){return new Promise((_0x40545b,_0x4b0ddf)=>{const _0x4df5f8=a90_0x4def,_0x5caf0c=spawn(_0x4df5f8(0x196),[_0x4df5f8(0x19e)],{'cwd':_0x5399de,'stdio':_0x4df5f8(0x170),'shell':!![],'env':{...process.env,'PATH':''+join(_0x5399de,'node_modules',_0x4df5f8(0x18b))+delimiter+process.env.PATH}});_0x5caf0c['on']('close',_0x2b6f20=>{const _0x249f89=_0x4df5f8;if(_0x2b6f20===0x0||_0x2b6f20===null)_0x40545b();else _0x4b0ddf(new Error(_0x249f89(0x182)+_0x2b6f20));}),_0x5caf0c['on'](_0x4df5f8(0x184),_0x4b0ddf);});}const runFlags=[{'name':a90_0x1460bd(0x18e),'type':a90_0x1460bd(0x17e),'description':'Enable\x20watch\x20mode\x20for\x20preview','default':![]}];export const runDefinition={'service':a90_0x1460bd(0x19a),'command':'run','description':a90_0x1460bd(0x1a8),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'script','description':a90_0x1460bd(0x1af),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x193762=a90_0x1460bd,_0x3882ec=readPackageScripts(process[_0x193762(0x16d)]()),_0x8ad350=[];if(_0x3882ec&&Object[_0x193762(0x181)](_0x3882ec)[_0x193762(0x1ab)]>0x0){const _0x4c9c15=Object[_0x193762(0x181)](_0x3882ec),_0x553502=Math['max'](..._0x4c9c15[_0x193762(0x18c)](_0x1da32a=>_0x1da32a[_0x193762(0x1ab)]));_0x8ad350[_0x193762(0x1b0)]('\x20\x20AVAILABLE\x20SCRIPTS\x20\x20(current\x20project)');for(const [_0x3437c5,_0x3f4633]of Object[_0x193762(0x1a0)](_0x3882ec)){_0x8ad350[_0x193762(0x1b0)](_0x193762(0x186)+CLI_BIN_NAME+'\x20run\x20'+_0x3437c5['padEnd'](_0x553502+0x2)+'#\x20'+_0x3f4633);}}else _0x8ad350['push'](_0x193762(0x180)),_0x8ad350[_0x193762(0x1b0)](_0x193762(0x186)+CLI_BIN_NAME+_0x193762(0x19c)),_0x8ad350[_0x193762(0x1b0)](_0x193762(0x186)+CLI_BIN_NAME+_0x193762(0x178)),_0x8ad350[_0x193762(0x1b0)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x193762(0x172)),_0x8ad350[_0x193762(0x1b0)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x193762(0x171));return _0x8ad350[_0x193762(0x177)]('\x0a');},async 'execute'(_0x339904){const _0x1b2111=a90_0x1460bd,_0x50a4a1=process['cwd'](),_0xa945d3=_0x339904[_0x1b2111(0x1a9)][0x0],_0x50bb6a=_0x339904['args'][_0x1b2111(0x194)](0x1),_0x544ab9=readPackageScripts(_0x50a4a1);if(!_0x544ab9)throw CliErrors[_0x1b2111(0x175)](_0x1b2111(0x1a2));if(!_0xa945d3){const _0x4f6bbb=Object['keys'](_0x544ab9);if(_0x4f6bbb[_0x1b2111(0x1ab)]===0x0)console[_0x1b2111(0x176)](_0x1b2111(0x17b));else{console[_0x1b2111(0x176)](_0x1b2111(0x179));const _0x430955=Math[_0x1b2111(0x17d)](..._0x4f6bbb['map'](_0x393d74=>_0x393d74[_0x1b2111(0x1ab)]));for(const [_0x1a12ea,_0x1afa2c]of Object[_0x1b2111(0x1a0)](_0x544ab9)){console['log'](_0x1b2111(0x186)+_0x1a12ea[_0x1b2111(0x195)](_0x430955+0x2)+_0x1afa2c);}console[_0x1b2111(0x176)](_0x1b2111(0x1a3)+CLI_BIN_NAME+'\x20run\x20<script>\x0a');}return{'ok':!![]};}if(!_0x544ab9[_0xa945d3])throw CliErrors[_0x1b2111(0x175)](_0x1b2111(0x18d)+_0xa945d3+_0x1b2111(0x193),_0x1b2111(0x185)+(Object[_0x1b2111(0x181)](_0x544ab9)['join'](',\x20')||_0x1b2111(0x18f)));const _0x229edc=detectPackageManager(_0x50a4a1);VERSION_CHECK_SCRIPTS[_0x1b2111(0x189)](_0xa945d3)&&await versionCheck(_0x50a4a1);if(_0xa945d3==='preview'&&_0x339904['bool'](_0x1b2111(0x18e)))return await Promise[_0x1b2111(0x1a6)]([spawnViteBuildWatch(_0x50a4a1),spawnVitePreview(_0x50a4a1)]),{'ok':!![]};return await spawnScript(_0x229edc,_0xa945d3,_0x50bb6a,_0x50a4a1),{'ok':!![]};}};
1
+ const a100_0xef803c=a100_0x421e;(function(_0x3737e2,_0x34c4ae){const _0x36e163=a100_0x421e,_0x1d0701=_0x3737e2();while(!![]){try{const _0x34ba1f=-parseInt(_0x36e163(0x106))/0x1+-parseInt(_0x36e163(0xe2))/0x2*(parseInt(_0x36e163(0x102))/0x3)+parseInt(_0x36e163(0xd8))/0x4+parseInt(_0x36e163(0xe6))/0x5*(-parseInt(_0x36e163(0xe1))/0x6)+-parseInt(_0x36e163(0xd5))/0x7*(-parseInt(_0x36e163(0xed))/0x8)+parseInt(_0x36e163(0xea))/0x9*(parseInt(_0x36e163(0x10f))/0xa)+-parseInt(_0x36e163(0xd3))/0xb*(parseInt(_0x36e163(0xe4))/0xc);if(_0x34ba1f===_0x34c4ae)break;else _0x1d0701['push'](_0x1d0701['shift']());}catch(_0x339082){_0x1d0701['push'](_0x1d0701['shift']());}}}(a100_0x45a1,0x50809));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';function a100_0x45a1(){const _0x317a05=['inherit','needsUpgrade','\x20run\x20build','preview','node_modules','has','2934310ZypHTU','padEnd','max','bun','start','No\x20scripts\x20defined\x20in\x20package.json.','cwd','npm','boolean','log','close','55UshgHb','slice','7VEWUEP','join','validation','1768176GQjtOH','Script\x20\x22','length','\x20run\x20preview','yarn.lock','vite\x20preview\x20exited\x20with\x20code\x20','\x20exited\x20with\x20code\x20','belowMinimum','\x20\x20AVAILABLE\x20SCRIPTS\x20\x20(current\x20project)','15738PURJkA','473870KmUZZZ','.bin','530088dWBPeP','\x20\x20\x20\x20','425VDmGYo','build','Enable\x20watch\x20mode\x20for\x20preview','\x20run\x20preview\x20--watch\x20\x20\x20#\x20parallel\x20build\x20--watch\x20+\x20preview','18JwVVAv','\x20run\x20<script>\x0a','(none)','978920MIigWs','--watch','push','parse','entries','bun.lockb','pnpm','utf-8','\x20\x20EXAMPLES','\x0a\x20\x20Usage:\x20','package.json','args','\x0a\x20\x20Available\x20scripts:\x0a','Script\x20name\x20defined\x20in\x20package.json','bool','\x20run\x20','Run\x20a\x20package.json\x20script','watch','vite','dev','run','3BaafGc','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','scripts','map','140774yJLHvY','keys','error'];a100_0x45a1=function(){return _0x317a05;};return a100_0x45a1();}function a100_0x421e(_0x4e35f0,_0x3c811c){_0x4e35f0=_0x4e35f0-0xd2;const _0x45a129=a100_0x45a1();let _0x421e2e=_0x45a129[_0x4e35f0];return _0x421e2e;}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([a100_0xef803c(0x113),a100_0xef803c(0x100)]);function readPackageScripts(_0x3a9a0d){const _0x4f3f45=a100_0xef803c,_0x221842=resolve(_0x3a9a0d,_0x4f3f45(0xf7));if(!existsSync(_0x221842))return null;try{const _0x398c6c=JSON[_0x4f3f45(0xf0)](readFileSync(_0x221842,_0x4f3f45(0xf4)));return _0x398c6c[_0x4f3f45(0x104)]??{};}catch{return null;}}function detectPackageManager(_0x2e8190){const _0x598175=a100_0xef803c;if(existsSync(resolve(_0x2e8190,_0x598175(0xf2)))||existsSync(resolve(_0x2e8190,'bun.lock')))return _0x598175(0x112);if(existsSync(resolve(_0x2e8190,'pnpm-lock.yaml')))return _0x598175(0xf3);if(existsSync(resolve(_0x2e8190,_0x598175(0xdc))))return'yarn';return _0x598175(0x116);}async function versionCheck(_0x325d07){const _0x283028=a100_0xef803c,_0x292c5c=await checkCliVersion();(_0x292c5c[_0x283028(0x10a)]||_0x292c5c[_0x283028(0xdf)])&&(printCliUpgradeWarning(_0x292c5c),assertCliVersionSupported(_0x292c5c));const _0x155b86=await checkSdkVersion(_0x325d07);if(_0x155b86['needsUpgrade'])printSdkUpgradeWarning(_0x155b86);}function spawnScript(_0x9b4ec3,_0x3d638f,_0x59aadd,_0x3e9859){return new Promise((_0x5de0cb,_0x1ba4a4)=>{const _0x276483=a100_0x421e,_0x2d727b=[_0x276483(0x101),_0x3d638f,..._0x59aadd],_0x1d7d27=spawn(_0x9b4ec3,_0x2d727b,{'cwd':_0x3e9859,'stdio':_0x276483(0x109),'shell':!![],'env':{...process.env,'PATH':''+join(_0x3e9859,_0x276483(0x10d),_0x276483(0xe3))+delimiter+process.env.PATH}});_0x1d7d27['on'](_0x276483(0xd2),_0x4d5c38=>{const _0x402e35=_0x276483;if(_0x4d5c38===0x0||_0x4d5c38===null)_0x5de0cb();else _0x1ba4a4(new Error(_0x9b4ec3+_0x402e35(0xfc)+_0x3d638f+_0x402e35(0xde)+_0x4d5c38));}),_0x1d7d27['on']('error',_0x1ba4a4);});}function spawnViteBuildWatch(_0x5e88ca){return new Promise((_0xfbf61d,_0x3e3cbc)=>{const _0x28ea2f=a100_0x421e,_0x197f2e=spawn(_0x28ea2f(0xff),[_0x28ea2f(0xe7),_0x28ea2f(0xee)],{'cwd':_0x5e88ca,'stdio':_0x28ea2f(0x109),'shell':!![],'env':{...process.env,'PATH':''+join(_0x5e88ca,_0x28ea2f(0x10d),_0x28ea2f(0xe3))+delimiter+process.env.PATH}});_0x197f2e['on'](_0x28ea2f(0xd2),_0x505d3e=>{const _0x131e11=_0x28ea2f;if(_0x505d3e===0x0||_0x505d3e===null)_0xfbf61d();else _0x3e3cbc(new Error(_0x131e11(0x103)+_0x505d3e));}),_0x197f2e['on'](_0x28ea2f(0x108),_0x3e3cbc);});}function spawnVitePreview(_0x3b50e3){return new Promise((_0x2e5d54,_0xef6405)=>{const _0x556c8c=a100_0x421e,_0x38a51b=spawn(_0x556c8c(0xff),[_0x556c8c(0x10c)],{'cwd':_0x3b50e3,'stdio':_0x556c8c(0x109),'shell':!![],'env':{...process.env,'PATH':''+join(_0x3b50e3,_0x556c8c(0x10d),_0x556c8c(0xe3))+delimiter+process.env.PATH}});_0x38a51b['on'](_0x556c8c(0xd2),_0x4f0334=>{const _0x39beb9=_0x556c8c;if(_0x4f0334===0x0||_0x4f0334===null)_0x2e5d54();else _0xef6405(new Error(_0x39beb9(0xdd)+_0x4f0334));}),_0x38a51b['on'](_0x556c8c(0x108),_0xef6405);});}const runFlags=[{'name':'watch','type':a100_0xef803c(0x117),'description':a100_0xef803c(0xe8),'default':![]}];export const runDefinition={'service':'run','command':a100_0xef803c(0x101),'description':a100_0xef803c(0xfd),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'script','description':a100_0xef803c(0xfa),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x7a5b9d=a100_0xef803c,_0x409d4f=readPackageScripts(process[_0x7a5b9d(0x115)]()),_0x230e52=[];if(_0x409d4f&&Object[_0x7a5b9d(0x107)](_0x409d4f)[_0x7a5b9d(0xda)]>0x0){const _0x1462cb=Object[_0x7a5b9d(0x107)](_0x409d4f),_0x4c68f6=Math[_0x7a5b9d(0x111)](..._0x1462cb['map'](_0x6a1aac=>_0x6a1aac[_0x7a5b9d(0xda)]));_0x230e52[_0x7a5b9d(0xef)](_0x7a5b9d(0xe0));for(const [_0x569e27,_0x220a00]of Object[_0x7a5b9d(0xf1)](_0x409d4f)){_0x230e52[_0x7a5b9d(0xef)](_0x7a5b9d(0xe5)+CLI_BIN_NAME+'\x20run\x20'+_0x569e27[_0x7a5b9d(0x110)](_0x4c68f6+0x2)+'#\x20'+_0x220a00);}}else _0x230e52[_0x7a5b9d(0xef)](_0x7a5b9d(0xf5)),_0x230e52['push']('\x20\x20\x20\x20'+CLI_BIN_NAME+'\x20run\x20start'),_0x230e52['push']('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x7a5b9d(0x10b)),_0x230e52[_0x7a5b9d(0xef)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x7a5b9d(0xdb)),_0x230e52[_0x7a5b9d(0xef)](_0x7a5b9d(0xe5)+CLI_BIN_NAME+_0x7a5b9d(0xe9));return _0x230e52[_0x7a5b9d(0xd6)]('\x0a');},async 'execute'(_0x1d1970){const _0x529000=a100_0xef803c,_0x4d4f52=process[_0x529000(0x115)](),_0x65d5f6=_0x1d1970[_0x529000(0xf8)][0x0],_0x271c72=_0x1d1970[_0x529000(0xf8)][_0x529000(0xd4)](0x1),_0x2a2425=readPackageScripts(_0x4d4f52);if(!_0x2a2425)throw CliErrors[_0x529000(0xd7)]('No\x20package.json\x20found\x20in\x20current\x20directory.');if(!_0x65d5f6){const _0x2379e8=Object[_0x529000(0x107)](_0x2a2425);if(_0x2379e8[_0x529000(0xda)]===0x0)console[_0x529000(0x118)](_0x529000(0x114));else{console[_0x529000(0x118)](_0x529000(0xf9));const _0x3455eb=Math[_0x529000(0x111)](..._0x2379e8[_0x529000(0x105)](_0x4bac99=>_0x4bac99[_0x529000(0xda)]));for(const [_0x54c8d0,_0x3cf698]of Object['entries'](_0x2a2425)){console['log']('\x20\x20\x20\x20'+_0x54c8d0['padEnd'](_0x3455eb+0x2)+_0x3cf698);}console[_0x529000(0x118)](_0x529000(0xf6)+CLI_BIN_NAME+_0x529000(0xeb));}return{'ok':!![]};}if(!_0x2a2425[_0x65d5f6])throw CliErrors[_0x529000(0xd7)](_0x529000(0xd9)+_0x65d5f6+'\x22\x20not\x20found\x20in\x20package.json.','Available:\x20'+(Object[_0x529000(0x107)](_0x2a2425)[_0x529000(0xd6)](',\x20')||_0x529000(0xec)));const _0x58a527=detectPackageManager(_0x4d4f52);VERSION_CHECK_SCRIPTS[_0x529000(0x10e)](_0x65d5f6)&&await versionCheck(_0x4d4f52);if(_0x65d5f6===_0x529000(0x10c)&&_0x1d1970[_0x529000(0xfb)](_0x529000(0xfe)))return await Promise['all']([spawnViteBuildWatch(_0x4d4f52),spawnVitePreview(_0x4d4f52)]),{'ok':!![]};return await spawnScript(_0x58a527,_0x65d5f6,_0x271c72,_0x4d4f52),{'ok':!![]};}};
@@ -1 +1 @@
1
- function a100_0x8b24(_0x307bc6,_0xda466){_0x307bc6=_0x307bc6-0xc3;const _0x2636f8=a100_0x2636();let _0x8b2498=_0x2636f8[_0x307bc6];return _0x8b2498;}function a100_0x2636(){const _0x1f9bd0=['498IbfgvG','4107040PQKnoa','Export\x20machine-readable\x20command\x20schema\x20(JSON)','378414mTieqD','1459560dbSsZV','756mBXNde','586528lJtnyi','7czGLHX','443340IRWTFe','5hfoEzy','1160778pPiZLO','schema','json'];a100_0x2636=function(){return _0x1f9bd0;};return a100_0x2636();}const a100_0x51bee3=a100_0x8b24;(function(_0x15adfb,_0x49f1d7){const _0x240edc=a100_0x8b24,_0x3e4ccd=_0x15adfb();while(!![]){try{const _0x2b991a=parseInt(_0x240edc(0xca))/0x1*(parseInt(_0x240edc(0xcf))/0x2)+parseInt(_0x240edc(0xc5))/0x3+parseInt(_0x240edc(0xc3))/0x4+-parseInt(_0x240edc(0xc6))/0x5*(parseInt(_0x240edc(0xc7))/0x6)+-parseInt(_0x240edc(0xc4))/0x7*(-parseInt(_0x240edc(0xce))/0x8)+parseInt(_0x240edc(0xcd))/0x9+-parseInt(_0x240edc(0xcb))/0xa;if(_0x2b991a===_0x49f1d7)break;else _0x3e4ccd['push'](_0x3e4ccd['shift']());}catch(_0x4609e0){_0x3e4ccd['push'](_0x3e4ccd['shift']());}}}(a100_0x2636,0x19244));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x50447e){const _0x6a278a=await buildSchemaPayload();return{'ok':!![],'data':_0x6a278a};}export const schemaDefinition={'service':a100_0x51bee3(0xc8),'command':'export','description':a100_0x51bee3(0xcc),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a100_0x51bee3(0xc9),'flags':[],'execute':execute};
1
+ const a101_0x41479b=a101_0x375e;(function(_0x18f8b2,_0x5d0764){const _0x58ebc2=a101_0x375e,_0x552cb5=_0x18f8b2();while(!![]){try{const _0x638839=parseInt(_0x58ebc2(0x1f4))/0x1*(parseInt(_0x58ebc2(0x1f7))/0x2)+parseInt(_0x58ebc2(0x1f8))/0x3*(-parseInt(_0x58ebc2(0x1f6))/0x4)+-parseInt(_0x58ebc2(0x1f1))/0x5+parseInt(_0x58ebc2(0x1f2))/0x6+-parseInt(_0x58ebc2(0x1f3))/0x7+-parseInt(_0x58ebc2(0x1fd))/0x8+parseInt(_0x58ebc2(0x1fb))/0x9*(parseInt(_0x58ebc2(0x1f5))/0xa);if(_0x638839===_0x5d0764)break;else _0x552cb5['push'](_0x552cb5['shift']());}catch(_0x3ba73a){_0x552cb5['push'](_0x552cb5['shift']());}}}(a101_0x2d8a,0xf202d));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x12d94d){const _0x254f3c=await buildSchemaPayload();return{'ok':!![],'data':_0x254f3c};}function a101_0x2d8a(){const _0x204174=['export','9818790BVecmv','2436492joRtlD','1940043IFKQJZ','1268269tGonWg','10LaLAHz','84316nBBQFL','2jOHHMX','12JcjorX','read','Export\x20machine-readable\x20command\x20schema\x20(JSON)','25471107Hkwdyx','json','9503792FyTang','schema'];a101_0x2d8a=function(){return _0x204174;};return a101_0x2d8a();}function a101_0x375e(_0x5d10fb,_0x42fde6){_0x5d10fb=_0x5d10fb-0x1ef;const _0x2d8a01=a101_0x2d8a();let _0x375e55=_0x2d8a01[_0x5d10fb];return _0x375e55;}export const schemaDefinition={'service':a101_0x41479b(0x1ef),'command':a101_0x41479b(0x1f0),'description':a101_0x41479b(0x1fa),'risk':a101_0x41479b(0x1f9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a101_0x41479b(0x1fc),'flags':[],'execute':execute};