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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (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
+ const a216_0x13c18c=a216_0xc9f6;(function(_0x1ff090,_0x276e0a){const _0xb1ac45=a216_0xc9f6,_0x170461=_0x1ff090();while(!![]){try{const _0x37c5cf=-parseInt(_0xb1ac45(0x167))/0x1+parseInt(_0xb1ac45(0x140))/0x2*(-parseInt(_0xb1ac45(0x154))/0x3)+-parseInt(_0xb1ac45(0x151))/0x4*(-parseInt(_0xb1ac45(0x171))/0x5)+-parseInt(_0xb1ac45(0x12f))/0x6*(-parseInt(_0xb1ac45(0x139))/0x7)+parseInt(_0xb1ac45(0x136))/0x8+-parseInt(_0xb1ac45(0x152))/0x9*(-parseInt(_0xb1ac45(0x153))/0xa)+-parseInt(_0xb1ac45(0x165))/0xb*(parseInt(_0xb1ac45(0x14f))/0xc);if(_0x37c5cf===_0x276e0a)break;else _0x170461['push'](_0x170461['shift']());}catch(_0x449fc5){_0x170461['push'](_0x170461['shift']());}}}(a216_0x5acc,0xc2d52));import{copyFileSync,existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import a216_0x805fa0 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=a216_0x13c18c(0x175),SDK_CONFIG_SOURCE=a216_0x13c18c(0x13c);function relativeMigrationDir(_0x1c8c09,_0x113a5d){const _0x52db3b=a216_0x13c18c,_0x2af550=a216_0x805fa0[_0x52db3b(0x134)](_0x1c8c09,_0x113a5d);return _0x2af550&&!_0x2af550['startsWith']('..')?_0x2af550:_0x52db3b(0x169);}function candidatePath(_0x5dac70,_0x5572fd,_0x260cd1){const _0x36194c=a216_0x13c18c;return a216_0x805fa0[_0x36194c(0x173)](_0x5dac70,_0x36194c(0x142),_0x36194c(0x16f),MIGRATION_ID,_0x36194c(0x131),relativeMigrationDir(_0x5dac70,_0x5572fd),_0x260cd1);}function a216_0xc9f6(_0x58fa46,_0x448b47){_0x58fa46=_0x58fa46-0x12f;const _0x5acc2e=a216_0x5acc();let _0xc9f68f=_0x5acc2e[_0x58fa46];return _0xc9f68f;}function backupPath(_0x2e6e7f,_0x15f87b,_0x55f8ca){const _0x2d8785=a216_0x13c18c;return a216_0x805fa0[_0x2d8785(0x173)](_0x2e6e7f,'.rabetbase','project-upgrade',MIGRATION_ID,_0x2d8785(0x16d),relativeMigrationDir(_0x2e6e7f,_0x15f87b),_0x55f8ca);}function readOptional(_0x34f030){const _0xfc7105=a216_0x13c18c;try{return readFileSync(_0x34f030,_0xfc7105(0x16e));}catch{return undefined;}}function readJsonObject(_0x2d43fa){const _0x202843=a216_0x13c18c;try{const _0x471dbb=JSON['parse'](readFileSync(_0x2d43fa,_0x202843(0x16e)));return _0x471dbb&&typeof _0x471dbb===_0x202843(0x15a)?_0x471dbb:{};}catch{return{};}}function planEntrypoint(_0x1fc84e,_0x39ae99,_0xcf43d7,_0x19739f){const _0x1fb365=a216_0x13c18c,_0x1ab35e=a216_0x805fa0[_0x1fb365(0x173)](_0x39ae99,_0xcf43d7),_0x432a3a=readOptional(_0x1ab35e);if(_0x432a3a===undefined)return{'path':_0x1ab35e,'action':_0x1fb365(0x16c)};if(_0xcf43d7==='api.ts'?_0x432a3a[_0x1fb365(0x155)](_0x1fb365(0x15d))&&_0x432a3a[_0x1fb365(0x155)](_0x1fb365(0x161)):_0x432a3a[_0x1fb365(0x155)](_0x1fb365(0x162)))return{'path':_0x1ab35e,'action':'unchanged'};if(_0x19739f(_0x432a3a))return{'path':_0x1ab35e,'action':_0x1fb365(0x149),'reason':_0x1fb365(0x13a)};return{'path':_0x1ab35e,'action':'manual-merge','reason':_0x1fb365(0x174),'candidatePath':candidatePath(_0x1fc84e,_0x39ae99,_0xcf43d7)};}function a216_0x5acc(){const _0x4fbf9f=['find','basename','2pSQNuP','map','.rabetbase','flatMap','some','default','api','isDefault','apiGroup','replace-generated','Profile-aware\x20model\x20selection\x20generated\x20by\x20Rabetbase\x20CLI','resolve','push','preserve','path','21557832KeMsDh','normalizedApiDir','2940484fAvqGL','9UPSODm','13623380hySIXW','712599GHrayO','includes','string','client.ts','appcode','files','object','profiles','apiDir','./models.generated','Multiple\x20Lovrabet\x20model\x20profiles\x20match\x20Runtime\x20Domain','manualMergeRequired','dirname','./model-runtime','LOVRABET_RUNTIME_DOMAIN','name','client','11QaGZDd','No\x20Lovrabet\x20model\x20profile\x20matches\x20Runtime\x20Domain','362258NQvaeV','project','external-api-dir','has','manual-merge','create','backups','utf8','project-upgrade','unchanged','5OOOJlV','-api.ts','join','The\x20file\x20contains\x20project-owned\x20code\x20and\x20will\x20not\x20be\x20overwritten.','api-model-registry-v2','add','apps','api.ts','app','defaultApp','length','modelRuntime','84REDQCO','.rabetbase.json','candidates','single','keys','relative','candidatePath','8250880JGYhbX','outputDir','Model\x20facts\x20are\x20preserved\x20and\x20completed\x20from\x20legacy\x20generated\x20files\x20when\x20possible.','32746HcJgtc','Recognized\x20legacy\x20CLI\x20scaffold;\x20a\x20backup\x20will\x20be\x20retained.','action','/**\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','migrate-single-app'];a216_0x5acc=function(){return _0x4fbf9f;};return a216_0x5acc();}function syntheticApps(_0x21e556){const _0x4fb1ec=a216_0x13c18c,_0x2b86ff=_0x21e556[_0x4fb1ec(0x177)]&&typeof _0x21e556[_0x4fb1ec(0x177)]===_0x4fb1ec(0x15a)?_0x21e556[_0x4fb1ec(0x177)]:undefined;if(_0x2b86ff&&Object['keys'](_0x2b86ff)[_0x4fb1ec(0x17b)]>0x0){const _0x560cbb=typeof _0x21e556['defaultApp']===_0x4fb1ec(0x156)?_0x21e556[_0x4fb1ec(0x17a)]:Object[_0x4fb1ec(0x133)](_0x2b86ff)[_0x4fb1ec(0x17b)]===0x1?Object['keys'](_0x2b86ff)[0x0]:undefined;return Object['entries'](_0x2b86ff)[_0x4fb1ec(0x143)](([_0x5cb443,_0x3c6334])=>{const _0x298bfa=_0x4fb1ec,_0x4871e6=_0x3c6334,_0x550887=typeof _0x4871e6[_0x298bfa(0x158)]===_0x298bfa(0x156)?_0x4871e6[_0x298bfa(0x158)]:'';return _0x550887?[{'name':_0x5cb443,'appcode':_0x550887,'apiGroup':typeof _0x4871e6['apiGroup']===_0x298bfa(0x156)?_0x4871e6[_0x298bfa(0x148)]:undefined,'isDefault':_0x5cb443===_0x560cbb,'region':'cn','regionSource':_0x298bfa(0x145),'apiDir':typeof _0x4871e6[_0x298bfa(0x15c)]===_0x298bfa(0x156)?_0x4871e6['apiDir']:typeof _0x21e556[_0x298bfa(0x15c)]===_0x298bfa(0x156)?_0x21e556[_0x298bfa(0x15c)]:undefined,'routingConfig':{}}]:[];});}const _0x556930=typeof _0x21e556[_0x4fb1ec(0x158)]===_0x4fb1ec(0x156)?_0x21e556[_0x4fb1ec(0x158)]:typeof _0x21e556['app']===_0x4fb1ec(0x156)?_0x21e556['app']:undefined;if(!_0x556930)return[];return[{'name':_0x556930,'appcode':_0x556930,'isDefault':!![],'region':'cn','regionSource':_0x4fb1ec(0x145),'apiDir':typeof _0x21e556[_0x4fb1ec(0x15c)]===_0x4fb1ec(0x156)?_0x21e556[_0x4fb1ec(0x15c)]:undefined,'routingConfig':{}}];}function configuredLayouts(_0x36897d,_0x3ddffb){const _0x1a80d0=a216_0x13c18c;return resolveApiProfileLayouts(_0x3ddffb,_0x7b8e15=>a216_0x805fa0[_0x1a80d0(0x14b)](_0x36897d,_0x7b8e15[_0x1a80d0(0x15c)]||DEFAULT_API_DIR),_0x36897d);}function uniqueRegistryGroups(_0x4c66c4){const _0xf179d2=a216_0x13c18c,_0x1bec09=[],_0x47c4ef=new Set(),_0x153ca9=new Set();for(const _0x177e06 of _0x4c66c4){const _0x5e26f6=getRegistryGroup(_0x4c66c4,_0x177e06);if(!_0x5e26f6){_0x47c4ef[_0xf179d2(0x176)](_0x177e06[_0xf179d2(0x137)]);continue;}const _0x3526d2=_0x177e06[_0xf179d2(0x150)]+'\x00'+(_0x177e06[_0xf179d2(0x148)]??_0xf179d2(0x132));!_0x153ca9[_0xf179d2(0x16a)](_0x3526d2)&&(_0x1bec09[_0xf179d2(0x14c)](_0x5e26f6),_0x153ca9['add'](_0x3526d2));}return{'groups':_0x1bec09,'skipped':[..._0x47c4ef]};}function planGroup(_0x2053f1,_0x4ba078){const _0x66232b=a216_0x13c18c,_0x57a165=_0x4ba078[0x0][_0x66232b(0x150)],_0x480c86=a216_0x805fa0[_0x66232b(0x173)](_0x57a165,MODEL_RUNTIME_FILE_NAME),_0x43c617=readOptional(_0x480c86),_0xcb0da6=_0x43c617!==undefined&&_0x43c617[_0x66232b(0x155)](_0x66232b(0x14a))&&_0x43c617[_0x66232b(0x155)](_0x66232b(0x15e))&&_0x43c617[_0x66232b(0x155)](_0x66232b(0x166)),_0x13c34e=a216_0x805fa0['join'](_0x57a165,MODEL_REGISTRY_FILE_NAME),_0x402bd0=a216_0x805fa0[_0x66232b(0x173)](_0x57a165,'sdk-config.ts'),_0x8a3639=[planEntrypoint(_0x2053f1,_0x57a165,_0x66232b(0x178),isLegacyGeneratedApiScaffold),planEntrypoint(_0x2053f1,_0x57a165,_0x66232b(0x157),isLegacyGeneratedClientScaffold),{'path':_0x480c86,'action':_0x43c617===undefined?_0x66232b(0x16c):_0xcb0da6?'unchanged':_0x66232b(0x16b),'reason':_0x43c617===undefined?undefined:'The\x20existing\x20runtime\x20selector\x20is\x20not\x20a\x20recognized\x20current\x20generated\x20file.',..._0x43c617!==undefined&&!_0xcb0da6?{'candidatePath':candidatePath(_0x2053f1,_0x57a165,MODEL_RUNTIME_FILE_NAME)}:{}},{'path':_0x13c34e,'action':existsSync(_0x13c34e)?_0x66232b(0x14d):_0x66232b(0x16c),'reason':_0x66232b(0x138)},{'path':_0x402bd0,'action':existsSync(_0x402bd0)?_0x66232b(0x14d):_0x66232b(0x16c)}];return{'apiDir':_0x57a165,'profiles':_0x4ba078[_0x66232b(0x141)](_0x144935=>_0x144935[_0x66232b(0x179)][_0x66232b(0x163)]),'files':_0x8a3639};}export function analyzeProjectApiArchitecture(_0x7aed15,_0x3fe5a){const _0x39d81e=a216_0x13c18c,_0xcf5239=a216_0x805fa0[_0x39d81e(0x173)](_0x7aed15,_0x39d81e(0x130)),_0x2e579a=_0x3fe5a??(existsSync(_0xcf5239)?readJsonObject(_0xcf5239):{}),_0x3db1a6=syntheticApps(_0x2e579a);if(_0x3db1a6[_0x39d81e(0x17b)]===0x0)return{'migration':MIGRATION_ID,'needed':![],'configAction':'unconfigured','groups':[],'skippedLegacyDirectories':[],'manualMergeRequired':![]};const _0x49d489=_0x2e579a[_0x39d81e(0x177)]?_0x39d81e(0x170):_0x39d81e(0x13d),{groups:_0x23e6cb,skipped:_0x1ba343}=uniqueRegistryGroups(configuredLayouts(_0x7aed15,_0x3db1a6)),_0x238e44=_0x23e6cb['map'](_0xec446f=>planGroup(_0x7aed15,_0xec446f)),_0x5d9c6a=_0x238e44[_0x39d81e(0x144)](_0x23d7a0=>_0x23d7a0[_0x39d81e(0x159)]['some'](_0x48fa78=>_0x48fa78['action']===_0x39d81e(0x16b))),_0x4b12b9=_0x49d489===_0x39d81e(0x13d)||_0x238e44[_0x39d81e(0x144)](_0x5275b3=>_0x5275b3['files'][_0x39d81e(0x144)](_0x245740=>![_0x39d81e(0x170),'preserve'][_0x39d81e(0x155)](_0x245740['action'])));return{'migration':MIGRATION_ID,'needed':_0x4b12b9,'configAction':_0x49d489,'groups':_0x238e44,'skippedLegacyDirectories':_0x1ba343,'manualMergeRequired':_0x5d9c6a};}function migrateSingleAppConfig(_0x350c70){const _0x3960cf=a216_0x13c18c,_0x9fcd19=a216_0x805fa0['join'](_0x350c70,_0x3960cf(0x130));if(!existsSync(_0x9fcd19))return;const _0x3e7386=readConfigFile(_0x9fcd19);if(_0x3e7386['apps']&&typeof _0x3e7386[_0x3960cf(0x177)]===_0x3960cf(0x15a))return;const _0x108713=typeof _0x3e7386[_0x3960cf(0x158)]==='string'?_0x3e7386[_0x3960cf(0x158)]:typeof _0x3e7386['app']===_0x3960cf(0x156)?_0x3e7386['app']:undefined;if(!_0x108713)return;_0x3e7386[_0x3960cf(0x177)]={[_0x108713]:{'appcode':_0x108713}},_0x3e7386[_0x3960cf(0x17a)]=_0x108713,delete _0x3e7386[_0x3960cf(0x179)],delete _0x3e7386['appcode'],writeConfigFile(_0x9fcd19,_0x3e7386);}function legacyApiPath(_0xf5f2da,_0x29655f){const _0xb18fef=a216_0x13c18c,_0xa8ccd5=_0x29655f['normalizedApiDir'],_0x54d942=_0xf5f2da[_0xb18fef(0x17b)]===0x1||_0x29655f[_0xb18fef(0x179)][_0xb18fef(0x147)]?[a216_0x805fa0[_0xb18fef(0x173)](_0xa8ccd5,_0xb18fef(0x178)),a216_0x805fa0[_0xb18fef(0x173)](_0xa8ccd5,_0x29655f[_0xb18fef(0x179)]['name']+_0xb18fef(0x172))]:[a216_0x805fa0[_0xb18fef(0x173)](_0xa8ccd5,_0x29655f[_0xb18fef(0x179)][_0xb18fef(0x163)]+'-api.ts')];return _0x54d942[_0xb18fef(0x13e)](existsSync);}function writeCandidateOrEntrypoint(_0x5e2616,_0x30ce48,_0x367bab,_0x5058ae){const _0x147367=a216_0x13c18c;if(_0x367bab[_0x147367(0x13b)]==='unchanged'||_0x367bab[_0x147367(0x13b)]==='preserve')return;if(_0x367bab[_0x147367(0x13b)]===_0x147367(0x16b)){const _0x2d4be7=_0x367bab[_0x147367(0x135)];mkdirSync(a216_0x805fa0[_0x147367(0x160)](_0x2d4be7),{'recursive':!![]}),writeFileSync(_0x2d4be7,_0x5058ae,_0x147367(0x16e));return;}if(_0x367bab[_0x147367(0x13b)]===_0x147367(0x149)){const _0x5da52d=backupPath(_0x5e2616,_0x30ce48,a216_0x805fa0[_0x147367(0x13f)](_0x367bab[_0x147367(0x14e)]));mkdirSync(a216_0x805fa0[_0x147367(0x160)](_0x5da52d),{'recursive':!![]}),copyFileSync(_0x367bab[_0x147367(0x14e)],_0x5da52d);}mkdirSync(a216_0x805fa0['dirname'](_0x367bab['path']),{'recursive':!![]}),writeFileSync(_0x367bab[_0x147367(0x14e)],_0x5058ae,_0x147367(0x16e));}export async function upgradeProjectApiArchitecture(_0x554200){const _0x754509=a216_0x13c18c,_0x5b600f=analyzeProjectApiArchitecture(_0x554200);migrateSingleAppConfig(_0x554200);const _0x1b7896=getMultiAppConfigs(_0x754509(0x168),_0x554200)??[],_0x5f5736=configuredLayouts(_0x554200,_0x1b7896),{groups:_0x3f9405}=uniqueRegistryGroups(_0x5f5736);let _0x3ee5c6;for(const _0x1dff40 of _0x3f9405){const _0x1e75da=_0x1dff40[0x0]['normalizedApiDir'];mkdirSync(_0x1e75da,{'recursive':!![]});const _0x937caa=_0x1dff40[_0x754509(0x13e)](_0x40b54c=>_0x40b54c['app'][_0x754509(0x147)])??_0x1dff40[0x0];for(const _0x30454e of _0x1dff40){const _0x4659e1=a216_0x805fa0[_0x754509(0x173)](_0x1e75da,MODEL_REGISTRY_FILE_NAME),_0xf916ba=readModelRegistry(_0x4659e1);if(_0xf916ba?.[_0x754509(0x15b)][_0x30454e[_0x754509(0x179)][_0x754509(0x163)]])continue;const _0x4e3446=legacyApiPath(_0x1dff40,_0x30454e),_0x49ab48=_0x4e3446?readOptional(_0x4e3446):undefined;await initMultiAppEnvironment(_0x30454e[_0x754509(0x179)]),updateModelRegistry({'outputDir':_0x1e75da,'profileName':_0x30454e[_0x754509(0x179)][_0x754509(0x163)],'defaultProfile':_0x937caa['app']['name'],'appCode':_0x30454e[_0x754509(0x179)][_0x754509(0x158)],'runtimeDomain':getRuntimeDomain(),'models':_0x49ab48?parseLegacyApiModels(_0x49ab48):[]});}const _0x47f951=await renderModelRegistryScaffold(_0x1e75da,_0x554200),_0x42139d=planGroup(_0x554200,_0x1dff40);for(const _0x19dccb of _0x42139d['files']){const _0x4e5460=a216_0x805fa0[_0x754509(0x13f)](_0x19dccb[_0x754509(0x14e)]);if(_0x4e5460==='api.ts')writeCandidateOrEntrypoint(_0x554200,_0x1e75da,_0x19dccb,_0x47f951[_0x754509(0x146)]);else{if(_0x4e5460==='client.ts')writeCandidateOrEntrypoint(_0x554200,_0x1e75da,_0x19dccb,_0x47f951[_0x754509(0x164)]);else{if(_0x4e5460===MODEL_RUNTIME_FILE_NAME)writeCandidateOrEntrypoint(_0x554200,_0x1e75da,_0x19dccb,_0x47f951[_0x754509(0x17c)]);else _0x4e5460==='sdk-config.ts'&&_0x19dccb[_0x754509(0x13b)]==='create'&&writeCandidateOrEntrypoint(_0x554200,_0x1e75da,_0x19dccb,SDK_CONFIG_SOURCE);}}}}const _0x5cbd03=_0x1b7896['find'](_0x413a21=>_0x413a21[_0x754509(0x147)])??_0x1b7896[0x0];_0x5cbd03&&(await initMultiAppEnvironment(_0x5cbd03),_0x3ee5c6=writeProjectDomainRoutingManifest(_0x554200)[_0x754509(0x14e)]);const _0x5d4041=analyzeProjectApiArchitecture(_0x554200);return{..._0x5b600f,'completed':!_0x5d4041[_0x754509(0x15f)],'manualMergeRequired':_0x5d4041[_0x754509(0x15f)],'routingPath':_0x3ee5c6};}
@@ -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(_0x36e768,_0x45dbdf){const _0x5e193a=a217_0x2223,_0x1673e4=_0x36e768();while(!![]){try{const _0x419de2=parseInt(_0x5e193a(0xd2))/0x1+-parseInt(_0x5e193a(0xc8))/0x2+-parseInt(_0x5e193a(0xc3))/0x3+-parseInt(_0x5e193a(0xc6))/0x4+parseInt(_0x5e193a(0xd1))/0x5*(parseInt(_0x5e193a(0xc2))/0x6)+parseInt(_0x5e193a(0xd9))/0x7*(-parseInt(_0x5e193a(0xd0))/0x8)+parseInt(_0x5e193a(0xd8))/0x9;if(_0x419de2===_0x45dbdf)break;else _0x1673e4['push'](_0x1673e4['shift']());}catch(_0x188cb9){_0x1673e4['push'](_0x1673e4['shift']());}}}(a217_0x1f93,0xc482a));import{existsSync}from'node:fs';import a217_0x101701 from'node:path';import a217_0x33ac2d from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getProjectNameValidationError}from'../../../commands/project/create/project-name.js';function a217_0x2223(_0xca4cfd,_0x1161a2){_0xca4cfd=_0xca4cfd-0xc2;const _0x1f93e5=a217_0x1f93();let _0x222336=_0x1f93e5[_0xca4cfd];return _0x222336;}function a217_0x1f93(){const _0x9d9d0e=['Directory\x20\x22','my-app','24673707bEEKbX','497URjzyl','6nLtZqA','2899902QjfIkM','Skipped','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','3157284hQDgOu','green','797922iDttQs','env','Logged\x20in','Login\x20failed','production','resolve','Project\x20name:','log','173832FEWYJo','7127855MqpPfm','335487pdLTTq','√\x20Project\x20Name:\x20','cyan','string'];a217_0x1f93=function(){return _0x9d9d0e;};return a217_0x1f93();}export async function guidedCreateProject(_0x46e53f,_0x73faed,_0x3e134e){const _0x31f43e=a217_0x2223,_0x3e038e=_0x31f43e(0xd7),_0x104d66=readConfig(),_0x38400b=typeof _0x104d66[_0x31f43e(0xc9)]===_0x31f43e(0xd5)?_0x104d66[_0x31f43e(0xc9)]:undefined,_0x23de79=await input({'message':_0x31f43e(0xce),'default':_0x3e038e,'validate':_0x2c79d6=>{const _0x2d2f02=_0x31f43e,_0xc963c7=_0x2c79d6['trim']()||_0x3e038e,_0x2f1479=getProjectNameValidationError(_0xc963c7);if(_0x2f1479)return _0x2f1479;const _0x5da2b8=a217_0x101701[_0x2d2f02(0xcd)](process['cwd'](),_0xc963c7);if(existsSync(_0x5da2b8))return _0x2d2f02(0xd6)+_0xc963c7+'\x22\x20already\x20exists';return!![];}});console[_0x31f43e(0xcf)](a217_0x33ac2d[_0x31f43e(0xc7)](_0x31f43e(0xd3)+a217_0x33ac2d['cyan'](_0x23de79)));const _0x29082a=await selectSingleAppcode(_0x3e134e);console[_0x31f43e(0xcf)](a217_0x33ac2d[_0x31f43e(0xc7)]('√\x20App\x20Code:\x20'+a217_0x33ac2d[_0x31f43e(0xd4)](_0x29082a||'Not\x20set')));if(_0x29082a){const _0x3c6cbf=await getIsSessionValid();if(!_0x3c6cbf){const _0x2e3260=await confirm({'message':_0x31f43e(0xc5),'default':!![]});if(_0x2e3260){const _0xfcdcc1=await authServer({'silent':!![]});console['log'](a217_0x33ac2d[_0x31f43e(0xc7)]('√\x20Login\x20status:\x20'+a217_0x33ac2d[_0x31f43e(0xd4)](_0xfcdcc1?_0x31f43e(0xca):_0x31f43e(0xcb))));}else console['log'](a217_0x33ac2d[_0x31f43e(0xc7)]('√\x20Login\x20status:\x20'+a217_0x33ac2d[_0x31f43e(0xd4)](_0x31f43e(0xc4))));}await _0x46e53f({'projectName':_0x23de79,'appCode':_0x29082a,'env':_0x73faed||_0x38400b||_0x31f43e(0xcc)});}else await _0x46e53f({'projectName':_0x23de79,'env':_0x73faed||_0x38400b||_0x31f43e(0xcc)});}
@@ -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(_0x493ac2,_0x94f08f){const _0x3abb93=a218_0x432d,_0x3e6b5e=_0x493ac2();while(!![]){try{const _0x32e867=parseInt(_0x3abb93(0x194))/0x1*(parseInt(_0x3abb93(0x18f))/0x2)+-parseInt(_0x3abb93(0x193))/0x3*(-parseInt(_0x3abb93(0x18d))/0x4)+parseInt(_0x3abb93(0x197))/0x5+parseInt(_0x3abb93(0x191))/0x6+-parseInt(_0x3abb93(0x198))/0x7+-parseInt(_0x3abb93(0x190))/0x8*(parseInt(_0x3abb93(0x196))/0x9)+-parseInt(_0x3abb93(0x18e))/0xa*(parseInt(_0x3abb93(0x192))/0xb);if(_0x32e867===_0x94f08f)break;else _0x3e6b5e['push'](_0x3e6b5e['shift']());}catch(_0x35eef6){_0x3e6b5e['push'](_0x3e6b5e['shift']());}}}(a218_0x41d9,0x59a10));function a218_0x41d9(){const _0x3b53e3=['9seJSCl','toFixed','12672giXbXh','2566915kPSUuA','4502841IBQLRL','51572smdxfU','110mfgwPl','58346sBnBpo','1384ubglfN','3317904owMueL','178101qPbUUY','24cRbcJq'];a218_0x41d9=function(){return _0x3b53e3;};return a218_0x41d9();}function a218_0x432d(_0x4d80d1,_0x301665){_0x4d80d1=_0x4d80d1-0x18d;const _0x41d999=a218_0x41d9();let _0x432d0d=_0x41d999[_0x4d80d1];return _0x432d0d;}export function formatElapsed(_0x1bd582){const _0x32cfe6=a218_0x432d,_0x26af7c=Date['now']()-_0x1bd582;if(_0x26af7c<0x3e8)return _0x26af7c+'ms';const _0x3f7fab=(_0x26af7c/0x3e8)[_0x32cfe6(0x195)](0x2),_0x5e2a0c=_0x3f7fab['replace'](/\.?0+$/u,'');return _0x5e2a0c+'s';}
@@ -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(_0x146d3b,_0x34dd7d){const _0x46d713=a219_0x3ea7,_0x359567=_0x146d3b();while(!![]){try{const _0x223206=parseInt(_0x46d713(0x138))/0x1+parseInt(_0x46d713(0x193))/0x2+-parseInt(_0x46d713(0x128))/0x3+-parseInt(_0x46d713(0x14f))/0x4*(-parseInt(_0x46d713(0x180))/0x5)+parseInt(_0x46d713(0x196))/0x6+-parseInt(_0x46d713(0x13a))/0x7*(parseInt(_0x46d713(0x133))/0x8)+-parseInt(_0x46d713(0x13b))/0x9*(parseInt(_0x46d713(0x12f))/0xa);if(_0x223206===_0x34dd7d)break;else _0x359567['push'](_0x359567['shift']());}catch(_0x45d541){_0x359567['push'](_0x359567['shift']());}}}(a219_0x4c98,0xb0f7b));import a219_0x4188c5 from'path';import a219_0x3707b4 from'fs';import a219_0x1e9804 from'chalk';import a219_0x14fe80 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';function a219_0x3ea7(_0x2744fd,_0x6f68c2){_0x2744fd=_0x2744fd-0x126;const _0x4c988f=a219_0x4c98();let _0x3ea78c=_0x4c988f[_0x2744fd];return _0x3ea78c;}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';function a219_0x4c98(){const _0x3072b9=['Remove\x20or\x20move\x20the\x20existing\x20files,\x20then\x20retry\x20with\x20--current-dir.','extracting','...','2730680sTOFRq','validation','constants','7730376TGenub','√\x20Pulled\x20','info','Failed\x20to\x20update\x20package.json','stableVersion','Project\x20template\x20ready','1267212jkGFqA','readFileSync','reverse','\x20config\x20set\x20appcode\x20<app-code>\x27','Resolving\x20project\x20template','Configured\x20app\x20AppCode:\x20','currentVersion','339540oGXQGh','modelCount','\x20&&\x20','\x20|\x20AppCode:\x20','8cHOoFb','templateSource','The\x20current\x20directory\x20must\x20be\x20empty.','lstatSync','cd\x20','933701zstkYx','toLocaleString','7642159XNHQgE','585UwPlcZ','.rabetbase-create-','Updating\x20package.json\x20name','Project\x20name:\x20','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','ino','Extracting\x20project\x20template','projectName','*\x20Configuring\x20AppCode\x20for\x20project\x20','currentDir','1.0.0','\x20\x202.\x20Pull\x20API\x20configuration:\x20','text','readdirSync','string','stringify','appCode','Current\x20directory\x20identity\x20changed\x20during\x20project\x20creation','downloading','writeFileSync','4VqkSYu','Project\x20created:\x20','message','setLogPath','verifying','name','package.json','🚀\x20Next\x20Steps:','Verifying\x20project\x20template','renameSync','log','accessSync','CLI\x20version\x20check','apps','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','Install\x20dependencies','Skip\x20cleanup:\x20project\x20directory\x20ownership\x20changed:\x20','warn','rmSync','Failed\x20to\x20configure\x20app\x20AppCode','resolving','\x20|\x20Default:\x20implicit\x20(single\x20app)','Downloading\x20project\x20template','!\x20Project\x20created,\x20but\x20local\x20logging\x20could\x20not\x20be\x20initialized:\x20','isDirectory','minimumVersion','\x20√\x20','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','production','Unable\x20to\x20verify\x20ownership\x20of\x20the\x20created\x20project\x20directory','cookie','gray','The\x20current\x20directory\x20changed\x20during\x20project\x20creation.','resolve','cwd','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','nonInteractive','utf8','version','project','description','API\x20configuration\x20pulled:\x20','Project\x20creation\x20failed:\x20','belowMinimum','relative','push','create','length','repeat','4292865TfbjeM','error','env','copying','green','bold','needsUpgrade','parse','dev','chdir','dirname','\x20already\x20exists','cyan','join','existsSync','\x20model(s)'];a219_0x4c98=function(){return _0x3072b9;};return a219_0x4c98();}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(_0x21a442){const _0x1a93fd=a219_0x3ea7;try{const _0xb515d2=a219_0x3707b4[_0x1a93fd(0x136)](_0x21a442);if(!_0xb515d2[_0x1a93fd(0x167)]())return null;return{'dev':_0xb515d2[_0x1a93fd(0x188)],'ino':_0xb515d2[_0x1a93fd(0x140)]};}catch{return null;}}function isSameDirectory(_0x13a9e7,_0xbc8162){const _0x44002e=a219_0x3ea7;return!!_0x13a9e7&&!!_0xbc8162&&_0x13a9e7['dev']===_0xbc8162['dev']&&_0x13a9e7['ino']===_0xbc8162[_0x44002e(0x140)];}function commitCurrentDirectoryProject(_0x308d66,_0x2a6557,_0x315a2f){const _0x22422c=a219_0x3ea7;if(!isSameDirectory(readDirectoryIdentity(_0x308d66),_0x315a2f))throw new Error(_0x22422c(0x14c));const _0x242bf7=a219_0x4188c5['basename'](_0x2a6557),_0x2ed774=a219_0x3707b4[_0x22422c(0x148)](_0x308d66);if(_0x2ed774[_0x22422c(0x17e)]!==0x1||_0x2ed774[0x0]!==_0x242bf7)throw CliErrors[_0x22422c(0x194)](_0x22422c(0x16f),'Remove\x20the\x20new\x20files\x20and\x20retry\x20from\x20an\x20empty\x20directory.');const _0x412045=a219_0x4188c5['join'](_0x2a6557,_0x22422c(0x176)),_0x7a1fec=[];try{for(const _0x5e1214 of a219_0x3707b4[_0x22422c(0x148)](_0x412045)){a219_0x3707b4[_0x22422c(0x158)](a219_0x4188c5[_0x22422c(0x18d)](_0x412045,_0x5e1214),a219_0x4188c5[_0x22422c(0x18d)](_0x308d66,_0x5e1214)),_0x7a1fec[_0x22422c(0x17c)](_0x5e1214);}a219_0x3707b4[_0x22422c(0x161)](_0x2a6557,{'recursive':!![],'force':!![]});}catch(_0x59be35){for(const _0x4d4f1b of _0x7a1fec[_0x22422c(0x12a)]()){const _0x131d48=a219_0x4188c5[_0x22422c(0x18d)](_0x308d66,_0x4d4f1b);if(!a219_0x3707b4['existsSync'](_0x131d48))continue;a219_0x3707b4[_0x22422c(0x158)](_0x131d48,a219_0x4188c5[_0x22422c(0x18d)](_0x412045,_0x4d4f1b));}throw _0x59be35;}}export async function createApp(_0x1eb9eb){const _0x2a5062=a219_0x3ea7,_0x46a107=await checkCliVersion();(_0x46a107['needsUpgrade']||_0x46a107[_0x2a5062(0x17a)])&&(printCliUpgradeWarning(_0x46a107),assertCliVersionSupported(_0x46a107),logger[_0x2a5062(0x198)]('create',_0x2a5062(0x15b),{'currentVersion':_0x46a107[_0x2a5062(0x12e)],'stableVersion':_0x46a107[_0x2a5062(0x126)],'minimumVersion':_0x46a107[_0x2a5062(0x168)],'needsUpgrade':_0x46a107[_0x2a5062(0x186)],'belowMinimum':_0x46a107[_0x2a5062(0x17a)]}));const _0x2ecb47=_0x1eb9eb[_0x2a5062(0x144)]?a219_0x4188c5['basename'](process['cwd']()):_0x1eb9eb['projectCode'];if(_0x2ecb47&&(_0x1eb9eb['appCode']||_0x1eb9eb[_0x2a5062(0x173)]))await runCreate({'projectName':_0x2ecb47,'appCode':_0x1eb9eb[_0x2a5062(0x14b)],'env':_0x1eb9eb[_0x2a5062(0x182)]},_0x1eb9eb);else{if(_0x2ecb47){const _0x1ac9f0=await selectSingleAppcode(_0x1eb9eb[_0x2a5062(0x16d)]);await runCreate({'projectName':_0x2ecb47,'appCode':_0x1ac9f0||undefined,'env':_0x1eb9eb['env']},_0x1eb9eb);}else await guidedCreateProject(_0x22f52a=>runCreate(_0x22f52a,_0x1eb9eb),_0x1eb9eb[_0x2a5062(0x182)],_0x1eb9eb[_0x2a5062(0x16d)]);}}async function runCreate(_0x4b1da0,_0x5707ed){const _0x4e8d77=a219_0x3ea7;_0x4b1da0[_0x4e8d77(0x142)]=validateProjectName(_0x4b1da0[_0x4e8d77(0x142)]);const _0x5a054d=_0x5707ed['currentDir']?process[_0x4e8d77(0x171)]():a219_0x4188c5[_0x4e8d77(0x170)](process['cwd'](),_0x4b1da0[_0x4e8d77(0x142)]);if(_0x5707ed['currentDir']){if(a219_0x3707b4[_0x4e8d77(0x148)](_0x5a054d)[_0x4e8d77(0x17e)]>0x0)throw CliErrors[_0x4e8d77(0x194)](_0x4e8d77(0x135),_0x4e8d77(0x190));}else{if(a219_0x3707b4[_0x4e8d77(0x18e)](_0x5a054d))throw new Error('Project\x20directory\x20'+_0x4b1da0[_0x4e8d77(0x142)]+_0x4e8d77(0x18b));}let _0x5521e5=null;const _0xd11052=_0x5707ed[_0x4e8d77(0x144)]?readDirectoryIdentity(_0x5a054d):null;let _0x2e70de=null;try{a219_0x3707b4[_0x4e8d77(0x15a)](a219_0x4188c5[_0x4e8d77(0x18a)](_0x5a054d),a219_0x3707b4[_0x4e8d77(0x195)]['W_OK']);}catch{throw new Error(_0x4e8d77(0x172));}logger[_0x4e8d77(0x198)]('create','Starting\x20project\x20creation:\x20'+_0x4b1da0[_0x4e8d77(0x142)],{'projectDir':_0x5a054d,'appCode':_0x4b1da0[_0x4e8d77(0x14b)]}),console['log'](),console[_0x4e8d77(0x159)](a219_0x1e9804[_0x4e8d77(0x184)](_0x4e8d77(0x169))+_0x4e8d77(0x13e)+a219_0x1e9804[_0x4e8d77(0x184)](_0x4b1da0['projectName'])+(_0x4b1da0[_0x4e8d77(0x14b)]?_0x4e8d77(0x132)+a219_0x1e9804['cyan'](_0x4b1da0[_0x4e8d77(0x14b)]):''));try{let _0x3be07c=_0x4b1da0[_0x4e8d77(0x142)];_0x5707ed[_0x4e8d77(0x144)]&&(_0x2e70de=a219_0x3707b4['mkdtempSync'](a219_0x4188c5[_0x4e8d77(0x18d)](_0x5a054d,_0x4e8d77(0x13c))),_0x3be07c=a219_0x4188c5[_0x4e8d77(0x17b)](process['cwd'](),a219_0x4188c5[_0x4e8d77(0x18d)](_0x2e70de,'project')));const _0x374ee5=a219_0x4188c5['resolve'](process[_0x4e8d77(0x171)](),_0x3be07c);await runTask(_0x4e8d77(0x12c),_0x2c8269=>copyProjectTemplate(_0x3be07c,_0x4cf0b4=>_0x2c8269(projectTemplateStageLabel(_0x4cf0b4)),_0x5707ed[_0x4e8d77(0x134)]),_0x4e8d77(0x127)),_0x5521e5=_0x5707ed[_0x4e8d77(0x144)]?null:readDirectoryIdentity(_0x5a054d);if(!_0x5707ed['currentDir']&&!_0x5521e5)throw new Error(_0x4e8d77(0x16c));await updatePackageJsonName(_0x3be07c,_0x4b1da0[_0x4e8d77(0x142)]),await runTask(_0x4e8d77(0x15e),()=>installDependencies(_0x3be07c)),await runTask('Format\x20code',()=>formatProjectCode(_0x3be07c)),await configureAppCode(_0x3be07c,_0x4b1da0['projectName'],_0x4b1da0['appCode']||'',_0x4b1da0[_0x4e8d77(0x182)]);let _0x4d8051=![];if(_0x4b1da0[_0x4e8d77(0x14b)]){console[_0x4e8d77(0x159)]('*\x20Pulling\x20API\x20configuration...');const _0x1a3c1d=process[_0x4e8d77(0x171)]();try{process[_0x4e8d77(0x189)](_0x374ee5);const _0x4d78dc=_0x4b1da0[_0x4e8d77(0x182)]||_0x4e8d77(0x16b);initEnv(_0x4d78dc);const {configArray:_0x3bd2eb}=await fetchModelList(_0x4b1da0[_0x4e8d77(0x14b)],_0x5707ed['cookie']||''),_0x5c01db=DEFAULT_API_DIR,_0x2e09b2=await generateApiFile(_0x3bd2eb,'',_0x4b1da0[_0x4e8d77(0x14b)],!![],_0x4d78dc,_0x5c01db,undefined,getSdkClientRoutingConfig(),{'overwriteTypescript':!![],'modelProfile':{'name':_0x4b1da0[_0x4e8d77(0x14b)],'defaultName':_0x4b1da0['appCode'],'runtimeDomain':getRuntimeDomain()}});console[_0x4e8d77(0x159)](_0x4e8d77(0x197)+_0x3bd2eb[_0x4e8d77(0x17e)]+'\x20dataset(s),\x20generated\x20'+_0x2e09b2[_0x4e8d77(0x130)]+_0x4e8d77(0x18f)),logger[_0x4e8d77(0x198)](_0x4e8d77(0x17d),_0x4e8d77(0x178)+_0x4b1da0[_0x4e8d77(0x14b)]);}catch(_0x1e9e48){_0x4d8051=!![],console[_0x4e8d77(0x159)]('!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20'+CLI_BIN_NAME+'\x20api\x20pull\x20--force\x20--yes'),logger[_0x4e8d77(0x160)]('create','API\x20configuration\x20pull\x20failed',{'error':_0x1e9e48 instanceof Error?_0x1e9e48['message']:String(_0x1e9e48)});}finally{process['chdir'](_0x1a3c1d);}}if(_0x5707ed['currentDir']){if(!_0x2e70de||!_0xd11052)throw new Error('Unable\x20to\x20prepare\x20the\x20current\x20directory\x20workspace');commitCurrentDirectoryProject(_0x5a054d,_0x2e70de,_0xd11052),_0x2e70de=null;}try{logger[_0x4e8d77(0x152)](_0x5a054d),logger['success'](_0x4e8d77(0x17d),_0x4e8d77(0x150)+_0x4b1da0['projectName']);}catch(_0x1c3c8b){console['warn'](_0x4e8d77(0x166)+(_0x1c3c8b instanceof Error?_0x1c3c8b[_0x4e8d77(0x151)]:String(_0x1c3c8b)));}console[_0x4e8d77(0x159)](),console['log'](a219_0x1e9804[_0x4e8d77(0x184)]('─'[_0x4e8d77(0x17f)](0x3c))),console['log'](a219_0x1e9804[_0x4e8d77(0x18c)][_0x4e8d77(0x185)](_0x4e8d77(0x156))),console[_0x4e8d77(0x159)]();const _0x1448e2=_0x5707ed[_0x4e8d77(0x144)]?CLI_BIN_NAME+'\x20run\x20start':_0x4e8d77(0x137)+_0x4b1da0[_0x4e8d77(0x142)]+_0x4e8d77(0x131)+CLI_BIN_NAME+'\x20run\x20start';console['log']('\x20\x201.\x20Start\x20project:\x20'+a219_0x1e9804[_0x4e8d77(0x18c)]['bold'](_0x1448e2)),_0x4d8051&&console[_0x4e8d77(0x159)](_0x4e8d77(0x146)+a219_0x1e9804['cyan']['bold'](CLI_BIN_NAME+'\x20api\x20pull\x20--force\x20--yes')),console[_0x4e8d77(0x159)](a219_0x1e9804[_0x4e8d77(0x184)]('─'['repeat'](0x3c)));}catch(_0x5a3521){logger[_0x4e8d77(0x181)](_0x4e8d77(0x17d),_0x4e8d77(0x179)+_0x4b1da0['projectName'],{'error':_0x5a3521 instanceof Error?_0x5a3521[_0x4e8d77(0x151)]:String(_0x5a3521)});try{const _0x56bb34=readDirectoryIdentity(_0x5a054d);if(_0x5707ed[_0x4e8d77(0x144)]&&_0x2e70de)a219_0x3707b4[_0x4e8d77(0x161)](_0x2e70de,{'recursive':!![],'force':!![]});else{if(_0x5521e5&&_0x56bb34?.[_0x4e8d77(0x188)]===_0x5521e5[_0x4e8d77(0x188)]&&_0x56bb34[_0x4e8d77(0x140)]===_0x5521e5[_0x4e8d77(0x140)])console[_0x4e8d77(0x159)](_0x4e8d77(0x15d)+_0x5a054d),a219_0x3707b4[_0x4e8d77(0x161)](_0x5a054d,{'recursive':!![],'force':!![]});else _0x56bb34&&logger[_0x4e8d77(0x160)](_0x4e8d77(0x17d),_0x4e8d77(0x15f)+_0x5a054d);}}catch{logger['warn']('create','Failed\x20to\x20clean\x20up\x20project\x20directory:\x20'+_0x5a054d);}throw _0x5a3521;}}async function runTask(_0x10ef56,_0x42d083,_0x5ba72f=_0x10ef56){const _0x3db4a0=a219_0x3ea7,_0x2df906=a219_0x14fe80(_0x10ef56+'...')['start']();try{const _0x339d8c=await _0x42d083(_0x3c8223=>{const _0xcad84e=a219_0x3ea7;_0x2df906[_0xcad84e(0x147)]=_0x3c8223+_0xcad84e(0x192);});_0x2df906['stop'](),console[_0x3db4a0(0x159)](''+a219_0x1e9804[_0x3db4a0(0x184)](_0x3db4a0(0x169))+_0x5ba72f+'\x20'+a219_0x1e9804[_0x3db4a0(0x16e)]('['+_0x339d8c+']'));}catch(_0x39a049){_0x2df906['fail'](_0x10ef56);throw _0x39a049;}}function projectTemplateStageLabel(_0x356dfc){const _0x4b4a85=a219_0x3ea7;switch(_0x356dfc){case _0x4b4a85(0x163):return _0x4b4a85(0x12c);case _0x4b4a85(0x14d):return _0x4b4a85(0x165);case _0x4b4a85(0x153):return _0x4b4a85(0x157);case _0x4b4a85(0x191):return _0x4b4a85(0x141);case _0x4b4a85(0x183):return'Copying\x20local\x20template\x20source';}}async function updatePackageJsonName(_0x21d155,_0x1726aa){const _0x4914df=a219_0x3ea7,_0x45ac2d=a219_0x4188c5[_0x4914df(0x170)](process[_0x4914df(0x171)](),_0x21d155),_0x584610=a219_0x4188c5[_0x4914df(0x18d)](_0x45ac2d,'package.json');try{console[_0x4914df(0x159)](_0x4914df(0x13f));const _0x44ce41=getRabetbaseCliPackageRoot(),_0x39fe93=a219_0x4188c5[_0x4914df(0x18d)](_0x44ce41,'package.json');let _0x1a7211=_0x4914df(0x145);try{const _0x3ca012=JSON[_0x4914df(0x187)](a219_0x3707b4['readFileSync'](_0x39fe93,_0x4914df(0x174)));_0x1a7211=_0x3ca012[_0x4914df(0x175)]||'1.0.0';}catch{}const _0x244c06=a219_0x3707b4[_0x4914df(0x129)](_0x584610,'utf8'),_0x302ebf=JSON[_0x4914df(0x187)](_0x244c06);_0x302ebf[_0x4914df(0x154)]=_0x1726aa,_0x302ebf[_0x4914df(0x177)]=_0x1726aa+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0x1a7211,a219_0x3707b4[_0x4914df(0x14e)](_0x584610,JSON[_0x4914df(0x14a)](_0x302ebf,null,0x2)+'\x0a',_0x4914df(0x174)),console[_0x4914df(0x159)]('√\x20package.json\x20updated:\x20name='+_0x1726aa),logger['info'](_0x4914df(0x17d),_0x4914df(0x13d));}catch(_0x5a9722){logger[_0x4914df(0x181)](_0x4914df(0x17d),_0x4914df(0x199));throw _0x5a9722;}}async function configureAppCode(_0x4cadd4,_0xb0f280,_0x343860,_0x50b920){const _0x3b8512=a219_0x3ea7,_0x3f660f=a219_0x4188c5[_0x3b8512(0x170)](process['cwd'](),_0x4cadd4),_0x5e22f9=a219_0x4188c5['join'](_0x3f660f,NEW_CONFIG_NAME);try{_0x343860?console['log'](_0x3b8512(0x143)+_0xb0f280+':\x20'+_0x343860):console[_0x3b8512(0x159)]('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0xb0f280);const _0x452db3=getRabetbaseCliPackageRoot(),_0x45e9cf=a219_0x4188c5[_0x3b8512(0x18d)](_0x452db3,_0x3b8512(0x155));let _0x53ae1d='1.0.0';try{const _0x41d09e=JSON['parse'](a219_0x3707b4[_0x3b8512(0x129)](_0x45e9cf,_0x3b8512(0x174)));_0x53ae1d=_0x41d09e[_0x3b8512(0x175)]||_0x3b8512(0x145);}catch{}const {globalConfig:_0x1f512b}=loadRawConfigLayers(),_0x5f2054=typeof _0x1f512b['env']===_0x3b8512(0x149)?_0x1f512b['env']:undefined,_0x1bb3f1={};for(const _0x5a55b7 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x1f512b[_0x5a55b7]!=null)_0x1bb3f1[_0x5a55b7]=_0x1f512b[_0x5a55b7];}const _0x3f2fdf=buildCanonicalProjectConfig(_0x1bb3f1,{'appCodes':_0x343860?[_0x343860]:[],'env':_0x50b920||_0x5f2054||_0x3b8512(0x16b),'metadata':{'createdAt':new Date()[_0x3b8512(0x139)](),'version':_0x53ae1d}});writeConfigFile(_0x5e22f9,_0x3f2fdf),await generateSdkConfigFile(a219_0x4188c5[_0x3b8512(0x18d)](_0x3f660f,DEFAULT_API_DIR),getSdkClientRoutingConfig()),writeProjectDomainRoutingManifest(_0x3f660f),_0x343860?console[_0x3b8512(0x159)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object['keys'](_0x3f2fdf[_0x3b8512(0x15c)]||{})[_0x3b8512(0x18d)](',\x20')+_0x3b8512(0x164)):console['log'](_0x3b8512(0x16a)+CLI_BIN_NAME+_0x3b8512(0x12b)),logger[_0x3b8512(0x198)](_0x3b8512(0x17d),_0x3b8512(0x12d)+_0x343860);}catch(_0x190c57){logger[_0x3b8512(0x181)](_0x3b8512(0x17d),_0x3b8512(0x162));throw _0x190c57;}}
@@ -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_0x226a97=a220_0x22c5;(function(_0x3ced82,_0x1c7683){const _0x1bacc7=a220_0x22c5,_0xdff8ec=_0x3ced82();while(!![]){try{const _0x21c682=parseInt(_0x1bacc7(0x15a))/0x1+parseInt(_0x1bacc7(0x105))/0x2+parseInt(_0x1bacc7(0x16d))/0x3+-parseInt(_0x1bacc7(0x120))/0x4*(-parseInt(_0x1bacc7(0x154))/0x5)+parseInt(_0x1bacc7(0x169))/0x6+parseInt(_0x1bacc7(0x176))/0x7*(-parseInt(_0x1bacc7(0x12a))/0x8)+-parseInt(_0x1bacc7(0x11e))/0x9;if(_0x21c682===_0x1c7683)break;else _0xdff8ec['push'](_0xdff8ec['shift']());}catch(_0x321695){_0xdff8ec['push'](_0xdff8ec['shift']());}}}(a220_0x24ce,0x394d5));import{createHash}from'node:crypto';import a220_0x5c8e9f from'node:fs/promises';import a220_0x51299e from'node:path';import a220_0x572555 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';function a220_0x22c5(_0x2a3315,_0xd7174b){_0x2a3315=_0x2a3315-0x104;const _0x24ce95=a220_0x24ce();let _0x22c5dd=_0x24ce95[_0x2a3315];return _0x22c5dd;}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(_0x474e69){const _0x1af345=a220_0x22c5;return typeof _0x474e69==='string'&&_0x474e69[_0x1af345(0x13c)]()?_0x474e69['trim']():null;}function parseDescriptor(_0x4d0300){const _0x3d1cec=a220_0x22c5;if(!_0x4d0300||typeof _0x4d0300!=='object')throw new Error(_0x3d1cec(0x166)+TEMPLATE_ID+'\x22.');const _0x20cb9a=_0x4d0300,_0x3c78c3=nonEmptyString(_0x20cb9a[_0x3d1cec(0x14e)]),_0x15a8e4=nonEmptyString(_0x20cb9a[_0x3d1cec(0x151)]),_0x38b6d9=_0x20cb9a[_0x3d1cec(0x17a)]===undefined?undefined:nonEmptyString(_0x20cb9a[_0x3d1cec(0x17a)])||undefined,_0xf2b83d=nonEmptyString(_0x20cb9a[_0x3d1cec(0x145)])?.[_0x3d1cec(0x117)](),_0xb5059=_0x20cb9a[_0x3d1cec(0x14f)];if(!_0x3c78c3||!a220_0x572555[_0x3d1cec(0x129)](_0x3c78c3)||!_0x15a8e4||_0x15a8e4!==a220_0x51299e[_0x3d1cec(0x14d)][_0x3d1cec(0x147)](_0x15a8e4)||_0x15a8e4[_0x3d1cec(0x174)]('\x5c')||_0x20cb9a[_0x3d1cec(0x17a)]!==undefined&&!_0x38b6d9||!_0xf2b83d||!/^sha256:[a-f0-9]{64}$/[_0x3d1cec(0x125)](_0xf2b83d)||typeof _0xb5059!==_0x3d1cec(0x142)||!Number[_0x3d1cec(0x168)](_0xb5059)||_0xb5059<=0x0||_0xb5059>MAX_ARCHIVE_SIZE)throw new Error('CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22'+TEMPLATE_ID+'\x22.');return{'version':_0x3c78c3,'name':_0x15a8e4,'url':_0x38b6d9,'sha256':_0xf2b83d,'size':_0xb5059};}async function fetchWithTimeout(_0x198e08,_0x4fd6eb,_0x5454ca,_0x477dc8){const _0x449fef=a220_0x22c5,_0x181b94=new AbortController(),_0x1f81e4=setTimeout(()=>_0x181b94[_0x449fef(0x10b)](),_0x4fd6eb);try{const _0x3408e6=await fetch(_0x198e08,{'headers':{'Accept':_0x5454ca},'redirect':_0x449fef(0x11a),'signal':_0x181b94[_0x449fef(0x148)]});return await _0x477dc8(_0x3408e6);}finally{clearTimeout(_0x1f81e4);}}async function fetchTemplateDescriptor(){const _0x57f8ab=a220_0x22c5,_0x552ad1=getCliVersion(),_0x27a93a=isBetaCliVersion(_0x552ad1)?'beta':_0x57f8ab(0x11b),_0x3a699c=await fetchProjectTemplateCdnConfig();if(!_0x3a699c)throw new Error(_0x57f8ab(0x135));const _0x521b09=parseDescriptor(resolveProjectTemplateDescriptor(_0x3a699c[_0x57f8ab(0x146)],_0x552ad1));return{'descriptor':_0x521b09,'channel':_0x27a93a,'assetBaseUrl':_0x3a699c[_0x57f8ab(0x13e)],'legacyAssetBaseUrl':_0x3a699c[_0x57f8ab(0x141)]};}function resolveArchiveUrl(_0x4c9889,_0x1a425b,_0x18a936,_0x20a587){const _0x304d65=a220_0x22c5,_0xbc3a79=new URL(_0x18a936+'/'),_0x1c45b0=[getProjectTemplateRelativeUrl(_0x1a425b),getProjectTemplateRelativeUrl(_0x1a425b,_0x4c9889[_0x304d65(0x14e)])];if(_0x4c9889[_0x304d65(0x17a)]&&!_0x1c45b0[_0x304d65(0x174)](_0x4c9889[_0x304d65(0x17a)]))throw new Error(_0x304d65(0x11d));const _0x1a7821=new URL(_0x20a587+'/'),_0x37299a=_0x4c9889[_0x304d65(0x17a)]?new URL(_0x4c9889[_0x304d65(0x17a)],_0xbc3a79[_0x304d65(0x134)]):new URL(_0x4c9889[_0x304d65(0x151)],_0x1a7821),_0x1cfacb=_0x4c9889[_0x304d65(0x17a)]?_0xbc3a79[_0x304d65(0x134)]:_0x1a7821['origin'];if(_0x37299a[_0x304d65(0x15f)]!==_0x304d65(0x173)||_0x37299a[_0x304d65(0x134)]!==_0x1cfacb||a220_0x51299e[_0x304d65(0x14d)]['basename'](decodeURIComponent(_0x37299a[_0x304d65(0x152)]))!==_0x4c9889[_0x304d65(0x151)]||!_0x4c9889[_0x304d65(0x17a)]&&!_0x37299a['pathname'][_0x304d65(0x13f)](_0x1a7821[_0x304d65(0x152)]))throw new Error(_0x304d65(0x10f));return _0x37299a['href'];}async function readResponseBytes(_0x113eb1,_0x307dd3){const _0x8d5b69=a220_0x22c5;if(!_0x113eb1[_0x8d5b69(0x12c)]){const _0x138fc4=Buffer[_0x8d5b69(0x111)](await _0x113eb1[_0x8d5b69(0x164)]());if(_0x138fc4[_0x8d5b69(0x12b)]>_0x307dd3)throw new Error(_0x8d5b69(0x128));return _0x138fc4;}const _0x5aecb0=_0x113eb1[_0x8d5b69(0x12c)][_0x8d5b69(0x158)](),_0x3a0b4d=[];let _0x6808b5=0x0;try{while(!![]){const {done:_0x2ead95,value:_0x144c29}=await _0x5aecb0['read']();if(_0x2ead95)break;_0x6808b5+=_0x144c29[_0x8d5b69(0x165)];if(_0x6808b5>_0x307dd3){await _0x5aecb0[_0x8d5b69(0x13d)]();throw new Error('CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.');}_0x3a0b4d[_0x8d5b69(0x15b)](Buffer[_0x8d5b69(0x111)](_0x144c29));}}finally{_0x5aecb0[_0x8d5b69(0x116)]();}return Buffer[_0x8d5b69(0x167)](_0x3a0b4d,_0x6808b5);}async function downloadArchive(_0x5d0bdd,_0x454ddf,_0x7771c9,_0x5bf1bc,_0x4b5f6e,_0x4e50aa){const _0xd34ea4=a220_0x22c5,_0x432011=await fetchWithTimeout(resolveArchiveUrl(_0x5d0bdd,_0x454ddf,_0x7771c9,_0x5bf1bc),ARCHIVE_TIMEOUT_MS,'application/zip',async _0x4e57aa=>{const _0x4ef58b=a220_0x22c5;if(!_0x4e57aa['ok'])throw new Error(_0x4ef58b(0x118)+_0x4e57aa[_0x4ef58b(0x178)]+'.');const _0x1092b1=Number(_0x4e57aa[_0x4ef58b(0x16f)]['get'](_0x4ef58b(0x149)));if(Number['isFinite'](_0x1092b1)&&_0x1092b1>MAX_ARCHIVE_SIZE)throw new Error(_0x4ef58b(0x16c));return readResponseBytes(_0x4e57aa,_0x5d0bdd[_0x4ef58b(0x14f)]);});if(_0x432011[_0xd34ea4(0x12b)]!==_0x5d0bdd[_0xd34ea4(0x14f)])throw new Error('CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20'+_0x5d0bdd[_0xd34ea4(0x14f)]+_0xd34ea4(0x14b)+_0x432011[_0xd34ea4(0x12b)]+'.');_0x4e50aa?.(_0xd34ea4(0x124));const _0x42b2d4=_0xd34ea4(0x15d)+createHash('sha256')[_0xd34ea4(0x15c)](_0x432011)[_0xd34ea4(0x11f)](_0xd34ea4(0x10c));if(_0x42b2d4!==_0x5d0bdd[_0xd34ea4(0x145)])throw new Error(_0xd34ea4(0x144));await a220_0x5c8e9f[_0xd34ea4(0x140)](_0x4b5f6e,_0x432011,{'flag':'wx'});}async function assertTemplateRoot(_0x11ed4b){const _0x75d2bc=a220_0x22c5,_0x4d2286=a220_0x51299e[_0x75d2bc(0x157)](_0x11ed4b,_0x75d2bc(0x12d)),_0x452ec0=JSON[_0x75d2bc(0x172)](await a220_0x5c8e9f[_0x75d2bc(0x160)](_0x4d2286,'utf8'));if(!_0x452ec0||typeof _0x452ec0!==_0x75d2bc(0x143))throw new Error('Project\x20template\x20package.json\x20is\x20invalid.');}const LOCAL_FORBIDDEN_NAMES=new Set([a220_0x226a97(0x15e),'.codegraph','.git',a220_0x226a97(0x14a),a220_0x226a97(0x16a),a220_0x226a97(0x119),a220_0x226a97(0x153),a220_0x226a97(0x138),a220_0x226a97(0x130),a220_0x226a97(0x123)]);function isForbiddenTemplateEntry(_0x185f65){const _0x354a75=a220_0x226a97;if(LOCAL_FORBIDDEN_NAMES['has'](_0x185f65))return!![];return _0x185f65===_0x354a75(0x113)||_0x185f65[_0x354a75(0x13f)](_0x354a75(0x121))&&_0x185f65!==_0x354a75(0x155);}function containsPath(_0x4015e7,_0x463c7d){const _0x57713b=a220_0x226a97,_0x485f60=a220_0x51299e[_0x57713b(0x12e)](_0x4015e7,_0x463c7d);return _0x485f60===''||!_0x485f60['startsWith']('..'+a220_0x51299e[_0x57713b(0x104)])&&_0x485f60!=='..'&&!a220_0x51299e[_0x57713b(0x13b)](_0x485f60);}async function copyLocalTemplateDirectory(_0x4c40a3,_0x1344a3){const _0x18089e=a220_0x226a97;await a220_0x5c8e9f['mkdir'](_0x1344a3,{'recursive':!![]});for(const _0x448c53 of await a220_0x5c8e9f[_0x18089e(0x10d)](_0x4c40a3,{'withFileTypes':!![]})){const _0x8938de=a220_0x51299e[_0x18089e(0x157)](_0x4c40a3,_0x448c53['name']),_0x82c611=a220_0x51299e[_0x18089e(0x157)](_0x1344a3,_0x448c53[_0x18089e(0x151)]);if(isForbiddenTemplateEntry(_0x448c53['name']))throw new Error(_0x18089e(0x108)+_0x8938de);const _0x3c2ce9=await a220_0x5c8e9f['lstat'](_0x8938de);if(_0x3c2ce9['isSymbolicLink']())throw new Error(_0x18089e(0x127)+_0x8938de);if(_0x3c2ce9[_0x18089e(0x126)]()){await copyLocalTemplateDirectory(_0x8938de,_0x82c611);continue;}if(!_0x3c2ce9[_0x18089e(0x106)]())continue;await a220_0x5c8e9f[_0x18089e(0x16e)](_0x8938de,_0x82c611),await a220_0x5c8e9f['chmod'](_0x82c611,_0x3c2ce9[_0x18089e(0x159)]&0x1ff);}}async function readTemplateVersion(_0x5939e7){const _0x337d76=a220_0x226a97,_0x1da03e=JSON[_0x337d76(0x172)](await a220_0x5c8e9f[_0x337d76(0x160)](a220_0x51299e[_0x337d76(0x157)](_0x5939e7,_0x337d76(0x12d)),_0x337d76(0x163)));return nonEmptyString(_0x1da03e[_0x337d76(0x14e)])||_0x337d76(0x179);}function a220_0x24ce(){const _0xe7279e=['mkdtemp','sep','751948KyvpKA','isFile','ino','Local\x20project\x20template\x20contains\x20a\x20local-only\x20entry:\x20','lstat','dirname','abort','hex','readdir','validation','CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.','Choose\x20a\x20different\x20project\x20name\x20or\x20remove\x20the\x20directory\x20first.','from','Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','.env','resolving','realpath','releaseLock','toLowerCase','CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20','.lovrabet.log','error','release','resolve','CDN\x20project\x20template\x20relative\x20URL\x20must\x20match\x20its\x20release\x20channel\x20or\x20version.','8555220cobxqD','digest','20tfZpKu','.env.','Check\x20the\x20source\x20directory\x20and\x20retry.','node_modules','verifying','test','isDirectory','Local\x20project\x20template\x20must\x20not\x20contain\x20symlinks:\x20','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','valid','2084704DQLrlj','length','body','package.json','relative','Project\x20directory\x20already\x20exists:\x20','dist','Choose\x20an\x20output\x20directory\x20outside\x20the\x20template\x20source.','mkdir','copying','origin','Rabetbase\x20CDN\x20config\x20is\x20unavailable.','.rabetbase-create-','template.zip','.rabetbase.json','rename','Local\x20template\x20source\x20and\x20project\x20output\x20must\x20not\x20overlap.','isAbsolute','trim','cancel','assetBaseUrl','startsWith','writeFile','legacyAssetBaseUrl','number','object','CDN\x20project\x20template\x20checksum\x20verification\x20failed.','sha256','config','basename','signal','content-length','.idea',',\x20received\x20','ENOENT','posix','version','size','code','name','pathname','.rabetbase','450935XQEgGi','.env.example','Local\x20template\x20source\x20does\x20not\x20exist:\x20','join','getReader','mode','163845BGnQZE','push','update','sha256:','.DS_Store','protocol','readFile','extracting','Unable\x20to\x20claim\x20the\x20project\x20directory.','utf8','arrayBuffer','byteLength','CDN\x20config\x20does\x20not\x20define\x20template\x20\x22','concat','isSafeInteger','1421808EYcpte','.lovrabet.json','Invalid\x20local\x20template\x20source:\x20','CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.','654465ZwHTSm','copyFile','headers','dev','message','parse','https:','includes','EEXIST','7MqTuHh','access','status','local','url'];a220_0x24ce=function(){return _0xe7279e;};return a220_0x24ce();}async function readDirectoryIdentity(_0x5b3e9d){const _0x197c25=a220_0x226a97;try{const _0x32ff0f=await a220_0x5c8e9f[_0x197c25(0x109)](_0x5b3e9d);if(!_0x32ff0f[_0x197c25(0x126)]())return null;return{'dev':_0x32ff0f['dev'],'ino':_0x32ff0f[_0x197c25(0x107)]};}catch{return null;}}async function commitStagedProject(_0x20607b,_0x6ea3b3){const _0x345b8e=a220_0x226a97;await a220_0x5c8e9f[_0x345b8e(0x132)](_0x6ea3b3);const _0x39dc66=await readDirectoryIdentity(_0x6ea3b3);if(!_0x39dc66)throw new Error(_0x345b8e(0x162));try{for(const _0x38c448 of await a220_0x5c8e9f['readdir'](_0x20607b)){await a220_0x5c8e9f[_0x345b8e(0x139)](a220_0x51299e['join'](_0x20607b,_0x38c448),a220_0x51299e[_0x345b8e(0x157)](_0x6ea3b3,_0x38c448));}}catch(_0x1d222b){const _0x3282ca=await readDirectoryIdentity(_0x6ea3b3);_0x3282ca?.[_0x345b8e(0x170)]===_0x39dc66[_0x345b8e(0x170)]&&_0x3282ca['ino']===_0x39dc66[_0x345b8e(0x107)]&&await a220_0x5c8e9f['rm'](_0x6ea3b3,{'recursive':!![],'force':!![]});throw _0x1d222b;}}export async function materializeProjectTemplate(_0x3728ea,_0x1261df){const _0x469c65=a220_0x226a97,_0x10a2c8=a220_0x51299e[_0x469c65(0x11c)](_0x3728ea),_0x34a320=a220_0x51299e[_0x469c65(0x10a)](_0x10a2c8);try{await a220_0x5c8e9f[_0x469c65(0x109)](_0x10a2c8);throw new Error(_0x469c65(0x12f)+_0x10a2c8);}catch(_0x3bf1d6){if(_0x3bf1d6[_0x469c65(0x150)]!=='ENOENT')throw _0x3bf1d6;}const _0x128e34=await a220_0x5c8e9f[_0x469c65(0x17b)](a220_0x51299e[_0x469c65(0x157)](_0x34a320,_0x469c65(0x136))),_0x53d3a3=a220_0x51299e[_0x469c65(0x157)](_0x128e34,'project'),_0x4b90f4=a220_0x51299e['join'](_0x128e34,_0x469c65(0x137));try{try{_0x1261df?.(_0x469c65(0x114));const {descriptor:_0xef6189,channel:_0x1604fc,assetBaseUrl:_0xcf8bfb,legacyAssetBaseUrl:_0x203154}=await fetchTemplateDescriptor();return _0x1261df?.('downloading'),await downloadArchive(_0xef6189,_0x1604fc,_0xcf8bfb,_0x203154,_0x4b90f4,_0x1261df),_0x1261df?.(_0x469c65(0x161)),await extractProjectTemplateArchive(_0x4b90f4,_0x53d3a3),await assertTemplateRoot(_0x53d3a3),await commitStagedProject(_0x53d3a3,_0x10a2c8),{'source':'cdn','version':_0xef6189[_0x469c65(0x14e)]};}catch(_0xb6b603){if(_0xb6b603[_0x469c65(0x150)]===_0x469c65(0x175))throw CliErrors[_0x469c65(0x10e)](_0x469c65(0x12f)+_0x10a2c8,'Use\x20a\x20different\x20project\x20name.');const _0x1cd660=_0xb6b603 instanceof Error?_0xb6b603['message']:String(_0xb6b603);throw CliErrors[_0x469c65(0x10e)](_0x469c65(0x112),'Check\x20your\x20network\x20and\x20retry.\x20Details:\x20'+_0x1cd660);}}finally{await a220_0x5c8e9f['rm'](_0x128e34,{'recursive':!![],'force':!![]});}}export async function materializeLocalProjectTemplate(_0x3d22f3,_0xfd065e,_0x30d78a){const _0x1f2fa2=a220_0x226a97;let _0x3ac1df;try{_0x3ac1df=await a220_0x5c8e9f[_0x1f2fa2(0x115)](a220_0x51299e[_0x1f2fa2(0x11c)](_0x3d22f3));}catch{throw CliErrors['validation'](_0x1f2fa2(0x156)+a220_0x51299e[_0x1f2fa2(0x11c)](_0x3d22f3),'Pass\x20a\x20directory\x20containing\x20the\x20template\x20source\x20package.json.');}const _0x30d5ca=await a220_0x5c8e9f[_0x1f2fa2(0x109)](_0x3ac1df);if(!_0x30d5ca['isDirectory']())throw CliErrors[_0x1f2fa2(0x10e)]('Local\x20template\x20source\x20is\x20not\x20a\x20directory:\x20'+_0x3ac1df);const _0x29488f=a220_0x51299e['resolve'](_0xfd065e),_0x41b683=await a220_0x5c8e9f[_0x1f2fa2(0x115)](a220_0x51299e[_0x1f2fa2(0x10a)](_0x29488f)),_0x26b8a3=a220_0x51299e[_0x1f2fa2(0x157)](_0x41b683,a220_0x51299e['basename'](_0x29488f));if(containsPath(_0x3ac1df,_0x26b8a3)||containsPath(_0x26b8a3,_0x3ac1df))throw CliErrors['validation'](_0x1f2fa2(0x13a),_0x1f2fa2(0x131));try{await a220_0x5c8e9f[_0x1f2fa2(0x109)](_0x26b8a3);throw CliErrors[_0x1f2fa2(0x10e)](_0x1f2fa2(0x12f)+_0x26b8a3,_0x1f2fa2(0x110));}catch(_0x3390f9){if(_0x3390f9[_0x1f2fa2(0x150)]!==_0x1f2fa2(0x14c))throw _0x3390f9;}const _0x5aa1c2=a220_0x51299e[_0x1f2fa2(0x10a)](_0x26b8a3);await a220_0x5c8e9f[_0x1f2fa2(0x177)](_0x5aa1c2);const _0x5516dd=await a220_0x5c8e9f[_0x1f2fa2(0x17b)](a220_0x51299e[_0x1f2fa2(0x157)](_0x5aa1c2,_0x1f2fa2(0x136))),_0x404506=a220_0x51299e['join'](_0x5516dd,'project');try{_0x30d78a?.(_0x1f2fa2(0x133)),await copyLocalTemplateDirectory(_0x3ac1df,_0x404506),await assertTemplateRoot(_0x404506);const _0xc9be6f=await readTemplateVersion(_0x404506);return await commitStagedProject(_0x404506,_0x26b8a3),{'source':_0x1f2fa2(0x179),'version':_0xc9be6f};}catch(_0x13828f){const _0x477c3d=_0x13828f instanceof Error?_0x13828f[_0x1f2fa2(0x171)]:String(_0x13828f);throw CliErrors[_0x1f2fa2(0x10e)](_0x1f2fa2(0x16b)+_0x477c3d,_0x1f2fa2(0x122));}finally{await a220_0x5c8e9f['rm'](_0x5516dd,{'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(_0x5f26d8,_0x313ac7){const _0x323fad=a221_0x431e,_0x55e9b9=_0x5f26d8();while(!![]){try{const _0x176fa9=parseInt(_0x323fad(0x1b1))/0x1*(-parseInt(_0x323fad(0x1c1))/0x2)+parseInt(_0x323fad(0x1bf))/0x3+-parseInt(_0x323fad(0x1ba))/0x4*(parseInt(_0x323fad(0x1b4))/0x5)+parseInt(_0x323fad(0x1b2))/0x6+parseInt(_0x323fad(0x1be))/0x7+parseInt(_0x323fad(0x1b5))/0x8+parseInt(_0x323fad(0x1bd))/0x9*(parseInt(_0x323fad(0x1b3))/0xa);if(_0x176fa9===_0x313ac7)break;else _0x55e9b9['push'](_0x55e9b9['shift']());}catch(_0xd985a){_0x55e9b9['push'](_0x55e9b9['shift']());}}}(a221_0x1aa5,0xedb4b));function a221_0x431e(_0x1be79d,_0x437223){_0x1be79d=_0x1be79d-0x1b1;const _0x1aa593=a221_0x1aa5();let _0x431e8c=_0x1aa593[_0x1be79d];return _0x431e8c;}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;function a221_0x1aa5(){const _0xbfe8be=['Project\x20name\x20cannot\x20be\x20empty','\x22\x20is\x20reserved\x20on\x20Windows','6794168LycWbb','length','test','18LecIrW','1822261WFBmvk','2296773AUxmLF','validation','8322PSQIiC','266bckMSk','4033332Zalzsa','5154560HPoBKu','5gxCVzo','8399704yXuKJP','Project\x20name\x20cannot\x20exceed\x20','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_'];a221_0x1aa5=function(){return _0xbfe8be;};return a221_0x1aa5();}export function getProjectNameValidationError(_0x11f379){const _0x29bcd2=a221_0x431e,_0x42c5f2=_0x11f379['trim']();if(!_0x42c5f2)return _0x29bcd2(0x1b8);if(_0x42c5f2[_0x29bcd2(0x1bb)]>MAX_PROJECT_NAME_LENGTH)return _0x29bcd2(0x1b6)+MAX_PROJECT_NAME_LENGTH+'\x20characters';if(!PROJECT_NAME_PATTERN[_0x29bcd2(0x1bc)](_0x42c5f2))return _0x29bcd2(0x1b7);if(WINDOWS_RESERVED_NAME[_0x29bcd2(0x1bc)](_0x42c5f2))return'Project\x20name\x20\x22'+_0x42c5f2+_0x29bcd2(0x1b9);return null;}export function validateProjectName(_0xefe78c){const _0x25385e=a221_0x431e,_0xff687d=_0xefe78c['trim'](),_0x27545e=getProjectNameValidationError(_0xff687d);if(_0x27545e)throw CliErrors[_0x25385e(0x1c0)](_0x27545e,'Use\x20a\x20portable\x20directory\x20name\x20without\x20path\x20separators.');return _0xff687d;}
@@ -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(_0x19b983,_0x1b001d){const _0x46b88b=a222_0x545c,_0x26e320=_0x19b983();while(!![]){try{const _0x339175=parseInt(_0x46b88b(0x1aa))/0x1+parseInt(_0x46b88b(0x1c0))/0x2*(parseInt(_0x46b88b(0x1c1))/0x3)+-parseInt(_0x46b88b(0x1a6))/0x4+parseInt(_0x46b88b(0x19f))/0x5+parseInt(_0x46b88b(0x1a8))/0x6+-parseInt(_0x46b88b(0x1ba))/0x7*(parseInt(_0x46b88b(0x19e))/0x8)+-parseInt(_0x46b88b(0x1ad))/0x9;if(_0x339175===_0x1b001d)break;else _0x26e320['push'](_0x26e320['shift']());}catch(_0x5beeb9){_0x26e320['push'](_0x26e320['shift']());}}}(a222_0x2775,0xe0ea6));import{createWriteStream}from'node:fs';import a222_0x1ee635 from'node:fs/promises';import a222_0x137ccf from'node:path';import{pipeline}from'node:stream/promises';import a222_0x1c907e 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(_0x93a1fe){return new Promise((_0x1eb894,_0x27e38c)=>{const _0x56f2c3=a222_0x545c;a222_0x1c907e[_0x56f2c3(0x1b1)](_0x93a1fe,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x483ee9,_0x180b42)=>{if(_0x483ee9||!_0x180b42){_0x27e38c(_0x483ee9||new Error('Unable\x20to\x20open\x20project\x20template\x20archive.'));return;}_0x1eb894(_0x180b42);});});}function openEntryStream(_0x25cec4,_0x2c482d){return new Promise((_0x5371b1,_0x4dbf80)=>{const _0x52fd3e=a222_0x545c;_0x25cec4[_0x52fd3e(0x1be)](_0x2c482d,(_0x4e67b0,_0x216436)=>{if(_0x4e67b0||!_0x216436){_0x4dbf80(_0x4e67b0||new Error('Unable\x20to\x20read\x20ZIP\x20entry:\x20'+_0x2c482d['fileName']));return;}_0x5371b1(_0x216436);});});}function validateEntryPath(_0x62ba3e){const _0x3d792d=a222_0x545c,_0x28108=_0x62ba3e[_0x3d792d(0x1a4)](/\\/g,'/'),_0x413261=_0x28108[_0x3d792d(0x1b7)]('/'),_0x23d429=_0x413261?_0x28108[_0x3d792d(0x1c9)](0x0,-0x1):_0x28108;if(!_0x23d429||_0x28108[_0x3d792d(0x1a0)]('/')||/^[A-Za-z]:\//[_0x3d792d(0x1b4)](_0x28108))throw new Error('Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20'+_0x62ba3e);const _0x15fdfa=_0x23d429[_0x3d792d(0x1b2)]('/');for(const _0x16c56c of _0x15fdfa){if(!_0x16c56c||_0x16c56c==='.'||_0x16c56c==='..'||_0x16c56c[_0x3d792d(0x1b7)]('.')||_0x16c56c[_0x3d792d(0x1b7)]('\x20')||WINDOWS_INVALID_CHAR[_0x3d792d(0x1b4)](_0x16c56c)||WINDOWS_RESERVED_NAME['test'](_0x16c56c))throw new Error('Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20'+_0x62ba3e);}return{'relativePath':_0x15fdfa[_0x3d792d(0x1b9)](a222_0x137ccf[_0x3d792d(0x1bb)]),'directory':_0x413261};}function a222_0x2775(){const _0x147042=['5300407nlcogx','sep','get','externalFileAttributes','openReadStream','en-US','944DUAdvQ','7197igCOLK','resolve','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.','Project\x20template\x20ZIP\x20exceeds\x20','\x20entries.','add','Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20','isEncrypted','slice','8DwRFXn','3142390xgusYf','startsWith','Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20','once','readEntry','replace','close','956248hMAWcS','set','7540344eJIbXi','mkdir','1381468RYRJTF','Case-conflicting\x20ZIP\x20entry\x20path:\x20','end','22333329ouyPPc','uncompressedSize','fileName','has','open','split','toLocaleLowerCase','test','entry','error','endsWith','catch','join'];a222_0x2775=function(){return _0x147042;};return a222_0x2775();}function a222_0x545c(_0x40e07a,_0x29d185){_0x40e07a=_0x40e07a-0x19e;const _0x277575=a222_0x2775();let _0x545cfd=_0x277575[_0x40e07a];return _0x545cfd;}function isSymbolicLink(_0x202119){const _0x5ca16f=a222_0x545c,_0x446785=_0x202119[_0x5ca16f(0x1bd)]>>>0x10&0xffff;return(_0x446785&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0xe4556f,_0x407e95){const _0x168c4f=a222_0x545c,_0x2ff242=await openZip(_0xe4556f),_0x468ff4=a222_0x137ccf[_0x168c4f(0x1c2)](_0x407e95),_0xaad2dd=new Set(),_0x43c0e6=new Map();let _0xbc95a1=0x0,_0x33090d=0x0;await a222_0x1ee635[_0x168c4f(0x1a9)](_0x468ff4,{'recursive':!![]}),await new Promise((_0x22ec93,_0x5c718f)=>{const _0x542709=_0x168c4f;let _0x52783a=![];const _0x285731=_0x4682d0=>{const _0xaccd54=a222_0x545c;if(_0x52783a)return;_0x52783a=!![],_0x2ff242[_0xaccd54(0x1a5)](),_0x5c718f(_0x4682d0 instanceof Error?_0x4682d0:new Error(String(_0x4682d0)));};_0x2ff242['once'](_0x542709(0x1b6),_0x285731),_0x2ff242[_0x542709(0x1a2)](_0x542709(0x1ac),()=>{if(_0x52783a)return;_0x52783a=!![],_0x22ec93();}),_0x2ff242['on'](_0x542709(0x1b5),_0x35c6b3=>{const _0x42bae2=_0x542709;void(async()=>{const _0x1cfdbb=a222_0x545c;_0xbc95a1+=0x1,_0x33090d+=_0x35c6b3[_0x1cfdbb(0x1ae)];if(_0xbc95a1>MAX_ENTRY_COUNT)throw new Error(_0x1cfdbb(0x1c4)+MAX_ENTRY_COUNT+_0x1cfdbb(0x1c5));if(_0x33090d>MAX_UNCOMPRESSED_SIZE)throw new Error(_0x1cfdbb(0x1c3));if(_0x35c6b3[_0x1cfdbb(0x1c8)]())throw new Error('Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20'+_0x35c6b3[_0x1cfdbb(0x1af)]);if(isSymbolicLink(_0x35c6b3))throw new Error(_0x1cfdbb(0x1c7)+_0x35c6b3['fileName']);const {relativePath:_0x1e1c4c,directory:_0xc88c5d}=validateEntryPath(_0x35c6b3[_0x1cfdbb(0x1af)]),_0x1b38f2=_0x1e1c4c['split'](a222_0x137ccf['sep']);for(let _0x3d8a9b=0x1;_0x3d8a9b<=_0x1b38f2['length'];_0x3d8a9b+=0x1){const _0x3020d2=_0x1b38f2['slice'](0x0,_0x3d8a9b)['join'](a222_0x137ccf[_0x1cfdbb(0x1bb)]),_0x13fd19=_0x3020d2[_0x1cfdbb(0x1b3)](_0x1cfdbb(0x1bf)),_0x1044bd=_0x43c0e6[_0x1cfdbb(0x1bc)](_0x13fd19);if(_0x1044bd&&_0x1044bd!==_0x3020d2)throw new Error(_0x1cfdbb(0x1ab)+_0x35c6b3[_0x1cfdbb(0x1af)]);_0x43c0e6[_0x1cfdbb(0x1a7)](_0x13fd19,_0x3020d2);}const _0x290395=_0x1e1c4c['toLocaleLowerCase'](_0x1cfdbb(0x1bf));if(_0xaad2dd[_0x1cfdbb(0x1b0)](_0x290395))throw new Error(_0x1cfdbb(0x1a1)+_0x35c6b3['fileName']);_0xaad2dd[_0x1cfdbb(0x1c6)](_0x290395);const _0x1b726a=a222_0x137ccf[_0x1cfdbb(0x1c2)](_0x468ff4,_0x1e1c4c);if(_0x1b726a!==_0x468ff4&&!_0x1b726a[_0x1cfdbb(0x1a0)](''+_0x468ff4+a222_0x137ccf[_0x1cfdbb(0x1bb)]))throw new Error('ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20'+_0x35c6b3['fileName']);if(_0xc88c5d)await a222_0x1ee635[_0x1cfdbb(0x1a9)](_0x1b726a,{'recursive':!![]});else{await a222_0x1ee635[_0x1cfdbb(0x1a9)](a222_0x137ccf['dirname'](_0x1b726a),{'recursive':!![]});const _0x7157f6=await openEntryStream(_0x2ff242,_0x35c6b3);await pipeline(_0x7157f6,createWriteStream(_0x1b726a,{'flags':'wx','mode':0x1a4}));}_0x2ff242[_0x1cfdbb(0x1a3)]();})()[_0x42bae2(0x1b8)](_0x285731);}),_0x2ff242[_0x542709(0x1a3)]();});}
@@ -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
+ function a223_0x3592(){const _0x4609c6=['2818884sUuKKZ','1097035EwupbJ','62070TtgoDp','1432EynAyU','20CtQISG','resolve','411270MSlfkU','91sbXiWk','dirname','1595wblXnU','3LJTAAX','36rNkjAj','4001699icMqTY','../../../../','92885FhmrCJ','4833sVKKsV'];a223_0x3592=function(){return _0x4609c6;};return a223_0x3592();}const a223_0x3fc887=a223_0x4394;(function(_0xfa3700,_0x52dcac){const _0x2a62e0=a223_0x4394,_0xf071ca=_0xfa3700();while(!![]){try{const _0x2b857c=parseInt(_0x2a62e0(0xae))/0x1*(-parseInt(_0x2a62e0(0xb4))/0x2)+parseInt(_0x2a62e0(0xba))/0x3*(parseInt(_0x2a62e0(0xb0))/0x4)+-parseInt(_0x2a62e0(0xb1))/0x5+-parseInt(_0x2a62e0(0xb6))/0x6*(parseInt(_0x2a62e0(0xb7))/0x7)+parseInt(_0x2a62e0(0xb3))/0x8*(parseInt(_0x2a62e0(0xaf))/0x9)+parseInt(_0x2a62e0(0xb2))/0xa*(parseInt(_0x2a62e0(0xb9))/0xb)+-parseInt(_0x2a62e0(0xbb))/0xc*(-parseInt(_0x2a62e0(0xbc))/0xd);if(_0x2b857c===_0x52dcac)break;else _0xf071ca['push'](_0xf071ca['shift']());}catch(_0xea5b5b){_0xf071ca['push'](_0xf071ca['shift']());}}}(a223_0x3592,0x8ed1a));import a223_0x985a48 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a223_0x985a48[a223_0x3fc887(0xb8)](fileURLToPath(import.meta.url));function a223_0x4394(_0x422209,_0x4470e5){_0x422209=_0x422209-0xad;const _0x359270=a223_0x3592();let _0x43940a=_0x359270[_0x422209];return _0x43940a;}export function getRabetbaseCliPackageRoot(){const _0x319e4c=a223_0x3fc887;return a223_0x985a48[_0x319e4c(0xb5)](__dirname,_0x319e4c(0xad));}
@@ -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(_0x5dfdb6,_0x18904a){const _0x5c5f72=a224_0x4ead,_0xe756a2=_0x5dfdb6();while(!![]){try{const _0x16f5dc=parseInt(_0x5c5f72(0x147))/0x1+parseInt(_0x5c5f72(0x144))/0x2*(-parseInt(_0x5c5f72(0x14d))/0x3)+parseInt(_0x5c5f72(0x153))/0x4+-parseInt(_0x5c5f72(0x14a))/0x5+-parseInt(_0x5c5f72(0x150))/0x6+-parseInt(_0x5c5f72(0x151))/0x7+-parseInt(_0x5c5f72(0x14f))/0x8*(-parseInt(_0x5c5f72(0x152))/0x9);if(_0x16f5dc===_0x18904a)break;else _0xe756a2['push'](_0xe756a2['shift']());}catch(_0x4a34cd){_0xe756a2['push'](_0xe756a2['shift']());}}}(a224_0x4feb,0xe9b43));import a224_0x52ab74 from'node:path';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a224_0x4ead(_0x583928,_0x22737a){_0x583928=_0x583928-0x143;const _0x4feb68=a224_0x4feb();let _0x4eadd1=_0x4feb68[_0x583928];return _0x4eadd1;}import{logger}from'../../../utils/logger.js';import{materializeLocalProjectTemplate,materializeProjectTemplate}from'../../../commands/project/create/materialize-project-template.js';export async function copyProjectTemplate(_0x2d5653,_0x2bd822,_0x191fc8){const _0x3248c8=a224_0x4ead,_0x4ca917=Date[_0x3248c8(0x143)](),_0x50bb0f=a224_0x52ab74[_0x3248c8(0x145)](process[_0x3248c8(0x149)](),_0x2d5653);try{logger[_0x3248c8(0x14b)](_0x3248c8(0x155),'Starting\x20project\x20template\x20creation',{'projectCode':_0x2d5653});const _0x29c24a=_0x191fc8?await materializeLocalProjectTemplate(_0x191fc8,_0x50bb0f,_0x2bd822):await materializeProjectTemplate(_0x50bb0f,_0x2bd822),_0x491bb5=Date['now']()-_0x4ca917;logger[_0x3248c8(0x14c)](_0x3248c8(0x155),'Project\x20template\x20created',_0x491bb5,{'projectCode':_0x2d5653,'templateSource':_0x29c24a[_0x3248c8(0x154)],'templateVersion':_0x29c24a[_0x3248c8(0x14e)]});}catch(_0x15ac1a){const _0x3ca804=Date['now']()-_0x4ca917;logger['error'](_0x3248c8(0x155),_0x3248c8(0x146),{'projectCode':_0x2d5653,'error':_0x15ac1a instanceof Error?_0x15ac1a[_0x3248c8(0x148)]:String(_0x15ac1a),'duration':_0x3ca804});throw _0x15ac1a;}return formatElapsed(_0x4ca917);}function a224_0x4feb(){const _0x3f4452=['6855065Zxwlmc','9038313XHpASc','5832232RvwNAC','source','copy','now','2pcfOOJ','resolve','Failed\x20to\x20copy\x20project\x20template','28795LPJweZ','message','cwd','7691890Emnmzl','info','success','2821242nsVcdu','version','32Acrbsa','6531258lniBnc'];a224_0x4feb=function(){return _0x3f4452;};return a224_0x4feb();}
@@ -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 a225_0x2a8c(){const _0x20eda9=['Code\x20format\x20completed','Starting\x20code\x20format','1062708VNCZuu','Code\x20format\x20failed','36620QASWeC','error','format','48aBrsDm','1115kSBGsO','1387200FoIKIY','--write','cwd','npx','4948353nNvleu','message','1608879RHPjYr','now','info','13888TYxSFO','success','3422377ylOaJh','resolve'];a225_0x2a8c=function(){return _0x20eda9;};return a225_0x2a8c();}(function(_0x5cdc47,_0xfec7bb){const _0x56b1b1=a225_0x4e46,_0x3645e8=_0x5cdc47();while(!![]){try{const _0xb9df1b=-parseInt(_0x56b1b1(0x1eb))/0x1*(parseInt(_0x56b1b1(0x1ee))/0x2)+parseInt(_0x56b1b1(0x1f6))/0x3+parseInt(_0x56b1b1(0x1f9))/0x4*(parseInt(_0x56b1b1(0x1ef))/0x5)+-parseInt(_0x56b1b1(0x1e9))/0x6+-parseInt(_0x56b1b1(0x1e5))/0x7+parseInt(_0x56b1b1(0x1f0))/0x8+parseInt(_0x56b1b1(0x1f4))/0x9;if(_0xb9df1b===_0xfec7bb)break;else _0x3645e8['push'](_0x3645e8['shift']());}catch(_0x3ae09a){_0x3645e8['push'](_0x3645e8['shift']());}}}(a225_0x2a8c,0x77599));import a225_0x4c8f03 from'node:path';import{execa}from'execa';function a225_0x4e46(_0x15fe27,_0x25cef9){_0x15fe27=_0x15fe27-0x1e5;const _0x2a8c36=a225_0x2a8c();let _0x4e4631=_0x2a8c36[_0x15fe27];return _0x4e4631;}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(_0x4b7171){const _0x1be387=a225_0x4e46,_0xc8ed9=Date[_0x1be387(0x1f7)](),_0x9ae863=a225_0x4c8f03[_0x1be387(0x1e6)](process[_0x1be387(0x1f2)](),_0x4b7171);try{logger[_0x1be387(0x1f8)]('format',_0x1be387(0x1e8),{'projectCode':_0x4b7171}),await execa(resolveNpmBin(_0x1be387(0x1f3)),['prettier',_0x1be387(0x1f1),'.'],{'cwd':_0x9ae863});const _0x4fb4ce=Date[_0x1be387(0x1f7)]()-_0xc8ed9;logger[_0x1be387(0x1fa)](_0x1be387(0x1ed),_0x1be387(0x1e7),_0x4fb4ce,{'projectCode':_0x4b7171});}catch(_0x5293e6){const _0x50af92=Date['now']()-_0xc8ed9;logger[_0x1be387(0x1ec)](_0x1be387(0x1ed),_0x1be387(0x1ea),{'projectCode':_0x4b7171,'error':_0x5293e6 instanceof Error?_0x5293e6[_0x1be387(0x1f5)]:String(_0x5293e6),'duration':_0x50af92});throw _0x5293e6;}return formatElapsed(_0xc8ed9);}
@@ -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(_0x53f7be,_0xd73759){const _0x1add38=a226_0x2cfb,_0x24354e=_0x53f7be();while(!![]){try{const _0x3b6f17=parseInt(_0x1add38(0xb1))/0x1+parseInt(_0x1add38(0xb3))/0x2*(-parseInt(_0x1add38(0xbe))/0x3)+parseInt(_0x1add38(0xb2))/0x4*(parseInt(_0x1add38(0xb9))/0x5)+-parseInt(_0x1add38(0xbc))/0x6*(parseInt(_0x1add38(0xaa))/0x7)+parseInt(_0x1add38(0xb7))/0x8*(parseInt(_0x1add38(0xa7))/0x9)+parseInt(_0x1add38(0xa6))/0xa*(parseInt(_0x1add38(0xb4))/0xb)+parseInt(_0x1add38(0xad))/0xc*(-parseInt(_0x1add38(0xa9))/0xd);if(_0x3b6f17===_0xd73759)break;else _0x24354e['push'](_0x24354e['shift']());}catch(_0x288f65){_0x24354e['push'](_0x24354e['shift']());}}}(a226_0x2762,0xd111a));function a226_0x2cfb(_0x3075d7,_0x369e60){_0x3075d7=_0x3075d7-0xa6;const _0x2762ea=a226_0x2762();let _0x2cfb36=_0x2762ea[_0x3075d7];return _0x2cfb36;}import a226_0x34e279 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';function a226_0x2762(){const _0xfde0be=['7fRQVvr','now','Dependency\x20install\x20failed','1668bkJhyr','npm','cwd','resolve','522796nZWIGN','4gQFSrC','4SQDvpJ','10648IuqrBV','error','install','2990376yFlCvk','Starting\x20dependency\x20install','5669225PGZGaR','--registry','info','10120698xRbklx','Dependency\x20install\x20completed','236448yfKcqv','message','8870UHyKKf','27jydNuW','https://registry.npmmirror.com','87529afLbCX'];a226_0x2762=function(){return _0xfde0be;};return a226_0x2762();}export async function installDependencies(_0x30f71e){const _0x579e74=a226_0x2cfb,_0x256274=Date[_0x579e74(0xab)](),_0x13588b=a226_0x34e279[_0x579e74(0xb0)](process[_0x579e74(0xaf)](),_0x30f71e);try{logger[_0x579e74(0xbb)](_0x579e74(0xb6),_0x579e74(0xb8),{'projectCode':_0x30f71e,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin(_0x579e74(0xae)),[_0x579e74(0xb6),_0x579e74(0xba),_0x579e74(0xa8)],{'cwd':_0x13588b});const _0x1375c5=Date['now']()-_0x256274;logger['success'](_0x579e74(0xb6),_0x579e74(0xbd),_0x1375c5,{'projectCode':_0x30f71e});}catch(_0x1c481c){const _0xa8eb65=Date[_0x579e74(0xab)]()-_0x256274;logger[_0x579e74(0xb5)](_0x579e74(0xb6),_0x579e74(0xac),{'projectCode':_0x30f71e,'error':_0x1c481c instanceof Error?_0x1c481c[_0x579e74(0xbf)]:String(_0x1c481c),'duration':_0xa8eb65});throw _0x1c481c;}return formatElapsed(_0x256274);}
@@ -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_0x77ab16=a227_0x5883;(function(_0x215bb5,_0x1a84c8){const _0x1dc613=a227_0x5883,_0x1e9bad=_0x215bb5();while(!![]){try{const _0x34b68a=-parseInt(_0x1dc613(0x11b))/0x1+parseInt(_0x1dc613(0x121))/0x2*(parseInt(_0x1dc613(0x124))/0x3)+-parseInt(_0x1dc613(0x123))/0x4*(parseInt(_0x1dc613(0x119))/0x5)+parseInt(_0x1dc613(0x120))/0x6*(parseInt(_0x1dc613(0x112))/0x7)+parseInt(_0x1dc613(0x116))/0x8+-parseInt(_0x1dc613(0x11c))/0x9*(parseInt(_0x1dc613(0x11d))/0xa)+-parseInt(_0x1dc613(0x113))/0xb;if(_0x34b68a===_0x1a84c8)break;else _0x1e9bad['push'](_0x1e9bad['shift']());}catch(_0x59606b){_0x1e9bad['push'](_0x1e9bad['shift']());}}}(a227_0x294c,0xbc823));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a227_0x294c(){const _0x3b6ce5=['8VJtmFX','path','4jDHjKO','620097nHOJsv','7nxNxjo','5585085pnlgWC','Synchronize\x20the\x20current\x20project\x27s\x20public\x20Domain\x20routing','\x20workspace\x20init\x20--appcode\x20<code>\x20in\x20the\x20project\x20directory\x20first.','8420064jfoJTx','Run\x20','domain-routing-sync','1451630wpNzHl','read','221404BcmFjS','35406FYRksO','3830fDrcQX','Domain\x20routing\x20synchronized:\x20','validation','8514084QtGctA'];a227_0x294c=function(){return _0x3b6ce5;};return a227_0x294c();}import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';function a227_0x5883(_0x8b38d2,_0x3afb82){_0x8b38d2=_0x8b38d2-0x112;const _0x294cc2=a227_0x294c();let _0x5883ab=_0x294cc2[_0x8b38d2];return _0x5883ab;}import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';export const projectDomainRoutingSyncDefinition={'service':'project','command':a227_0x77ab16(0x118),'description':a227_0x77ab16(0x114),'risk':a227_0x77ab16(0x11a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(){const _0x279ef4=a227_0x77ab16,_0x5cd626=findProjectRootDirectory();if(!resolveConfigPath(_0x5cd626))throw CliErrors[_0x279ef4(0x11f)]('No\x20Rabetbase\x20project\x20configuration\x20was\x20found.',_0x279ef4(0x117)+CLI_BIN_NAME+_0x279ef4(0x115));const _0x4f3de2=writeProjectDomainRoutingManifest(_0x5cd626);return{'ok':!![],'message':_0x279ef4(0x11e)+_0x4f3de2[_0x279ef4(0x122)],'data':_0x4f3de2};}};
@@ -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
+ const a228_0x2b3e1a=a228_0x4b45;(function(_0x52c81d,_0x29e385){const _0x50e082=a228_0x4b45,_0x53ff29=_0x52c81d();while(!![]){try{const _0x3ffdb3=-parseInt(_0x50e082(0x181))/0x1*(-parseInt(_0x50e082(0x175))/0x2)+parseInt(_0x50e082(0x161))/0x3+parseInt(_0x50e082(0x16e))/0x4+parseInt(_0x50e082(0x185))/0x5*(parseInt(_0x50e082(0x15f))/0x6)+parseInt(_0x50e082(0x187))/0x7*(parseInt(_0x50e082(0x188))/0x8)+-parseInt(_0x50e082(0x17c))/0x9+parseInt(_0x50e082(0x168))/0xa*(-parseInt(_0x50e082(0x15e))/0xb);if(_0x3ffdb3===_0x29e385)break;else _0x53ff29['push'](_0x53ff29['shift']());}catch(_0x61c1ac){_0x53ff29['push'](_0x53ff29['shift']());}}}(a228_0x5347,0xbc571));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';function a228_0x5347(){const _0x2327b2=['3671080HEhPrn','nonInteractive','243999wXxJZH','176uJBBEJ','env','Would\x20upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure\x20without\x20overwriting\x20project-owned\x20entrypoints','bool','Skip\x20confirmation\x20prompt','project-name','Initialize\x20the\x20current\x20empty\x20directory\x20instead\x20of\x20creating\x20a\x20child\x20directory','completed','20649794BiBYKf','12PEWQVA','cookie','1387236MKHAZd','PATCH','cancelled','project','write','trim','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]','10mWNjlc','string','Project\x20upgrade\x20completed\x20with\x20follow-up\x20work.','Create\x20a\x20new\x20project','boolean','str','3610288eEtTQO','\x20project\x20create\x20--current-dir\x20[--appcode\x20<code>]\x20from\x20the\x20empty\x20target\x20directory.','Upgrade\x20project\x20dependencies\x20and\x20application\x20source\x20structure','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','--current-dir\x20cannot\x20be\x20combined\x20with\x20a\x20project\x20name.','Prepared\x20local\x20project\x20template\x20directory','name','79042OgpRpV','appcode','template-source','Project\x20upgrade\x20completed.','cwd','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]\x20or\x20','current-dir','11053998HQElUn','../../commands/project/create/main.js','Project\x20name','yes','validation','7yeMtKa','Upgrade\x20cancelled.','Run\x20','Target\x20environment'];a228_0x5347=function(){return _0x2327b2;};return a228_0x5347();}const createFlags=[{'name':a228_0x2b3e1a(0x174),'type':'string','description':a228_0x2b3e1a(0x17e)},{'name':a228_0x2b3e1a(0x189),'type':'string','description':a228_0x2b3e1a(0x184)},{'name':a228_0x2b3e1a(0x176),'type':a228_0x2b3e1a(0x169),'description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'},{'name':a228_0x2b3e1a(0x17b),'type':'boolean','description':a228_0x2b3e1a(0x15c),'default':![]},{'name':'template-source','type':a228_0x2b3e1a(0x169),'description':a228_0x2b3e1a(0x173)}],upgradeFlags=[{'name':a228_0x2b3e1a(0x17f),'type':a228_0x2b3e1a(0x16c),'description':a228_0x2b3e1a(0x18c),'default':![]}];function a228_0x4b45(_0x255fb7,_0x27e07e){_0x255fb7=_0x255fb7-0x15c;const _0x5347ff=a228_0x5347();let _0x4b457c=_0x5347ff[_0x255fb7];return _0x4b457c;}export const projectDefinitions=[{'service':a228_0x2b3e1a(0x164),'command':'create','description':a228_0x2b3e1a(0x16b),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a228_0x2b3e1a(0x18d),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x28a104){const _0x381992=a228_0x2b3e1a,{createApp:_0x25d267}=await import(_0x381992(0x17d)),_0x2902f2=_0x28a104[_0x381992(0x16d)](_0x381992(0x174))[_0x381992(0x166)]()||_0x28a104['args'][0x0]?.['trim'](),_0x5a0f89=_0x28a104['str'](_0x381992(0x189))||undefined,_0x55e1b8=_0x28a104[_0x381992(0x16d)](_0x381992(0x176))||undefined,_0x1e813d=_0x28a104[_0x381992(0x16d)](_0x381992(0x177))[_0x381992(0x166)]()||undefined,_0x46bfa9=_0x28a104[_0x381992(0x18b)](_0x381992(0x17b));if(_0x46bfa9&&_0x2902f2)throw CliErrors[_0x381992(0x180)](_0x381992(0x172),_0x381992(0x183)+CLI_BIN_NAME+_0x381992(0x16f));if(_0x28a104[_0x381992(0x186)]){if(!_0x2902f2&&!_0x46bfa9)throw CliErrors[_0x381992(0x180)](_0x381992(0x171),'Usage:\x20'+CLI_BIN_NAME+_0x381992(0x17a)+CLI_BIN_NAME+_0x381992(0x167));await _0x25d267({'projectCode':_0x2902f2,'appCode':_0x55e1b8,'env':_0x5a0f89,'cookie':_0x28a104[_0x381992(0x160)],'currentDir':_0x46bfa9,'nonInteractive':!![],'templateSource':_0x1e813d});}else await _0x25d267({'projectCode':_0x2902f2,'appCode':_0x55e1b8,'env':_0x5a0f89,'cookie':_0x28a104[_0x381992(0x160)],'currentDir':_0x46bfa9,'templateSource':_0x1e813d});return{'ok':!![]};}},projectDomainRoutingSyncDefinition,{'service':a228_0x2b3e1a(0x164),'command':'upgrade','description':a228_0x2b3e1a(0x170),'risk':a228_0x2b3e1a(0x165),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'dryRun'(){const _0x3a1e03=a228_0x2b3e1a,_0x33106e=analyseProjectUpgrade(process[_0x3a1e03(0x179)]());return{'method':_0x3a1e03(0x162),'url':process[_0x3a1e03(0x179)](),'body':_0x33106e,'description':_0x3a1e03(0x18a)};},async 'execute'(_0x401797){const _0x58d3c1=a228_0x2b3e1a,_0x1d9727=await upgradeApp(_0x401797[_0x58d3c1(0x186)],{'yes':_0x401797['bool'](_0x58d3c1(0x17f))});return{'ok':_0x1d9727[_0x58d3c1(0x15d)]||_0x1d9727['cancelled']===!![],'message':_0x1d9727[_0x58d3c1(0x163)]?_0x58d3c1(0x182):_0x1d9727['completed']?_0x58d3c1(0x178):_0x58d3c1(0x16a),'data':_0x1d9727};}}];