@lovrabet/rabetbase-cli 2.5.1-beta.1 → 2.5.1-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/api/generate-sdk-config-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/delete.js +1 -1
  53. package/lib/commands/config/get.js +1 -1
  54. package/lib/commands/config/index.js +1 -1
  55. package/lib/commands/config/init.js +1 -1
  56. package/lib/commands/config/list.js +1 -1
  57. package/lib/commands/config/set.js +1 -1
  58. package/lib/commands/config/shared.js +1 -1
  59. package/lib/commands/dataset/business-group-update.js +1 -1
  60. package/lib/commands/dataset/business-groups.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-restore.d.ts +107 -0
  66. package/lib/commands/dataset/field-restore.js +1 -0
  67. package/lib/commands/dataset/field-update.js +1 -1
  68. package/lib/commands/dataset/generate.js +1 -1
  69. package/lib/commands/dataset/index.js +1 -1
  70. package/lib/commands/dataset/list.js +1 -1
  71. package/lib/commands/dataset/operations.js +1 -1
  72. package/lib/commands/dataset/relation-audit.js +1 -1
  73. package/lib/commands/dataset/relation-create.js +1 -1
  74. package/lib/commands/dataset/relation-delete.js +1 -1
  75. package/lib/commands/dataset/relation-shared.js +1 -1
  76. package/lib/commands/dataset/relation-update.js +1 -1
  77. package/lib/commands/dataset/relations.js +1 -1
  78. package/lib/commands/dataset/rename.js +1 -1
  79. package/lib/commands/dataset/restore.js +1 -1
  80. package/lib/commands/dataset/user-deleted-field-list.d.ts +36 -0
  81. package/lib/commands/dataset/user-deleted-field-list.js +1 -0
  82. package/lib/commands/db/analysis-batching.js +1 -1
  83. package/lib/commands/db/analyze-batch-plan.js +1 -1
  84. package/lib/commands/db/analyze-cancel.js +1 -1
  85. package/lib/commands/db/analyze-start.js +1 -1
  86. package/lib/commands/db/analyze-status.js +1 -1
  87. package/lib/commands/db/create.js +1 -1
  88. package/lib/commands/db/delete.js +1 -1
  89. package/lib/commands/db/detail.js +1 -1
  90. package/lib/commands/db/diff-refresh-start.js +1 -1
  91. package/lib/commands/db/diff-refresh-status.js +1 -1
  92. package/lib/commands/db/diff.js +1 -1
  93. package/lib/commands/db/index.js +1 -1
  94. package/lib/commands/db/list.js +1 -1
  95. package/lib/commands/db/shared.js +1 -1
  96. package/lib/commands/db/table-diff-shared.js +1 -1
  97. package/lib/commands/db/tables.js +1 -1
  98. package/lib/commands/db/test.js +1 -1
  99. package/lib/commands/db/update.js +1 -1
  100. package/lib/commands/deployment/auto-sync.d.ts +28 -0
  101. package/lib/commands/deployment/auto-sync.js +1 -0
  102. package/lib/commands/deployment/index.d.ts +2 -0
  103. package/lib/commands/deployment/index.js +1 -0
  104. package/lib/commands/deployment/sync.d.ts +2 -0
  105. package/lib/commands/deployment/sync.js +1 -0
  106. package/lib/commands/doctor.js +1 -1
  107. package/lib/commands/file/index.js +1 -1
  108. package/lib/commands/issue/index.js +1 -1
  109. package/lib/commands/issue/nudge.js +1 -1
  110. package/lib/commands/issue/report.js +1 -1
  111. package/lib/commands/issue/shared.js +1 -1
  112. package/lib/commands/kb/create.js +1 -1
  113. package/lib/commands/kb/delete.js +1 -1
  114. package/lib/commands/kb/detail.js +1 -1
  115. package/lib/commands/kb/index.js +1 -1
  116. package/lib/commands/kb/list.js +1 -1
  117. package/lib/commands/kb/search.js +1 -1
  118. package/lib/commands/kb/shared.js +1 -1
  119. package/lib/commands/kb/update.js +1 -1
  120. package/lib/commands/logs/index.js +1 -1
  121. package/lib/commands/menu/asset-update.js +1 -1
  122. package/lib/commands/menu/delete.js +1 -1
  123. package/lib/commands/menu/external-link-create.js +1 -1
  124. package/lib/commands/menu/external-link-update.js +1 -1
  125. package/lib/commands/menu/group-create.js +1 -1
  126. package/lib/commands/menu/group-update.js +1 -1
  127. package/lib/commands/menu/index.js +1 -1
  128. package/lib/commands/menu/list.js +1 -1
  129. package/lib/commands/menu/move.js +1 -1
  130. package/lib/commands/menu/regroup-start.js +1 -1
  131. package/lib/commands/menu/rename.js +1 -1
  132. package/lib/commands/menu/shared/compare-table.js +1 -1
  133. package/lib/commands/menu/shared/delete-plan.js +1 -1
  134. package/lib/commands/menu/shared/facts.js +1 -1
  135. package/lib/commands/menu/shared/index.js +1 -1
  136. package/lib/commands/menu/shared/inquirer.js +1 -1
  137. package/lib/commands/menu/shared/local-pages.js +1 -1
  138. package/lib/commands/menu/shared/logic.js +1 -1
  139. package/lib/commands/menu/shared/mutations.js +1 -1
  140. package/lib/commands/menu/shared/service.js +1 -1
  141. package/lib/commands/menu/shared/sync-core.js +1 -1
  142. package/lib/commands/menu/shared/update-core.js +1 -1
  143. package/lib/commands/menu/shared/valid-url.js +1 -1
  144. package/lib/commands/menu/sync.js +1 -1
  145. package/lib/commands/menu/visibility-update.js +1 -1
  146. package/lib/commands/notification/config-create.js +1 -1
  147. package/lib/commands/notification/config-delete.js +1 -1
  148. package/lib/commands/notification/config-list.js +1 -1
  149. package/lib/commands/notification/config-update.js +1 -1
  150. package/lib/commands/notification/index.js +1 -1
  151. package/lib/commands/notification/shared.js +1 -1
  152. package/lib/commands/ocr/index.js +1 -1
  153. package/lib/commands/page/create.js +1 -1
  154. package/lib/commands/page/custom/detail.js +1 -1
  155. package/lib/commands/page/custom/list.js +1 -1
  156. package/lib/commands/page/custom/publish.js +1 -1
  157. package/lib/commands/page/custom/shared.js +1 -1
  158. package/lib/commands/page/custom/syntax.js +1 -1
  159. package/lib/commands/page/custom/template.js +1 -1
  160. package/lib/commands/page/custom/update.js +1 -1
  161. package/lib/commands/page/data-list-status.js +1 -1
  162. package/lib/commands/page/generate-start.js +1 -1
  163. package/lib/commands/page/generate-status.js +1 -1
  164. package/lib/commands/page/index.js +1 -1
  165. package/lib/commands/page/pull.js +1 -1
  166. package/lib/commands/page/push.js +1 -1
  167. package/lib/commands/page/relation-audit.js +1 -1
  168. package/lib/commands/page/restore.js +1 -1
  169. package/lib/commands/page/shared.js +1 -1
  170. package/lib/commands/page/sync.js +1 -1
  171. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  172. package/lib/commands/project/create/format-elapsed.js +1 -1
  173. package/lib/commands/project/create/main.js +1 -1
  174. package/lib/commands/project/create/materialize-project-template.js +1 -1
  175. package/lib/commands/project/create/project-name.js +1 -1
  176. package/lib/commands/project/create/project-template-archive.js +1 -1
  177. package/lib/commands/project/create/project-template-path.js +1 -1
  178. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  179. package/lib/commands/project/create/use-format-code.js +1 -1
  180. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  181. package/lib/commands/project/index.js +1 -1
  182. package/lib/commands/project/upgrade.js +1 -1
  183. package/lib/commands/registry.js +1 -1
  184. package/lib/commands/role/delete.js +1 -1
  185. package/lib/commands/role/detail.js +1 -1
  186. package/lib/commands/role/index.js +1 -1
  187. package/lib/commands/role/list.js +1 -1
  188. package/lib/commands/role/shared.js +1 -1
  189. package/lib/commands/role/update.js +1 -1
  190. package/lib/commands/role/user-add.js +1 -1
  191. package/lib/commands/role/user-remove.js +1 -1
  192. package/lib/commands/role/user-resolve.js +1 -1
  193. package/lib/commands/run/index.js +1 -1
  194. package/lib/commands/schema.js +1 -1
  195. package/lib/commands/sql/create.js +1 -1
  196. package/lib/commands/sql/delete.js +1 -1
  197. package/lib/commands/sql/detail.js +1 -1
  198. package/lib/commands/sql/exec.js +1 -1
  199. package/lib/commands/sql/index.js +1 -1
  200. package/lib/commands/sql/list.js +1 -1
  201. package/lib/commands/sql/pull.js +1 -1
  202. package/lib/commands/sql/push.js +1 -1
  203. package/lib/commands/sql/shared.js +1 -1
  204. package/lib/commands/sql/status.js +1 -1
  205. package/lib/commands/sql/validate.js +1 -1
  206. package/lib/commands/task/index.js +1 -1
  207. package/lib/commands/task/status.js +1 -1
  208. package/lib/commands/tenant/index.js +1 -1
  209. package/lib/commands/tenant/members-list.js +1 -1
  210. package/lib/commands/tenant/shared.js +1 -1
  211. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  212. package/lib/commands/user-account/index.js +1 -1
  213. package/lib/commands/workspace/add.js +1 -1
  214. package/lib/commands/workspace/index.js +1 -1
  215. package/lib/commands/workspace/remove.js +1 -1
  216. package/lib/config/deployment-sync.d.ts +10 -0
  217. package/lib/config/deployment-sync.js +1 -0
  218. package/lib/config/domain-config.js +1 -1
  219. package/lib/config/project-routing.js +1 -1
  220. package/lib/config/schema.js +1 -1
  221. package/lib/constant/cdn.js +1 -1
  222. package/lib/constant/cli.js +1 -1
  223. package/lib/constant/defaults.js +1 -1
  224. package/lib/constant/domain.js +1 -1
  225. package/lib/constant/env.js +1 -1
  226. package/lib/constant/output.js +1 -1
  227. package/lib/constant/paths.js +1 -1
  228. package/lib/constant/region.js +1 -1
  229. package/lib/constant/risk.js +1 -1
  230. package/lib/constant/routing-profile.js +1 -1
  231. package/lib/context/app-resolver.d.ts +2 -0
  232. package/lib/context/app-resolver.js +1 -1
  233. package/lib/context/auth-resolver.js +1 -1
  234. package/lib/context/config-loader.js +1 -1
  235. package/lib/context.js +1 -1
  236. package/lib/core/alias-resolver.js +1 -1
  237. package/lib/core/api-client.d.ts +35 -0
  238. package/lib/core/api-client.js +1 -1
  239. package/lib/core/bff/config.js +1 -1
  240. package/lib/core/bff/file-system.js +1 -1
  241. package/lib/core/bff/hash.js +1 -1
  242. package/lib/core/bff/lock.js +1 -1
  243. package/lib/core/bff/utils.js +1 -1
  244. package/lib/core/db-resolver.js +1 -1
  245. package/lib/core/page/file-system.js +1 -1
  246. package/lib/core/page/hash.js +1 -1
  247. package/lib/core/page/lock.js +1 -1
  248. package/lib/core/sql-index-auditor.js +1 -1
  249. package/lib/core/sql-sync/config.js +1 -1
  250. package/lib/core/sql-sync/file-system.js +1 -1
  251. package/lib/core/sql-sync/hash.js +1 -1
  252. package/lib/core/sql-sync/lock.js +1 -1
  253. package/lib/core/sql-sync/utils.js +1 -1
  254. package/lib/core/sql-validator.js +1 -1
  255. package/lib/errors.js +1 -1
  256. package/lib/framework/build-all-flags.js +1 -1
  257. package/lib/framework/error-output.js +1 -1
  258. package/lib/framework/explicit-yes.js +1 -1
  259. package/lib/framework/flags.js +1 -1
  260. package/lib/framework/help.js +1 -1
  261. package/lib/framework/index.js +1 -1
  262. package/lib/framework/output.js +1 -1
  263. package/lib/framework/response.js +1 -1
  264. package/lib/framework/runner-alias.js +1 -1
  265. package/lib/framework/runner.js +1 -1
  266. package/lib/framework/schema-export.js +1 -1
  267. package/lib/framework/types.d.ts +4 -0
  268. package/lib/framework/types.js +1 -1
  269. package/lib/generated/build-info.d.ts +4 -4
  270. package/lib/generated/build-info.js +1 -1
  271. package/lib/help.js +1 -1
  272. package/lib/postinstall.js +1 -1
  273. package/lib/runtime/confirmation.js +1 -1
  274. package/lib/runtime/event.js +1 -1
  275. package/lib/runtime/index.js +1 -1
  276. package/lib/runtime/queue.js +1 -1
  277. package/lib/runtime/resolve.js +1 -1
  278. package/lib/skills/builtin-skill.js +1 -1
  279. package/lib/skills/main.js +1 -1
  280. package/lib/skills/npx-skills-add.js +1 -1
  281. package/lib/skills/skill-presence.js +1 -1
  282. package/lib/telemetry/cli-command-trace.js +1 -1
  283. package/lib/telemetry/cli-help-trace.js +1 -1
  284. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  285. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  286. package/lib/telemetry/send-cli-trace-log.js +1 -1
  287. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  288. package/lib/utils/ai_config.js +1 -1
  289. package/lib/utils/apply-jq-filter.js +1 -1
  290. package/lib/utils/cdn-config.js +1 -1
  291. package/lib/utils/check-sdk-version.js +1 -1
  292. package/lib/utils/cli-version-check.js +1 -1
  293. package/lib/utils/cli-version-policy.js +1 -1
  294. package/lib/utils/config.js +1 -1
  295. package/lib/utils/entity-with-id.js +1 -1
  296. package/lib/utils/file-utils.js +1 -1
  297. package/lib/utils/guides-cdn.js +1 -1
  298. package/lib/utils/http-client.js +1 -1
  299. package/lib/utils/is-non-interactive.js +1 -1
  300. package/lib/utils/logger.js +1 -1
  301. package/lib/utils/params.js +1 -1
  302. package/lib/utils/platform.js +1 -1
  303. package/lib/utils/sleep.js +1 -1
  304. package/lib/utils/template-replacer.js +1 -1
  305. package/lib/utils/update-notice.js +1 -1
  306. package/lib/utils/version.js +1 -1
  307. package/lib/utils/with-active-cookie.js +1 -1
  308. package/lib/utils/write-cli-side-channel.js +1 -1
  309. package/package.json +1 -1
  310. package/skills/rabetbase/SKILL.md +11 -5
  311. package/skills/rabetbase/references/rabetbase-dataset-business-group-update.md +9 -9
  312. package/skills/rabetbase/references/rabetbase-dataset-business-groups.md +1 -1
  313. package/skills/rabetbase/references/rabetbase-dataset-field-restore.md +59 -0
  314. package/skills/rabetbase/references/rabetbase-dataset-user-deleted-field-list.md +47 -0
  315. package/skills/rabetbase/references/rabetbase-deployment-sync.md +92 -0
  316. package/skills/rabetbase.manifest.json +6 -3
