@lovrabet/rabetbase-cli 2.1.14-beta.3 → 2.2.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/discover.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app/use.js +1 -1
  26. package/lib/commands/auth/index.js +1 -1
  27. package/lib/commands/bff/create.js +1 -1
  28. package/lib/commands/bff/delete.js +1 -1
  29. package/lib/commands/bff/detail.js +1 -1
  30. package/lib/commands/bff/index.js +1 -1
  31. package/lib/commands/bff/list.js +1 -1
  32. package/lib/commands/bff/pull.js +1 -1
  33. package/lib/commands/bff/push.js +1 -1
  34. package/lib/commands/bff/status.js +1 -1
  35. package/lib/commands/cli-update.js +1 -1
  36. package/lib/commands/codegen/index.js +1 -1
  37. package/lib/commands/codegen/sdk.js +1 -1
  38. package/lib/commands/codegen/sql.js +1 -1
  39. package/lib/commands/common/app-selector.js +1 -1
  40. package/lib/commands/common/flags.js +1 -1
  41. package/lib/commands/common/validate.js +1 -1
  42. package/lib/commands/config/get.js +1 -1
  43. package/lib/commands/config/index.js +1 -1
  44. package/lib/commands/config/list.js +1 -1
  45. package/lib/commands/config/set.js +1 -1
  46. package/lib/commands/config/shared.js +1 -1
  47. package/lib/commands/data/filter.js +1 -1
  48. package/lib/commands/data/getOne.js +1 -1
  49. package/lib/commands/data/index.js +1 -1
  50. package/lib/commands/data/shared.js +1 -1
  51. package/lib/commands/dataset/capability.js +1 -1
  52. package/lib/commands/dataset/delete.js +1 -1
  53. package/lib/commands/dataset/detail.js +1 -1
  54. package/lib/commands/dataset/extend-update.js +1 -1
  55. package/lib/commands/dataset/field-update.js +1 -1
  56. package/lib/commands/dataset/index.js +1 -1
  57. package/lib/commands/dataset/list.js +1 -1
  58. package/lib/commands/dataset/operations.js +1 -1
  59. package/lib/commands/dataset/relation-create.js +1 -0
  60. package/lib/commands/dataset/relation-delete.js +1 -0
  61. package/lib/commands/dataset/relation-shared.js +1 -0
  62. package/lib/commands/dataset/relation-update.js +1 -0
  63. package/lib/commands/dataset/relations.js +1 -0
  64. package/lib/commands/dataset/rename.js +1 -1
  65. package/lib/commands/db/analyze-cancel.js +1 -1
  66. package/lib/commands/db/analyze-start.js +1 -1
  67. package/lib/commands/db/analyze-status.js +1 -1
  68. package/lib/commands/db/create.js +1 -1
  69. package/lib/commands/db/delete.js +1 -1
  70. package/lib/commands/db/detail.js +1 -1
  71. package/lib/commands/db/diff.js +1 -1
  72. package/lib/commands/db/index.js +1 -1
  73. package/lib/commands/db/list.js +1 -1
  74. package/lib/commands/db/shared.js +1 -1
  75. package/lib/commands/db/tables.js +1 -1
  76. package/lib/commands/db/test.js +1 -1
  77. package/lib/commands/db/update.js +1 -1
  78. package/lib/commands/doctor.js +1 -1
  79. package/lib/commands/init/index.js +1 -1
  80. package/lib/commands/issue/index.js +1 -1
  81. package/lib/commands/issue/nudge.js +1 -1
  82. package/lib/commands/issue/report.js +1 -1
  83. package/lib/commands/issue/shared.js +1 -1
  84. package/lib/commands/logs/index.js +1 -1
  85. package/lib/commands/menu/index.js +1 -1
  86. package/lib/commands/menu/shared/compare-table.js +1 -1
  87. package/lib/commands/menu/shared/index.js +1 -1
  88. package/lib/commands/menu/shared/inquirer.js +1 -1
  89. package/lib/commands/menu/shared/local-pages.js +1 -1
  90. package/lib/commands/menu/shared/logic.js +1 -1
  91. package/lib/commands/menu/shared/service.js +1 -1
  92. package/lib/commands/menu/shared/sync-core.js +1 -1
  93. package/lib/commands/menu/shared/update-core.js +1 -1
  94. package/lib/commands/menu/shared/valid-url.js +1 -1
  95. package/lib/commands/menu/sync.js +1 -1
  96. package/lib/commands/menu/update.js +1 -1
  97. package/lib/commands/page/generate-start.js +1 -1
  98. package/lib/commands/page/generate-status.js +1 -1
  99. package/lib/commands/page/index.js +1 -1
  100. package/lib/commands/page/pull.js +1 -1
  101. package/lib/commands/page/push.js +1 -1
  102. package/lib/commands/page/relation-audit.js +1 -0
  103. package/lib/commands/page/shared.js +1 -1
  104. package/lib/commands/page/standard-page-status.js +1 -1
  105. package/lib/commands/page/sync.js +1 -1
  106. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  107. package/lib/commands/project/create/format-elapsed.js +1 -1
  108. package/lib/commands/project/create/main.js +1 -1
  109. package/lib/commands/project/create/non-interactive.js +1 -1
  110. package/lib/commands/project/create/project-template-path.js +1 -1
  111. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  112. package/lib/commands/project/create/use-format-code.js +1 -1
  113. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  114. package/lib/commands/project/index.js +1 -1
  115. package/lib/commands/project/init.js +1 -1
  116. package/lib/commands/project/upgrade.js +1 -1
  117. package/lib/commands/registry.js +1 -1
  118. package/lib/commands/run/index.js +1 -1
  119. package/lib/commands/schema.js +1 -1
  120. package/lib/commands/skill/index.js +1 -1
  121. package/lib/commands/sql/create.js +1 -1
  122. package/lib/commands/sql/delete.js +1 -1
  123. package/lib/commands/sql/detail.js +1 -1
  124. package/lib/commands/sql/exec.js +1 -1
  125. package/lib/commands/sql/index.js +1 -1
  126. package/lib/commands/sql/list.js +1 -1
  127. package/lib/commands/sql/pull.js +1 -1
  128. package/lib/commands/sql/push.js +1 -1
  129. package/lib/commands/sql/save.js +1 -1
  130. package/lib/commands/sql/shared.js +1 -1
  131. package/lib/commands/sql/status.js +1 -1
  132. package/lib/commands/sql/validate.js +1 -1
  133. package/lib/config/schema.js +1 -1
  134. package/lib/constant/cdn.js +1 -1
  135. package/lib/constant/cli.js +1 -1
  136. package/lib/constant/defaults.js +1 -1
  137. package/lib/constant/domain.js +1 -1
  138. package/lib/constant/env.js +1 -1
  139. package/lib/constant/output.js +1 -1
  140. package/lib/constant/paths.js +1 -1
  141. package/lib/constant/risk.js +1 -1
  142. package/lib/context.js +1 -1
  143. package/lib/core/alias-resolver.js +1 -1
  144. package/lib/core/api-client.js +1 -1
  145. package/lib/core/bff/config.js +1 -1
  146. package/lib/core/bff/file-system.js +1 -1
  147. package/lib/core/bff/hash.js +1 -1
  148. package/lib/core/bff/lock.js +1 -1
  149. package/lib/core/bff/utils.js +1 -1
  150. package/lib/core/db-resolver.js +1 -1
  151. package/lib/core/page/file-system.js +1 -1
  152. package/lib/core/page/hash.js +1 -1
  153. package/lib/core/page/lock.js +1 -1
  154. package/lib/core/sql-sync/config.js +1 -1
  155. package/lib/core/sql-sync/file-system.js +1 -1
  156. package/lib/core/sql-sync/hash.js +1 -1
  157. package/lib/core/sql-sync/lock.js +1 -1
  158. package/lib/core/sql-sync/utils.js +1 -1
  159. package/lib/core/sql-validator.js +1 -1
  160. package/lib/errors.js +1 -1
  161. package/lib/framework/build-all-flags.js +1 -1
  162. package/lib/framework/flags.js +1 -1
  163. package/lib/framework/help.js +1 -1
  164. package/lib/framework/index.js +1 -1
  165. package/lib/framework/output.js +1 -1
  166. package/lib/framework/response.js +1 -1
  167. package/lib/framework/runner-alias.js +1 -1
  168. package/lib/framework/runner.js +1 -1
  169. package/lib/framework/schema-export.js +1 -1
  170. package/lib/framework/types.js +1 -1
  171. package/lib/generated/build-info.js +1 -1
  172. package/lib/help.js +1 -1
  173. package/lib/skills/main.js +1 -1
  174. package/lib/skills/npx-skills-add.js +1 -1
  175. package/lib/telemetry/cli-command-trace.js +1 -1
  176. package/lib/telemetry/cli-help-trace.js +1 -1
  177. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  178. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  179. package/lib/telemetry/send-cli-trace-log.js +1 -1
  180. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  181. package/lib/utils/ai_config.js +1 -1
  182. package/lib/utils/apply-jq-filter.js +1 -1
  183. package/lib/utils/cdn-config.js +1 -1
  184. package/lib/utils/check-sdk-version.js +1 -1
  185. package/lib/utils/cli-version-check.js +1 -1
  186. package/lib/utils/cli-version-policy.js +1 -1
  187. package/lib/utils/config.js +1 -1
  188. package/lib/utils/copy-directory.js +1 -1
  189. package/lib/utils/entity-with-id.js +1 -1
  190. package/lib/utils/file-utils.js +1 -1
  191. package/lib/utils/guides-cdn.js +1 -1
  192. package/lib/utils/http-client.js +1 -1
  193. package/lib/utils/is-non-interactive.js +1 -1
  194. package/lib/utils/logger.js +1 -1
  195. package/lib/utils/params.js +1 -1
  196. package/lib/utils/platform.js +1 -1
  197. package/lib/utils/rules-cdn.js +1 -1
  198. package/lib/utils/sleep.js +1 -1
  199. package/lib/utils/template-replacer.js +1 -1
  200. package/lib/utils/update-notice.js +1 -0
  201. package/lib/utils/version.js +1 -1
  202. package/lib/utils/with-active-cookie.js +1 -1
  203. package/lib/utils/write-cli-side-channel.js +1 -1
  204. package/package.json +1 -1
  205. package/lib/commands/dataset/link-create.js +0 -1
  206. package/lib/commands/dataset/link-delete.js +0 -1
  207. package/lib/commands/dataset/link-shared.js +0 -1
  208. package/lib/commands/dataset/link-update.js +0 -1
  209. package/lib/commands/dataset/links.js +0 -1
