@lovrabet/rabetbase-cli 2.3.14 → 2.3.15-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 (263) 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/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/asset-update.js +1 -1
  103. package/lib/commands/menu/delete.js +1 -1
  104. package/lib/commands/menu/external-link-create.js +1 -1
  105. package/lib/commands/menu/external-link-update.js +1 -1
  106. package/lib/commands/menu/group-create.js +1 -1
  107. package/lib/commands/menu/group-update.js +1 -1
  108. package/lib/commands/menu/index.js +1 -1
  109. package/lib/commands/menu/list.js +1 -1
  110. package/lib/commands/menu/move.js +1 -1
  111. package/lib/commands/menu/regroup-start.js +1 -1
  112. package/lib/commands/menu/shared/compare-table.js +1 -1
  113. package/lib/commands/menu/shared/delete-plan.js +1 -1
  114. package/lib/commands/menu/shared/facts.js +1 -1
  115. package/lib/commands/menu/shared/index.js +1 -1
  116. package/lib/commands/menu/shared/inquirer.js +1 -1
  117. package/lib/commands/menu/shared/local-pages.js +1 -1
  118. package/lib/commands/menu/shared/logic.js +1 -1
  119. package/lib/commands/menu/shared/mutations.js +1 -1
  120. package/lib/commands/menu/shared/service.js +1 -1
  121. package/lib/commands/menu/shared/sync-core.js +1 -1
  122. package/lib/commands/menu/shared/update-core.js +1 -1
  123. package/lib/commands/menu/shared/valid-url.js +1 -1
  124. package/lib/commands/menu/sync.js +1 -1
  125. package/lib/commands/notification/config-list.js +1 -1
  126. package/lib/commands/notification/index.js +1 -1
  127. package/lib/commands/ocr/index.js +1 -1
  128. package/lib/commands/page/generate-start.js +1 -1
  129. package/lib/commands/page/generate-status.js +1 -1
  130. package/lib/commands/page/index.js +1 -1
  131. package/lib/commands/page/pull.js +1 -1
  132. package/lib/commands/page/push.js +1 -1
  133. package/lib/commands/page/relation-audit.js +1 -1
  134. package/lib/commands/page/restore.js +1 -1
  135. package/lib/commands/page/shared.js +1 -1
  136. package/lib/commands/page/standard-page-status.js +1 -1
  137. package/lib/commands/page/sync.js +1 -1
  138. package/lib/commands/permit/index.js +1 -1
  139. package/lib/commands/permit/page-get.js +1 -1
  140. package/lib/commands/permit/page-set.js +1 -1
  141. package/lib/commands/permit/role-apis-set.js +1 -1
  142. package/lib/commands/permit/role-menus-set.js +1 -1
  143. package/lib/commands/permit/role-menus.js +1 -1
  144. package/lib/commands/permit/shared.js +1 -1
  145. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  146. package/lib/commands/project/create/format-elapsed.js +1 -1
  147. package/lib/commands/project/create/main.js +1 -1
  148. package/lib/commands/project/create/non-interactive.js +1 -1
  149. package/lib/commands/project/create/project-template-path.js +1 -1
  150. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  151. package/lib/commands/project/create/use-format-code.js +1 -1
  152. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  153. package/lib/commands/project/index.js +1 -1
  154. package/lib/commands/project/init.js +1 -1
  155. package/lib/commands/project/upgrade.js +1 -1
  156. package/lib/commands/registry.js +1 -1
  157. package/lib/commands/role/create.js +1 -1
  158. package/lib/commands/role/delete.js +1 -1
  159. package/lib/commands/role/detail.js +1 -1
  160. package/lib/commands/role/index.js +1 -1
  161. package/lib/commands/role/list.js +1 -1
  162. package/lib/commands/role/shared.js +1 -1
  163. package/lib/commands/role/update.js +1 -1
  164. package/lib/commands/role/user-add.js +1 -1
  165. package/lib/commands/role/user-remove.js +1 -1
  166. package/lib/commands/role/user-resolve.js +1 -1
  167. package/lib/commands/run/index.js +1 -1
  168. package/lib/commands/schema.js +1 -1
  169. package/lib/commands/sql/create.js +1 -1
  170. package/lib/commands/sql/delete.js +1 -1
  171. package/lib/commands/sql/detail.js +1 -1
  172. package/lib/commands/sql/exec.js +1 -1
  173. package/lib/commands/sql/index.js +1 -1
  174. package/lib/commands/sql/list.js +1 -1
  175. package/lib/commands/sql/pull.js +1 -1
  176. package/lib/commands/sql/push.js +1 -1
  177. package/lib/commands/sql/save.js +1 -1
  178. package/lib/commands/sql/shared.js +1 -1
  179. package/lib/commands/sql/status.js +1 -1
  180. package/lib/commands/sql/validate.js +1 -1
  181. package/lib/commands/task/index.js +1 -1
  182. package/lib/commands/task/status.js +1 -1
  183. package/lib/commands/workspace/add.js +1 -1
  184. package/lib/commands/workspace/index.js +1 -1
  185. package/lib/commands/workspace/remove.js +1 -1
  186. package/lib/config/schema.js +1 -1
  187. package/lib/constant/cdn.js +1 -1
  188. package/lib/constant/cli.js +1 -1
  189. package/lib/constant/defaults.js +1 -1
  190. package/lib/constant/domain.js +1 -1
  191. package/lib/constant/env.js +1 -1
  192. package/lib/constant/output.js +1 -1
  193. package/lib/constant/paths.js +1 -1
  194. package/lib/constant/risk.js +1 -1
  195. package/lib/context/app-resolver.js +1 -1
  196. package/lib/context/auth-resolver.js +1 -1
  197. package/lib/context/config-loader.js +1 -1
  198. package/lib/context.js +1 -1
  199. package/lib/core/alias-resolver.js +1 -1
  200. package/lib/core/api-client.js +1 -1
  201. package/lib/core/bff/config.js +1 -1
  202. package/lib/core/bff/file-system.js +1 -1
  203. package/lib/core/bff/hash.js +1 -1
  204. package/lib/core/bff/lock.js +1 -1
  205. package/lib/core/bff/utils.js +1 -1
  206. package/lib/core/db-resolver.js +1 -1
  207. package/lib/core/page/file-system.js +1 -1
  208. package/lib/core/page/hash.js +1 -1
  209. package/lib/core/page/lock.js +1 -1
  210. package/lib/core/sql-index-auditor.js +1 -1
  211. package/lib/core/sql-sync/config.js +1 -1
  212. package/lib/core/sql-sync/file-system.js +1 -1
  213. package/lib/core/sql-sync/hash.js +1 -1
  214. package/lib/core/sql-sync/lock.js +1 -1
  215. package/lib/core/sql-sync/utils.js +1 -1
  216. package/lib/core/sql-validator.js +1 -1
  217. package/lib/errors.js +1 -1
  218. package/lib/framework/build-all-flags.js +1 -1
  219. package/lib/framework/error-output.js +1 -1
  220. package/lib/framework/explicit-yes.js +1 -1
  221. package/lib/framework/flags.js +1 -1
  222. package/lib/framework/help.js +1 -1
  223. package/lib/framework/index.js +1 -1
  224. package/lib/framework/output.js +1 -1
  225. package/lib/framework/response.js +1 -1
  226. package/lib/framework/runner-alias.js +1 -1
  227. package/lib/framework/runner.js +1 -1
  228. package/lib/framework/schema-export.js +1 -1
  229. package/lib/framework/types.js +1 -1
  230. package/lib/generated/build-info.js +1 -1
  231. package/lib/help.js +1 -1
  232. package/lib/skills/main.js +1 -1
  233. package/lib/skills/npx-skills-add.js +1 -1
  234. package/lib/telemetry/cli-command-trace.js +1 -1
  235. package/lib/telemetry/cli-help-trace.js +1 -1
  236. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  237. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  238. package/lib/telemetry/send-cli-trace-log.js +1 -1
  239. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  240. package/lib/utils/ai_config.js +1 -1
  241. package/lib/utils/apply-jq-filter.js +1 -1
  242. package/lib/utils/cdn-config.js +1 -1
  243. package/lib/utils/check-sdk-version.js +1 -1
  244. package/lib/utils/cli-version-check.js +1 -1
  245. package/lib/utils/cli-version-policy.js +1 -1
  246. package/lib/utils/config.js +1 -1
  247. package/lib/utils/copy-directory.js +1 -1
  248. package/lib/utils/entity-with-id.js +1 -1
  249. package/lib/utils/file-utils.js +1 -1
  250. package/lib/utils/guides-cdn.js +1 -1
  251. package/lib/utils/http-client.js +1 -1
  252. package/lib/utils/is-non-interactive.js +1 -1
  253. package/lib/utils/logger.js +1 -1
  254. package/lib/utils/params.js +1 -1
  255. package/lib/utils/platform.js +1 -1
  256. package/lib/utils/rules-cdn.js +1 -1
  257. package/lib/utils/sleep.js +1 -1
  258. package/lib/utils/template-replacer.js +1 -1
  259. package/lib/utils/update-notice.js +1 -1
  260. package/lib/utils/version.js +1 -1
  261. package/lib/utils/with-active-cookie.js +1 -1
  262. package/lib/utils/write-cli-side-channel.js +1 -1
  263. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x135d51,_0x5e41ad){const _0x506963=a147_0x3ea9,_0x4e31ea=_0x135d51();while(!![]){try{const _0xb3e12a=-parseInt(_0x506963(0x19e))/0x1*(parseInt(_0x506963(0x1a4))/0x2)+parseInt(_0x506963(0x170))/0x3*(parseInt(_0x506963(0x17c))/0x4)+parseInt(_0x506963(0x18b))/0x5+parseInt(_0x506963(0x151))/0x6+-parseInt(_0x506963(0x165))/0x7+-parseInt(_0x506963(0x175))/0x8*(-parseInt(_0x506963(0x193))/0x9)+-parseInt(_0x506963(0x191))/0xa;if(_0xb3e12a===_0x5e41ad)break;else _0x4e31ea['push'](_0x4e31ea['shift']());}catch(_0x44914c){_0x4e31ea['push'](_0x4e31ea['shift']());}}}(a147_0x1011,0x7e1e4));import a147_0x317b91 from'path';import a147_0x46f3b9 from'fs';import a147_0x37cf0a from'chalk';function a147_0x3ea9(_0x207568,_0x541360){_0x207568=_0x207568-0x14a;const _0x1011b1=a147_0x1011();let _0x3ea94f=_0x1011b1[_0x207568];return _0x3ea94f;}import a147_0x1888bb 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 a147_0x1011(){const _0x214c5a=['error','info','utf8','Format\x20code','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','description','API\x20配置拉取异常','cyan','parse','992751AGMIWI','开始创建项目:\x20','配置应用AppCode:\x20','currentVersion','\x20already\x20exists','16312UfKDbN','production','needsUpgrade','fail','success','*\x20Configuring\x20AppCode\x20for\x20project\x20','package.json','12ZhKdph','√\x20Pulled\x20','readFileSync','existsSync','🚀\x20Next\x20Steps:','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','CLI\x20版本检查','version','apps','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','清理项目目录失败:\x20','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','warn','更新\x20package.json\x20name','\x20run\x20start','3563695EOznol','\x20model(s)','projectCode','bold','\x20|\x20Default:\x20','create','18247440VsRLKw','项目创建完成:\x20','3573HUHiWy','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','\x20\x201.\x20Start\x20project:\x20','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','1.0.0','chdir','constants','rmSync','Project\x20directory\x20','配置应用AppCode失败','string','3siJhRh','...','\x20\x202.\x20Pull\x20API\x20configuration:\x20','appCode','length','green','628452okScXU','cwd','start','cd\x20','*\x20Pulling\x20API\x20configuration...','Project\x20name\x20cannot\x20be\x20empty','projectName','accessSync','message','name','defaultApp','\x20√\x20','setLogPath','4946946FweeOk','\x20api\x20pull','modelCount','log','\x20dataset(s),\x20generated\x20','resolve','dirname','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','join','API\x20configuration\x20pulled:\x20','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','repeat','项目创建失败:\x20','Install\x20dependencies','\x20|\x20AppCode:\x20','belowMinimum','\x20&&\x20','\x20Generated\x20by\x20rabetbase\x20cli\x20','env','gray','388234RzwLGG','stop'];a147_0x1011=function(){return _0x214c5a;};return a147_0x1011();}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(_0x100cdd){const _0x26471f=a147_0x3ea9,_0x27be8c=await checkCliVersion();(_0x27be8c['needsUpgrade']||_0x27be8c[_0x26471f(0x160)])&&(printCliUpgradeWarning(_0x27be8c),assertCliVersionSupported(_0x27be8c),logger[_0x26471f(0x168)]('create',_0x26471f(0x182),{'currentVersion':_0x27be8c[_0x26471f(0x173)],'stableVersion':_0x27be8c['stableVersion'],'minimumVersion':_0x27be8c['minimumVersion'],'needsUpgrade':_0x27be8c[_0x26471f(0x177)],'belowMinimum':_0x27be8c[_0x26471f(0x160)]}));if(_0x100cdd['projectCode']&&_0x100cdd[_0x26471f(0x1a1)])await runCreate({'projectName':_0x100cdd['projectCode'],'appCode':_0x100cdd['appCode'],'env':_0x100cdd[_0x26471f(0x163)]},_0x100cdd);else{if(_0x100cdd[_0x26471f(0x18d)]){const _0x45cb63=await selectSingleAppcode(_0x100cdd['cookie']);await runCreate({'projectName':_0x100cdd[_0x26471f(0x18d)],'appCode':_0x45cb63||undefined,'env':_0x100cdd[_0x26471f(0x163)]},_0x100cdd);}else await guidedCreateProject(_0x41cc82=>runCreate(_0x41cc82,_0x100cdd),_0x100cdd[_0x26471f(0x163)],_0x100cdd['cookie']);}}async function runCreate(_0x34ed85,_0xf0880c){const _0xb9e5c0=a147_0x3ea9;if(!_0x34ed85[_0xb9e5c0(0x14a)]||_0x34ed85[_0xb9e5c0(0x14a)]['trim']()==='')throw new Error(_0xb9e5c0(0x1a9));const _0x212e69=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x212e69['test'](_0x34ed85[_0xb9e5c0(0x14a)]))throw new Error(_0xb9e5c0(0x185));if(_0x34ed85['projectName'][_0xb9e5c0(0x1a2)]>0x64)throw new Error(_0xb9e5c0(0x15b));const _0x1b1f0b=a147_0x317b91['resolve'](process['cwd'](),_0x34ed85[_0xb9e5c0(0x14a)]);if(a147_0x46f3b9[_0xb9e5c0(0x17f)](_0x1b1f0b))throw new Error(_0xb9e5c0(0x19b)+_0x34ed85[_0xb9e5c0(0x14a)]+_0xb9e5c0(0x174));try{a147_0x46f3b9[_0xb9e5c0(0x14b)](a147_0x317b91[_0xb9e5c0(0x157)](_0x1b1f0b),a147_0x46f3b9[_0xb9e5c0(0x199)]['W_OK']);}catch{throw new Error(_0xb9e5c0(0x187));}logger[_0xb9e5c0(0x150)](_0x1b1f0b),logger['info'](_0xb9e5c0(0x190),_0xb9e5c0(0x171)+_0x34ed85['projectName'],{'projectDir':_0x1b1f0b,'appCode':_0x34ed85['appCode']}),console['log'](),console[_0xb9e5c0(0x154)](a147_0x37cf0a['green']('\x20√\x20')+'Project\x20name:\x20'+a147_0x37cf0a[_0xb9e5c0(0x1a3)](_0x34ed85[_0xb9e5c0(0x14a)])+(_0x34ed85[_0xb9e5c0(0x1a1)]?_0xb9e5c0(0x15f)+a147_0x37cf0a[_0xb9e5c0(0x16e)](_0x34ed85[_0xb9e5c0(0x1a1)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x34ed85[_0xb9e5c0(0x14a)])),await updatePackageJsonName(_0x34ed85['projectName']),await runTask(_0xb9e5c0(0x15e),()=>installDependencies(_0x34ed85[_0xb9e5c0(0x14a)])),await runTask(_0xb9e5c0(0x16a),()=>formatProjectCode(_0x34ed85['projectName'])),await configureAppCode(_0x34ed85[_0xb9e5c0(0x14a)],_0x34ed85[_0xb9e5c0(0x1a1)]||'',_0x34ed85['env']);let _0x4662a5=![];if(_0x34ed85[_0xb9e5c0(0x1a1)]){console[_0xb9e5c0(0x154)](_0xb9e5c0(0x1a8));const _0x2e450a=process['cwd']();try{process[_0xb9e5c0(0x198)](_0x1b1f0b);const _0x36ea70=_0x34ed85[_0xb9e5c0(0x163)]||'production';initEnv(_0x36ea70);const {configArray:_0x3c3061}=await fetchModelList(_0x34ed85['appCode'],_0xf0880c['cookie']||''),_0x2ae396=DEFAULT_API_DIR,_0x2304a9=await generateApiFile(_0x3c3061,'',_0x34ed85[_0xb9e5c0(0x1a1)],!![],_0x36ea70,_0x2ae396);console[_0xb9e5c0(0x154)](_0xb9e5c0(0x17d)+_0x3c3061[_0xb9e5c0(0x1a2)]+_0xb9e5c0(0x155)+_0x2304a9[_0xb9e5c0(0x153)]+_0xb9e5c0(0x18c)),logger['info'](_0xb9e5c0(0x190),_0xb9e5c0(0x15a)+_0x34ed85['appCode']);}catch(_0x1d9abf){_0x4662a5=!![],console['log'](_0xb9e5c0(0x194)),logger[_0xb9e5c0(0x188)](_0xb9e5c0(0x190),_0xb9e5c0(0x16d),{'error':_0x1d9abf instanceof Error?_0x1d9abf[_0xb9e5c0(0x14c)]:String(_0x1d9abf)});}finally{process[_0xb9e5c0(0x198)](_0x2e450a);}}logger[_0xb9e5c0(0x179)](_0xb9e5c0(0x190),_0xb9e5c0(0x192)+_0x34ed85[_0xb9e5c0(0x14a)]),console[_0xb9e5c0(0x154)](),console[_0xb9e5c0(0x154)](a147_0x37cf0a[_0xb9e5c0(0x1a3)]('─'['repeat'](0x3c))),console[_0xb9e5c0(0x154)](a147_0x37cf0a[_0xb9e5c0(0x16e)][_0xb9e5c0(0x18e)](_0xb9e5c0(0x180))),console['log'](),console[_0xb9e5c0(0x154)](_0xb9e5c0(0x195)+a147_0x37cf0a[_0xb9e5c0(0x16e)][_0xb9e5c0(0x18e)](_0xb9e5c0(0x1a7)+_0x34ed85[_0xb9e5c0(0x14a)]+_0xb9e5c0(0x161)+CLI_BIN_NAME+_0xb9e5c0(0x18a))),_0x4662a5&&console[_0xb9e5c0(0x154)](_0xb9e5c0(0x1a0)+a147_0x37cf0a['cyan'][_0xb9e5c0(0x18e)](CLI_BIN_NAME+_0xb9e5c0(0x152))),console[_0xb9e5c0(0x154)](a147_0x37cf0a[_0xb9e5c0(0x1a3)]('─'[_0xb9e5c0(0x15c)](0x3c)));}catch(_0x338e05){logger[_0xb9e5c0(0x167)]('create',_0xb9e5c0(0x15d)+_0x34ed85[_0xb9e5c0(0x14a)],{'error':_0x338e05 instanceof Error?_0x338e05[_0xb9e5c0(0x14c)]:String(_0x338e05)});try{a147_0x46f3b9[_0xb9e5c0(0x17f)](_0x1b1f0b)&&(console[_0xb9e5c0(0x154)](_0xb9e5c0(0x181)+_0x1b1f0b),a147_0x46f3b9[_0xb9e5c0(0x19a)](_0x1b1f0b,{'recursive':!![],'force':!![]}));}catch{logger['warn'](_0xb9e5c0(0x190),_0xb9e5c0(0x186)+_0x1b1f0b);}throw _0x338e05;}}async function runTask(_0x1875e4,_0x427cb7){const _0x310002=a147_0x3ea9,_0x429292=a147_0x1888bb(_0x1875e4+_0x310002(0x19f))[_0x310002(0x1a6)]();try{const _0x563bd8=await _0x427cb7();_0x429292[_0x310002(0x166)](),console['log'](''+a147_0x37cf0a[_0x310002(0x1a3)](_0x310002(0x14f))+_0x1875e4+'\x20'+a147_0x37cf0a[_0x310002(0x164)]('['+_0x563bd8+']'));}catch(_0xd830ca){_0x429292[_0x310002(0x178)](_0x1875e4);throw _0xd830ca;}}async function updatePackageJsonName(_0x4d3058){const _0xdbe18b=a147_0x3ea9,_0x4a8898=a147_0x317b91[_0xdbe18b(0x156)](process[_0xdbe18b(0x1a5)](),_0x4d3058),_0x644420=a147_0x317b91[_0xdbe18b(0x159)](_0x4a8898,_0xdbe18b(0x17b));try{console[_0xdbe18b(0x154)](_0xdbe18b(0x158));const _0x42b081=getRabetbaseCliPackageRoot(),_0x3706aa=a147_0x317b91[_0xdbe18b(0x159)](_0x42b081,_0xdbe18b(0x17b));let _0x3410d6=_0xdbe18b(0x197);try{const _0x23e4b4=JSON[_0xdbe18b(0x16f)](a147_0x46f3b9['readFileSync'](_0x3706aa,_0xdbe18b(0x169)));_0x3410d6=_0x23e4b4[_0xdbe18b(0x183)]||'1.0.0';}catch{}const _0x774927=a147_0x46f3b9['readFileSync'](_0x644420,_0xdbe18b(0x169)),_0x5a4482=JSON[_0xdbe18b(0x16f)](_0x774927);_0x5a4482[_0xdbe18b(0x14d)]=_0x4d3058,_0x5a4482[_0xdbe18b(0x16c)]=_0x4d3058+_0xdbe18b(0x162)+_0x3410d6,a147_0x46f3b9['writeFileSync'](_0x644420,JSON['stringify'](_0x5a4482,null,0x2)+'\x0a',_0xdbe18b(0x169)),console[_0xdbe18b(0x154)]('√\x20package.json\x20updated:\x20name='+_0x4d3058),logger[_0xdbe18b(0x168)](_0xdbe18b(0x190),_0xdbe18b(0x189));}catch(_0x388137){logger[_0xdbe18b(0x167)](_0xdbe18b(0x190),'更新\x20package.json\x20失败');throw _0x388137;}}async function configureAppCode(_0x6f7e2e,_0x2b912f,_0x5d12af){const _0x20a250=a147_0x3ea9,_0x5198e5=a147_0x317b91[_0x20a250(0x156)](process[_0x20a250(0x1a5)](),_0x6f7e2e),_0x524539=a147_0x317b91[_0x20a250(0x159)](_0x5198e5,NEW_CONFIG_NAME);try{_0x2b912f?console[_0x20a250(0x154)](_0x20a250(0x17a)+_0x6f7e2e+':\x20'+_0x2b912f):console[_0x20a250(0x154)](_0x20a250(0x196)+_0x6f7e2e);const _0x335a53=getRabetbaseCliPackageRoot(),_0x311685=a147_0x317b91[_0x20a250(0x159)](_0x335a53,'package.json');let _0x483328=_0x20a250(0x197);try{const _0x1d7bfe=JSON[_0x20a250(0x16f)](a147_0x46f3b9[_0x20a250(0x17e)](_0x311685,'utf8'));_0x483328=_0x1d7bfe['version']||'1.0.0';}catch{}const _0x31b605=readConfig(),_0x4eef07=typeof _0x31b605['env']===_0x20a250(0x19d)?_0x31b605[_0x20a250(0x163)]:undefined,_0x5ca6b4={};for(const _0x5d3389 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x31b605[_0x5d3389]!=null)_0x5ca6b4[_0x5d3389]=_0x31b605[_0x5d3389];}const _0x48973b=buildCanonicalProjectConfig(_0x5ca6b4,{'appCodes':_0x2b912f?[_0x2b912f]:[],'env':_0x5d12af||_0x4eef07||_0x20a250(0x176),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x483328}});writeConfigFile(_0x524539,_0x48973b),_0x2b912f?console[_0x20a250(0x154)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object['keys'](_0x48973b[_0x20a250(0x184)]||{})[_0x20a250(0x159)](',\x20')+_0x20a250(0x18f)+_0x48973b[_0x20a250(0x14e)]):console['log'](_0x20a250(0x16b)+CLI_BIN_NAME+'\x20config\x20set\x20appcode\x20<app-code>\x27'),logger[_0x20a250(0x168)](_0x20a250(0x190),_0x20a250(0x172)+_0x2b912f);}catch(_0x445aff){logger[_0x20a250(0x167)](_0x20a250(0x190),_0x20a250(0x19c));}}
