@lovrabet/rabetbase-cli 2.3.4-beta.4 → 2.3.5-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(_0x2ea391,_0x3765c9){const _0x2becbf=a128_0x8c2f,_0x1bd103=_0x2ea391();while(!![]){try{const _0x429a5c=parseInt(_0x2becbf(0x1e7))/0x1*(-parseInt(_0x2becbf(0x1fd))/0x2)+-parseInt(_0x2becbf(0x205))/0x3+parseInt(_0x2becbf(0x1b1))/0x4*(-parseInt(_0x2becbf(0x1b9))/0x5)+parseInt(_0x2becbf(0x1c2))/0x6+-parseInt(_0x2becbf(0x1c1))/0x7*(parseInt(_0x2becbf(0x1eb))/0x8)+parseInt(_0x2becbf(0x209))/0x9+parseInt(_0x2becbf(0x201))/0xa*(parseInt(_0x2becbf(0x1d6))/0xb);if(_0x429a5c===_0x3765c9)break;else _0x1bd103['push'](_0x1bd103['shift']());}catch(_0x56f7c1){_0x1bd103['push'](_0x1bd103['shift']());}}}(a128_0x30b7,0xba37a));import a128_0x3887b4 from'path';import a128_0x2c3e17 from'fs';import a128_0x4d4a23 from'chalk';import a128_0x4e194b from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';function a128_0x8c2f(_0x2e6123,_0x2bddc4){_0x2e6123=_0x2e6123-0x1ae;const _0x30b71b=a128_0x30b7();let _0x8c2ff0=_0x30b71b[_0x2e6123];return _0x8c2ff0;}import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';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(_0x38a9b3){const _0x11993c=a128_0x8c2f,_0x533f65=await checkCliVersion();(_0x533f65[_0x11993c(0x1fb)]||_0x533f65['belowMinimum'])&&(printCliUpgradeWarning(_0x533f65),assertCliVersionSupported(_0x533f65),logger[_0x11993c(0x1cd)](_0x11993c(0x1e1),'CLI\x20版本检查',{'currentVersion':_0x533f65[_0x11993c(0x1e4)],'stableVersion':_0x533f65[_0x11993c(0x1ff)],'minimumVersion':_0x533f65['minimumVersion'],'needsUpgrade':_0x533f65[_0x11993c(0x1fb)],'belowMinimum':_0x533f65[_0x11993c(0x1f0)]}));if(_0x38a9b3[_0x11993c(0x1f1)]&&_0x38a9b3[_0x11993c(0x1cc)])await runCreate({'projectName':_0x38a9b3['projectCode'],'appCode':_0x38a9b3[_0x11993c(0x1cc)],'env':_0x38a9b3[_0x11993c(0x1b2)]},_0x38a9b3);else{if(_0x38a9b3['projectCode']){const _0x113161=await selectSingleAppcode(_0x38a9b3['cookie']);await runCreate({'projectName':_0x38a9b3[_0x11993c(0x1f1)],'appCode':_0x113161||undefined,'env':_0x38a9b3[_0x11993c(0x1b2)]},_0x38a9b3);}else await guidedCreateProject(_0x589980=>runCreate(_0x589980,_0x38a9b3),_0x38a9b3[_0x11993c(0x1b2)],_0x38a9b3[_0x11993c(0x1ca)]);}}async function runCreate(_0x3f10d6,_0x509953){const _0x3ed9b8=a128_0x8c2f;if(!_0x3f10d6[_0x3ed9b8(0x1af)]||_0x3f10d6[_0x3ed9b8(0x1af)]['trim']()==='')throw new Error(_0x3ed9b8(0x1f2));const _0x48ddf0=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x48ddf0[_0x3ed9b8(0x1b3)](_0x3f10d6['projectName']))throw new Error('Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x3f10d6['projectName'][_0x3ed9b8(0x203)]>0x64)throw new Error(_0x3ed9b8(0x1ae));const _0x56124e=a128_0x3887b4[_0x3ed9b8(0x1d8)](process[_0x3ed9b8(0x1e2)](),_0x3f10d6['projectName']);if(a128_0x2c3e17[_0x3ed9b8(0x1cb)](_0x56124e))throw new Error(_0x3ed9b8(0x1d1)+_0x3f10d6['projectName']+'\x20already\x20exists');try{a128_0x2c3e17[_0x3ed9b8(0x1ee)](a128_0x3887b4['dirname'](_0x56124e),a128_0x2c3e17[_0x3ed9b8(0x1b0)][_0x3ed9b8(0x202)]);}catch{throw new Error(_0x3ed9b8(0x1c0));}logger[_0x3ed9b8(0x1c5)](_0x56124e),logger[_0x3ed9b8(0x1cd)](_0x3ed9b8(0x1e1),_0x3ed9b8(0x1f6)+_0x3f10d6[_0x3ed9b8(0x1af)],{'projectDir':_0x56124e,'appCode':_0x3f10d6[_0x3ed9b8(0x1cc)]}),console[_0x3ed9b8(0x1ba)](),console['log'](a128_0x4d4a23[_0x3ed9b8(0x1e3)]('\x20√\x20')+'Project\x20name:\x20'+a128_0x4d4a23[_0x3ed9b8(0x1e3)](_0x3f10d6['projectName'])+(_0x3f10d6[_0x3ed9b8(0x1cc)]?'\x20|\x20AppCode:\x20'+a128_0x4d4a23[_0x3ed9b8(0x1ed)](_0x3f10d6[_0x3ed9b8(0x1cc)]):''));try{await runTask(_0x3ed9b8(0x1d4),()=>copyProjectTemplate(_0x3f10d6[_0x3ed9b8(0x1af)])),await updatePackageJsonName(_0x3f10d6[_0x3ed9b8(0x1af)]),await runTask(_0x3ed9b8(0x1b4),()=>installDependencies(_0x3f10d6[_0x3ed9b8(0x1af)])),await runTask(_0x3ed9b8(0x1f5),()=>formatProjectCode(_0x3f10d6[_0x3ed9b8(0x1af)])),await configureAppCode(_0x3f10d6[_0x3ed9b8(0x1af)],_0x3f10d6['appCode']||'',_0x3f10d6[_0x3ed9b8(0x1b2)]);let _0x360915=![];if(_0x3f10d6[_0x3ed9b8(0x1cc)]){console[_0x3ed9b8(0x1ba)](_0x3ed9b8(0x1db));const _0x5c4f89=process[_0x3ed9b8(0x1e2)]();try{process['chdir'](_0x56124e);const _0x33b27c=_0x3f10d6['env']||_0x3ed9b8(0x1b6);initEnv(_0x33b27c);const {configArray:_0x7ca40d}=await fetchModelList(_0x3f10d6[_0x3ed9b8(0x1cc)],_0x509953[_0x3ed9b8(0x1ca)]||''),_0x136843=DEFAULT_API_DIR,_0x5ee929=await generateApiFile(_0x7ca40d,'',_0x3f10d6[_0x3ed9b8(0x1cc)],!![],_0x33b27c,_0x136843);console['log'](_0x3ed9b8(0x1c9)+_0x7ca40d[_0x3ed9b8(0x203)]+_0x3ed9b8(0x208)+_0x5ee929[_0x3ed9b8(0x1de)]+_0x3ed9b8(0x1c4)),logger['info']('create','API\x20configuration\x20pulled:\x20'+_0x3f10d6[_0x3ed9b8(0x1cc)]);}catch(_0x1d9c92){_0x360915=!![],console[_0x3ed9b8(0x1ba)](_0x3ed9b8(0x1c3)),logger[_0x3ed9b8(0x1fe)](_0x3ed9b8(0x1e1),_0x3ed9b8(0x206),{'error':_0x1d9c92 instanceof Error?_0x1d9c92['message']:String(_0x1d9c92)});}finally{process[_0x3ed9b8(0x1f7)](_0x5c4f89);}}logger[_0x3ed9b8(0x20b)](_0x3ed9b8(0x1e1),_0x3ed9b8(0x1d9)+_0x3f10d6[_0x3ed9b8(0x1af)]),console[_0x3ed9b8(0x1ba)](),console[_0x3ed9b8(0x1ba)](a128_0x4d4a23[_0x3ed9b8(0x1e3)]('─'['repeat'](0x3c))),console[_0x3ed9b8(0x1ba)](a128_0x4d4a23[_0x3ed9b8(0x1ed)][_0x3ed9b8(0x1e6)](_0x3ed9b8(0x1b8))),console[_0x3ed9b8(0x1ba)](),console[_0x3ed9b8(0x1ba)](_0x3ed9b8(0x1e5)+a128_0x4d4a23[_0x3ed9b8(0x1ed)][_0x3ed9b8(0x1e6)](_0x3ed9b8(0x1d2)+_0x3f10d6[_0x3ed9b8(0x1af)]+_0x3ed9b8(0x1d5)+CLI_BIN_NAME+'\x20run\x20start')),_0x360915&&console[_0x3ed9b8(0x1ba)](_0x3ed9b8(0x1bc)+a128_0x4d4a23[_0x3ed9b8(0x1ed)][_0x3ed9b8(0x1e6)](CLI_BIN_NAME+_0x3ed9b8(0x200))),console[_0x3ed9b8(0x1ba)](a128_0x4d4a23['green']('─'[_0x3ed9b8(0x1fa)](0x3c)));}catch(_0x2e6539){logger[_0x3ed9b8(0x1f3)]('create',_0x3ed9b8(0x1f9)+_0x3f10d6[_0x3ed9b8(0x1af)],{'error':_0x2e6539 instanceof Error?_0x2e6539['message']:String(_0x2e6539)});try{a128_0x2c3e17[_0x3ed9b8(0x1cb)](_0x56124e)&&(console[_0x3ed9b8(0x1ba)](_0x3ed9b8(0x1bb)+_0x56124e),a128_0x2c3e17[_0x3ed9b8(0x1c6)](_0x56124e,{'recursive':!![],'force':!![]}));}catch{logger[_0x3ed9b8(0x1fe)](_0x3ed9b8(0x1e1),_0x3ed9b8(0x1df)+_0x56124e);}throw _0x2e6539;}}async function runTask(_0x23968e,_0x1db4c6){const _0x2693f6=a128_0x8c2f,_0x15929e=a128_0x4e194b(_0x23968e+_0x2693f6(0x1d0))['start']();try{const _0x20da12=await _0x1db4c6();_0x15929e[_0x2693f6(0x1bd)](),console[_0x2693f6(0x1ba)](''+a128_0x4d4a23[_0x2693f6(0x1e3)](_0x2693f6(0x20a))+_0x23968e+'\x20'+a128_0x4d4a23[_0x2693f6(0x1c7)]('['+_0x20da12+']'));}catch(_0x1e9c6e){_0x15929e[_0x2693f6(0x1d3)](_0x23968e);throw _0x1e9c6e;}}async function updatePackageJsonName(_0xfb59e){const _0x2774da=a128_0x8c2f,_0x23c7ac=a128_0x3887b4[_0x2774da(0x1d8)](process[_0x2774da(0x1e2)](),_0xfb59e),_0x3c564a=a128_0x3887b4[_0x2774da(0x1e8)](_0x23c7ac,'package.json');try{console[_0x2774da(0x1ba)]('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x5744fd=getRabetbaseCliPackageRoot(),_0xe9b82a=a128_0x3887b4[_0x2774da(0x1e8)](_0x5744fd,_0x2774da(0x1d7));let _0x2873d4=_0x2774da(0x1da);try{const _0xe4135b=JSON[_0x2774da(0x1ce)](a128_0x2c3e17[_0x2774da(0x1dc)](_0xe9b82a,_0x2774da(0x1be)));_0x2873d4=_0xe4135b[_0x2774da(0x1b5)]||_0x2774da(0x1da);}catch{}const _0xd82ebe=a128_0x2c3e17['readFileSync'](_0x3c564a,_0x2774da(0x1be)),_0xf00a78=JSON[_0x2774da(0x1ce)](_0xd82ebe);_0xf00a78[_0x2774da(0x207)]=_0xfb59e,_0xf00a78[_0x2774da(0x1ea)]=_0xfb59e+_0x2774da(0x1f8)+_0x2873d4,a128_0x2c3e17['writeFileSync'](_0x3c564a,JSON[_0x2774da(0x1e9)](_0xf00a78,null,0x2)+'\x0a',_0x2774da(0x1be)),console['log'](_0x2774da(0x1ef)+_0xfb59e),logger[_0x2774da(0x1cd)](_0x2774da(0x1e1),'更新\x20package.json\x20name');}catch(_0x265a51){logger['error']('create','更新\x20package.json\x20失败');throw _0x265a51;}}async function configureAppCode(_0x1e485f,_0x3414cc,_0x57dbf5){const _0xbfdae3=a128_0x8c2f,_0x24de86=a128_0x3887b4[_0xbfdae3(0x1d8)](process[_0xbfdae3(0x1e2)](),_0x1e485f),_0x4ad7c1=a128_0x3887b4[_0xbfdae3(0x1e8)](_0x24de86,NEW_CONFIG_NAME);try{_0x3414cc?console[_0xbfdae3(0x1ba)](_0xbfdae3(0x1e0)+_0x1e485f+':\x20'+_0x3414cc):console[_0xbfdae3(0x1ba)](_0xbfdae3(0x1fc)+_0x1e485f);const _0x148210=getRabetbaseCliPackageRoot(),_0x24f7a1=a128_0x3887b4['join'](_0x148210,_0xbfdae3(0x1d7));let _0x2190cc='1.0.0';try{const _0x25169c=JSON[_0xbfdae3(0x1ce)](a128_0x2c3e17[_0xbfdae3(0x1dc)](_0x24f7a1,_0xbfdae3(0x1be)));_0x2190cc=_0x25169c[_0xbfdae3(0x1b5)]||_0xbfdae3(0x1da);}catch{}const _0x4c8f88=readConfig(),_0x16a746=typeof _0x4c8f88['env']===_0xbfdae3(0x1f4)?_0x4c8f88[_0xbfdae3(0x1b2)]:undefined,_0x21c691={};for(const _0x2caa9b of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x4c8f88[_0x2caa9b]!=null)_0x21c691[_0x2caa9b]=_0x4c8f88[_0x2caa9b];}const _0x2584cd=buildCanonicalProjectConfig(_0x21c691,{'appCodes':_0x3414cc?[_0x3414cc]:[],'env':_0x57dbf5||_0x16a746||_0xbfdae3(0x1b6),'metadata':{'createdAt':new Date()[_0xbfdae3(0x1cf)](),'version':_0x2190cc}});writeConfigFile(_0x4ad7c1,_0x2584cd),_0x3414cc?console[_0xbfdae3(0x1ba)](_0xbfdae3(0x1b7)+Object['keys'](_0x2584cd['apps']||{})['join'](',\x20')+_0xbfdae3(0x204)+_0x2584cd[_0xbfdae3(0x1bf)]):console[_0xbfdae3(0x1ba)](_0xbfdae3(0x1ec)+CLI_BIN_NAME+_0xbfdae3(0x1c8)),logger['info'](_0xbfdae3(0x1e1),'配置应用AppCode:\x20'+_0x3414cc);}catch(_0x43fb37){logger[_0xbfdae3(0x1f3)]('create',_0xbfdae3(0x1dd));}}function a128_0x30b7(){const _0x565bf0=['7200060JdqHhj','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','\x20model(s)','setLogPath','rmSync','gray','\x20config\x20set\x20appcode\x20<app-code>\x27','√\x20Pulled\x20','cookie','existsSync','appCode','info','parse','toLocaleString','...','Project\x20directory\x20','cd\x20','fail','Copy\x20project\x20files','\x20&&\x20','3817803hAqFDa','package.json','resolve','项目创建完成:\x20','1.0.0','*\x20Pulling\x20API\x20configuration...','readFileSync','配置应用AppCode失败','modelCount','清理项目目录失败:\x20','*\x20Configuring\x20AppCode\x20for\x20project\x20','create','cwd','green','currentVersion','\x20\x201.\x20Start\x20project:\x20','bold','1106213tDhMfV','join','stringify','description','121744zfkGul','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','cyan','accessSync','√\x20package.json\x20updated:\x20name=','belowMinimum','projectCode','Project\x20name\x20cannot\x20be\x20empty','error','string','Format\x20code','开始创建项目:\x20','chdir','\x20Generated\x20by\x20rabetbase\x20cli\x20','项目创建失败:\x20','repeat','needsUpgrade','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','2QRrTAF','warn','stableVersion','\x20api\x20pull','10QyOjQG','W_OK','length','\x20|\x20Default:\x20','985755zhqcqw','API\x20配置拉取异常','name','\x20dataset(s),\x20generated\x20','9183924jwFgdf','\x20√\x20','success','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','projectName','constants','627692GKrSrE','env','test','Install\x20dependencies','version','production','√\x20Configuration\x20file\x20created,\x20Apps:\x20','🚀\x20Next\x20Steps:','5yDHhNl','log','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','\x20\x202.\x20Pull\x20API\x20configuration:\x20','stop','utf8','defaultApp','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','98ePHjsA'];a128_0x30b7=function(){return _0x565bf0;};return a128_0x30b7();}
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 +1 @@
1
- (function(_0x2622bb,_0x161c2a){const _0x520d95=a129_0x33af,_0x184a93=_0x2622bb();while(!![]){try{const _0x36c568=-parseInt(_0x520d95(0x1b2))/0x1+-parseInt(_0x520d95(0x180))/0x2*(-parseInt(_0x520d95(0x1af))/0x3)+parseInt(_0x520d95(0x184))/0x4+-parseInt(_0x520d95(0x1aa))/0x5*(parseInt(_0x520d95(0x191))/0x6)+-parseInt(_0x520d95(0x193))/0x7*(-parseInt(_0x520d95(0x1a6))/0x8)+-parseInt(_0x520d95(0x195))/0x9*(parseInt(_0x520d95(0x1a0))/0xa)+parseInt(_0x520d95(0x1a2))/0xb*(-parseInt(_0x520d95(0x1a3))/0xc);if(_0x36c568===_0x161c2a)break;else _0x184a93['push'](_0x184a93['shift']());}catch(_0xb58b5e){_0x184a93['push'](_0x184a93['shift']());}}}(a129_0x2e40,0x6dddf));import a129_0x17088c from'path';import a129_0x2ca5e1 from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../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';function a129_0x2e40(){const _0x36209e=['\x20\x20Installing\x20dependencies...','11BDGLjz','4596552vwiTOo','\x22\x20already\x20exists.','\x20\x20Pulling\x20API\x20configuration...','56VbBhrF','ignore','toLocaleString','W_OK','250gpOFqe','\x20\x20√\x20Configuration\x20file\x20created','package.json','resolve','join','1346784qSwelt','bun\x20run\x20format','validation','92523TfUVfw','belowMinimum','...','4OShvTc','bun','\x20dataset(s),\x20generated\x20','length','2125832hNzzDF','cwd','log','Check\x20directory\x20permissions.','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','env','trim','\x20model(s)','\x20\x20√\x20Code\x20formatted','\x20created\x20successfully!','writeFile','\x0a\x20\x20cd\x20','bun\x20--version','45978kqgxqm','\x20\x20√\x20package.json\x20updated','472234jVewCC','dirname','666GBtagd','constants','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','utf-8','Project\x20directory\x20\x22','production','\x20api\x20pull`\x20manually\x20later.','chdir','name','\x20\x20√\x20Project\x20template\x20created','modelCount','80110vqBMrJ'];a129_0x2e40=function(){return _0x36209e;};return a129_0x2e40();}import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);function a129_0x33af(_0x3dfd70,_0x8b9f7c){_0x3dfd70=_0x3dfd70-0x17f;const _0x2e40db=a129_0x2e40();let _0x33afa1=_0x2e40db[_0x3dfd70];return _0x33afa1;}export async function createProjectNonInteractive(_0x3c2425,_0x476f62,_0x363720,_0x3c8924){const _0x2421aa=a129_0x33af,_0x1ea9a9=await checkCliVersion();(_0x1ea9a9['needsUpgrade']||_0x1ea9a9[_0x2421aa(0x1b3)])&&(printCliUpgradeWarning(_0x1ea9a9),assertCliVersionSupported(_0x1ea9a9));if(!_0x3c2425||_0x3c2425[_0x2421aa(0x18a)]()==='')throw CliErrors['validation']('Project\x20name\x20cannot\x20be\x20empty.');const _0x4f620c=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x4f620c['test'](_0x3c2425))throw CliErrors[_0x2421aa(0x1b1)]('Project\x20name\x20contains\x20invalid\x20characters.','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x3c2425[_0x2421aa(0x183)]>0x64)throw CliErrors[_0x2421aa(0x1b1)](_0x2421aa(0x197));const _0x44dc10=a129_0x17088c['resolve'](process['cwd'](),_0x3c2425);if(existsSync(_0x44dc10))throw CliErrors['validation'](_0x2421aa(0x199)+_0x3c2425+_0x2421aa(0x1a4),'Use\x20a\x20different\x20project\x20name.');try{const _0x840bb3=a129_0x17088c[_0x2421aa(0x194)](_0x44dc10);await a129_0x2ca5e1['access'](_0x840bb3,a129_0x2ca5e1[_0x2421aa(0x196)][_0x2421aa(0x1a9)]);}catch{throw CliErrors[_0x2421aa(0x1b1)]('Cannot\x20create\x20project\x20in\x20current\x20directory.',_0x2421aa(0x187));}try{console[_0x2421aa(0x186)]('*\x20Creating\x20project\x20'+_0x3c2425+_0x2421aa(0x17f));const _0x42e979=getSubAppReactDemoTemplateDir();await copyDirectory(_0x42e979,_0x44dc10),console[_0x2421aa(0x186)](_0x2421aa(0x19e)),await updatePackageJsonName(_0x3c2425),console[_0x2421aa(0x186)](_0x2421aa(0x192)),console[_0x2421aa(0x186)](_0x2421aa(0x1a1)),console['log'](_0x2421aa(0x188)),await formatCode(_0x44dc10),console['log'](_0x2421aa(0x18c)),await configureProject(_0x3c2425,_0x363720,_0x476f62),console[_0x2421aa(0x186)](_0x2421aa(0x1ab)),_0x363720&&await pullApiConfig(_0x44dc10,_0x363720,_0x476f62,_0x3c8924),console[_0x2421aa(0x186)]('\x0a√\x20Project\x20'+_0x3c2425+_0x2421aa(0x18d)),console[_0x2421aa(0x186)](_0x2421aa(0x18f)+_0x3c2425),console[_0x2421aa(0x186)]('\x20\x20rabetbase\x20run\x20start\x0a');}catch(_0x832bde){try{existsSync(_0x44dc10)&&await a129_0x2ca5e1['rm'](_0x44dc10,{'recursive':!![],'force':!![]});}catch{}throw _0x832bde;}}async function updatePackageJsonName(_0x2c7c3a){const _0x34a6b3=a129_0x33af,_0x11f8ea=a129_0x17088c[_0x34a6b3(0x1ad)](process['cwd'](),_0x2c7c3a),_0x82b22e=a129_0x17088c[_0x34a6b3(0x1ae)](_0x11f8ea,_0x34a6b3(0x1ac)),_0x45eea9=await a129_0x2ca5e1['readFile'](_0x82b22e,_0x34a6b3(0x198)),_0x26c91b=JSON['parse'](_0x45eea9);_0x26c91b[_0x34a6b3(0x19d)]=_0x2c7c3a,_0x26c91b['description']='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a129_0x2ca5e1[_0x34a6b3(0x18e)](_0x82b22e,JSON['stringify'](_0x26c91b,null,0x2)+'\x0a');}function detectPackageManager(){const _0x2ca622=a129_0x33af;try{return execSync(_0x2ca622(0x190),{'stdio':_0x2ca622(0x1a7)}),_0x2ca622(0x181);}catch{return'npm';}}async function formatCode(_0x31599b){const _0x1c27b7=a129_0x33af;try{await execAsync(_0x1c27b7(0x1b0),{'cwd':_0x31599b});}catch{}}async function configureProject(_0x2670c8,_0x59b108,_0x5d3a96){const _0x2aed4a=a129_0x33af,_0x2cfd39=a129_0x17088c[_0x2aed4a(0x1ad)](process[_0x2aed4a(0x185)](),_0x2670c8),_0x86dd1a=a129_0x17088c[_0x2aed4a(0x1ae)](_0x2cfd39,NEW_CONFIG_NAME),_0x4a9fa3=readConfig(),_0x1420d8=typeof _0x4a9fa3[_0x2aed4a(0x189)]==='string'?_0x4a9fa3['env']:undefined,_0x1eb5c5={};for(const _0x4bdab6 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x4a9fa3[_0x4bdab6]!=null)_0x1eb5c5[_0x4bdab6]=_0x4a9fa3[_0x4bdab6];}const _0x29d6d8=buildCanonicalProjectConfig(_0x1eb5c5,{'appCodes':_0x59b108?[_0x59b108]:[],'env':_0x5d3a96||_0x1420d8||_0x2aed4a(0x19a),'metadata':{'createdAt':new Date()[_0x2aed4a(0x1a8)](),'version':getCliVersion()}});writeConfigFile(_0x86dd1a,_0x29d6d8);}async function pullApiConfig(_0x1a5d5a,_0x543d6e,_0x18edcd,_0x317823){const _0x351758=a129_0x33af,_0xfbc108=process[_0x351758(0x185)]();try{process['chdir'](_0x1a5d5a);const _0x4af6fa=_0x18edcd||_0x351758(0x19a);initEnv(_0x4af6fa),console[_0x351758(0x186)](_0x351758(0x1a5));const {configArray:_0x371fe9}=await fetchModelList(_0x543d6e,_0x317823||''),_0x56e33a=await generateApiFile(_0x371fe9,'',_0x543d6e,!![],_0x4af6fa,DEFAULT_API_DIR);console[_0x351758(0x186)]('\x20\x20√\x20Pulled\x20'+_0x371fe9[_0x351758(0x183)]+_0x351758(0x182)+_0x56e33a[_0x351758(0x19f)]+_0x351758(0x18b));}catch(_0x22919c){console[_0x351758(0x186)]('\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`'+CLI_BIN_NAME+_0x351758(0x19b));}finally{process[_0x351758(0x19c)](_0xfbc108);}}
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 +1 @@
1
- const a130_0x5b4727=a130_0x35f6;(function(_0x1c9e41,_0x377781){const _0x43821b=a130_0x35f6,_0xbb0ff6=_0x1c9e41();while(!![]){try{const _0x3b941b=-parseInt(_0x43821b(0xd4))/0x1+-parseInt(_0x43821b(0xcb))/0x2+parseInt(_0x43821b(0xd1))/0x3*(-parseInt(_0x43821b(0xcd))/0x4)+parseInt(_0x43821b(0xcf))/0x5+parseInt(_0x43821b(0xca))/0x6*(-parseInt(_0x43821b(0xd7))/0x7)+parseInt(_0x43821b(0xd0))/0x8*(-parseInt(_0x43821b(0xd5))/0x9)+parseInt(_0x43821b(0xce))/0xa;if(_0x3b941b===_0x377781)break;else _0xbb0ff6['push'](_0xbb0ff6['shift']());}catch(_0x129e21){_0xbb0ff6['push'](_0xbb0ff6['shift']());}}}(a130_0x4089,0x361d2));import a130_0x24ca6b from'node:path';import{fileURLToPath}from'node:url';function a130_0x4089(){const _0x51f017=['4041VkaURG','templates','../../../../','25389nvcHrr','18xVXsKd','resolve','7hJeIiu','dirname','1654998eUNaWw','132292SYOQdf','join','1220xCpZXD','11701110eIaozG','1048850CTkgID','1520112KZDgFq'];a130_0x4089=function(){return _0x51f017;};return a130_0x4089();}const __dirname=a130_0x24ca6b[a130_0x5b4727(0xc9)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x8d72aa=a130_0x5b4727;return a130_0x24ca6b[_0x8d72aa(0xd6)](__dirname,_0x8d72aa(0xd3));}function a130_0x35f6(_0x2e0c0b,_0x49f99b){_0x2e0c0b=_0x2e0c0b-0xc9;const _0x408994=a130_0x4089();let _0x35f65c=_0x408994[_0x2e0c0b];return _0x35f65c;}export function getSubAppReactDemoTemplateDir(){const _0x8af7b9=a130_0x5b4727;return a130_0x24ca6b[_0x8af7b9(0xcc)](getRabetbaseCliPackageRoot(),_0x8af7b9(0xd2),'projects','sub-app-react-demo');}
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 +1 @@
1
- function a131_0x2b86(_0x1ee947,_0x47ab9c){_0x1ee947=_0x1ee947-0x1ef;const _0x4d658b=a131_0x4d65();let _0x2b8650=_0x4d658b[_0x1ee947];return _0x2b8650;}(function(_0x27fabf,_0x550ba9){const _0xeee83b=a131_0x2b86,_0x2adfb4=_0x27fabf();while(!![]){try{const _0x1ae328=parseInt(_0xeee83b(0x1fa))/0x1+parseInt(_0xeee83b(0x1f7))/0x2*(parseInt(_0xeee83b(0x1f6))/0x3)+parseInt(_0xeee83b(0x200))/0x4*(parseInt(_0xeee83b(0x1f2))/0x5)+parseInt(_0xeee83b(0x1fd))/0x6*(parseInt(_0xeee83b(0x1f4))/0x7)+-parseInt(_0xeee83b(0x202))/0x8+parseInt(_0xeee83b(0x1f8))/0x9*(-parseInt(_0xeee83b(0x1ef))/0xa)+-parseInt(_0xeee83b(0x1f3))/0xb*(parseInt(_0xeee83b(0x1f5))/0xc);if(_0x1ae328===_0x550ba9)break;else _0x2adfb4['push'](_0x2adfb4['shift']());}catch(_0x3fcf76){_0x2adfb4['push'](_0x2adfb4['shift']());}}}(a131_0x4d65,0x23153));import a131_0x241483 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_0x4d65(){const _0x31064c=['项目模板复制失败','18ftgIqj','项目模板复制完成','message','5812QEcvJM','now','139968mmqoiC','182010WJikfT','开始复制项目模板','cwd','655omIqqo','4492763woLJFP','314419MADgqb','12ditGOy','396783WySfkY','2HRsmKZ','27wGMHSY','success','166876PyiLDm','copy'];a131_0x4d65=function(){return _0x31064c;};return a131_0x4d65();}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x5221fb){const _0x58e7bb=a131_0x2b86,_0x47ac0d=Date[_0x58e7bb(0x201)](),_0x7bce25=a131_0x241483['resolve'](process[_0x58e7bb(0x1f1)](),_0x5221fb);try{logger['info'](_0x58e7bb(0x1fb),_0x58e7bb(0x1f0),{'projectCode':_0x5221fb,'templateDir':templateDir}),await copyDirectory(templateDir,_0x7bce25);const _0x18a8e6=Date[_0x58e7bb(0x201)]()-_0x47ac0d;logger[_0x58e7bb(0x1f9)](_0x58e7bb(0x1fb),_0x58e7bb(0x1fe),_0x18a8e6,{'projectCode':_0x5221fb});}catch(_0x37467d){const _0x3aa309=Date[_0x58e7bb(0x201)]()-_0x47ac0d;logger['error'](_0x58e7bb(0x1fb),_0x58e7bb(0x1fc),{'projectCode':_0x5221fb,'error':_0x37467d instanceof Error?_0x37467d[_0x58e7bb(0x1ff)]:String(_0x37467d),'duration':_0x3aa309});throw _0x37467d;}return formatElapsed(_0x47ac0d);}
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 +1 @@
1
- (function(_0x391fd8,_0x3a3bbd){const _0x4f12b9=a132_0x40db,_0x1066c1=_0x391fd8();while(!![]){try{const _0x5ee6c5=parseInt(_0x4f12b9(0xaf))/0x1+parseInt(_0x4f12b9(0xac))/0x2*(-parseInt(_0x4f12b9(0xa4))/0x3)+-parseInt(_0x4f12b9(0xb0))/0x4+parseInt(_0x4f12b9(0xa2))/0x5*(-parseInt(_0x4f12b9(0xa0))/0x6)+-parseInt(_0x4f12b9(0xa9))/0x7+-parseInt(_0x4f12b9(0xae))/0x8+-parseInt(_0x4f12b9(0xad))/0x9*(-parseInt(_0x4f12b9(0x9f))/0xa);if(_0x5ee6c5===_0x3a3bbd)break;else _0x1066c1['push'](_0x1066c1['shift']());}catch(_0x32edd6){_0x1066c1['push'](_0x1066c1['shift']());}}}(a132_0x1c3c,0xa5b85));import a132_0x3aae07 from'node:path';function a132_0x40db(_0x418179,_0x452fae){_0x418179=_0x418179-0x9d;const _0x1c3c09=a132_0x1c3c();let _0x40db80=_0x1c3c09[_0x418179];return _0x40db80;}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x3c8579){const _0x13b063=a132_0x40db,_0x699d88=Date[_0x13b063(0xa6)](),_0x5c85a5=a132_0x3aae07['resolve'](process[_0x13b063(0xa3)](),_0x3c8579);try{logger['info'](_0x13b063(0xa8),_0x13b063(0x9d),{'projectCode':_0x3c8579}),await execa(resolveNpmBin('npx'),[_0x13b063(0xaa),_0x13b063(0xa5),'.'],{'cwd':_0x5c85a5});const _0xf4383e=Date[_0x13b063(0xa6)]()-_0x699d88;logger[_0x13b063(0xab)](_0x13b063(0xa8),_0x13b063(0xa1),_0xf4383e,{'projectCode':_0x3c8579});}catch(_0x4f330f){const _0x2e7fd6=Date['now']()-_0x699d88;logger[_0x13b063(0x9e)](_0x13b063(0xa8),_0x13b063(0xa7),{'projectCode':_0x3c8579,'error':_0x4f330f instanceof Error?_0x4f330f['message']:String(_0x4f330f),'duration':_0x2e7fd6});throw _0x4f330f;}return formatElapsed(_0x699d88);}function a132_0x1c3c(){const _0x1bfd49=['开始格式化代码','error','10iiyzvf','6030BOiwYF','代码格式化完成','2840HbBesx','cwd','3225213yrpQxX','--write','now','代码格式化失败','format','1158885HebNwR','prettier','success','2KPgYxx','34871049CVWPqK','8428592INDhhz','594102unwSuX','3699336jQYYxN'];a132_0x1c3c=function(){return _0x1bfd49;};return a132_0x1c3c();}
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 +1 @@
1
- (function(_0x134e08,_0x32ab10){const _0x462e69=a133_0x2fcc,_0x56eb1f=_0x134e08();while(!![]){try{const _0x472d8b=parseInt(_0x462e69(0x85))/0x1*(parseInt(_0x462e69(0x84))/0x2)+-parseInt(_0x462e69(0x83))/0x3*(-parseInt(_0x462e69(0x7f))/0x4)+-parseInt(_0x462e69(0x81))/0x5*(-parseInt(_0x462e69(0x7b))/0x6)+-parseInt(_0x462e69(0x74))/0x7*(-parseInt(_0x462e69(0x89))/0x8)+parseInt(_0x462e69(0x7c))/0x9*(-parseInt(_0x462e69(0x79))/0xa)+-parseInt(_0x462e69(0x7e))/0xb*(parseInt(_0x462e69(0x80))/0xc)+-parseInt(_0x462e69(0x75))/0xd*(-parseInt(_0x462e69(0x82))/0xe);if(_0x472d8b===_0x32ab10)break;else _0x56eb1f['push'](_0x56eb1f['shift']());}catch(_0x2bee36){_0x56eb1f['push'](_0x56eb1f['shift']());}}}(a133_0x5072,0xc1faa));import a133_0x24f82f from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a133_0x2fcc(_0x8ae675,_0x13df6f){_0x8ae675=_0x8ae675-0x74;const _0x5072d7=a133_0x5072();let _0x2fcc89=_0x5072d7[_0x8ae675];return _0x2fcc89;}function a133_0x5072(){const _0x399966=['637266zygWsR','13UnPIOb','https://registry.npmmirror.com','cwd','message','1073590WrQMcG','info','477702ZtbChl','9WcABiu','success','11nFLKuY','848620OMLGrl','17989512vJSspe','55tcTXrx','6722044rVnYwE','3VcocSf','6cNRXVL','186607nWMckL','npm','resolve','now','24UiTuPF','install'];a133_0x5072=function(){return _0x399966;};return a133_0x5072();}import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x5bafc9){const _0x47ac3e=a133_0x2fcc,_0x30b224=Date['now'](),_0x5998ea=a133_0x24f82f[_0x47ac3e(0x87)](process[_0x47ac3e(0x77)](),_0x5bafc9);try{logger[_0x47ac3e(0x7a)](_0x47ac3e(0x8a),'开始安装依赖',{'projectCode':_0x5bafc9,'registry':_0x47ac3e(0x76)}),await execa(resolveNpmBin(_0x47ac3e(0x86)),[_0x47ac3e(0x8a),'--registry',_0x47ac3e(0x76)],{'cwd':_0x5998ea});const _0x58087f=Date['now']()-_0x30b224;logger[_0x47ac3e(0x7d)](_0x47ac3e(0x8a),'依赖安装完成',_0x58087f,{'projectCode':_0x5bafc9});}catch(_0x3b372a){const _0x28de61=Date[_0x47ac3e(0x88)]()-_0x30b224;logger['error']('install','依赖安装失败',{'projectCode':_0x5bafc9,'error':_0x3b372a instanceof Error?_0x3b372a[_0x47ac3e(0x78)]:String(_0x3b372a),'duration':_0x28de61});throw _0x3b372a;}return formatElapsed(_0x30b224);}
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 +1 @@
1
- const a134_0xb4391d=a134_0x4b6b;(function(_0x2ce082,_0x37dca1){const _0x160947=a134_0x4b6b,_0x284e1f=_0x2ce082();while(!![]){try{const _0x3c6f5c=parseInt(_0x160947(0x1f3))/0x1+-parseInt(_0x160947(0x1f5))/0x2*(-parseInt(_0x160947(0x1f7))/0x3)+parseInt(_0x160947(0x1f6))/0x4+-parseInt(_0x160947(0x1ff))/0x5*(parseInt(_0x160947(0x202))/0x6)+parseInt(_0x160947(0x203))/0x7+-parseInt(_0x160947(0x1e0))/0x8+parseInt(_0x160947(0x1e6))/0x9*(parseInt(_0x160947(0x1e5))/0xa);if(_0x3c6f5c===_0x37dca1)break;else _0x284e1f['push'](_0x284e1f['shift']());}catch(_0x64ca4b){_0x284e1f['push'](_0x284e1f['shift']());}}}(a134_0x2fa9,0x9d25a));function a134_0x2fa9(){const _0x5a893e=['Skip\x20confirmation\x20prompt','validation','585343FkNRbX','project-name','594938plHKsH','1129608TdAWiQ','3axdtua','Auto-confirm\x20prompts','project','Project\x20name','env','cookie','Create\x20a\x20new\x20project','Usage:\x20','5mdpRKu','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','args','6992274JjVAbj','1742503njcubm','appcode','init','\x20workspace\x20init','create','bool','78616oPJHmI','../../commands/project/create/main.js','upgrade','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','str','3370NDTgzb','10809zJwfdL','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','yes','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','boolean','name','nonInteractive','write','App\x20code\x20to\x20initialize','string','Target\x20environment'];a134_0x2fa9=function(){return _0x5a893e;};return a134_0x2fa9();}function a134_0x4b6b(_0xac114d,_0x5dc9ac){_0xac114d=_0xac114d-0x1db;const _0x2fa913=a134_0x2fa9();let _0x4b6bcb=_0x2fa913[_0xac114d];return _0x4b6bcb;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a134_0xb4391d(0x1db),'type':a134_0xb4391d(0x1ef),'description':a134_0xb4391d(0x1ee)},{'name':a134_0xb4391d(0x1fb),'type':a134_0xb4391d(0x1ef),'description':a134_0xb4391d(0x1f0)},{'name':a134_0xb4391d(0x1e8),'type':a134_0xb4391d(0x1ea),'description':a134_0xb4391d(0x1f8),'default':![]}],createFlags=[{'name':'name','type':'string','description':a134_0xb4391d(0x1fa)},{'name':a134_0xb4391d(0x1fb),'type':a134_0xb4391d(0x1ef),'description':a134_0xb4391d(0x1f0)},{'name':a134_0xb4391d(0x1db),'type':a134_0xb4391d(0x1ef),'description':a134_0xb4391d(0x1e7)}],upgradeFlags=[{'name':a134_0xb4391d(0x1e8),'type':a134_0xb4391d(0x1ea),'description':a134_0xb4391d(0x1f1),'default':![]}];export const projectDefinitions=[{'service':a134_0xb4391d(0x1f9),'command':a134_0xb4391d(0x1dc),'description':a134_0xb4391d(0x1e3),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a134_0xb4391d(0x1dd),'since':'2026-07'},'flags':initFlags,async 'execute'(_0x505849){const _0x52fd8e=a134_0xb4391d;return await initConfig({'appcode':_0x505849[_0x52fd8e(0x1e4)](_0x52fd8e(0x1db))||undefined,'env':_0x505849[_0x52fd8e(0x1e4)](_0x52fd8e(0x1fb))||undefined,'autoYes':_0x505849[_0x52fd8e(0x1df)]('yes')}),{'ok':!![]};}},{'service':'project','command':a134_0xb4391d(0x1de),'description':a134_0xb4391d(0x1fd),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a134_0xb4391d(0x1f4),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x585510){const _0x2edb83=a134_0xb4391d,{createApp:_0x15d7b2}=await import(_0x2edb83(0x1e1)),{createProjectNonInteractive:_0xc767b8}=await import('../../commands/project/create/non-interactive.js'),_0x1e8fa6=_0x585510['str'](_0x2edb83(0x1eb))['trim']()||_0x585510[_0x2edb83(0x201)][0x0]?.['trim'](),_0x37f92f=_0x585510['str']('env')||undefined,_0x57867f=_0x585510['str'](_0x2edb83(0x1db))||undefined;if(_0x585510[_0x2edb83(0x1ec)]){if(!_0x1e8fa6)throw CliErrors[_0x2edb83(0x1f2)]('Non-interactive\x20mode\x20requires\x20a\x20project\x20name.',_0x2edb83(0x1fe)+CLI_BIN_NAME+_0x2edb83(0x1e9));await _0xc767b8(_0x1e8fa6,_0x37f92f,_0x57867f,_0x585510[_0x2edb83(0x1fc)]);}else await _0x15d7b2({'projectCode':_0x1e8fa6,'appCode':_0x57867f,'env':_0x37f92f,'cookie':_0x585510['cookie']});return{'ok':!![]};}},{'service':a134_0xb4391d(0x1f9),'command':a134_0xb4391d(0x1e2),'description':a134_0xb4391d(0x200),'risk':a134_0xb4391d(0x1ed),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x393ad6){const _0xbddb1c=a134_0xb4391d;return await upgradeApp(_0x393ad6[_0xbddb1c(0x1ec)],{'yes':_0x393ad6[_0xbddb1c(0x1df)](_0xbddb1c(0x1e8))}),{'ok':!![]};}}];
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 +1 @@
1
- (function(_0x1b237e,_0x2799f1){const _0x4fafc9=a135_0x13d6,_0x57d2e0=_0x1b237e();while(!![]){try{const _0x4dcf8d=parseInt(_0x4fafc9(0x131))/0x1*(-parseInt(_0x4fafc9(0x128))/0x2)+parseInt(_0x4fafc9(0x122))/0x3+-parseInt(_0x4fafc9(0x14d))/0x4+parseInt(_0x4fafc9(0x13a))/0x5*(-parseInt(_0x4fafc9(0x129))/0x6)+-parseInt(_0x4fafc9(0x136))/0x7*(parseInt(_0x4fafc9(0x150))/0x8)+parseInt(_0x4fafc9(0x159))/0x9*(parseInt(_0x4fafc9(0x132))/0xa)+-parseInt(_0x4fafc9(0x151))/0xb*(-parseInt(_0x4fafc9(0x121))/0xc);if(_0x4dcf8d===_0x2799f1)break;else _0x57d2e0['push'](_0x57d2e0['shift']());}catch(_0x55ff56){_0x57d2e0['push'](_0x57d2e0['shift']());}}}(a135_0x5d43,0xd2300));import{readFileSync,existsSync,renameSync}from'node:fs';function a135_0x5d43(){const _0x5e74da=['\x20\x20appcode:\x20','1.0.0','201661kxAEYM','30AbAUpA','?\x20(Old\x20file\x20→\x20*.bak)','../..','Invalid\x20App\x20Code','553dxcBEN','trim','keys','Migration\x20cancelled.\x20Run\x20`','193805DyNJyZ','package.json','Please\x20enter\x20App\x20Code:','\x20api\x20generate\x27\x20and\x20\x27','cyan','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','parse','.bak','defaultApp','✓\x20Upgraded\x20','log','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','App\x20Code\x20cannot\x20be\x20empty','.rabetbase.json','yellow','version','string','\x20\x20Apps:\x20','setLogPath','816432xVrJLz','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','app','27592WwNKKQ','187zOewmC','从旧配置文件升级成功','toLocaleString','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','gray','green','production','\x20workspace\x20init`\x20to\x20start\x20fresh.','3597651AQlDDf','926268tqufsB','2317506JUJrTq','info','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','\x20→\x20.rabetbase.json','utf8','\x20\x20Default:\x20','12RisXhC','114nOxPXh','appcode','bold','初始化项目配置文件成功','env','init'];a135_0x5d43=function(){return _0x5e74da;};return a135_0x5d43();}import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';function a135_0x13d6(_0x3bda06,_0x38eaee){_0x3bda06=_0x3bda06-0x121;const _0x5d43de=a135_0x5d43();let _0x13d666=_0x5d43de[_0x3bda06];return _0x13d666;}import a135_0x455752 from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../../context.js';import{validateAppcode}from'../../commands/common/validate.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x8c5bd0){const _0x35112e=a135_0x13d6,{appcode:_0x1cecf0,env:_0x76a681,autoYes:_0x4406b6}=_0x8c5bd0,_0x57c3ac=process['cwd']();if(getProjectConfigPath())throw new Error(_0x35112e(0x154));let _0x3f59e4;for(const _0x3f0698 of LEGACY_CONFIG_NAMES){const _0x2a6517=resolve(_0x57c3ac,_0x3f0698);if(existsSync(_0x2a6517)){_0x3f59e4=_0x2a6517;break;}}if(_0x3f59e4){let _0x1f0822={};try{_0x1f0822=JSON[_0x35112e(0x140)](readFileSync(_0x3f59e4,_0x35112e(0x126)));}catch{}const _0x4e9a4c=basename(_0x3f59e4),_0xbce21=_0x1f0822?.['appcode']||_0x1f0822?.[_0x35112e(0x14f)];let _0x2b3d83=_0x4406b6;!_0x4406b6&&(console[_0x35112e(0x144)](a135_0x455752[_0x35112e(0x148)](_0x35112e(0x145)+a135_0x455752['bold'](_0x4e9a4c))),_0xbce21&&console[_0x35112e(0x144)](a135_0x455752['cyan'](_0x35112e(0x12f)+_0xbce21)),_0x2b3d83=await confirm({'message':'Upgrade\x20it\x20to\x20'+a135_0x455752[_0x35112e(0x12b)](_0x35112e(0x147))+_0x35112e(0x133),'default':!![]}));if(!_0x2b3d83){console[_0x35112e(0x144)](_0x35112e(0x139)+CLI_BIN_NAME+_0x35112e(0x158));return;}const _0x896947=resolve(_0x57c3ac,NEW_CONFIG_NAME),_0x3e8b80=getCliVersionFromPkg(),_0x268e4e=readRawConfig(),_0x3dc803=_0x1cecf0||(typeof _0x1f0822?.[_0x35112e(0x12a)]===_0x35112e(0x14a)?_0x1f0822[_0x35112e(0x12a)]:undefined)||(typeof _0x1f0822?.[_0x35112e(0x14f)]===_0x35112e(0x14a)?_0x1f0822[_0x35112e(0x14f)]:undefined)||await askAppcode(),_0x291595=typeof _0x1f0822?.[_0x35112e(0x12d)]==='string'?_0x1f0822['env']:typeof _0x268e4e['env']===_0x35112e(0x14a)?_0x268e4e['env']:_0x35112e(0x157),_0xf7bbd2=buildCanonicalProjectConfig({..._0x268e4e,..._0x1f0822},{'appCodes':[_0x3dc803],'env':_0x291595,'metadata':{'version':_0x3e8b80,'migratedAt':new Date()[_0x35112e(0x153)](),'migratedFrom':_0x3f59e4}});writeConfigFile(_0x896947,_0xf7bbd2);const _0x24e91f=_0x3f59e4+_0x35112e(0x141);renameSync(_0x3f59e4,_0x24e91f),logger[_0x35112e(0x14c)](_0x57c3ac),logger[_0x35112e(0x123)]('init',_0x35112e(0x152),{'from':_0x3f59e4,'to':_0x896947,'appcode':_0x3dc803,'env':_0xf7bbd2['env']}),console['log'](a135_0x455752[_0x35112e(0x156)](_0x35112e(0x143)+_0x4e9a4c+_0x35112e(0x125))),console['log'](a135_0x455752[_0x35112e(0x13e)](_0x35112e(0x14b)+Object[_0x35112e(0x138)](_0xf7bbd2['apps']||{})['join'](',\x20'))),console[_0x35112e(0x144)](a135_0x455752['cyan'](_0x35112e(0x127)+_0xf7bbd2[_0x35112e(0x142)])),console['log'](a135_0x455752[_0x35112e(0x155)](_0x35112e(0x14e)+_0x4e9a4c+_0x35112e(0x141)));return;}const _0x247795=_0x1cecf0||await askAppcode(),_0x202667=resolve(_0x57c3ac,NEW_CONFIG_NAME),_0x54607e=getCliVersionFromPkg(),_0x570184=readRawConfig(),_0x1c355b=typeof _0x570184['env']===_0x35112e(0x14a)?_0x570184[_0x35112e(0x12d)]:undefined,_0x7226ab=buildCanonicalProjectConfig({},{'appCodes':[_0x247795],'env':_0x76a681||_0x1c355b||_0x35112e(0x157),'metadata':{'version':_0x54607e,'createdAt':new Date()[_0x35112e(0x153)]()}});writeConfigFile(_0x202667,_0x7226ab),logger[_0x35112e(0x14c)](_0x57c3ac),logger[_0x35112e(0x123)](_0x35112e(0x12e),_0x35112e(0x12c),{'appcode':_0x247795,'env':_0x7226ab['env'],'version':_0x7226ab[_0x35112e(0x149)],'configPath':_0x202667}),console[_0x35112e(0x144)](a135_0x455752['green'](_0x35112e(0x124))),console[_0x35112e(0x144)](a135_0x455752['cyan'](_0x35112e(0x14b)+Object[_0x35112e(0x138)](_0x7226ab['apps']||{})['join'](',\x20'))),console[_0x35112e(0x144)](a135_0x455752[_0x35112e(0x13e)](_0x35112e(0x127)+_0x7226ab[_0x35112e(0x142)])),console[_0x35112e(0x144)](_0x35112e(0x13f)+CLI_BIN_NAME+_0x35112e(0x13d)+CLI_BIN_NAME+'\x20api\x20pull\x27');}function askAppcode(){const _0x1edbad=a135_0x13d6;return input({'message':_0x1edbad(0x13c),'validate':_0x1e1d57=>{const _0x3c6244=_0x1edbad;if(!_0x1e1d57[_0x3c6244(0x137)]())return _0x3c6244(0x146);const {valid:_0xeeb5ea,message:_0x39e60c}=validateAppcode(_0x1e1d57[_0x3c6244(0x137)]());return _0xeeb5ea||_0x39e60c||_0x3c6244(0x135);}});}function getCliVersionFromPkg(){const _0x5122d1=a135_0x13d6;try{const _0xe4bc08=fileURLToPath(import.meta.url),_0x1216f2=resolve(dirname(_0xe4bc08),_0x5122d1(0x134)),_0x518ab2=JSON[_0x5122d1(0x140)](readFileSync(resolve(_0x1216f2,_0x5122d1(0x13b)),_0x5122d1(0x126)));return _0x518ab2['version']||'1.0.0';}catch{return _0x5122d1(0x130);}}
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 +1 @@
1
- (function(_0x1c6e08,_0x36f892){const _0x1cdc9e=a136_0x3f03,_0x576a12=_0x1c6e08();while(!![]){try{const _0x15c209=-parseInt(_0x1cdc9e(0x79))/0x1*(parseInt(_0x1cdc9e(0x8c))/0x2)+-parseInt(_0x1cdc9e(0xd0))/0x3+-parseInt(_0x1cdc9e(0xc5))/0x4*(-parseInt(_0x1cdc9e(0x7c))/0x5)+-parseInt(_0x1cdc9e(0xe5))/0x6*(-parseInt(_0x1cdc9e(0x86))/0x7)+parseInt(_0x1cdc9e(0x8a))/0x8+-parseInt(_0x1cdc9e(0x8e))/0x9+-parseInt(_0x1cdc9e(0x7e))/0xa;if(_0x15c209===_0x36f892)break;else _0x576a12['push'](_0x576a12['shift']());}catch(_0x458551){_0x576a12['push'](_0x576a12['shift']());}}}(a136_0x1fc7,0xc04a3));function a136_0x1fc7(){const _0x51ce5d=['No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','white','cyan','stringify','not\x20needed','done','329464FUyqIp','inherit','lovrabet/rabetbase\x20installed\x20globally','args','@lovrabet/sdk','[\x22@lovrabet/sdk\x22]:\x20','Remove\x20.lovrabet/','Upgrade\x20cancelled.','isArray','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','2222925SwngmE','hasNewConfig','some','\x20\x20New\x20config\x20(.rabetbase.json):\x20','Config\x20migration','\x20\x20bun\x20install','skipped','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','info','join','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','red','FOUND','bold','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','exit\x20','includes','removed\x20','parse','.cursor/mcp.json','oldMcpConfig','2262ldHRWu','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','Step\x204/7:\x20Cleaning\x20MCP\x20config...','Step\x206/7:\x20Installing\x20new\x20skill...','Proceed\x20with\x20upgrade?','\x20\x20Current\x20version\x20in\x20','\x20removed','MCP\x20config:','lovrabet/rabetbase','fields','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','error','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','label','@lovrabet/dataset-mcp-server','CANCEL','\x20→\x20','18KzoZjL','succeed','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','70czNxoA','green','1591170asdejy','oldPath','sdkUpgrade','configMigration','needsSkillSwap','\x20→\x20keys:\x20','not\x20found\x20(will\x20create)','\x20removed\x20(','1421tZihtj','start','@lovrabet/sdk:','yellow','5295824BJDoXl','\x20\x20Step\x20','22570KMdwpH','log','7128qmfSGe','path','latest','Step\x201/7:\x20Migrating\x20config...','status','push','Clean\x20MCP\x20config','\x20→\x20latest','message','detail','keys','Remove\x20legacy\x20artifacts','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','\x20\x20Fields\x20to\x20migrate:\x20','cwd','Upgrade\x20@lovrabet/sdk','undefined','mcpServers','failed','Install\x20new\x20skill','needed','files','object','oldArtifacts','Step\x205/7:\x20Removing\x20old\x20skill...','gray','no\x20legacy\x20entry','Config\x20file:','step','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','\x20\x20npm\x20install','\x20(backup:\x20','Legacy\x20artifacts:','none\x20found','===\x20Upgrade\x20Summary\x20===','lovrabet/lovrabet-skill\x20removed','string','.claude/skills/lovrabet','length','isDirectory','entries','fail','\x20\x20Action:\x20delete','\x20\x20\x20\x20\x20\x20\x20','.bak','no\x20matching\x20entry\x20found','skipped\x20(no\x20legacy\x20config)','utf8','===\x20Upgrade\x20Analysis\x20==='];a136_0x1fc7=function(){return _0x51ce5d;};return a136_0x1fc7();}import a136_0x4a64f5 from'chalk';import a136_0x22ad8a 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';function a136_0x3f03(_0xa3406c,_0x1dc279){_0xa3406c=_0xa3406c-0x6c;const _0x1fc7e2=a136_0x1fc7();let _0x3f0303=_0x1fc7e2[_0xa3406c];return _0x3f0303;}import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0x59d448=>_0x59d448!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x224b99){const _0x8ede2d=a136_0x3f03,_0x30a4e7=[];for(const _0x55048e of Object['values'](CORE_IDE_CONFIGS)){if(_0x55048e[_0x8ede2d(0xa3)])for(const _0x4c23e7 of _0x55048e['files']){_0x30a4e7['push'](resolve(_0x224b99,_0x4c23e7[_0x8ede2d(0x8f)]));}}return _0x30a4e7;}function analyse(_0x3d7a63){const _0xa1c99=a136_0x3f03;let _0x253b3d=null;const _0x3f01fd=resolve(_0x3d7a63,NEW_CONFIG_NAME),_0x3bef79=existsSync(_0x3f01fd);for(const _0x2c7659 of LEGACY_CONFIG_NAMES){const _0x407db7=resolve(_0x3d7a63,_0x2c7659);if(existsSync(_0x407db7)){const _0x1306e1=readConfigFile(_0x407db7),_0x4b98ff=Object[_0xa1c99(0x98)](_0x1306e1)['filter'](_0x29aec1=>typeof _0x1306e1[_0x29aec1]!==_0xa1c99(0x9e));_0x253b3d={'oldPath':_0x407db7,'hasNewConfig':_0x3bef79,'fields':_0x4b98ff};break;}}const _0x22956c=[],_0x1f50ae=resolve(_0x3d7a63,'.lovrabet');if(existsSync(_0x1f50ae))_0x22956c['push'](_0x1f50ae);const _0x338658=resolve(_0x3d7a63,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x338658))_0x22956c[_0xa1c99(0x93)](_0x338658);const _0x3a0f8a=resolve(_0x3d7a63,_0xa1c99(0xb3));if(existsSync(_0x3a0f8a))_0x22956c[_0xa1c99(0x93)](_0x3a0f8a);for(const _0x327e02 of collectIdeSkillFiles(_0x3d7a63)){if(existsSync(_0x327e02))_0x22956c['push'](_0x327e02);}let _0x33bc55=null;const _0x352ee1=resolve(_0x3d7a63,_0xa1c99(0xe3));if(existsSync(_0x352ee1))try{const _0x485a13=JSON[_0xa1c99(0xe2)](readFileSync(_0x352ee1,'utf8'));if(_0x485a13?.['mcpServers']&&typeof _0x485a13['mcpServers']===_0xa1c99(0xa4)){const _0x2ee421=[];for(const [_0x490190,_0x27d01c]of Object[_0xa1c99(0xb6)](_0x485a13[_0xa1c99(0x9f)])){const _0x4b233d=_0x27d01c;_0x4b233d?.['args']&&Array['isArray'](_0x4b233d['args'])&&_0x4b233d[_0xa1c99(0xc8)][_0xa1c99(0xd2)](_0x4c9693=>typeof _0x4c9693==='string'&&_0x4c9693[_0xa1c99(0xe0)](_0xa1c99(0x76)))&&_0x2ee421['push'](_0x490190);}_0x2ee421['length']>0x0&&(_0x33bc55={'path':_0x352ee1,'keys':_0x2ee421});}}catch{}const _0x1cdaec=_0x22956c[_0xa1c99(0xb4)]>0x0||_0x253b3d!==null;let _0x13b029=null;const _0x249e50=resolve(_0x3d7a63,'package.json');if(existsSync(_0x249e50))try{const _0x8b1dc3=JSON[_0xa1c99(0xe2)](readFileSync(_0x249e50,_0xa1c99(0xbd)));for(const _0x162ca6 of['dependencies','devDependencies']){const _0x2d0d35=_0x8b1dc3?.[_0x162ca6]?.[_0xa1c99(0xc9)];if(typeof _0x2d0d35===_0xa1c99(0xb2)){_0x2d0d35!=='latest'&&(_0x13b029={'pkgPath':_0x249e50,'currentVersion':_0x2d0d35,'field':_0x162ca6});break;}}}catch{}return{'configMigration':_0x253b3d,'oldArtifacts':_0x22956c,'oldMcpConfig':_0x33bc55,'needsSkillSwap':_0x1cdaec,'sdkUpgrade':_0x13b029};}function printReport(_0x1500b8){const _0x21ee17=a136_0x3f03,{configMigration:_0x4b27d5,oldArtifacts:_0xadc18,oldMcpConfig:_0x16c409,needsSkillSwap:_0x41be5d}=_0x1500b8;console[_0x21ee17(0x8d)](''),console[_0x21ee17(0x8d)](a136_0x4a64f5[_0x21ee17(0xdd)](_0x21ee17(0xbe))),console[_0x21ee17(0x8d)]('');_0x4b27d5?(console[_0x21ee17(0x8d)](a136_0x4a64f5[_0x21ee17(0xc1)](_0x21ee17(0xa9))+('\x20\x20'+a136_0x4a64f5[_0x21ee17(0x89)](_0x4b27d5['oldPath']))),console[_0x21ee17(0x8d)](_0x21ee17(0xd3)+(_0x4b27d5[_0x21ee17(0xd1)]?a136_0x4a64f5['green']('already\x20exists\x20(will\x20merge)'):a136_0x4a64f5['gray'](_0x21ee17(0x84)))),console[_0x21ee17(0x8d)](_0x21ee17(0x9b)+_0x4b27d5[_0x21ee17(0x70)][_0x21ee17(0xd9)](',\x20')),console[_0x21ee17(0x8d)](_0x21ee17(0xab))):console['log'](a136_0x4a64f5['cyan'](_0x21ee17(0xa9))+'\x20\x20'+a136_0x4a64f5[_0x21ee17(0xa7)]('no\x20legacy\x20config\x20found'));console['log']('');if(_0xadc18['length']>0x0){console['log'](a136_0x4a64f5[_0x21ee17(0xc1)](_0x21ee17(0xae)));for(const _0x558b9b of _0xadc18){console[_0x21ee17(0x8d)]('\x20\x20'+a136_0x4a64f5[_0x21ee17(0xdb)](_0x21ee17(0xdc))+'\x20\x20'+_0x558b9b);}console[_0x21ee17(0x8d)](_0x21ee17(0xb8));}else console[_0x21ee17(0x8d)](a136_0x4a64f5[_0x21ee17(0xc1)](_0x21ee17(0xae))+'\x20\x20'+a136_0x4a64f5[_0x21ee17(0xa7)](_0x21ee17(0xaf)));console['log']('');_0x16c409?(console['log'](a136_0x4a64f5[_0x21ee17(0xc1)](_0x21ee17(0x6e))+('\x20\x20'+a136_0x4a64f5[_0x21ee17(0x89)](_0x16c409[_0x21ee17(0x8f)])+_0x21ee17(0x83)+_0x16c409[_0x21ee17(0x98)][_0x21ee17(0xd9)](',\x20'))),console['log'](_0x21ee17(0xde))):console[_0x21ee17(0x8d)](a136_0x4a64f5[_0x21ee17(0xc1)](_0x21ee17(0x6e))+'\x20\x20'+a136_0x4a64f5[_0x21ee17(0xa7)](_0x21ee17(0xa8)));console[_0x21ee17(0x8d)](''),console['log'](a136_0x4a64f5['cyan']('Skill\x20swap:')+('\x20\x20'+(_0x41be5d?a136_0x4a64f5['yellow'](_0x21ee17(0xa2)):a136_0x4a64f5[_0x21ee17(0x7d)](_0x21ee17(0xc3)))));_0x41be5d&&console['log'](_0x21ee17(0xce)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x21ee17(0x8d)]('');if(_0x1500b8[_0x21ee17(0x80)]){const {currentVersion:_0x50d141,field:_0x181fbd,pkgPath:_0x7119ad}=_0x1500b8[_0x21ee17(0x80)];console[_0x21ee17(0x8d)](a136_0x4a64f5[_0x21ee17(0xc1)](_0x21ee17(0x88))+('\x20\x20'+a136_0x4a64f5[_0x21ee17(0x89)](_0x7119ad))),console['log'](_0x21ee17(0x6c)+_0x181fbd+':\x20'+a136_0x4a64f5['yellow'](_0x50d141)+_0x21ee17(0x78)+a136_0x4a64f5[_0x21ee17(0x7d)](_0x21ee17(0x90))),console[_0x21ee17(0x8d)](_0x21ee17(0xd7));}else console['log'](a136_0x4a64f5[_0x21ee17(0xc1)](_0x21ee17(0x88))+'\x20\x20'+a136_0x4a64f5[_0x21ee17(0xa7)]('not\x20found\x20or\x20already\x20at\x20latest'));console[_0x21ee17(0x8d)]('');}function execConfigMigration(_0x44986d,_0x3b67dd){const _0x27d5db=a136_0x3f03,{configMigration:_0x403029}=_0x44986d;if(!_0x403029?.['oldPath'])return{'step':0x1,'label':_0x27d5db(0xd4),'ok':!![],'detail':_0x27d5db(0xbc)};const _0x5740d9=readConfigFile(_0x403029[_0x27d5db(0x7f)]),_0x229ba9=resolve(_0x3b67dd,NEW_CONFIG_NAME),_0x2dac1c=_0x403029[_0x27d5db(0xd1)]?readConfigFile(_0x229ba9):{};for(const [_0x1b58ea,_0x586176]of Object[_0x27d5db(0xb6)](_0x5740d9)){!(_0x1b58ea in _0x2dac1c)&&(_0x2dac1c[_0x1b58ea]=_0x586176);}writeConfigFile(_0x229ba9,_0x2dac1c);const _0x1ec85c=_0x403029[_0x27d5db(0x7f)]+_0x27d5db(0xba);return renameSync(_0x403029['oldPath'],_0x1ec85c),{'step':0x1,'label':_0x27d5db(0xd4),'ok':!![],'detail':_0x403029[_0x27d5db(0x7f)]+_0x27d5db(0x78)+_0x229ba9+_0x27d5db(0xad)+_0x1ec85c+')'};}function execRemoveOldArtifacts(_0x2216e3){const _0x5dc336=a136_0x3f03,_0x215f65=[];for(const _0x5ed12b of _0x2216e3){try{if(!existsSync(_0x5ed12b))continue;const _0x40343f=tryStat(_0x5ed12b);_0x40343f?.[_0x5dc336(0xb5)]()?rmSync(_0x5ed12b,{'recursive':!![],'force':!![]}):unlinkSync(_0x5ed12b);}catch(_0x4c4bc2){_0x215f65['push'](_0x5ed12b+':\x20'+_0x4c4bc2[_0x5dc336(0x96)]);}}return{'step':0x3,'label':_0x5dc336(0x99),'ok':_0x215f65['length']===0x0,'detail':_0x215f65[_0x5dc336(0xb4)]>0x0?_0x2216e3[_0x5dc336(0xb4)]-_0x215f65[_0x5dc336(0xb4)]+'/'+_0x2216e3[_0x5dc336(0xb4)]+_0x5dc336(0x85)+_0x215f65[_0x5dc336(0xd9)](';\x20')+')':_0x2216e3[_0x5dc336(0xb4)]+_0x5dc336(0x6d)};}function execCleanMcp(_0x54b726){const _0x27c595=a136_0x3f03;if(!_0x54b726[_0x27c595(0xe4)])return{'step':0x4,'label':_0x27c595(0x94),'ok':!![],'detail':_0x27c595(0xd6)};try{const _0x10e638=readFileSync(_0x54b726[_0x27c595(0xe4)][_0x27c595(0x8f)],_0x27c595(0xbd)),_0x22b2f5=JSON[_0x27c595(0xe2)](_0x10e638);if(_0x22b2f5?.[_0x27c595(0x9f)]&&typeof _0x22b2f5[_0x27c595(0x9f)]==='object'){const _0x548ba4=[];for(const [_0x3c2113,_0xe09019]of Object[_0x27c595(0xb6)](_0x22b2f5['mcpServers'])){_0xe09019?.[_0x27c595(0xc8)]&&Array[_0x27c595(0xcd)](_0xe09019[_0x27c595(0xc8)])&&_0xe09019[_0x27c595(0xc8)][_0x27c595(0xd2)](_0x81fc63=>typeof _0x81fc63==='string'&&_0x81fc63[_0x27c595(0xe0)](_0x27c595(0x76)))&&_0x548ba4[_0x27c595(0x93)](_0x3c2113);}for(const _0x383f46 of _0x548ba4){delete _0x22b2f5[_0x27c595(0x9f)][_0x383f46];}return _0x548ba4['length']>0x0&&writeFileSync(_0x54b726['oldMcpConfig']['path'],JSON[_0x27c595(0xc2)](_0x22b2f5,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':_0x27c595(0x94),'ok':!![],'detail':_0x27c595(0xe1)+_0x548ba4[_0x27c595(0xd9)](',\x20')+'\x20from\x20'+_0x54b726['oldMcpConfig'][_0x27c595(0x8f)]};}return{'step':0x4,'label':_0x27c595(0x94),'ok':!![],'detail':_0x27c595(0xbb)};}catch(_0x597a8e){return{'step':0x4,'label':_0x27c595(0x94),'ok':![],'detail':_0x597a8e[_0x27c595(0x96)]};}}function execSkillsRemove(_0x73fd43,_0x2618a5){const _0x74b6a1=a136_0x3f03,_0x6b5b3f=runNpxSkillsRemove(_0x73fd43,{'stdio':_0x74b6a1(0xc6),'yes':_0x2618a5});return{'step':0x5,'label':'Remove\x20old\x20skill','ok':_0x6b5b3f['ok'],'detail':_0x6b5b3f['ok']?_0x74b6a1(0xb1):_0x6b5b3f['error']??_0x74b6a1(0xdf)+_0x6b5b3f[_0x74b6a1(0x92)]};}function execSkillsAdd(_0x44706e,_0x4ae3fb){const _0x242d0c=a136_0x3f03,_0x2fa62f=runNpxSkillsAddGlobal(_0x44706e,_0x242d0c(0x6f),{'stdio':'inherit','yes':_0x4ae3fb});return{'step':0x6,'label':_0x242d0c(0xa1),'ok':_0x2fa62f['ok'],'detail':_0x2fa62f['ok']?_0x242d0c(0xc7):_0x2fa62f[_0x242d0c(0x72)]??_0x242d0c(0xdf)+_0x2fa62f['status']};}function execUpgradeSdk(_0x3fd3be){const _0xf9d79d=a136_0x3f03;if(!_0x3fd3be['sdkUpgrade'])return{'step':0x7,'label':_0xf9d79d(0x9d),'ok':!![],'detail':_0xf9d79d(0x71)};const {pkgPath:_0x4cbee7,currentVersion:_0x2cabd5,field:_0x423a09}=_0x3fd3be[_0xf9d79d(0x80)];try{const _0x30defa=readFileSync(_0x4cbee7,_0xf9d79d(0xbd)),_0x145880=JSON[_0xf9d79d(0xe2)](_0x30defa);return _0x145880[_0x423a09][_0xf9d79d(0xc9)]=_0xf9d79d(0x90),writeFileSync(_0x4cbee7,JSON[_0xf9d79d(0xc2)](_0x145880,null,0x2)+'\x0a','utf8'),{'step':0x7,'label':_0xf9d79d(0x9d),'ok':!![],'detail':_0x423a09+_0xf9d79d(0xca)+_0x2cabd5+_0xf9d79d(0x95)};}catch(_0x5695f5){return{'step':0x7,'label':_0xf9d79d(0x9d),'ok':![],'detail':_0x5695f5[_0xf9d79d(0x96)]};}}function tryStat(_0x236f56){try{return statSync(_0x236f56);}catch{return undefined;}}function printSummary(_0x238d99){const _0x1a9b45=a136_0x3f03;console[_0x1a9b45(0x8d)](''),console['log'](a136_0x4a64f5['bold'](_0x1a9b45(0xb0))),console[_0x1a9b45(0x8d)]('');for(const _0x26019c of _0x238d99){const _0x5a0638=_0x26019c['ok']?a136_0x4a64f5[_0x1a9b45(0x7d)]('OK'):a136_0x4a64f5[_0x1a9b45(0xdb)]('FAIL');console[_0x1a9b45(0x8d)]('\x20\x20'+_0x5a0638+_0x1a9b45(0x8b)+_0x26019c[_0x1a9b45(0xaa)]+':\x20'+_0x26019c[_0x1a9b45(0x75)]);if(_0x26019c['detail'])console['log'](_0x1a9b45(0xb9)+a136_0x4a64f5[_0x1a9b45(0xa7)](_0x26019c['detail']));}console[_0x1a9b45(0x8d)]('');}export async function upgradeApp(_0x17e281,_0x2a9c39){const _0x3aa96d=a136_0x3f03,_0x484e92=process[_0x3aa96d(0x9c)](),_0x721220=analyse(_0x484e92),_0x584fd4=!_0x721220[_0x3aa96d(0x81)]&&_0x721220[_0x3aa96d(0xa5)][_0x3aa96d(0xb4)]===0x0&&!_0x721220['oldMcpConfig']&&!_0x721220[_0x3aa96d(0x82)]&&!_0x721220[_0x3aa96d(0x80)];if(_0x584fd4){console[_0x3aa96d(0x8d)](a136_0x4a64f5[_0x3aa96d(0x7d)](_0x3aa96d(0xbf)));return;}printReport(_0x721220);const _0x33158e=!!(_0x2a9c39['yes']||_0x2a9c39['Y']||_0x17e281);if(!_0x33158e)try{const _0x17bb18=await askConfirm(_0x3aa96d(0xea));if(!_0x17bb18){console[_0x3aa96d(0x8d)](a136_0x4a64f5[_0x3aa96d(0xa7)]('Upgrade\x20cancelled.'));return;}}catch(_0x2ab837){if(_0x2ab837?.[_0x3aa96d(0x96)]===_0x3aa96d(0x77)){console[_0x3aa96d(0x8d)](a136_0x4a64f5['gray'](_0x3aa96d(0xcc)));return;}throw _0x2ab837;}const _0x113645=[],_0x5bb351=a136_0x22ad8a({'text':_0x3aa96d(0x91),'color':_0x3aa96d(0xc1)})[_0x3aa96d(0x87)](),_0x554782=execConfigMigration(_0x721220,_0x484e92);_0x113645['push'](_0x554782),_0x5bb351[_0x554782['ok']?_0x3aa96d(0x7a):_0x3aa96d(0xb7)]('Step\x201/7:\x20Config\x20migration\x20—\x20'+(_0x554782[_0x3aa96d(0x97)]??(_0x554782['ok']?'done':'failed')));const _0x22d164=resolve(_0x484e92,'.lovrabet'),_0xba2204=a136_0x22ad8a({'text':'Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','color':'cyan'})[_0x3aa96d(0x87)]();if(existsSync(_0x22d164))try{rmSync(_0x22d164,{'recursive':!![],'force':!![]}),_0xba2204[_0x3aa96d(0x7a)](_0x3aa96d(0x73)),_0x113645[_0x3aa96d(0x93)]({'step':0x2,'label':_0x3aa96d(0xcb),'ok':!![]});}catch(_0x219f5d){_0xba2204[_0x3aa96d(0xb7)]('Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0x219f5d[_0x3aa96d(0x96)]),_0x113645[_0x3aa96d(0x93)]({'step':0x2,'label':_0x3aa96d(0xcb),'ok':![],'detail':_0x219f5d['message']});}else _0xba2204[_0x3aa96d(0xd8)]('Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped'),_0x113645[_0x3aa96d(0x93)]({'step':0x2,'label':_0x3aa96d(0xcb),'ok':!![],'detail':_0x3aa96d(0xd6)});const _0x35720d=a136_0x22ad8a({'text':_0x3aa96d(0xe6),'color':_0x3aa96d(0xc1)})[_0x3aa96d(0x87)](),_0x2c440d=execRemoveOldArtifacts(_0x721220[_0x3aa96d(0xa5)]);_0x113645['push'](_0x2c440d),_0x35720d[_0x2c440d['ok']?_0x3aa96d(0x7a):_0x3aa96d(0xb7)](_0x3aa96d(0x9a)+(_0x2c440d[_0x3aa96d(0x97)]??(_0x2c440d['ok']?'done':_0x3aa96d(0xa0))));const _0x2249c2=a136_0x22ad8a({'text':_0x3aa96d(0xe8),'color':_0x3aa96d(0xc1)})[_0x3aa96d(0x87)](),_0x4996d6=execCleanMcp(_0x721220);_0x113645['push'](_0x4996d6),_0x2249c2[_0x4996d6['ok']?_0x3aa96d(0x7a):_0x3aa96d(0xb7)]('Step\x204/7:\x20MCP\x20config\x20—\x20'+(_0x4996d6['detail']??(_0x4996d6['ok']?_0x3aa96d(0xc4):_0x3aa96d(0xa0))));const _0x3ed1bd=a136_0x22ad8a({'text':_0x3aa96d(0xa6),'color':_0x3aa96d(0xc1)})[_0x3aa96d(0x87)](),_0x3b6bf5=execSkillsRemove(_0x484e92,_0x33158e);_0x113645[_0x3aa96d(0x93)](_0x3b6bf5),_0x3ed1bd[_0x3b6bf5['ok']?_0x3aa96d(0x7a):_0x3aa96d(0xb7)](_0x3aa96d(0xcf)+(_0x3b6bf5[_0x3aa96d(0x97)]??(_0x3b6bf5['ok']?'done':_0x3aa96d(0xa0))));const _0x3d8d32=a136_0x22ad8a({'text':_0x3aa96d(0xe9),'color':'cyan'})[_0x3aa96d(0x87)](),_0x3c82cc=execSkillsAdd(_0x484e92,_0x33158e);_0x113645[_0x3aa96d(0x93)](_0x3c82cc),_0x3d8d32[_0x3c82cc['ok']?_0x3aa96d(0x7a):'fail'](_0x3aa96d(0xda)+(_0x3c82cc[_0x3aa96d(0x97)]??(_0x3c82cc['ok']?_0x3aa96d(0xc4):_0x3aa96d(0xa0))));const _0xc6a4d9=a136_0x22ad8a({'text':_0x3aa96d(0x7b),'color':_0x3aa96d(0xc1)})['start'](),_0x20b237=execUpgradeSdk(_0x721220);_0x113645['push'](_0x20b237),_0xc6a4d9[_0x20b237['ok']?'succeed':'fail']('Step\x207/7:\x20@lovrabet/sdk\x20—\x20'+(_0x20b237['detail']??(_0x20b237['ok']?_0x3aa96d(0xc4):'failed'))),printSummary(_0x113645);const _0x59944b=_0x113645[_0x3aa96d(0xd2)](_0xce1a65=>!_0xce1a65['ok']);_0x59944b?console[_0x3aa96d(0x8d)](a136_0x4a64f5[_0x3aa96d(0x89)]('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console[_0x3aa96d(0x8d)](a136_0x4a64f5[_0x3aa96d(0x7d)]('Upgrade\x20completed\x20successfully!')),_0x20b237['ok']&&_0x721220[_0x3aa96d(0x80)]&&(console[_0x3aa96d(0x8d)](''),console[_0x3aa96d(0x8d)](a136_0x4a64f5[_0x3aa96d(0xdd)][_0x3aa96d(0xc1)](_0x3aa96d(0xe7))),console[_0x3aa96d(0x8d)](a136_0x4a64f5[_0x3aa96d(0xc1)](_0x3aa96d(0x74))),console[_0x3aa96d(0x8d)](''),console[_0x3aa96d(0x8d)](a136_0x4a64f5[_0x3aa96d(0xc0)](_0x3aa96d(0xac))),console['log'](a136_0x4a64f5['white']('\x20\x20#\x20or')),console[_0x3aa96d(0x8d)](a136_0x4a64f5[_0x3aa96d(0xc0)](_0x3aa96d(0xd5))),console[_0x3aa96d(0x8d)](''));}
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 +1 @@
1
- const a137_0xda408f=a137_0x30fa;(function(_0x5155db,_0x421637){const _0x562c08=a137_0x30fa,_0x469323=_0x5155db();while(!![]){try{const _0x213f27=parseInt(_0x562c08(0x1ed))/0x1+parseInt(_0x562c08(0x1ca))/0x2*(-parseInt(_0x562c08(0x1bd))/0x3)+parseInt(_0x562c08(0x1e9))/0x4+parseInt(_0x562c08(0x1f7))/0x5*(-parseInt(_0x562c08(0x1c7))/0x6)+-parseInt(_0x562c08(0x1f5))/0x7+parseInt(_0x562c08(0x1c5))/0x8+parseInt(_0x562c08(0x1e2))/0x9;if(_0x213f27===_0x421637)break;else _0x469323['push'](_0x469323['shift']());}catch(_0x1e7fd3){_0x469323['push'](_0x469323['shift']());}}}(a137_0x3f95,0x9a67d));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';function a137_0x3f95(){const _0x45e9bd=['map','496804lHiMco','auth','SQL\x20Queries','App\x20Management','CLI\x20Built-in\x20Skill','skills','read','values','6956432aHzhhO','push','1053355vlcTWS','Roles','Configuration','set','Menu','`\x20has\x20been\x20removed.','`rabetbase\x20','Smart\x20List\x20Pages','filter','project','Project','Logs','Instant\x20API','login','skill','27rQdMUE','create','Run\x20Scripts','install','\x20\x20[write]','build','has','Runtime\x20App\x20Config\x20Management','7067128cUUkgY','start','18qKsTzr','from','`rabetbase\x20app\x20use`\x20has\x20been\x20removed.','175082lMrcRJ','Platform\x20Issue','logout','description','`rabetbase\x20app\x20remote`\x20has\x20been\x20removed.','get','Dataset\x20&\x20Operations','BFF\x20Scripts','API\x20Development','commands','command','service','preview','`rabetbase\x20skills`\x20has\x20been\x20removed.','length','defaultCommand','use','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20instead.','Run\x20any\x20package.json\x20script','app\x20remote','Workspace','Use\x20`rabetbase\x20cli-skill\x20install`\x20to\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill.\x20To\x20install\x20business\x20Skills,\x20use\x20`lovrabet\x20skill\x20install`.','risk','hidden','10414728wHFhdQ','wildcardDef','app','Code\x20Generation','run','Authentication','remote','2034864Uodjfg','isSingleCommand','Permissions'];a137_0x3f95=function(){return _0x45e9bd;};return a137_0x3f95();}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';function a137_0x30fa(_0x238fff,_0x4e8134){_0x238fff=_0x238fff-0x1b2;const _0x3f9599=a137_0x3f95();let _0x30faa5=_0x3f9599[_0x238fff];return _0x30faa5;}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(_0x39a391){const _0x36bf97=a137_0x30fa;for(const _0x33faaf of _0x39a391){definitions[_0x36bf97(0x1fa)](_0x33faaf[_0x36bf97(0x1d5)]+':'+_0x33faaf[_0x36bf97(0x1d4)],_0x33faaf);let _0x28d666=serviceGroups[_0x36bf97(0x1cf)](_0x33faaf[_0x36bf97(0x1d5)]);!_0x28d666&&(_0x28d666=[],serviceGroups[_0x36bf97(0x1fa)](_0x33faaf[_0x36bf97(0x1d5)],_0x28d666)),_0x28d666[_0x36bf97(0x1f6)](_0x33faaf);}}function registerDeclarativeService(_0x4d0480,_0x381f49,_0x3a43e6){const _0x3b009a=a137_0x30fa;registerDefinitions(_0x381f49);_0x3a43e6?.[_0x3b009a(0x1e3)]&&registerDefinitions([_0x3a43e6[_0x3b009a(0x1e3)]]);const _0x3476a8=_0x2359be=>_0x2359be===_0x3b009a(0x1f3)?'':_0x2359be==='write'?_0x3b009a(0x1c1):'\x20\x20[high-risk-write]',_0x40e0f6={'service':_0x381f49[0x0][_0x3b009a(0x1d5)],'label':_0x4d0480,'commands':_0x381f49[_0x3b009a(0x1b6)](_0x1130e1=>!_0x1130e1[_0x3b009a(0x1e1)])[_0x3b009a(0x1ec)](_0x52cfd3=>({'command':_0x52cfd3[_0x3b009a(0x1d4)],'description':_0x52cfd3[_0x3b009a(0x1cd)],'tag':_0x3476a8(_0x52cfd3[_0x3b009a(0x1e0)])})),'declarative':!![],'defaultCommand':_0x3a43e6?.[_0x3b009a(0x1d9)]??(_0x3a43e6?.[_0x3b009a(0x1ea)]?_0x381f49[0x0][_0x3b009a(0x1d4)]:undefined),'wildcardDef':_0x3a43e6?.['wildcardDef'],'isSingleCommand':_0x3a43e6?.[_0x3b009a(0x1ea)]};serviceRegistry[_0x3b009a(0x1f6)](_0x40e0f6),serviceByName[_0x3b009a(0x1fa)](_0x40e0f6[_0x3b009a(0x1d5)],_0x40e0f6);}registerDeclarativeService('Quick\x20Start',initDefinitions,{'defaultCommand':a137_0xda408f(0x1e6),'isSingleCommand':!![]}),registerDeclarativeService(a137_0xda408f(0x1b8),projectDefinitions),registerDeclarativeService(a137_0xda408f(0x1de),workspaceDefinitions),registerDeclarativeService(a137_0xda408f(0x1f0),appDefinitions),registerDeclarativeService(a137_0xda408f(0x1e7),authDefinitions,{'defaultCommand':a137_0xda408f(0x1bb)}),registerDeclarativeService(a137_0xda408f(0x1d0),datasetDefinitions),registerDeclarativeService(a137_0xda408f(0x1b5),pageDefinitions),registerDeclarativeService(a137_0xda408f(0x1d2),apiDefinitions),registerDeclarativeService(a137_0xda408f(0x1ba),dataDefinitions),registerDeclarativeService(a137_0xda408f(0x1d1),bffDefinitions),registerDeclarativeService(a137_0xda408f(0x1ef),sqlDefinitions),registerDeclarativeService('Database\x20Connections',dbDefinitions),registerDeclarativeService(a137_0xda408f(0x1b2),menuDefinitions),registerDeclarativeService(a137_0xda408f(0x1f8),roleDefinitions),registerDeclarativeService(a137_0xda408f(0x1eb),permitDefinitions),registerDeclarativeService(a137_0xda408f(0x1c4),appConfigDefinitions),registerDeclarativeService(a137_0xda408f(0x1cb),issueDefinitions),registerDeclarativeService(a137_0xda408f(0x1e5),codegenDefinitions),registerDeclarativeService(a137_0xda408f(0x1f9),configDefinitions),registerDeclarativeService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a137_0xda408f(0x1f1),cliSkillDefinitions,{'defaultCommand':a137_0xda408f(0x1c0)}),registerDeclarativeService(a137_0xda408f(0x1b9),logsDefinitions,{'defaultCommand':'show'}),registerDeclarativeService(a137_0xda408f(0x1bf),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a137_0xda408f(0x1d8)]-0x1];last[a137_0xda408f(0x1d3)]=[{'command':'<script>','description':a137_0xda408f(0x1dc),'tag':''}];}export const deprecatedAliases={'create':{'service':a137_0xda408f(0x1b7),'command':a137_0xda408f(0x1be)},'start':{'service':a137_0xda408f(0x1e6),'command':a137_0xda408f(0x1c6)},'build':{'service':a137_0xda408f(0x1e6),'command':a137_0xda408f(0x1c2)},'preview':{'service':a137_0xda408f(0x1e6),'command':a137_0xda408f(0x1d6)},'logout':{'service':a137_0xda408f(0x1ee),'command':a137_0xda408f(0x1cc)}};const CLI_SKILL_INSTALL_REMOVED_HINT=a137_0xda408f(0x1df),APP_REMOTE_REMOVED_HINT=a137_0xda408f(0x1db),APP_USE_REMOVED_HINT='Use\x20`rabetbase\x20workspace\x20use\x20--app\x20<name>`\x20instead.';export function resolveRemovedCommand(_0x144f76,_0x11f488){const _0x1081d6=a137_0xda408f;if(_0x144f76==='skill'){const _0x9f65b4=_0x11f488?'skill\x20'+_0x11f488:_0x1081d6(0x1bc);return{'command':_0x9f65b4,'message':_0x1081d6(0x1b4)+_0x9f65b4+_0x1081d6(0x1b3),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};}if(_0x144f76==='skills')return{'command':_0x1081d6(0x1f2),'message':_0x1081d6(0x1d7),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};if(_0x144f76===_0x1081d6(0x1e4)&&_0x11f488===_0x1081d6(0x1e8))return{'command':_0x1081d6(0x1dd),'message':_0x1081d6(0x1ce),'hint':APP_REMOTE_REMOVED_HINT};if(_0x144f76==='app'&&_0x11f488===_0x1081d6(0x1da))return{'command':'app\x20use','message':_0x1081d6(0x1c9),'hint':APP_USE_REMOVED_HINT};return undefined;}export const deprecatedSubcommands={'bff':{'new':a137_0xda408f(0x1be)},'sql':{'new':a137_0xda408f(0x1be)}};export function resolveDeprecatedSubcommand(_0x42924d,_0x216031){return deprecatedSubcommands[_0x42924d]?.[_0x216031];}export function findDefinition(_0x59787c,_0x6eee55){const _0x2baa20=a137_0xda408f;return definitions[_0x2baa20(0x1cf)](_0x59787c+':'+_0x6eee55);}export function isKnownService(_0x42999f){const _0x2c7a41=a137_0xda408f;return serviceByName[_0x2c7a41(0x1c3)](_0x42999f);}export function isDeclarativeService(_0x169266){const _0x2a098c=a137_0xda408f;return serviceGroups[_0x2a098c(0x1c3)](_0x169266)||serviceByName[_0x2a098c(0x1cf)](_0x169266)?.[_0x2a098c(0x1e3)]!==undefined;}export function getServiceEntry(_0x351269){const _0x55eb43=a137_0xda408f;return serviceByName[_0x55eb43(0x1cf)](_0x351269);}export function getLegacyHandler(_0x47068e,_0x5a9953){return undefined;}export function getAllDefinitions(){const _0x367e1c=a137_0xda408f;return Array[_0x367e1c(0x1c8)](definitions[_0x367e1c(0x1f4)]());}
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 +1 @@
1
- function a138_0x2e4c(){const _0x1ade87=['544589anCQTu','8dsnDJg','2100371XhjYOn','810702IwKVGF','2849916PlgqZk','create','Created\x20role\x20','Create\x20a\x20CUSTOM\x20user\x20group\x20(role)','/smartapi/permit/role/create','str','72pyJjze','flagMissing','name','trim','roleName','10438461MwkAgl','POST','236718jMihXw','remark','138715HHytkc','\x20(id=','appCode','length','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','Pass\x20--name\x20<roleName>.'];a138_0x2e4c=function(){return _0x1ade87;};return a138_0x2e4c();}const a138_0x228ad8=a138_0x11a0;function a138_0x11a0(_0x1d4ee5,_0x4a647e){_0x1d4ee5=_0x1d4ee5-0x141;const _0x2e4c45=a138_0x2e4c();let _0x11a015=_0x2e4c45[_0x1d4ee5];return _0x11a015;}(function(_0x504abf,_0x58216e){const _0x31bf6a=a138_0x11a0,_0x5965b6=_0x504abf();while(!![]){try{const _0x5ec057=-parseInt(_0x31bf6a(0x155))/0x1+parseInt(_0x31bf6a(0x159))/0x2+parseInt(_0x31bf6a(0x14d))/0x3+-parseInt(_0x31bf6a(0x146))/0x4*(-parseInt(_0x31bf6a(0x14f))/0x5)+parseInt(_0x31bf6a(0x158))/0x6+parseInt(_0x31bf6a(0x157))/0x7*(parseInt(_0x31bf6a(0x156))/0x8)+-parseInt(_0x31bf6a(0x14b))/0x9;if(_0x5ec057===_0x58216e)break;else _0x5965b6['push'](_0x5965b6['shift']());}catch(_0xb6c1e5){_0x5965b6['push'](_0x5965b6['shift']());}}}(a138_0x2e4c,0xb3326));import{createAppRole}from'../../core/api-client.js';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_0x228ad8(0x144);function readName(_0x41ae0e){const _0x48d039=a138_0x228ad8,_0x5f2320=_0x41ae0e[_0x48d039(0x145)](_0x48d039(0x148))['trim']();if(!_0x5f2320)throw CliErrors[_0x48d039(0x147)](_0x48d039(0x148),_0x48d039(0x154));if(_0x5f2320[_0x48d039(0x152)]>0x40)throw CliErrors['validation'](_0x48d039(0x153));return _0x5f2320;}export const roleCreate={'service':'role','command':a138_0x228ad8(0x141),'description':a138_0x228ad8(0x143),'risk':'write','flags':[NAME_FLAG,REMARK_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2649f5){readName(_0x2649f5);},async 'dryRun'(_0x2b5a91){const _0x3efcd6=a138_0x228ad8,_0xdd1788=readName(_0x2b5a91),_0xd29215=_0x2b5a91[_0x3efcd6(0x145)](_0x3efcd6(0x14e))[_0x3efcd6(0x149)]()||undefined;return asDryRunResult({'operation':'create','selector':{'appCode':_0x2b5a91['appCode'],'roleName':_0xdd1788},'before':null,'after':{'roleName':_0xdd1788,'roleType':'CUSTOM','remark':_0xd29215},'dryRun':!![],'backend':{'method':_0x3efcd6(0x14c),'path':CREATE_PATH},'warnings':[]},{'method':_0x3efcd6(0x14c),'url':CREATE_PATH});},async 'execute'(_0x429bcb){const _0xd0229e=a138_0x228ad8,_0x3a5349=readName(_0x429bcb),_0x3dd36e=_0x429bcb[_0xd0229e(0x145)](_0xd0229e(0x14e))[_0xd0229e(0x149)]()||undefined,_0x325f10=await createAppRole({'appCode':_0x429bcb[_0xd0229e(0x151)],'roleName':_0x3a5349,..._0x3dd36e?{'remark':_0x3dd36e}:{}});return{'ok':!![],'data':{'operation':_0xd0229e(0x141),'selector':{'appCode':_0x429bcb['appCode'],'roleId':_0x325f10['id'],'roleName':_0x3a5349},'before':null,'after':projectRole(_0x325f10),'dryRun':![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[]},'message':_0xd0229e(0x142)+_0x325f10[_0xd0229e(0x14a)]+_0xd0229e(0x150)+_0x325f10['id']+')'};}};
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 +1 @@
1
- const a139_0x4d4daa=a139_0x8d49;(function(_0x40fd2f,_0xa76ce6){const _0x9bb2fa=a139_0x8d49,_0xf49d75=_0x40fd2f();while(!![]){try{const _0x4b738c=parseInt(_0x9bb2fa(0x71))/0x1+-parseInt(_0x9bb2fa(0x65))/0x2*(-parseInt(_0x9bb2fa(0x66))/0x3)+parseInt(_0x9bb2fa(0x68))/0x4+parseInt(_0x9bb2fa(0x6f))/0x5+parseInt(_0x9bb2fa(0x74))/0x6+parseInt(_0x9bb2fa(0x6d))/0x7+-parseInt(_0x9bb2fa(0x64))/0x8*(parseInt(_0x9bb2fa(0x70))/0x9);if(_0x4b738c===_0xa76ce6)break;else _0xf49d75['push'](_0xf49d75['shift']());}catch(_0x55c5cf){_0xf49d75['push'](_0xf49d75['shift']());}}}(a139_0x3810,0x39a67));import{deleteAppRole}from'../../core/api-client.js';function a139_0x3810(){const _0x507ecf=['176485SEYBWs','roleName','num','300570gAQEqd','userCount','appCode','16RbpAYP','19438JEpXpE','54SRlGzw','\x20(id=','315372bIkWSo','Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','delete','role','/smartapi/permit/role/delete','1871695pnngHV','POST','1744235GBkGrB','3872079XzlGuC'];a139_0x3810=function(){return _0x507ecf;};return a139_0x3810();}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';function a139_0x8d49(_0x359703,_0xaec558){_0x359703=_0x359703-0x64;const _0x38100c=a139_0x3810();let _0x8d490b=_0x38100c[_0x359703];return _0x8d490b;}const DELETE_PATH=a139_0x4d4daa(0x6c);export const roleDelete={'service':a139_0x4d4daa(0x6b),'command':'delete','description':a139_0x4d4daa(0x69),'risk':'high-risk-write','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x2fa72a){const _0x2301dd=a139_0x4d4daa,_0xac4029=_0x2fa72a[_0x2301dd(0x73)]('id'),_0x514e8c=await getRoleById(_0x2fa72a[_0x2301dd(0x76)],_0xac4029);return assertCustomRole(_0x514e8c,_0x2301dd(0x6a)),asDryRunResult({'operation':_0x2301dd(0x6a),'selector':{'appCode':_0x2fa72a[_0x2301dd(0x76)],'roleId':_0xac4029,'roleName':_0x514e8c['roleName']},'before':projectRole(_0x514e8c),'after':null,'dryRun':!![],'backend':{'method':_0x2301dd(0x6e),'path':DELETE_PATH},'warnings':_0x514e8c[_0x2301dd(0x75)]>0x0?['Role\x20still\x20has\x20'+_0x514e8c[_0x2301dd(0x75)]+'\x20member(s);\x20they\x20will\x20lose\x20this\x20group.']:[]},{'method':_0x2301dd(0x6e),'url':DELETE_PATH});},async 'execute'(_0x17eda3){const _0x5bbb9c=a139_0x4d4daa,_0x6bef69=_0x17eda3[_0x5bbb9c(0x73)]('id'),_0x4d098a=await getRoleById(_0x17eda3[_0x5bbb9c(0x76)],_0x6bef69);return assertCustomRole(_0x4d098a,_0x5bbb9c(0x6a)),await deleteAppRole(_0x6bef69),{'ok':!![],'data':{'operation':'delete','selector':{'appCode':_0x17eda3['appCode'],'roleId':_0x6bef69,'roleName':_0x4d098a[_0x5bbb9c(0x72)]},'before':projectRole(_0x4d098a),'after':null,'dryRun':![],'backend':{'method':_0x5bbb9c(0x6e),'path':DELETE_PATH},'warnings':[]},'message':'Deleted\x20role\x20'+_0x4d098a[_0x5bbb9c(0x72)]+_0x5bbb9c(0x67)+_0x6bef69+')'};}};
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 +1 @@
1
- const a140_0x56cca9=a140_0x509c;(function(_0x1f5dbb,_0x40cb39){const _0x3e601e=a140_0x509c,_0x36963f=_0x1f5dbb();while(!![]){try{const _0x4f33f7=-parseInt(_0x3e601e(0xeb))/0x1*(parseInt(_0x3e601e(0xe2))/0x2)+parseInt(_0x3e601e(0xe6))/0x3*(-parseInt(_0x3e601e(0xe1))/0x4)+-parseInt(_0x3e601e(0xea))/0x5+-parseInt(_0x3e601e(0xe9))/0x6+parseInt(_0x3e601e(0xe8))/0x7*(-parseInt(_0x3e601e(0xe4))/0x8)+parseInt(_0x3e601e(0xee))/0x9+parseInt(_0x3e601e(0xf0))/0xa*(parseInt(_0x3e601e(0xe3))/0xb);if(_0x4f33f7===_0x40cb39)break;else _0x36963f['push'](_0x36963f['shift']());}catch(_0x1a8f89){_0x36963f['push'](_0x36963f['shift']());}}}(a140_0x4550,0x913cf));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a140_0x509c(_0x6e60af,_0x3894c4){_0x6e60af=_0x6e60af-0xe1;const _0x4550e7=a140_0x4550();let _0x509c5b=_0x4550e7[_0x6e60af];return _0x509c5b;}export const roleDetail={'service':a140_0x56cca9(0xed),'command':a140_0x56cca9(0xec),'description':'Show\x20a\x20single\x20role\x27s\x20detail','risk':a140_0x56cca9(0xe5),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x44faef){const _0x14d643=a140_0x56cca9,_0x2bb312=_0x44faef[_0x14d643(0xef)]('id'),_0x18afc1=await getRoleById(_0x44faef['appCode'],_0x2bb312);return{'ok':!![],'data':{'role':projectRole(_0x18afc1)},'message':_0x14d643(0xe7)+_0x18afc1['roleName']+'\x20('+_0x18afc1['roleType']+')'};}};function a140_0x4550(){const _0x281f8d=['259952zhRSco','7661313jSuRFz','16QIxFWe','read','89643rTmoaN','Role\x20','2473919BoAfxT','887400PDhPQC','5752715wMRJPo','4bpfRze','detail','role','10268379ExyAdN','num','40oqWPri','108sFmsrU'];a140_0x4550=function(){return _0x281f8d;};return a140_0x4550();}
1
+ const a140_0x3fda2b=a140_0x4b28;function a140_0x2e33(){const _0x3907a6=['23720fwCuzC','Show\x20a\x20single\x20role\x27s\x20detail','roleType','333MhcdIF','num','18160AMdDnE','1625224JhEcIH','268429Mggcdx','3050140mipNXc','331097jAfXCk','8723EHBGSA','appCode','Role\x20','30519cRUGcv','36wnuLaT','read','1240pgmWgV','role'];a140_0x2e33=function(){return _0x3907a6;};return a140_0x2e33();}(function(_0x1f2d66,_0x435573){const _0x267a92=a140_0x4b28,_0x5e850d=_0x1f2d66();while(!![]){try{const _0x162526=parseInt(_0x267a92(0xf7))/0x1+-parseInt(_0x267a92(0x106))/0x2+parseInt(_0x267a92(0x103))/0x3*(-parseInt(_0x267a92(0x100))/0x4)+-parseInt(_0x267a92(0xf6))/0x5+-parseInt(_0x267a92(0xfc))/0x6*(-parseInt(_0x267a92(0xf5))/0x7)+parseInt(_0x267a92(0xfe))/0x8*(parseInt(_0x267a92(0xfb))/0x9)+-parseInt(_0x267a92(0x105))/0xa*(-parseInt(_0x267a92(0xf8))/0xb);if(_0x162526===_0x435573)break;else _0x5e850d['push'](_0x5e850d['shift']());}catch(_0x519f9b){_0x5e850d['push'](_0x5e850d['shift']());}}}(a140_0x2e33,0x6ce32));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a140_0x4b28(_0x3953a4,_0x587fe8){_0x3953a4=_0x3953a4-0xf5;const _0x2e332c=a140_0x2e33();let _0x4b282e=_0x2e332c[_0x3953a4];return _0x4b282e;}import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a140_0x3fda2b(0xff),'command':'detail','description':a140_0x3fda2b(0x101),'risk':a140_0x3fda2b(0xfd),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x48df99){const _0x418277=a140_0x3fda2b,_0x3ae8b1=_0x48df99[_0x418277(0x104)]('id'),_0x54d181=await getRoleById(_0x48df99[_0x418277(0xf9)],_0x3ae8b1);return{'ok':!![],'data':{'role':projectRole(_0x54d181)},'message':_0x418277(0xfa)+_0x54d181['roleName']+'\x20('+_0x54d181[_0x418277(0x102)]+')'};}};