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

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
- 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
+ const a164_0x24f6f0=a164_0x1b8e;(function(_0x3816dd,_0x2f1e4d){const _0x40034e=a164_0x1b8e,_0x55e3ed=_0x3816dd();while(!![]){try{const _0x372fff=parseInt(_0x40034e(0x146))/0x1+parseInt(_0x40034e(0x16a))/0x2*(-parseInt(_0x40034e(0x175))/0x3)+parseInt(_0x40034e(0x137))/0x4+-parseInt(_0x40034e(0x159))/0x5+-parseInt(_0x40034e(0x150))/0x6+parseInt(_0x40034e(0x12c))/0x7*(parseInt(_0x40034e(0x130))/0x8)+-parseInt(_0x40034e(0x13e))/0x9*(-parseInt(_0x40034e(0x160))/0xa);if(_0x372fff===_0x2f1e4d)break;else _0x55e3ed['push'](_0x55e3ed['shift']());}catch(_0x1fe844){_0x55e3ed['push'](_0x55e3ed['shift']());}}}(a164_0x37ea,0xd7923));import{createHash}from'node:crypto';import a164_0x1f8e99 from'node:fs/promises';import a164_0x3d3f9a from'node:path';function a164_0x1b8e(_0x5a23fe,_0x2a19d3){_0x5a23fe=_0x5a23fe-0x10c;const _0x37ea07=a164_0x37ea();let _0x1b8e1d=_0x37ea07[_0x5a23fe];return _0x1b8e1d;}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(_0x31b7ed){const _0x435ec3=a164_0x1b8e;return typeof _0x31b7ed==='string'&&_0x31b7ed[_0x435ec3(0x148)]()?_0x31b7ed[_0x435ec3(0x148)]():null;}function parseDescriptor(_0x2824e){const _0x5b8bff=a164_0x1b8e;if(!_0x2824e||typeof _0x2824e!==_0x5b8bff(0x136))throw new Error(_0x5b8bff(0x17d)+TEMPLATE_ID+'\x22.');const _0x5b4910=_0x2824e,_0x22651c=nonEmptyString(_0x5b4910['version']),_0x3dcf84=nonEmptyString(_0x5b4910[_0x5b8bff(0x154)]),_0x103703=nonEmptyString(_0x5b4910['sha256'])?.[_0x5b8bff(0x179)](),_0x5d93a0=_0x5b4910[_0x5b8bff(0x13a)];if(!_0x22651c||!_0x3dcf84||_0x3dcf84!==a164_0x3d3f9a[_0x5b8bff(0x127)][_0x5b8bff(0x14a)](_0x3dcf84)||_0x3dcf84[_0x5b8bff(0x131)]('\x5c')||!_0x103703||!/^sha256:[a-f0-9]{64}$/[_0x5b8bff(0x164)](_0x103703)||typeof _0x5d93a0!==_0x5b8bff(0x172)||!Number[_0x5b8bff(0x125)](_0x5d93a0)||_0x5d93a0<=0x0||_0x5d93a0>MAX_ARCHIVE_SIZE)throw new Error(_0x5b8bff(0x170)+TEMPLATE_ID+'\x22.');return{'version':_0x22651c,'name':_0x3dcf84,'sha256':_0x103703,'size':_0x5d93a0};}async function fetchWithTimeout(_0x2b10d4,_0x1c43b4,_0x15aad3,_0x263360){const _0x3d00e5=a164_0x1b8e,_0x255093=new AbortController(),_0x213920=setTimeout(()=>_0x255093[_0x3d00e5(0x155)](),_0x1c43b4);try{const _0x3bea62=await fetch(_0x2b10d4,{'headers':{'Accept':_0x15aad3},'signal':_0x255093['signal']});return await _0x263360(_0x3bea62);}finally{clearTimeout(_0x213920);}}async function fetchTemplateDescriptor(){const _0x3eccbd=a164_0x1b8e,_0x57024f=await getRabetbaseCdnConfig();if(!_0x57024f)throw new Error(_0x3eccbd(0x162));return parseDescriptor(_0x57024f[_0x3eccbd(0x115)]);}function resolveArchiveUrl(_0x59a082){const _0x443686=a164_0x1b8e,_0x185fd4=new URL(PROJECT_TEMPLATE_ASSET_BASE_URL+'/'),_0xa56da=new URL(_0x59a082,_0x185fd4);if(_0xa56da[_0x443686(0x165)]!==_0x443686(0x112)||_0xa56da['origin']!==_0x185fd4[_0x443686(0x111)]||!_0xa56da[_0x443686(0x158)][_0x443686(0x11e)](_0x185fd4[_0x443686(0x158)]))throw new Error(_0x443686(0x116));return _0xa56da[_0x443686(0x118)];}async function readResponseBytes(_0x5d299e,_0xea13a6){const _0xdd3bb6=a164_0x1b8e;if(!_0x5d299e[_0xdd3bb6(0x17b)]){const _0x23ce02=Buffer['from'](await _0x5d299e[_0xdd3bb6(0x17c)]());if(_0x23ce02[_0xdd3bb6(0x121)]>_0xea13a6)throw new Error(_0xdd3bb6(0x167));return _0x23ce02;}const _0x294d83=_0x5d299e[_0xdd3bb6(0x17b)][_0xdd3bb6(0x15f)](),_0x26d4b2=[];let _0x65d1a5=0x0;try{while(!![]){const {done:_0x2e0e81,value:_0x5947b0}=await _0x294d83[_0xdd3bb6(0x176)]();if(_0x2e0e81)break;_0x65d1a5+=_0x5947b0[_0xdd3bb6(0x147)];if(_0x65d1a5>_0xea13a6){await _0x294d83[_0xdd3bb6(0x13f)]();throw new Error(_0xdd3bb6(0x167));}_0x26d4b2[_0xdd3bb6(0x156)](Buffer[_0xdd3bb6(0x12b)](_0x5947b0));}}finally{_0x294d83[_0xdd3bb6(0x16b)]();}return Buffer['concat'](_0x26d4b2,_0x65d1a5);}async function downloadArchive(_0xf3845e,_0x54da98,_0x5b134b){const _0x5b1498=a164_0x1b8e,_0x2902bf=await fetchWithTimeout(resolveArchiveUrl(_0xf3845e['name']),ARCHIVE_TIMEOUT_MS,_0x5b1498(0x14e),async _0x403f7d=>{const _0x3959fb=_0x5b1498;if(!_0x403f7d['ok'])throw new Error('CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20'+_0x403f7d['status']+'.');const _0x51ef48=Number(_0x403f7d[_0x3959fb(0x17a)][_0x3959fb(0x177)](_0x3959fb(0x145)));if(Number[_0x3959fb(0x10c)](_0x51ef48)&&_0x51ef48>MAX_ARCHIVE_SIZE)throw new Error(_0x3959fb(0x128));return readResponseBytes(_0x403f7d,_0xf3845e[_0x3959fb(0x13a)]);});if(_0x2902bf[_0x5b1498(0x121)]!==_0xf3845e[_0x5b1498(0x13a)])throw new Error(_0x5b1498(0x15c)+_0xf3845e[_0x5b1498(0x13a)]+_0x5b1498(0x151)+_0x2902bf[_0x5b1498(0x121)]+'.');_0x5b134b?.(_0x5b1498(0x11d));const _0x462227=_0x5b1498(0x11f)+createHash(_0x5b1498(0x126))['update'](_0x2902bf)['digest']('hex');if(_0x462227!==_0xf3845e['sha256'])throw new Error(_0x5b1498(0x15b));await a164_0x1f8e99[_0x5b1498(0x173)](_0x54da98,_0x2902bf,{'flag':'wx'});}function a164_0x37ea(){const _0x550d55=['Local\x20template\x20source\x20is\x20not\x20a\x20directory:\x20','node_modules','isDirectory','content-length','634220hdzXUm','byteLength','trim','parse','basename','join','.rabetbase-create-','chmod','application/zip','mkdtemp','7987020DJlwtC',',\x20received\x20','readdir','Local\x20project\x20template\x20must\x20not\x20contain\x20symlinks:\x20','name','abort','push','readFile','pathname','2687340KLrHMO','downloading','CDN\x20project\x20template\x20checksum\x20verification\x20failed.','CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20','.rabetbase','realpath','getReader','10WTFpgn','Local\x20project\x20template\x20contains\x20a\x20local-only\x20entry:\x20','Rabetbase\x20CDN\x20config\x20is\x20unavailable.','has','test','protocol','.DS_Store','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','Local\x20template\x20source\x20and\x20project\x20output\x20must\x20not\x20overlap.','dev','14SlTpSp','releaseLock','ENOENT','copying','validation','extracting','CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22','mode','number','writeFile','copyFile','753879cnRRoJ','read','get','resolving','toLowerCase','headers','body','arrayBuffer','CDN\x20config\x20does\x20not\x20define\x20template\x20\x22','isFinite','isAbsolute','dirname','access','relative','origin','https:','.env.','package.json','projectTemplate','CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.','sep','href','Local\x20template\x20source\x20does\x20not\x20exist:\x20','Project\x20directory\x20already\x20exists:\x20','ino','message','verifying','startsWith','sha256:','project','length','Use\x20a\x20different\x20project\x20name.','Pass\x20a\x20directory\x20containing\x20the\x20template\x20source\x20package.json.','isSymbolicLink','isSafeInteger','sha256','posix','CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.','utf8','mkdir','from','2555LpQECW','resolve','code','.codegraph','26776XmGani','includes','local','.env','Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','template.zip','object','4742192KHmcOH','lstat','Project\x20template\x20package.json\x20is\x20invalid.','size','.lovrabet.log','Unable\x20to\x20claim\x20the\x20project\x20directory.','version','13223205duetGZ','cancel','dist','.git'];a164_0x37ea=function(){return _0x550d55;};return a164_0x37ea();}async function assertTemplateRoot(_0x4145d3){const _0x5117e1=a164_0x1b8e,_0x54e1b0=a164_0x3d3f9a[_0x5117e1(0x14b)](_0x4145d3,'package.json'),_0xce27cc=JSON[_0x5117e1(0x149)](await a164_0x1f8e99[_0x5117e1(0x157)](_0x54e1b0,_0x5117e1(0x129)));if(!_0xce27cc||typeof _0xce27cc!==_0x5117e1(0x136))throw new Error(_0x5117e1(0x139));}const LOCAL_FORBIDDEN_NAMES=new Set([a164_0x24f6f0(0x166),a164_0x24f6f0(0x12f),a164_0x24f6f0(0x141),'.idea','.lovrabet.json',a164_0x24f6f0(0x13b),a164_0x24f6f0(0x15d),'.rabetbase.json',a164_0x24f6f0(0x140),a164_0x24f6f0(0x143)]);function isForbiddenTemplateEntry(_0x2a8768){const _0x1c76ff=a164_0x24f6f0;if(LOCAL_FORBIDDEN_NAMES[_0x1c76ff(0x163)](_0x2a8768))return!![];return _0x2a8768===_0x1c76ff(0x133)||_0x2a8768[_0x1c76ff(0x11e)](_0x1c76ff(0x113))&&_0x2a8768!=='.env.example';}function containsPath(_0x57d537,_0x9c7cc6){const _0x481c74=a164_0x24f6f0,_0x2ac608=a164_0x3d3f9a[_0x481c74(0x110)](_0x57d537,_0x9c7cc6);return _0x2ac608===''||!_0x2ac608['startsWith']('..'+a164_0x3d3f9a[_0x481c74(0x117)])&&_0x2ac608!=='..'&&!a164_0x3d3f9a[_0x481c74(0x10d)](_0x2ac608);}async function copyLocalTemplateDirectory(_0x5bafe8,_0xe38925){const _0x11aab1=a164_0x24f6f0;await a164_0x1f8e99[_0x11aab1(0x12a)](_0xe38925,{'recursive':!![]});for(const _0x486382 of await a164_0x1f8e99[_0x11aab1(0x152)](_0x5bafe8,{'withFileTypes':!![]})){const _0x1c54fe=a164_0x3d3f9a[_0x11aab1(0x14b)](_0x5bafe8,_0x486382[_0x11aab1(0x154)]),_0x2be9d4=a164_0x3d3f9a['join'](_0xe38925,_0x486382['name']);if(isForbiddenTemplateEntry(_0x486382[_0x11aab1(0x154)]))throw new Error(_0x11aab1(0x161)+_0x1c54fe);const _0x4e1d4d=await a164_0x1f8e99['lstat'](_0x1c54fe);if(_0x4e1d4d[_0x11aab1(0x124)]())throw new Error(_0x11aab1(0x153)+_0x1c54fe);if(_0x4e1d4d[_0x11aab1(0x144)]()){await copyLocalTemplateDirectory(_0x1c54fe,_0x2be9d4);continue;}if(!_0x4e1d4d['isFile']())continue;await a164_0x1f8e99[_0x11aab1(0x174)](_0x1c54fe,_0x2be9d4),await a164_0x1f8e99[_0x11aab1(0x14d)](_0x2be9d4,_0x4e1d4d[_0x11aab1(0x171)]&0x1ff);}}async function readTemplateVersion(_0x1dd560){const _0x488597=a164_0x24f6f0,_0x277cbc=JSON[_0x488597(0x149)](await a164_0x1f8e99[_0x488597(0x157)](a164_0x3d3f9a[_0x488597(0x14b)](_0x1dd560,_0x488597(0x114)),_0x488597(0x129)));return nonEmptyString(_0x277cbc['version'])||'local';}async function readDirectoryIdentity(_0x36db15){const _0x1cb379=a164_0x24f6f0;try{const _0x27cf69=await a164_0x1f8e99[_0x1cb379(0x138)](_0x36db15);if(!_0x27cf69[_0x1cb379(0x144)]())return null;return{'dev':_0x27cf69[_0x1cb379(0x169)],'ino':_0x27cf69[_0x1cb379(0x11b)]};}catch{return null;}}async function commitStagedProject(_0xacef5c,_0x956064){const _0x5303cf=a164_0x24f6f0;await a164_0x1f8e99['mkdir'](_0x956064);const _0x40d979=await readDirectoryIdentity(_0x956064);if(!_0x40d979)throw new Error(_0x5303cf(0x13c));try{for(const _0x430feb of await a164_0x1f8e99['readdir'](_0xacef5c)){await a164_0x1f8e99['rename'](a164_0x3d3f9a[_0x5303cf(0x14b)](_0xacef5c,_0x430feb),a164_0x3d3f9a[_0x5303cf(0x14b)](_0x956064,_0x430feb));}}catch(_0x556f21){const _0x2559f0=await readDirectoryIdentity(_0x956064);_0x2559f0?.[_0x5303cf(0x169)]===_0x40d979[_0x5303cf(0x169)]&&_0x2559f0[_0x5303cf(0x11b)]===_0x40d979[_0x5303cf(0x11b)]&&await a164_0x1f8e99['rm'](_0x956064,{'recursive':!![],'force':!![]});throw _0x556f21;}}export async function materializeProjectTemplate(_0x2bd712,_0x4b0dd1){const _0x43180a=a164_0x24f6f0,_0x4bd7b4=a164_0x3d3f9a[_0x43180a(0x12d)](_0x2bd712),_0x48c462=a164_0x3d3f9a[_0x43180a(0x10e)](_0x4bd7b4);try{await a164_0x1f8e99[_0x43180a(0x138)](_0x4bd7b4);throw new Error('Project\x20directory\x20already\x20exists:\x20'+_0x4bd7b4);}catch(_0x592eb8){if(_0x592eb8['code']!==_0x43180a(0x16c))throw _0x592eb8;}const _0x3f446b=await a164_0x1f8e99[_0x43180a(0x14f)](a164_0x3d3f9a['join'](_0x48c462,_0x43180a(0x14c))),_0x5808ed=a164_0x3d3f9a[_0x43180a(0x14b)](_0x3f446b,_0x43180a(0x120)),_0x4dca5f=a164_0x3d3f9a[_0x43180a(0x14b)](_0x3f446b,_0x43180a(0x135));try{try{_0x4b0dd1?.(_0x43180a(0x178));const _0xf0d5b7=await fetchTemplateDescriptor();return _0x4b0dd1?.(_0x43180a(0x15a)),await downloadArchive(_0xf0d5b7,_0x4dca5f,_0x4b0dd1),_0x4b0dd1?.(_0x43180a(0x16f)),await extractProjectTemplateArchive(_0x4dca5f,_0x5808ed),await assertTemplateRoot(_0x5808ed),await commitStagedProject(_0x5808ed,_0x4bd7b4),{'source':'cdn','version':_0xf0d5b7[_0x43180a(0x13d)]};}catch(_0x14ca85){if(_0x14ca85['code']==='EEXIST')throw CliErrors[_0x43180a(0x16e)](_0x43180a(0x11a)+_0x4bd7b4,_0x43180a(0x122));const _0x22e07b=_0x14ca85 instanceof Error?_0x14ca85['message']:String(_0x14ca85);throw CliErrors[_0x43180a(0x16e)](_0x43180a(0x134),'Check\x20your\x20network\x20and\x20retry.\x20Details:\x20'+_0x22e07b);}}finally{await a164_0x1f8e99['rm'](_0x3f446b,{'recursive':!![],'force':!![]});}}export async function materializeLocalProjectTemplate(_0x2c2f41,_0x169102,_0x2aea2c){const _0x47a55e=a164_0x24f6f0;let _0x30c16a;try{_0x30c16a=await a164_0x1f8e99[_0x47a55e(0x15e)](a164_0x3d3f9a[_0x47a55e(0x12d)](_0x2c2f41));}catch{throw CliErrors[_0x47a55e(0x16e)](_0x47a55e(0x119)+a164_0x3d3f9a['resolve'](_0x2c2f41),_0x47a55e(0x123));}const _0x1ed13a=await a164_0x1f8e99['lstat'](_0x30c16a);if(!_0x1ed13a[_0x47a55e(0x144)]())throw CliErrors['validation'](_0x47a55e(0x142)+_0x30c16a);const _0x185222=a164_0x3d3f9a[_0x47a55e(0x12d)](_0x169102),_0x16939c=await a164_0x1f8e99[_0x47a55e(0x15e)](a164_0x3d3f9a[_0x47a55e(0x10e)](_0x185222)),_0x1f41c1=a164_0x3d3f9a[_0x47a55e(0x14b)](_0x16939c,a164_0x3d3f9a['basename'](_0x185222));if(containsPath(_0x30c16a,_0x1f41c1)||containsPath(_0x1f41c1,_0x30c16a))throw CliErrors[_0x47a55e(0x16e)](_0x47a55e(0x168),'Choose\x20an\x20output\x20directory\x20outside\x20the\x20template\x20source.');try{await a164_0x1f8e99[_0x47a55e(0x138)](_0x1f41c1);throw CliErrors['validation'](_0x47a55e(0x11a)+_0x1f41c1,'Choose\x20a\x20different\x20project\x20name\x20or\x20remove\x20the\x20directory\x20first.');}catch(_0x530c37){if(_0x530c37[_0x47a55e(0x12e)]!==_0x47a55e(0x16c))throw _0x530c37;}const _0x603610=a164_0x3d3f9a[_0x47a55e(0x10e)](_0x1f41c1);await a164_0x1f8e99[_0x47a55e(0x10f)](_0x603610);const _0x332ebc=await a164_0x1f8e99[_0x47a55e(0x14f)](a164_0x3d3f9a[_0x47a55e(0x14b)](_0x603610,_0x47a55e(0x14c))),_0x4a9f42=a164_0x3d3f9a[_0x47a55e(0x14b)](_0x332ebc,_0x47a55e(0x120));try{_0x2aea2c?.(_0x47a55e(0x16d)),await copyLocalTemplateDirectory(_0x30c16a,_0x4a9f42),await assertTemplateRoot(_0x4a9f42);const _0x2d4dcd=await readTemplateVersion(_0x4a9f42);return await commitStagedProject(_0x4a9f42,_0x1f41c1),{'source':_0x47a55e(0x132),'version':_0x2d4dcd};}catch(_0x399100){const _0x4f81ae=_0x399100 instanceof Error?_0x399100[_0x47a55e(0x11c)]:String(_0x399100);throw CliErrors['validation']('Invalid\x20local\x20template\x20source:\x20'+_0x4f81ae,'Check\x20the\x20source\x20directory\x20and\x20retry.');}finally{await a164_0x1f8e99['rm'](_0x332ebc,{'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(_0x13f755,_0x3f2804){const _0x2eb34e=a165_0x5ada,_0x190675=_0x13f755();while(!![]){try{const _0x45324c=-parseInt(_0x2eb34e(0x1db))/0x1+-parseInt(_0x2eb34e(0x1e7))/0x2+parseInt(_0x2eb34e(0x1de))/0x3+-parseInt(_0x2eb34e(0x1e9))/0x4+-parseInt(_0x2eb34e(0x1e6))/0x5+-parseInt(_0x2eb34e(0x1dd))/0x6+parseInt(_0x2eb34e(0x1e2))/0x7;if(_0x45324c===_0x3f2804)break;else _0x190675['push'](_0x190675['shift']());}catch(_0x1fe095){_0x190675['push'](_0x190675['shift']());}}}(a165_0x520a,0x73f2d));function a165_0x5ada(_0x1cb6b8,_0x23d8e6){_0x1cb6b8=_0x1cb6b8-0x1da;const _0x520adf=a165_0x520a();let _0x5ada91=_0x520adf[_0x1cb6b8];return _0x5ada91;}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(_0x13dfdc){const _0x42df05=a165_0x5ada,_0x5df43b=_0x13dfdc[_0x42df05(0x1e5)]();if(!_0x5df43b)return _0x42df05(0x1df);if(_0x5df43b[_0x42df05(0x1e8)]>MAX_PROJECT_NAME_LENGTH)return _0x42df05(0x1e3)+MAX_PROJECT_NAME_LENGTH+'\x20characters';if(!PROJECT_NAME_PATTERN[_0x42df05(0x1ea)](_0x5df43b))return _0x42df05(0x1e4);if(WINDOWS_RESERVED_NAME['test'](_0x5df43b))return _0x42df05(0x1da)+_0x5df43b+_0x42df05(0x1dc);return null;}function a165_0x520a(){const _0x596b22=['298418uBtynO','\x22\x20is\x20reserved\x20on\x20Windows','4548042tWVMff','2786868MRlXYo','Project\x20name\x20cannot\x20be\x20empty','Use\x20a\x20portable\x20directory\x20name\x20without\x20path\x20separators.','validation','16506413VqMETe','Project\x20name\x20cannot\x20exceed\x20','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','trim','1505005buQicK','1692938KPktSU','length','2432780SpPDHH','test','Project\x20name\x20\x22'];a165_0x520a=function(){return _0x596b22;};return a165_0x520a();}export function validateProjectName(_0x24f82b){const _0x140dee=a165_0x5ada,_0xc4a923=_0x24f82b[_0x140dee(0x1e5)](),_0x27605b=getProjectNameValidationError(_0xc4a923);if(_0x27605b)throw CliErrors[_0x140dee(0x1e1)](_0x27605b,_0x140dee(0x1e0));return _0xc4a923;}
@@ -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 a166_0x1ce4(){const _0x50c8d2=['Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20','2839085sLIgBx','startsWith','dirname','1474755scmSQW','en-US','error','open','readEntry','test','Unable\x20to\x20open\x20project\x20template\x20archive.','fileName','get','isEncrypted','uncompressedSize','8UXvFqC','has','Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20','6bMNdlR','9172350WMHlRW','externalFileAttributes','ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.','\x20entries.','toLocaleLowerCase','close','Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20','Unable\x20to\x20read\x20ZIP\x20entry:\x20','resolve','1155508pQCxKw','sep','7184nHULJX','5509qHpkit','765182sAGHhL','add','839160TEKpXF','join','Case-conflicting\x20ZIP\x20entry\x20path:\x20','180hxblbW','end','mkdir','entry','once','length','endsWith'];a166_0x1ce4=function(){return _0x50c8d2;};return a166_0x1ce4();}(function(_0x1ad6bc,_0xafc162){const _0x24cd47=a166_0x4006,_0x4ade2b=_0x1ad6bc();while(!![]){try{const _0x3cc822=parseInt(_0x24cd47(0xd3))/0x1+parseInt(_0x24cd47(0xfa))/0x2+parseInt(_0x24cd47(0xe1))/0x3*(-parseInt(_0x24cd47(0xec))/0x4)+parseInt(_0x24cd47(0xde))/0x5*(-parseInt(_0x24cd47(0xef))/0x6)+parseInt(_0x24cd47(0xd0))/0x7*(parseInt(_0x24cd47(0xfc))/0x8)+-parseInt(_0x24cd47(0xf0))/0x9+-parseInt(_0x24cd47(0xd6))/0xa*(-parseInt(_0x24cd47(0xd1))/0xb);if(_0x3cc822===_0xafc162)break;else _0x4ade2b['push'](_0x4ade2b['shift']());}catch(_0x553dee){_0x4ade2b['push'](_0x4ade2b['shift']());}}}(a166_0x1ce4,0xc4af3));import{createWriteStream}from'node:fs';import a166_0x866ca9 from'node:fs/promises';import a166_0x45269f from'node:path';import{pipeline}from'node:stream/promises';function a166_0x4006(_0x36af5f,_0x9c8411){_0x36af5f=_0x36af5f-0xd0;const _0x1ce4c9=a166_0x1ce4();let _0x4006ed=_0x1ce4c9[_0x36af5f];return _0x4006ed;}import a166_0x577d2c 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(_0x2ec47d){return new Promise((_0xcad784,_0x5b55fa)=>{const _0x30f904=a166_0x4006;a166_0x577d2c[_0x30f904(0xe4)](_0x2ec47d,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x3dd963,_0x29e44b)=>{const _0x5b5449=_0x30f904;if(_0x3dd963||!_0x29e44b){_0x5b55fa(_0x3dd963||new Error(_0x5b5449(0xe7)));return;}_0xcad784(_0x29e44b);});});}function openEntryStream(_0x91ce42,_0x24a20e){return new Promise((_0x8c6236,_0x56a56e)=>{_0x91ce42['openReadStream'](_0x24a20e,(_0x122691,_0x9c390f)=>{const _0x3cdb5d=a166_0x4006;if(_0x122691||!_0x9c390f){_0x56a56e(_0x122691||new Error(_0x3cdb5d(0xf8)+_0x24a20e[_0x3cdb5d(0xe8)]));return;}_0x8c6236(_0x9c390f);});});}function validateEntryPath(_0xe18f86){const _0x2f80e5=a166_0x4006,_0x480fe9=_0xe18f86['replace'](/\\/g,'/'),_0x368e45=_0x480fe9[_0x2f80e5(0xdc)]('/'),_0x35fbd8=_0x368e45?_0x480fe9['slice'](0x0,-0x1):_0x480fe9;if(!_0x35fbd8||_0x480fe9[_0x2f80e5(0xdf)]('/')||/^[A-Za-z]:\//[_0x2f80e5(0xe6)](_0x480fe9))throw new Error('Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20'+_0xe18f86);const _0x270761=_0x35fbd8['split']('/');for(const _0x5df0f4 of _0x270761){if(!_0x5df0f4||_0x5df0f4==='.'||_0x5df0f4==='..'||_0x5df0f4[_0x2f80e5(0xdc)]('.')||_0x5df0f4['endsWith']('\x20')||WINDOWS_INVALID_CHAR[_0x2f80e5(0xe6)](_0x5df0f4)||WINDOWS_RESERVED_NAME[_0x2f80e5(0xe6)](_0x5df0f4))throw new Error('Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20'+_0xe18f86);}return{'relativePath':_0x270761[_0x2f80e5(0xd4)](a166_0x45269f[_0x2f80e5(0xfb)]),'directory':_0x368e45};}function isSymbolicLink(_0x194b67){const _0x30b0b8=a166_0x4006,_0x393928=_0x194b67[_0x30b0b8(0xf1)]>>>0x10&0xffff;return(_0x393928&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0x35048c,_0x25b3b6){const _0x4e0e94=a166_0x4006,_0x43b724=await openZip(_0x35048c),_0x4c3389=a166_0x45269f[_0x4e0e94(0xf9)](_0x25b3b6),_0x3554cf=new Set(),_0x21f21b=new Map();let _0x130ca1=0x0,_0x30fd30=0x0;await a166_0x866ca9[_0x4e0e94(0xd8)](_0x4c3389,{'recursive':!![]}),await new Promise((_0x409266,_0x19faeb)=>{const _0x1055c2=_0x4e0e94;let _0x10b258=![];const _0x326c59=_0x3f808a=>{const _0x4f5061=a166_0x4006;if(_0x10b258)return;_0x10b258=!![],_0x43b724[_0x4f5061(0xf6)](),_0x19faeb(_0x3f808a instanceof Error?_0x3f808a:new Error(String(_0x3f808a)));};_0x43b724[_0x1055c2(0xda)](_0x1055c2(0xe3),_0x326c59),_0x43b724[_0x1055c2(0xda)](_0x1055c2(0xd7),()=>{if(_0x10b258)return;_0x10b258=!![],_0x409266();}),_0x43b724['on'](_0x1055c2(0xd9),_0x4dfaef=>{void(async()=>{const _0x4ce070=a166_0x4006;_0x130ca1+=0x1,_0x30fd30+=_0x4dfaef[_0x4ce070(0xeb)];if(_0x130ca1>MAX_ENTRY_COUNT)throw new Error('Project\x20template\x20ZIP\x20exceeds\x20'+MAX_ENTRY_COUNT+_0x4ce070(0xf4));if(_0x30fd30>MAX_UNCOMPRESSED_SIZE)throw new Error(_0x4ce070(0xf3));if(_0x4dfaef[_0x4ce070(0xea)]())throw new Error(_0x4ce070(0xee)+_0x4dfaef['fileName']);if(isSymbolicLink(_0x4dfaef))throw new Error(_0x4ce070(0xdd)+_0x4dfaef['fileName']);const {relativePath:_0x4bfb6d,directory:_0x9f2dca}=validateEntryPath(_0x4dfaef['fileName']),_0x27e08b=_0x4bfb6d['split'](a166_0x45269f['sep']);for(let _0x57c6f5=0x1;_0x57c6f5<=_0x27e08b[_0x4ce070(0xdb)];_0x57c6f5+=0x1){const _0x34ed1c=_0x27e08b['slice'](0x0,_0x57c6f5)[_0x4ce070(0xd4)](a166_0x45269f[_0x4ce070(0xfb)]),_0x1b193c=_0x34ed1c[_0x4ce070(0xf5)](_0x4ce070(0xe2)),_0x41e1b1=_0x21f21b[_0x4ce070(0xe9)](_0x1b193c);if(_0x41e1b1&&_0x41e1b1!==_0x34ed1c)throw new Error(_0x4ce070(0xd5)+_0x4dfaef['fileName']);_0x21f21b['set'](_0x1b193c,_0x34ed1c);}const _0x2cb63d=_0x4bfb6d[_0x4ce070(0xf5)](_0x4ce070(0xe2));if(_0x3554cf[_0x4ce070(0xed)](_0x2cb63d))throw new Error(_0x4ce070(0xf7)+_0x4dfaef['fileName']);_0x3554cf[_0x4ce070(0xd2)](_0x2cb63d);const _0x489ad2=a166_0x45269f[_0x4ce070(0xf9)](_0x4c3389,_0x4bfb6d);if(_0x489ad2!==_0x4c3389&&!_0x489ad2['startsWith'](''+_0x4c3389+a166_0x45269f['sep']))throw new Error(_0x4ce070(0xf2)+_0x4dfaef[_0x4ce070(0xe8)]);if(_0x9f2dca)await a166_0x866ca9[_0x4ce070(0xd8)](_0x489ad2,{'recursive':!![]});else{await a166_0x866ca9[_0x4ce070(0xd8)](a166_0x45269f[_0x4ce070(0xe0)](_0x489ad2),{'recursive':!![]});const _0x488eb8=await openEntryStream(_0x43b724,_0x4dfaef);await pipeline(_0x488eb8,createWriteStream(_0x489ad2,{'flags':'wx','mode':0x1a4}));}_0x43b724[_0x4ce070(0xe5)]();})()['catch'](_0x326c59);}),_0x43b724['readEntry']();});}
@@ -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_0x5eb123=a167_0x4586;(function(_0x395e16,_0x40eaaf){const _0x19607f=a167_0x4586,_0x4f3e89=_0x395e16();while(!![]){try{const _0x223c2b=-parseInt(_0x19607f(0xdc))/0x1+-parseInt(_0x19607f(0xd7))/0x2+parseInt(_0x19607f(0xd6))/0x3*(-parseInt(_0x19607f(0xd3))/0x4)+parseInt(_0x19607f(0xdb))/0x5*(parseInt(_0x19607f(0xd4))/0x6)+-parseInt(_0x19607f(0xd2))/0x7+parseInt(_0x19607f(0xdd))/0x8*(parseInt(_0x19607f(0xd0))/0x9)+-parseInt(_0x19607f(0xd9))/0xa*(-parseInt(_0x19607f(0xda))/0xb);if(_0x223c2b===_0x40eaaf)break;else _0x4f3e89['push'](_0x4f3e89['shift']());}catch(_0x309e74){_0x4f3e89['push'](_0x4f3e89['shift']());}}}(a167_0x5d9a,0x39e38));import a167_0x3e93b0 from'node:path';function a167_0x5d9a(){const _0x38e07e=['../../../../','2098579BAHllF','124iEHELX','18JEWffZ','dirname','17499tNcRdo','551114cDSqKl','resolve','430FzzIvX','312191TkpvQO','22010QfEQZc','370078EKHNCD','1038224OaQDKv','9loOZvI'];a167_0x5d9a=function(){return _0x38e07e;};return a167_0x5d9a();}function a167_0x4586(_0x12127b,_0x42df49){_0x12127b=_0x12127b-0xd0;const _0x5d9a73=a167_0x5d9a();let _0x45866d=_0x5d9a73[_0x12127b];return _0x45866d;}import{fileURLToPath}from'node:url';const __dirname=a167_0x3e93b0[a167_0x5eb123(0xd5)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x5078a5=a167_0x5eb123;return a167_0x3e93b0[_0x5078a5(0xd8)](__dirname,_0x5078a5(0xd1));}
@@ -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 a168_0x170c(){const _0x3df56b=['info','error','success','30zuhTjZ','4567392CcUgik','3114jykIrv','copy','1299486UipRkV','33550tLxkrn','Failed\x20to\x20copy\x20project\x20template','3NCgsIU','17616kgEDDF','2779172kidAZW','version','4664SXgMnU','5PawDSE','now','1144892PsTkSx','Starting\x20project\x20template\x20creation','73126wIjunC','cwd','resolve'];a168_0x170c=function(){return _0x3df56b;};return a168_0x170c();}function a168_0x396d(_0x1483be,_0x568ddc){_0x1483be=_0x1483be-0x8e;const _0x170c90=a168_0x170c();let _0x396d34=_0x170c90[_0x1483be];return _0x396d34;}(function(_0x29fc7d,_0x45af8c){const _0x1d3c98=a168_0x396d,_0x5703f8=_0x29fc7d();while(!![]){try{const _0x2f3c71=parseInt(_0x1d3c98(0x95))/0x1*(parseInt(_0x1d3c98(0x9e))/0x2)+parseInt(_0x1d3c98(0x92))/0x3+-parseInt(_0x1d3c98(0x97))/0x4*(-parseInt(_0x1d3c98(0x9a))/0x5)+-parseInt(_0x1d3c98(0x8e))/0x6*(-parseInt(_0x1d3c98(0x9c))/0x7)+parseInt(_0x1d3c98(0x8f))/0x8+parseInt(_0x1d3c98(0x90))/0x9*(-parseInt(_0x1d3c98(0x93))/0xa)+-parseInt(_0x1d3c98(0x99))/0xb*(parseInt(_0x1d3c98(0x96))/0xc);if(_0x2f3c71===_0x45af8c)break;else _0x5703f8['push'](_0x5703f8['shift']());}catch(_0x238cb1){_0x5703f8['push'](_0x5703f8['shift']());}}}(a168_0x170c,0xcdd4e));import a168_0x11aa22 from'node:path';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{materializeLocalProjectTemplate,materializeProjectTemplate}from'../../../commands/project/create/materialize-project-template.js';export async function copyProjectTemplate(_0x3f173d,_0x2a2d56,_0x422a63){const _0x49c462=a168_0x396d,_0x46ff45=Date[_0x49c462(0x9b)](),_0x51d361=a168_0x11aa22[_0x49c462(0xa0)](process[_0x49c462(0x9f)](),_0x3f173d);try{logger[_0x49c462(0xa1)]('copy',_0x49c462(0x9d),{'projectCode':_0x3f173d});const _0x258064=_0x422a63?await materializeLocalProjectTemplate(_0x422a63,_0x51d361,_0x2a2d56):await materializeProjectTemplate(_0x51d361,_0x2a2d56),_0x4b2916=Date[_0x49c462(0x9b)]()-_0x46ff45;logger[_0x49c462(0xa3)]('copy','Project\x20template\x20created',_0x4b2916,{'projectCode':_0x3f173d,'templateSource':_0x258064['source'],'templateVersion':_0x258064[_0x49c462(0x98)]});}catch(_0x3b4e09){const _0x507bae=Date[_0x49c462(0x9b)]()-_0x46ff45;logger[_0x49c462(0xa2)](_0x49c462(0x91),_0x49c462(0x94),{'projectCode':_0x3f173d,'error':_0x3b4e09 instanceof Error?_0x3b4e09['message']:String(_0x3b4e09),'duration':_0x507bae});throw _0x3b4e09;}return formatElapsed(_0x46ff45);}
@@ -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_0xc548(_0x547315,_0x262470){_0x547315=_0x547315-0x1e5;const _0x51ebf4=a169_0x51eb();let _0xc5487f=_0x51ebf4[_0x547315];return _0xc5487f;}(function(_0x174442,_0x2f0f85){const _0x4a92d2=a169_0xc548,_0x394022=_0x174442();while(!![]){try{const _0x23e063=-parseInt(_0x4a92d2(0x1f5))/0x1*(-parseInt(_0x4a92d2(0x1ef))/0x2)+-parseInt(_0x4a92d2(0x1f0))/0x3*(parseInt(_0x4a92d2(0x1ec))/0x4)+parseInt(_0x4a92d2(0x1ee))/0x5*(parseInt(_0x4a92d2(0x1e5))/0x6)+parseInt(_0x4a92d2(0x1fa))/0x7+-parseInt(_0x4a92d2(0x1f9))/0x8+-parseInt(_0x4a92d2(0x1f3))/0x9+parseInt(_0x4a92d2(0x1f1))/0xa;if(_0x23e063===_0x2f0f85)break;else _0x394022['push'](_0x394022['shift']());}catch(_0x4024ef){_0x394022['push'](_0x394022['shift']());}}}(a169_0x51eb,0x716ca));import a169_0x2a3d1b from'node:path';function a169_0x51eb(){const _0x5f17e8=['cwd','npx','success','--write','prettier','116068nELlAg','error','5MvGxBl','21848EpGWci','66liLvKh','10133890LPYQdj','resolve','6083847cKncBb','message','31YDQhtf','now','info','format','4889848YkxAEH','1693258AvcRbl','4777482tivEHp','Code\x20format\x20completed'];a169_0x51eb=function(){return _0x5f17e8;};return a169_0x51eb();}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(_0x4c7784){const _0x5a029e=a169_0xc548,_0x5ba729=Date[_0x5a029e(0x1f6)](),_0x1db33f=a169_0x2a3d1b[_0x5a029e(0x1f2)](process[_0x5a029e(0x1e7)](),_0x4c7784);try{logger[_0x5a029e(0x1f7)](_0x5a029e(0x1f8),'Starting\x20code\x20format',{'projectCode':_0x4c7784}),await execa(resolveNpmBin(_0x5a029e(0x1e8)),[_0x5a029e(0x1eb),_0x5a029e(0x1ea),'.'],{'cwd':_0x1db33f});const _0x4d2c47=Date[_0x5a029e(0x1f6)]()-_0x5ba729;logger[_0x5a029e(0x1e9)](_0x5a029e(0x1f8),_0x5a029e(0x1e6),_0x4d2c47,{'projectCode':_0x4c7784});}catch(_0x385a3f){const _0x4ae45e=Date[_0x5a029e(0x1f6)]()-_0x5ba729;logger[_0x5a029e(0x1ed)](_0x5a029e(0x1f8),'Code\x20format\x20failed',{'projectCode':_0x4c7784,'error':_0x385a3f instanceof Error?_0x385a3f[_0x5a029e(0x1f4)]:String(_0x385a3f),'duration':_0x4ae45e});throw _0x385a3f;}return formatElapsed(_0x5ba729);}
@@ -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(_0x4f44bb,_0x4453ac){const _0x33f8e1=a170_0x87e9,_0x2830c7=_0x4f44bb();while(!![]){try{const _0x48d82b=-parseInt(_0x33f8e1(0x19b))/0x1*(parseInt(_0x33f8e1(0x18f))/0x2)+-parseInt(_0x33f8e1(0x19a))/0x3*(-parseInt(_0x33f8e1(0x194))/0x4)+-parseInt(_0x33f8e1(0x187))/0x5+parseInt(_0x33f8e1(0x189))/0x6+parseInt(_0x33f8e1(0x18b))/0x7*(parseInt(_0x33f8e1(0x18a))/0x8)+-parseInt(_0x33f8e1(0x197))/0x9+parseInt(_0x33f8e1(0x195))/0xa*(parseInt(_0x33f8e1(0x186))/0xb);if(_0x48d82b===_0x4453ac)break;else _0x2830c7['push'](_0x2830c7['shift']());}catch(_0x27d3b9){_0x2830c7['push'](_0x2830c7['shift']());}}}(a170_0x23b7,0xd37bf));import a170_0x8e3885 from'node:path';import{execa}from'execa';function a170_0x23b7(){const _0x2f18f1=['Starting\x20dependency\x20install','error','success','3326GHKKpi','Dependency\x20install\x20failed','message','https://registry.npmmirror.com','Dependency\x20install\x20completed','12hiEonB','370NJYwiX','cwd','10048410zhKFHE','install','--registry','1529163kFFZDj','883UhHXAb','now','info','417681wMLkKC','7369945nTbcXq','resolve','5388270hcfuwT','8744096LyEVjD','7sFUUDB'];a170_0x23b7=function(){return _0x2f18f1;};return a170_0x23b7();}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';function a170_0x87e9(_0x38efee,_0x9ddaba){_0x38efee=_0x38efee-0x185;const _0x23b7b6=a170_0x23b7();let _0x87e946=_0x23b7b6[_0x38efee];return _0x87e946;}export async function installDependencies(_0x1e5f61){const _0x4e7a8c=a170_0x87e9,_0x55faf9=Date[_0x4e7a8c(0x19c)](),_0x3a483e=a170_0x8e3885[_0x4e7a8c(0x188)](process[_0x4e7a8c(0x196)](),_0x1e5f61);try{logger[_0x4e7a8c(0x185)](_0x4e7a8c(0x198),_0x4e7a8c(0x18c),{'projectCode':_0x1e5f61,'registry':_0x4e7a8c(0x192)}),await execa(resolveNpmBin('npm'),[_0x4e7a8c(0x198),_0x4e7a8c(0x199),'https://registry.npmmirror.com'],{'cwd':_0x3a483e});const _0x25360c=Date['now']()-_0x55faf9;logger[_0x4e7a8c(0x18e)](_0x4e7a8c(0x198),_0x4e7a8c(0x193),_0x25360c,{'projectCode':_0x1e5f61});}catch(_0x5631fc){const _0x3fa5df=Date[_0x4e7a8c(0x19c)]()-_0x55faf9;logger[_0x4e7a8c(0x18d)](_0x4e7a8c(0x198),_0x4e7a8c(0x190),{'projectCode':_0x1e5f61,'error':_0x5631fc instanceof Error?_0x5631fc[_0x4e7a8c(0x191)]:String(_0x5631fc),'duration':_0x3fa5df});throw _0x5631fc;}return formatElapsed(_0x55faf9);}
@@ -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
+ const a171_0x1b4d7e=a171_0x46c3;(function(_0x3ce72d,_0x47f454){const _0x33860c=a171_0x46c3,_0x4c9719=_0x3ce72d();while(!![]){try{const _0x39ea53=-parseInt(_0x33860c(0x1a7))/0x1*(-parseInt(_0x33860c(0x1af))/0x2)+parseInt(_0x33860c(0x1a9))/0x3*(-parseInt(_0x33860c(0x1ba))/0x4)+parseInt(_0x33860c(0x1a6))/0x5*(parseInt(_0x33860c(0x1be))/0x6)+parseInt(_0x33860c(0x1ae))/0x7+parseInt(_0x33860c(0x1b2))/0x8+-parseInt(_0x33860c(0x1ab))/0x9+-parseInt(_0x33860c(0x1c3))/0xa;if(_0x39ea53===_0x47f454)break;else _0x4c9719['push'](_0x4c9719['shift']());}catch(_0x26804e){_0x4c9719['push'](_0x4c9719['shift']());}}}(a171_0x23ec,0x32927));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';function a171_0x46c3(_0x354290,_0x43f87c){_0x354290=_0x354290-0x1a4;const _0x23ec59=a171_0x23ec();let _0x46c3c3=_0x23ec59[_0x354290];return _0x46c3c3;}function a171_0x23ec(){const _0x162c42=['env','upgrade','project','4190640oSSmTd','yes','bool','project-name','../../commands/project/create/main.js','template-source','Skip\x20confirmation\x20prompt','str','2165NPgjom','373nTFaDC','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','64434ZSIjuc','Target\x20environment','2240370hxlJVw','string','create','862652oKUSPR','1212PATrQk','write','Project\x20name','1944960VjIWpI','validation','args','cookie','nonInteractive','Prepared\x20local\x20project\x20template\x20directory','name','Create\x20a\x20new\x20project','20iyjkPB','Usage:\x20','boolean','appcode','5406FcoRuW','trim'];a171_0x23ec=function(){return _0x162c42;};return a171_0x23ec();}const createFlags=[{'name':'name','type':a171_0x1b4d7e(0x1ac),'description':a171_0x1b4d7e(0x1b1)},{'name':a171_0x1b4d7e(0x1c0),'type':'string','description':a171_0x1b4d7e(0x1aa)},{'name':a171_0x1b4d7e(0x1bd),'type':a171_0x1b4d7e(0x1ac),'description':a171_0x1b4d7e(0x1a8)},{'name':'template-source','type':a171_0x1b4d7e(0x1ac),'description':a171_0x1b4d7e(0x1b7)}],upgradeFlags=[{'name':'yes','type':a171_0x1b4d7e(0x1bc),'description':a171_0x1b4d7e(0x1a4),'default':![]}];export const projectDefinitions=[{'service':a171_0x1b4d7e(0x1c2),'command':a171_0x1b4d7e(0x1ad),'description':a171_0x1b4d7e(0x1b9),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a171_0x1b4d7e(0x1c6),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x55556c){const _0xff61cd=a171_0x1b4d7e,{createApp:_0x305c3d}=await import(_0xff61cd(0x1c7)),_0x26749c=_0x55556c[_0xff61cd(0x1a5)](_0xff61cd(0x1b8))['trim']()||_0x55556c[_0xff61cd(0x1b4)][0x0]?.[_0xff61cd(0x1bf)](),_0x521161=_0x55556c[_0xff61cd(0x1a5)](_0xff61cd(0x1c0))||undefined,_0x13ee14=_0x55556c['str'](_0xff61cd(0x1bd))||undefined,_0x42e214=_0x55556c[_0xff61cd(0x1a5)](_0xff61cd(0x1c8))[_0xff61cd(0x1bf)]()||undefined;if(_0x55556c[_0xff61cd(0x1b6)]){if(!_0x26749c)throw CliErrors[_0xff61cd(0x1b3)]('Non-interactive\x20mode\x20requires\x20a\x20project\x20name.',_0xff61cd(0x1bb)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x305c3d({'projectCode':_0x26749c,'appCode':_0x13ee14,'env':_0x521161,'cookie':_0x55556c[_0xff61cd(0x1b5)],'nonInteractive':!![],'templateSource':_0x42e214});}else await _0x305c3d({'projectCode':_0x26749c,'appCode':_0x13ee14,'env':_0x521161,'cookie':_0x55556c[_0xff61cd(0x1b5)],'templateSource':_0x42e214});return{'ok':!![]};}},{'service':'project','command':a171_0x1b4d7e(0x1c1),'description':'Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','risk':a171_0x1b4d7e(0x1b0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x41c31a){const _0x4ce32c=a171_0x1b4d7e;return await upgradeApp(_0x41c31a[_0x4ce32c(0x1b6)],{'yes':_0x41c31a[_0x4ce32c(0x1c5)](_0x4ce32c(0x1c4))}),{'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
+ const a172_0x5b27eb=a172_0x1ead;(function(_0x1a973b,_0x10a7cb){const _0xeca0a8=a172_0x1ead,_0xa3ed5a=_0x1a973b();while(!![]){try{const _0x30c029=parseInt(_0xeca0a8(0x1a7))/0x1+-parseInt(_0xeca0a8(0x1b4))/0x2+-parseInt(_0xeca0a8(0x1c4))/0x3+-parseInt(_0xeca0a8(0x161))/0x4*(parseInt(_0xeca0a8(0x1c3))/0x5)+-parseInt(_0xeca0a8(0x197))/0x6*(-parseInt(_0xeca0a8(0x18d))/0x7)+-parseInt(_0xeca0a8(0x157))/0x8+parseInt(_0xeca0a8(0x1bf))/0x9;if(_0x30c029===_0x10a7cb)break;else _0xa3ed5a['push'](_0xa3ed5a['shift']());}catch(_0x2ca578){_0xa3ed5a['push'](_0xa3ed5a['shift']());}}}(a172_0x50e3,0x20430));import a172_0x3e572b from'chalk';import a172_0x4c6810 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=['.lovrabet.json',a172_0x5b27eb(0x1b2)];function collectIdeSkillFiles(_0x43b14c){const _0x5edec5=a172_0x5b27eb,_0x2f8e62=[];for(const _0x2decb8 of Object[_0x5edec5(0x14f)](CORE_IDE_CONFIGS)){if(_0x2decb8[_0x5edec5(0x19f)])for(const _0x11968b of _0x2decb8['files']){_0x2f8e62['push'](resolve(_0x43b14c,_0x11968b[_0x5edec5(0x1cd)]));}}return _0x2f8e62;}function analyse(_0x5c5283){const _0x320cd8=a172_0x5b27eb;let _0x1327f6=null;const _0x360a2b=resolve(_0x5c5283,NEW_CONFIG_NAME),_0x2c46ae=existsSync(_0x360a2b);for(const _0x200bde of LEGACY_CONFIG_NAMES){const _0x837ea3=resolve(_0x5c5283,_0x200bde);if(existsSync(_0x837ea3)){const _0x884a01=readConfigFile(_0x837ea3),_0x169e55=Object['keys'](_0x884a01)[_0x320cd8(0x181)](_0x342efe=>typeof _0x884a01[_0x342efe]!==_0x320cd8(0x182));_0x1327f6={'oldPath':_0x837ea3,'hasNewConfig':_0x2c46ae,'fields':_0x169e55};break;}}const _0xe584c2=[],_0x1d1375=resolve(_0x5c5283,_0x320cd8(0x193));if(existsSync(_0x1d1375))_0xe584c2[_0x320cd8(0x1a0)](_0x1d1375);const _0x18ba9e=resolve(_0x5c5283,_0x320cd8(0x1aa));if(existsSync(_0x18ba9e))_0xe584c2[_0x320cd8(0x1a0)](_0x18ba9e);const _0x3b1380=resolve(_0x5c5283,_0x320cd8(0x184));if(existsSync(_0x3b1380))_0xe584c2[_0x320cd8(0x1a0)](_0x3b1380);for(const _0x4a7e20 of collectIdeSkillFiles(_0x5c5283)){if(existsSync(_0x4a7e20))_0xe584c2[_0x320cd8(0x1a0)](_0x4a7e20);}let _0x3c7817=null;const _0x5c87f3=resolve(_0x5c5283,_0x320cd8(0x1d0));if(existsSync(_0x5c87f3))try{const _0x5af6a6=JSON[_0x320cd8(0x15f)](readFileSync(_0x5c87f3,'utf8'));if(_0x5af6a6?.['mcpServers']&&typeof _0x5af6a6['mcpServers']==='object'){const _0x33baa8=[];for(const [_0x166aab,_0x583baa]of Object[_0x320cd8(0x154)](_0x5af6a6[_0x320cd8(0x1a9)])){const _0x29c2cd=_0x583baa;_0x29c2cd?.[_0x320cd8(0x177)]&&Array[_0x320cd8(0x195)](_0x29c2cd[_0x320cd8(0x177)])&&_0x29c2cd['args'][_0x320cd8(0x1c8)](_0x4c8405=>typeof _0x4c8405==='string'&&_0x4c8405[_0x320cd8(0x1ab)](_0x320cd8(0x169)))&&_0x33baa8[_0x320cd8(0x1a0)](_0x166aab);}_0x33baa8[_0x320cd8(0x19c)]>0x0&&(_0x3c7817={'path':_0x5c87f3,'keys':_0x33baa8});}}catch{}const _0x5d0b9f=_0xe584c2[_0x320cd8(0x19c)]>0x0||_0x1327f6!==null;let _0x102e9a=null;const _0x398ab2=resolve(_0x5c5283,_0x320cd8(0x163));if(existsSync(_0x398ab2))try{const _0x496118=JSON[_0x320cd8(0x15f)](readFileSync(_0x398ab2,_0x320cd8(0x155)));for(const _0x277a5a of[_0x320cd8(0x1ca),_0x320cd8(0x158)]){const _0x4db4ab=_0x496118?.[_0x277a5a]?.['@lovrabet/sdk'];if(typeof _0x4db4ab===_0x320cd8(0x190)){_0x4db4ab!==_0x320cd8(0x1bc)&&(_0x102e9a={'pkgPath':_0x398ab2,'currentVersion':_0x4db4ab,'field':_0x277a5a});break;}}}catch{}return{'configMigration':_0x1327f6,'oldArtifacts':_0xe584c2,'oldMcpConfig':_0x3c7817,'needsSkillSwap':_0x5d0b9f,'sdkUpgrade':_0x102e9a};}function a172_0x1ead(_0x3591e6,_0x1aedfc){_0x3591e6=_0x3591e6-0x14f;const _0x50e37b=a172_0x50e3();let _0x1ead21=_0x50e37b[_0x3591e6];return _0x1ead21;}function a172_0x50e3(){const _0x385c4d=['.lovrabetrc','needsSkillSwap','375960wNXIwe','lovrabet/rabetbase\x20installed\x20globally','lovrabet/lovrabet-skill\x20removed','log','cyan','white','Remove\x20old\x20skill','cwd','latest','@lovrabet/sdk:','\x20→\x20keys:\x20','4653315bdQwGT','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','MCP\x20config:','.bak','95605VqXeaI','416274VbxLxk','inherit','hasNewConfig','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','some','exit\x20','dependencies','\x20\x20bun\x20install','oldArtifacts','path','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','.cursor/mcp.json','label','Config\x20migration','values','not\x20found\x20or\x20already\x20at\x20latest','join','oldPath','skipped\x20(no\x20legacy\x20config)','entries','utf8','not\x20needed','1508896JofBvV','devDependencies','start','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','Step\x204/7:\x20Cleaning\x20MCP\x20config...','\x20from\x20','===\x20Upgrade\x20Summary\x20===','@lovrabet/sdk','parse','already\x20exists\x20(will\x20merge)','24UkZCkQ','\x20\x20Fields\x20to\x20migrate:\x20','package.json','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','Upgrade\x20completed\x20successfully!','removed\x20','bold','\x20→\x20','@lovrabet/dataset-mcp-server','\x20→\x20latest','detail','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','fields','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','failed','info','skipped','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','\x20removed\x20(','Upgrade\x20@lovrabet/sdk','args','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','stringify','Legacy\x20artifacts:','no\x20legacy\x20entry','error','gray','Install\x20new\x20skill','status','done','filter','undefined','red','.claude/skills/lovrabet','sdkUpgrade','[\x22@lovrabet/sdk\x22]:\x20','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','lovrabet/rabetbase','\x20\x20\x20\x20\x20\x20\x20','Step\x201/7:\x20Config\x20migration\x20—\x20','oldMcpConfig','\x20\x20New\x20config\x20(.rabetbase.json):\x20','7cZUTLS','\x20removed','\x20\x20#\x20or','string','Remove\x20legacy\x20artifacts','Remove\x20.lovrabet/','.lovrabet','Step\x204/7:\x20MCP\x20config\x20—\x20','isArray','Clean\x20MCP\x20config','176886SzeTSN','no\x20legacy\x20config\x20found','not\x20found\x20(will\x20create)','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','succeed','length','\x20\x20Action:\x20delete','Step\x206/7:\x20Installing\x20new\x20skill...','files','push','Upgrade\x20cancelled.','yes','keys','message','no\x20matching\x20entry\x20found','\x20\x20Step\x20','215704eQbmRL','yellow','mcpServers','.cursor/rules/lovrabet_rules.mdc','includes','Step\x201/7:\x20Migrating\x20config...','Skill\x20swap:','Config\x20file:','fail','green','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.'];a172_0x50e3=function(){return _0x385c4d;};return a172_0x50e3();}function printReport(_0x14bbb4){const _0x1c3b87=a172_0x5b27eb,{configMigration:_0x15ffd0,oldArtifacts:_0x4608a1,oldMcpConfig:_0x2e3581,needsSkillSwap:_0x46e829}=_0x14bbb4;console[_0x1c3b87(0x1b7)](''),console[_0x1c3b87(0x1b7)](a172_0x3e572b[_0x1c3b87(0x167)]('===\x20Upgrade\x20Analysis\x20===')),console[_0x1c3b87(0x1b7)]('');_0x15ffd0?(console['log'](a172_0x3e572b[_0x1c3b87(0x1b8)](_0x1c3b87(0x1ae))+('\x20\x20'+a172_0x3e572b[_0x1c3b87(0x1a8)](_0x15ffd0['oldPath']))),console[_0x1c3b87(0x1b7)](_0x1c3b87(0x18c)+(_0x15ffd0[_0x1c3b87(0x1c6)]?a172_0x3e572b['green'](_0x1c3b87(0x160)):a172_0x3e572b[_0x1c3b87(0x17d)](_0x1c3b87(0x199)))),console[_0x1c3b87(0x1b7)](_0x1c3b87(0x162)+_0x15ffd0[_0x1c3b87(0x16f)][_0x1c3b87(0x151)](',\x20')),console[_0x1c3b87(0x1b7)]('\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak')):console[_0x1c3b87(0x1b7)](a172_0x3e572b[_0x1c3b87(0x1b8)]('Config\x20file:')+'\x20\x20'+a172_0x3e572b['gray'](_0x1c3b87(0x198)));console[_0x1c3b87(0x1b7)]('');if(_0x4608a1[_0x1c3b87(0x19c)]>0x0){console['log'](a172_0x3e572b[_0x1c3b87(0x1b8)](_0x1c3b87(0x17a)));for(const _0x556026 of _0x4608a1){console[_0x1c3b87(0x1b7)]('\x20\x20'+a172_0x3e572b['red']('FOUND')+'\x20\x20'+_0x556026);}console[_0x1c3b87(0x1b7)](_0x1c3b87(0x19d));}else console['log'](a172_0x3e572b[_0x1c3b87(0x1b8)]('Legacy\x20artifacts:')+'\x20\x20'+a172_0x3e572b[_0x1c3b87(0x17d)]('none\x20found'));console[_0x1c3b87(0x1b7)]('');_0x2e3581?(console[_0x1c3b87(0x1b7)](a172_0x3e572b[_0x1c3b87(0x1b8)](_0x1c3b87(0x1c1))+('\x20\x20'+a172_0x3e572b[_0x1c3b87(0x1a8)](_0x2e3581[_0x1c3b87(0x1cd)])+_0x1c3b87(0x1be)+_0x2e3581[_0x1c3b87(0x1a3)]['join'](',\x20'))),console[_0x1c3b87(0x1b7)](_0x1c3b87(0x1cf))):console[_0x1c3b87(0x1b7)](a172_0x3e572b[_0x1c3b87(0x1b8)](_0x1c3b87(0x1c1))+'\x20\x20'+a172_0x3e572b[_0x1c3b87(0x17d)](_0x1c3b87(0x17b)));console[_0x1c3b87(0x1b7)](''),console[_0x1c3b87(0x1b7)](a172_0x3e572b[_0x1c3b87(0x1b8)](_0x1c3b87(0x1ad))+('\x20\x20'+(_0x46e829?a172_0x3e572b['yellow']('needed'):a172_0x3e572b[_0x1c3b87(0x1b0)](_0x1c3b87(0x156)))));_0x46e829&&console[_0x1c3b87(0x1b7)](_0x1c3b87(0x187)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x1c3b87(0x1b7)]('');if(_0x14bbb4[_0x1c3b87(0x185)]){const {currentVersion:_0x260aac,field:_0x10a57c,pkgPath:_0x24508c}=_0x14bbb4[_0x1c3b87(0x185)];console['log'](a172_0x3e572b['cyan'](_0x1c3b87(0x1bd))+('\x20\x20'+a172_0x3e572b[_0x1c3b87(0x1a8)](_0x24508c))),console[_0x1c3b87(0x1b7)]('\x20\x20Current\x20version\x20in\x20'+_0x10a57c+':\x20'+a172_0x3e572b['yellow'](_0x260aac)+_0x1c3b87(0x168)+a172_0x3e572b['green']('latest')),console[_0x1c3b87(0x1b7)](_0x1c3b87(0x1ce));}else console[_0x1c3b87(0x1b7)](a172_0x3e572b[_0x1c3b87(0x1b8)](_0x1c3b87(0x1bd))+'\x20\x20'+a172_0x3e572b['gray'](_0x1c3b87(0x150)));console['log']('');}function execConfigMigration(_0x320244,_0x5684ba){const _0x214ae1=a172_0x5b27eb,{configMigration:_0x36bbd3}=_0x320244;if(!_0x36bbd3?.[_0x214ae1(0x152)])return{'step':0x1,'label':_0x214ae1(0x1d2),'ok':!![],'detail':_0x214ae1(0x153)};const _0x4815f3=readConfigFile(_0x36bbd3['oldPath']),_0x386dd8=resolve(_0x5684ba,NEW_CONFIG_NAME),_0x59fed5=_0x36bbd3[_0x214ae1(0x1c6)]?readConfigFile(_0x386dd8):{};for(const [_0x20c122,_0x2fd6af]of Object[_0x214ae1(0x154)](_0x4815f3)){!(_0x20c122 in _0x59fed5)&&(_0x59fed5[_0x20c122]=_0x2fd6af);}writeConfigFile(_0x386dd8,_0x59fed5);const _0x32d92b=_0x36bbd3[_0x214ae1(0x152)]+_0x214ae1(0x1c2);return renameSync(_0x36bbd3[_0x214ae1(0x152)],_0x32d92b),{'step':0x1,'label':_0x214ae1(0x1d2),'ok':!![],'detail':_0x36bbd3[_0x214ae1(0x152)]+_0x214ae1(0x168)+_0x386dd8+'\x20(backup:\x20'+_0x32d92b+')'};}function execRemoveOldArtifacts(_0x1da0a1){const _0x5f4279=a172_0x5b27eb,_0x500bd1=[];for(const _0x32ee59 of _0x1da0a1){try{if(!existsSync(_0x32ee59))continue;const _0x3c8baf=tryStat(_0x32ee59);_0x3c8baf?.['isDirectory']()?rmSync(_0x32ee59,{'recursive':!![],'force':!![]}):unlinkSync(_0x32ee59);}catch(_0x4ab076){_0x500bd1[_0x5f4279(0x1a0)](_0x32ee59+':\x20'+_0x4ab076[_0x5f4279(0x1a4)]);}}return{'step':0x3,'label':_0x5f4279(0x191),'ok':_0x500bd1[_0x5f4279(0x19c)]===0x0,'detail':_0x500bd1[_0x5f4279(0x19c)]>0x0?_0x1da0a1['length']-_0x500bd1[_0x5f4279(0x19c)]+'/'+_0x1da0a1[_0x5f4279(0x19c)]+_0x5f4279(0x175)+_0x500bd1[_0x5f4279(0x151)](';\x20')+')':_0x1da0a1[_0x5f4279(0x19c)]+_0x5f4279(0x18e)};}function execCleanMcp(_0x3c92b7){const _0x1ed925=a172_0x5b27eb;if(!_0x3c92b7['oldMcpConfig'])return{'step':0x4,'label':_0x1ed925(0x196),'ok':!![],'detail':_0x1ed925(0x173)};try{const _0x22f3bd=readFileSync(_0x3c92b7[_0x1ed925(0x18b)]['path'],_0x1ed925(0x155)),_0x477117=JSON['parse'](_0x22f3bd);if(_0x477117?.['mcpServers']&&typeof _0x477117[_0x1ed925(0x1a9)]==='object'){const _0x1f2d95=[];for(const [_0x1fb5b3,_0x2d0dd7]of Object[_0x1ed925(0x154)](_0x477117['mcpServers'])){_0x2d0dd7?.[_0x1ed925(0x177)]&&Array['isArray'](_0x2d0dd7[_0x1ed925(0x177)])&&_0x2d0dd7[_0x1ed925(0x177)]['some'](_0x1c1c43=>typeof _0x1c1c43===_0x1ed925(0x190)&&_0x1c1c43[_0x1ed925(0x1ab)](_0x1ed925(0x169)))&&_0x1f2d95['push'](_0x1fb5b3);}for(const _0x211dad of _0x1f2d95){delete _0x477117[_0x1ed925(0x1a9)][_0x211dad];}return _0x1f2d95[_0x1ed925(0x19c)]>0x0&&writeFileSync(_0x3c92b7[_0x1ed925(0x18b)]['path'],JSON[_0x1ed925(0x179)](_0x477117,null,0x2)+'\x0a',_0x1ed925(0x155)),{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x1ed925(0x166)+_0x1f2d95[_0x1ed925(0x151)](',\x20')+_0x1ed925(0x15c)+_0x3c92b7[_0x1ed925(0x18b)]['path']};}return{'step':0x4,'label':_0x1ed925(0x196),'ok':!![],'detail':_0x1ed925(0x1a5)};}catch(_0x23bb60){return{'step':0x4,'label':_0x1ed925(0x196),'ok':![],'detail':_0x23bb60[_0x1ed925(0x1a4)]};}}function execSkillsRemove(_0x4afed3,_0x1bf901){const _0x14edd3=a172_0x5b27eb,_0x4e0e66=runNpxSkillsRemove(_0x4afed3,{'stdio':_0x14edd3(0x1c5),'yes':_0x1bf901});return{'step':0x5,'label':_0x14edd3(0x1ba),'ok':_0x4e0e66['ok'],'detail':_0x4e0e66['ok']?_0x14edd3(0x1b6):_0x4e0e66[_0x14edd3(0x17c)]??'exit\x20'+_0x4e0e66[_0x14edd3(0x17f)]};}function execSkillsAdd(_0x3d1d49,_0x26ad6c){const _0x21cd1d=a172_0x5b27eb,_0x3b36a5=runNpxSkillsAddGlobal(_0x3d1d49,_0x21cd1d(0x188),{'stdio':_0x21cd1d(0x1c5),'yes':_0x26ad6c});return{'step':0x6,'label':_0x21cd1d(0x17e),'ok':_0x3b36a5['ok'],'detail':_0x3b36a5['ok']?_0x21cd1d(0x1b5):_0x3b36a5[_0x21cd1d(0x17c)]??_0x21cd1d(0x1c9)+_0x3b36a5[_0x21cd1d(0x17f)]};}function execUpgradeSdk(_0x907769){const _0x5deb6c=a172_0x5b27eb;if(!_0x907769[_0x5deb6c(0x185)])return{'step':0x7,'label':_0x5deb6c(0x176),'ok':!![],'detail':_0x5deb6c(0x1c7)};const {pkgPath:_0x1f9024,currentVersion:_0x32bdad,field:_0x4add06}=_0x907769[_0x5deb6c(0x185)];try{const _0x4ef823=readFileSync(_0x1f9024,_0x5deb6c(0x155)),_0x492923=JSON[_0x5deb6c(0x15f)](_0x4ef823);return _0x492923[_0x4add06][_0x5deb6c(0x15e)]='latest',writeFileSync(_0x1f9024,JSON[_0x5deb6c(0x179)](_0x492923,null,0x2)+'\x0a','utf8'),{'step':0x7,'label':_0x5deb6c(0x176),'ok':!![],'detail':_0x4add06+_0x5deb6c(0x186)+_0x32bdad+_0x5deb6c(0x16a)};}catch(_0x14062c){return{'step':0x7,'label':_0x5deb6c(0x176),'ok':![],'detail':_0x14062c[_0x5deb6c(0x1a4)]};}}function tryStat(_0x287132){try{return statSync(_0x287132);}catch{return undefined;}}function printSummary(_0x4ff7fa){const _0x3fa729=a172_0x5b27eb;console[_0x3fa729(0x1b7)](''),console[_0x3fa729(0x1b7)](a172_0x3e572b[_0x3fa729(0x167)](_0x3fa729(0x15d))),console[_0x3fa729(0x1b7)]('');for(const _0x3c6d30 of _0x4ff7fa){const _0xc2b6cb=_0x3c6d30['ok']?a172_0x3e572b[_0x3fa729(0x1b0)]('OK'):a172_0x3e572b[_0x3fa729(0x183)]('FAIL');console['log']('\x20\x20'+_0xc2b6cb+_0x3fa729(0x1a6)+_0x3c6d30['step']+':\x20'+_0x3c6d30[_0x3fa729(0x1d1)]);if(_0x3c6d30[_0x3fa729(0x16b)])console[_0x3fa729(0x1b7)](_0x3fa729(0x189)+a172_0x3e572b[_0x3fa729(0x17d)](_0x3c6d30[_0x3fa729(0x16b)]));}console[_0x3fa729(0x1b7)]('');}export async function upgradeApp(_0x55915a,_0x2653a5){const _0xe3d76e=a172_0x5b27eb,_0x303719=process[_0xe3d76e(0x1bb)](),_0x41578d=analyse(_0x303719),_0x5845f5=!_0x41578d['configMigration']&&_0x41578d[_0xe3d76e(0x1cc)]['length']===0x0&&!_0x41578d['oldMcpConfig']&&!_0x41578d[_0xe3d76e(0x1b3)]&&!_0x41578d[_0xe3d76e(0x185)];if(_0x5845f5){console[_0xe3d76e(0x1b7)](a172_0x3e572b[_0xe3d76e(0x1b0)](_0xe3d76e(0x174)));return;}printReport(_0x41578d);const _0x8cda81=!!(_0x2653a5[_0xe3d76e(0x1a2)]||_0x2653a5['Y']||_0x55915a);if(!_0x8cda81)try{const _0xbefc8e=await askConfirm('Proceed\x20with\x20upgrade?');if(!_0xbefc8e){console['log'](a172_0x3e572b[_0xe3d76e(0x17d)](_0xe3d76e(0x1a1)));return;}}catch(_0x4d0474){if(_0x4d0474?.['message']==='CANCEL'){console[_0xe3d76e(0x1b7)](a172_0x3e572b[_0xe3d76e(0x17d)]('Upgrade\x20cancelled.'));return;}throw _0x4d0474;}const _0x1bcafa=[],_0x1e92dc=a172_0x4c6810({'text':_0xe3d76e(0x1ac),'color':'cyan'})[_0xe3d76e(0x159)](),_0x2ce51f=execConfigMigration(_0x41578d,_0x303719);_0x1bcafa['push'](_0x2ce51f),_0x1e92dc[_0x2ce51f['ok']?_0xe3d76e(0x19b):_0xe3d76e(0x1af)](_0xe3d76e(0x18a)+(_0x2ce51f[_0xe3d76e(0x16b)]??(_0x2ce51f['ok']?_0xe3d76e(0x180):'failed')));const _0x1c0893=resolve(_0x303719,'.lovrabet'),_0x2fca04=a172_0x4c6810({'text':'Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','color':_0xe3d76e(0x1b8)})[_0xe3d76e(0x159)]();if(existsSync(_0x1c0893))try{rmSync(_0x1c0893,{'recursive':!![],'force':!![]}),_0x2fca04[_0xe3d76e(0x19b)](_0xe3d76e(0x16e)),_0x1bcafa['push']({'step':0x2,'label':_0xe3d76e(0x192),'ok':!![]});}catch(_0x903aa7){_0x2fca04[_0xe3d76e(0x1af)](_0xe3d76e(0x15a)+_0x903aa7[_0xe3d76e(0x1a4)]),_0x1bcafa['push']({'step':0x2,'label':_0xe3d76e(0x192),'ok':![],'detail':_0x903aa7[_0xe3d76e(0x1a4)]});}else _0x2fca04[_0xe3d76e(0x172)]('Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped'),_0x1bcafa['push']({'step':0x2,'label':_0xe3d76e(0x192),'ok':!![],'detail':_0xe3d76e(0x173)});const _0x5f42e4=a172_0x4c6810({'text':_0xe3d76e(0x16c),'color':_0xe3d76e(0x1b8)})[_0xe3d76e(0x159)](),_0x25f082=execRemoveOldArtifacts(_0x41578d[_0xe3d76e(0x1cc)]);_0x1bcafa[_0xe3d76e(0x1a0)](_0x25f082),_0x5f42e4[_0x25f082['ok']?_0xe3d76e(0x19b):_0xe3d76e(0x1af)](_0xe3d76e(0x170)+(_0x25f082[_0xe3d76e(0x16b)]??(_0x25f082['ok']?_0xe3d76e(0x180):_0xe3d76e(0x171))));const _0x21aa67=a172_0x4c6810({'text':_0xe3d76e(0x15b),'color':_0xe3d76e(0x1b8)})[_0xe3d76e(0x159)](),_0x441f44=execCleanMcp(_0x41578d);_0x1bcafa['push'](_0x441f44),_0x21aa67[_0x441f44['ok']?_0xe3d76e(0x19b):_0xe3d76e(0x1af)](_0xe3d76e(0x194)+(_0x441f44[_0xe3d76e(0x16b)]??(_0x441f44['ok']?_0xe3d76e(0x180):'failed')));const _0x44f637=a172_0x4c6810({'text':'Step\x205/7:\x20Removing\x20old\x20skill...','color':'cyan'})[_0xe3d76e(0x159)](),_0x28842d=execSkillsRemove(_0x303719,_0x8cda81);_0x1bcafa[_0xe3d76e(0x1a0)](_0x28842d),_0x44f637[_0x28842d['ok']?_0xe3d76e(0x19b):_0xe3d76e(0x1af)](_0xe3d76e(0x1c0)+(_0x28842d['detail']??(_0x28842d['ok']?_0xe3d76e(0x180):'failed')));const _0x1f174a=a172_0x4c6810({'text':_0xe3d76e(0x19e),'color':_0xe3d76e(0x1b8)})['start'](),_0x33d7e9=execSkillsAdd(_0x303719,_0x8cda81);_0x1bcafa['push'](_0x33d7e9),_0x1f174a[_0x33d7e9['ok']?_0xe3d76e(0x19b):'fail'](_0xe3d76e(0x19a)+(_0x33d7e9[_0xe3d76e(0x16b)]??(_0x33d7e9['ok']?_0xe3d76e(0x180):_0xe3d76e(0x171))));const _0x34612c=a172_0x4c6810({'text':_0xe3d76e(0x164),'color':_0xe3d76e(0x1b8)})['start'](),_0x42d753=execUpgradeSdk(_0x41578d);_0x1bcafa[_0xe3d76e(0x1a0)](_0x42d753),_0x34612c[_0x42d753['ok']?_0xe3d76e(0x19b):'fail']('Step\x207/7:\x20@lovrabet/sdk\x20—\x20'+(_0x42d753['detail']??(_0x42d753['ok']?_0xe3d76e(0x180):'failed'))),printSummary(_0x1bcafa);const _0x24814b=_0x1bcafa[_0xe3d76e(0x1c8)](_0x3950f9=>!_0x3950f9['ok']);_0x24814b?console[_0xe3d76e(0x1b7)](a172_0x3e572b[_0xe3d76e(0x1a8)](_0xe3d76e(0x1b1))):console[_0xe3d76e(0x1b7)](a172_0x3e572b['green'](_0xe3d76e(0x165))),_0x42d753['ok']&&_0x41578d[_0xe3d76e(0x185)]&&(console[_0xe3d76e(0x1b7)](''),console['log'](a172_0x3e572b[_0xe3d76e(0x167)]['cyan'](_0xe3d76e(0x16d))),console[_0xe3d76e(0x1b7)](a172_0x3e572b[_0xe3d76e(0x1b8)](_0xe3d76e(0x178))),console['log'](''),console['log'](a172_0x3e572b[_0xe3d76e(0x1b9)]('\x20\x20npm\x20install')),console[_0xe3d76e(0x1b7)](a172_0x3e572b['white'](_0xe3d76e(0x18f))),console[_0xe3d76e(0x1b7)](a172_0x3e572b[_0xe3d76e(0x1b9)](_0xe3d76e(0x1cb))),console[_0xe3d76e(0x1b7)](''));}
@@ -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_0xe72ef0=a173_0x4514;(function(_0x264eda,_0x223d5e){const _0x7f75ab=a173_0x4514,_0x397df3=_0x264eda();while(!![]){try{const _0x2a408f=-parseInt(_0x7f75ab(0xe2))/0x1+parseInt(_0x7f75ab(0x12b))/0x2+parseInt(_0x7f75ab(0x12e))/0x3+-parseInt(_0x7f75ab(0x10e))/0x4+-parseInt(_0x7f75ab(0xe7))/0x5+-parseInt(_0x7f75ab(0x144))/0x6*(parseInt(_0x7f75ab(0x139))/0x7)+parseInt(_0x7f75ab(0x109))/0x8*(parseInt(_0x7f75ab(0xf5))/0x9);if(_0x2a408f===_0x223d5e)break;else _0x397df3['push'](_0x397df3['shift']());}catch(_0x4c01c9){_0x397df3['push'](_0x397df3['shift']());}}}(a173_0x2a07,0x9fd43));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';function a173_0x2a07(){const _0x5e88be=['rabetbase\x20project\x20create\x20<project-name>','`\x20has\x20been\x20removed.','bff:new','Configuration','API\x20Development','Schema','service','permit:page-get','install','Notification\x20Configuration','build','description','page:react-detail','OCR','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','Database\x20Connections','lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27','skills:','701036ODaExf','Run\x20any\x20package.json\x20script','knowledge-base:create','887229PgXdhQ','rabetbase\x20run\x20preview','Project','rabetbase\x20sql\x20create','skill:','rabetbase\x20workspace\x20use\x20--app\x20<name>','\x20\x20[','values','role:create','CLI\x20Built-in\x20Skill','set','56AQiLKL','rabetbase\x20auth\x20logout','User\x20Accounts','rabetbase\x20kb\x20update','hidden','app:remote','Async\x20Tasks','rabetbase\x20run\x20start','rabetbase\x20page\x20custom-detail','has','start','533982QBpQeH','knowledge-base:delete','Workspace','isSingleCommand','get','rabetbase\x20cli-skill\x20install','Authentication','knowledge-base:detail','sql:save','read','Diagnostics','create','rabetbase\x20workspace\x20remove\x20<name>','defaultCommand','398641rbJQxs','knowledge-base:update','rabetbase\x20kb\x20delete','permit:role-apis-set','permit:page-set','4608960YxAPei','rabetbase\x20run\x20build','rabetbase\x20menu\x20asset-update','Data\x20List\x20Pages\x20&\x20Custom\x20Pages','SQL\x20Queries','app:use','Company\x20Knowledge\x20Base','rabetbase\x20page\x20custom-update','from','rabetbase\x20app\x20list\x20--remote','data:filter','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','Backend\x20Function\x20Scripts','skill:install','99FlEQIU','risk','page:react-create','Platform\x20Issue','Menu','page:react-update','Self\x20Update','Run\x20Scripts','`rabetbase\x20','<script>','permit:role-menus','menu:update','commands','rabetbase\x20kb\x20create','Code\x20Generation','permit:role-menus-set','show','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27<json>\x27','app:add','page:custom-create','2103208KUgjpE','Tenant\x20Members','skills:install','rabetbase\x20bff\x20create','\x20\x20[high-risk-write]','3404416BPXXSD','project:init','command','write','page:standard-page-status','Logs','app:remove','wildcardDef','rabetbase\x20page\x20create\x20--page-pattern\x20BLANK','App\x20Management','File'];a173_0x2a07=function(){return _0x5e88be;};return a173_0x2a07();}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(_0x1cb05b){const _0x253217=a173_0x4514;for(const _0x42894d of _0x1cb05b){definitions['set'](_0x42894d[_0x253217(0x11f)]+':'+_0x42894d[_0x253217(0x110)],_0x42894d);let _0x2af7a7=serviceGroups[_0x253217(0x148)](_0x42894d['service']);!_0x2af7a7&&(_0x2af7a7=[],serviceGroups[_0x253217(0x138)](_0x42894d['service'],_0x2af7a7)),_0x2af7a7['push'](_0x42894d);}}function registerDeclarativeService(_0x4b2f73,_0x3263de,_0x5c000e){const _0x477fad=a173_0x4514;registerDefinitions(_0x3263de);_0x5c000e?.[_0x477fad(0x115)]&&registerDefinitions([_0x5c000e[_0x477fad(0x115)]]);const _0x249dcc=_0x3faea7=>_0x3faea7===_0x477fad(0x14d)?'':_0x3faea7===_0x477fad(0x111)?'\x20\x20[write]':_0x477fad(0x10d),_0x407285={'service':_0x3263de[0x0][_0x477fad(0x11f)],'label':_0x4b2f73,'commands':_0x3263de['filter'](_0x3ac56f=>!_0x3ac56f[_0x477fad(0x13d)])['map'](_0x271fe8=>({'command':_0x271fe8[_0x477fad(0x110)],'description':_0x271fe8[_0x477fad(0x124)],'tag':_0x249dcc(_0x271fe8[_0x477fad(0xf6)])})),'declarative':!![],'defaultCommand':_0x5c000e?.[_0x477fad(0xe1)]??(_0x5c000e?.[_0x477fad(0x147)]?_0x3263de[0x0][_0x477fad(0x110)]:undefined),'wildcardDef':_0x5c000e?.[_0x477fad(0x115)],'isSingleCommand':_0x5c000e?.[_0x477fad(0x147)]};serviceRegistry['push'](_0x407285),serviceByName[_0x477fad(0x138)](_0x407285['service'],_0x407285);}registerDeclarativeService(a173_0xe72ef0(0x130),projectDefinitions),registerDeclarativeService(a173_0xe72ef0(0x146),workspaceDefinitions),registerDeclarativeService(a173_0xe72ef0(0x117),appDefinitions),registerDeclarativeService(a173_0xe72ef0(0x14a),authDefinitions,{'defaultCommand':'login'}),registerDeclarativeService(a173_0xe72ef0(0x10a),tenantDefinitions),registerDeclarativeService(a173_0xe72ef0(0x13b),userAccountDefinitions),registerDeclarativeService('Dataset\x20&\x20Operations',datasetDefinitions),registerDeclarativeService(a173_0xe72ef0(0xea),pageDefinitions),registerDeclarativeService(a173_0xe72ef0(0x11d),apiDefinitions),registerDeclarativeService(a173_0xe72ef0(0xf3),bffDefinitions),registerDeclarativeService(a173_0xe72ef0(0x122),notificationDefinitions),registerDeclarativeService(a173_0xe72ef0(0xeb),sqlDefinitions),registerDeclarativeService(a173_0xe72ef0(0x128),dbDefinitions),registerDeclarativeService(a173_0xe72ef0(0xf9),menuDefinitions),registerDeclarativeService(a173_0xe72ef0(0x13f),taskDefinitions),registerDeclarativeService('Roles',roleDefinitions),registerDeclarativeService('Runtime\x20App\x20Config\x20Management',appConfigDefinitions),registerDeclarativeService(a173_0xe72ef0(0xed),kbDefinitions),registerDeclarativeService(a173_0xe72ef0(0xf8),issueDefinitions),registerDeclarativeService(a173_0xe72ef0(0x118),fileDefinitions),registerDeclarativeService(a173_0xe72ef0(0x126),ocrDefinitions),registerDeclarativeService(a173_0xe72ef0(0x103),codegenDefinitions),registerDeclarativeService(a173_0xe72ef0(0x11c),configDefinitions),registerDeclarativeService(a173_0xe72ef0(0xde),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a173_0xe72ef0(0x11e),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a173_0xe72ef0(0xfb),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a173_0xe72ef0(0x137),cliSkillDefinitions,{'defaultCommand':a173_0xe72ef0(0x121)}),registerDeclarativeService(a173_0xe72ef0(0x113),logsDefinitions,{'defaultCommand':a173_0xe72ef0(0x105)}),registerDeclarativeService(a173_0xe72ef0(0xfc),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry['length']-0x1];last[a173_0xe72ef0(0x101)]=[{'command':a173_0xe72ef0(0xfe),'description':a173_0xe72ef0(0x12c),'tag':a173_0xe72ef0(0x134)+runDefinition[a173_0xe72ef0(0xf6)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a173_0xe72ef0(0x14c),a173_0xe72ef0(0x127)],[a173_0xe72ef0(0x11b),a173_0xe72ef0(0x10c)],['sql:new',a173_0xe72ef0(0x131)],[a173_0xe72ef0(0x100),a173_0xe72ef0(0xe9)],[a173_0xe72ef0(0x10f),'rabetbase\x20workspace\x20init\x20--appcode\x20<code>'],[a173_0xe72ef0(0x132),a173_0xe72ef0(0x149)],[a173_0xe72ef0(0xf4),a173_0xe72ef0(0x149)],[a173_0xe72ef0(0x12a),a173_0xe72ef0(0x149)],[a173_0xe72ef0(0x10b),a173_0xe72ef0(0x149)],[a173_0xe72ef0(0x13e),a173_0xe72ef0(0xf0)],[a173_0xe72ef0(0xec),a173_0xe72ef0(0x133)],[a173_0xe72ef0(0x107),'rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>'],[a173_0xe72ef0(0x114),a173_0xe72ef0(0xe0)],['knowledge-base:list','rabetbase\x20kb\x20list'],[a173_0xe72ef0(0x14b),'rabetbase\x20kb\x20detail'],[a173_0xe72ef0(0x12d),a173_0xe72ef0(0x102)],[a173_0xe72ef0(0xe3),a173_0xe72ef0(0x13c)],[a173_0xe72ef0(0x145),a173_0xe72ef0(0xe4)],[a173_0xe72ef0(0x136),'rabetbase\x20role\x20list'],[a173_0xe72ef0(0xf1),a173_0xe72ef0(0x106)],['data:getOne',a173_0xe72ef0(0x129)],[a173_0xe72ef0(0x112),'rabetbase\x20page\x20data-list-status'],[a173_0xe72ef0(0xf7),a173_0xe72ef0(0x116)],[a173_0xe72ef0(0x108),a173_0xe72ef0(0x116)],['page:react-list','rabetbase\x20page\x20custom-list'],[a173_0xe72ef0(0x125),a173_0xe72ef0(0x141)],[a173_0xe72ef0(0xfa),a173_0xe72ef0(0xee)],['page:react-publish','rabetbase\x20page\x20custom-publish']]),REMOVED_COMMAND_HINTS=new Map([[a173_0xe72ef0(0x120),a173_0xe72ef0(0xf2)],[a173_0xe72ef0(0xe6),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a173_0xe72ef0(0xff),a173_0xe72ef0(0xf2)],[a173_0xe72ef0(0x104),a173_0xe72ef0(0xf2)],[a173_0xe72ef0(0xe5),a173_0xe72ef0(0xf2)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a173_0xe72ef0(0xdf),a173_0xe72ef0(0x119)],[a173_0xe72ef0(0x143),a173_0xe72ef0(0x140)],[a173_0xe72ef0(0x123),a173_0xe72ef0(0xe8)],['preview',a173_0xe72ef0(0x12f)],['logout',a173_0xe72ef0(0x13a)]]);export function resolveRemovedCommand(_0x38b348,_0x316760){const _0x3cb094=a173_0xe72ef0;if(!_0x38b348)return undefined;const _0x337c38=REMOVED_COMMAND_REPLACEMENTS['get'](_0x38b348+':'+(_0x316760??'')),_0xe6c2c7=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x3cb094(0x148)](_0x38b348),_0x3a87c2=_0x337c38??_0xe6c2c7,_0x379f2c=REMOVED_COMMAND_HINTS[_0x3cb094(0x148)](_0x38b348+':'+(_0x316760??''));if(!_0x3a87c2&&!_0x379f2c)return undefined;const _0x28bca3=_0xe6c2c7?_0x38b348:_0x316760?_0x38b348+'\x20'+_0x316760:_0x38b348;return{'command':_0x28bca3,'message':_0x3cb094(0xfd)+_0x28bca3+_0x3cb094(0x11a),'hint':_0x379f2c??'Use\x20`'+_0x3a87c2+'`\x20instead.'};}function a173_0x4514(_0x1736d8,_0x2c2f0c){_0x1736d8=_0x1736d8-0xde;const _0x2a07e1=a173_0x2a07();let _0x4514b3=_0x2a07e1[_0x1736d8];return _0x4514b3;}export function findDefinition(_0x504ce9,_0x458be5){const _0x3f7d49=a173_0xe72ef0;return definitions[_0x3f7d49(0x148)](_0x504ce9+':'+_0x458be5);}export function isKnownService(_0x5a6ac9){const _0x200adc=a173_0xe72ef0;return serviceByName[_0x200adc(0x142)](_0x5a6ac9);}export function isDeclarativeService(_0x98b630){const _0x4b1303=a173_0xe72ef0;return serviceGroups[_0x4b1303(0x142)](_0x98b630)||serviceByName[_0x4b1303(0x148)](_0x98b630)?.['wildcardDef']!==undefined;}export function getServiceEntry(_0x311490){return serviceByName['get'](_0x311490);}export function getLegacyHandler(_0x42c343,_0xf07dc2){return undefined;}export function getAllDefinitions(){const _0x4a5056=a173_0xe72ef0;return Array[_0x4a5056(0xef)](definitions[_0x4a5056(0x135)]());}
@@ -1 +1 @@
1
- const a174_0x224695=a174_0x2806;(function(_0x20a450,_0x24c1b2){const _0x1a09f3=a174_0x2806,_0x2720d7=_0x20a450();while(!![]){try{const _0x305ce9=-parseInt(_0x1a09f3(0x8e))/0x1*(parseInt(_0x1a09f3(0x97))/0x2)+parseInt(_0x1a09f3(0x85))/0x3*(parseInt(_0x1a09f3(0x84))/0x4)+parseInt(_0x1a09f3(0x92))/0x5*(-parseInt(_0x1a09f3(0x7f))/0x6)+-parseInt(_0x1a09f3(0x93))/0x7*(-parseInt(_0x1a09f3(0x87))/0x8)+parseInt(_0x1a09f3(0x7e))/0x9*(-parseInt(_0x1a09f3(0x90))/0xa)+-parseInt(_0x1a09f3(0x7d))/0xb*(parseInt(_0x1a09f3(0x8b))/0xc)+-parseInt(_0x1a09f3(0x86))/0xd*(-parseInt(_0x1a09f3(0x8d))/0xe);if(_0x305ce9===_0x24c1b2)break;else _0x2720d7['push'](_0x2720d7['shift']());}catch(_0x3c20bd){_0x2720d7['push'](_0x2720d7['shift']());}}}(a174_0x108b,0x2f177));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a174_0x2806(_0x578d06,_0x597ea5){_0x578d06=_0x578d06-0x7d;const _0x108bbe=a174_0x108b();let _0x2806cf=_0x108bbe[_0x578d06];return _0x2806cf;}import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a174_0x108b(){const _0x57a2a0=['num','Deleted\x20role\x20','4284Gxbjiw','delete','14463176nDBfOn','163369krnWYB','role','156580ezMCFU','Role\x20still\x20has\x20','27130WFCOgh','49161aSsQPb','dev','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','roleName','4SyNzxh','6886NqaNco','171ApTYpK','288aBLnet','POST','high-risk-write','appCode','userCount','4SHrGcy','382539pBznkL','13blIGsu','160zBOAJs','/smartapi/permit/role/delete'];a174_0x108b=function(){return _0x57a2a0;};return a174_0x108b();}const DELETE_PATH=a174_0x224695(0x88);export const roleDelete={'service':a174_0x224695(0x8f),'command':a174_0x224695(0x8c),'description':'Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','risk':a174_0x224695(0x81),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x554227){const _0x5802f0=a174_0x224695,_0x31f1cc=_0x554227[_0x5802f0(0x89)]('id'),_0x452a93=await getRoleById(_0x554227[_0x5802f0(0x82)],_0x31f1cc);return assertCustomRole(_0x452a93,_0x5802f0(0x8c)),asDryRunResult({'scope':'dev','operation':_0x5802f0(0x8c),'selector':{'appCode':_0x554227['appCode'],'roleId':_0x31f1cc,'roleName':_0x452a93[_0x5802f0(0x96)]},'before':projectRole(_0x452a93),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x452a93[_0x5802f0(0x83)]>0x0?[_0x5802f0(0x91)+_0x452a93[_0x5802f0(0x83)]+_0x5802f0(0x95)]:[]},{'method':_0x5802f0(0x80),'url':DELETE_PATH});},async 'execute'(_0x452e13){const _0x3b6c24=a174_0x224695,_0x156b0a=_0x452e13[_0x3b6c24(0x89)]('id'),_0x352691=await getRoleById(_0x452e13[_0x3b6c24(0x82)],_0x156b0a);return assertCustomRole(_0x352691,'delete'),await deleteAppRole(_0x156b0a),{'ok':!![],'data':{'scope':_0x3b6c24(0x94),'operation':_0x3b6c24(0x8c),'selector':{'appCode':_0x452e13[_0x3b6c24(0x82)],'roleId':_0x156b0a,'roleName':_0x352691[_0x3b6c24(0x96)]},'before':projectRole(_0x352691),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[]},'message':_0x3b6c24(0x8a)+_0x352691[_0x3b6c24(0x96)]+'\x20(id='+_0x156b0a+')'};}};
1
+ const a174_0x5c0367=a174_0x39a5;(function(_0x2ce8dd,_0x1d6504){const _0x5399a8=a174_0x39a5,_0x39bd14=_0x2ce8dd();while(!![]){try{const _0x4ceb82=-parseInt(_0x5399a8(0x16a))/0x1*(-parseInt(_0x5399a8(0x164))/0x2)+-parseInt(_0x5399a8(0x166))/0x3*(-parseInt(_0x5399a8(0x15f))/0x4)+parseInt(_0x5399a8(0x167))/0x5*(-parseInt(_0x5399a8(0x15c))/0x6)+parseInt(_0x5399a8(0x16c))/0x7+-parseInt(_0x5399a8(0x16e))/0x8+-parseInt(_0x5399a8(0x163))/0x9*(parseInt(_0x5399a8(0x15b))/0xa)+parseInt(_0x5399a8(0x15e))/0xb;if(_0x4ceb82===_0x1d6504)break;else _0x39bd14['push'](_0x39bd14['shift']());}catch(_0x5ae98c){_0x39bd14['push'](_0x39bd14['shift']());}}}(a174_0x39c2,0x22c92));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH=a174_0x5c0367(0x16b);function a174_0x39c2(){const _0x23056f=['28fiurRp','num','3EXMHUQ','16045gcCYTv','appCode','Role\x20still\x20has\x20','7013fKEvwB','/smartapi/permit/role/delete','1630167CjQHlx','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','2274296dOfvZr','Deleted\x20role\x20','userCount','170PXygOU','366opEfsD','dev','4772603xSXNfp','163436qdRLnC','roleName','delete','\x20(id=','97029LOoKfn'];a174_0x39c2=function(){return _0x23056f;};return a174_0x39c2();}function a174_0x39a5(_0x24eb89,_0x197932){_0x24eb89=_0x24eb89-0x15b;const _0x39c2e9=a174_0x39c2();let _0x39a53b=_0x39c2e9[_0x24eb89];return _0x39a53b;}export const roleDelete={'service':'role','command':'delete','description':a174_0x5c0367(0x16d),'risk':'high-risk-write','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x363763){const _0x3f98e1=a174_0x5c0367,_0x312437=_0x363763[_0x3f98e1(0x165)]('id'),_0x4c5a62=await getRoleById(_0x363763[_0x3f98e1(0x168)],_0x312437);return assertCustomRole(_0x4c5a62,'delete'),asDryRunResult({'scope':_0x3f98e1(0x15d),'operation':_0x3f98e1(0x161),'selector':{'appCode':_0x363763['appCode'],'roleId':_0x312437,'roleName':_0x4c5a62[_0x3f98e1(0x160)]},'before':projectRole(_0x4c5a62),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x4c5a62[_0x3f98e1(0x170)]>0x0?[_0x3f98e1(0x169)+_0x4c5a62[_0x3f98e1(0x170)]+'\x20member(s);\x20they\x20will\x20lose\x20this\x20group.']:[]},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x54013e){const _0x2a7afa=a174_0x5c0367,_0x51edbb=_0x54013e['num']('id'),_0x368e87=await getRoleById(_0x54013e[_0x2a7afa(0x168)],_0x51edbb);return assertCustomRole(_0x368e87,_0x2a7afa(0x161)),await deleteAppRole(_0x51edbb),{'ok':!![],'data':{'scope':_0x2a7afa(0x15d),'operation':'delete','selector':{'appCode':_0x54013e[_0x2a7afa(0x168)],'roleId':_0x51edbb,'roleName':_0x368e87['roleName']},'before':projectRole(_0x368e87),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[]},'message':_0x2a7afa(0x16f)+_0x368e87[_0x2a7afa(0x160)]+_0x2a7afa(0x162)+_0x51edbb+')'};}};
@@ -1 +1 @@
1
- const a175_0x3c15d6=a175_0x489a;(function(_0x16df41,_0xe38ddd){const _0x2be9a4=a175_0x489a,_0xe5e3d7=_0x16df41();while(!![]){try{const _0x530cae=parseInt(_0x2be9a4(0x126))/0x1*(parseInt(_0x2be9a4(0x121))/0x2)+parseInt(_0x2be9a4(0x125))/0x3+parseInt(_0x2be9a4(0x120))/0x4+parseInt(_0x2be9a4(0x11c))/0x5+-parseInt(_0x2be9a4(0x123))/0x6+-parseInt(_0x2be9a4(0x127))/0x7*(-parseInt(_0x2be9a4(0x119))/0x8)+-parseInt(_0x2be9a4(0x11f))/0x9;if(_0x530cae===_0xe38ddd)break;else _0xe5e3d7['push'](_0xe5e3d7['shift']());}catch(_0x5e4f0d){_0xe5e3d7['push'](_0xe5e3d7['shift']());}}}(a175_0xc73e,0x75a97));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a175_0x489a(_0x33e3cc,_0x2bb3d5){_0x33e3cc=_0x33e3cc-0x118;const _0xc73eaf=a175_0xc73e();let _0x489a6d=_0xc73eaf[_0x33e3cc];return _0x489a6d;}function a175_0xc73e(){const _0x1c595c=['3101veWRru','11487GnwSpQ','Show\x20a\x20single\x20role\x27s\x20detail','1824KKQTzd','dev','Role\x20','1228535yXJmTK','roleType','num','17341353MCpCBV','2340892ohizPY','446fpsRpo','read','649374IfFGPl','detail','1861164oqGefR'];a175_0xc73e=function(){return _0x1c595c;};return a175_0xc73e();}export const roleDetail={'service':'role','command':a175_0x3c15d6(0x124),'description':a175_0x3c15d6(0x118),'risk':a175_0x3c15d6(0x122),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x157107){const _0x555052=a175_0x3c15d6,_0x29d816=_0x157107[_0x555052(0x11e)]('id'),_0x126aae=await getRoleById(_0x157107['appCode'],_0x29d816);return{'ok':!![],'data':{'scope':_0x555052(0x11a),'role':projectRole(_0x126aae)},'message':_0x555052(0x11b)+_0x126aae['roleName']+'\x20('+_0x126aae[_0x555052(0x11d)]+')'};}};
1
+ function a175_0x429f(_0x291a0f,_0x221601){_0x291a0f=_0x291a0f-0x183;const _0x3d2827=a175_0x3d28();let _0x429fa2=_0x3d2827[_0x291a0f];return _0x429fa2;}const a175_0x44c5a2=a175_0x429f;function a175_0x3d28(){const _0x462676=['read','dev','Role\x20','roleName','1035505RIdzkP','detail','appCode','4769862kZSdIj','12BeJKgq','num','35AmvgcH','1199737lNTYdg','4hcXfzq','36600DQucvK','2196280BshPdk','role','18MPWwOv','107530BgvQvI','4jrAlLX','2967318TCQevV'];a175_0x3d28=function(){return _0x462676;};return a175_0x3d28();}(function(_0xf6d1a0,_0x23c0ca){const _0x1c9a8f=a175_0x429f,_0x30baa1=_0xf6d1a0();while(!![]){try{const _0xafbd60=parseInt(_0x1c9a8f(0x18e))/0x1*(-parseInt(_0x1c9a8f(0x189))/0x2)+parseInt(_0x1c9a8f(0x190))/0x3+parseInt(_0x1c9a8f(0x18f))/0x4*(parseInt(_0x1c9a8f(0x195))/0x5)+-parseInt(_0x1c9a8f(0x184))/0x6+-parseInt(_0x1c9a8f(0x187))/0x7*(-parseInt(_0x1c9a8f(0x18a))/0x8)+parseInt(_0x1c9a8f(0x18d))/0x9*(parseInt(_0x1c9a8f(0x18b))/0xa)+-parseInt(_0x1c9a8f(0x188))/0xb*(parseInt(_0x1c9a8f(0x185))/0xc);if(_0xafbd60===_0x23c0ca)break;else _0x30baa1['push'](_0x30baa1['shift']());}catch(_0x487f13){_0x30baa1['push'](_0x30baa1['shift']());}}}(a175_0x3d28,0x83a62));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a175_0x44c5a2(0x18c),'command':a175_0x44c5a2(0x196),'description':'Show\x20a\x20single\x20role\x27s\x20detail','risk':a175_0x44c5a2(0x191),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x6130d3){const _0x4654a3=a175_0x44c5a2,_0x3a353d=_0x6130d3[_0x4654a3(0x186)]('id'),_0x387e26=await getRoleById(_0x6130d3[_0x4654a3(0x183)],_0x3a353d);return{'ok':!![],'data':{'scope':_0x4654a3(0x192),'role':projectRole(_0x387e26)},'message':_0x4654a3(0x193)+_0x387e26[_0x4654a3(0x194)]+'\x20('+_0x387e26['roleType']+')'};}};
@@ -1 +1 @@
1
- (function(_0x38e8f1,_0x43b65e){const _0x3d5a71=a176_0x461a,_0x673a40=_0x38e8f1();while(!![]){try{const _0x2cdba4=-parseInt(_0x3d5a71(0x116))/0x1+parseInt(_0x3d5a71(0x114))/0x2+parseInt(_0x3d5a71(0x11a))/0x3*(parseInt(_0x3d5a71(0x117))/0x4)+parseInt(_0x3d5a71(0x115))/0x5*(parseInt(_0x3d5a71(0x11b))/0x6)+-parseInt(_0x3d5a71(0x118))/0x7+parseInt(_0x3d5a71(0x113))/0x8+-parseInt(_0x3d5a71(0x119))/0x9*(-parseInt(_0x3d5a71(0x112))/0xa);if(_0x2cdba4===_0x43b65e)break;else _0x673a40['push'](_0x673a40['shift']());}catch(_0x53fec9){_0x673a40['push'](_0x673a40['shift']());}}}(a176_0x39e1,0x51f10));function a176_0x39e1(){const _0x51c810=['350133gfFWGL','556204gONIhm','3015383MWdSwz','207aGMfZX','3lsLhhm','6QEbBnP','133670mSueqq','581568BBwdqy','74676pTHfJz','2800040YYLQdP'];a176_0x39e1=function(){return _0x51c810;};return a176_0x39e1();}function a176_0x461a(_0x3bdc4b,_0xba99c4){_0x3bdc4b=_0x3bdc4b-0x112;const _0x39e17a=a176_0x39e1();let _0x461ae2=_0x39e17a[_0x3bdc4b];return _0x461ae2;}import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
1
+ (function(_0x406e1d,_0x3fcc3c){const _0x476d57=a176_0x3a4e,_0x54fb7f=_0x406e1d();while(!![]){try{const _0x25c97c=parseInt(_0x476d57(0x1f8))/0x1*(-parseInt(_0x476d57(0x1f3))/0x2)+-parseInt(_0x476d57(0x1f6))/0x3+-parseInt(_0x476d57(0x1f0))/0x4*(parseInt(_0x476d57(0x1f5))/0x5)+parseInt(_0x476d57(0x1f7))/0x6+-parseInt(_0x476d57(0x1f4))/0x7*(-parseInt(_0x476d57(0x1f1))/0x8)+-parseInt(_0x476d57(0x1f9))/0x9+parseInt(_0x476d57(0x1f2))/0xa;if(_0x25c97c===_0x3fcc3c)break;else _0x54fb7f['push'](_0x54fb7f['shift']());}catch(_0x2a85d1){_0x54fb7f['push'](_0x54fb7f['shift']());}}}(a176_0x462f,0x9d1a7));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleUpdate}from'../../commands/role/update.js';function a176_0x462f(){const _0x2ca440=['20eNdXtA','225424TMGHFZ','16224350gLYNlq','8DYzQQz','203SpGPhm','803915pbJguO','2083593iYRWGv','5703534nMJIWk','180429BFvgMd','4738761DITfQh'];a176_0x462f=function(){return _0x2ca440;};return a176_0x462f();}function a176_0x3a4e(_0xf2f9bf,_0xf9430e){_0xf2f9bf=_0xf2f9bf-0x1f0;const _0x462f35=a176_0x462f();let _0x3a4e5c=_0x462f35[_0xf2f9bf];return _0x3a4e5c;}import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
@@ -1 +1 @@
1
- function a177_0x28d0(){const _0x5f33a9=['Page\x20index\x20(1-based)','pagesize','includes','4057910dgGfPQ','2079720qzyCxR','length','join','number','1602636REVOrI','type','\x20role(s)','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','DEV','roleType','1112340omBWcS','page','role','CUSTOM','trim','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','map','toUpperCase','Filter\x20by\x20role\x20type','Found\x20','654222PaayOX','Page\x20size\x20(1-100)','Use\x20one\x20of:\x20','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','str','744424NHjZvg','1831970qxgniQ','8MThUXT','12ItfgKp','Invalid\x20--type\x20\x22','num','OWNER','appCode','validation'];a177_0x28d0=function(){return _0x5f33a9;};return a177_0x28d0();}const a177_0x5e73b9=a177_0x4dea;function a177_0x4dea(_0x5f3f42,_0x17a2b0){_0x5f3f42=_0x5f3f42-0xf2;const _0x28d0c8=a177_0x28d0();let _0x4dea76=_0x28d0c8[_0x5f3f42];return _0x4dea76;}(function(_0x279521,_0x585bb3){const _0x59fd4b=a177_0x4dea,_0x3bf673=_0x279521();while(!![]){try{const _0x3ca613=-parseInt(_0x59fd4b(0xf3))/0x1+parseInt(_0x59fd4b(0xf9))/0x2+-parseInt(_0x59fd4b(0xfb))/0x3*(parseInt(_0x59fd4b(0xf8))/0x4)+parseInt(_0x59fd4b(0x104))/0x5+parseInt(_0x59fd4b(0x10f))/0x6+parseInt(_0x59fd4b(0x109))/0x7*(-parseInt(_0x59fd4b(0xfa))/0x8)+parseInt(_0x59fd4b(0x105))/0x9;if(_0x3ca613===_0x585bb3)break;else _0x3bf673['push'](_0x3bf673['shift']());}catch(_0x573688){_0x3bf673['push'](_0x3bf673['shift']());}}}(a177_0x28d0,0x7e15b));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=['ADMIN',a177_0x5e73b9(0x10d),a177_0x5e73b9(0xfe),a177_0x5e73b9(0x112)];export const roleList={'service':a177_0x5e73b9(0x111),'command':'list','description':a177_0x5e73b9(0xf6),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a177_0x5e73b9(0x10a),'type':'string','required':![],'description':a177_0x5e73b9(0x117),'enum':ROLE_TYPES},{'name':'page','type':'number','description':a177_0x5e73b9(0x101),'default':0x1},{'name':'pagesize','type':a177_0x5e73b9(0x108),'description':a177_0x5e73b9(0xf4),'default':0x64}],async 'validate'(_0x41754d){const _0x227612=a177_0x5e73b9,_0x492f3a=_0x41754d[_0x227612(0xf7)]('type')[_0x227612(0x113)]();if(_0x492f3a&&!ROLE_TYPES[_0x227612(0x103)](_0x492f3a[_0x227612(0x116)]()))throw CliErrors[_0x227612(0x100)](_0x227612(0xfc)+_0x492f3a+'\x22.',_0x227612(0xf5)+ROLE_TYPES[_0x227612(0x107)](',\x20')+'.');const _0xeae30c=_0x41754d[_0x227612(0xfd)](_0x227612(0x110),0x1),_0x50082c=_0x41754d['num'](_0x227612(0x102),0x64);if(_0xeae30c<0x1)throw CliErrors[_0x227612(0x100)](_0x227612(0x10c));if(_0x50082c<0x1||_0x50082c>0x64)throw CliErrors[_0x227612(0x100)](_0x227612(0x114));},async 'execute'(_0x1770f1){const _0xba6802=a177_0x5e73b9,_0x55eaff=_0x1770f1[_0xba6802(0xfd)](_0xba6802(0x110),0x1)||0x1,_0x1f2958=_0x1770f1[_0xba6802(0xfd)]('pagesize',0x64)||0x64,_0x272076=_0x1770f1['str'](_0xba6802(0x10a))[_0xba6802(0x113)]()[_0xba6802(0x116)](),{items:_0x2b0e25,paging:_0x1e3cfa}=await listAppRoles(_0x1770f1[_0xba6802(0xff)],{'currentPage':_0x55eaff,'pageSize':_0x1f2958}),_0x178536=_0x272076?_0x2b0e25['filter'](_0x41a038=>_0x41a038[_0xba6802(0x10e)]===_0x272076):_0x2b0e25,_0x137384=_0x178536[_0xba6802(0x115)](projectRole);return{'ok':!![],'data':{'scope':'dev','roles':_0x137384,'paging':_0x1e3cfa},'message':_0xba6802(0xf2)+_0x137384[_0xba6802(0x106)]+_0xba6802(0x10b)};}};
1
+ const a177_0x3a2e43=a177_0x478a;function a177_0x478a(_0xa0c3fd,_0x4d8b1d){_0xa0c3fd=_0xa0c3fd-0x89;const _0x1c4b95=a177_0x1c4b();let _0x478a55=_0x1c4b95[_0xa0c3fd];return _0x478a55;}(function(_0x380c74,_0x3b2d26){const _0x3c7387=a177_0x478a,_0x385dda=_0x380c74();while(!![]){try{const _0x40bb5d=parseInt(_0x3c7387(0x9e))/0x1+-parseInt(_0x3c7387(0xa2))/0x2*(-parseInt(_0x3c7387(0x8d))/0x3)+-parseInt(_0x3c7387(0xa4))/0x4+parseInt(_0x3c7387(0x9f))/0x5*(parseInt(_0x3c7387(0x9d))/0x6)+parseInt(_0x3c7387(0x8e))/0x7*(-parseInt(_0x3c7387(0x94))/0x8)+-parseInt(_0x3c7387(0xa6))/0x9+parseInt(_0x3c7387(0x99))/0xa;if(_0x40bb5d===_0x3b2d26)break;else _0x385dda['push'](_0x385dda['shift']());}catch(_0x2ea52a){_0x385dda['push'](_0x385dda['shift']());}}}(a177_0x1c4b,0xc3869));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a177_0x1c4b(){const _0x14e0a0=['trim','validation','role','54zWxCRv','348603JiBAfO','610455eNxmGa','length','pagesize','186182plGXXF','DEV','2648676wzegiJ','CUSTOM','1121229CTFylF','Filter\x20by\x20role\x20type','str','read','number','type','dev','num','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','Use\x20one\x20of:\x20','Page\x20index\x20(1-based)','roleType','6AnNEQd','994wxhuDe','toUpperCase','join','Invalid\x20--type\x20\x22','Found\x20','map','39448GcdYJy','OWNER','page','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','ADMIN','6542210TZVyLV'];a177_0x1c4b=function(){return _0x14e0a0;};return a177_0x1c4b();}import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a177_0x3a2e43(0x98),a177_0x3a2e43(0xa3),a177_0x3a2e43(0x95),a177_0x3a2e43(0xa5)];export const roleList={'service':a177_0x3a2e43(0x9c),'command':'list','description':'List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','risk':a177_0x3a2e43(0xa9),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':'string','required':![],'description':a177_0x3a2e43(0xa7),'enum':ROLE_TYPES},{'name':a177_0x3a2e43(0x96),'type':'number','description':a177_0x3a2e43(0x8b),'default':0x1},{'name':'pagesize','type':a177_0x3a2e43(0xaa),'description':'Page\x20size\x20(1-100)','default':0x64}],async 'validate'(_0x2b4dcf){const _0x358d3e=a177_0x3a2e43,_0x1c5004=_0x2b4dcf[_0x358d3e(0xa8)](_0x358d3e(0xab))[_0x358d3e(0x9a)]();if(_0x1c5004&&!ROLE_TYPES['includes'](_0x1c5004['toUpperCase']()))throw CliErrors['validation'](_0x358d3e(0x91)+_0x1c5004+'\x22.',_0x358d3e(0x8a)+ROLE_TYPES[_0x358d3e(0x90)](',\x20')+'.');const _0x39fb3a=_0x2b4dcf[_0x358d3e(0xad)](_0x358d3e(0x96),0x1),_0x2e67e5=_0x2b4dcf[_0x358d3e(0xad)](_0x358d3e(0xa1),0x64);if(_0x39fb3a<0x1)throw CliErrors[_0x358d3e(0x9b)](_0x358d3e(0x97));if(_0x2e67e5<0x1||_0x2e67e5>0x64)throw CliErrors[_0x358d3e(0x9b)](_0x358d3e(0x89));},async 'execute'(_0x2cb053){const _0x2a3a6d=a177_0x3a2e43,_0x4e7c00=_0x2cb053[_0x2a3a6d(0xad)]('page',0x1)||0x1,_0x452ceb=_0x2cb053[_0x2a3a6d(0xad)]('pagesize',0x64)||0x64,_0x53799a=_0x2cb053[_0x2a3a6d(0xa8)](_0x2a3a6d(0xab))[_0x2a3a6d(0x9a)]()[_0x2a3a6d(0x8f)](),{items:_0x5ca0cd,paging:_0x5a7998}=await listAppRoles(_0x2cb053['appCode'],{'currentPage':_0x4e7c00,'pageSize':_0x452ceb}),_0xce67cf=_0x53799a?_0x5ca0cd['filter'](_0x352d5b=>_0x352d5b[_0x2a3a6d(0x8c)]===_0x53799a):_0x5ca0cd,_0xdac75b=_0xce67cf[_0x2a3a6d(0x93)](projectRole);return{'ok':!![],'data':{'scope':_0x2a3a6d(0xac),'roles':_0xdac75b,'paging':_0x5a7998},'message':_0x2a3a6d(0x92)+_0xdac75b[_0x2a3a6d(0xa0)]+'\x20role(s)'};}};