@lovrabet/rabetbase-cli 2.5.2-beta.6 → 2.5.2

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 (322) 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/api/generate-sdk-config-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/delete.js +1 -1
  53. package/lib/commands/config/get.js +1 -1
  54. package/lib/commands/config/index.js +1 -1
  55. package/lib/commands/config/init.js +1 -1
  56. package/lib/commands/config/list.js +1 -1
  57. package/lib/commands/config/set.js +1 -1
  58. package/lib/commands/config/shared.js +1 -1
  59. package/lib/commands/dataset/business-group-update.js +1 -1
  60. package/lib/commands/dataset/business-groups.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-restore.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/dataset/user-deleted-field-list.js +1 -1
  80. package/lib/commands/db/analysis-batching.js +1 -1
  81. package/lib/commands/db/analyze-batch-plan.js +1 -1
  82. package/lib/commands/db/analyze-cancel.js +1 -1
  83. package/lib/commands/db/analyze-start.js +1 -1
  84. package/lib/commands/db/analyze-status.js +1 -1
  85. package/lib/commands/db/create.js +1 -1
  86. package/lib/commands/db/delete.js +1 -1
  87. package/lib/commands/db/detail.js +1 -1
  88. package/lib/commands/db/diff-refresh-start.js +1 -1
  89. package/lib/commands/db/diff-refresh-status.js +1 -1
  90. package/lib/commands/db/diff.js +1 -1
  91. package/lib/commands/db/index.js +1 -1
  92. package/lib/commands/db/list.js +1 -1
  93. package/lib/commands/db/shared.js +1 -1
  94. package/lib/commands/db/table-diff-shared.js +1 -1
  95. package/lib/commands/db/tables.js +1 -1
  96. package/lib/commands/db/test.js +1 -1
  97. package/lib/commands/db/update.js +1 -1
  98. package/lib/commands/deployment/index.js +1 -1
  99. package/lib/commands/deployment/sync-all.js +1 -1
  100. package/lib/commands/deployment/sync-jobs.js +1 -1
  101. package/lib/commands/deployment/sync-status.js +1 -1
  102. package/lib/commands/doctor.js +1 -1
  103. package/lib/commands/file/index.js +1 -1
  104. package/lib/commands/instant-api-policy/current.js +1 -1
  105. package/lib/commands/instant-api-policy/index.js +1 -1
  106. package/lib/commands/instant-api-policy/init.js +1 -1
  107. package/lib/commands/instant-api-policy/publish.js +1 -1
  108. package/lib/commands/instant-api-policy/pull.js +1 -1
  109. package/lib/commands/instant-api-policy/revision.js +1 -1
  110. package/lib/commands/instant-api-policy/revisions.js +1 -1
  111. package/lib/commands/instant-api-policy/rollback.js +1 -1
  112. package/lib/commands/instant-api-policy/shared.js +1 -1
  113. package/lib/commands/instant-api-policy/validate.js +1 -1
  114. package/lib/commands/issue/index.js +1 -1
  115. package/lib/commands/issue/nudge.js +1 -1
  116. package/lib/commands/issue/report.js +1 -1
  117. package/lib/commands/issue/shared.js +1 -1
  118. package/lib/commands/kb/create.js +1 -1
  119. package/lib/commands/kb/delete.js +1 -1
  120. package/lib/commands/kb/detail.js +1 -1
  121. package/lib/commands/kb/index.js +1 -1
  122. package/lib/commands/kb/list.js +1 -1
  123. package/lib/commands/kb/search.js +1 -1
  124. package/lib/commands/kb/shared.js +1 -1
  125. package/lib/commands/kb/update.js +1 -1
  126. package/lib/commands/logs/index.js +1 -1
  127. package/lib/commands/menu/asset-update.js +1 -1
  128. package/lib/commands/menu/delete.js +1 -1
  129. package/lib/commands/menu/external-link-create.js +1 -1
  130. package/lib/commands/menu/external-link-update.js +1 -1
  131. package/lib/commands/menu/group-create.js +1 -1
  132. package/lib/commands/menu/group-update.js +1 -1
  133. package/lib/commands/menu/index.js +1 -1
  134. package/lib/commands/menu/list.js +1 -1
  135. package/lib/commands/menu/move.js +1 -1
  136. package/lib/commands/menu/regroup-start.js +1 -1
  137. package/lib/commands/menu/rename.js +1 -1
  138. package/lib/commands/menu/shared/compare-table.js +1 -1
  139. package/lib/commands/menu/shared/delete-plan.js +1 -1
  140. package/lib/commands/menu/shared/facts.js +1 -1
  141. package/lib/commands/menu/shared/index.js +1 -1
  142. package/lib/commands/menu/shared/inquirer.js +1 -1
  143. package/lib/commands/menu/shared/local-pages.js +1 -1
  144. package/lib/commands/menu/shared/logic.js +1 -1
  145. package/lib/commands/menu/shared/mutations.js +1 -1
  146. package/lib/commands/menu/shared/service.js +1 -1
  147. package/lib/commands/menu/shared/sync-core.js +1 -1
  148. package/lib/commands/menu/shared/update-core.js +1 -1
  149. package/lib/commands/menu/shared/valid-url.js +1 -1
  150. package/lib/commands/menu/sync.js +1 -1
  151. package/lib/commands/menu/visibility-update.js +1 -1
  152. package/lib/commands/notification/config-create.js +1 -1
  153. package/lib/commands/notification/config-delete.js +1 -1
  154. package/lib/commands/notification/config-list.js +1 -1
  155. package/lib/commands/notification/config-update.js +1 -1
  156. package/lib/commands/notification/index.js +1 -1
  157. package/lib/commands/notification/shared.js +1 -1
  158. package/lib/commands/ocr/index.js +1 -1
  159. package/lib/commands/page/create.js +1 -1
  160. package/lib/commands/page/custom/detail.js +1 -1
  161. package/lib/commands/page/custom/list.js +1 -1
  162. package/lib/commands/page/custom/publish.js +1 -1
  163. package/lib/commands/page/custom/shared.js +1 -1
  164. package/lib/commands/page/custom/syntax.js +1 -1
  165. package/lib/commands/page/custom/update.js +1 -1
  166. package/lib/commands/page/data-list-status.js +1 -1
  167. package/lib/commands/page/generate-start.js +1 -1
  168. package/lib/commands/page/generate-status.js +1 -1
  169. package/lib/commands/page/index.js +1 -1
  170. package/lib/commands/page/pull.js +1 -1
  171. package/lib/commands/page/push.js +1 -1
  172. package/lib/commands/page/relation-audit.js +1 -1
  173. package/lib/commands/page/restore.js +1 -1
  174. package/lib/commands/page/shared.js +1 -1
  175. package/lib/commands/page/sync.js +1 -1
  176. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  177. package/lib/commands/project/create/format-elapsed.js +1 -1
  178. package/lib/commands/project/create/main.js +1 -1
  179. package/lib/commands/project/create/materialize-project-template.js +1 -1
  180. package/lib/commands/project/create/project-name.js +1 -1
  181. package/lib/commands/project/create/project-template-archive.js +1 -1
  182. package/lib/commands/project/create/project-template-path.js +1 -1
  183. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  184. package/lib/commands/project/create/use-format-code.js +1 -1
  185. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  186. package/lib/commands/project/domain-routing-sync.js +1 -1
  187. package/lib/commands/project/index.js +1 -1
  188. package/lib/commands/project/upgrade.js +1 -1
  189. package/lib/commands/registry.js +1 -1
  190. package/lib/commands/role/delete.js +1 -1
  191. package/lib/commands/role/detail.js +1 -1
  192. package/lib/commands/role/index.js +1 -1
  193. package/lib/commands/role/list.js +1 -1
  194. package/lib/commands/role/shared.js +1 -1
  195. package/lib/commands/role/update.js +1 -1
  196. package/lib/commands/role/user-add.js +1 -1
  197. package/lib/commands/role/user-remove.js +1 -1
  198. package/lib/commands/role/user-resolve.js +1 -1
  199. package/lib/commands/rule/get.js +1 -1
  200. package/lib/commands/rule/index.js +1 -1
  201. package/lib/commands/rule/list.js +1 -1
  202. package/lib/commands/rule/set.js +1 -1
  203. package/lib/commands/rule/shared.js +1 -1
  204. package/lib/commands/run/index.js +1 -1
  205. package/lib/commands/schema.js +1 -1
  206. package/lib/commands/sql/create.js +1 -1
  207. package/lib/commands/sql/delete.js +1 -1
  208. package/lib/commands/sql/detail.js +1 -1
  209. package/lib/commands/sql/exec.js +1 -1
  210. package/lib/commands/sql/index.js +1 -1
  211. package/lib/commands/sql/list.js +1 -1
  212. package/lib/commands/sql/pull.js +1 -1
  213. package/lib/commands/sql/push.js +1 -1
  214. package/lib/commands/sql/shared.js +1 -1
  215. package/lib/commands/sql/status.js +1 -1
  216. package/lib/commands/sql/validate.js +1 -1
  217. package/lib/commands/task/index.js +1 -1
  218. package/lib/commands/task/status.js +1 -1
  219. package/lib/commands/tenant/index.js +1 -1
  220. package/lib/commands/tenant/members-list.js +1 -1
  221. package/lib/commands/tenant/shared.js +1 -1
  222. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  223. package/lib/commands/user-account/index.js +1 -1
  224. package/lib/commands/workspace/add.js +1 -1
  225. package/lib/commands/workspace/index.js +1 -1
  226. package/lib/commands/workspace/remove.js +1 -1
  227. package/lib/config/domain-config.js +1 -1
  228. package/lib/config/project-domain-routing.js +1 -1
  229. package/lib/config/schema.js +1 -1
  230. package/lib/constant/cdn.js +1 -1
  231. package/lib/constant/cli.js +1 -1
  232. package/lib/constant/defaults.js +1 -1
  233. package/lib/constant/domain.js +1 -1
  234. package/lib/constant/env.js +1 -1
  235. package/lib/constant/output.js +1 -1
  236. package/lib/constant/paths.js +1 -1
  237. package/lib/constant/region.js +1 -1
  238. package/lib/constant/risk.js +1 -1
  239. package/lib/constant/routing-profile.js +1 -1
  240. package/lib/context/app-resolver.js +1 -1
  241. package/lib/context/auth-resolver.js +1 -1
  242. package/lib/context/config-loader.js +1 -1
  243. package/lib/context.js +1 -1
  244. package/lib/core/alias-resolver.js +1 -1
  245. package/lib/core/api-client.js +1 -1
  246. package/lib/core/bff/config.js +1 -1
  247. package/lib/core/bff/file-system.js +1 -1
  248. package/lib/core/bff/hash.js +1 -1
  249. package/lib/core/bff/lock.js +1 -1
  250. package/lib/core/bff/utils.js +1 -1
  251. package/lib/core/db-resolver.js +1 -1
  252. package/lib/core/instant-api-policy/config.js +1 -1
  253. package/lib/core/kb-search-client.js +1 -1
  254. package/lib/core/page/file-system.js +1 -1
  255. package/lib/core/page/hash.js +1 -1
  256. package/lib/core/page/lock.js +1 -1
  257. package/lib/core/sql-index-auditor.js +1 -1
  258. package/lib/core/sql-sync/config.js +1 -1
  259. package/lib/core/sql-sync/file-system.js +1 -1
  260. package/lib/core/sql-sync/hash.js +1 -1
  261. package/lib/core/sql-sync/lock.js +1 -1
  262. package/lib/core/sql-sync/utils.js +1 -1
  263. package/lib/core/sql-validator.js +1 -1
  264. package/lib/errors.js +1 -1
  265. package/lib/framework/build-all-flags.js +1 -1
  266. package/lib/framework/error-output.js +1 -1
  267. package/lib/framework/explicit-yes.js +1 -1
  268. package/lib/framework/flags.js +1 -1
  269. package/lib/framework/help.js +1 -1
  270. package/lib/framework/index.js +1 -1
  271. package/lib/framework/output.js +1 -1
  272. package/lib/framework/response.js +1 -1
  273. package/lib/framework/runner-alias.js +1 -1
  274. package/lib/framework/runner.js +1 -1
  275. package/lib/framework/schema-export.js +1 -1
  276. package/lib/framework/supported-flags.js +1 -1
  277. package/lib/framework/types.js +1 -1
  278. package/lib/generated/build-info.d.ts +4 -4
  279. package/lib/generated/build-info.js +1 -1
  280. package/lib/generated/official-routing.js +1 -1
  281. package/lib/generated/routing-contract.js +1 -1
  282. package/lib/help.js +1 -1
  283. package/lib/postinstall.js +1 -1
  284. package/lib/runtime/confirmation.js +1 -1
  285. package/lib/runtime/event.js +1 -1
  286. package/lib/runtime/index.js +1 -1
  287. package/lib/runtime/queue.js +1 -1
  288. package/lib/runtime/resolve.js +1 -1
  289. package/lib/skills/builtin-skill.js +1 -1
  290. package/lib/skills/main.js +1 -1
  291. package/lib/skills/npx-skills-add.js +1 -1
  292. package/lib/skills/skill-presence.js +1 -1
  293. package/lib/telemetry/cli-command-trace.js +1 -1
  294. package/lib/telemetry/cli-help-trace.js +1 -1
  295. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  296. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  297. package/lib/telemetry/send-cli-trace-log.js +1 -1
  298. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  299. package/lib/utils/ai_config.js +1 -1
  300. package/lib/utils/apply-jq-filter.js +1 -1
  301. package/lib/utils/cdn-config.js +1 -1
  302. package/lib/utils/check-sdk-version.js +1 -1
  303. package/lib/utils/cli-version-check.js +1 -1
  304. package/lib/utils/cli-version-policy.js +1 -1
  305. package/lib/utils/config.js +1 -1
  306. package/lib/utils/entity-with-id.js +1 -1
  307. package/lib/utils/file-utils.js +1 -1
  308. package/lib/utils/guides-cdn.js +1 -1
  309. package/lib/utils/http-client.js +1 -1
  310. package/lib/utils/is-non-interactive.js +1 -1
  311. package/lib/utils/logger.js +1 -1
  312. package/lib/utils/params.js +1 -1
  313. package/lib/utils/platform.js +1 -1
  314. package/lib/utils/sleep.js +1 -1
  315. package/lib/utils/template-replacer.js +1 -1
  316. package/lib/utils/update-notice.js +1 -1
  317. package/lib/utils/version.js +1 -1
  318. package/lib/utils/with-active-cookie.js +1 -1
  319. package/lib/utils/write-cli-side-channel.js +1 -1
  320. package/package.json +1 -1
  321. package/skills/rabetbase/SKILL.md +1 -1
  322. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- (function(_0x464c51,_0x2d3fd7){const _0x9c7b6e=a176_0x59a0,_0x5a5466=_0x464c51();while(!![]){try{const _0x201876=parseInt(_0x9c7b6e(0x185))/0x1+parseInt(_0x9c7b6e(0x191))/0x2*(parseInt(_0x9c7b6e(0x19d))/0x3)+parseInt(_0x9c7b6e(0x198))/0x4+parseInt(_0x9c7b6e(0x18b))/0x5*(parseInt(_0x9c7b6e(0x199))/0x6)+parseInt(_0x9c7b6e(0x195))/0x7+-parseInt(_0x9c7b6e(0x193))/0x8*(parseInt(_0x9c7b6e(0x19c))/0x9)+-parseInt(_0x9c7b6e(0x19f))/0xa*(parseInt(_0x9c7b6e(0x188))/0xb);if(_0x201876===_0x2d3fd7)break;else _0x5a5466['push'](_0x5a5466['shift']());}catch(_0x3c7aa9){_0x5a5466['push'](_0x5a5466['shift']());}}}(a176_0x2c98,0x45b33));import{existsSync}from'node:fs';import a176_0x37b600 from'node:path';import a176_0x29d993 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';function a176_0x59a0(_0x4c1a1a,_0xdbf662){_0x4c1a1a=_0x4c1a1a-0x185;const _0x2c985e=a176_0x2c98();let _0x59a04a=_0x2c985e[_0x4c1a1a];return _0x59a04a;}import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getProjectNameValidationError}from'../../../commands/project/create/project-name.js';export async function guidedCreateProject(_0x437280,_0x49bd38,_0xb5d3bf){const _0x292df6=a176_0x59a0,_0x4c5a79=_0x292df6(0x189),_0x54bb72=readConfig(),_0x3b9db2=typeof _0x54bb72[_0x292df6(0x19b)]===_0x292df6(0x186)?_0x54bb72[_0x292df6(0x19b)]:undefined,_0xd83660=await input({'message':_0x292df6(0x18e),'default':_0x4c5a79,'validate':_0xe28b47=>{const _0x27b72b=_0x292df6,_0x2cfe5f=_0xe28b47['trim']()||_0x4c5a79,_0x3eb957=getProjectNameValidationError(_0x2cfe5f);if(_0x3eb957)return _0x3eb957;const _0x2940a1=a176_0x37b600[_0x27b72b(0x19a)](process[_0x27b72b(0x196)](),_0x2cfe5f);if(existsSync(_0x2940a1))return _0x27b72b(0x194)+_0x2cfe5f+_0x27b72b(0x18d);return!![];}});console[_0x292df6(0x190)](a176_0x29d993[_0x292df6(0x18a)](_0x292df6(0x187)+a176_0x29d993['cyan'](_0xd83660)));const _0x58aab6=await selectSingleAppcode(_0xb5d3bf);console[_0x292df6(0x190)](a176_0x29d993[_0x292df6(0x18a)]('√\x20App\x20Code:\x20'+a176_0x29d993[_0x292df6(0x192)](_0x58aab6||'Not\x20set')));if(_0x58aab6){const _0x151328=await getIsSessionValid();if(!_0x151328){const _0x3f994b=await confirm({'message':'No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','default':!![]});if(_0x3f994b){const _0x11ea0d=await authServer({'silent':!![]});console[_0x292df6(0x190)](a176_0x29d993[_0x292df6(0x18a)](_0x292df6(0x18f)+a176_0x29d993[_0x292df6(0x192)](_0x11ea0d?_0x292df6(0x197):_0x292df6(0x19e))));}else console[_0x292df6(0x190)](a176_0x29d993[_0x292df6(0x18a)](_0x292df6(0x18f)+a176_0x29d993[_0x292df6(0x192)]('Skipped')));}await _0x437280({'projectName':_0xd83660,'appCode':_0x58aab6,'env':_0x49bd38||_0x3b9db2||_0x292df6(0x18c)});}else await _0x437280({'projectName':_0xd83660,'env':_0x49bd38||_0x3b9db2||_0x292df6(0x18c)});}function a176_0x2c98(){const _0x24a05a=['2010yKrzth','Login\x20failed','13890550POxxVn','311028ZLJqig','string','√\x20Project\x20Name:\x20','11HUYRgM','my-app','green','15tiPvXy','production','\x22\x20already\x20exists','Project\x20name:','√\x20Login\x20status:\x20','log','962IDYuvD','cyan','24aVAhAi','Directory\x20\x22','3708985MYptqL','cwd','Logged\x20in','2193160IRFrvc','321540GbDoDi','resolve','env','593001zAdSDs'];a176_0x2c98=function(){return _0x24a05a;};return a176_0x2c98();}
