@lovrabet/rabetbase-cli 2.4.3-beta.1 → 2.4.4-beta.1

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 (381) 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/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analysis-batching.js +1 -1
  79. package/lib/commands/db/analyze-batch-plan.js +1 -1
  80. package/lib/commands/db/analyze-cancel.js +1 -1
  81. package/lib/commands/db/analyze-start.js +1 -1
  82. package/lib/commands/db/analyze-status.js +1 -1
  83. package/lib/commands/db/create.js +1 -1
  84. package/lib/commands/db/delete.js +1 -1
  85. package/lib/commands/db/detail.js +1 -1
  86. package/lib/commands/db/diff-refresh-start.d.ts +2 -0
  87. package/lib/commands/db/diff-refresh-start.js +1 -0
  88. package/lib/commands/db/diff-refresh-status.d.ts +2 -0
  89. package/lib/commands/db/diff-refresh-status.js +1 -0
  90. package/lib/commands/db/diff.js +1 -1
  91. package/lib/commands/db/index.js +1 -1
  92. package/lib/commands/db/list.js +1 -1
  93. package/lib/commands/db/shared.js +1 -1
  94. package/lib/commands/db/tables.js +1 -1
  95. package/lib/commands/db/test.js +1 -1
  96. package/lib/commands/db/update.js +1 -1
  97. package/lib/commands/doctor.js +1 -1
  98. package/lib/commands/file/index.js +1 -1
  99. package/lib/commands/init/index.js +1 -1
  100. package/lib/commands/issue/index.js +1 -1
  101. package/lib/commands/issue/nudge.js +1 -1
  102. package/lib/commands/issue/report.js +1 -1
  103. package/lib/commands/issue/shared.js +1 -1
  104. package/lib/commands/kb/create.js +1 -1
  105. package/lib/commands/kb/delete.js +1 -1
  106. package/lib/commands/kb/detail.js +1 -1
  107. package/lib/commands/kb/index.js +1 -1
  108. package/lib/commands/kb/list.js +1 -1
  109. package/lib/commands/kb/shared.js +1 -1
  110. package/lib/commands/kb/update.js +1 -1
  111. package/lib/commands/logs/index.js +1 -1
  112. package/lib/commands/menu/asset-update.js +1 -1
  113. package/lib/commands/menu/delete.js +1 -1
  114. package/lib/commands/menu/external-link-create.js +1 -1
  115. package/lib/commands/menu/external-link-update.js +1 -1
  116. package/lib/commands/menu/group-create.js +1 -1
  117. package/lib/commands/menu/group-update.js +1 -1
  118. package/lib/commands/menu/index.js +1 -1
  119. package/lib/commands/menu/list.js +1 -1
  120. package/lib/commands/menu/move.js +1 -1
  121. package/lib/commands/menu/regroup-start.js +1 -1
  122. package/lib/commands/menu/rename.js +1 -1
  123. package/lib/commands/menu/shared/compare-table.js +1 -1
  124. package/lib/commands/menu/shared/delete-plan.js +1 -1
  125. package/lib/commands/menu/shared/facts.js +1 -1
  126. package/lib/commands/menu/shared/index.js +1 -1
  127. package/lib/commands/menu/shared/inquirer.js +1 -1
  128. package/lib/commands/menu/shared/local-pages.js +1 -1
  129. package/lib/commands/menu/shared/logic.js +1 -1
  130. package/lib/commands/menu/shared/mutations.js +1 -1
  131. package/lib/commands/menu/shared/service.js +1 -1
  132. package/lib/commands/menu/shared/sync-core.js +1 -1
  133. package/lib/commands/menu/shared/update-core.js +1 -1
  134. package/lib/commands/menu/shared/valid-url.js +1 -1
  135. package/lib/commands/menu/sync.js +1 -1
  136. package/lib/commands/notification/config-create.d.ts +2 -0
  137. package/lib/commands/notification/config-create.js +1 -0
  138. package/lib/commands/notification/config-delete.d.ts +2 -0
  139. package/lib/commands/notification/config-delete.js +1 -0
  140. package/lib/commands/notification/config-list.js +1 -1
  141. package/lib/commands/notification/config-update.d.ts +2 -0
  142. package/lib/commands/notification/config-update.js +1 -0
  143. package/lib/commands/notification/index.js +1 -1
  144. package/lib/commands/notification/shared.d.ts +97 -0
  145. package/lib/commands/notification/shared.js +1 -0
  146. package/lib/commands/ocr/index.js +1 -1
  147. package/lib/commands/page/generate-start.js +1 -1
  148. package/lib/commands/page/generate-status.js +1 -1
  149. package/lib/commands/page/index.js +1 -1
  150. package/lib/commands/page/pull.js +1 -1
  151. package/lib/commands/page/push.js +1 -1
  152. package/lib/commands/page/react/create.js +1 -1
  153. package/lib/commands/page/react/detail.js +1 -1
  154. package/lib/commands/page/react/list.js +1 -1
  155. package/lib/commands/page/react/publish.js +1 -1
  156. package/lib/commands/page/react/shared.js +1 -1
  157. package/lib/commands/page/react/syntax.js +1 -1
  158. package/lib/commands/page/react/template.js +1 -1
  159. package/lib/commands/page/react/update.js +1 -1
  160. package/lib/commands/page/relation-audit.js +1 -1
  161. package/lib/commands/page/restore.js +1 -1
  162. package/lib/commands/page/shared.js +1 -1
  163. package/lib/commands/page/standard-page-status.js +1 -1
  164. package/lib/commands/page/sync.js +1 -1
  165. package/lib/commands/permit/index.js +1 -1
  166. package/lib/commands/permit/page-get.js +1 -1
  167. package/lib/commands/permit/page-set.js +1 -1
  168. package/lib/commands/permit/role-apis-set.js +1 -1
  169. package/lib/commands/permit/role-menus-set.js +1 -1
  170. package/lib/commands/permit/role-menus.js +1 -1
  171. package/lib/commands/permit/shared.js +1 -1
  172. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  173. package/lib/commands/project/create/format-elapsed.js +1 -1
  174. package/lib/commands/project/create/main.d.ts +1 -0
  175. package/lib/commands/project/create/main.js +1 -1
  176. package/lib/commands/project/create/materialize-project-template.d.ts +11 -0
  177. package/lib/commands/project/create/materialize-project-template.js +1 -0
  178. package/lib/commands/project/create/project-name.d.ts +2 -0
  179. package/lib/commands/project/create/project-name.js +1 -0
  180. package/lib/commands/project/create/project-template-archive.d.ts +6 -0
  181. package/lib/commands/project/create/project-template-archive.js +1 -0
  182. package/lib/commands/project/create/project-template-path.d.ts +1 -3
  183. package/lib/commands/project/create/project-template-path.js +1 -1
  184. package/lib/commands/project/create/use-copy-project-template.d.ts +2 -1
  185. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  186. package/lib/commands/project/create/use-format-code.js +1 -1
  187. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  188. package/lib/commands/project/index.js +1 -1
  189. package/lib/commands/project/upgrade.js +1 -1
  190. package/lib/commands/registry.js +1 -1
  191. package/lib/commands/role/create.js +1 -1
  192. package/lib/commands/role/delete.js +1 -1
  193. package/lib/commands/role/detail.js +1 -1
  194. package/lib/commands/role/index.js +1 -1
  195. package/lib/commands/role/list.js +1 -1
  196. package/lib/commands/role/shared.js +1 -1
  197. package/lib/commands/role/update.js +1 -1
  198. package/lib/commands/role/user-add.js +1 -1
  199. package/lib/commands/role/user-remove.js +1 -1
  200. package/lib/commands/role/user-resolve.js +1 -1
  201. package/lib/commands/run/index.js +1 -1
  202. package/lib/commands/schema.js +1 -1
  203. package/lib/commands/sql/create.js +1 -1
  204. package/lib/commands/sql/delete.js +1 -1
  205. package/lib/commands/sql/detail.js +1 -1
  206. package/lib/commands/sql/exec.js +1 -1
  207. package/lib/commands/sql/index.js +1 -1
  208. package/lib/commands/sql/list.js +1 -1
  209. package/lib/commands/sql/pull.js +1 -1
  210. package/lib/commands/sql/push.js +1 -1
  211. package/lib/commands/sql/shared.js +1 -1
  212. package/lib/commands/sql/status.js +1 -1
  213. package/lib/commands/sql/validate.js +1 -1
  214. package/lib/commands/task/index.js +1 -1
  215. package/lib/commands/task/status.js +1 -1
  216. package/lib/commands/tenant/index.js +1 -1
  217. package/lib/commands/tenant/members-list.js +1 -1
  218. package/lib/commands/tenant/shared.js +1 -1
  219. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  220. package/lib/commands/user-account/index.js +1 -1
  221. package/lib/commands/workspace/add.js +1 -1
  222. package/lib/commands/workspace/index.js +1 -1
  223. package/lib/commands/workspace/remove.js +1 -1
  224. package/lib/config/schema.js +1 -1
  225. package/lib/constant/cdn.d.ts +2 -0
  226. package/lib/constant/cdn.js +1 -1
  227. package/lib/constant/cli.js +1 -1
  228. package/lib/constant/defaults.js +1 -1
  229. package/lib/constant/domain.js +1 -1
  230. package/lib/constant/env.js +1 -1
  231. package/lib/constant/output.js +1 -1
  232. package/lib/constant/paths.js +1 -1
  233. package/lib/constant/risk.js +1 -1
  234. package/lib/context/app-resolver.js +1 -1
  235. package/lib/context/auth-resolver.js +1 -1
  236. package/lib/context/config-loader.js +1 -1
  237. package/lib/context.d.ts +1 -1
  238. package/lib/context.js +1 -1
  239. package/lib/core/alias-resolver.js +1 -1
  240. package/lib/core/api-client.d.ts +29 -2
  241. package/lib/core/api-client.js +1 -1
  242. package/lib/core/bff/config.js +1 -1
  243. package/lib/core/bff/file-system.js +1 -1
  244. package/lib/core/bff/hash.js +1 -1
  245. package/lib/core/bff/lock.js +1 -1
  246. package/lib/core/bff/utils.js +1 -1
  247. package/lib/core/db-resolver.js +1 -1
  248. package/lib/core/page/file-system.js +1 -1
  249. package/lib/core/page/hash.js +1 -1
  250. package/lib/core/page/lock.js +1 -1
  251. package/lib/core/sql-index-auditor.js +1 -1
  252. package/lib/core/sql-sync/config.js +1 -1
  253. package/lib/core/sql-sync/file-system.js +1 -1
  254. package/lib/core/sql-sync/hash.js +1 -1
  255. package/lib/core/sql-sync/lock.js +1 -1
  256. package/lib/core/sql-sync/utils.js +1 -1
  257. package/lib/core/sql-validator.js +1 -1
  258. package/lib/errors.js +1 -1
  259. package/lib/framework/build-all-flags.js +1 -1
  260. package/lib/framework/error-output.js +1 -1
  261. package/lib/framework/explicit-yes.js +1 -1
  262. package/lib/framework/flags.js +1 -1
  263. package/lib/framework/help.js +1 -1
  264. package/lib/framework/index.js +1 -1
  265. package/lib/framework/output.js +1 -1
  266. package/lib/framework/response.js +1 -1
  267. package/lib/framework/runner-alias.js +1 -1
  268. package/lib/framework/runner.js +1 -1
  269. package/lib/framework/schema-export.js +1 -1
  270. package/lib/framework/types.js +1 -1
  271. package/lib/generated/build-info.d.ts +4 -4
  272. package/lib/generated/build-info.js +1 -1
  273. package/lib/help.js +1 -1
  274. package/lib/postinstall.js +1 -1
  275. package/lib/runtime/confirmation.js +1 -1
  276. package/lib/runtime/event.js +1 -1
  277. package/lib/runtime/index.js +1 -1
  278. package/lib/runtime/queue.js +1 -1
  279. package/lib/runtime/resolve.js +1 -1
  280. package/lib/skills/builtin-skill.js +1 -1
  281. package/lib/skills/main.js +1 -1
  282. package/lib/skills/npx-skills-add.js +1 -1
  283. package/lib/skills/skill-presence.js +1 -1
  284. package/lib/telemetry/cli-command-trace.js +1 -1
  285. package/lib/telemetry/cli-help-trace.js +1 -1
  286. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  287. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  288. package/lib/telemetry/send-cli-trace-log.js +1 -1
  289. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  290. package/lib/utils/ai_config.js +1 -1
  291. package/lib/utils/apply-jq-filter.js +1 -1
  292. package/lib/utils/cdn-config.js +1 -1
  293. package/lib/utils/check-sdk-version.js +1 -1
  294. package/lib/utils/cli-version-check.js +1 -1
  295. package/lib/utils/cli-version-policy.d.ts +13 -0
  296. package/lib/utils/cli-version-policy.js +1 -1
  297. package/lib/utils/config.js +1 -1
  298. package/lib/utils/entity-with-id.js +1 -1
  299. package/lib/utils/file-utils.js +1 -1
  300. package/lib/utils/guides-cdn.js +1 -1
  301. package/lib/utils/http-client.js +1 -1
  302. package/lib/utils/is-non-interactive.js +1 -1
  303. package/lib/utils/logger.js +1 -1
  304. package/lib/utils/params.js +1 -1
  305. package/lib/utils/platform.js +1 -1
  306. package/lib/utils/rules-cdn.js +1 -1
  307. package/lib/utils/sleep.js +1 -1
  308. package/lib/utils/template-replacer.js +1 -1
  309. package/lib/utils/update-notice.js +1 -1
  310. package/lib/utils/version.js +1 -1
  311. package/lib/utils/with-active-cookie.js +1 -1
  312. package/lib/utils/write-cli-side-channel.js +1 -1
  313. package/package.json +9 -4
  314. package/skills/rabetbase/SKILL.md +33 -22
  315. package/skills/rabetbase/guides/backend-function.md +5 -3
  316. package/skills/rabetbase/guides/bff-creation-workflow.md +2 -2
  317. package/skills/rabetbase/guides/conflict-detection.md +2 -2
  318. package/skills/rabetbase/guides/database-connection-workflow.md +39 -5
  319. package/skills/rabetbase/guides/react-custom-page-workflow.md +22 -4
  320. package/skills/rabetbase/guides/sql-creation-workflow.md +4 -2
  321. package/skills/rabetbase/guides/sql-mybatis.md +2 -2
  322. package/skills/rabetbase/knowledge/page-schema/YtPage.md +3 -37
  323. package/skills/rabetbase/knowledge/react-page/generation-standards.md +24 -2
  324. package/skills/rabetbase/references/rabetbase-app-config.md +2 -2
  325. package/skills/rabetbase/references/rabetbase-bff-push.md +4 -5
  326. package/skills/rabetbase/references/rabetbase-bff-save.md +3 -3
  327. package/skills/rabetbase/references/rabetbase-config.md +2 -2
  328. package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -2
  329. package/skills/rabetbase/references/rabetbase-db-detail.md +3 -0
  330. package/skills/rabetbase/references/rabetbase-db-diff-refresh.md +53 -0
  331. package/skills/rabetbase/references/rabetbase-db-diff.md +40 -21
  332. package/skills/rabetbase/references/rabetbase-db-list.md +1 -1
  333. package/skills/rabetbase/references/rabetbase-kb.md +5 -3
  334. package/skills/rabetbase/references/rabetbase-menu-asset-update.md +9 -10
  335. package/skills/rabetbase/references/rabetbase-menu-external-link-update.md +1 -3
  336. package/skills/rabetbase/references/rabetbase-menu-regroup-start.md +2 -3
  337. package/skills/rabetbase/references/rabetbase-notification-config-list.md +2 -2
  338. package/skills/rabetbase/references/rabetbase-notification-config-mutations.md +56 -0
  339. package/skills/rabetbase/references/rabetbase-page-react-detail.md +1 -1
  340. package/skills/rabetbase/references/rabetbase-page-react-list.md +1 -1
  341. package/skills/rabetbase/references/rabetbase-page-react-publish.md +2 -2
  342. package/skills/rabetbase/references/rabetbase-project-create.md +3 -0
  343. package/skills/rabetbase/references/rabetbase-run.md +1 -1
  344. package/skills/rabetbase/references/rabetbase-sql-create.md +1 -1
  345. package/skills/rabetbase/references/rabetbase-sql-push.md +3 -4
  346. package/skills/rabetbase/references/rabetbase-user-account.md +0 -1
  347. package/skills/rabetbase.manifest.json +5 -5
  348. package/templates/README.md +14 -2
  349. package/lib/commands/project/create/non-interactive.d.ts +0 -9
  350. package/lib/commands/project/create/non-interactive.js +0 -1
  351. package/lib/utils/copy-directory.d.ts +0 -1
  352. package/lib/utils/copy-directory.js +0 -1
  353. package/skills/rabetbase/knowledge/page-schema/LrSmartEcharts.md +0 -291
  354. package/skills/rabetbase/knowledge/page-schema/LrSmartStatistic.md +0 -223
  355. package/templates/projects/sub-app-react-demo/.prettierrc +0 -1
  356. package/templates/projects/sub-app-react-demo/CHANGELOG.md +0 -67
  357. package/templates/projects/sub-app-react-demo/README.md +0 -246
  358. package/templates/projects/sub-app-react-demo/docs/quick-start.md +0 -245
  359. package/templates/projects/sub-app-react-demo/index.html +0 -27
  360. package/templates/projects/sub-app-react-demo/package.json +0 -34
  361. package/templates/projects/sub-app-react-demo/public/logo.svg +0 -1
  362. package/templates/projects/sub-app-react-demo/public/vite.svg +0 -1
  363. package/templates/projects/sub-app-react-demo/src/api/api.ts +0 -26
  364. package/templates/projects/sub-app-react-demo/src/api/client.ts +0 -32
  365. package/templates/projects/sub-app-react-demo/src/components/demo-page-container/DemoPageContainer.module.css +0 -28
  366. package/templates/projects/sub-app-react-demo/src/components/demo-page-container/DemoPageContainer.tsx +0 -55
  367. package/templates/projects/sub-app-react-demo/src/layouts/MainLayout.tsx +0 -308
  368. package/templates/projects/sub-app-react-demo/src/main.tsx +0 -52
  369. package/templates/projects/sub-app-react-demo/src/pages/dashboard/index.tsx +0 -570
  370. package/templates/projects/sub-app-react-demo/src/pages/data-screen/index.tsx +0 -531
  371. package/templates/projects/sub-app-react-demo/src/pages/index.module.css +0 -500
  372. package/templates/projects/sub-app-react-demo/src/pages/index.tsx +0 -641
  373. package/templates/projects/sub-app-react-demo/src/pages/sdk-demo/index.tsx +0 -536
  374. package/templates/projects/sub-app-react-demo/src/pages/workbench/index.module.css +0 -295
  375. package/templates/projects/sub-app-react-demo/src/pages/workbench/index.tsx +0 -242
  376. package/templates/projects/sub-app-react-demo/src/router/index.tsx +0 -30
  377. package/templates/projects/sub-app-react-demo/src/style.css +0 -108
  378. package/templates/projects/sub-app-react-demo/src/utils/api.ts +0 -12
  379. package/templates/projects/sub-app-react-demo/src/vite-env.d.ts +0 -2
  380. package/templates/projects/sub-app-react-demo/tsconfig.json +0 -26
  381. package/templates/projects/sub-app-react-demo/vite.config.ts +0 -111