@@ -1 +1 @@
1
- (function(_0x3670c0,_0xd7771f){const _0x1af910=a107_0x3789,_0x5c3151=_0x3670c0();while(!![]){try{const _0x7047b2=-parseInt(_0x1af910(0xb8))/0x1+parseInt(_0x1af910(0xc8))/0x2+parseInt(_0x1af910(0xd9))/0x3*(parseInt(_0x1af910(0xa3))/0x4)+-parseInt(_0x1af910(0xcb))/0x5+-parseInt(_0x1af910(0xa4))/0x6+-parseInt(_0x1af910(0xde))/0x7*(-parseInt(_0x1af910(0xed))/0x8)+parseInt(_0x1af910(0xcd))/0x9*(parseInt(_0x1af910(0xea))/0xa);if(_0x7047b2===_0xd7771f)break;else _0x5c3151['push'](_0x5c3151['shift']());}catch(_0x38326c){_0x5c3151['push'](_0x5c3151['shift']());}}}(a107_0x5236,0x5eb4c));import a107_0x1b615a from'path';function a107_0x3789(_0x42de9f,_0x376aeb){_0x42de9f=_0x42de9f-0x8b;const _0x5236f7=a107_0x5236();let _0x378937=_0x5236f7[_0x42de9f];return _0x378937;}import a107_0x271d0 from'fs';import a107_0xc863ac from'chalk';import a107_0x2bf545 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';function a107_0x5236(){const _0x43ddc7=['join','chdir','\x20Generated\x20by\x20rabetbase\x20cli\x20','Copy\x20project\x20files','项目创建失败:\x20','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','\x20\x202.\x20Pull\x20API\x20configuration:\x20','currentVersion','...','utf8','7640jhMouF','keys','更新\x20package.json\x20name','24Hnfvyj','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','\x20model(s)','rmSync','配置应用AppCode:\x20','version','repeat','message','\x20dataset(s),\x20generated\x20','warn','success','existsSync','defaultApp','description','error','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','trim','bold','CLI\x20版本检查','projectCode','parse','√\x20Pulled\x20','stableVersion','*\x20Configuring\x20AppCode\x20for\x20project\x20','fail','modelCount','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','581852XxJZYV','772494CfcRDD','writeFileSync','Format\x20code','setLogPath','create','\x20|\x20AppCode:\x20','length','stringify','belowMinimum','test','cookie','Project\x20name:\x20','cwd','production','toLocaleString','\x20|\x20Default:\x20','cyan','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','stop','\x20√\x20','481339tCFosM','resolve','API\x20配置拉取异常','readFileSync','projectName','Project\x20name\x20cannot\x20be\x20empty','green','\x20already\x20exists','\x20config\x20set\x20appcode\x20<app-code>\x27','🚀\x20Next\x20Steps:','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','log','\x20api\x20pull','string','start','配置应用AppCode失败','1377888GyipIm','cd\x20','1.0.0','3484700kQFPuO','appCode','1620jMiwue','*\x20Pulling\x20API\x20configuration...','dirname','gray','name','\x20&&\x20','项目创建完成:\x20','info','更新\x20package.json\x20失败','package.json','accessSync','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','15OwbRPt','Install\x20dependencies','minimumVersion','env','needsUpgrade','329385VzCTEf','constants'];a107_0x5236=function(){return _0x43ddc7;};return a107_0x5236();}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';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(_0x277025){const _0x386273=a107_0x3789,_0xc38807=await checkCliVersion();(_0xc38807[_0x386273(0xdd)]||_0xc38807[_0x386273(0xac)])&&(printCliUpgradeWarning(_0xc38807),assertCliVersionSupported(_0xc38807),logger['info']('create',_0x386273(0x9a),{'currentVersion':_0xc38807[_0x386273(0xe7)],'stableVersion':_0xc38807[_0x386273(0x9e)],'minimumVersion':_0xc38807[_0x386273(0xdb)],'needsUpgrade':_0xc38807[_0x386273(0xdd)],'belowMinimum':_0xc38807[_0x386273(0xac)]}));if(_0x277025[_0x386273(0x9b)]&&_0x277025['appCode'])await runCreate({'projectName':_0x277025[_0x386273(0x9b)],'appCode':_0x277025[_0x386273(0xcc)],'env':_0x277025[_0x386273(0xdc)]},_0x277025);else{if(_0x277025[_0x386273(0x9b)]){const _0x3775f3=await selectSingleAppcode(_0x277025[_0x386273(0xae)]);await runCreate({'projectName':_0x277025[_0x386273(0x9b)],'appCode':_0x3775f3||undefined,'env':_0x277025['env']},_0x277025);}else await guidedCreateProject(_0x1631bb=>runCreate(_0x1631bb,_0x277025),_0x277025[_0x386273(0xdc)],_0x277025[_0x386273(0xae)]);}}async function runCreate(_0x3f4c8e,_0x4188b9){const _0xcbbf68=a107_0x3789;if(!_0x3f4c8e[_0xcbbf68(0xbc)]||_0x3f4c8e[_0xcbbf68(0xbc)][_0xcbbf68(0x98)]()==='')throw new Error(_0xcbbf68(0xbd));const _0x538100=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x538100[_0xcbbf68(0xad)](_0x3f4c8e[_0xcbbf68(0xbc)]))throw new Error('Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x3f4c8e[_0xcbbf68(0xbc)]['length']>0x64)throw new Error(_0xcbbf68(0x97));const _0x4e1f8b=a107_0x1b615a[_0xcbbf68(0xb9)](process[_0xcbbf68(0xb0)](),_0x3f4c8e[_0xcbbf68(0xbc)]);if(a107_0x271d0[_0xcbbf68(0x93)](_0x4e1f8b))throw new Error('Project\x20directory\x20'+_0x3f4c8e[_0xcbbf68(0xbc)]+_0xcbbf68(0xbf));try{a107_0x271d0[_0xcbbf68(0xd7)](a107_0x1b615a[_0xcbbf68(0xcf)](_0x4e1f8b),a107_0x271d0[_0xcbbf68(0xdf)]['W_OK']);}catch{throw new Error(_0xcbbf68(0xc2));}logger[_0xcbbf68(0xa7)](_0x4e1f8b),logger[_0xcbbf68(0xd4)](_0xcbbf68(0xa8),'开始创建项目:\x20'+_0x3f4c8e[_0xcbbf68(0xbc)],{'projectDir':_0x4e1f8b,'appCode':_0x3f4c8e[_0xcbbf68(0xcc)]}),console[_0xcbbf68(0xc3)](),console[_0xcbbf68(0xc3)](a107_0xc863ac[_0xcbbf68(0xbe)](_0xcbbf68(0xb7))+_0xcbbf68(0xaf)+a107_0xc863ac[_0xcbbf68(0xbe)](_0x3f4c8e[_0xcbbf68(0xbc)])+(_0x3f4c8e[_0xcbbf68(0xcc)]?_0xcbbf68(0xa9)+a107_0xc863ac[_0xcbbf68(0xb4)](_0x3f4c8e['appCode']):''));try{await runTask(_0xcbbf68(0xe3),()=>copyProjectTemplate(_0x3f4c8e[_0xcbbf68(0xbc)])),await updatePackageJsonName(_0x3f4c8e['projectName']),await runTask(_0xcbbf68(0xda),()=>installDependencies(_0x3f4c8e[_0xcbbf68(0xbc)])),await runTask(_0xcbbf68(0xa6),()=>formatProjectCode(_0x3f4c8e[_0xcbbf68(0xbc)])),await configureAppCode(_0x3f4c8e[_0xcbbf68(0xbc)],_0x3f4c8e[_0xcbbf68(0xcc)]||'',_0x3f4c8e[_0xcbbf68(0xdc)]);let _0x14cbbe=![];if(_0x3f4c8e[_0xcbbf68(0xcc)]){console[_0xcbbf68(0xc3)](_0xcbbf68(0xce));const _0x29232a=process[_0xcbbf68(0xb0)]();try{process[_0xcbbf68(0xe1)](_0x4e1f8b);const _0x59ef5e=_0x3f4c8e[_0xcbbf68(0xdc)]||'production';initEnv(_0x59ef5e);const {configArray:_0x5c7f53}=await fetchModelList(_0x3f4c8e['appCode'],_0x4188b9[_0xcbbf68(0xae)]||''),_0x3b6e73=DEFAULT_API_DIR,_0x5a4849=await generateApiFile(_0x5c7f53,'',_0x3f4c8e[_0xcbbf68(0xcc)],!![],_0x59ef5e,_0x3b6e73);console[_0xcbbf68(0xc3)](_0xcbbf68(0x9d)+_0x5c7f53[_0xcbbf68(0xaa)]+_0xcbbf68(0x90)+_0x5a4849[_0xcbbf68(0xa1)]+_0xcbbf68(0xef)),logger[_0xcbbf68(0xd4)]('create','API\x20configuration\x20pulled:\x20'+_0x3f4c8e[_0xcbbf68(0xcc)]);}catch(_0x2128a2){_0x14cbbe=!![],console['log'](_0xcbbf68(0xa2)),logger[_0xcbbf68(0x91)](_0xcbbf68(0xa8),_0xcbbf68(0xba),{'error':_0x2128a2 instanceof Error?_0x2128a2[_0xcbbf68(0x8f)]:String(_0x2128a2)});}finally{process[_0xcbbf68(0xe1)](_0x29232a);}}logger[_0xcbbf68(0x92)](_0xcbbf68(0xa8),_0xcbbf68(0xd3)+_0x3f4c8e[_0xcbbf68(0xbc)]),console[_0xcbbf68(0xc3)](),console['log'](a107_0xc863ac[_0xcbbf68(0xbe)]('─'[_0xcbbf68(0x8e)](0x3c))),console[_0xcbbf68(0xc3)](a107_0xc863ac['cyan'][_0xcbbf68(0x99)](_0xcbbf68(0xc1))),console[_0xcbbf68(0xc3)](),console['log']('\x20\x201.\x20Start\x20project:\x20'+a107_0xc863ac[_0xcbbf68(0xb4)]['bold'](_0xcbbf68(0xc9)+_0x3f4c8e['projectName']+_0xcbbf68(0xd2)+CLI_BIN_NAME+'\x20run\x20start')),_0x14cbbe&&console[_0xcbbf68(0xc3)](_0xcbbf68(0xe6)+a107_0xc863ac[_0xcbbf68(0xb4)][_0xcbbf68(0x99)](CLI_BIN_NAME+_0xcbbf68(0xc4))),console['log'](a107_0xc863ac[_0xcbbf68(0xbe)]('─'[_0xcbbf68(0x8e)](0x3c)));}catch(_0xbf8c96){logger[_0xcbbf68(0x96)](_0xcbbf68(0xa8),_0xcbbf68(0xe4)+_0x3f4c8e[_0xcbbf68(0xbc)],{'error':_0xbf8c96 instanceof Error?_0xbf8c96['message']:String(_0xbf8c96)});try{a107_0x271d0['existsSync'](_0x4e1f8b)&&(console['log'](_0xcbbf68(0xe5)+_0x4e1f8b),a107_0x271d0[_0xcbbf68(0x8b)](_0x4e1f8b,{'recursive':!![],'force':!![]}));}catch{logger[_0xcbbf68(0x91)](_0xcbbf68(0xa8),'清理项目目录失败:\x20'+_0x4e1f8b);}throw _0xbf8c96;}}async function runTask(_0x2db22e,_0x1a7c66){const _0x1a7cc8=a107_0x3789,_0x51884d=a107_0x2bf545(_0x2db22e+_0x1a7cc8(0xe8))[_0x1a7cc8(0xc6)]();try{const _0xfa8b0e=await _0x1a7c66();_0x51884d[_0x1a7cc8(0xb6)](),console[_0x1a7cc8(0xc3)](''+a107_0xc863ac[_0x1a7cc8(0xbe)](_0x1a7cc8(0xb7))+_0x2db22e+'\x20'+a107_0xc863ac[_0x1a7cc8(0xd0)]('['+_0xfa8b0e+']'));}catch(_0x3aeeb1){_0x51884d[_0x1a7cc8(0xa0)](_0x2db22e);throw _0x3aeeb1;}}async function updatePackageJsonName(_0x2c3848){const _0x391010=a107_0x3789,_0x203ef4=a107_0x1b615a['resolve'](process[_0x391010(0xb0)](),_0x2c3848),_0x3e90f0=a107_0x1b615a[_0x391010(0xe0)](_0x203ef4,_0x391010(0xd6));try{console[_0x391010(0xc3)](_0x391010(0xd8));const _0x1135c1=getRabetbaseCliPackageRoot(),_0x420827=a107_0x1b615a[_0x391010(0xe0)](_0x1135c1,_0x391010(0xd6));let _0x32aac5='1.0.0';try{const _0x5a9c89=JSON['parse'](a107_0x271d0['readFileSync'](_0x420827,_0x391010(0xe9)));_0x32aac5=_0x5a9c89[_0x391010(0x8d)]||'1.0.0';}catch{}const _0x1d0b46=a107_0x271d0[_0x391010(0xbb)](_0x3e90f0,'utf8'),_0x462c47=JSON[_0x391010(0x9c)](_0x1d0b46);_0x462c47[_0x391010(0xd1)]=_0x2c3848,_0x462c47[_0x391010(0x95)]=_0x2c3848+_0x391010(0xe2)+_0x32aac5,a107_0x271d0[_0x391010(0xa5)](_0x3e90f0,JSON[_0x391010(0xab)](_0x462c47,null,0x2)+'\x0a',_0x391010(0xe9)),console[_0x391010(0xc3)]('√\x20package.json\x20updated:\x20name='+_0x2c3848),logger['info'](_0x391010(0xa8),_0x391010(0xec));}catch(_0x863db4){logger['error'](_0x391010(0xa8),_0x391010(0xd5));throw _0x863db4;}}async function configureAppCode(_0x12fa98,_0x4b0d50,_0x1b42bc){const _0x420b60=a107_0x3789,_0x1534cb=a107_0x1b615a[_0x420b60(0xb9)](process[_0x420b60(0xb0)](),_0x12fa98),_0x3bf731=a107_0x1b615a[_0x420b60(0xe0)](_0x1534cb,NEW_CONFIG_NAME);try{_0x4b0d50?console[_0x420b60(0xc3)](_0x420b60(0x9f)+_0x12fa98+':\x20'+_0x4b0d50):console[_0x420b60(0xc3)](_0x420b60(0xee)+_0x12fa98);const _0x5296f6=getRabetbaseCliPackageRoot(),_0x55330c=a107_0x1b615a['join'](_0x5296f6,_0x420b60(0xd6));let _0x51ba1d='1.0.0';try{const _0x56691c=JSON[_0x420b60(0x9c)](a107_0x271d0['readFileSync'](_0x55330c,_0x420b60(0xe9)));_0x51ba1d=_0x56691c[_0x420b60(0x8d)]||_0x420b60(0xca);}catch{}const _0x5833ff=readConfig(),_0x4026ad=typeof _0x5833ff['env']===_0x420b60(0xc5)?_0x5833ff[_0x420b60(0xdc)]:undefined,_0x5f3f21={};for(const _0x18c495 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x5833ff[_0x18c495]!=null)_0x5f3f21[_0x18c495]=_0x5833ff[_0x18c495];}const _0x5e145f=buildCanonicalProjectConfig(_0x5f3f21,{'appCodes':_0x4b0d50?[_0x4b0d50]:[],'env':_0x1b42bc||_0x4026ad||_0x420b60(0xb1),'metadata':{'createdAt':new Date()[_0x420b60(0xb2)](),'version':_0x51ba1d}});writeConfigFile(_0x3bf731,_0x5e145f),_0x4b0d50?console[_0x420b60(0xc3)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object[_0x420b60(0xeb)](_0x5e145f['apps']||{})[_0x420b60(0xe0)](',\x20')+_0x420b60(0xb3)+_0x5e145f[_0x420b60(0x94)]):console[_0x420b60(0xc3)](_0x420b60(0xb5)+CLI_BIN_NAME+_0x420b60(0xc0)),logger['info'](_0x420b60(0xa8),_0x420b60(0x8c)+_0x4b0d50);}catch(_0x2ce3ab){logger['error']('create',_0x420b60(0xc7));}}
1
+ (function(_0x480471,_0x289eb2){const _0x2d8859=a108_0x356e,_0x523d08=_0x480471();while(!![]){try{const _0x328dbf=parseInt(_0x2d8859(0x104))/0x1*(-parseInt(_0x2d8859(0xe1))/0x2)+parseInt(_0x2d8859(0x126))/0x3+-parseInt(_0x2d8859(0x10d))/0x4*(-parseInt(_0x2d8859(0x11e))/0x5)+parseInt(_0x2d8859(0xfd))/0x6+-parseInt(_0x2d8859(0x115))/0x7*(parseInt(_0x2d8859(0x11c))/0x8)+-parseInt(_0x2d8859(0x127))/0x9+parseInt(_0x2d8859(0xe0))/0xa*(parseInt(_0x2d8859(0x12e))/0xb);if(_0x328dbf===_0x289eb2)break;else _0x523d08['push'](_0x523d08['shift']());}catch(_0x1fafa8){_0x523d08['push'](_0x523d08['shift']());}}}(a108_0x3eb6,0x81f45));import a108_0x272ae5 from'path';import a108_0x22946c from'fs';import a108_0x18fda0 from'chalk';import a108_0x51477c from'ora';function a108_0x3eb6(){const _0x41870c=['836375rzgmQz','setLogPath','appCode','create','utf8','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','accessSync','chdir','2579772CKsrQK','419112nqykPD','repeat','Install\x20dependencies','\x20run\x20start','配置应用AppCode失败','apps','\x20\x202.\x20Pull\x20API\x20configuration:\x20','705254OdqlGG','log','version','\x20dataset(s),\x20generated\x20','info','modelCount','√\x20Configuration\x20file\x20created,\x20Apps:\x20','warn','\x20&&\x20','Project\x20name\x20cannot\x20be\x20empty','\x20api\x20pull','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','\x20√\x20','1.0.0','stableVersion','\x20config\x20set\x20appcode\x20<app-code>\x27','160zldbkz','6EhihJZ','package.json','defaultApp','API\x20configuration\x20pulled:\x20','cd\x20','name','cyan','fail','W_OK','start','needsUpgrade','*\x20Pulling\x20API\x20configuration...','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','belowMinimum','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','gray','cwd','\x20already\x20exists','配置应用AppCode:\x20','env','green','cookie','√\x20package.json\x20updated:\x20name=','rmSync','production','keys','项目创建完成:\x20','项目创建失败:\x20','225906cvbiYP','开始创建项目:\x20','writeFileSync','string','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','toLocaleString','259410HmTraI','test','projectCode','更新\x20package.json\x20失败','bold','error','\x20\x201.\x20Start\x20project:\x20','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','resolve','4HfKoZE','CLI\x20版本检查','projectName','constants','readFileSync','stop','🚀\x20Next\x20Steps:','...','76643lJCXyZ','parse','message','清理项目目录失败:\x20','success','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','\x20|\x20Default:\x20','536QrgBtu','join'];a108_0x3eb6=function(){return _0x41870c;};return a108_0x3eb6();}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';function a108_0x356e(_0x4d7b8e,_0x842761){_0x4d7b8e=_0x4d7b8e-0xde;const _0x3eb61b=a108_0x3eb6();let _0x356e9f=_0x3eb61b[_0x4d7b8e];return _0x356e9f;}import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{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(_0x1d07b9){const _0x52818d=a108_0x356e,_0x368d8a=await checkCliVersion();(_0x368d8a[_0x52818d(0xeb)]||_0x368d8a[_0x52818d(0xee)])&&(printCliUpgradeWarning(_0x368d8a),assertCliVersionSupported(_0x368d8a),logger['info'](_0x52818d(0x121),_0x52818d(0x10e),{'currentVersion':_0x368d8a['currentVersion'],'stableVersion':_0x368d8a[_0x52818d(0xde)],'minimumVersion':_0x368d8a['minimumVersion'],'needsUpgrade':_0x368d8a[_0x52818d(0xeb)],'belowMinimum':_0x368d8a[_0x52818d(0xee)]}));if(_0x1d07b9[_0x52818d(0x106)]&&_0x1d07b9[_0x52818d(0x120)])await runCreate({'projectName':_0x1d07b9['projectCode'],'appCode':_0x1d07b9[_0x52818d(0x120)],'env':_0x1d07b9[_0x52818d(0xf4)]},_0x1d07b9);else{if(_0x1d07b9['projectCode']){const _0x29da69=await selectSingleAppcode(_0x1d07b9[_0x52818d(0xf6)]);await runCreate({'projectName':_0x1d07b9[_0x52818d(0x106)],'appCode':_0x29da69||undefined,'env':_0x1d07b9['env']},_0x1d07b9);}else await guidedCreateProject(_0x3bbd5c=>runCreate(_0x3bbd5c,_0x1d07b9),_0x1d07b9[_0x52818d(0xf4)],_0x1d07b9['cookie']);}}async function runCreate(_0x1bcba2,_0x5c4363){const _0x21f210=a108_0x356e;if(!_0x1bcba2['projectName']||_0x1bcba2[_0x21f210(0x10f)]['trim']()==='')throw new Error(_0x21f210(0x137));const _0x30f124=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x30f124[_0x21f210(0x105)](_0x1bcba2[_0x21f210(0x10f)]))throw new Error(_0x21f210(0x123));if(_0x1bcba2[_0x21f210(0x10f)]['length']>0x64)throw new Error(_0x21f210(0x102));const _0x1828a8=a108_0x272ae5[_0x21f210(0x10c)](process['cwd'](),_0x1bcba2[_0x21f210(0x10f)]);if(a108_0x22946c['existsSync'](_0x1828a8))throw new Error('Project\x20directory\x20'+_0x1bcba2[_0x21f210(0x10f)]+_0x21f210(0xf2));try{a108_0x22946c[_0x21f210(0x124)](a108_0x272ae5['dirname'](_0x1828a8),a108_0x22946c[_0x21f210(0x110)][_0x21f210(0xe9)]);}catch{throw new Error(_0x21f210(0xed));}logger[_0x21f210(0x11f)](_0x1828a8),logger[_0x21f210(0x132)](_0x21f210(0x121),_0x21f210(0xfe)+_0x1bcba2[_0x21f210(0x10f)],{'projectDir':_0x1828a8,'appCode':_0x1bcba2[_0x21f210(0x120)]}),console[_0x21f210(0x12f)](),console['log'](a108_0x18fda0['green']('\x20√\x20')+'Project\x20name:\x20'+a108_0x18fda0[_0x21f210(0xf5)](_0x1bcba2['projectName'])+(_0x1bcba2['appCode']?'\x20|\x20AppCode:\x20'+a108_0x18fda0[_0x21f210(0xe7)](_0x1bcba2[_0x21f210(0x120)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x1bcba2['projectName'])),await updatePackageJsonName(_0x1bcba2['projectName']),await runTask(_0x21f210(0x129),()=>installDependencies(_0x1bcba2[_0x21f210(0x10f)])),await runTask('Format\x20code',()=>formatProjectCode(_0x1bcba2[_0x21f210(0x10f)])),await configureAppCode(_0x1bcba2[_0x21f210(0x10f)],_0x1bcba2[_0x21f210(0x120)]||'',_0x1bcba2[_0x21f210(0xf4)]);let _0x24d66e=![];if(_0x1bcba2[_0x21f210(0x120)]){console[_0x21f210(0x12f)](_0x21f210(0xec));const _0x184b6f=process['cwd']();try{process[_0x21f210(0x125)](_0x1828a8);const _0xdb3743=_0x1bcba2['env']||_0x21f210(0xf9);initEnv(_0xdb3743);const {configArray:_0x11163f}=await fetchModelList(_0x1bcba2['appCode'],_0x5c4363[_0x21f210(0xf6)]||''),_0x446f98=DEFAULT_API_DIR,_0x2f75e5=await generateApiFile(_0x11163f,'',_0x1bcba2['appCode'],!![],_0xdb3743,_0x446f98);console[_0x21f210(0x12f)]('√\x20Pulled\x20'+_0x11163f['length']+_0x21f210(0x131)+_0x2f75e5[_0x21f210(0x133)]+'\x20model(s)'),logger['info']('create',_0x21f210(0xe4)+_0x1bcba2[_0x21f210(0x120)]);}catch(_0x99f9f8){_0x24d66e=!![],console[_0x21f210(0x12f)](_0x21f210(0x139)),logger[_0x21f210(0x135)](_0x21f210(0x121),'API\x20配置拉取异常',{'error':_0x99f9f8 instanceof Error?_0x99f9f8['message']:String(_0x99f9f8)});}finally{process[_0x21f210(0x125)](_0x184b6f);}}logger[_0x21f210(0x119)](_0x21f210(0x121),_0x21f210(0xfb)+_0x1bcba2[_0x21f210(0x10f)]),console['log'](),console[_0x21f210(0x12f)](a108_0x18fda0['green']('─'[_0x21f210(0x128)](0x3c))),console[_0x21f210(0x12f)](a108_0x18fda0[_0x21f210(0xe7)][_0x21f210(0x108)](_0x21f210(0x113))),console[_0x21f210(0x12f)](),console['log'](_0x21f210(0x10a)+a108_0x18fda0[_0x21f210(0xe7)]['bold'](_0x21f210(0xe5)+_0x1bcba2[_0x21f210(0x10f)]+_0x21f210(0x136)+CLI_BIN_NAME+_0x21f210(0x12a))),_0x24d66e&&console[_0x21f210(0x12f)](_0x21f210(0x12d)+a108_0x18fda0[_0x21f210(0xe7)][_0x21f210(0x108)](CLI_BIN_NAME+_0x21f210(0x138))),console[_0x21f210(0x12f)](a108_0x18fda0[_0x21f210(0xf5)]('─'[_0x21f210(0x128)](0x3c)));}catch(_0x2fba51){logger[_0x21f210(0x109)](_0x21f210(0x121),_0x21f210(0xfc)+_0x1bcba2[_0x21f210(0x10f)],{'error':_0x2fba51 instanceof Error?_0x2fba51[_0x21f210(0x117)]:String(_0x2fba51)});try{a108_0x22946c['existsSync'](_0x1828a8)&&(console['log'](_0x21f210(0x11a)+_0x1828a8),a108_0x22946c[_0x21f210(0xf8)](_0x1828a8,{'recursive':!![],'force':!![]}));}catch{logger['warn'](_0x21f210(0x121),_0x21f210(0x118)+_0x1828a8);}throw _0x2fba51;}}async function runTask(_0x1280f5,_0x591775){const _0x2c16be=a108_0x356e,_0x47f869=a108_0x51477c(_0x1280f5+_0x2c16be(0x114))[_0x2c16be(0xea)]();try{const _0x1a82a6=await _0x591775();_0x47f869[_0x2c16be(0x112)](),console[_0x2c16be(0x12f)](''+a108_0x18fda0[_0x2c16be(0xf5)](_0x2c16be(0x13a))+_0x1280f5+'\x20'+a108_0x18fda0[_0x2c16be(0xf0)]('['+_0x1a82a6+']'));}catch(_0x37963b){_0x47f869[_0x2c16be(0xe8)](_0x1280f5);throw _0x37963b;}}async function updatePackageJsonName(_0x5be070){const _0x34d752=a108_0x356e,_0x1b31a7=a108_0x272ae5[_0x34d752(0x10c)](process[_0x34d752(0xf1)](),_0x5be070),_0x216047=a108_0x272ae5[_0x34d752(0x11d)](_0x1b31a7,_0x34d752(0xe2));try{console['log'](_0x34d752(0x101));const _0x66b707=getRabetbaseCliPackageRoot(),_0x56367b=a108_0x272ae5[_0x34d752(0x11d)](_0x66b707,_0x34d752(0xe2));let _0x2443b6='1.0.0';try{const _0x4417d7=JSON[_0x34d752(0x116)](a108_0x22946c[_0x34d752(0x111)](_0x56367b,_0x34d752(0x122)));_0x2443b6=_0x4417d7[_0x34d752(0x130)]||_0x34d752(0x13b);}catch{}const _0x4199aa=a108_0x22946c['readFileSync'](_0x216047,_0x34d752(0x122)),_0x4461fa=JSON[_0x34d752(0x116)](_0x4199aa);_0x4461fa[_0x34d752(0xe6)]=_0x5be070,_0x4461fa['description']=_0x5be070+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0x2443b6,a108_0x22946c[_0x34d752(0xff)](_0x216047,JSON['stringify'](_0x4461fa,null,0x2)+'\x0a',_0x34d752(0x122)),console[_0x34d752(0x12f)](_0x34d752(0xf7)+_0x5be070),logger['info'](_0x34d752(0x121),'更新\x20package.json\x20name');}catch(_0x14c9c3){logger['error']('create',_0x34d752(0x107));throw _0x14c9c3;}}async function configureAppCode(_0x4ae752,_0x26baf3,_0x34c66d){const _0x4c3ef2=a108_0x356e,_0x149fb5=a108_0x272ae5[_0x4c3ef2(0x10c)](process[_0x4c3ef2(0xf1)](),_0x4ae752),_0x404ff6=a108_0x272ae5[_0x4c3ef2(0x11d)](_0x149fb5,NEW_CONFIG_NAME);try{_0x26baf3?console['log']('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x4ae752+':\x20'+_0x26baf3):console[_0x4c3ef2(0x12f)](_0x4c3ef2(0xef)+_0x4ae752);const _0x555f66=getRabetbaseCliPackageRoot(),_0x13ffe7=a108_0x272ae5[_0x4c3ef2(0x11d)](_0x555f66,'package.json');let _0x3b0eb0=_0x4c3ef2(0x13b);try{const _0x3c7a0a=JSON[_0x4c3ef2(0x116)](a108_0x22946c['readFileSync'](_0x13ffe7,_0x4c3ef2(0x122)));_0x3b0eb0=_0x3c7a0a[_0x4c3ef2(0x130)]||_0x4c3ef2(0x13b);}catch{}const _0x115d86=readConfig(),_0x27d828=typeof _0x115d86[_0x4c3ef2(0xf4)]===_0x4c3ef2(0x100)?_0x115d86['env']:undefined,_0x5adef6={};for(const _0x361978 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x115d86[_0x361978]!=null)_0x5adef6[_0x361978]=_0x115d86[_0x361978];}const _0x32c1fe=buildCanonicalProjectConfig(_0x5adef6,{'appCodes':_0x26baf3?[_0x26baf3]:[],'env':_0x34c66d||_0x27d828||'production','metadata':{'createdAt':new Date()[_0x4c3ef2(0x103)](),'version':_0x3b0eb0}});writeConfigFile(_0x404ff6,_0x32c1fe),_0x26baf3?console['log'](_0x4c3ef2(0x134)+Object[_0x4c3ef2(0xfa)](_0x32c1fe[_0x4c3ef2(0x12c)]||{})[_0x4c3ef2(0x11d)](',\x20')+_0x4c3ef2(0x11b)+_0x32c1fe[_0x4c3ef2(0xe3)]):console[_0x4c3ef2(0x12f)](_0x4c3ef2(0x10b)+CLI_BIN_NAME+_0x4c3ef2(0xdf)),logger[_0x4c3ef2(0x132)](_0x4c3ef2(0x121),_0x4c3ef2(0xf3)+_0x26baf3);}catch(_0x3a8f1e){logger[_0x4c3ef2(0x109)](_0x4c3ef2(0x121),_0x4c3ef2(0x12b));}}
@@ -1 +1 @@
1
- (function(_0x18a1d2,_0x4a4b6b){const _0x413a93=a108_0x1f84,_0xaa25ed=_0x18a1d2();while(!![]){try{const _0x5ce5ef=parseInt(_0x413a93(0x16e))/0x1+parseInt(_0x413a93(0x171))/0x2*(parseInt(_0x413a93(0x166))/0x3)+-parseInt(_0x413a93(0x16b))/0x4+-parseInt(_0x413a93(0x155))/0x5+parseInt(_0x413a93(0x16c))/0x6+parseInt(_0x413a93(0x175))/0x7+parseInt(_0x413a93(0x17a))/0x8;if(_0x5ce5ef===_0x4a4b6b)break;else _0xaa25ed['push'](_0xaa25ed['shift']());}catch(_0x445df7){_0xaa25ed['push'](_0xaa25ed['shift']());}}}(a108_0x471a,0xe1165));import a108_0x4d75d7 from'path';import a108_0x43cf3e from'fs/promises';import{existsSync}from'fs';function a108_0x471a(){const _0x255637=['env','string','4251328ncCWmD','4797450qkabhv','ignore','94050VEnmPh','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','53804YyjxEy','bun','Cannot\x20create\x20project\x20in\x20current\x20directory.','\x20\x20√\x20package.json\x20updated','1603917bSrMyk','\x20model(s)','Project\x20name\x20cannot\x20be\x20empty.','writeFile','log','5987224QfbTfZ','npm','W_OK','resolve','bun\x20--version','readFile','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','\x20api\x20pull`\x20manually\x20later.','Use\x20a\x20different\x20project\x20name.','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','Project\x20name\x20contains\x20invalid\x20characters.','\x20\x20√\x20Configuration\x20file\x20created','cwd','production','name','needsUpgrade','length','\x20\x20rabetbase\x20run\x20start\x0a','trim','*\x20Creating\x20project\x20','description','8309510qswyIV','Project\x20directory\x20\x22','\x20\x20√\x20Pulled\x20','\x22\x20already\x20exists.','utf-8','\x20dataset(s),\x20generated\x20','\x20\x20Installing\x20dependencies...','\x0a\x20\x20cd\x20','stringify','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','parse','Check\x20directory\x20permissions.','validation','modelCount','chdir','dirname','...','198BeSNxH','join','access'];a108_0x471a=function(){return _0x255637;};return a108_0x471a();}import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';function a108_0x1f84(_0x5f33bd,_0x452e49){_0x5f33bd=_0x5f33bd-0x151;const _0x471a54=a108_0x471a();let _0x1f847a=_0x471a54[_0x5f33bd];return _0x1f847a;}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(_0x5d3a06,_0x187c73,_0x403755,_0x10399a){const _0xcc28a9=a108_0x1f84,_0x526dac=await checkCliVersion();(_0x526dac[_0xcc28a9(0x189)]||_0x526dac['belowMinimum'])&&(printCliUpgradeWarning(_0x526dac),assertCliVersionSupported(_0x526dac));if(!_0x5d3a06||_0x5d3a06[_0xcc28a9(0x152)]()==='')throw CliErrors[_0xcc28a9(0x161)](_0xcc28a9(0x177));const _0x56f826=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x56f826['test'](_0x5d3a06))throw CliErrors['validation'](_0xcc28a9(0x184),_0xcc28a9(0x170));if(_0x5d3a06[_0xcc28a9(0x18a)]>0x64)throw CliErrors['validation'](_0xcc28a9(0x16f));const _0x256981=a108_0x4d75d7[_0xcc28a9(0x17d)](process[_0xcc28a9(0x186)](),_0x5d3a06);if(existsSync(_0x256981))throw CliErrors[_0xcc28a9(0x161)](_0xcc28a9(0x156)+_0x5d3a06+_0xcc28a9(0x158),_0xcc28a9(0x182));try{const _0x128139=a108_0x4d75d7[_0xcc28a9(0x164)](_0x256981);await a108_0x43cf3e[_0xcc28a9(0x168)](_0x128139,a108_0x43cf3e['constants'][_0xcc28a9(0x17c)]);}catch{throw CliErrors[_0xcc28a9(0x161)](_0xcc28a9(0x173),_0xcc28a9(0x160));}try{console[_0xcc28a9(0x179)](_0xcc28a9(0x153)+_0x5d3a06+_0xcc28a9(0x165));const _0x595231=getSubAppReactDemoTemplateDir();await copyDirectory(_0x595231,_0x256981),console[_0xcc28a9(0x179)]('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x5d3a06),console[_0xcc28a9(0x179)](_0xcc28a9(0x174)),console[_0xcc28a9(0x179)](_0xcc28a9(0x15b)),console[_0xcc28a9(0x179)](_0xcc28a9(0x15e)),await formatCode(_0x256981),console[_0xcc28a9(0x179)]('\x20\x20√\x20Code\x20formatted'),await configureProject(_0x5d3a06,_0x403755,_0x187c73),console[_0xcc28a9(0x179)](_0xcc28a9(0x185)),_0x403755&&await pullApiConfig(_0x256981,_0x403755,_0x187c73,_0x10399a),console[_0xcc28a9(0x179)]('\x0a√\x20Project\x20'+_0x5d3a06+'\x20created\x20successfully!'),console[_0xcc28a9(0x179)](_0xcc28a9(0x15c)+_0x5d3a06),console[_0xcc28a9(0x179)](_0xcc28a9(0x151));}catch(_0x235ef7){try{existsSync(_0x256981)&&await a108_0x43cf3e['rm'](_0x256981,{'recursive':!![],'force':!![]});}catch{}throw _0x235ef7;}}async function updatePackageJsonName(_0xd1b181){const _0x33da81=a108_0x1f84,_0x4128fe=a108_0x4d75d7[_0x33da81(0x17d)](process[_0x33da81(0x186)](),_0xd1b181),_0x26d067=a108_0x4d75d7[_0x33da81(0x167)](_0x4128fe,'package.json'),_0x812a04=await a108_0x43cf3e[_0x33da81(0x17f)](_0x26d067,_0x33da81(0x159)),_0x16dc16=JSON[_0x33da81(0x15f)](_0x812a04);_0x16dc16[_0x33da81(0x188)]=_0xd1b181,_0x16dc16[_0x33da81(0x154)]=_0x33da81(0x180),await a108_0x43cf3e[_0x33da81(0x178)](_0x26d067,JSON[_0x33da81(0x15d)](_0x16dc16,null,0x2)+'\x0a');}function detectPackageManager(){const _0x142e63=a108_0x1f84;try{return execSync(_0x142e63(0x17e),{'stdio':_0x142e63(0x16d)}),_0x142e63(0x172);}catch{return _0x142e63(0x17b);}}async function formatCode(_0x1e9968){try{await execAsync('bun\x20run\x20format',{'cwd':_0x1e9968});}catch{}}async function configureProject(_0x57ca7f,_0x5bcc48,_0x1394f7){const _0x3e046d=a108_0x1f84,_0x255615=a108_0x4d75d7[_0x3e046d(0x17d)](process['cwd'](),_0x57ca7f),_0x4cb04e=a108_0x4d75d7[_0x3e046d(0x167)](_0x255615,NEW_CONFIG_NAME),_0x2b8a33=readConfig(),_0x3ba49f=typeof _0x2b8a33['env']===_0x3e046d(0x16a)?_0x2b8a33[_0x3e046d(0x169)]:undefined,_0x2ebbee={};for(const _0x51a285 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x2b8a33[_0x51a285]!=null)_0x2ebbee[_0x51a285]=_0x2b8a33[_0x51a285];}const _0x54062a=buildCanonicalProjectConfig(_0x2ebbee,{'appCodes':_0x5bcc48?[_0x5bcc48]:[],'env':_0x1394f7||_0x3ba49f||_0x3e046d(0x187),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':getCliVersion()}});writeConfigFile(_0x4cb04e,_0x54062a);}async function pullApiConfig(_0x1b7b32,_0x10485e,_0x56d75c,_0x41235d){const _0x5c9e95=a108_0x1f84,_0x30db93=process['cwd']();try{process[_0x5c9e95(0x163)](_0x1b7b32);const _0x576906=_0x56d75c||_0x5c9e95(0x187);initEnv(_0x576906),console['log']('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x417dd9}=await fetchModelList(_0x10485e,_0x41235d||''),_0x596b40=await generateApiFile(_0x417dd9,'',_0x10485e,!![],_0x576906,DEFAULT_API_DIR);console[_0x5c9e95(0x179)](_0x5c9e95(0x157)+_0x417dd9[_0x5c9e95(0x18a)]+_0x5c9e95(0x15a)+_0x596b40[_0x5c9e95(0x162)]+_0x5c9e95(0x176));}catch(_0x20e410){console[_0x5c9e95(0x179)](_0x5c9e95(0x183)+CLI_BIN_NAME+_0x5c9e95(0x181));}finally{process['chdir'](_0x30db93);}}
1
+ (function(_0x32f37b,_0x168b7f){const _0x54ea1d=a109_0x57df,_0x5dec2d=_0x32f37b();while(!![]){try{const _0xf43aa=-parseInt(_0x54ea1d(0x161))/0x1*(parseInt(_0x54ea1d(0x14f))/0x2)+parseInt(_0x54ea1d(0x13e))/0x3*(parseInt(_0x54ea1d(0x131))/0x4)+parseInt(_0x54ea1d(0x150))/0x5*(parseInt(_0x54ea1d(0x132))/0x6)+-parseInt(_0x54ea1d(0x126))/0x7*(parseInt(_0x54ea1d(0x153))/0x8)+parseInt(_0x54ea1d(0x12b))/0x9*(parseInt(_0x54ea1d(0x140))/0xa)+-parseInt(_0x54ea1d(0x143))/0xb*(-parseInt(_0x54ea1d(0x135))/0xc)+parseInt(_0x54ea1d(0x151))/0xd*(-parseInt(_0x54ea1d(0x129))/0xe);if(_0xf43aa===_0x168b7f)break;else _0x5dec2d['push'](_0x5dec2d['shift']());}catch(_0x539dc8){_0x5dec2d['push'](_0x5dec2d['shift']());}}}(a109_0x320f,0xd2028));import a109_0x4de4f4 from'path';import a109_0x3fabd4 from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';function a109_0x320f(){const _0x23874f=['\x20created\x20successfully!','bun\x20--version','...','1961UbWkMo','resolve','log','\x0a√\x20Project\x20','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','\x20\x20√\x20package.json\x20updated','35861AfKrFC','*\x20Creating\x20project\x20','Project\x20name\x20cannot\x20be\x20empty.','1574972xFUBqZ','\x20api\x20pull`\x20manually\x20later.','2889IsPwuR','npm','\x20\x20Pulling\x20API\x20configuration...','constants','access','modelCount','63652QjeTTK','6842076wzdRte','chdir','Project\x20directory\x20\x22','2569416PxLvTV','bun\x20run\x20format','utf-8','dirname','package.json','writeFile','bun','test','\x22\x20already\x20exists.','42zkWbiH','description','27190mNWUCF','cwd','\x20\x20√\x20Pulled\x20','88wvmgaJ','name','\x20\x20rabetbase\x20run\x20start\x0a','needsUpgrade','toLocaleString','parse','stringify','Use\x20a\x20different\x20project\x20name.','validation','Project\x20name\x20contains\x20invalid\x20characters.','production','env','386dWAJLD','5FUfoWa','312ujlWPH','length','16aKLJgl','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','W_OK','\x20dataset(s),\x20generated\x20','\x20\x20√\x20Project\x20template\x20created','trim','Check\x20directory\x20permissions.','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','Cannot\x20create\x20project\x20in\x20current\x20directory.','\x20\x20√\x20Code\x20formatted'];a109_0x320f=function(){return _0x23874f;};return a109_0x320f();}import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';function a109_0x57df(_0x1984a3,_0x2b7364){_0x1984a3=_0x1984a3-0x126;const _0x320f5a=a109_0x320f();let _0x57df8d=_0x320f5a[_0x1984a3];return _0x57df8d;}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(_0x1b5194,_0x1937cb,_0x3c0c0e,_0x3b1661){const _0x4fee2a=a109_0x57df,_0x2a168b=await checkCliVersion();(_0x2a168b[_0x4fee2a(0x146)]||_0x2a168b['belowMinimum'])&&(printCliUpgradeWarning(_0x2a168b),assertCliVersionSupported(_0x2a168b));if(!_0x1b5194||_0x1b5194[_0x4fee2a(0x159)]()==='')throw CliErrors[_0x4fee2a(0x14b)](_0x4fee2a(0x128));const _0x5e5d2c=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x5e5d2c[_0x4fee2a(0x13c)](_0x1b5194))throw CliErrors[_0x4fee2a(0x14b)](_0x4fee2a(0x14c),_0x4fee2a(0x15b));if(_0x1b5194['length']>0x64)throw CliErrors[_0x4fee2a(0x14b)](_0x4fee2a(0x165));const _0x2731b7=a109_0x4de4f4[_0x4fee2a(0x162)](process['cwd'](),_0x1b5194);if(existsSync(_0x2731b7))throw CliErrors[_0x4fee2a(0x14b)](_0x4fee2a(0x134)+_0x1b5194+_0x4fee2a(0x13d),_0x4fee2a(0x14a));try{const _0x1a5f3b=a109_0x4de4f4[_0x4fee2a(0x138)](_0x2731b7);await a109_0x3fabd4[_0x4fee2a(0x12f)](_0x1a5f3b,a109_0x3fabd4[_0x4fee2a(0x12e)][_0x4fee2a(0x156)]);}catch{throw CliErrors[_0x4fee2a(0x14b)](_0x4fee2a(0x15c),_0x4fee2a(0x15a));}try{console[_0x4fee2a(0x163)](_0x4fee2a(0x127)+_0x1b5194+_0x4fee2a(0x160));const _0x366d1a=getSubAppReactDemoTemplateDir();await copyDirectory(_0x366d1a,_0x2731b7),console[_0x4fee2a(0x163)](_0x4fee2a(0x158)),await updatePackageJsonName(_0x1b5194),console['log'](_0x4fee2a(0x166)),console[_0x4fee2a(0x163)]('\x20\x20Installing\x20dependencies...'),console[_0x4fee2a(0x163)](_0x4fee2a(0x154)),await formatCode(_0x2731b7),console[_0x4fee2a(0x163)](_0x4fee2a(0x15d)),await configureProject(_0x1b5194,_0x3c0c0e,_0x1937cb),console[_0x4fee2a(0x163)]('\x20\x20√\x20Configuration\x20file\x20created'),_0x3c0c0e&&await pullApiConfig(_0x2731b7,_0x3c0c0e,_0x1937cb,_0x3b1661),console[_0x4fee2a(0x163)](_0x4fee2a(0x164)+_0x1b5194+_0x4fee2a(0x15e)),console[_0x4fee2a(0x163)]('\x0a\x20\x20cd\x20'+_0x1b5194),console[_0x4fee2a(0x163)](_0x4fee2a(0x145));}catch(_0x19d637){try{existsSync(_0x2731b7)&&await a109_0x3fabd4['rm'](_0x2731b7,{'recursive':!![],'force':!![]});}catch{}throw _0x19d637;}}async function updatePackageJsonName(_0x2aad21){const _0x503ae7=a109_0x57df,_0x45a6da=a109_0x4de4f4[_0x503ae7(0x162)](process[_0x503ae7(0x141)](),_0x2aad21),_0x7117f6=a109_0x4de4f4['join'](_0x45a6da,_0x503ae7(0x139)),_0x76320d=await a109_0x3fabd4['readFile'](_0x7117f6,_0x503ae7(0x137)),_0x567864=JSON[_0x503ae7(0x148)](_0x76320d);_0x567864[_0x503ae7(0x144)]=_0x2aad21,_0x567864[_0x503ae7(0x13f)]='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a109_0x3fabd4[_0x503ae7(0x13a)](_0x7117f6,JSON[_0x503ae7(0x149)](_0x567864,null,0x2)+'\x0a');}function detectPackageManager(){const _0x334b3a=a109_0x57df;try{return execSync(_0x334b3a(0x15f),{'stdio':'ignore'}),_0x334b3a(0x13b);}catch{return _0x334b3a(0x12c);}}async function formatCode(_0x4be765){const _0xb55a3c=a109_0x57df;try{await execAsync(_0xb55a3c(0x136),{'cwd':_0x4be765});}catch{}}async function configureProject(_0x4bd56d,_0x4179b3,_0x1c1a09){const _0x23fb71=a109_0x57df,_0x31e0da=a109_0x4de4f4['resolve'](process[_0x23fb71(0x141)](),_0x4bd56d),_0x9dd33=a109_0x4de4f4['join'](_0x31e0da,NEW_CONFIG_NAME),_0x487250=readConfig(),_0x31815c=typeof _0x487250[_0x23fb71(0x14e)]==='string'?_0x487250['env']:undefined,_0xa7cc23={};for(const _0x236b3b of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x487250[_0x236b3b]!=null)_0xa7cc23[_0x236b3b]=_0x487250[_0x236b3b];}const _0x38f9ec=buildCanonicalProjectConfig(_0xa7cc23,{'appCodes':_0x4179b3?[_0x4179b3]:[],'env':_0x1c1a09||_0x31815c||_0x23fb71(0x14d),'metadata':{'createdAt':new Date()[_0x23fb71(0x147)](),'version':getCliVersion()}});writeConfigFile(_0x9dd33,_0x38f9ec);}async function pullApiConfig(_0x2089f4,_0x4e6bcc,_0x2e5d84,_0x10e18b){const _0x4587ba=a109_0x57df,_0x49d160=process[_0x4587ba(0x141)]();try{process[_0x4587ba(0x133)](_0x2089f4);const _0x1016ac=_0x2e5d84||_0x4587ba(0x14d);initEnv(_0x1016ac),console[_0x4587ba(0x163)](_0x4587ba(0x12d));const {configArray:_0x3b9948}=await fetchModelList(_0x4e6bcc,_0x10e18b||''),_0x18791e=await generateApiFile(_0x3b9948,'',_0x4e6bcc,!![],_0x1016ac,DEFAULT_API_DIR);console[_0x4587ba(0x163)](_0x4587ba(0x142)+_0x3b9948[_0x4587ba(0x152)]+_0x4587ba(0x157)+_0x18791e[_0x4587ba(0x130)]+'\x20model(s)');}catch(_0x5724e4){console[_0x4587ba(0x163)](_0x4587ba(0x155)+CLI_BIN_NAME+_0x4587ba(0x12a));}finally{process[_0x4587ba(0x133)](_0x49d160);}}
@@ -1 +1 @@
1
- const a109_0x1b9af2=a109_0x5c48;(function(_0x1d9496,_0x3f1169){const _0x3d0ea4=a109_0x5c48,_0x1bf8b0=_0x1d9496();while(!![]){try{const _0x540636=parseInt(_0x3d0ea4(0xfb))/0x1*(parseInt(_0x3d0ea4(0x107))/0x2)+-parseInt(_0x3d0ea4(0x108))/0x3*(parseInt(_0x3d0ea4(0xff))/0x4)+-parseInt(_0x3d0ea4(0x102))/0x5*(parseInt(_0x3d0ea4(0x106))/0x6)+parseInt(_0x3d0ea4(0x109))/0x7+-parseInt(_0x3d0ea4(0x10a))/0x8+-parseInt(_0x3d0ea4(0x103))/0x9+-parseInt(_0x3d0ea4(0x104))/0xa*(-parseInt(_0x3d0ea4(0x100))/0xb);if(_0x540636===_0x3f1169)break;else _0x1bf8b0['push'](_0x1bf8b0['shift']());}catch(_0x198c08){_0x1bf8b0['push'](_0x1bf8b0['shift']());}}}(a109_0x3784,0x53ab5));import a109_0x53d216 from'node:path';import{fileURLToPath}from'node:url';function a109_0x3784(){const _0x5136a2=['sub-app-react-demo','979248ScWvzM','1032894KFWgta','106104xhaWoK','4066979VTEKpG','225832sspoXH','projects','templates','1qgantH','../../../../','resolve','join','76ENyvNp','99nAdcXA','dirname','20PDmfQk','281412GUyFuo','699540iRAWPo'];a109_0x3784=function(){return _0x5136a2;};return a109_0x3784();}const __dirname=a109_0x53d216[a109_0x1b9af2(0x101)](fileURLToPath(import.meta.url));function a109_0x5c48(_0x45c545,_0x235150){_0x45c545=_0x45c545-0xf9;const _0x37849e=a109_0x3784();let _0x5c48bc=_0x37849e[_0x45c545];return _0x5c48bc;}export function getRabetbaseCliPackageRoot(){const _0x2462c5=a109_0x1b9af2;return a109_0x53d216[_0x2462c5(0xfd)](__dirname,_0x2462c5(0xfc));}export function getSubAppReactDemoTemplateDir(){const _0x25ad65=a109_0x1b9af2;return a109_0x53d216[_0x25ad65(0xfe)](getRabetbaseCliPackageRoot(),_0x25ad65(0xfa),_0x25ad65(0xf9),_0x25ad65(0x105));}
1
+ (function(_0x4f0827,_0x5a0a05){const _0x14e925=a110_0x1596,_0xe51871=_0x4f0827();while(!![]){try{const _0x1d2fca=parseInt(_0x14e925(0xbe))/0x1+-parseInt(_0x14e925(0xbc))/0x2+parseInt(_0x14e925(0xc0))/0x3*(parseInt(_0x14e925(0xc4))/0x4)+-parseInt(_0x14e925(0xc6))/0x5+-parseInt(_0x14e925(0xc2))/0x6+-parseInt(_0x14e925(0xc1))/0x7*(-parseInt(_0x14e925(0xc7))/0x8)+parseInt(_0x14e925(0xc5))/0x9;if(_0x1d2fca===_0x5a0a05)break;else _0xe51871['push'](_0xe51871['shift']());}catch(_0x317b5b){_0xe51871['push'](_0xe51871['shift']());}}}(a110_0x4c48,0x5b943));function a110_0x1596(_0x486cd0,_0x5978d0){_0x486cd0=_0x486cd0-0xbc;const _0x4c48ca=a110_0x4c48();let _0x159692=_0x4c48ca[_0x486cd0];return _0x159692;}function a110_0x4c48(){const _0x2bc911=['237408CDsdJf','resolve','405858YnNycL','sub-app-react-demo','428133aqLZBF','7ZTYziA','3675300KLZdqP','join','4yYdSZW','7769655mLxjVm','2954945TmmRsv','2283888wNLanK'];a110_0x4c48=function(){return _0x2bc911;};return a110_0x4c48();}import a110_0x5078b1 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a110_0x5078b1['dirname'](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x11e1ba=a110_0x1596;return a110_0x5078b1[_0x11e1ba(0xbd)](__dirname,'../../../../');}export function getSubAppReactDemoTemplateDir(){const _0x4d8ebd=a110_0x1596;return a110_0x5078b1[_0x4d8ebd(0xc3)](getRabetbaseCliPackageRoot(),'templates','projects',_0x4d8ebd(0xbf));}
@@ -1 +1 @@
1
- (function(_0x3850a0,_0xf1bc79){const _0x450912=a110_0x4f23,_0x4a8696=_0x3850a0();while(!![]){try{const _0x4963f1=-parseInt(_0x450912(0xdf))/0x1*(-parseInt(_0x450912(0xef))/0x2)+parseInt(_0x450912(0xe0))/0x3*(parseInt(_0x450912(0xe9))/0x4)+parseInt(_0x450912(0xe6))/0x5+-parseInt(_0x450912(0xe5))/0x6+parseInt(_0x450912(0xe7))/0x7*(-parseInt(_0x450912(0xe4))/0x8)+-parseInt(_0x450912(0xe3))/0x9+parseInt(_0x450912(0xee))/0xa;if(_0x4963f1===_0xf1bc79)break;else _0x4a8696['push'](_0x4a8696['shift']());}catch(_0x49dc94){_0x4a8696['push'](_0x4a8696['shift']());}}}(a110_0x420a,0x4879a));function a110_0x420a(){const _0x74cd9b=['resolve','message','now','9966050bnPCGJ','566HKwMMm','info','开始复制项目模板','41tuVzzd','3IniHzo','cwd','copy','4758309CChVCy','40enZLXw','3390390jgkOLH','949835FTCJIT','513625ezBXwY','success','2237296wHEZNZ','error'];a110_0x420a=function(){return _0x74cd9b;};return a110_0x420a();}import a110_0x234ad1 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 a110_0x4f23(_0x498676,_0x2164f1){_0x498676=_0x498676-0xdf;const _0x420a23=a110_0x420a();let _0x4f2347=_0x420a23[_0x498676];return _0x4f2347;}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x2b0000){const _0x578c58=a110_0x4f23,_0x2eebb9=Date[_0x578c58(0xed)](),_0x401509=a110_0x234ad1[_0x578c58(0xeb)](process[_0x578c58(0xe1)](),_0x2b0000);try{logger[_0x578c58(0xf0)](_0x578c58(0xe2),_0x578c58(0xf1),{'projectCode':_0x2b0000,'templateDir':templateDir}),await copyDirectory(templateDir,_0x401509);const _0x1e45a0=Date[_0x578c58(0xed)]()-_0x2eebb9;logger[_0x578c58(0xe8)](_0x578c58(0xe2),'项目模板复制完成',_0x1e45a0,{'projectCode':_0x2b0000});}catch(_0x2102ef){const _0x3783fd=Date['now']()-_0x2eebb9;logger[_0x578c58(0xea)](_0x578c58(0xe2),'项目模板复制失败',{'projectCode':_0x2b0000,'error':_0x2102ef instanceof Error?_0x2102ef[_0x578c58(0xec)]:String(_0x2102ef),'duration':_0x3783fd});throw _0x2102ef;}return formatElapsed(_0x2eebb9);}
1
+ (function(_0x4d25d4,_0x4f518f){const _0x29526b=a111_0x1fa0,_0x5a4c1d=_0x4d25d4();while(!![]){try{const _0x4212df=parseInt(_0x29526b(0xd5))/0x1+parseInt(_0x29526b(0xd4))/0x2+-parseInt(_0x29526b(0xd2))/0x3+-parseInt(_0x29526b(0xcd))/0x4*(parseInt(_0x29526b(0xdc))/0x5)+-parseInt(_0x29526b(0xd8))/0x6*(-parseInt(_0x29526b(0xd3))/0x7)+parseInt(_0x29526b(0xd6))/0x8*(parseInt(_0x29526b(0xd0))/0x9)+-parseInt(_0x29526b(0xd9))/0xa*(parseInt(_0x29526b(0xda))/0xb);if(_0x4212df===_0x4f518f)break;else _0x5a4c1d['push'](_0x5a4c1d['shift']());}catch(_0x2ecc20){_0x5a4c1d['push'](_0x5a4c1d['shift']());}}}(a111_0x3405,0x1bfb7));import a111_0x2c06f4 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();function a111_0x1fa0(_0x2df055,_0x581d03){_0x2df055=_0x2df055-0xcd;const _0x3405b5=a111_0x3405();let _0x1fa094=_0x3405b5[_0x2df055];return _0x1fa094;}export async function copyProjectTemplate(_0x523213){const _0x460d0b=a111_0x1fa0,_0x566205=Date[_0x460d0b(0xe0)](),_0x53a513=a111_0x2c06f4[_0x460d0b(0xd1)](process[_0x460d0b(0xde)](),_0x523213);try{logger[_0x460d0b(0xce)](_0x460d0b(0xd7),_0x460d0b(0xcf),{'projectCode':_0x523213,'templateDir':templateDir}),await copyDirectory(templateDir,_0x53a513);const _0x589ec4=Date[_0x460d0b(0xe0)]()-_0x566205;logger['success']('copy','项目模板复制完成',_0x589ec4,{'projectCode':_0x523213});}catch(_0x479dd8){const _0x3d9efe=Date[_0x460d0b(0xe0)]()-_0x566205;logger[_0x460d0b(0xdb)](_0x460d0b(0xd7),_0x460d0b(0xdf),{'projectCode':_0x523213,'error':_0x479dd8 instanceof Error?_0x479dd8[_0x460d0b(0xdd)]:String(_0x479dd8),'duration':_0x3d9efe});throw _0x479dd8;}return formatElapsed(_0x566205);}function a111_0x3405(){const _0x3b91cc=['copy','12iMCUZP','40HbjQlt','119383nFZVeW','error','420860Epbwqv','message','cwd','项目模板复制失败','now','8TybwCT','info','开始复制项目模板','180yLfWea','resolve','79209syDlxF','67424wWxmjB','199760avvhGk','84450YbeaBK','59672kEFjBR'];a111_0x3405=function(){return _0x3b91cc;};return a111_0x3405();}
@@ -1 +1 @@
1
- (function(_0x5a5c2b,_0x4efc62){const _0xf3372b=a111_0x2709,_0x36db02=_0x5a5c2b();while(!![]){try{const _0x4b445f=-parseInt(_0xf3372b(0x19e))/0x1+-parseInt(_0xf3372b(0x19c))/0x2+-parseInt(_0xf3372b(0x195))/0x3*(parseInt(_0xf3372b(0x198))/0x4)+-parseInt(_0xf3372b(0x197))/0x5+-parseInt(_0xf3372b(0x193))/0x6*(-parseInt(_0xf3372b(0x1a3))/0x7)+parseInt(_0xf3372b(0x1a2))/0x8+parseInt(_0xf3372b(0x190))/0x9;if(_0x4b445f===_0x4efc62)break;else _0x36db02['push'](_0x36db02['shift']());}catch(_0x4e9b25){_0x36db02['push'](_0x36db02['shift']());}}}(a111_0x2108,0xbf2a8));import a111_0x46adf0 from'node:path';import{execa}from'execa';function a111_0x2709(_0x131725,_0x1726a2){_0x131725=_0x131725-0x190;const _0x2108e3=a111_0x2108();let _0x270941=_0x2108e3[_0x131725];return _0x270941;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';function a111_0x2108(){const _0x232019=['format','代码格式化失败','1334468olTXmD','now','1237204bUfSMn','info','npx','resolve','10466912xKhjvo','14ChIJXu','34882002DVexey','--write','代码格式化完成','131574jJcVmk','success','9buqZdB','开始格式化代码','6413635HjdHlH','1677092ziGQHK','cwd'];a111_0x2108=function(){return _0x232019;};return a111_0x2108();}export async function formatProjectCode(_0x26ec9f){const _0x328005=a111_0x2709,_0x267b8e=Date[_0x328005(0x19d)](),_0x2e87ce=a111_0x46adf0[_0x328005(0x1a1)](process[_0x328005(0x199)](),_0x26ec9f);try{logger[_0x328005(0x19f)]('format',_0x328005(0x196),{'projectCode':_0x26ec9f}),await execa(resolveNpmBin(_0x328005(0x1a0)),['prettier',_0x328005(0x191),'.'],{'cwd':_0x2e87ce});const _0x5c6a18=Date[_0x328005(0x19d)]()-_0x267b8e;logger[_0x328005(0x194)](_0x328005(0x19a),_0x328005(0x192),_0x5c6a18,{'projectCode':_0x26ec9f});}catch(_0x1c4573){const _0x124ea5=Date['now']()-_0x267b8e;logger['error'](_0x328005(0x19a),_0x328005(0x19b),{'projectCode':_0x26ec9f,'error':_0x1c4573 instanceof Error?_0x1c4573['message']:String(_0x1c4573),'duration':_0x124ea5});throw _0x1c4573;}return formatElapsed(_0x267b8e);}
1
+ (function(_0x284568,_0x2eb5f9){const _0x469cea=a112_0x4f59,_0x128930=_0x284568();while(!![]){try{const _0x1973a2=-parseInt(_0x469cea(0x132))/0x1*(parseInt(_0x469cea(0x137))/0x2)+parseInt(_0x469cea(0x138))/0x3*(-parseInt(_0x469cea(0x123))/0x4)+-parseInt(_0x469cea(0x125))/0x5+-parseInt(_0x469cea(0x139))/0x6*(-parseInt(_0x469cea(0x135))/0x7)+parseInt(_0x469cea(0x12f))/0x8+-parseInt(_0x469cea(0x12b))/0x9*(-parseInt(_0x469cea(0x128))/0xa)+parseInt(_0x469cea(0x12e))/0xb*(parseInt(_0x469cea(0x130))/0xc);if(_0x1973a2===_0x2eb5f9)break;else _0x128930['push'](_0x128930['shift']());}catch(_0x4978a8){_0x128930['push'](_0x128930['shift']());}}}(a112_0x3433,0x91092));function a112_0x4f59(_0x28f40c,_0x1e7912){_0x28f40c=_0x28f40c-0x123;const _0x3433a7=a112_0x3433();let _0x4f59a0=_0x3433a7[_0x28f40c];return _0x4f59a0;}import a112_0x5e3ad6 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a112_0x3433(){const _0x569145=['7173UpbZIQ','info','resolve','2272523GeVIPB','7188448RSeNAt','120Avkrqp','format','43KoJPok','npx','代码格式化失败','74011GOOQHm','cwd','35908SqLXLC','201702gKgkpD','66GNALDo','prettier','代码格式化完成','64lDSwNz','now','5414430BdBSvF','开始格式化代码','--write','5570YHewli','message','error'];a112_0x3433=function(){return _0x569145;};return a112_0x3433();}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x2d82c5){const _0xdf66e0=a112_0x4f59,_0x26e783=Date[_0xdf66e0(0x124)](),_0x4d9103=a112_0x5e3ad6[_0xdf66e0(0x12d)](process[_0xdf66e0(0x136)](),_0x2d82c5);try{logger[_0xdf66e0(0x12c)]('format',_0xdf66e0(0x126),{'projectCode':_0x2d82c5}),await execa(resolveNpmBin(_0xdf66e0(0x133)),[_0xdf66e0(0x13a),_0xdf66e0(0x127),'.'],{'cwd':_0x4d9103});const _0x50417d=Date[_0xdf66e0(0x124)]()-_0x26e783;logger['success'](_0xdf66e0(0x131),_0xdf66e0(0x13b),_0x50417d,{'projectCode':_0x2d82c5});}catch(_0x2d281b){const _0x2a0e84=Date['now']()-_0x26e783;logger[_0xdf66e0(0x12a)](_0xdf66e0(0x131),_0xdf66e0(0x134),{'projectCode':_0x2d82c5,'error':_0x2d281b instanceof Error?_0x2d281b[_0xdf66e0(0x129)]:String(_0x2d281b),'duration':_0x2a0e84});throw _0x2d281b;}return formatElapsed(_0x26e783);}
@@ -1 +1 @@
1
- (function(_0x4ce174,_0x2b0e66){const _0x52c9c5=a112_0x50e3,_0x2edc69=_0x4ce174();while(!![]){try{const _0x31ec45=parseInt(_0x52c9c5(0x1d0))/0x1*(parseInt(_0x52c9c5(0x1c3))/0x2)+parseInt(_0x52c9c5(0x1bb))/0x3*(-parseInt(_0x52c9c5(0x1c8))/0x4)+parseInt(_0x52c9c5(0x1c5))/0x5*(parseInt(_0x52c9c5(0x1ba))/0x6)+parseInt(_0x52c9c5(0x1c7))/0x7*(parseInt(_0x52c9c5(0x1cd))/0x8)+parseInt(_0x52c9c5(0x1c9))/0x9*(-parseInt(_0x52c9c5(0x1bf))/0xa)+parseInt(_0x52c9c5(0x1c6))/0xb*(-parseInt(_0x52c9c5(0x1ce))/0xc)+-parseInt(_0x52c9c5(0x1cf))/0xd*(-parseInt(_0x52c9c5(0x1d1))/0xe);if(_0x31ec45===_0x2b0e66)break;else _0x2edc69['push'](_0x2edc69['shift']());}catch(_0x2a8d49){_0x2edc69['push'](_0x2edc69['shift']());}}}(a112_0x4128,0xed123));import a112_0x451148 from'node:path';import{execa}from'execa';function a112_0x50e3(_0x1747a3,_0x1ae0be){_0x1747a3=_0x1747a3-0x1b8;const _0x412834=a112_0x4128();let _0x50e319=_0x412834[_0x1747a3];return _0x50e319;}function a112_0x4128(){const _0x5f07af=['61950gEpiYr','82254wRytmS','cwd','https://registry.npmmirror.com','开始安装依赖','130BmVzka','resolve','now','依赖安装完成','2pYmHdr','--registry','385JnbwPT','154EjqDEP','26831LQSqOw','8eeNQOA','605979ADOiTH','依赖安装失败','install','npm','3952KpZZoM','1348692NfyQVi','65ZOJUuj','350464vsuhPg','1219862ugLemr','success','error'];a112_0x4128=function(){return _0x5f07af;};return a112_0x4128();}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(_0x576f7d){const _0x525484=a112_0x50e3,_0x2ebbff=Date[_0x525484(0x1c1)](),_0x17901a=a112_0x451148[_0x525484(0x1c0)](process[_0x525484(0x1bc)](),_0x576f7d);try{logger['info']('install',_0x525484(0x1be),{'projectCode':_0x576f7d,'registry':_0x525484(0x1bd)}),await execa(resolveNpmBin(_0x525484(0x1cc)),[_0x525484(0x1cb),_0x525484(0x1c4),_0x525484(0x1bd)],{'cwd':_0x17901a});const _0x4ca820=Date['now']()-_0x2ebbff;logger[_0x525484(0x1b8)](_0x525484(0x1cb),_0x525484(0x1c2),_0x4ca820,{'projectCode':_0x576f7d});}catch(_0x5dac03){const _0xa867ae=Date[_0x525484(0x1c1)]()-_0x2ebbff;logger[_0x525484(0x1b9)]('install',_0x525484(0x1ca),{'projectCode':_0x576f7d,'error':_0x5dac03 instanceof Error?_0x5dac03['message']:String(_0x5dac03),'duration':_0xa867ae});throw _0x5dac03;}return formatElapsed(_0x2ebbff);}
1
+ (function(_0x439ef5,_0x164e53){const _0xbc7b14=a113_0x37c7,_0x2b1e9f=_0x439ef5();while(!![]){try{const _0x34595e=-parseInt(_0xbc7b14(0x173))/0x1*(parseInt(_0xbc7b14(0x170))/0x2)+parseInt(_0xbc7b14(0x16f))/0x3+parseInt(_0xbc7b14(0x162))/0x4+parseInt(_0xbc7b14(0x16d))/0x5*(parseInt(_0xbc7b14(0x171))/0x6)+-parseInt(_0xbc7b14(0x167))/0x7*(parseInt(_0xbc7b14(0x163))/0x8)+parseInt(_0xbc7b14(0x175))/0x9*(-parseInt(_0xbc7b14(0x172))/0xa)+parseInt(_0xbc7b14(0x160))/0xb*(parseInt(_0xbc7b14(0x169))/0xc);if(_0x34595e===_0x164e53)break;else _0x2b1e9f['push'](_0x2b1e9f['shift']());}catch(_0x14a36d){_0x2b1e9f['push'](_0x2b1e9f['shift']());}}}(a113_0x190c,0xeb8a4));import a113_0x473f50 from'node:path';import{execa}from'execa';function a113_0x190c(){const _0x21ad7f=['开始安装依赖','success','1215255HgEsbN','依赖安装完成','325032UFVNnf','627810TgXFij','36vIbhmh','30GQDvkI','1IZfYqu','error','5137533ciLKeN','3640153HKXgFi','resolve','4812460pAoUKU','58400rFtjBq','now','https://registry.npmmirror.com','install','105saeRBI','依赖安装失败','12CmNvUm','message'];a113_0x190c=function(){return _0x21ad7f;};return a113_0x190c();}function a113_0x37c7(_0x1cdb1a,_0x4fd7c4){_0x1cdb1a=_0x1cdb1a-0x160;const _0x190cdd=a113_0x190c();let _0x37c75d=_0x190cdd[_0x1cdb1a];return _0x37c75d;}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(_0x4dbd73){const _0x3c9258=a113_0x37c7,_0xc7b645=Date[_0x3c9258(0x164)](),_0xed73ee=a113_0x473f50[_0x3c9258(0x161)](process['cwd'](),_0x4dbd73);try{logger['info'](_0x3c9258(0x166),_0x3c9258(0x16b),{'projectCode':_0x4dbd73,'registry':_0x3c9258(0x165)}),await execa(resolveNpmBin('npm'),['install','--registry',_0x3c9258(0x165)],{'cwd':_0xed73ee});const _0x17303f=Date[_0x3c9258(0x164)]()-_0xc7b645;logger[_0x3c9258(0x16c)]('install',_0x3c9258(0x16e),_0x17303f,{'projectCode':_0x4dbd73});}catch(_0x29f6cd){const _0x4263a7=Date[_0x3c9258(0x164)]()-_0xc7b645;logger[_0x3c9258(0x174)](_0x3c9258(0x166),_0x3c9258(0x168),{'projectCode':_0x4dbd73,'error':_0x29f6cd instanceof Error?_0x29f6cd[_0x3c9258(0x16a)]:String(_0x29f6cd),'duration':_0x4263a7});throw _0x29f6cd;}return formatElapsed(_0xc7b645);}
@@ -1 +1 @@
1
- const a113_0x3209ff=a113_0x24e0;(function(_0x2eb508,_0x28ab3f){const _0x20663b=a113_0x24e0,_0x33f7b6=_0x2eb508();while(!![]){try{const _0x430b0e=-parseInt(_0x20663b(0xe8))/0x1*(-parseInt(_0x20663b(0xef))/0x2)+-parseInt(_0x20663b(0xec))/0x3*(parseInt(_0x20663b(0xed))/0x4)+-parseInt(_0x20663b(0xe7))/0x5+parseInt(_0x20663b(0xfc))/0x6*(parseInt(_0x20663b(0xfe))/0x7)+parseInt(_0x20663b(0xf4))/0x8+-parseInt(_0x20663b(0x102))/0x9+parseInt(_0x20663b(0xe6))/0xa;if(_0x430b0e===_0x28ab3f)break;else _0x33f7b6['push'](_0x33f7b6['shift']());}catch(_0x5af884){_0x33f7b6['push'](_0x33f7b6['shift']());}}}(a113_0x4167,0x6ca82));function a113_0x4167(){const _0x349291=['../../commands/project/create/non-interactive.js','cookie','9978wHCFfT','name','889boBFFw','Initialize\x20.rabetbase.json\x20config\x20in\x20existing\x20project','string','appcode','501642hYGSsp','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','nonInteractive','upgrade','boolean','validation','trim','Project\x20name','Target\x20environment','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','1793130Gxyyeo','4301835zRlWnq','46RZEGKo','str','../../commands/project/create/main.js','Auto-confirm\x20prompts','42051dmDHHz','40PFoWmf','env','38362BVfpuj','create','write','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','App\x20code\x20to\x20initialize','1827944PKvFIo','bool','project','yes','args','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.'];a113_0x4167=function(){return _0x349291;};return a113_0x4167();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a113_0x24e0(_0x53210c,_0x275c89){_0x53210c=_0x53210c-0xe6;const _0x4167dc=a113_0x4167();let _0x24e0d7=_0x4167dc[_0x53210c];return _0x24e0d7;}import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a113_0x3209ff(0x101),'type':'string','description':a113_0x3209ff(0xf3)},{'name':a113_0x3209ff(0xee),'type':a113_0x3209ff(0x100),'description':a113_0x3209ff(0x10a)},{'name':a113_0x3209ff(0xf7),'type':'boolean','description':a113_0x3209ff(0xeb),'default':![]}],createFlags=[{'name':'name','type':a113_0x3209ff(0x100),'description':a113_0x3209ff(0x109)},{'name':a113_0x3209ff(0xee),'type':a113_0x3209ff(0x100),'description':a113_0x3209ff(0x10a)},{'name':'appcode','type':a113_0x3209ff(0x100),'description':a113_0x3209ff(0x103)}],upgradeFlags=[{'name':'yes','type':a113_0x3209ff(0x106),'description':'Skip\x20confirmation\x20prompt','default':![]}];export const projectDefinitions=[{'service':a113_0x3209ff(0xf6),'command':'init','description':a113_0x3209ff(0xff),'risk':a113_0x3209ff(0xf1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x36a2b0){const _0x39c809=a113_0x3209ff;return await initConfig({'appcode':_0x36a2b0[_0x39c809(0xe9)](_0x39c809(0x101))||undefined,'env':_0x36a2b0[_0x39c809(0xe9)](_0x39c809(0xee))||undefined,'autoYes':_0x36a2b0[_0x39c809(0xf5)](_0x39c809(0xf7))}),{'ok':!![]};}},{'service':'project','command':a113_0x3209ff(0xf0),'description':'Create\x20a\x20new\x20project','risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'project-name','description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x30938a){const _0x464060=a113_0x3209ff,{createApp:_0x292ab0}=await import(_0x464060(0xea)),{createProjectNonInteractive:_0x1f6614}=await import(_0x464060(0xfa)),_0xd07abb=_0x30938a['str'](_0x464060(0xfd))[_0x464060(0x108)]()||_0x30938a[_0x464060(0xf8)][0x0]?.[_0x464060(0x108)](),_0x4926f6=_0x30938a[_0x464060(0xe9)](_0x464060(0xee))||undefined,_0x55031d=_0x30938a[_0x464060(0xe9)](_0x464060(0x101))||undefined;if(_0x30938a[_0x464060(0x104)]){if(!_0xd07abb)throw CliErrors[_0x464060(0x107)](_0x464060(0xf9),'Usage:\x20'+CLI_BIN_NAME+_0x464060(0xf2));await _0x1f6614(_0xd07abb,_0x4926f6,_0x55031d,_0x30938a[_0x464060(0xfb)]);}else await _0x292ab0({'projectCode':_0xd07abb,'appCode':_0x55031d,'env':_0x4926f6,'cookie':_0x30938a[_0x464060(0xfb)]});return{'ok':!![]};}},{'service':'project','command':a113_0x3209ff(0x105),'description':a113_0x3209ff(0x10b),'risk':a113_0x3209ff(0xf1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x5d5a71){const _0x1deafa=a113_0x3209ff;return await upgradeApp(_0x5d5a71['nonInteractive'],{'yes':_0x5d5a71[_0x1deafa(0xf5)](_0x1deafa(0xf7))}),{'ok':!![]};}}];
1
+ const a114_0x44dcea=a114_0x3fb9;(function(_0x44fd47,_0x592b74){const _0x352c2d=a114_0x3fb9,_0x51746d=_0x44fd47();while(!![]){try{const _0xd494a6=-parseInt(_0x352c2d(0xfc))/0x1*(-parseInt(_0x352c2d(0xf7))/0x2)+-parseInt(_0x352c2d(0x105))/0x3+-parseInt(_0x352c2d(0xf6))/0x4+parseInt(_0x352c2d(0x113))/0x5+-parseInt(_0x352c2d(0xfb))/0x6*(parseInt(_0x352c2d(0x102))/0x7)+-parseInt(_0x352c2d(0x104))/0x8+parseInt(_0x352c2d(0x107))/0x9;if(_0xd494a6===_0x592b74)break;else _0x51746d['push'](_0x51746d['shift']());}catch(_0x16ab00){_0x51746d['push'](_0x51746d['shift']());}}}(a114_0x6ab2,0xb633b));import{CliErrors}from'../../errors.js';function a114_0x6ab2(){const _0x2ed349=['Project\x20name','Usage:\x20','1020720hizQXp','14404FJSZHh','nonInteractive','name','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','6767574ydGkrN','109mJAQQP','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','Initialize\x20.rabetbase.json\x20config\x20in\x20existing\x20project','str','string','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','7jZofsQ','../../commands/project/create/main.js','11490296RdYSSp','3807378etapNs','cookie','27810513rzqJgC','appcode','boolean','args','bool','project','trim','env','Skip\x20confirmation\x20prompt','init','yes','write','4798730geWNTw','create','validation','Target\x20environment'];a114_0x6ab2=function(){return _0x2ed349;};return a114_0x6ab2();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a114_0x44dcea(0x108),'type':a114_0x44dcea(0x100),'description':'App\x20code\x20to\x20initialize'},{'name':a114_0x44dcea(0x10e),'type':a114_0x44dcea(0x100),'description':a114_0x44dcea(0xf3)},{'name':a114_0x44dcea(0x111),'type':a114_0x44dcea(0x109),'description':'Auto-confirm\x20prompts','default':![]}],createFlags=[{'name':'name','type':a114_0x44dcea(0x100),'description':a114_0x44dcea(0xf4)},{'name':'env','type':a114_0x44dcea(0x100),'description':a114_0x44dcea(0xf3)},{'name':a114_0x44dcea(0x108),'type':'string','description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'}],upgradeFlags=[{'name':a114_0x44dcea(0x111),'type':a114_0x44dcea(0x109),'description':a114_0x44dcea(0x10f),'default':![]}];function a114_0x3fb9(_0x7f84b4,_0xf2ce65){_0x7f84b4=_0x7f84b4-0xf3;const _0x6ab23d=a114_0x6ab2();let _0x3fb991=_0x6ab23d[_0x7f84b4];return _0x3fb991;}export const projectDefinitions=[{'service':a114_0x44dcea(0x10c),'command':a114_0x44dcea(0x110),'description':a114_0x44dcea(0xfe),'risk':a114_0x44dcea(0x112),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0xbb263){const _0x47dfad=a114_0x44dcea;return await initConfig({'appcode':_0xbb263[_0x47dfad(0xff)](_0x47dfad(0x108))||undefined,'env':_0xbb263['str']('env')||undefined,'autoYes':_0xbb263[_0x47dfad(0x10b)](_0x47dfad(0x111))}),{'ok':!![]};}},{'service':a114_0x44dcea(0x10c),'command':a114_0x44dcea(0x114),'description':'Create\x20a\x20new\x20project','risk':a114_0x44dcea(0x112),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'project-name','description':a114_0x44dcea(0x101),'required':![]}],'flags':createFlags,async 'execute'(_0x57db4f){const _0x46f9c8=a114_0x44dcea,{createApp:_0x2fa932}=await import(_0x46f9c8(0x103)),{createProjectNonInteractive:_0x28306f}=await import('../../commands/project/create/non-interactive.js'),_0x4fcfba=_0x57db4f[_0x46f9c8(0xff)](_0x46f9c8(0xf9))[_0x46f9c8(0x10d)]()||_0x57db4f[_0x46f9c8(0x10a)][0x0]?.['trim'](),_0x3690e5=_0x57db4f['str'](_0x46f9c8(0x10e))||undefined,_0x2b2835=_0x57db4f[_0x46f9c8(0xff)]('appcode')||undefined;if(_0x57db4f[_0x46f9c8(0xf8)]){if(!_0x4fcfba)throw CliErrors[_0x46f9c8(0x115)](_0x46f9c8(0xfa),_0x46f9c8(0xf5)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x28306f(_0x4fcfba,_0x3690e5,_0x2b2835,_0x57db4f[_0x46f9c8(0x106)]);}else await _0x2fa932({'projectCode':_0x4fcfba,'appCode':_0x2b2835,'env':_0x3690e5,'cookie':_0x57db4f[_0x46f9c8(0x106)]});return{'ok':!![]};}},{'service':a114_0x44dcea(0x10c),'command':'upgrade','description':a114_0x44dcea(0xfd),'risk':a114_0x44dcea(0x112),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x3bda2e){const _0x465f44=a114_0x44dcea;return await upgradeApp(_0x3bda2e[_0x465f44(0xf8)],{'yes':_0x3bda2e[_0x465f44(0x10b)](_0x465f44(0x111))}),{'ok':!![]};}}];
@@ -1 +1 @@
1
- function a114_0x52b3(_0x136a5e,_0x5ab69f){_0x136a5e=_0x136a5e-0x76;const _0x253395=a114_0x2533();let _0x52b38e=_0x253395[_0x136a5e];return _0x52b38e;}(function(_0x7360fb,_0x22ddbe){const _0x4be678=a114_0x52b3,_0x9a182c=_0x7360fb();while(!![]){try{const _0x352b6d=-parseInt(_0x4be678(0xa2))/0x1+parseInt(_0x4be678(0x92))/0x2*(parseInt(_0x4be678(0xa0))/0x3)+-parseInt(_0x4be678(0x9d))/0x4+-parseInt(_0x4be678(0x8b))/0x5+parseInt(_0x4be678(0x96))/0x6+parseInt(_0x4be678(0x7a))/0x7+parseInt(_0x4be678(0x89))/0x8;if(_0x352b6d===_0x22ddbe)break;else _0x9a182c['push'](_0x9a182c['shift']());}catch(_0x85f248){_0x9a182c['push'](_0x9a182c['shift']());}}}(a114_0x2533,0xe00e7));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a114_0x16d097 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 a114_0x2533(){const _0x5b8a00=['Migration\x20cancelled.\x20Run\x20`','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','version','50nkbhnk','info','.bak','toLocaleString','3538620AHAslC','setLogPath','defaultApp','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','apps','string','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','6510776xxJGyE','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','join','2721QnhRVh','utf8','814027QLYHCz','1.0.0','\x20\x20Default:\x20','../..','从旧配置文件升级成功','6576759Vvokgt','cyan','appcode','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','log','App\x20Code\x20cannot\x20be\x20empty','init','\x20\x20appcode:\x20','production','\x20→\x20.rabetbase.json','cwd','keys','green','parse','bold','28803920OXDNBg','env','8965080UETjPV','app','package.json','?\x20(Old\x20file\x20→\x20*.bak)'];a114_0x2533=function(){return _0x5b8a00;};return a114_0x2533();}import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x3093ff){const _0x486530=a114_0x52b3,{appcode:_0x3f6368,env:_0x1c46ac,autoYes:_0x5cdca0}=_0x3093ff,_0xd5e938=process[_0x486530(0x84)]();if(getProjectConfigPath())throw new Error(_0x486530(0x9e));let _0x3a7e2f;for(const _0x1a1ef6 of LEGACY_CONFIG_NAMES){const _0x3e6b7d=resolve(_0xd5e938,_0x1a1ef6);if(existsSync(_0x3e6b7d)){_0x3a7e2f=_0x3e6b7d;break;}}if(_0x3a7e2f){let _0x3a0997={};try{_0x3a0997=JSON[_0x486530(0x87)](readFileSync(_0x3a7e2f,_0x486530(0xa1)));}catch{}const _0x27b882=basename(_0x3a7e2f),_0x65ca2=_0x3a0997?.['appcode']||_0x3a0997?.[_0x486530(0x8c)];let _0x1907ae=_0x5cdca0;!_0x5cdca0&&(console[_0x486530(0x7e)](a114_0x16d097['yellow'](_0x486530(0x90)+a114_0x16d097[_0x486530(0x88)](_0x27b882))),_0x65ca2&&console[_0x486530(0x7e)](a114_0x16d097[_0x486530(0x7b)](_0x486530(0x81)+_0x65ca2)),_0x1907ae=await confirm({'message':'Upgrade\x20it\x20to\x20'+a114_0x16d097[_0x486530(0x88)]('.rabetbase.json')+_0x486530(0x8e),'default':!![]}));if(!_0x1907ae){console[_0x486530(0x7e)](_0x486530(0x8f)+CLI_BIN_NAME+'\x20project\x20init`\x20to\x20start\x20fresh.');return;}const _0x5eac9f=resolve(_0xd5e938,NEW_CONFIG_NAME),_0xc9c408=getCliVersionFromPkg(),_0x51b42d=readRawConfig(),_0x4ce5a8=_0x3f6368||(typeof _0x3a0997?.['appcode']===_0x486530(0x9b)?_0x3a0997[_0x486530(0x7c)]:undefined)||(typeof _0x3a0997?.[_0x486530(0x8c)]===_0x486530(0x9b)?_0x3a0997[_0x486530(0x8c)]:undefined)||await askAppcode(),_0x8c6671=typeof _0x3a0997?.['env']===_0x486530(0x9b)?_0x3a0997[_0x486530(0x8a)]:typeof _0x51b42d[_0x486530(0x8a)]===_0x486530(0x9b)?_0x51b42d[_0x486530(0x8a)]:_0x486530(0x82),_0xcb6783=buildCanonicalProjectConfig({..._0x51b42d,..._0x3a0997},{'appCodes':[_0x4ce5a8],'env':_0x8c6671,'metadata':{'version':_0xc9c408,'migratedAt':new Date()[_0x486530(0x95)](),'migratedFrom':_0x3a7e2f}});writeConfigFile(_0x5eac9f,_0xcb6783);const _0x26f06a=_0x3a7e2f+_0x486530(0x94);renameSync(_0x3a7e2f,_0x26f06a),logger['setLogPath'](_0xd5e938),logger['info'](_0x486530(0x80),_0x486530(0x79),{'from':_0x3a7e2f,'to':_0x5eac9f,'appcode':_0x4ce5a8,'env':_0xcb6783['env']}),console[_0x486530(0x7e)](a114_0x16d097[_0x486530(0x86)]('✓\x20Upgraded\x20'+_0x27b882+_0x486530(0x83))),console[_0x486530(0x7e)](a114_0x16d097['cyan']('\x20\x20Apps:\x20'+Object[_0x486530(0x85)](_0xcb6783[_0x486530(0x9a)]||{})[_0x486530(0x9f)](',\x20'))),console['log'](a114_0x16d097['cyan']('\x20\x20Default:\x20'+_0xcb6783[_0x486530(0x98)])),console[_0x486530(0x7e)](a114_0x16d097['gray'](_0x486530(0x7d)+_0x27b882+'.bak'));return;}const _0x314a50=_0x3f6368||await askAppcode(),_0x56569d=resolve(_0xd5e938,NEW_CONFIG_NAME),_0x3e602a=getCliVersionFromPkg(),_0x580fb9=readRawConfig(),_0x547f4c=typeof _0x580fb9[_0x486530(0x8a)]==='string'?_0x580fb9[_0x486530(0x8a)]:undefined,_0x19919c=buildCanonicalProjectConfig({},{'appCodes':[_0x314a50],'env':_0x1c46ac||_0x547f4c||'production','metadata':{'version':_0x3e602a,'createdAt':new Date()[_0x486530(0x95)]()}});writeConfigFile(_0x56569d,_0x19919c),logger[_0x486530(0x97)](_0xd5e938),logger[_0x486530(0x93)](_0x486530(0x80),'初始化项目配置文件成功',{'appcode':_0x314a50,'env':_0x19919c[_0x486530(0x8a)],'version':_0x19919c[_0x486530(0x91)],'configPath':_0x56569d}),console['log'](a114_0x16d097['green'](_0x486530(0x99))),console['log'](a114_0x16d097[_0x486530(0x7b)]('\x20\x20Apps:\x20'+Object['keys'](_0x19919c[_0x486530(0x9a)]||{})[_0x486530(0x9f)](',\x20'))),console[_0x486530(0x7e)](a114_0x16d097['cyan'](_0x486530(0x77)+_0x19919c['defaultApp'])),console['log'](_0x486530(0x9c)+CLI_BIN_NAME+'\x20api\x20generate\x27\x20and\x20\x27'+CLI_BIN_NAME+'\x20api\x20pull\x27');}function askAppcode(){return input({'message':'Please\x20enter\x20App\x20Code:','validate':_0x571491=>{const _0x2b731f=a114_0x52b3;if(!_0x571491['trim']())return _0x2b731f(0x7f);const {valid:_0x48796b,message:_0x2efc79}=validateAppcode(_0x571491['trim']());return _0x48796b||_0x2efc79||'Invalid\x20App\x20Code';}});}function getCliVersionFromPkg(){const _0xd9e277=a114_0x52b3;try{const _0x4e54e7=fileURLToPath(import.meta.url),_0x3bcdfc=resolve(dirname(_0x4e54e7),_0xd9e277(0x78)),_0xf107ee=JSON['parse'](readFileSync(resolve(_0x3bcdfc,_0xd9e277(0x8d)),'utf8'));return _0xf107ee['version']||_0xd9e277(0x76);}catch{return _0xd9e277(0x76);}}
1
+ function a115_0x56b3(){const _0x131350=['\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','167153beJNOU','63591MKaeGv','env','string','\x20\x20Default:\x20','utf8','初始化项目配置文件成功','9294240uArdBi','3490rRzfiW','bold','8143938cvRxTo','appcode','2QBCjAo','join','Upgrade\x20it\x20to\x20','?\x20(Old\x20file\x20→\x20*.bak)','1535403yEPyTe','log','setLogPath','toLocaleString','Please\x20enter\x20App\x20Code:','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','init','从旧配置文件升级成功','keys','.bak','production','\x20project\x20init`\x20to\x20start\x20fresh.','\x20\x20appcode:\x20','package.json','\x20\x20Apps:\x20','cwd','\x20api\x20pull\x27','apps','cyan','428007oZAvXF','294zBYXUy','55VZtPPQ','version','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','app','info','✓\x20Upgraded\x20','gray','trim','green','1.0.0','defaultApp','Migration\x20cancelled.\x20Run\x20`','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','\x20→\x20.rabetbase.json','62344TwvgxR'];a115_0x56b3=function(){return _0x131350;};return a115_0x56b3();}(function(_0x3029be,_0x3169c9){const _0x5bab85=a115_0x1fce,_0x152d80=_0x3029be();while(!![]){try{const _0x5789d0=-parseInt(_0x5bab85(0xc0))/0x1+-parseInt(_0x5bab85(0xa9))/0x2*(-parseInt(_0x5bab85(0xad))/0x3)+-parseInt(_0x5bab85(0x9b))/0x4*(-parseInt(_0x5bab85(0x8d))/0x5)+-parseInt(_0x5bab85(0xc1))/0x6*(parseInt(_0x5bab85(0x9d))/0x7)+-parseInt(_0x5bab85(0xa4))/0x8+parseInt(_0x5bab85(0xa7))/0x9+parseInt(_0x5bab85(0xa5))/0xa*(parseInt(_0x5bab85(0x9e))/0xb);if(_0x5789d0===_0x3169c9)break;else _0x152d80['push'](_0x152d80['shift']());}catch(_0x523a45){_0x152d80['push'](_0x152d80['shift']());}}}(a115_0x56b3,0xce810));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a115_0x404802 from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../../context.js';import{validateAppcode}from'../../commands/common/validate.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x136ece){const _0xe2f8be=a115_0x1fce,{appcode:_0xe6385,env:_0x5bf403,autoYes:_0x40fdf7}=_0x136ece,_0x4269a4=process[_0xe2f8be(0xbc)]();if(getProjectConfigPath())throw new Error(_0xe2f8be(0xb2));let _0x342a23;for(const _0xe7dda0 of LEGACY_CONFIG_NAMES){const _0x371d96=resolve(_0x4269a4,_0xe7dda0);if(existsSync(_0x371d96)){_0x342a23=_0x371d96;break;}}if(_0x342a23){let _0x54a119={};try{_0x54a119=JSON['parse'](readFileSync(_0x342a23,_0xe2f8be(0xa2)));}catch{}const _0x7991d1=basename(_0x342a23),_0xa226d9=_0x54a119?.[_0xe2f8be(0xa8)]||_0x54a119?.['app'];let _0x1d01df=_0x40fdf7;!_0x40fdf7&&(console[_0xe2f8be(0xae)](a115_0x404802['yellow']('⚠\x20Found\x20legacy\x20configuration\x20file:\x20'+a115_0x404802['bold'](_0x7991d1))),_0xa226d9&&console[_0xe2f8be(0xae)](a115_0x404802[_0xe2f8be(0xbf)](_0xe2f8be(0xb9)+_0xa226d9)),_0x1d01df=await confirm({'message':_0xe2f8be(0xab)+a115_0x404802[_0xe2f8be(0xa6)]('.rabetbase.json')+_0xe2f8be(0xac),'default':!![]}));if(!_0x1d01df){console[_0xe2f8be(0xae)](_0xe2f8be(0x98)+CLI_BIN_NAME+_0xe2f8be(0xb8));return;}const _0x6dff79=resolve(_0x4269a4,NEW_CONFIG_NAME),_0x16fec7=getCliVersionFromPkg(),_0x8be981=readRawConfig(),_0x5af1d4=_0xe6385||(typeof _0x54a119?.[_0xe2f8be(0xa8)]==='string'?_0x54a119[_0xe2f8be(0xa8)]:undefined)||(typeof _0x54a119?.[_0xe2f8be(0x90)]===_0xe2f8be(0xa0)?_0x54a119[_0xe2f8be(0x90)]:undefined)||await askAppcode(),_0xc441f8=typeof _0x54a119?.[_0xe2f8be(0x9f)]===_0xe2f8be(0xa0)?_0x54a119[_0xe2f8be(0x9f)]:typeof _0x8be981[_0xe2f8be(0x9f)]===_0xe2f8be(0xa0)?_0x8be981[_0xe2f8be(0x9f)]:_0xe2f8be(0xb7),_0x34fa22=buildCanonicalProjectConfig({..._0x8be981,..._0x54a119},{'appCodes':[_0x5af1d4],'env':_0xc441f8,'metadata':{'version':_0x16fec7,'migratedAt':new Date()[_0xe2f8be(0xb0)](),'migratedFrom':_0x342a23}});writeConfigFile(_0x6dff79,_0x34fa22);const _0x479e48=_0x342a23+_0xe2f8be(0xb6);renameSync(_0x342a23,_0x479e48),logger[_0xe2f8be(0xaf)](_0x4269a4),logger[_0xe2f8be(0x91)](_0xe2f8be(0xb3),_0xe2f8be(0xb4),{'from':_0x342a23,'to':_0x6dff79,'appcode':_0x5af1d4,'env':_0x34fa22[_0xe2f8be(0x9f)]}),console[_0xe2f8be(0xae)](a115_0x404802[_0xe2f8be(0x95)](_0xe2f8be(0x92)+_0x7991d1+_0xe2f8be(0x9a))),console[_0xe2f8be(0xae)](a115_0x404802['cyan'](_0xe2f8be(0xbb)+Object[_0xe2f8be(0xb5)](_0x34fa22[_0xe2f8be(0xbe)]||{})['join'](',\x20'))),console[_0xe2f8be(0xae)](a115_0x404802[_0xe2f8be(0xbf)]('\x20\x20Default:\x20'+_0x34fa22[_0xe2f8be(0x97)])),console['log'](a115_0x404802[_0xe2f8be(0x93)](_0xe2f8be(0x8f)+_0x7991d1+'.bak'));return;}const _0x5de6cc=_0xe6385||await askAppcode(),_0x137cf6=resolve(_0x4269a4,NEW_CONFIG_NAME),_0x2b9523=getCliVersionFromPkg(),_0x5330be=readRawConfig(),_0x940d2b=typeof _0x5330be[_0xe2f8be(0x9f)]===_0xe2f8be(0xa0)?_0x5330be[_0xe2f8be(0x9f)]:undefined,_0xd87426=buildCanonicalProjectConfig({},{'appCodes':[_0x5de6cc],'env':_0x5bf403||_0x940d2b||_0xe2f8be(0xb7),'metadata':{'version':_0x2b9523,'createdAt':new Date()[_0xe2f8be(0xb0)]()}});writeConfigFile(_0x137cf6,_0xd87426),logger[_0xe2f8be(0xaf)](_0x4269a4),logger[_0xe2f8be(0x91)]('init',_0xe2f8be(0xa3),{'appcode':_0x5de6cc,'env':_0xd87426[_0xe2f8be(0x9f)],'version':_0xd87426[_0xe2f8be(0x8e)],'configPath':_0x137cf6}),console[_0xe2f8be(0xae)](a115_0x404802[_0xe2f8be(0x95)](_0xe2f8be(0x99))),console['log'](a115_0x404802[_0xe2f8be(0xbf)](_0xe2f8be(0xbb)+Object['keys'](_0xd87426[_0xe2f8be(0xbe)]||{})[_0xe2f8be(0xaa)](',\x20'))),console['log'](a115_0x404802[_0xe2f8be(0xbf)](_0xe2f8be(0xa1)+_0xd87426[_0xe2f8be(0x97)])),console[_0xe2f8be(0xae)](_0xe2f8be(0x9c)+CLI_BIN_NAME+'\x20api\x20generate\x27\x20and\x20\x27'+CLI_BIN_NAME+_0xe2f8be(0xbd));}function a115_0x1fce(_0x207678,_0x190c37){_0x207678=_0x207678-0x8d;const _0x56b317=a115_0x56b3();let _0x1fce65=_0x56b317[_0x207678];return _0x1fce65;}function askAppcode(){const _0x279df5=a115_0x1fce;return input({'message':_0x279df5(0xb1),'validate':_0x54f8e7=>{const _0xb4d91b=_0x279df5;if(!_0x54f8e7[_0xb4d91b(0x94)]())return'App\x20Code\x20cannot\x20be\x20empty';const {valid:_0x5e1abb,message:_0x58b99c}=validateAppcode(_0x54f8e7['trim']());return _0x5e1abb||_0x58b99c||'Invalid\x20App\x20Code';}});}function getCliVersionFromPkg(){const _0x4eb4f6=a115_0x1fce;try{const _0x2fb013=fileURLToPath(import.meta.url),_0x4d606a=resolve(dirname(_0x2fb013),'../..'),_0x3d24fb=JSON['parse'](readFileSync(resolve(_0x4d606a,_0x4eb4f6(0xba)),_0x4eb4f6(0xa2)));return _0x3d24fb[_0x4eb4f6(0x8e)]||_0x4eb4f6(0x96);}catch{return _0x4eb4f6(0x96);}}
@@ -1 +1 @@
1
- const a115_0x4c8ab7=a115_0x4f04;(function(_0x1d4174,_0x548711){const _0x27645f=a115_0x4f04,_0x34d9c7=_0x1d4174();while(!![]){try{const _0x50b9aa=parseInt(_0x27645f(0x1b6))/0x1+-parseInt(_0x27645f(0x1b5))/0x2+parseInt(_0x27645f(0x1a8))/0x3+-parseInt(_0x27645f(0x1c2))/0x4*(parseInt(_0x27645f(0x1a5))/0x5)+-parseInt(_0x27645f(0x19f))/0x6+-parseInt(_0x27645f(0x18b))/0x7+parseInt(_0x27645f(0x1a6))/0x8;if(_0x50b9aa===_0x548711)break;else _0x34d9c7['push'](_0x34d9c7['shift']());}catch(_0x1283fc){_0x34d9c7['push'](_0x34d9c7['shift']());}}}(a115_0x24f1,0x6fd99));import a115_0x3bc237 from'chalk';import a115_0x35aa69 from'ora';function a115_0x4f04(_0x4787d8,_0x533c95){_0x4787d8=_0x4787d8-0x155;const _0x24f186=a115_0x24f1();let _0x4f04b4=_0x24f186[_0x4787d8];return _0x4f04b4;}import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';function a115_0x24f1(){const _0x23cf43=['removed\x20','files','fields','\x20removed\x20(','succeed','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','Skill\x20swap:','parse','\x20\x20Fields\x20to\x20migrate:\x20','Upgrade\x20completed\x20successfully!','cwd','FOUND','push','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','length','@lovrabet/sdk','join','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','utf8','none\x20found','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','fail','lovrabet/rabetbase','isArray','hasNewConfig','label','\x20\x20Step\x20','lovrabet/rabetbase\x20installed\x20globally','\x20\x20bun\x20install','not\x20found\x20or\x20already\x20at\x20latest','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','\x20→\x20','oldMcpConfig','\x20\x20Action:\x20delete','white','latest','no\x20legacy\x20config\x20found','string','\x20→\x20keys:\x20','yellow','2996434DUkfgh','inherit','object','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','lovrabet/lovrabet-skill\x20removed','Remove\x20old\x20skill','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','failed','step','not\x20needed','Remove\x20legacy\x20artifacts','includes','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','path','\x20\x20Current\x20version\x20in\x20','===\x20Upgrade\x20Analysis\x20===','Upgrade\x20@lovrabet/sdk','bold','needed','4708734SgaRqL','oldArtifacts','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','.lovrabet','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','detail','62575TwNurr','8748776ftQgoQ','green','184068oUuIgY','\x20\x20#\x20or','red','Remove\x20.lovrabet/','not\x20found\x20(will\x20create)','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','dependencies','gray','Config\x20migration','Legacy\x20artifacts:','Step\x201/7:\x20Config\x20migration\x20—\x20','keys','Proceed\x20with\x20upgrade?','486398pgNmzn','771749yZuHar','Step\x204/7:\x20Cleaning\x20MCP\x20config...','exit\x20','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','Step\x204/7:\x20MCP\x20config\x20—\x20','args','already\x20exists\x20(will\x20merge)','skipped','info','cyan','log','mcpServers','4axUGbq','\x20\x20New\x20config\x20(.rabetbase.json):\x20','sdkUpgrade','needsSkillSwap','entries','\x20→\x20latest','error','isDirectory','===\x20Upgrade\x20Summary\x20===','configMigration','Clean\x20MCP\x20config','.bak','Step\x206/7:\x20Installing\x20new\x20skill...','Upgrade\x20cancelled.','Config\x20file:','@lovrabet/dataset-mcp-server','done','start','FAIL','message','@lovrabet/sdk:','no\x20matching\x20entry\x20found','.claude/skills/lovrabet','filter','oldPath','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','some','.cursor/mcp.json'];a115_0x24f1=function(){return _0x23cf43;};return a115_0x24f1();}import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a115_0x4c8ab7(0x15d)](_0xc735b1=>_0xc735b1!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x5e2a54){const _0x22b247=a115_0x4c8ab7,_0x18d18c=[];for(const _0x34d690 of Object['values'](CORE_IDE_CONFIGS)){if(_0x34d690['files'])for(const _0x1e6776 of _0x34d690[_0x22b247(0x163)]){_0x18d18c['push'](resolve(_0x5e2a54,_0x1e6776['path']));}}return _0x18d18c;}function analyse(_0x12dcac){const _0x168c75=a115_0x4c8ab7;let _0x5e76b6=null;const _0xc0e1ef=resolve(_0x12dcac,NEW_CONFIG_NAME),_0x3cb783=existsSync(_0xc0e1ef);for(const _0x3196ee of LEGACY_CONFIG_NAMES){const _0x34ea6a=resolve(_0x12dcac,_0x3196ee);if(existsSync(_0x34ea6a)){const _0x5ce93b=readConfigFile(_0x34ea6a),_0x1e5c26=Object[_0x168c75(0x1b3)](_0x5ce93b)[_0x168c75(0x15d)](_0x49f9a3=>typeof _0x5ce93b[_0x49f9a3]!=='undefined');_0x5e76b6={'oldPath':_0x34ea6a,'hasNewConfig':_0x3cb783,'fields':_0x1e5c26};break;}}const _0x3dae8a=[],_0x39c2b5=resolve(_0x12dcac,_0x168c75(0x1a2));if(existsSync(_0x39c2b5))_0x3dae8a[_0x168c75(0x16e)](_0x39c2b5);const _0x112727=resolve(_0x12dcac,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x112727))_0x3dae8a[_0x168c75(0x16e)](_0x112727);const _0x3783c0=resolve(_0x12dcac,_0x168c75(0x15c));if(existsSync(_0x3783c0))_0x3dae8a[_0x168c75(0x16e)](_0x3783c0);for(const _0x13109c of collectIdeSkillFiles(_0x12dcac)){if(existsSync(_0x13109c))_0x3dae8a['push'](_0x13109c);}let _0x39c905=null;const _0x1c900d=resolve(_0x12dcac,_0x168c75(0x161));if(existsSync(_0x1c900d))try{const _0x5242db=JSON[_0x168c75(0x169)](readFileSync(_0x1c900d,_0x168c75(0x175)));if(_0x5242db?.[_0x168c75(0x1c1)]&&typeof _0x5242db[_0x168c75(0x1c1)]===_0x168c75(0x18d)){const _0x4d25b7=[];for(const [_0x32d779,_0x299961]of Object[_0x168c75(0x1c6)](_0x5242db[_0x168c75(0x1c1)])){const _0x226931=_0x299961;_0x226931?.[_0x168c75(0x1bb)]&&Array[_0x168c75(0x17a)](_0x226931[_0x168c75(0x1bb)])&&_0x226931['args'][_0x168c75(0x160)](_0x301fe1=>typeof _0x301fe1===_0x168c75(0x188)&&_0x301fe1[_0x168c75(0x196)](_0x168c75(0x155)))&&_0x4d25b7['push'](_0x32d779);}_0x4d25b7['length']>0x0&&(_0x39c905={'path':_0x1c900d,'keys':_0x4d25b7});}}catch{}const _0x13d126=_0x3dae8a[_0x168c75(0x171)]>0x0||_0x5e76b6!==null;let _0x121263=null;const _0x4499bf=resolve(_0x12dcac,'package.json');if(existsSync(_0x4499bf))try{const _0x2a21c2=JSON[_0x168c75(0x169)](readFileSync(_0x4499bf,_0x168c75(0x175)));for(const _0x233a11 of[_0x168c75(0x1ae),'devDependencies']){const _0x3945f4=_0x2a21c2?.[_0x233a11]?.[_0x168c75(0x172)];if(typeof _0x3945f4===_0x168c75(0x188)){_0x3945f4!==_0x168c75(0x186)&&(_0x121263={'pkgPath':_0x4499bf,'currentVersion':_0x3945f4,'field':_0x233a11});break;}}}catch{}return{'configMigration':_0x5e76b6,'oldArtifacts':_0x3dae8a,'oldMcpConfig':_0x39c905,'needsSkillSwap':_0x13d126,'sdkUpgrade':_0x121263};}function printReport(_0x272ae5){const _0x275dc9=a115_0x4c8ab7,{configMigration:_0x140a0d,oldArtifacts:_0xa5a668,oldMcpConfig:_0x3d627d,needsSkillSwap:_0xeb58a8}=_0x272ae5;console[_0x275dc9(0x1c0)](''),console[_0x275dc9(0x1c0)](a115_0x3bc237[_0x275dc9(0x19d)](_0x275dc9(0x19b))),console[_0x275dc9(0x1c0)]('');_0x140a0d?(console[_0x275dc9(0x1c0)](a115_0x3bc237[_0x275dc9(0x1bf)](_0x275dc9(0x1d0))+('\x20\x20'+a115_0x3bc237[_0x275dc9(0x18a)](_0x140a0d['oldPath']))),console[_0x275dc9(0x1c0)](_0x275dc9(0x1c3)+(_0x140a0d[_0x275dc9(0x17b)]?a115_0x3bc237[_0x275dc9(0x1a7)](_0x275dc9(0x1bc)):a115_0x3bc237[_0x275dc9(0x1af)](_0x275dc9(0x1ac)))),console[_0x275dc9(0x1c0)](_0x275dc9(0x16a)+_0x140a0d[_0x275dc9(0x164)][_0x275dc9(0x173)](',\x20')),console['log'](_0x275dc9(0x191))):console[_0x275dc9(0x1c0)](a115_0x3bc237[_0x275dc9(0x1bf)](_0x275dc9(0x1d0))+'\x20\x20'+a115_0x3bc237[_0x275dc9(0x1af)](_0x275dc9(0x187)));console[_0x275dc9(0x1c0)]('');if(_0xa5a668['length']>0x0){console['log'](a115_0x3bc237[_0x275dc9(0x1bf)](_0x275dc9(0x1b1)));for(const _0x1411b7 of _0xa5a668){console['log']('\x20\x20'+a115_0x3bc237[_0x275dc9(0x1aa)](_0x275dc9(0x16d))+'\x20\x20'+_0x1411b7);}console['log'](_0x275dc9(0x184));}else console['log'](a115_0x3bc237[_0x275dc9(0x1bf)](_0x275dc9(0x1b1))+'\x20\x20'+a115_0x3bc237[_0x275dc9(0x1af)](_0x275dc9(0x176)));console[_0x275dc9(0x1c0)]('');_0x3d627d?(console[_0x275dc9(0x1c0)](a115_0x3bc237[_0x275dc9(0x1bf)]('MCP\x20config:')+('\x20\x20'+a115_0x3bc237[_0x275dc9(0x18a)](_0x3d627d[_0x275dc9(0x199)])+_0x275dc9(0x189)+_0x3d627d[_0x275dc9(0x1b3)]['join'](',\x20'))),console[_0x275dc9(0x1c0)](_0x275dc9(0x15f))):console[_0x275dc9(0x1c0)](a115_0x3bc237[_0x275dc9(0x1bf)]('MCP\x20config:')+'\x20\x20'+a115_0x3bc237[_0x275dc9(0x1af)]('no\x20legacy\x20entry'));console[_0x275dc9(0x1c0)](''),console[_0x275dc9(0x1c0)](a115_0x3bc237[_0x275dc9(0x1bf)](_0x275dc9(0x168))+('\x20\x20'+(_0xeb58a8?a115_0x3bc237['yellow'](_0x275dc9(0x19e)):a115_0x3bc237[_0x275dc9(0x1a7)](_0x275dc9(0x194)))));_0xeb58a8&&console[_0x275dc9(0x1c0)](_0x275dc9(0x167)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x275dc9(0x1c0)]('');if(_0x272ae5['sdkUpgrade']){const {currentVersion:_0x4064f6,field:_0xbae771,pkgPath:_0x27941f}=_0x272ae5[_0x275dc9(0x1c4)];console[_0x275dc9(0x1c0)](a115_0x3bc237['cyan'](_0x275dc9(0x15a))+('\x20\x20'+a115_0x3bc237[_0x275dc9(0x18a)](_0x27941f))),console['log'](_0x275dc9(0x19a)+_0xbae771+':\x20'+a115_0x3bc237[_0x275dc9(0x18a)](_0x4064f6)+_0x275dc9(0x182)+a115_0x3bc237['green'](_0x275dc9(0x186))),console[_0x275dc9(0x1c0)]('\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)');}else console[_0x275dc9(0x1c0)](a115_0x3bc237[_0x275dc9(0x1bf)](_0x275dc9(0x15a))+'\x20\x20'+a115_0x3bc237['gray'](_0x275dc9(0x180)));console[_0x275dc9(0x1c0)]('');}function execConfigMigration(_0x316c69,_0x14bb01){const _0x39b5ab=a115_0x4c8ab7,{configMigration:_0x1e8bb2}=_0x316c69;if(!_0x1e8bb2?.[_0x39b5ab(0x15e)])return{'step':0x1,'label':_0x39b5ab(0x1b0),'ok':!![],'detail':'skipped\x20(no\x20legacy\x20config)'};const _0x490890=readConfigFile(_0x1e8bb2[_0x39b5ab(0x15e)]),_0x44a5d1=resolve(_0x14bb01,NEW_CONFIG_NAME),_0x5e10ec=_0x1e8bb2['hasNewConfig']?readConfigFile(_0x44a5d1):{};for(const [_0x2b3bd0,_0x37edb8]of Object[_0x39b5ab(0x1c6)](_0x490890)){!(_0x2b3bd0 in _0x5e10ec)&&(_0x5e10ec[_0x2b3bd0]=_0x37edb8);}writeConfigFile(_0x44a5d1,_0x5e10ec);const _0x4321b3=_0x1e8bb2[_0x39b5ab(0x15e)]+_0x39b5ab(0x1cd);return renameSync(_0x1e8bb2[_0x39b5ab(0x15e)],_0x4321b3),{'step':0x1,'label':_0x39b5ab(0x1b0),'ok':!![],'detail':_0x1e8bb2['oldPath']+_0x39b5ab(0x182)+_0x44a5d1+'\x20(backup:\x20'+_0x4321b3+')'};}function execRemoveOldArtifacts(_0x3dd7a8){const _0x28313c=a115_0x4c8ab7,_0x1c4d75=[];for(const _0x52389c of _0x3dd7a8){try{if(!existsSync(_0x52389c))continue;const _0x1da06c=tryStat(_0x52389c);_0x1da06c?.[_0x28313c(0x1c9)]()?rmSync(_0x52389c,{'recursive':!![],'force':!![]}):unlinkSync(_0x52389c);}catch(_0x7c5ff8){_0x1c4d75[_0x28313c(0x16e)](_0x52389c+':\x20'+_0x7c5ff8['message']);}}return{'step':0x3,'label':_0x28313c(0x195),'ok':_0x1c4d75['length']===0x0,'detail':_0x1c4d75[_0x28313c(0x171)]>0x0?_0x3dd7a8['length']-_0x1c4d75[_0x28313c(0x171)]+'/'+_0x3dd7a8['length']+_0x28313c(0x165)+_0x1c4d75['join'](';\x20')+')':_0x3dd7a8[_0x28313c(0x171)]+'\x20removed'};}function execCleanMcp(_0x564659){const _0x117180=a115_0x4c8ab7;if(!_0x564659[_0x117180(0x183)])return{'step':0x4,'label':_0x117180(0x1cc),'ok':!![],'detail':'skipped'};try{const _0x2acd9e=readFileSync(_0x564659[_0x117180(0x183)][_0x117180(0x199)],_0x117180(0x175)),_0x1f4922=JSON['parse'](_0x2acd9e);if(_0x1f4922?.['mcpServers']&&typeof _0x1f4922[_0x117180(0x1c1)]===_0x117180(0x18d)){const _0x605f69=[];for(const [_0x32fe72,_0x2a9d09]of Object['entries'](_0x1f4922[_0x117180(0x1c1)])){_0x2a9d09?.[_0x117180(0x1bb)]&&Array[_0x117180(0x17a)](_0x2a9d09[_0x117180(0x1bb)])&&_0x2a9d09[_0x117180(0x1bb)][_0x117180(0x160)](_0x5ae6eb=>typeof _0x5ae6eb===_0x117180(0x188)&&_0x5ae6eb[_0x117180(0x196)](_0x117180(0x155)))&&_0x605f69[_0x117180(0x16e)](_0x32fe72);}for(const _0x3f8c39 of _0x605f69){delete _0x1f4922[_0x117180(0x1c1)][_0x3f8c39];}return _0x605f69['length']>0x0&&writeFileSync(_0x564659[_0x117180(0x183)][_0x117180(0x199)],JSON['stringify'](_0x1f4922,null,0x2)+'\x0a',_0x117180(0x175)),{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x117180(0x162)+_0x605f69['join'](',\x20')+'\x20from\x20'+_0x564659[_0x117180(0x183)]['path']};}return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x117180(0x15b)};}catch(_0x1d424c){return{'step':0x4,'label':_0x117180(0x1cc),'ok':![],'detail':_0x1d424c[_0x117180(0x159)]};}}function execSkillsRemove(_0x1d41b9,_0x3923bf){const _0x38c541=a115_0x4c8ab7,_0x195303=runNpxSkillsRemove(_0x1d41b9,{'stdio':'inherit','yes':_0x3923bf});return{'step':0x5,'label':_0x38c541(0x190),'ok':_0x195303['ok'],'detail':_0x195303['ok']?_0x38c541(0x18f):_0x195303[_0x38c541(0x1c8)]??_0x38c541(0x1b8)+_0x195303['status']};}function execSkillsAdd(_0x5b0df8,_0x1b5b7c){const _0x3a47da=a115_0x4c8ab7,_0xd1c22=runNpxSkillsAddGlobal(_0x5b0df8,_0x3a47da(0x179),{'stdio':_0x3a47da(0x18c),'yes':_0x1b5b7c});return{'step':0x6,'label':'Install\x20new\x20skill','ok':_0xd1c22['ok'],'detail':_0xd1c22['ok']?_0x3a47da(0x17e):_0xd1c22[_0x3a47da(0x1c8)]??_0x3a47da(0x1b8)+_0xd1c22['status']};}function execUpgradeSdk(_0x4f0dd1){const _0x369e74=a115_0x4c8ab7;if(!_0x4f0dd1[_0x369e74(0x1c4)])return{'step':0x7,'label':_0x369e74(0x19c),'ok':!![],'detail':_0x369e74(0x197)};const {pkgPath:_0x5968a0,currentVersion:_0x1cd585,field:_0x3d698b}=_0x4f0dd1[_0x369e74(0x1c4)];try{const _0x10f25c=readFileSync(_0x5968a0,'utf8'),_0x372cd4=JSON[_0x369e74(0x169)](_0x10f25c);return _0x372cd4[_0x3d698b][_0x369e74(0x172)]=_0x369e74(0x186),writeFileSync(_0x5968a0,JSON['stringify'](_0x372cd4,null,0x2)+'\x0a',_0x369e74(0x175)),{'step':0x7,'label':_0x369e74(0x19c),'ok':!![],'detail':_0x3d698b+'[\x22@lovrabet/sdk\x22]:\x20'+_0x1cd585+_0x369e74(0x1c7)};}catch(_0x1455e9){return{'step':0x7,'label':_0x369e74(0x19c),'ok':![],'detail':_0x1455e9[_0x369e74(0x159)]};}}function tryStat(_0xa5ac84){try{return statSync(_0xa5ac84);}catch{return undefined;}}function printSummary(_0x1b90e8){const _0x5c7080=a115_0x4c8ab7;console[_0x5c7080(0x1c0)](''),console[_0x5c7080(0x1c0)](a115_0x3bc237[_0x5c7080(0x19d)](_0x5c7080(0x1ca))),console['log']('');for(const _0x37dd2a of _0x1b90e8){const _0x5f476c=_0x37dd2a['ok']?a115_0x3bc237['green']('OK'):a115_0x3bc237[_0x5c7080(0x1aa)](_0x5c7080(0x158));console[_0x5c7080(0x1c0)]('\x20\x20'+_0x5f476c+_0x5c7080(0x17d)+_0x37dd2a[_0x5c7080(0x193)]+':\x20'+_0x37dd2a[_0x5c7080(0x17c)]);if(_0x37dd2a[_0x5c7080(0x1a4)])console[_0x5c7080(0x1c0)]('\x20\x20\x20\x20\x20\x20\x20'+a115_0x3bc237[_0x5c7080(0x1af)](_0x37dd2a['detail']));}console['log']('');}export async function upgradeApp(_0x114ddb,_0x3792f5){const _0x2883cc=a115_0x4c8ab7,_0x107bee=process[_0x2883cc(0x16c)](),_0x1b67c3=analyse(_0x107bee),_0xdf78b5=!_0x1b67c3[_0x2883cc(0x1cb)]&&_0x1b67c3['oldArtifacts'][_0x2883cc(0x171)]===0x0&&!_0x1b67c3[_0x2883cc(0x183)]&&!_0x1b67c3[_0x2883cc(0x1c5)]&&!_0x1b67c3[_0x2883cc(0x1c4)];if(_0xdf78b5){console[_0x2883cc(0x1c0)](a115_0x3bc237[_0x2883cc(0x1a7)](_0x2883cc(0x198)));return;}printReport(_0x1b67c3);const _0x4ba554=!!(_0x3792f5['yes']||_0x3792f5['Y']||_0x114ddb);if(!_0x4ba554)try{const _0x20d149=await askConfirm(_0x2883cc(0x1b4));if(!_0x20d149){console['log'](a115_0x3bc237[_0x2883cc(0x1af)](_0x2883cc(0x1cf)));return;}}catch(_0x449d91){if(_0x449d91?.[_0x2883cc(0x159)]==='CANCEL'){console[_0x2883cc(0x1c0)](a115_0x3bc237[_0x2883cc(0x1af)](_0x2883cc(0x1cf)));return;}throw _0x449d91;}const _0x221b35=[],_0x286c98=a115_0x35aa69({'text':'Step\x201/7:\x20Migrating\x20config...','color':_0x2883cc(0x1bf)})[_0x2883cc(0x157)](),_0x2b5c71=execConfigMigration(_0x1b67c3,_0x107bee);_0x221b35[_0x2883cc(0x16e)](_0x2b5c71),_0x286c98[_0x2b5c71['ok']?_0x2883cc(0x166):_0x2883cc(0x178)](_0x2883cc(0x1b2)+(_0x2b5c71[_0x2883cc(0x1a4)]??(_0x2b5c71['ok']?'done':_0x2883cc(0x192))));const _0x445bdb=resolve(_0x107bee,_0x2883cc(0x1a2)),_0x44c4dd=a115_0x35aa69({'text':'Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','color':_0x2883cc(0x1bf)})[_0x2883cc(0x157)]();if(existsSync(_0x445bdb))try{rmSync(_0x445bdb,{'recursive':!![],'force':!![]}),_0x44c4dd[_0x2883cc(0x166)]('Step\x202/7:\x20.lovrabet/\x20directory\x20removed'),_0x221b35['push']({'step':0x2,'label':_0x2883cc(0x1ab),'ok':!![]});}catch(_0x103a41){_0x44c4dd[_0x2883cc(0x178)](_0x2883cc(0x170)+_0x103a41[_0x2883cc(0x159)]),_0x221b35['push']({'step':0x2,'label':_0x2883cc(0x1ab),'ok':![],'detail':_0x103a41[_0x2883cc(0x159)]});}else _0x44c4dd[_0x2883cc(0x1be)](_0x2883cc(0x1b9)),_0x221b35[_0x2883cc(0x16e)]({'step':0x2,'label':_0x2883cc(0x1ab),'ok':!![],'detail':_0x2883cc(0x1bd)});const _0x37fe27=a115_0x35aa69({'text':_0x2883cc(0x174),'color':_0x2883cc(0x1bf)})[_0x2883cc(0x157)](),_0x3dd0f4=execRemoveOldArtifacts(_0x1b67c3[_0x2883cc(0x1a0)]);_0x221b35[_0x2883cc(0x16e)](_0x3dd0f4),_0x37fe27[_0x3dd0f4['ok']?_0x2883cc(0x166):'fail'](_0x2883cc(0x1a1)+(_0x3dd0f4[_0x2883cc(0x1a4)]??(_0x3dd0f4['ok']?'done':_0x2883cc(0x192))));const _0x33035b=a115_0x35aa69({'text':_0x2883cc(0x1b7),'color':_0x2883cc(0x1bf)})[_0x2883cc(0x157)](),_0x405ac2=execCleanMcp(_0x1b67c3);_0x221b35[_0x2883cc(0x16e)](_0x405ac2),_0x33035b[_0x405ac2['ok']?_0x2883cc(0x166):_0x2883cc(0x178)](_0x2883cc(0x1ba)+(_0x405ac2[_0x2883cc(0x1a4)]??(_0x405ac2['ok']?_0x2883cc(0x156):_0x2883cc(0x192))));const _0x2a3319=a115_0x35aa69({'text':'Step\x205/7:\x20Removing\x20old\x20skill...','color':'cyan'})[_0x2883cc(0x157)](),_0x30d347=execSkillsRemove(_0x107bee,_0x4ba554);_0x221b35[_0x2883cc(0x16e)](_0x30d347),_0x2a3319[_0x30d347['ok']?_0x2883cc(0x166):_0x2883cc(0x178)](_0x2883cc(0x18e)+(_0x30d347[_0x2883cc(0x1a4)]??(_0x30d347['ok']?_0x2883cc(0x156):_0x2883cc(0x192))));const _0x5e1b2b=a115_0x35aa69({'text':_0x2883cc(0x1ce),'color':_0x2883cc(0x1bf)})[_0x2883cc(0x157)](),_0x22e23c=execSkillsAdd(_0x107bee,_0x4ba554);_0x221b35[_0x2883cc(0x16e)](_0x22e23c),_0x5e1b2b[_0x22e23c['ok']?_0x2883cc(0x166):_0x2883cc(0x178)](_0x2883cc(0x1ad)+(_0x22e23c[_0x2883cc(0x1a4)]??(_0x22e23c['ok']?_0x2883cc(0x156):_0x2883cc(0x192))));const _0x46ff3d=a115_0x35aa69({'text':_0x2883cc(0x1a3),'color':_0x2883cc(0x1bf)})[_0x2883cc(0x157)](),_0x41fc74=execUpgradeSdk(_0x1b67c3);_0x221b35[_0x2883cc(0x16e)](_0x41fc74),_0x46ff3d[_0x41fc74['ok']?'succeed':'fail'](_0x2883cc(0x181)+(_0x41fc74['detail']??(_0x41fc74['ok']?_0x2883cc(0x156):_0x2883cc(0x192)))),printSummary(_0x221b35);const _0x5382d4=_0x221b35[_0x2883cc(0x160)](_0x2eba4b=>!_0x2eba4b['ok']);_0x5382d4?console[_0x2883cc(0x1c0)](a115_0x3bc237[_0x2883cc(0x18a)](_0x2883cc(0x177))):console[_0x2883cc(0x1c0)](a115_0x3bc237[_0x2883cc(0x1a7)](_0x2883cc(0x16b))),_0x41fc74['ok']&&_0x1b67c3[_0x2883cc(0x1c4)]&&(console[_0x2883cc(0x1c0)](''),console['log'](a115_0x3bc237[_0x2883cc(0x19d)]['cyan'](_0x2883cc(0x16f))),console[_0x2883cc(0x1c0)](a115_0x3bc237['cyan']('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x2883cc(0x1c0)](''),console[_0x2883cc(0x1c0)](a115_0x3bc237[_0x2883cc(0x185)]('\x20\x20npm\x20install')),console[_0x2883cc(0x1c0)](a115_0x3bc237[_0x2883cc(0x185)](_0x2883cc(0x1a9))),console[_0x2883cc(0x1c0)](a115_0x3bc237[_0x2883cc(0x185)](_0x2883cc(0x17f))),console[_0x2883cc(0x1c0)](''));}
1
+ const a116_0x4b40f6=a116_0x4799;(function(_0x4197e8,_0x552440){const _0x4769b3=a116_0x4799,_0x4a43f0=_0x4197e8();while(!![]){try{const _0x11b658=parseInt(_0x4769b3(0x1c4))/0x1+parseInt(_0x4769b3(0x1b1))/0x2+-parseInt(_0x4769b3(0x1c8))/0x3+parseInt(_0x4769b3(0x209))/0x4+parseInt(_0x4769b3(0x1af))/0x5+parseInt(_0x4769b3(0x21e))/0x6*(-parseInt(_0x4769b3(0x224))/0x7)+-parseInt(_0x4769b3(0x22a))/0x8*(-parseInt(_0x4769b3(0x1bb))/0x9);if(_0x11b658===_0x552440)break;else _0x4a43f0['push'](_0x4a43f0['shift']());}catch(_0x336541){_0x4a43f0['push'](_0x4a43f0['shift']());}}}(a116_0x244d,0x536e3));import a116_0x49b081 from'chalk';import a116_0x529828 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';function a116_0x244d(){const _0xdb8fb5=['undefined','Step\x201/7:\x20Migrating\x20config...','white','yes','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','\x20removed','.bak','string','@lovrabet/sdk','gray','skipped','CANCEL','no\x20legacy\x20entry','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','files','Upgrade\x20completed\x20successfully!','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','utf8','Step\x206/7:\x20Installing\x20new\x20skill...','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','Remove\x20old\x20skill','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','\x20\x20#\x20or','\x20\x20Step\x20','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','error','includes','cyan','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','label','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','fail','Step\x204/7:\x20Cleaning\x20MCP\x20config...','@lovrabet/sdk:','\x20→\x20latest','push','Clean\x20MCP\x20config','join','none\x20found','FAIL','sdkUpgrade','path','.cursor/mcp.json','\x20from\x20','Remove\x20.lovrabet/','detail','parse','exit\x20','step','.lovrabet','Upgrade\x20@lovrabet/sdk','some','mcpServers','failed','start','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','no\x20matching\x20entry\x20found','inherit','535584sSjpPg','Step\x204/7:\x20MCP\x20config\x20—\x20','Config\x20migration','\x20\x20Action:\x20delete','keys','lovrabet/rabetbase\x20installed\x20globally','\x20\x20npm\x20install','already\x20exists\x20(will\x20merge)','FOUND','succeed','values','lovrabet/rabetbase','.claude/skills/lovrabet','Config\x20file:','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','lovrabet/lovrabet-skill\x20removed','dependencies','args','status','devDependencies','info','24GbPvBq','\x20(backup:\x20','Upgrade\x20cancelled.','@lovrabet/dataset-mcp-server','skipped\x20(no\x20legacy\x20config)','not\x20found\x20or\x20already\x20at\x20latest','1148609MdXBJr','MCP\x20config:','green','red','object','oldMcpConfig','40tGMXqY','package.json','\x20→\x20','needed','143150jSRtYm','entries','562598UjKlzO','no\x20legacy\x20config\x20found','bold','oldPath','filter','stringify','message','[\x22@lovrabet/sdk\x22]:\x20','latest','oldArtifacts','510795xDvQpr','.cursor/rules/lovrabet_rules.mdc','Install\x20new\x20skill','done','length','\x20\x20\x20\x20\x20\x20\x20','hasNewConfig','Skill\x20swap:','yellow','462971JFmyeZ','configMigration','fields','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','577476sbJMRP','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','log'];a116_0x244d=function(){return _0xdb8fb5;};return a116_0x244d();}import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a116_0x4b40f6(0x1b5)](_0x1bc44f=>_0x1bc44f!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x1c0c76){const _0x3f0abd=a116_0x4b40f6,_0x3cbed8=[];for(const _0xd71aa1 of Object[_0x3f0abd(0x213)](CORE_IDE_CONFIGS)){if(_0xd71aa1['files'])for(const _0xa07b12 of _0xd71aa1[_0x3f0abd(0x1db)]){_0x3cbed8[_0x3f0abd(0x1f2)](resolve(_0x1c0c76,_0xa07b12[_0x3f0abd(0x1f8)]));}}return _0x3cbed8;}function analyse(_0x3ab195){const _0x26f449=a116_0x4b40f6;let _0x274fa1=null;const _0x91bdd1=resolve(_0x3ab195,NEW_CONFIG_NAME),_0x2bcc63=existsSync(_0x91bdd1);for(const _0x22189d of LEGACY_CONFIG_NAMES){const _0x4476e9=resolve(_0x3ab195,_0x22189d);if(existsSync(_0x4476e9)){const _0x3c696c=readConfigFile(_0x4476e9),_0x31cf04=Object[_0x26f449(0x20d)](_0x3c696c)['filter'](_0x2d7c90=>typeof _0x3c696c[_0x2d7c90]!==_0x26f449(0x1cb));_0x274fa1={'oldPath':_0x4476e9,'hasNewConfig':_0x2bcc63,'fields':_0x31cf04};break;}}const _0x48c173=[],_0x32d023=resolve(_0x3ab195,_0x26f449(0x200));if(existsSync(_0x32d023))_0x48c173[_0x26f449(0x1f2)](_0x32d023);const _0x2714fe=resolve(_0x3ab195,_0x26f449(0x1bc));if(existsSync(_0x2714fe))_0x48c173['push'](_0x2714fe);const _0x415487=resolve(_0x3ab195,_0x26f449(0x215));if(existsSync(_0x415487))_0x48c173[_0x26f449(0x1f2)](_0x415487);for(const _0x46ffad of collectIdeSkillFiles(_0x3ab195)){if(existsSync(_0x46ffad))_0x48c173['push'](_0x46ffad);}let _0x584780=null;const _0x325316=resolve(_0x3ab195,_0x26f449(0x1f9));if(existsSync(_0x325316))try{const _0xdaeb76=JSON[_0x26f449(0x1fd)](readFileSync(_0x325316,'utf8'));if(_0xdaeb76?.[_0x26f449(0x203)]&&typeof _0xdaeb76[_0x26f449(0x203)]===_0x26f449(0x228)){const _0x780cda=[];for(const [_0x1d5989,_0x21884c]of Object[_0x26f449(0x1b0)](_0xdaeb76[_0x26f449(0x203)])){const _0x4b19b1=_0x21884c;_0x4b19b1?.['args']&&Array['isArray'](_0x4b19b1[_0x26f449(0x21a)])&&_0x4b19b1[_0x26f449(0x21a)]['some'](_0x5a817a=>typeof _0x5a817a===_0x26f449(0x1d3)&&_0x5a817a[_0x26f449(0x1e8)](_0x26f449(0x221)))&&_0x780cda[_0x26f449(0x1f2)](_0x1d5989);}_0x780cda[_0x26f449(0x1bf)]>0x0&&(_0x584780={'path':_0x325316,'keys':_0x780cda});}}catch{}const _0x4f53bc=_0x48c173[_0x26f449(0x1bf)]>0x0||_0x274fa1!==null;let _0x3ef77e=null;const _0x2e2712=resolve(_0x3ab195,_0x26f449(0x22b));if(existsSync(_0x2e2712))try{const _0x8e5865=JSON[_0x26f449(0x1fd)](readFileSync(_0x2e2712,_0x26f449(0x1de)));for(const _0x2c3bfb of[_0x26f449(0x219),_0x26f449(0x21c)]){const _0x3b1d26=_0x8e5865?.[_0x2c3bfb]?.[_0x26f449(0x1d4)];if(typeof _0x3b1d26===_0x26f449(0x1d3)){_0x3b1d26!==_0x26f449(0x1b9)&&(_0x3ef77e={'pkgPath':_0x2e2712,'currentVersion':_0x3b1d26,'field':_0x2c3bfb});break;}}}catch{}return{'configMigration':_0x274fa1,'oldArtifacts':_0x48c173,'oldMcpConfig':_0x584780,'needsSkillSwap':_0x4f53bc,'sdkUpgrade':_0x3ef77e};}function printReport(_0x3bbca8){const _0xf01661=a116_0x4b40f6,{configMigration:_0x5bb3c6,oldArtifacts:_0x546514,oldMcpConfig:_0x4f964c,needsSkillSwap:_0x38dc97}=_0x3bbca8;console[_0xf01661(0x1ca)](''),console['log'](a116_0x49b081[_0xf01661(0x1b3)]('===\x20Upgrade\x20Analysis\x20===')),console[_0xf01661(0x1ca)]('');_0x5bb3c6?(console[_0xf01661(0x1ca)](a116_0x49b081[_0xf01661(0x1e9)](_0xf01661(0x216))+('\x20\x20'+a116_0x49b081[_0xf01661(0x1c3)](_0x5bb3c6[_0xf01661(0x1b4)]))),console['log']('\x20\x20New\x20config\x20(.rabetbase.json):\x20'+(_0x5bb3c6[_0xf01661(0x1c1)]?a116_0x49b081['green'](_0xf01661(0x210)):a116_0x49b081[_0xf01661(0x1d5)]('not\x20found\x20(will\x20create)'))),console[_0xf01661(0x1ca)]('\x20\x20Fields\x20to\x20migrate:\x20'+_0x5bb3c6[_0xf01661(0x1c6)][_0xf01661(0x1f4)](',\x20')),console['log'](_0xf01661(0x1e0))):console[_0xf01661(0x1ca)](a116_0x49b081['cyan'](_0xf01661(0x216))+'\x20\x20'+a116_0x49b081[_0xf01661(0x1d5)](_0xf01661(0x1b2)));console['log']('');if(_0x546514[_0xf01661(0x1bf)]>0x0){console['log'](a116_0x49b081['cyan']('Legacy\x20artifacts:'));for(const _0x12ba2e of _0x546514){console[_0xf01661(0x1ca)]('\x20\x20'+a116_0x49b081[_0xf01661(0x227)](_0xf01661(0x211))+'\x20\x20'+_0x12ba2e);}console['log'](_0xf01661(0x20c));}else console[_0xf01661(0x1ca)](a116_0x49b081[_0xf01661(0x1e9)]('Legacy\x20artifacts:')+'\x20\x20'+a116_0x49b081['gray'](_0xf01661(0x1f5)));console[_0xf01661(0x1ca)]('');_0x4f964c?(console[_0xf01661(0x1ca)](a116_0x49b081[_0xf01661(0x1e9)](_0xf01661(0x225))+('\x20\x20'+a116_0x49b081[_0xf01661(0x1c3)](_0x4f964c['path'])+'\x20→\x20keys:\x20'+_0x4f964c[_0xf01661(0x20d)][_0xf01661(0x1f4)](',\x20'))),console[_0xf01661(0x1ca)](_0xf01661(0x1d9))):console[_0xf01661(0x1ca)](a116_0x49b081[_0xf01661(0x1e9)](_0xf01661(0x225))+'\x20\x20'+a116_0x49b081[_0xf01661(0x1d5)](_0xf01661(0x1d8)));console[_0xf01661(0x1ca)](''),console[_0xf01661(0x1ca)](a116_0x49b081['cyan'](_0xf01661(0x1c2))+('\x20\x20'+(_0x38dc97?a116_0x49b081[_0xf01661(0x1c3)](_0xf01661(0x1ae)):a116_0x49b081[_0xf01661(0x226)]('not\x20needed'))));_0x38dc97&&console[_0xf01661(0x1ca)]('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console['log']('');if(_0x3bbca8[_0xf01661(0x1f7)]){const {currentVersion:_0x5c81e2,field:_0x3bc700,pkgPath:_0x362042}=_0x3bbca8[_0xf01661(0x1f7)];console[_0xf01661(0x1ca)](a116_0x49b081['cyan']('@lovrabet/sdk:')+('\x20\x20'+a116_0x49b081[_0xf01661(0x1c3)](_0x362042))),console[_0xf01661(0x1ca)]('\x20\x20Current\x20version\x20in\x20'+_0x3bc700+':\x20'+a116_0x49b081[_0xf01661(0x1c3)](_0x5c81e2)+_0xf01661(0x1ad)+a116_0x49b081[_0xf01661(0x226)](_0xf01661(0x1b9))),console['log'](_0xf01661(0x1cf));}else console[_0xf01661(0x1ca)](a116_0x49b081[_0xf01661(0x1e9)](_0xf01661(0x1f0))+'\x20\x20'+a116_0x49b081[_0xf01661(0x1d5)](_0xf01661(0x223)));console[_0xf01661(0x1ca)]('');}function execConfigMigration(_0x1a1e97,_0x553dbf){const _0x30a7d8=a116_0x4b40f6,{configMigration:_0x507dbc}=_0x1a1e97;if(!_0x507dbc?.['oldPath'])return{'step':0x1,'label':_0x30a7d8(0x20b),'ok':!![],'detail':_0x30a7d8(0x222)};const _0x475ae1=readConfigFile(_0x507dbc[_0x30a7d8(0x1b4)]),_0x44a3d2=resolve(_0x553dbf,NEW_CONFIG_NAME),_0x3cd07b=_0x507dbc[_0x30a7d8(0x1c1)]?readConfigFile(_0x44a3d2):{};for(const [_0x5a924b,_0x2c90c2]of Object['entries'](_0x475ae1)){!(_0x5a924b in _0x3cd07b)&&(_0x3cd07b[_0x5a924b]=_0x2c90c2);}writeConfigFile(_0x44a3d2,_0x3cd07b);const _0x15f805=_0x507dbc[_0x30a7d8(0x1b4)]+_0x30a7d8(0x1d2);return renameSync(_0x507dbc[_0x30a7d8(0x1b4)],_0x15f805),{'step':0x1,'label':_0x30a7d8(0x20b),'ok':!![],'detail':_0x507dbc[_0x30a7d8(0x1b4)]+_0x30a7d8(0x1ad)+_0x44a3d2+_0x30a7d8(0x21f)+_0x15f805+')'};}function a116_0x4799(_0x2e05f9,_0x5241d7){_0x2e05f9=_0x2e05f9-0x1ad;const _0x244d13=a116_0x244d();let _0x4799fb=_0x244d13[_0x2e05f9];return _0x4799fb;}function execRemoveOldArtifacts(_0x211db6){const _0x53fc8c=a116_0x4b40f6,_0x2de9b8=[];for(const _0x46400d of _0x211db6){try{if(!existsSync(_0x46400d))continue;const _0x591362=tryStat(_0x46400d);_0x591362?.['isDirectory']()?rmSync(_0x46400d,{'recursive':!![],'force':!![]}):unlinkSync(_0x46400d);}catch(_0x2df995){_0x2de9b8[_0x53fc8c(0x1f2)](_0x46400d+':\x20'+_0x2df995['message']);}}return{'step':0x3,'label':'Remove\x20legacy\x20artifacts','ok':_0x2de9b8[_0x53fc8c(0x1bf)]===0x0,'detail':_0x2de9b8['length']>0x0?_0x211db6[_0x53fc8c(0x1bf)]-_0x2de9b8['length']+'/'+_0x211db6['length']+'\x20removed\x20('+_0x2de9b8[_0x53fc8c(0x1f4)](';\x20')+')':_0x211db6[_0x53fc8c(0x1bf)]+_0x53fc8c(0x1d1)};}function execCleanMcp(_0x5fbf51){const _0xc99bc5=a116_0x4b40f6;if(!_0x5fbf51[_0xc99bc5(0x229)])return{'step':0x4,'label':_0xc99bc5(0x1f3),'ok':!![],'detail':_0xc99bc5(0x1d6)};try{const _0x102933=readFileSync(_0x5fbf51[_0xc99bc5(0x229)][_0xc99bc5(0x1f8)],_0xc99bc5(0x1de)),_0x522f6b=JSON[_0xc99bc5(0x1fd)](_0x102933);if(_0x522f6b?.['mcpServers']&&typeof _0x522f6b[_0xc99bc5(0x203)]===_0xc99bc5(0x228)){const _0x3676de=[];for(const [_0x392487,_0x8839c7]of Object[_0xc99bc5(0x1b0)](_0x522f6b[_0xc99bc5(0x203)])){_0x8839c7?.[_0xc99bc5(0x21a)]&&Array['isArray'](_0x8839c7['args'])&&_0x8839c7[_0xc99bc5(0x21a)][_0xc99bc5(0x202)](_0xb6d8c0=>typeof _0xb6d8c0==='string'&&_0xb6d8c0['includes']('@lovrabet/dataset-mcp-server'))&&_0x3676de[_0xc99bc5(0x1f2)](_0x392487);}for(const _0x612dc7 of _0x3676de){delete _0x522f6b[_0xc99bc5(0x203)][_0x612dc7];}return _0x3676de['length']>0x0&&writeFileSync(_0x5fbf51[_0xc99bc5(0x229)][_0xc99bc5(0x1f8)],JSON[_0xc99bc5(0x1b6)](_0x522f6b,null,0x2)+'\x0a',_0xc99bc5(0x1de)),{'step':0x4,'label':_0xc99bc5(0x1f3),'ok':!![],'detail':'removed\x20'+_0x3676de[_0xc99bc5(0x1f4)](',\x20')+_0xc99bc5(0x1fa)+_0x5fbf51[_0xc99bc5(0x229)]['path']};}return{'step':0x4,'label':_0xc99bc5(0x1f3),'ok':!![],'detail':_0xc99bc5(0x207)};}catch(_0x3fd399){return{'step':0x4,'label':_0xc99bc5(0x1f3),'ok':![],'detail':_0x3fd399[_0xc99bc5(0x1b7)]};}}function execSkillsRemove(_0x4a99cd,_0x5f0cc8){const _0x4d3221=a116_0x4b40f6,_0x4c7d79=runNpxSkillsRemove(_0x4a99cd,{'stdio':'inherit','yes':_0x5f0cc8});return{'step':0x5,'label':_0x4d3221(0x1e1),'ok':_0x4c7d79['ok'],'detail':_0x4c7d79['ok']?_0x4d3221(0x218):_0x4c7d79[_0x4d3221(0x1e7)]??'exit\x20'+_0x4c7d79[_0x4d3221(0x21b)]};}function execSkillsAdd(_0x2e64ff,_0x5144b1){const _0xd1b6b4=a116_0x4b40f6,_0x59c0de=runNpxSkillsAddGlobal(_0x2e64ff,_0xd1b6b4(0x214),{'stdio':_0xd1b6b4(0x208),'yes':_0x5144b1});return{'step':0x6,'label':_0xd1b6b4(0x1bd),'ok':_0x59c0de['ok'],'detail':_0x59c0de['ok']?_0xd1b6b4(0x20e):_0x59c0de[_0xd1b6b4(0x1e7)]??_0xd1b6b4(0x1fe)+_0x59c0de[_0xd1b6b4(0x21b)]};}function execUpgradeSdk(_0x7730c4){const _0xbce458=a116_0x4b40f6;if(!_0x7730c4[_0xbce458(0x1f7)])return{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':'skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)'};const {pkgPath:_0xd08cc8,currentVersion:_0x5070c8,field:_0x4775d6}=_0x7730c4['sdkUpgrade'];try{const _0x2c1066=readFileSync(_0xd08cc8,_0xbce458(0x1de)),_0x191595=JSON[_0xbce458(0x1fd)](_0x2c1066);return _0x191595[_0x4775d6][_0xbce458(0x1d4)]=_0xbce458(0x1b9),writeFileSync(_0xd08cc8,JSON['stringify'](_0x191595,null,0x2)+'\x0a',_0xbce458(0x1de)),{'step':0x7,'label':_0xbce458(0x201),'ok':!![],'detail':_0x4775d6+_0xbce458(0x1b8)+_0x5070c8+_0xbce458(0x1f1)};}catch(_0xb6a239){return{'step':0x7,'label':_0xbce458(0x201),'ok':![],'detail':_0xb6a239['message']};}}function tryStat(_0x532ed0){try{return statSync(_0x532ed0);}catch{return undefined;}}function printSummary(_0x3d6bb3){const _0x8eb76c=a116_0x4b40f6;console['log'](''),console['log'](a116_0x49b081[_0x8eb76c(0x1b3)]('===\x20Upgrade\x20Summary\x20===')),console[_0x8eb76c(0x1ca)]('');for(const _0x3c1b25 of _0x3d6bb3){const _0x5214cb=_0x3c1b25['ok']?a116_0x49b081[_0x8eb76c(0x226)]('OK'):a116_0x49b081[_0x8eb76c(0x227)](_0x8eb76c(0x1f6));console['log']('\x20\x20'+_0x5214cb+_0x8eb76c(0x1e4)+_0x3c1b25[_0x8eb76c(0x1ff)]+':\x20'+_0x3c1b25[_0x8eb76c(0x1eb)]);if(_0x3c1b25[_0x8eb76c(0x1fc)])console[_0x8eb76c(0x1ca)](_0x8eb76c(0x1c0)+a116_0x49b081['gray'](_0x3c1b25[_0x8eb76c(0x1fc)]));}console[_0x8eb76c(0x1ca)]('');}export async function upgradeApp(_0x1a388d,_0x3e3412){const _0x26ab7e=a116_0x4b40f6,_0x15d2b2=process['cwd'](),_0x2bf743=analyse(_0x15d2b2),_0x4a7d3f=!_0x2bf743[_0x26ab7e(0x1c5)]&&_0x2bf743[_0x26ab7e(0x1ba)]['length']===0x0&&!_0x2bf743['oldMcpConfig']&&!_0x2bf743['needsSkillSwap']&&!_0x2bf743[_0x26ab7e(0x1f7)];if(_0x4a7d3f){console[_0x26ab7e(0x1ca)](a116_0x49b081[_0x26ab7e(0x226)](_0x26ab7e(0x206)));return;}printReport(_0x2bf743);const _0x2aeae8=!!(_0x3e3412[_0x26ab7e(0x1ce)]||_0x3e3412['Y']||_0x1a388d);if(!_0x2aeae8)try{const _0x351c01=await askConfirm('Proceed\x20with\x20upgrade?');if(!_0x351c01){console['log'](a116_0x49b081[_0x26ab7e(0x1d5)](_0x26ab7e(0x220)));return;}}catch(_0x4e17e2){if(_0x4e17e2?.[_0x26ab7e(0x1b7)]===_0x26ab7e(0x1d7)){console['log'](a116_0x49b081[_0x26ab7e(0x1d5)](_0x26ab7e(0x220)));return;}throw _0x4e17e2;}const _0x3a61e1=[],_0x422c7c=a116_0x529828({'text':_0x26ab7e(0x1cc),'color':_0x26ab7e(0x1e9)})['start'](),_0x3b1be9=execConfigMigration(_0x2bf743,_0x15d2b2);_0x3a61e1[_0x26ab7e(0x1f2)](_0x3b1be9),_0x422c7c[_0x3b1be9['ok']?_0x26ab7e(0x212):_0x26ab7e(0x1ee)]('Step\x201/7:\x20Config\x20migration\x20—\x20'+(_0x3b1be9[_0x26ab7e(0x1fc)]??(_0x3b1be9['ok']?'done':_0x26ab7e(0x204))));const _0x5abf78=resolve(_0x15d2b2,_0x26ab7e(0x200)),_0x3598ef=a116_0x529828({'text':_0x26ab7e(0x1ea),'color':_0x26ab7e(0x1e9)})[_0x26ab7e(0x205)]();if(existsSync(_0x5abf78))try{rmSync(_0x5abf78,{'recursive':!![],'force':!![]}),_0x3598ef[_0x26ab7e(0x212)](_0x26ab7e(0x1e6)),_0x3a61e1[_0x26ab7e(0x1f2)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0xcb455c){_0x3598ef[_0x26ab7e(0x1ee)](_0x26ab7e(0x1c7)+_0xcb455c['message']),_0x3a61e1[_0x26ab7e(0x1f2)]({'step':0x2,'label':_0x26ab7e(0x1fb),'ok':![],'detail':_0xcb455c[_0x26ab7e(0x1b7)]});}else _0x3598ef[_0x26ab7e(0x21d)](_0x26ab7e(0x1c9)),_0x3a61e1['push']({'step':0x2,'label':_0x26ab7e(0x1fb),'ok':!![],'detail':'skipped'});const _0x5d4dfe=a116_0x529828({'text':_0x26ab7e(0x1e2),'color':_0x26ab7e(0x1e9)})[_0x26ab7e(0x205)](),_0x2659d9=execRemoveOldArtifacts(_0x2bf743[_0x26ab7e(0x1ba)]);_0x3a61e1[_0x26ab7e(0x1f2)](_0x2659d9),_0x5d4dfe[_0x2659d9['ok']?_0x26ab7e(0x212):_0x26ab7e(0x1ee)](_0x26ab7e(0x1dd)+(_0x2659d9[_0x26ab7e(0x1fc)]??(_0x2659d9['ok']?_0x26ab7e(0x1be):_0x26ab7e(0x204))));const _0x16c3f6=a116_0x529828({'text':_0x26ab7e(0x1ef),'color':_0x26ab7e(0x1e9)})[_0x26ab7e(0x205)](),_0x15ed1e=execCleanMcp(_0x2bf743);_0x3a61e1[_0x26ab7e(0x1f2)](_0x15ed1e),_0x16c3f6[_0x15ed1e['ok']?_0x26ab7e(0x212):_0x26ab7e(0x1ee)](_0x26ab7e(0x20a)+(_0x15ed1e[_0x26ab7e(0x1fc)]??(_0x15ed1e['ok']?_0x26ab7e(0x1be):_0x26ab7e(0x204))));const _0xcfb1c=a116_0x529828({'text':'Step\x205/7:\x20Removing\x20old\x20skill...','color':_0x26ab7e(0x1e9)})[_0x26ab7e(0x205)](),_0x4c72b5=execSkillsRemove(_0x15d2b2,_0x2aeae8);_0x3a61e1[_0x26ab7e(0x1f2)](_0x4c72b5),_0xcfb1c[_0x4c72b5['ok']?'succeed':_0x26ab7e(0x1ee)](_0x26ab7e(0x1d0)+(_0x4c72b5[_0x26ab7e(0x1fc)]??(_0x4c72b5['ok']?_0x26ab7e(0x1be):_0x26ab7e(0x204))));const _0x374d9b=a116_0x529828({'text':_0x26ab7e(0x1df),'color':_0x26ab7e(0x1e9)})[_0x26ab7e(0x205)](),_0x52f02d=execSkillsAdd(_0x15d2b2,_0x2aeae8);_0x3a61e1['push'](_0x52f02d),_0x374d9b[_0x52f02d['ok']?_0x26ab7e(0x212):_0x26ab7e(0x1ee)](_0x26ab7e(0x1ed)+(_0x52f02d[_0x26ab7e(0x1fc)]??(_0x52f02d['ok']?_0x26ab7e(0x1be):_0x26ab7e(0x204))));const _0x549061=a116_0x529828({'text':_0x26ab7e(0x217),'color':'cyan'})[_0x26ab7e(0x205)](),_0x2a5dbf=execUpgradeSdk(_0x2bf743);_0x3a61e1[_0x26ab7e(0x1f2)](_0x2a5dbf),_0x549061[_0x2a5dbf['ok']?_0x26ab7e(0x212):_0x26ab7e(0x1ee)](_0x26ab7e(0x1da)+(_0x2a5dbf[_0x26ab7e(0x1fc)]??(_0x2a5dbf['ok']?_0x26ab7e(0x1be):_0x26ab7e(0x204)))),printSummary(_0x3a61e1);const _0x17cb5c=_0x3a61e1[_0x26ab7e(0x202)](_0x1a45a7=>!_0x1a45a7['ok']);_0x17cb5c?console['log'](a116_0x49b081['yellow'](_0x26ab7e(0x1ec))):console[_0x26ab7e(0x1ca)](a116_0x49b081[_0x26ab7e(0x226)](_0x26ab7e(0x1dc))),_0x2a5dbf['ok']&&_0x2bf743['sdkUpgrade']&&(console[_0x26ab7e(0x1ca)](''),console[_0x26ab7e(0x1ca)](a116_0x49b081[_0x26ab7e(0x1b3)]['cyan']('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console[_0x26ab7e(0x1ca)](a116_0x49b081[_0x26ab7e(0x1e9)](_0x26ab7e(0x1e5))),console[_0x26ab7e(0x1ca)](''),console[_0x26ab7e(0x1ca)](a116_0x49b081[_0x26ab7e(0x1cd)](_0x26ab7e(0x20f))),console[_0x26ab7e(0x1ca)](a116_0x49b081[_0x26ab7e(0x1cd)](_0x26ab7e(0x1e3))),console['log'](a116_0x49b081[_0x26ab7e(0x1cd)]('\x20\x20bun\x20install')),console['log'](''));}
@@ -1 +1 @@
1
- const a116_0x4faa8b=a116_0x2d76;(function(_0x1271f8,_0xdb89d7){const _0x35da53=a116_0x2d76,_0x19601b=_0x1271f8();while(!![]){try{const _0xf8a1f0=parseInt(_0x35da53(0x1f8))/0x1+parseInt(_0x35da53(0x201))/0x2*(parseInt(_0x35da53(0x1f4))/0x3)+-parseInt(_0x35da53(0x21a))/0x4+parseInt(_0x35da53(0x221))/0x5*(parseInt(_0x35da53(0x20a))/0x6)+parseInt(_0x35da53(0x1fd))/0x7+-parseInt(_0x35da53(0x220))/0x8*(parseInt(_0x35da53(0x1fb))/0x9)+-parseInt(_0x35da53(0x218))/0xa;if(_0xf8a1f0===_0xdb89d7)break;else _0x19601b['push'](_0x19601b['shift']());}catch(_0x736310){_0x19601b['push'](_0x19601b['shift']());}}}(a116_0x576b,0x18cce));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dataDefinitions}from'../commands/data/index.js';import{dbDefinitions}from'../commands/db/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{appDefinitions}from'../commands/app/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';function a116_0x2d76(_0x508e84,_0x488dd9){_0x508e84=_0x508e84-0x1ef;const _0x576b8e=a116_0x576b();let _0x2d7663=_0x576b8e[_0x508e84];return _0x2d7663;}import{issueDefinitions}from'../commands/issue/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{projectDefinitions}from'../commands/project/index.js';function a116_0x576b(){const _0x1a8edc=['Menu','36252FQKied','Code\x20Generation','auth','51165phplXs','Platform\x20Issue','895650tMSxZP','Dataset\x20&\x20Operations','show','service','1050nGgjrp','Configuration','create','App\x20Management','skill','\x20\x20[high-risk-write]','start','write','read','773070fTUCNZ','SQL\x20Queries','description','commands','from','defaultCommand','Logs','isSingleCommand','Quick\x20Start','set','build','risk','run','Authentication','1090830rvXyJq','command','796808COslkg','logout','Diagnostics','values','wildcardDef','push','24PPoXGh','5FfcNGA','login','install','Run\x20any\x20package.json\x20script','Instant\x20API','has','765vbxUDi','Skills','get'];a116_0x576b=function(){return _0x1a8edc;};return a116_0x576b();}import{initDefinitions}from'../commands/init/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x18e0f7){const _0x9ce34b=a116_0x2d76;for(const _0x59f155 of _0x18e0f7){definitions[_0x9ce34b(0x213)](_0x59f155[_0x9ce34b(0x200)]+':'+_0x59f155[_0x9ce34b(0x219)],_0x59f155);let _0x4a8c6b=serviceGroups[_0x9ce34b(0x1f6)](_0x59f155[_0x9ce34b(0x200)]);!_0x4a8c6b&&(_0x4a8c6b=[],serviceGroups[_0x9ce34b(0x213)](_0x59f155[_0x9ce34b(0x200)],_0x4a8c6b)),_0x4a8c6b[_0x9ce34b(0x21f)](_0x59f155);}}function registerDeclarativeService(_0x47828c,_0x16febf,_0x1bb5b3){const _0x10194b=a116_0x2d76;registerDefinitions(_0x16febf);_0x1bb5b3?.[_0x10194b(0x21e)]&&registerDefinitions([_0x1bb5b3[_0x10194b(0x21e)]]);const _0x112329=_0x1cd7de=>_0x1cd7de===_0x10194b(0x209)?'':_0x1cd7de===_0x10194b(0x208)?'\x20\x20[write]':_0x10194b(0x206),_0x1fae8b={'service':_0x16febf[0x0][_0x10194b(0x200)],'label':_0x47828c,'commands':_0x16febf['map'](_0x289b2c=>({'command':_0x289b2c[_0x10194b(0x219)],'description':_0x289b2c[_0x10194b(0x20c)],'tag':_0x112329(_0x289b2c[_0x10194b(0x215)])})),'declarative':!![],'defaultCommand':_0x1bb5b3?.[_0x10194b(0x20f)]??(_0x1bb5b3?.[_0x10194b(0x211)]?_0x16febf[0x0]['command']:undefined),'wildcardDef':_0x1bb5b3?.[_0x10194b(0x21e)],'isSingleCommand':_0x1bb5b3?.[_0x10194b(0x211)]};serviceRegistry[_0x10194b(0x21f)](_0x1fae8b),serviceByName['set'](_0x1fae8b[_0x10194b(0x200)],_0x1fae8b);}registerDeclarativeService(a116_0x4faa8b(0x212),initDefinitions,{'defaultCommand':a116_0x4faa8b(0x216),'isSingleCommand':!![]}),registerDeclarativeService('Project',projectDefinitions),registerDeclarativeService(a116_0x4faa8b(0x204),appDefinitions),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry['length']-0x1];last[a116_0x4faa8b(0x20d)]=[{'command':'<script>','description':a116_0x4faa8b(0x1f1),'tag':''}];}registerDeclarativeService(a116_0x4faa8b(0x217),authDefinitions,{'defaultCommand':a116_0x4faa8b(0x1ef)}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a116_0x4faa8b(0x21c),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a116_0x4faa8b(0x202),configDefinitions),registerDeclarativeService(a116_0x4faa8b(0x1fc),issueDefinitions),registerDeclarativeService('API',apiDefinitions),registerDeclarativeService(a116_0x4faa8b(0x1f7),menuDefinitions),registerDeclarativeService('Database\x20Connections',dbDefinitions),registerDeclarativeService(a116_0x4faa8b(0x1fe),datasetDefinitions),registerDeclarativeService('Smart\x20List\x20Pages',pageDefinitions),registerDeclarativeService(a116_0x4faa8b(0x1f2),dataDefinitions),registerDeclarativeService('BFF\x20Scripts',bffDefinitions),registerDeclarativeService(a116_0x4faa8b(0x20b),sqlDefinitions),registerDeclarativeService(a116_0x4faa8b(0x1f9),codegenDefinitions),registerDeclarativeService(a116_0x4faa8b(0x1f5),skillDefinitions),registerDeclarativeService(a116_0x4faa8b(0x210),logsDefinitions,{'defaultCommand':a116_0x4faa8b(0x1ff)});export const deprecatedAliases={'create':{'service':'project','command':a116_0x4faa8b(0x203)},'start':{'service':a116_0x4faa8b(0x216),'command':a116_0x4faa8b(0x207)},'build':{'service':a116_0x4faa8b(0x216),'command':a116_0x4faa8b(0x214)},'preview':{'service':'run','command':'preview'},'logout':{'service':a116_0x4faa8b(0x1fa),'command':a116_0x4faa8b(0x21b)},'skills':{'service':a116_0x4faa8b(0x205),'command':a116_0x4faa8b(0x1f0)}};export const deprecatedSubcommands={'bff':{'new':'create'},'sql':{'new':'create'}};export function resolveDeprecatedSubcommand(_0xa8ea6,_0x1cc023){return deprecatedSubcommands[_0xa8ea6]?.[_0x1cc023];}export function findDefinition(_0x3e2b3a,_0xede2f2){return definitions['get'](_0x3e2b3a+':'+_0xede2f2);}export function isKnownService(_0x16f4f5){return serviceByName['has'](_0x16f4f5);}export function isDeclarativeService(_0x4c7dbf){const _0x21764b=a116_0x4faa8b;return serviceGroups[_0x21764b(0x1f3)](_0x4c7dbf)||serviceByName['get'](_0x4c7dbf)?.[_0x21764b(0x21e)]!==undefined;}export function getServiceEntry(_0x1370a6){const _0x29388f=a116_0x4faa8b;return serviceByName[_0x29388f(0x1f6)](_0x1370a6);}export function getLegacyHandler(_0xcf8a06,_0x119a55){return undefined;}export function getAllDefinitions(){const _0x4243cf=a116_0x4faa8b;return Array[_0x4243cf(0x20e)](definitions[_0x4243cf(0x21d)]());}
1
+ const a117_0x303d17=a117_0x21c0;(function(_0x2d3fb4,_0x15510c){const _0x406d1f=a117_0x21c0,_0x194865=_0x2d3fb4();while(!![]){try{const _0x1994d6=parseInt(_0x406d1f(0xc7))/0x1*(-parseInt(_0x406d1f(0xd6))/0x2)+-parseInt(_0x406d1f(0xd2))/0x3*(parseInt(_0x406d1f(0xbd))/0x4)+parseInt(_0x406d1f(0xbf))/0x5+parseInt(_0x406d1f(0xb0))/0x6*(-parseInt(_0x406d1f(0xcc))/0x7)+-parseInt(_0x406d1f(0xa8))/0x8+parseInt(_0x406d1f(0xba))/0x9+-parseInt(_0x406d1f(0xaf))/0xa*(parseInt(_0x406d1f(0xb6))/0xb);if(_0x1994d6===_0x15510c)break;else _0x194865['push'](_0x194865['shift']());}catch(_0x42ba74){_0x194865['push'](_0x194865['shift']());}}}(a117_0x5699,0x73471));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dataDefinitions}from'../commands/data/index.js';import{dbDefinitions}from'../commands/db/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{appDefinitions}from'../commands/app/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x12ffab){const _0x23eb28=a117_0x21c0;for(const _0x4b1669 of _0x12ffab){definitions[_0x23eb28(0xc1)](_0x4b1669[_0x23eb28(0xd7)]+':'+_0x4b1669[_0x23eb28(0xab)],_0x4b1669);let _0x1f2201=serviceGroups[_0x23eb28(0xd1)](_0x4b1669[_0x23eb28(0xd7)]);!_0x1f2201&&(_0x1f2201=[],serviceGroups[_0x23eb28(0xc1)](_0x4b1669[_0x23eb28(0xd7)],_0x1f2201)),_0x1f2201[_0x23eb28(0xbc)](_0x4b1669);}}function registerDeclarativeService(_0x2f9f74,_0x578bcf,_0x1800ca){const _0x5c2020=a117_0x21c0;registerDefinitions(_0x578bcf);_0x1800ca?.[_0x5c2020(0xcd)]&&registerDefinitions([_0x1800ca[_0x5c2020(0xcd)]]);const _0x5eff22=_0x4eb366=>_0x4eb366===_0x5c2020(0xaa)?'':_0x4eb366===_0x5c2020(0xc9)?_0x5c2020(0xb2):_0x5c2020(0xd0),_0x59ac3a={'service':_0x578bcf[0x0][_0x5c2020(0xd7)],'label':_0x2f9f74,'commands':_0x578bcf[_0x5c2020(0xb4)](_0x522bfd=>({'command':_0x522bfd[_0x5c2020(0xab)],'description':_0x522bfd[_0x5c2020(0xda)],'tag':_0x5eff22(_0x522bfd[_0x5c2020(0xd4)])})),'declarative':!![],'defaultCommand':_0x1800ca?.[_0x5c2020(0xb9)]??(_0x1800ca?.[_0x5c2020(0xd5)]?_0x578bcf[0x0][_0x5c2020(0xab)]:undefined),'wildcardDef':_0x1800ca?.['wildcardDef'],'isSingleCommand':_0x1800ca?.['isSingleCommand']};serviceRegistry[_0x5c2020(0xbc)](_0x59ac3a),serviceByName[_0x5c2020(0xc1)](_0x59ac3a[_0x5c2020(0xd7)],_0x59ac3a);}registerDeclarativeService('Quick\x20Start',initDefinitions,{'defaultCommand':a117_0x303d17(0xd3),'isSingleCommand':!![]}),registerDeclarativeService(a117_0x303d17(0xbe),projectDefinitions),registerDeclarativeService(a117_0x303d17(0xad),appDefinitions),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});function a117_0x5699(){const _0x9cf5e0=['255GjolqX','run','risk','isSingleCommand','2Kvtwkm','service','Authentication','<script>','description','2020368EeZePv','skill','read','command','Instant\x20API','App\x20Management','API','10YMdhOb','42VvzefG','login','\x20\x20[write]','Dataset\x20&\x20Operations','map','preview','2723732QtIXxF','length','Database\x20Connections','defaultCommand','7755120FoDnxY','Run\x20any\x20package.json\x20script','push','6788EvYltA','Project','4222040uUAQyl','has','set','commands','Logs','from','Schema','auth','8137aZsDgd','build','write','Diagnostics','Configuration','581371jJlmih','wildcardDef','Smart\x20List\x20Pages','Skills','\x20\x20[high-risk-write]','get'];a117_0x5699=function(){return _0x9cf5e0;};return a117_0x5699();}{const last=serviceRegistry[serviceRegistry[a117_0x303d17(0xb7)]-0x1];last[a117_0x303d17(0xc2)]=[{'command':a117_0x303d17(0xd9),'description':a117_0x303d17(0xbb),'tag':''}];}registerDeclarativeService(a117_0x303d17(0xd8),authDefinitions,{'defaultCommand':a117_0x303d17(0xb1)}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a117_0x303d17(0xca),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a117_0x303d17(0xc5),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a117_0x303d17(0xcb),configDefinitions),registerDeclarativeService('Platform\x20Issue',issueDefinitions),registerDeclarativeService(a117_0x303d17(0xae),apiDefinitions),registerDeclarativeService('Menu',menuDefinitions),registerDeclarativeService(a117_0x303d17(0xb8),dbDefinitions),registerDeclarativeService(a117_0x303d17(0xb3),datasetDefinitions),registerDeclarativeService(a117_0x303d17(0xce),pageDefinitions),registerDeclarativeService(a117_0x303d17(0xac),dataDefinitions),registerDeclarativeService('BFF\x20Scripts',bffDefinitions),registerDeclarativeService('SQL\x20Queries',sqlDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService(a117_0x303d17(0xcf),skillDefinitions),registerDeclarativeService(a117_0x303d17(0xc3),logsDefinitions,{'defaultCommand':'show'});export const deprecatedAliases={'create':{'service':'project','command':'create'},'start':{'service':a117_0x303d17(0xd3),'command':'start'},'build':{'service':a117_0x303d17(0xd3),'command':a117_0x303d17(0xc8)},'preview':{'service':'run','command':a117_0x303d17(0xb5)},'logout':{'service':a117_0x303d17(0xc6),'command':'logout'},'skills':{'service':a117_0x303d17(0xa9),'command':'install'}};export const deprecatedSubcommands={'bff':{'new':'create'},'sql':{'new':'create'}};export function resolveDeprecatedSubcommand(_0x5323b1,_0x3585f0){return deprecatedSubcommands[_0x5323b1]?.[_0x3585f0];}export function findDefinition(_0x9df39b,_0x2c2878){const _0x5ebcf1=a117_0x303d17;return definitions[_0x5ebcf1(0xd1)](_0x9df39b+':'+_0x2c2878);}export function isKnownService(_0x597562){const _0x1b1000=a117_0x303d17;return serviceByName[_0x1b1000(0xc0)](_0x597562);}export function isDeclarativeService(_0x3a6dee){const _0x4350ba=a117_0x303d17;return serviceGroups[_0x4350ba(0xc0)](_0x3a6dee)||serviceByName['get'](_0x3a6dee)?.[_0x4350ba(0xcd)]!==undefined;}function a117_0x21c0(_0xb4101f,_0x54b61a){_0xb4101f=_0xb4101f-0xa8;const _0x56997c=a117_0x5699();let _0x21c0b4=_0x56997c[_0xb4101f];return _0x21c0b4;}export function getServiceEntry(_0x37fd0f){const _0x2a0138=a117_0x303d17;return serviceByName[_0x2a0138(0xd1)](_0x37fd0f);}export function getLegacyHandler(_0x80a53,_0x393114){return undefined;}export function getAllDefinitions(){const _0x400d9d=a117_0x303d17;return Array[_0x400d9d(0xc4)](definitions['values']());}
@@ -1 +1 @@
1
- const a117_0x152186=a117_0x44ee;function a117_0x44ee(_0x3dfa94,_0x181ecc){_0x3dfa94=_0x3dfa94-0xf7;const _0x48c323=a117_0x48c3();let _0x44ee16=_0x48c323[_0x3dfa94];return _0x44ee16;}(function(_0xa16168,_0x2a92a3){const _0x2383b3=a117_0x44ee,_0x39c9c7=_0xa16168();while(!![]){try{const _0x291894=-parseInt(_0x2383b3(0x103))/0x1*(-parseInt(_0x2383b3(0x108))/0x2)+-parseInt(_0x2383b3(0x13c))/0x3*(parseInt(_0x2383b3(0x109))/0x4)+parseInt(_0x2383b3(0x10a))/0x5*(-parseInt(_0x2383b3(0x123))/0x6)+-parseInt(_0x2383b3(0xfb))/0x7*(-parseInt(_0x2383b3(0x12c))/0x8)+-parseInt(_0x2383b3(0xff))/0x9*(-parseInt(_0x2383b3(0xfd))/0xa)+parseInt(_0x2383b3(0x12b))/0xb*(-parseInt(_0x2383b3(0x116))/0xc)+parseInt(_0x2383b3(0x122))/0xd;if(_0x291894===_0x2a92a3)break;else _0x39c9c7['push'](_0x39c9c7['shift']());}catch(_0x8d1c37){_0x39c9c7['push'](_0x39c9c7['shift']());}}}(a117_0x48c3,0x1fd1f));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';import{resolve,delimiter,join}from'node:path';import{spawn}from'node:child_process';import{CliErrors}from'../../errors.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set([a117_0x152186(0x127),a117_0x152186(0x13f)]);function readPackageScripts(_0x142e78){const _0x143593=a117_0x152186,_0x3dba35=resolve(_0x142e78,_0x143593(0xf9));if(!existsSync(_0x3dba35))return null;try{const _0x66b43a=JSON[_0x143593(0x137)](readFileSync(_0x3dba35,_0x143593(0x11f)));return _0x66b43a[_0x143593(0x12d)]??{};}catch{return null;}}function detectPackageManager(_0x4a0ccb){const _0x14b228=a117_0x152186;if(existsSync(resolve(_0x4a0ccb,_0x14b228(0x107)))||existsSync(resolve(_0x4a0ccb,_0x14b228(0x136))))return _0x14b228(0x10b);if(existsSync(resolve(_0x4a0ccb,_0x14b228(0x114))))return'pnpm';if(existsSync(resolve(_0x4a0ccb,_0x14b228(0x138))))return _0x14b228(0x132);return _0x14b228(0x125);}function a117_0x48c3(){const _0x4eeb4f=['yarn','log','keys','validation','bun.lock','parse','yarn.lock','push','boolean','Script\x20\x22','1563PPHxFb','belowMinimum','cwd','dev','length','bool','package.json','close','35aBSUDc','run','30IZgWxR','map','26379RwnlxB','error','vite\x20preview\x20exited\x20with\x20code\x20','has','37402EcBMHD','entries','watch','\x20exited\x20with\x20code\x20','bun.lockb','4sjTNMN','1940EfaVSR','198950pBlFfE','bun','\x20run\x20preview','Script\x20name\x20defined\x20in\x20package.json','padEnd','\x0a\x20\x20Available\x20scripts:\x0a','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','Available:\x20','.bin','\x20\x20\x20\x20','pnpm-lock.yaml','node_modules','156BmKahb','\x20run\x20start','join','\x0a\x20\x20Usage:\x20','\x20run\x20','\x20\x20AVAILABLE\x20SCRIPTS\x20\x20(current\x20project)','No\x20package.json\x20found\x20in\x20current\x20directory.','read','No\x20scripts\x20defined\x20in\x20package.json.','utf-8','args','\x20run\x20preview\x20--watch\x20\x20\x20#\x20parallel\x20build\x20--watch\x20+\x20preview','4031261BKdIil','36uzQqYZ','vite','npm','(none)','start','Enable\x20watch\x20mode\x20for\x20preview','--watch','max','6853mltFtu','377864gpbeRr','scripts','\x20run\x20<script>\x0a','inherit','preview','slice'];a117_0x48c3=function(){return _0x4eeb4f;};return a117_0x48c3();}async function versionCheck(_0x121b67){const _0x1a4473=a117_0x152186,_0xd7bda5=await checkCliVersion();(_0xd7bda5['needsUpgrade']||_0xd7bda5[_0x1a4473(0x13d)])&&(printCliUpgradeWarning(_0xd7bda5),assertCliVersionSupported(_0xd7bda5));const _0x2f87fa=await checkSdkVersion(_0x121b67);if(_0x2f87fa['needsUpgrade'])printSdkUpgradeWarning(_0x2f87fa);}function spawnScript(_0x27ee2a,_0x5bfd06,_0x4c1526,_0x41cbb5){return new Promise((_0x18b544,_0x4c86cc)=>{const _0x46b206=a117_0x44ee,_0x4b5c9b=[_0x46b206(0xfc),_0x5bfd06,..._0x4c1526],_0x4a41a4=spawn(_0x27ee2a,_0x4b5c9b,{'cwd':_0x41cbb5,'stdio':'inherit','shell':!![],'env':{...process.env,'PATH':''+join(_0x41cbb5,_0x46b206(0x115),_0x46b206(0x112))+delimiter+process.env.PATH}});_0x4a41a4['on']('close',_0x2b9ad3=>{const _0x4b2aef=_0x46b206;if(_0x2b9ad3===0x0||_0x2b9ad3===null)_0x18b544();else _0x4c86cc(new Error(_0x27ee2a+_0x4b2aef(0x11a)+_0x5bfd06+_0x4b2aef(0x106)+_0x2b9ad3));}),_0x4a41a4['on'](_0x46b206(0x100),_0x4c86cc);});}function spawnViteBuildWatch(_0x4c0675){return new Promise((_0x2978cd,_0x11ef1e)=>{const _0x251535=a117_0x44ee,_0x1c9d73=spawn(_0x251535(0x124),['build',_0x251535(0x129)],{'cwd':_0x4c0675,'stdio':_0x251535(0x12f),'shell':!![],'env':{...process.env,'PATH':''+join(_0x4c0675,'node_modules',_0x251535(0x112))+delimiter+process.env.PATH}});_0x1c9d73['on'](_0x251535(0xfa),_0x4e8baf=>{const _0x10be20=_0x251535;if(_0x4e8baf===0x0||_0x4e8baf===null)_0x2978cd();else _0x11ef1e(new Error(_0x10be20(0x110)+_0x4e8baf));}),_0x1c9d73['on'](_0x251535(0x100),_0x11ef1e);});}function spawnVitePreview(_0x4cbcee){return new Promise((_0xadef68,_0x45a06b)=>{const _0x1043bd=a117_0x44ee,_0x4911bb=spawn(_0x1043bd(0x124),[_0x1043bd(0x130)],{'cwd':_0x4cbcee,'stdio':'inherit','shell':!![],'env':{...process.env,'PATH':''+join(_0x4cbcee,_0x1043bd(0x115),_0x1043bd(0x112))+delimiter+process.env.PATH}});_0x4911bb['on'](_0x1043bd(0xfa),_0x480e2e=>{const _0x18853b=_0x1043bd;if(_0x480e2e===0x0||_0x480e2e===null)_0xadef68();else _0x45a06b(new Error(_0x18853b(0x101)+_0x480e2e));}),_0x4911bb['on'](_0x1043bd(0x100),_0x45a06b);});}const runFlags=[{'name':a117_0x152186(0x105),'type':a117_0x152186(0x13a),'description':a117_0x152186(0x128),'default':![]}];export const runDefinition={'service':a117_0x152186(0xfc),'command':a117_0x152186(0xfc),'description':'Run\x20a\x20package.json\x20script','risk':a117_0x152186(0x11d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'script','description':a117_0x152186(0x10d),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x4773aa=a117_0x152186,_0x5347b8=readPackageScripts(process[_0x4773aa(0x13e)]()),_0xad6b18=[];if(_0x5347b8&&Object['keys'](_0x5347b8)['length']>0x0){const _0x304a0f=Object[_0x4773aa(0x134)](_0x5347b8),_0x211611=Math[_0x4773aa(0x12a)](..._0x304a0f[_0x4773aa(0xfe)](_0x20d238=>_0x20d238[_0x4773aa(0xf7)]));_0xad6b18[_0x4773aa(0x139)](_0x4773aa(0x11b));for(const [_0x5575a6,_0x3b1275]of Object['entries'](_0x5347b8)){_0xad6b18['push'](_0x4773aa(0x113)+CLI_BIN_NAME+'\x20run\x20'+_0x5575a6['padEnd'](_0x211611+0x2)+'#\x20'+_0x3b1275);}}else _0xad6b18['push']('\x20\x20EXAMPLES'),_0xad6b18['push'](_0x4773aa(0x113)+CLI_BIN_NAME+_0x4773aa(0x117)),_0xad6b18[_0x4773aa(0x139)]('\x20\x20\x20\x20'+CLI_BIN_NAME+'\x20run\x20build'),_0xad6b18[_0x4773aa(0x139)](_0x4773aa(0x113)+CLI_BIN_NAME+_0x4773aa(0x10c)),_0xad6b18[_0x4773aa(0x139)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x4773aa(0x121));return _0xad6b18[_0x4773aa(0x118)]('\x0a');},async 'execute'(_0x2bbf37){const _0x53d5c0=a117_0x152186,_0x4a6155=process[_0x53d5c0(0x13e)](),_0x1cb19a=_0x2bbf37[_0x53d5c0(0x120)][0x0],_0x48980f=_0x2bbf37[_0x53d5c0(0x120)][_0x53d5c0(0x131)](0x1),_0x47b236=readPackageScripts(_0x4a6155);if(!_0x47b236)throw CliErrors['validation'](_0x53d5c0(0x11c));if(!_0x1cb19a){const _0x5371db=Object[_0x53d5c0(0x134)](_0x47b236);if(_0x5371db['length']===0x0)console['log'](_0x53d5c0(0x11e));else{console[_0x53d5c0(0x133)](_0x53d5c0(0x10f));const _0x42c4b9=Math[_0x53d5c0(0x12a)](..._0x5371db['map'](_0x5a70d1=>_0x5a70d1[_0x53d5c0(0xf7)]));for(const [_0x5a615d,_0xaaef88]of Object[_0x53d5c0(0x104)](_0x47b236)){console[_0x53d5c0(0x133)](_0x53d5c0(0x113)+_0x5a615d[_0x53d5c0(0x10e)](_0x42c4b9+0x2)+_0xaaef88);}console[_0x53d5c0(0x133)](_0x53d5c0(0x119)+CLI_BIN_NAME+_0x53d5c0(0x12e));}return{'ok':!![]};}if(!_0x47b236[_0x1cb19a])throw CliErrors[_0x53d5c0(0x135)](_0x53d5c0(0x13b)+_0x1cb19a+'\x22\x20not\x20found\x20in\x20package.json.',_0x53d5c0(0x111)+(Object[_0x53d5c0(0x134)](_0x47b236)[_0x53d5c0(0x118)](',\x20')||_0x53d5c0(0x126)));const _0x19430d=detectPackageManager(_0x4a6155);VERSION_CHECK_SCRIPTS[_0x53d5c0(0x102)](_0x1cb19a)&&await versionCheck(_0x4a6155);if(_0x1cb19a===_0x53d5c0(0x130)&&_0x2bbf37[_0x53d5c0(0xf8)](_0x53d5c0(0x105)))return await Promise['all']([spawnViteBuildWatch(_0x4a6155),spawnVitePreview(_0x4a6155)]),{'ok':!![]};return await spawnScript(_0x19430d,_0x1cb19a,_0x48980f,_0x4a6155),{'ok':!![]};}};
1
+ const a118_0x528673=a118_0x5e84;function a118_0x9c44(){const _0x3b69ad=['watch','bun','push','npm','Run\x20a\x20package.json\x20script','inherit','16OfIAly','entries','log','script','\x20run\x20start','bun.lock','\x22\x20not\x20found\x20in\x20package.json.','2662450XRXSrt','\x20run\x20preview','utf-8','boolean','\x20\x20EXAMPLES','Script\x20name\x20defined\x20in\x20package.json','validation','\x0a\x20\x20Available\x20scripts:\x0a','padEnd','node_modules','close','length','all','2PujoaS','slice','--watch','\x20\x20\x20\x20','5tGSbZw','659502uMQuIA','join','map','No\x20package.json\x20found\x20in\x20current\x20directory.','1054287DaPTXQ','start','\x20run\x20','(none)','vite\x20preview\x20exited\x20with\x20code\x20','\x20exited\x20with\x20code\x20','error','\x0a\x20\x20Usage:\x20','preview','.bin','872272lCwqMJ','Enable\x20watch\x20mode\x20for\x20preview','2996166napUTP','295074ynpXSg','read','build','needsUpgrade','yarn.lock','cwd','args','run','keys','has','Script\x20\x22','scripts','1800869Nsrjki','vite'];a118_0x9c44=function(){return _0x3b69ad;};return a118_0x9c44();}(function(_0x396f70,_0x5a3fb5){const _0x1fa9df=a118_0x5e84,_0x202812=_0x396f70();while(!![]){try{const _0x3c9779=-parseInt(_0x1fa9df(0xd4))/0x1+-parseInt(_0x1fa9df(0xbe))/0x2*(-parseInt(_0x1fa9df(0xc3))/0x3)+parseInt(_0x1fa9df(0xd1))/0x4+parseInt(_0x1fa9df(0xc2))/0x5*(parseInt(_0x1fa9df(0xd3))/0x6)+parseInt(_0x1fa9df(0xe0))/0x7*(-parseInt(_0x1fa9df(0xe8))/0x8)+parseInt(_0x1fa9df(0xc7))/0x9+parseInt(_0x1fa9df(0xef))/0xa;if(_0x3c9779===_0x5a3fb5)break;else _0x202812['push'](_0x202812['shift']());}catch(_0x37e65f){_0x202812['push'](_0x202812['shift']());}}}(a118_0x9c44,0x7cc43));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';import{resolve,delimiter,join}from'node:path';import{spawn}from'node:child_process';import{CliErrors}from'../../errors.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set([a118_0x528673(0xc8),'dev']);function a118_0x5e84(_0x447850,_0x5495c9){_0x447850=_0x447850-0xbd;const _0x9c44c5=a118_0x9c44();let _0x5e849d=_0x9c44c5[_0x447850];return _0x5e849d;}function readPackageScripts(_0x47213b){const _0x4eb7e1=a118_0x528673,_0x345817=resolve(_0x47213b,'package.json');if(!existsSync(_0x345817))return null;try{const _0x28dc4c=JSON['parse'](readFileSync(_0x345817,_0x4eb7e1(0xf1)));return _0x28dc4c[_0x4eb7e1(0xdf)]??{};}catch{return null;}}function detectPackageManager(_0x45ac58){const _0x2b3e44=a118_0x528673;if(existsSync(resolve(_0x45ac58,'bun.lockb'))||existsSync(resolve(_0x45ac58,_0x2b3e44(0xed))))return _0x2b3e44(0xe3);if(existsSync(resolve(_0x45ac58,'pnpm-lock.yaml')))return'pnpm';if(existsSync(resolve(_0x45ac58,_0x2b3e44(0xd8))))return'yarn';return _0x2b3e44(0xe5);}async function versionCheck(_0x265d0c){const _0x3728b1=a118_0x528673,_0x55aac5=await checkCliVersion();(_0x55aac5['needsUpgrade']||_0x55aac5['belowMinimum'])&&(printCliUpgradeWarning(_0x55aac5),assertCliVersionSupported(_0x55aac5));const _0x5cb601=await checkSdkVersion(_0x265d0c);if(_0x5cb601[_0x3728b1(0xd7)])printSdkUpgradeWarning(_0x5cb601);}function spawnScript(_0x1452da,_0x4afe32,_0x10e258,_0x1ff835){return new Promise((_0xc084fa,_0xe2028a)=>{const _0x457ada=a118_0x5e84,_0x5d06e0=[_0x457ada(0xdb),_0x4afe32,..._0x10e258],_0x1ba82b=spawn(_0x1452da,_0x5d06e0,{'cwd':_0x1ff835,'stdio':_0x457ada(0xe7),'shell':!![],'env':{...process.env,'PATH':''+join(_0x1ff835,_0x457ada(0xf8),'.bin')+delimiter+process.env.PATH}});_0x1ba82b['on'](_0x457ada(0xf9),_0x56695a=>{const _0x4b7765=_0x457ada;if(_0x56695a===0x0||_0x56695a===null)_0xc084fa();else _0xe2028a(new Error(_0x1452da+_0x4b7765(0xc9)+_0x4afe32+_0x4b7765(0xcc)+_0x56695a));}),_0x1ba82b['on'](_0x457ada(0xcd),_0xe2028a);});}function spawnViteBuildWatch(_0x5544ee){return new Promise((_0x588e14,_0x4bdc38)=>{const _0x33c63f=a118_0x5e84,_0x259af2=spawn(_0x33c63f(0xe1),[_0x33c63f(0xd6),_0x33c63f(0xc0)],{'cwd':_0x5544ee,'stdio':_0x33c63f(0xe7),'shell':!![],'env':{...process.env,'PATH':''+join(_0x5544ee,_0x33c63f(0xf8),_0x33c63f(0xd0))+delimiter+process.env.PATH}});_0x259af2['on'](_0x33c63f(0xf9),_0x97654e=>{if(_0x97654e===0x0||_0x97654e===null)_0x588e14();else _0x4bdc38(new Error('vite\x20build\x20--watch\x20exited\x20with\x20code\x20'+_0x97654e));}),_0x259af2['on'](_0x33c63f(0xcd),_0x4bdc38);});}function spawnVitePreview(_0x31eb77){return new Promise((_0x26d1fe,_0x5b13ea)=>{const _0xc49e72=a118_0x5e84,_0x588e1d=spawn('vite',[_0xc49e72(0xcf)],{'cwd':_0x31eb77,'stdio':'inherit','shell':!![],'env':{...process.env,'PATH':''+join(_0x31eb77,_0xc49e72(0xf8),_0xc49e72(0xd0))+delimiter+process.env.PATH}});_0x588e1d['on'](_0xc49e72(0xf9),_0x79043b=>{const _0x507f0d=_0xc49e72;if(_0x79043b===0x0||_0x79043b===null)_0x26d1fe();else _0x5b13ea(new Error(_0x507f0d(0xcb)+_0x79043b));}),_0x588e1d['on'](_0xc49e72(0xcd),_0x5b13ea);});}const runFlags=[{'name':a118_0x528673(0xe2),'type':a118_0x528673(0xf2),'description':a118_0x528673(0xd2),'default':![]}];export const runDefinition={'service':a118_0x528673(0xdb),'command':a118_0x528673(0xdb),'description':a118_0x528673(0xe6),'risk':a118_0x528673(0xd5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a118_0x528673(0xeb),'description':a118_0x528673(0xf4),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x4a7a83=a118_0x528673,_0x132aa2=readPackageScripts(process[_0x4a7a83(0xd9)]()),_0x2d8cca=[];if(_0x132aa2&&Object['keys'](_0x132aa2)[_0x4a7a83(0xfa)]>0x0){const _0x36d34a=Object[_0x4a7a83(0xdc)](_0x132aa2),_0x1d8a63=Math['max'](..._0x36d34a[_0x4a7a83(0xc5)](_0x4b70d1=>_0x4b70d1[_0x4a7a83(0xfa)]));_0x2d8cca['push']('\x20\x20AVAILABLE\x20SCRIPTS\x20\x20(current\x20project)');for(const [_0x5b2981,_0xa05ec7]of Object[_0x4a7a83(0xe9)](_0x132aa2)){_0x2d8cca[_0x4a7a83(0xe4)](_0x4a7a83(0xc1)+CLI_BIN_NAME+'\x20run\x20'+_0x5b2981[_0x4a7a83(0xf7)](_0x1d8a63+0x2)+'#\x20'+_0xa05ec7);}}else _0x2d8cca['push'](_0x4a7a83(0xf3)),_0x2d8cca['push'](_0x4a7a83(0xc1)+CLI_BIN_NAME+_0x4a7a83(0xec)),_0x2d8cca[_0x4a7a83(0xe4)](_0x4a7a83(0xc1)+CLI_BIN_NAME+'\x20run\x20build'),_0x2d8cca[_0x4a7a83(0xe4)](_0x4a7a83(0xc1)+CLI_BIN_NAME+_0x4a7a83(0xf0)),_0x2d8cca[_0x4a7a83(0xe4)](_0x4a7a83(0xc1)+CLI_BIN_NAME+'\x20run\x20preview\x20--watch\x20\x20\x20#\x20parallel\x20build\x20--watch\x20+\x20preview');return _0x2d8cca[_0x4a7a83(0xc4)]('\x0a');},async 'execute'(_0x2ee2cf){const _0x51a13b=a118_0x528673,_0x29e8cc=process[_0x51a13b(0xd9)](),_0x4a6f6d=_0x2ee2cf[_0x51a13b(0xda)][0x0],_0x7c5f1e=_0x2ee2cf[_0x51a13b(0xda)][_0x51a13b(0xbf)](0x1),_0x520985=readPackageScripts(_0x29e8cc);if(!_0x520985)throw CliErrors['validation'](_0x51a13b(0xc6));if(!_0x4a6f6d){const _0x3652ec=Object[_0x51a13b(0xdc)](_0x520985);if(_0x3652ec[_0x51a13b(0xfa)]===0x0)console['log']('No\x20scripts\x20defined\x20in\x20package.json.');else{console[_0x51a13b(0xea)](_0x51a13b(0xf6));const _0x274eda=Math['max'](..._0x3652ec['map'](_0x2aa6d6=>_0x2aa6d6[_0x51a13b(0xfa)]));for(const [_0x4a7d7b,_0x1b948a]of Object[_0x51a13b(0xe9)](_0x520985)){console[_0x51a13b(0xea)](_0x51a13b(0xc1)+_0x4a7d7b[_0x51a13b(0xf7)](_0x274eda+0x2)+_0x1b948a);}console['log'](_0x51a13b(0xce)+CLI_BIN_NAME+'\x20run\x20<script>\x0a');}return{'ok':!![]};}if(!_0x520985[_0x4a6f6d])throw CliErrors[_0x51a13b(0xf5)](_0x51a13b(0xde)+_0x4a6f6d+_0x51a13b(0xee),'Available:\x20'+(Object['keys'](_0x520985)[_0x51a13b(0xc4)](',\x20')||_0x51a13b(0xca)));const _0x156664=detectPackageManager(_0x29e8cc);VERSION_CHECK_SCRIPTS[_0x51a13b(0xdd)](_0x4a6f6d)&&await versionCheck(_0x29e8cc);if(_0x4a6f6d===_0x51a13b(0xcf)&&_0x2ee2cf['bool'](_0x51a13b(0xe2)))return await Promise[_0x51a13b(0xbd)]([spawnViteBuildWatch(_0x29e8cc),spawnVitePreview(_0x29e8cc)]),{'ok':!![]};return await spawnScript(_0x156664,_0x4a6f6d,_0x7c5f1e,_0x29e8cc),{'ok':!![]};}};
@@ -1 +1 @@
1
- function a118_0x5abb(){const _0x30b4a2=['18ujnYeR','308EUQmFQ','Export\x20machine-readable\x20command\x20schema\x20(JSON)','2324113qhdVnt','2296OrSACa','schema','978418xoYmWL','read','9099TimgZx','36375ZxkZaV','156458HUtykJ','6IVFObk','6703110Ijpmvm','315714qhfkzW'];a118_0x5abb=function(){return _0x30b4a2;};return a118_0x5abb();}const a118_0x38eb4f=a118_0x1762;(function(_0x49847c,_0x4b0a72){const _0xa6cb94=a118_0x1762,_0x49ff5d=_0x49847c();while(!![]){try{const _0x191f19=parseInt(_0xa6cb94(0x136))/0x1+parseInt(_0xa6cb94(0x141))/0x2*(parseInt(_0xa6cb94(0x142))/0x3)+-parseInt(_0xa6cb94(0x138))/0x4*(parseInt(_0xa6cb94(0x140))/0x5)+-parseInt(_0xa6cb94(0x137))/0x6*(-parseInt(_0xa6cb94(0x13d))/0x7)+parseInt(_0xa6cb94(0x13b))/0x8*(-parseInt(_0xa6cb94(0x13f))/0x9)+parseInt(_0xa6cb94(0x135))/0xa+-parseInt(_0xa6cb94(0x13a))/0xb;if(_0x191f19===_0x4b0a72)break;else _0x49ff5d['push'](_0x49ff5d['shift']());}catch(_0x1279d2){_0x49ff5d['push'](_0x49ff5d['shift']());}}}(a118_0x5abb,0x7a1de));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x54d827){const _0x58bf86=await buildSchemaPayload();return{'ok':!![],'data':_0x58bf86};}function a118_0x1762(_0x7cf73f,_0x4ee7e8){_0x7cf73f=_0x7cf73f-0x135;const _0x5abb8b=a118_0x5abb();let _0x176279=_0x5abb8b[_0x7cf73f];return _0x176279;}export const schemaDefinition={'service':a118_0x38eb4f(0x13c),'command':'export','description':a118_0x38eb4f(0x139),'risk':a118_0x38eb4f(0x13e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':'json','flags':[],'execute':execute};
1
+ function a119_0x5875(_0x109b75,_0x28b673){_0x109b75=_0x109b75-0x67;const _0x2069ae=a119_0x2069();let _0x5875ea=_0x2069ae[_0x109b75];return _0x5875ea;}const a119_0x38e417=a119_0x5875;(function(_0x3383ac,_0x4e562a){const _0x5f572d=a119_0x5875,_0x128922=_0x3383ac();while(!![]){try{const _0x3c8de5=parseInt(_0x5f572d(0x72))/0x1*(-parseInt(_0x5f572d(0x6d))/0x2)+parseInt(_0x5f572d(0x70))/0x3*(-parseInt(_0x5f572d(0x6f))/0x4)+-parseInt(_0x5f572d(0x6b))/0x5*(parseInt(_0x5f572d(0x69))/0x6)+parseInt(_0x5f572d(0x6c))/0x7+-parseInt(_0x5f572d(0x6a))/0x8+parseInt(_0x5f572d(0x75))/0x9*(parseInt(_0x5f572d(0x67))/0xa)+-parseInt(_0x5f572d(0x6e))/0xb*(-parseInt(_0x5f572d(0x76))/0xc);if(_0x3c8de5===_0x4e562a)break;else _0x128922['push'](_0x128922['shift']());}catch(_0x953ca1){_0x128922['push'](_0x128922['shift']());}}}(a119_0x2069,0xe29fb));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x13f3d9){const _0x1cfdfa=await buildSchemaPayload();return{'ok':!![],'data':_0x1cfdfa};}export const schemaDefinition={'service':a119_0x38e417(0x68),'command':a119_0x38e417(0x73),'description':'Export\x20machine-readable\x20command\x20schema\x20(JSON)','risk':a119_0x38e417(0x71),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a119_0x38e417(0x74),'flags':[],'execute':execute};function a119_0x2069(){const _0x2f6a6c=['56661SEHNct','read','2956ROYHJv','export','json','27PRcmYc','178524cFUofU','794430TmGdrG','schema','246nCLFTe','9493016eMKOZt','3470JhowNt','8878394TgLcnT','296ICzPqx','2079ojJOPL','368zxpBHN'];a119_0x2069=function(){return _0x2f6a6c;};return a119_0x2069();}