@@ -1 +1 @@
1
- (function(_0x416048,_0x5bd6b5){const _0x490b68=a159_0x4a3c,_0x124d1a=_0x416048();while(!![]){try{const _0x39251b=-parseInt(_0x490b68(0x182))/0x1+parseInt(_0x490b68(0x16c))/0x2*(parseInt(_0x490b68(0x194))/0x3)+-parseInt(_0x490b68(0x17d))/0x4*(-parseInt(_0x490b68(0x186))/0x5)+-parseInt(_0x490b68(0x169))/0x6*(parseInt(_0x490b68(0x14b))/0x7)+-parseInt(_0x490b68(0x1ab))/0x8*(parseInt(_0x490b68(0x179))/0x9)+parseInt(_0x490b68(0x189))/0xa*(-parseInt(_0x490b68(0x152))/0xb)+parseInt(_0x490b68(0x1b7))/0xc;if(_0x39251b===_0x5bd6b5)break;else _0x124d1a['push'](_0x124d1a['shift']());}catch(_0x5f8e77){_0x124d1a['push'](_0x124d1a['shift']());}}}(a159_0x25cd,0x5a6ad));import{randomUUID}from'node:crypto';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getDatasetDetail,getPageDetail,tryGetDataListPageStatus}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{CliErrors}from'../../errors.js';export function getPageIdFlag(_0x63b33a){const _0xa5f206=a159_0x4a3c,_0x2686cb=_0x63b33a['flag']('id');if(typeof _0x2686cb===_0xa5f206(0x13a)&&Number['isFinite'](_0x2686cb)&&_0x2686cb>0x0)return _0x2686cb;return undefined;}export function validateDatasetSelector(_0x501e09){const _0x20c5dd=a159_0x4a3c,_0x305f58=Boolean(_0x501e09[_0x20c5dd(0x143)](_0x20c5dd(0x184))),_0x56129a=Boolean(_0x501e09[_0x20c5dd(0x143)](_0x20c5dd(0x174)));if(_0x305f58&&_0x56129a)throw CliErrors[_0x20c5dd(0x1ac)](_0x20c5dd(0x1b2));if(!_0x305f58&&!_0x56129a)throw CliErrors['validation'](_0x20c5dd(0x17b));}export function validateGenerateOperationSelector(_0x43e67c){const _0x16b73b=a159_0x4a3c,_0x46335f=Boolean(_0x43e67c[_0x16b73b(0x143)]('task-id')),_0xce075e=Boolean(_0x43e67c[_0x16b73b(0x143)](_0x16b73b(0x12f))),_0x5dabc3=Boolean(_0x43e67c[_0x16b73b(0x143)](_0x16b73b(0x154))),_0x153425=[_0x46335f,_0xce075e,_0x5dabc3][_0x16b73b(0x150)](Boolean)[_0x16b73b(0x149)];if(_0x153425>0x1)throw CliErrors[_0x16b73b(0x1ac)](_0x16b73b(0x13d));if(_0x153425===0x0)throw CliErrors['validation']('One\x20of\x20--task-id,\x20--operation-id,\x20or\x20--client-operation-id\x20is\x20required.');}function a159_0x4a3c(_0x5c0ad0,_0x27804d){_0x5c0ad0=_0x5c0ad0-0x12b;const _0x25cdd3=a159_0x25cd();let _0x4a3c83=_0x25cdd3[_0x5c0ad0];return _0x4a3c83;}export function validatePageTargetSelector(_0x9cd25b){const _0x3ef30b=a159_0x4a3c,_0x370d74=getPageIdFlag(_0x9cd25b)!==undefined,_0x17c44b=Boolean(_0x9cd25b[_0x3ef30b(0x143)](_0x3ef30b(0x184))||_0x9cd25b[_0x3ef30b(0x143)]('alias'));if(_0x370d74&&_0x17c44b)throw CliErrors['validation'](_0x3ef30b(0x16a));if(!_0x370d74&&!_0x17c44b)throw CliErrors['validation'](_0x3ef30b(0x13e));if(_0x9cd25b[_0x3ef30b(0x143)](_0x3ef30b(0x133))&&!_0x17c44b)throw CliErrors[_0x3ef30b(0x1ac)]('--version-tag\x20is\x20only\x20supported\x20with\x20--datasetcode\x20or\x20--alias.');}export function resolveDatasetCode(_0x39e6f1){const _0x3dff9f=a159_0x4a3c;validateDatasetSelector(_0x39e6f1);const _0x3f7705=_0x39e6f1[_0x3dff9f(0x143)](_0x3dff9f(0x184));if(_0x3f7705)return _0x3f7705;const _0x4719ec=_0x39e6f1[_0x3dff9f(0x143)](_0x3dff9f(0x174)),_0x212616=resolveApiFilePath(_0x39e6f1[_0x3dff9f(0x18e)],_0x39e6f1[_0x3dff9f(0x1b0)]),_0x4cebce=resolveAlias(_0x39e6f1[_0x3dff9f(0x18e)],_0x4719ec,undefined,_0x212616);if(_0x4cebce)return _0x4cebce;const _0x4f15ce=loadAliasMap(_0x39e6f1[_0x3dff9f(0x18e)],undefined,_0x212616),_0x3cbc78=_0x4f15ce['length']>0x0?_0x3dff9f(0x1a5)+_0x4f15ce[_0x3dff9f(0x15a)](_0x7d0790=>_0x7d0790[_0x3dff9f(0x174)])['join'](',\x20'):_0x3dff9f(0x166)+CLI_BIN_NAME+'\x20api\x20pull`\x20first,\x20or\x20pass\x20--datasetcode\x20directly.';throw CliErrors[_0x3dff9f(0x1ac)](_0x3dff9f(0x1b4)+_0x4719ec+_0x3dff9f(0x14c)+_0x3cbc78);}export async function loadDatasetDetailForPage(_0x2496e1){const _0x5ea0b0=a159_0x4a3c,_0x574c8b=resolveDatasetCode(_0x2496e1),_0x2528bf=await getDatasetDetail(_0x574c8b),_0x35044c=normalizeDatasetDetail(_0x2528bf,_0x574c8b);return ensureAppOwnership(_0x2496e1[_0x5ea0b0(0x1b0)],_0x35044c['appCode'],'Dataset\x20\x22'+_0x35044c['code']+_0x5ea0b0(0x12e)+_0x35044c['appCode']+_0x5ea0b0(0x198)+_0x2496e1[_0x5ea0b0(0x1b0)]+'\x22.'),_0x35044c;}export async function loadPageDetailForPage(_0x88d26,_0x5c586f){const _0x3d2898=a159_0x4a3c,_0x5e2b75=await getPageDetail(_0x5c586f),_0xc1d1c=normalizePageDetail(_0x5e2b75);return ensureAppOwnership(_0x88d26[_0x3d2898(0x1b0)],_0xc1d1c['appCode'],_0x3d2898(0x191)+_0x5c586f+'\x22\x20belongs\x20to\x20app\x20\x22'+_0xc1d1c['appCode']+_0x3d2898(0x198)+_0x88d26['appCode']+'\x22.'),_0xc1d1c;}export function getUndeletedRelatedPages(_0x34f507){const _0x353138=a159_0x4a3c;return _0x34f507[_0x353138(0x139)][_0x353138(0x150)](_0x57b899=>!_0x57b899[_0x353138(0x170)]);}function a159_0x25cd(){const _0x59e365=['Use\x20either\x20--datasetcode\x20or\x20--alias,\x20not\x20both.','datasetIds','Alias\x20\x22','modelId','blocked_incomplete_sets','8560416QXFkcZ','pageVersion','\x22\x20returned\x20an\x20unsupported\x20Data\x20List\x20Page\x20state.','\x22,\x20but\x20Data\x20List\x20Page\x20facts\x20are\x20unavailable.','menuPath','\x22\x20belongs\x20to\x20app\x20\x22','operation-id','incompleteSets','\x20--client-operation-id\x20','toUpperCase','version-tag','FAILED','from','string','\x22\x20has\x20no\x20Data\x20List\x20Pages\x20yet.','\x22\x20has\x20no\x20undeleted\x20related\x20pages.','relatedPages','number','menuVisible','pages','Use\x20exactly\x20one\x20of\x20--task-id,\x20--operation-id,\x20or\x20--client-operation-id.','One\x20of\x20--id\x20or\x20--datasetcode/--alias\x20is\x20required.','unknown_reconcile_failed','residualPages','operation_pending','isArray','str','Dataset\x20\x22','\x20page\x20sync\x20--datasetcode\x20','\x20page\x20generate-status\x20--datasetcode\x20','datasetCode','versionTag','length','RETRYING','1155fKNcvD','\x22\x20not\x20found.\x20','\x22\x20has\x20one\x20complete\x20set\x20plus\x20residual\x20pages.','\x22\x20now\x20has\x20one\x20complete\x20Data\x20List\x20Page\x20set.','isFinite','filter','run_sync','565004piIpkD','unknown','client-operation-id','\x20--appcode\x20','operation_running','manual_resolution_required','status','`\x20instead.','map','relatedPageInfoList','fields','\x20page\x20generate-start\x20--datasetcode\x20','title','clientOperationId','\x20workspace\x20use\x20--app\x20<name>`\x20or\x20pass\x20--appcode.','__EMPTY__','\x22\x20has\x20undeleted\x20related\x20pages\x20under\x20legacy\x20fallback\x20precheck.','operationId','taskId','completeSets','Run\x20`','pageId','set','10182leGpkf','Use\x20either\x20--id\x20or\x20--datasetcode/--alias,\x20not\x20both.','boolean','411106MXpUtt','\x22\x20already\x20has\x20one\x20complete\x20Data\x20List\x20Page\x20set.','\x22\x20has\x20multiple\x20complete\x20Data\x20List\x20Page\x20sets.','\x22\x20not\x20found.','deleted','object','Switch\x20app\x20with\x20`','\x22\x20returned\x20unsupported\x20operation\x20status\x20\x22','alias','Use\x20`--version-tag\x20<tag>`.\x20Available\x20groups:\x20','\x20page\x20data-list-status\x20--datasetcode\x20','`\x20first,\x20then\x20poll\x20`','UNKNOWN','243ItnEBf','page-','One\x20of\x20--datasetcode\x20or\x20--alias\x20is\x20required.','dataset','6176QkfKlk','menuPages','\x20--format\x20json','get','CANCELING','11452FSMANf','\x22\x20has\x20incomplete\x20Data\x20List\x20Page\x20sets.','datasetcode','name','1715PmQdOc','Version\x20tag\x20\x22','Operation\x20finished\x20for\x20dataset\x20\x22','120JyzjtL','\x20--task-id\x20','CANCELLED','PENDING','pageSets','apiDir','keys','run_generate_start','Page\x20\x22','config','\x20--operation-id\x20','9ESfmHc','hasMenu','totalSets','push','\x22,\x20not\x20current\x20app\x20\x22','<empty>','no_data_list_pages_found','sync','fallbackUndeletedPages','properties','code','generated_complete_set','complete','stringify','Query\x20the\x20page\x20facts\x20first\x20and\x20resolve\x20manually\x20before\x20retrying\x20generate.','Data\x20List\x20Page\x20generation\x20failed\x20for\x20dataset\x20\x22','blocked_complete_plus_residual_sets','Available\x20aliases:\x20','\x22\x20already\x20has\x20undeleted\x20related\x20pages.','datasetId','\x22\x20has\x20multiple\x20or\x20incomplete\x20Data\x20List\x20Page\x20sets.','type','trim','172280lAaMKS','validation','query_operation_status','\x22,\x20but\x20no\x20Data\x20List\x20Pages\x20were\x20found\x20during\x20reconcile.','blocked_multiple_complete_sets','appCode','join'];a159_0x25cd=function(){return _0x59e365;};return a159_0x25cd();}export function buildPageGenerateOperationStatusQueryCommand(_0x480346,_0x42d588){const _0x21be06=a159_0x4a3c,_0x20bd35=_0x42d588?.[_0x21be06(0x1b0)]&&_0x42d588[_0x21be06(0x1b0)][_0x21be06(0x1aa)]()!==''?_0x21be06(0x155)+_0x42d588[_0x21be06(0x1b0)]:'',_0x57f53a=_0x42d588?.['taskId']&&_0x42d588[_0x21be06(0x164)][_0x21be06(0x1aa)]()!==''?_0x21be06(0x18a)+_0x42d588[_0x21be06(0x164)]:_0x42d588?.[_0x21be06(0x163)]&&_0x42d588[_0x21be06(0x163)][_0x21be06(0x1aa)]()!==''?_0x21be06(0x193)+_0x42d588[_0x21be06(0x163)]:_0x42d588?.[_0x21be06(0x15f)]&&_0x42d588[_0x21be06(0x15f)][_0x21be06(0x1aa)]()!==''?_0x21be06(0x131)+_0x42d588[_0x21be06(0x15f)]:'';return CLI_BIN_NAME+_0x21be06(0x146)+_0x480346+_0x20bd35+_0x57f53a+'\x20--format\x20json';}export function createPageGenerateClientOperationId(){return'page-generate-'+randomUUID();}export function buildDataListPageStatusQueryCommand(_0x187c3e,_0x4eefa5){const _0x1d6bd1=a159_0x4a3c,_0x42f824=_0x4eefa5&&_0x4eefa5[_0x1d6bd1(0x1aa)]()!==''?_0x1d6bd1(0x155)+_0x4eefa5:'';return CLI_BIN_NAME+_0x1d6bd1(0x176)+_0x187c3e+_0x42f824+_0x1d6bd1(0x17f);}export function prepareDatasetAction(_0x294b8d,_0x478445){const _0x30d29f=a159_0x4a3c,_0xaea63f=getUndeletedRelatedPages(_0x294b8d);if(_0x478445==='generate'&&_0xaea63f[_0x30d29f(0x149)]>0x0)throw CliErrors['validation'](_0x30d29f(0x144)+_0x294b8d[_0x30d29f(0x19e)]+_0x30d29f(0x1a6),_0x30d29f(0x166)+CLI_BIN_NAME+_0x30d29f(0x145)+_0x294b8d[_0x30d29f(0x19e)]+_0x30d29f(0x159));if(_0x478445===_0x30d29f(0x19b)&&_0xaea63f['length']===0x0)throw CliErrors['validation'](_0x30d29f(0x144)+_0x294b8d[_0x30d29f(0x19e)]+_0x30d29f(0x138),'Run\x20`'+CLI_BIN_NAME+_0x30d29f(0x15d)+_0x294b8d[_0x30d29f(0x19e)]+_0x30d29f(0x177)+CLI_BIN_NAME+_0x30d29f(0x146)+_0x294b8d[_0x30d29f(0x19e)]+'\x20--operation-id\x20<id>`\x20until\x20it\x20reaches\x20a\x20terminal\x20state.');return{'dataset':_0x294b8d,'undeletedPages':_0xaea63f};}export function prepareGenerateDatasetAction(_0x421c3c,_0x464035){const _0x439c49=a159_0x4a3c,_0x3d668f=getUndeletedRelatedPages(_0x421c3c);if(!_0x464035){if(_0x3d668f['length']>0x0)throw CliErrors['validation'](_0x439c49(0x144)+_0x421c3c[_0x439c49(0x19e)]+_0x439c49(0x1a6),'Run\x20`'+CLI_BIN_NAME+'\x20page\x20sync\x20--datasetcode\x20'+_0x421c3c['code']+_0x439c49(0x159));return{'dataset':_0x421c3c,'undeletedPages':_0x3d668f,'dataListPageStatus':null};}const _0x482e2f=_0x464035['completeSets'],_0x19107f=_0x464035['incompleteSets'],_0x9ca233=_0x464035[_0x439c49(0x140)][_0x439c49(0x149)];if(_0x482e2f===0x0&&_0x19107f===0x0&&_0x9ca233===0x0)return{'dataset':_0x421c3c,'undeletedPages':_0x3d668f,'dataListPageStatus':_0x464035};if(_0x482e2f===0x1&&_0x19107f===0x0&&_0x9ca233===0x0)throw CliErrors['validation']('Dataset\x20\x22'+_0x421c3c[_0x439c49(0x19e)]+'\x22\x20already\x20has\x20one\x20complete\x20Data\x20List\x20Page\x20set.',_0x439c49(0x166)+CLI_BIN_NAME+'\x20page\x20sync\x20--datasetcode\x20'+_0x421c3c['code']+'`\x20instead.');throw CliErrors[_0x439c49(0x1ac)](_0x439c49(0x144)+_0x421c3c[_0x439c49(0x19e)]+_0x439c49(0x1a8),_0x439c49(0x1a2));}export function assessDataListPageState(_0x4ed840,_0x3db19f,_0x3ac19e){const _0x3c7e02=a159_0x4a3c,_0x54f0b3=_0x3ac19e?.['successStatus']??'already_exists_complete_set',_0x39e59=_0x3ac19e?.[_0x3c7e02(0x19c)]??[];if(!_0x3db19f){if(_0x39e59[_0x3c7e02(0x149)]>0x0)return{'status':_0x3c7e02(0x1b6),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x3c7e02(0x144)+_0x4ed840+_0x3c7e02(0x162),'nextAction':_0x3c7e02(0x157)};return{'status':_0x3c7e02(0x19a),'allowGenerate':!![],'manualResolutionRequired':![],'message':'Dataset\x20\x22'+_0x4ed840+_0x3c7e02(0x137),'nextAction':_0x3c7e02(0x190)};}const _0x378a77=_0x3db19f['completeSets'],_0x4ab14f=_0x3db19f['incompleteSets'],_0x6013e4=_0x3db19f[_0x3c7e02(0x140)][_0x3c7e02(0x149)];if(_0x378a77===0x0&&_0x4ab14f===0x0&&_0x6013e4===0x0)return{'status':_0x3c7e02(0x19a),'allowGenerate':!![],'manualResolutionRequired':![],'message':_0x3c7e02(0x144)+_0x4ed840+_0x3c7e02(0x137),'nextAction':_0x3c7e02(0x190)};if(_0x378a77>0x1)return{'status':_0x3c7e02(0x1af),'allowGenerate':![],'manualResolutionRequired':!![],'message':'Dataset\x20\x22'+_0x4ed840+_0x3c7e02(0x16e),'nextAction':'manual_resolution_required'};if(_0x4ab14f>0x0)return{'status':'blocked_incomplete_sets','allowGenerate':![],'manualResolutionRequired':!![],'message':_0x3c7e02(0x144)+_0x4ed840+_0x3c7e02(0x183),'nextAction':_0x3c7e02(0x157)};if(_0x378a77===0x1&&_0x6013e4>0x0)return{'status':_0x3c7e02(0x1a4),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x3c7e02(0x144)+_0x4ed840+_0x3c7e02(0x14d),'nextAction':_0x3c7e02(0x157)};if(_0x378a77===0x1)return{'status':_0x54f0b3,'allowGenerate':![],'manualResolutionRequired':![],'message':_0x54f0b3==='generated_complete_set'?'Dataset\x20\x22'+_0x4ed840+_0x3c7e02(0x14e):_0x3c7e02(0x144)+_0x4ed840+_0x3c7e02(0x16d),'nextAction':_0x54f0b3===_0x3c7e02(0x19f)?undefined:_0x3c7e02(0x151)};return{'status':_0x3c7e02(0x13f),'allowGenerate':![],'manualResolutionRequired':![],'message':_0x3c7e02(0x144)+_0x4ed840+_0x3c7e02(0x12b),'nextAction':_0x3c7e02(0x1ad)};}export function assessGenerateOperationState(_0x46e306,_0x1f071e,_0x5b8b6b){const _0x111959=a159_0x4a3c,_0x1f5503=String(_0x1f071e||'')[_0x111959(0x1aa)]()[_0x111959(0x132)]();if(_0x1f5503===_0x111959(0x18c))return{'status':_0x111959(0x141),'manualResolutionRequired':![],'message':'Data\x20List\x20Page\x20generation\x20is\x20pending\x20for\x20dataset\x20\x22'+_0x46e306+'\x22.','nextAction':_0x111959(0x1ad)};if(_0x1f5503==='RUNNING'||_0x1f5503===_0x111959(0x14a)||_0x1f5503===_0x111959(0x181))return{'status':_0x111959(0x156),'manualResolutionRequired':![],'message':'Data\x20List\x20Page\x20generation\x20is\x20running\x20for\x20dataset\x20\x22'+_0x46e306+'\x22.','nextAction':_0x111959(0x1ad)};if(_0x1f5503==='SUCCESS'||_0x1f5503==='PARTIAL_SUCCESS'){if(!_0x5b8b6b)return{'status':_0x111959(0x13f),'manualResolutionRequired':![],'message':'Operation\x20finished\x20for\x20dataset\x20\x22'+_0x46e306+_0x111959(0x12c),'nextAction':_0x111959(0x1ad)};const _0x497d90=assessDataListPageState(_0x46e306,_0x5b8b6b,{'successStatus':_0x111959(0x19f)});if(_0x497d90[_0x111959(0x158)]===_0x111959(0x19a))return{'status':_0x111959(0x13f),'manualResolutionRequired':![],'message':_0x111959(0x188)+_0x46e306+_0x111959(0x1ae),'nextAction':_0x111959(0x1ad)};return _0x497d90;}if(_0x1f5503===_0x111959(0x134)||_0x1f5503===_0x111959(0x18b)||_0x1f5503==='')return{'status':'operation_failed','manualResolutionRequired':![],'message':_0x111959(0x1a3)+_0x46e306+'\x22.','nextAction':'query_operation_status'};return{'status':_0x111959(0x13f),'manualResolutionRequired':![],'message':_0x111959(0x144)+_0x46e306+_0x111959(0x173)+_0x1f5503+'\x22.','nextAction':_0x111959(0x1ad)};}export function normalizePageDetail(_0x1f5d50){const _0x25eec8=a159_0x4a3c;return{'pageId':Number(_0x1f5d50[_0x25eec8(0x167)]),'appCode':_0x1f5d50['appCode'],'name':_0x1f5d50[_0x25eec8(0x185)]||_0x25eec8(0x17a)+_0x1f5d50[_0x25eec8(0x167)],'code':_0x1f5d50[_0x25eec8(0x19e)]||'','type':_0x1f5d50[_0x25eec8(0x1a9)]?String(_0x1f5d50[_0x25eec8(0x1a9)]):_0x25eec8(0x178),'datasetIds':Array[_0x25eec8(0x142)](_0x1f5d50[_0x25eec8(0x1b3)])?_0x1f5d50[_0x25eec8(0x1b3)][_0x25eec8(0x15a)](_0x2598bf=>Number(_0x2598bf))[_0x25eec8(0x150)](_0x2cd529=>Number[_0x25eec8(0x14f)](_0x2cd529)):[],'pageVersion':_0x1f5d50[_0x25eec8(0x192)]&&typeof _0x1f5d50[_0x25eec8(0x192)]['pageVersion']===_0x25eec8(0x13a)?_0x1f5d50['config'][_0x25eec8(0x1b8)]:null,'versionTag':_0x1f5d50[_0x25eec8(0x192)]&&typeof _0x1f5d50[_0x25eec8(0x192)][_0x25eec8(0x148)]===_0x25eec8(0x136)&&_0x1f5d50['config'][_0x25eec8(0x148)][_0x25eec8(0x1aa)]()!==''?_0x1f5d50[_0x25eec8(0x192)][_0x25eec8(0x148)]:null,'relatedPages':normalizeRelatedPages(_0x1f5d50[_0x25eec8(0x15b)]),'raw':_0x1f5d50};}export function serializeDryRunDescription(_0x31a604){const _0xa6d0fd=a159_0x4a3c;return JSON[_0xa6d0fd(0x1a1)](_0x31a604,null,0x2);}export async function loadDataListPageStatusForGenerate(_0x2a1686,_0x3a1a7e){const _0x170f90=a159_0x4a3c,_0x2cb65d=await tryGetDataListPageStatus(_0x2a1686[_0x170f90(0x1b0)],_0x3a1a7e);if(!_0x2cb65d)return null;return normalizeDataListPageStatus(_0x2cb65d,_0x3a1a7e);}export function selectVersionTagGroup(_0x5ad49d,_0x3bffbe,_0x2eb34c){const _0x1a3e5b=a159_0x4a3c,_0x326279=new Map();for(const _0xfcdda3 of _0x5ad49d){const _0x3cbd05=normalizeVersionTag(_0x3bffbe(_0xfcdda3)),_0x26296a=_0x326279['get'](_0x3cbd05)??[];_0x26296a[_0x1a3e5b(0x197)](_0xfcdda3),_0x326279[_0x1a3e5b(0x168)](_0x3cbd05,_0x26296a);}const _0x32d70d=Array[_0x1a3e5b(0x135)](_0x326279[_0x1a3e5b(0x18f)]());if(_0x32d70d['length']<=0x1&&!_0x2eb34c)return{'items':_0x5ad49d,'availableTags':_0x32d70d};if(_0x2eb34c){const _0x1eb4e8=normalizeVersionTag(_0x2eb34c),_0x42d354=_0x326279[_0x1a3e5b(0x180)](_0x1eb4e8);if(!_0x42d354)throw CliErrors[_0x1a3e5b(0x1ac)](_0x1a3e5b(0x187)+_0x2eb34c+_0x1a3e5b(0x16f),buildVersionTagHint(_0x32d70d));return{'items':_0x42d354,'availableTags':_0x32d70d};}throw CliErrors['validation']('Multiple\x20page\x20groups\x20found\x20for\x20this\x20dataset.',buildVersionTagHint(_0x32d70d));}function normalizeDatasetDetail(_0x4347a8,_0x4e2e41){const _0xee2604=a159_0x4a3c,_0x5ce635=Array[_0xee2604(0x142)](_0x4347a8['fields'])?_0x4347a8[_0xee2604(0x15c)]:Array[_0xee2604(0x142)](_0x4347a8[_0xee2604(0x19d)])?_0x4347a8[_0xee2604(0x19d)]:[];return{'id':Number(_0x4347a8['id']??_0x4347a8[_0xee2604(0x1b5)]??0x0),'code':String(_0x4347a8[_0xee2604(0x19e)]||_0x4347a8['modelCode']||_0x4e2e41),'name':String(_0x4347a8[_0xee2604(0x185)]||_0x4e2e41),'appCode':_0x4347a8[_0xee2604(0x1b0)]||_0x4347a8[_0xee2604(0x17c)]?.[_0xee2604(0x1b0)],'fieldCount':_0x5ce635[_0xee2604(0x149)],'relatedPages':normalizeRelatedPages(_0x4347a8['relatedPageInfoList']),'raw':_0x4347a8};}function normalizeDataListPageStatus(_0x58361e,_0x154c7f){const _0x254236=a159_0x4a3c,_0x256314=_0x566824=>({'pageId':Number(_0x566824[_0x254236(0x167)]??_0x566824['id']??0x0),'title':String(_0x566824[_0x254236(0x15e)]||_0x566824[_0x254236(0x185)]||_0x254236(0x17a)+(_0x566824['pageId']??_0x566824['id']??_0x254236(0x153))),'type':_0x566824[_0x254236(0x1a9)]?String(_0x566824[_0x254236(0x1a9)]):'UNKNOWN','deleted':_0x566824[_0x254236(0x170)]===!![],'hasMenu':_0x566824[_0x254236(0x195)]===!![],'menuVisible':typeof _0x566824[_0x254236(0x13b)]===_0x254236(0x16b)?_0x566824[_0x254236(0x13b)]:null,'menuPath':typeof _0x566824[_0x254236(0x12d)]==='string'&&_0x566824[_0x254236(0x12d)]['trim']()!==''?_0x566824[_0x254236(0x12d)]:null}),_0x56b9a9=Array[_0x254236(0x142)](_0x58361e[_0x254236(0x18d)])?_0x58361e[_0x254236(0x18d)][_0x254236(0x15a)](_0x94f8c8=>({'versionTag':typeof _0x94f8c8[_0x254236(0x148)]==='string'&&_0x94f8c8[_0x254236(0x148)][_0x254236(0x1aa)]()!==''?_0x94f8c8[_0x254236(0x148)]:null,'complete':_0x94f8c8[_0x254236(0x1a0)]===!![],'pages':Array[_0x254236(0x142)](_0x94f8c8[_0x254236(0x13c)])?_0x94f8c8[_0x254236(0x13c)][_0x254236(0x15a)](_0x256314):[]})):[];return{'datasetId':typeof _0x58361e[_0x254236(0x1a7)]===_0x254236(0x13a)&&Number['isFinite'](_0x58361e['datasetId'])?_0x58361e[_0x254236(0x1a7)]:null,'datasetCode':typeof _0x58361e[_0x254236(0x147)]==='string'&&_0x58361e['datasetCode'][_0x254236(0x1aa)]()!==''?_0x58361e[_0x254236(0x147)]:_0x154c7f,'pageSets':_0x56b9a9,'totalSets':typeof _0x58361e[_0x254236(0x196)]==='number'&&Number[_0x254236(0x14f)](_0x58361e[_0x254236(0x196)])?_0x58361e[_0x254236(0x196)]:_0x56b9a9[_0x254236(0x149)],'completeSets':typeof _0x58361e['completeSets']==='number'&&Number[_0x254236(0x14f)](_0x58361e[_0x254236(0x165)])?_0x58361e[_0x254236(0x165)]:_0x56b9a9['filter'](_0x42657e=>_0x42657e['complete'])['length'],'incompleteSets':typeof _0x58361e[_0x254236(0x130)]==='number'&&Number['isFinite'](_0x58361e[_0x254236(0x130)])?_0x58361e[_0x254236(0x130)]:_0x56b9a9[_0x254236(0x150)](_0x3fbfb3=>!_0x3fbfb3[_0x254236(0x1a0)]&&_0x3fbfb3['pages']['length']>0x0)[_0x254236(0x149)],'residualPages':Array[_0x254236(0x142)](_0x58361e[_0x254236(0x140)])?_0x58361e[_0x254236(0x140)][_0x254236(0x15a)](_0x256314):[],'menuPages':Array[_0x254236(0x142)](_0x58361e[_0x254236(0x17e)])?_0x58361e[_0x254236(0x17e)]['map'](_0x256314):[],'source':'data-list-status'};}function normalizeRelatedPages(_0xbf728f){const _0x1fa95a=a159_0x4a3c;if(!Array[_0x1fa95a(0x142)](_0xbf728f))return[];return _0xbf728f[_0x1fa95a(0x150)](_0x4b5cce=>_0x4b5cce&&typeof _0x4b5cce===_0x1fa95a(0x171))['map'](_0x436940=>({'id':Number(_0x436940['id']),'type':_0x436940['type']?String(_0x436940['type']):'UNKNOWN','code':_0x436940[_0x1fa95a(0x19e)]||undefined,'title':_0x436940['title']||_0x436940[_0x1fa95a(0x185)]||'page-'+_0x436940['id'],'deleted':_0x436940[_0x1fa95a(0x170)]===!![]}))[_0x1fa95a(0x150)](_0x4cfe2c=>Number[_0x1fa95a(0x14f)](_0x4cfe2c['id']));}function ensureAppOwnership(_0x1cadd5,_0x5ed700,_0x54e251){const _0x39dc84=a159_0x4a3c;if(!_0x5ed700)return;if(_0x5ed700!==_0x1cadd5)throw CliErrors[_0x39dc84(0x1ac)](_0x54e251,_0x39dc84(0x172)+CLI_BIN_NAME+_0x39dc84(0x160));}function normalizeVersionTag(_0x4f4714){const _0x57d4f9=a159_0x4a3c;return _0x4f4714&&_0x4f4714[_0x57d4f9(0x1aa)]()!==''?_0x4f4714:_0x57d4f9(0x161);}function buildVersionTagHint(_0x2b9970){const _0x537753=a159_0x4a3c,_0x3fc306=_0x2b9970[_0x537753(0x15a)](_0x1fdc36=>_0x1fdc36===_0x537753(0x161)?_0x537753(0x199):_0x1fdc36)[_0x537753(0x1b1)](',\x20');return _0x537753(0x175)+_0x3fc306;}
1
+ (function(_0x43e9a6,_0x239297){const _0x289134=a164_0x1e2b,_0x2b6df2=_0x43e9a6();while(!![]){try{const _0x430656=-parseInt(_0x289134(0x188))/0x1*(-parseInt(_0x289134(0x16e))/0x2)+-parseInt(_0x289134(0x189))/0x3*(parseInt(_0x289134(0x1aa))/0x4)+parseInt(_0x289134(0x12d))/0x5*(-parseInt(_0x289134(0x15d))/0x6)+parseInt(_0x289134(0x151))/0x7*(-parseInt(_0x289134(0x128))/0x8)+parseInt(_0x289134(0x1a0))/0x9+parseInt(_0x289134(0x129))/0xa+parseInt(_0x289134(0x179))/0xb;if(_0x430656===_0x239297)break;else _0x2b6df2['push'](_0x2b6df2['shift']());}catch(_0x1927ea){_0x2b6df2['push'](_0x2b6df2['shift']());}}}(a164_0x3c50,0x97bda));import{randomUUID}from'node:crypto';import{CLI_BIN_NAME}from'../../constant/cli.js';import{getDatasetDetail,getPageDetail,tryGetDataListPageStatus}from'../../core/api-client.js';import{loadAliasMap,resolveAlias}from'../../core/alias-resolver.js';import{resolveApiFilePath}from'../../context.js';import{CliErrors}from'../../errors.js';export function getPageIdFlag(_0x18cfb5){const _0x4da571=a164_0x1e2b,_0x645def=_0x18cfb5[_0x4da571(0x127)]('id');if(typeof _0x645def===_0x4da571(0x159)&&Number[_0x4da571(0x185)](_0x645def)&&_0x645def>0x0)return _0x645def;return undefined;}export function validateDatasetSelector(_0x1eeede){const _0x244869=a164_0x1e2b,_0xa474f7=Boolean(_0x1eeede[_0x244869(0x161)](_0x244869(0x18b))),_0xe6302a=Boolean(_0x1eeede[_0x244869(0x161)](_0x244869(0x132)));if(_0xa474f7&&_0xe6302a)throw CliErrors[_0x244869(0x171)](_0x244869(0x12a));if(!_0xa474f7&&!_0xe6302a)throw CliErrors[_0x244869(0x171)]('One\x20of\x20--datasetcode\x20or\x20--alias\x20is\x20required.');}export function validateGenerateOperationSelector(_0x22ec16){const _0x4cd089=a164_0x1e2b,_0x3ab7dc=Boolean(_0x22ec16[_0x4cd089(0x161)]('task-id')),_0x179f65=Boolean(_0x22ec16['str'](_0x4cd089(0x148))),_0x1db7e5=Boolean(_0x22ec16[_0x4cd089(0x161)](_0x4cd089(0x19d))),_0x537d4d=[_0x3ab7dc,_0x179f65,_0x1db7e5][_0x4cd089(0x13a)](Boolean)[_0x4cd089(0x14d)];if(_0x537d4d>0x1)throw CliErrors[_0x4cd089(0x171)](_0x4cd089(0x144));if(_0x537d4d===0x0)throw CliErrors[_0x4cd089(0x171)](_0x4cd089(0x13c));}export function validatePageTargetSelector(_0x3390dc){const _0x3e531f=a164_0x1e2b,_0x4ecda3=getPageIdFlag(_0x3390dc)!==undefined,_0x1b040e=Boolean(_0x3390dc[_0x3e531f(0x161)](_0x3e531f(0x18b))||_0x3390dc[_0x3e531f(0x161)]('alias'));if(_0x4ecda3&&_0x1b040e)throw CliErrors[_0x3e531f(0x171)](_0x3e531f(0x13d));if(!_0x4ecda3&&!_0x1b040e)throw CliErrors['validation']('One\x20of\x20--id\x20or\x20--datasetcode/--alias\x20is\x20required.');if(_0x3390dc[_0x3e531f(0x161)](_0x3e531f(0x14b))&&!_0x1b040e)throw CliErrors[_0x3e531f(0x171)](_0x3e531f(0x15a));}export function resolveDatasetCode(_0x183b54){const _0x24307d=a164_0x1e2b;validateDatasetSelector(_0x183b54);const _0x15e92a=_0x183b54[_0x24307d(0x161)](_0x24307d(0x18b));if(_0x15e92a)return _0x15e92a;const _0x3d8fbd=_0x183b54[_0x24307d(0x161)](_0x24307d(0x132)),_0x9be752=resolveApiFilePath(_0x183b54['apiDir'],_0x183b54[_0x24307d(0x136)]),_0x2ecbe9=resolveAlias(_0x183b54[_0x24307d(0x165)],_0x3d8fbd,undefined,_0x9be752);if(_0x2ecbe9)return _0x2ecbe9;const _0x140299=loadAliasMap(_0x183b54[_0x24307d(0x165)],undefined,_0x9be752),_0x409904=_0x140299[_0x24307d(0x14d)]>0x0?'Available\x20aliases:\x20'+_0x140299[_0x24307d(0x19e)](_0xd6e836=>_0xd6e836[_0x24307d(0x132)])[_0x24307d(0x130)](',\x20'):_0x24307d(0x17e)+CLI_BIN_NAME+_0x24307d(0x17d);throw CliErrors[_0x24307d(0x171)](_0x24307d(0x18d)+_0x3d8fbd+'\x22\x20not\x20found.\x20'+_0x409904);}export async function loadDatasetDetailForPage(_0x41e529){const _0x49514a=a164_0x1e2b,_0x479f28=resolveDatasetCode(_0x41e529),_0x3a9b3f=await getDatasetDetail(_0x479f28),_0x432255=normalizeDatasetDetail(_0x3a9b3f,_0x479f28);return ensureAppOwnership(_0x41e529[_0x49514a(0x136)],_0x432255[_0x49514a(0x136)],_0x49514a(0x154)+_0x432255['code']+_0x49514a(0x166)+_0x432255[_0x49514a(0x136)]+_0x49514a(0x12b)+_0x41e529[_0x49514a(0x136)]+'\x22.'),_0x432255;}export async function loadPageDetailForPage(_0x3d64a0,_0x6282bd){const _0x4e454b=a164_0x1e2b,_0x1e510c=await getPageDetail(_0x6282bd),_0x4d7efa=normalizePageDetail(_0x1e510c);return ensureAppOwnership(_0x3d64a0[_0x4e454b(0x136)],_0x4d7efa['appCode'],_0x4e454b(0x181)+_0x6282bd+'\x22\x20belongs\x20to\x20app\x20\x22'+_0x4d7efa['appCode']+_0x4e454b(0x12b)+_0x3d64a0['appCode']+'\x22.'),_0x4d7efa;}export function getUndeletedRelatedPages(_0x1b2aa2){const _0x1a5a92=a164_0x1e2b;return _0x1b2aa2[_0x1a5a92(0x155)][_0x1a5a92(0x13a)](_0x45f0d5=>!_0x45f0d5['deleted']);}function a164_0x3c50(){const _0xff2641=['push','__EMPTY__','operation-id','Data\x20List\x20Page\x20generation\x20failed\x20for\x20dataset\x20\x22','`\x20first,\x20then\x20poll\x20`','version-tag','pageId','length','keys','totalSets','\x20--operation-id\x20','191338ZWMlht','Version\x20tag\x20\x22','datasetId','Dataset\x20\x22','relatedPages','Operation\x20finished\x20for\x20dataset\x20\x22','sync','successStatus','number','--version-tag\x20is\x20only\x20supported\x20with\x20--datasetcode\x20or\x20--alias.','SUCCESS','PENDING','107934gdLKiD','\x20--format\x20json','page-','type','str','RETRYING','\x22\x20now\x20has\x20one\x20complete\x20Data\x20List\x20Page\x20set.','query_operation_status','apiDir','\x22\x20belongs\x20to\x20app\x20\x22','\x22\x20has\x20undeleted\x20related\x20pages\x20under\x20legacy\x20fallback\x20precheck.','Data\x20List\x20Page\x20generation\x20is\x20running\x20for\x20dataset\x20\x22','relatedPageInfoList','menuPages','completeSets','\x22\x20has\x20no\x20undeleted\x20related\x20pages.','datasetIds','12DIigXS','already_exists_complete_set','\x22\x20already\x20has\x20undeleted\x20related\x20pages.','validation','Query\x20the\x20page\x20facts\x20first\x20and\x20resolve\x20manually\x20before\x20retrying\x20generate.','\x22\x20returned\x20unsupported\x20operation\x20status\x20\x22','run_generate_start','\x22\x20has\x20one\x20complete\x20set\x20plus\x20residual\x20pages.','\x22\x20not\x20found.','\x20page\x20sync\x20--datasetcode\x20','manual_resolution_required','1587245KrtoJH','unknown_reconcile_failed','no_data_list_pages_found','from','\x20api\x20pull`\x20first,\x20or\x20pass\x20--datasetcode\x20directly.','Run\x20`','fallbackUndeletedPages','blocked_incomplete_sets','Page\x20\x22','Use\x20`--version-tag\x20<tag>`.\x20Available\x20groups:\x20','data-list-status','taskId','isFinite','\x20page\x20generate-start\x20--datasetcode\x20','menuPath','6621RmxGXb','96027RczGPB','boolean','datasetcode','incompleteSets','Alias\x20\x22','code','residualPages','pageVersion','trim','generated_complete_set','deleted','Switch\x20app\x20with\x20`','config','get','\x22\x20has\x20no\x20Data\x20List\x20Pages\x20yet.','\x20--appcode\x20','pageSets','\x22\x20returned\x20an\x20unsupported\x20Data\x20List\x20Page\x20state.','clientOperationId','\x20workspace\x20use\x20--app\x20<name>`\x20or\x20pass\x20--appcode.','client-operation-id','map','pages','3988359iEjbes','string','\x20--task-id\x20','title','\x22,\x20but\x20no\x20Data\x20List\x20Pages\x20were\x20found\x20during\x20reconcile.','status','menuVisible','FAILED','name','CANCELING','44hFXXJx','complete','\x22\x20has\x20incomplete\x20Data\x20List\x20Page\x20sets.','flag','216XpnaXP','11384420dAvfos','Use\x20either\x20--datasetcode\x20or\x20--alias,\x20not\x20both.','\x22,\x20not\x20current\x20app\x20\x22','blocked_complete_plus_residual_sets','15OteMhq','UNKNOWN','\x20--operation-id\x20<id>`\x20until\x20it\x20reaches\x20a\x20terminal\x20state.','join','\x20page\x20generate-status\x20--datasetcode\x20','alias','Multiple\x20page\x20groups\x20found\x20for\x20this\x20dataset.','isArray','object','appCode','properties','hasMenu','datasetCode','filter','RUNNING','One\x20of\x20--task-id,\x20--operation-id,\x20or\x20--client-operation-id\x20is\x20required.','Use\x20either\x20--id\x20or\x20--datasetcode/--alias,\x20not\x20both.','page-generate-','`\x20instead.','\x22\x20has\x20multiple\x20complete\x20Data\x20List\x20Page\x20sets.','modelCode','unknown','versionTag','Use\x20exactly\x20one\x20of\x20--task-id,\x20--operation-id,\x20or\x20--client-operation-id.','Data\x20List\x20Page\x20generation\x20is\x20pending\x20for\x20dataset\x20\x22'];a164_0x3c50=function(){return _0xff2641;};return a164_0x3c50();}export function buildPageGenerateOperationStatusQueryCommand(_0x3fc295,_0x2431e5){const _0x5873dd=a164_0x1e2b,_0x4a47e8=_0x2431e5?.[_0x5873dd(0x136)]&&_0x2431e5[_0x5873dd(0x136)][_0x5873dd(0x191)]()!==''?_0x5873dd(0x198)+_0x2431e5[_0x5873dd(0x136)]:'',_0x412518=_0x2431e5?.[_0x5873dd(0x184)]&&_0x2431e5[_0x5873dd(0x184)]['trim']()!==''?_0x5873dd(0x1a2)+_0x2431e5[_0x5873dd(0x184)]:_0x2431e5?.['operationId']&&_0x2431e5['operationId']['trim']()!==''?_0x5873dd(0x150)+_0x2431e5['operationId']:_0x2431e5?.['clientOperationId']&&_0x2431e5[_0x5873dd(0x19b)][_0x5873dd(0x191)]()!==''?'\x20--client-operation-id\x20'+_0x2431e5[_0x5873dd(0x19b)]:'';return CLI_BIN_NAME+_0x5873dd(0x131)+_0x3fc295+_0x4a47e8+_0x412518+_0x5873dd(0x15e);}export function createPageGenerateClientOperationId(){const _0x34ae8b=a164_0x1e2b;return _0x34ae8b(0x13e)+randomUUID();}export function buildDataListPageStatusQueryCommand(_0x1e8bb8,_0x209176){const _0x448650=a164_0x1e2b,_0x400e5a=_0x209176&&_0x209176['trim']()!==''?_0x448650(0x198)+_0x209176:'';return CLI_BIN_NAME+'\x20page\x20data-list-status\x20--datasetcode\x20'+_0x1e8bb8+_0x400e5a+'\x20--format\x20json';}export function prepareDatasetAction(_0x3b6f42,_0x3c7340){const _0x3d944e=a164_0x1e2b,_0x352803=getUndeletedRelatedPages(_0x3b6f42);if(_0x3c7340==='generate'&&_0x352803[_0x3d944e(0x14d)]>0x0)throw CliErrors[_0x3d944e(0x171)](_0x3d944e(0x154)+_0x3b6f42[_0x3d944e(0x18e)]+_0x3d944e(0x170),_0x3d944e(0x17e)+CLI_BIN_NAME+_0x3d944e(0x177)+_0x3b6f42[_0x3d944e(0x18e)]+_0x3d944e(0x13f));if(_0x3c7340===_0x3d944e(0x157)&&_0x352803[_0x3d944e(0x14d)]===0x0)throw CliErrors[_0x3d944e(0x171)](_0x3d944e(0x154)+_0x3b6f42[_0x3d944e(0x18e)]+_0x3d944e(0x16c),_0x3d944e(0x17e)+CLI_BIN_NAME+_0x3d944e(0x186)+_0x3b6f42[_0x3d944e(0x18e)]+_0x3d944e(0x14a)+CLI_BIN_NAME+_0x3d944e(0x131)+_0x3b6f42['code']+_0x3d944e(0x12f));return{'dataset':_0x3b6f42,'undeletedPages':_0x352803};}export function prepareGenerateDatasetAction(_0x17c561,_0x4b951e){const _0x1f60b4=a164_0x1e2b,_0x5d0f9d=getUndeletedRelatedPages(_0x17c561);if(!_0x4b951e){if(_0x5d0f9d[_0x1f60b4(0x14d)]>0x0)throw CliErrors[_0x1f60b4(0x171)](_0x1f60b4(0x154)+_0x17c561[_0x1f60b4(0x18e)]+_0x1f60b4(0x170),_0x1f60b4(0x17e)+CLI_BIN_NAME+_0x1f60b4(0x177)+_0x17c561[_0x1f60b4(0x18e)]+'`\x20instead.');return{'dataset':_0x17c561,'undeletedPages':_0x5d0f9d,'dataListPageStatus':null};}const _0x5a071c=_0x4b951e[_0x1f60b4(0x16b)],_0x4f95bc=_0x4b951e[_0x1f60b4(0x18c)],_0x2a54e5=_0x4b951e[_0x1f60b4(0x18f)][_0x1f60b4(0x14d)];if(_0x5a071c===0x0&&_0x4f95bc===0x0&&_0x2a54e5===0x0)return{'dataset':_0x17c561,'undeletedPages':_0x5d0f9d,'dataListPageStatus':_0x4b951e};if(_0x5a071c===0x1&&_0x4f95bc===0x0&&_0x2a54e5===0x0)throw CliErrors['validation'](_0x1f60b4(0x154)+_0x17c561['code']+'\x22\x20already\x20has\x20one\x20complete\x20Data\x20List\x20Page\x20set.',_0x1f60b4(0x17e)+CLI_BIN_NAME+'\x20page\x20sync\x20--datasetcode\x20'+_0x17c561[_0x1f60b4(0x18e)]+'`\x20instead.');throw CliErrors[_0x1f60b4(0x171)](_0x1f60b4(0x154)+_0x17c561['code']+'\x22\x20has\x20multiple\x20or\x20incomplete\x20Data\x20List\x20Page\x20sets.',_0x1f60b4(0x172));}export function assessDataListPageState(_0x64688,_0x2c2df9,_0x1229d0){const _0x58eebb=a164_0x1e2b,_0x25df65=_0x1229d0?.[_0x58eebb(0x158)]??_0x58eebb(0x16f),_0xeb740e=_0x1229d0?.[_0x58eebb(0x17f)]??[];if(!_0x2c2df9){if(_0xeb740e['length']>0x0)return{'status':_0x58eebb(0x180),'allowGenerate':![],'manualResolutionRequired':!![],'message':'Dataset\x20\x22'+_0x64688+_0x58eebb(0x167),'nextAction':_0x58eebb(0x178)};return{'status':'no_data_list_pages_found','allowGenerate':!![],'manualResolutionRequired':![],'message':_0x58eebb(0x154)+_0x64688+_0x58eebb(0x197),'nextAction':_0x58eebb(0x174)};}const _0x3fea93=_0x2c2df9[_0x58eebb(0x16b)],_0x325869=_0x2c2df9[_0x58eebb(0x18c)],_0x1cb899=_0x2c2df9[_0x58eebb(0x18f)][_0x58eebb(0x14d)];if(_0x3fea93===0x0&&_0x325869===0x0&&_0x1cb899===0x0)return{'status':_0x58eebb(0x17b),'allowGenerate':!![],'manualResolutionRequired':![],'message':_0x58eebb(0x154)+_0x64688+_0x58eebb(0x197),'nextAction':'run_generate_start'};if(_0x3fea93>0x1)return{'status':'blocked_multiple_complete_sets','allowGenerate':![],'manualResolutionRequired':!![],'message':_0x58eebb(0x154)+_0x64688+_0x58eebb(0x140),'nextAction':'manual_resolution_required'};if(_0x325869>0x0)return{'status':'blocked_incomplete_sets','allowGenerate':![],'manualResolutionRequired':!![],'message':_0x58eebb(0x154)+_0x64688+_0x58eebb(0x1ac),'nextAction':_0x58eebb(0x178)};if(_0x3fea93===0x1&&_0x1cb899>0x0)return{'status':_0x58eebb(0x12c),'allowGenerate':![],'manualResolutionRequired':!![],'message':_0x58eebb(0x154)+_0x64688+_0x58eebb(0x175),'nextAction':_0x58eebb(0x178)};if(_0x3fea93===0x1)return{'status':_0x25df65,'allowGenerate':![],'manualResolutionRequired':![],'message':_0x25df65===_0x58eebb(0x192)?_0x58eebb(0x154)+_0x64688+_0x58eebb(0x163):'Dataset\x20\x22'+_0x64688+'\x22\x20already\x20has\x20one\x20complete\x20Data\x20List\x20Page\x20set.','nextAction':_0x25df65==='generated_complete_set'?undefined:'run_sync'};return{'status':_0x58eebb(0x17a),'allowGenerate':![],'manualResolutionRequired':![],'message':_0x58eebb(0x154)+_0x64688+_0x58eebb(0x19a),'nextAction':_0x58eebb(0x164)};}export function assessGenerateOperationState(_0xb30749,_0x12fdd2,_0x8662de){const _0x37873e=a164_0x1e2b,_0x4ff317=String(_0x12fdd2||'')['trim']()['toUpperCase']();if(_0x4ff317===_0x37873e(0x15c))return{'status':'operation_pending','manualResolutionRequired':![],'message':_0x37873e(0x145)+_0xb30749+'\x22.','nextAction':'query_operation_status'};if(_0x4ff317===_0x37873e(0x13b)||_0x4ff317===_0x37873e(0x162)||_0x4ff317===_0x37873e(0x1a9))return{'status':'operation_running','manualResolutionRequired':![],'message':_0x37873e(0x168)+_0xb30749+'\x22.','nextAction':_0x37873e(0x164)};if(_0x4ff317===_0x37873e(0x15b)||_0x4ff317==='PARTIAL_SUCCESS'){if(!_0x8662de)return{'status':_0x37873e(0x17a),'manualResolutionRequired':![],'message':'Operation\x20finished\x20for\x20dataset\x20\x22'+_0xb30749+'\x22,\x20but\x20Data\x20List\x20Page\x20facts\x20are\x20unavailable.','nextAction':'query_operation_status'};const _0x529af3=assessDataListPageState(_0xb30749,_0x8662de,{'successStatus':_0x37873e(0x192)});if(_0x529af3[_0x37873e(0x1a5)]===_0x37873e(0x17b))return{'status':'unknown_reconcile_failed','manualResolutionRequired':![],'message':_0x37873e(0x156)+_0xb30749+_0x37873e(0x1a4),'nextAction':'query_operation_status'};return _0x529af3;}if(_0x4ff317===_0x37873e(0x1a7)||_0x4ff317==='CANCELLED'||_0x4ff317==='')return{'status':'operation_failed','manualResolutionRequired':![],'message':_0x37873e(0x149)+_0xb30749+'\x22.','nextAction':_0x37873e(0x164)};return{'status':_0x37873e(0x17a),'manualResolutionRequired':![],'message':'Dataset\x20\x22'+_0xb30749+_0x37873e(0x173)+_0x4ff317+'\x22.','nextAction':_0x37873e(0x164)};}export function normalizePageDetail(_0x31222e){const _0x2720ab=a164_0x1e2b;return{'pageId':Number(_0x31222e['pageId']),'appCode':_0x31222e[_0x2720ab(0x136)],'name':_0x31222e[_0x2720ab(0x1a8)]||'page-'+_0x31222e['pageId'],'code':_0x31222e['code']||'','type':_0x31222e['type']?String(_0x31222e[_0x2720ab(0x160)]):'UNKNOWN','datasetIds':Array['isArray'](_0x31222e[_0x2720ab(0x16d)])?_0x31222e[_0x2720ab(0x16d)][_0x2720ab(0x19e)](_0x2e92c1=>Number(_0x2e92c1))[_0x2720ab(0x13a)](_0x88b47f=>Number[_0x2720ab(0x185)](_0x88b47f)):[],'pageVersion':_0x31222e[_0x2720ab(0x195)]&&typeof _0x31222e[_0x2720ab(0x195)][_0x2720ab(0x190)]===_0x2720ab(0x159)?_0x31222e[_0x2720ab(0x195)][_0x2720ab(0x190)]:null,'versionTag':_0x31222e[_0x2720ab(0x195)]&&typeof _0x31222e[_0x2720ab(0x195)][_0x2720ab(0x143)]===_0x2720ab(0x1a1)&&_0x31222e[_0x2720ab(0x195)][_0x2720ab(0x143)][_0x2720ab(0x191)]()!==''?_0x31222e[_0x2720ab(0x195)][_0x2720ab(0x143)]:null,'relatedPages':normalizeRelatedPages(_0x31222e[_0x2720ab(0x169)]),'raw':_0x31222e};}function a164_0x1e2b(_0x56a2ea,_0x501876){_0x56a2ea=_0x56a2ea-0x127;const _0x3c50a9=a164_0x3c50();let _0x1e2b78=_0x3c50a9[_0x56a2ea];return _0x1e2b78;}export function serializeDryRunDescription(_0x833c9a){return JSON['stringify'](_0x833c9a,null,0x2);}export async function loadDataListPageStatusForGenerate(_0x576deb,_0x4e7b21){const _0x36fe13=await tryGetDataListPageStatus(_0x576deb['appCode'],_0x4e7b21);if(!_0x36fe13)return null;return normalizeDataListPageStatus(_0x36fe13,_0x4e7b21);}export function selectVersionTagGroup(_0xf24cfb,_0x38cd0f,_0x4b1d03){const _0x4fb5ad=a164_0x1e2b,_0xe16ec1=new Map();for(const _0x69f903 of _0xf24cfb){const _0x1190d3=normalizeVersionTag(_0x38cd0f(_0x69f903)),_0x3168c1=_0xe16ec1[_0x4fb5ad(0x196)](_0x1190d3)??[];_0x3168c1[_0x4fb5ad(0x146)](_0x69f903),_0xe16ec1['set'](_0x1190d3,_0x3168c1);}const _0x47814c=Array[_0x4fb5ad(0x17c)](_0xe16ec1[_0x4fb5ad(0x14e)]());if(_0x47814c[_0x4fb5ad(0x14d)]<=0x1&&!_0x4b1d03)return{'items':_0xf24cfb,'availableTags':_0x47814c};if(_0x4b1d03){const _0x46d56d=normalizeVersionTag(_0x4b1d03),_0x4a5195=_0xe16ec1[_0x4fb5ad(0x196)](_0x46d56d);if(!_0x4a5195)throw CliErrors[_0x4fb5ad(0x171)](_0x4fb5ad(0x152)+_0x4b1d03+_0x4fb5ad(0x176),buildVersionTagHint(_0x47814c));return{'items':_0x4a5195,'availableTags':_0x47814c};}throw CliErrors['validation'](_0x4fb5ad(0x133),buildVersionTagHint(_0x47814c));}function normalizeDatasetDetail(_0x1f4262,_0xb9b8d){const _0x11057a=a164_0x1e2b,_0x11b696=Array[_0x11057a(0x134)](_0x1f4262['fields'])?_0x1f4262['fields']:Array['isArray'](_0x1f4262[_0x11057a(0x137)])?_0x1f4262['properties']:[];return{'id':Number(_0x1f4262['id']??_0x1f4262['modelId']??0x0),'code':String(_0x1f4262[_0x11057a(0x18e)]||_0x1f4262[_0x11057a(0x141)]||_0xb9b8d),'name':String(_0x1f4262[_0x11057a(0x1a8)]||_0xb9b8d),'appCode':_0x1f4262[_0x11057a(0x136)]||_0x1f4262['dataset']?.[_0x11057a(0x136)],'fieldCount':_0x11b696[_0x11057a(0x14d)],'relatedPages':normalizeRelatedPages(_0x1f4262[_0x11057a(0x169)]),'raw':_0x1f4262};}function normalizeDataListPageStatus(_0x3350d4,_0x37fbdf){const _0x491774=a164_0x1e2b,_0x28787c=_0x29367f=>({'pageId':Number(_0x29367f[_0x491774(0x14c)]??_0x29367f['id']??0x0),'title':String(_0x29367f['title']||_0x29367f[_0x491774(0x1a8)]||_0x491774(0x15f)+(_0x29367f['pageId']??_0x29367f['id']??_0x491774(0x142))),'type':_0x29367f[_0x491774(0x160)]?String(_0x29367f[_0x491774(0x160)]):_0x491774(0x12e),'deleted':_0x29367f[_0x491774(0x193)]===!![],'hasMenu':_0x29367f[_0x491774(0x138)]===!![],'menuVisible':typeof _0x29367f[_0x491774(0x1a6)]===_0x491774(0x18a)?_0x29367f['menuVisible']:null,'menuPath':typeof _0x29367f[_0x491774(0x187)]===_0x491774(0x1a1)&&_0x29367f[_0x491774(0x187)][_0x491774(0x191)]()!==''?_0x29367f['menuPath']:null}),_0x2967c7=Array[_0x491774(0x134)](_0x3350d4[_0x491774(0x199)])?_0x3350d4[_0x491774(0x199)][_0x491774(0x19e)](_0x20c7c8=>({'versionTag':typeof _0x20c7c8[_0x491774(0x143)]===_0x491774(0x1a1)&&_0x20c7c8['versionTag'][_0x491774(0x191)]()!==''?_0x20c7c8[_0x491774(0x143)]:null,'complete':_0x20c7c8[_0x491774(0x1ab)]===!![],'pages':Array[_0x491774(0x134)](_0x20c7c8[_0x491774(0x19f)])?_0x20c7c8[_0x491774(0x19f)][_0x491774(0x19e)](_0x28787c):[]})):[];return{'datasetId':typeof _0x3350d4[_0x491774(0x153)]===_0x491774(0x159)&&Number[_0x491774(0x185)](_0x3350d4[_0x491774(0x153)])?_0x3350d4[_0x491774(0x153)]:null,'datasetCode':typeof _0x3350d4[_0x491774(0x139)]===_0x491774(0x1a1)&&_0x3350d4[_0x491774(0x139)][_0x491774(0x191)]()!==''?_0x3350d4[_0x491774(0x139)]:_0x37fbdf,'pageSets':_0x2967c7,'totalSets':typeof _0x3350d4[_0x491774(0x14f)]===_0x491774(0x159)&&Number[_0x491774(0x185)](_0x3350d4[_0x491774(0x14f)])?_0x3350d4['totalSets']:_0x2967c7[_0x491774(0x14d)],'completeSets':typeof _0x3350d4[_0x491774(0x16b)]===_0x491774(0x159)&&Number['isFinite'](_0x3350d4[_0x491774(0x16b)])?_0x3350d4['completeSets']:_0x2967c7[_0x491774(0x13a)](_0x2e983b=>_0x2e983b[_0x491774(0x1ab)])[_0x491774(0x14d)],'incompleteSets':typeof _0x3350d4['incompleteSets']==='number'&&Number[_0x491774(0x185)](_0x3350d4['incompleteSets'])?_0x3350d4['incompleteSets']:_0x2967c7['filter'](_0x1e1f69=>!_0x1e1f69['complete']&&_0x1e1f69['pages']['length']>0x0)[_0x491774(0x14d)],'residualPages':Array['isArray'](_0x3350d4[_0x491774(0x18f)])?_0x3350d4[_0x491774(0x18f)][_0x491774(0x19e)](_0x28787c):[],'menuPages':Array['isArray'](_0x3350d4[_0x491774(0x16a)])?_0x3350d4[_0x491774(0x16a)][_0x491774(0x19e)](_0x28787c):[],'source':_0x491774(0x183)};}function normalizeRelatedPages(_0x94f8a7){const _0x47baa6=a164_0x1e2b;if(!Array['isArray'](_0x94f8a7))return[];return _0x94f8a7['filter'](_0x2e4cdc=>_0x2e4cdc&&typeof _0x2e4cdc===_0x47baa6(0x135))['map'](_0x203f08=>({'id':Number(_0x203f08['id']),'type':_0x203f08[_0x47baa6(0x160)]?String(_0x203f08['type']):_0x47baa6(0x12e),'code':_0x203f08[_0x47baa6(0x18e)]||undefined,'title':_0x203f08[_0x47baa6(0x1a3)]||_0x203f08[_0x47baa6(0x1a8)]||_0x47baa6(0x15f)+_0x203f08['id'],'deleted':_0x203f08[_0x47baa6(0x193)]===!![]}))['filter'](_0xad0ce2=>Number['isFinite'](_0xad0ce2['id']));}function ensureAppOwnership(_0x48db39,_0x4f660e,_0x523bf6){const _0x543b3b=a164_0x1e2b;if(!_0x4f660e)return;if(_0x4f660e!==_0x48db39)throw CliErrors[_0x543b3b(0x171)](_0x523bf6,_0x543b3b(0x194)+CLI_BIN_NAME+_0x543b3b(0x19c));}function normalizeVersionTag(_0x35cd4c){const _0xc7962c=a164_0x1e2b;return _0x35cd4c&&_0x35cd4c[_0xc7962c(0x191)]()!==''?_0x35cd4c:_0xc7962c(0x147);}function buildVersionTagHint(_0x3caaf9){const _0x80684c=a164_0x1e2b,_0x589015=_0x3caaf9[_0x80684c(0x19e)](_0x54ae14=>_0x54ae14===_0x80684c(0x147)?'<empty>':_0x54ae14)[_0x80684c(0x130)](',\x20');return _0x80684c(0x182)+_0x589015;}
@@ -1 +1 @@
1
- function a160_0x1ebe(){const _0x3b9516=['write','/smartapi/lovrabet/dataset/','code','4TOhGgq','7086dthEno','appCode','dataset','5803407nWZulo','\x20undeleted\x20related\x20page(s)\x20found','Some\x20pages\x20failed\x20to\x20sync','length','554185BdihHV','1536424RmygAe','string','7RklqBD','4967432VQoNCD','680wWPODR','2388630pDTiKJ','fieldCount','sync','/sync-to-pages','compress','isArray','Sync\x20succeeded','page','2430003efAAoS','failedPages'];a160_0x1ebe=function(){return _0x3b9516;};return a160_0x1ebe();}const a160_0x396d05=a160_0x9b34;(function(_0x1deaaa,_0x28c747){const _0x396921=a160_0x9b34,_0x4e7fe8=_0x1deaaa();while(!![]){try{const _0x33dc20=parseInt(_0x396921(0x7f))/0x1+parseInt(_0x396921(0x80))/0x2+parseInt(_0x396921(0x8d))/0x3*(-parseInt(_0x396921(0x92))/0x4)+parseInt(_0x396921(0x84))/0x5*(parseInt(_0x396921(0x93))/0x6)+-parseInt(_0x396921(0x82))/0x7*(-parseInt(_0x396921(0x83))/0x8)+-parseInt(_0x396921(0x96))/0x9+-parseInt(_0x396921(0x85))/0xa;if(_0x33dc20===_0x28c747)break;else _0x4e7fe8['push'](_0x4e7fe8['shift']());}catch(_0x2161aa){_0x4e7fe8['push'](_0x4e7fe8['shift']());}}}(a160_0x1ebe,0x6428f));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a160_0x9b34(_0x2e379a,_0x313c72){_0x2e379a=_0x2e379a-0x7d;const _0x1ebe85=a160_0x1ebe();let _0x9b345c=_0x1ebe85[_0x2e379a];return _0x9b345c;}import{loadDatasetDetailForPage,prepareDatasetAction,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{syncDataListPages}from'../../core/api-client.js';export const pageSync={'service':a160_0x396d05(0x8c),'command':a160_0x396d05(0x87),'description':'Sync\x20dataset\x20changes\x20to\x20related\x20Data\x20List\x20Pages','risk':a160_0x396d05(0x8f),'defaultOutputFormat':a160_0x396d05(0x89),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a160_0x396d05(0x81),'description':'Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)'}],async 'validate'(_0x2481f6){validateDatasetSelector(_0x2481f6);},async 'dryRun'(_0x3dfa20){const _0x471dd9=a160_0x396d05,_0x4bdf31=await prepare(_0x3dfa20);return{'method':'POST','url':_0x471dd9(0x90)+_0x4bdf31[_0x471dd9(0x95)][_0x471dd9(0x91)]+_0x471dd9(0x88),'body':{'appCode':_0x3dfa20[_0x471dd9(0x94)]},'description':serializeDryRunDescription({'dataset':{'id':_0x4bdf31[_0x471dd9(0x95)]['id'],'code':_0x4bdf31['dataset'][_0x471dd9(0x91)],'name':_0x4bdf31[_0x471dd9(0x95)]['name'],'fieldCount':_0x4bdf31[_0x471dd9(0x95)][_0x471dd9(0x86)]},'relatedPages':{'total':_0x4bdf31[_0x471dd9(0x95)]['relatedPages'][_0x471dd9(0x7e)],'undeletedCount':_0x4bdf31['undeletedPages'][_0x471dd9(0x7e)]},'action':_0x471dd9(0x87),'reason':_0x4bdf31['undeletedPages'][_0x471dd9(0x7e)]+_0x471dd9(0x97)})};},async 'execute'(_0x466679){const _0x40379e=a160_0x396d05,_0x5e1dc6=await prepare(_0x466679),_0x491314=await syncDataListPages(_0x466679[_0x40379e(0x94)],_0x5e1dc6[_0x40379e(0x95)][_0x40379e(0x91)]),_0x2bb4de=Array[_0x40379e(0x8a)](_0x491314[_0x40379e(0x8e)])&&_0x491314['failedPages'][_0x40379e(0x7e)]>0x0,_0x4112d5=_0x2bb4de?_0x40379e(0x7d):_0x40379e(0x8b);return{'ok':!![],'message':_0x4112d5,'data':{'datasetCode':_0x5e1dc6[_0x40379e(0x95)][_0x40379e(0x91)],..._0x491314}};}};async function prepare(_0x51e157){const _0x42bf2=a160_0x396d05,_0xbde830=await loadDatasetDetailForPage(_0x51e157);return prepareDatasetAction(_0xbde830,_0x42bf2(0x87));}
1
+ const a165_0x845e46=a165_0x4ca6;(function(_0x56329a,_0x437536){const _0x3c37b3=a165_0x4ca6,_0x36fe08=_0x56329a();while(!![]){try{const _0x3c19f4=-parseInt(_0x3c37b3(0x1a0))/0x1+-parseInt(_0x3c37b3(0x1a4))/0x2*(parseInt(_0x3c37b3(0x1b2))/0x3)+-parseInt(_0x3c37b3(0x1af))/0x4+-parseInt(_0x3c37b3(0x1b6))/0x5+parseInt(_0x3c37b3(0x1ab))/0x6+parseInt(_0x3c37b3(0x1b8))/0x7*(parseInt(_0x3c37b3(0x1b7))/0x8)+parseInt(_0x3c37b3(0x1b1))/0x9;if(_0x3c19f4===_0x437536)break;else _0x36fe08['push'](_0x36fe08['shift']());}catch(_0x2d74cb){_0x36fe08['push'](_0x36fe08['shift']());}}}(a165_0x56be,0x3ae13));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a165_0x4ca6(_0x2cdfa7,_0x2ad550){_0x2cdfa7=_0x2cdfa7-0x19d;const _0x56bee3=a165_0x56be();let _0x4ca688=_0x56bee3[_0x2cdfa7];return _0x4ca688;}import{loadDatasetDetailForPage,prepareDatasetAction,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{syncDataListPages}from'../../core/api-client.js';export const pageSync={'service':a165_0x845e46(0x1b4),'command':a165_0x845e46(0x1a3),'description':a165_0x845e46(0x1ba),'risk':a165_0x845e46(0x1a5),'defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a165_0x845e46(0x19d),'type':a165_0x845e46(0x1aa),'description':a165_0x845e46(0x1ac)}],async 'validate'(_0x2baa7f){validateDatasetSelector(_0x2baa7f);},async 'dryRun'(_0x5e5ab0){const _0x440955=a165_0x845e46,_0x57a86f=await prepare(_0x5e5ab0);return{'method':_0x440955(0x1ae),'url':'/smartapi/lovrabet/dataset/'+_0x57a86f[_0x440955(0x1a2)][_0x440955(0x19e)]+_0x440955(0x1b3),'body':{'appCode':_0x5e5ab0['appCode']},'description':serializeDryRunDescription({'dataset':{'id':_0x57a86f[_0x440955(0x1a2)]['id'],'code':_0x57a86f[_0x440955(0x1a2)][_0x440955(0x19e)],'name':_0x57a86f['dataset'][_0x440955(0x1b0)],'fieldCount':_0x57a86f[_0x440955(0x1a2)][_0x440955(0x1a6)]},'relatedPages':{'total':_0x57a86f[_0x440955(0x1a2)][_0x440955(0x1b9)][_0x440955(0x19f)],'undeletedCount':_0x57a86f[_0x440955(0x1b5)][_0x440955(0x19f)]},'action':_0x440955(0x1a3),'reason':_0x57a86f[_0x440955(0x1b5)][_0x440955(0x19f)]+'\x20undeleted\x20related\x20page(s)\x20found'})};},async 'execute'(_0x32c21d){const _0x2b93e5=a165_0x845e46,_0x1f4b9d=await prepare(_0x32c21d),_0x2f6079=await syncDataListPages(_0x32c21d[_0x2b93e5(0x1a1)],_0x1f4b9d['dataset'][_0x2b93e5(0x19e)]),_0x2cf93e=Array[_0x2b93e5(0x1ad)](_0x2f6079[_0x2b93e5(0x1a9)])&&_0x2f6079['failedPages']['length']>0x0,_0x275b08=_0x2cf93e?_0x2b93e5(0x1a7):_0x2b93e5(0x1a8);return{'ok':!![],'message':_0x275b08,'data':{'datasetCode':_0x1f4b9d[_0x2b93e5(0x1a2)][_0x2b93e5(0x19e)],..._0x2f6079}};}};function a165_0x56be(){const _0xcd169d=['1565956sZJstS','name','7771356pksKae','87TmVbaV','/sync-to-pages','page','undeletedPages','1464605rGLVuk','231320McnGOl','84oMeWXz','relatedPages','Sync\x20dataset\x20changes\x20to\x20related\x20Data\x20List\x20Pages','alias','code','length','448186hVQWVy','appCode','dataset','sync','3466yFtOIP','write','fieldCount','Some\x20pages\x20failed\x20to\x20sync','Sync\x20succeeded','failedPages','string','1281360HmRpcr','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','isArray','POST'];a165_0x56be=function(){return _0xcd169d;};return a165_0x56be();}async function prepare(_0x3a45bf){const _0x308d42=a165_0x845e46,_0x3e94dd=await loadDatasetDetailForPage(_0x3a45bf);return prepareDatasetAction(_0x3e94dd,_0x308d42(0x1a3));}
@@ -1 +1 @@
1
- (function(_0x952bf0,_0x403be7){const _0x4fc9f2=a161_0x3695,_0x2df4f3=_0x952bf0();while(!![]){try{const _0x69061e=parseInt(_0x4fc9f2(0x8c))/0x1+parseInt(_0x4fc9f2(0x80))/0x2+-parseInt(_0x4fc9f2(0x7c))/0x3+-parseInt(_0x4fc9f2(0x89))/0x4*(-parseInt(_0x4fc9f2(0x8b))/0x5)+-parseInt(_0x4fc9f2(0x91))/0x6*(-parseInt(_0x4fc9f2(0x7d))/0x7)+-parseInt(_0x4fc9f2(0x8a))/0x8+-parseInt(_0x4fc9f2(0x83))/0x9;if(_0x69061e===_0x403be7)break;else _0x2df4f3['push'](_0x2df4f3['shift']());}catch(_0x5ee225){_0x2df4f3['push'](_0x2df4f3['shift']());}}}(a161_0x41c3,0xd72ec));import{existsSync}from'node:fs';import a161_0x5b5914 from'node:path';import a161_0x3dbcb9 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 a161_0x41c3(){const _0x3cf06a=['4187235GmaOlT','12000961RTbSBj','√\x20App\x20Code:\x20','Login\x20failed','1579238hVnZAQ','Logged\x20in','my-app','21675240Zvziws','log','env','√\x20Login\x20status:\x20','trim','cwd','12VFJWTV','139672SYhTqY','2715365msWEcT','569691UmKKBR','production','cyan','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','green','6hLuOJL','√\x20Project\x20Name:\x20','Skipped','Not\x20set'];a161_0x41c3=function(){return _0x3cf06a;};return a161_0x41c3();}function a161_0x3695(_0x476c8c,_0x3731d7){_0x476c8c=_0x476c8c-0x7c;const _0x41c391=a161_0x41c3();let _0x369510=_0x41c391[_0x476c8c];return _0x369510;}export async function guidedCreateProject(_0x39ccb3,_0x3d1cf7,_0x4719fc){const _0x11194a=a161_0x3695,_0x4092e3=_0x11194a(0x82),_0x42b9b9=readConfig(),_0x150a3d=typeof _0x42b9b9[_0x11194a(0x85)]==='string'?_0x42b9b9[_0x11194a(0x85)]:undefined,_0x197893=await input({'message':'Project\x20name:','default':_0x4092e3,'validate':_0x3b81c4=>{const _0x42fe0c=_0x11194a,_0x1bd45c=_0x3b81c4[_0x42fe0c(0x87)]()||_0x4092e3,_0x2ba4ff=getProjectNameValidationError(_0x1bd45c);if(_0x2ba4ff)return _0x2ba4ff;const _0x4b00a5=a161_0x5b5914['resolve'](process[_0x42fe0c(0x88)](),_0x1bd45c);if(existsSync(_0x4b00a5))return'Directory\x20\x22'+_0x1bd45c+'\x22\x20already\x20exists';return!![];}});console['log'](a161_0x3dbcb9[_0x11194a(0x90)](_0x11194a(0x92)+a161_0x3dbcb9[_0x11194a(0x8e)](_0x197893)));const _0x19b2e0=await selectSingleAppcode(_0x4719fc);console[_0x11194a(0x84)](a161_0x3dbcb9[_0x11194a(0x90)](_0x11194a(0x7e)+a161_0x3dbcb9[_0x11194a(0x8e)](_0x19b2e0||_0x11194a(0x94))));if(_0x19b2e0){const _0x2a8b41=await getIsSessionValid();if(!_0x2a8b41){const _0x1eaf16=await confirm({'message':_0x11194a(0x8f),'default':!![]});if(_0x1eaf16){const _0x1f6ea4=await authServer({'silent':!![]});console[_0x11194a(0x84)](a161_0x3dbcb9[_0x11194a(0x90)](_0x11194a(0x86)+a161_0x3dbcb9[_0x11194a(0x8e)](_0x1f6ea4?_0x11194a(0x81):_0x11194a(0x7f))));}else console[_0x11194a(0x84)](a161_0x3dbcb9[_0x11194a(0x90)](_0x11194a(0x86)+a161_0x3dbcb9[_0x11194a(0x8e)](_0x11194a(0x93))));}await _0x39ccb3({'projectName':_0x197893,'appCode':_0x19b2e0,'env':_0x3d1cf7||_0x150a3d||_0x11194a(0x8d)});}else await _0x39ccb3({'projectName':_0x197893,'env':_0x3d1cf7||_0x150a3d||_0x11194a(0x8d)});}
1
+ (function(_0x3b8f58,_0x2b7eca){const _0x4bea41=a166_0x5a21,_0x923d8a=_0x3b8f58();while(!![]){try{const _0x1b1b17=-parseInt(_0x4bea41(0x1a2))/0x1*(parseInt(_0x4bea41(0x1a6))/0x2)+-parseInt(_0x4bea41(0x194))/0x3*(parseInt(_0x4bea41(0x1a4))/0x4)+-parseInt(_0x4bea41(0x1a5))/0x5*(-parseInt(_0x4bea41(0x1a1))/0x6)+parseInt(_0x4bea41(0x195))/0x7+parseInt(_0x4bea41(0x18d))/0x8+parseInt(_0x4bea41(0x1a3))/0x9*(-parseInt(_0x4bea41(0x190))/0xa)+-parseInt(_0x4bea41(0x198))/0xb*(parseInt(_0x4bea41(0x1a7))/0xc);if(_0x1b1b17===_0x2b7eca)break;else _0x923d8a['push'](_0x923d8a['shift']());}catch(_0x4b5c24){_0x923d8a['push'](_0x923d8a['shift']());}}}(a166_0x1281,0x57daa));import{existsSync}from'node:fs';import a166_0x2d8ab8 from'node:path';import a166_0x4e0465 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';function a166_0x5a21(_0x3b90d5,_0x1b88f2){_0x3b90d5=_0x3b90d5-0x18b;const _0x128120=a166_0x1281();let _0x5a21e1=_0x128120[_0x3b90d5];return _0x5a21e1;}import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getProjectNameValidationError}from'../../../commands/project/create/project-name.js';export async function guidedCreateProject(_0x2dcc80,_0x41161e,_0x5fb5e){const _0x462e98=a166_0x5a21,_0x492559=_0x462e98(0x18f),_0x56250c=readConfig(),_0x2cfab3=typeof _0x56250c[_0x462e98(0x193)]===_0x462e98(0x19a)?_0x56250c[_0x462e98(0x193)]:undefined,_0x311d28=await input({'message':'Project\x20name:','default':_0x492559,'validate':_0x273af0=>{const _0x544ef5=_0x462e98,_0x4043d3=_0x273af0[_0x544ef5(0x192)]()||_0x492559,_0x84fb87=getProjectNameValidationError(_0x4043d3);if(_0x84fb87)return _0x84fb87;const _0x56a670=a166_0x2d8ab8[_0x544ef5(0x197)](process[_0x544ef5(0x18e)](),_0x4043d3);if(existsSync(_0x56a670))return'Directory\x20\x22'+_0x4043d3+_0x544ef5(0x19c);return!![];}});console[_0x462e98(0x19f)](a166_0x4e0465[_0x462e98(0x19d)]('√\x20Project\x20Name:\x20'+a166_0x4e0465[_0x462e98(0x18b)](_0x311d28)));const _0x3c1137=await selectSingleAppcode(_0x5fb5e);console[_0x462e98(0x19f)](a166_0x4e0465[_0x462e98(0x19d)](_0x462e98(0x196)+a166_0x4e0465[_0x462e98(0x18b)](_0x3c1137||'Not\x20set')));if(_0x3c1137){const _0x3e9c94=await getIsSessionValid();if(!_0x3e9c94){const _0x3d26e0=await confirm({'message':_0x462e98(0x18c),'default':!![]});if(_0x3d26e0){const _0x5443d8=await authServer({'silent':!![]});console[_0x462e98(0x19f)](a166_0x4e0465['green'](_0x462e98(0x199)+a166_0x4e0465[_0x462e98(0x18b)](_0x5443d8?_0x462e98(0x1a0):_0x462e98(0x19b))));}else console[_0x462e98(0x19f)](a166_0x4e0465['green']('√\x20Login\x20status:\x20'+a166_0x4e0465[_0x462e98(0x18b)](_0x462e98(0x191))));}await _0x2dcc80({'projectName':_0x311d28,'appCode':_0x3c1137,'env':_0x41161e||_0x2cfab3||'production'});}else await _0x2dcc80({'projectName':_0x311d28,'env':_0x41161e||_0x2cfab3||_0x462e98(0x19e)});}function a166_0x1281(){const _0x2affa9=['197749DgxNni','1569105BRGDmk','24tgwgEs','947855xhayGI','2JUrtBE','3612072hmKHtT','cyan','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','3427720lUIqSA','cwd','my-app','30xveQfH','Skipped','trim','env','513FMpYkb','2698416OKUcSN','√\x20App\x20Code:\x20','resolve','11ijJSwi','√\x20Login\x20status:\x20','string','Login\x20failed','\x22\x20already\x20exists','green','production','log','Logged\x20in','18dIhfuO'];a166_0x1281=function(){return _0x2affa9;};return a166_0x1281();}
@@ -1 +1 @@
1
- (function(_0x2f01c1,_0x4ca10f){const _0x19b52d=a162_0x4e6c,_0x456ff5=_0x2f01c1();while(!![]){try{const _0x1813c1=parseInt(_0x19b52d(0x1d2))/0x1+-parseInt(_0x19b52d(0x1ce))/0x2*(parseInt(_0x19b52d(0x1c8))/0x3)+-parseInt(_0x19b52d(0x1d3))/0x4*(-parseInt(_0x19b52d(0x1c6))/0x5)+-parseInt(_0x19b52d(0x1c9))/0x6+parseInt(_0x19b52d(0x1cf))/0x7*(-parseInt(_0x19b52d(0x1ca))/0x8)+parseInt(_0x19b52d(0x1c7))/0x9+parseInt(_0x19b52d(0x1cb))/0xa*(parseInt(_0x19b52d(0x1d1))/0xb);if(_0x1813c1===_0x4ca10f)break;else _0x456ff5['push'](_0x456ff5['shift']());}catch(_0xb6a9b){_0x456ff5['push'](_0x456ff5['shift']());}}}(a162_0x327f,0x9db54));export function formatElapsed(_0x127683){const _0x196867=a162_0x4e6c,_0x184e06=Date[_0x196867(0x1cc)]()-_0x127683;if(_0x184e06<0x3e8)return _0x184e06+'ms';const _0x1bcfaa=(_0x184e06/0x3e8)[_0x196867(0x1cd)](0x2),_0x1e91e7=_0x1bcfaa[_0x196867(0x1d0)](/\.?0+$/u,'');return _0x1e91e7+'s';}function a162_0x4e6c(_0x37bf51,_0x3c53d0){_0x37bf51=_0x37bf51-0x1c6;const _0x327f54=a162_0x327f();let _0x4e6cba=_0x327f54[_0x37bf51];return _0x4e6cba;}function a162_0x327f(){const _0x31c55c=['toFixed','356kGpedz','177387eLdgOU','replace','2871zdfiJp','641745EMjfci','32awzwnS','553925pOdDAL','3337488VjEIMW','6BuxcUf','3926262ldkZgU','328WHlHqB','16890FLtpax','now'];a162_0x327f=function(){return _0x31c55c;};return a162_0x327f();}
1
+ (function(_0x9c53e1,_0x5208f3){const _0x23dd50=a167_0x1fe2,_0x21974c=_0x9c53e1();while(!![]){try{const _0x139803=parseInt(_0x23dd50(0x93))/0x1*(parseInt(_0x23dd50(0x8f))/0x2)+parseInt(_0x23dd50(0x95))/0x3+parseInt(_0x23dd50(0x92))/0x4*(parseInt(_0x23dd50(0x8e))/0x5)+-parseInt(_0x23dd50(0x97))/0x6*(-parseInt(_0x23dd50(0x99))/0x7)+parseInt(_0x23dd50(0x9a))/0x8+parseInt(_0x23dd50(0x90))/0x9*(parseInt(_0x23dd50(0x98))/0xa)+-parseInt(_0x23dd50(0x96))/0xb;if(_0x139803===_0x5208f3)break;else _0x21974c['push'](_0x21974c['shift']());}catch(_0x3eb0da){_0x21974c['push'](_0x21974c['shift']());}}}(a167_0x1318,0x4f906));function a167_0x1fe2(_0x5374d5,_0x3af6d0){_0x5374d5=_0x5374d5-0x8d;const _0x131833=a167_0x1318();let _0x1fe22b=_0x131833[_0x5374d5];return _0x1fe22b;}export function formatElapsed(_0x2e33c8){const _0x3839e8=a167_0x1fe2,_0xcff994=Date[_0x3839e8(0x91)]()-_0x2e33c8;if(_0xcff994<0x3e8)return _0xcff994+'ms';const _0x5692d5=(_0xcff994/0x3e8)[_0x3839e8(0x94)](0x2),_0x20de6e=_0x5692d5[_0x3839e8(0x8d)](/\.?0+$/u,'');return _0x20de6e+'s';}function a167_0x1318(){const _0xe67b3d=['replace','1425965RPIIPh','89282TIIcdj','9USBKAs','now','4JrJFrn','2SHGNyb','toFixed','1116183dzGEGk','11783937bdBvaK','6xVpsZF','2926480AnroQI','1820112yRnEQu','783688JqYiIT'];a167_0x1318=function(){return _0xe67b3d;};return a167_0x1318();}
@@ -1 +1 @@
1
- (function(_0x3becd6,_0x250bc1){const _0x395ce7=a163_0x416b,_0x364bd8=_0x3becd6();while(!![]){try{const _0x2d1423=-parseInt(_0x395ce7(0xb3))/0x1*(-parseInt(_0x395ce7(0x98))/0x2)+parseInt(_0x395ce7(0xd0))/0x3*(-parseInt(_0x395ce7(0x99))/0x4)+parseInt(_0x395ce7(0xb4))/0x5*(-parseInt(_0x395ce7(0x9e))/0x6)+parseInt(_0x395ce7(0xd2))/0x7*(-parseInt(_0x395ce7(0x96))/0x8)+parseInt(_0x395ce7(0xe4))/0x9+parseInt(_0x395ce7(0xd8))/0xa+-parseInt(_0x395ce7(0x88))/0xb*(parseInt(_0x395ce7(0xd5))/0xc);if(_0x2d1423===_0x250bc1)break;else _0x364bd8['push'](_0x364bd8['shift']());}catch(_0x23638b){_0x364bd8['push'](_0x364bd8['shift']());}}}(a163_0x5cef,0x96042));function a163_0x416b(_0x2f85a1,_0x327d71){_0x2f85a1=_0x2f85a1-0x7d;const _0x5cefb2=a163_0x5cef();let _0x416b0c=_0x5cefb2[_0x2f85a1];return _0x416b0c;}import a163_0xe18e7 from'path';import a163_0x2bc1e4 from'fs';function a163_0x5cef(){const _0x461335=['Extracting\x20project\x20template','production','*\x20Configuring\x20AppCode\x20for\x20project\x20','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','√\x20package.json\x20updated:\x20name=','cd\x20','needsUpgrade','216OPPTXc','1.0.0','214LaLHBP','236BdgCbi','nonInteractive','API\x20configuration\x20pull\x20failed','start','appCode','42LJrCfS','API\x20configuration\x20pulled:\x20','dev','\x20config\x20set\x20appcode\x20<app-code>\x27','Resolving\x20project\x20template','writeFileSync','belowMinimum','success','cwd','Format\x20code','error','join','string','CLI\x20version\x20check','\x20|\x20Default:\x20implicit\x20(single\x20app)','resolve','dirname','warn','text','W_OK','log','10568BlgXDT','73725HUsStb','🚀\x20Next\x20Steps:','Project\x20name:\x20','copying','bold','\x20√\x20','\x20run\x20start','fail','Updating\x20package.json\x20name','Copying\x20local\x20template\x20source','\x20\x201.\x20Start\x20project:\x20','Verifying\x20project\x20template','lstatSync','Project\x20directory\x20','stringify','info','modelCount','rmSync','parse','...','Failed\x20to\x20update\x20package.json','\x20dataset(s),\x20generated\x20','\x20\x202.\x20Pull\x20API\x20configuration:\x20','cyan','utf8','Skip\x20cleanup:\x20project\x20directory\x20ownership\x20changed:\x20','*\x20Pulling\x20API\x20configuration...','description','11751RntMbs','\x20|\x20AppCode:\x20','264775VWLfKM','existsSync','Project\x20creation\x20failed:\x20','12KoWhEv','√\x20Configuration\x20file\x20created,\x20Apps:\x20','extracting','3991550IxyOes','projectName','env','\x20&&\x20','gray','stop','repeat','Project\x20template\x20ready','green','create','name','ino','8441001rZTuSX','cookie','accessSync','Downloading\x20project\x20template','Failed\x20to\x20clean\x20up\x20project\x20directory:\x20','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','Failed\x20to\x20configure\x20app\x20AppCode','\x20already\x20exists','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','templateSource','readFileSync','version','keys','projectCode','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','package.json','verifying','5475371tFmNDe','Project\x20created:\x20','Install\x20dependencies','currentVersion','message','chdir','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'];a163_0x5cef=function(){return _0x461335;};return a163_0x5cef();}import a163_0x274abf from'chalk';import a163_0x4b4965 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{loadRawConfigLayers,writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';import{validateProjectName}from'../../../commands/project/create/project-name.js';import{getSdkClientRoutingConfig}from'../../../constant/domain.js';import{generateSdkConfigFile}from'../../../api/generate-sdk-config-file.js';import{writeProjectRoutingManifest}from'../../../config/project-routing.js';function readDirectoryIdentity(_0x3f0941){const _0x2216f4=a163_0x416b;try{const _0x37365e=a163_0x2bc1e4[_0x2216f4(0xc0)](_0x3f0941);if(!_0x37365e['isDirectory']())return null;return{'dev':_0x37365e['dev'],'ino':_0x37365e[_0x2216f4(0xe3)]};}catch{return null;}}export async function createApp(_0x4290c8){const _0x25e786=a163_0x416b,_0x47937d=await checkCliVersion();(_0x47937d[_0x25e786(0x95)]||_0x47937d[_0x25e786(0xa4)])&&(printCliUpgradeWarning(_0x47937d),assertCliVersionSupported(_0x47937d),logger[_0x25e786(0xc3)](_0x25e786(0xe1),_0x25e786(0xab),{'currentVersion':_0x47937d[_0x25e786(0x8b)],'stableVersion':_0x47937d['stableVersion'],'minimumVersion':_0x47937d['minimumVersion'],'needsUpgrade':_0x47937d[_0x25e786(0x95)],'belowMinimum':_0x47937d[_0x25e786(0xa4)]}));if(_0x4290c8[_0x25e786(0x84)]&&(_0x4290c8[_0x25e786(0x9d)]||_0x4290c8[_0x25e786(0x9a)]))await runCreate({'projectName':_0x4290c8[_0x25e786(0x84)],'appCode':_0x4290c8[_0x25e786(0x9d)],'env':_0x4290c8[_0x25e786(0xda)]},_0x4290c8);else{if(_0x4290c8[_0x25e786(0x84)]){const _0xc31f9b=await selectSingleAppcode(_0x4290c8[_0x25e786(0xe5)]);await runCreate({'projectName':_0x4290c8[_0x25e786(0x84)],'appCode':_0xc31f9b||undefined,'env':_0x4290c8[_0x25e786(0xda)]},_0x4290c8);}else await guidedCreateProject(_0x23de23=>runCreate(_0x23de23,_0x4290c8),_0x4290c8[_0x25e786(0xda)],_0x4290c8[_0x25e786(0xe5)]);}}async function runCreate(_0x1f8aa3,_0x2d40b5){const _0x1080a2=a163_0x416b;_0x1f8aa3['projectName']=validateProjectName(_0x1f8aa3[_0x1080a2(0xd9)]);const _0xecf008=a163_0xe18e7['resolve'](process[_0x1080a2(0xa6)](),_0x1f8aa3[_0x1080a2(0xd9)]);if(a163_0x2bc1e4[_0x1080a2(0xd3)](_0xecf008))throw new Error(_0x1080a2(0xc1)+_0x1f8aa3[_0x1080a2(0xd9)]+_0x1080a2(0x7e));let _0x55fa19=null;try{a163_0x2bc1e4[_0x1080a2(0xe6)](a163_0xe18e7[_0x1080a2(0xae)](_0xecf008),a163_0x2bc1e4['constants'][_0x1080a2(0xb1)]);}catch{throw new Error(_0x1080a2(0x92));}logger['info'](_0x1080a2(0xe1),'Starting\x20project\x20creation:\x20'+_0x1f8aa3[_0x1080a2(0xd9)],{'projectDir':_0xecf008,'appCode':_0x1f8aa3['appCode']}),console[_0x1080a2(0xb2)](),console[_0x1080a2(0xb2)](a163_0x274abf[_0x1080a2(0xe0)](_0x1080a2(0xb9))+_0x1080a2(0xb6)+a163_0x274abf['green'](_0x1f8aa3[_0x1080a2(0xd9)])+(_0x1f8aa3[_0x1080a2(0x9d)]?_0x1080a2(0xd1)+a163_0x274abf[_0x1080a2(0xcb)](_0x1f8aa3[_0x1080a2(0x9d)]):''));try{await runTask(_0x1080a2(0xa2),_0x3bcbab=>copyProjectTemplate(_0x1f8aa3[_0x1080a2(0xd9)],_0x4ac198=>_0x3bcbab(projectTemplateStageLabel(_0x4ac198)),_0x2d40b5[_0x1080a2(0x80)]),_0x1080a2(0xdf)),_0x55fa19=readDirectoryIdentity(_0xecf008);if(!_0x55fa19)throw new Error('Unable\x20to\x20verify\x20ownership\x20of\x20the\x20created\x20project\x20directory');await updatePackageJsonName(_0x1f8aa3['projectName']),await runTask(_0x1080a2(0x8a),()=>installDependencies(_0x1f8aa3['projectName'])),await runTask(_0x1080a2(0xa7),()=>formatProjectCode(_0x1f8aa3[_0x1080a2(0xd9)])),await configureAppCode(_0x1f8aa3[_0x1080a2(0xd9)],_0x1f8aa3[_0x1080a2(0x9d)]||'',_0x1f8aa3[_0x1080a2(0xda)]);let _0x45c25a=![];if(_0x1f8aa3['appCode']){console['log'](_0x1080a2(0xce));const _0x1700ab=process[_0x1080a2(0xa6)]();try{process[_0x1080a2(0x8d)](_0xecf008);const _0xdb1cb=_0x1f8aa3[_0x1080a2(0xda)]||_0x1080a2(0x90);initEnv(_0xdb1cb);const {configArray:_0x3d585d}=await fetchModelList(_0x1f8aa3[_0x1080a2(0x9d)],_0x2d40b5[_0x1080a2(0xe5)]||''),_0x9ab242=DEFAULT_API_DIR,_0x52a314=await generateApiFile(_0x3d585d,'',_0x1f8aa3[_0x1080a2(0x9d)],!![],_0xdb1cb,_0x9ab242,undefined,getSdkClientRoutingConfig(),{'overwriteTypescript':!![]});console['log']('√\x20Pulled\x20'+_0x3d585d['length']+_0x1080a2(0xc9)+_0x52a314[_0x1080a2(0xc4)]+'\x20model(s)'),logger[_0x1080a2(0xc3)](_0x1080a2(0xe1),_0x1080a2(0x9f)+_0x1f8aa3['appCode']);}catch(_0x117983){_0x45c25a=!![],console[_0x1080a2(0xb2)]('!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull'),logger[_0x1080a2(0xaf)]('create',_0x1080a2(0x9b),{'error':_0x117983 instanceof Error?_0x117983['message']:String(_0x117983)});}finally{process[_0x1080a2(0x8d)](_0x1700ab);}}logger['setLogPath'](_0xecf008),logger[_0x1080a2(0xa5)]('create',_0x1080a2(0x89)+_0x1f8aa3[_0x1080a2(0xd9)]),console[_0x1080a2(0xb2)](),console[_0x1080a2(0xb2)](a163_0x274abf[_0x1080a2(0xe0)]('─'['repeat'](0x3c))),console[_0x1080a2(0xb2)](a163_0x274abf['cyan'][_0x1080a2(0xb8)](_0x1080a2(0xb5))),console[_0x1080a2(0xb2)](),console[_0x1080a2(0xb2)](_0x1080a2(0xbe)+a163_0x274abf[_0x1080a2(0xcb)][_0x1080a2(0xb8)](_0x1080a2(0x94)+_0x1f8aa3[_0x1080a2(0xd9)]+_0x1080a2(0xdb)+CLI_BIN_NAME+_0x1080a2(0xba))),_0x45c25a&&console['log'](_0x1080a2(0xca)+a163_0x274abf[_0x1080a2(0xcb)][_0x1080a2(0xb8)](CLI_BIN_NAME+'\x20api\x20pull')),console[_0x1080a2(0xb2)](a163_0x274abf['green']('─'[_0x1080a2(0xde)](0x3c)));}catch(_0x40afc3){logger['error']('create',_0x1080a2(0xd4)+_0x1f8aa3[_0x1080a2(0xd9)],{'error':_0x40afc3 instanceof Error?_0x40afc3[_0x1080a2(0x8c)]:String(_0x40afc3)});try{const _0x26b5e9=readDirectoryIdentity(_0xecf008);if(_0x55fa19&&_0x26b5e9?.['dev']===_0x55fa19[_0x1080a2(0xa0)]&&_0x26b5e9[_0x1080a2(0xe3)]===_0x55fa19[_0x1080a2(0xe3)])console[_0x1080a2(0xb2)](_0x1080a2(0x7f)+_0xecf008),a163_0x2bc1e4[_0x1080a2(0xc5)](_0xecf008,{'recursive':!![],'force':!![]});else _0x26b5e9&&logger[_0x1080a2(0xaf)](_0x1080a2(0xe1),_0x1080a2(0xcd)+_0xecf008);}catch{logger[_0x1080a2(0xaf)](_0x1080a2(0xe1),_0x1080a2(0xe8)+_0xecf008);}throw _0x40afc3;}}async function runTask(_0x596e78,_0x349f22,_0xc81858=_0x596e78){const _0x2347ed=a163_0x416b,_0x519fab=a163_0x4b4965(_0x596e78+_0x2347ed(0xc7))[_0x2347ed(0x9c)]();try{const _0x58b6cc=await _0x349f22(_0x2d7f3e=>{const _0x42352a=_0x2347ed;_0x519fab[_0x42352a(0xb0)]=_0x2d7f3e+_0x42352a(0xc7);});_0x519fab[_0x2347ed(0xdd)](),console[_0x2347ed(0xb2)](''+a163_0x274abf[_0x2347ed(0xe0)](_0x2347ed(0xb9))+_0xc81858+'\x20'+a163_0x274abf[_0x2347ed(0xdc)]('['+_0x58b6cc+']'));}catch(_0x1ad0bd){_0x519fab[_0x2347ed(0xbb)](_0x596e78);throw _0x1ad0bd;}}function projectTemplateStageLabel(_0x5ebabb){const _0x20c6a8=a163_0x416b;switch(_0x5ebabb){case'resolving':return _0x20c6a8(0xa2);case'downloading':return _0x20c6a8(0xe7);case _0x20c6a8(0x87):return _0x20c6a8(0xbf);case _0x20c6a8(0xd7):return _0x20c6a8(0x8f);case _0x20c6a8(0xb7):return _0x20c6a8(0xbd);}}async function updatePackageJsonName(_0x23dba1){const _0x34e182=a163_0x416b,_0x3bd8e5=a163_0xe18e7[_0x34e182(0xad)](process[_0x34e182(0xa6)](),_0x23dba1),_0x499ba5=a163_0xe18e7[_0x34e182(0xa9)](_0x3bd8e5,_0x34e182(0x86));try{console['log'](_0x34e182(0x85));const _0x22c882=getRabetbaseCliPackageRoot(),_0xe98273=a163_0xe18e7[_0x34e182(0xa9)](_0x22c882,_0x34e182(0x86));let _0x40b7e6=_0x34e182(0x97);try{const _0x12f607=JSON[_0x34e182(0xc6)](a163_0x2bc1e4['readFileSync'](_0xe98273,_0x34e182(0xcc)));_0x40b7e6=_0x12f607[_0x34e182(0x82)]||_0x34e182(0x97);}catch{}const _0x4703e1=a163_0x2bc1e4[_0x34e182(0x81)](_0x499ba5,'utf8'),_0x4a6c6d=JSON['parse'](_0x4703e1);_0x4a6c6d[_0x34e182(0xe2)]=_0x23dba1,_0x4a6c6d[_0x34e182(0xcf)]=_0x23dba1+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0x40b7e6,a163_0x2bc1e4[_0x34e182(0xa3)](_0x499ba5,JSON[_0x34e182(0xc2)](_0x4a6c6d,null,0x2)+'\x0a','utf8'),console[_0x34e182(0xb2)](_0x34e182(0x93)+_0x23dba1),logger[_0x34e182(0xc3)](_0x34e182(0xe1),_0x34e182(0xbc));}catch(_0x2bf2c9){logger[_0x34e182(0xa8)]('create',_0x34e182(0xc8));throw _0x2bf2c9;}}async function configureAppCode(_0xdcd9cf,_0x457d99,_0x596cb7){const _0x3ecb15=a163_0x416b,_0x488f2f=a163_0xe18e7[_0x3ecb15(0xad)](process[_0x3ecb15(0xa6)](),_0xdcd9cf),_0x3f805a=a163_0xe18e7['join'](_0x488f2f,NEW_CONFIG_NAME);try{_0x457d99?console[_0x3ecb15(0xb2)](_0x3ecb15(0x91)+_0xdcd9cf+':\x20'+_0x457d99):console[_0x3ecb15(0xb2)](_0x3ecb15(0xe9)+_0xdcd9cf);const _0x258f68=getRabetbaseCliPackageRoot(),_0x245126=a163_0xe18e7[_0x3ecb15(0xa9)](_0x258f68,_0x3ecb15(0x86));let _0x38967c=_0x3ecb15(0x97);try{const _0x3b2d3a=JSON[_0x3ecb15(0xc6)](a163_0x2bc1e4[_0x3ecb15(0x81)](_0x245126,'utf8'));_0x38967c=_0x3b2d3a[_0x3ecb15(0x82)]||_0x3ecb15(0x97);}catch{}const {globalConfig:_0x332b5e}=loadRawConfigLayers(),_0x1a4714=typeof _0x332b5e['env']===_0x3ecb15(0xaa)?_0x332b5e[_0x3ecb15(0xda)]:undefined,_0x5c01bc={};for(const _0xc3d3b2 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x332b5e[_0xc3d3b2]!=null)_0x5c01bc[_0xc3d3b2]=_0x332b5e[_0xc3d3b2];}const _0xd7cdcf=buildCanonicalProjectConfig(_0x5c01bc,{'appCodes':_0x457d99?[_0x457d99]:[],'env':_0x596cb7||_0x1a4714||'production','metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x38967c}});writeConfigFile(_0x3f805a,_0xd7cdcf),await generateSdkConfigFile(a163_0xe18e7['join'](_0x488f2f,DEFAULT_API_DIR),getSdkClientRoutingConfig()),writeProjectRoutingManifest(_0x488f2f),_0x457d99?console[_0x3ecb15(0xb2)](_0x3ecb15(0xd6)+Object[_0x3ecb15(0x83)](_0xd7cdcf['apps']||{})[_0x3ecb15(0xa9)](',\x20')+_0x3ecb15(0xac)):console[_0x3ecb15(0xb2)](_0x3ecb15(0x8e)+CLI_BIN_NAME+_0x3ecb15(0xa1)),logger['info'](_0x3ecb15(0xe1),'Configured\x20app\x20AppCode:\x20'+_0x457d99);}catch(_0x8effe5){logger[_0x3ecb15(0xa8)](_0x3ecb15(0xe1),_0x3ecb15(0x7d));throw _0x8effe5;}}
1
+ (function(_0x463a51,_0x423e08){const _0x2e9bd7=a168_0x348d,_0x1cb07a=_0x463a51();while(!![]){try{const _0x2b080e=parseInt(_0x2e9bd7(0x178))/0x1*(parseInt(_0x2e9bd7(0x141))/0x2)+-parseInt(_0x2e9bd7(0x18d))/0x3+-parseInt(_0x2e9bd7(0x127))/0x4+parseInt(_0x2e9bd7(0x14c))/0x5+parseInt(_0x2e9bd7(0x189))/0x6*(parseInt(_0x2e9bd7(0x170))/0x7)+parseInt(_0x2e9bd7(0x15a))/0x8+parseInt(_0x2e9bd7(0x161))/0x9*(-parseInt(_0x2e9bd7(0x165))/0xa);if(_0x2b080e===_0x423e08)break;else _0x1cb07a['push'](_0x1cb07a['shift']());}catch(_0x51fdf2){_0x1cb07a['push'](_0x1cb07a['shift']());}}}(a168_0x5577,0x436f9));import a168_0x51e0b2 from'path';import a168_0x3f459f from'fs';import a168_0x4c0b1b from'chalk';import a168_0x228a6b 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';function a168_0x5577(){const _0x40754a=['accessSync','API\x20configuration\x20pull\x20failed','🚀\x20Next\x20Steps:','cookie','verifying','31466dGPVMp','Skip\x20cleanup:\x20project\x20directory\x20ownership\x20changed:\x20','Extracting\x20project\x20template','Project\x20name:\x20','lstatSync','belowMinimum','projectName','Unable\x20to\x20verify\x20ownership\x20of\x20the\x20created\x20project\x20directory','log','appCode','Project\x20template\x20ready','1645560EEmJiW','utf8','Verifying\x20project\x20template','keys','Project\x20created:\x20','version','\x20&&\x20','\x20config\x20set\x20appcode\x20<app-code>\x27','stringify','writeFileSync','constants','Resolving\x20project\x20template','gray','...','3243472UYluSG','downloading','*\x20Pulling\x20API\x20configuration...','warn','description','\x20model(s)','join','513Xutdno','\x20|\x20AppCode:\x20','string','\x20√\x20','41630GvKyXx','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','Copying\x20local\x20template\x20source','minimumVersion','\x20run\x20start','dev','Failed\x20to\x20update\x20package.json','Format\x20code','copying','green','7FYUtAO','env','1.0.0','readFileSync','resolving','\x20dataset(s),\x20generated\x20','\x20Generated\x20by\x20rabetbase\x20cli\x20','√\x20Configuration\x20file\x20created,\x20Apps:\x20','6PbuaBu','repeat','bold','success','package.json','needsUpgrade','parse','extracting','*\x20Configuring\x20AppCode\x20for\x20project\x20','Failed\x20to\x20configure\x20app\x20AppCode','projectCode','error','cyan','rmSync','cwd','resolve','\x20api\x20pull','2116518cTPVoF','templateSource','setLogPath','\x20already\x20exists','1311006SSejMZ','chdir','toLocaleString','Install\x20dependencies','create','modelCount','924748HhNbpj','√\x20package.json\x20updated:\x20name=','ino','info','apps','Starting\x20project\x20creation:\x20','Project\x20creation\x20failed:\x20','isDirectory','√\x20Pulled\x20','Project\x20directory\x20','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','text','Configured\x20app\x20AppCode:\x20','currentVersion','\x20|\x20Default:\x20implicit\x20(single\x20app)','nonInteractive','name','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','cd\x20','production'];a168_0x5577=function(){return _0x40754a;};return a168_0x5577();}function a168_0x348d(_0xcc3633,_0xf23637){_0xcc3633=_0xcc3633-0x126;const _0x5577ca=a168_0x5577();let _0x348d84=_0x5577ca[_0xcc3633];return _0x348d84;}import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';import{validateProjectName}from'../../../commands/project/create/project-name.js';import{getSdkClientRoutingConfig}from'../../../constant/domain.js';import{generateSdkConfigFile}from'../../../api/generate-sdk-config-file.js';import{writeProjectRoutingManifest}from'../../../config/project-routing.js';function readDirectoryIdentity(_0x5f48ce){const _0x2b3765=a168_0x348d;try{const _0x5826b4=a168_0x3f459f[_0x2b3765(0x145)](_0x5f48ce);if(!_0x5826b4[_0x2b3765(0x12e)]())return null;return{'dev':_0x5826b4['dev'],'ino':_0x5826b4['ino']};}catch{return null;}}export async function createApp(_0xa4e41d){const _0x2b01a7=a168_0x348d,_0x37c660=await checkCliVersion();(_0x37c660['needsUpgrade']||_0x37c660[_0x2b01a7(0x146)])&&(printCliUpgradeWarning(_0x37c660),assertCliVersionSupported(_0x37c660),logger[_0x2b01a7(0x12a)](_0x2b01a7(0x191),'CLI\x20version\x20check',{'currentVersion':_0x37c660[_0x2b01a7(0x135)],'stableVersion':_0x37c660['stableVersion'],'minimumVersion':_0x37c660[_0x2b01a7(0x169)],'needsUpgrade':_0x37c660[_0x2b01a7(0x17d)],'belowMinimum':_0x37c660[_0x2b01a7(0x146)]}));if(_0xa4e41d[_0x2b01a7(0x182)]&&(_0xa4e41d['appCode']||_0xa4e41d[_0x2b01a7(0x137)]))await runCreate({'projectName':_0xa4e41d['projectCode'],'appCode':_0xa4e41d['appCode'],'env':_0xa4e41d['env']},_0xa4e41d);else{if(_0xa4e41d[_0x2b01a7(0x182)]){const _0x326f75=await selectSingleAppcode(_0xa4e41d[_0x2b01a7(0x13f)]);await runCreate({'projectName':_0xa4e41d['projectCode'],'appCode':_0x326f75||undefined,'env':_0xa4e41d[_0x2b01a7(0x171)]},_0xa4e41d);}else await guidedCreateProject(_0x50c92e=>runCreate(_0x50c92e,_0xa4e41d),_0xa4e41d['env'],_0xa4e41d[_0x2b01a7(0x13f)]);}}async function runCreate(_0x2ce2c7,_0x46314c){const _0x59053b=a168_0x348d;_0x2ce2c7['projectName']=validateProjectName(_0x2ce2c7['projectName']);const _0x4e662f=a168_0x51e0b2['resolve'](process[_0x59053b(0x186)](),_0x2ce2c7[_0x59053b(0x147)]);if(a168_0x3f459f['existsSync'](_0x4e662f))throw new Error(_0x59053b(0x130)+_0x2ce2c7[_0x59053b(0x147)]+_0x59053b(0x18c));let _0x1694d8=null;try{a168_0x3f459f[_0x59053b(0x13c)](a168_0x51e0b2['dirname'](_0x4e662f),a168_0x3f459f[_0x59053b(0x156)]['W_OK']);}catch{throw new Error(_0x59053b(0x139));}logger['info'](_0x59053b(0x191),_0x59053b(0x12c)+_0x2ce2c7[_0x59053b(0x147)],{'projectDir':_0x4e662f,'appCode':_0x2ce2c7[_0x59053b(0x14a)]}),console[_0x59053b(0x149)](),console[_0x59053b(0x149)](a168_0x4c0b1b[_0x59053b(0x16f)]('\x20√\x20')+_0x59053b(0x144)+a168_0x4c0b1b[_0x59053b(0x16f)](_0x2ce2c7[_0x59053b(0x147)])+(_0x2ce2c7[_0x59053b(0x14a)]?_0x59053b(0x162)+a168_0x4c0b1b[_0x59053b(0x184)](_0x2ce2c7[_0x59053b(0x14a)]):''));try{await runTask(_0x59053b(0x157),_0x147d4b=>copyProjectTemplate(_0x2ce2c7[_0x59053b(0x147)],_0x568ff8=>_0x147d4b(projectTemplateStageLabel(_0x568ff8)),_0x46314c[_0x59053b(0x18a)]),_0x59053b(0x14b)),_0x1694d8=readDirectoryIdentity(_0x4e662f);if(!_0x1694d8)throw new Error(_0x59053b(0x148));await updatePackageJsonName(_0x2ce2c7[_0x59053b(0x147)]),await runTask(_0x59053b(0x190),()=>installDependencies(_0x2ce2c7[_0x59053b(0x147)])),await runTask(_0x59053b(0x16d),()=>formatProjectCode(_0x2ce2c7[_0x59053b(0x147)])),await configureAppCode(_0x2ce2c7['projectName'],_0x2ce2c7[_0x59053b(0x14a)]||'',_0x2ce2c7[_0x59053b(0x171)]);let _0x4ef245=![];if(_0x2ce2c7[_0x59053b(0x14a)]){console[_0x59053b(0x149)](_0x59053b(0x15c));const _0x4b5ac0=process[_0x59053b(0x186)]();try{process['chdir'](_0x4e662f);const _0x37d04c=_0x2ce2c7['env']||_0x59053b(0x13b);initEnv(_0x37d04c);const {configArray:_0x408bb9}=await fetchModelList(_0x2ce2c7[_0x59053b(0x14a)],_0x46314c[_0x59053b(0x13f)]||''),_0x15c8f7=DEFAULT_API_DIR,_0x3163e7=await generateApiFile(_0x408bb9,'',_0x2ce2c7[_0x59053b(0x14a)],!![],_0x37d04c,_0x15c8f7,undefined,getSdkClientRoutingConfig(),{'overwriteTypescript':!![]});console[_0x59053b(0x149)](_0x59053b(0x12f)+_0x408bb9['length']+_0x59053b(0x175)+_0x3163e7[_0x59053b(0x126)]+_0x59053b(0x15f)),logger[_0x59053b(0x12a)]('create','API\x20configuration\x20pulled:\x20'+_0x2ce2c7[_0x59053b(0x14a)]);}catch(_0x16a605){_0x4ef245=!![],console[_0x59053b(0x149)](_0x59053b(0x131)),logger[_0x59053b(0x15d)](_0x59053b(0x191),_0x59053b(0x13d),{'error':_0x16a605 instanceof Error?_0x16a605['message']:String(_0x16a605)});}finally{process[_0x59053b(0x18e)](_0x4b5ac0);}}logger[_0x59053b(0x18b)](_0x4e662f),logger[_0x59053b(0x17b)](_0x59053b(0x191),_0x59053b(0x150)+_0x2ce2c7[_0x59053b(0x147)]),console[_0x59053b(0x149)](),console[_0x59053b(0x149)](a168_0x4c0b1b[_0x59053b(0x16f)]('─'[_0x59053b(0x179)](0x3c))),console[_0x59053b(0x149)](a168_0x4c0b1b[_0x59053b(0x184)][_0x59053b(0x17a)](_0x59053b(0x13e))),console[_0x59053b(0x149)](),console[_0x59053b(0x149)]('\x20\x201.\x20Start\x20project:\x20'+a168_0x4c0b1b[_0x59053b(0x184)][_0x59053b(0x17a)](_0x59053b(0x13a)+_0x2ce2c7[_0x59053b(0x147)]+_0x59053b(0x152)+CLI_BIN_NAME+_0x59053b(0x16a))),_0x4ef245&&console[_0x59053b(0x149)]('\x20\x202.\x20Pull\x20API\x20configuration:\x20'+a168_0x4c0b1b[_0x59053b(0x184)][_0x59053b(0x17a)](CLI_BIN_NAME+_0x59053b(0x188))),console[_0x59053b(0x149)](a168_0x4c0b1b['green']('─'[_0x59053b(0x179)](0x3c)));}catch(_0x1b84e1){logger[_0x59053b(0x183)](_0x59053b(0x191),_0x59053b(0x12d)+_0x2ce2c7['projectName'],{'error':_0x1b84e1 instanceof Error?_0x1b84e1['message']:String(_0x1b84e1)});try{const _0x3c5815=readDirectoryIdentity(_0x4e662f);if(_0x1694d8&&_0x3c5815?.['dev']===_0x1694d8[_0x59053b(0x16b)]&&_0x3c5815[_0x59053b(0x129)]===_0x1694d8[_0x59053b(0x129)])console['log'](_0x59053b(0x166)+_0x4e662f),a168_0x3f459f[_0x59053b(0x185)](_0x4e662f,{'recursive':!![],'force':!![]});else _0x3c5815&&logger[_0x59053b(0x15d)](_0x59053b(0x191),_0x59053b(0x142)+_0x4e662f);}catch{logger[_0x59053b(0x15d)](_0x59053b(0x191),'Failed\x20to\x20clean\x20up\x20project\x20directory:\x20'+_0x4e662f);}throw _0x1b84e1;}}async function runTask(_0x4383d7,_0xe3a3d,_0x46b4a6=_0x4383d7){const _0x48ab96=a168_0x348d,_0x102f33=a168_0x228a6b(_0x4383d7+'...')['start']();try{const _0x7c0184=await _0xe3a3d(_0x3a6330=>{const _0x1e2c4e=a168_0x348d;_0x102f33[_0x1e2c4e(0x133)]=_0x3a6330+_0x1e2c4e(0x159);});_0x102f33['stop'](),console['log'](''+a168_0x4c0b1b[_0x48ab96(0x16f)](_0x48ab96(0x164))+_0x46b4a6+'\x20'+a168_0x4c0b1b[_0x48ab96(0x158)]('['+_0x7c0184+']'));}catch(_0x5bd24d){_0x102f33['fail'](_0x4383d7);throw _0x5bd24d;}}function projectTemplateStageLabel(_0x26c3f0){const _0x382eb8=a168_0x348d;switch(_0x26c3f0){case _0x382eb8(0x174):return _0x382eb8(0x157);case _0x382eb8(0x15b):return'Downloading\x20project\x20template';case _0x382eb8(0x140):return _0x382eb8(0x14e);case _0x382eb8(0x17f):return _0x382eb8(0x143);case _0x382eb8(0x16e):return _0x382eb8(0x168);}}async function updatePackageJsonName(_0x1b00e4){const _0x58c748=a168_0x348d,_0x4dfd37=a168_0x51e0b2[_0x58c748(0x187)](process['cwd'](),_0x1b00e4),_0x53d53c=a168_0x51e0b2['join'](_0x4dfd37,_0x58c748(0x17c));try{console[_0x58c748(0x149)](_0x58c748(0x132));const _0x44f866=getRabetbaseCliPackageRoot(),_0x10bfb0=a168_0x51e0b2[_0x58c748(0x160)](_0x44f866,_0x58c748(0x17c));let _0x1f8b6e=_0x58c748(0x172);try{const _0x30586e=JSON['parse'](a168_0x3f459f[_0x58c748(0x173)](_0x10bfb0,_0x58c748(0x14d)));_0x1f8b6e=_0x30586e[_0x58c748(0x151)]||_0x58c748(0x172);}catch{}const _0x3fa73c=a168_0x3f459f[_0x58c748(0x173)](_0x53d53c,_0x58c748(0x14d)),_0x2076f3=JSON[_0x58c748(0x17e)](_0x3fa73c);_0x2076f3[_0x58c748(0x138)]=_0x1b00e4,_0x2076f3[_0x58c748(0x15e)]=_0x1b00e4+_0x58c748(0x176)+_0x1f8b6e,a168_0x3f459f[_0x58c748(0x155)](_0x53d53c,JSON[_0x58c748(0x154)](_0x2076f3,null,0x2)+'\x0a','utf8'),console['log'](_0x58c748(0x128)+_0x1b00e4),logger['info'](_0x58c748(0x191),'Updating\x20package.json\x20name');}catch(_0x1c3780){logger['error'](_0x58c748(0x191),_0x58c748(0x16c));throw _0x1c3780;}}async function configureAppCode(_0x1e7e10,_0x22636b,_0x1c60dc){const _0x2886b9=a168_0x348d,_0xce0f8f=a168_0x51e0b2['resolve'](process['cwd'](),_0x1e7e10),_0x8de3b7=a168_0x51e0b2[_0x2886b9(0x160)](_0xce0f8f,NEW_CONFIG_NAME);try{_0x22636b?console[_0x2886b9(0x149)](_0x2886b9(0x180)+_0x1e7e10+':\x20'+_0x22636b):console[_0x2886b9(0x149)]('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x1e7e10);const _0x5418af=getRabetbaseCliPackageRoot(),_0x545c7b=a168_0x51e0b2[_0x2886b9(0x160)](_0x5418af,_0x2886b9(0x17c));let _0x2a0494=_0x2886b9(0x172);try{const _0x951e2d=JSON['parse'](a168_0x3f459f['readFileSync'](_0x545c7b,_0x2886b9(0x14d)));_0x2a0494=_0x951e2d[_0x2886b9(0x151)]||_0x2886b9(0x172);}catch{}const {globalConfig:_0x509719}=loadRawConfigLayers(),_0x3c74f0=typeof _0x509719['env']===_0x2886b9(0x163)?_0x509719['env']:undefined,_0x1c1d10={};for(const _0xd9f7d5 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x509719[_0xd9f7d5]!=null)_0x1c1d10[_0xd9f7d5]=_0x509719[_0xd9f7d5];}const _0xf3076e=buildCanonicalProjectConfig(_0x1c1d10,{'appCodes':_0x22636b?[_0x22636b]:[],'env':_0x1c60dc||_0x3c74f0||'production','metadata':{'createdAt':new Date()[_0x2886b9(0x18f)](),'version':_0x2a0494}});writeConfigFile(_0x8de3b7,_0xf3076e),await generateSdkConfigFile(a168_0x51e0b2[_0x2886b9(0x160)](_0xce0f8f,DEFAULT_API_DIR),getSdkClientRoutingConfig()),writeProjectRoutingManifest(_0xce0f8f),_0x22636b?console[_0x2886b9(0x149)](_0x2886b9(0x177)+Object[_0x2886b9(0x14f)](_0xf3076e[_0x2886b9(0x12b)]||{})[_0x2886b9(0x160)](',\x20')+_0x2886b9(0x136)):console[_0x2886b9(0x149)](_0x2886b9(0x167)+CLI_BIN_NAME+_0x2886b9(0x153)),logger['info'](_0x2886b9(0x191),_0x2886b9(0x134)+_0x22636b);}catch(_0x2cdc45){logger[_0x2886b9(0x183)](_0x2886b9(0x191),_0x2886b9(0x181));throw _0x2cdc45;}}
@@ -1 +1 @@
1
- const a164_0x452c2f=a164_0x3e8f;(function(_0x3b26d9,_0x2d1dc9){const _0x2ced9b=a164_0x3e8f,_0x23817c=_0x3b26d9();while(!![]){try{const _0x542020=parseInt(_0x2ced9b(0x114))/0x1*(parseInt(_0x2ced9b(0x111))/0x2)+parseInt(_0x2ced9b(0x101))/0x3+parseInt(_0x2ced9b(0x104))/0x4+parseInt(_0x2ced9b(0xfb))/0x5*(parseInt(_0x2ced9b(0xed))/0x6)+-parseInt(_0x2ced9b(0xb0))/0x7+-parseInt(_0x2ced9b(0x11a))/0x8+-parseInt(_0x2ced9b(0xd7))/0x9;if(_0x542020===_0x2d1dc9)break;else _0x23817c['push'](_0x23817c['shift']());}catch(_0xac8d30){_0x23817c['push'](_0x23817c['shift']());}}}(a164_0x4c4f,0x783b4));import{createHash}from'node:crypto';import a164_0x195276 from'node:fs/promises';import a164_0x23c508 from'node:path';import{PROJECT_TEMPLATE_ASSET_BASE_URL}from'../../../constant/cdn.js';import{extractProjectTemplateArchive}from'../../../commands/project/create/project-template-archive.js';function a164_0x3e8f(_0x33ebdb,_0x74959a){_0x33ebdb=_0x33ebdb-0xb0;const _0x4c4fcb=a164_0x4c4f();let _0x3e8f50=_0x4c4fcb[_0x33ebdb];return _0x3e8f50;}import{getRabetbaseCdnConfig}from'../../../utils/cli-version-policy.js';import{CliErrors}from'../../../errors.js';const TEMPLATE_ID=a164_0x452c2f(0xde),ARCHIVE_TIMEOUT_MS=0x3a98,MAX_ARCHIVE_SIZE=0x14*0x400*0x400;function a164_0x4c4f(){const _0x324569=['message','Invalid\x20local\x20template\x20source:\x20','.env','1569744nbCgmb','dist','concat','3906748KHWOmj','.env.','has','projectTemplate','object','update','application/zip','dirname','ENOENT','releaseLock','sha256','.codegraph','resolving','159778jgoMcW','readFile','abort','3cDzNpc','utf8','chmod','length','relative','pathname','3450968GKyAgP','trim','headers','https:','.lovrabet.log','893354MHPGSE','readdir','Local\x20template\x20source\x20does\x20not\x20exist:\x20','realpath','byteLength','CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22','Choose\x20a\x20different\x20project\x20name\x20or\x20remove\x20the\x20directory\x20first.','CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.','number','sha256:','.idea',',\x20received\x20','read','isDirectory','basename','isSafeInteger','code','isFinite','copying','from','.DS_Store','status','Local\x20project\x20template\x20contains\x20a\x20local-only\x20entry:\x20','Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.','Local\x20template\x20source\x20and\x20project\x20output\x20must\x20not\x20overlap.','.rabetbase.json','validation','lstat','Choose\x20an\x20output\x20directory\x20outside\x20the\x20template\x20source.','protocol','resolve','mode','package.json','Rabetbase\x20CDN\x20config\x20is\x20unavailable.','startsWith','body','digest','signal','8597619lZoaFa','dev','Local\x20template\x20source\x20is\x20not\x20a\x20directory:\x20','copyFile','node_modules','local','join','sub-app-react-demo','Pass\x20a\x20directory\x20containing\x20the\x20template\x20source\x20package.json.','push','name','content-length','isFile','.rabetbase','version','mkdtemp','cdn','isSymbolicLink','string','rename','project','includes','156uTjuym','size','ino','template.zip','.rabetbase-create-','hex','Use\x20a\x20different\x20project\x20name.','Project\x20template\x20package.json\x20is\x20invalid.','mkdir','CDN\x20project\x20template\x20checksum\x20verification\x20failed.','Check\x20the\x20source\x20directory\x20and\x20retry.','origin','.git','parse','51375hJLfJQ','Project\x20directory\x20already\x20exists:\x20','test'];a164_0x4c4f=function(){return _0x324569;};return a164_0x4c4f();}function nonEmptyString(_0x2e501b){const _0x11aada=a164_0x452c2f;return typeof _0x2e501b===_0x11aada(0xe9)&&_0x2e501b[_0x11aada(0x11b)]()?_0x2e501b[_0x11aada(0x11b)]():null;}function parseDescriptor(_0x406577){const _0x3971ee=a164_0x452c2f;if(!_0x406577||typeof _0x406577!==_0x3971ee(0x108))throw new Error('CDN\x20config\x20does\x20not\x20define\x20template\x20\x22'+TEMPLATE_ID+'\x22.');const _0x540b72=_0x406577,_0x342935=nonEmptyString(_0x540b72[_0x3971ee(0xe5)]),_0x13fbbe=nonEmptyString(_0x540b72[_0x3971ee(0xe1)]),_0x2c7a97=nonEmptyString(_0x540b72[_0x3971ee(0x10e)])?.['toLowerCase'](),_0x2c3991=_0x540b72[_0x3971ee(0xee)];if(!_0x342935||!_0x13fbbe||_0x13fbbe!==a164_0x23c508['posix']['basename'](_0x13fbbe)||_0x13fbbe[_0x3971ee(0xec)]('\x5c')||!_0x2c7a97||!/^sha256:[a-f0-9]{64}$/[_0x3971ee(0xfd)](_0x2c7a97)||typeof _0x2c3991!==_0x3971ee(0xb8)||!Number[_0x3971ee(0xbf)](_0x2c3991)||_0x2c3991<=0x0||_0x2c3991>MAX_ARCHIVE_SIZE)throw new Error(_0x3971ee(0xb5)+TEMPLATE_ID+'\x22.');return{'version':_0x342935,'name':_0x13fbbe,'sha256':_0x2c7a97,'size':_0x2c3991};}async function fetchWithTimeout(_0x44430a,_0x355294,_0x4b31ad,_0x55d0d0){const _0x464528=a164_0x452c2f,_0x25a146=new AbortController(),_0x126fb6=setTimeout(()=>_0x25a146[_0x464528(0x113)](),_0x355294);try{const _0xf33b2e=await fetch(_0x44430a,{'headers':{'Accept':_0x4b31ad},'signal':_0x25a146[_0x464528(0xd6)]});return await _0x55d0d0(_0xf33b2e);}finally{clearTimeout(_0x126fb6);}}async function fetchTemplateDescriptor(){const _0x2e11af=a164_0x452c2f,_0x45c145=await getRabetbaseCdnConfig();if(!_0x45c145)throw new Error(_0x2e11af(0xd2));return parseDescriptor(_0x45c145[_0x2e11af(0x107)]);}function resolveArchiveUrl(_0x178bc6){const _0x40c728=a164_0x452c2f,_0x4ec0b1=new URL(PROJECT_TEMPLATE_ASSET_BASE_URL+'/'),_0x2be818=new URL(_0x178bc6,_0x4ec0b1);if(_0x2be818[_0x40c728(0xce)]!==_0x40c728(0x11d)||_0x2be818['origin']!==_0x4ec0b1[_0x40c728(0xf8)]||!_0x2be818['pathname'][_0x40c728(0xd3)](_0x4ec0b1[_0x40c728(0x119)]))throw new Error(_0x40c728(0xb7));return _0x2be818['href'];}async function readResponseBytes(_0x20a087,_0x4502e2){const _0x22fc0b=a164_0x452c2f;if(!_0x20a087['body']){const _0x5d4fae=Buffer[_0x22fc0b(0xc3)](await _0x20a087['arrayBuffer']());if(_0x5d4fae['length']>_0x4502e2)throw new Error('CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.');return _0x5d4fae;}const _0x3d020b=_0x20a087[_0x22fc0b(0xd4)]['getReader'](),_0x4880d7=[];let _0x465248=0x0;try{while(!![]){const {done:_0x39f4f8,value:_0x2d0b33}=await _0x3d020b[_0x22fc0b(0xbc)]();if(_0x39f4f8)break;_0x465248+=_0x2d0b33[_0x22fc0b(0xb4)];if(_0x465248>_0x4502e2){await _0x3d020b['cancel']();throw new Error('CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.');}_0x4880d7[_0x22fc0b(0xe0)](Buffer[_0x22fc0b(0xc3)](_0x2d0b33));}}finally{_0x3d020b[_0x22fc0b(0x10d)]();}return Buffer[_0x22fc0b(0x103)](_0x4880d7,_0x465248);}async function downloadArchive(_0x4c7c17,_0x3cb7e1,_0x3b3d63){const _0x477e27=a164_0x452c2f,_0x36eb99=await fetchWithTimeout(resolveArchiveUrl(_0x4c7c17[_0x477e27(0xe1)]),ARCHIVE_TIMEOUT_MS,_0x477e27(0x10a),async _0x48c179=>{const _0x7e0c4d=_0x477e27;if(!_0x48c179['ok'])throw new Error('CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20'+_0x48c179[_0x7e0c4d(0xc5)]+'.');const _0x318869=Number(_0x48c179[_0x7e0c4d(0x11c)]['get'](_0x7e0c4d(0xe2)));if(Number[_0x7e0c4d(0xc1)](_0x318869)&&_0x318869>MAX_ARCHIVE_SIZE)throw new Error(_0x7e0c4d(0xc8));return readResponseBytes(_0x48c179,_0x4c7c17[_0x7e0c4d(0xee)]);});if(_0x36eb99[_0x477e27(0x117)]!==_0x4c7c17[_0x477e27(0xee)])throw new Error('CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20'+_0x4c7c17[_0x477e27(0xee)]+_0x477e27(0xbb)+_0x36eb99[_0x477e27(0x117)]+'.');_0x3b3d63?.('verifying');const _0x5907cb=_0x477e27(0xb9)+createHash(_0x477e27(0x10e))[_0x477e27(0x109)](_0x36eb99)[_0x477e27(0xd5)](_0x477e27(0xf2));if(_0x5907cb!==_0x4c7c17[_0x477e27(0x10e)])throw new Error(_0x477e27(0xf6));await a164_0x195276['writeFile'](_0x3cb7e1,_0x36eb99,{'flag':'wx'});}async function assertTemplateRoot(_0x4905df){const _0x1b4519=a164_0x452c2f,_0xffc16a=a164_0x23c508[_0x1b4519(0xdd)](_0x4905df,_0x1b4519(0xd1)),_0x5d22c3=JSON[_0x1b4519(0xfa)](await a164_0x195276[_0x1b4519(0x112)](_0xffc16a,_0x1b4519(0x115)));if(!_0x5d22c3||typeof _0x5d22c3!==_0x1b4519(0x108))throw new Error(_0x1b4519(0xf4));}const LOCAL_FORBIDDEN_NAMES=new Set([a164_0x452c2f(0xc4),a164_0x452c2f(0x10f),a164_0x452c2f(0xf9),a164_0x452c2f(0xba),'.lovrabet.json',a164_0x452c2f(0x11e),a164_0x452c2f(0xe4),a164_0x452c2f(0xca),a164_0x452c2f(0x102),a164_0x452c2f(0xdb)]);function isForbiddenTemplateEntry(_0x8d7eb9){const _0x3dcc1b=a164_0x452c2f;if(LOCAL_FORBIDDEN_NAMES[_0x3dcc1b(0x106)](_0x8d7eb9))return!![];return _0x8d7eb9===_0x3dcc1b(0x100)||_0x8d7eb9[_0x3dcc1b(0xd3)](_0x3dcc1b(0x105))&&_0x8d7eb9!=='.env.example';}function containsPath(_0x50cbb9,_0x4a31dd){const _0x43f470=a164_0x452c2f,_0x323b8d=a164_0x23c508[_0x43f470(0x118)](_0x50cbb9,_0x4a31dd);return _0x323b8d===''||!_0x323b8d['startsWith']('..'+a164_0x23c508['sep'])&&_0x323b8d!=='..'&&!a164_0x23c508['isAbsolute'](_0x323b8d);}async function copyLocalTemplateDirectory(_0xaeeb1a,_0x5cd9e3){const _0x201e36=a164_0x452c2f;await a164_0x195276[_0x201e36(0xf5)](_0x5cd9e3,{'recursive':!![]});for(const _0x5bec9 of await a164_0x195276[_0x201e36(0xb1)](_0xaeeb1a,{'withFileTypes':!![]})){const _0x3fed3f=a164_0x23c508[_0x201e36(0xdd)](_0xaeeb1a,_0x5bec9[_0x201e36(0xe1)]),_0x5f3909=a164_0x23c508[_0x201e36(0xdd)](_0x5cd9e3,_0x5bec9[_0x201e36(0xe1)]);if(isForbiddenTemplateEntry(_0x5bec9[_0x201e36(0xe1)]))throw new Error(_0x201e36(0xc6)+_0x3fed3f);const _0x3b5248=await a164_0x195276[_0x201e36(0xcc)](_0x3fed3f);if(_0x3b5248[_0x201e36(0xe8)]())throw new Error('Local\x20project\x20template\x20must\x20not\x20contain\x20symlinks:\x20'+_0x3fed3f);if(_0x3b5248[_0x201e36(0xbd)]()){await copyLocalTemplateDirectory(_0x3fed3f,_0x5f3909);continue;}if(!_0x3b5248[_0x201e36(0xe3)]())continue;await a164_0x195276[_0x201e36(0xda)](_0x3fed3f,_0x5f3909),await a164_0x195276[_0x201e36(0x116)](_0x5f3909,_0x3b5248[_0x201e36(0xd0)]&0x1ff);}}async function readTemplateVersion(_0x1039b3){const _0x11b0e0=a164_0x452c2f,_0x5a8498=JSON[_0x11b0e0(0xfa)](await a164_0x195276[_0x11b0e0(0x112)](a164_0x23c508['join'](_0x1039b3,'package.json'),'utf8'));return nonEmptyString(_0x5a8498[_0x11b0e0(0xe5)])||_0x11b0e0(0xdc);}async function readDirectoryIdentity(_0x5d6395){const _0x19b1a5=a164_0x452c2f;try{const _0x2aa734=await a164_0x195276[_0x19b1a5(0xcc)](_0x5d6395);if(!_0x2aa734[_0x19b1a5(0xbd)]())return null;return{'dev':_0x2aa734[_0x19b1a5(0xd8)],'ino':_0x2aa734['ino']};}catch{return null;}}async function commitStagedProject(_0xa3ed4b,_0x28a0ec){const _0x1a81c7=a164_0x452c2f;await a164_0x195276['mkdir'](_0x28a0ec);const _0x3b09ac=await readDirectoryIdentity(_0x28a0ec);if(!_0x3b09ac)throw new Error('Unable\x20to\x20claim\x20the\x20project\x20directory.');try{for(const _0x564dbc of await a164_0x195276[_0x1a81c7(0xb1)](_0xa3ed4b)){await a164_0x195276[_0x1a81c7(0xea)](a164_0x23c508[_0x1a81c7(0xdd)](_0xa3ed4b,_0x564dbc),a164_0x23c508['join'](_0x28a0ec,_0x564dbc));}}catch(_0x3717e1){const _0x2178f8=await readDirectoryIdentity(_0x28a0ec);_0x2178f8?.[_0x1a81c7(0xd8)]===_0x3b09ac[_0x1a81c7(0xd8)]&&_0x2178f8[_0x1a81c7(0xef)]===_0x3b09ac[_0x1a81c7(0xef)]&&await a164_0x195276['rm'](_0x28a0ec,{'recursive':!![],'force':!![]});throw _0x3717e1;}}export async function materializeProjectTemplate(_0x480d87,_0x1a5c41){const _0x5a10c8=a164_0x452c2f,_0x4ab53d=a164_0x23c508['resolve'](_0x480d87),_0x234e8f=a164_0x23c508[_0x5a10c8(0x10b)](_0x4ab53d);try{await a164_0x195276[_0x5a10c8(0xcc)](_0x4ab53d);throw new Error(_0x5a10c8(0xfc)+_0x4ab53d);}catch(_0x446773){if(_0x446773[_0x5a10c8(0xc0)]!==_0x5a10c8(0x10c))throw _0x446773;}const _0x3675ac=await a164_0x195276[_0x5a10c8(0xe6)](a164_0x23c508[_0x5a10c8(0xdd)](_0x234e8f,_0x5a10c8(0xf1))),_0x41167b=a164_0x23c508[_0x5a10c8(0xdd)](_0x3675ac,_0x5a10c8(0xeb)),_0x3f1b5b=a164_0x23c508[_0x5a10c8(0xdd)](_0x3675ac,_0x5a10c8(0xf0));try{try{_0x1a5c41?.(_0x5a10c8(0x110));const _0x30c12c=await fetchTemplateDescriptor();return _0x1a5c41?.('downloading'),await downloadArchive(_0x30c12c,_0x3f1b5b,_0x1a5c41),_0x1a5c41?.('extracting'),await extractProjectTemplateArchive(_0x3f1b5b,_0x41167b),await assertTemplateRoot(_0x41167b),await commitStagedProject(_0x41167b,_0x4ab53d),{'source':_0x5a10c8(0xe7),'version':_0x30c12c['version']};}catch(_0x21225c){if(_0x21225c[_0x5a10c8(0xc0)]==='EEXIST')throw CliErrors['validation'](_0x5a10c8(0xfc)+_0x4ab53d,_0x5a10c8(0xf3));const _0x3bb0e7=_0x21225c instanceof Error?_0x21225c['message']:String(_0x21225c);throw CliErrors[_0x5a10c8(0xcb)](_0x5a10c8(0xc7),'Check\x20your\x20network\x20and\x20retry.\x20Details:\x20'+_0x3bb0e7);}}finally{await a164_0x195276['rm'](_0x3675ac,{'recursive':!![],'force':!![]});}}export async function materializeLocalProjectTemplate(_0x1c36d5,_0x54fcfd,_0xca8a95){const _0x339992=a164_0x452c2f;let _0x74c688;try{_0x74c688=await a164_0x195276[_0x339992(0xb3)](a164_0x23c508[_0x339992(0xcf)](_0x1c36d5));}catch{throw CliErrors[_0x339992(0xcb)](_0x339992(0xb2)+a164_0x23c508['resolve'](_0x1c36d5),_0x339992(0xdf));}const _0x4bf4a9=await a164_0x195276['lstat'](_0x74c688);if(!_0x4bf4a9[_0x339992(0xbd)]())throw CliErrors['validation'](_0x339992(0xd9)+_0x74c688);const _0x50354c=a164_0x23c508[_0x339992(0xcf)](_0x54fcfd),_0x1e5fac=await a164_0x195276[_0x339992(0xb3)](a164_0x23c508[_0x339992(0x10b)](_0x50354c)),_0x28f6f1=a164_0x23c508[_0x339992(0xdd)](_0x1e5fac,a164_0x23c508[_0x339992(0xbe)](_0x50354c));if(containsPath(_0x74c688,_0x28f6f1)||containsPath(_0x28f6f1,_0x74c688))throw CliErrors[_0x339992(0xcb)](_0x339992(0xc9),_0x339992(0xcd));try{await a164_0x195276['lstat'](_0x28f6f1);throw CliErrors[_0x339992(0xcb)](_0x339992(0xfc)+_0x28f6f1,_0x339992(0xb6));}catch(_0x4a1e54){if(_0x4a1e54[_0x339992(0xc0)]!=='ENOENT')throw _0x4a1e54;}const _0x5cdae1=a164_0x23c508[_0x339992(0x10b)](_0x28f6f1);await a164_0x195276['access'](_0x5cdae1);const _0x5b5616=await a164_0x195276[_0x339992(0xe6)](a164_0x23c508['join'](_0x5cdae1,_0x339992(0xf1))),_0x17d2fa=a164_0x23c508[_0x339992(0xdd)](_0x5b5616,_0x339992(0xeb));try{_0xca8a95?.(_0x339992(0xc2)),await copyLocalTemplateDirectory(_0x74c688,_0x17d2fa),await assertTemplateRoot(_0x17d2fa);const _0x1dbb13=await readTemplateVersion(_0x17d2fa);return await commitStagedProject(_0x17d2fa,_0x28f6f1),{'source':_0x339992(0xdc),'version':_0x1dbb13};}catch(_0x59d0ec){const _0x4d0c88=_0x59d0ec instanceof Error?_0x59d0ec[_0x339992(0xfe)]:String(_0x59d0ec);throw CliErrors['validation'](_0x339992(0xff)+_0x4d0c88,_0x339992(0xf7));}finally{await a164_0x195276['rm'](_0x5b5616,{'recursive':!![],'force':!![]});}}
1
+ const a169_0x4f2015=a169_0x573b;function a169_0x573b(_0x2d48f8,_0x37f65a){_0x2d48f8=_0x2d48f8-0x12e;const _0x1257ae=a169_0x1257();let _0x573b06=_0x1257ae[_0x2d48f8];return _0x573b06;}(function(_0x5d0163,_0x44135d){const _0x4eac31=a169_0x573b,_0x2095c7=_0x5d0163();while(!![]){try{const _0x488ca1=-parseInt(_0x4eac31(0x187))/0x1*(parseInt(_0x4eac31(0x175))/0x2)+-parseInt(_0x4eac31(0x185))/0x3*(parseInt(_0x4eac31(0x19c))/0x4)+parseInt(_0x4eac31(0x196))/0x5+-parseInt(_0x4eac31(0x165))/0x6+parseInt(_0x4eac31(0x130))/0x7*(parseInt(_0x4eac31(0x166))/0x8)+-parseInt(_0x4eac31(0x149))/0x9+parseInt(_0x4eac31(0x191))/0xa*(parseInt(_0x4eac31(0x182))/0xb);if(_0x488ca1===_0x44135d)break;else _0x2095c7['push'](_0x2095c7['shift']());}catch(_0x562ecb){_0x2095c7['push'](_0x2095c7['shift']());}}}(a169_0x1257,0x4b0df));import{createHash}from'node:crypto';import a169_0x4a9297 from'node:fs/promises';import a169_0x504e74 from'node:path';import{PROJECT_TEMPLATE_ASSET_BASE_URL}from'../../../constant/cdn.js';import{extractProjectTemplateArchive}from'../../../commands/project/create/project-template-archive.js';import{getRabetbaseCdnConfig}from'../../../utils/cli-version-policy.js';import{CliErrors}from'../../../errors.js';const TEMPLATE_ID='sub-app-react-demo',ARCHIVE_TIMEOUT_MS=0x3a98,MAX_ARCHIVE_SIZE=0x14*0x400*0x400;function nonEmptyString(_0x35c14b){const _0x19eaaf=a169_0x573b;return typeof _0x35c14b==='string'&&_0x35c14b[_0x19eaaf(0x180)]()?_0x35c14b[_0x19eaaf(0x180)]():null;}function parseDescriptor(_0x47db3a){const _0xa4576f=a169_0x573b;if(!_0x47db3a||typeof _0x47db3a!==_0xa4576f(0x132))throw new Error(_0xa4576f(0x140)+TEMPLATE_ID+'\x22.');const _0x423db7=_0x47db3a,_0x28b6f3=nonEmptyString(_0x423db7[_0xa4576f(0x14e)]),_0x427027=nonEmptyString(_0x423db7['name']),_0x12416f=nonEmptyString(_0x423db7[_0xa4576f(0x194)])?.[_0xa4576f(0x133)](),_0xcb3016=_0x423db7[_0xa4576f(0x193)];if(!_0x28b6f3||!_0x427027||_0x427027!==a169_0x504e74['posix'][_0xa4576f(0x136)](_0x427027)||_0x427027['includes']('\x5c')||!_0x12416f||!/^sha256:[a-f0-9]{64}$/[_0xa4576f(0x172)](_0x12416f)||typeof _0xcb3016!==_0xa4576f(0x168)||!Number[_0xa4576f(0x134)](_0xcb3016)||_0xcb3016<=0x0||_0xcb3016>MAX_ARCHIVE_SIZE)throw new Error(_0xa4576f(0x19f)+TEMPLATE_ID+'\x22.');return{'version':_0x28b6f3,'name':_0x427027,'sha256':_0x12416f,'size':_0xcb3016};}async function fetchWithTimeout(_0x69d14c,_0xb059c2,_0x5c75c7,_0x1860d5){const _0x19155c=a169_0x573b,_0x1d55fb=new AbortController(),_0x5952e7=setTimeout(()=>_0x1d55fb[_0x19155c(0x171)](),_0xb059c2);try{const _0x771097=await fetch(_0x69d14c,{'headers':{'Accept':_0x5c75c7},'signal':_0x1d55fb['signal']});return await _0x1860d5(_0x771097);}finally{clearTimeout(_0x5952e7);}}async function fetchTemplateDescriptor(){const _0x2d16f2=a169_0x573b,_0x50782a=await getRabetbaseCdnConfig();if(!_0x50782a)throw new Error(_0x2d16f2(0x190));return parseDescriptor(_0x50782a['projectTemplate']);}function resolveArchiveUrl(_0x20503f){const _0x3f7369=a169_0x573b,_0x29bdc0=new URL(PROJECT_TEMPLATE_ASSET_BASE_URL+'/'),_0x1f44e1=new URL(_0x20503f,_0x29bdc0);if(_0x1f44e1[_0x3f7369(0x167)]!==_0x3f7369(0x18a)||_0x1f44e1['origin']!==_0x29bdc0[_0x3f7369(0x13b)]||!_0x1f44e1[_0x3f7369(0x146)][_0x3f7369(0x16b)](_0x29bdc0[_0x3f7369(0x146)]))throw new Error(_0x3f7369(0x176));return _0x1f44e1['href'];}async function readResponseBytes(_0x1c7d23,_0x3f143e){const _0x2262a7=a169_0x573b;if(!_0x1c7d23[_0x2262a7(0x145)]){const _0x131d1e=Buffer[_0x2262a7(0x14f)](await _0x1c7d23[_0x2262a7(0x184)]());if(_0x131d1e[_0x2262a7(0x163)]>_0x3f143e)throw new Error(_0x2262a7(0x15a));return _0x131d1e;}const _0x482216=_0x1c7d23[_0x2262a7(0x145)]['getReader'](),_0x4e80c0=[];let _0x1bc163=0x0;try{while(!![]){const {done:_0x3b8eba,value:_0x3dab1c}=await _0x482216[_0x2262a7(0x199)]();if(_0x3b8eba)break;_0x1bc163+=_0x3dab1c['byteLength'];if(_0x1bc163>_0x3f143e){await _0x482216[_0x2262a7(0x16d)]();throw new Error('CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.');}_0x4e80c0['push'](Buffer[_0x2262a7(0x14f)](_0x3dab1c));}}finally{_0x482216[_0x2262a7(0x13e)]();}return Buffer[_0x2262a7(0x18f)](_0x4e80c0,_0x1bc163);}async function downloadArchive(_0x369e42,_0xfda001,_0x45e281){const _0x183b0c=a169_0x573b,_0x5ae3d1=await fetchWithTimeout(resolveArchiveUrl(_0x369e42[_0x183b0c(0x139)]),ARCHIVE_TIMEOUT_MS,_0x183b0c(0x17c),async _0x4a5e87=>{const _0x2bb508=_0x183b0c;if(!_0x4a5e87['ok'])throw new Error(_0x2bb508(0x143)+_0x4a5e87[_0x2bb508(0x16f)]+'.');const _0x297811=Number(_0x4a5e87[_0x2bb508(0x150)]['get'](_0x2bb508(0x153)));if(Number['isFinite'](_0x297811)&&_0x297811>MAX_ARCHIVE_SIZE)throw new Error('CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.');return readResponseBytes(_0x4a5e87,_0x369e42[_0x2bb508(0x193)]);});if(_0x5ae3d1[_0x183b0c(0x163)]!==_0x369e42[_0x183b0c(0x193)])throw new Error(_0x183b0c(0x162)+_0x369e42[_0x183b0c(0x193)]+_0x183b0c(0x16e)+_0x5ae3d1[_0x183b0c(0x163)]+'.');_0x45e281?.(_0x183b0c(0x17a));const _0x1c850b=_0x183b0c(0x131)+createHash(_0x183b0c(0x194))[_0x183b0c(0x14b)](_0x5ae3d1)['digest'](_0x183b0c(0x197));if(_0x1c850b!==_0x369e42['sha256'])throw new Error(_0x183b0c(0x189));await a169_0x4a9297[_0x183b0c(0x19e)](_0xfda001,_0x5ae3d1,{'flag':'wx'});}function a169_0x1257(){const _0x36f2db=['CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.','ENOENT','validation','resolve','verifying','.codegraph','application/zip','Local\x20template\x20source\x20and\x20project\x20output\x20must\x20not\x20overlap.','sep','resolving','trim','.rabetbase-create-','414711DPihpY','join','arrayBuffer','7284LKqWOB','isSymbolicLink','159KfZvVJ','.git','CDN\x20project\x20template\x20checksum\x20verification\x20failed.','https:','Check\x20the\x20source\x20directory\x20and\x20retry.','code','copyFile','Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','concat','Rabetbase\x20CDN\x20config\x20is\x20unavailable.','110WMBRtn','Choose\x20an\x20output\x20directory\x20outside\x20the\x20template\x20source.','size','sha256','chmod','1431955XALXAi','hex','Unable\x20to\x20claim\x20the\x20project\x20directory.','read','Project\x20template\x20package.json\x20is\x20invalid.','ino','4zksqlC','EEXIST','writeFile','CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22','template.zip','project','276612zhAQbd','sha256:','object','toLowerCase','isSafeInteger','readFile','basename','.env.','dirname','name','lstat','origin','local','.lovrabet.log','releaseLock','parse','CDN\x20config\x20does\x20not\x20define\x20template\x20\x22','cdn','isDirectory','CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20','readdir','body','pathname','.DS_Store','rename','581292VXDBad','isFile','update','relative','message','version','from','headers','isAbsolute','.lovrabet.json','content-length','dist','Project\x20directory\x20already\x20exists:\x20','Pass\x20a\x20directory\x20containing\x20the\x20template\x20source\x20package.json.','Local\x20template\x20source\x20does\x20not\x20exist:\x20','.idea','.env','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','mkdtemp','realpath','.rabetbase','.env.example','Local\x20project\x20template\x20must\x20not\x20contain\x20symlinks:\x20','downloading','Invalid\x20local\x20template\x20source:\x20','CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20','length','utf8','1801380tzrKUB','72WEBTnh','protocol','number','Choose\x20a\x20different\x20project\x20name\x20or\x20remove\x20the\x20directory\x20first.','package.json','startsWith','dev','cancel',',\x20received\x20','status','Check\x20your\x20network\x20and\x20retry.\x20Details:\x20','abort','test','extracting','has','4806IKWndU'];a169_0x1257=function(){return _0x36f2db;};return a169_0x1257();}async function assertTemplateRoot(_0x13a2d5){const _0x2475db=a169_0x573b,_0x4a4aae=a169_0x504e74[_0x2475db(0x183)](_0x13a2d5,_0x2475db(0x16a)),_0x27f2d3=JSON[_0x2475db(0x13f)](await a169_0x4a9297[_0x2475db(0x135)](_0x4a4aae,_0x2475db(0x164)));if(!_0x27f2d3||typeof _0x27f2d3!==_0x2475db(0x132))throw new Error(_0x2475db(0x19a));}const LOCAL_FORBIDDEN_NAMES=new Set([a169_0x4f2015(0x147),a169_0x4f2015(0x17b),a169_0x4f2015(0x188),a169_0x4f2015(0x158),a169_0x4f2015(0x152),a169_0x4f2015(0x13d),a169_0x4f2015(0x15d),'.rabetbase.json',a169_0x4f2015(0x154),'node_modules']);function isForbiddenTemplateEntry(_0x50f31b){const _0xe06542=a169_0x4f2015;if(LOCAL_FORBIDDEN_NAMES[_0xe06542(0x174)](_0x50f31b))return!![];return _0x50f31b===_0xe06542(0x159)||_0x50f31b['startsWith'](_0xe06542(0x137))&&_0x50f31b!==_0xe06542(0x15e);}function containsPath(_0x5b4225,_0x256d06){const _0x134266=a169_0x4f2015,_0x3a8509=a169_0x504e74[_0x134266(0x14c)](_0x5b4225,_0x256d06);return _0x3a8509===''||!_0x3a8509[_0x134266(0x16b)]('..'+a169_0x504e74[_0x134266(0x17e)])&&_0x3a8509!=='..'&&!a169_0x504e74[_0x134266(0x151)](_0x3a8509);}async function copyLocalTemplateDirectory(_0x228b58,_0x50dc6a){const _0x1dc48f=a169_0x4f2015;await a169_0x4a9297['mkdir'](_0x50dc6a,{'recursive':!![]});for(const _0x369064 of await a169_0x4a9297[_0x1dc48f(0x144)](_0x228b58,{'withFileTypes':!![]})){const _0x476daa=a169_0x504e74[_0x1dc48f(0x183)](_0x228b58,_0x369064[_0x1dc48f(0x139)]),_0x7a79bd=a169_0x504e74['join'](_0x50dc6a,_0x369064[_0x1dc48f(0x139)]);if(isForbiddenTemplateEntry(_0x369064[_0x1dc48f(0x139)]))throw new Error('Local\x20project\x20template\x20contains\x20a\x20local-only\x20entry:\x20'+_0x476daa);const _0x490864=await a169_0x4a9297['lstat'](_0x476daa);if(_0x490864[_0x1dc48f(0x186)]())throw new Error(_0x1dc48f(0x15f)+_0x476daa);if(_0x490864[_0x1dc48f(0x142)]()){await copyLocalTemplateDirectory(_0x476daa,_0x7a79bd);continue;}if(!_0x490864[_0x1dc48f(0x14a)]())continue;await a169_0x4a9297[_0x1dc48f(0x18d)](_0x476daa,_0x7a79bd),await a169_0x4a9297[_0x1dc48f(0x195)](_0x7a79bd,_0x490864['mode']&0x1ff);}}async function readTemplateVersion(_0x172700){const _0x82032a=a169_0x4f2015,_0x25ff6f=JSON[_0x82032a(0x13f)](await a169_0x4a9297[_0x82032a(0x135)](a169_0x504e74[_0x82032a(0x183)](_0x172700,_0x82032a(0x16a)),'utf8'));return nonEmptyString(_0x25ff6f[_0x82032a(0x14e)])||'local';}async function readDirectoryIdentity(_0x1e121a){const _0x1af6e1=a169_0x4f2015;try{const _0x33bddc=await a169_0x4a9297[_0x1af6e1(0x13a)](_0x1e121a);if(!_0x33bddc[_0x1af6e1(0x142)]())return null;return{'dev':_0x33bddc['dev'],'ino':_0x33bddc[_0x1af6e1(0x19b)]};}catch{return null;}}async function commitStagedProject(_0xc83e78,_0x289e9f){const _0x70e66a=a169_0x4f2015;await a169_0x4a9297['mkdir'](_0x289e9f);const _0x4727b4=await readDirectoryIdentity(_0x289e9f);if(!_0x4727b4)throw new Error(_0x70e66a(0x198));try{for(const _0x5a4592 of await a169_0x4a9297[_0x70e66a(0x144)](_0xc83e78)){await a169_0x4a9297[_0x70e66a(0x148)](a169_0x504e74[_0x70e66a(0x183)](_0xc83e78,_0x5a4592),a169_0x504e74[_0x70e66a(0x183)](_0x289e9f,_0x5a4592));}}catch(_0x1ec99d){const _0x3af55e=await readDirectoryIdentity(_0x289e9f);_0x3af55e?.[_0x70e66a(0x16c)]===_0x4727b4[_0x70e66a(0x16c)]&&_0x3af55e[_0x70e66a(0x19b)]===_0x4727b4[_0x70e66a(0x19b)]&&await a169_0x4a9297['rm'](_0x289e9f,{'recursive':!![],'force':!![]});throw _0x1ec99d;}}export async function materializeProjectTemplate(_0x348270,_0x2d6a02){const _0x2d071a=a169_0x4f2015,_0x1a7564=a169_0x504e74[_0x2d071a(0x179)](_0x348270),_0x109bee=a169_0x504e74['dirname'](_0x1a7564);try{await a169_0x4a9297[_0x2d071a(0x13a)](_0x1a7564);throw new Error(_0x2d071a(0x155)+_0x1a7564);}catch(_0xd41c71){if(_0xd41c71[_0x2d071a(0x18c)]!==_0x2d071a(0x177))throw _0xd41c71;}const _0x532693=await a169_0x4a9297[_0x2d071a(0x15b)](a169_0x504e74[_0x2d071a(0x183)](_0x109bee,_0x2d071a(0x181))),_0x179fb3=a169_0x504e74[_0x2d071a(0x183)](_0x532693,_0x2d071a(0x12f)),_0x4512b4=a169_0x504e74[_0x2d071a(0x183)](_0x532693,_0x2d071a(0x12e));try{try{_0x2d6a02?.(_0x2d071a(0x17f));const _0x25afc2=await fetchTemplateDescriptor();return _0x2d6a02?.(_0x2d071a(0x160)),await downloadArchive(_0x25afc2,_0x4512b4,_0x2d6a02),_0x2d6a02?.(_0x2d071a(0x173)),await extractProjectTemplateArchive(_0x4512b4,_0x179fb3),await assertTemplateRoot(_0x179fb3),await commitStagedProject(_0x179fb3,_0x1a7564),{'source':_0x2d071a(0x141),'version':_0x25afc2[_0x2d071a(0x14e)]};}catch(_0xc57fa0){if(_0xc57fa0[_0x2d071a(0x18c)]===_0x2d071a(0x19d))throw CliErrors['validation'](_0x2d071a(0x155)+_0x1a7564,'Use\x20a\x20different\x20project\x20name.');const _0xf8236d=_0xc57fa0 instanceof Error?_0xc57fa0[_0x2d071a(0x14d)]:String(_0xc57fa0);throw CliErrors[_0x2d071a(0x178)](_0x2d071a(0x18e),_0x2d071a(0x170)+_0xf8236d);}}finally{await a169_0x4a9297['rm'](_0x532693,{'recursive':!![],'force':!![]});}}export async function materializeLocalProjectTemplate(_0x21ad4c,_0x5d364a,_0x246062){const _0x466d06=a169_0x4f2015;let _0x190244;try{_0x190244=await a169_0x4a9297[_0x466d06(0x15c)](a169_0x504e74[_0x466d06(0x179)](_0x21ad4c));}catch{throw CliErrors[_0x466d06(0x178)](_0x466d06(0x157)+a169_0x504e74[_0x466d06(0x179)](_0x21ad4c),_0x466d06(0x156));}const _0xed5c97=await a169_0x4a9297[_0x466d06(0x13a)](_0x190244);if(!_0xed5c97[_0x466d06(0x142)]())throw CliErrors[_0x466d06(0x178)]('Local\x20template\x20source\x20is\x20not\x20a\x20directory:\x20'+_0x190244);const _0x56a36f=a169_0x504e74[_0x466d06(0x179)](_0x5d364a),_0x18cc82=await a169_0x4a9297[_0x466d06(0x15c)](a169_0x504e74['dirname'](_0x56a36f)),_0x433428=a169_0x504e74[_0x466d06(0x183)](_0x18cc82,a169_0x504e74[_0x466d06(0x136)](_0x56a36f));if(containsPath(_0x190244,_0x433428)||containsPath(_0x433428,_0x190244))throw CliErrors['validation'](_0x466d06(0x17d),_0x466d06(0x192));try{await a169_0x4a9297[_0x466d06(0x13a)](_0x433428);throw CliErrors[_0x466d06(0x178)]('Project\x20directory\x20already\x20exists:\x20'+_0x433428,_0x466d06(0x169));}catch(_0x315021){if(_0x315021[_0x466d06(0x18c)]!==_0x466d06(0x177))throw _0x315021;}const _0x5a5bc6=a169_0x504e74[_0x466d06(0x138)](_0x433428);await a169_0x4a9297['access'](_0x5a5bc6);const _0x54ad38=await a169_0x4a9297[_0x466d06(0x15b)](a169_0x504e74['join'](_0x5a5bc6,_0x466d06(0x181))),_0x105ec2=a169_0x504e74[_0x466d06(0x183)](_0x54ad38,_0x466d06(0x12f));try{_0x246062?.('copying'),await copyLocalTemplateDirectory(_0x190244,_0x105ec2),await assertTemplateRoot(_0x105ec2);const _0x36cb82=await readTemplateVersion(_0x105ec2);return await commitStagedProject(_0x105ec2,_0x433428),{'source':_0x466d06(0x13c),'version':_0x36cb82};}catch(_0x2d2678){const _0x56cbd7=_0x2d2678 instanceof Error?_0x2d2678['message']:String(_0x2d2678);throw CliErrors[_0x466d06(0x178)](_0x466d06(0x161)+_0x56cbd7,_0x466d06(0x18b));}finally{await a169_0x4a9297['rm'](_0x54ad38,{'recursive':!![],'force':!![]});}}
@@ -1 +1 @@
1
- (function(_0x228846,_0x414a63){const _0x2d91d5=a165_0x43d4,_0x134829=_0x228846();while(!![]){try{const _0x35c561=-parseInt(_0x2d91d5(0x95))/0x1*(parseInt(_0x2d91d5(0x84))/0x2)+parseInt(_0x2d91d5(0x8e))/0x3+-parseInt(_0x2d91d5(0x97))/0x4*(parseInt(_0x2d91d5(0x9a))/0x5)+parseInt(_0x2d91d5(0x96))/0x6*(parseInt(_0x2d91d5(0x8a))/0x7)+-parseInt(_0x2d91d5(0x87))/0x8*(parseInt(_0x2d91d5(0x85))/0x9)+-parseInt(_0x2d91d5(0x8c))/0xa*(-parseInt(_0x2d91d5(0x99))/0xb)+parseInt(_0x2d91d5(0x93))/0xc*(-parseInt(_0x2d91d5(0x8d))/0xd);if(_0x35c561===_0x414a63)break;else _0x134829['push'](_0x134829['shift']());}catch(_0x318dcf){_0x134829['push'](_0x134829['shift']());}}}(a165_0x1464,0x7eb03));function a165_0x1464(){const _0x4c2ee3=['2632656HWMoYf','\x22\x20is\x20reserved\x20on\x20Windows','trim','test','Use\x20a\x20portable\x20directory\x20name\x20without\x20path\x20separators.','192xiMpGa','\x20characters','27736jZZUOC','5791152SqJLrm','4XlchhV','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','1159169Jvgqok','3784855cauVnh','18sgmrAH','21123xAGVpu','Project\x20name\x20\x22','2488KEmnhf','validation','Project\x20name\x20cannot\x20exceed\x20','7JGcbvR','length','90qgoBgh','435279TUNKIx'];a165_0x1464=function(){return _0x4c2ee3;};return a165_0x1464();}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 a165_0x43d4(_0x33ed7d,_0x10030d){_0x33ed7d=_0x33ed7d-0x84;const _0x1464c8=a165_0x1464();let _0x43d41b=_0x1464c8[_0x33ed7d];return _0x43d41b;}export function getProjectNameValidationError(_0x5b151a){const _0x202faa=a165_0x43d4,_0x55c615=_0x5b151a[_0x202faa(0x90)]();if(!_0x55c615)return'Project\x20name\x20cannot\x20be\x20empty';if(_0x55c615[_0x202faa(0x8b)]>MAX_PROJECT_NAME_LENGTH)return _0x202faa(0x89)+MAX_PROJECT_NAME_LENGTH+_0x202faa(0x94);if(!PROJECT_NAME_PATTERN['test'](_0x55c615))return _0x202faa(0x98);if(WINDOWS_RESERVED_NAME[_0x202faa(0x91)](_0x55c615))return _0x202faa(0x86)+_0x55c615+_0x202faa(0x8f);return null;}export function validateProjectName(_0x18c169){const _0x259afd=a165_0x43d4,_0x131eb7=_0x18c169[_0x259afd(0x90)](),_0x51aac9=getProjectNameValidationError(_0x131eb7);if(_0x51aac9)throw CliErrors[_0x259afd(0x88)](_0x51aac9,_0x259afd(0x92));return _0x131eb7;}
1
+ (function(_0x2ef536,_0x5e32a7){const _0x2101e9=a170_0x5ae2,_0x28c2b3=_0x2ef536();while(!![]){try{const _0x220321=parseInt(_0x2101e9(0xf0))/0x1*(parseInt(_0x2101e9(0xe8))/0x2)+-parseInt(_0x2101e9(0xee))/0x3*(-parseInt(_0x2101e9(0xdf))/0x4)+-parseInt(_0x2101e9(0xe3))/0x5*(parseInt(_0x2101e9(0xe5))/0x6)+parseInt(_0x2101e9(0xf1))/0x7+parseInt(_0x2101e9(0xde))/0x8*(parseInt(_0x2101e9(0xe7))/0x9)+parseInt(_0x2101e9(0xdd))/0xa*(parseInt(_0x2101e9(0xe4))/0xb)+-parseInt(_0x2101e9(0xea))/0xc*(parseInt(_0x2101e9(0xe6))/0xd);if(_0x220321===_0x5e32a7)break;else _0x28c2b3['push'](_0x28c2b3['shift']());}catch(_0x860afe){_0x28c2b3['push'](_0x28c2b3['shift']());}}}(a170_0x4620,0x1e596));import{CliErrors}from'../../../errors.js';function a170_0x4620(){const _0x51397c=['\x20characters','41cQOOXc','875406gsyiPu','604250qdHwUj','88MGfYZh','16ykqkJI','Project\x20name\x20\x22','Project\x20name\x20cannot\x20exceed\x20','Project\x20name\x20cannot\x20be\x20empty','70Qldxix','44UhxQtx','13350irMuFp','2483MpwtlS','97731uFbwGK','6810pceKZu','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','44448LclGHX','trim','Use\x20a\x20portable\x20directory\x20name\x20without\x20path\x20separators.','\x22\x20is\x20reserved\x20on\x20Windows','177834WqrxiG'];a170_0x4620=function(){return _0x51397c;};return a170_0x4620();}const PROJECT_NAME_PATTERN=/^[A-Za-z0-9][A-Za-z0-9_-]*$/,WINDOWS_RESERVED_NAME=/^(con|prn|aux|nul|com[1-9]|lpt[1-9])$/i,MAX_PROJECT_NAME_LENGTH=0x64;export function getProjectNameValidationError(_0x5e42d0){const _0x3d63af=a170_0x5ae2,_0x44696b=_0x5e42d0[_0x3d63af(0xeb)]();if(!_0x44696b)return _0x3d63af(0xe2);if(_0x44696b['length']>MAX_PROJECT_NAME_LENGTH)return _0x3d63af(0xe1)+MAX_PROJECT_NAME_LENGTH+_0x3d63af(0xef);if(!PROJECT_NAME_PATTERN['test'](_0x44696b))return _0x3d63af(0xe9);if(WINDOWS_RESERVED_NAME['test'](_0x44696b))return _0x3d63af(0xe0)+_0x44696b+_0x3d63af(0xed);return null;}function a170_0x5ae2(_0x1a9526,_0x5eef76){_0x1a9526=_0x1a9526-0xdd;const _0x4620c9=a170_0x4620();let _0x5ae2f4=_0x4620c9[_0x1a9526];return _0x5ae2f4;}export function validateProjectName(_0x3e0b1e){const _0x316eca=a170_0x5ae2,_0x411cfd=_0x3e0b1e['trim'](),_0xfe53bc=getProjectNameValidationError(_0x411cfd);if(_0xfe53bc)throw CliErrors['validation'](_0xfe53bc,_0x316eca(0xec));return _0x411cfd;}
@@ -1 +1 @@
1
- (function(_0x53a540,_0x187330){const _0x2859ad=a166_0x5993,_0x3d035a=_0x53a540();while(!![]){try{const _0x29c6f0=parseInt(_0x2859ad(0x1d0))/0x1*(-parseInt(_0x2859ad(0x1a3))/0x2)+parseInt(_0x2859ad(0x1ab))/0x3*(parseInt(_0x2859ad(0x1a2))/0x4)+-parseInt(_0x2859ad(0x1ce))/0x5+parseInt(_0x2859ad(0x1c8))/0x6+-parseInt(_0x2859ad(0x1b9))/0x7+parseInt(_0x2859ad(0x1cd))/0x8+-parseInt(_0x2859ad(0x1ca))/0x9*(-parseInt(_0x2859ad(0x1c5))/0xa);if(_0x29c6f0===_0x187330)break;else _0x3d035a['push'](_0x3d035a['shift']());}catch(_0x31c575){_0x3d035a['push'](_0x3d035a['shift']());}}}(a166_0x5cdc,0xb5d17));function a166_0x5993(_0x526a7b,_0x4efde2){_0x526a7b=_0x526a7b-0x1a2;const _0x5cdc80=a166_0x5cdc();let _0x5993a8=_0x5cdc80[_0x526a7b];return _0x5993a8;}function a166_0x5cdc(){const _0xe84ac8=['500EMBuly','292860vOAkhL','toLocaleLowerCase','externalFileAttributes','Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.','test','ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20','Unable\x20to\x20open\x20project\x20template\x20archive.','23301KAveKg','\x20entries.','isEncrypted','get','resolve','Case-conflicting\x20ZIP\x20entry\x20path:\x20','Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20','sep','close','has','Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20','error','length','en-US','2166640gSNqir','add','join','open','endsWith','dirname','Project\x20template\x20ZIP\x20exceeds\x20','split','Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20','once','slice','readEntry','5703820ZuRNGS','entry','fileName','2071422DZOvew','Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20','9nOilxe','mkdir','uncompressedSize','5158640LMJcxX','5921085VWCFau','set','2FbsSwh'];a166_0x5cdc=function(){return _0xe84ac8;};return a166_0x5cdc();}import{createWriteStream}from'node:fs';import a166_0x58a9e2 from'node:fs/promises';import a166_0x5219c7 from'node:path';import{pipeline}from'node:stream/promises';import a166_0x1f2ef5 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(_0x287653){return new Promise((_0x1ce57f,_0x158fce)=>{const _0xe0b412=a166_0x5993;a166_0x1f2ef5[_0xe0b412(0x1bc)](_0x287653,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x324e9e,_0x397fca)=>{const _0x17c10f=_0xe0b412;if(_0x324e9e||!_0x397fca){_0x158fce(_0x324e9e||new Error(_0x17c10f(0x1aa)));return;}_0x1ce57f(_0x397fca);});});}function openEntryStream(_0x5057a0,_0x150a87){return new Promise((_0x11eb60,_0x200c40)=>{_0x5057a0['openReadStream'](_0x150a87,(_0x46655f,_0x1da0ea)=>{const _0x1cb533=a166_0x5993;if(_0x46655f||!_0x1da0ea){_0x200c40(_0x46655f||new Error('Unable\x20to\x20read\x20ZIP\x20entry:\x20'+_0x150a87[_0x1cb533(0x1c7)]));return;}_0x11eb60(_0x1da0ea);});});}function validateEntryPath(_0x1c4607){const _0x142c46=a166_0x5993,_0x44e8d8=_0x1c4607['replace'](/\\/g,'/'),_0x34e198=_0x44e8d8[_0x142c46(0x1bd)]('/'),_0x5ed43b=_0x34e198?_0x44e8d8[_0x142c46(0x1c3)](0x0,-0x1):_0x44e8d8;if(!_0x5ed43b||_0x44e8d8['startsWith']('/')||/^[A-Za-z]:\//[_0x142c46(0x1a8)](_0x44e8d8))throw new Error(_0x142c46(0x1c1)+_0x1c4607);const _0xa2bf22=_0x5ed43b[_0x142c46(0x1c0)]('/');for(const _0x10203b of _0xa2bf22){if(!_0x10203b||_0x10203b==='.'||_0x10203b==='..'||_0x10203b[_0x142c46(0x1bd)]('.')||_0x10203b[_0x142c46(0x1bd)]('\x20')||WINDOWS_INVALID_CHAR[_0x142c46(0x1a8)](_0x10203b)||WINDOWS_RESERVED_NAME[_0x142c46(0x1a8)](_0x10203b))throw new Error(_0x142c46(0x1c9)+_0x1c4607);}return{'relativePath':_0xa2bf22[_0x142c46(0x1bb)](a166_0x5219c7[_0x142c46(0x1b2)]),'directory':_0x34e198};}function isSymbolicLink(_0x2d68a0){const _0x9f795f=a166_0x5993,_0xeb2e5c=_0x2d68a0[_0x9f795f(0x1a5)]>>>0x10&0xffff;return(_0xeb2e5c&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0x397ac5,_0x422f8a){const _0x1fc3b0=a166_0x5993,_0x1ebeb9=await openZip(_0x397ac5),_0x278af8=a166_0x5219c7[_0x1fc3b0(0x1af)](_0x422f8a),_0x1dc59b=new Set(),_0x3cba9c=new Map();let _0x82ed2c=0x0,_0xe34048=0x0;await a166_0x58a9e2['mkdir'](_0x278af8,{'recursive':!![]}),await new Promise((_0xe424e0,_0x1e7434)=>{const _0x4100a9=_0x1fc3b0;let _0x2e2370=![];const _0x223bce=_0x1485fb=>{const _0x48181a=a166_0x5993;if(_0x2e2370)return;_0x2e2370=!![],_0x1ebeb9[_0x48181a(0x1b3)](),_0x1e7434(_0x1485fb instanceof Error?_0x1485fb:new Error(String(_0x1485fb)));};_0x1ebeb9[_0x4100a9(0x1c2)](_0x4100a9(0x1b6),_0x223bce),_0x1ebeb9['once']('end',()=>{if(_0x2e2370)return;_0x2e2370=!![],_0xe424e0();}),_0x1ebeb9['on'](_0x4100a9(0x1c6),_0x62b818=>{void(async()=>{const _0x17a1d2=a166_0x5993;_0x82ed2c+=0x1,_0xe34048+=_0x62b818[_0x17a1d2(0x1cc)];if(_0x82ed2c>MAX_ENTRY_COUNT)throw new Error(_0x17a1d2(0x1bf)+MAX_ENTRY_COUNT+_0x17a1d2(0x1ac));if(_0xe34048>MAX_UNCOMPRESSED_SIZE)throw new Error(_0x17a1d2(0x1a7));if(_0x62b818[_0x17a1d2(0x1ad)]())throw new Error(_0x17a1d2(0x1b5)+_0x62b818['fileName']);if(isSymbolicLink(_0x62b818))throw new Error(_0x17a1d2(0x1b1)+_0x62b818[_0x17a1d2(0x1c7)]);const {relativePath:_0x36bc95,directory:_0x403e09}=validateEntryPath(_0x62b818[_0x17a1d2(0x1c7)]),_0x4e6359=_0x36bc95['split'](a166_0x5219c7[_0x17a1d2(0x1b2)]);for(let _0xc64ed4=0x1;_0xc64ed4<=_0x4e6359[_0x17a1d2(0x1b7)];_0xc64ed4+=0x1){const _0x467d5e=_0x4e6359[_0x17a1d2(0x1c3)](0x0,_0xc64ed4)[_0x17a1d2(0x1bb)](a166_0x5219c7[_0x17a1d2(0x1b2)]),_0x22d02a=_0x467d5e[_0x17a1d2(0x1a4)](_0x17a1d2(0x1b8)),_0xaf64b4=_0x3cba9c[_0x17a1d2(0x1ae)](_0x22d02a);if(_0xaf64b4&&_0xaf64b4!==_0x467d5e)throw new Error(_0x17a1d2(0x1b0)+_0x62b818['fileName']);_0x3cba9c[_0x17a1d2(0x1cf)](_0x22d02a,_0x467d5e);}const _0x1a7a1d=_0x36bc95[_0x17a1d2(0x1a4)](_0x17a1d2(0x1b8));if(_0x1dc59b[_0x17a1d2(0x1b4)](_0x1a7a1d))throw new Error(_0x17a1d2(0x1a6)+_0x62b818['fileName']);_0x1dc59b[_0x17a1d2(0x1ba)](_0x1a7a1d);const _0x5515a7=a166_0x5219c7['resolve'](_0x278af8,_0x36bc95);if(_0x5515a7!==_0x278af8&&!_0x5515a7['startsWith'](''+_0x278af8+a166_0x5219c7[_0x17a1d2(0x1b2)]))throw new Error(_0x17a1d2(0x1a9)+_0x62b818[_0x17a1d2(0x1c7)]);if(_0x403e09)await a166_0x58a9e2[_0x17a1d2(0x1cb)](_0x5515a7,{'recursive':!![]});else{await a166_0x58a9e2[_0x17a1d2(0x1cb)](a166_0x5219c7[_0x17a1d2(0x1be)](_0x5515a7),{'recursive':!![]});const _0x392083=await openEntryStream(_0x1ebeb9,_0x62b818);await pipeline(_0x392083,createWriteStream(_0x5515a7,{'flags':'wx','mode':0x1a4}));}_0x1ebeb9[_0x17a1d2(0x1c4)]();})()['catch'](_0x223bce);}),_0x1ebeb9[_0x4100a9(0x1c4)]();});}
1
+ (function(_0x4e06c3,_0x27d9d8){const _0x1cdda5=a171_0x4d81,_0xbf066=_0x4e06c3();while(!![]){try{const _0xa3b27b=parseInt(_0x1cdda5(0x19b))/0x1+-parseInt(_0x1cdda5(0x1b1))/0x2+parseInt(_0x1cdda5(0x193))/0x3*(parseInt(_0x1cdda5(0x1b6))/0x4)+-parseInt(_0x1cdda5(0x1af))/0x5+parseInt(_0x1cdda5(0x1b0))/0x6*(-parseInt(_0x1cdda5(0x192))/0x7)+-parseInt(_0x1cdda5(0x1b3))/0x8+parseInt(_0x1cdda5(0x1a1))/0x9*(parseInt(_0x1cdda5(0x1aa))/0xa);if(_0xa3b27b===_0x27d9d8)break;else _0xbf066['push'](_0xbf066['shift']());}catch(_0x47b8c5){_0xbf066['push'](_0xbf066['shift']());}}}(a171_0x4a9e,0xcfa9b));import{createWriteStream}from'node:fs';function a171_0x4a9e(){const _0x5f315a=['toLocaleLowerCase','openReadStream','endsWith','startsWith','uncompressedSize','fileName','1435958TcHzuU','Unable\x20to\x20open\x20project\x20template\x20archive.','once','test','add','Project\x20template\x20ZIP\x20exceeds\x20','6816006UXxNvs','mkdir','Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20','Unable\x20to\x20read\x20ZIP\x20entry:\x20','open','split','resolve','entry','readEntry','50ipZdae','sep','error','en-US','isEncrypted','6172335cnutXW','112740fcbOta','2260980DZwWKD','Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20','12700296SbShUm','length','dirname','68QWoPKi','Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20','Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20','slice','Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20','externalFileAttributes','join','553fBhYXo','187917SNfSnR','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.'];a171_0x4a9e=function(){return _0x5f315a;};return a171_0x4a9e();}import a171_0x531141 from'node:fs/promises';import a171_0x205fa1 from'node:path';import{pipeline}from'node:stream/promises';import a171_0x2ef305 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(_0x4c97dc){return new Promise((_0x2f9598,_0x318992)=>{const _0x3e0f3f=a171_0x4d81;a171_0x2ef305[_0x3e0f3f(0x1a5)](_0x4c97dc,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x2fd9a2,_0x5930f9)=>{const _0x5c1250=_0x3e0f3f;if(_0x2fd9a2||!_0x5930f9){_0x318992(_0x2fd9a2||new Error(_0x5c1250(0x19c)));return;}_0x2f9598(_0x5930f9);});});}function a171_0x4d81(_0x5aca8f,_0x316784){_0x5aca8f=_0x5aca8f-0x18c;const _0x4a9e2a=a171_0x4a9e();let _0x4d81cd=_0x4a9e2a[_0x5aca8f];return _0x4d81cd;}function openEntryStream(_0x3d87f6,_0x59927e){return new Promise((_0x44f4d0,_0x1872de)=>{const _0x491eb3=a171_0x4d81;_0x3d87f6[_0x491eb3(0x196)](_0x59927e,(_0x32f263,_0x99b4e1)=>{const _0x2bb6ba=_0x491eb3;if(_0x32f263||!_0x99b4e1){_0x1872de(_0x32f263||new Error(_0x2bb6ba(0x1a4)+_0x59927e[_0x2bb6ba(0x19a)]));return;}_0x44f4d0(_0x99b4e1);});});}function validateEntryPath(_0x596654){const _0xd057fc=a171_0x4d81,_0x193d17=_0x596654['replace'](/\\/g,'/'),_0x1ee077=_0x193d17[_0xd057fc(0x197)]('/'),_0x286dd3=_0x1ee077?_0x193d17[_0xd057fc(0x18e)](0x0,-0x1):_0x193d17;if(!_0x286dd3||_0x193d17[_0xd057fc(0x198)]('/')||/^[A-Za-z]:\//[_0xd057fc(0x19e)](_0x193d17))throw new Error(_0xd057fc(0x18d)+_0x596654);const _0x1bfe93=_0x286dd3['split']('/');for(const _0x66dc3b of _0x1bfe93){if(!_0x66dc3b||_0x66dc3b==='.'||_0x66dc3b==='..'||_0x66dc3b['endsWith']('.')||_0x66dc3b[_0xd057fc(0x197)]('\x20')||WINDOWS_INVALID_CHAR[_0xd057fc(0x19e)](_0x66dc3b)||WINDOWS_RESERVED_NAME[_0xd057fc(0x19e)](_0x66dc3b))throw new Error(_0xd057fc(0x18c)+_0x596654);}return{'relativePath':_0x1bfe93[_0xd057fc(0x191)](a171_0x205fa1['sep']),'directory':_0x1ee077};}function isSymbolicLink(_0x1be8c9){const _0x33e0f9=a171_0x4d81,_0x5591d7=_0x1be8c9[_0x33e0f9(0x190)]>>>0x10&0xffff;return(_0x5591d7&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0x35478e,_0x3ed457){const _0x3a43d1=a171_0x4d81,_0x2e0159=await openZip(_0x35478e),_0x1c57e9=a171_0x205fa1[_0x3a43d1(0x1a7)](_0x3ed457),_0xaa3856=new Set(),_0x4659bf=new Map();let _0x3f75a1=0x0,_0x478b48=0x0;await a171_0x531141[_0x3a43d1(0x1a2)](_0x1c57e9,{'recursive':!![]}),await new Promise((_0x9a4ad4,_0x1121ec)=>{const _0x3e563e=_0x3a43d1;let _0x345ad3=![];const _0x4aab27=_0x4d3570=>{if(_0x345ad3)return;_0x345ad3=!![],_0x2e0159['close'](),_0x1121ec(_0x4d3570 instanceof Error?_0x4d3570:new Error(String(_0x4d3570)));};_0x2e0159[_0x3e563e(0x19d)](_0x3e563e(0x1ac),_0x4aab27),_0x2e0159['once']('end',()=>{if(_0x345ad3)return;_0x345ad3=!![],_0x9a4ad4();}),_0x2e0159['on'](_0x3e563e(0x1a8),_0x2ff9dc=>{void(async()=>{const _0x15e884=a171_0x4d81;_0x3f75a1+=0x1,_0x478b48+=_0x2ff9dc[_0x15e884(0x199)];if(_0x3f75a1>MAX_ENTRY_COUNT)throw new Error(_0x15e884(0x1a0)+MAX_ENTRY_COUNT+'\x20entries.');if(_0x478b48>MAX_UNCOMPRESSED_SIZE)throw new Error(_0x15e884(0x194));if(_0x2ff9dc[_0x15e884(0x1ae)]())throw new Error(_0x15e884(0x18f)+_0x2ff9dc[_0x15e884(0x19a)]);if(isSymbolicLink(_0x2ff9dc))throw new Error(_0x15e884(0x1a3)+_0x2ff9dc[_0x15e884(0x19a)]);const {relativePath:_0x2ae76d,directory:_0x4fbdae}=validateEntryPath(_0x2ff9dc[_0x15e884(0x19a)]),_0x291ce6=_0x2ae76d[_0x15e884(0x1a6)](a171_0x205fa1[_0x15e884(0x1ab)]);for(let _0x58987a=0x1;_0x58987a<=_0x291ce6[_0x15e884(0x1b4)];_0x58987a+=0x1){const _0x50316d=_0x291ce6[_0x15e884(0x18e)](0x0,_0x58987a)['join'](a171_0x205fa1['sep']),_0x524981=_0x50316d['toLocaleLowerCase']('en-US'),_0x52ee9e=_0x4659bf['get'](_0x524981);if(_0x52ee9e&&_0x52ee9e!==_0x50316d)throw new Error('Case-conflicting\x20ZIP\x20entry\x20path:\x20'+_0x2ff9dc['fileName']);_0x4659bf['set'](_0x524981,_0x50316d);}const _0x15fd39=_0x2ae76d[_0x15e884(0x195)](_0x15e884(0x1ad));if(_0xaa3856['has'](_0x15fd39))throw new Error(_0x15e884(0x1b2)+_0x2ff9dc['fileName']);_0xaa3856[_0x15e884(0x19f)](_0x15fd39);const _0x3339ce=a171_0x205fa1[_0x15e884(0x1a7)](_0x1c57e9,_0x2ae76d);if(_0x3339ce!==_0x1c57e9&&!_0x3339ce[_0x15e884(0x198)](''+_0x1c57e9+a171_0x205fa1[_0x15e884(0x1ab)]))throw new Error('ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20'+_0x2ff9dc[_0x15e884(0x19a)]);if(_0x4fbdae)await a171_0x531141[_0x15e884(0x1a2)](_0x3339ce,{'recursive':!![]});else{await a171_0x531141[_0x15e884(0x1a2)](a171_0x205fa1[_0x15e884(0x1b5)](_0x3339ce),{'recursive':!![]});const _0x509207=await openEntryStream(_0x2e0159,_0x2ff9dc);await pipeline(_0x509207,createWriteStream(_0x3339ce,{'flags':'wx','mode':0x1a4}));}_0x2e0159[_0x15e884(0x1a9)]();})()['catch'](_0x4aab27);}),_0x2e0159[_0x3e563e(0x1a9)]();});}
@@ -1 +1 @@
1
- (function(_0x4b1d64,_0x552f95){const _0x56f9b8=a167_0x856f,_0x54956e=_0x4b1d64();while(!![]){try{const _0x56ae48=parseInt(_0x56f9b8(0xe7))/0x1*(parseInt(_0x56f9b8(0xf2))/0x2)+-parseInt(_0x56f9b8(0xe8))/0x3*(parseInt(_0x56f9b8(0xef))/0x4)+-parseInt(_0x56f9b8(0xf1))/0x5*(parseInt(_0x56f9b8(0xe6))/0x6)+parseInt(_0x56f9b8(0xf0))/0x7+parseInt(_0x56f9b8(0xee))/0x8*(-parseInt(_0x56f9b8(0xe9))/0x9)+parseInt(_0x56f9b8(0xea))/0xa*(parseInt(_0x56f9b8(0xe5))/0xb)+parseInt(_0x56f9b8(0xec))/0xc;if(_0x56ae48===_0x552f95)break;else _0x54956e['push'](_0x54956e['shift']());}catch(_0x566f15){_0x54956e['push'](_0x54956e['shift']());}}}(a167_0x276d,0x7a58a));import a167_0x569b5e from'node:path';import{fileURLToPath}from'node:url';function a167_0x856f(_0x1c8191,_0x4ee646){_0x1c8191=_0x1c8191-0xe5;const _0x276d68=a167_0x276d();let _0x856fc1=_0x276d68[_0x1c8191];return _0x856fc1;}function a167_0x276d(){const _0x4fd896=['3672WoBLxz','168156emAjJr','2923564SgxdOp','2021690BYgHFv','2PHTeCn','1837lVUQzN','6pTBBYb','552098oQboYE','63eaOszH','2151mmcLbz','51590WfCOwI','../../../../','800220AZCwbg','resolve'];a167_0x276d=function(){return _0x4fd896;};return a167_0x276d();}const __dirname=a167_0x569b5e['dirname'](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x37e4a8=a167_0x856f;return a167_0x569b5e[_0x37e4a8(0xed)](__dirname,_0x37e4a8(0xeb));}
1
+ const a172_0xf06ca0=a172_0xd775;(function(_0xdb878,_0x10659f){const _0x2c5aa=a172_0xd775,_0x41eb8b=_0xdb878();while(!![]){try{const _0x4b61c4=-parseInt(_0x2c5aa(0x19d))/0x1+-parseInt(_0x2c5aa(0x1a8))/0x2*(parseInt(_0x2c5aa(0x1a7))/0x3)+-parseInt(_0x2c5aa(0x1a9))/0x4+-parseInt(_0x2c5aa(0x1a2))/0x5*(parseInt(_0x2c5aa(0x1a5))/0x6)+parseInt(_0x2c5aa(0x1a1))/0x7*(-parseInt(_0x2c5aa(0x1a4))/0x8)+-parseInt(_0x2c5aa(0x1a6))/0x9*(parseInt(_0x2c5aa(0x1a0))/0xa)+parseInt(_0x2c5aa(0x19f))/0xb;if(_0x4b61c4===_0x10659f)break;else _0x41eb8b['push'](_0x41eb8b['shift']());}catch(_0x5b2f03){_0x41eb8b['push'](_0x41eb8b['shift']());}}}(a172_0x5dd0,0xca0a9));function a172_0x5dd0(){const _0x2d0669=['1870862FehHVB','20725KrKnTH','dirname','40GsAFGh','210iujfld','10514394ULwHNC','431562ZApbbW','14TRTboo','2198912UeOfdL','../../../../','132054JonizG','resolve','56825912ttUOqO','10wJCOFP'];a172_0x5dd0=function(){return _0x2d0669;};return a172_0x5dd0();}import a172_0x10ca42 from'node:path';function a172_0xd775(_0x43f9c2,_0x260612){_0x43f9c2=_0x43f9c2-0x19c;const _0x5dd09a=a172_0x5dd0();let _0xd77545=_0x5dd09a[_0x43f9c2];return _0xd77545;}import{fileURLToPath}from'node:url';const __dirname=a172_0x10ca42[a172_0xf06ca0(0x1a3)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x43ab01=a172_0xf06ca0;return a172_0x10ca42[_0x43ab01(0x19e)](__dirname,_0x43ab01(0x19c));}
@@ -1 +1 @@
1
- (function(_0x4bdab7,_0x2763d9){const _0x44d2e0=a168_0x1152,_0x548044=_0x4bdab7();while(!![]){try{const _0x10d638=-parseInt(_0x44d2e0(0x118))/0x1*(-parseInt(_0x44d2e0(0x11b))/0x2)+parseInt(_0x44d2e0(0x117))/0x3+-parseInt(_0x44d2e0(0x11f))/0x4*(parseInt(_0x44d2e0(0x11e))/0x5)+-parseInt(_0x44d2e0(0x126))/0x6*(parseInt(_0x44d2e0(0x12a))/0x7)+parseInt(_0x44d2e0(0x11a))/0x8*(-parseInt(_0x44d2e0(0x11d))/0x9)+-parseInt(_0x44d2e0(0x119))/0xa*(parseInt(_0x44d2e0(0x123))/0xb)+parseInt(_0x44d2e0(0x125))/0xc;if(_0x10d638===_0x2763d9)break;else _0x548044['push'](_0x548044['shift']());}catch(_0x48b5dc){_0x548044['push'](_0x548044['shift']());}}}(a168_0x5833,0x99558));import a168_0x59553e from'node:path';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{materializeLocalProjectTemplate,materializeProjectTemplate}from'../../../commands/project/create/materialize-project-template.js';function a168_0x1152(_0x468910,_0x24740b){_0x468910=_0x468910-0x117;const _0x58337b=a168_0x5833();let _0x115252=_0x58337b[_0x468910];return _0x115252;}function a168_0x5833(){const _0x3b5a20=['Failed\x20to\x20copy\x20project\x20template','13892484EsBzoK','5091882NrDImO','cwd','copy','resolve','7waBLBi','2878749oMBXSy','372314fYhiTw','976890DewHgF','3036632ojKMbw','4iosVGM','now','9XfWCfk','45fOXvfV','403532MEuXab','success','source','Starting\x20project\x20template\x20creation','11eQICKN'];a168_0x5833=function(){return _0x3b5a20;};return a168_0x5833();}export async function copyProjectTemplate(_0x1c4e45,_0x423988,_0x36b3a3){const _0x25be39=a168_0x1152,_0x38fea7=Date[_0x25be39(0x11c)](),_0x257d31=a168_0x59553e[_0x25be39(0x129)](process[_0x25be39(0x127)](),_0x1c4e45);try{logger['info']('copy',_0x25be39(0x122),{'projectCode':_0x1c4e45});const _0xa5a54e=_0x36b3a3?await materializeLocalProjectTemplate(_0x36b3a3,_0x257d31,_0x423988):await materializeProjectTemplate(_0x257d31,_0x423988),_0x5e1998=Date[_0x25be39(0x11c)]()-_0x38fea7;logger[_0x25be39(0x120)](_0x25be39(0x128),'Project\x20template\x20created',_0x5e1998,{'projectCode':_0x1c4e45,'templateSource':_0xa5a54e[_0x25be39(0x121)],'templateVersion':_0xa5a54e['version']});}catch(_0x578015){const _0x3e98e8=Date['now']()-_0x38fea7;logger['error'](_0x25be39(0x128),_0x25be39(0x124),{'projectCode':_0x1c4e45,'error':_0x578015 instanceof Error?_0x578015['message']:String(_0x578015),'duration':_0x3e98e8});throw _0x578015;}return formatElapsed(_0x38fea7);}
1
+ (function(_0x4c093d,_0x465e75){const _0x41eaa0=a173_0x5898,_0x4d0cfc=_0x4c093d();while(!![]){try{const _0x39cedb=parseInt(_0x41eaa0(0x1b7))/0x1*(parseInt(_0x41eaa0(0x1b4))/0x2)+parseInt(_0x41eaa0(0x1b0))/0x3*(-parseInt(_0x41eaa0(0x1b3))/0x4)+parseInt(_0x41eaa0(0x1a8))/0x5+-parseInt(_0x41eaa0(0x1aa))/0x6+-parseInt(_0x41eaa0(0x1a6))/0x7*(-parseInt(_0x41eaa0(0x1b9))/0x8)+-parseInt(_0x41eaa0(0x1b8))/0x9+parseInt(_0x41eaa0(0x1b5))/0xa;if(_0x39cedb===_0x465e75)break;else _0x4d0cfc['push'](_0x4d0cfc['shift']());}catch(_0x518832){_0x4d0cfc['push'](_0x4d0cfc['shift']());}}}(a173_0xcebd,0x7a456));import a173_0x5d63c1 from'node:path';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a173_0x5898(_0x3031f4,_0x5907af){_0x3031f4=_0x3031f4-0x1a6;const _0xcebd9a=a173_0xcebd();let _0x58983b=_0xcebd9a[_0x3031f4];return _0x58983b;}import{logger}from'../../../utils/logger.js';import{materializeLocalProjectTemplate,materializeProjectTemplate}from'../../../commands/project/create/materialize-project-template.js';function a173_0xcebd(){const _0x1bfc3c=['copy','info','1551781NTYYAh','Failed\x20to\x20copy\x20project\x20template','2069545miqQIA','error','109482RsSmcn','resolve','Starting\x20project\x20template\x20creation','now','success','cwd','458511yknczb','source','message','4KycBvm','201996eokRnY','968170MEnWdR','Project\x20template\x20created','1YgjiwT','3448656MsUSOd','16HfJbQe','version'];a173_0xcebd=function(){return _0x1bfc3c;};return a173_0xcebd();}export async function copyProjectTemplate(_0x4011bb,_0x744b1d,_0x4cc4c1){const _0x42a40d=a173_0x5898,_0x2b8170=Date[_0x42a40d(0x1ad)](),_0x19e836=a173_0x5d63c1[_0x42a40d(0x1ab)](process[_0x42a40d(0x1af)](),_0x4011bb);try{logger[_0x42a40d(0x1bc)](_0x42a40d(0x1bb),_0x42a40d(0x1ac),{'projectCode':_0x4011bb});const _0x32ed18=_0x4cc4c1?await materializeLocalProjectTemplate(_0x4cc4c1,_0x19e836,_0x744b1d):await materializeProjectTemplate(_0x19e836,_0x744b1d),_0x4e1ec1=Date[_0x42a40d(0x1ad)]()-_0x2b8170;logger[_0x42a40d(0x1ae)](_0x42a40d(0x1bb),_0x42a40d(0x1b6),_0x4e1ec1,{'projectCode':_0x4011bb,'templateSource':_0x32ed18[_0x42a40d(0x1b1)],'templateVersion':_0x32ed18[_0x42a40d(0x1ba)]});}catch(_0x5ae609){const _0x4e374f=Date[_0x42a40d(0x1ad)]()-_0x2b8170;logger[_0x42a40d(0x1a9)](_0x42a40d(0x1bb),_0x42a40d(0x1a7),{'projectCode':_0x4011bb,'error':_0x5ae609 instanceof Error?_0x5ae609[_0x42a40d(0x1b2)]:String(_0x5ae609),'duration':_0x4e374f});throw _0x5ae609;}return formatElapsed(_0x2b8170);}
@@ -1 +1 @@
1
- function a169_0x23ee(_0x1f6966,_0x447b1a){_0x1f6966=_0x1f6966-0x152;const _0x2a96c1=a169_0x2a96();let _0x23ee57=_0x2a96c1[_0x1f6966];return _0x23ee57;}(function(_0x13bba5,_0x2ef390){const _0x25a5d9=a169_0x23ee,_0x50ca93=_0x13bba5();while(!![]){try{const _0x4823d7=parseInt(_0x25a5d9(0x153))/0x1*(-parseInt(_0x25a5d9(0x167))/0x2)+-parseInt(_0x25a5d9(0x158))/0x3*(-parseInt(_0x25a5d9(0x15d))/0x4)+parseInt(_0x25a5d9(0x15c))/0x5+parseInt(_0x25a5d9(0x164))/0x6+-parseInt(_0x25a5d9(0x15a))/0x7+-parseInt(_0x25a5d9(0x15b))/0x8+parseInt(_0x25a5d9(0x166))/0x9;if(_0x4823d7===_0x2ef390)break;else _0x50ca93['push'](_0x50ca93['shift']());}catch(_0x3c93fa){_0x50ca93['push'](_0x50ca93['shift']());}}}(a169_0x2a96,0x37a13));import a169_0x29552f from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a169_0x2a96(){const _0x3d831f=['2904482ZxCgca','3211464RDyjBc','231020VMvHxO','8eFUeqe','message','npx','Code\x20format\x20failed','Code\x20format\x20completed','resolve','cwd','1832250wgWXmv','now','6230637yXRzWa','122LltYVe','Starting\x20code\x20format','4698FzFIie','--write','error','success','format','430386VVFzDT','prettier'];a169_0x2a96=function(){return _0x3d831f;};return a169_0x2a96();}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x4972ce){const _0x142606=a169_0x23ee,_0x51edf2=Date[_0x142606(0x165)](),_0x10d67a=a169_0x29552f[_0x142606(0x162)](process[_0x142606(0x163)](),_0x4972ce);try{logger['info'](_0x142606(0x157),_0x142606(0x152),{'projectCode':_0x4972ce}),await execa(resolveNpmBin(_0x142606(0x15f)),[_0x142606(0x159),_0x142606(0x154),'.'],{'cwd':_0x10d67a});const _0x12b287=Date['now']()-_0x51edf2;logger[_0x142606(0x156)](_0x142606(0x157),_0x142606(0x161),_0x12b287,{'projectCode':_0x4972ce});}catch(_0x43a5d6){const _0xdcae29=Date['now']()-_0x51edf2;logger[_0x142606(0x155)](_0x142606(0x157),_0x142606(0x160),{'projectCode':_0x4972ce,'error':_0x43a5d6 instanceof Error?_0x43a5d6[_0x142606(0x15e)]:String(_0x43a5d6),'duration':_0xdcae29});throw _0x43a5d6;}return formatElapsed(_0x51edf2);}
1
+ (function(_0x473b81,_0x5581e1){const _0x59ae4e=a174_0x5c7e,_0x5cde79=_0x473b81();while(!![]){try{const _0x456dfb=parseInt(_0x59ae4e(0x161))/0x1+-parseInt(_0x59ae4e(0x167))/0x2*(parseInt(_0x59ae4e(0x163))/0x3)+parseInt(_0x59ae4e(0x166))/0x4+parseInt(_0x59ae4e(0x162))/0x5+parseInt(_0x59ae4e(0x154))/0x6*(parseInt(_0x59ae4e(0x158))/0x7)+parseInt(_0x59ae4e(0x168))/0x8*(-parseInt(_0x59ae4e(0x164))/0x9)+parseInt(_0x59ae4e(0x160))/0xa*(parseInt(_0x59ae4e(0x15a))/0xb);if(_0x456dfb===_0x5581e1)break;else _0x5cde79['push'](_0x5cde79['shift']());}catch(_0x5620a1){_0x5cde79['push'](_0x5cde79['shift']());}}}(a174_0x1a0f,0x608cc));import a174_0x129adc 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 a174_0x5c7e(_0x24a77d,_0x2b431c){_0x24a77d=_0x24a77d-0x153;const _0x1a0f3b=a174_0x1a0f();let _0x5c7e19=_0x1a0f3b[_0x24a77d];return _0x5c7e19;}function a174_0x1a0f(){const _0x5d239a=['Starting\x20code\x20format','now','prettier','21deTGLZ','resolve','428593gJqvkw','npx','cwd','format','Code\x20format\x20completed','error','50hLwpoK','400267nEAhni','1604140BdCHnb','1995576dLYaiw','9rdiJBw','--write','123428THZKwD','2nMAStB','2564896hWiDKv','message','869010sJsEuW'];a174_0x1a0f=function(){return _0x5d239a;};return a174_0x1a0f();}export async function formatProjectCode(_0x248470){const _0x3051a3=a174_0x5c7e,_0x436dcb=Date['now'](),_0x561cb3=a174_0x129adc[_0x3051a3(0x159)](process[_0x3051a3(0x15c)](),_0x248470);try{logger['info']('format',_0x3051a3(0x155),{'projectCode':_0x248470}),await execa(resolveNpmBin(_0x3051a3(0x15b)),[_0x3051a3(0x157),_0x3051a3(0x165),'.'],{'cwd':_0x561cb3});const _0x51d8cb=Date[_0x3051a3(0x156)]()-_0x436dcb;logger['success']('format',_0x3051a3(0x15e),_0x51d8cb,{'projectCode':_0x248470});}catch(_0x2a7a2f){const _0x5aee0c=Date[_0x3051a3(0x156)]()-_0x436dcb;logger[_0x3051a3(0x15f)](_0x3051a3(0x15d),'Code\x20format\x20failed',{'projectCode':_0x248470,'error':_0x2a7a2f instanceof Error?_0x2a7a2f[_0x3051a3(0x153)]:String(_0x2a7a2f),'duration':_0x5aee0c});throw _0x2a7a2f;}return formatElapsed(_0x436dcb);}
@@ -1 +1 @@
1
- function a170_0x2859(){const _0x13533d=['resolve','now','success','message','80568YXGDul','208778AopyMu','640134zfXjXz','1290752lFiQQX','install','https://registry.npmmirror.com','205wGOAHE','Dependency\x20install\x20failed','456698wQEnXG','4087328CcytcD','590XogHnR','error','cwd','1vNGmsc','npm','Starting\x20dependency\x20install','119716JuOAnE','69CZPtBE','--registry'];a170_0x2859=function(){return _0x13533d;};return a170_0x2859();}(function(_0x1157fc,_0x13b059){const _0x44f972=a170_0x5bb1,_0x4b77bb=_0x1157fc();while(!![]){try{const _0x492c2f=parseInt(_0x44f972(0x107))/0x1*(parseInt(_0x44f972(0x112))/0x2)+parseInt(_0x44f972(0x10b))/0x3*(-parseInt(_0x44f972(0x10a))/0x4)+-parseInt(_0x44f972(0x100))/0x5*(parseInt(_0x44f972(0x111))/0x6)+-parseInt(_0x44f972(0x103))/0x7+-parseInt(_0x44f972(0x114))/0x8+-parseInt(_0x44f972(0x113))/0x9+parseInt(_0x44f972(0x104))/0xa*(parseInt(_0x44f972(0x102))/0xb);if(_0x492c2f===_0x13b059)break;else _0x4b77bb['push'](_0x4b77bb['shift']());}catch(_0x3cd004){_0x4b77bb['push'](_0x4b77bb['shift']());}}}(a170_0x2859,0x79be6));import a170_0x9b5362 from'node:path';function a170_0x5bb1(_0x447cea,_0x34304f){_0x447cea=_0x447cea-0xff;const _0x285957=a170_0x2859();let _0x5bb10c=_0x285957[_0x447cea];return _0x5bb10c;}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x43b1b9){const _0x14c001=a170_0x5bb1,_0x317047=Date[_0x14c001(0x10e)](),_0xd053b9=a170_0x9b5362[_0x14c001(0x10d)](process[_0x14c001(0x106)](),_0x43b1b9);try{logger['info'](_0x14c001(0x115),_0x14c001(0x109),{'projectCode':_0x43b1b9,'registry':_0x14c001(0xff)}),await execa(resolveNpmBin(_0x14c001(0x108)),['install',_0x14c001(0x10c),'https://registry.npmmirror.com'],{'cwd':_0xd053b9});const _0x600d14=Date[_0x14c001(0x10e)]()-_0x317047;logger[_0x14c001(0x10f)](_0x14c001(0x115),'Dependency\x20install\x20completed',_0x600d14,{'projectCode':_0x43b1b9});}catch(_0x33aa66){const _0x361e3e=Date[_0x14c001(0x10e)]()-_0x317047;logger[_0x14c001(0x105)](_0x14c001(0x115),_0x14c001(0x101),{'projectCode':_0x43b1b9,'error':_0x33aa66 instanceof Error?_0x33aa66[_0x14c001(0x110)]:String(_0x33aa66),'duration':_0x361e3e});throw _0x33aa66;}return formatElapsed(_0x317047);}
1
+ (function(_0x4d7fb2,_0xde469d){const _0xbd2369=a175_0x8088,_0x1867eb=_0x4d7fb2();while(!![]){try{const _0x40b99b=parseInt(_0xbd2369(0xf0))/0x1+-parseInt(_0xbd2369(0xfc))/0x2+parseInt(_0xbd2369(0xef))/0x3*(-parseInt(_0xbd2369(0xfd))/0x4)+parseInt(_0xbd2369(0xfe))/0x5*(parseInt(_0xbd2369(0xf1))/0x6)+-parseInt(_0xbd2369(0xf5))/0x7*(parseInt(_0xbd2369(0xf9))/0x8)+parseInt(_0xbd2369(0xf2))/0x9*(-parseInt(_0xbd2369(0xf8))/0xa)+-parseInt(_0xbd2369(0xff))/0xb*(-parseInt(_0xbd2369(0xf7))/0xc);if(_0x40b99b===_0xde469d)break;else _0x1867eb['push'](_0x1867eb['shift']());}catch(_0x4ee19d){_0x1867eb['push'](_0x1867eb['shift']());}}}(a175_0x1538,0x99baa));import a175_0x4af9d6 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a175_0x8088(_0x308d52,_0x5e4eb9){_0x308d52=_0x308d52-0xeb;const _0x153827=a175_0x1538();let _0x8088e9=_0x153827[_0x308d52];return _0x8088e9;}import{resolveNpmBin}from'../../../utils/platform.js';function a175_0x1538(){const _0x32ef3a=['now','18654LlCMQY','1033949rNdIcf','12aPkCME','1593IuDxsF','error','https://registry.npmmirror.com','301IeZLKi','Dependency\x20install\x20failed','12rtXxin','59810nNKFKK','12120QvznUU','Dependency\x20install\x20completed','success','1640888cgPkfW','404KbAzZo','1726135WoDnLM','16252665HoPYeZ','install','npm','--registry','cwd'];a175_0x1538=function(){return _0x32ef3a;};return a175_0x1538();}export async function installDependencies(_0x52db18){const _0x2cc964=a175_0x8088,_0xfdeebb=Date[_0x2cc964(0xee)](),_0xd7eecb=a175_0x4af9d6['resolve'](process[_0x2cc964(0xed)](),_0x52db18);try{logger['info'](_0x2cc964(0x100),'Starting\x20dependency\x20install',{'projectCode':_0x52db18,'registry':_0x2cc964(0xf4)}),await execa(resolveNpmBin(_0x2cc964(0xeb)),[_0x2cc964(0x100),_0x2cc964(0xec),_0x2cc964(0xf4)],{'cwd':_0xd7eecb});const _0x2c1e96=Date[_0x2cc964(0xee)]()-_0xfdeebb;logger[_0x2cc964(0xfb)](_0x2cc964(0x100),_0x2cc964(0xfa),_0x2c1e96,{'projectCode':_0x52db18});}catch(_0x76b72d){const _0x271e91=Date[_0x2cc964(0xee)]()-_0xfdeebb;logger[_0x2cc964(0xf3)](_0x2cc964(0x100),_0x2cc964(0xf6),{'projectCode':_0x52db18,'error':_0x76b72d instanceof Error?_0x76b72d['message']:String(_0x76b72d),'duration':_0x271e91});throw _0x76b72d;}return formatElapsed(_0xfdeebb);}
@@ -1 +1 @@
1
- const a171_0xcd7d84=a171_0x5aac;(function(_0x19f9de,_0x3b85c6){const _0x4182f7=a171_0x5aac,_0xe382cd=_0x19f9de();while(!![]){try{const _0x3c118a=parseInt(_0x4182f7(0x199))/0x1+-parseInt(_0x4182f7(0x18b))/0x2*(-parseInt(_0x4182f7(0x194))/0x3)+-parseInt(_0x4182f7(0x183))/0x4*(parseInt(_0x4182f7(0x190))/0x5)+parseInt(_0x4182f7(0x17a))/0x6+-parseInt(_0x4182f7(0x182))/0x7+-parseInt(_0x4182f7(0x19d))/0x8+parseInt(_0x4182f7(0x188))/0x9;if(_0x3c118a===_0x3b85c6)break;else _0xe382cd['push'](_0xe382cd['shift']());}catch(_0x1de6ea){_0xe382cd['push'](_0xe382cd['shift']());}}}(a171_0x23a5,0x81a3f));import{CliErrors}from'../../errors.js';function a171_0x23a5(){const _0x338948=['validation','3nAdWwS','yes','str','../../commands/project/create/main.js','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','183893cxIJgq','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','cookie','name','1597568oIflhA','1384980RvaBCa','boolean','Create\x20a\x20new\x20project','nonInteractive','project-name','Target\x20environment','Prepared\x20local\x20project\x20template\x20directory','string','7065800PabjBq','39628vhljAJ','env','template-source','appcode','project','15121728giKdmW','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','Usage:\x20','974566sPjRdE','upgrade','write','create','trim','425gdBQGg','Project\x20name','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.'];a171_0x23a5=function(){return _0x338948;};return a171_0x23a5();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';const createFlags=[{'name':'name','type':a171_0xcd7d84(0x181),'description':a171_0xcd7d84(0x191)},{'name':a171_0xcd7d84(0x184),'type':'string','description':a171_0xcd7d84(0x17f)},{'name':a171_0xcd7d84(0x186),'type':a171_0xcd7d84(0x181),'description':a171_0xcd7d84(0x19a)},{'name':'template-source','type':'string','description':a171_0xcd7d84(0x180)}],upgradeFlags=[{'name':a171_0xcd7d84(0x195),'type':a171_0xcd7d84(0x17b),'description':'Skip\x20confirmation\x20prompt','default':![]}];function a171_0x5aac(_0x57d902,_0x38a667){_0x57d902=_0x57d902-0x17a;const _0x23a582=a171_0x23a5();let _0x5aac77=_0x23a582[_0x57d902];return _0x5aac77;}export const projectDefinitions=[{'service':a171_0xcd7d84(0x187),'command':a171_0xcd7d84(0x18e),'description':a171_0xcd7d84(0x17c),'risk':a171_0xcd7d84(0x18d),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a171_0xcd7d84(0x17e),'description':a171_0xcd7d84(0x189),'required':![]}],'flags':createFlags,async 'execute'(_0x7c7a37){const _0x47bba8=a171_0xcd7d84,{createApp:_0x512621}=await import(_0x47bba8(0x197)),_0x31365f=_0x7c7a37[_0x47bba8(0x196)](_0x47bba8(0x19c))[_0x47bba8(0x18f)]()||_0x7c7a37['args'][0x0]?.['trim'](),_0x5c7163=_0x7c7a37[_0x47bba8(0x196)](_0x47bba8(0x184))||undefined,_0x17e084=_0x7c7a37[_0x47bba8(0x196)](_0x47bba8(0x186))||undefined,_0x30864b=_0x7c7a37[_0x47bba8(0x196)](_0x47bba8(0x185))[_0x47bba8(0x18f)]()||undefined;if(_0x7c7a37[_0x47bba8(0x17d)]){if(!_0x31365f)throw CliErrors[_0x47bba8(0x193)](_0x47bba8(0x192),_0x47bba8(0x18a)+CLI_BIN_NAME+_0x47bba8(0x198));await _0x512621({'projectCode':_0x31365f,'appCode':_0x17e084,'env':_0x5c7163,'cookie':_0x7c7a37[_0x47bba8(0x19b)],'nonInteractive':!![],'templateSource':_0x30864b});}else await _0x512621({'projectCode':_0x31365f,'appCode':_0x17e084,'env':_0x5c7163,'cookie':_0x7c7a37[_0x47bba8(0x19b)],'templateSource':_0x30864b});return{'ok':!![]};}},{'service':a171_0xcd7d84(0x187),'command':a171_0xcd7d84(0x18c),'description':'Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','risk':a171_0xcd7d84(0x18d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x51b86a){const _0x5c5e50=a171_0xcd7d84;return await upgradeApp(_0x51b86a[_0x5c5e50(0x17d)],{'yes':_0x51b86a['bool'](_0x5c5e50(0x195))}),{'ok':!![]};}}];
1
+ const a176_0x361806=a176_0x3a4c;(function(_0x55709b,_0x3f7bba){const _0x2c1310=a176_0x3a4c,_0x2e531c=_0x55709b();while(!![]){try{const _0x4f5ef4=parseInt(_0x2c1310(0x145))/0x1+parseInt(_0x2c1310(0x139))/0x2*(-parseInt(_0x2c1310(0x146))/0x3)+-parseInt(_0x2c1310(0x12c))/0x4+-parseInt(_0x2c1310(0x12d))/0x5*(-parseInt(_0x2c1310(0x138))/0x6)+-parseInt(_0x2c1310(0x147))/0x7+-parseInt(_0x2c1310(0x132))/0x8+parseInt(_0x2c1310(0x135))/0x9;if(_0x4f5ef4===_0x3f7bba)break;else _0x2e531c['push'](_0x2e531c['shift']());}catch(_0x96aa7f){_0x2e531c['push'](_0x2e531c['shift']());}}}(a176_0x2d66,0xc5485));function a176_0x3a4c(_0x2778d0,_0x2937fc){_0x2778d0=_0x2778d0-0x127;const _0x2d667f=a176_0x2d66();let _0x3a4c6e=_0x2d667f[_0x2778d0];return _0x3a4c6e;}import{CliErrors}from'../../errors.js';function a176_0x2d66(){const _0x106607=['create','../../commands/project/create/main.js','yes','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','env','validation','Create\x20a\x20new\x20project','924162AkBxcU','3501345aOuRAD','7589386rKeLle','Usage:\x20','trim','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','project','Prepared\x20local\x20project\x20template\x20directory','write','nonInteractive','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','356028gvDQAi','19315gZLUGs','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','Project\x20name','project-name','cookie','5239264bWkJYC','string','template-source','21670641pGBgpb','args','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','732FpKARY','2lnquAU','upgrade','bool','name','boolean'];a176_0x2d66=function(){return _0x106607;};return a176_0x2d66();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';const createFlags=[{'name':a176_0x361806(0x13c),'type':'string','description':a176_0x361806(0x12f)},{'name':a176_0x361806(0x142),'type':a176_0x361806(0x133),'description':'Target\x20environment'},{'name':'appcode','type':a176_0x361806(0x133),'description':a176_0x361806(0x141)},{'name':a176_0x361806(0x134),'type':a176_0x361806(0x133),'description':a176_0x361806(0x128)}],upgradeFlags=[{'name':'yes','type':a176_0x361806(0x13d),'description':'Skip\x20confirmation\x20prompt','default':![]}];export const projectDefinitions=[{'service':'project','command':a176_0x361806(0x13e),'description':a176_0x361806(0x144),'risk':a176_0x361806(0x129),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a176_0x361806(0x130),'description':a176_0x361806(0x14a),'required':![]}],'flags':createFlags,async 'execute'(_0x186dea){const _0x3b060e=a176_0x361806,{createApp:_0x150745}=await import(_0x3b060e(0x13f)),_0x4811ca=_0x186dea['str'](_0x3b060e(0x13c))[_0x3b060e(0x149)]()||_0x186dea[_0x3b060e(0x136)][0x0]?.[_0x3b060e(0x149)](),_0x2ff654=_0x186dea['str'](_0x3b060e(0x142))||undefined,_0x50db1d=_0x186dea['str']('appcode')||undefined,_0x3ed0e0=_0x186dea['str'](_0x3b060e(0x134))['trim']()||undefined;if(_0x186dea[_0x3b060e(0x12a)]){if(!_0x4811ca)throw CliErrors[_0x3b060e(0x143)](_0x3b060e(0x12b),_0x3b060e(0x148)+CLI_BIN_NAME+_0x3b060e(0x12e));await _0x150745({'projectCode':_0x4811ca,'appCode':_0x50db1d,'env':_0x2ff654,'cookie':_0x186dea[_0x3b060e(0x131)],'nonInteractive':!![],'templateSource':_0x3ed0e0});}else await _0x150745({'projectCode':_0x4811ca,'appCode':_0x50db1d,'env':_0x2ff654,'cookie':_0x186dea[_0x3b060e(0x131)],'templateSource':_0x3ed0e0});return{'ok':!![]};}},{'service':a176_0x361806(0x127),'command':a176_0x361806(0x13a),'description':a176_0x361806(0x137),'risk':a176_0x361806(0x129),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x3de1e2){const _0x6b98e4=a176_0x361806;return await upgradeApp(_0x3de1e2[_0x6b98e4(0x12a)],{'yes':_0x3de1e2[_0x6b98e4(0x13b)](_0x6b98e4(0x140))}),{'ok':!![]};}}];