@@ -0,0 +1,11 @@
1
+ export interface ProjectTemplateMaterialization {
2
+ source: "cdn";
3
+ version: string;
4
+ }
5
+ export type ProjectTemplateStage = "resolving" | "downloading" | "verifying" | "extracting";
6
+ export type ProjectTemplateProgress = (stage: ProjectTemplateStage) => void;
7
+ /**
8
+ * Materialize the project template into a new target directory.
9
+ * CDN is the single source for project templates.
10
+ */
11
+ export declare function materializeProjectTemplate(projectDir: string, onProgress?: ProjectTemplateProgress): Promise<ProjectTemplateMaterialization>;
@@ -0,0 +1 @@
1
+ const a169_0x3f3ca8=a169_0x16cf;(function(_0x59b4a5,_0xfeb24f){const _0x52489f=a169_0x16cf,_0x36f69d=_0x59b4a5();while(!![]){try{const _0x20836e=parseInt(_0x52489f(0x123))/0x1*(parseInt(_0x52489f(0x14a))/0x2)+parseInt(_0x52489f(0x13e))/0x3+-parseInt(_0x52489f(0x162))/0x4+-parseInt(_0x52489f(0x164))/0x5+-parseInt(_0x52489f(0x147))/0x6*(-parseInt(_0x52489f(0x12e))/0x7)+-parseInt(_0x52489f(0x158))/0x8+parseInt(_0x52489f(0x14d))/0x9;if(_0x20836e===_0xfeb24f)break;else _0x36f69d['push'](_0x36f69d['shift']());}catch(_0x425e72){_0x36f69d['push'](_0x36f69d['shift']());}}}(a169_0x1412,0xdbaf8));import{createHash}from'node:crypto';import a169_0x181495 from'node:fs/promises';import a169_0x4c42f7 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=a169_0x3f3ca8(0x129),ARCHIVE_TIMEOUT_MS=0x3a98,MAX_ARCHIVE_SIZE=0x14*0x400*0x400;function nonEmptyString(_0x8e3422){const _0x249008=a169_0x3f3ca8;return typeof _0x8e3422===_0x249008(0x155)&&_0x8e3422[_0x249008(0x136)]()?_0x8e3422[_0x249008(0x136)]():null;}function a169_0x1412(){const _0x5b172e=['size','resolving','5oyThwz','origin','sha256',',\x20received\x20','from','CDN\x20config\x20contains\x20an\x20invalid\x20descriptor\x20for\x20\x22','sub-app-react-demo','.rabetbase-create-','ino','cdn','extracting','7OPVhWD','validation','writeFile','arrayBuffer','update','downloading','push','verifying','trim','Project\x20template\x20package.json\x20is\x20invalid.','Check\x20your\x20network\x20and\x20retry.\x20Details:\x20','Unable\x20to\x20download\x20a\x20valid\x20project\x20template\x20from\x20CDN.','cancel','name','CDN\x20project\x20template\x20size\x20mismatch:\x20expected\x20','EEXIST','4503963dDEHtb','package.json','basename','mkdtemp','test','resolve','version','object','projectTemplate','9569802VpDWTE','dev','toLowerCase','374650JEQNYp','protocol','Use\x20a\x20different\x20project\x20name.','12215277GHRnqQ','length','project','href','readdir','releaseLock','get','content-length','string','CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.','isSafeInteger','11817608sJjsJX','template.zip','isDirectory','message','CDN\x20project\x20template\x20URL\x20must\x20use\x20the\x20trusted\x20HTTPS\x20origin.','dirname','sha256:','join','parse','concat','5691832AtRpAa','code','7950875GSyugy','body','CDN\x20project\x20template\x20exceeds\x20the\x2020\x20MB\x20download\x20limit.','byteLength','lstat','readFile','CDN\x20project\x20template\x20checksum\x20verification\x20failed.','getReader','includes'];a169_0x1412=function(){return _0x5b172e;};return a169_0x1412();}function parseDescriptor(_0x4e3923){const _0x208ecf=a169_0x3f3ca8;if(!_0x4e3923||typeof _0x4e3923!==_0x208ecf(0x145))throw new Error('CDN\x20config\x20does\x20not\x20define\x20template\x20\x22'+TEMPLATE_ID+'\x22.');const _0x3f3925=_0x4e3923,_0x3e9cea=nonEmptyString(_0x3f3925[_0x208ecf(0x144)]),_0x3ace41=nonEmptyString(_0x3f3925[_0x208ecf(0x13b)]),_0x514b92=nonEmptyString(_0x3f3925[_0x208ecf(0x125)])?.[_0x208ecf(0x149)](),_0x20d2cd=_0x3f3925['size'];if(!_0x3e9cea||!_0x3ace41||_0x3ace41!==a169_0x4c42f7['posix'][_0x208ecf(0x140)](_0x3ace41)||_0x3ace41[_0x208ecf(0x120)]('\x5c')||!_0x514b92||!/^sha256:[a-f0-9]{64}$/[_0x208ecf(0x142)](_0x514b92)||typeof _0x20d2cd!=='number'||!Number[_0x208ecf(0x157)](_0x20d2cd)||_0x20d2cd<=0x0||_0x20d2cd>MAX_ARCHIVE_SIZE)throw new Error(_0x208ecf(0x128)+TEMPLATE_ID+'\x22.');return{'version':_0x3e9cea,'name':_0x3ace41,'sha256':_0x514b92,'size':_0x20d2cd};}async function fetchWithTimeout(_0x318429,_0x4af766,_0x1b8d95,_0x173fc9){const _0x89e10b=new AbortController(),_0x36b428=setTimeout(()=>_0x89e10b['abort'](),_0x4af766);try{const _0x436254=await fetch(_0x318429,{'headers':{'Accept':_0x1b8d95},'signal':_0x89e10b['signal']});return await _0x173fc9(_0x436254);}finally{clearTimeout(_0x36b428);}}async function fetchTemplateDescriptor(){const _0x5a8b85=a169_0x3f3ca8,_0x48d8b5=await getRabetbaseCdnConfig();if(!_0x48d8b5)throw new Error('Rabetbase\x20CDN\x20config\x20is\x20unavailable.');return parseDescriptor(_0x48d8b5[_0x5a8b85(0x146)]);}function resolveArchiveUrl(_0x224637){const _0x3ff227=a169_0x3f3ca8,_0x40712f=new URL(PROJECT_TEMPLATE_ASSET_BASE_URL+'/'),_0x4aa5ae=new URL(_0x224637,_0x40712f);if(_0x4aa5ae[_0x3ff227(0x14b)]!=='https:'||_0x4aa5ae[_0x3ff227(0x124)]!==_0x40712f['origin']||!_0x4aa5ae['pathname']['startsWith'](_0x40712f['pathname']))throw new Error(_0x3ff227(0x15c));return _0x4aa5ae[_0x3ff227(0x150)];}async function readResponseBytes(_0x3af9f8,_0x3ef34d){const _0x2db2a1=a169_0x3f3ca8;if(!_0x3af9f8[_0x2db2a1(0x165)]){const _0x2a721d=Buffer[_0x2db2a1(0x127)](await _0x3af9f8[_0x2db2a1(0x131)]());if(_0x2a721d[_0x2db2a1(0x14e)]>_0x3ef34d)throw new Error(_0x2db2a1(0x156));return _0x2a721d;}const _0x8168bd=_0x3af9f8[_0x2db2a1(0x165)][_0x2db2a1(0x11f)](),_0x34aa32=[];let _0x197e10=0x0;try{while(!![]){const {done:_0x4362bc,value:_0x1ea013}=await _0x8168bd['read']();if(_0x4362bc)break;_0x197e10+=_0x1ea013[_0x2db2a1(0x11b)];if(_0x197e10>_0x3ef34d){await _0x8168bd[_0x2db2a1(0x13a)]();throw new Error('CDN\x20project\x20template\x20exceeds\x20its\x20declared\x20download\x20size.');}_0x34aa32[_0x2db2a1(0x134)](Buffer[_0x2db2a1(0x127)](_0x1ea013));}}finally{_0x8168bd[_0x2db2a1(0x152)]();}return Buffer[_0x2db2a1(0x161)](_0x34aa32,_0x197e10);}async function downloadArchive(_0x3560f3,_0x1eef1f,_0x398d77){const _0x4196a4=a169_0x3f3ca8,_0x154cf2=await fetchWithTimeout(resolveArchiveUrl(_0x3560f3['name']),ARCHIVE_TIMEOUT_MS,'application/zip',async _0x29fe87=>{const _0x54c7de=a169_0x16cf;if(!_0x29fe87['ok'])throw new Error('CDN\x20project\x20template\x20request\x20failed\x20with\x20HTTP\x20'+_0x29fe87['status']+'.');const _0x5b97e5=Number(_0x29fe87['headers'][_0x54c7de(0x153)](_0x54c7de(0x154)));if(Number['isFinite'](_0x5b97e5)&&_0x5b97e5>MAX_ARCHIVE_SIZE)throw new Error(_0x54c7de(0x166));return readResponseBytes(_0x29fe87,_0x3560f3[_0x54c7de(0x121)]);});if(_0x154cf2[_0x4196a4(0x14e)]!==_0x3560f3[_0x4196a4(0x121)])throw new Error(_0x4196a4(0x13c)+_0x3560f3[_0x4196a4(0x121)]+_0x4196a4(0x126)+_0x154cf2[_0x4196a4(0x14e)]+'.');_0x398d77?.(_0x4196a4(0x135));const _0x5cfde0=_0x4196a4(0x15e)+createHash(_0x4196a4(0x125))[_0x4196a4(0x132)](_0x154cf2)['digest']('hex');if(_0x5cfde0!==_0x3560f3[_0x4196a4(0x125)])throw new Error(_0x4196a4(0x11e));await a169_0x181495[_0x4196a4(0x130)](_0x1eef1f,_0x154cf2,{'flag':'wx'});}async function assertTemplateRoot(_0x124bfb){const _0x244dba=a169_0x3f3ca8,_0x3d3692=a169_0x4c42f7[_0x244dba(0x15f)](_0x124bfb,_0x244dba(0x13f)),_0x3f53db=JSON[_0x244dba(0x160)](await a169_0x181495[_0x244dba(0x11d)](_0x3d3692,'utf8'));if(!_0x3f53db||typeof _0x3f53db!==_0x244dba(0x145))throw new Error(_0x244dba(0x137));}async function readDirectoryIdentity(_0x7da5a){const _0x42794e=a169_0x3f3ca8;try{const _0x561fc0=await a169_0x181495[_0x42794e(0x11c)](_0x7da5a);if(!_0x561fc0[_0x42794e(0x15a)]())return null;return{'dev':_0x561fc0['dev'],'ino':_0x561fc0[_0x42794e(0x12b)]};}catch{return null;}}async function commitStagedProject(_0x572262,_0x2ea669){const _0x281ed4=a169_0x3f3ca8;await a169_0x181495['mkdir'](_0x2ea669);const _0x216b58=await readDirectoryIdentity(_0x2ea669);if(!_0x216b58)throw new Error('Unable\x20to\x20claim\x20the\x20project\x20directory.');try{for(const _0x2687e of await a169_0x181495[_0x281ed4(0x151)](_0x572262)){await a169_0x181495['rename'](a169_0x4c42f7[_0x281ed4(0x15f)](_0x572262,_0x2687e),a169_0x4c42f7[_0x281ed4(0x15f)](_0x2ea669,_0x2687e));}}catch(_0xd77363){const _0x252827=await readDirectoryIdentity(_0x2ea669);_0x252827?.[_0x281ed4(0x148)]===_0x216b58[_0x281ed4(0x148)]&&_0x252827['ino']===_0x216b58['ino']&&await a169_0x181495['rm'](_0x2ea669,{'recursive':!![],'force':!![]});throw _0xd77363;}}function a169_0x16cf(_0x2e528a,_0x5f411a){_0x2e528a=_0x2e528a-0x11b;const _0x1412f0=a169_0x1412();let _0x16cfaf=_0x1412f0[_0x2e528a];return _0x16cfaf;}export async function materializeProjectTemplate(_0x2222b0,_0x43b456){const _0x30af83=a169_0x3f3ca8,_0x6c7f16=a169_0x4c42f7[_0x30af83(0x143)](_0x2222b0),_0x59da8b=a169_0x4c42f7[_0x30af83(0x15d)](_0x6c7f16);try{await a169_0x181495[_0x30af83(0x11c)](_0x6c7f16);throw new Error('Project\x20directory\x20already\x20exists:\x20'+_0x6c7f16);}catch(_0x5ebb3a){if(_0x5ebb3a[_0x30af83(0x163)]!=='ENOENT')throw _0x5ebb3a;}const _0xdd58b4=await a169_0x181495[_0x30af83(0x141)](a169_0x4c42f7[_0x30af83(0x15f)](_0x59da8b,_0x30af83(0x12a))),_0x3437bd=a169_0x4c42f7[_0x30af83(0x15f)](_0xdd58b4,_0x30af83(0x14f)),_0x2ceb82=a169_0x4c42f7['join'](_0xdd58b4,_0x30af83(0x159));try{try{_0x43b456?.(_0x30af83(0x122));const _0x180e78=await fetchTemplateDescriptor();return _0x43b456?.(_0x30af83(0x133)),await downloadArchive(_0x180e78,_0x2ceb82,_0x43b456),_0x43b456?.(_0x30af83(0x12d)),await extractProjectTemplateArchive(_0x2ceb82,_0x3437bd),await assertTemplateRoot(_0x3437bd),await commitStagedProject(_0x3437bd,_0x6c7f16),{'source':_0x30af83(0x12c),'version':_0x180e78[_0x30af83(0x144)]};}catch(_0x54da34){if(_0x54da34[_0x30af83(0x163)]===_0x30af83(0x13d))throw CliErrors[_0x30af83(0x12f)]('Project\x20directory\x20already\x20exists:\x20'+_0x6c7f16,_0x30af83(0x14c));const _0x205ed2=_0x54da34 instanceof Error?_0x54da34[_0x30af83(0x15b)]:String(_0x54da34);throw CliErrors[_0x30af83(0x12f)](_0x30af83(0x139),_0x30af83(0x138)+_0x205ed2);}}finally{await a169_0x181495['rm'](_0xdd58b4,{'recursive':!![],'force':!![]});}}
@@ -0,0 +1,2 @@
1
+ export declare function getProjectNameValidationError(value: string): string | null;
2
+ export declare function validateProjectName(value: string): string;
@@ -0,0 +1 @@
1
+ (function(_0x127d80,_0x54eac0){const _0xad05de=a170_0x3f56,_0x3ef092=_0x127d80();while(!![]){try{const _0x2e3e9b=-parseInt(_0xad05de(0xea))/0x1+-parseInt(_0xad05de(0xec))/0x2+-parseInt(_0xad05de(0xed))/0x3+parseInt(_0xad05de(0xe9))/0x4+-parseInt(_0xad05de(0xe1))/0x5+-parseInt(_0xad05de(0xe2))/0x6*(parseInt(_0xad05de(0xe0))/0x7)+parseInt(_0xad05de(0xdf))/0x8;if(_0x2e3e9b===_0x54eac0)break;else _0x3ef092['push'](_0x3ef092['shift']());}catch(_0x242edd){_0x3ef092['push'](_0x3ef092['shift']());}}}(a170_0x5cd0,0xdbcd2));function a170_0x3f56(_0x7711a4,_0x1b3b8e){_0x7711a4=_0x7711a4-0xdf;const _0x5cd065=a170_0x5cd0();let _0x3f5638=_0x5cd065[_0x7711a4];return _0x3f5638;}import{CliErrors}from'../../../errors.js';function a170_0x5cd0(){const _0x2096b1=['382174SamsbH','trim','3534758JjkirH','715950wTKKGr','\x22\x20is\x20reserved\x20on\x20Windows','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','36585024szWKJy','7bitLLo','1521685sJDVnB','9128334kWlIND','Project\x20name\x20cannot\x20exceed\x20','validation','length','test','Project\x20name\x20\x22','Use\x20a\x20portable\x20directory\x20name\x20without\x20path\x20separators.','2164428mJzGAu'];a170_0x5cd0=function(){return _0x2096b1;};return a170_0x5cd0();}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(_0x5e0269){const _0x4ad5f8=a170_0x3f56,_0x12f554=_0x5e0269[_0x4ad5f8(0xeb)]();if(!_0x12f554)return'Project\x20name\x20cannot\x20be\x20empty';if(_0x12f554[_0x4ad5f8(0xe5)]>MAX_PROJECT_NAME_LENGTH)return _0x4ad5f8(0xe3)+MAX_PROJECT_NAME_LENGTH+'\x20characters';if(!PROJECT_NAME_PATTERN['test'](_0x12f554))return _0x4ad5f8(0xef);if(WINDOWS_RESERVED_NAME[_0x4ad5f8(0xe6)](_0x12f554))return _0x4ad5f8(0xe7)+_0x12f554+_0x4ad5f8(0xee);return null;}export function validateProjectName(_0x43b9dd){const _0xdf79db=a170_0x3f56,_0x561db1=_0x43b9dd[_0xdf79db(0xeb)](),_0x51a83f=getProjectNameValidationError(_0x561db1);if(_0x51a83f)throw CliErrors[_0xdf79db(0xe4)](_0x51a83f,_0xdf79db(0xe8));return _0x561db1;}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Extract a project template ZIP without relying on OS-specific archive tools.
3
+ * Entries are bounded and validated for traversal, symlinks, Windows naming,
4
+ * case-insensitive collisions, and ZIP bombs before they are written.
5
+ */
6
+ export declare function extractProjectTemplateArchive(zipPath: string, destinationDir: string): Promise<void>;
@@ -0,0 +1 @@
1
+ (function(_0xb127d2,_0x3a391c){const _0x852657=a171_0x464c,_0x13779b=_0xb127d2();while(!![]){try{const _0x3a6cfe=parseInt(_0x852657(0x153))/0x1+parseInt(_0x852657(0x138))/0x2+parseInt(_0x852657(0x155))/0x3+parseInt(_0x852657(0x141))/0x4*(parseInt(_0x852657(0x12c))/0x5)+parseInt(_0x852657(0x13a))/0x6+parseInt(_0x852657(0x12e))/0x7*(parseInt(_0x852657(0x13c))/0x8)+-parseInt(_0x852657(0x150))/0x9*(parseInt(_0x852657(0x148))/0xa);if(_0x3a6cfe===_0x3a391c)break;else _0x13779b['push'](_0x13779b['shift']());}catch(_0xcf3cae){_0x13779b['push'](_0x13779b['shift']());}}}(a171_0x225e,0x47faa));import{createWriteStream}from'node:fs';function a171_0x225e(){const _0x4a6a14=['get','has','Project\x20template\x20ZIP\x20exceeds\x20','967602oQtcXV','end','3099282WqgKNe','sep','184Giotyy','mkdir','en-US','Project\x20template\x20ZIP\x20expands\x20beyond\x20the\x2050\x20MB\x20safety\x20limit.','replace','45796Hikgkt','\x20entries.','error','Case-conflicting\x20ZIP\x20entry\x20path:\x20','Unsafe\x20or\x20non-portable\x20ZIP\x20entry\x20path:\x20','readEntry','fileName','4020ptcdiu','Symbolic\x20links\x20are\x20not\x20allowed\x20in\x20project\x20templates:\x20','Unable\x20to\x20read\x20ZIP\x20entry:\x20','uncompressedSize','startsWith','length','split','add','28917UnCcxx','externalFileAttributes','dirname','172149htZGUE','Encrypted\x20ZIP\x20entries\x20are\x20not\x20supported:\x20','491994hUobeH','join','close','test','openReadStream','entry','30fpxWmM','resolve','55167TZhPyO','toLocaleLowerCase','endsWith','slice','once','catch','Unsafe\x20absolute\x20ZIP\x20entry\x20path:\x20'];a171_0x225e=function(){return _0x4a6a14;};return a171_0x225e();}import a171_0x57d499 from'node:fs/promises';function a171_0x464c(_0x2df31e,_0x4099f2){_0x2df31e=_0x2df31e-0x128;const _0x225e84=a171_0x225e();let _0x464ce7=_0x225e84[_0x2df31e];return _0x464ce7;}import a171_0x42cb9d from'node:path';import{pipeline}from'node:stream/promises';import a171_0x279d9f 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(_0x2271bc){return new Promise((_0x1dcb8f,_0x563db0)=>{a171_0x279d9f['open'](_0x2271bc,{'lazyEntries':!![],'decodeStrings':!![],'strictFileNames':!![],'validateEntrySizes':!![]},(_0x1cace3,_0x477699)=>{if(_0x1cace3||!_0x477699){_0x563db0(_0x1cace3||new Error('Unable\x20to\x20open\x20project\x20template\x20archive.'));return;}_0x1dcb8f(_0x477699);});});}function openEntryStream(_0x2b7691,_0x40543c){return new Promise((_0x34c96b,_0x2227e4)=>{const _0x3bed42=a171_0x464c;_0x2b7691[_0x3bed42(0x12a)](_0x40543c,(_0x18e93a,_0x53a65b)=>{const _0x204c29=_0x3bed42;if(_0x18e93a||!_0x53a65b){_0x2227e4(_0x18e93a||new Error(_0x204c29(0x14a)+_0x40543c[_0x204c29(0x147)]));return;}_0x34c96b(_0x53a65b);});});}function validateEntryPath(_0x39aac3){const _0xdd3342=a171_0x464c,_0x478888=_0x39aac3[_0xdd3342(0x140)](/\\/g,'/'),_0x186931=_0x478888[_0xdd3342(0x130)]('/'),_0x2425c3=_0x186931?_0x478888[_0xdd3342(0x131)](0x0,-0x1):_0x478888;if(!_0x2425c3||_0x478888[_0xdd3342(0x14c)]('/')||/^[A-Za-z]:\//[_0xdd3342(0x129)](_0x478888))throw new Error(_0xdd3342(0x134)+_0x39aac3);const _0x5cf091=_0x2425c3[_0xdd3342(0x14e)]('/');for(const _0x54e32f of _0x5cf091){if(!_0x54e32f||_0x54e32f==='.'||_0x54e32f==='..'||_0x54e32f[_0xdd3342(0x130)]('.')||_0x54e32f[_0xdd3342(0x130)]('\x20')||WINDOWS_INVALID_CHAR[_0xdd3342(0x129)](_0x54e32f)||WINDOWS_RESERVED_NAME['test'](_0x54e32f))throw new Error(_0xdd3342(0x145)+_0x39aac3);}return{'relativePath':_0x5cf091[_0xdd3342(0x156)](a171_0x42cb9d['sep']),'directory':_0x186931};}function isSymbolicLink(_0x5bb3ab){const _0x11438b=a171_0x464c,_0x1849c9=_0x5bb3ab[_0x11438b(0x151)]>>>0x10&0xffff;return(_0x1849c9&0xf000)===0xa000;}export async function extractProjectTemplateArchive(_0x933b2a,_0x2788bd){const _0x3d6a1d=a171_0x464c,_0x57ec2b=await openZip(_0x933b2a),_0x365a1e=a171_0x42cb9d[_0x3d6a1d(0x12d)](_0x2788bd),_0x22af42=new Set(),_0x19f9b9=new Map();let _0x46abf1=0x0,_0x1a04b8=0x0;await a171_0x57d499[_0x3d6a1d(0x13d)](_0x365a1e,{'recursive':!![]}),await new Promise((_0x1c504b,_0x2c4707)=>{const _0x3e4d66=_0x3d6a1d;let _0x2b9221=![];const _0xe85364=_0x4a3063=>{const _0x57527c=a171_0x464c;if(_0x2b9221)return;_0x2b9221=!![],_0x57ec2b[_0x57527c(0x128)](),_0x2c4707(_0x4a3063 instanceof Error?_0x4a3063:new Error(String(_0x4a3063)));};_0x57ec2b[_0x3e4d66(0x132)](_0x3e4d66(0x143),_0xe85364),_0x57ec2b['once'](_0x3e4d66(0x139),()=>{if(_0x2b9221)return;_0x2b9221=!![],_0x1c504b();}),_0x57ec2b['on'](_0x3e4d66(0x12b),_0x3e7854=>{const _0x49f616=_0x3e4d66;void(async()=>{const _0x2d5907=a171_0x464c;_0x46abf1+=0x1,_0x1a04b8+=_0x3e7854[_0x2d5907(0x14b)];if(_0x46abf1>MAX_ENTRY_COUNT)throw new Error(_0x2d5907(0x137)+MAX_ENTRY_COUNT+_0x2d5907(0x142));if(_0x1a04b8>MAX_UNCOMPRESSED_SIZE)throw new Error(_0x2d5907(0x13f));if(_0x3e7854['isEncrypted']())throw new Error(_0x2d5907(0x154)+_0x3e7854[_0x2d5907(0x147)]);if(isSymbolicLink(_0x3e7854))throw new Error(_0x2d5907(0x149)+_0x3e7854['fileName']);const {relativePath:_0x2c7231,directory:_0x324119}=validateEntryPath(_0x3e7854[_0x2d5907(0x147)]),_0xac8c9c=_0x2c7231[_0x2d5907(0x14e)](a171_0x42cb9d[_0x2d5907(0x13b)]);for(let _0x1e80c2=0x1;_0x1e80c2<=_0xac8c9c[_0x2d5907(0x14d)];_0x1e80c2+=0x1){const _0x4bc1f6=_0xac8c9c[_0x2d5907(0x131)](0x0,_0x1e80c2)[_0x2d5907(0x156)](a171_0x42cb9d[_0x2d5907(0x13b)]),_0x50a34d=_0x4bc1f6[_0x2d5907(0x12f)](_0x2d5907(0x13e)),_0x5698bd=_0x19f9b9[_0x2d5907(0x135)](_0x50a34d);if(_0x5698bd&&_0x5698bd!==_0x4bc1f6)throw new Error(_0x2d5907(0x144)+_0x3e7854[_0x2d5907(0x147)]);_0x19f9b9['set'](_0x50a34d,_0x4bc1f6);}const _0x38d0c9=_0x2c7231[_0x2d5907(0x12f)]('en-US');if(_0x22af42[_0x2d5907(0x136)](_0x38d0c9))throw new Error('Duplicate\x20or\x20case-conflicting\x20ZIP\x20entry:\x20'+_0x3e7854['fileName']);_0x22af42[_0x2d5907(0x14f)](_0x38d0c9);const _0x17d866=a171_0x42cb9d['resolve'](_0x365a1e,_0x2c7231);if(_0x17d866!==_0x365a1e&&!_0x17d866['startsWith'](''+_0x365a1e+a171_0x42cb9d[_0x2d5907(0x13b)]))throw new Error('ZIP\x20entry\x20escapes\x20the\x20destination\x20directory:\x20'+_0x3e7854[_0x2d5907(0x147)]);if(_0x324119)await a171_0x57d499[_0x2d5907(0x13d)](_0x17d866,{'recursive':!![]});else{await a171_0x57d499[_0x2d5907(0x13d)](a171_0x42cb9d[_0x2d5907(0x152)](_0x17d866),{'recursive':!![]});const _0x31f9cb=await openEntryStream(_0x57ec2b,_0x3e7854);await pipeline(_0x31f9cb,createWriteStream(_0x17d866,{'flags':'wx','mode':0x1a4}));}_0x57ec2b[_0x2d5907(0x146)]();})()[_0x49f616(0x133)](_0xe85364);}),_0x57ec2b['readEntry']();});}
@@ -1,4 +1,2 @@
1
- /** rabetbase-cli 包根目录(含 package.json、templates/) */
1
+ /** rabetbase-cli 包根目录(含 package.json) */
2
2
  export declare function getRabetbaseCliPackageRoot(): string;
3
- /** 子应用 React 脚手架模板目录 */
4
- export declare function getSubAppReactDemoTemplateDir(): string;
@@ -1 +1 @@
1
- const a164_0x33d3f7=a164_0x15fc;(function(_0x2b413c,_0x2fb0c3){const _0x4c7fec=a164_0x15fc,_0x13d7bc=_0x2b413c();while(!![]){try{const _0x20e80f=-parseInt(_0x4c7fec(0x14f))/0x1+-parseInt(_0x4c7fec(0x155))/0x2*(-parseInt(_0x4c7fec(0x152))/0x3)+parseInt(_0x4c7fec(0x153))/0x4+parseInt(_0x4c7fec(0x150))/0x5*(parseInt(_0x4c7fec(0x14b))/0x6)+-parseInt(_0x4c7fec(0x149))/0x7*(parseInt(_0x4c7fec(0x151))/0x8)+parseInt(_0x4c7fec(0x14a))/0x9+parseInt(_0x4c7fec(0x14d))/0xa*(-parseInt(_0x4c7fec(0x154))/0xb);if(_0x20e80f===_0x2fb0c3)break;else _0x13d7bc['push'](_0x13d7bc['shift']());}catch(_0x493b89){_0x13d7bc['push'](_0x13d7bc['shift']());}}}(a164_0x4e41,0xa625d));function a164_0x15fc(_0x336c6b,_0x5198f2){_0x336c6b=_0x336c6b-0x148;const _0x4e4116=a164_0x4e41();let _0x15fc7d=_0x4e4116[_0x336c6b];return _0x15fc7d;}import a164_0x2bd756 from'node:path';function a164_0x4e41(){const _0x292518=['670jXKXxW','400OgyLFu','3pJqnhz','1128284cZGIuK','22IBraaj','514594adBNOT','templates','join','dirname','sub-app-react-demo','9611VfuBCt','386361dqNfAa','48234pWRXOx','projects','759950FdevEL','../../../../','758342osYHpN'];a164_0x4e41=function(){return _0x292518;};return a164_0x4e41();}import{fileURLToPath}from'node:url';const __dirname=a164_0x2bd756[a164_0x33d3f7(0x158)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x3ffca0=a164_0x33d3f7;return a164_0x2bd756['resolve'](__dirname,_0x3ffca0(0x14e));}export function getSubAppReactDemoTemplateDir(){const _0x36778b=a164_0x33d3f7;return a164_0x2bd756[_0x36778b(0x157)](getRabetbaseCliPackageRoot(),_0x36778b(0x156),_0x36778b(0x14c),_0x36778b(0x148));}
1
+ const a172_0x3245f0=a172_0x28a5;(function(_0x2c1453,_0x4cc18b){const _0x423e0f=a172_0x28a5,_0x98b917=_0x2c1453();while(!![]){try{const _0x306d8b=-parseInt(_0x423e0f(0xfd))/0x1+-parseInt(_0x423e0f(0x102))/0x2*(-parseInt(_0x423e0f(0xff))/0x3)+parseInt(_0x423e0f(0xf8))/0x4+parseInt(_0x423e0f(0xf9))/0x5+-parseInt(_0x423e0f(0x101))/0x6*(parseInt(_0x423e0f(0x103))/0x7)+-parseInt(_0x423e0f(0xfa))/0x8+-parseInt(_0x423e0f(0xfb))/0x9;if(_0x306d8b===_0x4cc18b)break;else _0x98b917['push'](_0x98b917['shift']());}catch(_0x2b811f){_0x98b917['push'](_0x98b917['shift']());}}}(a172_0x3e00,0x9dc8a));function a172_0x3e00(){const _0x52bf0e=['497TsKBPa','3891368scbFIO','2656775NiqBbw','4617328CGoySD','2676780JWvulU','dirname','349080syAQVc','resolve','7149RWDNEH','../../../../','8562pUSRUu','392acjxVc'];a172_0x3e00=function(){return _0x52bf0e;};return a172_0x3e00();}function a172_0x28a5(_0x11bf2b,_0x5de5f2){_0x11bf2b=_0x11bf2b-0xf8;const _0x3e0024=a172_0x3e00();let _0x28a53b=_0x3e0024[_0x11bf2b];return _0x28a53b;}import a172_0x344db2 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a172_0x344db2[a172_0x3245f0(0xfc)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x37591e=a172_0x3245f0;return a172_0x344db2[_0x37591e(0xfe)](__dirname,_0x37591e(0x100));}
@@ -1 +1,2 @@
1
- export declare function copyProjectTemplate(projectCode: string): Promise<string>;
1
+ import { type ProjectTemplateProgress } from "../../../commands/project/create/materialize-project-template.js";
2
+ export declare function copyProjectTemplate(projectCode: string, onProgress?: ProjectTemplateProgress): Promise<string>;
@@ -1 +1 @@
1
- (function(_0x467999,_0x2de979){const _0x183c75=a165_0x5c27,_0x42c2ce=_0x467999();while(!![]){try{const _0x34f57c=-parseInt(_0x183c75(0x75))/0x1*(-parseInt(_0x183c75(0x85))/0x2)+parseInt(_0x183c75(0x78))/0x3+-parseInt(_0x183c75(0x87))/0x4*(-parseInt(_0x183c75(0x86))/0x5)+-parseInt(_0x183c75(0x83))/0x6*(parseInt(_0x183c75(0x7b))/0x7)+parseInt(_0x183c75(0x89))/0x8*(parseInt(_0x183c75(0x84))/0x9)+-parseInt(_0x183c75(0x88))/0xa+-parseInt(_0x183c75(0x7a))/0xb*(parseInt(_0x183c75(0x7e))/0xc);if(_0x34f57c===_0x2de979)break;else _0x42c2ce['push'](_0x42c2ce['shift']());}catch(_0x5454ad){_0x42c2ce['push'](_0x42c2ce['shift']());}}}(a165_0x3e81,0x6fe46));import a165_0x25b9ca from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';function a165_0x3e81(){const _0x2da4c3=['1032060SjcstA','4563064CUuCvL','735698aCDuSi','message','开始复制项目模板','1965558TdYcRS','cwd','8974141AjfqKP','5780733WGkbpv','now','success','12dqLWax','copy','项目模板复制完成','resolve','项目模板复制失败','6Igrnkm','9ySwHbS','2BgUyqG','105hjTtQl','46076kTmGvH'];a165_0x3e81=function(){return _0x2da4c3;};return a165_0x3e81();}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a165_0x5c27(_0x21b6d9,_0x466f5d){_0x21b6d9=_0x21b6d9-0x75;const _0x3e81be=a165_0x3e81();let _0x5c276d=_0x3e81be[_0x21b6d9];return _0x5c276d;}import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x223bc8){const _0x28dd05=a165_0x5c27,_0x22fdf4=Date[_0x28dd05(0x7c)](),_0x4ff241=a165_0x25b9ca[_0x28dd05(0x81)](process[_0x28dd05(0x79)](),_0x223bc8);try{logger['info'](_0x28dd05(0x7f),_0x28dd05(0x77),{'projectCode':_0x223bc8,'templateDir':templateDir}),await copyDirectory(templateDir,_0x4ff241);const _0x41584d=Date['now']()-_0x22fdf4;logger[_0x28dd05(0x7d)](_0x28dd05(0x7f),_0x28dd05(0x80),_0x41584d,{'projectCode':_0x223bc8});}catch(_0x1a0a62){const _0x4ffde9=Date['now']()-_0x22fdf4;logger['error'](_0x28dd05(0x7f),_0x28dd05(0x82),{'projectCode':_0x223bc8,'error':_0x1a0a62 instanceof Error?_0x1a0a62[_0x28dd05(0x76)]:String(_0x1a0a62),'duration':_0x4ffde9});throw _0x1a0a62;}return formatElapsed(_0x22fdf4);}
1
+ function a173_0x4cb0(_0x23c0ea,_0x20d20b){_0x23c0ea=_0x23c0ea-0xd1;const _0x3e66f8=a173_0x3e66();let _0x4cb0a9=_0x3e66f8[_0x23c0ea];return _0x4cb0a9;}(function(_0x33c1d9,_0x41b7a3){const _0x170a5b=a173_0x4cb0,_0x4bb90e=_0x33c1d9();while(!![]){try{const _0xddd58b=parseInt(_0x170a5b(0xd7))/0x1+-parseInt(_0x170a5b(0xdc))/0x2+-parseInt(_0x170a5b(0xd1))/0x3*(-parseInt(_0x170a5b(0xe4))/0x4)+-parseInt(_0x170a5b(0xe0))/0x5+parseInt(_0x170a5b(0xdb))/0x6*(parseInt(_0x170a5b(0xd9))/0x7)+parseInt(_0x170a5b(0xe5))/0x8*(parseInt(_0x170a5b(0xe3))/0x9)+parseInt(_0x170a5b(0xde))/0xa*(-parseInt(_0x170a5b(0xd3))/0xb);if(_0xddd58b===_0x41b7a3)break;else _0x4bb90e['push'](_0x4bb90e['shift']());}catch(_0x5b62b6){_0x4bb90e['push'](_0x4bb90e['shift']());}}}(a173_0x3e66,0x5bbf2));import a173_0x24b9db 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(_0x13e27d,_0x2d25c9){const _0x510628=a173_0x4cb0,_0x1addcd=Date['now'](),_0x4dd55a=a173_0x24b9db[_0x510628(0xd4)](process[_0x510628(0xda)](),_0x13e27d);try{logger[_0x510628(0xdf)](_0x510628(0xdd),_0x510628(0xd8),{'projectCode':_0x13e27d});const _0x1b84a5=await materializeProjectTemplate(_0x4dd55a,_0x2d25c9),_0x9e0a0d=Date[_0x510628(0xe2)]()-_0x1addcd;logger['success'](_0x510628(0xdd),_0x510628(0xd2),_0x9e0a0d,{'projectCode':_0x13e27d,'templateSource':_0x1b84a5[_0x510628(0xe1)],'templateVersion':_0x1b84a5['version']});}catch(_0x1ae717){const _0x1c2f30=Date[_0x510628(0xe2)]()-_0x1addcd;logger[_0x510628(0xe6)](_0x510628(0xdd),_0x510628(0xd6),{'projectCode':_0x13e27d,'error':_0x1ae717 instanceof Error?_0x1ae717[_0x510628(0xd5)]:String(_0x1ae717),'duration':_0x1c2f30});throw _0x1ae717;}return formatElapsed(_0x1addcd);}function a173_0x3e66(){const _0x344310=['info','253610PfwNdd','source','now','18LbqXAE','28jGqpnZ','2177736xidVou','error','89637RZowRm','项目模板创建完成','66eJaoum','resolve','message','项目模板复制失败','221747PeijjC','开始创建项目模板','7qqfMVN','cwd','4084968MXEEuF','1465596sioXHA','copy','828080PRxeWl'];a173_0x3e66=function(){return _0x344310;};return a173_0x3e66();}
@@ -1 +1 @@
1
- (function(_0x4254cd,_0x499a92){const _0x456e8f=a166_0xb2dd,_0x4ddbc3=_0x4254cd();while(!![]){try{const _0x110a1e=parseInt(_0x456e8f(0xef))/0x1+-parseInt(_0x456e8f(0xf5))/0x2*(-parseInt(_0x456e8f(0xed))/0x3)+-parseInt(_0x456e8f(0xe8))/0x4+-parseInt(_0x456e8f(0xea))/0x5*(parseInt(_0x456e8f(0xec))/0x6)+-parseInt(_0x456e8f(0xf7))/0x7+parseInt(_0x456e8f(0xf3))/0x8*(parseInt(_0x456e8f(0xe5))/0x9)+-parseInt(_0x456e8f(0xf9))/0xa*(-parseInt(_0x456e8f(0xf4))/0xb);if(_0x110a1e===_0x499a92)break;else _0x4ddbc3['push'](_0x4ddbc3['shift']());}catch(_0x4d8332){_0x4ddbc3['push'](_0x4ddbc3['shift']());}}}(a166_0x2ed9,0x18c6a));import a166_0x45f498 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a166_0x2ed9(){const _0x2ed38a=['now','prettier','513891TPydqE','message','format','645364eWKlII','--write','115hnJkYw','success','19086eElKnH','84192sSckaW','resolve','67346MjmJFu','开始格式化代码','info','代码格式化完成','16WImwxJ','61765KhVcPg','4sBzIWN','error','294427SEzwhx','代码格式化失败','250utqtlb'];a166_0x2ed9=function(){return _0x2ed38a;};return a166_0x2ed9();}import{resolveNpmBin}from'../../../utils/platform.js';function a166_0xb2dd(_0xfa34c2,_0x5b84d8){_0xfa34c2=_0xfa34c2-0xe3;const _0x2ed9a4=a166_0x2ed9();let _0xb2dde2=_0x2ed9a4[_0xfa34c2];return _0xb2dde2;}export async function formatProjectCode(_0x6d08cd){const _0xbcc42c=a166_0xb2dd,_0x341061=Date[_0xbcc42c(0xe3)](),_0x477a87=a166_0x45f498[_0xbcc42c(0xee)](process['cwd'](),_0x6d08cd);try{logger[_0xbcc42c(0xf1)]('format',_0xbcc42c(0xf0),{'projectCode':_0x6d08cd}),await execa(resolveNpmBin('npx'),[_0xbcc42c(0xe4),_0xbcc42c(0xe9),'.'],{'cwd':_0x477a87});const _0x1bf199=Date[_0xbcc42c(0xe3)]()-_0x341061;logger[_0xbcc42c(0xeb)](_0xbcc42c(0xe7),_0xbcc42c(0xf2),_0x1bf199,{'projectCode':_0x6d08cd});}catch(_0x19d819){const _0x5c1b84=Date[_0xbcc42c(0xe3)]()-_0x341061;logger[_0xbcc42c(0xf6)]('format',_0xbcc42c(0xf8),{'projectCode':_0x6d08cd,'error':_0x19d819 instanceof Error?_0x19d819[_0xbcc42c(0xe6)]:String(_0x19d819),'duration':_0x5c1b84});throw _0x19d819;}return formatElapsed(_0x341061);}
1
+ function a174_0x9c48(_0x3a8fef,_0x4772f6){_0x3a8fef=_0x3a8fef-0x120;const _0x538a4c=a174_0x538a();let _0x9c48e0=_0x538a4c[_0x3a8fef];return _0x9c48e0;}(function(_0x104077,_0x142077){const _0x4a9699=a174_0x9c48,_0x1d8b5c=_0x104077();while(!![]){try{const _0x2afd44=-parseInt(_0x4a9699(0x132))/0x1+-parseInt(_0x4a9699(0x134))/0x2*(-parseInt(_0x4a9699(0x12d))/0x3)+parseInt(_0x4a9699(0x133))/0x4*(-parseInt(_0x4a9699(0x12f))/0x5)+-parseInt(_0x4a9699(0x129))/0x6+-parseInt(_0x4a9699(0x124))/0x7+-parseInt(_0x4a9699(0x126))/0x8+parseInt(_0x4a9699(0x131))/0x9*(parseInt(_0x4a9699(0x120))/0xa);if(_0x2afd44===_0x142077)break;else _0x1d8b5c['push'](_0x1d8b5c['shift']());}catch(_0x50cf65){_0x1d8b5c['push'](_0x1d8b5c['shift']());}}}(a174_0x538a,0xb6976));import a174_0x2938e1 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';function a174_0x538a(){const _0x344079=['3630855zpLDGk','resolve','63cfvPbW','722245fqKhkv','4oWLwIs','2cksAcV','4416700tCzVjm','info','开始格式化代码','error','4241167SbJgUt','format','5473584zzrkef','success','message','1034820rmULMm','prettier','代码格式化完成','now','1701507dvZmIt','cwd'];a174_0x538a=function(){return _0x344079;};return a174_0x538a();}export async function formatProjectCode(_0x56c0c5){const _0x26e271=a174_0x9c48,_0x41ac12=Date[_0x26e271(0x12c)](),_0x221a22=a174_0x2938e1[_0x26e271(0x130)](process[_0x26e271(0x12e)](),_0x56c0c5);try{logger[_0x26e271(0x121)]('format',_0x26e271(0x122),{'projectCode':_0x56c0c5}),await execa(resolveNpmBin('npx'),[_0x26e271(0x12a),'--write','.'],{'cwd':_0x221a22});const _0x24ec37=Date[_0x26e271(0x12c)]()-_0x41ac12;logger[_0x26e271(0x127)](_0x26e271(0x125),_0x26e271(0x12b),_0x24ec37,{'projectCode':_0x56c0c5});}catch(_0x51aee9){const _0x482804=Date['now']()-_0x41ac12;logger[_0x26e271(0x123)](_0x26e271(0x125),'代码格式化失败',{'projectCode':_0x56c0c5,'error':_0x51aee9 instanceof Error?_0x51aee9[_0x26e271(0x128)]:String(_0x51aee9),'duration':_0x482804});throw _0x51aee9;}return formatElapsed(_0x41ac12);}
@@ -1 +1 @@
1
- function a167_0x3d1c(){const _0x2152e9=['install','52LiwPen','6lrLMuE','error','依赖安装失败','success','1005170SjcKDU','1uFuilr','resolve','11AknJXU','info','899320KvCKoK','npm','264TtEmAD','103789PPcMvz','997990xurQPj','48utPssb','2216664RjwPdW','https://registry.npmmirror.com','依赖安装完成','230340RIUdNy','now','cwd','6nwAoLN'];a167_0x3d1c=function(){return _0x2152e9;};return a167_0x3d1c();}(function(_0x28b73d,_0x481c53){const _0x277990=a167_0x3c96,_0x122ff=_0x28b73d();while(!![]){try{const _0xded039=parseInt(_0x277990(0x1a0))/0x1*(-parseInt(_0x277990(0x19f))/0x2)+parseInt(_0x277990(0x1b3))/0x3*(parseInt(_0x277990(0x1ad))/0x4)+-parseInt(_0x277990(0x1a4))/0x5*(parseInt(_0x277990(0x1b0))/0x6)+parseInt(_0x277990(0x1a7))/0x7*(parseInt(_0x277990(0x1a6))/0x8)+parseInt(_0x277990(0x1aa))/0x9+-parseInt(_0x277990(0x1a8))/0xa*(-parseInt(_0x277990(0x1a2))/0xb)+-parseInt(_0x277990(0x1a9))/0xc*(-parseInt(_0x277990(0x1b2))/0xd);if(_0xded039===_0x481c53)break;else _0x122ff['push'](_0x122ff['shift']());}catch(_0x3f7a1b){_0x122ff['push'](_0x122ff['shift']());}}}(a167_0x3d1c,0x4175b));import a167_0xad9b41 from'node:path';function a167_0x3c96(_0x1d1d52,_0x1c974b){_0x1d1d52=_0x1d1d52-0x19d;const _0x3d1c46=a167_0x3d1c();let _0x3c96f7=_0x3d1c46[_0x1d1d52];return _0x3c96f7;}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0xa0ed9d){const _0x7e7d63=a167_0x3c96,_0x68bf39=Date[_0x7e7d63(0x1ae)](),_0x204fd6=a167_0xad9b41[_0x7e7d63(0x1a1)](process[_0x7e7d63(0x1af)](),_0xa0ed9d);try{logger[_0x7e7d63(0x1a3)](_0x7e7d63(0x1b1),'开始安装依赖',{'projectCode':_0xa0ed9d,'registry':_0x7e7d63(0x1ab)}),await execa(resolveNpmBin(_0x7e7d63(0x1a5)),[_0x7e7d63(0x1b1),'--registry',_0x7e7d63(0x1ab)],{'cwd':_0x204fd6});const _0x3f91f5=Date[_0x7e7d63(0x1ae)]()-_0x68bf39;logger[_0x7e7d63(0x19e)](_0x7e7d63(0x1b1),_0x7e7d63(0x1ac),_0x3f91f5,{'projectCode':_0xa0ed9d});}catch(_0x4ef3e9){const _0x4f532e=Date[_0x7e7d63(0x1ae)]()-_0x68bf39;logger[_0x7e7d63(0x1b4)](_0x7e7d63(0x1b1),_0x7e7d63(0x19d),{'projectCode':_0xa0ed9d,'error':_0x4ef3e9 instanceof Error?_0x4ef3e9['message']:String(_0x4ef3e9),'duration':_0x4f532e});throw _0x4ef3e9;}return formatElapsed(_0x68bf39);}
1
+ (function(_0x15987c,_0x1efa44){const _0x3bd133=a175_0x400b,_0x24fb53=_0x15987c();while(!![]){try{const _0x1c2c8e=parseInt(_0x3bd133(0x1fe))/0x1*(-parseInt(_0x3bd133(0x200))/0x2)+-parseInt(_0x3bd133(0x1f6))/0x3+parseInt(_0x3bd133(0x1f4))/0x4*(-parseInt(_0x3bd133(0x1f3))/0x5)+-parseInt(_0x3bd133(0x1fa))/0x6+parseInt(_0x3bd133(0x1ff))/0x7*(-parseInt(_0x3bd133(0x1fd))/0x8)+-parseInt(_0x3bd133(0x1fb))/0x9+parseInt(_0x3bd133(0x1f5))/0xa;if(_0x1c2c8e===_0x1efa44)break;else _0x24fb53['push'](_0x24fb53['shift']());}catch(_0x1c9594){_0x24fb53['push'](_0x24fb53['shift']());}}}(a175_0x3b72,0x8ddbe));function a175_0x400b(_0x33d14b,_0x169968){_0x33d14b=_0x33d14b-0x1f1;const _0x3b72e1=a175_0x3b72();let _0x400bd7=_0x3b72e1[_0x33d14b];return _0x400bd7;}import a175_0x314578 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x4b7639){const _0x4199d5=a175_0x400b,_0x18ada5=Date[_0x4199d5(0x1f1)](),_0x140f52=a175_0x314578['resolve'](process[_0x4199d5(0x205)](),_0x4b7639);try{logger[_0x4199d5(0x204)](_0x4199d5(0x1f7),_0x4199d5(0x1f8),{'projectCode':_0x4b7639,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin(_0x4199d5(0x201)),[_0x4199d5(0x1f7),_0x4199d5(0x206),_0x4199d5(0x1fc)],{'cwd':_0x140f52});const _0x490d8b=Date[_0x4199d5(0x1f1)]()-_0x18ada5;logger[_0x4199d5(0x1f2)](_0x4199d5(0x1f7),_0x4199d5(0x1f9),_0x490d8b,{'projectCode':_0x4b7639});}catch(_0x3dd70d){const _0x2dbdcb=Date[_0x4199d5(0x1f1)]()-_0x18ada5;logger['error']('install',_0x4199d5(0x202),{'projectCode':_0x4b7639,'error':_0x3dd70d instanceof Error?_0x3dd70d[_0x4199d5(0x203)]:String(_0x3dd70d),'duration':_0x2dbdcb});throw _0x3dd70d;}return formatElapsed(_0x18ada5);}function a175_0x3b72(){const _0x2ca2b8=['4069816EFkcih','304438ZJrHwx','14Gkybii','6zYFCHJ','npm','依赖安装失败','message','info','cwd','--registry','now','success','865HEWsSk','18644FMgajf','53673290fvkwKM','3400317ggkmzv','install','开始安装依赖','依赖安装完成','3605058sDunqr','2833848xiPTUS','https://registry.npmmirror.com'];a175_0x3b72=function(){return _0x2ca2b8;};return a175_0x3b72();}
@@ -1 +1 @@
1
- const a168_0xbed396=a168_0x3558;(function(_0x16c38f,_0x5a5a60){const _0x21514b=a168_0x3558,_0x47d1e6=_0x16c38f();while(!![]){try{const _0x138ac2=-parseInt(_0x21514b(0x118))/0x1+parseInt(_0x21514b(0x10c))/0x2*(-parseInt(_0x21514b(0x10a))/0x3)+-parseInt(_0x21514b(0x111))/0x4+-parseInt(_0x21514b(0x115))/0x5+-parseInt(_0x21514b(0x113))/0x6+-parseInt(_0x21514b(0x125))/0x7+parseInt(_0x21514b(0x11e))/0x8;if(_0x138ac2===_0x5a5a60)break;else _0x47d1e6['push'](_0x47d1e6['shift']());}catch(_0x46f96c){_0x47d1e6['push'](_0x47d1e6['shift']());}}}(a168_0x3c75,0xe208e));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{upgradeApp}from'../../commands/project/upgrade.js';function a168_0x3558(_0xf23609,_0x227bca){_0xf23609=_0xf23609-0x107;const _0x3c75f6=a168_0x3c75();let _0x355888=_0x3c75f6[_0xf23609];return _0x355888;}const createFlags=[{'name':a168_0xbed396(0x114),'type':'string','description':a168_0xbed396(0x10b)},{'name':a168_0xbed396(0x108),'type':a168_0xbed396(0x11d),'description':a168_0xbed396(0x119)},{'name':a168_0xbed396(0x107),'type':'string','description':a168_0xbed396(0x121)}],upgradeFlags=[{'name':a168_0xbed396(0x11c),'type':a168_0xbed396(0x120),'description':a168_0xbed396(0x10d),'default':![]}];function a168_0x3c75(){const _0x338461=['Target\x20environment','bool','write','yes','string','60849576VQShbR','str','boolean','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','cookie','trim','args','12860883zpmCtJ','appcode','env','nonInteractive','3XxnPPj','Project\x20name','2865342HDXdVA','Skip\x20confirmation\x20prompt','project-name','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','5942696AIGrfz','../../commands/project/create/main.js','865344pvcqUb','name','1513000MKRgNz','create','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','1477921QfzHJK'];a168_0x3c75=function(){return _0x338461;};return a168_0x3c75();}export const projectDefinitions=[{'service':'project','command':a168_0xbed396(0x116),'description':'Create\x20a\x20new\x20project','risk':'write','requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a168_0xbed396(0x10e),'description':a168_0xbed396(0x110),'required':![]}],'flags':createFlags,async 'execute'(_0x438cb8){const _0x112944=a168_0xbed396,{createApp:_0x5abc68}=await import(_0x112944(0x112)),{createProjectNonInteractive:_0x46db8b}=await import('../../commands/project/create/non-interactive.js'),_0x12dda7=_0x438cb8['str'](_0x112944(0x114))[_0x112944(0x123)]()||_0x438cb8[_0x112944(0x124)][0x0]?.['trim'](),_0x1bb4af=_0x438cb8[_0x112944(0x11f)]('env')||undefined,_0x30f63d=_0x438cb8['str'](_0x112944(0x107))||undefined;if(_0x438cb8[_0x112944(0x109)]){if(!_0x12dda7)throw CliErrors['validation'](_0x112944(0x10f),'Usage:\x20'+CLI_BIN_NAME+_0x112944(0x117));await _0x46db8b(_0x12dda7,_0x1bb4af,_0x30f63d,_0x438cb8[_0x112944(0x122)]);}else await _0x5abc68({'projectCode':_0x12dda7,'appCode':_0x30f63d,'env':_0x1bb4af,'cookie':_0x438cb8[_0x112944(0x122)]});return{'ok':!![]};}},{'service':'project','command':'upgrade','description':'Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','risk':a168_0xbed396(0x11b),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x399dc9){const _0x17add7=a168_0xbed396;return await upgradeApp(_0x399dc9[_0x17add7(0x109)],{'yes':_0x399dc9[_0x17add7(0x11a)](_0x17add7(0x11c))}),{'ok':!![]};}}];
1
+ function a176_0x53b8(){const _0x1614d5=['113598gpQBLw','2200cwNBrr','name','nonInteractive','../../commands/project/create/main.js','3014328jUeyWG','string','Create\x20a\x20new\x20project','boolean','project-name','yes','9496cXBfEB','project','4165819YPNbnk','92275jSZlLV','args','22dGWZni','2270034hkkKaW','create','2193801VYHPEI','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','upgrade','trim','cookie','430QlbMRo','str','write','appcode','Target\x20environment','validation'];a176_0x53b8=function(){return _0x1614d5;};return a176_0x53b8();}const a176_0x45b091=a176_0x503c;(function(_0x2a023f,_0x4c1a19){const _0x595ea7=a176_0x503c,_0x4406c2=_0x2a023f();while(!![]){try{const _0x735aff=parseInt(_0x595ea7(0x112))/0x1*(-parseInt(_0x595ea7(0x114))/0x2)+parseInt(_0x595ea7(0xf9))/0x3+-parseInt(_0x595ea7(0x10f))/0x4*(-parseInt(_0x595ea7(0x105))/0x5)+parseInt(_0x595ea7(0x115))/0x6+-parseInt(_0x595ea7(0x111))/0x7+-parseInt(_0x595ea7(0x109))/0x8+-parseInt(_0x595ea7(0x104))/0x9*(-parseInt(_0x595ea7(0xfe))/0xa);if(_0x735aff===_0x4c1a19)break;else _0x4406c2['push'](_0x4406c2['shift']());}catch(_0x4228f0){_0x4406c2['push'](_0x4406c2['shift']());}}}(a176_0x53b8,0xad55b));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a176_0x503c(_0x58ba4c,_0x30d294){_0x58ba4c=_0x58ba4c-0xf9;const _0x53b845=a176_0x53b8();let _0x503cb0=_0x53b845[_0x58ba4c];return _0x503cb0;}import{upgradeApp}from'../../commands/project/upgrade.js';const createFlags=[{'name':'name','type':a176_0x45b091(0x10a),'description':'Project\x20name'},{'name':'env','type':'string','description':a176_0x45b091(0x102)},{'name':a176_0x45b091(0x101),'type':a176_0x45b091(0x10a),'description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'}],upgradeFlags=[{'name':a176_0x45b091(0x10e),'type':a176_0x45b091(0x10c),'description':'Skip\x20confirmation\x20prompt','default':![]}];export const projectDefinitions=[{'service':a176_0x45b091(0x110),'command':a176_0x45b091(0x116),'description':a176_0x45b091(0x10b),'risk':a176_0x45b091(0x100),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a176_0x45b091(0x10d),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0x5cc702){const _0x59060f=a176_0x45b091,{createApp:_0x2fcb3b}=await import(_0x59060f(0x108)),_0x412bf0=_0x5cc702[_0x59060f(0xff)](_0x59060f(0x106))[_0x59060f(0xfc)]()||_0x5cc702[_0x59060f(0x113)][0x0]?.[_0x59060f(0xfc)](),_0x2b72a2=_0x5cc702['str']('env')||undefined,_0x4e46ad=_0x5cc702['str'](_0x59060f(0x101))||undefined;if(_0x5cc702[_0x59060f(0x107)]){if(!_0x412bf0)throw CliErrors[_0x59060f(0x103)]('Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','Usage:\x20'+CLI_BIN_NAME+_0x59060f(0xfa));await _0x2fcb3b({'projectCode':_0x412bf0,'appCode':_0x4e46ad,'env':_0x2b72a2,'cookie':_0x5cc702['cookie'],'nonInteractive':!![]});}else await _0x2fcb3b({'projectCode':_0x412bf0,'appCode':_0x4e46ad,'env':_0x2b72a2,'cookie':_0x5cc702[_0x59060f(0xfd)]});return{'ok':!![]};}},{'service':'project','command':a176_0x45b091(0xfb),'description':'Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x31aaef){const _0x5dbcf3=a176_0x45b091;return await upgradeApp(_0x31aaef['nonInteractive'],{'yes':_0x31aaef['bool'](_0x5dbcf3(0x10e))}),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a169_0x3ffaef=a169_0x5e4c;(function(_0x136d7d,_0xce1064){const _0x105b26=a169_0x5e4c,_0x2b0b69=_0x136d7d();while(!![]){try{const _0x20a476=parseInt(_0x105b26(0xf4))/0x1*(-parseInt(_0x105b26(0xfc))/0x2)+-parseInt(_0x105b26(0xc7))/0x3*(-parseInt(_0x105b26(0xae))/0x4)+-parseInt(_0x105b26(0xca))/0x5*(parseInt(_0x105b26(0xd1))/0x6)+-parseInt(_0x105b26(0xb6))/0x7*(parseInt(_0x105b26(0xee))/0x8)+-parseInt(_0x105b26(0x100))/0x9*(parseInt(_0x105b26(0xf3))/0xa)+parseInt(_0x105b26(0xc1))/0xb*(parseInt(_0x105b26(0xb7))/0xc)+parseInt(_0x105b26(0xbe))/0xd;if(_0x20a476===_0xce1064)break;else _0x2b0b69['push'](_0x2b0b69['shift']());}catch(_0x396b7b){_0x2b0b69['push'](_0x2b0b69['shift']());}}}(a169_0x26ba,0xe5443));import a169_0x2b3bf2 from'chalk';import a169_0x131d9b 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[a169_0x3ffaef(0xe9)](_0x2ead05=>_0x2ead05!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x38b78e){const _0x23504d=a169_0x3ffaef,_0x5da521=[];for(const _0x11cf96 of Object[_0x23504d(0xaa)](CORE_IDE_CONFIGS)){if(_0x11cf96[_0x23504d(0xa6)])for(const _0x41ee09 of _0x11cf96[_0x23504d(0xa6)]){_0x5da521['push'](resolve(_0x38b78e,_0x41ee09[_0x23504d(0x10a)]));}}return _0x5da521;}function analyse(_0x331986){const _0xb1ee1=a169_0x3ffaef;let _0x14f6c2=null;const _0x58c926=resolve(_0x331986,NEW_CONFIG_NAME),_0x3c13a7=existsSync(_0x58c926);for(const _0x14308c of LEGACY_CONFIG_NAMES){const _0x560de2=resolve(_0x331986,_0x14308c);if(existsSync(_0x560de2)){const _0x2a5b3b=readConfigFile(_0x560de2),_0x45fdf4=Object[_0xb1ee1(0xe7)](_0x2a5b3b)[_0xb1ee1(0xe9)](_0x2191b9=>typeof _0x2a5b3b[_0x2191b9]!=='undefined');_0x14f6c2={'oldPath':_0x560de2,'hasNewConfig':_0x3c13a7,'fields':_0x45fdf4};break;}}const _0x2fafe9=[],_0x5f099f=resolve(_0x331986,_0xb1ee1(0xb0));if(existsSync(_0x5f099f))_0x2fafe9['push'](_0x5f099f);const _0x34c847=resolve(_0x331986,_0xb1ee1(0xef));if(existsSync(_0x34c847))_0x2fafe9[_0xb1ee1(0x11a)](_0x34c847);const _0x32e5c8=resolve(_0x331986,_0xb1ee1(0xff));if(existsSync(_0x32e5c8))_0x2fafe9[_0xb1ee1(0x11a)](_0x32e5c8);for(const _0x96f930 of collectIdeSkillFiles(_0x331986)){if(existsSync(_0x96f930))_0x2fafe9[_0xb1ee1(0x11a)](_0x96f930);}let _0x1d62ad=null;const _0x2da2d0=resolve(_0x331986,_0xb1ee1(0xeb));if(existsSync(_0x2da2d0))try{const _0x12cd86=JSON['parse'](readFileSync(_0x2da2d0,_0xb1ee1(0xfa)));if(_0x12cd86?.[_0xb1ee1(0xc8)]&&typeof _0x12cd86[_0xb1ee1(0xc8)]===_0xb1ee1(0x11c)){const _0x262782=[];for(const [_0x37cdea,_0x35a2a1]of Object['entries'](_0x12cd86[_0xb1ee1(0xc8)])){const _0x1be9c7=_0x35a2a1;_0x1be9c7?.[_0xb1ee1(0xf5)]&&Array[_0xb1ee1(0xcf)](_0x1be9c7['args'])&&_0x1be9c7[_0xb1ee1(0xf5)][_0xb1ee1(0xbc)](_0xd150ff=>typeof _0xd150ff===_0xb1ee1(0x114)&&_0xd150ff[_0xb1ee1(0x104)](_0xb1ee1(0xf1)))&&_0x262782['push'](_0x37cdea);}_0x262782[_0xb1ee1(0xe4)]>0x0&&(_0x1d62ad={'path':_0x2da2d0,'keys':_0x262782});}}catch{}const _0x55ac45=_0x2fafe9[_0xb1ee1(0xe4)]>0x0||_0x14f6c2!==null;let _0x1bd0ff=null;const _0x31c466=resolve(_0x331986,_0xb1ee1(0xdd));if(existsSync(_0x31c466))try{const _0x56840e=JSON[_0xb1ee1(0x11b)](readFileSync(_0x31c466,_0xb1ee1(0xfa)));for(const _0x58c59d of[_0xb1ee1(0xd6),_0xb1ee1(0xe2)]){const _0x59eeab=_0x56840e?.[_0x58c59d]?.['@lovrabet/sdk'];if(typeof _0x59eeab===_0xb1ee1(0x114)){_0x59eeab!==_0xb1ee1(0x103)&&(_0x1bd0ff={'pkgPath':_0x31c466,'currentVersion':_0x59eeab,'field':_0x58c59d});break;}}}catch{}return{'configMigration':_0x14f6c2,'oldArtifacts':_0x2fafe9,'oldMcpConfig':_0x1d62ad,'needsSkillSwap':_0x55ac45,'sdkUpgrade':_0x1bd0ff};}function printReport(_0x677647){const _0x161686=a169_0x3ffaef,{configMigration:_0x3c620c,oldArtifacts:_0x5da21e,oldMcpConfig:_0x1d526b,needsSkillSwap:_0x57b10a}=_0x677647;console[_0x161686(0x118)](''),console[_0x161686(0x118)](a169_0x2b3bf2[_0x161686(0x11d)](_0x161686(0xec))),console[_0x161686(0x118)]('');_0x3c620c?(console[_0x161686(0x118)](a169_0x2b3bf2['cyan']('Config\x20file:')+('\x20\x20'+a169_0x2b3bf2['yellow'](_0x3c620c[_0x161686(0xab)]))),console[_0x161686(0x118)](_0x161686(0xf9)+(_0x3c620c[_0x161686(0xbf)]?a169_0x2b3bf2[_0x161686(0x122)](_0x161686(0x102)):a169_0x2b3bf2[_0x161686(0xcc)](_0x161686(0xb2)))),console[_0x161686(0x118)]('\x20\x20Fields\x20to\x20migrate:\x20'+_0x3c620c[_0x161686(0x120)][_0x161686(0x115)](',\x20')),console[_0x161686(0x118)](_0x161686(0xda))):console[_0x161686(0x118)](a169_0x2b3bf2['cyan']('Config\x20file:')+'\x20\x20'+a169_0x2b3bf2[_0x161686(0xcc)](_0x161686(0x109)));console['log']('');if(_0x5da21e[_0x161686(0xe4)]>0x0){console[_0x161686(0x118)](a169_0x2b3bf2[_0x161686(0xb8)](_0x161686(0x123)));for(const _0x5676f of _0x5da21e){console['log']('\x20\x20'+a169_0x2b3bf2[_0x161686(0x10e)]('FOUND')+'\x20\x20'+_0x5676f);}console[_0x161686(0x118)](_0x161686(0xc6));}else console[_0x161686(0x118)](a169_0x2b3bf2[_0x161686(0xb8)]('Legacy\x20artifacts:')+'\x20\x20'+a169_0x2b3bf2[_0x161686(0xcc)](_0x161686(0xdc)));console['log']('');_0x1d526b?(console['log'](a169_0x2b3bf2[_0x161686(0xb8)](_0x161686(0x11f))+('\x20\x20'+a169_0x2b3bf2['yellow'](_0x1d526b[_0x161686(0x10a)])+_0x161686(0xe3)+_0x1d526b['keys']['join'](',\x20'))),console['log']('\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server')):console['log'](a169_0x2b3bf2['cyan'](_0x161686(0x11f))+'\x20\x20'+a169_0x2b3bf2[_0x161686(0xcc)]('no\x20legacy\x20entry'));console[_0x161686(0x118)](''),console[_0x161686(0x118)](a169_0x2b3bf2[_0x161686(0xb8)](_0x161686(0x10b))+('\x20\x20'+(_0x57b10a?a169_0x2b3bf2[_0x161686(0x119)]('needed'):a169_0x2b3bf2[_0x161686(0x122)](_0x161686(0x121)))));_0x57b10a&&console['log'](_0x161686(0xa2)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x161686(0x118)]('');if(_0x677647[_0x161686(0xcb)]){const {currentVersion:_0x2d06d9,field:_0x1f2e9b,pkgPath:_0x570a6f}=_0x677647['sdkUpgrade'];console[_0x161686(0x118)](a169_0x2b3bf2[_0x161686(0xb8)](_0x161686(0xf6))+('\x20\x20'+a169_0x2b3bf2['yellow'](_0x570a6f))),console[_0x161686(0x118)]('\x20\x20Current\x20version\x20in\x20'+_0x1f2e9b+':\x20'+a169_0x2b3bf2[_0x161686(0x119)](_0x2d06d9)+_0x161686(0xd9)+a169_0x2b3bf2[_0x161686(0x122)](_0x161686(0x103))),console['log']('\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)');}else console[_0x161686(0x118)](a169_0x2b3bf2[_0x161686(0xb8)](_0x161686(0xf6))+'\x20\x20'+a169_0x2b3bf2[_0x161686(0xcc)](_0x161686(0xb1)));console[_0x161686(0x118)]('');}function execConfigMigration(_0x25c6d9,_0x760b97){const _0x1173ef=a169_0x3ffaef,{configMigration:_0x260367}=_0x25c6d9;if(!_0x260367?.[_0x1173ef(0xab)])return{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x1173ef(0x101)};const _0xb11899=readConfigFile(_0x260367['oldPath']),_0x4329ba=resolve(_0x760b97,NEW_CONFIG_NAME),_0x4d88e1=_0x260367[_0x1173ef(0xbf)]?readConfigFile(_0x4329ba):{};for(const [_0x5492ed,_0x9fd231]of Object['entries'](_0xb11899)){!(_0x5492ed in _0x4d88e1)&&(_0x4d88e1[_0x5492ed]=_0x9fd231);}writeConfigFile(_0x4329ba,_0x4d88e1);const _0x147502=_0x260367[_0x1173ef(0xab)]+'.bak';return renameSync(_0x260367['oldPath'],_0x147502),{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x260367['oldPath']+_0x1173ef(0xd9)+_0x4329ba+_0x1173ef(0x10c)+_0x147502+')'};}function a169_0x26ba(){const _0x2e524d=['error','start','keys','step','filter','oldArtifacts','.cursor/mcp.json','===\x20Upgrade\x20Analysis\x20===','lovrabet/lovrabet-skill\x20removed','52328pRruZM','.cursor/rules/lovrabet_rules.mdc','FAIL','@lovrabet/dataset-mcp-server','oldMcpConfig','110dsBPQx','72031YCgZSR','args','@lovrabet/sdk:','removed\x20','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','\x20\x20New\x20config\x20(.rabetbase.json):\x20','utf8','Clean\x20MCP\x20config','6VjoRWc','Remove\x20.lovrabet/','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','.claude/skills/lovrabet','817479Jkmipe','skipped\x20(no\x20legacy\x20config)','already\x20exists\x20(will\x20merge)','latest','includes','exit\x20','succeed','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','Remove\x20old\x20skill','no\x20legacy\x20config\x20found','path','Skill\x20swap:','\x20(backup:\x20','\x20\x20npm\x20install','red','Upgrade\x20completed\x20successfully!','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','lovrabet/rabetbase\x20installed\x20globally','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','\x20\x20Step\x20','string','join','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','\x20\x20\x20\x20\x20\x20\x20','log','yellow','push','parse','object','bold','entries','MCP\x20config:','fields','not\x20needed','green','Legacy\x20artifacts:','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','\x20from\x20','message','@lovrabet/sdk','files','detail','Upgrade\x20@lovrabet/sdk','Install\x20new\x20skill','values','oldPath','Step\x206/7:\x20Installing\x20new\x20skill...','no\x20matching\x20entry\x20found','90112eHKjsd','white','.lovrabet','not\x20found\x20or\x20already\x20at\x20latest','not\x20found\x20(will\x20create)','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','skipped','stringify','1925VpMTIi','23508IpQywq','cyan','\x20removed\x20(','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','some','\x20\x20#\x20or','41740114hTXoWU','hasNewConfig','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','3652MKYYnx','info','Proceed\x20with\x20upgrade?','[\x22@lovrabet/sdk\x22]:\x20','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','\x20\x20Action:\x20delete','192axoNXg','mcpServers','fail','90pJnZBg','sdkUpgrade','gray','failed','Step\x205/7:\x20Removing\x20old\x20skill...','isArray','done','449958atHcPF','needsSkillSwap','Step\x201/7:\x20Config\x20migration\x20—\x20','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','isDirectory','dependencies','cwd','status','\x20→\x20','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','lovrabet/rabetbase','none\x20found','package.json','configMigration','Step\x201/7:\x20Migrating\x20config...','\x20\x20bun\x20install','===\x20Upgrade\x20Summary\x20===','devDependencies','\x20→\x20keys:\x20','length'];a169_0x26ba=function(){return _0x2e524d;};return a169_0x26ba();}function execRemoveOldArtifacts(_0x43da46){const _0x193640=a169_0x3ffaef,_0x4bec4d=[];for(const _0x2d66df of _0x43da46){try{if(!existsSync(_0x2d66df))continue;const _0x5e62b0=tryStat(_0x2d66df);_0x5e62b0?.[_0x193640(0xd5)]()?rmSync(_0x2d66df,{'recursive':!![],'force':!![]}):unlinkSync(_0x2d66df);}catch(_0x14dfa8){_0x4bec4d['push'](_0x2d66df+':\x20'+_0x14dfa8['message']);}}return{'step':0x3,'label':'Remove\x20legacy\x20artifacts','ok':_0x4bec4d[_0x193640(0xe4)]===0x0,'detail':_0x4bec4d[_0x193640(0xe4)]>0x0?_0x43da46[_0x193640(0xe4)]-_0x4bec4d['length']+'/'+_0x43da46[_0x193640(0xe4)]+_0x193640(0xb9)+_0x4bec4d[_0x193640(0x115)](';\x20')+')':_0x43da46[_0x193640(0xe4)]+'\x20removed'};}function execCleanMcp(_0x8397c8){const _0xab1d4b=a169_0x3ffaef;if(!_0x8397c8[_0xab1d4b(0xf2)])return{'step':0x4,'label':_0xab1d4b(0xfb),'ok':!![],'detail':'skipped'};try{const _0x221540=readFileSync(_0x8397c8[_0xab1d4b(0xf2)][_0xab1d4b(0x10a)],_0xab1d4b(0xfa)),_0x14af5e=JSON['parse'](_0x221540);if(_0x14af5e?.[_0xab1d4b(0xc8)]&&typeof _0x14af5e[_0xab1d4b(0xc8)]===_0xab1d4b(0x11c)){const _0x342ae3=[];for(const [_0x5cb192,_0x167e1d]of Object[_0xab1d4b(0x11e)](_0x14af5e[_0xab1d4b(0xc8)])){_0x167e1d?.['args']&&Array[_0xab1d4b(0xcf)](_0x167e1d['args'])&&_0x167e1d[_0xab1d4b(0xf5)][_0xab1d4b(0xbc)](_0x54b31e=>typeof _0x54b31e===_0xab1d4b(0x114)&&_0x54b31e['includes']('@lovrabet/dataset-mcp-server'))&&_0x342ae3[_0xab1d4b(0x11a)](_0x5cb192);}for(const _0x5e91c5 of _0x342ae3){delete _0x14af5e[_0xab1d4b(0xc8)][_0x5e91c5];}return _0x342ae3[_0xab1d4b(0xe4)]>0x0&&writeFileSync(_0x8397c8['oldMcpConfig'][_0xab1d4b(0x10a)],JSON['stringify'](_0x14af5e,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':_0xab1d4b(0xfb),'ok':!![],'detail':_0xab1d4b(0xf7)+_0x342ae3[_0xab1d4b(0x115)](',\x20')+_0xab1d4b(0xa3)+_0x8397c8[_0xab1d4b(0xf2)]['path']};}return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0xab1d4b(0xad)};}catch(_0xa3b1e4){return{'step':0x4,'label':_0xab1d4b(0xfb),'ok':![],'detail':_0xa3b1e4[_0xab1d4b(0xa4)]};}}function execSkillsRemove(_0x5eb5e5,_0x4f9286){const _0x3f2491=a169_0x3ffaef,_0x5eab88=runNpxSkillsRemove(_0x5eb5e5,{'stdio':'inherit','yes':_0x4f9286});return{'step':0x5,'label':_0x3f2491(0x108),'ok':_0x5eab88['ok'],'detail':_0x5eab88['ok']?_0x3f2491(0xed):_0x5eab88[_0x3f2491(0xe5)]??'exit\x20'+_0x5eab88[_0x3f2491(0xd8)]};}function execSkillsAdd(_0x7f37bb,_0x4739a5){const _0x22f30c=a169_0x3ffaef,_0x387a74=runNpxSkillsAddGlobal(_0x7f37bb,_0x22f30c(0xdb),{'stdio':'inherit','yes':_0x4739a5});return{'step':0x6,'label':_0x22f30c(0xa9),'ok':_0x387a74['ok'],'detail':_0x387a74['ok']?_0x22f30c(0x111):_0x387a74[_0x22f30c(0xe5)]??_0x22f30c(0x105)+_0x387a74[_0x22f30c(0xd8)]};}function execUpgradeSdk(_0x857fdf){const _0x59b7e3=a169_0x3ffaef;if(!_0x857fdf['sdkUpgrade'])return{'step':0x7,'label':_0x59b7e3(0xa8),'ok':!![],'detail':_0x59b7e3(0xb3)};const {pkgPath:_0x277bca,currentVersion:_0x3f4720,field:_0x164535}=_0x857fdf['sdkUpgrade'];try{const _0x13afe6=readFileSync(_0x277bca,'utf8'),_0x3c941c=JSON[_0x59b7e3(0x11b)](_0x13afe6);return _0x3c941c[_0x164535][_0x59b7e3(0xa5)]=_0x59b7e3(0x103),writeFileSync(_0x277bca,JSON[_0x59b7e3(0xb5)](_0x3c941c,null,0x2)+'\x0a',_0x59b7e3(0xfa)),{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0x164535+_0x59b7e3(0xc4)+_0x3f4720+'\x20→\x20latest'};}catch(_0x26c7d3){return{'step':0x7,'label':_0x59b7e3(0xa8),'ok':![],'detail':_0x26c7d3['message']};}}function tryStat(_0x5d7efc){try{return statSync(_0x5d7efc);}catch{return undefined;}}function printSummary(_0x159ff9){const _0x3bc95f=a169_0x3ffaef;console[_0x3bc95f(0x118)](''),console['log'](a169_0x2b3bf2[_0x3bc95f(0x11d)](_0x3bc95f(0xe1))),console[_0x3bc95f(0x118)]('');for(const _0x8099c2 of _0x159ff9){const _0x453c3c=_0x8099c2['ok']?a169_0x2b3bf2['green']('OK'):a169_0x2b3bf2[_0x3bc95f(0x10e)](_0x3bc95f(0xf0));console[_0x3bc95f(0x118)]('\x20\x20'+_0x453c3c+_0x3bc95f(0x113)+_0x8099c2[_0x3bc95f(0xe8)]+':\x20'+_0x8099c2['label']);if(_0x8099c2['detail'])console[_0x3bc95f(0x118)](_0x3bc95f(0x117)+a169_0x2b3bf2[_0x3bc95f(0xcc)](_0x8099c2[_0x3bc95f(0xa7)]));}console['log']('');}function a169_0x5e4c(_0x594488,_0x1707c9){_0x594488=_0x594488-0xa2;const _0x26ba7c=a169_0x26ba();let _0x5e4c77=_0x26ba7c[_0x594488];return _0x5e4c77;}export async function upgradeApp(_0x10813e,_0x5969ae){const _0x4e20fc=a169_0x3ffaef,_0x475149=process[_0x4e20fc(0xd7)](),_0x551ccd=analyse(_0x475149),_0x460165=!_0x551ccd[_0x4e20fc(0xde)]&&_0x551ccd[_0x4e20fc(0xea)][_0x4e20fc(0xe4)]===0x0&&!_0x551ccd['oldMcpConfig']&&!_0x551ccd[_0x4e20fc(0xd2)]&&!_0x551ccd[_0x4e20fc(0xcb)];if(_0x460165){console[_0x4e20fc(0x118)](a169_0x2b3bf2[_0x4e20fc(0x122)](_0x4e20fc(0xbb)));return;}printReport(_0x551ccd);const _0x1c12cf=!!(_0x5969ae['yes']||_0x5969ae['Y']||_0x10813e);if(!_0x1c12cf)try{const _0x1e1e74=await askConfirm(_0x4e20fc(0xc3));if(!_0x1e1e74){console[_0x4e20fc(0x118)](a169_0x2b3bf2[_0x4e20fc(0xcc)]('Upgrade\x20cancelled.'));return;}}catch(_0x382bfb){if(_0x382bfb?.[_0x4e20fc(0xa4)]==='CANCEL'){console[_0x4e20fc(0x118)](a169_0x2b3bf2[_0x4e20fc(0xcc)]('Upgrade\x20cancelled.'));return;}throw _0x382bfb;}const _0x28e3ef=[],_0x55e32c=a169_0x131d9b({'text':_0x4e20fc(0xdf),'color':_0x4e20fc(0xb8)})[_0x4e20fc(0xe6)](),_0x2483b1=execConfigMigration(_0x551ccd,_0x475149);_0x28e3ef[_0x4e20fc(0x11a)](_0x2483b1),_0x55e32c[_0x2483b1['ok']?_0x4e20fc(0x106):_0x4e20fc(0xc9)](_0x4e20fc(0xd3)+(_0x2483b1[_0x4e20fc(0xa7)]??(_0x2483b1['ok']?_0x4e20fc(0xd0):_0x4e20fc(0xcd))));const _0x8d3a63=resolve(_0x475149,'.lovrabet'),_0x577da0=a169_0x131d9b({'text':_0x4e20fc(0x116),'color':'cyan'})[_0x4e20fc(0xe6)]();if(existsSync(_0x8d3a63))try{rmSync(_0x8d3a63,{'recursive':!![],'force':!![]}),_0x577da0[_0x4e20fc(0x106)](_0x4e20fc(0x112)),_0x28e3ef[_0x4e20fc(0x11a)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0x153ef7){_0x577da0['fail'](_0x4e20fc(0xd4)+_0x153ef7[_0x4e20fc(0xa4)]),_0x28e3ef[_0x4e20fc(0x11a)]({'step':0x2,'label':_0x4e20fc(0xfd),'ok':![],'detail':_0x153ef7[_0x4e20fc(0xa4)]});}else _0x577da0[_0x4e20fc(0xc2)](_0x4e20fc(0x110)),_0x28e3ef[_0x4e20fc(0x11a)]({'step':0x2,'label':_0x4e20fc(0xfd),'ok':!![],'detail':_0x4e20fc(0xb4)});const _0x49e50b=a169_0x131d9b({'text':'Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','color':_0x4e20fc(0xb8)})[_0x4e20fc(0xe6)](),_0x2c2e41=execRemoveOldArtifacts(_0x551ccd[_0x4e20fc(0xea)]);_0x28e3ef['push'](_0x2c2e41),_0x49e50b[_0x2c2e41['ok']?'succeed':_0x4e20fc(0xc9)]('Step\x203/7:\x20Legacy\x20artifacts\x20—\x20'+(_0x2c2e41[_0x4e20fc(0xa7)]??(_0x2c2e41['ok']?_0x4e20fc(0xd0):'failed')));const _0x5f4ecb=a169_0x131d9b({'text':'Step\x204/7:\x20Cleaning\x20MCP\x20config...','color':_0x4e20fc(0xb8)})[_0x4e20fc(0xe6)](),_0x216b9c=execCleanMcp(_0x551ccd);_0x28e3ef[_0x4e20fc(0x11a)](_0x216b9c),_0x5f4ecb[_0x216b9c['ok']?_0x4e20fc(0x106):_0x4e20fc(0xc9)]('Step\x204/7:\x20MCP\x20config\x20—\x20'+(_0x216b9c[_0x4e20fc(0xa7)]??(_0x216b9c['ok']?_0x4e20fc(0xd0):_0x4e20fc(0xcd))));const _0x563302=a169_0x131d9b({'text':_0x4e20fc(0xce),'color':'cyan'})[_0x4e20fc(0xe6)](),_0x3799c5=execSkillsRemove(_0x475149,_0x1c12cf);_0x28e3ef[_0x4e20fc(0x11a)](_0x3799c5),_0x563302[_0x3799c5['ok']?_0x4e20fc(0x106):_0x4e20fc(0xc9)]('Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20'+(_0x3799c5[_0x4e20fc(0xa7)]??(_0x3799c5['ok']?_0x4e20fc(0xd0):'failed')));const _0x1945cd=a169_0x131d9b({'text':_0x4e20fc(0xac),'color':'cyan'})['start'](),_0x164ef6=execSkillsAdd(_0x475149,_0x1c12cf);_0x28e3ef[_0x4e20fc(0x11a)](_0x164ef6),_0x1945cd[_0x164ef6['ok']?_0x4e20fc(0x106):_0x4e20fc(0xc9)](_0x4e20fc(0xf8)+(_0x164ef6[_0x4e20fc(0xa7)]??(_0x164ef6['ok']?_0x4e20fc(0xd0):_0x4e20fc(0xcd))));const _0xfea5c2=a169_0x131d9b({'text':_0x4e20fc(0xba),'color':'cyan'})[_0x4e20fc(0xe6)](),_0x2bc2ee=execUpgradeSdk(_0x551ccd);_0x28e3ef[_0x4e20fc(0x11a)](_0x2bc2ee),_0xfea5c2[_0x2bc2ee['ok']?_0x4e20fc(0x106):_0x4e20fc(0xc9)](_0x4e20fc(0xc0)+(_0x2bc2ee[_0x4e20fc(0xa7)]??(_0x2bc2ee['ok']?'done':_0x4e20fc(0xcd)))),printSummary(_0x28e3ef);const _0x3c1a73=_0x28e3ef[_0x4e20fc(0xbc)](_0x359358=>!_0x359358['ok']);_0x3c1a73?console['log'](a169_0x2b3bf2[_0x4e20fc(0x119)](_0x4e20fc(0xfe))):console[_0x4e20fc(0x118)](a169_0x2b3bf2[_0x4e20fc(0x122)](_0x4e20fc(0x10f))),_0x2bc2ee['ok']&&_0x551ccd[_0x4e20fc(0xcb)]&&(console['log'](''),console['log'](a169_0x2b3bf2[_0x4e20fc(0x11d)][_0x4e20fc(0xb8)](_0x4e20fc(0xc5))),console[_0x4e20fc(0x118)](a169_0x2b3bf2[_0x4e20fc(0xb8)](_0x4e20fc(0x107))),console[_0x4e20fc(0x118)](''),console[_0x4e20fc(0x118)](a169_0x2b3bf2[_0x4e20fc(0xaf)](_0x4e20fc(0x10d))),console[_0x4e20fc(0x118)](a169_0x2b3bf2['white'](_0x4e20fc(0xbd))),console[_0x4e20fc(0x118)](a169_0x2b3bf2[_0x4e20fc(0xaf)](_0x4e20fc(0xe0))),console['log'](''));}
1
+ const a177_0x3857b3=a177_0x577b;(function(_0xe15af8,_0x4cee51){const _0x354aa4=a177_0x577b,_0x1f36f4=_0xe15af8();while(!![]){try{const _0x321157=parseInt(_0x354aa4(0xbd))/0x1*(parseInt(_0x354aa4(0x117))/0x2)+parseInt(_0x354aa4(0x101))/0x3*(-parseInt(_0x354aa4(0xba))/0x4)+parseInt(_0x354aa4(0x10f))/0x5+parseInt(_0x354aa4(0xbf))/0x6+-parseInt(_0x354aa4(0xb4))/0x7+parseInt(_0x354aa4(0xe1))/0x8*(-parseInt(_0x354aa4(0xee))/0x9)+parseInt(_0x354aa4(0xfb))/0xa*(parseInt(_0x354aa4(0xbc))/0xb);if(_0x321157===_0x4cee51)break;else _0x1f36f4['push'](_0x1f36f4['shift']());}catch(_0x392b70){_0x1f36f4['push'](_0x1f36f4['shift']());}}}(a177_0x593d,0x3f395));import a177_0x3b781c from'chalk';import a177_0x8b40ee 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[a177_0x3857b3(0xe3)](_0x148587=>_0x148587!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x363975){const _0x33d927=a177_0x3857b3,_0x224e51=[];for(const _0x2dbbca of Object[_0x33d927(0xf9)](CORE_IDE_CONFIGS)){if(_0x2dbbca[_0x33d927(0x11b)])for(const _0x52f072 of _0x2dbbca[_0x33d927(0x11b)]){_0x224e51[_0x33d927(0x128)](resolve(_0x363975,_0x52f072[_0x33d927(0xd3)]));}}return _0x224e51;}function analyse(_0x3c713e){const _0x220699=a177_0x3857b3;let _0x41b4e7=null;const _0x1cdb61=resolve(_0x3c713e,NEW_CONFIG_NAME),_0x1d2aae=existsSync(_0x1cdb61);for(const _0x5385fd of LEGACY_CONFIG_NAMES){const _0x1057a5=resolve(_0x3c713e,_0x5385fd);if(existsSync(_0x1057a5)){const _0x3c46ee=readConfigFile(_0x1057a5),_0x2ba635=Object[_0x220699(0xb3)](_0x3c46ee)['filter'](_0x4c92fa=>typeof _0x3c46ee[_0x4c92fa]!==_0x220699(0x129));_0x41b4e7={'oldPath':_0x1057a5,'hasNewConfig':_0x1d2aae,'fields':_0x2ba635};break;}}const _0x45362d=[],_0xd4be00=resolve(_0x3c713e,'.lovrabet');if(existsSync(_0xd4be00))_0x45362d[_0x220699(0x128)](_0xd4be00);const _0x169436=resolve(_0x3c713e,_0x220699(0x120));if(existsSync(_0x169436))_0x45362d[_0x220699(0x128)](_0x169436);const _0x558acf=resolve(_0x3c713e,_0x220699(0xdc));if(existsSync(_0x558acf))_0x45362d[_0x220699(0x128)](_0x558acf);for(const _0x5c852d of collectIdeSkillFiles(_0x3c713e)){if(existsSync(_0x5c852d))_0x45362d[_0x220699(0x128)](_0x5c852d);}let _0x17c0d0=null;const _0x5bb362=resolve(_0x3c713e,_0x220699(0xd9));if(existsSync(_0x5bb362))try{const _0x8b0f74=JSON[_0x220699(0xc0)](readFileSync(_0x5bb362,_0x220699(0xfe)));if(_0x8b0f74?.[_0x220699(0xd1)]&&typeof _0x8b0f74['mcpServers']===_0x220699(0xd6)){const _0x29797e=[];for(const [_0x22ed54,_0x346574]of Object[_0x220699(0x105)](_0x8b0f74[_0x220699(0xd1)])){const _0x104943=_0x346574;_0x104943?.['args']&&Array['isArray'](_0x104943[_0x220699(0xfd)])&&_0x104943[_0x220699(0xfd)][_0x220699(0x112)](_0x24b6d7=>typeof _0x24b6d7===_0x220699(0xe5)&&_0x24b6d7[_0x220699(0x11c)]('@lovrabet/dataset-mcp-server'))&&_0x29797e[_0x220699(0x128)](_0x22ed54);}_0x29797e[_0x220699(0xf8)]>0x0&&(_0x17c0d0={'path':_0x5bb362,'keys':_0x29797e});}}catch{}const _0x21945b=_0x45362d[_0x220699(0xf8)]>0x0||_0x41b4e7!==null;let _0x27d0fd=null;const _0x3a818d=resolve(_0x3c713e,_0x220699(0xeb));if(existsSync(_0x3a818d))try{const _0x1b4bb0=JSON[_0x220699(0xc0)](readFileSync(_0x3a818d,_0x220699(0xfe)));for(const _0x1b0b6b of[_0x220699(0xb2),_0x220699(0xf1)]){const _0x5b6fe4=_0x1b4bb0?.[_0x1b0b6b]?.[_0x220699(0x104)];if(typeof _0x5b6fe4===_0x220699(0xe5)){_0x5b6fe4!==_0x220699(0xde)&&(_0x27d0fd={'pkgPath':_0x3a818d,'currentVersion':_0x5b6fe4,'field':_0x1b0b6b});break;}}}catch{}return{'configMigration':_0x41b4e7,'oldArtifacts':_0x45362d,'oldMcpConfig':_0x17c0d0,'needsSkillSwap':_0x21945b,'sdkUpgrade':_0x27d0fd};}function printReport(_0x38d24a){const _0x28864c=a177_0x3857b3,{configMigration:_0x446384,oldArtifacts:_0x46ef1c,oldMcpConfig:_0x5802ae,needsSkillSwap:_0x20e9fc}=_0x38d24a;console[_0x28864c(0x12f)](''),console[_0x28864c(0x12f)](a177_0x3b781c[_0x28864c(0xf6)]('===\x20Upgrade\x20Analysis\x20===')),console['log']('');_0x446384?(console[_0x28864c(0x12f)](a177_0x3b781c[_0x28864c(0x12d)](_0x28864c(0x11d))+('\x20\x20'+a177_0x3b781c[_0x28864c(0x118)](_0x446384[_0x28864c(0x115)]))),console[_0x28864c(0x12f)]('\x20\x20New\x20config\x20(.rabetbase.json):\x20'+(_0x446384[_0x28864c(0x106)]?a177_0x3b781c['green'](_0x28864c(0xcd)):a177_0x3b781c['gray'](_0x28864c(0xd7)))),console[_0x28864c(0x12f)](_0x28864c(0x10b)+_0x446384['fields'][_0x28864c(0xbb)](',\x20')),console['log']('\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak')):console[_0x28864c(0x12f)](a177_0x3b781c[_0x28864c(0x12d)](_0x28864c(0x11d))+'\x20\x20'+a177_0x3b781c[_0x28864c(0xb6)](_0x28864c(0xc6)));console['log']('');if(_0x46ef1c[_0x28864c(0xf8)]>0x0){console['log'](a177_0x3b781c[_0x28864c(0x12d)](_0x28864c(0x110)));for(const _0x5c6118 of _0x46ef1c){console['log']('\x20\x20'+a177_0x3b781c[_0x28864c(0xe6)](_0x28864c(0x119))+'\x20\x20'+_0x5c6118);}console[_0x28864c(0x12f)]('\x20\x20Action:\x20delete');}else console['log'](a177_0x3b781c[_0x28864c(0x12d)](_0x28864c(0x110))+'\x20\x20'+a177_0x3b781c[_0x28864c(0xb6)]('none\x20found'));console[_0x28864c(0x12f)]('');_0x5802ae?(console[_0x28864c(0x12f)](a177_0x3b781c[_0x28864c(0x12d)](_0x28864c(0x123))+('\x20\x20'+a177_0x3b781c[_0x28864c(0x118)](_0x5802ae[_0x28864c(0xd3)])+_0x28864c(0xed)+_0x5802ae[_0x28864c(0xb3)][_0x28864c(0xbb)](',\x20'))),console[_0x28864c(0x12f)](_0x28864c(0x10c))):console['log'](a177_0x3b781c[_0x28864c(0x12d)](_0x28864c(0x123))+'\x20\x20'+a177_0x3b781c[_0x28864c(0xb6)](_0x28864c(0xcf)));console[_0x28864c(0x12f)](''),console[_0x28864c(0x12f)](a177_0x3b781c[_0x28864c(0x12d)]('Skill\x20swap:')+('\x20\x20'+(_0x20e9fc?a177_0x3b781c[_0x28864c(0x118)]('needed'):a177_0x3b781c['green'](_0x28864c(0x107)))));_0x20e9fc&&console[_0x28864c(0x12f)]('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x28864c(0x12f)]('');if(_0x38d24a['sdkUpgrade']){const {currentVersion:_0x5c1529,field:_0x436eab,pkgPath:_0x298b0c}=_0x38d24a[_0x28864c(0xe7)];console['log'](a177_0x3b781c['cyan'](_0x28864c(0xe8))+('\x20\x20'+a177_0x3b781c[_0x28864c(0x118)](_0x298b0c))),console['log']('\x20\x20Current\x20version\x20in\x20'+_0x436eab+':\x20'+a177_0x3b781c[_0x28864c(0x118)](_0x5c1529)+_0x28864c(0x127)+a177_0x3b781c['green']('latest')),console['log'](_0x28864c(0x11e));}else console[_0x28864c(0x12f)](a177_0x3b781c['cyan'](_0x28864c(0xe8))+'\x20\x20'+a177_0x3b781c[_0x28864c(0xb6)](_0x28864c(0x10e)));console[_0x28864c(0x12f)]('');}function execConfigMigration(_0x3948b3,_0x382dbd){const _0x58a226=a177_0x3857b3,{configMigration:_0x3bed5c}=_0x3948b3;if(!_0x3bed5c?.[_0x58a226(0x115)])return{'step':0x1,'label':_0x58a226(0xd2),'ok':!![],'detail':_0x58a226(0xbe)};const _0xfacf26=readConfigFile(_0x3bed5c[_0x58a226(0x115)]),_0x23418f=resolve(_0x382dbd,NEW_CONFIG_NAME),_0x2dedca=_0x3bed5c[_0x58a226(0x106)]?readConfigFile(_0x23418f):{};for(const [_0x2f290a,_0x2be655]of Object[_0x58a226(0x105)](_0xfacf26)){!(_0x2f290a in _0x2dedca)&&(_0x2dedca[_0x2f290a]=_0x2be655);}writeConfigFile(_0x23418f,_0x2dedca);const _0x477282=_0x3bed5c['oldPath']+_0x58a226(0xd5);return renameSync(_0x3bed5c[_0x58a226(0x115)],_0x477282),{'step':0x1,'label':_0x58a226(0xd2),'ok':!![],'detail':_0x3bed5c['oldPath']+_0x58a226(0x127)+_0x23418f+_0x58a226(0x116)+_0x477282+')'};}function a177_0x593d(){const _0x32ae4a=['.lovrabet','.cursor/mcp.json','\x20removed\x20(','\x20\x20#\x20or','.claude/skills/lovrabet','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','latest','lovrabet/rabetbase\x20installed\x20globally','exit\x20','1982520JijBay','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','filter','oldMcpConfig','string','red','sdkUpgrade','@lovrabet/sdk:','oldArtifacts','message','package.json','step','\x20→\x20keys:\x20','9UcIOzr','white','failed','devDependencies','green','info','Clean\x20MCP\x20config','\x20from\x20','bold','Remove\x20old\x20skill','length','values','FAIL','9590nCQOft','\x20→\x20latest','args','utf8','stringify','lovrabet/lovrabet-skill\x20removed','9Qeuwgz','\x20\x20bun\x20install','Remove\x20.lovrabet/','@lovrabet/sdk','entries','hasNewConfig','not\x20needed','\x20\x20Step\x20','Remove\x20legacy\x20artifacts','isDirectory','\x20\x20Fields\x20to\x20migrate:\x20','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','not\x20found\x20or\x20already\x20at\x20latest','257580vlYoLh','Legacy\x20artifacts:','status','some','fail','start','oldPath','\x20(backup:\x20','13970AmUGgK','yellow','FOUND','Step\x201/7:\x20Config\x20migration\x20—\x20','files','includes','Config\x20file:','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','.cursor/rules/lovrabet_rules.mdc','succeed','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','MCP\x20config:','Step\x204/7:\x20MCP\x20config\x20—\x20','label','Upgrade\x20@lovrabet/sdk','\x20→\x20','push','undefined','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','Proceed\x20with\x20upgrade?','no\x20matching\x20entry\x20found','cyan','done','log','dependencies','keys','944643uhbwrn','Install\x20new\x20skill','gray','needsSkillSwap','skipped','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','663416tVIFuG','join','9053XuGxae','5JITevB','skipped\x20(no\x20legacy\x20config)','1581558JUYwsZ','parse','Step\x201/7:\x20Migrating\x20config...','configMigration','Upgrade\x20cancelled.','\x20removed','detail','no\x20legacy\x20config\x20found','Upgrade\x20completed\x20successfully!','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','\x20\x20npm\x20install','yes','error','inherit','already\x20exists\x20(will\x20merge)','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','no\x20legacy\x20entry','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','mcpServers','Config\x20migration','path','removed\x20','.bak','object','not\x20found\x20(will\x20create)'];a177_0x593d=function(){return _0x32ae4a;};return a177_0x593d();}function execRemoveOldArtifacts(_0x266666){const _0x1d5c42=a177_0x3857b3,_0x2b87ef=[];for(const _0x586765 of _0x266666){try{if(!existsSync(_0x586765))continue;const _0x558b7c=tryStat(_0x586765);_0x558b7c?.[_0x1d5c42(0x10a)]()?rmSync(_0x586765,{'recursive':!![],'force':!![]}):unlinkSync(_0x586765);}catch(_0x3908f9){_0x2b87ef['push'](_0x586765+':\x20'+_0x3908f9[_0x1d5c42(0xea)]);}}return{'step':0x3,'label':_0x1d5c42(0x109),'ok':_0x2b87ef[_0x1d5c42(0xf8)]===0x0,'detail':_0x2b87ef[_0x1d5c42(0xf8)]>0x0?_0x266666[_0x1d5c42(0xf8)]-_0x2b87ef['length']+'/'+_0x266666[_0x1d5c42(0xf8)]+_0x1d5c42(0xda)+_0x2b87ef['join'](';\x20')+')':_0x266666['length']+_0x1d5c42(0xc4)};}function execCleanMcp(_0x16ab23){const _0x1b88eb=a177_0x3857b3;if(!_0x16ab23[_0x1b88eb(0xe4)])return{'step':0x4,'label':_0x1b88eb(0xf4),'ok':!![],'detail':_0x1b88eb(0xb8)};try{const _0x793771=readFileSync(_0x16ab23['oldMcpConfig'][_0x1b88eb(0xd3)],_0x1b88eb(0xfe)),_0x2d9cbb=JSON[_0x1b88eb(0xc0)](_0x793771);if(_0x2d9cbb?.[_0x1b88eb(0xd1)]&&typeof _0x2d9cbb['mcpServers']===_0x1b88eb(0xd6)){const _0x3bcb92=[];for(const [_0x3791d6,_0x4eb583]of Object[_0x1b88eb(0x105)](_0x2d9cbb['mcpServers'])){_0x4eb583?.[_0x1b88eb(0xfd)]&&Array['isArray'](_0x4eb583['args'])&&_0x4eb583[_0x1b88eb(0xfd)][_0x1b88eb(0x112)](_0x2f13e8=>typeof _0x2f13e8==='string'&&_0x2f13e8[_0x1b88eb(0x11c)]('@lovrabet/dataset-mcp-server'))&&_0x3bcb92['push'](_0x3791d6);}for(const _0x14abe1 of _0x3bcb92){delete _0x2d9cbb['mcpServers'][_0x14abe1];}return _0x3bcb92['length']>0x0&&writeFileSync(_0x16ab23[_0x1b88eb(0xe4)][_0x1b88eb(0xd3)],JSON[_0x1b88eb(0xff)](_0x2d9cbb,null,0x2)+'\x0a',_0x1b88eb(0xfe)),{'step':0x4,'label':_0x1b88eb(0xf4),'ok':!![],'detail':_0x1b88eb(0xd4)+_0x3bcb92['join'](',\x20')+_0x1b88eb(0xf5)+_0x16ab23[_0x1b88eb(0xe4)][_0x1b88eb(0xd3)]};}return{'step':0x4,'label':_0x1b88eb(0xf4),'ok':!![],'detail':_0x1b88eb(0x12c)};}catch(_0x4a5b3d){return{'step':0x4,'label':_0x1b88eb(0xf4),'ok':![],'detail':_0x4a5b3d[_0x1b88eb(0xea)]};}}function execSkillsRemove(_0x4f637a,_0x3eee60){const _0x544e2e=a177_0x3857b3,_0x320ab7=runNpxSkillsRemove(_0x4f637a,{'stdio':_0x544e2e(0xcc),'yes':_0x3eee60});return{'step':0x5,'label':_0x544e2e(0xf7),'ok':_0x320ab7['ok'],'detail':_0x320ab7['ok']?_0x544e2e(0x100):_0x320ab7['error']??_0x544e2e(0xe0)+_0x320ab7[_0x544e2e(0x111)]};}function execSkillsAdd(_0x1a48bc,_0x72254e){const _0x463587=a177_0x3857b3,_0x3bbeb1=runNpxSkillsAddGlobal(_0x1a48bc,'lovrabet/rabetbase',{'stdio':_0x463587(0xcc),'yes':_0x72254e});return{'step':0x6,'label':_0x463587(0xb5),'ok':_0x3bbeb1['ok'],'detail':_0x3bbeb1['ok']?_0x463587(0xdf):_0x3bbeb1[_0x463587(0xcb)]??_0x463587(0xe0)+_0x3bbeb1[_0x463587(0x111)]};}function a177_0x577b(_0x326308,_0x3eeb53){_0x326308=_0x326308-0xb2;const _0x593d1c=a177_0x593d();let _0x577b9e=_0x593d1c[_0x326308];return _0x577b9e;}function execUpgradeSdk(_0x548f03){const _0x5551d4=a177_0x3857b3;if(!_0x548f03[_0x5551d4(0xe7)])return{'step':0x7,'label':_0x5551d4(0x126),'ok':!![],'detail':'skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)'};const {pkgPath:_0x2b0f92,currentVersion:_0x3954c7,field:_0x105be6}=_0x548f03[_0x5551d4(0xe7)];try{const _0x9aec99=readFileSync(_0x2b0f92,_0x5551d4(0xfe)),_0x3b9baf=JSON[_0x5551d4(0xc0)](_0x9aec99);return _0x3b9baf[_0x105be6][_0x5551d4(0x104)]='latest',writeFileSync(_0x2b0f92,JSON[_0x5551d4(0xff)](_0x3b9baf,null,0x2)+'\x0a',_0x5551d4(0xfe)),{'step':0x7,'label':_0x5551d4(0x126),'ok':!![],'detail':_0x105be6+'[\x22@lovrabet/sdk\x22]:\x20'+_0x3954c7+_0x5551d4(0xfc)};}catch(_0x5acc5a){return{'step':0x7,'label':_0x5551d4(0x126),'ok':![],'detail':_0x5acc5a[_0x5551d4(0xea)]};}}function tryStat(_0x188519){try{return statSync(_0x188519);}catch{return undefined;}}function printSummary(_0x3d3365){const _0x4458e9=a177_0x3857b3;console['log'](''),console[_0x4458e9(0x12f)](a177_0x3b781c[_0x4458e9(0xf6)]('===\x20Upgrade\x20Summary\x20===')),console[_0x4458e9(0x12f)]('');for(const _0x3be17f of _0x3d3365){const _0x180bae=_0x3be17f['ok']?a177_0x3b781c['green']('OK'):a177_0x3b781c[_0x4458e9(0xe6)](_0x4458e9(0xfa));console[_0x4458e9(0x12f)]('\x20\x20'+_0x180bae+_0x4458e9(0x108)+_0x3be17f[_0x4458e9(0xec)]+':\x20'+_0x3be17f[_0x4458e9(0x125)]);if(_0x3be17f['detail'])console['log']('\x20\x20\x20\x20\x20\x20\x20'+a177_0x3b781c[_0x4458e9(0xb6)](_0x3be17f[_0x4458e9(0xc5)]));}console[_0x4458e9(0x12f)]('');}export async function upgradeApp(_0x1ea223,_0x35d8bc){const _0x2e0cf0=a177_0x3857b3,_0x4ace46=process['cwd'](),_0x1c91e6=analyse(_0x4ace46),_0xbf31d9=!_0x1c91e6[_0x2e0cf0(0xc2)]&&_0x1c91e6['oldArtifacts']['length']===0x0&&!_0x1c91e6[_0x2e0cf0(0xe4)]&&!_0x1c91e6[_0x2e0cf0(0xb7)]&&!_0x1c91e6['sdkUpgrade'];if(_0xbf31d9){console[_0x2e0cf0(0x12f)](a177_0x3b781c[_0x2e0cf0(0xf2)]('No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.'));return;}printReport(_0x1c91e6);const _0x4981b1=!!(_0x35d8bc[_0x2e0cf0(0xca)]||_0x35d8bc['Y']||_0x1ea223);if(!_0x4981b1)try{const _0x4aec0d=await askConfirm(_0x2e0cf0(0x12b));if(!_0x4aec0d){console[_0x2e0cf0(0x12f)](a177_0x3b781c[_0x2e0cf0(0xb6)](_0x2e0cf0(0xc3)));return;}}catch(_0x560480){if(_0x560480?.[_0x2e0cf0(0xea)]==='CANCEL'){console[_0x2e0cf0(0x12f)](a177_0x3b781c[_0x2e0cf0(0xb6)](_0x2e0cf0(0xc3)));return;}throw _0x560480;}const _0x23e2f3=[],_0x23ff54=a177_0x8b40ee({'text':_0x2e0cf0(0xc1),'color':_0x2e0cf0(0x12d)})['start'](),_0x269ce9=execConfigMigration(_0x1c91e6,_0x4ace46);_0x23e2f3['push'](_0x269ce9),_0x23ff54[_0x269ce9['ok']?_0x2e0cf0(0x121):'fail'](_0x2e0cf0(0x11a)+(_0x269ce9['detail']??(_0x269ce9['ok']?'done':_0x2e0cf0(0xf0))));const _0x38bc60=resolve(_0x4ace46,_0x2e0cf0(0xd8)),_0x2739b0=a177_0x8b40ee({'text':_0x2e0cf0(0xce),'color':_0x2e0cf0(0x12d)})[_0x2e0cf0(0x114)]();if(existsSync(_0x38bc60))try{rmSync(_0x38bc60,{'recursive':!![],'force':!![]}),_0x2739b0[_0x2e0cf0(0x121)](_0x2e0cf0(0x122)),_0x23e2f3['push']({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0x3b944f){_0x2739b0[_0x2e0cf0(0x113)](_0x2e0cf0(0xd0)+_0x3b944f[_0x2e0cf0(0xea)]),_0x23e2f3[_0x2e0cf0(0x128)]({'step':0x2,'label':_0x2e0cf0(0x103),'ok':![],'detail':_0x3b944f[_0x2e0cf0(0xea)]});}else _0x2739b0[_0x2e0cf0(0xf3)](_0x2e0cf0(0x10d)),_0x23e2f3['push']({'step':0x2,'label':_0x2e0cf0(0x103),'ok':!![],'detail':_0x2e0cf0(0xb8)});const _0x264685=a177_0x8b40ee({'text':'Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','color':_0x2e0cf0(0x12d)})['start'](),_0x265293=execRemoveOldArtifacts(_0x1c91e6[_0x2e0cf0(0xe9)]);_0x23e2f3['push'](_0x265293),_0x264685[_0x265293['ok']?_0x2e0cf0(0x121):_0x2e0cf0(0x113)](_0x2e0cf0(0x12a)+(_0x265293[_0x2e0cf0(0xc5)]??(_0x265293['ok']?'done':_0x2e0cf0(0xf0))));const _0x54ccae=a177_0x8b40ee({'text':'Step\x204/7:\x20Cleaning\x20MCP\x20config...','color':_0x2e0cf0(0x12d)})[_0x2e0cf0(0x114)](),_0xf2c3b2=execCleanMcp(_0x1c91e6);_0x23e2f3[_0x2e0cf0(0x128)](_0xf2c3b2),_0x54ccae[_0xf2c3b2['ok']?'succeed':'fail'](_0x2e0cf0(0x124)+(_0xf2c3b2['detail']??(_0xf2c3b2['ok']?_0x2e0cf0(0x12e):'failed')));const _0x5e5991=a177_0x8b40ee({'text':'Step\x205/7:\x20Removing\x20old\x20skill...','color':_0x2e0cf0(0x12d)})['start'](),_0x42f11e=execSkillsRemove(_0x4ace46,_0x4981b1);_0x23e2f3[_0x2e0cf0(0x128)](_0x42f11e),_0x5e5991[_0x42f11e['ok']?'succeed':_0x2e0cf0(0x113)](_0x2e0cf0(0xe2)+(_0x42f11e['detail']??(_0x42f11e['ok']?'done':'failed')));const _0x1de140=a177_0x8b40ee({'text':'Step\x206/7:\x20Installing\x20new\x20skill...','color':_0x2e0cf0(0x12d)})[_0x2e0cf0(0x114)](),_0x43e4c2=execSkillsAdd(_0x4ace46,_0x4981b1);_0x23e2f3[_0x2e0cf0(0x128)](_0x43e4c2),_0x1de140[_0x43e4c2['ok']?_0x2e0cf0(0x121):_0x2e0cf0(0x113)](_0x2e0cf0(0xb9)+(_0x43e4c2[_0x2e0cf0(0xc5)]??(_0x43e4c2['ok']?_0x2e0cf0(0x12e):_0x2e0cf0(0xf0))));const _0x902b0b=a177_0x8b40ee({'text':'Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','color':'cyan'})['start'](),_0x9a8cbb=execUpgradeSdk(_0x1c91e6);_0x23e2f3['push'](_0x9a8cbb),_0x902b0b[_0x9a8cbb['ok']?_0x2e0cf0(0x121):'fail'](_0x2e0cf0(0xc8)+(_0x9a8cbb[_0x2e0cf0(0xc5)]??(_0x9a8cbb['ok']?_0x2e0cf0(0x12e):_0x2e0cf0(0xf0)))),printSummary(_0x23e2f3);const _0x25fbbb=_0x23e2f3[_0x2e0cf0(0x112)](_0x22ae95=>!_0x22ae95['ok']);_0x25fbbb?console[_0x2e0cf0(0x12f)](a177_0x3b781c[_0x2e0cf0(0x118)](_0x2e0cf0(0x11f))):console['log'](a177_0x3b781c[_0x2e0cf0(0xf2)](_0x2e0cf0(0xc7))),_0x9a8cbb['ok']&&_0x1c91e6[_0x2e0cf0(0xe7)]&&(console[_0x2e0cf0(0x12f)](''),console[_0x2e0cf0(0x12f)](a177_0x3b781c['bold']['cyan'](_0x2e0cf0(0xdd))),console[_0x2e0cf0(0x12f)](a177_0x3b781c[_0x2e0cf0(0x12d)]('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x2e0cf0(0x12f)](''),console[_0x2e0cf0(0x12f)](a177_0x3b781c['white'](_0x2e0cf0(0xc9))),console[_0x2e0cf0(0x12f)](a177_0x3b781c[_0x2e0cf0(0xef)](_0x2e0cf0(0xdb))),console['log'](a177_0x3b781c[_0x2e0cf0(0xef)](_0x2e0cf0(0x102))),console[_0x2e0cf0(0x12f)](''));}
@@ -1 +1 @@
1
- const a170_0xf2d6f1=a170_0xa71e;(function(_0x84f389,_0x117a05){const _0x4d88c3=a170_0xa71e,_0x56ec43=_0x84f389();while(!![]){try{const _0x3cdc5b=-parseInt(_0x4d88c3(0x222))/0x1*(parseInt(_0x4d88c3(0x238))/0x2)+-parseInt(_0x4d88c3(0x202))/0x3+-parseInt(_0x4d88c3(0x21f))/0x4+-parseInt(_0x4d88c3(0x249))/0x5+-parseInt(_0x4d88c3(0x240))/0x6*(-parseInt(_0x4d88c3(0x23c))/0x7)+-parseInt(_0x4d88c3(0x21e))/0x8*(-parseInt(_0x4d88c3(0x216))/0x9)+-parseInt(_0x4d88c3(0x245))/0xa*(-parseInt(_0x4d88c3(0x1f5))/0xb);if(_0x3cdc5b===_0x117a05)break;else _0x56ec43['push'](_0x56ec43['shift']());}catch(_0x178e1f){_0x56ec43['push'](_0x56ec43['shift']());}}}(a170_0x1861,0x287a3));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 a170_0xa71e(_0x296db9,_0x1e4d88){_0x296db9=_0x296db9-0x1ed;const _0x1861ec=a170_0x1861();let _0xa71ec9=_0x1861ec[_0x296db9];return _0xa71ec9;}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{permitDefinitions}from'../commands/permit/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{userAccountDefinitions}from'../commands/user-account/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/index.js';import{runDefinition}from'../commands/run/index.js';function a170_0x1861(){const _0x20e984=['Async\x20Tasks','skill:install','command','Platform\x20Issue','knowledge-base:update','show','File','app:remove','menu:update','rabetbase\x20workspace\x20use\x20--app\x20<name>','map','bff:new','app:remote','rabetbase\x20workspace\x20remove\x20<name>','knowledge-base:detail','skills:','Self\x20Update','27ENOUdX','rabetbase\x20cli-skill\x20install','Instant\x20API','knowledge-base:delete','Smart\x20List\x20Pages\x20&\x20React\x20Custom\x20Pages','User\x20Accounts','OCR','Roles','678488QyJauY','487304gpQrPq','from','length','228082VgdTzR','App\x20Management','\x20\x20[high-risk-write]','\x20\x20[write]','`rabetbase\x20','wildcardDef','run','skills:install','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','rabetbase\x20kb\x20detail','read','description','Project','Notification\x20Configuration','API\x20Development','Runtime\x20App\x20Config\x20Management','CLI\x20Built-in\x20Skill','has','Run\x20Scripts','logout','project:init','rabetbase\x20menu\x20asset-update','2BYqiFI','install','rabetbase\x20kb\x20delete','app:use','98vvudfn','rabetbase\x20run\x20start','app:add','Workspace','22146ssnPyM','build','Run\x20any\x20package.json\x20script','rabetbase\x20auth\x20logout','rabetbase\x20project\x20create\x20<project-name>','10GiIbPF','service','rabetbase\x20run\x20build','knowledge-base:create','854715mStgKs','Configuration','Schema','write','set','rabetbase\x20kb\x20create','risk','Dataset\x20&\x20Operations','isSingleCommand','4954114USiavA','hidden','rabetbase\x20bff\x20create','get','Menu','rabetbase\x20app\x20list\x20--remote','values','Quick\x20Start','Company\x20Knowledge\x20Base','\x20\x20[','defaultCommand','`\x20has\x20been\x20removed.','login','209505iGzgAI','Database\x20Connections','create'];a170_0x1861=function(){return _0x20e984;};return a170_0x1861();}export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x491406){const _0x1be160=a170_0xa71e;for(const _0x160524 of _0x491406){definitions[_0x1be160(0x1f0)](_0x160524[_0x1be160(0x246)]+':'+_0x160524[_0x1be160(0x207)],_0x160524);let _0x290d60=serviceGroups[_0x1be160(0x1f8)](_0x160524[_0x1be160(0x246)]);!_0x290d60&&(_0x290d60=[],serviceGroups[_0x1be160(0x1f0)](_0x160524['service'],_0x290d60)),_0x290d60['push'](_0x160524);}}function registerDeclarativeService(_0x187e25,_0xe77c72,_0x310031){const _0x34a425=a170_0xa71e;registerDefinitions(_0xe77c72);_0x310031?.['wildcardDef']&&registerDefinitions([_0x310031[_0x34a425(0x227)]]);const _0x42423a=_0x450d82=>_0x450d82===_0x34a425(0x22c)?'':_0x450d82===_0x34a425(0x1ef)?_0x34a425(0x225):_0x34a425(0x224),_0x3aae92={'service':_0xe77c72[0x0][_0x34a425(0x246)],'label':_0x187e25,'commands':_0xe77c72['filter'](_0x48e882=>!_0x48e882[_0x34a425(0x1f6)])[_0x34a425(0x20f)](_0x4fc751=>({'command':_0x4fc751['command'],'description':_0x4fc751[_0x34a425(0x22d)],'tag':_0x42423a(_0x4fc751[_0x34a425(0x1f2)])})),'declarative':!![],'defaultCommand':_0x310031?.[_0x34a425(0x1ff)]??(_0x310031?.[_0x34a425(0x1f4)]?_0xe77c72[0x0][_0x34a425(0x207)]:undefined),'wildcardDef':_0x310031?.[_0x34a425(0x227)],'isSingleCommand':_0x310031?.['isSingleCommand']};serviceRegistry['push'](_0x3aae92),serviceByName[_0x34a425(0x1f0)](_0x3aae92[_0x34a425(0x246)],_0x3aae92);}registerDeclarativeService(a170_0xf2d6f1(0x1fc),initDefinitions,{'defaultCommand':a170_0xf2d6f1(0x228),'isSingleCommand':!![]}),registerDeclarativeService(a170_0xf2d6f1(0x22e),projectDefinitions),registerDeclarativeService(a170_0xf2d6f1(0x23f),workspaceDefinitions),registerDeclarativeService(a170_0xf2d6f1(0x223),appDefinitions),registerDeclarativeService('Authentication',authDefinitions,{'defaultCommand':a170_0xf2d6f1(0x201)}),registerDeclarativeService('Tenant\x20Members',tenantDefinitions),registerDeclarativeService(a170_0xf2d6f1(0x21b),userAccountDefinitions),registerDeclarativeService(a170_0xf2d6f1(0x1f3),datasetDefinitions),registerDeclarativeService(a170_0xf2d6f1(0x21a),pageDefinitions),registerDeclarativeService(a170_0xf2d6f1(0x230),apiDefinitions),registerDeclarativeService(a170_0xf2d6f1(0x218),dataDefinitions),registerDeclarativeService('BFF\x20Scripts',bffDefinitions),registerDeclarativeService(a170_0xf2d6f1(0x22f),notificationDefinitions),registerDeclarativeService('SQL\x20Queries',sqlDefinitions),registerDeclarativeService(a170_0xf2d6f1(0x203),dbDefinitions),registerDeclarativeService(a170_0xf2d6f1(0x1f9),menuDefinitions),registerDeclarativeService(a170_0xf2d6f1(0x205),taskDefinitions),registerDeclarativeService(a170_0xf2d6f1(0x21d),roleDefinitions),registerDeclarativeService('Permissions',permitDefinitions),registerDeclarativeService(a170_0xf2d6f1(0x231),appConfigDefinitions),registerDeclarativeService(a170_0xf2d6f1(0x1fd),kbDefinitions),registerDeclarativeService(a170_0xf2d6f1(0x208),issueDefinitions),registerDeclarativeService(a170_0xf2d6f1(0x20b),fileDefinitions),registerDeclarativeService(a170_0xf2d6f1(0x21c),ocrDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerDeclarativeService(a170_0xf2d6f1(0x1ed),configDefinitions),registerDeclarativeService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a170_0xf2d6f1(0x1ee),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a170_0xf2d6f1(0x215),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a170_0xf2d6f1(0x232),cliSkillDefinitions,{'defaultCommand':a170_0xf2d6f1(0x239)}),registerDeclarativeService('Logs',logsDefinitions,{'defaultCommand':a170_0xf2d6f1(0x20a)}),registerDeclarativeService(a170_0xf2d6f1(0x234),[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a170_0xf2d6f1(0x221)]-0x1];last['commands']=[{'command':'<script>','description':a170_0xf2d6f1(0x242),'tag':a170_0xf2d6f1(0x1fe)+runDefinition[a170_0xf2d6f1(0x1f2)]+']'}];}const REMOVED_COMMAND_REPLACEMENTS=new Map([['sql:save','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml'],[a170_0xf2d6f1(0x210),a170_0xf2d6f1(0x1f7)],['sql:new','rabetbase\x20sql\x20create'],[a170_0xf2d6f1(0x20d),a170_0xf2d6f1(0x237)],[a170_0xf2d6f1(0x236),'rabetbase\x20workspace\x20init\x20--appcode\x20<code>'],['skill:',a170_0xf2d6f1(0x217)],[a170_0xf2d6f1(0x206),a170_0xf2d6f1(0x217)],[a170_0xf2d6f1(0x214),'rabetbase\x20cli-skill\x20install'],[a170_0xf2d6f1(0x229),a170_0xf2d6f1(0x217)],[a170_0xf2d6f1(0x211),a170_0xf2d6f1(0x1fa)],[a170_0xf2d6f1(0x23b),a170_0xf2d6f1(0x20e)],[a170_0xf2d6f1(0x23e),a170_0xf2d6f1(0x22a)],[a170_0xf2d6f1(0x20c),a170_0xf2d6f1(0x212)],['knowledge-base:list','rabetbase\x20kb\x20list'],[a170_0xf2d6f1(0x213),a170_0xf2d6f1(0x22b)],[a170_0xf2d6f1(0x248),a170_0xf2d6f1(0x1f1)],[a170_0xf2d6f1(0x209),'rabetbase\x20kb\x20update'],[a170_0xf2d6f1(0x219),a170_0xf2d6f1(0x23a)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a170_0xf2d6f1(0x204),a170_0xf2d6f1(0x244)],['start',a170_0xf2d6f1(0x23d)],[a170_0xf2d6f1(0x241),a170_0xf2d6f1(0x247)],['preview','rabetbase\x20run\x20preview'],[a170_0xf2d6f1(0x235),a170_0xf2d6f1(0x243)]]);export function resolveRemovedCommand(_0x4a9c65,_0x42403a){const _0x4ffb09=a170_0xf2d6f1;if(!_0x4a9c65)return undefined;const _0x4816c7=REMOVED_COMMAND_REPLACEMENTS['get'](_0x4a9c65+':'+(_0x42403a??'')),_0x4c1bcf=REMOVED_FLAT_COMMAND_REPLACEMENTS['get'](_0x4a9c65),_0x38560e=_0x4816c7??_0x4c1bcf;if(!_0x38560e)return undefined;const _0x287341=_0x4c1bcf?_0x4a9c65:_0x42403a?_0x4a9c65+'\x20'+_0x42403a:_0x4a9c65;return{'command':_0x287341,'message':_0x4ffb09(0x226)+_0x287341+_0x4ffb09(0x200),'hint':'Use\x20`'+_0x38560e+'`\x20instead.'};}export function findDefinition(_0x156811,_0x193975){return definitions['get'](_0x156811+':'+_0x193975);}export function isKnownService(_0x3c1f6a){const _0x344b29=a170_0xf2d6f1;return serviceByName[_0x344b29(0x233)](_0x3c1f6a);}export function isDeclarativeService(_0x1ff3e1){const _0x50a552=a170_0xf2d6f1;return serviceGroups[_0x50a552(0x233)](_0x1ff3e1)||serviceByName[_0x50a552(0x1f8)](_0x1ff3e1)?.['wildcardDef']!==undefined;}export function getServiceEntry(_0x47b79d){const _0x17193a=a170_0xf2d6f1;return serviceByName[_0x17193a(0x1f8)](_0x47b79d);}export function getLegacyHandler(_0x3dc00d,_0x4c3d25){return undefined;}export function getAllDefinitions(){const _0x11e2e3=a170_0xf2d6f1;return Array[_0x11e2e3(0x220)](definitions[_0x11e2e3(0x1fb)]());}
1
+ const a178_0x58ebe4=a178_0xfa01;(function(_0x317d99,_0x6895a7){const _0x5151d1=a178_0xfa01,_0x28d514=_0x317d99();while(!![]){try{const _0xb99ac5=parseInt(_0x5151d1(0xba))/0x1+parseInt(_0x5151d1(0xbd))/0x2*(parseInt(_0x5151d1(0xb2))/0x3)+-parseInt(_0x5151d1(0xe3))/0x4*(parseInt(_0x5151d1(0x10a))/0x5)+parseInt(_0x5151d1(0xd1))/0x6+-parseInt(_0x5151d1(0xc7))/0x7*(-parseInt(_0x5151d1(0xdf))/0x8)+parseInt(_0x5151d1(0xe4))/0x9*(parseInt(_0x5151d1(0xd5))/0xa)+-parseInt(_0x5151d1(0xd8))/0xb*(parseInt(_0x5151d1(0x102))/0xc);if(_0xb99ac5===_0x6895a7)break;else _0x28d514['push'](_0x28d514['shift']());}catch(_0x167fbe){_0x28d514['push'](_0x28d514['shift']());}}}(a178_0x6514,0xcd8fc));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';import{taskDefinitions}from'../commands/task/index.js';import{tenantDefinitions}from'../commands/tenant/index.js';import{roleDefinitions}from'../commands/role/index.js';import{permitDefinitions}from'../commands/permit/index.js';import{appDefinitions}from'../commands/app/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{notificationDefinitions}from'../commands/notification/index.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{userAccountDefinitions}from'../commands/user-account/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();function a178_0x6514(){const _0x143525=['rabetbase\x20sql\x20create','project:init','Configuration','7xTrrWh','Permissions','read','Run\x20any\x20package.json\x20script','has','menu:update','skills:install','rabetbase\x20menu\x20asset-update','File','rabetbase\x20app\x20list\x20--remote','3538404eOrmDn','API\x20Development','Logs','Use\x20`','114020rQpVeZ','run','\x20\x20[','14817jeMOff','push','rabetbase\x20auth\x20logout','rabetbase\x20kb\x20detail','rabetbase\x20kb\x20update','bff:new','hidden','1368184iHTZZu','Authentication','defaultCommand','BFF\x20Scripts','16oiLWfc','747AadRSU','OCR','Quick\x20Start','rabetbase\x20workspace\x20use\x20--app\x20<name>','Tenant\x20Members','set','knowledge-base:delete','commands','rabetbase\x20workspace\x20add\x20<name>\x20--appcode\x20<code>','values','Smart\x20List\x20Pages\x20&\x20React\x20Custom\x20Pages','Database\x20Connections','rabetbase\x20kb\x20list','Notification\x20Configuration','create','write','Code\x20Generation','rabetbase\x20run\x20preview','wildcardDef','Roles','skills:','description','Schema','Project','rabetbase\x20workspace\x20remove\x20<name>','map','show','rabetbase\x20kb\x20delete','filter','app:add','30288NtxzJu','rabetbase\x20run\x20build','Menu','rabetbase\x20kb\x20create','skill:install','`\x20instead.','app:remove','rabetbase\x20project\x20create\x20<project-name>','694615AXwXNl','\x20\x20[write]','knowledge-base:create','rabetbase\x20cli-skill\x20install','App\x20Management','isSingleCommand','skill:','sql:new','from','366mtuoZa','SQL\x20Queries','Runtime\x20App\x20Config\x20Management','service','start','command','rabetbase\x20bff\x20create','Workspace','1478269rxNFtj','\x20\x20[high-risk-write]','logout','26428kGnmnD','rabetbase\x20run\x20start','install','get','app:use','length','knowledge-base:list'];a178_0x6514=function(){return _0x143525;};return a178_0x6514();}export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x3ad901){const _0x33ed8a=a178_0xfa01;for(const _0x164f44 of _0x3ad901){definitions[_0x33ed8a(0xe9)](_0x164f44[_0x33ed8a(0xb5)]+':'+_0x164f44[_0x33ed8a(0xb7)],_0x164f44);let _0x49f74e=serviceGroups[_0x33ed8a(0xc0)](_0x164f44[_0x33ed8a(0xb5)]);!_0x49f74e&&(_0x49f74e=[],serviceGroups[_0x33ed8a(0xe9)](_0x164f44[_0x33ed8a(0xb5)],_0x49f74e)),_0x49f74e[_0x33ed8a(0xd9)](_0x164f44);}}function registerDeclarativeService(_0x2afaf1,_0x5511bd,_0x6c5979){const _0x468b2c=a178_0xfa01;registerDefinitions(_0x5511bd);_0x6c5979?.[_0x468b2c(0xf6)]&&registerDefinitions([_0x6c5979['wildcardDef']]);const _0x326087=_0x47e2bd=>_0x47e2bd===_0x468b2c(0xc9)?'':_0x47e2bd===_0x468b2c(0xf3)?_0x468b2c(0x10b):_0x468b2c(0xbb),_0x368c5={'service':_0x5511bd[0x0]['service'],'label':_0x2afaf1,'commands':_0x5511bd[_0x468b2c(0x100)](_0x13142c=>!_0x13142c[_0x468b2c(0xde)])[_0x468b2c(0xfd)](_0x3a202f=>({'command':_0x3a202f[_0x468b2c(0xb7)],'description':_0x3a202f[_0x468b2c(0xf9)],'tag':_0x326087(_0x3a202f['risk'])})),'declarative':!![],'defaultCommand':_0x6c5979?.[_0x468b2c(0xe1)]??(_0x6c5979?.[_0x468b2c(0x10f)]?_0x5511bd[0x0]['command']:undefined),'wildcardDef':_0x6c5979?.[_0x468b2c(0xf6)],'isSingleCommand':_0x6c5979?.[_0x468b2c(0x10f)]};serviceRegistry[_0x468b2c(0xd9)](_0x368c5),serviceByName[_0x468b2c(0xe9)](_0x368c5[_0x468b2c(0xb5)],_0x368c5);}registerDeclarativeService(a178_0x58ebe4(0xe6),initDefinitions,{'defaultCommand':a178_0x58ebe4(0xd6),'isSingleCommand':!![]}),registerDeclarativeService(a178_0x58ebe4(0xfb),projectDefinitions),registerDeclarativeService(a178_0x58ebe4(0xb9),workspaceDefinitions),registerDeclarativeService(a178_0x58ebe4(0x10e),appDefinitions),registerDeclarativeService(a178_0x58ebe4(0xe0),authDefinitions,{'defaultCommand':'login'}),registerDeclarativeService(a178_0x58ebe4(0xe8),tenantDefinitions),registerDeclarativeService('User\x20Accounts',userAccountDefinitions),registerDeclarativeService('Dataset\x20&\x20Operations',datasetDefinitions),registerDeclarativeService(a178_0x58ebe4(0xee),pageDefinitions),registerDeclarativeService(a178_0x58ebe4(0xd2),apiDefinitions),registerDeclarativeService('Instant\x20API',dataDefinitions),registerDeclarativeService(a178_0x58ebe4(0xe2),bffDefinitions),registerDeclarativeService(a178_0x58ebe4(0xf1),notificationDefinitions),registerDeclarativeService(a178_0x58ebe4(0xb3),sqlDefinitions),registerDeclarativeService(a178_0x58ebe4(0xef),dbDefinitions),registerDeclarativeService(a178_0x58ebe4(0x104),menuDefinitions),registerDeclarativeService('Async\x20Tasks',taskDefinitions),registerDeclarativeService(a178_0x58ebe4(0xf7),roleDefinitions),registerDeclarativeService(a178_0x58ebe4(0xc8),permitDefinitions),registerDeclarativeService(a178_0x58ebe4(0xb4),appConfigDefinitions),registerDeclarativeService('Company\x20Knowledge\x20Base',kbDefinitions),registerDeclarativeService('Platform\x20Issue',issueDefinitions),registerDeclarativeService(a178_0x58ebe4(0xcf),fileDefinitions),registerDeclarativeService(a178_0x58ebe4(0xe5),ocrDefinitions),registerDeclarativeService(a178_0x58ebe4(0xf4),codegenDefinitions),registerDeclarativeService(a178_0x58ebe4(0xc6),configDefinitions),registerDeclarativeService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a178_0x58ebe4(0xfa),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Self\x20Update',[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('CLI\x20Built-in\x20Skill',cliSkillDefinitions,{'defaultCommand':a178_0x58ebe4(0xbf)}),registerDeclarativeService(a178_0x58ebe4(0xd3),logsDefinitions,{'defaultCommand':a178_0x58ebe4(0xfe)}),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a178_0x58ebe4(0xc2)]-0x1];last[a178_0x58ebe4(0xeb)]=[{'command':'<script>','description':a178_0x58ebe4(0xca),'tag':a178_0x58ebe4(0xd7)+runDefinition['risk']+']'}];}function a178_0xfa01(_0x533571,_0x25bbd1){_0x533571=_0x533571-0xb2;const _0x6514d=a178_0x6514();let _0xfa01d6=_0x6514d[_0x533571];return _0xfa01d6;}const REMOVED_COMMAND_REPLACEMENTS=new Map([['sql:save','rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml'],[a178_0x58ebe4(0xdd),a178_0x58ebe4(0xb8)],[a178_0x58ebe4(0x111),a178_0x58ebe4(0xc4)],[a178_0x58ebe4(0xcc),a178_0x58ebe4(0xce)],[a178_0x58ebe4(0xc5),'rabetbase\x20workspace\x20init\x20--appcode\x20<code>'],[a178_0x58ebe4(0x110),a178_0x58ebe4(0x10d)],[a178_0x58ebe4(0x106),a178_0x58ebe4(0x10d)],[a178_0x58ebe4(0xf8),a178_0x58ebe4(0x10d)],[a178_0x58ebe4(0xcd),a178_0x58ebe4(0x10d)],['app:remote',a178_0x58ebe4(0xd0)],[a178_0x58ebe4(0xc1),a178_0x58ebe4(0xe7)],[a178_0x58ebe4(0x101),a178_0x58ebe4(0xec)],[a178_0x58ebe4(0x108),a178_0x58ebe4(0xfc)],[a178_0x58ebe4(0xc3),a178_0x58ebe4(0xf0)],['knowledge-base:detail',a178_0x58ebe4(0xdb)],[a178_0x58ebe4(0x10c),a178_0x58ebe4(0x105)],['knowledge-base:update',a178_0x58ebe4(0xdc)],[a178_0x58ebe4(0xea),a178_0x58ebe4(0xff)]]),REMOVED_FLAT_COMMAND_REPLACEMENTS=new Map([[a178_0x58ebe4(0xf2),a178_0x58ebe4(0x109)],[a178_0x58ebe4(0xb6),a178_0x58ebe4(0xbe)],['build',a178_0x58ebe4(0x103)],['preview',a178_0x58ebe4(0xf5)],[a178_0x58ebe4(0xbc),a178_0x58ebe4(0xda)]]);export function resolveRemovedCommand(_0x18c12a,_0x455c34){const _0x47e995=a178_0x58ebe4;if(!_0x18c12a)return undefined;const _0x315ff9=REMOVED_COMMAND_REPLACEMENTS['get'](_0x18c12a+':'+(_0x455c34??'')),_0x568296=REMOVED_FLAT_COMMAND_REPLACEMENTS[_0x47e995(0xc0)](_0x18c12a),_0x1aff07=_0x315ff9??_0x568296;if(!_0x1aff07)return undefined;const _0x65317f=_0x568296?_0x18c12a:_0x455c34?_0x18c12a+'\x20'+_0x455c34:_0x18c12a;return{'command':_0x65317f,'message':'`rabetbase\x20'+_0x65317f+'`\x20has\x20been\x20removed.','hint':_0x47e995(0xd4)+_0x1aff07+_0x47e995(0x107)};}export function findDefinition(_0x35f5ed,_0x2d60d1){const _0x559f8d=a178_0x58ebe4;return definitions[_0x559f8d(0xc0)](_0x35f5ed+':'+_0x2d60d1);}export function isKnownService(_0x334c61){const _0x53a810=a178_0x58ebe4;return serviceByName[_0x53a810(0xcb)](_0x334c61);}export function isDeclarativeService(_0x53d97f){const _0x3346fc=a178_0x58ebe4;return serviceGroups[_0x3346fc(0xcb)](_0x53d97f)||serviceByName['get'](_0x53d97f)?.[_0x3346fc(0xf6)]!==undefined;}export function getServiceEntry(_0x28bd49){return serviceByName['get'](_0x28bd49);}export function getLegacyHandler(_0x35655b,_0x1b9719){return undefined;}export function getAllDefinitions(){const _0x443329=a178_0x58ebe4;return Array[_0x443329(0x112)](definitions[_0x443329(0xed)]());}
@@ -1 +1 @@
1
- const a171_0x15855a=a171_0x3213;(function(_0x3d0310,_0x2f5249){const _0x3e43a3=a171_0x3213,_0x357d23=_0x3d0310();while(!![]){try{const _0x48f4f7=-parseInt(_0x3e43a3(0x1bd))/0x1*(parseInt(_0x3e43a3(0x1b9))/0x2)+-parseInt(_0x3e43a3(0x1be))/0x3*(-parseInt(_0x3e43a3(0x1c8))/0x4)+parseInt(_0x3e43a3(0x1c5))/0x5+-parseInt(_0x3e43a3(0x1b7))/0x6*(parseInt(_0x3e43a3(0x1c7))/0x7)+parseInt(_0x3e43a3(0x1ba))/0x8+-parseInt(_0x3e43a3(0x1b8))/0x9+parseInt(_0x3e43a3(0x1cb))/0xa*(parseInt(_0x3e43a3(0x1b6))/0xb);if(_0x48f4f7===_0x2f5249)break;else _0x357d23['push'](_0x357d23['shift']());}catch(_0x213420){_0x357d23['push'](_0x357d23['shift']());}}}(a171_0x4d27,0x587f7));function a171_0x3213(_0x25feeb,_0x575aa4){_0x25feeb=_0x25feeb-0x1b5;const _0x4d272f=a171_0x4d27();let _0x32133d=_0x4d272f[_0x25feeb];return _0x32133d;}function a171_0x4d27(){const _0x9ab40d=['1570383seABQi','1042lvQwHf','168464wBltpC','str','remark','34RQbzVy','9JfXBXe','CUSTOM','name','role','create','flagMissing','trim','1990815rMdgWU','POST','576254mJGjgJ','91388PyQGGx','Created\x20role\x20','\x20(id=','20YBjTfL','/smartapi/permit/role/create','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','length','write','820864LqFOTT','6XizXUz'];a171_0x4d27=function(){return _0x9ab40d;};return a171_0x4d27();}import{createAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{NAME_FLAG,REMARK_FLAG,projectRole}from'../../commands/role/shared.js';const CREATE_PATH=a171_0x15855a(0x1cc);function readName(_0x14de24){const _0x10f1a0=a171_0x15855a,_0x4335f5=_0x14de24[_0x10f1a0(0x1bb)](_0x10f1a0(0x1c0))[_0x10f1a0(0x1c4)]();if(!_0x4335f5)throw CliErrors[_0x10f1a0(0x1c3)](_0x10f1a0(0x1c0),'Pass\x20--name\x20<roleName>.');if(_0x4335f5[_0x10f1a0(0x1ce)]>0x40)throw CliErrors['validation'](_0x10f1a0(0x1cd));return _0x4335f5;}export const roleCreate={'service':a171_0x15855a(0x1c1),'command':a171_0x15855a(0x1c2),'description':'Create\x20a\x20CUSTOM\x20user\x20group\x20(role)','risk':a171_0x15855a(0x1b5),'flags':[NAME_FLAG,REMARK_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x222145){readName(_0x222145);},async 'dryRun'(_0x5a10ab){const _0x260b1a=a171_0x15855a,_0x47c693=readName(_0x5a10ab),_0x18f714=_0x5a10ab[_0x260b1a(0x1bb)](_0x260b1a(0x1bc))[_0x260b1a(0x1c4)]()||undefined;return asDryRunResult({'operation':_0x260b1a(0x1c2),'selector':{'appCode':_0x5a10ab['appCode'],'roleName':_0x47c693},'before':null,'after':{'roleName':_0x47c693,'roleType':_0x260b1a(0x1bf),'remark':_0x18f714},'dryRun':!![],'backend':{'method':_0x260b1a(0x1c6),'path':CREATE_PATH},'warnings':[]},{'method':_0x260b1a(0x1c6),'url':CREATE_PATH});},async 'execute'(_0x3b5125){const _0x3f91de=a171_0x15855a,_0xabc87e=readName(_0x3b5125),_0x5e6d15=_0x3b5125[_0x3f91de(0x1bb)]('remark')[_0x3f91de(0x1c4)]()||undefined,_0x32bd57=await createAppRole({'appCode':_0x3b5125['appCode'],'roleName':_0xabc87e,..._0x5e6d15?{'remark':_0x5e6d15}:{}});return{'ok':!![],'data':{'operation':_0x3f91de(0x1c2),'selector':{'appCode':_0x3b5125['appCode'],'roleId':_0x32bd57['id'],'roleName':_0xabc87e},'before':null,'after':projectRole(_0x32bd57),'dryRun':![],'backend':{'method':_0x3f91de(0x1c6),'path':CREATE_PATH},'warnings':[]},'message':_0x3f91de(0x1c9)+_0x32bd57['roleName']+_0x3f91de(0x1ca)+_0x32bd57['id']+')'};}};
1
+ const a179_0x1b99db=a179_0x6d58;function a179_0x6d58(_0xa4ac82,_0x58a902){_0xa4ac82=_0xa4ac82-0x115;const _0xea56e9=a179_0xea56();let _0x6d5888=_0xea56e9[_0xa4ac82];return _0x6d5888;}(function(_0x108128,_0x23dee7){const _0x138577=a179_0x6d58,_0x878f79=_0x108128();while(!![]){try{const _0x2384e2=parseInt(_0x138577(0x12a))/0x1+-parseInt(_0x138577(0x12d))/0x2+-parseInt(_0x138577(0x129))/0x3*(parseInt(_0x138577(0x11a))/0x4)+parseInt(_0x138577(0x116))/0x5*(parseInt(_0x138577(0x119))/0x6)+parseInt(_0x138577(0x122))/0x7+-parseInt(_0x138577(0x11b))/0x8+parseInt(_0x138577(0x128))/0x9*(parseInt(_0x138577(0x124))/0xa);if(_0x2384e2===_0x23dee7)break;else _0x878f79['push'](_0x878f79['shift']());}catch(_0x5af5a4){_0x878f79['push'](_0x878f79['shift']());}}}(a179_0xea56,0x7e39e));function a179_0xea56(){const _0x18a631=['name','trim','894005TgHzXS','str','77810QTlqyc','remark','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','Pass\x20--name\x20<roleName>.','1494RKSmjW','679911hxZpox','318720dsyoBx','flagMissing','write','1770346ZMSeox','validation','roleName','POST','CUSTOM','5cQLpQL','\x20(id=','role','2728002bNKoYF','12FyUrMy','885136capamr','length','Create\x20a\x20CUSTOM\x20user\x20group\x20(role)','appCode','create'];a179_0xea56=function(){return _0x18a631;};return a179_0xea56();}import{createAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{NAME_FLAG,REMARK_FLAG,projectRole}from'../../commands/role/shared.js';const CREATE_PATH='/smartapi/permit/role/create';function readName(_0x31851f){const _0xc4e514=a179_0x6d58,_0x557b14=_0x31851f[_0xc4e514(0x123)](_0xc4e514(0x120))[_0xc4e514(0x121)]();if(!_0x557b14)throw CliErrors[_0xc4e514(0x12b)](_0xc4e514(0x120),_0xc4e514(0x127));if(_0x557b14[_0xc4e514(0x11c)]>0x40)throw CliErrors[_0xc4e514(0x12e)](_0xc4e514(0x126));return _0x557b14;}export const roleCreate={'service':a179_0x1b99db(0x118),'command':a179_0x1b99db(0x11f),'description':a179_0x1b99db(0x11d),'risk':a179_0x1b99db(0x12c),'flags':[NAME_FLAG,REMARK_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x575ee4){readName(_0x575ee4);},async 'dryRun'(_0x1086a3){const _0x383079=a179_0x1b99db,_0xfe6be3=readName(_0x1086a3),_0x3a1218=_0x1086a3[_0x383079(0x123)]('remark')[_0x383079(0x121)]()||undefined;return asDryRunResult({'operation':_0x383079(0x11f),'selector':{'appCode':_0x1086a3[_0x383079(0x11e)],'roleName':_0xfe6be3},'before':null,'after':{'roleName':_0xfe6be3,'roleType':_0x383079(0x115),'remark':_0x3a1218},'dryRun':!![],'backend':{'method':'POST','path':CREATE_PATH},'warnings':[]},{'method':'POST','url':CREATE_PATH});},async 'execute'(_0x52e1f0){const _0x51aaaa=a179_0x1b99db,_0x154105=readName(_0x52e1f0),_0x1bafef=_0x52e1f0['str'](_0x51aaaa(0x125))[_0x51aaaa(0x121)]()||undefined,_0x3adcaa=await createAppRole({'appCode':_0x52e1f0[_0x51aaaa(0x11e)],'roleName':_0x154105,..._0x1bafef?{'remark':_0x1bafef}:{}});return{'ok':!![],'data':{'operation':_0x51aaaa(0x11f),'selector':{'appCode':_0x52e1f0[_0x51aaaa(0x11e)],'roleId':_0x3adcaa['id'],'roleName':_0x154105},'before':null,'after':projectRole(_0x3adcaa),'dryRun':![],'backend':{'method':_0x51aaaa(0x130),'path':CREATE_PATH},'warnings':[]},'message':'Created\x20role\x20'+_0x3adcaa[_0x51aaaa(0x12f)]+_0x51aaaa(0x117)+_0x3adcaa['id']+')'};}};
@@ -1 +1 @@
1
- const a172_0x1855f8=a172_0x9dc7;(function(_0x5b81a0,_0x5770c1){const _0x13f425=a172_0x9dc7,_0x354c7a=_0x5b81a0();while(!![]){try{const _0x803f81=-parseInt(_0x13f425(0x10d))/0x1+-parseInt(_0x13f425(0x10e))/0x2+-parseInt(_0x13f425(0x106))/0x3*(parseInt(_0x13f425(0x111))/0x4)+-parseInt(_0x13f425(0x108))/0x5+-parseInt(_0x13f425(0x113))/0x6*(parseInt(_0x13f425(0x114))/0x7)+-parseInt(_0x13f425(0x101))/0x8+parseInt(_0x13f425(0x10a))/0x9;if(_0x803f81===_0x5770c1)break;else _0x354c7a['push'](_0x354c7a['shift']());}catch(_0x150374){_0x354c7a['push'](_0x354c7a['shift']());}}}(a172_0x2c78,0x1a32b));import{deleteAppRole}from'../../core/api-client.js';function a172_0x9dc7(_0x41eb51,_0x38df3b){_0x41eb51=_0x41eb51-0x100;const _0x2c78e8=a172_0x2c78();let _0x9dc7ae=_0x2c78e8[_0x41eb51];return _0x9dc7ae;}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 a172_0x2c78(){const _0x3e31c5=['6470757DClfog','roleName','high-risk-write','47596HGgHCG','353144cqPgMy','appCode','POST','4UKWgxS','\x20(id=','87168jsStnT','77JqJurI','num','370648wXNPVm','role','delete','userCount','/smartapi/permit/role/delete','103839Llbbbr','Role\x20still\x20has\x20','733730mruhlT','Deleted\x20role\x20'];a172_0x2c78=function(){return _0x3e31c5;};return a172_0x2c78();}const DELETE_PATH=a172_0x1855f8(0x105);export const roleDelete={'service':a172_0x1855f8(0x102),'command':a172_0x1855f8(0x103),'description':'Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','risk':a172_0x1855f8(0x10c),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x4f84c3){const _0x3250b8=a172_0x1855f8,_0x5128d5=_0x4f84c3[_0x3250b8(0x100)]('id'),_0x4f51c6=await getRoleById(_0x4f84c3['appCode'],_0x5128d5);return assertCustomRole(_0x4f51c6,_0x3250b8(0x103)),asDryRunResult({'operation':_0x3250b8(0x103),'selector':{'appCode':_0x4f84c3[_0x3250b8(0x10f)],'roleId':_0x5128d5,'roleName':_0x4f51c6[_0x3250b8(0x10b)]},'before':projectRole(_0x4f51c6),'after':null,'dryRun':!![],'backend':{'method':_0x3250b8(0x110),'path':DELETE_PATH},'warnings':_0x4f51c6[_0x3250b8(0x104)]>0x0?[_0x3250b8(0x107)+_0x4f51c6[_0x3250b8(0x104)]+'\x20member(s);\x20they\x20will\x20lose\x20this\x20group.']:[]},{'method':_0x3250b8(0x110),'url':DELETE_PATH});},async 'execute'(_0x82426d){const _0x4c4d87=a172_0x1855f8,_0x2dac5e=_0x82426d[_0x4c4d87(0x100)]('id'),_0xe0a8ef=await getRoleById(_0x82426d['appCode'],_0x2dac5e);return assertCustomRole(_0xe0a8ef,_0x4c4d87(0x103)),await deleteAppRole(_0x2dac5e),{'ok':!![],'data':{'operation':_0x4c4d87(0x103),'selector':{'appCode':_0x82426d[_0x4c4d87(0x10f)],'roleId':_0x2dac5e,'roleName':_0xe0a8ef[_0x4c4d87(0x10b)]},'before':projectRole(_0xe0a8ef),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[]},'message':_0x4c4d87(0x109)+_0xe0a8ef['roleName']+_0x4c4d87(0x112)+_0x2dac5e+')'};}};
1
+ const a180_0x3a0bb8=a180_0x51e8;(function(_0x552da6,_0x466edb){const _0x2213ee=a180_0x51e8,_0x485c42=_0x552da6();while(!![]){try{const _0x50a94e=parseInt(_0x2213ee(0x1e5))/0x1*(-parseInt(_0x2213ee(0x1d8))/0x2)+parseInt(_0x2213ee(0x1d2))/0x3+parseInt(_0x2213ee(0x1df))/0x4+-parseInt(_0x2213ee(0x1d9))/0x5*(-parseInt(_0x2213ee(0x1e1))/0x6)+parseInt(_0x2213ee(0x1d6))/0x7*(-parseInt(_0x2213ee(0x1da))/0x8)+-parseInt(_0x2213ee(0x1e3))/0x9+parseInt(_0x2213ee(0x1e7))/0xa;if(_0x50a94e===_0x466edb)break;else _0x485c42['push'](_0x485c42['shift']());}catch(_0x52509f){_0x485c42['push'](_0x485c42['shift']());}}}(a180_0x3d64,0x4f4a4));function a180_0x51e8(_0x917a29,_0x2cf9d6){_0x917a29=_0x917a29-0x1d0;const _0x3d64af=a180_0x3d64();let _0x51e84f=_0x3d64af[_0x917a29];return _0x51e84f;}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=a180_0x3a0bb8(0x1dd);function a180_0x3d64(){const _0x453a1e=['787805puaSOV','8qaSqTK','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','/smartapi/permit/role/delete','Deleted\x20role\x20','597680qsvuVb','high-risk-write','6hHVqVW','POST','734337ickvtb','num','4561PNwpAE','role','4942780gTPeXg','delete','Role\x20still\x20has\x20','1167165oIOCpu','appCode','userCount','roleName','3699731NUNeDx','\x20(id=','112qKdBdC'];a180_0x3d64=function(){return _0x453a1e;};return a180_0x3d64();}export const roleDelete={'service':a180_0x3a0bb8(0x1e6),'command':a180_0x3a0bb8(0x1d0),'description':a180_0x3a0bb8(0x1dc),'risk':a180_0x3a0bb8(0x1e0),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x4a984f){const _0x8e6faf=a180_0x3a0bb8,_0x86f2b9=_0x4a984f[_0x8e6faf(0x1e4)]('id'),_0x2cb8ab=await getRoleById(_0x4a984f[_0x8e6faf(0x1d3)],_0x86f2b9);return assertCustomRole(_0x2cb8ab,'delete'),asDryRunResult({'operation':_0x8e6faf(0x1d0),'selector':{'appCode':_0x4a984f[_0x8e6faf(0x1d3)],'roleId':_0x86f2b9,'roleName':_0x2cb8ab[_0x8e6faf(0x1d5)]},'before':projectRole(_0x2cb8ab),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x2cb8ab[_0x8e6faf(0x1d4)]>0x0?[_0x8e6faf(0x1d1)+_0x2cb8ab[_0x8e6faf(0x1d4)]+_0x8e6faf(0x1db)]:[]},{'method':_0x8e6faf(0x1e2),'url':DELETE_PATH});},async 'execute'(_0x1707e0){const _0x4d9f94=a180_0x3a0bb8,_0x39b2ab=_0x1707e0[_0x4d9f94(0x1e4)]('id'),_0x1fa569=await getRoleById(_0x1707e0['appCode'],_0x39b2ab);return assertCustomRole(_0x1fa569,_0x4d9f94(0x1d0)),await deleteAppRole(_0x39b2ab),{'ok':!![],'data':{'operation':_0x4d9f94(0x1d0),'selector':{'appCode':_0x1707e0['appCode'],'roleId':_0x39b2ab,'roleName':_0x1fa569[_0x4d9f94(0x1d5)]},'before':projectRole(_0x1fa569),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[]},'message':_0x4d9f94(0x1de)+_0x1fa569[_0x4d9f94(0x1d5)]+_0x4d9f94(0x1d7)+_0x39b2ab+')'};}};
@@ -1 +1 @@
1
- const a173_0x155907=a173_0x5ebe;function a173_0x2143(){const _0x1ac0e6=['1645HfnkGy','3075loKhUv','Role\x20','roleType','3178080nwuGvu','7812850eQkIYQ','47997NnFlPZ','appCode','num','detail','5656140BCegHE','9cjegbb','24864wjvIiZ','119320mkGxwn','read','436arvNMR'];a173_0x2143=function(){return _0x1ac0e6;};return a173_0x2143();}(function(_0x557fd7,_0x5798d6){const _0x13bd7d=a173_0x5ebe,_0x5390a7=_0x557fd7();while(!![]){try{const _0x3cda96=parseInt(_0x13bd7d(0x1a5))/0x1*(-parseInt(_0x13bd7d(0x1a7))/0x2)+-parseInt(_0x13bd7d(0x1a0))/0x3+-parseInt(_0x13bd7d(0x199))/0x4*(parseInt(_0x13bd7d(0x19b))/0x5)+parseInt(_0x13bd7d(0x19e))/0x6+parseInt(_0x13bd7d(0x19a))/0x7*(parseInt(_0x13bd7d(0x1a6))/0x8)+parseInt(_0x13bd7d(0x1a4))/0x9+-parseInt(_0x13bd7d(0x19f))/0xa;if(_0x3cda96===_0x5798d6)break;else _0x5390a7['push'](_0x5390a7['shift']());}catch(_0x18e516){_0x5390a7['push'](_0x5390a7['shift']());}}}(a173_0x2143,0x76f5d));function a173_0x5ebe(_0x12ee64,_0x1cfc06){_0x12ee64=_0x12ee64-0x199;const _0x21439e=a173_0x2143();let _0x5ebee9=_0x21439e[_0x12ee64];return _0x5ebee9;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':'role','command':a173_0x155907(0x1a3),'description':'Show\x20a\x20single\x20role\x27s\x20detail','risk':a173_0x155907(0x1a8),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0xdc7f3b){const _0xde3f2a=a173_0x155907,_0x2fdc2d=_0xdc7f3b[_0xde3f2a(0x1a2)]('id'),_0x30650c=await getRoleById(_0xdc7f3b[_0xde3f2a(0x1a1)],_0x2fdc2d);return{'ok':!![],'data':{'role':projectRole(_0x30650c)},'message':_0xde3f2a(0x19c)+_0x30650c['roleName']+'\x20('+_0x30650c[_0xde3f2a(0x19d)]+')'};}};
1
+ function a181_0x2750(_0x4523fd,_0x537332){_0x4523fd=_0x4523fd-0xa2;const _0xad9d6a=a181_0xad9d();let _0x27500=_0xad9d6a[_0x4523fd];return _0x27500;}const a181_0xecf88d=a181_0x2750;function a181_0xad9d(){const _0x2f5285=['roleName','6CdwplK','744566JgnxMP','roleType','3852425rcBCFL','Role\x20','138245cUmdMs','5205116JpnqPc','Show\x20a\x20single\x20role\x27s\x20detail','3VGtcAN','role','appCode','4770381ObBIqP','num','3441064ddYzxK','16820667CKPLHY','detail'];a181_0xad9d=function(){return _0x2f5285;};return a181_0xad9d();}(function(_0xe55e1f,_0x2f05db){const _0x3f2dc1=a181_0x2750,_0x5e776a=_0xe55e1f();while(!![]){try{const _0x2560f5=-parseInt(_0x3f2dc1(0xa6))/0x1+parseInt(_0x3f2dc1(0xa2))/0x2+parseInt(_0x3f2dc1(0xa9))/0x3*(parseInt(_0x3f2dc1(0xa7))/0x4)+-parseInt(_0x3f2dc1(0xa4))/0x5*(-parseInt(_0x3f2dc1(0xb2))/0x6)+parseInt(_0x3f2dc1(0xac))/0x7+-parseInt(_0x3f2dc1(0xae))/0x8+-parseInt(_0x3f2dc1(0xaf))/0x9;if(_0x2560f5===_0x2f05db)break;else _0x5e776a['push'](_0x5e776a['shift']());}catch(_0x958334){_0x5e776a['push'](_0x5e776a['shift']());}}}(a181_0xad9d,0xa803d));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a181_0xecf88d(0xaa),'command':a181_0xecf88d(0xb0),'description':a181_0xecf88d(0xa8),'risk':'read','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x332b66){const _0x43702e=a181_0xecf88d,_0x580241=_0x332b66[_0x43702e(0xad)]('id'),_0x3fa935=await getRoleById(_0x332b66[_0x43702e(0xab)],_0x580241);return{'ok':!![],'data':{'role':projectRole(_0x3fa935)},'message':_0x43702e(0xa5)+_0x3fa935[_0x43702e(0xb1)]+'\x20('+_0x3fa935[_0x43702e(0xa3)]+')'};}};
@@ -1 +1 @@
1
- (function(_0x3c1de3,_0x4d3398){const _0x5c1287=a174_0x44e6,_0x387eca=_0x3c1de3();while(!![]){try{const _0xd3b8=parseInt(_0x5c1287(0xeb))/0x1*(parseInt(_0x5c1287(0xea))/0x2)+parseInt(_0x5c1287(0xef))/0x3*(parseInt(_0x5c1287(0xee))/0x4)+-parseInt(_0x5c1287(0xe8))/0x5*(parseInt(_0x5c1287(0xed))/0x6)+parseInt(_0x5c1287(0xe5))/0x7*(-parseInt(_0x5c1287(0xe9))/0x8)+-parseInt(_0x5c1287(0xe6))/0x9*(-parseInt(_0x5c1287(0xe4))/0xa)+parseInt(_0x5c1287(0xec))/0xb*(parseInt(_0x5c1287(0xe7))/0xc)+parseInt(_0x5c1287(0xe3))/0xd;if(_0xd3b8===_0x4d3398)break;else _0x387eca['push'](_0x387eca['shift']());}catch(_0x376259){_0x387eca['push'](_0x387eca['shift']());}}}(a174_0x54e5,0xa26a4));function a174_0x54e5(){const _0x1e03f7=['10zExYYl','48DdOuQu','749174NfKDFz','1bWpuaD','550uOdTmR','3575298lXZuWJ','1599604zoqGIM','6kkATlP','16875664aZLINp','782090LLtHUX','1226722vAGLxJ','27rMaBwu','48324SzsFUE'];a174_0x54e5=function(){return _0x1e03f7;};return a174_0x54e5();}import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleCreate}from'../../commands/role/create.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';function a174_0x44e6(_0x2b07a1,_0x4b3c85){_0x2b07a1=_0x2b07a1-0xe3;const _0x54e5f5=a174_0x54e5();let _0x44e6fc=_0x54e5f5[_0x2b07a1];return _0x44e6fc;}import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
1
+ function a182_0x45a4(_0x4d3fb4,_0x1d9c74){_0x4d3fb4=_0x4d3fb4-0xb3;const _0x6e5e1c=a182_0x6e5e();let _0x45a44d=_0x6e5e1c[_0x4d3fb4];return _0x45a44d;}(function(_0x4562ec,_0x1658f7){const _0x3aff4a=a182_0x45a4,_0x2dd54a=_0x4562ec();while(!![]){try{const _0x382efc=-parseInt(_0x3aff4a(0xb4))/0x1*(-parseInt(_0x3aff4a(0xb9))/0x2)+-parseInt(_0x3aff4a(0xb3))/0x3+parseInt(_0x3aff4a(0xbd))/0x4*(parseInt(_0x3aff4a(0xb8))/0x5)+parseInt(_0x3aff4a(0xb6))/0x6+-parseInt(_0x3aff4a(0xb5))/0x7*(-parseInt(_0x3aff4a(0xba))/0x8)+-parseInt(_0x3aff4a(0xbc))/0x9*(-parseInt(_0x3aff4a(0xbb))/0xa)+-parseInt(_0x3aff4a(0xb7))/0xb;if(_0x382efc===_0x1658f7)break;else _0x2dd54a['push'](_0x2dd54a['shift']());}catch(_0x32c22d){_0x2dd54a['push'](_0x2dd54a['shift']());}}}(a182_0x6e5e,0xb17a8));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleCreate}from'../../commands/role/create.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';function a182_0x6e5e(){const _0x2f93e4=['18ZpuoAD','220676vzjqKr','1444155XIumco','285742GYsLgD','134631jHlqkF','2788110CfZGhw','32130428UPLSSx','130idhfVo','10ylHaPF','288BZkQqb','545540YmCXcj'];a182_0x6e5e=function(){return _0x2f93e4;};return a182_0x6e5e();}import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleCreate,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
@@ -1 +1 @@
1
- const a175_0x15ea57=a175_0x7fa9;(function(_0x4f3fc0,_0x20ec77){const _0x3a483f=a175_0x7fa9,_0x868ec1=_0x4f3fc0();while(!![]){try{const _0x28f1ab=parseInt(_0x3a483f(0xb0))/0x1+-parseInt(_0x3a483f(0xb1))/0x2*(-parseInt(_0x3a483f(0xc4))/0x3)+parseInt(_0x3a483f(0xb6))/0x4*(-parseInt(_0x3a483f(0xa5))/0x5)+-parseInt(_0x3a483f(0xc6))/0x6+parseInt(_0x3a483f(0xc5))/0x7+parseInt(_0x3a483f(0xa9))/0x8*(parseInt(_0x3a483f(0xae))/0x9)+parseInt(_0x3a483f(0xa8))/0xa*(-parseInt(_0x3a483f(0xc1))/0xb);if(_0x28f1ab===_0x20ec77)break;else _0x868ec1['push'](_0x868ec1['shift']());}catch(_0x1449af){_0x868ec1['push'](_0x868ec1['shift']());}}}(a175_0x4521,0x3a778));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a175_0x4521(){const _0x291f92=['Use\x20one\x20of:\x20','USER','Filter\x20by\x20role\x20type','711xEVbHe','Invalid\x20--type\x20\x22','388386HxYUTP','4PSKwDo','num','validation','toUpperCase','str','844OKskab','map','read','DEV','string','number','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','Page\x20size\x20(1-100)','list','type','role','1287WuyPqm','includes','page','311805NvsshX','2507498scnIgR','2572434EPDoYw','CUSTOM','trim','filter','6535bGXzCD','pagesize','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','31030EdoIjf','35704XOaDzZ','Page\x20index\x20(1-based)'];a175_0x4521=function(){return _0x291f92;};return a175_0x4521();}import{projectRole}from'../../commands/role/shared.js';function a175_0x7fa9(_0x133e83,_0x1d54f9){_0x133e83=_0x133e83-0xa4;const _0x452146=a175_0x4521();let _0x7fa9d7=_0x452146[_0x133e83];return _0x7fa9d7;}const ROLE_TYPES=['ADMIN',a175_0x15ea57(0xb9),a175_0x15ea57(0xac),a175_0x15ea57(0xc7)];export const roleList={'service':a175_0x15ea57(0xc0),'command':a175_0x15ea57(0xbe),'description':'List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','risk':a175_0x15ea57(0xb8),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a175_0x15ea57(0xbf),'type':a175_0x15ea57(0xba),'required':![],'description':a175_0x15ea57(0xad),'enum':ROLE_TYPES},{'name':a175_0x15ea57(0xc3),'type':a175_0x15ea57(0xbb),'description':a175_0x15ea57(0xaa),'default':0x1},{'name':a175_0x15ea57(0xa6),'type':a175_0x15ea57(0xbb),'description':a175_0x15ea57(0xbd),'default':0x64}],async 'validate'(_0x48fa09){const _0x479325=a175_0x15ea57,_0x5771a5=_0x48fa09[_0x479325(0xb5)]('type')[_0x479325(0xc8)]();if(_0x5771a5&&!ROLE_TYPES[_0x479325(0xc2)](_0x5771a5[_0x479325(0xb4)]()))throw CliErrors['validation'](_0x479325(0xaf)+_0x5771a5+'\x22.',_0x479325(0xab)+ROLE_TYPES['join'](',\x20')+'.');const _0x3f2d85=_0x48fa09[_0x479325(0xb2)]('page',0x1),_0x21352c=_0x48fa09[_0x479325(0xb2)](_0x479325(0xa6),0x64);if(_0x3f2d85<0x1)throw CliErrors[_0x479325(0xb3)](_0x479325(0xa7));if(_0x21352c<0x1||_0x21352c>0x64)throw CliErrors[_0x479325(0xb3)](_0x479325(0xbc));},async 'execute'(_0xd352d7){const _0x3a0abc=a175_0x15ea57,_0x5641a2=_0xd352d7[_0x3a0abc(0xb2)](_0x3a0abc(0xc3),0x1)||0x1,_0x5370b1=_0xd352d7[_0x3a0abc(0xb2)](_0x3a0abc(0xa6),0x64)||0x64,_0x5705cf=_0xd352d7['str']('type')[_0x3a0abc(0xc8)]()[_0x3a0abc(0xb4)](),{items:_0x991ee2,paging:_0x2d548e}=await listAppRoles(_0xd352d7['appCode'],{'currentPage':_0x5641a2,'pageSize':_0x5370b1}),_0x513690=_0x5705cf?_0x991ee2[_0x3a0abc(0xa4)](_0x3ed1bf=>_0x3ed1bf['roleType']===_0x5705cf):_0x991ee2,_0x46cfb0=_0x513690[_0x3a0abc(0xb7)](projectRole);return{'ok':!![],'data':{'roles':_0x46cfb0,'paging':_0x2d548e},'message':'Found\x20'+_0x46cfb0['length']+'\x20role(s)'};}};
1
+ const a183_0x1eb610=a183_0x3b2a;function a183_0x3d0e(){const _0x1d865a=['1131114ZzYdbP','21790980lcLRbo','str','list','Invalid\x20--type\x20\x22','ADMIN','USER','page','Use\x20one\x20of:\x20','number','num','83499eXDNyN','join','24AGEmQs','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','8738112DPeSAm','Page\x20size\x20(1-100)','type','validation','toUpperCase','appCode','DEV','string','role','map','Page\x20index\x20(1-based)','pagesize','5pyqKHp','trim','1271996DDjjNG','927573QshHEE','roleType','includes','2997442fcacNz','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','\x20role(s)','Filter\x20by\x20role\x20type'];a183_0x3d0e=function(){return _0x1d865a;};return a183_0x3d0e();}(function(_0x2cc5fc,_0x9e29c2){const _0x2e939f=a183_0x3b2a,_0x4dec91=_0x2cc5fc();while(!![]){try{const _0x5b6220=-parseInt(_0x2e939f(0x11a))/0x1+-parseInt(_0x2e939f(0x119))/0x2+parseInt(_0x2e939f(0x107))/0x3*(parseInt(_0x2e939f(0x109))/0x4)+parseInt(_0x2e939f(0x117))/0x5*(parseInt(_0x2e939f(0x121))/0x6)+parseInt(_0x2e939f(0x11d))/0x7+-parseInt(_0x2e939f(0x10b))/0x8+parseInt(_0x2e939f(0x122))/0x9;if(_0x5b6220===_0x9e29c2)break;else _0x4dec91['push'](_0x4dec91['shift']());}catch(_0x249431){_0x4dec91['push'](_0x4dec91['shift']());}}}(a183_0x3d0e,0x860f4));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a183_0x3b2a(_0xf5aa7a,_0x2d876a){_0xf5aa7a=_0xf5aa7a-0x107;const _0x3d0e5a=a183_0x3d0e();let _0x3b2ac8=_0x3d0e5a[_0xf5aa7a];return _0x3b2ac8;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a183_0x1eb610(0x126),a183_0x1eb610(0x111),a183_0x1eb610(0x127),'CUSTOM'];export const roleList={'service':a183_0x1eb610(0x113),'command':a183_0x1eb610(0x124),'description':'List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':'type','type':a183_0x1eb610(0x112),'required':![],'description':a183_0x1eb610(0x120),'enum':ROLE_TYPES},{'name':'page','type':a183_0x1eb610(0x12a),'description':a183_0x1eb610(0x115),'default':0x1},{'name':a183_0x1eb610(0x116),'type':a183_0x1eb610(0x12a),'description':a183_0x1eb610(0x10c),'default':0x64}],async 'validate'(_0x5ea7ba){const _0x4dbecd=a183_0x1eb610,_0x44a3f8=_0x5ea7ba['str'](_0x4dbecd(0x10d))[_0x4dbecd(0x118)]();if(_0x44a3f8&&!ROLE_TYPES[_0x4dbecd(0x11c)](_0x44a3f8[_0x4dbecd(0x10f)]()))throw CliErrors[_0x4dbecd(0x10e)](_0x4dbecd(0x125)+_0x44a3f8+'\x22.',_0x4dbecd(0x129)+ROLE_TYPES[_0x4dbecd(0x108)](',\x20')+'.');const _0x55d73c=_0x5ea7ba[_0x4dbecd(0x12b)](_0x4dbecd(0x128),0x1),_0x1426fe=_0x5ea7ba[_0x4dbecd(0x12b)]('pagesize',0x64);if(_0x55d73c<0x1)throw CliErrors['validation'](_0x4dbecd(0x11e));if(_0x1426fe<0x1||_0x1426fe>0x64)throw CliErrors[_0x4dbecd(0x10e)](_0x4dbecd(0x10a));},async 'execute'(_0x5e468e){const _0x1c95fa=a183_0x1eb610,_0x441b54=_0x5e468e[_0x1c95fa(0x12b)]('page',0x1)||0x1,_0x284a68=_0x5e468e[_0x1c95fa(0x12b)](_0x1c95fa(0x116),0x64)||0x64,_0x3b4321=_0x5e468e[_0x1c95fa(0x123)]('type')[_0x1c95fa(0x118)]()[_0x1c95fa(0x10f)](),{items:_0x893c9a,paging:_0x404ce2}=await listAppRoles(_0x5e468e[_0x1c95fa(0x110)],{'currentPage':_0x441b54,'pageSize':_0x284a68}),_0x31198f=_0x3b4321?_0x893c9a['filter'](_0x3a54ba=>_0x3a54ba[_0x1c95fa(0x11b)]===_0x3b4321):_0x893c9a,_0x19ca27=_0x31198f[_0x1c95fa(0x114)](projectRole);return{'ok':!![],'data':{'roles':_0x19ca27,'paging':_0x404ce2},'message':'Found\x20'+_0x19ca27['length']+_0x1c95fa(0x11f)};}};