@lovrabet/rabetbase-cli 2.5.4-beta.1 → 2.5.4-beta.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 (368) hide show
  1. package/README.md +4 -3
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/api-group.js +1 -1
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.js +1 -1
  6. package/lib/api/generate-sdk-config-file.js +1 -1
  7. package/lib/api/legacy-api-file.js +1 -1
  8. package/lib/api/model-registry-file.js +1 -1
  9. package/lib/api/model-registry-scaffold.js +1 -1
  10. package/lib/api/model-source.js +1 -1
  11. package/lib/auth/auth-server-ui.js +1 -1
  12. package/lib/auth/auth-server.js +1 -1
  13. package/lib/auth/constant.js +1 -1
  14. package/lib/auth/get-cookie.js +1 -1
  15. package/lib/auth/get-session-user.js +1 -1
  16. package/lib/auth/is-session-valid.js +1 -1
  17. package/lib/auth/login-success-html.js +1 -1
  18. package/lib/auth/logout.js +1 -1
  19. package/lib/cli-flags.js +1 -1
  20. package/lib/cli.js +1 -1
  21. package/lib/commands/api/generate.js +1 -1
  22. package/lib/commands/api/index.js +1 -1
  23. package/lib/commands/api/list.js +1 -1
  24. package/lib/commands/api/pull.js +1 -1
  25. package/lib/commands/api/shared.js +1 -1
  26. package/lib/commands/app/index.js +1 -1
  27. package/lib/commands/app/list.js +1 -1
  28. package/lib/commands/app/members-list.js +1 -1
  29. package/lib/commands/app/remote-directory.js +1 -1
  30. package/lib/commands/app/shared.js +1 -1
  31. package/lib/commands/app-config/delete.js +1 -1
  32. package/lib/commands/app-config/get.js +1 -1
  33. package/lib/commands/app-config/index.js +1 -1
  34. package/lib/commands/app-config/list.js +1 -1
  35. package/lib/commands/app-config/set.js +1 -1
  36. package/lib/commands/app-config/shared.js +1 -1
  37. package/lib/commands/auth/index.js +1 -1
  38. package/lib/commands/bff/create.js +1 -1
  39. package/lib/commands/bff/delete.js +1 -1
  40. package/lib/commands/bff/detail.js +1 -1
  41. package/lib/commands/bff/index.js +1 -1
  42. package/lib/commands/bff/list.js +1 -1
  43. package/lib/commands/bff/logs.js +1 -1
  44. package/lib/commands/bff/pull.js +1 -1
  45. package/lib/commands/bff/push.js +1 -1
  46. package/lib/commands/bff/status.js +1 -1
  47. package/lib/commands/cli-skill/index.js +1 -1
  48. package/lib/commands/cli-update.js +1 -1
  49. package/lib/commands/codegen/index.js +1 -1
  50. package/lib/commands/codegen/sdk.js +1 -1
  51. package/lib/commands/codegen/sql.js +1 -1
  52. package/lib/commands/common/app-registry.js +1 -1
  53. package/lib/commands/common/app-selector.js +1 -1
  54. package/lib/commands/common/async-task.js +1 -1
  55. package/lib/commands/common/dry-run.js +1 -1
  56. package/lib/commands/common/flags.js +1 -1
  57. package/lib/commands/common/local-file.js +1 -1
  58. package/lib/commands/common/validate.js +1 -1
  59. package/lib/commands/config/delete.js +1 -1
  60. package/lib/commands/config/get.js +1 -1
  61. package/lib/commands/config/index.js +1 -1
  62. package/lib/commands/config/init.d.ts +1 -1
  63. package/lib/commands/config/init.js +1 -1
  64. package/lib/commands/config/list.js +1 -1
  65. package/lib/commands/config/set.js +1 -1
  66. package/lib/commands/config/shared.js +1 -1
  67. package/lib/commands/dataset/batch-design.js +1 -1
  68. package/lib/commands/dataset/business-group-update.js +1 -1
  69. package/lib/commands/dataset/business-groups.js +1 -1
  70. package/lib/commands/dataset/capability.js +1 -1
  71. package/lib/commands/dataset/cross-relation-create.js +1 -1
  72. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  73. package/lib/commands/dataset/cross-relation-list.js +1 -1
  74. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  75. package/lib/commands/dataset/cross-relation-update.js +1 -1
  76. package/lib/commands/dataset/delete.js +1 -1
  77. package/lib/commands/dataset/detail.js +1 -1
  78. package/lib/commands/dataset/extend-update.js +1 -1
  79. package/lib/commands/dataset/field-restore.js +1 -1
  80. package/lib/commands/dataset/field-update.js +1 -1
  81. package/lib/commands/dataset/generate.js +1 -1
  82. package/lib/commands/dataset/index.js +1 -1
  83. package/lib/commands/dataset/list.js +1 -1
  84. package/lib/commands/dataset/operations.js +1 -1
  85. package/lib/commands/dataset/relation-audit.js +1 -1
  86. package/lib/commands/dataset/relation-create.js +1 -1
  87. package/lib/commands/dataset/relation-delete.js +1 -1
  88. package/lib/commands/dataset/relation-shared.js +1 -1
  89. package/lib/commands/dataset/relation-update.js +1 -1
  90. package/lib/commands/dataset/relations.js +1 -1
  91. package/lib/commands/dataset/rename.js +1 -1
  92. package/lib/commands/dataset/restore.js +1 -1
  93. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  94. package/lib/commands/db/analysis-batching.js +1 -1
  95. package/lib/commands/db/analyze-batch-plan.js +1 -1
  96. package/lib/commands/db/analyze-cancel.js +1 -1
  97. package/lib/commands/db/analyze-start.js +1 -1
  98. package/lib/commands/db/analyze-status.js +1 -1
  99. package/lib/commands/db/create.js +1 -1
  100. package/lib/commands/db/delete.js +1 -1
  101. package/lib/commands/db/detail.js +1 -1
  102. package/lib/commands/db/diff-refresh-start.js +1 -1
  103. package/lib/commands/db/diff-refresh-status.js +1 -1
  104. package/lib/commands/db/diff.js +1 -1
  105. package/lib/commands/db/index.js +1 -1
  106. package/lib/commands/db/list.js +1 -1
  107. package/lib/commands/db/shared.js +1 -1
  108. package/lib/commands/db/table-diff-shared.js +1 -1
  109. package/lib/commands/db/tables.js +1 -1
  110. package/lib/commands/db/test.js +1 -1
  111. package/lib/commands/db/update.js +1 -1
  112. package/lib/commands/deployment/index.js +1 -1
  113. package/lib/commands/deployment/sync-all.js +1 -1
  114. package/lib/commands/deployment/sync-jobs.js +1 -1
  115. package/lib/commands/deployment/sync-status.js +1 -1
  116. package/lib/commands/doctor.js +1 -1
  117. package/lib/commands/file/index.js +1 -1
  118. package/lib/commands/flow/create.js +1 -1
  119. package/lib/commands/flow/detail.js +1 -1
  120. package/lib/commands/flow/index.js +1 -1
  121. package/lib/commands/flow/list.js +1 -1
  122. package/lib/commands/flow/publish.js +1 -1
  123. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  124. package/lib/commands/flow/runtime-role-list.js +1 -1
  125. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  126. package/lib/commands/flow/runtime-user-search.js +1 -1
  127. package/lib/commands/flow/shared.js +1 -1
  128. package/lib/commands/flow/update.js +1 -1
  129. package/lib/commands/flow/validate.js +1 -1
  130. package/lib/commands/instant-api-policy/current.js +1 -1
  131. package/lib/commands/instant-api-policy/index.js +1 -1
  132. package/lib/commands/instant-api-policy/init.js +1 -1
  133. package/lib/commands/instant-api-policy/publish.js +1 -1
  134. package/lib/commands/instant-api-policy/pull.js +1 -1
  135. package/lib/commands/instant-api-policy/revision.js +1 -1
  136. package/lib/commands/instant-api-policy/revisions.js +1 -1
  137. package/lib/commands/instant-api-policy/rollback.js +1 -1
  138. package/lib/commands/instant-api-policy/shared.js +1 -1
  139. package/lib/commands/instant-api-policy/validate.js +1 -1
  140. package/lib/commands/issue/index.js +1 -1
  141. package/lib/commands/issue/nudge.js +1 -1
  142. package/lib/commands/issue/report.js +1 -1
  143. package/lib/commands/issue/shared.js +1 -1
  144. package/lib/commands/kb/create.js +1 -1
  145. package/lib/commands/kb/delete.js +1 -1
  146. package/lib/commands/kb/detail.js +1 -1
  147. package/lib/commands/kb/index.js +1 -1
  148. package/lib/commands/kb/list.js +1 -1
  149. package/lib/commands/kb/search.js +1 -1
  150. package/lib/commands/kb/shared.js +1 -1
  151. package/lib/commands/kb/update.js +1 -1
  152. package/lib/commands/logs/index.js +1 -1
  153. package/lib/commands/menu/asset-update.js +1 -1
  154. package/lib/commands/menu/delete.js +1 -1
  155. package/lib/commands/menu/external-link-create.js +1 -1
  156. package/lib/commands/menu/external-link-update.js +1 -1
  157. package/lib/commands/menu/group-create.js +1 -1
  158. package/lib/commands/menu/group-update.js +1 -1
  159. package/lib/commands/menu/index.js +1 -1
  160. package/lib/commands/menu/list.js +1 -1
  161. package/lib/commands/menu/move.js +1 -1
  162. package/lib/commands/menu/regroup-start.js +1 -1
  163. package/lib/commands/menu/rename.js +1 -1
  164. package/lib/commands/menu/shared/compare-table.js +1 -1
  165. package/lib/commands/menu/shared/delete-plan.js +1 -1
  166. package/lib/commands/menu/shared/facts.js +1 -1
  167. package/lib/commands/menu/shared/index.js +1 -1
  168. package/lib/commands/menu/shared/inquirer.js +1 -1
  169. package/lib/commands/menu/shared/local-pages.js +1 -1
  170. package/lib/commands/menu/shared/logic.js +1 -1
  171. package/lib/commands/menu/shared/mutations.js +1 -1
  172. package/lib/commands/menu/shared/service.js +1 -1
  173. package/lib/commands/menu/shared/sync-core.js +1 -1
  174. package/lib/commands/menu/shared/update-core.js +1 -1
  175. package/lib/commands/menu/shared/valid-url.js +1 -1
  176. package/lib/commands/menu/sync.js +1 -1
  177. package/lib/commands/menu/visibility-update.js +1 -1
  178. package/lib/commands/notification/config-create.js +1 -1
  179. package/lib/commands/notification/config-delete.js +1 -1
  180. package/lib/commands/notification/config-list.js +1 -1
  181. package/lib/commands/notification/config-update.js +1 -1
  182. package/lib/commands/notification/index.js +1 -1
  183. package/lib/commands/notification/shared.js +1 -1
  184. package/lib/commands/ocr/index.js +1 -1
  185. package/lib/commands/page/create.js +1 -1
  186. package/lib/commands/page/custom/detail.js +1 -1
  187. package/lib/commands/page/custom/list.js +1 -1
  188. package/lib/commands/page/custom/publish.js +1 -1
  189. package/lib/commands/page/custom/shared.js +1 -1
  190. package/lib/commands/page/custom/syntax.js +1 -1
  191. package/lib/commands/page/custom/update.js +1 -1
  192. package/lib/commands/page/data-list-status.js +1 -1
  193. package/lib/commands/page/generate-start.js +1 -1
  194. package/lib/commands/page/generate-status.js +1 -1
  195. package/lib/commands/page/index.js +1 -1
  196. package/lib/commands/page/pull.js +1 -1
  197. package/lib/commands/page/push.js +1 -1
  198. package/lib/commands/page/relation-audit.js +1 -1
  199. package/lib/commands/page/restore.js +1 -1
  200. package/lib/commands/page/shared.js +1 -1
  201. package/lib/commands/page/sync.js +1 -1
  202. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  203. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  204. package/lib/commands/project/create/format-elapsed.js +1 -1
  205. package/lib/commands/project/create/main.js +1 -1
  206. package/lib/commands/project/create/materialize-project-template.js +1 -1
  207. package/lib/commands/project/create/project-name.js +1 -1
  208. package/lib/commands/project/create/project-template-archive.js +1 -1
  209. package/lib/commands/project/create/project-template-path.js +1 -1
  210. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  211. package/lib/commands/project/create/use-format-code.js +1 -1
  212. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  213. package/lib/commands/project/domain-routing-sync.js +1 -1
  214. package/lib/commands/project/index.js +1 -1
  215. package/lib/commands/project/upgrade.js +1 -1
  216. package/lib/commands/registry.js +1 -1
  217. package/lib/commands/role/delete.js +1 -1
  218. package/lib/commands/role/detail.js +1 -1
  219. package/lib/commands/role/index.js +1 -1
  220. package/lib/commands/role/list.js +1 -1
  221. package/lib/commands/role/shared.js +1 -1
  222. package/lib/commands/role/update.js +1 -1
  223. package/lib/commands/role/user-add.js +1 -1
  224. package/lib/commands/role/user-remove.js +1 -1
  225. package/lib/commands/role/user-resolve.js +1 -1
  226. package/lib/commands/rule/get.js +1 -1
  227. package/lib/commands/rule/index.js +1 -1
  228. package/lib/commands/rule/list.js +1 -1
  229. package/lib/commands/rule/set.js +1 -1
  230. package/lib/commands/rule/shared.js +1 -1
  231. package/lib/commands/run/index.js +1 -1
  232. package/lib/commands/schema.js +1 -1
  233. package/lib/commands/sql/create.js +1 -1
  234. package/lib/commands/sql/delete.js +1 -1
  235. package/lib/commands/sql/detail.js +1 -1
  236. package/lib/commands/sql/exec.js +1 -1
  237. package/lib/commands/sql/index.js +1 -1
  238. package/lib/commands/sql/list.js +1 -1
  239. package/lib/commands/sql/pull.js +1 -1
  240. package/lib/commands/sql/push.js +1 -1
  241. package/lib/commands/sql/shared.js +1 -1
  242. package/lib/commands/sql/status.js +1 -1
  243. package/lib/commands/sql/validate.js +1 -1
  244. package/lib/commands/task/index.js +1 -1
  245. package/lib/commands/task/status.js +1 -1
  246. package/lib/commands/tenant/index.js +1 -1
  247. package/lib/commands/tenant/members-list.js +1 -1
  248. package/lib/commands/tenant/shared.js +1 -1
  249. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  250. package/lib/commands/user-account/index.js +1 -1
  251. package/lib/commands/workspace/add.js +1 -1
  252. package/lib/commands/workspace/index.js +1 -1
  253. package/lib/commands/workspace/remove.js +1 -1
  254. package/lib/config/domain-config.d.ts +1 -1
  255. package/lib/config/domain-config.js +1 -1
  256. package/lib/config/project-domain-routing.js +1 -1
  257. package/lib/config/region-config.js +1 -1
  258. package/lib/config/schema.d.ts +1 -1
  259. package/lib/config/schema.js +1 -1
  260. package/lib/constant/cdn.js +1 -1
  261. package/lib/constant/cli.js +1 -1
  262. package/lib/constant/defaults.js +1 -1
  263. package/lib/constant/domain.d.ts +4 -0
  264. package/lib/constant/domain.js +1 -1
  265. package/lib/constant/env.js +1 -1
  266. package/lib/constant/output.js +1 -1
  267. package/lib/constant/paths.js +1 -1
  268. package/lib/constant/region.d.ts +1 -1
  269. package/lib/constant/region.js +1 -1
  270. package/lib/constant/risk.js +1 -1
  271. package/lib/constant/routing-profile.d.ts +14 -1
  272. package/lib/constant/routing-profile.js +1 -1
  273. package/lib/context/app-resolver.d.ts +1 -0
  274. package/lib/context/app-resolver.js +1 -1
  275. package/lib/context/auth-resolver.js +1 -1
  276. package/lib/context/config-loader.js +1 -1
  277. package/lib/context.js +1 -1
  278. package/lib/core/alias-resolver.js +1 -1
  279. package/lib/core/api-client.js +1 -1
  280. package/lib/core/bff/config.js +1 -1
  281. package/lib/core/bff/file-system.js +1 -1
  282. package/lib/core/bff/hash.js +1 -1
  283. package/lib/core/bff/hook-directory.js +1 -1
  284. package/lib/core/bff/lock.js +1 -1
  285. package/lib/core/bff/utils.js +1 -1
  286. package/lib/core/cross-db-relation.js +1 -1
  287. package/lib/core/db-resolver.js +1 -1
  288. package/lib/core/flow-config.js +1 -1
  289. package/lib/core/instant-api-policy/config.js +1 -1
  290. package/lib/core/kb-search-client.js +1 -1
  291. package/lib/core/page/file-system.js +1 -1
  292. package/lib/core/page/hash.js +1 -1
  293. package/lib/core/page/lock.js +1 -1
  294. package/lib/core/page/lr-smart-jsx.js +1 -1
  295. package/lib/core/sql-index-auditor.js +1 -1
  296. package/lib/core/sql-sync/config.js +1 -1
  297. package/lib/core/sql-sync/file-system.js +1 -1
  298. package/lib/core/sql-sync/hash.js +1 -1
  299. package/lib/core/sql-sync/lock.js +1 -1
  300. package/lib/core/sql-sync/utils.js +1 -1
  301. package/lib/core/sql-validator.js +1 -1
  302. package/lib/errors.js +1 -1
  303. package/lib/framework/build-all-flags.js +1 -1
  304. package/lib/framework/error-output.js +1 -1
  305. package/lib/framework/explicit-yes.js +1 -1
  306. package/lib/framework/flags.js +1 -1
  307. package/lib/framework/help.js +1 -1
  308. package/lib/framework/index.js +1 -1
  309. package/lib/framework/output.js +1 -1
  310. package/lib/framework/response.js +1 -1
  311. package/lib/framework/runner-alias.js +1 -1
  312. package/lib/framework/runner.js +1 -1
  313. package/lib/framework/schema-export.js +1 -1
  314. package/lib/framework/supported-flags.js +1 -1
  315. package/lib/framework/types.js +1 -1
  316. package/lib/generated/build-info.d.ts +4 -4
  317. package/lib/generated/build-info.js +1 -1
  318. package/lib/generated/official-routing.d.ts +15 -3
  319. package/lib/generated/official-routing.js +1 -1
  320. package/lib/generated/routing-contract.d.ts +2 -2
  321. package/lib/generated/routing-contract.js +1 -1
  322. package/lib/help.js +1 -1
  323. package/lib/postinstall.js +1 -1
  324. package/lib/runtime/confirmation.js +1 -1
  325. package/lib/runtime/event.js +1 -1
  326. package/lib/runtime/index.js +1 -1
  327. package/lib/runtime/queue.js +1 -1
  328. package/lib/runtime/resolve.js +1 -1
  329. package/lib/skills/builtin-skill.js +1 -1
  330. package/lib/skills/main.js +1 -1
  331. package/lib/skills/npx-skills-add.d.ts +5 -0
  332. package/lib/skills/npx-skills-add.js +1 -1
  333. package/lib/skills/skill-presence.js +1 -1
  334. package/lib/telemetry/cli-command-trace.js +1 -1
  335. package/lib/telemetry/cli-help-trace.js +1 -1
  336. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  337. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  338. package/lib/telemetry/send-cli-trace-log.js +1 -1
  339. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  340. package/lib/utils/ai_config.js +1 -1
  341. package/lib/utils/apply-jq-filter.js +1 -1
  342. package/lib/utils/cdn-config.js +1 -1
  343. package/lib/utils/check-sdk-version.js +1 -1
  344. package/lib/utils/cli-version-check.js +1 -1
  345. package/lib/utils/cli-version-policy.js +1 -1
  346. package/lib/utils/config.js +1 -1
  347. package/lib/utils/entity-with-id.js +1 -1
  348. package/lib/utils/file-utils.js +1 -1
  349. package/lib/utils/guides-cdn.js +1 -1
  350. package/lib/utils/http-client.js +1 -1
  351. package/lib/utils/is-non-interactive.js +1 -1
  352. package/lib/utils/logger.js +1 -1
  353. package/lib/utils/params.js +1 -1
  354. package/lib/utils/platform.js +1 -1
  355. package/lib/utils/sleep.js +1 -1
  356. package/lib/utils/template-replacer.js +1 -1
  357. package/lib/utils/update-notice.js +1 -1
  358. package/lib/utils/version.js +1 -1
  359. package/lib/utils/with-active-cookie.js +1 -1
  360. package/lib/utils/write-cli-side-channel.js +1 -1
  361. package/package.json +1 -1
  362. package/skills/rabetbase/SKILL.md +2 -2
  363. package/skills/rabetbase/guides/sql-creation-workflow.md +1 -1
  364. package/skills/rabetbase/guides/sql-mybatis.md +12 -8
  365. package/skills/rabetbase/references/rabetbase-config.md +6 -4
  366. package/skills/rabetbase/references/rabetbase-init.md +7 -5
  367. package/skills/rabetbase/references/rabetbase-kb.md +8 -6
  368. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a200_0x1b034d=a200_0x571b;(function(_0x37d4f5,_0x25d8a8){const _0x519c80=a200_0x571b,_0x2bd134=_0x37d4f5();while(!![]){try{const _0x2391fe=-parseInt(_0x519c80(0x116))/0x1*(parseInt(_0x519c80(0x11e))/0x2)+-parseInt(_0x519c80(0x117))/0x3*(-parseInt(_0x519c80(0x138))/0x4)+parseInt(_0x519c80(0x113))/0x5+-parseInt(_0x519c80(0x11c))/0x6*(parseInt(_0x519c80(0x14b))/0x7)+-parseInt(_0x519c80(0x10a))/0x8+parseInt(_0x519c80(0x120))/0x9*(-parseInt(_0x519c80(0x11b))/0xa)+-parseInt(_0x519c80(0x133))/0xb*(-parseInt(_0x519c80(0x114))/0xc);if(_0x2391fe===_0x25d8a8)break;else _0x2bd134['push'](_0x2bd134['shift']());}catch(_0x507dfc){_0x2bd134['push'](_0x2bd134['shift']());}}}(a200_0x45b9,0x8bd64));import{copyFileSync,existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import a200_0x5ebcce from'node:path';function a200_0x571b(_0x47b857,_0x40fe35){_0x47b857=_0x47b857-0xff;const _0x45b99c=a200_0x45b9();let _0x571b30=_0x45b99c[_0x47b857];return _0x571b30;}import{getMultiAppConfigs,initMultiAppEnvironment,readConfigFile,writeConfigFile}from'../../context.js';import{DEFAULT_API_DIR}from'../../constant/paths.js';import{getRuntimeDomain}from'../../constant/domain.js';import{getRegistryGroup,resolveApiProfileLayouts}from'../../api/api-group.js';import{MODEL_REGISTRY_FILE_NAME,MODEL_RUNTIME_FILE_NAME,readModelRegistry,updateModelRegistry}from'../../api/model-registry-file.js';function a200_0x45b9(){const _0x5d0c61=['11gQgSZp','replace-generated','includes','apiGroup','backups','44sKDAmG','unconfigured','client','path','push','relative','action','preserve','default','app','unchanged','object','join','has','The\x20file\x20contains\x20project-owned\x20code\x20and\x20will\x20not\x20be\x20overwritten.','./models.generated','flatMap','apiDir','manual-merge','305823DXzSZm','defaultApp','Multiple\x20Lovrabet\x20model\x20profiles\x20match\x20Runtime\x20Domain','client.ts','find','dirname','name','utf8','Recognized\x20legacy\x20CLI\x20scaffold;\x20a\x20backup\x20will\x20be\x20retained.','.rabetbase.json','candidates','candidatePath','/**\x0a\x20*\x20Lovrabet\x20SDK\x20runtime\x20routing.\x0a\x20*\x20Generated\x20by\x20Rabetbase\x20CLI.\x20Do\x20not\x20add\x20credentials\x20to\x20this\x20file.\x0a\x20*/\x0aexport\x20const\x20LOVRABET_SDK_CONFIG\x20=\x20{}\x20as\x20const;\x0a','1146424TVgprF','api.ts','files','isDefault','.rabetbase','create','outputDir','LOVRABET_RUNTIME_DOMAIN','keys','1895495mkOlWB','25785132hbPkWc','map','2yUIVBm','178905mzQJuc','length','api-model-registry-v2','-api.ts','4870WvKVGh','126oLtzbI','single','702434qsvBLF','Model\x20facts\x20are\x20preserved\x20and\x20completed\x20from\x20legacy\x20generated\x20files\x20when\x20possible.','15669OzdfID','add','Profile-aware\x20model\x20selection\x20generated\x20by\x20Rabetbase\x20CLI','startsWith','api','sdk-config.ts','modelRuntime','apps','project-upgrade','some','migrate-single-app','project','basename','manualMergeRequired','string','normalizedApiDir','appcode','The\x20existing\x20runtime\x20selector\x20is\x20not\x20a\x20recognized\x20current\x20generated\x20file.','No\x20Lovrabet\x20model\x20profile\x20matches\x20Runtime\x20Domain'];a200_0x45b9=function(){return _0x5d0c61;};return a200_0x45b9();}import{isLegacyGeneratedApiScaffold,isLegacyGeneratedClientScaffold,parseLegacyApiModels}from'../../api/legacy-api-file.js';import{renderModelRegistryScaffold}from'../../api/model-registry-scaffold.js';import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';const MIGRATION_ID=a200_0x1b034d(0x119),SDK_CONFIG_SOURCE=a200_0x1b034d(0x109);function relativeMigrationDir(_0x402a19,_0x993ea9){const _0x29a8bb=a200_0x1b034d,_0x242787=a200_0x5ebcce[_0x29a8bb(0x13d)](_0x402a19,_0x993ea9);return _0x242787&&!_0x242787[_0x29a8bb(0x123)]('..')?_0x242787:'external-api-dir';}function candidatePath(_0xd9563b,_0x4b7516,_0xfffced){const _0x451c5f=a200_0x1b034d;return a200_0x5ebcce[_0x451c5f(0x144)](_0xd9563b,_0x451c5f(0x10e),_0x451c5f(0x128),MIGRATION_ID,_0x451c5f(0x107),relativeMigrationDir(_0xd9563b,_0x4b7516),_0xfffced);}function backupPath(_0x50af55,_0x76558c,_0x556bb3){const _0x3c14a9=a200_0x1b034d;return a200_0x5ebcce[_0x3c14a9(0x144)](_0x50af55,_0x3c14a9(0x10e),_0x3c14a9(0x128),MIGRATION_ID,_0x3c14a9(0x137),relativeMigrationDir(_0x50af55,_0x76558c),_0x556bb3);}function readOptional(_0x356726){try{return readFileSync(_0x356726,'utf8');}catch{return undefined;}}function readJsonObject(_0x4afc8a){const _0x61e9cc=a200_0x1b034d;try{const _0xf1e429=JSON['parse'](readFileSync(_0x4afc8a,_0x61e9cc(0x104)));return _0xf1e429&&typeof _0xf1e429===_0x61e9cc(0x143)?_0xf1e429:{};}catch{return{};}}function planEntrypoint(_0x1bf137,_0x4595b8,_0x593eae,_0x536bb7){const _0x241ba4=a200_0x1b034d,_0x445d00=a200_0x5ebcce['join'](_0x4595b8,_0x593eae),_0x524866=readOptional(_0x445d00);if(_0x524866===undefined)return{'path':_0x445d00,'action':_0x241ba4(0x10f)};if(_0x593eae==='api.ts'?_0x524866[_0x241ba4(0x135)](_0x241ba4(0x147))&&_0x524866[_0x241ba4(0x135)]('./model-runtime'):_0x524866['includes'](_0x241ba4(0x111)))return{'path':_0x445d00,'action':_0x241ba4(0x142)};if(_0x536bb7(_0x524866))return{'path':_0x445d00,'action':'replace-generated','reason':_0x241ba4(0x105)};return{'path':_0x445d00,'action':_0x241ba4(0x14a),'reason':_0x241ba4(0x146),'candidatePath':candidatePath(_0x1bf137,_0x4595b8,_0x593eae)};}function syntheticApps(_0x2f061b){const _0x46deb8=a200_0x1b034d,_0x249dfd=_0x2f061b['apps']&&typeof _0x2f061b[_0x46deb8(0x127)]==='object'?_0x2f061b[_0x46deb8(0x127)]:undefined;if(_0x249dfd&&Object[_0x46deb8(0x112)](_0x249dfd)[_0x46deb8(0x118)]>0x0){const _0x168637=typeof _0x2f061b['defaultApp']===_0x46deb8(0x12e)?_0x2f061b[_0x46deb8(0x14c)]:Object[_0x46deb8(0x112)](_0x249dfd)[_0x46deb8(0x118)]===0x1?Object[_0x46deb8(0x112)](_0x249dfd)[0x0]:undefined;return Object['entries'](_0x249dfd)[_0x46deb8(0x148)](([_0x26638d,_0x1743a2])=>{const _0x2a0b08=_0x46deb8,_0x344bc8=_0x1743a2,_0x59a57d=typeof _0x344bc8['appcode']===_0x2a0b08(0x12e)?_0x344bc8[_0x2a0b08(0x130)]:'';return _0x59a57d?[{'name':_0x26638d,'appcode':_0x59a57d,'apiGroup':typeof _0x344bc8['apiGroup']==='string'?_0x344bc8[_0x2a0b08(0x136)]:undefined,'isDefault':_0x26638d===_0x168637,'region':'cn','regionSource':_0x2a0b08(0x140),'apiDir':typeof _0x344bc8[_0x2a0b08(0x149)]===_0x2a0b08(0x12e)?_0x344bc8[_0x2a0b08(0x149)]:typeof _0x2f061b[_0x2a0b08(0x149)]===_0x2a0b08(0x12e)?_0x2f061b[_0x2a0b08(0x149)]:undefined,'routingConfig':{}}]:[];});}const _0x1897b2=typeof _0x2f061b[_0x46deb8(0x130)]==='string'?_0x2f061b['appcode']:typeof _0x2f061b[_0x46deb8(0x141)]===_0x46deb8(0x12e)?_0x2f061b[_0x46deb8(0x141)]:undefined;if(!_0x1897b2)return[];return[{'name':_0x1897b2,'appcode':_0x1897b2,'isDefault':!![],'region':'cn','regionSource':'default','apiDir':typeof _0x2f061b[_0x46deb8(0x149)]==='string'?_0x2f061b['apiDir']:undefined,'routingConfig':{}}];}function configuredLayouts(_0x350c2e,_0x16f0c6){const _0x270757=a200_0x1b034d;return resolveApiProfileLayouts(_0x16f0c6,_0x584a43=>a200_0x5ebcce['resolve'](_0x350c2e,_0x584a43[_0x270757(0x149)]||DEFAULT_API_DIR),_0x350c2e);}function uniqueRegistryGroups(_0x246147){const _0x9cd157=a200_0x1b034d,_0x3816e4=[],_0x5785d9=new Set(),_0x5710bd=new Set();for(const _0x25cde3 of _0x246147){const _0x36a830=getRegistryGroup(_0x246147,_0x25cde3);if(!_0x36a830){_0x5785d9[_0x9cd157(0x121)](_0x25cde3[_0x9cd157(0x110)]);continue;}const _0x54ae83=_0x25cde3[_0x9cd157(0x12f)]+'\x00'+(_0x25cde3['apiGroup']??_0x9cd157(0x11d));!_0x5710bd[_0x9cd157(0x145)](_0x54ae83)&&(_0x3816e4[_0x9cd157(0x13c)](_0x36a830),_0x5710bd[_0x9cd157(0x121)](_0x54ae83));}return{'groups':_0x3816e4,'skipped':[..._0x5785d9]};}function planGroup(_0xbb29e9,_0x243546){const _0x51e278=a200_0x1b034d,_0x5e1a60=_0x243546[0x0][_0x51e278(0x12f)],_0x21ff9d=a200_0x5ebcce['join'](_0x5e1a60,MODEL_RUNTIME_FILE_NAME),_0x422e90=readOptional(_0x21ff9d),_0x48841f=_0x422e90!==undefined&&_0x422e90[_0x51e278(0x135)](_0x51e278(0x122))&&_0x422e90[_0x51e278(0x135)](_0x51e278(0xff))&&_0x422e90[_0x51e278(0x135)](_0x51e278(0x132)),_0x1503b7=a200_0x5ebcce['join'](_0x5e1a60,MODEL_REGISTRY_FILE_NAME),_0x42864f=a200_0x5ebcce[_0x51e278(0x144)](_0x5e1a60,_0x51e278(0x125)),_0x8dc0a4=[planEntrypoint(_0xbb29e9,_0x5e1a60,_0x51e278(0x10b),isLegacyGeneratedApiScaffold),planEntrypoint(_0xbb29e9,_0x5e1a60,_0x51e278(0x100),isLegacyGeneratedClientScaffold),{'path':_0x21ff9d,'action':_0x422e90===undefined?'create':_0x48841f?_0x51e278(0x142):_0x51e278(0x14a),'reason':_0x422e90===undefined?undefined:_0x51e278(0x131),..._0x422e90!==undefined&&!_0x48841f?{'candidatePath':candidatePath(_0xbb29e9,_0x5e1a60,MODEL_RUNTIME_FILE_NAME)}:{}},{'path':_0x1503b7,'action':existsSync(_0x1503b7)?'preserve':_0x51e278(0x10f),'reason':_0x51e278(0x11f)},{'path':_0x42864f,'action':existsSync(_0x42864f)?'preserve':'create'}];return{'apiDir':_0x5e1a60,'profiles':_0x243546[_0x51e278(0x115)](_0x109880=>_0x109880[_0x51e278(0x141)][_0x51e278(0x103)]),'files':_0x8dc0a4};}export function analyzeProjectApiArchitecture(_0x5d1ecd,_0x20dc5d){const _0x2c584a=a200_0x1b034d,_0x194faa=a200_0x5ebcce[_0x2c584a(0x144)](_0x5d1ecd,'.rabetbase.json'),_0x22a123=_0x20dc5d??(existsSync(_0x194faa)?readJsonObject(_0x194faa):{}),_0x8bcaf6=syntheticApps(_0x22a123);if(_0x8bcaf6[_0x2c584a(0x118)]===0x0)return{'migration':MIGRATION_ID,'needed':![],'configAction':_0x2c584a(0x139),'groups':[],'skippedLegacyDirectories':[],'manualMergeRequired':![]};const _0x432f6a=_0x22a123[_0x2c584a(0x127)]?_0x2c584a(0x142):_0x2c584a(0x12a),{groups:_0x3c5ac3,skipped:_0x34871f}=uniqueRegistryGroups(configuredLayouts(_0x5d1ecd,_0x8bcaf6)),_0x1c8615=_0x3c5ac3[_0x2c584a(0x115)](_0x5d615e=>planGroup(_0x5d1ecd,_0x5d615e)),_0x3a2888=_0x1c8615[_0x2c584a(0x129)](_0x3a4deb=>_0x3a4deb[_0x2c584a(0x10c)]['some'](_0x5da6ca=>_0x5da6ca['action']===_0x2c584a(0x14a))),_0x350422=_0x432f6a===_0x2c584a(0x12a)||_0x1c8615[_0x2c584a(0x129)](_0x299f9a=>_0x299f9a[_0x2c584a(0x10c)][_0x2c584a(0x129)](_0x11cc86=>!['unchanged',_0x2c584a(0x13f)][_0x2c584a(0x135)](_0x11cc86['action'])));return{'migration':MIGRATION_ID,'needed':_0x350422,'configAction':_0x432f6a,'groups':_0x1c8615,'skippedLegacyDirectories':_0x34871f,'manualMergeRequired':_0x3a2888};}function migrateSingleAppConfig(_0x422da5){const _0x2f3302=a200_0x1b034d,_0x9bbc0b=a200_0x5ebcce[_0x2f3302(0x144)](_0x422da5,_0x2f3302(0x106));if(!existsSync(_0x9bbc0b))return;const _0x17e581=readConfigFile(_0x9bbc0b);if(_0x17e581['apps']&&typeof _0x17e581['apps']===_0x2f3302(0x143))return;const _0xdacd4a=typeof _0x17e581[_0x2f3302(0x130)]===_0x2f3302(0x12e)?_0x17e581['appcode']:typeof _0x17e581[_0x2f3302(0x141)]===_0x2f3302(0x12e)?_0x17e581[_0x2f3302(0x141)]:undefined;if(!_0xdacd4a)return;_0x17e581[_0x2f3302(0x127)]={[_0xdacd4a]:{'appcode':_0xdacd4a}},_0x17e581['defaultApp']=_0xdacd4a,delete _0x17e581['app'],delete _0x17e581['appcode'],writeConfigFile(_0x9bbc0b,_0x17e581);}function legacyApiPath(_0x486c55,_0x38aaad){const _0x4f4f90=a200_0x1b034d,_0x26c9c0=_0x38aaad[_0x4f4f90(0x12f)],_0x1cdeb3=_0x486c55[_0x4f4f90(0x118)]===0x1||_0x38aaad[_0x4f4f90(0x141)][_0x4f4f90(0x10d)]?[a200_0x5ebcce['join'](_0x26c9c0,'api.ts'),a200_0x5ebcce[_0x4f4f90(0x144)](_0x26c9c0,_0x38aaad['app']['name']+'-api.ts')]:[a200_0x5ebcce[_0x4f4f90(0x144)](_0x26c9c0,_0x38aaad[_0x4f4f90(0x141)][_0x4f4f90(0x103)]+_0x4f4f90(0x11a))];return _0x1cdeb3[_0x4f4f90(0x101)](existsSync);}function writeCandidateOrEntrypoint(_0x33e6b0,_0x5cde71,_0x55466e,_0x328d66){const _0x479412=a200_0x1b034d;if(_0x55466e[_0x479412(0x13e)]==='unchanged'||_0x55466e[_0x479412(0x13e)]==='preserve')return;if(_0x55466e['action']===_0x479412(0x14a)){const _0x55b915=_0x55466e[_0x479412(0x108)];mkdirSync(a200_0x5ebcce[_0x479412(0x102)](_0x55b915),{'recursive':!![]}),writeFileSync(_0x55b915,_0x328d66,'utf8');return;}if(_0x55466e[_0x479412(0x13e)]===_0x479412(0x134)){const _0x2bb030=backupPath(_0x33e6b0,_0x5cde71,a200_0x5ebcce[_0x479412(0x12c)](_0x55466e[_0x479412(0x13b)]));mkdirSync(a200_0x5ebcce['dirname'](_0x2bb030),{'recursive':!![]}),copyFileSync(_0x55466e[_0x479412(0x13b)],_0x2bb030);}mkdirSync(a200_0x5ebcce['dirname'](_0x55466e[_0x479412(0x13b)]),{'recursive':!![]}),writeFileSync(_0x55466e[_0x479412(0x13b)],_0x328d66,_0x479412(0x104));}export async function upgradeProjectApiArchitecture(_0x4985e5){const _0x3fef2a=a200_0x1b034d,_0x128c62=analyzeProjectApiArchitecture(_0x4985e5);migrateSingleAppConfig(_0x4985e5);const _0x516a06=getMultiAppConfigs(_0x3fef2a(0x12b),_0x4985e5)??[],_0x5b24e2=configuredLayouts(_0x4985e5,_0x516a06),{groups:_0x21d0aa}=uniqueRegistryGroups(_0x5b24e2);let _0x461667;for(const _0xf9665b of _0x21d0aa){const _0x1eb40e=_0xf9665b[0x0][_0x3fef2a(0x12f)];mkdirSync(_0x1eb40e,{'recursive':!![]});const _0x4ba791=_0xf9665b[_0x3fef2a(0x101)](_0x30810b=>_0x30810b[_0x3fef2a(0x141)][_0x3fef2a(0x10d)])??_0xf9665b[0x0];for(const _0x2dbd77 of _0xf9665b){const _0x373cfb=a200_0x5ebcce[_0x3fef2a(0x144)](_0x1eb40e,MODEL_REGISTRY_FILE_NAME),_0x342165=readModelRegistry(_0x373cfb);if(_0x342165?.['profiles'][_0x2dbd77[_0x3fef2a(0x141)][_0x3fef2a(0x103)]])continue;const _0x53c3f8=legacyApiPath(_0xf9665b,_0x2dbd77),_0xed0deb=_0x53c3f8?readOptional(_0x53c3f8):undefined;await initMultiAppEnvironment(_0x2dbd77[_0x3fef2a(0x141)]),updateModelRegistry({'outputDir':_0x1eb40e,'profileName':_0x2dbd77[_0x3fef2a(0x141)][_0x3fef2a(0x103)],'defaultProfile':_0x4ba791['app'][_0x3fef2a(0x103)],'appCode':_0x2dbd77['app'][_0x3fef2a(0x130)],'runtimeDomain':getRuntimeDomain(),'models':_0xed0deb?parseLegacyApiModels(_0xed0deb):[]});}const _0x29ff21=await renderModelRegistryScaffold(_0x1eb40e,_0x4985e5),_0x5c5ae2=planGroup(_0x4985e5,_0xf9665b);for(const _0x43f6c6 of _0x5c5ae2[_0x3fef2a(0x10c)]){const _0x1f3b0e=a200_0x5ebcce[_0x3fef2a(0x12c)](_0x43f6c6[_0x3fef2a(0x13b)]);if(_0x1f3b0e==='api.ts')writeCandidateOrEntrypoint(_0x4985e5,_0x1eb40e,_0x43f6c6,_0x29ff21[_0x3fef2a(0x124)]);else{if(_0x1f3b0e===_0x3fef2a(0x100))writeCandidateOrEntrypoint(_0x4985e5,_0x1eb40e,_0x43f6c6,_0x29ff21[_0x3fef2a(0x13a)]);else{if(_0x1f3b0e===MODEL_RUNTIME_FILE_NAME)writeCandidateOrEntrypoint(_0x4985e5,_0x1eb40e,_0x43f6c6,_0x29ff21[_0x3fef2a(0x126)]);else _0x1f3b0e===_0x3fef2a(0x125)&&_0x43f6c6[_0x3fef2a(0x13e)]==='create'&&writeCandidateOrEntrypoint(_0x4985e5,_0x1eb40e,_0x43f6c6,SDK_CONFIG_SOURCE);}}}}const _0x579162=_0x516a06[_0x3fef2a(0x101)](_0x235272=>_0x235272[_0x3fef2a(0x10d)])??_0x516a06[0x0];_0x579162&&(await initMultiAppEnvironment(_0x579162),_0x461667=writeProjectDomainRoutingManifest(_0x4985e5)[_0x3fef2a(0x13b)]);const _0x104300=analyzeProjectApiArchitecture(_0x4985e5);return{..._0x128c62,'completed':!_0x104300['manualMergeRequired'],'manualMergeRequired':_0x104300[_0x3fef2a(0x12d)],'routingPath':_0x461667};}
1
+ const a200_0x55ccf0=a200_0x2a6d;(function(_0x5df315,_0x2c2c04){const _0x2f1136=a200_0x2a6d,_0x2fddda=_0x5df315();while(!![]){try{const _0x26a5b1=-parseInt(_0x2f1136(0x1ce))/0x1*(-parseInt(_0x2f1136(0x1e2))/0x2)+-parseInt(_0x2f1136(0x1e0))/0x3+-parseInt(_0x2f1136(0x1d7))/0x4+-parseInt(_0x2f1136(0x1da))/0x5+parseInt(_0x2f1136(0x1ee))/0x6*(parseInt(_0x2f1136(0x1b3))/0x7)+-parseInt(_0x2f1136(0x1c9))/0x8*(-parseInt(_0x2f1136(0x1d2))/0x9)+parseInt(_0x2f1136(0x1e5))/0xa*(-parseInt(_0x2f1136(0x1c0))/0xb);if(_0x26a5b1===_0x2c2c04)break;else _0x2fddda['push'](_0x2fddda['shift']());}catch(_0x3061f8){_0x2fddda['push'](_0x2fddda['shift']());}}}(a200_0x3c22,0x19876));import{copyFileSync,existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import a200_0x1d034e from'node:path';import{getMultiAppConfigs,initMultiAppEnvironment,readConfigFile,writeConfigFile}from'../../context.js';import{DEFAULT_API_DIR}from'../../constant/paths.js';import{getRuntimeDomain}from'../../constant/domain.js';import{getRegistryGroup,resolveApiProfileLayouts}from'../../api/api-group.js';import{MODEL_REGISTRY_FILE_NAME,MODEL_RUNTIME_FILE_NAME,readModelRegistry,updateModelRegistry}from'../../api/model-registry-file.js';import{isLegacyGeneratedApiScaffold,isLegacyGeneratedClientScaffold,parseLegacyApiModels}from'../../api/legacy-api-file.js';import{renderModelRegistryScaffold}from'../../api/model-registry-scaffold.js';import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';const MIGRATION_ID='api-model-registry-v2',SDK_CONFIG_SOURCE=a200_0x55ccf0(0x1df);function a200_0x2a6d(_0xbf4538,_0x3e4cd6){_0xbf4538=_0xbf4538-0x1b0;const _0x3c22e8=a200_0x3c22();let _0x2a6dc5=_0x3c22e8[_0xbf4538];return _0x2a6dc5;}function a200_0x3c22(){const _0x238a8d=['apiGroup','2984HjfTpV','relative','project','Recognized\x20legacy\x20CLI\x20scaffold;\x20a\x20backup\x20will\x20be\x20retained.','modelRuntime','3UEFNtM','client','entries','manual-merge','1845ZjuMhV','Multiple\x20Lovrabet\x20model\x20profiles\x20match\x20Runtime\x20Domain','-api.ts','parse','preserve','170792Tfmbzr','The\x20existing\x20runtime\x20selector\x20is\x20not\x20a\x20recognized\x20current\x20generated\x20file.','Profile-aware\x20model\x20selection\x20generated\x20by\x20Rabetbase\x20CLI','104860WkEdsN','profiles','dirname','flatMap','isDefault','/**\x0a\x20*\x20Lovrabet\x20SDK\x20runtime\x20routing.\x0a\x20*\x20Generated\x20by\x20Rabetbase\x20CLI.\x20Do\x20not\x20add\x20credentials\x20to\x20this\x20file.\x0a\x20*/\x0aexport\x20const\x20LOVRABET_SDK_CONFIG\x20=\x20{}\x20as\x20const;\x0a','226803beGJWE','normalizedApiDir','1354LCfFDW','client.ts','unchanged','275270SMuOyD','resolve','push','outputDir','migrate-single-app','.rabetbase','length','files','string','89016KfCdLZ','startsWith','action','apiDir','sdk-config.ts','path','some','replace-generated','app','The\x20file\x20contains\x20project-owned\x20code\x20and\x20will\x20not\x20be\x20overwritten.','api.ts','add','apps','single','find','./models.generated','91OPPPrC','backups','has','name','./model-runtime','.rabetbase.json','LOVRABET_RUNTIME_DOMAIN','appcode','defaultApp','keys','utf8','candidates','join','11Tsiueb','project-upgrade','map','includes','external-api-dir','basename','object','default'];a200_0x3c22=function(){return _0x238a8d;};return a200_0x3c22();}function relativeMigrationDir(_0x7ee339,_0x2c93dc){const _0x20e7fd=a200_0x55ccf0,_0x47d8b5=a200_0x1d034e[_0x20e7fd(0x1ca)](_0x7ee339,_0x2c93dc);return _0x47d8b5&&!_0x47d8b5[_0x20e7fd(0x1ef)]('..')?_0x47d8b5:_0x20e7fd(0x1c4);}function candidatePath(_0x537b96,_0x95eeb7,_0x264f26){const _0x551036=a200_0x55ccf0;return a200_0x1d034e[_0x551036(0x1bf)](_0x537b96,_0x551036(0x1ea),_0x551036(0x1c1),MIGRATION_ID,_0x551036(0x1be),relativeMigrationDir(_0x537b96,_0x95eeb7),_0x264f26);}function backupPath(_0x56a871,_0xd542ac,_0x369bb8){const _0x536dee=a200_0x55ccf0;return a200_0x1d034e['join'](_0x56a871,_0x536dee(0x1ea),'project-upgrade',MIGRATION_ID,_0x536dee(0x1b4),relativeMigrationDir(_0x56a871,_0xd542ac),_0x369bb8);}function readOptional(_0x3a2858){try{return readFileSync(_0x3a2858,'utf8');}catch{return undefined;}}function readJsonObject(_0x1a1c0c){const _0x12ac3c=a200_0x55ccf0;try{const _0x5990ce=JSON[_0x12ac3c(0x1d5)](readFileSync(_0x1a1c0c,_0x12ac3c(0x1bd)));return _0x5990ce&&typeof _0x5990ce===_0x12ac3c(0x1c6)?_0x5990ce:{};}catch{return{};}}function planEntrypoint(_0x3739c5,_0x592a0a,_0x545cd2,_0x27ef6d){const _0x149ad4=a200_0x55ccf0,_0x4a4e10=a200_0x1d034e[_0x149ad4(0x1bf)](_0x592a0a,_0x545cd2),_0x561e60=readOptional(_0x4a4e10);if(_0x561e60===undefined)return{'path':_0x4a4e10,'action':'create'};if(_0x545cd2==='api.ts'?_0x561e60[_0x149ad4(0x1c3)](_0x149ad4(0x1b2))&&_0x561e60[_0x149ad4(0x1c3)](_0x149ad4(0x1b7)):_0x561e60[_0x149ad4(0x1c3)](_0x149ad4(0x1b9)))return{'path':_0x4a4e10,'action':'unchanged'};if(_0x27ef6d(_0x561e60))return{'path':_0x4a4e10,'action':_0x149ad4(0x1f5),'reason':_0x149ad4(0x1cc)};return{'path':_0x4a4e10,'action':_0x149ad4(0x1d1),'reason':_0x149ad4(0x1f7),'candidatePath':candidatePath(_0x3739c5,_0x592a0a,_0x545cd2)};}function syntheticApps(_0x4fa2a2){const _0x34a80a=a200_0x55ccf0,_0x175833=_0x4fa2a2['apps']&&typeof _0x4fa2a2[_0x34a80a(0x1fa)]==='object'?_0x4fa2a2[_0x34a80a(0x1fa)]:undefined;if(_0x175833&&Object['keys'](_0x175833)[_0x34a80a(0x1eb)]>0x0){const _0x49b686=typeof _0x4fa2a2['defaultApp']==='string'?_0x4fa2a2[_0x34a80a(0x1bb)]:Object[_0x34a80a(0x1bc)](_0x175833)[_0x34a80a(0x1eb)]===0x1?Object[_0x34a80a(0x1bc)](_0x175833)[0x0]:undefined;return Object[_0x34a80a(0x1d0)](_0x175833)[_0x34a80a(0x1dd)](([_0x4a4e72,_0x14e864])=>{const _0xbc7d3c=_0x34a80a,_0x28c349=_0x14e864,_0x5ca7f2=typeof _0x28c349[_0xbc7d3c(0x1ba)]===_0xbc7d3c(0x1ed)?_0x28c349[_0xbc7d3c(0x1ba)]:'';return _0x5ca7f2?[{'name':_0x4a4e72,'appcode':_0x5ca7f2,'apiGroup':typeof _0x28c349[_0xbc7d3c(0x1c8)]===_0xbc7d3c(0x1ed)?_0x28c349[_0xbc7d3c(0x1c8)]:undefined,'isDefault':_0x4a4e72===_0x49b686,'region':'cn','regionSource':_0xbc7d3c(0x1c7),'apiDir':typeof _0x28c349[_0xbc7d3c(0x1f1)]===_0xbc7d3c(0x1ed)?_0x28c349[_0xbc7d3c(0x1f1)]:typeof _0x4fa2a2[_0xbc7d3c(0x1f1)]===_0xbc7d3c(0x1ed)?_0x4fa2a2[_0xbc7d3c(0x1f1)]:undefined,'routingConfig':{}}]:[];});}const _0x10eb82=typeof _0x4fa2a2[_0x34a80a(0x1ba)]===_0x34a80a(0x1ed)?_0x4fa2a2[_0x34a80a(0x1ba)]:typeof _0x4fa2a2[_0x34a80a(0x1f6)]==='string'?_0x4fa2a2['app']:undefined;if(!_0x10eb82)return[];return[{'name':_0x10eb82,'appcode':_0x10eb82,'isDefault':!![],'region':'cn','regionSource':_0x34a80a(0x1c7),'apiDir':typeof _0x4fa2a2['apiDir']===_0x34a80a(0x1ed)?_0x4fa2a2['apiDir']:undefined,'routingConfig':{}}];}function configuredLayouts(_0x9da6a5,_0x527c54){const _0x52f96b=a200_0x55ccf0;return resolveApiProfileLayouts(_0x527c54,_0x2f3693=>a200_0x1d034e[_0x52f96b(0x1e6)](_0x9da6a5,_0x2f3693['apiDir']||DEFAULT_API_DIR),_0x9da6a5);}function uniqueRegistryGroups(_0x4c9335){const _0x538f77=a200_0x55ccf0,_0x3ba2bc=[],_0x43f24e=new Set(),_0x2f0796=new Set();for(const _0x31fc37 of _0x4c9335){const _0x4c2d0b=getRegistryGroup(_0x4c9335,_0x31fc37);if(!_0x4c2d0b){_0x43f24e[_0x538f77(0x1f9)](_0x31fc37[_0x538f77(0x1e8)]);continue;}const _0x516f29=_0x31fc37[_0x538f77(0x1e1)]+'\x00'+(_0x31fc37['apiGroup']??_0x538f77(0x1b0));!_0x2f0796[_0x538f77(0x1b5)](_0x516f29)&&(_0x3ba2bc[_0x538f77(0x1e7)](_0x4c2d0b),_0x2f0796[_0x538f77(0x1f9)](_0x516f29));}return{'groups':_0x3ba2bc,'skipped':[..._0x43f24e]};}function planGroup(_0x4867f9,_0x8098c1){const _0x5f0142=a200_0x55ccf0,_0x4cbf5c=_0x8098c1[0x0]['normalizedApiDir'],_0xffa391=a200_0x1d034e[_0x5f0142(0x1bf)](_0x4cbf5c,MODEL_RUNTIME_FILE_NAME),_0x26b116=readOptional(_0xffa391),_0x35b771=_0x26b116!==undefined&&_0x26b116[_0x5f0142(0x1c3)](_0x5f0142(0x1d9))&&_0x26b116[_0x5f0142(0x1c3)](_0x5f0142(0x1d3))&&_0x26b116[_0x5f0142(0x1c3)]('No\x20Lovrabet\x20model\x20profile\x20matches\x20Runtime\x20Domain'),_0x1c4b75=a200_0x1d034e[_0x5f0142(0x1bf)](_0x4cbf5c,MODEL_REGISTRY_FILE_NAME),_0x56aedf=a200_0x1d034e[_0x5f0142(0x1bf)](_0x4cbf5c,_0x5f0142(0x1f2)),_0x22c33f=[planEntrypoint(_0x4867f9,_0x4cbf5c,_0x5f0142(0x1f8),isLegacyGeneratedApiScaffold),planEntrypoint(_0x4867f9,_0x4cbf5c,_0x5f0142(0x1e3),isLegacyGeneratedClientScaffold),{'path':_0xffa391,'action':_0x26b116===undefined?'create':_0x35b771?'unchanged':_0x5f0142(0x1d1),'reason':_0x26b116===undefined?undefined:_0x5f0142(0x1d8),..._0x26b116!==undefined&&!_0x35b771?{'candidatePath':candidatePath(_0x4867f9,_0x4cbf5c,MODEL_RUNTIME_FILE_NAME)}:{}},{'path':_0x1c4b75,'action':existsSync(_0x1c4b75)?_0x5f0142(0x1d6):'create','reason':'Model\x20facts\x20are\x20preserved\x20and\x20completed\x20from\x20legacy\x20generated\x20files\x20when\x20possible.'},{'path':_0x56aedf,'action':existsSync(_0x56aedf)?_0x5f0142(0x1d6):'create'}];return{'apiDir':_0x4cbf5c,'profiles':_0x8098c1['map'](_0x9f3a6b=>_0x9f3a6b[_0x5f0142(0x1f6)][_0x5f0142(0x1b6)]),'files':_0x22c33f};}export function analyzeProjectApiArchitecture(_0x92f2ef,_0x3ebd92){const _0x45a786=a200_0x55ccf0,_0x489262=a200_0x1d034e[_0x45a786(0x1bf)](_0x92f2ef,'.rabetbase.json'),_0x205139=_0x3ebd92??(existsSync(_0x489262)?readJsonObject(_0x489262):{}),_0x2c6477=syntheticApps(_0x205139);if(_0x2c6477[_0x45a786(0x1eb)]===0x0)return{'migration':MIGRATION_ID,'needed':![],'configAction':'unconfigured','groups':[],'skippedLegacyDirectories':[],'manualMergeRequired':![]};const _0x4bd6ba=_0x205139[_0x45a786(0x1fa)]?_0x45a786(0x1e4):_0x45a786(0x1e9),{groups:_0x1e91d5,skipped:_0x3f3b42}=uniqueRegistryGroups(configuredLayouts(_0x92f2ef,_0x2c6477)),_0x484cfc=_0x1e91d5[_0x45a786(0x1c2)](_0x1f5846=>planGroup(_0x92f2ef,_0x1f5846)),_0x250bb6=_0x484cfc[_0x45a786(0x1f4)](_0x4e6ba2=>_0x4e6ba2[_0x45a786(0x1ec)][_0x45a786(0x1f4)](_0x385be3=>_0x385be3[_0x45a786(0x1f0)]===_0x45a786(0x1d1))),_0x3d9476=_0x4bd6ba===_0x45a786(0x1e9)||_0x484cfc[_0x45a786(0x1f4)](_0xd4c283=>_0xd4c283['files'][_0x45a786(0x1f4)](_0x3fc4f4=>![_0x45a786(0x1e4),_0x45a786(0x1d6)][_0x45a786(0x1c3)](_0x3fc4f4[_0x45a786(0x1f0)])));return{'migration':MIGRATION_ID,'needed':_0x3d9476,'configAction':_0x4bd6ba,'groups':_0x484cfc,'skippedLegacyDirectories':_0x3f3b42,'manualMergeRequired':_0x250bb6};}function migrateSingleAppConfig(_0x155e2d){const _0x59b5c5=a200_0x55ccf0,_0x544e2d=a200_0x1d034e[_0x59b5c5(0x1bf)](_0x155e2d,_0x59b5c5(0x1b8));if(!existsSync(_0x544e2d))return;const _0x13f7e8=readConfigFile(_0x544e2d);if(_0x13f7e8[_0x59b5c5(0x1fa)]&&typeof _0x13f7e8['apps']===_0x59b5c5(0x1c6))return;const _0x4abeab=typeof _0x13f7e8['appcode']===_0x59b5c5(0x1ed)?_0x13f7e8['appcode']:typeof _0x13f7e8[_0x59b5c5(0x1f6)]===_0x59b5c5(0x1ed)?_0x13f7e8[_0x59b5c5(0x1f6)]:undefined;if(!_0x4abeab)return;_0x13f7e8['apps']={[_0x4abeab]:{'appcode':_0x4abeab}},_0x13f7e8[_0x59b5c5(0x1bb)]=_0x4abeab,delete _0x13f7e8['app'],delete _0x13f7e8['appcode'],writeConfigFile(_0x544e2d,_0x13f7e8);}function legacyApiPath(_0x146116,_0xb611e9){const _0x4da37c=a200_0x55ccf0,_0x27cca3=_0xb611e9[_0x4da37c(0x1e1)],_0x54d6c4=_0x146116[_0x4da37c(0x1eb)]===0x1||_0xb611e9['app'][_0x4da37c(0x1de)]?[a200_0x1d034e[_0x4da37c(0x1bf)](_0x27cca3,_0x4da37c(0x1f8)),a200_0x1d034e[_0x4da37c(0x1bf)](_0x27cca3,_0xb611e9['app'][_0x4da37c(0x1b6)]+_0x4da37c(0x1d4))]:[a200_0x1d034e['join'](_0x27cca3,_0xb611e9[_0x4da37c(0x1f6)][_0x4da37c(0x1b6)]+_0x4da37c(0x1d4))];return _0x54d6c4['find'](existsSync);}function writeCandidateOrEntrypoint(_0x545136,_0x544420,_0x119557,_0x592f66){const _0x57373a=a200_0x55ccf0;if(_0x119557[_0x57373a(0x1f0)]==='unchanged'||_0x119557[_0x57373a(0x1f0)]===_0x57373a(0x1d6))return;if(_0x119557[_0x57373a(0x1f0)]===_0x57373a(0x1d1)){const _0x1f59c2=_0x119557['candidatePath'];mkdirSync(a200_0x1d034e[_0x57373a(0x1dc)](_0x1f59c2),{'recursive':!![]}),writeFileSync(_0x1f59c2,_0x592f66,_0x57373a(0x1bd));return;}if(_0x119557['action']==='replace-generated'){const _0x16f38f=backupPath(_0x545136,_0x544420,a200_0x1d034e[_0x57373a(0x1c5)](_0x119557[_0x57373a(0x1f3)]));mkdirSync(a200_0x1d034e['dirname'](_0x16f38f),{'recursive':!![]}),copyFileSync(_0x119557[_0x57373a(0x1f3)],_0x16f38f);}mkdirSync(a200_0x1d034e['dirname'](_0x119557['path']),{'recursive':!![]}),writeFileSync(_0x119557[_0x57373a(0x1f3)],_0x592f66,_0x57373a(0x1bd));}export async function upgradeProjectApiArchitecture(_0x37f5b1){const _0x3417de=a200_0x55ccf0,_0x5bcf74=analyzeProjectApiArchitecture(_0x37f5b1);migrateSingleAppConfig(_0x37f5b1);const _0x3ac098=getMultiAppConfigs(_0x3417de(0x1cb),_0x37f5b1)??[],_0x13e047=configuredLayouts(_0x37f5b1,_0x3ac098),{groups:_0x21c69b}=uniqueRegistryGroups(_0x13e047);let _0x91a343;for(const _0x5ddee2 of _0x21c69b){const _0x4d7dc5=_0x5ddee2[0x0][_0x3417de(0x1e1)];mkdirSync(_0x4d7dc5,{'recursive':!![]});const _0x267777=_0x5ddee2[_0x3417de(0x1b1)](_0x308622=>_0x308622['app'][_0x3417de(0x1de)])??_0x5ddee2[0x0];for(const _0x5578a6 of _0x5ddee2){const _0x4c3147=a200_0x1d034e[_0x3417de(0x1bf)](_0x4d7dc5,MODEL_REGISTRY_FILE_NAME),_0x1b8165=readModelRegistry(_0x4c3147);if(_0x1b8165?.[_0x3417de(0x1db)][_0x5578a6[_0x3417de(0x1f6)][_0x3417de(0x1b6)]])continue;const _0x1d6431=legacyApiPath(_0x5ddee2,_0x5578a6),_0x44f4b6=_0x1d6431?readOptional(_0x1d6431):undefined;await initMultiAppEnvironment(_0x5578a6['app']),updateModelRegistry({'outputDir':_0x4d7dc5,'profileName':_0x5578a6['app'][_0x3417de(0x1b6)],'defaultProfile':_0x267777['app'][_0x3417de(0x1b6)],'appCode':_0x5578a6[_0x3417de(0x1f6)]['appcode'],'runtimeDomain':getRuntimeDomain(),'models':_0x44f4b6?parseLegacyApiModels(_0x44f4b6):[]});}const _0x77abe1=await renderModelRegistryScaffold(_0x4d7dc5,_0x37f5b1),_0x58e3c9=planGroup(_0x37f5b1,_0x5ddee2);for(const _0x53a508 of _0x58e3c9[_0x3417de(0x1ec)]){const _0x4a1a67=a200_0x1d034e[_0x3417de(0x1c5)](_0x53a508[_0x3417de(0x1f3)]);if(_0x4a1a67===_0x3417de(0x1f8))writeCandidateOrEntrypoint(_0x37f5b1,_0x4d7dc5,_0x53a508,_0x77abe1['api']);else{if(_0x4a1a67===_0x3417de(0x1e3))writeCandidateOrEntrypoint(_0x37f5b1,_0x4d7dc5,_0x53a508,_0x77abe1[_0x3417de(0x1cf)]);else{if(_0x4a1a67===MODEL_RUNTIME_FILE_NAME)writeCandidateOrEntrypoint(_0x37f5b1,_0x4d7dc5,_0x53a508,_0x77abe1[_0x3417de(0x1cd)]);else _0x4a1a67===_0x3417de(0x1f2)&&_0x53a508[_0x3417de(0x1f0)]==='create'&&writeCandidateOrEntrypoint(_0x37f5b1,_0x4d7dc5,_0x53a508,SDK_CONFIG_SOURCE);}}}}const _0x1d8e04=_0x3ac098[_0x3417de(0x1b1)](_0x3115cf=>_0x3115cf[_0x3417de(0x1de)])??_0x3ac098[0x0];_0x1d8e04&&(await initMultiAppEnvironment(_0x1d8e04),_0x91a343=writeProjectDomainRoutingManifest(_0x37f5b1)[_0x3417de(0x1f3)]);const _0x24575b=analyzeProjectApiArchitecture(_0x37f5b1);return{..._0x5bcf74,'completed':!_0x24575b['manualMergeRequired'],'manualMergeRequired':_0x24575b['manualMergeRequired'],'routingPath':_0x91a343};}
@@ -1 +1 @@
1
- (function(_0x3c630e,_0x19fae8){const _0x2723f9=a201_0x53d1,_0x56eb18=_0x3c630e();while(!![]){try{const _0x2847a6=parseInt(_0x2723f9(0xf0))/0x1*(parseInt(_0x2723f9(0xf8))/0x2)+parseInt(_0x2723f9(0xfb))/0x3*(-parseInt(_0x2723f9(0xe8))/0x4)+-parseInt(_0x2723f9(0xf2))/0x5*(-parseInt(_0x2723f9(0xf9))/0x6)+parseInt(_0x2723f9(0xe7))/0x7*(parseInt(_0x2723f9(0xfe))/0x8)+-parseInt(_0x2723f9(0x102))/0x9*(parseInt(_0x2723f9(0xeb))/0xa)+parseInt(_0x2723f9(0xe6))/0xb*(-parseInt(_0x2723f9(0xff))/0xc)+parseInt(_0x2723f9(0xf1))/0xd;if(_0x2847a6===_0x19fae8)break;else _0x56eb18['push'](_0x56eb18['shift']());}catch(_0xe82fa){_0x56eb18['push'](_0x56eb18['shift']());}}}(a201_0x3775,0x375c1));function a201_0x53d1(_0x40a667,_0x4d3095){_0x40a667=_0x40a667-0xe6;const _0x37753f=a201_0x3775();let _0x53d183=_0x37753f[_0x40a667];return _0x53d183;}import{existsSync}from'node:fs';import a201_0x26fde1 from'node:path';import a201_0x547aae 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';function a201_0x3775(){const _0x2ea32d=['Logged\x20in','green','Directory\x20\x22','Project\x20name:','9ewOwva','4381702OvJvYE','5MoZYOS','env','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','log','cyan','Skipped','32134MSenXh','2416830bWNxDK','Login\x20failed','3oGNuka','√\x20Login\x20status:\x20','Not\x20set','2520XNOptn','996wmPzVr','production','\x22\x20already\x20exists','9tcWeJH','29414CqbNAg','4235rrqMwZ','1707564pntkpc','string','my-app','1994510cVscFY'];a201_0x3775=function(){return _0x2ea32d;};return a201_0x3775();}import{getProjectNameValidationError}from'../../../commands/project/create/project-name.js';export async function guidedCreateProject(_0x39e1aa,_0x565183,_0x39475e){const _0x4707a2=a201_0x53d1,_0x52a05c=_0x4707a2(0xea),_0x514c7f=readConfig(),_0xa3ac7c=typeof _0x514c7f[_0x4707a2(0xf3)]===_0x4707a2(0xe9)?_0x514c7f[_0x4707a2(0xf3)]:undefined,_0x4443d7=await input({'message':_0x4707a2(0xef),'default':_0x52a05c,'validate':_0x27b553=>{const _0x35180d=_0x4707a2,_0x5ad869=_0x27b553['trim']()||_0x52a05c,_0x54d603=getProjectNameValidationError(_0x5ad869);if(_0x54d603)return _0x54d603;const _0x1ed138=a201_0x26fde1['resolve'](process['cwd'](),_0x5ad869);if(existsSync(_0x1ed138))return _0x35180d(0xee)+_0x5ad869+_0x35180d(0x101);return!![];}});console[_0x4707a2(0xf5)](a201_0x547aae[_0x4707a2(0xed)]('√\x20Project\x20Name:\x20'+a201_0x547aae[_0x4707a2(0xf6)](_0x4443d7)));const _0x142046=await selectSingleAppcode(_0x39475e);console[_0x4707a2(0xf5)](a201_0x547aae[_0x4707a2(0xed)]('√\x20App\x20Code:\x20'+a201_0x547aae[_0x4707a2(0xf6)](_0x142046||_0x4707a2(0xfd))));if(_0x142046){const _0xdc5807=await getIsSessionValid();if(!_0xdc5807){const _0x5cc702=await confirm({'message':_0x4707a2(0xf4),'default':!![]});if(_0x5cc702){const _0x1f08b1=await authServer({'silent':!![]});console[_0x4707a2(0xf5)](a201_0x547aae[_0x4707a2(0xed)]('√\x20Login\x20status:\x20'+a201_0x547aae[_0x4707a2(0xf6)](_0x1f08b1?_0x4707a2(0xec):_0x4707a2(0xfa))));}else console[_0x4707a2(0xf5)](a201_0x547aae[_0x4707a2(0xed)](_0x4707a2(0xfc)+a201_0x547aae[_0x4707a2(0xf6)](_0x4707a2(0xf7))));}await _0x39e1aa({'projectName':_0x4443d7,'appCode':_0x142046,'env':_0x565183||_0xa3ac7c||_0x4707a2(0x100)});}else await _0x39e1aa({'projectName':_0x4443d7,'env':_0x565183||_0xa3ac7c||_0x4707a2(0x100)});}
1
+ function a201_0x800b(_0x19b891,_0x1ec0a0){_0x19b891=_0x19b891-0x110;const _0x29a123=a201_0x29a1();let _0x800b63=_0x29a123[_0x19b891];return _0x800b63;}function a201_0x29a1(){const _0x2544c2=['Project\x20name:','\x22\x20already\x20exists','my-app','env','Skipped','1JeSeCZ','string','1417073ytuHvP','√\x20Login\x20status:\x20','2129498pJnkrK','green','7438524WERLgm','1220424dOQnPx','production','Directory\x20\x22','354159gOiOlq','200HRhTVV','16fmuMZG','resolve','1642175QRDOXl','Logged\x20in','trim','√\x20Project\x20Name:\x20','log','√\x20App\x20Code:\x20','cyan','24099650RbvQzi'];a201_0x29a1=function(){return _0x2544c2;};return a201_0x29a1();}(function(_0x3d605c,_0x917acf){const _0x60db7b=a201_0x800b,_0x10c427=_0x3d605c();while(!![]){try{const _0x5b85b7=parseInt(_0x60db7b(0x128))/0x1*(-parseInt(_0x60db7b(0x111))/0x2)+parseInt(_0x60db7b(0x114))/0x3+-parseInt(_0x60db7b(0x119))/0x4*(parseInt(_0x60db7b(0x11b))/0x5)+parseInt(_0x60db7b(0x113))/0x6+parseInt(_0x60db7b(0x12a))/0x7+parseInt(_0x60db7b(0x118))/0x8*(-parseInt(_0x60db7b(0x117))/0x9)+parseInt(_0x60db7b(0x122))/0xa;if(_0x5b85b7===_0x917acf)break;else _0x10c427['push'](_0x10c427['shift']());}catch(_0x3988c2){_0x10c427['push'](_0x10c427['shift']());}}}(a201_0x29a1,0xdaebe));import{existsSync}from'node:fs';import a201_0x443d3b from'node:path';import a201_0x2007f7 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';export async function guidedCreateProject(_0x5cc4e3,_0x5a14a0,_0x5c279e){const _0x33aa19=a201_0x800b,_0x4f8da4=_0x33aa19(0x125),_0x15676a=readConfig(),_0x568b55=typeof _0x15676a[_0x33aa19(0x126)]===_0x33aa19(0x129)?_0x15676a['env']:undefined,_0x6926d9=await input({'message':_0x33aa19(0x123),'default':_0x4f8da4,'validate':_0x348c5a=>{const _0x318e85=_0x33aa19,_0x1ad7ef=_0x348c5a[_0x318e85(0x11d)]()||_0x4f8da4,_0x5e0688=getProjectNameValidationError(_0x1ad7ef);if(_0x5e0688)return _0x5e0688;const _0x56ade4=a201_0x443d3b[_0x318e85(0x11a)](process['cwd'](),_0x1ad7ef);if(existsSync(_0x56ade4))return _0x318e85(0x116)+_0x1ad7ef+_0x318e85(0x124);return!![];}});console['log'](a201_0x2007f7['green'](_0x33aa19(0x11e)+a201_0x2007f7[_0x33aa19(0x121)](_0x6926d9)));const _0x178116=await selectSingleAppcode(_0x5c279e);console[_0x33aa19(0x11f)](a201_0x2007f7[_0x33aa19(0x112)](_0x33aa19(0x120)+a201_0x2007f7[_0x33aa19(0x121)](_0x178116||'Not\x20set')));if(_0x178116){const _0x3f1551=await getIsSessionValid();if(!_0x3f1551){const _0x49f14b=await confirm({'message':'No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','default':!![]});if(_0x49f14b){const _0x27ae6b=await authServer({'silent':!![]});console[_0x33aa19(0x11f)](a201_0x2007f7['green'](_0x33aa19(0x110)+a201_0x2007f7[_0x33aa19(0x121)](_0x27ae6b?_0x33aa19(0x11c):'Login\x20failed')));}else console[_0x33aa19(0x11f)](a201_0x2007f7[_0x33aa19(0x112)](_0x33aa19(0x110)+a201_0x2007f7[_0x33aa19(0x121)](_0x33aa19(0x127))));}await _0x5cc4e3({'projectName':_0x6926d9,'appCode':_0x178116,'env':_0x5a14a0||_0x568b55||_0x33aa19(0x115)});}else await _0x5cc4e3({'projectName':_0x6926d9,'env':_0x5a14a0||_0x568b55||_0x33aa19(0x115)});}
@@ -1 +1 @@
1
- function a202_0x274e(){const _0x13840f=['234888nEAWxw','now','toFixed','1564533YaHGtd','replace','11LDkWRB','3869236CQwJkE','9shVCeH','8195jNygKL','2524096uVDbrV','26122IBmfqE','6750970IWGfhL','438qSVkIU'];a202_0x274e=function(){return _0x13840f;};return a202_0x274e();}(function(_0x278103,_0x2bfee8){const _0x2a4fd4=a202_0x1236,_0x3ffcd2=_0x278103();while(!![]){try{const _0x2d6528=-parseInt(_0x2a4fd4(0xad))/0x1*(-parseInt(_0x2a4fd4(0xb2))/0x2)+parseInt(_0x2a4fd4(0xab))/0x3+-parseInt(_0x2a4fd4(0xa8))/0x4+-parseInt(_0x2a4fd4(0xb0))/0x5*(-parseInt(_0x2a4fd4(0xb4))/0x6)+parseInt(_0x2a4fd4(0xae))/0x7+-parseInt(_0x2a4fd4(0xb1))/0x8+parseInt(_0x2a4fd4(0xaf))/0x9*(-parseInt(_0x2a4fd4(0xb3))/0xa);if(_0x2d6528===_0x2bfee8)break;else _0x3ffcd2['push'](_0x3ffcd2['shift']());}catch(_0x1a5c93){_0x3ffcd2['push'](_0x3ffcd2['shift']());}}}(a202_0x274e,0x465f6));function a202_0x1236(_0x164024,_0x3eea8b){_0x164024=_0x164024-0xa8;const _0x274edb=a202_0x274e();let _0x1236bc=_0x274edb[_0x164024];return _0x1236bc;}export function formatElapsed(_0x4bec44){const _0x456e0b=a202_0x1236,_0x4bf244=Date[_0x456e0b(0xa9)]()-_0x4bec44;if(_0x4bf244<0x3e8)return _0x4bf244+'ms';const _0x1a934f=(_0x4bf244/0x3e8)[_0x456e0b(0xaa)](0x2),_0x3a8368=_0x1a934f[_0x456e0b(0xac)](/\.?0+$/u,'');return _0x3a8368+'s';}
1
+ (function(_0x1ddde2,_0x46697){const _0x43504d=a202_0x47bc,_0x35d81a=_0x1ddde2();while(!![]){try{const _0x11772c=parseInt(_0x43504d(0x1d8))/0x1*(-parseInt(_0x43504d(0x1de))/0x2)+parseInt(_0x43504d(0x1e0))/0x3*(-parseInt(_0x43504d(0x1dc))/0x4)+parseInt(_0x43504d(0x1d9))/0x5*(-parseInt(_0x43504d(0x1da))/0x6)+-parseInt(_0x43504d(0x1e1))/0x7+-parseInt(_0x43504d(0x1dd))/0x8*(parseInt(_0x43504d(0x1df))/0x9)+-parseInt(_0x43504d(0x1d5))/0xa+-parseInt(_0x43504d(0x1d7))/0xb*(-parseInt(_0x43504d(0x1db))/0xc);if(_0x11772c===_0x46697)break;else _0x35d81a['push'](_0x35d81a['shift']());}catch(_0x50bfdf){_0x35d81a['push'](_0x35d81a['shift']());}}}(a202_0x1f2b,0x2e4cd));export function formatElapsed(_0x1c2efb){const _0x232ac7=a202_0x47bc,_0x4fe563=Date[_0x232ac7(0x1d6)]()-_0x1c2efb;if(_0x4fe563<0x3e8)return _0x4fe563+'ms';const _0x56e669=(_0x4fe563/0x3e8)['toFixed'](0x2),_0x3a8882=_0x56e669['replace'](/\.?0+$/u,'');return _0x3a8882+'s';}function a202_0x47bc(_0x1fc72b,_0x5b3f5c){_0x1fc72b=_0x1fc72b-0x1d5;const _0x1f2b54=a202_0x1f2b();let _0x47bc92=_0x1f2b54[_0x1fc72b];return _0x47bc92;}function a202_0x1f2b(){const _0x1dd174=['83875lcwiAZ','65575aBMHio','395xKgkQI','10848NUndnW','1392hvDLyf','148XEPImj','103832Nomtaz','10YTOGJa','45SmdUou','3333EQliPZ','373646BjyLXe','647680EvcgwP','now'];a202_0x1f2b=function(){return _0x1dd174;};return a202_0x1f2b();}
@@ -1 +1 @@
1
- (function(_0x2e1d48,_0x50d4b0){const _0x3990c2=a203_0x392e,_0x5108ea=_0x2e1d48();while(!![]){try{const _0x1ad283=-parseInt(_0x3990c2(0x1ce))/0x1*(-parseInt(_0x3990c2(0x1ad))/0x2)+parseInt(_0x3990c2(0x1b7))/0x3+parseInt(_0x3990c2(0x20a))/0x4+parseInt(_0x3990c2(0x1e9))/0x5*(-parseInt(_0x3990c2(0x1ec))/0x6)+-parseInt(_0x3990c2(0x1ac))/0x7*(-parseInt(_0x3990c2(0x1a7))/0x8)+-parseInt(_0x3990c2(0x1e6))/0x9+-parseInt(_0x3990c2(0x1c1))/0xa;if(_0x1ad283===_0x50d4b0)break;else _0x5108ea['push'](_0x5108ea['shift']());}catch(_0xf85878){_0x5108ea['push'](_0x5108ea['shift']());}}}(a203_0x1e00,0x4dc04));import a203_0x298087 from'path';import a203_0x1ccca2 from'fs';import a203_0xd8fa06 from'chalk';import a203_0x291321 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';function a203_0x392e(_0x4c6e19,_0x16c99e){_0x4c6e19=_0x4c6e19-0x19f;const _0x1e0034=a203_0x1e00();let _0x392edb=_0x1e0034[_0x4c6e19];return _0x392edb;}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';function a203_0x1e00(){const _0x56bd72=['√\x20package.json\x20updated:\x20name=','constants','Failed\x20to\x20configure\x20app\x20AppCode','9338070xJzcZi','Unable\x20to\x20prepare\x20the\x20current\x20directory\x20workspace','Failed\x20to\x20clean\x20up\x20project\x20directory:\x20','\x20dataset(s),\x20generated\x20','stringify','modelCount','API\x20configuration\x20pull\x20failed','utf8','currentDir','validation','currentVersion','existsSync','renameSync','636023MCIMOw','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','repeat','Verifying\x20project\x20template','Install\x20dependencies','Copying\x20local\x20template\x20source','Project\x20template\x20ready','green','push','warn','cwd','text','\x20&&\x20','cd\x20','dev','apps','create','\x20√\x20','CLI\x20version\x20check','stop','Skip\x20cleanup:\x20project\x20directory\x20ownership\x20changed:\x20','W_OK','\x20api\x20pull\x20--force\x20--yes','Remove\x20or\x20move\x20the\x20existing\x20files,\x20then\x20retry\x20with\x20--current-dir.','4505274YIDbgn','\x20already\x20exists','\x20model(s)','2845ovOpki','env','Project\x20directory\x20','96jANcVM','Format\x20code','readdirSync','basename','ino','The\x20current\x20directory\x20must\x20be\x20empty.','keys','description','join','Project\x20created:\x20','templateSource','copying','log','appCode','Unable\x20to\x20verify\x20ownership\x20of\x20the\x20created\x20project\x20directory','\x20run\x20start','package.json','needsUpgrade','lstatSync','start','cyan','1.0.0','Resolving\x20project\x20template','chdir','production','√\x20Pulled\x20','info','\x20\x202.\x20Pull\x20API\x20configuration:\x20','Project\x20creation\x20failed:\x20','verifying','1464752mKyLxr','projectCode','message','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','resolve','name','readFileSync','The\x20current\x20directory\x20changed\x20during\x20project\x20creation.','Configured\x20app\x20AppCode:\x20','*\x20Pulling\x20API\x20configuration...','belowMinimum','dirname','length','parse','setLogPath','extracting','Current\x20directory\x20identity\x20changed\x20during\x20project\x20creation','Project\x20name:\x20','Downloading\x20project\x20template','version','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','mkdtempSync','8stchtf','...','bold','error','toLocaleString','2778237GdkZrH','2ItZYVw','rmSync','Updating\x20package.json\x20name','\x20\x201.\x20Start\x20project:\x20','\x20config\x20set\x20appcode\x20<app-code>\x27','Starting\x20project\x20creation:\x20','gray','projectName','relative','downloading','1088589AEFnIn','cookie','reverse','\x20|\x20Default:\x20implicit\x20(single\x20app)','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20','Remove\x20the\x20new\x20files\x20and\x20retry\x20from\x20an\x20empty\x20directory.','project'];a203_0x1e00=function(){return _0x56bd72;};return a203_0x1e00();}import{validateProjectName}from'../../../commands/project/create/project-name.js';import{getRuntimeDomain,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(_0x5329b9){const _0x51fa24=a203_0x392e;try{const _0x254fdf=a203_0x1ccca2[_0x51fa24(0x1fe)](_0x5329b9);if(!_0x254fdf['isDirectory']())return null;return{'dev':_0x254fdf['dev'],'ino':_0x254fdf[_0x51fa24(0x1f0)]};}catch{return null;}}function isSameDirectory(_0x1dd915,_0x55d9bf){const _0x5edc39=a203_0x392e;return!!_0x1dd915&&!!_0x55d9bf&&_0x1dd915[_0x5edc39(0x1dc)]===_0x55d9bf[_0x5edc39(0x1dc)]&&_0x1dd915[_0x5edc39(0x1f0)]===_0x55d9bf[_0x5edc39(0x1f0)];}function commitCurrentDirectoryProject(_0x4eeec4,_0x2ae298,_0x430cf9){const _0x3590bf=a203_0x392e;if(!isSameDirectory(readDirectoryIdentity(_0x4eeec4),_0x430cf9))throw new Error(_0x3590bf(0x1a1));const _0x41555b=a203_0x298087[_0x3590bf(0x1ef)](_0x2ae298),_0x24585b=a203_0x1ccca2[_0x3590bf(0x1ee)](_0x4eeec4);if(_0x24585b[_0x3590bf(0x216)]!==0x1||_0x24585b[0x0]!==_0x41555b)throw CliErrors[_0x3590bf(0x1ca)](_0x3590bf(0x211),_0x3590bf(0x1bc));const _0x31113b=a203_0x298087['join'](_0x2ae298,_0x3590bf(0x1bd)),_0x41928d=[];try{for(const _0x4b5b75 of a203_0x1ccca2[_0x3590bf(0x1ee)](_0x31113b)){a203_0x1ccca2[_0x3590bf(0x1cd)](a203_0x298087['join'](_0x31113b,_0x4b5b75),a203_0x298087['join'](_0x4eeec4,_0x4b5b75)),_0x41928d[_0x3590bf(0x1d6)](_0x4b5b75);}a203_0x1ccca2[_0x3590bf(0x1ae)](_0x2ae298,{'recursive':!![],'force':!![]});}catch(_0x8f14d){for(const _0x3a7fcc of _0x41928d[_0x3590bf(0x1b9)]()){const _0x38a59e=a203_0x298087[_0x3590bf(0x1f4)](_0x4eeec4,_0x3a7fcc);if(!a203_0x1ccca2[_0x3590bf(0x1cc)](_0x38a59e))continue;a203_0x1ccca2['renameSync'](_0x38a59e,a203_0x298087[_0x3590bf(0x1f4)](_0x31113b,_0x3a7fcc));}throw _0x8f14d;}}export async function createApp(_0x344c48){const _0x5e3cd0=a203_0x392e,_0x35f858=await checkCliVersion();(_0x35f858[_0x5e3cd0(0x1fd)]||_0x35f858[_0x5e3cd0(0x214)])&&(printCliUpgradeWarning(_0x35f858),assertCliVersionSupported(_0x35f858),logger[_0x5e3cd0(0x206)]('create',_0x5e3cd0(0x1e0),{'currentVersion':_0x35f858[_0x5e3cd0(0x1cb)],'stableVersion':_0x35f858['stableVersion'],'minimumVersion':_0x35f858['minimumVersion'],'needsUpgrade':_0x35f858['needsUpgrade'],'belowMinimum':_0x35f858['belowMinimum']}));const _0x498b5c=_0x344c48[_0x5e3cd0(0x1c9)]?a203_0x298087[_0x5e3cd0(0x1ef)](process[_0x5e3cd0(0x1d8)]()):_0x344c48[_0x5e3cd0(0x20b)];if(_0x498b5c&&(_0x344c48[_0x5e3cd0(0x1f9)]||_0x344c48['nonInteractive']))await runCreate({'projectName':_0x498b5c,'appCode':_0x344c48['appCode'],'env':_0x344c48[_0x5e3cd0(0x1ea)]},_0x344c48);else{if(_0x498b5c){const _0x4514a3=await selectSingleAppcode(_0x344c48[_0x5e3cd0(0x1b8)]);await runCreate({'projectName':_0x498b5c,'appCode':_0x4514a3||undefined,'env':_0x344c48['env']},_0x344c48);}else await guidedCreateProject(_0x3de665=>runCreate(_0x3de665,_0x344c48),_0x344c48['env'],_0x344c48[_0x5e3cd0(0x1b8)]);}}async function runCreate(_0x41450f,_0x1a6104){const _0x18b422=a203_0x392e;_0x41450f[_0x18b422(0x1b4)]=validateProjectName(_0x41450f['projectName']);const _0x39eb5f=_0x1a6104['currentDir']?process['cwd']():a203_0x298087['resolve'](process['cwd'](),_0x41450f['projectName']);if(_0x1a6104[_0x18b422(0x1c9)]){if(a203_0x1ccca2[_0x18b422(0x1ee)](_0x39eb5f)[_0x18b422(0x216)]>0x0)throw CliErrors[_0x18b422(0x1ca)](_0x18b422(0x1f1),_0x18b422(0x1e5));}else{if(a203_0x1ccca2[_0x18b422(0x1cc)](_0x39eb5f))throw new Error(_0x18b422(0x1eb)+_0x41450f[_0x18b422(0x1b4)]+_0x18b422(0x1e7));}let _0x24c271=null;const _0xbdf52d=_0x1a6104[_0x18b422(0x1c9)]?readDirectoryIdentity(_0x39eb5f):null;let _0x1fa17a=null;try{a203_0x1ccca2['accessSync'](a203_0x298087[_0x18b422(0x215)](_0x39eb5f),a203_0x1ccca2[_0x18b422(0x1bf)][_0x18b422(0x1e3)]);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x18b422(0x206)](_0x18b422(0x1de),_0x18b422(0x1b2)+_0x41450f[_0x18b422(0x1b4)],{'projectDir':_0x39eb5f,'appCode':_0x41450f[_0x18b422(0x1f9)]}),console['log'](),console[_0x18b422(0x1f8)](a203_0xd8fa06[_0x18b422(0x1d5)](_0x18b422(0x1df))+_0x18b422(0x1a2)+a203_0xd8fa06[_0x18b422(0x1d5)](_0x41450f[_0x18b422(0x1b4)])+(_0x41450f[_0x18b422(0x1f9)]?'\x20|\x20AppCode:\x20'+a203_0xd8fa06[_0x18b422(0x200)](_0x41450f['appCode']):''));try{let _0x41b950=_0x41450f[_0x18b422(0x1b4)];_0x1a6104[_0x18b422(0x1c9)]&&(_0x1fa17a=a203_0x1ccca2[_0x18b422(0x1a6)](a203_0x298087['join'](_0x39eb5f,'.rabetbase-create-')),_0x41b950=a203_0x298087[_0x18b422(0x1b5)](process['cwd'](),a203_0x298087[_0x18b422(0x1f4)](_0x1fa17a,_0x18b422(0x1bd))));const _0xc6a80=a203_0x298087[_0x18b422(0x20e)](process[_0x18b422(0x1d8)](),_0x41b950);await runTask(_0x18b422(0x202),_0x180156=>copyProjectTemplate(_0x41b950,_0x4bdd3b=>_0x180156(projectTemplateStageLabel(_0x4bdd3b)),_0x1a6104[_0x18b422(0x1f6)]),_0x18b422(0x1d4)),_0x24c271=_0x1a6104['currentDir']?null:readDirectoryIdentity(_0x39eb5f);if(!_0x1a6104[_0x18b422(0x1c9)]&&!_0x24c271)throw new Error(_0x18b422(0x1fa));await updatePackageJsonName(_0x41b950,_0x41450f[_0x18b422(0x1b4)]),await runTask(_0x18b422(0x1d2),()=>installDependencies(_0x41b950)),await runTask(_0x18b422(0x1ed),()=>formatProjectCode(_0x41b950)),await configureAppCode(_0x41b950,_0x41450f[_0x18b422(0x1b4)],_0x41450f['appCode']||'',_0x41450f[_0x18b422(0x1ea)]);let _0x5a1ee9=![];if(_0x41450f['appCode']){console[_0x18b422(0x1f8)](_0x18b422(0x213));const _0x49b01a=process[_0x18b422(0x1d8)]();try{process[_0x18b422(0x203)](_0xc6a80);const _0x131e3d=_0x41450f[_0x18b422(0x1ea)]||_0x18b422(0x204);initEnv(_0x131e3d);const {configArray:_0x46e261}=await fetchModelList(_0x41450f[_0x18b422(0x1f9)],_0x1a6104['cookie']||''),_0x3c5988=DEFAULT_API_DIR,_0x36e860=await generateApiFile(_0x46e261,'',_0x41450f['appCode'],!![],_0x131e3d,_0x3c5988,undefined,getSdkClientRoutingConfig(),{'overwriteTypescript':!![],'modelProfile':{'name':_0x41450f[_0x18b422(0x1f9)],'defaultName':_0x41450f[_0x18b422(0x1f9)],'runtimeDomain':getRuntimeDomain()}});console[_0x18b422(0x1f8)](_0x18b422(0x205)+_0x46e261['length']+_0x18b422(0x1c4)+_0x36e860[_0x18b422(0x1c6)]+_0x18b422(0x1e8)),logger['info'](_0x18b422(0x1de),'API\x20configuration\x20pulled:\x20'+_0x41450f[_0x18b422(0x1f9)]);}catch(_0x3d2f2a){_0x5a1ee9=!![],console[_0x18b422(0x1f8)](_0x18b422(0x1bb)+CLI_BIN_NAME+'\x20api\x20pull\x20--force\x20--yes'),logger[_0x18b422(0x1d7)]('create',_0x18b422(0x1c7),{'error':_0x3d2f2a instanceof Error?_0x3d2f2a[_0x18b422(0x20c)]:String(_0x3d2f2a)});}finally{process['chdir'](_0x49b01a);}}if(_0x1a6104[_0x18b422(0x1c9)]){if(!_0x1fa17a||!_0xbdf52d)throw new Error(_0x18b422(0x1c2));commitCurrentDirectoryProject(_0x39eb5f,_0x1fa17a,_0xbdf52d),_0x1fa17a=null;}try{logger[_0x18b422(0x19f)](_0x39eb5f),logger['success'](_0x18b422(0x1de),_0x18b422(0x1f5)+_0x41450f[_0x18b422(0x1b4)]);}catch(_0x45d9e2){console[_0x18b422(0x1d7)]('!\x20Project\x20created,\x20but\x20local\x20logging\x20could\x20not\x20be\x20initialized:\x20'+(_0x45d9e2 instanceof Error?_0x45d9e2[_0x18b422(0x20c)]:String(_0x45d9e2)));}console[_0x18b422(0x1f8)](),console[_0x18b422(0x1f8)](a203_0xd8fa06[_0x18b422(0x1d5)]('─'[_0x18b422(0x1d0)](0x3c))),console[_0x18b422(0x1f8)](a203_0xd8fa06[_0x18b422(0x200)][_0x18b422(0x1a9)]('🚀\x20Next\x20Steps:')),console['log']();const _0x57b667=_0x1a6104[_0x18b422(0x1c9)]?CLI_BIN_NAME+_0x18b422(0x1fb):_0x18b422(0x1db)+_0x41450f[_0x18b422(0x1b4)]+_0x18b422(0x1da)+CLI_BIN_NAME+_0x18b422(0x1fb);console[_0x18b422(0x1f8)](_0x18b422(0x1b0)+a203_0xd8fa06[_0x18b422(0x200)]['bold'](_0x57b667)),_0x5a1ee9&&console['log'](_0x18b422(0x207)+a203_0xd8fa06[_0x18b422(0x200)][_0x18b422(0x1a9)](CLI_BIN_NAME+_0x18b422(0x1e4))),console[_0x18b422(0x1f8)](a203_0xd8fa06[_0x18b422(0x1d5)]('─'[_0x18b422(0x1d0)](0x3c)));}catch(_0x65df56){logger[_0x18b422(0x1aa)](_0x18b422(0x1de),_0x18b422(0x208)+_0x41450f['projectName'],{'error':_0x65df56 instanceof Error?_0x65df56[_0x18b422(0x20c)]:String(_0x65df56)});try{const _0x597cc5=readDirectoryIdentity(_0x39eb5f);if(_0x1a6104[_0x18b422(0x1c9)]&&_0x1fa17a)a203_0x1ccca2[_0x18b422(0x1ae)](_0x1fa17a,{'recursive':!![],'force':!![]});else{if(_0x24c271&&_0x597cc5?.['dev']===_0x24c271['dev']&&_0x597cc5[_0x18b422(0x1f0)]===_0x24c271['ino'])console[_0x18b422(0x1f8)]('*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20'+_0x39eb5f),a203_0x1ccca2[_0x18b422(0x1ae)](_0x39eb5f,{'recursive':!![],'force':!![]});else _0x597cc5&&logger[_0x18b422(0x1d7)]('create',_0x18b422(0x1e2)+_0x39eb5f);}}catch{logger['warn']('create',_0x18b422(0x1c3)+_0x39eb5f);}throw _0x65df56;}}async function runTask(_0x49e2bd,_0x1f3f7d,_0x38aa2e=_0x49e2bd){const _0x223eb0=a203_0x392e,_0x3f90bf=a203_0x291321(_0x49e2bd+_0x223eb0(0x1a8))[_0x223eb0(0x1ff)]();try{const _0x20213a=await _0x1f3f7d(_0x2fcca9=>{const _0x236bc0=_0x223eb0;_0x3f90bf[_0x236bc0(0x1d9)]=_0x2fcca9+_0x236bc0(0x1a8);});_0x3f90bf[_0x223eb0(0x1e1)](),console[_0x223eb0(0x1f8)](''+a203_0xd8fa06[_0x223eb0(0x1d5)]('\x20√\x20')+_0x38aa2e+'\x20'+a203_0xd8fa06[_0x223eb0(0x1b3)]('['+_0x20213a+']'));}catch(_0xa4bf61){_0x3f90bf['fail'](_0x49e2bd);throw _0xa4bf61;}}function projectTemplateStageLabel(_0x344a77){const _0x55501b=a203_0x392e;switch(_0x344a77){case'resolving':return _0x55501b(0x202);case _0x55501b(0x1b6):return _0x55501b(0x1a3);case _0x55501b(0x209):return _0x55501b(0x1d1);case _0x55501b(0x1a0):return'Extracting\x20project\x20template';case _0x55501b(0x1f7):return _0x55501b(0x1d3);}}async function updatePackageJsonName(_0x2463ab,_0x537d66){const _0x5af336=a203_0x392e,_0x5d70bf=a203_0x298087[_0x5af336(0x20e)](process[_0x5af336(0x1d8)](),_0x2463ab),_0x11b367=a203_0x298087[_0x5af336(0x1f4)](_0x5d70bf,'package.json');try{console[_0x5af336(0x1f8)](_0x5af336(0x1a5));const _0x540c0b=getRabetbaseCliPackageRoot(),_0x379fa5=a203_0x298087[_0x5af336(0x1f4)](_0x540c0b,_0x5af336(0x1fc));let _0x4bdf30=_0x5af336(0x201);try{const _0x260485=JSON[_0x5af336(0x217)](a203_0x1ccca2['readFileSync'](_0x379fa5,_0x5af336(0x1c8)));_0x4bdf30=_0x260485[_0x5af336(0x1a4)]||_0x5af336(0x201);}catch{}const _0x172a46=a203_0x1ccca2[_0x5af336(0x210)](_0x11b367,_0x5af336(0x1c8)),_0x13f0ea=JSON[_0x5af336(0x217)](_0x172a46);_0x13f0ea[_0x5af336(0x20f)]=_0x537d66,_0x13f0ea[_0x5af336(0x1f3)]=_0x537d66+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0x4bdf30,a203_0x1ccca2['writeFileSync'](_0x11b367,JSON[_0x5af336(0x1c5)](_0x13f0ea,null,0x2)+'\x0a',_0x5af336(0x1c8)),console['log'](_0x5af336(0x1be)+_0x537d66),logger['info'](_0x5af336(0x1de),_0x5af336(0x1af));}catch(_0x3044dd){logger[_0x5af336(0x1aa)](_0x5af336(0x1de),'Failed\x20to\x20update\x20package.json');throw _0x3044dd;}}async function configureAppCode(_0x448689,_0x2f78fc,_0x58503d,_0x1e0547){const _0xd8e162=a203_0x392e,_0x4e8a42=a203_0x298087[_0xd8e162(0x20e)](process['cwd'](),_0x448689),_0x7003c=a203_0x298087[_0xd8e162(0x1f4)](_0x4e8a42,NEW_CONFIG_NAME);try{_0x58503d?console[_0xd8e162(0x1f8)]('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x2f78fc+':\x20'+_0x58503d):console[_0xd8e162(0x1f8)](_0xd8e162(0x20d)+_0x2f78fc);const _0x333e3a=getRabetbaseCliPackageRoot(),_0x4e0377=a203_0x298087[_0xd8e162(0x1f4)](_0x333e3a,_0xd8e162(0x1fc));let _0x142465=_0xd8e162(0x201);try{const _0x23da18=JSON[_0xd8e162(0x217)](a203_0x1ccca2[_0xd8e162(0x210)](_0x4e0377,_0xd8e162(0x1c8)));_0x142465=_0x23da18[_0xd8e162(0x1a4)]||'1.0.0';}catch{}const {globalConfig:_0x5325d5}=loadRawConfigLayers(),_0x11d908=typeof _0x5325d5['env']==='string'?_0x5325d5['env']:undefined,_0x3adfc2={};for(const _0x30f74f of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x5325d5[_0x30f74f]!=null)_0x3adfc2[_0x30f74f]=_0x5325d5[_0x30f74f];}const _0x134204=buildCanonicalProjectConfig(_0x3adfc2,{'appCodes':_0x58503d?[_0x58503d]:[],'env':_0x1e0547||_0x11d908||_0xd8e162(0x204),'metadata':{'createdAt':new Date()[_0xd8e162(0x1ab)](),'version':_0x142465}});writeConfigFile(_0x7003c,_0x134204),await generateSdkConfigFile(a203_0x298087[_0xd8e162(0x1f4)](_0x4e8a42,DEFAULT_API_DIR),getSdkClientRoutingConfig()),writeProjectDomainRoutingManifest(_0x4e8a42),_0x58503d?console[_0xd8e162(0x1f8)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object[_0xd8e162(0x1f2)](_0x134204[_0xd8e162(0x1dd)]||{})[_0xd8e162(0x1f4)](',\x20')+_0xd8e162(0x1ba)):console[_0xd8e162(0x1f8)](_0xd8e162(0x1cf)+CLI_BIN_NAME+_0xd8e162(0x1b1)),logger[_0xd8e162(0x206)](_0xd8e162(0x1de),_0xd8e162(0x212)+_0x58503d);}catch(_0x3594d8){logger['error']('create',_0xd8e162(0x1c0));throw _0x3594d8;}}
1
+ (function(_0x353241,_0xf7ac1f){const _0x970c0d=a203_0x412a,_0x260751=_0x353241();while(!![]){try{const _0x3f2426=-parseInt(_0x970c0d(0xf9))/0x1*(parseInt(_0x970c0d(0x103))/0x2)+parseInt(_0x970c0d(0xa3))/0x3*(parseInt(_0x970c0d(0xc8))/0x4)+-parseInt(_0x970c0d(0xb7))/0x5*(parseInt(_0x970c0d(0xeb))/0x6)+-parseInt(_0x970c0d(0xda))/0x7*(-parseInt(_0x970c0d(0xd7))/0x8)+parseInt(_0x970c0d(0xfc))/0x9+-parseInt(_0x970c0d(0x95))/0xa+parseInt(_0x970c0d(0xdc))/0xb;if(_0x3f2426===_0xf7ac1f)break;else _0x260751['push'](_0x260751['shift']());}catch(_0x398590){_0x260751['push'](_0x260751['shift']());}}}(a203_0x2ca5,0x52411));import a203_0x25495f from'path';import a203_0x4931cf from'fs';import a203_0xbb6924 from'chalk';import a203_0x464c98 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';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{getRuntimeDomain,getSdkClientRoutingConfig}from'../../../constant/domain.js';import{generateSdkConfigFile}from'../../../api/generate-sdk-config-file.js';import{writeProjectDomainRoutingManifest}from'../../../config/project-domain-routing.js';function a203_0x2ca5(){const _0x42842c=['success','error','Configured\x20app\x20AppCode:\x20','project','stop','info','\x20√\x20','belowMinimum','keys','stableVersion','10XSkcje','Updating\x20package.json\x20name','join','text','green','cwd','!\x20Project\x20created,\x20but\x20local\x20logging\x20could\x20not\x20be\x20initialized:\x20','create','Project\x20name:\x20','Project\x20template\x20ready','Current\x20directory\x20identity\x20changed\x20during\x20project\x20creation','mkdtempSync','\x20run\x20start','\x20already\x20exists','accessSync','modelCount','The\x20current\x20directory\x20changed\x20during\x20project\x20creation.','518660NfEmvR','cyan','Starting\x20project\x20creation:\x20','nonInteractive','downloading','Resolving\x20project\x20template','name','lstatSync','dirname','dev','\x20\x202.\x20Pull\x20API\x20configuration:\x20','\x20api\x20pull\x20--force\x20--yes','basename','\x20config\x20set\x20appcode\x20<app-code>\x27','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','1224568BGoWoL','warn','projectName','14MNRLuZ','Format\x20code','77946OHMJdw','.rabetbase-create-','renameSync','1.0.0','length','resolve','gray','toLocaleString','rmSync','\x20\x201.\x20Start\x20project:\x20','API\x20configuration\x20pull\x20failed','cookie','√\x20package.json\x20updated:\x20name=','\x20dataset(s),\x20generated\x20','bold','1437684wtTqiK','stringify','currentDir','W_OK','√\x20Pulled\x20','resolving','parse','start','fail','env','Project\x20creation\x20failed:\x20','utf8','\x20&&\x20','\x20|\x20AppCode:\x20','16eTIsav','Failed\x20to\x20update\x20package.json','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','3768552rLrCLE','Failed\x20to\x20clean\x20up\x20project\x20directory:\x20','package.json','chdir','validation','copying','\x20Generated\x20by\x20rabetbase\x20cli\x20','7594EBQPDl','relative','Install\x20dependencies','writeFileSync','...','cd\x20','verifying','3737230obcuCa','production','needsUpgrade','reverse','ino','Remove\x20or\x20move\x20the\x20existing\x20files,\x20then\x20retry\x20with\x20--current-dir.','appCode','Copying\x20local\x20template\x20source','🚀\x20Next\x20Steps:','apps','Project\x20created:\x20','message','repeat','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','12rSejdG','push','Downloading\x20project\x20template','existsSync','The\x20current\x20directory\x20must\x20be\x20empty.','*\x20Pulling\x20API\x20configuration...','extracting','log','readdirSync','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20'];a203_0x2ca5=function(){return _0x42842c;};return a203_0x2ca5();}import{CliErrors}from'../../../errors.js';function readDirectoryIdentity(_0x13c610){const _0x22dc06=a203_0x412a;try{const _0x5d9fb8=a203_0x4931cf[_0x22dc06(0xcf)](_0x13c610);if(!_0x5d9fb8['isDirectory']())return null;return{'dev':_0x5d9fb8['dev'],'ino':_0x5d9fb8[_0x22dc06(0x99)]};}catch{return null;}}function isSameDirectory(_0x3f5159,_0xbb85a1){const _0x4e278a=a203_0x412a;return!!_0x3f5159&&!!_0xbb85a1&&_0x3f5159['dev']===_0xbb85a1[_0x4e278a(0xd1)]&&_0x3f5159[_0x4e278a(0x99)]===_0xbb85a1['ino'];}function a203_0x412a(_0x2809b3,_0x38d3b3){_0x2809b3=_0x2809b3-0x95;const _0x2ca5f7=a203_0x2ca5();let _0x412a71=_0x2ca5f7[_0x2809b3];return _0x412a71;}function commitCurrentDirectoryProject(_0x441428,_0x2b315c,_0x3befd3){const _0x25deb6=a203_0x412a;if(!isSameDirectory(readDirectoryIdentity(_0x441428),_0x3befd3))throw new Error(_0x25deb6(0xc1));const _0x4f64b2=a203_0x25495f[_0x25deb6(0xd4)](_0x2b315c),_0x319533=a203_0x4931cf[_0x25deb6(0xab)](_0x441428);if(_0x319533['length']!==0x1||_0x319533[0x0]!==_0x4f64b2)throw CliErrors[_0x25deb6(0x100)](_0x25deb6(0xc7),'Remove\x20the\x20new\x20files\x20and\x20retry\x20from\x20an\x20empty\x20directory.');const _0x1131e9=a203_0x25495f[_0x25deb6(0xb9)](_0x2b315c,'project'),_0x225140=[];try{for(const _0xc9f825 of a203_0x4931cf[_0x25deb6(0xab)](_0x1131e9)){a203_0x4931cf[_0x25deb6(0xde)](a203_0x25495f[_0x25deb6(0xb9)](_0x1131e9,_0xc9f825),a203_0x25495f[_0x25deb6(0xb9)](_0x441428,_0xc9f825)),_0x225140[_0x25deb6(0xa4)](_0xc9f825);}a203_0x4931cf[_0x25deb6(0xe4)](_0x2b315c,{'recursive':!![],'force':!![]});}catch(_0x29ee17){for(const _0x34b9ed of _0x225140[_0x25deb6(0x98)]()){const _0x212b08=a203_0x25495f[_0x25deb6(0xb9)](_0x441428,_0x34b9ed);if(!a203_0x4931cf[_0x25deb6(0xa6)](_0x212b08))continue;a203_0x4931cf[_0x25deb6(0xde)](_0x212b08,a203_0x25495f[_0x25deb6(0xb9)](_0x1131e9,_0x34b9ed));}throw _0x29ee17;}}export async function createApp(_0x4b9471){const _0x162250=a203_0x412a,_0x45ce62=await checkCliVersion();(_0x45ce62['needsUpgrade']||_0x45ce62[_0x162250(0xb4)])&&(printCliUpgradeWarning(_0x45ce62),assertCliVersionSupported(_0x45ce62),logger[_0x162250(0xb2)](_0x162250(0xbe),'CLI\x20version\x20check',{'currentVersion':_0x45ce62['currentVersion'],'stableVersion':_0x45ce62[_0x162250(0xb6)],'minimumVersion':_0x45ce62['minimumVersion'],'needsUpgrade':_0x45ce62[_0x162250(0x97)],'belowMinimum':_0x45ce62[_0x162250(0xb4)]}));const _0x291619=_0x4b9471[_0x162250(0xed)]?a203_0x25495f[_0x162250(0xd4)](process['cwd']()):_0x4b9471['projectCode'];if(_0x291619&&(_0x4b9471[_0x162250(0x9b)]||_0x4b9471[_0x162250(0xcb)]))await runCreate({'projectName':_0x291619,'appCode':_0x4b9471['appCode'],'env':_0x4b9471['env']},_0x4b9471);else{if(_0x291619){const _0x2a6698=await selectSingleAppcode(_0x4b9471[_0x162250(0xe7)]);await runCreate({'projectName':_0x291619,'appCode':_0x2a6698||undefined,'env':_0x4b9471[_0x162250(0xf4)]},_0x4b9471);}else await guidedCreateProject(_0x4e4668=>runCreate(_0x4e4668,_0x4b9471),_0x4b9471[_0x162250(0xf4)],_0x4b9471[_0x162250(0xe7)]);}}async function runCreate(_0x5bf322,_0x37a652){const _0x41d6b5=a203_0x412a;_0x5bf322[_0x41d6b5(0xd9)]=validateProjectName(_0x5bf322[_0x41d6b5(0xd9)]);const _0x32a8ea=_0x37a652[_0x41d6b5(0xed)]?process[_0x41d6b5(0xbc)]():a203_0x25495f[_0x41d6b5(0xe1)](process[_0x41d6b5(0xbc)](),_0x5bf322[_0x41d6b5(0xd9)]);if(_0x37a652[_0x41d6b5(0xed)]){if(a203_0x4931cf[_0x41d6b5(0xab)](_0x32a8ea)[_0x41d6b5(0xe0)]>0x0)throw CliErrors[_0x41d6b5(0x100)](_0x41d6b5(0xa7),_0x41d6b5(0x9a));}else{if(a203_0x4931cf[_0x41d6b5(0xa6)](_0x32a8ea))throw new Error('Project\x20directory\x20'+_0x5bf322[_0x41d6b5(0xd9)]+_0x41d6b5(0xc4));}let _0x3fcd47=null;const _0x22d53e=_0x37a652['currentDir']?readDirectoryIdentity(_0x32a8ea):null;let _0x27548f=null;try{a203_0x4931cf[_0x41d6b5(0xc5)](a203_0x25495f[_0x41d6b5(0xd0)](_0x32a8ea),a203_0x4931cf['constants'][_0x41d6b5(0xee)]);}catch{throw new Error(_0x41d6b5(0xa2));}logger[_0x41d6b5(0xb2)](_0x41d6b5(0xbe),_0x41d6b5(0xca)+_0x5bf322[_0x41d6b5(0xd9)],{'projectDir':_0x32a8ea,'appCode':_0x5bf322['appCode']}),console[_0x41d6b5(0xaa)](),console[_0x41d6b5(0xaa)](a203_0xbb6924['green'](_0x41d6b5(0xb3))+_0x41d6b5(0xbf)+a203_0xbb6924[_0x41d6b5(0xbb)](_0x5bf322['projectName'])+(_0x5bf322[_0x41d6b5(0x9b)]?_0x41d6b5(0xf8)+a203_0xbb6924[_0x41d6b5(0xc9)](_0x5bf322['appCode']):''));try{let _0x590f94=_0x5bf322['projectName'];_0x37a652[_0x41d6b5(0xed)]&&(_0x27548f=a203_0x4931cf[_0x41d6b5(0xc2)](a203_0x25495f[_0x41d6b5(0xb9)](_0x32a8ea,_0x41d6b5(0xdd))),_0x590f94=a203_0x25495f[_0x41d6b5(0x104)](process[_0x41d6b5(0xbc)](),a203_0x25495f['join'](_0x27548f,_0x41d6b5(0xb0))));const _0x226a02=a203_0x25495f[_0x41d6b5(0xe1)](process['cwd'](),_0x590f94);await runTask(_0x41d6b5(0xcd),_0x3d8d18=>copyProjectTemplate(_0x590f94,_0x9094ec=>_0x3d8d18(projectTemplateStageLabel(_0x9094ec)),_0x37a652['templateSource']),_0x41d6b5(0xc0)),_0x3fcd47=_0x37a652[_0x41d6b5(0xed)]?null:readDirectoryIdentity(_0x32a8ea);if(!_0x37a652['currentDir']&&!_0x3fcd47)throw new Error('Unable\x20to\x20verify\x20ownership\x20of\x20the\x20created\x20project\x20directory');await updatePackageJsonName(_0x590f94,_0x5bf322['projectName']),await runTask(_0x41d6b5(0x105),()=>installDependencies(_0x590f94)),await runTask(_0x41d6b5(0xdb),()=>formatProjectCode(_0x590f94)),await configureAppCode(_0x590f94,_0x5bf322[_0x41d6b5(0xd9)],_0x5bf322[_0x41d6b5(0x9b)]||'',_0x5bf322['env']);let _0x2283f8=![];if(_0x5bf322[_0x41d6b5(0x9b)]){console[_0x41d6b5(0xaa)](_0x41d6b5(0xa8));const _0x5578fe=process[_0x41d6b5(0xbc)]();try{process[_0x41d6b5(0xff)](_0x226a02);const _0x5ec5ef=_0x5bf322[_0x41d6b5(0xf4)]||_0x41d6b5(0x96);initEnv(_0x5ec5ef);const {configArray:_0x430fe3}=await fetchModelList(_0x5bf322[_0x41d6b5(0x9b)],_0x37a652[_0x41d6b5(0xe7)]||''),_0xc1d5c1=DEFAULT_API_DIR,_0x291d0a=await generateApiFile(_0x430fe3,'',_0x5bf322[_0x41d6b5(0x9b)],!![],_0x5ec5ef,_0xc1d5c1,undefined,getSdkClientRoutingConfig(),{'overwriteTypescript':!![],'modelProfile':{'name':_0x5bf322[_0x41d6b5(0x9b)],'defaultName':_0x5bf322['appCode'],'runtimeDomain':getRuntimeDomain()}});console['log'](_0x41d6b5(0xef)+_0x430fe3[_0x41d6b5(0xe0)]+_0x41d6b5(0xe9)+_0x291d0a[_0x41d6b5(0xc6)]+'\x20model(s)'),logger[_0x41d6b5(0xb2)]('create','API\x20configuration\x20pulled:\x20'+_0x5bf322['appCode']);}catch(_0x4373bf){_0x2283f8=!![],console['log'](_0x41d6b5(0xac)+CLI_BIN_NAME+_0x41d6b5(0xd3)),logger['warn'](_0x41d6b5(0xbe),_0x41d6b5(0xe6),{'error':_0x4373bf instanceof Error?_0x4373bf['message']:String(_0x4373bf)});}finally{process[_0x41d6b5(0xff)](_0x5578fe);}}if(_0x37a652[_0x41d6b5(0xed)]){if(!_0x27548f||!_0x22d53e)throw new Error('Unable\x20to\x20prepare\x20the\x20current\x20directory\x20workspace');commitCurrentDirectoryProject(_0x32a8ea,_0x27548f,_0x22d53e),_0x27548f=null;}try{logger['setLogPath'](_0x32a8ea),logger[_0x41d6b5(0xad)](_0x41d6b5(0xbe),_0x41d6b5(0x9f)+_0x5bf322[_0x41d6b5(0xd9)]);}catch(_0x20254b){console[_0x41d6b5(0xd8)](_0x41d6b5(0xbd)+(_0x20254b instanceof Error?_0x20254b['message']:String(_0x20254b)));}console[_0x41d6b5(0xaa)](),console[_0x41d6b5(0xaa)](a203_0xbb6924['green']('─'[_0x41d6b5(0xa1)](0x3c))),console[_0x41d6b5(0xaa)](a203_0xbb6924[_0x41d6b5(0xc9)][_0x41d6b5(0xea)](_0x41d6b5(0x9d))),console['log']();const _0x5017c3=_0x37a652[_0x41d6b5(0xed)]?CLI_BIN_NAME+_0x41d6b5(0xc3):_0x41d6b5(0x108)+_0x5bf322['projectName']+_0x41d6b5(0xf7)+CLI_BIN_NAME+_0x41d6b5(0xc3);console['log'](_0x41d6b5(0xe5)+a203_0xbb6924['cyan']['bold'](_0x5017c3)),_0x2283f8&&console[_0x41d6b5(0xaa)](_0x41d6b5(0xd2)+a203_0xbb6924[_0x41d6b5(0xc9)][_0x41d6b5(0xea)](CLI_BIN_NAME+_0x41d6b5(0xd3))),console['log'](a203_0xbb6924[_0x41d6b5(0xbb)]('─'[_0x41d6b5(0xa1)](0x3c)));}catch(_0x22b539){logger[_0x41d6b5(0xae)](_0x41d6b5(0xbe),_0x41d6b5(0xf5)+_0x5bf322['projectName'],{'error':_0x22b539 instanceof Error?_0x22b539[_0x41d6b5(0xa0)]:String(_0x22b539)});try{const _0x143639=readDirectoryIdentity(_0x32a8ea);if(_0x37a652[_0x41d6b5(0xed)]&&_0x27548f)a203_0x4931cf['rmSync'](_0x27548f,{'recursive':!![],'force':!![]});else{if(_0x3fcd47&&_0x143639?.[_0x41d6b5(0xd1)]===_0x3fcd47['dev']&&_0x143639[_0x41d6b5(0x99)]===_0x3fcd47[_0x41d6b5(0x99)])console[_0x41d6b5(0xaa)]('*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20'+_0x32a8ea),a203_0x4931cf['rmSync'](_0x32a8ea,{'recursive':!![],'force':!![]});else _0x143639&&logger[_0x41d6b5(0xd8)](_0x41d6b5(0xbe),'Skip\x20cleanup:\x20project\x20directory\x20ownership\x20changed:\x20'+_0x32a8ea);}}catch{logger[_0x41d6b5(0xd8)]('create',_0x41d6b5(0xfd)+_0x32a8ea);}throw _0x22b539;}}async function runTask(_0x4cb4c1,_0x5d26e2,_0x2c38b0=_0x4cb4c1){const _0x7406b1=a203_0x412a,_0x35be43=a203_0x464c98(_0x4cb4c1+'...')[_0x7406b1(0xf2)]();try{const _0x19abca=await _0x5d26e2(_0x332072=>{const _0x7bb513=_0x7406b1;_0x35be43[_0x7bb513(0xba)]=_0x332072+_0x7bb513(0x107);});_0x35be43[_0x7406b1(0xb1)](),console['log'](''+a203_0xbb6924['green']('\x20√\x20')+_0x2c38b0+'\x20'+a203_0xbb6924[_0x7406b1(0xe2)]('['+_0x19abca+']'));}catch(_0x4d3da8){_0x35be43[_0x7406b1(0xf3)](_0x4cb4c1);throw _0x4d3da8;}}function projectTemplateStageLabel(_0x5f3c82){const _0xf71172=a203_0x412a;switch(_0x5f3c82){case _0xf71172(0xf0):return _0xf71172(0xcd);case _0xf71172(0xcc):return _0xf71172(0xa5);case _0xf71172(0x109):return'Verifying\x20project\x20template';case _0xf71172(0xa9):return'Extracting\x20project\x20template';case _0xf71172(0x101):return _0xf71172(0x9c);}}async function updatePackageJsonName(_0x242553,_0x538ebc){const _0x152991=a203_0x412a,_0x46b6d7=a203_0x25495f[_0x152991(0xe1)](process[_0x152991(0xbc)](),_0x242553),_0x3a3686=a203_0x25495f[_0x152991(0xb9)](_0x46b6d7,'package.json');try{console['log']('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x18030f=getRabetbaseCliPackageRoot(),_0x54ba9d=a203_0x25495f['join'](_0x18030f,_0x152991(0xfe));let _0x2cccb4=_0x152991(0xdf);try{const _0x530e8f=JSON[_0x152991(0xf1)](a203_0x4931cf['readFileSync'](_0x54ba9d,_0x152991(0xf6)));_0x2cccb4=_0x530e8f['version']||_0x152991(0xdf);}catch{}const _0x5f2416=a203_0x4931cf['readFileSync'](_0x3a3686,_0x152991(0xf6)),_0x4bbd70=JSON[_0x152991(0xf1)](_0x5f2416);_0x4bbd70[_0x152991(0xce)]=_0x538ebc,_0x4bbd70['description']=_0x538ebc+_0x152991(0x102)+_0x2cccb4,a203_0x4931cf[_0x152991(0x106)](_0x3a3686,JSON[_0x152991(0xec)](_0x4bbd70,null,0x2)+'\x0a','utf8'),console['log'](_0x152991(0xe8)+_0x538ebc),logger[_0x152991(0xb2)]('create',_0x152991(0xb8));}catch(_0x393ae0){logger[_0x152991(0xae)]('create',_0x152991(0xfa));throw _0x393ae0;}}async function configureAppCode(_0x51b216,_0x563d8f,_0x5df076,_0x477f51){const _0x4b9f1d=a203_0x412a,_0x1eca2a=a203_0x25495f[_0x4b9f1d(0xe1)](process['cwd'](),_0x51b216),_0x65cc87=a203_0x25495f[_0x4b9f1d(0xb9)](_0x1eca2a,NEW_CONFIG_NAME);try{_0x5df076?console['log']('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x563d8f+':\x20'+_0x5df076):console[_0x4b9f1d(0xaa)](_0x4b9f1d(0xfb)+_0x563d8f);const _0x154554=getRabetbaseCliPackageRoot(),_0x49c4b6=a203_0x25495f['join'](_0x154554,'package.json');let _0x155705=_0x4b9f1d(0xdf);try{const _0x8f1a5c=JSON[_0x4b9f1d(0xf1)](a203_0x4931cf['readFileSync'](_0x49c4b6,_0x4b9f1d(0xf6)));_0x155705=_0x8f1a5c['version']||_0x4b9f1d(0xdf);}catch{}const {globalConfig:_0x3d05eb}=loadRawConfigLayers(),_0x2a1eaa=typeof _0x3d05eb['env']==='string'?_0x3d05eb[_0x4b9f1d(0xf4)]:undefined,_0x4edc9d={};for(const _0x35e31d of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x3d05eb[_0x35e31d]!=null)_0x4edc9d[_0x35e31d]=_0x3d05eb[_0x35e31d];}const _0x11e6ad=buildCanonicalProjectConfig(_0x4edc9d,{'appCodes':_0x5df076?[_0x5df076]:[],'env':_0x477f51||_0x2a1eaa||'production','metadata':{'createdAt':new Date()[_0x4b9f1d(0xe3)](),'version':_0x155705}});writeConfigFile(_0x65cc87,_0x11e6ad),await generateSdkConfigFile(a203_0x25495f['join'](_0x1eca2a,DEFAULT_API_DIR),getSdkClientRoutingConfig()),writeProjectDomainRoutingManifest(_0x1eca2a),_0x5df076?console[_0x4b9f1d(0xaa)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object[_0x4b9f1d(0xb5)](_0x11e6ad[_0x4b9f1d(0x9e)]||{})['join'](',\x20')+'\x20|\x20Default:\x20implicit\x20(single\x20app)'):console[_0x4b9f1d(0xaa)](_0x4b9f1d(0xd6)+CLI_BIN_NAME+_0x4b9f1d(0xd5)),logger[_0x4b9f1d(0xb2)](_0x4b9f1d(0xbe),_0x4b9f1d(0xaf)+_0x5df076);}catch(_0xc52ca6){logger['error'](_0x4b9f1d(0xbe),'Failed\x20to\x20configure\x20app\x20AppCode');throw _0xc52ca6;}}
@@ -1 +1 @@
1
- const a204_0x8adde4=a204_0x35bf;(function(_0x2b6fa2,_0x27b57e){const _0x50e878=a204_0x35bf,_0xa6b23d=_0x2b6fa2();while(!![]){try{const _0x3b8b48=-parseInt(_0x50e878(0x1a3))/0x1*(-parseInt(_0x50e878(0x185))/0x2)+-parseInt(_0x50e878(0x198))/0x3+parseInt(_0x50e878(0x12e))/0x4+-parseInt(_0x50e878(0x17f))/0x5*(-parseInt(_0x50e878(0x14a))/0x6)+parseInt(_0x50e878(0x17b))/0x7*(-parseInt(_0x50e878(0x12b))/0x8)+parseInt(_0x50e878(0x1a9))/0x9*(-parseInt(_0x50e878(0x171))/0xa)+parseInt(_0x50e878(0x135))/0xb;if(_0x3b8b48===_0x27b57e)break;else _0xa6b23d['push'](_0xa6b23d['shift']());}catch(_0x3192bf){_0xa6b23d['push'](_0xa6b23d['shift']());}}}(a204_0x43ac,0x8fae6));import{createHash}from'node:crypto';import a204_0x4a1f5d from'node:fs/promises';import a204_0x3a59ec from'node:path';import a204_0x5e554b from'semver';function a204_0x35bf(_0xb21595,_0x3f2679){_0xb21595=_0xb21595-0x12a;const _0x43aca6=a204_0x43ac();let _0x35bf8d=_0x43aca6[_0xb21595];return _0x35bf8d;}import{getProjectTemplateRelativeUrl}from'../../../constant/cdn.js';import{extractProjectTemplateArchive}from'../../../commands/project/create/project-template-archive.js';import{fetchProjectTemplateCdnConfig,isBetaCliVersion,resolveProjectTemplateDescriptor}from'../../../utils/cli-version-policy.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';const TEMPLATE_ID=a204_0x8adde4(0x166),ARCHIVE_TIMEOUT_MS=0x3a98,MAX_ARCHIVE_SIZE=0x14*0x400*0x400;function nonEmptyString(_0x2c6f40){const _0x54cac7=a204_0x8adde4;return typeof _0x2c6f40===_0x54cac7(0x148)&&_0x2c6f40[_0x54cac7(0x168)]()?_0x2c6f40[_0x54cac7(0x168)]():null;}function parseDescriptor(_0x3c22d9){const _0x2d0e1e=a204_0x8adde4;if(!_0x3c22d9||typeof _0x3c22d9!=='object')throw new Error('CDN\x20config\x20does\x20not\x20define\x20template\x20\x22'+TEMPLATE_ID+'\x22.');const _0x34e701=_0x3c22d9,_0x20c508=nonEmptyString(_0x34e701[_0x2d0e1e(0x17c)]),_0x3dacd4=nonEmptyString(_0x34e701[_0x2d0e1e(0x157)]),_0x2be484=_0x34e701[_0x2d0e1e(0x191)]===undefined?undefined:nonEmptyString(_0x34e701['url'])||undefined,_0x18cbcf=nonEmptyString(_0x34e701[_0x2d0e1e(0x159)])?.[_0x2d0e1e(0x15e)](),_0xac4ccb=_0x34e701[_0x2d0e1e(0x194)];if(!_0x20c508||!a204_0x5e554b['valid'](_0x20c508)||!_0x3dacd4||_0x3dacd4!==a204_0x3a59ec['posix'][_0x2d0e1e(0x18d)](_0x3dacd4)||_0x3dacd4[_0x2d0e1e(0x1a7)]('\x5c')||_0x34e701[_0x2d0e1e(0x191)]!==undefined&&!_0x2be484||!_0x18cbcf||!/^sha256:[a-f0-9]{64}$/[_0x2d0e1e(0x146)](_0x18cbcf)||typeof _0xac4ccb!=='number'||!Number[_0x2d0e1e(0x155)](_0xac4ccb)||_0xac4ccb<=0x0||_0xac4ccb>MAX_ARCHIVE_SIZE)throw new Error('CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22'+TEMPLATE_ID+'\x22.');return{'version':_0x20c508,'name':_0x3dacd4,'url':_0x2be484,'sha256':_0x18cbcf,'size':_0xac4ccb};}async function fetchWithTimeout(_0x3d24ba,_0x30543b,_0x1e01e7,_0x12d2fd){const _0x13e954=a204_0x8adde4,_0x5b85be=new AbortController(),_0x3907ae=setTimeout(()=>_0x5b85be['abort'](),_0x30543b);try{const _0x47785f=await fetch(_0x3d24ba,{'headers':{'Accept':_0x1e01e7},'redirect':_0x13e954(0x16e),'signal':_0x5b85be[_0x13e954(0x13e)]});return await _0x12d2fd(_0x47785f);}finally{clearTimeout(_0x3907ae);}}function a204_0x43ac(){const _0x40c2d1=['3468138pwzlgq','local','utf8','parse','getReader','Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','readFile','mkdtemp','.idea','headers','isFinite','690478ZpmfxW','.env','status','ino','includes','.env.','333gSOrJc','update','6106712yKudys','pathname','origin','1864740lVaLOZ','template.zip','chmod','ENOENT','isSymbolicLink','protocol','readdir','6876342csAPGm','config','mode','sha256:','Local\x20project\x20template\x20contains\x20a\x20local-only\x20entry:\x20','concat','byteLength','CDN\x20project\x20template\x20relative\x20URL\x20must\x20match\x20its\x20release\x20channel\x20or\x20version.','isDirectory','signal','.lovrabet.log','downloading','package.json','posix','.env.example','isAbsolute','lstat','test','from','string','dirname','17826NXvowr','CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20','.DS_Store','Local\x20template\x20source\x20does\x20not\x20exist:\x20','rename','Unable\x20to\x20claim\x20the\x20project\x20directory.','join',',\x20received\x20','.rabetbase','copyFile','verifying','isSafeInteger','hex','name','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','sha256','application/zip','CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.','content-length','release','toLowerCase','project','push','assetBaseUrl','.lovrabet.json','mkdir','https:','Project\x20directory\x20already\x20exists:\x20','sub-app-react-demo','has','trim','Local\x20template\x20source\x20and\x20project\x20output\x20must\x20not\x20overlap.','releaseLock','CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20','beta','length','error','access','dev','8510cxEWkM','message','cancel','dist','Rabetbase\x20CDN\x20config\x20is\x20unavailable.','startsWith','CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.','read','href','Project\x20template\x20package.json\x20is\x20invalid.','7tsNTIu','version','resolve','realpath','1275ztALvM','writeFile','get','sep','.codegraph','body','2uIUJCn','code','resolving','legacyAssetBaseUrl','isFile','Check\x20your\x20network\x20and\x20retry.\x20Details:\x20','digest','EEXIST','basename','arrayBuffer','Local\x20template\x20source\x20is\x20not\x20a\x20directory:\x20','.rabetbase-create-','url','validation','.git','size','copying','extracting','Choose\x20an\x20output\x20directory\x20outside\x20the\x20template\x20source.'];a204_0x43ac=function(){return _0x40c2d1;};return a204_0x43ac();}async function fetchTemplateDescriptor(){const _0x2eff16=a204_0x8adde4,_0x4848be=getCliVersion(),_0x32cd78=isBetaCliVersion(_0x4848be)?_0x2eff16(0x16c):_0x2eff16(0x15d),_0x277235=await fetchProjectTemplateCdnConfig();if(!_0x277235)throw new Error(_0x2eff16(0x175));const _0x38ad84=parseDescriptor(resolveProjectTemplateDescriptor(_0x277235[_0x2eff16(0x136)],_0x4848be));return{'descriptor':_0x38ad84,'channel':_0x32cd78,'assetBaseUrl':_0x277235[_0x2eff16(0x161)],'legacyAssetBaseUrl':_0x277235[_0x2eff16(0x188)]};}function resolveArchiveUrl(_0x5867f4,_0x46c035,_0x5ecd05,_0x5b3440){const _0x375ef7=a204_0x8adde4,_0x15beeb=new URL(_0x5ecd05+'/'),_0x4064f2=[getProjectTemplateRelativeUrl(_0x46c035),getProjectTemplateRelativeUrl(_0x46c035,_0x5867f4[_0x375ef7(0x17c)])];if(_0x5867f4['url']&&!_0x4064f2[_0x375ef7(0x1a7)](_0x5867f4[_0x375ef7(0x191)]))throw new Error(_0x375ef7(0x13c));const _0x3bb741=new URL(_0x5b3440+'/'),_0x3f9efb=_0x5867f4[_0x375ef7(0x191)]?new URL(_0x5867f4[_0x375ef7(0x191)],_0x15beeb[_0x375ef7(0x12d)]):new URL(_0x5867f4[_0x375ef7(0x157)],_0x3bb741),_0x3f2f18=_0x5867f4['url']?_0x15beeb['origin']:_0x3bb741['origin'];if(_0x3f9efb[_0x375ef7(0x133)]!==_0x375ef7(0x164)||_0x3f9efb[_0x375ef7(0x12d)]!==_0x3f2f18||a204_0x3a59ec[_0x375ef7(0x142)][_0x375ef7(0x18d)](decodeURIComponent(_0x3f9efb[_0x375ef7(0x12c)]))!==_0x5867f4[_0x375ef7(0x157)]||!_0x5867f4['url']&&!_0x3f9efb[_0x375ef7(0x12c)][_0x375ef7(0x176)](_0x3bb741['pathname']))throw new Error(_0x375ef7(0x177));return _0x3f9efb[_0x375ef7(0x179)];}async function readResponseBytes(_0x46658f,_0x1bbe5a){const _0x444254=a204_0x8adde4;if(!_0x46658f[_0x444254(0x184)]){const _0x208bfc=Buffer[_0x444254(0x147)](await _0x46658f[_0x444254(0x18e)]());if(_0x208bfc[_0x444254(0x16d)]>_0x1bbe5a)throw new Error(_0x444254(0x158));return _0x208bfc;}const _0xfe2c0e=_0x46658f[_0x444254(0x184)][_0x444254(0x19c)](),_0x185ab9=[];let _0x2d0c24=0x0;try{while(!![]){const {done:_0x4873db,value:_0xe2ae23}=await _0xfe2c0e[_0x444254(0x178)]();if(_0x4873db)break;_0x2d0c24+=_0xe2ae23[_0x444254(0x13b)];if(_0x2d0c24>_0x1bbe5a){await _0xfe2c0e[_0x444254(0x173)]();throw new Error(_0x444254(0x158));}_0x185ab9[_0x444254(0x160)](Buffer[_0x444254(0x147)](_0xe2ae23));}}finally{_0xfe2c0e[_0x444254(0x16a)]();}return Buffer[_0x444254(0x13a)](_0x185ab9,_0x2d0c24);}async function downloadArchive(_0x228695,_0x47ab0c,_0x475f36,_0x166a41,_0x328348,_0xbc7e98){const _0x29b6bc=a204_0x8adde4,_0x24582c=await fetchWithTimeout(resolveArchiveUrl(_0x228695,_0x47ab0c,_0x475f36,_0x166a41),ARCHIVE_TIMEOUT_MS,_0x29b6bc(0x15a),async _0xd8fa3e=>{const _0x380e55=_0x29b6bc;if(!_0xd8fa3e['ok'])throw new Error(_0x380e55(0x16b)+_0xd8fa3e[_0x380e55(0x1a5)]+'.');const _0x3f5077=Number(_0xd8fa3e[_0x380e55(0x1a1)][_0x380e55(0x181)](_0x380e55(0x15c)));if(Number[_0x380e55(0x1a2)](_0x3f5077)&&_0x3f5077>MAX_ARCHIVE_SIZE)throw new Error(_0x380e55(0x15b));return readResponseBytes(_0xd8fa3e,_0x228695[_0x380e55(0x194)]);});if(_0x24582c[_0x29b6bc(0x16d)]!==_0x228695['size'])throw new Error(_0x29b6bc(0x14b)+_0x228695[_0x29b6bc(0x194)]+_0x29b6bc(0x151)+_0x24582c[_0x29b6bc(0x16d)]+'.');_0xbc7e98?.(_0x29b6bc(0x154));const _0x447dec=_0x29b6bc(0x138)+createHash(_0x29b6bc(0x159))[_0x29b6bc(0x12a)](_0x24582c)[_0x29b6bc(0x18b)](_0x29b6bc(0x156));if(_0x447dec!==_0x228695['sha256'])throw new Error('CDN\x20project\x20template\x20checksum\x20verification\x20failed.');await a204_0x4a1f5d[_0x29b6bc(0x180)](_0x328348,_0x24582c,{'flag':'wx'});}async function assertTemplateRoot(_0x251a6d){const _0x3575ed=a204_0x8adde4,_0x4fdb6e=a204_0x3a59ec[_0x3575ed(0x150)](_0x251a6d,'package.json'),_0x1a510c=JSON[_0x3575ed(0x19b)](await a204_0x4a1f5d[_0x3575ed(0x19e)](_0x4fdb6e,_0x3575ed(0x19a)));if(!_0x1a510c||typeof _0x1a510c!=='object')throw new Error(_0x3575ed(0x17a));}const LOCAL_FORBIDDEN_NAMES=new Set([a204_0x8adde4(0x14c),a204_0x8adde4(0x183),a204_0x8adde4(0x193),a204_0x8adde4(0x1a0),a204_0x8adde4(0x162),a204_0x8adde4(0x13f),a204_0x8adde4(0x152),'.rabetbase.json',a204_0x8adde4(0x174),'node_modules']);function isForbiddenTemplateEntry(_0x312b1e){const _0x38a6f7=a204_0x8adde4;if(LOCAL_FORBIDDEN_NAMES[_0x38a6f7(0x167)](_0x312b1e))return!![];return _0x312b1e===_0x38a6f7(0x1a4)||_0x312b1e[_0x38a6f7(0x176)](_0x38a6f7(0x1a8))&&_0x312b1e!==_0x38a6f7(0x143);}function containsPath(_0x3ef75d,_0xfcad88){const _0x59bc18=a204_0x8adde4,_0x3493c1=a204_0x3a59ec['relative'](_0x3ef75d,_0xfcad88);return _0x3493c1===''||!_0x3493c1[_0x59bc18(0x176)]('..'+a204_0x3a59ec[_0x59bc18(0x182)])&&_0x3493c1!=='..'&&!a204_0x3a59ec[_0x59bc18(0x144)](_0x3493c1);}async function copyLocalTemplateDirectory(_0x5cf009,_0x3359a0){const _0x145e3c=a204_0x8adde4;await a204_0x4a1f5d['mkdir'](_0x3359a0,{'recursive':!![]});for(const _0x2e341b of await a204_0x4a1f5d[_0x145e3c(0x134)](_0x5cf009,{'withFileTypes':!![]})){const _0x3bdae1=a204_0x3a59ec[_0x145e3c(0x150)](_0x5cf009,_0x2e341b['name']),_0x557d92=a204_0x3a59ec['join'](_0x3359a0,_0x2e341b['name']);if(isForbiddenTemplateEntry(_0x2e341b[_0x145e3c(0x157)]))throw new Error(_0x145e3c(0x139)+_0x3bdae1);const _0x176341=await a204_0x4a1f5d[_0x145e3c(0x145)](_0x3bdae1);if(_0x176341[_0x145e3c(0x132)]())throw new Error('Local\x20project\x20template\x20must\x20not\x20contain\x20symlinks:\x20'+_0x3bdae1);if(_0x176341['isDirectory']()){await copyLocalTemplateDirectory(_0x3bdae1,_0x557d92);continue;}if(!_0x176341[_0x145e3c(0x189)]())continue;await a204_0x4a1f5d[_0x145e3c(0x153)](_0x3bdae1,_0x557d92),await a204_0x4a1f5d[_0x145e3c(0x130)](_0x557d92,_0x176341[_0x145e3c(0x137)]&0x1ff);}}async function readTemplateVersion(_0x555852){const _0x3d8cbf=a204_0x8adde4,_0x236a98=JSON[_0x3d8cbf(0x19b)](await a204_0x4a1f5d[_0x3d8cbf(0x19e)](a204_0x3a59ec[_0x3d8cbf(0x150)](_0x555852,_0x3d8cbf(0x141)),_0x3d8cbf(0x19a)));return nonEmptyString(_0x236a98[_0x3d8cbf(0x17c)])||_0x3d8cbf(0x199);}async function readDirectoryIdentity(_0x56b696){const _0x458ee9=a204_0x8adde4;try{const _0x5522b9=await a204_0x4a1f5d['lstat'](_0x56b696);if(!_0x5522b9[_0x458ee9(0x13d)]())return null;return{'dev':_0x5522b9[_0x458ee9(0x170)],'ino':_0x5522b9[_0x458ee9(0x1a6)]};}catch{return null;}}async function commitStagedProject(_0x16f65d,_0x51b7f0){const _0x1712f6=a204_0x8adde4;await a204_0x4a1f5d[_0x1712f6(0x163)](_0x51b7f0);const _0x549e69=await readDirectoryIdentity(_0x51b7f0);if(!_0x549e69)throw new Error(_0x1712f6(0x14f));try{for(const _0xa1cc47 of await a204_0x4a1f5d[_0x1712f6(0x134)](_0x16f65d)){await a204_0x4a1f5d[_0x1712f6(0x14e)](a204_0x3a59ec[_0x1712f6(0x150)](_0x16f65d,_0xa1cc47),a204_0x3a59ec[_0x1712f6(0x150)](_0x51b7f0,_0xa1cc47));}}catch(_0x335b34){const _0x476458=await readDirectoryIdentity(_0x51b7f0);_0x476458?.[_0x1712f6(0x170)]===_0x549e69[_0x1712f6(0x170)]&&_0x476458[_0x1712f6(0x1a6)]===_0x549e69[_0x1712f6(0x1a6)]&&await a204_0x4a1f5d['rm'](_0x51b7f0,{'recursive':!![],'force':!![]});throw _0x335b34;}}export async function materializeProjectTemplate(_0xbcbb90,_0x956600){const _0x4e1850=a204_0x8adde4,_0x2bf52b=a204_0x3a59ec[_0x4e1850(0x17d)](_0xbcbb90),_0x25c860=a204_0x3a59ec[_0x4e1850(0x149)](_0x2bf52b);try{await a204_0x4a1f5d['lstat'](_0x2bf52b);throw new Error(_0x4e1850(0x165)+_0x2bf52b);}catch(_0x2b6589){if(_0x2b6589['code']!==_0x4e1850(0x131))throw _0x2b6589;}const _0x35be46=await a204_0x4a1f5d[_0x4e1850(0x19f)](a204_0x3a59ec[_0x4e1850(0x150)](_0x25c860,_0x4e1850(0x190))),_0x23eb83=a204_0x3a59ec['join'](_0x35be46,_0x4e1850(0x15f)),_0xff4ef7=a204_0x3a59ec[_0x4e1850(0x150)](_0x35be46,_0x4e1850(0x12f));try{try{_0x956600?.(_0x4e1850(0x187));const {descriptor:_0x32c4d5,channel:_0xb7c364,assetBaseUrl:_0x2d0ea0,legacyAssetBaseUrl:_0x4b29ec}=await fetchTemplateDescriptor();return _0x956600?.(_0x4e1850(0x140)),await downloadArchive(_0x32c4d5,_0xb7c364,_0x2d0ea0,_0x4b29ec,_0xff4ef7,_0x956600),_0x956600?.(_0x4e1850(0x196)),await extractProjectTemplateArchive(_0xff4ef7,_0x23eb83),await assertTemplateRoot(_0x23eb83),await commitStagedProject(_0x23eb83,_0x2bf52b),{'source':'cdn','version':_0x32c4d5[_0x4e1850(0x17c)]};}catch(_0xd24419){if(_0xd24419[_0x4e1850(0x186)]===_0x4e1850(0x18c))throw CliErrors['validation'](_0x4e1850(0x165)+_0x2bf52b,'Use\x20a\x20different\x20project\x20name.');const _0x499476=_0xd24419 instanceof Error?_0xd24419[_0x4e1850(0x172)]:String(_0xd24419);throw CliErrors[_0x4e1850(0x192)](_0x4e1850(0x19d),_0x4e1850(0x18a)+_0x499476);}}finally{await a204_0x4a1f5d['rm'](_0x35be46,{'recursive':!![],'force':!![]});}}export async function materializeLocalProjectTemplate(_0x20fca8,_0x17496c,_0x4dc59f){const _0xd35821=a204_0x8adde4;let _0x3d1282;try{_0x3d1282=await a204_0x4a1f5d[_0xd35821(0x17e)](a204_0x3a59ec[_0xd35821(0x17d)](_0x20fca8));}catch{throw CliErrors[_0xd35821(0x192)](_0xd35821(0x14d)+a204_0x3a59ec[_0xd35821(0x17d)](_0x20fca8),'Pass\x20a\x20directory\x20containing\x20the\x20template\x20source\x20package.json.');}const _0x60ea09=await a204_0x4a1f5d['lstat'](_0x3d1282);if(!_0x60ea09[_0xd35821(0x13d)]())throw CliErrors[_0xd35821(0x192)](_0xd35821(0x18f)+_0x3d1282);const _0x238019=a204_0x3a59ec['resolve'](_0x17496c),_0x591d60=await a204_0x4a1f5d[_0xd35821(0x17e)](a204_0x3a59ec[_0xd35821(0x149)](_0x238019)),_0x3b2551=a204_0x3a59ec['join'](_0x591d60,a204_0x3a59ec['basename'](_0x238019));if(containsPath(_0x3d1282,_0x3b2551)||containsPath(_0x3b2551,_0x3d1282))throw CliErrors['validation'](_0xd35821(0x169),_0xd35821(0x197));try{await a204_0x4a1f5d[_0xd35821(0x145)](_0x3b2551);throw CliErrors['validation']('Project\x20directory\x20already\x20exists:\x20'+_0x3b2551,'Choose\x20a\x20different\x20project\x20name\x20or\x20remove\x20the\x20directory\x20first.');}catch(_0x51d330){if(_0x51d330['code']!==_0xd35821(0x131))throw _0x51d330;}const _0x32047b=a204_0x3a59ec[_0xd35821(0x149)](_0x3b2551);await a204_0x4a1f5d[_0xd35821(0x16f)](_0x32047b);const _0x3c709a=await a204_0x4a1f5d['mkdtemp'](a204_0x3a59ec[_0xd35821(0x150)](_0x32047b,_0xd35821(0x190))),_0x298b1c=a204_0x3a59ec['join'](_0x3c709a,'project');try{_0x4dc59f?.(_0xd35821(0x195)),await copyLocalTemplateDirectory(_0x3d1282,_0x298b1c),await assertTemplateRoot(_0x298b1c);const _0x5db1a=await readTemplateVersion(_0x298b1c);return await commitStagedProject(_0x298b1c,_0x3b2551),{'source':_0xd35821(0x199),'version':_0x5db1a};}catch(_0x58b16d){const _0x311376=_0x58b16d instanceof Error?_0x58b16d[_0xd35821(0x172)]:String(_0x58b16d);throw CliErrors[_0xd35821(0x192)]('Invalid\x20local\x20template\x20source:\x20'+_0x311376,'Check\x20the\x20source\x20directory\x20and\x20retry.');}finally{await a204_0x4a1f5d['rm'](_0x3c709a,{'recursive':!![],'force':!![]});}}
1
+ const a204_0x50b9cb=a204_0x3c6c;(function(_0x3bb164,_0x218b85){const _0x93c3d5=a204_0x3c6c,_0x278643=_0x3bb164();while(!![]){try{const _0xec7cda=-parseInt(_0x93c3d5(0x166))/0x1*(-parseInt(_0x93c3d5(0x19a))/0x2)+parseInt(_0x93c3d5(0x18c))/0x3*(-parseInt(_0x93c3d5(0x188))/0x4)+parseInt(_0x93c3d5(0x19d))/0x5+-parseInt(_0x93c3d5(0x145))/0x6*(-parseInt(_0x93c3d5(0x15b))/0x7)+parseInt(_0x93c3d5(0x16a))/0x8*(-parseInt(_0x93c3d5(0x18a))/0x9)+-parseInt(_0x93c3d5(0x150))/0xa+parseInt(_0x93c3d5(0x1b4))/0xb;if(_0xec7cda===_0x218b85)break;else _0x278643['push'](_0x278643['shift']());}catch(_0x2e1a60){_0x278643['push'](_0x278643['shift']());}}}(a204_0x321a,0xac5ca));import{createHash}from'node:crypto';import a204_0xaebcec from'node:fs/promises';import a204_0x2774ce from'node:path';import a204_0x2df993 from'semver';function a204_0x321a(){const _0x54b62d=['Use\x20a\x20different\x20project\x20name.','number','CDN\x20config\x20does\x20not\x20define\x20template\x20\x22','copyFile','cancel','verifying','package.json','from','update','.rabetbase','3474569boYjgD','CDN\x20project\x20template\x20relative\x20URL\x20must\x20match\x20its\x20release\x20channel\x20or\x20version.','dirname','CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.','ENOENT','readFile','message','Choose\x20an\x20output\x20directory\x20outside\x20the\x20template\x20source.','validation','.lovrabet.json','join','3asISYT','pathname','.git','valid','136RVuCNI','parse','sha256:','Local\x20project\x20template\x20contains\x20a\x20local-only\x20entry:\x20','release','template.zip','mode','protocol','utf8','get','dist','Invalid\x20local\x20template\x20source:\x20','code','byteLength','EEXIST','Local\x20template\x20source\x20does\x20not\x20exist:\x20','digest','push','resolving','string','.idea','lstat',',\x20received\x20','cdn','releaseLock','arrayBuffer','version','trim','CDN\x20project\x20template\x20checksum\x20verification\x20failed.','isDirectory','4776RWgHCB','Local\x20template\x20source\x20is\x20not\x20a\x20directory:\x20','511839nQWJCn','Local\x20template\x20source\x20and\x20project\x20output\x20must\x20not\x20overlap.','153HKjhRq','url','node_modules','signal','readdir','Check\x20your\x20network\x20and\x20retry.\x20Details:\x20','.DS_Store','project','Project\x20directory\x20already\x20exists:\x20','startsWith','mkdir','name','Unable\x20to\x20claim\x20the\x20project\x20directory.','headers','470342JUdHjR','content-length','downloading','2510350SAwhaN','posix','mkdtemp','access','abort','object','test','getReader','href','config','Project\x20template\x20package.json\x20is\x20invalid.','.codegraph','legacyAssetBaseUrl','copying','ino','application/zip','CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22','status','size','writeFile','Check\x20the\x20source\x20directory\x20and\x20retry.','realpath','toLowerCase','2991956klEEhj','local','basename','.env','https:','CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.','CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20','.rabetbase-create-','isFile','isSymbolicLink','extracting','sep','includes','Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','length','sha256','Local\x20project\x20template\x20must\x20not\x20contain\x20symlinks:\x20','6HQXztM','resolve','body','.env.','rename','concat','Choose\x20a\x20different\x20project\x20name\x20or\x20remove\x20the\x20directory\x20first.','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','has','dev','origin','2422510MgPPdy'];a204_0x321a=function(){return _0x54b62d;};return a204_0x321a();}import{getProjectTemplateRelativeUrl}from'../../../constant/cdn.js';import{extractProjectTemplateArchive}from'../../../commands/project/create/project-template-archive.js';import{fetchProjectTemplateCdnConfig,isBetaCliVersion,resolveProjectTemplateDescriptor}from'../../../utils/cli-version-policy.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';const TEMPLATE_ID='sub-app-react-demo',ARCHIVE_TIMEOUT_MS=0x3a98,MAX_ARCHIVE_SIZE=0x14*0x400*0x400;function nonEmptyString(_0x319ada){const _0x1f8512=a204_0x3c6c;return typeof _0x319ada===_0x1f8512(0x17d)&&_0x319ada[_0x1f8512(0x185)]()?_0x319ada[_0x1f8512(0x185)]():null;}function parseDescriptor(_0x59d03b){const _0x2fb3ce=a204_0x3c6c;if(!_0x59d03b||typeof _0x59d03b!==_0x2fb3ce(0x1a2))throw new Error(_0x2fb3ce(0x153)+TEMPLATE_ID+'\x22.');const _0x261f06=_0x59d03b,_0x555192=nonEmptyString(_0x261f06['version']),_0x7093c6=nonEmptyString(_0x261f06[_0x2fb3ce(0x197)]),_0x501309=_0x261f06[_0x2fb3ce(0x18d)]===undefined?undefined:nonEmptyString(_0x261f06[_0x2fb3ce(0x18d)])||undefined,_0x443c97=nonEmptyString(_0x261f06['sha256'])?.[_0x2fb3ce(0x1b3)](),_0x3076b1=_0x261f06[_0x2fb3ce(0x1af)];if(!_0x555192||!a204_0x2df993[_0x2fb3ce(0x169)](_0x555192)||!_0x7093c6||_0x7093c6!==a204_0x2774ce[_0x2fb3ce(0x19e)]['basename'](_0x7093c6)||_0x7093c6[_0x2fb3ce(0x140)]('\x5c')||_0x261f06[_0x2fb3ce(0x18d)]!==undefined&&!_0x501309||!_0x443c97||!/^sha256:[a-f0-9]{64}$/[_0x2fb3ce(0x1a3)](_0x443c97)||typeof _0x3076b1!==_0x2fb3ce(0x152)||!Number['isSafeInteger'](_0x3076b1)||_0x3076b1<=0x0||_0x3076b1>MAX_ARCHIVE_SIZE)throw new Error(_0x2fb3ce(0x1ad)+TEMPLATE_ID+'\x22.');return{'version':_0x555192,'name':_0x7093c6,'url':_0x501309,'sha256':_0x443c97,'size':_0x3076b1};}function a204_0x3c6c(_0x112d40,_0x40e1ed){_0x112d40=_0x112d40-0x139;const _0x321a08=a204_0x321a();let _0x3c6c15=_0x321a08[_0x112d40];return _0x3c6c15;}async function fetchWithTimeout(_0x30189f,_0x20f07c,_0x340aa6,_0x2c7cb6){const _0x501d7f=a204_0x3c6c,_0x135e12=new AbortController(),_0x1a69c8=setTimeout(()=>_0x135e12[_0x501d7f(0x1a1)](),_0x20f07c);try{const _0x3847ea=await fetch(_0x30189f,{'headers':{'Accept':_0x340aa6},'redirect':'error','signal':_0x135e12[_0x501d7f(0x18f)]});return await _0x2c7cb6(_0x3847ea);}finally{clearTimeout(_0x1a69c8);}}async function fetchTemplateDescriptor(){const _0x35957f=a204_0x3c6c,_0x1088b4=getCliVersion(),_0x43a7c8=isBetaCliVersion(_0x1088b4)?'beta':_0x35957f(0x16e),_0x170d65=await fetchProjectTemplateCdnConfig();if(!_0x170d65)throw new Error('Rabetbase\x20CDN\x20config\x20is\x20unavailable.');const _0x2f62cb=parseDescriptor(resolveProjectTemplateDescriptor(_0x170d65[_0x35957f(0x1a6)],_0x1088b4));return{'descriptor':_0x2f62cb,'channel':_0x43a7c8,'assetBaseUrl':_0x170d65['assetBaseUrl'],'legacyAssetBaseUrl':_0x170d65[_0x35957f(0x1a9)]};}function resolveArchiveUrl(_0x2df981,_0x46eab0,_0x488d50,_0x5855ac){const _0x7f157f=a204_0x3c6c,_0x1b5954=new URL(_0x488d50+'/'),_0x1d03c6=[getProjectTemplateRelativeUrl(_0x46eab0),getProjectTemplateRelativeUrl(_0x46eab0,_0x2df981['version'])];if(_0x2df981['url']&&!_0x1d03c6[_0x7f157f(0x140)](_0x2df981[_0x7f157f(0x18d)]))throw new Error(_0x7f157f(0x15c));const _0x1311fc=new URL(_0x5855ac+'/'),_0x5ee17e=_0x2df981[_0x7f157f(0x18d)]?new URL(_0x2df981[_0x7f157f(0x18d)],_0x1b5954[_0x7f157f(0x14f)]):new URL(_0x2df981[_0x7f157f(0x197)],_0x1311fc),_0x1d11fa=_0x2df981['url']?_0x1b5954[_0x7f157f(0x14f)]:_0x1311fc[_0x7f157f(0x14f)];if(_0x5ee17e[_0x7f157f(0x171)]!==_0x7f157f(0x1b8)||_0x5ee17e[_0x7f157f(0x14f)]!==_0x1d11fa||a204_0x2774ce[_0x7f157f(0x19e)][_0x7f157f(0x1b6)](decodeURIComponent(_0x5ee17e['pathname']))!==_0x2df981['name']||!_0x2df981[_0x7f157f(0x18d)]&&!_0x5ee17e[_0x7f157f(0x167)][_0x7f157f(0x195)](_0x1311fc['pathname']))throw new Error(_0x7f157f(0x139));return _0x5ee17e[_0x7f157f(0x1a5)];}async function readResponseBytes(_0x5d9d7f,_0x488702){const _0x125730=a204_0x3c6c;if(!_0x5d9d7f[_0x125730(0x147)]){const _0x5c0e18=Buffer['from'](await _0x5d9d7f[_0x125730(0x183)]());if(_0x5c0e18['length']>_0x488702)throw new Error(_0x125730(0x14c));return _0x5c0e18;}const _0x4a43ac=_0x5d9d7f[_0x125730(0x147)][_0x125730(0x1a4)](),_0x560f5d=[];let _0x136d9c=0x0;try{while(!![]){const {done:_0x386ba2,value:_0x326909}=await _0x4a43ac['read']();if(_0x386ba2)break;_0x136d9c+=_0x326909[_0x125730(0x177)];if(_0x136d9c>_0x488702){await _0x4a43ac[_0x125730(0x155)]();throw new Error(_0x125730(0x14c));}_0x560f5d[_0x125730(0x17b)](Buffer[_0x125730(0x158)](_0x326909));}}finally{_0x4a43ac[_0x125730(0x182)]();}return Buffer[_0x125730(0x14a)](_0x560f5d,_0x136d9c);}async function downloadArchive(_0x3da4d0,_0x3d563b,_0x2e191d,_0x13c36a,_0x407212,_0x22b4a9){const _0x76de6b=a204_0x3c6c,_0x1430c6=await fetchWithTimeout(resolveArchiveUrl(_0x3da4d0,_0x3d563b,_0x2e191d,_0x13c36a),ARCHIVE_TIMEOUT_MS,_0x76de6b(0x1ac),async _0x1c4adb=>{const _0x470548=_0x76de6b;if(!_0x1c4adb['ok'])throw new Error('CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20'+_0x1c4adb[_0x470548(0x1ae)]+'.');const _0x2fba4c=Number(_0x1c4adb[_0x470548(0x199)][_0x470548(0x173)](_0x470548(0x19b)));if(Number['isFinite'](_0x2fba4c)&&_0x2fba4c>MAX_ARCHIVE_SIZE)throw new Error(_0x470548(0x15e));return readResponseBytes(_0x1c4adb,_0x3da4d0[_0x470548(0x1af)]);});if(_0x1430c6[_0x76de6b(0x142)]!==_0x3da4d0[_0x76de6b(0x1af)])throw new Error(_0x76de6b(0x13a)+_0x3da4d0[_0x76de6b(0x1af)]+_0x76de6b(0x180)+_0x1430c6['length']+'.');_0x22b4a9?.(_0x76de6b(0x156));const _0x548f34=_0x76de6b(0x16c)+createHash(_0x76de6b(0x143))[_0x76de6b(0x159)](_0x1430c6)[_0x76de6b(0x17a)]('hex');if(_0x548f34!==_0x3da4d0[_0x76de6b(0x143)])throw new Error(_0x76de6b(0x186));await a204_0xaebcec[_0x76de6b(0x1b0)](_0x407212,_0x1430c6,{'flag':'wx'});}async function assertTemplateRoot(_0x42a7d0){const _0x93c675=a204_0x3c6c,_0x35aba3=a204_0x2774ce[_0x93c675(0x165)](_0x42a7d0,_0x93c675(0x157)),_0x1766f6=JSON[_0x93c675(0x16b)](await a204_0xaebcec[_0x93c675(0x160)](_0x35aba3,_0x93c675(0x172)));if(!_0x1766f6||typeof _0x1766f6!==_0x93c675(0x1a2))throw new Error(_0x93c675(0x1a7));}const LOCAL_FORBIDDEN_NAMES=new Set([a204_0x50b9cb(0x192),a204_0x50b9cb(0x1a8),a204_0x50b9cb(0x168),a204_0x50b9cb(0x17e),a204_0x50b9cb(0x164),'.lovrabet.log',a204_0x50b9cb(0x15a),'.rabetbase.json',a204_0x50b9cb(0x174),a204_0x50b9cb(0x18e)]);function isForbiddenTemplateEntry(_0x219e4d){const _0x2f7d65=a204_0x50b9cb;if(LOCAL_FORBIDDEN_NAMES[_0x2f7d65(0x14d)](_0x219e4d))return!![];return _0x219e4d===_0x2f7d65(0x1b7)||_0x219e4d[_0x2f7d65(0x195)](_0x2f7d65(0x148))&&_0x219e4d!=='.env.example';}function containsPath(_0x180f65,_0x557b37){const _0x287a21=a204_0x50b9cb,_0x36a927=a204_0x2774ce['relative'](_0x180f65,_0x557b37);return _0x36a927===''||!_0x36a927['startsWith']('..'+a204_0x2774ce[_0x287a21(0x13f)])&&_0x36a927!=='..'&&!a204_0x2774ce['isAbsolute'](_0x36a927);}async function copyLocalTemplateDirectory(_0x5ce760,_0x4a25a4){const _0x51e518=a204_0x50b9cb;await a204_0xaebcec[_0x51e518(0x196)](_0x4a25a4,{'recursive':!![]});for(const _0x315189 of await a204_0xaebcec[_0x51e518(0x190)](_0x5ce760,{'withFileTypes':!![]})){const _0x16d823=a204_0x2774ce['join'](_0x5ce760,_0x315189['name']),_0xf7d41f=a204_0x2774ce['join'](_0x4a25a4,_0x315189[_0x51e518(0x197)]);if(isForbiddenTemplateEntry(_0x315189[_0x51e518(0x197)]))throw new Error(_0x51e518(0x16d)+_0x16d823);const _0x574af5=await a204_0xaebcec[_0x51e518(0x17f)](_0x16d823);if(_0x574af5[_0x51e518(0x13d)]())throw new Error(_0x51e518(0x144)+_0x16d823);if(_0x574af5[_0x51e518(0x187)]()){await copyLocalTemplateDirectory(_0x16d823,_0xf7d41f);continue;}if(!_0x574af5[_0x51e518(0x13c)]())continue;await a204_0xaebcec[_0x51e518(0x154)](_0x16d823,_0xf7d41f),await a204_0xaebcec['chmod'](_0xf7d41f,_0x574af5[_0x51e518(0x170)]&0x1ff);}}async function readTemplateVersion(_0x351b67){const _0x252025=a204_0x50b9cb,_0x5304c0=JSON['parse'](await a204_0xaebcec['readFile'](a204_0x2774ce[_0x252025(0x165)](_0x351b67,_0x252025(0x157)),_0x252025(0x172)));return nonEmptyString(_0x5304c0[_0x252025(0x184)])||_0x252025(0x1b5);}async function readDirectoryIdentity(_0x33a011){const _0x34052a=a204_0x50b9cb;try{const _0x124f5d=await a204_0xaebcec[_0x34052a(0x17f)](_0x33a011);if(!_0x124f5d[_0x34052a(0x187)]())return null;return{'dev':_0x124f5d[_0x34052a(0x14e)],'ino':_0x124f5d[_0x34052a(0x1ab)]};}catch{return null;}}async function commitStagedProject(_0x33f2d8,_0x463ade){const _0x2cd57d=a204_0x50b9cb;await a204_0xaebcec[_0x2cd57d(0x196)](_0x463ade);const _0x2eb2c4=await readDirectoryIdentity(_0x463ade);if(!_0x2eb2c4)throw new Error(_0x2cd57d(0x198));try{for(const _0x11829a of await a204_0xaebcec[_0x2cd57d(0x190)](_0x33f2d8)){await a204_0xaebcec[_0x2cd57d(0x149)](a204_0x2774ce[_0x2cd57d(0x165)](_0x33f2d8,_0x11829a),a204_0x2774ce[_0x2cd57d(0x165)](_0x463ade,_0x11829a));}}catch(_0x22bf44){const _0x5d487a=await readDirectoryIdentity(_0x463ade);_0x5d487a?.['dev']===_0x2eb2c4[_0x2cd57d(0x14e)]&&_0x5d487a['ino']===_0x2eb2c4[_0x2cd57d(0x1ab)]&&await a204_0xaebcec['rm'](_0x463ade,{'recursive':!![],'force':!![]});throw _0x22bf44;}}export async function materializeProjectTemplate(_0x4fcbb0,_0x1eadf0){const _0x426ddd=a204_0x50b9cb,_0x245e96=a204_0x2774ce[_0x426ddd(0x146)](_0x4fcbb0),_0x2c4608=a204_0x2774ce[_0x426ddd(0x15d)](_0x245e96);try{await a204_0xaebcec[_0x426ddd(0x17f)](_0x245e96);throw new Error(_0x426ddd(0x194)+_0x245e96);}catch(_0x3f1315){if(_0x3f1315[_0x426ddd(0x176)]!==_0x426ddd(0x15f))throw _0x3f1315;}const _0x452082=await a204_0xaebcec[_0x426ddd(0x19f)](a204_0x2774ce[_0x426ddd(0x165)](_0x2c4608,_0x426ddd(0x13b))),_0x223700=a204_0x2774ce[_0x426ddd(0x165)](_0x452082,_0x426ddd(0x193)),_0x5c350f=a204_0x2774ce['join'](_0x452082,_0x426ddd(0x16f));try{try{_0x1eadf0?.(_0x426ddd(0x17c));const {descriptor:_0x32d10b,channel:_0x5edefb,assetBaseUrl:_0x2d59e9,legacyAssetBaseUrl:_0x739269}=await fetchTemplateDescriptor();return _0x1eadf0?.(_0x426ddd(0x19c)),await downloadArchive(_0x32d10b,_0x5edefb,_0x2d59e9,_0x739269,_0x5c350f,_0x1eadf0),_0x1eadf0?.(_0x426ddd(0x13e)),await extractProjectTemplateArchive(_0x5c350f,_0x223700),await assertTemplateRoot(_0x223700),await commitStagedProject(_0x223700,_0x245e96),{'source':_0x426ddd(0x181),'version':_0x32d10b[_0x426ddd(0x184)]};}catch(_0x52fbb8){if(_0x52fbb8[_0x426ddd(0x176)]===_0x426ddd(0x178))throw CliErrors[_0x426ddd(0x163)](_0x426ddd(0x194)+_0x245e96,_0x426ddd(0x151));const _0x3a526c=_0x52fbb8 instanceof Error?_0x52fbb8[_0x426ddd(0x161)]:String(_0x52fbb8);throw CliErrors[_0x426ddd(0x163)](_0x426ddd(0x141),_0x426ddd(0x191)+_0x3a526c);}}finally{await a204_0xaebcec['rm'](_0x452082,{'recursive':!![],'force':!![]});}}export async function materializeLocalProjectTemplate(_0x27ce0a,_0x5b68de,_0x380b06){const _0x204415=a204_0x50b9cb;let _0x4d434a;try{_0x4d434a=await a204_0xaebcec[_0x204415(0x1b2)](a204_0x2774ce[_0x204415(0x146)](_0x27ce0a));}catch{throw CliErrors[_0x204415(0x163)](_0x204415(0x179)+a204_0x2774ce[_0x204415(0x146)](_0x27ce0a),'Pass\x20a\x20directory\x20containing\x20the\x20template\x20source\x20package.json.');}const _0x59d327=await a204_0xaebcec[_0x204415(0x17f)](_0x4d434a);if(!_0x59d327['isDirectory']())throw CliErrors[_0x204415(0x163)](_0x204415(0x189)+_0x4d434a);const _0x592017=a204_0x2774ce['resolve'](_0x5b68de),_0x32a88d=await a204_0xaebcec[_0x204415(0x1b2)](a204_0x2774ce[_0x204415(0x15d)](_0x592017)),_0x12d238=a204_0x2774ce[_0x204415(0x165)](_0x32a88d,a204_0x2774ce[_0x204415(0x1b6)](_0x592017));if(containsPath(_0x4d434a,_0x12d238)||containsPath(_0x12d238,_0x4d434a))throw CliErrors[_0x204415(0x163)](_0x204415(0x18b),_0x204415(0x162));try{await a204_0xaebcec[_0x204415(0x17f)](_0x12d238);throw CliErrors['validation'](_0x204415(0x194)+_0x12d238,_0x204415(0x14b));}catch(_0x3257dc){if(_0x3257dc['code']!==_0x204415(0x15f))throw _0x3257dc;}const _0x424e1f=a204_0x2774ce[_0x204415(0x15d)](_0x12d238);await a204_0xaebcec[_0x204415(0x1a0)](_0x424e1f);const _0x1c4d10=await a204_0xaebcec['mkdtemp'](a204_0x2774ce[_0x204415(0x165)](_0x424e1f,_0x204415(0x13b))),_0x25956a=a204_0x2774ce[_0x204415(0x165)](_0x1c4d10,_0x204415(0x193));try{_0x380b06?.(_0x204415(0x1aa)),await copyLocalTemplateDirectory(_0x4d434a,_0x25956a),await assertTemplateRoot(_0x25956a);const _0x550d49=await readTemplateVersion(_0x25956a);return await commitStagedProject(_0x25956a,_0x12d238),{'source':_0x204415(0x1b5),'version':_0x550d49};}catch(_0x44456b){const _0x516368=_0x44456b instanceof Error?_0x44456b[_0x204415(0x161)]:String(_0x44456b);throw CliErrors[_0x204415(0x163)](_0x204415(0x175)+_0x516368,_0x204415(0x1b1));}finally{await a204_0xaebcec['rm'](_0x1c4d10,{'recursive':!![],'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0x340df1,_0x54fe90){const _0x143ae4=a205_0x5332,_0x4c930e=_0x340df1();while(!![]){try{const _0x3f0346=parseInt(_0x143ae4(0x17a))/0x1*(-parseInt(_0x143ae4(0x169))/0x2)+-parseInt(_0x143ae4(0x170))/0x3+-parseInt(_0x143ae4(0x16b))/0x4+-parseInt(_0x143ae4(0x16e))/0x5*(parseInt(_0x143ae4(0x172))/0x6)+parseInt(_0x143ae4(0x179))/0x7*(parseInt(_0x143ae4(0x176))/0x8)+parseInt(_0x143ae4(0x16d))/0x9*(-parseInt(_0x143ae4(0x173))/0xa)+parseInt(_0x143ae4(0x17c))/0xb;if(_0x3f0346===_0x54fe90)break;else _0x4c930e['push'](_0x4c930e['shift']());}catch(_0x5193e3){_0x4c930e['push'](_0x4c930e['shift']());}}}(a205_0x28d6,0xce3c2));import{CliErrors}from'../../../errors.js';function a205_0x5332(_0x15efe5,_0x40171a){_0x15efe5=_0x15efe5-0x169;const _0x28d6ea=a205_0x28d6();let _0x533296=_0x28d6ea[_0x15efe5];return _0x533296;}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(_0x1bac1a){const _0x59fd99=a205_0x5332,_0xad49cb=_0x1bac1a['trim']();if(!_0xad49cb)return _0x59fd99(0x16a);if(_0xad49cb[_0x59fd99(0x16f)]>MAX_PROJECT_NAME_LENGTH)return _0x59fd99(0x177)+MAX_PROJECT_NAME_LENGTH+_0x59fd99(0x174);if(!PROJECT_NAME_PATTERN[_0x59fd99(0x175)](_0xad49cb))return _0x59fd99(0x16c);if(WINDOWS_RESERVED_NAME['test'](_0xad49cb))return'Project\x20name\x20\x22'+_0xad49cb+_0x59fd99(0x178);return null;}function a205_0x28d6(){const _0x37d0f8=['trim','6daOXkz','1690geAjMj','\x20characters','test','5608SnwjET','Project\x20name\x20cannot\x20exceed\x20','\x22\x20is\x20reserved\x20on\x20Windows','1918dXxLzt','638665HCHWwC','validation','59333285FnRpvl','2SHGDNk','Project\x20name\x20cannot\x20be\x20empty','6726724WVHsey','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','74583lPAfqG','4688985EJBXFr','length','247875jHeRqn'];a205_0x28d6=function(){return _0x37d0f8;};return a205_0x28d6();}export function validateProjectName(_0x19ec0d){const _0x4fc747=a205_0x5332,_0x7d4612=_0x19ec0d[_0x4fc747(0x171)](),_0x4095e6=getProjectNameValidationError(_0x7d4612);if(_0x4095e6)throw CliErrors[_0x4fc747(0x17b)](_0x4095e6,'Use\x20a\x20portable\x20directory\x20name\x20without\x20path\x20separators.');return _0x7d4612;}
1
+ (function(_0x496c92,_0x5c576c){const _0x532cb8=a205_0x4b30,_0x18ac23=_0x496c92();while(!![]){try{const _0x46937a=parseInt(_0x532cb8(0x1dd))/0x1*(parseInt(_0x532cb8(0x1e2))/0x2)+parseInt(_0x532cb8(0x1d7))/0x3*(parseInt(_0x532cb8(0x1d8))/0x4)+-parseInt(_0x532cb8(0x1e5))/0x5+-parseInt(_0x532cb8(0x1e0))/0x6+parseInt(_0x532cb8(0x1d6))/0x7+-parseInt(_0x532cb8(0x1e6))/0x8*(parseInt(_0x532cb8(0x1d3))/0x9)+-parseInt(_0x532cb8(0x1df))/0xa*(-parseInt(_0x532cb8(0x1d5))/0xb);if(_0x46937a===_0x5c576c)break;else _0x18ac23['push'](_0x18ac23['shift']());}catch(_0x2ed28d){_0x18ac23['push'](_0x18ac23['shift']());}}}(a205_0x48de,0xc6c6e));function a205_0x4b30(_0x5802ec,_0x3c82bd){_0x5802ec=_0x5802ec-0x1d2;const _0x48de60=a205_0x48de();let _0x4b307d=_0x48de60[_0x5802ec];return _0x4b307d;}import{CliErrors}from'../../../errors.js';const PROJECT_NAME_PATTERN=/^[A-Za-z0-9][A-Za-z0-9_-]*$/,WINDOWS_RESERVED_NAME=/^(con|prn|aux|nul|com[1-9]|lpt[1-9])$/i,MAX_PROJECT_NAME_LENGTH=0x64;export function getProjectNameValidationError(_0x451183){const _0x183b6f=a205_0x4b30,_0x112cd1=_0x451183[_0x183b6f(0x1e3)]();if(!_0x112cd1)return _0x183b6f(0x1d4);if(_0x112cd1[_0x183b6f(0x1d9)]>MAX_PROJECT_NAME_LENGTH)return _0x183b6f(0x1dc)+MAX_PROJECT_NAME_LENGTH+_0x183b6f(0x1db);if(!PROJECT_NAME_PATTERN[_0x183b6f(0x1e1)](_0x112cd1))return _0x183b6f(0x1da);if(WINDOWS_RESERVED_NAME['test'](_0x112cd1))return _0x183b6f(0x1de)+_0x112cd1+_0x183b6f(0x1d2);return null;}export function validateProjectName(_0x5b60ab){const _0x3a5b32=a205_0x4b30,_0x594101=_0x5b60ab[_0x3a5b32(0x1e3)](),_0x3ff883=getProjectNameValidationError(_0x594101);if(_0x3ff883)throw CliErrors[_0x3a5b32(0x1e4)](_0x3ff883,'Use\x20a\x20portable\x20directory\x20name\x20without\x20path\x20separators.');return _0x594101;}function a205_0x48de(){const _0x2cf044=['41rFPLlB','Project\x20name\x20\x22','2260YgkLfM','4481220UipeuR','test','44116XFxBkv','trim','validation','5815770FFncgt','959176JqOtfd','\x22\x20is\x20reserved\x20on\x20Windows','117QoXLAK','Project\x20name\x20cannot\x20be\x20empty','62458UDrDEC','10505439ToZDHn','36aawmEw','198164cBFSzY','length','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','\x20characters','Project\x20name\x20cannot\x20exceed\x20'];a205_0x48de=function(){return _0x2cf044;};return a205_0x48de();}
@@ -1 +1 @@
1
- (function(_0x1f21a9,_0x6b2572){const _0x40ad97=a206_0x3757,_0x2bd566=_0x1f21a9();while(!![]){try{const _0x14b6a5=-parseInt(_0x40ad97(0x10a))/0x1+parseInt(_0x40ad97(0x120))/0x2*(parseInt(_0x40ad97(0x10d))/0x3)+-parseInt(_0x40ad97(0x116))/0x4*(parseInt(_0x40ad97(0x117))/0x5)+parseInt(_0x40ad97(0x10e))/0x6*(parseInt(_0x40ad97(0x12c))/0x7)+-parseInt(_0x40ad97(0x11e))/0x8+-parseInt(_0x40ad97(0x118))/0x9*(parseInt(_0x40ad97(0x126))/0xa)+-parseInt(_0x40ad97(0x127))/0xb*(-parseInt(_0x40ad97(0x125))/0xc);if(_0x14b6a5===_0x6b2572)break;else _0x2bd566['push'](_0x2bd566['shift']());}catch(_0x7a51a5){_0x2bd566['push'](_0x2bd566['shift']());}}}(a206_0x1404,0x49522));import{createWriteStream}from'node:fs';import a206_0xcb203d from'node:fs/promises';import a206_0x3a696a from'node:path';function a206_0x1404(){const _0x187e63=['18mFQaiU','ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20','mkdir','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.','externalFileAttributes','sep','2143328KstBjv','Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20','2nhBeTV','\x20entries.','dirname','Project\x20template\x20ZIP\x20exceeds\x20','en-US','1163604slMtEZ','2880180mTNoCT','143HKoVqA','get','length','catch','has','98lOgtto','open','slice','split','readEntry','once','test','join','close','Case-conflicting\x20ZIP\x20entry\x20path:\x20','endsWith','Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20','resolve','toLocaleLowerCase','startsWith','61152aCMkLD','isEncrypted','Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20','38382gAFKOt','20478GTmkdF','set','Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20','error','fileName','replace','add','Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20','462884zetZkP','5VyrwuJ'];a206_0x1404=function(){return _0x187e63;};return a206_0x1404();}import{pipeline}from'node:stream/promises';import a206_0xbce24d 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(_0x435fce){return new Promise((_0x5bf662,_0x57506a)=>{const _0x41e8b2=a206_0x3757;a206_0xbce24d[_0x41e8b2(0x12d)](_0x435fce,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x4f7b00,_0x342968)=>{if(_0x4f7b00||!_0x342968){_0x57506a(_0x4f7b00||new Error('Unable\x20to\x20open\x20project\x20template\x20archive.'));return;}_0x5bf662(_0x342968);});});}function openEntryStream(_0x59f7f3,_0x295c17){return new Promise((_0x4478f0,_0x339336)=>{_0x59f7f3['openReadStream'](_0x295c17,(_0x49d883,_0x5c1f16)=>{const _0x461d59=a206_0x3757;if(_0x49d883||!_0x5c1f16){_0x339336(_0x49d883||new Error('Unable\x20to\x20read\x20ZIP\x20entry:\x20'+_0x295c17[_0x461d59(0x112)]));return;}_0x4478f0(_0x5c1f16);});});}function a206_0x3757(_0x2f4b26,_0x2f625f){_0x2f4b26=_0x2f4b26-0x100;const _0x1404b3=a206_0x1404();let _0x3757db=_0x1404b3[_0x2f4b26];return _0x3757db;}function validateEntryPath(_0x4668dd){const _0x2e871b=a206_0x3757,_0x4da3e0=_0x4668dd[_0x2e871b(0x113)](/\\/g,'/'),_0x1eddb0=_0x4da3e0[_0x2e871b(0x105)]('/'),_0x4b3a5c=_0x1eddb0?_0x4da3e0['slice'](0x0,-0x1):_0x4da3e0;if(!_0x4b3a5c||_0x4da3e0[_0x2e871b(0x109)]('/')||/^[A-Za-z]:\//[_0x2e871b(0x101)](_0x4da3e0))throw new Error(_0x2e871b(0x106)+_0x4668dd);const _0x25dd8b=_0x4b3a5c[_0x2e871b(0x12f)]('/');for(const _0x5e82c0 of _0x25dd8b){if(!_0x5e82c0||_0x5e82c0==='.'||_0x5e82c0==='..'||_0x5e82c0[_0x2e871b(0x105)]('.')||_0x5e82c0[_0x2e871b(0x105)]('\x20')||WINDOWS_INVALID_CHAR[_0x2e871b(0x101)](_0x5e82c0)||WINDOWS_RESERVED_NAME['test'](_0x5e82c0))throw new Error(_0x2e871b(0x11f)+_0x4668dd);}return{'relativePath':_0x25dd8b[_0x2e871b(0x102)](a206_0x3a696a['sep']),'directory':_0x1eddb0};}function isSymbolicLink(_0x409946){const _0x28bbd2=a206_0x3757,_0x7c41fe=_0x409946[_0x28bbd2(0x11c)]>>>0x10&0xffff;return(_0x7c41fe&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0x4b835e,_0x593f34){const _0x45982d=a206_0x3757,_0x2c6814=await openZip(_0x4b835e),_0x261e9e=a206_0x3a696a[_0x45982d(0x107)](_0x593f34),_0x3b44ab=new Set(),_0x225769=new Map();let _0x315018=0x0,_0xf6a6fd=0x0;await a206_0xcb203d[_0x45982d(0x11a)](_0x261e9e,{'recursive':!![]}),await new Promise((_0x2aa9ab,_0x7f79ce)=>{const _0x131d3b=_0x45982d;let _0x370730=![];const _0x336502=_0x1cdfec=>{const _0x3066bc=a206_0x3757;if(_0x370730)return;_0x370730=!![],_0x2c6814[_0x3066bc(0x103)](),_0x7f79ce(_0x1cdfec instanceof Error?_0x1cdfec:new Error(String(_0x1cdfec)));};_0x2c6814[_0x131d3b(0x100)](_0x131d3b(0x111),_0x336502),_0x2c6814['once']('end',()=>{if(_0x370730)return;_0x370730=!![],_0x2aa9ab();}),_0x2c6814['on']('entry',_0x449d2c=>{const _0xdfdff6=_0x131d3b;void(async()=>{const _0x4a551a=a206_0x3757;_0x315018+=0x1,_0xf6a6fd+=_0x449d2c['uncompressedSize'];if(_0x315018>MAX_ENTRY_COUNT)throw new Error(_0x4a551a(0x123)+MAX_ENTRY_COUNT+_0x4a551a(0x121));if(_0xf6a6fd>MAX_UNCOMPRESSED_SIZE)throw new Error(_0x4a551a(0x11b));if(_0x449d2c[_0x4a551a(0x10b)]())throw new Error(_0x4a551a(0x115)+_0x449d2c['fileName']);if(isSymbolicLink(_0x449d2c))throw new Error(_0x4a551a(0x110)+_0x449d2c[_0x4a551a(0x112)]);const {relativePath:_0x4c8c49,directory:_0x597d55}=validateEntryPath(_0x449d2c[_0x4a551a(0x112)]),_0x131cb8=_0x4c8c49[_0x4a551a(0x12f)](a206_0x3a696a[_0x4a551a(0x11d)]);for(let _0x27491f=0x1;_0x27491f<=_0x131cb8[_0x4a551a(0x129)];_0x27491f+=0x1){const _0x36eba3=_0x131cb8[_0x4a551a(0x12e)](0x0,_0x27491f)[_0x4a551a(0x102)](a206_0x3a696a[_0x4a551a(0x11d)]),_0x5f1cf5=_0x36eba3[_0x4a551a(0x108)](_0x4a551a(0x124)),_0x17c83c=_0x225769[_0x4a551a(0x128)](_0x5f1cf5);if(_0x17c83c&&_0x17c83c!==_0x36eba3)throw new Error(_0x4a551a(0x104)+_0x449d2c['fileName']);_0x225769[_0x4a551a(0x10f)](_0x5f1cf5,_0x36eba3);}const _0x330c99=_0x4c8c49[_0x4a551a(0x108)](_0x4a551a(0x124));if(_0x3b44ab[_0x4a551a(0x12b)](_0x330c99))throw new Error(_0x4a551a(0x10c)+_0x449d2c[_0x4a551a(0x112)]);_0x3b44ab[_0x4a551a(0x114)](_0x330c99);const _0x1b7ad2=a206_0x3a696a['resolve'](_0x261e9e,_0x4c8c49);if(_0x1b7ad2!==_0x261e9e&&!_0x1b7ad2['startsWith'](''+_0x261e9e+a206_0x3a696a['sep']))throw new Error(_0x4a551a(0x119)+_0x449d2c[_0x4a551a(0x112)]);if(_0x597d55)await a206_0xcb203d[_0x4a551a(0x11a)](_0x1b7ad2,{'recursive':!![]});else{await a206_0xcb203d[_0x4a551a(0x11a)](a206_0x3a696a[_0x4a551a(0x122)](_0x1b7ad2),{'recursive':!![]});const _0x6e1487=await openEntryStream(_0x2c6814,_0x449d2c);await pipeline(_0x6e1487,createWriteStream(_0x1b7ad2,{'flags':'wx','mode':0x1a4}));}_0x2c6814[_0x4a551a(0x130)]();})()[_0xdfdff6(0x12a)](_0x336502);}),_0x2c6814[_0x131d3b(0x130)]();});}
1
+ (function(_0x468986,_0x46bbc3){const _0x51b4e0=a206_0x23b3,_0x39c2f7=_0x468986();while(!![]){try{const _0x4c095b=parseInt(_0x51b4e0(0x1aa))/0x1+parseInt(_0x51b4e0(0x1c5))/0x2*(parseInt(_0x51b4e0(0x1a8))/0x3)+-parseInt(_0x51b4e0(0x1c3))/0x4*(-parseInt(_0x51b4e0(0x1bd))/0x5)+parseInt(_0x51b4e0(0x1c6))/0x6+-parseInt(_0x51b4e0(0x1b1))/0x7*(-parseInt(_0x51b4e0(0x1ab))/0x8)+parseInt(_0x51b4e0(0x1bb))/0x9*(parseInt(_0x51b4e0(0x1c1))/0xa)+parseInt(_0x51b4e0(0x1a9))/0xb*(-parseInt(_0x51b4e0(0x1a1))/0xc);if(_0x4c095b===_0x46bbc3)break;else _0x39c2f7['push'](_0x39c2f7['shift']());}catch(_0x42ec5f){_0x39c2f7['push'](_0x39c2f7['shift']());}}}(a206_0x2292,0x5e661));import{createWriteStream}from'node:fs';function a206_0x2292(){const _0x34c849=['1028WRReNN','1759518JahBZp','open','has','openReadStream','set','toLocaleLowerCase','isEncrypted','23828868OEfkFG','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.','Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20','join','Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20','uncompressedSize','error','888bZgZfs','11HLWcwZ','482259OTVXAV','8awMJVo','add','slice','Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20','mkdir','get','5107774dcseYc','Unable\x20to\x20open\x20project\x20template\x20archive.','endsWith','end','resolve','ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20','fileName','once','length','sep','18laerBK','en-US','15JFqAbW','split','replace','test','1570180XtdUlV','readEntry','534696TOFGsN','close'];a206_0x2292=function(){return _0x34c849;};return a206_0x2292();}import a206_0x2cadf5 from'node:fs/promises';function a206_0x23b3(_0xe9442a,_0x3291ab){_0xe9442a=_0xe9442a-0x19b;const _0x2292d7=a206_0x2292();let _0x23b331=_0x2292d7[_0xe9442a];return _0x23b331;}import a206_0x6eec7f from'node:path';import{pipeline}from'node:stream/promises';import a206_0x36453a 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(_0x4ca2c4){return new Promise((_0x52ebfb,_0x48bf73)=>{const _0x1b2c42=a206_0x23b3;a206_0x36453a[_0x1b2c42(0x19b)](_0x4ca2c4,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x3e2b71,_0x301cdc)=>{const _0x1d1dcc=_0x1b2c42;if(_0x3e2b71||!_0x301cdc){_0x48bf73(_0x3e2b71||new Error(_0x1d1dcc(0x1b2)));return;}_0x52ebfb(_0x301cdc);});});}function openEntryStream(_0x316586,_0x2eae25){return new Promise((_0x5ae621,_0x275a5c)=>{const _0x3c209f=a206_0x23b3;_0x316586[_0x3c209f(0x19d)](_0x2eae25,(_0x567fcf,_0x2237d2)=>{const _0x8369c4=_0x3c209f;if(_0x567fcf||!_0x2237d2){_0x275a5c(_0x567fcf||new Error('Unable\x20to\x20read\x20ZIP\x20entry:\x20'+_0x2eae25[_0x8369c4(0x1b7)]));return;}_0x5ae621(_0x2237d2);});});}function validateEntryPath(_0x28ccfc){const _0x5dab0b=a206_0x23b3,_0x2eb26f=_0x28ccfc[_0x5dab0b(0x1bf)](/\\/g,'/'),_0xf8a137=_0x2eb26f[_0x5dab0b(0x1b3)]('/'),_0x374282=_0xf8a137?_0x2eb26f['slice'](0x0,-0x1):_0x2eb26f;if(!_0x374282||_0x2eb26f['startsWith']('/')||/^[A-Za-z]:\//[_0x5dab0b(0x1c0)](_0x2eb26f))throw new Error(_0x5dab0b(0x1a3)+_0x28ccfc);const _0xeb0928=_0x374282[_0x5dab0b(0x1be)]('/');for(const _0x4201c7 of _0xeb0928){if(!_0x4201c7||_0x4201c7==='.'||_0x4201c7==='..'||_0x4201c7[_0x5dab0b(0x1b3)]('.')||_0x4201c7['endsWith']('\x20')||WINDOWS_INVALID_CHAR[_0x5dab0b(0x1c0)](_0x4201c7)||WINDOWS_RESERVED_NAME['test'](_0x4201c7))throw new Error('Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20'+_0x28ccfc);}return{'relativePath':_0xeb0928['join'](a206_0x6eec7f[_0x5dab0b(0x1ba)]),'directory':_0xf8a137};}function isSymbolicLink(_0x173f02){const _0x53fb90=_0x173f02['externalFileAttributes']>>>0x10&0xffff;return(_0x53fb90&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0x543432,_0x402b8c){const _0x543a59=a206_0x23b3,_0x35ba34=await openZip(_0x543432),_0x78b62e=a206_0x6eec7f['resolve'](_0x402b8c),_0x5e4aa4=new Set(),_0x587762=new Map();let _0x31d9ac=0x0,_0x5d73cd=0x0;await a206_0x2cadf5[_0x543a59(0x1af)](_0x78b62e,{'recursive':!![]}),await new Promise((_0x426764,_0x33c7e4)=>{const _0x328797=_0x543a59;let _0x40fbd6=![];const _0x14ccfb=_0x2b2f3e=>{const _0x2daa84=a206_0x23b3;if(_0x40fbd6)return;_0x40fbd6=!![],_0x35ba34[_0x2daa84(0x1c4)](),_0x33c7e4(_0x2b2f3e instanceof Error?_0x2b2f3e:new Error(String(_0x2b2f3e)));};_0x35ba34['once'](_0x328797(0x1a7),_0x14ccfb),_0x35ba34[_0x328797(0x1b8)](_0x328797(0x1b4),()=>{if(_0x40fbd6)return;_0x40fbd6=!![],_0x426764();}),_0x35ba34['on']('entry',_0x59fc63=>{void(async()=>{const _0x4bbd95=a206_0x23b3;_0x31d9ac+=0x1,_0x5d73cd+=_0x59fc63[_0x4bbd95(0x1a6)];if(_0x31d9ac>MAX_ENTRY_COUNT)throw new Error('Project\x20template\x20ZIP\x20exceeds\x20'+MAX_ENTRY_COUNT+'\x20entries.');if(_0x5d73cd>MAX_UNCOMPRESSED_SIZE)throw new Error(_0x4bbd95(0x1a2));if(_0x59fc63[_0x4bbd95(0x1a0)]())throw new Error(_0x4bbd95(0x1a5)+_0x59fc63[_0x4bbd95(0x1b7)]);if(isSymbolicLink(_0x59fc63))throw new Error(_0x4bbd95(0x1ae)+_0x59fc63[_0x4bbd95(0x1b7)]);const {relativePath:_0x5cd075,directory:_0x10033f}=validateEntryPath(_0x59fc63['fileName']),_0x26b704=_0x5cd075[_0x4bbd95(0x1be)](a206_0x6eec7f[_0x4bbd95(0x1ba)]);for(let _0x39fff8=0x1;_0x39fff8<=_0x26b704[_0x4bbd95(0x1b9)];_0x39fff8+=0x1){const _0x49bca1=_0x26b704[_0x4bbd95(0x1ad)](0x0,_0x39fff8)[_0x4bbd95(0x1a4)](a206_0x6eec7f[_0x4bbd95(0x1ba)]),_0x3d6be0=_0x49bca1[_0x4bbd95(0x19f)](_0x4bbd95(0x1bc)),_0x16037f=_0x587762[_0x4bbd95(0x1b0)](_0x3d6be0);if(_0x16037f&&_0x16037f!==_0x49bca1)throw new Error('Case-conflicting\x20ZIP\x20entry\x20path:\x20'+_0x59fc63['fileName']);_0x587762[_0x4bbd95(0x19e)](_0x3d6be0,_0x49bca1);}const _0x12b2e4=_0x5cd075['toLocaleLowerCase'](_0x4bbd95(0x1bc));if(_0x5e4aa4[_0x4bbd95(0x19c)](_0x12b2e4))throw new Error('Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20'+_0x59fc63[_0x4bbd95(0x1b7)]);_0x5e4aa4[_0x4bbd95(0x1ac)](_0x12b2e4);const _0x525d4e=a206_0x6eec7f[_0x4bbd95(0x1b5)](_0x78b62e,_0x5cd075);if(_0x525d4e!==_0x78b62e&&!_0x525d4e['startsWith'](''+_0x78b62e+a206_0x6eec7f[_0x4bbd95(0x1ba)]))throw new Error(_0x4bbd95(0x1b6)+_0x59fc63[_0x4bbd95(0x1b7)]);if(_0x10033f)await a206_0x2cadf5[_0x4bbd95(0x1af)](_0x525d4e,{'recursive':!![]});else{await a206_0x2cadf5['mkdir'](a206_0x6eec7f['dirname'](_0x525d4e),{'recursive':!![]});const _0x5f0b9e=await openEntryStream(_0x35ba34,_0x59fc63);await pipeline(_0x5f0b9e,createWriteStream(_0x525d4e,{'flags':'wx','mode':0x1a4}));}_0x35ba34[_0x4bbd95(0x1c2)]();})()['catch'](_0x14ccfb);}),_0x35ba34['readEntry']();});}
@@ -1 +1 @@
1
- const a207_0x2ff9d3=a207_0x2f93;(function(_0x4ea667,_0x55b2af){const _0x36d078=a207_0x2f93,_0x403273=_0x4ea667();while(!![]){try{const _0x1ff88d=parseInt(_0x36d078(0xe9))/0x1+parseInt(_0x36d078(0xe7))/0x2*(parseInt(_0x36d078(0xe8))/0x3)+-parseInt(_0x36d078(0xdf))/0x4+-parseInt(_0x36d078(0xeb))/0x5+parseInt(_0x36d078(0xea))/0x6*(-parseInt(_0x36d078(0xe2))/0x7)+-parseInt(_0x36d078(0xe0))/0x8*(-parseInt(_0x36d078(0xe4))/0x9)+-parseInt(_0x36d078(0xde))/0xa*(-parseInt(_0x36d078(0xe6))/0xb);if(_0x1ff88d===_0x55b2af)break;else _0x403273['push'](_0x403273['shift']());}catch(_0x5cd63d){_0x403273['push'](_0x403273['shift']());}}}(a207_0x4021,0xa7506));import a207_0x235215 from'node:path';function a207_0x4021(){const _0x13aa20=['dirname','655102ihWjun','../../../../','27QOxeIR','resolve','11WxvbxP','1528TpbGYj','3228JuqwRv','534631UtMktX','30QsxGzc','4695295NNhJyt','2066160doXRbV','2098620xXCJoY','2809736SZQbxR'];a207_0x4021=function(){return _0x13aa20;};return a207_0x4021();}function a207_0x2f93(_0x3a1d25,_0x519c9e){_0x3a1d25=_0x3a1d25-0xde;const _0x40216c=a207_0x4021();let _0x2f93cf=_0x40216c[_0x3a1d25];return _0x2f93cf;}import{fileURLToPath}from'node:url';const __dirname=a207_0x235215[a207_0x2ff9d3(0xe1)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x389b7c=a207_0x2ff9d3;return a207_0x235215[_0x389b7c(0xe5)](__dirname,_0x389b7c(0xe3));}
1
+ (function(_0x10c908,_0x4e6fc7){const _0x36f84c=a207_0x3a8c,_0x461877=_0x10c908();while(!![]){try{const _0xa663f5=-parseInt(_0x36f84c(0x179))/0x1+parseInt(_0x36f84c(0x177))/0x2*(parseInt(_0x36f84c(0x175))/0x3)+-parseInt(_0x36f84c(0x17b))/0x4+parseInt(_0x36f84c(0x17a))/0x5*(-parseInt(_0x36f84c(0x178))/0x6)+-parseInt(_0x36f84c(0x174))/0x7+parseInt(_0x36f84c(0x176))/0x8+parseInt(_0x36f84c(0x17d))/0x9*(parseInt(_0x36f84c(0x17c))/0xa);if(_0xa663f5===_0x4e6fc7)break;else _0x461877['push'](_0x461877['shift']());}catch(_0x4fcb67){_0x461877['push'](_0x461877['shift']());}}}(a207_0x23b0,0x48ddd));import a207_0x9fcca1 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a207_0x9fcca1['dirname'](fileURLToPath(import.meta.url));function a207_0x3a8c(_0x5ee277,_0x44b5f6){_0x5ee277=_0x5ee277-0x174;const _0x23b0a6=a207_0x23b0();let _0x3a8cfd=_0x23b0a6[_0x5ee277];return _0x3a8cfd;}function a207_0x23b0(){const _0x148c40=['813505WnALPF','211353UvFwkM','716936fRPwLi','16xidiJx','210WFhpwD','478238fIxczQ','37460pGJWzH','595396eDLDgr','3253790NslvHe','18VEigEE','resolve'];a207_0x23b0=function(){return _0x148c40;};return a207_0x23b0();}export function getRabetbaseCliPackageRoot(){const _0xffff63=a207_0x3a8c;return a207_0x9fcca1[_0xffff63(0x17e)](__dirname,'../../../../');}
@@ -1 +1 @@
1
- (function(_0x5c2e6a,_0x16f661){const _0x412577=a208_0xdb32,_0x7ffb43=_0x5c2e6a();while(!![]){try{const _0x3e2972=parseInt(_0x412577(0x1f4))/0x1*(-parseInt(_0x412577(0x1fb))/0x2)+parseInt(_0x412577(0x200))/0x3*(-parseInt(_0x412577(0x1fa))/0x4)+parseInt(_0x412577(0x1f8))/0x5+parseInt(_0x412577(0x1ff))/0x6+parseInt(_0x412577(0x1f3))/0x7*(-parseInt(_0x412577(0x203))/0x8)+-parseInt(_0x412577(0x1fc))/0x9*(-parseInt(_0x412577(0x202))/0xa)+parseInt(_0x412577(0x1f5))/0xb;if(_0x3e2972===_0x16f661)break;else _0x7ffb43['push'](_0x7ffb43['shift']());}catch(_0x218b3d){_0x7ffb43['push'](_0x7ffb43['shift']());}}}(a208_0x2a08,0x79ac9));function a208_0xdb32(_0x11c9c1,_0x2e2ef7){_0x11c9c1=_0x11c9c1-0x1ef;const _0x2a08a2=a208_0x2a08();let _0xdb322f=_0x2a08a2[_0x11c9c1];return _0xdb322f;}import a208_0x2652d6 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 a208_0x2a08(){const _0x1157f8=['success','1440545qNUMYI','Starting\x20project\x20template\x20creation','1776284bsGmaS','152KNXwCG','559377GdxhqZ','version','info','5491452ibrpeH','3bxRLMq','error','100mJCWza','50352wteVvf','message','now','copy','resolve','798otZhGm','5986RwuwBY','3190209TetqKk','cwd'];a208_0x2a08=function(){return _0x1157f8;};return a208_0x2a08();}export async function copyProjectTemplate(_0x4f88fb,_0x3e8b47,_0x5ddf8e){const _0x164f0f=a208_0xdb32,_0x2f7fd7=Date[_0x164f0f(0x1f0)](),_0x4aa688=a208_0x2652d6[_0x164f0f(0x1f2)](process[_0x164f0f(0x1f6)](),_0x4f88fb);try{logger[_0x164f0f(0x1fe)](_0x164f0f(0x1f1),_0x164f0f(0x1f9),{'projectCode':_0x4f88fb});const _0x4450fb=_0x5ddf8e?await materializeLocalProjectTemplate(_0x5ddf8e,_0x4aa688,_0x3e8b47):await materializeProjectTemplate(_0x4aa688,_0x3e8b47),_0xf2fefe=Date['now']()-_0x2f7fd7;logger[_0x164f0f(0x1f7)]('copy','Project\x20template\x20created',_0xf2fefe,{'projectCode':_0x4f88fb,'templateSource':_0x4450fb['source'],'templateVersion':_0x4450fb[_0x164f0f(0x1fd)]});}catch(_0xd85591){const _0x5f5879=Date[_0x164f0f(0x1f0)]()-_0x2f7fd7;logger[_0x164f0f(0x201)](_0x164f0f(0x1f1),'Failed\x20to\x20copy\x20project\x20template',{'projectCode':_0x4f88fb,'error':_0xd85591 instanceof Error?_0xd85591[_0x164f0f(0x1ef)]:String(_0xd85591),'duration':_0x5f5879});throw _0xd85591;}return formatElapsed(_0x2f7fd7);}
1
+ (function(_0xb8b00,_0xdea7cd){const _0x1fb912=a208_0x48a8,_0x55d676=_0xb8b00();while(!![]){try{const _0x2cf979=-parseInt(_0x1fb912(0xa9))/0x1*(-parseInt(_0x1fb912(0xa1))/0x2)+parseInt(_0x1fb912(0xaa))/0x3+parseInt(_0x1fb912(0xab))/0x4*(-parseInt(_0x1fb912(0xb1))/0x5)+parseInt(_0x1fb912(0xb0))/0x6+parseInt(_0x1fb912(0xa3))/0x7*(-parseInt(_0x1fb912(0xaf))/0x8)+-parseInt(_0x1fb912(0xa6))/0x9+-parseInt(_0x1fb912(0xa8))/0xa;if(_0x2cf979===_0xdea7cd)break;else _0x55d676['push'](_0x55d676['shift']());}catch(_0x1fffc5){_0x55d676['push'](_0x55d676['shift']());}}}(a208_0x4e62,0xcdb61));function a208_0x4e62(){const _0x83c288=['Failed\x20to\x20copy\x20project\x20template','2vZocjj','cwd','5970979KrmRBs','info','source','13390416FVNvmo','version','1001430nPiUWG','974824Koaypn','2758137eZRrtR','15236MYKHyR','resolve','copy','Project\x20template\x20created','8nYViYn','9067452AMVywg','160TuHsom','Starting\x20project\x20template\x20creation','now','message'];a208_0x4e62=function(){return _0x83c288;};return a208_0x4e62();}function a208_0x48a8(_0x4869ad,_0x3730e9){_0x4869ad=_0x4869ad-0xa0;const _0x4e62a0=a208_0x4e62();let _0x48a842=_0x4e62a0[_0x4869ad];return _0x48a842;}import a208_0x2b1f27 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';export async function copyProjectTemplate(_0x31a8c5,_0x16ad84,_0x1a0025){const _0x3b8694=a208_0x48a8,_0x415a38=Date[_0x3b8694(0xb3)](),_0x5989f5=a208_0x2b1f27[_0x3b8694(0xac)](process[_0x3b8694(0xa2)](),_0x31a8c5);try{logger[_0x3b8694(0xa4)](_0x3b8694(0xad),_0x3b8694(0xb2),{'projectCode':_0x31a8c5});const _0x448df9=_0x1a0025?await materializeLocalProjectTemplate(_0x1a0025,_0x5989f5,_0x16ad84):await materializeProjectTemplate(_0x5989f5,_0x16ad84),_0x1870b7=Date['now']()-_0x415a38;logger['success'](_0x3b8694(0xad),_0x3b8694(0xae),_0x1870b7,{'projectCode':_0x31a8c5,'templateSource':_0x448df9[_0x3b8694(0xa5)],'templateVersion':_0x448df9[_0x3b8694(0xa7)]});}catch(_0x3a3c3d){const _0x14571d=Date['now']()-_0x415a38;logger['error'](_0x3b8694(0xad),_0x3b8694(0xa0),{'projectCode':_0x31a8c5,'error':_0x3a3c3d instanceof Error?_0x3a3c3d[_0x3b8694(0xb4)]:String(_0x3a3c3d),'duration':_0x14571d});throw _0x3a3c3d;}return formatElapsed(_0x415a38);}
@@ -1 +1 @@
1
- (function(_0x148cfe,_0x4cb1c2){const _0xfa971=a209_0x48d7,_0x5180ea=_0x148cfe();while(!![]){try{const _0x485920=-parseInt(_0xfa971(0x124))/0x1*(-parseInt(_0xfa971(0x118))/0x2)+parseInt(_0xfa971(0x123))/0x3+-parseInt(_0xfa971(0x11e))/0x4*(parseInt(_0xfa971(0x125))/0x5)+parseInt(_0xfa971(0x11f))/0x6*(-parseInt(_0xfa971(0x122))/0x7)+-parseInt(_0xfa971(0x129))/0x8+parseInt(_0xfa971(0x128))/0x9+parseInt(_0xfa971(0x121))/0xa*(parseInt(_0xfa971(0x127))/0xb);if(_0x485920===_0x4cb1c2)break;else _0x5180ea['push'](_0x5180ea['shift']());}catch(_0x514674){_0x5180ea['push'](_0x5180ea['shift']());}}}(a209_0x3014,0xe7cae));import a209_0x227e89 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a209_0x3014(){const _0x3fd5dd=['1vzGgLN','3532735Sylric','resolve','2299iuFcDK','6110739WGxhYY','6049600uUmnMJ','error','message','1197728RcAkVl','prettier','format','npx','cwd','Code\x20format\x20completed','4CWNfuB','42BfflQf','now','86030KeDmcV','1382773IhOsks','2157240qdfyjf'];a209_0x3014=function(){return _0x3fd5dd;};return a209_0x3014();}import{logger}from'../../../utils/logger.js';function a209_0x48d7(_0x37ac6d,_0x1e16a){_0x37ac6d=_0x37ac6d-0x117;const _0x30144d=a209_0x3014();let _0x48d7f2=_0x30144d[_0x37ac6d];return _0x48d7f2;}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x198fda){const _0x4880af=a209_0x48d7,_0x864daf=Date[_0x4880af(0x120)](),_0xe76f8=a209_0x227e89[_0x4880af(0x126)](process[_0x4880af(0x11c)](),_0x198fda);try{logger['info'](_0x4880af(0x11a),'Starting\x20code\x20format',{'projectCode':_0x198fda}),await execa(resolveNpmBin(_0x4880af(0x11b)),[_0x4880af(0x119),'--write','.'],{'cwd':_0xe76f8});const _0x236696=Date['now']()-_0x864daf;logger['success'](_0x4880af(0x11a),_0x4880af(0x11d),_0x236696,{'projectCode':_0x198fda});}catch(_0x383bba){const _0x42176b=Date[_0x4880af(0x120)]()-_0x864daf;logger[_0x4880af(0x12a)](_0x4880af(0x11a),'Code\x20format\x20failed',{'projectCode':_0x198fda,'error':_0x383bba instanceof Error?_0x383bba[_0x4880af(0x117)]:String(_0x383bba),'duration':_0x42176b});throw _0x383bba;}return formatElapsed(_0x864daf);}
1
+ (function(_0x53d9c5,_0x477c78){const _0x25688d=a209_0x3b44,_0x1b5244=_0x53d9c5();while(!![]){try{const _0x3f3a01=parseInt(_0x25688d(0x123))/0x1+-parseInt(_0x25688d(0x111))/0x2*(-parseInt(_0x25688d(0x115))/0x3)+-parseInt(_0x25688d(0x11c))/0x4*(-parseInt(_0x25688d(0x116))/0x5)+-parseInt(_0x25688d(0x120))/0x6+parseInt(_0x25688d(0x110))/0x7+-parseInt(_0x25688d(0x11b))/0x8*(parseInt(_0x25688d(0x113))/0x9)+-parseInt(_0x25688d(0x10f))/0xa;if(_0x3f3a01===_0x477c78)break;else _0x1b5244['push'](_0x1b5244['shift']());}catch(_0x393e1d){_0x1b5244['push'](_0x1b5244['shift']());}}}(a209_0x92d2,0x7ea2e));function a209_0x92d2(){const _0x2a613f=['--write','4059850ThnVyB','4276657NYUiWl','358ePVdce','Code\x20format\x20failed','36ChcItF','info','3180DlrbIC','1524945UaRIqu','prettier','format','resolve','Code\x20format\x20completed','355176WUhxQT','4GjtOTr','success','now','npx','3617526GjRmkx','cwd','Starting\x20code\x20format','599516KQeGPZ'];a209_0x92d2=function(){return _0x2a613f;};return a209_0x92d2();}function a209_0x3b44(_0x55da5b,_0x3d5863){_0x55da5b=_0x55da5b-0x10e;const _0x92d2b1=a209_0x92d2();let _0x3b444d=_0x92d2b1[_0x55da5b];return _0x3b444d;}import a209_0x5b25de from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x526bf8){const _0x4c98c8=a209_0x3b44,_0x3426fa=Date['now'](),_0x267fe3=a209_0x5b25de[_0x4c98c8(0x119)](process[_0x4c98c8(0x121)](),_0x526bf8);try{logger[_0x4c98c8(0x114)](_0x4c98c8(0x118),_0x4c98c8(0x122),{'projectCode':_0x526bf8}),await execa(resolveNpmBin(_0x4c98c8(0x11f)),[_0x4c98c8(0x117),_0x4c98c8(0x10e),'.'],{'cwd':_0x267fe3});const _0x15089c=Date['now']()-_0x3426fa;logger[_0x4c98c8(0x11d)](_0x4c98c8(0x118),_0x4c98c8(0x11a),_0x15089c,{'projectCode':_0x526bf8});}catch(_0x37b3b3){const _0x4829b3=Date[_0x4c98c8(0x11e)]()-_0x3426fa;logger['error']('format',_0x4c98c8(0x112),{'projectCode':_0x526bf8,'error':_0x37b3b3 instanceof Error?_0x37b3b3['message']:String(_0x37b3b3),'duration':_0x4829b3});throw _0x37b3b3;}return formatElapsed(_0x3426fa);}
@@ -1 +1 @@
1
- (function(_0x7251b3,_0x1c7686){const _0x3edf14=a210_0x2169,_0x14d91e=_0x7251b3();while(!![]){try{const _0x385d6a=-parseInt(_0x3edf14(0x81))/0x1+parseInt(_0x3edf14(0x8a))/0x2*(-parseInt(_0x3edf14(0x88))/0x3)+-parseInt(_0x3edf14(0x7d))/0x4*(parseInt(_0x3edf14(0x83))/0x5)+-parseInt(_0x3edf14(0x89))/0x6+-parseInt(_0x3edf14(0x85))/0x7+parseInt(_0x3edf14(0x86))/0x8*(-parseInt(_0x3edf14(0x7e))/0x9)+parseInt(_0x3edf14(0x8b))/0xa;if(_0x385d6a===_0x1c7686)break;else _0x14d91e['push'](_0x14d91e['shift']());}catch(_0x5cab1b){_0x14d91e['push'](_0x14d91e['shift']());}}}(a210_0x1c4f,0xb7121));function a210_0x2169(_0x4a74ce,_0x2f9a6c){_0x4a74ce=_0x4a74ce-0x7d;const _0x1c4f83=a210_0x1c4f();let _0x216939=_0x1c4f83[_0x4a74ce];return _0x216939;}import a210_0x5636a1 from'node:path';function a210_0x1c4f(){const _0x443069=['resolve','Dependency\x20install\x20failed','508893wFePZX','cwd','18745ZLThcG','Dependency\x20install\x20completed','2914723nUvEdI','16BEBiqy','install','321zXDUMF','8344824ZIeeHt','15398xzKeDb','52407230OAPMcn','info','now','https://registry.npmmirror.com','1204AWIkHc','1001421rHnWGw'];a210_0x1c4f=function(){return _0x443069;};return a210_0x1c4f();}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x2db430){const _0x62651c=a210_0x2169,_0xf156c6=Date[_0x62651c(0x8d)](),_0x4347d7=a210_0x5636a1[_0x62651c(0x7f)](process[_0x62651c(0x82)](),_0x2db430);try{logger[_0x62651c(0x8c)](_0x62651c(0x87),'Starting\x20dependency\x20install',{'projectCode':_0x2db430,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin('npm'),['install','--registry',_0x62651c(0x8e)],{'cwd':_0x4347d7});const _0xebda45=Date[_0x62651c(0x8d)]()-_0xf156c6;logger['success']('install',_0x62651c(0x84),_0xebda45,{'projectCode':_0x2db430});}catch(_0x1de110){const _0xecdd1f=Date[_0x62651c(0x8d)]()-_0xf156c6;logger['error'](_0x62651c(0x87),_0x62651c(0x80),{'projectCode':_0x2db430,'error':_0x1de110 instanceof Error?_0x1de110['message']:String(_0x1de110),'duration':_0xecdd1f});throw _0x1de110;}return formatElapsed(_0xf156c6);}
1
+ function a210_0x209b(){const _0x4ee278=['cwd','https://registry.npmmirror.com','info','20144kLbYEu','1506SEjzhB','Dependency\x20install\x20completed','2884GdoPxu','resolve','9453750nrZaom','2497062lGryVC','603ynlYFx','11109vrhiqh','9275vcJhIq','now','install','11onXoCu','41631540ktmeyv','message','--registry','25196nZRBop','success','59oHEwHF','npm'];a210_0x209b=function(){return _0x4ee278;};return a210_0x209b();}(function(_0x59aa52,_0x3b4b1d){const _0xf403bd=a210_0x3fc6,_0x2e6932=_0x59aa52();while(!![]){try{const _0x3466c0=parseInt(_0xf403bd(0x9a))/0x1*(-parseInt(_0xf403bd(0x98))/0x2)+-parseInt(_0xf403bd(0x8e))/0x3+-parseInt(_0xf403bd(0x8b))/0x4*(parseInt(_0xf403bd(0x91))/0x5)+parseInt(_0xf403bd(0x89))/0x6*(-parseInt(_0xf403bd(0x90))/0x7)+parseInt(_0xf403bd(0x88))/0x8*(-parseInt(_0xf403bd(0x8f))/0x9)+parseInt(_0xf403bd(0x8d))/0xa+-parseInt(_0xf403bd(0x94))/0xb*(-parseInt(_0xf403bd(0x95))/0xc);if(_0x3466c0===_0x3b4b1d)break;else _0x2e6932['push'](_0x2e6932['shift']());}catch(_0x456a80){_0x2e6932['push'](_0x2e6932['shift']());}}}(a210_0x209b,0xe4288));function a210_0x3fc6(_0x2f276e,_0x180899){_0x2f276e=_0x2f276e-0x88;const _0x209b18=a210_0x209b();let _0x3fc638=_0x209b18[_0x2f276e];return _0x3fc638;}import a210_0x56d506 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x22a97d){const _0x546a78=a210_0x3fc6,_0x52f380=Date[_0x546a78(0x92)](),_0x52693a=a210_0x56d506[_0x546a78(0x8c)](process[_0x546a78(0x9c)](),_0x22a97d);try{logger[_0x546a78(0x9e)](_0x546a78(0x93),'Starting\x20dependency\x20install',{'projectCode':_0x22a97d,'registry':_0x546a78(0x9d)}),await execa(resolveNpmBin(_0x546a78(0x9b)),['install',_0x546a78(0x97),_0x546a78(0x9d)],{'cwd':_0x52693a});const _0x528150=Date[_0x546a78(0x92)]()-_0x52f380;logger[_0x546a78(0x99)](_0x546a78(0x93),_0x546a78(0x8a),_0x528150,{'projectCode':_0x22a97d});}catch(_0x98b445){const _0x4735d1=Date[_0x546a78(0x92)]()-_0x52f380;logger['error'](_0x546a78(0x93),'Dependency\x20install\x20failed',{'projectCode':_0x22a97d,'error':_0x98b445 instanceof Error?_0x98b445[_0x546a78(0x96)]:String(_0x98b445),'duration':_0x4735d1});throw _0x98b445;}return formatElapsed(_0x52f380);}
@@ -1 +1 @@
1
- const a211_0x19695b=a211_0x19ba;(function(_0x2a12a2,_0x73bcb){const _0x3b9e59=a211_0x19ba,_0x396094=_0x2a12a2();while(!![]){try{const _0x117ca1=parseInt(_0x3b9e59(0x15a))/0x1*(parseInt(_0x3b9e59(0x157))/0x2)+parseInt(_0x3b9e59(0x15c))/0x3+-parseInt(_0x3b9e59(0x151))/0x4+parseInt(_0x3b9e59(0x159))/0x5*(-parseInt(_0x3b9e59(0x156))/0x6)+-parseInt(_0x3b9e59(0x15e))/0x7+-parseInt(_0x3b9e59(0x152))/0x8+parseInt(_0x3b9e59(0x158))/0x9;if(_0x117ca1===_0x73bcb)break;else _0x396094['push'](_0x396094['shift']());}catch(_0x485f5a){_0x396094['push'](_0x396094['shift']());}}}(a211_0x1e9b,0x57227));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';function a211_0x19ba(_0x39b269,_0x162f1b){_0x39b269=_0x39b269-0x14f;const _0x1e9b0f=a211_0x1e9b();let _0x19ba9c=_0x1e9b0f[_0x39b269];return _0x19ba9c;}export const projectDomainRoutingSyncDefinition={'service':a211_0x19695b(0x15b),'command':a211_0x19695b(0x154),'description':'Synchronize\x20the\x20current\x20project\x27s\x20public\x20Domain\x20routing','risk':a211_0x19695b(0x15d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(){const _0x3d426d=a211_0x19695b,_0x21ee7d=findProjectRootDirectory();if(!resolveConfigPath(_0x21ee7d))throw CliErrors[_0x3d426d(0x14f)]('No\x20Rabetbase\x20project\x20configuration\x20was\x20found.',_0x3d426d(0x155)+CLI_BIN_NAME+_0x3d426d(0x153));const _0x249bee=writeProjectDomainRoutingManifest(_0x21ee7d);return{'ok':!![],'message':_0x3d426d(0x150)+_0x249bee['path'],'data':_0x249bee};}};function a211_0x1e9b(){const _0x27a8=['validation','Domain\x20routing\x20synchronized:\x20','1243076EKpwOj','5426216SpSUhG','\x20workspace\x20init\x20--appcode\x20<code>\x20in\x20the\x20project\x20directory\x20first.','domain-routing-sync','Run\x20','6SZGfyO','47022HCkwYS','17569323aNtDlh','3434290SSLNuf','7MzGlTJ','project','1683951jRqLMr','read','4516638NtoTnP'];a211_0x1e9b=function(){return _0x27a8;};return a211_0x1e9b();}
1
+ const a211_0x1188d8=a211_0x3569;(function(_0x123e8b,_0x42db63){const _0x5cbca5=a211_0x3569,_0x203d8d=_0x123e8b();while(!![]){try{const _0x531b41=parseInt(_0x5cbca5(0xaf))/0x1+parseInt(_0x5cbca5(0xba))/0x2+parseInt(_0x5cbca5(0xaa))/0x3+-parseInt(_0x5cbca5(0xbb))/0x4*(parseInt(_0x5cbca5(0xac))/0x5)+-parseInt(_0x5cbca5(0xb4))/0x6*(parseInt(_0x5cbca5(0xae))/0x7)+-parseInt(_0x5cbca5(0xab))/0x8+parseInt(_0x5cbca5(0xb9))/0x9;if(_0x531b41===_0x42db63)break;else _0x203d8d['push'](_0x203d8d['shift']());}catch(_0x2d27d7){_0x203d8d['push'](_0x203d8d['shift']());}}}(a211_0x48fa,0x71bd6));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';function a211_0x3569(_0x27fb45,_0x5e258c){_0x27fb45=_0x27fb45-0xaa;const _0x48fa67=a211_0x48fa();let _0x3569b0=_0x48fa67[_0x27fb45];return _0x3569b0;}function a211_0x48fa(){const _0x409555=['validation','\x20workspace\x20init\x20--appcode\x20<code>\x20in\x20the\x20project\x20directory\x20first.','No\x20Rabetbase\x20project\x20configuration\x20was\x20found.','domain-routing-sync','34638aWzlIC','read','project','path','Domain\x20routing\x20synchronized:\x20','4947165HIexTC','1158520EyvCUW','619772SarpKa','1027113XdYKeQ','3000624JMuWYN','30fwzBzy','Run\x20','189bJBOKp','455169AcmHEi'];a211_0x48fa=function(){return _0x409555;};return a211_0x48fa();}import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';export const projectDomainRoutingSyncDefinition={'service':a211_0x1188d8(0xb6),'command':a211_0x1188d8(0xb3),'description':'Synchronize\x20the\x20current\x20project\x27s\x20public\x20Domain\x20routing','risk':a211_0x1188d8(0xb5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(){const _0x482713=a211_0x1188d8,_0x3959c5=findProjectRootDirectory();if(!resolveConfigPath(_0x3959c5))throw CliErrors[_0x482713(0xb0)](_0x482713(0xb2),_0x482713(0xad)+CLI_BIN_NAME+_0x482713(0xb1));const _0x4c8711=writeProjectDomainRoutingManifest(_0x3959c5);return{'ok':!![],'message':_0x482713(0xb8)+_0x4c8711[_0x482713(0xb7)],'data':_0x4c8711};}};
@@ -1 +1 @@
1
- const a212_0x2f6803=a212_0x337c;(function(_0x4ad79d,_0x1f7029){const _0x531443=a212_0x337c,_0x5c6026=_0x4ad79d();while(!![]){try{const _0x2df957=parseInt(_0x531443(0x1e6))/0x1*(parseInt(_0x531443(0x1d7))/0x2)+parseInt(_0x531443(0x1f4))/0x3*(-parseInt(_0x531443(0x1d0))/0x4)+-parseInt(_0x531443(0x1dd))/0x5*(parseInt(_0x531443(0x1f1))/0x6)+-parseInt(_0x531443(0x1de))/0x7*(parseInt(_0x531443(0x1e7))/0x8)+-parseInt(_0x531443(0x1ed))/0x9*(-parseInt(_0x531443(0x1e1))/0xa)+-parseInt(_0x531443(0x1e8))/0xb+parseInt(_0x531443(0x1e4))/0xc;if(_0x2df957===_0x1f7029)break;else _0x5c6026['push'](_0x5c6026['shift']());}catch(_0x5172b5){_0x5c6026['push'](_0x5c6026['shift']());}}}(a212_0x1215,0x43ba8));import{CliErrors}from'../../errors.js';function a212_0x1215(){const _0x4173cc=['Run\x20','PATCH','Project\x20upgrade\x20completed\x20with\x20follow-up\x20work.','495cpcDfl','args','Upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]','24ncYXKW','boolean','project-name','514302yjqjOH','str','Upgrade\x20cancelled.','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','Create\x20a\x20new\x20project','cwd','env','bool','cancelled','Prepared\x20local\x20project\x20template\x20directory','nonInteractive','create','completed','name','12SlOlNM','project','upgrade','Project\x20upgrade\x20completed.','write','cookie','../../commands/project/create/main.js','2LPDDeB','Usage:\x20','appcode','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]\x20from\x20the\x20empty\x20target\x20directory.','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','trim','26065idwsQV','1799Ayeuux','Target\x20environment','string','15340zjglyF','Project\x20name','validation','7923480qoszbY','current-dir','382227Znapqx','6816xhkPNO','1048883UKOkwP','Skip\x20confirmation\x20prompt'];a212_0x1215=function(){return _0x4173cc;};return a212_0x1215();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{analyseProjectUpgrade,upgradeApp}from'../../commands/project/upgrade.js';import{projectDomainRoutingSyncDefinition}from'../../commands/project/domain-routing-sync.js';const createFlags=[{'name':'name','type':a212_0x2f6803(0x1e0),'description':a212_0x2f6803(0x1e2)},{'name':a212_0x2f6803(0x1c8),'type':a212_0x2f6803(0x1e0),'description':a212_0x2f6803(0x1df)},{'name':a212_0x2f6803(0x1d9),'type':a212_0x2f6803(0x1e0),'description':a212_0x2f6803(0x1c5)},{'name':a212_0x2f6803(0x1e5),'type':a212_0x2f6803(0x1f2),'description':'Initialize\x20the\x20current\x20empty\x20directory\x20instead\x20of\x20creating\x20a\x20child\x20directory','default':![]},{'name':'template-source','type':a212_0x2f6803(0x1e0),'description':a212_0x2f6803(0x1cb)}],upgradeFlags=[{'name':'yes','type':'boolean','description':a212_0x2f6803(0x1e9),'default':![]}];function a212_0x337c(_0x18cc04,_0x22016c){_0x18cc04=_0x18cc04-0x1c4;const _0x121577=a212_0x1215();let _0x337cae=_0x121577[_0x18cc04];return _0x337cae;}export const projectDefinitions=[{'service':a212_0x2f6803(0x1d1),'command':a212_0x2f6803(0x1cd),'description':a212_0x2f6803(0x1c6),'risk':a212_0x2f6803(0x1d4),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a212_0x2f6803(0x1f3),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x1e3d81){const _0x19702f=a212_0x2f6803,{createApp:_0x113c72}=await import(_0x19702f(0x1d6)),_0x511ee7=_0x1e3d81[_0x19702f(0x1f5)](_0x19702f(0x1cf))['trim']()||_0x1e3d81[_0x19702f(0x1ee)][0x0]?.[_0x19702f(0x1dc)](),_0x485d8b=_0x1e3d81[_0x19702f(0x1f5)](_0x19702f(0x1c8))||undefined,_0x297ded=_0x1e3d81['str'](_0x19702f(0x1d9))||undefined,_0x3af03d=_0x1e3d81[_0x19702f(0x1f5)]('template-source')['trim']()||undefined,_0x4c21be=_0x1e3d81['bool']('current-dir');if(_0x4c21be&&_0x511ee7)throw CliErrors[_0x19702f(0x1e3)]('--current-dir\x20cannot\x20be\x20combined\x20with\x20a\x20project\x20name.',_0x19702f(0x1ea)+CLI_BIN_NAME+_0x19702f(0x1da));if(_0x1e3d81[_0x19702f(0x1cc)]){if(!_0x511ee7&&!_0x4c21be)throw CliErrors[_0x19702f(0x1e3)](_0x19702f(0x1db),_0x19702f(0x1d8)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]\x20or\x20'+CLI_BIN_NAME+_0x19702f(0x1f0));await _0x113c72({'projectCode':_0x511ee7,'appCode':_0x297ded,'env':_0x485d8b,'cookie':_0x1e3d81[_0x19702f(0x1d5)],'currentDir':_0x4c21be,'nonInteractive':!![],'templateSource':_0x3af03d});}else await _0x113c72({'projectCode':_0x511ee7,'appCode':_0x297ded,'env':_0x485d8b,'cookie':_0x1e3d81['cookie'],'currentDir':_0x4c21be,'templateSource':_0x3af03d});return{'ok':!![]};}},projectDomainRoutingSyncDefinition,{'service':a212_0x2f6803(0x1d1),'command':a212_0x2f6803(0x1d2),'description':a212_0x2f6803(0x1ef),'risk':a212_0x2f6803(0x1d4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'dryRun'(){const _0x424e70=a212_0x2f6803,_0x21af62=analyseProjectUpgrade(process[_0x424e70(0x1c7)]());return{'method':_0x424e70(0x1eb),'url':process[_0x424e70(0x1c7)](),'body':_0x21af62,'description':'Would\x20upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure\x20without\x20overwriting\x20project-owned\x20entrypoints'};},async 'execute'(_0x4649f5){const _0x106905=a212_0x2f6803,_0x263458=await upgradeApp(_0x4649f5[_0x106905(0x1cc)],{'yes':_0x4649f5[_0x106905(0x1c9)]('yes')});return{'ok':_0x263458[_0x106905(0x1ce)]||_0x263458['cancelled']===!![],'message':_0x263458[_0x106905(0x1ca)]?_0x106905(0x1c4):_0x263458[_0x106905(0x1ce)]?_0x106905(0x1d3):_0x106905(0x1ec),'data':_0x263458};}}];
1
+ const a212_0x4e37b9=a212_0x2fd1;(function(_0x46118a,_0x1390f1){const _0x312852=a212_0x2fd1,_0x2fdddf=_0x46118a();while(!![]){try{const _0x20098e=-parseInt(_0x312852(0xab))/0x1+-parseInt(_0x312852(0xa5))/0x2+-parseInt(_0x312852(0xcc))/0x3*(parseInt(_0x312852(0xbd))/0x4)+-parseInt(_0x312852(0xc2))/0x5*(parseInt(_0x312852(0xb7))/0x6)+parseInt(_0x312852(0xb4))/0x7*(parseInt(_0x312852(0xa4))/0x8)+-parseInt(_0x312852(0xcb))/0x9*(-parseInt(_0x312852(0xa8))/0xa)+-parseInt(_0x312852(0xbc))/0xb*(-parseInt(_0x312852(0xb2))/0xc);if(_0x20098e===_0x1390f1)break;else _0x2fdddf['push'](_0x2fdddf['shift']());}catch(_0x4893c1){_0x2fdddf['push'](_0x2fdddf['shift']());}}}(a212_0x265a,0xc9b4a));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a212_0x265a(){const _0xfb958=['nonInteractive','Would\x20upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure\x20without\x20overwriting\x20project-owned\x20entrypoints','upgrade','Project\x20upgrade\x20completed.','yes','Create\x20a\x20new\x20project','27864dXLxZU','1056792WQddUl','bool','--current-dir\x20cannot\x20be\x20combined\x20with\x20a\x20project\x20name.','540RuEudS','Initialize\x20the\x20current\x20empty\x20directory\x20instead\x20of\x20creating\x20a\x20child\x20directory','string','738513VFKGWm','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]\x20from\x20the\x20empty\x20target\x20directory.','cwd','cancelled','template-source','Target\x20environment','trim','12uvYtjI','write','714QehHEx','Usage:\x20','project','6LRrSDL','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','str','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]','env','26740417pIzncg','492132qtwqwg','appcode','current-dir','name','create','3301595wivcXT','PATCH','Upgrade\x20cancelled.','Upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','Project\x20upgrade\x20completed\x20with\x20follow-up\x20work.','validation','completed','boolean','15039nCTByF','3astgKU','cookie','project-name','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'];a212_0x265a=function(){return _0xfb958;};return a212_0x265a();}import{analyseProjectUpgrade,upgradeApp}from'../../commands/project/upgrade.js';function a212_0x2fd1(_0x7fc3d0,_0x520017){_0x7fc3d0=_0x7fc3d0-0x9d;const _0x265a33=a212_0x265a();let _0x2fd1e0=_0x265a33[_0x7fc3d0];return _0x2fd1e0;}import{projectDomainRoutingSyncDefinition}from'../../commands/project/domain-routing-sync.js';const createFlags=[{'name':a212_0x4e37b9(0xc0),'type':'string','description':'Project\x20name'},{'name':'env','type':a212_0x4e37b9(0xaa),'description':a212_0x4e37b9(0xb0)},{'name':a212_0x4e37b9(0xbe),'type':a212_0x4e37b9(0xaa),'description':a212_0x4e37b9(0x9d)},{'name':'current-dir','type':'boolean','description':a212_0x4e37b9(0xa9),'default':![]},{'name':a212_0x4e37b9(0xaf),'type':'string','description':'Prepared\x20local\x20project\x20template\x20directory'}],upgradeFlags=[{'name':'yes','type':a212_0x4e37b9(0xca),'description':'Skip\x20confirmation\x20prompt','default':![]}];export const projectDefinitions=[{'service':a212_0x4e37b9(0xb6),'command':a212_0x4e37b9(0xc1),'description':a212_0x4e37b9(0xa3),'risk':a212_0x4e37b9(0xb3),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a212_0x4e37b9(0xce),'description':a212_0x4e37b9(0xb8),'required':![]}],'flags':createFlags,async 'execute'(_0x59b181){const _0x442096=a212_0x4e37b9,{createApp:_0x292f16}=await import('../../commands/project/create/main.js'),_0x400c17=_0x59b181[_0x442096(0xb9)]('name')[_0x442096(0xb1)]()||_0x59b181['args'][0x0]?.[_0x442096(0xb1)](),_0x59c756=_0x59b181['str'](_0x442096(0xbb))||undefined,_0x1bf997=_0x59b181['str']('appcode')||undefined,_0x39ebc3=_0x59b181['str']('template-source')[_0x442096(0xb1)]()||undefined,_0x4283b5=_0x59b181[_0x442096(0xa6)](_0x442096(0xbf));if(_0x4283b5&&_0x400c17)throw CliErrors[_0x442096(0xc8)](_0x442096(0xa7),'Run\x20'+CLI_BIN_NAME+_0x442096(0xac));if(_0x59b181[_0x442096(0x9e)]){if(!_0x400c17&&!_0x4283b5)throw CliErrors[_0x442096(0xc8)](_0x442096(0xc6),_0x442096(0xb5)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]\x20or\x20'+CLI_BIN_NAME+_0x442096(0xba));await _0x292f16({'projectCode':_0x400c17,'appCode':_0x1bf997,'env':_0x59c756,'cookie':_0x59b181[_0x442096(0xcd)],'currentDir':_0x4283b5,'nonInteractive':!![],'templateSource':_0x39ebc3});}else await _0x292f16({'projectCode':_0x400c17,'appCode':_0x1bf997,'env':_0x59c756,'cookie':_0x59b181['cookie'],'currentDir':_0x4283b5,'templateSource':_0x39ebc3});return{'ok':!![]};}},projectDomainRoutingSyncDefinition,{'service':a212_0x4e37b9(0xb6),'command':a212_0x4e37b9(0xa0),'description':a212_0x4e37b9(0xc5),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'dryRun'(){const _0x5d0ae4=a212_0x4e37b9,_0x776d52=analyseProjectUpgrade(process[_0x5d0ae4(0xad)]());return{'method':_0x5d0ae4(0xc3),'url':process[_0x5d0ae4(0xad)](),'body':_0x776d52,'description':_0x5d0ae4(0x9f)};},async 'execute'(_0x277ca2){const _0x24af23=a212_0x4e37b9,_0xb71813=await upgradeApp(_0x277ca2[_0x24af23(0x9e)],{'yes':_0x277ca2[_0x24af23(0xa6)](_0x24af23(0xa2))});return{'ok':_0xb71813[_0x24af23(0xc9)]||_0xb71813['cancelled']===!![],'message':_0xb71813[_0x24af23(0xae)]?_0x24af23(0xc4):_0xb71813[_0x24af23(0xc9)]?_0x24af23(0xa1):_0x24af23(0xc7),'data':_0xb71813};}}];