@lovrabet/rabetbase-cli 2.5.0-beta.5 → 2.5.0-beta.6

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 (294) 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-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analysis-batching.js +1 -1
  79. package/lib/commands/db/analyze-batch-plan.js +1 -1
  80. package/lib/commands/db/analyze-cancel.js +1 -1
  81. package/lib/commands/db/analyze-start.js +1 -1
  82. package/lib/commands/db/analyze-status.js +1 -1
  83. package/lib/commands/db/create.js +1 -1
  84. package/lib/commands/db/delete.js +1 -1
  85. package/lib/commands/db/detail.js +1 -1
  86. package/lib/commands/db/diff-refresh-start.js +1 -1
  87. package/lib/commands/db/diff-refresh-status.js +1 -1
  88. package/lib/commands/db/diff.js +1 -1
  89. package/lib/commands/db/index.js +1 -1
  90. package/lib/commands/db/list.js +1 -1
  91. package/lib/commands/db/shared.js +1 -1
  92. package/lib/commands/db/table-diff-shared.js +1 -1
  93. package/lib/commands/db/tables.js +1 -1
  94. package/lib/commands/db/test.js +1 -1
  95. package/lib/commands/db/update.js +1 -1
  96. package/lib/commands/doctor.js +1 -1
  97. package/lib/commands/file/index.js +1 -1
  98. package/lib/commands/issue/index.js +1 -1
  99. package/lib/commands/issue/nudge.js +1 -1
  100. package/lib/commands/issue/report.js +1 -1
  101. package/lib/commands/issue/shared.js +1 -1
  102. package/lib/commands/kb/create.js +1 -1
  103. package/lib/commands/kb/delete.js +1 -1
  104. package/lib/commands/kb/detail.js +1 -1
  105. package/lib/commands/kb/index.js +1 -1
  106. package/lib/commands/kb/list.js +1 -1
  107. package/lib/commands/kb/search.js +1 -1
  108. package/lib/commands/kb/shared.js +1 -1
  109. package/lib/commands/kb/update.js +1 -1
  110. package/lib/commands/logs/index.js +1 -1
  111. package/lib/commands/menu/asset-update.js +1 -1
  112. package/lib/commands/menu/delete.js +1 -1
  113. package/lib/commands/menu/external-link-create.js +1 -1
  114. package/lib/commands/menu/external-link-update.js +1 -1
  115. package/lib/commands/menu/group-create.js +1 -1
  116. package/lib/commands/menu/group-update.js +1 -1
  117. package/lib/commands/menu/index.js +1 -1
  118. package/lib/commands/menu/list.js +1 -1
  119. package/lib/commands/menu/move.js +1 -1
  120. package/lib/commands/menu/regroup-start.js +1 -1
  121. package/lib/commands/menu/rename.js +1 -1
  122. package/lib/commands/menu/shared/compare-table.js +1 -1
  123. package/lib/commands/menu/shared/delete-plan.js +1 -1
  124. package/lib/commands/menu/shared/facts.js +1 -1
  125. package/lib/commands/menu/shared/index.js +1 -1
  126. package/lib/commands/menu/shared/inquirer.js +1 -1
  127. package/lib/commands/menu/shared/local-pages.js +1 -1
  128. package/lib/commands/menu/shared/logic.js +1 -1
  129. package/lib/commands/menu/shared/mutations.js +1 -1
  130. package/lib/commands/menu/shared/service.js +1 -1
  131. package/lib/commands/menu/shared/sync-core.js +1 -1
  132. package/lib/commands/menu/shared/update-core.js +1 -1
  133. package/lib/commands/menu/shared/valid-url.js +1 -1
  134. package/lib/commands/menu/sync.js +1 -1
  135. package/lib/commands/menu/visibility-update.js +1 -1
  136. package/lib/commands/notification/config-create.js +1 -1
  137. package/lib/commands/notification/config-delete.js +1 -1
  138. package/lib/commands/notification/config-list.js +1 -1
  139. package/lib/commands/notification/config-update.js +1 -1
  140. package/lib/commands/notification/index.js +1 -1
  141. package/lib/commands/notification/shared.js +1 -1
  142. package/lib/commands/ocr/index.js +1 -1
  143. package/lib/commands/page/create.js +1 -1
  144. package/lib/commands/page/custom/detail.js +1 -1
  145. package/lib/commands/page/custom/list.js +1 -1
  146. package/lib/commands/page/custom/publish.js +1 -1
  147. package/lib/commands/page/custom/shared.js +1 -1
  148. package/lib/commands/page/custom/syntax.js +1 -1
  149. package/lib/commands/page/custom/template.js +1 -1
  150. package/lib/commands/page/custom/update.js +1 -1
  151. package/lib/commands/page/data-list-status.js +1 -1
  152. package/lib/commands/page/generate-start.js +1 -1
  153. package/lib/commands/page/generate-status.js +1 -1
  154. package/lib/commands/page/index.js +1 -1
  155. package/lib/commands/page/pull.js +1 -1
  156. package/lib/commands/page/push.js +1 -1
  157. package/lib/commands/page/relation-audit.js +1 -1
  158. package/lib/commands/page/restore.js +1 -1
  159. package/lib/commands/page/shared.js +1 -1
  160. package/lib/commands/page/sync.js +1 -1
  161. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  162. package/lib/commands/project/create/format-elapsed.js +1 -1
  163. package/lib/commands/project/create/main.js +1 -1
  164. package/lib/commands/project/create/materialize-project-template.js +1 -1
  165. package/lib/commands/project/create/project-name.js +1 -1
  166. package/lib/commands/project/create/project-template-archive.js +1 -1
  167. package/lib/commands/project/create/project-template-path.js +1 -1
  168. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  169. package/lib/commands/project/create/use-format-code.js +1 -1
  170. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  171. package/lib/commands/project/index.js +1 -1
  172. package/lib/commands/project/upgrade.js +1 -1
  173. package/lib/commands/registry.js +1 -1
  174. package/lib/commands/role/delete.js +1 -1
  175. package/lib/commands/role/detail.js +1 -1
  176. package/lib/commands/role/index.js +1 -1
  177. package/lib/commands/role/list.js +1 -1
  178. package/lib/commands/role/shared.js +1 -1
  179. package/lib/commands/role/update.js +1 -1
  180. package/lib/commands/role/user-add.js +1 -1
  181. package/lib/commands/role/user-remove.js +1 -1
  182. package/lib/commands/role/user-resolve.js +1 -1
  183. package/lib/commands/run/index.js +1 -1
  184. package/lib/commands/schema.js +1 -1
  185. package/lib/commands/sql/create.js +1 -1
  186. package/lib/commands/sql/delete.js +1 -1
  187. package/lib/commands/sql/detail.js +1 -1
  188. package/lib/commands/sql/exec.js +1 -1
  189. package/lib/commands/sql/index.js +1 -1
  190. package/lib/commands/sql/list.js +1 -1
  191. package/lib/commands/sql/pull.js +1 -1
  192. package/lib/commands/sql/push.js +1 -1
  193. package/lib/commands/sql/shared.js +1 -1
  194. package/lib/commands/sql/status.js +1 -1
  195. package/lib/commands/sql/validate.js +1 -1
  196. package/lib/commands/task/index.js +1 -1
  197. package/lib/commands/task/status.js +1 -1
  198. package/lib/commands/tenant/index.js +1 -1
  199. package/lib/commands/tenant/members-list.js +1 -1
  200. package/lib/commands/tenant/shared.js +1 -1
  201. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  202. package/lib/commands/user-account/index.js +1 -1
  203. package/lib/commands/workspace/add.js +1 -1
  204. package/lib/commands/workspace/index.js +1 -1
  205. package/lib/commands/workspace/remove.js +1 -1
  206. package/lib/config/domain-config.js +1 -1
  207. package/lib/config/schema.js +1 -1
  208. package/lib/constant/cdn.js +1 -1
  209. package/lib/constant/cli.js +1 -1
  210. package/lib/constant/defaults.js +1 -1
  211. package/lib/constant/domain.js +1 -1
  212. package/lib/constant/env.js +1 -1
  213. package/lib/constant/output.js +1 -1
  214. package/lib/constant/paths.js +1 -1
  215. package/lib/constant/region.js +1 -1
  216. package/lib/constant/risk.js +1 -1
  217. package/lib/context/app-resolver.js +1 -1
  218. package/lib/context/auth-resolver.js +1 -1
  219. package/lib/context/config-loader.js +1 -1
  220. package/lib/context.js +1 -1
  221. package/lib/core/alias-resolver.js +1 -1
  222. package/lib/core/api-client.js +1 -1
  223. package/lib/core/bff/config.js +1 -1
  224. package/lib/core/bff/file-system.js +1 -1
  225. package/lib/core/bff/hash.js +1 -1
  226. package/lib/core/bff/lock.js +1 -1
  227. package/lib/core/bff/utils.js +1 -1
  228. package/lib/core/db-resolver.js +1 -1
  229. package/lib/core/page/file-system.js +1 -1
  230. package/lib/core/page/hash.js +1 -1
  231. package/lib/core/page/lock.js +1 -1
  232. package/lib/core/sql-index-auditor.js +1 -1
  233. package/lib/core/sql-sync/config.js +1 -1
  234. package/lib/core/sql-sync/file-system.js +1 -1
  235. package/lib/core/sql-sync/hash.js +1 -1
  236. package/lib/core/sql-sync/lock.js +1 -1
  237. package/lib/core/sql-sync/utils.js +1 -1
  238. package/lib/core/sql-validator.js +1 -1
  239. package/lib/errors.js +1 -1
  240. package/lib/framework/build-all-flags.js +1 -1
  241. package/lib/framework/error-output.js +1 -1
  242. package/lib/framework/explicit-yes.js +1 -1
  243. package/lib/framework/flags.js +1 -1
  244. package/lib/framework/help.js +1 -1
  245. package/lib/framework/index.js +1 -1
  246. package/lib/framework/output.js +1 -1
  247. package/lib/framework/response.js +1 -1
  248. package/lib/framework/runner-alias.js +1 -1
  249. package/lib/framework/runner.js +1 -1
  250. package/lib/framework/schema-export.js +1 -1
  251. package/lib/framework/types.js +1 -1
  252. package/lib/generated/build-info.d.ts +4 -4
  253. package/lib/generated/build-info.js +1 -1
  254. package/lib/help.js +1 -1
  255. package/lib/postinstall.js +1 -1
  256. package/lib/runtime/confirmation.js +1 -1
  257. package/lib/runtime/event.js +1 -1
  258. package/lib/runtime/index.js +1 -1
  259. package/lib/runtime/queue.js +1 -1
  260. package/lib/runtime/resolve.js +1 -1
  261. package/lib/skills/builtin-skill.js +1 -1
  262. package/lib/skills/main.js +1 -1
  263. package/lib/skills/npx-skills-add.js +1 -1
  264. package/lib/skills/skill-presence.js +1 -1
  265. package/lib/telemetry/cli-command-trace.js +1 -1
  266. package/lib/telemetry/cli-help-trace.js +1 -1
  267. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  268. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  269. package/lib/telemetry/send-cli-trace-log.js +1 -1
  270. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  271. package/lib/utils/ai_config.js +1 -1
  272. package/lib/utils/apply-jq-filter.js +1 -1
  273. package/lib/utils/cdn-config.js +1 -1
  274. package/lib/utils/check-sdk-version.js +1 -1
  275. package/lib/utils/cli-version-check.js +1 -1
  276. package/lib/utils/cli-version-policy.js +1 -1
  277. package/lib/utils/config.js +1 -1
  278. package/lib/utils/entity-with-id.js +1 -1
  279. package/lib/utils/file-utils.js +1 -1
  280. package/lib/utils/guides-cdn.js +1 -1
  281. package/lib/utils/http-client.js +1 -1
  282. package/lib/utils/is-non-interactive.js +1 -1
  283. package/lib/utils/logger.js +1 -1
  284. package/lib/utils/params.js +1 -1
  285. package/lib/utils/platform.js +1 -1
  286. package/lib/utils/sleep.js +1 -1
  287. package/lib/utils/template-replacer.js +1 -1
  288. package/lib/utils/update-notice.js +1 -1
  289. package/lib/utils/version.js +1 -1
  290. package/lib/utils/with-active-cookie.js +1 -1
  291. package/lib/utils/write-cli-side-channel.js +1 -1
  292. package/package.json +1 -1
  293. package/skills/rabetbase/SKILL.md +2 -2
  294. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- (function(_0x2c75ae,_0x31b0b7){const _0x17765e=a161_0x15c3,_0x376d3f=_0x2c75ae();while(!![]){try{const _0x502ad7=parseInt(_0x17765e(0x17c))/0x1+parseInt(_0x17765e(0x189))/0x2+-parseInt(_0x17765e(0x184))/0x3*(parseInt(_0x17765e(0x188))/0x4)+-parseInt(_0x17765e(0x187))/0x5*(-parseInt(_0x17765e(0x17a))/0x6)+parseInt(_0x17765e(0x18d))/0x7+parseInt(_0x17765e(0x183))/0x8*(-parseInt(_0x17765e(0x18f))/0x9)+-parseInt(_0x17765e(0x17e))/0xa;if(_0x502ad7===_0x31b0b7)break;else _0x376d3f['push'](_0x376d3f['shift']());}catch(_0x55a230){_0x376d3f['push'](_0x376d3f['shift']());}}}(a161_0x5abd,0x1b26d));import{existsSync}from'node:fs';function a161_0x5abd(){const _0x4c8dd7=['trim','log','Not\x20set','1816svntCX','81720rwNpiq','resolve','Project\x20name:','26255GpcdYw','4hvWYfX','54952szVker','production','cwd','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','1289526HraoEj','cyan','5220QUhhbt','Skipped','√\x20Project\x20Name:\x20','env','Directory\x20\x22','108mbaqwR','my-app','36470BLGlxu','green','725690SKgSDQ','√\x20Login\x20status:\x20'];a161_0x5abd=function(){return _0x4c8dd7;};return a161_0x5abd();}import a161_0x53754c from'node:path';import a161_0x3c96ac from'chalk';function a161_0x15c3(_0x228cb5,_0x12b367){_0x228cb5=_0x228cb5-0x17a;const _0x5abd31=a161_0x5abd();let _0x15c3aa=_0x5abd31[_0x228cb5];return _0x15c3aa;}import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getProjectNameValidationError}from'../../../commands/project/create/project-name.js';export async function guidedCreateProject(_0x1a1662,_0x19b689,_0x5b0181){const _0x5f3d00=a161_0x15c3,_0x24504b=_0x5f3d00(0x17b),_0x2f4363=readConfig(),_0x92ffc6=typeof _0x2f4363[_0x5f3d00(0x192)]==='string'?_0x2f4363['env']:undefined,_0x10ffb9=await input({'message':_0x5f3d00(0x186),'default':_0x24504b,'validate':_0x7075b5=>{const _0x463ee3=_0x5f3d00,_0x278f62=_0x7075b5[_0x463ee3(0x180)]()||_0x24504b,_0x6e3eb7=getProjectNameValidationError(_0x278f62);if(_0x6e3eb7)return _0x6e3eb7;const _0x2defa5=a161_0x53754c[_0x463ee3(0x185)](process[_0x463ee3(0x18b)](),_0x278f62);if(existsSync(_0x2defa5))return _0x463ee3(0x193)+_0x278f62+'\x22\x20already\x20exists';return!![];}});console[_0x5f3d00(0x181)](a161_0x3c96ac['green'](_0x5f3d00(0x191)+a161_0x3c96ac[_0x5f3d00(0x18e)](_0x10ffb9)));const _0x1eb4cf=await selectSingleAppcode(_0x5b0181);console[_0x5f3d00(0x181)](a161_0x3c96ac[_0x5f3d00(0x17d)]('√\x20App\x20Code:\x20'+a161_0x3c96ac['cyan'](_0x1eb4cf||_0x5f3d00(0x182))));if(_0x1eb4cf){const _0x1d7c60=await getIsSessionValid();if(!_0x1d7c60){const _0x47e03a=await confirm({'message':_0x5f3d00(0x18c),'default':!![]});if(_0x47e03a){const _0x15b35b=await authServer({'silent':!![]});console['log'](a161_0x3c96ac[_0x5f3d00(0x17d)](_0x5f3d00(0x17f)+a161_0x3c96ac[_0x5f3d00(0x18e)](_0x15b35b?'Logged\x20in':'Login\x20failed')));}else console['log'](a161_0x3c96ac[_0x5f3d00(0x17d)](_0x5f3d00(0x17f)+a161_0x3c96ac[_0x5f3d00(0x18e)](_0x5f3d00(0x190))));}await _0x1a1662({'projectName':_0x10ffb9,'appCode':_0x1eb4cf,'env':_0x19b689||_0x92ffc6||_0x5f3d00(0x18a)});}else await _0x1a1662({'projectName':_0x10ffb9,'env':_0x19b689||_0x92ffc6||_0x5f3d00(0x18a)});}
