@lovrabet/rabetbase-cli 2.3.5-beta.1 → 2.3.6-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 (239) 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/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.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-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/validate.js +1 -1
  50. package/lib/commands/config/get.js +1 -1
  51. package/lib/commands/config/index.js +1 -1
  52. package/lib/commands/config/list.js +1 -1
  53. package/lib/commands/config/set.js +1 -1
  54. package/lib/commands/config/shared.js +1 -1
  55. package/lib/commands/data/filter.js +1 -1
  56. package/lib/commands/data/getOne.js +1 -1
  57. package/lib/commands/data/index.js +1 -1
  58. package/lib/commands/data/shared.js +1 -1
  59. package/lib/commands/dataset/business-group-update.js +1 -1
  60. package/lib/commands/dataset/capability.js +1 -1
  61. package/lib/commands/dataset/delete.js +1 -1
  62. package/lib/commands/dataset/detail.js +1 -1
  63. package/lib/commands/dataset/extend-update.js +1 -1
  64. package/lib/commands/dataset/field-update.js +1 -1
  65. package/lib/commands/dataset/generate.js +1 -1
  66. package/lib/commands/dataset/index.js +1 -1
  67. package/lib/commands/dataset/list.js +1 -1
  68. package/lib/commands/dataset/operations.js +1 -1
  69. package/lib/commands/dataset/relation-audit.js +1 -1
  70. package/lib/commands/dataset/relation-create.js +1 -1
  71. package/lib/commands/dataset/relation-delete.js +1 -1
  72. package/lib/commands/dataset/relation-shared.js +1 -1
  73. package/lib/commands/dataset/relation-update.js +1 -1
  74. package/lib/commands/dataset/relations.js +1 -1
  75. package/lib/commands/dataset/rename.js +1 -1
  76. package/lib/commands/dataset/restore.js +1 -1
  77. package/lib/commands/db/analyze-cancel.js +1 -1
  78. package/lib/commands/db/analyze-start.js +1 -1
  79. package/lib/commands/db/analyze-status.js +1 -1
  80. package/lib/commands/db/create.js +1 -1
  81. package/lib/commands/db/delete.js +1 -1
  82. package/lib/commands/db/detail.js +1 -1
  83. package/lib/commands/db/diff.js +1 -1
  84. package/lib/commands/db/index.js +1 -1
  85. package/lib/commands/db/list.js +1 -1
  86. package/lib/commands/db/shared.js +1 -1
  87. package/lib/commands/db/tables.js +1 -1
  88. package/lib/commands/db/test.js +1 -1
  89. package/lib/commands/db/update.js +1 -1
  90. package/lib/commands/doctor.js +1 -1
  91. package/lib/commands/init/index.js +1 -1
  92. package/lib/commands/issue/index.js +1 -1
  93. package/lib/commands/issue/nudge.js +1 -1
  94. package/lib/commands/issue/report.js +1 -1
  95. package/lib/commands/issue/shared.js +1 -1
  96. package/lib/commands/logs/index.js +1 -1
  97. package/lib/commands/menu/index.js +1 -1
  98. package/lib/commands/menu/list.js +1 -1
  99. package/lib/commands/menu/shared/compare-table.js +1 -1
  100. package/lib/commands/menu/shared/index.js +1 -1
  101. package/lib/commands/menu/shared/inquirer.js +1 -1
  102. package/lib/commands/menu/shared/local-pages.js +1 -1
  103. package/lib/commands/menu/shared/logic.js +1 -1
  104. package/lib/commands/menu/shared/service.js +1 -1
  105. package/lib/commands/menu/shared/sync-core.js +1 -1
  106. package/lib/commands/menu/shared/update-core.js +1 -1
  107. package/lib/commands/menu/shared/valid-url.js +1 -1
  108. package/lib/commands/menu/sync.js +1 -1
  109. package/lib/commands/menu/update.js +1 -1
  110. package/lib/commands/page/generate-start.js +1 -1
  111. package/lib/commands/page/generate-status.js +1 -1
  112. package/lib/commands/page/index.js +1 -1
  113. package/lib/commands/page/pull.js +1 -1
  114. package/lib/commands/page/push.js +1 -1
  115. package/lib/commands/page/relation-audit.js +1 -1
  116. package/lib/commands/page/shared.js +1 -1
  117. package/lib/commands/page/standard-page-status.js +1 -1
  118. package/lib/commands/page/sync.js +1 -1
  119. package/lib/commands/permit/index.js +1 -1
  120. package/lib/commands/permit/page-get.js +1 -1
  121. package/lib/commands/permit/page-set.js +1 -1
  122. package/lib/commands/permit/role-apis-set.js +1 -1
  123. package/lib/commands/permit/role-menus-set.js +1 -1
  124. package/lib/commands/permit/role-menus.js +1 -1
  125. package/lib/commands/permit/shared.js +1 -1
  126. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  127. package/lib/commands/project/create/format-elapsed.js +1 -1
  128. package/lib/commands/project/create/main.js +1 -1
  129. package/lib/commands/project/create/non-interactive.js +1 -1
  130. package/lib/commands/project/create/project-template-path.js +1 -1
  131. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  132. package/lib/commands/project/create/use-format-code.js +1 -1
  133. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  134. package/lib/commands/project/index.js +1 -1
  135. package/lib/commands/project/init.js +1 -1
  136. package/lib/commands/project/upgrade.js +1 -1
  137. package/lib/commands/registry.js +1 -1
  138. package/lib/commands/role/create.js +1 -1
  139. package/lib/commands/role/delete.js +1 -1
  140. package/lib/commands/role/detail.js +1 -1
  141. package/lib/commands/role/index.js +1 -1
  142. package/lib/commands/role/list.js +1 -1
  143. package/lib/commands/role/shared.js +1 -1
  144. package/lib/commands/role/update.js +1 -1
  145. package/lib/commands/role/user-add.js +1 -1
  146. package/lib/commands/role/user-remove.js +1 -1
  147. package/lib/commands/role/user-resolve.js +1 -1
  148. package/lib/commands/run/index.js +1 -1
  149. package/lib/commands/schema.js +1 -1
  150. package/lib/commands/sql/create.js +1 -1
  151. package/lib/commands/sql/delete.js +1 -1
  152. package/lib/commands/sql/detail.js +1 -1
  153. package/lib/commands/sql/exec.js +1 -1
  154. package/lib/commands/sql/index.js +1 -1
  155. package/lib/commands/sql/list.js +1 -1
  156. package/lib/commands/sql/pull.js +1 -1
  157. package/lib/commands/sql/push.js +1 -1
  158. package/lib/commands/sql/save.js +1 -1
  159. package/lib/commands/sql/shared.js +1 -1
  160. package/lib/commands/sql/status.js +1 -1
  161. package/lib/commands/sql/validate.js +1 -1
  162. package/lib/commands/workspace/add.js +1 -1
  163. package/lib/commands/workspace/index.js +1 -1
  164. package/lib/commands/workspace/remove.js +1 -1
  165. package/lib/config/schema.js +1 -1
  166. package/lib/constant/cdn.js +1 -1
  167. package/lib/constant/cli.js +1 -1
  168. package/lib/constant/defaults.js +1 -1
  169. package/lib/constant/domain.js +1 -1
  170. package/lib/constant/env.js +1 -1
  171. package/lib/constant/output.js +1 -1
  172. package/lib/constant/paths.js +1 -1
  173. package/lib/constant/risk.js +1 -1
  174. package/lib/context/app-resolver.js +1 -1
  175. package/lib/context/auth-resolver.js +1 -1
  176. package/lib/context/config-loader.js +1 -1
  177. package/lib/context.js +1 -1
  178. package/lib/core/alias-resolver.js +1 -1
  179. package/lib/core/api-client.js +1 -1
  180. package/lib/core/bff/config.js +1 -1
  181. package/lib/core/bff/file-system.js +1 -1
  182. package/lib/core/bff/hash.js +1 -1
  183. package/lib/core/bff/lock.js +1 -1
  184. package/lib/core/bff/utils.js +1 -1
  185. package/lib/core/db-resolver.js +1 -1
  186. package/lib/core/page/file-system.js +1 -1
  187. package/lib/core/page/hash.js +1 -1
  188. package/lib/core/page/lock.js +1 -1
  189. package/lib/core/sql-sync/config.js +1 -1
  190. package/lib/core/sql-sync/file-system.js +1 -1
  191. package/lib/core/sql-sync/hash.js +1 -1
  192. package/lib/core/sql-sync/lock.js +1 -1
  193. package/lib/core/sql-sync/utils.js +1 -1
  194. package/lib/core/sql-validator.js +1 -1
  195. package/lib/errors.js +1 -1
  196. package/lib/framework/build-all-flags.js +1 -1
  197. package/lib/framework/flags.js +1 -1
  198. package/lib/framework/help.js +1 -1
  199. package/lib/framework/index.js +1 -1
  200. package/lib/framework/output.js +1 -1
  201. package/lib/framework/response.js +1 -1
  202. package/lib/framework/runner-alias.js +1 -1
  203. package/lib/framework/runner.js +1 -1
  204. package/lib/framework/schema-export.js +1 -1
  205. package/lib/framework/types.js +1 -1
  206. package/lib/generated/build-info.js +1 -1
  207. package/lib/help.js +1 -1
  208. package/lib/skills/main.js +1 -1
  209. package/lib/skills/npx-skills-add.js +1 -1
  210. package/lib/telemetry/cli-command-trace.js +1 -1
  211. package/lib/telemetry/cli-help-trace.js +1 -1
  212. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  213. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  214. package/lib/telemetry/send-cli-trace-log.js +1 -1
  215. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  216. package/lib/utils/ai_config.js +1 -1
  217. package/lib/utils/apply-jq-filter.js +1 -1
  218. package/lib/utils/cdn-config.js +1 -1
  219. package/lib/utils/check-sdk-version.js +1 -1
  220. package/lib/utils/cli-version-check.js +1 -1
  221. package/lib/utils/cli-version-policy.js +1 -1
  222. package/lib/utils/config.js +1 -1
  223. package/lib/utils/copy-directory.js +1 -1
  224. package/lib/utils/entity-with-id.js +1 -1
  225. package/lib/utils/file-utils.js +1 -1
  226. package/lib/utils/guides-cdn.js +1 -1
  227. package/lib/utils/http-client.js +1 -1
  228. package/lib/utils/is-non-interactive.js +1 -1
  229. package/lib/utils/logger.js +1 -1
  230. package/lib/utils/params.js +1 -1
  231. package/lib/utils/platform.js +1 -1
  232. package/lib/utils/rules-cdn.js +1 -1
  233. package/lib/utils/sleep.js +1 -1
  234. package/lib/utils/template-replacer.js +1 -1
  235. package/lib/utils/update-notice.js +1 -1
  236. package/lib/utils/version.js +1 -1
  237. package/lib/utils/with-active-cookie.js +1 -1
  238. package/lib/utils/write-cli-side-channel.js +1 -1
  239. package/package.json +1 -1
