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

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 (292) 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/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/business-groups.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff-refresh-start.js +1 -1
  88. package/lib/commands/db/diff-refresh-status.js +1 -1
  89. package/lib/commands/db/diff.js +1 -1
  90. package/lib/commands/db/index.js +1 -1
  91. package/lib/commands/db/list.js +1 -1
  92. package/lib/commands/db/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/init/index.js +1 -1
  99. package/lib/commands/issue/index.js +1 -1
  100. package/lib/commands/issue/nudge.js +1 -1
  101. package/lib/commands/issue/report.js +1 -1
  102. package/lib/commands/issue/shared.js +1 -1
  103. package/lib/commands/kb/create.js +1 -1
  104. package/lib/commands/kb/delete.js +1 -1
  105. package/lib/commands/kb/detail.js +1 -1
  106. package/lib/commands/kb/index.js +1 -1
  107. package/lib/commands/kb/list.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/notification/config-create.js +1 -1
  136. package/lib/commands/notification/config-delete.js +1 -1
  137. package/lib/commands/notification/config-list.js +1 -1
  138. package/lib/commands/notification/config-update.js +1 -1
  139. package/lib/commands/notification/index.js +1 -1
  140. package/lib/commands/notification/shared.js +1 -1
  141. package/lib/commands/ocr/index.js +1 -1
  142. package/lib/commands/page/generate-start.js +1 -1
  143. package/lib/commands/page/generate-status.js +1 -1
  144. package/lib/commands/page/index.js +1 -1
  145. package/lib/commands/page/pull.js +1 -1
  146. package/lib/commands/page/push.js +1 -1
  147. package/lib/commands/page/react/create.js +1 -1
  148. package/lib/commands/page/react/detail.js +1 -1
  149. package/lib/commands/page/react/list.js +1 -1
  150. package/lib/commands/page/react/publish.js +1 -1
  151. package/lib/commands/page/react/shared.js +1 -1
  152. package/lib/commands/page/react/syntax.js +1 -1
  153. package/lib/commands/page/react/template.js +1 -1
  154. package/lib/commands/page/react/update.js +1 -1
  155. package/lib/commands/page/relation-audit.js +1 -1
  156. package/lib/commands/page/restore.js +1 -1
  157. package/lib/commands/page/shared.js +1 -1
  158. package/lib/commands/page/standard-page-status.js +1 -1
  159. package/lib/commands/page/sync.js +1 -1
  160. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  161. package/lib/commands/project/create/format-elapsed.js +1 -1
  162. package/lib/commands/project/create/main.js +1 -1
  163. package/lib/commands/project/create/materialize-project-template.js +1 -1
  164. package/lib/commands/project/create/project-name.js +1 -1
  165. package/lib/commands/project/create/project-template-archive.js +1 -1
  166. package/lib/commands/project/create/project-template-path.js +1 -1
  167. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  168. package/lib/commands/project/create/use-format-code.js +1 -1
  169. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  170. package/lib/commands/project/index.js +1 -1
  171. package/lib/commands/project/upgrade.js +1 -1
  172. package/lib/commands/registry.js +1 -1
  173. package/lib/commands/role/delete.js +1 -1
  174. package/lib/commands/role/detail.js +1 -1
  175. package/lib/commands/role/index.js +1 -1
  176. package/lib/commands/role/list.js +1 -1
  177. package/lib/commands/role/shared.js +1 -1
  178. package/lib/commands/role/update.js +1 -1
  179. package/lib/commands/role/user-add.js +1 -1
  180. package/lib/commands/role/user-remove.js +1 -1
  181. package/lib/commands/role/user-resolve.js +1 -1
  182. package/lib/commands/run/index.js +1 -1
  183. package/lib/commands/schema.js +1 -1
  184. package/lib/commands/sql/create.js +1 -1
  185. package/lib/commands/sql/delete.js +1 -1
  186. package/lib/commands/sql/detail.js +1 -1
  187. package/lib/commands/sql/exec.js +1 -1
  188. package/lib/commands/sql/index.js +1 -1
  189. package/lib/commands/sql/list.js +1 -1
  190. package/lib/commands/sql/pull.js +1 -1
  191. package/lib/commands/sql/push.js +1 -1
  192. package/lib/commands/sql/shared.js +1 -1
  193. package/lib/commands/sql/status.js +1 -1
  194. package/lib/commands/sql/validate.js +1 -1
  195. package/lib/commands/task/index.js +1 -1
  196. package/lib/commands/task/status.js +1 -1
  197. package/lib/commands/tenant/index.js +1 -1
  198. package/lib/commands/tenant/members-list.js +1 -1
  199. package/lib/commands/tenant/shared.js +1 -1
  200. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  201. package/lib/commands/user-account/index.js +1 -1
  202. package/lib/commands/workspace/add.js +1 -1
  203. package/lib/commands/workspace/index.js +1 -1
  204. package/lib/commands/workspace/remove.js +1 -1
  205. package/lib/config/schema.js +1 -1
  206. package/lib/constant/cdn.js +1 -1
  207. package/lib/constant/cli.js +1 -1
  208. package/lib/constant/defaults.js +1 -1
  209. package/lib/constant/domain.js +1 -1
  210. package/lib/constant/env.js +1 -1
  211. package/lib/constant/output.js +1 -1
  212. package/lib/constant/paths.js +1 -1
  213. package/lib/constant/risk.js +1 -1
  214. package/lib/context/app-resolver.js +1 -1
  215. package/lib/context/auth-resolver.js +1 -1
  216. package/lib/context/config-loader.js +1 -1
  217. package/lib/context.js +1 -1
  218. package/lib/core/alias-resolver.js +1 -1
  219. package/lib/core/api-client.js +1 -1
  220. package/lib/core/bff/config.js +1 -1
  221. package/lib/core/bff/file-system.js +1 -1
  222. package/lib/core/bff/hash.js +1 -1
  223. package/lib/core/bff/lock.js +1 -1
  224. package/lib/core/bff/utils.js +1 -1
  225. package/lib/core/db-resolver.js +1 -1
  226. package/lib/core/page/file-system.js +1 -1
  227. package/lib/core/page/hash.js +1 -1
  228. package/lib/core/page/lock.js +1 -1
  229. package/lib/core/sql-index-auditor.js +1 -1
  230. package/lib/core/sql-sync/config.js +1 -1
  231. package/lib/core/sql-sync/file-system.js +1 -1
  232. package/lib/core/sql-sync/hash.js +1 -1
  233. package/lib/core/sql-sync/lock.js +1 -1
  234. package/lib/core/sql-sync/utils.js +1 -1
  235. package/lib/core/sql-validator.js +1 -1
  236. package/lib/errors.js +1 -1
  237. package/lib/framework/build-all-flags.js +1 -1
  238. package/lib/framework/error-output.js +1 -1
  239. package/lib/framework/explicit-yes.js +1 -1
  240. package/lib/framework/flags.js +1 -1
  241. package/lib/framework/help.js +1 -1
  242. package/lib/framework/index.js +1 -1
  243. package/lib/framework/output.js +1 -1
  244. package/lib/framework/response.js +1 -1
  245. package/lib/framework/runner-alias.js +1 -1
  246. package/lib/framework/runner.js +1 -1
  247. package/lib/framework/schema-export.js +1 -1
  248. package/lib/framework/types.js +1 -1
  249. package/lib/generated/build-info.d.ts +4 -4
  250. package/lib/generated/build-info.js +1 -1
  251. package/lib/help.js +1 -1
  252. package/lib/postinstall.js +1 -1
  253. package/lib/runtime/confirmation.js +1 -1
  254. package/lib/runtime/event.js +1 -1
  255. package/lib/runtime/index.js +1 -1
  256. package/lib/runtime/queue.js +1 -1
  257. package/lib/runtime/resolve.js +1 -1
  258. package/lib/skills/builtin-skill.js +1 -1
  259. package/lib/skills/main.js +1 -1
  260. package/lib/skills/npx-skills-add.js +1 -1
  261. package/lib/skills/skill-presence.js +1 -1
  262. package/lib/telemetry/cli-command-trace.js +1 -1
  263. package/lib/telemetry/cli-help-trace.js +1 -1
  264. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  265. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  266. package/lib/telemetry/send-cli-trace-log.js +1 -1
  267. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  268. package/lib/utils/ai_config.js +1 -1
  269. package/lib/utils/apply-jq-filter.js +1 -1
  270. package/lib/utils/cdn-config.js +1 -1
  271. package/lib/utils/check-sdk-version.js +1 -1
  272. package/lib/utils/cli-version-check.js +1 -1
  273. package/lib/utils/cli-version-policy.js +1 -1
  274. package/lib/utils/config.js +1 -1
  275. package/lib/utils/entity-with-id.js +1 -1
  276. package/lib/utils/file-utils.js +1 -1
  277. package/lib/utils/guides-cdn.js +1 -1
  278. package/lib/utils/http-client.js +1 -1
  279. package/lib/utils/is-non-interactive.js +1 -1
  280. package/lib/utils/logger.js +1 -1
  281. package/lib/utils/params.js +1 -1
  282. package/lib/utils/platform.js +1 -1
  283. package/lib/utils/rules-cdn.js +1 -1
  284. package/lib/utils/sleep.js +1 -1
  285. package/lib/utils/template-replacer.js +1 -1
  286. package/lib/utils/update-notice.js +1 -1
  287. package/lib/utils/version.js +1 -1
  288. package/lib/utils/with-active-cookie.js +1 -1
  289. package/lib/utils/write-cli-side-channel.js +1 -1
  290. package/package.json +1 -1
  291. package/skills/rabetbase/SKILL.md +1 -1
  292. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a163_0x23a0a1=a163_0x3b0f;function a163_0x3b0f(_0x119af0,_0x1f5618){_0x119af0=_0x119af0-0x67;const _0x16dc3d=a163_0x16dc();let _0x3b0fc2=_0x16dc3d[_0x119af0];return _0x3b0fc2;}(function(_0x305542,_0x4e72b2){const _0x28ea1c=a163_0x3b0f,_0x2865a4=_0x305542();while(!![]){try{const _0x20b50e=parseInt(_0x28ea1c(0xa0))/0x1*(-parseInt(_0x28ea1c(0x71))/0x2)+parseInt(_0x28ea1c(0x90))/0x3*(-parseInt(_0x28ea1c(0x70))/0x4)+parseInt(_0x28ea1c(0x73))/0x5+parseInt(_0x28ea1c(0x6e))/0x6*(parseInt(_0x28ea1c(0xa5))/0x7)+-parseInt(_0x28ea1c(0xb6))/0x8*(parseInt(_0x28ea1c(0xb7))/0x9)+parseInt(_0x28ea1c(0x84))/0xa+-parseInt(_0x28ea1c(0xb2))/0xb*(-parseInt(_0x28ea1c(0x8e))/0xc);if(_0x20b50e===_0x4e72b2)break;else _0x2865a4['push'](_0x2865a4['shift']());}catch(_0x164f54){_0x2865a4['push'](_0x2865a4['shift']());}}}(a163_0x16dc,0x962e2));import{createHash}from'node:crypto';function a163_0x16dc(){const _0x4cae4d=['string','releaseLock','ENOENT','validation','dev','ino','readdir','Project\x20directory\x20already\x20exists:\x20','cdn','package.json','isFinite','CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.','isDirectory','163561kDfVZD','toLowerCase','trim','code','body','21KDzENT','hex','basename','dirname','includes','resolving','parse','object',',\x20received\x20','Use\x20a\x20different\x20project\x20name.','test','abort','content-length','13750waTmAO','sha256:','sub-app-react-demo','Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','32IHyjtv','2764404dDiLQU','lstat','length','read','posix','push','EEXIST','join','get','CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.','application/zip','signal','headers','1668366xonGpd','projectTemplate','28JQeNtD','2rJuFnu','update','3298255qRelnF','protocol','verifying','project','origin','version','pathname','cancel','Project\x20template\x20package.json\x20is\x20invalid.','Check\x20your\x20network\x20and\x20retry.\x20Details:\x20','extracting','CDN\x20config\x20does\x20not\x20define\x20template\x20\x22','mkdir','status','https:','utf8','resolve','5088620vNkQQA','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','startsWith','from','concat','mkdtemp','size','readFile','CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20','name','9156JnYwRv','arrayBuffer','406767Aaqdxh','byteLength','sha256'];a163_0x16dc=function(){return _0x4cae4d;};return a163_0x16dc();}import a163_0x14fd7b from'node:fs/promises';import a163_0x170185 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=a163_0x23a0a1(0xb4),ARCHIVE_TIMEOUT_MS=0x3a98,MAX_ARCHIVE_SIZE=0x14*0x400*0x400;function nonEmptyString(_0x4de89a){const _0x31a026=a163_0x23a0a1;return typeof _0x4de89a===_0x31a026(0x93)&&_0x4de89a[_0x31a026(0xa2)]()?_0x4de89a[_0x31a026(0xa2)]():null;}function parseDescriptor(_0x297513){const _0x46d2ca=a163_0x23a0a1;if(!_0x297513||typeof _0x297513!=='object')throw new Error(_0x46d2ca(0x7e)+TEMPLATE_ID+'\x22.');const _0x2232d1=_0x297513,_0x3a14da=nonEmptyString(_0x2232d1['version']),_0x158a1f=nonEmptyString(_0x2232d1[_0x46d2ca(0x8d)]),_0x384624=nonEmptyString(_0x2232d1['sha256'])?.[_0x46d2ca(0xa1)](),_0x17c9f1=_0x2232d1[_0x46d2ca(0x8a)];if(!_0x3a14da||!_0x158a1f||_0x158a1f!==a163_0x170185[_0x46d2ca(0xbb)][_0x46d2ca(0xa7)](_0x158a1f)||_0x158a1f[_0x46d2ca(0xa9)]('\x5c')||!_0x384624||!/^sha256:[a-f0-9]{64}$/[_0x46d2ca(0xaf)](_0x384624)||typeof _0x17c9f1!=='number'||!Number['isSafeInteger'](_0x17c9f1)||_0x17c9f1<=0x0||_0x17c9f1>MAX_ARCHIVE_SIZE)throw new Error('CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22'+TEMPLATE_ID+'\x22.');return{'version':_0x3a14da,'name':_0x158a1f,'sha256':_0x384624,'size':_0x17c9f1};}async function fetchWithTimeout(_0x421eba,_0x31439a,_0x356eab,_0x6c35fd){const _0x417d96=a163_0x23a0a1,_0xd8aebd=new AbortController(),_0x259370=setTimeout(()=>_0xd8aebd[_0x417d96(0xb0)](),_0x31439a);try{const _0x5ca25a=await fetch(_0x421eba,{'headers':{'Accept':_0x356eab},'signal':_0xd8aebd[_0x417d96(0x6c)]});return await _0x6c35fd(_0x5ca25a);}finally{clearTimeout(_0x259370);}}async function fetchTemplateDescriptor(){const _0x3444e3=a163_0x23a0a1,_0x675b17=await getRabetbaseCdnConfig();if(!_0x675b17)throw new Error('Rabetbase\x20CDN\x20config\x20is\x20unavailable.');return parseDescriptor(_0x675b17[_0x3444e3(0x6f)]);}function resolveArchiveUrl(_0x13594f){const _0x555915=a163_0x23a0a1,_0x15bdae=new URL(PROJECT_TEMPLATE_ASSET_BASE_URL+'/'),_0x3bbb2e=new URL(_0x13594f,_0x15bdae);if(_0x3bbb2e[_0x555915(0x74)]!==_0x555915(0x81)||_0x3bbb2e[_0x555915(0x77)]!==_0x15bdae['origin']||!_0x3bbb2e['pathname'][_0x555915(0x86)](_0x15bdae[_0x555915(0x79)]))throw new Error(_0x555915(0x6a));return _0x3bbb2e['href'];}async function readResponseBytes(_0x52516a,_0x5e328c){const _0x279144=a163_0x23a0a1;if(!_0x52516a['body']){const _0x178086=Buffer[_0x279144(0x87)](await _0x52516a[_0x279144(0x8f)]());if(_0x178086[_0x279144(0xb9)]>_0x5e328c)throw new Error(_0x279144(0x85));return _0x178086;}const _0x3f8f9d=_0x52516a[_0x279144(0xa4)]['getReader'](),_0x47b00b=[];let _0x45f73e=0x0;try{while(!![]){const {done:_0x20be86,value:_0x36d669}=await _0x3f8f9d[_0x279144(0xba)]();if(_0x20be86)break;_0x45f73e+=_0x36d669[_0x279144(0x91)];if(_0x45f73e>_0x5e328c){await _0x3f8f9d[_0x279144(0x7a)]();throw new Error(_0x279144(0x85));}_0x47b00b[_0x279144(0xbc)](Buffer[_0x279144(0x87)](_0x36d669));}}finally{_0x3f8f9d[_0x279144(0x94)]();}return Buffer[_0x279144(0x88)](_0x47b00b,_0x45f73e);}async function downloadArchive(_0x4b1655,_0x4c2c43,_0x17caf4){const _0x3b28de=a163_0x23a0a1,_0x2b25d6=await fetchWithTimeout(resolveArchiveUrl(_0x4b1655[_0x3b28de(0x8d)]),ARCHIVE_TIMEOUT_MS,_0x3b28de(0x6b),async _0x381f87=>{const _0x226c83=_0x3b28de;if(!_0x381f87['ok'])throw new Error('CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20'+_0x381f87[_0x226c83(0x80)]+'.');const _0x58a573=Number(_0x381f87[_0x226c83(0x6d)][_0x226c83(0x69)](_0x226c83(0xb1)));if(Number[_0x226c83(0x9d)](_0x58a573)&&_0x58a573>MAX_ARCHIVE_SIZE)throw new Error(_0x226c83(0x9e));return readResponseBytes(_0x381f87,_0x4b1655[_0x226c83(0x8a)]);});if(_0x2b25d6['length']!==_0x4b1655[_0x3b28de(0x8a)])throw new Error(_0x3b28de(0x8c)+_0x4b1655[_0x3b28de(0x8a)]+_0x3b28de(0xad)+_0x2b25d6[_0x3b28de(0xb9)]+'.');_0x17caf4?.(_0x3b28de(0x75));const _0x5e5791=_0x3b28de(0xb3)+createHash(_0x3b28de(0x92))[_0x3b28de(0x72)](_0x2b25d6)['digest'](_0x3b28de(0xa6));if(_0x5e5791!==_0x4b1655[_0x3b28de(0x92)])throw new Error('CDN\x20project\x20template\x20checksum\x20verification\x20failed.');await a163_0x14fd7b['writeFile'](_0x4c2c43,_0x2b25d6,{'flag':'wx'});}async function assertTemplateRoot(_0x5256a2){const _0x583c71=a163_0x23a0a1,_0x2944b0=a163_0x170185['join'](_0x5256a2,_0x583c71(0x9c)),_0x1699ec=JSON[_0x583c71(0xab)](await a163_0x14fd7b[_0x583c71(0x8b)](_0x2944b0,_0x583c71(0x82)));if(!_0x1699ec||typeof _0x1699ec!==_0x583c71(0xac))throw new Error(_0x583c71(0x7b));}async function readDirectoryIdentity(_0x5b55a9){const _0x14ef50=a163_0x23a0a1;try{const _0xdf9e81=await a163_0x14fd7b[_0x14ef50(0xb8)](_0x5b55a9);if(!_0xdf9e81[_0x14ef50(0x9f)]())return null;return{'dev':_0xdf9e81[_0x14ef50(0x97)],'ino':_0xdf9e81[_0x14ef50(0x98)]};}catch{return null;}}async function commitStagedProject(_0x574c03,_0x48d9e5){const _0x1e055e=a163_0x23a0a1;await a163_0x14fd7b[_0x1e055e(0x7f)](_0x48d9e5);const _0x5396a8=await readDirectoryIdentity(_0x48d9e5);if(!_0x5396a8)throw new Error('Unable\x20to\x20claim\x20the\x20project\x20directory.');try{for(const _0x2d2ea1 of await a163_0x14fd7b[_0x1e055e(0x99)](_0x574c03)){await a163_0x14fd7b['rename'](a163_0x170185[_0x1e055e(0x68)](_0x574c03,_0x2d2ea1),a163_0x170185[_0x1e055e(0x68)](_0x48d9e5,_0x2d2ea1));}}catch(_0x152d81){const _0x5b107f=await readDirectoryIdentity(_0x48d9e5);_0x5b107f?.[_0x1e055e(0x97)]===_0x5396a8[_0x1e055e(0x97)]&&_0x5b107f['ino']===_0x5396a8[_0x1e055e(0x98)]&&await a163_0x14fd7b['rm'](_0x48d9e5,{'recursive':!![],'force':!![]});throw _0x152d81;}}export async function materializeProjectTemplate(_0x4031ba,_0x563094){const _0x161e58=a163_0x23a0a1,_0x3bdc6a=a163_0x170185[_0x161e58(0x83)](_0x4031ba),_0x3ac9c3=a163_0x170185[_0x161e58(0xa8)](_0x3bdc6a);try{await a163_0x14fd7b['lstat'](_0x3bdc6a);throw new Error(_0x161e58(0x9a)+_0x3bdc6a);}catch(_0x434a36){if(_0x434a36[_0x161e58(0xa3)]!==_0x161e58(0x95))throw _0x434a36;}const _0x15cf72=await a163_0x14fd7b[_0x161e58(0x89)](a163_0x170185[_0x161e58(0x68)](_0x3ac9c3,'.rabetbase-create-')),_0x1250b1=a163_0x170185[_0x161e58(0x68)](_0x15cf72,_0x161e58(0x76)),_0x436dc7=a163_0x170185[_0x161e58(0x68)](_0x15cf72,'template.zip');try{try{_0x563094?.(_0x161e58(0xaa));const _0x2f73de=await fetchTemplateDescriptor();return _0x563094?.('downloading'),await downloadArchive(_0x2f73de,_0x436dc7,_0x563094),_0x563094?.(_0x161e58(0x7d)),await extractProjectTemplateArchive(_0x436dc7,_0x1250b1),await assertTemplateRoot(_0x1250b1),await commitStagedProject(_0x1250b1,_0x3bdc6a),{'source':_0x161e58(0x9b),'version':_0x2f73de[_0x161e58(0x78)]};}catch(_0x21ac5c){if(_0x21ac5c[_0x161e58(0xa3)]===_0x161e58(0x67))throw CliErrors['validation'](_0x161e58(0x9a)+_0x3bdc6a,_0x161e58(0xae));const _0x560493=_0x21ac5c instanceof Error?_0x21ac5c['message']:String(_0x21ac5c);throw CliErrors[_0x161e58(0x96)](_0x161e58(0xb5),_0x161e58(0x7c)+_0x560493);}}finally{await a163_0x14fd7b['rm'](_0x15cf72,{'recursive':!![],'force':!![]});}}
