@lovrabet/rabetbase-cli 2.4.7-beta.2 → 2.4.7

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 (294) 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/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/business-groups.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-refresh-start.js +1 -1
  88. package/lib/commands/db/diff-refresh-status.js +1 -1
  89. package/lib/commands/db/diff.js +1 -1
  90. package/lib/commands/db/index.js +1 -1
  91. package/lib/commands/db/list.js +1 -1
  92. package/lib/commands/db/shared.js +1 -1
  93. package/lib/commands/db/tables.js +1 -1
  94. package/lib/commands/db/test.js +1 -1
  95. package/lib/commands/db/update.js +1 -1
  96. package/lib/commands/doctor.js +1 -1
  97. package/lib/commands/file/index.js +1 -1
  98. package/lib/commands/init/index.js +1 -1
  99. package/lib/commands/issue/index.js +1 -1
  100. package/lib/commands/issue/nudge.js +1 -1
  101. package/lib/commands/issue/report.js +1 -1
  102. package/lib/commands/issue/shared.js +1 -1
  103. package/lib/commands/kb/create.js +1 -1
  104. package/lib/commands/kb/delete.js +1 -1
  105. package/lib/commands/kb/detail.js +1 -1
  106. package/lib/commands/kb/index.js +1 -1
  107. package/lib/commands/kb/list.js +1 -1
  108. package/lib/commands/kb/search.js +1 -1
  109. package/lib/commands/kb/shared.js +1 -1
  110. package/lib/commands/kb/update.js +1 -1
  111. package/lib/commands/logs/index.js +1 -1
  112. package/lib/commands/menu/asset-update.js +1 -1
  113. package/lib/commands/menu/delete.js +1 -1
  114. package/lib/commands/menu/external-link-create.js +1 -1
  115. package/lib/commands/menu/external-link-update.js +1 -1
  116. package/lib/commands/menu/group-create.js +1 -1
  117. package/lib/commands/menu/group-update.js +1 -1
  118. package/lib/commands/menu/index.js +1 -1
  119. package/lib/commands/menu/list.js +1 -1
  120. package/lib/commands/menu/move.js +1 -1
  121. package/lib/commands/menu/regroup-start.js +1 -1
  122. package/lib/commands/menu/rename.js +1 -1
  123. package/lib/commands/menu/shared/compare-table.js +1 -1
  124. package/lib/commands/menu/shared/delete-plan.js +1 -1
  125. package/lib/commands/menu/shared/facts.js +1 -1
  126. package/lib/commands/menu/shared/index.js +1 -1
  127. package/lib/commands/menu/shared/inquirer.js +1 -1
  128. package/lib/commands/menu/shared/local-pages.js +1 -1
  129. package/lib/commands/menu/shared/logic.js +1 -1
  130. package/lib/commands/menu/shared/mutations.js +1 -1
  131. package/lib/commands/menu/shared/service.js +1 -1
  132. package/lib/commands/menu/shared/sync-core.js +1 -1
  133. package/lib/commands/menu/shared/update-core.js +1 -1
  134. package/lib/commands/menu/shared/valid-url.js +1 -1
  135. package/lib/commands/menu/sync.js +1 -1
  136. package/lib/commands/menu/visibility-update.js +1 -1
  137. package/lib/commands/notification/config-create.js +1 -1
  138. package/lib/commands/notification/config-delete.js +1 -1
  139. package/lib/commands/notification/config-list.js +1 -1
  140. package/lib/commands/notification/config-update.js +1 -1
  141. package/lib/commands/notification/index.js +1 -1
  142. package/lib/commands/notification/shared.js +1 -1
  143. package/lib/commands/ocr/index.js +1 -1
  144. package/lib/commands/page/create.js +1 -1
  145. package/lib/commands/page/custom/detail.js +1 -1
  146. package/lib/commands/page/custom/list.js +1 -1
  147. package/lib/commands/page/custom/publish.js +1 -1
  148. package/lib/commands/page/custom/shared.js +1 -1
  149. package/lib/commands/page/custom/syntax.js +1 -1
  150. package/lib/commands/page/custom/template.js +1 -1
  151. package/lib/commands/page/custom/update.js +1 -1
  152. package/lib/commands/page/data-list-status.js +1 -1
  153. package/lib/commands/page/generate-start.js +1 -1
  154. package/lib/commands/page/generate-status.js +1 -1
  155. package/lib/commands/page/index.js +1 -1
  156. package/lib/commands/page/pull.js +1 -1
  157. package/lib/commands/page/push.js +1 -1
  158. package/lib/commands/page/relation-audit.js +1 -1
  159. package/lib/commands/page/restore.js +1 -1
  160. package/lib/commands/page/shared.js +1 -1
  161. package/lib/commands/page/sync.js +1 -1
  162. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  163. package/lib/commands/project/create/format-elapsed.js +1 -1
  164. package/lib/commands/project/create/main.js +1 -1
  165. package/lib/commands/project/create/materialize-project-template.js +1 -1
  166. package/lib/commands/project/create/project-name.js +1 -1
  167. package/lib/commands/project/create/project-template-archive.js +1 -1
  168. package/lib/commands/project/create/project-template-path.js +1 -1
  169. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  170. package/lib/commands/project/create/use-format-code.js +1 -1
  171. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  172. package/lib/commands/project/index.js +1 -1
  173. package/lib/commands/project/upgrade.js +1 -1
  174. package/lib/commands/registry.js +1 -1
  175. package/lib/commands/role/delete.js +1 -1
  176. package/lib/commands/role/detail.js +1 -1
  177. package/lib/commands/role/index.js +1 -1
  178. package/lib/commands/role/list.js +1 -1
  179. package/lib/commands/role/shared.js +1 -1
  180. package/lib/commands/role/update.js +1 -1
  181. package/lib/commands/role/user-add.js +1 -1
  182. package/lib/commands/role/user-remove.js +1 -1
  183. package/lib/commands/role/user-resolve.js +1 -1
  184. package/lib/commands/run/index.js +1 -1
  185. package/lib/commands/schema.js +1 -1
  186. package/lib/commands/sql/create.js +1 -1
  187. package/lib/commands/sql/delete.js +1 -1
  188. package/lib/commands/sql/detail.js +1 -1
  189. package/lib/commands/sql/exec.js +1 -1
  190. package/lib/commands/sql/index.js +1 -1
  191. package/lib/commands/sql/list.js +1 -1
  192. package/lib/commands/sql/pull.js +1 -1
  193. package/lib/commands/sql/push.js +1 -1
  194. package/lib/commands/sql/shared.js +1 -1
  195. package/lib/commands/sql/status.js +1 -1
  196. package/lib/commands/sql/validate.js +1 -1
  197. package/lib/commands/task/index.js +1 -1
  198. package/lib/commands/task/status.js +1 -1
  199. package/lib/commands/tenant/index.js +1 -1
  200. package/lib/commands/tenant/members-list.js +1 -1
  201. package/lib/commands/tenant/shared.js +1 -1
  202. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  203. package/lib/commands/user-account/index.js +1 -1
  204. package/lib/commands/workspace/add.js +1 -1
  205. package/lib/commands/workspace/index.js +1 -1
  206. package/lib/commands/workspace/remove.js +1 -1
  207. package/lib/config/schema.js +1 -1
  208. package/lib/constant/cdn.js +1 -1
  209. package/lib/constant/cli.js +1 -1
  210. package/lib/constant/defaults.js +1 -1
  211. package/lib/constant/domain.js +1 -1
  212. package/lib/constant/env.js +1 -1
  213. package/lib/constant/output.js +1 -1
  214. package/lib/constant/paths.js +1 -1
  215. package/lib/constant/risk.js +1 -1
  216. package/lib/context/app-resolver.js +1 -1
  217. package/lib/context/auth-resolver.js +1 -1
  218. package/lib/context/config-loader.js +1 -1
  219. package/lib/context.js +1 -1
  220. package/lib/core/alias-resolver.js +1 -1
  221. package/lib/core/api-client.js +1 -1
  222. package/lib/core/bff/config.js +1 -1
  223. package/lib/core/bff/file-system.js +1 -1
  224. package/lib/core/bff/hash.js +1 -1
  225. package/lib/core/bff/lock.js +1 -1
  226. package/lib/core/bff/utils.js +1 -1
  227. package/lib/core/db-resolver.js +1 -1
  228. package/lib/core/page/file-system.js +1 -1
  229. package/lib/core/page/hash.js +1 -1
  230. package/lib/core/page/lock.js +1 -1
  231. package/lib/core/sql-index-auditor.js +1 -1
  232. package/lib/core/sql-sync/config.js +1 -1
  233. package/lib/core/sql-sync/file-system.js +1 -1
  234. package/lib/core/sql-sync/hash.js +1 -1
  235. package/lib/core/sql-sync/lock.js +1 -1
  236. package/lib/core/sql-sync/utils.js +1 -1
  237. package/lib/core/sql-validator.js +1 -1
  238. package/lib/errors.js +1 -1
  239. package/lib/framework/build-all-flags.js +1 -1
  240. package/lib/framework/error-output.js +1 -1
  241. package/lib/framework/explicit-yes.js +1 -1
  242. package/lib/framework/flags.js +1 -1
  243. package/lib/framework/help.js +1 -1
  244. package/lib/framework/index.js +1 -1
  245. package/lib/framework/output.js +1 -1
  246. package/lib/framework/response.js +1 -1
  247. package/lib/framework/runner-alias.js +1 -1
  248. package/lib/framework/runner.js +1 -1
  249. package/lib/framework/schema-export.js +1 -1
  250. package/lib/framework/types.js +1 -1
  251. package/lib/generated/build-info.d.ts +4 -4
  252. package/lib/generated/build-info.js +1 -1
  253. package/lib/help.js +1 -1
  254. package/lib/postinstall.js +1 -1
  255. package/lib/runtime/confirmation.js +1 -1
  256. package/lib/runtime/event.js +1 -1
  257. package/lib/runtime/index.js +1 -1
  258. package/lib/runtime/queue.js +1 -1
  259. package/lib/runtime/resolve.js +1 -1
  260. package/lib/skills/builtin-skill.js +1 -1
  261. package/lib/skills/main.js +1 -1
  262. package/lib/skills/npx-skills-add.js +1 -1
  263. package/lib/skills/skill-presence.js +1 -1
  264. package/lib/telemetry/cli-command-trace.js +1 -1
  265. package/lib/telemetry/cli-help-trace.js +1 -1
  266. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  267. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  268. package/lib/telemetry/send-cli-trace-log.js +1 -1
  269. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  270. package/lib/utils/ai_config.js +1 -1
  271. package/lib/utils/apply-jq-filter.js +1 -1
  272. package/lib/utils/cdn-config.js +1 -1
  273. package/lib/utils/check-sdk-version.js +1 -1
  274. package/lib/utils/cli-version-check.js +1 -1
  275. package/lib/utils/cli-version-policy.js +1 -1
  276. package/lib/utils/config.js +1 -1
  277. package/lib/utils/entity-with-id.js +1 -1
  278. package/lib/utils/file-utils.js +1 -1
  279. package/lib/utils/guides-cdn.js +1 -1
  280. package/lib/utils/http-client.js +1 -1
  281. package/lib/utils/is-non-interactive.js +1 -1
  282. package/lib/utils/logger.js +1 -1
  283. package/lib/utils/params.js +1 -1
  284. package/lib/utils/platform.js +1 -1
  285. package/lib/utils/rules-cdn.js +1 -1
  286. package/lib/utils/sleep.js +1 -1
  287. package/lib/utils/template-replacer.js +1 -1
  288. package/lib/utils/update-notice.js +1 -1
  289. package/lib/utils/version.js +1 -1
  290. package/lib/utils/with-active-cookie.js +1 -1
  291. package/lib/utils/write-cli-side-channel.js +1 -1
  292. package/package.json +1 -1
  293. package/skills/rabetbase/SKILL.md +1 -1
  294. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- (function(_0x37c630,_0x1febf9){const _0x2abbda=a162_0x31b5,_0x521351=_0x37c630();while(!![]){try{const _0x5565d9=parseInt(_0x2abbda(0x96))/0x1*(parseInt(_0x2abbda(0x84))/0x2)+-parseInt(_0x2abbda(0x81))/0x3+-parseInt(_0x2abbda(0x83))/0x4*(-parseInt(_0x2abbda(0x8f))/0x5)+-parseInt(_0x2abbda(0x88))/0x6*(parseInt(_0x2abbda(0x7b))/0x7)+parseInt(_0x2abbda(0x7c))/0x8+-parseInt(_0x2abbda(0x7f))/0x9+-parseInt(_0x2abbda(0x8d))/0xa;if(_0x5565d9===_0x1febf9)break;else _0x521351['push'](_0x521351['shift']());}catch(_0x5796f5){_0x521351['push'](_0x521351['shift']());}}}(a162_0x5421,0xa92da));import{existsSync}from'node:fs';import a162_0x4aef28 from'node:path';import a162_0x178d96 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';function a162_0x31b5(_0x3cb245,_0x4ea7be){_0x3cb245=_0x3cb245-0x7b;const _0x5421dd=a162_0x5421();let _0x31b5d8=_0x5421dd[_0x3cb245];return _0x31b5d8;}function a162_0x5421(){const _0x344584=['green','7053876uGYgqY','my-app','538563SEsSEu','√\x20Login\x20status:\x20','4iDrpFE','118SNxokr','Not\x20set','env','√\x20App\x20Code:\x20','5352jWTFAX','cwd','Project\x20name:','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','trim','4880670KNghEC','Skipped','6481415LpPQYP','log','Login\x20failed','\x22\x20already\x20exists','production','Directory\x20\x22','√\x20Project\x20Name:\x20','13742oMunmV','707TSRpKB','1018696LyYfOe','cyan'];a162_0x5421=function(){return _0x344584;};return a162_0x5421();}import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getProjectNameValidationError}from'../../../commands/project/create/project-name.js';export async function guidedCreateProject(_0x5e00ff,_0x33ee4d,_0x191428){const _0x34f8c3=a162_0x31b5,_0x593a63=_0x34f8c3(0x80),_0x194709=readConfig(),_0x5cfee4=typeof _0x194709[_0x34f8c3(0x86)]==='string'?_0x194709['env']:undefined,_0x2224e7=await input({'message':_0x34f8c3(0x8a),'default':_0x593a63,'validate':_0xb90c4b=>{const _0x1408ba=_0x34f8c3,_0x15d853=_0xb90c4b[_0x1408ba(0x8c)]()||_0x593a63,_0x4f9f43=getProjectNameValidationError(_0x15d853);if(_0x4f9f43)return _0x4f9f43;const _0xbf3ea7=a162_0x4aef28['resolve'](process[_0x1408ba(0x89)](),_0x15d853);if(existsSync(_0xbf3ea7))return _0x1408ba(0x94)+_0x15d853+_0x1408ba(0x92);return!![];}});console[_0x34f8c3(0x90)](a162_0x178d96['green'](_0x34f8c3(0x95)+a162_0x178d96[_0x34f8c3(0x7d)](_0x2224e7)));const _0x5d0f93=await selectSingleAppcode(_0x191428);console[_0x34f8c3(0x90)](a162_0x178d96['green'](_0x34f8c3(0x87)+a162_0x178d96['cyan'](_0x5d0f93||_0x34f8c3(0x85))));if(_0x5d0f93){const _0x431e24=await getIsSessionValid();if(!_0x431e24){const _0x41c9d6=await confirm({'message':_0x34f8c3(0x8b),'default':!![]});if(_0x41c9d6){const _0x579963=await authServer({'silent':!![]});console[_0x34f8c3(0x90)](a162_0x178d96[_0x34f8c3(0x7e)](_0x34f8c3(0x82)+a162_0x178d96[_0x34f8c3(0x7d)](_0x579963?'Logged\x20in':_0x34f8c3(0x91))));}else console[_0x34f8c3(0x90)](a162_0x178d96[_0x34f8c3(0x7e)](_0x34f8c3(0x82)+a162_0x178d96[_0x34f8c3(0x7d)](_0x34f8c3(0x8e))));}await _0x5e00ff({'projectName':_0x2224e7,'appCode':_0x5d0f93,'env':_0x33ee4d||_0x5cfee4||'production'});}else await _0x5e00ff({'projectName':_0x2224e7,'env':_0x33ee4d||_0x5cfee4||_0x34f8c3(0x93)});}