@@ -1 +1 @@
1
- function a127_0x2b96(_0x2ad96e,_0x1c869f){_0x2ad96e=_0x2ad96e-0x14f;const _0x538b52=a127_0x538b();let _0x2b9677=_0x538b52[_0x2ad96e];return _0x2b9677;}function a127_0x538b(){const _0x415a72=['1128378YXOYuK','replace','1023040MnXlpS','2068735hVDNQn','toFixed','1860434JIrHdN','7308133EMdFFn','3429615yPBkxc','now','12CryXLe','35943016KtrTTt','9nxROik'];a127_0x538b=function(){return _0x415a72;};return a127_0x538b();}(function(_0x4ab09f,_0x578fb6){const _0xae7414=a127_0x2b96,_0x540a69=_0x4ab09f();while(!![]){try{const _0x4dda46=parseInt(_0xae7414(0x154))/0x1+parseInt(_0xae7414(0x157))/0x2+parseInt(_0xae7414(0x159))/0x3+parseInt(_0xae7414(0x14f))/0x4*(parseInt(_0xae7414(0x155))/0x5)+-parseInt(_0xae7414(0x152))/0x6+parseInt(_0xae7414(0x158))/0x7+parseInt(_0xae7414(0x150))/0x8*(-parseInt(_0xae7414(0x151))/0x9);if(_0x4dda46===_0x578fb6)break;else _0x540a69['push'](_0x540a69['shift']());}catch(_0x3d4e97){_0x540a69['push'](_0x540a69['shift']());}}}(a127_0x538b,0xab16e));export function formatElapsed(_0x18affd){const _0x11bc54=a127_0x2b96,_0x477ad9=Date[_0x11bc54(0x15a)]()-_0x18affd;if(_0x477ad9<0x3e8)return _0x477ad9+'ms';const _0x53586c=(_0x477ad9/0x3e8)[_0x11bc54(0x156)](0x2),_0x25f196=_0x53586c[_0x11bc54(0x153)](/\.?0+$/u,'');return _0x25f196+'s';}
1
+ (function(_0x47fcaa,_0x338f76){const _0x495ec3=a127_0x396e,_0x911199=_0x47fcaa();while(!![]){try{const _0x4b861a=parseInt(_0x495ec3(0xcd))/0x1+parseInt(_0x495ec3(0xca))/0x2+parseInt(_0x495ec3(0xcc))/0x3+parseInt(_0x495ec3(0xc9))/0x4*(parseInt(_0x495ec3(0xc5))/0x5)+parseInt(_0x495ec3(0xc6))/0x6+parseInt(_0x495ec3(0xc3))/0x7+-parseInt(_0x495ec3(0xcb))/0x8;if(_0x4b861a===_0x338f76)break;else _0x911199['push'](_0x911199['shift']());}catch(_0x493506){_0x911199['push'](_0x911199['shift']());}}}(a127_0x1ecc,0x92263));function a127_0x1ecc(){const _0x27e3a8=['88760ZAzEFe','1239960reiTjC','toFixed','now','172VnjAhm','1697622yYQHIG','24170304CGYkvh','1088394nRLtOM','370235RWOuif','7476525YtFetZ','replace'];a127_0x1ecc=function(){return _0x27e3a8;};return a127_0x1ecc();}function a127_0x396e(_0x347552,_0x42d315){_0x347552=_0x347552-0xc3;const _0x1ecc1e=a127_0x1ecc();let _0x396e67=_0x1ecc1e[_0x347552];return _0x396e67;}export function formatElapsed(_0x3deade){const _0xf585e3=a127_0x396e,_0x331d67=Date[_0xf585e3(0xc8)]()-_0x3deade;if(_0x331d67<0x3e8)return _0x331d67+'ms';const _0x335f5d=(_0x331d67/0x3e8)[_0xf585e3(0xc7)](0x2),_0x5e5e8f=_0x335f5d[_0xf585e3(0xc4)](/\.?0+$/u,'');return _0x5e5e8f+'s';}
@@ -1 +1 @@
1
- (function(_0x340425,_0x4ed52b){const _0xf993fa=a128_0x4764,_0x2f4c0a=_0x340425();while(!![]){try{const _0x2c8617=parseInt(_0xf993fa(0x1af))/0x1+-parseInt(_0xf993fa(0x1aa))/0x2*(-parseInt(_0xf993fa(0x1d0))/0x3)+-parseInt(_0xf993fa(0x1b5))/0x4+-parseInt(_0xf993fa(0x1a6))/0x5+-parseInt(_0xf993fa(0x1c4))/0x6+-parseInt(_0xf993fa(0x195))/0x7*(parseInt(_0xf993fa(0x17d))/0x8)+-parseInt(_0xf993fa(0x1d2))/0x9*(-parseInt(_0xf993fa(0x18e))/0xa);if(_0x2c8617===_0x4ed52b)break;else _0x2f4c0a['push'](_0x2f4c0a['shift']());}catch(_0x14c96b){_0x2f4c0a['push'](_0x2f4c0a['shift']());}}}(a128_0x5113,0xe4772));import a128_0x597977 from'path';import a128_0x135fec from'fs';import a128_0x23d2ea from'chalk';import a128_0x15cd26 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.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 a128_0x5113(){const _0x411490=['success','green','CLI\x20版本检查','配置应用AppCode:\x20','message','appCode','create','projectCode','start','4796322pVMMiF','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','2799LgOswY','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','version','existsSync','🚀\x20Next\x20Steps:','needsUpgrade','40TCpKTf','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','更新\x20package.json\x20失败','chdir','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','setLogPath','cookie','minimumVersion','API\x20配置拉取异常','\x20\x202.\x20Pull\x20API\x20configuration:\x20','\x20√\x20','parse','*\x20Pulling\x20API\x20configuration...','warn','\x20run\x20start','cyan','writeFileSync','71290yWTrvB','\x20already\x20exists','cwd','bold','defaultApp','join','resolve','636181wcVHEA','repeat','length','string','log','更新\x20package.json\x20name','accessSync','env','\x20&&\x20','toLocaleString','description','cd\x20','*\x20Configuring\x20AppCode\x20for\x20project\x20','√\x20Configuration\x20file\x20created,\x20Apps:\x20','Project\x20directory\x20','package.json','\x20dataset(s),\x20generated\x20','3230495hStzGO','\x20Generated\x20by\x20rabetbase\x20cli\x20','info','apps','2qvbYSJ','stableVersion','trim','gray','\x20|\x20AppCode:\x20','503912zRjKLC','fail','1.0.0','stop','\x20config\x20set\x20appcode\x20<app-code>\x27','projectName','5550068HQxcsA','\x20api\x20pull','keys','stringify','production','Project\x20name\x20cannot\x20be\x20empty','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','Install\x20dependencies','utf8','error','readFileSync','API\x20configuration\x20pulled:\x20','项目创建完成:\x20','项目创建失败:\x20','清理项目目录失败:\x20','5375880ySlwVG','constants','belowMinimum'];a128_0x5113=function(){return _0x411490;};return a128_0x5113();}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(_0x461719){const _0x1969d1=a128_0x4764,_0x3a532e=await checkCliVersion();(_0x3a532e[_0x1969d1(0x17c)]||_0x3a532e[_0x1969d1(0x1c6)])&&(printCliUpgradeWarning(_0x3a532e),assertCliVersionSupported(_0x3a532e),logger[_0x1969d1(0x1a8)](_0x1969d1(0x1cd),_0x1969d1(0x1c9),{'currentVersion':_0x3a532e['currentVersion'],'stableVersion':_0x3a532e[_0x1969d1(0x1ab)],'minimumVersion':_0x3a532e[_0x1969d1(0x184)],'needsUpgrade':_0x3a532e[_0x1969d1(0x17c)],'belowMinimum':_0x3a532e[_0x1969d1(0x1c6)]}));if(_0x461719['projectCode']&&_0x461719[_0x1969d1(0x1cc)])await runCreate({'projectName':_0x461719['projectCode'],'appCode':_0x461719['appCode'],'env':_0x461719['env']},_0x461719);else{if(_0x461719[_0x1969d1(0x1ce)]){const _0xbc8b8e=await selectSingleAppcode(_0x461719['cookie']);await runCreate({'projectName':_0x461719[_0x1969d1(0x1ce)],'appCode':_0xbc8b8e||undefined,'env':_0x461719['env']},_0x461719);}else await guidedCreateProject(_0x2e200f=>runCreate(_0x2e200f,_0x461719),_0x461719[_0x1969d1(0x19c)],_0x461719['cookie']);}}function a128_0x4764(_0x3376ca,_0x1c6170){_0x3376ca=_0x3376ca-0x179;const _0x51134c=a128_0x5113();let _0x4764ac=_0x51134c[_0x3376ca];return _0x4764ac;}async function runCreate(_0x2e880c,_0x2bf5a9){const _0x457adc=a128_0x4764;if(!_0x2e880c[_0x457adc(0x1b4)]||_0x2e880c[_0x457adc(0x1b4)][_0x457adc(0x1ac)]()==='')throw new Error(_0x457adc(0x1ba));const _0x1c4a48=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x1c4a48['test'](_0x2e880c[_0x457adc(0x1b4)]))throw new Error(_0x457adc(0x17e));if(_0x2e880c[_0x457adc(0x1b4)][_0x457adc(0x197)]>0x64)throw new Error(_0x457adc(0x1d1));const _0x3a5b1a=a128_0x597977[_0x457adc(0x194)](process[_0x457adc(0x190)](),_0x2e880c[_0x457adc(0x1b4)]);if(a128_0x135fec[_0x457adc(0x17a)](_0x3a5b1a))throw new Error(_0x457adc(0x1a3)+_0x2e880c['projectName']+_0x457adc(0x18f));try{a128_0x135fec[_0x457adc(0x19b)](a128_0x597977['dirname'](_0x3a5b1a),a128_0x135fec[_0x457adc(0x1c5)]['W_OK']);}catch{throw new Error(_0x457adc(0x1d3));}logger[_0x457adc(0x182)](_0x3a5b1a),logger[_0x457adc(0x1a8)](_0x457adc(0x1cd),'开始创建项目:\x20'+_0x2e880c['projectName'],{'projectDir':_0x3a5b1a,'appCode':_0x2e880c[_0x457adc(0x1cc)]}),console[_0x457adc(0x199)](),console['log'](a128_0x23d2ea[_0x457adc(0x1c8)](_0x457adc(0x187))+'Project\x20name:\x20'+a128_0x23d2ea[_0x457adc(0x1c8)](_0x2e880c[_0x457adc(0x1b4)])+(_0x2e880c['appCode']?_0x457adc(0x1ae)+a128_0x23d2ea[_0x457adc(0x18c)](_0x2e880c[_0x457adc(0x1cc)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x2e880c[_0x457adc(0x1b4)])),await updatePackageJsonName(_0x2e880c[_0x457adc(0x1b4)]),await runTask(_0x457adc(0x1bc),()=>installDependencies(_0x2e880c[_0x457adc(0x1b4)])),await runTask('Format\x20code',()=>formatProjectCode(_0x2e880c[_0x457adc(0x1b4)])),await configureAppCode(_0x2e880c['projectName'],_0x2e880c[_0x457adc(0x1cc)]||'',_0x2e880c['env']);let _0x4c5cf4=![];if(_0x2e880c[_0x457adc(0x1cc)]){console[_0x457adc(0x199)](_0x457adc(0x189));const _0x2852f7=process[_0x457adc(0x190)]();try{process[_0x457adc(0x180)](_0x3a5b1a);const _0x4459cc=_0x2e880c[_0x457adc(0x19c)]||'production';initEnv(_0x4459cc);const {configArray:_0x40b53c}=await fetchModelList(_0x2e880c[_0x457adc(0x1cc)],_0x2bf5a9[_0x457adc(0x183)]||''),_0x2e9edd=DEFAULT_API_DIR,_0x1e5866=await generateApiFile(_0x40b53c,'',_0x2e880c[_0x457adc(0x1cc)],!![],_0x4459cc,_0x2e9edd);console[_0x457adc(0x199)]('√\x20Pulled\x20'+_0x40b53c[_0x457adc(0x197)]+_0x457adc(0x1a5)+_0x1e5866['modelCount']+'\x20model(s)'),logger[_0x457adc(0x1a8)](_0x457adc(0x1cd),_0x457adc(0x1c0)+_0x2e880c[_0x457adc(0x1cc)]);}catch(_0xe4c07a){_0x4c5cf4=!![],console[_0x457adc(0x199)](_0x457adc(0x181)),logger[_0x457adc(0x18a)](_0x457adc(0x1cd),_0x457adc(0x185),{'error':_0xe4c07a instanceof Error?_0xe4c07a[_0x457adc(0x1cb)]:String(_0xe4c07a)});}finally{process['chdir'](_0x2852f7);}}logger[_0x457adc(0x1c7)](_0x457adc(0x1cd),_0x457adc(0x1c1)+_0x2e880c[_0x457adc(0x1b4)]),console['log'](),console[_0x457adc(0x199)](a128_0x23d2ea[_0x457adc(0x1c8)]('─'[_0x457adc(0x196)](0x3c))),console[_0x457adc(0x199)](a128_0x23d2ea['cyan'][_0x457adc(0x191)](_0x457adc(0x17b))),console[_0x457adc(0x199)](),console[_0x457adc(0x199)]('\x20\x201.\x20Start\x20project:\x20'+a128_0x23d2ea['cyan'][_0x457adc(0x191)](_0x457adc(0x1a0)+_0x2e880c[_0x457adc(0x1b4)]+_0x457adc(0x19d)+CLI_BIN_NAME+_0x457adc(0x18b))),_0x4c5cf4&&console[_0x457adc(0x199)](_0x457adc(0x186)+a128_0x23d2ea[_0x457adc(0x18c)][_0x457adc(0x191)](CLI_BIN_NAME+_0x457adc(0x1b6))),console[_0x457adc(0x199)](a128_0x23d2ea[_0x457adc(0x1c8)]('─'['repeat'](0x3c)));}catch(_0x392a7d){logger[_0x457adc(0x1be)](_0x457adc(0x1cd),_0x457adc(0x1c2)+_0x2e880c[_0x457adc(0x1b4)],{'error':_0x392a7d instanceof Error?_0x392a7d[_0x457adc(0x1cb)]:String(_0x392a7d)});try{a128_0x135fec[_0x457adc(0x17a)](_0x3a5b1a)&&(console[_0x457adc(0x199)]('*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20'+_0x3a5b1a),a128_0x135fec['rmSync'](_0x3a5b1a,{'recursive':!![],'force':!![]}));}catch{logger[_0x457adc(0x18a)]('create',_0x457adc(0x1c3)+_0x3a5b1a);}throw _0x392a7d;}}async function runTask(_0x352519,_0x3c1d06){const _0xcaf7fe=a128_0x4764,_0x10598d=a128_0x15cd26(_0x352519+'...')[_0xcaf7fe(0x1cf)]();try{const _0x41cb69=await _0x3c1d06();_0x10598d[_0xcaf7fe(0x1b2)](),console[_0xcaf7fe(0x199)](''+a128_0x23d2ea[_0xcaf7fe(0x1c8)](_0xcaf7fe(0x187))+_0x352519+'\x20'+a128_0x23d2ea[_0xcaf7fe(0x1ad)]('['+_0x41cb69+']'));}catch(_0x2ab0b2){_0x10598d[_0xcaf7fe(0x1b0)](_0x352519);throw _0x2ab0b2;}}async function updatePackageJsonName(_0x2a2a1c){const _0x18f25b=a128_0x4764,_0x32f24e=a128_0x597977[_0x18f25b(0x194)](process['cwd'](),_0x2a2a1c),_0x5daf13=a128_0x597977['join'](_0x32f24e,_0x18f25b(0x1a4));try{console['log']('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x170a3d=getRabetbaseCliPackageRoot(),_0x4398e9=a128_0x597977[_0x18f25b(0x193)](_0x170a3d,_0x18f25b(0x1a4));let _0x37d336=_0x18f25b(0x1b1);try{const _0x51e91f=JSON['parse'](a128_0x135fec[_0x18f25b(0x1bf)](_0x4398e9,'utf8'));_0x37d336=_0x51e91f[_0x18f25b(0x179)]||_0x18f25b(0x1b1);}catch{}const _0x1800e9=a128_0x135fec[_0x18f25b(0x1bf)](_0x5daf13,_0x18f25b(0x1bd)),_0x2e62c7=JSON[_0x18f25b(0x188)](_0x1800e9);_0x2e62c7['name']=_0x2a2a1c,_0x2e62c7[_0x18f25b(0x19f)]=_0x2a2a1c+_0x18f25b(0x1a7)+_0x37d336,a128_0x135fec[_0x18f25b(0x18d)](_0x5daf13,JSON[_0x18f25b(0x1b8)](_0x2e62c7,null,0x2)+'\x0a',_0x18f25b(0x1bd)),console[_0x18f25b(0x199)]('√\x20package.json\x20updated:\x20name='+_0x2a2a1c),logger[_0x18f25b(0x1a8)]('create',_0x18f25b(0x19a));}catch(_0x75cfcc){logger['error'](_0x18f25b(0x1cd),_0x18f25b(0x17f));throw _0x75cfcc;}}async function configureAppCode(_0x1f5fee,_0x346d45,_0x2faf17){const _0x37b9ef=a128_0x4764,_0x57b828=a128_0x597977['resolve'](process[_0x37b9ef(0x190)](),_0x1f5fee),_0xe76e35=a128_0x597977['join'](_0x57b828,NEW_CONFIG_NAME);try{_0x346d45?console[_0x37b9ef(0x199)](_0x37b9ef(0x1a1)+_0x1f5fee+':\x20'+_0x346d45):console['log'](_0x37b9ef(0x1bb)+_0x1f5fee);const _0x17b4ed=getRabetbaseCliPackageRoot(),_0x6c78b4=a128_0x597977[_0x37b9ef(0x193)](_0x17b4ed,'package.json');let _0x5ad2e3=_0x37b9ef(0x1b1);try{const _0x411c09=JSON[_0x37b9ef(0x188)](a128_0x135fec[_0x37b9ef(0x1bf)](_0x6c78b4,_0x37b9ef(0x1bd)));_0x5ad2e3=_0x411c09[_0x37b9ef(0x179)]||_0x37b9ef(0x1b1);}catch{}const _0x838589=readConfig(),_0x27a97f=typeof _0x838589[_0x37b9ef(0x19c)]===_0x37b9ef(0x198)?_0x838589['env']:undefined,_0x5095b8={};for(const _0x9acec2 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x838589[_0x9acec2]!=null)_0x5095b8[_0x9acec2]=_0x838589[_0x9acec2];}const _0x2079c6=buildCanonicalProjectConfig(_0x5095b8,{'appCodes':_0x346d45?[_0x346d45]:[],'env':_0x2faf17||_0x27a97f||_0x37b9ef(0x1b9),'metadata':{'createdAt':new Date()[_0x37b9ef(0x19e)](),'version':_0x5ad2e3}});writeConfigFile(_0xe76e35,_0x2079c6),_0x346d45?console[_0x37b9ef(0x199)](_0x37b9ef(0x1a2)+Object[_0x37b9ef(0x1b7)](_0x2079c6[_0x37b9ef(0x1a9)]||{})['join'](',\x20')+'\x20|\x20Default:\x20'+_0x2079c6[_0x37b9ef(0x192)]):console[_0x37b9ef(0x199)]('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+_0x37b9ef(0x1b3)),logger['info'](_0x37b9ef(0x1cd),_0x37b9ef(0x1ca)+_0x346d45);}catch(_0x388afa){logger[_0x37b9ef(0x1be)](_0x37b9ef(0x1cd),'配置应用AppCode失败');}}
1
+ (function(_0x2b14f6,_0x56b0f7){const _0xd27f36=a128_0x5c3e,_0x2c8c78=_0x2b14f6();while(!![]){try{const _0x3f08cb=parseInt(_0xd27f36(0x14d))/0x1+-parseInt(_0xd27f36(0x131))/0x2*(-parseInt(_0xd27f36(0x119))/0x3)+parseInt(_0xd27f36(0xf8))/0x4*(-parseInt(_0xd27f36(0x12d))/0x5)+-parseInt(_0xd27f36(0x124))/0x6*(parseInt(_0xd27f36(0x11b))/0x7)+parseInt(_0xd27f36(0xfe))/0x8*(-parseInt(_0xd27f36(0x156))/0x9)+-parseInt(_0xd27f36(0x113))/0xa*(parseInt(_0xd27f36(0x121))/0xb)+parseInt(_0xd27f36(0x105))/0xc;if(_0x3f08cb===_0x56b0f7)break;else _0x2c8c78['push'](_0x2c8c78['shift']());}catch(_0x330a66){_0x2c8c78['push'](_0x2c8c78['shift']());}}}(a128_0x28e8,0xb6d7b));import a128_0x35ec80 from'path';import a128_0x4bf135 from'fs';import a128_0x295991 from'chalk';import a128_0x3d14ef from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.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';function a128_0x5c3e(_0x45214a,_0x5b8be4){_0x45214a=_0x45214a-0xf8;const _0x28e8e7=a128_0x28e8();let _0x5c3e4d=_0x28e8e7[_0x45214a];return _0x5c3e4d;}import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';function a128_0x28e8(){const _0x354f68=['keys','4moRwnW','accessSync','...','existsSync','stableVersion','√\x20Pulled\x20','340432UImBKa','cyan','项目创建失败:\x20','create','bold','env','info','30917184jwzwaH','join','*\x20Pulling\x20API\x20configuration...','message','production','stop','\x20|\x20AppCode:\x20','belowMinimum','readFileSync','更新\x20package.json\x20失败','writeFileSync','apps','Format\x20code','\x20Generated\x20by\x20rabetbase\x20cli\x20','104740ouiypN','\x20√\x20','repeat','🚀\x20Next\x20Steps:','\x20&&\x20','stringify','3995787SgpIed','API\x20configuration\x20pulled:\x20','7ttdmBl','\x20dataset(s),\x20generated\x20','utf8','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','name','Project\x20name:\x20','1243WHYDVO','version','test','3878844MZenxT','needsUpgrade','\x20config\x20set\x20appcode\x20<app-code>\x27','Copy\x20project\x20files','gray','start','length','\x20\x201.\x20Start\x20project:\x20','\x20run\x20start','1740085hruXfF','1.0.0','defaultApp','*\x20Configuring\x20AppCode\x20for\x20project\x20','2LgoBOW','更新\x20package.json\x20name','\x20model(s)','配置应用AppCode失败','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','cookie','cwd','\x20already\x20exists','log','projectName','chdir','√\x20package.json\x20updated:\x20name=','清理项目目录失败:\x20','rmSync','\x20\x202.\x20Pull\x20API\x20configuration:\x20','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','success','resolve','配置应用AppCode:\x20','setLogPath','package.json','currentVersion','modelCount','项目创建完成:\x20','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','green','appCode','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','125019PnLDSb','warn','projectCode','error','√\x20Configuration\x20file\x20created,\x20Apps:\x20','description','parse','trim','W_OK','234oKCztS'];a128_0x28e8=function(){return _0x354f68;};return a128_0x28e8();}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(_0x9dd14d){const _0x51d3fb=a128_0x5c3e,_0x3eeb55=await checkCliVersion();(_0x3eeb55[_0x51d3fb(0x125)]||_0x3eeb55[_0x51d3fb(0x10c)])&&(printCliUpgradeWarning(_0x3eeb55),assertCliVersionSupported(_0x3eeb55),logger[_0x51d3fb(0x104)](_0x51d3fb(0x101),'CLI\x20版本检查',{'currentVersion':_0x3eeb55[_0x51d3fb(0x146)],'stableVersion':_0x3eeb55[_0x51d3fb(0xfc)],'minimumVersion':_0x3eeb55['minimumVersion'],'needsUpgrade':_0x3eeb55[_0x51d3fb(0x125)],'belowMinimum':_0x3eeb55['belowMinimum']}));if(_0x9dd14d[_0x51d3fb(0x14f)]&&_0x9dd14d[_0x51d3fb(0x14b)])await runCreate({'projectName':_0x9dd14d[_0x51d3fb(0x14f)],'appCode':_0x9dd14d[_0x51d3fb(0x14b)],'env':_0x9dd14d[_0x51d3fb(0x103)]},_0x9dd14d);else{if(_0x9dd14d[_0x51d3fb(0x14f)]){const _0x1f9a6d=await selectSingleAppcode(_0x9dd14d['cookie']);await runCreate({'projectName':_0x9dd14d['projectCode'],'appCode':_0x1f9a6d||undefined,'env':_0x9dd14d[_0x51d3fb(0x103)]},_0x9dd14d);}else await guidedCreateProject(_0x14c22d=>runCreate(_0x14c22d,_0x9dd14d),_0x9dd14d['env'],_0x9dd14d[_0x51d3fb(0x136)]);}}async function runCreate(_0x35fe09,_0xcd208c){const _0x32f24c=a128_0x5c3e;if(!_0x35fe09[_0x32f24c(0x13a)]||_0x35fe09[_0x32f24c(0x13a)][_0x32f24c(0x154)]()==='')throw new Error('Project\x20name\x20cannot\x20be\x20empty');const _0x51a7d2=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x51a7d2[_0x32f24c(0x123)](_0x35fe09[_0x32f24c(0x13a)]))throw new Error(_0x32f24c(0x140));if(_0x35fe09[_0x32f24c(0x13a)][_0x32f24c(0x12a)]>0x64)throw new Error('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters');const _0x50308e=a128_0x35ec80[_0x32f24c(0x142)](process[_0x32f24c(0x137)](),_0x35fe09[_0x32f24c(0x13a)]);if(a128_0x4bf135[_0x32f24c(0xfb)](_0x50308e))throw new Error('Project\x20directory\x20'+_0x35fe09['projectName']+_0x32f24c(0x138));try{a128_0x4bf135[_0x32f24c(0xf9)](a128_0x35ec80['dirname'](_0x50308e),a128_0x4bf135['constants'][_0x32f24c(0x155)]);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x32f24c(0x144)](_0x50308e),logger[_0x32f24c(0x104)](_0x32f24c(0x101),'开始创建项目:\x20'+_0x35fe09[_0x32f24c(0x13a)],{'projectDir':_0x50308e,'appCode':_0x35fe09[_0x32f24c(0x14b)]}),console[_0x32f24c(0x139)](),console['log'](a128_0x295991[_0x32f24c(0x14a)](_0x32f24c(0x114))+_0x32f24c(0x120)+a128_0x295991[_0x32f24c(0x14a)](_0x35fe09[_0x32f24c(0x13a)])+(_0x35fe09[_0x32f24c(0x14b)]?_0x32f24c(0x10b)+a128_0x295991[_0x32f24c(0xff)](_0x35fe09[_0x32f24c(0x14b)]):''));try{await runTask(_0x32f24c(0x127),()=>copyProjectTemplate(_0x35fe09[_0x32f24c(0x13a)])),await updatePackageJsonName(_0x35fe09[_0x32f24c(0x13a)]),await runTask('Install\x20dependencies',()=>installDependencies(_0x35fe09[_0x32f24c(0x13a)])),await runTask(_0x32f24c(0x111),()=>formatProjectCode(_0x35fe09['projectName'])),await configureAppCode(_0x35fe09[_0x32f24c(0x13a)],_0x35fe09['appCode']||'',_0x35fe09[_0x32f24c(0x103)]);let _0x4a7a85=![];if(_0x35fe09[_0x32f24c(0x14b)]){console[_0x32f24c(0x139)](_0x32f24c(0x107));const _0x24dea8=process[_0x32f24c(0x137)]();try{process['chdir'](_0x50308e);const _0x538efa=_0x35fe09['env']||'production';initEnv(_0x538efa);const {configArray:_0x4d30db}=await fetchModelList(_0x35fe09[_0x32f24c(0x14b)],_0xcd208c[_0x32f24c(0x136)]||''),_0x14e900=DEFAULT_API_DIR,_0x1cde85=await generateApiFile(_0x4d30db,'',_0x35fe09['appCode'],!![],_0x538efa,_0x14e900);console[_0x32f24c(0x139)](_0x32f24c(0xfd)+_0x4d30db[_0x32f24c(0x12a)]+_0x32f24c(0x11c)+_0x1cde85[_0x32f24c(0x147)]+_0x32f24c(0x133)),logger['info'](_0x32f24c(0x101),_0x32f24c(0x11a)+_0x35fe09['appCode']);}catch(_0x40679d){_0x4a7a85=!![],console[_0x32f24c(0x139)](_0x32f24c(0x149)),logger[_0x32f24c(0x14e)](_0x32f24c(0x101),'API\x20配置拉取异常',{'error':_0x40679d instanceof Error?_0x40679d[_0x32f24c(0x108)]:String(_0x40679d)});}finally{process[_0x32f24c(0x13b)](_0x24dea8);}}logger[_0x32f24c(0x141)]('create',_0x32f24c(0x148)+_0x35fe09['projectName']),console[_0x32f24c(0x139)](),console[_0x32f24c(0x139)](a128_0x295991['green']('─'['repeat'](0x3c))),console['log'](a128_0x295991[_0x32f24c(0xff)]['bold'](_0x32f24c(0x116))),console[_0x32f24c(0x139)](),console['log'](_0x32f24c(0x12b)+a128_0x295991['cyan'][_0x32f24c(0x102)]('cd\x20'+_0x35fe09[_0x32f24c(0x13a)]+_0x32f24c(0x117)+CLI_BIN_NAME+_0x32f24c(0x12c))),_0x4a7a85&&console[_0x32f24c(0x139)](_0x32f24c(0x13f)+a128_0x295991[_0x32f24c(0xff)][_0x32f24c(0x102)](CLI_BIN_NAME+'\x20api\x20pull')),console[_0x32f24c(0x139)](a128_0x295991['green']('─'[_0x32f24c(0x115)](0x3c)));}catch(_0x454518){logger[_0x32f24c(0x150)](_0x32f24c(0x101),_0x32f24c(0x100)+_0x35fe09['projectName'],{'error':_0x454518 instanceof Error?_0x454518[_0x32f24c(0x108)]:String(_0x454518)});try{a128_0x4bf135[_0x32f24c(0xfb)](_0x50308e)&&(console['log'](_0x32f24c(0x14c)+_0x50308e),a128_0x4bf135[_0x32f24c(0x13e)](_0x50308e,{'recursive':!![],'force':!![]}));}catch{logger[_0x32f24c(0x14e)](_0x32f24c(0x101),_0x32f24c(0x13d)+_0x50308e);}throw _0x454518;}}async function runTask(_0x16b753,_0x325c83){const _0x17b136=a128_0x5c3e,_0x35f0bb=a128_0x3d14ef(_0x16b753+_0x17b136(0xfa))[_0x17b136(0x129)]();try{const _0x120228=await _0x325c83();_0x35f0bb[_0x17b136(0x10a)](),console[_0x17b136(0x139)](''+a128_0x295991[_0x17b136(0x14a)](_0x17b136(0x114))+_0x16b753+'\x20'+a128_0x295991[_0x17b136(0x128)]('['+_0x120228+']'));}catch(_0x1ebc77){_0x35f0bb['fail'](_0x16b753);throw _0x1ebc77;}}async function updatePackageJsonName(_0x2d46e3){const _0x4672bc=a128_0x5c3e,_0x304ca1=a128_0x35ec80[_0x4672bc(0x142)](process[_0x4672bc(0x137)](),_0x2d46e3),_0x48b0c0=a128_0x35ec80[_0x4672bc(0x106)](_0x304ca1,_0x4672bc(0x145));try{console[_0x4672bc(0x139)](_0x4672bc(0x11e));const _0x59c8a6=getRabetbaseCliPackageRoot(),_0x25db9a=a128_0x35ec80[_0x4672bc(0x106)](_0x59c8a6,_0x4672bc(0x145));let _0x2d84fb=_0x4672bc(0x12e);try{const _0x473603=JSON['parse'](a128_0x4bf135[_0x4672bc(0x10d)](_0x25db9a,_0x4672bc(0x11d)));_0x2d84fb=_0x473603[_0x4672bc(0x122)]||_0x4672bc(0x12e);}catch{}const _0x4e20ff=a128_0x4bf135[_0x4672bc(0x10d)](_0x48b0c0,_0x4672bc(0x11d)),_0x548c63=JSON['parse'](_0x4e20ff);_0x548c63[_0x4672bc(0x11f)]=_0x2d46e3,_0x548c63[_0x4672bc(0x152)]=_0x2d46e3+_0x4672bc(0x112)+_0x2d84fb,a128_0x4bf135[_0x4672bc(0x10f)](_0x48b0c0,JSON[_0x4672bc(0x118)](_0x548c63,null,0x2)+'\x0a',_0x4672bc(0x11d)),console[_0x4672bc(0x139)](_0x4672bc(0x13c)+_0x2d46e3),logger[_0x4672bc(0x104)](_0x4672bc(0x101),_0x4672bc(0x132));}catch(_0x57a03e){logger[_0x4672bc(0x150)](_0x4672bc(0x101),_0x4672bc(0x10e));throw _0x57a03e;}}async function configureAppCode(_0x440508,_0x1b5780,_0x3a4542){const _0x559ab0=a128_0x5c3e,_0x2b4494=a128_0x35ec80['resolve'](process[_0x559ab0(0x137)](),_0x440508),_0x5019aa=a128_0x35ec80[_0x559ab0(0x106)](_0x2b4494,NEW_CONFIG_NAME);try{_0x1b5780?console[_0x559ab0(0x139)](_0x559ab0(0x130)+_0x440508+':\x20'+_0x1b5780):console[_0x559ab0(0x139)](_0x559ab0(0x135)+_0x440508);const _0x2e648f=getRabetbaseCliPackageRoot(),_0x297e59=a128_0x35ec80[_0x559ab0(0x106)](_0x2e648f,_0x559ab0(0x145));let _0x45a375=_0x559ab0(0x12e);try{const _0x4a1dda=JSON[_0x559ab0(0x153)](a128_0x4bf135[_0x559ab0(0x10d)](_0x297e59,_0x559ab0(0x11d)));_0x45a375=_0x4a1dda[_0x559ab0(0x122)]||_0x559ab0(0x12e);}catch{}const _0x1d3cfa=readConfig(),_0x43978e=typeof _0x1d3cfa[_0x559ab0(0x103)]==='string'?_0x1d3cfa['env']:undefined,_0x26a379={};for(const _0x564645 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x1d3cfa[_0x564645]!=null)_0x26a379[_0x564645]=_0x1d3cfa[_0x564645];}const _0x183997=buildCanonicalProjectConfig(_0x26a379,{'appCodes':_0x1b5780?[_0x1b5780]:[],'env':_0x3a4542||_0x43978e||_0x559ab0(0x109),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x45a375}});writeConfigFile(_0x5019aa,_0x183997),_0x1b5780?console['log'](_0x559ab0(0x151)+Object[_0x559ab0(0x157)](_0x183997[_0x559ab0(0x110)]||{})[_0x559ab0(0x106)](',\x20')+'\x20|\x20Default:\x20'+_0x183997[_0x559ab0(0x12f)]):console[_0x559ab0(0x139)]('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+_0x559ab0(0x126)),logger[_0x559ab0(0x104)](_0x559ab0(0x101),_0x559ab0(0x143)+_0x1b5780);}catch(_0x5948b6){logger['error'](_0x559ab0(0x101),_0x559ab0(0x134));}}
@@ -1 +1 @@
1
- (function(_0x2fc9e4,_0x1310e5){const _0x5cd67d=a129_0x5477,_0x43acab=_0x2fc9e4();while(!![]){try{const _0x147cef=-parseInt(_0x5cd67d(0x1e6))/0x1*(-parseInt(_0x5cd67d(0x1eb))/0x2)+parseInt(_0x5cd67d(0x1ea))/0x3+parseInt(_0x5cd67d(0x1d6))/0x4*(-parseInt(_0x5cd67d(0x1d9))/0x5)+-parseInt(_0x5cd67d(0x1de))/0x6*(-parseInt(_0x5cd67d(0x1d3))/0x7)+parseInt(_0x5cd67d(0x1f3))/0x8+parseInt(_0x5cd67d(0x1d8))/0x9+-parseInt(_0x5cd67d(0x1cf))/0xa*(parseInt(_0x5cd67d(0x1c9))/0xb);if(_0x147cef===_0x1310e5)break;else _0x43acab['push'](_0x43acab['shift']());}catch(_0x3355e8){_0x43acab['push'](_0x43acab['shift']());}}}(a129_0x1e6f,0x6cfac));import a129_0x5737ff from'path';import a129_0x1b385b from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';function a129_0x5477(_0x1c7eaf,_0x4070cb){_0x1c7eaf=_0x1c7eaf-0x1c2;const _0x1e6fbe=a129_0x1e6f();let _0x5477d0=_0x1e6fbe[_0x1c7eaf];return _0x5477d0;}import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x233bb3,_0x26365d,_0x30b97e,_0x109b51){const _0x433f36=a129_0x5477,_0x581012=await checkCliVersion();(_0x581012[_0x433f36(0x1f1)]||_0x581012[_0x433f36(0x1cb)])&&(printCliUpgradeWarning(_0x581012),assertCliVersionSupported(_0x581012));if(!_0x233bb3||_0x233bb3[_0x433f36(0x1c5)]()==='')throw CliErrors[_0x433f36(0x1e4)](_0x433f36(0x1ee));const _0x22e9ae=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x22e9ae[_0x433f36(0x1cc)](_0x233bb3))throw CliErrors[_0x433f36(0x1e4)](_0x433f36(0x1e9),_0x433f36(0x1ce));if(_0x233bb3[_0x433f36(0x1d0)]>0x64)throw CliErrors[_0x433f36(0x1e4)](_0x433f36(0x1d2));const _0x27d1e8=a129_0x5737ff[_0x433f36(0x1f2)](process['cwd'](),_0x233bb3);if(existsSync(_0x27d1e8))throw CliErrors[_0x433f36(0x1e4)]('Project\x20directory\x20\x22'+_0x233bb3+_0x433f36(0x1ed),_0x433f36(0x1fb));try{const _0x1a988a=a129_0x5737ff[_0x433f36(0x1ef)](_0x27d1e8);await a129_0x1b385b['access'](_0x1a988a,a129_0x1b385b['constants'][_0x433f36(0x1f6)]);}catch{throw CliErrors['validation'](_0x433f36(0x1c4),_0x433f36(0x1fa));}try{console[_0x433f36(0x1fc)](_0x433f36(0x1d7)+_0x233bb3+'...');const _0x2f5b1f=getSubAppReactDemoTemplateDir();await copyDirectory(_0x2f5b1f,_0x27d1e8),console[_0x433f36(0x1fc)](_0x433f36(0x1dd)),await updatePackageJsonName(_0x233bb3),console['log'](_0x433f36(0x1d4)),console[_0x433f36(0x1fc)]('\x20\x20Installing\x20dependencies...'),console[_0x433f36(0x1fc)](_0x433f36(0x1f7)),await formatCode(_0x27d1e8),console[_0x433f36(0x1fc)](_0x433f36(0x1f9)),await configureProject(_0x233bb3,_0x30b97e,_0x26365d),console[_0x433f36(0x1fc)]('\x20\x20√\x20Configuration\x20file\x20created'),_0x30b97e&&await pullApiConfig(_0x27d1e8,_0x30b97e,_0x26365d,_0x109b51),console['log'](_0x433f36(0x1db)+_0x233bb3+_0x433f36(0x1c3)),console[_0x433f36(0x1fc)](_0x433f36(0x1d5)+_0x233bb3),console[_0x433f36(0x1fc)](_0x433f36(0x1cd));}catch(_0x70883f){try{existsSync(_0x27d1e8)&&await a129_0x1b385b['rm'](_0x27d1e8,{'recursive':!![],'force':!![]});}catch{}throw _0x70883f;}}async function updatePackageJsonName(_0x12e12d){const _0x196278=a129_0x5477,_0x170143=a129_0x5737ff[_0x196278(0x1f2)](process[_0x196278(0x1c6)](),_0x12e12d),_0x4b44e5=a129_0x5737ff[_0x196278(0x1f8)](_0x170143,_0x196278(0x1c8)),_0x1b6682=await a129_0x1b385b['readFile'](_0x4b44e5,_0x196278(0x1d1)),_0x36a069=JSON[_0x196278(0x1ca)](_0x1b6682);_0x36a069[_0x196278(0x1e7)]=_0x12e12d,_0x36a069[_0x196278(0x1e8)]=_0x196278(0x1e1),await a129_0x1b385b['writeFile'](_0x4b44e5,JSON[_0x196278(0x1ec)](_0x36a069,null,0x2)+'\x0a');}function detectPackageManager(){const _0x346b7f=a129_0x5477;try{return execSync('bun\x20--version',{'stdio':'ignore'}),'bun';}catch{return _0x346b7f(0x1f5);}}async function formatCode(_0x11067d){const _0x460d3d=a129_0x5477;try{await execAsync(_0x460d3d(0x1dc),{'cwd':_0x11067d});}catch{}}async function configureProject(_0x5599ab,_0xe69b9c,_0x10cd30){const _0x1a1982=a129_0x5477,_0x340099=a129_0x5737ff['resolve'](process[_0x1a1982(0x1c6)](),_0x5599ab),_0xd5a7db=a129_0x5737ff[_0x1a1982(0x1f8)](_0x340099,NEW_CONFIG_NAME),_0x51dc2a=readConfig(),_0x504033=typeof _0x51dc2a[_0x1a1982(0x1da)]==='string'?_0x51dc2a[_0x1a1982(0x1da)]:undefined,_0x4b71c3={};for(const _0x2e5a7e of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x51dc2a[_0x2e5a7e]!=null)_0x4b71c3[_0x2e5a7e]=_0x51dc2a[_0x2e5a7e];}const _0x29a43e=buildCanonicalProjectConfig(_0x4b71c3,{'appCodes':_0xe69b9c?[_0xe69b9c]:[],'env':_0x10cd30||_0x504033||'production','metadata':{'createdAt':new Date()[_0x1a1982(0x1e3)](),'version':getCliVersion()}});writeConfigFile(_0xd5a7db,_0x29a43e);}function a129_0x1e6f(){const _0xf5b9e7=['name','description','Project\x20name\x20contains\x20invalid\x20characters.','2423109HBqbCO','2JrYUQM','stringify','\x22\x20already\x20exists.','Project\x20name\x20cannot\x20be\x20empty.','dirname','\x20\x20√\x20Pulled\x20','needsUpgrade','resolve','6490272fJySZY','modelCount','npm','W_OK','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','join','\x20\x20√\x20Code\x20formatted','Check\x20directory\x20permissions.','Use\x20a\x20different\x20project\x20name.','log','\x20api\x20pull`\x20manually\x20later.','\x20created\x20successfully!','Cannot\x20create\x20project\x20in\x20current\x20directory.','trim','cwd','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','package.json','2552ObeESc','parse','belowMinimum','test','\x20\x20rabetbase\x20run\x20start\x0a','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','120740WlJNIy','length','utf-8','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','3031BMQdqu','\x20\x20√\x20package.json\x20updated','\x0a\x20\x20cd\x20','164368ESDPkR','*\x20Creating\x20project\x20','5068296sqaitC','10wnqNzd','env','\x0a√\x20Project\x20','bun\x20run\x20format','\x20\x20√\x20Project\x20template\x20created','6852uarSZq','chdir','\x20model(s)','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','\x20dataset(s),\x20generated\x20','toLocaleString','validation','\x20\x20Pulling\x20API\x20configuration...','653115wpewEH'];a129_0x1e6f=function(){return _0xf5b9e7;};return a129_0x1e6f();}async function pullApiConfig(_0x14cef4,_0x3be2ff,_0x367815,_0x48e492){const _0x258088=a129_0x5477,_0x3a2b9d=process[_0x258088(0x1c6)]();try{process[_0x258088(0x1df)](_0x14cef4);const _0xc1b63f=_0x367815||'production';initEnv(_0xc1b63f),console['log'](_0x258088(0x1e5));const {configArray:_0x1583c0}=await fetchModelList(_0x3be2ff,_0x48e492||''),_0x344222=await generateApiFile(_0x1583c0,'',_0x3be2ff,!![],_0xc1b63f,DEFAULT_API_DIR);console['log'](_0x258088(0x1f0)+_0x1583c0[_0x258088(0x1d0)]+_0x258088(0x1e2)+_0x344222[_0x258088(0x1f4)]+_0x258088(0x1e0));}catch(_0xd98127){console['log'](_0x258088(0x1c7)+CLI_BIN_NAME+_0x258088(0x1c2));}finally{process[_0x258088(0x1df)](_0x3a2b9d);}}
1
+ (function(_0x21eb93,_0x1b2ca8){const _0x254e39=a129_0x70df,_0x1b88b2=_0x21eb93();while(!![]){try{const _0x12ceb3=-parseInt(_0x254e39(0x1fb))/0x1+parseInt(_0x254e39(0x1ed))/0x2+parseInt(_0x254e39(0x213))/0x3*(parseInt(_0x254e39(0x207))/0x4)+-parseInt(_0x254e39(0x1ff))/0x5+parseInt(_0x254e39(0x208))/0x6+parseInt(_0x254e39(0x1f6))/0x7*(-parseInt(_0x254e39(0x206))/0x8)+parseInt(_0x254e39(0x1f4))/0x9;if(_0x12ceb3===_0x1b2ca8)break;else _0x1b88b2['push'](_0x1b88b2['shift']());}catch(_0x40b114){_0x1b88b2['push'](_0x1b88b2['shift']());}}}(a129_0x4516,0xdd056));function a129_0x70df(_0x5cffca,_0x28daf3){_0x5cffca=_0x5cffca-0x1e2;const _0x451664=a129_0x4516();let _0x70df56=_0x451664[_0x5cffca];return _0x70df56;}import a129_0x50735c from'path';import a129_0x255b4b from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';function a129_0x4516(){const _0x2f0584=['env','package.json','Use\x20a\x20different\x20project\x20name.','\x20\x20Installing\x20dependencies...','\x20dataset(s),\x20generated\x20','writeFile','\x0a√\x20Project\x20','Cannot\x20create\x20project\x20in\x20current\x20directory.','\x20\x20√\x20Project\x20template\x20created','readFile','\x22\x20already\x20exists.','W_OK','chdir','utf-8','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','858572Rrydsy','constants','belowMinimum','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','Project\x20name\x20contains\x20invalid\x20characters.','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','bun\x20run\x20format','4089906XPwvix','toLocaleString','28546tvKxHt','log','needsUpgrade','\x20\x20√\x20Pulled\x20','trim','120739xQUpEe','string','...','Check\x20directory\x20permissions.','4713450pgSSsO','\x20\x20rabetbase\x20run\x20start\x0a','name','validation','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','length','\x0a\x20\x20cd\x20','272fYCJOx','4OwxAzL','5987952WCaelv','\x20api\x20pull`\x20manually\x20later.','Project\x20directory\x20\x22','resolve','join','modelCount','\x20\x20√\x20Code\x20formatted','bun\x20--version','cwd','description','dirname','677013xjKtza','test','\x20model(s)','production','access'];a129_0x4516=function(){return _0x2f0584;};return a129_0x4516();}import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x21806d,_0xac9615,_0x23343a,_0x4fa871){const _0x7fa381=a129_0x70df,_0x3b5694=await checkCliVersion();(_0x3b5694[_0x7fa381(0x1f8)]||_0x3b5694[_0x7fa381(0x1ef)])&&(printCliUpgradeWarning(_0x3b5694),assertCliVersionSupported(_0x3b5694));if(!_0x21806d||_0x21806d[_0x7fa381(0x1fa)]()==='')throw CliErrors[_0x7fa381(0x202)]('Project\x20name\x20cannot\x20be\x20empty.');const _0x19652a=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x19652a[_0x7fa381(0x214)](_0x21806d))throw CliErrors[_0x7fa381(0x202)](_0x7fa381(0x1f1),_0x7fa381(0x203));if(_0x21806d['length']>0x64)throw CliErrors[_0x7fa381(0x202)](_0x7fa381(0x1ec));const _0x4e4a34=a129_0x50735c[_0x7fa381(0x20b)](process[_0x7fa381(0x210)](),_0x21806d);if(existsSync(_0x4e4a34))throw CliErrors['validation'](_0x7fa381(0x20a)+_0x21806d+_0x7fa381(0x1e8),_0x7fa381(0x21a));try{const _0x3d514f=a129_0x50735c[_0x7fa381(0x212)](_0x4e4a34);await a129_0x255b4b[_0x7fa381(0x217)](_0x3d514f,a129_0x255b4b[_0x7fa381(0x1ee)][_0x7fa381(0x1e9)]);}catch{throw CliErrors[_0x7fa381(0x202)](_0x7fa381(0x1e5),_0x7fa381(0x1fe));}try{console['log']('*\x20Creating\x20project\x20'+_0x21806d+_0x7fa381(0x1fd));const _0x17a97e=getSubAppReactDemoTemplateDir();await copyDirectory(_0x17a97e,_0x4e4a34),console[_0x7fa381(0x1f7)](_0x7fa381(0x1e6)),await updatePackageJsonName(_0x21806d),console[_0x7fa381(0x1f7)]('\x20\x20√\x20package.json\x20updated'),console['log'](_0x7fa381(0x21b)),console[_0x7fa381(0x1f7)](_0x7fa381(0x1f0)),await formatCode(_0x4e4a34),console[_0x7fa381(0x1f7)](_0x7fa381(0x20e)),await configureProject(_0x21806d,_0x23343a,_0xac9615),console['log']('\x20\x20√\x20Configuration\x20file\x20created'),_0x23343a&&await pullApiConfig(_0x4e4a34,_0x23343a,_0xac9615,_0x4fa871),console[_0x7fa381(0x1f7)](_0x7fa381(0x1e4)+_0x21806d+'\x20created\x20successfully!'),console[_0x7fa381(0x1f7)](_0x7fa381(0x205)+_0x21806d),console['log'](_0x7fa381(0x200));}catch(_0x5e00c8){try{existsSync(_0x4e4a34)&&await a129_0x255b4b['rm'](_0x4e4a34,{'recursive':!![],'force':!![]});}catch{}throw _0x5e00c8;}}async function updatePackageJsonName(_0x4beaa9){const _0x2762a7=a129_0x70df,_0x8becbc=a129_0x50735c[_0x2762a7(0x20b)](process['cwd'](),_0x4beaa9),_0x201e85=a129_0x50735c[_0x2762a7(0x20c)](_0x8becbc,_0x2762a7(0x219)),_0x363a66=await a129_0x255b4b[_0x2762a7(0x1e7)](_0x201e85,_0x2762a7(0x1eb)),_0x3625c3=JSON['parse'](_0x363a66);_0x3625c3[_0x2762a7(0x201)]=_0x4beaa9,_0x3625c3[_0x2762a7(0x211)]='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a129_0x255b4b[_0x2762a7(0x1e3)](_0x201e85,JSON['stringify'](_0x3625c3,null,0x2)+'\x0a');}function detectPackageManager(){const _0x13d727=a129_0x70df;try{return execSync(_0x13d727(0x20f),{'stdio':'ignore'}),'bun';}catch{return'npm';}}async function formatCode(_0x1039fb){const _0x22dc4b=a129_0x70df;try{await execAsync(_0x22dc4b(0x1f3),{'cwd':_0x1039fb});}catch{}}async function configureProject(_0x2eadef,_0x55554f,_0x548ed2){const _0x1f9845=a129_0x70df,_0x97f2aa=a129_0x50735c['resolve'](process[_0x1f9845(0x210)](),_0x2eadef),_0x2d5a09=a129_0x50735c['join'](_0x97f2aa,NEW_CONFIG_NAME),_0xe2295f=readConfig(),_0x5975de=typeof _0xe2295f[_0x1f9845(0x218)]===_0x1f9845(0x1fc)?_0xe2295f['env']:undefined,_0x375ae2={};for(const _0x4ffd91 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0xe2295f[_0x4ffd91]!=null)_0x375ae2[_0x4ffd91]=_0xe2295f[_0x4ffd91];}const _0x1a7ebe=buildCanonicalProjectConfig(_0x375ae2,{'appCodes':_0x55554f?[_0x55554f]:[],'env':_0x548ed2||_0x5975de||_0x1f9845(0x216),'metadata':{'createdAt':new Date()[_0x1f9845(0x1f5)](),'version':getCliVersion()}});writeConfigFile(_0x2d5a09,_0x1a7ebe);}async function pullApiConfig(_0x569317,_0x24ed52,_0x497585,_0x2ed49d){const _0x54aec4=a129_0x70df,_0x1f58a9=process[_0x54aec4(0x210)]();try{process['chdir'](_0x569317);const _0x4f658c=_0x497585||_0x54aec4(0x216);initEnv(_0x4f658c),console[_0x54aec4(0x1f7)]('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0xd95657}=await fetchModelList(_0x24ed52,_0x2ed49d||''),_0x5dc3e5=await generateApiFile(_0xd95657,'',_0x24ed52,!![],_0x4f658c,DEFAULT_API_DIR);console['log'](_0x54aec4(0x1f9)+_0xd95657[_0x54aec4(0x204)]+_0x54aec4(0x1e2)+_0x5dc3e5[_0x54aec4(0x20d)]+_0x54aec4(0x215));}catch(_0x41fd6c){console[_0x54aec4(0x1f7)](_0x54aec4(0x1f2)+CLI_BIN_NAME+_0x54aec4(0x209));}finally{process[_0x54aec4(0x1ea)](_0x1f58a9);}}
@@ -1 +1 @@
1
- function a130_0x1d8f(){const _0x3d7b1c=['10731wRxdWI','projects','389770EwfyFQ','22AnOxHs','join','resolve','245QBRwxE','49264REFzyQ','3737019OOuBAs','19308rirjKV','696408vFKYCG','sub-app-react-demo','21dcFbJv','dirname','21lNIvYT','7115136zjoqQV','templates','54OxEwkD'];a130_0x1d8f=function(){return _0x3d7b1c;};return a130_0x1d8f();}const a130_0x4c8fa7=a130_0xf719;(function(_0xe8bf94,_0x466131){const _0x53f9b3=a130_0xf719,_0x451b3e=_0xe8bf94();while(!![]){try{const _0x2fa29d=parseInt(_0x53f9b3(0x1e9))/0x1*(parseInt(_0x53f9b3(0x1ec))/0x2)+-parseInt(_0x53f9b3(0x1e5))/0x3*(-parseInt(_0x53f9b3(0x1f0))/0x4)+-parseInt(_0x53f9b3(0x1ef))/0x5*(parseInt(_0x53f9b3(0x1f2))/0x6)+-parseInt(_0x53f9b3(0x1f5))/0x7*(-parseInt(_0x53f9b3(0x1f3))/0x8)+parseInt(_0x53f9b3(0x1e8))/0x9*(parseInt(_0x53f9b3(0x1eb))/0xa)+parseInt(_0x53f9b3(0x1f1))/0xb+-parseInt(_0x53f9b3(0x1e6))/0xc;if(_0x2fa29d===_0x466131)break;else _0x451b3e['push'](_0x451b3e['shift']());}catch(_0x31ba36){_0x451b3e['push'](_0x451b3e['shift']());}}}(a130_0x1d8f,0x46683));import a130_0x37ec26 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a130_0x37ec26[a130_0x4c8fa7(0x1e4)](fileURLToPath(import.meta.url));function a130_0xf719(_0x524d12,_0x15a392){_0x524d12=_0x524d12-0x1e4;const _0x1d8f01=a130_0x1d8f();let _0xf7198e=_0x1d8f01[_0x524d12];return _0xf7198e;}export function getRabetbaseCliPackageRoot(){const _0x4d4f5c=a130_0x4c8fa7;return a130_0x37ec26[_0x4d4f5c(0x1ee)](__dirname,'../../../../');}export function getSubAppReactDemoTemplateDir(){const _0x5449dd=a130_0x4c8fa7;return a130_0x37ec26[_0x5449dd(0x1ed)](getRabetbaseCliPackageRoot(),_0x5449dd(0x1e7),_0x5449dd(0x1ea),_0x5449dd(0x1f4));}
1
+ const a130_0x127c26=a130_0x450d;(function(_0x38695c,_0x139674){const _0x198cfa=a130_0x450d,_0x357928=_0x38695c();while(!![]){try{const _0x26e88b=-parseInt(_0x198cfa(0x15b))/0x1+-parseInt(_0x198cfa(0x157))/0x2+-parseInt(_0x198cfa(0x156))/0x3+parseInt(_0x198cfa(0x158))/0x4+parseInt(_0x198cfa(0x155))/0x5+parseInt(_0x198cfa(0x15a))/0x6*(-parseInt(_0x198cfa(0x160))/0x7)+parseInt(_0x198cfa(0x159))/0x8;if(_0x26e88b===_0x139674)break;else _0x357928['push'](_0x357928['shift']());}catch(_0xa9b9ba){_0x357928['push'](_0x357928['shift']());}}}(a130_0x45a8,0xa2158));import a130_0x1119dc from'node:path';function a130_0x45a8(){const _0x5a220a=['templates','14805KpbTLs','3266676PsGGFa','1603682qQpIKG','5289260exypNp','24421104PVAvLo','12yAhZVg','1112719SgmqMn','../../../../','sub-app-react-demo','projects','join','2486981zBprDB','dirname'];a130_0x45a8=function(){return _0x5a220a;};return a130_0x45a8();}import{fileURLToPath}from'node:url';const __dirname=a130_0x1119dc[a130_0x127c26(0x161)](fileURLToPath(import.meta.url));function a130_0x450d(_0x3ad9bb,_0x33aa27){_0x3ad9bb=_0x3ad9bb-0x155;const _0x45a82e=a130_0x45a8();let _0x450df2=_0x45a82e[_0x3ad9bb];return _0x450df2;}export function getRabetbaseCliPackageRoot(){const _0x1b3dc5=a130_0x127c26;return a130_0x1119dc['resolve'](__dirname,_0x1b3dc5(0x15c));}export function getSubAppReactDemoTemplateDir(){const _0x51c808=a130_0x127c26;return a130_0x1119dc[_0x51c808(0x15f)](getRabetbaseCliPackageRoot(),_0x51c808(0x162),_0x51c808(0x15e),_0x51c808(0x15d));}
@@ -1 +1 @@
1
- function a131_0x20b4(_0x579f7c,_0x2aa0c7){_0x579f7c=_0x579f7c-0x123;const _0x2c96de=a131_0x2c96();let _0x20b4d4=_0x2c96de[_0x579f7c];return _0x20b4d4;}(function(_0x121626,_0x42e3a9){const _0x11fdd3=a131_0x20b4,_0x460f6a=_0x121626();while(!![]){try{const _0x5ece85=parseInt(_0x11fdd3(0x12f))/0x1*(parseInt(_0x11fdd3(0x12d))/0x2)+parseInt(_0x11fdd3(0x131))/0x3+parseInt(_0x11fdd3(0x124))/0x4+-parseInt(_0x11fdd3(0x134))/0x5*(parseInt(_0x11fdd3(0x12b))/0x6)+parseInt(_0x11fdd3(0x126))/0x7*(parseInt(_0x11fdd3(0x130))/0x8)+parseInt(_0x11fdd3(0x12a))/0x9+-parseInt(_0x11fdd3(0x12e))/0xa;if(_0x5ece85===_0x42e3a9)break;else _0x460f6a['push'](_0x460f6a['shift']());}catch(_0xeb2ce){_0x460f6a['push'](_0x460f6a['shift']());}}}(a131_0x2c96,0x996a1));import a131_0x59dd9c 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 a131_0x2c96(){const _0x130b2e=['message','7dJVtjk','success','开始复制项目模板','项目模板复制完成','979362fKbGXQ','13908vJgXVa','now','42WNBHUL','22631140dkIHTM','53401XtxePE','2381032kcfkpE','785814WTPdMD','error','info','305YozKNV','copy','项目模板复制失败','resolve','4972364OJPBGC'];a131_0x2c96=function(){return _0x130b2e;};return a131_0x2c96();}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x18d47f){const _0x2d76a1=a131_0x20b4,_0xa16cc=Date['now'](),_0x419f5e=a131_0x59dd9c[_0x2d76a1(0x123)](process['cwd'](),_0x18d47f);try{logger[_0x2d76a1(0x133)]('copy',_0x2d76a1(0x128),{'projectCode':_0x18d47f,'templateDir':templateDir}),await copyDirectory(templateDir,_0x419f5e);const _0x3e4d84=Date[_0x2d76a1(0x12c)]()-_0xa16cc;logger[_0x2d76a1(0x127)](_0x2d76a1(0x135),_0x2d76a1(0x129),_0x3e4d84,{'projectCode':_0x18d47f});}catch(_0x5ddbca){const _0x30759a=Date[_0x2d76a1(0x12c)]()-_0xa16cc;logger[_0x2d76a1(0x132)]('copy',_0x2d76a1(0x136),{'projectCode':_0x18d47f,'error':_0x5ddbca instanceof Error?_0x5ddbca[_0x2d76a1(0x125)]:String(_0x5ddbca),'duration':_0x30759a});throw _0x5ddbca;}return formatElapsed(_0xa16cc);}
1
+ (function(_0x147169,_0x2e77f8){const _0x3dfed1=a131_0x2387,_0x3be929=_0x147169();while(!![]){try{const _0x2e27c1=parseInt(_0x3dfed1(0x82))/0x1+parseInt(_0x3dfed1(0x83))/0x2+-parseInt(_0x3dfed1(0x87))/0x3*(parseInt(_0x3dfed1(0x8e))/0x4)+parseInt(_0x3dfed1(0x8d))/0x5*(-parseInt(_0x3dfed1(0x90))/0x6)+-parseInt(_0x3dfed1(0x8f))/0x7*(-parseInt(_0x3dfed1(0x86))/0x8)+parseInt(_0x3dfed1(0x91))/0x9+-parseInt(_0x3dfed1(0x81))/0xa;if(_0x2e27c1===_0x2e77f8)break;else _0x3be929['push'](_0x3be929['shift']());}catch(_0x43d577){_0x3be929['push'](_0x3be929['shift']());}}}(a131_0x54dc,0x95676));import a131_0x5ece4b from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a131_0x2387(_0x2dc511,_0x119529){_0x2dc511=_0x2dc511-0x80;const _0x54dce4=a131_0x54dc();let _0x23877b=_0x54dce4[_0x2dc511];return _0x23877b;}import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x1dcf36){const _0x2d3dfa=a131_0x2387,_0x4f2927=Date['now'](),_0x37b7cb=a131_0x5ece4b[_0x2d3dfa(0x92)](process[_0x2d3dfa(0x8a)](),_0x1dcf36);try{logger[_0x2d3dfa(0x8b)](_0x2d3dfa(0x89),_0x2d3dfa(0x84),{'projectCode':_0x1dcf36,'templateDir':templateDir}),await copyDirectory(templateDir,_0x37b7cb);const _0x24c15c=Date[_0x2d3dfa(0x88)]()-_0x4f2927;logger[_0x2d3dfa(0x85)]('copy',_0x2d3dfa(0x8c),_0x24c15c,{'projectCode':_0x1dcf36});}catch(_0x16062e){const _0x48b5da=Date[_0x2d3dfa(0x88)]()-_0x4f2927;logger['error'](_0x2d3dfa(0x89),'项目模板复制失败',{'projectCode':_0x1dcf36,'error':_0x16062e instanceof Error?_0x16062e[_0x2d3dfa(0x80)]:String(_0x16062e),'duration':_0x48b5da});throw _0x16062e;}return formatElapsed(_0x4f2927);}function a131_0x54dc(){const _0x2bc64d=['info','项目模板复制完成','205wSfSpR','4415336FoFwaf','1318065JbHfad','4074wenPOv','4972320YdJpjf','resolve','message','5131610oAtqzV','257452EdtQWl','1387360dmfVXI','开始复制项目模板','success','32EPswPh','3gZmCZY','now','copy','cwd'];a131_0x54dc=function(){return _0x2bc64d;};return a131_0x54dc();}
@@ -1 +1 @@
1
- (function(_0x7526d3,_0x24165a){const _0x1c21cc=a132_0x25b6,_0x40f884=_0x7526d3();while(!![]){try{const _0x290ee0=-parseInt(_0x1c21cc(0x181))/0x1+-parseInt(_0x1c21cc(0x17a))/0x2+-parseInt(_0x1c21cc(0x182))/0x3+-parseInt(_0x1c21cc(0x175))/0x4*(-parseInt(_0x1c21cc(0x172))/0x5)+parseInt(_0x1c21cc(0x176))/0x6+-parseInt(_0x1c21cc(0x174))/0x7*(-parseInt(_0x1c21cc(0x179))/0x8)+parseInt(_0x1c21cc(0x178))/0x9;if(_0x290ee0===_0x24165a)break;else _0x40f884['push'](_0x40f884['shift']());}catch(_0x3d5ac0){_0x40f884['push'](_0x40f884['shift']());}}}(a132_0x5b3b,0x2e56d));import a132_0x5aeb0e from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a132_0x5b3b(){const _0x45a9cb=['16620VtIcLJ','message','994aJGmuB','228uRynpF','2168550NFGHDy','开始格式化代码','972126NJWznO','48cUZbie','141296pFdASd','info','代码格式化失败','format','npx','cwd','代码格式化完成','109323VIsiIa','869949aEIWmY','now','success','resolve'];a132_0x5b3b=function(){return _0x45a9cb;};return a132_0x5b3b();}function a132_0x25b6(_0x444c56,_0x15be87){_0x444c56=_0x444c56-0x172;const _0x5b3bc6=a132_0x5b3b();let _0x25b6cd=_0x5b3bc6[_0x444c56];return _0x25b6cd;}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x4bb040){const _0x25079d=a132_0x25b6,_0x403250=Date[_0x25079d(0x183)](),_0x2280b2=a132_0x5aeb0e[_0x25079d(0x185)](process[_0x25079d(0x17f)](),_0x4bb040);try{logger[_0x25079d(0x17b)](_0x25079d(0x17d),_0x25079d(0x177),{'projectCode':_0x4bb040}),await execa(resolveNpmBin(_0x25079d(0x17e)),['prettier','--write','.'],{'cwd':_0x2280b2});const _0xf4011c=Date[_0x25079d(0x183)]()-_0x403250;logger[_0x25079d(0x184)](_0x25079d(0x17d),_0x25079d(0x180),_0xf4011c,{'projectCode':_0x4bb040});}catch(_0x5dd23d){const _0x2fa355=Date[_0x25079d(0x183)]()-_0x403250;logger['error'](_0x25079d(0x17d),_0x25079d(0x17c),{'projectCode':_0x4bb040,'error':_0x5dd23d instanceof Error?_0x5dd23d[_0x25079d(0x173)]:String(_0x5dd23d),'duration':_0x2fa355});throw _0x5dd23d;}return formatElapsed(_0x403250);}
1
+ (function(_0x2b9b51,_0x5cc47f){const _0xb5838c=a132_0x268d,_0xec3696=_0x2b9b51();while(!![]){try{const _0x55b265=-parseInt(_0xb5838c(0x19b))/0x1+-parseInt(_0xb5838c(0x196))/0x2+-parseInt(_0xb5838c(0x198))/0x3+-parseInt(_0xb5838c(0x194))/0x4*(parseInt(_0xb5838c(0x193))/0x5)+-parseInt(_0xb5838c(0x1a3))/0x6+-parseInt(_0xb5838c(0x1a1))/0x7*(-parseInt(_0xb5838c(0x1a5))/0x8)+-parseInt(_0xb5838c(0x195))/0x9*(-parseInt(_0xb5838c(0x19a))/0xa);if(_0x55b265===_0x5cc47f)break;else _0xec3696['push'](_0xec3696['shift']());}catch(_0x475048){_0xec3696['push'](_0xec3696['shift']());}}}(a132_0x26f8,0xaea36));import a132_0x4e98ce from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a132_0x26f8(){const _0x338b72=['开始格式化代码','6908904LEDiwr','cwd','608XkIIZh','30190Vbzfxq','444RiVdJS','9pHbIwl','28326HarIJY','info','1487220DuKnIT','--write','35045960bILFsS','1010421mBNKDm','代码格式化完成','format','resolve','now','message','50911aoTFYA'];a132_0x26f8=function(){return _0x338b72;};return a132_0x26f8();}import{resolveNpmBin}from'../../../utils/platform.js';function a132_0x268d(_0x140e09,_0x5adc1b){_0x140e09=_0x140e09-0x193;const _0x26f8c5=a132_0x26f8();let _0x268ded=_0x26f8c5[_0x140e09];return _0x268ded;}export async function formatProjectCode(_0x2650f2){const _0x21f2b7=a132_0x268d,_0x40494e=Date[_0x21f2b7(0x19f)](),_0x788ecb=a132_0x4e98ce[_0x21f2b7(0x19e)](process[_0x21f2b7(0x1a4)](),_0x2650f2);try{logger[_0x21f2b7(0x197)](_0x21f2b7(0x19d),_0x21f2b7(0x1a2),{'projectCode':_0x2650f2}),await execa(resolveNpmBin('npx'),['prettier',_0x21f2b7(0x199),'.'],{'cwd':_0x788ecb});const _0x488bd3=Date[_0x21f2b7(0x19f)]()-_0x40494e;logger['success'](_0x21f2b7(0x19d),_0x21f2b7(0x19c),_0x488bd3,{'projectCode':_0x2650f2});}catch(_0x349171){const _0x5b4a29=Date[_0x21f2b7(0x19f)]()-_0x40494e;logger['error']('format','代码格式化失败',{'projectCode':_0x2650f2,'error':_0x349171 instanceof Error?_0x349171[_0x21f2b7(0x1a0)]:String(_0x349171),'duration':_0x5b4a29});throw _0x349171;}return formatElapsed(_0x40494e);}
@@ -1 +1 @@
1
- (function(_0x120cb9,_0x5b6894){const _0x2551a0=a133_0x4067,_0x101891=_0x120cb9();while(!![]){try{const _0x3ea5cb=parseInt(_0x2551a0(0xc8))/0x1+-parseInt(_0x2551a0(0xcf))/0x2*(parseInt(_0x2551a0(0xcd))/0x3)+parseInt(_0x2551a0(0xd6))/0x4*(parseInt(_0x2551a0(0xc7))/0x5)+-parseInt(_0x2551a0(0xc9))/0x6+-parseInt(_0x2551a0(0xd8))/0x7+-parseInt(_0x2551a0(0xcc))/0x8*(-parseInt(_0x2551a0(0xca))/0x9)+parseInt(_0x2551a0(0xcb))/0xa;if(_0x3ea5cb===_0x5b6894)break;else _0x101891['push'](_0x101891['shift']());}catch(_0x536083){_0x101891['push'](_0x101891['shift']());}}}(a133_0x4287,0x56df6));import a133_0x2832a5 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a133_0x4067(_0x3ed9a8,_0x56d411){_0x3ed9a8=_0x3ed9a8-0xc5;const _0x4287b7=a133_0x4287();let _0x4067f8=_0x4287b7[_0x3ed9a8];return _0x4067f8;}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x183394){const _0xe0c1b2=a133_0x4067,_0x395e7b=Date[_0xe0c1b2(0xc5)](),_0x5c1ad6=a133_0x2832a5['resolve'](process[_0xe0c1b2(0xd4)](),_0x183394);try{logger[_0xe0c1b2(0xd1)]('install',_0xe0c1b2(0xc6),{'projectCode':_0x183394,'registry':_0xe0c1b2(0xd7)}),await execa(resolveNpmBin('npm'),[_0xe0c1b2(0xd5),_0xe0c1b2(0xd9),_0xe0c1b2(0xd7)],{'cwd':_0x5c1ad6});const _0x1416fe=Date[_0xe0c1b2(0xc5)]()-_0x395e7b;logger[_0xe0c1b2(0xd2)](_0xe0c1b2(0xd5),_0xe0c1b2(0xce),_0x1416fe,{'projectCode':_0x183394});}catch(_0x4fad5f){const _0x596f22=Date['now']()-_0x395e7b;logger[_0xe0c1b2(0xd3)](_0xe0c1b2(0xd5),_0xe0c1b2(0xd0),{'projectCode':_0x183394,'error':_0x4fad5f instanceof Error?_0x4fad5f[_0xe0c1b2(0xda)]:String(_0x4fad5f),'duration':_0x596f22});throw _0x4fad5f;}return formatElapsed(_0x395e7b);}function a133_0x4287(){const _0x3c5dbc=['开始安装依赖','3091575dsmqIt','524586EBQoqi','3786984XNYJrx','1003383kOitkn','1246770owNgnA','32jgRJHE','1454706kYqtyQ','依赖安装完成','2RUiZYR','依赖安装失败','info','success','error','cwd','install','4IlPyZO','https://registry.npmmirror.com','1691410lbmEoX','--registry','message','now'];a133_0x4287=function(){return _0x3c5dbc;};return a133_0x4287();}
1
+ function a133_0x1a5f(_0x3d2a33,_0x3c48c1){_0x3d2a33=_0x3d2a33-0x1bd;const _0x231262=a133_0x2312();let _0x1a5f4b=_0x231262[_0x3d2a33];return _0x1a5f4b;}(function(_0x3c6f9f,_0x28c910){const _0x31992e=a133_0x1a5f,_0x188dec=_0x3c6f9f();while(!![]){try{const _0x459fbd=-parseInt(_0x31992e(0x1cc))/0x1*(parseInt(_0x31992e(0x1c0))/0x2)+parseInt(_0x31992e(0x1cb))/0x3*(-parseInt(_0x31992e(0x1c8))/0x4)+parseInt(_0x31992e(0x1c5))/0x5*(-parseInt(_0x31992e(0x1c3))/0x6)+parseInt(_0x31992e(0x1bf))/0x7+parseInt(_0x31992e(0x1c7))/0x8+-parseInt(_0x31992e(0x1c2))/0x9*(-parseInt(_0x31992e(0x1ce))/0xa)+parseInt(_0x31992e(0x1ca))/0xb*(parseInt(_0x31992e(0x1cd))/0xc);if(_0x459fbd===_0x28c910)break;else _0x188dec['push'](_0x188dec['shift']());}catch(_0x3c5c04){_0x188dec['push'](_0x188dec['shift']());}}}(a133_0x2312,0x5d446));import a133_0x37786d from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a133_0x2312(){const _0x5c4dcb=['180JsovEj','7278TfIfet','resolve','2690PgnTEi','https://registry.npmmirror.com','3062208BTEwQv','459236XfXHov','依赖安装失败','286MSVRpN','9eKAcbv','3DOSQBB','617928idNHgI','18890atXhDN','success','message','info','now','install','472549TtYZZH','298576dUQrQu','error'];a133_0x2312=function(){return _0x5c4dcb;};return a133_0x2312();}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x1503ea){const _0x40866c=a133_0x1a5f,_0x3f3c4f=Date[_0x40866c(0x1bd)](),_0x4531c4=a133_0x37786d[_0x40866c(0x1c4)](process['cwd'](),_0x1503ea);try{logger[_0x40866c(0x1d1)]('install','开始安装依赖',{'projectCode':_0x1503ea,'registry':_0x40866c(0x1c6)}),await execa(resolveNpmBin('npm'),[_0x40866c(0x1be),'--registry',_0x40866c(0x1c6)],{'cwd':_0x4531c4});const _0x1480c4=Date['now']()-_0x3f3c4f;logger[_0x40866c(0x1cf)](_0x40866c(0x1be),'依赖安装完成',_0x1480c4,{'projectCode':_0x1503ea});}catch(_0x1e7ff2){const _0x1cfa7a=Date['now']()-_0x3f3c4f;logger[_0x40866c(0x1c1)](_0x40866c(0x1be),_0x40866c(0x1c9),{'projectCode':_0x1503ea,'error':_0x1e7ff2 instanceof Error?_0x1e7ff2[_0x40866c(0x1d0)]:String(_0x1e7ff2),'duration':_0x1cfa7a});throw _0x1e7ff2;}return formatElapsed(_0x3f3c4f);}
@@ -1 +1 @@
1
- const a134_0x58a378=a134_0x1073;(function(_0x42aebf,_0x4793d3){const _0xf9497=a134_0x1073,_0x3b4f06=_0x42aebf();while(!![]){try{const _0x1b2d98=-parseInt(_0xf9497(0xfa))/0x1+parseInt(_0xf9497(0x114))/0x2+parseInt(_0xf9497(0xf6))/0x3+-parseInt(_0xf9497(0x116))/0x4+parseInt(_0xf9497(0x104))/0x5*(-parseInt(_0xf9497(0x10c))/0x6)+parseInt(_0xf9497(0x103))/0x7*(parseInt(_0xf9497(0x111))/0x8)+parseInt(_0xf9497(0xf9))/0x9*(parseInt(_0xf9497(0x10f))/0xa);if(_0x1b2d98===_0x4793d3)break;else _0x3b4f06['push'](_0x3b4f06['shift']());}catch(_0x4751f8){_0x3b4f06['push'](_0x3b4f06['shift']());}}}(a134_0x3895,0xbbeb2));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';function a134_0x1073(_0x175562,_0x4fbd6d){_0x175562=_0x175562-0xf3;const _0x389590=a134_0x3895();let _0x107318=_0x389590[_0x175562];return _0x107318;}function a134_0x3895(){const _0xd771dc=['2026-07','Usage:\x20','11678841oBsUcx','321174xevhbO','project-name','Skip\x20confirmation\x20prompt','Project\x20name','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','write','Auto-confirm\x20prompts','../../commands/project/create/main.js','217707dzbfoG','615HMhMgs','init','project','../../commands/project/create/non-interactive.js','upgrade','boolean','nonInteractive','validation','28818wnjTsu','cookie','string','10xvVjiG','args','384KuBxka','\x20workspace\x20init','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','59328cYTXTt','bool','6153604FNRyMa','name','yes','env','str','App\x20code\x20to\x20initialize','Target\x20environment','appcode','1199691LCoyVG'];a134_0x3895=function(){return _0xd771dc;};return a134_0x3895();}const initFlags=[{'name':a134_0x58a378(0xf5),'type':a134_0x58a378(0x10e),'description':a134_0x58a378(0xf3)},{'name':a134_0x58a378(0x119),'type':'string','description':a134_0x58a378(0xf4)},{'name':a134_0x58a378(0x118),'type':a134_0x58a378(0x109),'description':a134_0x58a378(0x101),'default':![]}],createFlags=[{'name':a134_0x58a378(0x117),'type':'string','description':a134_0x58a378(0xfd)},{'name':a134_0x58a378(0x119),'type':a134_0x58a378(0x10e),'description':'Target\x20environment'},{'name':a134_0x58a378(0xf5),'type':a134_0x58a378(0x10e),'description':a134_0x58a378(0xff)}],upgradeFlags=[{'name':'yes','type':a134_0x58a378(0x109),'description':a134_0x58a378(0xfc),'default':![]}];export const projectDefinitions=[{'service':a134_0x58a378(0x106),'command':a134_0x58a378(0x105),'description':'Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','risk':a134_0x58a378(0x100),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a134_0x58a378(0x112),'since':a134_0x58a378(0xf7)},'flags':initFlags,async 'execute'(_0x3e5137){const _0xd5d37f=a134_0x58a378;return await initConfig({'appcode':_0x3e5137[_0xd5d37f(0x11a)](_0xd5d37f(0xf5))||undefined,'env':_0x3e5137[_0xd5d37f(0x11a)](_0xd5d37f(0x119))||undefined,'autoYes':_0x3e5137['bool'](_0xd5d37f(0x118))}),{'ok':!![]};}},{'service':a134_0x58a378(0x106),'command':'create','description':'Create\x20a\x20new\x20project','risk':a134_0x58a378(0x100),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a134_0x58a378(0xfb),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x4c82b7){const _0xc0ee21=a134_0x58a378,{createApp:_0x140a12}=await import(_0xc0ee21(0x102)),{createProjectNonInteractive:_0x1b282b}=await import(_0xc0ee21(0x107)),_0x51d12c=_0x4c82b7['str'](_0xc0ee21(0x117))['trim']()||_0x4c82b7[_0xc0ee21(0x110)][0x0]?.['trim'](),_0x26b9a8=_0x4c82b7[_0xc0ee21(0x11a)](_0xc0ee21(0x119))||undefined,_0x4d7f50=_0x4c82b7['str'](_0xc0ee21(0xf5))||undefined;if(_0x4c82b7[_0xc0ee21(0x10a)]){if(!_0x51d12c)throw CliErrors[_0xc0ee21(0x10b)](_0xc0ee21(0x113),_0xc0ee21(0xf8)+CLI_BIN_NAME+_0xc0ee21(0xfe));await _0x1b282b(_0x51d12c,_0x26b9a8,_0x4d7f50,_0x4c82b7[_0xc0ee21(0x10d)]);}else await _0x140a12({'projectCode':_0x51d12c,'appCode':_0x4d7f50,'env':_0x26b9a8,'cookie':_0x4c82b7[_0xc0ee21(0x10d)]});return{'ok':!![]};}},{'service':a134_0x58a378(0x106),'command':a134_0x58a378(0x108),'description':'Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x5cb2e7){const _0xe8cba3=a134_0x58a378;return await upgradeApp(_0x5cb2e7[_0xe8cba3(0x10a)],{'yes':_0x5cb2e7[_0xe8cba3(0x115)](_0xe8cba3(0x118))}),{'ok':!![]};}}];
1
+ const a134_0x29fbbd=a134_0x327e;(function(_0x447356,_0x338cfe){const _0x4ab8ac=a134_0x327e,_0x3d797f=_0x447356();while(!![]){try{const _0x31d1d9=-parseInt(_0x4ab8ac(0x105))/0x1*(parseInt(_0x4ab8ac(0x111))/0x2)+parseInt(_0x4ab8ac(0xf8))/0x3+parseInt(_0x4ab8ac(0x106))/0x4+parseInt(_0x4ab8ac(0x10e))/0x5*(-parseInt(_0x4ab8ac(0xf5))/0x6)+parseInt(_0x4ab8ac(0x10f))/0x7*(parseInt(_0x4ab8ac(0x102))/0x8)+-parseInt(_0x4ab8ac(0xfd))/0x9*(parseInt(_0x4ab8ac(0x10b))/0xa)+parseInt(_0x4ab8ac(0xec))/0xb;if(_0x31d1d9===_0x338cfe)break;else _0x3d797f['push'](_0x3d797f['shift']());}catch(_0x409d74){_0x3d797f['push'](_0x3d797f['shift']());}}}(a134_0x5920,0x9617b));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a134_0x5920(){const _0x51afc0=['16JVkHNi','../../commands/project/create/main.js','boolean','1148773aLGixX','1184640Dpdvbt','str','env','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','1409390PIpPHh','Auto-confirm\x20prompts','nonInteractive','2156835HCyLLI','1196958nQYILA','App\x20code\x20to\x20initialize','2yUDFfK','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','\x20workspace\x20init','name','10935166Exvgux','trim','project','write','appcode','init','args','../../commands/project/create/non-interactive.js','Target\x20environment','6nDiDBB','string','validation','2956446NIuXWn','create','project-name','Create\x20a\x20new\x20project','Project\x20name','27XfbttA','Skip\x20confirmation\x20prompt','yes','Usage:\x20','cookie'];a134_0x5920=function(){return _0x51afc0;};return a134_0x5920();}function a134_0x327e(_0x32f9a0,_0x51894c){_0x32f9a0=_0x32f9a0-0xeb;const _0x592064=a134_0x5920();let _0x327efd=_0x592064[_0x32f9a0];return _0x327efd;}import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a134_0x29fbbd(0xf0),'type':'string','description':a134_0x29fbbd(0x110)},{'name':a134_0x29fbbd(0x108),'type':a134_0x29fbbd(0xf6),'description':'Target\x20environment'},{'name':a134_0x29fbbd(0xff),'type':'boolean','description':a134_0x29fbbd(0x10c),'default':![]}],createFlags=[{'name':a134_0x29fbbd(0xeb),'type':a134_0x29fbbd(0xf6),'description':a134_0x29fbbd(0xfc)},{'name':a134_0x29fbbd(0x108),'type':a134_0x29fbbd(0xf6),'description':a134_0x29fbbd(0xf4)},{'name':a134_0x29fbbd(0xf0),'type':a134_0x29fbbd(0xf6),'description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'}],upgradeFlags=[{'name':a134_0x29fbbd(0xff),'type':a134_0x29fbbd(0x104),'description':a134_0x29fbbd(0xfe),'default':![]}];export const projectDefinitions=[{'service':a134_0x29fbbd(0xee),'command':a134_0x29fbbd(0xf1),'description':a134_0x29fbbd(0x112),'risk':a134_0x29fbbd(0xef),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a134_0x29fbbd(0x113),'since':'2026-07'},'flags':initFlags,async 'execute'(_0x326f1a){const _0x3a5b56=a134_0x29fbbd;return await initConfig({'appcode':_0x326f1a[_0x3a5b56(0x107)](_0x3a5b56(0xf0))||undefined,'env':_0x326f1a['str']('env')||undefined,'autoYes':_0x326f1a['bool'](_0x3a5b56(0xff))}),{'ok':!![]};}},{'service':a134_0x29fbbd(0xee),'command':a134_0x29fbbd(0xf9),'description':a134_0x29fbbd(0xfb),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a134_0x29fbbd(0xfa),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x149d3b){const _0x5dd325=a134_0x29fbbd,{createApp:_0x53c063}=await import(_0x5dd325(0x103)),{createProjectNonInteractive:_0x1235d0}=await import(_0x5dd325(0xf3)),_0xbc158f=_0x149d3b[_0x5dd325(0x107)](_0x5dd325(0xeb))['trim']()||_0x149d3b[_0x5dd325(0xf2)][0x0]?.[_0x5dd325(0xed)](),_0x17e9a1=_0x149d3b[_0x5dd325(0x107)](_0x5dd325(0x108))||undefined,_0x460970=_0x149d3b['str'](_0x5dd325(0xf0))||undefined;if(_0x149d3b[_0x5dd325(0x10d)]){if(!_0xbc158f)throw CliErrors[_0x5dd325(0xf7)](_0x5dd325(0x10a),_0x5dd325(0x100)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x1235d0(_0xbc158f,_0x17e9a1,_0x460970,_0x149d3b[_0x5dd325(0x101)]);}else await _0x53c063({'projectCode':_0xbc158f,'appCode':_0x460970,'env':_0x17e9a1,'cookie':_0x149d3b[_0x5dd325(0x101)]});return{'ok':!![]};}},{'service':a134_0x29fbbd(0xee),'command':'upgrade','description':a134_0x29fbbd(0x109),'risk':a134_0x29fbbd(0xef),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x4afa6c){const _0x2aef85=a134_0x29fbbd;return await upgradeApp(_0x4afa6c[_0x2aef85(0x10d)],{'yes':_0x4afa6c['bool'](_0x2aef85(0xff))}),{'ok':!![]};}}];
@@ -1 +1 @@
1
- (function(_0xa2750c,_0x6959ba){const _0x24f1f7=a135_0x1453,_0x1c1281=_0xa2750c();while(!![]){try{const _0x33f12c=parseInt(_0x24f1f7(0x198))/0x1*(-parseInt(_0x24f1f7(0x197))/0x2)+parseInt(_0x24f1f7(0x1aa))/0x3*(-parseInt(_0x24f1f7(0x1ac))/0x4)+-parseInt(_0x24f1f7(0x1a8))/0x5*(parseInt(_0x24f1f7(0x1af))/0x6)+parseInt(_0x24f1f7(0x190))/0x7*(parseInt(_0x24f1f7(0x1a2))/0x8)+parseInt(_0x24f1f7(0x19e))/0x9*(parseInt(_0x24f1f7(0x1b1))/0xa)+parseInt(_0x24f1f7(0x1a5))/0xb+parseInt(_0x24f1f7(0x1a0))/0xc*(parseInt(_0x24f1f7(0x192))/0xd);if(_0x33f12c===_0x6959ba)break;else _0x1c1281['push'](_0x1c1281['shift']());}catch(_0xb04563){_0x1c1281['push'](_0x1c1281['shift']());}}}(a135_0x3dc3,0x77e5b));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a135_0x7e0752 from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';function a135_0x1453(_0x53793a,_0x997b79){_0x53793a=_0x53793a-0x17d;const _0x3dc397=a135_0x3dc3();let _0x1453fe=_0x3dc397[_0x53793a];return _0x1453fe;}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 a135_0x3dc3(){const _0x4de769=['.bak','13304hlGlQl','defaultApp','string','3887235Nxqdrj','info','keys','19495DXVlMm','1.0.0','363SbEyrp','\x20workspace\x20init`\x20to\x20start\x20fresh.','4696XQhxtw','cwd','app','1146EGGbHm','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','2566020tFFAoY','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','\x20\x20Apps:\x20','从旧配置文件升级成功','Migration\x20cancelled.\x20Run\x20`','\x20→\x20.rabetbase.json','cyan','join','init','env','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','初始化项目配置文件成功','setLogPath','\x20\x20Default:\x20','green','bold','Invalid\x20App\x20Code','log','yellow','appcode','apps','parse','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','Please\x20enter\x20App\x20Code:','2779dkPKTq','trim','45058jnJEPG','../..','App\x20Code\x20cannot\x20be\x20empty','toLocaleString','gray','82966ORlKBM','2DETbZb','utf8','\x20api\x20pull\x27','.rabetbase.json','\x20\x20appcode:\x20','production','9onZhyp','version','660pkTQFf'];a135_0x3dc3=function(){return _0x4de769;};return a135_0x3dc3();}import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x401f3e){const _0x1e10f7=a135_0x1453,{appcode:_0x5b9fe3,env:_0x1d287d,autoYes:_0x168ca0}=_0x401f3e,_0x2abfc3=process[_0x1e10f7(0x1ad)]();if(getProjectConfigPath())throw new Error(_0x1e10f7(0x1b0));let _0x47da9f;for(const _0x451014 of LEGACY_CONFIG_NAMES){const _0x2d443c=resolve(_0x2abfc3,_0x451014);if(existsSync(_0x2d443c)){_0x47da9f=_0x2d443c;break;}}if(_0x47da9f){let _0x863c41={};try{_0x863c41=JSON[_0x1e10f7(0x18d)](readFileSync(_0x47da9f,_0x1e10f7(0x199)));}catch{}const _0x271bd4=basename(_0x47da9f),_0x3708ee=_0x863c41?.['appcode']||_0x863c41?.[_0x1e10f7(0x1ae)];let _0x42bdc1=_0x168ca0;!_0x168ca0&&(console[_0x1e10f7(0x189)](a135_0x7e0752[_0x1e10f7(0x18a)](_0x1e10f7(0x182)+a135_0x7e0752[_0x1e10f7(0x187)](_0x271bd4))),_0x3708ee&&console[_0x1e10f7(0x189)](a135_0x7e0752[_0x1e10f7(0x17e)](_0x1e10f7(0x19c)+_0x3708ee)),_0x42bdc1=await confirm({'message':'Upgrade\x20it\x20to\x20'+a135_0x7e0752[_0x1e10f7(0x187)](_0x1e10f7(0x19b))+'?\x20(Old\x20file\x20→\x20*.bak)','default':!![]}));if(!_0x42bdc1){console[_0x1e10f7(0x189)](_0x1e10f7(0x1b5)+CLI_BIN_NAME+_0x1e10f7(0x1ab));return;}const _0x55b12e=resolve(_0x2abfc3,NEW_CONFIG_NAME),_0x2ad1fd=getCliVersionFromPkg(),_0x49dd8d=readRawConfig(),_0x5678f6=_0x5b9fe3||(typeof _0x863c41?.[_0x1e10f7(0x18b)]===_0x1e10f7(0x1a4)?_0x863c41[_0x1e10f7(0x18b)]:undefined)||(typeof _0x863c41?.[_0x1e10f7(0x1ae)]===_0x1e10f7(0x1a4)?_0x863c41[_0x1e10f7(0x1ae)]:undefined)||await askAppcode(),_0x1781b0=typeof _0x863c41?.[_0x1e10f7(0x181)]===_0x1e10f7(0x1a4)?_0x863c41['env']:typeof _0x49dd8d['env']===_0x1e10f7(0x1a4)?_0x49dd8d[_0x1e10f7(0x181)]:_0x1e10f7(0x19d),_0x195531=buildCanonicalProjectConfig({..._0x49dd8d,..._0x863c41},{'appCodes':[_0x5678f6],'env':_0x1781b0,'metadata':{'version':_0x2ad1fd,'migratedAt':new Date()[_0x1e10f7(0x195)](),'migratedFrom':_0x47da9f}});writeConfigFile(_0x55b12e,_0x195531);const _0xc1da64=_0x47da9f+'.bak';renameSync(_0x47da9f,_0xc1da64),logger[_0x1e10f7(0x184)](_0x2abfc3),logger[_0x1e10f7(0x1a6)](_0x1e10f7(0x180),_0x1e10f7(0x1b4),{'from':_0x47da9f,'to':_0x55b12e,'appcode':_0x5678f6,'env':_0x195531['env']}),console['log'](a135_0x7e0752[_0x1e10f7(0x186)]('✓\x20Upgraded\x20'+_0x271bd4+_0x1e10f7(0x17d))),console[_0x1e10f7(0x189)](a135_0x7e0752['cyan']('\x20\x20Apps:\x20'+Object['keys'](_0x195531[_0x1e10f7(0x18c)]||{})['join'](',\x20'))),console[_0x1e10f7(0x189)](a135_0x7e0752[_0x1e10f7(0x17e)](_0x1e10f7(0x185)+_0x195531[_0x1e10f7(0x1a3)])),console[_0x1e10f7(0x189)](a135_0x7e0752[_0x1e10f7(0x196)]('\x20\x20Old\x20file\x20backed\x20up\x20as\x20'+_0x271bd4+_0x1e10f7(0x1a1)));return;}const _0x4a6018=_0x5b9fe3||await askAppcode(),_0x394030=resolve(_0x2abfc3,NEW_CONFIG_NAME),_0x583e3e=getCliVersionFromPkg(),_0x561540=readRawConfig(),_0x4d4bfe=typeof _0x561540['env']===_0x1e10f7(0x1a4)?_0x561540['env']:undefined,_0x49f2fd=buildCanonicalProjectConfig({},{'appCodes':[_0x4a6018],'env':_0x1d287d||_0x4d4bfe||'production','metadata':{'version':_0x583e3e,'createdAt':new Date()['toLocaleString']()}});writeConfigFile(_0x394030,_0x49f2fd),logger[_0x1e10f7(0x184)](_0x2abfc3),logger['info'](_0x1e10f7(0x180),_0x1e10f7(0x183),{'appcode':_0x4a6018,'env':_0x49f2fd[_0x1e10f7(0x181)],'version':_0x49f2fd[_0x1e10f7(0x19f)],'configPath':_0x394030}),console[_0x1e10f7(0x189)](a135_0x7e0752[_0x1e10f7(0x186)](_0x1e10f7(0x1b2))),console[_0x1e10f7(0x189)](a135_0x7e0752[_0x1e10f7(0x17e)](_0x1e10f7(0x1b3)+Object[_0x1e10f7(0x1a7)](_0x49f2fd[_0x1e10f7(0x18c)]||{})[_0x1e10f7(0x17f)](',\x20'))),console[_0x1e10f7(0x189)](a135_0x7e0752['cyan'](_0x1e10f7(0x185)+_0x49f2fd[_0x1e10f7(0x1a3)])),console[_0x1e10f7(0x189)](_0x1e10f7(0x18e)+CLI_BIN_NAME+'\x20api\x20generate\x27\x20and\x20\x27'+CLI_BIN_NAME+_0x1e10f7(0x19a));}function askAppcode(){const _0xd6bcb5=a135_0x1453;return input({'message':_0xd6bcb5(0x18f),'validate':_0x45a86e=>{const _0x229397=_0xd6bcb5;if(!_0x45a86e[_0x229397(0x191)]())return _0x229397(0x194);const {valid:_0xec3550,message:_0x36b642}=validateAppcode(_0x45a86e['trim']());return _0xec3550||_0x36b642||_0x229397(0x188);}});}function getCliVersionFromPkg(){const _0x54b243=a135_0x1453;try{const _0x25ebc9=fileURLToPath(import.meta.url),_0x445f69=resolve(dirname(_0x25ebc9),_0x54b243(0x193)),_0x3b5eaa=JSON['parse'](readFileSync(resolve(_0x445f69,'package.json'),_0x54b243(0x199)));return _0x3b5eaa[_0x54b243(0x19f)]||_0x54b243(0x1a9);}catch{return'1.0.0';}}
1
+ (function(_0x4b1087,_0x18fa97){const _0x2e0f39=a135_0x276a,_0x11cd9b=_0x4b1087();while(!![]){try{const _0x1e0b22=-parseInt(_0x2e0f39(0x8d))/0x1+-parseInt(_0x2e0f39(0xa3))/0x2+-parseInt(_0x2e0f39(0x84))/0x3+-parseInt(_0x2e0f39(0xad))/0x4*(-parseInt(_0x2e0f39(0x92))/0x5)+parseInt(_0x2e0f39(0x95))/0x6+-parseInt(_0x2e0f39(0x9a))/0x7+parseInt(_0x2e0f39(0x78))/0x8*(parseInt(_0x2e0f39(0x9e))/0x9);if(_0x1e0b22===_0x18fa97)break;else _0x11cd9b['push'](_0x11cd9b['shift']());}catch(_0x4ba8ba){_0x11cd9b['push'](_0x11cd9b['shift']());}}}(a135_0x3e9e,0x50277));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a135_0x1f7b43 from'chalk';function a135_0x3e9e(){const _0x23b6f7=['3204590ZvRjbH','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','package.json','3302910pIcKfL','../..','cwd','env','cyan','2016294MfPMzV','info','string','production','22689cmaxhl','.rabetbase.json','.bak','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','green','338808yfUewj','utf8','yellow','Migration\x20cancelled.\x20Run\x20`','parse','trim','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','初始化项目配置文件成功','setLogPath','log','4XDAgEn','1336WGDWGH','toLocaleString','\x20api\x20generate\x27\x20and\x20\x27','version','\x20\x20Default:\x20','\x20→\x20.rabetbase.json','Please\x20enter\x20App\x20Code:','init','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','appcode','\x20\x20appcode:\x20','join','1570395jVnBBW','app','bold','\x20\x20Apps:\x20','1.0.0','\x20workspace\x20init`\x20to\x20start\x20fresh.','✓\x20Upgraded\x20','keys','apps','303188TwoffO','gray','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','defaultApp','Invalid\x20App\x20Code'];a135_0x3e9e=function(){return _0x23b6f7;};return a135_0x3e9e();}import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';function a135_0x276a(_0x208f83,_0x31ceab){_0x208f83=_0x208f83-0x78;const _0x3e9ecd=a135_0x3e9e();let _0x276a2d=_0x3e9ecd[_0x208f83];return _0x276a2d;}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(_0x49407c){const _0x48a1bf=a135_0x276a,{appcode:_0x4f49ff,env:_0x242513,autoYes:_0x287116}=_0x49407c,_0x8c6f3c=process[_0x48a1bf(0x97)]();if(getProjectConfigPath())throw new Error(_0x48a1bf(0xa9));let _0x32b27f;for(const _0x4c9b28 of LEGACY_CONFIG_NAMES){const _0x402fe1=resolve(_0x8c6f3c,_0x4c9b28);if(existsSync(_0x402fe1)){_0x32b27f=_0x402fe1;break;}}if(_0x32b27f){let _0x12f142={};try{_0x12f142=JSON['parse'](readFileSync(_0x32b27f,_0x48a1bf(0xa4)));}catch{}const _0x2a6362=basename(_0x32b27f),_0x18c7c9=_0x12f142?.[_0x48a1bf(0x81)]||_0x12f142?.[_0x48a1bf(0x85)];let _0x56c0c6=_0x287116;!_0x287116&&(console['log'](a135_0x1f7b43[_0x48a1bf(0xa5)](_0x48a1bf(0xa1)+a135_0x1f7b43[_0x48a1bf(0x86)](_0x2a6362))),_0x18c7c9&&console[_0x48a1bf(0xac)](a135_0x1f7b43[_0x48a1bf(0x99)](_0x48a1bf(0x82)+_0x18c7c9)),_0x56c0c6=await confirm({'message':'Upgrade\x20it\x20to\x20'+a135_0x1f7b43['bold'](_0x48a1bf(0x9f))+'?\x20(Old\x20file\x20→\x20*.bak)','default':!![]}));if(!_0x56c0c6){console[_0x48a1bf(0xac)](_0x48a1bf(0xa6)+CLI_BIN_NAME+_0x48a1bf(0x89));return;}const _0x2c2854=resolve(_0x8c6f3c,NEW_CONFIG_NAME),_0x16fa7b=getCliVersionFromPkg(),_0x228082=readRawConfig(),_0x538e9a=_0x4f49ff||(typeof _0x12f142?.[_0x48a1bf(0x81)]===_0x48a1bf(0x9c)?_0x12f142[_0x48a1bf(0x81)]:undefined)||(typeof _0x12f142?.[_0x48a1bf(0x85)]===_0x48a1bf(0x9c)?_0x12f142[_0x48a1bf(0x85)]:undefined)||await askAppcode(),_0x400229=typeof _0x12f142?.['env']===_0x48a1bf(0x9c)?_0x12f142[_0x48a1bf(0x98)]:typeof _0x228082[_0x48a1bf(0x98)]===_0x48a1bf(0x9c)?_0x228082[_0x48a1bf(0x98)]:_0x48a1bf(0x9d),_0x22972b=buildCanonicalProjectConfig({..._0x228082,..._0x12f142},{'appCodes':[_0x538e9a],'env':_0x400229,'metadata':{'version':_0x16fa7b,'migratedAt':new Date()[_0x48a1bf(0x79)](),'migratedFrom':_0x32b27f}});writeConfigFile(_0x2c2854,_0x22972b);const _0x2cab8a=_0x32b27f+'.bak';renameSync(_0x32b27f,_0x2cab8a),logger[_0x48a1bf(0xab)](_0x8c6f3c),logger['info'](_0x48a1bf(0x7f),'从旧配置文件升级成功',{'from':_0x32b27f,'to':_0x2c2854,'appcode':_0x538e9a,'env':_0x22972b[_0x48a1bf(0x98)]}),console['log'](a135_0x1f7b43[_0x48a1bf(0xa2)](_0x48a1bf(0x8a)+_0x2a6362+_0x48a1bf(0x7d))),console[_0x48a1bf(0xac)](a135_0x1f7b43['cyan']('\x20\x20Apps:\x20'+Object[_0x48a1bf(0x8b)](_0x22972b[_0x48a1bf(0x8c)]||{})[_0x48a1bf(0x83)](',\x20'))),console[_0x48a1bf(0xac)](a135_0x1f7b43[_0x48a1bf(0x99)](_0x48a1bf(0x7c)+_0x22972b[_0x48a1bf(0x90)])),console[_0x48a1bf(0xac)](a135_0x1f7b43[_0x48a1bf(0x8e)](_0x48a1bf(0x93)+_0x2a6362+_0x48a1bf(0xa0)));return;}const _0x5d1bae=_0x4f49ff||await askAppcode(),_0x4d27ee=resolve(_0x8c6f3c,NEW_CONFIG_NAME),_0x2e68cc=getCliVersionFromPkg(),_0xe5524d=readRawConfig(),_0x108936=typeof _0xe5524d['env']==='string'?_0xe5524d[_0x48a1bf(0x98)]:undefined,_0x578785=buildCanonicalProjectConfig({},{'appCodes':[_0x5d1bae],'env':_0x242513||_0x108936||'production','metadata':{'version':_0x2e68cc,'createdAt':new Date()[_0x48a1bf(0x79)]()}});writeConfigFile(_0x4d27ee,_0x578785),logger[_0x48a1bf(0xab)](_0x8c6f3c),logger[_0x48a1bf(0x9b)](_0x48a1bf(0x7f),_0x48a1bf(0xaa),{'appcode':_0x5d1bae,'env':_0x578785[_0x48a1bf(0x98)],'version':_0x578785[_0x48a1bf(0x7b)],'configPath':_0x4d27ee}),console[_0x48a1bf(0xac)](a135_0x1f7b43[_0x48a1bf(0xa2)](_0x48a1bf(0x8f))),console[_0x48a1bf(0xac)](a135_0x1f7b43['cyan'](_0x48a1bf(0x87)+Object[_0x48a1bf(0x8b)](_0x578785[_0x48a1bf(0x8c)]||{})[_0x48a1bf(0x83)](',\x20'))),console['log'](a135_0x1f7b43[_0x48a1bf(0x99)](_0x48a1bf(0x7c)+_0x578785[_0x48a1bf(0x90)])),console[_0x48a1bf(0xac)](_0x48a1bf(0x80)+CLI_BIN_NAME+_0x48a1bf(0x7a)+CLI_BIN_NAME+'\x20api\x20pull\x27');}function askAppcode(){const _0x509c06=a135_0x276a;return input({'message':_0x509c06(0x7e),'validate':_0x506bdb=>{const _0x942d4=_0x509c06;if(!_0x506bdb[_0x942d4(0xa8)]())return'App\x20Code\x20cannot\x20be\x20empty';const {valid:_0x313762,message:_0x41613f}=validateAppcode(_0x506bdb[_0x942d4(0xa8)]());return _0x313762||_0x41613f||_0x942d4(0x91);}});}function getCliVersionFromPkg(){const _0x131a31=a135_0x276a;try{const _0x2e5030=fileURLToPath(import.meta.url),_0xbd7008=resolve(dirname(_0x2e5030),_0x131a31(0x96)),_0x57ae75=JSON[_0x131a31(0xa7)](readFileSync(resolve(_0xbd7008,_0x131a31(0x94)),_0x131a31(0xa4)));return _0x57ae75['version']||_0x131a31(0x88);}catch{return _0x131a31(0x88);}}
@@ -1 +1 @@
1
- const a136_0x586351=a136_0x45bf;(function(_0x190221,_0xaea28b){const _0x4a33ee=a136_0x45bf,_0x16f11c=_0x190221();while(!![]){try{const _0x1f29dd=parseInt(_0x4a33ee(0x109))/0x1+-parseInt(_0x4a33ee(0xe1))/0x2+parseInt(_0x4a33ee(0xe2))/0x3+parseInt(_0x4a33ee(0x122))/0x4*(parseInt(_0x4a33ee(0x13d))/0x5)+-parseInt(_0x4a33ee(0xee))/0x6*(parseInt(_0x4a33ee(0x132))/0x7)+parseInt(_0x4a33ee(0xdf))/0x8+-parseInt(_0x4a33ee(0x104))/0x9;if(_0x1f29dd===_0xaea28b)break;else _0x16f11c['push'](_0x16f11c['shift']());}catch(_0x58f5a0){_0x16f11c['push'](_0x16f11c['shift']());}}}(a136_0x2de8,0xce79e));function a136_0x2de8(){const _0x586e12=['log','lovrabet/lovrabet-skill\x20removed','string','[\x22@lovrabet/sdk\x22]:\x20','Step\x201/7:\x20Config\x20migration\x20—\x20','.cursor/mcp.json','\x20\x20Action:\x20delete','cwd','no\x20matching\x20entry\x20found','\x20removed\x20(','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','skipped\x20(no\x20legacy\x20config)','bold','@lovrabet/dataset-mcp-server','path','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','step','start','Install\x20new\x20skill','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','FOUND','lovrabet/rabetbase\x20installed\x20globally','stringify','done','Step\x205/7:\x20Removing\x20old\x20skill...','some','\x20→\x20latest','package.json','Step\x201/7:\x20Migrating\x20config...','isArray','Remove\x20legacy\x20artifacts','label','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','5869136EDHcSD','===\x20Upgrade\x20Summary\x20===','811334leddYZ','4528005oCAwme','skipped','\x20(backup:\x20','needsSkillSwap','includes','undefined','Upgrade\x20cancelled.','mcpServers','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','@lovrabet/sdk:','oldPath','Step\x204/7:\x20Cleaning\x20MCP\x20config...','17358oWzVWm','gray','files','Remove\x20old\x20skill','utf8','FAIL','\x20removed','oldMcpConfig','failed','no\x20legacy\x20config\x20found','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','\x20→\x20','error','length','\x20\x20\x20\x20\x20\x20\x20','Remove\x20.lovrabet/','values','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','.bak','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','parse','dependencies','22631337tRnvij','Config\x20migration','detail','push','hasNewConfig','888230TEakhH','yellow','Step\x204/7:\x20MCP\x20config\x20—\x20','green','not\x20needed','fail','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','Clean\x20MCP\x20config','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','exit\x20','object','needed','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','MCP\x20config:','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','white','filter','configMigration','===\x20Upgrade\x20Analysis\x20===','Config\x20file:','\x20→\x20keys:\x20','Upgrade\x20@lovrabet/sdk','isDirectory','Skill\x20swap:','.lovrabet','6172724YGyXqt','message','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','\x20\x20Fields\x20to\x20migrate:\x20','not\x20found\x20or\x20already\x20at\x20latest','@lovrabet/sdk','\x20\x20Current\x20version\x20in\x20','sdkUpgrade','\x20\x20npm\x20install','join','Step\x206/7:\x20Installing\x20new\x20skill...','succeed','.claude/skills/lovrabet','\x20\x20New\x20config\x20(.rabetbase.json):\x20','cyan','entries','2198vhePSJ','red','status','not\x20found\x20(will\x20create)','info','Legacy\x20artifacts:','Proceed\x20with\x20upgrade?','keys','latest','args','inherit','5UVqlya','removed\x20','no\x20legacy\x20entry'];a136_0x2de8=function(){return _0x586e12;};return a136_0x2de8();}import a136_0x4382bc from'chalk';import a136_0x3c7968 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a136_0x586351(0x119)](_0x4ae1bf=>_0x4ae1bf!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x5b4af6){const _0x30f6a1=a136_0x586351,_0x11fc6c=[];for(const _0x43903d of Object[_0x30f6a1(0xfe)](CORE_IDE_CONFIGS)){if(_0x43903d[_0x30f6a1(0xf0)])for(const _0x822094 of _0x43903d[_0x30f6a1(0xf0)]){_0x11fc6c['push'](resolve(_0x5b4af6,_0x822094[_0x30f6a1(0x14e)]));}}return _0x11fc6c;}function analyse(_0x558648){const _0x1da894=a136_0x586351;let _0x4dd338=null;const _0x2c4014=resolve(_0x558648,NEW_CONFIG_NAME),_0x45e48a=existsSync(_0x2c4014);for(const _0x2ae7bc of LEGACY_CONFIG_NAMES){const _0x136ddd=resolve(_0x558648,_0x2ae7bc);if(existsSync(_0x136ddd)){const _0x34420b=readConfigFile(_0x136ddd),_0x428aa6=Object[_0x1da894(0x139)](_0x34420b)[_0x1da894(0x119)](_0xbff2dd=>typeof _0x34420b[_0xbff2dd]!==_0x1da894(0xe7));_0x4dd338={'oldPath':_0x136ddd,'hasNewConfig':_0x45e48a,'fields':_0x428aa6};break;}}const _0x12fa0d=[],_0x38419a=resolve(_0x558648,_0x1da894(0x121));if(existsSync(_0x38419a))_0x12fa0d[_0x1da894(0x107)](_0x38419a);const _0x4c0856=resolve(_0x558648,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x4c0856))_0x12fa0d[_0x1da894(0x107)](_0x4c0856);const _0xd0ca2f=resolve(_0x558648,_0x1da894(0x12e));if(existsSync(_0xd0ca2f))_0x12fa0d['push'](_0xd0ca2f);for(const _0x181ceb of collectIdeSkillFiles(_0x558648)){if(existsSync(_0x181ceb))_0x12fa0d['push'](_0x181ceb);}let _0x23108d=null;const _0x243671=resolve(_0x558648,_0x1da894(0x145));if(existsSync(_0x243671))try{const _0x35859b=JSON[_0x1da894(0x102)](readFileSync(_0x243671,'utf8'));if(_0x35859b?.[_0x1da894(0xe9)]&&typeof _0x35859b['mcpServers']===_0x1da894(0x113)){const _0x4a1947=[];for(const [_0x3c113c,_0x4aa19d]of Object[_0x1da894(0x131)](_0x35859b[_0x1da894(0xe9)])){const _0x5235ac=_0x4aa19d;_0x5235ac?.['args']&&Array['isArray'](_0x5235ac[_0x1da894(0x13b)])&&_0x5235ac[_0x1da894(0x13b)][_0x1da894(0xd7)](_0x1c824d=>typeof _0x1c824d===_0x1da894(0x142)&&_0x1c824d[_0x1da894(0xe6)]('@lovrabet/dataset-mcp-server'))&&_0x4a1947['push'](_0x3c113c);}_0x4a1947[_0x1da894(0xfb)]>0x0&&(_0x23108d={'path':_0x243671,'keys':_0x4a1947});}}catch{}const _0x5d90d2=_0x12fa0d[_0x1da894(0xfb)]>0x0||_0x4dd338!==null;let _0x33e891=null;const _0x4181b3=resolve(_0x558648,_0x1da894(0xd9));if(existsSync(_0x4181b3))try{const _0x1d2972=JSON['parse'](readFileSync(_0x4181b3,'utf8'));for(const _0x112a20 of[_0x1da894(0x103),'devDependencies']){const _0x4ebbd8=_0x1d2972?.[_0x112a20]?.[_0x1da894(0x127)];if(typeof _0x4ebbd8===_0x1da894(0x142)){_0x4ebbd8!==_0x1da894(0x13a)&&(_0x33e891={'pkgPath':_0x4181b3,'currentVersion':_0x4ebbd8,'field':_0x112a20});break;}}}catch{}return{'configMigration':_0x4dd338,'oldArtifacts':_0x12fa0d,'oldMcpConfig':_0x23108d,'needsSkillSwap':_0x5d90d2,'sdkUpgrade':_0x33e891};}function printReport(_0x5af43f){const _0x3582f9=a136_0x586351,{configMigration:_0x3a2a4b,oldArtifacts:_0x1aee87,oldMcpConfig:_0x13597e,needsSkillSwap:_0x49156a}=_0x5af43f;console[_0x3582f9(0x140)](''),console[_0x3582f9(0x140)](a136_0x4382bc[_0x3582f9(0x14c)](_0x3582f9(0x11b))),console['log']('');_0x3a2a4b?(console[_0x3582f9(0x140)](a136_0x4382bc[_0x3582f9(0x130)](_0x3582f9(0x11c))+('\x20\x20'+a136_0x4382bc[_0x3582f9(0x10a)](_0x3a2a4b[_0x3582f9(0xec)]))),console[_0x3582f9(0x140)](_0x3582f9(0x12f)+(_0x3a2a4b[_0x3582f9(0x108)]?a136_0x4382bc['green']('already\x20exists\x20(will\x20merge)'):a136_0x4382bc[_0x3582f9(0xef)](_0x3582f9(0x135)))),console[_0x3582f9(0x140)](_0x3582f9(0x125)+_0x3a2a4b['fields']['join'](',\x20')),console['log'](_0x3582f9(0x14a))):console[_0x3582f9(0x140)](a136_0x4382bc[_0x3582f9(0x130)](_0x3582f9(0x11c))+'\x20\x20'+a136_0x4382bc[_0x3582f9(0xef)](_0x3582f9(0xf7)));console['log']('');if(_0x1aee87[_0x3582f9(0xfb)]>0x0){console[_0x3582f9(0x140)](a136_0x4382bc['cyan']('Legacy\x20artifacts:'));for(const _0x5e79f7 of _0x1aee87){console[_0x3582f9(0x140)]('\x20\x20'+a136_0x4382bc[_0x3582f9(0x133)](_0x3582f9(0x154))+'\x20\x20'+_0x5e79f7);}console['log'](_0x3582f9(0x146));}else console[_0x3582f9(0x140)](a136_0x4382bc[_0x3582f9(0x130)](_0x3582f9(0x137))+'\x20\x20'+a136_0x4382bc[_0x3582f9(0xef)]('none\x20found'));console[_0x3582f9(0x140)]('');_0x13597e?(console['log'](a136_0x4382bc[_0x3582f9(0x130)](_0x3582f9(0x116))+('\x20\x20'+a136_0x4382bc['yellow'](_0x13597e[_0x3582f9(0x14e)])+_0x3582f9(0x11d)+_0x13597e[_0x3582f9(0x139)][_0x3582f9(0x12b)](',\x20'))),console[_0x3582f9(0x140)](_0x3582f9(0x153))):console[_0x3582f9(0x140)](a136_0x4382bc[_0x3582f9(0x130)]('MCP\x20config:')+'\x20\x20'+a136_0x4382bc['gray'](_0x3582f9(0x13f)));console[_0x3582f9(0x140)](''),console['log'](a136_0x4382bc[_0x3582f9(0x130)](_0x3582f9(0x120))+('\x20\x20'+(_0x49156a?a136_0x4382bc[_0x3582f9(0x10a)](_0x3582f9(0x114)):a136_0x4382bc[_0x3582f9(0x10c)](_0x3582f9(0x10d)))));_0x49156a&&console[_0x3582f9(0x140)](_0x3582f9(0x115)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x3582f9(0x140)]('');if(_0x5af43f[_0x3582f9(0x129)]){const {currentVersion:_0x26e753,field:_0x427225,pkgPath:_0x32e8ef}=_0x5af43f[_0x3582f9(0x129)];console[_0x3582f9(0x140)](a136_0x4382bc[_0x3582f9(0x130)](_0x3582f9(0xeb))+('\x20\x20'+a136_0x4382bc[_0x3582f9(0x10a)](_0x32e8ef))),console[_0x3582f9(0x140)](_0x3582f9(0x128)+_0x427225+':\x20'+a136_0x4382bc[_0x3582f9(0x10a)](_0x26e753)+_0x3582f9(0xf9)+a136_0x4382bc[_0x3582f9(0x10c)](_0x3582f9(0x13a))),console[_0x3582f9(0x140)](_0x3582f9(0xff));}else console[_0x3582f9(0x140)](a136_0x4382bc[_0x3582f9(0x130)](_0x3582f9(0xeb))+'\x20\x20'+a136_0x4382bc[_0x3582f9(0xef)](_0x3582f9(0x126)));console['log']('');}function execConfigMigration(_0x2a810b,_0x2c54a9){const _0x357dee=a136_0x586351,{configMigration:_0x5dfff2}=_0x2a810b;if(!_0x5dfff2?.['oldPath'])return{'step':0x1,'label':_0x357dee(0x105),'ok':!![],'detail':_0x357dee(0x14b)};const _0x3006ba=readConfigFile(_0x5dfff2['oldPath']),_0x30c91e=resolve(_0x2c54a9,NEW_CONFIG_NAME),_0x263c0b=_0x5dfff2[_0x357dee(0x108)]?readConfigFile(_0x30c91e):{};for(const [_0x300e95,_0x2d4add]of Object[_0x357dee(0x131)](_0x3006ba)){!(_0x300e95 in _0x263c0b)&&(_0x263c0b[_0x300e95]=_0x2d4add);}writeConfigFile(_0x30c91e,_0x263c0b);const _0x5a1937=_0x5dfff2[_0x357dee(0xec)]+_0x357dee(0x100);return renameSync(_0x5dfff2[_0x357dee(0xec)],_0x5a1937),{'step':0x1,'label':_0x357dee(0x105),'ok':!![],'detail':_0x5dfff2[_0x357dee(0xec)]+_0x357dee(0xf9)+_0x30c91e+_0x357dee(0xe4)+_0x5a1937+')'};}function execRemoveOldArtifacts(_0x47b6e9){const _0x29fbdb=a136_0x586351,_0x572727=[];for(const _0x10fe07 of _0x47b6e9){try{if(!existsSync(_0x10fe07))continue;const _0x4ddf5a=tryStat(_0x10fe07);_0x4ddf5a?.[_0x29fbdb(0x11f)]()?rmSync(_0x10fe07,{'recursive':!![],'force':!![]}):unlinkSync(_0x10fe07);}catch(_0x2ced23){_0x572727[_0x29fbdb(0x107)](_0x10fe07+':\x20'+_0x2ced23['message']);}}return{'step':0x3,'label':_0x29fbdb(0xdc),'ok':_0x572727[_0x29fbdb(0xfb)]===0x0,'detail':_0x572727[_0x29fbdb(0xfb)]>0x0?_0x47b6e9['length']-_0x572727[_0x29fbdb(0xfb)]+'/'+_0x47b6e9['length']+_0x29fbdb(0x149)+_0x572727[_0x29fbdb(0x12b)](';\x20')+')':_0x47b6e9[_0x29fbdb(0xfb)]+_0x29fbdb(0xf4)};}function execCleanMcp(_0x52512b){const _0x30e5ce=a136_0x586351;if(!_0x52512b['oldMcpConfig'])return{'step':0x4,'label':_0x30e5ce(0x110),'ok':!![],'detail':'skipped'};try{const _0x5b381c=readFileSync(_0x52512b['oldMcpConfig'][_0x30e5ce(0x14e)],_0x30e5ce(0xf2)),_0x2fcb26=JSON[_0x30e5ce(0x102)](_0x5b381c);if(_0x2fcb26?.[_0x30e5ce(0xe9)]&&typeof _0x2fcb26[_0x30e5ce(0xe9)]===_0x30e5ce(0x113)){const _0x14e26d=[];for(const [_0xc7be3c,_0x5e7116]of Object[_0x30e5ce(0x131)](_0x2fcb26[_0x30e5ce(0xe9)])){_0x5e7116?.[_0x30e5ce(0x13b)]&&Array[_0x30e5ce(0xdb)](_0x5e7116[_0x30e5ce(0x13b)])&&_0x5e7116[_0x30e5ce(0x13b)]['some'](_0xd61727=>typeof _0xd61727==='string'&&_0xd61727[_0x30e5ce(0xe6)](_0x30e5ce(0x14d)))&&_0x14e26d[_0x30e5ce(0x107)](_0xc7be3c);}for(const _0x5853b4 of _0x14e26d){delete _0x2fcb26[_0x30e5ce(0xe9)][_0x5853b4];}return _0x14e26d[_0x30e5ce(0xfb)]>0x0&&writeFileSync(_0x52512b[_0x30e5ce(0xf5)][_0x30e5ce(0x14e)],JSON[_0x30e5ce(0x156)](_0x2fcb26,null,0x2)+'\x0a',_0x30e5ce(0xf2)),{'step':0x4,'label':_0x30e5ce(0x110),'ok':!![],'detail':_0x30e5ce(0x13e)+_0x14e26d[_0x30e5ce(0x12b)](',\x20')+'\x20from\x20'+_0x52512b[_0x30e5ce(0xf5)][_0x30e5ce(0x14e)]};}return{'step':0x4,'label':_0x30e5ce(0x110),'ok':!![],'detail':_0x30e5ce(0x148)};}catch(_0x2f1593){return{'step':0x4,'label':_0x30e5ce(0x110),'ok':![],'detail':_0x2f1593['message']};}}function execSkillsRemove(_0x508cbc,_0x2b70cf){const _0x5221ee=a136_0x586351,_0x48531a=runNpxSkillsRemove(_0x508cbc,{'stdio':'inherit','yes':_0x2b70cf});return{'step':0x5,'label':_0x5221ee(0xf1),'ok':_0x48531a['ok'],'detail':_0x48531a['ok']?_0x5221ee(0x141):_0x48531a[_0x5221ee(0xfa)]??_0x5221ee(0x112)+_0x48531a[_0x5221ee(0x134)]};}function execSkillsAdd(_0x404769,_0x43d773){const _0x5f21f7=a136_0x586351,_0x5ae271=runNpxSkillsAddGlobal(_0x404769,'lovrabet/rabetbase',{'stdio':_0x5f21f7(0x13c),'yes':_0x43d773});return{'step':0x6,'label':_0x5f21f7(0x152),'ok':_0x5ae271['ok'],'detail':_0x5ae271['ok']?_0x5f21f7(0x155):_0x5ae271['error']??_0x5f21f7(0x112)+_0x5ae271['status']};}function execUpgradeSdk(_0x224f42){const _0x2deac7=a136_0x586351;if(!_0x224f42[_0x2deac7(0x129)])return{'step':0x7,'label':_0x2deac7(0x11e),'ok':!![],'detail':'skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)'};const {pkgPath:_0x46be3a,currentVersion:_0x57d96b,field:_0x3064a5}=_0x224f42['sdkUpgrade'];try{const _0x5a6cc3=readFileSync(_0x46be3a,_0x2deac7(0xf2)),_0x165653=JSON[_0x2deac7(0x102)](_0x5a6cc3);return _0x165653[_0x3064a5]['@lovrabet/sdk']=_0x2deac7(0x13a),writeFileSync(_0x46be3a,JSON[_0x2deac7(0x156)](_0x165653,null,0x2)+'\x0a','utf8'),{'step':0x7,'label':_0x2deac7(0x11e),'ok':!![],'detail':_0x3064a5+_0x2deac7(0x143)+_0x57d96b+_0x2deac7(0xd8)};}catch(_0x5de46b){return{'step':0x7,'label':_0x2deac7(0x11e),'ok':![],'detail':_0x5de46b[_0x2deac7(0x123)]};}}function a136_0x45bf(_0x203a1a,_0x4c5309){_0x203a1a=_0x203a1a-0xd7;const _0x2de8dd=a136_0x2de8();let _0x45bfb5=_0x2de8dd[_0x203a1a];return _0x45bfb5;}function tryStat(_0x7d11ac){try{return statSync(_0x7d11ac);}catch{return undefined;}}function printSummary(_0x1f3222){const _0x5cbd91=a136_0x586351;console[_0x5cbd91(0x140)](''),console[_0x5cbd91(0x140)](a136_0x4382bc[_0x5cbd91(0x14c)](_0x5cbd91(0xe0))),console[_0x5cbd91(0x140)]('');for(const _0x1bac5b of _0x1f3222){const _0x38287f=_0x1bac5b['ok']?a136_0x4382bc['green']('OK'):a136_0x4382bc[_0x5cbd91(0x133)](_0x5cbd91(0xf3));console[_0x5cbd91(0x140)]('\x20\x20'+_0x38287f+'\x20\x20Step\x20'+_0x1bac5b[_0x5cbd91(0x150)]+':\x20'+_0x1bac5b[_0x5cbd91(0xdd)]);if(_0x1bac5b[_0x5cbd91(0x106)])console[_0x5cbd91(0x140)](_0x5cbd91(0xfc)+a136_0x4382bc[_0x5cbd91(0xef)](_0x1bac5b['detail']));}console[_0x5cbd91(0x140)]('');}export async function upgradeApp(_0x5d2824,_0x44ee41){const _0x1d738f=a136_0x586351,_0x586e85=process[_0x1d738f(0x147)](),_0x1a140d=analyse(_0x586e85),_0x3f0aca=!_0x1a140d[_0x1d738f(0x11a)]&&_0x1a140d['oldArtifacts'][_0x1d738f(0xfb)]===0x0&&!_0x1a140d['oldMcpConfig']&&!_0x1a140d[_0x1d738f(0xe5)]&&!_0x1a140d[_0x1d738f(0x129)];if(_0x3f0aca){console[_0x1d738f(0x140)](a136_0x4382bc['green'](_0x1d738f(0xde)));return;}printReport(_0x1a140d);const _0x28cb24=!!(_0x44ee41['yes']||_0x44ee41['Y']||_0x5d2824);if(!_0x28cb24)try{const _0x1c1dc7=await askConfirm(_0x1d738f(0x138));if(!_0x1c1dc7){console['log'](a136_0x4382bc['gray'](_0x1d738f(0xe8)));return;}}catch(_0x5e930a){if(_0x5e930a?.[_0x1d738f(0x123)]==='CANCEL'){console['log'](a136_0x4382bc[_0x1d738f(0xef)](_0x1d738f(0xe8)));return;}throw _0x5e930a;}const _0x5baf47=[],_0x3b66f6=a136_0x3c7968({'text':_0x1d738f(0xda),'color':_0x1d738f(0x130)})[_0x1d738f(0x151)](),_0x4e4b91=execConfigMigration(_0x1a140d,_0x586e85);_0x5baf47['push'](_0x4e4b91),_0x3b66f6[_0x4e4b91['ok']?_0x1d738f(0x12d):'fail'](_0x1d738f(0x144)+(_0x4e4b91[_0x1d738f(0x106)]??(_0x4e4b91['ok']?_0x1d738f(0x157):'failed')));const _0x219dad=resolve(_0x586e85,_0x1d738f(0x121)),_0x1d4d5a=a136_0x3c7968({'text':'Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','color':_0x1d738f(0x130)})['start']();if(existsSync(_0x219dad))try{rmSync(_0x219dad,{'recursive':!![],'force':!![]}),_0x1d4d5a[_0x1d738f(0x12d)](_0x1d738f(0xea)),_0x5baf47['push']({'step':0x2,'label':_0x1d738f(0xfd),'ok':!![]});}catch(_0x2ef046){_0x1d4d5a[_0x1d738f(0x10e)]('Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0x2ef046[_0x1d738f(0x123)]),_0x5baf47[_0x1d738f(0x107)]({'step':0x2,'label':_0x1d738f(0xfd),'ok':![],'detail':_0x2ef046['message']});}else _0x1d4d5a[_0x1d738f(0x136)](_0x1d738f(0x111)),_0x5baf47[_0x1d738f(0x107)]({'step':0x2,'label':_0x1d738f(0xfd),'ok':!![],'detail':_0x1d738f(0xe3)});const _0x4b9653=a136_0x3c7968({'text':_0x1d738f(0xf8),'color':_0x1d738f(0x130)})['start'](),_0x17d415=execRemoveOldArtifacts(_0x1a140d['oldArtifacts']);_0x5baf47['push'](_0x17d415),_0x4b9653[_0x17d415['ok']?_0x1d738f(0x12d):_0x1d738f(0x10e)](_0x1d738f(0x117)+(_0x17d415[_0x1d738f(0x106)]??(_0x17d415['ok']?_0x1d738f(0x157):_0x1d738f(0xf6))));const _0x1143a6=a136_0x3c7968({'text':_0x1d738f(0xed),'color':'cyan'})[_0x1d738f(0x151)](),_0x392892=execCleanMcp(_0x1a140d);_0x5baf47['push'](_0x392892),_0x1143a6[_0x392892['ok']?_0x1d738f(0x12d):_0x1d738f(0x10e)](_0x1d738f(0x10b)+(_0x392892[_0x1d738f(0x106)]??(_0x392892['ok']?'done':_0x1d738f(0xf6))));const _0x5a5cf5=a136_0x3c7968({'text':_0x1d738f(0x158),'color':_0x1d738f(0x130)})[_0x1d738f(0x151)](),_0x107ea1=execSkillsRemove(_0x586e85,_0x28cb24);_0x5baf47[_0x1d738f(0x107)](_0x107ea1),_0x5a5cf5[_0x107ea1['ok']?_0x1d738f(0x12d):_0x1d738f(0x10e)](_0x1d738f(0x124)+(_0x107ea1[_0x1d738f(0x106)]??(_0x107ea1['ok']?_0x1d738f(0x157):_0x1d738f(0xf6))));const _0x3065f5=a136_0x3c7968({'text':_0x1d738f(0x12c),'color':_0x1d738f(0x130)})['start'](),_0x263514=execSkillsAdd(_0x586e85,_0x28cb24);_0x5baf47[_0x1d738f(0x107)](_0x263514),_0x3065f5[_0x263514['ok']?'succeed':_0x1d738f(0x10e)](_0x1d738f(0x14f)+(_0x263514[_0x1d738f(0x106)]??(_0x263514['ok']?_0x1d738f(0x157):_0x1d738f(0xf6))));const _0x4e696b=a136_0x3c7968({'text':_0x1d738f(0x101),'color':'cyan'})[_0x1d738f(0x151)](),_0x20ec2c=execUpgradeSdk(_0x1a140d);_0x5baf47[_0x1d738f(0x107)](_0x20ec2c),_0x4e696b[_0x20ec2c['ok']?_0x1d738f(0x12d):'fail']('Step\x207/7:\x20@lovrabet/sdk\x20—\x20'+(_0x20ec2c[_0x1d738f(0x106)]??(_0x20ec2c['ok']?'done':'failed'))),printSummary(_0x5baf47);const _0x15f025=_0x5baf47[_0x1d738f(0xd7)](_0x40ac4e=>!_0x40ac4e['ok']);_0x15f025?console['log'](a136_0x4382bc[_0x1d738f(0x10a)](_0x1d738f(0x10f))):console['log'](a136_0x4382bc[_0x1d738f(0x10c)]('Upgrade\x20completed\x20successfully!')),_0x20ec2c['ok']&&_0x1a140d['sdkUpgrade']&&(console[_0x1d738f(0x140)](''),console[_0x1d738f(0x140)](a136_0x4382bc[_0x1d738f(0x14c)][_0x1d738f(0x130)]('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console[_0x1d738f(0x140)](a136_0x4382bc[_0x1d738f(0x130)]('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x1d738f(0x140)](''),console[_0x1d738f(0x140)](a136_0x4382bc[_0x1d738f(0x118)](_0x1d738f(0x12a))),console[_0x1d738f(0x140)](a136_0x4382bc[_0x1d738f(0x118)]('\x20\x20#\x20or')),console[_0x1d738f(0x140)](a136_0x4382bc['white']('\x20\x20bun\x20install')),console['log'](''));}
1
+ const a136_0x28fff2=a136_0x15cb;(function(_0x54382d,_0x2cf2c8){const _0x1c29b1=a136_0x15cb,_0x5050ca=_0x54382d();while(!![]){try{const _0x5ae206=-parseInt(_0x1c29b1(0x1d6))/0x1*(-parseInt(_0x1c29b1(0x217))/0x2)+parseInt(_0x1c29b1(0x1e7))/0x3*(-parseInt(_0x1c29b1(0x1e5))/0x4)+parseInt(_0x1c29b1(0x21e))/0x5+parseInt(_0x1c29b1(0x1d9))/0x6+-parseInt(_0x1c29b1(0x1df))/0x7+parseInt(_0x1c29b1(0x216))/0x8*(-parseInt(_0x1c29b1(0x1de))/0x9)+parseInt(_0x1c29b1(0x231))/0xa*(parseInt(_0x1c29b1(0x243))/0xb);if(_0x5ae206===_0x2cf2c8)break;else _0x5050ca['push'](_0x5050ca['shift']());}catch(_0x19cb76){_0x5050ca['push'](_0x5050ca['shift']());}}}(a136_0x2b80,0xa2083));import a136_0x4be9d9 from'chalk';import a136_0x496aa9 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';function a136_0x2b80(){const _0x19a6a4=['devDependencies','step','\x20from\x20','oldPath','no\x20legacy\x20config\x20found','white','isDirectory','Remove\x20old\x20skill','isArray','\x20→\x20keys:\x20','configMigration','info','log','stringify','filter','79039cCivhs','values','gray','683052YDdqnK','Step\x204/7:\x20Cleaning\x20MCP\x20config...','lovrabet/rabetbase','\x20\x20Action:\x20delete','Step\x206/7:\x20Installing\x20new\x20skill...','10929537dmdBXE','6429409szGlYV','detail','FOUND','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','done','Step\x205/7:\x20Removing\x20old\x20skill...','483792GElgzt','@lovrabet/dataset-mcp-server','3rjvbOa','\x20\x20npm\x20install','needed','length','inherit','lovrabet/lovrabet-skill\x20removed','path','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','undefined','.lovrabet','string','failed','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','yellow','none\x20found','green','no\x20legacy\x20entry','cwd','Config\x20file:','sdkUpgrade','\x20(backup:\x20','files','Remove\x20.lovrabet/','.cursor/rules/lovrabet_rules.mdc','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','error','bold','skipped\x20(no\x20legacy\x20config)','latest','CANCEL','\x20→\x20','skipped','\x20\x20bun\x20install','status','push','needsSkillSwap','mcpServers','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','Step\x204/7:\x20MCP\x20config\x20—\x20','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','\x20\x20#\x20or','fields','\x20\x20Current\x20version\x20in\x20','Step\x201/7:\x20Config\x20migration\x20—\x20','Install\x20new\x20skill','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','8HJYokJ','24ZawOXT','Config\x20migration','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','args','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','join','.claude/skills/lovrabet','2838750jZpEkf','includes','cyan','\x20→\x20latest','lovrabet/rabetbase\x20installed\x20globally','entries','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','\x20\x20New\x20config\x20(.rabetbase.json):\x20','message','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','no\x20matching\x20entry\x20found','Remove\x20legacy\x20artifacts','Proceed\x20with\x20upgrade?','===\x20Upgrade\x20Analysis\x20===','red','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','yes','Upgrade\x20@lovrabet/sdk','\x20\x20\x20\x20\x20\x20\x20','10mpFNLr','@lovrabet/sdk:','object','already\x20exists\x20(will\x20merge)','parse','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','oldArtifacts','some','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','.cursor/mcp.json','start','Clean\x20MCP\x20config','\x20removed\x20(','@lovrabet/sdk','oldMcpConfig','Step\x201/7:\x20Migrating\x20config...','fail','\x20\x20Step\x20','14161961qnKRjy','label','\x20\x20Fields\x20to\x20migrate:\x20','succeed','dependencies','Upgrade\x20completed\x20successfully!','\x20removed','hasNewConfig','FAIL','MCP\x20config:','utf8'];a136_0x2b80=function(){return _0x19a6a4;};return a136_0x2b80();}import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a136_0x28fff2(0x1d5)](_0x283855=>_0x283855!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x9e411e){const _0x2f523e=a136_0x28fff2,_0x622588=[];for(const _0xabf3e6 of Object[_0x2f523e(0x1d7)](CORE_IDE_CONFIGS)){if(_0xabf3e6['files'])for(const _0x17e555 of _0xabf3e6[_0x2f523e(0x1fd)]){_0x622588[_0x2f523e(0x20a)](resolve(_0x9e411e,_0x17e555['path']));}}return _0x622588;}function analyse(_0x4b3967){const _0x2ce6f7=a136_0x28fff2;let _0x301e4d=null;const _0x246542=resolve(_0x4b3967,NEW_CONFIG_NAME),_0x1e598b=existsSync(_0x246542);for(const _0x2aeeb2 of LEGACY_CONFIG_NAMES){const _0x2aa795=resolve(_0x4b3967,_0x2aeeb2);if(existsSync(_0x2aa795)){const _0xd7282e=readConfigFile(_0x2aa795),_0x4e9683=Object['keys'](_0xd7282e)[_0x2ce6f7(0x1d5)](_0x551811=>typeof _0xd7282e[_0x551811]!==_0x2ce6f7(0x1f0));_0x301e4d={'oldPath':_0x2aa795,'hasNewConfig':_0x1e598b,'fields':_0x4e9683};break;}}const _0x522e62=[],_0x581d02=resolve(_0x4b3967,_0x2ce6f7(0x1f1));if(existsSync(_0x581d02))_0x522e62[_0x2ce6f7(0x20a)](_0x581d02);const _0x1185bc=resolve(_0x4b3967,_0x2ce6f7(0x1ff));if(existsSync(_0x1185bc))_0x522e62[_0x2ce6f7(0x20a)](_0x1185bc);const _0x5d081c=resolve(_0x4b3967,_0x2ce6f7(0x21d));if(existsSync(_0x5d081c))_0x522e62[_0x2ce6f7(0x20a)](_0x5d081c);for(const _0x237cef of collectIdeSkillFiles(_0x4b3967)){if(existsSync(_0x237cef))_0x522e62['push'](_0x237cef);}let _0x4112c2=null;const _0x1cddac=resolve(_0x4b3967,_0x2ce6f7(0x23a));if(existsSync(_0x1cddac))try{const _0x21d3a5=JSON[_0x2ce6f7(0x235)](readFileSync(_0x1cddac,_0x2ce6f7(0x1c6)));if(_0x21d3a5?.[_0x2ce6f7(0x20c)]&&typeof _0x21d3a5[_0x2ce6f7(0x20c)]===_0x2ce6f7(0x233)){const _0x57a33c=[];for(const [_0x74614c,_0x52f371]of Object[_0x2ce6f7(0x223)](_0x21d3a5[_0x2ce6f7(0x20c)])){const _0x547b51=_0x52f371;_0x547b51?.[_0x2ce6f7(0x21a)]&&Array[_0x2ce6f7(0x1cf)](_0x547b51[_0x2ce6f7(0x21a)])&&_0x547b51[_0x2ce6f7(0x21a)][_0x2ce6f7(0x238)](_0x1c9bf0=>typeof _0x1c9bf0==='string'&&_0x1c9bf0[_0x2ce6f7(0x21f)](_0x2ce6f7(0x1e6)))&&_0x57a33c[_0x2ce6f7(0x20a)](_0x74614c);}_0x57a33c['length']>0x0&&(_0x4112c2={'path':_0x1cddac,'keys':_0x57a33c});}}catch{}const _0x8a8fd3=_0x522e62[_0x2ce6f7(0x1ea)]>0x0||_0x301e4d!==null;let _0x46705d=null;const _0x34c2d9=resolve(_0x4b3967,'package.json');if(existsSync(_0x34c2d9))try{const _0x222808=JSON[_0x2ce6f7(0x235)](readFileSync(_0x34c2d9,_0x2ce6f7(0x1c6)));for(const _0x75e3e2 of[_0x2ce6f7(0x247),_0x2ce6f7(0x1c7)]){const _0x538668=_0x222808?.[_0x75e3e2]?.[_0x2ce6f7(0x23e)];if(typeof _0x538668===_0x2ce6f7(0x1f2)){_0x538668!==_0x2ce6f7(0x204)&&(_0x46705d={'pkgPath':_0x34c2d9,'currentVersion':_0x538668,'field':_0x75e3e2});break;}}}catch{}return{'configMigration':_0x301e4d,'oldArtifacts':_0x522e62,'oldMcpConfig':_0x4112c2,'needsSkillSwap':_0x8a8fd3,'sdkUpgrade':_0x46705d};}function printReport(_0x17c7f8){const _0x4e3a9d=a136_0x28fff2,{configMigration:_0x4539d2,oldArtifacts:_0x3dac26,oldMcpConfig:_0xdc393f,needsSkillSwap:_0x2eec10}=_0x17c7f8;console['log'](''),console['log'](a136_0x4be9d9[_0x4e3a9d(0x202)](_0x4e3a9d(0x22b))),console[_0x4e3a9d(0x1d3)]('');_0x4539d2?(console[_0x4e3a9d(0x1d3)](a136_0x4be9d9[_0x4e3a9d(0x220)](_0x4e3a9d(0x1fa))+('\x20\x20'+a136_0x4be9d9['yellow'](_0x4539d2[_0x4e3a9d(0x1ca)]))),console[_0x4e3a9d(0x1d3)](_0x4e3a9d(0x225)+(_0x4539d2[_0x4e3a9d(0x1c3)]?a136_0x4be9d9[_0x4e3a9d(0x1f7)](_0x4e3a9d(0x234)):a136_0x4be9d9['gray']('not\x20found\x20(will\x20create)'))),console[_0x4e3a9d(0x1d3)](_0x4e3a9d(0x245)+_0x4539d2[_0x4e3a9d(0x211)]['join'](',\x20')),console[_0x4e3a9d(0x1d3)](_0x4e3a9d(0x1ef))):console[_0x4e3a9d(0x1d3)](a136_0x4be9d9[_0x4e3a9d(0x220)](_0x4e3a9d(0x1fa))+'\x20\x20'+a136_0x4be9d9[_0x4e3a9d(0x1d8)](_0x4e3a9d(0x1cb)));console[_0x4e3a9d(0x1d3)]('');if(_0x3dac26['length']>0x0){console[_0x4e3a9d(0x1d3)](a136_0x4be9d9[_0x4e3a9d(0x220)]('Legacy\x20artifacts:'));for(const _0x321fc4 of _0x3dac26){console[_0x4e3a9d(0x1d3)]('\x20\x20'+a136_0x4be9d9[_0x4e3a9d(0x22c)](_0x4e3a9d(0x1e1))+'\x20\x20'+_0x321fc4);}console[_0x4e3a9d(0x1d3)](_0x4e3a9d(0x1dc));}else console[_0x4e3a9d(0x1d3)](a136_0x4be9d9[_0x4e3a9d(0x220)]('Legacy\x20artifacts:')+'\x20\x20'+a136_0x4be9d9[_0x4e3a9d(0x1d8)](_0x4e3a9d(0x1f6)));console[_0x4e3a9d(0x1d3)]('');_0xdc393f?(console['log'](a136_0x4be9d9[_0x4e3a9d(0x220)](_0x4e3a9d(0x1c5))+('\x20\x20'+a136_0x4be9d9[_0x4e3a9d(0x1f5)](_0xdc393f[_0x4e3a9d(0x1ed)])+_0x4e3a9d(0x1d0)+_0xdc393f['keys']['join'](',\x20'))),console[_0x4e3a9d(0x1d3)](_0x4e3a9d(0x236))):console['log'](a136_0x4be9d9[_0x4e3a9d(0x220)]('MCP\x20config:')+'\x20\x20'+a136_0x4be9d9['gray'](_0x4e3a9d(0x1f8)));console[_0x4e3a9d(0x1d3)](''),console['log'](a136_0x4be9d9[_0x4e3a9d(0x220)]('Skill\x20swap:')+('\x20\x20'+(_0x2eec10?a136_0x4be9d9[_0x4e3a9d(0x1f5)](_0x4e3a9d(0x1e9)):a136_0x4be9d9[_0x4e3a9d(0x1f7)]('not\x20needed'))));_0x2eec10&&console[_0x4e3a9d(0x1d3)](_0x4e3a9d(0x1f4)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console['log']('');if(_0x17c7f8[_0x4e3a9d(0x1fb)]){const {currentVersion:_0x25dfb9,field:_0x7011bf,pkgPath:_0x1d0fc4}=_0x17c7f8[_0x4e3a9d(0x1fb)];console['log'](a136_0x4be9d9['cyan'](_0x4e3a9d(0x232))+('\x20\x20'+a136_0x4be9d9[_0x4e3a9d(0x1f5)](_0x1d0fc4))),console[_0x4e3a9d(0x1d3)](_0x4e3a9d(0x212)+_0x7011bf+':\x20'+a136_0x4be9d9['yellow'](_0x25dfb9)+_0x4e3a9d(0x206)+a136_0x4be9d9[_0x4e3a9d(0x1f7)](_0x4e3a9d(0x204))),console[_0x4e3a9d(0x1d3)](_0x4e3a9d(0x20f));}else console[_0x4e3a9d(0x1d3)](a136_0x4be9d9['cyan'](_0x4e3a9d(0x232))+'\x20\x20'+a136_0x4be9d9['gray']('not\x20found\x20or\x20already\x20at\x20latest'));console[_0x4e3a9d(0x1d3)]('');}function execConfigMigration(_0x8bc201,_0x3f7e83){const _0x3bbe04=a136_0x28fff2,{configMigration:_0x2a301f}=_0x8bc201;if(!_0x2a301f?.[_0x3bbe04(0x1ca)])return{'step':0x1,'label':_0x3bbe04(0x218),'ok':!![],'detail':_0x3bbe04(0x203)};const _0x5e7745=readConfigFile(_0x2a301f[_0x3bbe04(0x1ca)]),_0x1a246a=resolve(_0x3f7e83,NEW_CONFIG_NAME),_0x53bd00=_0x2a301f['hasNewConfig']?readConfigFile(_0x1a246a):{};for(const [_0x9174a5,_0x3389a2]of Object[_0x3bbe04(0x223)](_0x5e7745)){!(_0x9174a5 in _0x53bd00)&&(_0x53bd00[_0x9174a5]=_0x3389a2);}writeConfigFile(_0x1a246a,_0x53bd00);const _0x3750f2=_0x2a301f['oldPath']+'.bak';return renameSync(_0x2a301f[_0x3bbe04(0x1ca)],_0x3750f2),{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x2a301f[_0x3bbe04(0x1ca)]+'\x20→\x20'+_0x1a246a+_0x3bbe04(0x1fc)+_0x3750f2+')'};}function execRemoveOldArtifacts(_0x575308){const _0xfcb29d=a136_0x28fff2,_0x855a16=[];for(const _0x53a5fc of _0x575308){try{if(!existsSync(_0x53a5fc))continue;const _0x5124e8=tryStat(_0x53a5fc);_0x5124e8?.[_0xfcb29d(0x1cd)]()?rmSync(_0x53a5fc,{'recursive':!![],'force':!![]}):unlinkSync(_0x53a5fc);}catch(_0x6e78c2){_0x855a16['push'](_0x53a5fc+':\x20'+_0x6e78c2[_0xfcb29d(0x226)]);}}return{'step':0x3,'label':_0xfcb29d(0x229),'ok':_0x855a16[_0xfcb29d(0x1ea)]===0x0,'detail':_0x855a16['length']>0x0?_0x575308['length']-_0x855a16['length']+'/'+_0x575308[_0xfcb29d(0x1ea)]+_0xfcb29d(0x23d)+_0x855a16[_0xfcb29d(0x21c)](';\x20')+')':_0x575308['length']+_0xfcb29d(0x1c2)};}function execCleanMcp(_0x44942a){const _0xa0a91e=a136_0x28fff2;if(!_0x44942a['oldMcpConfig'])return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0xa0a91e(0x207)};try{const _0x24b4d5=readFileSync(_0x44942a[_0xa0a91e(0x23f)]['path'],_0xa0a91e(0x1c6)),_0x2a6bb6=JSON['parse'](_0x24b4d5);if(_0x2a6bb6?.[_0xa0a91e(0x20c)]&&typeof _0x2a6bb6[_0xa0a91e(0x20c)]==='object'){const _0x2edd59=[];for(const [_0x12237d,_0x44e946]of Object['entries'](_0x2a6bb6[_0xa0a91e(0x20c)])){_0x44e946?.[_0xa0a91e(0x21a)]&&Array[_0xa0a91e(0x1cf)](_0x44e946[_0xa0a91e(0x21a)])&&_0x44e946[_0xa0a91e(0x21a)][_0xa0a91e(0x238)](_0x484ebf=>typeof _0x484ebf==='string'&&_0x484ebf['includes']('@lovrabet/dataset-mcp-server'))&&_0x2edd59['push'](_0x12237d);}for(const _0x42f951 of _0x2edd59){delete _0x2a6bb6['mcpServers'][_0x42f951];}return _0x2edd59[_0xa0a91e(0x1ea)]>0x0&&writeFileSync(_0x44942a[_0xa0a91e(0x23f)][_0xa0a91e(0x1ed)],JSON[_0xa0a91e(0x1d4)](_0x2a6bb6,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':'removed\x20'+_0x2edd59[_0xa0a91e(0x21c)](',\x20')+_0xa0a91e(0x1c9)+_0x44942a[_0xa0a91e(0x23f)][_0xa0a91e(0x1ed)]};}return{'step':0x4,'label':_0xa0a91e(0x23c),'ok':!![],'detail':_0xa0a91e(0x228)};}catch(_0x419322){return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':![],'detail':_0x419322[_0xa0a91e(0x226)]};}}function execSkillsRemove(_0x200a18,_0x1d4b80){const _0x2e0efe=a136_0x28fff2,_0x339341=runNpxSkillsRemove(_0x200a18,{'stdio':_0x2e0efe(0x1eb),'yes':_0x1d4b80});return{'step':0x5,'label':_0x2e0efe(0x1ce),'ok':_0x339341['ok'],'detail':_0x339341['ok']?_0x2e0efe(0x1ec):_0x339341[_0x2e0efe(0x201)]??'exit\x20'+_0x339341[_0x2e0efe(0x209)]};}function a136_0x15cb(_0x4ddd40,_0x37d1df){_0x4ddd40=_0x4ddd40-0x1c2;const _0x2b8067=a136_0x2b80();let _0x15cb51=_0x2b8067[_0x4ddd40];return _0x15cb51;}function execSkillsAdd(_0x2067a5,_0x3235a2){const _0x2907f0=a136_0x28fff2,_0x3195ce=runNpxSkillsAddGlobal(_0x2067a5,_0x2907f0(0x1db),{'stdio':_0x2907f0(0x1eb),'yes':_0x3235a2});return{'step':0x6,'label':_0x2907f0(0x214),'ok':_0x3195ce['ok'],'detail':_0x3195ce['ok']?_0x2907f0(0x222):_0x3195ce[_0x2907f0(0x201)]??'exit\x20'+_0x3195ce['status']};}function execUpgradeSdk(_0x35d601){const _0x4f56bf=a136_0x28fff2;if(!_0x35d601['sdkUpgrade'])return{'step':0x7,'label':_0x4f56bf(0x22f),'ok':!![],'detail':'skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)'};const {pkgPath:_0x3020e2,currentVersion:_0x4da661,field:_0x523aaf}=_0x35d601['sdkUpgrade'];try{const _0x1df614=readFileSync(_0x3020e2,_0x4f56bf(0x1c6)),_0x4bbaec=JSON[_0x4f56bf(0x235)](_0x1df614);return _0x4bbaec[_0x523aaf][_0x4f56bf(0x23e)]=_0x4f56bf(0x204),writeFileSync(_0x3020e2,JSON[_0x4f56bf(0x1d4)](_0x4bbaec,null,0x2)+'\x0a',_0x4f56bf(0x1c6)),{'step':0x7,'label':_0x4f56bf(0x22f),'ok':!![],'detail':_0x523aaf+'[\x22@lovrabet/sdk\x22]:\x20'+_0x4da661+_0x4f56bf(0x221)};}catch(_0x272e81){return{'step':0x7,'label':_0x4f56bf(0x22f),'ok':![],'detail':_0x272e81['message']};}}function tryStat(_0x39a049){try{return statSync(_0x39a049);}catch{return undefined;}}function printSummary(_0x594c1b){const _0x5d6f6c=a136_0x28fff2;console['log'](''),console['log'](a136_0x4be9d9[_0x5d6f6c(0x202)]('===\x20Upgrade\x20Summary\x20===')),console[_0x5d6f6c(0x1d3)]('');for(const _0x1e8a31 of _0x594c1b){const _0x4f3cd2=_0x1e8a31['ok']?a136_0x4be9d9['green']('OK'):a136_0x4be9d9[_0x5d6f6c(0x22c)](_0x5d6f6c(0x1c4));console[_0x5d6f6c(0x1d3)]('\x20\x20'+_0x4f3cd2+_0x5d6f6c(0x242)+_0x1e8a31[_0x5d6f6c(0x1c8)]+':\x20'+_0x1e8a31[_0x5d6f6c(0x244)]);if(_0x1e8a31['detail'])console[_0x5d6f6c(0x1d3)](_0x5d6f6c(0x230)+a136_0x4be9d9[_0x5d6f6c(0x1d8)](_0x1e8a31['detail']));}console['log']('');}export async function upgradeApp(_0x26d837,_0x1975b2){const _0x2c1ce7=a136_0x28fff2,_0xc2dc09=process[_0x2c1ce7(0x1f9)](),_0x585856=analyse(_0xc2dc09),_0x6f5693=!_0x585856[_0x2c1ce7(0x1d1)]&&_0x585856[_0x2c1ce7(0x237)][_0x2c1ce7(0x1ea)]===0x0&&!_0x585856['oldMcpConfig']&&!_0x585856[_0x2c1ce7(0x20b)]&&!_0x585856[_0x2c1ce7(0x1fb)];if(_0x6f5693){console[_0x2c1ce7(0x1d3)](a136_0x4be9d9[_0x2c1ce7(0x1f7)](_0x2c1ce7(0x200)));return;}printReport(_0x585856);const _0x469b0e=!!(_0x1975b2[_0x2c1ce7(0x22e)]||_0x1975b2['Y']||_0x26d837);if(!_0x469b0e)try{const _0x2b880b=await askConfirm(_0x2c1ce7(0x22a));if(!_0x2b880b){console[_0x2c1ce7(0x1d3)](a136_0x4be9d9['gray']('Upgrade\x20cancelled.'));return;}}catch(_0x19d59f){if(_0x19d59f?.[_0x2c1ce7(0x226)]===_0x2c1ce7(0x205)){console[_0x2c1ce7(0x1d3)](a136_0x4be9d9[_0x2c1ce7(0x1d8)]('Upgrade\x20cancelled.'));return;}throw _0x19d59f;}const _0x4625fe=[],_0x58dfbb=a136_0x496aa9({'text':_0x2c1ce7(0x240),'color':'cyan'})['start'](),_0x31f8de=execConfigMigration(_0x585856,_0xc2dc09);_0x4625fe[_0x2c1ce7(0x20a)](_0x31f8de),_0x58dfbb[_0x31f8de['ok']?_0x2c1ce7(0x246):'fail'](_0x2c1ce7(0x213)+(_0x31f8de[_0x2c1ce7(0x1e0)]??(_0x31f8de['ok']?_0x2c1ce7(0x1e3):_0x2c1ce7(0x1f3))));const _0x2d35f7=resolve(_0xc2dc09,_0x2c1ce7(0x1f1)),_0x4b3d6d=a136_0x496aa9({'text':_0x2c1ce7(0x22d),'color':'cyan'})[_0x2c1ce7(0x23b)]();if(existsSync(_0x2d35f7))try{rmSync(_0x2d35f7,{'recursive':!![],'force':!![]}),_0x4b3d6d[_0x2c1ce7(0x246)]('Step\x202/7:\x20.lovrabet/\x20directory\x20removed'),_0x4625fe[_0x2c1ce7(0x20a)]({'step':0x2,'label':_0x2c1ce7(0x1fe),'ok':!![]});}catch(_0x223b78){_0x4b3d6d[_0x2c1ce7(0x241)]('Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0x223b78[_0x2c1ce7(0x226)]),_0x4625fe['push']({'step':0x2,'label':_0x2c1ce7(0x1fe),'ok':![],'detail':_0x223b78['message']});}else _0x4b3d6d[_0x2c1ce7(0x1d2)](_0x2c1ce7(0x219)),_0x4625fe[_0x2c1ce7(0x20a)]({'step':0x2,'label':_0x2c1ce7(0x1fe),'ok':!![],'detail':_0x2c1ce7(0x207)});const _0x2506b2=a136_0x496aa9({'text':_0x2c1ce7(0x215),'color':_0x2c1ce7(0x220)})[_0x2c1ce7(0x23b)](),_0x185954=execRemoveOldArtifacts(_0x585856[_0x2c1ce7(0x237)]);_0x4625fe[_0x2c1ce7(0x20a)](_0x185954),_0x2506b2[_0x185954['ok']?'succeed':_0x2c1ce7(0x241)](_0x2c1ce7(0x21b)+(_0x185954['detail']??(_0x185954['ok']?_0x2c1ce7(0x1e3):_0x2c1ce7(0x1f3))));const _0x4d4d36=a136_0x496aa9({'text':_0x2c1ce7(0x1da),'color':'cyan'})[_0x2c1ce7(0x23b)](),_0x2d6f16=execCleanMcp(_0x585856);_0x4625fe[_0x2c1ce7(0x20a)](_0x2d6f16),_0x4d4d36[_0x2d6f16['ok']?_0x2c1ce7(0x246):_0x2c1ce7(0x241)](_0x2c1ce7(0x20e)+(_0x2d6f16[_0x2c1ce7(0x1e0)]??(_0x2d6f16['ok']?'done':_0x2c1ce7(0x1f3))));const _0x5ef9bf=a136_0x496aa9({'text':_0x2c1ce7(0x1e4),'color':'cyan'})[_0x2c1ce7(0x23b)](),_0x35d24e=execSkillsRemove(_0xc2dc09,_0x469b0e);_0x4625fe[_0x2c1ce7(0x20a)](_0x35d24e),_0x5ef9bf[_0x35d24e['ok']?_0x2c1ce7(0x246):_0x2c1ce7(0x241)]('Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20'+(_0x35d24e['detail']??(_0x35d24e['ok']?_0x2c1ce7(0x1e3):_0x2c1ce7(0x1f3))));const _0x4d406b=a136_0x496aa9({'text':_0x2c1ce7(0x1dd),'color':_0x2c1ce7(0x220)})[_0x2c1ce7(0x23b)](),_0x587795=execSkillsAdd(_0xc2dc09,_0x469b0e);_0x4625fe[_0x2c1ce7(0x20a)](_0x587795),_0x4d406b[_0x587795['ok']?_0x2c1ce7(0x246):'fail'](_0x2c1ce7(0x239)+(_0x587795['detail']??(_0x587795['ok']?_0x2c1ce7(0x1e3):_0x2c1ce7(0x1f3))));const _0x37c953=a136_0x496aa9({'text':_0x2c1ce7(0x20d),'color':'cyan'})['start'](),_0x339327=execUpgradeSdk(_0x585856);_0x4625fe[_0x2c1ce7(0x20a)](_0x339327),_0x37c953[_0x339327['ok']?_0x2c1ce7(0x246):_0x2c1ce7(0x241)](_0x2c1ce7(0x227)+(_0x339327['detail']??(_0x339327['ok']?_0x2c1ce7(0x1e3):_0x2c1ce7(0x1f3)))),printSummary(_0x4625fe);const _0x4b3e06=_0x4625fe[_0x2c1ce7(0x238)](_0x274540=>!_0x274540['ok']);_0x4b3e06?console[_0x2c1ce7(0x1d3)](a136_0x4be9d9['yellow'](_0x2c1ce7(0x224))):console[_0x2c1ce7(0x1d3)](a136_0x4be9d9[_0x2c1ce7(0x1f7)](_0x2c1ce7(0x248))),_0x339327['ok']&&_0x585856[_0x2c1ce7(0x1fb)]&&(console[_0x2c1ce7(0x1d3)](''),console[_0x2c1ce7(0x1d3)](a136_0x4be9d9[_0x2c1ce7(0x202)]['cyan'](_0x2c1ce7(0x1e2))),console[_0x2c1ce7(0x1d3)](a136_0x4be9d9[_0x2c1ce7(0x220)](_0x2c1ce7(0x1ee))),console[_0x2c1ce7(0x1d3)](''),console[_0x2c1ce7(0x1d3)](a136_0x4be9d9[_0x2c1ce7(0x1cc)](_0x2c1ce7(0x1e8))),console[_0x2c1ce7(0x1d3)](a136_0x4be9d9[_0x2c1ce7(0x1cc)](_0x2c1ce7(0x210))),console['log'](a136_0x4be9d9[_0x2c1ce7(0x1cc)](_0x2c1ce7(0x208))),console[_0x2c1ce7(0x1d3)](''));}
@@ -1 +1 @@
1
- const a137_0x48bc58=a137_0x4026;(function(_0x35b47b,_0x2ea536){const _0x4b5a40=a137_0x4026,_0x3024ae=_0x35b47b();while(!![]){try{const _0x2b52ed=-parseInt(_0x4b5a40(0x15c))/0x1*(parseInt(_0x4b5a40(0x156))/0x2)+-parseInt(_0x4b5a40(0x16a))/0x3*(-parseInt(_0x4b5a40(0x16d))/0x4)+-parseInt(_0x4b5a40(0x197))/0x5*(parseInt(_0x4b5a40(0x164))/0x6)+parseInt(_0x4b5a40(0x177))/0x7+parseInt(_0x4b5a40(0x15e))/0x8+-parseInt(_0x4b5a40(0x194))/0x9+-parseInt(_0x4b5a40(0x180))/0xa;if(_0x2b52ed===_0x2ea536)break;else _0x3024ae['push'](_0x3024ae['shift']());}catch(_0x393d6b){_0x3024ae['push'](_0x3024ae['shift']());}}}(a137_0x28d4,0xac6df));function a137_0x28d4(){const _0x1bb623=['1833702ebpIQs','`rabetbase\x20app\x20remote`\x20has\x20been\x20removed.','preview','8nfyzFs','map','has','Authentication','API\x20Development','Roles','start','install','remote','from','5988787ALQKvP','Project','Run\x20any\x20package.json\x20script','values','`rabetbase\x20','risk','skills','service','Instant\x20API','89280DNczeA','auth','Use\x20`rabetbase\x20workspace\x20use\x20--app\x20<name>`\x20instead.','Self\x20Update','app\x20remote','login','use','app\x20use','Database\x20Connections','wildcardDef','skill\x20','write','Runtime\x20App\x20Config\x20Management','\x20\x20[write]','Diagnostics','Logs','CLI\x20Built-in\x20Skill','push','app','build','9387675vASUmc','create','hidden','1699175yadOSN','Workspace','Smart\x20List\x20Pages','skill','178cabuHc','set','run','Permissions','Configuration','read','9649VlEeaC','description','9749568SEpHwv','SQL\x20Queries','Quick\x20Start','isSingleCommand','Platform\x20Issue','Menu','12zJQAXM','command','Dataset\x20&\x20Operations','get','<script>','Run\x20Scripts'];a137_0x28d4=function(){return _0x1bb623;};return a137_0x28d4();}function a137_0x4026(_0x40db12,_0x441415){_0x40db12=_0x40db12-0x153;const _0x28d46c=a137_0x28d4();let _0x402684=_0x28d46c[_0x40db12];return _0x402684;}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{roleDefinitions}from'../commands/role/index.js';import{permitDefinitions}from'../commands/permit/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x5704f9){const _0x3c0ad7=a137_0x4026;for(const _0x1c0e1f of _0x5704f9){definitions[_0x3c0ad7(0x157)](_0x1c0e1f[_0x3c0ad7(0x17e)]+':'+_0x1c0e1f[_0x3c0ad7(0x165)],_0x1c0e1f);let _0x4ecc6c=serviceGroups[_0x3c0ad7(0x167)](_0x1c0e1f[_0x3c0ad7(0x17e)]);!_0x4ecc6c&&(_0x4ecc6c=[],serviceGroups[_0x3c0ad7(0x157)](_0x1c0e1f[_0x3c0ad7(0x17e)],_0x4ecc6c)),_0x4ecc6c[_0x3c0ad7(0x191)](_0x1c0e1f);}}function registerDeclarativeService(_0x3115b3,_0x3a7dbe,_0x47c38e){const _0xeb2c02=a137_0x4026;registerDefinitions(_0x3a7dbe);_0x47c38e?.['wildcardDef']&&registerDefinitions([_0x47c38e[_0xeb2c02(0x189)]]);const _0x41f078=_0x146235=>_0x146235===_0xeb2c02(0x15b)?'':_0x146235===_0xeb2c02(0x18b)?_0xeb2c02(0x18d):'\x20\x20[high-risk-write]',_0x12dc00={'service':_0x3a7dbe[0x0]['service'],'label':_0x3115b3,'commands':_0x3a7dbe['filter'](_0x1eb9e4=>!_0x1eb9e4[_0xeb2c02(0x196)])[_0xeb2c02(0x16e)](_0x532b38=>({'command':_0x532b38[_0xeb2c02(0x165)],'description':_0x532b38[_0xeb2c02(0x15d)],'tag':_0x41f078(_0x532b38[_0xeb2c02(0x17c)])})),'declarative':!![],'defaultCommand':_0x47c38e?.['defaultCommand']??(_0x47c38e?.[_0xeb2c02(0x161)]?_0x3a7dbe[0x0][_0xeb2c02(0x165)]:undefined),'wildcardDef':_0x47c38e?.[_0xeb2c02(0x189)],'isSingleCommand':_0x47c38e?.[_0xeb2c02(0x161)]};serviceRegistry[_0xeb2c02(0x191)](_0x12dc00),serviceByName[_0xeb2c02(0x157)](_0x12dc00[_0xeb2c02(0x17e)],_0x12dc00);}registerDeclarativeService(a137_0x48bc58(0x160),initDefinitions,{'defaultCommand':a137_0x48bc58(0x158),'isSingleCommand':!![]}),registerDeclarativeService(a137_0x48bc58(0x178),projectDefinitions),registerDeclarativeService(a137_0x48bc58(0x153),workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a137_0x48bc58(0x170),authDefinitions,{'defaultCommand':a137_0x48bc58(0x185)}),registerDeclarativeService(a137_0x48bc58(0x166),datasetDefinitions),registerDeclarativeService(a137_0x48bc58(0x154),pageDefinitions),registerDeclarativeService(a137_0x48bc58(0x171),apiDefinitions),registerDeclarativeService(a137_0x48bc58(0x17f),dataDefinitions),registerDeclarativeService('BFF\x20Scripts',bffDefinitions),registerDeclarativeService(a137_0x48bc58(0x15f),sqlDefinitions),registerDeclarativeService(a137_0x48bc58(0x188),dbDefinitions),registerDeclarativeService(a137_0x48bc58(0x163),menuDefinitions),registerDeclarativeService(a137_0x48bc58(0x172),roleDefinitions),registerDeclarativeService(a137_0x48bc58(0x159),permitDefinitions),registerDeclarativeService(a137_0x48bc58(0x18c),appConfigDefinitions),registerDeclarativeService(a137_0x48bc58(0x162),issueDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService(a137_0x48bc58(0x15a),configDefinitions),registerDeclarativeService(a137_0x48bc58(0x18e),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a137_0x48bc58(0x183),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a137_0x48bc58(0x190),cliSkillDefinitions,{'defaultCommand':a137_0x48bc58(0x174)}),registerDeclarativeService(a137_0x48bc58(0x18f),logsDefinitions,{'defaultCommand':'show'}),registerDeclarativeService(a137_0x48bc58(0x169),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry['length']-0x1];last['commands']=[{'command':a137_0x48bc58(0x168),'description':a137_0x48bc58(0x179),'tag':''}];}export const deprecatedAliases={'create':{'service':'project','command':a137_0x48bc58(0x195)},'start':{'service':a137_0x48bc58(0x158),'command':a137_0x48bc58(0x173)},'build':{'service':a137_0x48bc58(0x158),'command':a137_0x48bc58(0x193)},'preview':{'service':a137_0x48bc58(0x158),'command':a137_0x48bc58(0x16c)},'logout':{'service':a137_0x48bc58(0x181),'command':'logout'}};const CLI_SKILL_INSTALL_REMOVED_HINT='Use\x20`rabetbase\x20cli-skill\x20install`\x20to\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill.\x20To\x20install\x20business\x20Skills,\x20use\x20`lovrabet\x20skill\x20install`.',APP_REMOTE_REMOVED_HINT='Use\x20`rabetbase\x20app\x20list\x20--remote`\x20instead.',APP_USE_REMOVED_HINT=a137_0x48bc58(0x182);export function resolveRemovedCommand(_0x5d228f,_0x50082e){const _0x31721c=a137_0x48bc58;if(_0x5d228f===_0x31721c(0x155)){const _0x1ea0c0=_0x50082e?_0x31721c(0x18a)+_0x50082e:_0x31721c(0x155);return{'command':_0x1ea0c0,'message':_0x31721c(0x17b)+_0x1ea0c0+'`\x20has\x20been\x20removed.','hint':CLI_SKILL_INSTALL_REMOVED_HINT};}if(_0x5d228f===_0x31721c(0x17d))return{'command':_0x31721c(0x17d),'message':'`rabetbase\x20skills`\x20has\x20been\x20removed.','hint':CLI_SKILL_INSTALL_REMOVED_HINT};if(_0x5d228f===_0x31721c(0x192)&&_0x50082e===_0x31721c(0x175))return{'command':_0x31721c(0x184),'message':_0x31721c(0x16b),'hint':APP_REMOTE_REMOVED_HINT};if(_0x5d228f===_0x31721c(0x192)&&_0x50082e===_0x31721c(0x186))return{'command':_0x31721c(0x187),'message':'`rabetbase\x20app\x20use`\x20has\x20been\x20removed.','hint':APP_USE_REMOVED_HINT};return undefined;}export const deprecatedSubcommands={'bff':{'new':a137_0x48bc58(0x195)},'sql':{'new':a137_0x48bc58(0x195)}};export function resolveDeprecatedSubcommand(_0x11983f,_0x57b6f0){return deprecatedSubcommands[_0x11983f]?.[_0x57b6f0];}export function findDefinition(_0x121fd6,_0x533b08){const _0x38e69f=a137_0x48bc58;return definitions[_0x38e69f(0x167)](_0x121fd6+':'+_0x533b08);}export function isKnownService(_0x30893d){const _0x913747=a137_0x48bc58;return serviceByName[_0x913747(0x16f)](_0x30893d);}export function isDeclarativeService(_0x2bc0ac){const _0x14a751=a137_0x48bc58;return serviceGroups['has'](_0x2bc0ac)||serviceByName[_0x14a751(0x167)](_0x2bc0ac)?.[_0x14a751(0x189)]!==undefined;}export function getServiceEntry(_0x33b8eb){const _0x3d4b40=a137_0x48bc58;return serviceByName[_0x3d4b40(0x167)](_0x33b8eb);}export function getLegacyHandler(_0xd1c194,_0x36f364){return undefined;}export function getAllDefinitions(){const _0x44ca29=a137_0x48bc58;return Array[_0x44ca29(0x176)](definitions[_0x44ca29(0x17a)]());}
1
+ const a137_0x8649c8=a137_0x4460;(function(_0x5d1e90,_0x2ccfa9){const _0x40a705=a137_0x4460,_0x16614a=_0x5d1e90();while(!![]){try{const _0x3ba2f2=-parseInt(_0x40a705(0xe0))/0x1+parseInt(_0x40a705(0x102))/0x2*(-parseInt(_0x40a705(0xf6))/0x3)+parseInt(_0x40a705(0xef))/0x4*(-parseInt(_0x40a705(0xde))/0x5)+parseInt(_0x40a705(0xfc))/0x6+parseInt(_0x40a705(0xd6))/0x7+-parseInt(_0x40a705(0xec))/0x8+parseInt(_0x40a705(0xe4))/0x9;if(_0x3ba2f2===_0x2ccfa9)break;else _0x16614a['push'](_0x16614a['shift']());}catch(_0xa87b9d){_0x16614a['push'](_0x16614a['shift']());}}}(a137_0x13a1,0xae0d1));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{roleDefinitions}from'../commands/role/index.js';import{permitDefinitions}from'../commands/permit/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';function a137_0x13a1(){const _0x49828a=['skill','description','push','Diagnostics','commands','build','remote','start','preview','get','584157XcYEnM','project','read','Authentication','Configuration','SQL\x20Queries','create','has','3434825owhzaA','hidden','1034748GRkUzn','risk','Code\x20Generation','app','32715630xAZQGH','app\x20use','write','filter','Run\x20any\x20package.json\x20script','length','values','skill\x20','11276168ullqtE','Instant\x20API','Run\x20Scripts','4uLkpLo','Platform\x20Issue','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20instead.','Roles','from','`rabetbase\x20','command','603ImDFfA','isSingleCommand','map','`\x20has\x20been\x20removed.','service','Permissions','2344470KMMPtT','Runtime\x20App\x20Config\x20Management','set','API\x20Development','BFF\x20Scripts','Logs','2638BAuwDB','wildcardDef','run','Use\x20`rabetbase\x20cli-skill\x20install`\x20to\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill.\x20To\x20install\x20business\x20Skills,\x20use\x20`lovrabet\x20skill\x20install`.','Project','auth'];a137_0x13a1=function(){return _0x49828a;};return a137_0x13a1();}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{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];function a137_0x4460(_0x2e83c8,_0x43bafe){_0x2e83c8=_0x2e83c8-0xd6;const _0x13a149=a137_0x13a1();let _0x44605c=_0x13a149[_0x2e83c8];return _0x44605c;}const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x3c77b6){const _0x1fcdbf=a137_0x4460;for(const _0x5b121e of _0x3c77b6){definitions[_0x1fcdbf(0xfe)](_0x5b121e['service']+':'+_0x5b121e[_0x1fcdbf(0xf5)],_0x5b121e);let _0xba9a8c=serviceGroups[_0x1fcdbf(0x111)](_0x5b121e[_0x1fcdbf(0xfa)]);!_0xba9a8c&&(_0xba9a8c=[],serviceGroups[_0x1fcdbf(0xfe)](_0x5b121e[_0x1fcdbf(0xfa)],_0xba9a8c)),_0xba9a8c[_0x1fcdbf(0x10a)](_0x5b121e);}}function registerDeclarativeService(_0xaf8ea1,_0x4621e3,_0x350483){const _0x192397=a137_0x4460;registerDefinitions(_0x4621e3);_0x350483?.[_0x192397(0x103)]&&registerDefinitions([_0x350483[_0x192397(0x103)]]);const _0x5226c5=_0x2f554e=>_0x2f554e===_0x192397(0xd8)?'':_0x2f554e===_0x192397(0xe6)?'\x20\x20[write]':'\x20\x20[high-risk-write]',_0x3fc2f8={'service':_0x4621e3[0x0][_0x192397(0xfa)],'label':_0xaf8ea1,'commands':_0x4621e3[_0x192397(0xe7)](_0x2c0b6d=>!_0x2c0b6d[_0x192397(0xdf)])[_0x192397(0xf8)](_0x38edba=>({'command':_0x38edba[_0x192397(0xf5)],'description':_0x38edba[_0x192397(0x109)],'tag':_0x5226c5(_0x38edba[_0x192397(0xe1)])})),'declarative':!![],'defaultCommand':_0x350483?.['defaultCommand']??(_0x350483?.[_0x192397(0xf7)]?_0x4621e3[0x0]['command']:undefined),'wildcardDef':_0x350483?.[_0x192397(0x103)],'isSingleCommand':_0x350483?.[_0x192397(0xf7)]};serviceRegistry[_0x192397(0x10a)](_0x3fc2f8),serviceByName[_0x192397(0xfe)](_0x3fc2f8[_0x192397(0xfa)],_0x3fc2f8);}registerDeclarativeService('Quick\x20Start',initDefinitions,{'defaultCommand':a137_0x8649c8(0x104),'isSingleCommand':!![]}),registerDeclarativeService(a137_0x8649c8(0x106),projectDefinitions),registerDeclarativeService('Workspace',workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a137_0x8649c8(0xd9),authDefinitions,{'defaultCommand':'login'}),registerDeclarativeService('Dataset\x20&\x20Operations',datasetDefinitions),registerDeclarativeService('Smart\x20List\x20Pages',pageDefinitions),registerDeclarativeService(a137_0x8649c8(0xff),apiDefinitions),registerDeclarativeService(a137_0x8649c8(0xed),dataDefinitions),registerDeclarativeService(a137_0x8649c8(0x100),bffDefinitions),registerDeclarativeService(a137_0x8649c8(0xdb),sqlDefinitions),registerDeclarativeService('Database\x20Connections',dbDefinitions),registerDeclarativeService('Menu',menuDefinitions),registerDeclarativeService(a137_0x8649c8(0xf2),roleDefinitions),registerDeclarativeService(a137_0x8649c8(0xfb),permitDefinitions),registerDeclarativeService(a137_0x8649c8(0xfd),appConfigDefinitions),registerDeclarativeService(a137_0x8649c8(0xf0),issueDefinitions),registerDeclarativeService(a137_0x8649c8(0xe2),codegenDefinitions),registerDeclarativeService(a137_0x8649c8(0xda),configDefinitions),registerDeclarativeService(a137_0x8649c8(0x10b),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':'install'}),registerDeclarativeService(a137_0x8649c8(0x101),logsDefinitions,{'defaultCommand':'show'}),registerDeclarativeService(a137_0x8649c8(0xee),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a137_0x8649c8(0xe9)]-0x1];last[a137_0x8649c8(0x10c)]=[{'command':'<script>','description':a137_0x8649c8(0xe8),'tag':''}];}export const deprecatedAliases={'create':{'service':a137_0x8649c8(0xd7),'command':a137_0x8649c8(0xdc)},'start':{'service':a137_0x8649c8(0x104),'command':a137_0x8649c8(0x10f)},'build':{'service':'run','command':a137_0x8649c8(0x10d)},'preview':{'service':'run','command':a137_0x8649c8(0x110)},'logout':{'service':a137_0x8649c8(0x107),'command':'logout'}};const CLI_SKILL_INSTALL_REMOVED_HINT=a137_0x8649c8(0x105),APP_REMOTE_REMOVED_HINT=a137_0x8649c8(0xf1),APP_USE_REMOVED_HINT='Use\x20`rabetbase\x20workspace\x20use\x20--app\x20<name>`\x20instead.';export function resolveRemovedCommand(_0x3e2c82,_0x2eeb55){const _0x331524=a137_0x8649c8;if(_0x3e2c82===_0x331524(0x108)){const _0x182f32=_0x2eeb55?_0x331524(0xeb)+_0x2eeb55:_0x331524(0x108);return{'command':_0x182f32,'message':_0x331524(0xf4)+_0x182f32+_0x331524(0xf9),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};}if(_0x3e2c82==='skills')return{'command':'skills','message':'`rabetbase\x20skills`\x20has\x20been\x20removed.','hint':CLI_SKILL_INSTALL_REMOVED_HINT};if(_0x3e2c82===_0x331524(0xe3)&&_0x2eeb55===_0x331524(0x10e))return{'command':'app\x20remote','message':'`rabetbase\x20app\x20remote`\x20has\x20been\x20removed.','hint':APP_REMOTE_REMOVED_HINT};if(_0x3e2c82==='app'&&_0x2eeb55==='use')return{'command':_0x331524(0xe5),'message':'`rabetbase\x20app\x20use`\x20has\x20been\x20removed.','hint':APP_USE_REMOVED_HINT};return undefined;}export const deprecatedSubcommands={'bff':{'new':a137_0x8649c8(0xdc)},'sql':{'new':a137_0x8649c8(0xdc)}};export function resolveDeprecatedSubcommand(_0x4bd295,_0x4e2e52){return deprecatedSubcommands[_0x4bd295]?.[_0x4e2e52];}export function findDefinition(_0x41a699,_0x59a486){const _0x3f5950=a137_0x8649c8;return definitions[_0x3f5950(0x111)](_0x41a699+':'+_0x59a486);}export function isKnownService(_0x3b6ec5){return serviceByName['has'](_0x3b6ec5);}export function isDeclarativeService(_0x139597){const _0x2d4853=a137_0x8649c8;return serviceGroups[_0x2d4853(0xdd)](_0x139597)||serviceByName[_0x2d4853(0x111)](_0x139597)?.[_0x2d4853(0x103)]!==undefined;}export function getServiceEntry(_0x377109){const _0x14dff0=a137_0x8649c8;return serviceByName[_0x14dff0(0x111)](_0x377109);}export function getLegacyHandler(_0xaa6aca,_0xf56abc){return undefined;}export function getAllDefinitions(){const _0x4c0163=a137_0x8649c8;return Array[_0x4c0163(0xf3)](definitions[_0x4c0163(0xea)]());}
@@ -1 +1 @@
1
- const a138_0x1751ed=a138_0x2541;(function(_0x36b8db,_0x18c904){const _0x992fdb=a138_0x2541,_0x3dc407=_0x36b8db();while(!![]){try{const _0x5c86da=-parseInt(_0x992fdb(0x1f2))/0x1*(-parseInt(_0x992fdb(0x1eb))/0x2)+parseInt(_0x992fdb(0x1e2))/0x3+parseInt(_0x992fdb(0x1de))/0x4+-parseInt(_0x992fdb(0x1f0))/0x5+-parseInt(_0x992fdb(0x1e6))/0x6*(-parseInt(_0x992fdb(0x1e0))/0x7)+-parseInt(_0x992fdb(0x1dc))/0x8+parseInt(_0x992fdb(0x1e7))/0x9*(-parseInt(_0x992fdb(0x1ee))/0xa);if(_0x5c86da===_0x18c904)break;else _0x3dc407['push'](_0x3dc407['shift']());}catch(_0x3597ce){_0x3dc407['push'](_0x3dc407['shift']());}}}(a138_0x178c,0xe4711));import{createAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a138_0x2541(_0x4147e4,_0x586830){_0x4147e4=_0x4147e4-0x1da;const _0x178c49=a138_0x178c();let _0x25411f=_0x178c49[_0x4147e4];return _0x25411f;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{NAME_FLAG,REMARK_FLAG,projectRole}from'../../commands/role/shared.js';const CREATE_PATH=a138_0x1751ed(0x1ec);function readName(_0x3307dc){const _0x25a432=a138_0x1751ed,_0x1e1d97=_0x3307dc[_0x25a432(0x1f4)](_0x25a432(0x1ef))['trim']();if(!_0x1e1d97)throw CliErrors['flagMissing']('name',_0x25a432(0x1f1));if(_0x1e1d97[_0x25a432(0x1ed)]>0x40)throw CliErrors[_0x25a432(0x1ea)](_0x25a432(0x1da));return _0x1e1d97;}export const roleCreate={'service':a138_0x1751ed(0x1e8),'command':a138_0x1751ed(0x1db),'description':a138_0x1751ed(0x1e9),'risk':a138_0x1751ed(0x1e4),'flags':[NAME_FLAG,REMARK_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x24ba6a){readName(_0x24ba6a);},async 'dryRun'(_0xef7cf0){const _0x5ea9ab=a138_0x1751ed,_0x538d53=readName(_0xef7cf0),_0x4933fa=_0xef7cf0['str'](_0x5ea9ab(0x1f3))[_0x5ea9ab(0x1dd)]()||undefined;return asDryRunResult({'operation':_0x5ea9ab(0x1db),'selector':{'appCode':_0xef7cf0[_0x5ea9ab(0x1df)],'roleName':_0x538d53},'before':null,'after':{'roleName':_0x538d53,'roleType':'CUSTOM','remark':_0x4933fa},'dryRun':!![],'backend':{'method':_0x5ea9ab(0x1e1),'path':CREATE_PATH},'warnings':[]},{'method':_0x5ea9ab(0x1e1),'url':CREATE_PATH});},async 'execute'(_0x167c54){const _0x5544b0=a138_0x1751ed,_0x3af1b6=readName(_0x167c54),_0x34c598=_0x167c54['str'](_0x5544b0(0x1f3))['trim']()||undefined,_0x225555=await createAppRole({'appCode':_0x167c54[_0x5544b0(0x1df)],'roleName':_0x3af1b6,..._0x34c598?{'remark':_0x34c598}:{}});return{'ok':!![],'data':{'operation':_0x5544b0(0x1db),'selector':{'appCode':_0x167c54[_0x5544b0(0x1df)],'roleId':_0x225555['id'],'roleName':_0x3af1b6},'before':null,'after':projectRole(_0x225555),'dryRun':![],'backend':{'method':_0x5544b0(0x1e1),'path':CREATE_PATH},'warnings':[]},'message':'Created\x20role\x20'+_0x225555[_0x5544b0(0x1e5)]+_0x5544b0(0x1e3)+_0x225555['id']+')'};}};function a138_0x178c(){const _0x5b949a=['create','858640zYqqTT','trim','3270100fjfyRp','appCode','2575916AhlpcB','POST','4329831qJFJph','\x20(id=','write','roleName','18XUMusU','36WXKbIS','role','Create\x20a\x20CUSTOM\x20user\x20group\x20(role)','validation','2RfZLmg','/smartapi/permit/role/create','length','8151580CzmKwo','name','1135460clqAya','Pass\x20--name\x20<roleName>.','1165985sseJHS','remark','str','Role\x20name\x20cannot\x20exceed\x2064\x20characters.'];a138_0x178c=function(){return _0x5b949a;};return a138_0x178c();}
1
+ const a138_0x12227e=a138_0x29b7;(function(_0x3b2c53,_0x508446){const _0x30d82a=a138_0x29b7,_0x56c8aa=_0x3b2c53();while(!![]){try{const _0x4133e0=parseInt(_0x30d82a(0x1c5))/0x1*(parseInt(_0x30d82a(0x1bf))/0x2)+parseInt(_0x30d82a(0x1b0))/0x3*(-parseInt(_0x30d82a(0x1af))/0x4)+-parseInt(_0x30d82a(0x1c1))/0x5+parseInt(_0x30d82a(0x1b2))/0x6+-parseInt(_0x30d82a(0x1ad))/0x7*(parseInt(_0x30d82a(0x1c4))/0x8)+-parseInt(_0x30d82a(0x1bb))/0x9+parseInt(_0x30d82a(0x1bc))/0xa;if(_0x4133e0===_0x508446)break;else _0x56c8aa['push'](_0x56c8aa['shift']());}catch(_0x5c2d69){_0x56c8aa['push'](_0x56c8aa['shift']());}}}(a138_0x3766,0x53828));import{createAppRole}from'../../core/api-client.js';function a138_0x3766(){const _0x5ce06d=['str','roleName','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','CUSTOM','Create\x20a\x20CUSTOM\x20user\x20group\x20(role)','flagMissing','appCode','trim','2699838aWLBxl','7560540EWezJP','role','remark','16894ItFfNc','create','1399260UQTwUN','Created\x20role\x20','POST','16exbQHE','68VFUlTT','validation','name','1701945MnTjNQ','write','41744NBwBNx','60MlJnCo','/smartapi/permit/role/create','1718580qolfjn'];a138_0x3766=function(){return _0x5ce06d;};return a138_0x3766();}function a138_0x29b7(_0xee3b9,_0x11ed8c){_0xee3b9=_0xee3b9-0x1ac;const _0x376620=a138_0x3766();let _0x29b7bc=_0x376620[_0xee3b9];return _0x29b7bc;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{NAME_FLAG,REMARK_FLAG,projectRole}from'../../commands/role/shared.js';const CREATE_PATH=a138_0x12227e(0x1b1);function readName(_0x2b0357){const _0x1c4684=a138_0x12227e,_0xe378e1=_0x2b0357['str'](_0x1c4684(0x1ac))['trim']();if(!_0xe378e1)throw CliErrors[_0x1c4684(0x1b8)](_0x1c4684(0x1ac),'Pass\x20--name\x20<roleName>.');if(_0xe378e1['length']>0x40)throw CliErrors[_0x1c4684(0x1c6)](_0x1c4684(0x1b5));return _0xe378e1;}export const roleCreate={'service':a138_0x12227e(0x1bd),'command':'create','description':a138_0x12227e(0x1b7),'risk':a138_0x12227e(0x1ae),'flags':[NAME_FLAG,REMARK_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x438a3b){readName(_0x438a3b);},async 'dryRun'(_0x1a6225){const _0x109b6c=a138_0x12227e,_0x3edf0d=readName(_0x1a6225),_0x3a8b72=_0x1a6225[_0x109b6c(0x1b3)]('remark')[_0x109b6c(0x1ba)]()||undefined;return asDryRunResult({'operation':'create','selector':{'appCode':_0x1a6225[_0x109b6c(0x1b9)],'roleName':_0x3edf0d},'before':null,'after':{'roleName':_0x3edf0d,'roleType':_0x109b6c(0x1b6),'remark':_0x3a8b72},'dryRun':!![],'backend':{'method':_0x109b6c(0x1c3),'path':CREATE_PATH},'warnings':[]},{'method':_0x109b6c(0x1c3),'url':CREATE_PATH});},async 'execute'(_0xcdb1b0){const _0x2c4a65=a138_0x12227e,_0xc71520=readName(_0xcdb1b0),_0x389da1=_0xcdb1b0['str'](_0x2c4a65(0x1be))[_0x2c4a65(0x1ba)]()||undefined,_0x4f838c=await createAppRole({'appCode':_0xcdb1b0[_0x2c4a65(0x1b9)],'roleName':_0xc71520,..._0x389da1?{'remark':_0x389da1}:{}});return{'ok':!![],'data':{'operation':_0x2c4a65(0x1c0),'selector':{'appCode':_0xcdb1b0[_0x2c4a65(0x1b9)],'roleId':_0x4f838c['id'],'roleName':_0xc71520},'before':null,'after':projectRole(_0x4f838c),'dryRun':![],'backend':{'method':_0x2c4a65(0x1c3),'path':CREATE_PATH},'warnings':[]},'message':_0x2c4a65(0x1c2)+_0x4f838c[_0x2c4a65(0x1b4)]+'\x20(id='+_0x4f838c['id']+')'};}};
@@ -1 +1 @@
1
- const a139_0x15e86a=a139_0x5b0e;(function(_0x10e806,_0x5cc240){const _0xdeae6b=a139_0x5b0e,_0x5128d6=_0x10e806();while(!![]){try{const _0x593757=parseInt(_0xdeae6b(0x118))/0x1*(parseInt(_0xdeae6b(0x11c))/0x2)+-parseInt(_0xdeae6b(0x105))/0x3+-parseInt(_0xdeae6b(0x110))/0x4*(-parseInt(_0xdeae6b(0x107))/0x5)+-parseInt(_0xdeae6b(0x10b))/0x6*(-parseInt(_0xdeae6b(0x10a))/0x7)+parseInt(_0xdeae6b(0x10f))/0x8+parseInt(_0xdeae6b(0x11a))/0x9*(-parseInt(_0xdeae6b(0x114))/0xa)+-parseInt(_0xdeae6b(0x111))/0xb*(parseInt(_0xdeae6b(0x11b))/0xc);if(_0x593757===_0x5cc240)break;else _0x5128d6['push'](_0x5128d6['shift']());}catch(_0x4ffbaa){_0x5128d6['push'](_0x5128d6['shift']());}}}(a139_0x20ee,0x75ab4));import{deleteAppRole}from'../../core/api-client.js';function a139_0x5b0e(_0x1ff897,_0x4e2e31){_0x1ff897=_0x1ff897-0x105;const _0x20ee33=a139_0x20ee();let _0x5b0e9a=_0x20ee33[_0x1ff897];return _0x5b0e9a;}function a139_0x20ee(){const _0x2c6b97=['\x20(id=','userCount','125314BZhMBQ','186nJAfJX','POST','Deleted\x20role\x20','delete','1102888PEjgIP','1124rcXGrL','8555767alzMuz','/smartapi/permit/role/delete','roleName','293630cpIbvk','appCode','role','Role\x20still\x20has\x20','43iCyktH','num','9cRtSLt','24IWFwkZ','43468yaDhBc','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','500562HlrQou','high-risk-write','10790QxYdyl'];a139_0x20ee=function(){return _0x2c6b97;};return a139_0x20ee();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH=a139_0x15e86a(0x112);export const roleDelete={'service':a139_0x15e86a(0x116),'command':a139_0x15e86a(0x10e),'description':'Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','risk':a139_0x15e86a(0x106),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x28f886){const _0x41a772=a139_0x15e86a,_0x467eda=_0x28f886[_0x41a772(0x119)]('id'),_0x3f974a=await getRoleById(_0x28f886['appCode'],_0x467eda);return assertCustomRole(_0x3f974a,'delete'),asDryRunResult({'operation':'delete','selector':{'appCode':_0x28f886[_0x41a772(0x115)],'roleId':_0x467eda,'roleName':_0x3f974a[_0x41a772(0x113)]},'before':projectRole(_0x3f974a),'after':null,'dryRun':!![],'backend':{'method':_0x41a772(0x10c),'path':DELETE_PATH},'warnings':_0x3f974a['userCount']>0x0?[_0x41a772(0x117)+_0x3f974a[_0x41a772(0x109)]+_0x41a772(0x11d)]:[]},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x40bdc4){const _0x110ac8=a139_0x15e86a,_0x60450a=_0x40bdc4[_0x110ac8(0x119)]('id'),_0x41fc51=await getRoleById(_0x40bdc4[_0x110ac8(0x115)],_0x60450a);return assertCustomRole(_0x41fc51,_0x110ac8(0x10e)),await deleteAppRole(_0x60450a),{'ok':!![],'data':{'operation':'delete','selector':{'appCode':_0x40bdc4[_0x110ac8(0x115)],'roleId':_0x60450a,'roleName':_0x41fc51[_0x110ac8(0x113)]},'before':projectRole(_0x41fc51),'after':null,'dryRun':![],'backend':{'method':_0x110ac8(0x10c),'path':DELETE_PATH},'warnings':[]},'message':_0x110ac8(0x10d)+_0x41fc51[_0x110ac8(0x113)]+_0x110ac8(0x108)+_0x60450a+')'};}};
1
+ function a139_0x56d0(){const _0x4ebae6=['10ohDeKo','2337546JsZIhZ','983872pSWknZ','role','POST','2699540OXjBpE','appCode','1174599HXjbvm','userCount','126604CKwcnY','roleName','Deleted\x20role\x20','high-risk-write','4007409DmRNhO','num','72fsrjje','Role\x20still\x20has\x20','\x20(id=','9346190qrzEnx','delete'];a139_0x56d0=function(){return _0x4ebae6;};return a139_0x56d0();}const a139_0x388033=a139_0x269f;(function(_0x1ca216,_0x1e3c04){const _0x241d50=a139_0x269f,_0x57729c=_0x1ca216();while(!![]){try{const _0x1ab424=parseInt(_0x241d50(0x16b))/0x1+-parseInt(_0x241d50(0x16e))/0x2+parseInt(_0x241d50(0x176))/0x3+-parseInt(_0x241d50(0x172))/0x4*(parseInt(_0x241d50(0x169))/0x5)+-parseInt(_0x241d50(0x16a))/0x6+parseInt(_0x241d50(0x167))/0x7+-parseInt(_0x241d50(0x164))/0x8*(parseInt(_0x241d50(0x170))/0x9);if(_0x1ab424===_0x1e3c04)break;else _0x57729c['push'](_0x57729c['shift']());}catch(_0x4d664d){_0x57729c['push'](_0x57729c['shift']());}}}(a139_0x56d0,0xa56cf));import{deleteAppRole}from'../../core/api-client.js';function a139_0x269f(_0x48710c,_0x4d7b21){_0x48710c=_0x48710c-0x163;const _0x56d0e6=a139_0x56d0();let _0x269fec=_0x56d0e6[_0x48710c];return _0x269fec;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH='/smartapi/permit/role/delete';export const roleDelete={'service':a139_0x388033(0x16c),'command':a139_0x388033(0x168),'description':'Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','risk':a139_0x388033(0x175),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x5e774a){const _0x6ab585=a139_0x388033,_0x2d0e13=_0x5e774a[_0x6ab585(0x163)]('id'),_0x282c58=await getRoleById(_0x5e774a[_0x6ab585(0x16f)],_0x2d0e13);return assertCustomRole(_0x282c58,_0x6ab585(0x168)),asDryRunResult({'operation':'delete','selector':{'appCode':_0x5e774a[_0x6ab585(0x16f)],'roleId':_0x2d0e13,'roleName':_0x282c58[_0x6ab585(0x173)]},'before':projectRole(_0x282c58),'after':null,'dryRun':!![],'backend':{'method':_0x6ab585(0x16d),'path':DELETE_PATH},'warnings':_0x282c58[_0x6ab585(0x171)]>0x0?[_0x6ab585(0x165)+_0x282c58[_0x6ab585(0x171)]+'\x20member(s);\x20they\x20will\x20lose\x20this\x20group.']:[]},{'method':_0x6ab585(0x16d),'url':DELETE_PATH});},async 'execute'(_0x5987fc){const _0x42313b=a139_0x388033,_0x232911=_0x5987fc['num']('id'),_0x546b38=await getRoleById(_0x5987fc[_0x42313b(0x16f)],_0x232911);return assertCustomRole(_0x546b38,_0x42313b(0x168)),await deleteAppRole(_0x232911),{'ok':!![],'data':{'operation':_0x42313b(0x168),'selector':{'appCode':_0x5987fc[_0x42313b(0x16f)],'roleId':_0x232911,'roleName':_0x546b38[_0x42313b(0x173)]},'before':projectRole(_0x546b38),'after':null,'dryRun':![],'backend':{'method':_0x42313b(0x16d),'path':DELETE_PATH},'warnings':[]},'message':_0x42313b(0x174)+_0x546b38[_0x42313b(0x173)]+_0x42313b(0x166)+_0x232911+')'};}};