1
+ (function(_0x483d86,_0x4fcff8){const _0x23fd6e=a176_0x51a5,_0x24b74c=_0x483d86();while(!![]){try{const _0xa31d64=-parseInt(_0x23fd6e(0x1a3))/0x1+parseInt(_0x23fd6e(0x1ac))/0x2*(parseInt(_0x23fd6e(0x1a0))/0x3)+parseInt(_0x23fd6e(0x1ad))/0x4*(parseInt(_0x23fd6e(0x19e))/0x5)+parseInt(_0x23fd6e(0x1aa))/0x6*(parseInt(_0x23fd6e(0x197))/0x7)+parseInt(_0x23fd6e(0x1af))/0x8*(parseInt(_0x23fd6e(0x1a6))/0x9)+parseInt(_0x23fd6e(0x198))/0xa+-parseInt(_0x23fd6e(0x1b0))/0xb;if(_0xa31d64===_0x4fcff8)break;else _0x24b74c['push'](_0x24b74c['shift']());}catch(_0x93431b){_0x24b74c['push'](_0x24b74c['shift']());}}}(a176_0x1627,0x32067));import{existsSync}from'node:fs';import a176_0x1c9336 from'node:path';function a176_0x1627(){const _0xd66275=['Login\x20failed','√\x20Login\x20status:\x20','trim','2420526SdqGSp','production','530890QbIMte','8cVCcZE','my-app','8hPgcbH','10874677VMsFiH','Logged\x20in','√\x20App\x20Code:\x20','string','\x22\x20already\x20exists','green','7RRgpot','1670380MPPwvc','√\x20Project\x20Name:\x20','log','cyan','Directory\x20\x22','cwd','724215SKqBPl','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','3zhYcNX','env','Project\x20name:','169075zDwuhm','Skipped','Not\x20set','2132955LjcRrX'];a176_0x1627=function(){return _0xd66275;};return a176_0x1627();}import a176_0x19d245 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';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';function a176_0x51a5(_0x36e57d,_0x205d33){_0x36e57d=_0x36e57d-0x192;const _0x162774=a176_0x1627();let _0x51a5f4=_0x162774[_0x36e57d];return _0x51a5f4;}export async function guidedCreateProject(_0x8f3c31,_0x1515ea,_0x2010ab){const _0x779b7c=a176_0x51a5,_0x516b2d=_0x779b7c(0x1ae),_0x2387ec=readConfig(),_0x46d5f6=typeof _0x2387ec['env']===_0x779b7c(0x194)?_0x2387ec[_0x779b7c(0x1a1)]:undefined,_0x4affc3=await input({'message':_0x779b7c(0x1a2),'default':_0x516b2d,'validate':_0x99cd27=>{const _0x4311b7=_0x779b7c,_0x5c0caf=_0x99cd27[_0x4311b7(0x1a9)]()||_0x516b2d,_0x261b48=getProjectNameValidationError(_0x5c0caf);if(_0x261b48)return _0x261b48;const _0x4c447a=a176_0x1c9336['resolve'](process[_0x4311b7(0x19d)](),_0x5c0caf);if(existsSync(_0x4c447a))return _0x4311b7(0x19c)+_0x5c0caf+_0x4311b7(0x195);return!![];}});console[_0x779b7c(0x19a)](a176_0x19d245[_0x779b7c(0x196)](_0x779b7c(0x199)+a176_0x19d245[_0x779b7c(0x19b)](_0x4affc3)));const _0x3eeed8=await selectSingleAppcode(_0x2010ab);console[_0x779b7c(0x19a)](a176_0x19d245[_0x779b7c(0x196)](_0x779b7c(0x193)+a176_0x19d245[_0x779b7c(0x19b)](_0x3eeed8||_0x779b7c(0x1a5))));if(_0x3eeed8){const _0x5ead47=await getIsSessionValid();if(!_0x5ead47){const _0x53ab57=await confirm({'message':_0x779b7c(0x19f),'default':!![]});if(_0x53ab57){const _0x20e9f8=await authServer({'silent':!![]});console[_0x779b7c(0x19a)](a176_0x19d245[_0x779b7c(0x196)](_0x779b7c(0x1a8)+a176_0x19d245['cyan'](_0x20e9f8?_0x779b7c(0x192):_0x779b7c(0x1a7))));}else console[_0x779b7c(0x19a)](a176_0x19d245[_0x779b7c(0x196)](_0x779b7c(0x1a8)+a176_0x19d245[_0x779b7c(0x19b)](_0x779b7c(0x1a4))));}await _0x8f3c31({'projectName':_0x4affc3,'appCode':_0x3eeed8,'env':_0x1515ea||_0x46d5f6||_0x779b7c(0x1ab)});}else await _0x8f3c31({'projectName':_0x4affc3,'env':_0x1515ea||_0x46d5f6||_0x779b7c(0x1ab)});}
@@ -1 +1 @@
1
- function a177_0x5a9a(){const _0x35145f=['23103EpmlzI','4748898kIRuAx','24sDQrGf','312ykKgOT','468545bdoxnU','now','3973464BKkhsb','replace','8lzpkBr','toFixed','30oKZVcG','1842246nXKetD','35535TnQKsO','177558MQlHFN'];a177_0x5a9a=function(){return _0x35145f;};return a177_0x5a9a();}function a177_0x5a44(_0x497a01,_0x23ffec){_0x497a01=_0x497a01-0xc4;const _0x5a9a2f=a177_0x5a9a();let _0x5a4401=_0x5a9a2f[_0x497a01];return _0x5a4401;}(function(_0x3f6e45,_0x5beb9c){const _0x4dbf66=a177_0x5a44,_0xcef37b=_0x3f6e45();while(!![]){try{const _0x39ef68=parseInt(_0x4dbf66(0xcb))/0x1*(parseInt(_0x4dbf66(0xc6))/0x2)+-parseInt(_0x4dbf66(0xcc))/0x3*(parseInt(_0x4dbf66(0xcf))/0x4)+-parseInt(_0x4dbf66(0xca))/0x5+-parseInt(_0x4dbf66(0xce))/0x6*(parseInt(_0x4dbf66(0xd0))/0x7)+-parseInt(_0x4dbf66(0xc4))/0x8+-parseInt(_0x4dbf66(0xc9))/0x9*(-parseInt(_0x4dbf66(0xc8))/0xa)+parseInt(_0x4dbf66(0xcd))/0xb;if(_0x39ef68===_0x5beb9c)break;else _0xcef37b['push'](_0xcef37b['shift']());}catch(_0x1e41ea){_0xcef37b['push'](_0xcef37b['shift']());}}}(a177_0x5a9a,0x5db50));export function formatElapsed(_0x19d8ac){const _0x5d9c9a=a177_0x5a44,_0xe86256=Date[_0x5d9c9a(0xd1)]()-_0x19d8ac;if(_0xe86256<0x3e8)return _0xe86256+'ms';const _0x807608=(_0xe86256/0x3e8)[_0x5d9c9a(0xc7)](0x2),_0x13269a=_0x807608[_0x5d9c9a(0xc5)](/\.?0+$/u,'');return _0x13269a+'s';}
1
+ function a177_0x1c18(_0x17c40b,_0x214cbc){_0x17c40b=_0x17c40b-0x1d3;const _0x26f5d5=a177_0x26f5();let _0x1c18a4=_0x26f5d5[_0x17c40b];return _0x1c18a4;}(function(_0x14b220,_0x3774b4){const _0x3a8e62=a177_0x1c18,_0x17f1e6=_0x14b220();while(!![]){try{const _0xa41496=parseInt(_0x3a8e62(0x1da))/0x1*(-parseInt(_0x3a8e62(0x1dd))/0x2)+parseInt(_0x3a8e62(0x1d3))/0x3+parseInt(_0x3a8e62(0x1db))/0x4+parseInt(_0x3a8e62(0x1d4))/0x5+-parseInt(_0x3a8e62(0x1dc))/0x6*(-parseInt(_0x3a8e62(0x1df))/0x7)+-parseInt(_0x3a8e62(0x1de))/0x8+parseInt(_0x3a8e62(0x1d8))/0x9*(parseInt(_0x3a8e62(0x1d5))/0xa);if(_0xa41496===_0x3774b4)break;else _0x17f1e6['push'](_0x17f1e6['shift']());}catch(_0xb1d275){_0x17f1e6['push'](_0x17f1e6['shift']());}}}(a177_0x26f5,0xd51bf));export function formatElapsed(_0x2b78ca){const _0x541a9d=a177_0x1c18,_0x413007=Date[_0x541a9d(0x1d6)]()-_0x2b78ca;if(_0x413007<0x3e8)return _0x413007+'ms';const _0x2255ac=(_0x413007/0x3e8)[_0x541a9d(0x1d7)](0x2),_0x44ef30=_0x2255ac[_0x541a9d(0x1d9)](/\.?0+$/u,'');return _0x44ef30+'s';}function a177_0x26f5(){const _0x1bc094=['448670yVTtfk','now','toFixed','9VBJguC','replace','1JyygJf','3767112VjFVLo','6GXVSzH','3244818POCPZf','9155984ejnMcb','6113345DBqkNX','1937541OHaCOT','5669875mlRDrx'];a177_0x26f5=function(){return _0x1bc094;};return a177_0x26f5();}
@@ -1 +1 @@
1
- (function(_0x24c9e9,_0x3f024a){const _0x3e781b=a178_0x569a,_0x5bef58=_0x24c9e9();while(!![]){try{const _0x179d24=parseInt(_0x3e781b(0xfc))/0x1*(-parseInt(_0x3e781b(0xe1))/0x2)+-parseInt(_0x3e781b(0xd1))/0x3*(-parseInt(_0x3e781b(0xac))/0x4)+-parseInt(_0x3e781b(0xf3))/0x5*(parseInt(_0x3e781b(0xc4))/0x6)+-parseInt(_0x3e781b(0xc3))/0x7*(-parseInt(_0x3e781b(0xa7))/0x8)+-parseInt(_0x3e781b(0xad))/0x9+parseInt(_0x3e781b(0xa6))/0xa*(-parseInt(_0x3e781b(0xcf))/0xb)+-parseInt(_0x3e781b(0xb3))/0xc*(-parseInt(_0x3e781b(0xa8))/0xd);if(_0x179d24===_0x3f024a)break;else _0x5bef58['push'](_0x5bef58['shift']());}catch(_0x28ec2d){_0x5bef58['push'](_0x5bef58['shift']());}}}(a178_0x3237,0xdc06e));function a178_0x3237(){const _0x21b0ac=['\x20|\x20AppCode:\x20','version','env','apps','Failed\x20to\x20configure\x20app\x20AppCode','Unable\x20to\x20prepare\x20the\x20current\x20directory\x20workspace','2836CsDCaf','dev','Project\x20directory\x20','utf8','\x20\x201.\x20Start\x20project:\x20','Verifying\x20project\x20template','mkdtempSync','\x20api\x20pull\x20--force\x20--yes','needsUpgrade','Resolving\x20project\x20template','\x20√\x20','package.json','\x20Generated\x20by\x20rabetbase\x20cli\x20','chdir','\x20config\x20set\x20appcode\x20<app-code>\x27','templateSource','cwd','info','50oEeVfW','projectCode','ino','Copying\x20local\x20template\x20source','bold','\x20already\x20exists','cyan','Downloading\x20project\x20template','rmSync','106AzigJx','\x20dataset(s),\x20generated\x20','Starting\x20project\x20creation:\x20','gray','currentVersion','log','Project\x20creation\x20failed:\x20','√\x20Pulled\x20','Format\x20code','Install\x20dependencies','readFileSync','green','√\x20Configuration\x20file\x20created,\x20Apps:\x20','Failed\x20to\x20update\x20package.json','setLogPath','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','Failed\x20to\x20clean\x20up\x20project\x20directory:\x20','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','resolve','belowMinimum','push','Remove\x20or\x20move\x20the\x20existing\x20files,\x20then\x20retry\x20with\x20--current-dir.','isDirectory','nonInteractive','reverse','Extracting\x20project\x20template','toLocaleString','appCode','\x20&&\x20','\x20|\x20Default:\x20implicit\x20(single\x20app)','message','accessSync','text','fail','renameSync','\x20run\x20start','10VdaEIe','14936jRPhVM','13OtCjIA','create','API\x20configuration\x20pull\x20failed','keys','4wwAsmx','7775613TQYkEP','The\x20current\x20directory\x20must\x20be\x20empty.','stringify','basename','modelCount','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','18071436kqmfcM','error','verifying','Remove\x20the\x20new\x20files\x20and\x20retry\x20from\x20an\x20empty\x20directory.','1.0.0','extracting','W_OK','repeat','CLI\x20version\x20check','*\x20Configuring\x20AppCode\x20for\x20project\x20','copying','validation','\x20\x202.\x20Pull\x20API\x20configuration:\x20','join','production','existsSync','5131IvcMtm','333942ZCcCqO','projectName','readdirSync','🚀\x20Next\x20Steps:','downloading','...','resolving','name','cookie','Skip\x20cleanup:\x20project\x20directory\x20ownership\x20changed:\x20','project','12666379EGyuGQ','length','2247270LtjPzj','parse','cd\x20','!\x20Project\x20created,\x20but\x20local\x20logging\x20could\x20not\x20be\x20initialized:\x20','*\x20Pulling\x20API\x20configuration...','stableVersion','currentDir','.rabetbase-create-','Unable\x20to\x20verify\x20ownership\x20of\x20the\x20created\x20project\x20directory','warn'];a178_0x3237=function(){return _0x21b0ac;};return a178_0x3237();}import a178_0x23bf7f from'path';import a178_0x46d95a from'fs';import a178_0x254f7a from'chalk';import a178_0x26607a 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{CLI_BIN_NAME}from'../../../constant/cli.js';function a178_0x569a(_0x3e2a4d,_0x37bda4){_0x3e2a4d=_0x3e2a4d-0x87;const _0x323799=a178_0x3237();let _0x569a42=_0x323799[_0x3e2a4d];return _0x569a42;}import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{loadRawConfigLayers,writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';import{validateProjectName}from'../../../commands/project/create/project-name.js';import{getSdkClientRoutingConfig}from'../../../constant/domain.js';import{generateSdkConfigFile}from'../../../api/generate-sdk-config-file.js';import{writeProjectDomainRoutingManifest}from'../../../config/project-domain-routing.js';import{CliErrors}from'../../../errors.js';function readDirectoryIdentity(_0x52af3e){const _0x119d34=a178_0x569a;try{const _0x163d0b=a178_0x46d95a['lstatSync'](_0x52af3e);if(!_0x163d0b[_0x119d34(0x98)]())return null;return{'dev':_0x163d0b[_0x119d34(0xe2)],'ino':_0x163d0b['ino']};}catch{return null;}}function isSameDirectory(_0x5c5a20,_0x1cf26c){const _0x2f3a54=a178_0x569a;return!!_0x5c5a20&&!!_0x1cf26c&&_0x5c5a20['dev']===_0x1cf26c['dev']&&_0x5c5a20[_0x2f3a54(0xf5)]===_0x1cf26c[_0x2f3a54(0xf5)];}function commitCurrentDirectoryProject(_0x930181,_0x18f5f7,_0x568f15){const _0x4038fc=a178_0x569a;if(!isSameDirectory(readDirectoryIdentity(_0x930181),_0x568f15))throw new Error('Current\x20directory\x20identity\x20changed\x20during\x20project\x20creation');const _0x4410a8=a178_0x23bf7f[_0x4038fc(0xb0)](_0x18f5f7),_0x5f37c0=a178_0x46d95a[_0x4038fc(0xc6)](_0x930181);if(_0x5f37c0[_0x4038fc(0xd0)]!==0x1||_0x5f37c0[0x0]!==_0x4410a8)throw CliErrors[_0x4038fc(0xbe)]('The\x20current\x20directory\x20changed\x20during\x20project\x20creation.',_0x4038fc(0xb6));const _0x333abc=a178_0x23bf7f[_0x4038fc(0xc0)](_0x18f5f7,_0x4038fc(0xce)),_0x31def5=[];try{for(const _0x5138c3 of a178_0x46d95a[_0x4038fc(0xc6)](_0x333abc)){a178_0x46d95a[_0x4038fc(0xa4)](a178_0x23bf7f['join'](_0x333abc,_0x5138c3),a178_0x23bf7f[_0x4038fc(0xc0)](_0x930181,_0x5138c3)),_0x31def5[_0x4038fc(0x96)](_0x5138c3);}a178_0x46d95a[_0x4038fc(0xfb)](_0x18f5f7,{'recursive':!![],'force':!![]});}catch(_0x32fa57){for(const _0xe0e56 of _0x31def5[_0x4038fc(0x9a)]()){const _0xc47c7c=a178_0x23bf7f[_0x4038fc(0xc0)](_0x930181,_0xe0e56);if(!a178_0x46d95a['existsSync'](_0xc47c7c))continue;a178_0x46d95a[_0x4038fc(0xa4)](_0xc47c7c,a178_0x23bf7f[_0x4038fc(0xc0)](_0x333abc,_0xe0e56));}throw _0x32fa57;}}export async function createApp(_0x2a2f73){const _0x2a7b00=a178_0x569a,_0x36f522=await checkCliVersion();(_0x36f522[_0x2a7b00(0xe9)]||_0x36f522[_0x2a7b00(0x95)])&&(printCliUpgradeWarning(_0x36f522),assertCliVersionSupported(_0x36f522),logger[_0x2a7b00(0xf2)](_0x2a7b00(0xa9),_0x2a7b00(0xbb),{'currentVersion':_0x36f522[_0x2a7b00(0x100)],'stableVersion':_0x36f522[_0x2a7b00(0xd6)],'minimumVersion':_0x36f522['minimumVersion'],'needsUpgrade':_0x36f522['needsUpgrade'],'belowMinimum':_0x36f522[_0x2a7b00(0x95)]}));const _0xa1f82=_0x2a2f73[_0x2a7b00(0xd7)]?a178_0x23bf7f[_0x2a7b00(0xb0)](process[_0x2a7b00(0xf1)]()):_0x2a2f73[_0x2a7b00(0xf4)];if(_0xa1f82&&(_0x2a2f73['appCode']||_0x2a2f73[_0x2a7b00(0x99)]))await runCreate({'projectName':_0xa1f82,'appCode':_0x2a2f73['appCode'],'env':_0x2a2f73[_0x2a7b00(0xdd)]},_0x2a2f73);else{if(_0xa1f82){const _0x32459d=await selectSingleAppcode(_0x2a2f73[_0x2a7b00(0xcc)]);await runCreate({'projectName':_0xa1f82,'appCode':_0x32459d||undefined,'env':_0x2a2f73[_0x2a7b00(0xdd)]},_0x2a2f73);}else await guidedCreateProject(_0x55a861=>runCreate(_0x55a861,_0x2a2f73),_0x2a2f73[_0x2a7b00(0xdd)],_0x2a2f73[_0x2a7b00(0xcc)]);}}async function runCreate(_0x393889,_0x21f55e){const _0x39dcab=a178_0x569a;_0x393889[_0x39dcab(0xc5)]=validateProjectName(_0x393889[_0x39dcab(0xc5)]);const _0x2f384e=_0x21f55e['currentDir']?process[_0x39dcab(0xf1)]():a178_0x23bf7f[_0x39dcab(0x94)](process[_0x39dcab(0xf1)](),_0x393889[_0x39dcab(0xc5)]);if(_0x21f55e[_0x39dcab(0xd7)]){if(a178_0x46d95a[_0x39dcab(0xc6)](_0x2f384e)[_0x39dcab(0xd0)]>0x0)throw CliErrors[_0x39dcab(0xbe)](_0x39dcab(0xae),_0x39dcab(0x97));}else{if(a178_0x46d95a[_0x39dcab(0xc2)](_0x2f384e))throw new Error(_0x39dcab(0xe3)+_0x393889[_0x39dcab(0xc5)]+_0x39dcab(0xf8));}let _0x3ac4b7=null;const _0x2414b5=_0x21f55e['currentDir']?readDirectoryIdentity(_0x2f384e):null;let _0x9c0ed8=null;try{a178_0x46d95a[_0x39dcab(0xa1)](a178_0x23bf7f['dirname'](_0x2f384e),a178_0x46d95a['constants'][_0x39dcab(0xb9)]);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x39dcab(0xf2)]('create',_0x39dcab(0xfe)+_0x393889[_0x39dcab(0xc5)],{'projectDir':_0x2f384e,'appCode':_0x393889['appCode']}),console['log'](),console[_0x39dcab(0x87)](a178_0x254f7a[_0x39dcab(0x8d)](_0x39dcab(0xeb))+'Project\x20name:\x20'+a178_0x254f7a['green'](_0x393889[_0x39dcab(0xc5)])+(_0x393889[_0x39dcab(0x9d)]?_0x39dcab(0xdb)+a178_0x254f7a[_0x39dcab(0xf9)](_0x393889[_0x39dcab(0x9d)]):''));try{let _0x29a705=_0x393889['projectName'];_0x21f55e['currentDir']&&(_0x9c0ed8=a178_0x46d95a[_0x39dcab(0xe7)](a178_0x23bf7f[_0x39dcab(0xc0)](_0x2f384e,_0x39dcab(0xd8))),_0x29a705=a178_0x23bf7f['relative'](process[_0x39dcab(0xf1)](),a178_0x23bf7f[_0x39dcab(0xc0)](_0x9c0ed8,'project')));const _0x4f96d3=a178_0x23bf7f[_0x39dcab(0x94)](process['cwd'](),_0x29a705);await runTask('Resolving\x20project\x20template',_0x1e4148=>copyProjectTemplate(_0x29a705,_0x39dd25=>_0x1e4148(projectTemplateStageLabel(_0x39dd25)),_0x21f55e[_0x39dcab(0xf0)]),'Project\x20template\x20ready'),_0x3ac4b7=_0x21f55e[_0x39dcab(0xd7)]?null:readDirectoryIdentity(_0x2f384e);if(!_0x21f55e[_0x39dcab(0xd7)]&&!_0x3ac4b7)throw new Error(_0x39dcab(0xd9));await updatePackageJsonName(_0x29a705,_0x393889[_0x39dcab(0xc5)]),await runTask(_0x39dcab(0x8b),()=>installDependencies(_0x29a705)),await runTask(_0x39dcab(0x8a),()=>formatProjectCode(_0x29a705)),await configureAppCode(_0x29a705,_0x393889[_0x39dcab(0xc5)],_0x393889['appCode']||'',_0x393889[_0x39dcab(0xdd)]);let _0x16c2f8=![];if(_0x393889[_0x39dcab(0x9d)]){console[_0x39dcab(0x87)](_0x39dcab(0xd5));const _0x461d78=process['cwd']();try{process[_0x39dcab(0xee)](_0x4f96d3);const _0x3c19cd=_0x393889[_0x39dcab(0xdd)]||_0x39dcab(0xc1);initEnv(_0x3c19cd);const {configArray:_0x16c2ad}=await fetchModelList(_0x393889[_0x39dcab(0x9d)],_0x21f55e['cookie']||''),_0x3b929c=DEFAULT_API_DIR,_0x4907a4=await generateApiFile(_0x16c2ad,'',_0x393889[_0x39dcab(0x9d)],!![],_0x3c19cd,_0x3b929c,undefined,getSdkClientRoutingConfig(),{'overwriteTypescript':!![]});console[_0x39dcab(0x87)](_0x39dcab(0x89)+_0x16c2ad[_0x39dcab(0xd0)]+_0x39dcab(0xfd)+_0x4907a4[_0x39dcab(0xb1)]+'\x20model(s)'),logger[_0x39dcab(0xf2)](_0x39dcab(0xa9),'API\x20configuration\x20pulled:\x20'+_0x393889[_0x39dcab(0x9d)]);}catch(_0x476023){_0x16c2f8=!![],console[_0x39dcab(0x87)]('!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20'+CLI_BIN_NAME+_0x39dcab(0xe8)),logger[_0x39dcab(0xda)]('create',_0x39dcab(0xaa),{'error':_0x476023 instanceof Error?_0x476023['message']:String(_0x476023)});}finally{process[_0x39dcab(0xee)](_0x461d78);}}if(_0x21f55e[_0x39dcab(0xd7)]){if(!_0x9c0ed8||!_0x2414b5)throw new Error(_0x39dcab(0xe0));commitCurrentDirectoryProject(_0x2f384e,_0x9c0ed8,_0x2414b5),_0x9c0ed8=null;}try{logger[_0x39dcab(0x90)](_0x2f384e),logger['success']('create','Project\x20created:\x20'+_0x393889[_0x39dcab(0xc5)]);}catch(_0x6bc5e1){console[_0x39dcab(0xda)](_0x39dcab(0xd4)+(_0x6bc5e1 instanceof Error?_0x6bc5e1[_0x39dcab(0xa0)]:String(_0x6bc5e1)));}console[_0x39dcab(0x87)](),console['log'](a178_0x254f7a[_0x39dcab(0x8d)]('─'[_0x39dcab(0xba)](0x3c))),console[_0x39dcab(0x87)](a178_0x254f7a[_0x39dcab(0xf9)]['bold'](_0x39dcab(0xc7))),console[_0x39dcab(0x87)]();const _0x4174fa=_0x21f55e[_0x39dcab(0xd7)]?CLI_BIN_NAME+_0x39dcab(0xa5):_0x39dcab(0xd3)+_0x393889[_0x39dcab(0xc5)]+_0x39dcab(0x9e)+CLI_BIN_NAME+_0x39dcab(0xa5);console[_0x39dcab(0x87)](_0x39dcab(0xe5)+a178_0x254f7a['cyan'][_0x39dcab(0xf7)](_0x4174fa)),_0x16c2f8&&console[_0x39dcab(0x87)](_0x39dcab(0xbf)+a178_0x254f7a['cyan'][_0x39dcab(0xf7)](CLI_BIN_NAME+_0x39dcab(0xe8))),console[_0x39dcab(0x87)](a178_0x254f7a[_0x39dcab(0x8d)]('─'[_0x39dcab(0xba)](0x3c)));}catch(_0x17328c){logger[_0x39dcab(0xb4)](_0x39dcab(0xa9),_0x39dcab(0x88)+_0x393889['projectName'],{'error':_0x17328c instanceof Error?_0x17328c[_0x39dcab(0xa0)]:String(_0x17328c)});try{const _0x147029=readDirectoryIdentity(_0x2f384e);if(_0x21f55e[_0x39dcab(0xd7)]&&_0x9c0ed8)a178_0x46d95a['rmSync'](_0x9c0ed8,{'recursive':!![],'force':!![]});else{if(_0x3ac4b7&&_0x147029?.[_0x39dcab(0xe2)]===_0x3ac4b7[_0x39dcab(0xe2)]&&_0x147029['ino']===_0x3ac4b7[_0x39dcab(0xf5)])console['log'](_0x39dcab(0xb2)+_0x2f384e),a178_0x46d95a[_0x39dcab(0xfb)](_0x2f384e,{'recursive':!![],'force':!![]});else _0x147029&&logger[_0x39dcab(0xda)](_0x39dcab(0xa9),_0x39dcab(0xcd)+_0x2f384e);}}catch{logger[_0x39dcab(0xda)](_0x39dcab(0xa9),_0x39dcab(0x92)+_0x2f384e);}throw _0x17328c;}}async function runTask(_0x3a3d2b,_0x20c955,_0x3c7590=_0x3a3d2b){const _0x260eb4=a178_0x569a,_0x43225a=a178_0x26607a(_0x3a3d2b+_0x260eb4(0xc9))['start']();try{const _0xe89260=await _0x20c955(_0x3b154d=>{const _0x261f9f=_0x260eb4;_0x43225a[_0x261f9f(0xa2)]=_0x3b154d+_0x261f9f(0xc9);});_0x43225a['stop'](),console[_0x260eb4(0x87)](''+a178_0x254f7a[_0x260eb4(0x8d)]('\x20√\x20')+_0x3c7590+'\x20'+a178_0x254f7a[_0x260eb4(0xff)]('['+_0xe89260+']'));}catch(_0x274219){_0x43225a[_0x260eb4(0xa3)](_0x3a3d2b);throw _0x274219;}}function projectTemplateStageLabel(_0x510b9b){const _0x51cab0=a178_0x569a;switch(_0x510b9b){case _0x51cab0(0xca):return _0x51cab0(0xea);case _0x51cab0(0xc8):return _0x51cab0(0xfa);case _0x51cab0(0xb5):return _0x51cab0(0xe6);case _0x51cab0(0xb8):return _0x51cab0(0x9b);case _0x51cab0(0xbd):return _0x51cab0(0xf6);}}async function updatePackageJsonName(_0x3a82ba,_0x27c104){const _0x3c9f56=a178_0x569a,_0xf4bd61=a178_0x23bf7f[_0x3c9f56(0x94)](process['cwd'](),_0x3a82ba),_0x32a414=a178_0x23bf7f['join'](_0xf4bd61,_0x3c9f56(0xec));try{console[_0x3c9f56(0x87)](_0x3c9f56(0x91));const _0x32f39c=getRabetbaseCliPackageRoot(),_0x4973b3=a178_0x23bf7f[_0x3c9f56(0xc0)](_0x32f39c,'package.json');let _0x393616=_0x3c9f56(0xb7);try{const _0x194688=JSON[_0x3c9f56(0xd2)](a178_0x46d95a[_0x3c9f56(0x8c)](_0x4973b3,_0x3c9f56(0xe4)));_0x393616=_0x194688[_0x3c9f56(0xdc)]||_0x3c9f56(0xb7);}catch{}const _0x1a1202=a178_0x46d95a[_0x3c9f56(0x8c)](_0x32a414,_0x3c9f56(0xe4)),_0xb0c317=JSON['parse'](_0x1a1202);_0xb0c317[_0x3c9f56(0xcb)]=_0x27c104,_0xb0c317['description']=_0x27c104+_0x3c9f56(0xed)+_0x393616,a178_0x46d95a['writeFileSync'](_0x32a414,JSON[_0x3c9f56(0xaf)](_0xb0c317,null,0x2)+'\x0a',_0x3c9f56(0xe4)),console['log']('√\x20package.json\x20updated:\x20name='+_0x27c104),logger[_0x3c9f56(0xf2)](_0x3c9f56(0xa9),'Updating\x20package.json\x20name');}catch(_0x1f20f3){logger[_0x3c9f56(0xb4)](_0x3c9f56(0xa9),_0x3c9f56(0x8f));throw _0x1f20f3;}}async function configureAppCode(_0x57fd8f,_0x354146,_0x253649,_0x196331){const _0x3d3a8f=a178_0x569a,_0x1538e4=a178_0x23bf7f['resolve'](process[_0x3d3a8f(0xf1)](),_0x57fd8f),_0x38d3db=a178_0x23bf7f[_0x3d3a8f(0xc0)](_0x1538e4,NEW_CONFIG_NAME);try{_0x253649?console[_0x3d3a8f(0x87)](_0x3d3a8f(0xbc)+_0x354146+':\x20'+_0x253649):console[_0x3d3a8f(0x87)](_0x3d3a8f(0x93)+_0x354146);const _0x5e6474=getRabetbaseCliPackageRoot(),_0x1c81d7=a178_0x23bf7f[_0x3d3a8f(0xc0)](_0x5e6474,_0x3d3a8f(0xec));let _0x2632f0='1.0.0';try{const _0x1906ab=JSON[_0x3d3a8f(0xd2)](a178_0x46d95a[_0x3d3a8f(0x8c)](_0x1c81d7,'utf8'));_0x2632f0=_0x1906ab[_0x3d3a8f(0xdc)]||_0x3d3a8f(0xb7);}catch{}const {globalConfig:_0x325682}=loadRawConfigLayers(),_0x2ac0ab=typeof _0x325682[_0x3d3a8f(0xdd)]==='string'?_0x325682['env']:undefined,_0x4c2463={};for(const _0x205eaa of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x325682[_0x205eaa]!=null)_0x4c2463[_0x205eaa]=_0x325682[_0x205eaa];}const _0x26a8ae=buildCanonicalProjectConfig(_0x4c2463,{'appCodes':_0x253649?[_0x253649]:[],'env':_0x196331||_0x2ac0ab||_0x3d3a8f(0xc1),'metadata':{'createdAt':new Date()[_0x3d3a8f(0x9c)](),'version':_0x2632f0}});writeConfigFile(_0x38d3db,_0x26a8ae),await generateSdkConfigFile(a178_0x23bf7f['join'](_0x1538e4,DEFAULT_API_DIR),getSdkClientRoutingConfig()),writeProjectDomainRoutingManifest(_0x1538e4),_0x253649?console[_0x3d3a8f(0x87)](_0x3d3a8f(0x8e)+Object[_0x3d3a8f(0xab)](_0x26a8ae[_0x3d3a8f(0xde)]||{})[_0x3d3a8f(0xc0)](',\x20')+_0x3d3a8f(0x9f)):console['log']('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+_0x3d3a8f(0xef)),logger[_0x3d3a8f(0xf2)](_0x3d3a8f(0xa9),'Configured\x20app\x20AppCode:\x20'+_0x253649);}catch(_0x3c2df6){logger[_0x3d3a8f(0xb4)](_0x3d3a8f(0xa9),_0x3d3a8f(0xdf));throw _0x3c2df6;}}
1
+ function a178_0x2e9e(){const _0x288358=['basename','1145608PdyIBf','fail','writeFileSync','reverse','√\x20package.json\x20updated:\x20name=','dev','W_OK','CLI\x20version\x20check','info','√\x20Pulled\x20','1208430wwUvih','belowMinimum','join','start','The\x20current\x20directory\x20must\x20be\x20empty.','warn','keys','minimumVersion','relative','24652RUfKXU','cd\x20','7507320eoMjvT','renameSync','version','description','env','√\x20Configuration\x20file\x20created,\x20Apps:\x20','...','gray','\x20√\x20','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','utf8','stableVersion','bold','Install\x20dependencies','Project\x20creation\x20failed:\x20','Remove\x20or\x20move\x20the\x20existing\x20files,\x20then\x20retry\x20with\x20--current-dir.','green','length','verifying','115otBPVt','!\x20Project\x20created,\x20but\x20local\x20logging\x20could\x20not\x20be\x20initialized:\x20','message','Verifying\x20project\x20template','projectCode','projectName','repeat','42QNiNGF','cyan','rmSync','3572hLuNRG','create','isDirectory','*\x20Configuring\x20AppCode\x20for\x20project\x20','1.0.0','dirname','package.json','stop','\x20&&\x20','\x20\x201.\x20Start\x20project:\x20','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','Unable\x20to\x20verify\x20ownership\x20of\x20the\x20created\x20project\x20directory','needsUpgrade','Failed\x20to\x20configure\x20app\x20AppCode','lstatSync','*\x20Pulling\x20API\x20configuration...','readdirSync','toLocaleString','mkdtempSync','validation','resolving','Project\x20name:\x20','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20','The\x20current\x20directory\x20changed\x20during\x20project\x20creation.','constants','Extracting\x20project\x20template','production','templateSource','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','modelCount','Configured\x20app\x20AppCode:\x20','Resolving\x20project\x20template','success','extracting','chdir','23027334YUNnyh','Unable\x20to\x20prepare\x20the\x20current\x20directory\x20workspace','160nJdAxa','API\x20configuration\x20pull\x20failed','Updating\x20package.json\x20name','API\x20configuration\x20pulled:\x20','cwd','project','Current\x20directory\x20identity\x20changed\x20during\x20project\x20creation','\x20config\x20set\x20appcode\x20<app-code>\x27','appCode','Failed\x20to\x20clean\x20up\x20project\x20directory:\x20','\x20run\x20start','log','\x20api\x20pull\x20--force\x20--yes','Project\x20created:\x20','Skip\x20cleanup:\x20project\x20directory\x20ownership\x20changed:\x20','Project\x20template\x20ready','nonInteractive','existsSync','apps','accessSync','Remove\x20the\x20new\x20files\x20and\x20retry\x20from\x20an\x20empty\x20directory.','\x20model(s)','currentVersion','Project\x20directory\x20','ino','\x20already\x20exists','\x20\x202.\x20Pull\x20API\x20configuration:\x20','downloading','parse','cookie','36bdPVlC','\x20|\x20AppCode:\x20','135114UuNchm','resolve','\x20Generated\x20by\x20rabetbase\x20cli\x20','currentDir','push','stringify','Failed\x20to\x20update\x20package.json','readFileSync','error','12paSpBy'];a178_0x2e9e=function(){return _0x288358;};return a178_0x2e9e();}(function(_0x3ba786,_0x1e15b1){const _0x373a3c=a178_0x6994,_0x2d9bb6=_0x3ba786();while(!![]){try{const _0x68c031=parseInt(_0x373a3c(0x144))/0x1*(parseInt(_0x373a3c(0x169))/0x2)+-parseInt(_0x373a3c(0x187))/0x3*(-parseInt(_0x373a3c(0x1a7))/0x4)+-parseInt(_0x373a3c(0x1bc))/0x5*(-parseInt(_0x373a3c(0x189))/0x6)+parseInt(_0x373a3c(0x141))/0x7*(parseInt(_0x373a3c(0x194))/0x8)+parseInt(_0x373a3c(0x19e))/0x9+parseInt(_0x373a3c(0x1a9))/0xa+parseInt(_0x373a3c(0x167))/0xb*(-parseInt(_0x373a3c(0x192))/0xc);if(_0x68c031===_0x1e15b1)break;else _0x2d9bb6['push'](_0x2d9bb6['shift']());}catch(_0x5d6226){_0x2d9bb6['push'](_0x2d9bb6['shift']());}}}(a178_0x2e9e,0x81053));import a178_0x5308e7 from'path';import a178_0x569b84 from'fs';import a178_0x2d6ee6 from'chalk';import a178_0x5c2aa3 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{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{loadRawConfigLayers,writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';function a178_0x6994(_0x4c3179,_0x27124f){_0x4c3179=_0x4c3179-0x13e;const _0x2e9e77=a178_0x2e9e();let _0x69949b=_0x2e9e77[_0x4c3179];return _0x69949b;}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';import{getSdkClientRoutingConfig}from'../../../constant/domain.js';import{generateSdkConfigFile}from'../../../api/generate-sdk-config-file.js';import{writeProjectDomainRoutingManifest}from'../../../config/project-domain-routing.js';import{CliErrors}from'../../../errors.js';function readDirectoryIdentity(_0x4654f3){const _0x551a98=a178_0x6994;try{const _0x5b58bf=a178_0x569b84[_0x551a98(0x152)](_0x4654f3);if(!_0x5b58bf[_0x551a98(0x146)]())return null;return{'dev':_0x5b58bf['dev'],'ino':_0x5b58bf['ino']};}catch{return null;}}function isSameDirectory(_0x535724,_0x328520){const _0x520b5e=a178_0x6994;return!!_0x535724&&!!_0x328520&&_0x535724[_0x520b5e(0x199)]===_0x328520[_0x520b5e(0x199)]&&_0x535724[_0x520b5e(0x181)]===_0x328520['ino'];}function commitCurrentDirectoryProject(_0x31688c,_0xc9fbae,_0x38adf0){const _0x147d9b=a178_0x6994;if(!isSameDirectory(readDirectoryIdentity(_0x31688c),_0x38adf0))throw new Error(_0x147d9b(0x16f));const _0x58366c=a178_0x5308e7['basename'](_0xc9fbae),_0x42968e=a178_0x569b84[_0x147d9b(0x154)](_0x31688c);if(_0x42968e[_0x147d9b(0x1ba)]!==0x1||_0x42968e[0x0]!==_0x58366c)throw CliErrors['validation'](_0x147d9b(0x15b),_0x147d9b(0x17d));const _0x42c890=a178_0x5308e7[_0x147d9b(0x1a0)](_0xc9fbae,'project'),_0x10d863=[];try{for(const _0x9193c1 of a178_0x569b84[_0x147d9b(0x154)](_0x42c890)){a178_0x569b84[_0x147d9b(0x1aa)](a178_0x5308e7['join'](_0x42c890,_0x9193c1),a178_0x5308e7[_0x147d9b(0x1a0)](_0x31688c,_0x9193c1)),_0x10d863[_0x147d9b(0x18d)](_0x9193c1);}a178_0x569b84[_0x147d9b(0x143)](_0xc9fbae,{'recursive':!![],'force':!![]});}catch(_0x589682){for(const _0x3f297a of _0x10d863[_0x147d9b(0x197)]()){const _0x449549=a178_0x5308e7[_0x147d9b(0x1a0)](_0x31688c,_0x3f297a);if(!a178_0x569b84[_0x147d9b(0x17a)](_0x449549))continue;a178_0x569b84[_0x147d9b(0x1aa)](_0x449549,a178_0x5308e7[_0x147d9b(0x1a0)](_0x42c890,_0x3f297a));}throw _0x589682;}}export async function createApp(_0x42c98b){const _0x546ccd=a178_0x6994,_0x4bd5ee=await checkCliVersion();(_0x4bd5ee[_0x546ccd(0x150)]||_0x4bd5ee[_0x546ccd(0x19f)])&&(printCliUpgradeWarning(_0x4bd5ee),assertCliVersionSupported(_0x4bd5ee),logger[_0x546ccd(0x19c)](_0x546ccd(0x145),_0x546ccd(0x19b),{'currentVersion':_0x4bd5ee[_0x546ccd(0x17f)],'stableVersion':_0x4bd5ee[_0x546ccd(0x1b4)],'minimumVersion':_0x4bd5ee[_0x546ccd(0x1a5)],'needsUpgrade':_0x4bd5ee[_0x546ccd(0x150)],'belowMinimum':_0x4bd5ee[_0x546ccd(0x19f)]}));const _0x4b0df7=_0x42c98b['currentDir']?a178_0x5308e7[_0x546ccd(0x193)](process[_0x546ccd(0x16d)]()):_0x42c98b[_0x546ccd(0x13e)];if(_0x4b0df7&&(_0x42c98b['appCode']||_0x42c98b[_0x546ccd(0x179)]))await runCreate({'projectName':_0x4b0df7,'appCode':_0x42c98b[_0x546ccd(0x171)],'env':_0x42c98b[_0x546ccd(0x1ad)]},_0x42c98b);else{if(_0x4b0df7){const _0x1b6faa=await selectSingleAppcode(_0x42c98b[_0x546ccd(0x186)]);await runCreate({'projectName':_0x4b0df7,'appCode':_0x1b6faa||undefined,'env':_0x42c98b[_0x546ccd(0x1ad)]},_0x42c98b);}else await guidedCreateProject(_0x323405=>runCreate(_0x323405,_0x42c98b),_0x42c98b[_0x546ccd(0x1ad)],_0x42c98b['cookie']);}}async function runCreate(_0xdc526c,_0x26a179){const _0x40abff=a178_0x6994;_0xdc526c[_0x40abff(0x13f)]=validateProjectName(_0xdc526c['projectName']);const _0x2ecbca=_0x26a179[_0x40abff(0x18c)]?process[_0x40abff(0x16d)]():a178_0x5308e7[_0x40abff(0x18a)](process[_0x40abff(0x16d)](),_0xdc526c[_0x40abff(0x13f)]);if(_0x26a179[_0x40abff(0x18c)]){if(a178_0x569b84[_0x40abff(0x154)](_0x2ecbca)[_0x40abff(0x1ba)]>0x0)throw CliErrors[_0x40abff(0x157)](_0x40abff(0x1a2),_0x40abff(0x1b8));}else{if(a178_0x569b84[_0x40abff(0x17a)](_0x2ecbca))throw new Error(_0x40abff(0x180)+_0xdc526c['projectName']+_0x40abff(0x182));}let _0x55b8af=null;const _0x59e9da=_0x26a179[_0x40abff(0x18c)]?readDirectoryIdentity(_0x2ecbca):null;let _0x44aefc=null;try{a178_0x569b84[_0x40abff(0x17c)](a178_0x5308e7[_0x40abff(0x149)](_0x2ecbca),a178_0x569b84[_0x40abff(0x15c)][_0x40abff(0x19a)]);}catch{throw new Error(_0x40abff(0x160));}logger['info'](_0x40abff(0x145),'Starting\x20project\x20creation:\x20'+_0xdc526c[_0x40abff(0x13f)],{'projectDir':_0x2ecbca,'appCode':_0xdc526c[_0x40abff(0x171)]}),console[_0x40abff(0x174)](),console[_0x40abff(0x174)](a178_0x2d6ee6['green'](_0x40abff(0x1b1))+_0x40abff(0x159)+a178_0x2d6ee6[_0x40abff(0x1b9)](_0xdc526c[_0x40abff(0x13f)])+(_0xdc526c[_0x40abff(0x171)]?_0x40abff(0x188)+a178_0x2d6ee6[_0x40abff(0x142)](_0xdc526c[_0x40abff(0x171)]):''));try{let _0x4dd1d8=_0xdc526c[_0x40abff(0x13f)];_0x26a179[_0x40abff(0x18c)]&&(_0x44aefc=a178_0x569b84[_0x40abff(0x156)](a178_0x5308e7[_0x40abff(0x1a0)](_0x2ecbca,'.rabetbase-create-')),_0x4dd1d8=a178_0x5308e7[_0x40abff(0x1a6)](process[_0x40abff(0x16d)](),a178_0x5308e7[_0x40abff(0x1a0)](_0x44aefc,_0x40abff(0x16e))));const _0x2abb4f=a178_0x5308e7['resolve'](process['cwd'](),_0x4dd1d8);await runTask(_0x40abff(0x163),_0x5abfad=>copyProjectTemplate(_0x4dd1d8,_0x226811=>_0x5abfad(projectTemplateStageLabel(_0x226811)),_0x26a179[_0x40abff(0x15f)]),_0x40abff(0x178)),_0x55b8af=_0x26a179[_0x40abff(0x18c)]?null:readDirectoryIdentity(_0x2ecbca);if(!_0x26a179['currentDir']&&!_0x55b8af)throw new Error(_0x40abff(0x14f));await updatePackageJsonName(_0x4dd1d8,_0xdc526c[_0x40abff(0x13f)]),await runTask(_0x40abff(0x1b6),()=>installDependencies(_0x4dd1d8)),await runTask('Format\x20code',()=>formatProjectCode(_0x4dd1d8)),await configureAppCode(_0x4dd1d8,_0xdc526c[_0x40abff(0x13f)],_0xdc526c[_0x40abff(0x171)]||'',_0xdc526c[_0x40abff(0x1ad)]);let _0x13c108=![];if(_0xdc526c[_0x40abff(0x171)]){console[_0x40abff(0x174)](_0x40abff(0x153));const _0x5f3657=process['cwd']();try{process[_0x40abff(0x166)](_0x2abb4f);const _0x783846=_0xdc526c[_0x40abff(0x1ad)]||_0x40abff(0x15e);initEnv(_0x783846);const {configArray:_0x2d113c}=await fetchModelList(_0xdc526c[_0x40abff(0x171)],_0x26a179[_0x40abff(0x186)]||''),_0x1c81f7=DEFAULT_API_DIR,_0x33176e=await generateApiFile(_0x2d113c,'',_0xdc526c[_0x40abff(0x171)],!![],_0x783846,_0x1c81f7,undefined,getSdkClientRoutingConfig(),{'overwriteTypescript':!![]});console['log'](_0x40abff(0x19d)+_0x2d113c[_0x40abff(0x1ba)]+'\x20dataset(s),\x20generated\x20'+_0x33176e[_0x40abff(0x161)]+_0x40abff(0x17e)),logger[_0x40abff(0x19c)](_0x40abff(0x145),_0x40abff(0x16c)+_0xdc526c[_0x40abff(0x171)]);}catch(_0x59a849){_0x13c108=!![],console[_0x40abff(0x174)](_0x40abff(0x15a)+CLI_BIN_NAME+_0x40abff(0x175)),logger[_0x40abff(0x1a3)]('create',_0x40abff(0x16a),{'error':_0x59a849 instanceof Error?_0x59a849[_0x40abff(0x1be)]:String(_0x59a849)});}finally{process['chdir'](_0x5f3657);}}if(_0x26a179['currentDir']){if(!_0x44aefc||!_0x59e9da)throw new Error(_0x40abff(0x168));commitCurrentDirectoryProject(_0x2ecbca,_0x44aefc,_0x59e9da),_0x44aefc=null;}try{logger['setLogPath'](_0x2ecbca),logger[_0x40abff(0x164)](_0x40abff(0x145),_0x40abff(0x176)+_0xdc526c[_0x40abff(0x13f)]);}catch(_0x46dcf1){console[_0x40abff(0x1a3)](_0x40abff(0x1bd)+(_0x46dcf1 instanceof Error?_0x46dcf1['message']:String(_0x46dcf1)));}console[_0x40abff(0x174)](),console[_0x40abff(0x174)](a178_0x2d6ee6[_0x40abff(0x1b9)]('─'[_0x40abff(0x140)](0x3c))),console[_0x40abff(0x174)](a178_0x2d6ee6[_0x40abff(0x142)][_0x40abff(0x1b5)]('🚀\x20Next\x20Steps:')),console[_0x40abff(0x174)]();const _0x6567e6=_0x26a179[_0x40abff(0x18c)]?CLI_BIN_NAME+_0x40abff(0x173):_0x40abff(0x1a8)+_0xdc526c[_0x40abff(0x13f)]+_0x40abff(0x14c)+CLI_BIN_NAME+_0x40abff(0x173);console[_0x40abff(0x174)](_0x40abff(0x14d)+a178_0x2d6ee6[_0x40abff(0x142)][_0x40abff(0x1b5)](_0x6567e6)),_0x13c108&&console[_0x40abff(0x174)](_0x40abff(0x183)+a178_0x2d6ee6['cyan'][_0x40abff(0x1b5)](CLI_BIN_NAME+'\x20api\x20pull\x20--force\x20--yes')),console['log'](a178_0x2d6ee6[_0x40abff(0x1b9)]('─'[_0x40abff(0x140)](0x3c)));}catch(_0x139550){logger[_0x40abff(0x191)](_0x40abff(0x145),_0x40abff(0x1b7)+_0xdc526c[_0x40abff(0x13f)],{'error':_0x139550 instanceof Error?_0x139550[_0x40abff(0x1be)]:String(_0x139550)});try{const _0x5d95f7=readDirectoryIdentity(_0x2ecbca);if(_0x26a179['currentDir']&&_0x44aefc)a178_0x569b84[_0x40abff(0x143)](_0x44aefc,{'recursive':!![],'force':!![]});else{if(_0x55b8af&&_0x5d95f7?.[_0x40abff(0x199)]===_0x55b8af[_0x40abff(0x199)]&&_0x5d95f7[_0x40abff(0x181)]===_0x55b8af[_0x40abff(0x181)])console[_0x40abff(0x174)]('*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20'+_0x2ecbca),a178_0x569b84[_0x40abff(0x143)](_0x2ecbca,{'recursive':!![],'force':!![]});else _0x5d95f7&&logger[_0x40abff(0x1a3)](_0x40abff(0x145),_0x40abff(0x177)+_0x2ecbca);}}catch{logger[_0x40abff(0x1a3)](_0x40abff(0x145),_0x40abff(0x172)+_0x2ecbca);}throw _0x139550;}}async function runTask(_0x119018,_0x13d419,_0x9166a9=_0x119018){const _0x31e269=a178_0x6994,_0xe1b206=a178_0x5c2aa3(_0x119018+_0x31e269(0x1af))[_0x31e269(0x1a1)]();try{const _0x1d72d0=await _0x13d419(_0x2a4106=>{const _0x9fec5f=_0x31e269;_0xe1b206['text']=_0x2a4106+_0x9fec5f(0x1af);});_0xe1b206[_0x31e269(0x14b)](),console[_0x31e269(0x174)](''+a178_0x2d6ee6[_0x31e269(0x1b9)]('\x20√\x20')+_0x9166a9+'\x20'+a178_0x2d6ee6[_0x31e269(0x1b0)]('['+_0x1d72d0+']'));}catch(_0x29604b){_0xe1b206[_0x31e269(0x195)](_0x119018);throw _0x29604b;}}function projectTemplateStageLabel(_0xae6621){const _0x1b75be=a178_0x6994;switch(_0xae6621){case _0x1b75be(0x158):return _0x1b75be(0x163);case _0x1b75be(0x184):return'Downloading\x20project\x20template';case _0x1b75be(0x1bb):return _0x1b75be(0x1bf);case _0x1b75be(0x165):return _0x1b75be(0x15d);case'copying':return'Copying\x20local\x20template\x20source';}}async function updatePackageJsonName(_0x303443,_0x4093d0){const _0x52186c=a178_0x6994,_0x54bf50=a178_0x5308e7[_0x52186c(0x18a)](process[_0x52186c(0x16d)](),_0x303443),_0x38d65d=a178_0x5308e7[_0x52186c(0x1a0)](_0x54bf50,_0x52186c(0x14a));try{console[_0x52186c(0x174)](_0x52186c(0x14e));const _0x337ee8=getRabetbaseCliPackageRoot(),_0x26e28a=a178_0x5308e7['join'](_0x337ee8,'package.json');let _0x3f4395=_0x52186c(0x148);try{const _0xa330a0=JSON[_0x52186c(0x185)](a178_0x569b84[_0x52186c(0x190)](_0x26e28a,_0x52186c(0x1b3)));_0x3f4395=_0xa330a0[_0x52186c(0x1ab)]||_0x52186c(0x148);}catch{}const _0x58c500=a178_0x569b84[_0x52186c(0x190)](_0x38d65d,'utf8'),_0x209553=JSON['parse'](_0x58c500);_0x209553['name']=_0x4093d0,_0x209553[_0x52186c(0x1ac)]=_0x4093d0+_0x52186c(0x18b)+_0x3f4395,a178_0x569b84[_0x52186c(0x196)](_0x38d65d,JSON[_0x52186c(0x18e)](_0x209553,null,0x2)+'\x0a',_0x52186c(0x1b3)),console[_0x52186c(0x174)](_0x52186c(0x198)+_0x4093d0),logger['info'](_0x52186c(0x145),_0x52186c(0x16b));}catch(_0x3fcc08){logger[_0x52186c(0x191)](_0x52186c(0x145),_0x52186c(0x18f));throw _0x3fcc08;}}async function configureAppCode(_0x127977,_0x12489f,_0x1527fe,_0x2df9c8){const _0x2abf84=a178_0x6994,_0x240c9c=a178_0x5308e7[_0x2abf84(0x18a)](process[_0x2abf84(0x16d)](),_0x127977),_0x25d0b2=a178_0x5308e7[_0x2abf84(0x1a0)](_0x240c9c,NEW_CONFIG_NAME);try{_0x1527fe?console[_0x2abf84(0x174)](_0x2abf84(0x147)+_0x12489f+':\x20'+_0x1527fe):console['log'](_0x2abf84(0x1b2)+_0x12489f);const _0x5790ee=getRabetbaseCliPackageRoot(),_0x4f4e6e=a178_0x5308e7[_0x2abf84(0x1a0)](_0x5790ee,'package.json');let _0x556f6d='1.0.0';try{const _0x3bcedc=JSON[_0x2abf84(0x185)](a178_0x569b84['readFileSync'](_0x4f4e6e,'utf8'));_0x556f6d=_0x3bcedc[_0x2abf84(0x1ab)]||_0x2abf84(0x148);}catch{}const {globalConfig:_0x424b6d}=loadRawConfigLayers(),_0x1a4729=typeof _0x424b6d['env']==='string'?_0x424b6d['env']:undefined,_0x5ee7b6={};for(const _0x5ea567 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x424b6d[_0x5ea567]!=null)_0x5ee7b6[_0x5ea567]=_0x424b6d[_0x5ea567];}const _0x52a2d7=buildCanonicalProjectConfig(_0x5ee7b6,{'appCodes':_0x1527fe?[_0x1527fe]:[],'env':_0x2df9c8||_0x1a4729||_0x2abf84(0x15e),'metadata':{'createdAt':new Date()[_0x2abf84(0x155)](),'version':_0x556f6d}});writeConfigFile(_0x25d0b2,_0x52a2d7),await generateSdkConfigFile(a178_0x5308e7['join'](_0x240c9c,DEFAULT_API_DIR),getSdkClientRoutingConfig()),writeProjectDomainRoutingManifest(_0x240c9c),_0x1527fe?console['log'](_0x2abf84(0x1ae)+Object[_0x2abf84(0x1a4)](_0x52a2d7[_0x2abf84(0x17b)]||{})['join'](',\x20')+'\x20|\x20Default:\x20implicit\x20(single\x20app)'):console[_0x2abf84(0x174)]('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+_0x2abf84(0x170)),logger[_0x2abf84(0x19c)](_0x2abf84(0x145),_0x2abf84(0x162)+_0x1527fe);}catch(_0x4109bf){logger[_0x2abf84(0x191)]('create',_0x2abf84(0x151));throw _0x4109bf;}}
@@ -1 +1 @@
1
- const a179_0x3f53e7=a179_0x1e59;function a179_0x1e59(_0x376516,_0x1f5f1c){_0x376516=_0x376516-0xba;const _0x33f693=a179_0x33f6();let _0x1e59c9=_0x33f693[_0x376516];return _0x1e59c9;}(function(_0x2324dc,_0x3df59f){const _0x725813=a179_0x1e59,_0x219d02=_0x2324dc();while(!![]){try{const _0x5a06ee=-parseInt(_0x725813(0x10c))/0x1*(-parseInt(_0x725813(0x121))/0x2)+-parseInt(_0x725813(0x105))/0x3*(-parseInt(_0x725813(0x113))/0x4)+-parseInt(_0x725813(0xbf))/0x5*(parseInt(_0x725813(0x10b))/0x6)+-parseInt(_0x725813(0x10f))/0x7*(parseInt(_0x725813(0x11d))/0x8)+parseInt(_0x725813(0x101))/0x9*(-parseInt(_0x725813(0xfc))/0xa)+-parseInt(_0x725813(0x10e))/0xb+parseInt(_0x725813(0x128))/0xc*(parseInt(_0x725813(0xef))/0xd);if(_0x5a06ee===_0x3df59f)break;else _0x219d02['push'](_0x219d02['shift']());}catch(_0xc7934){_0x219d02['push'](_0x219d02['shift']());}}}(a179_0x33f6,0x57a92));import{createHash}from'node:crypto';import a179_0x209989 from'node:fs/promises';import a179_0x4429bd 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';function a179_0x33f6(){const _0x2f9689=['relative','template.zip','1657520uKpLxw','resolve','push','protocol','isDirectory','.rabetbase-create-','CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.','pathname','Check\x20your\x20network\x20and\x20retry.\x20Details:\x20','.env.','12592BXGYUR','mode',',\x20received\x20','name','259384OoodLw','Use\x20a\x20different\x20project\x20name.','.env.example','writeFile','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','hex','body','12YgeyjL','Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','Check\x20the\x20source\x20directory\x20and\x20retry.','arrayBuffer','from','version','trim','CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20','package.json','sep','.DS_Store','39975arnHVp','abort','readdir','mkdir','ino','Local\x20template\x20source\x20is\x20not\x20a\x20directory:\x20','node_modules','posix','cdn','Choose\x20a\x20different\x20project\x20name\x20or\x20remove\x20the\x20directory\x20first.','parse','realpath','code','Local\x20template\x20source\x20does\x20not\x20exist:\x20','join','CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.','isAbsolute','message','length','.codegraph','Local\x20project\x20template\x20must\x20not\x20contain\x20symlinks:\x20','content-length','href','get','extracting','downloading','has','CDN\x20config\x20does\x20not\x20define\x20template\x20\x22','projectTemplate','.rabetbase','validation','isSafeInteger','.lovrabet.log','sub-app-react-demo','dirname','resolving','copying','getReader','isFinite','sha256','.env','.git','headers','origin','size','cancel','application/zip','CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20','14161381MWKTkZ','Local\x20template\x20source\x20and\x20project\x20output\x20must\x20not\x20overlap.','chmod','toLowerCase','copyFile','EEXIST','access','number','concat','test','utf8','dist','.idea','20wAyiRi','dev','Project\x20template\x20package.json\x20is\x20invalid.','read','object','18027dnELTi','lstat','mkdtemp','Project\x20directory\x20already\x20exists:\x20','3VMFYMr','startsWith','includes','CDN\x20project\x20template\x20checksum\x20verification\x20failed.','isFile','ENOENT','468Fyykyj','2fIcsuw','readFile','1736295FBtHlY','2751bTYePm','Choose\x20an\x20output\x20directory\x20outside\x20the\x20template\x20source.'];a179_0x33f6=function(){return _0x2f9689;};return a179_0x33f6();}const TEMPLATE_ID=a179_0x3f53e7(0xe0),ARCHIVE_TIMEOUT_MS=0x3a98,MAX_ARCHIVE_SIZE=0x14*0x400*0x400;function nonEmptyString(_0x3d727b){const _0xd34abf=a179_0x3f53e7;return typeof _0x3d727b==='string'&&_0x3d727b[_0xd34abf(0xba)]()?_0x3d727b[_0xd34abf(0xba)]():null;}function parseDescriptor(_0x284cc0){const _0x14f230=a179_0x3f53e7;if(!_0x284cc0||typeof _0x284cc0!==_0x14f230(0x100))throw new Error(_0x14f230(0xda)+TEMPLATE_ID+'\x22.');const _0x196c4c=_0x284cc0,_0x40a9d3=nonEmptyString(_0x196c4c[_0x14f230(0x12d)]),_0x24791a=nonEmptyString(_0x196c4c[_0x14f230(0x120)]),_0x224384=nonEmptyString(_0x196c4c[_0x14f230(0xe6)])?.[_0x14f230(0xf2)](),_0x32f4c1=_0x196c4c[_0x14f230(0xeb)];if(!_0x40a9d3||!_0x24791a||_0x24791a!==a179_0x4429bd[_0x14f230(0xc6)]['basename'](_0x24791a)||_0x24791a[_0x14f230(0x107)]('\x5c')||!_0x224384||!/^sha256:[a-f0-9]{64}$/[_0x14f230(0xf8)](_0x224384)||typeof _0x32f4c1!==_0x14f230(0xf6)||!Number[_0x14f230(0xde)](_0x32f4c1)||_0x32f4c1<=0x0||_0x32f4c1>MAX_ARCHIVE_SIZE)throw new Error('CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22'+TEMPLATE_ID+'\x22.');return{'version':_0x40a9d3,'name':_0x24791a,'sha256':_0x224384,'size':_0x32f4c1};}async function fetchWithTimeout(_0x12042a,_0x4372dd,_0x3dc0e2,_0x3088b9){const _0x16e844=a179_0x3f53e7,_0x11c430=new AbortController(),_0x5675f8=setTimeout(()=>_0x11c430[_0x16e844(0xc0)](),_0x4372dd);try{const _0x1dc9c3=await fetch(_0x12042a,{'headers':{'Accept':_0x3dc0e2},'signal':_0x11c430['signal']});return await _0x3088b9(_0x1dc9c3);}finally{clearTimeout(_0x5675f8);}}async function fetchTemplateDescriptor(){const _0x33822f=a179_0x3f53e7,_0x51938e=await getRabetbaseCdnConfig();if(!_0x51938e)throw new Error('Rabetbase\x20CDN\x20config\x20is\x20unavailable.');return parseDescriptor(_0x51938e[_0x33822f(0xdb)]);}function resolveArchiveUrl(_0x421b13){const _0x3e3c14=a179_0x3f53e7,_0x4a33ec=new URL(PROJECT_TEMPLATE_ASSET_BASE_URL+'/'),_0x1b28bf=new URL(_0x421b13,_0x4a33ec);if(_0x1b28bf[_0x3e3c14(0x116)]!=='https:'||_0x1b28bf[_0x3e3c14(0xea)]!==_0x4a33ec[_0x3e3c14(0xea)]||!_0x1b28bf[_0x3e3c14(0x11a)][_0x3e3c14(0x106)](_0x4a33ec[_0x3e3c14(0x11a)]))throw new Error(_0x3e3c14(0xce));return _0x1b28bf[_0x3e3c14(0xd5)];}async function readResponseBytes(_0x6afcb8,_0x4c08ef){const _0x447a60=a179_0x3f53e7;if(!_0x6afcb8[_0x447a60(0x127)]){const _0x279ba0=Buffer[_0x447a60(0x12c)](await _0x6afcb8[_0x447a60(0x12b)]());if(_0x279ba0['length']>_0x4c08ef)throw new Error(_0x447a60(0x125));return _0x279ba0;}const _0x40d438=_0x6afcb8[_0x447a60(0x127)][_0x447a60(0xe4)](),_0x2daed3=[];let _0x2db66a=0x0;try{while(!![]){const {done:_0x3bb467,value:_0x45834b}=await _0x40d438[_0x447a60(0xff)]();if(_0x3bb467)break;_0x2db66a+=_0x45834b['byteLength'];if(_0x2db66a>_0x4c08ef){await _0x40d438[_0x447a60(0xec)]();throw new Error('CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.');}_0x2daed3[_0x447a60(0x115)](Buffer['from'](_0x45834b));}}finally{_0x40d438['releaseLock']();}return Buffer[_0x447a60(0xf7)](_0x2daed3,_0x2db66a);}async function downloadArchive(_0x262525,_0x5d5d98,_0x20dd8c){const _0x57b90a=a179_0x3f53e7,_0x51397d=await fetchWithTimeout(resolveArchiveUrl(_0x262525[_0x57b90a(0x120)]),ARCHIVE_TIMEOUT_MS,_0x57b90a(0xed),async _0x65627b=>{const _0x38d275=_0x57b90a;if(!_0x65627b['ok'])throw new Error(_0x38d275(0xbb)+_0x65627b['status']+'.');const _0x839f9b=Number(_0x65627b[_0x38d275(0xe9)][_0x38d275(0xd6)](_0x38d275(0xd4)));if(Number[_0x38d275(0xe5)](_0x839f9b)&&_0x839f9b>MAX_ARCHIVE_SIZE)throw new Error(_0x38d275(0x119));return readResponseBytes(_0x65627b,_0x262525[_0x38d275(0xeb)]);});if(_0x51397d[_0x57b90a(0xd1)]!==_0x262525[_0x57b90a(0xeb)])throw new Error(_0x57b90a(0xee)+_0x262525[_0x57b90a(0xeb)]+_0x57b90a(0x11f)+_0x51397d['length']+'.');_0x20dd8c?.('verifying');const _0x26c9c5='sha256:'+createHash('sha256')['update'](_0x51397d)['digest'](_0x57b90a(0x126));if(_0x26c9c5!==_0x262525[_0x57b90a(0xe6)])throw new Error(_0x57b90a(0x108));await a179_0x209989[_0x57b90a(0x124)](_0x5d5d98,_0x51397d,{'flag':'wx'});}async function assertTemplateRoot(_0x5a5c77){const _0x22fd61=a179_0x3f53e7,_0x540dfa=a179_0x4429bd[_0x22fd61(0xcd)](_0x5a5c77,_0x22fd61(0xbc)),_0x58aed3=JSON[_0x22fd61(0xc9)](await a179_0x209989[_0x22fd61(0x10d)](_0x540dfa,_0x22fd61(0xf9)));if(!_0x58aed3||typeof _0x58aed3!==_0x22fd61(0x100))throw new Error(_0x22fd61(0xfe));}const LOCAL_FORBIDDEN_NAMES=new Set([a179_0x3f53e7(0xbe),a179_0x3f53e7(0xd2),a179_0x3f53e7(0xe8),a179_0x3f53e7(0xfb),'.lovrabet.json',a179_0x3f53e7(0xdf),a179_0x3f53e7(0xdc),'.rabetbase.json',a179_0x3f53e7(0xfa),a179_0x3f53e7(0xc5)]);function isForbiddenTemplateEntry(_0x5d647c){const _0x1930c0=a179_0x3f53e7;if(LOCAL_FORBIDDEN_NAMES[_0x1930c0(0xd9)](_0x5d647c))return!![];return _0x5d647c===_0x1930c0(0xe7)||_0x5d647c[_0x1930c0(0x106)](_0x1930c0(0x11c))&&_0x5d647c!==_0x1930c0(0x123);}function containsPath(_0x65f19a,_0x1d572b){const _0x4118f8=a179_0x3f53e7,_0x31745b=a179_0x4429bd[_0x4118f8(0x111)](_0x65f19a,_0x1d572b);return _0x31745b===''||!_0x31745b['startsWith']('..'+a179_0x4429bd[_0x4118f8(0xbd)])&&_0x31745b!=='..'&&!a179_0x4429bd[_0x4118f8(0xcf)](_0x31745b);}async function copyLocalTemplateDirectory(_0x47fbfe,_0x5a83ad){const _0x386992=a179_0x3f53e7;await a179_0x209989['mkdir'](_0x5a83ad,{'recursive':!![]});for(const _0x1c0f6b of await a179_0x209989[_0x386992(0xc1)](_0x47fbfe,{'withFileTypes':!![]})){const _0x11baba=a179_0x4429bd[_0x386992(0xcd)](_0x47fbfe,_0x1c0f6b[_0x386992(0x120)]),_0x7b7e95=a179_0x4429bd[_0x386992(0xcd)](_0x5a83ad,_0x1c0f6b[_0x386992(0x120)]);if(isForbiddenTemplateEntry(_0x1c0f6b[_0x386992(0x120)]))throw new Error('Local\x20project\x20template\x20contains\x20a\x20local-only\x20entry:\x20'+_0x11baba);const _0xd94d3d=await a179_0x209989['lstat'](_0x11baba);if(_0xd94d3d['isSymbolicLink']())throw new Error(_0x386992(0xd3)+_0x11baba);if(_0xd94d3d['isDirectory']()){await copyLocalTemplateDirectory(_0x11baba,_0x7b7e95);continue;}if(!_0xd94d3d[_0x386992(0x109)]())continue;await a179_0x209989[_0x386992(0xf3)](_0x11baba,_0x7b7e95),await a179_0x209989[_0x386992(0xf1)](_0x7b7e95,_0xd94d3d[_0x386992(0x11e)]&0x1ff);}}async function readTemplateVersion(_0x392a07){const _0x1948d9=a179_0x3f53e7,_0x15044e=JSON['parse'](await a179_0x209989[_0x1948d9(0x10d)](a179_0x4429bd[_0x1948d9(0xcd)](_0x392a07,_0x1948d9(0xbc)),'utf8'));return nonEmptyString(_0x15044e[_0x1948d9(0x12d)])||'local';}async function readDirectoryIdentity(_0x204910){const _0x45cc6b=a179_0x3f53e7;try{const _0x20001a=await a179_0x209989[_0x45cc6b(0x102)](_0x204910);if(!_0x20001a['isDirectory']())return null;return{'dev':_0x20001a[_0x45cc6b(0xfd)],'ino':_0x20001a[_0x45cc6b(0xc3)]};}catch{return null;}}async function commitStagedProject(_0x1e51f5,_0x42197e){const _0x402177=a179_0x3f53e7;await a179_0x209989[_0x402177(0xc2)](_0x42197e);const _0x184f80=await readDirectoryIdentity(_0x42197e);if(!_0x184f80)throw new Error('Unable\x20to\x20claim\x20the\x20project\x20directory.');try{for(const _0x186374 of await a179_0x209989[_0x402177(0xc1)](_0x1e51f5)){await a179_0x209989['rename'](a179_0x4429bd[_0x402177(0xcd)](_0x1e51f5,_0x186374),a179_0x4429bd[_0x402177(0xcd)](_0x42197e,_0x186374));}}catch(_0x1b7fed){const _0xb7dbb3=await readDirectoryIdentity(_0x42197e);_0xb7dbb3?.[_0x402177(0xfd)]===_0x184f80[_0x402177(0xfd)]&&_0xb7dbb3[_0x402177(0xc3)]===_0x184f80[_0x402177(0xc3)]&&await a179_0x209989['rm'](_0x42197e,{'recursive':!![],'force':!![]});throw _0x1b7fed;}}export async function materializeProjectTemplate(_0xd2b62b,_0x233cde){const _0xf2d574=a179_0x3f53e7,_0x5279dd=a179_0x4429bd[_0xf2d574(0x114)](_0xd2b62b),_0x361655=a179_0x4429bd['dirname'](_0x5279dd);try{await a179_0x209989[_0xf2d574(0x102)](_0x5279dd);throw new Error(_0xf2d574(0x104)+_0x5279dd);}catch(_0xcd4ec1){if(_0xcd4ec1[_0xf2d574(0xcb)]!==_0xf2d574(0x10a))throw _0xcd4ec1;}const _0x5980a6=await a179_0x209989[_0xf2d574(0x103)](a179_0x4429bd[_0xf2d574(0xcd)](_0x361655,'.rabetbase-create-')),_0x51ab4b=a179_0x4429bd[_0xf2d574(0xcd)](_0x5980a6,'project'),_0x412aa4=a179_0x4429bd[_0xf2d574(0xcd)](_0x5980a6,_0xf2d574(0x112));try{try{_0x233cde?.(_0xf2d574(0xe2));const _0x124c03=await fetchTemplateDescriptor();return _0x233cde?.(_0xf2d574(0xd8)),await downloadArchive(_0x124c03,_0x412aa4,_0x233cde),_0x233cde?.(_0xf2d574(0xd7)),await extractProjectTemplateArchive(_0x412aa4,_0x51ab4b),await assertTemplateRoot(_0x51ab4b),await commitStagedProject(_0x51ab4b,_0x5279dd),{'source':_0xf2d574(0xc7),'version':_0x124c03[_0xf2d574(0x12d)]};}catch(_0x5417b3){if(_0x5417b3[_0xf2d574(0xcb)]===_0xf2d574(0xf4))throw CliErrors[_0xf2d574(0xdd)](_0xf2d574(0x104)+_0x5279dd,_0xf2d574(0x122));const _0x3312b4=_0x5417b3 instanceof Error?_0x5417b3[_0xf2d574(0xd0)]:String(_0x5417b3);throw CliErrors[_0xf2d574(0xdd)](_0xf2d574(0x129),_0xf2d574(0x11b)+_0x3312b4);}}finally{await a179_0x209989['rm'](_0x5980a6,{'recursive':!![],'force':!![]});}}export async function materializeLocalProjectTemplate(_0x20f78f,_0x70e05,_0x2eaab7){const _0xd705c9=a179_0x3f53e7;let _0xd1ffc5;try{_0xd1ffc5=await a179_0x209989['realpath'](a179_0x4429bd[_0xd705c9(0x114)](_0x20f78f));}catch{throw CliErrors[_0xd705c9(0xdd)](_0xd705c9(0xcc)+a179_0x4429bd[_0xd705c9(0x114)](_0x20f78f),'Pass\x20a\x20directory\x20containing\x20the\x20template\x20source\x20package.json.');}const _0x4c2479=await a179_0x209989[_0xd705c9(0x102)](_0xd1ffc5);if(!_0x4c2479[_0xd705c9(0x117)]())throw CliErrors['validation'](_0xd705c9(0xc4)+_0xd1ffc5);const _0x1fb2e0=a179_0x4429bd[_0xd705c9(0x114)](_0x70e05),_0xb530f4=await a179_0x209989[_0xd705c9(0xca)](a179_0x4429bd[_0xd705c9(0xe1)](_0x1fb2e0)),_0x5916f8=a179_0x4429bd[_0xd705c9(0xcd)](_0xb530f4,a179_0x4429bd['basename'](_0x1fb2e0));if(containsPath(_0xd1ffc5,_0x5916f8)||containsPath(_0x5916f8,_0xd1ffc5))throw CliErrors['validation'](_0xd705c9(0xf0),_0xd705c9(0x110));try{await a179_0x209989[_0xd705c9(0x102)](_0x5916f8);throw CliErrors[_0xd705c9(0xdd)](_0xd705c9(0x104)+_0x5916f8,_0xd705c9(0xc8));}catch(_0x47132f){if(_0x47132f[_0xd705c9(0xcb)]!==_0xd705c9(0x10a))throw _0x47132f;}const _0xdf6455=a179_0x4429bd[_0xd705c9(0xe1)](_0x5916f8);await a179_0x209989[_0xd705c9(0xf5)](_0xdf6455);const _0x414c80=await a179_0x209989[_0xd705c9(0x103)](a179_0x4429bd[_0xd705c9(0xcd)](_0xdf6455,_0xd705c9(0x118))),_0x1b29f9=a179_0x4429bd['join'](_0x414c80,'project');try{_0x2eaab7?.(_0xd705c9(0xe3)),await copyLocalTemplateDirectory(_0xd1ffc5,_0x1b29f9),await assertTemplateRoot(_0x1b29f9);const _0x6daec1=await readTemplateVersion(_0x1b29f9);return await commitStagedProject(_0x1b29f9,_0x5916f8),{'source':'local','version':_0x6daec1};}catch(_0x21c048){const _0x3e2b8e=_0x21c048 instanceof Error?_0x21c048['message']:String(_0x21c048);throw CliErrors[_0xd705c9(0xdd)]('Invalid\x20local\x20template\x20source:\x20'+_0x3e2b8e,_0xd705c9(0x12a));}finally{await a179_0x209989['rm'](_0x414c80,{'recursive':!![],'force':!![]});}}
1
+ const a179_0x372b09=a179_0x47c9;(function(_0xe67ce0,_0x3316b7){const _0x154601=a179_0x47c9,_0x375403=_0xe67ce0();while(!![]){try{const _0x42ed7a=parseInt(_0x154601(0xa0))/0x1*(parseInt(_0x154601(0xce))/0x2)+parseInt(_0x154601(0xfe))/0x3*(parseInt(_0x154601(0xbc))/0x4)+parseInt(_0x154601(0xe0))/0x5+parseInt(_0x154601(0xf3))/0x6*(parseInt(_0x154601(0xba))/0x7)+-parseInt(_0x154601(0xe8))/0x8+-parseInt(_0x154601(0x104))/0x9*(parseInt(_0x154601(0xc8))/0xa)+parseInt(_0x154601(0x9e))/0xb;if(_0x42ed7a===_0x3316b7)break;else _0x375403['push'](_0x375403['shift']());}catch(_0x54f7f3){_0x375403['push'](_0x375403['shift']());}}}(a179_0xd1da,0x9d224));function a179_0xd1da(){const _0x594f61=['join','get','dev','concat','9dEOjpP','https:','node_modules','readdir','sep','.env','status','mkdtemp','.lovrabet.json','Local\x20template\x20source\x20is\x20not\x20a\x20directory:\x20','parse','9176002aIlgcn',',\x20received\x20','149551IzcNxA','downloading','local','href','version','toLowerCase','sha256:','Check\x20the\x20source\x20directory\x20and\x20retry.','test','mode','pathname','abort','hex','Choose\x20a\x20different\x20project\x20name\x20or\x20remove\x20the\x20directory\x20first.','lstat','Local\x20project\x20template\x20contains\x20a\x20local-only\x20entry:\x20','verifying','code','sub-app-react-demo','utf8','.env.','Local\x20template\x20source\x20and\x20project\x20output\x20must\x20not\x20overlap.','readFile','.lovrabet.log','length','CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20','100968dIiGOy','sha256','2236khDuZi','CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','protocol','validation','copyFile','isFile','realpath','dirname','.idea','.rabetbase-create-','application/zip','12135650byXpsL','includes','from','rename','isDirectory','.env.example','2jjVTCc','startsWith','.DS_Store','CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.','template.zip','update','read','package.json','resolve','ino','message','origin','isFinite','headers','cdn','copying','signal','.rabetbase','4793235DlLSAP','access','resolving','name','CDN\x20project\x20template\x20checksum\x20verification\x20failed.','isAbsolute','CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22','CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.','8567888ysfLuC','chmod','isSafeInteger','object','Unable\x20to\x20claim\x20the\x20project\x20directory.','trim','releaseLock','CDN\x20config\x20does\x20not\x20define\x20template\x20\x22','Invalid\x20local\x20template\x20source:\x20','Pass\x20a\x20directory\x20containing\x20the\x20template\x20source\x20package.json.','Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','168fBeBPY','mkdir','.git','body','.codegraph','basename','size','project','ENOENT','Project\x20directory\x20already\x20exists:\x20','isSymbolicLink','3123BhmTum','number'];a179_0xd1da=function(){return _0x594f61;};return a179_0xd1da();}import{createHash}from'node:crypto';import a179_0x24c6ba from'node:fs/promises';import a179_0x4830f4 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=a179_0x372b09(0xb2),ARCHIVE_TIMEOUT_MS=0x3a98,MAX_ARCHIVE_SIZE=0x14*0x400*0x400;function nonEmptyString(_0x757b70){const _0x2a8d65=a179_0x372b09;return typeof _0x757b70==='string'&&_0x757b70[_0x2a8d65(0xed)]()?_0x757b70['trim']():null;}function parseDescriptor(_0x495b6b){const _0x448e95=a179_0x372b09;if(!_0x495b6b||typeof _0x495b6b!=='object')throw new Error(_0x448e95(0xef)+TEMPLATE_ID+'\x22.');const _0xe4838a=_0x495b6b,_0x1e31ec=nonEmptyString(_0xe4838a['version']),_0x3a0097=nonEmptyString(_0xe4838a[_0x448e95(0xe3)]),_0x5bfabf=nonEmptyString(_0xe4838a[_0x448e95(0xbb)])?.[_0x448e95(0xa5)](),_0x5ef750=_0xe4838a['size'];if(!_0x1e31ec||!_0x3a0097||_0x3a0097!==a179_0x4830f4['posix'][_0x448e95(0xf8)](_0x3a0097)||_0x3a0097[_0x448e95(0xc9)]('\x5c')||!_0x5bfabf||!/^sha256:[a-f0-9]{64}$/[_0x448e95(0xa8)](_0x5bfabf)||typeof _0x5ef750!==_0x448e95(0xff)||!Number[_0x448e95(0xea)](_0x5ef750)||_0x5ef750<=0x0||_0x5ef750>MAX_ARCHIVE_SIZE)throw new Error(_0x448e95(0xe6)+TEMPLATE_ID+'\x22.');return{'version':_0x1e31ec,'name':_0x3a0097,'sha256':_0x5bfabf,'size':_0x5ef750};}async function fetchWithTimeout(_0x595e4,_0xb6ca8a,_0x2b32e6,_0x2f31ac){const _0x155461=a179_0x372b09,_0x2cf40a=new AbortController(),_0x1b8f4b=setTimeout(()=>_0x2cf40a[_0x155461(0xab)](),_0xb6ca8a);try{const _0x4c24ea=await fetch(_0x595e4,{'headers':{'Accept':_0x2b32e6},'signal':_0x2cf40a[_0x155461(0xde)]});return await _0x2f31ac(_0x4c24ea);}finally{clearTimeout(_0x1b8f4b);}}async function fetchTemplateDescriptor(){const _0x36f12f=await getRabetbaseCdnConfig();if(!_0x36f12f)throw new Error('Rabetbase\x20CDN\x20config\x20is\x20unavailable.');return parseDescriptor(_0x36f12f['projectTemplate']);}function resolveArchiveUrl(_0x2d1b24){const _0x5f51e0=a179_0x372b09,_0x3ce7e2=new URL(PROJECT_TEMPLATE_ASSET_BASE_URL+'/'),_0x55e0e4=new URL(_0x2d1b24,_0x3ce7e2);if(_0x55e0e4[_0x5f51e0(0xbf)]!==_0x5f51e0(0x105)||_0x55e0e4[_0x5f51e0(0xd9)]!==_0x3ce7e2[_0x5f51e0(0xd9)]||!_0x55e0e4[_0x5f51e0(0xaa)]['startsWith'](_0x3ce7e2[_0x5f51e0(0xaa)]))throw new Error(_0x5f51e0(0xe7));return _0x55e0e4[_0x5f51e0(0xa3)];}async function readResponseBytes(_0x101225,_0xb35243){const _0x2cf3e4=a179_0x372b09;if(!_0x101225[_0x2cf3e4(0xf6)]){const _0x246c88=Buffer['from'](await _0x101225['arrayBuffer']());if(_0x246c88[_0x2cf3e4(0xb8)]>_0xb35243)throw new Error('CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.');return _0x246c88;}const _0x1ec447=_0x101225[_0x2cf3e4(0xf6)]['getReader'](),_0x170aa0=[];let _0x3e6506=0x0;try{while(!![]){const {done:_0x51e2d7,value:_0x2d0054}=await _0x1ec447[_0x2cf3e4(0xd4)]();if(_0x51e2d7)break;_0x3e6506+=_0x2d0054['byteLength'];if(_0x3e6506>_0xb35243){await _0x1ec447['cancel']();throw new Error(_0x2cf3e4(0xbe));}_0x170aa0['push'](Buffer[_0x2cf3e4(0xca)](_0x2d0054));}}finally{_0x1ec447[_0x2cf3e4(0xee)]();}return Buffer[_0x2cf3e4(0x103)](_0x170aa0,_0x3e6506);}async function downloadArchive(_0x466e8c,_0x3d3ed1,_0x484225){const _0x294e63=a179_0x372b09,_0x12d309=await fetchWithTimeout(resolveArchiveUrl(_0x466e8c['name']),ARCHIVE_TIMEOUT_MS,_0x294e63(0xc7),async _0x2e0b92=>{const _0x317259=_0x294e63;if(!_0x2e0b92['ok'])throw new Error(_0x317259(0xbd)+_0x2e0b92[_0x317259(0x10a)]+'.');const _0x1ea6b8=Number(_0x2e0b92[_0x317259(0xdb)][_0x317259(0x101)]('content-length'));if(Number[_0x317259(0xda)](_0x1ea6b8)&&_0x1ea6b8>MAX_ARCHIVE_SIZE)throw new Error(_0x317259(0xd1));return readResponseBytes(_0x2e0b92,_0x466e8c[_0x317259(0xf9)]);});if(_0x12d309[_0x294e63(0xb8)]!==_0x466e8c[_0x294e63(0xf9)])throw new Error(_0x294e63(0xb9)+_0x466e8c[_0x294e63(0xf9)]+_0x294e63(0x9f)+_0x12d309[_0x294e63(0xb8)]+'.');_0x484225?.(_0x294e63(0xb0));const _0x3df3cc=_0x294e63(0xa6)+createHash('sha256')[_0x294e63(0xd3)](_0x12d309)['digest'](_0x294e63(0xac));if(_0x3df3cc!==_0x466e8c['sha256'])throw new Error(_0x294e63(0xe4));await a179_0x24c6ba['writeFile'](_0x3d3ed1,_0x12d309,{'flag':'wx'});}async function assertTemplateRoot(_0x4a168d){const _0x443e01=a179_0x372b09,_0x553204=a179_0x4830f4['join'](_0x4a168d,_0x443e01(0xd5)),_0x38def1=JSON[_0x443e01(0x10e)](await a179_0x24c6ba[_0x443e01(0xb6)](_0x553204,_0x443e01(0xb3)));if(!_0x38def1||typeof _0x38def1!==_0x443e01(0xeb))throw new Error('Project\x20template\x20package.json\x20is\x20invalid.');}const LOCAL_FORBIDDEN_NAMES=new Set([a179_0x372b09(0xd0),a179_0x372b09(0xf7),a179_0x372b09(0xf5),a179_0x372b09(0xc5),a179_0x372b09(0x10c),a179_0x372b09(0xb7),a179_0x372b09(0xdf),'.rabetbase.json','dist',a179_0x372b09(0x106)]);function isForbiddenTemplateEntry(_0x292d77){const _0xf3362f=a179_0x372b09;if(LOCAL_FORBIDDEN_NAMES['has'](_0x292d77))return!![];return _0x292d77===_0xf3362f(0x109)||_0x292d77[_0xf3362f(0xcf)](_0xf3362f(0xb4))&&_0x292d77!==_0xf3362f(0xcd);}function containsPath(_0x5503f7,_0xaade38){const _0x19e346=a179_0x372b09,_0x28247c=a179_0x4830f4['relative'](_0x5503f7,_0xaade38);return _0x28247c===''||!_0x28247c[_0x19e346(0xcf)]('..'+a179_0x4830f4[_0x19e346(0x108)])&&_0x28247c!=='..'&&!a179_0x4830f4[_0x19e346(0xe5)](_0x28247c);}async function copyLocalTemplateDirectory(_0x46a831,_0x28cd7a){const _0x19896f=a179_0x372b09;await a179_0x24c6ba[_0x19896f(0xf4)](_0x28cd7a,{'recursive':!![]});for(const _0x5f32ba of await a179_0x24c6ba[_0x19896f(0x107)](_0x46a831,{'withFileTypes':!![]})){const _0x1cad96=a179_0x4830f4['join'](_0x46a831,_0x5f32ba[_0x19896f(0xe3)]),_0x13e51a=a179_0x4830f4[_0x19896f(0x100)](_0x28cd7a,_0x5f32ba[_0x19896f(0xe3)]);if(isForbiddenTemplateEntry(_0x5f32ba['name']))throw new Error(_0x19896f(0xaf)+_0x1cad96);const _0x31f554=await a179_0x24c6ba[_0x19896f(0xae)](_0x1cad96);if(_0x31f554[_0x19896f(0xfd)]())throw new Error('Local\x20project\x20template\x20must\x20not\x20contain\x20symlinks:\x20'+_0x1cad96);if(_0x31f554[_0x19896f(0xcc)]()){await copyLocalTemplateDirectory(_0x1cad96,_0x13e51a);continue;}if(!_0x31f554[_0x19896f(0xc2)]())continue;await a179_0x24c6ba[_0x19896f(0xc1)](_0x1cad96,_0x13e51a),await a179_0x24c6ba[_0x19896f(0xe9)](_0x13e51a,_0x31f554[_0x19896f(0xa9)]&0x1ff);}}async function readTemplateVersion(_0x1d6488){const _0x1f12e8=a179_0x372b09,_0xcc738e=JSON[_0x1f12e8(0x10e)](await a179_0x24c6ba[_0x1f12e8(0xb6)](a179_0x4830f4[_0x1f12e8(0x100)](_0x1d6488,_0x1f12e8(0xd5)),_0x1f12e8(0xb3)));return nonEmptyString(_0xcc738e[_0x1f12e8(0xa4)])||_0x1f12e8(0xa2);}async function readDirectoryIdentity(_0x5c9a9a){const _0x453e13=a179_0x372b09;try{const _0x165bf3=await a179_0x24c6ba['lstat'](_0x5c9a9a);if(!_0x165bf3[_0x453e13(0xcc)]())return null;return{'dev':_0x165bf3[_0x453e13(0x102)],'ino':_0x165bf3['ino']};}catch{return null;}}function a179_0x47c9(_0x1c108a,_0x1ce7a9){_0x1c108a=_0x1c108a-0x9e;const _0xd1da0e=a179_0xd1da();let _0x47c9f3=_0xd1da0e[_0x1c108a];return _0x47c9f3;}async function commitStagedProject(_0x452c1a,_0x58d9d2){const _0x3d7415=a179_0x372b09;await a179_0x24c6ba[_0x3d7415(0xf4)](_0x58d9d2);const _0x128d84=await readDirectoryIdentity(_0x58d9d2);if(!_0x128d84)throw new Error(_0x3d7415(0xec));try{for(const _0x4b47b3 of await a179_0x24c6ba[_0x3d7415(0x107)](_0x452c1a)){await a179_0x24c6ba[_0x3d7415(0xcb)](a179_0x4830f4[_0x3d7415(0x100)](_0x452c1a,_0x4b47b3),a179_0x4830f4[_0x3d7415(0x100)](_0x58d9d2,_0x4b47b3));}}catch(_0x568b87){const _0x18b302=await readDirectoryIdentity(_0x58d9d2);_0x18b302?.[_0x3d7415(0x102)]===_0x128d84[_0x3d7415(0x102)]&&_0x18b302[_0x3d7415(0xd7)]===_0x128d84[_0x3d7415(0xd7)]&&await a179_0x24c6ba['rm'](_0x58d9d2,{'recursive':!![],'force':!![]});throw _0x568b87;}}export async function materializeProjectTemplate(_0x37e00a,_0x3e5b57){const _0x3599f1=a179_0x372b09,_0x2897d1=a179_0x4830f4[_0x3599f1(0xd6)](_0x37e00a),_0x5c89bd=a179_0x4830f4[_0x3599f1(0xc4)](_0x2897d1);try{await a179_0x24c6ba[_0x3599f1(0xae)](_0x2897d1);throw new Error(_0x3599f1(0xfc)+_0x2897d1);}catch(_0x227804){if(_0x227804['code']!==_0x3599f1(0xfb))throw _0x227804;}const _0x465ab3=await a179_0x24c6ba[_0x3599f1(0x10b)](a179_0x4830f4[_0x3599f1(0x100)](_0x5c89bd,_0x3599f1(0xc6))),_0x121c3e=a179_0x4830f4[_0x3599f1(0x100)](_0x465ab3,'project'),_0x2fa199=a179_0x4830f4[_0x3599f1(0x100)](_0x465ab3,_0x3599f1(0xd2));try{try{_0x3e5b57?.(_0x3599f1(0xe2));const _0x192ef9=await fetchTemplateDescriptor();return _0x3e5b57?.(_0x3599f1(0xa1)),await downloadArchive(_0x192ef9,_0x2fa199,_0x3e5b57),_0x3e5b57?.('extracting'),await extractProjectTemplateArchive(_0x2fa199,_0x121c3e),await assertTemplateRoot(_0x121c3e),await commitStagedProject(_0x121c3e,_0x2897d1),{'source':_0x3599f1(0xdc),'version':_0x192ef9['version']};}catch(_0x439daf){if(_0x439daf[_0x3599f1(0xb1)]==='EEXIST')throw CliErrors['validation']('Project\x20directory\x20already\x20exists:\x20'+_0x2897d1,'Use\x20a\x20different\x20project\x20name.');const _0x2303a0=_0x439daf instanceof Error?_0x439daf[_0x3599f1(0xd8)]:String(_0x439daf);throw CliErrors[_0x3599f1(0xc0)](_0x3599f1(0xf2),'Check\x20your\x20network\x20and\x20retry.\x20Details:\x20'+_0x2303a0);}}finally{await a179_0x24c6ba['rm'](_0x465ab3,{'recursive':!![],'force':!![]});}}export async function materializeLocalProjectTemplate(_0x24a8b7,_0x555022,_0x50eedf){const _0x27ea58=a179_0x372b09;let _0x187e7a;try{_0x187e7a=await a179_0x24c6ba[_0x27ea58(0xc3)](a179_0x4830f4[_0x27ea58(0xd6)](_0x24a8b7));}catch{throw CliErrors['validation']('Local\x20template\x20source\x20does\x20not\x20exist:\x20'+a179_0x4830f4['resolve'](_0x24a8b7),_0x27ea58(0xf1));}const _0x15851e=await a179_0x24c6ba['lstat'](_0x187e7a);if(!_0x15851e[_0x27ea58(0xcc)]())throw CliErrors['validation'](_0x27ea58(0x10d)+_0x187e7a);const _0x38a21e=a179_0x4830f4[_0x27ea58(0xd6)](_0x555022),_0x5d9d87=await a179_0x24c6ba[_0x27ea58(0xc3)](a179_0x4830f4['dirname'](_0x38a21e)),_0x2e2f9f=a179_0x4830f4[_0x27ea58(0x100)](_0x5d9d87,a179_0x4830f4['basename'](_0x38a21e));if(containsPath(_0x187e7a,_0x2e2f9f)||containsPath(_0x2e2f9f,_0x187e7a))throw CliErrors[_0x27ea58(0xc0)](_0x27ea58(0xb5),'Choose\x20an\x20output\x20directory\x20outside\x20the\x20template\x20source.');try{await a179_0x24c6ba[_0x27ea58(0xae)](_0x2e2f9f);throw CliErrors[_0x27ea58(0xc0)]('Project\x20directory\x20already\x20exists:\x20'+_0x2e2f9f,_0x27ea58(0xad));}catch(_0x118a10){if(_0x118a10[_0x27ea58(0xb1)]!==_0x27ea58(0xfb))throw _0x118a10;}const _0xf03f8b=a179_0x4830f4[_0x27ea58(0xc4)](_0x2e2f9f);await a179_0x24c6ba[_0x27ea58(0xe1)](_0xf03f8b);const _0x1c88d3=await a179_0x24c6ba[_0x27ea58(0x10b)](a179_0x4830f4[_0x27ea58(0x100)](_0xf03f8b,_0x27ea58(0xc6))),_0x20c286=a179_0x4830f4['join'](_0x1c88d3,_0x27ea58(0xfa));try{_0x50eedf?.(_0x27ea58(0xdd)),await copyLocalTemplateDirectory(_0x187e7a,_0x20c286),await assertTemplateRoot(_0x20c286);const _0x1d0914=await readTemplateVersion(_0x20c286);return await commitStagedProject(_0x20c286,_0x2e2f9f),{'source':_0x27ea58(0xa2),'version':_0x1d0914};}catch(_0x299ec9){const _0xb9686=_0x299ec9 instanceof Error?_0x299ec9[_0x27ea58(0xd8)]:String(_0x299ec9);throw CliErrors[_0x27ea58(0xc0)](_0x27ea58(0xf0)+_0xb9686,_0x27ea58(0xa7));}finally{await a179_0x24c6ba['rm'](_0x1c88d3,{'recursive':!![],'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0x3d31be,_0x1e457b){const _0x49d67b=a180_0x1d7d,_0x4735ac=_0x3d31be();while(!![]){try{const _0x160e13=parseInt(_0x49d67b(0x97))/0x1*(parseInt(_0x49d67b(0x96))/0x2)+-parseInt(_0x49d67b(0x91))/0x3+-parseInt(_0x49d67b(0xa0))/0x4*(parseInt(_0x49d67b(0x98))/0x5)+-parseInt(_0x49d67b(0x93))/0x6+-parseInt(_0x49d67b(0x9e))/0x7+parseInt(_0x49d67b(0x90))/0x8+-parseInt(_0x49d67b(0x9b))/0x9*(-parseInt(_0x49d67b(0x9a))/0xa);if(_0x160e13===_0x1e457b)break;else _0x4735ac['push'](_0x4735ac['shift']());}catch(_0x221b5d){_0x4735ac['push'](_0x4735ac['shift']());}}}(a180_0x414d,0x43d0d));import{CliErrors}from'../../../errors.js';function a180_0x1d7d(_0x30cad7,_0x5910b6){_0x30cad7=_0x30cad7-0x90;const _0x414d2a=a180_0x414d();let _0x1d7d9a=_0x414d2a[_0x30cad7];return _0x1d7d9a;}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(_0x528594){const _0x5bbafe=a180_0x1d7d,_0x454783=_0x528594[_0x5bbafe(0x92)]();if(!_0x454783)return _0x5bbafe(0x9d);if(_0x454783['length']>MAX_PROJECT_NAME_LENGTH)return _0x5bbafe(0x9f)+MAX_PROJECT_NAME_LENGTH+_0x5bbafe(0x94);if(!PROJECT_NAME_PATTERN[_0x5bbafe(0xa1)](_0x454783))return _0x5bbafe(0xa2);if(WINDOWS_RESERVED_NAME[_0x5bbafe(0xa1)](_0x454783))return _0x5bbafe(0x95)+_0x454783+'\x22\x20is\x20reserved\x20on\x20Windows';return null;}export function validateProjectName(_0x406e76){const _0x5940f6=a180_0x1d7d,_0x2bf5bf=_0x406e76['trim'](),_0xa3fcde=getProjectNameValidationError(_0x2bf5bf);if(_0xa3fcde)throw CliErrors[_0x5940f6(0x9c)](_0xa3fcde,_0x5940f6(0x99));return _0x2bf5bf;}function a180_0x414d(){const _0x3c70d9=['8fuTsof','test','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','1899256gqvXuW','187881uXjJjt','trim','591834KQLxfD','\x20characters','Project\x20name\x20\x22','2EtUjNh','245566oogXDd','592055ewQryQ','Use\x20a\x20portable\x20directory\x20name\x20without\x20path\x20separators.','10tzmmiC','5341725fkLUYQ','validation','Project\x20name\x20cannot\x20be\x20empty','2804459IuBmCb','Project\x20name\x20cannot\x20exceed\x20'];a180_0x414d=function(){return _0x3c70d9;};return a180_0x414d();}
1
+ (function(_0x1978ec,_0xd2469f){const _0x536894=a180_0x29b4,_0x497558=_0x1978ec();while(!![]){try{const _0x32536b=-parseInt(_0x536894(0xd9))/0x1*(-parseInt(_0x536894(0xda))/0x2)+-parseInt(_0x536894(0xe1))/0x3+parseInt(_0x536894(0xdd))/0x4+parseInt(_0x536894(0xd5))/0x5+parseInt(_0x536894(0xd8))/0x6+-parseInt(_0x536894(0xe2))/0x7+-parseInt(_0x536894(0xdc))/0x8;if(_0x32536b===_0xd2469f)break;else _0x497558['push'](_0x497558['shift']());}catch(_0x2a6374){_0x497558['push'](_0x497558['shift']());}}}(a180_0x40a9,0x351ff));import{CliErrors}from'../../../errors.js';function a180_0x40a9(){const _0x51d4c9=['1070670EdiCVo','Use\x20a\x20portable\x20directory\x20name\x20without\x20path\x20separators.','trim','1010238LommCB','114667pOeAGY','4AuVcFJ','validation','4690656kKdBHj','1584488lfdTus','Project\x20name\x20cannot\x20exceed\x20','Project\x20name\x20\x22','\x20characters','438171wzelfj','405825eGFVhH','Project\x20name\x20cannot\x20be\x20empty','\x22\x20is\x20reserved\x20on\x20Windows','length','test','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_'];a180_0x40a9=function(){return _0x51d4c9;};return a180_0x40a9();}function a180_0x29b4(_0x2693f8,_0x29e0fd){_0x2693f8=_0x2693f8-0xd2;const _0x40a9bd=a180_0x40a9();let _0x29b48c=_0x40a9bd[_0x2693f8];return _0x29b48c;}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(_0x544e8a){const _0x547821=a180_0x29b4,_0x1fe9a9=_0x544e8a[_0x547821(0xd7)]();if(!_0x1fe9a9)return _0x547821(0xe3);if(_0x1fe9a9[_0x547821(0xd2)]>MAX_PROJECT_NAME_LENGTH)return _0x547821(0xde)+MAX_PROJECT_NAME_LENGTH+_0x547821(0xe0);if(!PROJECT_NAME_PATTERN[_0x547821(0xd3)](_0x1fe9a9))return _0x547821(0xd4);if(WINDOWS_RESERVED_NAME['test'](_0x1fe9a9))return _0x547821(0xdf)+_0x1fe9a9+_0x547821(0xe4);return null;}export function validateProjectName(_0x1eeada){const _0xfed070=a180_0x29b4,_0x22cba5=_0x1eeada[_0xfed070(0xd7)](),_0x48aa46=getProjectNameValidationError(_0x22cba5);if(_0x48aa46)throw CliErrors[_0xfed070(0xdb)](_0x48aa46,_0xfed070(0xd6));return _0x22cba5;}
@@ -1 +1 @@
1
- (function(_0x1ab3ab,_0x1abbd7){const _0x332dd5=a181_0x4904,_0x19d29f=_0x1ab3ab();while(!![]){try{const _0x445401=-parseInt(_0x332dd5(0x82))/0x1+parseInt(_0x332dd5(0x80))/0x2*(parseInt(_0x332dd5(0x7a))/0x3)+-parseInt(_0x332dd5(0x73))/0x4*(parseInt(_0x332dd5(0x7c))/0x5)+parseInt(_0x332dd5(0x7d))/0x6+parseInt(_0x332dd5(0x99))/0x7+parseInt(_0x332dd5(0x83))/0x8+-parseInt(_0x332dd5(0x77))/0x9;if(_0x445401===_0x1abbd7)break;else _0x19d29f['push'](_0x19d29f['shift']());}catch(_0xbf5be7){_0x19d29f['push'](_0x19d29f['shift']());}}}(a181_0x498d,0x2e416));import{createWriteStream}from'node:fs';function a181_0x498d(){const _0x2e571c=['93kyNjGK','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.','5KoXMwk','1255368ygFVeT','once','catch','19268DoqpNo','test','179749DbXZMW','1398728mUaoTt','length','Unable\x20to\x20open\x20project\x20template\x20archive.','Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20','ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20','resolve','sep','Case-conflicting\x20ZIP\x20entry\x20path:\x20','Unable\x20to\x20read\x20ZIP\x20entry:\x20','Project\x20template\x20ZIP\x20exceeds\x20','endsWith','fileName','mkdir','openReadStream','close','readEntry','\x20entries.','Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20','Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20','startsWith','get','has','1500667UmdgSv','join','toLocaleLowerCase','open','en-US','split','slice','344496xEWquS','end','externalFileAttributes','replace','3975921cKixOD','uncompressedSize','set'];a181_0x498d=function(){return _0x2e571c;};return a181_0x498d();}import a181_0x72c462 from'node:fs/promises';import a181_0x1ae020 from'node:path';import{pipeline}from'node:stream/promises';import a181_0xb08bd7 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(_0x1c9403){return new Promise((_0x18c83f,_0x354606)=>{const _0x12aaa0=a181_0x4904;a181_0xb08bd7[_0x12aaa0(0x9c)](_0x1c9403,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x31ea3f,_0x23b5b6)=>{const _0x15d1bd=_0x12aaa0;if(_0x31ea3f||!_0x23b5b6){_0x354606(_0x31ea3f||new Error(_0x15d1bd(0x85)));return;}_0x18c83f(_0x23b5b6);});});}function openEntryStream(_0x1211b4,_0x2dbe52){return new Promise((_0x92b022,_0x4a5421)=>{const _0x329067=a181_0x4904;_0x1211b4[_0x329067(0x90)](_0x2dbe52,(_0x388060,_0x4cb4c2)=>{const _0x1c6f2c=_0x329067;if(_0x388060||!_0x4cb4c2){_0x4a5421(_0x388060||new Error(_0x1c6f2c(0x8b)+_0x2dbe52[_0x1c6f2c(0x8e)]));return;}_0x92b022(_0x4cb4c2);});});}function validateEntryPath(_0x35b39e){const _0x391d71=a181_0x4904,_0x721c47=_0x35b39e[_0x391d71(0x76)](/\\/g,'/'),_0x2c8c5e=_0x721c47[_0x391d71(0x8d)]('/'),_0x450134=_0x2c8c5e?_0x721c47['slice'](0x0,-0x1):_0x721c47;if(!_0x450134||_0x721c47['startsWith']('/')||/^[A-Za-z]:\//[_0x391d71(0x81)](_0x721c47))throw new Error('Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20'+_0x35b39e);const _0x4bda5e=_0x450134['split']('/');for(const _0x3c0f85 of _0x4bda5e){if(!_0x3c0f85||_0x3c0f85==='.'||_0x3c0f85==='..'||_0x3c0f85['endsWith']('.')||_0x3c0f85[_0x391d71(0x8d)]('\x20')||WINDOWS_INVALID_CHAR[_0x391d71(0x81)](_0x3c0f85)||WINDOWS_RESERVED_NAME[_0x391d71(0x81)](_0x3c0f85))throw new Error(_0x391d71(0x94)+_0x35b39e);}return{'relativePath':_0x4bda5e[_0x391d71(0x9a)](a181_0x1ae020[_0x391d71(0x89)]),'directory':_0x2c8c5e};}function a181_0x4904(_0x2f5a6d,_0x5f0be4){_0x2f5a6d=_0x2f5a6d-0x73;const _0x498d1c=a181_0x498d();let _0x490406=_0x498d1c[_0x2f5a6d];return _0x490406;}function isSymbolicLink(_0x3eaf97){const _0x57ca87=a181_0x4904,_0x551a20=_0x3eaf97[_0x57ca87(0x75)]>>>0x10&0xffff;return(_0x551a20&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0x309856,_0x4c4562){const _0x2ad554=a181_0x4904,_0xc78349=await openZip(_0x309856),_0x4e96e7=a181_0x1ae020['resolve'](_0x4c4562),_0x381eff=new Set(),_0x4987bb=new Map();let _0x473fb4=0x0,_0x124a92=0x0;await a181_0x72c462[_0x2ad554(0x8f)](_0x4e96e7,{'recursive':!![]}),await new Promise((_0x5d102d,_0x1a8ef1)=>{const _0x25d7aa=_0x2ad554;let _0x4b280a=![];const _0x39a657=_0x562e7c=>{const _0x142165=a181_0x4904;if(_0x4b280a)return;_0x4b280a=!![],_0xc78349[_0x142165(0x91)](),_0x1a8ef1(_0x562e7c instanceof Error?_0x562e7c:new Error(String(_0x562e7c)));};_0xc78349[_0x25d7aa(0x7e)]('error',_0x39a657),_0xc78349['once'](_0x25d7aa(0x74),()=>{if(_0x4b280a)return;_0x4b280a=!![],_0x5d102d();}),_0xc78349['on']('entry',_0x30fcf6=>{const _0xcddcc4=_0x25d7aa;void(async()=>{const _0x119137=a181_0x4904;_0x473fb4+=0x1,_0x124a92+=_0x30fcf6[_0x119137(0x78)];if(_0x473fb4>MAX_ENTRY_COUNT)throw new Error(_0x119137(0x8c)+MAX_ENTRY_COUNT+_0x119137(0x93));if(_0x124a92>MAX_UNCOMPRESSED_SIZE)throw new Error(_0x119137(0x7b));if(_0x30fcf6['isEncrypted']())throw new Error(_0x119137(0x86)+_0x30fcf6[_0x119137(0x8e)]);if(isSymbolicLink(_0x30fcf6))throw new Error('Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20'+_0x30fcf6[_0x119137(0x8e)]);const {relativePath:_0x620ead,directory:_0x1cb753}=validateEntryPath(_0x30fcf6['fileName']),_0x3db7e6=_0x620ead[_0x119137(0x9e)](a181_0x1ae020[_0x119137(0x89)]);for(let _0x479daf=0x1;_0x479daf<=_0x3db7e6[_0x119137(0x84)];_0x479daf+=0x1){const _0x8232d5=_0x3db7e6[_0x119137(0x9f)](0x0,_0x479daf)['join'](a181_0x1ae020[_0x119137(0x89)]),_0x25cbe1=_0x8232d5['toLocaleLowerCase'](_0x119137(0x9d)),_0x46b33e=_0x4987bb[_0x119137(0x97)](_0x25cbe1);if(_0x46b33e&&_0x46b33e!==_0x8232d5)throw new Error(_0x119137(0x8a)+_0x30fcf6[_0x119137(0x8e)]);_0x4987bb[_0x119137(0x79)](_0x25cbe1,_0x8232d5);}const _0x3b738c=_0x620ead[_0x119137(0x9b)](_0x119137(0x9d));if(_0x381eff[_0x119137(0x98)](_0x3b738c))throw new Error(_0x119137(0x95)+_0x30fcf6[_0x119137(0x8e)]);_0x381eff['add'](_0x3b738c);const _0x3f9230=a181_0x1ae020[_0x119137(0x88)](_0x4e96e7,_0x620ead);if(_0x3f9230!==_0x4e96e7&&!_0x3f9230[_0x119137(0x96)](''+_0x4e96e7+a181_0x1ae020[_0x119137(0x89)]))throw new Error(_0x119137(0x87)+_0x30fcf6[_0x119137(0x8e)]);if(_0x1cb753)await a181_0x72c462[_0x119137(0x8f)](_0x3f9230,{'recursive':!![]});else{await a181_0x72c462[_0x119137(0x8f)](a181_0x1ae020['dirname'](_0x3f9230),{'recursive':!![]});const _0x379037=await openEntryStream(_0xc78349,_0x30fcf6);await pipeline(_0x379037,createWriteStream(_0x3f9230,{'flags':'wx','mode':0x1a4}));}_0xc78349[_0x119137(0x92)]();})()[_0xcddcc4(0x7f)](_0x39a657);}),_0xc78349[_0x25d7aa(0x92)]();});}
1
+ (function(_0x1ee677,_0x1ff692){const _0x3fae1e=a181_0x1214,_0x38307e=_0x1ee677();while(!![]){try{const _0x2b57e4=parseInt(_0x3fae1e(0x10d))/0x1+-parseInt(_0x3fae1e(0x12c))/0x2*(-parseInt(_0x3fae1e(0x11c))/0x3)+-parseInt(_0x3fae1e(0x130))/0x4+parseInt(_0x3fae1e(0x129))/0x5*(-parseInt(_0x3fae1e(0x10b))/0x6)+-parseInt(_0x3fae1e(0x117))/0x7+parseInt(_0x3fae1e(0x132))/0x8*(-parseInt(_0x3fae1e(0x133))/0x9)+parseInt(_0x3fae1e(0x121))/0xa;if(_0x2b57e4===_0x1ff692)break;else _0x38307e['push'](_0x38307e['shift']());}catch(_0x3c3fb2){_0x38307e['push'](_0x38307e['shift']());}}}(a181_0x5d66,0x43f83));function a181_0x5d66(){const _0x5a5a67=['Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20','Case-conflicting\x20ZIP\x20entry\x20path:\x20','readEntry','sep','error','Unable\x20to\x20read\x20ZIP\x20entry:\x20','12185zVXDPb','replace','fileName','228428DZADAF','startsWith','Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20','dirname','1992264RCEDSl','get','8NoOekU','2479239gmPnVC','\x20entries.','endsWith','Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20','1284pTtbFX','entry','145772xsgvpW','slice','open','catch','test','uncompressedSize','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.','Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20','has','isEncrypted','659379JKtisd','once','ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20','add','toLocaleLowerCase','3bcQifn','openReadStream','join','resolve','en-US','14076690hlOUec','mkdir'];a181_0x5d66=function(){return _0x5a5a67;};return a181_0x5d66();}import{createWriteStream}from'node:fs';import a181_0x5b36de from'node:fs/promises';import a181_0x650c35 from'node:path';import{pipeline}from'node:stream/promises';import a181_0x52ae4f 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(_0x4ccaf3){return new Promise((_0x13e34c,_0x36cf23)=>{const _0xc7d969=a181_0x1214;a181_0x52ae4f[_0xc7d969(0x10f)](_0x4ccaf3,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x2639d3,_0x4aba86)=>{if(_0x2639d3||!_0x4aba86){_0x36cf23(_0x2639d3||new Error('Unable\x20to\x20open\x20project\x20template\x20archive.'));return;}_0x13e34c(_0x4aba86);});});}function openEntryStream(_0x2457f4,_0x5267db){return new Promise((_0x29fa5a,_0x40fb52)=>{const _0x410ce3=a181_0x1214;_0x2457f4[_0x410ce3(0x11d)](_0x5267db,(_0x135cfd,_0x3c6f15)=>{const _0x3a612d=_0x410ce3;if(_0x135cfd||!_0x3c6f15){_0x40fb52(_0x135cfd||new Error(_0x3a612d(0x128)+_0x5267db[_0x3a612d(0x12b)]));return;}_0x29fa5a(_0x3c6f15);});});}function validateEntryPath(_0x430334){const _0x3b2a14=a181_0x1214,_0x3fe09f=_0x430334[_0x3b2a14(0x12a)](/\\/g,'/'),_0x43cb5f=_0x3fe09f[_0x3b2a14(0x135)]('/'),_0x51c10d=_0x43cb5f?_0x3fe09f[_0x3b2a14(0x10e)](0x0,-0x1):_0x3fe09f;if(!_0x51c10d||_0x3fe09f[_0x3b2a14(0x12d)]('/')||/^[A-Za-z]:\//[_0x3b2a14(0x111)](_0x3fe09f))throw new Error(_0x3b2a14(0x10a)+_0x430334);const _0x59d9d1=_0x51c10d['split']('/');for(const _0x15eeda of _0x59d9d1){if(!_0x15eeda||_0x15eeda==='.'||_0x15eeda==='..'||_0x15eeda['endsWith']('.')||_0x15eeda['endsWith']('\x20')||WINDOWS_INVALID_CHAR[_0x3b2a14(0x111)](_0x15eeda)||WINDOWS_RESERVED_NAME[_0x3b2a14(0x111)](_0x15eeda))throw new Error(_0x3b2a14(0x12e)+_0x430334);}return{'relativePath':_0x59d9d1['join'](a181_0x650c35[_0x3b2a14(0x126)]),'directory':_0x43cb5f};}function isSymbolicLink(_0x2536ee){const _0x4bcb46=_0x2536ee['externalFileAttributes']>>>0x10&0xffff;return(_0x4bcb46&0xf000)===0xa000;}function a181_0x1214(_0x8bc417,_0x5d009e){_0x8bc417=_0x8bc417-0x10a;const _0x5d66d5=a181_0x5d66();let _0x12143c=_0x5d66d5[_0x8bc417];return _0x12143c;}export async function extractProjectTemplateArchive(_0x5d15c3,_0x33ef58){const _0x27ac67=a181_0x1214,_0x14a56b=await openZip(_0x5d15c3),_0x2ff944=a181_0x650c35[_0x27ac67(0x11f)](_0x33ef58),_0x2994bd=new Set(),_0x1f2cae=new Map();let _0x1d737a=0x0,_0x1a56ca=0x0;await a181_0x5b36de['mkdir'](_0x2ff944,{'recursive':!![]}),await new Promise((_0xf4ccd9,_0x55dcc2)=>{const _0x134928=_0x27ac67;let _0x33ffd9=![];const _0x4089af=_0x51a927=>{if(_0x33ffd9)return;_0x33ffd9=!![],_0x14a56b['close'](),_0x55dcc2(_0x51a927 instanceof Error?_0x51a927:new Error(String(_0x51a927)));};_0x14a56b[_0x134928(0x118)](_0x134928(0x127),_0x4089af),_0x14a56b[_0x134928(0x118)]('end',()=>{if(_0x33ffd9)return;_0x33ffd9=!![],_0xf4ccd9();}),_0x14a56b['on'](_0x134928(0x10c),_0x576939=>{const _0x27c4e1=_0x134928;void(async()=>{const _0x819580=a181_0x1214;_0x1d737a+=0x1,_0x1a56ca+=_0x576939[_0x819580(0x112)];if(_0x1d737a>MAX_ENTRY_COUNT)throw new Error('Project\x20template\x20ZIP\x20exceeds\x20'+MAX_ENTRY_COUNT+_0x819580(0x134));if(_0x1a56ca>MAX_UNCOMPRESSED_SIZE)throw new Error(_0x819580(0x113));if(_0x576939[_0x819580(0x116)]())throw new Error('Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20'+_0x576939[_0x819580(0x12b)]);if(isSymbolicLink(_0x576939))throw new Error(_0x819580(0x123)+_0x576939['fileName']);const {relativePath:_0x15678e,directory:_0x763cbe}=validateEntryPath(_0x576939[_0x819580(0x12b)]),_0xdcb100=_0x15678e['split'](a181_0x650c35[_0x819580(0x126)]);for(let _0x3ef60d=0x1;_0x3ef60d<=_0xdcb100['length'];_0x3ef60d+=0x1){const _0x3ad4b6=_0xdcb100[_0x819580(0x10e)](0x0,_0x3ef60d)[_0x819580(0x11e)](a181_0x650c35[_0x819580(0x126)]),_0x6cf111=_0x3ad4b6['toLocaleLowerCase'](_0x819580(0x120)),_0x3bbdf0=_0x1f2cae[_0x819580(0x131)](_0x6cf111);if(_0x3bbdf0&&_0x3bbdf0!==_0x3ad4b6)throw new Error(_0x819580(0x124)+_0x576939[_0x819580(0x12b)]);_0x1f2cae['set'](_0x6cf111,_0x3ad4b6);}const _0x1ee9d6=_0x15678e[_0x819580(0x11b)](_0x819580(0x120));if(_0x2994bd[_0x819580(0x115)](_0x1ee9d6))throw new Error(_0x819580(0x114)+_0x576939[_0x819580(0x12b)]);_0x2994bd[_0x819580(0x11a)](_0x1ee9d6);const _0x543054=a181_0x650c35[_0x819580(0x11f)](_0x2ff944,_0x15678e);if(_0x543054!==_0x2ff944&&!_0x543054[_0x819580(0x12d)](''+_0x2ff944+a181_0x650c35[_0x819580(0x126)]))throw new Error(_0x819580(0x119)+_0x576939[_0x819580(0x12b)]);if(_0x763cbe)await a181_0x5b36de[_0x819580(0x122)](_0x543054,{'recursive':!![]});else{await a181_0x5b36de[_0x819580(0x122)](a181_0x650c35[_0x819580(0x12f)](_0x543054),{'recursive':!![]});const _0x20ada5=await openEntryStream(_0x14a56b,_0x576939);await pipeline(_0x20ada5,createWriteStream(_0x543054,{'flags':'wx','mode':0x1a4}));}_0x14a56b[_0x819580(0x125)]();})()[_0x27c4e1(0x110)](_0x4089af);}),_0x14a56b[_0x134928(0x125)]();});}
@@ -1 +1 @@
1
- const a182_0x3dcdea=a182_0x511b;(function(_0x5bd0e3,_0x2491ed){const _0xd4b116=a182_0x511b,_0x610bab=_0x5bd0e3();while(!![]){try{const _0x5d9588=parseInt(_0xd4b116(0x192))/0x1*(-parseInt(_0xd4b116(0x18c))/0x2)+-parseInt(_0xd4b116(0x186))/0x3*(parseInt(_0xd4b116(0x18d))/0x4)+parseInt(_0xd4b116(0x191))/0x5*(parseInt(_0xd4b116(0x18b))/0x6)+-parseInt(_0xd4b116(0x189))/0x7*(parseInt(_0xd4b116(0x18e))/0x8)+parseInt(_0xd4b116(0x190))/0x9*(-parseInt(_0xd4b116(0x183))/0xa)+-parseInt(_0xd4b116(0x187))/0xb+parseInt(_0xd4b116(0x185))/0xc*(parseInt(_0xd4b116(0x18f))/0xd);if(_0x5d9588===_0x2491ed)break;else _0x610bab['push'](_0x610bab['shift']());}catch(_0x5d6997){_0x610bab['push'](_0x610bab['shift']());}}}(a182_0x330d,0x4c477));function a182_0x511b(_0x3ff007,_0x42fbd4){_0x3ff007=_0x3ff007-0x183;const _0x330d7f=a182_0x330d();let _0x511b0f=_0x330d7f[_0x3ff007];return _0x511b0f;}import a182_0x37d99a from'node:path';import{fileURLToPath}from'node:url';const __dirname=a182_0x37d99a[a182_0x3dcdea(0x18a)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x3a41bb=a182_0x3dcdea;return a182_0x37d99a[_0x3a41bb(0x184)](__dirname,_0x3a41bb(0x188));}function a182_0x330d(){const _0x58b4c0=['8rTPkrw','16654963ObszFA','684WqfSdW','3495BhqUQz','18rwJymO','33090YuGwhF','resolve','12VQSYpp','84EyLHCd','4514686iwzqrQ','../../../../','1069509arwbOv','dirname','3030BhAFAz','9086xDOdtv','60748bqzDcF'];a182_0x330d=function(){return _0x58b4c0;};return a182_0x330d();}
1
+ const a182_0x2d1728=a182_0x230c;function a182_0x230c(_0x44da5e,_0x705e9a){_0x44da5e=_0x44da5e-0xb1;const _0x5156e8=a182_0x5156();let _0x230c52=_0x5156e8[_0x44da5e];return _0x230c52;}(function(_0x5d4068,_0x1998ce){const _0x553ba4=a182_0x230c,_0x5dbba0=_0x5d4068();while(!![]){try{const _0x3fa045=parseInt(_0x553ba4(0xb4))/0x1*(parseInt(_0x553ba4(0xb9))/0x2)+-parseInt(_0x553ba4(0xb3))/0x3+-parseInt(_0x553ba4(0xb5))/0x4+parseInt(_0x553ba4(0xba))/0x5*(-parseInt(_0x553ba4(0xb1))/0x6)+parseInt(_0x553ba4(0xb8))/0x7*(parseInt(_0x553ba4(0xb6))/0x8)+parseInt(_0x553ba4(0xbc))/0x9+parseInt(_0x553ba4(0xb2))/0xa;if(_0x3fa045===_0x1998ce)break;else _0x5dbba0['push'](_0x5dbba0['shift']());}catch(_0xa117ed){_0x5dbba0['push'](_0x5dbba0['shift']());}}}(a182_0x5156,0xb1374));import a182_0x2c0565 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a182_0x2c0565[a182_0x2d1728(0xbb)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x5185a6=a182_0x2d1728;return a182_0x2c0565[_0x5185a6(0xb7)](__dirname,'../../../../');}function a182_0x5156(){const _0x2eeb02=['3535479vIXcob','1VmbDhh','2365704klEZvf','5326040qXuQuM','resolve','7QFuHJx','1407930ilFIYp','174080hVkoie','dirname','8763543PSuHkZ','180JZbYvq','11968280AKoAkT'];a182_0x5156=function(){return _0x2eeb02;};return a182_0x5156();}
@@ -1 +1 @@
1
- (function(_0x4ea376,_0x43cfef){const _0x3f616f=a183_0x5e12,_0x81837e=_0x4ea376();while(!![]){try{const _0x353f82=-parseInt(_0x3f616f(0xe2))/0x1*(-parseInt(_0x3f616f(0xe3))/0x2)+parseInt(_0x3f616f(0xe8))/0x3*(parseInt(_0x3f616f(0xe0))/0x4)+parseInt(_0x3f616f(0xe4))/0x5+-parseInt(_0x3f616f(0xd9))/0x6*(-parseInt(_0x3f616f(0xdb))/0x7)+-parseInt(_0x3f616f(0xdf))/0x8+parseInt(_0x3f616f(0xd7))/0x9*(-parseInt(_0x3f616f(0xd1))/0xa)+parseInt(_0x3f616f(0xe7))/0xb*(-parseInt(_0x3f616f(0xde))/0xc);if(_0x353f82===_0x43cfef)break;else _0x81837e['push'](_0x81837e['shift']());}catch(_0xb4a3f8){_0x81837e['push'](_0x81837e['shift']());}}}(a183_0x17ec,0x21981));import a183_0xdb2a3b from'node:path';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{materializeLocalProjectTemplate,materializeProjectTemplate}from'../../../commands/project/create/materialize-project-template.js';function a183_0x5e12(_0x37110f,_0x57ce6f){_0x37110f=_0x37110f-0xd1;const _0x17ec8f=a183_0x17ec();let _0x5e12d5=_0x17ec8f[_0x37110f];return _0x5e12d5;}function a183_0x17ec(){const _0x4844fa=['25948kRijfQ','copy','9407yYcmPm','26tLBLjU','787170iBZdCs','cwd','Project\x20template\x20created','2880856zDivmo','39hVeAQX','252470sqGfWF','error','source','info','now','version','18LFKmJt','Failed\x20to\x20copy\x20project\x20template','308364lutaVp','resolve','14sXzvPE','success','message','12XGbaiX','134824DfHERa'];a183_0x17ec=function(){return _0x4844fa;};return a183_0x17ec();}export async function copyProjectTemplate(_0x5a2909,_0x39e0fd,_0x5cb0fe){const _0x373eec=a183_0x5e12,_0x2c0bba=Date[_0x373eec(0xd5)](),_0x2e68ef=a183_0xdb2a3b[_0x373eec(0xda)](process[_0x373eec(0xe5)](),_0x5a2909);try{logger[_0x373eec(0xd4)](_0x373eec(0xe1),'Starting\x20project\x20template\x20creation',{'projectCode':_0x5a2909});const _0x36f845=_0x5cb0fe?await materializeLocalProjectTemplate(_0x5cb0fe,_0x2e68ef,_0x39e0fd):await materializeProjectTemplate(_0x2e68ef,_0x39e0fd),_0xa5f84b=Date[_0x373eec(0xd5)]()-_0x2c0bba;logger[_0x373eec(0xdc)](_0x373eec(0xe1),_0x373eec(0xe6),_0xa5f84b,{'projectCode':_0x5a2909,'templateSource':_0x36f845[_0x373eec(0xd3)],'templateVersion':_0x36f845[_0x373eec(0xd6)]});}catch(_0x2e13e6){const _0x491d20=Date[_0x373eec(0xd5)]()-_0x2c0bba;logger[_0x373eec(0xd2)](_0x373eec(0xe1),_0x373eec(0xd8),{'projectCode':_0x5a2909,'error':_0x2e13e6 instanceof Error?_0x2e13e6[_0x373eec(0xdd)]:String(_0x2e13e6),'duration':_0x491d20});throw _0x2e13e6;}return formatElapsed(_0x2c0bba);}
1
+ (function(_0x31e970,_0x8eca12){const _0x2f4e82=a183_0xa45b,_0x927fdf=_0x31e970();while(!![]){try{const _0x36a29b=-parseInt(_0x2f4e82(0x194))/0x1+parseInt(_0x2f4e82(0x198))/0x2*(-parseInt(_0x2f4e82(0x1a4))/0x3)+parseInt(_0x2f4e82(0x19e))/0x4+parseInt(_0x2f4e82(0x193))/0x5*(parseInt(_0x2f4e82(0x195))/0x6)+-parseInt(_0x2f4e82(0x19a))/0x7*(-parseInt(_0x2f4e82(0x1a1))/0x8)+-parseInt(_0x2f4e82(0x19d))/0x9*(parseInt(_0x2f4e82(0x19c))/0xa)+-parseInt(_0x2f4e82(0x1a3))/0xb*(-parseInt(_0x2f4e82(0x199))/0xc);if(_0x36a29b===_0x8eca12)break;else _0x927fdf['push'](_0x927fdf['shift']());}catch(_0x4aed6f){_0x927fdf['push'](_0x927fdf['shift']());}}}(a183_0x4e3f,0xdca22));function a183_0xa45b(_0x3817d8,_0x2be57b){_0x3817d8=_0x3817d8-0x191;const _0x4e3f88=a183_0x4e3f();let _0xa45b1e=_0x4e3f88[_0x3817d8];return _0xa45b1e;}import a183_0x14b867 from'node:path';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{materializeLocalProjectTemplate,materializeProjectTemplate}from'../../../commands/project/create/materialize-project-template.js';function a183_0x4e3f(){const _0x297378=['8689608qrFxVU','3464060rSPoxv','Failed\x20to\x20copy\x20project\x20template','copy','48dIyyMP','resolve','4038639endWqm','1174224aiFnnt','now','message','error','312940BruaAL','350136FEJCJQ','54RXLUaM','info','success','8NWvLYK','60xsywkz','606599xvOane','Starting\x20project\x20template\x20creation','10NGGVPq'];a183_0x4e3f=function(){return _0x297378;};return a183_0x4e3f();}export async function copyProjectTemplate(_0x4212e8,_0x56508f,_0x108b01){const _0x46a32a=a183_0xa45b,_0x5299a5=Date[_0x46a32a(0x1a5)](),_0x323bd0=a183_0x14b867[_0x46a32a(0x1a2)](process['cwd'](),_0x4212e8);try{logger[_0x46a32a(0x196)](_0x46a32a(0x1a0),_0x46a32a(0x19b),{'projectCode':_0x4212e8});const _0x56760a=_0x108b01?await materializeLocalProjectTemplate(_0x108b01,_0x323bd0,_0x56508f):await materializeProjectTemplate(_0x323bd0,_0x56508f),_0x25b24c=Date[_0x46a32a(0x1a5)]()-_0x5299a5;logger[_0x46a32a(0x197)](_0x46a32a(0x1a0),'Project\x20template\x20created',_0x25b24c,{'projectCode':_0x4212e8,'templateSource':_0x56760a['source'],'templateVersion':_0x56760a['version']});}catch(_0x3e9476){const _0x5bf2a2=Date[_0x46a32a(0x1a5)]()-_0x5299a5;logger[_0x46a32a(0x192)](_0x46a32a(0x1a0),_0x46a32a(0x19f),{'projectCode':_0x4212e8,'error':_0x3e9476 instanceof Error?_0x3e9476[_0x46a32a(0x191)]:String(_0x3e9476),'duration':_0x5bf2a2});throw _0x3e9476;}return formatElapsed(_0x5299a5);}
@@ -1 +1 @@
1
- function a184_0x5d73(){const _0x46aedc=['48IPbamQ','824lxvexY','8933050YgFYUz','19744LGVWFx','58924pjGuTd','22335hmaKFo','message','resolve','4842CmpHdd','now','1351JEmHfY','1626420vFWrVH','Code\x20format\x20completed','format','39684wXUyVX','prettier','534900LMgSRu','Code\x20format\x20failed','cwd','success','121SsTxfk'];a184_0x5d73=function(){return _0x46aedc;};return a184_0x5d73();}(function(_0x2a83cc,_0x47ff25){const _0x3ce532=a184_0x3f38,_0x2a7a1f=_0x2a83cc();while(!![]){try{const _0x260c40=parseInt(_0x3ce532(0x1b3))/0x1*(-parseInt(_0x3ce532(0x1af))/0x2)+parseInt(_0x3ce532(0x1b4))/0x3*(parseInt(_0x3ce532(0x1b0))/0x4)+parseInt(_0x3ce532(0x1bf))/0x5+-parseInt(_0x3ce532(0x1bd))/0x6*(-parseInt(_0x3ce532(0x1b9))/0x7)+-parseInt(_0x3ce532(0x1b2))/0x8*(parseInt(_0x3ce532(0x1b7))/0x9)+-parseInt(_0x3ce532(0x1b1))/0xa+parseInt(_0x3ce532(0x1ae))/0xb*(parseInt(_0x3ce532(0x1ba))/0xc);if(_0x260c40===_0x47ff25)break;else _0x2a7a1f['push'](_0x2a7a1f['shift']());}catch(_0x4f8262){_0x2a7a1f['push'](_0x2a7a1f['shift']());}}}(a184_0x5d73,0xbcaa4));import a184_0x24c345 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a184_0x3f38(_0x15b766,_0x1516ec){_0x15b766=_0x15b766-0x1ae;const _0x5d73c0=a184_0x5d73();let _0x3f387f=_0x5d73c0[_0x15b766];return _0x3f387f;}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x53330c){const _0x59595c=a184_0x3f38,_0x37e657=Date[_0x59595c(0x1b8)](),_0x406988=a184_0x24c345[_0x59595c(0x1b6)](process[_0x59595c(0x1c1)](),_0x53330c);try{logger['info'](_0x59595c(0x1bc),'Starting\x20code\x20format',{'projectCode':_0x53330c}),await execa(resolveNpmBin('npx'),[_0x59595c(0x1be),'--write','.'],{'cwd':_0x406988});const _0x39d953=Date[_0x59595c(0x1b8)]()-_0x37e657;logger[_0x59595c(0x1c2)]('format',_0x59595c(0x1bb),_0x39d953,{'projectCode':_0x53330c});}catch(_0x58c323){const _0x25ef13=Date[_0x59595c(0x1b8)]()-_0x37e657;logger['error'](_0x59595c(0x1bc),_0x59595c(0x1c0),{'projectCode':_0x53330c,'error':_0x58c323 instanceof Error?_0x58c323[_0x59595c(0x1b5)]:String(_0x58c323),'duration':_0x25ef13});throw _0x58c323;}return formatElapsed(_0x37e657);}
1
+ function a184_0x350e(_0x2b7f81,_0x3e15c7){_0x2b7f81=_0x2b7f81-0x118;const _0x56786c=a184_0x5678();let _0x350e8b=_0x56786c[_0x2b7f81];return _0x350e8b;}(function(_0x171942,_0x2167a3){const _0x158c1d=a184_0x350e,_0x193788=_0x171942();while(!![]){try{const _0x3ba0c5=parseInt(_0x158c1d(0x11c))/0x1*(-parseInt(_0x158c1d(0x11a))/0x2)+parseInt(_0x158c1d(0x125))/0x3*(parseInt(_0x158c1d(0x128))/0x4)+parseInt(_0x158c1d(0x12a))/0x5+-parseInt(_0x158c1d(0x118))/0x6+parseInt(_0x158c1d(0x126))/0x7+-parseInt(_0x158c1d(0x11e))/0x8*(-parseInt(_0x158c1d(0x12f))/0x9)+-parseInt(_0x158c1d(0x12b))/0xa;if(_0x3ba0c5===_0x2167a3)break;else _0x193788['push'](_0x193788['shift']());}catch(_0x37645d){_0x193788['push'](_0x193788['shift']());}}}(a184_0x5678,0x27803));import a184_0x36c381 from'node:path';import{execa}from'execa';function a184_0x5678(){const _0x3ebd38=['Code\x20format\x20completed','success','Code\x20format\x20failed','--write','11505rfpeUN','1895495npjqFV','prettier','196gKLfve','message','350515vgSQoh','2176380bkiGeS','now','Starting\x20code\x20format','cwd','171PQMCgz','1363950yVChyE','npx','69352QOmqQk','format','2oFTucd','info','62024CjGFyG','resolve','error'];a184_0x5678=function(){return _0x3ebd38;};return a184_0x5678();}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(_0x827d26){const _0x229878=a184_0x350e,_0x530b4f=Date[_0x229878(0x12c)](),_0x395509=a184_0x36c381[_0x229878(0x11f)](process[_0x229878(0x12e)](),_0x827d26);try{logger[_0x229878(0x11d)](_0x229878(0x11b),_0x229878(0x12d),{'projectCode':_0x827d26}),await execa(resolveNpmBin(_0x229878(0x119)),[_0x229878(0x127),_0x229878(0x124),'.'],{'cwd':_0x395509});const _0x20e022=Date[_0x229878(0x12c)]()-_0x530b4f;logger[_0x229878(0x122)](_0x229878(0x11b),_0x229878(0x121),_0x20e022,{'projectCode':_0x827d26});}catch(_0x4516ce){const _0x543164=Date[_0x229878(0x12c)]()-_0x530b4f;logger[_0x229878(0x120)](_0x229878(0x11b),_0x229878(0x123),{'projectCode':_0x827d26,'error':_0x4516ce instanceof Error?_0x4516ce[_0x229878(0x129)]:String(_0x4516ce),'duration':_0x543164});throw _0x4516ce;}return formatElapsed(_0x530b4f);}
@@ -1 +1 @@
1
- (function(_0x4a05c2,_0x4326e6){const _0x5a0fcf=a185_0x2b0b,_0x45c595=_0x4a05c2();while(!![]){try{const _0x1fea40=-parseInt(_0x5a0fcf(0x164))/0x1*(-parseInt(_0x5a0fcf(0x165))/0x2)+-parseInt(_0x5a0fcf(0x16e))/0x3+parseInt(_0x5a0fcf(0x166))/0x4*(parseInt(_0x5a0fcf(0x163))/0x5)+-parseInt(_0x5a0fcf(0x174))/0x6+parseInt(_0x5a0fcf(0x160))/0x7+-parseInt(_0x5a0fcf(0x16c))/0x8*(parseInt(_0x5a0fcf(0x16b))/0x9)+parseInt(_0x5a0fcf(0x16a))/0xa*(parseInt(_0x5a0fcf(0x167))/0xb);if(_0x1fea40===_0x4326e6)break;else _0x45c595['push'](_0x45c595['shift']());}catch(_0xa90b38){_0x45c595['push'](_0x45c595['shift']());}}}(a185_0x1954,0x9ed07));import a185_0x5491f0 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a185_0x2b0b(_0x5d0670,_0x8f1916){_0x5d0670=_0x5d0670-0x160;const _0x1954a2=a185_0x1954();let _0x2b0b17=_0x1954a2[_0x5d0670];return _0x2b0b17;}function a185_0x1954(){const _0x35473a=['Dependency\x20install\x20completed','1770114IWCkZz','npm','install','resolve','info','Starting\x20dependency\x20install','2623332CfnMsQ','message','now','5930274VZXklh','https://registry.npmmirror.com','Dependency\x20install\x20failed','10szyedU','1csioFo','1758668wMbbPh','1051844lOyWnu','11iofxjR','success','error','3886690SmbKPg','4335048LfPRiZ','16SaMAAB'];a185_0x1954=function(){return _0x35473a;};return a185_0x1954();}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x39a165){const _0x21e43f=a185_0x2b0b,_0xb9e5ed=Date[_0x21e43f(0x176)](),_0x32145b=a185_0x5491f0[_0x21e43f(0x171)](process['cwd'](),_0x39a165);try{logger[_0x21e43f(0x172)](_0x21e43f(0x170),_0x21e43f(0x173),{'projectCode':_0x39a165,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin(_0x21e43f(0x16f)),[_0x21e43f(0x170),'--registry',_0x21e43f(0x161)],{'cwd':_0x32145b});const _0x182bf9=Date['now']()-_0xb9e5ed;logger[_0x21e43f(0x168)]('install',_0x21e43f(0x16d),_0x182bf9,{'projectCode':_0x39a165});}catch(_0x550fae){const _0x3f7a35=Date[_0x21e43f(0x176)]()-_0xb9e5ed;logger[_0x21e43f(0x169)]('install',_0x21e43f(0x162),{'projectCode':_0x39a165,'error':_0x550fae instanceof Error?_0x550fae[_0x21e43f(0x175)]:String(_0x550fae),'duration':_0x3f7a35});throw _0x550fae;}return formatElapsed(_0xb9e5ed);}
1
+ (function(_0x1a323f,_0x157205){const _0x4099fb=a185_0x3f72,_0x1ad27c=_0x1a323f();while(!![]){try{const _0xe74247=parseInt(_0x4099fb(0x1d2))/0x1*(parseInt(_0x4099fb(0x1c7))/0x2)+parseInt(_0x4099fb(0x1ca))/0x3+-parseInt(_0x4099fb(0x1c9))/0x4*(parseInt(_0x4099fb(0x1c8))/0x5)+parseInt(_0x4099fb(0x1d1))/0x6*(parseInt(_0x4099fb(0x1d0))/0x7)+parseInt(_0x4099fb(0x1bf))/0x8*(-parseInt(_0x4099fb(0x1c2))/0x9)+parseInt(_0x4099fb(0x1cc))/0xa*(-parseInt(_0x4099fb(0x1d4))/0xb)+-parseInt(_0x4099fb(0x1c6))/0xc;if(_0xe74247===_0x157205)break;else _0x1ad27c['push'](_0x1ad27c['shift']());}catch(_0x56dcb7){_0x1ad27c['push'](_0x1ad27c['shift']());}}}(a185_0x326f,0x85d10));import a185_0x239dfe from'node:path';function a185_0x3f72(_0x5e857f,_0x18b2d9){_0x5e857f=_0x5e857f-0x1bf;const _0x326fd7=a185_0x326f();let _0x3f72c7=_0x326fd7[_0x5e857f];return _0x3f72c7;}import{execa}from'execa';function a185_0x326f(){const _0x54321f=['success','1153356RzHfxk','36838nWhfcS','15cBYnoy','1109368fupLgY','2676033kJEelW','resolve','383730BpHpaT','cwd','info','https://registry.npmmirror.com','3614366RfmtOH','6ekYilQ','42IUcedv','Dependency\x20install\x20completed','66EbSsyA','48RBXgzl','now','install','713187regsPF','npm','error'];a185_0x326f=function(){return _0x54321f;};return a185_0x326f();}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x144b87){const _0x49637f=a185_0x3f72,_0x4c0298=Date[_0x49637f(0x1c0)](),_0x7833ce=a185_0x239dfe[_0x49637f(0x1cb)](process[_0x49637f(0x1cd)](),_0x144b87);try{logger[_0x49637f(0x1ce)]('install','Starting\x20dependency\x20install',{'projectCode':_0x144b87,'registry':_0x49637f(0x1cf)}),await execa(resolveNpmBin(_0x49637f(0x1c3)),['install','--registry',_0x49637f(0x1cf)],{'cwd':_0x7833ce});const _0xe2aff9=Date[_0x49637f(0x1c0)]()-_0x4c0298;logger[_0x49637f(0x1c5)](_0x49637f(0x1c1),_0x49637f(0x1d3),_0xe2aff9,{'projectCode':_0x144b87});}catch(_0x1b3efc){const _0x18716b=Date[_0x49637f(0x1c0)]()-_0x4c0298;logger[_0x49637f(0x1c4)](_0x49637f(0x1c1),'Dependency\x20install\x20failed',{'projectCode':_0x144b87,'error':_0x1b3efc instanceof Error?_0x1b3efc['message']:String(_0x1b3efc),'duration':_0x18716b});throw _0x1b3efc;}return formatElapsed(_0x4c0298);}
@@ -1 +1 @@
1
- function a186_0x2930(_0x1bf93a,_0x307252){_0x1bf93a=_0x1bf93a-0x70;const _0x53a7a6=a186_0x53a7();let _0x2930d5=_0x53a7a6[_0x1bf93a];return _0x2930d5;}function a186_0x53a7(){const _0xf033e7=['validation','path','7095137VlrZQa','1686185IBTHbK','Run\x20','1001PopOWQ','2185165rvhWZF','108obPPkm','read','107952iumuBc','18OQxUYi','24EWeeIr','Domain\x20routing\x20synchronized:\x20','domain-routing-sync','No\x20Rabetbase\x20project\x20configuration\x20was\x20found.','159370doBGxM','8ujYCIp','4623868SNzWWG','46239trEZdP'];a186_0x53a7=function(){return _0xf033e7;};return a186_0x53a7();}const a186_0x497a28=a186_0x2930;(function(_0x37d2fe,_0x3e67c6){const _0x316cfd=a186_0x2930,_0x2e2ea1=_0x37d2fe();while(!![]){try{const _0x4ad64d=-parseInt(_0x316cfd(0x75))/0x1+-parseInt(_0x316cfd(0x7d))/0x2*(parseInt(_0x316cfd(0x71))/0x3)+parseInt(_0x316cfd(0x70))/0x4+-parseInt(_0x316cfd(0x78))/0x5*(-parseInt(_0x316cfd(0x7c))/0x6)+parseInt(_0x316cfd(0x74))/0x7*(parseInt(_0x316cfd(0x82))/0x8)+-parseInt(_0x316cfd(0x79))/0x9*(-parseInt(_0x316cfd(0x81))/0xa)+parseInt(_0x316cfd(0x77))/0xb*(-parseInt(_0x316cfd(0x7b))/0xc);if(_0x4ad64d===_0x3e67c6)break;else _0x2e2ea1['push'](_0x2e2ea1['shift']());}catch(_0x3023d6){_0x2e2ea1['push'](_0x2e2ea1['shift']());}}}(a186_0x53a7,0xefc6c));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';export const projectDomainRoutingSyncDefinition={'service':'project','command':a186_0x497a28(0x7f),'description':'Synchronize\x20the\x20current\x20project\x27s\x20public\x20Domain\x20routing','risk':a186_0x497a28(0x7a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(){const _0x4f4204=a186_0x497a28,_0x4dd082=findProjectRootDirectory();if(!resolveConfigPath(_0x4dd082))throw CliErrors[_0x4f4204(0x72)](_0x4f4204(0x80),_0x4f4204(0x76)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>\x20in\x20the\x20project\x20directory\x20first.');const _0x1f6dce=writeProjectDomainRoutingManifest(_0x4dd082);return{'ok':!![],'message':_0x4f4204(0x7e)+_0x1f6dce[_0x4f4204(0x73)],'data':_0x1f6dce};}};
1
+ const a186_0x20ae44=a186_0x5154;(function(_0x2762fb,_0x3872cd){const _0x58b1a9=a186_0x5154,_0x3adf52=_0x2762fb();while(!![]){try{const _0x1125d6=-parseInt(_0x58b1a9(0x160))/0x1*(-parseInt(_0x58b1a9(0x15f))/0x2)+parseInt(_0x58b1a9(0x168))/0x3*(parseInt(_0x58b1a9(0x159))/0x4)+-parseInt(_0x58b1a9(0x15a))/0x5*(parseInt(_0x58b1a9(0x156))/0x6)+-parseInt(_0x58b1a9(0x161))/0x7*(parseInt(_0x58b1a9(0x155))/0x8)+parseInt(_0x58b1a9(0x163))/0x9+-parseInt(_0x58b1a9(0x15d))/0xa*(-parseInt(_0x58b1a9(0x158))/0xb)+-parseInt(_0x58b1a9(0x167))/0xc;if(_0x1125d6===_0x3872cd)break;else _0x3adf52['push'](_0x3adf52['shift']());}catch(_0x124a27){_0x3adf52['push'](_0x3adf52['shift']());}}}(a186_0x3a77,0xd5f12));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a186_0x5154(_0x45bcd4,_0x19f614){_0x45bcd4=_0x45bcd4-0x155;const _0x3a7797=a186_0x3a77();let _0x5154e1=_0x3a7797[_0x45bcd4];return _0x5154e1;}function a186_0x3a77(){const _0x3c7f4b=['\x20workspace\x20init\x20--appcode\x20<code>\x20in\x20the\x20project\x20directory\x20first.','project','validation','22243956WnxeXY','9qCeXeN','165576jEewnQ','566178IwwebX','No\x20Rabetbase\x20project\x20configuration\x20was\x20found.','25993auvNPM','1535604hsUUGJ','65URhqcJ','read','Domain\x20routing\x20synchronized:\x20','3620oUEuAy','domain-routing-sync','86126AsxAWp','23KXWHaF','7WlZupK','Synchronize\x20the\x20current\x20project\x27s\x20public\x20Domain\x20routing','8818443wjttQt'];a186_0x3a77=function(){return _0x3c7f4b;};return a186_0x3a77();}import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';export const projectDomainRoutingSyncDefinition={'service':a186_0x20ae44(0x165),'command':a186_0x20ae44(0x15e),'description':a186_0x20ae44(0x162),'risk':a186_0x20ae44(0x15b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(){const _0x257963=a186_0x20ae44,_0x3d3eae=findProjectRootDirectory();if(!resolveConfigPath(_0x3d3eae))throw CliErrors[_0x257963(0x166)](_0x257963(0x157),'Run\x20'+CLI_BIN_NAME+_0x257963(0x164));const _0x3bafb2=writeProjectDomainRoutingManifest(_0x3d3eae);return{'ok':!![],'message':_0x257963(0x15c)+_0x3bafb2['path'],'data':_0x3bafb2};}};
@@ -1 +1 @@
1
- function a187_0x2e66(_0x465147,_0x13a9ee){_0x465147=_0x465147-0x1de;const _0x15ff83=a187_0x15ff();let _0x2e6614=_0x15ff83[_0x465147];return _0x2e6614;}const a187_0x530504=a187_0x2e66;(function(_0x409814,_0x3e28e0){const _0x13b991=a187_0x2e66,_0x3386b8=_0x409814();while(!![]){try{const _0x4d064b=parseInt(_0x13b991(0x1df))/0x1+-parseInt(_0x13b991(0x1f4))/0x2*(parseInt(_0x13b991(0x1f6))/0x3)+-parseInt(_0x13b991(0x205))/0x4*(-parseInt(_0x13b991(0x1eb))/0x5)+-parseInt(_0x13b991(0x200))/0x6+-parseInt(_0x13b991(0x1e3))/0x7*(parseInt(_0x13b991(0x1f8))/0x8)+parseInt(_0x13b991(0x1fd))/0x9*(-parseInt(_0x13b991(0x1de))/0xa)+parseInt(_0x13b991(0x1f2))/0xb*(parseInt(_0x13b991(0x1ec))/0xc);if(_0x4d064b===_0x3e28e0)break;else _0x3386b8['push'](_0x3386b8['shift']());}catch(_0x616afe){_0x3386b8['push'](_0x3386b8['shift']());}}}(a187_0x15ff,0xadc14));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';import{projectDomainRoutingSyncDefinition}from'../../commands/project/domain-routing-sync.js';function a187_0x15ff(){const _0x52ff25=['args','658BEdxif','project-name','Target\x20environment','write','appcode','yes','cookie','template-source','2136615okMTUm','72tmcifY','../../commands/project/create/main.js','Usage:\x20','Run\x20','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]\x20or\x20','trim','1710071ufkrea','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]\x20from\x20the\x20empty\x20target\x20directory.','751670qfjTTH','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','6dtrnfg','project','19048XNwmji','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]','str','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','Create\x20a\x20new\x20project','9GGTEtR','bool','current-dir','455676NydQHR','string','validation','env','upgrade','4tUmHyd','5503610OIRPoN','953402EfrSCb','Initialize\x20the\x20current\x20empty\x20directory\x20instead\x20of\x20creating\x20a\x20child\x20directory','nonInteractive'];a187_0x15ff=function(){return _0x52ff25;};return a187_0x15ff();}const createFlags=[{'name':'name','type':'string','description':'Project\x20name'},{'name':'env','type':a187_0x530504(0x201),'description':a187_0x530504(0x1e5)},{'name':'appcode','type':a187_0x530504(0x201),'description':a187_0x530504(0x1fb)},{'name':a187_0x530504(0x1ff),'type':'boolean','description':a187_0x530504(0x1e0),'default':![]},{'name':a187_0x530504(0x1ea),'type':a187_0x530504(0x201),'description':'Prepared\x20local\x20project\x20template\x20directory'}],upgradeFlags=[{'name':a187_0x530504(0x1e8),'type':'boolean','description':'Skip\x20confirmation\x20prompt','default':![]}];export const projectDefinitions=[{'service':'project','command':'create','description':a187_0x530504(0x1fc),'risk':a187_0x530504(0x1e6),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a187_0x530504(0x1e4),'description':a187_0x530504(0x1f5),'required':![]}],'flags':createFlags,async 'execute'(_0x4fed31){const _0x2f8f02=a187_0x530504,{createApp:_0x4e02c2}=await import(_0x2f8f02(0x1ed)),_0x1a661f=_0x4fed31[_0x2f8f02(0x1fa)]('name')[_0x2f8f02(0x1f1)]()||_0x4fed31[_0x2f8f02(0x1e2)][0x0]?.[_0x2f8f02(0x1f1)](),_0x426d46=_0x4fed31[_0x2f8f02(0x1fa)](_0x2f8f02(0x203))||undefined,_0x4b0415=_0x4fed31[_0x2f8f02(0x1fa)](_0x2f8f02(0x1e7))||undefined,_0x625455=_0x4fed31[_0x2f8f02(0x1fa)](_0x2f8f02(0x1ea))['trim']()||undefined,_0x35ea0b=_0x4fed31[_0x2f8f02(0x1fe)]('current-dir');if(_0x35ea0b&&_0x1a661f)throw CliErrors[_0x2f8f02(0x202)]('--current-dir\x20cannot\x20be\x20combined\x20with\x20a\x20project\x20name.',_0x2f8f02(0x1ef)+CLI_BIN_NAME+_0x2f8f02(0x1f3));if(_0x4fed31[_0x2f8f02(0x1e1)]){if(!_0x1a661f&&!_0x35ea0b)throw CliErrors[_0x2f8f02(0x202)]('Non-interactive\x20mode\x20requires\x20a\x20project\x20name.',_0x2f8f02(0x1ee)+CLI_BIN_NAME+_0x2f8f02(0x1f0)+CLI_BIN_NAME+_0x2f8f02(0x1f9));await _0x4e02c2({'projectCode':_0x1a661f,'appCode':_0x4b0415,'env':_0x426d46,'cookie':_0x4fed31[_0x2f8f02(0x1e9)],'currentDir':_0x35ea0b,'nonInteractive':!![],'templateSource':_0x625455});}else await _0x4e02c2({'projectCode':_0x1a661f,'appCode':_0x4b0415,'env':_0x426d46,'cookie':_0x4fed31[_0x2f8f02(0x1e9)],'currentDir':_0x35ea0b,'templateSource':_0x625455});return{'ok':!![]};}},projectDomainRoutingSyncDefinition,{'service':a187_0x530504(0x1f7),'command':a187_0x530504(0x204),'description':'Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','risk':a187_0x530504(0x1e6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0xdcff49){const _0x3a5103=a187_0x530504;return await upgradeApp(_0xdcff49[_0x3a5103(0x1e1)],{'yes':_0xdcff49[_0x3a5103(0x1fe)](_0x3a5103(0x1e8))}),{'ok':!![]};}}];
1
+ const a187_0x376a60=a187_0x2b9c;(function(_0x264ad4,_0x10d292){const _0x4b7af6=a187_0x2b9c,_0x466275=_0x264ad4();while(!![]){try{const _0x1c5e7e=-parseInt(_0x4b7af6(0x189))/0x1+parseInt(_0x4b7af6(0x17c))/0x2*(-parseInt(_0x4b7af6(0x191))/0x3)+parseInt(_0x4b7af6(0x17a))/0x4*(parseInt(_0x4b7af6(0x175))/0x5)+parseInt(_0x4b7af6(0x18e))/0x6+parseInt(_0x4b7af6(0x18f))/0x7+-parseInt(_0x4b7af6(0x172))/0x8*(-parseInt(_0x4b7af6(0x170))/0x9)+parseInt(_0x4b7af6(0x192))/0xa*(-parseInt(_0x4b7af6(0x16c))/0xb);if(_0x1c5e7e===_0x10d292)break;else _0x466275['push'](_0x466275['shift']());}catch(_0x51aaa0){_0x466275['push'](_0x466275['shift']());}}}(a187_0x5441,0xe8816));import{CliErrors}from'../../errors.js';function a187_0x5441(){const _0x2db8b7=['write','9IiHMvX','24808690XipTJo','env','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','boolean','11BAVouP','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]\x20or\x20','bool','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]\x20from\x20the\x20empty\x20target\x20directory.','17163mooxGx','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','6952eMorSa','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]','upgrade','5YZEdOl','template-source','Initialize\x20the\x20current\x20empty\x20directory\x20instead\x20of\x20creating\x20a\x20child\x20directory','project','nonInteractive','2879752PSEFuY','validation','1018828MLThFN','Skip\x20confirmation\x20prompt','current-dir','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','str','trim','Usage:\x20','project-name','name','string','Project\x20name','create','--current-dir\x20cannot\x20be\x20combined\x20with\x20a\x20project\x20name.','307808CyMwaO','appcode','Prepared\x20local\x20project\x20template\x20directory','cookie','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','9335736zPyCFH','9353288uBmOFk'];a187_0x5441=function(){return _0x2db8b7;};return a187_0x5441();}import{CLI_BIN_NAME}from'../../constant/cli.js';function a187_0x2b9c(_0x3989e6,_0x48298a){_0x3989e6=_0x3989e6-0x16a;const _0x544110=a187_0x5441();let _0x2b9c25=_0x544110[_0x3989e6];return _0x2b9c25;}import{upgradeApp}from'../../commands/project/upgrade.js';import{projectDomainRoutingSyncDefinition}from'../../commands/project/domain-routing-sync.js';const createFlags=[{'name':a187_0x376a60(0x184),'type':a187_0x376a60(0x185),'description':a187_0x376a60(0x186)},{'name':a187_0x376a60(0x193),'type':a187_0x376a60(0x185),'description':'Target\x20environment'},{'name':a187_0x376a60(0x18a),'type':a187_0x376a60(0x185),'description':a187_0x376a60(0x16a)},{'name':a187_0x376a60(0x17e),'type':'boolean','description':a187_0x376a60(0x177),'default':![]},{'name':a187_0x376a60(0x176),'type':a187_0x376a60(0x185),'description':a187_0x376a60(0x18b)}],upgradeFlags=[{'name':'yes','type':a187_0x376a60(0x16b),'description':a187_0x376a60(0x17d),'default':![]}];export const projectDefinitions=[{'service':a187_0x376a60(0x178),'command':a187_0x376a60(0x187),'description':'Create\x20a\x20new\x20project','risk':a187_0x376a60(0x190),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a187_0x376a60(0x183),'description':a187_0x376a60(0x18d),'required':![]}],'flags':createFlags,async 'execute'(_0x2b0f69){const _0x29635c=a187_0x376a60,{createApp:_0x130453}=await import('../../commands/project/create/main.js'),_0x543f50=_0x2b0f69[_0x29635c(0x180)](_0x29635c(0x184))[_0x29635c(0x181)]()||_0x2b0f69['args'][0x0]?.[_0x29635c(0x181)](),_0x232f75=_0x2b0f69[_0x29635c(0x180)](_0x29635c(0x193))||undefined,_0x5005f2=_0x2b0f69[_0x29635c(0x180)](_0x29635c(0x18a))||undefined,_0x580c7b=_0x2b0f69[_0x29635c(0x180)](_0x29635c(0x176))['trim']()||undefined,_0x396faa=_0x2b0f69[_0x29635c(0x16e)](_0x29635c(0x17e));if(_0x396faa&&_0x543f50)throw CliErrors[_0x29635c(0x17b)](_0x29635c(0x188),'Run\x20'+CLI_BIN_NAME+_0x29635c(0x16f));if(_0x2b0f69[_0x29635c(0x179)]){if(!_0x543f50&&!_0x396faa)throw CliErrors['validation'](_0x29635c(0x171),_0x29635c(0x182)+CLI_BIN_NAME+_0x29635c(0x16d)+CLI_BIN_NAME+_0x29635c(0x173));await _0x130453({'projectCode':_0x543f50,'appCode':_0x5005f2,'env':_0x232f75,'cookie':_0x2b0f69[_0x29635c(0x18c)],'currentDir':_0x396faa,'nonInteractive':!![],'templateSource':_0x580c7b});}else await _0x130453({'projectCode':_0x543f50,'appCode':_0x5005f2,'env':_0x232f75,'cookie':_0x2b0f69[_0x29635c(0x18c)],'currentDir':_0x396faa,'templateSource':_0x580c7b});return{'ok':!![]};}},projectDomainRoutingSyncDefinition,{'service':a187_0x376a60(0x178),'command':a187_0x376a60(0x174),'description':a187_0x376a60(0x17f),'risk':a187_0x376a60(0x190),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x434b59){const _0x3f30f4=a187_0x376a60;return await upgradeApp(_0x434b59['nonInteractive'],{'yes':_0x434b59[_0x3f30f4(0x16e)]('yes')}),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a188_0x48f01e=a188_0x204c;(function(_0x4f4831,_0x1385b9){const _0x1e6cfe=a188_0x204c,_0x238a9f=_0x4f4831();while(!![]){try{const _0x2041f9=parseInt(_0x1e6cfe(0x135))/0x1+parseInt(_0x1e6cfe(0x156))/0x2+parseInt(_0x1e6cfe(0x138))/0x3*(parseInt(_0x1e6cfe(0x19f))/0x4)+-parseInt(_0x1e6cfe(0x1a1))/0x5+-parseInt(_0x1e6cfe(0x141))/0x6+parseInt(_0x1e6cfe(0x196))/0x7+-parseInt(_0x1e6cfe(0x166))/0x8;if(_0x2041f9===_0x1385b9)break;else _0x238a9f['push'](_0x238a9f['shift']());}catch(_0xc6cf00){_0x238a9f['push'](_0x238a9f['shift']());}}}(a188_0x10e0,0x8e910));function a188_0x10e0(){const _0x5bcac4=['Legacy\x20artifacts:','isArray','Config\x20migration','gray','\x20from\x20','length','@lovrabet/sdk','Remove\x20.lovrabet/','args','white','string','3608444hLJZHq','Step\x206/7:\x20Installing\x20new\x20skill...','===\x20Upgrade\x20Analysis\x20===','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','succeed','.lovrabet','push','dependencies','Clean\x20MCP\x20config','1864EEcEoN','mcpServers','2010070MAAgjT','lovrabet/rabetbase\x20installed\x20globally','cyan','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','lovrabet/rabetbase','\x20\x20bun\x20install','Install\x20new\x20skill','Step\x204/7:\x20MCP\x20config\x20—\x20','.claude/skills/lovrabet','red','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','.cursor/mcp.json','.lovrabet.json','FOUND','isDirectory','bold','yellow','oldPath','1077369DTRtyp','cwd','configMigration','2487wnViNR','utf8','status','inherit','Upgrade\x20@lovrabet/sdk','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','already\x20exists\x20(will\x20merge)','undefined','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','6838674QoxkGw','needed','\x20→\x20','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','no\x20legacy\x20entry','done','info','\x20\x20npm\x20install','not\x20found\x20or\x20already\x20at\x20latest','join','entries','.bak','oldArtifacts','Step\x204/7:\x20Cleaning\x20MCP\x20config...','oldMcpConfig','[\x22@lovrabet/sdk\x22]:\x20','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','\x20removed\x20(','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','object','includes','809026qJPYUG','green','CANCEL','detail','no\x20legacy\x20config\x20found','error','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','Proceed\x20with\x20upgrade?','\x20\x20New\x20config\x20(.rabetbase.json):\x20','Remove\x20old\x20skill','skipped','filter','parse','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','===\x20Upgrade\x20Summary\x20===','2063544StsNAC','Remove\x20legacy\x20artifacts','\x20\x20Step\x20','Step\x205/7:\x20Removing\x20old\x20skill...','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','hasNewConfig','fail','some','Upgrade\x20cancelled.','.cursor/rules/lovrabet_rules.mdc','exit\x20','latest','yes','step','@lovrabet/sdk:','not\x20found\x20(will\x20create)','\x20→\x20latest','Config\x20file:','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','values','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','not\x20needed','log','message','devDependencies','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','files','\x20\x20#\x20or','failed','stringify','start','\x20\x20Fields\x20to\x20migrate:\x20','path','Skill\x20swap:','MCP\x20config:','label','sdkUpgrade'];a188_0x10e0=function(){return _0x5bcac4;};return a188_0x10e0();}import a188_0x5706cb from'chalk';import a188_0x4ab3f2 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{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=[a188_0x48f01e(0x12f),'.lovrabetrc'];function collectIdeSkillFiles(_0x529c54){const _0x35f344=a188_0x48f01e,_0x436248=[];for(const _0xbb1346 of Object[_0x35f344(0x179)](CORE_IDE_CONFIGS)){if(_0xbb1346[_0x35f344(0x180)])for(const _0xfe48df of _0xbb1346[_0x35f344(0x180)]){_0x436248[_0x35f344(0x19c)](resolve(_0x529c54,_0xfe48df[_0x35f344(0x186)]));}}return _0x436248;}function analyse(_0x56a23e){const _0x137199=a188_0x48f01e;let _0x187282=null;const _0x4048ac=resolve(_0x56a23e,NEW_CONFIG_NAME),_0x146514=existsSync(_0x4048ac);for(const _0x5c0c89 of LEGACY_CONFIG_NAMES){const _0x1432b3=resolve(_0x56a23e,_0x5c0c89);if(existsSync(_0x1432b3)){const _0x2eb247=readConfigFile(_0x1432b3),_0x5e0d9c=Object['keys'](_0x2eb247)[_0x137199(0x162)](_0x31c083=>typeof _0x2eb247[_0x31c083]!==_0x137199(0x13f));_0x187282={'oldPath':_0x1432b3,'hasNewConfig':_0x146514,'fields':_0x5e0d9c};break;}}const _0x2a8d96=[],_0x4e5c14=resolve(_0x56a23e,_0x137199(0x19b));if(existsSync(_0x4e5c14))_0x2a8d96['push'](_0x4e5c14);const _0x2001f0=resolve(_0x56a23e,_0x137199(0x16f));if(existsSync(_0x2001f0))_0x2a8d96[_0x137199(0x19c)](_0x2001f0);const _0x3da19a=resolve(_0x56a23e,_0x137199(0x12b));if(existsSync(_0x3da19a))_0x2a8d96[_0x137199(0x19c)](_0x3da19a);for(const _0x3ee67f of collectIdeSkillFiles(_0x56a23e)){if(existsSync(_0x3ee67f))_0x2a8d96[_0x137199(0x19c)](_0x3ee67f);}let _0x4114b3=null;const _0x4df02e=resolve(_0x56a23e,_0x137199(0x12e));if(existsSync(_0x4df02e))try{const _0x405453=JSON['parse'](readFileSync(_0x4df02e,_0x137199(0x139)));if(_0x405453?.[_0x137199(0x1a0)]&&typeof _0x405453['mcpServers']===_0x137199(0x154)){const _0x2218b9=[];for(const [_0x2793ba,_0xc44256]of Object['entries'](_0x405453[_0x137199(0x1a0)])){const _0x324c8a=_0xc44256;_0x324c8a?.[_0x137199(0x193)]&&Array['isArray'](_0x324c8a[_0x137199(0x193)])&&_0x324c8a[_0x137199(0x193)][_0x137199(0x16d)](_0x281587=>typeof _0x281587===_0x137199(0x195)&&_0x281587[_0x137199(0x155)]('@lovrabet/dataset-mcp-server'))&&_0x2218b9[_0x137199(0x19c)](_0x2793ba);}_0x2218b9[_0x137199(0x190)]>0x0&&(_0x4114b3={'path':_0x4df02e,'keys':_0x2218b9});}}catch{}const _0xca65d5=_0x2a8d96['length']>0x0||_0x187282!==null;let _0x74dbcc=null;const _0x11acc1=resolve(_0x56a23e,'package.json');if(existsSync(_0x11acc1))try{const _0x317ca0=JSON[_0x137199(0x163)](readFileSync(_0x11acc1,_0x137199(0x139)));for(const _0x5e9c92 of[_0x137199(0x19d),_0x137199(0x17e)]){const _0x4a1068=_0x317ca0?.[_0x5e9c92]?.['@lovrabet/sdk'];if(typeof _0x4a1068===_0x137199(0x195)){_0x4a1068!==_0x137199(0x171)&&(_0x74dbcc={'pkgPath':_0x11acc1,'currentVersion':_0x4a1068,'field':_0x5e9c92});break;}}}catch{}return{'configMigration':_0x187282,'oldArtifacts':_0x2a8d96,'oldMcpConfig':_0x4114b3,'needsSkillSwap':_0xca65d5,'sdkUpgrade':_0x74dbcc};}function printReport(_0x3e3742){const _0x5ef845=a188_0x48f01e,{configMigration:_0x12349b,oldArtifacts:_0x3d33d9,oldMcpConfig:_0x38d566,needsSkillSwap:_0x267507}=_0x3e3742;console[_0x5ef845(0x17c)](''),console['log'](a188_0x5706cb['bold'](_0x5ef845(0x198))),console[_0x5ef845(0x17c)]('');_0x12349b?(console[_0x5ef845(0x17c)](a188_0x5706cb[_0x5ef845(0x1a3)](_0x5ef845(0x177))+('\x20\x20'+a188_0x5706cb[_0x5ef845(0x133)](_0x12349b[_0x5ef845(0x134)]))),console[_0x5ef845(0x17c)](_0x5ef845(0x15f)+(_0x12349b[_0x5ef845(0x16b)]?a188_0x5706cb[_0x5ef845(0x157)](_0x5ef845(0x13e)):a188_0x5706cb[_0x5ef845(0x18e)](_0x5ef845(0x175)))),console[_0x5ef845(0x17c)](_0x5ef845(0x185)+_0x12349b['fields'][_0x5ef845(0x14a)](',\x20')),console[_0x5ef845(0x17c)](_0x5ef845(0x12d))):console[_0x5ef845(0x17c)](a188_0x5706cb[_0x5ef845(0x1a3)](_0x5ef845(0x177))+'\x20\x20'+a188_0x5706cb[_0x5ef845(0x18e)](_0x5ef845(0x15a)));console[_0x5ef845(0x17c)]('');if(_0x3d33d9[_0x5ef845(0x190)]>0x0){console[_0x5ef845(0x17c)](a188_0x5706cb['cyan']('Legacy\x20artifacts:'));for(const _0x1c8732 of _0x3d33d9){console[_0x5ef845(0x17c)]('\x20\x20'+a188_0x5706cb['red'](_0x5ef845(0x130))+'\x20\x20'+_0x1c8732);}console[_0x5ef845(0x17c)]('\x20\x20Action:\x20delete');}else console['log'](a188_0x5706cb['cyan'](_0x5ef845(0x18b))+'\x20\x20'+a188_0x5706cb[_0x5ef845(0x18e)]('none\x20found'));console[_0x5ef845(0x17c)]('');_0x38d566?(console[_0x5ef845(0x17c)](a188_0x5706cb[_0x5ef845(0x1a3)](_0x5ef845(0x188))+('\x20\x20'+a188_0x5706cb[_0x5ef845(0x133)](_0x38d566[_0x5ef845(0x186)])+'\x20→\x20keys:\x20'+_0x38d566['keys']['join'](',\x20'))),console[_0x5ef845(0x17c)](_0x5ef845(0x15c))):console['log'](a188_0x5706cb['cyan'](_0x5ef845(0x188))+'\x20\x20'+a188_0x5706cb[_0x5ef845(0x18e)](_0x5ef845(0x145)));console[_0x5ef845(0x17c)](''),console['log'](a188_0x5706cb[_0x5ef845(0x1a3)](_0x5ef845(0x187))+('\x20\x20'+(_0x267507?a188_0x5706cb[_0x5ef845(0x133)](_0x5ef845(0x142)):a188_0x5706cb[_0x5ef845(0x157)](_0x5ef845(0x17b)))));_0x267507&&console[_0x5ef845(0x17c)](_0x5ef845(0x164)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x5ef845(0x17c)]('');if(_0x3e3742[_0x5ef845(0x18a)]){const {currentVersion:_0x211216,field:_0x3832b1,pkgPath:_0x218a61}=_0x3e3742[_0x5ef845(0x18a)];console['log'](a188_0x5706cb['cyan'](_0x5ef845(0x174))+('\x20\x20'+a188_0x5706cb[_0x5ef845(0x133)](_0x218a61))),console[_0x5ef845(0x17c)]('\x20\x20Current\x20version\x20in\x20'+_0x3832b1+':\x20'+a188_0x5706cb[_0x5ef845(0x133)](_0x211216)+_0x5ef845(0x143)+a188_0x5706cb['green'](_0x5ef845(0x171))),console['log'](_0x5ef845(0x151));}else console[_0x5ef845(0x17c)](a188_0x5706cb[_0x5ef845(0x1a3)](_0x5ef845(0x174))+'\x20\x20'+a188_0x5706cb[_0x5ef845(0x18e)](_0x5ef845(0x149)));console[_0x5ef845(0x17c)]('');}function execConfigMigration(_0x31b67a,_0x542191){const _0x2b64cc=a188_0x48f01e,{configMigration:_0x493259}=_0x31b67a;if(!_0x493259?.['oldPath'])return{'step':0x1,'label':_0x2b64cc(0x18d),'ok':!![],'detail':'skipped\x20(no\x20legacy\x20config)'};const _0x56f2da=readConfigFile(_0x493259[_0x2b64cc(0x134)]),_0x7c2e91=resolve(_0x542191,NEW_CONFIG_NAME),_0x3b5f24=_0x493259[_0x2b64cc(0x16b)]?readConfigFile(_0x7c2e91):{};for(const [_0x3dfc2a,_0xec4272]of Object[_0x2b64cc(0x14b)](_0x56f2da)){!(_0x3dfc2a in _0x3b5f24)&&(_0x3b5f24[_0x3dfc2a]=_0xec4272);}writeConfigFile(_0x7c2e91,_0x3b5f24);const _0xb3054b=_0x493259[_0x2b64cc(0x134)]+_0x2b64cc(0x14c);return renameSync(_0x493259[_0x2b64cc(0x134)],_0xb3054b),{'step':0x1,'label':_0x2b64cc(0x18d),'ok':!![],'detail':_0x493259['oldPath']+_0x2b64cc(0x143)+_0x7c2e91+'\x20(backup:\x20'+_0xb3054b+')'};}function execRemoveOldArtifacts(_0x4eb353){const _0x28a89f=a188_0x48f01e,_0x29f991=[];for(const _0x8dd0aa of _0x4eb353){try{if(!existsSync(_0x8dd0aa))continue;const _0x46f586=tryStat(_0x8dd0aa);_0x46f586?.[_0x28a89f(0x131)]()?rmSync(_0x8dd0aa,{'recursive':!![],'force':!![]}):unlinkSync(_0x8dd0aa);}catch(_0x3fe86b){_0x29f991[_0x28a89f(0x19c)](_0x8dd0aa+':\x20'+_0x3fe86b['message']);}}return{'step':0x3,'label':_0x28a89f(0x167),'ok':_0x29f991[_0x28a89f(0x190)]===0x0,'detail':_0x29f991[_0x28a89f(0x190)]>0x0?_0x4eb353[_0x28a89f(0x190)]-_0x29f991['length']+'/'+_0x4eb353[_0x28a89f(0x190)]+_0x28a89f(0x152)+_0x29f991[_0x28a89f(0x14a)](';\x20')+')':_0x4eb353[_0x28a89f(0x190)]+'\x20removed'};}function execCleanMcp(_0x499da6){const _0x4876ef=a188_0x48f01e;if(!_0x499da6[_0x4876ef(0x14f)])return{'step':0x4,'label':_0x4876ef(0x19e),'ok':!![],'detail':_0x4876ef(0x161)};try{const _0x3873b8=readFileSync(_0x499da6[_0x4876ef(0x14f)][_0x4876ef(0x186)],_0x4876ef(0x139)),_0x1ba115=JSON['parse'](_0x3873b8);if(_0x1ba115?.['mcpServers']&&typeof _0x1ba115[_0x4876ef(0x1a0)]===_0x4876ef(0x154)){const _0x3def7c=[];for(const [_0x1baa97,_0x403956]of Object[_0x4876ef(0x14b)](_0x1ba115[_0x4876ef(0x1a0)])){_0x403956?.[_0x4876ef(0x193)]&&Array[_0x4876ef(0x18c)](_0x403956[_0x4876ef(0x193)])&&_0x403956[_0x4876ef(0x193)][_0x4876ef(0x16d)](_0x486db6=>typeof _0x486db6==='string'&&_0x486db6['includes']('@lovrabet/dataset-mcp-server'))&&_0x3def7c[_0x4876ef(0x19c)](_0x1baa97);}for(const _0x31ac85 of _0x3def7c){delete _0x1ba115[_0x4876ef(0x1a0)][_0x31ac85];}return _0x3def7c[_0x4876ef(0x190)]>0x0&&writeFileSync(_0x499da6[_0x4876ef(0x14f)][_0x4876ef(0x186)],JSON[_0x4876ef(0x183)](_0x1ba115,null,0x2)+'\x0a',_0x4876ef(0x139)),{'step':0x4,'label':_0x4876ef(0x19e),'ok':!![],'detail':'removed\x20'+_0x3def7c[_0x4876ef(0x14a)](',\x20')+_0x4876ef(0x18f)+_0x499da6[_0x4876ef(0x14f)][_0x4876ef(0x186)]};}return{'step':0x4,'label':_0x4876ef(0x19e),'ok':!![],'detail':'no\x20matching\x20entry\x20found'};}catch(_0x51458c){return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':![],'detail':_0x51458c[_0x4876ef(0x17d)]};}}function a188_0x204c(_0x221e42,_0x10b707){_0x221e42=_0x221e42-0x12b;const _0x10e021=a188_0x10e0();let _0x204c25=_0x10e021[_0x221e42];return _0x204c25;}function execSkillsRemove(_0x50122d,_0x2b2ab7){const _0x43bf50=a188_0x48f01e,_0xac97d0=runNpxSkillsRemove(_0x50122d,{'stdio':_0x43bf50(0x13b),'yes':_0x2b2ab7});return{'step':0x5,'label':_0x43bf50(0x160),'ok':_0xac97d0['ok'],'detail':_0xac97d0['ok']?'lovrabet/lovrabet-skill\x20removed':_0xac97d0[_0x43bf50(0x15b)]??'exit\x20'+_0xac97d0[_0x43bf50(0x13a)]};}function execSkillsAdd(_0x3057c5,_0x3e30b4){const _0x178f97=a188_0x48f01e,_0x41f884=runNpxSkillsAddGlobal(_0x3057c5,_0x178f97(0x1a5),{'stdio':_0x178f97(0x13b),'yes':_0x3e30b4});return{'step':0x6,'label':_0x178f97(0x1a7),'ok':_0x41f884['ok'],'detail':_0x41f884['ok']?_0x178f97(0x1a2):_0x41f884[_0x178f97(0x15b)]??_0x178f97(0x170)+_0x41f884['status']};}function execUpgradeSdk(_0xbed579){const _0x23a64f=a188_0x48f01e;if(!_0xbed579['sdkUpgrade'])return{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0x23a64f(0x17a)};const {pkgPath:_0x5d3a29,currentVersion:_0x210ee9,field:_0x5085d7}=_0xbed579[_0x23a64f(0x18a)];try{const _0x3af8fd=readFileSync(_0x5d3a29,_0x23a64f(0x139)),_0x1462d4=JSON[_0x23a64f(0x163)](_0x3af8fd);return _0x1462d4[_0x5085d7][_0x23a64f(0x191)]=_0x23a64f(0x171),writeFileSync(_0x5d3a29,JSON['stringify'](_0x1462d4,null,0x2)+'\x0a',_0x23a64f(0x139)),{'step':0x7,'label':_0x23a64f(0x13c),'ok':!![],'detail':_0x5085d7+_0x23a64f(0x150)+_0x210ee9+_0x23a64f(0x176)};}catch(_0x566567){return{'step':0x7,'label':_0x23a64f(0x13c),'ok':![],'detail':_0x566567[_0x23a64f(0x17d)]};}}function tryStat(_0x398da1){try{return statSync(_0x398da1);}catch{return undefined;}}function printSummary(_0x2296be){const _0x5154b1=a188_0x48f01e;console[_0x5154b1(0x17c)](''),console[_0x5154b1(0x17c)](a188_0x5706cb[_0x5154b1(0x132)](_0x5154b1(0x165))),console[_0x5154b1(0x17c)]('');for(const _0x40ed4a of _0x2296be){const _0x26d25a=_0x40ed4a['ok']?a188_0x5706cb['green']('OK'):a188_0x5706cb[_0x5154b1(0x12c)]('FAIL');console[_0x5154b1(0x17c)]('\x20\x20'+_0x26d25a+_0x5154b1(0x168)+_0x40ed4a[_0x5154b1(0x173)]+':\x20'+_0x40ed4a[_0x5154b1(0x189)]);if(_0x40ed4a[_0x5154b1(0x159)])console[_0x5154b1(0x17c)]('\x20\x20\x20\x20\x20\x20\x20'+a188_0x5706cb[_0x5154b1(0x18e)](_0x40ed4a[_0x5154b1(0x159)]));}console[_0x5154b1(0x17c)]('');}export async function upgradeApp(_0x46480f,_0x36a7f4){const _0x529420=a188_0x48f01e,_0x4c7bb5=process[_0x529420(0x136)](),_0x5aeb7a=analyse(_0x4c7bb5),_0x2a80f7=!_0x5aeb7a[_0x529420(0x137)]&&_0x5aeb7a['oldArtifacts']['length']===0x0&&!_0x5aeb7a[_0x529420(0x14f)]&&!_0x5aeb7a['needsSkillSwap']&&!_0x5aeb7a[_0x529420(0x18a)];if(_0x2a80f7){console[_0x529420(0x17c)](a188_0x5706cb[_0x529420(0x157)](_0x529420(0x140)));return;}printReport(_0x5aeb7a);const _0x2a56f4=!!(_0x36a7f4[_0x529420(0x172)]||_0x36a7f4['Y']||_0x46480f);if(!_0x2a56f4)try{const _0x5b19cd=await askConfirm(_0x529420(0x15e));if(!_0x5b19cd){console['log'](a188_0x5706cb[_0x529420(0x18e)](_0x529420(0x16e)));return;}}catch(_0x185d6a){if(_0x185d6a?.[_0x529420(0x17d)]===_0x529420(0x158)){console[_0x529420(0x17c)](a188_0x5706cb[_0x529420(0x18e)]('Upgrade\x20cancelled.'));return;}throw _0x185d6a;}const _0x5cdbcc=[],_0x4a8263=a188_0x4ab3f2({'text':'Step\x201/7:\x20Migrating\x20config...','color':_0x529420(0x1a3)})[_0x529420(0x184)](),_0x3aecbc=execConfigMigration(_0x5aeb7a,_0x4c7bb5);_0x5cdbcc[_0x529420(0x19c)](_0x3aecbc),_0x4a8263[_0x3aecbc['ok']?_0x529420(0x19a):_0x529420(0x16c)]('Step\x201/7:\x20Config\x20migration\x20—\x20'+(_0x3aecbc['detail']??(_0x3aecbc['ok']?_0x529420(0x146):_0x529420(0x182))));const _0x45a6b3=resolve(_0x4c7bb5,'.lovrabet'),_0x2077ae=a188_0x4ab3f2({'text':_0x529420(0x144),'color':_0x529420(0x1a3)})[_0x529420(0x184)]();if(existsSync(_0x45a6b3))try{rmSync(_0x45a6b3,{'recursive':!![],'force':!![]}),_0x2077ae['succeed'](_0x529420(0x199)),_0x5cdbcc[_0x529420(0x19c)]({'step':0x2,'label':_0x529420(0x192),'ok':!![]});}catch(_0x975608){_0x2077ae[_0x529420(0x16c)](_0x529420(0x153)+_0x975608[_0x529420(0x17d)]),_0x5cdbcc[_0x529420(0x19c)]({'step':0x2,'label':_0x529420(0x192),'ok':![],'detail':_0x975608[_0x529420(0x17d)]});}else _0x2077ae[_0x529420(0x147)]('Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped'),_0x5cdbcc[_0x529420(0x19c)]({'step':0x2,'label':_0x529420(0x192),'ok':!![],'detail':_0x529420(0x161)});const _0x6f45e=a188_0x4ab3f2({'text':_0x529420(0x15d),'color':_0x529420(0x1a3)})[_0x529420(0x184)](),_0x56346a=execRemoveOldArtifacts(_0x5aeb7a[_0x529420(0x14d)]);_0x5cdbcc[_0x529420(0x19c)](_0x56346a),_0x6f45e[_0x56346a['ok']?'succeed':_0x529420(0x16c)]('Step\x203/7:\x20Legacy\x20artifacts\x20—\x20'+(_0x56346a[_0x529420(0x159)]??(_0x56346a['ok']?_0x529420(0x146):_0x529420(0x182))));const _0x563b54=a188_0x4ab3f2({'text':_0x529420(0x14e),'color':_0x529420(0x1a3)})[_0x529420(0x184)](),_0xb5ef64=execCleanMcp(_0x5aeb7a);_0x5cdbcc[_0x529420(0x19c)](_0xb5ef64),_0x563b54[_0xb5ef64['ok']?'succeed':_0x529420(0x16c)](_0x529420(0x1a8)+(_0xb5ef64[_0x529420(0x159)]??(_0xb5ef64['ok']?_0x529420(0x146):_0x529420(0x182))));const _0x4984ad=a188_0x4ab3f2({'text':_0x529420(0x169),'color':'cyan'})[_0x529420(0x184)](),_0x193de9=execSkillsRemove(_0x4c7bb5,_0x2a56f4);_0x5cdbcc[_0x529420(0x19c)](_0x193de9),_0x4984ad[_0x193de9['ok']?'succeed':'fail'](_0x529420(0x1a4)+(_0x193de9['detail']??(_0x193de9['ok']?_0x529420(0x146):'failed')));const _0x4113b2=a188_0x4ab3f2({'text':_0x529420(0x197),'color':_0x529420(0x1a3)})[_0x529420(0x184)](),_0x4c57c8=execSkillsAdd(_0x4c7bb5,_0x2a56f4);_0x5cdbcc[_0x529420(0x19c)](_0x4c57c8),_0x4113b2[_0x4c57c8['ok']?'succeed':_0x529420(0x16c)]('Step\x206/7:\x20Install\x20new\x20skill\x20—\x20'+(_0x4c57c8[_0x529420(0x159)]??(_0x4c57c8['ok']?_0x529420(0x146):_0x529420(0x182))));const _0x36467a=a188_0x4ab3f2({'text':_0x529420(0x13d),'color':_0x529420(0x1a3)})[_0x529420(0x184)](),_0x4d0492=execUpgradeSdk(_0x5aeb7a);_0x5cdbcc[_0x529420(0x19c)](_0x4d0492),_0x36467a[_0x4d0492['ok']?_0x529420(0x19a):_0x529420(0x16c)]('Step\x207/7:\x20@lovrabet/sdk\x20—\x20'+(_0x4d0492[_0x529420(0x159)]??(_0x4d0492['ok']?_0x529420(0x146):_0x529420(0x182)))),printSummary(_0x5cdbcc);const _0x5b538c=_0x5cdbcc[_0x529420(0x16d)](_0x1ca6c7=>!_0x1ca6c7['ok']);_0x5b538c?console[_0x529420(0x17c)](a188_0x5706cb[_0x529420(0x133)](_0x529420(0x16a))):console[_0x529420(0x17c)](a188_0x5706cb[_0x529420(0x157)]('Upgrade\x20completed\x20successfully!')),_0x4d0492['ok']&&_0x5aeb7a[_0x529420(0x18a)]&&(console[_0x529420(0x17c)](''),console[_0x529420(0x17c)](a188_0x5706cb[_0x529420(0x132)][_0x529420(0x1a3)](_0x529420(0x17f))),console[_0x529420(0x17c)](a188_0x5706cb['cyan'](_0x529420(0x178))),console[_0x529420(0x17c)](''),console[_0x529420(0x17c)](a188_0x5706cb['white'](_0x529420(0x148))),console[_0x529420(0x17c)](a188_0x5706cb[_0x529420(0x194)](_0x529420(0x181))),console[_0x529420(0x17c)](a188_0x5706cb[_0x529420(0x194)](_0x529420(0x1a6))),console[_0x529420(0x17c)](''));}
1
+ const a188_0xad0a10=a188_0x3488;(function(_0x66162c,_0x1094d1){const _0xb11631=a188_0x3488,_0x39aa0a=_0x66162c();while(!![]){try{const _0x4ea8f3=parseInt(_0xb11631(0x204))/0x1*(-parseInt(_0xb11631(0x1ba))/0x2)+parseInt(_0xb11631(0x203))/0x3*(parseInt(_0xb11631(0x200))/0x4)+-parseInt(_0xb11631(0x1c6))/0x5+parseInt(_0xb11631(0x212))/0x6+parseInt(_0xb11631(0x1a9))/0x7*(-parseInt(_0xb11631(0x1cf))/0x8)+-parseInt(_0xb11631(0x1b7))/0x9+parseInt(_0xb11631(0x205))/0xa*(parseInt(_0xb11631(0x1aa))/0xb);if(_0x4ea8f3===_0x1094d1)break;else _0x39aa0a['push'](_0x39aa0a['shift']());}catch(_0x45f570){_0x39aa0a['push'](_0x39aa0a['shift']());}}}(a188_0x4ad9,0x6aaf8));import a188_0x153756 from'chalk';import a188_0x461dff from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';function a188_0x3488(_0x1fcf5f,_0x105b5d){_0x1fcf5f=_0x1fcf5f-0x199;const _0x4ad95c=a188_0x4ad9();let _0x348878=_0x4ad95c[_0x1fcf5f];return _0x348878;}import{resolve}from'node:path';import{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=[a188_0xad0a10(0x1df),a188_0xad0a10(0x1d3)];function collectIdeSkillFiles(_0x54d328){const _0x44fb30=a188_0xad0a10,_0x6abfaf=[];for(const _0x490f70 of Object[_0x44fb30(0x20c)](CORE_IDE_CONFIGS)){if(_0x490f70[_0x44fb30(0x1f1)])for(const _0x481424 of _0x490f70[_0x44fb30(0x1f1)]){_0x6abfaf[_0x44fb30(0x1dc)](resolve(_0x54d328,_0x481424['path']));}}return _0x6abfaf;}function analyse(_0x37e673){const _0x194551=a188_0xad0a10;let _0x2391ce=null;const _0x45d4c4=resolve(_0x37e673,NEW_CONFIG_NAME),_0x5c53f9=existsSync(_0x45d4c4);for(const _0x1d6cf4 of LEGACY_CONFIG_NAMES){const _0x1711e7=resolve(_0x37e673,_0x1d6cf4);if(existsSync(_0x1711e7)){const _0x144e49=readConfigFile(_0x1711e7),_0x67b12=Object[_0x194551(0x1c0)](_0x144e49)[_0x194551(0x215)](_0x49044e=>typeof _0x144e49[_0x49044e]!==_0x194551(0x214));_0x2391ce={'oldPath':_0x1711e7,'hasNewConfig':_0x5c53f9,'fields':_0x67b12};break;}}const _0x20a40f=[],_0x1d80f6=resolve(_0x37e673,'.lovrabet');if(existsSync(_0x1d80f6))_0x20a40f[_0x194551(0x1dc)](_0x1d80f6);const _0x2505d4=resolve(_0x37e673,_0x194551(0x1d2));if(existsSync(_0x2505d4))_0x20a40f[_0x194551(0x1dc)](_0x2505d4);const _0x58a506=resolve(_0x37e673,'.claude/skills/lovrabet');if(existsSync(_0x58a506))_0x20a40f[_0x194551(0x1dc)](_0x58a506);for(const _0x4fe063 of collectIdeSkillFiles(_0x37e673)){if(existsSync(_0x4fe063))_0x20a40f[_0x194551(0x1dc)](_0x4fe063);}let _0x36ae54=null;const _0x54ff02=resolve(_0x37e673,_0x194551(0x20f));if(existsSync(_0x54ff02))try{const _0x6fb40a=JSON['parse'](readFileSync(_0x54ff02,'utf8'));if(_0x6fb40a?.[_0x194551(0x1ca)]&&typeof _0x6fb40a['mcpServers']===_0x194551(0x1f6)){const _0x326d9e=[];for(const [_0x2f41e4,_0x42378b]of Object['entries'](_0x6fb40a['mcpServers'])){const _0x2b878a=_0x42378b;_0x2b878a?.[_0x194551(0x1b4)]&&Array['isArray'](_0x2b878a['args'])&&_0x2b878a[_0x194551(0x1b4)][_0x194551(0x1e7)](_0x20a394=>typeof _0x20a394===_0x194551(0x1c8)&&_0x20a394['includes']('@lovrabet/dataset-mcp-server'))&&_0x326d9e['push'](_0x2f41e4);}_0x326d9e['length']>0x0&&(_0x36ae54={'path':_0x54ff02,'keys':_0x326d9e});}}catch{}const _0x1f68b2=_0x20a40f[_0x194551(0x201)]>0x0||_0x2391ce!==null;let _0x4bae71=null;const _0x4ac535=resolve(_0x37e673,_0x194551(0x1a3));if(existsSync(_0x4ac535))try{const _0x51a4c3=JSON[_0x194551(0x1d7)](readFileSync(_0x4ac535,_0x194551(0x1bc)));for(const _0x12fa2 of['dependencies',_0x194551(0x1b6)]){const _0x4201de=_0x51a4c3?.[_0x12fa2]?.[_0x194551(0x208)];if(typeof _0x4201de===_0x194551(0x1c8)){_0x4201de!==_0x194551(0x1b5)&&(_0x4bae71={'pkgPath':_0x4ac535,'currentVersion':_0x4201de,'field':_0x12fa2});break;}}}catch{}return{'configMigration':_0x2391ce,'oldArtifacts':_0x20a40f,'oldMcpConfig':_0x36ae54,'needsSkillSwap':_0x1f68b2,'sdkUpgrade':_0x4bae71};}function printReport(_0x44ec00){const _0x5ead55=a188_0xad0a10,{configMigration:_0x3c66cf,oldArtifacts:_0x3b3e63,oldMcpConfig:_0x5084c9,needsSkillSwap:_0x34b9dc}=_0x44ec00;console[_0x5ead55(0x1dd)](''),console[_0x5ead55(0x1dd)](a188_0x153756['bold']('===\x20Upgrade\x20Analysis\x20===')),console[_0x5ead55(0x1dd)]('');_0x3c66cf?(console[_0x5ead55(0x1dd)](a188_0x153756[_0x5ead55(0x1c2)](_0x5ead55(0x1ee))+('\x20\x20'+a188_0x153756['yellow'](_0x3c66cf[_0x5ead55(0x1b2)]))),console[_0x5ead55(0x1dd)]('\x20\x20New\x20config\x20(.rabetbase.json):\x20'+(_0x3c66cf[_0x5ead55(0x206)]?a188_0x153756[_0x5ead55(0x1d8)]('already\x20exists\x20(will\x20merge)'):a188_0x153756[_0x5ead55(0x1f9)](_0x5ead55(0x19b)))),console[_0x5ead55(0x1dd)](_0x5ead55(0x1db)+_0x3c66cf[_0x5ead55(0x1e6)][_0x5ead55(0x1b1)](',\x20')),console[_0x5ead55(0x1dd)](_0x5ead55(0x1de))):console[_0x5ead55(0x1dd)](a188_0x153756[_0x5ead55(0x1c2)](_0x5ead55(0x1ee))+'\x20\x20'+a188_0x153756['gray'](_0x5ead55(0x1ae)));console[_0x5ead55(0x1dd)]('');if(_0x3b3e63[_0x5ead55(0x201)]>0x0){console['log'](a188_0x153756['cyan'](_0x5ead55(0x19e)));for(const _0x8ac1fb of _0x3b3e63){console[_0x5ead55(0x1dd)]('\x20\x20'+a188_0x153756[_0x5ead55(0x1fd)](_0x5ead55(0x218))+'\x20\x20'+_0x8ac1fb);}console['log']('\x20\x20Action:\x20delete');}else console[_0x5ead55(0x1dd)](a188_0x153756[_0x5ead55(0x1c2)](_0x5ead55(0x19e))+'\x20\x20'+a188_0x153756[_0x5ead55(0x1f9)]('none\x20found'));console[_0x5ead55(0x1dd)]('');_0x5084c9?(console[_0x5ead55(0x1dd)](a188_0x153756[_0x5ead55(0x1c2)]('MCP\x20config:')+('\x20\x20'+a188_0x153756[_0x5ead55(0x1f7)](_0x5084c9[_0x5ead55(0x1f4)])+_0x5ead55(0x1a7)+_0x5084c9[_0x5ead55(0x1c0)][_0x5ead55(0x1b1)](',\x20'))),console[_0x5ead55(0x1dd)](_0x5ead55(0x207))):console[_0x5ead55(0x1dd)](a188_0x153756[_0x5ead55(0x1c2)]('MCP\x20config:')+'\x20\x20'+a188_0x153756['gray'](_0x5ead55(0x1bb)));console[_0x5ead55(0x1dd)](''),console['log'](a188_0x153756[_0x5ead55(0x1c2)](_0x5ead55(0x1a2))+('\x20\x20'+(_0x34b9dc?a188_0x153756['yellow'](_0x5ead55(0x1ce)):a188_0x153756[_0x5ead55(0x1d8)]('not\x20needed'))));_0x34b9dc&&console[_0x5ead55(0x1dd)](_0x5ead55(0x1eb)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x5ead55(0x1dd)]('');if(_0x44ec00[_0x5ead55(0x20d)]){const {currentVersion:_0x376697,field:_0x19f647,pkgPath:_0x306a91}=_0x44ec00['sdkUpgrade'];console[_0x5ead55(0x1dd)](a188_0x153756[_0x5ead55(0x1c2)](_0x5ead55(0x213))+('\x20\x20'+a188_0x153756['yellow'](_0x306a91))),console[_0x5ead55(0x1dd)](_0x5ead55(0x1f8)+_0x19f647+':\x20'+a188_0x153756['yellow'](_0x376697)+_0x5ead55(0x21b)+a188_0x153756[_0x5ead55(0x1d8)]('latest')),console[_0x5ead55(0x1dd)]('\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)');}else console['log'](a188_0x153756[_0x5ead55(0x1c2)](_0x5ead55(0x213))+'\x20\x20'+a188_0x153756[_0x5ead55(0x1f9)]('not\x20found\x20or\x20already\x20at\x20latest'));console[_0x5ead55(0x1dd)]('');}function execConfigMigration(_0x288a53,_0x5b3b8e){const _0x12be5b=a188_0xad0a10,{configMigration:_0x5c9e5d}=_0x288a53;if(!_0x5c9e5d?.['oldPath'])return{'step':0x1,'label':_0x12be5b(0x1e3),'ok':!![],'detail':'skipped\x20(no\x20legacy\x20config)'};const _0x59a1f0=readConfigFile(_0x5c9e5d[_0x12be5b(0x1b2)]),_0x58df78=resolve(_0x5b3b8e,NEW_CONFIG_NAME),_0x50bdca=_0x5c9e5d[_0x12be5b(0x206)]?readConfigFile(_0x58df78):{};for(const [_0x278dcb,_0x4e9c45]of Object[_0x12be5b(0x1be)](_0x59a1f0)){!(_0x278dcb in _0x50bdca)&&(_0x50bdca[_0x278dcb]=_0x4e9c45);}writeConfigFile(_0x58df78,_0x50bdca);const _0xe76b13=_0x5c9e5d[_0x12be5b(0x1b2)]+'.bak';return renameSync(_0x5c9e5d[_0x12be5b(0x1b2)],_0xe76b13),{'step':0x1,'label':_0x12be5b(0x1e3),'ok':!![],'detail':_0x5c9e5d[_0x12be5b(0x1b2)]+_0x12be5b(0x21b)+_0x58df78+_0x12be5b(0x1f0)+_0xe76b13+')'};}function execRemoveOldArtifacts(_0x15cc79){const _0x7facf5=a188_0xad0a10,_0x5300c9=[];for(const _0x461fbe of _0x15cc79){try{if(!existsSync(_0x461fbe))continue;const _0x458ab=tryStat(_0x461fbe);_0x458ab?.[_0x7facf5(0x1e2)]()?rmSync(_0x461fbe,{'recursive':!![],'force':!![]}):unlinkSync(_0x461fbe);}catch(_0x1d5aa8){_0x5300c9[_0x7facf5(0x1dc)](_0x461fbe+':\x20'+_0x1d5aa8[_0x7facf5(0x1e1)]);}}return{'step':0x3,'label':_0x7facf5(0x211),'ok':_0x5300c9['length']===0x0,'detail':_0x5300c9[_0x7facf5(0x201)]>0x0?_0x15cc79[_0x7facf5(0x201)]-_0x5300c9[_0x7facf5(0x201)]+'/'+_0x15cc79[_0x7facf5(0x201)]+_0x7facf5(0x1e8)+_0x5300c9[_0x7facf5(0x1b1)](';\x20')+')':_0x15cc79[_0x7facf5(0x201)]+_0x7facf5(0x1fe)};}function execCleanMcp(_0x1fb596){const _0x1c5a11=a188_0xad0a10;if(!_0x1fb596[_0x1c5a11(0x1d1)])return{'step':0x4,'label':_0x1c5a11(0x1c9),'ok':!![],'detail':_0x1c5a11(0x1c3)};try{const _0x5ef344=readFileSync(_0x1fb596['oldMcpConfig']['path'],_0x1c5a11(0x1bc)),_0x379d30=JSON[_0x1c5a11(0x1d7)](_0x5ef344);if(_0x379d30?.[_0x1c5a11(0x1ca)]&&typeof _0x379d30[_0x1c5a11(0x1ca)]==='object'){const _0x57527e=[];for(const [_0x297927,_0x294c0e]of Object['entries'](_0x379d30[_0x1c5a11(0x1ca)])){_0x294c0e?.[_0x1c5a11(0x1b4)]&&Array[_0x1c5a11(0x1ab)](_0x294c0e[_0x1c5a11(0x1b4)])&&_0x294c0e['args']['some'](_0x253938=>typeof _0x253938===_0x1c5a11(0x1c8)&&_0x253938[_0x1c5a11(0x1a5)]('@lovrabet/dataset-mcp-server'))&&_0x57527e[_0x1c5a11(0x1dc)](_0x297927);}for(const _0x5a8bb7 of _0x57527e){delete _0x379d30[_0x1c5a11(0x1ca)][_0x5a8bb7];}return _0x57527e[_0x1c5a11(0x201)]>0x0&&writeFileSync(_0x1fb596[_0x1c5a11(0x1d1)]['path'],JSON['stringify'](_0x379d30,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':_0x1c5a11(0x1c9),'ok':!![],'detail':_0x1c5a11(0x1fa)+_0x57527e[_0x1c5a11(0x1b1)](',\x20')+'\x20from\x20'+_0x1fb596['oldMcpConfig']['path']};}return{'step':0x4,'label':_0x1c5a11(0x1c9),'ok':!![],'detail':'no\x20matching\x20entry\x20found'};}catch(_0x547466){return{'step':0x4,'label':_0x1c5a11(0x1c9),'ok':![],'detail':_0x547466[_0x1c5a11(0x1e1)]};}}function execSkillsRemove(_0x29b455,_0x20127a){const _0xd8f5f8=a188_0xad0a10,_0x267920=runNpxSkillsRemove(_0x29b455,{'stdio':_0xd8f5f8(0x1cc),'yes':_0x20127a});return{'step':0x5,'label':_0xd8f5f8(0x1c4),'ok':_0x267920['ok'],'detail':_0x267920['ok']?_0xd8f5f8(0x216):_0x267920['error']??_0xd8f5f8(0x1b0)+_0x267920[_0xd8f5f8(0x20a)]};}function execSkillsAdd(_0x74505,_0x28c009){const _0x1426a9=a188_0xad0a10,_0x48d42e=runNpxSkillsAddGlobal(_0x74505,_0x1426a9(0x20e),{'stdio':_0x1426a9(0x1cc),'yes':_0x28c009});return{'step':0x6,'label':'Install\x20new\x20skill','ok':_0x48d42e['ok'],'detail':_0x48d42e['ok']?_0x1426a9(0x19d):_0x48d42e[_0x1426a9(0x219)]??_0x1426a9(0x1b0)+_0x48d42e[_0x1426a9(0x20a)]};}function execUpgradeSdk(_0x18fe81){const _0x4e1d3e=a188_0xad0a10;if(!_0x18fe81[_0x4e1d3e(0x20d)])return{'step':0x7,'label':_0x4e1d3e(0x1cd),'ok':!![],'detail':_0x4e1d3e(0x1e0)};const {pkgPath:_0x25458d,currentVersion:_0x316a0e,field:_0x19a9aa}=_0x18fe81[_0x4e1d3e(0x20d)];try{const _0x2bc198=readFileSync(_0x25458d,_0x4e1d3e(0x1bc)),_0x3995d8=JSON[_0x4e1d3e(0x1d7)](_0x2bc198);return _0x3995d8[_0x19a9aa][_0x4e1d3e(0x208)]=_0x4e1d3e(0x1b5),writeFileSync(_0x25458d,JSON[_0x4e1d3e(0x1f2)](_0x3995d8,null,0x2)+'\x0a',_0x4e1d3e(0x1bc)),{'step':0x7,'label':_0x4e1d3e(0x1cd),'ok':!![],'detail':_0x19a9aa+_0x4e1d3e(0x1a4)+_0x316a0e+_0x4e1d3e(0x1e4)};}catch(_0x4060f9){return{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':![],'detail':_0x4060f9[_0x4e1d3e(0x1e1)]};}}function tryStat(_0x5594e7){try{return statSync(_0x5594e7);}catch{return undefined;}}function a188_0x4ad9(){const _0x24dfef=['.lovrabetrc','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','failed','step','parse','green','\x20\x20\x20\x20\x20\x20\x20','\x20\x20Step\x20','\x20\x20Fields\x20to\x20migrate:\x20','push','log','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','.lovrabet.json','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','message','isDirectory','Config\x20migration','\x20→\x20latest','Step\x206/7:\x20Installing\x20new\x20skill...','fields','some','\x20removed\x20(','start','oldArtifacts','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','Step\x201/7:\x20Migrating\x20config...','Config\x20file:','Upgrade\x20completed\x20successfully!','\x20(backup:\x20','files','stringify','detail','path','succeed','object','yellow','\x20\x20Current\x20version\x20in\x20','gray','removed\x20','\x20\x20#\x20or','white','red','\x20removed','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','8uWCvTT','length','needsSkillSwap','956073QBrSVD','4aawEPz','11670590gBaawf','hasNewConfig','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','@lovrabet/sdk','Remove\x20.lovrabet/','status','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','values','sdkUpgrade','lovrabet/rabetbase','.cursor/mcp.json','\x20\x20npm\x20install','Remove\x20legacy\x20artifacts','2252856IqLYVv','@lovrabet/sdk:','undefined','filter','lovrabet/lovrabet-skill\x20removed','Step\x201/7:\x20Config\x20migration\x20—\x20','FOUND','error','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','\x20→\x20','Step\x205/7:\x20Removing\x20old\x20skill...','Step\x204/7:\x20MCP\x20config\x20—\x20','not\x20found\x20(will\x20create)','Upgrade\x20cancelled.','lovrabet/rabetbase\x20installed\x20globally','Legacy\x20artifacts:','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','yes','Proceed\x20with\x20upgrade?','Skill\x20swap:','package.json','[\x22@lovrabet/sdk\x22]:\x20','includes','FAIL','\x20→\x20keys:\x20','info','221501uJvpxM','11XWhMOc','isArray','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','===\x20Upgrade\x20Summary\x20===','no\x20legacy\x20config\x20found','bold','exit\x20','join','oldPath','CANCEL','args','latest','devDependencies','5427477SzzyPi','Step\x204/7:\x20Cleaning\x20MCP\x20config...','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','394636YMWlJd','no\x20legacy\x20entry','utf8','label','entries','cwd','keys','done','cyan','skipped','Remove\x20old\x20skill','fail','329105yQiqeW','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','string','Clean\x20MCP\x20config','mcpServers','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','inherit','Upgrade\x20@lovrabet/sdk','needed','72cOrZyA','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','oldMcpConfig','.cursor/rules/lovrabet_rules.mdc'];a188_0x4ad9=function(){return _0x24dfef;};return a188_0x4ad9();}function printSummary(_0x14ade6){const _0x1c4d7a=a188_0xad0a10;console[_0x1c4d7a(0x1dd)](''),console[_0x1c4d7a(0x1dd)](a188_0x153756[_0x1c4d7a(0x1af)](_0x1c4d7a(0x1ad))),console[_0x1c4d7a(0x1dd)]('');for(const _0x42eb34 of _0x14ade6){const _0x16bced=_0x42eb34['ok']?a188_0x153756['green']('OK'):a188_0x153756['red'](_0x1c4d7a(0x1a6));console[_0x1c4d7a(0x1dd)]('\x20\x20'+_0x16bced+_0x1c4d7a(0x1da)+_0x42eb34[_0x1c4d7a(0x1d6)]+':\x20'+_0x42eb34[_0x1c4d7a(0x1bd)]);if(_0x42eb34[_0x1c4d7a(0x1f3)])console['log'](_0x1c4d7a(0x1d9)+a188_0x153756[_0x1c4d7a(0x1f9)](_0x42eb34[_0x1c4d7a(0x1f3)]));}console[_0x1c4d7a(0x1dd)]('');}export async function upgradeApp(_0x41b51f,_0xe71c89){const _0x394dcc=a188_0xad0a10,_0x13c025=process[_0x394dcc(0x1bf)](),_0x24e287=analyse(_0x13c025),_0x24c292=!_0x24e287['configMigration']&&_0x24e287[_0x394dcc(0x1ea)][_0x394dcc(0x201)]===0x0&&!_0x24e287[_0x394dcc(0x1d1)]&&!_0x24e287[_0x394dcc(0x202)]&&!_0x24e287[_0x394dcc(0x20d)];if(_0x24c292){console[_0x394dcc(0x1dd)](a188_0x153756[_0x394dcc(0x1d8)](_0x394dcc(0x1cb)));return;}printReport(_0x24e287);const _0x4b29ef=!!(_0xe71c89[_0x394dcc(0x1a0)]||_0xe71c89['Y']||_0x41b51f);if(!_0x4b29ef)try{const _0xc008b4=await askConfirm(_0x394dcc(0x1a1));if(!_0xc008b4){console[_0x394dcc(0x1dd)](a188_0x153756[_0x394dcc(0x1f9)](_0x394dcc(0x19c)));return;}}catch(_0x1369db){if(_0x1369db?.['message']===_0x394dcc(0x1b3)){console[_0x394dcc(0x1dd)](a188_0x153756[_0x394dcc(0x1f9)](_0x394dcc(0x19c)));return;}throw _0x1369db;}const _0x10fe38=[],_0x507835=a188_0x461dff({'text':_0x394dcc(0x1ed),'color':_0x394dcc(0x1c2)})[_0x394dcc(0x1e9)](),_0x2bf878=execConfigMigration(_0x24e287,_0x13c025);_0x10fe38[_0x394dcc(0x1dc)](_0x2bf878),_0x507835[_0x2bf878['ok']?_0x394dcc(0x1f5):_0x394dcc(0x1c5)](_0x394dcc(0x217)+(_0x2bf878['detail']??(_0x2bf878['ok']?'done':_0x394dcc(0x1d5))));const _0x422381=resolve(_0x13c025,'.lovrabet'),_0x41567e=a188_0x461dff({'text':_0x394dcc(0x1b9),'color':_0x394dcc(0x1c2)})['start']();if(existsSync(_0x422381))try{rmSync(_0x422381,{'recursive':!![],'force':!![]}),_0x41567e[_0x394dcc(0x1f5)](_0x394dcc(0x1ff)),_0x10fe38[_0x394dcc(0x1dc)]({'step':0x2,'label':_0x394dcc(0x209),'ok':!![]});}catch(_0x114cd3){_0x41567e[_0x394dcc(0x1c5)](_0x394dcc(0x1d4)+_0x114cd3[_0x394dcc(0x1e1)]),_0x10fe38[_0x394dcc(0x1dc)]({'step':0x2,'label':_0x394dcc(0x209),'ok':![],'detail':_0x114cd3[_0x394dcc(0x1e1)]});}else _0x41567e[_0x394dcc(0x1a8)](_0x394dcc(0x21a)),_0x10fe38[_0x394dcc(0x1dc)]({'step':0x2,'label':_0x394dcc(0x209),'ok':!![],'detail':_0x394dcc(0x1c3)});const _0x3f6f55=a188_0x461dff({'text':'Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','color':_0x394dcc(0x1c2)})[_0x394dcc(0x1e9)](),_0x19faa9=execRemoveOldArtifacts(_0x24e287['oldArtifacts']);_0x10fe38['push'](_0x19faa9),_0x3f6f55[_0x19faa9['ok']?_0x394dcc(0x1f5):_0x394dcc(0x1c5)]('Step\x203/7:\x20Legacy\x20artifacts\x20—\x20'+(_0x19faa9[_0x394dcc(0x1f3)]??(_0x19faa9['ok']?_0x394dcc(0x1c1):_0x394dcc(0x1d5))));const _0xa2b35a=a188_0x461dff({'text':_0x394dcc(0x1b8),'color':'cyan'})[_0x394dcc(0x1e9)](),_0x29d235=execCleanMcp(_0x24e287);_0x10fe38['push'](_0x29d235),_0xa2b35a[_0x29d235['ok']?_0x394dcc(0x1f5):_0x394dcc(0x1c5)](_0x394dcc(0x19a)+(_0x29d235[_0x394dcc(0x1f3)]??(_0x29d235['ok']?_0x394dcc(0x1c1):_0x394dcc(0x1d5))));const _0x5b120f=a188_0x461dff({'text':_0x394dcc(0x199),'color':_0x394dcc(0x1c2)})[_0x394dcc(0x1e9)](),_0x169193=execSkillsRemove(_0x13c025,_0x4b29ef);_0x10fe38[_0x394dcc(0x1dc)](_0x169193),_0x5b120f[_0x169193['ok']?_0x394dcc(0x1f5):'fail'](_0x394dcc(0x1ac)+(_0x169193['detail']??(_0x169193['ok']?_0x394dcc(0x1c1):_0x394dcc(0x1d5))));const _0x303d42=a188_0x461dff({'text':_0x394dcc(0x1e5),'color':_0x394dcc(0x1c2)})[_0x394dcc(0x1e9)](),_0x3f55d3=execSkillsAdd(_0x13c025,_0x4b29ef);_0x10fe38[_0x394dcc(0x1dc)](_0x3f55d3),_0x303d42[_0x3f55d3['ok']?_0x394dcc(0x1f5):_0x394dcc(0x1c5)](_0x394dcc(0x1c7)+(_0x3f55d3['detail']??(_0x3f55d3['ok']?_0x394dcc(0x1c1):_0x394dcc(0x1d5))));const _0x909e96=a188_0x461dff({'text':'Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','color':_0x394dcc(0x1c2)})[_0x394dcc(0x1e9)](),_0x32350d=execUpgradeSdk(_0x24e287);_0x10fe38['push'](_0x32350d),_0x909e96[_0x32350d['ok']?_0x394dcc(0x1f5):_0x394dcc(0x1c5)](_0x394dcc(0x1ec)+(_0x32350d[_0x394dcc(0x1f3)]??(_0x32350d['ok']?'done':_0x394dcc(0x1d5)))),printSummary(_0x10fe38);const _0xbd83b5=_0x10fe38[_0x394dcc(0x1e7)](_0x12bb5e=>!_0x12bb5e['ok']);_0xbd83b5?console[_0x394dcc(0x1dd)](a188_0x153756['yellow'](_0x394dcc(0x19f))):console[_0x394dcc(0x1dd)](a188_0x153756[_0x394dcc(0x1d8)](_0x394dcc(0x1ef))),_0x32350d['ok']&&_0x24e287['sdkUpgrade']&&(console['log'](''),console['log'](a188_0x153756[_0x394dcc(0x1af)][_0x394dcc(0x1c2)](_0x394dcc(0x20b))),console[_0x394dcc(0x1dd)](a188_0x153756[_0x394dcc(0x1c2)](_0x394dcc(0x1d0))),console[_0x394dcc(0x1dd)](''),console[_0x394dcc(0x1dd)](a188_0x153756[_0x394dcc(0x1fc)](_0x394dcc(0x210))),console[_0x394dcc(0x1dd)](a188_0x153756[_0x394dcc(0x1fc)](_0x394dcc(0x1fb))),console[_0x394dcc(0x1dd)](a188_0x153756[_0x394dcc(0x1fc)]('\x20\x20bun\x20install')),console[_0x394dcc(0x1dd)](''));}