1
+ (function(_0x2c54e3,_0xa4a6f){const _0x206148=a147_0x499e,_0x2e9a74=_0x2c54e3();while(!![]){try{const _0x411eab=-parseInt(_0x206148(0x1ee))/0x1*(-parseInt(_0x206148(0x1e6))/0x2)+parseInt(_0x206148(0x1fa))/0x3*(parseInt(_0x206148(0x1c6))/0x4)+-parseInt(_0x206148(0x1c2))/0x5*(-parseInt(_0x206148(0x1ef))/0x6)+parseInt(_0x206148(0x1ac))/0x7*(-parseInt(_0x206148(0x1dc))/0x8)+parseInt(_0x206148(0x1e0))/0x9+-parseInt(_0x206148(0x1d9))/0xa+parseInt(_0x206148(0x1e7))/0xb*(parseInt(_0x206148(0x1f8))/0xc);if(_0x411eab===_0xa4a6f)break;else _0x2e9a74['push'](_0x2e9a74['shift']());}catch(_0x580b40){_0x2e9a74['push'](_0x2e9a74['shift']());}}}(a147_0xaee7,0xeb4aa));import a147_0x400e25 from'path';import a147_0xcbfdfa from'fs';import a147_0x3d8c0f from'chalk';import a147_0x549739 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';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';function a147_0x499e(_0x1fbf77,_0xa2e658){_0x1fbf77=_0x1fbf77-0x1a2;const _0xaee7a9=a147_0xaee7();let _0x499e5c=_0xaee7a9[_0x1fbf77];return _0x499e5c;}import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';function a147_0xaee7(){const _0x438ef2=['production','info','toLocaleString','error','writeFileSync','apps','更新\x20package.json\x20name','package.json','cookie','name','5191980vKdkRM','currentVersion','length','40OgFmZb','description','\x20\x201.\x20Start\x20project:\x20','log','8212437cDbFZZ','readFileSync','env','\x20dataset(s),\x20generated\x20','utf8','cwd','2714SCemJE','7403LKFbKO','√\x20Configuration\x20file\x20created,\x20Apps:\x20','belowMinimum','test','needsUpgrade','bold','existsSync','56cgrsKF','69672OjUWyo','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','\x20|\x20AppCode:\x20','success','...','\x20run\x20start','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','W_OK','*\x20Pulling\x20API\x20configuration...','20436oBXiEX','repeat','15213bcqaOA','1.0.0','\x20model(s)','🚀\x20Next\x20Steps:','stop','projectName','配置应用AppCode失败','version','API\x20配置拉取异常','√\x20package.json\x20updated:\x20name=','fail','resolve','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','message','gray','1388387oxGyDL','开始创建项目:\x20','defaultApp','\x20already\x20exists','chdir','项目创建完成:\x20','Project\x20name\x20cannot\x20be\x20empty','projectCode','rmSync','cyan','√\x20Pulled\x20','create','\x20|\x20Default:\x20','dirname','更新\x20package.json\x20失败','cd\x20','\x20\x202.\x20Pull\x20API\x20configuration:\x20','setLogPath','parse','join','\x20Generated\x20by\x20rabetbase\x20cli\x20','CLI\x20版本检查','70BnjWcI','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','warn','appCode','140mABpaD','green','Project\x20directory\x20','\x20√\x20','\x20api\x20pull','modelCount','Project\x20name:\x20','配置应用AppCode:\x20','start'];a147_0xaee7=function(){return _0x438ef2;};return a147_0xaee7();}export async function createApp(_0x3a2dae){const _0x5c2245=a147_0x499e,_0x283733=await checkCliVersion();(_0x283733[_0x5c2245(0x1eb)]||_0x283733[_0x5c2245(0x1e9)])&&(printCliUpgradeWarning(_0x283733),assertCliVersionSupported(_0x283733),logger[_0x5c2245(0x1d0)](_0x5c2245(0x1b7),_0x5c2245(0x1c1),{'currentVersion':_0x283733[_0x5c2245(0x1da)],'stableVersion':_0x283733['stableVersion'],'minimumVersion':_0x283733['minimumVersion'],'needsUpgrade':_0x283733[_0x5c2245(0x1eb)],'belowMinimum':_0x283733[_0x5c2245(0x1e9)]}));if(_0x3a2dae['projectCode']&&_0x3a2dae[_0x5c2245(0x1c5)])await runCreate({'projectName':_0x3a2dae[_0x5c2245(0x1b3)],'appCode':_0x3a2dae[_0x5c2245(0x1c5)],'env':_0x3a2dae['env']},_0x3a2dae);else{if(_0x3a2dae[_0x5c2245(0x1b3)]){const _0x4501dd=await selectSingleAppcode(_0x3a2dae[_0x5c2245(0x1d7)]);await runCreate({'projectName':_0x3a2dae['projectCode'],'appCode':_0x4501dd||undefined,'env':_0x3a2dae[_0x5c2245(0x1e2)]},_0x3a2dae);}else await guidedCreateProject(_0xa0fbc3=>runCreate(_0xa0fbc3,_0x3a2dae),_0x3a2dae[_0x5c2245(0x1e2)],_0x3a2dae[_0x5c2245(0x1d7)]);}}async function runCreate(_0x26b308,_0x45cf01){const _0x1a3882=a147_0x499e;if(!_0x26b308[_0x1a3882(0x1a2)]||_0x26b308[_0x1a3882(0x1a2)]['trim']()==='')throw new Error(_0x1a3882(0x1b2));const _0x46ad7f=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x46ad7f[_0x1a3882(0x1ea)](_0x26b308['projectName']))throw new Error('Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x26b308[_0x1a3882(0x1a2)]['length']>0x64)throw new Error(_0x1a3882(0x1f0));const _0xe5ef17=a147_0x400e25[_0x1a3882(0x1a8)](process[_0x1a3882(0x1e5)](),_0x26b308['projectName']);if(a147_0xcbfdfa['existsSync'](_0xe5ef17))throw new Error(_0x1a3882(0x1c8)+_0x26b308[_0x1a3882(0x1a2)]+_0x1a3882(0x1af));try{a147_0xcbfdfa['accessSync'](a147_0x400e25[_0x1a3882(0x1b9)](_0xe5ef17),a147_0xcbfdfa['constants'][_0x1a3882(0x1f6)]);}catch{throw new Error(_0x1a3882(0x1f5));}logger[_0x1a3882(0x1bd)](_0xe5ef17),logger[_0x1a3882(0x1d0)](_0x1a3882(0x1b7),_0x1a3882(0x1ad)+_0x26b308['projectName'],{'projectDir':_0xe5ef17,'appCode':_0x26b308[_0x1a3882(0x1c5)]}),console[_0x1a3882(0x1df)](),console[_0x1a3882(0x1df)](a147_0x3d8c0f[_0x1a3882(0x1c7)](_0x1a3882(0x1c9))+_0x1a3882(0x1cc)+a147_0x3d8c0f[_0x1a3882(0x1c7)](_0x26b308[_0x1a3882(0x1a2)])+(_0x26b308['appCode']?_0x1a3882(0x1f1)+a147_0x3d8c0f[_0x1a3882(0x1b5)](_0x26b308['appCode']):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x26b308[_0x1a3882(0x1a2)])),await updatePackageJsonName(_0x26b308[_0x1a3882(0x1a2)]),await runTask('Install\x20dependencies',()=>installDependencies(_0x26b308['projectName'])),await runTask('Format\x20code',()=>formatProjectCode(_0x26b308[_0x1a3882(0x1a2)])),await configureAppCode(_0x26b308['projectName'],_0x26b308['appCode']||'',_0x26b308[_0x1a3882(0x1e2)]);let _0x5384f0=![];if(_0x26b308[_0x1a3882(0x1c5)]){console[_0x1a3882(0x1df)](_0x1a3882(0x1f7));const _0x4e977e=process['cwd']();try{process['chdir'](_0xe5ef17);const _0x3b0618=_0x26b308[_0x1a3882(0x1e2)]||_0x1a3882(0x1cf);initEnv(_0x3b0618);const {configArray:_0x35f2f8}=await fetchModelList(_0x26b308['appCode'],_0x45cf01[_0x1a3882(0x1d7)]||''),_0x483b4f=DEFAULT_API_DIR,_0x206ab3=await generateApiFile(_0x35f2f8,'',_0x26b308[_0x1a3882(0x1c5)],!![],_0x3b0618,_0x483b4f);console['log'](_0x1a3882(0x1b6)+_0x35f2f8[_0x1a3882(0x1db)]+_0x1a3882(0x1e3)+_0x206ab3[_0x1a3882(0x1cb)]+_0x1a3882(0x1fc)),logger['info']('create','API\x20configuration\x20pulled:\x20'+_0x26b308[_0x1a3882(0x1c5)]);}catch(_0x454fc9){_0x5384f0=!![],console[_0x1a3882(0x1df)](_0x1a3882(0x1c3)),logger[_0x1a3882(0x1c4)](_0x1a3882(0x1b7),_0x1a3882(0x1a5),{'error':_0x454fc9 instanceof Error?_0x454fc9[_0x1a3882(0x1aa)]:String(_0x454fc9)});}finally{process[_0x1a3882(0x1b0)](_0x4e977e);}}logger[_0x1a3882(0x1f2)](_0x1a3882(0x1b7),_0x1a3882(0x1b1)+_0x26b308[_0x1a3882(0x1a2)]),console[_0x1a3882(0x1df)](),console[_0x1a3882(0x1df)](a147_0x3d8c0f[_0x1a3882(0x1c7)]('─'[_0x1a3882(0x1f9)](0x3c))),console['log'](a147_0x3d8c0f[_0x1a3882(0x1b5)]['bold'](_0x1a3882(0x1fd))),console[_0x1a3882(0x1df)](),console[_0x1a3882(0x1df)](_0x1a3882(0x1de)+a147_0x3d8c0f['cyan'][_0x1a3882(0x1ec)](_0x1a3882(0x1bb)+_0x26b308[_0x1a3882(0x1a2)]+'\x20&&\x20'+CLI_BIN_NAME+_0x1a3882(0x1f4))),_0x5384f0&&console['log'](_0x1a3882(0x1bc)+a147_0x3d8c0f[_0x1a3882(0x1b5)][_0x1a3882(0x1ec)](CLI_BIN_NAME+_0x1a3882(0x1ca))),console[_0x1a3882(0x1df)](a147_0x3d8c0f['green']('─'[_0x1a3882(0x1f9)](0x3c)));}catch(_0x373f43){logger[_0x1a3882(0x1d2)](_0x1a3882(0x1b7),'项目创建失败:\x20'+_0x26b308[_0x1a3882(0x1a2)],{'error':_0x373f43 instanceof Error?_0x373f43[_0x1a3882(0x1aa)]:String(_0x373f43)});try{a147_0xcbfdfa[_0x1a3882(0x1ed)](_0xe5ef17)&&(console[_0x1a3882(0x1df)](_0x1a3882(0x1a9)+_0xe5ef17),a147_0xcbfdfa[_0x1a3882(0x1b4)](_0xe5ef17,{'recursive':!![],'force':!![]}));}catch{logger[_0x1a3882(0x1c4)](_0x1a3882(0x1b7),'清理项目目录失败:\x20'+_0xe5ef17);}throw _0x373f43;}}async function runTask(_0x461691,_0x250e7b){const _0x47e489=a147_0x499e,_0x17e1b4=a147_0x549739(_0x461691+_0x47e489(0x1f3))[_0x47e489(0x1ce)]();try{const _0x5eac05=await _0x250e7b();_0x17e1b4[_0x47e489(0x1fe)](),console[_0x47e489(0x1df)](''+a147_0x3d8c0f[_0x47e489(0x1c7)](_0x47e489(0x1c9))+_0x461691+'\x20'+a147_0x3d8c0f[_0x47e489(0x1ab)]('['+_0x5eac05+']'));}catch(_0x16afb2){_0x17e1b4[_0x47e489(0x1a7)](_0x461691);throw _0x16afb2;}}async function updatePackageJsonName(_0x83e902){const _0x8de0a5=a147_0x499e,_0x2300e2=a147_0x400e25[_0x8de0a5(0x1a8)](process['cwd'](),_0x83e902),_0x38dc2f=a147_0x400e25[_0x8de0a5(0x1bf)](_0x2300e2,_0x8de0a5(0x1d6));try{console[_0x8de0a5(0x1df)]('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x355342=getRabetbaseCliPackageRoot(),_0x2a5a01=a147_0x400e25[_0x8de0a5(0x1bf)](_0x355342,_0x8de0a5(0x1d6));let _0x50bee6=_0x8de0a5(0x1fb);try{const _0x9f3932=JSON[_0x8de0a5(0x1be)](a147_0xcbfdfa[_0x8de0a5(0x1e1)](_0x2a5a01,_0x8de0a5(0x1e4)));_0x50bee6=_0x9f3932[_0x8de0a5(0x1a4)]||_0x8de0a5(0x1fb);}catch{}const _0x5114dd=a147_0xcbfdfa[_0x8de0a5(0x1e1)](_0x38dc2f,'utf8'),_0x25ef61=JSON[_0x8de0a5(0x1be)](_0x5114dd);_0x25ef61[_0x8de0a5(0x1d8)]=_0x83e902,_0x25ef61[_0x8de0a5(0x1dd)]=_0x83e902+_0x8de0a5(0x1c0)+_0x50bee6,a147_0xcbfdfa[_0x8de0a5(0x1d3)](_0x38dc2f,JSON['stringify'](_0x25ef61,null,0x2)+'\x0a',_0x8de0a5(0x1e4)),console[_0x8de0a5(0x1df)](_0x8de0a5(0x1a6)+_0x83e902),logger[_0x8de0a5(0x1d0)]('create',_0x8de0a5(0x1d5));}catch(_0x141803){logger['error']('create',_0x8de0a5(0x1ba));throw _0x141803;}}async function configureAppCode(_0x4bfeb8,_0x68fa49,_0x2c581b){const _0x35bad1=a147_0x499e,_0x4758a5=a147_0x400e25[_0x35bad1(0x1a8)](process[_0x35bad1(0x1e5)](),_0x4bfeb8),_0x2aec34=a147_0x400e25['join'](_0x4758a5,NEW_CONFIG_NAME);try{_0x68fa49?console[_0x35bad1(0x1df)]('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x4bfeb8+':\x20'+_0x68fa49):console['log']('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x4bfeb8);const _0xeb3944=getRabetbaseCliPackageRoot(),_0x43ebb0=a147_0x400e25[_0x35bad1(0x1bf)](_0xeb3944,'package.json');let _0x39dd5e=_0x35bad1(0x1fb);try{const _0x3d6e28=JSON[_0x35bad1(0x1be)](a147_0xcbfdfa['readFileSync'](_0x43ebb0,_0x35bad1(0x1e4)));_0x39dd5e=_0x3d6e28[_0x35bad1(0x1a4)]||_0x35bad1(0x1fb);}catch{}const _0x18ff66=readConfig(),_0x46d921=typeof _0x18ff66[_0x35bad1(0x1e2)]==='string'?_0x18ff66[_0x35bad1(0x1e2)]:undefined,_0x137e30={};for(const _0x41817d of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x18ff66[_0x41817d]!=null)_0x137e30[_0x41817d]=_0x18ff66[_0x41817d];}const _0x2bc191=buildCanonicalProjectConfig(_0x137e30,{'appCodes':_0x68fa49?[_0x68fa49]:[],'env':_0x2c581b||_0x46d921||_0x35bad1(0x1cf),'metadata':{'createdAt':new Date()[_0x35bad1(0x1d1)](),'version':_0x39dd5e}});writeConfigFile(_0x2aec34,_0x2bc191),_0x68fa49?console[_0x35bad1(0x1df)](_0x35bad1(0x1e8)+Object['keys'](_0x2bc191[_0x35bad1(0x1d4)]||{})[_0x35bad1(0x1bf)](',\x20')+_0x35bad1(0x1b8)+_0x2bc191[_0x35bad1(0x1ae)]):console[_0x35bad1(0x1df)]('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+'\x20config\x20set\x20appcode\x20<app-code>\x27'),logger['info'](_0x35bad1(0x1b7),_0x35bad1(0x1cd)+_0x68fa49);}catch(_0xa9b5c1){logger[_0x35bad1(0x1d2)](_0x35bad1(0x1b7),_0x35bad1(0x1a3));}}
@@ -1 +1 @@
1
- (function(_0x26b25d,_0x23eb4b){const _0x45de23=a148_0x4e72,_0x1e1a32=_0x26b25d();while(!![]){try{const _0x122648=parseInt(_0x45de23(0x19e))/0x1*(-parseInt(_0x45de23(0x19a))/0x2)+-parseInt(_0x45de23(0x19c))/0x3+parseInt(_0x45de23(0x191))/0x4*(parseInt(_0x45de23(0x16c))/0x5)+-parseInt(_0x45de23(0x175))/0x6+-parseInt(_0x45de23(0x19b))/0x7+-parseInt(_0x45de23(0x183))/0x8+-parseInt(_0x45de23(0x179))/0x9*(-parseInt(_0x45de23(0x181))/0xa);if(_0x122648===_0x23eb4b)break;else _0x1e1a32['push'](_0x1e1a32['shift']());}catch(_0x4357b2){_0x1e1a32['push'](_0x1e1a32['shift']());}}}(a148_0xa278,0x7b881));import a148_0x15d145 from'path';import a148_0x295087 from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';function a148_0x4e72(_0x2caa4f,_0x30c0a0){_0x2caa4f=_0x2caa4f-0x16c;const _0xa2788=a148_0xa278();let _0x4e72e0=_0xa2788[_0x2caa4f];return _0x4e72e0;}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';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x1d8689,_0x4d3b2e,_0x12c532,_0x2aa32b){const _0x415449=a148_0x4e72,_0x4083a8=await checkCliVersion();(_0x4083a8[_0x415449(0x16e)]||_0x4083a8[_0x415449(0x172)])&&(printCliUpgradeWarning(_0x4083a8),assertCliVersionSupported(_0x4083a8));if(!_0x1d8689||_0x1d8689[_0x415449(0x19d)]()==='')throw CliErrors[_0x415449(0x18a)]('Project\x20name\x20cannot\x20be\x20empty.');const _0x243a81=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x243a81[_0x415449(0x17f)](_0x1d8689))throw CliErrors['validation'](_0x415449(0x17b),_0x415449(0x193));if(_0x1d8689[_0x415449(0x184)]>0x64)throw CliErrors['validation'](_0x415449(0x16f));const _0x12539c=a148_0x15d145['resolve'](process[_0x415449(0x16d)](),_0x1d8689);if(existsSync(_0x12539c))throw CliErrors[_0x415449(0x18a)](_0x415449(0x182)+_0x1d8689+_0x415449(0x199),_0x415449(0x192));try{const _0x43bd2d=a148_0x15d145['dirname'](_0x12539c);await a148_0x295087[_0x415449(0x17c)](_0x43bd2d,a148_0x295087['constants'][_0x415449(0x18e)]);}catch{throw CliErrors[_0x415449(0x18a)](_0x415449(0x177),'Check\x20directory\x20permissions.');}try{console[_0x415449(0x17d)]('*\x20Creating\x20project\x20'+_0x1d8689+_0x415449(0x18b));const _0x20191a=getSubAppReactDemoTemplateDir();await copyDirectory(_0x20191a,_0x12539c),console[_0x415449(0x17d)]('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x1d8689),console['log']('\x20\x20√\x20package.json\x20updated'),console[_0x415449(0x17d)]('\x20\x20Installing\x20dependencies...'),console[_0x415449(0x17d)](_0x415449(0x180)),await formatCode(_0x12539c),console[_0x415449(0x17d)](_0x415449(0x198)),await configureProject(_0x1d8689,_0x12c532,_0x4d3b2e),console[_0x415449(0x17d)]('\x20\x20√\x20Configuration\x20file\x20created'),_0x12c532&&await pullApiConfig(_0x12539c,_0x12c532,_0x4d3b2e,_0x2aa32b),console['log'](_0x415449(0x197)+_0x1d8689+_0x415449(0x187)),console[_0x415449(0x17d)]('\x0a\x20\x20cd\x20'+_0x1d8689),console[_0x415449(0x17d)]('\x20\x20rabetbase\x20run\x20start\x0a');}catch(_0x32ba92){try{existsSync(_0x12539c)&&await a148_0x295087['rm'](_0x12539c,{'recursive':!![],'force':!![]});}catch{}throw _0x32ba92;}}async function updatePackageJsonName(_0x46ebda){const _0xf2ff12=a148_0x4e72,_0x1dd2f0=a148_0x15d145[_0xf2ff12(0x18c)](process['cwd'](),_0x46ebda),_0xa9c3a6=a148_0x15d145[_0xf2ff12(0x18f)](_0x1dd2f0,_0xf2ff12(0x178)),_0x49af48=await a148_0x295087[_0xf2ff12(0x185)](_0xa9c3a6,_0xf2ff12(0x194)),_0x386f9e=JSON[_0xf2ff12(0x189)](_0x49af48);_0x386f9e[_0xf2ff12(0x19f)]=_0x46ebda,_0x386f9e['description']='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a148_0x295087['writeFile'](_0xa9c3a6,JSON[_0xf2ff12(0x171)](_0x386f9e,null,0x2)+'\x0a');}function detectPackageManager(){const _0x5ffdac=a148_0x4e72;try{return execSync(_0x5ffdac(0x17a),{'stdio':_0x5ffdac(0x190)}),_0x5ffdac(0x18d);}catch{return _0x5ffdac(0x195);}}async function formatCode(_0x13b2aa){try{await execAsync('bun\x20run\x20format',{'cwd':_0x13b2aa});}catch{}}async function configureProject(_0x4e9f0d,_0x23b925,_0x81a447){const _0x5dd35b=a148_0x4e72,_0x5476c4=a148_0x15d145[_0x5dd35b(0x18c)](process[_0x5dd35b(0x16d)](),_0x4e9f0d),_0x5ee042=a148_0x15d145[_0x5dd35b(0x18f)](_0x5476c4,NEW_CONFIG_NAME),_0x36820e=readConfig(),_0x40766e=typeof _0x36820e[_0x5dd35b(0x17e)]===_0x5dd35b(0x1a0)?_0x36820e[_0x5dd35b(0x17e)]:undefined,_0x50d6a0={};for(const _0x4e22d3 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x36820e[_0x4e22d3]!=null)_0x50d6a0[_0x4e22d3]=_0x36820e[_0x4e22d3];}const _0x2cf335=buildCanonicalProjectConfig(_0x50d6a0,{'appCodes':_0x23b925?[_0x23b925]:[],'env':_0x81a447||_0x40766e||_0x5dd35b(0x176),'metadata':{'createdAt':new Date()[_0x5dd35b(0x170)](),'version':getCliVersion()}});writeConfigFile(_0x5ee042,_0x2cf335);}function a148_0xa278(){const _0xb1dc75=['ignore','104NzSJNz','Use\x20a\x20different\x20project\x20name.','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','utf-8','npm','\x20\x20√\x20Pulled\x20','\x0a√\x20Project\x20','\x20\x20√\x20Code\x20formatted','\x22\x20already\x20exists.','267052YSnEHg','1430688vJWTNj','612708NqdpxZ','trim','4uvKtHG','name','string','122105wqQHbm','cwd','needsUpgrade','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','toLocaleString','stringify','belowMinimum','\x20api\x20pull`\x20manually\x20later.','chdir','1573632aOgRwH','production','Cannot\x20create\x20project\x20in\x20current\x20directory.','package.json','9ulaSae','bun\x20--version','Project\x20name\x20contains\x20invalid\x20characters.','access','log','env','test','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','19726040YTIpMo','Project\x20directory\x20\x22','7172552AmLLQE','length','readFile','\x20dataset(s),\x20generated\x20','\x20created\x20successfully!','modelCount','parse','validation','...','resolve','bun','W_OK','join'];a148_0xa278=function(){return _0xb1dc75;};return a148_0xa278();}async function pullApiConfig(_0x38c39b,_0x374fb2,_0x3ab824,_0x57b514){const _0x5eaed6=a148_0x4e72,_0x6d29c8=process['cwd']();try{process[_0x5eaed6(0x174)](_0x38c39b);const _0x4094e6=_0x3ab824||_0x5eaed6(0x176);initEnv(_0x4094e6),console['log']('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x26e104}=await fetchModelList(_0x374fb2,_0x57b514||''),_0x1b41ac=await generateApiFile(_0x26e104,'',_0x374fb2,!![],_0x4094e6,DEFAULT_API_DIR);console[_0x5eaed6(0x17d)](_0x5eaed6(0x196)+_0x26e104['length']+_0x5eaed6(0x186)+_0x1b41ac[_0x5eaed6(0x188)]+'\x20model(s)');}catch(_0x3d98d2){console[_0x5eaed6(0x17d)]('\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`'+CLI_BIN_NAME+_0x5eaed6(0x173));}finally{process[_0x5eaed6(0x174)](_0x6d29c8);}}
1
+ (function(_0x9a324,_0x4617d4){const _0x2ba2be=a148_0x4b80,_0x4a24c5=_0x9a324();while(!![]){try{const _0x4da97a=-parseInt(_0x2ba2be(0x1c3))/0x1*(-parseInt(_0x2ba2be(0x1a2))/0x2)+-parseInt(_0x2ba2be(0x196))/0x3+parseInt(_0x2ba2be(0x19b))/0x4+-parseInt(_0x2ba2be(0x19a))/0x5*(parseInt(_0x2ba2be(0x1c2))/0x6)+-parseInt(_0x2ba2be(0x1b7))/0x7+parseInt(_0x2ba2be(0x1b5))/0x8*(parseInt(_0x2ba2be(0x191))/0x9)+-parseInt(_0x2ba2be(0x1a9))/0xa;if(_0x4da97a===_0x4617d4)break;else _0x4a24c5['push'](_0x4a24c5['shift']());}catch(_0x50e7e6){_0x4a24c5['push'](_0x4a24c5['shift']());}}}(a148_0xe6e9,0x66944));import a148_0x52f287 from'path';import a148_0x51c413 from'fs/promises';function a148_0xe6e9(){const _0x385da1=['log','801CeJwBw','bun\x20--version','ignore','constants','Check\x20directory\x20permissions.','405144KZxrGp','cwd','validation','resolve','14865xXRTHi','1511268ViMaLo','\x20created\x20successfully!','*\x20Creating\x20project\x20','name','\x20\x20rabetbase\x20run\x20start\x0a','\x20\x20Installing\x20dependencies...','\x20\x20Pulling\x20API\x20configuration...','2RjrPwx','stringify','chdir','length','Cannot\x20create\x20project\x20in\x20current\x20directory.','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','...','6157790zpmuVu','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','Use\x20a\x20different\x20project\x20name.','\x20\x20√\x20package.json\x20updated','join','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','env','production','toLocaleString','string','readFile','Project\x20directory\x20\x22','25048eVZwEu','\x20\x20√\x20Configuration\x20file\x20created','514346YykgPX','npm','\x0a\x20\x20cd\x20','\x22\x20already\x20exists.','belowMinimum','description','utf-8','\x20\x20√\x20Pulled\x20','\x20model(s)','parse','test','396DiWfNg','784211wcvdxC','Project\x20name\x20contains\x20invalid\x20characters.','modelCount','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','needsUpgrade'];a148_0xe6e9=function(){return _0x385da1;};return a148_0xe6e9();}import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';function a148_0x4b80(_0x191d84,_0x4e6c6d){_0x191d84=_0x191d84-0x190;const _0xe6e90a=a148_0xe6e9();let _0x4b8069=_0xe6e90a[_0x191d84];return _0x4b8069;}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';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x1c1dec,_0x5a47f3,_0x29afae,_0x5e628b){const _0x52bed3=a148_0x4b80,_0x2de5a7=await checkCliVersion();(_0x2de5a7[_0x52bed3(0x1c7)]||_0x2de5a7[_0x52bed3(0x1bb)])&&(printCliUpgradeWarning(_0x2de5a7),assertCliVersionSupported(_0x2de5a7));if(!_0x1c1dec||_0x1c1dec['trim']()==='')throw CliErrors[_0x52bed3(0x198)]('Project\x20name\x20cannot\x20be\x20empty.');const _0xd923e3=/[<>:"|?*\x00-\x1f\x7f]/;if(_0xd923e3[_0x52bed3(0x1c1)](_0x1c1dec))throw CliErrors['validation'](_0x52bed3(0x1c4),_0x52bed3(0x1aa));if(_0x1c1dec[_0x52bed3(0x1a5)]>0x64)throw CliErrors[_0x52bed3(0x198)](_0x52bed3(0x1c6));const _0x5c5ed4=a148_0x52f287['resolve'](process[_0x52bed3(0x197)](),_0x1c1dec);if(existsSync(_0x5c5ed4))throw CliErrors[_0x52bed3(0x198)](_0x52bed3(0x1b4)+_0x1c1dec+_0x52bed3(0x1ba),_0x52bed3(0x1ab));try{const _0x5d41ce=a148_0x52f287['dirname'](_0x5c5ed4);await a148_0x51c413['access'](_0x5d41ce,a148_0x51c413[_0x52bed3(0x194)]['W_OK']);}catch{throw CliErrors[_0x52bed3(0x198)](_0x52bed3(0x1a6),_0x52bed3(0x195));}try{console[_0x52bed3(0x190)](_0x52bed3(0x19d)+_0x1c1dec+_0x52bed3(0x1a8));const _0x489ea3=getSubAppReactDemoTemplateDir();await copyDirectory(_0x489ea3,_0x5c5ed4),console[_0x52bed3(0x190)]('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x1c1dec),console[_0x52bed3(0x190)](_0x52bed3(0x1ac)),console[_0x52bed3(0x190)](_0x52bed3(0x1a0)),console[_0x52bed3(0x190)](_0x52bed3(0x1a7)),await formatCode(_0x5c5ed4),console['log']('\x20\x20√\x20Code\x20formatted'),await configureProject(_0x1c1dec,_0x29afae,_0x5a47f3),console[_0x52bed3(0x190)](_0x52bed3(0x1b6)),_0x29afae&&await pullApiConfig(_0x5c5ed4,_0x29afae,_0x5a47f3,_0x5e628b),console[_0x52bed3(0x190)]('\x0a√\x20Project\x20'+_0x1c1dec+_0x52bed3(0x19c)),console[_0x52bed3(0x190)](_0x52bed3(0x1b9)+_0x1c1dec),console[_0x52bed3(0x190)](_0x52bed3(0x19f));}catch(_0x29ad59){try{existsSync(_0x5c5ed4)&&await a148_0x51c413['rm'](_0x5c5ed4,{'recursive':!![],'force':!![]});}catch{}throw _0x29ad59;}}async function updatePackageJsonName(_0x1d33a8){const _0x2f32a9=a148_0x4b80,_0x4b79b0=a148_0x52f287[_0x2f32a9(0x199)](process[_0x2f32a9(0x197)](),_0x1d33a8),_0x58b9b7=a148_0x52f287[_0x2f32a9(0x1ad)](_0x4b79b0,'package.json'),_0x4bb1ee=await a148_0x51c413[_0x2f32a9(0x1b3)](_0x58b9b7,_0x2f32a9(0x1bd)),_0x1aa30b=JSON[_0x2f32a9(0x1c0)](_0x4bb1ee);_0x1aa30b[_0x2f32a9(0x19e)]=_0x1d33a8,_0x1aa30b[_0x2f32a9(0x1bc)]='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a148_0x51c413['writeFile'](_0x58b9b7,JSON[_0x2f32a9(0x1a3)](_0x1aa30b,null,0x2)+'\x0a');}function detectPackageManager(){const _0x3d6f11=a148_0x4b80;try{return execSync(_0x3d6f11(0x192),{'stdio':_0x3d6f11(0x193)}),'bun';}catch{return _0x3d6f11(0x1b8);}}async function formatCode(_0x506ab9){try{await execAsync('bun\x20run\x20format',{'cwd':_0x506ab9});}catch{}}async function configureProject(_0x96b41b,_0x426c1d,_0x3c6fde){const _0xcaca9d=a148_0x4b80,_0x146373=a148_0x52f287['resolve'](process['cwd'](),_0x96b41b),_0x18fe35=a148_0x52f287[_0xcaca9d(0x1ad)](_0x146373,NEW_CONFIG_NAME),_0x3bb96f=readConfig(),_0x42263d=typeof _0x3bb96f[_0xcaca9d(0x1af)]===_0xcaca9d(0x1b2)?_0x3bb96f[_0xcaca9d(0x1af)]:undefined,_0x3271f3={};for(const _0x1ef2fe of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x3bb96f[_0x1ef2fe]!=null)_0x3271f3[_0x1ef2fe]=_0x3bb96f[_0x1ef2fe];}const _0x1c3f51=buildCanonicalProjectConfig(_0x3271f3,{'appCodes':_0x426c1d?[_0x426c1d]:[],'env':_0x3c6fde||_0x42263d||_0xcaca9d(0x1b0),'metadata':{'createdAt':new Date()[_0xcaca9d(0x1b1)](),'version':getCliVersion()}});writeConfigFile(_0x18fe35,_0x1c3f51);}async function pullApiConfig(_0x3d84ef,_0x5054f4,_0x37944c,_0x11629f){const _0x19579a=a148_0x4b80,_0x3d95e4=process['cwd']();try{process['chdir'](_0x3d84ef);const _0x499ecb=_0x37944c||'production';initEnv(_0x499ecb),console['log'](_0x19579a(0x1a1));const {configArray:_0x19dd47}=await fetchModelList(_0x5054f4,_0x11629f||''),_0x5b3d99=await generateApiFile(_0x19dd47,'',_0x5054f4,!![],_0x499ecb,DEFAULT_API_DIR);console['log'](_0x19579a(0x1be)+_0x19dd47['length']+'\x20dataset(s),\x20generated\x20'+_0x5b3d99[_0x19579a(0x1c5)]+_0x19579a(0x1bf));}catch(_0x475e3){console[_0x19579a(0x190)](_0x19579a(0x1ae)+CLI_BIN_NAME+'\x20api\x20pull`\x20manually\x20later.');}finally{process[_0x19579a(0x1a4)](_0x3d95e4);}}
@@ -1 +1 @@
1
- function a149_0x2344(_0xa2d445,_0x5b5592){_0xa2d445=_0xa2d445-0x185;const _0x731cbf=a149_0x731c();let _0x23441e=_0x731cbf[_0xa2d445];return _0x23441e;}(function(_0x446147,_0x5f3dc9){const _0x13ddab=a149_0x2344,_0x22fc38=_0x446147();while(!![]){try{const _0x4f83dd=-parseInt(_0x13ddab(0x190))/0x1+-parseInt(_0x13ddab(0x188))/0x2+-parseInt(_0x13ddab(0x18c))/0x3+-parseInt(_0x13ddab(0x186))/0x4*(-parseInt(_0x13ddab(0x18f))/0x5)+-parseInt(_0x13ddab(0x185))/0x6+-parseInt(_0x13ddab(0x18b))/0x7*(parseInt(_0x13ddab(0x189))/0x8)+parseInt(_0x13ddab(0x187))/0x9;if(_0x4f83dd===_0x5f3dc9)break;else _0x22fc38['push'](_0x22fc38['shift']());}catch(_0x1af5ab){_0x22fc38['push'](_0x22fc38['shift']());}}}(a149_0x731c,0x4a871));function a149_0x731c(){const _0x540ef5=['join','2499670CMdJxn','542478uXGABk','2515668gaIiVM','4MPhRZy','16509708OAPgai','1151704byCoLc','1480QVbYhy','../../../../','16387eseXRy','175164jbHepQ','sub-app-react-demo'];a149_0x731c=function(){return _0x540ef5;};return a149_0x731c();}import a149_0x26f8d6 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a149_0x26f8d6['dirname'](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x283452=a149_0x2344;return a149_0x26f8d6['resolve'](__dirname,_0x283452(0x18a));}export function getSubAppReactDemoTemplateDir(){const _0x2138b8=a149_0x2344;return a149_0x26f8d6[_0x2138b8(0x18e)](getRabetbaseCliPackageRoot(),'templates','projects',_0x2138b8(0x18d));}
1
+ const a149_0x1f26a2=a149_0x9ec1;(function(_0x37c5d3,_0x38d075){const _0x3afa84=a149_0x9ec1,_0x186602=_0x37c5d3();while(!![]){try{const _0x4129e6=parseInt(_0x3afa84(0xb7))/0x1+-parseInt(_0x3afa84(0xb9))/0x2*(-parseInt(_0x3afa84(0xb6))/0x3)+parseInt(_0x3afa84(0xb3))/0x4+parseInt(_0x3afa84(0xb5))/0x5+-parseInt(_0x3afa84(0xae))/0x6+parseInt(_0x3afa84(0xb2))/0x7+-parseInt(_0x3afa84(0xb4))/0x8;if(_0x4129e6===_0x38d075)break;else _0x186602['push'](_0x186602['shift']());}catch(_0x58f2af){_0x186602['push'](_0x186602['shift']());}}}(a149_0x5bf2,0x92093));import a149_0x5ee18b from'node:path';import{fileURLToPath}from'node:url';function a149_0x9ec1(_0x1c04a2,_0x18b090){_0x1c04a2=_0x1c04a2-0xae;const _0x5bf2d5=a149_0x5bf2();let _0x9ec113=_0x5bf2d5[_0x1c04a2];return _0x9ec113;}function a149_0x5bf2(){const _0x31c813=['259806xQrLIB','dirname','projects','join','5218087UPWmeG','2545620zicZul','12413344ALdmJA','3257540usvCmK','3867DxliTl','127553vsLyWv','resolve','50uWPheF','../../../../','sub-app-react-demo'];a149_0x5bf2=function(){return _0x31c813;};return a149_0x5bf2();}const __dirname=a149_0x5ee18b[a149_0x1f26a2(0xaf)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x5424d6=a149_0x1f26a2;return a149_0x5ee18b[_0x5424d6(0xb8)](__dirname,_0x5424d6(0xba));}export function getSubAppReactDemoTemplateDir(){const _0x31316d=a149_0x1f26a2;return a149_0x5ee18b[_0x31316d(0xb1)](getRabetbaseCliPackageRoot(),'templates',_0x31316d(0xb0),_0x31316d(0xbb));}
@@ -1 +1 @@
1
- (function(_0x2dbb32,_0x19135f){const _0x4b0041=a150_0x508d,_0x44187f=_0x2dbb32();while(!![]){try{const _0x2d4b46=-parseInt(_0x4b0041(0x12c))/0x1+parseInt(_0x4b0041(0x140))/0x2*(parseInt(_0x4b0041(0x136))/0x3)+-parseInt(_0x4b0041(0x12d))/0x4*(parseInt(_0x4b0041(0x13b))/0x5)+-parseInt(_0x4b0041(0x133))/0x6*(parseInt(_0x4b0041(0x13e))/0x7)+parseInt(_0x4b0041(0x138))/0x8*(-parseInt(_0x4b0041(0x13d))/0x9)+parseInt(_0x4b0041(0x130))/0xa+parseInt(_0x4b0041(0x13c))/0xb;if(_0x2d4b46===_0x19135f)break;else _0x44187f['push'](_0x44187f['shift']());}catch(_0x1816f2){_0x44187f['push'](_0x44187f['shift']());}}}(a150_0x53b1,0xb2c61));import a150_0xe83559 from'node:path';function a150_0x508d(_0x3dcf5c,_0x372c31){_0x3dcf5c=_0x3dcf5c-0x12c;const _0x53b1f4=a150_0x53b1();let _0x508d52=_0x53b1f4[_0x3dcf5c];return _0x508d52;}import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a150_0x53b1(){const _0x90f9ca=['项目模板复制完成','resolve','5175300nuGbki','message','copy','30948TSCYej','error','now','117TcXGfv','success','398472aQElll','项目模板复制失败','cwd','13520tiwiRg','36026452RSVIHx','9EFzPSs','1673TLqAvj','开始复制项目模板','5596ckKend','943260MsYsgU','1396DOUwzP'];a150_0x53b1=function(){return _0x90f9ca;};return a150_0x53b1();}import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x3e2f97){const _0xe6121b=a150_0x508d,_0x176847=Date['now'](),_0x170ad7=a150_0xe83559[_0xe6121b(0x12f)](process[_0xe6121b(0x13a)](),_0x3e2f97);try{logger['info'](_0xe6121b(0x132),_0xe6121b(0x13f),{'projectCode':_0x3e2f97,'templateDir':templateDir}),await copyDirectory(templateDir,_0x170ad7);const _0x58920d=Date[_0xe6121b(0x135)]()-_0x176847;logger[_0xe6121b(0x137)](_0xe6121b(0x132),_0xe6121b(0x12e),_0x58920d,{'projectCode':_0x3e2f97});}catch(_0x301270){const _0x5f28af=Date[_0xe6121b(0x135)]()-_0x176847;logger[_0xe6121b(0x134)](_0xe6121b(0x132),_0xe6121b(0x139),{'projectCode':_0x3e2f97,'error':_0x301270 instanceof Error?_0x301270[_0xe6121b(0x131)]:String(_0x301270),'duration':_0x5f28af});throw _0x301270;}return formatElapsed(_0x176847);}
1
+ (function(_0x127bf3,_0x322397){const _0x23db6e=a150_0x3b1e,_0x43f1d7=_0x127bf3();while(!![]){try{const _0x42b7e1=parseInt(_0x23db6e(0xfb))/0x1*(parseInt(_0x23db6e(0xf1))/0x2)+-parseInt(_0x23db6e(0xfc))/0x3+parseInt(_0x23db6e(0xf6))/0x4+-parseInt(_0x23db6e(0xf4))/0x5+parseInt(_0x23db6e(0xf2))/0x6*(-parseInt(_0x23db6e(0xf9))/0x7)+parseInt(_0x23db6e(0xee))/0x8+parseInt(_0x23db6e(0xf0))/0x9*(parseInt(_0x23db6e(0xeb))/0xa);if(_0x42b7e1===_0x322397)break;else _0x43f1d7['push'](_0x43f1d7['shift']());}catch(_0x216063){_0x43f1d7['push'](_0x43f1d7['shift']());}}}(a150_0x562e,0x65651));import a150_0x139c7b from'node:path';function a150_0x562e(){const _0xda44c7=['45zUjPBX','81572FOPaHZ','734244iirDKc','项目模板复制完成','3846195OwXovV','message','1693448aQyWjL','error','info','7OmUyLp','开始复制项目模板','10WqwNrx','933369sHzcvc','706110AecbWb','now','copy','3470176QSDhQI','success'];a150_0x562e=function(){return _0xda44c7;};return a150_0x562e();}import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a150_0x3b1e(_0x305dcd,_0x521f2f){_0x305dcd=_0x305dcd-0xeb;const _0x562e84=a150_0x562e();let _0x3b1eb4=_0x562e84[_0x305dcd];return _0x3b1eb4;}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x493682){const _0x38cb31=a150_0x3b1e,_0x412ed5=Date[_0x38cb31(0xec)](),_0x4c9124=a150_0x139c7b['resolve'](process['cwd'](),_0x493682);try{logger[_0x38cb31(0xf8)](_0x38cb31(0xed),_0x38cb31(0xfa),{'projectCode':_0x493682,'templateDir':templateDir}),await copyDirectory(templateDir,_0x4c9124);const _0x5bb7f2=Date[_0x38cb31(0xec)]()-_0x412ed5;logger[_0x38cb31(0xef)](_0x38cb31(0xed),_0x38cb31(0xf3),_0x5bb7f2,{'projectCode':_0x493682});}catch(_0x24cb8f){const _0x155edd=Date['now']()-_0x412ed5;logger[_0x38cb31(0xf7)](_0x38cb31(0xed),'项目模板复制失败',{'projectCode':_0x493682,'error':_0x24cb8f instanceof Error?_0x24cb8f[_0x38cb31(0xf5)]:String(_0x24cb8f),'duration':_0x155edd});throw _0x24cb8f;}return formatElapsed(_0x412ed5);}
@@ -1 +1 @@
1
- (function(_0x403552,_0x5f2f1b){const _0x35bd0a=a151_0x487e,_0x4e9855=_0x403552();while(!![]){try{const _0x3f6d57=parseInt(_0x35bd0a(0xec))/0x1+-parseInt(_0x35bd0a(0xee))/0x2+parseInt(_0x35bd0a(0xeb))/0x3*(-parseInt(_0x35bd0a(0xf1))/0x4)+-parseInt(_0x35bd0a(0xe8))/0x5*(-parseInt(_0x35bd0a(0xf4))/0x6)+-parseInt(_0x35bd0a(0xe7))/0x7*(parseInt(_0x35bd0a(0xe9))/0x8)+parseInt(_0x35bd0a(0xe5))/0x9+parseInt(_0x35bd0a(0xf0))/0xa*(-parseInt(_0x35bd0a(0xe0))/0xb);if(_0x3f6d57===_0x5f2f1b)break;else _0x4e9855['push'](_0x4e9855['shift']());}catch(_0x550b3c){_0x4e9855['push'](_0x4e9855['shift']());}}}(a151_0x367a,0xbc53f));function a151_0x367a(){const _0x46cd78=['message','error','10289331nUeNOK','cwd','302694pZEZcS','40PJONAW','192bMJIMy','info','783894lWzXhK','1104204vmzoUF','now','1264832XkLNbo','success','56180uiHpTd','4mzrJZI','resolve','npx','371082zecFlq','--write','prettier','77BtzveH','代码格式化失败','format'];a151_0x367a=function(){return _0x46cd78;};return a151_0x367a();}import a151_0x1a41b3 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a151_0x487e(_0x586bc5,_0x4bfedf){_0x586bc5=_0x586bc5-0xde;const _0x367ad9=a151_0x367a();let _0x487ef6=_0x367ad9[_0x586bc5];return _0x487ef6;}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x21b479){const _0x29e0a5=a151_0x487e,_0xb4fd68=Date[_0x29e0a5(0xed)](),_0x3ed2c4=a151_0x1a41b3[_0x29e0a5(0xf2)](process[_0x29e0a5(0xe6)](),_0x21b479);try{logger[_0x29e0a5(0xea)](_0x29e0a5(0xe2),'开始格式化代码',{'projectCode':_0x21b479}),await execa(resolveNpmBin(_0x29e0a5(0xf3)),[_0x29e0a5(0xdf),_0x29e0a5(0xde),'.'],{'cwd':_0x3ed2c4});const _0x1e9762=Date[_0x29e0a5(0xed)]()-_0xb4fd68;logger[_0x29e0a5(0xef)](_0x29e0a5(0xe2),'代码格式化完成',_0x1e9762,{'projectCode':_0x21b479});}catch(_0x5ca9b3){const _0x50841d=Date[_0x29e0a5(0xed)]()-_0xb4fd68;logger[_0x29e0a5(0xe4)]('format',_0x29e0a5(0xe1),{'projectCode':_0x21b479,'error':_0x5ca9b3 instanceof Error?_0x5ca9b3[_0x29e0a5(0xe3)]:String(_0x5ca9b3),'duration':_0x50841d});throw _0x5ca9b3;}return formatElapsed(_0xb4fd68);}
1
+ (function(_0x227205,_0x2d4802){const _0x28925a=a151_0x1380,_0x590465=_0x227205();while(!![]){try{const _0x353194=-parseInt(_0x28925a(0x15e))/0x1+-parseInt(_0x28925a(0x15a))/0x2+-parseInt(_0x28925a(0x155))/0x3*(parseInt(_0x28925a(0x150))/0x4)+parseInt(_0x28925a(0x157))/0x5*(parseInt(_0x28925a(0x153))/0x6)+parseInt(_0x28925a(0x15c))/0x7*(-parseInt(_0x28925a(0x15b))/0x8)+-parseInt(_0x28925a(0x15d))/0x9*(parseInt(_0x28925a(0x14f))/0xa)+parseInt(_0x28925a(0x152))/0xb;if(_0x353194===_0x2d4802)break;else _0x590465['push'](_0x590465['shift']());}catch(_0x3d4627){_0x590465['push'](_0x590465['shift']());}}}(a151_0xa8fc,0xc74e1));import a151_0x557c54 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a151_0x1380(_0xda13c8,_0x2c72ee){_0xda13c8=_0xda13c8-0x14a;const _0xa8fc88=a151_0xa8fc();let _0x1380fc=_0xa8fc88[_0xda13c8];return _0x1380fc;}import{logger}from'../../../utils/logger.js';function a151_0xa8fc(){const _0x1c5c40=['代码格式化失败','5pTEcsI','cwd','代码格式化完成','2873456EiGxZQ','13768yXMVQy','1477hvfilv','1240479xkbcwn','1243623aByUUm','prettier','info','now','error','resolve','success','10SmuSuK','40540OxExiE','format','39150683fpXtQF','7982358tWaSSq','npx','264wDeLQj'];a151_0xa8fc=function(){return _0x1c5c40;};return a151_0xa8fc();}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x47d082){const _0x5d4c36=a151_0x1380,_0x5d7c34=Date[_0x5d4c36(0x14b)](),_0x51f0b0=a151_0x557c54[_0x5d4c36(0x14d)](process[_0x5d4c36(0x158)](),_0x47d082);try{logger[_0x5d4c36(0x14a)](_0x5d4c36(0x151),'开始格式化代码',{'projectCode':_0x47d082}),await execa(resolveNpmBin(_0x5d4c36(0x154)),[_0x5d4c36(0x15f),'--write','.'],{'cwd':_0x51f0b0});const _0x35cddf=Date[_0x5d4c36(0x14b)]()-_0x5d7c34;logger[_0x5d4c36(0x14e)]('format',_0x5d4c36(0x159),_0x35cddf,{'projectCode':_0x47d082});}catch(_0x57dc5f){const _0xa3cbb=Date['now']()-_0x5d7c34;logger[_0x5d4c36(0x14c)](_0x5d4c36(0x151),_0x5d4c36(0x156),{'projectCode':_0x47d082,'error':_0x57dc5f instanceof Error?_0x57dc5f['message']:String(_0x57dc5f),'duration':_0xa3cbb});throw _0x57dc5f;}return formatElapsed(_0x5d7c34);}
@@ -1 +1 @@
1
- (function(_0x4b2aa0,_0x52f3ef){const _0x3615ef=a152_0x1c2c,_0x633e16=_0x4b2aa0();while(!![]){try{const _0x2b100f=-parseInt(_0x3615ef(0x1a6))/0x1*(parseInt(_0x3615ef(0x1b0))/0x2)+-parseInt(_0x3615ef(0x1ae))/0x3*(-parseInt(_0x3615ef(0x1af))/0x4)+-parseInt(_0x3615ef(0x1b2))/0x5*(-parseInt(_0x3615ef(0x1a9))/0x6)+-parseInt(_0x3615ef(0x19f))/0x7+parseInt(_0x3615ef(0x1ab))/0x8+-parseInt(_0x3615ef(0x1b1))/0x9+-parseInt(_0x3615ef(0x1a4))/0xa;if(_0x2b100f===_0x52f3ef)break;else _0x633e16['push'](_0x633e16['shift']());}catch(_0x671b90){_0x633e16['push'](_0x633e16['shift']());}}}(a152_0x4043,0xccf24));import a152_0x3831f0 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a152_0x1c2c(_0x542f87,_0x471909){_0x542f87=_0x542f87-0x19f;const _0x4043da=a152_0x4043();let _0x1c2ca2=_0x4043da[_0x542f87];return _0x1c2ca2;}import{resolveNpmBin}from'../../../utils/platform.js';function a152_0x4043(){const _0x2c730c=['message','1128afBtSK','https://registry.npmmirror.com','9683392qiSIoj','--registry','依赖安装失败','12087bvAHoJ','1424oeCcAM','14852sfnTPS','797832vqPSnX','34540CopzBw','7526631iJuvkq','success','now','install','依赖安装完成','18435730LCZpCL','resolve','13LuJtQg','cwd'];a152_0x4043=function(){return _0x2c730c;};return a152_0x4043();}export async function installDependencies(_0x350790){const _0xe34b55=a152_0x1c2c,_0x46784a=Date[_0xe34b55(0x1a1)](),_0x1639e3=a152_0x3831f0[_0xe34b55(0x1a5)](process[_0xe34b55(0x1a7)](),_0x350790);try{logger['info']('install','开始安装依赖',{'projectCode':_0x350790,'registry':_0xe34b55(0x1aa)}),await execa(resolveNpmBin('npm'),[_0xe34b55(0x1a2),_0xe34b55(0x1ac),_0xe34b55(0x1aa)],{'cwd':_0x1639e3});const _0x5b78dc=Date[_0xe34b55(0x1a1)]()-_0x46784a;logger[_0xe34b55(0x1a0)](_0xe34b55(0x1a2),_0xe34b55(0x1a3),_0x5b78dc,{'projectCode':_0x350790});}catch(_0x5d368a){const _0x28b516=Date[_0xe34b55(0x1a1)]()-_0x46784a;logger['error']('install',_0xe34b55(0x1ad),{'projectCode':_0x350790,'error':_0x5d368a instanceof Error?_0x5d368a[_0xe34b55(0x1a8)]:String(_0x5d368a),'duration':_0x28b516});throw _0x5d368a;}return formatElapsed(_0x46784a);}
1
+ (function(_0x4e6a40,_0x19e6d1){const _0x31bf1c=a152_0x2b76,_0x549117=_0x4e6a40();while(!![]){try{const _0x2bdaec=-parseInt(_0x31bf1c(0x1c6))/0x1*(-parseInt(_0x31bf1c(0x1bd))/0x2)+-parseInt(_0x31bf1c(0x1b5))/0x3*(-parseInt(_0x31bf1c(0x1b4))/0x4)+parseInt(_0x31bf1c(0x1c3))/0x5+parseInt(_0x31bf1c(0x1c4))/0x6+parseInt(_0x31bf1c(0x1ba))/0x7*(parseInt(_0x31bf1c(0x1bf))/0x8)+parseInt(_0x31bf1c(0x1bc))/0x9+-parseInt(_0x31bf1c(0x1c0))/0xa;if(_0x2bdaec===_0x19e6d1)break;else _0x549117['push'](_0x549117['shift']());}catch(_0x332e15){_0x549117['push'](_0x549117['shift']());}}}(a152_0x23f3,0x4cafd));import a152_0x54fb7c from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a152_0x2b76(_0x5cf70b,_0x3fe678){_0x5cf70b=_0x5cf70b-0x1b4;const _0x23f33a=a152_0x23f3();let _0x2b769a=_0x23f33a[_0x5cf70b];return _0x2b769a;}import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x1238f7){const _0x32c0c5=a152_0x2b76,_0x819030=Date['now'](),_0x2c4333=a152_0x54fb7c[_0x32c0c5(0x1b7)](process['cwd'](),_0x1238f7);try{logger[_0x32c0c5(0x1be)]('install','开始安装依赖',{'projectCode':_0x1238f7,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin(_0x32c0c5(0x1bb)),[_0x32c0c5(0x1c2),'--registry',_0x32c0c5(0x1b6)],{'cwd':_0x2c4333});const _0x433127=Date[_0x32c0c5(0x1c5)]()-_0x819030;logger[_0x32c0c5(0x1b9)](_0x32c0c5(0x1c2),_0x32c0c5(0x1b8),_0x433127,{'projectCode':_0x1238f7});}catch(_0x34f02e){const _0x5dac68=Date[_0x32c0c5(0x1c5)]()-_0x819030;logger[_0x32c0c5(0x1c1)](_0x32c0c5(0x1c2),'依赖安装失败',{'projectCode':_0x1238f7,'error':_0x34f02e instanceof Error?_0x34f02e['message']:String(_0x34f02e),'duration':_0x5dac68});throw _0x34f02e;}return formatElapsed(_0x819030);}function a152_0x23f3(){const _0x2963c4=['1420209wlIWNh','208454oRYLNR','info','586072AOsuOd','19456340LMCwJS','error','install','2473345TEfiPk','2441616yVraAD','now','6twufZE','8mBoQqH','93243DHkAlN','https://registry.npmmirror.com','resolve','依赖安装完成','success','49jlwDXg','npm'];a152_0x23f3=function(){return _0x2963c4;};return a152_0x23f3();}
@@ -1 +1 @@
1
- const a153_0x4cfcae=a153_0x3b21;(function(_0x2fef25,_0x2bf492){const _0x572291=a153_0x3b21,_0x19c9fd=_0x2fef25();while(!![]){try{const _0x9dd1e2=parseInt(_0x572291(0x119))/0x1+-parseInt(_0x572291(0x10e))/0x2*(parseInt(_0x572291(0x11f))/0x3)+-parseInt(_0x572291(0x11e))/0x4*(-parseInt(_0x572291(0xfe))/0x5)+-parseInt(_0x572291(0x101))/0x6*(-parseInt(_0x572291(0x10d))/0x7)+-parseInt(_0x572291(0x113))/0x8+parseInt(_0x572291(0xf6))/0x9*(-parseInt(_0x572291(0x117))/0xa)+parseInt(_0x572291(0xfd))/0xb*(-parseInt(_0x572291(0x109))/0xc);if(_0x9dd1e2===_0x2bf492)break;else _0x19c9fd['push'](_0x19c9fd['shift']());}catch(_0x198d32){_0x19c9fd['push'](_0x19c9fd['shift']());}}}(a153_0x5d11,0x65ec9));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a153_0x5d11(){const _0x35f79e=['1030AkiGpk','../../commands/project/create/main.js','674654VHLypk','args','name','create','../../commands/project/create/non-interactive.js','76UzjEKB','99QeyJLo','15894LZReiS','cookie','yes','trim','string','init','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','22PkYOAH','166510sLymFR','Create\x20a\x20new\x20project','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','127056SamapL','validation','App\x20code\x20to\x20initialize','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','project','write','project-name','Project\x20name','4598052RLkOMz','env','bool','2026-07','140pnHmCX','13812SVmiOD','Skip\x20confirmation\x20prompt','boolean','str','appcode','1098344mZBXfC','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','Target\x20environment'];a153_0x5d11=function(){return _0x35f79e;};return a153_0x5d11();}import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a153_0x4cfcae(0x112),'type':a153_0x4cfcae(0xfa),'description':a153_0x4cfcae(0x103)},{'name':a153_0x4cfcae(0x10a),'type':a153_0x4cfcae(0xfa),'description':a153_0x4cfcae(0x116)},{'name':a153_0x4cfcae(0xf8),'type':'boolean','description':'Auto-confirm\x20prompts','default':![]}],createFlags=[{'name':'name','type':'string','description':a153_0x4cfcae(0x108)},{'name':a153_0x4cfcae(0x10a),'type':a153_0x4cfcae(0xfa),'description':a153_0x4cfcae(0x116)},{'name':a153_0x4cfcae(0x112),'type':a153_0x4cfcae(0xfa),'description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'}],upgradeFlags=[{'name':'yes','type':a153_0x4cfcae(0x110),'description':a153_0x4cfcae(0x10f),'default':![]}];function a153_0x3b21(_0x144b9f,_0x196ec5){_0x144b9f=_0x144b9f-0xf6;const _0x5d11a7=a153_0x5d11();let _0x3b2102=_0x5d11a7[_0x144b9f];return _0x3b2102;}export const projectDefinitions=[{'service':a153_0x4cfcae(0x105),'command':a153_0x4cfcae(0xfb),'description':a153_0x4cfcae(0x115),'risk':a153_0x4cfcae(0x106),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+'\x20workspace\x20init','since':a153_0x4cfcae(0x10c)},'flags':initFlags,async 'execute'(_0x3feb6b){const _0x2635b4=a153_0x4cfcae;return await initConfig({'appcode':_0x3feb6b[_0x2635b4(0x111)]('appcode')||undefined,'env':_0x3feb6b[_0x2635b4(0x111)](_0x2635b4(0x10a))||undefined,'autoYes':_0x3feb6b['bool'](_0x2635b4(0xf8))}),{'ok':!![]};}},{'service':a153_0x4cfcae(0x105),'command':a153_0x4cfcae(0x11c),'description':a153_0x4cfcae(0xff),'risk':a153_0x4cfcae(0x106),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a153_0x4cfcae(0x107),'description':a153_0x4cfcae(0xfc),'required':![]}],'flags':createFlags,async 'execute'(_0xca4d3){const _0x5e0c4f=a153_0x4cfcae,{createApp:_0xfe1373}=await import(_0x5e0c4f(0x118)),{createProjectNonInteractive:_0x269f5e}=await import(_0x5e0c4f(0x11d)),_0x418c25=_0xca4d3['str'](_0x5e0c4f(0x11b))['trim']()||_0xca4d3[_0x5e0c4f(0x11a)][0x0]?.[_0x5e0c4f(0xf9)](),_0x3a7e0f=_0xca4d3[_0x5e0c4f(0x111)](_0x5e0c4f(0x10a))||undefined,_0x20a049=_0xca4d3['str'](_0x5e0c4f(0x112))||undefined;if(_0xca4d3['nonInteractive']){if(!_0x418c25)throw CliErrors[_0x5e0c4f(0x102)](_0x5e0c4f(0x114),'Usage:\x20'+CLI_BIN_NAME+_0x5e0c4f(0x104));await _0x269f5e(_0x418c25,_0x3a7e0f,_0x20a049,_0xca4d3[_0x5e0c4f(0xf7)]);}else await _0xfe1373({'projectCode':_0x418c25,'appCode':_0x20a049,'env':_0x3a7e0f,'cookie':_0xca4d3[_0x5e0c4f(0xf7)]});return{'ok':!![]};}},{'service':a153_0x4cfcae(0x105),'command':'upgrade','description':a153_0x4cfcae(0x100),'risk':a153_0x4cfcae(0x106),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x117a35){const _0x26e2ec=a153_0x4cfcae;return await upgradeApp(_0x117a35['nonInteractive'],{'yes':_0x117a35[_0x26e2ec(0x10b)]('yes')}),{'ok':!![]};}}];
1
+ const a153_0x98ef71=a153_0x45f8;function a153_0x4fc1(){const _0x281d90=['trim','186696bwKeSZ','35NFDewO','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','string','yes','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','upgrade','init','validation','cookie','project','../../commands/project/create/main.js','App\x20code\x20to\x20initialize','Usage:\x20','boolean','write','args','294696KUplem','263192VgasyS','315978nuQItI','36AEwAVs','16962pjLAFv','\x20workspace\x20init','str','appcode','env','Project\x20name','Auto-confirm\x20prompts','../../commands/project/create/non-interactive.js','672HpCgDT','project-name','Create\x20a\x20new\x20project','176851rVseFE','Target\x20environment','nonInteractive','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','create','2026-07','name','2768490LXgWfW'];a153_0x4fc1=function(){return _0x281d90;};return a153_0x4fc1();}(function(_0xdb352c,_0x57179c){const _0x5d7be1=a153_0x45f8,_0x1269a8=_0xdb352c();while(!![]){try{const _0x38d0f0=parseInt(_0x5d7be1(0x118))/0x1+-parseInt(_0x5d7be1(0x10a))/0x2+parseInt(_0x5d7be1(0x10b))/0x3+parseInt(_0x5d7be1(0x121))/0x4*(-parseInt(_0x5d7be1(0x122))/0x5)+parseInt(_0x5d7be1(0x10d))/0x6*(parseInt(_0x5d7be1(0x115))/0x7)+-parseInt(_0x5d7be1(0x109))/0x8*(parseInt(_0x5d7be1(0x10c))/0x9)+parseInt(_0x5d7be1(0x11f))/0xa;if(_0x38d0f0===_0x57179c)break;else _0x1269a8['push'](_0x1269a8['shift']());}catch(_0x5aaeee){_0x1269a8['push'](_0x1269a8['shift']());}}}(a153_0x4fc1,0x36df4));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':a153_0x98ef71(0x110),'type':a153_0x98ef71(0x124),'description':a153_0x98ef71(0x104)},{'name':'env','type':'string','description':'Target\x20environment'},{'name':a153_0x98ef71(0x125),'type':a153_0x98ef71(0x106),'description':a153_0x98ef71(0x113),'default':![]}],createFlags=[{'name':'name','type':a153_0x98ef71(0x124),'description':a153_0x98ef71(0x112)},{'name':a153_0x98ef71(0x111),'type':a153_0x98ef71(0x124),'description':a153_0x98ef71(0x119)},{'name':a153_0x98ef71(0x110),'type':a153_0x98ef71(0x124),'description':a153_0x98ef71(0x11b)}],upgradeFlags=[{'name':'yes','type':'boolean','description':'Skip\x20confirmation\x20prompt','default':![]}];function a153_0x45f8(_0x40a4d0,_0xd4e949){_0x40a4d0=_0x40a4d0-0xfd;const _0x4fc1e4=a153_0x4fc1();let _0x45f877=_0x4fc1e4[_0x40a4d0];return _0x45f877;}export const projectDefinitions=[{'service':a153_0x98ef71(0x102),'command':a153_0x98ef71(0xff),'description':'Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','risk':a153_0x98ef71(0x107),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a153_0x98ef71(0x10e),'since':a153_0x98ef71(0x11d)},'flags':initFlags,async 'execute'(_0x41f132){const _0x14440b=a153_0x98ef71;return await initConfig({'appcode':_0x41f132[_0x14440b(0x10f)](_0x14440b(0x110))||undefined,'env':_0x41f132[_0x14440b(0x10f)](_0x14440b(0x111))||undefined,'autoYes':_0x41f132['bool'](_0x14440b(0x125))}),{'ok':!![]};}},{'service':a153_0x98ef71(0x102),'command':a153_0x98ef71(0x11c),'description':a153_0x98ef71(0x117),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a153_0x98ef71(0x116),'description':a153_0x98ef71(0x123),'required':![]}],'flags':createFlags,async 'execute'(_0x5e762d){const _0x3d9f69=a153_0x98ef71,{createApp:_0x37e265}=await import(_0x3d9f69(0x103)),{createProjectNonInteractive:_0x26218d}=await import(_0x3d9f69(0x114)),_0x263002=_0x5e762d[_0x3d9f69(0x10f)](_0x3d9f69(0x11e))[_0x3d9f69(0x120)]()||_0x5e762d[_0x3d9f69(0x108)][0x0]?.[_0x3d9f69(0x120)](),_0x58229d=_0x5e762d['str'](_0x3d9f69(0x111))||undefined,_0x6f542c=_0x5e762d['str'](_0x3d9f69(0x110))||undefined;if(_0x5e762d[_0x3d9f69(0x11a)]){if(!_0x263002)throw CliErrors[_0x3d9f69(0x100)](_0x3d9f69(0xfd),_0x3d9f69(0x105)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x26218d(_0x263002,_0x58229d,_0x6f542c,_0x5e762d[_0x3d9f69(0x101)]);}else await _0x37e265({'projectCode':_0x263002,'appCode':_0x6f542c,'env':_0x58229d,'cookie':_0x5e762d[_0x3d9f69(0x101)]});return{'ok':!![]};}},{'service':a153_0x98ef71(0x102),'command':a153_0x98ef71(0xfe),'description':'Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','risk':a153_0x98ef71(0x107),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x281d3e){const _0x763c07=a153_0x98ef71;return await upgradeApp(_0x281d3e['nonInteractive'],{'yes':_0x281d3e['bool'](_0x763c07(0x125))}),{'ok':!![]};}}];
@@ -1 +1 @@
1
- (function(_0xbac0f4,_0x5e2576){const _0x1302e7=a154_0x9052,_0x595b88=_0xbac0f4();while(!![]){try{const _0x19a697=parseInt(_0x1302e7(0x125))/0x1*(-parseInt(_0x1302e7(0x121))/0x2)+-parseInt(_0x1302e7(0x11e))/0x3+-parseInt(_0x1302e7(0x13e))/0x4*(-parseInt(_0x1302e7(0x134))/0x5)+parseInt(_0x1302e7(0x12c))/0x6+-parseInt(_0x1302e7(0x13a))/0x7*(parseInt(_0x1302e7(0x135))/0x8)+parseInt(_0x1302e7(0x124))/0x9+parseInt(_0x1302e7(0x136))/0xa*(-parseInt(_0x1302e7(0x138))/0xb);if(_0x19a697===_0x5e2576)break;else _0x595b88['push'](_0x595b88['shift']());}catch(_0x3ba3c3){_0x595b88['push'](_0x595b88['shift']());}}}(a154_0x2a07,0xe40e0));function a154_0x9052(_0x10d989,_0x56c243){_0x10d989=_0x10d989-0x11c;const _0x2a07d8=a154_0x2a07();let _0x9052a5=_0x2a07d8[_0x10d989];return _0x9052a5;}import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a154_0x174cb3 from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../../context.js';import{validateAppcode}from'../../commands/common/validate.js';function a154_0x2a07(){const _0x446640=['../..','✓\x20Upgraded\x20','cwd','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','log','utf8','从旧配置文件升级成功','version','\x20\x20appcode:\x20','初始化项目配置文件成功','1.0.0','toLocaleString','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','\x20\x20Apps:\x20','934719ThLYyk','keys','info','26elKVHR','setLogPath','.rabetbase.json','952020UaSUgz','53986JLXfQG','defaultApp','cyan','parse','app','trim','Migration\x20cancelled.\x20Run\x20`','11200332ovsmYR','.bak','green','Please\x20enter\x20App\x20Code:','Upgrade\x20it\x20to\x20','\x20\x20Default:\x20','bold','apps','140UTgYAC','16vHubcP','112210fxBhrS','gray','869ZMeHmp','env','300132Fiebzh','appcode','string','production','135316XuYGPc','join'];a154_0x2a07=function(){return _0x446640;};return a154_0x2a07();}import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x36d084){const _0x31399f=a154_0x9052,{appcode:_0x5405d5,env:_0x236643,autoYes:_0x88508}=_0x36d084,_0x161003=process[_0x31399f(0x142)]();if(getProjectConfigPath())throw new Error(_0x31399f(0x11c));let _0x4c199e;for(const _0x36dea4 of LEGACY_CONFIG_NAMES){const _0x1c3fe2=resolve(_0x161003,_0x36dea4);if(existsSync(_0x1c3fe2)){_0x4c199e=_0x1c3fe2;break;}}if(_0x4c199e){let _0x3c1135={};try{_0x3c1135=JSON[_0x31399f(0x128)](readFileSync(_0x4c199e,_0x31399f(0x145)));}catch{}const _0x3ec8b3=basename(_0x4c199e),_0x2646b0=_0x3c1135?.[_0x31399f(0x13b)]||_0x3c1135?.['app'];let _0x1d9033=_0x88508;!_0x88508&&(console[_0x31399f(0x144)](a154_0x174cb3['yellow'](_0x31399f(0x143)+a154_0x174cb3['bold'](_0x3ec8b3))),_0x2646b0&&console['log'](a154_0x174cb3['cyan'](_0x31399f(0x148)+_0x2646b0)),_0x1d9033=await confirm({'message':_0x31399f(0x130)+a154_0x174cb3[_0x31399f(0x132)](_0x31399f(0x123))+'?\x20(Old\x20file\x20→\x20*.bak)','default':!![]}));if(!_0x1d9033){console[_0x31399f(0x144)](_0x31399f(0x12b)+CLI_BIN_NAME+'\x20workspace\x20init`\x20to\x20start\x20fresh.');return;}const _0x5bc243=resolve(_0x161003,NEW_CONFIG_NAME),_0x11321f=getCliVersionFromPkg(),_0x2d63a8=readRawConfig(),_0x55169c=_0x5405d5||(typeof _0x3c1135?.[_0x31399f(0x13b)]===_0x31399f(0x13c)?_0x3c1135['appcode']:undefined)||(typeof _0x3c1135?.[_0x31399f(0x129)]===_0x31399f(0x13c)?_0x3c1135['app']:undefined)||await askAppcode(),_0x11fc48=typeof _0x3c1135?.[_0x31399f(0x139)]==='string'?_0x3c1135['env']:typeof _0x2d63a8['env']===_0x31399f(0x13c)?_0x2d63a8['env']:_0x31399f(0x13d),_0x43bcec=buildCanonicalProjectConfig({..._0x2d63a8,..._0x3c1135},{'appCodes':[_0x55169c],'env':_0x11fc48,'metadata':{'version':_0x11321f,'migratedAt':new Date()[_0x31399f(0x14b)](),'migratedFrom':_0x4c199e}});writeConfigFile(_0x5bc243,_0x43bcec);const _0x5d383f=_0x4c199e+_0x31399f(0x12d);renameSync(_0x4c199e,_0x5d383f),logger['setLogPath'](_0x161003),logger[_0x31399f(0x120)]('init',_0x31399f(0x146),{'from':_0x4c199e,'to':_0x5bc243,'appcode':_0x55169c,'env':_0x43bcec['env']}),console[_0x31399f(0x144)](a154_0x174cb3[_0x31399f(0x12e)](_0x31399f(0x141)+_0x3ec8b3+'\x20→\x20.rabetbase.json')),console[_0x31399f(0x144)](a154_0x174cb3['cyan'](_0x31399f(0x11d)+Object[_0x31399f(0x11f)](_0x43bcec[_0x31399f(0x133)]||{})[_0x31399f(0x13f)](',\x20'))),console[_0x31399f(0x144)](a154_0x174cb3[_0x31399f(0x127)](_0x31399f(0x131)+_0x43bcec[_0x31399f(0x126)])),console[_0x31399f(0x144)](a154_0x174cb3[_0x31399f(0x137)]('\x20\x20Old\x20file\x20backed\x20up\x20as\x20'+_0x3ec8b3+_0x31399f(0x12d)));return;}const _0x5edd1a=_0x5405d5||await askAppcode(),_0x55484f=resolve(_0x161003,NEW_CONFIG_NAME),_0x836fd2=getCliVersionFromPkg(),_0x8628a2=readRawConfig(),_0x107bc0=typeof _0x8628a2[_0x31399f(0x139)]===_0x31399f(0x13c)?_0x8628a2[_0x31399f(0x139)]:undefined,_0x1e6807=buildCanonicalProjectConfig({},{'appCodes':[_0x5edd1a],'env':_0x236643||_0x107bc0||_0x31399f(0x13d),'metadata':{'version':_0x836fd2,'createdAt':new Date()[_0x31399f(0x14b)]()}});writeConfigFile(_0x55484f,_0x1e6807),logger[_0x31399f(0x122)](_0x161003),logger[_0x31399f(0x120)]('init',_0x31399f(0x149),{'appcode':_0x5edd1a,'env':_0x1e6807['env'],'version':_0x1e6807[_0x31399f(0x147)],'configPath':_0x55484f}),console['log'](a154_0x174cb3[_0x31399f(0x12e)]('✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory')),console[_0x31399f(0x144)](a154_0x174cb3[_0x31399f(0x127)](_0x31399f(0x11d)+Object[_0x31399f(0x11f)](_0x1e6807[_0x31399f(0x133)]||{})[_0x31399f(0x13f)](',\x20'))),console[_0x31399f(0x144)](a154_0x174cb3[_0x31399f(0x127)]('\x20\x20Default:\x20'+_0x1e6807[_0x31399f(0x126)])),console[_0x31399f(0x144)]('\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27'+CLI_BIN_NAME+'\x20api\x20generate\x27\x20and\x20\x27'+CLI_BIN_NAME+'\x20api\x20pull\x27');}function askAppcode(){const _0x3edf72=a154_0x9052;return input({'message':_0x3edf72(0x12f),'validate':_0x580810=>{const _0x521007=_0x3edf72;if(!_0x580810[_0x521007(0x12a)]())return'App\x20Code\x20cannot\x20be\x20empty';const {valid:_0x54878c,message:_0x108a13}=validateAppcode(_0x580810[_0x521007(0x12a)]());return _0x54878c||_0x108a13||'Invalid\x20App\x20Code';}});}function getCliVersionFromPkg(){const _0x171e5=a154_0x9052;try{const _0x3f7fb2=fileURLToPath(import.meta.url),_0x2d7fa2=resolve(dirname(_0x3f7fb2),_0x171e5(0x140)),_0x1aa228=JSON[_0x171e5(0x128)](readFileSync(resolve(_0x2d7fa2,'package.json'),_0x171e5(0x145)));return _0x1aa228['version']||_0x171e5(0x14a);}catch{return _0x171e5(0x14a);}}
1
+ (function(_0x73c781,_0x44b721){const _0xaea2aa=a154_0x5b55,_0x184950=_0x73c781();while(!![]){try{const _0xb68631=-parseInt(_0xaea2aa(0x138))/0x1*(parseInt(_0xaea2aa(0x13b))/0x2)+-parseInt(_0xaea2aa(0x143))/0x3*(-parseInt(_0xaea2aa(0x13e))/0x4)+-parseInt(_0xaea2aa(0x131))/0x5+-parseInt(_0xaea2aa(0x130))/0x6+-parseInt(_0xaea2aa(0x124))/0x7*(parseInt(_0xaea2aa(0x12a))/0x8)+parseInt(_0xaea2aa(0x13a))/0x9+parseInt(_0xaea2aa(0x155))/0xa;if(_0xb68631===_0x44b721)break;else _0x184950['push'](_0x184950['shift']());}catch(_0x348ff0){_0x184950['push'](_0x184950['shift']());}}}(a154_0x27e1,0xcc8e8));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';function a154_0x27e1(){const _0x32bfc7=['package.json','parse','cyan','app','../..','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','53195690pYVbEx','env','production','\x20\x20appcode:\x20','keys','21WqgHFJ','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','Please\x20enter\x20App\x20Code:','\x20api\x20pull\x27','utf8','version','4424744tgAzUU','1.0.0','appcode','string','join','\x20workspace\x20init`\x20to\x20start\x20fresh.','5711208YXZIed','7152565DevUYy','\x20api\x20generate\x27\x20and\x20\x27','defaultApp','.bak','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','apps','gray','308026oPynWz','从旧配置文件升级成功','7246926jjrzKC','10TiQWrG','cwd','✓\x20Upgraded\x20','1179484lwVvqz','bold','\x20\x20Apps:\x20','App\x20Code\x20cannot\x20be\x20empty','init','3ijnRcd','Invalid\x20App\x20Code','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','toLocaleString','setLogPath','log','green','info','\x20\x20Default:\x20','trim','?\x20(Old\x20file\x20→\x20*.bak)','\x20→\x20.rabetbase.json'];a154_0x27e1=function(){return _0x32bfc7;};return a154_0x27e1();}import{fileURLToPath}from'node:url';import a154_0x349f9f from'chalk';import{input,confirm}from'@inquirer/prompts';function a154_0x5b55(_0x2dfd8e,_0x152cdd){_0x2dfd8e=_0x2dfd8e-0x123;const _0x27e132=a154_0x27e1();let _0x5b553d=_0x27e132[_0x2dfd8e];return _0x5b553d;}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(_0x2d923d){const _0x415899=a154_0x5b55,{appcode:_0x3bbe6b,env:_0x9ccc0d,autoYes:_0x58ac36}=_0x2d923d,_0xf144d=process[_0x415899(0x13c)]();if(getProjectConfigPath())throw new Error(_0x415899(0x154));let _0x594fd6;for(const _0x3d100c of LEGACY_CONFIG_NAMES){const _0x19b6fa=resolve(_0xf144d,_0x3d100c);if(existsSync(_0x19b6fa)){_0x594fd6=_0x19b6fa;break;}}if(_0x594fd6){let _0x5d7894={};try{_0x5d7894=JSON[_0x415899(0x150)](readFileSync(_0x594fd6,_0x415899(0x128)));}catch{}const _0x2f6ba5=basename(_0x594fd6),_0x41808c=_0x5d7894?.[_0x415899(0x12c)]||_0x5d7894?.['app'];let _0x41d7cd=_0x58ac36;!_0x58ac36&&(console['log'](a154_0x349f9f['yellow']('⚠\x20Found\x20legacy\x20configuration\x20file:\x20'+a154_0x349f9f[_0x415899(0x13f)](_0x2f6ba5))),_0x41808c&&console[_0x415899(0x148)](a154_0x349f9f['cyan'](_0x415899(0x158)+_0x41808c)),_0x41d7cd=await confirm({'message':'Upgrade\x20it\x20to\x20'+a154_0x349f9f['bold']('.rabetbase.json')+_0x415899(0x14d),'default':!![]}));if(!_0x41d7cd){console[_0x415899(0x148)]('Migration\x20cancelled.\x20Run\x20`'+CLI_BIN_NAME+_0x415899(0x12f));return;}const _0x54ccc9=resolve(_0xf144d,NEW_CONFIG_NAME),_0x1106ac=getCliVersionFromPkg(),_0x2d3cb1=readRawConfig(),_0x2a7e60=_0x3bbe6b||(typeof _0x5d7894?.[_0x415899(0x12c)]===_0x415899(0x12d)?_0x5d7894[_0x415899(0x12c)]:undefined)||(typeof _0x5d7894?.[_0x415899(0x152)]===_0x415899(0x12d)?_0x5d7894[_0x415899(0x152)]:undefined)||await askAppcode(),_0x146cbf=typeof _0x5d7894?.[_0x415899(0x156)]===_0x415899(0x12d)?_0x5d7894[_0x415899(0x156)]:typeof _0x2d3cb1['env']===_0x415899(0x12d)?_0x2d3cb1[_0x415899(0x156)]:_0x415899(0x157),_0xb8a442=buildCanonicalProjectConfig({..._0x2d3cb1,..._0x5d7894},{'appCodes':[_0x2a7e60],'env':_0x146cbf,'metadata':{'version':_0x1106ac,'migratedAt':new Date()[_0x415899(0x146)](),'migratedFrom':_0x594fd6}});writeConfigFile(_0x54ccc9,_0xb8a442);const _0x5c4043=_0x594fd6+_0x415899(0x134);renameSync(_0x594fd6,_0x5c4043),logger[_0x415899(0x147)](_0xf144d),logger[_0x415899(0x14a)](_0x415899(0x142),_0x415899(0x139),{'from':_0x594fd6,'to':_0x54ccc9,'appcode':_0x2a7e60,'env':_0xb8a442['env']}),console['log'](a154_0x349f9f[_0x415899(0x149)](_0x415899(0x13d)+_0x2f6ba5+_0x415899(0x14e))),console[_0x415899(0x148)](a154_0x349f9f[_0x415899(0x151)](_0x415899(0x140)+Object[_0x415899(0x123)](_0xb8a442[_0x415899(0x136)]||{})[_0x415899(0x12e)](',\x20'))),console[_0x415899(0x148)](a154_0x349f9f['cyan']('\x20\x20Default:\x20'+_0xb8a442['defaultApp'])),console[_0x415899(0x148)](a154_0x349f9f[_0x415899(0x137)](_0x415899(0x125)+_0x2f6ba5+_0x415899(0x134)));return;}const _0x53cddf=_0x3bbe6b||await askAppcode(),_0x2d81d2=resolve(_0xf144d,NEW_CONFIG_NAME),_0x22ecd0=getCliVersionFromPkg(),_0x27aad0=readRawConfig(),_0x518447=typeof _0x27aad0[_0x415899(0x156)]===_0x415899(0x12d)?_0x27aad0[_0x415899(0x156)]:undefined,_0x332cfd=buildCanonicalProjectConfig({},{'appCodes':[_0x53cddf],'env':_0x9ccc0d||_0x518447||_0x415899(0x157),'metadata':{'version':_0x22ecd0,'createdAt':new Date()[_0x415899(0x146)]()}});writeConfigFile(_0x2d81d2,_0x332cfd),logger[_0x415899(0x147)](_0xf144d),logger['info']('init','初始化项目配置文件成功',{'appcode':_0x53cddf,'env':_0x332cfd[_0x415899(0x156)],'version':_0x332cfd[_0x415899(0x129)],'configPath':_0x2d81d2}),console[_0x415899(0x148)](a154_0x349f9f['green'](_0x415899(0x135))),console[_0x415899(0x148)](a154_0x349f9f['cyan']('\x20\x20Apps:\x20'+Object['keys'](_0x332cfd['apps']||{})[_0x415899(0x12e)](',\x20'))),console['log'](a154_0x349f9f[_0x415899(0x151)](_0x415899(0x14b)+_0x332cfd[_0x415899(0x133)])),console['log'](_0x415899(0x145)+CLI_BIN_NAME+_0x415899(0x132)+CLI_BIN_NAME+_0x415899(0x127));}function askAppcode(){const _0x5776ac=a154_0x5b55;return input({'message':_0x5776ac(0x126),'validate':_0xb8fd5a=>{const _0x4d259c=_0x5776ac;if(!_0xb8fd5a[_0x4d259c(0x14c)]())return _0x4d259c(0x141);const {valid:_0x472668,message:_0x2e3206}=validateAppcode(_0xb8fd5a['trim']());return _0x472668||_0x2e3206||_0x4d259c(0x144);}});}function getCliVersionFromPkg(){const _0xaabcc6=a154_0x5b55;try{const _0xf7aa76=fileURLToPath(import.meta.url),_0x1700f7=resolve(dirname(_0xf7aa76),_0xaabcc6(0x153)),_0x2013b3=JSON['parse'](readFileSync(resolve(_0x1700f7,_0xaabcc6(0x14f)),_0xaabcc6(0x128)));return _0x2013b3[_0xaabcc6(0x129)]||_0xaabcc6(0x12b);}catch{return _0xaabcc6(0x12b);}}
@@ -1 +1 @@
1
- const a155_0x4705f5=a155_0x5ba0;(function(_0x1b3c5c,_0x3220a7){const _0x4c8149=a155_0x5ba0,_0x700387=_0x1b3c5c();while(!![]){try{const _0x3119b4=parseInt(_0x4c8149(0x1dd))/0x1*(parseInt(_0x4c8149(0x1eb))/0x2)+parseInt(_0x4c8149(0x23e))/0x3*(-parseInt(_0x4c8149(0x200))/0x4)+parseInt(_0x4c8149(0x22c))/0x5+parseInt(_0x4c8149(0x22d))/0x6+parseInt(_0x4c8149(0x205))/0x7+parseInt(_0x4c8149(0x1dc))/0x8*(parseInt(_0x4c8149(0x23a))/0x9)+-parseInt(_0x4c8149(0x1e6))/0xa*(parseInt(_0x4c8149(0x243))/0xb);if(_0x3119b4===_0x3220a7)break;else _0x700387['push'](_0x700387['shift']());}catch(_0x39a134){_0x700387['push'](_0x700387['shift']());}}}(a155_0x2806,0x79793));import a155_0x3b0fbc from'chalk';import a155_0x190b8e 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[a155_0x4705f5(0x204)](_0x206efb=>_0x206efb!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x581c38){const _0x383281=a155_0x4705f5,_0x1b9832=[];for(const _0x5ca1a2 of Object[_0x383281(0x212)](CORE_IDE_CONFIGS)){if(_0x5ca1a2['files'])for(const _0x29caa4 of _0x5ca1a2[_0x383281(0x236)]){_0x1b9832[_0x383281(0x1f5)](resolve(_0x581c38,_0x29caa4['path']));}}return _0x1b9832;}function analyse(_0x484e81){const _0x52f2b5=a155_0x4705f5;let _0x6ecfd2=null;const _0x526432=resolve(_0x484e81,NEW_CONFIG_NAME),_0x52af8d=existsSync(_0x526432);for(const _0xa2217e of LEGACY_CONFIG_NAMES){const _0x71e4aa=resolve(_0x484e81,_0xa2217e);if(existsSync(_0x71e4aa)){const _0x1374cc=readConfigFile(_0x71e4aa),_0x206b75=Object[_0x52f2b5(0x208)](_0x1374cc)[_0x52f2b5(0x204)](_0x299216=>typeof _0x1374cc[_0x299216]!==_0x52f2b5(0x1e2));_0x6ecfd2={'oldPath':_0x71e4aa,'hasNewConfig':_0x52af8d,'fields':_0x206b75};break;}}const _0x182bf2=[],_0x3cf6f0=resolve(_0x484e81,_0x52f2b5(0x1d7));if(existsSync(_0x3cf6f0))_0x182bf2['push'](_0x3cf6f0);const _0x4b3dc6=resolve(_0x484e81,_0x52f2b5(0x240));if(existsSync(_0x4b3dc6))_0x182bf2[_0x52f2b5(0x1f5)](_0x4b3dc6);const _0x5853f4=resolve(_0x484e81,_0x52f2b5(0x234));if(existsSync(_0x5853f4))_0x182bf2[_0x52f2b5(0x1f5)](_0x5853f4);for(const _0x503ae5 of collectIdeSkillFiles(_0x484e81)){if(existsSync(_0x503ae5))_0x182bf2[_0x52f2b5(0x1f5)](_0x503ae5);}let _0x2dbbd7=null;const _0xbb5757=resolve(_0x484e81,'.cursor/mcp.json');if(existsSync(_0xbb5757))try{const _0x3cb5a2=JSON[_0x52f2b5(0x229)](readFileSync(_0xbb5757,_0x52f2b5(0x252)));if(_0x3cb5a2?.[_0x52f2b5(0x248)]&&typeof _0x3cb5a2['mcpServers']===_0x52f2b5(0x21e)){const _0x2da1b7=[];for(const [_0x8aeac3,_0x7db0f3]of Object[_0x52f2b5(0x1e9)](_0x3cb5a2[_0x52f2b5(0x248)])){const _0x40bfc0=_0x7db0f3;_0x40bfc0?.[_0x52f2b5(0x223)]&&Array['isArray'](_0x40bfc0[_0x52f2b5(0x223)])&&_0x40bfc0[_0x52f2b5(0x223)][_0x52f2b5(0x239)](_0x44683b=>typeof _0x44683b===_0x52f2b5(0x1e3)&&_0x44683b[_0x52f2b5(0x1ef)](_0x52f2b5(0x24e)))&&_0x2da1b7['push'](_0x8aeac3);}_0x2da1b7[_0x52f2b5(0x224)]>0x0&&(_0x2dbbd7={'path':_0xbb5757,'keys':_0x2da1b7});}}catch{}const _0x6653a3=_0x182bf2['length']>0x0||_0x6ecfd2!==null;let _0x4bec7a=null;const _0x18f90d=resolve(_0x484e81,_0x52f2b5(0x1da));if(existsSync(_0x18f90d))try{const _0x2c6b48=JSON[_0x52f2b5(0x229)](readFileSync(_0x18f90d,_0x52f2b5(0x252)));for(const _0x5275a8 of[_0x52f2b5(0x21d),_0x52f2b5(0x202)]){const _0x290d82=_0x2c6b48?.[_0x5275a8]?.[_0x52f2b5(0x211)];if(typeof _0x290d82===_0x52f2b5(0x1e3)){_0x290d82!==_0x52f2b5(0x228)&&(_0x4bec7a={'pkgPath':_0x18f90d,'currentVersion':_0x290d82,'field':_0x5275a8});break;}}}catch{}return{'configMigration':_0x6ecfd2,'oldArtifacts':_0x182bf2,'oldMcpConfig':_0x2dbbd7,'needsSkillSwap':_0x6653a3,'sdkUpgrade':_0x4bec7a};}function printReport(_0x49f63c){const _0x69174b=a155_0x4705f5,{configMigration:_0x15d277,oldArtifacts:_0x47a9fb,oldMcpConfig:_0x349572,needsSkillSwap:_0xab4139}=_0x49f63c;console[_0x69174b(0x203)](''),console['log'](a155_0x3b0fbc[_0x69174b(0x22e)](_0x69174b(0x231))),console['log']('');_0x15d277?(console[_0x69174b(0x203)](a155_0x3b0fbc[_0x69174b(0x242)](_0x69174b(0x1d5))+('\x20\x20'+a155_0x3b0fbc[_0x69174b(0x1d2)](_0x15d277[_0x69174b(0x222)]))),console[_0x69174b(0x203)](_0x69174b(0x210)+(_0x15d277[_0x69174b(0x1de)]?a155_0x3b0fbc[_0x69174b(0x1f3)]('already\x20exists\x20(will\x20merge)'):a155_0x3b0fbc['gray']('not\x20found\x20(will\x20create)'))),console[_0x69174b(0x203)]('\x20\x20Fields\x20to\x20migrate:\x20'+_0x15d277[_0x69174b(0x23b)][_0x69174b(0x23c)](',\x20')),console[_0x69174b(0x203)](_0x69174b(0x1d9))):console['log'](a155_0x3b0fbc[_0x69174b(0x242)](_0x69174b(0x1d5))+'\x20\x20'+a155_0x3b0fbc[_0x69174b(0x20b)](_0x69174b(0x219)));console['log']('');if(_0x47a9fb['length']>0x0){console['log'](a155_0x3b0fbc[_0x69174b(0x242)](_0x69174b(0x21c)));for(const _0x532019 of _0x47a9fb){console[_0x69174b(0x203)]('\x20\x20'+a155_0x3b0fbc[_0x69174b(0x206)](_0x69174b(0x1cf))+'\x20\x20'+_0x532019);}console[_0x69174b(0x203)](_0x69174b(0x1d8));}else console['log'](a155_0x3b0fbc[_0x69174b(0x242)](_0x69174b(0x21c))+'\x20\x20'+a155_0x3b0fbc['gray'](_0x69174b(0x1f6)));console['log']('');_0x349572?(console[_0x69174b(0x203)](a155_0x3b0fbc[_0x69174b(0x242)]('MCP\x20config:')+('\x20\x20'+a155_0x3b0fbc[_0x69174b(0x1d2)](_0x349572['path'])+_0x69174b(0x227)+_0x349572[_0x69174b(0x208)][_0x69174b(0x23c)](',\x20'))),console['log'](_0x69174b(0x1e8))):console[_0x69174b(0x203)](a155_0x3b0fbc['cyan'](_0x69174b(0x1d1))+'\x20\x20'+a155_0x3b0fbc[_0x69174b(0x20b)](_0x69174b(0x249)));console[_0x69174b(0x203)](''),console[_0x69174b(0x203)](a155_0x3b0fbc[_0x69174b(0x242)]('Skill\x20swap:')+('\x20\x20'+(_0xab4139?a155_0x3b0fbc['yellow'](_0x69174b(0x1ea)):a155_0x3b0fbc[_0x69174b(0x1f3)]('not\x20needed'))));_0xab4139&&console[_0x69174b(0x203)]('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x69174b(0x203)]('');if(_0x49f63c[_0x69174b(0x1fd)]){const {currentVersion:_0x11f1e1,field:_0x7ddae4,pkgPath:_0x1376e4}=_0x49f63c[_0x69174b(0x1fd)];console[_0x69174b(0x203)](a155_0x3b0fbc[_0x69174b(0x242)](_0x69174b(0x246))+('\x20\x20'+a155_0x3b0fbc[_0x69174b(0x1d2)](_0x1376e4))),console[_0x69174b(0x203)](_0x69174b(0x20e)+_0x7ddae4+':\x20'+a155_0x3b0fbc[_0x69174b(0x1d2)](_0x11f1e1)+'\x20→\x20'+a155_0x3b0fbc[_0x69174b(0x1f3)](_0x69174b(0x228))),console[_0x69174b(0x203)](_0x69174b(0x237));}else console['log'](a155_0x3b0fbc[_0x69174b(0x242)](_0x69174b(0x246))+'\x20\x20'+a155_0x3b0fbc['gray'](_0x69174b(0x241)));console['log']('');}function execConfigMigration(_0x5bac63,_0x10c112){const _0x5ad91b=a155_0x4705f5,{configMigration:_0x28727c}=_0x5bac63;if(!_0x28727c?.['oldPath'])return{'step':0x1,'label':_0x5ad91b(0x214),'ok':!![],'detail':_0x5ad91b(0x24b)};const _0x177743=readConfigFile(_0x28727c[_0x5ad91b(0x222)]),_0x4f848d=resolve(_0x10c112,NEW_CONFIG_NAME),_0x1a69b5=_0x28727c[_0x5ad91b(0x1de)]?readConfigFile(_0x4f848d):{};for(const [_0x46868f,_0x2b1c8a]of Object[_0x5ad91b(0x1e9)](_0x177743)){!(_0x46868f in _0x1a69b5)&&(_0x1a69b5[_0x46868f]=_0x2b1c8a);}writeConfigFile(_0x4f848d,_0x1a69b5);const _0x3ef69b=_0x28727c[_0x5ad91b(0x222)]+_0x5ad91b(0x1db);return renameSync(_0x28727c['oldPath'],_0x3ef69b),{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x28727c[_0x5ad91b(0x222)]+_0x5ad91b(0x1e5)+_0x4f848d+_0x5ad91b(0x1e1)+_0x3ef69b+')'};}function a155_0x2806(){const _0x3c8e88=['.lovrabet','\x20\x20Action:\x20delete','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','package.json','.bak','80VbVNlM','11cKFNrs','hasNewConfig','CANCEL','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','\x20(backup:\x20','undefined','string','\x20\x20bun\x20install','\x20→\x20','48610yyyMTW','oldMcpConfig','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','entries','needed','112618VyalBC','stringify','\x20removed\x20(','FAIL','includes','no\x20matching\x20entry\x20found','succeed','Remove\x20legacy\x20artifacts','green','Proceed\x20with\x20upgrade?','push','none\x20found','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','isArray','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','failed','Clean\x20MCP\x20config','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','sdkUpgrade','[\x22@lovrabet/sdk\x22]:\x20','Upgrade\x20@lovrabet/sdk','375644LjzDdt','removed\x20','devDependencies','log','filter','1387645NnfNxP','red','Remove\x20old\x20skill','keys','Upgrade\x20cancelled.','fail','gray','start','white','\x20\x20Current\x20version\x20in\x20','\x20\x20\x20\x20\x20\x20\x20','\x20\x20New\x20config\x20(.rabetbase.json):\x20','@lovrabet/sdk','values','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','Config\x20migration','Step\x205/7:\x20Removing\x20old\x20skill...','yes','\x20→\x20latest','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','no\x20legacy\x20config\x20found','oldArtifacts','Step\x204/7:\x20MCP\x20config\x20—\x20','Legacy\x20artifacts:','dependencies','object','exit\x20','Upgrade\x20completed\x20successfully!','\x20removed','oldPath','args','length','\x20\x20Step\x20','\x20\x20#\x20or','\x20→\x20keys:\x20','latest','parse','error','cwd','83105ISRCij','3838650BVJOxP','bold','skipped','Step\x204/7:\x20Cleaning\x20MCP\x20config...','===\x20Upgrade\x20Analysis\x20===','Remove\x20.lovrabet/','lovrabet/lovrabet-skill\x20removed','.claude/skills/lovrabet','\x20\x20npm\x20install','files','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','configMigration','some','513603bjlImo','fields','join','detail','12elncTu','needsSkillSwap','.cursor/rules/lovrabet_rules.mdc','not\x20found\x20or\x20already\x20at\x20latest','cyan','2651ddKBDw','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','message','@lovrabet/sdk:','status','mcpServers','no\x20legacy\x20entry','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','skipped\x20(no\x20legacy\x20config)','path','lovrabet/rabetbase\x20installed\x20globally','@lovrabet/dataset-mcp-server','info','Step\x206/7:\x20Installing\x20new\x20skill...','Install\x20new\x20skill','utf8','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','FOUND','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','MCP\x20config:','yellow','isDirectory','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','Config\x20file:','done'];a155_0x2806=function(){return _0x3c8e88;};return a155_0x2806();}function execRemoveOldArtifacts(_0x1c75d0){const _0x2974dc=a155_0x4705f5,_0x336d6a=[];for(const _0x571c91 of _0x1c75d0){try{if(!existsSync(_0x571c91))continue;const _0x423ea2=tryStat(_0x571c91);_0x423ea2?.[_0x2974dc(0x1d3)]()?rmSync(_0x571c91,{'recursive':!![],'force':!![]}):unlinkSync(_0x571c91);}catch(_0x10cf08){_0x336d6a[_0x2974dc(0x1f5)](_0x571c91+':\x20'+_0x10cf08[_0x2974dc(0x245)]);}}return{'step':0x3,'label':_0x2974dc(0x1f2),'ok':_0x336d6a[_0x2974dc(0x224)]===0x0,'detail':_0x336d6a[_0x2974dc(0x224)]>0x0?_0x1c75d0[_0x2974dc(0x224)]-_0x336d6a[_0x2974dc(0x224)]+'/'+_0x1c75d0[_0x2974dc(0x224)]+_0x2974dc(0x1ed)+_0x336d6a[_0x2974dc(0x23c)](';\x20')+')':_0x1c75d0[_0x2974dc(0x224)]+_0x2974dc(0x221)};}function execCleanMcp(_0x2eb49f){const _0x3d651f=a155_0x4705f5;if(!_0x2eb49f[_0x3d651f(0x1e7)])return{'step':0x4,'label':_0x3d651f(0x1fb),'ok':!![],'detail':_0x3d651f(0x22f)};try{const _0x5a56e3=readFileSync(_0x2eb49f[_0x3d651f(0x1e7)]['path'],_0x3d651f(0x252)),_0x1a8d36=JSON[_0x3d651f(0x229)](_0x5a56e3);if(_0x1a8d36?.['mcpServers']&&typeof _0x1a8d36['mcpServers']==='object'){const _0x5398e9=[];for(const [_0x5f4915,_0x2126ac]of Object['entries'](_0x1a8d36['mcpServers'])){_0x2126ac?.['args']&&Array[_0x3d651f(0x1f8)](_0x2126ac[_0x3d651f(0x223)])&&_0x2126ac[_0x3d651f(0x223)]['some'](_0x5deddf=>typeof _0x5deddf==='string'&&_0x5deddf[_0x3d651f(0x1ef)](_0x3d651f(0x24e)))&&_0x5398e9[_0x3d651f(0x1f5)](_0x5f4915);}for(const _0xc25bcd of _0x5398e9){delete _0x1a8d36['mcpServers'][_0xc25bcd];}return _0x5398e9[_0x3d651f(0x224)]>0x0&&writeFileSync(_0x2eb49f[_0x3d651f(0x1e7)]['path'],JSON[_0x3d651f(0x1ec)](_0x1a8d36,null,0x2)+'\x0a',_0x3d651f(0x252)),{'step':0x4,'label':_0x3d651f(0x1fb),'ok':!![],'detail':_0x3d651f(0x201)+_0x5398e9[_0x3d651f(0x23c)](',\x20')+'\x20from\x20'+_0x2eb49f[_0x3d651f(0x1e7)][_0x3d651f(0x24c)]};}return{'step':0x4,'label':_0x3d651f(0x1fb),'ok':!![],'detail':_0x3d651f(0x1f0)};}catch(_0x3b19b4){return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':![],'detail':_0x3b19b4[_0x3d651f(0x245)]};}}function a155_0x5ba0(_0x2a3f8b,_0x50b872){_0x2a3f8b=_0x2a3f8b-0x1cf;const _0x280601=a155_0x2806();let _0x5ba0f7=_0x280601[_0x2a3f8b];return _0x5ba0f7;}function execSkillsRemove(_0x24b048,_0x332bba){const _0x2a5ff5=a155_0x4705f5,_0x3d38b3=runNpxSkillsRemove(_0x24b048,{'stdio':'inherit','yes':_0x332bba});return{'step':0x5,'label':_0x2a5ff5(0x207),'ok':_0x3d38b3['ok'],'detail':_0x3d38b3['ok']?_0x2a5ff5(0x233):_0x3d38b3[_0x2a5ff5(0x22a)]??_0x2a5ff5(0x21f)+_0x3d38b3['status']};}function execSkillsAdd(_0x58a051,_0x8c78ef){const _0x5e4594=a155_0x4705f5,_0x26b528=runNpxSkillsAddGlobal(_0x58a051,'lovrabet/rabetbase',{'stdio':'inherit','yes':_0x8c78ef});return{'step':0x6,'label':_0x5e4594(0x251),'ok':_0x26b528['ok'],'detail':_0x26b528['ok']?_0x5e4594(0x24d):_0x26b528[_0x5e4594(0x22a)]??_0x5e4594(0x21f)+_0x26b528[_0x5e4594(0x247)]};}function execUpgradeSdk(_0x1d05dd){const _0x39d817=a155_0x4705f5;if(!_0x1d05dd[_0x39d817(0x1fd)])return{'step':0x7,'label':_0x39d817(0x1ff),'ok':!![],'detail':_0x39d817(0x213)};const {pkgPath:_0x1cf89e,currentVersion:_0x4ab820,field:_0x8ef9d4}=_0x1d05dd['sdkUpgrade'];try{const _0x5a7967=readFileSync(_0x1cf89e,_0x39d817(0x252)),_0x33916f=JSON[_0x39d817(0x229)](_0x5a7967);return _0x33916f[_0x8ef9d4][_0x39d817(0x211)]=_0x39d817(0x228),writeFileSync(_0x1cf89e,JSON[_0x39d817(0x1ec)](_0x33916f,null,0x2)+'\x0a',_0x39d817(0x252)),{'step':0x7,'label':_0x39d817(0x1ff),'ok':!![],'detail':_0x8ef9d4+_0x39d817(0x1fe)+_0x4ab820+_0x39d817(0x217)};}catch(_0xf038d1){return{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':![],'detail':_0xf038d1[_0x39d817(0x245)]};}}function tryStat(_0x2eefe6){try{return statSync(_0x2eefe6);}catch{return undefined;}}function printSummary(_0x43f961){const _0x2ad75e=a155_0x4705f5;console[_0x2ad75e(0x203)](''),console[_0x2ad75e(0x203)](a155_0x3b0fbc[_0x2ad75e(0x22e)]('===\x20Upgrade\x20Summary\x20===')),console[_0x2ad75e(0x203)]('');for(const _0x49db30 of _0x43f961){const _0x4dada8=_0x49db30['ok']?a155_0x3b0fbc[_0x2ad75e(0x1f3)]('OK'):a155_0x3b0fbc[_0x2ad75e(0x206)](_0x2ad75e(0x1ee));console['log']('\x20\x20'+_0x4dada8+_0x2ad75e(0x225)+_0x49db30['step']+':\x20'+_0x49db30['label']);if(_0x49db30['detail'])console[_0x2ad75e(0x203)](_0x2ad75e(0x20f)+a155_0x3b0fbc[_0x2ad75e(0x20b)](_0x49db30['detail']));}console[_0x2ad75e(0x203)]('');}export async function upgradeApp(_0x3e0685,_0x3841c5){const _0x37810b=a155_0x4705f5,_0x19332d=process[_0x37810b(0x22b)](),_0x278d39=analyse(_0x19332d),_0x3e6ff1=!_0x278d39[_0x37810b(0x238)]&&_0x278d39['oldArtifacts'][_0x37810b(0x224)]===0x0&&!_0x278d39[_0x37810b(0x1e7)]&&!_0x278d39[_0x37810b(0x23f)]&&!_0x278d39[_0x37810b(0x1fd)];if(_0x3e6ff1){console[_0x37810b(0x203)](a155_0x3b0fbc['green'](_0x37810b(0x218)));return;}printReport(_0x278d39);const _0x257092=!!(_0x3841c5[_0x37810b(0x216)]||_0x3841c5['Y']||_0x3e0685);if(!_0x257092)try{const _0x11db57=await askConfirm(_0x37810b(0x1f4));if(!_0x11db57){console[_0x37810b(0x203)](a155_0x3b0fbc['gray'](_0x37810b(0x209)));return;}}catch(_0x4405f3){if(_0x4405f3?.[_0x37810b(0x245)]===_0x37810b(0x1df)){console[_0x37810b(0x203)](a155_0x3b0fbc[_0x37810b(0x20b)]('Upgrade\x20cancelled.'));return;}throw _0x4405f3;}const _0x1f25d3=[],_0x303c13=a155_0x190b8e({'text':'Step\x201/7:\x20Migrating\x20config...','color':_0x37810b(0x242)})[_0x37810b(0x20c)](),_0x3069c0=execConfigMigration(_0x278d39,_0x19332d);_0x1f25d3[_0x37810b(0x1f5)](_0x3069c0),_0x303c13[_0x3069c0['ok']?_0x37810b(0x1f1):_0x37810b(0x20a)]('Step\x201/7:\x20Config\x20migration\x20—\x20'+(_0x3069c0[_0x37810b(0x23d)]??(_0x3069c0['ok']?_0x37810b(0x1d6):_0x37810b(0x1fa))));const _0x70063f=resolve(_0x19332d,_0x37810b(0x1d7)),_0x4848f4=a155_0x190b8e({'text':_0x37810b(0x1d0),'color':_0x37810b(0x242)})[_0x37810b(0x20c)]();if(existsSync(_0x70063f))try{rmSync(_0x70063f,{'recursive':!![],'force':!![]}),_0x4848f4[_0x37810b(0x1f1)](_0x37810b(0x244)),_0x1f25d3['push']({'step':0x2,'label':_0x37810b(0x232),'ok':!![]});}catch(_0x2f7147){_0x4848f4['fail']('Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0x2f7147['message']),_0x1f25d3[_0x37810b(0x1f5)]({'step':0x2,'label':_0x37810b(0x232),'ok':![],'detail':_0x2f7147[_0x37810b(0x245)]});}else _0x4848f4[_0x37810b(0x24f)](_0x37810b(0x1f9)),_0x1f25d3['push']({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![],'detail':_0x37810b(0x22f)});const _0x329b05=a155_0x190b8e({'text':_0x37810b(0x1d4),'color':_0x37810b(0x242)})[_0x37810b(0x20c)](),_0x2543d1=execRemoveOldArtifacts(_0x278d39[_0x37810b(0x21a)]);_0x1f25d3['push'](_0x2543d1),_0x329b05[_0x2543d1['ok']?_0x37810b(0x1f1):_0x37810b(0x20a)]('Step\x203/7:\x20Legacy\x20artifacts\x20—\x20'+(_0x2543d1['detail']??(_0x2543d1['ok']?_0x37810b(0x1d6):'failed')));const _0x243b6a=a155_0x190b8e({'text':_0x37810b(0x230),'color':'cyan'})[_0x37810b(0x20c)](),_0x19f50c=execCleanMcp(_0x278d39);_0x1f25d3[_0x37810b(0x1f5)](_0x19f50c),_0x243b6a[_0x19f50c['ok']?_0x37810b(0x1f1):_0x37810b(0x20a)](_0x37810b(0x21b)+(_0x19f50c[_0x37810b(0x23d)]??(_0x19f50c['ok']?_0x37810b(0x1d6):_0x37810b(0x1fa))));const _0x2d73b4=a155_0x190b8e({'text':_0x37810b(0x215),'color':_0x37810b(0x242)})[_0x37810b(0x20c)](),_0x1cfa80=execSkillsRemove(_0x19332d,_0x257092);_0x1f25d3[_0x37810b(0x1f5)](_0x1cfa80),_0x2d73b4[_0x1cfa80['ok']?_0x37810b(0x1f1):'fail'](_0x37810b(0x253)+(_0x1cfa80[_0x37810b(0x23d)]??(_0x1cfa80['ok']?'done':_0x37810b(0x1fa))));const _0x24519e=a155_0x190b8e({'text':_0x37810b(0x250),'color':_0x37810b(0x242)})[_0x37810b(0x20c)](),_0x35c87b=execSkillsAdd(_0x19332d,_0x257092);_0x1f25d3[_0x37810b(0x1f5)](_0x35c87b),_0x24519e[_0x35c87b['ok']?_0x37810b(0x1f1):_0x37810b(0x20a)](_0x37810b(0x1f7)+(_0x35c87b[_0x37810b(0x23d)]??(_0x35c87b['ok']?_0x37810b(0x1d6):_0x37810b(0x1fa))));const _0x2fc66d=a155_0x190b8e({'text':_0x37810b(0x1e0),'color':_0x37810b(0x242)})['start'](),_0x42e290=execUpgradeSdk(_0x278d39);_0x1f25d3[_0x37810b(0x1f5)](_0x42e290),_0x2fc66d[_0x42e290['ok']?_0x37810b(0x1f1):_0x37810b(0x20a)](_0x37810b(0x24a)+(_0x42e290[_0x37810b(0x23d)]??(_0x42e290['ok']?_0x37810b(0x1d6):'failed'))),printSummary(_0x1f25d3);const _0x314478=_0x1f25d3[_0x37810b(0x239)](_0x3de35a=>!_0x3de35a['ok']);_0x314478?console[_0x37810b(0x203)](a155_0x3b0fbc[_0x37810b(0x1d2)]('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console['log'](a155_0x3b0fbc['green'](_0x37810b(0x220))),_0x42e290['ok']&&_0x278d39[_0x37810b(0x1fd)]&&(console[_0x37810b(0x203)](''),console['log'](a155_0x3b0fbc[_0x37810b(0x22e)][_0x37810b(0x242)](_0x37810b(0x1fc))),console[_0x37810b(0x203)](a155_0x3b0fbc[_0x37810b(0x242)]('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x37810b(0x203)](''),console['log'](a155_0x3b0fbc['white'](_0x37810b(0x235))),console['log'](a155_0x3b0fbc[_0x37810b(0x20d)](_0x37810b(0x226))),console[_0x37810b(0x203)](a155_0x3b0fbc['white'](_0x37810b(0x1e4))),console[_0x37810b(0x203)](''));}
1
+ const a155_0x1c0b2e=a155_0x1321;(function(_0x37c82a,_0x40add0){const _0x24fba5=a155_0x1321,_0x174b0c=_0x37c82a();while(!![]){try{const _0x526ff4=-parseInt(_0x24fba5(0xcc))/0x1*(-parseInt(_0x24fba5(0xfa))/0x2)+-parseInt(_0x24fba5(0x100))/0x3+parseInt(_0x24fba5(0xb6))/0x4+-parseInt(_0x24fba5(0xbc))/0x5+-parseInt(_0x24fba5(0xd4))/0x6+-parseInt(_0x24fba5(0x12a))/0x7*(parseInt(_0x24fba5(0xdc))/0x8)+parseInt(_0x24fba5(0xd5))/0x9;if(_0x526ff4===_0x40add0)break;else _0x174b0c['push'](_0x174b0c['shift']());}catch(_0x51cd8c){_0x174b0c['push'](_0x174b0c['shift']());}}}(a155_0x16f6,0xb720e));import a155_0x580ef9 from'chalk';import a155_0x9c4165 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 a155_0x16f6(){const _0xc3c93=['gray','Step\x201/7:\x20Config\x20migration\x20—\x20','some','Upgrade\x20@lovrabet/sdk','\x20removed\x20(','Proceed\x20with\x20upgrade?','2674rtaEFx','Config\x20migration','needed','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','failed','detail','\x20\x20Action:\x20delete','configMigration','263112jCIxxC','13187070wAGPGe','join','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','isDirectory','.lovrabet','label','.claude/skills/lovrabet','659544cKckHB','no\x20legacy\x20config\x20found','@lovrabet/sdk:','isArray','Step\x204/7:\x20Cleaning\x20MCP\x20config...','lovrabet/lovrabet-skill\x20removed','FAIL','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','start','undefined','sdkUpgrade','package.json','\x20\x20#\x20or','FOUND','not\x20found\x20or\x20already\x20at\x20latest','Remove\x20.lovrabet/','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','not\x20needed','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','\x20\x20Fields\x20to\x20migrate:\x20','fail','yellow','done','Remove\x20legacy\x20artifacts','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','string','\x20\x20bun\x20install','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','keys','\x20\x20\x20\x20\x20\x20\x20','546Gtbjtu','Step\x205/7:\x20Removing\x20old\x20skill...','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','utf8','cwd','bold','2552076QryQfQ','oldMcpConfig','status','Step\x201/7:\x20Migrating\x20config...','.cursor/mcp.json','stringify','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','Config\x20file:','log','yes','entries','Install\x20new\x20skill','args','Remove\x20old\x20skill','===\x20Upgrade\x20Analysis\x20===','exit\x20','.cursor/rules/lovrabet_rules.mdc','files','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','info','message','dependencies','Legacy\x20artifacts:','devDependencies','oldPath','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','includes','cyan','mcpServers','\x20from\x20','Upgrade\x20cancelled.','\x20→\x20latest','path','push','\x20\x20Step\x20','hasNewConfig','.bak','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','length','lovrabet/rabetbase\x20installed\x20globally','\x20removed','fields','28spUbty','[\x22@lovrabet/sdk\x22]:\x20','MCP\x20config:','@lovrabet/dataset-mcp-server','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','parse','Clean\x20MCP\x20config','Upgrade\x20completed\x20successfully!','latest','inherit','green','skipped','white','error','269104OPMdwx','filter','===\x20Upgrade\x20Summary\x20===','Step\x204/7:\x20MCP\x20config\x20—\x20','removed\x20','@lovrabet/sdk','1440490AdNBxl','needsSkillSwap','object','\x20\x20npm\x20install','\x20→\x20','succeed','step','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','red','\x20\x20New\x20config\x20(.rabetbase.json):\x20'];a155_0x16f6=function(){return _0xc3c93;};return a155_0x16f6();}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[a155_0x1c0b2e(0xb7)](_0x27cd1a=>_0x27cd1a!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x3c172e){const _0x13a261=a155_0x1c0b2e,_0x233b17=[];for(const _0x210650 of Object['values'](CORE_IDE_CONFIGS)){if(_0x210650[_0x13a261(0x111)])for(const _0x4bf521 of _0x210650[_0x13a261(0x111)]){_0x233b17[_0x13a261(0x121)](resolve(_0x3c172e,_0x4bf521[_0x13a261(0x120)]));}}return _0x233b17;}function analyse(_0x1ae51e){const _0x5e6b1d=a155_0x1c0b2e;let _0x30e276=null;const _0x9a989e=resolve(_0x1ae51e,NEW_CONFIG_NAME),_0x277b33=existsSync(_0x9a989e);for(const _0x9a4320 of LEGACY_CONFIG_NAMES){const _0x7f4c64=resolve(_0x1ae51e,_0x9a4320);if(existsSync(_0x7f4c64)){const _0x161b9b=readConfigFile(_0x7f4c64),_0xe46b1d=Object[_0x5e6b1d(0xf8)](_0x161b9b)['filter'](_0x26a791=>typeof _0x161b9b[_0x26a791]!==_0x5e6b1d(0xe5));_0x30e276={'oldPath':_0x7f4c64,'hasNewConfig':_0x277b33,'fields':_0xe46b1d};break;}}const _0x286dad=[],_0x34e672=resolve(_0x1ae51e,_0x5e6b1d(0xd9));if(existsSync(_0x34e672))_0x286dad[_0x5e6b1d(0x121)](_0x34e672);const _0x312356=resolve(_0x1ae51e,_0x5e6b1d(0x110));if(existsSync(_0x312356))_0x286dad[_0x5e6b1d(0x121)](_0x312356);const _0x340893=resolve(_0x1ae51e,_0x5e6b1d(0xdb));if(existsSync(_0x340893))_0x286dad[_0x5e6b1d(0x121)](_0x340893);for(const _0x4ca771 of collectIdeSkillFiles(_0x1ae51e)){if(existsSync(_0x4ca771))_0x286dad[_0x5e6b1d(0x121)](_0x4ca771);}let _0x4b2edd=null;const _0x2b16e9=resolve(_0x1ae51e,_0x5e6b1d(0x104));if(existsSync(_0x2b16e9))try{const _0x509f60=JSON['parse'](readFileSync(_0x2b16e9,_0x5e6b1d(0xfd)));if(_0x509f60?.[_0x5e6b1d(0x11c)]&&typeof _0x509f60['mcpServers']===_0x5e6b1d(0xbe)){const _0x268296=[];for(const [_0x153fdf,_0xaed6c]of Object[_0x5e6b1d(0x10a)](_0x509f60[_0x5e6b1d(0x11c)])){const _0x46d927=_0xaed6c;_0x46d927?.[_0x5e6b1d(0x10c)]&&Array[_0x5e6b1d(0xdf)](_0x46d927[_0x5e6b1d(0x10c)])&&_0x46d927[_0x5e6b1d(0x10c)]['some'](_0x4bbc84=>typeof _0x4bbc84===_0x5e6b1d(0xf5)&&_0x4bbc84[_0x5e6b1d(0x11a)]('@lovrabet/dataset-mcp-server'))&&_0x268296[_0x5e6b1d(0x121)](_0x153fdf);}_0x268296[_0x5e6b1d(0x126)]>0x0&&(_0x4b2edd={'path':_0x2b16e9,'keys':_0x268296});}}catch{}const _0x34f61d=_0x286dad[_0x5e6b1d(0x126)]>0x0||_0x30e276!==null;let _0x14c10a=null;const _0x2df59e=resolve(_0x1ae51e,_0x5e6b1d(0xe7));if(existsSync(_0x2df59e))try{const _0x46274d=JSON[_0x5e6b1d(0x12f)](readFileSync(_0x2df59e,_0x5e6b1d(0xfd)));for(const _0x39c46c of[_0x5e6b1d(0x115),_0x5e6b1d(0x117)]){const _0x87becc=_0x46274d?.[_0x39c46c]?.[_0x5e6b1d(0xbb)];if(typeof _0x87becc===_0x5e6b1d(0xf5)){_0x87becc!==_0x5e6b1d(0x132)&&(_0x14c10a={'pkgPath':_0x2df59e,'currentVersion':_0x87becc,'field':_0x39c46c});break;}}}catch{}return{'configMigration':_0x30e276,'oldArtifacts':_0x286dad,'oldMcpConfig':_0x4b2edd,'needsSkillSwap':_0x34f61d,'sdkUpgrade':_0x14c10a};}function printReport(_0x37b3f9){const _0x54a466=a155_0x1c0b2e,{configMigration:_0x3cc43d,oldArtifacts:_0x4e2567,oldMcpConfig:_0x35c264,needsSkillSwap:_0x2437a8}=_0x37b3f9;console[_0x54a466(0x108)](''),console['log'](a155_0x580ef9[_0x54a466(0xff)](_0x54a466(0x10e))),console[_0x54a466(0x108)]('');_0x3cc43d?(console[_0x54a466(0x108)](a155_0x580ef9[_0x54a466(0x11b)](_0x54a466(0x107))+('\x20\x20'+a155_0x580ef9['yellow'](_0x3cc43d['oldPath']))),console['log'](_0x54a466(0xc5)+(_0x3cc43d[_0x54a466(0x123)]?a155_0x580ef9['green']('already\x20exists\x20(will\x20merge)'):a155_0x580ef9[_0x54a466(0xc6)]('not\x20found\x20(will\x20create)'))),console['log'](_0x54a466(0xef)+_0x3cc43d[_0x54a466(0x129)][_0x54a466(0xd6)](',\x20')),console[_0x54a466(0x108)]('\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak')):console[_0x54a466(0x108)](a155_0x580ef9['cyan']('Config\x20file:')+'\x20\x20'+a155_0x580ef9[_0x54a466(0xc6)](_0x54a466(0xdd)));console[_0x54a466(0x108)]('');if(_0x4e2567[_0x54a466(0x126)]>0x0){console[_0x54a466(0x108)](a155_0x580ef9[_0x54a466(0x11b)](_0x54a466(0x116)));for(const _0x1039a1 of _0x4e2567){console[_0x54a466(0x108)]('\x20\x20'+a155_0x580ef9[_0x54a466(0xc4)](_0x54a466(0xe9))+'\x20\x20'+_0x1039a1);}console['log'](_0x54a466(0xd2));}else console[_0x54a466(0x108)](a155_0x580ef9[_0x54a466(0x11b)](_0x54a466(0x116))+'\x20\x20'+a155_0x580ef9['gray']('none\x20found'));console[_0x54a466(0x108)]('');_0x35c264?(console[_0x54a466(0x108)](a155_0x580ef9[_0x54a466(0x11b)](_0x54a466(0x12c))+('\x20\x20'+a155_0x580ef9['yellow'](_0x35c264['path'])+'\x20→\x20keys:\x20'+_0x35c264[_0x54a466(0xf8)][_0x54a466(0xd6)](',\x20'))),console[_0x54a466(0x108)](_0x54a466(0x119))):console[_0x54a466(0x108)](a155_0x580ef9[_0x54a466(0x11b)](_0x54a466(0x12c))+'\x20\x20'+a155_0x580ef9[_0x54a466(0xc6)]('no\x20legacy\x20entry'));console[_0x54a466(0x108)](''),console[_0x54a466(0x108)](a155_0x580ef9['cyan']('Skill\x20swap:')+('\x20\x20'+(_0x2437a8?a155_0x580ef9[_0x54a466(0xf1)](_0x54a466(0xce)):a155_0x580ef9[_0x54a466(0x134)](_0x54a466(0xed)))));_0x2437a8&&console['log'](_0x54a466(0xee)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console['log']('');if(_0x37b3f9[_0x54a466(0xe6)]){const {currentVersion:_0x36f413,field:_0x130262,pkgPath:_0x159131}=_0x37b3f9[_0x54a466(0xe6)];console[_0x54a466(0x108)](a155_0x580ef9[_0x54a466(0x11b)](_0x54a466(0xde))+('\x20\x20'+a155_0x580ef9[_0x54a466(0xf1)](_0x159131))),console[_0x54a466(0x108)]('\x20\x20Current\x20version\x20in\x20'+_0x130262+':\x20'+a155_0x580ef9[_0x54a466(0xf1)](_0x36f413)+_0x54a466(0xc0)+a155_0x580ef9[_0x54a466(0x134)](_0x54a466(0x132))),console[_0x54a466(0x108)](_0x54a466(0xcf));}else console[_0x54a466(0x108)](a155_0x580ef9[_0x54a466(0x11b)](_0x54a466(0xde))+'\x20\x20'+a155_0x580ef9[_0x54a466(0xc6)](_0x54a466(0xea)));console[_0x54a466(0x108)]('');}function execConfigMigration(_0x1ff9f8,_0x33014a){const _0x2ef45c=a155_0x1c0b2e,{configMigration:_0x271073}=_0x1ff9f8;if(!_0x271073?.[_0x2ef45c(0x118)])return{'step':0x1,'label':_0x2ef45c(0xcd),'ok':!![],'detail':'skipped\x20(no\x20legacy\x20config)'};const _0x2cc713=readConfigFile(_0x271073[_0x2ef45c(0x118)]),_0x5e60ce=resolve(_0x33014a,NEW_CONFIG_NAME),_0x46cb6f=_0x271073['hasNewConfig']?readConfigFile(_0x5e60ce):{};for(const [_0x167b78,_0x159dca]of Object['entries'](_0x2cc713)){!(_0x167b78 in _0x46cb6f)&&(_0x46cb6f[_0x167b78]=_0x159dca);}writeConfigFile(_0x5e60ce,_0x46cb6f);const _0x41d184=_0x271073[_0x2ef45c(0x118)]+_0x2ef45c(0x124);return renameSync(_0x271073[_0x2ef45c(0x118)],_0x41d184),{'step':0x1,'label':_0x2ef45c(0xcd),'ok':!![],'detail':_0x271073[_0x2ef45c(0x118)]+_0x2ef45c(0xc0)+_0x5e60ce+'\x20(backup:\x20'+_0x41d184+')'};}function execRemoveOldArtifacts(_0x174d03){const _0x472f45=a155_0x1c0b2e,_0x348cb8=[];for(const _0x13ee74 of _0x174d03){try{if(!existsSync(_0x13ee74))continue;const _0xbe38db=tryStat(_0x13ee74);_0xbe38db?.[_0x472f45(0xd8)]()?rmSync(_0x13ee74,{'recursive':!![],'force':!![]}):unlinkSync(_0x13ee74);}catch(_0x6cc61b){_0x348cb8[_0x472f45(0x121)](_0x13ee74+':\x20'+_0x6cc61b[_0x472f45(0x114)]);}}return{'step':0x3,'label':_0x472f45(0xf3),'ok':_0x348cb8[_0x472f45(0x126)]===0x0,'detail':_0x348cb8[_0x472f45(0x126)]>0x0?_0x174d03[_0x472f45(0x126)]-_0x348cb8[_0x472f45(0x126)]+'/'+_0x174d03[_0x472f45(0x126)]+_0x472f45(0xca)+_0x348cb8[_0x472f45(0xd6)](';\x20')+')':_0x174d03[_0x472f45(0x126)]+_0x472f45(0x128)};}function execCleanMcp(_0x9f90b7){const _0x54cb15=a155_0x1c0b2e;if(!_0x9f90b7['oldMcpConfig'])return{'step':0x4,'label':_0x54cb15(0x130),'ok':!![],'detail':_0x54cb15(0x135)};try{const _0x7eda97=readFileSync(_0x9f90b7[_0x54cb15(0x101)][_0x54cb15(0x120)],'utf8'),_0x2a7441=JSON['parse'](_0x7eda97);if(_0x2a7441?.['mcpServers']&&typeof _0x2a7441['mcpServers']===_0x54cb15(0xbe)){const _0x5a0a44=[];for(const [_0x5ecdee,_0xdf9c0e]of Object[_0x54cb15(0x10a)](_0x2a7441[_0x54cb15(0x11c)])){_0xdf9c0e?.[_0x54cb15(0x10c)]&&Array['isArray'](_0xdf9c0e[_0x54cb15(0x10c)])&&_0xdf9c0e['args'][_0x54cb15(0xc8)](_0x5e8ce7=>typeof _0x5e8ce7===_0x54cb15(0xf5)&&_0x5e8ce7[_0x54cb15(0x11a)](_0x54cb15(0x12d)))&&_0x5a0a44[_0x54cb15(0x121)](_0x5ecdee);}for(const _0x164f06 of _0x5a0a44){delete _0x2a7441[_0x54cb15(0x11c)][_0x164f06];}return _0x5a0a44[_0x54cb15(0x126)]>0x0&&writeFileSync(_0x9f90b7['oldMcpConfig'][_0x54cb15(0x120)],JSON[_0x54cb15(0x105)](_0x2a7441,null,0x2)+'\x0a',_0x54cb15(0xfd)),{'step':0x4,'label':_0x54cb15(0x130),'ok':!![],'detail':_0x54cb15(0xba)+_0x5a0a44[_0x54cb15(0xd6)](',\x20')+_0x54cb15(0x11d)+_0x9f90b7[_0x54cb15(0x101)]['path']};}return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':'no\x20matching\x20entry\x20found'};}catch(_0xff4082){return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':![],'detail':_0xff4082[_0x54cb15(0x114)]};}}function execSkillsRemove(_0x57456e,_0x516d4e){const _0x178b86=a155_0x1c0b2e,_0x3c15f1=runNpxSkillsRemove(_0x57456e,{'stdio':_0x178b86(0x133),'yes':_0x516d4e});return{'step':0x5,'label':_0x178b86(0x10d),'ok':_0x3c15f1['ok'],'detail':_0x3c15f1['ok']?_0x178b86(0xe1):_0x3c15f1[_0x178b86(0x137)]??_0x178b86(0x10f)+_0x3c15f1[_0x178b86(0x102)]};}function execSkillsAdd(_0x14a2c8,_0x4c5dbe){const _0x3d4dc5=a155_0x1c0b2e,_0x8183cc=runNpxSkillsAddGlobal(_0x14a2c8,'lovrabet/rabetbase',{'stdio':_0x3d4dc5(0x133),'yes':_0x4c5dbe});return{'step':0x6,'label':_0x3d4dc5(0x10b),'ok':_0x8183cc['ok'],'detail':_0x8183cc['ok']?_0x3d4dc5(0x127):_0x8183cc[_0x3d4dc5(0x137)]??'exit\x20'+_0x8183cc[_0x3d4dc5(0x102)]};}function execUpgradeSdk(_0xf386ef){const _0xdcef49=a155_0x1c0b2e;if(!_0xf386ef['sdkUpgrade'])return{'step':0x7,'label':_0xdcef49(0xc9),'ok':!![],'detail':_0xdcef49(0x106)};const {pkgPath:_0xe7dd14,currentVersion:_0xa7ffdd,field:_0x25831f}=_0xf386ef[_0xdcef49(0xe6)];try{const _0x51a5d1=readFileSync(_0xe7dd14,_0xdcef49(0xfd)),_0x6817cc=JSON[_0xdcef49(0x12f)](_0x51a5d1);return _0x6817cc[_0x25831f][_0xdcef49(0xbb)]=_0xdcef49(0x132),writeFileSync(_0xe7dd14,JSON[_0xdcef49(0x105)](_0x6817cc,null,0x2)+'\x0a',_0xdcef49(0xfd)),{'step':0x7,'label':_0xdcef49(0xc9),'ok':!![],'detail':_0x25831f+_0xdcef49(0x12b)+_0xa7ffdd+_0xdcef49(0x11f)};}catch(_0x1cce5b){return{'step':0x7,'label':_0xdcef49(0xc9),'ok':![],'detail':_0x1cce5b['message']};}}function tryStat(_0x21f1e2){try{return statSync(_0x21f1e2);}catch{return undefined;}}function a155_0x1321(_0x5d24b9,_0x427e1d){_0x5d24b9=_0x5d24b9-0xb6;const _0x16f6e2=a155_0x16f6();let _0x1321c9=_0x16f6e2[_0x5d24b9];return _0x1321c9;}function printSummary(_0x455e65){const _0x2e34f9=a155_0x1c0b2e;console[_0x2e34f9(0x108)](''),console[_0x2e34f9(0x108)](a155_0x580ef9[_0x2e34f9(0xff)](_0x2e34f9(0xb8))),console['log']('');for(const _0x49d64b of _0x455e65){const _0x744ff1=_0x49d64b['ok']?a155_0x580ef9[_0x2e34f9(0x134)]('OK'):a155_0x580ef9['red'](_0x2e34f9(0xe2));console[_0x2e34f9(0x108)]('\x20\x20'+_0x744ff1+_0x2e34f9(0x122)+_0x49d64b[_0x2e34f9(0xc2)]+':\x20'+_0x49d64b[_0x2e34f9(0xda)]);if(_0x49d64b[_0x2e34f9(0xd1)])console[_0x2e34f9(0x108)](_0x2e34f9(0xf9)+a155_0x580ef9[_0x2e34f9(0xc6)](_0x49d64b['detail']));}console[_0x2e34f9(0x108)]('');}export async function upgradeApp(_0x32029f,_0x18c7ce){const _0x96aa42=a155_0x1c0b2e,_0x35c18c=process[_0x96aa42(0xfe)](),_0x5500e7=analyse(_0x35c18c),_0x4ebcd2=!_0x5500e7[_0x96aa42(0xd3)]&&_0x5500e7['oldArtifacts'][_0x96aa42(0x126)]===0x0&&!_0x5500e7[_0x96aa42(0x101)]&&!_0x5500e7[_0x96aa42(0xbd)]&&!_0x5500e7[_0x96aa42(0xe6)];if(_0x4ebcd2){console[_0x96aa42(0x108)](a155_0x580ef9[_0x96aa42(0x134)](_0x96aa42(0x125)));return;}printReport(_0x5500e7);const _0x81872a=!!(_0x18c7ce[_0x96aa42(0x109)]||_0x18c7ce['Y']||_0x32029f);if(!_0x81872a)try{const _0x20e951=await askConfirm(_0x96aa42(0xcb));if(!_0x20e951){console[_0x96aa42(0x108)](a155_0x580ef9[_0x96aa42(0xc6)](_0x96aa42(0x11e)));return;}}catch(_0x393fb8){if(_0x393fb8?.[_0x96aa42(0x114)]==='CANCEL'){console[_0x96aa42(0x108)](a155_0x580ef9[_0x96aa42(0xc6)]('Upgrade\x20cancelled.'));return;}throw _0x393fb8;}const _0x4556be=[],_0x25b6a8=a155_0x9c4165({'text':_0x96aa42(0x103),'color':_0x96aa42(0x11b)})['start'](),_0x48232c=execConfigMigration(_0x5500e7,_0x35c18c);_0x4556be['push'](_0x48232c),_0x25b6a8[_0x48232c['ok']?'succeed':'fail'](_0x96aa42(0xc7)+(_0x48232c[_0x96aa42(0xd1)]??(_0x48232c['ok']?'done':'failed')));const _0x195aea=resolve(_0x35c18c,_0x96aa42(0xd9)),_0x3f5a76=a155_0x9c4165({'text':'Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','color':_0x96aa42(0x11b)})['start']();if(existsSync(_0x195aea))try{rmSync(_0x195aea,{'recursive':!![],'force':!![]}),_0x3f5a76[_0x96aa42(0xc1)](_0x96aa42(0xf7)),_0x4556be[_0x96aa42(0x121)]({'step':0x2,'label':_0x96aa42(0xeb),'ok':!![]});}catch(_0x3a6cbc){_0x3f5a76[_0x96aa42(0xf0)](_0x96aa42(0xfc)+_0x3a6cbc[_0x96aa42(0x114)]),_0x4556be[_0x96aa42(0x121)]({'step':0x2,'label':_0x96aa42(0xeb),'ok':![],'detail':_0x3a6cbc[_0x96aa42(0x114)]});}else _0x3f5a76[_0x96aa42(0x113)](_0x96aa42(0x112)),_0x4556be['push']({'step':0x2,'label':_0x96aa42(0xeb),'ok':!![],'detail':_0x96aa42(0x135)});const _0x4167c3=a155_0x9c4165({'text':_0x96aa42(0xf4),'color':_0x96aa42(0x11b)})[_0x96aa42(0xe4)](),_0xa34fe1=execRemoveOldArtifacts(_0x5500e7['oldArtifacts']);_0x4556be[_0x96aa42(0x121)](_0xa34fe1),_0x4167c3[_0xa34fe1['ok']?_0x96aa42(0xc1):_0x96aa42(0xf0)](_0x96aa42(0xc3)+(_0xa34fe1[_0x96aa42(0xd1)]??(_0xa34fe1['ok']?_0x96aa42(0xf2):'failed')));const _0x2f8e0a=a155_0x9c4165({'text':_0x96aa42(0xe0),'color':_0x96aa42(0x11b)})['start'](),_0x558c90=execCleanMcp(_0x5500e7);_0x4556be[_0x96aa42(0x121)](_0x558c90),_0x2f8e0a[_0x558c90['ok']?_0x96aa42(0xc1):_0x96aa42(0xf0)](_0x96aa42(0xb9)+(_0x558c90[_0x96aa42(0xd1)]??(_0x558c90['ok']?_0x96aa42(0xf2):_0x96aa42(0xd0))));const _0x4300c6=a155_0x9c4165({'text':_0x96aa42(0xfb),'color':_0x96aa42(0x11b)})[_0x96aa42(0xe4)](),_0x4c3ee7=execSkillsRemove(_0x35c18c,_0x81872a);_0x4556be[_0x96aa42(0x121)](_0x4c3ee7),_0x4300c6[_0x4c3ee7['ok']?_0x96aa42(0xc1):'fail']('Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20'+(_0x4c3ee7[_0x96aa42(0xd1)]??(_0x4c3ee7['ok']?'done':_0x96aa42(0xd0))));const _0x4b4363=a155_0x9c4165({'text':'Step\x206/7:\x20Installing\x20new\x20skill...','color':_0x96aa42(0x11b)})['start'](),_0xed61f2=execSkillsAdd(_0x35c18c,_0x81872a);_0x4556be[_0x96aa42(0x121)](_0xed61f2),_0x4b4363[_0xed61f2['ok']?_0x96aa42(0xc1):'fail'](_0x96aa42(0xd7)+(_0xed61f2[_0x96aa42(0xd1)]??(_0xed61f2['ok']?_0x96aa42(0xf2):_0x96aa42(0xd0))));const _0x43402f=a155_0x9c4165({'text':_0x96aa42(0x12e),'color':_0x96aa42(0x11b)})['start'](),_0x336249=execUpgradeSdk(_0x5500e7);_0x4556be[_0x96aa42(0x121)](_0x336249),_0x43402f[_0x336249['ok']?_0x96aa42(0xc1):_0x96aa42(0xf0)]('Step\x207/7:\x20@lovrabet/sdk\x20—\x20'+(_0x336249[_0x96aa42(0xd1)]??(_0x336249['ok']?_0x96aa42(0xf2):_0x96aa42(0xd0)))),printSummary(_0x4556be);const _0x25dbe2=_0x4556be[_0x96aa42(0xc8)](_0x4add7d=>!_0x4add7d['ok']);_0x25dbe2?console['log'](a155_0x580ef9['yellow'](_0x96aa42(0xe3))):console[_0x96aa42(0x108)](a155_0x580ef9[_0x96aa42(0x134)](_0x96aa42(0x131))),_0x336249['ok']&&_0x5500e7[_0x96aa42(0xe6)]&&(console[_0x96aa42(0x108)](''),console[_0x96aa42(0x108)](a155_0x580ef9[_0x96aa42(0xff)][_0x96aa42(0x11b)](_0x96aa42(0xec))),console['log'](a155_0x580ef9[_0x96aa42(0x11b)]('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x96aa42(0x108)](''),console[_0x96aa42(0x108)](a155_0x580ef9[_0x96aa42(0x136)](_0x96aa42(0xbf))),console['log'](a155_0x580ef9[_0x96aa42(0x136)](_0x96aa42(0xe8))),console[_0x96aa42(0x108)](a155_0x580ef9[_0x96aa42(0x136)](_0x96aa42(0xf6))),console[_0x96aa42(0x108)](''));}
@@ -1 +1 @@
1
- const a156_0x4e1468=a156_0x14cc;(function(_0x32e98e,_0x1dbbc2){const _0x1d6f67=a156_0x14cc,_0x5f1c87=_0x32e98e();while(!![]){try{const _0x4e7472=-parseInt(_0x1d6f67(0x119))/0x1*(-parseInt(_0x1d6f67(0x10f))/0x2)+parseInt(_0x1d6f67(0x13e))/0x3*(-parseInt(_0x1d6f67(0x134))/0x4)+-parseInt(_0x1d6f67(0x11d))/0x5*(parseInt(_0x1d6f67(0x10a))/0x6)+-parseInt(_0x1d6f67(0x135))/0x7*(parseInt(_0x1d6f67(0x108))/0x8)+-parseInt(_0x1d6f67(0x117))/0x9*(-parseInt(_0x1d6f67(0xf7))/0xa)+-parseInt(_0x1d6f67(0x103))/0xb+parseInt(_0x1d6f67(0x115))/0xc*(parseInt(_0x1d6f67(0x114))/0xd);if(_0x4e7472===_0x1dbbc2)break;else _0x5f1c87['push'](_0x5f1c87['shift']());}catch(_0x313c9d){_0x5f1c87['push'](_0x5f1c87['shift']());}}}(a156_0x61b2,0xb7871));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{taskDefinitions}from'../commands/task/index.js';import{roleDefinitions}from'../commands/role/index.js';import{permitDefinitions}from'../commands/permit/index.js';function a156_0x14cc(_0x5b2eea,_0x1224c6){_0x5b2eea=_0x5b2eea-0xf0;const _0x61b291=a156_0x61b2();let _0x14cc16=_0x61b291[_0x5b2eea];return _0x14cc16;}import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{notificationDefinitions}from'../commands/notification/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{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{authDefinitions}from'../commands/auth/index.js';function a156_0x61b2(){const _0x138f02=['2878948UXpAyN','161dDpVpx','<script>','map','risk','commands','asset-update','hidden','preview','service','3qmozlx','create','`rabetbase\x20skills`\x20has\x20been\x20removed.','wildcardDef','Authentication','Async\x20Tasks','Permissions','login','length','940ciGVFB','Logs','app','has','Schema','Diagnostics','values','get','use','push','App\x20Management','logout','3636589aNEuzB','defaultCommand','app\x20remote','project','Use\x20`rabetbase\x20cli-skill\x20install`\x20to\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill.\x20To\x20install\x20business\x20Skills,\x20use\x20`lovrabet\x20skill\x20install`.','275128HXgBAk','`rabetbase\x20','102TQgmLE','OCR','skills','CLI\x20Built-in\x20Skill','show','8TGIPjr','File','command','Code\x20Generation','app\x20use','3222869YLgzpH','12rwbKuw','filter','97821RozCrI','BFF\x20Scripts','353734IKEsvq','Database\x20Connections','Platform\x20Issue','\x20\x20[write]','26905BurfZb','isSingleCommand','Smart\x20List\x20Pages','build','\x20\x20[high-risk-write]','Instant\x20API','Use\x20`rabetbase\x20workspace\x20use\x20--app\x20<name>`\x20instead.','start','run','Dataset\x20&\x20Operations','skill\x20','Project','Run\x20any\x20package.json\x20script','`rabetbase\x20app\x20remote`\x20has\x20been\x20removed.','write','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20instead.','Workspace','`\x20has\x20been\x20removed.','Runtime\x20App\x20Config\x20Management','read','Roles','set','auth'];a156_0x61b2=function(){return _0x138f02;};return a156_0x61b2();}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(_0xc5286b){const _0x5d586a=a156_0x14cc;for(const _0x23b2a9 of _0xc5286b){definitions[_0x5d586a(0x132)](_0x23b2a9['service']+':'+_0x23b2a9[_0x5d586a(0x111)],_0x23b2a9);let _0x56a9bc=serviceGroups['get'](_0x23b2a9[_0x5d586a(0x13d)]);!_0x56a9bc&&(_0x56a9bc=[],serviceGroups[_0x5d586a(0x132)](_0x23b2a9[_0x5d586a(0x13d)],_0x56a9bc)),_0x56a9bc[_0x5d586a(0x100)](_0x23b2a9);}}function registerDeclarativeService(_0x27fb11,_0x11148e,_0xaabdee){const _0x40740e=a156_0x14cc;registerDefinitions(_0x11148e);_0xaabdee?.['wildcardDef']&&registerDefinitions([_0xaabdee[_0x40740e(0xf1)]]);const _0xb12d29=_0x3e8b17=>_0x3e8b17===_0x40740e(0x130)?'':_0x3e8b17===_0x40740e(0x12b)?_0x40740e(0x11c):_0x40740e(0x121),_0x411f26={'service':_0x11148e[0x0]['service'],'label':_0x27fb11,'commands':_0x11148e[_0x40740e(0x116)](_0x4f3c6c=>!_0x4f3c6c[_0x40740e(0x13b)])[_0x40740e(0x137)](_0x10b94b=>({'command':_0x10b94b[_0x40740e(0x111)],'description':_0x10b94b['description'],'tag':_0xb12d29(_0x10b94b[_0x40740e(0x138)])})),'declarative':!![],'defaultCommand':_0xaabdee?.[_0x40740e(0x104)]??(_0xaabdee?.[_0x40740e(0x11e)]?_0x11148e[0x0][_0x40740e(0x111)]:undefined),'wildcardDef':_0xaabdee?.[_0x40740e(0xf1)],'isSingleCommand':_0xaabdee?.[_0x40740e(0x11e)]};serviceRegistry[_0x40740e(0x100)](_0x411f26),serviceByName[_0x40740e(0x132)](_0x411f26[_0x40740e(0x13d)],_0x411f26);}registerDeclarativeService('Quick\x20Start',initDefinitions,{'defaultCommand':a156_0x4e1468(0x125),'isSingleCommand':!![]}),registerDeclarativeService(a156_0x4e1468(0x128),projectDefinitions),registerDeclarativeService(a156_0x4e1468(0x12d),workspaceDefinitions),registerDeclarativeService(a156_0x4e1468(0x101),appDefinitions),registerDeclarativeService(a156_0x4e1468(0xf2),authDefinitions,{'defaultCommand':a156_0x4e1468(0xf5)}),registerDeclarativeService(a156_0x4e1468(0x126),datasetDefinitions),registerDeclarativeService(a156_0x4e1468(0x11f),pageDefinitions),registerDeclarativeService('API\x20Development',apiDefinitions),registerDeclarativeService(a156_0x4e1468(0x122),dataDefinitions),registerDeclarativeService(a156_0x4e1468(0x118),bffDefinitions),registerDeclarativeService('Notification\x20Configuration',notificationDefinitions),registerDeclarativeService('SQL\x20Queries',sqlDefinitions),registerDeclarativeService(a156_0x4e1468(0x11a),dbDefinitions),registerDeclarativeService('Menu',menuDefinitions),registerDeclarativeService(a156_0x4e1468(0xf3),taskDefinitions),registerDeclarativeService(a156_0x4e1468(0x131),roleDefinitions),registerDeclarativeService(a156_0x4e1468(0xf4),permitDefinitions),registerDeclarativeService(a156_0x4e1468(0x12f),appConfigDefinitions),registerDeclarativeService(a156_0x4e1468(0x11b),issueDefinitions),registerDeclarativeService(a156_0x4e1468(0x110),fileDefinitions),registerDeclarativeService(a156_0x4e1468(0x10b),ocrDefinitions),registerDeclarativeService(a156_0x4e1468(0x112),codegenDefinitions),registerDeclarativeService('Configuration',configDefinitions),registerDeclarativeService(a156_0x4e1468(0xfc),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a156_0x4e1468(0xfb),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a156_0x4e1468(0x10d),cliSkillDefinitions,{'defaultCommand':'install'}),registerDeclarativeService(a156_0x4e1468(0xf8),logsDefinitions,{'defaultCommand':a156_0x4e1468(0x10e)}),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a156_0x4e1468(0xf6)]-0x1];last[a156_0x4e1468(0x139)]=[{'command':a156_0x4e1468(0x136),'description':a156_0x4e1468(0x129),'tag':''}];}export const deprecatedAliases={'create':{'service':a156_0x4e1468(0x106),'command':a156_0x4e1468(0x13f)},'start':{'service':a156_0x4e1468(0x125),'command':a156_0x4e1468(0x124)},'build':{'service':a156_0x4e1468(0x125),'command':a156_0x4e1468(0x120)},'preview':{'service':a156_0x4e1468(0x125),'command':a156_0x4e1468(0x13c)},'logout':{'service':a156_0x4e1468(0x133),'command':a156_0x4e1468(0x102)}};const CLI_SKILL_INSTALL_REMOVED_HINT=a156_0x4e1468(0x107),APP_REMOTE_REMOVED_HINT=a156_0x4e1468(0x12c),APP_USE_REMOVED_HINT=a156_0x4e1468(0x123);export function resolveRemovedCommand(_0x362ade,_0x29eb6f){const _0x3f05ac=a156_0x4e1468;if(_0x362ade==='skill'){const _0x27d8cd=_0x29eb6f?_0x3f05ac(0x127)+_0x29eb6f:'skill';return{'command':_0x27d8cd,'message':_0x3f05ac(0x109)+_0x27d8cd+_0x3f05ac(0x12e),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};}if(_0x362ade===_0x3f05ac(0x10c))return{'command':_0x3f05ac(0x10c),'message':_0x3f05ac(0xf0),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};if(_0x362ade===_0x3f05ac(0xf9)&&_0x29eb6f==='remote')return{'command':_0x3f05ac(0x105),'message':_0x3f05ac(0x12a),'hint':APP_REMOTE_REMOVED_HINT};if(_0x362ade===_0x3f05ac(0xf9)&&_0x29eb6f===_0x3f05ac(0xff))return{'command':_0x3f05ac(0x113),'message':'`rabetbase\x20app\x20use`\x20has\x20been\x20removed.','hint':APP_USE_REMOVED_HINT};return undefined;}export const deprecatedSubcommands={'bff':{'new':'create'},'sql':{'new':a156_0x4e1468(0x13f)},'menu':{'update':a156_0x4e1468(0x13a)}};export function resolveDeprecatedSubcommand(_0xea4ed8,_0x264df5){return deprecatedSubcommands[_0xea4ed8]?.[_0x264df5];}export function findDefinition(_0x587ea4,_0x3292ec){const _0x16e554=a156_0x4e1468;return definitions[_0x16e554(0xfe)](_0x587ea4+':'+_0x3292ec);}export function isKnownService(_0x45bdab){const _0x358a34=a156_0x4e1468;return serviceByName[_0x358a34(0xfa)](_0x45bdab);}export function isDeclarativeService(_0xd58295){const _0x1b354b=a156_0x4e1468;return serviceGroups[_0x1b354b(0xfa)](_0xd58295)||serviceByName['get'](_0xd58295)?.[_0x1b354b(0xf1)]!==undefined;}export function getServiceEntry(_0x259983){return serviceByName['get'](_0x259983);}export function getLegacyHandler(_0x8ee0bf,_0x12ca62){return undefined;}export function getAllDefinitions(){const _0x202de8=a156_0x4e1468;return Array['from'](definitions[_0x202de8(0xfd)]());}
1
+ const a156_0x2034a2=a156_0x5247;(function(_0x516a94,_0x5a9e68){const _0x41016a=a156_0x5247,_0x36c5cd=_0x516a94();while(!![]){try{const _0x1d94ae=parseInt(_0x41016a(0xa5))/0x1+parseInt(_0x41016a(0xc4))/0x2+parseInt(_0x41016a(0xb0))/0x3+parseInt(_0x41016a(0x8e))/0x4+parseInt(_0x41016a(0x94))/0x5*(-parseInt(_0x41016a(0xc1))/0x6)+parseInt(_0x41016a(0x8f))/0x7*(parseInt(_0x41016a(0xc9))/0x8)+-parseInt(_0x41016a(0xc5))/0x9;if(_0x1d94ae===_0x5a9e68)break;else _0x36c5cd['push'](_0x36c5cd['shift']());}catch(_0x1bc3a7){_0x36c5cd['push'](_0x36c5cd['shift']());}}}(a156_0x1b4d,0x233f5));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{taskDefinitions}from'../commands/task/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{notificationDefinitions}from'../commands/notification/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{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/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';function a156_0x5247(_0xae212f,_0x2beb66){_0xae212f=_0xae212f-0x82;const _0x1b4d6d=a156_0x1b4d();let _0x524760=_0x1b4d6d[_0xae212f];return _0x524760;}function a156_0x1b4d(){const _0x1a2295=['isSingleCommand','`rabetbase\x20app\x20use`\x20has\x20been\x20removed.','skills','<script>','length','start','run','auth','build','`rabetbase\x20app\x20remote`\x20has\x20been\x20removed.','Use\x20`rabetbase\x20app\x20list\x20--remote`\x20instead.','logout','`rabetbase\x20skills`\x20has\x20been\x20removed.','30moxZrw','preview','remote','10096zbaHhE','3452976BlVeeK','Quick\x20Start','app\x20use','Use\x20`rabetbase\x20workspace\x20use\x20--app\x20<name>`\x20instead.','2848wmBHEo','Database\x20Connections','filter','wildcardDef','Permissions','BFF\x20Scripts','install','defaultCommand','skill\x20','Smart\x20List\x20Pages','Authentication','Logs','Runtime\x20App\x20Config\x20Management','46992BADqoL','5649RUkErg','Dataset\x20&\x20Operations','App\x20Management','`rabetbase\x20','use','27590hvXXUV','Run\x20any\x20package.json\x20script','app','create','Use\x20`rabetbase\x20cli-skill\x20install`\x20to\x20refresh\x20the\x20Rabetbase\x20CLI\x20Built-in\x20Skill.\x20To\x20install\x20business\x20Skills,\x20use\x20`lovrabet\x20skill\x20install`.','API\x20Development','push','Instant\x20API','asset-update','SQL\x20Queries','from','\x20\x20[high-risk-write]','Workspace','Menu','service','Schema','commands','51351QHJTRY','Platform\x20Issue','`\x20has\x20been\x20removed.','get','set','Async\x20Tasks','Configuration','CLI\x20Built-in\x20Skill','show','Run\x20Scripts','OCR','600564kSzuYe','command','skill','Diagnostics'];a156_0x1b4d=function(){return _0x1a2295;};return a156_0x1b4d();}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(_0x438211){const _0x4e3352=a156_0x5247;for(const _0x2e3043 of _0x438211){definitions[_0x4e3352(0xa9)](_0x2e3043[_0x4e3352(0xa2)]+':'+_0x2e3043[_0x4e3352(0xb1)],_0x2e3043);let _0x4a5671=serviceGroups['get'](_0x2e3043[_0x4e3352(0xa2)]);!_0x4a5671&&(_0x4a5671=[],serviceGroups['set'](_0x2e3043[_0x4e3352(0xa2)],_0x4a5671)),_0x4a5671[_0x4e3352(0x9a)](_0x2e3043);}}function registerDeclarativeService(_0x4ed9ce,_0x4bf011,_0x43708e){const _0x2f923b=a156_0x5247;registerDefinitions(_0x4bf011);_0x43708e?.[_0x2f923b(0x84)]&&registerDefinitions([_0x43708e[_0x2f923b(0x84)]]);const _0x55f2e1=_0x38deb4=>_0x38deb4==='read'?'':_0x38deb4==='write'?'\x20\x20[write]':_0x2f923b(0x9f),_0x4d4242={'service':_0x4bf011[0x0]['service'],'label':_0x4ed9ce,'commands':_0x4bf011[_0x2f923b(0x83)](_0x214664=>!_0x214664['hidden'])['map'](_0x119e47=>({'command':_0x119e47[_0x2f923b(0xb1)],'description':_0x119e47['description'],'tag':_0x55f2e1(_0x119e47['risk'])})),'declarative':!![],'defaultCommand':_0x43708e?.[_0x2f923b(0x88)]??(_0x43708e?.[_0x2f923b(0xb4)]?_0x4bf011[0x0][_0x2f923b(0xb1)]:undefined),'wildcardDef':_0x43708e?.[_0x2f923b(0x84)],'isSingleCommand':_0x43708e?.[_0x2f923b(0xb4)]};serviceRegistry[_0x2f923b(0x9a)](_0x4d4242),serviceByName[_0x2f923b(0xa9)](_0x4d4242['service'],_0x4d4242);}registerDeclarativeService(a156_0x2034a2(0xc6),initDefinitions,{'defaultCommand':a156_0x2034a2(0xba),'isSingleCommand':!![]}),registerDeclarativeService('Project',projectDefinitions),registerDeclarativeService(a156_0x2034a2(0xa0),workspaceDefinitions),registerDeclarativeService(a156_0x2034a2(0x91),appDefinitions),registerDeclarativeService(a156_0x2034a2(0x8b),authDefinitions,{'defaultCommand':'login'}),registerDeclarativeService(a156_0x2034a2(0x90),datasetDefinitions),registerDeclarativeService(a156_0x2034a2(0x8a),pageDefinitions),registerDeclarativeService(a156_0x2034a2(0x99),apiDefinitions),registerDeclarativeService(a156_0x2034a2(0x9b),dataDefinitions),registerDeclarativeService(a156_0x2034a2(0x86),bffDefinitions),registerDeclarativeService('Notification\x20Configuration',notificationDefinitions),registerDeclarativeService(a156_0x2034a2(0x9d),sqlDefinitions),registerDeclarativeService(a156_0x2034a2(0x82),dbDefinitions),registerDeclarativeService(a156_0x2034a2(0xa1),menuDefinitions),registerDeclarativeService(a156_0x2034a2(0xaa),taskDefinitions),registerDeclarativeService('Roles',roleDefinitions),registerDeclarativeService(a156_0x2034a2(0x85),permitDefinitions),registerDeclarativeService(a156_0x2034a2(0x8d),appConfigDefinitions),registerDeclarativeService(a156_0x2034a2(0xa6),issueDefinitions),registerDeclarativeService('File',fileDefinitions),registerDeclarativeService(a156_0x2034a2(0xaf),ocrDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService(a156_0x2034a2(0xab),configDefinitions),registerDeclarativeService(a156_0x2034a2(0xb3),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a156_0x2034a2(0xa3),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a156_0x2034a2(0xac),cliSkillDefinitions,{'defaultCommand':a156_0x2034a2(0x87)}),registerDeclarativeService(a156_0x2034a2(0x8c),logsDefinitions,{'defaultCommand':a156_0x2034a2(0xad)}),registerDeclarativeService(a156_0x2034a2(0xae),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a156_0x2034a2(0xb8)]-0x1];last[a156_0x2034a2(0xa4)]=[{'command':a156_0x2034a2(0xb7),'description':a156_0x2034a2(0x95),'tag':''}];}export const deprecatedAliases={'create':{'service':'project','command':a156_0x2034a2(0x97)},'start':{'service':'run','command':a156_0x2034a2(0xb9)},'build':{'service':'run','command':a156_0x2034a2(0xbc)},'preview':{'service':a156_0x2034a2(0xba),'command':a156_0x2034a2(0xc2)},'logout':{'service':a156_0x2034a2(0xbb),'command':a156_0x2034a2(0xbf)}};const CLI_SKILL_INSTALL_REMOVED_HINT=a156_0x2034a2(0x98),APP_REMOTE_REMOVED_HINT=a156_0x2034a2(0xbe),APP_USE_REMOVED_HINT=a156_0x2034a2(0xc8);export function resolveRemovedCommand(_0x23d0d7,_0x3fb864){const _0x188175=a156_0x2034a2;if(_0x23d0d7===_0x188175(0xb2)){const _0x5e521b=_0x3fb864?_0x188175(0x89)+_0x3fb864:_0x188175(0xb2);return{'command':_0x5e521b,'message':_0x188175(0x92)+_0x5e521b+_0x188175(0xa7),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};}if(_0x23d0d7===_0x188175(0xb6))return{'command':_0x188175(0xb6),'message':_0x188175(0xc0),'hint':CLI_SKILL_INSTALL_REMOVED_HINT};if(_0x23d0d7===_0x188175(0x96)&&_0x3fb864===_0x188175(0xc3))return{'command':'app\x20remote','message':_0x188175(0xbd),'hint':APP_REMOTE_REMOVED_HINT};if(_0x23d0d7===_0x188175(0x96)&&_0x3fb864===_0x188175(0x93))return{'command':_0x188175(0xc7),'message':_0x188175(0xb5),'hint':APP_USE_REMOVED_HINT};return undefined;}export const deprecatedSubcommands={'bff':{'new':a156_0x2034a2(0x97)},'sql':{'new':a156_0x2034a2(0x97)},'menu':{'update':a156_0x2034a2(0x9c)}};export function resolveDeprecatedSubcommand(_0x1db72d,_0x3de62d){return deprecatedSubcommands[_0x1db72d]?.[_0x3de62d];}export function findDefinition(_0x2d705d,_0x32de2e){const _0x194e7f=a156_0x2034a2;return definitions[_0x194e7f(0xa8)](_0x2d705d+':'+_0x32de2e);}export function isKnownService(_0x3551ef){return serviceByName['has'](_0x3551ef);}export function isDeclarativeService(_0x157954){const _0x5c0e7f=a156_0x2034a2;return serviceGroups['has'](_0x157954)||serviceByName['get'](_0x157954)?.[_0x5c0e7f(0x84)]!==undefined;}export function getServiceEntry(_0x508d79){const _0x16a4f8=a156_0x2034a2;return serviceByName[_0x16a4f8(0xa8)](_0x508d79);}export function getLegacyHandler(_0x35ba9f,_0x1add06){return undefined;}export function getAllDefinitions(){const _0x34cc64=a156_0x2034a2;return Array[_0x34cc64(0x9e)](definitions['values']());}
@@ -1 +1 @@
1
- const a157_0x363151=a157_0xf853;(function(_0x537fba,_0x32c2dd){const _0x4ceccc=a157_0xf853,_0x2d74f8=_0x537fba();while(!![]){try{const _0x56abe5=-parseInt(_0x4ceccc(0x1b8))/0x1+-parseInt(_0x4ceccc(0x1a8))/0x2*(parseInt(_0x4ceccc(0x1af))/0x3)+-parseInt(_0x4ceccc(0x1bb))/0x4*(-parseInt(_0x4ceccc(0x1ba))/0x5)+-parseInt(_0x4ceccc(0x1b3))/0x6*(parseInt(_0x4ceccc(0x1b4))/0x7)+parseInt(_0x4ceccc(0x1a2))/0x8+parseInt(_0x4ceccc(0x1bc))/0x9*(-parseInt(_0x4ceccc(0x1ad))/0xa)+parseInt(_0x4ceccc(0x1b6))/0xb;if(_0x56abe5===_0x32c2dd)break;else _0x2d74f8['push'](_0x2d74f8['shift']());}catch(_0x1bd058){_0x2d74f8['push'](_0x2d74f8['shift']());}}}(a157_0x41dd,0x31b91));function a157_0xf853(_0x371a29,_0x50626f){_0x371a29=_0x371a29-0x1a2;const _0x41dd24=a157_0x41dd();let _0xf8534=_0x41dd24[_0x371a29];return _0xf8534;}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';function a157_0x41dd(){const _0x1c3a1b=['39321YsBsLF','POST','1974192Bwseds','\x20(id=','trim','write','flagMissing','appCode','4wxuSDG','Pass\x20--name\x20<roleName>.','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','create','validation','230GxeezZ','remark','156111rhpMEF','str','Create\x20a\x20CUSTOM\x20user\x20group\x20(role)','length','36DLzsXi','185773XEGwFy','/smartapi/permit/role/create','3336696Zzbcnw','name','3254iRroTq','roleName','51510sRILoJ','8XPdEGY'];a157_0x41dd=function(){return _0x1c3a1b;};return a157_0x41dd();}const CREATE_PATH=a157_0x363151(0x1b5);function readName(_0x5df6ed){const _0x130521=a157_0x363151,_0x86a0d1=_0x5df6ed[_0x130521(0x1b0)](_0x130521(0x1b7))[_0x130521(0x1a4)]();if(!_0x86a0d1)throw CliErrors[_0x130521(0x1a6)]('name',_0x130521(0x1a9));if(_0x86a0d1[_0x130521(0x1b2)]>0x40)throw CliErrors[_0x130521(0x1ac)](_0x130521(0x1aa));return _0x86a0d1;}export const roleCreate={'service':'role','command':a157_0x363151(0x1ab),'description':a157_0x363151(0x1b1),'risk':a157_0x363151(0x1a5),'flags':[NAME_FLAG,REMARK_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2e21a8){readName(_0x2e21a8);},async 'dryRun'(_0x3637cb){const _0x2ce884=a157_0x363151,_0x1c2bf0=readName(_0x3637cb),_0x1b83f7=_0x3637cb['str'](_0x2ce884(0x1ae))[_0x2ce884(0x1a4)]()||undefined;return asDryRunResult({'operation':_0x2ce884(0x1ab),'selector':{'appCode':_0x3637cb['appCode'],'roleName':_0x1c2bf0},'before':null,'after':{'roleName':_0x1c2bf0,'roleType':'CUSTOM','remark':_0x1b83f7},'dryRun':!![],'backend':{'method':_0x2ce884(0x1bd),'path':CREATE_PATH},'warnings':[]},{'method':_0x2ce884(0x1bd),'url':CREATE_PATH});},async 'execute'(_0x1a8c9a){const _0x11f3d3=a157_0x363151,_0x18450b=readName(_0x1a8c9a),_0x23a2cd=_0x1a8c9a[_0x11f3d3(0x1b0)](_0x11f3d3(0x1ae))['trim']()||undefined,_0x1ea3fa=await createAppRole({'appCode':_0x1a8c9a[_0x11f3d3(0x1a7)],'roleName':_0x18450b,..._0x23a2cd?{'remark':_0x23a2cd}:{}});return{'ok':!![],'data':{'operation':_0x11f3d3(0x1ab),'selector':{'appCode':_0x1a8c9a['appCode'],'roleId':_0x1ea3fa['id'],'roleName':_0x18450b},'before':null,'after':projectRole(_0x1ea3fa),'dryRun':![],'backend':{'method':_0x11f3d3(0x1bd),'path':CREATE_PATH},'warnings':[]},'message':'Created\x20role\x20'+_0x1ea3fa[_0x11f3d3(0x1b9)]+_0x11f3d3(0x1a3)+_0x1ea3fa['id']+')'};}};
1
+ const a157_0x22ade1=a157_0x54f6;(function(_0x29bdb2,_0x5e32ca){const _0x78d820=a157_0x54f6,_0x5eb554=_0x29bdb2();while(!![]){try{const _0x307a5f=parseInt(_0x78d820(0x146))/0x1*(-parseInt(_0x78d820(0x153))/0x2)+-parseInt(_0x78d820(0x145))/0x3*(parseInt(_0x78d820(0x14e))/0x4)+parseInt(_0x78d820(0x156))/0x5*(parseInt(_0x78d820(0x15b))/0x6)+-parseInt(_0x78d820(0x147))/0x7*(parseInt(_0x78d820(0x150))/0x8)+-parseInt(_0x78d820(0x14f))/0x9+-parseInt(_0x78d820(0x151))/0xa+parseInt(_0x78d820(0x14d))/0xb;if(_0x307a5f===_0x5e32ca)break;else _0x5eb554['push'](_0x5eb554['shift']());}catch(_0x1671bd){_0x5eb554['push'](_0x5eb554['shift']());}}}(a157_0x3f32,0xdc943));import{createAppRole}from'../../core/api-client.js';function a157_0x54f6(_0x4e8c82,_0x11931a){_0x4e8c82=_0x4e8c82-0x144;const _0x3f32f8=a157_0x3f32();let _0x54f645=_0x3f32f8[_0x4e8c82];return _0x54f645;}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';function a157_0x3f32(){const _0x38a4f9=['validation','Create\x20a\x20CUSTOM\x20user\x20group\x20(role)','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','length','141sSYHPY','33583sJNRZT','7vRsatZ','create','flagMissing','\x20(id=','write','name','73672852opJhnt','122316XhndZx','13953402XJCdGR','1625704LHUuhR','17262260KtGYpb','Created\x20role\x20','62LBAlxz','appCode','POST','410155iEImmm','role','remark','roleName','str','12eNUXDX'];a157_0x3f32=function(){return _0x38a4f9;};return a157_0x3f32();}const CREATE_PATH='/smartapi/permit/role/create';function readName(_0x1740ee){const _0x3df5c7=a157_0x54f6,_0x5a4cc9=_0x1740ee[_0x3df5c7(0x15a)](_0x3df5c7(0x14c))['trim']();if(!_0x5a4cc9)throw CliErrors[_0x3df5c7(0x149)](_0x3df5c7(0x14c),'Pass\x20--name\x20<roleName>.');if(_0x5a4cc9[_0x3df5c7(0x144)]>0x40)throw CliErrors[_0x3df5c7(0x15c)](_0x3df5c7(0x15e));return _0x5a4cc9;}export const roleCreate={'service':a157_0x22ade1(0x157),'command':a157_0x22ade1(0x148),'description':a157_0x22ade1(0x15d),'risk':a157_0x22ade1(0x14b),'flags':[NAME_FLAG,REMARK_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x7250fa){readName(_0x7250fa);},async 'dryRun'(_0x2086d7){const _0x595bc5=a157_0x22ade1,_0x3d417e=readName(_0x2086d7),_0x521da6=_0x2086d7[_0x595bc5(0x15a)](_0x595bc5(0x158))['trim']()||undefined;return asDryRunResult({'operation':_0x595bc5(0x148),'selector':{'appCode':_0x2086d7[_0x595bc5(0x154)],'roleName':_0x3d417e},'before':null,'after':{'roleName':_0x3d417e,'roleType':'CUSTOM','remark':_0x521da6},'dryRun':!![],'backend':{'method':_0x595bc5(0x155),'path':CREATE_PATH},'warnings':[]},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x439a2c){const _0x5a564c=a157_0x22ade1,_0x5f1d93=readName(_0x439a2c),_0x53d4bd=_0x439a2c['str'](_0x5a564c(0x158))['trim']()||undefined,_0x10db10=await createAppRole({'appCode':_0x439a2c['appCode'],'roleName':_0x5f1d93,..._0x53d4bd?{'remark':_0x53d4bd}:{}});return{'ok':!![],'data':{'operation':_0x5a564c(0x148),'selector':{'appCode':_0x439a2c['appCode'],'roleId':_0x10db10['id'],'roleName':_0x5f1d93},'before':null,'after':projectRole(_0x10db10),'dryRun':![],'backend':{'method':_0x5a564c(0x155),'path':CREATE_PATH},'warnings':[]},'message':_0x5a564c(0x152)+_0x10db10[_0x5a564c(0x159)]+_0x5a564c(0x14a)+_0x10db10['id']+')'};}};
@@ -1 +1 @@
1
- const a158_0x1f0320=a158_0x532d;(function(_0x3112e9,_0x6f3d2b){const _0xefb320=a158_0x532d,_0x33a5de=_0x3112e9();while(!![]){try{const _0x251722=parseInt(_0xefb320(0x1dd))/0x1*(-parseInt(_0xefb320(0x1ce))/0x2)+-parseInt(_0xefb320(0x1da))/0x3+-parseInt(_0xefb320(0x1d6))/0x4+parseInt(_0xefb320(0x1d8))/0x5*(-parseInt(_0xefb320(0x1cf))/0x6)+parseInt(_0xefb320(0x1db))/0x7*(-parseInt(_0xefb320(0x1d3))/0x8)+-parseInt(_0xefb320(0x1e0))/0x9*(parseInt(_0xefb320(0x1de))/0xa)+parseInt(_0xefb320(0x1dc))/0xb;if(_0x251722===_0x6f3d2b)break;else _0x33a5de['push'](_0x33a5de['shift']());}catch(_0x16fcb8){_0x33a5de['push'](_0x33a5de['shift']());}}}(a158_0x2644,0x6012a));import{deleteAppRole}from'../../core/api-client.js';function a158_0x2644(){const _0x34a80b=['39078nWTyDa','appCode','delete','num','/smartapi/permit/role/delete','roleName','670502ffuysu','418686cIdxXI','Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','high-risk-write','Deleted\x20role\x20','8orLMZv','POST','\x20(id=','2151180oNftkm','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','5WGQqjR','userCount','1644900oMkbFx','2402092FCknRd','27562535LdLyiy','1phsGVi','640RMDAKw','role'];a158_0x2644=function(){return _0x34a80b;};return a158_0x2644();}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=a158_0x1f0320(0x1cc);function a158_0x532d(_0x264975,_0x4f5666){_0x264975=_0x264975-0x1c9;const _0x26440d=a158_0x2644();let _0x532d08=_0x26440d[_0x264975];return _0x532d08;}export const roleDelete={'service':a158_0x1f0320(0x1df),'command':a158_0x1f0320(0x1ca),'description':a158_0x1f0320(0x1d0),'risk':a158_0x1f0320(0x1d1),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x4adb96){const _0x20c577=a158_0x1f0320,_0x5782a4=_0x4adb96[_0x20c577(0x1cb)]('id'),_0x255306=await getRoleById(_0x4adb96[_0x20c577(0x1c9)],_0x5782a4);return assertCustomRole(_0x255306,_0x20c577(0x1ca)),asDryRunResult({'operation':_0x20c577(0x1ca),'selector':{'appCode':_0x4adb96[_0x20c577(0x1c9)],'roleId':_0x5782a4,'roleName':_0x255306[_0x20c577(0x1cd)]},'before':projectRole(_0x255306),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x255306[_0x20c577(0x1d9)]>0x0?['Role\x20still\x20has\x20'+_0x255306[_0x20c577(0x1d9)]+_0x20c577(0x1d7)]:[]},{'method':_0x20c577(0x1d4),'url':DELETE_PATH});},async 'execute'(_0xfd73a8){const _0x126540=a158_0x1f0320,_0x123bbd=_0xfd73a8['num']('id'),_0x5a4714=await getRoleById(_0xfd73a8[_0x126540(0x1c9)],_0x123bbd);return assertCustomRole(_0x5a4714,_0x126540(0x1ca)),await deleteAppRole(_0x123bbd),{'ok':!![],'data':{'operation':'delete','selector':{'appCode':_0xfd73a8['appCode'],'roleId':_0x123bbd,'roleName':_0x5a4714[_0x126540(0x1cd)]},'before':projectRole(_0x5a4714),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[]},'message':_0x126540(0x1d2)+_0x5a4714[_0x126540(0x1cd)]+_0x126540(0x1d5)+_0x123bbd+')'};}};
1
+ const a158_0x5d67ba=a158_0x3dec;function a158_0x3dec(_0x3c9f3c,_0x4860d7){_0x3c9f3c=_0x3c9f3c-0x175;const _0xd34937=a158_0xd349();let _0x3decde=_0xd34937[_0x3c9f3c];return _0x3decde;}(function(_0x3dbdd5,_0x4bd01f){const _0x3cd91f=a158_0x3dec,_0x45d9d7=_0x3dbdd5();while(!![]){try{const _0x4ea665=-parseInt(_0x3cd91f(0x17c))/0x1+-parseInt(_0x3cd91f(0x187))/0x2+-parseInt(_0x3cd91f(0x17e))/0x3+parseInt(_0x3cd91f(0x17a))/0x4+parseInt(_0x3cd91f(0x181))/0x5*(-parseInt(_0x3cd91f(0x17d))/0x6)+parseInt(_0x3cd91f(0x177))/0x7+parseInt(_0x3cd91f(0x18a))/0x8*(parseInt(_0x3cd91f(0x185))/0x9);if(_0x4ea665===_0x4bd01f)break;else _0x45d9d7['push'](_0x45d9d7['shift']());}catch(_0x115d6b){_0x45d9d7['push'](_0x45d9d7['shift']());}}}(a158_0xd349,0x6bb32));import{deleteAppRole}from'../../core/api-client.js';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=a158_0x5d67ba(0x175);function a158_0xd349(){const _0x4bf986=['high-risk-write','Role\x20still\x20has\x20','1145wocXfa','delete','Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','role','45ocbnKs','num','605788juYKzD','Deleted\x20role\x20','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','1588824CnEuDN','\x20(id=','/smartapi/permit/role/delete','userCount','3280697AomZfX','roleName','POST','1703840SEIcQm','appCode','607349qtdbHJ','726SxwcPO','1525668IdPdvv'];a158_0xd349=function(){return _0x4bf986;};return a158_0xd349();}export const roleDelete={'service':a158_0x5d67ba(0x184),'command':a158_0x5d67ba(0x182),'description':a158_0x5d67ba(0x183),'risk':a158_0x5d67ba(0x17f),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x4c4799){const _0x42202b=a158_0x5d67ba,_0xb6b74e=_0x4c4799[_0x42202b(0x186)]('id'),_0x461bbe=await getRoleById(_0x4c4799[_0x42202b(0x17b)],_0xb6b74e);return assertCustomRole(_0x461bbe,_0x42202b(0x182)),asDryRunResult({'operation':_0x42202b(0x182),'selector':{'appCode':_0x4c4799[_0x42202b(0x17b)],'roleId':_0xb6b74e,'roleName':_0x461bbe['roleName']},'before':projectRole(_0x461bbe),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x461bbe[_0x42202b(0x176)]>0x0?[_0x42202b(0x180)+_0x461bbe['userCount']+_0x42202b(0x189)]:[]},{'method':_0x42202b(0x179),'url':DELETE_PATH});},async 'execute'(_0x11b920){const _0x5f4e00=a158_0x5d67ba,_0x1cf70e=_0x11b920['num']('id'),_0x47427b=await getRoleById(_0x11b920[_0x5f4e00(0x17b)],_0x1cf70e);return assertCustomRole(_0x47427b,'delete'),await deleteAppRole(_0x1cf70e),{'ok':!![],'data':{'operation':_0x5f4e00(0x182),'selector':{'appCode':_0x11b920['appCode'],'roleId':_0x1cf70e,'roleName':_0x47427b[_0x5f4e00(0x178)]},'before':projectRole(_0x47427b),'after':null,'dryRun':![],'backend':{'method':_0x5f4e00(0x179),'path':DELETE_PATH},'warnings':[]},'message':_0x5f4e00(0x188)+_0x47427b[_0x5f4e00(0x178)]+_0x5f4e00(0x18b)+_0x1cf70e+')'};}};
@@ -1 +1 @@
1
- function a159_0x4e9c(){const _0x30b89c=['596734lDMBvV','4375683zMfBYk','appCode','182694rEMYgz','Show\x20a\x20single\x20role\x27s\x20detail','4381075pcqCjq','8fmRBaI','148LorTnE','read','17637830jZkUnd','roleType','81402byeqwx','roleName','223285nYRMtd','role','63lULcvw'];a159_0x4e9c=function(){return _0x30b89c;};return a159_0x4e9c();}const a159_0x50d714=a159_0x5678;(function(_0x311c4e,_0x391aee){const _0x4533ab=a159_0x5678,_0x59e1e5=_0x311c4e();while(!![]){try{const _0x152124=parseInt(_0x4533ab(0x76))/0x1+parseInt(_0x4533ab(0x79))/0x2+parseInt(_0x4533ab(0x74))/0x3*(parseInt(_0x4533ab(0x80))/0x4)+parseInt(_0x4533ab(0x7e))/0x5+-parseInt(_0x4533ab(0x7c))/0x6*(parseInt(_0x4533ab(0x78))/0x7)+-parseInt(_0x4533ab(0x7f))/0x8*(-parseInt(_0x4533ab(0x7a))/0x9)+-parseInt(_0x4533ab(0x82))/0xa;if(_0x152124===_0x391aee)break;else _0x59e1e5['push'](_0x59e1e5['shift']());}catch(_0x522a2e){_0x59e1e5['push'](_0x59e1e5['shift']());}}}(a159_0x4e9c,0xcf90c));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a159_0x5678(_0x3e1f73,_0x289d31){_0x3e1f73=_0x3e1f73-0x74;const _0x4e9c1b=a159_0x4e9c();let _0x5678b6=_0x4e9c1b[_0x3e1f73];return _0x5678b6;}import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a159_0x50d714(0x77),'command':'detail','description':a159_0x50d714(0x7d),'risk':a159_0x50d714(0x81),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1b7f1f){const _0x940e7c=a159_0x50d714,_0x1061e5=_0x1b7f1f['num']('id'),_0x2fe76a=await getRoleById(_0x1b7f1f[_0x940e7c(0x7b)],_0x1061e5);return{'ok':!![],'data':{'role':projectRole(_0x2fe76a)},'message':'Role\x20'+_0x2fe76a[_0x940e7c(0x75)]+'\x20('+_0x2fe76a[_0x940e7c(0x83)]+')'};}};
1
+ const a159_0x3fa8d2=a159_0x5e81;function a159_0x25d4(){const _0x1a3db0=['188485bbgrTH','1290270nazguH','roleType','14360288iMEqmG','45qqZDEc','1477214RHAUpZ','num','258ZTmdhk','role','Role\x20','61468XCnAMS','detail','423MtUTCA','3652460KoknCp','9425654qUFhuh','appCode'];a159_0x25d4=function(){return _0x1a3db0;};return a159_0x25d4();}(function(_0x36a9e2,_0x1ff596){const _0x3904df=a159_0x5e81,_0x15872a=_0x36a9e2();while(!![]){try{const _0x46928c=-parseInt(_0x3904df(0x16d))/0x1+-parseInt(_0x3904df(0x175))/0x2+parseInt(_0x3904df(0x16c))/0x3*(parseInt(_0x3904df(0x172))/0x4)+-parseInt(_0x3904df(0x168))/0x5*(parseInt(_0x3904df(0x16f))/0x6)+parseInt(_0x3904df(0x176))/0x7+-parseInt(_0x3904df(0x16b))/0x8+-parseInt(_0x3904df(0x174))/0x9*(-parseInt(_0x3904df(0x169))/0xa);if(_0x46928c===_0x1ff596)break;else _0x15872a['push'](_0x15872a['shift']());}catch(_0x21cb8d){_0x15872a['push'](_0x15872a['shift']());}}}(a159_0x25d4,0xe10f5));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a159_0x5e81(_0x24b9fe,_0x701e7){_0x24b9fe=_0x24b9fe-0x167;const _0x25d440=a159_0x25d4();let _0x5e8126=_0x25d440[_0x24b9fe];return _0x5e8126;}import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a159_0x3fa8d2(0x170),'command':a159_0x3fa8d2(0x173),'description':'Show\x20a\x20single\x20role\x27s\x20detail','risk':'read','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0xa1a803){const _0x149ef3=a159_0x3fa8d2,_0xcb6b6e=_0xa1a803[_0x149ef3(0x16e)]('id'),_0x1c0f41=await getRoleById(_0xa1a803[_0x149ef3(0x167)],_0xcb6b6e);return{'ok':!![],'data':{'role':projectRole(_0x1c0f41)},'message':_0x149ef3(0x171)+_0x1c0f41['roleName']+'\x20('+_0x1c0f41[_0x149ef3(0x16a)]+')'};}};
@@ -1 +1 @@
1
- (function(_0x2523f8,_0x4eecc3){const _0x2ddb86=a160_0x19a8,_0x2dc258=_0x2523f8();while(!![]){try{const _0x1bae8c=-parseInt(_0x2ddb86(0x18c))/0x1*(parseInt(_0x2ddb86(0x18f))/0x2)+parseInt(_0x2ddb86(0x189))/0x3*(parseInt(_0x2ddb86(0x18e))/0x4)+-parseInt(_0x2ddb86(0x192))/0x5*(-parseInt(_0x2ddb86(0x18d))/0x6)+-parseInt(_0x2ddb86(0x18a))/0x7*(-parseInt(_0x2ddb86(0x190))/0x8)+parseInt(_0x2ddb86(0x18b))/0x9*(-parseInt(_0x2ddb86(0x191))/0xa)+parseInt(_0x2ddb86(0x193))/0xb+-parseInt(_0x2ddb86(0x188))/0xc*(parseInt(_0x2ddb86(0x194))/0xd);if(_0x1bae8c===_0x4eecc3)break;else _0x2dc258['push'](_0x2dc258['shift']());}catch(_0x16d994){_0x2dc258['push'](_0x2dc258['shift']());}}}(a160_0x3e4b,0x74140));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleCreate}from'../../commands/role/create.js';import{roleUpdate}from'../../commands/role/update.js';function a160_0x19a8(_0xbe250e,_0x431144){_0xbe250e=_0xbe250e-0x188;const _0x3e4b80=a160_0x3e4b();let _0x19a83e=_0x3e4b80[_0xbe250e];return _0x19a83e;}import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';function a160_0x3e4b(){const _0x2b10a9=['2584520ccjfhl','239354zsPsQJ','136qXNRKk','180rbRMol','20uexNrZ','4269199sHiCaI','637pTjPHn','372420UXBPLm','3GXkjsz','329273PLfsgO','298989WOanws','1MABosb','1319886BwjgsP'];a160_0x3e4b=function(){return _0x2b10a9;};return a160_0x3e4b();}import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
1
+ (function(_0x243fa5,_0x5b67ed){const _0x121d73=a160_0x1d83,_0x50b4e2=_0x243fa5();while(!![]){try{const _0x571a9d=parseInt(_0x121d73(0xce))/0x1+-parseInt(_0x121d73(0xd2))/0x2+parseInt(_0x121d73(0xd7))/0x3*(-parseInt(_0x121d73(0xd3))/0x4)+-parseInt(_0x121d73(0xd1))/0x5*(-parseInt(_0x121d73(0xd5))/0x6)+parseInt(_0x121d73(0xd4))/0x7+-parseInt(_0x121d73(0xd0))/0x8*(parseInt(_0x121d73(0xd8))/0x9)+parseInt(_0x121d73(0xd6))/0xa*(parseInt(_0x121d73(0xcf))/0xb);if(_0x571a9d===_0x5b67ed)break;else _0x50b4e2['push'](_0x50b4e2['shift']());}catch(_0x503c19){_0x50b4e2['push'](_0x50b4e2['shift']());}}}(a160_0x2dd0,0x56691));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';function a160_0x1d83(_0x2dd210,_0x372f89){_0x2dd210=_0x2dd210-0xce;const _0x2dd0a6=a160_0x2dd0();let _0x1d83b4=_0x2dd0a6[_0x2dd210];return _0x1d83b4;}import{roleCreate}from'../../commands/role/create.js';function a160_0x2dd0(){const _0x3412e3=['12INgmJV','54zKBoov','390950FTbkxS','11499312nSWTIU','168944BuVFlo','330AwaSwp','1192450osnOdw','632976FMWjIu','1328712blZgaV','7608vyoXoM','10UwLRXK'];a160_0x2dd0=function(){return _0x3412e3;};return a160_0x2dd0();}import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];