@lovrabet/rabetbase-cli 2.5.7-beta.1 → 2.5.8-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (375) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/detail.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.js +1 -1
  63. package/lib/commands/config/list.js +1 -1
  64. package/lib/commands/config/set.js +1 -1
  65. package/lib/commands/config/shared.js +1 -1
  66. package/lib/commands/dataset/batch-design.js +1 -1
  67. package/lib/commands/dataset/business-group-update.js +1 -1
  68. package/lib/commands/dataset/business-groups.js +1 -1
  69. package/lib/commands/dataset/capability.js +1 -1
  70. package/lib/commands/dataset/cross-relation-create.js +1 -1
  71. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  72. package/lib/commands/dataset/cross-relation-list.js +1 -1
  73. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  74. package/lib/commands/dataset/cross-relation-update.js +1 -1
  75. package/lib/commands/dataset/delete.js +1 -1
  76. package/lib/commands/dataset/design-context.js +1 -1
  77. package/lib/commands/dataset/design-start.js +1 -1
  78. package/lib/commands/dataset/design-status.js +1 -1
  79. package/lib/commands/dataset/design-sync-retry.js +1 -1
  80. package/lib/commands/dataset/design-sync-status.js +1 -1
  81. package/lib/commands/dataset/design-validate.js +1 -1
  82. package/lib/commands/dataset/detail.js +1 -1
  83. package/lib/commands/dataset/extend-update.js +1 -1
  84. package/lib/commands/dataset/field-restore.js +1 -1
  85. package/lib/commands/dataset/field-update.js +1 -1
  86. package/lib/commands/dataset/generate.js +1 -1
  87. package/lib/commands/dataset/index.js +1 -1
  88. package/lib/commands/dataset/list.js +1 -1
  89. package/lib/commands/dataset/operations.js +1 -1
  90. package/lib/commands/dataset/relation-audit.js +1 -1
  91. package/lib/commands/dataset/relation-create.js +1 -1
  92. package/lib/commands/dataset/relation-delete.js +1 -1
  93. package/lib/commands/dataset/relation-shared.js +1 -1
  94. package/lib/commands/dataset/relation-update.js +1 -1
  95. package/lib/commands/dataset/relations.js +1 -1
  96. package/lib/commands/dataset/rename.js +1 -1
  97. package/lib/commands/dataset/restore.js +1 -1
  98. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  99. package/lib/commands/db/analysis-batching.js +1 -1
  100. package/lib/commands/db/analyze-batch-plan.js +1 -1
  101. package/lib/commands/db/analyze-cancel.js +1 -1
  102. package/lib/commands/db/analyze-start.js +1 -1
  103. package/lib/commands/db/analyze-status.js +1 -1
  104. package/lib/commands/db/create.js +1 -1
  105. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  106. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  107. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  109. package/lib/commands/db/delete.js +1 -1
  110. package/lib/commands/db/detail.js +1 -1
  111. package/lib/commands/db/diff-refresh-start.js +1 -1
  112. package/lib/commands/db/diff-refresh-status.js +1 -1
  113. package/lib/commands/db/diff.js +1 -1
  114. package/lib/commands/db/index.js +1 -1
  115. package/lib/commands/db/list.js +1 -1
  116. package/lib/commands/db/shared.js +1 -1
  117. package/lib/commands/db/table-diff-shared.js +1 -1
  118. package/lib/commands/db/tables.js +1 -1
  119. package/lib/commands/db/test.js +1 -1
  120. package/lib/commands/db/update.js +1 -1
  121. package/lib/commands/deployment/index.js +1 -1
  122. package/lib/commands/deployment/sync-all.js +1 -1
  123. package/lib/commands/deployment/sync-jobs.js +1 -1
  124. package/lib/commands/deployment/sync-status.js +1 -1
  125. package/lib/commands/doctor.js +1 -1
  126. package/lib/commands/file/index.js +1 -1
  127. package/lib/commands/flow/create.js +1 -1
  128. package/lib/commands/flow/detail.js +1 -1
  129. package/lib/commands/flow/index.js +1 -1
  130. package/lib/commands/flow/list.js +1 -1
  131. package/lib/commands/flow/page-list.js +1 -1
  132. package/lib/commands/flow/publish.js +1 -1
  133. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  134. package/lib/commands/flow/runtime-role-list.js +1 -1
  135. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  136. package/lib/commands/flow/runtime-user-search.js +1 -1
  137. package/lib/commands/flow/shared.js +1 -1
  138. package/lib/commands/flow/update.js +1 -1
  139. package/lib/commands/flow/validate.js +1 -1
  140. package/lib/commands/instant-api-policy/current.js +1 -1
  141. package/lib/commands/instant-api-policy/index.js +1 -1
  142. package/lib/commands/instant-api-policy/init.js +1 -1
  143. package/lib/commands/instant-api-policy/publish.js +1 -1
  144. package/lib/commands/instant-api-policy/pull.js +1 -1
  145. package/lib/commands/instant-api-policy/revision.js +1 -1
  146. package/lib/commands/instant-api-policy/revisions.js +1 -1
  147. package/lib/commands/instant-api-policy/rollback.js +1 -1
  148. package/lib/commands/instant-api-policy/shared.js +1 -1
  149. package/lib/commands/instant-api-policy/validate.js +1 -1
  150. package/lib/commands/issue/index.js +1 -1
  151. package/lib/commands/issue/nudge.js +1 -1
  152. package/lib/commands/issue/report.js +1 -1
  153. package/lib/commands/issue/shared.js +1 -1
  154. package/lib/commands/kb/create.js +1 -1
  155. package/lib/commands/kb/delete.js +1 -1
  156. package/lib/commands/kb/detail.js +1 -1
  157. package/lib/commands/kb/index.js +1 -1
  158. package/lib/commands/kb/list.js +1 -1
  159. package/lib/commands/kb/search.js +1 -1
  160. package/lib/commands/kb/shared.js +1 -1
  161. package/lib/commands/kb/update.js +1 -1
  162. package/lib/commands/logs/index.js +1 -1
  163. package/lib/commands/menu/asset-update.js +1 -1
  164. package/lib/commands/menu/delete.js +1 -1
  165. package/lib/commands/menu/external-link-create.js +1 -1
  166. package/lib/commands/menu/external-link-update.js +1 -1
  167. package/lib/commands/menu/group-create.js +1 -1
  168. package/lib/commands/menu/group-update.js +1 -1
  169. package/lib/commands/menu/index.js +1 -1
  170. package/lib/commands/menu/list.js +1 -1
  171. package/lib/commands/menu/move.js +1 -1
  172. package/lib/commands/menu/regroup-start.js +1 -1
  173. package/lib/commands/menu/rename.js +1 -1
  174. package/lib/commands/menu/shared/compare-table.js +1 -1
  175. package/lib/commands/menu/shared/delete-plan.js +1 -1
  176. package/lib/commands/menu/shared/facts.js +1 -1
  177. package/lib/commands/menu/shared/index.js +1 -1
  178. package/lib/commands/menu/shared/inquirer.js +1 -1
  179. package/lib/commands/menu/shared/local-pages.js +1 -1
  180. package/lib/commands/menu/shared/logic.js +1 -1
  181. package/lib/commands/menu/shared/mutations.js +1 -1
  182. package/lib/commands/menu/shared/path.js +1 -1
  183. package/lib/commands/menu/shared/service.js +1 -1
  184. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  185. package/lib/commands/menu/shared/sync-core.js +1 -1
  186. package/lib/commands/menu/shared/update-core.js +1 -1
  187. package/lib/commands/menu/shared/valid-url.js +1 -1
  188. package/lib/commands/menu/subapp-assets-status.js +1 -1
  189. package/lib/commands/menu/subapp-assets-update.js +1 -1
  190. package/lib/commands/menu/sync.js +1 -1
  191. package/lib/commands/menu/visibility-update.js +1 -1
  192. package/lib/commands/notification/config-create.js +1 -1
  193. package/lib/commands/notification/config-delete.js +1 -1
  194. package/lib/commands/notification/config-list.js +1 -1
  195. package/lib/commands/notification/config-update.js +1 -1
  196. package/lib/commands/notification/index.js +1 -1
  197. package/lib/commands/notification/shared.js +1 -1
  198. package/lib/commands/ocr/index.js +1 -1
  199. package/lib/commands/page/create.js +1 -1
  200. package/lib/commands/page/custom/detail.js +1 -1
  201. package/lib/commands/page/custom/list.js +1 -1
  202. package/lib/commands/page/custom/publish.js +1 -1
  203. package/lib/commands/page/custom/shared.js +1 -1
  204. package/lib/commands/page/custom/syntax.js +1 -1
  205. package/lib/commands/page/custom/update.js +1 -1
  206. package/lib/commands/page/data-list-status.js +1 -1
  207. package/lib/commands/page/generate-start.js +1 -1
  208. package/lib/commands/page/generate-status.js +1 -1
  209. package/lib/commands/page/index.js +1 -1
  210. package/lib/commands/page/pull.js +1 -1
  211. package/lib/commands/page/push.js +1 -1
  212. package/lib/commands/page/relation-audit.js +1 -1
  213. package/lib/commands/page/restore.js +1 -1
  214. package/lib/commands/page/shared.js +1 -1
  215. package/lib/commands/page/sync.js +1 -1
  216. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  217. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  218. package/lib/commands/project/create/format-elapsed.js +1 -1
  219. package/lib/commands/project/create/main.js +1 -1
  220. package/lib/commands/project/create/materialize-project-template.js +1 -1
  221. package/lib/commands/project/create/project-name.js +1 -1
  222. package/lib/commands/project/create/project-template-archive.js +1 -1
  223. package/lib/commands/project/create/project-template-path.js +1 -1
  224. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  225. package/lib/commands/project/create/use-format-code.js +1 -1
  226. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  227. package/lib/commands/project/domain-routing-sync.js +1 -1
  228. package/lib/commands/project/index.js +1 -1
  229. package/lib/commands/project/upgrade.js +1 -1
  230. package/lib/commands/registry.js +1 -1
  231. package/lib/commands/role/delete.js +1 -1
  232. package/lib/commands/role/detail.js +1 -1
  233. package/lib/commands/role/index.js +1 -1
  234. package/lib/commands/role/list.js +1 -1
  235. package/lib/commands/role/shared.js +1 -1
  236. package/lib/commands/role/update.js +1 -1
  237. package/lib/commands/role/user-add.js +1 -1
  238. package/lib/commands/role/user-remove.js +1 -1
  239. package/lib/commands/role/user-resolve.js +1 -1
  240. package/lib/commands/rule/get.js +1 -1
  241. package/lib/commands/rule/index.js +1 -1
  242. package/lib/commands/rule/list.js +1 -1
  243. package/lib/commands/rule/set.js +1 -1
  244. package/lib/commands/rule/shared.js +1 -1
  245. package/lib/commands/run/index.js +1 -1
  246. package/lib/commands/schema.js +1 -1
  247. package/lib/commands/sql/create.js +1 -1
  248. package/lib/commands/sql/delete.js +1 -1
  249. package/lib/commands/sql/detail.js +1 -1
  250. package/lib/commands/sql/exec.js +1 -1
  251. package/lib/commands/sql/index.js +1 -1
  252. package/lib/commands/sql/list.js +1 -1
  253. package/lib/commands/sql/pull.js +1 -1
  254. package/lib/commands/sql/push.js +1 -1
  255. package/lib/commands/sql/shared.js +1 -1
  256. package/lib/commands/sql/status.js +1 -1
  257. package/lib/commands/sql/validate.js +1 -1
  258. package/lib/commands/task/index.js +1 -1
  259. package/lib/commands/task/status.js +1 -1
  260. package/lib/commands/tenant/index.js +1 -1
  261. package/lib/commands/tenant/members-list.js +1 -1
  262. package/lib/commands/tenant/shared.js +1 -1
  263. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  264. package/lib/commands/user-account/feishu-bind.js +1 -1
  265. package/lib/commands/user-account/index.js +1 -1
  266. package/lib/commands/workspace/add.js +1 -1
  267. package/lib/commands/workspace/index.js +1 -1
  268. package/lib/commands/workspace/remove.js +1 -1
  269. package/lib/config/domain-config.js +1 -1
  270. package/lib/config/project-domain-routing.js +1 -1
  271. package/lib/config/region-config.js +1 -1
  272. package/lib/config/schema.js +1 -1
  273. package/lib/constant/cdn.js +1 -1
  274. package/lib/constant/cli.js +1 -1
  275. package/lib/constant/defaults.js +1 -1
  276. package/lib/constant/domain.js +1 -1
  277. package/lib/constant/env.js +1 -1
  278. package/lib/constant/output.js +1 -1
  279. package/lib/constant/paths.js +1 -1
  280. package/lib/constant/region.js +1 -1
  281. package/lib/constant/risk.js +1 -1
  282. package/lib/constant/routing-profile.js +1 -1
  283. package/lib/context/app-resolver.js +1 -1
  284. package/lib/context/auth-resolver.js +1 -1
  285. package/lib/context/config-loader.js +1 -1
  286. package/lib/context.js +1 -1
  287. package/lib/core/alias-resolver.js +1 -1
  288. package/lib/core/api-client.js +1 -1
  289. package/lib/core/bff/config.js +1 -1
  290. package/lib/core/bff/file-system.js +1 -1
  291. package/lib/core/bff/hash.js +1 -1
  292. package/lib/core/bff/hook-directory.js +1 -1
  293. package/lib/core/bff/lock.js +1 -1
  294. package/lib/core/bff/utils.js +1 -1
  295. package/lib/core/cross-db-analysis.js +1 -1
  296. package/lib/core/cross-db-relation.js +1 -1
  297. package/lib/core/db-resolver.js +1 -1
  298. package/lib/core/flow-config.js +1 -1
  299. package/lib/core/instant-api-policy/config.js +1 -1
  300. package/lib/core/kb-search-client.js +1 -1
  301. package/lib/core/page/file-system.js +1 -1
  302. package/lib/core/page/hash.js +1 -1
  303. package/lib/core/page/lock.js +1 -1
  304. package/lib/core/page/lr-smart-jsx.js +1 -1
  305. package/lib/core/sql-index-auditor.js +1 -1
  306. package/lib/core/sql-sync/config.js +1 -1
  307. package/lib/core/sql-sync/file-system.js +1 -1
  308. package/lib/core/sql-sync/hash.js +1 -1
  309. package/lib/core/sql-sync/lock.js +1 -1
  310. package/lib/core/sql-sync/utils.js +1 -1
  311. package/lib/core/sql-validator.js +1 -1
  312. package/lib/errors.js +1 -1
  313. package/lib/framework/build-all-flags.js +1 -1
  314. package/lib/framework/error-output.js +1 -1
  315. package/lib/framework/explicit-yes.js +1 -1
  316. package/lib/framework/flags.js +1 -1
  317. package/lib/framework/help.js +1 -1
  318. package/lib/framework/index.js +1 -1
  319. package/lib/framework/output.js +1 -1
  320. package/lib/framework/response.js +1 -1
  321. package/lib/framework/runner-alias.js +1 -1
  322. package/lib/framework/runner.js +1 -1
  323. package/lib/framework/schema-export.js +1 -1
  324. package/lib/framework/supported-flags.js +1 -1
  325. package/lib/framework/types.js +1 -1
  326. package/lib/generated/build-info.d.ts +4 -4
  327. package/lib/generated/build-info.js +1 -1
  328. package/lib/generated/official-routing.js +1 -1
  329. package/lib/generated/routing-contract.js +1 -1
  330. package/lib/help.js +1 -1
  331. package/lib/postinstall.js +1 -1
  332. package/lib/runtime/confirmation.js +1 -1
  333. package/lib/runtime/event.js +1 -1
  334. package/lib/runtime/index.js +1 -1
  335. package/lib/runtime/queue.js +1 -1
  336. package/lib/runtime/resolve.js +1 -1
  337. package/lib/services/dataset-design/checkpoint.js +1 -1
  338. package/lib/services/dataset-design/commands.js +1 -1
  339. package/lib/services/dataset-design/contract.js +1 -1
  340. package/lib/skills/builtin-skill.js +1 -1
  341. package/lib/skills/main.js +1 -1
  342. package/lib/skills/npx-skills-add.js +1 -1
  343. package/lib/skills/skill-presence.js +1 -1
  344. package/lib/telemetry/cli-command-trace.js +1 -1
  345. package/lib/telemetry/cli-help-trace.js +1 -1
  346. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  347. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  348. package/lib/telemetry/send-cli-trace-log.js +1 -1
  349. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  350. package/lib/utils/ai_config.js +1 -1
  351. package/lib/utils/apply-jq-filter.js +1 -1
  352. package/lib/utils/cdn-config.js +1 -1
  353. package/lib/utils/check-sdk-version.js +1 -1
  354. package/lib/utils/cli-version-check.js +1 -1
  355. package/lib/utils/cli-version-policy.js +1 -1
  356. package/lib/utils/config.js +1 -1
  357. package/lib/utils/entity-with-id.js +1 -1
  358. package/lib/utils/file-utils.js +1 -1
  359. package/lib/utils/guides-cdn.js +1 -1
  360. package/lib/utils/http-client.js +1 -1
  361. package/lib/utils/is-non-interactive.js +1 -1
  362. package/lib/utils/logger.js +1 -1
  363. package/lib/utils/params.js +1 -1
  364. package/lib/utils/platform.js +1 -1
  365. package/lib/utils/sleep.js +1 -1
  366. package/lib/utils/template-replacer.js +1 -1
  367. package/lib/utils/update-notice.js +1 -1
  368. package/lib/utils/version.js +1 -1
  369. package/lib/utils/with-active-cookie.js +1 -1
  370. package/lib/utils/write-cli-side-channel.js +1 -1
  371. package/package.json +1 -1
  372. package/skills/rabetbase/SKILL.md +1 -1
  373. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  374. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  375. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- (function(_0x2d5ba4,_0x4dac77){const _0x1efd3f=a216_0x37b4,_0x216b99=_0x2d5ba4();while(!![]){try{const _0x16e52b=parseInt(_0x1efd3f(0x1ff))/0x1*(parseInt(_0x1efd3f(0x21c))/0x2)+parseInt(_0x1efd3f(0x1ee))/0x3*(-parseInt(_0x1efd3f(0x1f3))/0x4)+-parseInt(_0x1efd3f(0x206))/0x5+parseInt(_0x1efd3f(0x21b))/0x6+parseInt(_0x1efd3f(0x213))/0x7*(-parseInt(_0x1efd3f(0x1f7))/0x8)+-parseInt(_0x1efd3f(0x227))/0x9+-parseInt(_0x1efd3f(0x1fd))/0xa*(-parseInt(_0x1efd3f(0x1f5))/0xb);if(_0x16e52b===_0x4dac77)break;else _0x216b99['push'](_0x216b99['shift']());}catch(_0x236f81){_0x216b99['push'](_0x216b99['shift']());}}}(a216_0x4d26,0xdc7e2));function a216_0x37b4(_0x5cb94c,_0x1ff54f){_0x5cb94c=_0x5cb94c-0x1e9;const _0x4d26c0=a216_0x4d26();let _0x37b4d7=_0x4d26c0[_0x5cb94c];return _0x37b4d7;}import{copyFileSync,existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import a216_0xbc7add 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';function a216_0x4d26(){const _0x2ee950=['.rabetbase','create','outputDir','Profile-aware\x20model\x20selection\x20generated\x20by\x20Rabetbase\x20CLI','external-api-dir','push','object','migrate-single-app','16060455kcdbwg','add','find','map','flatMap','parse','manualMergeRequired','keys','Multiple\x20Lovrabet\x20model\x20profiles\x20match\x20Runtime\x20Domain','unconfigured','Recognized\x20legacy\x20CLI\x20scaffold;\x20a\x20backup\x20will\x20be\x20retained.','basename','preserve','path','apps','relative','1052868kEedUp','dirname','app','-api.ts','LOVRABET_RUNTIME_DOMAIN','4HmpiCc','join','22asFWzs','apiGroup','560WLKPfN','isDefault','utf8','api.ts','single','entries','12947230wmtiBH','defaultApp','13QWbzrN','The\x20file\x20contains\x20project-owned\x20code\x20and\x20will\x20not\x20be\x20overwritten.','modelRuntime','action','includes','sdk-config.ts','has','7689565nHLTXP','candidatePath','project-upgrade','some','name','backups','apiDir','replace-generated','client.ts','string','candidates','profiles','appcode','156863jDTDJP','client','normalizedApiDir','project','default','length','unchanged','manual-merge','10763322YujmIo','271046jFoWKl','files','.rabetbase.json'];a216_0x4d26=function(){return _0x2ee950;};return a216_0x4d26();}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='/**\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';function relativeMigrationDir(_0x212269,_0xafd167){const _0x287d37=a216_0x37b4,_0x5222c7=a216_0xbc7add[_0x287d37(0x1ed)](_0x212269,_0xafd167);return _0x5222c7&&!_0x5222c7['startsWith']('..')?_0x5222c7:_0x287d37(0x223);}function candidatePath(_0x4e9404,_0xf16067,_0x458885){const _0x445c23=a216_0x37b4;return a216_0xbc7add[_0x445c23(0x1f4)](_0x4e9404,_0x445c23(0x21f),'project-upgrade',MIGRATION_ID,_0x445c23(0x210),relativeMigrationDir(_0x4e9404,_0xf16067),_0x458885);}function backupPath(_0x4a4c4f,_0x5b7f1e,_0x30ff3b){const _0x288e0e=a216_0x37b4;return a216_0xbc7add[_0x288e0e(0x1f4)](_0x4a4c4f,_0x288e0e(0x21f),_0x288e0e(0x208),MIGRATION_ID,_0x288e0e(0x20b),relativeMigrationDir(_0x4a4c4f,_0x5b7f1e),_0x30ff3b);}function readOptional(_0x3383fd){try{return readFileSync(_0x3383fd,'utf8');}catch{return undefined;}}function readJsonObject(_0x426f4a){const _0x58fc3b=a216_0x37b4;try{const _0x4ca19e=JSON[_0x58fc3b(0x22c)](readFileSync(_0x426f4a,_0x58fc3b(0x1f9)));return _0x4ca19e&&typeof _0x4ca19e===_0x58fc3b(0x225)?_0x4ca19e:{};}catch{return{};}}function planEntrypoint(_0x3c1190,_0x4e977e,_0x1719af,_0x52e050){const _0x2952a1=a216_0x37b4,_0x3a69f3=a216_0xbc7add[_0x2952a1(0x1f4)](_0x4e977e,_0x1719af),_0x1840e6=readOptional(_0x3a69f3);if(_0x1840e6===undefined)return{'path':_0x3a69f3,'action':_0x2952a1(0x220)};if(_0x1719af===_0x2952a1(0x1fa)?_0x1840e6['includes']('./models.generated')&&_0x1840e6[_0x2952a1(0x203)]('./model-runtime'):_0x1840e6[_0x2952a1(0x203)](_0x2952a1(0x1f2)))return{'path':_0x3a69f3,'action':_0x2952a1(0x219)};if(_0x52e050(_0x1840e6))return{'path':_0x3a69f3,'action':'replace-generated','reason':_0x2952a1(0x231)};return{'path':_0x3a69f3,'action':'manual-merge','reason':_0x2952a1(0x200),'candidatePath':candidatePath(_0x3c1190,_0x4e977e,_0x1719af)};}function syntheticApps(_0x569884){const _0x4766ae=a216_0x37b4,_0x182f7a=_0x569884[_0x4766ae(0x1ec)]&&typeof _0x569884[_0x4766ae(0x1ec)]==='object'?_0x569884[_0x4766ae(0x1ec)]:undefined;if(_0x182f7a&&Object[_0x4766ae(0x22e)](_0x182f7a)[_0x4766ae(0x218)]>0x0){const _0x38690a=typeof _0x569884['defaultApp']==='string'?_0x569884['defaultApp']:Object[_0x4766ae(0x22e)](_0x182f7a)['length']===0x1?Object[_0x4766ae(0x22e)](_0x182f7a)[0x0]:undefined;return Object[_0x4766ae(0x1fc)](_0x182f7a)[_0x4766ae(0x22b)](([_0x30ec0f,_0x331e5e])=>{const _0x1a6702=_0x4766ae,_0x46a724=_0x331e5e,_0x2e3d9d=typeof _0x46a724[_0x1a6702(0x212)]===_0x1a6702(0x20f)?_0x46a724[_0x1a6702(0x212)]:'';return _0x2e3d9d?[{'name':_0x30ec0f,'appcode':_0x2e3d9d,'apiGroup':typeof _0x46a724['apiGroup']==='string'?_0x46a724['apiGroup']:undefined,'isDefault':_0x30ec0f===_0x38690a,'region':'cn','regionSource':_0x1a6702(0x217),'apiDir':typeof _0x46a724[_0x1a6702(0x20c)]===_0x1a6702(0x20f)?_0x46a724[_0x1a6702(0x20c)]:typeof _0x569884[_0x1a6702(0x20c)]===_0x1a6702(0x20f)?_0x569884[_0x1a6702(0x20c)]:undefined,'routingConfig':{}}]:[];});}const _0x185774=typeof _0x569884[_0x4766ae(0x212)]==='string'?_0x569884[_0x4766ae(0x212)]:typeof _0x569884[_0x4766ae(0x1f0)]===_0x4766ae(0x20f)?_0x569884[_0x4766ae(0x1f0)]:undefined;if(!_0x185774)return[];return[{'name':_0x185774,'appcode':_0x185774,'isDefault':!![],'region':'cn','regionSource':'default','apiDir':typeof _0x569884['apiDir']===_0x4766ae(0x20f)?_0x569884[_0x4766ae(0x20c)]:undefined,'routingConfig':{}}];}function configuredLayouts(_0x34a932,_0x471864){const _0x3ac689=a216_0x37b4;return resolveApiProfileLayouts(_0x471864,_0x45510f=>a216_0xbc7add['resolve'](_0x34a932,_0x45510f[_0x3ac689(0x20c)]||DEFAULT_API_DIR),_0x34a932);}function uniqueRegistryGroups(_0x5e74ae){const _0x5076c6=a216_0x37b4,_0x1ce98c=[],_0x4a0ed1=new Set(),_0x1a3d5d=new Set();for(const _0x5e1cdf of _0x5e74ae){const _0x30ee99=getRegistryGroup(_0x5e74ae,_0x5e1cdf);if(!_0x30ee99){_0x4a0ed1[_0x5076c6(0x228)](_0x5e1cdf[_0x5076c6(0x221)]);continue;}const _0x1de5ae=_0x5e1cdf[_0x5076c6(0x215)]+'\x00'+(_0x5e1cdf[_0x5076c6(0x1f6)]??_0x5076c6(0x1fb));!_0x1a3d5d[_0x5076c6(0x205)](_0x1de5ae)&&(_0x1ce98c[_0x5076c6(0x224)](_0x30ee99),_0x1a3d5d[_0x5076c6(0x228)](_0x1de5ae));}return{'groups':_0x1ce98c,'skipped':[..._0x4a0ed1]};}function planGroup(_0x5c6005,_0x3aa29c){const _0x29f65b=a216_0x37b4,_0x3d8dbd=_0x3aa29c[0x0]['normalizedApiDir'],_0x1f2373=a216_0xbc7add[_0x29f65b(0x1f4)](_0x3d8dbd,MODEL_RUNTIME_FILE_NAME),_0x2e7c51=readOptional(_0x1f2373),_0x101d0a=_0x2e7c51!==undefined&&_0x2e7c51[_0x29f65b(0x203)](_0x29f65b(0x222))&&_0x2e7c51['includes'](_0x29f65b(0x22f))&&_0x2e7c51[_0x29f65b(0x203)]('No\x20Lovrabet\x20model\x20profile\x20matches\x20Runtime\x20Domain'),_0x2c0bbb=a216_0xbc7add[_0x29f65b(0x1f4)](_0x3d8dbd,MODEL_REGISTRY_FILE_NAME),_0x1350f=a216_0xbc7add[_0x29f65b(0x1f4)](_0x3d8dbd,_0x29f65b(0x204)),_0x260361=[planEntrypoint(_0x5c6005,_0x3d8dbd,_0x29f65b(0x1fa),isLegacyGeneratedApiScaffold),planEntrypoint(_0x5c6005,_0x3d8dbd,_0x29f65b(0x20e),isLegacyGeneratedClientScaffold),{'path':_0x1f2373,'action':_0x2e7c51===undefined?'create':_0x101d0a?_0x29f65b(0x219):'manual-merge','reason':_0x2e7c51===undefined?undefined:'The\x20existing\x20runtime\x20selector\x20is\x20not\x20a\x20recognized\x20current\x20generated\x20file.',..._0x2e7c51!==undefined&&!_0x101d0a?{'candidatePath':candidatePath(_0x5c6005,_0x3d8dbd,MODEL_RUNTIME_FILE_NAME)}:{}},{'path':_0x2c0bbb,'action':existsSync(_0x2c0bbb)?_0x29f65b(0x1ea):_0x29f65b(0x220),'reason':'Model\x20facts\x20are\x20preserved\x20and\x20completed\x20from\x20legacy\x20generated\x20files\x20when\x20possible.'},{'path':_0x1350f,'action':existsSync(_0x1350f)?_0x29f65b(0x1ea):_0x29f65b(0x220)}];return{'apiDir':_0x3d8dbd,'profiles':_0x3aa29c[_0x29f65b(0x22a)](_0x967840=>_0x967840[_0x29f65b(0x1f0)][_0x29f65b(0x20a)]),'files':_0x260361};}export function analyzeProjectApiArchitecture(_0x1816fa,_0x3592b9){const _0x34e408=a216_0x37b4,_0x31df4d=a216_0xbc7add[_0x34e408(0x1f4)](_0x1816fa,_0x34e408(0x21e)),_0x963251=_0x3592b9??(existsSync(_0x31df4d)?readJsonObject(_0x31df4d):{}),_0x5ea57f=syntheticApps(_0x963251);if(_0x5ea57f['length']===0x0)return{'migration':MIGRATION_ID,'needed':![],'configAction':_0x34e408(0x230),'groups':[],'skippedLegacyDirectories':[],'manualMergeRequired':![]};const _0xeabe91=_0x963251[_0x34e408(0x1ec)]?_0x34e408(0x219):'migrate-single-app',{groups:_0x3a6276,skipped:_0x4211d5}=uniqueRegistryGroups(configuredLayouts(_0x1816fa,_0x5ea57f)),_0x56b732=_0x3a6276[_0x34e408(0x22a)](_0x4a80bd=>planGroup(_0x1816fa,_0x4a80bd)),_0x106385=_0x56b732[_0x34e408(0x209)](_0xd9d9e9=>_0xd9d9e9[_0x34e408(0x21d)][_0x34e408(0x209)](_0x25656a=>_0x25656a['action']==='manual-merge')),_0x2cf215=_0xeabe91===_0x34e408(0x226)||_0x56b732[_0x34e408(0x209)](_0x52617c=>_0x52617c['files'][_0x34e408(0x209)](_0x5d80a3=>![_0x34e408(0x219),_0x34e408(0x1ea)]['includes'](_0x5d80a3['action'])));return{'migration':MIGRATION_ID,'needed':_0x2cf215,'configAction':_0xeabe91,'groups':_0x56b732,'skippedLegacyDirectories':_0x4211d5,'manualMergeRequired':_0x106385};}function migrateSingleAppConfig(_0x45deb3){const _0x2e7434=a216_0x37b4,_0xe47e3b=a216_0xbc7add['join'](_0x45deb3,_0x2e7434(0x21e));if(!existsSync(_0xe47e3b))return;const _0x390e1c=readConfigFile(_0xe47e3b);if(_0x390e1c[_0x2e7434(0x1ec)]&&typeof _0x390e1c[_0x2e7434(0x1ec)]==='object')return;const _0x122252=typeof _0x390e1c[_0x2e7434(0x212)]===_0x2e7434(0x20f)?_0x390e1c[_0x2e7434(0x212)]:typeof _0x390e1c[_0x2e7434(0x1f0)]===_0x2e7434(0x20f)?_0x390e1c['app']:undefined;if(!_0x122252)return;_0x390e1c[_0x2e7434(0x1ec)]={[_0x122252]:{'appcode':_0x122252}},_0x390e1c[_0x2e7434(0x1fe)]=_0x122252,delete _0x390e1c[_0x2e7434(0x1f0)],delete _0x390e1c[_0x2e7434(0x212)],writeConfigFile(_0xe47e3b,_0x390e1c);}function legacyApiPath(_0x32fd1c,_0x4337bb){const _0x2bd9ed=a216_0x37b4,_0xd137bf=_0x4337bb['normalizedApiDir'],_0xc882aa=_0x32fd1c[_0x2bd9ed(0x218)]===0x1||_0x4337bb[_0x2bd9ed(0x1f0)][_0x2bd9ed(0x1f8)]?[a216_0xbc7add['join'](_0xd137bf,_0x2bd9ed(0x1fa)),a216_0xbc7add[_0x2bd9ed(0x1f4)](_0xd137bf,_0x4337bb['app'][_0x2bd9ed(0x20a)]+_0x2bd9ed(0x1f1))]:[a216_0xbc7add['join'](_0xd137bf,_0x4337bb[_0x2bd9ed(0x1f0)][_0x2bd9ed(0x20a)]+'-api.ts')];return _0xc882aa['find'](existsSync);}function writeCandidateOrEntrypoint(_0x10e6ea,_0x561b3e,_0x155b5b,_0x23d862){const _0x11755d=a216_0x37b4;if(_0x155b5b[_0x11755d(0x202)]===_0x11755d(0x219)||_0x155b5b[_0x11755d(0x202)]===_0x11755d(0x1ea))return;if(_0x155b5b[_0x11755d(0x202)]===_0x11755d(0x21a)){const _0x3db7d7=_0x155b5b[_0x11755d(0x207)];mkdirSync(a216_0xbc7add['dirname'](_0x3db7d7),{'recursive':!![]}),writeFileSync(_0x3db7d7,_0x23d862,_0x11755d(0x1f9));return;}if(_0x155b5b[_0x11755d(0x202)]===_0x11755d(0x20d)){const _0x327b92=backupPath(_0x10e6ea,_0x561b3e,a216_0xbc7add[_0x11755d(0x1e9)](_0x155b5b[_0x11755d(0x1eb)]));mkdirSync(a216_0xbc7add[_0x11755d(0x1ef)](_0x327b92),{'recursive':!![]}),copyFileSync(_0x155b5b[_0x11755d(0x1eb)],_0x327b92);}mkdirSync(a216_0xbc7add[_0x11755d(0x1ef)](_0x155b5b[_0x11755d(0x1eb)]),{'recursive':!![]}),writeFileSync(_0x155b5b['path'],_0x23d862,_0x11755d(0x1f9));}export async function upgradeProjectApiArchitecture(_0x27e8fd){const _0x5529ed=a216_0x37b4,_0x2cef3f=analyzeProjectApiArchitecture(_0x27e8fd);migrateSingleAppConfig(_0x27e8fd);const _0x5c9c92=getMultiAppConfigs(_0x5529ed(0x216),_0x27e8fd)??[],_0x5ebc21=configuredLayouts(_0x27e8fd,_0x5c9c92),{groups:_0x48f06d}=uniqueRegistryGroups(_0x5ebc21);let _0x37e521;for(const _0x5be1e3 of _0x48f06d){const _0x306b9c=_0x5be1e3[0x0]['normalizedApiDir'];mkdirSync(_0x306b9c,{'recursive':!![]});const _0x37edd0=_0x5be1e3[_0x5529ed(0x229)](_0x6defe8=>_0x6defe8[_0x5529ed(0x1f0)]['isDefault'])??_0x5be1e3[0x0];for(const _0x5711c3 of _0x5be1e3){const _0x5a5053=a216_0xbc7add[_0x5529ed(0x1f4)](_0x306b9c,MODEL_REGISTRY_FILE_NAME),_0x36096c=readModelRegistry(_0x5a5053);if(_0x36096c?.[_0x5529ed(0x211)][_0x5711c3[_0x5529ed(0x1f0)]['name']])continue;const _0x36eb84=legacyApiPath(_0x5be1e3,_0x5711c3),_0x3d8b27=_0x36eb84?readOptional(_0x36eb84):undefined;await initMultiAppEnvironment(_0x5711c3[_0x5529ed(0x1f0)]),updateModelRegistry({'outputDir':_0x306b9c,'profileName':_0x5711c3['app'][_0x5529ed(0x20a)],'defaultProfile':_0x37edd0[_0x5529ed(0x1f0)][_0x5529ed(0x20a)],'appCode':_0x5711c3[_0x5529ed(0x1f0)][_0x5529ed(0x212)],'runtimeDomain':getRuntimeDomain(),'models':_0x3d8b27?parseLegacyApiModels(_0x3d8b27):[]});}const _0x44d1c8=await renderModelRegistryScaffold(_0x306b9c,_0x27e8fd),_0x490db7=planGroup(_0x27e8fd,_0x5be1e3);for(const _0x4b42cd of _0x490db7[_0x5529ed(0x21d)]){const _0x11fc3e=a216_0xbc7add[_0x5529ed(0x1e9)](_0x4b42cd['path']);if(_0x11fc3e===_0x5529ed(0x1fa))writeCandidateOrEntrypoint(_0x27e8fd,_0x306b9c,_0x4b42cd,_0x44d1c8['api']);else{if(_0x11fc3e===_0x5529ed(0x20e))writeCandidateOrEntrypoint(_0x27e8fd,_0x306b9c,_0x4b42cd,_0x44d1c8[_0x5529ed(0x214)]);else{if(_0x11fc3e===MODEL_RUNTIME_FILE_NAME)writeCandidateOrEntrypoint(_0x27e8fd,_0x306b9c,_0x4b42cd,_0x44d1c8[_0x5529ed(0x201)]);else _0x11fc3e===_0x5529ed(0x204)&&_0x4b42cd[_0x5529ed(0x202)]===_0x5529ed(0x220)&&writeCandidateOrEntrypoint(_0x27e8fd,_0x306b9c,_0x4b42cd,SDK_CONFIG_SOURCE);}}}}const _0x12670c=_0x5c9c92[_0x5529ed(0x229)](_0x3eeff0=>_0x3eeff0[_0x5529ed(0x1f8)])??_0x5c9c92[0x0];_0x12670c&&(await initMultiAppEnvironment(_0x12670c),_0x37e521=writeProjectDomainRoutingManifest(_0x27e8fd)[_0x5529ed(0x1eb)]);const _0x1661e3=analyzeProjectApiArchitecture(_0x27e8fd);return{..._0x2cef3f,'completed':!_0x1661e3[_0x5529ed(0x22d)],'manualMergeRequired':_0x1661e3[_0x5529ed(0x22d)],'routingPath':_0x37e521};}
1
+ (function(_0x278a5e,_0x5ae7df){const _0x1f6fa7=a216_0x4d24,_0x212a39=_0x278a5e();while(!![]){try{const _0xae82e5=-parseInt(_0x1f6fa7(0xa9))/0x1+parseInt(_0x1f6fa7(0xb7))/0x2*(-parseInt(_0x1f6fa7(0xc8))/0x3)+-parseInt(_0x1f6fa7(0x85))/0x4+parseInt(_0x1f6fa7(0xbb))/0x5+-parseInt(_0x1f6fa7(0x8f))/0x6*(-parseInt(_0x1f6fa7(0xbd))/0x7)+parseInt(_0x1f6fa7(0xbe))/0x8*(parseInt(_0x1f6fa7(0xc4))/0x9)+parseInt(_0x1f6fa7(0xa4))/0xa;if(_0xae82e5===_0x5ae7df)break;else _0x212a39['push'](_0x212a39['shift']());}catch(_0x43c172){_0x212a39['push'](_0x212a39['shift']());}}}(a216_0x209a,0xc8165));import{copyFileSync,existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import a216_0x58e569 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='/**\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';function relativeMigrationDir(_0x4c8a2a,_0x33e7f9){const _0x5ebb76=a216_0x4d24,_0x4fa388=a216_0x58e569[_0x5ebb76(0x9c)](_0x4c8a2a,_0x33e7f9);return _0x4fa388&&!_0x4fa388[_0x5ebb76(0x8d)]('..')?_0x4fa388:'external-api-dir';}function candidatePath(_0x1ee8be,_0x2015aa,_0x39a5bd){const _0x30ee14=a216_0x4d24;return a216_0x58e569[_0x30ee14(0xb1)](_0x1ee8be,_0x30ee14(0x84),'project-upgrade',MIGRATION_ID,'candidates',relativeMigrationDir(_0x1ee8be,_0x2015aa),_0x39a5bd);}function backupPath(_0x139f9d,_0x374af9,_0xcb446a){const _0x1decee=a216_0x4d24;return a216_0x58e569[_0x1decee(0xb1)](_0x139f9d,_0x1decee(0x84),_0x1decee(0x97),MIGRATION_ID,_0x1decee(0xaf),relativeMigrationDir(_0x139f9d,_0x374af9),_0xcb446a);}function readOptional(_0x69ff02){const _0x539d5e=a216_0x4d24;try{return readFileSync(_0x69ff02,_0x539d5e(0xa1));}catch{return undefined;}}function a216_0x209a(){const _0x5b51a3=['client.ts','entries','app','relative','map','unchanged','add','flatMap','utf8','default','.rabetbase.json','23826490rBwGWN','LOVRABET_RUNTIME_DOMAIN','files','client','api','1577889qbWqsI','./models.generated','unconfigured','apiDir','apps','-api.ts','backups','sdk-config.ts','join','has','replace-generated','manual-merge','create','The\x20existing\x20runtime\x20selector\x20is\x20not\x20a\x20recognized\x20current\x20generated\x20file.','8290VvRIyi','appcode','apiGroup','action','3235530cQRZwL','includes','7348439fTxodz','40SLcRJe','Recognized\x20legacy\x20CLI\x20scaffold;\x20a\x20backup\x20will\x20be\x20retained.','modelRuntime','basename','preserve','some','975573fcOhgS','normalizedApiDir','string','profiles','954kLtzvd','find','./model-runtime','project','defaultApp','.rabetbase','3623844REGtPD','name','isDefault','manualMergeRequired','object','keys','path','outputDir','startsWith','api.ts','6xPJBDe','Profile-aware\x20model\x20selection\x20generated\x20by\x20Rabetbase\x20CLI','parse','length','migrate-single-app','resolve','Multiple\x20Lovrabet\x20model\x20profiles\x20match\x20Runtime\x20Domain','No\x20Lovrabet\x20model\x20profile\x20matches\x20Runtime\x20Domain','project-upgrade','The\x20file\x20contains\x20project-owned\x20code\x20and\x20will\x20not\x20be\x20overwritten.'];a216_0x209a=function(){return _0x5b51a3;};return a216_0x209a();}function readJsonObject(_0x340bc2){const _0x3aaa18=a216_0x4d24;try{const _0x314785=JSON[_0x3aaa18(0x91)](readFileSync(_0x340bc2,_0x3aaa18(0xa1)));return _0x314785&&typeof _0x314785===_0x3aaa18(0x89)?_0x314785:{};}catch{return{};}}function a216_0x4d24(_0x4ea14c,_0x59d9df){_0x4ea14c=_0x4ea14c-0x81;const _0x209ab2=a216_0x209a();let _0x4d240e=_0x209ab2[_0x4ea14c];return _0x4d240e;}function planEntrypoint(_0x3be61c,_0x234164,_0x56a372,_0x35c4b6){const _0x104a65=a216_0x4d24,_0x3bb838=a216_0x58e569[_0x104a65(0xb1)](_0x234164,_0x56a372),_0x28ae69=readOptional(_0x3bb838);if(_0x28ae69===undefined)return{'path':_0x3bb838,'action':_0x104a65(0xb5)};if(_0x56a372===_0x104a65(0x8e)?_0x28ae69[_0x104a65(0xbc)](_0x104a65(0xaa))&&_0x28ae69[_0x104a65(0xbc)](_0x104a65(0x81)):_0x28ae69[_0x104a65(0xbc)](_0x104a65(0xa5)))return{'path':_0x3bb838,'action':'unchanged'};if(_0x35c4b6(_0x28ae69))return{'path':_0x3bb838,'action':_0x104a65(0xb3),'reason':_0x104a65(0xbf)};return{'path':_0x3bb838,'action':_0x104a65(0xb4),'reason':_0x104a65(0x98),'candidatePath':candidatePath(_0x3be61c,_0x234164,_0x56a372)};}function syntheticApps(_0x116383){const _0x49ce79=a216_0x4d24,_0x14ba8d=_0x116383[_0x49ce79(0xad)]&&typeof _0x116383[_0x49ce79(0xad)]===_0x49ce79(0x89)?_0x116383['apps']:undefined;if(_0x14ba8d&&Object['keys'](_0x14ba8d)[_0x49ce79(0x92)]>0x0){const _0x66027e=typeof _0x116383[_0x49ce79(0x83)]===_0x49ce79(0xc6)?_0x116383[_0x49ce79(0x83)]:Object['keys'](_0x14ba8d)[_0x49ce79(0x92)]===0x1?Object[_0x49ce79(0x8a)](_0x14ba8d)[0x0]:undefined;return Object[_0x49ce79(0x9a)](_0x14ba8d)[_0x49ce79(0xa0)](([_0x2092cd,_0x42be20])=>{const _0x216ff2=_0x49ce79,_0x3348a6=_0x42be20,_0x371a08=typeof _0x3348a6[_0x216ff2(0xb8)]==='string'?_0x3348a6[_0x216ff2(0xb8)]:'';return _0x371a08?[{'name':_0x2092cd,'appcode':_0x371a08,'apiGroup':typeof _0x3348a6[_0x216ff2(0xb9)]==='string'?_0x3348a6['apiGroup']:undefined,'isDefault':_0x2092cd===_0x66027e,'region':'cn','regionSource':_0x216ff2(0xa2),'apiDir':typeof _0x3348a6[_0x216ff2(0xac)]===_0x216ff2(0xc6)?_0x3348a6['apiDir']:typeof _0x116383['apiDir']===_0x216ff2(0xc6)?_0x116383[_0x216ff2(0xac)]:undefined,'routingConfig':{}}]:[];});}const _0x14aeb3=typeof _0x116383['appcode']===_0x49ce79(0xc6)?_0x116383[_0x49ce79(0xb8)]:typeof _0x116383[_0x49ce79(0x9b)]===_0x49ce79(0xc6)?_0x116383[_0x49ce79(0x9b)]:undefined;if(!_0x14aeb3)return[];return[{'name':_0x14aeb3,'appcode':_0x14aeb3,'isDefault':!![],'region':'cn','regionSource':'default','apiDir':typeof _0x116383[_0x49ce79(0xac)]===_0x49ce79(0xc6)?_0x116383[_0x49ce79(0xac)]:undefined,'routingConfig':{}}];}function configuredLayouts(_0x5d5355,_0x174340){const _0xa7733a=a216_0x4d24;return resolveApiProfileLayouts(_0x174340,_0xc8ff8c=>a216_0x58e569[_0xa7733a(0x94)](_0x5d5355,_0xc8ff8c[_0xa7733a(0xac)]||DEFAULT_API_DIR),_0x5d5355);}function uniqueRegistryGroups(_0x4e7257){const _0x13dc98=a216_0x4d24,_0x250dc4=[],_0x4e5c8d=new Set(),_0xf3b030=new Set();for(const _0x4c9535 of _0x4e7257){const _0x4ee472=getRegistryGroup(_0x4e7257,_0x4c9535);if(!_0x4ee472){_0x4e5c8d['add'](_0x4c9535[_0x13dc98(0x8c)]);continue;}const _0x4eceb1=_0x4c9535[_0x13dc98(0xc5)]+'\x00'+(_0x4c9535[_0x13dc98(0xb9)]??'single');!_0xf3b030[_0x13dc98(0xb2)](_0x4eceb1)&&(_0x250dc4['push'](_0x4ee472),_0xf3b030[_0x13dc98(0x9f)](_0x4eceb1));}return{'groups':_0x250dc4,'skipped':[..._0x4e5c8d]};}function planGroup(_0x1263d4,_0x512f42){const _0x3bba14=a216_0x4d24,_0x2adb4a=_0x512f42[0x0]['normalizedApiDir'],_0x19dc36=a216_0x58e569[_0x3bba14(0xb1)](_0x2adb4a,MODEL_RUNTIME_FILE_NAME),_0x2601cf=readOptional(_0x19dc36),_0x1febef=_0x2601cf!==undefined&&_0x2601cf[_0x3bba14(0xbc)](_0x3bba14(0x90))&&_0x2601cf['includes'](_0x3bba14(0x95))&&_0x2601cf[_0x3bba14(0xbc)](_0x3bba14(0x96)),_0x2e8728=a216_0x58e569[_0x3bba14(0xb1)](_0x2adb4a,MODEL_REGISTRY_FILE_NAME),_0x409259=a216_0x58e569[_0x3bba14(0xb1)](_0x2adb4a,_0x3bba14(0xb0)),_0xd5a0a6=[planEntrypoint(_0x1263d4,_0x2adb4a,_0x3bba14(0x8e),isLegacyGeneratedApiScaffold),planEntrypoint(_0x1263d4,_0x2adb4a,_0x3bba14(0x99),isLegacyGeneratedClientScaffold),{'path':_0x19dc36,'action':_0x2601cf===undefined?_0x3bba14(0xb5):_0x1febef?'unchanged':_0x3bba14(0xb4),'reason':_0x2601cf===undefined?undefined:_0x3bba14(0xb6),..._0x2601cf!==undefined&&!_0x1febef?{'candidatePath':candidatePath(_0x1263d4,_0x2adb4a,MODEL_RUNTIME_FILE_NAME)}:{}},{'path':_0x2e8728,'action':existsSync(_0x2e8728)?_0x3bba14(0xc2):_0x3bba14(0xb5),'reason':'Model\x20facts\x20are\x20preserved\x20and\x20completed\x20from\x20legacy\x20generated\x20files\x20when\x20possible.'},{'path':_0x409259,'action':existsSync(_0x409259)?_0x3bba14(0xc2):_0x3bba14(0xb5)}];return{'apiDir':_0x2adb4a,'profiles':_0x512f42['map'](_0x447b05=>_0x447b05['app'][_0x3bba14(0x86)]),'files':_0xd5a0a6};}export function analyzeProjectApiArchitecture(_0x1f8ba7,_0x8db860){const _0x503b60=a216_0x4d24,_0x46b8d7=a216_0x58e569['join'](_0x1f8ba7,'.rabetbase.json'),_0x1ef370=_0x8db860??(existsSync(_0x46b8d7)?readJsonObject(_0x46b8d7):{}),_0x336dd8=syntheticApps(_0x1ef370);if(_0x336dd8[_0x503b60(0x92)]===0x0)return{'migration':MIGRATION_ID,'needed':![],'configAction':_0x503b60(0xab),'groups':[],'skippedLegacyDirectories':[],'manualMergeRequired':![]};const _0x26aef6=_0x1ef370[_0x503b60(0xad)]?_0x503b60(0x9e):_0x503b60(0x93),{groups:_0x1bb9ee,skipped:_0x33fe83}=uniqueRegistryGroups(configuredLayouts(_0x1f8ba7,_0x336dd8)),_0x125a74=_0x1bb9ee[_0x503b60(0x9d)](_0x3c000b=>planGroup(_0x1f8ba7,_0x3c000b)),_0x65bea9=_0x125a74[_0x503b60(0xc3)](_0x29a1cc=>_0x29a1cc['files'][_0x503b60(0xc3)](_0x4ecf41=>_0x4ecf41['action']===_0x503b60(0xb4))),_0x2b09a2=_0x26aef6===_0x503b60(0x93)||_0x125a74[_0x503b60(0xc3)](_0x30d90e=>_0x30d90e[_0x503b60(0xa6)][_0x503b60(0xc3)](_0x331a17=>![_0x503b60(0x9e),_0x503b60(0xc2)]['includes'](_0x331a17['action'])));return{'migration':MIGRATION_ID,'needed':_0x2b09a2,'configAction':_0x26aef6,'groups':_0x125a74,'skippedLegacyDirectories':_0x33fe83,'manualMergeRequired':_0x65bea9};}function migrateSingleAppConfig(_0x1b8069){const _0x479711=a216_0x4d24,_0x28bb7b=a216_0x58e569[_0x479711(0xb1)](_0x1b8069,_0x479711(0xa3));if(!existsSync(_0x28bb7b))return;const _0x2585d6=readConfigFile(_0x28bb7b);if(_0x2585d6[_0x479711(0xad)]&&typeof _0x2585d6['apps']===_0x479711(0x89))return;const _0x25768b=typeof _0x2585d6[_0x479711(0xb8)]===_0x479711(0xc6)?_0x2585d6[_0x479711(0xb8)]:typeof _0x2585d6['app']==='string'?_0x2585d6[_0x479711(0x9b)]:undefined;if(!_0x25768b)return;_0x2585d6[_0x479711(0xad)]={[_0x25768b]:{'appcode':_0x25768b}},_0x2585d6[_0x479711(0x83)]=_0x25768b,delete _0x2585d6[_0x479711(0x9b)],delete _0x2585d6[_0x479711(0xb8)],writeConfigFile(_0x28bb7b,_0x2585d6);}function legacyApiPath(_0x169138,_0x28d8b0){const _0x1a487d=a216_0x4d24,_0x2935f0=_0x28d8b0[_0x1a487d(0xc5)],_0x480262=_0x169138[_0x1a487d(0x92)]===0x1||_0x28d8b0[_0x1a487d(0x9b)][_0x1a487d(0x87)]?[a216_0x58e569[_0x1a487d(0xb1)](_0x2935f0,_0x1a487d(0x8e)),a216_0x58e569[_0x1a487d(0xb1)](_0x2935f0,_0x28d8b0[_0x1a487d(0x9b)][_0x1a487d(0x86)]+_0x1a487d(0xae))]:[a216_0x58e569[_0x1a487d(0xb1)](_0x2935f0,_0x28d8b0[_0x1a487d(0x9b)][_0x1a487d(0x86)]+_0x1a487d(0xae))];return _0x480262[_0x1a487d(0xc9)](existsSync);}function writeCandidateOrEntrypoint(_0xc47520,_0x155d1b,_0x180ba5,_0x2c0135){const _0x13e4c6=a216_0x4d24;if(_0x180ba5['action']==='unchanged'||_0x180ba5[_0x13e4c6(0xba)]==='preserve')return;if(_0x180ba5[_0x13e4c6(0xba)]==='manual-merge'){const _0x418dc5=_0x180ba5['candidatePath'];mkdirSync(a216_0x58e569['dirname'](_0x418dc5),{'recursive':!![]}),writeFileSync(_0x418dc5,_0x2c0135,_0x13e4c6(0xa1));return;}if(_0x180ba5[_0x13e4c6(0xba)]==='replace-generated'){const _0x34200d=backupPath(_0xc47520,_0x155d1b,a216_0x58e569[_0x13e4c6(0xc1)](_0x180ba5[_0x13e4c6(0x8b)]));mkdirSync(a216_0x58e569['dirname'](_0x34200d),{'recursive':!![]}),copyFileSync(_0x180ba5[_0x13e4c6(0x8b)],_0x34200d);}mkdirSync(a216_0x58e569['dirname'](_0x180ba5[_0x13e4c6(0x8b)]),{'recursive':!![]}),writeFileSync(_0x180ba5['path'],_0x2c0135,'utf8');}export async function upgradeProjectApiArchitecture(_0x5b769e){const _0x2e5c8c=a216_0x4d24,_0x2b7e54=analyzeProjectApiArchitecture(_0x5b769e);migrateSingleAppConfig(_0x5b769e);const _0x506a2f=getMultiAppConfigs(_0x2e5c8c(0x82),_0x5b769e)??[],_0x3af56a=configuredLayouts(_0x5b769e,_0x506a2f),{groups:_0xe6150}=uniqueRegistryGroups(_0x3af56a);let _0x26404b;for(const _0x4236fd of _0xe6150){const _0x2dba1c=_0x4236fd[0x0]['normalizedApiDir'];mkdirSync(_0x2dba1c,{'recursive':!![]});const _0x5321f7=_0x4236fd[_0x2e5c8c(0xc9)](_0x382812=>_0x382812[_0x2e5c8c(0x9b)][_0x2e5c8c(0x87)])??_0x4236fd[0x0];for(const _0x4a56b0 of _0x4236fd){const _0x5356c1=a216_0x58e569[_0x2e5c8c(0xb1)](_0x2dba1c,MODEL_REGISTRY_FILE_NAME),_0x7da698=readModelRegistry(_0x5356c1);if(_0x7da698?.[_0x2e5c8c(0xc7)][_0x4a56b0[_0x2e5c8c(0x9b)]['name']])continue;const _0x268164=legacyApiPath(_0x4236fd,_0x4a56b0),_0x1f80e5=_0x268164?readOptional(_0x268164):undefined;await initMultiAppEnvironment(_0x4a56b0[_0x2e5c8c(0x9b)]),updateModelRegistry({'outputDir':_0x2dba1c,'profileName':_0x4a56b0[_0x2e5c8c(0x9b)][_0x2e5c8c(0x86)],'defaultProfile':_0x5321f7[_0x2e5c8c(0x9b)][_0x2e5c8c(0x86)],'appCode':_0x4a56b0['app']['appcode'],'runtimeDomain':getRuntimeDomain(),'models':_0x1f80e5?parseLegacyApiModels(_0x1f80e5):[]});}const _0x3937c7=await renderModelRegistryScaffold(_0x2dba1c,_0x5b769e),_0x3b4096=planGroup(_0x5b769e,_0x4236fd);for(const _0x1b3f62 of _0x3b4096['files']){const _0x523c21=a216_0x58e569[_0x2e5c8c(0xc1)](_0x1b3f62['path']);if(_0x523c21==='api.ts')writeCandidateOrEntrypoint(_0x5b769e,_0x2dba1c,_0x1b3f62,_0x3937c7[_0x2e5c8c(0xa8)]);else{if(_0x523c21===_0x2e5c8c(0x99))writeCandidateOrEntrypoint(_0x5b769e,_0x2dba1c,_0x1b3f62,_0x3937c7[_0x2e5c8c(0xa7)]);else{if(_0x523c21===MODEL_RUNTIME_FILE_NAME)writeCandidateOrEntrypoint(_0x5b769e,_0x2dba1c,_0x1b3f62,_0x3937c7[_0x2e5c8c(0xc0)]);else _0x523c21===_0x2e5c8c(0xb0)&&_0x1b3f62[_0x2e5c8c(0xba)]===_0x2e5c8c(0xb5)&&writeCandidateOrEntrypoint(_0x5b769e,_0x2dba1c,_0x1b3f62,SDK_CONFIG_SOURCE);}}}}const _0x4a9d1e=_0x506a2f[_0x2e5c8c(0xc9)](_0x588271=>_0x588271[_0x2e5c8c(0x87)])??_0x506a2f[0x0];_0x4a9d1e&&(await initMultiAppEnvironment(_0x4a9d1e),_0x26404b=writeProjectDomainRoutingManifest(_0x5b769e)[_0x2e5c8c(0x8b)]);const _0x4ff90c=analyzeProjectApiArchitecture(_0x5b769e);return{..._0x2b7e54,'completed':!_0x4ff90c['manualMergeRequired'],'manualMergeRequired':_0x4ff90c[_0x2e5c8c(0x88)],'routingPath':_0x26404b};}
@@ -1 +1 @@
1
- (function(_0xc01253,_0x17a092){const _0x198bcd=a217_0x449b,_0x3f91cf=_0xc01253();while(!![]){try{const _0x502a26=-parseInt(_0x198bcd(0x1ba))/0x1+-parseInt(_0x198bcd(0x1cf))/0x2*(parseInt(_0x198bcd(0x1b9))/0x3)+-parseInt(_0x198bcd(0x1c8))/0x4+-parseInt(_0x198bcd(0x1cd))/0x5*(-parseInt(_0x198bcd(0x1be))/0x6)+parseInt(_0x198bcd(0x1bb))/0x7*(-parseInt(_0x198bcd(0x1cc))/0x8)+-parseInt(_0x198bcd(0x1cb))/0x9+parseInt(_0x198bcd(0x1d1))/0xa*(parseInt(_0x198bcd(0x1ca))/0xb);if(_0x502a26===_0x17a092)break;else _0x3f91cf['push'](_0x3f91cf['shift']());}catch(_0x2b19fc){_0x3f91cf['push'](_0x3f91cf['shift']());}}}(a217_0x3d95,0x45614));import{existsSync}from'node:fs';import a217_0x5d6ba7 from'node:path';function a217_0x449b(_0xedcc0d,_0x5b719a){_0xedcc0d=_0xedcc0d-0x1b9;const _0x3d95c8=a217_0x3d95();let _0x449b06=_0x3d95c8[_0xedcc0d];return _0x449b06;}import a217_0x20f270 from'chalk';import{input,confirm}from'@inquirer/prompts';function a217_0x3d95(){const _0x22d668=['green','Skipped','Project\x20name:','env','cwd','√\x20Project\x20Name:\x20','√\x20Login\x20status:\x20','resolve','679948VVLwXE','cyan','176AuWXJp','1047042ZnTCFW','48wijvxW','15270qsJtuD','log','26VfWpkb','string','500830mFNAnp','Logged\x20in','my-app','trim','\x22\x20already\x20exists','101406cLDOGj','12719JjJPlR','272678TckZVR','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','production','894QLvgPk','Not\x20set'];a217_0x3d95=function(){return _0x22d668;};return a217_0x3d95();}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(_0x440b48,_0xde8074,_0x30cbb9){const _0x53dfe9=a217_0x449b,_0x5dbc0c=_0x53dfe9(0x1d3),_0x1b7fb8=readConfig(),_0x321c93=typeof _0x1b7fb8[_0x53dfe9(0x1c3)]===_0x53dfe9(0x1d0)?_0x1b7fb8[_0x53dfe9(0x1c3)]:undefined,_0x228578=await input({'message':_0x53dfe9(0x1c2),'default':_0x5dbc0c,'validate':_0x3808fe=>{const _0x50ed67=_0x53dfe9,_0x1abcfb=_0x3808fe[_0x50ed67(0x1d4)]()||_0x5dbc0c,_0x5b3142=getProjectNameValidationError(_0x1abcfb);if(_0x5b3142)return _0x5b3142;const _0x42a5bd=a217_0x5d6ba7[_0x50ed67(0x1c7)](process[_0x50ed67(0x1c4)](),_0x1abcfb);if(existsSync(_0x42a5bd))return'Directory\x20\x22'+_0x1abcfb+_0x50ed67(0x1d5);return!![];}});console[_0x53dfe9(0x1ce)](a217_0x20f270['green'](_0x53dfe9(0x1c5)+a217_0x20f270[_0x53dfe9(0x1c9)](_0x228578)));const _0x1f6ed0=await selectSingleAppcode(_0x30cbb9);console[_0x53dfe9(0x1ce)](a217_0x20f270[_0x53dfe9(0x1c0)]('√\x20App\x20Code:\x20'+a217_0x20f270['cyan'](_0x1f6ed0||_0x53dfe9(0x1bf))));if(_0x1f6ed0){const _0x3c2e50=await getIsSessionValid();if(!_0x3c2e50){const _0x3a0318=await confirm({'message':_0x53dfe9(0x1bc),'default':!![]});if(_0x3a0318){const _0x371cd3=await authServer({'silent':!![]});console[_0x53dfe9(0x1ce)](a217_0x20f270[_0x53dfe9(0x1c0)](_0x53dfe9(0x1c6)+a217_0x20f270[_0x53dfe9(0x1c9)](_0x371cd3?_0x53dfe9(0x1d2):'Login\x20failed')));}else console[_0x53dfe9(0x1ce)](a217_0x20f270[_0x53dfe9(0x1c0)](_0x53dfe9(0x1c6)+a217_0x20f270['cyan'](_0x53dfe9(0x1c1))));}await _0x440b48({'projectName':_0x228578,'appCode':_0x1f6ed0,'env':_0xde8074||_0x321c93||_0x53dfe9(0x1bd)});}else await _0x440b48({'projectName':_0x228578,'env':_0xde8074||_0x321c93||_0x53dfe9(0x1bd)});}
1
+ (function(_0x1448cd,_0x33164a){const _0x1483af=a217_0x2fc8,_0x33b4ee=_0x1448cd();while(!![]){try{const _0x493fbc=parseInt(_0x1483af(0x144))/0x1*(-parseInt(_0x1483af(0x14f))/0x2)+-parseInt(_0x1483af(0x148))/0x3*(-parseInt(_0x1483af(0x14c))/0x4)+parseInt(_0x1483af(0x14a))/0x5+-parseInt(_0x1483af(0x13f))/0x6+parseInt(_0x1483af(0x150))/0x7*(parseInt(_0x1483af(0x13c))/0x8)+parseInt(_0x1483af(0x153))/0x9*(parseInt(_0x1483af(0x155))/0xa)+-parseInt(_0x1483af(0x146))/0xb;if(_0x493fbc===_0x33164a)break;else _0x33b4ee['push'](_0x33b4ee['shift']());}catch(_0x25f627){_0x33b4ee['push'](_0x33b4ee['shift']());}}}(a217_0x39eb,0x9eb2c));import{existsSync}from'node:fs';import a217_0x437af7 from'node:path';function a217_0x39eb(){const _0x5e3bca=['2cDelqr','Skipped','9620017zrdNxf','green','1767jNdEnT','cyan','2664875pYxxFx','env','8812utPtax','\x22\x20already\x20exists','my-app','568204KZxTrc','173971RFXEQy','string','Not\x20set','27NUILZU','log','775510IdKkmc','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','296XBYNBO','√\x20Project\x20Name:\x20','√\x20Login\x20status:\x20','5339862fwphVF','√\x20App\x20Code:\x20','trim','resolve','cwd'];a217_0x39eb=function(){return _0x5e3bca;};return a217_0x39eb();}import a217_0x3f1325 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';function a217_0x2fc8(_0x533733,_0x4449ab){_0x533733=_0x533733-0x13b;const _0x39eb95=a217_0x39eb();let _0x2fc85d=_0x39eb95[_0x533733];return _0x2fc85d;}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(_0x42e281,_0x36c970,_0x2ff62f){const _0x56d9dc=a217_0x2fc8,_0x35dadd=_0x56d9dc(0x14e),_0x3a9f3e=readConfig(),_0x387a96=typeof _0x3a9f3e[_0x56d9dc(0x14b)]===_0x56d9dc(0x151)?_0x3a9f3e[_0x56d9dc(0x14b)]:undefined,_0x1b4f62=await input({'message':'Project\x20name:','default':_0x35dadd,'validate':_0x1bfc89=>{const _0xec7f16=_0x56d9dc,_0x546744=_0x1bfc89[_0xec7f16(0x141)]()||_0x35dadd,_0x28161a=getProjectNameValidationError(_0x546744);if(_0x28161a)return _0x28161a;const _0x560176=a217_0x437af7[_0xec7f16(0x142)](process[_0xec7f16(0x143)](),_0x546744);if(existsSync(_0x560176))return'Directory\x20\x22'+_0x546744+_0xec7f16(0x14d);return!![];}});console['log'](a217_0x3f1325['green'](_0x56d9dc(0x13d)+a217_0x3f1325[_0x56d9dc(0x149)](_0x1b4f62)));const _0xeeeb5b=await selectSingleAppcode(_0x2ff62f);console[_0x56d9dc(0x154)](a217_0x3f1325['green'](_0x56d9dc(0x140)+a217_0x3f1325[_0x56d9dc(0x149)](_0xeeeb5b||_0x56d9dc(0x152))));if(_0xeeeb5b){const _0x5b7700=await getIsSessionValid();if(!_0x5b7700){const _0x5a1a2a=await confirm({'message':_0x56d9dc(0x13b),'default':!![]});if(_0x5a1a2a){const _0x28d40f=await authServer({'silent':!![]});console[_0x56d9dc(0x154)](a217_0x3f1325[_0x56d9dc(0x147)](_0x56d9dc(0x13e)+a217_0x3f1325[_0x56d9dc(0x149)](_0x28d40f?'Logged\x20in':'Login\x20failed')));}else console['log'](a217_0x3f1325[_0x56d9dc(0x147)](_0x56d9dc(0x13e)+a217_0x3f1325[_0x56d9dc(0x149)](_0x56d9dc(0x145))));}await _0x42e281({'projectName':_0x1b4f62,'appCode':_0xeeeb5b,'env':_0x36c970||_0x387a96||'production'});}else await _0x42e281({'projectName':_0x1b4f62,'env':_0x36c970||_0x387a96||'production'});}
@@ -1 +1 @@
1
- (function(_0x2e40f8,_0x2c5234){const _0x313b47=a218_0x3c8c,_0x22929c=_0x2e40f8();while(!![]){try{const _0x41651c=parseInt(_0x313b47(0x184))/0x1*(parseInt(_0x313b47(0x187))/0x2)+parseInt(_0x313b47(0x180))/0x3*(-parseInt(_0x313b47(0x185))/0x4)+parseInt(_0x313b47(0x182))/0x5+-parseInt(_0x313b47(0x181))/0x6*(parseInt(_0x313b47(0x17d))/0x7)+parseInt(_0x313b47(0x186))/0x8*(-parseInt(_0x313b47(0x18a))/0x9)+-parseInt(_0x313b47(0x183))/0xa*(parseInt(_0x313b47(0x188))/0xb)+parseInt(_0x313b47(0x189))/0xc;if(_0x41651c===_0x2c5234)break;else _0x22929c['push'](_0x22929c['shift']());}catch(_0x1dc01d){_0x22929c['push'](_0x22929c['shift']());}}}(a218_0x512f,0x7c801));function a218_0x3c8c(_0x1ee3b3,_0x619347){_0x1ee3b3=_0x1ee3b3-0x17d;const _0x512f36=a218_0x512f();let _0x3c8c62=_0x512f36[_0x1ee3b3];return _0x3c8c62;}function a218_0x512f(){const _0xb0be39=['132PMYzAZ','78024LHKiap','58454TxzuMK','125059RwxRBw','12539280PshHKC','144ORbyXw','replace','287qJZdzu','toFixed','now','4254CGiuwS','113706LXINFy','1348215oszXAq','540ZifOhq','27veQkYa'];a218_0x512f=function(){return _0xb0be39;};return a218_0x512f();}export function formatElapsed(_0x4bea31){const _0x1df13a=a218_0x3c8c,_0x3abb27=Date[_0x1df13a(0x17f)]()-_0x4bea31;if(_0x3abb27<0x3e8)return _0x3abb27+'ms';const _0xe7068e=(_0x3abb27/0x3e8)[_0x1df13a(0x17e)](0x2),_0x2bd340=_0xe7068e[_0x1df13a(0x18b)](/\.?0+$/u,'');return _0x2bd340+'s';}
1
+ function a218_0x1e39(_0x27f65f,_0x27b2f8){_0x27f65f=_0x27f65f-0xec;const _0x4d554b=a218_0x4d55();let _0x1e39f3=_0x4d554b[_0x27f65f];return _0x1e39f3;}(function(_0x213f81,_0x45d16c){const _0x1eeb49=a218_0x1e39,_0x2158ca=_0x213f81();while(!![]){try{const _0x15905e=parseInt(_0x1eeb49(0xee))/0x1*(parseInt(_0x1eeb49(0xf4))/0x2)+-parseInt(_0x1eeb49(0xec))/0x3+-parseInt(_0x1eeb49(0xef))/0x4+parseInt(_0x1eeb49(0xf0))/0x5*(parseInt(_0x1eeb49(0xf3))/0x6)+parseInt(_0x1eeb49(0xf1))/0x7+-parseInt(_0x1eeb49(0xf6))/0x8*(-parseInt(_0x1eeb49(0xf5))/0x9)+-parseInt(_0x1eeb49(0xf2))/0xa;if(_0x15905e===_0x45d16c)break;else _0x2158ca['push'](_0x2158ca['shift']());}catch(_0x5c2308){_0x2158ca['push'](_0x2158ca['shift']());}}}(a218_0x4d55,0xa010a));export function formatElapsed(_0x36be9c){const _0x29f58a=a218_0x1e39,_0x8d8a30=Date['now']()-_0x36be9c;if(_0x8d8a30<0x3e8)return _0x8d8a30+'ms';const _0xdac1ec=(_0x8d8a30/0x3e8)['toFixed'](0x2),_0x412bc8=_0xdac1ec[_0x29f58a(0xed)](/\.?0+$/u,'');return _0x412bc8+'s';}function a218_0x4d55(){const _0x5553d8=['5750192gVClmD','14015670GBshJn','451446oiUeLq','5138CJLgdn','4038534rCeEgv','16UjOcLu','2844429ZnTCDA','replace','148eEJzhH','1491524JwhaLH','85vGycVW'];a218_0x4d55=function(){return _0x5553d8;};return a218_0x4d55();}
@@ -1 +1 @@
1
- (function(_0x3a46da,_0x2a90ba){const _0x5f1046=a219_0x4439,_0x590209=_0x3a46da();while(!![]){try{const _0x5b0a7e=parseInt(_0x5f1046(0x16b))/0x1+parseInt(_0x5f1046(0x138))/0x2+-parseInt(_0x5f1046(0x13d))/0x3+parseInt(_0x5f1046(0x176))/0x4+parseInt(_0x5f1046(0x18c))/0x5*(parseInt(_0x5f1046(0x186))/0x6)+-parseInt(_0x5f1046(0x145))/0x7+parseInt(_0x5f1046(0x160))/0x8;if(_0x5b0a7e===_0x2a90ba)break;else _0x590209['push'](_0x590209['shift']());}catch(_0x573eec){_0x590209['push'](_0x590209['shift']());}}}(a219_0xea1a,0x25676));import a219_0x4024b4 from'path';import a219_0x42382b from'fs';import a219_0x162e50 from'chalk';import a219_0xc6c50d 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';function a219_0x4439(_0x21bf59,_0x4c1c24){_0x21bf59=_0x21bf59-0x122;const _0xea1a8=a219_0xea1a();let _0x4439fd=_0xea1a8[_0x21bf59];return _0x4439fd;}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';import{CliErrors}from'../../../errors.js';function readDirectoryIdentity(_0x19122e){const _0x1cb5be=a219_0x4439;try{const _0x3469d1=a219_0x42382b[_0x1cb5be(0x128)](_0x19122e);if(!_0x3469d1[_0x1cb5be(0x132)]())return null;return{'dev':_0x3469d1['dev'],'ino':_0x3469d1[_0x1cb5be(0x14f)]};}catch{return null;}}function isSameDirectory(_0x12882b,_0x3dbabe){const _0x5af776=a219_0x4439;return!!_0x12882b&&!!_0x3dbabe&&_0x12882b['dev']===_0x3dbabe['dev']&&_0x12882b[_0x5af776(0x14f)]===_0x3dbabe[_0x5af776(0x14f)];}function commitCurrentDirectoryProject(_0x3c91a3,_0x1cb4fa,_0x4a141d){const _0x15f331=a219_0x4439;if(!isSameDirectory(readDirectoryIdentity(_0x3c91a3),_0x4a141d))throw new Error(_0x15f331(0x12e));const _0x23bae4=a219_0x4024b4['basename'](_0x1cb4fa),_0x4c1b9c=a219_0x42382b[_0x15f331(0x164)](_0x3c91a3);if(_0x4c1b9c[_0x15f331(0x191)]!==0x1||_0x4c1b9c[0x0]!==_0x23bae4)throw CliErrors['validation'](_0x15f331(0x171),_0x15f331(0x12c));const _0x2cac6e=a219_0x4024b4[_0x15f331(0x18a)](_0x1cb4fa,'project'),_0x142a3c=[];try{for(const _0x49610f of a219_0x42382b['readdirSync'](_0x2cac6e)){a219_0x42382b[_0x15f331(0x18d)](a219_0x4024b4[_0x15f331(0x18a)](_0x2cac6e,_0x49610f),a219_0x4024b4[_0x15f331(0x18a)](_0x3c91a3,_0x49610f)),_0x142a3c[_0x15f331(0x141)](_0x49610f);}a219_0x42382b[_0x15f331(0x135)](_0x1cb4fa,{'recursive':!![],'force':!![]});}catch(_0x277fb8){for(const _0x1a3a23 of _0x142a3c[_0x15f331(0x150)]()){const _0x546b75=a219_0x4024b4[_0x15f331(0x18a)](_0x3c91a3,_0x1a3a23);if(!a219_0x42382b[_0x15f331(0x151)](_0x546b75))continue;a219_0x42382b['renameSync'](_0x546b75,a219_0x4024b4[_0x15f331(0x18a)](_0x2cac6e,_0x1a3a23));}throw _0x277fb8;}}export async function createApp(_0x300f15){const _0x580d5f=a219_0x4439,_0x42a92d=await checkCliVersion();(_0x42a92d[_0x580d5f(0x162)]||_0x42a92d[_0x580d5f(0x16e)])&&(printCliUpgradeWarning(_0x42a92d),assertCliVersionSupported(_0x42a92d),logger[_0x580d5f(0x17e)](_0x580d5f(0x124),_0x580d5f(0x15c),{'currentVersion':_0x42a92d[_0x580d5f(0x170)],'stableVersion':_0x42a92d['stableVersion'],'minimumVersion':_0x42a92d[_0x580d5f(0x16f)],'needsUpgrade':_0x42a92d[_0x580d5f(0x162)],'belowMinimum':_0x42a92d[_0x580d5f(0x16e)]}));const _0xe19bf=_0x300f15['currentDir']?a219_0x4024b4[_0x580d5f(0x183)](process[_0x580d5f(0x180)]()):_0x300f15['projectCode'];if(_0xe19bf&&(_0x300f15[_0x580d5f(0x172)]||_0x300f15[_0x580d5f(0x158)]))await runCreate({'projectName':_0xe19bf,'appCode':_0x300f15['appCode'],'env':_0x300f15[_0x580d5f(0x192)]},_0x300f15);else{if(_0xe19bf){const _0x445372=await selectSingleAppcode(_0x300f15[_0x580d5f(0x126)]);await runCreate({'projectName':_0xe19bf,'appCode':_0x445372||undefined,'env':_0x300f15[_0x580d5f(0x192)]},_0x300f15);}else await guidedCreateProject(_0x3beebb=>runCreate(_0x3beebb,_0x300f15),_0x300f15[_0x580d5f(0x192)],_0x300f15[_0x580d5f(0x126)]);}}async function runCreate(_0x36db32,_0x4e6816){const _0x2fc4e0=a219_0x4439;_0x36db32['projectName']=validateProjectName(_0x36db32[_0x2fc4e0(0x175)]);const _0x3565a8=_0x4e6816[_0x2fc4e0(0x136)]?process['cwd']():a219_0x4024b4['resolve'](process[_0x2fc4e0(0x180)](),_0x36db32[_0x2fc4e0(0x175)]);if(_0x4e6816[_0x2fc4e0(0x136)]){if(a219_0x42382b[_0x2fc4e0(0x164)](_0x3565a8)[_0x2fc4e0(0x191)]>0x0)throw CliErrors[_0x2fc4e0(0x187)](_0x2fc4e0(0x169),_0x2fc4e0(0x156));}else{if(a219_0x42382b['existsSync'](_0x3565a8))throw new Error(_0x2fc4e0(0x155)+_0x36db32['projectName']+_0x2fc4e0(0x143));}let _0x539269=null;const _0x5dfa0e=_0x4e6816[_0x2fc4e0(0x136)]?readDirectoryIdentity(_0x3565a8):null;let _0x12f3b9=null;try{a219_0x42382b[_0x2fc4e0(0x17a)](a219_0x4024b4[_0x2fc4e0(0x12f)](_0x3565a8),a219_0x42382b[_0x2fc4e0(0x13c)][_0x2fc4e0(0x14d)]);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger['info'](_0x2fc4e0(0x124),_0x2fc4e0(0x15a)+_0x36db32[_0x2fc4e0(0x175)],{'projectDir':_0x3565a8,'appCode':_0x36db32[_0x2fc4e0(0x172)]}),console[_0x2fc4e0(0x16d)](),console[_0x2fc4e0(0x16d)](a219_0x162e50['green']('\x20√\x20')+_0x2fc4e0(0x12a)+a219_0x162e50['green'](_0x36db32[_0x2fc4e0(0x175)])+(_0x36db32['appCode']?_0x2fc4e0(0x134)+a219_0x162e50[_0x2fc4e0(0x188)](_0x36db32[_0x2fc4e0(0x172)]):''));try{let _0x1164ab=_0x36db32[_0x2fc4e0(0x175)];_0x4e6816[_0x2fc4e0(0x136)]&&(_0x12f3b9=a219_0x42382b[_0x2fc4e0(0x16c)](a219_0x4024b4[_0x2fc4e0(0x18a)](_0x3565a8,'.rabetbase-create-')),_0x1164ab=a219_0x4024b4['relative'](process[_0x2fc4e0(0x180)](),a219_0x4024b4['join'](_0x12f3b9,'project')));const _0x29032a=a219_0x4024b4[_0x2fc4e0(0x14a)](process[_0x2fc4e0(0x180)](),_0x1164ab);await runTask(_0x2fc4e0(0x18e),_0x2b2601=>copyProjectTemplate(_0x1164ab,_0xd05544=>_0x2b2601(projectTemplateStageLabel(_0xd05544)),_0x4e6816[_0x2fc4e0(0x15d)]),'Project\x20template\x20ready'),_0x539269=_0x4e6816[_0x2fc4e0(0x136)]?null:readDirectoryIdentity(_0x3565a8);if(!_0x4e6816['currentDir']&&!_0x539269)throw new Error('Unable\x20to\x20verify\x20ownership\x20of\x20the\x20created\x20project\x20directory');await updatePackageJsonName(_0x1164ab,_0x36db32['projectName']),await runTask(_0x2fc4e0(0x167),()=>installDependencies(_0x1164ab)),await runTask(_0x2fc4e0(0x149),()=>formatProjectCode(_0x1164ab)),await configureAppCode(_0x1164ab,_0x36db32['projectName'],_0x36db32['appCode']||'',_0x36db32['env']);let _0x5c9168=![];if(_0x36db32[_0x2fc4e0(0x172)]){console[_0x2fc4e0(0x16d)](_0x2fc4e0(0x179));const _0x6e0b29=process[_0x2fc4e0(0x180)]();try{process[_0x2fc4e0(0x152)](_0x29032a);const _0x364285=_0x36db32[_0x2fc4e0(0x192)]||'production';initEnv(_0x364285);const {configArray:_0x2da43e}=await fetchModelList(_0x36db32[_0x2fc4e0(0x172)],_0x4e6816[_0x2fc4e0(0x126)]||''),_0x4a488f=DEFAULT_API_DIR,_0x1a7767=await generateApiFile(_0x2da43e,'',_0x36db32[_0x2fc4e0(0x172)],!![],_0x364285,_0x4a488f,undefined,getSdkClientRoutingConfig(),{'overwriteTypescript':!![],'modelProfile':{'name':_0x36db32['appCode'],'defaultName':_0x36db32['appCode'],'runtimeDomain':getRuntimeDomain()}});console[_0x2fc4e0(0x16d)]('√\x20Pulled\x20'+_0x2da43e['length']+_0x2fc4e0(0x17f)+_0x1a7767['modelCount']+_0x2fc4e0(0x142)),logger[_0x2fc4e0(0x17e)](_0x2fc4e0(0x124),'API\x20configuration\x20pulled:\x20'+_0x36db32[_0x2fc4e0(0x172)]);}catch(_0x5270fa){_0x5c9168=!![],console[_0x2fc4e0(0x16d)](_0x2fc4e0(0x163)+CLI_BIN_NAME+_0x2fc4e0(0x189)),logger['warn']('create',_0x2fc4e0(0x137),{'error':_0x5270fa instanceof Error?_0x5270fa[_0x2fc4e0(0x165)]:String(_0x5270fa)});}finally{process[_0x2fc4e0(0x152)](_0x6e0b29);}}if(_0x4e6816['currentDir']){if(!_0x12f3b9||!_0x5dfa0e)throw new Error(_0x2fc4e0(0x182));commitCurrentDirectoryProject(_0x3565a8,_0x12f3b9,_0x5dfa0e),_0x12f3b9=null;}try{logger[_0x2fc4e0(0x123)](_0x3565a8),logger[_0x2fc4e0(0x14c)](_0x2fc4e0(0x124),_0x2fc4e0(0x130)+_0x36db32['projectName']);}catch(_0x5a2380){console[_0x2fc4e0(0x144)](_0x2fc4e0(0x17c)+(_0x5a2380 instanceof Error?_0x5a2380['message']:String(_0x5a2380)));}console[_0x2fc4e0(0x16d)](),console[_0x2fc4e0(0x16d)](a219_0x162e50[_0x2fc4e0(0x173)]('─'['repeat'](0x3c))),console[_0x2fc4e0(0x16d)](a219_0x162e50[_0x2fc4e0(0x188)][_0x2fc4e0(0x14e)](_0x2fc4e0(0x153))),console[_0x2fc4e0(0x16d)]();const _0x475d1f=_0x4e6816['currentDir']?CLI_BIN_NAME+_0x2fc4e0(0x148):_0x2fc4e0(0x15e)+_0x36db32['projectName']+_0x2fc4e0(0x18b)+CLI_BIN_NAME+_0x2fc4e0(0x148);console[_0x2fc4e0(0x16d)](_0x2fc4e0(0x12b)+a219_0x162e50[_0x2fc4e0(0x188)][_0x2fc4e0(0x14e)](_0x475d1f)),_0x5c9168&&console['log'](_0x2fc4e0(0x12d)+a219_0x162e50['cyan'][_0x2fc4e0(0x14e)](CLI_BIN_NAME+_0x2fc4e0(0x189))),console[_0x2fc4e0(0x16d)](a219_0x162e50['green']('─'[_0x2fc4e0(0x13e)](0x3c)));}catch(_0x15bc9d){logger[_0x2fc4e0(0x14b)](_0x2fc4e0(0x124),'Project\x20creation\x20failed:\x20'+_0x36db32['projectName'],{'error':_0x15bc9d instanceof Error?_0x15bc9d[_0x2fc4e0(0x165)]:String(_0x15bc9d)});try{const _0x511c6a=readDirectoryIdentity(_0x3565a8);if(_0x4e6816[_0x2fc4e0(0x136)]&&_0x12f3b9)a219_0x42382b[_0x2fc4e0(0x135)](_0x12f3b9,{'recursive':!![],'force':!![]});else{if(_0x539269&&_0x511c6a?.[_0x2fc4e0(0x17d)]===_0x539269[_0x2fc4e0(0x17d)]&&_0x511c6a[_0x2fc4e0(0x14f)]===_0x539269[_0x2fc4e0(0x14f)])console[_0x2fc4e0(0x16d)](_0x2fc4e0(0x13f)+_0x3565a8),a219_0x42382b[_0x2fc4e0(0x135)](_0x3565a8,{'recursive':!![],'force':!![]});else _0x511c6a&&logger[_0x2fc4e0(0x144)](_0x2fc4e0(0x124),_0x2fc4e0(0x161)+_0x3565a8);}}catch{logger[_0x2fc4e0(0x144)]('create',_0x2fc4e0(0x15b)+_0x3565a8);}throw _0x15bc9d;}}function a219_0xea1a(){const _0x4c7ad6=['1.0.0','length','env','\x20Generated\x20by\x20rabetbase\x20cli\x20','setLogPath','create','extracting','cookie','parse','lstatSync','Failed\x20to\x20configure\x20app\x20AppCode','Project\x20name:\x20','\x20\x201.\x20Start\x20project:\x20','Remove\x20the\x20new\x20files\x20and\x20retry\x20from\x20an\x20empty\x20directory.','\x20\x202.\x20Pull\x20API\x20configuration:\x20','Current\x20directory\x20identity\x20changed\x20during\x20project\x20creation','dirname','Project\x20created:\x20','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','isDirectory','Copying\x20local\x20template\x20source','\x20|\x20AppCode:\x20','rmSync','currentDir','API\x20configuration\x20pull\x20failed','117966FaNUNZ','\x20√\x20','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','Updating\x20package.json\x20name','constants','878553OUWqFE','repeat','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','push','\x20model(s)','\x20already\x20exists','warn','1581657hYpuQk','resolving','copying','\x20run\x20start','Format\x20code','resolve','error','success','W_OK','bold','ino','reverse','existsSync','chdir','🚀\x20Next\x20Steps:','apps','Project\x20directory\x20','Remove\x20or\x20move\x20the\x20existing\x20files,\x20then\x20retry\x20with\x20--current-dir.','√\x20Configuration\x20file\x20created,\x20Apps:\x20','nonInteractive','readFileSync','Starting\x20project\x20creation:\x20','Failed\x20to\x20clean\x20up\x20project\x20directory:\x20','CLI\x20version\x20check','templateSource','cd\x20','production','1064496dKeMNr','Skip\x20cleanup:\x20project\x20directory\x20ownership\x20changed:\x20','needsUpgrade','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20','readdirSync','message','text','Install\x20dependencies','...','The\x20current\x20directory\x20must\x20be\x20empty.','\x20|\x20Default:\x20implicit\x20(single\x20app)','198875KvAevp','mkdtempSync','log','belowMinimum','minimumVersion','currentVersion','The\x20current\x20directory\x20changed\x20during\x20project\x20creation.','appCode','green','\x20config\x20set\x20appcode\x20<app-code>\x27','projectName','973408odGUJN','toLocaleString','string','*\x20Pulling\x20API\x20configuration...','accessSync','name','!\x20Project\x20created,\x20but\x20local\x20logging\x20could\x20not\x20be\x20initialized:\x20','dev','info','\x20dataset(s),\x20generated\x20','cwd','utf8','Unable\x20to\x20prepare\x20the\x20current\x20directory\x20workspace','basename','package.json','version','636MIoqDj','validation','cyan','\x20api\x20pull\x20--force\x20--yes','join','\x20&&\x20','1780mldLDx','renameSync','Resolving\x20project\x20template','Failed\x20to\x20update\x20package.json'];a219_0xea1a=function(){return _0x4c7ad6;};return a219_0xea1a();}async function runTask(_0x14c369,_0x51c363,_0x31ec0b=_0x14c369){const _0x5275e5=a219_0x4439,_0x4406cc=a219_0xc6c50d(_0x14c369+_0x5275e5(0x168))['start']();try{const _0x5d88c8=await _0x51c363(_0x4daaae=>{const _0x398516=_0x5275e5;_0x4406cc[_0x398516(0x166)]=_0x4daaae+_0x398516(0x168);});_0x4406cc['stop'](),console[_0x5275e5(0x16d)](''+a219_0x162e50['green'](_0x5275e5(0x139))+_0x31ec0b+'\x20'+a219_0x162e50['gray']('['+_0x5d88c8+']'));}catch(_0x56de40){_0x4406cc['fail'](_0x14c369);throw _0x56de40;}}function projectTemplateStageLabel(_0x527722){const _0x71f891=a219_0x4439;switch(_0x527722){case _0x71f891(0x146):return _0x71f891(0x18e);case'downloading':return'Downloading\x20project\x20template';case'verifying':return'Verifying\x20project\x20template';case _0x71f891(0x125):return'Extracting\x20project\x20template';case _0x71f891(0x147):return _0x71f891(0x133);}}async function updatePackageJsonName(_0x46adf3,_0x1c58f6){const _0x18806b=a219_0x4439,_0x237e91=a219_0x4024b4[_0x18806b(0x14a)](process[_0x18806b(0x180)](),_0x46adf3),_0x2027b3=a219_0x4024b4[_0x18806b(0x18a)](_0x237e91,'package.json');try{console['log'](_0x18806b(0x131));const _0x18b70a=getRabetbaseCliPackageRoot(),_0x1bc0a5=a219_0x4024b4[_0x18806b(0x18a)](_0x18b70a,'package.json');let _0x253d80=_0x18806b(0x190);try{const _0x5df667=JSON[_0x18806b(0x127)](a219_0x42382b['readFileSync'](_0x1bc0a5,_0x18806b(0x181)));_0x253d80=_0x5df667[_0x18806b(0x185)]||_0x18806b(0x190);}catch{}const _0x453a00=a219_0x42382b[_0x18806b(0x159)](_0x2027b3,_0x18806b(0x181)),_0x404469=JSON[_0x18806b(0x127)](_0x453a00);_0x404469[_0x18806b(0x17b)]=_0x1c58f6,_0x404469['description']=_0x1c58f6+_0x18806b(0x122)+_0x253d80,a219_0x42382b['writeFileSync'](_0x2027b3,JSON['stringify'](_0x404469,null,0x2)+'\x0a',_0x18806b(0x181)),console['log']('√\x20package.json\x20updated:\x20name='+_0x1c58f6),logger[_0x18806b(0x17e)]('create',_0x18806b(0x13b));}catch(_0x50b484){logger[_0x18806b(0x14b)]('create',_0x18806b(0x18f));throw _0x50b484;}}async function configureAppCode(_0x8abe0,_0xa193d3,_0x21a6d1,_0x2e2be1){const _0x42eec7=a219_0x4439,_0xdab363=a219_0x4024b4[_0x42eec7(0x14a)](process[_0x42eec7(0x180)](),_0x8abe0),_0x4ec612=a219_0x4024b4[_0x42eec7(0x18a)](_0xdab363,NEW_CONFIG_NAME);try{_0x21a6d1?console['log']('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0xa193d3+':\x20'+_0x21a6d1):console[_0x42eec7(0x16d)](_0x42eec7(0x13a)+_0xa193d3);const _0x4e9d26=getRabetbaseCliPackageRoot(),_0xca4a01=a219_0x4024b4[_0x42eec7(0x18a)](_0x4e9d26,_0x42eec7(0x184));let _0xb7b56b=_0x42eec7(0x190);try{const _0x2aa3eb=JSON[_0x42eec7(0x127)](a219_0x42382b[_0x42eec7(0x159)](_0xca4a01,_0x42eec7(0x181)));_0xb7b56b=_0x2aa3eb[_0x42eec7(0x185)]||_0x42eec7(0x190);}catch{}const {globalConfig:_0x4c36a9}=loadRawConfigLayers(),_0x280bcf=typeof _0x4c36a9['env']===_0x42eec7(0x178)?_0x4c36a9[_0x42eec7(0x192)]:undefined,_0x2c3c6c={};for(const _0x463bba of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x4c36a9[_0x463bba]!=null)_0x2c3c6c[_0x463bba]=_0x4c36a9[_0x463bba];}const _0x8781dc=buildCanonicalProjectConfig(_0x2c3c6c,{'appCodes':_0x21a6d1?[_0x21a6d1]:[],'env':_0x2e2be1||_0x280bcf||_0x42eec7(0x15f),'metadata':{'createdAt':new Date()[_0x42eec7(0x177)](),'version':_0xb7b56b}});writeConfigFile(_0x4ec612,_0x8781dc),await generateSdkConfigFile(a219_0x4024b4[_0x42eec7(0x18a)](_0xdab363,DEFAULT_API_DIR),getSdkClientRoutingConfig()),writeProjectDomainRoutingManifest(_0xdab363),_0x21a6d1?console['log'](_0x42eec7(0x157)+Object['keys'](_0x8781dc[_0x42eec7(0x154)]||{})[_0x42eec7(0x18a)](',\x20')+_0x42eec7(0x16a)):console['log'](_0x42eec7(0x140)+CLI_BIN_NAME+_0x42eec7(0x174)),logger[_0x42eec7(0x17e)](_0x42eec7(0x124),'Configured\x20app\x20AppCode:\x20'+_0x21a6d1);}catch(_0x12a76e){logger['error']('create',_0x42eec7(0x129));throw _0x12a76e;}}
1
+ (function(_0x1e1d81,_0x15cd3d){const _0x2f53c3=a219_0x234d,_0x2aff5f=_0x1e1d81();while(!![]){try{const _0xab5da7=parseInt(_0x2f53c3(0x153))/0x1*(-parseInt(_0x2f53c3(0x16f))/0x2)+parseInt(_0x2f53c3(0x111))/0x3+-parseInt(_0x2f53c3(0x146))/0x4+parseInt(_0x2f53c3(0x11c))/0x5*(-parseInt(_0x2f53c3(0x127))/0x6)+-parseInt(_0x2f53c3(0x119))/0x7*(-parseInt(_0x2f53c3(0x162))/0x8)+parseInt(_0x2f53c3(0x11e))/0x9+-parseInt(_0x2f53c3(0x10b))/0xa;if(_0xab5da7===_0x15cd3d)break;else _0x2aff5f['push'](_0x2aff5f['shift']());}catch(_0x173126){_0x2aff5f['push'](_0x2aff5f['shift']());}}}(a219_0x3385,0x505fa));import a219_0x5a7308 from'path';import a219_0x31a990 from'fs';import a219_0x530d03 from'chalk';function a219_0x3385(){const _0x42a6fd=['Remove\x20the\x20new\x20files\x20and\x20retry\x20from\x20an\x20empty\x20directory.','Verifying\x20project\x20template','\x20\x202.\x20Pull\x20API\x20configuration:\x20','Downloading\x20project\x20template','Failed\x20to\x20clean\x20up\x20project\x20directory:\x20','existsSync','Extracting\x20project\x20template','27654UgwQFj','join','\x20&&\x20','Unable\x20to\x20prepare\x20the\x20current\x20directory\x20workspace','lstatSync','apps','Starting\x20project\x20creation:\x20','currentDir','stableVersion','readdirSync','\x20run\x20start','Remove\x20or\x20move\x20the\x20existing\x20files,\x20then\x20retry\x20with\x20--current-dir.','Project\x20directory\x20','Skip\x20cleanup:\x20project\x20directory\x20ownership\x20changed:\x20','env','writeFileSync','resolving','stop','\x20|\x20AppCode:\x20','nonInteractive','Configured\x20app\x20AppCode:\x20','Project\x20name:\x20','cookie','\x20model(s)','projectName','bold','info','.rabetbase-create-','resolve','copying','chdir','45228oVcHYT','W_OK','length','fail','CLI\x20version\x20check','Project\x20creation\x20failed:\x20','\x20|\x20Default:\x20implicit\x20(single\x20app)','setLogPath','constants','message','...','green','Project\x20created:\x20','24899nrgGFC','downloading','The\x20current\x20directory\x20must\x20be\x20empty.','extracting','readFileSync','√\x20package.json\x20updated:\x20name=','cyan','name','\x20√\x20','API\x20configuration\x20pull\x20failed','modelCount','!\x20Project\x20created,\x20but\x20local\x20logging\x20could\x20not\x20be\x20initialized:\x20','rmSync','ino','package.json','8pYGhZa','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','warn','Install\x20dependencies','*\x20Pulling\x20API\x20configuration...','string','√\x20Configuration\x20file\x20created,\x20Apps:\x20','toLocaleString','dev','Current\x20directory\x20identity\x20changed\x20during\x20project\x20creation','isDirectory','\x20dataset(s),\x20generated\x20','keys','42raMesH','🚀\x20Next\x20Steps:','The\x20current\x20directory\x20changed\x20during\x20project\x20creation.','Resolving\x20project\x20template','log','stringify','needsUpgrade','\x20Generated\x20by\x20rabetbase\x20cli\x20','\x20config\x20set\x20appcode\x20<app-code>\x27','push','\x20api\x20pull\x20--force\x20--yes','accessSync','2474070zhYOBR','gray','parse','production','version','utf8','1686294KErYZt','cd\x20','validation','appCode','cwd','project','renameSync','repeat','4241965icQIPy','create','API\x20configuration\x20pulled:\x20','655fSdNoD','1.0.0','4918401iTMSLs','belowMinimum'];a219_0x3385=function(){return _0x42a6fd;};return a219_0x3385();}import a219_0x31ad9d from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';function a219_0x234d(_0x3dd730,_0x3797d8){_0x3dd730=_0x3dd730-0x101;const _0x3385f1=a219_0x3385();let _0x234da5=_0x3385f1[_0x3dd730];return _0x234da5;}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';import{CliErrors}from'../../../errors.js';function readDirectoryIdentity(_0x4e41d7){const _0x43354a=a219_0x234d;try{const _0x3382f6=a219_0x31a990[_0x43354a(0x12b)](_0x4e41d7);if(!_0x3382f6[_0x43354a(0x16c)]())return null;return{'dev':_0x3382f6[_0x43354a(0x16a)],'ino':_0x3382f6[_0x43354a(0x160)]};}catch{return null;}}function isSameDirectory(_0x447640,_0x4e2021){const _0x4db082=a219_0x234d;return!!_0x447640&&!!_0x4e2021&&_0x447640[_0x4db082(0x16a)]===_0x4e2021[_0x4db082(0x16a)]&&_0x447640[_0x4db082(0x160)]===_0x4e2021[_0x4db082(0x160)];}function commitCurrentDirectoryProject(_0x319ba6,_0x2068bc,_0xe06a6c){const _0x5ec837=a219_0x234d;if(!isSameDirectory(readDirectoryIdentity(_0x319ba6),_0xe06a6c))throw new Error(_0x5ec837(0x16b));const _0x49600d=a219_0x5a7308['basename'](_0x2068bc),_0x53424f=a219_0x31a990[_0x5ec837(0x130)](_0x319ba6);if(_0x53424f['length']!==0x1||_0x53424f[0x0]!==_0x49600d)throw CliErrors[_0x5ec837(0x113)](_0x5ec837(0x101),_0x5ec837(0x120));const _0x497b4a=a219_0x5a7308[_0x5ec837(0x128)](_0x2068bc,_0x5ec837(0x116)),_0x59e26b=[];try{for(const _0x5b1057 of a219_0x31a990[_0x5ec837(0x130)](_0x497b4a)){a219_0x31a990[_0x5ec837(0x117)](a219_0x5a7308[_0x5ec837(0x128)](_0x497b4a,_0x5b1057),a219_0x5a7308['join'](_0x319ba6,_0x5b1057)),_0x59e26b[_0x5ec837(0x108)](_0x5b1057);}a219_0x31a990[_0x5ec837(0x15f)](_0x2068bc,{'recursive':!![],'force':!![]});}catch(_0x3eaff6){for(const _0x2ed74e of _0x59e26b['reverse']()){const _0x288845=a219_0x5a7308[_0x5ec837(0x128)](_0x319ba6,_0x2ed74e);if(!a219_0x31a990[_0x5ec837(0x125)](_0x288845))continue;a219_0x31a990[_0x5ec837(0x117)](_0x288845,a219_0x5a7308[_0x5ec837(0x128)](_0x497b4a,_0x2ed74e));}throw _0x3eaff6;}}export async function createApp(_0x2b4250){const _0x1fb615=a219_0x234d,_0x386852=await checkCliVersion();(_0x386852['needsUpgrade']||_0x386852[_0x1fb615(0x11f)])&&(printCliUpgradeWarning(_0x386852),assertCliVersionSupported(_0x386852),logger[_0x1fb615(0x141)]('create',_0x1fb615(0x14a),{'currentVersion':_0x386852['currentVersion'],'stableVersion':_0x386852[_0x1fb615(0x12f)],'minimumVersion':_0x386852['minimumVersion'],'needsUpgrade':_0x386852[_0x1fb615(0x105)],'belowMinimum':_0x386852[_0x1fb615(0x11f)]}));const _0x416cd2=_0x2b4250[_0x1fb615(0x12e)]?a219_0x5a7308['basename'](process[_0x1fb615(0x115)]()):_0x2b4250['projectCode'];if(_0x416cd2&&(_0x2b4250[_0x1fb615(0x114)]||_0x2b4250[_0x1fb615(0x13a)]))await runCreate({'projectName':_0x416cd2,'appCode':_0x2b4250['appCode'],'env':_0x2b4250[_0x1fb615(0x135)]},_0x2b4250);else{if(_0x416cd2){const _0x8b4b00=await selectSingleAppcode(_0x2b4250[_0x1fb615(0x13d)]);await runCreate({'projectName':_0x416cd2,'appCode':_0x8b4b00||undefined,'env':_0x2b4250['env']},_0x2b4250);}else await guidedCreateProject(_0x3756b1=>runCreate(_0x3756b1,_0x2b4250),_0x2b4250['env'],_0x2b4250[_0x1fb615(0x13d)]);}}async function runCreate(_0x2bc478,_0xc5a032){const _0x2f995c=a219_0x234d;_0x2bc478[_0x2f995c(0x13f)]=validateProjectName(_0x2bc478[_0x2f995c(0x13f)]);const _0xcd6230=_0xc5a032[_0x2f995c(0x12e)]?process['cwd']():a219_0x5a7308['resolve'](process[_0x2f995c(0x115)](),_0x2bc478[_0x2f995c(0x13f)]);if(_0xc5a032[_0x2f995c(0x12e)]){if(a219_0x31a990[_0x2f995c(0x130)](_0xcd6230)[_0x2f995c(0x148)]>0x0)throw CliErrors['validation'](_0x2f995c(0x155),_0x2f995c(0x132));}else{if(a219_0x31a990[_0x2f995c(0x125)](_0xcd6230))throw new Error(_0x2f995c(0x133)+_0x2bc478['projectName']+'\x20already\x20exists');}let _0xa8818f=null;const _0x4c036b=_0xc5a032[_0x2f995c(0x12e)]?readDirectoryIdentity(_0xcd6230):null;let _0x556a05=null;try{a219_0x31a990[_0x2f995c(0x10a)](a219_0x5a7308['dirname'](_0xcd6230),a219_0x31a990[_0x2f995c(0x14e)][_0x2f995c(0x147)]);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger[_0x2f995c(0x141)](_0x2f995c(0x11a),_0x2f995c(0x12d)+_0x2bc478[_0x2f995c(0x13f)],{'projectDir':_0xcd6230,'appCode':_0x2bc478['appCode']}),console[_0x2f995c(0x103)](),console[_0x2f995c(0x103)](a219_0x530d03[_0x2f995c(0x151)](_0x2f995c(0x15b))+_0x2f995c(0x13c)+a219_0x530d03[_0x2f995c(0x151)](_0x2bc478[_0x2f995c(0x13f)])+(_0x2bc478[_0x2f995c(0x114)]?_0x2f995c(0x139)+a219_0x530d03[_0x2f995c(0x159)](_0x2bc478['appCode']):''));try{let _0x3357d0=_0x2bc478['projectName'];_0xc5a032['currentDir']&&(_0x556a05=a219_0x31a990['mkdtempSync'](a219_0x5a7308[_0x2f995c(0x128)](_0xcd6230,_0x2f995c(0x142))),_0x3357d0=a219_0x5a7308['relative'](process[_0x2f995c(0x115)](),a219_0x5a7308[_0x2f995c(0x128)](_0x556a05,_0x2f995c(0x116))));const _0x29e159=a219_0x5a7308['resolve'](process[_0x2f995c(0x115)](),_0x3357d0);await runTask(_0x2f995c(0x102),_0x24b7a4=>copyProjectTemplate(_0x3357d0,_0x584595=>_0x24b7a4(projectTemplateStageLabel(_0x584595)),_0xc5a032['templateSource']),'Project\x20template\x20ready'),_0xa8818f=_0xc5a032['currentDir']?null:readDirectoryIdentity(_0xcd6230);if(!_0xc5a032['currentDir']&&!_0xa8818f)throw new Error('Unable\x20to\x20verify\x20ownership\x20of\x20the\x20created\x20project\x20directory');await updatePackageJsonName(_0x3357d0,_0x2bc478['projectName']),await runTask(_0x2f995c(0x165),()=>installDependencies(_0x3357d0)),await runTask('Format\x20code',()=>formatProjectCode(_0x3357d0)),await configureAppCode(_0x3357d0,_0x2bc478['projectName'],_0x2bc478[_0x2f995c(0x114)]||'',_0x2bc478[_0x2f995c(0x135)]);let _0x486e62=![];if(_0x2bc478[_0x2f995c(0x114)]){console['log'](_0x2f995c(0x166));const _0x1fa672=process['cwd']();try{process[_0x2f995c(0x145)](_0x29e159);const _0x24434d=_0x2bc478['env']||_0x2f995c(0x10e);initEnv(_0x24434d);const {configArray:_0x5f5963}=await fetchModelList(_0x2bc478[_0x2f995c(0x114)],_0xc5a032['cookie']||''),_0x5b391d=DEFAULT_API_DIR,_0x198e75=await generateApiFile(_0x5f5963,'',_0x2bc478['appCode'],!![],_0x24434d,_0x5b391d,undefined,getSdkClientRoutingConfig(),{'overwriteTypescript':!![],'modelProfile':{'name':_0x2bc478[_0x2f995c(0x114)],'defaultName':_0x2bc478[_0x2f995c(0x114)],'runtimeDomain':getRuntimeDomain()}});console[_0x2f995c(0x103)]('√\x20Pulled\x20'+_0x5f5963[_0x2f995c(0x148)]+_0x2f995c(0x16d)+_0x198e75[_0x2f995c(0x15d)]+_0x2f995c(0x13e)),logger[_0x2f995c(0x141)]('create',_0x2f995c(0x11b)+_0x2bc478[_0x2f995c(0x114)]);}catch(_0x4e67a1){_0x486e62=!![],console[_0x2f995c(0x103)]('!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20'+CLI_BIN_NAME+_0x2f995c(0x109)),logger[_0x2f995c(0x164)](_0x2f995c(0x11a),_0x2f995c(0x15c),{'error':_0x4e67a1 instanceof Error?_0x4e67a1[_0x2f995c(0x14f)]:String(_0x4e67a1)});}finally{process[_0x2f995c(0x145)](_0x1fa672);}}if(_0xc5a032[_0x2f995c(0x12e)]){if(!_0x556a05||!_0x4c036b)throw new Error(_0x2f995c(0x12a));commitCurrentDirectoryProject(_0xcd6230,_0x556a05,_0x4c036b),_0x556a05=null;}try{logger[_0x2f995c(0x14d)](_0xcd6230),logger['success'](_0x2f995c(0x11a),_0x2f995c(0x152)+_0x2bc478[_0x2f995c(0x13f)]);}catch(_0x1bac66){console[_0x2f995c(0x164)](_0x2f995c(0x15e)+(_0x1bac66 instanceof Error?_0x1bac66[_0x2f995c(0x14f)]:String(_0x1bac66)));}console[_0x2f995c(0x103)](),console[_0x2f995c(0x103)](a219_0x530d03['green']('─'[_0x2f995c(0x118)](0x3c))),console[_0x2f995c(0x103)](a219_0x530d03['cyan'][_0x2f995c(0x140)](_0x2f995c(0x170))),console[_0x2f995c(0x103)]();const _0x158b67=_0xc5a032[_0x2f995c(0x12e)]?CLI_BIN_NAME+_0x2f995c(0x131):_0x2f995c(0x112)+_0x2bc478['projectName']+_0x2f995c(0x129)+CLI_BIN_NAME+_0x2f995c(0x131);console[_0x2f995c(0x103)]('\x20\x201.\x20Start\x20project:\x20'+a219_0x530d03[_0x2f995c(0x159)][_0x2f995c(0x140)](_0x158b67)),_0x486e62&&console[_0x2f995c(0x103)](_0x2f995c(0x122)+a219_0x530d03[_0x2f995c(0x159)][_0x2f995c(0x140)](CLI_BIN_NAME+_0x2f995c(0x109))),console[_0x2f995c(0x103)](a219_0x530d03[_0x2f995c(0x151)]('─'[_0x2f995c(0x118)](0x3c)));}catch(_0x2364ca){logger['error']('create',_0x2f995c(0x14b)+_0x2bc478[_0x2f995c(0x13f)],{'error':_0x2364ca instanceof Error?_0x2364ca[_0x2f995c(0x14f)]:String(_0x2364ca)});try{const _0x36ed90=readDirectoryIdentity(_0xcd6230);if(_0xc5a032[_0x2f995c(0x12e)]&&_0x556a05)a219_0x31a990[_0x2f995c(0x15f)](_0x556a05,{'recursive':!![],'force':!![]});else{if(_0xa8818f&&_0x36ed90?.['dev']===_0xa8818f['dev']&&_0x36ed90[_0x2f995c(0x160)]===_0xa8818f[_0x2f995c(0x160)])console[_0x2f995c(0x103)]('*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20'+_0xcd6230),a219_0x31a990[_0x2f995c(0x15f)](_0xcd6230,{'recursive':!![],'force':!![]});else _0x36ed90&&logger[_0x2f995c(0x164)]('create',_0x2f995c(0x134)+_0xcd6230);}}catch{logger['warn']('create',_0x2f995c(0x124)+_0xcd6230);}throw _0x2364ca;}}async function runTask(_0x3dc861,_0x1bef59,_0x2bbd4e=_0x3dc861){const _0x49c33a=a219_0x234d,_0x5b2d9a=a219_0x31ad9d(_0x3dc861+_0x49c33a(0x150))['start']();try{const _0x2e3c38=await _0x1bef59(_0x432124=>{const _0x52b359=_0x49c33a;_0x5b2d9a['text']=_0x432124+_0x52b359(0x150);});_0x5b2d9a[_0x49c33a(0x138)](),console[_0x49c33a(0x103)](''+a219_0x530d03[_0x49c33a(0x151)](_0x49c33a(0x15b))+_0x2bbd4e+'\x20'+a219_0x530d03[_0x49c33a(0x10c)]('['+_0x2e3c38+']'));}catch(_0x13b3b4){_0x5b2d9a[_0x49c33a(0x149)](_0x3dc861);throw _0x13b3b4;}}function projectTemplateStageLabel(_0x17fdd2){const _0x212a42=a219_0x234d;switch(_0x17fdd2){case _0x212a42(0x137):return _0x212a42(0x102);case _0x212a42(0x154):return _0x212a42(0x123);case'verifying':return _0x212a42(0x121);case _0x212a42(0x156):return _0x212a42(0x126);case _0x212a42(0x144):return'Copying\x20local\x20template\x20source';}}async function updatePackageJsonName(_0x384441,_0x4d358d){const _0x355be4=a219_0x234d,_0x281dc8=a219_0x5a7308[_0x355be4(0x143)](process['cwd'](),_0x384441),_0x52fb60=a219_0x5a7308[_0x355be4(0x128)](_0x281dc8,_0x355be4(0x161));try{console[_0x355be4(0x103)](_0x355be4(0x163));const _0x534f03=getRabetbaseCliPackageRoot(),_0x19530b=a219_0x5a7308['join'](_0x534f03,_0x355be4(0x161));let _0x62103d='1.0.0';try{const _0x5878e0=JSON[_0x355be4(0x10d)](a219_0x31a990[_0x355be4(0x157)](_0x19530b,_0x355be4(0x110)));_0x62103d=_0x5878e0[_0x355be4(0x10f)]||_0x355be4(0x11d);}catch{}const _0x3ee6cf=a219_0x31a990[_0x355be4(0x157)](_0x52fb60,_0x355be4(0x110)),_0x4b9125=JSON[_0x355be4(0x10d)](_0x3ee6cf);_0x4b9125[_0x355be4(0x15a)]=_0x4d358d,_0x4b9125['description']=_0x4d358d+_0x355be4(0x106)+_0x62103d,a219_0x31a990[_0x355be4(0x136)](_0x52fb60,JSON[_0x355be4(0x104)](_0x4b9125,null,0x2)+'\x0a',_0x355be4(0x110)),console[_0x355be4(0x103)](_0x355be4(0x158)+_0x4d358d),logger['info'](_0x355be4(0x11a),'Updating\x20package.json\x20name');}catch(_0x29a1ac){logger['error'](_0x355be4(0x11a),'Failed\x20to\x20update\x20package.json');throw _0x29a1ac;}}async function configureAppCode(_0x412e61,_0x197085,_0x303d4c,_0x1f7331){const _0x451e69=a219_0x234d,_0x49a5ea=a219_0x5a7308[_0x451e69(0x143)](process[_0x451e69(0x115)](),_0x412e61),_0x137e59=a219_0x5a7308[_0x451e69(0x128)](_0x49a5ea,NEW_CONFIG_NAME);try{_0x303d4c?console[_0x451e69(0x103)]('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x197085+':\x20'+_0x303d4c):console['log']('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x197085);const _0x36f7ed=getRabetbaseCliPackageRoot(),_0x3c5b50=a219_0x5a7308[_0x451e69(0x128)](_0x36f7ed,'package.json');let _0x883a8f='1.0.0';try{const _0x52a169=JSON['parse'](a219_0x31a990['readFileSync'](_0x3c5b50,_0x451e69(0x110)));_0x883a8f=_0x52a169[_0x451e69(0x10f)]||_0x451e69(0x11d);}catch{}const {globalConfig:_0x269f18}=loadRawConfigLayers(),_0x115180=typeof _0x269f18[_0x451e69(0x135)]===_0x451e69(0x167)?_0x269f18['env']:undefined,_0x151025={};for(const _0x422243 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x269f18[_0x422243]!=null)_0x151025[_0x422243]=_0x269f18[_0x422243];}const _0x3962a7=buildCanonicalProjectConfig(_0x151025,{'appCodes':_0x303d4c?[_0x303d4c]:[],'env':_0x1f7331||_0x115180||'production','metadata':{'createdAt':new Date()[_0x451e69(0x169)](),'version':_0x883a8f}});writeConfigFile(_0x137e59,_0x3962a7),await generateSdkConfigFile(a219_0x5a7308[_0x451e69(0x128)](_0x49a5ea,DEFAULT_API_DIR),getSdkClientRoutingConfig()),writeProjectDomainRoutingManifest(_0x49a5ea),_0x303d4c?console[_0x451e69(0x103)](_0x451e69(0x168)+Object[_0x451e69(0x16e)](_0x3962a7[_0x451e69(0x12c)]||{})[_0x451e69(0x128)](',\x20')+_0x451e69(0x14c)):console[_0x451e69(0x103)]('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+_0x451e69(0x107)),logger[_0x451e69(0x141)](_0x451e69(0x11a),_0x451e69(0x13b)+_0x303d4c);}catch(_0x545034){logger['error']('create','Failed\x20to\x20configure\x20app\x20AppCode');throw _0x545034;}}
@@ -1 +1 @@
1
- const a220_0x7e4941=a220_0x1e13;(function(_0x5ec2de,_0x5961a7){const _0x1a46f9=a220_0x1e13,_0xec91f0=_0x5ec2de();while(!![]){try{const _0x4b7dca=-parseInt(_0x1a46f9(0x1ad))/0x1*(-parseInt(_0x1a46f9(0x18b))/0x2)+-parseInt(_0x1a46f9(0x183))/0x3+-parseInt(_0x1a46f9(0x197))/0x4+parseInt(_0x1a46f9(0x17a))/0x5*(parseInt(_0x1a46f9(0x17e))/0x6)+parseInt(_0x1a46f9(0x16d))/0x7+parseInt(_0x1a46f9(0x1ca))/0x8+-parseInt(_0x1a46f9(0x1d3))/0x9*(parseInt(_0x1a46f9(0x177))/0xa);if(_0x4b7dca===_0x5961a7)break;else _0xec91f0['push'](_0xec91f0['shift']());}catch(_0x4b728b){_0xec91f0['push'](_0xec91f0['shift']());}}}(a220_0x4658,0x60580));function a220_0x4658(){const _0x2b7586=['1122215lUFDnx','CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.','readFile','size','6YKWgBI','version','readdir','resolve','string','764004XOOGXK','Rabetbase\x20CDN\x20config\x20is\x20unavailable.','access','cancel','isDirectory','push','relative','sep','894nFMvgg','url','length','basename','message','ENOENT','.lovrabet.log','Pass\x20a\x20directory\x20containing\x20the\x20template\x20source\x20package.json.','copying','.git','.rabetbase-create-','.codegraph','1220936szOluZ','Project\x20template\x20package.json\x20is\x20invalid.','trim','isFinite','Local\x20project\x20template\x20contains\x20a\x20local-only\x20entry:\x20','join','Local\x20template\x20source\x20and\x20project\x20output\x20must\x20not\x20overlap.','.lovrabet.json','content-length','Local\x20template\x20source\x20is\x20not\x20a\x20directory:\x20','abort','get','CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.','origin','dev','ino','getReader','sha256','utf8','local','from','arrayBuffer','356vCDgzn','test','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','CDN\x20project\x20template\x20relative\x20URL\x20must\x20match\x20its\x20release\x20channel\x20or\x20version.','realpath','dist','rename','status','Unable\x20to\x20claim\x20the\x20project\x20directory.','isSafeInteger','isAbsolute','isFile','project','.DS_Store','parse','EEXIST','extracting','href','copyFile','mkdtemp','node_modules','valid','CDN\x20config\x20does\x20not\x20define\x20template\x20\x22','package.json','toLowerCase','hex','Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','Choose\x20an\x20output\x20directory\x20outside\x20the\x20template\x20source.','CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20','3720952DujrMN','mkdir','byteLength','resolving','Check\x20your\x20network\x20and\x20retry.\x20Details:\x20','signal','.rabetbase','read','isSymbolicLink','135VWXZRb','has','release','legacyAssetBaseUrl','number','cdn','dirname','Invalid\x20local\x20template\x20source:\x20','object','releaseLock','pathname','application/zip','startsWith','includes','verifying','2310049XXPANl','posix','chmod','name','Project\x20directory\x20already\x20exists:\x20','Check\x20the\x20source\x20directory\x20and\x20retry.','https:','code','error','downloading','149450WbNkTV','validation','lstat'];a220_0x4658=function(){return _0x2b7586;};return a220_0x4658();}import{createHash}from'node:crypto';import a220_0x1b5374 from'node:fs/promises';import a220_0x5d1bea from'node:path';import a220_0x8584ad from'semver';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(_0x17c3ad){const _0x1d0e5d=a220_0x1e13;return typeof _0x17c3ad===_0x1d0e5d(0x182)&&_0x17c3ad[_0x1d0e5d(0x199)]()?_0x17c3ad[_0x1d0e5d(0x199)]():null;}function parseDescriptor(_0x5e9f52){const _0x569ce6=a220_0x1e13;if(!_0x5e9f52||typeof _0x5e9f52!==_0x569ce6(0x1db))throw new Error(_0x569ce6(0x1c3)+TEMPLATE_ID+'\x22.');const _0x1d0a36=_0x5e9f52,_0x11ce6d=nonEmptyString(_0x1d0a36['version']),_0xa3b2be=nonEmptyString(_0x1d0a36[_0x569ce6(0x170)]),_0x4048b0=_0x1d0a36[_0x569ce6(0x18c)]===undefined?undefined:nonEmptyString(_0x1d0a36[_0x569ce6(0x18c)])||undefined,_0x577253=nonEmptyString(_0x1d0a36['sha256'])?.[_0x569ce6(0x1c5)](),_0x4291e0=_0x1d0a36['size'];if(!_0x11ce6d||!a220_0x8584ad[_0x569ce6(0x1c2)](_0x11ce6d)||!_0xa3b2be||_0xa3b2be!==a220_0x5d1bea['posix'][_0x569ce6(0x18e)](_0xa3b2be)||_0xa3b2be[_0x569ce6(0x1e0)]('\x5c')||_0x1d0a36[_0x569ce6(0x18c)]!==undefined&&!_0x4048b0||!_0x577253||!/^sha256:[a-f0-9]{64}$/[_0x569ce6(0x1ae)](_0x577253)||typeof _0x4291e0!==_0x569ce6(0x1d7)||!Number[_0x569ce6(0x1b6)](_0x4291e0)||_0x4291e0<=0x0||_0x4291e0>MAX_ARCHIVE_SIZE)throw new Error('CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22'+TEMPLATE_ID+'\x22.');return{'version':_0x11ce6d,'name':_0xa3b2be,'url':_0x4048b0,'sha256':_0x577253,'size':_0x4291e0};}async function fetchWithTimeout(_0x320393,_0x679027,_0x37897c,_0x27b651){const _0x4bbc45=a220_0x1e13,_0x510170=new AbortController(),_0x524975=setTimeout(()=>_0x510170[_0x4bbc45(0x1a1)](),_0x679027);try{const _0x16d1a1=await fetch(_0x320393,{'headers':{'Accept':_0x37897c},'redirect':_0x4bbc45(0x175),'signal':_0x510170[_0x4bbc45(0x1cf)]});return await _0x27b651(_0x16d1a1);}finally{clearTimeout(_0x524975);}}async function fetchTemplateDescriptor(){const _0x1083ef=a220_0x1e13,_0x559df7=getCliVersion(),_0x4edbc5=isBetaCliVersion(_0x559df7)?'beta':_0x1083ef(0x1d5),_0x4ca68c=await fetchProjectTemplateCdnConfig();if(!_0x4ca68c)throw new Error(_0x1083ef(0x184));const _0x189e61=parseDescriptor(resolveProjectTemplateDescriptor(_0x4ca68c['config'],_0x559df7));return{'descriptor':_0x189e61,'channel':_0x4edbc5,'assetBaseUrl':_0x4ca68c['assetBaseUrl'],'legacyAssetBaseUrl':_0x4ca68c[_0x1083ef(0x1d6)]};}function resolveArchiveUrl(_0x137c16,_0x45fcf6,_0x2bf6b1,_0x1598a5){const _0x25a66f=a220_0x1e13,_0x351752=new URL(_0x2bf6b1+'/'),_0x4e304a=[getProjectTemplateRelativeUrl(_0x45fcf6),getProjectTemplateRelativeUrl(_0x45fcf6,_0x137c16[_0x25a66f(0x17f)])];if(_0x137c16[_0x25a66f(0x18c)]&&!_0x4e304a['includes'](_0x137c16[_0x25a66f(0x18c)]))throw new Error(_0x25a66f(0x1b0));const _0x2c5458=new URL(_0x1598a5+'/'),_0x391158=_0x137c16[_0x25a66f(0x18c)]?new URL(_0x137c16[_0x25a66f(0x18c)],_0x351752[_0x25a66f(0x1a4)]):new URL(_0x137c16[_0x25a66f(0x170)],_0x2c5458),_0x3aa868=_0x137c16[_0x25a66f(0x18c)]?_0x351752[_0x25a66f(0x1a4)]:_0x2c5458[_0x25a66f(0x1a4)];if(_0x391158['protocol']!==_0x25a66f(0x173)||_0x391158[_0x25a66f(0x1a4)]!==_0x3aa868||a220_0x5d1bea[_0x25a66f(0x16e)]['basename'](decodeURIComponent(_0x391158['pathname']))!==_0x137c16[_0x25a66f(0x170)]||!_0x137c16[_0x25a66f(0x18c)]&&!_0x391158[_0x25a66f(0x1dd)][_0x25a66f(0x1df)](_0x2c5458[_0x25a66f(0x1dd)]))throw new Error(_0x25a66f(0x17b));return _0x391158[_0x25a66f(0x1be)];}async function readResponseBytes(_0x593181,_0x54c146){const _0x37b03a=a220_0x1e13;if(!_0x593181['body']){const _0x4d39b1=Buffer[_0x37b03a(0x1ab)](await _0x593181[_0x37b03a(0x1ac)]());if(_0x4d39b1[_0x37b03a(0x18d)]>_0x54c146)throw new Error(_0x37b03a(0x1af));return _0x4d39b1;}const _0x1a418b=_0x593181['body'][_0x37b03a(0x1a7)](),_0x31b24d=[];let _0x4ecf66=0x0;try{while(!![]){const {done:_0x15114a,value:_0xfb4903}=await _0x1a418b[_0x37b03a(0x1d1)]();if(_0x15114a)break;_0x4ecf66+=_0xfb4903[_0x37b03a(0x1cc)];if(_0x4ecf66>_0x54c146){await _0x1a418b[_0x37b03a(0x186)]();throw new Error('CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.');}_0x31b24d[_0x37b03a(0x188)](Buffer[_0x37b03a(0x1ab)](_0xfb4903));}}finally{_0x1a418b[_0x37b03a(0x1dc)]();}return Buffer['concat'](_0x31b24d,_0x4ecf66);}async function downloadArchive(_0x46bd71,_0x42c21e,_0x5a95b7,_0x56b567,_0x48f5d9,_0x42e3a2){const _0x4bf815=a220_0x1e13,_0x47e104=await fetchWithTimeout(resolveArchiveUrl(_0x46bd71,_0x42c21e,_0x5a95b7,_0x56b567),ARCHIVE_TIMEOUT_MS,_0x4bf815(0x1de),async _0x922e1e=>{const _0x502582=_0x4bf815;if(!_0x922e1e['ok'])throw new Error('CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20'+_0x922e1e[_0x502582(0x1b4)]+'.');const _0x5b7fe0=Number(_0x922e1e['headers'][_0x502582(0x1a2)](_0x502582(0x19f)));if(Number[_0x502582(0x19a)](_0x5b7fe0)&&_0x5b7fe0>MAX_ARCHIVE_SIZE)throw new Error(_0x502582(0x1a3));return readResponseBytes(_0x922e1e,_0x46bd71[_0x502582(0x17d)]);});if(_0x47e104[_0x4bf815(0x18d)]!==_0x46bd71[_0x4bf815(0x17d)])throw new Error(_0x4bf815(0x1c9)+_0x46bd71['size']+',\x20received\x20'+_0x47e104[_0x4bf815(0x18d)]+'.');_0x42e3a2?.(_0x4bf815(0x1e1));const _0x3f43be='sha256:'+createHash(_0x4bf815(0x1a8))['update'](_0x47e104)['digest'](_0x4bf815(0x1c6));if(_0x3f43be!==_0x46bd71[_0x4bf815(0x1a8)])throw new Error('CDN\x20project\x20template\x20checksum\x20verification\x20failed.');await a220_0x1b5374['writeFile'](_0x48f5d9,_0x47e104,{'flag':'wx'});}async function assertTemplateRoot(_0x53dda7){const _0x9ce471=a220_0x1e13,_0x158674=a220_0x5d1bea['join'](_0x53dda7,_0x9ce471(0x1c4)),_0x2eec73=JSON[_0x9ce471(0x1bb)](await a220_0x1b5374[_0x9ce471(0x17c)](_0x158674,_0x9ce471(0x1a9)));if(!_0x2eec73||typeof _0x2eec73!==_0x9ce471(0x1db))throw new Error(_0x9ce471(0x198));}const LOCAL_FORBIDDEN_NAMES=new Set([a220_0x7e4941(0x1ba),a220_0x7e4941(0x196),a220_0x7e4941(0x194),'.idea',a220_0x7e4941(0x19e),a220_0x7e4941(0x191),a220_0x7e4941(0x1d0),'.rabetbase.json',a220_0x7e4941(0x1b2),a220_0x7e4941(0x1c1)]);function isForbiddenTemplateEntry(_0x520f85){const _0x3c7054=a220_0x7e4941;if(LOCAL_FORBIDDEN_NAMES[_0x3c7054(0x1d4)](_0x520f85))return!![];return _0x520f85==='.env'||_0x520f85[_0x3c7054(0x1df)]('.env.')&&_0x520f85!=='.env.example';}function a220_0x1e13(_0xd1cd4d,_0x3bd891){_0xd1cd4d=_0xd1cd4d-0x16d;const _0x46583b=a220_0x4658();let _0x1e1363=_0x46583b[_0xd1cd4d];return _0x1e1363;}function containsPath(_0x3d1f42,_0x52e9db){const _0x1519bf=a220_0x7e4941,_0x51c679=a220_0x5d1bea[_0x1519bf(0x189)](_0x3d1f42,_0x52e9db);return _0x51c679===''||!_0x51c679[_0x1519bf(0x1df)]('..'+a220_0x5d1bea[_0x1519bf(0x18a)])&&_0x51c679!=='..'&&!a220_0x5d1bea[_0x1519bf(0x1b7)](_0x51c679);}async function copyLocalTemplateDirectory(_0x251799,_0x59048c){const _0x3444c0=a220_0x7e4941;await a220_0x1b5374[_0x3444c0(0x1cb)](_0x59048c,{'recursive':!![]});for(const _0x46a481 of await a220_0x1b5374[_0x3444c0(0x180)](_0x251799,{'withFileTypes':!![]})){const _0x299500=a220_0x5d1bea[_0x3444c0(0x19c)](_0x251799,_0x46a481['name']),_0x2888b0=a220_0x5d1bea['join'](_0x59048c,_0x46a481[_0x3444c0(0x170)]);if(isForbiddenTemplateEntry(_0x46a481[_0x3444c0(0x170)]))throw new Error(_0x3444c0(0x19b)+_0x299500);const _0xf0877d=await a220_0x1b5374[_0x3444c0(0x179)](_0x299500);if(_0xf0877d[_0x3444c0(0x1d2)]())throw new Error('Local\x20project\x20template\x20must\x20not\x20contain\x20symlinks:\x20'+_0x299500);if(_0xf0877d[_0x3444c0(0x187)]()){await copyLocalTemplateDirectory(_0x299500,_0x2888b0);continue;}if(!_0xf0877d[_0x3444c0(0x1b8)]())continue;await a220_0x1b5374[_0x3444c0(0x1bf)](_0x299500,_0x2888b0),await a220_0x1b5374[_0x3444c0(0x16f)](_0x2888b0,_0xf0877d['mode']&0x1ff);}}async function readTemplateVersion(_0x5ddbf4){const _0x45ff89=a220_0x7e4941,_0x272b37=JSON[_0x45ff89(0x1bb)](await a220_0x1b5374[_0x45ff89(0x17c)](a220_0x5d1bea['join'](_0x5ddbf4,'package.json'),_0x45ff89(0x1a9)));return nonEmptyString(_0x272b37[_0x45ff89(0x17f)])||_0x45ff89(0x1aa);}async function readDirectoryIdentity(_0x15e3a8){const _0x47ff6d=a220_0x7e4941;try{const _0x2c2321=await a220_0x1b5374[_0x47ff6d(0x179)](_0x15e3a8);if(!_0x2c2321[_0x47ff6d(0x187)]())return null;return{'dev':_0x2c2321[_0x47ff6d(0x1a5)],'ino':_0x2c2321['ino']};}catch{return null;}}async function commitStagedProject(_0x3a6cec,_0x372ed8){const _0x4335ee=a220_0x7e4941;await a220_0x1b5374[_0x4335ee(0x1cb)](_0x372ed8);const _0x4bf404=await readDirectoryIdentity(_0x372ed8);if(!_0x4bf404)throw new Error(_0x4335ee(0x1b5));try{for(const _0x478b94 of await a220_0x1b5374['readdir'](_0x3a6cec)){await a220_0x1b5374[_0x4335ee(0x1b3)](a220_0x5d1bea[_0x4335ee(0x19c)](_0x3a6cec,_0x478b94),a220_0x5d1bea['join'](_0x372ed8,_0x478b94));}}catch(_0x1e5bfb){const _0x2918ae=await readDirectoryIdentity(_0x372ed8);_0x2918ae?.[_0x4335ee(0x1a5)]===_0x4bf404[_0x4335ee(0x1a5)]&&_0x2918ae[_0x4335ee(0x1a6)]===_0x4bf404[_0x4335ee(0x1a6)]&&await a220_0x1b5374['rm'](_0x372ed8,{'recursive':!![],'force':!![]});throw _0x1e5bfb;}}export async function materializeProjectTemplate(_0x2dc703,_0x5a803c){const _0x4748cc=a220_0x7e4941,_0x5f3866=a220_0x5d1bea['resolve'](_0x2dc703),_0x5d31cf=a220_0x5d1bea[_0x4748cc(0x1d9)](_0x5f3866);try{await a220_0x1b5374[_0x4748cc(0x179)](_0x5f3866);throw new Error(_0x4748cc(0x171)+_0x5f3866);}catch(_0x5b6476){if(_0x5b6476[_0x4748cc(0x174)]!==_0x4748cc(0x190))throw _0x5b6476;}const _0x1d6a46=await a220_0x1b5374[_0x4748cc(0x1c0)](a220_0x5d1bea[_0x4748cc(0x19c)](_0x5d31cf,_0x4748cc(0x195))),_0x5ee80c=a220_0x5d1bea[_0x4748cc(0x19c)](_0x1d6a46,_0x4748cc(0x1b9)),_0x2ae877=a220_0x5d1bea[_0x4748cc(0x19c)](_0x1d6a46,'template.zip');try{try{_0x5a803c?.(_0x4748cc(0x1cd));const {descriptor:_0x59fa16,channel:_0x1c4770,assetBaseUrl:_0x1a59a3,legacyAssetBaseUrl:_0x3f6d13}=await fetchTemplateDescriptor();return _0x5a803c?.(_0x4748cc(0x176)),await downloadArchive(_0x59fa16,_0x1c4770,_0x1a59a3,_0x3f6d13,_0x2ae877,_0x5a803c),_0x5a803c?.(_0x4748cc(0x1bd)),await extractProjectTemplateArchive(_0x2ae877,_0x5ee80c),await assertTemplateRoot(_0x5ee80c),await commitStagedProject(_0x5ee80c,_0x5f3866),{'source':_0x4748cc(0x1d8),'version':_0x59fa16['version']};}catch(_0x1ec065){if(_0x1ec065[_0x4748cc(0x174)]===_0x4748cc(0x1bc))throw CliErrors['validation'](_0x4748cc(0x171)+_0x5f3866,'Use\x20a\x20different\x20project\x20name.');const _0x3ef483=_0x1ec065 instanceof Error?_0x1ec065[_0x4748cc(0x18f)]:String(_0x1ec065);throw CliErrors['validation'](_0x4748cc(0x1c7),_0x4748cc(0x1ce)+_0x3ef483);}}finally{await a220_0x1b5374['rm'](_0x1d6a46,{'recursive':!![],'force':!![]});}}export async function materializeLocalProjectTemplate(_0x5e5a05,_0x5288d8,_0x4c5976){const _0x424107=a220_0x7e4941;let _0xab3abb;try{_0xab3abb=await a220_0x1b5374[_0x424107(0x1b1)](a220_0x5d1bea[_0x424107(0x181)](_0x5e5a05));}catch{throw CliErrors[_0x424107(0x178)]('Local\x20template\x20source\x20does\x20not\x20exist:\x20'+a220_0x5d1bea[_0x424107(0x181)](_0x5e5a05),_0x424107(0x192));}const _0x4e70db=await a220_0x1b5374[_0x424107(0x179)](_0xab3abb);if(!_0x4e70db[_0x424107(0x187)]())throw CliErrors[_0x424107(0x178)](_0x424107(0x1a0)+_0xab3abb);const _0x559c16=a220_0x5d1bea[_0x424107(0x181)](_0x5288d8),_0x44c331=await a220_0x1b5374[_0x424107(0x1b1)](a220_0x5d1bea['dirname'](_0x559c16)),_0x2ca7fc=a220_0x5d1bea[_0x424107(0x19c)](_0x44c331,a220_0x5d1bea[_0x424107(0x18e)](_0x559c16));if(containsPath(_0xab3abb,_0x2ca7fc)||containsPath(_0x2ca7fc,_0xab3abb))throw CliErrors[_0x424107(0x178)](_0x424107(0x19d),_0x424107(0x1c8));try{await a220_0x1b5374['lstat'](_0x2ca7fc);throw CliErrors[_0x424107(0x178)](_0x424107(0x171)+_0x2ca7fc,'Choose\x20a\x20different\x20project\x20name\x20or\x20remove\x20the\x20directory\x20first.');}catch(_0x27deb6){if(_0x27deb6['code']!=='ENOENT')throw _0x27deb6;}const _0x5e6b1a=a220_0x5d1bea['dirname'](_0x2ca7fc);await a220_0x1b5374[_0x424107(0x185)](_0x5e6b1a);const _0x2a54a1=await a220_0x1b5374[_0x424107(0x1c0)](a220_0x5d1bea[_0x424107(0x19c)](_0x5e6b1a,_0x424107(0x195))),_0x2d166f=a220_0x5d1bea['join'](_0x2a54a1,_0x424107(0x1b9));try{_0x4c5976?.(_0x424107(0x193)),await copyLocalTemplateDirectory(_0xab3abb,_0x2d166f),await assertTemplateRoot(_0x2d166f);const _0x379f47=await readTemplateVersion(_0x2d166f);return await commitStagedProject(_0x2d166f,_0x2ca7fc),{'source':_0x424107(0x1aa),'version':_0x379f47};}catch(_0x57dce9){const _0xec3ae9=_0x57dce9 instanceof Error?_0x57dce9['message']:String(_0x57dce9);throw CliErrors[_0x424107(0x178)](_0x424107(0x1da)+_0xec3ae9,_0x424107(0x172));}finally{await a220_0x1b5374['rm'](_0x2a54a1,{'recursive':!![],'force':!![]});}}
1
+ const a220_0x278feb=a220_0x1825;(function(_0x519263,_0x3b0805){const _0x3862d4=a220_0x1825,_0x6ff47e=_0x519263();while(!![]){try{const _0x20d7fd=parseInt(_0x3862d4(0x180))/0x1*(parseInt(_0x3862d4(0x1b1))/0x2)+parseInt(_0x3862d4(0x178))/0x3+-parseInt(_0x3862d4(0x1ac))/0x4+parseInt(_0x3862d4(0x164))/0x5*(parseInt(_0x3862d4(0x1b4))/0x6)+parseInt(_0x3862d4(0x166))/0x7+parseInt(_0x3862d4(0x175))/0x8+-parseInt(_0x3862d4(0x172))/0x9;if(_0x20d7fd===_0x3b0805)break;else _0x6ff47e['push'](_0x6ff47e['shift']());}catch(_0xf1c6ad){_0x6ff47e['push'](_0x6ff47e['shift']());}}}(a220_0xa0c9,0x9b6d0));import{createHash}from'node:crypto';function a220_0xa0c9(){const _0x581199=['isSymbolicLink','sep','Local\x20project\x20template\x20must\x20not\x20contain\x20symlinks:\x20','join','digest','relative','sub-app-react-demo','.lovrabet.log','.env.','isFile','12303900wZhWFV','.codegraph','get','2558784SJTuLk','status','dev','1493346OsdoJM','CDN\x20project\x20template\x20relative\x20URL\x20must\x20match\x20its\x20release\x20channel\x20or\x20version.','.env.example','extracting','dirname','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','toLowerCase','mkdir','202FjtzEu','mkdtemp','Invalid\x20local\x20template\x20source:\x20','template.zip','number','CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20','package.json','sha256','object','utf8','arrayBuffer','getReader','project','readFile','beta','validation','writeFile','isDirectory','from','downloading','CDN\x20config\x20does\x20not\x20define\x20template\x20\x22','size','Check\x20your\x20network\x20and\x20retry.\x20Details:\x20','CDN\x20project\x20template\x20checksum\x20verification\x20failed.','Check\x20the\x20source\x20directory\x20and\x20retry.','.idea','realpath','rename','ino','Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','local','.lovrabet.json','url','application/zip','access','isFinite','name','EEXIST','pathname','parse','Rabetbase\x20CDN\x20config\x20is\x20unavailable.','readdir','Local\x20template\x20source\x20and\x20project\x20output\x20must\x20not\x20overlap.','startsWith','2500288jVIHJm','legacyAssetBaseUrl','version','string','.env','10814mBJPBk','includes','config','810522fVOYQW','error','trim','length','lstat','.rabetbase','content-length','body','basename','verifying','chmod','byteLength','CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.','posix','sha256:','node_modules','Choose\x20an\x20output\x20directory\x20outside\x20the\x20template\x20source.',',\x20received\x20','protocol','Project\x20template\x20package.json\x20is\x20invalid.','has','origin','isSafeInteger','release','.rabetbase-create-','signal','resolve','CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.','Project\x20directory\x20already\x20exists:\x20','ENOENT','code','copyFile','mode','20nXRdTY','.rabetbase.json','1250228JsevUP','message'];a220_0xa0c9=function(){return _0x581199;};return a220_0xa0c9();}import a220_0xa65d96 from'node:fs/promises';import a220_0x3b86a6 from'node:path';import a220_0x2157d7 from'semver';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=a220_0x278feb(0x16e),ARCHIVE_TIMEOUT_MS=0x3a98,MAX_ARCHIVE_SIZE=0x14*0x400*0x400;function nonEmptyString(_0xf92d88){const _0x97ef2a=a220_0x278feb;return typeof _0xf92d88===_0x97ef2a(0x1af)&&_0xf92d88[_0x97ef2a(0x1b6)]()?_0xf92d88[_0x97ef2a(0x1b6)]():null;}function parseDescriptor(_0x3dd9d8){const _0x22bacc=a220_0x278feb;if(!_0x3dd9d8||typeof _0x3dd9d8!==_0x22bacc(0x188))throw new Error(_0x22bacc(0x194)+TEMPLATE_ID+'\x22.');const _0x492188=_0x3dd9d8,_0x49b13c=nonEmptyString(_0x492188[_0x22bacc(0x1ae)]),_0x3f2fc5=nonEmptyString(_0x492188[_0x22bacc(0x1a4)]),_0x4b1160=_0x492188['url']===undefined?undefined:nonEmptyString(_0x492188['url'])||undefined,_0x4ab539=nonEmptyString(_0x492188[_0x22bacc(0x187)])?.[_0x22bacc(0x17e)](),_0x33edc4=_0x492188[_0x22bacc(0x195)];if(!_0x49b13c||!a220_0x2157d7['valid'](_0x49b13c)||!_0x3f2fc5||_0x3f2fc5!==a220_0x3b86a6[_0x22bacc(0x1c1)][_0x22bacc(0x1bc)](_0x3f2fc5)||_0x3f2fc5['includes']('\x5c')||_0x492188[_0x22bacc(0x1a0)]!==undefined&&!_0x4b1160||!_0x4ab539||!/^sha256:[a-f0-9]{64}$/['test'](_0x4ab539)||typeof _0x33edc4!==_0x22bacc(0x184)||!Number[_0x22bacc(0x1ca)](_0x33edc4)||_0x33edc4<=0x0||_0x33edc4>MAX_ARCHIVE_SIZE)throw new Error('CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22'+TEMPLATE_ID+'\x22.');return{'version':_0x49b13c,'name':_0x3f2fc5,'url':_0x4b1160,'sha256':_0x4ab539,'size':_0x33edc4};}async function fetchWithTimeout(_0x35652f,_0x19d261,_0xe871a0,_0x241bff){const _0x2eabd1=a220_0x278feb,_0x9048dd=new AbortController(),_0xf7877d=setTimeout(()=>_0x9048dd['abort'](),_0x19d261);try{const _0x32e5f8=await fetch(_0x35652f,{'headers':{'Accept':_0xe871a0},'redirect':_0x2eabd1(0x1b5),'signal':_0x9048dd[_0x2eabd1(0x1cd)]});return await _0x241bff(_0x32e5f8);}finally{clearTimeout(_0xf7877d);}}async function fetchTemplateDescriptor(){const _0x509d15=a220_0x278feb,_0x12b60e=getCliVersion(),_0x4e484d=isBetaCliVersion(_0x12b60e)?_0x509d15(0x18e):_0x509d15(0x1cb),_0x3f2808=await fetchProjectTemplateCdnConfig();if(!_0x3f2808)throw new Error(_0x509d15(0x1a8));const _0x590cba=parseDescriptor(resolveProjectTemplateDescriptor(_0x3f2808[_0x509d15(0x1b3)],_0x12b60e));return{'descriptor':_0x590cba,'channel':_0x4e484d,'assetBaseUrl':_0x3f2808['assetBaseUrl'],'legacyAssetBaseUrl':_0x3f2808[_0x509d15(0x1ad)]};}function resolveArchiveUrl(_0x5c1bd6,_0x21ea34,_0x10c456,_0x189cef){const _0x40b795=a220_0x278feb,_0x731516=new URL(_0x10c456+'/'),_0xb288f8=[getProjectTemplateRelativeUrl(_0x21ea34),getProjectTemplateRelativeUrl(_0x21ea34,_0x5c1bd6[_0x40b795(0x1ae)])];if(_0x5c1bd6[_0x40b795(0x1a0)]&&!_0xb288f8[_0x40b795(0x1b2)](_0x5c1bd6[_0x40b795(0x1a0)]))throw new Error(_0x40b795(0x179));const _0x3c7dbc=new URL(_0x189cef+'/'),_0x32143a=_0x5c1bd6[_0x40b795(0x1a0)]?new URL(_0x5c1bd6[_0x40b795(0x1a0)],_0x731516[_0x40b795(0x1c9)]):new URL(_0x5c1bd6[_0x40b795(0x1a4)],_0x3c7dbc),_0x5663b2=_0x5c1bd6[_0x40b795(0x1a0)]?_0x731516[_0x40b795(0x1c9)]:_0x3c7dbc['origin'];if(_0x32143a[_0x40b795(0x1c6)]!=='https:'||_0x32143a['origin']!==_0x5663b2||a220_0x3b86a6['posix'][_0x40b795(0x1bc)](decodeURIComponent(_0x32143a['pathname']))!==_0x5c1bd6[_0x40b795(0x1a4)]||!_0x5c1bd6[_0x40b795(0x1a0)]&&!_0x32143a['pathname']['startsWith'](_0x3c7dbc[_0x40b795(0x1a6)]))throw new Error(_0x40b795(0x1cf));return _0x32143a['href'];}function a220_0x1825(_0x2384d8,_0x1f49ba){_0x2384d8=_0x2384d8-0x161;const _0xa0c917=a220_0xa0c9();let _0x18255e=_0xa0c917[_0x2384d8];return _0x18255e;}async function readResponseBytes(_0x34e40e,_0x381181){const _0x4abae7=a220_0x278feb;if(!_0x34e40e['body']){const _0x10ec79=Buffer[_0x4abae7(0x192)](await _0x34e40e[_0x4abae7(0x18a)]());if(_0x10ec79[_0x4abae7(0x1b7)]>_0x381181)throw new Error(_0x4abae7(0x17d));return _0x10ec79;}const _0x3a8528=_0x34e40e[_0x4abae7(0x1bb)][_0x4abae7(0x18b)](),_0x592c88=[];let _0x114df5=0x0;try{while(!![]){const {done:_0x358a8d,value:_0x585749}=await _0x3a8528['read']();if(_0x358a8d)break;_0x114df5+=_0x585749[_0x4abae7(0x1bf)];if(_0x114df5>_0x381181){await _0x3a8528['cancel']();throw new Error(_0x4abae7(0x17d));}_0x592c88['push'](Buffer[_0x4abae7(0x192)](_0x585749));}}finally{_0x3a8528['releaseLock']();}return Buffer['concat'](_0x592c88,_0x114df5);}async function downloadArchive(_0x368b32,_0x28af5b,_0x416aac,_0x56dd80,_0x48f2e2,_0x335893){const _0x376470=a220_0x278feb,_0xa27c12=await fetchWithTimeout(resolveArchiveUrl(_0x368b32,_0x28af5b,_0x416aac,_0x56dd80),ARCHIVE_TIMEOUT_MS,_0x376470(0x1a1),async _0x4d3a53=>{const _0x42f722=_0x376470;if(!_0x4d3a53['ok'])throw new Error(_0x42f722(0x185)+_0x4d3a53[_0x42f722(0x176)]+'.');const _0x6a98ca=Number(_0x4d3a53['headers'][_0x42f722(0x174)](_0x42f722(0x1ba)));if(Number[_0x42f722(0x1a3)](_0x6a98ca)&&_0x6a98ca>MAX_ARCHIVE_SIZE)throw new Error(_0x42f722(0x1c0));return readResponseBytes(_0x4d3a53,_0x368b32[_0x42f722(0x195)]);});if(_0xa27c12[_0x376470(0x1b7)]!==_0x368b32['size'])throw new Error('CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20'+_0x368b32[_0x376470(0x195)]+_0x376470(0x1c5)+_0xa27c12[_0x376470(0x1b7)]+'.');_0x335893?.(_0x376470(0x1bd));const _0x2a7591=_0x376470(0x1c2)+createHash(_0x376470(0x187))['update'](_0xa27c12)[_0x376470(0x16c)]('hex');if(_0x2a7591!==_0x368b32[_0x376470(0x187)])throw new Error(_0x376470(0x197));await a220_0xa65d96[_0x376470(0x190)](_0x48f2e2,_0xa27c12,{'flag':'wx'});}async function assertTemplateRoot(_0x2d9530){const _0x59a4e3=a220_0x278feb,_0x384625=a220_0x3b86a6[_0x59a4e3(0x16b)](_0x2d9530,'package.json'),_0x286c66=JSON[_0x59a4e3(0x1a7)](await a220_0xa65d96[_0x59a4e3(0x18d)](_0x384625,_0x59a4e3(0x189)));if(!_0x286c66||typeof _0x286c66!=='object')throw new Error(_0x59a4e3(0x1c7));}const LOCAL_FORBIDDEN_NAMES=new Set(['.DS_Store',a220_0x278feb(0x173),'.git',a220_0x278feb(0x199),a220_0x278feb(0x19f),a220_0x278feb(0x16f),a220_0x278feb(0x1b9),a220_0x278feb(0x165),'dist',a220_0x278feb(0x1c3)]);function isForbiddenTemplateEntry(_0x3654af){const _0xbec261=a220_0x278feb;if(LOCAL_FORBIDDEN_NAMES[_0xbec261(0x1c8)](_0x3654af))return!![];return _0x3654af===_0xbec261(0x1b0)||_0x3654af[_0xbec261(0x1ab)](_0xbec261(0x170))&&_0x3654af!==_0xbec261(0x17a);}function containsPath(_0x4a0ebb,_0x508f61){const _0x5e8807=a220_0x278feb,_0x39ab4c=a220_0x3b86a6[_0x5e8807(0x16d)](_0x4a0ebb,_0x508f61);return _0x39ab4c===''||!_0x39ab4c[_0x5e8807(0x1ab)]('..'+a220_0x3b86a6[_0x5e8807(0x169)])&&_0x39ab4c!=='..'&&!a220_0x3b86a6['isAbsolute'](_0x39ab4c);}async function copyLocalTemplateDirectory(_0x52f9f7,_0x5475c8){const _0x42234d=a220_0x278feb;await a220_0xa65d96['mkdir'](_0x5475c8,{'recursive':!![]});for(const _0x2d6a92 of await a220_0xa65d96[_0x42234d(0x1a9)](_0x52f9f7,{'withFileTypes':!![]})){const _0x3d171f=a220_0x3b86a6[_0x42234d(0x16b)](_0x52f9f7,_0x2d6a92[_0x42234d(0x1a4)]),_0x1c7e18=a220_0x3b86a6[_0x42234d(0x16b)](_0x5475c8,_0x2d6a92[_0x42234d(0x1a4)]);if(isForbiddenTemplateEntry(_0x2d6a92[_0x42234d(0x1a4)]))throw new Error('Local\x20project\x20template\x20contains\x20a\x20local-only\x20entry:\x20'+_0x3d171f);const _0x538461=await a220_0xa65d96[_0x42234d(0x1b8)](_0x3d171f);if(_0x538461[_0x42234d(0x168)]())throw new Error(_0x42234d(0x16a)+_0x3d171f);if(_0x538461[_0x42234d(0x191)]()){await copyLocalTemplateDirectory(_0x3d171f,_0x1c7e18);continue;}if(!_0x538461[_0x42234d(0x171)]())continue;await a220_0xa65d96[_0x42234d(0x162)](_0x3d171f,_0x1c7e18),await a220_0xa65d96[_0x42234d(0x1be)](_0x1c7e18,_0x538461[_0x42234d(0x163)]&0x1ff);}}async function readTemplateVersion(_0xc6b2fe){const _0x1b4494=a220_0x278feb,_0xe9a71c=JSON[_0x1b4494(0x1a7)](await a220_0xa65d96[_0x1b4494(0x18d)](a220_0x3b86a6[_0x1b4494(0x16b)](_0xc6b2fe,_0x1b4494(0x186)),'utf8'));return nonEmptyString(_0xe9a71c[_0x1b4494(0x1ae)])||_0x1b4494(0x19e);}async function readDirectoryIdentity(_0x296325){const _0x303e31=a220_0x278feb;try{const _0x394f96=await a220_0xa65d96[_0x303e31(0x1b8)](_0x296325);if(!_0x394f96['isDirectory']())return null;return{'dev':_0x394f96[_0x303e31(0x177)],'ino':_0x394f96[_0x303e31(0x19c)]};}catch{return null;}}async function commitStagedProject(_0xaa921b,_0x16e66a){const _0x2bae8e=a220_0x278feb;await a220_0xa65d96[_0x2bae8e(0x17f)](_0x16e66a);const _0x310e3d=await readDirectoryIdentity(_0x16e66a);if(!_0x310e3d)throw new Error('Unable\x20to\x20claim\x20the\x20project\x20directory.');try{for(const _0x5d9646 of await a220_0xa65d96['readdir'](_0xaa921b)){await a220_0xa65d96[_0x2bae8e(0x19b)](a220_0x3b86a6[_0x2bae8e(0x16b)](_0xaa921b,_0x5d9646),a220_0x3b86a6[_0x2bae8e(0x16b)](_0x16e66a,_0x5d9646));}}catch(_0x40355a){const _0x2318ab=await readDirectoryIdentity(_0x16e66a);_0x2318ab?.[_0x2bae8e(0x177)]===_0x310e3d[_0x2bae8e(0x177)]&&_0x2318ab[_0x2bae8e(0x19c)]===_0x310e3d[_0x2bae8e(0x19c)]&&await a220_0xa65d96['rm'](_0x16e66a,{'recursive':!![],'force':!![]});throw _0x40355a;}}export async function materializeProjectTemplate(_0x2e6b07,_0x1e0b19){const _0x21ec31=a220_0x278feb,_0x25cb2b=a220_0x3b86a6['resolve'](_0x2e6b07),_0x1d22cd=a220_0x3b86a6[_0x21ec31(0x17c)](_0x25cb2b);try{await a220_0xa65d96[_0x21ec31(0x1b8)](_0x25cb2b);throw new Error('Project\x20directory\x20already\x20exists:\x20'+_0x25cb2b);}catch(_0x4701c4){if(_0x4701c4[_0x21ec31(0x161)]!==_0x21ec31(0x1d1))throw _0x4701c4;}const _0x3c0a96=await a220_0xa65d96[_0x21ec31(0x181)](a220_0x3b86a6['join'](_0x1d22cd,_0x21ec31(0x1cc))),_0x979546=a220_0x3b86a6[_0x21ec31(0x16b)](_0x3c0a96,'project'),_0x411171=a220_0x3b86a6['join'](_0x3c0a96,_0x21ec31(0x183));try{try{_0x1e0b19?.('resolving');const {descriptor:_0x5320d1,channel:_0x55a3ba,assetBaseUrl:_0x2ba290,legacyAssetBaseUrl:_0x45cc7f}=await fetchTemplateDescriptor();return _0x1e0b19?.(_0x21ec31(0x193)),await downloadArchive(_0x5320d1,_0x55a3ba,_0x2ba290,_0x45cc7f,_0x411171,_0x1e0b19),_0x1e0b19?.(_0x21ec31(0x17b)),await extractProjectTemplateArchive(_0x411171,_0x979546),await assertTemplateRoot(_0x979546),await commitStagedProject(_0x979546,_0x25cb2b),{'source':'cdn','version':_0x5320d1[_0x21ec31(0x1ae)]};}catch(_0x2d9309){if(_0x2d9309[_0x21ec31(0x161)]===_0x21ec31(0x1a5))throw CliErrors['validation'](_0x21ec31(0x1d0)+_0x25cb2b,'Use\x20a\x20different\x20project\x20name.');const _0x58fd5a=_0x2d9309 instanceof Error?_0x2d9309[_0x21ec31(0x167)]:String(_0x2d9309);throw CliErrors[_0x21ec31(0x18f)](_0x21ec31(0x19d),_0x21ec31(0x196)+_0x58fd5a);}}finally{await a220_0xa65d96['rm'](_0x3c0a96,{'recursive':!![],'force':!![]});}}export async function materializeLocalProjectTemplate(_0x925433,_0x1ec38c,_0x5d5c28){const _0x3bd535=a220_0x278feb;let _0x5d9265;try{_0x5d9265=await a220_0xa65d96[_0x3bd535(0x19a)](a220_0x3b86a6[_0x3bd535(0x1ce)](_0x925433));}catch{throw CliErrors['validation']('Local\x20template\x20source\x20does\x20not\x20exist:\x20'+a220_0x3b86a6[_0x3bd535(0x1ce)](_0x925433),'Pass\x20a\x20directory\x20containing\x20the\x20template\x20source\x20package.json.');}const _0x31540a=await a220_0xa65d96[_0x3bd535(0x1b8)](_0x5d9265);if(!_0x31540a['isDirectory']())throw CliErrors[_0x3bd535(0x18f)]('Local\x20template\x20source\x20is\x20not\x20a\x20directory:\x20'+_0x5d9265);const _0x4ccade=a220_0x3b86a6[_0x3bd535(0x1ce)](_0x1ec38c),_0x53134e=await a220_0xa65d96[_0x3bd535(0x19a)](a220_0x3b86a6[_0x3bd535(0x17c)](_0x4ccade)),_0x42a826=a220_0x3b86a6['join'](_0x53134e,a220_0x3b86a6[_0x3bd535(0x1bc)](_0x4ccade));if(containsPath(_0x5d9265,_0x42a826)||containsPath(_0x42a826,_0x5d9265))throw CliErrors[_0x3bd535(0x18f)](_0x3bd535(0x1aa),_0x3bd535(0x1c4));try{await a220_0xa65d96[_0x3bd535(0x1b8)](_0x42a826);throw CliErrors[_0x3bd535(0x18f)](_0x3bd535(0x1d0)+_0x42a826,'Choose\x20a\x20different\x20project\x20name\x20or\x20remove\x20the\x20directory\x20first.');}catch(_0x47710b){if(_0x47710b['code']!=='ENOENT')throw _0x47710b;}const _0x482c66=a220_0x3b86a6[_0x3bd535(0x17c)](_0x42a826);await a220_0xa65d96[_0x3bd535(0x1a2)](_0x482c66);const _0x26474d=await a220_0xa65d96[_0x3bd535(0x181)](a220_0x3b86a6['join'](_0x482c66,_0x3bd535(0x1cc))),_0x5cc672=a220_0x3b86a6[_0x3bd535(0x16b)](_0x26474d,_0x3bd535(0x18c));try{_0x5d5c28?.('copying'),await copyLocalTemplateDirectory(_0x5d9265,_0x5cc672),await assertTemplateRoot(_0x5cc672);const _0x1ddf5=await readTemplateVersion(_0x5cc672);return await commitStagedProject(_0x5cc672,_0x42a826),{'source':'local','version':_0x1ddf5};}catch(_0x523392){const _0x35607c=_0x523392 instanceof Error?_0x523392['message']:String(_0x523392);throw CliErrors[_0x3bd535(0x18f)](_0x3bd535(0x182)+_0x35607c,_0x3bd535(0x198));}finally{await a220_0xa65d96['rm'](_0x26474d,{'recursive':!![],'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0x386762,_0x5891ab){const _0x2f2fd1=a221_0x26a5,_0x591099=_0x386762();while(!![]){try{const _0x2a58fd=-parseInt(_0x2f2fd1(0x14e))/0x1+-parseInt(_0x2f2fd1(0x149))/0x2+-parseInt(_0x2f2fd1(0x14c))/0x3*(parseInt(_0x2f2fd1(0x141))/0x4)+parseInt(_0x2f2fd1(0x148))/0x5+parseInt(_0x2f2fd1(0x13d))/0x6*(-parseInt(_0x2f2fd1(0x14a))/0x7)+-parseInt(_0x2f2fd1(0x14b))/0x8*(-parseInt(_0x2f2fd1(0x13e))/0x9)+parseInt(_0x2f2fd1(0x143))/0xa;if(_0x2a58fd===_0x5891ab)break;else _0x591099['push'](_0x591099['shift']());}catch(_0x394a2c){_0x591099['push'](_0x591099['shift']());}}}(a221_0x3900,0xc300b));import{CliErrors}from'../../../errors.js';function a221_0x26a5(_0x32568,_0x4afe17){_0x32568=_0x32568-0x13d;const _0x39008b=a221_0x3900();let _0x26a57a=_0x39008b[_0x32568];return _0x26a57a;}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;function a221_0x3900(){const _0x32abf7=['Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','16ZfTDPf','trim','25619130OjjUox','test','Project\x20name\x20cannot\x20be\x20empty','\x20characters','Use\x20a\x20portable\x20directory\x20name\x20without\x20path\x20separators.','6290845iCfIEP','1911984VdONmM','28BsIOsX','203352nhQXTx','613347LvvLtj','validation','1334780uoOHHu','136074ilOkEr','63SBewgP','length'];a221_0x3900=function(){return _0x32abf7;};return a221_0x3900();}export function getProjectNameValidationError(_0x4e3f48){const _0x13693a=a221_0x26a5,_0x5859da=_0x4e3f48[_0x13693a(0x142)]();if(!_0x5859da)return _0x13693a(0x145);if(_0x5859da[_0x13693a(0x13f)]>MAX_PROJECT_NAME_LENGTH)return'Project\x20name\x20cannot\x20exceed\x20'+MAX_PROJECT_NAME_LENGTH+_0x13693a(0x146);if(!PROJECT_NAME_PATTERN[_0x13693a(0x144)](_0x5859da))return _0x13693a(0x140);if(WINDOWS_RESERVED_NAME[_0x13693a(0x144)](_0x5859da))return'Project\x20name\x20\x22'+_0x5859da+'\x22\x20is\x20reserved\x20on\x20Windows';return null;}export function validateProjectName(_0x1c652c){const _0xe5903d=a221_0x26a5,_0x3d3575=_0x1c652c[_0xe5903d(0x142)](),_0x4e602f=getProjectNameValidationError(_0x3d3575);if(_0x4e602f)throw CliErrors[_0xe5903d(0x14d)](_0x4e602f,_0xe5903d(0x147));return _0x3d3575;}
1
+ function a221_0x14ab(_0xd146f8,_0x5c19a6){_0xd146f8=_0xd146f8-0x14c;const _0x25b230=a221_0x25b2();let _0x14ab74=_0x25b230[_0xd146f8];return _0x14ab74;}(function(_0x444d41,_0x542e2d){const _0x3cc903=a221_0x14ab,_0x538b8a=_0x444d41();while(!![]){try{const _0x23019f=parseInt(_0x3cc903(0x14c))/0x1*(-parseInt(_0x3cc903(0x15f))/0x2)+parseInt(_0x3cc903(0x156))/0x3*(parseInt(_0x3cc903(0x152))/0x4)+-parseInt(_0x3cc903(0x155))/0x5*(parseInt(_0x3cc903(0x151))/0x6)+parseInt(_0x3cc903(0x153))/0x7*(parseInt(_0x3cc903(0x158))/0x8)+-parseInt(_0x3cc903(0x15c))/0x9*(parseInt(_0x3cc903(0x157))/0xa)+parseInt(_0x3cc903(0x14d))/0xb+-parseInt(_0x3cc903(0x161))/0xc*(parseInt(_0x3cc903(0x14e))/0xd);if(_0x23019f===_0x542e2d)break;else _0x538b8a['push'](_0x538b8a['shift']());}catch(_0x175103){_0x538b8a['push'](_0x538b8a['shift']());}}}(a221_0x25b2,0x33b88));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(_0x1d8546){const _0x5a2804=a221_0x14ab,_0x38a001=_0x1d8546['trim']();if(!_0x38a001)return _0x5a2804(0x14f);if(_0x38a001[_0x5a2804(0x160)]>MAX_PROJECT_NAME_LENGTH)return'Project\x20name\x20cannot\x20exceed\x20'+MAX_PROJECT_NAME_LENGTH+_0x5a2804(0x15a);if(!PROJECT_NAME_PATTERN[_0x5a2804(0x154)](_0x38a001))return _0x5a2804(0x15e);if(WINDOWS_RESERVED_NAME['test'](_0x38a001))return _0x5a2804(0x159)+_0x38a001+_0x5a2804(0x150);return null;}export function validateProjectName(_0x23afd5){const _0x1c9790=a221_0x14ab,_0x255672=_0x23afd5[_0x1c9790(0x15b)](),_0x2801d6=getProjectNameValidationError(_0x255672);if(_0x2801d6)throw CliErrors[_0x1c9790(0x15d)](_0x2801d6,'Use\x20a\x20portable\x20directory\x20name\x20without\x20path\x20separators.');return _0x255672;}function a221_0x25b2(){const _0x3d190e=['test','22345ISBqAV','57kontar','10MGzTsA','82016rsJomC','Project\x20name\x20\x22','\x20characters','trim','559539uiIbWA','validation','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','2CuoemV','length','392112jJZiOa','83207HPZcTS','1298880QeNNTg','26kDthGA','Project\x20name\x20cannot\x20be\x20empty','\x22\x20is\x20reserved\x20on\x20Windows','54aeSdpe','1348dMSIwR','231uoEzXc'];a221_0x25b2=function(){return _0x3d190e;};return a221_0x25b2();}
@@ -1 +1 @@
1
- (function(_0x168eac,_0x5c3f00){const _0x2cc13d=a222_0x48fe,_0x1fa206=_0x168eac();while(!![]){try{const _0x1775fd=parseInt(_0x2cc13d(0x1f9))/0x1*(parseInt(_0x2cc13d(0x21b))/0x2)+-parseInt(_0x2cc13d(0x204))/0x3*(parseInt(_0x2cc13d(0x210))/0x4)+-parseInt(_0x2cc13d(0x214))/0x5*(-parseInt(_0x2cc13d(0x1fb))/0x6)+parseInt(_0x2cc13d(0x1fe))/0x7+parseInt(_0x2cc13d(0x206))/0x8*(-parseInt(_0x2cc13d(0x1f6))/0x9)+-parseInt(_0x2cc13d(0x205))/0xa+parseInt(_0x2cc13d(0x20f))/0xb;if(_0x1775fd===_0x5c3f00)break;else _0x1fa206['push'](_0x1fa206['shift']());}catch(_0x47ba16){_0x1fa206['push'](_0x1fa206['shift']());}}}(a222_0x426e,0x46fe6));import{createWriteStream}from'node:fs';import a222_0x1a57a8 from'node:fs/promises';import a222_0x1b211e from'node:path';function a222_0x48fe(_0x399b2a,_0x444d7c){_0x399b2a=_0x399b2a-0x1f1;const _0x426e23=a222_0x426e();let _0x48fe7c=_0x426e23[_0x399b2a];return _0x48fe7c;}import{pipeline}from'node:stream/promises';function a222_0x426e(){const _0x1cd605=['5144805IYgsTy','once','en-US','300199yYJZPn','open','24QzFBAW','fileName','end','2440886DTAljb','Unable\x20to\x20open\x20project\x20template\x20archive.','length','Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20','isEncrypted','entry','1668PrledW','1275850vYFAne','8JJggeM','mkdir','catch','toLocaleLowerCase','readEntry','Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20','sep','endsWith','startsWith','2428393GIsNhf','2008FaLpRs','ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20','test','Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20','499340dagqlf','Unable\x20to\x20read\x20ZIP\x20entry:\x20','join','has','Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20','uncompressedSize','close','2hXutVY','dirname','slice','get','Project\x20template\x20ZIP\x20exceeds\x20','error','Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20','resolve','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.','add','set'];a222_0x426e=function(){return _0x1cd605;};return a222_0x426e();}import a222_0x5181c9 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(_0x1692ff){return new Promise((_0x5b90af,_0x573e84)=>{const _0x2ed96f=a222_0x48fe;a222_0x5181c9[_0x2ed96f(0x1fa)](_0x1692ff,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x21a5dc,_0x298c6a)=>{const _0x2836db=_0x2ed96f;if(_0x21a5dc||!_0x298c6a){_0x573e84(_0x21a5dc||new Error(_0x2836db(0x1ff)));return;}_0x5b90af(_0x298c6a);});});}function openEntryStream(_0x3efad4,_0x48936){return new Promise((_0x3b6a86,_0x3ddd8e)=>{_0x3efad4['openReadStream'](_0x48936,(_0x4a4d16,_0x4366bd)=>{const _0x58523b=a222_0x48fe;if(_0x4a4d16||!_0x4366bd){_0x3ddd8e(_0x4a4d16||new Error(_0x58523b(0x215)+_0x48936['fileName']));return;}_0x3b6a86(_0x4366bd);});});}function validateEntryPath(_0x350495){const _0x3d2a10=a222_0x48fe,_0x25470c=_0x350495['replace'](/\\/g,'/'),_0x3dc625=_0x25470c[_0x3d2a10(0x20d)]('/'),_0x409632=_0x3dc625?_0x25470c[_0x3d2a10(0x21d)](0x0,-0x1):_0x25470c;if(!_0x409632||_0x25470c[_0x3d2a10(0x20e)]('/')||/^[A-Za-z]:\//['test'](_0x25470c))throw new Error(_0x3d2a10(0x20b)+_0x350495);const _0x18cffe=_0x409632['split']('/');for(const _0x13dfbb of _0x18cffe){if(!_0x13dfbb||_0x13dfbb==='.'||_0x13dfbb==='..'||_0x13dfbb[_0x3d2a10(0x20d)]('.')||_0x13dfbb['endsWith']('\x20')||WINDOWS_INVALID_CHAR[_0x3d2a10(0x212)](_0x13dfbb)||WINDOWS_RESERVED_NAME[_0x3d2a10(0x212)](_0x13dfbb))throw new Error(_0x3d2a10(0x201)+_0x350495);}return{'relativePath':_0x18cffe[_0x3d2a10(0x216)](a222_0x1b211e['sep']),'directory':_0x3dc625};}function isSymbolicLink(_0x2309a7){const _0x2b9036=_0x2309a7['externalFileAttributes']>>>0x10&0xffff;return(_0x2b9036&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0x16981b,_0x57ad4f){const _0x466435=a222_0x48fe,_0x72a8ee=await openZip(_0x16981b),_0x210e18=a222_0x1b211e[_0x466435(0x1f2)](_0x57ad4f),_0x2f9160=new Set(),_0x177f29=new Map();let _0x3df88c=0x0,_0x155bfc=0x0;await a222_0x1a57a8[_0x466435(0x207)](_0x210e18,{'recursive':!![]}),await new Promise((_0x427eb5,_0x184c8d)=>{const _0x4e45b7=_0x466435;let _0x5bd406=![];const _0x56a30d=_0xe49d65=>{const _0x35e950=a222_0x48fe;if(_0x5bd406)return;_0x5bd406=!![],_0x72a8ee[_0x35e950(0x21a)](),_0x184c8d(_0xe49d65 instanceof Error?_0xe49d65:new Error(String(_0xe49d65)));};_0x72a8ee[_0x4e45b7(0x1f7)](_0x4e45b7(0x220),_0x56a30d),_0x72a8ee[_0x4e45b7(0x1f7)](_0x4e45b7(0x1fd),()=>{if(_0x5bd406)return;_0x5bd406=!![],_0x427eb5();}),_0x72a8ee['on'](_0x4e45b7(0x203),_0x358397=>{const _0x950e81=_0x4e45b7;void(async()=>{const _0x454ebf=a222_0x48fe;_0x3df88c+=0x1,_0x155bfc+=_0x358397[_0x454ebf(0x219)];if(_0x3df88c>MAX_ENTRY_COUNT)throw new Error(_0x454ebf(0x21f)+MAX_ENTRY_COUNT+'\x20entries.');if(_0x155bfc>MAX_UNCOMPRESSED_SIZE)throw new Error(_0x454ebf(0x1f3));if(_0x358397[_0x454ebf(0x202)]())throw new Error(_0x454ebf(0x218)+_0x358397[_0x454ebf(0x1fc)]);if(isSymbolicLink(_0x358397))throw new Error(_0x454ebf(0x1f1)+_0x358397[_0x454ebf(0x1fc)]);const {relativePath:_0xe6e94e,directory:_0x1c7cad}=validateEntryPath(_0x358397[_0x454ebf(0x1fc)]),_0x10e7cf=_0xe6e94e['split'](a222_0x1b211e[_0x454ebf(0x20c)]);for(let _0x558a91=0x1;_0x558a91<=_0x10e7cf[_0x454ebf(0x200)];_0x558a91+=0x1){const _0x1be572=_0x10e7cf[_0x454ebf(0x21d)](0x0,_0x558a91)[_0x454ebf(0x216)](a222_0x1b211e['sep']),_0x24889b=_0x1be572[_0x454ebf(0x209)]('en-US'),_0x3d33ac=_0x177f29[_0x454ebf(0x21e)](_0x24889b);if(_0x3d33ac&&_0x3d33ac!==_0x1be572)throw new Error('Case-conflicting\x20ZIP\x20entry\x20path:\x20'+_0x358397[_0x454ebf(0x1fc)]);_0x177f29[_0x454ebf(0x1f5)](_0x24889b,_0x1be572);}const _0x2b44e5=_0xe6e94e[_0x454ebf(0x209)](_0x454ebf(0x1f8));if(_0x2f9160[_0x454ebf(0x217)](_0x2b44e5))throw new Error(_0x454ebf(0x213)+_0x358397['fileName']);_0x2f9160[_0x454ebf(0x1f4)](_0x2b44e5);const _0x1bfa82=a222_0x1b211e[_0x454ebf(0x1f2)](_0x210e18,_0xe6e94e);if(_0x1bfa82!==_0x210e18&&!_0x1bfa82[_0x454ebf(0x20e)](''+_0x210e18+a222_0x1b211e[_0x454ebf(0x20c)]))throw new Error(_0x454ebf(0x211)+_0x358397[_0x454ebf(0x1fc)]);if(_0x1c7cad)await a222_0x1a57a8[_0x454ebf(0x207)](_0x1bfa82,{'recursive':!![]});else{await a222_0x1a57a8[_0x454ebf(0x207)](a222_0x1b211e[_0x454ebf(0x21c)](_0x1bfa82),{'recursive':!![]});const _0x53af82=await openEntryStream(_0x72a8ee,_0x358397);await pipeline(_0x53af82,createWriteStream(_0x1bfa82,{'flags':'wx','mode':0x1a4}));}_0x72a8ee[_0x454ebf(0x20a)]();})()[_0x950e81(0x208)](_0x56a30d);}),_0x72a8ee[_0x4e45b7(0x20a)]();});}
1
+ (function(_0x1d6d2d,_0x49b680){const _0x3d6ebd=a222_0x5510,_0xbf19fe=_0x1d6d2d();while(!![]){try{const _0x3caf37=parseInt(_0x3d6ebd(0x134))/0x1*(-parseInt(_0x3d6ebd(0x133))/0x2)+parseInt(_0x3d6ebd(0x135))/0x3*(-parseInt(_0x3d6ebd(0x136))/0x4)+-parseInt(_0x3d6ebd(0x122))/0x5*(-parseInt(_0x3d6ebd(0x125))/0x6)+parseInt(_0x3d6ebd(0x11c))/0x7+parseInt(_0x3d6ebd(0x11a))/0x8+parseInt(_0x3d6ebd(0x111))/0x9+-parseInt(_0x3d6ebd(0x13a))/0xa*(-parseInt(_0x3d6ebd(0x12a))/0xb);if(_0x3caf37===_0x49b680)break;else _0xbf19fe['push'](_0xbf19fe['shift']());}catch(_0x126ba3){_0xbf19fe['push'](_0xbf19fe['shift']());}}}(a222_0x268b,0xb186d));import{createWriteStream}from'node:fs';import a222_0x4bb5ae from'node:fs/promises';import a222_0x5a3f43 from'node:path';import{pipeline}from'node:stream/promises';import a222_0x466c75 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(_0x546061){return new Promise((_0x4b5529,_0x355608)=>{a222_0x466c75['open'](_0x546061,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x29ab77,_0x5c0135)=>{const _0x1b2399=a222_0x5510;if(_0x29ab77||!_0x5c0135){_0x355608(_0x29ab77||new Error(_0x1b2399(0x116)));return;}_0x4b5529(_0x5c0135);});});}function a222_0x5510(_0x2f4b19,_0x556ac3){_0x2f4b19=_0x2f4b19-0x110;const _0x268b28=a222_0x268b();let _0x5510c7=_0x268b28[_0x2f4b19];return _0x5510c7;}function a222_0x268b(){const _0xa8959a=['790SDfmKZ','uncompressedSize','join','Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20','isEncrypted','fileName','toLocaleLowerCase','end','5774697ntaOfg','en-US','set','close','endsWith','Unable\x20to\x20open\x20project\x20template\x20archive.','readEntry','slice','sep','2129608gjsIOF','externalFileAttributes','2938271Ypemmy','split','Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20','has','resolve','Unable\x20to\x20read\x20ZIP\x20entry:\x20','215tHTwRL','replace','entry','122538CIKNtL','Project\x20template\x20ZIP\x20exceeds\x20','Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20','mkdir','\x20entries.','112783QTjJrf','Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20','Case-conflicting\x20ZIP\x20entry\x20path:\x20','dirname','startsWith','Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20','openReadStream','add','test','28UdYtJa','78571QiEygV','17310hDeVaf','824VpMXPH','ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.','once'];a222_0x268b=function(){return _0xa8959a;};return a222_0x268b();}function openEntryStream(_0x4cf625,_0x46343d){return new Promise((_0x379887,_0x5f4268)=>{const _0x4896f3=a222_0x5510;_0x4cf625[_0x4896f3(0x130)](_0x46343d,(_0x1bef01,_0x35783d)=>{const _0x5d70e8=_0x4896f3;if(_0x1bef01||!_0x35783d){_0x5f4268(_0x1bef01||new Error(_0x5d70e8(0x121)+_0x46343d[_0x5d70e8(0x13f)]));return;}_0x379887(_0x35783d);});});}function validateEntryPath(_0xe29229){const _0x5868d9=a222_0x5510,_0x3cc789=_0xe29229[_0x5868d9(0x123)](/\\/g,'/'),_0x562f1f=_0x3cc789[_0x5868d9(0x115)]('/'),_0x3f3ae2=_0x562f1f?_0x3cc789[_0x5868d9(0x118)](0x0,-0x1):_0x3cc789;if(!_0x3f3ae2||_0x3cc789['startsWith']('/')||/^[A-Za-z]:\//['test'](_0x3cc789))throw new Error(_0x5868d9(0x13d)+_0xe29229);const _0x3f3f50=_0x3f3ae2[_0x5868d9(0x11d)]('/');for(const _0x263376 of _0x3f3f50){if(!_0x263376||_0x263376==='.'||_0x263376==='..'||_0x263376[_0x5868d9(0x115)]('.')||_0x263376[_0x5868d9(0x115)]('\x20')||WINDOWS_INVALID_CHAR[_0x5868d9(0x132)](_0x263376)||WINDOWS_RESERVED_NAME[_0x5868d9(0x132)](_0x263376))throw new Error(_0x5868d9(0x12b)+_0xe29229);}return{'relativePath':_0x3f3f50[_0x5868d9(0x13c)](a222_0x5a3f43[_0x5868d9(0x119)]),'directory':_0x562f1f};}function isSymbolicLink(_0x2624a2){const _0x56b26e=a222_0x5510,_0x3c5dbb=_0x2624a2[_0x56b26e(0x11b)]>>>0x10&0xffff;return(_0x3c5dbb&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0x2d2ba4,_0x13e94e){const _0x1bbac3=a222_0x5510,_0x555787=await openZip(_0x2d2ba4),_0x5cb5c4=a222_0x5a3f43[_0x1bbac3(0x120)](_0x13e94e),_0x186fa6=new Set(),_0x546c3e=new Map();let _0xeb1414=0x0,_0x53832c=0x0;await a222_0x4bb5ae[_0x1bbac3(0x128)](_0x5cb5c4,{'recursive':!![]}),await new Promise((_0x4454a6,_0x11eb19)=>{const _0x2a8be4=_0x1bbac3;let _0x30c45c=![];const _0x19a47d=_0x5d4de0=>{const _0x3a1b8c=a222_0x5510;if(_0x30c45c)return;_0x30c45c=!![],_0x555787[_0x3a1b8c(0x114)](),_0x11eb19(_0x5d4de0 instanceof Error?_0x5d4de0:new Error(String(_0x5d4de0)));};_0x555787[_0x2a8be4(0x139)]('error',_0x19a47d),_0x555787[_0x2a8be4(0x139)](_0x2a8be4(0x110),()=>{if(_0x30c45c)return;_0x30c45c=!![],_0x4454a6();}),_0x555787['on'](_0x2a8be4(0x124),_0x5466ef=>{void(async()=>{const _0x2dfeea=a222_0x5510;_0xeb1414+=0x1,_0x53832c+=_0x5466ef[_0x2dfeea(0x13b)];if(_0xeb1414>MAX_ENTRY_COUNT)throw new Error(_0x2dfeea(0x126)+MAX_ENTRY_COUNT+_0x2dfeea(0x129));if(_0x53832c>MAX_UNCOMPRESSED_SIZE)throw new Error(_0x2dfeea(0x138));if(_0x5466ef[_0x2dfeea(0x13e)]())throw new Error(_0x2dfeea(0x11e)+_0x5466ef[_0x2dfeea(0x13f)]);if(isSymbolicLink(_0x5466ef))throw new Error(_0x2dfeea(0x127)+_0x5466ef[_0x2dfeea(0x13f)]);const {relativePath:_0x1bb07c,directory:_0x29a93b}=validateEntryPath(_0x5466ef['fileName']),_0x5292e7=_0x1bb07c[_0x2dfeea(0x11d)](a222_0x5a3f43['sep']);for(let _0x4e7249=0x1;_0x4e7249<=_0x5292e7['length'];_0x4e7249+=0x1){const _0x49c3f2=_0x5292e7['slice'](0x0,_0x4e7249)[_0x2dfeea(0x13c)](a222_0x5a3f43[_0x2dfeea(0x119)]),_0x2e66b8=_0x49c3f2[_0x2dfeea(0x140)](_0x2dfeea(0x112)),_0x481969=_0x546c3e['get'](_0x2e66b8);if(_0x481969&&_0x481969!==_0x49c3f2)throw new Error(_0x2dfeea(0x12c)+_0x5466ef[_0x2dfeea(0x13f)]);_0x546c3e[_0x2dfeea(0x113)](_0x2e66b8,_0x49c3f2);}const _0x437155=_0x1bb07c[_0x2dfeea(0x140)](_0x2dfeea(0x112));if(_0x186fa6[_0x2dfeea(0x11f)](_0x437155))throw new Error(_0x2dfeea(0x12f)+_0x5466ef['fileName']);_0x186fa6[_0x2dfeea(0x131)](_0x437155);const _0x42b575=a222_0x5a3f43[_0x2dfeea(0x120)](_0x5cb5c4,_0x1bb07c);if(_0x42b575!==_0x5cb5c4&&!_0x42b575[_0x2dfeea(0x12e)](''+_0x5cb5c4+a222_0x5a3f43[_0x2dfeea(0x119)]))throw new Error(_0x2dfeea(0x137)+_0x5466ef['fileName']);if(_0x29a93b)await a222_0x4bb5ae[_0x2dfeea(0x128)](_0x42b575,{'recursive':!![]});else{await a222_0x4bb5ae[_0x2dfeea(0x128)](a222_0x5a3f43[_0x2dfeea(0x12d)](_0x42b575),{'recursive':!![]});const _0x2c4145=await openEntryStream(_0x555787,_0x5466ef);await pipeline(_0x2c4145,createWriteStream(_0x42b575,{'flags':'wx','mode':0x1a4}));}_0x555787[_0x2dfeea(0x117)]();})()['catch'](_0x19a47d);}),_0x555787[_0x2a8be4(0x117)]();});}
@@ -1 +1 @@
1
- const a223_0x1f1a30=a223_0x3a6c;(function(_0x5551ac,_0x43471f){const _0x29ef26=a223_0x3a6c,_0x5a4261=_0x5551ac();while(!![]){try{const _0x447e3a=-parseInt(_0x29ef26(0x8d))/0x1*(parseInt(_0x29ef26(0x89))/0x2)+parseInt(_0x29ef26(0x88))/0x3+-parseInt(_0x29ef26(0x91))/0x4+-parseInt(_0x29ef26(0x90))/0x5+-parseInt(_0x29ef26(0x8c))/0x6*(-parseInt(_0x29ef26(0x87))/0x7)+-parseInt(_0x29ef26(0x86))/0x8*(-parseInt(_0x29ef26(0x8f))/0x9)+parseInt(_0x29ef26(0x8b))/0xa*(parseInt(_0x29ef26(0x85))/0xb);if(_0x447e3a===_0x43471f)break;else _0x5a4261['push'](_0x5a4261['shift']());}catch(_0x55d330){_0x5a4261['push'](_0x5a4261['shift']());}}}(a223_0x52af,0xb0b60));import a223_0x4ee2c9 from'node:path';import{fileURLToPath}from'node:url';function a223_0x52af(){const _0x5e46a5=['dirname','151430UVsrcp','12wntsJj','914785rbskqm','resolve','1503CMBljg','1067435LFEmCF','2405240jkHXvh','605VRzYqD','44696PgWLcT','1369193NLnwdr','888894YdrWqM','2DpBvua'];a223_0x52af=function(){return _0x5e46a5;};return a223_0x52af();}const __dirname=a223_0x4ee2c9[a223_0x1f1a30(0x8a)](fileURLToPath(import.meta.url));function a223_0x3a6c(_0x389a3f,_0x556de1){_0x389a3f=_0x389a3f-0x85;const _0x52afc3=a223_0x52af();let _0x3a6cac=_0x52afc3[_0x389a3f];return _0x3a6cac;}export function getRabetbaseCliPackageRoot(){const _0x14852b=a223_0x1f1a30;return a223_0x4ee2c9[_0x14852b(0x8e)](__dirname,'../../../../');}
1
+ const a223_0x3deb07=a223_0x4a43;function a223_0x4a43(_0x16f601,_0x4870b5){_0x16f601=_0x16f601-0xf4;const _0x28d64a=a223_0x28d6();let _0x4a433a=_0x28d64a[_0x16f601];return _0x4a433a;}(function(_0x34d26f,_0x2cd439){const _0x106f4d=a223_0x4a43,_0x470b8e=_0x34d26f();while(!![]){try{const _0x20815a=-parseInt(_0x106f4d(0xf7))/0x1+parseInt(_0x106f4d(0xfb))/0x2+parseInt(_0x106f4d(0xfd))/0x3*(parseInt(_0x106f4d(0xf9))/0x4)+-parseInt(_0x106f4d(0xfa))/0x5+parseInt(_0x106f4d(0xf4))/0x6+-parseInt(_0x106f4d(0xfe))/0x7+parseInt(_0x106f4d(0xff))/0x8*(parseInt(_0x106f4d(0xfc))/0x9);if(_0x20815a===_0x2cd439)break;else _0x470b8e['push'](_0x470b8e['shift']());}catch(_0x558acd){_0x470b8e['push'](_0x470b8e['shift']());}}}(a223_0x28d6,0x8a19e));import a223_0xf96f22 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a223_0xf96f22[a223_0x3deb07(0xf5)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x42a505=a223_0x3deb07;return a223_0xf96f22[_0x42a505(0xf6)](__dirname,_0x42a505(0xf8));}function a223_0x28d6(){const _0x44788b=['../../../../','364sDbBRq','1505690vbyfCM','240678sxJtFV','13329UUTWtO','22629cCoSFL','3097472jxwAHO','2616PxCQxf','2034042bHFrku','dirname','resolve','320750ocrXNO'];a223_0x28d6=function(){return _0x44788b;};return a223_0x28d6();}
@@ -1 +1 @@
1
- function a224_0x740d(_0x436cb8,_0x4a2d98){_0x436cb8=_0x436cb8-0x1e0;const _0x465438=a224_0x4654();let _0x740d0e=_0x465438[_0x436cb8];return _0x740d0e;}(function(_0x1cbd2d,_0x1d0aac){const _0x26dcd5=a224_0x740d,_0x4b7444=_0x1cbd2d();while(!![]){try{const _0x4e0372=parseInt(_0x26dcd5(0x1e1))/0x1+parseInt(_0x26dcd5(0x1ed))/0x2+parseInt(_0x26dcd5(0x1ef))/0x3*(-parseInt(_0x26dcd5(0x1e5))/0x4)+-parseInt(_0x26dcd5(0x1eb))/0x5+parseInt(_0x26dcd5(0x1e3))/0x6+-parseInt(_0x26dcd5(0x1f0))/0x7*(parseInt(_0x26dcd5(0x1e0))/0x8)+-parseInt(_0x26dcd5(0x1e4))/0x9*(parseInt(_0x26dcd5(0x1e2))/0xa);if(_0x4e0372===_0x1d0aac)break;else _0x4b7444['push'](_0x4b7444['shift']());}catch(_0x1db27d){_0x4b7444['push'](_0x4b7444['shift']());}}}(a224_0x4654,0xabe44));import a224_0x4ae750 from'node:path';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a224_0x4654(){const _0x5e49f2=['Failed\x20to\x20copy\x20project\x20template','Project\x20template\x20created','error','now','2069675ZeZytp','message','1065858zBBrFu','cwd','12UpFGtr','7OqYkIp','version','copy','source','success','2155304CigAZA','292816TcnYhV','10550ZtcHSS','5790120RgqXki','3231wHHOIs','24604VBtdhB','info'];a224_0x4654=function(){return _0x5e49f2;};return a224_0x4654();}import{materializeLocalProjectTemplate,materializeProjectTemplate}from'../../../commands/project/create/materialize-project-template.js';export async function copyProjectTemplate(_0x12ee7e,_0x452a48,_0x2206fc){const _0x2f9096=a224_0x740d,_0x46e896=Date[_0x2f9096(0x1ea)](),_0x57f381=a224_0x4ae750['resolve'](process[_0x2f9096(0x1ee)](),_0x12ee7e);try{logger[_0x2f9096(0x1e6)]('copy','Starting\x20project\x20template\x20creation',{'projectCode':_0x12ee7e});const _0x2f70a1=_0x2206fc?await materializeLocalProjectTemplate(_0x2206fc,_0x57f381,_0x452a48):await materializeProjectTemplate(_0x57f381,_0x452a48),_0x21a68c=Date[_0x2f9096(0x1ea)]()-_0x46e896;logger[_0x2f9096(0x1f4)](_0x2f9096(0x1f2),_0x2f9096(0x1e8),_0x21a68c,{'projectCode':_0x12ee7e,'templateSource':_0x2f70a1[_0x2f9096(0x1f3)],'templateVersion':_0x2f70a1[_0x2f9096(0x1f1)]});}catch(_0x44a16e){const _0x60d33c=Date['now']()-_0x46e896;logger[_0x2f9096(0x1e9)](_0x2f9096(0x1f2),_0x2f9096(0x1e7),{'projectCode':_0x12ee7e,'error':_0x44a16e instanceof Error?_0x44a16e[_0x2f9096(0x1ec)]:String(_0x44a16e),'duration':_0x60d33c});throw _0x44a16e;}return formatElapsed(_0x46e896);}
1
+ function a224_0x5bac(){const _0x1a65d3=['Failed\x20to\x20copy\x20project\x20template','14312ZTEmDu','168MnRYBX','751578TGBWhq','15gVfgXQ','25199471AEPOPn','161910nGjLGF','160wptMBb','version','Project\x20template\x20created','source','666556GTOWtL','success','1hMWEhQ','Starting\x20project\x20template\x20creation','copy','now','3048921XeYTlT','1001760pKVKls','message'];a224_0x5bac=function(){return _0x1a65d3;};return a224_0x5bac();}function a224_0x17c1(_0x2f4139,_0xecd7ee){_0x2f4139=_0x2f4139-0x19b;const _0x5bac63=a224_0x5bac();let _0x17c113=_0x5bac63[_0x2f4139];return _0x17c113;}(function(_0x148ba1,_0x55bd8e){const _0x555766=a224_0x17c1,_0x4bbfd6=_0x148ba1();while(!![]){try{const _0x52f62d=parseInt(_0x555766(0x19b))/0x1*(-parseInt(_0x555766(0x1a5))/0x2)+-parseInt(_0x555766(0x19f))/0x3+-parseInt(_0x555766(0x1ad))/0x4*(-parseInt(_0x555766(0x1a6))/0x5)+-parseInt(_0x555766(0x1a0))/0x6+-parseInt(_0x555766(0x1a4))/0x7*(parseInt(_0x555766(0x1a3))/0x8)+-parseInt(_0x555766(0x1a8))/0x9*(parseInt(_0x555766(0x1a9))/0xa)+parseInt(_0x555766(0x1a7))/0xb;if(_0x52f62d===_0x55bd8e)break;else _0x4bbfd6['push'](_0x4bbfd6['shift']());}catch(_0x4da2ad){_0x4bbfd6['push'](_0x4bbfd6['shift']());}}}(a224_0x5bac,0xdbf52));import a224_0x29ff36 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(_0x66bb65,_0x4109e6,_0xf29052){const _0x541e2f=a224_0x17c1,_0x4c025e=Date[_0x541e2f(0x19e)](),_0x1035d5=a224_0x29ff36['resolve'](process['cwd'](),_0x66bb65);try{logger['info'](_0x541e2f(0x19d),_0x541e2f(0x19c),{'projectCode':_0x66bb65});const _0x31a9ea=_0xf29052?await materializeLocalProjectTemplate(_0xf29052,_0x1035d5,_0x4109e6):await materializeProjectTemplate(_0x1035d5,_0x4109e6),_0x547bb6=Date['now']()-_0x4c025e;logger[_0x541e2f(0x1ae)](_0x541e2f(0x19d),_0x541e2f(0x1ab),_0x547bb6,{'projectCode':_0x66bb65,'templateSource':_0x31a9ea[_0x541e2f(0x1ac)],'templateVersion':_0x31a9ea[_0x541e2f(0x1aa)]});}catch(_0x321778){const _0x49c5c8=Date['now']()-_0x4c025e;logger['error'](_0x541e2f(0x19d),_0x541e2f(0x1a2),{'projectCode':_0x66bb65,'error':_0x321778 instanceof Error?_0x321778[_0x541e2f(0x1a1)]:String(_0x321778),'duration':_0x49c5c8});throw _0x321778;}return formatElapsed(_0x4c025e);}
@@ -1 +1 @@
1
- (function(_0x3b1e57,_0x548768){const _0x19f48b=a225_0x17d6,_0x5d1713=_0x3b1e57();while(!![]){try{const _0x186918=parseInt(_0x19f48b(0x10a))/0x1+parseInt(_0x19f48b(0x10d))/0x2*(-parseInt(_0x19f48b(0x113))/0x3)+parseInt(_0x19f48b(0x111))/0x4+-parseInt(_0x19f48b(0x108))/0x5*(parseInt(_0x19f48b(0x116))/0x6)+-parseInt(_0x19f48b(0x110))/0x7*(parseInt(_0x19f48b(0x115))/0x8)+-parseInt(_0x19f48b(0x105))/0x9*(parseInt(_0x19f48b(0x119))/0xa)+parseInt(_0x19f48b(0x11a))/0xb;if(_0x186918===_0x548768)break;else _0x5d1713['push'](_0x5d1713['shift']());}catch(_0x1e36e8){_0x5d1713['push'](_0x5d1713['shift']());}}}(a225_0x60f3,0x69ecc));function a225_0x17d6(_0x923f90,_0x3759ea){_0x923f90=_0x923f90-0x104;const _0x60f31f=a225_0x60f3();let _0x17d662=_0x60f31f[_0x923f90];return _0x17d662;}import a225_0x199e00 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(_0x5b3dd5){const _0x4c5b87=a225_0x17d6,_0x4fba97=Date[_0x4c5b87(0x10c)](),_0x5a1977=a225_0x199e00[_0x4c5b87(0x118)](process[_0x4c5b87(0x107)](),_0x5b3dd5);try{logger[_0x4c5b87(0x104)](_0x4c5b87(0x114),_0x4c5b87(0x112),{'projectCode':_0x5b3dd5}),await execa(resolveNpmBin(_0x4c5b87(0x10e)),[_0x4c5b87(0x117),'--write','.'],{'cwd':_0x5a1977});const _0x2f550a=Date[_0x4c5b87(0x10c)]()-_0x4fba97;logger[_0x4c5b87(0x10f)](_0x4c5b87(0x114),_0x4c5b87(0x109),_0x2f550a,{'projectCode':_0x5b3dd5});}catch(_0x4f1320){const _0x154f4f=Date[_0x4c5b87(0x10c)]()-_0x4fba97;logger[_0x4c5b87(0x10b)]('format','Code\x20format\x20failed',{'projectCode':_0x5b3dd5,'error':_0x4f1320 instanceof Error?_0x4f1320[_0x4c5b87(0x106)]:String(_0x4f1320),'duration':_0x154f4f});throw _0x4f1320;}return formatElapsed(_0x4fba97);}function a225_0x60f3(){const _0x1a1069=['2itfOjy','npx','success','14LJyIQC','3424996EBTIVT','Starting\x20code\x20format','237189CLFYNR','format','362360DmniJy','36972nmufTE','prettier','resolve','10ZeblTc','890087betKHf','info','3864123atIhLY','message','cwd','20yPTqCd','Code\x20format\x20completed','120350TUqoCI','error','now'];a225_0x60f3=function(){return _0x1a1069;};return a225_0x60f3();}
1
+ (function(_0xbb7c3f,_0x1aad10){const _0x344718=a225_0x539d,_0x3be4bc=_0xbb7c3f();while(!![]){try{const _0x4b710c=-parseInt(_0x344718(0x95))/0x1+parseInt(_0x344718(0x97))/0x2+-parseInt(_0x344718(0x96))/0x3+parseInt(_0x344718(0x99))/0x4*(-parseInt(_0x344718(0xa3))/0x5)+parseInt(_0x344718(0x92))/0x6+parseInt(_0x344718(0xa2))/0x7*(parseInt(_0x344718(0x93))/0x8)+-parseInt(_0x344718(0xa4))/0x9*(-parseInt(_0x344718(0xa0))/0xa);if(_0x4b710c===_0x1aad10)break;else _0x3be4bc['push'](_0x3be4bc['shift']());}catch(_0x27c06d){_0x3be4bc['push'](_0x3be4bc['shift']());}}}(a225_0x4ea9,0x41077));import a225_0x235db from'node:path';import{execa}from'execa';function a225_0x4ea9(){const _0x515ed2=['prettier','Starting\x20code\x20format','1608708HYWYDa','16RjwMrp','cwd','218831tifkqs','999633PFYFDO','284870LPYwjl','Code\x20format\x20completed','8nzVdzP','Code\x20format\x20failed','info','format','now','success','resolve','168020bsYmXS','message','351484yZBjKb','449585bAsZvn','261TtIOUW'];a225_0x4ea9=function(){return _0x515ed2;};return a225_0x4ea9();}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';function a225_0x539d(_0x1d584c,_0x20d7f0){_0x1d584c=_0x1d584c-0x92;const _0x4ea9be=a225_0x4ea9();let _0x539d46=_0x4ea9be[_0x1d584c];return _0x539d46;}export async function formatProjectCode(_0x24d511){const _0x4bb837=a225_0x539d,_0x425003=Date[_0x4bb837(0x9d)](),_0x5daf38=a225_0x235db[_0x4bb837(0x9f)](process[_0x4bb837(0x94)](),_0x24d511);try{logger[_0x4bb837(0x9b)](_0x4bb837(0x9c),_0x4bb837(0xa6),{'projectCode':_0x24d511}),await execa(resolveNpmBin('npx'),[_0x4bb837(0xa5),'--write','.'],{'cwd':_0x5daf38});const _0x9b9cc9=Date[_0x4bb837(0x9d)]()-_0x425003;logger[_0x4bb837(0x9e)](_0x4bb837(0x9c),_0x4bb837(0x98),_0x9b9cc9,{'projectCode':_0x24d511});}catch(_0x5e9daf){const _0xab607e=Date['now']()-_0x425003;logger['error']('format',_0x4bb837(0x9a),{'projectCode':_0x24d511,'error':_0x5e9daf instanceof Error?_0x5e9daf[_0x4bb837(0xa1)]:String(_0x5e9daf),'duration':_0xab607e});throw _0x5e9daf;}return formatElapsed(_0x425003);}
@@ -1 +1 @@
1
- (function(_0x863e04,_0xf686c4){const _0x46426b=a226_0x5742,_0x57b2de=_0x863e04();while(!![]){try{const _0x565ba6=parseInt(_0x46426b(0x13d))/0x1+-parseInt(_0x46426b(0x135))/0x2+parseInt(_0x46426b(0x139))/0x3*(parseInt(_0x46426b(0x141))/0x4)+-parseInt(_0x46426b(0x13e))/0x5*(-parseInt(_0x46426b(0x134))/0x6)+-parseInt(_0x46426b(0x13f))/0x7+parseInt(_0x46426b(0x133))/0x8+-parseInt(_0x46426b(0x132))/0x9*(parseInt(_0x46426b(0x143))/0xa);if(_0x565ba6===_0xf686c4)break;else _0x57b2de['push'](_0x57b2de['shift']());}catch(_0x35eb2d){_0x57b2de['push'](_0x57b2de['shift']());}}}(a226_0x16e9,0x861b1));import a226_0x126af7 from'node:path';function a226_0x5742(_0x15de5b,_0x15ce92){_0x15de5b=_0x15de5b-0x131;const _0x16e960=a226_0x16e9();let _0x574260=_0x16e960[_0x15de5b];return _0x574260;}import{execa}from'execa';function a226_0x16e9(){const _0x2ee8be=['now','9sjeAqX','6601304GSaMbF','7494drgIZb','72378CxzMUD','cwd','success','Dependency\x20install\x20completed','21dWtiBl','npm','install','resolve','1087568QPgBSu','570ePxRve','6425944NlphPt','https://registry.npmmirror.com','82568qwoCVB','Dependency\x20install\x20failed','6961330zZgSMZ'];a226_0x16e9=function(){return _0x2ee8be;};return a226_0x16e9();}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(_0xdc0684){const _0x2c572a=a226_0x5742,_0x4030ee=Date[_0x2c572a(0x131)](),_0x321684=a226_0x126af7[_0x2c572a(0x13c)](process[_0x2c572a(0x136)](),_0xdc0684);try{logger['info'](_0x2c572a(0x13b),'Starting\x20dependency\x20install',{'projectCode':_0xdc0684,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin(_0x2c572a(0x13a)),[_0x2c572a(0x13b),'--registry',_0x2c572a(0x140)],{'cwd':_0x321684});const _0x36610a=Date[_0x2c572a(0x131)]()-_0x4030ee;logger[_0x2c572a(0x137)](_0x2c572a(0x13b),_0x2c572a(0x138),_0x36610a,{'projectCode':_0xdc0684});}catch(_0x7718cc){const _0x10abcb=Date[_0x2c572a(0x131)]()-_0x4030ee;logger['error'](_0x2c572a(0x13b),_0x2c572a(0x142),{'projectCode':_0xdc0684,'error':_0x7718cc instanceof Error?_0x7718cc['message']:String(_0x7718cc),'duration':_0x10abcb});throw _0x7718cc;}return formatElapsed(_0x4030ee);}
1
+ (function(_0x44e7b9,_0x32a877){const _0x1773e3=a226_0x28e1,_0x48d56f=_0x44e7b9();while(!![]){try{const _0x4cc3a1=-parseInt(_0x1773e3(0xb8))/0x1*(-parseInt(_0x1773e3(0xc0))/0x2)+parseInt(_0x1773e3(0xaf))/0x3*(parseInt(_0x1773e3(0xac))/0x4)+-parseInt(_0x1773e3(0xb5))/0x5+-parseInt(_0x1773e3(0xb1))/0x6+parseInt(_0x1773e3(0xbc))/0x7+-parseInt(_0x1773e3(0xb7))/0x8*(parseInt(_0x1773e3(0xbf))/0x9)+parseInt(_0x1773e3(0xb0))/0xa;if(_0x4cc3a1===_0x32a877)break;else _0x48d56f['push'](_0x48d56f['shift']());}catch(_0x2b6ec6){_0x48d56f['push'](_0x48d56f['shift']());}}}(a226_0x1890,0xead6a));function a226_0x1890(){const _0x6313da=['2539230dzbobG','7805586piUlzJ','Dependency\x20install\x20failed','install','now','1459485VDJhjb','https://registry.npmmirror.com','8nCqRYV','319391mKSgae','info','message','resolve','8172311HzLbiS','cwd','success','9044199mYTFfl','6TjfCig','27128JzNdip','--registry','Dependency\x20install\x20completed','522JcSxUN'];a226_0x1890=function(){return _0x6313da;};return a226_0x1890();}function a226_0x28e1(_0x43427e,_0x3440ed){_0x43427e=_0x43427e-0xac;const _0x1890fb=a226_0x1890();let _0x28e1a8=_0x1890fb[_0x43427e];return _0x28e1a8;}import a226_0x2c6a62 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(_0x23f56b){const _0x224a13=a226_0x28e1,_0x1493c8=Date[_0x224a13(0xb4)](),_0x40f59a=a226_0x2c6a62[_0x224a13(0xbb)](process[_0x224a13(0xbd)](),_0x23f56b);try{logger[_0x224a13(0xb9)](_0x224a13(0xb3),'Starting\x20dependency\x20install',{'projectCode':_0x23f56b,'registry':_0x224a13(0xb6)}),await execa(resolveNpmBin('npm'),[_0x224a13(0xb3),_0x224a13(0xad),_0x224a13(0xb6)],{'cwd':_0x40f59a});const _0xc1c1a8=Date[_0x224a13(0xb4)]()-_0x1493c8;logger[_0x224a13(0xbe)](_0x224a13(0xb3),_0x224a13(0xae),_0xc1c1a8,{'projectCode':_0x23f56b});}catch(_0x55ce65){const _0x393c4c=Date['now']()-_0x1493c8;logger['error']('install',_0x224a13(0xb2),{'projectCode':_0x23f56b,'error':_0x55ce65 instanceof Error?_0x55ce65[_0x224a13(0xba)]:String(_0x55ce65),'duration':_0x393c4c});throw _0x55ce65;}return formatElapsed(_0x1493c8);}
@@ -1 +1 @@
1
- function a227_0x3997(){const _0x44bdb7=['read','10378696dhzUBR','No\x20Rabetbase\x20project\x20configuration\x20was\x20found.','6633AHeKUZ','\x20workspace\x20init\x20--appcode\x20<code>\x20in\x20the\x20project\x20directory\x20first.','1088DcvvRc','validation','5499738LgTVOb','26460noxvUt','Run\x20','project','491868SyDpNs','39zAVNFN','path','2568935tcMzON','2048jQyLCE','domain-routing-sync','Synchronize\x20the\x20current\x20project\x27s\x20public\x20Domain\x20routing','Domain\x20routing\x20synchronized:\x20','18rMgBrS','3039281WYqzlH'];a227_0x3997=function(){return _0x44bdb7;};return a227_0x3997();}const a227_0x2b55bd=a227_0x26f1;(function(_0x771a7b,_0x3bd3e1){const _0x43fe86=a227_0x26f1,_0x3e3c51=_0x771a7b();while(!![]){try{const _0x3bca3b=parseInt(_0x43fe86(0xf2))/0x1*(-parseInt(_0x43fe86(0xe7))/0x2)+parseInt(_0x43fe86(0xf9))/0x3*(parseInt(_0x43fe86(0xf8))/0x4)+-parseInt(_0x43fe86(0xe6))/0x5+parseInt(_0x43fe86(0xeb))/0x6*(-parseInt(_0x43fe86(0xec))/0x7)+parseInt(_0x43fe86(0xee))/0x8+-parseInt(_0x43fe86(0xf4))/0x9+parseInt(_0x43fe86(0xf5))/0xa*(parseInt(_0x43fe86(0xf0))/0xb);if(_0x3bca3b===_0x3bd3e1)break;else _0x3e3c51['push'](_0x3e3c51['shift']());}catch(_0x23eb41){_0x3e3c51['push'](_0x3e3c51['shift']());}}}(a227_0x3997,0xe7e9c));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';function a227_0x26f1(_0x1ed14e,_0x7c4245){_0x1ed14e=_0x1ed14e-0xe5;const _0x399764=a227_0x3997();let _0x26f151=_0x399764[_0x1ed14e];return _0x26f151;}import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';export const projectDomainRoutingSyncDefinition={'service':a227_0x2b55bd(0xf7),'command':a227_0x2b55bd(0xe8),'description':a227_0x2b55bd(0xe9),'risk':a227_0x2b55bd(0xed),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(){const _0xe18d78=a227_0x2b55bd,_0x5eace3=findProjectRootDirectory();if(!resolveConfigPath(_0x5eace3))throw CliErrors[_0xe18d78(0xf3)](_0xe18d78(0xef),_0xe18d78(0xf6)+CLI_BIN_NAME+_0xe18d78(0xf1));const _0xe41d18=writeProjectDomainRoutingManifest(_0x5eace3);return{'ok':!![],'message':_0xe18d78(0xea)+_0xe41d18[_0xe18d78(0xe5)],'data':_0xe41d18};}};
1
+ const a227_0x10ad08=a227_0x361d;function a227_0x1703(){const _0x1009f6=['1716984frHrGU','read','Synchronize\x20the\x20current\x20project\x27s\x20public\x20Domain\x20routing','\x20workspace\x20init\x20--appcode\x20<code>\x20in\x20the\x20project\x20directory\x20first.','5515435AldgaL','project','2342880suvIwj','Run\x20','4WuJenE','domain-routing-sync','890382NGbccA','10ZtcIXn','6MnvUbf','No\x20Rabetbase\x20project\x20configuration\x20was\x20found.','validation','6gWhxcq','3948800yipuBT','path','2997029TQhbls','7961239CxoCIS'];a227_0x1703=function(){return _0x1009f6;};return a227_0x1703();}(function(_0x10b8da,_0xb13873){const _0x1a39dc=a227_0x361d,_0x1d08f8=_0x10b8da();while(!![]){try{const _0x2325e9=parseInt(_0x1a39dc(0x1ea))/0x1+-parseInt(_0x1a39dc(0x1ef))/0x2*(-parseInt(_0x1a39dc(0x1e0))/0x3)+-parseInt(_0x1a39dc(0x1e8))/0x4*(parseInt(_0x1a39dc(0x1e4))/0x5)+-parseInt(_0x1a39dc(0x1ec))/0x6*(-parseInt(_0x1a39dc(0x1de))/0x7)+-parseInt(_0x1a39dc(0x1f0))/0x8+parseInt(_0x1a39dc(0x1e6))/0x9+-parseInt(_0x1a39dc(0x1eb))/0xa*(parseInt(_0x1a39dc(0x1df))/0xb);if(_0x2325e9===_0xb13873)break;else _0x1d08f8['push'](_0x1d08f8['shift']());}catch(_0x4ca909){_0x1d08f8['push'](_0x1d08f8['shift']());}}}(a227_0x1703,0xee225));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a227_0x361d(_0x2b85b1,_0x2a6de1){_0x2b85b1=_0x2b85b1-0x1dd;const _0x17031d=a227_0x1703();let _0x361d8=_0x17031d[_0x2b85b1];return _0x361d8;}import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';export const projectDomainRoutingSyncDefinition={'service':a227_0x10ad08(0x1e5),'command':a227_0x10ad08(0x1e9),'description':a227_0x10ad08(0x1e2),'risk':a227_0x10ad08(0x1e1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(){const _0x1af607=a227_0x10ad08,_0xc9a1b4=findProjectRootDirectory();if(!resolveConfigPath(_0xc9a1b4))throw CliErrors[_0x1af607(0x1ee)](_0x1af607(0x1ed),_0x1af607(0x1e7)+CLI_BIN_NAME+_0x1af607(0x1e3));const _0x4b40af=writeProjectDomainRoutingManifest(_0xc9a1b4);return{'ok':!![],'message':'Domain\x20routing\x20synchronized:\x20'+_0x4b40af[_0x1af607(0x1dd)],'data':_0x4b40af};}};
@@ -1 +1 @@
1
- function a228_0x21da(){const _0xaef5be=['Create\x20a\x20new\x20project','99ygVsxs','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','boolean','Target\x20environment','Prepared\x20local\x20project\x20template\x20directory','../../commands/project/create/main.js','Skip\x20confirmation\x20prompt','Project\x20upgrade\x20completed.','nonInteractive','yes','cwd','env','args','12275AOQuyS','13JgBrZF','current-dir','appcode','Would\x20upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure\x20without\x20overwriting\x20project-owned\x20entrypoints','26513bCviwO','template-source','project-name','Run\x20','trim','upgrade','str','write','bool','cookie','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','9YoeDYG','Project\x20name','1134cbIEyN','161598SBtvFa','158930TwbTxO','completed','8939SsDhel','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]\x20from\x20the\x20empty\x20target\x20directory.','name','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]\x20or\x20','cancelled','string','PATCH','validation','10823964ApLflK','2HXOwUU','--current-dir\x20cannot\x20be\x20combined\x20with\x20a\x20project\x20name.','1696528PmQclF','252cgNWLV','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','Upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure'];a228_0x21da=function(){return _0xaef5be;};return a228_0x21da();}const a228_0x1c944b=a228_0x5408;(function(_0x4e1178,_0xd94e2){const _0x595c35=a228_0x5408,_0x4a7a10=_0x4e1178();while(!![]){try{const _0x56d7dd=-parseInt(_0x595c35(0xb5))/0x1*(-parseInt(_0x595c35(0xcf))/0x2)+-parseInt(_0x595c35(0xc3))/0x3+-parseInt(_0x595c35(0xd2))/0x4*(parseInt(_0x595c35(0xb0))/0x5)+-parseInt(_0x595c35(0xc2))/0x6*(parseInt(_0x595c35(0xc6))/0x7)+-parseInt(_0x595c35(0xd1))/0x8*(parseInt(_0x595c35(0xc0))/0x9)+-parseInt(_0x595c35(0xc4))/0xa*(parseInt(_0x595c35(0xd6))/0xb)+-parseInt(_0x595c35(0xce))/0xc*(-parseInt(_0x595c35(0xb1))/0xd);if(_0x56d7dd===_0xd94e2)break;else _0x4a7a10['push'](_0x4a7a10['shift']());}catch(_0x563f35){_0x4a7a10['push'](_0x4a7a10['shift']());}}}(a228_0x21da,0x1e283));function a228_0x5408(_0x3865f1,_0x11aa83){_0x3865f1=_0x3865f1-0xa6;const _0x21daef=a228_0x21da();let _0x5408a0=_0x21daef[_0x3865f1];return _0x5408a0;}import{CliErrors}from'../../errors.js';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':a228_0x1c944b(0xcb),'description':a228_0x1c944b(0xc1)},{'name':a228_0x1c944b(0xae),'type':'string','description':a228_0x1c944b(0xa6)},{'name':'appcode','type':a228_0x1c944b(0xcb),'description':a228_0x1c944b(0xd3)},{'name':a228_0x1c944b(0xb2),'type':a228_0x1c944b(0xd8),'description':'Initialize\x20the\x20current\x20empty\x20directory\x20instead\x20of\x20creating\x20a\x20child\x20directory','default':![]},{'name':a228_0x1c944b(0xb6),'type':a228_0x1c944b(0xcb),'description':a228_0x1c944b(0xa7)}],upgradeFlags=[{'name':'yes','type':a228_0x1c944b(0xd8),'description':a228_0x1c944b(0xa9),'default':![]}];export const projectDefinitions=[{'service':'project','command':'create','description':a228_0x1c944b(0xd5),'risk':a228_0x1c944b(0xbc),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a228_0x1c944b(0xb7),'description':a228_0x1c944b(0xd7),'required':![]}],'flags':createFlags,async 'execute'(_0x27afa4){const _0x4725cf=a228_0x1c944b,{createApp:_0x1ce351}=await import(_0x4725cf(0xa8)),_0x2f37c0=_0x27afa4['str'](_0x4725cf(0xc8))[_0x4725cf(0xb9)]()||_0x27afa4[_0x4725cf(0xaf)][0x0]?.[_0x4725cf(0xb9)](),_0x40144d=_0x27afa4[_0x4725cf(0xbb)](_0x4725cf(0xae))||undefined,_0x286b31=_0x27afa4['str'](_0x4725cf(0xb3))||undefined,_0x735e85=_0x27afa4[_0x4725cf(0xbb)](_0x4725cf(0xb6))[_0x4725cf(0xb9)]()||undefined,_0x2eca6f=_0x27afa4[_0x4725cf(0xbd)](_0x4725cf(0xb2));if(_0x2eca6f&&_0x2f37c0)throw CliErrors[_0x4725cf(0xcd)](_0x4725cf(0xd0),_0x4725cf(0xb8)+CLI_BIN_NAME+_0x4725cf(0xc7));if(_0x27afa4[_0x4725cf(0xab)]){if(!_0x2f37c0&&!_0x2eca6f)throw CliErrors[_0x4725cf(0xcd)](_0x4725cf(0xbf),'Usage:\x20'+CLI_BIN_NAME+_0x4725cf(0xc9)+CLI_BIN_NAME+'\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]');await _0x1ce351({'projectCode':_0x2f37c0,'appCode':_0x286b31,'env':_0x40144d,'cookie':_0x27afa4[_0x4725cf(0xbe)],'currentDir':_0x2eca6f,'nonInteractive':!![],'templateSource':_0x735e85});}else await _0x1ce351({'projectCode':_0x2f37c0,'appCode':_0x286b31,'env':_0x40144d,'cookie':_0x27afa4[_0x4725cf(0xbe)],'currentDir':_0x2eca6f,'templateSource':_0x735e85});return{'ok':!![]};}},projectDomainRoutingSyncDefinition,{'service':'project','command':a228_0x1c944b(0xba),'description':a228_0x1c944b(0xd4),'risk':a228_0x1c944b(0xbc),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'dryRun'(){const _0x4df87a=a228_0x1c944b,_0x37f227=analyseProjectUpgrade(process[_0x4df87a(0xad)]());return{'method':_0x4df87a(0xcc),'url':process['cwd'](),'body':_0x37f227,'description':_0x4df87a(0xb4)};},async 'execute'(_0x19b74b){const _0x13098b=a228_0x1c944b,_0x4409c5=await upgradeApp(_0x19b74b[_0x13098b(0xab)],{'yes':_0x19b74b[_0x13098b(0xbd)](_0x13098b(0xac))});return{'ok':_0x4409c5['completed']||_0x4409c5['cancelled']===!![],'message':_0x4409c5[_0x13098b(0xca)]?'Upgrade\x20cancelled.':_0x4409c5[_0x13098b(0xc5)]?_0x13098b(0xaa):'Project\x20upgrade\x20completed\x20with\x20follow-up\x20work.','data':_0x4409c5};}}];
1
+ function a228_0x4e8b(_0x59377d,_0x2baead){_0x59377d=_0x59377d-0x9e;const _0x18e9da=a228_0x18e9();let _0x4e8bf6=_0x18e9da[_0x59377d];return _0x4e8bf6;}const a228_0x3f6c64=a228_0x4e8b;(function(_0x1b1f0a,_0xacdb8){const _0x58a2ba=a228_0x4e8b,_0x53455e=_0x1b1f0a();while(!![]){try{const _0x5555b6=-parseInt(_0x58a2ba(0xbc))/0x1+parseInt(_0x58a2ba(0xa2))/0x2*(-parseInt(_0x58a2ba(0xac))/0x3)+-parseInt(_0x58a2ba(0xb4))/0x4*(parseInt(_0x58a2ba(0xc2))/0x5)+parseInt(_0x58a2ba(0xb7))/0x6+parseInt(_0x58a2ba(0xa7))/0x7+parseInt(_0x58a2ba(0xb3))/0x8+parseInt(_0x58a2ba(0xbd))/0x9;if(_0x5555b6===_0xacdb8)break;else _0x53455e['push'](_0x53455e['shift']());}catch(_0x5e6cef){_0x53455e['push'](_0x53455e['shift']());}}}(a228_0x18e9,0x3fc8b));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{analyseProjectUpgrade,upgradeApp}from'../../commands/project/upgrade.js';function a228_0x18e9(){const _0x263e40=['Upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure','yes','write','Would\x20upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure\x20without\x20overwriting\x20project-owned\x20entrypoints','3260768wjaCCj','1614812ivkgDj','Initialize\x20the\x20current\x20empty\x20directory\x20instead\x20of\x20creating\x20a\x20child\x20directory','boolean','530322spbRnw','Project\x20name','../../commands/project/create/main.js','cookie','--current-dir\x20cannot\x20be\x20combined\x20with\x20a\x20project\x20name.','481074YPCwmq','6353577pawCPA','PATCH','current-dir','appcode','validation','5kcgsDt','nonInteractive','str','Create\x20a\x20new\x20project','cwd','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]\x20from\x20the\x20empty\x20target\x20directory.','bool','Usage:\x20','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]\x20or\x20','upgrade','string','trim','Skip\x20confirmation\x20prompt','Project\x20upgrade\x20completed.','139798gUZzPB','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','Target\x20environment','project','env','1076579hhWZxE','template-source','cancelled','Prepared\x20local\x20project\x20template\x20directory','Upgrade\x20cancelled.','9RJGcNS','name','completed'];a228_0x18e9=function(){return _0x263e40;};return a228_0x18e9();}import{projectDomainRoutingSyncDefinition}from'../../commands/project/domain-routing-sync.js';const createFlags=[{'name':a228_0x3f6c64(0xad),'type':a228_0x3f6c64(0x9e),'description':a228_0x3f6c64(0xb8)},{'name':'env','type':a228_0x3f6c64(0x9e),'description':a228_0x3f6c64(0xa4)},{'name':a228_0x3f6c64(0xc0),'type':a228_0x3f6c64(0x9e),'description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'},{'name':a228_0x3f6c64(0xbf),'type':a228_0x3f6c64(0xb6),'description':a228_0x3f6c64(0xb5),'default':![]},{'name':a228_0x3f6c64(0xa8),'type':a228_0x3f6c64(0x9e),'description':a228_0x3f6c64(0xaa)}],upgradeFlags=[{'name':a228_0x3f6c64(0xb0),'type':'boolean','description':a228_0x3f6c64(0xa0),'default':![]}];export const projectDefinitions=[{'service':'project','command':'create','description':a228_0x3f6c64(0xc5),'risk':a228_0x3f6c64(0xb1),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'project-name','description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x282306){const _0x2ceef3=a228_0x3f6c64,{createApp:_0x57ff0d}=await import(_0x2ceef3(0xb9)),_0xec69d8=_0x282306['str']('name')[_0x2ceef3(0x9f)]()||_0x282306['args'][0x0]?.['trim'](),_0x2377f8=_0x282306[_0x2ceef3(0xc4)](_0x2ceef3(0xa6))||undefined,_0x550d14=_0x282306[_0x2ceef3(0xc4)](_0x2ceef3(0xc0))||undefined,_0x55f036=_0x282306[_0x2ceef3(0xc4)](_0x2ceef3(0xa8))[_0x2ceef3(0x9f)]()||undefined,_0x537f9a=_0x282306[_0x2ceef3(0xc8)](_0x2ceef3(0xbf));if(_0x537f9a&&_0xec69d8)throw CliErrors[_0x2ceef3(0xc1)](_0x2ceef3(0xbb),'Run\x20'+CLI_BIN_NAME+_0x2ceef3(0xc7));if(_0x282306['nonInteractive']){if(!_0xec69d8&&!_0x537f9a)throw CliErrors[_0x2ceef3(0xc1)](_0x2ceef3(0xa3),_0x2ceef3(0xc9)+CLI_BIN_NAME+_0x2ceef3(0xca)+CLI_BIN_NAME+'\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]');await _0x57ff0d({'projectCode':_0xec69d8,'appCode':_0x550d14,'env':_0x2377f8,'cookie':_0x282306[_0x2ceef3(0xba)],'currentDir':_0x537f9a,'nonInteractive':!![],'templateSource':_0x55f036});}else await _0x57ff0d({'projectCode':_0xec69d8,'appCode':_0x550d14,'env':_0x2377f8,'cookie':_0x282306[_0x2ceef3(0xba)],'currentDir':_0x537f9a,'templateSource':_0x55f036});return{'ok':!![]};}},projectDomainRoutingSyncDefinition,{'service':a228_0x3f6c64(0xa5),'command':a228_0x3f6c64(0xcb),'description':a228_0x3f6c64(0xaf),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'dryRun'(){const _0x4d759c=a228_0x3f6c64,_0x2ac73b=analyseProjectUpgrade(process['cwd']());return{'method':_0x4d759c(0xbe),'url':process[_0x4d759c(0xc6)](),'body':_0x2ac73b,'description':_0x4d759c(0xb2)};},async 'execute'(_0x523c6d){const _0x4b5c51=a228_0x3f6c64,_0x238529=await upgradeApp(_0x523c6d[_0x4b5c51(0xc3)],{'yes':_0x523c6d[_0x4b5c51(0xc8)](_0x4b5c51(0xb0))});return{'ok':_0x238529[_0x4b5c51(0xae)]||_0x238529[_0x4b5c51(0xa9)]===!![],'message':_0x238529[_0x4b5c51(0xa9)]?_0x4b5c51(0xab):_0x238529[_0x4b5c51(0xae)]?_0x4b5c51(0xa1):'Project\x20upgrade\x20completed\x20with\x20follow-up\x20work.','data':_0x238529};}}];