1
+ (function(_0x57774a,_0x346156){const _0x2ce701=a161_0x4cf6,_0xc627c3=_0x57774a();while(!![]){try{const _0x543e57=parseInt(_0x2ce701(0xb6))/0x1+parseInt(_0x2ce701(0xa6))/0x2*(-parseInt(_0x2ce701(0xab))/0x3)+-parseInt(_0x2ce701(0xac))/0x4+-parseInt(_0x2ce701(0xb3))/0x5*(-parseInt(_0x2ce701(0xa1))/0x6)+parseInt(_0x2ce701(0xb2))/0x7+parseInt(_0x2ce701(0xaa))/0x8+-parseInt(_0x2ce701(0xb4))/0x9;if(_0x543e57===_0x346156)break;else _0xc627c3['push'](_0xc627c3['shift']());}catch(_0x32c6a9){_0xc627c3['push'](_0xc627c3['shift']());}}}(a161_0x3090,0xe8a6b));import{existsSync}from'node:fs';import a161_0x44b4f7 from'node:path';import a161_0x3ab765 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';function a161_0x4cf6(_0x2df360,_0x3b0b09){_0x2df360=_0x2df360-0x9f;const _0x3090d2=a161_0x3090();let _0x4cf649=_0x3090d2[_0x2df360];return _0x4cf649;}import{readConfig}from'../../../utils/config.js';function a161_0x3090(){const _0x27bc48=['12753405NULWHY','2179895ihWirt','13367898idkXbv','resolve','954624SSnRAT','trim','production','6QaIcrJ','env','green','Not\x20set','√\x20App\x20Code:\x20','10pwmmtH','√\x20Login\x20status:\x20','string','log','11122824FtJPqs','995829xkkjyD','2019580JMBXtv','cyan','cwd','my-app','Directory\x20\x22','Skipped'];a161_0x3090=function(){return _0x27bc48;};return a161_0x3090();}import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getProjectNameValidationError}from'../../../commands/project/create/project-name.js';export async function guidedCreateProject(_0x15cd6f,_0x3cc97e,_0x2ca6fb){const _0x290abd=a161_0x4cf6,_0x55388d=_0x290abd(0xaf),_0x201c3d=readConfig(),_0x4a8e81=typeof _0x201c3d['env']===_0x290abd(0xa8)?_0x201c3d[_0x290abd(0xa2)]:undefined,_0xd276d7=await input({'message':'Project\x20name:','default':_0x55388d,'validate':_0xd52c6d=>{const _0x5564ad=_0x290abd,_0x49e8d4=_0xd52c6d[_0x5564ad(0x9f)]()||_0x55388d,_0x5afa62=getProjectNameValidationError(_0x49e8d4);if(_0x5afa62)return _0x5afa62;const _0x324674=a161_0x44b4f7[_0x5564ad(0xb5)](process[_0x5564ad(0xae)](),_0x49e8d4);if(existsSync(_0x324674))return _0x5564ad(0xb0)+_0x49e8d4+'\x22\x20already\x20exists';return!![];}});console[_0x290abd(0xa9)](a161_0x3ab765['green']('√\x20Project\x20Name:\x20'+a161_0x3ab765[_0x290abd(0xad)](_0xd276d7)));const _0x458872=await selectSingleAppcode(_0x2ca6fb);console['log'](a161_0x3ab765['green'](_0x290abd(0xa5)+a161_0x3ab765[_0x290abd(0xad)](_0x458872||_0x290abd(0xa4))));if(_0x458872){const _0x363d20=await getIsSessionValid();if(!_0x363d20){const _0x20cfda=await confirm({'message':'No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','default':!![]});if(_0x20cfda){const _0x37f019=await authServer({'silent':!![]});console[_0x290abd(0xa9)](a161_0x3ab765['green']('√\x20Login\x20status:\x20'+a161_0x3ab765[_0x290abd(0xad)](_0x37f019?'Logged\x20in':'Login\x20failed')));}else console['log'](a161_0x3ab765[_0x290abd(0xa3)](_0x290abd(0xa7)+a161_0x3ab765[_0x290abd(0xad)](_0x290abd(0xb1))));}await _0x15cd6f({'projectName':_0xd276d7,'appCode':_0x458872,'env':_0x3cc97e||_0x4a8e81||'production'});}else await _0x15cd6f({'projectName':_0xd276d7,'env':_0x3cc97e||_0x4a8e81||_0x290abd(0xa0)});}
@@ -1 +1 @@
1
- function a162_0x15f6(){const _0x2bff1b=['toFixed','786PTblRp','35Xwqjor','104WgvRdt','212715coKJiI','116SGYMNz','673849ynHIhU','replace','1302284WJtHyh','531013pOHDjz','now','70gUMQXe','311150DSrGRI','224418tlXDaY'];a162_0x15f6=function(){return _0x2bff1b;};return a162_0x15f6();}(function(_0x154e2a,_0x8f1576){const _0x5f33d0=a162_0x1021,_0x4eaa86=_0x154e2a();while(!![]){try{const _0x3bd26c=parseInt(_0x5f33d0(0xb7))/0x1+-parseInt(_0x5f33d0(0xb0))/0x2*(parseInt(_0x5f33d0(0xac))/0x3)+-parseInt(_0x5f33d0(0xb3))/0x4+-parseInt(_0x5f33d0(0xad))/0x5*(-parseInt(_0x5f33d0(0xaa))/0x6)+parseInt(_0x5f33d0(0xb4))/0x7+-parseInt(_0x5f33d0(0xae))/0x8*(-parseInt(_0x5f33d0(0xaf))/0x9)+-parseInt(_0x5f33d0(0xb6))/0xa*(parseInt(_0x5f33d0(0xb1))/0xb);if(_0x3bd26c===_0x8f1576)break;else _0x4eaa86['push'](_0x4eaa86['shift']());}catch(_0x1944db){_0x4eaa86['push'](_0x4eaa86['shift']());}}}(a162_0x15f6,0x2d889));function a162_0x1021(_0x40a0ff,_0x268acc){_0x40a0ff=_0x40a0ff-0xaa;const _0x15f6bb=a162_0x15f6();let _0x1021c8=_0x15f6bb[_0x40a0ff];return _0x1021c8;}export function formatElapsed(_0x3bd54a){const _0x5d95d0=a162_0x1021,_0x1804aa=Date[_0x5d95d0(0xb5)]()-_0x3bd54a;if(_0x1804aa<0x3e8)return _0x1804aa+'ms';const _0x104b13=(_0x1804aa/0x3e8)[_0x5d95d0(0xab)](0x2),_0x3d1304=_0x104b13[_0x5d95d0(0xb2)](/\.?0+$/u,'');return _0x3d1304+'s';}
1
+ (function(_0x30e98f,_0x4da2f0){const _0x4c80fa=a162_0x12bd,_0x17de84=_0x30e98f();while(!![]){try{const _0x171807=parseInt(_0x4c80fa(0x1b6))/0x1*(parseInt(_0x4c80fa(0x1be))/0x2)+-parseInt(_0x4c80fa(0x1b8))/0x3*(parseInt(_0x4c80fa(0x1b3))/0x4)+-parseInt(_0x4c80fa(0x1bb))/0x5+-parseInt(_0x4c80fa(0x1b9))/0x6+parseInt(_0x4c80fa(0x1ba))/0x7*(parseInt(_0x4c80fa(0x1b7))/0x8)+parseInt(_0x4c80fa(0x1bd))/0x9*(-parseInt(_0x4c80fa(0x1bf))/0xa)+-parseInt(_0x4c80fa(0x1bc))/0xb*(-parseInt(_0x4c80fa(0x1b4))/0xc);if(_0x171807===_0x4da2f0)break;else _0x17de84['push'](_0x17de84['shift']());}catch(_0x4d0183){_0x17de84['push'](_0x17de84['shift']());}}}(a162_0x4360,0xb8972));function a162_0x12bd(_0x71ec99,_0x4fd95c){_0x71ec99=_0x71ec99-0x1b3;const _0x43607c=a162_0x4360();let _0x12bd08=_0x43607c[_0x71ec99];return _0x12bd08;}function a162_0x4360(){const _0x37cf48=['10KqhNwj','52XjfwoF','24wdkYNj','toFixed','37bJeSbF','37728GUoRra','198111CXzSoo','7072248zVOMAp','973axCRuJ','6242760ysUTVZ','24611147BHxDGb','13179042XGvMEa','20318jjsUQK'];a162_0x4360=function(){return _0x37cf48;};return a162_0x4360();}export function formatElapsed(_0xa98387){const _0xd3f21c=a162_0x12bd,_0x33901d=Date['now']()-_0xa98387;if(_0x33901d<0x3e8)return _0x33901d+'ms';const _0x13ce1f=(_0x33901d/0x3e8)[_0xd3f21c(0x1b5)](0x2),_0xc392d0=_0x13ce1f['replace'](/\.?0+$/u,'');return _0xc392d0+'s';}
@@ -1 +1 @@
1
- (function(_0x96c501,_0x4f2cf3){const _0x325117=a163_0x19ab,_0x447043=_0x96c501();while(!![]){try{const _0x5bcaf1=-parseInt(_0x325117(0x12c))/0x1+-parseInt(_0x325117(0x131))/0x2*(-parseInt(_0x325117(0x120))/0x3)+-parseInt(_0x325117(0x114))/0x4+parseInt(_0x325117(0x100))/0x5+parseInt(_0x325117(0x113))/0x6+-parseInt(_0x325117(0x108))/0x7*(parseInt(_0x325117(0x115))/0x8)+parseInt(_0x325117(0xd5))/0x9*(parseInt(_0x325117(0xec))/0xa);if(_0x5bcaf1===_0x4f2cf3)break;else _0x447043['push'](_0x447043['shift']());}catch(_0x3661cd){_0x447043['push'](_0x447043['shift']());}}}(a163_0x2aa7,0x44a39));import a163_0x40983e from'path';import a163_0x3d01f1 from'fs';import a163_0x3fde1c from'chalk';import a163_0x47cd71 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';function a163_0x19ab(_0x1680f4,_0x52d964){_0x1680f4=_0x1680f4-0xd1;const _0x2aa7aa=a163_0x2aa7();let _0x19abbf=_0x2aa7aa[_0x1680f4];return _0x19abbf;}import{getSdkClientRoutingConfig}from'../../../constant/domain.js';import{generateSdkConfigFile}from'../../../api/generate-sdk-config-file.js';function readDirectoryIdentity(_0x38fa2c){const _0x2772b2=a163_0x19ab;try{const _0x2b4021=a163_0x3d01f1[_0x2772b2(0xfe)](_0x38fa2c);if(!_0x2b4021['isDirectory']())return null;return{'dev':_0x2b4021[_0x2772b2(0xf4)],'ino':_0x2b4021[_0x2772b2(0x126)]};}catch{return null;}}export async function createApp(_0x227284){const _0x2c6043=a163_0x19ab,_0x4b55d6=await checkCliVersion();(_0x4b55d6['needsUpgrade']||_0x4b55d6[_0x2c6043(0x10f)])&&(printCliUpgradeWarning(_0x4b55d6),assertCliVersionSupported(_0x4b55d6),logger['info']('create',_0x2c6043(0x13a),{'currentVersion':_0x4b55d6[_0x2c6043(0xff)],'stableVersion':_0x4b55d6[_0x2c6043(0xf9)],'minimumVersion':_0x4b55d6[_0x2c6043(0x106)],'needsUpgrade':_0x4b55d6[_0x2c6043(0xeb)],'belowMinimum':_0x4b55d6[_0x2c6043(0x10f)]}));if(_0x227284[_0x2c6043(0x137)]&&(_0x227284['appCode']||_0x227284[_0x2c6043(0x110)]))await runCreate({'projectName':_0x227284[_0x2c6043(0x137)],'appCode':_0x227284[_0x2c6043(0xfc)],'env':_0x227284[_0x2c6043(0xf6)]},_0x227284);else{if(_0x227284[_0x2c6043(0x137)]){const _0x4e4b4c=await selectSingleAppcode(_0x227284[_0x2c6043(0x127)]);await runCreate({'projectName':_0x227284[_0x2c6043(0x137)],'appCode':_0x4e4b4c||undefined,'env':_0x227284[_0x2c6043(0xf6)]},_0x227284);}else await guidedCreateProject(_0x367fcc=>runCreate(_0x367fcc,_0x227284),_0x227284[_0x2c6043(0xf6)],_0x227284[_0x2c6043(0x127)]);}}function a163_0x2aa7(){const _0x385c6b=['2WPLPAG','projectName','API\x20configuration\x20pulled:\x20','message','Project\x20template\x20ready','start','projectCode','\x20√\x20','...','CLI\x20version\x20check','package.json','Install\x20dependencies','apps','utf8','parse','1251uVznZq','Failed\x20to\x20configure\x20app\x20AppCode','copying','\x20model(s)','Downloading\x20project\x20template','extracting','readFileSync','\x20api\x20pull','keys','API\x20configuration\x20pull\x20failed','description','\x20|\x20AppCode:\x20','chdir','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','√\x20Configuration\x20file\x20created,\x20Apps:\x20','*\x20Configuring\x20AppCode\x20for\x20project\x20','setLogPath','stringify','cyan','modelCount','Format\x20code','\x20\x201.\x20Start\x20project:\x20','needsUpgrade','8210QmnHYQ','length','rmSync','resolve','Skip\x20cleanup:\x20project\x20directory\x20ownership\x20changed:\x20','√\x20Pulled\x20','constants','verifying','dev','bold','env','info','log','stableVersion','version','Extracting\x20project\x20template','appCode','green','lstatSync','currentVersion','1308395exWBXI','repeat','writeFileSync','Updating\x20package.json\x20name','resolving','cwd','minimumVersion','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','400701cCLQmc','name','create','templateSource','*\x20Pulling\x20API\x20configuration...','Configured\x20app\x20AppCode:\x20','1.0.0','belowMinimum','nonInteractive','\x20\x202.\x20Pull\x20API\x20configuration:\x20','error','1792170HsgOvS','1474020nfrlTG','24vSCdJM','Failed\x20to\x20clean\x20up\x20project\x20directory:\x20','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','text','\x20config\x20set\x20appcode\x20<app-code>\x27','warn','join','\x20already\x20exists','\x20&&\x20','existsSync','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','986343iZuFUG','gray','Starting\x20project\x20creation:\x20','production','downloading','stop','ino','cookie','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','fail','W_OK','dirname','181895rpMUBn','Resolving\x20project\x20template','Project\x20name:\x20','\x20run\x20start','success'];a163_0x2aa7=function(){return _0x385c6b;};return a163_0x2aa7();}async function runCreate(_0x35822d,_0x2d2291){const _0x25cccc=a163_0x19ab;_0x35822d[_0x25cccc(0x132)]=validateProjectName(_0x35822d[_0x25cccc(0x132)]);const _0x3bb1be=a163_0x40983e['resolve'](process[_0x25cccc(0x105)](),_0x35822d[_0x25cccc(0x132)]);if(a163_0x3d01f1[_0x25cccc(0x11e)](_0x3bb1be))throw new Error('Project\x20directory\x20'+_0x35822d['projectName']+_0x25cccc(0x11c));let _0x303f9e=null;try{a163_0x3d01f1['accessSync'](a163_0x40983e[_0x25cccc(0x12b)](_0x3bb1be),a163_0x3d01f1[_0x25cccc(0xf2)][_0x25cccc(0x12a)]);}catch{throw new Error(_0x25cccc(0x117));}logger[_0x25cccc(0xf7)](_0x25cccc(0x10a),_0x25cccc(0x122)+_0x35822d['projectName'],{'projectDir':_0x3bb1be,'appCode':_0x35822d['appCode']}),console[_0x25cccc(0xf8)](),console[_0x25cccc(0xf8)](a163_0x3fde1c[_0x25cccc(0xfd)](_0x25cccc(0x138))+_0x25cccc(0x12e)+a163_0x3fde1c['green'](_0x35822d[_0x25cccc(0x132)])+(_0x35822d[_0x25cccc(0xfc)]?_0x25cccc(0xe0)+a163_0x3fde1c[_0x25cccc(0xe7)](_0x35822d[_0x25cccc(0xfc)]):''));try{await runTask(_0x25cccc(0x12d),_0xde676=>copyProjectTemplate(_0x35822d[_0x25cccc(0x132)],_0x3fc813=>_0xde676(projectTemplateStageLabel(_0x3fc813)),_0x2d2291[_0x25cccc(0x10b)]),_0x25cccc(0x135)),_0x303f9e=readDirectoryIdentity(_0x3bb1be);if(!_0x303f9e)throw new Error('Unable\x20to\x20verify\x20ownership\x20of\x20the\x20created\x20project\x20directory');await updatePackageJsonName(_0x35822d[_0x25cccc(0x132)]),await runTask(_0x25cccc(0xd1),()=>installDependencies(_0x35822d[_0x25cccc(0x132)])),await runTask(_0x25cccc(0xe9),()=>formatProjectCode(_0x35822d[_0x25cccc(0x132)])),await configureAppCode(_0x35822d[_0x25cccc(0x132)],_0x35822d[_0x25cccc(0xfc)]||'',_0x35822d[_0x25cccc(0xf6)]);let _0x364da5=![];if(_0x35822d[_0x25cccc(0xfc)]){console['log'](_0x25cccc(0x10c));const _0x3d1f4e=process[_0x25cccc(0x105)]();try{process[_0x25cccc(0xe1)](_0x3bb1be);const _0x1e28f0=_0x35822d[_0x25cccc(0xf6)]||_0x25cccc(0x123);initEnv(_0x1e28f0);const {configArray:_0x4c889f}=await fetchModelList(_0x35822d[_0x25cccc(0xfc)],_0x2d2291[_0x25cccc(0x127)]||''),_0xb4480f=DEFAULT_API_DIR,_0x487156=await generateApiFile(_0x4c889f,'',_0x35822d[_0x25cccc(0xfc)],!![],_0x1e28f0,_0xb4480f,undefined,getSdkClientRoutingConfig(),{'overwriteTypescript':!![]});console[_0x25cccc(0xf8)](_0x25cccc(0xf1)+_0x4c889f[_0x25cccc(0xed)]+'\x20dataset(s),\x20generated\x20'+_0x487156[_0x25cccc(0xe8)]+_0x25cccc(0xd8)),logger['info'](_0x25cccc(0x10a),_0x25cccc(0x133)+_0x35822d[_0x25cccc(0xfc)]);}catch(_0xbf8a89){_0x364da5=!![],console['log'](_0x25cccc(0x107)),logger[_0x25cccc(0x11a)]('create',_0x25cccc(0xde),{'error':_0xbf8a89 instanceof Error?_0xbf8a89[_0x25cccc(0x134)]:String(_0xbf8a89)});}finally{process[_0x25cccc(0xe1)](_0x3d1f4e);}}logger[_0x25cccc(0xe5)](_0x3bb1be),logger[_0x25cccc(0x130)](_0x25cccc(0x10a),'Project\x20created:\x20'+_0x35822d[_0x25cccc(0x132)]),console['log'](),console['log'](a163_0x3fde1c['green']('─'['repeat'](0x3c))),console[_0x25cccc(0xf8)](a163_0x3fde1c[_0x25cccc(0xe7)][_0x25cccc(0xf5)]('🚀\x20Next\x20Steps:')),console[_0x25cccc(0xf8)](),console[_0x25cccc(0xf8)](_0x25cccc(0xea)+a163_0x3fde1c[_0x25cccc(0xe7)][_0x25cccc(0xf5)]('cd\x20'+_0x35822d[_0x25cccc(0x132)]+_0x25cccc(0x11d)+CLI_BIN_NAME+_0x25cccc(0x12f))),_0x364da5&&console['log'](_0x25cccc(0x111)+a163_0x3fde1c[_0x25cccc(0xe7)][_0x25cccc(0xf5)](CLI_BIN_NAME+_0x25cccc(0xdc))),console[_0x25cccc(0xf8)](a163_0x3fde1c[_0x25cccc(0xfd)]('─'[_0x25cccc(0x101)](0x3c)));}catch(_0x4152d8){logger[_0x25cccc(0x112)]('create','Project\x20creation\x20failed:\x20'+_0x35822d[_0x25cccc(0x132)],{'error':_0x4152d8 instanceof Error?_0x4152d8['message']:String(_0x4152d8)});try{const _0x269155=readDirectoryIdentity(_0x3bb1be);if(_0x303f9e&&_0x269155?.[_0x25cccc(0xf4)]===_0x303f9e[_0x25cccc(0xf4)]&&_0x269155[_0x25cccc(0x126)]===_0x303f9e[_0x25cccc(0x126)])console[_0x25cccc(0xf8)]('*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20'+_0x3bb1be),a163_0x3d01f1[_0x25cccc(0xee)](_0x3bb1be,{'recursive':!![],'force':!![]});else _0x269155&&logger[_0x25cccc(0x11a)](_0x25cccc(0x10a),_0x25cccc(0xf0)+_0x3bb1be);}catch{logger['warn'](_0x25cccc(0x10a),_0x25cccc(0x116)+_0x3bb1be);}throw _0x4152d8;}}async function runTask(_0x5aa7ea,_0x23cc0d,_0x3aa3b9=_0x5aa7ea){const _0x192c07=a163_0x19ab,_0x127e14=a163_0x47cd71(_0x5aa7ea+_0x192c07(0x139))[_0x192c07(0x136)]();try{const _0x5a1356=await _0x23cc0d(_0xbab9fb=>{const _0x4ccfc5=_0x192c07;_0x127e14[_0x4ccfc5(0x118)]=_0xbab9fb+_0x4ccfc5(0x139);});_0x127e14[_0x192c07(0x125)](),console[_0x192c07(0xf8)](''+a163_0x3fde1c[_0x192c07(0xfd)](_0x192c07(0x138))+_0x3aa3b9+'\x20'+a163_0x3fde1c[_0x192c07(0x121)]('['+_0x5a1356+']'));}catch(_0x38238c){_0x127e14[_0x192c07(0x129)](_0x5aa7ea);throw _0x38238c;}}function projectTemplateStageLabel(_0x37834b){const _0x106b55=a163_0x19ab;switch(_0x37834b){case _0x106b55(0x104):return _0x106b55(0x12d);case _0x106b55(0x124):return _0x106b55(0xd9);case _0x106b55(0xf3):return'Verifying\x20project\x20template';case _0x106b55(0xda):return _0x106b55(0xfb);case _0x106b55(0xd7):return'Copying\x20local\x20template\x20source';}}async function updatePackageJsonName(_0x20f927){const _0x23448f=a163_0x19ab,_0x5ab34f=a163_0x40983e[_0x23448f(0xef)](process['cwd'](),_0x20f927),_0xfe5608=a163_0x40983e['join'](_0x5ab34f,_0x23448f(0x13b));try{console[_0x23448f(0xf8)](_0x23448f(0x11f));const _0x48b2b3=getRabetbaseCliPackageRoot(),_0x310be9=a163_0x40983e[_0x23448f(0x11b)](_0x48b2b3,_0x23448f(0x13b));let _0x338f76=_0x23448f(0x10e);try{const _0x424624=JSON['parse'](a163_0x3d01f1['readFileSync'](_0x310be9,'utf8'));_0x338f76=_0x424624[_0x23448f(0xfa)]||_0x23448f(0x10e);}catch{}const _0x5a2751=a163_0x3d01f1[_0x23448f(0xdb)](_0xfe5608,_0x23448f(0xd3)),_0x8bf117=JSON['parse'](_0x5a2751);_0x8bf117[_0x23448f(0x109)]=_0x20f927,_0x8bf117[_0x23448f(0xdf)]=_0x20f927+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0x338f76,a163_0x3d01f1[_0x23448f(0x102)](_0xfe5608,JSON[_0x23448f(0xe6)](_0x8bf117,null,0x2)+'\x0a','utf8'),console[_0x23448f(0xf8)]('√\x20package.json\x20updated:\x20name='+_0x20f927),logger[_0x23448f(0xf7)](_0x23448f(0x10a),_0x23448f(0x103));}catch(_0x167872){logger[_0x23448f(0x112)]('create','Failed\x20to\x20update\x20package.json');throw _0x167872;}}async function configureAppCode(_0x250219,_0x5f42d9,_0x312f3c){const _0x21c1c8=a163_0x19ab,_0x2e1f80=a163_0x40983e[_0x21c1c8(0xef)](process['cwd'](),_0x250219),_0x191bff=a163_0x40983e[_0x21c1c8(0x11b)](_0x2e1f80,NEW_CONFIG_NAME);try{_0x5f42d9?console[_0x21c1c8(0xf8)](_0x21c1c8(0xe4)+_0x250219+':\x20'+_0x5f42d9):console[_0x21c1c8(0xf8)](_0x21c1c8(0xe2)+_0x250219);const _0xde9c5a=getRabetbaseCliPackageRoot(),_0x2ad8c4=a163_0x40983e[_0x21c1c8(0x11b)](_0xde9c5a,_0x21c1c8(0x13b));let _0x5f582e=_0x21c1c8(0x10e);try{const _0x11e7bc=JSON[_0x21c1c8(0xd4)](a163_0x3d01f1['readFileSync'](_0x2ad8c4,_0x21c1c8(0xd3)));_0x5f582e=_0x11e7bc['version']||'1.0.0';}catch{}const {globalConfig:_0x4360fc}=loadRawConfigLayers(),_0x5ab02e=typeof _0x4360fc[_0x21c1c8(0xf6)]==='string'?_0x4360fc[_0x21c1c8(0xf6)]:undefined,_0x2b4885={};for(const _0x4cdf99 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x4360fc[_0x4cdf99]!=null)_0x2b4885[_0x4cdf99]=_0x4360fc[_0x4cdf99];}const _0x228786=buildCanonicalProjectConfig(_0x2b4885,{'appCodes':_0x5f42d9?[_0x5f42d9]:[],'env':_0x312f3c||_0x5ab02e||_0x21c1c8(0x123),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x5f582e}});writeConfigFile(_0x191bff,_0x228786),await generateSdkConfigFile(a163_0x40983e['join'](_0x2e1f80,DEFAULT_API_DIR),getSdkClientRoutingConfig()),_0x5f42d9?console[_0x21c1c8(0xf8)](_0x21c1c8(0xe3)+Object[_0x21c1c8(0xdd)](_0x228786[_0x21c1c8(0xd2)]||{})[_0x21c1c8(0x11b)](',\x20')+'\x20|\x20Default:\x20implicit\x20(single\x20app)'):console[_0x21c1c8(0xf8)](_0x21c1c8(0x128)+CLI_BIN_NAME+_0x21c1c8(0x119)),logger[_0x21c1c8(0xf7)](_0x21c1c8(0x10a),_0x21c1c8(0x10d)+_0x5f42d9);}catch(_0x483b04){logger[_0x21c1c8(0x112)]('create',_0x21c1c8(0xd6));throw _0x483b04;}}
1
+ (function(_0x2de36c,_0x1ae8bc){const _0x3b5b3d=a163_0x5dd9,_0x2e8e78=_0x2de36c();while(!![]){try{const _0x33fcac=-parseInt(_0x3b5b3d(0x190))/0x1+-parseInt(_0x3b5b3d(0x13e))/0x2+parseInt(_0x3b5b3d(0x174))/0x3+-parseInt(_0x3b5b3d(0x182))/0x4+-parseInt(_0x3b5b3d(0x15a))/0x5*(parseInt(_0x3b5b3d(0x179))/0x6)+parseInt(_0x3b5b3d(0x16d))/0x7+-parseInt(_0x3b5b3d(0x13b))/0x8*(-parseInt(_0x3b5b3d(0x138))/0x9);if(_0x33fcac===_0x1ae8bc)break;else _0x2e8e78['push'](_0x2e8e78['shift']());}catch(_0x46f283){_0x2e8e78['push'](_0x2e8e78['shift']());}}}(a163_0x2f27,0xef2e9));import a163_0xb7bd68 from'path';import a163_0x489877 from'fs';import a163_0x1e43f8 from'chalk';import a163_0x1562fc 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';function a163_0x2f27(){const _0x9dcb24=['\x20run\x20start','green','\x20\x202.\x20Pull\x20API\x20configuration:\x20','start','\x20Generated\x20by\x20rabetbase\x20cli\x20','gray','\x20model(s)','name','needsUpgrade','resolving','ino','rmSync','135NWPnbN','projectCode','Format\x20code','1344480tOBgKt','downloading','√\x20Pulled\x20','3205604LyoLbo','Project\x20template\x20ready','version','string','...','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','cwd','toLocaleString','nonInteractive','chdir','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','warn','constants','description','belowMinimum','Project\x20created:\x20','dev','copying','templateSource','dirname','\x20dataset(s),\x20generated\x20','stringify','create','info','stableVersion','Failed\x20to\x20configure\x20app\x20AppCode','\x20\x201.\x20Start\x20project:\x20','fail','129235mNiglH','parse','cyan','error','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','Project\x20name:\x20','lstatSync','repeat','*\x20Pulling\x20API\x20configuration...','production','stop','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','Starting\x20project\x20creation:\x20','Install\x20dependencies','√\x20package.json\x20updated:\x20name=','text','readFileSync','join','CLI\x20version\x20check','9254350JyCQQp','keys','utf8','API\x20configuration\x20pulled:\x20','package.json','W_OK','accessSync','2632248NEKBdn','Copying\x20local\x20template\x20source','minimumVersion','Resolving\x20project\x20template','appCode','258AlNaoP','setLogPath','apps','env','API\x20configuration\x20pull\x20failed','resolve','Unable\x20to\x20verify\x20ownership\x20of\x20the\x20created\x20project\x20directory','Extracting\x20project\x20template','Failed\x20to\x20clean\x20up\x20project\x20directory:\x20','2003400goZIji','cookie','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','log','bold','projectName','🚀\x20Next\x20Steps:','modelCount','1.0.0','success','currentVersion','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','\x20√\x20','message','525604dhgLPt','Updating\x20package.json\x20name','\x20|\x20AppCode:\x20','\x20config\x20set\x20appcode\x20<app-code>\x27','\x20&&\x20'];a163_0x2f27=function(){return _0x9dcb24;};return a163_0x2f27();}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';function a163_0x5dd9(_0x13a216,_0xe6d966){_0x13a216=_0x13a216-0x134;const _0x2f27ff=a163_0x2f27();let _0x5dd941=_0x2f27ff[_0x13a216];return _0x5dd941;}import{getSdkClientRoutingConfig}from'../../../constant/domain.js';import{generateSdkConfigFile}from'../../../api/generate-sdk-config-file.js';function readDirectoryIdentity(_0x25cfea){const _0x469a1f=a163_0x5dd9;try{const _0x13a696=a163_0x489877[_0x469a1f(0x160)](_0x25cfea);if(!_0x13a696['isDirectory']())return null;return{'dev':_0x13a696[_0x469a1f(0x14e)],'ino':_0x13a696[_0x469a1f(0x136)]};}catch{return null;}}export async function createApp(_0x224b38){const _0x49f0c3=a163_0x5dd9,_0x209cfb=await checkCliVersion();(_0x209cfb[_0x49f0c3(0x134)]||_0x209cfb[_0x49f0c3(0x14c)])&&(printCliUpgradeWarning(_0x209cfb),assertCliVersionSupported(_0x209cfb),logger['info'](_0x49f0c3(0x154),_0x49f0c3(0x16c),{'currentVersion':_0x209cfb[_0x49f0c3(0x18c)],'stableVersion':_0x209cfb[_0x49f0c3(0x156)],'minimumVersion':_0x209cfb[_0x49f0c3(0x176)],'needsUpgrade':_0x209cfb[_0x49f0c3(0x134)],'belowMinimum':_0x209cfb[_0x49f0c3(0x14c)]}));if(_0x224b38['projectCode']&&(_0x224b38[_0x49f0c3(0x178)]||_0x224b38[_0x49f0c3(0x146)]))await runCreate({'projectName':_0x224b38[_0x49f0c3(0x139)],'appCode':_0x224b38[_0x49f0c3(0x178)],'env':_0x224b38['env']},_0x224b38);else{if(_0x224b38[_0x49f0c3(0x139)]){const _0x2bdb64=await selectSingleAppcode(_0x224b38['cookie']);await runCreate({'projectName':_0x224b38[_0x49f0c3(0x139)],'appCode':_0x2bdb64||undefined,'env':_0x224b38[_0x49f0c3(0x17c)]},_0x224b38);}else await guidedCreateProject(_0x4fdb7b=>runCreate(_0x4fdb7b,_0x224b38),_0x224b38['env'],_0x224b38[_0x49f0c3(0x183)]);}}async function runCreate(_0x422f04,_0x10fda6){const _0x1172d4=a163_0x5dd9;_0x422f04[_0x1172d4(0x187)]=validateProjectName(_0x422f04[_0x1172d4(0x187)]);const _0x82fd79=a163_0xb7bd68[_0x1172d4(0x17e)](process[_0x1172d4(0x144)](),_0x422f04[_0x1172d4(0x187)]);if(a163_0x489877['existsSync'](_0x82fd79))throw new Error('Project\x20directory\x20'+_0x422f04[_0x1172d4(0x187)]+'\x20already\x20exists');let _0x219027=null;try{a163_0x489877[_0x1172d4(0x173)](a163_0xb7bd68[_0x1172d4(0x151)](_0x82fd79),a163_0x489877[_0x1172d4(0x14a)][_0x1172d4(0x172)]);}catch{throw new Error(_0x1172d4(0x15e));}logger['info']('create',_0x1172d4(0x166)+_0x422f04[_0x1172d4(0x187)],{'projectDir':_0x82fd79,'appCode':_0x422f04[_0x1172d4(0x178)]}),console['log'](),console[_0x1172d4(0x185)](a163_0x1e43f8[_0x1172d4(0x196)](_0x1172d4(0x18e))+_0x1172d4(0x15f)+a163_0x1e43f8[_0x1172d4(0x196)](_0x422f04['projectName'])+(_0x422f04[_0x1172d4(0x178)]?_0x1172d4(0x192)+a163_0x1e43f8[_0x1172d4(0x15c)](_0x422f04[_0x1172d4(0x178)]):''));try{await runTask(_0x1172d4(0x177),_0x171e51=>copyProjectTemplate(_0x422f04[_0x1172d4(0x187)],_0x5e5daa=>_0x171e51(projectTemplateStageLabel(_0x5e5daa)),_0x10fda6[_0x1172d4(0x150)]),_0x1172d4(0x13f)),_0x219027=readDirectoryIdentity(_0x82fd79);if(!_0x219027)throw new Error(_0x1172d4(0x17f));await updatePackageJsonName(_0x422f04[_0x1172d4(0x187)]),await runTask(_0x1172d4(0x167),()=>installDependencies(_0x422f04[_0x1172d4(0x187)])),await runTask(_0x1172d4(0x13a),()=>formatProjectCode(_0x422f04[_0x1172d4(0x187)])),await configureAppCode(_0x422f04[_0x1172d4(0x187)],_0x422f04[_0x1172d4(0x178)]||'',_0x422f04[_0x1172d4(0x17c)]);let _0x31e1f2=![];if(_0x422f04[_0x1172d4(0x178)]){console[_0x1172d4(0x185)](_0x1172d4(0x162));const _0x449dd2=process[_0x1172d4(0x144)]();try{process[_0x1172d4(0x147)](_0x82fd79);const _0x30b59b=_0x422f04[_0x1172d4(0x17c)]||'production';initEnv(_0x30b59b);const {configArray:_0x42ef72}=await fetchModelList(_0x422f04[_0x1172d4(0x178)],_0x10fda6['cookie']||''),_0x1d7180=DEFAULT_API_DIR,_0x14be48=await generateApiFile(_0x42ef72,'',_0x422f04[_0x1172d4(0x178)],!![],_0x30b59b,_0x1d7180,undefined,getSdkClientRoutingConfig(),{'overwriteTypescript':!![]});console[_0x1172d4(0x185)](_0x1172d4(0x13d)+_0x42ef72['length']+_0x1172d4(0x152)+_0x14be48[_0x1172d4(0x189)]+_0x1172d4(0x19b)),logger[_0x1172d4(0x155)](_0x1172d4(0x154),_0x1172d4(0x170)+_0x422f04[_0x1172d4(0x178)]);}catch(_0x585e9d){_0x31e1f2=!![],console[_0x1172d4(0x185)](_0x1172d4(0x18d)),logger['warn'](_0x1172d4(0x154),_0x1172d4(0x17d),{'error':_0x585e9d instanceof Error?_0x585e9d['message']:String(_0x585e9d)});}finally{process[_0x1172d4(0x147)](_0x449dd2);}}logger[_0x1172d4(0x17a)](_0x82fd79),logger[_0x1172d4(0x18b)](_0x1172d4(0x154),_0x1172d4(0x14d)+_0x422f04[_0x1172d4(0x187)]),console['log'](),console['log'](a163_0x1e43f8[_0x1172d4(0x196)]('─'[_0x1172d4(0x161)](0x3c))),console[_0x1172d4(0x185)](a163_0x1e43f8[_0x1172d4(0x15c)]['bold'](_0x1172d4(0x188))),console[_0x1172d4(0x185)](),console[_0x1172d4(0x185)](_0x1172d4(0x158)+a163_0x1e43f8[_0x1172d4(0x15c)][_0x1172d4(0x186)]('cd\x20'+_0x422f04['projectName']+_0x1172d4(0x194)+CLI_BIN_NAME+_0x1172d4(0x195))),_0x31e1f2&&console[_0x1172d4(0x185)](_0x1172d4(0x197)+a163_0x1e43f8[_0x1172d4(0x15c)][_0x1172d4(0x186)](CLI_BIN_NAME+'\x20api\x20pull')),console[_0x1172d4(0x185)](a163_0x1e43f8['green']('─'['repeat'](0x3c)));}catch(_0x15e5ad){logger['error'](_0x1172d4(0x154),'Project\x20creation\x20failed:\x20'+_0x422f04[_0x1172d4(0x187)],{'error':_0x15e5ad instanceof Error?_0x15e5ad[_0x1172d4(0x18f)]:String(_0x15e5ad)});try{const _0x194d8b=readDirectoryIdentity(_0x82fd79);if(_0x219027&&_0x194d8b?.[_0x1172d4(0x14e)]===_0x219027['dev']&&_0x194d8b[_0x1172d4(0x136)]===_0x219027[_0x1172d4(0x136)])console[_0x1172d4(0x185)](_0x1172d4(0x165)+_0x82fd79),a163_0x489877[_0x1172d4(0x137)](_0x82fd79,{'recursive':!![],'force':!![]});else _0x194d8b&&logger['warn'](_0x1172d4(0x154),'Skip\x20cleanup:\x20project\x20directory\x20ownership\x20changed:\x20'+_0x82fd79);}catch{logger[_0x1172d4(0x149)](_0x1172d4(0x154),_0x1172d4(0x181)+_0x82fd79);}throw _0x15e5ad;}}async function runTask(_0x42fcad,_0x47289d,_0x138396=_0x42fcad){const _0x2505dc=a163_0x5dd9,_0x4c9c15=a163_0x1562fc(_0x42fcad+'...')[_0x2505dc(0x198)]();try{const _0x103991=await _0x47289d(_0x1f727c=>{const _0x4b0b54=_0x2505dc;_0x4c9c15[_0x4b0b54(0x169)]=_0x1f727c+_0x4b0b54(0x142);});_0x4c9c15[_0x2505dc(0x164)](),console[_0x2505dc(0x185)](''+a163_0x1e43f8[_0x2505dc(0x196)](_0x2505dc(0x18e))+_0x138396+'\x20'+a163_0x1e43f8[_0x2505dc(0x19a)]('['+_0x103991+']'));}catch(_0x16e35c){_0x4c9c15[_0x2505dc(0x159)](_0x42fcad);throw _0x16e35c;}}function projectTemplateStageLabel(_0x23e35e){const _0x1f1270=a163_0x5dd9;switch(_0x23e35e){case _0x1f1270(0x135):return _0x1f1270(0x177);case _0x1f1270(0x13c):return'Downloading\x20project\x20template';case'verifying':return'Verifying\x20project\x20template';case'extracting':return _0x1f1270(0x180);case _0x1f1270(0x14f):return _0x1f1270(0x175);}}async function updatePackageJsonName(_0x358568){const _0x4f2875=a163_0x5dd9,_0x3acebc=a163_0xb7bd68['resolve'](process[_0x4f2875(0x144)](),_0x358568),_0x2f3149=a163_0xb7bd68[_0x4f2875(0x16b)](_0x3acebc,_0x4f2875(0x171));try{console[_0x4f2875(0x185)](_0x4f2875(0x184));const _0x3d8e4b=getRabetbaseCliPackageRoot(),_0x2712d5=a163_0xb7bd68[_0x4f2875(0x16b)](_0x3d8e4b,'package.json');let _0x4f606d=_0x4f2875(0x18a);try{const _0x531b88=JSON[_0x4f2875(0x15b)](a163_0x489877[_0x4f2875(0x16a)](_0x2712d5,_0x4f2875(0x16f)));_0x4f606d=_0x531b88[_0x4f2875(0x140)]||'1.0.0';}catch{}const _0x3a8cf6=a163_0x489877[_0x4f2875(0x16a)](_0x2f3149,_0x4f2875(0x16f)),_0x4199c6=JSON[_0x4f2875(0x15b)](_0x3a8cf6);_0x4199c6[_0x4f2875(0x19c)]=_0x358568,_0x4199c6[_0x4f2875(0x14b)]=_0x358568+_0x4f2875(0x199)+_0x4f606d,a163_0x489877['writeFileSync'](_0x2f3149,JSON[_0x4f2875(0x153)](_0x4199c6,null,0x2)+'\x0a',_0x4f2875(0x16f)),console['log'](_0x4f2875(0x168)+_0x358568),logger['info'](_0x4f2875(0x154),_0x4f2875(0x191));}catch(_0x46c759){logger['error'](_0x4f2875(0x154),'Failed\x20to\x20update\x20package.json');throw _0x46c759;}}async function configureAppCode(_0xda9c69,_0x3704ef,_0x5d78bb){const _0x5ab5aa=a163_0x5dd9,_0x2b4d84=a163_0xb7bd68[_0x5ab5aa(0x17e)](process[_0x5ab5aa(0x144)](),_0xda9c69),_0x21d361=a163_0xb7bd68['join'](_0x2b4d84,NEW_CONFIG_NAME);try{_0x3704ef?console['log']('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0xda9c69+':\x20'+_0x3704ef):console[_0x5ab5aa(0x185)](_0x5ab5aa(0x143)+_0xda9c69);const _0x3c338f=getRabetbaseCliPackageRoot(),_0x113532=a163_0xb7bd68[_0x5ab5aa(0x16b)](_0x3c338f,_0x5ab5aa(0x171));let _0x543fd2=_0x5ab5aa(0x18a);try{const _0x468643=JSON[_0x5ab5aa(0x15b)](a163_0x489877[_0x5ab5aa(0x16a)](_0x113532,_0x5ab5aa(0x16f)));_0x543fd2=_0x468643[_0x5ab5aa(0x140)]||_0x5ab5aa(0x18a);}catch{}const {globalConfig:_0x8b7d06}=loadRawConfigLayers(),_0x4953a2=typeof _0x8b7d06[_0x5ab5aa(0x17c)]===_0x5ab5aa(0x141)?_0x8b7d06[_0x5ab5aa(0x17c)]:undefined,_0x5eb80e={};for(const _0x17537c of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x8b7d06[_0x17537c]!=null)_0x5eb80e[_0x17537c]=_0x8b7d06[_0x17537c];}const _0x47f778=buildCanonicalProjectConfig(_0x5eb80e,{'appCodes':_0x3704ef?[_0x3704ef]:[],'env':_0x5d78bb||_0x4953a2||_0x5ab5aa(0x163),'metadata':{'createdAt':new Date()[_0x5ab5aa(0x145)](),'version':_0x543fd2}});writeConfigFile(_0x21d361,_0x47f778),await generateSdkConfigFile(a163_0xb7bd68[_0x5ab5aa(0x16b)](_0x2b4d84,DEFAULT_API_DIR),getSdkClientRoutingConfig()),_0x3704ef?console[_0x5ab5aa(0x185)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object[_0x5ab5aa(0x16e)](_0x47f778[_0x5ab5aa(0x17b)]||{})[_0x5ab5aa(0x16b)](',\x20')+'\x20|\x20Default:\x20implicit\x20(single\x20app)'):console['log'](_0x5ab5aa(0x148)+CLI_BIN_NAME+_0x5ab5aa(0x193)),logger['info'](_0x5ab5aa(0x154),'Configured\x20app\x20AppCode:\x20'+_0x3704ef);}catch(_0x4b4606){logger[_0x5ab5aa(0x15d)](_0x5ab5aa(0x154),_0x5ab5aa(0x157));throw _0x4b4606;}}
@@ -1 +1 @@
1
- const a164_0x18a392=a164_0x241c;(function(_0x30cdf4,_0x1b4cbc){const _0xafff8d=a164_0x241c,_0x167128=_0x30cdf4();while(!![]){try{const _0x56ec25=parseInt(_0xafff8d(0x245))/0x1+parseInt(_0xafff8d(0x1f7))/0x2*(-parseInt(_0xafff8d(0x1f8))/0x3)+parseInt(_0xafff8d(0x20d))/0x4+parseInt(_0xafff8d(0x1f0))/0x5*(parseInt(_0xafff8d(0x219))/0x6)+parseInt(_0xafff8d(0x22b))/0x7+parseInt(_0xafff8d(0x24a))/0x8*(-parseInt(_0xafff8d(0x248))/0x9)+parseInt(_0xafff8d(0x22a))/0xa*(-parseInt(_0xafff8d(0x237))/0xb);if(_0x56ec25===_0x1b4cbc)break;else _0x167128['push'](_0x167128['shift']());}catch(_0x6af115){_0x167128['push'](_0x167128['shift']());}}}(a164_0x4d1a,0xb1372));import{createHash}from'node:crypto';import a164_0x128427 from'node:fs/promises';import a164_0x352abb 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(_0x1f64e1){const _0x19bc26=a164_0x241c;return typeof _0x1f64e1===_0x19bc26(0x206)&&_0x1f64e1[_0x19bc26(0x204)]()?_0x1f64e1[_0x19bc26(0x204)]():null;}function parseDescriptor(_0x258940){const _0x437d0d=a164_0x241c;if(!_0x258940||typeof _0x258940!=='object')throw new Error('CDN\x20config\x20does\x20not\x20define\x20template\x20\x22'+TEMPLATE_ID+'\x22.');const _0x5166c6=_0x258940,_0x27a467=nonEmptyString(_0x5166c6[_0x437d0d(0x20a)]),_0x3cdc4a=nonEmptyString(_0x5166c6[_0x437d0d(0x22f)]),_0x531647=nonEmptyString(_0x5166c6[_0x437d0d(0x22d)])?.[_0x437d0d(0x243)](),_0x22c31b=_0x5166c6[_0x437d0d(0x200)];if(!_0x27a467||!_0x3cdc4a||_0x3cdc4a!==a164_0x352abb[_0x437d0d(0x1f5)][_0x437d0d(0x1ea)](_0x3cdc4a)||_0x3cdc4a[_0x437d0d(0x238)]('\x5c')||!_0x531647||!/^sha256:[a-f0-9]{64}$/['test'](_0x531647)||typeof _0x22c31b!==_0x437d0d(0x1de)||!Number['isSafeInteger'](_0x22c31b)||_0x22c31b<=0x0||_0x22c31b>MAX_ARCHIVE_SIZE)throw new Error(_0x437d0d(0x1f2)+TEMPLATE_ID+'\x22.');return{'version':_0x27a467,'name':_0x3cdc4a,'sha256':_0x531647,'size':_0x22c31b};}function a164_0x241c(_0x3bb78f,_0x59573a){_0x3bb78f=_0x3bb78f-0x1de;const _0x4d1af7=a164_0x4d1a();let _0x241c67=_0x4d1af7[_0x3bb78f];return _0x241c67;}async function fetchWithTimeout(_0x3dcde9,_0x2607f3,_0x12f3e3,_0x4e93a7){const _0x25e273=a164_0x241c,_0x12cfa6=new AbortController(),_0x472ece=setTimeout(()=>_0x12cfa6['abort'](),_0x2607f3);try{const _0x2dad81=await fetch(_0x3dcde9,{'headers':{'Accept':_0x12f3e3},'signal':_0x12cfa6[_0x25e273(0x222)]});return await _0x4e93a7(_0x2dad81);}finally{clearTimeout(_0x472ece);}}async function fetchTemplateDescriptor(){const _0x1b0178=a164_0x241c,_0x1322de=await getRabetbaseCdnConfig();if(!_0x1322de)throw new Error(_0x1b0178(0x215));return parseDescriptor(_0x1322de[_0x1b0178(0x213)]);}function resolveArchiveUrl(_0x4f2cd0){const _0xb7ff7b=a164_0x241c,_0x43a4b1=new URL(PROJECT_TEMPLATE_ASSET_BASE_URL+'/'),_0x5bf4f4=new URL(_0x4f2cd0,_0x43a4b1);if(_0x5bf4f4['protocol']!==_0xb7ff7b(0x21b)||_0x5bf4f4[_0xb7ff7b(0x210)]!==_0x43a4b1[_0xb7ff7b(0x210)]||!_0x5bf4f4[_0xb7ff7b(0x23d)][_0xb7ff7b(0x235)](_0x43a4b1[_0xb7ff7b(0x23d)]))throw new Error(_0xb7ff7b(0x218));return _0x5bf4f4['href'];}async function readResponseBytes(_0xe7378c,_0x2d55cd){const _0x24dd09=a164_0x241c;if(!_0xe7378c[_0x24dd09(0x1ec)]){const _0x2697a9=Buffer[_0x24dd09(0x23c)](await _0xe7378c[_0x24dd09(0x228)]());if(_0x2697a9['length']>_0x2d55cd)throw new Error(_0x24dd09(0x211));return _0x2697a9;}const _0x448950=_0xe7378c[_0x24dd09(0x1ec)]['getReader'](),_0x350454=[];let _0xf9c70d=0x0;try{while(!![]){const {done:_0x1f71a6,value:_0x5d2b8c}=await _0x448950[_0x24dd09(0x20b)]();if(_0x1f71a6)break;_0xf9c70d+=_0x5d2b8c['byteLength'];if(_0xf9c70d>_0x2d55cd){await _0x448950[_0x24dd09(0x24b)]();throw new Error('CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.');}_0x350454['push'](Buffer[_0x24dd09(0x23c)](_0x5d2b8c));}}finally{_0x448950[_0x24dd09(0x20f)]();}return Buffer[_0x24dd09(0x231)](_0x350454,_0xf9c70d);}async function downloadArchive(_0x2d9569,_0x5c32dd,_0x15ada8){const _0x2fcfff=a164_0x241c,_0x1ed309=await fetchWithTimeout(resolveArchiveUrl(_0x2d9569['name']),ARCHIVE_TIMEOUT_MS,_0x2fcfff(0x230),async _0x2e7b3a=>{const _0x326a9f=_0x2fcfff;if(!_0x2e7b3a['ok'])throw new Error('CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20'+_0x2e7b3a[_0x326a9f(0x20e)]+'.');const _0x36cca3=Number(_0x2e7b3a[_0x326a9f(0x22c)][_0x326a9f(0x1f6)](_0x326a9f(0x1e8)));if(Number[_0x326a9f(0x234)](_0x36cca3)&&_0x36cca3>MAX_ARCHIVE_SIZE)throw new Error(_0x326a9f(0x1e0));return readResponseBytes(_0x2e7b3a,_0x2d9569[_0x326a9f(0x200)]);});if(_0x1ed309[_0x2fcfff(0x241)]!==_0x2d9569[_0x2fcfff(0x200)])throw new Error(_0x2fcfff(0x1fb)+_0x2d9569[_0x2fcfff(0x200)]+',\x20received\x20'+_0x1ed309[_0x2fcfff(0x241)]+'.');_0x15ada8?.(_0x2fcfff(0x227));const _0x138618=_0x2fcfff(0x1e4)+createHash('sha256')[_0x2fcfff(0x233)](_0x1ed309)[_0x2fcfff(0x24c)](_0x2fcfff(0x246));if(_0x138618!==_0x2d9569[_0x2fcfff(0x22d)])throw new Error(_0x2fcfff(0x229));await a164_0x128427[_0x2fcfff(0x205)](_0x5c32dd,_0x1ed309,{'flag':'wx'});}async function assertTemplateRoot(_0x2a0d37){const _0x41b64d=a164_0x241c,_0xcb1c8a=a164_0x352abb[_0x41b64d(0x23a)](_0x2a0d37,_0x41b64d(0x23e)),_0x524ad1=JSON['parse'](await a164_0x128427['readFile'](_0xcb1c8a,_0x41b64d(0x203)));if(!_0x524ad1||typeof _0x524ad1!==_0x41b64d(0x207))throw new Error(_0x41b64d(0x221));}const LOCAL_FORBIDDEN_NAMES=new Set([a164_0x18a392(0x1ff),a164_0x18a392(0x1f9),a164_0x18a392(0x21d),'.idea','.lovrabet.json','.lovrabet.log','.rabetbase',a164_0x18a392(0x1fc),a164_0x18a392(0x23b),a164_0x18a392(0x20c)]);function isForbiddenTemplateEntry(_0x187a13){const _0x45057b=a164_0x18a392;if(LOCAL_FORBIDDEN_NAMES[_0x45057b(0x21e)](_0x187a13))return!![];return _0x187a13==='.env'||_0x187a13[_0x45057b(0x235)](_0x45057b(0x1e3))&&_0x187a13!==_0x45057b(0x1fa);}function containsPath(_0x3c17a9,_0x249ebe){const _0x44f5b1=a164_0x18a392,_0xfc2716=a164_0x352abb[_0x44f5b1(0x247)](_0x3c17a9,_0x249ebe);return _0xfc2716===''||!_0xfc2716[_0x44f5b1(0x235)]('..'+a164_0x352abb['sep'])&&_0xfc2716!=='..'&&!a164_0x352abb['isAbsolute'](_0xfc2716);}async function copyLocalTemplateDirectory(_0x765acf,_0x22dfbb){const _0x51aed0=a164_0x18a392;await a164_0x128427[_0x51aed0(0x22e)](_0x22dfbb,{'recursive':!![]});for(const _0x424662 of await a164_0x128427[_0x51aed0(0x224)](_0x765acf,{'withFileTypes':!![]})){const _0x853758=a164_0x352abb[_0x51aed0(0x23a)](_0x765acf,_0x424662[_0x51aed0(0x22f)]),_0x3d57eb=a164_0x352abb[_0x51aed0(0x23a)](_0x22dfbb,_0x424662[_0x51aed0(0x22f)]);if(isForbiddenTemplateEntry(_0x424662[_0x51aed0(0x22f)]))throw new Error(_0x51aed0(0x21a)+_0x853758);const _0x19872d=await a164_0x128427[_0x51aed0(0x242)](_0x853758);if(_0x19872d[_0x51aed0(0x244)]())throw new Error(_0x51aed0(0x1ed)+_0x853758);if(_0x19872d[_0x51aed0(0x208)]()){await copyLocalTemplateDirectory(_0x853758,_0x3d57eb);continue;}if(!_0x19872d[_0x51aed0(0x249)]())continue;await a164_0x128427[_0x51aed0(0x1f4)](_0x853758,_0x3d57eb),await a164_0x128427[_0x51aed0(0x21c)](_0x3d57eb,_0x19872d[_0x51aed0(0x1e7)]&0x1ff);}}async function readTemplateVersion(_0x81d3a5){const _0xc09eed=a164_0x18a392,_0x4bdf11=JSON[_0xc09eed(0x1f3)](await a164_0x128427['readFile'](a164_0x352abb[_0xc09eed(0x23a)](_0x81d3a5,_0xc09eed(0x23e)),_0xc09eed(0x203)));return nonEmptyString(_0x4bdf11[_0xc09eed(0x20a)])||'local';}function a164_0x4d1a(){const _0x197a86=['hex','relative','54PygDPX','isFile','1293344Lhawpl','cancel','digest','resolve','number','Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.','Project\x20directory\x20already\x20exists:\x20','validation','.env.','sha256:','Check\x20the\x20source\x20directory\x20and\x20retry.','copying','mode','content-length','Pass\x20a\x20directory\x20containing\x20the\x20template\x20source\x20package.json.','basename','cdn','body','Local\x20project\x20template\x20must\x20not\x20contain\x20symlinks:\x20','ENOENT','Invalid\x20local\x20template\x20source:\x20','10eKmIxu','ino','CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22','parse','copyFile','posix','get','1918IkwWXM','93IioQuU','.codegraph','.env.example','CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20','.rabetbase.json','mkdtemp','.rabetbase-create-','.DS_Store','size','code','template.zip','utf8','trim','writeFile','string','object','isDirectory','rename','version','read','node_modules','5663644KZykYG','status','releaseLock','origin','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','message','projectTemplate','local','Rabetbase\x20CDN\x20config\x20is\x20unavailable.','extracting','dirname','CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.','4350702IXELTI','Local\x20project\x20template\x20contains\x20a\x20local-only\x20entry:\x20','https:','chmod','.git','has','project','Use\x20a\x20different\x20project\x20name.','Project\x20template\x20package.json\x20is\x20invalid.','signal','Choose\x20an\x20output\x20directory\x20outside\x20the\x20template\x20source.','readdir','Local\x20template\x20source\x20does\x20not\x20exist:\x20','Check\x20your\x20network\x20and\x20retry.\x20Details:\x20','verifying','arrayBuffer','CDN\x20project\x20template\x20checksum\x20verification\x20failed.','150qEpSWU','4875332faxCuo','headers','sha256','mkdir','name','application/zip','concat','access','update','isFinite','startsWith','realpath','2179397TIBeqR','includes','downloading','join','dist','from','pathname','package.json','EEXIST','dev','length','lstat','toLowerCase','isSymbolicLink','1134895kihAXK'];a164_0x4d1a=function(){return _0x197a86;};return a164_0x4d1a();}async function readDirectoryIdentity(_0x1b3a9d){const _0x9869ee=a164_0x18a392;try{const _0x3617d6=await a164_0x128427['lstat'](_0x1b3a9d);if(!_0x3617d6[_0x9869ee(0x208)]())return null;return{'dev':_0x3617d6[_0x9869ee(0x240)],'ino':_0x3617d6['ino']};}catch{return null;}}async function commitStagedProject(_0x45208f,_0x45f715){const _0x13350f=a164_0x18a392;await a164_0x128427[_0x13350f(0x22e)](_0x45f715);const _0x5d10c7=await readDirectoryIdentity(_0x45f715);if(!_0x5d10c7)throw new Error('Unable\x20to\x20claim\x20the\x20project\x20directory.');try{for(const _0x208242 of await a164_0x128427[_0x13350f(0x224)](_0x45208f)){await a164_0x128427[_0x13350f(0x209)](a164_0x352abb['join'](_0x45208f,_0x208242),a164_0x352abb['join'](_0x45f715,_0x208242));}}catch(_0x206cd3){const _0x840a4e=await readDirectoryIdentity(_0x45f715);_0x840a4e?.[_0x13350f(0x240)]===_0x5d10c7[_0x13350f(0x240)]&&_0x840a4e[_0x13350f(0x1f1)]===_0x5d10c7[_0x13350f(0x1f1)]&&await a164_0x128427['rm'](_0x45f715,{'recursive':!![],'force':!![]});throw _0x206cd3;}}export async function materializeProjectTemplate(_0x5679ae,_0x481a42){const _0x378ac0=a164_0x18a392,_0x32a750=a164_0x352abb['resolve'](_0x5679ae),_0xcd99b9=a164_0x352abb[_0x378ac0(0x217)](_0x32a750);try{await a164_0x128427[_0x378ac0(0x242)](_0x32a750);throw new Error(_0x378ac0(0x1e1)+_0x32a750);}catch(_0x318221){if(_0x318221[_0x378ac0(0x201)]!==_0x378ac0(0x1ee))throw _0x318221;}const _0x2827f9=await a164_0x128427[_0x378ac0(0x1fd)](a164_0x352abb['join'](_0xcd99b9,_0x378ac0(0x1fe))),_0x45f5e3=a164_0x352abb[_0x378ac0(0x23a)](_0x2827f9,_0x378ac0(0x21f)),_0xcb43df=a164_0x352abb[_0x378ac0(0x23a)](_0x2827f9,_0x378ac0(0x202));try{try{_0x481a42?.('resolving');const _0x53f7c7=await fetchTemplateDescriptor();return _0x481a42?.(_0x378ac0(0x239)),await downloadArchive(_0x53f7c7,_0xcb43df,_0x481a42),_0x481a42?.(_0x378ac0(0x216)),await extractProjectTemplateArchive(_0xcb43df,_0x45f5e3),await assertTemplateRoot(_0x45f5e3),await commitStagedProject(_0x45f5e3,_0x32a750),{'source':_0x378ac0(0x1eb),'version':_0x53f7c7['version']};}catch(_0x2ffee3){if(_0x2ffee3['code']===_0x378ac0(0x23f))throw CliErrors[_0x378ac0(0x1e2)](_0x378ac0(0x1e1)+_0x32a750,_0x378ac0(0x220));const _0x1290b9=_0x2ffee3 instanceof Error?_0x2ffee3[_0x378ac0(0x212)]:String(_0x2ffee3);throw CliErrors[_0x378ac0(0x1e2)](_0x378ac0(0x1df),_0x378ac0(0x226)+_0x1290b9);}}finally{await a164_0x128427['rm'](_0x2827f9,{'recursive':!![],'force':!![]});}}export async function materializeLocalProjectTemplate(_0x160961,_0x50e0c2,_0x55eb3e){const _0x40abc8=a164_0x18a392;let _0x440ebd;try{_0x440ebd=await a164_0x128427[_0x40abc8(0x236)](a164_0x352abb['resolve'](_0x160961));}catch{throw CliErrors[_0x40abc8(0x1e2)](_0x40abc8(0x225)+a164_0x352abb['resolve'](_0x160961),_0x40abc8(0x1e9));}const _0x59946f=await a164_0x128427[_0x40abc8(0x242)](_0x440ebd);if(!_0x59946f[_0x40abc8(0x208)]())throw CliErrors['validation']('Local\x20template\x20source\x20is\x20not\x20a\x20directory:\x20'+_0x440ebd);const _0x1ae9b7=a164_0x352abb[_0x40abc8(0x24d)](_0x50e0c2),_0x241f60=await a164_0x128427[_0x40abc8(0x236)](a164_0x352abb[_0x40abc8(0x217)](_0x1ae9b7)),_0x17bded=a164_0x352abb[_0x40abc8(0x23a)](_0x241f60,a164_0x352abb[_0x40abc8(0x1ea)](_0x1ae9b7));if(containsPath(_0x440ebd,_0x17bded)||containsPath(_0x17bded,_0x440ebd))throw CliErrors[_0x40abc8(0x1e2)]('Local\x20template\x20source\x20and\x20project\x20output\x20must\x20not\x20overlap.',_0x40abc8(0x223));try{await a164_0x128427[_0x40abc8(0x242)](_0x17bded);throw CliErrors[_0x40abc8(0x1e2)]('Project\x20directory\x20already\x20exists:\x20'+_0x17bded,'Choose\x20a\x20different\x20project\x20name\x20or\x20remove\x20the\x20directory\x20first.');}catch(_0x273a84){if(_0x273a84[_0x40abc8(0x201)]!==_0x40abc8(0x1ee))throw _0x273a84;}const _0x11a53e=a164_0x352abb[_0x40abc8(0x217)](_0x17bded);await a164_0x128427[_0x40abc8(0x232)](_0x11a53e);const _0x54d1e7=await a164_0x128427[_0x40abc8(0x1fd)](a164_0x352abb[_0x40abc8(0x23a)](_0x11a53e,_0x40abc8(0x1fe))),_0xa6c9bf=a164_0x352abb[_0x40abc8(0x23a)](_0x54d1e7,_0x40abc8(0x21f));try{_0x55eb3e?.(_0x40abc8(0x1e6)),await copyLocalTemplateDirectory(_0x440ebd,_0xa6c9bf),await assertTemplateRoot(_0xa6c9bf);const _0x5f0af0=await readTemplateVersion(_0xa6c9bf);return await commitStagedProject(_0xa6c9bf,_0x17bded),{'source':_0x40abc8(0x214),'version':_0x5f0af0};}catch(_0x241cfe){const _0x20ec01=_0x241cfe instanceof Error?_0x241cfe['message']:String(_0x241cfe);throw CliErrors[_0x40abc8(0x1e2)](_0x40abc8(0x1ef)+_0x20ec01,_0x40abc8(0x1e5));}finally{await a164_0x128427['rm'](_0x54d1e7,{'recursive':!![],'force':!![]});}}
1
+ function a164_0x2d61(){const _0x4c9af8=['basename','Choose\x20a\x20different\x20project\x20name\x20or\x20remove\x20the\x20directory\x20first.','.lovrabet.log','.idea','verifying','extracting','projectTemplate','protocol','href','Local\x20project\x20template\x20contains\x20a\x20local-only\x20entry:\x20','get','readdir','.env','has','Unable\x20to\x20claim\x20the\x20project\x20directory.','119swWhnL','from','CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20','isAbsolute','Project\x20template\x20package.json\x20is\x20invalid.','Project\x20directory\x20already\x20exists:\x20','origin','digest','661111NISpyM','code','abort','40QVImaS','Local\x20project\x20template\x20must\x20not\x20contain\x20symlinks:\x20','sha256:','arrayBuffer','length','body','size','Invalid\x20local\x20template\x20source:\x20','.rabetbase.json','cancel','push','Local\x20template\x20source\x20and\x20project\x20output\x20must\x20not\x20overlap.','posix','rename','releaseLock','join','downloading','6174944cERpFC','mkdir','copyFile','isSymbolicLink','hex','read',',\x20received\x20','status','CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.','startsWith','package.json','resolving','.git','template.zip','object','ENOENT','.rabetbase','Use\x20a\x20different\x20project\x20name.','signal','CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20','byteLength','version','ino','21PygsxN','Check\x20the\x20source\x20directory\x20and\x20retry.','Rabetbase\x20CDN\x20config\x20is\x20unavailable.','access','CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22','Choose\x20an\x20output\x20directory\x20outside\x20the\x20template\x20source.','name','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','isFinite','validation','Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','.env.','dev','project','string','7108812kKDcHp','isFile','realpath','70JDkICL','parse','resolve','.env.example','1523976ljtaOg','.rabetbase-create-','CDN\x20config\x20does\x20not\x20define\x20template\x20\x22','904134vcLqjq','426535vDkvPM','.DS_Store','getReader','sub-app-react-demo','isSafeInteger','node_modules','readFile','utf8','9498DeOdPI','mkdtemp','Pass\x20a\x20directory\x20containing\x20the\x20template\x20source\x20package.json.','EEXIST','test','isDirectory','pathname','lstat','includes','dirname','sha256','message'];a164_0x2d61=function(){return _0x4c9af8;};return a164_0x2d61();}const a164_0x386f37=a164_0x5797;(function(_0x1bc16a,_0x3b47ed){const _0x51ceea=a164_0x5797,_0x5c05e7=_0x1bc16a();while(!![]){try{const _0x19243b=-parseInt(_0x51ceea(0x12a))/0x1*(-parseInt(_0x51ceea(0x17f))/0x2)+parseInt(_0x51ceea(0x176))/0x3+-parseInt(_0x51ceea(0x135))/0x4*(-parseInt(_0x51ceea(0x177))/0x5)+-parseInt(_0x51ceea(0x173))/0x6*(parseInt(_0x51ceea(0x15d))/0x7)+parseInt(_0x51ceea(0x146))/0x8+-parseInt(_0x51ceea(0x16c))/0x9+parseInt(_0x51ceea(0x16f))/0xa*(-parseInt(_0x51ceea(0x132))/0xb);if(_0x19243b===_0x3b47ed)break;else _0x5c05e7['push'](_0x5c05e7['shift']());}catch(_0x57fe21){_0x5c05e7['push'](_0x5c05e7['shift']());}}}(a164_0x2d61,0x7eae4));import{createHash}from'node:crypto';import a164_0x5d6e50 from'node:fs/promises';function a164_0x5797(_0xeacb73,_0x101667){_0xeacb73=_0xeacb73-0x124;const _0x2d613a=a164_0x2d61();let _0x5797ec=_0x2d613a[_0xeacb73];return _0x5797ec;}import a164_0x12594f 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=a164_0x386f37(0x17a),ARCHIVE_TIMEOUT_MS=0x3a98,MAX_ARCHIVE_SIZE=0x14*0x400*0x400;function nonEmptyString(_0x564e73){const _0xcd30de=a164_0x386f37;return typeof _0x564e73===_0xcd30de(0x16b)&&_0x564e73['trim']()?_0x564e73['trim']():null;}function parseDescriptor(_0x46eafa){const _0x5aa804=a164_0x386f37;if(!_0x46eafa||typeof _0x46eafa!==_0x5aa804(0x154))throw new Error(_0x5aa804(0x175)+TEMPLATE_ID+'\x22.');const _0x32896a=_0x46eafa,_0x28e3db=nonEmptyString(_0x32896a[_0x5aa804(0x15b)]),_0x5420e7=nonEmptyString(_0x32896a['name']),_0x445f77=nonEmptyString(_0x32896a[_0x5aa804(0x189)])?.['toLowerCase'](),_0x420be8=_0x32896a[_0x5aa804(0x13b)];if(!_0x28e3db||!_0x5420e7||_0x5420e7!==a164_0x12594f[_0x5aa804(0x141)][_0x5aa804(0x18b)](_0x5420e7)||_0x5420e7[_0x5aa804(0x187)]('\x5c')||!_0x445f77||!/^sha256:[a-f0-9]{64}$/[_0x5aa804(0x183)](_0x445f77)||typeof _0x420be8!=='number'||!Number[_0x5aa804(0x17b)](_0x420be8)||_0x420be8<=0x0||_0x420be8>MAX_ARCHIVE_SIZE)throw new Error(_0x5aa804(0x161)+TEMPLATE_ID+'\x22.');return{'version':_0x28e3db,'name':_0x5420e7,'sha256':_0x445f77,'size':_0x420be8};}async function fetchWithTimeout(_0x8fc2d7,_0x32f356,_0x1a1aba,_0x508251){const _0x1e8931=a164_0x386f37,_0x40b293=new AbortController(),_0x33a76c=setTimeout(()=>_0x40b293[_0x1e8931(0x134)](),_0x32f356);try{const _0x51263a=await fetch(_0x8fc2d7,{'headers':{'Accept':_0x1a1aba},'signal':_0x40b293[_0x1e8931(0x158)]});return await _0x508251(_0x51263a);}finally{clearTimeout(_0x33a76c);}}async function fetchTemplateDescriptor(){const _0x47e94f=a164_0x386f37,_0xcca244=await getRabetbaseCdnConfig();if(!_0xcca244)throw new Error(_0x47e94f(0x15f));return parseDescriptor(_0xcca244[_0x47e94f(0x191)]);}function resolveArchiveUrl(_0x3e7fd4){const _0x2ee9b5=a164_0x386f37,_0x2fde2a=new URL(PROJECT_TEMPLATE_ASSET_BASE_URL+'/'),_0xa9eb39=new URL(_0x3e7fd4,_0x2fde2a);if(_0xa9eb39[_0x2ee9b5(0x192)]!=='https:'||_0xa9eb39[_0x2ee9b5(0x130)]!==_0x2fde2a[_0x2ee9b5(0x130)]||!_0xa9eb39[_0x2ee9b5(0x185)][_0x2ee9b5(0x14f)](_0x2fde2a[_0x2ee9b5(0x185)]))throw new Error('CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.');return _0xa9eb39[_0x2ee9b5(0x193)];}async function readResponseBytes(_0x3d972b,_0x4318ce){const _0x31e4ef=a164_0x386f37;if(!_0x3d972b[_0x31e4ef(0x13a)]){const _0x1dfe94=Buffer[_0x31e4ef(0x12b)](await _0x3d972b[_0x31e4ef(0x138)]());if(_0x1dfe94[_0x31e4ef(0x139)]>_0x4318ce)throw new Error(_0x31e4ef(0x164));return _0x1dfe94;}const _0x419e91=_0x3d972b[_0x31e4ef(0x13a)][_0x31e4ef(0x179)](),_0x4f60c4=[];let _0x4a98f6=0x0;try{while(!![]){const {done:_0x323bd9,value:_0xfc715d}=await _0x419e91[_0x31e4ef(0x14b)]();if(_0x323bd9)break;_0x4a98f6+=_0xfc715d[_0x31e4ef(0x15a)];if(_0x4a98f6>_0x4318ce){await _0x419e91[_0x31e4ef(0x13e)]();throw new Error('CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.');}_0x4f60c4[_0x31e4ef(0x13f)](Buffer[_0x31e4ef(0x12b)](_0xfc715d));}}finally{_0x419e91[_0x31e4ef(0x143)]();}return Buffer['concat'](_0x4f60c4,_0x4a98f6);}async function downloadArchive(_0x364bcd,_0x24bb53,_0x4f01b4){const _0xf397f2=a164_0x386f37,_0x4d1b2e=await fetchWithTimeout(resolveArchiveUrl(_0x364bcd[_0xf397f2(0x163)]),ARCHIVE_TIMEOUT_MS,'application/zip',async _0x1d8cea=>{const _0x352c50=_0xf397f2;if(!_0x1d8cea['ok'])throw new Error(_0x352c50(0x12c)+_0x1d8cea[_0x352c50(0x14d)]+'.');const _0x5226b2=Number(_0x1d8cea['headers'][_0x352c50(0x125)]('content-length'));if(Number[_0x352c50(0x165)](_0x5226b2)&&_0x5226b2>MAX_ARCHIVE_SIZE)throw new Error(_0x352c50(0x14e));return readResponseBytes(_0x1d8cea,_0x364bcd[_0x352c50(0x13b)]);});if(_0x4d1b2e['length']!==_0x364bcd[_0xf397f2(0x13b)])throw new Error(_0xf397f2(0x159)+_0x364bcd['size']+_0xf397f2(0x14c)+_0x4d1b2e['length']+'.');_0x4f01b4?.(_0xf397f2(0x18f));const _0x5049b9=_0xf397f2(0x137)+createHash(_0xf397f2(0x189))['update'](_0x4d1b2e)[_0xf397f2(0x131)](_0xf397f2(0x14a));if(_0x5049b9!==_0x364bcd[_0xf397f2(0x189)])throw new Error('CDN\x20project\x20template\x20checksum\x20verification\x20failed.');await a164_0x5d6e50['writeFile'](_0x24bb53,_0x4d1b2e,{'flag':'wx'});}async function assertTemplateRoot(_0x2dd7ff){const _0x52e3bf=a164_0x386f37,_0x177d8e=a164_0x12594f[_0x52e3bf(0x144)](_0x2dd7ff,_0x52e3bf(0x150)),_0x5ba8ba=JSON[_0x52e3bf(0x170)](await a164_0x5d6e50[_0x52e3bf(0x17d)](_0x177d8e,_0x52e3bf(0x17e)));if(!_0x5ba8ba||typeof _0x5ba8ba!==_0x52e3bf(0x154))throw new Error(_0x52e3bf(0x12e));}const LOCAL_FORBIDDEN_NAMES=new Set([a164_0x386f37(0x178),'.codegraph',a164_0x386f37(0x152),a164_0x386f37(0x18e),'.lovrabet.json',a164_0x386f37(0x18d),a164_0x386f37(0x156),a164_0x386f37(0x13d),'dist',a164_0x386f37(0x17c)]);function isForbiddenTemplateEntry(_0x3b27bb){const _0x59208d=a164_0x386f37;if(LOCAL_FORBIDDEN_NAMES[_0x59208d(0x128)](_0x3b27bb))return!![];return _0x3b27bb===_0x59208d(0x127)||_0x3b27bb['startsWith'](_0x59208d(0x168))&&_0x3b27bb!==_0x59208d(0x172);}function containsPath(_0x37807d,_0x40826b){const _0x31f0df=a164_0x386f37,_0x585a98=a164_0x12594f['relative'](_0x37807d,_0x40826b);return _0x585a98===''||!_0x585a98[_0x31f0df(0x14f)]('..'+a164_0x12594f['sep'])&&_0x585a98!=='..'&&!a164_0x12594f[_0x31f0df(0x12d)](_0x585a98);}async function copyLocalTemplateDirectory(_0x43553a,_0x53fbee){const _0x240087=a164_0x386f37;await a164_0x5d6e50[_0x240087(0x147)](_0x53fbee,{'recursive':!![]});for(const _0x276cf1 of await a164_0x5d6e50[_0x240087(0x126)](_0x43553a,{'withFileTypes':!![]})){const _0x1ad856=a164_0x12594f[_0x240087(0x144)](_0x43553a,_0x276cf1[_0x240087(0x163)]),_0xb37d85=a164_0x12594f[_0x240087(0x144)](_0x53fbee,_0x276cf1[_0x240087(0x163)]);if(isForbiddenTemplateEntry(_0x276cf1[_0x240087(0x163)]))throw new Error(_0x240087(0x124)+_0x1ad856);const _0x4429fa=await a164_0x5d6e50[_0x240087(0x186)](_0x1ad856);if(_0x4429fa[_0x240087(0x149)]())throw new Error(_0x240087(0x136)+_0x1ad856);if(_0x4429fa['isDirectory']()){await copyLocalTemplateDirectory(_0x1ad856,_0xb37d85);continue;}if(!_0x4429fa[_0x240087(0x16d)]())continue;await a164_0x5d6e50[_0x240087(0x148)](_0x1ad856,_0xb37d85),await a164_0x5d6e50['chmod'](_0xb37d85,_0x4429fa['mode']&0x1ff);}}async function readTemplateVersion(_0x2a8d16){const _0x1c3d22=a164_0x386f37,_0x4cf6ad=JSON[_0x1c3d22(0x170)](await a164_0x5d6e50[_0x1c3d22(0x17d)](a164_0x12594f[_0x1c3d22(0x144)](_0x2a8d16,_0x1c3d22(0x150)),_0x1c3d22(0x17e)));return nonEmptyString(_0x4cf6ad['version'])||'local';}async function readDirectoryIdentity(_0x3f9937){const _0x19d3d5=a164_0x386f37;try{const _0xf73446=await a164_0x5d6e50[_0x19d3d5(0x186)](_0x3f9937);if(!_0xf73446[_0x19d3d5(0x184)]())return null;return{'dev':_0xf73446[_0x19d3d5(0x169)],'ino':_0xf73446[_0x19d3d5(0x15c)]};}catch{return null;}}async function commitStagedProject(_0xa7b44f,_0x417951){const _0x26cc6e=a164_0x386f37;await a164_0x5d6e50['mkdir'](_0x417951);const _0x277a8e=await readDirectoryIdentity(_0x417951);if(!_0x277a8e)throw new Error(_0x26cc6e(0x129));try{for(const _0x42b1ca of await a164_0x5d6e50['readdir'](_0xa7b44f)){await a164_0x5d6e50[_0x26cc6e(0x142)](a164_0x12594f['join'](_0xa7b44f,_0x42b1ca),a164_0x12594f['join'](_0x417951,_0x42b1ca));}}catch(_0x4054b3){const _0x49c618=await readDirectoryIdentity(_0x417951);_0x49c618?.['dev']===_0x277a8e[_0x26cc6e(0x169)]&&_0x49c618['ino']===_0x277a8e[_0x26cc6e(0x15c)]&&await a164_0x5d6e50['rm'](_0x417951,{'recursive':!![],'force':!![]});throw _0x4054b3;}}export async function materializeProjectTemplate(_0x3aeed7,_0x52141d){const _0x2b6f14=a164_0x386f37,_0x1c0e1a=a164_0x12594f[_0x2b6f14(0x171)](_0x3aeed7),_0x2d6bb0=a164_0x12594f[_0x2b6f14(0x188)](_0x1c0e1a);try{await a164_0x5d6e50[_0x2b6f14(0x186)](_0x1c0e1a);throw new Error(_0x2b6f14(0x12f)+_0x1c0e1a);}catch(_0x25d1b3){if(_0x25d1b3['code']!==_0x2b6f14(0x155))throw _0x25d1b3;}const _0x314bd1=await a164_0x5d6e50[_0x2b6f14(0x180)](a164_0x12594f[_0x2b6f14(0x144)](_0x2d6bb0,_0x2b6f14(0x174))),_0x41344f=a164_0x12594f[_0x2b6f14(0x144)](_0x314bd1,_0x2b6f14(0x16a)),_0x409548=a164_0x12594f[_0x2b6f14(0x144)](_0x314bd1,_0x2b6f14(0x153));try{try{_0x52141d?.(_0x2b6f14(0x151));const _0x21829f=await fetchTemplateDescriptor();return _0x52141d?.(_0x2b6f14(0x145)),await downloadArchive(_0x21829f,_0x409548,_0x52141d),_0x52141d?.(_0x2b6f14(0x190)),await extractProjectTemplateArchive(_0x409548,_0x41344f),await assertTemplateRoot(_0x41344f),await commitStagedProject(_0x41344f,_0x1c0e1a),{'source':'cdn','version':_0x21829f[_0x2b6f14(0x15b)]};}catch(_0x405810){if(_0x405810[_0x2b6f14(0x133)]===_0x2b6f14(0x182))throw CliErrors['validation'](_0x2b6f14(0x12f)+_0x1c0e1a,_0x2b6f14(0x157));const _0x36a745=_0x405810 instanceof Error?_0x405810[_0x2b6f14(0x18a)]:String(_0x405810);throw CliErrors[_0x2b6f14(0x166)](_0x2b6f14(0x167),'Check\x20your\x20network\x20and\x20retry.\x20Details:\x20'+_0x36a745);}}finally{await a164_0x5d6e50['rm'](_0x314bd1,{'recursive':!![],'force':!![]});}}export async function materializeLocalProjectTemplate(_0x2a7f7b,_0x147f8d,_0x336caf){const _0x524e5c=a164_0x386f37;let _0x598b42;try{_0x598b42=await a164_0x5d6e50[_0x524e5c(0x16e)](a164_0x12594f['resolve'](_0x2a7f7b));}catch{throw CliErrors['validation']('Local\x20template\x20source\x20does\x20not\x20exist:\x20'+a164_0x12594f[_0x524e5c(0x171)](_0x2a7f7b),_0x524e5c(0x181));}const _0xb696f8=await a164_0x5d6e50[_0x524e5c(0x186)](_0x598b42);if(!_0xb696f8[_0x524e5c(0x184)]())throw CliErrors[_0x524e5c(0x166)]('Local\x20template\x20source\x20is\x20not\x20a\x20directory:\x20'+_0x598b42);const _0x5e01a3=a164_0x12594f[_0x524e5c(0x171)](_0x147f8d),_0x4eeea6=await a164_0x5d6e50[_0x524e5c(0x16e)](a164_0x12594f[_0x524e5c(0x188)](_0x5e01a3)),_0x1a78bb=a164_0x12594f[_0x524e5c(0x144)](_0x4eeea6,a164_0x12594f[_0x524e5c(0x18b)](_0x5e01a3));if(containsPath(_0x598b42,_0x1a78bb)||containsPath(_0x1a78bb,_0x598b42))throw CliErrors[_0x524e5c(0x166)](_0x524e5c(0x140),_0x524e5c(0x162));try{await a164_0x5d6e50[_0x524e5c(0x186)](_0x1a78bb);throw CliErrors[_0x524e5c(0x166)](_0x524e5c(0x12f)+_0x1a78bb,_0x524e5c(0x18c));}catch(_0x399553){if(_0x399553[_0x524e5c(0x133)]!==_0x524e5c(0x155))throw _0x399553;}const _0x58dcbb=a164_0x12594f['dirname'](_0x1a78bb);await a164_0x5d6e50[_0x524e5c(0x160)](_0x58dcbb);const _0x5e28a9=await a164_0x5d6e50[_0x524e5c(0x180)](a164_0x12594f[_0x524e5c(0x144)](_0x58dcbb,_0x524e5c(0x174))),_0x24e8d1=a164_0x12594f[_0x524e5c(0x144)](_0x5e28a9,_0x524e5c(0x16a));try{_0x336caf?.('copying'),await copyLocalTemplateDirectory(_0x598b42,_0x24e8d1),await assertTemplateRoot(_0x24e8d1);const _0x4a3e90=await readTemplateVersion(_0x24e8d1);return await commitStagedProject(_0x24e8d1,_0x1a78bb),{'source':'local','version':_0x4a3e90};}catch(_0x205006){const _0x31f0fc=_0x205006 instanceof Error?_0x205006[_0x524e5c(0x18a)]:String(_0x205006);throw CliErrors['validation'](_0x524e5c(0x13c)+_0x31f0fc,_0x524e5c(0x15e));}finally{await a164_0x5d6e50['rm'](_0x5e28a9,{'recursive':!![],'force':!![]});}}
@@ -1 +1 @@
1
- function a165_0x250d(_0x41496f,_0xeb7099){_0x41496f=_0x41496f-0xfe;const _0x36b951=a165_0x36b9();let _0x250ded=_0x36b951[_0x41496f];return _0x250ded;}function a165_0x36b9(){const _0x41c742=['14030920BFOVJE','32oRSDsj','Project\x20name\x20\x22','1638333pRqXtz','8219340QOaJys','15008Phwgqn','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','validation','371446kGlatF','Project\x20name\x20cannot\x20be\x20empty','test','132ZleaDR','12QIkwSH','253455WXmOuO','11limChC','length','trim','1596rqgZbn','\x22\x20is\x20reserved\x20on\x20Windows','1466557eTturF'];a165_0x36b9=function(){return _0x41c742;};return a165_0x36b9();}(function(_0x1d44cc,_0x2a4dd0){const _0xda07b3=a165_0x250d,_0x52a9e3=_0x1d44cc();while(!![]){try{const _0x2eb9d7=parseInt(_0xda07b3(0x105))/0x1+parseInt(_0xda07b3(0x10e))/0x2*(-parseInt(_0xda07b3(0xfe))/0x3)+-parseInt(_0xda07b3(0x111))/0x4*(parseInt(_0xda07b3(0xff))/0x5)+parseInt(_0xda07b3(0x103))/0x6*(parseInt(_0xda07b3(0x10b))/0x7)+parseInt(_0xda07b3(0x107))/0x8*(-parseInt(_0xda07b3(0x109))/0x9)+parseInt(_0xda07b3(0x106))/0xa+parseInt(_0xda07b3(0x100))/0xb*(parseInt(_0xda07b3(0x10a))/0xc);if(_0x2eb9d7===_0x2a4dd0)break;else _0x52a9e3['push'](_0x52a9e3['shift']());}catch(_0x1567a1){_0x52a9e3['push'](_0x52a9e3['shift']());}}}(a165_0x36b9,0xef83f));import{CliErrors}from'../../../errors.js';const PROJECT_NAME_PATTERN=/^[A-Za-z0-9][A-Za-z0-9_-]*$/,WINDOWS_RESERVED_NAME=/^(con|prn|aux|nul|com[1-9]|lpt[1-9])$/i,MAX_PROJECT_NAME_LENGTH=0x64;export function getProjectNameValidationError(_0x1b9e70){const _0xe6a8dc=a165_0x250d,_0x5a2b72=_0x1b9e70['trim']();if(!_0x5a2b72)return _0xe6a8dc(0x10f);if(_0x5a2b72[_0xe6a8dc(0x101)]>MAX_PROJECT_NAME_LENGTH)return'Project\x20name\x20cannot\x20exceed\x20'+MAX_PROJECT_NAME_LENGTH+'\x20characters';if(!PROJECT_NAME_PATTERN[_0xe6a8dc(0x110)](_0x5a2b72))return _0xe6a8dc(0x10c);if(WINDOWS_RESERVED_NAME['test'](_0x5a2b72))return _0xe6a8dc(0x108)+_0x5a2b72+_0xe6a8dc(0x104);return null;}export function validateProjectName(_0xfe8e77){const _0x26256a=a165_0x250d,_0x28368d=_0xfe8e77[_0x26256a(0x102)](),_0x4b607d=getProjectNameValidationError(_0x28368d);if(_0x4b607d)throw CliErrors[_0x26256a(0x10d)](_0x4b607d,'Use\x20a\x20portable\x20directory\x20name\x20without\x20path\x20separators.');return _0x28368d;}
1
+ function a165_0x2e71(){const _0x40d661=['1930984PcKtbw','Project\x20name\x20cannot\x20be\x20empty','1464iACBcx','232872IgjMbb','trim','test','2240zBqnSq','Use\x20a\x20portable\x20directory\x20name\x20without\x20path\x20separators.','length','29528bZbXCk','3536936HhMywY','129xPquoC','7WFfPkk','2514rmXgYZ','validation','378520ELOxvD','\x20characters','9jLCZSA','Project\x20name\x20\x22'];a165_0x2e71=function(){return _0x40d661;};return a165_0x2e71();}function a165_0x44bf(_0x390f25,_0x779344){_0x390f25=_0x390f25-0x1a7;const _0x2e71f9=a165_0x2e71();let _0x44bf7f=_0x2e71f9[_0x390f25];return _0x44bf7f;}(function(_0x2fd1e2,_0x192d0b){const _0x123223=a165_0x44bf,_0x30d7df=_0x2fd1e2();while(!![]){try{const _0x38b63b=parseInt(_0x123223(0x1b4))/0x1+parseInt(_0x123223(0x1b8))/0x2*(-parseInt(_0x123223(0x1b6))/0x3)+parseInt(_0x123223(0x1ae))/0x4+parseInt(_0x123223(0x1b1))/0x5*(-parseInt(_0x123223(0x1ad))/0x6)+parseInt(_0x123223(0x1b7))/0x7*(parseInt(_0x123223(0x1b5))/0x8)+-parseInt(_0x123223(0x1a9))/0x9*(-parseInt(_0x123223(0x1a7))/0xa)+-parseInt(_0x123223(0x1ab))/0xb;if(_0x38b63b===_0x192d0b)break;else _0x30d7df['push'](_0x30d7df['shift']());}catch(_0x2d11ea){_0x30d7df['push'](_0x30d7df['shift']());}}}(a165_0x2e71,0x37dc8));import{CliErrors}from'../../../errors.js';const PROJECT_NAME_PATTERN=/^[A-Za-z0-9][A-Za-z0-9_-]*$/,WINDOWS_RESERVED_NAME=/^(con|prn|aux|nul|com[1-9]|lpt[1-9])$/i,MAX_PROJECT_NAME_LENGTH=0x64;export function getProjectNameValidationError(_0x5673ca){const _0x3c4a39=a165_0x44bf,_0x379529=_0x5673ca[_0x3c4a39(0x1af)]();if(!_0x379529)return _0x3c4a39(0x1ac);if(_0x379529[_0x3c4a39(0x1b3)]>MAX_PROJECT_NAME_LENGTH)return'Project\x20name\x20cannot\x20exceed\x20'+MAX_PROJECT_NAME_LENGTH+_0x3c4a39(0x1a8);if(!PROJECT_NAME_PATTERN['test'](_0x379529))return'Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_';if(WINDOWS_RESERVED_NAME[_0x3c4a39(0x1b0)](_0x379529))return _0x3c4a39(0x1aa)+_0x379529+'\x22\x20is\x20reserved\x20on\x20Windows';return null;}export function validateProjectName(_0x841127){const _0x55595b=a165_0x44bf,_0x11b6e1=_0x841127[_0x55595b(0x1af)](),_0x1aaa96=getProjectNameValidationError(_0x11b6e1);if(_0x1aaa96)throw CliErrors[_0x55595b(0x1b9)](_0x1aaa96,_0x55595b(0x1b2));return _0x11b6e1;}
@@ -1 +1 @@
1
- (function(_0x5b53b3,_0x3f67a7){const _0x343787=a166_0x51b8,_0x56f10b=_0x5b53b3();while(!![]){try{const _0x3290c8=-parseInt(_0x343787(0x131))/0x1*(-parseInt(_0x343787(0x138))/0x2)+parseInt(_0x343787(0x12e))/0x3+parseInt(_0x343787(0x143))/0x4*(parseInt(_0x343787(0x13a))/0x5)+parseInt(_0x343787(0x11d))/0x6*(parseInt(_0x343787(0x127))/0x7)+parseInt(_0x343787(0x142))/0x8+parseInt(_0x343787(0x136))/0x9*(-parseInt(_0x343787(0x12f))/0xa)+-parseInt(_0x343787(0x11b))/0xb*(parseInt(_0x343787(0x121))/0xc);if(_0x3290c8===_0x3f67a7)break;else _0x56f10b['push'](_0x56f10b['shift']());}catch(_0x19fca9){_0x56f10b['push'](_0x56f10b['shift']());}}}(a166_0x552f,0x83547));import{createWriteStream}from'node:fs';import a166_0x1aae41 from'node:fs/promises';import a166_0x30257d from'node:path';import{pipeline}from'node:stream/promises';import a166_0x32f210 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(_0x1b58d0){return new Promise((_0x146da4,_0x57b12c)=>{const _0x16dcd4=a166_0x51b8;a166_0x32f210[_0x16dcd4(0x132)](_0x1b58d0,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x43b464,_0xcdbb72)=>{const _0x326e98=_0x16dcd4;if(_0x43b464||!_0xcdbb72){_0x57b12c(_0x43b464||new Error(_0x326e98(0x135)));return;}_0x146da4(_0xcdbb72);});});}function openEntryStream(_0x4de6ad,_0x4e7ec8){return new Promise((_0x2d45c5,_0x4139de)=>{const _0x4cff6d=a166_0x51b8;_0x4de6ad[_0x4cff6d(0x140)](_0x4e7ec8,(_0x5adb41,_0x3efab2)=>{const _0x574f80=_0x4cff6d;if(_0x5adb41||!_0x3efab2){_0x4139de(_0x5adb41||new Error(_0x574f80(0x119)+_0x4e7ec8[_0x574f80(0x11a)]));return;}_0x2d45c5(_0x3efab2);});});}function a166_0x552f(){const _0x4a1ad5=['32724444AGvHKx','toLocaleLowerCase','close','Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20','isEncrypted','test','20615CVQIIH','end','slice','has','catch','uncompressedSize','Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20','165423EdEZUi','3017990iniXey','once','3887fSHPVQ','open','join','readEntry','Unable\x20to\x20open\x20project\x20template\x20archive.','9NHeJwz','\x20entries.','482AThhAh','replace','195eyuEno','ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20','mkdir','get','resolve','dirname','openReadStream','sep','7350608yfVhNa','92524JVmSma','Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20','set','split','externalFileAttributes','Project\x20template\x20ZIP\x20exceeds\x20','Unable\x20to\x20read\x20ZIP\x20entry:\x20','fileName','11vIrObZ','Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20','1536WeQfDM','Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20','en-US','endsWith'];a166_0x552f=function(){return _0x4a1ad5;};return a166_0x552f();}function a166_0x51b8(_0x3abeee,_0x3af926){_0x3abeee=_0x3abeee-0x117;const _0x552fc9=a166_0x552f();let _0x51b8ce=_0x552fc9[_0x3abeee];return _0x51b8ce;}function validateEntryPath(_0x1225ca){const _0x25627e=a166_0x51b8,_0x5b741c=_0x1225ca[_0x25627e(0x139)](/\\/g,'/'),_0x3c1873=_0x5b741c[_0x25627e(0x120)]('/'),_0x55e35a=_0x3c1873?_0x5b741c[_0x25627e(0x129)](0x0,-0x1):_0x5b741c;if(!_0x55e35a||_0x5b741c['startsWith']('/')||/^[A-Za-z]:\//[_0x25627e(0x126)](_0x5b741c))throw new Error(_0x25627e(0x11e)+_0x1225ca);const _0x3d340c=_0x55e35a['split']('/');for(const _0x4edfaa of _0x3d340c){if(!_0x4edfaa||_0x4edfaa==='.'||_0x4edfaa==='..'||_0x4edfaa[_0x25627e(0x120)]('.')||_0x4edfaa['endsWith']('\x20')||WINDOWS_INVALID_CHAR['test'](_0x4edfaa)||WINDOWS_RESERVED_NAME['test'](_0x4edfaa))throw new Error(_0x25627e(0x12d)+_0x1225ca);}return{'relativePath':_0x3d340c[_0x25627e(0x133)](a166_0x30257d[_0x25627e(0x141)]),'directory':_0x3c1873};}function isSymbolicLink(_0x5bceb9){const _0x16b328=a166_0x51b8,_0x3ef6f0=_0x5bceb9[_0x16b328(0x117)]>>>0x10&0xffff;return(_0x3ef6f0&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0xa07efb,_0x2c84aa){const _0x133c4b=a166_0x51b8,_0x5b68d3=await openZip(_0xa07efb),_0x12a89e=a166_0x30257d[_0x133c4b(0x13e)](_0x2c84aa),_0x1fb51d=new Set(),_0x264e99=new Map();let _0xc71510=0x0,_0x3d516e=0x0;await a166_0x1aae41[_0x133c4b(0x13c)](_0x12a89e,{'recursive':!![]}),await new Promise((_0x3cf297,_0x549bd1)=>{const _0x203d2a=_0x133c4b;let _0x2c4585=![];const _0x6d1e23=_0x3834ef=>{const _0x33bbf3=a166_0x51b8;if(_0x2c4585)return;_0x2c4585=!![],_0x5b68d3[_0x33bbf3(0x123)](),_0x549bd1(_0x3834ef instanceof Error?_0x3834ef:new Error(String(_0x3834ef)));};_0x5b68d3[_0x203d2a(0x130)]('error',_0x6d1e23),_0x5b68d3[_0x203d2a(0x130)](_0x203d2a(0x128),()=>{if(_0x2c4585)return;_0x2c4585=!![],_0x3cf297();}),_0x5b68d3['on']('entry',_0x3c2091=>{const _0x39983d=_0x203d2a;void(async()=>{const _0x257962=a166_0x51b8;_0xc71510+=0x1,_0x3d516e+=_0x3c2091[_0x257962(0x12c)];if(_0xc71510>MAX_ENTRY_COUNT)throw new Error(_0x257962(0x118)+MAX_ENTRY_COUNT+_0x257962(0x137));if(_0x3d516e>MAX_UNCOMPRESSED_SIZE)throw new Error('Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.');if(_0x3c2091[_0x257962(0x125)]())throw new Error(_0x257962(0x124)+_0x3c2091[_0x257962(0x11a)]);if(isSymbolicLink(_0x3c2091))throw new Error(_0x257962(0x144)+_0x3c2091[_0x257962(0x11a)]);const {relativePath:_0x107196,directory:_0x407737}=validateEntryPath(_0x3c2091['fileName']),_0x2df33d=_0x107196[_0x257962(0x146)](a166_0x30257d[_0x257962(0x141)]);for(let _0x1155c0=0x1;_0x1155c0<=_0x2df33d['length'];_0x1155c0+=0x1){const _0x3fcf07=_0x2df33d[_0x257962(0x129)](0x0,_0x1155c0)[_0x257962(0x133)](a166_0x30257d[_0x257962(0x141)]),_0x51c9f9=_0x3fcf07[_0x257962(0x122)](_0x257962(0x11f)),_0x4e30c6=_0x264e99[_0x257962(0x13d)](_0x51c9f9);if(_0x4e30c6&&_0x4e30c6!==_0x3fcf07)throw new Error('Case-conflicting\x20ZIP\x20entry\x20path:\x20'+_0x3c2091[_0x257962(0x11a)]);_0x264e99[_0x257962(0x145)](_0x51c9f9,_0x3fcf07);}const _0xc1f275=_0x107196[_0x257962(0x122)]('en-US');if(_0x1fb51d[_0x257962(0x12a)](_0xc1f275))throw new Error(_0x257962(0x11c)+_0x3c2091[_0x257962(0x11a)]);_0x1fb51d['add'](_0xc1f275);const _0x427a5d=a166_0x30257d[_0x257962(0x13e)](_0x12a89e,_0x107196);if(_0x427a5d!==_0x12a89e&&!_0x427a5d['startsWith'](''+_0x12a89e+a166_0x30257d[_0x257962(0x141)]))throw new Error(_0x257962(0x13b)+_0x3c2091['fileName']);if(_0x407737)await a166_0x1aae41[_0x257962(0x13c)](_0x427a5d,{'recursive':!![]});else{await a166_0x1aae41[_0x257962(0x13c)](a166_0x30257d[_0x257962(0x13f)](_0x427a5d),{'recursive':!![]});const _0x11ca51=await openEntryStream(_0x5b68d3,_0x3c2091);await pipeline(_0x11ca51,createWriteStream(_0x427a5d,{'flags':'wx','mode':0x1a4}));}_0x5b68d3[_0x257962(0x134)]();})()[_0x39983d(0x12b)](_0x6d1e23);}),_0x5b68d3[_0x203d2a(0x134)]();});}
1
+ (function(_0x4c15ad,_0x5dd583){const _0xe70b32=a166_0xaa96,_0x232682=_0x4c15ad();while(!![]){try{const _0x1aa10b=parseInt(_0xe70b32(0x174))/0x1*(-parseInt(_0xe70b32(0x172))/0x2)+-parseInt(_0xe70b32(0x163))/0x3+parseInt(_0xe70b32(0x164))/0x4*(parseInt(_0xe70b32(0x157))/0x5)+-parseInt(_0xe70b32(0x162))/0x6*(parseInt(_0xe70b32(0x160))/0x7)+parseInt(_0xe70b32(0x152))/0x8*(parseInt(_0xe70b32(0x16c))/0x9)+parseInt(_0xe70b32(0x179))/0xa*(parseInt(_0xe70b32(0x15b))/0xb)+parseInt(_0xe70b32(0x161))/0xc*(parseInt(_0xe70b32(0x167))/0xd);if(_0x1aa10b===_0x5dd583)break;else _0x232682['push'](_0x232682['shift']());}catch(_0x401133){_0x232682['push'](_0x232682['shift']());}}}(a166_0xfc6b,0x68e02));function a166_0xaa96(_0x320890,_0x19ec18){_0x320890=_0x320890-0x14f;const _0xfc6b87=a166_0xfc6b();let _0xaa963d=_0xfc6b87[_0x320890];return _0xaa963d;}import{createWriteStream}from'node:fs';import a166_0x466c92 from'node:fs/promises';function a166_0xfc6b(){const _0x19ee54=['22nyWqUS','Project\x20template\x20ZIP\x20exceeds\x20','slice','uncompressedSize','toLocaleLowerCase','13517ivSZxZ','12DZbWpC','1770tuMdvL','898950gRTvtu','708gqGiex','dirname','get','1087801HQUKsL','replace','end','Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20','Unable\x20to\x20open\x20project\x20template\x20archive.','6767721aYamkx','sep','en-US','has','ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20','readEntry','38322uqcRXD','split','6sHvtNy','catch','endsWith','join','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.','2304170aIbxts','open','mkdir','Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20','resolve','openReadStream','Unable\x20to\x20read\x20ZIP\x20entry:\x20','once','Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20','error','startsWith','isEncrypted','8kVZuDx','set','Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20','fileName','Case-conflicting\x20ZIP\x20entry\x20path:\x20','3315zvPqrO','add','externalFileAttributes','test'];a166_0xfc6b=function(){return _0x19ee54;};return a166_0xfc6b();}import a166_0x300c70 from'node:path';import{pipeline}from'node:stream/promises';import a166_0x4f1977 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(_0x3e3aae){return new Promise((_0xdd05bc,_0x758e34)=>{const _0x185a33=a166_0xaa96;a166_0x4f1977[_0x185a33(0x17a)](_0x3e3aae,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x34d33b,_0x5de89a)=>{const _0x2a5636=_0x185a33;if(_0x34d33b||!_0x5de89a){_0x758e34(_0x34d33b||new Error(_0x2a5636(0x16b)));return;}_0xdd05bc(_0x5de89a);});});}function openEntryStream(_0x10d9a8,_0x278262){return new Promise((_0x1a8b6c,_0x120657)=>{const _0x4c0800=a166_0xaa96;_0x10d9a8[_0x4c0800(0x17e)](_0x278262,(_0x529e5d,_0x1f2b8c)=>{const _0x3de1e0=_0x4c0800;if(_0x529e5d||!_0x1f2b8c){_0x120657(_0x529e5d||new Error(_0x3de1e0(0x17f)+_0x278262[_0x3de1e0(0x155)]));return;}_0x1a8b6c(_0x1f2b8c);});});}function validateEntryPath(_0x37e9d9){const _0x2a2c98=a166_0xaa96,_0x4a23d2=_0x37e9d9[_0x2a2c98(0x168)](/\\/g,'/'),_0x466ed2=_0x4a23d2['endsWith']('/'),_0x3353c=_0x466ed2?_0x4a23d2[_0x2a2c98(0x15d)](0x0,-0x1):_0x4a23d2;if(!_0x3353c||_0x4a23d2[_0x2a2c98(0x150)]('/')||/^[A-Za-z]:\//['test'](_0x4a23d2))throw new Error('Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20'+_0x37e9d9);const _0x136194=_0x3353c[_0x2a2c98(0x173)]('/');for(const _0x54b3c9 of _0x136194){if(!_0x54b3c9||_0x54b3c9==='.'||_0x54b3c9==='..'||_0x54b3c9[_0x2a2c98(0x176)]('.')||_0x54b3c9[_0x2a2c98(0x176)]('\x20')||WINDOWS_INVALID_CHAR[_0x2a2c98(0x15a)](_0x54b3c9)||WINDOWS_RESERVED_NAME[_0x2a2c98(0x15a)](_0x54b3c9))throw new Error(_0x2a2c98(0x16a)+_0x37e9d9);}return{'relativePath':_0x136194[_0x2a2c98(0x177)](a166_0x300c70[_0x2a2c98(0x16d)]),'directory':_0x466ed2};}function isSymbolicLink(_0x31d72f){const _0x5eff63=a166_0xaa96,_0x5e36e0=_0x31d72f[_0x5eff63(0x159)]>>>0x10&0xffff;return(_0x5e36e0&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0x5f05dd,_0x20188f){const _0x4185f6=a166_0xaa96,_0x4de46e=await openZip(_0x5f05dd),_0x4a6a39=a166_0x300c70[_0x4185f6(0x17d)](_0x20188f),_0x390aa5=new Set(),_0x820aa1=new Map();let _0xd5b6e1=0x0,_0x256533=0x0;await a166_0x466c92[_0x4185f6(0x17b)](_0x4a6a39,{'recursive':!![]}),await new Promise((_0x4e8d45,_0x48d6c9)=>{const _0x13753e=_0x4185f6;let _0xe9d677=![];const _0x85012=_0x527ce9=>{if(_0xe9d677)return;_0xe9d677=!![],_0x4de46e['close'](),_0x48d6c9(_0x527ce9 instanceof Error?_0x527ce9:new Error(String(_0x527ce9)));};_0x4de46e['once'](_0x13753e(0x14f),_0x85012),_0x4de46e[_0x13753e(0x180)](_0x13753e(0x169),()=>{if(_0xe9d677)return;_0xe9d677=!![],_0x4e8d45();}),_0x4de46e['on']('entry',_0x566f9d=>{const _0x5518c4=_0x13753e;void(async()=>{const _0x3772d0=a166_0xaa96;_0xd5b6e1+=0x1,_0x256533+=_0x566f9d[_0x3772d0(0x15e)];if(_0xd5b6e1>MAX_ENTRY_COUNT)throw new Error(_0x3772d0(0x15c)+MAX_ENTRY_COUNT+'\x20entries.');if(_0x256533>MAX_UNCOMPRESSED_SIZE)throw new Error(_0x3772d0(0x178));if(_0x566f9d[_0x3772d0(0x151)]())throw new Error(_0x3772d0(0x17c)+_0x566f9d[_0x3772d0(0x155)]);if(isSymbolicLink(_0x566f9d))throw new Error(_0x3772d0(0x181)+_0x566f9d[_0x3772d0(0x155)]);const {relativePath:_0x215dc3,directory:_0x51bf3c}=validateEntryPath(_0x566f9d[_0x3772d0(0x155)]),_0x119db3=_0x215dc3['split'](a166_0x300c70[_0x3772d0(0x16d)]);for(let _0x3f26c7=0x1;_0x3f26c7<=_0x119db3['length'];_0x3f26c7+=0x1){const _0x5f5c38=_0x119db3[_0x3772d0(0x15d)](0x0,_0x3f26c7)[_0x3772d0(0x177)](a166_0x300c70[_0x3772d0(0x16d)]),_0x425d0f=_0x5f5c38['toLocaleLowerCase'](_0x3772d0(0x16e)),_0x3d807f=_0x820aa1[_0x3772d0(0x166)](_0x425d0f);if(_0x3d807f&&_0x3d807f!==_0x5f5c38)throw new Error(_0x3772d0(0x156)+_0x566f9d[_0x3772d0(0x155)]);_0x820aa1[_0x3772d0(0x153)](_0x425d0f,_0x5f5c38);}const _0x654772=_0x215dc3[_0x3772d0(0x15f)](_0x3772d0(0x16e));if(_0x390aa5[_0x3772d0(0x16f)](_0x654772))throw new Error(_0x3772d0(0x154)+_0x566f9d[_0x3772d0(0x155)]);_0x390aa5[_0x3772d0(0x158)](_0x654772);const _0x302286=a166_0x300c70[_0x3772d0(0x17d)](_0x4a6a39,_0x215dc3);if(_0x302286!==_0x4a6a39&&!_0x302286[_0x3772d0(0x150)](''+_0x4a6a39+a166_0x300c70[_0x3772d0(0x16d)]))throw new Error(_0x3772d0(0x170)+_0x566f9d[_0x3772d0(0x155)]);if(_0x51bf3c)await a166_0x466c92[_0x3772d0(0x17b)](_0x302286,{'recursive':!![]});else{await a166_0x466c92['mkdir'](a166_0x300c70[_0x3772d0(0x165)](_0x302286),{'recursive':!![]});const _0x2c46d1=await openEntryStream(_0x4de46e,_0x566f9d);await pipeline(_0x2c46d1,createWriteStream(_0x302286,{'flags':'wx','mode':0x1a4}));}_0x4de46e['readEntry']();})()[_0x5518c4(0x175)](_0x85012);}),_0x4de46e[_0x13753e(0x171)]();});}
@@ -1 +1 @@
1
- function a167_0x253d(_0x57e073,_0x1d2588){_0x57e073=_0x57e073-0xc5;const _0x526b89=a167_0x526b();let _0x253da6=_0x526b89[_0x57e073];return _0x253da6;}(function(_0xee5718,_0x2c36f6){const _0x1146bd=a167_0x253d,_0x184b15=_0xee5718();while(!![]){try{const _0x17a7ff=parseInt(_0x1146bd(0xc8))/0x1*(parseInt(_0x1146bd(0xc6))/0x2)+-parseInt(_0x1146bd(0xce))/0x3*(parseInt(_0x1146bd(0xc7))/0x4)+-parseInt(_0x1146bd(0xd0))/0x5+parseInt(_0x1146bd(0xca))/0x6+-parseInt(_0x1146bd(0xc9))/0x7+-parseInt(_0x1146bd(0xcc))/0x8+-parseInt(_0x1146bd(0xc5))/0x9*(-parseInt(_0x1146bd(0xcf))/0xa);if(_0x17a7ff===_0x2c36f6)break;else _0x184b15['push'](_0x184b15['shift']());}catch(_0x1986ab){_0x184b15['push'](_0x184b15['shift']());}}}(a167_0x526b,0xb79c2));import a167_0x400899 from'node:path';import{fileURLToPath}from'node:url';function a167_0x526b(){const _0x10c76e=['9VlHHCP','122222AeGSWy','28568SlmsSk','7RrrMhG','8713208TCDwIq','7866552xAxQMH','resolve','6069584ZBZpId','../../../../','258HpOQfk','16854920xapyhm','273205VfQcOi'];a167_0x526b=function(){return _0x10c76e;};return a167_0x526b();}const __dirname=a167_0x400899['dirname'](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x300b6f=a167_0x253d;return a167_0x400899[_0x300b6f(0xcb)](__dirname,_0x300b6f(0xcd));}
1
+ const a167_0x445f3a=a167_0x5e99;(function(_0x3bc43a,_0x33f7e9){const _0x464641=a167_0x5e99,_0x323280=_0x3bc43a();while(!![]){try{const _0x42fcc3=parseInt(_0x464641(0x1e8))/0x1*(-parseInt(_0x464641(0x1ea))/0x2)+parseInt(_0x464641(0x1ec))/0x3*(parseInt(_0x464641(0x1e5))/0x4)+parseInt(_0x464641(0x1ef))/0x5*(parseInt(_0x464641(0x1e4))/0x6)+-parseInt(_0x464641(0x1ee))/0x7*(parseInt(_0x464641(0x1f0))/0x8)+parseInt(_0x464641(0x1ed))/0x9+-parseInt(_0x464641(0x1f1))/0xa+-parseInt(_0x464641(0x1e7))/0xb;if(_0x42fcc3===_0x33f7e9)break;else _0x323280['push'](_0x323280['shift']());}catch(_0x525396){_0x323280['push'](_0x323280['shift']());}}}(a167_0x467f,0x67698));function a167_0x467f(){const _0x1c084d=['86166LxIBix','532qAkqTw','dirname','6287424bRZkux','1oZLNGB','../../../../','202164YDjxkg','resolve','17583SzrihF','1801944DgARmA','315679PWxEzl','205bRQgmU','56byxEWj','1566090bwQRIj'];a167_0x467f=function(){return _0x1c084d;};return a167_0x467f();}import a167_0x283148 from'node:path';import{fileURLToPath}from'node:url';function a167_0x5e99(_0x2a186c,_0xb9380b){_0x2a186c=_0x2a186c-0x1e4;const _0x467fd8=a167_0x467f();let _0x5e9954=_0x467fd8[_0x2a186c];return _0x5e9954;}const __dirname=a167_0x283148[a167_0x445f3a(0x1e6)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x34f797=a167_0x445f3a;return a167_0x283148[_0x34f797(0x1eb)](__dirname,_0x34f797(0x1e9));}
@@ -1 +1 @@
1
- (function(_0x31b1e5,_0x561487){const _0x26d3f6=a168_0x17d3,_0x2a25bb=_0x31b1e5();while(!![]){try{const _0x9bf325=parseInt(_0x26d3f6(0x143))/0x1+parseInt(_0x26d3f6(0x14b))/0x2+parseInt(_0x26d3f6(0x156))/0x3*(parseInt(_0x26d3f6(0x14a))/0x4)+-parseInt(_0x26d3f6(0x149))/0x5*(parseInt(_0x26d3f6(0x148))/0x6)+parseInt(_0x26d3f6(0x150))/0x7*(parseInt(_0x26d3f6(0x14d))/0x8)+-parseInt(_0x26d3f6(0x147))/0x9*(-parseInt(_0x26d3f6(0x14f))/0xa)+parseInt(_0x26d3f6(0x152))/0xb;if(_0x9bf325===_0x561487)break;else _0x2a25bb['push'](_0x2a25bb['shift']());}catch(_0x3555e3){_0x2a25bb['push'](_0x2a25bb['shift']());}}}(a168_0xe26f,0x72533));import a168_0x8e8c74 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_0x17d3(_0x571e86,_0x5a9dc0){_0x571e86=_0x571e86-0x143;const _0xe26fba=a168_0xe26f();let _0x17d30b=_0xe26fba[_0x571e86];return _0x17d30b;}export async function copyProjectTemplate(_0x44d835,_0x1a4158,_0x1686c9){const _0x13e5dc=a168_0x17d3,_0x1f7ab6=Date[_0x13e5dc(0x154)](),_0x4d9982=a168_0x8e8c74[_0x13e5dc(0x153)](process[_0x13e5dc(0x158)](),_0x44d835);try{logger[_0x13e5dc(0x14e)](_0x13e5dc(0x159),_0x13e5dc(0x155),{'projectCode':_0x44d835});const _0x43b623=_0x1686c9?await materializeLocalProjectTemplate(_0x1686c9,_0x4d9982,_0x1a4158):await materializeProjectTemplate(_0x4d9982,_0x1a4158),_0x4795b3=Date[_0x13e5dc(0x154)]()-_0x1f7ab6;logger[_0x13e5dc(0x15a)](_0x13e5dc(0x159),_0x13e5dc(0x144),_0x4795b3,{'projectCode':_0x44d835,'templateSource':_0x43b623[_0x13e5dc(0x151)],'templateVersion':_0x43b623[_0x13e5dc(0x157)]});}catch(_0x3e8142){const _0x1a5d28=Date[_0x13e5dc(0x154)]()-_0x1f7ab6;logger[_0x13e5dc(0x145)]('copy',_0x13e5dc(0x146),{'projectCode':_0x44d835,'error':_0x3e8142 instanceof Error?_0x3e8142[_0x13e5dc(0x14c)]:String(_0x3e8142),'duration':_0x1a5d28});throw _0x3e8142;}return formatElapsed(_0x1f7ab6);}function a168_0xe26f(){const _0x2200a3=['source','2336488nvWspQ','resolve','now','Starting\x20project\x20template\x20creation','4515CiatUV','version','cwd','copy','success','3507YeHIfa','Project\x20template\x20created','error','Failed\x20to\x20copy\x20project\x20template','9GOwYsk','86946mkWrri','215boxmoP','172qthMBA','100178yaNIjD','message','8ZwnvtX','info','1244580BKZutZ','4453477UurRqT'];a168_0xe26f=function(){return _0x2200a3;};return a168_0xe26f();}
1
+ (function(_0x107b61,_0xefd22e){const _0x1703d0=a168_0x52fd,_0x535bd0=_0x107b61();while(!![]){try{const _0x4c1a7e=parseInt(_0x1703d0(0x10d))/0x1*(-parseInt(_0x1703d0(0x105))/0x2)+-parseInt(_0x1703d0(0xff))/0x3+-parseInt(_0x1703d0(0x101))/0x4*(-parseInt(_0x1703d0(0x108))/0x5)+-parseInt(_0x1703d0(0xfa))/0x6*(-parseInt(_0x1703d0(0x10c))/0x7)+parseInt(_0x1703d0(0xfd))/0x8+parseInt(_0x1703d0(0x10b))/0x9*(-parseInt(_0x1703d0(0x106))/0xa)+parseInt(_0x1703d0(0xfe))/0xb*(parseInt(_0x1703d0(0x102))/0xc);if(_0x4c1a7e===_0xefd22e)break;else _0x535bd0['push'](_0x535bd0['shift']());}catch(_0x5ca109){_0x535bd0['push'](_0x535bd0['shift']());}}}(a168_0x1d41,0x38344));import a168_0x5244fc from'node:path';function a168_0x52fd(_0x590f9a,_0x3ba23a){_0x590f9a=_0x590f9a-0xfa;const _0x1d41b0=a168_0x1d41();let _0x52fd6f=_0x1d41b0[_0x590f9a];return _0x52fd6f;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a168_0x1d41(){const _0x497dad=['7PWzVgS','8sqgbmP','copy','error','1617012uIJzNy','success','Starting\x20project\x20template\x20creation','983984ejTgZU','1941863RIAVCV','1195167HooWef','resolve','99652AWODaC','60hFcAGV','Failed\x20to\x20copy\x20project\x20template','info','91396hEiecO','20ZyBNOP','Project\x20template\x20created','10dMnLoG','version','now','1488627GogCfW'];a168_0x1d41=function(){return _0x497dad;};return a168_0x1d41();}import{logger}from'../../../utils/logger.js';import{materializeLocalProjectTemplate,materializeProjectTemplate}from'../../../commands/project/create/materialize-project-template.js';export async function copyProjectTemplate(_0x23ad90,_0x261489,_0x33716f){const _0x49ea50=a168_0x52fd,_0x46be83=Date[_0x49ea50(0x10a)](),_0x276cf5=a168_0x5244fc[_0x49ea50(0x100)](process['cwd'](),_0x23ad90);try{logger[_0x49ea50(0x104)](_0x49ea50(0x10e),_0x49ea50(0xfc),{'projectCode':_0x23ad90});const _0x1d0ea7=_0x33716f?await materializeLocalProjectTemplate(_0x33716f,_0x276cf5,_0x261489):await materializeProjectTemplate(_0x276cf5,_0x261489),_0x2dc690=Date[_0x49ea50(0x10a)]()-_0x46be83;logger[_0x49ea50(0xfb)](_0x49ea50(0x10e),_0x49ea50(0x107),_0x2dc690,{'projectCode':_0x23ad90,'templateSource':_0x1d0ea7['source'],'templateVersion':_0x1d0ea7[_0x49ea50(0x109)]});}catch(_0x1265e){const _0x3763c8=Date['now']()-_0x46be83;logger[_0x49ea50(0x10f)](_0x49ea50(0x10e),_0x49ea50(0x103),{'projectCode':_0x23ad90,'error':_0x1265e instanceof Error?_0x1265e['message']:String(_0x1265e),'duration':_0x3763c8});throw _0x1265e;}return formatElapsed(_0x46be83);}
@@ -1 +1 @@
1
- (function(_0x804302,_0x1e96ba){const _0x4e6a9b=a169_0x395d,_0xe1c411=_0x804302();while(!![]){try{const _0x4192d5=parseInt(_0x4e6a9b(0x1dd))/0x1+parseInt(_0x4e6a9b(0x1dc))/0x2*(parseInt(_0x4e6a9b(0x1e9))/0x3)+-parseInt(_0x4e6a9b(0x1e1))/0x4+-parseInt(_0x4e6a9b(0x1db))/0x5*(parseInt(_0x4e6a9b(0x1e5))/0x6)+-parseInt(_0x4e6a9b(0x1d9))/0x7+-parseInt(_0x4e6a9b(0x1e2))/0x8*(parseInt(_0x4e6a9b(0x1e3))/0x9)+parseInt(_0x4e6a9b(0x1e6))/0xa;if(_0x4192d5===_0x1e96ba)break;else _0xe1c411['push'](_0xe1c411['shift']());}catch(_0x467d8b){_0xe1c411['push'](_0xe1c411['shift']());}}}(a169_0x2296,0xcf6b9));function a169_0x395d(_0x4d3072,_0x401d4a){_0x4d3072=_0x4d3072-0x1d5;const _0x229661=a169_0x2296();let _0x395d62=_0x229661[_0x4d3072];return _0x395d62;}import a169_0x1f5582 from'node:path';function a169_0x2296(){const _0x3ea703=['resolve','success','10530520CTOgOa','--write','3097025Aalsgt','52rBlwTx','507731PcdEQU','format','info','now','6214288sfPMNS','8pmrjaC','14358987UhkCWU','Starting\x20code\x20format','6gccytk','44624780EgOMBA','Code\x20format\x20completed','prettier','132942ScvXJK','message','error'];a169_0x2296=function(){return _0x3ea703;};return a169_0x2296();}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x392249){const _0xa59710=a169_0x395d,_0x49e53d=Date[_0xa59710(0x1e0)](),_0x414615=a169_0x1f5582[_0xa59710(0x1d7)](process['cwd'](),_0x392249);try{logger[_0xa59710(0x1df)](_0xa59710(0x1de),_0xa59710(0x1e4),{'projectCode':_0x392249}),await execa(resolveNpmBin('npx'),[_0xa59710(0x1e8),_0xa59710(0x1da),'.'],{'cwd':_0x414615});const _0x296074=Date['now']()-_0x49e53d;logger[_0xa59710(0x1d8)](_0xa59710(0x1de),_0xa59710(0x1e7),_0x296074,{'projectCode':_0x392249});}catch(_0x5f546c){const _0x1b3c32=Date['now']()-_0x49e53d;logger[_0xa59710(0x1d6)](_0xa59710(0x1de),'Code\x20format\x20failed',{'projectCode':_0x392249,'error':_0x5f546c instanceof Error?_0x5f546c[_0xa59710(0x1d5)]:String(_0x5f546c),'duration':_0x1b3c32});throw _0x5f546c;}return formatElapsed(_0x49e53d);}
1
+ function a169_0xd6ac(){const _0x5349c2=['1324GTuflM','13SdGkGp','42pHucka','message','error','567243RqxaEV','24lofdWG','516kiTNrh','38401vpTNLe','82999DRKaaj','Starting\x20code\x20format','40378lkLthq','618ajNLpS','format','59338kOTqgU','resolve','70fNQDjM','now','644jLJETK','prettier','Code\x20format\x20completed','npx','cwd','Code\x20format\x20failed','192220OEeFxv','success','info','--write'];a169_0xd6ac=function(){return _0x5349c2;};return a169_0xd6ac();}(function(_0x1acfda,_0x569418){const _0x1acec0=a169_0x5083,_0x391423=_0x1acfda();while(!![]){try{const _0x23d59a=-parseInt(_0x1acec0(0x1f8))/0x1*(-parseInt(_0x1acec0(0x1e9))/0x2)+-parseInt(_0x1acec0(0x1e7))/0x3*(-parseInt(_0x1acec0(0x1f7))/0x4)+-parseInt(_0x1acec0(0x1f3))/0x5*(-parseInt(_0x1acec0(0x1f9))/0x6)+-parseInt(_0x1acec0(0x1e4))/0x7*(parseInt(_0x1acec0(0x1fd))/0x8)+parseInt(_0x1acec0(0x1fc))/0x9*(-parseInt(_0x1acec0(0x1eb))/0xa)+-parseInt(_0x1acec0(0x1e3))/0xb*(parseInt(_0x1acec0(0x1fe))/0xc)+parseInt(_0x1acec0(0x1e6))/0xd*(parseInt(_0x1acec0(0x1ed))/0xe);if(_0x23d59a===_0x569418)break;else _0x391423['push'](_0x391423['shift']());}catch(_0x51dd5e){_0x391423['push'](_0x391423['shift']());}}}(a169_0xd6ac,0x3a592));import a169_0x278a10 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a169_0x5083(_0x595ce7,_0x214c01){_0x595ce7=_0x595ce7-0x1e3;const _0xd6acc6=a169_0xd6ac();let _0x508368=_0xd6acc6[_0x595ce7];return _0x508368;}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x14c580){const _0x39491e=a169_0x5083,_0x59ae0d=Date[_0x39491e(0x1ec)](),_0x4b7b81=a169_0x278a10[_0x39491e(0x1ea)](process[_0x39491e(0x1f1)](),_0x14c580);try{logger[_0x39491e(0x1f5)](_0x39491e(0x1e8),_0x39491e(0x1e5),{'projectCode':_0x14c580}),await execa(resolveNpmBin(_0x39491e(0x1f0)),[_0x39491e(0x1ee),_0x39491e(0x1f6),'.'],{'cwd':_0x4b7b81});const _0x1aa61f=Date['now']()-_0x59ae0d;logger[_0x39491e(0x1f4)]('format',_0x39491e(0x1ef),_0x1aa61f,{'projectCode':_0x14c580});}catch(_0x518a8a){const _0x2fe95d=Date['now']()-_0x59ae0d;logger[_0x39491e(0x1fb)](_0x39491e(0x1e8),_0x39491e(0x1f2),{'projectCode':_0x14c580,'error':_0x518a8a instanceof Error?_0x518a8a[_0x39491e(0x1fa)]:String(_0x518a8a),'duration':_0x2fe95d});throw _0x518a8a;}return formatElapsed(_0x59ae0d);}
@@ -1 +1 @@
1
- function a170_0x3d0a(){const _0x243544=['11764yGEGWk','215096DfiuBh','now','36nmakxG','resolve','1563JavKBl','Starting\x20dependency\x20install','error','npm','2880514lcPtGT','5709725OxATJg','message','1276884pqJIiG','11VTbSGG','282mHuoBY','success','18577610LsIsKs','info','https://registry.npmmirror.com','cwd','install','246832YZcIpn'];a170_0x3d0a=function(){return _0x243544;};return a170_0x3d0a();}(function(_0x57ed74,_0x51f4b1){const _0x37f56b=a170_0x46e3,_0x45408e=_0x57ed74();while(!![]){try{const _0x1aa09f=-parseInt(_0x37f56b(0x92))/0x1+-parseInt(_0x37f56b(0x8f))/0x2+parseInt(_0x37f56b(0x8b))/0x3*(parseInt(_0x37f56b(0x86))/0x4)+-parseInt(_0x37f56b(0x90))/0x5+-parseInt(_0x37f56b(0x94))/0x6*(-parseInt(_0x37f56b(0x87))/0x7)+-parseInt(_0x37f56b(0x85))/0x8*(parseInt(_0x37f56b(0x89))/0x9)+parseInt(_0x37f56b(0x80))/0xa*(parseInt(_0x37f56b(0x93))/0xb);if(_0x1aa09f===_0x51f4b1)break;else _0x45408e['push'](_0x45408e['shift']());}catch(_0x2bbcde){_0x45408e['push'](_0x45408e['shift']());}}}(a170_0x3d0a,0xcff18));import a170_0x33674d from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a170_0x46e3(_0x374987,_0x13fb9a){_0x374987=_0x374987-0x7f;const _0x3d0ae3=a170_0x3d0a();let _0x46e339=_0x3d0ae3[_0x374987];return _0x46e339;}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x1e2006){const _0x39a9e2=a170_0x46e3,_0x460876=Date[_0x39a9e2(0x88)](),_0x578a04=a170_0x33674d[_0x39a9e2(0x8a)](process[_0x39a9e2(0x83)](),_0x1e2006);try{logger[_0x39a9e2(0x81)](_0x39a9e2(0x84),_0x39a9e2(0x8c),{'projectCode':_0x1e2006,'registry':_0x39a9e2(0x82)}),await execa(resolveNpmBin(_0x39a9e2(0x8e)),[_0x39a9e2(0x84),'--registry',_0x39a9e2(0x82)],{'cwd':_0x578a04});const _0x4d9717=Date[_0x39a9e2(0x88)]()-_0x460876;logger[_0x39a9e2(0x7f)]('install','Dependency\x20install\x20completed',_0x4d9717,{'projectCode':_0x1e2006});}catch(_0x1461b4){const _0x47a2b8=Date[_0x39a9e2(0x88)]()-_0x460876;logger[_0x39a9e2(0x8d)](_0x39a9e2(0x84),'Dependency\x20install\x20failed',{'projectCode':_0x1e2006,'error':_0x1461b4 instanceof Error?_0x1461b4[_0x39a9e2(0x91)]:String(_0x1461b4),'duration':_0x47a2b8});throw _0x1461b4;}return formatElapsed(_0x460876);}
1
+ (function(_0x55645c,_0x4cbdae){const _0x5b7569=a170_0x4e01,_0x1d8b3f=_0x55645c();while(!![]){try{const _0x19365f=-parseInt(_0x5b7569(0x90))/0x1+-parseInt(_0x5b7569(0xa1))/0x2+parseInt(_0x5b7569(0x96))/0x3+-parseInt(_0x5b7569(0xa2))/0x4+-parseInt(_0x5b7569(0x9c))/0x5+-parseInt(_0x5b7569(0x9a))/0x6*(parseInt(_0x5b7569(0x9f))/0x7)+parseInt(_0x5b7569(0x95))/0x8;if(_0x19365f===_0x4cbdae)break;else _0x1d8b3f['push'](_0x1d8b3f['shift']());}catch(_0x4cf3fb){_0x1d8b3f['push'](_0x1d8b3f['shift']());}}}(a170_0x165d,0x83df0));import a170_0x44d6a1 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a170_0x165d(){const _0x35d81d=['1099dmOkuG','Starting\x20dependency\x20install','2018510bacSSi','999996UYeyxN','resolve','340832idcOME','install','now','Dependency\x20install\x20failed','--registry','12907656lOfcNG','2596587bGPsKr','https://registry.npmmirror.com','Dependency\x20install\x20completed','cwd','126ALwhWm','error','1677295VLwuVn','info','success'];a170_0x165d=function(){return _0x35d81d;};return a170_0x165d();}import{logger}from'../../../utils/logger.js';function a170_0x4e01(_0x2544b6,_0x196d7e){_0x2544b6=_0x2544b6-0x8f;const _0x165dae=a170_0x165d();let _0x4e01c9=_0x165dae[_0x2544b6];return _0x4e01c9;}import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0xee5484){const _0x1035e2=a170_0x4e01,_0x438c57=Date['now'](),_0x41cffb=a170_0x44d6a1[_0x1035e2(0x8f)](process[_0x1035e2(0x99)](),_0xee5484);try{logger[_0x1035e2(0x9d)]('install',_0x1035e2(0xa0),{'projectCode':_0xee5484,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin('npm'),[_0x1035e2(0x91),_0x1035e2(0x94),_0x1035e2(0x97)],{'cwd':_0x41cffb});const _0x4a843f=Date[_0x1035e2(0x92)]()-_0x438c57;logger[_0x1035e2(0x9e)](_0x1035e2(0x91),_0x1035e2(0x98),_0x4a843f,{'projectCode':_0xee5484});}catch(_0x4efebc){const _0x2a8906=Date[_0x1035e2(0x92)]()-_0x438c57;logger[_0x1035e2(0x9b)](_0x1035e2(0x91),_0x1035e2(0x93),{'projectCode':_0xee5484,'error':_0x4efebc instanceof Error?_0x4efebc['message']:String(_0x4efebc),'duration':_0x2a8906});throw _0x4efebc;}return formatElapsed(_0x438c57);}
@@ -1 +1 @@
1
- function a171_0x3f7b(_0x1a29e1,_0x10c449){_0x1a29e1=_0x1a29e1-0x8c;const _0x2df77f=a171_0x2df7();let _0x3f7bd4=_0x2df77f[_0x1a29e1];return _0x3f7bd4;}const a171_0x124764=a171_0x3f7b;(function(_0x3787bb,_0x10e461){const _0x39761b=a171_0x3f7b,_0x37b1fa=_0x3787bb();while(!![]){try{const _0x566cb4=-parseInt(_0x39761b(0x93))/0x1+parseInt(_0x39761b(0x9e))/0x2*(parseInt(_0x39761b(0x9a))/0x3)+-parseInt(_0x39761b(0x99))/0x4+parseInt(_0x39761b(0x9c))/0x5+parseInt(_0x39761b(0x96))/0x6+parseInt(_0x39761b(0x9f))/0x7+parseInt(_0x39761b(0x95))/0x8*(parseInt(_0x39761b(0xaa))/0x9);if(_0x566cb4===_0x10e461)break;else _0x37b1fa['push'](_0x37b1fa['shift']());}catch(_0x66af98){_0x37b1fa['push'](_0x37b1fa['shift']());}}}(a171_0x2df7,0x253a6));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';const createFlags=[{'name':a171_0x124764(0xa6),'type':a171_0x124764(0xa7),'description':a171_0x124764(0x9b)},{'name':'env','type':a171_0x124764(0xa7),'description':a171_0x124764(0x94)},{'name':a171_0x124764(0x91),'type':a171_0x124764(0xa7),'description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'},{'name':a171_0x124764(0xa9),'type':'string','description':a171_0x124764(0x98)}],upgradeFlags=[{'name':'yes','type':'boolean','description':a171_0x124764(0x8d),'default':![]}];export const projectDefinitions=[{'service':a171_0x124764(0xa0),'command':a171_0x124764(0x92),'description':a171_0x124764(0xa8),'risk':a171_0x124764(0xa5),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a171_0x124764(0x97),'description':a171_0x124764(0xa2),'required':![]}],'flags':createFlags,async 'execute'(_0x3d297f){const _0x4d5774=a171_0x124764,{createApp:_0x21f409}=await import('../../commands/project/create/main.js'),_0x2c86ec=_0x3d297f[_0x4d5774(0xa3)](_0x4d5774(0xa6))[_0x4d5774(0x8c)]()||_0x3d297f[_0x4d5774(0x9d)][0x0]?.[_0x4d5774(0x8c)](),_0x2b0bdb=_0x3d297f[_0x4d5774(0xa3)]('env')||undefined,_0x257696=_0x3d297f[_0x4d5774(0xa3)]('appcode')||undefined,_0x1b159c=_0x3d297f[_0x4d5774(0xa3)]('template-source')[_0x4d5774(0x8c)]()||undefined;if(_0x3d297f[_0x4d5774(0xa4)]){if(!_0x2c86ec)throw CliErrors['validation'](_0x4d5774(0x8f),_0x4d5774(0x90)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x21f409({'projectCode':_0x2c86ec,'appCode':_0x257696,'env':_0x2b0bdb,'cookie':_0x3d297f['cookie'],'nonInteractive':!![],'templateSource':_0x1b159c});}else await _0x21f409({'projectCode':_0x2c86ec,'appCode':_0x257696,'env':_0x2b0bdb,'cookie':_0x3d297f['cookie'],'templateSource':_0x1b159c});return{'ok':!![]};}},{'service':a171_0x124764(0xa0),'command':a171_0x124764(0xa1),'description':'Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','risk':a171_0x124764(0xa5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x3d37c9){const _0x54b881=a171_0x124764;return await upgradeApp(_0x3d37c9[_0x54b881(0xa4)],{'yes':_0x3d37c9[_0x54b881(0x8e)](_0x54b881(0xab))}),{'ok':!![]};}}];function a171_0x2df7(){const _0x41a3d6=['Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','str','nonInteractive','write','name','string','Create\x20a\x20new\x20project','template-source','348741hgjZiD','yes','trim','Skip\x20confirmation\x20prompt','bool','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','Usage:\x20','appcode','create','191528wiUoeT','Target\x20environment','8ZEhUZq','707700FibQBm','project-name','Prepared\x20local\x20project\x20template\x20directory','633316Oizzwr','30606IWnlHZ','Project\x20name','901895oWiDHJ','args','24bKthqe','299887GTrQaW','project','upgrade'];a171_0x2df7=function(){return _0x41a3d6;};return a171_0x2df7();}
1
+ function a171_0x3332(_0x3c4969,_0x280f22){_0x3c4969=_0x3c4969-0xa7;const _0x5cd6c7=a171_0x5cd6();let _0x3332f=_0x5cd6c7[_0x3c4969];return _0x3332f;}const a171_0x1928b2=a171_0x3332;function a171_0x5cd6(){const _0x2e2aee=['args','548957dhYLec','27gyvyfH','1701472wcvHVX','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','Create\x20a\x20new\x20project','yes','trim','appcode','cookie','887550srfWJk','create','project-name','boolean','Target\x20environment','str','validation','1336944QFbZaD','write','project','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','27756vJWihS','1129230mEYUpj','string','template-source','112CsSbiO','3427970eYIYsw','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','env','Skip\x20confirmation\x20prompt','nonInteractive','bool','Prepared\x20local\x20project\x20template\x20directory'];a171_0x5cd6=function(){return _0x2e2aee;};return a171_0x5cd6();}(function(_0xdf78bc,_0x373459){const _0x652c2c=a171_0x3332,_0x407856=_0xdf78bc();while(!![]){try{const _0x37a4d2=parseInt(_0x652c2c(0xb9))/0x1+-parseInt(_0x652c2c(0xad))/0x2+-parseInt(_0x652c2c(0xac))/0x3*(-parseInt(_0x652c2c(0xb0))/0x4)+parseInt(_0x652c2c(0xc2))/0x5+-parseInt(_0x652c2c(0xa8))/0x6+-parseInt(_0x652c2c(0xb1))/0x7+-parseInt(_0x652c2c(0xbb))/0x8*(-parseInt(_0x652c2c(0xba))/0x9);if(_0x37a4d2===_0x373459)break;else _0x407856['push'](_0x407856['shift']());}catch(_0x8a072b){_0x407856['push'](_0x407856['shift']());}}}(a171_0x5cd6,0x5493a));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';const createFlags=[{'name':'name','type':a171_0x1928b2(0xae),'description':'Project\x20name'},{'name':'env','type':a171_0x1928b2(0xae),'description':a171_0x1928b2(0xc6)},{'name':a171_0x1928b2(0xc0),'type':a171_0x1928b2(0xae),'description':a171_0x1928b2(0xb2)},{'name':a171_0x1928b2(0xaf),'type':a171_0x1928b2(0xae),'description':a171_0x1928b2(0xb7)}],upgradeFlags=[{'name':a171_0x1928b2(0xbe),'type':a171_0x1928b2(0xc5),'description':a171_0x1928b2(0xb4),'default':![]}];export const projectDefinitions=[{'service':a171_0x1928b2(0xaa),'command':a171_0x1928b2(0xc3),'description':a171_0x1928b2(0xbd),'risk':a171_0x1928b2(0xa9),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a171_0x1928b2(0xc4),'description':a171_0x1928b2(0xab),'required':![]}],'flags':createFlags,async 'execute'(_0x3279f){const _0x4a99ec=a171_0x1928b2,{createApp:_0x5665ce}=await import('../../commands/project/create/main.js'),_0xd102cf=_0x3279f[_0x4a99ec(0xc7)]('name')['trim']()||_0x3279f[_0x4a99ec(0xb8)][0x0]?.[_0x4a99ec(0xbf)](),_0x2809aa=_0x3279f[_0x4a99ec(0xc7)](_0x4a99ec(0xb3))||undefined,_0x41d303=_0x3279f[_0x4a99ec(0xc7)](_0x4a99ec(0xc0))||undefined,_0x115a08=_0x3279f[_0x4a99ec(0xc7)](_0x4a99ec(0xaf))[_0x4a99ec(0xbf)]()||undefined;if(_0x3279f[_0x4a99ec(0xb5)]){if(!_0xd102cf)throw CliErrors[_0x4a99ec(0xa7)]('Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','Usage:\x20'+CLI_BIN_NAME+_0x4a99ec(0xbc));await _0x5665ce({'projectCode':_0xd102cf,'appCode':_0x41d303,'env':_0x2809aa,'cookie':_0x3279f['cookie'],'nonInteractive':!![],'templateSource':_0x115a08});}else await _0x5665ce({'projectCode':_0xd102cf,'appCode':_0x41d303,'env':_0x2809aa,'cookie':_0x3279f[_0x4a99ec(0xc1)],'templateSource':_0x115a08});return{'ok':!![]};}},{'service':a171_0x1928b2(0xaa),'command':'upgrade','description':'Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','risk':a171_0x1928b2(0xa9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x188b92){const _0x5ef46b=a171_0x1928b2;return await upgradeApp(_0x188b92[_0x5ef46b(0xb5)],{'yes':_0x188b92[_0x5ef46b(0xb6)](_0x5ef46b(0xbe))}),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a172_0x4550b3=a172_0x4dac;(function(_0x23c829,_0x21c17d){const _0x13d673=a172_0x4dac,_0x47ec59=_0x23c829();while(!![]){try{const _0x27cace=-parseInt(_0x13d673(0x7d))/0x1*(parseInt(_0x13d673(0xb5))/0x2)+parseInt(_0x13d673(0x7f))/0x3+-parseInt(_0x13d673(0x97))/0x4*(-parseInt(_0x13d673(0x68))/0x5)+-parseInt(_0x13d673(0xd6))/0x6*(-parseInt(_0x13d673(0xb4))/0x7)+-parseInt(_0x13d673(0x70))/0x8+parseInt(_0x13d673(0x73))/0x9+-parseInt(_0x13d673(0xc1))/0xa;if(_0x27cace===_0x21c17d)break;else _0x47ec59['push'](_0x47ec59['shift']());}catch(_0x527a25){_0x47ec59['push'](_0x47ec59['shift']());}}}(a172_0x4850,0xc19ce));import a172_0x2ee92d from'chalk';import a172_0x25aa45 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=[a172_0x4550b3(0xda),a172_0x4550b3(0x85)];function collectIdeSkillFiles(_0x53e69a){const _0xeecbb2=a172_0x4550b3,_0x593bc0=[];for(const _0x9cadbc of Object[_0xeecbb2(0x9b)](CORE_IDE_CONFIGS)){if(_0x9cadbc[_0xeecbb2(0x6e)])for(const _0x486818 of _0x9cadbc['files']){_0x593bc0['push'](resolve(_0x53e69a,_0x486818[_0xeecbb2(0xad)]));}}return _0x593bc0;}function analyse(_0x336362){const _0x7005d3=a172_0x4550b3;let _0x595b38=null;const _0x51eca9=resolve(_0x336362,NEW_CONFIG_NAME),_0x3c0cc6=existsSync(_0x51eca9);for(const _0x4bd436 of LEGACY_CONFIG_NAMES){const _0x473d5f=resolve(_0x336362,_0x4bd436);if(existsSync(_0x473d5f)){const _0x1df8a5=readConfigFile(_0x473d5f),_0x4991f5=Object['keys'](_0x1df8a5)[_0x7005d3(0xbe)](_0x3c2c73=>typeof _0x1df8a5[_0x3c2c73]!==_0x7005d3(0xc8));_0x595b38={'oldPath':_0x473d5f,'hasNewConfig':_0x3c0cc6,'fields':_0x4991f5};break;}}const _0x2d7877=[],_0x557e0f=resolve(_0x336362,'.lovrabet');if(existsSync(_0x557e0f))_0x2d7877[_0x7005d3(0xbc)](_0x557e0f);const _0x3a3ffb=resolve(_0x336362,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x3a3ffb))_0x2d7877[_0x7005d3(0xbc)](_0x3a3ffb);const _0x3582a4=resolve(_0x336362,_0x7005d3(0x76));if(existsSync(_0x3582a4))_0x2d7877[_0x7005d3(0xbc)](_0x3582a4);for(const _0x566de5 of collectIdeSkillFiles(_0x336362)){if(existsSync(_0x566de5))_0x2d7877['push'](_0x566de5);}let _0x5bf0f7=null;const _0x4ccd45=resolve(_0x336362,'.cursor/mcp.json');if(existsSync(_0x4ccd45))try{const _0x44b0a4=JSON[_0x7005d3(0xe3)](readFileSync(_0x4ccd45,'utf8'));if(_0x44b0a4?.[_0x7005d3(0x9d)]&&typeof _0x44b0a4[_0x7005d3(0x9d)]===_0x7005d3(0x7e)){const _0x10ff07=[];for(const [_0x445f09,_0x370511]of Object[_0x7005d3(0xe7)](_0x44b0a4[_0x7005d3(0x9d)])){const _0x546b76=_0x370511;_0x546b76?.[_0x7005d3(0xc7)]&&Array[_0x7005d3(0xd8)](_0x546b76['args'])&&_0x546b76[_0x7005d3(0xc7)]['some'](_0x335faa=>typeof _0x335faa===_0x7005d3(0xb2)&&_0x335faa[_0x7005d3(0x79)]('@lovrabet/dataset-mcp-server'))&&_0x10ff07['push'](_0x445f09);}_0x10ff07[_0x7005d3(0x98)]>0x0&&(_0x5bf0f7={'path':_0x4ccd45,'keys':_0x10ff07});}}catch{}const _0x3445fb=_0x2d7877[_0x7005d3(0x98)]>0x0||_0x595b38!==null;let _0x22de08=null;const _0x2b6f10=resolve(_0x336362,_0x7005d3(0xb1));if(existsSync(_0x2b6f10))try{const _0x291e06=JSON[_0x7005d3(0xe3)](readFileSync(_0x2b6f10,_0x7005d3(0x66)));for(const _0x522cc3 of[_0x7005d3(0x7a),_0x7005d3(0xe4)]){const _0x44b932=_0x291e06?.[_0x522cc3]?.['@lovrabet/sdk'];if(typeof _0x44b932===_0x7005d3(0xb2)){_0x44b932!==_0x7005d3(0xdc)&&(_0x22de08={'pkgPath':_0x2b6f10,'currentVersion':_0x44b932,'field':_0x522cc3});break;}}}catch{}return{'configMigration':_0x595b38,'oldArtifacts':_0x2d7877,'oldMcpConfig':_0x5bf0f7,'needsSkillSwap':_0x3445fb,'sdkUpgrade':_0x22de08};}function printReport(_0x5adfc0){const _0x106222=a172_0x4550b3,{configMigration:_0x20cf91,oldArtifacts:_0x35684a,oldMcpConfig:_0x44ae22,needsSkillSwap:_0x32f8c8}=_0x5adfc0;console[_0x106222(0x6d)](''),console[_0x106222(0x6d)](a172_0x2ee92d[_0x106222(0xa7)](_0x106222(0xa0))),console[_0x106222(0x6d)]('');_0x20cf91?(console[_0x106222(0x6d)](a172_0x2ee92d[_0x106222(0xcc)](_0x106222(0xb8))+('\x20\x20'+a172_0x2ee92d['yellow'](_0x20cf91[_0x106222(0x89)]))),console[_0x106222(0x6d)](_0x106222(0x6c)+(_0x20cf91[_0x106222(0x67)]?a172_0x2ee92d[_0x106222(0x72)](_0x106222(0xab)):a172_0x2ee92d[_0x106222(0x8d)]('not\x20found\x20(will\x20create)'))),console['log'](_0x106222(0x8f)+_0x20cf91[_0x106222(0x8e)][_0x106222(0x87)](',\x20')),console[_0x106222(0x6d)](_0x106222(0xa1))):console['log'](a172_0x2ee92d[_0x106222(0xcc)](_0x106222(0xb8))+'\x20\x20'+a172_0x2ee92d['gray']('no\x20legacy\x20config\x20found'));console[_0x106222(0x6d)]('');if(_0x35684a['length']>0x0){console[_0x106222(0x6d)](a172_0x2ee92d[_0x106222(0xcc)]('Legacy\x20artifacts:'));for(const _0x1f8625 of _0x35684a){console['log']('\x20\x20'+a172_0x2ee92d['red']('FOUND')+'\x20\x20'+_0x1f8625);}console[_0x106222(0x6d)]('\x20\x20Action:\x20delete');}else console['log'](a172_0x2ee92d[_0x106222(0xcc)](_0x106222(0xc5))+'\x20\x20'+a172_0x2ee92d[_0x106222(0x8d)](_0x106222(0xb3)));console[_0x106222(0x6d)]('');_0x44ae22?(console[_0x106222(0x6d)](a172_0x2ee92d[_0x106222(0xcc)](_0x106222(0xcb))+('\x20\x20'+a172_0x2ee92d['yellow'](_0x44ae22[_0x106222(0xad)])+_0x106222(0x9c)+_0x44ae22[_0x106222(0x84)][_0x106222(0x87)](',\x20'))),console[_0x106222(0x6d)](_0x106222(0xbf))):console[_0x106222(0x6d)](a172_0x2ee92d[_0x106222(0xcc)](_0x106222(0xcb))+'\x20\x20'+a172_0x2ee92d[_0x106222(0x8d)](_0x106222(0x6b)));console['log'](''),console['log'](a172_0x2ee92d[_0x106222(0xcc)](_0x106222(0xb7))+('\x20\x20'+(_0x32f8c8?a172_0x2ee92d[_0x106222(0x74)](_0x106222(0x6f)):a172_0x2ee92d[_0x106222(0x72)](_0x106222(0x9a)))));_0x32f8c8&&console[_0x106222(0x6d)]('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x106222(0x6d)]('');if(_0x5adfc0['sdkUpgrade']){const {currentVersion:_0x84f86,field:_0x4070aa,pkgPath:_0x34e6ac}=_0x5adfc0[_0x106222(0xd3)];console[_0x106222(0x6d)](a172_0x2ee92d[_0x106222(0xcc)](_0x106222(0xaf))+('\x20\x20'+a172_0x2ee92d['yellow'](_0x34e6ac))),console['log'](_0x106222(0xcf)+_0x4070aa+':\x20'+a172_0x2ee92d[_0x106222(0x74)](_0x84f86)+_0x106222(0xa4)+a172_0x2ee92d[_0x106222(0x72)](_0x106222(0xdc))),console['log'](_0x106222(0xe0));}else console[_0x106222(0x6d)](a172_0x2ee92d[_0x106222(0xcc)](_0x106222(0xaf))+'\x20\x20'+a172_0x2ee92d[_0x106222(0x8d)](_0x106222(0xb9)));console['log']('');}function execConfigMigration(_0x41c1fc,_0xe6bd25){const _0x2527a3=a172_0x4550b3,{configMigration:_0x59ee73}=_0x41c1fc;if(!_0x59ee73?.[_0x2527a3(0x89)])return{'step':0x1,'label':_0x2527a3(0xa6),'ok':!![],'detail':'skipped\x20(no\x20legacy\x20config)'};const _0x96e324=readConfigFile(_0x59ee73[_0x2527a3(0x89)]),_0x134a7e=resolve(_0xe6bd25,NEW_CONFIG_NAME),_0x30eea4=_0x59ee73['hasNewConfig']?readConfigFile(_0x134a7e):{};for(const [_0x40a1d1,_0x265f6d]of Object[_0x2527a3(0xe7)](_0x96e324)){!(_0x40a1d1 in _0x30eea4)&&(_0x30eea4[_0x40a1d1]=_0x265f6d);}writeConfigFile(_0x134a7e,_0x30eea4);const _0x772ed8=_0x59ee73[_0x2527a3(0x89)]+_0x2527a3(0xc9);return renameSync(_0x59ee73[_0x2527a3(0x89)],_0x772ed8),{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x59ee73[_0x2527a3(0x89)]+_0x2527a3(0xa4)+_0x134a7e+_0x2527a3(0x93)+_0x772ed8+')'};}function a172_0x4dac(_0x4ee91c,_0x236110){_0x4ee91c=_0x4ee91c-0x65;const _0x4850cc=a172_0x4850();let _0x4daccc=_0x4850cc[_0x4ee91c];return _0x4daccc;}function execRemoveOldArtifacts(_0x559ecd){const _0x24662c=a172_0x4550b3,_0x7ec632=[];for(const _0x1e0959 of _0x559ecd){try{if(!existsSync(_0x1e0959))continue;const _0x2a80d3=tryStat(_0x1e0959);_0x2a80d3?.['isDirectory']()?rmSync(_0x1e0959,{'recursive':!![],'force':!![]}):unlinkSync(_0x1e0959);}catch(_0x2f9073){_0x7ec632['push'](_0x1e0959+':\x20'+_0x2f9073[_0x24662c(0xd7)]);}}return{'step':0x3,'label':_0x24662c(0x92),'ok':_0x7ec632[_0x24662c(0x98)]===0x0,'detail':_0x7ec632[_0x24662c(0x98)]>0x0?_0x559ecd['length']-_0x7ec632[_0x24662c(0x98)]+'/'+_0x559ecd[_0x24662c(0x98)]+_0x24662c(0x7c)+_0x7ec632[_0x24662c(0x87)](';\x20')+')':_0x559ecd['length']+_0x24662c(0xae)};}function execCleanMcp(_0x283bd5){const _0x55753f=a172_0x4550b3;if(!_0x283bd5[_0x55753f(0x65)])return{'step':0x4,'label':_0x55753f(0xdd),'ok':!![],'detail':_0x55753f(0x81)};try{const _0x347490=readFileSync(_0x283bd5['oldMcpConfig'][_0x55753f(0xad)],_0x55753f(0x66)),_0x3549c6=JSON[_0x55753f(0xe3)](_0x347490);if(_0x3549c6?.[_0x55753f(0x9d)]&&typeof _0x3549c6[_0x55753f(0x9d)]===_0x55753f(0x7e)){const _0x55c682=[];for(const [_0x9086d,_0x223f39]of Object[_0x55753f(0xe7)](_0x3549c6[_0x55753f(0x9d)])){_0x223f39?.[_0x55753f(0xc7)]&&Array[_0x55753f(0xd8)](_0x223f39['args'])&&_0x223f39[_0x55753f(0xc7)]['some'](_0x4ad7e0=>typeof _0x4ad7e0===_0x55753f(0xb2)&&_0x4ad7e0[_0x55753f(0x79)]('@lovrabet/dataset-mcp-server'))&&_0x55c682[_0x55753f(0xbc)](_0x9086d);}for(const _0x2f6421 of _0x55c682){delete _0x3549c6['mcpServers'][_0x2f6421];}return _0x55c682[_0x55753f(0x98)]>0x0&&writeFileSync(_0x283bd5[_0x55753f(0x65)][_0x55753f(0xad)],JSON[_0x55753f(0xd4)](_0x3549c6,null,0x2)+'\x0a',_0x55753f(0x66)),{'step':0x4,'label':_0x55753f(0xdd),'ok':!![],'detail':_0x55753f(0xc2)+_0x55c682[_0x55753f(0x87)](',\x20')+_0x55753f(0x9e)+_0x283bd5[_0x55753f(0x65)][_0x55753f(0xad)]};}return{'step':0x4,'label':_0x55753f(0xdd),'ok':!![],'detail':'no\x20matching\x20entry\x20found'};}catch(_0x491efa){return{'step':0x4,'label':_0x55753f(0xdd),'ok':![],'detail':_0x491efa[_0x55753f(0xd7)]};}}function a172_0x4850(){const _0x42db03=['Config\x20migration','bold','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','red','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','already\x20exists\x20(will\x20merge)','needsSkillSwap','path','\x20removed','@lovrabet/sdk:','lovrabet/rabetbase','package.json','string','none\x20found','145292yHwlFR','6ueatBR','step','Skill\x20swap:','Config\x20file:','not\x20found\x20or\x20already\x20at\x20latest','configMigration','Step\x201/7:\x20Migrating\x20config...','push','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','filter','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','fail','12607850jUklLk','removed\x20','failed','white','Legacy\x20artifacts:','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','args','undefined','.bak','\x20\x20npm\x20install','MCP\x20config:','cyan','.lovrabet','Step\x201/7:\x20Config\x20migration\x20—\x20','\x20\x20Current\x20version\x20in\x20','lovrabet/lovrabet-skill\x20removed','[\x22@lovrabet/sdk\x22]:\x20','done','sdkUpgrade','stringify','inherit','414PLNjvB','message','isArray','===\x20Upgrade\x20Summary\x20===','.lovrabet.json','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','latest','Clean\x20MCP\x20config','Step\x205/7:\x20Removing\x20old\x20skill...','lovrabet/rabetbase\x20installed\x20globally','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','oldArtifacts','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','parse','devDependencies','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','entries','oldMcpConfig','utf8','hasNewConfig','20fVXJJQ','Proceed\x20with\x20upgrade?','Remove\x20.lovrabet/','no\x20legacy\x20entry','\x20\x20New\x20config\x20(.rabetbase.json):\x20','log','files','needed','8049784UASltl','Install\x20new\x20skill','green','4522050yrrEdC','yellow','Upgrade\x20cancelled.','.claude/skills/lovrabet','Upgrade\x20@lovrabet/sdk','start','includes','dependencies','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','\x20removed\x20(','318065skCdCP','object','4687509tduccN','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','skipped','yes','info','keys','.lovrabetrc','CANCEL','join','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','oldPath','@lovrabet/sdk','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','some','gray','fields','\x20\x20Fields\x20to\x20migrate:\x20','error','exit\x20','Remove\x20legacy\x20artifacts','\x20(backup:\x20','Step\x204/7:\x20Cleaning\x20MCP\x20config...','status','detail','517124eOewKb','length','succeed','not\x20needed','values','\x20→\x20keys:\x20','mcpServers','\x20from\x20','\x20\x20#\x20or','===\x20Upgrade\x20Analysis\x20===','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','Upgrade\x20completed\x20successfully!','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','\x20→\x20','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...'];a172_0x4850=function(){return _0x42db03;};return a172_0x4850();}function execSkillsRemove(_0x14116f,_0x1bb6b2){const _0x1a9bb4=a172_0x4550b3,_0x5ada1a=runNpxSkillsRemove(_0x14116f,{'stdio':_0x1a9bb4(0xd5),'yes':_0x1bb6b2});return{'step':0x5,'label':'Remove\x20old\x20skill','ok':_0x5ada1a['ok'],'detail':_0x5ada1a['ok']?_0x1a9bb4(0xd0):_0x5ada1a['error']??_0x1a9bb4(0x91)+_0x5ada1a[_0x1a9bb4(0x95)]};}function execSkillsAdd(_0x40c462,_0xf57475){const _0x3f9a92=a172_0x4550b3,_0x56c0b9=runNpxSkillsAddGlobal(_0x40c462,_0x3f9a92(0xb0),{'stdio':_0x3f9a92(0xd5),'yes':_0xf57475});return{'step':0x6,'label':_0x3f9a92(0x71),'ok':_0x56c0b9['ok'],'detail':_0x56c0b9['ok']?_0x3f9a92(0xdf):_0x56c0b9[_0x3f9a92(0x90)]??'exit\x20'+_0x56c0b9[_0x3f9a92(0x95)]};}function execUpgradeSdk(_0x241a05){const _0x2068c3=a172_0x4550b3;if(!_0x241a05[_0x2068c3(0xd3)])return{'step':0x7,'label':_0x2068c3(0x77),'ok':!![],'detail':_0x2068c3(0xaa)};const {pkgPath:_0x4e8acc,currentVersion:_0x1a3ba7,field:_0x34c561}=_0x241a05[_0x2068c3(0xd3)];try{const _0x2a9be1=readFileSync(_0x4e8acc,'utf8'),_0x107590=JSON[_0x2068c3(0xe3)](_0x2a9be1);return _0x107590[_0x34c561][_0x2068c3(0x8a)]=_0x2068c3(0xdc),writeFileSync(_0x4e8acc,JSON['stringify'](_0x107590,null,0x2)+'\x0a',_0x2068c3(0x66)),{'step':0x7,'label':_0x2068c3(0x77),'ok':!![],'detail':_0x34c561+_0x2068c3(0xd1)+_0x1a3ba7+'\x20→\x20latest'};}catch(_0x38ab6d){return{'step':0x7,'label':_0x2068c3(0x77),'ok':![],'detail':_0x38ab6d['message']};}}function tryStat(_0x26ae94){try{return statSync(_0x26ae94);}catch{return undefined;}}function printSummary(_0x3faa8c){const _0x2bf7c2=a172_0x4550b3;console[_0x2bf7c2(0x6d)](''),console[_0x2bf7c2(0x6d)](a172_0x2ee92d[_0x2bf7c2(0xa7)](_0x2bf7c2(0xd9))),console[_0x2bf7c2(0x6d)]('');for(const _0x291def of _0x3faa8c){const _0x4098e5=_0x291def['ok']?a172_0x2ee92d[_0x2bf7c2(0x72)]('OK'):a172_0x2ee92d[_0x2bf7c2(0xa9)]('FAIL');console[_0x2bf7c2(0x6d)]('\x20\x20'+_0x4098e5+'\x20\x20Step\x20'+_0x291def[_0x2bf7c2(0xb6)]+':\x20'+_0x291def['label']);if(_0x291def[_0x2bf7c2(0x96)])console[_0x2bf7c2(0x6d)]('\x20\x20\x20\x20\x20\x20\x20'+a172_0x2ee92d[_0x2bf7c2(0x8d)](_0x291def[_0x2bf7c2(0x96)]));}console['log']('');}export async function upgradeApp(_0x3e0cc8,_0x4e2aaf){const _0x4c2d7a=a172_0x4550b3,_0x428675=process['cwd'](),_0x4a9c88=analyse(_0x428675),_0x40cc36=!_0x4a9c88[_0x4c2d7a(0xba)]&&_0x4a9c88[_0x4c2d7a(0xe1)][_0x4c2d7a(0x98)]===0x0&&!_0x4a9c88['oldMcpConfig']&&!_0x4a9c88[_0x4c2d7a(0xac)]&&!_0x4a9c88[_0x4c2d7a(0xd3)];if(_0x40cc36){console[_0x4c2d7a(0x6d)](a172_0x2ee92d[_0x4c2d7a(0x72)](_0x4c2d7a(0xa8)));return;}printReport(_0x4a9c88);const _0x510379=!!(_0x4e2aaf[_0x4c2d7a(0x82)]||_0x4e2aaf['Y']||_0x3e0cc8);if(!_0x510379)try{const _0x5ad15e=await askConfirm(_0x4c2d7a(0x69));if(!_0x5ad15e){console[_0x4c2d7a(0x6d)](a172_0x2ee92d['gray']('Upgrade\x20cancelled.'));return;}}catch(_0x340bb7){if(_0x340bb7?.[_0x4c2d7a(0xd7)]===_0x4c2d7a(0x86)){console[_0x4c2d7a(0x6d)](a172_0x2ee92d[_0x4c2d7a(0x8d)](_0x4c2d7a(0x75)));return;}throw _0x340bb7;}const _0x43817d=[],_0x158ff3=a172_0x25aa45({'text':_0x4c2d7a(0xbb),'color':_0x4c2d7a(0xcc)})[_0x4c2d7a(0x78)](),_0x52b47c=execConfigMigration(_0x4a9c88,_0x428675);_0x43817d[_0x4c2d7a(0xbc)](_0x52b47c),_0x158ff3[_0x52b47c['ok']?_0x4c2d7a(0x99):_0x4c2d7a(0xc0)](_0x4c2d7a(0xce)+(_0x52b47c[_0x4c2d7a(0x96)]??(_0x52b47c['ok']?'done':_0x4c2d7a(0xc3))));const _0x15e171=resolve(_0x428675,_0x4c2d7a(0xcd)),_0x59d3d1=a172_0x25aa45({'text':_0x4c2d7a(0x7b),'color':_0x4c2d7a(0xcc)})[_0x4c2d7a(0x78)]();if(existsSync(_0x15e171))try{rmSync(_0x15e171,{'recursive':!![],'force':!![]}),_0x59d3d1[_0x4c2d7a(0x99)](_0x4c2d7a(0x80)),_0x43817d[_0x4c2d7a(0xbc)]({'step':0x2,'label':_0x4c2d7a(0x6a),'ok':!![]});}catch(_0x16a0c9){_0x59d3d1[_0x4c2d7a(0xc0)](_0x4c2d7a(0xbd)+_0x16a0c9['message']),_0x43817d[_0x4c2d7a(0xbc)]({'step':0x2,'label':_0x4c2d7a(0x6a),'ok':![],'detail':_0x16a0c9['message']});}else _0x59d3d1[_0x4c2d7a(0x83)](_0x4c2d7a(0xe5)),_0x43817d[_0x4c2d7a(0xbc)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![],'detail':_0x4c2d7a(0x81)});const _0x27124c=a172_0x25aa45({'text':_0x4c2d7a(0xa3),'color':_0x4c2d7a(0xcc)})[_0x4c2d7a(0x78)](),_0x3ff17a=execRemoveOldArtifacts(_0x4a9c88[_0x4c2d7a(0xe1)]);_0x43817d[_0x4c2d7a(0xbc)](_0x3ff17a),_0x27124c[_0x3ff17a['ok']?_0x4c2d7a(0x99):_0x4c2d7a(0xc0)](_0x4c2d7a(0xe2)+(_0x3ff17a[_0x4c2d7a(0x96)]??(_0x3ff17a['ok']?'done':'failed')));const _0x542ba1=a172_0x25aa45({'text':_0x4c2d7a(0x94),'color':_0x4c2d7a(0xcc)})['start'](),_0xa92f33=execCleanMcp(_0x4a9c88);_0x43817d[_0x4c2d7a(0xbc)](_0xa92f33),_0x542ba1[_0xa92f33['ok']?_0x4c2d7a(0x99):_0x4c2d7a(0xc0)]('Step\x204/7:\x20MCP\x20config\x20—\x20'+(_0xa92f33[_0x4c2d7a(0x96)]??(_0xa92f33['ok']?_0x4c2d7a(0xd2):_0x4c2d7a(0xc3))));const _0x52c98c=a172_0x25aa45({'text':_0x4c2d7a(0xde),'color':_0x4c2d7a(0xcc)})[_0x4c2d7a(0x78)](),_0x157473=execSkillsRemove(_0x428675,_0x510379);_0x43817d[_0x4c2d7a(0xbc)](_0x157473),_0x52c98c[_0x157473['ok']?'succeed':_0x4c2d7a(0xc0)](_0x4c2d7a(0xdb)+(_0x157473['detail']??(_0x157473['ok']?_0x4c2d7a(0xd2):'failed')));const _0x4ad823=a172_0x25aa45({'text':'Step\x206/7:\x20Installing\x20new\x20skill...','color':'cyan'})[_0x4c2d7a(0x78)](),_0x37f21b=execSkillsAdd(_0x428675,_0x510379);_0x43817d[_0x4c2d7a(0xbc)](_0x37f21b),_0x4ad823[_0x37f21b['ok']?'succeed':_0x4c2d7a(0xc0)]('Step\x206/7:\x20Install\x20new\x20skill\x20—\x20'+(_0x37f21b['detail']??(_0x37f21b['ok']?_0x4c2d7a(0xd2):_0x4c2d7a(0xc3))));const _0x232f02=a172_0x25aa45({'text':_0x4c2d7a(0xa5),'color':_0x4c2d7a(0xcc)})[_0x4c2d7a(0x78)](),_0x1c4980=execUpgradeSdk(_0x4a9c88);_0x43817d[_0x4c2d7a(0xbc)](_0x1c4980),_0x232f02[_0x1c4980['ok']?_0x4c2d7a(0x99):_0x4c2d7a(0xc0)](_0x4c2d7a(0x88)+(_0x1c4980['detail']??(_0x1c4980['ok']?_0x4c2d7a(0xd2):'failed'))),printSummary(_0x43817d);const _0x268834=_0x43817d[_0x4c2d7a(0x8c)](_0x36b4f3=>!_0x36b4f3['ok']);_0x268834?console[_0x4c2d7a(0x6d)](a172_0x2ee92d[_0x4c2d7a(0x74)](_0x4c2d7a(0x8b))):console['log'](a172_0x2ee92d[_0x4c2d7a(0x72)](_0x4c2d7a(0xa2))),_0x1c4980['ok']&&_0x4a9c88[_0x4c2d7a(0xd3)]&&(console[_0x4c2d7a(0x6d)](''),console[_0x4c2d7a(0x6d)](a172_0x2ee92d['bold'][_0x4c2d7a(0xcc)](_0x4c2d7a(0xe6))),console[_0x4c2d7a(0x6d)](a172_0x2ee92d[_0x4c2d7a(0xcc)](_0x4c2d7a(0xc6))),console[_0x4c2d7a(0x6d)](''),console[_0x4c2d7a(0x6d)](a172_0x2ee92d['white'](_0x4c2d7a(0xca))),console['log'](a172_0x2ee92d[_0x4c2d7a(0xc4)](_0x4c2d7a(0x9f))),console[_0x4c2d7a(0x6d)](a172_0x2ee92d[_0x4c2d7a(0xc4)]('\x20\x20bun\x20install')),console[_0x4c2d7a(0x6d)](''));}
1
+ function a172_0x1941(_0x2d10dd,_0x2f56f3){_0x2d10dd=_0x2d10dd-0x7d;const _0x2fd1b8=a172_0x2fd1();let _0x1941fa=_0x2fd1b8[_0x2d10dd];return _0x1941fa;}function a172_0x2fd1(){const _0x83218=['string','\x20→\x20latest','devDependencies','status','277812vWaGkC','cyan','lovrabet/rabetbase\x20installed\x20globally','skipped','\x20\x20Current\x20version\x20in\x20','Upgrade\x20cancelled.','Step\x206/7:\x20Installing\x20new\x20skill...','keys','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','Legacy\x20artifacts:','Config\x20migration','stringify','dependencies','Skill\x20swap:','info','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','fail','Step\x201/7:\x20Config\x20migration\x20—\x20','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','Upgrade\x20completed\x20successfully!','1490RctrAg','yellow','args','exit\x20','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','FAIL','isArray','1592553LGXDkp','entries','.lovrabet.json','some','===\x20Upgrade\x20Summary\x20===','error','succeed','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','\x20\x20bun\x20install','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','none\x20found','Config\x20file:','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','Remove\x20.lovrabet/','\x20\x20npm\x20install','Upgrade\x20@lovrabet/sdk','\x20→\x20','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','package.json','no\x20legacy\x20config\x20found','@lovrabet/sdk:','parse','.lovrabet','gray','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','label','oldArtifacts','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','bold','utf8','\x20→\x20keys:\x20','message','MCP\x20config:','.cursor/mcp.json','oldMcpConfig','CANCEL','join','not\x20needed','not\x20found\x20or\x20already\x20at\x20latest','inherit','path','Clean\x20MCP\x20config','\x20removed','isDirectory','lovrabet/rabetbase','log','.cursor/rules/lovrabet_rules.mdc','Proceed\x20with\x20upgrade?','sdkUpgrade','length','15EUwZnU','includes','[\x22@lovrabet/sdk\x22]:\x20','Step\x201/7:\x20Migrating\x20config...','166202WAWhzd','@lovrabet/sdk','\x20\x20Fields\x20to\x20migrate:\x20','\x20\x20#\x20or','mcpServers','white','442620QhXnTQ','start','943014KsCPfr','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','skipped\x20(no\x20legacy\x20config)','object','@lovrabet/dataset-mcp-server','done','push','detail','values','not\x20found\x20(will\x20create)','oldPath','66159skSArX','red','failed','Remove\x20legacy\x20artifacts','8ABjdPK','undefined','green','yes','fields','no\x20legacy\x20entry','configMigration','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','441525bLeRnX','files','already\x20exists\x20(will\x20merge)','\x20\x20New\x20config\x20(.rabetbase.json):\x20','\x20\x20Action:\x20delete','latest','hasNewConfig'];a172_0x2fd1=function(){return _0x83218;};return a172_0x2fd1();}const a172_0x5ca053=a172_0x1941;(function(_0x1648d3,_0x307ebb){const _0xf66929=a172_0x1941,_0x372569=_0x1648d3();while(!![]){try{const _0x5489d9=parseInt(_0xf66929(0x93))/0x1+parseInt(_0xf66929(0x9b))/0x2+parseInt(_0xf66929(0xda))/0x3+parseInt(_0xf66929(0xbd))/0x4*(parseInt(_0xf66929(0x8f))/0x5)+parseInt(_0xf66929(0x99))/0x6+-parseInt(_0xf66929(0xb2))/0x7*(parseInt(_0xf66929(0xaa))/0x8)+-parseInt(_0xf66929(0xa6))/0x9*(parseInt(_0xf66929(0xd3))/0xa);if(_0x5489d9===_0x307ebb)break;else _0x372569['push'](_0x372569['shift']());}catch(_0x5d7355){_0x372569['push'](_0x372569['shift']());}}}(a172_0x2fd1,0x475db));import a172_0x370e7a from'chalk';import a172_0x1d7a61 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=[a172_0x5ca053(0xdc),'.lovrabetrc'];function collectIdeSkillFiles(_0x27e0c4){const _0x494f2f=a172_0x5ca053,_0x3ed6c0=[];for(const _0x73aa37 of Object[_0x494f2f(0xa3)](CORE_IDE_CONFIGS)){if(_0x73aa37[_0x494f2f(0xb3)])for(const _0xe0e72e of _0x73aa37[_0x494f2f(0xb3)]){_0x3ed6c0[_0x494f2f(0xa1)](resolve(_0x27e0c4,_0xe0e72e[_0x494f2f(0x85)]));}}return _0x3ed6c0;}function analyse(_0x11ffb4){const _0x120c81=a172_0x5ca053;let _0x28a7f4=null;const _0x5c3e71=resolve(_0x11ffb4,NEW_CONFIG_NAME),_0x21fafe=existsSync(_0x5c3e71);for(const _0x1ee32d of LEGACY_CONFIG_NAMES){const _0x34a7c5=resolve(_0x11ffb4,_0x1ee32d);if(existsSync(_0x34a7c5)){const _0x535c27=readConfigFile(_0x34a7c5),_0x33c521=Object[_0x120c81(0xc4)](_0x535c27)['filter'](_0x482b67=>typeof _0x535c27[_0x482b67]!==_0x120c81(0xab));_0x28a7f4={'oldPath':_0x34a7c5,'hasNewConfig':_0x21fafe,'fields':_0x33c521};break;}}const _0x5ba2c1=[],_0x292fbd=resolve(_0x11ffb4,'.lovrabet');if(existsSync(_0x292fbd))_0x5ba2c1['push'](_0x292fbd);const _0x2f9911=resolve(_0x11ffb4,_0x120c81(0x8b));if(existsSync(_0x2f9911))_0x5ba2c1['push'](_0x2f9911);const _0x176fee=resolve(_0x11ffb4,'.claude/skills/lovrabet');if(existsSync(_0x176fee))_0x5ba2c1[_0x120c81(0xa1)](_0x176fee);for(const _0x33435f of collectIdeSkillFiles(_0x11ffb4)){if(existsSync(_0x33435f))_0x5ba2c1['push'](_0x33435f);}let _0xe755e2=null;const _0x5d6a1e=resolve(_0x11ffb4,_0x120c81(0x7e));if(existsSync(_0x5d6a1e))try{const _0x3f39c6=JSON[_0x120c81(0xef)](readFileSync(_0x5d6a1e,_0x120c81(0xf7)));if(_0x3f39c6?.[_0x120c81(0x97)]&&typeof _0x3f39c6[_0x120c81(0x97)]===_0x120c81(0x9e)){const _0x25be16=[];for(const [_0x203475,_0x1b621b]of Object[_0x120c81(0xdb)](_0x3f39c6[_0x120c81(0x97)])){const _0x265fdb=_0x1b621b;_0x265fdb?.[_0x120c81(0xd5)]&&Array[_0x120c81(0xd9)](_0x265fdb[_0x120c81(0xd5)])&&_0x265fdb['args'][_0x120c81(0xdd)](_0x53aefe=>typeof _0x53aefe===_0x120c81(0xb9)&&_0x53aefe[_0x120c81(0x90)](_0x120c81(0x9f)))&&_0x25be16[_0x120c81(0xa1)](_0x203475);}_0x25be16[_0x120c81(0x8e)]>0x0&&(_0xe755e2={'path':_0x5d6a1e,'keys':_0x25be16});}}catch{}const _0x16d8ce=_0x5ba2c1[_0x120c81(0x8e)]>0x0||_0x28a7f4!==null;let _0x7794b2=null;const _0x313b94=resolve(_0x11ffb4,_0x120c81(0xec));if(existsSync(_0x313b94))try{const _0x373930=JSON[_0x120c81(0xef)](readFileSync(_0x313b94,_0x120c81(0xf7)));for(const _0x57fda6 of[_0x120c81(0xca),_0x120c81(0xbb)]){const _0x2aaad6=_0x373930?.[_0x57fda6]?.[_0x120c81(0x94)];if(typeof _0x2aaad6===_0x120c81(0xb9)){_0x2aaad6!==_0x120c81(0xb7)&&(_0x7794b2={'pkgPath':_0x313b94,'currentVersion':_0x2aaad6,'field':_0x57fda6});break;}}}catch{}return{'configMigration':_0x28a7f4,'oldArtifacts':_0x5ba2c1,'oldMcpConfig':_0xe755e2,'needsSkillSwap':_0x16d8ce,'sdkUpgrade':_0x7794b2};}function printReport(_0x3c627b){const _0x11b84d=a172_0x5ca053,{configMigration:_0x5a27e0,oldArtifacts:_0x3e5c80,oldMcpConfig:_0x355f66,needsSkillSwap:_0x386b00}=_0x3c627b;console['log'](''),console[_0x11b84d(0x8a)](a172_0x370e7a[_0x11b84d(0xf6)]('===\x20Upgrade\x20Analysis\x20===')),console[_0x11b84d(0x8a)]('');_0x5a27e0?(console[_0x11b84d(0x8a)](a172_0x370e7a[_0x11b84d(0xbe)](_0x11b84d(0xe5))+('\x20\x20'+a172_0x370e7a[_0x11b84d(0xd4)](_0x5a27e0['oldPath']))),console[_0x11b84d(0x8a)](_0x11b84d(0xb5)+(_0x5a27e0['hasNewConfig']?a172_0x370e7a[_0x11b84d(0xac)](_0x11b84d(0xb4)):a172_0x370e7a['gray'](_0x11b84d(0xa4)))),console[_0x11b84d(0x8a)](_0x11b84d(0x95)+_0x5a27e0[_0x11b84d(0xae)][_0x11b84d(0x81)](',\x20')),console[_0x11b84d(0x8a)](_0x11b84d(0xd7))):console['log'](a172_0x370e7a[_0x11b84d(0xbe)](_0x11b84d(0xe5))+'\x20\x20'+a172_0x370e7a[_0x11b84d(0xf1)](_0x11b84d(0xed)));console[_0x11b84d(0x8a)]('');if(_0x3e5c80[_0x11b84d(0x8e)]>0x0){console[_0x11b84d(0x8a)](a172_0x370e7a['cyan'](_0x11b84d(0xc7)));for(const _0x31cdca of _0x3e5c80){console[_0x11b84d(0x8a)]('\x20\x20'+a172_0x370e7a['red']('FOUND')+'\x20\x20'+_0x31cdca);}console[_0x11b84d(0x8a)](_0x11b84d(0xb6));}else console[_0x11b84d(0x8a)](a172_0x370e7a['cyan'](_0x11b84d(0xc7))+'\x20\x20'+a172_0x370e7a['gray'](_0x11b84d(0xe4)));console['log']('');_0x355f66?(console[_0x11b84d(0x8a)](a172_0x370e7a[_0x11b84d(0xbe)]('MCP\x20config:')+('\x20\x20'+a172_0x370e7a['yellow'](_0x355f66[_0x11b84d(0x85)])+_0x11b84d(0xf8)+_0x355f66[_0x11b84d(0xc4)][_0x11b84d(0x81)](',\x20'))),console['log'](_0x11b84d(0xc6))):console[_0x11b84d(0x8a)](a172_0x370e7a['cyan'](_0x11b84d(0x7d))+'\x20\x20'+a172_0x370e7a[_0x11b84d(0xf1)](_0x11b84d(0xaf)));console['log'](''),console[_0x11b84d(0x8a)](a172_0x370e7a[_0x11b84d(0xbe)](_0x11b84d(0xcb))+('\x20\x20'+(_0x386b00?a172_0x370e7a[_0x11b84d(0xd4)]('needed'):a172_0x370e7a[_0x11b84d(0xac)](_0x11b84d(0x82)))));_0x386b00&&console[_0x11b84d(0x8a)]('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x11b84d(0x8a)]('');if(_0x3c627b[_0x11b84d(0x8d)]){const {currentVersion:_0x2fbad8,field:_0x3640e7,pkgPath:_0x5412ec}=_0x3c627b['sdkUpgrade'];console[_0x11b84d(0x8a)](a172_0x370e7a[_0x11b84d(0xbe)]('@lovrabet/sdk:')+('\x20\x20'+a172_0x370e7a[_0x11b84d(0xd4)](_0x5412ec))),console[_0x11b84d(0x8a)](_0x11b84d(0xc1)+_0x3640e7+':\x20'+a172_0x370e7a[_0x11b84d(0xd4)](_0x2fbad8)+_0x11b84d(0xea)+a172_0x370e7a[_0x11b84d(0xac)](_0x11b84d(0xb7))),console[_0x11b84d(0x8a)](_0x11b84d(0xe3));}else console[_0x11b84d(0x8a)](a172_0x370e7a[_0x11b84d(0xbe)](_0x11b84d(0xee))+'\x20\x20'+a172_0x370e7a[_0x11b84d(0xf1)](_0x11b84d(0x83)));console[_0x11b84d(0x8a)]('');}function execConfigMigration(_0x103432,_0x3522ce){const _0x4694d7=a172_0x5ca053,{configMigration:_0x4fe81d}=_0x103432;if(!_0x4fe81d?.['oldPath'])return{'step':0x1,'label':_0x4694d7(0xc8),'ok':!![],'detail':_0x4694d7(0x9d)};const _0x5e8712=readConfigFile(_0x4fe81d['oldPath']),_0x5e9c73=resolve(_0x3522ce,NEW_CONFIG_NAME),_0xe5ccef=_0x4fe81d[_0x4694d7(0xb8)]?readConfigFile(_0x5e9c73):{};for(const [_0xc70676,_0xe3c07c]of Object[_0x4694d7(0xdb)](_0x5e8712)){!(_0xc70676 in _0xe5ccef)&&(_0xe5ccef[_0xc70676]=_0xe3c07c);}writeConfigFile(_0x5e9c73,_0xe5ccef);const _0x5ad6f7=_0x4fe81d['oldPath']+'.bak';return renameSync(_0x4fe81d['oldPath'],_0x5ad6f7),{'step':0x1,'label':_0x4694d7(0xc8),'ok':!![],'detail':_0x4fe81d[_0x4694d7(0xa5)]+_0x4694d7(0xea)+_0x5e9c73+'\x20(backup:\x20'+_0x5ad6f7+')'};}function execRemoveOldArtifacts(_0x163055){const _0x232d2b=a172_0x5ca053,_0x4efe29=[];for(const _0x50d3e1 of _0x163055){try{if(!existsSync(_0x50d3e1))continue;const _0x1dc231=tryStat(_0x50d3e1);_0x1dc231?.[_0x232d2b(0x88)]()?rmSync(_0x50d3e1,{'recursive':!![],'force':!![]}):unlinkSync(_0x50d3e1);}catch(_0x4eb2fb){_0x4efe29[_0x232d2b(0xa1)](_0x50d3e1+':\x20'+_0x4eb2fb[_0x232d2b(0xf9)]);}}return{'step':0x3,'label':_0x232d2b(0xa9),'ok':_0x4efe29[_0x232d2b(0x8e)]===0x0,'detail':_0x4efe29['length']>0x0?_0x163055[_0x232d2b(0x8e)]-_0x4efe29[_0x232d2b(0x8e)]+'/'+_0x163055[_0x232d2b(0x8e)]+'\x20removed\x20('+_0x4efe29[_0x232d2b(0x81)](';\x20')+')':_0x163055[_0x232d2b(0x8e)]+_0x232d2b(0x87)};}function execCleanMcp(_0x202c1e){const _0x3be693=a172_0x5ca053;if(!_0x202c1e['oldMcpConfig'])return{'step':0x4,'label':_0x3be693(0x86),'ok':!![],'detail':_0x3be693(0xc0)};try{const _0x3b3069=readFileSync(_0x202c1e[_0x3be693(0x7f)][_0x3be693(0x85)],_0x3be693(0xf7)),_0x4965ef=JSON[_0x3be693(0xef)](_0x3b3069);if(_0x4965ef?.[_0x3be693(0x97)]&&typeof _0x4965ef[_0x3be693(0x97)]===_0x3be693(0x9e)){const _0x4c2c17=[];for(const [_0x1e2f0a,_0x4c31f3]of Object[_0x3be693(0xdb)](_0x4965ef[_0x3be693(0x97)])){_0x4c31f3?.[_0x3be693(0xd5)]&&Array['isArray'](_0x4c31f3[_0x3be693(0xd5)])&&_0x4c31f3[_0x3be693(0xd5)][_0x3be693(0xdd)](_0x22701f=>typeof _0x22701f==='string'&&_0x22701f[_0x3be693(0x90)]('@lovrabet/dataset-mcp-server'))&&_0x4c2c17['push'](_0x1e2f0a);}for(const _0x5e0c4d of _0x4c2c17){delete _0x4965ef[_0x3be693(0x97)][_0x5e0c4d];}return _0x4c2c17[_0x3be693(0x8e)]>0x0&&writeFileSync(_0x202c1e[_0x3be693(0x7f)]['path'],JSON[_0x3be693(0xc9)](_0x4965ef,null,0x2)+'\x0a',_0x3be693(0xf7)),{'step':0x4,'label':_0x3be693(0x86),'ok':!![],'detail':'removed\x20'+_0x4c2c17[_0x3be693(0x81)](',\x20')+'\x20from\x20'+_0x202c1e[_0x3be693(0x7f)][_0x3be693(0x85)]};}return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':'no\x20matching\x20entry\x20found'};}catch(_0x5554c4){return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':![],'detail':_0x5554c4[_0x3be693(0xf9)]};}}function execSkillsRemove(_0x13cda3,_0x28c9eb){const _0xd0bdfa=a172_0x5ca053,_0x28d890=runNpxSkillsRemove(_0x13cda3,{'stdio':'inherit','yes':_0x28c9eb});return{'step':0x5,'label':'Remove\x20old\x20skill','ok':_0x28d890['ok'],'detail':_0x28d890['ok']?'lovrabet/lovrabet-skill\x20removed':_0x28d890[_0xd0bdfa(0xdf)]??_0xd0bdfa(0xd6)+_0x28d890[_0xd0bdfa(0xbc)]};}function execSkillsAdd(_0x13d3d1,_0x3683af){const _0x408ec1=a172_0x5ca053,_0x358e7c=runNpxSkillsAddGlobal(_0x13d3d1,_0x408ec1(0x89),{'stdio':_0x408ec1(0x84),'yes':_0x3683af});return{'step':0x6,'label':'Install\x20new\x20skill','ok':_0x358e7c['ok'],'detail':_0x358e7c['ok']?_0x408ec1(0xbf):_0x358e7c[_0x408ec1(0xdf)]??_0x408ec1(0xd6)+_0x358e7c['status']};}function execUpgradeSdk(_0x268736){const _0x5d744e=a172_0x5ca053;if(!_0x268736[_0x5d744e(0x8d)])return{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0x5d744e(0xf5)};const {pkgPath:_0x3d3f89,currentVersion:_0x2c044a,field:_0x282226}=_0x268736[_0x5d744e(0x8d)];try{const _0xbbc48d=readFileSync(_0x3d3f89,_0x5d744e(0xf7)),_0x21e160=JSON[_0x5d744e(0xef)](_0xbbc48d);return _0x21e160[_0x282226][_0x5d744e(0x94)]=_0x5d744e(0xb7),writeFileSync(_0x3d3f89,JSON['stringify'](_0x21e160,null,0x2)+'\x0a',_0x5d744e(0xf7)),{'step':0x7,'label':_0x5d744e(0xe9),'ok':!![],'detail':_0x282226+_0x5d744e(0x91)+_0x2c044a+_0x5d744e(0xba)};}catch(_0x1d74d3){return{'step':0x7,'label':_0x5d744e(0xe9),'ok':![],'detail':_0x1d74d3['message']};}}function tryStat(_0x53c4a9){try{return statSync(_0x53c4a9);}catch{return undefined;}}function printSummary(_0x4adec5){const _0x270bf5=a172_0x5ca053;console['log'](''),console[_0x270bf5(0x8a)](a172_0x370e7a[_0x270bf5(0xf6)](_0x270bf5(0xde))),console['log']('');for(const _0x3f9098 of _0x4adec5){const _0x4897b7=_0x3f9098['ok']?a172_0x370e7a[_0x270bf5(0xac)]('OK'):a172_0x370e7a[_0x270bf5(0xa7)](_0x270bf5(0xd8));console[_0x270bf5(0x8a)]('\x20\x20'+_0x4897b7+'\x20\x20Step\x20'+_0x3f9098['step']+':\x20'+_0x3f9098[_0x270bf5(0xf3)]);if(_0x3f9098[_0x270bf5(0xa2)])console[_0x270bf5(0x8a)]('\x20\x20\x20\x20\x20\x20\x20'+a172_0x370e7a[_0x270bf5(0xf1)](_0x3f9098[_0x270bf5(0xa2)]));}console[_0x270bf5(0x8a)]('');}export async function upgradeApp(_0x20342d,_0x121c26){const _0x54adcc=a172_0x5ca053,_0x2b03c8=process['cwd'](),_0x265028=analyse(_0x2b03c8),_0x13f61f=!_0x265028[_0x54adcc(0xb0)]&&_0x265028[_0x54adcc(0xf4)][_0x54adcc(0x8e)]===0x0&&!_0x265028[_0x54adcc(0x7f)]&&!_0x265028['needsSkillSwap']&&!_0x265028[_0x54adcc(0x8d)];if(_0x13f61f){console['log'](a172_0x370e7a[_0x54adcc(0xac)]('No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.'));return;}printReport(_0x265028);const _0xe8b1c7=!!(_0x121c26[_0x54adcc(0xad)]||_0x121c26['Y']||_0x20342d);if(!_0xe8b1c7)try{const _0x408a6b=await askConfirm(_0x54adcc(0x8c));if(!_0x408a6b){console['log'](a172_0x370e7a[_0x54adcc(0xf1)]('Upgrade\x20cancelled.'));return;}}catch(_0x254fa8){if(_0x254fa8?.['message']===_0x54adcc(0x80)){console[_0x54adcc(0x8a)](a172_0x370e7a[_0x54adcc(0xf1)](_0x54adcc(0xc2)));return;}throw _0x254fa8;}const _0x24c442=[],_0x4f7bf4=a172_0x1d7a61({'text':_0x54adcc(0x92),'color':_0x54adcc(0xbe)})[_0x54adcc(0x9a)](),_0x35ca84=execConfigMigration(_0x265028,_0x2b03c8);_0x24c442[_0x54adcc(0xa1)](_0x35ca84),_0x4f7bf4[_0x35ca84['ok']?_0x54adcc(0xe0):_0x54adcc(0xce)](_0x54adcc(0xcf)+(_0x35ca84[_0x54adcc(0xa2)]??(_0x35ca84['ok']?'done':_0x54adcc(0xa8))));const _0x1afc13=resolve(_0x2b03c8,_0x54adcc(0xf0)),_0x1c1b64=a172_0x1d7a61({'text':_0x54adcc(0xeb),'color':'cyan'})[_0x54adcc(0x9a)]();if(existsSync(_0x1afc13))try{rmSync(_0x1afc13,{'recursive':!![],'force':!![]}),_0x1c1b64[_0x54adcc(0xe0)](_0x54adcc(0xb1)),_0x24c442['push']({'step':0x2,'label':_0x54adcc(0xe7),'ok':!![]});}catch(_0x3a8b2b){_0x1c1b64[_0x54adcc(0xce)](_0x54adcc(0xf2)+_0x3a8b2b[_0x54adcc(0xf9)]),_0x24c442['push']({'step':0x2,'label':'Remove\x20.lovrabet/','ok':![],'detail':_0x3a8b2b[_0x54adcc(0xf9)]});}else _0x1c1b64[_0x54adcc(0xcc)](_0x54adcc(0xd0)),_0x24c442['push']({'step':0x2,'label':_0x54adcc(0xe7),'ok':!![],'detail':'skipped'});const _0x9de9=a172_0x1d7a61({'text':_0x54adcc(0xe1),'color':_0x54adcc(0xbe)})[_0x54adcc(0x9a)](),_0x1fd96b=execRemoveOldArtifacts(_0x265028[_0x54adcc(0xf4)]);_0x24c442[_0x54adcc(0xa1)](_0x1fd96b),_0x9de9[_0x1fd96b['ok']?_0x54adcc(0xe0):_0x54adcc(0xce)]('Step\x203/7:\x20Legacy\x20artifacts\x20—\x20'+(_0x1fd96b['detail']??(_0x1fd96b['ok']?_0x54adcc(0xa0):_0x54adcc(0xa8))));const _0x79ff43=a172_0x1d7a61({'text':'Step\x204/7:\x20Cleaning\x20MCP\x20config...','color':_0x54adcc(0xbe)})[_0x54adcc(0x9a)](),_0x99a627=execCleanMcp(_0x265028);_0x24c442[_0x54adcc(0xa1)](_0x99a627),_0x79ff43[_0x99a627['ok']?_0x54adcc(0xe0):_0x54adcc(0xce)]('Step\x204/7:\x20MCP\x20config\x20—\x20'+(_0x99a627['detail']??(_0x99a627['ok']?_0x54adcc(0xa0):'failed')));const _0x3f8641=a172_0x1d7a61({'text':'Step\x205/7:\x20Removing\x20old\x20skill...','color':'cyan'})[_0x54adcc(0x9a)](),_0x59e0c8=execSkillsRemove(_0x2b03c8,_0xe8b1c7);_0x24c442['push'](_0x59e0c8),_0x3f8641[_0x59e0c8['ok']?'succeed':_0x54adcc(0xce)](_0x54adcc(0xc5)+(_0x59e0c8[_0x54adcc(0xa2)]??(_0x59e0c8['ok']?_0x54adcc(0xa0):'failed')));const _0x3a17ec=a172_0x1d7a61({'text':_0x54adcc(0xc3),'color':_0x54adcc(0xbe)})[_0x54adcc(0x9a)](),_0x155002=execSkillsAdd(_0x2b03c8,_0xe8b1c7);_0x24c442[_0x54adcc(0xa1)](_0x155002),_0x3a17ec[_0x155002['ok']?_0x54adcc(0xe0):_0x54adcc(0xce)](_0x54adcc(0xd1)+(_0x155002[_0x54adcc(0xa2)]??(_0x155002['ok']?_0x54adcc(0xa0):_0x54adcc(0xa8))));const _0x5a13d3=a172_0x1d7a61({'text':_0x54adcc(0xe6),'color':'cyan'})[_0x54adcc(0x9a)](),_0x259364=execUpgradeSdk(_0x265028);_0x24c442['push'](_0x259364),_0x5a13d3[_0x259364['ok']?'succeed':_0x54adcc(0xce)]('Step\x207/7:\x20@lovrabet/sdk\x20—\x20'+(_0x259364['detail']??(_0x259364['ok']?_0x54adcc(0xa0):_0x54adcc(0xa8)))),printSummary(_0x24c442);const _0x46fc32=_0x24c442[_0x54adcc(0xdd)](_0x1f3817=>!_0x1f3817['ok']);_0x46fc32?console[_0x54adcc(0x8a)](a172_0x370e7a[_0x54adcc(0xd4)](_0x54adcc(0x9c))):console[_0x54adcc(0x8a)](a172_0x370e7a[_0x54adcc(0xac)](_0x54adcc(0xd2))),_0x259364['ok']&&_0x265028[_0x54adcc(0x8d)]&&(console[_0x54adcc(0x8a)](''),console[_0x54adcc(0x8a)](a172_0x370e7a[_0x54adcc(0xf6)][_0x54adcc(0xbe)](_0x54adcc(0xcd))),console['log'](a172_0x370e7a[_0x54adcc(0xbe)]('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x54adcc(0x8a)](''),console[_0x54adcc(0x8a)](a172_0x370e7a[_0x54adcc(0x98)](_0x54adcc(0xe8))),console[_0x54adcc(0x8a)](a172_0x370e7a[_0x54adcc(0x98)](_0x54adcc(0x96))),console[_0x54adcc(0x8a)](a172_0x370e7a[_0x54adcc(0x98)](_0x54adcc(0xe2))),console[_0x54adcc(0x8a)](''));}
@@ -1 +1 @@
1
- function a173_0xae21(){const _0x582029=['commands','1747856VWkksM','permit:role-menus-set','\x20\x20[high-risk-write]','rabetbase\x20kb\x20update','rabetbase\x20run\x20build','filter','page:custom-create','login','app:remove','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','SQL\x20Queries','Runtime\x20App\x20Config\x20Management','`rabetbase\x20','Notification\x20Configuration','wildcardDef','app:remote','Async\x20Tasks','rabetbase\x20page\x20custom-detail','Tenant\x20Members','2973642jXeSbS','menu:update','rabetbase\x20page\x20custom-list','API\x20Development','map','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','data:getOne','role:create','skills:install','rabetbase\x20cli-skill\x20install','from','create','rabetbase\x20app\x20list\x20--remote','Schema','get','rabetbase\x20workspace\x20remove\x20<name>','8886CSsUnZ','rabetbase\x20run\x20start','knowledge-base:detail','Company\x20Knowledge\x20Base','page:react-create','rabetbase\x20project\x20create\x20<project-name>','preview','1135281WbjDOm','App\x20Management','Self\x20Update','skill:','page:react-detail','data:filter','bff:new','Backend\x20Function\x20Scripts','Logs','push','1275112EvVEtV','build','rabetbase\x20page\x20custom-update','rabetbase\x20kb\x20list','Run\x20any\x20package.json\x20script','rabetbase\x20menu\x20asset-update','Authentication','sql:new','rabetbase\x20run\x20preview','page:react-update','isSingleCommand','set','<script>','`\x20instead.','111922BOoyUR','knowledge-base:update','`\x20has\x20been\x20removed.','User\x20Accounts','rabetbase\x20role\x20list','Workspace','values','page:react-list','Menu','page:standard-page-status','knowledge-base:create','risk','install','6557661xoqUSC','permit:role-menus','sql:save','rabetbase\x20kb\x20delete','rabetbase\x20bff\x20create','command','start','Data\x20List\x20Pages\x20&\x20Custom\x20Pages','\x20\x20[','rabetbase\x20sql\x20create','Database\x20Connections','page:react-publish','permit:page-get','7dLewUI','Use\x20`','\x20\x20[write]','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','service','has','rabetbase\x20auth\x20logout','rabetbase\x20kb\x20detail','110WtcZHs','permit:role-apis-set','knowledge-base:delete'];a173_0xae21=function(){return _0x582029;};return a173_0xae21();}const a173_0x57d15a=a173_0x58db;(function(_0xbc401,_0x5d045c){const _0x13f2b3=a173_0x58db,_0x52229b=_0xbc401();while(!![]){try{const _0x41cb67=-parseInt(_0x13f2b3(0xc6))/0x1*(-parseInt(_0x13f2b3(0xac))/0x2)+-parseInt(_0x13f2b3(0xfc))/0x3+parseInt(_0x13f2b3(0x9e))/0x4+parseInt(_0x13f2b3(0xce))/0x5*(-parseInt(_0x13f2b3(0xf5))/0x6)+parseInt(_0x13f2b3(0xe5))/0x7+parseInt(_0x13f2b3(0xd2))/0x8+-parseInt(_0x13f2b3(0xb9))/0x9;if(_0x41cb67===_0x5d045c)break;else _0x52229b['push'](_0x52229b['shift']());}catch(_0x502aea){_0x52229b['push'](_0x52229b['shift']());}}}(a173_0xae21,0x3448b));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dbDefinitions}from'../commands/db/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{taskDefinitions}from'../commands/task/index.js';import{tenantDefinitions}from'../commands/tenant/index.js';import{roleDefinitions}from'../commands/role/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{fileDefinitions}from'../commands/file/index.js';function a173_0x58db(_0x3aaf50,_0x453959){_0x3aaf50=_0x3aaf50-0x9c;const _0xae21f6=a173_0xae21();let _0x58db7f=_0xae21f6[_0x3aaf50];return _0x58db7f;}import{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{userAccountDefinitions}from'../commands/user-account/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x360da1){const _0x5422f4=a173_0x58db;for(const _0x280894 of _0x360da1){definitions[_0x5422f4(0xa9)](_0x280894[_0x5422f4(0xca)]+':'+_0x280894['command'],_0x280894);let _0x1f4b2d=serviceGroups[_0x5422f4(0xf3)](_0x280894[_0x5422f4(0xca)]);!_0x1f4b2d&&(_0x1f4b2d=[],serviceGroups['set'](_0x280894[_0x5422f4(0xca)],_0x1f4b2d)),_0x1f4b2d[_0x5422f4(0x9d)](_0x280894);}}function registerDeclarativeService(_0x102076,_0xec1f1a,_0x9f47bf){const _0x24c6a6=a173_0x58db;registerDefinitions(_0xec1f1a);_0x9f47bf?.['wildcardDef']&&registerDefinitions([_0x9f47bf['wildcardDef']]);const _0x21b334=_0x397805=>_0x397805==='read'?'':_0x397805==='write'?_0x24c6a6(0xc8):_0x24c6a6(0xd4),_0x1903c3={'service':_0xec1f1a[0x0][_0x24c6a6(0xca)],'label':_0x102076,'commands':_0xec1f1a[_0x24c6a6(0xd7)](_0x4ca1e4=>!_0x4ca1e4['hidden'])[_0x24c6a6(0xe9)](_0x4a987a=>({'command':_0x4a987a[_0x24c6a6(0xbe)],'description':_0x4a987a['description'],'tag':_0x21b334(_0x4a987a[_0x24c6a6(0xb7)])})),'declarative':!![],'defaultCommand':_0x9f47bf?.['defaultCommand']??(_0x9f47bf?.[_0x24c6a6(0xa8)]?_0xec1f1a[0x0][_0x24c6a6(0xbe)]:undefined),'wildcardDef':_0x9f47bf?.['wildcardDef'],'isSingleCommand':_0x9f47bf?.[_0x24c6a6(0xa8)]};serviceRegistry['push'](_0x1903c3),serviceByName[_0x24c6a6(0xa9)](_0x1903c3[_0x24c6a6(0xca)],_0x1903c3);}registerDeclarativeService('Project',projectDefinitions),registerDeclarativeService(a173_0x57d15a(0xb1),workspaceDefinitions),registerDeclarativeService(a173_0x57d15a(0xfd),appDefinitions),registerDeclarativeService(a173_0x57d15a(0xa4),authDefinitions,{'defaultCommand':a173_0x57d15a(0xd9)}),registerDeclarativeService(a173_0x57d15a(0xe4),tenantDefinitions),registerDeclarativeService(a173_0x57d15a(0xaf),userAccountDefinitions),registerDeclarativeService('Dataset\x20&\x20Operations',datasetDefinitions),registerDeclarativeService(a173_0x57d15a(0xc0),pageDefinitions),registerDeclarativeService(a173_0x57d15a(0xe8),apiDefinitions),registerDeclarativeService(a173_0x57d15a(0x103),bffDefinitions),registerDeclarativeService(a173_0x57d15a(0xdf),notificationDefinitions),registerDeclarativeService(a173_0x57d15a(0xdc),sqlDefinitions),registerDeclarativeService(a173_0x57d15a(0xc3),dbDefinitions),registerDeclarativeService(a173_0x57d15a(0xb4),menuDefinitions),registerDeclarativeService(a173_0x57d15a(0xe2),taskDefinitions),registerDeclarativeService('Roles',roleDefinitions),registerDeclarativeService(a173_0x57d15a(0xdd),appConfigDefinitions),registerDeclarativeService(a173_0x57d15a(0xf8),kbDefinitions),registerDeclarativeService('Platform\x20Issue',issueDefinitions),registerDeclarativeService('File',fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService('Configuration',configDefinitions),registerDeclarativeService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a173_0x57d15a(0xf2),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a173_0x57d15a(0xfe),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':a173_0x57d15a(0xb8)}),registerDeclarativeService(a173_0x57d15a(0x9c),logsDefinitions,{'defaultCommand':'show'}),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry['length']-0x1];last[a173_0x57d15a(0xd1)]=[{'command':a173_0x57d15a(0xaa),'description':a173_0x57d15a(0xa2),'tag':a173_0x57d15a(0xc1)+runDefinition[a173_0x57d15a(0xb7)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a173_0x57d15a(0xbb),'rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml'],[a173_0x57d15a(0x102),a173_0x57d15a(0xbd)],[a173_0x57d15a(0xa5),a173_0x57d15a(0xc2)],[a173_0x57d15a(0xe6),a173_0x57d15a(0xa3)],['project:init','rabetbase\x20workspace\x20init\x20--appcode\x20<code>'],[a173_0x57d15a(0xff),a173_0x57d15a(0xee)],['skill:install',a173_0x57d15a(0xee)],['skills:',a173_0x57d15a(0xee)],[a173_0x57d15a(0xed),a173_0x57d15a(0xee)],[a173_0x57d15a(0xe1),a173_0x57d15a(0xf1)],['app:use','rabetbase\x20workspace\x20use\x20--app\x20<name>'],['app:add',a173_0x57d15a(0xdb)],[a173_0x57d15a(0xda),a173_0x57d15a(0xf4)],['knowledge-base:list',a173_0x57d15a(0xa1)],[a173_0x57d15a(0xf7),a173_0x57d15a(0xcd)],[a173_0x57d15a(0xb6),'rabetbase\x20kb\x20create'],[a173_0x57d15a(0xad),a173_0x57d15a(0xd5)],[a173_0x57d15a(0xd0),a173_0x57d15a(0xbc)],[a173_0x57d15a(0xec),a173_0x57d15a(0xb0)],[a173_0x57d15a(0x101),'lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27'],[a173_0x57d15a(0xeb),'lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27'],[a173_0x57d15a(0xb5),'rabetbase\x20page\x20data-list-status'],[a173_0x57d15a(0xf9),'rabetbase\x20page\x20create\x20--page-pattern\x20BLANK'],[a173_0x57d15a(0xd8),a173_0x57d15a(0xea)],[a173_0x57d15a(0xb3),a173_0x57d15a(0xe7)],[a173_0x57d15a(0x100),a173_0x57d15a(0xe3)],[a173_0x57d15a(0xa7),a173_0x57d15a(0xa0)],[a173_0x57d15a(0xc4),'rabetbase\x20page\x20custom-publish']]),REMOVED_COMMAND_HINTS=new Map([[a173_0x57d15a(0xc5),a173_0x57d15a(0xc9)],['permit:page-set','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a173_0x57d15a(0xba),a173_0x57d15a(0xc9)],[a173_0x57d15a(0xd3),a173_0x57d15a(0xc9)],[a173_0x57d15a(0xcf),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.']]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a173_0x57d15a(0xf0),a173_0x57d15a(0xfa)],[a173_0x57d15a(0xbf),a173_0x57d15a(0xf6)],[a173_0x57d15a(0x9f),a173_0x57d15a(0xd6)],[a173_0x57d15a(0xfb),a173_0x57d15a(0xa6)],['logout',a173_0x57d15a(0xcc)]]);export function resolveRemovedCommand(_0x2f3d42,_0x2ca79f){const _0x2a3d16=a173_0x57d15a;if(!_0x2f3d42)return undefined;const _0x1d3087=REMOVED_COMMAND_REPLACEMENTS[_0x2a3d16(0xf3)](_0x2f3d42+':'+(_0x2ca79f??'')),_0x4ce60c=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x2a3d16(0xf3)](_0x2f3d42),_0x5ef7e0=_0x1d3087??_0x4ce60c,_0x1fdc70=REMOVED_COMMAND_HINTS['get'](_0x2f3d42+':'+(_0x2ca79f??''));if(!_0x5ef7e0&&!_0x1fdc70)return undefined;const _0x40b39e=_0x4ce60c?_0x2f3d42:_0x2ca79f?_0x2f3d42+'\x20'+_0x2ca79f:_0x2f3d42;return{'command':_0x40b39e,'message':_0x2a3d16(0xde)+_0x40b39e+_0x2a3d16(0xae),'hint':_0x1fdc70??_0x2a3d16(0xc7)+_0x5ef7e0+_0x2a3d16(0xab)};}export function findDefinition(_0x748243,_0x28a9c5){return definitions['get'](_0x748243+':'+_0x28a9c5);}export function isKnownService(_0x150634){const _0x2c5539=a173_0x57d15a;return serviceByName[_0x2c5539(0xcb)](_0x150634);}export function isDeclarativeService(_0x542374){const _0x40989e=a173_0x57d15a;return serviceGroups['has'](_0x542374)||serviceByName[_0x40989e(0xf3)](_0x542374)?.[_0x40989e(0xe0)]!==undefined;}export function getServiceEntry(_0x22c5cf){const _0x11db4f=a173_0x57d15a;return serviceByName[_0x11db4f(0xf3)](_0x22c5cf);}export function getLegacyHandler(_0x5ef0c7,_0x335bc3){return undefined;}export function getAllDefinitions(){const _0x2382db=a173_0x57d15a;return Array[_0x2382db(0xef)](definitions[_0x2382db(0xb2)]());}
1
+ const a173_0x7ddb8b=a173_0x30b4;(function(_0x38432a,_0x5e0554){const _0x43ccd7=a173_0x30b4,_0x584b91=_0x38432a();while(!![]){try{const _0x297877=-parseInt(_0x43ccd7(0x1ee))/0x1*(parseInt(_0x43ccd7(0x1b9))/0x2)+parseInt(_0x43ccd7(0x199))/0x3*(-parseInt(_0x43ccd7(0x1c0))/0x4)+parseInt(_0x43ccd7(0x1c6))/0x5*(parseInt(_0x43ccd7(0x1e7))/0x6)+parseInt(_0x43ccd7(0x1de))/0x7*(-parseInt(_0x43ccd7(0x18c))/0x8)+-parseInt(_0x43ccd7(0x1df))/0x9+parseInt(_0x43ccd7(0x1c9))/0xa*(-parseInt(_0x43ccd7(0x1bb))/0xb)+parseInt(_0x43ccd7(0x1e1))/0xc*(parseInt(_0x43ccd7(0x1a8))/0xd);if(_0x297877===_0x5e0554)break;else _0x584b91['push'](_0x584b91['shift']());}catch(_0x2299c6){_0x584b91['push'](_0x584b91['shift']());}}}(a173_0x18c1,0x1b1b1));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dbDefinitions}from'../commands/db/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{taskDefinitions}from'../commands/task/index.js';import{tenantDefinitions}from'../commands/tenant/index.js';import{roleDefinitions}from'../commands/role/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{userAccountDefinitions}from'../commands/user-account/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x4538ea){const _0x406370=a173_0x30b4;for(const _0x53a49d of _0x4538ea){definitions[_0x406370(0x1b3)](_0x53a49d[_0x406370(0x1cc)]+':'+_0x53a49d['command'],_0x53a49d);let _0x28aefb=serviceGroups[_0x406370(0x1a1)](_0x53a49d[_0x406370(0x1cc)]);!_0x28aefb&&(_0x28aefb=[],serviceGroups[_0x406370(0x1b3)](_0x53a49d[_0x406370(0x1cc)],_0x28aefb)),_0x28aefb['push'](_0x53a49d);}}function registerDeclarativeService(_0x3a0b77,_0x5b0c69,_0x3c0b32){const _0x50f766=a173_0x30b4;registerDefinitions(_0x5b0c69);_0x3c0b32?.[_0x50f766(0x18f)]&&registerDefinitions([_0x3c0b32['wildcardDef']]);const _0xa861c3=_0x434bd7=>_0x434bd7===_0x50f766(0x197)?'':_0x434bd7===_0x50f766(0x1c1)?'\x20\x20[write]':'\x20\x20[high-risk-write]',_0x3516d7={'service':_0x5b0c69[0x0][_0x50f766(0x1cc)],'label':_0x3a0b77,'commands':_0x5b0c69[_0x50f766(0x1f2)](_0x22150a=>!_0x22150a[_0x50f766(0x18d)])[_0x50f766(0x1d8)](_0x3e0605=>({'command':_0x3e0605[_0x50f766(0x1eb)],'description':_0x3e0605['description'],'tag':_0xa861c3(_0x3e0605[_0x50f766(0x1f1)])})),'declarative':!![],'defaultCommand':_0x3c0b32?.['defaultCommand']??(_0x3c0b32?.[_0x50f766(0x1d2)]?_0x5b0c69[0x0][_0x50f766(0x1eb)]:undefined),'wildcardDef':_0x3c0b32?.[_0x50f766(0x18f)],'isSingleCommand':_0x3c0b32?.[_0x50f766(0x1d2)]};serviceRegistry[_0x50f766(0x1d7)](_0x3516d7),serviceByName[_0x50f766(0x1b3)](_0x3516d7[_0x50f766(0x1cc)],_0x3516d7);}registerDeclarativeService(a173_0x7ddb8b(0x1ca),projectDefinitions),registerDeclarativeService('Workspace',workspaceDefinitions),registerDeclarativeService(a173_0x7ddb8b(0x1bc),appDefinitions),registerDeclarativeService('Authentication',authDefinitions,{'defaultCommand':a173_0x7ddb8b(0x19a)}),registerDeclarativeService(a173_0x7ddb8b(0x18b),tenantDefinitions),registerDeclarativeService('User\x20Accounts',userAccountDefinitions),registerDeclarativeService(a173_0x7ddb8b(0x1ba),datasetDefinitions),registerDeclarativeService(a173_0x7ddb8b(0x1e2),pageDefinitions),registerDeclarativeService(a173_0x7ddb8b(0x1a5),apiDefinitions),registerDeclarativeService('Backend\x20Function\x20Scripts',bffDefinitions),registerDeclarativeService(a173_0x7ddb8b(0x1cb),notificationDefinitions),registerDeclarativeService(a173_0x7ddb8b(0x1be),sqlDefinitions),registerDeclarativeService(a173_0x7ddb8b(0x1e8),dbDefinitions),registerDeclarativeService(a173_0x7ddb8b(0x1f5),menuDefinitions),registerDeclarativeService('Async\x20Tasks',taskDefinitions),registerDeclarativeService(a173_0x7ddb8b(0x1e6),roleDefinitions),registerDeclarativeService(a173_0x7ddb8b(0x1d9),appConfigDefinitions),registerDeclarativeService('Company\x20Knowledge\x20Base',kbDefinitions),registerDeclarativeService('Platform\x20Issue',issueDefinitions),registerDeclarativeService(a173_0x7ddb8b(0x1a9),fileDefinitions),registerDeclarativeService('OCR',ocrDefinitions),registerDeclarativeService(a173_0x7ddb8b(0x1db),codegenDefinitions),registerDeclarativeService(a173_0x7ddb8b(0x1a2),configDefinitions),registerDeclarativeService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a173_0x7ddb8b(0x1d5),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a173_0x7ddb8b(0x1d0),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a173_0x7ddb8b(0x19e),cliSkillDefinitions,{'defaultCommand':a173_0x7ddb8b(0x1d4)}),registerDeclarativeService(a173_0x7ddb8b(0x1aa),logsDefinitions,{'defaultCommand':'show'}),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a173_0x7ddb8b(0x19f)]-0x1];last[a173_0x7ddb8b(0x193)]=[{'command':a173_0x7ddb8b(0x1d6),'description':'Run\x20any\x20package.json\x20script','tag':a173_0x7ddb8b(0x1c4)+runDefinition[a173_0x7ddb8b(0x1f1)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a173_0x7ddb8b(0x1c5),a173_0x7ddb8b(0x1ce)],['bff:new','rabetbase\x20bff\x20create'],[a173_0x7ddb8b(0x196),a173_0x7ddb8b(0x1a0)],[a173_0x7ddb8b(0x1e9),'rabetbase\x20menu\x20asset-update'],[a173_0x7ddb8b(0x1e4),a173_0x7ddb8b(0x1b7)],[a173_0x7ddb8b(0x1ac),a173_0x7ddb8b(0x1cd)],[a173_0x7ddb8b(0x194),a173_0x7ddb8b(0x1cd)],['skills:',a173_0x7ddb8b(0x1cd)],[a173_0x7ddb8b(0x1b5),a173_0x7ddb8b(0x1cd)],[a173_0x7ddb8b(0x1a4),a173_0x7ddb8b(0x1d1)],[a173_0x7ddb8b(0x18e),'rabetbase\x20workspace\x20use\x20--app\x20<name>'],[a173_0x7ddb8b(0x19b),a173_0x7ddb8b(0x1f6)],[a173_0x7ddb8b(0x1b1),a173_0x7ddb8b(0x1b2)],['knowledge-base:list',a173_0x7ddb8b(0x1dc)],['knowledge-base:detail',a173_0x7ddb8b(0x1bf)],[a173_0x7ddb8b(0x1b4),'rabetbase\x20kb\x20create'],['knowledge-base:update','rabetbase\x20kb\x20update'],[a173_0x7ddb8b(0x1b8),'rabetbase\x20kb\x20delete'],[a173_0x7ddb8b(0x191),'rabetbase\x20role\x20list'],[a173_0x7ddb8b(0x1ed),a173_0x7ddb8b(0x1e5)],[a173_0x7ddb8b(0x1c8),a173_0x7ddb8b(0x1af)],[a173_0x7ddb8b(0x1b0),a173_0x7ddb8b(0x1a7)],[a173_0x7ddb8b(0x1ef),'rabetbase\x20page\x20create\x20--page-pattern\x20BLANK'],[a173_0x7ddb8b(0x195),'rabetbase\x20page\x20create\x20--page-pattern\x20BLANK'],[a173_0x7ddb8b(0x19c),a173_0x7ddb8b(0x1ab)],[a173_0x7ddb8b(0x1e0),a173_0x7ddb8b(0x1ae)],[a173_0x7ddb8b(0x1ec),a173_0x7ddb8b(0x1ea)],[a173_0x7ddb8b(0x1f3),'rabetbase\x20page\x20custom-publish']]),REMOVED_COMMAND_HINTS=new Map([['permit:page-get','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a173_0x7ddb8b(0x1c2),a173_0x7ddb8b(0x192)],[a173_0x7ddb8b(0x19d),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a173_0x7ddb8b(0x1dd),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a173_0x7ddb8b(0x1da),a173_0x7ddb8b(0x192)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([['create',a173_0x7ddb8b(0x1b6)],[a173_0x7ddb8b(0x1a3),a173_0x7ddb8b(0x190)],[a173_0x7ddb8b(0x1bd),'rabetbase\x20run\x20build'],[a173_0x7ddb8b(0x1c7),a173_0x7ddb8b(0x1f4)],[a173_0x7ddb8b(0x1a6),a173_0x7ddb8b(0x1e3)]]);function a173_0x30b4(_0x3b539b,_0x130dcd){_0x3b539b=_0x3b539b-0x18b;const _0x18c118=a173_0x18c1();let _0x30b4f3=_0x18c118[_0x3b539b];return _0x30b4f3;}export function resolveRemovedCommand(_0x2cb0f4,_0x1093a8){const _0x30799e=a173_0x7ddb8b;if(!_0x2cb0f4)return undefined;const _0xe32b4d=REMOVED_COMMAND_REPLACEMENTS[_0x30799e(0x1a1)](_0x2cb0f4+':'+(_0x1093a8??'')),_0x568991=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x30799e(0x1a1)](_0x2cb0f4),_0x379fe5=_0xe32b4d??_0x568991,_0x3a2163=REMOVED_COMMAND_HINTS[_0x30799e(0x1a1)](_0x2cb0f4+':'+(_0x1093a8??''));if(!_0x379fe5&&!_0x3a2163)return undefined;const _0x321b99=_0x568991?_0x2cb0f4:_0x1093a8?_0x2cb0f4+'\x20'+_0x1093a8:_0x2cb0f4;return{'command':_0x321b99,'message':_0x30799e(0x1c3)+_0x321b99+_0x30799e(0x1ad),'hint':_0x3a2163??_0x30799e(0x198)+_0x379fe5+_0x30799e(0x1f0)};}export function findDefinition(_0x196056,_0x3fea8f){const _0x5934f4=a173_0x7ddb8b;return definitions[_0x5934f4(0x1a1)](_0x196056+':'+_0x3fea8f);}export function isKnownService(_0x36a0a8){const _0xf705fc=a173_0x7ddb8b;return serviceByName[_0xf705fc(0x1d3)](_0x36a0a8);}export function isDeclarativeService(_0xd81e2e){const _0x317104=a173_0x7ddb8b;return serviceGroups[_0x317104(0x1d3)](_0xd81e2e)||serviceByName[_0x317104(0x1a1)](_0xd81e2e)?.['wildcardDef']!==undefined;}export function getServiceEntry(_0x5d1925){const _0xb86810=a173_0x7ddb8b;return serviceByName[_0xb86810(0x1a1)](_0x5d1925);}function a173_0x18c1(){const _0x373386=['rabetbase\x20auth\x20logout','project:init','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','Roles','560148NveuOb','Database\x20Connections','menu:update','rabetbase\x20page\x20custom-update','command','page:react-update','data:filter','12LwYwke','page:react-create','`\x20instead.','risk','filter','page:react-publish','rabetbase\x20run\x20preview','Menu','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','Tenant\x20Members','64bHAyua','hidden','app:use','wildcardDef','rabetbase\x20run\x20start','role:create','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','commands','skill:install','page:custom-create','sql:new','read','Use\x20`','282762cvnvcB','login','app:add','page:react-list','permit:role-menus','CLI\x20Built-in\x20Skill','length','rabetbase\x20sql\x20create','get','Configuration','start','app:remote','API\x20Development','logout','rabetbase\x20page\x20data-list-status','8749ELLIVy','File','Logs','rabetbase\x20page\x20custom-list','skill:','`\x20has\x20been\x20removed.','rabetbase\x20page\x20custom-detail','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','page:standard-page-status','app:remove','rabetbase\x20workspace\x20remove\x20<name>','set','knowledge-base:create','skills:install','rabetbase\x20project\x20create\x20<project-name>','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','knowledge-base:delete','13686AjAZvz','Dataset\x20&\x20Operations','798061ihNLcf','App\x20Management','build','SQL\x20Queries','rabetbase\x20kb\x20detail','4omvBQe','write','permit:page-set','`rabetbase\x20','\x20\x20[','sql:save','5QrZrPn','preview','data:getOne','10jzlyDH','Project','Notification\x20Configuration','service','rabetbase\x20cli-skill\x20install','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','values','Self\x20Update','rabetbase\x20app\x20list\x20--remote','isSingleCommand','has','install','Schema','<script>','push','map','Runtime\x20App\x20Config\x20Management','permit:role-apis-set','Code\x20Generation','rabetbase\x20kb\x20list','permit:role-menus-set','189903XAtcuF','1092663hcUnbx','page:react-detail','10788SBbXXK','Data\x20List\x20Pages\x20&\x20Custom\x20Pages'];a173_0x18c1=function(){return _0x373386;};return a173_0x18c1();}export function getLegacyHandler(_0x467e88,_0x264626){return undefined;}export function getAllDefinitions(){const _0x44bffb=a173_0x7ddb8b;return Array['from'](definitions[_0x44bffb(0x1cf)]());}