1
+ const a163_0x306dcb=a163_0xe452;(function(_0x2628f7,_0x243927){const _0x10d0c3=a163_0xe452,_0x5ea9e1=_0x2628f7();while(!![]){try{const _0x1c982f=parseInt(_0x10d0c3(0x1d0))/0x1+parseInt(_0x10d0c3(0x1c9))/0x2+-parseInt(_0x10d0c3(0x1f7))/0x3*(parseInt(_0x10d0c3(0x1cb))/0x4)+parseInt(_0x10d0c3(0x1bf))/0x5+-parseInt(_0x10d0c3(0x1e0))/0x6+parseInt(_0x10d0c3(0x1c8))/0x7*(-parseInt(_0x10d0c3(0x1cc))/0x8)+-parseInt(_0x10d0c3(0x1c6))/0x9;if(_0x1c982f===_0x243927)break;else _0x5ea9e1['push'](_0x5ea9e1['shift']());}catch(_0x5f3f0c){_0x5ea9e1['push'](_0x5ea9e1['shift']());}}}(a163_0x1116,0x35b33));import{createHash}from'node:crypto';import a163_0x42cc48 from'node:fs/promises';import a163_0xac26b5 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=a163_0x306dcb(0x1c4),ARCHIVE_TIMEOUT_MS=0x3a98,MAX_ARCHIVE_SIZE=0x14*0x400*0x400;function nonEmptyString(_0xb05cd1){const _0x225922=a163_0x306dcb;return typeof _0xb05cd1==='string'&&_0xb05cd1[_0x225922(0x1b6)]()?_0xb05cd1[_0x225922(0x1b6)]():null;}function a163_0xe452(_0x7bbf3e,_0x4f7b53){_0x7bbf3e=_0x7bbf3e-0x1b3;const _0x1116c=a163_0x1116();let _0xe452c2=_0x1116c[_0x7bbf3e];return _0xe452c2;}function parseDescriptor(_0x55f06b){const _0x240d2b=a163_0x306dcb;if(!_0x55f06b||typeof _0x55f06b!=='object')throw new Error('CDN\x20config\x20does\x20not\x20define\x20template\x20\x22'+TEMPLATE_ID+'\x22.');const _0x96adba=_0x55f06b,_0x5751d9=nonEmptyString(_0x96adba['version']),_0x3a4336=nonEmptyString(_0x96adba[_0x240d2b(0x1c7)]),_0x4b02ce=nonEmptyString(_0x96adba[_0x240d2b(0x1de)])?.[_0x240d2b(0x1e1)](),_0x2e33fd=_0x96adba[_0x240d2b(0x1f4)];if(!_0x5751d9||!_0x3a4336||_0x3a4336!==a163_0xac26b5[_0x240d2b(0x1d1)]['basename'](_0x3a4336)||_0x3a4336[_0x240d2b(0x1d9)]('\x5c')||!_0x4b02ce||!/^sha256:[a-f0-9]{64}$/['test'](_0x4b02ce)||typeof _0x2e33fd!==_0x240d2b(0x1f5)||!Number['isSafeInteger'](_0x2e33fd)||_0x2e33fd<=0x0||_0x2e33fd>MAX_ARCHIVE_SIZE)throw new Error('CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22'+TEMPLATE_ID+'\x22.');return{'version':_0x5751d9,'name':_0x3a4336,'sha256':_0x4b02ce,'size':_0x2e33fd};}async function fetchWithTimeout(_0x2c5756,_0x4b0e1d,_0x5cf39d,_0x2984a9){const _0x582bac=a163_0x306dcb,_0x1d9325=new AbortController(),_0x47aeb1=setTimeout(()=>_0x1d9325[_0x582bac(0x1c2)](),_0x4b0e1d);try{const _0x6e7f79=await fetch(_0x2c5756,{'headers':{'Accept':_0x5cf39d},'signal':_0x1d9325[_0x582bac(0x1ea)]});return await _0x2984a9(_0x6e7f79);}finally{clearTimeout(_0x47aeb1);}}async function fetchTemplateDescriptor(){const _0x2f139e=a163_0x306dcb,_0x697565=await getRabetbaseCdnConfig();if(!_0x697565)throw new Error('Rabetbase\x20CDN\x20config\x20is\x20unavailable.');return parseDescriptor(_0x697565[_0x2f139e(0x1d2)]);}function resolveArchiveUrl(_0x3bb428){const _0x53a499=a163_0x306dcb,_0x3f022f=new URL(PROJECT_TEMPLATE_ASSET_BASE_URL+'/'),_0x3ebf02=new URL(_0x3bb428,_0x3f022f);if(_0x3ebf02[_0x53a499(0x1dc)]!==_0x53a499(0x1f3)||_0x3ebf02[_0x53a499(0x1c3)]!==_0x3f022f['origin']||!_0x3ebf02[_0x53a499(0x1cf)][_0x53a499(0x1ec)](_0x3f022f['pathname']))throw new Error(_0x53a499(0x1f8));return _0x3ebf02[_0x53a499(0x1b3)];}async function readResponseBytes(_0x4dc33c,_0x1c92f1){const _0x4c7536=a163_0x306dcb;if(!_0x4dc33c['body']){const _0x5afe63=Buffer[_0x4c7536(0x1fc)](await _0x4dc33c[_0x4c7536(0x1ca)]());if(_0x5afe63['length']>_0x1c92f1)throw new Error(_0x4c7536(0x1e6));return _0x5afe63;}const _0x1fb47c=_0x4dc33c[_0x4c7536(0x1dd)][_0x4c7536(0x1b4)](),_0x1ee160=[];let _0x5f46b4=0x0;try{while(!![]){const {done:_0x33c638,value:_0x39dd36}=await _0x1fb47c['read']();if(_0x33c638)break;_0x5f46b4+=_0x39dd36['byteLength'];if(_0x5f46b4>_0x1c92f1){await _0x1fb47c[_0x4c7536(0x1f2)]();throw new Error(_0x4c7536(0x1e6));}_0x1ee160['push'](Buffer[_0x4c7536(0x1fc)](_0x39dd36));}}finally{_0x1fb47c[_0x4c7536(0x1d7)]();}return Buffer['concat'](_0x1ee160,_0x5f46b4);}async function downloadArchive(_0x1a7957,_0x461ec0,_0x4cd7d4){const _0x411616=a163_0x306dcb,_0x563933=await fetchWithTimeout(resolveArchiveUrl(_0x1a7957[_0x411616(0x1c7)]),ARCHIVE_TIMEOUT_MS,_0x411616(0x1bd),async _0x3efee7=>{const _0x247cf8=_0x411616;if(!_0x3efee7['ok'])throw new Error(_0x247cf8(0x1d6)+_0x3efee7[_0x247cf8(0x1b5)]+'.');const _0x495dad=Number(_0x3efee7[_0x247cf8(0x1bb)][_0x247cf8(0x1d4)]('content-length'));if(Number[_0x247cf8(0x1c1)](_0x495dad)&&_0x495dad>MAX_ARCHIVE_SIZE)throw new Error('CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.');return readResponseBytes(_0x3efee7,_0x1a7957['size']);});if(_0x563933['length']!==_0x1a7957['size'])throw new Error('CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20'+_0x1a7957[_0x411616(0x1f4)]+',\x20received\x20'+_0x563933['length']+'.');_0x4cd7d4?.(_0x411616(0x1eb));const _0xa6a50=_0x411616(0x1e8)+createHash(_0x411616(0x1de))[_0x411616(0x1e5)](_0x563933)[_0x411616(0x1ce)]('hex');if(_0xa6a50!==_0x1a7957['sha256'])throw new Error(_0x411616(0x1e9));await a163_0x42cc48[_0x411616(0x1be)](_0x461ec0,_0x563933,{'flag':'wx'});}async function assertTemplateRoot(_0x13e1a6){const _0x5be983=a163_0x306dcb,_0xe1a11f=a163_0xac26b5[_0x5be983(0x1e4)](_0x13e1a6,_0x5be983(0x1e7)),_0x317062=JSON[_0x5be983(0x1ef)](await a163_0x42cc48[_0x5be983(0x1ed)](_0xe1a11f,_0x5be983(0x1fe)));if(!_0x317062||typeof _0x317062!==_0x5be983(0x1fd))throw new Error('Project\x20template\x20package.json\x20is\x20invalid.');}async function readDirectoryIdentity(_0x469a7f){const _0x4f257e=a163_0x306dcb;try{const _0x5ec4aa=await a163_0x42cc48[_0x4f257e(0x1db)](_0x469a7f);if(!_0x5ec4aa[_0x4f257e(0x1d8)]())return null;return{'dev':_0x5ec4aa[_0x4f257e(0x1f9)],'ino':_0x5ec4aa[_0x4f257e(0x1d5)]};}catch{return null;}}async function commitStagedProject(_0x585b05,_0x3a0b85){const _0x72249e=a163_0x306dcb;await a163_0x42cc48[_0x72249e(0x1d3)](_0x3a0b85);const _0x3f27a3=await readDirectoryIdentity(_0x3a0b85);if(!_0x3f27a3)throw new Error(_0x72249e(0x1c0));try{for(const _0x1d6780 of await a163_0x42cc48['readdir'](_0x585b05)){await a163_0x42cc48[_0x72249e(0x1f6)](a163_0xac26b5['join'](_0x585b05,_0x1d6780),a163_0xac26b5['join'](_0x3a0b85,_0x1d6780));}}catch(_0x371cb3){const _0x252342=await readDirectoryIdentity(_0x3a0b85);_0x252342?.['dev']===_0x3f27a3[_0x72249e(0x1f9)]&&_0x252342['ino']===_0x3f27a3['ino']&&await a163_0x42cc48['rm'](_0x3a0b85,{'recursive':!![],'force':!![]});throw _0x371cb3;}}export async function materializeProjectTemplate(_0x3017e5,_0x1092d4){const _0x3f3501=a163_0x306dcb,_0x1e839b=a163_0xac26b5[_0x3f3501(0x1fb)](_0x3017e5),_0x1cea6c=a163_0xac26b5[_0x3f3501(0x1fa)](_0x1e839b);try{await a163_0x42cc48[_0x3f3501(0x1db)](_0x1e839b);throw new Error(_0x3f3501(0x1da)+_0x1e839b);}catch(_0x355d09){if(_0x355d09[_0x3f3501(0x1c5)]!=='ENOENT')throw _0x355d09;}const _0x421b7c=await a163_0x42cc48[_0x3f3501(0x1e2)](a163_0xac26b5[_0x3f3501(0x1e4)](_0x1cea6c,_0x3f3501(0x1df))),_0x3b0a41=a163_0xac26b5[_0x3f3501(0x1e4)](_0x421b7c,_0x3f3501(0x1b8)),_0x122de5=a163_0xac26b5[_0x3f3501(0x1e4)](_0x421b7c,_0x3f3501(0x1f1));try{try{_0x1092d4?.(_0x3f3501(0x1b9));const _0x3d4ead=await fetchTemplateDescriptor();return _0x1092d4?.(_0x3f3501(0x1bc)),await downloadArchive(_0x3d4ead,_0x122de5,_0x1092d4),_0x1092d4?.(_0x3f3501(0x1b7)),await extractProjectTemplateArchive(_0x122de5,_0x3b0a41),await assertTemplateRoot(_0x3b0a41),await commitStagedProject(_0x3b0a41,_0x1e839b),{'source':_0x3f3501(0x1f0),'version':_0x3d4ead[_0x3f3501(0x1e3)]};}catch(_0x507094){if(_0x507094[_0x3f3501(0x1c5)]===_0x3f3501(0x1ee))throw CliErrors[_0x3f3501(0x1ba)](_0x3f3501(0x1da)+_0x1e839b,'Use\x20a\x20different\x20project\x20name.');const _0x304e38=_0x507094 instanceof Error?_0x507094['message']:String(_0x507094);throw CliErrors[_0x3f3501(0x1ba)](_0x3f3501(0x1cd),'Check\x20your\x20network\x20and\x20retry.\x20Details:\x20'+_0x304e38);}}finally{await a163_0x42cc48['rm'](_0x421b7c,{'recursive':!![],'force':!![]});}}function a163_0x1116(){const _0x58fa6d=['sub-app-react-demo','code','1819368aGeXuE','name','7UUkrSL','452838FPuuui','arrayBuffer','84aXbXTr','1579064cDyTeq','Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','digest','pathname','408290sAPcuQ','posix','projectTemplate','mkdir','get','ino','CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20','releaseLock','isDirectory','includes','Project\x20directory\x20already\x20exists:\x20','lstat','protocol','body','sha256','.rabetbase-create-','567102raCLhA','toLowerCase','mkdtemp','version','join','update','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','package.json','sha256:','CDN\x20project\x20template\x20checksum\x20verification\x20failed.','signal','verifying','startsWith','readFile','EEXIST','parse','cdn','template.zip','cancel','https:','size','number','rename','45183VDsVzz','CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.','dev','dirname','resolve','from','object','utf8','href','getReader','status','trim','extracting','project','resolving','validation','headers','downloading','application/zip','writeFile','1977895jEZuCj','Unable\x20to\x20claim\x20the\x20project\x20directory.','isFinite','abort','origin'];a163_0x1116=function(){return _0x58fa6d;};return a163_0x1116();}
@@ -1 +1 @@
1
- (function(_0x535357,_0x4df750){const _0x394962=a164_0x3764,_0x2edbfc=_0x535357();while(!![]){try{const _0x90ff9e=parseInt(_0x394962(0x199))/0x1*(-parseInt(_0x394962(0x18e))/0x2)+parseInt(_0x394962(0x18f))/0x3*(-parseInt(_0x394962(0x190))/0x4)+parseInt(_0x394962(0x198))/0x5*(parseInt(_0x394962(0x19d))/0x6)+parseInt(_0x394962(0x192))/0x7*(-parseInt(_0x394962(0x196))/0x8)+-parseInt(_0x394962(0x19a))/0x9*(parseInt(_0x394962(0x195))/0xa)+parseInt(_0x394962(0x197))/0xb*(parseInt(_0x394962(0x19e))/0xc)+parseInt(_0x394962(0x18c))/0xd*(parseInt(_0x394962(0x191))/0xe);if(_0x90ff9e===_0x4df750)break;else _0x2edbfc['push'](_0x2edbfc['shift']());}catch(_0x3f3f27){_0x2edbfc['push'](_0x2edbfc['shift']());}}}(a164_0x29f9,0x6a5ca));function a164_0x29f9(){const _0x2a9729=['42ABYfsK','84aHDarn','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','validation','890jBbqSw','120928wqLtjD','11pVfqds','18785OPVCwt','13ibfqUV','39519PnQesu','\x22\x20is\x20reserved\x20on\x20Windows','trim','294OfYeSq','5612988OxIXGg','\x20characters','Project\x20name\x20\x22','Use\x20a\x20portable\x20directory\x20name\x20without\x20path\x20separators.','Project\x20name\x20cannot\x20be\x20empty','length','2975167Bnpyge','test','6002fXTqPy','3usvQZh','1166228nMbTVp'];a164_0x29f9=function(){return _0x2a9729;};return a164_0x29f9();}import{CliErrors}from'../../../errors.js';function a164_0x3764(_0x51f136,_0x2cf68a){_0x51f136=_0x51f136-0x188;const _0x29f957=a164_0x29f9();let _0x376485=_0x29f957[_0x51f136];return _0x376485;}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(_0x528dc5){const _0x1ca7c5=a164_0x3764,_0x4df251=_0x528dc5[_0x1ca7c5(0x19c)]();if(!_0x4df251)return _0x1ca7c5(0x18a);if(_0x4df251[_0x1ca7c5(0x18b)]>MAX_PROJECT_NAME_LENGTH)return'Project\x20name\x20cannot\x20exceed\x20'+MAX_PROJECT_NAME_LENGTH+_0x1ca7c5(0x19f);if(!PROJECT_NAME_PATTERN[_0x1ca7c5(0x18d)](_0x4df251))return _0x1ca7c5(0x193);if(WINDOWS_RESERVED_NAME[_0x1ca7c5(0x18d)](_0x4df251))return _0x1ca7c5(0x188)+_0x4df251+_0x1ca7c5(0x19b);return null;}export function validateProjectName(_0x36d3f9){const _0x177aed=a164_0x3764,_0x5d876e=_0x36d3f9[_0x177aed(0x19c)](),_0x21b368=getProjectNameValidationError(_0x5d876e);if(_0x21b368)throw CliErrors[_0x177aed(0x194)](_0x21b368,_0x177aed(0x189));return _0x5d876e;}
1
+ (function(_0x22bcac,_0x481385){const _0x278669=a164_0x11ce,_0x4bcbfd=_0x22bcac();while(!![]){try{const _0x3dff75=parseInt(_0x278669(0xc7))/0x1+-parseInt(_0x278669(0xca))/0x2*(parseInt(_0x278669(0xcf))/0x3)+-parseInt(_0x278669(0xcb))/0x4*(-parseInt(_0x278669(0xc4))/0x5)+-parseInt(_0x278669(0xc9))/0x6*(parseInt(_0x278669(0xd0))/0x7)+parseInt(_0x278669(0xcd))/0x8*(parseInt(_0x278669(0xce))/0x9)+-parseInt(_0x278669(0xd1))/0xa*(parseInt(_0x278669(0xc8))/0xb)+parseInt(_0x278669(0xd4))/0xc;if(_0x3dff75===_0x481385)break;else _0x4bcbfd['push'](_0x4bcbfd['shift']());}catch(_0x3ec5fb){_0x4bcbfd['push'](_0x4bcbfd['shift']());}}}(a164_0x315a,0xdf8a5));function a164_0x11ce(_0x315536,_0x59823f){_0x315536=_0x315536-0xc4;const _0x315ae3=a164_0x315a();let _0x11ceb4=_0x315ae3[_0x315536];return _0x11ceb4;}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(_0x3c8fd6){const _0x528610=a164_0x11ce,_0x42140a=_0x3c8fd6[_0x528610(0xd3)]();if(!_0x42140a)return _0x528610(0xc6);if(_0x42140a['length']>MAX_PROJECT_NAME_LENGTH)return _0x528610(0xd8)+MAX_PROJECT_NAME_LENGTH+_0x528610(0xcc);if(!PROJECT_NAME_PATTERN[_0x528610(0xd7)](_0x42140a))return _0x528610(0xd6);if(WINDOWS_RESERVED_NAME[_0x528610(0xd7)](_0x42140a))return'Project\x20name\x20\x22'+_0x42140a+_0x528610(0xd2);return null;}export function validateProjectName(_0x588647){const _0x3945f2=a164_0x11ce,_0x407d4d=_0x588647[_0x3945f2(0xd3)](),_0x44054a=getProjectNameValidationError(_0x407d4d);if(_0x44054a)throw CliErrors[_0x3945f2(0xc5)](_0x44054a,_0x3945f2(0xd5));return _0x407d4d;}function a164_0x315a(){const _0x516917=['Use\x20a\x20portable\x20directory\x20name\x20without\x20path\x20separators.','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','test','Project\x20name\x20cannot\x20exceed\x20','149690aOIbma','validation','Project\x20name\x20cannot\x20be\x20empty','1816422OihQqt','66tUvINz','6zgUZBa','50ZSgLIL','196gBmQwk','\x20characters','47192JJfAul','342eXrdkq','107277YpdvAX','36911lYmpmF','3031870WfhZYM','\x22\x20is\x20reserved\x20on\x20Windows','trim','1517340CSqXGQ'];a164_0x315a=function(){return _0x516917;};return a164_0x315a();}
@@ -1 +1 @@
1
- (function(_0x15eeb6,_0x4dd7d3){const _0x1a0cac=a165_0x1fbc,_0x18317c=_0x15eeb6();while(!![]){try{const _0x2e8141=parseInt(_0x1a0cac(0x161))/0x1+parseInt(_0x1a0cac(0x150))/0x2*(parseInt(_0x1a0cac(0x154))/0x3)+-parseInt(_0x1a0cac(0x14c))/0x4+-parseInt(_0x1a0cac(0x141))/0x5+-parseInt(_0x1a0cac(0x156))/0x6+-parseInt(_0x1a0cac(0x13e))/0x7+-parseInt(_0x1a0cac(0x155))/0x8*(-parseInt(_0x1a0cac(0x15c))/0x9);if(_0x2e8141===_0x4dd7d3)break;else _0x18317c['push'](_0x18317c['shift']());}catch(_0x1b21b8){_0x18317c['push'](_0x18317c['shift']());}}}(a165_0x2529,0x86284));import{createWriteStream}from'node:fs';import a165_0x118f06 from'node:fs/promises';function a165_0x2529(){const _0x5a199e=['27322iidnXU','endsWith','readEntry','uncompressedSize','141uVZAXQ','16271336BFOQTb','4292670XWwAEL','Case-conflicting\x20ZIP\x20entry\x20path:\x20','join','split','test','fileName','9HpqZxU','isEncrypted','Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20','get','sep','179394aZXJsg','en-US','open','openReadStream','startsWith','1699187EASNgg','Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20','end','2866625zZZgoJ','add','dirname','ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20','toLocaleLowerCase','entry','mkdir','error','externalFileAttributes','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.','has','3097436xLRupM','catch','Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20','\x20entries.'];a165_0x2529=function(){return _0x5a199e;};return a165_0x2529();}function a165_0x1fbc(_0x2d8a62,_0x2be1aa){_0x2d8a62=_0x2d8a62-0x13e;const _0x2529fc=a165_0x2529();let _0x1fbc8e=_0x2529fc[_0x2d8a62];return _0x1fbc8e;}import a165_0x3ecd4d from'node:path';import{pipeline}from'node:stream/promises';import a165_0x223c4b 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(_0x45c898){return new Promise((_0x140911,_0x44a3ac)=>{const _0x484c43=a165_0x1fbc;a165_0x223c4b[_0x484c43(0x163)](_0x45c898,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x2779b0,_0x48e314)=>{if(_0x2779b0||!_0x48e314){_0x44a3ac(_0x2779b0||new Error('Unable\x20to\x20open\x20project\x20template\x20archive.'));return;}_0x140911(_0x48e314);});});}function openEntryStream(_0x37af53,_0x596799){return new Promise((_0x42b3b8,_0x213ac5)=>{const _0x3438f6=a165_0x1fbc;_0x37af53[_0x3438f6(0x164)](_0x596799,(_0x1508e2,_0x131ee3)=>{if(_0x1508e2||!_0x131ee3){_0x213ac5(_0x1508e2||new Error('Unable\x20to\x20read\x20ZIP\x20entry:\x20'+_0x596799['fileName']));return;}_0x42b3b8(_0x131ee3);});});}function validateEntryPath(_0x143d42){const _0xf0041c=a165_0x1fbc,_0x43471f=_0x143d42['replace'](/\\/g,'/'),_0x4b90d8=_0x43471f['endsWith']('/'),_0x5f2bbb=_0x4b90d8?_0x43471f['slice'](0x0,-0x1):_0x43471f;if(!_0x5f2bbb||_0x43471f[_0xf0041c(0x165)]('/')||/^[A-Za-z]:\//[_0xf0041c(0x15a)](_0x43471f))throw new Error(_0xf0041c(0x15e)+_0x143d42);const _0x522de9=_0x5f2bbb[_0xf0041c(0x159)]('/');for(const _0x502f3b of _0x522de9){if(!_0x502f3b||_0x502f3b==='.'||_0x502f3b==='..'||_0x502f3b[_0xf0041c(0x151)]('.')||_0x502f3b[_0xf0041c(0x151)]('\x20')||WINDOWS_INVALID_CHAR['test'](_0x502f3b)||WINDOWS_RESERVED_NAME[_0xf0041c(0x15a)](_0x502f3b))throw new Error(_0xf0041c(0x13f)+_0x143d42);}return{'relativePath':_0x522de9[_0xf0041c(0x158)](a165_0x3ecd4d[_0xf0041c(0x160)]),'directory':_0x4b90d8};}function isSymbolicLink(_0x279d56){const _0x228f19=a165_0x1fbc,_0x4c4744=_0x279d56[_0x228f19(0x149)]>>>0x10&0xffff;return(_0x4c4744&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0x3e364a,_0x16d688){const _0x8fa384=a165_0x1fbc,_0x3d2e59=await openZip(_0x3e364a),_0x1e0c18=a165_0x3ecd4d['resolve'](_0x16d688),_0x22c6bd=new Set(),_0x422f60=new Map();let _0x4452a4=0x0,_0x5ac555=0x0;await a165_0x118f06[_0x8fa384(0x147)](_0x1e0c18,{'recursive':!![]}),await new Promise((_0x3bdad9,_0x2180e1)=>{const _0x2a710d=_0x8fa384;let _0x522992=![];const _0x17c963=_0x2f49b3=>{if(_0x522992)return;_0x522992=!![],_0x3d2e59['close'](),_0x2180e1(_0x2f49b3 instanceof Error?_0x2f49b3:new Error(String(_0x2f49b3)));};_0x3d2e59['once'](_0x2a710d(0x148),_0x17c963),_0x3d2e59['once'](_0x2a710d(0x140),()=>{if(_0x522992)return;_0x522992=!![],_0x3bdad9();}),_0x3d2e59['on'](_0x2a710d(0x146),_0x169f08=>{const _0x221d07=_0x2a710d;void(async()=>{const _0x4002f3=a165_0x1fbc;_0x4452a4+=0x1,_0x5ac555+=_0x169f08[_0x4002f3(0x153)];if(_0x4452a4>MAX_ENTRY_COUNT)throw new Error('Project\x20template\x20ZIP\x20exceeds\x20'+MAX_ENTRY_COUNT+_0x4002f3(0x14f));if(_0x5ac555>MAX_UNCOMPRESSED_SIZE)throw new Error(_0x4002f3(0x14a));if(_0x169f08[_0x4002f3(0x15d)]())throw new Error(_0x4002f3(0x14e)+_0x169f08[_0x4002f3(0x15b)]);if(isSymbolicLink(_0x169f08))throw new Error('Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20'+_0x169f08[_0x4002f3(0x15b)]);const {relativePath:_0x51ecc7,directory:_0x1fdc1e}=validateEntryPath(_0x169f08[_0x4002f3(0x15b)]),_0x26f957=_0x51ecc7[_0x4002f3(0x159)](a165_0x3ecd4d[_0x4002f3(0x160)]);for(let _0x905046=0x1;_0x905046<=_0x26f957['length'];_0x905046+=0x1){const _0x30a049=_0x26f957['slice'](0x0,_0x905046)[_0x4002f3(0x158)](a165_0x3ecd4d[_0x4002f3(0x160)]),_0x4cc7b2=_0x30a049[_0x4002f3(0x145)]('en-US'),_0x1e0853=_0x422f60[_0x4002f3(0x15f)](_0x4cc7b2);if(_0x1e0853&&_0x1e0853!==_0x30a049)throw new Error(_0x4002f3(0x157)+_0x169f08[_0x4002f3(0x15b)]);_0x422f60['set'](_0x4cc7b2,_0x30a049);}const _0x45a69c=_0x51ecc7[_0x4002f3(0x145)](_0x4002f3(0x162));if(_0x22c6bd[_0x4002f3(0x14b)](_0x45a69c))throw new Error('Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20'+_0x169f08[_0x4002f3(0x15b)]);_0x22c6bd[_0x4002f3(0x142)](_0x45a69c);const _0x67f745=a165_0x3ecd4d['resolve'](_0x1e0c18,_0x51ecc7);if(_0x67f745!==_0x1e0c18&&!_0x67f745[_0x4002f3(0x165)](''+_0x1e0c18+a165_0x3ecd4d[_0x4002f3(0x160)]))throw new Error(_0x4002f3(0x144)+_0x169f08['fileName']);if(_0x1fdc1e)await a165_0x118f06[_0x4002f3(0x147)](_0x67f745,{'recursive':!![]});else{await a165_0x118f06['mkdir'](a165_0x3ecd4d[_0x4002f3(0x143)](_0x67f745),{'recursive':!![]});const _0x29f5c0=await openEntryStream(_0x3d2e59,_0x169f08);await pipeline(_0x29f5c0,createWriteStream(_0x67f745,{'flags':'wx','mode':0x1a4}));}_0x3d2e59[_0x4002f3(0x152)]();})()[_0x221d07(0x14d)](_0x17c963);}),_0x3d2e59[_0x2a710d(0x152)]();});}
1
+ (function(_0x101649,_0x5ec941){const _0x32b648=a165_0x1be9,_0x5aa32c=_0x101649();while(!![]){try{const _0x1fe95c=parseInt(_0x32b648(0x202))/0x1*(parseInt(_0x32b648(0x1f8))/0x2)+-parseInt(_0x32b648(0x1ef))/0x3*(parseInt(_0x32b648(0x1f7))/0x4)+-parseInt(_0x32b648(0x1fe))/0x5+-parseInt(_0x32b648(0x1f3))/0x6*(-parseInt(_0x32b648(0x1fc))/0x7)+-parseInt(_0x32b648(0x203))/0x8+-parseInt(_0x32b648(0x1fa))/0x9+-parseInt(_0x32b648(0x20c))/0xa*(-parseInt(_0x32b648(0x1ec))/0xb);if(_0x1fe95c===_0x5ec941)break;else _0x5aa32c['push'](_0x5aa32c['shift']());}catch(_0x4b39cd){_0x5aa32c['push'](_0x5aa32c['shift']());}}}(a165_0x275c,0xb7b17));import{createWriteStream}from'node:fs';import a165_0x5277b5 from'node:fs/promises';import a165_0x4e245a from'node:path';import{pipeline}from'node:stream/promises';import a165_0x56e1c3 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(_0x79d265){return new Promise((_0x38a3bd,_0x423a96)=>{const _0x53bc59=a165_0x1be9;a165_0x56e1c3[_0x53bc59(0x209)](_0x79d265,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x4f7fc7,_0x3cc6f7)=>{const _0x569f0e=_0x53bc59;if(_0x4f7fc7||!_0x3cc6f7){_0x423a96(_0x4f7fc7||new Error(_0x569f0e(0x20d)));return;}_0x38a3bd(_0x3cc6f7);});});}function openEntryStream(_0x4866ec,_0x195e30){return new Promise((_0x43a88b,_0xd3df9c)=>{_0x4866ec['openReadStream'](_0x195e30,(_0x39c9c1,_0x2c4bee)=>{const _0x209456=a165_0x1be9;if(_0x39c9c1||!_0x2c4bee){_0xd3df9c(_0x39c9c1||new Error('Unable\x20to\x20read\x20ZIP\x20entry:\x20'+_0x195e30[_0x209456(0x205)]));return;}_0x43a88b(_0x2c4bee);});});}function a165_0x275c(){const _0x2d94b9=['join','37648116SHgvrD','startsWith','add','3jnVhqu','test','once','Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20','1542dpIHEs','uncompressedSize','replace','Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20','5298340VPYTXI','54bNPmZY','externalFileAttributes','12519693ISrurB','Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20','38549cCQkDn','\x20entries.','4447395fWJLWD','mkdir','end','dirname','31083wDHncB','10556384cpNgpe','sep','fileName','Project\x20template\x20ZIP\x20exceeds\x20','isEncrypted','Case-conflicting\x20ZIP\x20entry\x20path:\x20','open','entry','close','10wtZCrX','Unable\x20to\x20open\x20project\x20template\x20archive.','readEntry','slice','catch','ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20','get','endsWith','toLocaleLowerCase','set','en-US'];a165_0x275c=function(){return _0x2d94b9;};return a165_0x275c();}function validateEntryPath(_0x30e38c){const _0x332cc3=a165_0x1be9,_0x58362f=_0x30e38c[_0x332cc3(0x1f5)](/\\/g,'/'),_0x3a49c4=_0x58362f[_0x332cc3(0x213)]('/'),_0x51537c=_0x3a49c4?_0x58362f['slice'](0x0,-0x1):_0x58362f;if(!_0x51537c||_0x58362f[_0x332cc3(0x1ed)]('/')||/^[A-Za-z]:\//[_0x332cc3(0x1f0)](_0x58362f))throw new Error('Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20'+_0x30e38c);const _0x46b5a4=_0x51537c['split']('/');for(const _0x37f946 of _0x46b5a4){if(!_0x37f946||_0x37f946==='.'||_0x37f946==='..'||_0x37f946[_0x332cc3(0x213)]('.')||_0x37f946[_0x332cc3(0x213)]('\x20')||WINDOWS_INVALID_CHAR[_0x332cc3(0x1f0)](_0x37f946)||WINDOWS_RESERVED_NAME[_0x332cc3(0x1f0)](_0x37f946))throw new Error(_0x332cc3(0x1fb)+_0x30e38c);}return{'relativePath':_0x46b5a4[_0x332cc3(0x1eb)](a165_0x4e245a[_0x332cc3(0x204)]),'directory':_0x3a49c4};}function a165_0x1be9(_0x495ed1,_0x3807c6){_0x495ed1=_0x495ed1-0x1e8;const _0x275cfa=a165_0x275c();let _0x1be97f=_0x275cfa[_0x495ed1];return _0x1be97f;}function isSymbolicLink(_0x55f5a9){const _0x400f10=a165_0x1be9,_0x58d33c=_0x55f5a9[_0x400f10(0x1f9)]>>>0x10&0xffff;return(_0x58d33c&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0x49ecc8,_0x1eab71){const _0x227883=a165_0x1be9,_0x548337=await openZip(_0x49ecc8),_0xa677c2=a165_0x4e245a['resolve'](_0x1eab71),_0x1197c4=new Set(),_0x20c2e7=new Map();let _0x590370=0x0,_0x484945=0x0;await a165_0x5277b5[_0x227883(0x1ff)](_0xa677c2,{'recursive':!![]}),await new Promise((_0x17c8fe,_0x49c363)=>{const _0x3186f7=_0x227883;let _0x2b2478=![];const _0x380c74=_0x42d9c4=>{const _0x559c02=a165_0x1be9;if(_0x2b2478)return;_0x2b2478=!![],_0x548337[_0x559c02(0x20b)](),_0x49c363(_0x42d9c4 instanceof Error?_0x42d9c4:new Error(String(_0x42d9c4)));};_0x548337[_0x3186f7(0x1f1)]('error',_0x380c74),_0x548337[_0x3186f7(0x1f1)](_0x3186f7(0x200),()=>{if(_0x2b2478)return;_0x2b2478=!![],_0x17c8fe();}),_0x548337['on'](_0x3186f7(0x20a),_0x395a38=>{const _0x4bdbc7=_0x3186f7;void(async()=>{const _0x23fa34=a165_0x1be9;_0x590370+=0x1,_0x484945+=_0x395a38[_0x23fa34(0x1f4)];if(_0x590370>MAX_ENTRY_COUNT)throw new Error(_0x23fa34(0x206)+MAX_ENTRY_COUNT+_0x23fa34(0x1fd));if(_0x484945>MAX_UNCOMPRESSED_SIZE)throw new Error('Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.');if(_0x395a38[_0x23fa34(0x207)]())throw new Error('Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20'+_0x395a38[_0x23fa34(0x205)]);if(isSymbolicLink(_0x395a38))throw new Error(_0x23fa34(0x1f2)+_0x395a38[_0x23fa34(0x205)]);const {relativePath:_0x1dc128,directory:_0x2e7f52}=validateEntryPath(_0x395a38['fileName']),_0x3efa3e=_0x1dc128['split'](a165_0x4e245a[_0x23fa34(0x204)]);for(let _0x16c947=0x1;_0x16c947<=_0x3efa3e['length'];_0x16c947+=0x1){const _0x1ce158=_0x3efa3e[_0x23fa34(0x20f)](0x0,_0x16c947)[_0x23fa34(0x1eb)](a165_0x4e245a[_0x23fa34(0x204)]),_0x53f112=_0x1ce158[_0x23fa34(0x1e8)](_0x23fa34(0x1ea)),_0x64c087=_0x20c2e7[_0x23fa34(0x212)](_0x53f112);if(_0x64c087&&_0x64c087!==_0x1ce158)throw new Error(_0x23fa34(0x208)+_0x395a38[_0x23fa34(0x205)]);_0x20c2e7[_0x23fa34(0x1e9)](_0x53f112,_0x1ce158);}const _0x1d45ab=_0x1dc128[_0x23fa34(0x1e8)](_0x23fa34(0x1ea));if(_0x1197c4['has'](_0x1d45ab))throw new Error(_0x23fa34(0x1f6)+_0x395a38[_0x23fa34(0x205)]);_0x1197c4[_0x23fa34(0x1ee)](_0x1d45ab);const _0x1f34fb=a165_0x4e245a['resolve'](_0xa677c2,_0x1dc128);if(_0x1f34fb!==_0xa677c2&&!_0x1f34fb[_0x23fa34(0x1ed)](''+_0xa677c2+a165_0x4e245a[_0x23fa34(0x204)]))throw new Error(_0x23fa34(0x211)+_0x395a38[_0x23fa34(0x205)]);if(_0x2e7f52)await a165_0x5277b5[_0x23fa34(0x1ff)](_0x1f34fb,{'recursive':!![]});else{await a165_0x5277b5[_0x23fa34(0x1ff)](a165_0x4e245a[_0x23fa34(0x201)](_0x1f34fb),{'recursive':!![]});const _0x4055f5=await openEntryStream(_0x548337,_0x395a38);await pipeline(_0x4055f5,createWriteStream(_0x1f34fb,{'flags':'wx','mode':0x1a4}));}_0x548337[_0x23fa34(0x20e)]();})()[_0x4bdbc7(0x210)](_0x380c74);}),_0x548337[_0x3186f7(0x20e)]();});}
@@ -1 +1 @@
1
- function a166_0xe77d(_0x3f7b0e,_0xc032cb){_0x3f7b0e=_0x3f7b0e-0x74;const _0xf44c75=a166_0xf44c();let _0xe77d31=_0xf44c75[_0x3f7b0e];return _0xe77d31;}(function(_0x1a8eb1,_0x3a05b3){const _0x3b9864=a166_0xe77d,_0x4d3c25=_0x1a8eb1();while(!![]){try{const _0x275716=-parseInt(_0x3b9864(0x7d))/0x1+-parseInt(_0x3b9864(0x76))/0x2*(-parseInt(_0x3b9864(0x7c))/0x3)+parseInt(_0x3b9864(0x77))/0x4+parseInt(_0x3b9864(0x7b))/0x5+-parseInt(_0x3b9864(0x75))/0x6+-parseInt(_0x3b9864(0x7e))/0x7*(-parseInt(_0x3b9864(0x74))/0x8)+-parseInt(_0x3b9864(0x7a))/0x9*(parseInt(_0x3b9864(0x78))/0xa);if(_0x275716===_0x3a05b3)break;else _0x4d3c25['push'](_0x4d3c25['shift']());}catch(_0x3fe758){_0x4d3c25['push'](_0x4d3c25['shift']());}}}(a166_0xf44c,0x27f1d));import a166_0x56fb2f from'node:path';import{fileURLToPath}from'node:url';const __dirname=a166_0x56fb2f['dirname'](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x3e8bc4=a166_0xe77d;return a166_0x56fb2f[_0x3e8bc4(0x79)](__dirname,_0x3e8bc4(0x7f));}function a166_0xf44c(){const _0x14c572=['837QKjSZa','170234euAhOs','754439dLHMLr','../../../../','16ivSuMA','1296324yCZoDJ','1914bNYzmb','485784qmZGIO','430vRGECh','resolve','30240MMCYGU','451890FmCIsd'];a166_0xf44c=function(){return _0x14c572;};return a166_0xf44c();}
1
+ const a166_0x411ff2=a166_0xd763;function a166_0x4090(){const _0x22adcc=['dirname','6501429kvJZLR','6363945zwHJsi','../../../../','1711424MqvZNj','148024ClvpJy','105PFOfiB','1794039DdjWDr','resolve','233103mBzTJO','2UuzUQK','3832116qKXPXp'];a166_0x4090=function(){return _0x22adcc;};return a166_0x4090();}(function(_0x3cdb7f,_0x31642c){const _0x570e2e=a166_0xd763,_0x46890c=_0x3cdb7f();while(!![]){try{const _0x2970a0=-parseInt(_0x570e2e(0x1d1))/0x1+-parseInt(_0x570e2e(0x1d2))/0x2*(-parseInt(_0x570e2e(0x1cf))/0x3)+-parseInt(_0x570e2e(0x1d9))/0x4*(-parseInt(_0x570e2e(0x1da))/0x5)+-parseInt(_0x570e2e(0x1d3))/0x6+parseInt(_0x570e2e(0x1d6))/0x7+-parseInt(_0x570e2e(0x1d8))/0x8+-parseInt(_0x570e2e(0x1d5))/0x9;if(_0x2970a0===_0x31642c)break;else _0x46890c['push'](_0x46890c['shift']());}catch(_0x2999a0){_0x46890c['push'](_0x46890c['shift']());}}}(a166_0x4090,0x74410));import a166_0xde7e49 from'node:path';function a166_0xd763(_0x4676d9,_0x11edd2){_0x4676d9=_0x4676d9-0x1cf;const _0x4090e9=a166_0x4090();let _0xd76376=_0x4090e9[_0x4676d9];return _0xd76376;}import{fileURLToPath}from'node:url';const __dirname=a166_0xde7e49[a166_0x411ff2(0x1d4)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x142936=a166_0x411ff2;return a166_0xde7e49[_0x142936(0x1d0)](__dirname,_0x142936(0x1d7));}
@@ -1 +1 @@
1
- (function(_0x214204,_0x26902c){const _0x12d2d6=a167_0x5bb3,_0x3849e2=_0x214204();while(!![]){try{const _0x32f8af=-parseInt(_0x12d2d6(0x1b3))/0x1+parseInt(_0x12d2d6(0x1b7))/0x2*(-parseInt(_0x12d2d6(0x1bb))/0x3)+-parseInt(_0x12d2d6(0x1c1))/0x4*(parseInt(_0x12d2d6(0x1c2))/0x5)+-parseInt(_0x12d2d6(0x1b0))/0x6*(parseInt(_0x12d2d6(0x1b8))/0x7)+-parseInt(_0x12d2d6(0x1b6))/0x8*(parseInt(_0x12d2d6(0x1ae))/0x9)+-parseInt(_0x12d2d6(0x1bf))/0xa*(-parseInt(_0x12d2d6(0x1ad))/0xb)+-parseInt(_0x12d2d6(0x1ab))/0xc*(-parseInt(_0x12d2d6(0x1b1))/0xd);if(_0x32f8af===_0x26902c)break;else _0x3849e2['push'](_0x3849e2['shift']());}catch(_0x11afc9){_0x3849e2['push'](_0x3849e2['shift']());}}}(a167_0x4073,0x83491));function a167_0x5bb3(_0x5558f9,_0x3fc4f7){_0x5558f9=_0x5558f9-0x1ab;const _0x4073cf=a167_0x4073();let _0x5bb3ff=_0x4073cf[_0x5558f9];return _0x5bb3ff;}import a167_0x416b7b from'node:path';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{materializeProjectTemplate}from'../../../commands/project/create/materialize-project-template.js';export async function copyProjectTemplate(_0x55b70b,_0x3f02ec){const _0x5d944b=a167_0x5bb3,_0x40f9ca=Date['now'](),_0x40c00d=a167_0x416b7b[_0x5d944b(0x1c3)](process[_0x5d944b(0x1b5)](),_0x55b70b);try{logger[_0x5d944b(0x1bd)](_0x5d944b(0x1bc),'开始创建项目模板',{'projectCode':_0x55b70b});const _0x1bfd82=await materializeProjectTemplate(_0x40c00d,_0x3f02ec),_0x2ebd47=Date[_0x5d944b(0x1b2)]()-_0x40f9ca;logger[_0x5d944b(0x1ac)]('copy',_0x5d944b(0x1b9),_0x2ebd47,{'projectCode':_0x55b70b,'templateSource':_0x1bfd82[_0x5d944b(0x1ba)],'templateVersion':_0x1bfd82[_0x5d944b(0x1be)]});}catch(_0x8787c8){const _0x11a428=Date[_0x5d944b(0x1b2)]()-_0x40f9ca;logger[_0x5d944b(0x1af)]('copy',_0x5d944b(0x1c0),{'projectCode':_0x55b70b,'error':_0x8787c8 instanceof Error?_0x8787c8[_0x5d944b(0x1b4)]:String(_0x8787c8),'duration':_0x11a428});throw _0x8787c8;}return formatElapsed(_0x40f9ca);}function a167_0x4073(){const _0x5ef565=['项目模板创建完成','source','156366QackSs','copy','info','version','5580DUpWrv','项目模板复制失败','5044xckVHz','3270aAxbEt','resolve','12QJNkhu','success','5709AjSqfL','8748981sQczWB','error','3633102syVWZt','43063787tKOGQg','now','193038VWcMeX','message','cwd','8mGEZbl','18HzGbeq','7tUIsnD'];a167_0x4073=function(){return _0x5ef565;};return a167_0x4073();}
1
+ (function(_0x37a86c,_0x4de8a4){const _0x539047=a167_0x65fa,_0x510f9d=_0x37a86c();while(!![]){try{const _0x141f29=-parseInt(_0x539047(0x75))/0x1+parseInt(_0x539047(0x71))/0x2*(-parseInt(_0x539047(0x6c))/0x3)+-parseInt(_0x539047(0x77))/0x4*(-parseInt(_0x539047(0x65))/0x5)+-parseInt(_0x539047(0x78))/0x6+-parseInt(_0x539047(0x68))/0x7+parseInt(_0x539047(0x6f))/0x8+parseInt(_0x539047(0x6d))/0x9;if(_0x141f29===_0x4de8a4)break;else _0x510f9d['push'](_0x510f9d['shift']());}catch(_0x2ee335){_0x510f9d['push'](_0x510f9d['shift']());}}}(a167_0x1697,0x4598f));import a167_0x5a89dd from'node:path';function a167_0x65fa(_0x22cb8b,_0x1676f9){_0x22cb8b=_0x22cb8b-0x65;const _0x16976d=a167_0x1697();let _0x65faf8=_0x16976d[_0x22cb8b];return _0x65faf8;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{materializeProjectTemplate}from'../../../commands/project/create/materialize-project-template.js';export async function copyProjectTemplate(_0x26fe36,_0x5cab1b){const _0x247b2b=a167_0x65fa,_0xa5cc3c=Date['now'](),_0x53c74e=a167_0x5a89dd[_0x247b2b(0x70)](process['cwd'](),_0x26fe36);try{logger[_0x247b2b(0x67)](_0x247b2b(0x76),_0x247b2b(0x66),{'projectCode':_0x26fe36});const _0x1b4e67=await materializeProjectTemplate(_0x53c74e,_0x5cab1b),_0x3f9fac=Date[_0x247b2b(0x6e)]()-_0xa5cc3c;logger[_0x247b2b(0x74)]('copy',_0x247b2b(0x6b),_0x3f9fac,{'projectCode':_0x26fe36,'templateSource':_0x1b4e67[_0x247b2b(0x69)],'templateVersion':_0x1b4e67[_0x247b2b(0x6a)]});}catch(_0x4c701e){const _0x3695db=Date[_0x247b2b(0x6e)]()-_0xa5cc3c;logger[_0x247b2b(0x72)]('copy',_0x247b2b(0x73),{'projectCode':_0x26fe36,'error':_0x4c701e instanceof Error?_0x4c701e['message']:String(_0x4c701e),'duration':_0x3695db});throw _0x4c701e;}return formatElapsed(_0xa5cc3c);}function a167_0x1697(){const _0x3da0b6=['43546DhXGiF','error','项目模板复制失败','success','81617EtThLJ','copy','316pLGFlZ','557916nMLLBr','24870ubYHpT','开始创建项目模板','info','2820265GYaoZe','source','version','项目模板创建完成','39DvKiwA','5234193hPRNfH','now','1368760NlTXqc','resolve'];a167_0x1697=function(){return _0x3da0b6;};return a167_0x1697();}
@@ -1 +1 @@
1
- (function(_0x22eb50,_0x40a07f){const _0x1899d5=a168_0x41ee,_0x2d8838=_0x22eb50();while(!![]){try{const _0x584cb3=parseInt(_0x1899d5(0x148))/0x1+-parseInt(_0x1899d5(0x13f))/0x2*(-parseInt(_0x1899d5(0x13a))/0x3)+-parseInt(_0x1899d5(0x138))/0x4*(-parseInt(_0x1899d5(0x140))/0x5)+parseInt(_0x1899d5(0x146))/0x6+-parseInt(_0x1899d5(0x13e))/0x7*(parseInt(_0x1899d5(0x147))/0x8)+parseInt(_0x1899d5(0x142))/0x9*(-parseInt(_0x1899d5(0x139))/0xa)+-parseInt(_0x1899d5(0x149))/0xb;if(_0x584cb3===_0x40a07f)break;else _0x2d8838['push'](_0x2d8838['shift']());}catch(_0x30a795){_0x2d8838['push'](_0x2d8838['shift']());}}}(a168_0x562e,0xa32ff));import a168_0x398006 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a168_0x41ee(_0x307cf4,_0x31320e){_0x307cf4=_0x307cf4-0x135;const _0x562ee1=a168_0x562e();let _0x41eea8=_0x562ee1[_0x307cf4];return _0x41eea8;}function a168_0x562e(){const _0x31d93b=['--write','54HcPOio','npx','info','cwd','5153268JXvSxs','1998488teptth','1308247aPSnFC','21431190dFncIx','format','message','error','代码格式化完成','代码格式化失败','开始格式化代码','1220iGFqTR','1398730nwKmJG','289329HZvhkz','resolve','now','prettier','7ehSuDm','26xVSeDX','4670oKKgRQ'];a168_0x562e=function(){return _0x31d93b;};return a168_0x562e();}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x4e3d3d){const _0x2872bd=a168_0x41ee,_0x23f49f=Date[_0x2872bd(0x13c)](),_0x5a6479=a168_0x398006[_0x2872bd(0x13b)](process[_0x2872bd(0x145)](),_0x4e3d3d);try{logger[_0x2872bd(0x144)](_0x2872bd(0x14a),_0x2872bd(0x137),{'projectCode':_0x4e3d3d}),await execa(resolveNpmBin(_0x2872bd(0x143)),[_0x2872bd(0x13d),_0x2872bd(0x141),'.'],{'cwd':_0x5a6479});const _0x40a475=Date[_0x2872bd(0x13c)]()-_0x23f49f;logger['success']('format',_0x2872bd(0x135),_0x40a475,{'projectCode':_0x4e3d3d});}catch(_0xaf4660){const _0x4ee959=Date['now']()-_0x23f49f;logger[_0x2872bd(0x14c)](_0x2872bd(0x14a),_0x2872bd(0x136),{'projectCode':_0x4e3d3d,'error':_0xaf4660 instanceof Error?_0xaf4660[_0x2872bd(0x14b)]:String(_0xaf4660),'duration':_0x4ee959});throw _0xaf4660;}return formatElapsed(_0x23f49f);}
1
+ (function(_0x3cd792,_0x5d00de){const _0x5901a9=a168_0x133c,_0x313d4a=_0x3cd792();while(!![]){try{const _0x5c706f=-parseInt(_0x5901a9(0x7c))/0x1+parseInt(_0x5901a9(0x7d))/0x2+-parseInt(_0x5901a9(0x82))/0x3+parseInt(_0x5901a9(0x7f))/0x4+parseInt(_0x5901a9(0x74))/0x5+parseInt(_0x5901a9(0x72))/0x6*(parseInt(_0x5901a9(0x78))/0x7)+-parseInt(_0x5901a9(0x79))/0x8;if(_0x5c706f===_0x5d00de)break;else _0x313d4a['push'](_0x313d4a['shift']());}catch(_0x51dabe){_0x313d4a['push'](_0x313d4a['shift']());}}}(a168_0x190d,0x925d5));import a168_0x416ef9 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a168_0x133c(_0x15efa3,_0x42aa28){_0x15efa3=_0x15efa3-0x70;const _0x190d25=a168_0x190d();let _0x133ca5=_0x190d25[_0x15efa3];return _0x133ca5;}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';function a168_0x190d(){const _0x3be17d=['1861950vtNTjY','代码格式化完成','info','1996896rlpvPL','开始格式化代码','2488785MClDMJ','--write','resolve','now','14zmeJFJ','11120024qMiOIC','format','prettier','728360fSUMXl','2294688wdNfxL','npx','4111156nZDBMd','cwd','message'];a168_0x190d=function(){return _0x3be17d;};return a168_0x190d();}export async function formatProjectCode(_0x3e0087){const _0x2334c3=a168_0x133c,_0x42a914=Date['now'](),_0x5c3f26=a168_0x416ef9[_0x2334c3(0x76)](process[_0x2334c3(0x80)](),_0x3e0087);try{logger[_0x2334c3(0x71)](_0x2334c3(0x7a),_0x2334c3(0x73),{'projectCode':_0x3e0087}),await execa(resolveNpmBin(_0x2334c3(0x7e)),[_0x2334c3(0x7b),_0x2334c3(0x75),'.'],{'cwd':_0x5c3f26});const _0x4bcc13=Date[_0x2334c3(0x77)]()-_0x42a914;logger['success'](_0x2334c3(0x7a),_0x2334c3(0x70),_0x4bcc13,{'projectCode':_0x3e0087});}catch(_0x4f4941){const _0x3facf7=Date[_0x2334c3(0x77)]()-_0x42a914;logger['error'](_0x2334c3(0x7a),'代码格式化失败',{'projectCode':_0x3e0087,'error':_0x4f4941 instanceof Error?_0x4f4941[_0x2334c3(0x81)]:String(_0x4f4941),'duration':_0x3facf7});throw _0x4f4941;}return formatElapsed(_0x42a914);}
@@ -1 +1 @@
1
- (function(_0x34e6ec,_0x8911a1){const _0x2275bb=a169_0x2f5c,_0x585b4a=_0x34e6ec();while(!![]){try{const _0x111240=parseInt(_0x2275bb(0x167))/0x1*(parseInt(_0x2275bb(0x15d))/0x2)+-parseInt(_0x2275bb(0x158))/0x3+parseInt(_0x2275bb(0x15b))/0x4+-parseInt(_0x2275bb(0x164))/0x5+parseInt(_0x2275bb(0x163))/0x6*(-parseInt(_0x2275bb(0x15c))/0x7)+-parseInt(_0x2275bb(0x155))/0x8+parseInt(_0x2275bb(0x166))/0x9;if(_0x111240===_0x8911a1)break;else _0x585b4a['push'](_0x585b4a['shift']());}catch(_0x290c6b){_0x585b4a['push'](_0x585b4a['shift']());}}}(a169_0x4856,0xc76a4));import a169_0x5ce064 from'node:path';import{execa}from'execa';function a169_0x4856(){const _0x42222c=['info','cwd','--registry','npm','18EJpbEX','7669850dXWMJo','https://registry.npmmirror.com','30563532ldSWPN','22rBNgED','message','441152dwEtOJ','resolve','install','3724326SZCLtz','error','success','1043276osvWNb','3368267vybkEd','130376czqkCj','now'];a169_0x4856=function(){return _0x42222c;};return a169_0x4856();}function a169_0x2f5c(_0x28de08,_0x1d8a6d){_0x28de08=_0x28de08-0x155;const _0x485653=a169_0x4856();let _0x2f5c01=_0x485653[_0x28de08];return _0x2f5c01;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x976dca){const _0x78ec4f=a169_0x2f5c,_0x9a5289=Date[_0x78ec4f(0x15e)](),_0x39958b=a169_0x5ce064[_0x78ec4f(0x156)](process[_0x78ec4f(0x160)](),_0x976dca);try{logger[_0x78ec4f(0x15f)](_0x78ec4f(0x157),'开始安装依赖',{'projectCode':_0x976dca,'registry':_0x78ec4f(0x165)}),await execa(resolveNpmBin(_0x78ec4f(0x162)),[_0x78ec4f(0x157),_0x78ec4f(0x161),_0x78ec4f(0x165)],{'cwd':_0x39958b});const _0x369b24=Date[_0x78ec4f(0x15e)]()-_0x9a5289;logger[_0x78ec4f(0x15a)]('install','依赖安装完成',_0x369b24,{'projectCode':_0x976dca});}catch(_0x482839){const _0x25031b=Date[_0x78ec4f(0x15e)]()-_0x9a5289;logger[_0x78ec4f(0x159)](_0x78ec4f(0x157),'依赖安装失败',{'projectCode':_0x976dca,'error':_0x482839 instanceof Error?_0x482839[_0x78ec4f(0x168)]:String(_0x482839),'duration':_0x25031b});throw _0x482839;}return formatElapsed(_0x9a5289);}
1
+ (function(_0x2661e7,_0x270144){const _0x4fc9c5=a169_0x4f48,_0x174696=_0x2661e7();while(!![]){try{const _0x3135b1=parseInt(_0x4fc9c5(0x12e))/0x1*(-parseInt(_0x4fc9c5(0x12d))/0x2)+parseInt(_0x4fc9c5(0x11a))/0x3*(parseInt(_0x4fc9c5(0x11f))/0x4)+parseInt(_0x4fc9c5(0x123))/0x5+parseInt(_0x4fc9c5(0x127))/0x6*(parseInt(_0x4fc9c5(0x126))/0x7)+parseInt(_0x4fc9c5(0x120))/0x8+-parseInt(_0x4fc9c5(0x119))/0x9*(-parseInt(_0x4fc9c5(0x11d))/0xa)+parseInt(_0x4fc9c5(0x11c))/0xb*(-parseInt(_0x4fc9c5(0x11b))/0xc);if(_0x3135b1===_0x270144)break;else _0x174696['push'](_0x174696['shift']());}catch(_0x45b852){_0x174696['push'](_0x174696['shift']());}}}(a169_0x1c73,0xb96b5));import a169_0x29dbd3 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a169_0x1c73(){const _0x36d278=['697165KTcbLA','6clYqVK','install','success','依赖安装完成','--registry','now','70870yKkapK','34sgbaLM','message','npm','1643823vZmjFK','3hIPniq','4692hgLzfH','29425ZVpLTy','70VGBxas','error','985492KvqQxY','1231672aAOXeb','https://registry.npmmirror.com','开始安装依赖','6158680DwnIuX','依赖安装失败','info'];a169_0x1c73=function(){return _0x36d278;};return a169_0x1c73();}import{logger}from'../../../utils/logger.js';function a169_0x4f48(_0x1b2753,_0x3fe4de){_0x1b2753=_0x1b2753-0x117;const _0x1c7338=a169_0x1c73();let _0x4f484c=_0x1c7338[_0x1b2753];return _0x4f484c;}import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x4d1640){const _0x3edd41=a169_0x4f48,_0x24c597=Date[_0x3edd41(0x12c)](),_0x3942ed=a169_0x29dbd3['resolve'](process['cwd'](),_0x4d1640);try{logger[_0x3edd41(0x125)](_0x3edd41(0x128),_0x3edd41(0x122),{'projectCode':_0x4d1640,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin(_0x3edd41(0x118)),[_0x3edd41(0x128),_0x3edd41(0x12b),_0x3edd41(0x121)],{'cwd':_0x3942ed});const _0x2c2327=Date[_0x3edd41(0x12c)]()-_0x24c597;logger[_0x3edd41(0x129)](_0x3edd41(0x128),_0x3edd41(0x12a),_0x2c2327,{'projectCode':_0x4d1640});}catch(_0x592120){const _0x431224=Date[_0x3edd41(0x12c)]()-_0x24c597;logger[_0x3edd41(0x11e)](_0x3edd41(0x128),_0x3edd41(0x124),{'projectCode':_0x4d1640,'error':_0x592120 instanceof Error?_0x592120[_0x3edd41(0x117)]:String(_0x592120),'duration':_0x431224});throw _0x592120;}return formatElapsed(_0x24c597);}
@@ -1 +1 @@
1
- const a170_0x58deaf=a170_0x7531;(function(_0x1ea2f8,_0x5394c2){const _0x344599=a170_0x7531,_0x57782c=_0x1ea2f8();while(!![]){try{const _0x137054=-parseInt(_0x344599(0xc0))/0x1*(parseInt(_0x344599(0xb7))/0x2)+parseInt(_0x344599(0xb8))/0x3+-parseInt(_0x344599(0xc4))/0x4+-parseInt(_0x344599(0xbc))/0x5+-parseInt(_0x344599(0xbe))/0x6+-parseInt(_0x344599(0xbb))/0x7*(-parseInt(_0x344599(0xbd))/0x8)+parseInt(_0x344599(0xad))/0x9;if(_0x137054===_0x5394c2)break;else _0x57782c['push'](_0x57782c['shift']());}catch(_0x284348){_0x57782c['push'](_0x57782c['shift']());}}}(a170_0x3d41,0xc3621));import{CliErrors}from'../../errors.js';function a170_0x7531(_0x5a5093,_0x48bc9f){_0x5a5093=_0x5a5093-0xa5;const _0x3d4175=a170_0x3d41();let _0x7531e2=_0x3d4175[_0x5a5093];return _0x7531e2;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';const createFlags=[{'name':a170_0x58deaf(0xc1),'type':a170_0x58deaf(0xa6),'description':'Project\x20name'},{'name':'env','type':a170_0x58deaf(0xa6),'description':'Target\x20environment'},{'name':a170_0x58deaf(0xb1),'type':a170_0x58deaf(0xa6),'description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'}],upgradeFlags=[{'name':a170_0x58deaf(0xab),'type':'boolean','description':a170_0x58deaf(0xb4),'default':![]}];export const projectDefinitions=[{'service':a170_0x58deaf(0xae),'command':a170_0x58deaf(0xbf),'description':a170_0x58deaf(0xb6),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a170_0x58deaf(0xb0),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x39b961){const _0x4aed34=a170_0x58deaf,{createApp:_0x51b82a}=await import(_0x4aed34(0xc3)),_0x1e61e0=_0x39b961['str']('name')[_0x4aed34(0xb9)]()||_0x39b961['args'][0x0]?.[_0x4aed34(0xb9)](),_0xe47bc4=_0x39b961[_0x4aed34(0xa9)](_0x4aed34(0xa8))||undefined,_0x524e14=_0x39b961[_0x4aed34(0xa9)](_0x4aed34(0xb1))||undefined;if(_0x39b961[_0x4aed34(0xac)]){if(!_0x1e61e0)throw CliErrors[_0x4aed34(0xa5)](_0x4aed34(0xaf),_0x4aed34(0xa7)+CLI_BIN_NAME+_0x4aed34(0xc2));await _0x51b82a({'projectCode':_0x1e61e0,'appCode':_0x524e14,'env':_0xe47bc4,'cookie':_0x39b961[_0x4aed34(0xb5)],'nonInteractive':!![]});}else await _0x51b82a({'projectCode':_0x1e61e0,'appCode':_0x524e14,'env':_0xe47bc4,'cookie':_0x39b961[_0x4aed34(0xb5)]});return{'ok':!![]};}},{'service':a170_0x58deaf(0xae),'command':a170_0x58deaf(0xaa),'description':a170_0x58deaf(0xb3),'risk':a170_0x58deaf(0xba),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x1c4075){const _0xfd6eb1=a170_0x58deaf;return await upgradeApp(_0x1c4075['nonInteractive'],{'yes':_0x1c4075[_0xfd6eb1(0xb2)](_0xfd6eb1(0xab))}),{'ok':!![]};}}];function a170_0x3d41(){const _0x5224b9=['bool','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','Skip\x20confirmation\x20prompt','cookie','Create\x20a\x20new\x20project','1038lpXGVe','4360530JNTVhx','trim','write','10010wsTPqk','80930XYPsjK','2568iezKzI','4025430AKQaSK','create','1639XaqSGm','name','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','../../commands/project/create/main.js','2141096GqsniV','validation','string','Usage:\x20','env','str','upgrade','yes','nonInteractive','8646795GOEkju','project','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','project-name','appcode'];a170_0x3d41=function(){return _0x5224b9;};return a170_0x3d41();}
1
+ const a170_0xf07df9=a170_0x91ba;(function(_0x19a917,_0x484206){const _0x36f2d5=a170_0x91ba,_0x49c8c5=_0x19a917();while(!![]){try{const _0x529d1a=parseInt(_0x36f2d5(0xc8))/0x1*(parseInt(_0x36f2d5(0xbe))/0x2)+parseInt(_0x36f2d5(0xd4))/0x3+-parseInt(_0x36f2d5(0xcc))/0x4+-parseInt(_0x36f2d5(0xda))/0x5*(-parseInt(_0x36f2d5(0xce))/0x6)+-parseInt(_0x36f2d5(0xdd))/0x7*(-parseInt(_0x36f2d5(0xde))/0x8)+-parseInt(_0x36f2d5(0xcb))/0x9*(parseInt(_0x36f2d5(0xdb))/0xa)+-parseInt(_0x36f2d5(0xbd))/0xb*(-parseInt(_0x36f2d5(0xcf))/0xc);if(_0x529d1a===_0x484206)break;else _0x49c8c5['push'](_0x49c8c5['shift']());}catch(_0x7b8995){_0x49c8c5['push'](_0x49c8c5['shift']());}}}(a170_0x4b16,0x854f9));import{CliErrors}from'../../errors.js';function a170_0x4b16(){const _0x115522=['project','Project\x20name','Skip\x20confirmation\x20prompt','str','boolean','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','name','env','14FkSmhN','string','validation','2500596PGjOZN','3241232fZYRBA','trim','6XVVRTm','580308HoubWj','write','cookie','Usage:\x20','Target\x20environment','6714fggTCO','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','Create\x20a\x20new\x20project','project-name','nonInteractive','appcode','2951005zuhHOk','30DgOHQm','../../commands/project/create/main.js','10577ipuHEi','3160UfZYgM','upgrade','args','165AONgbx','39316wfsaEJ','bool'];a170_0x4b16=function(){return _0x115522;};return a170_0x4b16();}import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';function a170_0x91ba(_0x268336,_0x179353){_0x268336=_0x268336-0xbc;const _0x4b1681=a170_0x4b16();let _0x91ba1e=_0x4b1681[_0x268336];return _0x91ba1e;}const createFlags=[{'name':a170_0xf07df9(0xc6),'type':a170_0xf07df9(0xc9),'description':a170_0xf07df9(0xc1)},{'name':a170_0xf07df9(0xc7),'type':a170_0xf07df9(0xc9),'description':a170_0xf07df9(0xd3)},{'name':a170_0xf07df9(0xd9),'type':a170_0xf07df9(0xc9),'description':a170_0xf07df9(0xd5)}],upgradeFlags=[{'name':'yes','type':a170_0xf07df9(0xc4),'description':a170_0xf07df9(0xc2),'default':![]}];export const projectDefinitions=[{'service':'project','command':'create','description':a170_0xf07df9(0xd6),'risk':a170_0xf07df9(0xd0),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a170_0xf07df9(0xd7),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x25004c){const _0x27ddd4=a170_0xf07df9,{createApp:_0xd76214}=await import(_0x27ddd4(0xdc)),_0x287a67=_0x25004c[_0x27ddd4(0xc3)](_0x27ddd4(0xc6))['trim']()||_0x25004c[_0x27ddd4(0xbc)][0x0]?.[_0x27ddd4(0xcd)](),_0x5b465a=_0x25004c['str']('env')||undefined,_0x251993=_0x25004c['str'](_0x27ddd4(0xd9))||undefined;if(_0x25004c[_0x27ddd4(0xd8)]){if(!_0x287a67)throw CliErrors[_0x27ddd4(0xca)]('Non-interactive\x20mode\x20requires\x20a\x20project\x20name.',_0x27ddd4(0xd2)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0xd76214({'projectCode':_0x287a67,'appCode':_0x251993,'env':_0x5b465a,'cookie':_0x25004c[_0x27ddd4(0xd1)],'nonInteractive':!![]});}else await _0xd76214({'projectCode':_0x287a67,'appCode':_0x251993,'env':_0x5b465a,'cookie':_0x25004c[_0x27ddd4(0xd1)]});return{'ok':!![]};}},{'service':a170_0xf07df9(0xc0),'command':a170_0xf07df9(0xdf),'description':a170_0xf07df9(0xc5),'risk':a170_0xf07df9(0xd0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x4f7be0){const _0x21df33=a170_0xf07df9;return await upgradeApp(_0x4f7be0[_0x21df33(0xd8)],{'yes':_0x4f7be0[_0x21df33(0xbf)]('yes')}),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a171_0x102239=a171_0x59ff;(function(_0x294de6,_0xad713){const _0x31f651=a171_0x59ff,_0x1ca5d3=_0x294de6();while(!![]){try{const _0x95cb6=-parseInt(_0x31f651(0x1d0))/0x1*(parseInt(_0x31f651(0x20c))/0x2)+parseInt(_0x31f651(0x1ed))/0x3*(-parseInt(_0x31f651(0x1dc))/0x4)+parseInt(_0x31f651(0x1d7))/0x5*(-parseInt(_0x31f651(0x1e3))/0x6)+parseInt(_0x31f651(0x205))/0x7+-parseInt(_0x31f651(0x1c0))/0x8*(-parseInt(_0x31f651(0x201))/0x9)+parseInt(_0x31f651(0x1e5))/0xa*(parseInt(_0x31f651(0x1f3))/0xb)+parseInt(_0x31f651(0x1e2))/0xc*(parseInt(_0x31f651(0x20d))/0xd);if(_0x95cb6===_0xad713)break;else _0x1ca5d3['push'](_0x1ca5d3['shift']());}catch(_0x37a2d5){_0x1ca5d3['push'](_0x1ca5d3['shift']());}}}(a171_0x537e,0x205f9));function a171_0x59ff(_0x19e54e,_0x3cb8c4){_0x19e54e=_0x19e54e-0x1bb;const _0x537e6c=a171_0x537e();let _0x59ff1d=_0x537e6c[_0x19e54e];return _0x59ff1d;}import a171_0x5a8535 from'chalk';import a171_0x23dfde from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,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=CONFIG_NAMES[a171_0x102239(0x221)](_0x273fb1=>_0x273fb1!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x51cd29){const _0x4da779=a171_0x102239,_0x4b9edd=[];for(const _0x624d2c of Object['values'](CORE_IDE_CONFIGS)){if(_0x624d2c[_0x4da779(0x21a)])for(const _0x246302 of _0x624d2c[_0x4da779(0x21a)]){_0x4b9edd[_0x4da779(0x1bb)](resolve(_0x51cd29,_0x246302['path']));}}return _0x4b9edd;}function analyse(_0x23f2ce){const _0x16b718=a171_0x102239;let _0x1e23d7=null;const _0x3e5620=resolve(_0x23f2ce,NEW_CONFIG_NAME),_0x2f30bb=existsSync(_0x3e5620);for(const _0x1a18d0 of LEGACY_CONFIG_NAMES){const _0x1ba240=resolve(_0x23f2ce,_0x1a18d0);if(existsSync(_0x1ba240)){const _0x30bedc=readConfigFile(_0x1ba240),_0x1e2495=Object[_0x16b718(0x1d9)](_0x30bedc)[_0x16b718(0x221)](_0x368679=>typeof _0x30bedc[_0x368679]!==_0x16b718(0x1c7));_0x1e23d7={'oldPath':_0x1ba240,'hasNewConfig':_0x2f30bb,'fields':_0x1e2495};break;}}const _0xe6f0a2=[],_0x271426=resolve(_0x23f2ce,'.lovrabet');if(existsSync(_0x271426))_0xe6f0a2[_0x16b718(0x1bb)](_0x271426);const _0x4b8692=resolve(_0x23f2ce,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x4b8692))_0xe6f0a2[_0x16b718(0x1bb)](_0x4b8692);const _0x1ab39a=resolve(_0x23f2ce,_0x16b718(0x237));if(existsSync(_0x1ab39a))_0xe6f0a2[_0x16b718(0x1bb)](_0x1ab39a);for(const _0x11b4ac of collectIdeSkillFiles(_0x23f2ce)){if(existsSync(_0x11b4ac))_0xe6f0a2[_0x16b718(0x1bb)](_0x11b4ac);}let _0x1638bb=null;const _0x47afc9=resolve(_0x23f2ce,'.cursor/mcp.json');if(existsSync(_0x47afc9))try{const _0x3cd440=JSON[_0x16b718(0x1f6)](readFileSync(_0x47afc9,_0x16b718(0x204)));if(_0x3cd440?.[_0x16b718(0x1ec)]&&typeof _0x3cd440['mcpServers']===_0x16b718(0x227)){const _0x156925=[];for(const [_0x112b7a,_0x30e593]of Object[_0x16b718(0x1d3)](_0x3cd440[_0x16b718(0x1ec)])){const _0x1e4f01=_0x30e593;_0x1e4f01?.['args']&&Array[_0x16b718(0x1f8)](_0x1e4f01['args'])&&_0x1e4f01[_0x16b718(0x1d4)]['some'](_0x2dfe69=>typeof _0x2dfe69==='string'&&_0x2dfe69[_0x16b718(0x1df)](_0x16b718(0x228)))&&_0x156925[_0x16b718(0x1bb)](_0x112b7a);}_0x156925[_0x16b718(0x1da)]>0x0&&(_0x1638bb={'path':_0x47afc9,'keys':_0x156925});}}catch{}const _0x3c1a10=_0xe6f0a2[_0x16b718(0x1da)]>0x0||_0x1e23d7!==null;let _0x459b11=null;const _0x4c34ab=resolve(_0x23f2ce,_0x16b718(0x1f4));if(existsSync(_0x4c34ab))try{const _0x4609f4=JSON[_0x16b718(0x1f6)](readFileSync(_0x4c34ab,_0x16b718(0x204)));for(const _0xa3537a of[_0x16b718(0x1f9),_0x16b718(0x1c6)]){const _0x5b77f3=_0x4609f4?.[_0xa3537a]?.[_0x16b718(0x22b)];if(typeof _0x5b77f3===_0x16b718(0x1f5)){_0x5b77f3!==_0x16b718(0x1d6)&&(_0x459b11={'pkgPath':_0x4c34ab,'currentVersion':_0x5b77f3,'field':_0xa3537a});break;}}}catch{}return{'configMigration':_0x1e23d7,'oldArtifacts':_0xe6f0a2,'oldMcpConfig':_0x1638bb,'needsSkillSwap':_0x3c1a10,'sdkUpgrade':_0x459b11};}function printReport(_0x5a368e){const _0x4718cd=a171_0x102239,{configMigration:_0x547e28,oldArtifacts:_0x17be14,oldMcpConfig:_0x1c2fd1,needsSkillSwap:_0x220dd1}=_0x5a368e;console[_0x4718cd(0x233)](''),console['log'](a171_0x5a8535[_0x4718cd(0x225)]('===\x20Upgrade\x20Analysis\x20===')),console['log']('');_0x547e28?(console[_0x4718cd(0x233)](a171_0x5a8535[_0x4718cd(0x230)](_0x4718cd(0x213))+('\x20\x20'+a171_0x5a8535['yellow'](_0x547e28[_0x4718cd(0x216)]))),console[_0x4718cd(0x233)]('\x20\x20New\x20config\x20(.rabetbase.json):\x20'+(_0x547e28[_0x4718cd(0x220)]?a171_0x5a8535[_0x4718cd(0x1e1)](_0x4718cd(0x209)):a171_0x5a8535['gray'](_0x4718cd(0x231)))),console[_0x4718cd(0x233)](_0x4718cd(0x1c1)+_0x547e28[_0x4718cd(0x1f7)][_0x4718cd(0x1bc)](',\x20')),console[_0x4718cd(0x233)](_0x4718cd(0x1f1))):console[_0x4718cd(0x233)](a171_0x5a8535[_0x4718cd(0x230)](_0x4718cd(0x213))+'\x20\x20'+a171_0x5a8535[_0x4718cd(0x1bf)](_0x4718cd(0x239)));console[_0x4718cd(0x233)]('');if(_0x17be14[_0x4718cd(0x1da)]>0x0){console[_0x4718cd(0x233)](a171_0x5a8535[_0x4718cd(0x230)]('Legacy\x20artifacts:'));for(const _0x3a0c8b of _0x17be14){console[_0x4718cd(0x233)]('\x20\x20'+a171_0x5a8535[_0x4718cd(0x1e0)](_0x4718cd(0x1de))+'\x20\x20'+_0x3a0c8b);}console[_0x4718cd(0x233)](_0x4718cd(0x1c2));}else console['log'](a171_0x5a8535['cyan']('Legacy\x20artifacts:')+'\x20\x20'+a171_0x5a8535[_0x4718cd(0x1bf)](_0x4718cd(0x22c)));console[_0x4718cd(0x233)]('');_0x1c2fd1?(console[_0x4718cd(0x233)](a171_0x5a8535[_0x4718cd(0x230)]('MCP\x20config:')+('\x20\x20'+a171_0x5a8535['yellow'](_0x1c2fd1['path'])+_0x4718cd(0x223)+_0x1c2fd1[_0x4718cd(0x1d9)][_0x4718cd(0x1bc)](',\x20'))),console['log'](_0x4718cd(0x1ce))):console[_0x4718cd(0x233)](a171_0x5a8535[_0x4718cd(0x230)](_0x4718cd(0x1d1))+'\x20\x20'+a171_0x5a8535['gray']('no\x20legacy\x20entry'));console[_0x4718cd(0x233)](''),console[_0x4718cd(0x233)](a171_0x5a8535['cyan'](_0x4718cd(0x1c3))+('\x20\x20'+(_0x220dd1?a171_0x5a8535[_0x4718cd(0x215)]('needed'):a171_0x5a8535[_0x4718cd(0x1e1)](_0x4718cd(0x217)))));_0x220dd1&&console[_0x4718cd(0x233)](_0x4718cd(0x202)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console['log']('');if(_0x5a368e[_0x4718cd(0x210)]){const {currentVersion:_0x6a7e6d,field:_0x37fb00,pkgPath:_0x33f395}=_0x5a368e[_0x4718cd(0x210)];console[_0x4718cd(0x233)](a171_0x5a8535[_0x4718cd(0x230)](_0x4718cd(0x212))+('\x20\x20'+a171_0x5a8535[_0x4718cd(0x215)](_0x33f395))),console[_0x4718cd(0x233)](_0x4718cd(0x21d)+_0x37fb00+':\x20'+a171_0x5a8535[_0x4718cd(0x215)](_0x6a7e6d)+'\x20→\x20'+a171_0x5a8535[_0x4718cd(0x1e1)](_0x4718cd(0x1d6))),console[_0x4718cd(0x233)]('\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)');}else console[_0x4718cd(0x233)](a171_0x5a8535['cyan'](_0x4718cd(0x212))+'\x20\x20'+a171_0x5a8535[_0x4718cd(0x1bf)]('not\x20found\x20or\x20already\x20at\x20latest'));console['log']('');}function a171_0x537e(){const _0x53b8bd=['3918ZAbYRy','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','810990hiuyWV','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','Remove\x20.lovrabet/','detail','start','Clean\x20MCP\x20config','fail','mcpServers','203769SfzUNQ','oldMcpConfig','Upgrade\x20cancelled.','Step\x201/7:\x20Migrating\x20config...','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','Step\x201/7:\x20Config\x20migration\x20—\x20','33ieErEl','package.json','string','parse','fields','isArray','dependencies','Config\x20migration','\x20\x20\x20\x20\x20\x20\x20','removed\x20','Remove\x20legacy\x20artifacts','lovrabet/rabetbase','\x20from\x20','inherit','372195uOffWe','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','done','utf8','44457jaOBFB','stringify','info','step','already\x20exists\x20(will\x20merge)','\x20→\x20latest','failed','1438xiTqyB','2615145DSuqdt','Proceed\x20with\x20upgrade?','Step\x206/7:\x20Installing\x20new\x20skill...','sdkUpgrade','FAIL','@lovrabet/sdk:','Config\x20file:','lovrabet/rabetbase\x20installed\x20globally','yellow','oldPath','not\x20needed','Step\x204/7:\x20MCP\x20config\x20—\x20','[\x22@lovrabet/sdk\x22]:\x20','files','\x20removed','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','\x20\x20Current\x20version\x20in\x20','error','cwd','hasNewConfig','filter','\x20(backup:\x20','\x20→\x20keys:\x20','exit\x20','bold','yes','object','@lovrabet/dataset-mcp-server','\x20→\x20','white','@lovrabet/sdk','none\x20found','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','skipped','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','cyan','not\x20found\x20(will\x20create)','needsSkillSwap','log','isDirectory','Remove\x20old\x20skill','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','.claude/skills/lovrabet','no\x20matching\x20entry\x20found','no\x20legacy\x20config\x20found','push','join','\x20\x20bun\x20install','.bak','gray','24DtbKBo','\x20\x20Fields\x20to\x20migrate:\x20','\x20\x20Action:\x20delete','Skill\x20swap:','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','Upgrade\x20@lovrabet/sdk','devDependencies','undefined','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','Upgrade\x20completed\x20successfully!','\x20\x20Step\x20','\x20removed\x20(','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','oldArtifacts','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','Step\x204/7:\x20Cleaning\x20MCP\x20config...','62tWZDce','MCP\x20config:','some','entries','args','succeed','latest','2005wzcYlY','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','keys','length','path','8ioDrgO','message','FOUND','includes','red','green','12jcgwwl'];a171_0x537e=function(){return _0x53b8bd;};return a171_0x537e();}function execConfigMigration(_0x32ae5d,_0x13a2cc){const _0x20f13a=a171_0x102239,{configMigration:_0x3f1103}=_0x32ae5d;if(!_0x3f1103?.[_0x20f13a(0x216)])return{'step':0x1,'label':_0x20f13a(0x1fa),'ok':!![],'detail':'skipped\x20(no\x20legacy\x20config)'};const _0x509ced=readConfigFile(_0x3f1103[_0x20f13a(0x216)]),_0x2bf992=resolve(_0x13a2cc,NEW_CONFIG_NAME),_0x128464=_0x3f1103[_0x20f13a(0x220)]?readConfigFile(_0x2bf992):{};for(const [_0x51f4a7,_0x19df34]of Object['entries'](_0x509ced)){!(_0x51f4a7 in _0x128464)&&(_0x128464[_0x51f4a7]=_0x19df34);}writeConfigFile(_0x2bf992,_0x128464);const _0x3b3e5d=_0x3f1103[_0x20f13a(0x216)]+_0x20f13a(0x1be);return renameSync(_0x3f1103[_0x20f13a(0x216)],_0x3b3e5d),{'step':0x1,'label':_0x20f13a(0x1fa),'ok':!![],'detail':_0x3f1103[_0x20f13a(0x216)]+_0x20f13a(0x229)+_0x2bf992+_0x20f13a(0x222)+_0x3b3e5d+')'};}function execRemoveOldArtifacts(_0x390fa5){const _0x5c6310=a171_0x102239,_0x18fe2e=[];for(const _0x132ee7 of _0x390fa5){try{if(!existsSync(_0x132ee7))continue;const _0x85ffea=tryStat(_0x132ee7);_0x85ffea?.[_0x5c6310(0x234)]()?rmSync(_0x132ee7,{'recursive':!![],'force':!![]}):unlinkSync(_0x132ee7);}catch(_0x16705f){_0x18fe2e['push'](_0x132ee7+':\x20'+_0x16705f[_0x5c6310(0x1dd)]);}}return{'step':0x3,'label':_0x5c6310(0x1fd),'ok':_0x18fe2e[_0x5c6310(0x1da)]===0x0,'detail':_0x18fe2e[_0x5c6310(0x1da)]>0x0?_0x390fa5[_0x5c6310(0x1da)]-_0x18fe2e[_0x5c6310(0x1da)]+'/'+_0x390fa5[_0x5c6310(0x1da)]+_0x5c6310(0x1cb)+_0x18fe2e['join'](';\x20')+')':_0x390fa5[_0x5c6310(0x1da)]+_0x5c6310(0x21b)};}function execCleanMcp(_0x589e62){const _0x37e84f=a171_0x102239;if(!_0x589e62['oldMcpConfig'])return{'step':0x4,'label':_0x37e84f(0x1ea),'ok':!![],'detail':_0x37e84f(0x22e)};try{const _0x27b529=readFileSync(_0x589e62[_0x37e84f(0x1ee)][_0x37e84f(0x1db)],_0x37e84f(0x204)),_0x102d2f=JSON[_0x37e84f(0x1f6)](_0x27b529);if(_0x102d2f?.['mcpServers']&&typeof _0x102d2f[_0x37e84f(0x1ec)]===_0x37e84f(0x227)){const _0x45f571=[];for(const [_0xda3afb,_0x1c8eaf]of Object['entries'](_0x102d2f['mcpServers'])){_0x1c8eaf?.[_0x37e84f(0x1d4)]&&Array[_0x37e84f(0x1f8)](_0x1c8eaf['args'])&&_0x1c8eaf['args'][_0x37e84f(0x1d2)](_0x2628e3=>typeof _0x2628e3===_0x37e84f(0x1f5)&&_0x2628e3[_0x37e84f(0x1df)](_0x37e84f(0x228)))&&_0x45f571[_0x37e84f(0x1bb)](_0xda3afb);}for(const _0x14c525 of _0x45f571){delete _0x102d2f[_0x37e84f(0x1ec)][_0x14c525];}return _0x45f571[_0x37e84f(0x1da)]>0x0&&writeFileSync(_0x589e62['oldMcpConfig'][_0x37e84f(0x1db)],JSON[_0x37e84f(0x206)](_0x102d2f,null,0x2)+'\x0a',_0x37e84f(0x204)),{'step':0x4,'label':_0x37e84f(0x1ea),'ok':!![],'detail':_0x37e84f(0x1fc)+_0x45f571[_0x37e84f(0x1bc)](',\x20')+_0x37e84f(0x1ff)+_0x589e62[_0x37e84f(0x1ee)][_0x37e84f(0x1db)]};}return{'step':0x4,'label':_0x37e84f(0x1ea),'ok':!![],'detail':_0x37e84f(0x238)};}catch(_0x401b82){return{'step':0x4,'label':_0x37e84f(0x1ea),'ok':![],'detail':_0x401b82[_0x37e84f(0x1dd)]};}}function execSkillsRemove(_0x3b0a54,_0x75c7c5){const _0x46e29f=a171_0x102239,_0x217854=runNpxSkillsRemove(_0x3b0a54,{'stdio':_0x46e29f(0x200),'yes':_0x75c7c5});return{'step':0x5,'label':_0x46e29f(0x235),'ok':_0x217854['ok'],'detail':_0x217854['ok']?'lovrabet/lovrabet-skill\x20removed':_0x217854[_0x46e29f(0x21e)]??'exit\x20'+_0x217854['status']};}function execSkillsAdd(_0x3dce44,_0x34ce41){const _0x3a4c53=a171_0x102239,_0x57cda5=runNpxSkillsAddGlobal(_0x3dce44,_0x3a4c53(0x1fe),{'stdio':'inherit','yes':_0x34ce41});return{'step':0x6,'label':'Install\x20new\x20skill','ok':_0x57cda5['ok'],'detail':_0x57cda5['ok']?_0x3a4c53(0x214):_0x57cda5['error']??_0x3a4c53(0x224)+_0x57cda5['status']};}function execUpgradeSdk(_0x588528){const _0x256387=a171_0x102239;if(!_0x588528['sdkUpgrade'])return{'step':0x7,'label':_0x256387(0x1c5),'ok':!![],'detail':_0x256387(0x21c)};const {pkgPath:_0x59e7b3,currentVersion:_0xc8883f,field:_0x4b7143}=_0x588528[_0x256387(0x210)];try{const _0x15f7b6=readFileSync(_0x59e7b3,_0x256387(0x204)),_0x499582=JSON['parse'](_0x15f7b6);return _0x499582[_0x4b7143]['@lovrabet/sdk']=_0x256387(0x1d6),writeFileSync(_0x59e7b3,JSON[_0x256387(0x206)](_0x499582,null,0x2)+'\x0a',_0x256387(0x204)),{'step':0x7,'label':_0x256387(0x1c5),'ok':!![],'detail':_0x4b7143+_0x256387(0x219)+_0xc8883f+_0x256387(0x20a)};}catch(_0x3ec454){return{'step':0x7,'label':_0x256387(0x1c5),'ok':![],'detail':_0x3ec454[_0x256387(0x1dd)]};}}function tryStat(_0x15aba8){try{return statSync(_0x15aba8);}catch{return undefined;}}function printSummary(_0x466179){const _0xa67d53=a171_0x102239;console['log'](''),console[_0xa67d53(0x233)](a171_0x5a8535[_0xa67d53(0x225)]('===\x20Upgrade\x20Summary\x20===')),console['log']('');for(const _0x384720 of _0x466179){const _0x55af8c=_0x384720['ok']?a171_0x5a8535['green']('OK'):a171_0x5a8535['red'](_0xa67d53(0x211));console[_0xa67d53(0x233)]('\x20\x20'+_0x55af8c+_0xa67d53(0x1ca)+_0x384720[_0xa67d53(0x208)]+':\x20'+_0x384720['label']);if(_0x384720[_0xa67d53(0x1e8)])console[_0xa67d53(0x233)](_0xa67d53(0x1fb)+a171_0x5a8535['gray'](_0x384720[_0xa67d53(0x1e8)]));}console[_0xa67d53(0x233)]('');}export async function upgradeApp(_0x324f36,_0x4d5009){const _0x12934b=a171_0x102239,_0x30430e=process[_0x12934b(0x21f)](),_0x28d115=analyse(_0x30430e),_0x123654=!_0x28d115['configMigration']&&_0x28d115[_0x12934b(0x1cd)][_0x12934b(0x1da)]===0x0&&!_0x28d115[_0x12934b(0x1ee)]&&!_0x28d115[_0x12934b(0x232)]&&!_0x28d115[_0x12934b(0x210)];if(_0x123654){console[_0x12934b(0x233)](a171_0x5a8535[_0x12934b(0x1e1)](_0x12934b(0x236)));return;}printReport(_0x28d115);const _0x3bb189=!!(_0x4d5009[_0x12934b(0x226)]||_0x4d5009['Y']||_0x324f36);if(!_0x3bb189)try{const _0x592ca9=await askConfirm(_0x12934b(0x20e));if(!_0x592ca9){console[_0x12934b(0x233)](a171_0x5a8535[_0x12934b(0x1bf)]('Upgrade\x20cancelled.'));return;}}catch(_0x17f73f){if(_0x17f73f?.[_0x12934b(0x1dd)]==='CANCEL'){console[_0x12934b(0x233)](a171_0x5a8535[_0x12934b(0x1bf)](_0x12934b(0x1ef)));return;}throw _0x17f73f;}const _0x145c14=[],_0x2a3183=a171_0x23dfde({'text':_0x12934b(0x1f0),'color':_0x12934b(0x230)})[_0x12934b(0x1e9)](),_0x59d1ca=execConfigMigration(_0x28d115,_0x30430e);_0x145c14['push'](_0x59d1ca),_0x2a3183[_0x59d1ca['ok']?_0x12934b(0x1d5):_0x12934b(0x1eb)](_0x12934b(0x1f2)+(_0x59d1ca['detail']??(_0x59d1ca['ok']?_0x12934b(0x203):_0x12934b(0x20b))));const _0x297b72=resolve(_0x30430e,'.lovrabet'),_0x56da7e=a171_0x23dfde({'text':'Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','color':'cyan'})[_0x12934b(0x1e9)]();if(existsSync(_0x297b72))try{rmSync(_0x297b72,{'recursive':!![],'force':!![]}),_0x56da7e[_0x12934b(0x1d5)]('Step\x202/7:\x20.lovrabet/\x20directory\x20removed'),_0x145c14[_0x12934b(0x1bb)]({'step':0x2,'label':_0x12934b(0x1e7),'ok':!![]});}catch(_0x41f3dd){_0x56da7e[_0x12934b(0x1eb)](_0x12934b(0x1e4)+_0x41f3dd[_0x12934b(0x1dd)]),_0x145c14[_0x12934b(0x1bb)]({'step':0x2,'label':_0x12934b(0x1e7),'ok':![],'detail':_0x41f3dd[_0x12934b(0x1dd)]});}else _0x56da7e[_0x12934b(0x207)]('Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped'),_0x145c14[_0x12934b(0x1bb)]({'step':0x2,'label':_0x12934b(0x1e7),'ok':!![],'detail':'skipped'});const _0x5b6872=a171_0x23dfde({'text':_0x12934b(0x1cc),'color':'cyan'})[_0x12934b(0x1e9)](),_0x51e750=execRemoveOldArtifacts(_0x28d115[_0x12934b(0x1cd)]);_0x145c14[_0x12934b(0x1bb)](_0x51e750),_0x5b6872[_0x51e750['ok']?'succeed':_0x12934b(0x1eb)](_0x12934b(0x1e6)+(_0x51e750['detail']??(_0x51e750['ok']?_0x12934b(0x203):_0x12934b(0x20b))));const _0x371ed6=a171_0x23dfde({'text':_0x12934b(0x1cf),'color':_0x12934b(0x230)})[_0x12934b(0x1e9)](),_0x2be15b=execCleanMcp(_0x28d115);_0x145c14[_0x12934b(0x1bb)](_0x2be15b),_0x371ed6[_0x2be15b['ok']?_0x12934b(0x1d5):_0x12934b(0x1eb)](_0x12934b(0x218)+(_0x2be15b['detail']??(_0x2be15b['ok']?_0x12934b(0x203):'failed')));const _0x2c9b27=a171_0x23dfde({'text':'Step\x205/7:\x20Removing\x20old\x20skill...','color':_0x12934b(0x230)})[_0x12934b(0x1e9)](),_0x33e1a6=execSkillsRemove(_0x30430e,_0x3bb189);_0x145c14[_0x12934b(0x1bb)](_0x33e1a6),_0x2c9b27[_0x33e1a6['ok']?_0x12934b(0x1d5):_0x12934b(0x1eb)]('Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20'+(_0x33e1a6[_0x12934b(0x1e8)]??(_0x33e1a6['ok']?_0x12934b(0x203):_0x12934b(0x20b))));const _0x1fa656=a171_0x23dfde({'text':_0x12934b(0x20f),'color':_0x12934b(0x230)})[_0x12934b(0x1e9)](),_0xafdbea=execSkillsAdd(_0x30430e,_0x3bb189);_0x145c14['push'](_0xafdbea),_0x1fa656[_0xafdbea['ok']?_0x12934b(0x1d5):_0x12934b(0x1eb)](_0x12934b(0x1c4)+(_0xafdbea['detail']??(_0xafdbea['ok']?_0x12934b(0x203):_0x12934b(0x20b))));const _0x2be330=a171_0x23dfde({'text':_0x12934b(0x1c8),'color':_0x12934b(0x230)})['start'](),_0x4edd8a=execUpgradeSdk(_0x28d115);_0x145c14[_0x12934b(0x1bb)](_0x4edd8a),_0x2be330[_0x4edd8a['ok']?_0x12934b(0x1d5):_0x12934b(0x1eb)](_0x12934b(0x22d)+(_0x4edd8a[_0x12934b(0x1e8)]??(_0x4edd8a['ok']?'done':'failed'))),printSummary(_0x145c14);const _0x2c91da=_0x145c14[_0x12934b(0x1d2)](_0x5798d2=>!_0x5798d2['ok']);_0x2c91da?console[_0x12934b(0x233)](a171_0x5a8535[_0x12934b(0x215)]('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console[_0x12934b(0x233)](a171_0x5a8535[_0x12934b(0x1e1)](_0x12934b(0x1c9))),_0x4edd8a['ok']&&_0x28d115[_0x12934b(0x210)]&&(console['log'](''),console[_0x12934b(0x233)](a171_0x5a8535[_0x12934b(0x225)][_0x12934b(0x230)](_0x12934b(0x22f))),console[_0x12934b(0x233)](a171_0x5a8535[_0x12934b(0x230)](_0x12934b(0x1d8))),console[_0x12934b(0x233)](''),console['log'](a171_0x5a8535['white']('\x20\x20npm\x20install')),console[_0x12934b(0x233)](a171_0x5a8535['white']('\x20\x20#\x20or')),console[_0x12934b(0x233)](a171_0x5a8535[_0x12934b(0x22a)](_0x12934b(0x1bd))),console[_0x12934b(0x233)](''));}
1
+ const a171_0x1da4f2=a171_0x46a7;function a171_0x46a7(_0x1fd40b,_0x5eb0c6){_0x1fd40b=_0x1fd40b-0x131;const _0x214430=a171_0x2144();let _0x46a723=_0x214430[_0x1fd40b];return _0x46a723;}(function(_0x759326,_0x4cdbc6){const _0x294666=a171_0x46a7,_0xae24e4=_0x759326();while(!![]){try{const _0x5c17df=parseInt(_0x294666(0x1b2))/0x1+parseInt(_0x294666(0x15f))/0x2*(-parseInt(_0x294666(0x1a3))/0x3)+-parseInt(_0x294666(0x16f))/0x4+-parseInt(_0x294666(0x187))/0x5+-parseInt(_0x294666(0x175))/0x6+-parseInt(_0x294666(0x158))/0x7*(-parseInt(_0x294666(0x14a))/0x8)+parseInt(_0x294666(0x19b))/0x9;if(_0x5c17df===_0x4cdbc6)break;else _0xae24e4['push'](_0xae24e4['shift']());}catch(_0x1a3cd0){_0xae24e4['push'](_0xae24e4['shift']());}}}(a171_0x2144,0x69e7a));import a171_0x440c3d from'chalk';import a171_0x92f1ff from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';function a171_0x2144(){const _0x1aa26a=['some','package.json','oldMcpConfig','devDependencies','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','object','path','oldPath','430696EqCmmR','===\x20Upgrade\x20Analysis\x20===','\x20→\x20latest','\x20(backup:\x20','green','Step\x204/7:\x20Cleaning\x20MCP\x20config...','already\x20exists\x20(will\x20merge)','configMigration','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','.cursor/rules/lovrabet_rules.mdc','Config\x20migration','cyan','Legacy\x20artifacts:','start','77ElwcUy','not\x20found\x20or\x20already\x20at\x20latest','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','Skill\x20swap:','\x20from\x20','not\x20needed','stringify','10bpLVgF','[\x22@lovrabet/sdk\x22]:\x20','mcpServers','utf8','fail','Step\x201/7:\x20Migrating\x20config...','\x20→\x20','yellow','label','includes','filter','white','.cursor/mcp.json','\x20\x20Fields\x20to\x20migrate:\x20','\x20\x20npm\x20install','info','3106760XbXZMC','\x20\x20Current\x20version\x20in\x20','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','Config\x20file:','\x20\x20Action:\x20delete','3654138GEFnhM','error','hasNewConfig','isArray','sdkUpgrade','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','args','\x20\x20#\x20or','===\x20Upgrade\x20Summary\x20===','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','lovrabet/rabetbase','\x20\x20New\x20config\x20(.rabetbase.json):\x20','@lovrabet/sdk','isDirectory','none\x20found','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','Step\x204/7:\x20MCP\x20config\x20—\x20','733410aaRmta','succeed','files','string','undefined','.lovrabet','length','skipped\x20(no\x20legacy\x20config)','cwd','Step\x205/7:\x20Removing\x20old\x20skill...','no\x20legacy\x20entry','needed','\x20\x20Step\x20','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','.bak','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','\x20removed\x20(','Remove\x20.lovrabet/','status','latest','13624461uTaMKs','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','MCP\x20config:','bold','not\x20found\x20(will\x20create)','values','entries','\x20removed','442311glhbBT','parse','lovrabet/rabetbase\x20installed\x20globally','removed\x20','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','skipped','push','@lovrabet/dataset-mcp-server','detail','keys','CANCEL','FAIL','Clean\x20MCP\x20config','Step\x201/7:\x20Config\x20migration\x20—\x20','message','597330fnmuRQ','.claude/skills/lovrabet','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','needsSkillSwap','Upgrade\x20completed\x20successfully!','join','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','red','done','Remove\x20legacy\x20artifacts','gray','oldArtifacts','Upgrade\x20cancelled.','inherit','\x20\x20\x20\x20\x20\x20\x20','Upgrade\x20@lovrabet/sdk','dependencies','yes','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','\x20\x20bun\x20install','log','Remove\x20old\x20skill','failed'];a171_0x2144=function(){return _0x1aa26a;};return a171_0x2144();}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=CONFIG_NAMES[a171_0x1da4f2(0x169)](_0x279a8d=>_0x279a8d!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x200faf){const _0x1e48eb=a171_0x1da4f2,_0x4533f9=[];for(const _0x52c1bb of Object[_0x1e48eb(0x1a0)](CORE_IDE_CONFIGS)){if(_0x52c1bb[_0x1e48eb(0x189)])for(const _0x8f59e3 of _0x52c1bb['files']){_0x4533f9[_0x1e48eb(0x1a9)](resolve(_0x200faf,_0x8f59e3[_0x1e48eb(0x148)]));}}return _0x4533f9;}function analyse(_0x39891c){const _0x229b6e=a171_0x1da4f2;let _0x37e429=null;const _0x19f620=resolve(_0x39891c,NEW_CONFIG_NAME),_0xd51c42=existsSync(_0x19f620);for(const _0x523df5 of LEGACY_CONFIG_NAMES){const _0x2ade59=resolve(_0x39891c,_0x523df5);if(existsSync(_0x2ade59)){const _0x3f074a=readConfigFile(_0x2ade59),_0x236e43=Object[_0x229b6e(0x1ac)](_0x3f074a)[_0x229b6e(0x169)](_0x593bb2=>typeof _0x3f074a[_0x593bb2]!==_0x229b6e(0x18b));_0x37e429={'oldPath':_0x2ade59,'hasNewConfig':_0xd51c42,'fields':_0x236e43};break;}}const _0x18357a=[],_0x5dafd1=resolve(_0x39891c,'.lovrabet');if(existsSync(_0x5dafd1))_0x18357a[_0x229b6e(0x1a9)](_0x5dafd1);const _0x429a7b=resolve(_0x39891c,_0x229b6e(0x153));if(existsSync(_0x429a7b))_0x18357a[_0x229b6e(0x1a9)](_0x429a7b);const _0xa67bdd=resolve(_0x39891c,_0x229b6e(0x1b3));if(existsSync(_0xa67bdd))_0x18357a[_0x229b6e(0x1a9)](_0xa67bdd);for(const _0x3028cb of collectIdeSkillFiles(_0x39891c)){if(existsSync(_0x3028cb))_0x18357a[_0x229b6e(0x1a9)](_0x3028cb);}let _0x218563=null;const _0x2f09f8=resolve(_0x39891c,_0x229b6e(0x16b));if(existsSync(_0x2f09f8))try{const _0x17a4cc=JSON[_0x229b6e(0x1a4)](readFileSync(_0x2f09f8,_0x229b6e(0x162)));if(_0x17a4cc?.['mcpServers']&&typeof _0x17a4cc[_0x229b6e(0x161)]===_0x229b6e(0x147)){const _0x179791=[];for(const [_0x29db04,_0x30b1f4]of Object[_0x229b6e(0x1a1)](_0x17a4cc[_0x229b6e(0x161)])){const _0x5b5827=_0x30b1f4;_0x5b5827?.['args']&&Array['isArray'](_0x5b5827[_0x229b6e(0x17c)])&&_0x5b5827[_0x229b6e(0x17c)][_0x229b6e(0x142)](_0x2a1ac5=>typeof _0x2a1ac5==='string'&&_0x2a1ac5['includes'](_0x229b6e(0x1aa)))&&_0x179791['push'](_0x29db04);}_0x179791[_0x229b6e(0x18d)]>0x0&&(_0x218563={'path':_0x2f09f8,'keys':_0x179791});}}catch{}const _0x509b42=_0x18357a[_0x229b6e(0x18d)]>0x0||_0x37e429!==null;let _0x2537a3=null;const _0x52a08c=resolve(_0x39891c,_0x229b6e(0x143));if(existsSync(_0x52a08c))try{const _0x2fb161=JSON[_0x229b6e(0x1a4)](readFileSync(_0x52a08c,_0x229b6e(0x162)));for(const _0x23ceaa of[_0x229b6e(0x13b),_0x229b6e(0x145)]){const _0x552ee5=_0x2fb161?.[_0x23ceaa]?.[_0x229b6e(0x182)];if(typeof _0x552ee5===_0x229b6e(0x18a)){_0x552ee5!==_0x229b6e(0x19a)&&(_0x2537a3={'pkgPath':_0x52a08c,'currentVersion':_0x552ee5,'field':_0x23ceaa});break;}}}catch{}return{'configMigration':_0x37e429,'oldArtifacts':_0x18357a,'oldMcpConfig':_0x218563,'needsSkillSwap':_0x509b42,'sdkUpgrade':_0x2537a3};}function printReport(_0x3fa148){const _0xd06329=a171_0x1da4f2,{configMigration:_0x782502,oldArtifacts:_0x1d891f,oldMcpConfig:_0x257af6,needsSkillSwap:_0x3f8adf}=_0x3fa148;console[_0xd06329(0x13f)](''),console[_0xd06329(0x13f)](a171_0x440c3d['bold'](_0xd06329(0x14b))),console[_0xd06329(0x13f)]('');_0x782502?(console[_0xd06329(0x13f)](a171_0x440c3d[_0xd06329(0x155)](_0xd06329(0x173))+('\x20\x20'+a171_0x440c3d[_0xd06329(0x166)](_0x782502['oldPath']))),console['log'](_0xd06329(0x181)+(_0x782502[_0xd06329(0x177)]?a171_0x440c3d[_0xd06329(0x14e)](_0xd06329(0x150)):a171_0x440c3d[_0xd06329(0x135)](_0xd06329(0x19f)))),console[_0xd06329(0x13f)](_0xd06329(0x16c)+_0x782502['fields'][_0xd06329(0x1b7)](',\x20')),console[_0xd06329(0x13f)](_0xd06329(0x17b))):console[_0xd06329(0x13f)](a171_0x440c3d[_0xd06329(0x155)](_0xd06329(0x173))+'\x20\x20'+a171_0x440c3d[_0xd06329(0x135)]('no\x20legacy\x20config\x20found'));console[_0xd06329(0x13f)]('');if(_0x1d891f[_0xd06329(0x18d)]>0x0){console[_0xd06329(0x13f)](a171_0x440c3d['cyan'](_0xd06329(0x156)));for(const _0x3df0c3 of _0x1d891f){console[_0xd06329(0x13f)]('\x20\x20'+a171_0x440c3d['red']('FOUND')+'\x20\x20'+_0x3df0c3);}console['log'](_0xd06329(0x174));}else console[_0xd06329(0x13f)](a171_0x440c3d['cyan'](_0xd06329(0x156))+'\x20\x20'+a171_0x440c3d[_0xd06329(0x135)](_0xd06329(0x184)));console[_0xd06329(0x13f)]('');_0x257af6?(console[_0xd06329(0x13f)](a171_0x440c3d['cyan'](_0xd06329(0x19d))+('\x20\x20'+a171_0x440c3d[_0xd06329(0x166)](_0x257af6[_0xd06329(0x148)])+'\x20→\x20keys:\x20'+_0x257af6['keys'][_0xd06329(0x1b7)](',\x20'))),console[_0xd06329(0x13f)](_0xd06329(0x1a7))):console[_0xd06329(0x13f)](a171_0x440c3d['cyan']('MCP\x20config:')+'\x20\x20'+a171_0x440c3d[_0xd06329(0x135)](_0xd06329(0x191)));console[_0xd06329(0x13f)](''),console[_0xd06329(0x13f)](a171_0x440c3d['cyan'](_0xd06329(0x15b))+('\x20\x20'+(_0x3f8adf?a171_0x440c3d[_0xd06329(0x166)](_0xd06329(0x192)):a171_0x440c3d[_0xd06329(0x14e)](_0xd06329(0x15d)))));_0x3f8adf&&console['log'](_0xd06329(0x1b4)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0xd06329(0x13f)]('');if(_0x3fa148['sdkUpgrade']){const {currentVersion:_0x4d262b,field:_0x38de47,pkgPath:_0x413784}=_0x3fa148[_0xd06329(0x179)];console[_0xd06329(0x13f)](a171_0x440c3d[_0xd06329(0x155)]('@lovrabet/sdk:')+('\x20\x20'+a171_0x440c3d[_0xd06329(0x166)](_0x413784))),console[_0xd06329(0x13f)](_0xd06329(0x170)+_0x38de47+':\x20'+a171_0x440c3d[_0xd06329(0x166)](_0x4d262b)+'\x20→\x20'+a171_0x440c3d[_0xd06329(0x14e)](_0xd06329(0x19a))),console[_0xd06329(0x13f)](_0xd06329(0x171));}else console[_0xd06329(0x13f)](a171_0x440c3d[_0xd06329(0x155)]('@lovrabet/sdk:')+'\x20\x20'+a171_0x440c3d['gray'](_0xd06329(0x159)));console[_0xd06329(0x13f)]('');}function execConfigMigration(_0x1cffb5,_0x10e13e){const _0x50d4b0=a171_0x1da4f2,{configMigration:_0x31ed17}=_0x1cffb5;if(!_0x31ed17?.['oldPath'])return{'step':0x1,'label':_0x50d4b0(0x154),'ok':!![],'detail':_0x50d4b0(0x18e)};const _0x3f9275=readConfigFile(_0x31ed17[_0x50d4b0(0x149)]),_0x1cc7b7=resolve(_0x10e13e,NEW_CONFIG_NAME),_0x46b4b2=_0x31ed17[_0x50d4b0(0x177)]?readConfigFile(_0x1cc7b7):{};for(const [_0x100a81,_0x38c8a9]of Object[_0x50d4b0(0x1a1)](_0x3f9275)){!(_0x100a81 in _0x46b4b2)&&(_0x46b4b2[_0x100a81]=_0x38c8a9);}writeConfigFile(_0x1cc7b7,_0x46b4b2);const _0x43af33=_0x31ed17['oldPath']+_0x50d4b0(0x195);return renameSync(_0x31ed17[_0x50d4b0(0x149)],_0x43af33),{'step':0x1,'label':_0x50d4b0(0x154),'ok':!![],'detail':_0x31ed17[_0x50d4b0(0x149)]+_0x50d4b0(0x165)+_0x1cc7b7+_0x50d4b0(0x14d)+_0x43af33+')'};}function execRemoveOldArtifacts(_0x42c255){const _0x21f176=a171_0x1da4f2,_0x388fea=[];for(const _0x192ea5 of _0x42c255){try{if(!existsSync(_0x192ea5))continue;const _0x4012d3=tryStat(_0x192ea5);_0x4012d3?.[_0x21f176(0x183)]()?rmSync(_0x192ea5,{'recursive':!![],'force':!![]}):unlinkSync(_0x192ea5);}catch(_0x3838a2){_0x388fea['push'](_0x192ea5+':\x20'+_0x3838a2[_0x21f176(0x1b1)]);}}return{'step':0x3,'label':_0x21f176(0x134),'ok':_0x388fea[_0x21f176(0x18d)]===0x0,'detail':_0x388fea[_0x21f176(0x18d)]>0x0?_0x42c255['length']-_0x388fea[_0x21f176(0x18d)]+'/'+_0x42c255[_0x21f176(0x18d)]+_0x21f176(0x197)+_0x388fea[_0x21f176(0x1b7)](';\x20')+')':_0x42c255[_0x21f176(0x18d)]+_0x21f176(0x1a2)};}function execCleanMcp(_0x2277d0){const _0x2bca87=a171_0x1da4f2;if(!_0x2277d0['oldMcpConfig'])return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':'skipped'};try{const _0x1c823e=readFileSync(_0x2277d0['oldMcpConfig'][_0x2bca87(0x148)],_0x2bca87(0x162)),_0x146811=JSON['parse'](_0x1c823e);if(_0x146811?.[_0x2bca87(0x161)]&&typeof _0x146811['mcpServers']===_0x2bca87(0x147)){const _0x41f2b1=[];for(const [_0x57e71b,_0x119355]of Object['entries'](_0x146811['mcpServers'])){_0x119355?.['args']&&Array[_0x2bca87(0x178)](_0x119355['args'])&&_0x119355[_0x2bca87(0x17c)]['some'](_0x3fa96a=>typeof _0x3fa96a===_0x2bca87(0x18a)&&_0x3fa96a[_0x2bca87(0x168)]('@lovrabet/dataset-mcp-server'))&&_0x41f2b1['push'](_0x57e71b);}for(const _0x1835b1 of _0x41f2b1){delete _0x146811[_0x2bca87(0x161)][_0x1835b1];}return _0x41f2b1[_0x2bca87(0x18d)]>0x0&&writeFileSync(_0x2277d0[_0x2bca87(0x144)][_0x2bca87(0x148)],JSON[_0x2bca87(0x15e)](_0x146811,null,0x2)+'\x0a',_0x2bca87(0x162)),{'step':0x4,'label':_0x2bca87(0x1af),'ok':!![],'detail':_0x2bca87(0x1a6)+_0x41f2b1[_0x2bca87(0x1b7)](',\x20')+_0x2bca87(0x15c)+_0x2277d0[_0x2bca87(0x144)]['path']};}return{'step':0x4,'label':_0x2bca87(0x1af),'ok':!![],'detail':'no\x20matching\x20entry\x20found'};}catch(_0x29272b){return{'step':0x4,'label':_0x2bca87(0x1af),'ok':![],'detail':_0x29272b[_0x2bca87(0x1b1)]};}}function execSkillsRemove(_0x3f6b0a,_0x2325c9){const _0x1b3eea=a171_0x1da4f2,_0x2a6fb9=runNpxSkillsRemove(_0x3f6b0a,{'stdio':'inherit','yes':_0x2325c9});return{'step':0x5,'label':_0x1b3eea(0x140),'ok':_0x2a6fb9['ok'],'detail':_0x2a6fb9['ok']?'lovrabet/lovrabet-skill\x20removed':_0x2a6fb9[_0x1b3eea(0x176)]??'exit\x20'+_0x2a6fb9[_0x1b3eea(0x199)]};}function execSkillsAdd(_0x2776b4,_0x404829){const _0x44d4db=a171_0x1da4f2,_0x8dd30d=runNpxSkillsAddGlobal(_0x2776b4,_0x44d4db(0x180),{'stdio':_0x44d4db(0x138),'yes':_0x404829});return{'step':0x6,'label':'Install\x20new\x20skill','ok':_0x8dd30d['ok'],'detail':_0x8dd30d['ok']?_0x44d4db(0x1a5):_0x8dd30d[_0x44d4db(0x176)]??'exit\x20'+_0x8dd30d['status']};}function execUpgradeSdk(_0x46f649){const _0x2e7fed=a171_0x1da4f2;if(!_0x46f649['sdkUpgrade'])return{'step':0x7,'label':_0x2e7fed(0x13a),'ok':!![],'detail':_0x2e7fed(0x152)};const {pkgPath:_0x5983ec,currentVersion:_0x2d47c1,field:_0x1018c6}=_0x46f649['sdkUpgrade'];try{const _0x324124=readFileSync(_0x5983ec,'utf8'),_0x43b5bb=JSON[_0x2e7fed(0x1a4)](_0x324124);return _0x43b5bb[_0x1018c6][_0x2e7fed(0x182)]='latest',writeFileSync(_0x5983ec,JSON[_0x2e7fed(0x15e)](_0x43b5bb,null,0x2)+'\x0a','utf8'),{'step':0x7,'label':_0x2e7fed(0x13a),'ok':!![],'detail':_0x1018c6+_0x2e7fed(0x160)+_0x2d47c1+_0x2e7fed(0x14c)};}catch(_0x2b0704){return{'step':0x7,'label':_0x2e7fed(0x13a),'ok':![],'detail':_0x2b0704[_0x2e7fed(0x1b1)]};}}function tryStat(_0x5667fd){try{return statSync(_0x5667fd);}catch{return undefined;}}function printSummary(_0x4d0b91){const _0x426ad3=a171_0x1da4f2;console[_0x426ad3(0x13f)](''),console[_0x426ad3(0x13f)](a171_0x440c3d[_0x426ad3(0x19e)](_0x426ad3(0x17e))),console[_0x426ad3(0x13f)]('');for(const _0x167930 of _0x4d0b91){const _0xbfbb05=_0x167930['ok']?a171_0x440c3d['green']('OK'):a171_0x440c3d[_0x426ad3(0x132)](_0x426ad3(0x1ae));console[_0x426ad3(0x13f)]('\x20\x20'+_0xbfbb05+_0x426ad3(0x193)+_0x167930['step']+':\x20'+_0x167930[_0x426ad3(0x167)]);if(_0x167930['detail'])console[_0x426ad3(0x13f)](_0x426ad3(0x139)+a171_0x440c3d[_0x426ad3(0x135)](_0x167930[_0x426ad3(0x1ab)]));}console[_0x426ad3(0x13f)]('');}export async function upgradeApp(_0x424256,_0x7abf37){const _0x428040=a171_0x1da4f2,_0x54b92b=process[_0x428040(0x18f)](),_0x3cf79f=analyse(_0x54b92b),_0x5db7b5=!_0x3cf79f[_0x428040(0x151)]&&_0x3cf79f['oldArtifacts']['length']===0x0&&!_0x3cf79f[_0x428040(0x144)]&&!_0x3cf79f[_0x428040(0x1b5)]&&!_0x3cf79f['sdkUpgrade'];if(_0x5db7b5){console[_0x428040(0x13f)](a171_0x440c3d[_0x428040(0x14e)](_0x428040(0x13d)));return;}printReport(_0x3cf79f);const _0x52f3af=!!(_0x7abf37[_0x428040(0x13c)]||_0x7abf37['Y']||_0x424256);if(!_0x52f3af)try{const _0x1c14a7=await askConfirm('Proceed\x20with\x20upgrade?');if(!_0x1c14a7){console[_0x428040(0x13f)](a171_0x440c3d[_0x428040(0x135)](_0x428040(0x137)));return;}}catch(_0x394cff){if(_0x394cff?.['message']===_0x428040(0x1ad)){console[_0x428040(0x13f)](a171_0x440c3d[_0x428040(0x135)](_0x428040(0x137)));return;}throw _0x394cff;}const _0x24eb35=[],_0x573b3e=a171_0x92f1ff({'text':_0x428040(0x164),'color':_0x428040(0x155)})[_0x428040(0x157)](),_0x919782=execConfigMigration(_0x3cf79f,_0x54b92b);_0x24eb35[_0x428040(0x1a9)](_0x919782),_0x573b3e[_0x919782['ok']?_0x428040(0x188):_0x428040(0x163)](_0x428040(0x1b0)+(_0x919782[_0x428040(0x1ab)]??(_0x919782['ok']?_0x428040(0x133):_0x428040(0x141))));const _0x9862af=resolve(_0x54b92b,_0x428040(0x18c)),_0x3c8cc7=a171_0x92f1ff({'text':'Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','color':'cyan'})[_0x428040(0x157)]();if(existsSync(_0x9862af))try{rmSync(_0x9862af,{'recursive':!![],'force':!![]}),_0x3c8cc7[_0x428040(0x188)](_0x428040(0x172)),_0x24eb35['push']({'step':0x2,'label':_0x428040(0x198),'ok':!![]});}catch(_0x4b4181){_0x3c8cc7['fail'](_0x428040(0x15a)+_0x4b4181[_0x428040(0x1b1)]),_0x24eb35[_0x428040(0x1a9)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':![],'detail':_0x4b4181['message']});}else _0x3c8cc7[_0x428040(0x16e)](_0x428040(0x19c)),_0x24eb35['push']({'step':0x2,'label':_0x428040(0x198),'ok':!![],'detail':_0x428040(0x1a8)});const _0x2200a7=a171_0x92f1ff({'text':_0x428040(0x131),'color':_0x428040(0x155)})[_0x428040(0x157)](),_0x556e99=execRemoveOldArtifacts(_0x3cf79f[_0x428040(0x136)]);_0x24eb35[_0x428040(0x1a9)](_0x556e99),_0x2200a7[_0x556e99['ok']?_0x428040(0x188):_0x428040(0x163)](_0x428040(0x17f)+(_0x556e99[_0x428040(0x1ab)]??(_0x556e99['ok']?'done':'failed')));const _0x4378a0=a171_0x92f1ff({'text':_0x428040(0x14f),'color':'cyan'})[_0x428040(0x157)](),_0x40894c=execCleanMcp(_0x3cf79f);_0x24eb35[_0x428040(0x1a9)](_0x40894c),_0x4378a0[_0x40894c['ok']?_0x428040(0x188):_0x428040(0x163)](_0x428040(0x186)+(_0x40894c[_0x428040(0x1ab)]??(_0x40894c['ok']?_0x428040(0x133):'failed')));const _0xea7db=a171_0x92f1ff({'text':_0x428040(0x190),'color':_0x428040(0x155)})['start'](),_0x19474a=execSkillsRemove(_0x54b92b,_0x52f3af);_0x24eb35[_0x428040(0x1a9)](_0x19474a),_0xea7db[_0x19474a['ok']?_0x428040(0x188):'fail']('Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20'+(_0x19474a[_0x428040(0x1ab)]??(_0x19474a['ok']?'done':_0x428040(0x141))));const _0xe01a33=a171_0x92f1ff({'text':'Step\x206/7:\x20Installing\x20new\x20skill...','color':_0x428040(0x155)})['start'](),_0x48e99e=execSkillsAdd(_0x54b92b,_0x52f3af);_0x24eb35[_0x428040(0x1a9)](_0x48e99e),_0xe01a33[_0x48e99e['ok']?_0x428040(0x188):_0x428040(0x163)](_0x428040(0x194)+(_0x48e99e['detail']??(_0x48e99e['ok']?'done':_0x428040(0x141))));const _0x3ee33e=a171_0x92f1ff({'text':_0x428040(0x196),'color':_0x428040(0x155)})[_0x428040(0x157)](),_0x6b636b=execUpgradeSdk(_0x3cf79f);_0x24eb35[_0x428040(0x1a9)](_0x6b636b),_0x3ee33e[_0x6b636b['ok']?'succeed':_0x428040(0x163)](_0x428040(0x17a)+(_0x6b636b['detail']??(_0x6b636b['ok']?'done':_0x428040(0x141)))),printSummary(_0x24eb35);const _0x2e1ac6=_0x24eb35[_0x428040(0x142)](_0x21f247=>!_0x21f247['ok']);_0x2e1ac6?console['log'](a171_0x440c3d[_0x428040(0x166)](_0x428040(0x146))):console[_0x428040(0x13f)](a171_0x440c3d[_0x428040(0x14e)](_0x428040(0x1b6))),_0x6b636b['ok']&&_0x3cf79f['sdkUpgrade']&&(console[_0x428040(0x13f)](''),console[_0x428040(0x13f)](a171_0x440c3d[_0x428040(0x19e)][_0x428040(0x155)](_0x428040(0x185))),console['log'](a171_0x440c3d[_0x428040(0x155)]('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console['log'](''),console[_0x428040(0x13f)](a171_0x440c3d['white'](_0x428040(0x16d))),console['log'](a171_0x440c3d[_0x428040(0x16a)](_0x428040(0x17d))),console['log'](a171_0x440c3d[_0x428040(0x16a)](_0x428040(0x13e))),console[_0x428040(0x13f)](''));}
@@ -1 +1 @@
1
- const a172_0x581ed5=a172_0x1384;(function(_0x486023,_0x3767b8){const _0x445e8f=a172_0x1384,_0x27d1be=_0x486023();while(!![]){try{const _0x3a0d7d=parseInt(_0x445e8f(0x102))/0x1+-parseInt(_0x445e8f(0xf6))/0x2*(-parseInt(_0x445e8f(0xe8))/0x3)+parseInt(_0x445e8f(0xd9))/0x4*(parseInt(_0x445e8f(0xe3))/0x5)+parseInt(_0x445e8f(0xce))/0x6*(parseInt(_0x445e8f(0xb6))/0x7)+-parseInt(_0x445e8f(0xe7))/0x8*(parseInt(_0x445e8f(0xbb))/0x9)+-parseInt(_0x445e8f(0xcf))/0xa+-parseInt(_0x445e8f(0xcd))/0xb;if(_0x3a0d7d===_0x3767b8)break;else _0x27d1be['push'](_0x27d1be['shift']());}catch(_0x10ab86){_0x27d1be['push'](_0x27d1be['shift']());}}}(a172_0x4f95,0x21361));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';function a172_0x1384(_0x5b48e6,_0x59e37c){_0x5b48e6=_0x5b48e6-0xb2;const _0x4f955d=a172_0x4f95();let _0x138406=_0x4f955d[_0x5b48e6];return _0x138406;}import{dataDefinitions}from'../commands/data/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 a172_0x4f95(){const _0x44c768=['Dataset\x20&\x20Operations','login','app:remove','write','knowledge-base:create','skill:install','rabetbase\x20kb\x20detail','1180515hbWQrq','values','rabetbase\x20cli-skill\x20install','SQL\x20Queries','432NMCOeC','3ltIQUf','rabetbase\x20run\x20build','rabetbase\x20bff\x20create','Instant\x20API','permit:role-apis-set','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','get','isSingleCommand','CLI\x20Built-in\x20Skill','push','BFF\x20Scripts','permit:page-set','length','permit:page-get','355302sixpQh','rabetbase\x20workspace\x20remove\x20<name>','Company\x20Knowledge\x20Base','skill:','Run\x20any\x20package.json\x20script','Logs','rabetbase\x20kb\x20delete','run','\x20\x20[write]','command','Project','Workspace','98827pRacbn','role:create','hidden','\x20\x20[','Self\x20Update','description','risk','map','read','Menu','rabetbase\x20kb\x20list','set','service','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','rabetbase\x20kb\x20update','`\x20has\x20been\x20removed.','Database\x20Connections','OCR','Quick\x20Start','14YzByUh','Use\x20`','sql:new','rabetbase\x20role\x20list','rabetbase\x20run\x20preview','13473ADLRIr','app:add','rabetbase\x20app\x20list\x20--remote','knowledge-base:delete','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','File','`\x20instead.','<script>','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','Schema','from','start','Run\x20Scripts','sql:save','knowledge-base:list','preview','commands','wildcardDef','2848098TLeAZa','285378YPRway','1319180QOVEPJ','bff:new','menu:update','create','show','logout','skills:install','Tenant\x20Members','has','API\x20Development','4uvqOqn','knowledge-base:update','Authentication'];a172_0x4f95=function(){return _0x44c768;};return a172_0x4f95();}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{initDefinitions}from'../commands/init/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(_0x59c916){const _0x13a4e6=a172_0x1384;for(const _0x529508 of _0x59c916){definitions[_0x13a4e6(0x10d)](_0x529508[_0x13a4e6(0x10e)]+':'+_0x529508[_0x13a4e6(0xff)],_0x529508);let _0x111878=serviceGroups['get'](_0x529508[_0x13a4e6(0x10e)]);!_0x111878&&(_0x111878=[],serviceGroups[_0x13a4e6(0x10d)](_0x529508[_0x13a4e6(0x10e)],_0x111878)),_0x111878[_0x13a4e6(0xf1)](_0x529508);}}function registerDeclarativeService(_0x32c130,_0xd1c07e,_0x4e25b0){const _0x2b8557=a172_0x1384;registerDefinitions(_0xd1c07e);_0x4e25b0?.[_0x2b8557(0xcc)]&&registerDefinitions([_0x4e25b0[_0x2b8557(0xcc)]]);const _0x71c20f=_0x33c23f=>_0x33c23f===_0x2b8557(0x10a)?'':_0x33c23f===_0x2b8557(0xdf)?_0x2b8557(0xfe):'\x20\x20[high-risk-write]',_0x349797={'service':_0xd1c07e[0x0][_0x2b8557(0x10e)],'label':_0x32c130,'commands':_0xd1c07e['filter'](_0x46cb97=>!_0x46cb97[_0x2b8557(0x104)])[_0x2b8557(0x109)](_0x1dbfbe=>({'command':_0x1dbfbe[_0x2b8557(0xff)],'description':_0x1dbfbe[_0x2b8557(0x107)],'tag':_0x71c20f(_0x1dbfbe[_0x2b8557(0x108)])})),'declarative':!![],'defaultCommand':_0x4e25b0?.['defaultCommand']??(_0x4e25b0?.[_0x2b8557(0xef)]?_0xd1c07e[0x0][_0x2b8557(0xff)]:undefined),'wildcardDef':_0x4e25b0?.[_0x2b8557(0xcc)],'isSingleCommand':_0x4e25b0?.[_0x2b8557(0xef)]};serviceRegistry[_0x2b8557(0xf1)](_0x349797),serviceByName[_0x2b8557(0x10d)](_0x349797['service'],_0x349797);}registerDeclarativeService(a172_0x581ed5(0xb5),initDefinitions,{'defaultCommand':a172_0x581ed5(0xfd),'isSingleCommand':!![]}),registerDeclarativeService(a172_0x581ed5(0x100),projectDefinitions),registerDeclarativeService(a172_0x581ed5(0x101),workspaceDefinitions),registerDeclarativeService('App\x20Management',appDefinitions),registerDeclarativeService(a172_0x581ed5(0xdb),authDefinitions,{'defaultCommand':a172_0x581ed5(0xdd)}),registerDeclarativeService(a172_0x581ed5(0xd6),tenantDefinitions),registerDeclarativeService('User\x20Accounts',userAccountDefinitions),registerDeclarativeService(a172_0x581ed5(0xdc),datasetDefinitions),registerDeclarativeService('Smart\x20List\x20Pages\x20&\x20React\x20Custom\x20Pages',pageDefinitions),registerDeclarativeService(a172_0x581ed5(0xd8),apiDefinitions),registerDeclarativeService(a172_0x581ed5(0xeb),dataDefinitions),registerDeclarativeService(a172_0x581ed5(0xf2),bffDefinitions),registerDeclarativeService('Notification\x20Configuration',notificationDefinitions),registerDeclarativeService(a172_0x581ed5(0xe6),sqlDefinitions),registerDeclarativeService(a172_0x581ed5(0xb3),dbDefinitions),registerDeclarativeService(a172_0x581ed5(0x10b),menuDefinitions),registerDeclarativeService('Async\x20Tasks',taskDefinitions),registerDeclarativeService('Roles',roleDefinitions),registerDeclarativeService('Runtime\x20App\x20Config\x20Management',appConfigDefinitions),registerDeclarativeService(a172_0x581ed5(0xf8),kbDefinitions),registerDeclarativeService('Platform\x20Issue',issueDefinitions),registerDeclarativeService(a172_0x581ed5(0xc0),fileDefinitions),registerDeclarativeService(a172_0x581ed5(0xb4),ocrDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService('Configuration',configDefinitions),registerDeclarativeService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a172_0x581ed5(0xc4),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a172_0x581ed5(0x106),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a172_0x581ed5(0xf0),cliSkillDefinitions,{'defaultCommand':'install'}),registerDeclarativeService(a172_0x581ed5(0xfb),logsDefinitions,{'defaultCommand':a172_0x581ed5(0xd3)}),registerDeclarativeService(a172_0x581ed5(0xc7),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a172_0x581ed5(0xf4)]-0x1];last[a172_0x581ed5(0xcb)]=[{'command':a172_0x581ed5(0xc2),'description':a172_0x581ed5(0xfa),'tag':a172_0x581ed5(0x105)+runDefinition[a172_0x581ed5(0x108)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([[a172_0x581ed5(0xc8),a172_0x581ed5(0xc3)],[a172_0x581ed5(0xd0),a172_0x581ed5(0xea)],[a172_0x581ed5(0xb8),'rabetbase\x20sql\x20create'],[a172_0x581ed5(0xd1),'rabetbase\x20menu\x20asset-update'],['project:init',a172_0x581ed5(0xed)],[a172_0x581ed5(0xf9),a172_0x581ed5(0xe5)],[a172_0x581ed5(0xe1),a172_0x581ed5(0xe5)],['skills:',a172_0x581ed5(0xe5)],[a172_0x581ed5(0xd5),a172_0x581ed5(0xe5)],['app:remote',a172_0x581ed5(0xbd)],['app:use','rabetbase\x20workspace\x20use\x20--app\x20<name>'],[a172_0x581ed5(0xbc),a172_0x581ed5(0xbf)],[a172_0x581ed5(0xde),a172_0x581ed5(0xf7)],[a172_0x581ed5(0xc9),a172_0x581ed5(0x10c)],['knowledge-base:detail',a172_0x581ed5(0xe2)],[a172_0x581ed5(0xe0),'rabetbase\x20kb\x20create'],[a172_0x581ed5(0xda),a172_0x581ed5(0x110)],[a172_0x581ed5(0xbe),a172_0x581ed5(0xfc)],[a172_0x581ed5(0x103),a172_0x581ed5(0xb9)]]),REMOVED_COMMAND_HINTS=new Map([[a172_0x581ed5(0xf5),a172_0x581ed5(0x10f)],[a172_0x581ed5(0xf3),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],['permit:role-menus',a172_0x581ed5(0x10f)],['permit:role-menus-set','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a172_0x581ed5(0xec),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.']]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a172_0x581ed5(0xd2),'rabetbase\x20project\x20create\x20<project-name>'],[a172_0x581ed5(0xc6),'rabetbase\x20run\x20start'],['build',a172_0x581ed5(0xe9)],[a172_0x581ed5(0xca),a172_0x581ed5(0xba)],[a172_0x581ed5(0xd4),'rabetbase\x20auth\x20logout']]);export function resolveRemovedCommand(_0xa1f263,_0xb984b1){const _0x360146=a172_0x581ed5;if(!_0xa1f263)return undefined;const _0x1205e0=REMOVED_COMMAND_REPLACEMENTS[_0x360146(0xee)](_0xa1f263+':'+(_0xb984b1??'')),_0x4676c1=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x360146(0xee)](_0xa1f263),_0x95db88=_0x1205e0??_0x4676c1,_0x2db330=REMOVED_COMMAND_HINTS['get'](_0xa1f263+':'+(_0xb984b1??''));if(!_0x95db88&&!_0x2db330)return undefined;const _0x2de93a=_0x4676c1?_0xa1f263:_0xb984b1?_0xa1f263+'\x20'+_0xb984b1:_0xa1f263;return{'command':_0x2de93a,'message':'`rabetbase\x20'+_0x2de93a+_0x360146(0xb2),'hint':_0x2db330??_0x360146(0xb7)+_0x95db88+_0x360146(0xc1)};}export function findDefinition(_0x2e3b0c,_0x4ca921){const _0x4bfb8f=a172_0x581ed5;return definitions[_0x4bfb8f(0xee)](_0x2e3b0c+':'+_0x4ca921);}export function isKnownService(_0x48c864){const _0x2740b0=a172_0x581ed5;return serviceByName[_0x2740b0(0xd7)](_0x48c864);}export function isDeclarativeService(_0x45c5b4){const _0x25e724=a172_0x581ed5;return serviceGroups[_0x25e724(0xd7)](_0x45c5b4)||serviceByName[_0x25e724(0xee)](_0x45c5b4)?.['wildcardDef']!==undefined;}export function getServiceEntry(_0x1b7030){return serviceByName['get'](_0x1b7030);}export function getLegacyHandler(_0x13c8f3,_0x571c0e){return undefined;}export function getAllDefinitions(){const _0x33d291=a172_0x581ed5;return Array[_0x33d291(0xc5)](definitions[_0x33d291(0xe4)]());}
1
+ const a172_0xf03f90=a172_0x1f66;(function(_0x48c866,_0x5657f5){const _0x40c6ce=a172_0x1f66,_0x546445=_0x48c866();while(!![]){try{const _0x2378e1=parseInt(_0x40c6ce(0x1ef))/0x1+-parseInt(_0x40c6ce(0x1c5))/0x2*(-parseInt(_0x40c6ce(0x1d3))/0x3)+parseInt(_0x40c6ce(0x1e4))/0x4+parseInt(_0x40c6ce(0x1e5))/0x5*(parseInt(_0x40c6ce(0x1cf))/0x6)+parseInt(_0x40c6ce(0x1e9))/0x7*(parseInt(_0x40c6ce(0x1f1))/0x8)+parseInt(_0x40c6ce(0x1f2))/0x9*(-parseInt(_0x40c6ce(0x1d7))/0xa)+parseInt(_0x40c6ce(0x1d0))/0xb*(-parseInt(_0x40c6ce(0x1dc))/0xc);if(_0x2378e1===_0x5657f5)break;else _0x546445['push'](_0x546445['shift']());}catch(_0x4dff9b){_0x546445['push'](_0x546445['shift']());}}}(a172_0x2fd5,0xddd03));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{dataDefinitions}from'../commands/data/index.js';import{dbDefinitions}from'../commands/db/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';function a172_0x1f66(_0x5a476f,_0x1f940f){_0x5a476f=_0x5a476f-0x1a2;const _0x2fd597=a172_0x2fd5();let _0x1f6607=_0x2fd597[_0x5a476f];return _0x1f6607;}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';function a172_0x2fd5(){const _0x5d6f48=['skills:install','skills:','rabetbase\x20run\x20start','rabetbase\x20workspace\x20use\x20--app\x20<name>','app:add','set','isSingleCommand','map','menu:update','rabetbase\x20run\x20build','Instant\x20API','No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.','defaultCommand','Self\x20Update','Quick\x20Start','\x20\x20[write]','BFF\x20Scripts','push','length','rabetbase\x20kb\x20create','write','Runtime\x20App\x20Config\x20Management','knowledge-base:delete','Diagnostics','has','app:use','rabetbase\x20kb\x20list','rabetbase\x20workspace\x20init\x20--appcode\x20<code>','Logs','Project','2VgUDbc','Run\x20any\x20package.json\x20script','\x20\x20[','command','Platform\x20Issue','`rabetbase\x20','API\x20Development','Tenant\x20Members','CLI\x20Built-in\x20Skill','rabetbase\x20cli-skill\x20install','6fTMWBu','11FxVvHk','app:remote','read','4879773kiwzNQ','rabetbase\x20project\x20create\x20<project-name>','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','Smart\x20List\x20Pages\x20&\x20React\x20Custom\x20Pages','2699980RwROTR','run','App\x20Management','rabetbase\x20auth\x20logout','knowledge-base:create','35228184pHjeDd','permit:role-menus-set','Company\x20Knowledge\x20Base','File','Code\x20Generation','get','role:create','Configuration','6892928EAucFy','6362795AvVJCM','project:init','values','logout','2667tWclGy','permit:role-menus','\x20\x20[high-risk-write]','bff:new','description','Run\x20Scripts','71584mwJyME','SQL\x20Queries','10504LZMWtH','45srvkbL','Use\x20`','permit:page-get','Async\x20Tasks','Notification\x20Configuration','permit:role-apis-set','knowledge-base:update','service','commands','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml','Authentication','<script>','build','risk','knowledge-base:list','Dataset\x20&\x20Operations','install','create','Roles','rabetbase\x20menu\x20asset-update','rabetbase\x20app\x20list\x20--remote','permit:page-set','Menu','OCR','wildcardDef','rabetbase\x20kb\x20update'];a172_0x2fd5=function(){return _0x5d6f48;};return a172_0x2fd5();}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{initDefinitions}from'../commands/init/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(_0x44ef0d){const _0x599abc=a172_0x1f66;for(const _0x4a12e3 of _0x44ef0d){definitions[_0x599abc(0x1ac)](_0x4a12e3[_0x599abc(0x1f9)]+':'+_0x4a12e3[_0x599abc(0x1c8)],_0x4a12e3);let _0xc3bc1=serviceGroups[_0x599abc(0x1e1)](_0x4a12e3[_0x599abc(0x1f9)]);!_0xc3bc1&&(_0xc3bc1=[],serviceGroups[_0x599abc(0x1ac)](_0x4a12e3[_0x599abc(0x1f9)],_0xc3bc1)),_0xc3bc1[_0x599abc(0x1b8)](_0x4a12e3);}}function registerDeclarativeService(_0x9afdb2,_0x1ca5c7,_0x3a6066){const _0x5319eb=a172_0x1f66;registerDefinitions(_0x1ca5c7);_0x3a6066?.['wildcardDef']&&registerDefinitions([_0x3a6066[_0x5319eb(0x1a5)]]);const _0x2075f0=_0x21dcac=>_0x21dcac===_0x5319eb(0x1d2)?'':_0x21dcac===_0x5319eb(0x1bb)?_0x5319eb(0x1b6):_0x5319eb(0x1eb),_0x5dd765={'service':_0x1ca5c7[0x0][_0x5319eb(0x1f9)],'label':_0x9afdb2,'commands':_0x1ca5c7['filter'](_0xcd038=>!_0xcd038['hidden'])[_0x5319eb(0x1ae)](_0x2d8eea=>({'command':_0x2d8eea[_0x5319eb(0x1c8)],'description':_0x2d8eea[_0x5319eb(0x1ed)],'tag':_0x2075f0(_0x2d8eea['risk'])})),'declarative':!![],'defaultCommand':_0x3a6066?.[_0x5319eb(0x1b3)]??(_0x3a6066?.['isSingleCommand']?_0x1ca5c7[0x0]['command']:undefined),'wildcardDef':_0x3a6066?.[_0x5319eb(0x1a5)],'isSingleCommand':_0x3a6066?.[_0x5319eb(0x1ad)]};serviceRegistry[_0x5319eb(0x1b8)](_0x5dd765),serviceByName[_0x5319eb(0x1ac)](_0x5dd765['service'],_0x5dd765);}registerDeclarativeService(a172_0xf03f90(0x1b5),initDefinitions,{'defaultCommand':a172_0xf03f90(0x1d8),'isSingleCommand':!![]}),registerDeclarativeService(a172_0xf03f90(0x1c4),projectDefinitions),registerDeclarativeService('Workspace',workspaceDefinitions),registerDeclarativeService(a172_0xf03f90(0x1d9),appDefinitions),registerDeclarativeService(a172_0xf03f90(0x1fc),authDefinitions,{'defaultCommand':'login'}),registerDeclarativeService(a172_0xf03f90(0x1cc),tenantDefinitions),registerDeclarativeService('User\x20Accounts',userAccountDefinitions),registerDeclarativeService(a172_0xf03f90(0x201),datasetDefinitions),registerDeclarativeService(a172_0xf03f90(0x1d6),pageDefinitions),registerDeclarativeService(a172_0xf03f90(0x1cb),apiDefinitions),registerDeclarativeService(a172_0xf03f90(0x1b1),dataDefinitions),registerDeclarativeService(a172_0xf03f90(0x1b7),bffDefinitions),registerDeclarativeService(a172_0xf03f90(0x1f6),notificationDefinitions),registerDeclarativeService(a172_0xf03f90(0x1f0),sqlDefinitions),registerDeclarativeService('Database\x20Connections',dbDefinitions),registerDeclarativeService(a172_0xf03f90(0x1a3),menuDefinitions),registerDeclarativeService(a172_0xf03f90(0x1f5),taskDefinitions),registerDeclarativeService(a172_0xf03f90(0x204),roleDefinitions),registerDeclarativeService(a172_0xf03f90(0x1bc),appConfigDefinitions),registerDeclarativeService(a172_0xf03f90(0x1de),kbDefinitions),registerDeclarativeService(a172_0xf03f90(0x1c9),issueDefinitions),registerDeclarativeService(a172_0xf03f90(0x1df),fileDefinitions),registerDeclarativeService(a172_0xf03f90(0x1a4),ocrDefinitions),registerDeclarativeService(a172_0xf03f90(0x1e0),codegenDefinitions),registerDeclarativeService(a172_0xf03f90(0x1e3),configDefinitions),registerDeclarativeService(a172_0xf03f90(0x1be),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a172_0xf03f90(0x1b4),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a172_0xf03f90(0x1cd),cliSkillDefinitions,{'defaultCommand':a172_0xf03f90(0x202)}),registerDeclarativeService(a172_0xf03f90(0x1c3),logsDefinitions,{'defaultCommand':'show'}),registerDeclarativeService(a172_0xf03f90(0x1ee),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a172_0xf03f90(0x1b9)]-0x1];last[a172_0xf03f90(0x1fa)]=[{'command':a172_0xf03f90(0x1fd),'description':a172_0xf03f90(0x1c6),'tag':a172_0xf03f90(0x1c7)+runDefinition[a172_0xf03f90(0x1ff)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([['sql:save',a172_0xf03f90(0x1fb)],[a172_0xf03f90(0x1ec),'rabetbase\x20bff\x20create'],['sql:new','rabetbase\x20sql\x20create'],[a172_0xf03f90(0x1af),a172_0xf03f90(0x205)],[a172_0xf03f90(0x1e6),a172_0xf03f90(0x1c2)],['skill:','rabetbase\x20cli-skill\x20install'],['skill:install',a172_0xf03f90(0x1ce)],[a172_0xf03f90(0x1a8),'rabetbase\x20cli-skill\x20install'],[a172_0xf03f90(0x1a7),a172_0xf03f90(0x1ce)],[a172_0xf03f90(0x1d1),a172_0xf03f90(0x206)],[a172_0xf03f90(0x1c0),a172_0xf03f90(0x1aa)],[a172_0xf03f90(0x1ab),a172_0xf03f90(0x1d5)],['app:remove','rabetbase\x20workspace\x20remove\x20<name>'],[a172_0xf03f90(0x200),a172_0xf03f90(0x1c1)],['knowledge-base:detail','rabetbase\x20kb\x20detail'],[a172_0xf03f90(0x1db),a172_0xf03f90(0x1ba)],[a172_0xf03f90(0x1f8),a172_0xf03f90(0x1a6)],[a172_0xf03f90(0x1bd),'rabetbase\x20kb\x20delete'],[a172_0xf03f90(0x1e2),'rabetbase\x20role\x20list']]),REMOVED_COMMAND_HINTS=new Map([[a172_0xf03f90(0x1f4),a172_0xf03f90(0x1b2)],[a172_0xf03f90(0x1a2),a172_0xf03f90(0x1b2)],[a172_0xf03f90(0x1ea),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a172_0xf03f90(0x1dd),'No\x20executable\x20CLI\x20replacement\x20is\x20available\x20under\x20the\x20current\x20server\x20authentication\x20contract.'],[a172_0xf03f90(0x1f7),a172_0xf03f90(0x1b2)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a172_0xf03f90(0x203),a172_0xf03f90(0x1d4)],['start',a172_0xf03f90(0x1a9)],[a172_0xf03f90(0x1fe),a172_0xf03f90(0x1b0)],['preview','rabetbase\x20run\x20preview'],[a172_0xf03f90(0x1e8),a172_0xf03f90(0x1da)]]);export function resolveRemovedCommand(_0x104702,_0x348764){const _0x529501=a172_0xf03f90;if(!_0x104702)return undefined;const _0x2540da=REMOVED_COMMAND_REPLACEMENTS[_0x529501(0x1e1)](_0x104702+':'+(_0x348764??'')),_0x486819=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x529501(0x1e1)](_0x104702),_0x1636e3=_0x2540da??_0x486819,_0x290cfc=REMOVED_COMMAND_HINTS[_0x529501(0x1e1)](_0x104702+':'+(_0x348764??''));if(!_0x1636e3&&!_0x290cfc)return undefined;const _0x1c7645=_0x486819?_0x104702:_0x348764?_0x104702+'\x20'+_0x348764:_0x104702;return{'command':_0x1c7645,'message':_0x529501(0x1ca)+_0x1c7645+'`\x20has\x20been\x20removed.','hint':_0x290cfc??_0x529501(0x1f3)+_0x1636e3+'`\x20instead.'};}export function findDefinition(_0xb66ed1,_0x429dd3){return definitions['get'](_0xb66ed1+':'+_0x429dd3);}export function isKnownService(_0x596761){return serviceByName['has'](_0x596761);}export function isDeclarativeService(_0x17b4ec){const _0x5cce02=a172_0xf03f90;return serviceGroups[_0x5cce02(0x1bf)](_0x17b4ec)||serviceByName[_0x5cce02(0x1e1)](_0x17b4ec)?.[_0x5cce02(0x1a5)]!==undefined;}export function getServiceEntry(_0x3e34b4){const _0x2480cc=a172_0xf03f90;return serviceByName[_0x2480cc(0x1e1)](_0x3e34b4);}export function getLegacyHandler(_0x28d117,_0x5b2327){return undefined;}export function getAllDefinitions(){const _0x58ca71=a172_0xf03f90;return Array['from'](definitions[_0x58ca71(0x1e7)]());}
@@ -1 +1 @@
1
- const a173_0x276d48=a173_0x5411;function a173_0x5411(_0x2d8f67,_0x183bf2){_0x2d8f67=_0x2d8f67-0x1db;const _0x31fcff=a173_0x31fc();let _0x54115d=_0x31fcff[_0x2d8f67];return _0x54115d;}(function(_0x2db5ec,_0x48ac44){const _0x4e523e=a173_0x5411,_0x478fbd=_0x2db5ec();while(!![]){try{const _0x268540=-parseInt(_0x4e523e(0x1ea))/0x1+parseInt(_0x4e523e(0x1eb))/0x2+parseInt(_0x4e523e(0x1dd))/0x3*(-parseInt(_0x4e523e(0x1f1))/0x4)+-parseInt(_0x4e523e(0x1ef))/0x5*(parseInt(_0x4e523e(0x1e7))/0x6)+-parseInt(_0x4e523e(0x1ec))/0x7+-parseInt(_0x4e523e(0x1ed))/0x8*(-parseInt(_0x4e523e(0x1df))/0x9)+-parseInt(_0x4e523e(0x1e1))/0xa*(-parseInt(_0x4e523e(0x1ee))/0xb);if(_0x268540===_0x48ac44)break;else _0x478fbd['push'](_0x478fbd['shift']());}catch(_0x23fa4c){_0x478fbd['push'](_0x478fbd['shift']());}}}(a173_0x31fc,0xb6dc2));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';function a173_0x31fc(){const _0x2442f0=['48GQCMOm','19580yuVUlE','2395owzevu','delete','11456jyrjfa','dev','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','1161YupsHm','/smartapi/permit/role/delete','924534EeMoEK','Deleted\x20role\x20','16010ocPMBg','POST','high-risk-write','num','roleName','userCount','546JIOxTo','role','appCode','1293524wWmuSP','1534930LdFkgg','7273882ZvVHvd'];a173_0x31fc=function(){return _0x2442f0;};return a173_0x31fc();}const DELETE_PATH=a173_0x276d48(0x1de);export const roleDelete={'service':a173_0x276d48(0x1e8),'command':a173_0x276d48(0x1f0),'description':a173_0x276d48(0x1dc),'risk':a173_0x276d48(0x1e3),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x55477f){const _0x5ca1d5=a173_0x276d48,_0x201c8b=_0x55477f[_0x5ca1d5(0x1e4)]('id'),_0x1964bd=await getRoleById(_0x55477f['appCode'],_0x201c8b);return assertCustomRole(_0x1964bd,'delete'),asDryRunResult({'scope':_0x5ca1d5(0x1db),'operation':_0x5ca1d5(0x1f0),'selector':{'appCode':_0x55477f[_0x5ca1d5(0x1e9)],'roleId':_0x201c8b,'roleName':_0x1964bd['roleName']},'before':projectRole(_0x1964bd),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x1964bd['userCount']>0x0?['Role\x20still\x20has\x20'+_0x1964bd[_0x5ca1d5(0x1e6)]+'\x20member(s);\x20they\x20will\x20lose\x20this\x20group.']:[]},{'method':_0x5ca1d5(0x1e2),'url':DELETE_PATH});},async 'execute'(_0xa70f7f){const _0x10396f=a173_0x276d48,_0x180f35=_0xa70f7f[_0x10396f(0x1e4)]('id'),_0x56294f=await getRoleById(_0xa70f7f[_0x10396f(0x1e9)],_0x180f35);return assertCustomRole(_0x56294f,_0x10396f(0x1f0)),await deleteAppRole(_0x180f35),{'ok':!![],'data':{'scope':'dev','operation':_0x10396f(0x1f0),'selector':{'appCode':_0xa70f7f[_0x10396f(0x1e9)],'roleId':_0x180f35,'roleName':_0x56294f[_0x10396f(0x1e5)]},'before':projectRole(_0x56294f),'after':null,'dryRun':![],'backend':{'method':_0x10396f(0x1e2),'path':DELETE_PATH},'warnings':[]},'message':_0x10396f(0x1e0)+_0x56294f[_0x10396f(0x1e5)]+'\x20(id='+_0x180f35+')'};}};
1
+ const a173_0x22ac7a=a173_0x4cac;function a173_0x4cac(_0x18ed13,_0x1224a0){_0x18ed13=_0x18ed13-0xc9;const _0x43832e=a173_0x4383();let _0x4cac30=_0x43832e[_0x18ed13];return _0x4cac30;}function a173_0x4383(){const _0x2cbaf3=['4478301BBGuiV','appCode','delete','dev','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','2761608mTqYhs','104DmpFSN','5zcWLld','106974lgdIWz','33qdZPUw','Role\x20still\x20has\x20','userCount','78172SpKRXX','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','42MJTfah','/smartapi/permit/role/delete','\x20(id=','1584318ibitDA','role','num','8143356PQhEwX','1XKdegZ','high-risk-write','POST','5842740mbFKBz'];a173_0x4383=function(){return _0x2cbaf3;};return a173_0x4383();}(function(_0x3ef10a,_0x4d9b09){const _0x270c71=a173_0x4cac,_0x412b18=_0x3ef10a();while(!![]){try{const _0x1eda40=-parseInt(_0x270c71(0xde))/0x1*(parseInt(_0x270c71(0xce))/0x2)+-parseInt(_0x270c71(0xd7))/0x3*(parseInt(_0x270c71(0xd5))/0x4)+-parseInt(_0x270c71(0xd0))/0x5*(-parseInt(_0x270c71(0xda))/0x6)+-parseInt(_0x270c71(0xd1))/0x7*(-parseInt(_0x270c71(0xcf))/0x8)+parseInt(_0x270c71(0xc9))/0x9+-parseInt(_0x270c71(0xe1))/0xa+-parseInt(_0x270c71(0xd2))/0xb*(-parseInt(_0x270c71(0xdd))/0xc);if(_0x1eda40===_0x4d9b09)break;else _0x412b18['push'](_0x412b18['shift']());}catch(_0x5c0bbe){_0x412b18['push'](_0x412b18['shift']());}}}(a173_0x4383,0xb8edb));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=a173_0x22ac7a(0xd8);export const roleDelete={'service':a173_0x22ac7a(0xdb),'command':a173_0x22ac7a(0xcb),'description':a173_0x22ac7a(0xcd),'risk':a173_0x22ac7a(0xdf),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x19ec4e){const _0x3593f5=a173_0x22ac7a,_0x3c7471=_0x19ec4e[_0x3593f5(0xdc)]('id'),_0x5d1870=await getRoleById(_0x19ec4e[_0x3593f5(0xca)],_0x3c7471);return assertCustomRole(_0x5d1870,'delete'),asDryRunResult({'scope':_0x3593f5(0xcc),'operation':_0x3593f5(0xcb),'selector':{'appCode':_0x19ec4e['appCode'],'roleId':_0x3c7471,'roleName':_0x5d1870['roleName']},'before':projectRole(_0x5d1870),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x5d1870[_0x3593f5(0xd4)]>0x0?[_0x3593f5(0xd3)+_0x5d1870['userCount']+_0x3593f5(0xd6)]:[]},{'method':_0x3593f5(0xe0),'url':DELETE_PATH});},async 'execute'(_0x2e31df){const _0x25422b=a173_0x22ac7a,_0x2f181d=_0x2e31df['num']('id'),_0x58376b=await getRoleById(_0x2e31df[_0x25422b(0xca)],_0x2f181d);return assertCustomRole(_0x58376b,_0x25422b(0xcb)),await deleteAppRole(_0x2f181d),{'ok':!![],'data':{'scope':_0x25422b(0xcc),'operation':_0x25422b(0xcb),'selector':{'appCode':_0x2e31df[_0x25422b(0xca)],'roleId':_0x2f181d,'roleName':_0x58376b['roleName']},'before':projectRole(_0x58376b),'after':null,'dryRun':![],'backend':{'method':_0x25422b(0xe0),'path':DELETE_PATH},'warnings':[]},'message':'Deleted\x20role\x20'+_0x58376b['roleName']+_0x25422b(0xd9)+_0x2f181d+')'};}};
@@ -1 +1 @@
1
- const a174_0x4c6733=a174_0x2146;(function(_0x459786,_0x276a55){const _0x56513d=a174_0x2146,_0x519e62=_0x459786();while(!![]){try{const _0xbaecc7=parseInt(_0x56513d(0x1d8))/0x1+parseInt(_0x56513d(0x1db))/0x2*(-parseInt(_0x56513d(0x1dd))/0x3)+parseInt(_0x56513d(0x1d1))/0x4*(-parseInt(_0x56513d(0x1de))/0x5)+-parseInt(_0x56513d(0x1cb))/0x6*(-parseInt(_0x56513d(0x1df))/0x7)+-parseInt(_0x56513d(0x1d2))/0x8+-parseInt(_0x56513d(0x1dc))/0x9*(parseInt(_0x56513d(0x1d3))/0xa)+-parseInt(_0x56513d(0x1d4))/0xb*(-parseInt(_0x56513d(0x1cd))/0xc);if(_0xbaecc7===_0x276a55)break;else _0x519e62['push'](_0x519e62['shift']());}catch(_0x4d10ac){_0x519e62['push'](_0x519e62['shift']());}}}(a174_0x123c,0xadc2c));function a174_0x123c(){const _0x601b8e=['roleType','938230eBfbGF','role','dev','60464dHeiBQ','43767GclBQV','105tZuWag','3148765pBApJg','15981ZDzAow','3522bSXeAM','appCode','21491172ZRQHGb','detail','roleName','num','4PilLKL','3281344xRUIJU','2590jOYiGd','11wadMsB','read','Role\x20'];a174_0x123c=function(){return _0x601b8e;};return a174_0x123c();}function a174_0x2146(_0x4987b1,_0x16b5e1){_0x4987b1=_0x4987b1-0x1cb;const _0x123c24=a174_0x123c();let _0x21464c=_0x123c24[_0x4987b1];return _0x21464c;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a174_0x4c6733(0x1d9),'command':a174_0x4c6733(0x1ce),'description':'Show\x20a\x20single\x20role\x27s\x20detail','risk':a174_0x4c6733(0x1d5),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x143a9a){const _0x167b7a=a174_0x4c6733,_0x18031e=_0x143a9a[_0x167b7a(0x1d0)]('id'),_0x5211cf=await getRoleById(_0x143a9a[_0x167b7a(0x1cc)],_0x18031e);return{'ok':!![],'data':{'scope':_0x167b7a(0x1da),'role':projectRole(_0x5211cf)},'message':_0x167b7a(0x1d6)+_0x5211cf[_0x167b7a(0x1cf)]+'\x20('+_0x5211cf[_0x167b7a(0x1d7)]+')'};}};
1
+ function a174_0x1eaf(){const _0x4e8a0b=['16iHqqxM','Show\x20a\x20single\x20role\x27s\x20detail','appCode','detail','3XBxaqm','4489716eWcHHx','1530135fsOALr','451010dxLaNo','roleName','442498LwhFht','628108jKoAcj','1385ZBVPFg','num','22RjEqHn','9993RMbOGs','roleType','role','Role\x20','4566XjbAFs'];a174_0x1eaf=function(){return _0x4e8a0b;};return a174_0x1eaf();}const a174_0x36f176=a174_0x2614;(function(_0x555d66,_0x2928ec){const _0x372dc3=a174_0x2614,_0x46d653=_0x555d66();while(!![]){try{const _0x275d66=parseInt(_0x372dc3(0x140))/0x1*(parseInt(_0x372dc3(0x13f))/0x2)+-parseInt(_0x372dc3(0x149))/0x3*(parseInt(_0x372dc3(0x13c))/0x4)+parseInt(_0x372dc3(0x13d))/0x5*(-parseInt(_0x372dc3(0x144))/0x6)+parseInt(_0x372dc3(0x13b))/0x7*(-parseInt(_0x372dc3(0x145))/0x8)+parseInt(_0x372dc3(0x138))/0x9+-parseInt(_0x372dc3(0x139))/0xa+parseInt(_0x372dc3(0x14a))/0xb;if(_0x275d66===_0x2928ec)break;else _0x46d653['push'](_0x46d653['shift']());}catch(_0x3aea45){_0x46d653['push'](_0x46d653['shift']());}}}(a174_0x1eaf,0x24505));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a174_0x2614(_0x2533f3,_0x206aad){_0x2533f3=_0x2533f3-0x138;const _0x1eafa7=a174_0x1eaf();let _0x2614ef=_0x1eafa7[_0x2533f3];return _0x2614ef;}export const roleDetail={'service':a174_0x36f176(0x142),'command':a174_0x36f176(0x148),'description':a174_0x36f176(0x146),'risk':'read','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x12dc49){const _0x2a2f07=a174_0x36f176,_0x437237=_0x12dc49[_0x2a2f07(0x13e)]('id'),_0x378f51=await getRoleById(_0x12dc49[_0x2a2f07(0x147)],_0x437237);return{'ok':!![],'data':{'scope':'dev','role':projectRole(_0x378f51)},'message':_0x2a2f07(0x143)+_0x378f51[_0x2a2f07(0x13a)]+'\x20('+_0x378f51[_0x2a2f07(0x141)]+')'};}};
@@ -1 +1 @@
1
- (function(_0x360449,_0x39f640){const _0x2c7c15=a175_0x3296,_0x381284=_0x360449();while(!![]){try{const _0x534ca6=parseInt(_0x2c7c15(0x1cd))/0x1*(-parseInt(_0x2c7c15(0x1d0))/0x2)+-parseInt(_0x2c7c15(0x1cc))/0x3*(-parseInt(_0x2c7c15(0x1cf))/0x4)+-parseInt(_0x2c7c15(0x1d3))/0x5*(parseInt(_0x2c7c15(0x1d7))/0x6)+-parseInt(_0x2c7c15(0x1ce))/0x7*(-parseInt(_0x2c7c15(0x1d8))/0x8)+-parseInt(_0x2c7c15(0x1d4))/0x9+parseInt(_0x2c7c15(0x1d6))/0xa*(parseInt(_0x2c7c15(0x1d5))/0xb)+parseInt(_0x2c7c15(0x1d1))/0xc*(parseInt(_0x2c7c15(0x1d2))/0xd);if(_0x534ca6===_0x39f640)break;else _0x381284['push'](_0x381284['shift']());}catch(_0x1feeba){_0x381284['push'](_0x381284['shift']());}}}(a175_0x276b,0x43af6));function a175_0x3296(_0x33b174,_0x2fa5f0){_0x33b174=_0x33b174-0x1cc;const _0x276b20=a175_0x276b();let _0x329681=_0x276b20[_0x33b174];return _0x329681;}import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleUpdate}from'../../commands/role/update.js';function a175_0x276b(){const _0x1aa1f3=['112eaBzSK','6cSDpUg','1ZjNMvA','241451OwAMEY','746980PXBucl','1013918pKsmhj','7948956wPaHxx','13PUSGxt','5kobGtt','3909132jKrVii','11pCKodW','1414860nKmSRm','2650476VyZdAr'];a175_0x276b=function(){return _0x1aa1f3;};return a175_0x276b();}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 a175_0x2c18(){const _0x3378b6=['96iQxyno','2023796TDqyXC','17906RrpIhO','993792QQAuTg','1767423QiYNjA','3507120zGGLCT','2256282rEhPkl','2202ZWRMjg','997695yVEVon'];a175_0x2c18=function(){return _0x3378b6;};return a175_0x2c18();}(function(_0x1cfd5f,_0x19064e){const _0x2a285c=a175_0x4963,_0x2b86f6=_0x1cfd5f();while(!![]){try{const _0x151e66=parseInt(_0x2a285c(0x1da))/0x1+-parseInt(_0x2a285c(0x1d3))/0x2+-parseInt(_0x2a285c(0x1d6))/0x3+-parseInt(_0x2a285c(0x1d5))/0x4+-parseInt(_0x2a285c(0x1d7))/0x5+parseInt(_0x2a285c(0x1d9))/0x6*(-parseInt(_0x2a285c(0x1d4))/0x7)+-parseInt(_0x2a285c(0x1db))/0x8*(-parseInt(_0x2a285c(0x1d8))/0x9);if(_0x151e66===_0x19064e)break;else _0x2b86f6['push'](_0x2b86f6['shift']());}catch(_0x4942ad){_0x2b86f6['push'](_0x2b86f6['shift']());}}}(a175_0x2c18,0x7e116));import{roleList}from'../../commands/role/list.js';function a175_0x4963(_0x11556f,_0x3197b9){_0x11556f=_0x11556f-0x1d3;const _0x2c1841=a175_0x2c18();let _0x496355=_0x2c1841[_0x11556f];return _0x496355;}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 +1 @@
1
- const a176_0x223a5a=a176_0x1184;(function(_0x4421df,_0x3f4789){const _0x54a4aa=a176_0x1184,_0x47cab2=_0x4421df();while(!![]){try{const _0x2b6bc7=parseInt(_0x54a4aa(0x1a9))/0x1*(-parseInt(_0x54a4aa(0x19a))/0x2)+parseInt(_0x54a4aa(0x195))/0x3*(-parseInt(_0x54a4aa(0x1a5))/0x4)+-parseInt(_0x54a4aa(0x197))/0x5*(parseInt(_0x54a4aa(0x180))/0x6)+parseInt(_0x54a4aa(0x183))/0x7*(parseInt(_0x54a4aa(0x1a4))/0x8)+parseInt(_0x54a4aa(0x191))/0x9*(parseInt(_0x54a4aa(0x18d))/0xa)+-parseInt(_0x54a4aa(0x1a0))/0xb+parseInt(_0x54a4aa(0x19f))/0xc;if(_0x2b6bc7===_0x3f4789)break;else _0x47cab2['push'](_0x47cab2['shift']());}catch(_0x5ef3d1){_0x47cab2['push'](_0x47cab2['shift']());}}}(a176_0x9fcd,0xaced7));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a176_0x9fcd(){const _0x4df787=['trim','Filter\x20by\x20role\x20type','Found\x20','120EkNNNu','1776LTNUDs','validation','page','roleType','228613cgvANY','94038PbXhxb','\x20role(s)','string','173131BFJHyo','pagesize','Invalid\x20--type\x20\x22','str','ADMIN','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','number','length','read','appCode','251890aqgHJr','DEV','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','map','459MqLtls','filter','dev','num','5004keVgly','Page\x20size\x20(1-100)','295ZKcyDK','type','list','8UMssww','role','OWNER','join','toUpperCase','19947708lpVnnX','328691KsktWk'];a176_0x9fcd=function(){return _0x4df787;};return a176_0x9fcd();}function a176_0x1184(_0x45eb39,_0xd6f1f7){_0x45eb39=_0x45eb39-0x180;const _0x9fcd2=a176_0x9fcd();let _0x1184bd=_0x9fcd2[_0x45eb39];return _0x1184bd;}import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a176_0x223a5a(0x187),a176_0x223a5a(0x18e),a176_0x223a5a(0x19c),'CUSTOM'];export const roleList={'service':a176_0x223a5a(0x19b),'command':a176_0x223a5a(0x199),'description':a176_0x223a5a(0x188),'risk':a176_0x223a5a(0x18b),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a176_0x223a5a(0x198),'type':a176_0x223a5a(0x182),'required':![],'description':a176_0x223a5a(0x1a2),'enum':ROLE_TYPES},{'name':a176_0x223a5a(0x1a7),'type':a176_0x223a5a(0x189),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':a176_0x223a5a(0x184),'type':a176_0x223a5a(0x189),'description':a176_0x223a5a(0x196),'default':0x64}],async 'validate'(_0x311167){const _0x59308e=a176_0x223a5a,_0x87ecad=_0x311167[_0x59308e(0x186)](_0x59308e(0x198))[_0x59308e(0x1a1)]();if(_0x87ecad&&!ROLE_TYPES['includes'](_0x87ecad[_0x59308e(0x19e)]()))throw CliErrors[_0x59308e(0x1a6)](_0x59308e(0x185)+_0x87ecad+'\x22.','Use\x20one\x20of:\x20'+ROLE_TYPES[_0x59308e(0x19d)](',\x20')+'.');const _0x18b185=_0x311167[_0x59308e(0x194)](_0x59308e(0x1a7),0x1),_0x4852f0=_0x311167[_0x59308e(0x194)]('pagesize',0x64);if(_0x18b185<0x1)throw CliErrors[_0x59308e(0x1a6)]('--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.');if(_0x4852f0<0x1||_0x4852f0>0x64)throw CliErrors[_0x59308e(0x1a6)](_0x59308e(0x18f));},async 'execute'(_0x1bd9c8){const _0x4b108b=a176_0x223a5a,_0x451a04=_0x1bd9c8[_0x4b108b(0x194)](_0x4b108b(0x1a7),0x1)||0x1,_0x256b86=_0x1bd9c8[_0x4b108b(0x194)](_0x4b108b(0x184),0x64)||0x64,_0x5c5278=_0x1bd9c8[_0x4b108b(0x186)](_0x4b108b(0x198))[_0x4b108b(0x1a1)]()['toUpperCase'](),{items:_0x2a7df8,paging:_0x22d3a3}=await listAppRoles(_0x1bd9c8[_0x4b108b(0x18c)],{'currentPage':_0x451a04,'pageSize':_0x256b86}),_0x4bd37d=_0x5c5278?_0x2a7df8[_0x4b108b(0x192)](_0x4a52fd=>_0x4a52fd[_0x4b108b(0x1a8)]===_0x5c5278):_0x2a7df8,_0x3eea23=_0x4bd37d[_0x4b108b(0x190)](projectRole);return{'ok':!![],'data':{'scope':_0x4b108b(0x193),'roles':_0x3eea23,'paging':_0x22d3a3},'message':_0x4b108b(0x1a3)+_0x3eea23[_0x4b108b(0x18a)]+_0x4b108b(0x181)};}};
1
+ function a176_0x16f6(_0x481e48,_0x5c5701){_0x481e48=_0x481e48-0x1bf;const _0x3e676e=a176_0x3e67();let _0x16f6f7=_0x3e676e[_0x481e48];return _0x16f6f7;}const a176_0x358837=a176_0x16f6;(function(_0x6aaa05,_0x4a8e0c){const _0x222087=a176_0x16f6,_0x2952f8=_0x6aaa05();while(!![]){try{const _0x5ebeb1=parseInt(_0x222087(0x1e0))/0x1*(parseInt(_0x222087(0x1e6))/0x2)+-parseInt(_0x222087(0x1da))/0x3*(parseInt(_0x222087(0x1c1))/0x4)+-parseInt(_0x222087(0x1d9))/0x5+-parseInt(_0x222087(0x1c5))/0x6*(parseInt(_0x222087(0x1c2))/0x7)+parseInt(_0x222087(0x1e2))/0x8*(parseInt(_0x222087(0x1e5))/0x9)+-parseInt(_0x222087(0x1db))/0xa+-parseInt(_0x222087(0x1d7))/0xb*(-parseInt(_0x222087(0x1e4))/0xc);if(_0x5ebeb1===_0x4a8e0c)break;else _0x2952f8['push'](_0x2952f8['shift']());}catch(_0x7e06c0){_0x2952f8['push'](_0x2952f8['shift']());}}}(a176_0x3e67,0xbc542));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',a176_0x358837(0x1bf),a176_0x358837(0x1d1),a176_0x358837(0x1cd)];export const roleList={'service':a176_0x358837(0x1d2),'command':'list','description':a176_0x358837(0x1cf),'risk':a176_0x358837(0x1c7),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a176_0x358837(0x1dd),'type':'string','required':![],'description':a176_0x358837(0x1d8),'enum':ROLE_TYPES},{'name':a176_0x358837(0x1ca),'type':a176_0x358837(0x1e8),'description':a176_0x358837(0x1c3),'default':0x1},{'name':'pagesize','type':'number','description':a176_0x358837(0x1df),'default':0x64}],async 'validate'(_0x895032){const _0x4fd17=a176_0x358837,_0x5f4fa0=_0x895032[_0x4fd17(0x1d4)](_0x4fd17(0x1dd))['trim']();if(_0x5f4fa0&&!ROLE_TYPES[_0x4fd17(0x1d0)](_0x5f4fa0[_0x4fd17(0x1c6)]()))throw CliErrors[_0x4fd17(0x1e3)](_0x4fd17(0x1e7)+_0x5f4fa0+'\x22.',_0x4fd17(0x1e1)+ROLE_TYPES[_0x4fd17(0x1c0)](',\x20')+'.');const _0x44916a=_0x895032[_0x4fd17(0x1cb)](_0x4fd17(0x1ca),0x1),_0x19d932=_0x895032['num'](_0x4fd17(0x1d6),0x64);if(_0x44916a<0x1)throw CliErrors['validation'](_0x4fd17(0x1de));if(_0x19d932<0x1||_0x19d932>0x64)throw CliErrors[_0x4fd17(0x1e3)](_0x4fd17(0x1cc));},async 'execute'(_0x305d8f){const _0x467689=a176_0x358837,_0x3a906e=_0x305d8f[_0x467689(0x1cb)](_0x467689(0x1ca),0x1)||0x1,_0x36983d=_0x305d8f['num'](_0x467689(0x1d6),0x64)||0x64,_0xc8d77f=_0x305d8f['str'](_0x467689(0x1dd))[_0x467689(0x1c4)]()[_0x467689(0x1c6)](),{items:_0x3111ca,paging:_0x29fba4}=await listAppRoles(_0x305d8f[_0x467689(0x1c8)],{'currentPage':_0x3a906e,'pageSize':_0x36983d}),_0x51c413=_0xc8d77f?_0x3111ca['filter'](_0x26cbdf=>_0x26cbdf[_0x467689(0x1ce)]===_0xc8d77f):_0x3111ca,_0x544005=_0x51c413['map'](projectRole);return{'ok':!![],'data':{'scope':_0x467689(0x1d5),'roles':_0x544005,'paging':_0x29fba4},'message':_0x467689(0x1d3)+_0x544005[_0x467689(0x1c9)]+_0x467689(0x1dc)};}};function a176_0x3e67(){const _0x573890=['type','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','Page\x20size\x20(1-100)','19QEpNkj','Use\x20one\x20of:\x20','433232KWgPhc','validation','60tVAHwD','27AYwMmQ','128920qrIihe','Invalid\x20--type\x20\x22','number','DEV','join','488Uaeqha','8304135YtFVyw','Page\x20index\x20(1-based)','trim','6llwPxI','toUpperCase','read','appCode','length','page','num','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','CUSTOM','roleType','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','includes','OWNER','role','Found\x20','str','dev','pagesize','6100446VpASPi','Filter\x20by\x20role\x20type','3367180QZSEUV','13539yPvWrO','9784110nsoCDT','\x20role(s)'];a176_0x3e67=function(){return _0x573890;};return a176_0x3e67();}