1
+ (function(_0x3331d3,_0xc8f201){const _0x448ed5=a162_0x67d2,_0x44de59=_0x3331d3();while(!![]){try{const _0xb75a67=-parseInt(_0x448ed5(0xd0))/0x1+parseInt(_0x448ed5(0xda))/0x2+parseInt(_0x448ed5(0xe3))/0x3+parseInt(_0x448ed5(0xe4))/0x4+parseInt(_0x448ed5(0xd9))/0x5*(parseInt(_0x448ed5(0xde))/0x6)+-parseInt(_0x448ed5(0xcc))/0x7+-parseInt(_0x448ed5(0xcb))/0x8*(parseInt(_0x448ed5(0xd4))/0x9);if(_0xb75a67===_0xc8f201)break;else _0x44de59['push'](_0x44de59['shift']());}catch(_0xe0b05){_0x44de59['push'](_0x44de59['shift']());}}}(a162_0x2ecd,0x37195));import{existsSync}from'node:fs';import a162_0x5195b1 from'node:path';function a162_0x67d2(_0x261716,_0xd72ac7){_0x261716=_0x261716-0xca;const _0x2ecd1f=a162_0x2ecd();let _0x67d2=_0x2ecd1f[_0x261716];return _0x67d2;}import a162_0x34e250 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';function a162_0x2ecd(){const _0x1f09d8=['383830RKTiIa','resolve','cyan','√\x20App\x20Code:\x20','102AYYpYg','trim','Project\x20name:','Logged\x20in','Skipped','272730yTVjzJ','933756IDzIyt','cwd','Directory\x20\x22','520408RqqRbg','674240lCANWN','Login\x20failed','Not\x20set','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','242563dnvlhV','my-app','green','env','27WBldyy','production','log','√\x20Login\x20status:\x20','string','71605UMMbzw'];a162_0x2ecd=function(){return _0x1f09d8;};return a162_0x2ecd();}import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getProjectNameValidationError}from'../../../commands/project/create/project-name.js';export async function guidedCreateProject(_0x523149,_0x46aa44,_0x23d79c){const _0x592ad0=a162_0x67d2,_0x4f1aff=_0x592ad0(0xd1),_0x16e47e=readConfig(),_0x4b948a=typeof _0x16e47e[_0x592ad0(0xd3)]===_0x592ad0(0xd8)?_0x16e47e['env']:undefined,_0x185fb6=await input({'message':_0x592ad0(0xe0),'default':_0x4f1aff,'validate':_0x320504=>{const _0x2c273b=_0x592ad0,_0x5e1dce=_0x320504[_0x2c273b(0xdf)]()||_0x4f1aff,_0x11c67c=getProjectNameValidationError(_0x5e1dce);if(_0x11c67c)return _0x11c67c;const _0x260c10=a162_0x5195b1[_0x2c273b(0xdb)](process[_0x2c273b(0xe5)](),_0x5e1dce);if(existsSync(_0x260c10))return _0x2c273b(0xca)+_0x5e1dce+'\x22\x20already\x20exists';return!![];}});console['log'](a162_0x34e250[_0x592ad0(0xd2)]('√\x20Project\x20Name:\x20'+a162_0x34e250[_0x592ad0(0xdc)](_0x185fb6)));const _0x7a0e7a=await selectSingleAppcode(_0x23d79c);console[_0x592ad0(0xd6)](a162_0x34e250[_0x592ad0(0xd2)](_0x592ad0(0xdd)+a162_0x34e250[_0x592ad0(0xdc)](_0x7a0e7a||_0x592ad0(0xce))));if(_0x7a0e7a){const _0x5ece2b=await getIsSessionValid();if(!_0x5ece2b){const _0x3001a7=await confirm({'message':_0x592ad0(0xcf),'default':!![]});if(_0x3001a7){const _0x285dc6=await authServer({'silent':!![]});console[_0x592ad0(0xd6)](a162_0x34e250['green']('√\x20Login\x20status:\x20'+a162_0x34e250[_0x592ad0(0xdc)](_0x285dc6?_0x592ad0(0xe1):_0x592ad0(0xcd))));}else console[_0x592ad0(0xd6)](a162_0x34e250[_0x592ad0(0xd2)](_0x592ad0(0xd7)+a162_0x34e250['cyan'](_0x592ad0(0xe2))));}await _0x523149({'projectName':_0x185fb6,'appCode':_0x7a0e7a,'env':_0x46aa44||_0x4b948a||_0x592ad0(0xd5)});}else await _0x523149({'projectName':_0x185fb6,'env':_0x46aa44||_0x4b948a||'production'});}
@@ -1 +1 @@
1
- function a163_0x20d0(_0xb0e5c1,_0x55e0b2){_0xb0e5c1=_0xb0e5c1-0x1ed;const _0x4f8bc5=a163_0x4f8b();let _0x20d075=_0x4f8bc5[_0xb0e5c1];return _0x20d075;}(function(_0xfec1e4,_0x542250){const _0x574da9=a163_0x20d0,_0x1251ac=_0xfec1e4();while(!![]){try{const _0x4393d8=-parseInt(_0x574da9(0x1f5))/0x1*(parseInt(_0x574da9(0x1f4))/0x2)+parseInt(_0x574da9(0x1fa))/0x3*(parseInt(_0x574da9(0x1f1))/0x4)+-parseInt(_0x574da9(0x1f7))/0x5*(parseInt(_0x574da9(0x1f9))/0x6)+parseInt(_0x574da9(0x1f6))/0x7+parseInt(_0x574da9(0x1f0))/0x8*(parseInt(_0x574da9(0x1ed))/0x9)+-parseInt(_0x574da9(0x1f8))/0xa*(-parseInt(_0x574da9(0x1ef))/0xb)+parseInt(_0x574da9(0x1fb))/0xc*(-parseInt(_0x574da9(0x1fc))/0xd);if(_0x4393d8===_0x542250)break;else _0x1251ac['push'](_0x1251ac['shift']());}catch(_0x48fe75){_0x1251ac['push'](_0x1251ac['shift']());}}}(a163_0x4f8b,0xdbaa0));export function formatElapsed(_0x3bfc64){const _0x6c80af=a163_0x20d0,_0x55ec61=Date[_0x6c80af(0x1f3)]()-_0x3bfc64;if(_0x55ec61<0x3e8)return _0x55ec61+'ms';const _0x207f0e=(_0x55ec61/0x3e8)[_0x6c80af(0x1ee)](0x2),_0x47ebe6=_0x207f0e[_0x6c80af(0x1f2)](/\.?0+$/u,'');return _0x47ebe6+'s';}function a163_0x4f8b(){const _0x54a645=['1937670vFEfkb','35215vKDUgL','6694120dEFFTZ','390sZSeRP','109614RgJrXw','962700KIaUgl','169jZhGRH','947907YPbFvw','toFixed','22RPGvzB','8EBvThA','148pAMqfG','replace','now','1642oqASIC','819ndnTBD'];a163_0x4f8b=function(){return _0x54a645;};return a163_0x4f8b();}
1
+ (function(_0x56a608,_0x2f6461){const _0x58dc80=a163_0x476d,_0x335ec5=_0x56a608();while(!![]){try{const _0x26fd4b=parseInt(_0x58dc80(0xe1))/0x1*(-parseInt(_0x58dc80(0xdd))/0x2)+parseInt(_0x58dc80(0xe7))/0x3+parseInt(_0x58dc80(0xde))/0x4+parseInt(_0x58dc80(0xe5))/0x5*(parseInt(_0x58dc80(0xdf))/0x6)+parseInt(_0x58dc80(0xe3))/0x7*(parseInt(_0x58dc80(0xe2))/0x8)+-parseInt(_0x58dc80(0xdb))/0x9*(parseInt(_0x58dc80(0xe4))/0xa)+-parseInt(_0x58dc80(0xda))/0xb;if(_0x26fd4b===_0x2f6461)break;else _0x335ec5['push'](_0x335ec5['shift']());}catch(_0x333b91){_0x335ec5['push'](_0x335ec5['shift']());}}}(a163_0x2de6,0x9b5ce));function a163_0x2de6(){const _0x4e26a8=['5718610ULhZGc','117595qgcvdq','replace','3153282IIMHdd','13174304yYIRLa','9HVGHjy','now','4qOGhaC','1292232XIApnR','288grbtYw','toFixed','618209xRxTmb','1822792JMsNfM','35zPhthJ'];a163_0x2de6=function(){return _0x4e26a8;};return a163_0x2de6();}function a163_0x476d(_0x5ace05,_0x579157){_0x5ace05=_0x5ace05-0xda;const _0x2de65c=a163_0x2de6();let _0x476d6e=_0x2de65c[_0x5ace05];return _0x476d6e;}export function formatElapsed(_0x2e5a64){const _0x4e4237=a163_0x476d,_0x2c0d51=Date[_0x4e4237(0xdc)]()-_0x2e5a64;if(_0x2c0d51<0x3e8)return _0x2c0d51+'ms';const _0x5405c4=(_0x2c0d51/0x3e8)[_0x4e4237(0xe0)](0x2),_0x4872dc=_0x5405c4[_0x4e4237(0xe6)](/\.?0+$/u,'');return _0x4872dc+'s';}
@@ -1 +1 @@
1
- (function(_0x4de529,_0x4edf92){const _0x2f24eb=a164_0x3c74,_0x21998c=_0x4de529();while(!![]){try{const _0x9244c8=parseInt(_0x2f24eb(0x18d))/0x1+parseInt(_0x2f24eb(0x1b8))/0x2+parseInt(_0x2f24eb(0x1b4))/0x3*(parseInt(_0x2f24eb(0x182))/0x4)+-parseInt(_0x2f24eb(0x1a8))/0x5*(parseInt(_0x2f24eb(0x1b1))/0x6)+-parseInt(_0x2f24eb(0x16a))/0x7+parseInt(_0x2f24eb(0x17b))/0x8*(parseInt(_0x2f24eb(0x1ab))/0x9)+-parseInt(_0x2f24eb(0x18c))/0xa;if(_0x9244c8===_0x4edf92)break;else _0x21998c['push'](_0x21998c['shift']());}catch(_0x56e9e9){_0x21998c['push'](_0x21998c['shift']());}}}(a164_0x13a8,0x53c8c));import a164_0x51e674 from'path';import a164_0x1adba8 from'fs';import a164_0x4345ce from'chalk';import a164_0x9db58c 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';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';function a164_0x3c74(_0x4c6337,_0x2f6d19){_0x4c6337=_0x4c6337-0x167;const _0x13a8ce=a164_0x13a8();let _0x3c746c=_0x13a8ce[_0x4c6337];return _0x3c746c;}import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';import{validateProjectName}from'../../../commands/project/create/project-name.js';function a164_0x13a8(){const _0x1149ee=['Unable\x20to\x20verify\x20ownership\x20of\x20the\x20created\x20project\x20directory','stringify','cd\x20','success','\x20&&\x20','green','\x20\x201.\x20Start\x20project:\x20','4506068GTSMuB','stop','Resolving\x20project\x20template','verifying','cookie','parse','CLI\x20版本检查','\x20config\x20set\x20appcode\x20<app-code>\x27','\x20|\x20Default:\x20','name','join','Format\x20code','production','跳过清理:项目目录所有权已变化:\x20','fail','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','\x20\x202.\x20Pull\x20API\x20configuration:\x20','5592RhDNrX','belowMinimum','appCode','√\x20package.json\x20updated:\x20name=','lstatSync','\x20√\x20','currentVersion','20hhzHfG','projectCode','resolve','setLogPath','log','package.json','warn','constants','readFileSync','bold','5907170wvvcCc','659432GKBqcV','apps','清理项目目录失败:\x20','更新\x20package.json\x20失败','dev','cyan','create','utf8','\x20run\x20start','cwd','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','message','defaultApp','Verifying\x20project\x20template','resolving','chdir','nonInteractive','string','Project\x20template\x20ready','writeFileSync','toLocaleString','W_OK','info','项目创建完成:\x20','needsUpgrade','Extracting\x20project\x20template','env','260vGnyLF','Project\x20name:\x20','API\x20配置拉取异常','8253SIVteD','existsSync','minimumVersion','\x20Generated\x20by\x20rabetbase\x20cli\x20','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','1.0.0','69168LBOCdj','*\x20Pulling\x20API\x20configuration...','\x20model(s)','202887CfWdzB','downloading','√\x20Pulled\x20','配置应用AppCode:\x20','1077034RylhiS','projectName','description','√\x20Configuration\x20file\x20created,\x20Apps:\x20','...','API\x20configuration\x20pulled:\x20','repeat','gray','isDirectory','开始创建项目:\x20','Project\x20directory\x20','version','text','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','ino','配置应用AppCode失败'];a164_0x13a8=function(){return _0x1149ee;};return a164_0x13a8();}function readDirectoryIdentity(_0x13a7a7){const _0x28292f=a164_0x3c74;try{const _0x36c044=a164_0x1adba8[_0x28292f(0x17f)](_0x13a7a7);if(!_0x36c044[_0x28292f(0x1c0)]())return null;return{'dev':_0x36c044[_0x28292f(0x191)],'ino':_0x36c044[_0x28292f(0x1c6)]};}catch{return null;}}export async function createApp(_0x46979c){const _0xa161e7=a164_0x3c74,_0x5ca00d=await checkCliVersion();(_0x5ca00d['needsUpgrade']||_0x5ca00d['belowMinimum'])&&(printCliUpgradeWarning(_0x5ca00d),assertCliVersionSupported(_0x5ca00d),logger['info'](_0xa161e7(0x193),_0xa161e7(0x170),{'currentVersion':_0x5ca00d[_0xa161e7(0x181)],'stableVersion':_0x5ca00d['stableVersion'],'minimumVersion':_0x5ca00d[_0xa161e7(0x1ad)],'needsUpgrade':_0x5ca00d[_0xa161e7(0x1a5)],'belowMinimum':_0x5ca00d[_0xa161e7(0x17c)]}));if(_0x46979c[_0xa161e7(0x183)]&&(_0x46979c['appCode']||_0x46979c[_0xa161e7(0x19d)]))await runCreate({'projectName':_0x46979c[_0xa161e7(0x183)],'appCode':_0x46979c['appCode'],'env':_0x46979c[_0xa161e7(0x1a7)]},_0x46979c);else{if(_0x46979c[_0xa161e7(0x183)]){const _0x2c037f=await selectSingleAppcode(_0x46979c[_0xa161e7(0x16e)]);await runCreate({'projectName':_0x46979c[_0xa161e7(0x183)],'appCode':_0x2c037f||undefined,'env':_0x46979c['env']},_0x46979c);}else await guidedCreateProject(_0x567cdd=>runCreate(_0x567cdd,_0x46979c),_0x46979c['env'],_0x46979c[_0xa161e7(0x16e)]);}}async function runCreate(_0x144709,_0x35abf1){const _0x4f2a54=a164_0x3c74;_0x144709[_0x4f2a54(0x1b9)]=validateProjectName(_0x144709[_0x4f2a54(0x1b9)]);const _0x1e1986=a164_0x51e674[_0x4f2a54(0x184)](process[_0x4f2a54(0x196)](),_0x144709[_0x4f2a54(0x1b9)]);if(a164_0x1adba8[_0x4f2a54(0x1ac)](_0x1e1986))throw new Error(_0x4f2a54(0x1c2)+_0x144709['projectName']+'\x20already\x20exists');let _0x19d847=null;try{a164_0x1adba8['accessSync'](a164_0x51e674['dirname'](_0x1e1986),a164_0x1adba8[_0x4f2a54(0x189)][_0x4f2a54(0x1a2)]);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x4f2a54(0x1a3)](_0x4f2a54(0x193),_0x4f2a54(0x1c1)+_0x144709[_0x4f2a54(0x1b9)],{'projectDir':_0x1e1986,'appCode':_0x144709[_0x4f2a54(0x17d)]}),console[_0x4f2a54(0x186)](),console[_0x4f2a54(0x186)](a164_0x4345ce[_0x4f2a54(0x168)](_0x4f2a54(0x180))+_0x4f2a54(0x1a9)+a164_0x4345ce[_0x4f2a54(0x168)](_0x144709[_0x4f2a54(0x1b9)])+(_0x144709[_0x4f2a54(0x17d)]?'\x20|\x20AppCode:\x20'+a164_0x4345ce[_0x4f2a54(0x192)](_0x144709[_0x4f2a54(0x17d)]):''));try{await runTask(_0x4f2a54(0x16c),_0x3d7de8=>copyProjectTemplate(_0x144709[_0x4f2a54(0x1b9)],_0xba5138=>_0x3d7de8(projectTemplateStageLabel(_0xba5138))),_0x4f2a54(0x19f)),_0x19d847=readDirectoryIdentity(_0x1e1986);if(!_0x19d847)throw new Error(_0x4f2a54(0x1c8));await updatePackageJsonName(_0x144709['projectName']),await runTask('Install\x20dependencies',()=>installDependencies(_0x144709[_0x4f2a54(0x1b9)])),await runTask(_0x4f2a54(0x175),()=>formatProjectCode(_0x144709[_0x4f2a54(0x1b9)])),await configureAppCode(_0x144709[_0x4f2a54(0x1b9)],_0x144709['appCode']||'',_0x144709[_0x4f2a54(0x1a7)]);let _0x452b6c=![];if(_0x144709[_0x4f2a54(0x17d)]){console[_0x4f2a54(0x186)](_0x4f2a54(0x1b2));const _0x58132f=process[_0x4f2a54(0x196)]();try{process['chdir'](_0x1e1986);const _0x161f9f=_0x144709[_0x4f2a54(0x1a7)]||_0x4f2a54(0x176);initEnv(_0x161f9f);const {configArray:_0x338c92}=await fetchModelList(_0x144709['appCode'],_0x35abf1[_0x4f2a54(0x16e)]||''),_0x41a8d2=DEFAULT_API_DIR,_0x4a0c66=await generateApiFile(_0x338c92,'',_0x144709[_0x4f2a54(0x17d)],!![],_0x161f9f,_0x41a8d2);console['log'](_0x4f2a54(0x1b6)+_0x338c92['length']+'\x20dataset(s),\x20generated\x20'+_0x4a0c66['modelCount']+_0x4f2a54(0x1b3)),logger['info'](_0x4f2a54(0x193),_0x4f2a54(0x1bd)+_0x144709[_0x4f2a54(0x17d)]);}catch(_0xa8c7fe){_0x452b6c=!![],console[_0x4f2a54(0x186)](_0x4f2a54(0x1c5)),logger['warn'](_0x4f2a54(0x193),_0x4f2a54(0x1aa),{'error':_0xa8c7fe instanceof Error?_0xa8c7fe[_0x4f2a54(0x198)]:String(_0xa8c7fe)});}finally{process[_0x4f2a54(0x19c)](_0x58132f);}}logger[_0x4f2a54(0x185)](_0x1e1986),logger[_0x4f2a54(0x1cb)](_0x4f2a54(0x193),_0x4f2a54(0x1a4)+_0x144709[_0x4f2a54(0x1b9)]),console['log'](),console[_0x4f2a54(0x186)](a164_0x4345ce['green']('─'[_0x4f2a54(0x1be)](0x3c))),console[_0x4f2a54(0x186)](a164_0x4345ce[_0x4f2a54(0x192)][_0x4f2a54(0x18b)]('🚀\x20Next\x20Steps:')),console['log'](),console['log'](_0x4f2a54(0x169)+a164_0x4345ce[_0x4f2a54(0x192)][_0x4f2a54(0x18b)](_0x4f2a54(0x1ca)+_0x144709[_0x4f2a54(0x1b9)]+_0x4f2a54(0x167)+CLI_BIN_NAME+_0x4f2a54(0x195))),_0x452b6c&&console[_0x4f2a54(0x186)](_0x4f2a54(0x17a)+a164_0x4345ce[_0x4f2a54(0x192)][_0x4f2a54(0x18b)](CLI_BIN_NAME+'\x20api\x20pull')),console[_0x4f2a54(0x186)](a164_0x4345ce['green']('─'[_0x4f2a54(0x1be)](0x3c)));}catch(_0x67a192){logger['error'](_0x4f2a54(0x193),'项目创建失败:\x20'+_0x144709['projectName'],{'error':_0x67a192 instanceof Error?_0x67a192['message']:String(_0x67a192)});try{const _0x5c60c5=readDirectoryIdentity(_0x1e1986);if(_0x19d847&&_0x5c60c5?.[_0x4f2a54(0x191)]===_0x19d847['dev']&&_0x5c60c5[_0x4f2a54(0x1c6)]===_0x19d847[_0x4f2a54(0x1c6)])console[_0x4f2a54(0x186)](_0x4f2a54(0x179)+_0x1e1986),a164_0x1adba8['rmSync'](_0x1e1986,{'recursive':!![],'force':!![]});else _0x5c60c5&&logger[_0x4f2a54(0x188)](_0x4f2a54(0x193),_0x4f2a54(0x177)+_0x1e1986);}catch{logger['warn'](_0x4f2a54(0x193),_0x4f2a54(0x18f)+_0x1e1986);}throw _0x67a192;}}async function runTask(_0x29a420,_0x3e6651,_0xe6f068=_0x29a420){const _0x1854f2=a164_0x3c74,_0x47abf0=a164_0x9db58c(_0x29a420+_0x1854f2(0x1bc))['start']();try{const _0x3f6c49=await _0x3e6651(_0x51b002=>{const _0x542d15=_0x1854f2;_0x47abf0[_0x542d15(0x1c4)]=_0x51b002+_0x542d15(0x1bc);});_0x47abf0[_0x1854f2(0x16b)](),console[_0x1854f2(0x186)](''+a164_0x4345ce[_0x1854f2(0x168)](_0x1854f2(0x180))+_0xe6f068+'\x20'+a164_0x4345ce[_0x1854f2(0x1bf)]('['+_0x3f6c49+']'));}catch(_0x3a86dc){_0x47abf0[_0x1854f2(0x178)](_0x29a420);throw _0x3a86dc;}}function projectTemplateStageLabel(_0x22a942){const _0x26a80d=a164_0x3c74;switch(_0x22a942){case _0x26a80d(0x19b):return _0x26a80d(0x16c);case _0x26a80d(0x1b5):return'Downloading\x20project\x20template';case _0x26a80d(0x16d):return _0x26a80d(0x19a);case'extracting':return _0x26a80d(0x1a6);}}async function updatePackageJsonName(_0x1b3010){const _0x1793d9=a164_0x3c74,_0x31c5ad=a164_0x51e674['resolve'](process['cwd'](),_0x1b3010),_0x57e437=a164_0x51e674[_0x1793d9(0x174)](_0x31c5ad,_0x1793d9(0x187));try{console['log']('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x4797ae=getRabetbaseCliPackageRoot(),_0x55dbc0=a164_0x51e674[_0x1793d9(0x174)](_0x4797ae,_0x1793d9(0x187));let _0x19a352=_0x1793d9(0x1b0);try{const _0x4b6f7e=JSON[_0x1793d9(0x16f)](a164_0x1adba8[_0x1793d9(0x18a)](_0x55dbc0,_0x1793d9(0x194)));_0x19a352=_0x4b6f7e['version']||'1.0.0';}catch{}const _0x5d0f48=a164_0x1adba8['readFileSync'](_0x57e437,_0x1793d9(0x194)),_0x50b707=JSON[_0x1793d9(0x16f)](_0x5d0f48);_0x50b707[_0x1793d9(0x173)]=_0x1b3010,_0x50b707[_0x1793d9(0x1ba)]=_0x1b3010+_0x1793d9(0x1ae)+_0x19a352,a164_0x1adba8[_0x1793d9(0x1a0)](_0x57e437,JSON[_0x1793d9(0x1c9)](_0x50b707,null,0x2)+'\x0a',_0x1793d9(0x194)),console['log'](_0x1793d9(0x17e)+_0x1b3010),logger['info']('create','更新\x20package.json\x20name');}catch(_0x3679ed){logger['error'](_0x1793d9(0x193),_0x1793d9(0x190));throw _0x3679ed;}}async function configureAppCode(_0x1b2473,_0x31efc6,_0x201952){const _0x11fcdf=a164_0x3c74,_0x24567a=a164_0x51e674['resolve'](process[_0x11fcdf(0x196)](),_0x1b2473),_0x5cbfb5=a164_0x51e674[_0x11fcdf(0x174)](_0x24567a,NEW_CONFIG_NAME);try{_0x31efc6?console[_0x11fcdf(0x186)]('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x1b2473+':\x20'+_0x31efc6):console[_0x11fcdf(0x186)](_0x11fcdf(0x1af)+_0x1b2473);const _0xe9deaf=getRabetbaseCliPackageRoot(),_0x7a410d=a164_0x51e674['join'](_0xe9deaf,_0x11fcdf(0x187));let _0x41b46e=_0x11fcdf(0x1b0);try{const _0x43714a=JSON[_0x11fcdf(0x16f)](a164_0x1adba8[_0x11fcdf(0x18a)](_0x7a410d,'utf8'));_0x41b46e=_0x43714a[_0x11fcdf(0x1c3)]||_0x11fcdf(0x1b0);}catch{}const _0x194ad9=readConfig(),_0x4f776c=typeof _0x194ad9['env']===_0x11fcdf(0x19e)?_0x194ad9[_0x11fcdf(0x1a7)]:undefined,_0x112c3b={};for(const _0x4dfde1 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x194ad9[_0x4dfde1]!=null)_0x112c3b[_0x4dfde1]=_0x194ad9[_0x4dfde1];}const _0x387bf8=buildCanonicalProjectConfig(_0x112c3b,{'appCodes':_0x31efc6?[_0x31efc6]:[],'env':_0x201952||_0x4f776c||'production','metadata':{'createdAt':new Date()[_0x11fcdf(0x1a1)](),'version':_0x41b46e}});writeConfigFile(_0x5cbfb5,_0x387bf8),_0x31efc6?console[_0x11fcdf(0x186)](_0x11fcdf(0x1bb)+Object['keys'](_0x387bf8[_0x11fcdf(0x18e)]||{})[_0x11fcdf(0x174)](',\x20')+_0x11fcdf(0x172)+_0x387bf8[_0x11fcdf(0x199)]):console[_0x11fcdf(0x186)](_0x11fcdf(0x197)+CLI_BIN_NAME+_0x11fcdf(0x171)),logger[_0x11fcdf(0x1a3)](_0x11fcdf(0x193),_0x11fcdf(0x1b7)+_0x31efc6);}catch(_0x143d43){logger['error'](_0x11fcdf(0x193),_0x11fcdf(0x1c7));throw _0x143d43;}}
1
+ (function(_0x10b4d8,_0x8dfdec){const _0x4255e7=a164_0x330b,_0xb98ebd=_0x10b4d8();while(!![]){try{const _0x30a52c=-parseInt(_0x4255e7(0x1f0))/0x1+parseInt(_0x4255e7(0x1f3))/0x2*(parseInt(_0x4255e7(0x1ce))/0x3)+-parseInt(_0x4255e7(0x1ee))/0x4+parseInt(_0x4255e7(0x21b))/0x5+parseInt(_0x4255e7(0x1d6))/0x6*(parseInt(_0x4255e7(0x1de))/0x7)+parseInt(_0x4255e7(0x213))/0x8*(-parseInt(_0x4255e7(0x1e6))/0x9)+-parseInt(_0x4255e7(0x206))/0xa*(parseInt(_0x4255e7(0x20c))/0xb);if(_0x30a52c===_0x8dfdec)break;else _0xb98ebd['push'](_0xb98ebd['shift']());}catch(_0x454c4c){_0xb98ebd['push'](_0xb98ebd['shift']());}}}(a164_0x53a6,0xddb39));import a164_0x3febed from'path';import a164_0x51b214 from'fs';import a164_0x4c5fec from'chalk';import a164_0x314462 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 a164_0x53a6(){const _0x3d7b5f=['minimumVersion','join','info','writeFileSync','rmSync','dirname','1.0.0','defaultApp','message','\x20dataset(s),\x20generated\x20','cwd','gray','\x20model(s)','create','\x20\x202.\x20Pull\x20API\x20configuration:\x20','API\x20configuration\x20pulled:\x20','配置应用AppCode失败','error','120327HOKjOM','Project\x20directory\x20','text','\x20config\x20set\x20appcode\x20<app-code>\x27','parse','W_OK','CLI\x20版本检查','log','26874FyvJQd','projectName','Extracting\x20project\x20template','currentVersion','readFileSync','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','清理项目目录失败:\x20','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','1029fqWCwt','\x20Generated\x20by\x20rabetbase\x20cli\x20','Project\x20template\x20ready','resolve','dev','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','package.json','11552148nLoqIB','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','green','cookie','projectCode','existsSync','appCode','Install\x20dependencies','1053528SZaFKb','√\x20package.json\x20updated:\x20name=','375484UxEnar','utf8','更新\x20package.json\x20失败','74YqCdcz','name','apps','\x20|\x20AppCode:\x20','项目创建失败:\x20','bold','lstatSync','Verifying\x20project\x20template','\x20√\x20','isDirectory','length','Project\x20name:\x20','*\x20Pulling\x20API\x20configuration...','production','fail','API\x20配置拉取异常','...','warn','stableVersion','10bFOwlc','Downloading\x20project\x20template','resolving','repeat','\x20|\x20Default:\x20','constants','850399oLhvZw','√\x20Pulled\x20','nonInteractive','env','verifying','modelCount','项目创建完成:\x20','8TvqZRG','description','version','🚀\x20Next\x20Steps:','Resolving\x20project\x20template','√\x20Configuration\x20file\x20created,\x20Apps:\x20','配置应用AppCode:\x20','chdir','3826950qtSxIO','*\x20Configuring\x20AppCode\x20for\x20project\x20','\x20api\x20pull','cyan','\x20&&\x20'];a164_0x53a6=function(){return _0x3d7b5f;};return a164_0x53a6();}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';import{validateProjectName}from'../../../commands/project/create/project-name.js';function readDirectoryIdentity(_0x525b37){const _0x20671e=a164_0x330b;try{const _0x5a0f5d=a164_0x51b214[_0x20671e(0x1f9)](_0x525b37);if(!_0x5a0f5d[_0x20671e(0x1fc)]())return null;return{'dev':_0x5a0f5d[_0x20671e(0x1e2)],'ino':_0x5a0f5d['ino']};}catch{return null;}}export async function createApp(_0x47d2a0){const _0x1f634f=a164_0x330b,_0x1611b2=await checkCliVersion();(_0x1611b2['needsUpgrade']||_0x1611b2['belowMinimum'])&&(printCliUpgradeWarning(_0x1611b2),assertCliVersionSupported(_0x1611b2),logger[_0x1f634f(0x1be)](_0x1f634f(0x1c9),_0x1f634f(0x1d4),{'currentVersion':_0x1611b2[_0x1f634f(0x1d9)],'stableVersion':_0x1611b2[_0x1f634f(0x205)],'minimumVersion':_0x1611b2[_0x1f634f(0x220)],'needsUpgrade':_0x1611b2['needsUpgrade'],'belowMinimum':_0x1611b2['belowMinimum']}));if(_0x47d2a0[_0x1f634f(0x1ea)]&&(_0x47d2a0['appCode']||_0x47d2a0[_0x1f634f(0x20e)]))await runCreate({'projectName':_0x47d2a0['projectCode'],'appCode':_0x47d2a0[_0x1f634f(0x1ec)],'env':_0x47d2a0['env']},_0x47d2a0);else{if(_0x47d2a0[_0x1f634f(0x1ea)]){const _0x312e8e=await selectSingleAppcode(_0x47d2a0[_0x1f634f(0x1e9)]);await runCreate({'projectName':_0x47d2a0['projectCode'],'appCode':_0x312e8e||undefined,'env':_0x47d2a0[_0x1f634f(0x20f)]},_0x47d2a0);}else await guidedCreateProject(_0x5605cd=>runCreate(_0x5605cd,_0x47d2a0),_0x47d2a0['env'],_0x47d2a0['cookie']);}}async function runCreate(_0x4a989f,_0x5454c7){const _0x162b80=a164_0x330b;_0x4a989f[_0x162b80(0x1d7)]=validateProjectName(_0x4a989f[_0x162b80(0x1d7)]);const _0xf5b018=a164_0x3febed[_0x162b80(0x1e1)](process['cwd'](),_0x4a989f[_0x162b80(0x1d7)]);if(a164_0x51b214[_0x162b80(0x1eb)](_0xf5b018))throw new Error(_0x162b80(0x1cf)+_0x4a989f[_0x162b80(0x1d7)]+'\x20already\x20exists');let _0x270adf=null;try{a164_0x51b214['accessSync'](a164_0x3febed[_0x162b80(0x1c1)](_0xf5b018),a164_0x51b214[_0x162b80(0x20b)][_0x162b80(0x1d3)]);}catch{throw new Error(_0x162b80(0x1dd));}logger[_0x162b80(0x1be)](_0x162b80(0x1c9),'开始创建项目:\x20'+_0x4a989f[_0x162b80(0x1d7)],{'projectDir':_0xf5b018,'appCode':_0x4a989f[_0x162b80(0x1ec)]}),console[_0x162b80(0x1d5)](),console['log'](a164_0x4c5fec[_0x162b80(0x1e8)]('\x20√\x20')+_0x162b80(0x1fe)+a164_0x4c5fec[_0x162b80(0x1e8)](_0x4a989f[_0x162b80(0x1d7)])+(_0x4a989f[_0x162b80(0x1ec)]?_0x162b80(0x1f6)+a164_0x4c5fec[_0x162b80(0x21e)](_0x4a989f[_0x162b80(0x1ec)]):''));try{await runTask(_0x162b80(0x217),_0x444593=>copyProjectTemplate(_0x4a989f[_0x162b80(0x1d7)],_0x1f53e5=>_0x444593(projectTemplateStageLabel(_0x1f53e5))),_0x162b80(0x1e0)),_0x270adf=readDirectoryIdentity(_0xf5b018);if(!_0x270adf)throw new Error('Unable\x20to\x20verify\x20ownership\x20of\x20the\x20created\x20project\x20directory');await updatePackageJsonName(_0x4a989f['projectName']),await runTask(_0x162b80(0x1ed),()=>installDependencies(_0x4a989f[_0x162b80(0x1d7)])),await runTask('Format\x20code',()=>formatProjectCode(_0x4a989f[_0x162b80(0x1d7)])),await configureAppCode(_0x4a989f[_0x162b80(0x1d7)],_0x4a989f[_0x162b80(0x1ec)]||'',_0x4a989f[_0x162b80(0x20f)]);let _0xfe0c1b=![];if(_0x4a989f[_0x162b80(0x1ec)]){console[_0x162b80(0x1d5)](_0x162b80(0x1ff));const _0xe9b492=process[_0x162b80(0x1c6)]();try{process['chdir'](_0xf5b018);const _0x4be582=_0x4a989f[_0x162b80(0x20f)]||_0x162b80(0x200);initEnv(_0x4be582);const {configArray:_0x5bd700}=await fetchModelList(_0x4a989f['appCode'],_0x5454c7[_0x162b80(0x1e9)]||''),_0x463d6d=DEFAULT_API_DIR,_0x4af27c=await generateApiFile(_0x5bd700,'',_0x4a989f[_0x162b80(0x1ec)],!![],_0x4be582,_0x463d6d);console[_0x162b80(0x1d5)](_0x162b80(0x20d)+_0x5bd700[_0x162b80(0x1fd)]+_0x162b80(0x1c5)+_0x4af27c[_0x162b80(0x211)]+_0x162b80(0x1c8)),logger[_0x162b80(0x1be)]('create',_0x162b80(0x1cb)+_0x4a989f[_0x162b80(0x1ec)]);}catch(_0x223475){_0xfe0c1b=!![],console[_0x162b80(0x1d5)](_0x162b80(0x1e7)),logger[_0x162b80(0x204)](_0x162b80(0x1c9),_0x162b80(0x202),{'error':_0x223475 instanceof Error?_0x223475[_0x162b80(0x1c4)]:String(_0x223475)});}finally{process[_0x162b80(0x21a)](_0xe9b492);}}logger['setLogPath'](_0xf5b018),logger['success'](_0x162b80(0x1c9),_0x162b80(0x212)+_0x4a989f['projectName']),console[_0x162b80(0x1d5)](),console['log'](a164_0x4c5fec['green']('─'[_0x162b80(0x209)](0x3c))),console[_0x162b80(0x1d5)](a164_0x4c5fec[_0x162b80(0x21e)][_0x162b80(0x1f8)](_0x162b80(0x216))),console['log'](),console['log']('\x20\x201.\x20Start\x20project:\x20'+a164_0x4c5fec[_0x162b80(0x21e)][_0x162b80(0x1f8)]('cd\x20'+_0x4a989f['projectName']+_0x162b80(0x21f)+CLI_BIN_NAME+'\x20run\x20start')),_0xfe0c1b&&console[_0x162b80(0x1d5)](_0x162b80(0x1ca)+a164_0x4c5fec[_0x162b80(0x21e)][_0x162b80(0x1f8)](CLI_BIN_NAME+_0x162b80(0x21d))),console['log'](a164_0x4c5fec[_0x162b80(0x1e8)]('─'[_0x162b80(0x209)](0x3c)));}catch(_0x28545d){logger['error'](_0x162b80(0x1c9),_0x162b80(0x1f7)+_0x4a989f['projectName'],{'error':_0x28545d instanceof Error?_0x28545d[_0x162b80(0x1c4)]:String(_0x28545d)});try{const _0x2f95e5=readDirectoryIdentity(_0xf5b018);if(_0x270adf&&_0x2f95e5?.[_0x162b80(0x1e2)]===_0x270adf['dev']&&_0x2f95e5['ino']===_0x270adf['ino'])console[_0x162b80(0x1d5)](_0x162b80(0x1e3)+_0xf5b018),a164_0x51b214[_0x162b80(0x1c0)](_0xf5b018,{'recursive':!![],'force':!![]});else _0x2f95e5&&logger[_0x162b80(0x204)](_0x162b80(0x1c9),'跳过清理:项目目录所有权已变化:\x20'+_0xf5b018);}catch{logger['warn'](_0x162b80(0x1c9),_0x162b80(0x1dc)+_0xf5b018);}throw _0x28545d;}}function a164_0x330b(_0x5edbf8,_0x575872){_0x5edbf8=_0x5edbf8-0x1bd;const _0x53a64f=a164_0x53a6();let _0x330b22=_0x53a64f[_0x5edbf8];return _0x330b22;}async function runTask(_0x2fd337,_0x277cbd,_0x4be592=_0x2fd337){const _0x32ccfa=a164_0x330b,_0x377556=a164_0x314462(_0x2fd337+_0x32ccfa(0x203))['start']();try{const _0x421627=await _0x277cbd(_0x3f833a=>{const _0x2a4fd2=_0x32ccfa;_0x377556[_0x2a4fd2(0x1d0)]=_0x3f833a+_0x2a4fd2(0x203);});_0x377556['stop'](),console[_0x32ccfa(0x1d5)](''+a164_0x4c5fec[_0x32ccfa(0x1e8)](_0x32ccfa(0x1fb))+_0x4be592+'\x20'+a164_0x4c5fec[_0x32ccfa(0x1c7)]('['+_0x421627+']'));}catch(_0x502d9b){_0x377556[_0x32ccfa(0x201)](_0x2fd337);throw _0x502d9b;}}function projectTemplateStageLabel(_0x396dfa){const _0x1d3bda=a164_0x330b;switch(_0x396dfa){case _0x1d3bda(0x208):return _0x1d3bda(0x217);case'downloading':return _0x1d3bda(0x207);case _0x1d3bda(0x210):return _0x1d3bda(0x1fa);case'extracting':return _0x1d3bda(0x1d8);}}async function updatePackageJsonName(_0x5b8bc0){const _0x1e13c2=a164_0x330b,_0x1260c4=a164_0x3febed[_0x1e13c2(0x1e1)](process['cwd'](),_0x5b8bc0),_0x7fa350=a164_0x3febed[_0x1e13c2(0x1bd)](_0x1260c4,_0x1e13c2(0x1e5));try{console[_0x1e13c2(0x1d5)]('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x53b658=getRabetbaseCliPackageRoot(),_0x553287=a164_0x3febed[_0x1e13c2(0x1bd)](_0x53b658,_0x1e13c2(0x1e5));let _0x2df779=_0x1e13c2(0x1c2);try{const _0x43242f=JSON[_0x1e13c2(0x1d2)](a164_0x51b214['readFileSync'](_0x553287,'utf8'));_0x2df779=_0x43242f[_0x1e13c2(0x215)]||_0x1e13c2(0x1c2);}catch{}const _0x3de1d4=a164_0x51b214[_0x1e13c2(0x1da)](_0x7fa350,_0x1e13c2(0x1f1)),_0xf5a68b=JSON[_0x1e13c2(0x1d2)](_0x3de1d4);_0xf5a68b[_0x1e13c2(0x1f4)]=_0x5b8bc0,_0xf5a68b[_0x1e13c2(0x214)]=_0x5b8bc0+_0x1e13c2(0x1df)+_0x2df779,a164_0x51b214[_0x1e13c2(0x1bf)](_0x7fa350,JSON['stringify'](_0xf5a68b,null,0x2)+'\x0a','utf8'),console[_0x1e13c2(0x1d5)](_0x1e13c2(0x1ef)+_0x5b8bc0),logger['info'](_0x1e13c2(0x1c9),'更新\x20package.json\x20name');}catch(_0x2388b7){logger['error'](_0x1e13c2(0x1c9),_0x1e13c2(0x1f2));throw _0x2388b7;}}async function configureAppCode(_0x308a89,_0x1c8ce0,_0x4d840){const _0x22286c=a164_0x330b,_0x11c4d9=a164_0x3febed[_0x22286c(0x1e1)](process[_0x22286c(0x1c6)](),_0x308a89),_0x5a8ab1=a164_0x3febed[_0x22286c(0x1bd)](_0x11c4d9,NEW_CONFIG_NAME);try{_0x1c8ce0?console[_0x22286c(0x1d5)](_0x22286c(0x21c)+_0x308a89+':\x20'+_0x1c8ce0):console[_0x22286c(0x1d5)](_0x22286c(0x1e4)+_0x308a89);const _0x12584d=getRabetbaseCliPackageRoot(),_0x62323c=a164_0x3febed[_0x22286c(0x1bd)](_0x12584d,_0x22286c(0x1e5));let _0x1d4a0c=_0x22286c(0x1c2);try{const _0x25e17e=JSON[_0x22286c(0x1d2)](a164_0x51b214[_0x22286c(0x1da)](_0x62323c,'utf8'));_0x1d4a0c=_0x25e17e['version']||'1.0.0';}catch{}const _0x44e557=readConfig(),_0x197cc9=typeof _0x44e557[_0x22286c(0x20f)]==='string'?_0x44e557[_0x22286c(0x20f)]:undefined,_0x1571c3={};for(const _0x2fe975 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x44e557[_0x2fe975]!=null)_0x1571c3[_0x2fe975]=_0x44e557[_0x2fe975];}const _0x584f2e=buildCanonicalProjectConfig(_0x1571c3,{'appCodes':_0x1c8ce0?[_0x1c8ce0]:[],'env':_0x4d840||_0x197cc9||'production','metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x1d4a0c}});writeConfigFile(_0x5a8ab1,_0x584f2e),_0x1c8ce0?console['log'](_0x22286c(0x218)+Object['keys'](_0x584f2e[_0x22286c(0x1f5)]||{})[_0x22286c(0x1bd)](',\x20')+_0x22286c(0x20a)+_0x584f2e[_0x22286c(0x1c3)]):console['log'](_0x22286c(0x1db)+CLI_BIN_NAME+_0x22286c(0x1d1)),logger['info']('create',_0x22286c(0x219)+_0x1c8ce0);}catch(_0x5abf54){logger[_0x22286c(0x1cd)](_0x22286c(0x1c9),_0x22286c(0x1cc));throw _0x5abf54;}}
@@ -1 +1 @@
1
- const a165_0xc01cfa=a165_0x2abf;(function(_0x427c27,_0xff2c66){const _0x54ea0d=a165_0x2abf,_0x4779b3=_0x427c27();while(!![]){try{const _0xac8a43=parseInt(_0x54ea0d(0xff))/0x1+parseInt(_0x54ea0d(0x118))/0x2*(parseInt(_0x54ea0d(0x121))/0x3)+-parseInt(_0x54ea0d(0x131))/0x4*(parseInt(_0x54ea0d(0x134))/0x5)+-parseInt(_0x54ea0d(0x102))/0x6+parseInt(_0x54ea0d(0xdf))/0x7*(parseInt(_0x54ea0d(0xe4))/0x8)+parseInt(_0x54ea0d(0x116))/0x9*(-parseInt(_0x54ea0d(0x100))/0xa)+parseInt(_0x54ea0d(0xfb))/0xb;if(_0xac8a43===_0xff2c66)break;else _0x4779b3['push'](_0x4779b3['shift']());}catch(_0x5c4a83){_0x4779b3['push'](_0x4779b3['shift']());}}}(a165_0x1c66,0xc94e5));import{createHash}from'node:crypto';import a165_0x4f130b from'node:fs/promises';import a165_0x38a9f8 from'node:path';import{PROJECT_TEMPLATE_ASSET_BASE_URL}from'../../../constant/cdn.js';function a165_0x2abf(_0x1478e7,_0xece0d2){_0x1478e7=_0x1478e7-0xdf;const _0x1c66b8=a165_0x1c66();let _0x2abf23=_0x1c66b8[_0x1478e7];return _0x2abf23;}import{extractProjectTemplateArchive}from'../../../commands/project/create/project-template-archive.js';import{getRabetbaseCdnConfig}from'../../../utils/cli-version-policy.js';import{CliErrors}from'../../../errors.js';const TEMPLATE_ID=a165_0xc01cfa(0x112),ARCHIVE_TIMEOUT_MS=0x3a98,MAX_ARCHIVE_SIZE=0x14*0x400*0x400;function nonEmptyString(_0x30168c){const _0x58fcf2=a165_0xc01cfa;return typeof _0x30168c===_0x58fcf2(0x132)&&_0x30168c[_0x58fcf2(0x129)]()?_0x30168c[_0x58fcf2(0x129)]():null;}function parseDescriptor(_0x476d83){const _0x3a72b7=a165_0xc01cfa;if(!_0x476d83||typeof _0x476d83!==_0x3a72b7(0xe7))throw new Error(_0x3a72b7(0x135)+TEMPLATE_ID+'\x22.');const _0x373dca=_0x476d83,_0x18e2e5=nonEmptyString(_0x373dca['version']),_0x7113b6=nonEmptyString(_0x373dca[_0x3a72b7(0xe0)]),_0x247e9a=nonEmptyString(_0x373dca[_0x3a72b7(0xf1)])?.[_0x3a72b7(0x10d)](),_0x3fa1f5=_0x373dca[_0x3a72b7(0x104)];if(!_0x18e2e5||!_0x7113b6||_0x7113b6!==a165_0x38a9f8[_0x3a72b7(0xfa)]['basename'](_0x7113b6)||_0x7113b6[_0x3a72b7(0x11f)]('\x5c')||!_0x247e9a||!/^sha256:[a-f0-9]{64}$/[_0x3a72b7(0x117)](_0x247e9a)||typeof _0x3fa1f5!==_0x3a72b7(0x109)||!Number['isSafeInteger'](_0x3fa1f5)||_0x3fa1f5<=0x0||_0x3fa1f5>MAX_ARCHIVE_SIZE)throw new Error(_0x3a72b7(0x12c)+TEMPLATE_ID+'\x22.');return{'version':_0x18e2e5,'name':_0x7113b6,'sha256':_0x247e9a,'size':_0x3fa1f5};}async function fetchWithTimeout(_0x5aad0a,_0x425c05,_0x1d3ad5,_0x448c94){const _0x48c0f5=a165_0xc01cfa,_0x578fed=new AbortController(),_0x2c8d2f=setTimeout(()=>_0x578fed[_0x48c0f5(0xeb)](),_0x425c05);try{const _0xbd35e0=await fetch(_0x5aad0a,{'headers':{'Accept':_0x1d3ad5},'signal':_0x578fed[_0x48c0f5(0x115)]});return await _0x448c94(_0xbd35e0);}finally{clearTimeout(_0x2c8d2f);}}async function fetchTemplateDescriptor(){const _0x4976ec=a165_0xc01cfa,_0x3bde7e=await getRabetbaseCdnConfig();if(!_0x3bde7e)throw new Error('Rabetbase\x20CDN\x20config\x20is\x20unavailable.');return parseDescriptor(_0x3bde7e[_0x4976ec(0x114)]);}function a165_0x1c66(){const _0x50cbfc=['Check\x20your\x20network\x20and\x20retry.\x20Details:\x20','sha256','application/zip','concat','content-length','getReader','get','byteLength','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20','posix','14535268FLIUkT','cdn','sha256:','verifying','855928YLbUNg','360yKkTis','arrayBuffer','7095090piLAGk','code','size','resolve','extracting','join','package.json','number','CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20','validation','CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.','toLowerCase','Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','pathname','https:','href','sub-app-react-demo','project','projectTemplate','signal','369666wqksth','test','2iFObSf','rename','CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.',',\x20received\x20','push','startsWith','message','includes','version','3737166uoCslw','CDN\x20project\x20template\x20checksum\x20verification\x20failed.','isFinite','body','dirname','Project\x20template\x20package.json\x20is\x20invalid.','cancel','status','trim','readFile','mkdtemp','CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22','hex','Project\x20directory\x20already\x20exists:\x20','mkdir','parse','2348XyhjWP','string','resolving','9565oTvimi','CDN\x20config\x20does\x20not\x20define\x20template\x20\x22','utf8','dev','21DNbUlM','name','template.zip','ino','EEXIST','3161656XoZcJK','length','from','object','read','Use\x20a\x20different\x20project\x20name.','origin','abort','lstat','ENOENT','.rabetbase-create-','Unable\x20to\x20claim\x20the\x20project\x20directory.'];a165_0x1c66=function(){return _0x50cbfc;};return a165_0x1c66();}function resolveArchiveUrl(_0x255d46){const _0x26f388=a165_0xc01cfa,_0x5a98cd=new URL(PROJECT_TEMPLATE_ASSET_BASE_URL+'/'),_0x41a55f=new URL(_0x255d46,_0x5a98cd);if(_0x41a55f['protocol']!==_0x26f388(0x110)||_0x41a55f['origin']!==_0x5a98cd[_0x26f388(0xea)]||!_0x41a55f[_0x26f388(0x10f)][_0x26f388(0x11d)](_0x5a98cd[_0x26f388(0x10f)]))throw new Error(_0x26f388(0x11a));return _0x41a55f[_0x26f388(0x111)];}async function readResponseBytes(_0xbeb862,_0x31b0e6){const _0x26ba21=a165_0xc01cfa;if(!_0xbeb862['body']){const _0x44061b=Buffer['from'](await _0xbeb862[_0x26ba21(0x101)]());if(_0x44061b[_0x26ba21(0xe5)]>_0x31b0e6)throw new Error(_0x26ba21(0xf8));return _0x44061b;}const _0x11a4f5=_0xbeb862[_0x26ba21(0x124)][_0x26ba21(0xf5)](),_0x79ef38=[];let _0x99ab49=0x0;try{while(!![]){const {done:_0x4c2c34,value:_0x164dbc}=await _0x11a4f5[_0x26ba21(0xe8)]();if(_0x4c2c34)break;_0x99ab49+=_0x164dbc[_0x26ba21(0xf7)];if(_0x99ab49>_0x31b0e6){await _0x11a4f5[_0x26ba21(0x127)]();throw new Error(_0x26ba21(0xf8));}_0x79ef38[_0x26ba21(0x11c)](Buffer[_0x26ba21(0xe6)](_0x164dbc));}}finally{_0x11a4f5['releaseLock']();}return Buffer[_0x26ba21(0xf3)](_0x79ef38,_0x99ab49);}async function downloadArchive(_0x582503,_0x5856c5,_0x441097){const _0x45e993=a165_0xc01cfa,_0x166057=await fetchWithTimeout(resolveArchiveUrl(_0x582503[_0x45e993(0xe0)]),ARCHIVE_TIMEOUT_MS,_0x45e993(0xf2),async _0x174025=>{const _0x134dea=_0x45e993;if(!_0x174025['ok'])throw new Error(_0x134dea(0x10a)+_0x174025[_0x134dea(0x128)]+'.');const _0xf91929=Number(_0x174025['headers'][_0x134dea(0xf6)](_0x134dea(0xf4)));if(Number[_0x134dea(0x123)](_0xf91929)&&_0xf91929>MAX_ARCHIVE_SIZE)throw new Error(_0x134dea(0x10c));return readResponseBytes(_0x174025,_0x582503[_0x134dea(0x104)]);});if(_0x166057[_0x45e993(0xe5)]!==_0x582503[_0x45e993(0x104)])throw new Error(_0x45e993(0xf9)+_0x582503['size']+_0x45e993(0x11b)+_0x166057[_0x45e993(0xe5)]+'.');_0x441097?.(_0x45e993(0xfe));const _0x107750=_0x45e993(0xfd)+createHash(_0x45e993(0xf1))['update'](_0x166057)['digest'](_0x45e993(0x12d));if(_0x107750!==_0x582503[_0x45e993(0xf1)])throw new Error(_0x45e993(0x122));await a165_0x4f130b['writeFile'](_0x5856c5,_0x166057,{'flag':'wx'});}async function assertTemplateRoot(_0x539bd3){const _0x46a231=a165_0xc01cfa,_0x509a1d=a165_0x38a9f8['join'](_0x539bd3,_0x46a231(0x108)),_0x3ca97d=JSON[_0x46a231(0x130)](await a165_0x4f130b[_0x46a231(0x12a)](_0x509a1d,_0x46a231(0x136)));if(!_0x3ca97d||typeof _0x3ca97d!==_0x46a231(0xe7))throw new Error(_0x46a231(0x126));}async function readDirectoryIdentity(_0xf2821){const _0x429fab=a165_0xc01cfa;try{const _0x5674fb=await a165_0x4f130b[_0x429fab(0xec)](_0xf2821);if(!_0x5674fb['isDirectory']())return null;return{'dev':_0x5674fb[_0x429fab(0x137)],'ino':_0x5674fb[_0x429fab(0xe2)]};}catch{return null;}}async function commitStagedProject(_0x83a1c4,_0x1b32b4){const _0x9747e2=a165_0xc01cfa;await a165_0x4f130b[_0x9747e2(0x12f)](_0x1b32b4);const _0x843e23=await readDirectoryIdentity(_0x1b32b4);if(!_0x843e23)throw new Error(_0x9747e2(0xef));try{for(const _0x551a68 of await a165_0x4f130b['readdir'](_0x83a1c4)){await a165_0x4f130b[_0x9747e2(0x119)](a165_0x38a9f8[_0x9747e2(0x107)](_0x83a1c4,_0x551a68),a165_0x38a9f8[_0x9747e2(0x107)](_0x1b32b4,_0x551a68));}}catch(_0x5153e1){const _0x128593=await readDirectoryIdentity(_0x1b32b4);_0x128593?.['dev']===_0x843e23[_0x9747e2(0x137)]&&_0x128593[_0x9747e2(0xe2)]===_0x843e23[_0x9747e2(0xe2)]&&await a165_0x4f130b['rm'](_0x1b32b4,{'recursive':!![],'force':!![]});throw _0x5153e1;}}export async function materializeProjectTemplate(_0x4e89e5,_0x191789){const _0x2aeb8d=a165_0xc01cfa,_0x5646e1=a165_0x38a9f8[_0x2aeb8d(0x105)](_0x4e89e5),_0x2bfd5e=a165_0x38a9f8[_0x2aeb8d(0x125)](_0x5646e1);try{await a165_0x4f130b[_0x2aeb8d(0xec)](_0x5646e1);throw new Error(_0x2aeb8d(0x12e)+_0x5646e1);}catch(_0x5129e1){if(_0x5129e1[_0x2aeb8d(0x103)]!==_0x2aeb8d(0xed))throw _0x5129e1;}const _0x198482=await a165_0x4f130b[_0x2aeb8d(0x12b)](a165_0x38a9f8[_0x2aeb8d(0x107)](_0x2bfd5e,_0x2aeb8d(0xee))),_0x1f1daf=a165_0x38a9f8[_0x2aeb8d(0x107)](_0x198482,_0x2aeb8d(0x113)),_0xe3302f=a165_0x38a9f8[_0x2aeb8d(0x107)](_0x198482,_0x2aeb8d(0xe1));try{try{_0x191789?.(_0x2aeb8d(0x133));const _0x49b05a=await fetchTemplateDescriptor();return _0x191789?.('downloading'),await downloadArchive(_0x49b05a,_0xe3302f,_0x191789),_0x191789?.(_0x2aeb8d(0x106)),await extractProjectTemplateArchive(_0xe3302f,_0x1f1daf),await assertTemplateRoot(_0x1f1daf),await commitStagedProject(_0x1f1daf,_0x5646e1),{'source':_0x2aeb8d(0xfc),'version':_0x49b05a[_0x2aeb8d(0x120)]};}catch(_0x210584){if(_0x210584[_0x2aeb8d(0x103)]===_0x2aeb8d(0xe3))throw CliErrors[_0x2aeb8d(0x10b)](_0x2aeb8d(0x12e)+_0x5646e1,_0x2aeb8d(0xe9));const _0x58f973=_0x210584 instanceof Error?_0x210584[_0x2aeb8d(0x11e)]:String(_0x210584);throw CliErrors['validation'](_0x2aeb8d(0x10e),_0x2aeb8d(0xf0)+_0x58f973);}}finally{await a165_0x4f130b['rm'](_0x198482,{'recursive':!![],'force':!![]});}}
1
+ const a165_0x5779b1=a165_0x4d0c;(function(_0x5c93ad,_0x52bc3a){const _0x20fda3=a165_0x4d0c,_0x4f92f3=_0x5c93ad();while(!![]){try{const _0x17c33a=parseInt(_0x20fda3(0xee))/0x1+-parseInt(_0x20fda3(0x10e))/0x2*(parseInt(_0x20fda3(0xd1))/0x3)+-parseInt(_0x20fda3(0xd3))/0x4*(-parseInt(_0x20fda3(0x109))/0x5)+parseInt(_0x20fda3(0x111))/0x6+-parseInt(_0x20fda3(0x103))/0x7+-parseInt(_0x20fda3(0xd2))/0x8*(-parseInt(_0x20fda3(0x121))/0x9)+-parseInt(_0x20fda3(0xec))/0xa*(parseInt(_0x20fda3(0xe4))/0xb);if(_0x17c33a===_0x52bc3a)break;else _0x4f92f3['push'](_0x4f92f3['shift']());}catch(_0x2c72f8){_0x4f92f3['push'](_0x4f92f3['shift']());}}}(a165_0x29b4,0x501d1));import{createHash}from'node:crypto';import a165_0x235bfa from'node:fs/promises';import a165_0x88be16 from'node:path';import{PROJECT_TEMPLATE_ASSET_BASE_URL}from'../../../constant/cdn.js';import{extractProjectTemplateArchive}from'../../../commands/project/create/project-template-archive.js';import{getRabetbaseCdnConfig}from'../../../utils/cli-version-policy.js';import{CliErrors}from'../../../errors.js';const TEMPLATE_ID=a165_0x5779b1(0xea),ARCHIVE_TIMEOUT_MS=0x3a98,MAX_ARCHIVE_SIZE=0x14*0x400*0x400;function nonEmptyString(_0x295cf7){const _0x240e1c=a165_0x5779b1;return typeof _0x295cf7==='string'&&_0x295cf7[_0x240e1c(0xd9)]()?_0x295cf7['trim']():null;}function parseDescriptor(_0x3d3966){const _0x58ca4b=a165_0x5779b1;if(!_0x3d3966||typeof _0x3d3966!==_0x58ca4b(0xe3))throw new Error(_0x58ca4b(0x102)+TEMPLATE_ID+'\x22.');const _0x5c1fea=_0x3d3966,_0x26f8d5=nonEmptyString(_0x5c1fea[_0x58ca4b(0xe6)]),_0xce85e9=nonEmptyString(_0x5c1fea[_0x58ca4b(0xdf)]),_0x556bdf=nonEmptyString(_0x5c1fea['sha256'])?.[_0x58ca4b(0xd7)](),_0x5cdc78=_0x5c1fea[_0x58ca4b(0x107)];if(!_0x26f8d5||!_0xce85e9||_0xce85e9!==a165_0x88be16[_0x58ca4b(0xfc)][_0x58ca4b(0x10a)](_0xce85e9)||_0xce85e9['includes']('\x5c')||!_0x556bdf||!/^sha256:[a-f0-9]{64}$/[_0x58ca4b(0xe8)](_0x556bdf)||typeof _0x5cdc78!==_0x58ca4b(0xe2)||!Number[_0x58ca4b(0x123)](_0x5cdc78)||_0x5cdc78<=0x0||_0x5cdc78>MAX_ARCHIVE_SIZE)throw new Error(_0x58ca4b(0x117)+TEMPLATE_ID+'\x22.');return{'version':_0x26f8d5,'name':_0xce85e9,'sha256':_0x556bdf,'size':_0x5cdc78};}async function fetchWithTimeout(_0x2f9eb0,_0x288c47,_0x4bc6ff,_0x176d2c){const _0x1dce2f=a165_0x5779b1,_0x5029e8=new AbortController(),_0x4fd0ce=setTimeout(()=>_0x5029e8[_0x1dce2f(0xe0)](),_0x288c47);try{const _0x4fffc0=await fetch(_0x2f9eb0,{'headers':{'Accept':_0x4bc6ff},'signal':_0x5029e8[_0x1dce2f(0xe9)]});return await _0x176d2c(_0x4fffc0);}finally{clearTimeout(_0x4fd0ce);}}async function fetchTemplateDescriptor(){const _0x47a797=a165_0x5779b1,_0x1d5243=await getRabetbaseCdnConfig();if(!_0x1d5243)throw new Error('Rabetbase\x20CDN\x20config\x20is\x20unavailable.');return parseDescriptor(_0x1d5243[_0x47a797(0xe1)]);}function resolveArchiveUrl(_0x4be618){const _0x14c2e3=a165_0x5779b1,_0x127075=new URL(PROJECT_TEMPLATE_ASSET_BASE_URL+'/'),_0x1957cf=new URL(_0x4be618,_0x127075);if(_0x1957cf[_0x14c2e3(0x10f)]!==_0x14c2e3(0xd6)||_0x1957cf[_0x14c2e3(0xd4)]!==_0x127075['origin']||!_0x1957cf[_0x14c2e3(0xd8)][_0x14c2e3(0xfe)](_0x127075[_0x14c2e3(0xd8)]))throw new Error(_0x14c2e3(0x106));return _0x1957cf[_0x14c2e3(0xff)];}async function readResponseBytes(_0x8227ef,_0x108782){const _0x44f47e=a165_0x5779b1;if(!_0x8227ef['body']){const _0x406407=Buffer[_0x44f47e(0xfb)](await _0x8227ef[_0x44f47e(0xf0)]());if(_0x406407[_0x44f47e(0xf8)]>_0x108782)throw new Error(_0x44f47e(0xf1));return _0x406407;}const _0x31e396=_0x8227ef[_0x44f47e(0xf6)]['getReader'](),_0x32f6ea=[];let _0x21c417=0x0;try{while(!![]){const {done:_0x4ca8fa,value:_0x3788be}=await _0x31e396[_0x44f47e(0x113)]();if(_0x4ca8fa)break;_0x21c417+=_0x3788be[_0x44f47e(0xf5)];if(_0x21c417>_0x108782){await _0x31e396[_0x44f47e(0xdc)]();throw new Error('CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.');}_0x32f6ea['push'](Buffer[_0x44f47e(0xfb)](_0x3788be));}}finally{_0x31e396[_0x44f47e(0x101)]();}return Buffer[_0x44f47e(0x108)](_0x32f6ea,_0x21c417);}async function downloadArchive(_0x421a17,_0x14ad21,_0x435195){const _0xb1013b=a165_0x5779b1,_0x229d4f=await fetchWithTimeout(resolveArchiveUrl(_0x421a17[_0xb1013b(0xdf)]),ARCHIVE_TIMEOUT_MS,_0xb1013b(0x122),async _0x128967=>{const _0x5b8e8c=_0xb1013b;if(!_0x128967['ok'])throw new Error('CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20'+_0x128967[_0x5b8e8c(0xe5)]+'.');const _0x5286f5=Number(_0x128967['headers'][_0x5b8e8c(0x10b)](_0x5b8e8c(0x110)));if(Number[_0x5b8e8c(0xf2)](_0x5286f5)&&_0x5286f5>MAX_ARCHIVE_SIZE)throw new Error(_0x5b8e8c(0xeb));return readResponseBytes(_0x128967,_0x421a17[_0x5b8e8c(0x107)]);});if(_0x229d4f['length']!==_0x421a17[_0xb1013b(0x107)])throw new Error(_0xb1013b(0x11e)+_0x421a17[_0xb1013b(0x107)]+_0xb1013b(0x11b)+_0x229d4f['length']+'.');_0x435195?.('verifying');const _0x2ae4f3=_0xb1013b(0xfd)+createHash(_0xb1013b(0x114))['update'](_0x229d4f)[_0xb1013b(0x112)](_0xb1013b(0x11f));if(_0x2ae4f3!==_0x421a17[_0xb1013b(0x114)])throw new Error(_0xb1013b(0xda));await a165_0x235bfa['writeFile'](_0x14ad21,_0x229d4f,{'flag':'wx'});}async function assertTemplateRoot(_0x48e8a2){const _0xbbab96=a165_0x5779b1,_0x760441=a165_0x88be16[_0xbbab96(0xf7)](_0x48e8a2,_0xbbab96(0x119)),_0x5e444d=JSON[_0xbbab96(0xed)](await a165_0x235bfa[_0xbbab96(0x10c)](_0x760441,_0xbbab96(0x118)));if(!_0x5e444d||typeof _0x5e444d!==_0xbbab96(0xe3))throw new Error('Project\x20template\x20package.json\x20is\x20invalid.');}async function readDirectoryIdentity(_0x290551){const _0x4c96f9=a165_0x5779b1;try{const _0x5eddc9=await a165_0x235bfa[_0x4c96f9(0x116)](_0x290551);if(!_0x5eddc9[_0x4c96f9(0x105)]())return null;return{'dev':_0x5eddc9[_0x4c96f9(0xf3)],'ino':_0x5eddc9['ino']};}catch{return null;}}async function commitStagedProject(_0x5e5960,_0x19ebb0){const _0x5a067e=a165_0x5779b1;await a165_0x235bfa[_0x5a067e(0x11c)](_0x19ebb0);const _0x5557ac=await readDirectoryIdentity(_0x19ebb0);if(!_0x5557ac)throw new Error('Unable\x20to\x20claim\x20the\x20project\x20directory.');try{for(const _0x24a73b of await a165_0x235bfa[_0x5a067e(0x10d)](_0x5e5960)){await a165_0x235bfa['rename'](a165_0x88be16[_0x5a067e(0xf7)](_0x5e5960,_0x24a73b),a165_0x88be16[_0x5a067e(0xf7)](_0x19ebb0,_0x24a73b));}}catch(_0x429713){const _0x375594=await readDirectoryIdentity(_0x19ebb0);_0x375594?.[_0x5a067e(0xf3)]===_0x5557ac[_0x5a067e(0xf3)]&&_0x375594[_0x5a067e(0xef)]===_0x5557ac[_0x5a067e(0xef)]&&await a165_0x235bfa['rm'](_0x19ebb0,{'recursive':!![],'force':!![]});throw _0x429713;}}export async function materializeProjectTemplate(_0x27bfab,_0x563ae9){const _0x220eac=a165_0x5779b1,_0x4d040b=a165_0x88be16['resolve'](_0x27bfab),_0x1dbf5a=a165_0x88be16[_0x220eac(0x104)](_0x4d040b);try{await a165_0x235bfa[_0x220eac(0x116)](_0x4d040b);throw new Error(_0x220eac(0xf9)+_0x4d040b);}catch(_0xba2801){if(_0xba2801[_0x220eac(0x100)]!==_0x220eac(0xdb))throw _0xba2801;}const _0x3fac60=await a165_0x235bfa[_0x220eac(0x120)](a165_0x88be16[_0x220eac(0xf7)](_0x1dbf5a,'.rabetbase-create-')),_0x36037e=a165_0x88be16[_0x220eac(0xf7)](_0x3fac60,_0x220eac(0x11d)),_0x4f4ba0=a165_0x88be16[_0x220eac(0xf7)](_0x3fac60,_0x220eac(0xfa));try{try{_0x563ae9?.(_0x220eac(0xf4));const _0x39f398=await fetchTemplateDescriptor();return _0x563ae9?.(_0x220eac(0xdd)),await downloadArchive(_0x39f398,_0x4f4ba0,_0x563ae9),_0x563ae9?.(_0x220eac(0xd5)),await extractProjectTemplateArchive(_0x4f4ba0,_0x36037e),await assertTemplateRoot(_0x36037e),await commitStagedProject(_0x36037e,_0x4d040b),{'source':'cdn','version':_0x39f398[_0x220eac(0xe6)]};}catch(_0x1c2776){if(_0x1c2776['code']===_0x220eac(0xde))throw CliErrors[_0x220eac(0x115)](_0x220eac(0xf9)+_0x4d040b,_0x220eac(0x11a));const _0x2cb767=_0x1c2776 instanceof Error?_0x1c2776[_0x220eac(0xe7)]:String(_0x1c2776);throw CliErrors['validation']('Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','Check\x20your\x20network\x20and\x20retry.\x20Details:\x20'+_0x2cb767);}}finally{await a165_0x235bfa['rm'](_0x3fac60,{'recursive':!![],'force':!![]});}}function a165_0x4d0c(_0x4e29f4,_0x5c078e){_0x4e29f4=_0x4e29f4-0xd1;const _0x29b4b3=a165_0x29b4();let _0x4d0c24=_0x29b4b3[_0x4e29f4];return _0x4d0c24;}function a165_0x29b4(){const _0x2ca91e=['from','posix','sha256:','startsWith','href','code','releaseLock','CDN\x20config\x20does\x20not\x20define\x20template\x20\x22','4450824BqlufZ','dirname','isDirectory','CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.','size','concat','165ubjljG','basename','get','readFile','readdir','2OINkXF','protocol','content-length','3073074KRlQSH','digest','read','sha256','validation','lstat','CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22','utf8','package.json','Use\x20a\x20different\x20project\x20name.',',\x20received\x20','mkdir','project','CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20','hex','mkdtemp','2736HtZZpw','application/zip','isSafeInteger','605427jfRzfr','12832BhLijU','21052JGeshu','origin','extracting','https:','toLowerCase','pathname','trim','CDN\x20project\x20template\x20checksum\x20verification\x20failed.','ENOENT','cancel','downloading','EEXIST','name','abort','projectTemplate','number','object','11sTLstM','status','version','message','test','signal','sub-app-react-demo','CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.','2465590bUcUXm','parse','238871XNaalM','ino','arrayBuffer','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','isFinite','dev','resolving','byteLength','body','join','length','Project\x20directory\x20already\x20exists:\x20','template.zip'];a165_0x29b4=function(){return _0x2ca91e;};return a165_0x29b4();}
@@ -1 +1 @@
1
- function a166_0x5c32(){const _0x28a87d=['test','1564026QGwMgQ','62750amKALA','4059729TMSDOX','length','3cRjdsV','5501470aDZKLc','\x20characters','19940LSUFbo','358972zNkeLM','trim','14bFyVzI','Project\x20name\x20cannot\x20be\x20empty','5XtJwQW','2236592ZSjvau','Project\x20name\x20cannot\x20exceed\x20','validation','Project\x20name\x20\x22'];a166_0x5c32=function(){return _0x28a87d;};return a166_0x5c32();}(function(_0x31cf53,_0x5384fd){const _0x27e90a=a166_0xe83b,_0x3b71bf=_0x31cf53();while(!![]){try{const _0x1b3297=parseInt(_0x27e90a(0xe4))/0x1*(parseInt(_0x27e90a(0xdf))/0x2)+-parseInt(_0x27e90a(0xdc))/0x3*(-parseInt(_0x27e90a(0xe0))/0x4)+parseInt(_0x27e90a(0xd9))/0x5+-parseInt(_0x27e90a(0xd8))/0x6+-parseInt(_0x27e90a(0xe2))/0x7*(parseInt(_0x27e90a(0xe5))/0x8)+parseInt(_0x27e90a(0xda))/0x9+parseInt(_0x27e90a(0xdd))/0xa;if(_0x1b3297===_0x5384fd)break;else _0x3b71bf['push'](_0x3b71bf['shift']());}catch(_0x32658b){_0x3b71bf['push'](_0x3b71bf['shift']());}}}(a166_0x5c32,0x516f0));function a166_0xe83b(_0x320f2e,_0x5570b1){_0x320f2e=_0x320f2e-0xd5;const _0x5c32b5=a166_0x5c32();let _0xe83bb3=_0x5c32b5[_0x320f2e];return _0xe83bb3;}import{CliErrors}from'../../../errors.js';const PROJECT_NAME_PATTERN=/^[A-Za-z0-9][A-Za-z0-9_-]*$/,WINDOWS_RESERVED_NAME=/^(con|prn|aux|nul|com[1-9]|lpt[1-9])$/i,MAX_PROJECT_NAME_LENGTH=0x64;export function getProjectNameValidationError(_0x16a55){const _0x669ace=a166_0xe83b,_0x5ceea4=_0x16a55[_0x669ace(0xe1)]();if(!_0x5ceea4)return _0x669ace(0xe3);if(_0x5ceea4[_0x669ace(0xdb)]>MAX_PROJECT_NAME_LENGTH)return _0x669ace(0xe6)+MAX_PROJECT_NAME_LENGTH+_0x669ace(0xde);if(!PROJECT_NAME_PATTERN[_0x669ace(0xd7)](_0x5ceea4))return'Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_';if(WINDOWS_RESERVED_NAME[_0x669ace(0xd7)](_0x5ceea4))return _0x669ace(0xd6)+_0x5ceea4+'\x22\x20is\x20reserved\x20on\x20Windows';return null;}export function validateProjectName(_0x390ba2){const _0x2e8a1a=a166_0xe83b,_0xfdfbbc=_0x390ba2[_0x2e8a1a(0xe1)](),_0x290140=getProjectNameValidationError(_0xfdfbbc);if(_0x290140)throw CliErrors[_0x2e8a1a(0xd5)](_0x290140,'Use\x20a\x20portable\x20directory\x20name\x20without\x20path\x20separators.');return _0xfdfbbc;}
1
+ (function(_0x5cf112,_0x5312eb){const _0x23ac2d=a166_0x1113,_0x5c1945=_0x5cf112();while(!![]){try{const _0x1f3871=-parseInt(_0x23ac2d(0x143))/0x1+parseInt(_0x23ac2d(0x13b))/0x2+parseInt(_0x23ac2d(0x136))/0x3+parseInt(_0x23ac2d(0x142))/0x4+parseInt(_0x23ac2d(0x146))/0x5+-parseInt(_0x23ac2d(0x13a))/0x6+parseInt(_0x23ac2d(0x139))/0x7*(parseInt(_0x23ac2d(0x13d))/0x8);if(_0x1f3871===_0x5312eb)break;else _0x5c1945['push'](_0x5c1945['shift']());}catch(_0x30a5c2){_0x5c1945['push'](_0x5c1945['shift']());}}}(a166_0x230d,0x9fc9a));import{CliErrors}from'../../../errors.js';const PROJECT_NAME_PATTERN=/^[A-Za-z0-9][A-Za-z0-9_-]*$/,WINDOWS_RESERVED_NAME=/^(con|prn|aux|nul|com[1-9]|lpt[1-9])$/i,MAX_PROJECT_NAME_LENGTH=0x64;export function getProjectNameValidationError(_0x3e79c6){const _0xd52310=a166_0x1113,_0xab514e=_0x3e79c6['trim']();if(!_0xab514e)return _0xd52310(0x13f);if(_0xab514e[_0xd52310(0x144)]>MAX_PROJECT_NAME_LENGTH)return _0xd52310(0x13c)+MAX_PROJECT_NAME_LENGTH+_0xd52310(0x13e);if(!PROJECT_NAME_PATTERN['test'](_0xab514e))return _0xd52310(0x141);if(WINDOWS_RESERVED_NAME['test'](_0xab514e))return _0xd52310(0x145)+_0xab514e+'\x22\x20is\x20reserved\x20on\x20Windows';return null;}function a166_0x230d(){const _0xa14fdd=['952RqaTMH','\x20characters','Project\x20name\x20cannot\x20be\x20empty','validation','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','1366384tjHrkn','1259878pkPBrB','length','Project\x20name\x20\x22','3546465eycUFi','771837ZAmHzs','trim','Use\x20a\x20portable\x20directory\x20name\x20without\x20path\x20separators.','31619bIvbSB','5759040ERWNzd','2057034NzvDMl','Project\x20name\x20cannot\x20exceed\x20'];a166_0x230d=function(){return _0xa14fdd;};return a166_0x230d();}function a166_0x1113(_0x33079a,_0x307364){_0x33079a=_0x33079a-0x136;const _0x230dc7=a166_0x230d();let _0x111353=_0x230dc7[_0x33079a];return _0x111353;}export function validateProjectName(_0x291519){const _0x3a9df1=a166_0x1113,_0x177c62=_0x291519[_0x3a9df1(0x137)](),_0x19996a=getProjectNameValidationError(_0x177c62);if(_0x19996a)throw CliErrors[_0x3a9df1(0x140)](_0x19996a,_0x3a9df1(0x138));return _0x177c62;}
@@ -1 +1 @@
1
- (function(_0x466dce,_0x20ac06){const _0x27c88c=a167_0x2b92,_0x1b57ee=_0x466dce();while(!![]){try{const _0x39e6ee=-parseInt(_0x27c88c(0xa9))/0x1+-parseInt(_0x27c88c(0xa5))/0x2+-parseInt(_0x27c88c(0xbd))/0x3*(-parseInt(_0x27c88c(0x9a))/0x4)+parseInt(_0x27c88c(0xa6))/0x5*(-parseInt(_0x27c88c(0x9c))/0x6)+parseInt(_0x27c88c(0xa8))/0x7+parseInt(_0x27c88c(0xa0))/0x8*(parseInt(_0x27c88c(0xc3))/0x9)+-parseInt(_0x27c88c(0xb1))/0xa;if(_0x39e6ee===_0x20ac06)break;else _0x1b57ee['push'](_0x1b57ee['shift']());}catch(_0x37615a){_0x1b57ee['push'](_0x1b57ee['shift']());}}}(a167_0x43a9,0xa831c));import{createWriteStream}from'node:fs';import a167_0x4944bb from'node:fs/promises';import a167_0x2b7e73 from'node:path';function a167_0x43a9(){const _0xc2b0ef=['1725676RTyVTU','10oSXuHg','readEntry','9309265UkjvXg','76514UxeHGG','ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20','open','endsWith','Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20','split','en-US','resolve','9301640JZNAXI','isEncrypted','replace','sep','catch','length','error','Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20','set','uncompressedSize','externalFileAttributes','has','529710ztSbUz','Case-conflicting\x20ZIP\x20entry\x20path:\x20','toLocaleLowerCase','Project\x20template\x20ZIP\x20exceeds\x20','fileName','close','8289657RDVsin','join','openReadStream','Unable\x20to\x20open\x20project\x20template\x20archive.','startsWith','Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20','test','entry','24aRYWYT','get','2255844ETeoky','Unable\x20to\x20read\x20ZIP\x20entry:\x20','slice','once','8rRmTfO','mkdir','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.','dirname','Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20'];a167_0x43a9=function(){return _0xc2b0ef;};return a167_0x43a9();}import{pipeline}from'node:stream/promises';function a167_0x2b92(_0x2e882f,_0x29d45e){_0x2e882f=_0x2e882f-0x98;const _0x43a9ad=a167_0x43a9();let _0x2b92c9=_0x43a9ad[_0x2e882f];return _0x2b92c9;}import a167_0x58e57b from'yauzl';const MAX_ENTRY_COUNT=0x7d0,MAX_UNCOMPRESSED_SIZE=0x32*0x400*0x400,WINDOWS_RESERVED_NAME=/^(con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\..*)?$/i,WINDOWS_INVALID_CHAR=/[<>:"|?*\x00-\x1f]/;function openZip(_0x5ebe36){return new Promise((_0x5703cd,_0x31babe)=>{const _0x3a3225=a167_0x2b92;a167_0x58e57b[_0x3a3225(0xab)](_0x5ebe36,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x385d07,_0x1ee31e)=>{const _0x49a790=_0x3a3225;if(_0x385d07||!_0x1ee31e){_0x31babe(_0x385d07||new Error(_0x49a790(0xc6)));return;}_0x5703cd(_0x1ee31e);});});}function openEntryStream(_0x20f107,_0x5cddce){return new Promise((_0x231e07,_0x5e6362)=>{const _0x3f59ba=a167_0x2b92;_0x20f107[_0x3f59ba(0xc5)](_0x5cddce,(_0x307840,_0x17e1fd)=>{const _0x1cf947=_0x3f59ba;if(_0x307840||!_0x17e1fd){_0x5e6362(_0x307840||new Error(_0x1cf947(0x9d)+_0x5cddce[_0x1cf947(0xc1)]));return;}_0x231e07(_0x17e1fd);});});}function validateEntryPath(_0x40fa73){const _0x214e32=a167_0x2b92,_0x305d41=_0x40fa73[_0x214e32(0xb3)](/\\/g,'/'),_0x271013=_0x305d41['endsWith']('/'),_0x3b3a01=_0x271013?_0x305d41['slice'](0x0,-0x1):_0x305d41;if(!_0x3b3a01||_0x305d41[_0x214e32(0xc7)]('/')||/^[A-Za-z]:\//[_0x214e32(0x98)](_0x305d41))throw new Error(_0x214e32(0xc8)+_0x40fa73);const _0x3dabf9=_0x3b3a01['split']('/');for(const _0x3c747b of _0x3dabf9){if(!_0x3c747b||_0x3c747b==='.'||_0x3c747b==='..'||_0x3c747b[_0x214e32(0xac)]('.')||_0x3c747b[_0x214e32(0xac)]('\x20')||WINDOWS_INVALID_CHAR[_0x214e32(0x98)](_0x3c747b)||WINDOWS_RESERVED_NAME[_0x214e32(0x98)](_0x3c747b))throw new Error(_0x214e32(0xad)+_0x40fa73);}return{'relativePath':_0x3dabf9['join'](a167_0x2b7e73[_0x214e32(0xb4)]),'directory':_0x271013};}function isSymbolicLink(_0x127600){const _0x2bea00=a167_0x2b92,_0x471ff0=_0x127600[_0x2bea00(0xbb)]>>>0x10&0xffff;return(_0x471ff0&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0x3cfcdd,_0x2976d0){const _0x5764e9=a167_0x2b92,_0x11f479=await openZip(_0x3cfcdd),_0x2decdd=a167_0x2b7e73[_0x5764e9(0xb0)](_0x2976d0),_0x4359c3=new Set(),_0x346d7c=new Map();let _0x1c9ab4=0x0,_0x50393b=0x0;await a167_0x4944bb[_0x5764e9(0xa1)](_0x2decdd,{'recursive':!![]}),await new Promise((_0x138b9d,_0x1d8938)=>{const _0x333d9f=_0x5764e9;let _0xe72c77=![];const _0x935c88=_0x428e0f=>{const _0x3d0330=a167_0x2b92;if(_0xe72c77)return;_0xe72c77=!![],_0x11f479[_0x3d0330(0xc2)](),_0x1d8938(_0x428e0f instanceof Error?_0x428e0f:new Error(String(_0x428e0f)));};_0x11f479[_0x333d9f(0x9f)](_0x333d9f(0xb7),_0x935c88),_0x11f479[_0x333d9f(0x9f)]('end',()=>{if(_0xe72c77)return;_0xe72c77=!![],_0x138b9d();}),_0x11f479['on'](_0x333d9f(0x99),_0x4c9680=>{const _0x4e4002=_0x333d9f;void(async()=>{const _0x558f21=a167_0x2b92;_0x1c9ab4+=0x1,_0x50393b+=_0x4c9680[_0x558f21(0xba)];if(_0x1c9ab4>MAX_ENTRY_COUNT)throw new Error(_0x558f21(0xc0)+MAX_ENTRY_COUNT+'\x20entries.');if(_0x50393b>MAX_UNCOMPRESSED_SIZE)throw new Error(_0x558f21(0xa2));if(_0x4c9680[_0x558f21(0xb2)]())throw new Error('Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20'+_0x4c9680[_0x558f21(0xc1)]);if(isSymbolicLink(_0x4c9680))throw new Error(_0x558f21(0xa4)+_0x4c9680[_0x558f21(0xc1)]);const {relativePath:_0x844e05,directory:_0x569519}=validateEntryPath(_0x4c9680['fileName']),_0x523f80=_0x844e05[_0x558f21(0xae)](a167_0x2b7e73[_0x558f21(0xb4)]);for(let _0xf43160=0x1;_0xf43160<=_0x523f80[_0x558f21(0xb6)];_0xf43160+=0x1){const _0x41559e=_0x523f80[_0x558f21(0x9e)](0x0,_0xf43160)[_0x558f21(0xc4)](a167_0x2b7e73[_0x558f21(0xb4)]),_0x34f878=_0x41559e[_0x558f21(0xbf)](_0x558f21(0xaf)),_0x35711f=_0x346d7c[_0x558f21(0x9b)](_0x34f878);if(_0x35711f&&_0x35711f!==_0x41559e)throw new Error(_0x558f21(0xbe)+_0x4c9680['fileName']);_0x346d7c[_0x558f21(0xb9)](_0x34f878,_0x41559e);}const _0x10f862=_0x844e05[_0x558f21(0xbf)](_0x558f21(0xaf));if(_0x4359c3[_0x558f21(0xbc)](_0x10f862))throw new Error(_0x558f21(0xb8)+_0x4c9680[_0x558f21(0xc1)]);_0x4359c3['add'](_0x10f862);const _0x322287=a167_0x2b7e73['resolve'](_0x2decdd,_0x844e05);if(_0x322287!==_0x2decdd&&!_0x322287[_0x558f21(0xc7)](''+_0x2decdd+a167_0x2b7e73['sep']))throw new Error(_0x558f21(0xaa)+_0x4c9680[_0x558f21(0xc1)]);if(_0x569519)await a167_0x4944bb[_0x558f21(0xa1)](_0x322287,{'recursive':!![]});else{await a167_0x4944bb[_0x558f21(0xa1)](a167_0x2b7e73[_0x558f21(0xa3)](_0x322287),{'recursive':!![]});const _0x70a20f=await openEntryStream(_0x11f479,_0x4c9680);await pipeline(_0x70a20f,createWriteStream(_0x322287,{'flags':'wx','mode':0x1a4}));}_0x11f479['readEntry']();})()[_0x4e4002(0xb5)](_0x935c88);}),_0x11f479[_0x333d9f(0xa7)]();});}
1
+ (function(_0x2796af,_0x36b79d){const _0x36d3d3=a167_0x44c5,_0x5bd68c=_0x2796af();while(!![]){try{const _0x3c4784=parseInt(_0x36d3d3(0x122))/0x1*(parseInt(_0x36d3d3(0x10d))/0x2)+parseInt(_0x36d3d3(0x101))/0x3+-parseInt(_0x36d3d3(0x10e))/0x4*(-parseInt(_0x36d3d3(0x11e))/0x5)+-parseInt(_0x36d3d3(0x116))/0x6+-parseInt(_0x36d3d3(0x127))/0x7+-parseInt(_0x36d3d3(0x111))/0x8*(-parseInt(_0x36d3d3(0x107))/0x9)+parseInt(_0x36d3d3(0x12c))/0xa*(parseInt(_0x36d3d3(0x123))/0xb);if(_0x3c4784===_0x36b79d)break;else _0x5bd68c['push'](_0x5bd68c['shift']());}catch(_0x366647){_0x5bd68c['push'](_0x5bd68c['shift']());}}}(a167_0x1c95,0x8dc9f));function a167_0x44c5(_0x26e83e,_0x49c6df){_0x26e83e=_0x26e83e-0xff;const _0x1c956e=a167_0x1c95();let _0x44c564=_0x1c956e[_0x26e83e];return _0x44c564;}import{createWriteStream}from'node:fs';import a167_0xbb42a8 from'node:fs/promises';import a167_0x5f3e95 from'node:path';import{pipeline}from'node:stream/promises';import a167_0x21fc1e from'yauzl';const MAX_ENTRY_COUNT=0x7d0,MAX_UNCOMPRESSED_SIZE=0x32*0x400*0x400,WINDOWS_RESERVED_NAME=/^(con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\..*)?$/i,WINDOWS_INVALID_CHAR=/[<>:"|?*\x00-\x1f]/;function openZip(_0x457c4d){return new Promise((_0x150d4e,_0x46d30d)=>{const _0x1075d5=a167_0x44c5;a167_0x21fc1e[_0x1075d5(0x108)](_0x457c4d,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x4c5175,_0x25e454)=>{const _0x4b2374=_0x1075d5;if(_0x4c5175||!_0x25e454){_0x46d30d(_0x4c5175||new Error(_0x4b2374(0x12d)));return;}_0x150d4e(_0x25e454);});});}function openEntryStream(_0x514e50,_0x2ef95c){return new Promise((_0x18c46d,_0x59824b)=>{const _0x15be00=a167_0x44c5;_0x514e50[_0x15be00(0x115)](_0x2ef95c,(_0x19e6f0,_0x37e392)=>{const _0x13c417=_0x15be00;if(_0x19e6f0||!_0x37e392){_0x59824b(_0x19e6f0||new Error('Unable\x20to\x20read\x20ZIP\x20entry:\x20'+_0x2ef95c[_0x13c417(0x11f)]));return;}_0x18c46d(_0x37e392);});});}function validateEntryPath(_0x2f9795){const _0x24e529=a167_0x44c5,_0x53cd85=_0x2f9795[_0x24e529(0x124)](/\\/g,'/'),_0x22feb4=_0x53cd85['endsWith']('/'),_0x1bd533=_0x22feb4?_0x53cd85['slice'](0x0,-0x1):_0x53cd85;if(!_0x1bd533||_0x53cd85[_0x24e529(0x10a)]('/')||/^[A-Za-z]:\//['test'](_0x53cd85))throw new Error(_0x24e529(0x113)+_0x2f9795);const _0x241a7d=_0x1bd533['split']('/');for(const _0x2a4817 of _0x241a7d){if(!_0x2a4817||_0x2a4817==='.'||_0x2a4817==='..'||_0x2a4817[_0x24e529(0x11d)]('.')||_0x2a4817[_0x24e529(0x11d)]('\x20')||WINDOWS_INVALID_CHAR[_0x24e529(0x118)](_0x2a4817)||WINDOWS_RESERVED_NAME[_0x24e529(0x118)](_0x2a4817))throw new Error(_0x24e529(0x125)+_0x2f9795);}return{'relativePath':_0x241a7d['join'](a167_0x5f3e95[_0x24e529(0x12b)]),'directory':_0x22feb4};}function isSymbolicLink(_0x3e25b1){const _0x48e1c5=a167_0x44c5,_0x54c412=_0x3e25b1[_0x48e1c5(0x121)]>>>0x10&0xffff;return(_0x54c412&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0x557651,_0x553644){const _0x559de4=await openZip(_0x557651),_0x3d02c0=a167_0x5f3e95['resolve'](_0x553644),_0x460fa3=new Set(),_0xfe7eb=new Map();let _0x23c2bb=0x0,_0x489a60=0x0;await a167_0xbb42a8['mkdir'](_0x3d02c0,{'recursive':!![]}),await new Promise((_0x320e0d,_0x35313)=>{const _0x2a3432=a167_0x44c5;let _0x1de5f1=![];const _0x104151=_0xea81b5=>{if(_0x1de5f1)return;_0x1de5f1=!![],_0x559de4['close'](),_0x35313(_0xea81b5 instanceof Error?_0xea81b5:new Error(String(_0xea81b5)));};_0x559de4['once'](_0x2a3432(0x10c),_0x104151),_0x559de4[_0x2a3432(0x100)](_0x2a3432(0x117),()=>{if(_0x1de5f1)return;_0x1de5f1=!![],_0x320e0d();}),_0x559de4['on'](_0x2a3432(0x104),_0x128915=>{const _0x43fa7a=_0x2a3432;void(async()=>{const _0x529b3f=a167_0x44c5;_0x23c2bb+=0x1,_0x489a60+=_0x128915[_0x529b3f(0x10f)];if(_0x23c2bb>MAX_ENTRY_COUNT)throw new Error(_0x529b3f(0x112)+MAX_ENTRY_COUNT+'\x20entries.');if(_0x489a60>MAX_UNCOMPRESSED_SIZE)throw new Error(_0x529b3f(0x103));if(_0x128915[_0x529b3f(0x114)]())throw new Error(_0x529b3f(0x129)+_0x128915[_0x529b3f(0x11f)]);if(isSymbolicLink(_0x128915))throw new Error(_0x529b3f(0x11a)+_0x128915['fileName']);const {relativePath:_0x12eed8,directory:_0x37c8b5}=validateEntryPath(_0x128915[_0x529b3f(0x11f)]),_0x10600a=_0x12eed8[_0x529b3f(0x11b)](a167_0x5f3e95[_0x529b3f(0x12b)]);for(let _0x3ebe7c=0x1;_0x3ebe7c<=_0x10600a['length'];_0x3ebe7c+=0x1){const _0x50dbe4=_0x10600a[_0x529b3f(0x105)](0x0,_0x3ebe7c)[_0x529b3f(0x120)](a167_0x5f3e95[_0x529b3f(0x12b)]),_0x29eee7=_0x50dbe4['toLocaleLowerCase']('en-US'),_0x1a0e2e=_0xfe7eb[_0x529b3f(0x102)](_0x29eee7);if(_0x1a0e2e&&_0x1a0e2e!==_0x50dbe4)throw new Error(_0x529b3f(0x12a)+_0x128915[_0x529b3f(0x11f)]);_0xfe7eb[_0x529b3f(0x106)](_0x29eee7,_0x50dbe4);}const _0x2ecf71=_0x12eed8[_0x529b3f(0x110)](_0x529b3f(0x128));if(_0x460fa3[_0x529b3f(0xff)](_0x2ecf71))throw new Error(_0x529b3f(0x119)+_0x128915[_0x529b3f(0x11f)]);_0x460fa3[_0x529b3f(0x12e)](_0x2ecf71);const _0xdc5aa1=a167_0x5f3e95[_0x529b3f(0x126)](_0x3d02c0,_0x12eed8);if(_0xdc5aa1!==_0x3d02c0&&!_0xdc5aa1[_0x529b3f(0x10a)](''+_0x3d02c0+a167_0x5f3e95[_0x529b3f(0x12b)]))throw new Error('ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20'+_0x128915['fileName']);if(_0x37c8b5)await a167_0xbb42a8[_0x529b3f(0x109)](_0xdc5aa1,{'recursive':!![]});else{await a167_0xbb42a8[_0x529b3f(0x109)](a167_0x5f3e95['dirname'](_0xdc5aa1),{'recursive':!![]});const _0x54b7a3=await openEntryStream(_0x559de4,_0x128915);await pipeline(_0x54b7a3,createWriteStream(_0xdc5aa1,{'flags':'wx','mode':0x1a4}));}_0x559de4[_0x529b3f(0x10b)]();})()[_0x43fa7a(0x11c)](_0x104151);}),_0x559de4['readEntry']();});}function a167_0x1c95(){const _0x3bf2c6=['startsWith','readEntry','error','52APvygj','16fmoEpe','uncompressedSize','toLocaleLowerCase','1059608WZycvM','Project\x20template\x20ZIP\x20exceeds\x20','Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20','isEncrypted','openReadStream','4974918UUmupv','end','test','Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20','Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20','split','catch','endsWith','343510gkyyXu','fileName','join','externalFileAttributes','251PsikZR','3657995tvCpze','replace','Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20','resolve','5779725iPBZtg','en-US','Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20','Case-conflicting\x20ZIP\x20entry\x20path:\x20','sep','20ojGbGa','Unable\x20to\x20open\x20project\x20template\x20archive.','add','has','once','3470160pxfZLC','get','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.','entry','slice','set','9EjVDoK','open','mkdir'];a167_0x1c95=function(){return _0x3bf2c6;};return a167_0x1c95();}
@@ -1 +1 @@
1
- function a168_0x1229(_0x2aa12f,_0x30198f){_0x2aa12f=_0x2aa12f-0x1db;const _0x197b54=a168_0x197b();let _0x122907=_0x197b54[_0x2aa12f];return _0x122907;}function a168_0x197b(){const _0x6ace5e=['9710960xblBqx','934YmLTzm','95EhekQZ','../../../../','9840736vCyOes','7872085qWXCvX','resolve','5401221qZgWqo','240240xYzFJV','4920192Nbhket'];a168_0x197b=function(){return _0x6ace5e;};return a168_0x197b();}(function(_0x3d2c3b,_0x570647){const _0x31f8a4=a168_0x1229,_0x1ab598=_0x3d2c3b();while(!![]){try{const _0x39afd9=-parseInt(_0x31f8a4(0x1e2))/0x1*(-parseInt(_0x31f8a4(0x1e1))/0x2)+-parseInt(_0x31f8a4(0x1dd))/0x3+parseInt(_0x31f8a4(0x1df))/0x4+parseInt(_0x31f8a4(0x1db))/0x5+parseInt(_0x31f8a4(0x1de))/0x6+-parseInt(_0x31f8a4(0x1e0))/0x7+parseInt(_0x31f8a4(0x1e4))/0x8;if(_0x39afd9===_0x570647)break;else _0x1ab598['push'](_0x1ab598['shift']());}catch(_0x5e81d8){_0x1ab598['push'](_0x1ab598['shift']());}}}(a168_0x197b,0xe35cb));import a168_0x35f38a from'node:path';import{fileURLToPath}from'node:url';const __dirname=a168_0x35f38a['dirname'](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x576fb7=a168_0x1229;return a168_0x35f38a[_0x576fb7(0x1dc)](__dirname,_0x576fb7(0x1e3));}
1
+ const a168_0x39b69f=a168_0x32a3;(function(_0x41644d,_0x1cb405){const _0x4db3a2=a168_0x32a3,_0x5eecc0=_0x41644d();while(!![]){try{const _0x419250=parseInt(_0x4db3a2(0xee))/0x1*(-parseInt(_0x4db3a2(0xf2))/0x2)+-parseInt(_0x4db3a2(0xeb))/0x3*(-parseInt(_0x4db3a2(0xe8))/0x4)+-parseInt(_0x4db3a2(0xec))/0x5*(-parseInt(_0x4db3a2(0xef))/0x6)+-parseInt(_0x4db3a2(0xed))/0x7+-parseInt(_0x4db3a2(0xf3))/0x8+parseInt(_0x4db3a2(0xe9))/0x9*(parseInt(_0x4db3a2(0xf1))/0xa)+-parseInt(_0x4db3a2(0xf0))/0xb*(-parseInt(_0x4db3a2(0xe7))/0xc);if(_0x419250===_0x1cb405)break;else _0x5eecc0['push'](_0x5eecc0['shift']());}catch(_0x3200f6){_0x5eecc0['push'](_0x5eecc0['shift']());}}}(a168_0x51c2,0x53929));import a168_0x5d5877 from'node:path';import{fileURLToPath}from'node:url';function a168_0x51c2(){const _0x4a0803=['11050peHtaw','1219496BfpUHe','3498048fUepLe','../../../../','dirname','3718812yovXVz','433516VFbWnD','2043bgDWnw','resolve','15cEjqHr','2290EdUOJX','1625596dNhLvp','1dqGMbJ','6798kqNEcc','11JQkyPF'];a168_0x51c2=function(){return _0x4a0803;};return a168_0x51c2();}function a168_0x32a3(_0x55e3b2,_0x2837f1){_0x55e3b2=_0x55e3b2-0xe6;const _0x51c27c=a168_0x51c2();let _0x32a3b0=_0x51c27c[_0x55e3b2];return _0x32a3b0;}const __dirname=a168_0x5d5877[a168_0x39b69f(0xe6)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x5eb55a=a168_0x39b69f;return a168_0x5d5877[_0x5eb55a(0xea)](__dirname,_0x5eb55a(0xf4));}
@@ -1 +1 @@
1
- (function(_0x502d66,_0x3a93c2){const _0x452c5a=a169_0x12c1,_0x4dfc69=_0x502d66();while(!![]){try{const _0x474da5=parseInt(_0x452c5a(0x204))/0x1+-parseInt(_0x452c5a(0x1fb))/0x2+-parseInt(_0x452c5a(0x1fd))/0x3+-parseInt(_0x452c5a(0x200))/0x4+parseInt(_0x452c5a(0x203))/0x5*(parseInt(_0x452c5a(0x202))/0x6)+-parseInt(_0x452c5a(0x201))/0x7+parseInt(_0x452c5a(0x1f8))/0x8*(parseInt(_0x452c5a(0x1fe))/0x9);if(_0x474da5===_0x3a93c2)break;else _0x4dfc69['push'](_0x4dfc69['shift']());}catch(_0x1b1a9b){_0x4dfc69['push'](_0x4dfc69['shift']());}}}(a169_0x522f,0x67a2a));function a169_0x522f(){const _0x220a3=['519939awoPnJ','6pnzJHm','1710665bNsYPZ','364332RDXPkZ','cwd','source','copy','项目模板创建完成','info','success','16QBWwbv','项目模板复制失败','resolve','1367304kDYDuk','now','288426LSJhvk','5010642DVRDtL','error','2165520FGWeSd'];a169_0x522f=function(){return _0x220a3;};return a169_0x522f();}import a169_0x3c587 from'node:path';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a169_0x12c1(_0x3fdfe0,_0x43e49a){_0x3fdfe0=_0x3fdfe0-0x1f4;const _0x522f1f=a169_0x522f();let _0x12c1dd=_0x522f1f[_0x3fdfe0];return _0x12c1dd;}import{logger}from'../../../utils/logger.js';import{materializeProjectTemplate}from'../../../commands/project/create/materialize-project-template.js';export async function copyProjectTemplate(_0x3de067,_0x235755){const _0x53c3f6=a169_0x12c1,_0x572293=Date[_0x53c3f6(0x1fc)](),_0x51fd9a=a169_0x3c587[_0x53c3f6(0x1fa)](process[_0x53c3f6(0x205)](),_0x3de067);try{logger[_0x53c3f6(0x1f6)](_0x53c3f6(0x1f4),'开始创建项目模板',{'projectCode':_0x3de067});const _0x34f98e=await materializeProjectTemplate(_0x51fd9a,_0x235755),_0x1fa97f=Date[_0x53c3f6(0x1fc)]()-_0x572293;logger[_0x53c3f6(0x1f7)](_0x53c3f6(0x1f4),_0x53c3f6(0x1f5),_0x1fa97f,{'projectCode':_0x3de067,'templateSource':_0x34f98e[_0x53c3f6(0x206)],'templateVersion':_0x34f98e['version']});}catch(_0x281f6c){const _0x1928e1=Date['now']()-_0x572293;logger[_0x53c3f6(0x1ff)](_0x53c3f6(0x1f4),_0x53c3f6(0x1f9),{'projectCode':_0x3de067,'error':_0x281f6c instanceof Error?_0x281f6c['message']:String(_0x281f6c),'duration':_0x1928e1});throw _0x281f6c;}return formatElapsed(_0x572293);}
1
+ (function(_0x7bdf7f,_0x5008ba){const _0x5ae9f8=a169_0x1f53,_0x5536d6=_0x7bdf7f();while(!![]){try{const _0x4f6a13=-parseInt(_0x5ae9f8(0xc4))/0x1+-parseInt(_0x5ae9f8(0xd2))/0x2*(-parseInt(_0x5ae9f8(0xcb))/0x3)+-parseInt(_0x5ae9f8(0xc5))/0x4+parseInt(_0x5ae9f8(0xc7))/0x5*(parseInt(_0x5ae9f8(0xc3))/0x6)+parseInt(_0x5ae9f8(0xcd))/0x7*(parseInt(_0x5ae9f8(0xc9))/0x8)+-parseInt(_0x5ae9f8(0xc0))/0x9*(-parseInt(_0x5ae9f8(0xd4))/0xa)+parseInt(_0x5ae9f8(0xd3))/0xb*(parseInt(_0x5ae9f8(0xd1))/0xc);if(_0x4f6a13===_0x5008ba)break;else _0x5536d6['push'](_0x5536d6['shift']());}catch(_0x117708){_0x5536d6['push'](_0x5536d6['shift']());}}}(a169_0x1948,0x523b6));import a169_0x533474 from'node:path';function a169_0x1f53(_0x16620e,_0x357619){_0x16620e=_0x16620e-0xbf;const _0x1948db=a169_0x1948();let _0x1f5385=_0x1948db[_0x16620e];return _0x1f5385;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a169_0x1948(){const _0xd67323=['36aMADgn','2QhbWqO','550814fgnbEB','12170AkIRpc','version','3357ahqSQP','开始创建项目模板','success','2436AwaKZR','666370UYMUix','2096780SedWzT','now','1935XVrZSU','resolve','51592EVXqog','source','885975PxAMrU','项目模板创建完成','511eadeog','message','copy','info'];a169_0x1948=function(){return _0xd67323;};return a169_0x1948();}import{logger}from'../../../utils/logger.js';import{materializeProjectTemplate}from'../../../commands/project/create/materialize-project-template.js';export async function copyProjectTemplate(_0x15ecc6,_0x1c5939){const _0x378409=a169_0x1f53,_0x284a2f=Date['now'](),_0x1e4d25=a169_0x533474[_0x378409(0xc8)](process['cwd'](),_0x15ecc6);try{logger[_0x378409(0xd0)](_0x378409(0xcf),_0x378409(0xc1),{'projectCode':_0x15ecc6});const _0x1ae00c=await materializeProjectTemplate(_0x1e4d25,_0x1c5939),_0x2fdfb9=Date[_0x378409(0xc6)]()-_0x284a2f;logger[_0x378409(0xc2)](_0x378409(0xcf),_0x378409(0xcc),_0x2fdfb9,{'projectCode':_0x15ecc6,'templateSource':_0x1ae00c[_0x378409(0xca)],'templateVersion':_0x1ae00c[_0x378409(0xbf)]});}catch(_0x41ce9e){const _0x1882b5=Date[_0x378409(0xc6)]()-_0x284a2f;logger['error']('copy','项目模板复制失败',{'projectCode':_0x15ecc6,'error':_0x41ce9e instanceof Error?_0x41ce9e[_0x378409(0xce)]:String(_0x41ce9e),'duration':_0x1882b5});throw _0x41ce9e;}return formatElapsed(_0x284a2f);}
@@ -1 +1 @@
1
- (function(_0x8535ad,_0x2965f1){const _0x6d8937=a170_0x1e99,_0x5b548a=_0x8535ad();while(!![]){try{const _0x4e03de=-parseInt(_0x6d8937(0x1f1))/0x1+-parseInt(_0x6d8937(0x201))/0x2*(-parseInt(_0x6d8937(0x1f0))/0x3)+parseInt(_0x6d8937(0x1f2))/0x4+-parseInt(_0x6d8937(0x200))/0x5*(-parseInt(_0x6d8937(0x1fa))/0x6)+-parseInt(_0x6d8937(0x1ee))/0x7*(-parseInt(_0x6d8937(0x202))/0x8)+parseInt(_0x6d8937(0x1ef))/0x9+-parseInt(_0x6d8937(0x203))/0xa*(parseInt(_0x6d8937(0x1ff))/0xb);if(_0x4e03de===_0x2965f1)break;else _0x5b548a['push'](_0x5b548a['shift']());}catch(_0x260fbc){_0x5b548a['push'](_0x5b548a['shift']());}}}(a170_0x1512,0x9920b));function a170_0x1e99(_0x2f06f9,_0x580e8c){_0x2f06f9=_0x2f06f9-0x1ee;const _0x151228=a170_0x1512();let _0x1e9925=_0x151228[_0x2f06f9];return _0x1e9925;}import a170_0x16fa1c from'node:path';function a170_0x1512(){const _0x5476d9=['format','success','prettier','npx','cwd','error','now','6948798SRqQiV','代码格式化完成','代码格式化失败','resolve','--write','1263834zUMIVK','5igIuMX','54XNfBGd','1046552Dpearn','170lQgAiD','21sFDlOo','3798369FgfHNn','24522npxNnp','142171CfnpWK','2117004KdoTAJ'];a170_0x1512=function(){return _0x5476d9;};return a170_0x1512();}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x46bd21){const _0x260a98=a170_0x1e99,_0x61ab93=Date['now'](),_0x4e7d8e=a170_0x16fa1c[_0x260a98(0x1fd)](process[_0x260a98(0x1f7)](),_0x46bd21);try{logger['info'](_0x260a98(0x1f3),'开始格式化代码',{'projectCode':_0x46bd21}),await execa(resolveNpmBin(_0x260a98(0x1f6)),[_0x260a98(0x1f5),_0x260a98(0x1fe),'.'],{'cwd':_0x4e7d8e});const _0x40d64e=Date[_0x260a98(0x1f9)]()-_0x61ab93;logger[_0x260a98(0x1f4)](_0x260a98(0x1f3),_0x260a98(0x1fb),_0x40d64e,{'projectCode':_0x46bd21});}catch(_0x10d984){const _0x123d1e=Date[_0x260a98(0x1f9)]()-_0x61ab93;logger[_0x260a98(0x1f8)](_0x260a98(0x1f3),_0x260a98(0x1fc),{'projectCode':_0x46bd21,'error':_0x10d984 instanceof Error?_0x10d984['message']:String(_0x10d984),'duration':_0x123d1e});throw _0x10d984;}return formatElapsed(_0x61ab93);}
1
+ (function(_0x1b69bd,_0x313e01){const _0x3c0cd9=a170_0x9421,_0x501896=_0x1b69bd();while(!![]){try{const _0x149a40=-parseInt(_0x3c0cd9(0x7c))/0x1*(parseInt(_0x3c0cd9(0x81))/0x2)+parseInt(_0x3c0cd9(0x86))/0x3+parseInt(_0x3c0cd9(0x78))/0x4+-parseInt(_0x3c0cd9(0x7a))/0x5+-parseInt(_0x3c0cd9(0x75))/0x6*(-parseInt(_0x3c0cd9(0x7e))/0x7)+-parseInt(_0x3c0cd9(0x74))/0x8+parseInt(_0x3c0cd9(0x77))/0x9*(parseInt(_0x3c0cd9(0x79))/0xa);if(_0x149a40===_0x313e01)break;else _0x501896['push'](_0x501896['shift']());}catch(_0x5c36a9){_0x501896['push'](_0x501896['shift']());}}}(a170_0x4f77,0x2b511));function a170_0x4f77(){const _0xe8b338=['prettier','113fyHOsJ','--write','2065812BrEJZI','error','resolve','2518gvTgya','info','代码格式化完成','format','开始格式化代码','744636YhHhms','success','cwd','message','1782320MVDumQ','6bbhqIi','now','9TgiDtt','42112eldwTQ','3323450JqUVCp','1718595TzYMsa'];a170_0x4f77=function(){return _0xe8b338;};return a170_0x4f77();}import a170_0xdf7da1 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';function a170_0x9421(_0x4adafe,_0x5c60e8){_0x4adafe=_0x4adafe-0x74;const _0x4f77d0=a170_0x4f77();let _0x9421e7=_0x4f77d0[_0x4adafe];return _0x9421e7;}export async function formatProjectCode(_0x252c7c){const _0x4941ea=a170_0x9421,_0x725d7a=Date[_0x4941ea(0x76)](),_0x579c4c=a170_0xdf7da1[_0x4941ea(0x80)](process[_0x4941ea(0x88)](),_0x252c7c);try{logger[_0x4941ea(0x82)](_0x4941ea(0x84),_0x4941ea(0x85),{'projectCode':_0x252c7c}),await execa(resolveNpmBin('npx'),[_0x4941ea(0x7b),_0x4941ea(0x7d),'.'],{'cwd':_0x579c4c});const _0x179cc4=Date[_0x4941ea(0x76)]()-_0x725d7a;logger[_0x4941ea(0x87)](_0x4941ea(0x84),_0x4941ea(0x83),_0x179cc4,{'projectCode':_0x252c7c});}catch(_0x2fcc11){const _0xc37d35=Date[_0x4941ea(0x76)]()-_0x725d7a;logger[_0x4941ea(0x7f)](_0x4941ea(0x84),'代码格式化失败',{'projectCode':_0x252c7c,'error':_0x2fcc11 instanceof Error?_0x2fcc11[_0x4941ea(0x89)]:String(_0x2fcc11),'duration':_0xc37d35});throw _0x2fcc11;}return formatElapsed(_0x725d7a);}
@@ -1 +1 @@
1
- (function(_0x47e94a,_0x44a52d){const _0x44dedd=a171_0x2e57,_0x2f2fe4=_0x47e94a();while(!![]){try{const _0x450b3f=parseInt(_0x44dedd(0x1b4))/0x1*(-parseInt(_0x44dedd(0x1c5))/0x2)+parseInt(_0x44dedd(0x1cb))/0x3*(parseInt(_0x44dedd(0x1b9))/0x4)+-parseInt(_0x44dedd(0x1c4))/0x5+-parseInt(_0x44dedd(0x1be))/0x6+parseInt(_0x44dedd(0x1ca))/0x7*(-parseInt(_0x44dedd(0x1bd))/0x8)+parseInt(_0x44dedd(0x1bb))/0x9*(-parseInt(_0x44dedd(0x1c6))/0xa)+parseInt(_0x44dedd(0x1c7))/0xb*(parseInt(_0x44dedd(0x1b5))/0xc);if(_0x450b3f===_0x44a52d)break;else _0x2f2fe4['push'](_0x2f2fe4['shift']());}catch(_0x4aa4b6){_0x2f2fe4['push'](_0x2f2fe4['shift']());}}}(a171_0x403c,0xe674e));import a171_0x56eab6 from'node:path';function a171_0x403c(){const _0x40efa8=['success','368MBaZsB','1712562RvjPov','--registry','https://registry.npmmirror.com','now','message','npm','473045uyVJjU','249170GbHZVW','10AmaURO','51067346gXNvgw','依赖安装失败','error','251573OmLKIs','556269PEHimf','13UNibvL','12ydUNfV','开始安装依赖','info','install','28nSozbW','resolve','12092958juYezg'];a171_0x403c=function(){return _0x40efa8;};return a171_0x403c();}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a171_0x2e57(_0x7108a0,_0x3a21de){_0x7108a0=_0x7108a0-0x1b4;const _0x403c6e=a171_0x403c();let _0x2e578b=_0x403c6e[_0x7108a0];return _0x2e578b;}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x5a5143){const _0x217a08=a171_0x2e57,_0x3fe80e=Date[_0x217a08(0x1c1)](),_0xdda8ff=a171_0x56eab6[_0x217a08(0x1ba)](process['cwd'](),_0x5a5143);try{logger[_0x217a08(0x1b7)]('install',_0x217a08(0x1b6),{'projectCode':_0x5a5143,'registry':_0x217a08(0x1c0)}),await execa(resolveNpmBin(_0x217a08(0x1c3)),[_0x217a08(0x1b8),_0x217a08(0x1bf),_0x217a08(0x1c0)],{'cwd':_0xdda8ff});const _0x2dd47e=Date['now']()-_0x3fe80e;logger[_0x217a08(0x1bc)](_0x217a08(0x1b8),'依赖安装完成',_0x2dd47e,{'projectCode':_0x5a5143});}catch(_0x133e6f){const _0x14e7f6=Date[_0x217a08(0x1c1)]()-_0x3fe80e;logger[_0x217a08(0x1c9)]('install',_0x217a08(0x1c8),{'projectCode':_0x5a5143,'error':_0x133e6f instanceof Error?_0x133e6f[_0x217a08(0x1c2)]:String(_0x133e6f),'duration':_0x14e7f6});throw _0x133e6f;}return formatElapsed(_0x3fe80e);}
1
+ (function(_0x1c599a,_0x35813e){const _0x59f024=a171_0x479c,_0x55e30b=_0x1c599a();while(!![]){try{const _0x1c28a6=parseInt(_0x59f024(0x1c5))/0x1+parseInt(_0x59f024(0x1d2))/0x2+-parseInt(_0x59f024(0x1c8))/0x3+-parseInt(_0x59f024(0x1c3))/0x4*(-parseInt(_0x59f024(0x1cd))/0x5)+-parseInt(_0x59f024(0x1d1))/0x6*(parseInt(_0x59f024(0x1cf))/0x7)+-parseInt(_0x59f024(0x1cc))/0x8+parseInt(_0x59f024(0x1c0))/0x9;if(_0x1c28a6===_0x35813e)break;else _0x55e30b['push'](_0x55e30b['shift']());}catch(_0x55861e){_0x55e30b['push'](_0x55e30b['shift']());}}}(a171_0x2af4,0x968df));import a171_0x2192f7 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a171_0x479c(_0x21adfe,_0x28a23f){_0x21adfe=_0x21adfe-0x1c0;const _0x2af4ee=a171_0x2af4();let _0x479c9e=_0x2af4ee[_0x21adfe];return _0x479c9e;}function a171_0x2af4(){const _0x3927a6=['https://registry.npmmirror.com','8087552mvAwPt','5wveRjt','依赖安装失败','5369EwVnXm','error','1434pSqHLg','1429612zebDMR','info','5448285NVMqYb','npm','依赖安装完成','1899376XRzTqL','--registry','927956VIUFcC','install','message','2736129YwBkCJ','now','开始安装依赖'];a171_0x2af4=function(){return _0x3927a6;};return a171_0x2af4();}import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x992965){const _0x1d214a=a171_0x479c,_0x26a216=Date[_0x1d214a(0x1c9)](),_0x763cb0=a171_0x2192f7['resolve'](process['cwd'](),_0x992965);try{logger[_0x1d214a(0x1d3)](_0x1d214a(0x1c6),_0x1d214a(0x1ca),{'projectCode':_0x992965,'registry':_0x1d214a(0x1cb)}),await execa(resolveNpmBin(_0x1d214a(0x1c1)),[_0x1d214a(0x1c6),_0x1d214a(0x1c4),_0x1d214a(0x1cb)],{'cwd':_0x763cb0});const _0x14d4c0=Date[_0x1d214a(0x1c9)]()-_0x26a216;logger['success'](_0x1d214a(0x1c6),_0x1d214a(0x1c2),_0x14d4c0,{'projectCode':_0x992965});}catch(_0x714df7){const _0x54303c=Date['now']()-_0x26a216;logger[_0x1d214a(0x1d0)](_0x1d214a(0x1c6),_0x1d214a(0x1ce),{'projectCode':_0x992965,'error':_0x714df7 instanceof Error?_0x714df7[_0x1d214a(0x1c7)]:String(_0x714df7),'duration':_0x54303c});throw _0x714df7;}return formatElapsed(_0x26a216);}
@@ -1 +1 @@
1
- function a172_0x15fe(){const _0x507b2d=['202038XPBqfv','bool','14ZFEKvH','8UZNzBk','1996352CVRqfR','env','3564MSwFRp','validation','Usage:\x20','yes','appcode','name','str','Skip\x20confirmation\x20prompt','cookie','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','write','1912365QvOJCl','33276200FqyKjK','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','Project\x20name','args','boolean','project','nonInteractive','2088eZRLbf','upgrade','trim','3066258JNnOnR','3451400bhsYFP','project-name'];a172_0x15fe=function(){return _0x507b2d;};return a172_0x15fe();}const a172_0x53d4e1=a172_0x1b1e;(function(_0x143405,_0x45d392){const _0x2a2623=a172_0x1b1e,_0x27f600=_0x143405();while(!![]){try{const _0x2d5f6c=parseInt(_0x2a2623(0x1fa))/0x1*(-parseInt(_0x2a2623(0x1f7))/0x2)+parseInt(_0x2a2623(0x1fd))/0x3*(-parseInt(_0x2a2623(0x1f1))/0x4)+-parseInt(_0x2a2623(0x1f5))/0x5+-parseInt(_0x2a2623(0x1f4))/0x6+parseInt(_0x2a2623(0x1f9))/0x7*(-parseInt(_0x2a2623(0x1fb))/0x8)+parseInt(_0x2a2623(0x20a))/0x9+parseInt(_0x2a2623(0x20b))/0xa;if(_0x2d5f6c===_0x45d392)break;else _0x27f600['push'](_0x27f600['shift']());}catch(_0x561cbb){_0x27f600['push'](_0x27f600['shift']());}}}(a172_0x15fe,0x6470e));import{CliErrors}from'../../errors.js';function a172_0x1b1e(_0x21a459,_0xa6a5c0){_0x21a459=_0x21a459-0x1ee;const _0x15fe44=a172_0x15fe();let _0x1b1ed7=_0x15fe44[_0x21a459];return _0x1b1ed7;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';const createFlags=[{'name':a172_0x53d4e1(0x202),'type':'string','description':a172_0x53d4e1(0x20d)},{'name':a172_0x53d4e1(0x1fc),'type':'string','description':'Target\x20environment'},{'name':a172_0x53d4e1(0x201),'type':'string','description':a172_0x53d4e1(0x206)}],upgradeFlags=[{'name':a172_0x53d4e1(0x200),'type':a172_0x53d4e1(0x1ee),'description':a172_0x53d4e1(0x204),'default':![]}];export const projectDefinitions=[{'service':a172_0x53d4e1(0x1ef),'command':'create','description':'Create\x20a\x20new\x20project','risk':a172_0x53d4e1(0x209),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a172_0x53d4e1(0x1f6),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x5587c7){const _0x58e78c=a172_0x53d4e1,{createApp:_0x34b694}=await import('../../commands/project/create/main.js'),_0xb25428=_0x5587c7[_0x58e78c(0x203)](_0x58e78c(0x202))[_0x58e78c(0x1f3)]()||_0x5587c7[_0x58e78c(0x20e)][0x0]?.[_0x58e78c(0x1f3)](),_0xa93e3d=_0x5587c7[_0x58e78c(0x203)](_0x58e78c(0x1fc))||undefined,_0x24c8c2=_0x5587c7[_0x58e78c(0x203)]('appcode')||undefined;if(_0x5587c7[_0x58e78c(0x1f0)]){if(!_0xb25428)throw CliErrors[_0x58e78c(0x1fe)](_0x58e78c(0x207),_0x58e78c(0x1ff)+CLI_BIN_NAME+_0x58e78c(0x208));await _0x34b694({'projectCode':_0xb25428,'appCode':_0x24c8c2,'env':_0xa93e3d,'cookie':_0x5587c7['cookie'],'nonInteractive':!![]});}else await _0x34b694({'projectCode':_0xb25428,'appCode':_0x24c8c2,'env':_0xa93e3d,'cookie':_0x5587c7[_0x58e78c(0x205)]});return{'ok':!![]};}},{'service':'project','command':a172_0x53d4e1(0x1f2),'description':a172_0x53d4e1(0x20c),'risk':a172_0x53d4e1(0x209),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0xfdc464){const _0x3d25b8=a172_0x53d4e1;return await upgradeApp(_0xfdc464[_0x3d25b8(0x1f0)],{'yes':_0xfdc464[_0x3d25b8(0x1f8)]('yes')}),{'ok':!![]};}}];
1
+ function a172_0x30b0(_0x16efdb,_0x356e12){_0x16efdb=_0x16efdb-0x9f;const _0x5d4f7d=a172_0x5d4f();let _0x30b0a2=_0x5d4f7d[_0x16efdb];return _0x30b0a2;}const a172_0x35be12=a172_0x30b0;(function(_0x56fba3,_0x208036){const _0x49c2a7=a172_0x30b0,_0x12f843=_0x56fba3();while(!![]){try{const _0x33e536=-parseInt(_0x49c2a7(0xa7))/0x1+-parseInt(_0x49c2a7(0x9f))/0x2+parseInt(_0x49c2a7(0xba))/0x3*(parseInt(_0x49c2a7(0xaf))/0x4)+parseInt(_0x49c2a7(0xc3))/0x5*(-parseInt(_0x49c2a7(0xad))/0x6)+-parseInt(_0x49c2a7(0xbb))/0x7+-parseInt(_0x49c2a7(0xb7))/0x8*(parseInt(_0x49c2a7(0xb9))/0x9)+parseInt(_0x49c2a7(0xc1))/0xa;if(_0x33e536===_0x208036)break;else _0x12f843['push'](_0x12f843['shift']());}catch(_0x4cca04){_0x12f843['push'](_0x12f843['shift']());}}}(a172_0x5d4f,0xcb067));import{CliErrors}from'../../errors.js';function a172_0x5d4f(){const _0xe0c0a7=['Usage:\x20','args','Skip\x20confirmation\x20prompt','yes','nonInteractive','1635009xpBzrr','env','str','trim','upgrade','appcode','680052yizWoU','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','172aMyYlT','write','project-name','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','bool','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','boolean','project','136aJMcdR','create','863082dWWDqm','98367eDkHcW','7905072QNvqnM','cookie','Create\x20a\x20new\x20project','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','Project\x20name','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','47537820QGxZfT','string','35CXSDtE','288306nlKWxO','validation','name'];a172_0x5d4f=function(){return _0xe0c0a7;};return a172_0x5d4f();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';const createFlags=[{'name':'name','type':'string','description':a172_0x35be12(0xbf)},{'name':a172_0x35be12(0xa8),'type':a172_0x35be12(0xc2),'description':'Target\x20environment'},{'name':a172_0x35be12(0xac),'type':a172_0x35be12(0xc2),'description':a172_0x35be12(0xae)}],upgradeFlags=[{'name':a172_0x35be12(0xa5),'type':a172_0x35be12(0xb5),'description':a172_0x35be12(0xa4),'default':![]}];export const projectDefinitions=[{'service':a172_0x35be12(0xb6),'command':a172_0x35be12(0xb8),'description':a172_0x35be12(0xbd),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a172_0x35be12(0xb1),'description':a172_0x35be12(0xc0),'required':![]}],'flags':createFlags,async 'execute'(_0x38e41f){const _0x490a22=a172_0x35be12,{createApp:_0x107c9d}=await import('../../commands/project/create/main.js'),_0x33ef7f=_0x38e41f[_0x490a22(0xa9)](_0x490a22(0xa1))[_0x490a22(0xaa)]()||_0x38e41f[_0x490a22(0xa3)][0x0]?.[_0x490a22(0xaa)](),_0x58fb03=_0x38e41f[_0x490a22(0xa9)](_0x490a22(0xa8))||undefined,_0xf06fc7=_0x38e41f[_0x490a22(0xa9)](_0x490a22(0xac))||undefined;if(_0x38e41f[_0x490a22(0xa6)]){if(!_0x33ef7f)throw CliErrors[_0x490a22(0xa0)](_0x490a22(0xb2),_0x490a22(0xa2)+CLI_BIN_NAME+_0x490a22(0xbe));await _0x107c9d({'projectCode':_0x33ef7f,'appCode':_0xf06fc7,'env':_0x58fb03,'cookie':_0x38e41f[_0x490a22(0xbc)],'nonInteractive':!![]});}else await _0x107c9d({'projectCode':_0x33ef7f,'appCode':_0xf06fc7,'env':_0x58fb03,'cookie':_0x38e41f[_0x490a22(0xbc)]});return{'ok':!![]};}},{'service':a172_0x35be12(0xb6),'command':a172_0x35be12(0xab),'description':a172_0x35be12(0xb4),'risk':a172_0x35be12(0xb0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x20567d){const _0x19e775=a172_0x35be12;return await upgradeApp(_0x20567d['nonInteractive'],{'yes':_0x20567d[_0x19e775(0xb3)](_0x19e775(0xa5))}),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a173_0x2de179=a173_0x5222;function a173_0x5222(_0x24b796,_0xe53991){_0x24b796=_0x24b796-0x98;const _0x522f99=a173_0x522f();let _0x522232=_0x522f99[_0x24b796];return _0x522232;}(function(_0x253bf2,_0x2279da){const _0x45cbda=a173_0x5222,_0x479ff3=_0x253bf2();while(!![]){try{const _0x5d0f7a=parseInt(_0x45cbda(0x109))/0x1*(-parseInt(_0x45cbda(0x11c))/0x2)+-parseInt(_0x45cbda(0xd9))/0x3*(-parseInt(_0x45cbda(0x115))/0x4)+-parseInt(_0x45cbda(0x116))/0x5*(parseInt(_0x45cbda(0xdf))/0x6)+parseInt(_0x45cbda(0x103))/0x7+-parseInt(_0x45cbda(0xa6))/0x8*(parseInt(_0x45cbda(0xc3))/0x9)+-parseInt(_0x45cbda(0xdd))/0xa*(-parseInt(_0x45cbda(0x119))/0xb)+parseInt(_0x45cbda(0xd5))/0xc;if(_0x5d0f7a===_0x2279da)break;else _0x479ff3['push'](_0x479ff3['shift']());}catch(_0x166231){_0x479ff3['push'](_0x479ff3['shift']());}}}(a173_0x522f,0xd14aa));import a173_0x946720 from'chalk';function a173_0x522f(){const _0x302988=['Upgrade\x20@lovrabet/sdk','oldMcpConfig','no\x20legacy\x20config\x20found','parse','bold','\x20→\x20keys:\x20','Legacy\x20artifacts:','FAIL','keys','\x20\x20#\x20or','includes','skipped\x20(no\x20legacy\x20config)','6232AeoVDb','Upgrade\x20cancelled.','latest','isDirectory','filter','succeed','length','Remove\x20legacy\x20artifacts','sdkUpgrade','\x20→\x20latest','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','devDependencies','Step\x205/7:\x20Removing\x20old\x20skill...','Remove\x20old\x20skill','fields','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','cyan','done','cwd','skipped','\x20removed','path','error','string','yellow','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','\x20\x20bun\x20install','files','3177tvWtAU','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','\x20removed\x20(','gray','@lovrabet/sdk','===\x20Upgrade\x20Summary\x20===','oldPath','start','entries','.claude/skills/lovrabet','@lovrabet/sdk:','Proceed\x20with\x20upgrade?','Upgrade\x20completed\x20successfully!','Clean\x20MCP\x20config','not\x20found\x20(will\x20create)','not\x20found\x20or\x20already\x20at\x20latest','lovrabet/lovrabet-skill\x20removed','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','22023324JsRAjb','message','failed','CANCEL','6IpXQJf','yes','mcpServers','red','2307080jsjyNq','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','99474eQhgQU','package.json','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','isArray','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','.cursor/mcp.json','no\x20legacy\x20entry','log','no\x20matching\x20entry\x20found','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','hasNewConfig','Step\x206/7:\x20Installing\x20new\x20skill...','\x20\x20Action:\x20delete','not\x20needed','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','lovrabet/rabetbase','green','label','.cursor/rules/lovrabet_rules.mdc','Step\x204/7:\x20Cleaning\x20MCP\x20config...','step','fail','args','needed','\x20\x20npm\x20install','Config\x20file:','Config\x20migration','\x20→\x20','[\x22@lovrabet/sdk\x22]:\x20','join','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','push','some','values','needsSkillSwap','\x20\x20New\x20config\x20(.rabetbase.json):\x20','8093337oFaBQY','info','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','oldArtifacts','Remove\x20.lovrabet/','detail','330268yNDcDP','Install\x20new\x20skill','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','white','utf8','\x20\x20\x20\x20\x20\x20\x20','\x20\x20Current\x20version\x20in\x20','@lovrabet/dataset-mcp-server','lovrabet/rabetbase\x20installed\x20globally','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','.lovrabet','355084HUgZKv','355EALMdO','inherit','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','22YycXwc','status','===\x20Upgrade\x20Analysis\x20===','8OXDdpQ','stringify','Step\x201/7:\x20Migrating\x20config...','\x20from\x20'];a173_0x522f=function(){return _0x302988;};return a173_0x522f();}import a173_0x14bdbe 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[a173_0x2de179(0xaa)](_0x1a059f=>_0x1a059f!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x40905f){const _0x5154f1=a173_0x2de179,_0x2d6df8=[];for(const _0x91a84e of Object[_0x5154f1(0x100)](CORE_IDE_CONFIGS)){if(_0x91a84e['files'])for(const _0x314571 of _0x91a84e[_0x5154f1(0xc2)]){_0x2d6df8[_0x5154f1(0xfe)](resolve(_0x40905f,_0x314571[_0x5154f1(0xbc)]));}}return _0x2d6df8;}function analyse(_0x34e911){const _0x3deea7=a173_0x2de179;let _0x2a82ed=null;const _0x7f2bda=resolve(_0x34e911,NEW_CONFIG_NAME),_0x1de397=existsSync(_0x7f2bda);for(const _0xf6c9c5 of LEGACY_CONFIG_NAMES){const _0x33a8ab=resolve(_0x34e911,_0xf6c9c5);if(existsSync(_0x33a8ab)){const _0x3a1f86=readConfigFile(_0x33a8ab),_0x537c14=Object[_0x3deea7(0xa2)](_0x3a1f86)[_0x3deea7(0xaa)](_0x3d668f=>typeof _0x3a1f86[_0x3d668f]!=='undefined');_0x2a82ed={'oldPath':_0x33a8ab,'hasNewConfig':_0x1de397,'fields':_0x537c14};break;}}const _0x100403=[],_0x85f19f=resolve(_0x34e911,_0x3deea7(0x114));if(existsSync(_0x85f19f))_0x100403[_0x3deea7(0xfe)](_0x85f19f);const _0xf5ce55=resolve(_0x34e911,_0x3deea7(0xf1));if(existsSync(_0xf5ce55))_0x100403['push'](_0xf5ce55);const _0x1d4f48=resolve(_0x34e911,_0x3deea7(0xcc));if(existsSync(_0x1d4f48))_0x100403[_0x3deea7(0xfe)](_0x1d4f48);for(const _0x3b6267 of collectIdeSkillFiles(_0x34e911)){if(existsSync(_0x3b6267))_0x100403[_0x3deea7(0xfe)](_0x3b6267);}let _0x5bedf=null;const _0x457370=resolve(_0x34e911,_0x3deea7(0xe4));if(existsSync(_0x457370))try{const _0x9304f9=JSON[_0x3deea7(0x9d)](readFileSync(_0x457370,'utf8'));if(_0x9304f9?.[_0x3deea7(0xdb)]&&typeof _0x9304f9['mcpServers']==='object'){const _0x1e2408=[];for(const [_0x4f2bf4,_0x401dba]of Object['entries'](_0x9304f9['mcpServers'])){const _0x220e68=_0x401dba;_0x220e68?.['args']&&Array[_0x3deea7(0xe2)](_0x220e68[_0x3deea7(0xf5)])&&_0x220e68[_0x3deea7(0xf5)][_0x3deea7(0xff)](_0x3ec069=>typeof _0x3ec069===_0x3deea7(0xbe)&&_0x3ec069[_0x3deea7(0xa4)](_0x3deea7(0x111)))&&_0x1e2408[_0x3deea7(0xfe)](_0x4f2bf4);}_0x1e2408['length']>0x0&&(_0x5bedf={'path':_0x457370,'keys':_0x1e2408});}}catch{}const _0x18d582=_0x100403['length']>0x0||_0x2a82ed!==null;let _0x127077=null;const _0x67a137=resolve(_0x34e911,_0x3deea7(0xe0));if(existsSync(_0x67a137))try{const _0x4b8bbd=JSON[_0x3deea7(0x9d)](readFileSync(_0x67a137,_0x3deea7(0x10e)));for(const _0x4f6d22 of['dependencies',_0x3deea7(0xb1)]){const _0x3c1664=_0x4b8bbd?.[_0x4f6d22]?.['@lovrabet/sdk'];if(typeof _0x3c1664===_0x3deea7(0xbe)){_0x3c1664!==_0x3deea7(0xa8)&&(_0x127077={'pkgPath':_0x67a137,'currentVersion':_0x3c1664,'field':_0x4f6d22});break;}}}catch{}return{'configMigration':_0x2a82ed,'oldArtifacts':_0x100403,'oldMcpConfig':_0x5bedf,'needsSkillSwap':_0x18d582,'sdkUpgrade':_0x127077};}function printReport(_0x16f518){const _0x78d733=a173_0x2de179,{configMigration:_0x3fd6e8,oldArtifacts:_0x228514,oldMcpConfig:_0x24917b,needsSkillSwap:_0xf08659}=_0x16f518;console['log'](''),console[_0x78d733(0xe6)](a173_0x946720[_0x78d733(0x9e)](_0x78d733(0x11b))),console[_0x78d733(0xe6)]('');_0x3fd6e8?(console[_0x78d733(0xe6)](a173_0x946720[_0x78d733(0xb7)](_0x78d733(0xf8))+('\x20\x20'+a173_0x946720[_0x78d733(0xbf)](_0x3fd6e8['oldPath']))),console[_0x78d733(0xe6)](_0x78d733(0x102)+(_0x3fd6e8['hasNewConfig']?a173_0x946720[_0x78d733(0xef)]('already\x20exists\x20(will\x20merge)'):a173_0x946720['gray'](_0x78d733(0xd1)))),console['log']('\x20\x20Fields\x20to\x20migrate:\x20'+_0x3fd6e8[_0x78d733(0xb4)]['join'](',\x20')),console[_0x78d733(0xe6)](_0x78d733(0xd4))):console[_0x78d733(0xe6)](a173_0x946720[_0x78d733(0xb7)]('Config\x20file:')+'\x20\x20'+a173_0x946720[_0x78d733(0xc6)](_0x78d733(0x9c)));console[_0x78d733(0xe6)]('');if(_0x228514['length']>0x0){console['log'](a173_0x946720[_0x78d733(0xb7)](_0x78d733(0xa0)));for(const _0x1f4d70 of _0x228514){console[_0x78d733(0xe6)]('\x20\x20'+a173_0x946720['red']('FOUND')+'\x20\x20'+_0x1f4d70);}console[_0x78d733(0xe6)](_0x78d733(0xeb));}else console[_0x78d733(0xe6)](a173_0x946720['cyan'](_0x78d733(0xa0))+'\x20\x20'+a173_0x946720[_0x78d733(0xc6)]('none\x20found'));console[_0x78d733(0xe6)]('');_0x24917b?(console[_0x78d733(0xe6)](a173_0x946720[_0x78d733(0xb7)]('MCP\x20config:')+('\x20\x20'+a173_0x946720['yellow'](_0x24917b['path'])+_0x78d733(0x9f)+_0x24917b[_0x78d733(0xa2)]['join'](',\x20'))),console[_0x78d733(0xe6)](_0x78d733(0xb0))):console[_0x78d733(0xe6)](a173_0x946720['cyan']('MCP\x20config:')+'\x20\x20'+a173_0x946720[_0x78d733(0xc6)](_0x78d733(0xe5)));console[_0x78d733(0xe6)](''),console[_0x78d733(0xe6)](a173_0x946720[_0x78d733(0xb7)]('Skill\x20swap:')+('\x20\x20'+(_0xf08659?a173_0x946720[_0x78d733(0xbf)](_0x78d733(0xf6)):a173_0x946720['green'](_0x78d733(0xec)))));_0xf08659&&console[_0x78d733(0xe6)](_0x78d733(0x118)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x78d733(0xe6)]('');if(_0x16f518[_0x78d733(0xae)]){const {currentVersion:_0x44b14b,field:_0x706270,pkgPath:_0x957994}=_0x16f518[_0x78d733(0xae)];console[_0x78d733(0xe6)](a173_0x946720[_0x78d733(0xb7)](_0x78d733(0xcd))+('\x20\x20'+a173_0x946720['yellow'](_0x957994))),console[_0x78d733(0xe6)](_0x78d733(0x110)+_0x706270+':\x20'+a173_0x946720[_0x78d733(0xbf)](_0x44b14b)+_0x78d733(0xfa)+a173_0x946720[_0x78d733(0xef)](_0x78d733(0xa8))),console['log'](_0x78d733(0xe1));}else console['log'](a173_0x946720[_0x78d733(0xb7)](_0x78d733(0xcd))+'\x20\x20'+a173_0x946720['gray'](_0x78d733(0xd2)));console[_0x78d733(0xe6)]('');}function execConfigMigration(_0x48d98b,_0xcacaf0){const _0x57bbec=a173_0x2de179,{configMigration:_0xa06f54}=_0x48d98b;if(!_0xa06f54?.[_0x57bbec(0xc9)])return{'step':0x1,'label':_0x57bbec(0xf9),'ok':!![],'detail':_0x57bbec(0xa5)};const _0xefe20e=readConfigFile(_0xa06f54['oldPath']),_0xe2ade2=resolve(_0xcacaf0,NEW_CONFIG_NAME),_0x13e98f=_0xa06f54[_0x57bbec(0xe9)]?readConfigFile(_0xe2ade2):{};for(const [_0x4d2c30,_0x41e130]of Object[_0x57bbec(0xcb)](_0xefe20e)){!(_0x4d2c30 in _0x13e98f)&&(_0x13e98f[_0x4d2c30]=_0x41e130);}writeConfigFile(_0xe2ade2,_0x13e98f);const _0x474e3f=_0xa06f54[_0x57bbec(0xc9)]+'.bak';return renameSync(_0xa06f54['oldPath'],_0x474e3f),{'step':0x1,'label':_0x57bbec(0xf9),'ok':!![],'detail':_0xa06f54[_0x57bbec(0xc9)]+_0x57bbec(0xfa)+_0xe2ade2+'\x20(backup:\x20'+_0x474e3f+')'};}function execRemoveOldArtifacts(_0x402f47){const _0x1382a9=a173_0x2de179,_0x118083=[];for(const _0x1c9ba0 of _0x402f47){try{if(!existsSync(_0x1c9ba0))continue;const _0x38e547=tryStat(_0x1c9ba0);_0x38e547?.[_0x1382a9(0xa9)]()?rmSync(_0x1c9ba0,{'recursive':!![],'force':!![]}):unlinkSync(_0x1c9ba0);}catch(_0x23e5cf){_0x118083['push'](_0x1c9ba0+':\x20'+_0x23e5cf[_0x1382a9(0xd6)]);}}return{'step':0x3,'label':_0x1382a9(0xad),'ok':_0x118083[_0x1382a9(0xac)]===0x0,'detail':_0x118083[_0x1382a9(0xac)]>0x0?_0x402f47['length']-_0x118083['length']+'/'+_0x402f47['length']+_0x1382a9(0xc5)+_0x118083[_0x1382a9(0xfc)](';\x20')+')':_0x402f47[_0x1382a9(0xac)]+_0x1382a9(0xbb)};}function execCleanMcp(_0x3894a1){const _0x4b601a=a173_0x2de179;if(!_0x3894a1[_0x4b601a(0x9b)])return{'step':0x4,'label':_0x4b601a(0xd0),'ok':!![],'detail':'skipped'};try{const _0x1324ae=readFileSync(_0x3894a1[_0x4b601a(0x9b)][_0x4b601a(0xbc)],_0x4b601a(0x10e)),_0x55525b=JSON['parse'](_0x1324ae);if(_0x55525b?.[_0x4b601a(0xdb)]&&typeof _0x55525b[_0x4b601a(0xdb)]==='object'){const _0x5a10a7=[];for(const [_0x1789bc,_0x1919de]of Object[_0x4b601a(0xcb)](_0x55525b[_0x4b601a(0xdb)])){_0x1919de?.[_0x4b601a(0xf5)]&&Array['isArray'](_0x1919de[_0x4b601a(0xf5)])&&_0x1919de[_0x4b601a(0xf5)][_0x4b601a(0xff)](_0x299933=>typeof _0x299933===_0x4b601a(0xbe)&&_0x299933['includes'](_0x4b601a(0x111)))&&_0x5a10a7[_0x4b601a(0xfe)](_0x1789bc);}for(const _0x45db65 of _0x5a10a7){delete _0x55525b[_0x4b601a(0xdb)][_0x45db65];}return _0x5a10a7[_0x4b601a(0xac)]>0x0&&writeFileSync(_0x3894a1['oldMcpConfig'][_0x4b601a(0xbc)],JSON[_0x4b601a(0x11d)](_0x55525b,null,0x2)+'\x0a',_0x4b601a(0x10e)),{'step':0x4,'label':_0x4b601a(0xd0),'ok':!![],'detail':'removed\x20'+_0x5a10a7[_0x4b601a(0xfc)](',\x20')+_0x4b601a(0x99)+_0x3894a1[_0x4b601a(0x9b)][_0x4b601a(0xbc)]};}return{'step':0x4,'label':_0x4b601a(0xd0),'ok':!![],'detail':_0x4b601a(0xe7)};}catch(_0x40c4f6){return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':![],'detail':_0x40c4f6[_0x4b601a(0xd6)]};}}function execSkillsRemove(_0x4a3ebd,_0x4e2042){const _0x444ccd=a173_0x2de179,_0x21314f=runNpxSkillsRemove(_0x4a3ebd,{'stdio':'inherit','yes':_0x4e2042});return{'step':0x5,'label':_0x444ccd(0xb3),'ok':_0x21314f['ok'],'detail':_0x21314f['ok']?_0x444ccd(0xd3):_0x21314f[_0x444ccd(0xbd)]??'exit\x20'+_0x21314f[_0x444ccd(0x11a)]};}function execSkillsAdd(_0x15ccc6,_0x503319){const _0x3a0f2e=a173_0x2de179,_0x1e5b94=runNpxSkillsAddGlobal(_0x15ccc6,_0x3a0f2e(0xee),{'stdio':_0x3a0f2e(0x117),'yes':_0x503319});return{'step':0x6,'label':_0x3a0f2e(0x10a),'ok':_0x1e5b94['ok'],'detail':_0x1e5b94['ok']?_0x3a0f2e(0x112):_0x1e5b94[_0x3a0f2e(0xbd)]??'exit\x20'+_0x1e5b94[_0x3a0f2e(0x11a)]};}function execUpgradeSdk(_0xcbaa62){const _0x3e8c17=a173_0x2de179;if(!_0xcbaa62[_0x3e8c17(0xae)])return{'step':0x7,'label':_0x3e8c17(0x9a),'ok':!![],'detail':'skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)'};const {pkgPath:_0x67e340,currentVersion:_0x3afba1,field:_0xbba426}=_0xcbaa62[_0x3e8c17(0xae)];try{const _0x559a73=readFileSync(_0x67e340,_0x3e8c17(0x10e)),_0xe971e2=JSON[_0x3e8c17(0x9d)](_0x559a73);return _0xe971e2[_0xbba426][_0x3e8c17(0xc7)]='latest',writeFileSync(_0x67e340,JSON[_0x3e8c17(0x11d)](_0xe971e2,null,0x2)+'\x0a',_0x3e8c17(0x10e)),{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0xbba426+_0x3e8c17(0xfb)+_0x3afba1+_0x3e8c17(0xaf)};}catch(_0x502743){return{'step':0x7,'label':_0x3e8c17(0x9a),'ok':![],'detail':_0x502743[_0x3e8c17(0xd6)]};}}function tryStat(_0x1b6b68){try{return statSync(_0x1b6b68);}catch{return undefined;}}function printSummary(_0x4e69ba){const _0x5016f7=a173_0x2de179;console[_0x5016f7(0xe6)](''),console[_0x5016f7(0xe6)](a173_0x946720[_0x5016f7(0x9e)](_0x5016f7(0xc8))),console[_0x5016f7(0xe6)]('');for(const _0x1c6678 of _0x4e69ba){const _0x17d082=_0x1c6678['ok']?a173_0x946720[_0x5016f7(0xef)]('OK'):a173_0x946720[_0x5016f7(0xdc)](_0x5016f7(0xa1));console[_0x5016f7(0xe6)]('\x20\x20'+_0x17d082+'\x20\x20Step\x20'+_0x1c6678[_0x5016f7(0xf3)]+':\x20'+_0x1c6678[_0x5016f7(0xf0)]);if(_0x1c6678['detail'])console[_0x5016f7(0xe6)](_0x5016f7(0x10f)+a173_0x946720[_0x5016f7(0xc6)](_0x1c6678[_0x5016f7(0x108)]));}console['log']('');}export async function upgradeApp(_0x227646,_0x541a7c){const _0x20c894=a173_0x2de179,_0x135439=process[_0x20c894(0xb9)](),_0xb9d75e=analyse(_0x135439),_0x592c5d=!_0xb9d75e['configMigration']&&_0xb9d75e[_0x20c894(0x106)][_0x20c894(0xac)]===0x0&&!_0xb9d75e[_0x20c894(0x9b)]&&!_0xb9d75e[_0x20c894(0x101)]&&!_0xb9d75e[_0x20c894(0xae)];if(_0x592c5d){console['log'](a173_0x946720[_0x20c894(0xef)](_0x20c894(0x105)));return;}printReport(_0xb9d75e);const _0xc0ea2e=!!(_0x541a7c[_0x20c894(0xda)]||_0x541a7c['Y']||_0x227646);if(!_0xc0ea2e)try{const _0x1c210f=await askConfirm(_0x20c894(0xce));if(!_0x1c210f){console[_0x20c894(0xe6)](a173_0x946720[_0x20c894(0xc6)]('Upgrade\x20cancelled.'));return;}}catch(_0x2a2b5f){if(_0x2a2b5f?.['message']===_0x20c894(0xd8)){console[_0x20c894(0xe6)](a173_0x946720['gray'](_0x20c894(0xa7)));return;}throw _0x2a2b5f;}const _0x5be872=[],_0x282169=a173_0x14bdbe({'text':_0x20c894(0x98),'color':_0x20c894(0xb7)})[_0x20c894(0xca)](),_0x1a4c3e=execConfigMigration(_0xb9d75e,_0x135439);_0x5be872[_0x20c894(0xfe)](_0x1a4c3e),_0x282169[_0x1a4c3e['ok']?_0x20c894(0xab):'fail']('Step\x201/7:\x20Config\x20migration\x20—\x20'+(_0x1a4c3e[_0x20c894(0x108)]??(_0x1a4c3e['ok']?'done':_0x20c894(0xd7))));const _0x246b66=resolve(_0x135439,_0x20c894(0x114)),_0x5ca7e3=a173_0x14bdbe({'text':_0x20c894(0xfd),'color':_0x20c894(0xb7)})[_0x20c894(0xca)]();if(existsSync(_0x246b66))try{rmSync(_0x246b66,{'recursive':!![],'force':!![]}),_0x5ca7e3[_0x20c894(0xab)](_0x20c894(0xc0)),_0x5be872['push']({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0xdbd60c){_0x5ca7e3[_0x20c894(0xf4)](_0x20c894(0xe3)+_0xdbd60c[_0x20c894(0xd6)]),_0x5be872[_0x20c894(0xfe)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':![],'detail':_0xdbd60c['message']});}else _0x5ca7e3[_0x20c894(0x104)](_0x20c894(0xb6)),_0x5be872['push']({'step':0x2,'label':_0x20c894(0x107),'ok':!![],'detail':_0x20c894(0xba)});const _0x3c8a17=a173_0x14bdbe({'text':_0x20c894(0xb5),'color':'cyan'})[_0x20c894(0xca)](),_0xb3d786=execRemoveOldArtifacts(_0xb9d75e[_0x20c894(0x106)]);_0x5be872[_0x20c894(0xfe)](_0xb3d786),_0x3c8a17[_0xb3d786['ok']?_0x20c894(0xab):_0x20c894(0xf4)](_0x20c894(0x113)+(_0xb3d786[_0x20c894(0x108)]??(_0xb3d786['ok']?_0x20c894(0xb8):'failed')));const _0x2f5924=a173_0x14bdbe({'text':_0x20c894(0xf2),'color':_0x20c894(0xb7)})[_0x20c894(0xca)](),_0x59af81=execCleanMcp(_0xb9d75e);_0x5be872[_0x20c894(0xfe)](_0x59af81),_0x2f5924[_0x59af81['ok']?_0x20c894(0xab):_0x20c894(0xf4)]('Step\x204/7:\x20MCP\x20config\x20—\x20'+(_0x59af81[_0x20c894(0x108)]??(_0x59af81['ok']?_0x20c894(0xb8):_0x20c894(0xd7))));const _0x1f8f43=a173_0x14bdbe({'text':_0x20c894(0xb2),'color':_0x20c894(0xb7)})[_0x20c894(0xca)](),_0x89151=execSkillsRemove(_0x135439,_0xc0ea2e);_0x5be872[_0x20c894(0xfe)](_0x89151),_0x1f8f43[_0x89151['ok']?_0x20c894(0xab):_0x20c894(0xf4)](_0x20c894(0x10b)+(_0x89151[_0x20c894(0x108)]??(_0x89151['ok']?_0x20c894(0xb8):'failed')));const _0x51aba9=a173_0x14bdbe({'text':_0x20c894(0xea),'color':_0x20c894(0xb7)})[_0x20c894(0xca)](),_0x1c6d4a=execSkillsAdd(_0x135439,_0xc0ea2e);_0x5be872[_0x20c894(0xfe)](_0x1c6d4a),_0x51aba9[_0x1c6d4a['ok']?'succeed':_0x20c894(0xf4)]('Step\x206/7:\x20Install\x20new\x20skill\x20—\x20'+(_0x1c6d4a[_0x20c894(0x108)]??(_0x1c6d4a['ok']?_0x20c894(0xb8):_0x20c894(0xd7))));const _0x3cd256=a173_0x14bdbe({'text':_0x20c894(0x10c),'color':_0x20c894(0xb7)})['start'](),_0x5ce45c=execUpgradeSdk(_0xb9d75e);_0x5be872[_0x20c894(0xfe)](_0x5ce45c),_0x3cd256[_0x5ce45c['ok']?'succeed':_0x20c894(0xf4)](_0x20c894(0xe8)+(_0x5ce45c[_0x20c894(0x108)]??(_0x5ce45c['ok']?_0x20c894(0xb8):'failed'))),printSummary(_0x5be872);const _0x3efbc7=_0x5be872['some'](_0x45403d=>!_0x45403d['ok']);_0x3efbc7?console[_0x20c894(0xe6)](a173_0x946720['yellow'](_0x20c894(0xc4))):console[_0x20c894(0xe6)](a173_0x946720[_0x20c894(0xef)](_0x20c894(0xcf))),_0x5ce45c['ok']&&_0xb9d75e[_0x20c894(0xae)]&&(console['log'](''),console[_0x20c894(0xe6)](a173_0x946720['bold'][_0x20c894(0xb7)](_0x20c894(0xde))),console['log'](a173_0x946720['cyan'](_0x20c894(0xed))),console[_0x20c894(0xe6)](''),console[_0x20c894(0xe6)](a173_0x946720[_0x20c894(0x10d)](_0x20c894(0xf7))),console[_0x20c894(0xe6)](a173_0x946720[_0x20c894(0x10d)](_0x20c894(0xa3))),console['log'](a173_0x946720[_0x20c894(0x10d)](_0x20c894(0xc1))),console[_0x20c894(0xe6)](''));}
1
+ const a173_0x1421ab=a173_0x3fb9;(function(_0x50f051,_0x103818){const _0x3a1deb=a173_0x3fb9,_0x1a7273=_0x50f051();while(!![]){try{const _0x4f030e=-parseInt(_0x3a1deb(0x134))/0x1+-parseInt(_0x3a1deb(0x1a0))/0x2+parseInt(_0x3a1deb(0x198))/0x3*(-parseInt(_0x3a1deb(0x19a))/0x4)+-parseInt(_0x3a1deb(0x130))/0x5+parseInt(_0x3a1deb(0x197))/0x6+parseInt(_0x3a1deb(0x143))/0x7*(-parseInt(_0x3a1deb(0x13c))/0x8)+parseInt(_0x3a1deb(0x13f))/0x9;if(_0x4f030e===_0x103818)break;else _0x1a7273['push'](_0x1a7273['shift']());}catch(_0x5c4dab){_0x1a7273['push'](_0x1a7273['shift']());}}}(a173_0x5241,0xddb1f));import a173_0x465c40 from'chalk';import a173_0x9eba5e from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';function a173_0x3fb9(_0x1dfac0,_0x4948da){_0x1dfac0=_0x1dfac0-0x12e;const _0x524113=a173_0x5241();let _0x3fb965=_0x524113[_0x1dfac0];return _0x3fb965;}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[a173_0x1421ab(0x19c)](_0x222cb5=>_0x222cb5!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x58af59){const _0x3031c9=a173_0x1421ab,_0x8137b6=[];for(const _0x4f4a35 of Object[_0x3031c9(0x151)](CORE_IDE_CONFIGS)){if(_0x4f4a35[_0x3031c9(0x18c)])for(const _0x21e48d of _0x4f4a35[_0x3031c9(0x18c)]){_0x8137b6[_0x3031c9(0x1a3)](resolve(_0x58af59,_0x21e48d[_0x3031c9(0x14c)]));}}return _0x8137b6;}function analyse(_0x3a4972){const _0x1e3fc0=a173_0x1421ab;let _0x54b199=null;const _0x3e3495=resolve(_0x3a4972,NEW_CONFIG_NAME),_0x160f76=existsSync(_0x3e3495);for(const _0x22ea0c of LEGACY_CONFIG_NAMES){const _0x41f059=resolve(_0x3a4972,_0x22ea0c);if(existsSync(_0x41f059)){const _0x1b8ae8=readConfigFile(_0x41f059),_0x79c357=Object[_0x1e3fc0(0x176)](_0x1b8ae8)[_0x1e3fc0(0x19c)](_0xcbd54b=>typeof _0x1b8ae8[_0xcbd54b]!==_0x1e3fc0(0x13a));_0x54b199={'oldPath':_0x41f059,'hasNewConfig':_0x160f76,'fields':_0x79c357};break;}}const _0x23e6e0=[],_0x5ab160=resolve(_0x3a4972,'.lovrabet');if(existsSync(_0x5ab160))_0x23e6e0[_0x1e3fc0(0x1a3)](_0x5ab160);const _0x9f164e=resolve(_0x3a4972,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x9f164e))_0x23e6e0[_0x1e3fc0(0x1a3)](_0x9f164e);const _0x300dda=resolve(_0x3a4972,_0x1e3fc0(0x19f));if(existsSync(_0x300dda))_0x23e6e0['push'](_0x300dda);for(const _0xee2d03 of collectIdeSkillFiles(_0x3a4972)){if(existsSync(_0xee2d03))_0x23e6e0[_0x1e3fc0(0x1a3)](_0xee2d03);}let _0x2606a0=null;const _0xad3ad0=resolve(_0x3a4972,_0x1e3fc0(0x18d));if(existsSync(_0xad3ad0))try{const _0x418604=JSON[_0x1e3fc0(0x190)](readFileSync(_0xad3ad0,_0x1e3fc0(0x16a)));if(_0x418604?.[_0x1e3fc0(0x18b)]&&typeof _0x418604[_0x1e3fc0(0x18b)]===_0x1e3fc0(0x179)){const _0x25cf47=[];for(const [_0x43fcae,_0xcd50ec]of Object[_0x1e3fc0(0x163)](_0x418604['mcpServers'])){const _0x2ac23b=_0xcd50ec;_0x2ac23b?.['args']&&Array[_0x1e3fc0(0x13b)](_0x2ac23b[_0x1e3fc0(0x158)])&&_0x2ac23b[_0x1e3fc0(0x158)][_0x1e3fc0(0x141)](_0x4c392c=>typeof _0x4c392c===_0x1e3fc0(0x194)&&_0x4c392c[_0x1e3fc0(0x14e)](_0x1e3fc0(0x192)))&&_0x25cf47[_0x1e3fc0(0x1a3)](_0x43fcae);}_0x25cf47[_0x1e3fc0(0x184)]>0x0&&(_0x2606a0={'path':_0xad3ad0,'keys':_0x25cf47});}}catch{}const _0x19ec3a=_0x23e6e0['length']>0x0||_0x54b199!==null;let _0x366d5e=null;const _0x5bb1e8=resolve(_0x3a4972,_0x1e3fc0(0x12f));if(existsSync(_0x5bb1e8))try{const _0x49cd31=JSON[_0x1e3fc0(0x190)](readFileSync(_0x5bb1e8,_0x1e3fc0(0x16a)));for(const _0x5e5bc8 of['dependencies','devDependencies']){const _0x1b6e13=_0x49cd31?.[_0x5e5bc8]?.[_0x1e3fc0(0x152)];if(typeof _0x1b6e13===_0x1e3fc0(0x194)){_0x1b6e13!==_0x1e3fc0(0x14b)&&(_0x366d5e={'pkgPath':_0x5bb1e8,'currentVersion':_0x1b6e13,'field':_0x5e5bc8});break;}}}catch{}return{'configMigration':_0x54b199,'oldArtifacts':_0x23e6e0,'oldMcpConfig':_0x2606a0,'needsSkillSwap':_0x19ec3a,'sdkUpgrade':_0x366d5e};}function printReport(_0x117ac9){const _0x675459=a173_0x1421ab,{configMigration:_0x4923cd,oldArtifacts:_0x2e362e,oldMcpConfig:_0x298730,needsSkillSwap:_0x4540b4}=_0x117ac9;console[_0x675459(0x17e)](''),console[_0x675459(0x17e)](a173_0x465c40[_0x675459(0x146)](_0x675459(0x131))),console[_0x675459(0x17e)]('');_0x4923cd?(console[_0x675459(0x17e)](a173_0x465c40[_0x675459(0x17d)](_0x675459(0x138))+('\x20\x20'+a173_0x465c40[_0x675459(0x16e)](_0x4923cd[_0x675459(0x13e)]))),console[_0x675459(0x17e)]('\x20\x20New\x20config\x20(.rabetbase.json):\x20'+(_0x4923cd['hasNewConfig']?a173_0x465c40[_0x675459(0x182)](_0x675459(0x150)):a173_0x465c40['gray']('not\x20found\x20(will\x20create)'))),console[_0x675459(0x17e)](_0x675459(0x174)+_0x4923cd[_0x675459(0x157)]['join'](',\x20')),console['log']('\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak')):console['log'](a173_0x465c40[_0x675459(0x17d)](_0x675459(0x138))+'\x20\x20'+a173_0x465c40['gray'](_0x675459(0x17f)));console['log']('');if(_0x2e362e['length']>0x0){console[_0x675459(0x17e)](a173_0x465c40['cyan'](_0x675459(0x18a)));for(const _0x3676e6 of _0x2e362e){console['log']('\x20\x20'+a173_0x465c40[_0x675459(0x1b0)](_0x675459(0x191))+'\x20\x20'+_0x3676e6);}console[_0x675459(0x17e)](_0x675459(0x15d));}else console[_0x675459(0x17e)](a173_0x465c40[_0x675459(0x17d)]('Legacy\x20artifacts:')+'\x20\x20'+a173_0x465c40[_0x675459(0x135)](_0x675459(0x149)));console[_0x675459(0x17e)]('');_0x298730?(console[_0x675459(0x17e)](a173_0x465c40['cyan'](_0x675459(0x1a7))+('\x20\x20'+a173_0x465c40['yellow'](_0x298730[_0x675459(0x14c)])+_0x675459(0x1a9)+_0x298730[_0x675459(0x176)][_0x675459(0x16c)](',\x20'))),console[_0x675459(0x17e)](_0x675459(0x137))):console[_0x675459(0x17e)](a173_0x465c40['cyan'](_0x675459(0x1a7))+'\x20\x20'+a173_0x465c40[_0x675459(0x135)](_0x675459(0x1a8)));console[_0x675459(0x17e)](''),console[_0x675459(0x17e)](a173_0x465c40[_0x675459(0x17d)](_0x675459(0x177))+('\x20\x20'+(_0x4540b4?a173_0x465c40[_0x675459(0x16e)](_0x675459(0x164)):a173_0x465c40['green'](_0x675459(0x173)))));_0x4540b4&&console[_0x675459(0x17e)]('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console['log']('');if(_0x117ac9[_0x675459(0x168)]){const {currentVersion:_0x55b4b6,field:_0x4adc71,pkgPath:_0x247c64}=_0x117ac9[_0x675459(0x168)];console[_0x675459(0x17e)](a173_0x465c40[_0x675459(0x17d)](_0x675459(0x1a6))+('\x20\x20'+a173_0x465c40[_0x675459(0x16e)](_0x247c64))),console[_0x675459(0x17e)](_0x675459(0x161)+_0x4adc71+':\x20'+a173_0x465c40[_0x675459(0x16e)](_0x55b4b6)+_0x675459(0x145)+a173_0x465c40[_0x675459(0x182)](_0x675459(0x14b))),console[_0x675459(0x17e)]('\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)');}else console['log'](a173_0x465c40[_0x675459(0x17d)](_0x675459(0x1a6))+'\x20\x20'+a173_0x465c40['gray'](_0x675459(0x160)));console[_0x675459(0x17e)]('');}function a173_0x5241(){const _0x3a92e3=['@lovrabet/sdk:','MCP\x20config:','no\x20legacy\x20entry','\x20→\x20keys:\x20','white','Upgrade\x20completed\x20successfully!','\x20\x20bun\x20install','skipped\x20(no\x20legacy\x20config)','\x20\x20npm\x20install','lovrabet/lovrabet-skill\x20removed','red','stringify','package.json','7698320FEQmPo','===\x20Upgrade\x20Analysis\x20===','fail','CANCEL','1710940gvVWFf','gray','\x20→\x20latest','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','Config\x20file:','[\x22@lovrabet/sdk\x22]:\x20','undefined','isArray','4215064JlvDwE','label','oldPath','57249738BaKNDk','error','some','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','7zegMAC','lovrabet/rabetbase\x20installed\x20globally','\x20→\x20','bold','Remove\x20old\x20skill','cwd','none\x20found','failed','latest','path','start','includes','Step\x201/7:\x20Config\x20migration\x20—\x20','already\x20exists\x20(will\x20merge)','values','@lovrabet/sdk','lovrabet/rabetbase','Clean\x20MCP\x20config','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','no\x20matching\x20entry\x20found','fields','args','===\x20Upgrade\x20Summary\x20===','message','info','oldArtifacts','\x20\x20Action:\x20delete','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','not\x20found\x20or\x20already\x20at\x20latest','\x20\x20Current\x20version\x20in\x20','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','entries','needed','\x20removed','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','succeed','sdkUpgrade','Upgrade\x20@lovrabet/sdk','utf8','FAIL','join','detail','yellow','Remove\x20.lovrabet/','removed\x20','Remove\x20legacy\x20artifacts','\x20\x20\x20\x20\x20\x20\x20','not\x20needed','\x20\x20Fields\x20to\x20migrate:\x20','done','keys','Skill\x20swap:','step','object','.bak','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','cyan','log','no\x20legacy\x20config\x20found','inherit','exit\x20','green','Config\x20migration','length','\x20\x20#\x20or','Step\x206/7:\x20Installing\x20new\x20skill...','\x20from\x20','status','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','Legacy\x20artifacts:','mcpServers','files','.cursor/mcp.json','configMigration','Step\x205/7:\x20Removing\x20old\x20skill...','parse','FOUND','@lovrabet/dataset-mcp-server','isDirectory','string','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','Upgrade\x20cancelled.','6884172OiTqyt','5104749OfmeUw','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','4NEFHuf','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','filter','\x20\x20Step\x20','\x20(backup:\x20','.claude/skills/lovrabet','2242622jPFeJM','yes','oldMcpConfig','push','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','skipped'];a173_0x5241=function(){return _0x3a92e3;};return a173_0x5241();}function execConfigMigration(_0x4a3f5e,_0x3dc256){const _0x184516=a173_0x1421ab,{configMigration:_0x101c5f}=_0x4a3f5e;if(!_0x101c5f?.[_0x184516(0x13e)])return{'step':0x1,'label':_0x184516(0x183),'ok':!![],'detail':_0x184516(0x1ad)};const _0x58a8bd=readConfigFile(_0x101c5f[_0x184516(0x13e)]),_0x250e1b=resolve(_0x3dc256,NEW_CONFIG_NAME),_0x5ce726=_0x101c5f['hasNewConfig']?readConfigFile(_0x250e1b):{};for(const [_0x5dac93,_0x44444e]of Object[_0x184516(0x163)](_0x58a8bd)){!(_0x5dac93 in _0x5ce726)&&(_0x5ce726[_0x5dac93]=_0x44444e);}writeConfigFile(_0x250e1b,_0x5ce726);const _0x2dc055=_0x101c5f['oldPath']+_0x184516(0x17a);return renameSync(_0x101c5f[_0x184516(0x13e)],_0x2dc055),{'step':0x1,'label':_0x184516(0x183),'ok':!![],'detail':_0x101c5f['oldPath']+_0x184516(0x145)+_0x250e1b+_0x184516(0x19e)+_0x2dc055+')'};}function execRemoveOldArtifacts(_0x35d54c){const _0x3af44f=a173_0x1421ab,_0x53a2e9=[];for(const _0x1bfbc1 of _0x35d54c){try{if(!existsSync(_0x1bfbc1))continue;const _0x29499b=tryStat(_0x1bfbc1);_0x29499b?.[_0x3af44f(0x193)]()?rmSync(_0x1bfbc1,{'recursive':!![],'force':!![]}):unlinkSync(_0x1bfbc1);}catch(_0xcd93f5){_0x53a2e9[_0x3af44f(0x1a3)](_0x1bfbc1+':\x20'+_0xcd93f5[_0x3af44f(0x15a)]);}}return{'step':0x3,'label':_0x3af44f(0x171),'ok':_0x53a2e9[_0x3af44f(0x184)]===0x0,'detail':_0x53a2e9['length']>0x0?_0x35d54c[_0x3af44f(0x184)]-_0x53a2e9['length']+'/'+_0x35d54c[_0x3af44f(0x184)]+'\x20removed\x20('+_0x53a2e9[_0x3af44f(0x16c)](';\x20')+')':_0x35d54c[_0x3af44f(0x184)]+_0x3af44f(0x165)};}function execCleanMcp(_0x2d6361){const _0x456319=a173_0x1421ab;if(!_0x2d6361[_0x456319(0x1a2)])return{'step':0x4,'label':_0x456319(0x154),'ok':!![],'detail':_0x456319(0x1a5)};try{const _0x5613e3=readFileSync(_0x2d6361[_0x456319(0x1a2)][_0x456319(0x14c)],_0x456319(0x16a)),_0x13c8a3=JSON['parse'](_0x5613e3);if(_0x13c8a3?.[_0x456319(0x18b)]&&typeof _0x13c8a3[_0x456319(0x18b)]===_0x456319(0x179)){const _0x462ab0=[];for(const [_0x4ba75e,_0x204745]of Object[_0x456319(0x163)](_0x13c8a3[_0x456319(0x18b)])){_0x204745?.['args']&&Array['isArray'](_0x204745[_0x456319(0x158)])&&_0x204745[_0x456319(0x158)]['some'](_0x90914f=>typeof _0x90914f===_0x456319(0x194)&&_0x90914f[_0x456319(0x14e)]('@lovrabet/dataset-mcp-server'))&&_0x462ab0[_0x456319(0x1a3)](_0x4ba75e);}for(const _0x4f386f of _0x462ab0){delete _0x13c8a3[_0x456319(0x18b)][_0x4f386f];}return _0x462ab0[_0x456319(0x184)]>0x0&&writeFileSync(_0x2d6361['oldMcpConfig'][_0x456319(0x14c)],JSON[_0x456319(0x12e)](_0x13c8a3,null,0x2)+'\x0a',_0x456319(0x16a)),{'step':0x4,'label':_0x456319(0x154),'ok':!![],'detail':_0x456319(0x170)+_0x462ab0[_0x456319(0x16c)](',\x20')+_0x456319(0x187)+_0x2d6361['oldMcpConfig']['path']};}return{'step':0x4,'label':_0x456319(0x154),'ok':!![],'detail':_0x456319(0x156)};}catch(_0x4ff471){return{'step':0x4,'label':_0x456319(0x154),'ok':![],'detail':_0x4ff471[_0x456319(0x15a)]};}}function execSkillsRemove(_0x58afc1,_0x56c7ab){const _0x11fac1=a173_0x1421ab,_0x466470=runNpxSkillsRemove(_0x58afc1,{'stdio':_0x11fac1(0x180),'yes':_0x56c7ab});return{'step':0x5,'label':_0x11fac1(0x147),'ok':_0x466470['ok'],'detail':_0x466470['ok']?_0x11fac1(0x1af):_0x466470[_0x11fac1(0x140)]??'exit\x20'+_0x466470[_0x11fac1(0x188)]};}function execSkillsAdd(_0x3b6a49,_0x2e8996){const _0x10a9ca=a173_0x1421ab,_0x5ecec8=runNpxSkillsAddGlobal(_0x3b6a49,_0x10a9ca(0x153),{'stdio':'inherit','yes':_0x2e8996});return{'step':0x6,'label':'Install\x20new\x20skill','ok':_0x5ecec8['ok'],'detail':_0x5ecec8['ok']?_0x10a9ca(0x144):_0x5ecec8[_0x10a9ca(0x140)]??_0x10a9ca(0x181)+_0x5ecec8[_0x10a9ca(0x188)]};}function execUpgradeSdk(_0xad293f){const _0x358f14=a173_0x1421ab;if(!_0xad293f[_0x358f14(0x168)])return{'step':0x7,'label':_0x358f14(0x169),'ok':!![],'detail':_0x358f14(0x166)};const {pkgPath:_0x50e1e7,currentVersion:_0x307675,field:_0x476824}=_0xad293f['sdkUpgrade'];try{const _0x37c152=readFileSync(_0x50e1e7,_0x358f14(0x16a)),_0x355eaf=JSON[_0x358f14(0x190)](_0x37c152);return _0x355eaf[_0x476824][_0x358f14(0x152)]=_0x358f14(0x14b),writeFileSync(_0x50e1e7,JSON[_0x358f14(0x12e)](_0x355eaf,null,0x2)+'\x0a',_0x358f14(0x16a)),{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0x476824+_0x358f14(0x139)+_0x307675+_0x358f14(0x136)};}catch(_0x4b79e5){return{'step':0x7,'label':_0x358f14(0x169),'ok':![],'detail':_0x4b79e5['message']};}}function tryStat(_0x3a34c9){try{return statSync(_0x3a34c9);}catch{return undefined;}}function printSummary(_0xdb28f4){const _0x2f7386=a173_0x1421ab;console[_0x2f7386(0x17e)](''),console['log'](a173_0x465c40['bold'](_0x2f7386(0x159))),console[_0x2f7386(0x17e)]('');for(const _0xe26325 of _0xdb28f4){const _0x1634df=_0xe26325['ok']?a173_0x465c40['green']('OK'):a173_0x465c40[_0x2f7386(0x1b0)](_0x2f7386(0x16b));console[_0x2f7386(0x17e)]('\x20\x20'+_0x1634df+_0x2f7386(0x19d)+_0xe26325[_0x2f7386(0x178)]+':\x20'+_0xe26325[_0x2f7386(0x13d)]);if(_0xe26325[_0x2f7386(0x16d)])console['log'](_0x2f7386(0x172)+a173_0x465c40[_0x2f7386(0x135)](_0xe26325[_0x2f7386(0x16d)]));}console['log']('');}export async function upgradeApp(_0x3ad49c,_0x17cbe6){const _0x2e5cc4=a173_0x1421ab,_0x521342=process[_0x2e5cc4(0x148)](),_0xe0d880=analyse(_0x521342),_0x20eb7f=!_0xe0d880[_0x2e5cc4(0x18e)]&&_0xe0d880[_0x2e5cc4(0x15c)]['length']===0x0&&!_0xe0d880[_0x2e5cc4(0x1a2)]&&!_0xe0d880['needsSkillSwap']&&!_0xe0d880[_0x2e5cc4(0x168)];if(_0x20eb7f){console[_0x2e5cc4(0x17e)](a173_0x465c40[_0x2e5cc4(0x182)](_0x2e5cc4(0x19b)));return;}printReport(_0xe0d880);const _0x1be0c1=!!(_0x17cbe6[_0x2e5cc4(0x1a1)]||_0x17cbe6['Y']||_0x3ad49c);if(!_0x1be0c1)try{const _0x504561=await askConfirm('Proceed\x20with\x20upgrade?');if(!_0x504561){console[_0x2e5cc4(0x17e)](a173_0x465c40[_0x2e5cc4(0x135)](_0x2e5cc4(0x196)));return;}}catch(_0x2c27f5){if(_0x2c27f5?.[_0x2e5cc4(0x15a)]===_0x2e5cc4(0x133)){console[_0x2e5cc4(0x17e)](a173_0x465c40[_0x2e5cc4(0x135)]('Upgrade\x20cancelled.'));return;}throw _0x2c27f5;}const _0x368903=[],_0x4cfc32=a173_0x9eba5e({'text':'Step\x201/7:\x20Migrating\x20config...','color':'cyan'})[_0x2e5cc4(0x14d)](),_0x1dd371=execConfigMigration(_0xe0d880,_0x521342);_0x368903[_0x2e5cc4(0x1a3)](_0x1dd371),_0x4cfc32[_0x1dd371['ok']?'succeed':_0x2e5cc4(0x132)](_0x2e5cc4(0x14f)+(_0x1dd371['detail']??(_0x1dd371['ok']?_0x2e5cc4(0x175):_0x2e5cc4(0x14a))));const _0xae779d=resolve(_0x521342,'.lovrabet'),_0x820f54=a173_0x9eba5e({'text':_0x2e5cc4(0x189),'color':'cyan'})[_0x2e5cc4(0x14d)]();if(existsSync(_0xae779d))try{rmSync(_0xae779d,{'recursive':!![],'force':!![]}),_0x820f54[_0x2e5cc4(0x167)]('Step\x202/7:\x20.lovrabet/\x20directory\x20removed'),_0x368903[_0x2e5cc4(0x1a3)]({'step':0x2,'label':_0x2e5cc4(0x16f),'ok':!![]});}catch(_0x29062d){_0x820f54[_0x2e5cc4(0x132)]('Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0x29062d[_0x2e5cc4(0x15a)]),_0x368903[_0x2e5cc4(0x1a3)]({'step':0x2,'label':_0x2e5cc4(0x16f),'ok':![],'detail':_0x29062d[_0x2e5cc4(0x15a)]});}else _0x820f54[_0x2e5cc4(0x15b)](_0x2e5cc4(0x15f)),_0x368903[_0x2e5cc4(0x1a3)]({'step':0x2,'label':_0x2e5cc4(0x16f),'ok':!![],'detail':_0x2e5cc4(0x1a5)});const _0x2b7e01=a173_0x9eba5e({'text':_0x2e5cc4(0x17b),'color':_0x2e5cc4(0x17d)})[_0x2e5cc4(0x14d)](),_0x3314b7=execRemoveOldArtifacts(_0xe0d880[_0x2e5cc4(0x15c)]);_0x368903[_0x2e5cc4(0x1a3)](_0x3314b7),_0x2b7e01[_0x3314b7['ok']?_0x2e5cc4(0x167):_0x2e5cc4(0x132)](_0x2e5cc4(0x17c)+(_0x3314b7['detail']??(_0x3314b7['ok']?_0x2e5cc4(0x175):'failed')));const _0x18501d=a173_0x9eba5e({'text':'Step\x204/7:\x20Cleaning\x20MCP\x20config...','color':_0x2e5cc4(0x17d)})['start'](),_0x1ef283=execCleanMcp(_0xe0d880);_0x368903['push'](_0x1ef283),_0x18501d[_0x1ef283['ok']?'succeed':_0x2e5cc4(0x132)]('Step\x204/7:\x20MCP\x20config\x20—\x20'+(_0x1ef283[_0x2e5cc4(0x16d)]??(_0x1ef283['ok']?'done':_0x2e5cc4(0x14a))));const _0x3284a4=a173_0x9eba5e({'text':_0x2e5cc4(0x18f),'color':'cyan'})[_0x2e5cc4(0x14d)](),_0x207ca5=execSkillsRemove(_0x521342,_0x1be0c1);_0x368903[_0x2e5cc4(0x1a3)](_0x207ca5),_0x3284a4[_0x207ca5['ok']?_0x2e5cc4(0x167):'fail'](_0x2e5cc4(0x15e)+(_0x207ca5[_0x2e5cc4(0x16d)]??(_0x207ca5['ok']?'done':_0x2e5cc4(0x14a))));const _0x5e9662=a173_0x9eba5e({'text':_0x2e5cc4(0x186),'color':_0x2e5cc4(0x17d)})[_0x2e5cc4(0x14d)](),_0x2bcd34=execSkillsAdd(_0x521342,_0x1be0c1);_0x368903[_0x2e5cc4(0x1a3)](_0x2bcd34),_0x5e9662[_0x2bcd34['ok']?_0x2e5cc4(0x167):_0x2e5cc4(0x132)](_0x2e5cc4(0x162)+(_0x2bcd34['detail']??(_0x2bcd34['ok']?_0x2e5cc4(0x175):_0x2e5cc4(0x14a))));const _0x30b3fc=a173_0x9eba5e({'text':_0x2e5cc4(0x142),'color':_0x2e5cc4(0x17d)})[_0x2e5cc4(0x14d)](),_0x316cd6=execUpgradeSdk(_0xe0d880);_0x368903[_0x2e5cc4(0x1a3)](_0x316cd6),_0x30b3fc[_0x316cd6['ok']?_0x2e5cc4(0x167):_0x2e5cc4(0x132)](_0x2e5cc4(0x155)+(_0x316cd6[_0x2e5cc4(0x16d)]??(_0x316cd6['ok']?_0x2e5cc4(0x175):_0x2e5cc4(0x14a)))),printSummary(_0x368903);const _0x205d2e=_0x368903['some'](_0x151b0e=>!_0x151b0e['ok']);_0x205d2e?console[_0x2e5cc4(0x17e)](a173_0x465c40[_0x2e5cc4(0x16e)](_0x2e5cc4(0x199))):console[_0x2e5cc4(0x17e)](a173_0x465c40[_0x2e5cc4(0x182)](_0x2e5cc4(0x1ab))),_0x316cd6['ok']&&_0xe0d880[_0x2e5cc4(0x168)]&&(console[_0x2e5cc4(0x17e)](''),console[_0x2e5cc4(0x17e)](a173_0x465c40[_0x2e5cc4(0x146)][_0x2e5cc4(0x17d)](_0x2e5cc4(0x1a4))),console[_0x2e5cc4(0x17e)](a173_0x465c40[_0x2e5cc4(0x17d)](_0x2e5cc4(0x195))),console[_0x2e5cc4(0x17e)](''),console[_0x2e5cc4(0x17e)](a173_0x465c40[_0x2e5cc4(0x1aa)](_0x2e5cc4(0x1ae))),console['log'](a173_0x465c40[_0x2e5cc4(0x1aa)](_0x2e5cc4(0x185))),console[_0x2e5cc4(0x17e)](a173_0x465c40['white'](_0x2e5cc4(0x1ac))),console[_0x2e5cc4(0x17e)](''));}
@@ -1 +1 @@
1
- const a174_0xe5461c=a174_0x53f3;(function(_0x33edea,_0x399a60){const _0x4e4e58=a174_0x53f3,_0x5c2981=_0x33edea();while(!![]){try{const _0x88d4e2=-parseInt(_0x4e4e58(0xe6))/0x1*(-parseInt(_0x4e4e58(0xa9))/0x2)+-parseInt(_0x4e4e58(0xce))/0x3+-parseInt(_0x4e4e58(0xd7))/0x4+-parseInt(_0x4e4e58(0xc3))/0x5+parseInt(_0x4e4e58(0xb2))/0x6+parseInt(_0x4e4e58(0xd9))/0x7+-parseInt(_0x4e4e58(0xdc))/0x8*(-parseInt(_0x4e4e58(0xd3))/0x9);if(_0x88d4e2===_0x399a60)break;else _0x5c2981['push'](_0x5c2981['shift']());}catch(_0x51b98e){_0x5c2981['push'](_0x5c2981['shift']());}}}(a174_0x3487,0x3ad0b));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{tenantDefinitions}from'../commands/tenant/index.js';import{roleDefinitions}from'../commands/role/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/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{userAccountDefinitions}from'../commands/user-account/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x2d9129){const _0x5f5454=a174_0x53f3;for(const _0x40ac8c of _0x2d9129){definitions[_0x5f5454(0xe5)](_0x40ac8c[_0x5f5454(0xc5)]+':'+_0x40ac8c[_0x5f5454(0xea)],_0x40ac8c);let _0x3d8879=serviceGroups[_0x5f5454(0xab)](_0x40ac8c[_0x5f5454(0xc5)]);!_0x3d8879&&(_0x3d8879=[],serviceGroups[_0x5f5454(0xe5)](_0x40ac8c[_0x5f5454(0xc5)],_0x3d8879)),_0x3d8879[_0x5f5454(0xf8)](_0x40ac8c);}}function registerDeclarativeService(_0x3801e8,_0x298abd,_0x119fb4){const _0x4fcd5b=a174_0x53f3;registerDefinitions(_0x298abd);_0x119fb4?.[_0x4fcd5b(0xbb)]&&registerDefinitions([_0x119fb4[_0x4fcd5b(0xbb)]]);const _0x163925=_0x23aa8f=>_0x23aa8f===_0x4fcd5b(0xa7)?'':_0x23aa8f===_0x4fcd5b(0xd8)?_0x4fcd5b(0xe2):_0x4fcd5b(0xcd),_0x8ab84f={'service':_0x298abd[0x0][_0x4fcd5b(0xc5)],'label':_0x3801e8,'commands':_0x298abd[_0x4fcd5b(0xb7)](_0x229294=>!_0x229294[_0x4fcd5b(0xfd)])[_0x4fcd5b(0x9d)](_0x4f7b0c=>({'command':_0x4f7b0c[_0x4fcd5b(0xea)],'description':_0x4f7b0c['description'],'tag':_0x163925(_0x4f7b0c[_0x4fcd5b(0x96)])})),'declarative':!![],'defaultCommand':_0x119fb4?.[_0x4fcd5b(0xdb)]??(_0x119fb4?.[_0x4fcd5b(0xc9)]?_0x298abd[0x0][_0x4fcd5b(0xea)]:undefined),'wildcardDef':_0x119fb4?.[_0x4fcd5b(0xbb)],'isSingleCommand':_0x119fb4?.[_0x4fcd5b(0xc9)]};serviceRegistry['push'](_0x8ab84f),serviceByName['set'](_0x8ab84f[_0x4fcd5b(0xc5)],_0x8ab84f);}registerDeclarativeService(a174_0xe5461c(0xf6),initDefinitions,{'defaultCommand':a174_0xe5461c(0xa1),'isSingleCommand':!![]}),registerDeclarativeService(a174_0xe5461c(0xb3),projectDefinitions),registerDeclarativeService(a174_0xe5461c(0xbf),workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a174_0xe5461c(0x9f),authDefinitions,{'defaultCommand':'login'}),registerDeclarativeService(a174_0xe5461c(0xed),tenantDefinitions),registerDeclarativeService(a174_0xe5461c(0xde),userAccountDefinitions),registerDeclarativeService(a174_0xe5461c(0xe0),datasetDefinitions),registerDeclarativeService('Data\x20List\x20Pages\x20&\x20Custom\x20Pages',pageDefinitions),registerDeclarativeService(a174_0xe5461c(0xac),apiDefinitions),registerDeclarativeService('Instant\x20API',dataDefinitions),registerDeclarativeService('Backend\x20Function\x20Scripts',bffDefinitions),registerDeclarativeService(a174_0xe5461c(0xda),notificationDefinitions),registerDeclarativeService(a174_0xe5461c(0xe9),sqlDefinitions),registerDeclarativeService(a174_0xe5461c(0xb1),dbDefinitions),registerDeclarativeService(a174_0xe5461c(0x9a),menuDefinitions),registerDeclarativeService(a174_0xe5461c(0xc1),taskDefinitions),registerDeclarativeService(a174_0xe5461c(0xbe),roleDefinitions),registerDeclarativeService(a174_0xe5461c(0xba),appConfigDefinitions),registerDeclarativeService(a174_0xe5461c(0xbc),kbDefinitions),registerDeclarativeService(a174_0xe5461c(0xf1),issueDefinitions),registerDeclarativeService('File',fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService(a174_0xe5461c(0xd5),codegenDefinitions),registerDeclarativeService(a174_0xe5461c(0x9e),configDefinitions),registerDeclarativeService(a174_0xe5461c(0xcc),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a174_0xe5461c(0xb8),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':a174_0xe5461c(0xaf)}),registerDeclarativeService(a174_0xe5461c(0xdf),logsDefinitions,{'defaultCommand':'show'}),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a174_0xe5461c(0x100)]-0x1];last[a174_0xe5461c(0xdd)]=[{'command':a174_0xe5461c(0xe3),'description':'Run\x20any\x20package.json\x20script','tag':a174_0xe5461c(0x9c)+runDefinition[a174_0xe5461c(0x96)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a174_0xe5461c(0xd1),'rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml'],['bff:new',a174_0xe5461c(0xcf)],[a174_0xe5461c(0xb4),a174_0xe5461c(0xeb)],[a174_0xe5461c(0xc7),a174_0xe5461c(0xc6)],[a174_0xe5461c(0xa8),a174_0xe5461c(0xd6)],[a174_0xe5461c(0xb9),a174_0xe5461c(0xd2)],['skill:install','rabetbase\x20cli-skill\x20install'],[a174_0xe5461c(0xef),a174_0xe5461c(0xd2)],[a174_0xe5461c(0xe7),a174_0xe5461c(0xd2)],[a174_0xe5461c(0xb5),'rabetbase\x20app\x20list\x20--remote'],[a174_0xe5461c(0xec),'rabetbase\x20workspace\x20use\x20--app\x20<name>'],[a174_0xe5461c(0xa0),a174_0xe5461c(0x99)],[a174_0xe5461c(0xad),a174_0xe5461c(0xf0)],['knowledge-base:list',a174_0xe5461c(0x9b)],[a174_0xe5461c(0xd0),'rabetbase\x20kb\x20detail'],[a174_0xe5461c(0xfa),'rabetbase\x20kb\x20create'],['knowledge-base:update',a174_0xe5461c(0xfc)],[a174_0xe5461c(0xa2),a174_0xe5461c(0xc0)],[a174_0xe5461c(0xd4),a174_0xe5461c(0xc2)],['page:standard-page-status',a174_0xe5461c(0xa6)],['page:react-create','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK'],[a174_0xe5461c(0xf3),a174_0xe5461c(0x101)],[a174_0xe5461c(0xfb),a174_0xe5461c(0xaa)],[a174_0xe5461c(0xb0),a174_0xe5461c(0xbd)],[a174_0xe5461c(0xae),'rabetbase\x20page\x20custom-update'],[a174_0xe5461c(0xe8),a174_0xe5461c(0xf2)]]),REMOVED_COMMAND_HINTS=new Map([[a174_0xe5461c(0xc4),a174_0xe5461c(0xa5)],[a174_0xe5461c(0xc8),a174_0xe5461c(0xa5)],[a174_0xe5461c(0xe1),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],['permit:role-menus-set',a174_0xe5461c(0xa5)],[a174_0xe5461c(0xe4),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.']]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a174_0xe5461c(0xf9),'rabetbase\x20project\x20create\x20<project-name>'],[a174_0xe5461c(0xee),a174_0xe5461c(0xa4)],[a174_0xe5461c(0xf4),a174_0xe5461c(0xfe)],[a174_0xe5461c(0xf5),'rabetbase\x20run\x20preview'],[a174_0xe5461c(0x98),a174_0xe5461c(0xf7)]]);function a174_0x53f3(_0x3ca761,_0x134b19){_0x3ca761=_0x3ca761-0x96;const _0x348771=a174_0x3487();let _0x53f3fd=_0x348771[_0x3ca761];return _0x53f3fd;}export function resolveRemovedCommand(_0x5dbc5c,_0x22594c){const _0x2a2d2e=a174_0xe5461c;if(!_0x5dbc5c)return undefined;const _0xeeae9a=REMOVED_COMMAND_REPLACEMENTS[_0x2a2d2e(0xab)](_0x5dbc5c+':'+(_0x22594c??'')),_0x323474=REMOVED_FLAT_COMMAND_REPLACEMENTS['get'](_0x5dbc5c),_0xf89eb2=_0xeeae9a??_0x323474,_0x147a70=REMOVED_COMMAND_HINTS['get'](_0x5dbc5c+':'+(_0x22594c??''));if(!_0xf89eb2&&!_0x147a70)return undefined;const _0x460bc8=_0x323474?_0x5dbc5c:_0x22594c?_0x5dbc5c+'\x20'+_0x22594c:_0x5dbc5c;return{'command':_0x460bc8,'message':'`rabetbase\x20'+_0x460bc8+_0x2a2d2e(0xff),'hint':_0x147a70??_0x2a2d2e(0x97)+_0xf89eb2+_0x2a2d2e(0xcb)};}export function findDefinition(_0x227282,_0x48b5a0){const _0x2126d7=a174_0xe5461c;return definitions[_0x2126d7(0xab)](_0x227282+':'+_0x48b5a0);}function a174_0x3487(){const _0x123b95=['User\x20Accounts','Logs','Dataset\x20&\x20Operations','permit:role-menus','\x20\x20[write]','<script>','permit:role-apis-set','set','1jeQmNt','skills:install','page:react-publish','SQL\x20Queries','command','rabetbase\x20sql\x20create','app:use','Tenant\x20Members','start','skills:','rabetbase\x20workspace\x20remove\x20<name>','Platform\x20Issue','rabetbase\x20page\x20custom-publish','page:custom-create','build','preview','Quick\x20Start','rabetbase\x20auth\x20logout','push','create','knowledge-base:create','page:react-list','rabetbase\x20kb\x20update','hidden','rabetbase\x20run\x20build','`\x20has\x20been\x20removed.','length','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','risk','Use\x20`','logout','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','Menu','rabetbase\x20kb\x20list','\x20\x20[','map','Configuration','Authentication','app:add','run','knowledge-base:delete','from','rabetbase\x20run\x20start','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','rabetbase\x20page\x20data-list-status','read','project:init','211168vfJAVo','rabetbase\x20page\x20custom-list','get','API\x20Development','app:remove','page:react-update','install','page:react-detail','Database\x20Connections','150462vjkDBD','Project','sql:new','app:remote','has','filter','Schema','skill:','Runtime\x20App\x20Config\x20Management','wildcardDef','Company\x20Knowledge\x20Base','rabetbase\x20page\x20custom-detail','Roles','Workspace','rabetbase\x20kb\x20delete','Async\x20Tasks','rabetbase\x20role\x20list','335045EZncYw','permit:page-get','service','rabetbase\x20menu\x20asset-update','menu:update','permit:page-set','isSingleCommand','values','`\x20instead.','Diagnostics','\x20\x20[high-risk-write]','568218HhMNjL','rabetbase\x20bff\x20create','knowledge-base:detail','sql:save','rabetbase\x20cli-skill\x20install','9KOyctR','role:create','Code\x20Generation','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','721016WdoznE','write','507766zwVIkg','Notification\x20Configuration','defaultCommand','3795016AKZPPb','commands'];a174_0x3487=function(){return _0x123b95;};return a174_0x3487();}export function isKnownService(_0x4db65f){const _0x55b674=a174_0xe5461c;return serviceByName[_0x55b674(0xb6)](_0x4db65f);}export function isDeclarativeService(_0x540611){const _0x2fec21=a174_0xe5461c;return serviceGroups[_0x2fec21(0xb6)](_0x540611)||serviceByName[_0x2fec21(0xab)](_0x540611)?.['wildcardDef']!==undefined;}export function getServiceEntry(_0x2cdc84){const _0x516ca0=a174_0xe5461c;return serviceByName[_0x516ca0(0xab)](_0x2cdc84);}export function getLegacyHandler(_0x1fd3a0,_0x5b283a){return undefined;}export function getAllDefinitions(){const _0x23accc=a174_0xe5461c;return Array[_0x23accc(0xa3)](definitions[_0x23accc(0xca)]());}
1
+ const a174_0x374468=a174_0x29b9;(function(_0xb19b1c,_0x15fa5c){const _0x1b525c=a174_0x29b9,_0x3690f0=_0xb19b1c();while(!![]){try{const _0xb130a=parseInt(_0x1b525c(0xe0))/0x1+-parseInt(_0x1b525c(0xeb))/0x2+-parseInt(_0x1b525c(0xe1))/0x3+parseInt(_0x1b525c(0x11c))/0x4+parseInt(_0x1b525c(0x139))/0x5+-parseInt(_0x1b525c(0xf4))/0x6+parseInt(_0x1b525c(0x108))/0x7;if(_0xb130a===_0x15fa5c)break;else _0x3690f0['push'](_0x3690f0['shift']());}catch(_0x30e3dc){_0x3690f0['push'](_0x3690f0['shift']());}}}(a174_0x1c57,0x95cfe));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{tenantDefinitions}from'../commands/tenant/index.js';import{roleDefinitions}from'../commands/role/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';function a174_0x29b9(_0x2595b7,_0x26707c){_0x2595b7=_0x2595b7-0xdb;const _0x1c5742=a174_0x1c57();let _0x29b9dd=_0x1c5742[_0x2595b7];return _0x29b9dd;}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{userAccountDefinitions}from'../commands/user-account/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/index.js';import{runDefinition}from'../commands/run/index.js';function a174_0x1c57(){const _0x134351=['Use\x20`','Instant\x20API','permit:role-menus','OCR','knowledge-base:detail','app:add','Project','skills:install','5163662ejFTRg','Notification\x20Configuration','Code\x20Generation','`\x20has\x20been\x20removed.','permit:page-get','CLI\x20Built-in\x20Skill','wildcardDef','role:create','write','logout','run','page:react-create','rabetbase\x20page\x20data-list-status','isSingleCommand','\x20\x20[high-risk-write]','push','rabetbase\x20page\x20custom-detail','App\x20Management','menu:update','sql:save','3072752jBvXzS','permit:role-apis-set','knowledge-base:create','rabetbase\x20page\x20custom-update','Database\x20Connections','map','page:react-detail','rabetbase\x20workspace\x20use\x20--app\x20<name>','File','project:init','page:react-publish','permit:role-menus-set','app:remote','Async\x20Tasks','User\x20Accounts','Platform\x20Issue','Tenant\x20Members','has','<script>','rabetbase\x20kb\x20detail','Diagnostics','skills:','set','Workspace','Configuration','`rabetbase\x20','Run\x20any\x20package.json\x20script','rabetbase\x20workspace\x20remove\x20<name>','permit:page-set','4229230DdGvJY','\x20\x20[','risk','API\x20Development','length','defaultCommand','SQL\x20Queries','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','filter','`\x20instead.','install','rabetbase\x20cli-skill\x20install','page:standard-page-status','Authentication','sql:new','Menu','build','hidden','375028qUVALN','3010593WolcJN','get','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','description','rabetbase\x20page\x20custom-list','read','service','values','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','skill:install','2193134vTmCAB','preview','rabetbase\x20auth\x20logout','Schema','\x20\x20[write]','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','rabetbase\x20run\x20build','rabetbase\x20menu\x20asset-update','78000FlHLop','knowledge-base:delete','knowledge-base:update','Self\x20Update','rabetbase\x20kb\x20delete','command','login','Logs','Run\x20Scripts','rabetbase\x20app\x20list\x20--remote','rabetbase\x20kb\x20update','page:custom-create'];a174_0x1c57=function(){return _0x134351;};return a174_0x1c57();}export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x2dae84){const _0x4ca7bb=a174_0x29b9;for(const _0x87e444 of _0x2dae84){definitions[_0x4ca7bb(0x132)](_0x87e444[_0x4ca7bb(0xe7)]+':'+_0x87e444[_0x4ca7bb(0xf9)],_0x87e444);let _0x1c99b8=serviceGroups[_0x4ca7bb(0xe2)](_0x87e444[_0x4ca7bb(0xe7)]);!_0x1c99b8&&(_0x1c99b8=[],serviceGroups['set'](_0x87e444[_0x4ca7bb(0xe7)],_0x1c99b8)),_0x1c99b8['push'](_0x87e444);}}function registerDeclarativeService(_0x542bc7,_0xc557c8,_0x54ee8f){const _0x4531b8=a174_0x29b9;registerDefinitions(_0xc557c8);_0x54ee8f?.['wildcardDef']&&registerDefinitions([_0x54ee8f[_0x4531b8(0x10e)]]);const _0x40b78d=_0x521f9a=>_0x521f9a===_0x4531b8(0xe6)?'':_0x521f9a===_0x4531b8(0x110)?_0x4531b8(0xef):_0x4531b8(0x116),_0x2c9823={'service':_0xc557c8[0x0][_0x4531b8(0xe7)],'label':_0x542bc7,'commands':_0xc557c8[_0x4531b8(0x141)](_0x245cb5=>!_0x245cb5[_0x4531b8(0xdf)])[_0x4531b8(0x121)](_0x50e0fc=>({'command':_0x50e0fc[_0x4531b8(0xf9)],'description':_0x50e0fc[_0x4531b8(0xe4)],'tag':_0x40b78d(_0x50e0fc[_0x4531b8(0x13b)])})),'declarative':!![],'defaultCommand':_0x54ee8f?.[_0x4531b8(0x13e)]??(_0x54ee8f?.['isSingleCommand']?_0xc557c8[0x0][_0x4531b8(0xf9)]:undefined),'wildcardDef':_0x54ee8f?.[_0x4531b8(0x10e)],'isSingleCommand':_0x54ee8f?.[_0x4531b8(0x115)]};serviceRegistry[_0x4531b8(0x117)](_0x2c9823),serviceByName[_0x4531b8(0x132)](_0x2c9823[_0x4531b8(0xe7)],_0x2c9823);}registerDeclarativeService('Quick\x20Start',initDefinitions,{'defaultCommand':a174_0x374468(0x112),'isSingleCommand':!![]}),registerDeclarativeService(a174_0x374468(0x106),projectDefinitions),registerDeclarativeService(a174_0x374468(0x133),workspaceDefinitions),registerDeclarativeService(a174_0x374468(0x119),appDefinitions),registerDeclarativeService(a174_0x374468(0xdb),authDefinitions,{'defaultCommand':a174_0x374468(0xfa)}),registerDeclarativeService(a174_0x374468(0x12c),tenantDefinitions),registerDeclarativeService(a174_0x374468(0x12a),userAccountDefinitions),registerDeclarativeService('Dataset\x20&\x20Operations',datasetDefinitions),registerDeclarativeService('Data\x20List\x20Pages\x20&\x20Custom\x20Pages',pageDefinitions),registerDeclarativeService(a174_0x374468(0x13c),apiDefinitions),registerDeclarativeService(a174_0x374468(0x101),dataDefinitions),registerDeclarativeService('Backend\x20Function\x20Scripts',bffDefinitions),registerDeclarativeService(a174_0x374468(0x109),notificationDefinitions),registerDeclarativeService(a174_0x374468(0x13f),sqlDefinitions),registerDeclarativeService(a174_0x374468(0x120),dbDefinitions),registerDeclarativeService(a174_0x374468(0xdd),menuDefinitions),registerDeclarativeService(a174_0x374468(0x129),taskDefinitions),registerDeclarativeService('Roles',roleDefinitions),registerDeclarativeService('Runtime\x20App\x20Config\x20Management',appConfigDefinitions),registerDeclarativeService('Company\x20Knowledge\x20Base',kbDefinitions),registerDeclarativeService(a174_0x374468(0x12b),issueDefinitions),registerDeclarativeService(a174_0x374468(0x124),fileDefinitions),registerDeclarativeService(a174_0x374468(0x103),ocrDefinitions),registerDeclarativeService(a174_0x374468(0x10a),codegenDefinitions),registerDeclarativeService(a174_0x374468(0x134),configDefinitions),registerDeclarativeService(a174_0x374468(0x130),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a174_0x374468(0xee),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a174_0x374468(0xf7),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a174_0x374468(0x10d),cliSkillDefinitions,{'defaultCommand':a174_0x374468(0x143)}),registerDeclarativeService(a174_0x374468(0xfb),logsDefinitions,{'defaultCommand':'show'}),registerDeclarativeService(a174_0x374468(0xfc),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a174_0x374468(0x13d)]-0x1];last['commands']=[{'command':a174_0x374468(0x12e),'description':a174_0x374468(0x136),'tag':a174_0x374468(0x13a)+runDefinition[a174_0x374468(0x13b)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a174_0x374468(0x11b),a174_0x374468(0x140)],['bff:new','rabetbase\x20bff\x20create'],[a174_0x374468(0xdc),'rabetbase\x20sql\x20create'],[a174_0x374468(0x11a),a174_0x374468(0xf3)],[a174_0x374468(0x125),a174_0x374468(0xf1)],['skill:',a174_0x374468(0x144)],[a174_0x374468(0xea),a174_0x374468(0x144)],[a174_0x374468(0x131),'rabetbase\x20cli-skill\x20install'],[a174_0x374468(0x107),a174_0x374468(0x144)],[a174_0x374468(0x128),a174_0x374468(0xfd)],['app:use',a174_0x374468(0x123)],[a174_0x374468(0x105),a174_0x374468(0xf0)],['app:remove',a174_0x374468(0x137)],['knowledge-base:list','rabetbase\x20kb\x20list'],[a174_0x374468(0x104),a174_0x374468(0x12f)],[a174_0x374468(0x11e),'rabetbase\x20kb\x20create'],[a174_0x374468(0xf6),a174_0x374468(0xfe)],[a174_0x374468(0xf5),a174_0x374468(0xf8)],[a174_0x374468(0x10f),'rabetbase\x20role\x20list'],[a174_0x374468(0x145),a174_0x374468(0x114)],[a174_0x374468(0x113),a174_0x374468(0xe3)],[a174_0x374468(0xff),a174_0x374468(0xe3)],['page:react-list',a174_0x374468(0xe5)],[a174_0x374468(0x122),a174_0x374468(0x118)],['page:react-update',a174_0x374468(0x11f)],[a174_0x374468(0x126),'rabetbase\x20page\x20custom-publish']]),REMOVED_COMMAND_HINTS=new Map([[a174_0x374468(0x10c),a174_0x374468(0xe9)],[a174_0x374468(0x138),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a174_0x374468(0x102),a174_0x374468(0xe9)],[a174_0x374468(0x127),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a174_0x374468(0x11d),a174_0x374468(0xe9)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([['create','rabetbase\x20project\x20create\x20<project-name>'],['start','rabetbase\x20run\x20start'],[a174_0x374468(0xde),a174_0x374468(0xf2)],[a174_0x374468(0xec),'rabetbase\x20run\x20preview'],[a174_0x374468(0x111),a174_0x374468(0xed)]]);export function resolveRemovedCommand(_0x32ae96,_0x134a37){const _0x55c5a5=a174_0x374468;if(!_0x32ae96)return undefined;const _0x219e26=REMOVED_COMMAND_REPLACEMENTS['get'](_0x32ae96+':'+(_0x134a37??'')),_0x37ff00=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x55c5a5(0xe2)](_0x32ae96),_0xcc921a=_0x219e26??_0x37ff00,_0x3332d0=REMOVED_COMMAND_HINTS[_0x55c5a5(0xe2)](_0x32ae96+':'+(_0x134a37??''));if(!_0xcc921a&&!_0x3332d0)return undefined;const _0x2dcc81=_0x37ff00?_0x32ae96:_0x134a37?_0x32ae96+'\x20'+_0x134a37:_0x32ae96;return{'command':_0x2dcc81,'message':_0x55c5a5(0x135)+_0x2dcc81+_0x55c5a5(0x10b),'hint':_0x3332d0??_0x55c5a5(0x100)+_0xcc921a+_0x55c5a5(0x142)};}export function findDefinition(_0x222ed0,_0x5dad61){const _0x2a0ff2=a174_0x374468;return definitions[_0x2a0ff2(0xe2)](_0x222ed0+':'+_0x5dad61);}export function isKnownService(_0xbc3124){const _0x2e5c5c=a174_0x374468;return serviceByName[_0x2e5c5c(0x12d)](_0xbc3124);}export function isDeclarativeService(_0x4fa6d9){const _0x571e3b=a174_0x374468;return serviceGroups['has'](_0x4fa6d9)||serviceByName[_0x571e3b(0xe2)](_0x4fa6d9)?.[_0x571e3b(0x10e)]!==undefined;}export function getServiceEntry(_0x14effc){const _0x4d5541=a174_0x374468;return serviceByName[_0x4d5541(0xe2)](_0x14effc);}export function getLegacyHandler(_0x8e82d1,_0xbf56f9){return undefined;}export function getAllDefinitions(){const _0x4b8fa2=a174_0x374468;return Array['from'](definitions[_0x4b8fa2(0xe8)]());}