@lovrabet/rabetbase-cli 2.3.7-beta.3 → 2.3.7-beta.4

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 (245) 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/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/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.js +1 -1
  87. package/lib/commands/db/index.js +1 -1
  88. package/lib/commands/db/list.js +1 -1
  89. package/lib/commands/db/shared.js +1 -1
  90. package/lib/commands/db/tables.js +1 -1
  91. package/lib/commands/db/test.js +1 -1
  92. package/lib/commands/db/update.js +1 -1
  93. package/lib/commands/doctor.js +1 -1
  94. package/lib/commands/file/index.js +1 -1
  95. package/lib/commands/init/index.js +1 -1
  96. package/lib/commands/issue/index.js +1 -1
  97. package/lib/commands/issue/nudge.js +1 -1
  98. package/lib/commands/issue/report.js +1 -1
  99. package/lib/commands/issue/shared.js +1 -1
  100. package/lib/commands/logs/index.js +1 -1
  101. package/lib/commands/menu/index.js +1 -1
  102. package/lib/commands/menu/list.js +1 -1
  103. package/lib/commands/menu/shared/compare-table.js +1 -1
  104. package/lib/commands/menu/shared/index.js +1 -1
  105. package/lib/commands/menu/shared/inquirer.js +1 -1
  106. package/lib/commands/menu/shared/local-pages.js +1 -1
  107. package/lib/commands/menu/shared/logic.js +1 -1
  108. package/lib/commands/menu/shared/service.js +1 -1
  109. package/lib/commands/menu/shared/sync-core.js +1 -1
  110. package/lib/commands/menu/shared/update-core.js +1 -1
  111. package/lib/commands/menu/shared/valid-url.js +1 -1
  112. package/lib/commands/menu/sync.js +1 -1
  113. package/lib/commands/menu/update.js +1 -1
  114. package/lib/commands/notification/config-list.js +1 -0
  115. package/lib/commands/notification/index.js +1 -0
  116. package/lib/commands/page/generate-start.js +1 -1
  117. package/lib/commands/page/generate-status.js +1 -1
  118. package/lib/commands/page/index.js +1 -1
  119. package/lib/commands/page/pull.js +1 -1
  120. package/lib/commands/page/push.js +1 -1
  121. package/lib/commands/page/relation-audit.js +1 -1
  122. package/lib/commands/page/shared.js +1 -1
  123. package/lib/commands/page/standard-page-status.js +1 -1
  124. package/lib/commands/page/sync.js +1 -1
  125. package/lib/commands/permit/index.js +1 -1
  126. package/lib/commands/permit/page-get.js +1 -1
  127. package/lib/commands/permit/page-set.js +1 -1
  128. package/lib/commands/permit/role-apis-set.js +1 -1
  129. package/lib/commands/permit/role-menus-set.js +1 -1
  130. package/lib/commands/permit/role-menus.js +1 -1
  131. package/lib/commands/permit/shared.js +1 -1
  132. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  133. package/lib/commands/project/create/format-elapsed.js +1 -1
  134. package/lib/commands/project/create/main.js +1 -1
  135. package/lib/commands/project/create/non-interactive.js +1 -1
  136. package/lib/commands/project/create/project-template-path.js +1 -1
  137. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  138. package/lib/commands/project/create/use-format-code.js +1 -1
  139. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  140. package/lib/commands/project/index.js +1 -1
  141. package/lib/commands/project/init.js +1 -1
  142. package/lib/commands/project/upgrade.js +1 -1
  143. package/lib/commands/registry.js +1 -1
  144. package/lib/commands/role/create.js +1 -1
  145. package/lib/commands/role/delete.js +1 -1
  146. package/lib/commands/role/detail.js +1 -1
  147. package/lib/commands/role/index.js +1 -1
  148. package/lib/commands/role/list.js +1 -1
  149. package/lib/commands/role/shared.js +1 -1
  150. package/lib/commands/role/update.js +1 -1
  151. package/lib/commands/role/user-add.js +1 -1
  152. package/lib/commands/role/user-remove.js +1 -1
  153. package/lib/commands/role/user-resolve.js +1 -1
  154. package/lib/commands/run/index.js +1 -1
  155. package/lib/commands/schema.js +1 -1
  156. package/lib/commands/sql/create.js +1 -1
  157. package/lib/commands/sql/delete.js +1 -1
  158. package/lib/commands/sql/detail.js +1 -1
  159. package/lib/commands/sql/exec.js +1 -1
  160. package/lib/commands/sql/index.js +1 -1
  161. package/lib/commands/sql/list.js +1 -1
  162. package/lib/commands/sql/pull.js +1 -1
  163. package/lib/commands/sql/push.js +1 -1
  164. package/lib/commands/sql/save.js +1 -1
  165. package/lib/commands/sql/shared.js +1 -1
  166. package/lib/commands/sql/status.js +1 -1
  167. package/lib/commands/sql/validate.js +1 -1
  168. package/lib/commands/workspace/add.js +1 -1
  169. package/lib/commands/workspace/index.js +1 -1
  170. package/lib/commands/workspace/remove.js +1 -1
  171. package/lib/config/schema.js +1 -1
  172. package/lib/constant/cdn.js +1 -1
  173. package/lib/constant/cli.js +1 -1
  174. package/lib/constant/defaults.js +1 -1
  175. package/lib/constant/domain.js +1 -1
  176. package/lib/constant/env.js +1 -1
  177. package/lib/constant/output.js +1 -1
  178. package/lib/constant/paths.js +1 -1
  179. package/lib/constant/risk.js +1 -1
  180. package/lib/context/app-resolver.js +1 -1
  181. package/lib/context/auth-resolver.js +1 -1
  182. package/lib/context/config-loader.js +1 -1
  183. package/lib/context.js +1 -1
  184. package/lib/core/alias-resolver.js +1 -1
  185. package/lib/core/api-client.js +1 -1
  186. package/lib/core/bff/config.js +1 -1
  187. package/lib/core/bff/file-system.js +1 -1
  188. package/lib/core/bff/hash.js +1 -1
  189. package/lib/core/bff/lock.js +1 -1
  190. package/lib/core/bff/utils.js +1 -1
  191. package/lib/core/db-resolver.js +1 -1
  192. package/lib/core/page/file-system.js +1 -1
  193. package/lib/core/page/hash.js +1 -1
  194. package/lib/core/page/lock.js +1 -1
  195. package/lib/core/sql-sync/config.js +1 -1
  196. package/lib/core/sql-sync/file-system.js +1 -1
  197. package/lib/core/sql-sync/hash.js +1 -1
  198. package/lib/core/sql-sync/lock.js +1 -1
  199. package/lib/core/sql-sync/utils.js +1 -1
  200. package/lib/core/sql-validator.js +1 -1
  201. package/lib/errors.js +1 -1
  202. package/lib/framework/build-all-flags.js +1 -1
  203. package/lib/framework/flags.js +1 -1
  204. package/lib/framework/help.js +1 -1
  205. package/lib/framework/index.js +1 -1
  206. package/lib/framework/output.js +1 -1
  207. package/lib/framework/response.js +1 -1
  208. package/lib/framework/runner-alias.js +1 -1
  209. package/lib/framework/runner.js +1 -1
  210. package/lib/framework/schema-export.js +1 -1
  211. package/lib/framework/types.js +1 -1
  212. package/lib/generated/build-info.js +1 -1
  213. package/lib/help.js +1 -1
  214. package/lib/skills/main.js +1 -1
  215. package/lib/skills/npx-skills-add.js +1 -1
  216. package/lib/telemetry/cli-command-trace.js +1 -1
  217. package/lib/telemetry/cli-help-trace.js +1 -1
  218. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  219. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  220. package/lib/telemetry/send-cli-trace-log.js +1 -1
  221. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  222. package/lib/utils/ai_config.js +1 -1
  223. package/lib/utils/apply-jq-filter.js +1 -1
  224. package/lib/utils/cdn-config.js +1 -1
  225. package/lib/utils/check-sdk-version.js +1 -1
  226. package/lib/utils/cli-version-check.js +1 -1
  227. package/lib/utils/cli-version-policy.js +1 -1
  228. package/lib/utils/config.js +1 -1
  229. package/lib/utils/copy-directory.js +1 -1
  230. package/lib/utils/entity-with-id.js +1 -1
  231. package/lib/utils/file-utils.js +1 -1
  232. package/lib/utils/guides-cdn.js +1 -1
  233. package/lib/utils/http-client.js +1 -1
  234. package/lib/utils/is-non-interactive.js +1 -1
  235. package/lib/utils/logger.js +1 -1
  236. package/lib/utils/params.js +1 -1
  237. package/lib/utils/platform.js +1 -1
  238. package/lib/utils/rules-cdn.js +1 -1
  239. package/lib/utils/sleep.js +1 -1
  240. package/lib/utils/template-replacer.js +1 -1
  241. package/lib/utils/update-notice.js +1 -1
  242. package/lib/utils/version.js +1 -1
  243. package/lib/utils/with-active-cookie.js +1 -1
  244. package/lib/utils/write-cli-side-channel.js +1 -1
  245. package/package.json +1 -1
@@ -1 +1 @@
1
- const a129_0x5ba26f=a129_0xa381;(function(_0x39ede9,_0x16dd3a){const _0x43aaa3=a129_0xa381,_0xae9bf8=_0x39ede9();while(!![]){try{const _0x479ddf=-parseInt(_0x43aaa3(0xb8))/0x1+-parseInt(_0x43aaa3(0xc3))/0x2+-parseInt(_0x43aaa3(0xe4))/0x3*(parseInt(_0x43aaa3(0xc0))/0x4)+-parseInt(_0x43aaa3(0xe6))/0x5+parseInt(_0x43aaa3(0xb1))/0x6*(parseInt(_0x43aaa3(0xd8))/0x7)+-parseInt(_0x43aaa3(0xa6))/0x8+parseInt(_0x43aaa3(0xac))/0x9;if(_0x479ddf===_0x16dd3a)break;else _0xae9bf8['push'](_0xae9bf8['shift']());}catch(_0x12cb30){_0xae9bf8['push'](_0xae9bf8['shift']());}}}(a129_0x221a,0x64abb));import{listPermitRoles}from'../../core/api-client.js';function a129_0xa381(_0x23e19f,_0x4a1c55){_0x23e19f=_0x23e19f-0xa4;const _0x221a25=a129_0x221a();let _0xa3810d=_0x221a25[_0x23e19f];return _0xa3810d;}import{CliErrors}from'../../errors.js';function a129_0x221a(){const _0x1aefb5=['key','number','flag','Missing\x20action.','dataExport','2059014lfybvn','\x20not\x20found.','1626010WlOPxK','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','push','dataDetail','\x20(comma-separated\x20SELF/ALL/id/name)','menus','find','Roles\x20for\x20','Role\x20id\x20or\x20role\x20name','data\x20export','dataUpdate','pageNodeList','join','row\x20visibility','roleType','data\x20update','Role\x20\x22','roleName','2128768UqGqfO','row-roles','Run\x20`role\x20list`.','set','data\x20create','appCode','24187473RTtWQB','dataPermit','Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for','resourceName','some','1992smgXrg','Menu\x20id\x20(from\x20`menu\x20list`)','validation','Pass\x20--role\x20<id|name>.','length','--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.','action','351880GBUeal',';\x20SELF\x20=\x20only\x20own\x20rows','\x22\x20is\x20ambiguous\x20(ids:\x20','Disambiguate\x20with\x20an\x20id.','menuId','menu\x20visibility','label','rolePermit','4OmCwbT','map','Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.','1307868AdjGgw','toUpperCase','grant','menuPermit','Grant\x20access\x20to\x20the\x20listed\x20resources','trim','data\x20delete','Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.','apiList','access','string','filter','Role\x20id\x20','allowSelf','datasets','revoke','datasetCode','role','detail-roles','SELF','resourceCode','175syMxSE','boolean','\x20is\x20not\x20available\x20for\x20this\x20app.','test','get','export-roles','\x22\x20not\x20found.'];a129_0x221a=function(){return _0x1aefb5;};return a129_0x221a();}export const MENU_ID_FLAG={'name':'menu-id','type':a129_0x5ba26f(0xe0),'required':!![],'description':a129_0x5ba26f(0xb2)};export const ROLE_REF_FLAG={'name':a129_0x5ba26f(0xd4),'type':a129_0x5ba26f(0xcd),'required':!![],'description':a129_0x5ba26f(0xee)};export const GRANT_FLAG={'name':a129_0x5ba26f(0xc5),'type':a129_0x5ba26f(0xd9),'required':![],'description':a129_0x5ba26f(0xc7)};export const REVOKE_FLAG={'name':'revoke','type':a129_0x5ba26f(0xd9),'required':![],'description':'Revoke\x20access\x20to\x20the\x20listed\x20resources'};export const MENUS_FLAG={'name':a129_0x5ba26f(0xeb),'type':a129_0x5ba26f(0xcd),'required':!![],'description':'Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke'};export const DATASETS_FLAG={'name':a129_0x5ba26f(0xd1),'type':a129_0x5ba26f(0xcd),'required':!![],'description':a129_0x5ba26f(0xae)};export const PAGE_SLOT_SPECS=[{'flag':'menu-roles','key':a129_0x5ba26f(0xc6),'allowSelf':![],'label':a129_0x5ba26f(0xbd)},{'flag':'create-roles','key':'dataCreate','allowSelf':![],'label':a129_0x5ba26f(0xaa)},{'flag':'update-roles','key':a129_0x5ba26f(0xf0),'allowSelf':![],'label':a129_0x5ba26f(0xf5)},{'flag':'delete-roles','key':'dataDelete','allowSelf':![],'label':a129_0x5ba26f(0xc9)},{'flag':a129_0x5ba26f(0xd5),'key':a129_0x5ba26f(0xe9),'allowSelf':![],'label':'data\x20detail'},{'flag':a129_0x5ba26f(0xdd),'key':a129_0x5ba26f(0xe3),'allowSelf':![],'label':a129_0x5ba26f(0xef)},{'flag':a129_0x5ba26f(0xa7),'key':a129_0x5ba26f(0xad),'allowSelf':!![],'label':a129_0x5ba26f(0xf3)}];export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS['map'](_0x2dfa59=>({'name':_0x2dfa59[a129_0x5ba26f(0xe1)],'type':a129_0x5ba26f(0xcd),'required':![],'description':a129_0x5ba26f(0xed)+_0x2dfa59[a129_0x5ba26f(0xbe)]+a129_0x5ba26f(0xea)+(_0x2dfa59[a129_0x5ba26f(0xd0)]?a129_0x5ba26f(0xb9):'')}));export function splitList(_0x5b0508){const _0x401224=a129_0x5ba26f;return _0x5b0508['split'](',')[_0x401224(0xc1)](_0x287310=>_0x287310[_0x401224(0xc8)]())[_0x401224(0xce)](Boolean);}export function projectRoleRef(_0x48ac00){const _0x25856f=a129_0x5ba26f;return{'id':_0x48ac00['id'],'roleName':_0x48ac00['roleName'],'roleType':_0x48ac00[_0x25856f(0xf4)]};}export async function resolvePermitRoles(_0x380704,_0xbd286a,_0x3b1dd9){const _0x271078=a129_0x5ba26f,_0x3f59c1=await listPermitRoles(_0x380704,{'needSelf':!![],'needPublic':!![]}),_0x53ddd5=[];for(const _0x46fdd7 of _0xbd286a){const _0x31b459=resolveOnePermitRole(_0x3f59c1,_0x46fdd7);if(!_0x3b1dd9[_0x271078(0xd0)]&&_0x31b459['roleType']===_0x271078(0xd6))throw CliErrors['validation']('SELF\x20is\x20not\x20allowed\x20for\x20'+_0x3b1dd9[_0x271078(0xbe)]+'.',_0x271078(0xe7));if(!_0x53ddd5[_0x271078(0xb0)](_0x9902c7=>_0x9902c7['id']===_0x31b459['id']))_0x53ddd5[_0x271078(0xe8)](_0x31b459);}return _0x53ddd5;}function resolveOnePermitRole(_0xf669c1,_0x2501af){const _0x27bf47=a129_0x5ba26f,_0x4ef259=_0x2501af['trim'](),_0x2ce0f5=_0x4ef259[_0x27bf47(0xc4)]();if(_0x2ce0f5===_0x27bf47(0xd6)||_0x2ce0f5==='ALL'){const _0x142872=_0xf669c1[_0x27bf47(0xec)](_0x4c126f=>_0x4c126f[_0x27bf47(0xf4)]===_0x2ce0f5);if(!_0x142872)throw CliErrors['validation']('Special\x20role\x20'+_0x2ce0f5+_0x27bf47(0xda));return _0x142872;}if(/^-?\d+$/[_0x27bf47(0xdb)](_0x4ef259)){const _0x80fa5d=Number(_0x4ef259),_0x38c7b3=_0xf669c1['find'](_0x2903ce=>_0x2903ce['id']===_0x80fa5d);if(!_0x38c7b3)throw CliErrors[_0x27bf47(0xb3)](_0x27bf47(0xcf)+_0x80fa5d+_0x27bf47(0xe5),_0x27bf47(0xa8));return _0x38c7b3;}const _0x40031b=_0xf669c1[_0x27bf47(0xce)](_0x349ccf=>_0x349ccf[_0x27bf47(0xa5)]===_0x4ef259);if(_0x40031b[_0x27bf47(0xb5)]===0x0)throw CliErrors[_0x27bf47(0xb3)](_0x27bf47(0xa4)+_0x4ef259+_0x27bf47(0xde),_0x27bf47(0xc2));if(_0x40031b[_0x27bf47(0xb5)]>0x1)throw CliErrors[_0x27bf47(0xb3)](_0x27bf47(0xa4)+_0x4ef259+_0x27bf47(0xba)+_0x40031b[_0x27bf47(0xc1)](_0x2afb2e=>_0x2afb2e['id'])[_0x27bf47(0xf2)](',\x20')+').',_0x27bf47(0xbb));return _0x40031b[0x0];}export function projectPageSlot(_0x41d6b5){const _0x56e6d1=a129_0x5ba26f;if(!_0x41d6b5)return null;return{'resourceCode':_0x41d6b5[_0x56e6d1(0xd7)],'roles':(_0x41d6b5[_0x56e6d1(0xbf)]??[])[_0x56e6d1(0xc1)](projectRoleRef)};}export function projectPagePermit(_0x42e13c){const _0x1b841a=a129_0x5ba26f,_0x492fd2={'menuId':_0x42e13c[_0x1b841a(0xbc)],'appCode':_0x42e13c[_0x1b841a(0xab)],'menuPermit':projectPageSlot(_0x42e13c['menuPermit'])};for(const _0x1bbb0 of PAGE_SLOT_SPECS){if(_0x1bbb0[_0x1b841a(0xdf)]===_0x1b841a(0xc6))continue;_0x492fd2[_0x1bbb0[_0x1b841a(0xdf)]]=projectPageSlot(_0x42e13c[_0x1bbb0[_0x1b841a(0xdf)]]);}return _0x492fd2;}export function flattenMenuResources(_0x566a38){const _0x174a4b=new Map(),_0x2fc6c0=_0x291903=>{const _0x446d8e=a129_0xa381;for(const _0x356d86 of _0x291903??[]){_0x174a4b[_0x446d8e(0xa9)](_0x356d86[_0x446d8e(0xd7)],{'resourceCode':_0x356d86[_0x446d8e(0xd7)],'resourceName':_0x356d86[_0x446d8e(0xaf)],'action':_0x356d86['allowedActions']?.[0x0]??'0'});if(_0x356d86[_0x446d8e(0xf1)])_0x2fc6c0(_0x356d86[_0x446d8e(0xf1)]);}};return _0x2fc6c0(_0x566a38),_0x174a4b;}export function flattenApiResources(_0x381103){const _0x49f5eb=a129_0x5ba26f,_0x521f02=new Map(),_0x457bff=new Map();for(const _0x3836d2 of _0x381103){const _0x67cef7=_0x3836d2[_0x49f5eb(0xcb)]??{};for(const [_0x924678,_0x17b047]of Object['entries'](_0x67cef7)){_0x521f02[_0x49f5eb(0xa9)](_0x924678,{'resourceCode':_0x924678,'resourceName':_0x3836d2[_0x49f5eb(0xaf)],'datasetCode':_0x3836d2[_0x49f5eb(0xd3)],'action':_0x17b047?.[0x0]??'0'});const _0x179d33=_0x457bff[_0x49f5eb(0xdc)](_0x3836d2[_0x49f5eb(0xd3)])??[];_0x179d33['push'](_0x924678),_0x457bff[_0x49f5eb(0xa9)](_0x3836d2[_0x49f5eb(0xd3)],_0x179d33);}}return{'byCode':_0x521f02,'byDataset':_0x457bff};}export function buildPermits(_0x13bb8f,_0x26a656){const _0x33a74d=a129_0x5ba26f,_0x3624f5={};for(const [_0x2db19c,_0x801017]of _0x13bb8f){const _0x492ac4=_0x26a656[_0x33a74d(0xdc)](_0x2db19c)??_0x801017[_0x33a74d(0xb7)];_0x3624f5[_0x2db19c]=[_0x492ac4];}return _0x3624f5;}export function readRoleRef(_0x4932ae){const _0x2b6a44=a129_0x5ba26f,_0x324157=_0x4932ae['str'](_0x2b6a44(0xd4))[_0x2b6a44(0xc8)]();if(!_0x324157)throw CliErrors['flagMissing']('role',_0x2b6a44(0xb4));return _0x324157;}export function readGrantRevoke(_0x214c77){const _0x5042c5=a129_0x5ba26f,_0x5df202=_0x214c77['bool'](_0x5042c5(0xc5)),_0x2318f3=_0x214c77['bool'](_0x5042c5(0xd2));if(_0x5df202&&_0x2318f3)throw CliErrors['validation'](_0x5042c5(0xb6));if(!_0x5df202&&!_0x2318f3)throw CliErrors[_0x5042c5(0xb3)](_0x5042c5(0xe2),_0x5042c5(0xca));return _0x5df202?_0x5042c5(0xcc):'0';}
1
+ const a131_0x22f41b=a131_0x2338;(function(_0x50d0bf,_0x2a9003){const _0x5e9b88=a131_0x2338,_0x3b04d9=_0x50d0bf();while(!![]){try{const _0x2e2b04=parseInt(_0x5e9b88(0x128))/0x1*(-parseInt(_0x5e9b88(0x14a))/0x2)+-parseInt(_0x5e9b88(0x140))/0x3*(-parseInt(_0x5e9b88(0x129))/0x4)+parseInt(_0x5e9b88(0x141))/0x5+parseInt(_0x5e9b88(0x115))/0x6*(-parseInt(_0x5e9b88(0x126))/0x7)+-parseInt(_0x5e9b88(0xfb))/0x8*(parseInt(_0x5e9b88(0x136))/0x9)+parseInt(_0x5e9b88(0xff))/0xa*(-parseInt(_0x5e9b88(0x12b))/0xb)+parseInt(_0x5e9b88(0x130))/0xc;if(_0x2e2b04===_0x2a9003)break;else _0x3b04d9['push'](_0x3b04d9['shift']());}catch(_0x2752e3){_0x3b04d9['push'](_0x3b04d9['shift']());}}}(a131_0x1927,0xd7341));import{listPermitRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const MENU_ID_FLAG={'name':a131_0x22f41b(0x147),'type':a131_0x22f41b(0x113),'required':!![],'description':'Menu\x20id\x20(from\x20`menu\x20list`)'};export const ROLE_REF_FLAG={'name':a131_0x22f41b(0xf6),'type':'string','required':!![],'description':a131_0x22f41b(0x106)};export const GRANT_FLAG={'name':a131_0x22f41b(0x110),'type':a131_0x22f41b(0x125),'required':![],'description':a131_0x22f41b(0x13a)};export const REVOKE_FLAG={'name':a131_0x22f41b(0x124),'type':a131_0x22f41b(0x125),'required':![],'description':a131_0x22f41b(0x14b)};function a131_0x1927(){const _0x3eb3ff=['bool','string','Special\x20role\x20',';\x20SELF\x20=\x20only\x20own\x20rows','54693432YGJdgb','delete-roles','trim','datasetCode','SELF','Comma-separated\x20menu\x20resourceCodes\x20to\x20grant/revoke','134433ZjkOEq','split','validation','menu\x20visibility','Grant\x20access\x20to\x20the\x20listed\x20resources','data\x20export','resourceName','test','get','set','3mwBXnh','1608975uyWrIS','map','rolePermit','SELF\x20is\x20not\x20allowed\x20for\x20','export-roles','update-roles','menu-id','data\x20update','create-roles','157222dyjvzK','Revoke\x20access\x20to\x20the\x20listed\x20resources','--grant\x20and\x20--revoke\x20are\x20mutually\x20exclusive.','role','action','data\x20create','flagMissing','appCode','920zXauWA','find','menuId','key','208060iqNgNf','\x20not\x20found.','Pass\x20--role\x20<id|name>.','length','some','dataCreate','row-roles','Role\x20id\x20or\x20role\x20name','filter','Missing\x20action.','SELF\x20(row-level)\x20applies\x20only\x20to\x20--row-roles.','Run\x20`role\x20list`,\x20or\x20use\x20SELF/ALL/<id>.','apiList','label','Disambiguate\x20with\x20an\x20id.','Roles\x20for\x20','Run\x20`role\x20list`.','grant','allowSelf','entries','number','pageNodeList','6qTIcGH','Comma-separated\x20datasetCodes\x20to\x20revoke\x20API\x20access\x20for','access','flag','roleName','\x22\x20not\x20found.','toUpperCase','Role\x20\x22','dataUpdate','allowedActions','\x20(comma-separated\x20SELF/ALL/id/name)','datasets','roleType','join','Pass\x20exactly\x20one\x20of\x20--grant\x20/\x20--revoke.','revoke','boolean','9124787tEoDll','menuPermit','13ILKhnG','4591396MiYRAe','resourceCode','583FYcqxz'];a131_0x1927=function(){return _0x3eb3ff;};return a131_0x1927();}export const MENUS_FLAG={'name':'menus','type':a131_0x22f41b(0x12d),'required':!![],'description':a131_0x22f41b(0x135)};export const DATASETS_FLAG={'name':a131_0x22f41b(0x120),'type':a131_0x22f41b(0x12d),'required':!![],'description':a131_0x22f41b(0x116)};export const PAGE_SLOT_SPECS=[{'flag':'menu-roles','key':a131_0x22f41b(0x127),'allowSelf':![],'label':a131_0x22f41b(0x139)},{'flag':a131_0x22f41b(0x149),'key':a131_0x22f41b(0x104),'allowSelf':![],'label':a131_0x22f41b(0xf8)},{'flag':a131_0x22f41b(0x146),'key':a131_0x22f41b(0x11d),'allowSelf':![],'label':a131_0x22f41b(0x148)},{'flag':a131_0x22f41b(0x131),'key':'dataDelete','allowSelf':![],'label':'data\x20delete'},{'flag':'detail-roles','key':'dataDetail','allowSelf':![],'label':'data\x20detail'},{'flag':a131_0x22f41b(0x145),'key':'dataExport','allowSelf':![],'label':a131_0x22f41b(0x13b)},{'flag':a131_0x22f41b(0x105),'key':'dataPermit','allowSelf':!![],'label':'row\x20visibility'}];export const PAGE_SET_ROLE_FLAGS=PAGE_SLOT_SPECS[a131_0x22f41b(0x142)](_0x59811f=>({'name':_0x59811f[a131_0x22f41b(0x118)],'type':a131_0x22f41b(0x12d),'required':![],'description':a131_0x22f41b(0x10e)+_0x59811f[a131_0x22f41b(0x10c)]+a131_0x22f41b(0x11f)+(_0x59811f[a131_0x22f41b(0x111)]?a131_0x22f41b(0x12f):'')}));export function splitList(_0x23bd1e){const _0x3de1ec=a131_0x22f41b;return _0x23bd1e[_0x3de1ec(0x137)](',')['map'](_0x37aaba=>_0x37aaba[_0x3de1ec(0x132)]())[_0x3de1ec(0x107)](Boolean);}export function projectRoleRef(_0x18c7dd){const _0x4349e6=a131_0x22f41b;return{'id':_0x18c7dd['id'],'roleName':_0x18c7dd[_0x4349e6(0x119)],'roleType':_0x18c7dd[_0x4349e6(0x121)]};}export async function resolvePermitRoles(_0x49f608,_0x5d61cf,_0x315e2d){const _0x3c7454=a131_0x22f41b,_0x4654f1=await listPermitRoles(_0x49f608,{'needSelf':!![],'needPublic':!![]}),_0xf3660d=[];for(const _0x168082 of _0x5d61cf){const _0x445564=resolveOnePermitRole(_0x4654f1,_0x168082);if(!_0x315e2d[_0x3c7454(0x111)]&&_0x445564[_0x3c7454(0x121)]===_0x3c7454(0x134))throw CliErrors[_0x3c7454(0x138)](_0x3c7454(0x144)+_0x315e2d[_0x3c7454(0x10c)]+'.',_0x3c7454(0x109));if(!_0xf3660d[_0x3c7454(0x103)](_0x296e96=>_0x296e96['id']===_0x445564['id']))_0xf3660d['push'](_0x445564);}return _0xf3660d;}function resolveOnePermitRole(_0x352b64,_0x5922ec){const _0x557903=a131_0x22f41b,_0x3d2445=_0x5922ec[_0x557903(0x132)](),_0x536f99=_0x3d2445[_0x557903(0x11b)]();if(_0x536f99===_0x557903(0x134)||_0x536f99==='ALL'){const _0x405c0a=_0x352b64[_0x557903(0xfc)](_0x223eef=>_0x223eef[_0x557903(0x121)]===_0x536f99);if(!_0x405c0a)throw CliErrors[_0x557903(0x138)](_0x557903(0x12e)+_0x536f99+'\x20is\x20not\x20available\x20for\x20this\x20app.');return _0x405c0a;}if(/^-?\d+$/[_0x557903(0x13d)](_0x3d2445)){const _0xcd1c6e=Number(_0x3d2445),_0x30b39c=_0x352b64['find'](_0x352f35=>_0x352f35['id']===_0xcd1c6e);if(!_0x30b39c)throw CliErrors[_0x557903(0x138)]('Role\x20id\x20'+_0xcd1c6e+_0x557903(0x100),_0x557903(0x10f));return _0x30b39c;}const _0x467e41=_0x352b64['filter'](_0x53aef2=>_0x53aef2['roleName']===_0x3d2445);if(_0x467e41[_0x557903(0x102)]===0x0)throw CliErrors[_0x557903(0x138)](_0x557903(0x11c)+_0x3d2445+_0x557903(0x11a),_0x557903(0x10a));if(_0x467e41[_0x557903(0x102)]>0x1)throw CliErrors['validation']('Role\x20\x22'+_0x3d2445+'\x22\x20is\x20ambiguous\x20(ids:\x20'+_0x467e41[_0x557903(0x142)](_0x3a8093=>_0x3a8093['id'])[_0x557903(0x122)](',\x20')+').',_0x557903(0x10d));return _0x467e41[0x0];}export function projectPageSlot(_0x161df0){const _0x31f556=a131_0x22f41b;if(!_0x161df0)return null;return{'resourceCode':_0x161df0[_0x31f556(0x12a)],'roles':(_0x161df0[_0x31f556(0x143)]??[])[_0x31f556(0x142)](projectRoleRef)};}export function projectPagePermit(_0x24bef7){const _0x160cf2=a131_0x22f41b,_0x4f5ec9={'menuId':_0x24bef7[_0x160cf2(0xfd)],'appCode':_0x24bef7[_0x160cf2(0xfa)],'menuPermit':projectPageSlot(_0x24bef7[_0x160cf2(0x127)])};for(const _0x2473f8 of PAGE_SLOT_SPECS){if(_0x2473f8[_0x160cf2(0xfe)]===_0x160cf2(0x127))continue;_0x4f5ec9[_0x2473f8['key']]=projectPageSlot(_0x24bef7[_0x2473f8['key']]);}return _0x4f5ec9;}export function flattenMenuResources(_0xba1f7b){const _0x4cbd48=new Map(),_0x313d65=_0x196518=>{const _0x451369=a131_0x2338;for(const _0x4e03bc of _0x196518??[]){_0x4cbd48['set'](_0x4e03bc[_0x451369(0x12a)],{'resourceCode':_0x4e03bc[_0x451369(0x12a)],'resourceName':_0x4e03bc[_0x451369(0x13c)],'action':_0x4e03bc[_0x451369(0x11e)]?.[0x0]??'0'});if(_0x4e03bc[_0x451369(0x114)])_0x313d65(_0x4e03bc[_0x451369(0x114)]);}};return _0x313d65(_0xba1f7b),_0x4cbd48;}export function flattenApiResources(_0x2c07a3){const _0x2829a4=a131_0x22f41b,_0x547e1b=new Map(),_0x56b5bf=new Map();for(const _0xb98da6 of _0x2c07a3){const _0x34504b=_0xb98da6[_0x2829a4(0x10b)]??{};for(const [_0x4c95f3,_0x53752b]of Object[_0x2829a4(0x112)](_0x34504b)){_0x547e1b['set'](_0x4c95f3,{'resourceCode':_0x4c95f3,'resourceName':_0xb98da6[_0x2829a4(0x13c)],'datasetCode':_0xb98da6[_0x2829a4(0x133)],'action':_0x53752b?.[0x0]??'0'});const _0x1d6e8e=_0x56b5bf[_0x2829a4(0x13e)](_0xb98da6[_0x2829a4(0x133)])??[];_0x1d6e8e['push'](_0x4c95f3),_0x56b5bf[_0x2829a4(0x13f)](_0xb98da6[_0x2829a4(0x133)],_0x1d6e8e);}}return{'byCode':_0x547e1b,'byDataset':_0x56b5bf};}export function buildPermits(_0x5e2b21,_0x211d54){const _0x23e4ab=a131_0x22f41b,_0x1c0099={};for(const [_0x20914d,_0x505128]of _0x5e2b21){const _0x5e6b61=_0x211d54[_0x23e4ab(0x13e)](_0x20914d)??_0x505128[_0x23e4ab(0xf7)];_0x1c0099[_0x20914d]=[_0x5e6b61];}return _0x1c0099;}export function readRoleRef(_0x1c4516){const _0x52c08f=a131_0x22f41b,_0x4074cf=_0x1c4516['str']('role')[_0x52c08f(0x132)]();if(!_0x4074cf)throw CliErrors[_0x52c08f(0xf9)](_0x52c08f(0xf6),_0x52c08f(0x101));return _0x4074cf;}function a131_0x2338(_0x1c35bc,_0x2e0b9d){_0x1c35bc=_0x1c35bc-0xf5;const _0x192743=a131_0x1927();let _0x2338fa=_0x192743[_0x1c35bc];return _0x2338fa;}export function readGrantRevoke(_0x4a9a7e){const _0x46a065=a131_0x22f41b,_0x5047e1=_0x4a9a7e[_0x46a065(0x12c)](_0x46a065(0x110)),_0x1ba341=_0x4a9a7e['bool']('revoke');if(_0x5047e1&&_0x1ba341)throw CliErrors['validation'](_0x46a065(0xf5));if(!_0x5047e1&&!_0x1ba341)throw CliErrors['validation'](_0x46a065(0x108),_0x46a065(0x123));return _0x5047e1?_0x46a065(0x117):'0';}
@@ -1 +1 @@
1
- function a130_0x82e1(){const _0x5390ce=['124148sqgRKR','green','log','test','cyan','string','Project\x20name:','1431972yddBeY','Logged\x20in','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','3092AZqXtk','Not\x20set','env','30ruYkFp','length','production','249sDWNnx','√\x20App\x20Code:\x20','1000824AOADFv','153155nwhzmg','√\x20Login\x20status:\x20','3152OezSps','603207sIGsWq','70fhxQBz','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','\x22\x20already\x20exists','trim','Login\x20failed','4935trYbty','5RAOwCa'];a130_0x82e1=function(){return _0x5390ce;};return a130_0x82e1();}(function(_0x11aa67,_0x50ac52){const _0x395b91=a130_0x56db,_0x16dfb3=_0x11aa67();while(!![]){try{const _0x3d24bd=-parseInt(_0x395b91(0xb1))/0x1*(-parseInt(_0x395b91(0xb2))/0x2)+-parseInt(_0x395b91(0xc2))/0x3*(parseInt(_0x395b91(0xbc))/0x4)+-parseInt(_0x395b91(0xc5))/0x5*(-parseInt(_0x395b91(0xbf))/0x6)+-parseInt(_0x395b91(0xb0))/0x7*(-parseInt(_0x395b91(0xa9))/0x8)+-parseInt(_0x395b91(0xb9))/0x9+-parseInt(_0x395b91(0xab))/0xa*(parseInt(_0x395b91(0xaa))/0xb)+parseInt(_0x395b91(0xc4))/0xc;if(_0x3d24bd===_0x50ac52)break;else _0x16dfb3['push'](_0x16dfb3['shift']());}catch(_0x57bcb5){_0x16dfb3['push'](_0x16dfb3['shift']());}}}(a130_0x82e1,0x351e3));import{existsSync}from'node:fs';import a130_0x382000 from'node:path';import a130_0x4630b0 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';function a130_0x56db(_0x1b59bb,_0xd0ecc5){_0x1b59bb=_0x1b59bb-0xa9;const _0x82e12e=a130_0x82e1();let _0x56dbce=_0x82e12e[_0x1b59bb];return _0x56dbce;}import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x90ef3c,_0x480aa6,_0x45afd2){const _0xe3f298=a130_0x56db,_0x4df270='my-app',_0x598503=readConfig(),_0x2b87bc=typeof _0x598503[_0xe3f298(0xbe)]===_0xe3f298(0xb7)?_0x598503['env']:undefined,_0x12daac=await input({'message':_0xe3f298(0xb8),'default':_0x4df270,'validate':_0x735dbe=>{const _0x1f0fe=_0xe3f298,_0x5e2621=_0x735dbe[_0x1f0fe(0xae)]()||_0x4df270;if(_0x5e2621[_0x1f0fe(0xc0)]>0x32)return'Project\x20name\x20cannot\x20exceed\x2050\x20characters';const _0x2851e7=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x5e2621&&!_0x2851e7[_0x1f0fe(0xb5)](_0x5e2621))return _0x1f0fe(0xbb);const _0x3e2209=a130_0x382000['resolve'](process['cwd'](),_0x5e2621);if(existsSync(_0x3e2209))return'Directory\x20\x22'+_0x5e2621+_0x1f0fe(0xad);return!![];}});console[_0xe3f298(0xb4)](a130_0x4630b0[_0xe3f298(0xb3)]('√\x20Project\x20Name:\x20'+a130_0x4630b0[_0xe3f298(0xb6)](_0x12daac)));const _0x1e1a33=await selectSingleAppcode(_0x45afd2);console[_0xe3f298(0xb4)](a130_0x4630b0['green'](_0xe3f298(0xc3)+a130_0x4630b0['cyan'](_0x1e1a33||_0xe3f298(0xbd))));if(_0x1e1a33){const _0x58c504=await getIsSessionValid();if(!_0x58c504){const _0x4a5c29=await confirm({'message':_0xe3f298(0xac),'default':!![]});if(_0x4a5c29){const _0x1345a6=await authServer({'silent':!![]});console[_0xe3f298(0xb4)](a130_0x4630b0[_0xe3f298(0xb3)](_0xe3f298(0xc6)+a130_0x4630b0[_0xe3f298(0xb6)](_0x1345a6?_0xe3f298(0xba):_0xe3f298(0xaf))));}else console['log'](a130_0x4630b0[_0xe3f298(0xb3)](_0xe3f298(0xc6)+a130_0x4630b0['cyan']('Skipped')));}await _0x90ef3c({'projectName':_0x12daac,'appCode':_0x1e1a33,'env':_0x480aa6||_0x2b87bc||_0xe3f298(0xc1)});}else await _0x90ef3c({'projectName':_0x12daac,'env':_0x480aa6||_0x2b87bc||_0xe3f298(0xc1)});}
1
+ (function(_0x2ac728,_0x3784f6){const _0x54d6e3=a132_0x3154,_0x195e2a=_0x2ac728();while(!![]){try{const _0x180495=-parseInt(_0x54d6e3(0x99))/0x1+parseInt(_0x54d6e3(0x96))/0x2+parseInt(_0x54d6e3(0xaa))/0x3+parseInt(_0x54d6e3(0xa6))/0x4+parseInt(_0x54d6e3(0xae))/0x5+-parseInt(_0x54d6e3(0xa1))/0x6+parseInt(_0x54d6e3(0x9d))/0x7*(-parseInt(_0x54d6e3(0xa5))/0x8);if(_0x180495===_0x3784f6)break;else _0x195e2a['push'](_0x195e2a['shift']());}catch(_0x14e907){_0x195e2a['push'](_0x195e2a['shift']());}}}(a132_0x8695,0x6c711));import{existsSync}from'node:fs';function a132_0x8695(){const _0x30724e=['my-app','1364872rQTicA','Project\x20name:','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','56389PtRArv','log','length','cyan','21bggMfD','resolve','production','Not\x20set','1164726ZVgEik','test','Project\x20name\x20cannot\x20exceed\x2050\x20characters','Logged\x20in','4510472oxaIgE','2172160merybZ','env','\x22\x20already\x20exists','trim','993441ynwxgP','green','string','Skipped','4147455bvJNgn','Directory\x20\x22','Login\x20failed','√\x20Login\x20status:\x20'];a132_0x8695=function(){return _0x30724e;};return a132_0x8695();}import a132_0x1ee66b from'node:path';import a132_0x5c4f1f from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';function a132_0x3154(_0x2d2820,_0x3fd01f){_0x2d2820=_0x2d2820-0x94;const _0x869554=a132_0x8695();let _0x315465=_0x869554[_0x2d2820];return _0x315465;}import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x167134,_0x3c44f2,_0x5e0dd3){const _0xa94226=a132_0x3154,_0x25e189=_0xa94226(0x95),_0x28cdee=readConfig(),_0x4f7128=typeof _0x28cdee[_0xa94226(0xa7)]===_0xa94226(0xac)?_0x28cdee['env']:undefined,_0x320bfd=await input({'message':_0xa94226(0x97),'default':_0x25e189,'validate':_0x36eb69=>{const _0x39277f=_0xa94226,_0x54f948=_0x36eb69[_0x39277f(0xa9)]()||_0x25e189;if(_0x54f948[_0x39277f(0x9b)]>0x32)return _0x39277f(0xa3);const _0x1d7364=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x54f948&&!_0x1d7364[_0x39277f(0xa2)](_0x54f948))return'Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_';const _0x367992=a132_0x1ee66b[_0x39277f(0x9e)](process['cwd'](),_0x54f948);if(existsSync(_0x367992))return _0x39277f(0xaf)+_0x54f948+_0x39277f(0xa8);return!![];}});console[_0xa94226(0x9a)](a132_0x5c4f1f[_0xa94226(0xab)]('√\x20Project\x20Name:\x20'+a132_0x5c4f1f[_0xa94226(0x9c)](_0x320bfd)));const _0x4a9c0f=await selectSingleAppcode(_0x5e0dd3);console[_0xa94226(0x9a)](a132_0x5c4f1f[_0xa94226(0xab)]('√\x20App\x20Code:\x20'+a132_0x5c4f1f[_0xa94226(0x9c)](_0x4a9c0f||_0xa94226(0xa0))));if(_0x4a9c0f){const _0x4bdc44=await getIsSessionValid();if(!_0x4bdc44){const _0x1a8c30=await confirm({'message':_0xa94226(0x98),'default':!![]});if(_0x1a8c30){const _0x3d3c59=await authServer({'silent':!![]});console[_0xa94226(0x9a)](a132_0x5c4f1f[_0xa94226(0xab)](_0xa94226(0x94)+a132_0x5c4f1f['cyan'](_0x3d3c59?_0xa94226(0xa4):_0xa94226(0xb0))));}else console[_0xa94226(0x9a)](a132_0x5c4f1f[_0xa94226(0xab)](_0xa94226(0x94)+a132_0x5c4f1f[_0xa94226(0x9c)](_0xa94226(0xad))));}await _0x167134({'projectName':_0x320bfd,'appCode':_0x4a9c0f,'env':_0x3c44f2||_0x4f7128||'production'});}else await _0x167134({'projectName':_0x320bfd,'env':_0x3c44f2||_0x4f7128||_0xa94226(0x9f)});}
@@ -1 +1 @@
1
- (function(_0x47c7c0,_0x99f26c){const _0x2819f1=a131_0x5913,_0x502738=_0x47c7c0();while(!![]){try{const _0x26cdf0=-parseInt(_0x2819f1(0x186))/0x1+parseInt(_0x2819f1(0x18c))/0x2*(-parseInt(_0x2819f1(0x18e))/0x3)+parseInt(_0x2819f1(0x18d))/0x4+-parseInt(_0x2819f1(0x18a))/0x5*(parseInt(_0x2819f1(0x189))/0x6)+parseInt(_0x2819f1(0x190))/0x7+parseInt(_0x2819f1(0x18f))/0x8+parseInt(_0x2819f1(0x18b))/0x9;if(_0x26cdf0===_0x99f26c)break;else _0x502738['push'](_0x502738['shift']());}catch(_0x1d4581){_0x502738['push'](_0x502738['shift']());}}}(a131_0x203f,0xda1fc));export function formatElapsed(_0x1b57a3){const _0x5bed6a=a131_0x5913,_0x46f3da=Date[_0x5bed6a(0x191)]()-_0x1b57a3;if(_0x46f3da<0x3e8)return _0x46f3da+'ms';const _0xbea6d7=(_0x46f3da/0x3e8)[_0x5bed6a(0x188)](0x2),_0x1e0ddb=_0xbea6d7[_0x5bed6a(0x187)](/\.?0+$/u,'');return _0x1e0ddb+'s';}function a131_0x5913(_0x48f99e,_0x21d899){_0x48f99e=_0x48f99e-0x186;const _0x203f29=a131_0x203f();let _0x591379=_0x203f29[_0x48f99e];return _0x591379;}function a131_0x203f(){const _0x104d7d=['2070JcaGSJ','16770TkKlyn','8538003ubQdfQ','334wGtDSj','5348548fTpORf','16221nMayTc','1939200qKTGDQ','10727738rsJaXq','now','1107203dvmxwt','replace','toFixed'];a131_0x203f=function(){return _0x104d7d;};return a131_0x203f();}
1
+ (function(_0x49330e,_0x2baeb6){const _0x470c50=a133_0x86f3,_0x3145be=_0x49330e();while(!![]){try{const _0x31e24d=parseInt(_0x470c50(0x77))/0x1+-parseInt(_0x470c50(0x72))/0x2+parseInt(_0x470c50(0x71))/0x3*(parseInt(_0x470c50(0x75))/0x4)+parseInt(_0x470c50(0x7a))/0x5+parseInt(_0x470c50(0x78))/0x6+parseInt(_0x470c50(0x79))/0x7+parseInt(_0x470c50(0x7b))/0x8*(-parseInt(_0x470c50(0x74))/0x9);if(_0x31e24d===_0x2baeb6)break;else _0x3145be['push'](_0x3145be['shift']());}catch(_0x98a957){_0x3145be['push'](_0x3145be['shift']());}}}(a133_0x5dec,0x668ed));function a133_0x86f3(_0x4c553a,_0x156e0d){_0x4c553a=_0x4c553a-0x71;const _0x5dec8b=a133_0x5dec();let _0x86f30d=_0x5dec8b[_0x4c553a];return _0x86f30d;}export function formatElapsed(_0x4f2024){const _0x5e50fc=a133_0x86f3,_0x5ddc26=Date[_0x5e50fc(0x73)]()-_0x4f2024;if(_0x5ddc26<0x3e8)return _0x5ddc26+'ms';const _0x4a430d=(_0x5ddc26/0x3e8)['toFixed'](0x2),_0x41934e=_0x4a430d[_0x5e50fc(0x76)](/\.?0+$/u,'');return _0x41934e+'s';}function a133_0x5dec(){const _0x3321f1=['now','214893MUqblZ','4panYrc','replace','438587SMMJsS','969750fruwOf','732732kPysMi','1755330vFOBMa','152EGDone','691554mdjBxg','825464VMhBUp'];a133_0x5dec=function(){return _0x3321f1;};return a133_0x5dec();}
@@ -1 +1 @@
1
- (function(_0x28d0c2,_0x2e1284){const _0x3b8849=a132_0x17e8,_0x2c9222=_0x28d0c2();while(!![]){try{const _0x3655ef=-parseInt(_0x3b8849(0x230))/0x1*(parseInt(_0x3b8849(0x1f4))/0x2)+parseInt(_0x3b8849(0x1ee))/0x3*(-parseInt(_0x3b8849(0x22d))/0x4)+parseInt(_0x3b8849(0x235))/0x5*(parseInt(_0x3b8849(0x204))/0x6)+parseInt(_0x3b8849(0x224))/0x7*(parseInt(_0x3b8849(0x246))/0x8)+-parseInt(_0x3b8849(0x22b))/0x9*(-parseInt(_0x3b8849(0x1ed))/0xa)+parseInt(_0x3b8849(0x1fe))/0xb+-parseInt(_0x3b8849(0x221))/0xc*(parseInt(_0x3b8849(0x219))/0xd);if(_0x3655ef===_0x2e1284)break;else _0x2c9222['push'](_0x2c9222['shift']());}catch(_0x5b5d75){_0x2c9222['push'](_0x2c9222['shift']());}}}(a132_0xdee6,0xb26fa));import a132_0x2a4603 from'path';import a132_0x44202b from'fs';function a132_0xdee6(){const _0x46d526=['cd\x20','*\x20Configuring\x20AppCode\x20for\x20project\x20','appCode','\x20config\x20set\x20appcode\x20<app-code>\x27','配置应用AppCode:\x20','green','\x20already\x20exists','182RGpUQH','needsUpgrade','CLI\x20版本检查','string','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','version','stableVersion','API\x20配置拉取异常','1961412onnxzT','Project\x20directory\x20','projectName','917FVqafT','existsSync','trim','fail','env','Project\x20name\x20cannot\x20be\x20empty','chdir','63VBFMmf','join','5392lYNrnE','error','开始创建项目:\x20','74823fQurpz','\x20run\x20start','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','description','info','1690vUWUrB','配置应用AppCode失败','项目创建完成:\x20','message','更新\x20package.json\x20失败','√\x20Configuration\x20file\x20created,\x20Apps:\x20','项目创建失败:\x20','repeat','更新\x20package.json\x20name','package.json','\x20api\x20pull','resolve','production','apps','stringify','清理项目目录失败:\x20','keys','83488dbaDvO','1.0.0','bold','cyan','1515170oJiDyh','1464vSSUXB','W_OK','readFileSync','minimumVersion','modelCount','test','8ookefF','name','cookie','cwd','warn','belowMinimum','√\x20Pulled\x20','🚀\x20Next\x20Steps:','Install\x20dependencies','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','9085175koSkzy','√\x20package.json\x20updated:\x20name=','projectCode','constants','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','log','12828WttHMT','parse','\x20\x202.\x20Pull\x20API\x20configuration:\x20','*\x20Pulling\x20API\x20configuration...','\x20|\x20Default:\x20','create','defaultApp','length','\x20|\x20AppCode:\x20','stop','dirname','\x20\x201.\x20Start\x20project:\x20','\x20√\x20','utf8'];a132_0xdee6=function(){return _0x46d526;};return a132_0xdee6();}import a132_0x42a02e from'chalk';import a132_0x1a8790 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';function a132_0x17e8(_0x5542ed,_0x2bb7fe){_0x5542ed=_0x5542ed-0x1eb;const _0xdee643=a132_0xdee6();let _0x17e8ce=_0xdee643[_0x5542ed];return _0x17e8ce;}import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x51a381){const _0x5c780f=a132_0x17e8,_0x20162e=await checkCliVersion();(_0x20162e[_0x5c780f(0x21a)]||_0x20162e[_0x5c780f(0x1f9)])&&(printCliUpgradeWarning(_0x20162e),assertCliVersionSupported(_0x20162e),logger[_0x5c780f(0x234)](_0x5c780f(0x209),_0x5c780f(0x21b),{'currentVersion':_0x20162e['currentVersion'],'stableVersion':_0x20162e[_0x5c780f(0x21f)],'minimumVersion':_0x20162e[_0x5c780f(0x1f1)],'needsUpgrade':_0x20162e[_0x5c780f(0x21a)],'belowMinimum':_0x20162e['belowMinimum']}));if(_0x51a381[_0x5c780f(0x200)]&&_0x51a381[_0x5c780f(0x214)])await runCreate({'projectName':_0x51a381['projectCode'],'appCode':_0x51a381[_0x5c780f(0x214)],'env':_0x51a381[_0x5c780f(0x228)]},_0x51a381);else{if(_0x51a381[_0x5c780f(0x200)]){const _0x1476b3=await selectSingleAppcode(_0x51a381['cookie']);await runCreate({'projectName':_0x51a381['projectCode'],'appCode':_0x1476b3||undefined,'env':_0x51a381[_0x5c780f(0x228)]},_0x51a381);}else await guidedCreateProject(_0x39ba04=>runCreate(_0x39ba04,_0x51a381),_0x51a381[_0x5c780f(0x228)],_0x51a381[_0x5c780f(0x1f6)]);}}async function runCreate(_0x31cf9c,_0x22bad5){const _0xd3c84e=a132_0x17e8;if(!_0x31cf9c[_0xd3c84e(0x223)]||_0x31cf9c[_0xd3c84e(0x223)][_0xd3c84e(0x226)]()==='')throw new Error(_0xd3c84e(0x229));const _0x131ab1=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x131ab1[_0xd3c84e(0x1f3)](_0x31cf9c['projectName']))throw new Error('Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x31cf9c['projectName'][_0xd3c84e(0x20b)]>0x64)throw new Error(_0xd3c84e(0x1fd));const _0x57cfc7=a132_0x2a4603['resolve'](process['cwd'](),_0x31cf9c[_0xd3c84e(0x223)]);if(a132_0x44202b[_0xd3c84e(0x225)](_0x57cfc7))throw new Error(_0xd3c84e(0x222)+_0x31cf9c[_0xd3c84e(0x223)]+_0xd3c84e(0x218));try{a132_0x44202b['accessSync'](a132_0x2a4603[_0xd3c84e(0x20e)](_0x57cfc7),a132_0x44202b[_0xd3c84e(0x201)][_0xd3c84e(0x1ef)]);}catch{throw new Error('Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions');}logger['setLogPath'](_0x57cfc7),logger[_0xd3c84e(0x234)](_0xd3c84e(0x209),_0xd3c84e(0x22f)+_0x31cf9c[_0xd3c84e(0x223)],{'projectDir':_0x57cfc7,'appCode':_0x31cf9c[_0xd3c84e(0x214)]}),console['log'](),console[_0xd3c84e(0x203)](a132_0x42a02e['green'](_0xd3c84e(0x210))+'Project\x20name:\x20'+a132_0x42a02e[_0xd3c84e(0x217)](_0x31cf9c['projectName'])+(_0x31cf9c['appCode']?_0xd3c84e(0x20c)+a132_0x42a02e[_0xd3c84e(0x1ec)](_0x31cf9c['appCode']):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x31cf9c[_0xd3c84e(0x223)])),await updatePackageJsonName(_0x31cf9c['projectName']),await runTask(_0xd3c84e(0x1fc),()=>installDependencies(_0x31cf9c[_0xd3c84e(0x223)])),await runTask('Format\x20code',()=>formatProjectCode(_0x31cf9c[_0xd3c84e(0x223)])),await configureAppCode(_0x31cf9c[_0xd3c84e(0x223)],_0x31cf9c[_0xd3c84e(0x214)]||'',_0x31cf9c[_0xd3c84e(0x228)]);let _0xa9adaa=![];if(_0x31cf9c[_0xd3c84e(0x214)]){console[_0xd3c84e(0x203)](_0xd3c84e(0x207));const _0x3a9fad=process[_0xd3c84e(0x1f7)]();try{process[_0xd3c84e(0x22a)](_0x57cfc7);const _0x482a82=_0x31cf9c[_0xd3c84e(0x228)]||_0xd3c84e(0x241);initEnv(_0x482a82);const {configArray:_0x2ff0b9}=await fetchModelList(_0x31cf9c[_0xd3c84e(0x214)],_0x22bad5[_0xd3c84e(0x1f6)]||''),_0x588723=DEFAULT_API_DIR,_0x240158=await generateApiFile(_0x2ff0b9,'',_0x31cf9c[_0xd3c84e(0x214)],!![],_0x482a82,_0x588723);console['log'](_0xd3c84e(0x1fa)+_0x2ff0b9['length']+'\x20dataset(s),\x20generated\x20'+_0x240158[_0xd3c84e(0x1f2)]+'\x20model(s)'),logger['info'](_0xd3c84e(0x209),'API\x20configuration\x20pulled:\x20'+_0x31cf9c['appCode']);}catch(_0x1dc68d){_0xa9adaa=!![],console[_0xd3c84e(0x203)](_0xd3c84e(0x232)),logger[_0xd3c84e(0x1f8)]('create',_0xd3c84e(0x220),{'error':_0x1dc68d instanceof Error?_0x1dc68d[_0xd3c84e(0x238)]:String(_0x1dc68d)});}finally{process[_0xd3c84e(0x22a)](_0x3a9fad);}}logger['success'](_0xd3c84e(0x209),_0xd3c84e(0x237)+_0x31cf9c[_0xd3c84e(0x223)]),console[_0xd3c84e(0x203)](),console['log'](a132_0x42a02e['green']('─'['repeat'](0x3c))),console[_0xd3c84e(0x203)](a132_0x42a02e[_0xd3c84e(0x1ec)][_0xd3c84e(0x1eb)](_0xd3c84e(0x1fb))),console[_0xd3c84e(0x203)](),console['log'](_0xd3c84e(0x20f)+a132_0x42a02e['cyan'][_0xd3c84e(0x1eb)](_0xd3c84e(0x212)+_0x31cf9c[_0xd3c84e(0x223)]+'\x20&&\x20'+CLI_BIN_NAME+_0xd3c84e(0x231))),_0xa9adaa&&console[_0xd3c84e(0x203)](_0xd3c84e(0x206)+a132_0x42a02e[_0xd3c84e(0x1ec)][_0xd3c84e(0x1eb)](CLI_BIN_NAME+_0xd3c84e(0x23f))),console['log'](a132_0x42a02e[_0xd3c84e(0x217)]('─'[_0xd3c84e(0x23c)](0x3c)));}catch(_0x2519ae){logger[_0xd3c84e(0x22e)]('create',_0xd3c84e(0x23b)+_0x31cf9c[_0xd3c84e(0x223)],{'error':_0x2519ae instanceof Error?_0x2519ae[_0xd3c84e(0x238)]:String(_0x2519ae)});try{a132_0x44202b[_0xd3c84e(0x225)](_0x57cfc7)&&(console[_0xd3c84e(0x203)]('*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20'+_0x57cfc7),a132_0x44202b['rmSync'](_0x57cfc7,{'recursive':!![],'force':!![]}));}catch{logger[_0xd3c84e(0x1f8)](_0xd3c84e(0x209),_0xd3c84e(0x244)+_0x57cfc7);}throw _0x2519ae;}}async function runTask(_0x3b527a,_0x5bd27b){const _0x109ce3=a132_0x17e8,_0x44956c=a132_0x1a8790(_0x3b527a+'...')['start']();try{const _0x2e14e5=await _0x5bd27b();_0x44956c[_0x109ce3(0x20d)](),console[_0x109ce3(0x203)](''+a132_0x42a02e[_0x109ce3(0x217)]('\x20√\x20')+_0x3b527a+'\x20'+a132_0x42a02e['gray']('['+_0x2e14e5+']'));}catch(_0x8b5ee8){_0x44956c[_0x109ce3(0x227)](_0x3b527a);throw _0x8b5ee8;}}async function updatePackageJsonName(_0x5ecf86){const _0x51a9fe=a132_0x17e8,_0x4bed27=a132_0x2a4603[_0x51a9fe(0x240)](process[_0x51a9fe(0x1f7)](),_0x5ecf86),_0x4c566e=a132_0x2a4603['join'](_0x4bed27,_0x51a9fe(0x23e));try{console[_0x51a9fe(0x203)](_0x51a9fe(0x202));const _0x73f5c7=getRabetbaseCliPackageRoot(),_0x32be24=a132_0x2a4603[_0x51a9fe(0x22c)](_0x73f5c7,'package.json');let _0x510009=_0x51a9fe(0x247);try{const _0x2e8429=JSON[_0x51a9fe(0x205)](a132_0x44202b[_0x51a9fe(0x1f0)](_0x32be24,_0x51a9fe(0x211)));_0x510009=_0x2e8429[_0x51a9fe(0x21e)]||_0x51a9fe(0x247);}catch{}const _0x45623a=a132_0x44202b['readFileSync'](_0x4c566e,_0x51a9fe(0x211)),_0x95488a=JSON[_0x51a9fe(0x205)](_0x45623a);_0x95488a[_0x51a9fe(0x1f5)]=_0x5ecf86,_0x95488a[_0x51a9fe(0x233)]=_0x5ecf86+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0x510009,a132_0x44202b['writeFileSync'](_0x4c566e,JSON[_0x51a9fe(0x243)](_0x95488a,null,0x2)+'\x0a','utf8'),console['log'](_0x51a9fe(0x1ff)+_0x5ecf86),logger[_0x51a9fe(0x234)](_0x51a9fe(0x209),_0x51a9fe(0x23d));}catch(_0x41c004){logger[_0x51a9fe(0x22e)](_0x51a9fe(0x209),_0x51a9fe(0x239));throw _0x41c004;}}async function configureAppCode(_0x4e79b5,_0xe22034,_0x268fcf){const _0x1a1115=a132_0x17e8,_0x14ed38=a132_0x2a4603[_0x1a1115(0x240)](process[_0x1a1115(0x1f7)](),_0x4e79b5),_0x3affba=a132_0x2a4603[_0x1a1115(0x22c)](_0x14ed38,NEW_CONFIG_NAME);try{_0xe22034?console[_0x1a1115(0x203)](_0x1a1115(0x213)+_0x4e79b5+':\x20'+_0xe22034):console[_0x1a1115(0x203)](_0x1a1115(0x21d)+_0x4e79b5);const _0x5aadcc=getRabetbaseCliPackageRoot(),_0x326dea=a132_0x2a4603[_0x1a1115(0x22c)](_0x5aadcc,_0x1a1115(0x23e));let _0x5e4f49=_0x1a1115(0x247);try{const _0x2508ea=JSON['parse'](a132_0x44202b[_0x1a1115(0x1f0)](_0x326dea,_0x1a1115(0x211)));_0x5e4f49=_0x2508ea[_0x1a1115(0x21e)]||_0x1a1115(0x247);}catch{}const _0x45bbc0=readConfig(),_0x41da24=typeof _0x45bbc0[_0x1a1115(0x228)]===_0x1a1115(0x21c)?_0x45bbc0['env']:undefined,_0x5e116c={};for(const _0x212594 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x45bbc0[_0x212594]!=null)_0x5e116c[_0x212594]=_0x45bbc0[_0x212594];}const _0xc9fde8=buildCanonicalProjectConfig(_0x5e116c,{'appCodes':_0xe22034?[_0xe22034]:[],'env':_0x268fcf||_0x41da24||'production','metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x5e4f49}});writeConfigFile(_0x3affba,_0xc9fde8),_0xe22034?console[_0x1a1115(0x203)](_0x1a1115(0x23a)+Object[_0x1a1115(0x245)](_0xc9fde8[_0x1a1115(0x242)]||{})[_0x1a1115(0x22c)](',\x20')+_0x1a1115(0x208)+_0xc9fde8[_0x1a1115(0x20a)]):console['log']('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+_0x1a1115(0x215)),logger['info'](_0x1a1115(0x209),_0x1a1115(0x216)+_0xe22034);}catch(_0x229747){logger[_0x1a1115(0x22e)](_0x1a1115(0x209),_0x1a1115(0x236));}}
1
+ (function(_0x1feee6,_0x56ac02){const _0x2a7016=a134_0x5c3d,_0x4f21ee=_0x1feee6();while(!![]){try{const _0x1ca756=-parseInt(_0x2a7016(0x170))/0x1*(-parseInt(_0x2a7016(0x15a))/0x2)+parseInt(_0x2a7016(0x161))/0x3+-parseInt(_0x2a7016(0x13e))/0x4+-parseInt(_0x2a7016(0x13c))/0x5+-parseInt(_0x2a7016(0x175))/0x6+-parseInt(_0x2a7016(0x15d))/0x7*(-parseInt(_0x2a7016(0x130))/0x8)+parseInt(_0x2a7016(0x12f))/0x9;if(_0x1ca756===_0x56ac02)break;else _0x4f21ee['push'](_0x4f21ee['shift']());}catch(_0x5c1c86){_0x4f21ee['push'](_0x4f21ee['shift']());}}}(a134_0x37d7,0xe3e44));import a134_0x422514 from'path';import a134_0x4f7fc4 from'fs';import a134_0x360d0e from'chalk';function a134_0x5c3d(_0x47b0da,_0x4aef78){_0x47b0da=_0x47b0da-0x11c;const _0x37d789=a134_0x37d7();let _0x5c3d23=_0x37d789[_0x47b0da];return _0x5c3d23;}import a134_0x605785 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'../../../commands/project/create/use-copy-project-template.js';import{installDependencies}from'../../../commands/project/create/use-install-dependencies.js';function a134_0x37d7(){const _0x52144f=['\x20dataset(s),\x20generated\x20','fail','message','dirname','项目创建完成:\x20','appCode','constants','defaultApp','√\x20Pulled\x20','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','toLocaleString','green','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','196618djowOU','needsUpgrade','resolve','1.0.0','package.json','11091762ZuNPib','create','readFileSync','belowMinimum','error','env','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','\x20\x201.\x20Start\x20project:\x20','项目创建失败:\x20','Install\x20dependencies','开始创建项目:\x20','stop','utf8','\x20already\x20exists','modelCount','更新\x20package.json\x20name','\x20run\x20start','bold','cookie','gray','21587409dteGAF','40kUHhzc','配置应用AppCode失败','minimumVersion','repeat','√\x20package.json\x20updated:\x20name=','Project\x20directory\x20','existsSync','cwd','join','name','更新\x20package.json\x20失败','string','2034525xeCGth','API\x20configuration\x20pulled:\x20','4467604shntNe','rmSync','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','Copy\x20project\x20files','projectCode','\x20|\x20AppCode:\x20','info','清理项目目录失败:\x20','version','test','chdir','API\x20配置拉取异常','\x20&&\x20','currentVersion','*\x20Configuring\x20AppCode\x20for\x20project\x20','accessSync','warn','🚀\x20Next\x20Steps:','Project\x20name:\x20','parse','cyan','CLI\x20版本检查','√\x20Configuration\x20file\x20created,\x20Apps:\x20','\x20model(s)','projectName','setLogPath','length','apps','2dPHvbx','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','\x20api\x20pull','1531859KlacCU','start','writeFileSync','log','1849419KTTgRF','production'];a134_0x37d7=function(){return _0x52144f;};return a134_0x37d7();}import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';import{logger}from'../../../utils/logger.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x1a0bf9){const _0x588d54=a134_0x5c3d,_0xc13ec4=await checkCliVersion();(_0xc13ec4[_0x588d54(0x171)]||_0xc13ec4['belowMinimum'])&&(printCliUpgradeWarning(_0xc13ec4),assertCliVersionSupported(_0xc13ec4),logger[_0x588d54(0x144)]('create',_0x588d54(0x153),{'currentVersion':_0xc13ec4[_0x588d54(0x14b)],'stableVersion':_0xc13ec4['stableVersion'],'minimumVersion':_0xc13ec4[_0x588d54(0x132)],'needsUpgrade':_0xc13ec4[_0x588d54(0x171)],'belowMinimum':_0xc13ec4[_0x588d54(0x11e)]}));if(_0x1a0bf9[_0x588d54(0x142)]&&_0x1a0bf9['appCode'])await runCreate({'projectName':_0x1a0bf9[_0x588d54(0x142)],'appCode':_0x1a0bf9[_0x588d54(0x168)],'env':_0x1a0bf9[_0x588d54(0x120)]},_0x1a0bf9);else{if(_0x1a0bf9[_0x588d54(0x142)]){const _0x9bb992=await selectSingleAppcode(_0x1a0bf9[_0x588d54(0x12d)]);await runCreate({'projectName':_0x1a0bf9['projectCode'],'appCode':_0x9bb992||undefined,'env':_0x1a0bf9[_0x588d54(0x120)]},_0x1a0bf9);}else await guidedCreateProject(_0x4bb638=>runCreate(_0x4bb638,_0x1a0bf9),_0x1a0bf9['env'],_0x1a0bf9[_0x588d54(0x12d)]);}}async function runCreate(_0x468ee9,_0x3b5226){const _0x128fdd=a134_0x5c3d;if(!_0x468ee9[_0x128fdd(0x156)]||_0x468ee9[_0x128fdd(0x156)]['trim']()==='')throw new Error('Project\x20name\x20cannot\x20be\x20empty');const _0x37a0dd=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x37a0dd[_0x128fdd(0x147)](_0x468ee9['projectName']))throw new Error(_0x128fdd(0x140));if(_0x468ee9['projectName'][_0x128fdd(0x158)]>0x64)throw new Error('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters');const _0x18aaf2=a134_0x422514[_0x128fdd(0x172)](process['cwd'](),_0x468ee9['projectName']);if(a134_0x4f7fc4[_0x128fdd(0x136)](_0x18aaf2))throw new Error(_0x128fdd(0x135)+_0x468ee9[_0x128fdd(0x156)]+_0x128fdd(0x128));try{a134_0x4f7fc4[_0x128fdd(0x14d)](a134_0x422514[_0x128fdd(0x166)](_0x18aaf2),a134_0x4f7fc4[_0x128fdd(0x169)]['W_OK']);}catch{throw new Error(_0x128fdd(0x121));}logger[_0x128fdd(0x157)](_0x18aaf2),logger['info']('create',_0x128fdd(0x125)+_0x468ee9[_0x128fdd(0x156)],{'projectDir':_0x18aaf2,'appCode':_0x468ee9['appCode']}),console[_0x128fdd(0x160)](),console['log'](a134_0x360d0e[_0x128fdd(0x16e)]('\x20√\x20')+_0x128fdd(0x150)+a134_0x360d0e[_0x128fdd(0x16e)](_0x468ee9[_0x128fdd(0x156)])+(_0x468ee9[_0x128fdd(0x168)]?_0x128fdd(0x143)+a134_0x360d0e[_0x128fdd(0x152)](_0x468ee9[_0x128fdd(0x168)]):''));try{await runTask(_0x128fdd(0x141),()=>copyProjectTemplate(_0x468ee9[_0x128fdd(0x156)])),await updatePackageJsonName(_0x468ee9[_0x128fdd(0x156)]),await runTask(_0x128fdd(0x124),()=>installDependencies(_0x468ee9['projectName'])),await runTask('Format\x20code',()=>formatProjectCode(_0x468ee9[_0x128fdd(0x156)])),await configureAppCode(_0x468ee9['projectName'],_0x468ee9[_0x128fdd(0x168)]||'',_0x468ee9[_0x128fdd(0x120)]);let _0x36ce4c=![];if(_0x468ee9[_0x128fdd(0x168)]){console[_0x128fdd(0x160)]('*\x20Pulling\x20API\x20configuration...');const _0x5e38f5=process[_0x128fdd(0x137)]();try{process[_0x128fdd(0x148)](_0x18aaf2);const _0x234efc=_0x468ee9[_0x128fdd(0x120)]||_0x128fdd(0x162);initEnv(_0x234efc);const {configArray:_0x429b98}=await fetchModelList(_0x468ee9['appCode'],_0x3b5226[_0x128fdd(0x12d)]||''),_0x214624=DEFAULT_API_DIR,_0x228eee=await generateApiFile(_0x429b98,'',_0x468ee9[_0x128fdd(0x168)],!![],_0x234efc,_0x214624);console['log'](_0x128fdd(0x16b)+_0x429b98[_0x128fdd(0x158)]+_0x128fdd(0x163)+_0x228eee[_0x128fdd(0x129)]+_0x128fdd(0x155)),logger[_0x128fdd(0x144)](_0x128fdd(0x11c),_0x128fdd(0x13d)+_0x468ee9[_0x128fdd(0x168)]);}catch(_0x390b73){_0x36ce4c=!![],console[_0x128fdd(0x160)](_0x128fdd(0x15b)),logger[_0x128fdd(0x14e)](_0x128fdd(0x11c),_0x128fdd(0x149),{'error':_0x390b73 instanceof Error?_0x390b73[_0x128fdd(0x165)]:String(_0x390b73)});}finally{process[_0x128fdd(0x148)](_0x5e38f5);}}logger['success'](_0x128fdd(0x11c),_0x128fdd(0x167)+_0x468ee9[_0x128fdd(0x156)]),console[_0x128fdd(0x160)](),console[_0x128fdd(0x160)](a134_0x360d0e['green']('─'[_0x128fdd(0x133)](0x3c))),console[_0x128fdd(0x160)](a134_0x360d0e[_0x128fdd(0x152)][_0x128fdd(0x12c)](_0x128fdd(0x14f))),console[_0x128fdd(0x160)](),console[_0x128fdd(0x160)](_0x128fdd(0x122)+a134_0x360d0e[_0x128fdd(0x152)]['bold']('cd\x20'+_0x468ee9[_0x128fdd(0x156)]+_0x128fdd(0x14a)+CLI_BIN_NAME+_0x128fdd(0x12b))),_0x36ce4c&&console[_0x128fdd(0x160)]('\x20\x202.\x20Pull\x20API\x20configuration:\x20'+a134_0x360d0e[_0x128fdd(0x152)][_0x128fdd(0x12c)](CLI_BIN_NAME+_0x128fdd(0x15c))),console[_0x128fdd(0x160)](a134_0x360d0e['green']('─'[_0x128fdd(0x133)](0x3c)));}catch(_0x1cb933){logger['error'](_0x128fdd(0x11c),_0x128fdd(0x123)+_0x468ee9['projectName'],{'error':_0x1cb933 instanceof Error?_0x1cb933['message']:String(_0x1cb933)});try{a134_0x4f7fc4['existsSync'](_0x18aaf2)&&(console[_0x128fdd(0x160)](_0x128fdd(0x16f)+_0x18aaf2),a134_0x4f7fc4[_0x128fdd(0x13f)](_0x18aaf2,{'recursive':!![],'force':!![]}));}catch{logger[_0x128fdd(0x14e)](_0x128fdd(0x11c),_0x128fdd(0x145)+_0x18aaf2);}throw _0x1cb933;}}async function runTask(_0x11fd49,_0x19e645){const _0x93f174=a134_0x5c3d,_0x4f9299=a134_0x605785(_0x11fd49+'...')[_0x93f174(0x15e)]();try{const _0x35e79c=await _0x19e645();_0x4f9299[_0x93f174(0x126)](),console[_0x93f174(0x160)](''+a134_0x360d0e['green']('\x20√\x20')+_0x11fd49+'\x20'+a134_0x360d0e[_0x93f174(0x12e)]('['+_0x35e79c+']'));}catch(_0x54855f){_0x4f9299[_0x93f174(0x164)](_0x11fd49);throw _0x54855f;}}async function updatePackageJsonName(_0x452dad){const _0x3b2238=a134_0x5c3d,_0x1d55db=a134_0x422514['resolve'](process[_0x3b2238(0x137)](),_0x452dad),_0x57393f=a134_0x422514[_0x3b2238(0x138)](_0x1d55db,_0x3b2238(0x174));try{console[_0x3b2238(0x160)](_0x3b2238(0x16c));const _0x883b8b=getRabetbaseCliPackageRoot(),_0xf15788=a134_0x422514['join'](_0x883b8b,_0x3b2238(0x174));let _0x5dfb7f='1.0.0';try{const _0x3a3844=JSON[_0x3b2238(0x151)](a134_0x4f7fc4[_0x3b2238(0x11d)](_0xf15788,_0x3b2238(0x127)));_0x5dfb7f=_0x3a3844[_0x3b2238(0x146)]||_0x3b2238(0x173);}catch{}const _0x5b13eb=a134_0x4f7fc4['readFileSync'](_0x57393f,_0x3b2238(0x127)),_0x11568b=JSON[_0x3b2238(0x151)](_0x5b13eb);_0x11568b[_0x3b2238(0x139)]=_0x452dad,_0x11568b['description']=_0x452dad+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0x5dfb7f,a134_0x4f7fc4[_0x3b2238(0x15f)](_0x57393f,JSON['stringify'](_0x11568b,null,0x2)+'\x0a',_0x3b2238(0x127)),console[_0x3b2238(0x160)](_0x3b2238(0x134)+_0x452dad),logger[_0x3b2238(0x144)]('create',_0x3b2238(0x12a));}catch(_0xd3743b){logger[_0x3b2238(0x11f)](_0x3b2238(0x11c),_0x3b2238(0x13a));throw _0xd3743b;}}async function configureAppCode(_0x3a03d7,_0x165704,_0x3a4979){const _0x207d09=a134_0x5c3d,_0xf474cd=a134_0x422514['resolve'](process['cwd'](),_0x3a03d7),_0x431b73=a134_0x422514[_0x207d09(0x138)](_0xf474cd,NEW_CONFIG_NAME);try{_0x165704?console[_0x207d09(0x160)](_0x207d09(0x14c)+_0x3a03d7+':\x20'+_0x165704):console[_0x207d09(0x160)]('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x3a03d7);const _0x1547a6=getRabetbaseCliPackageRoot(),_0x3c4a1f=a134_0x422514[_0x207d09(0x138)](_0x1547a6,_0x207d09(0x174));let _0x4471c8=_0x207d09(0x173);try{const _0x598c9e=JSON['parse'](a134_0x4f7fc4['readFileSync'](_0x3c4a1f,_0x207d09(0x127)));_0x4471c8=_0x598c9e['version']||_0x207d09(0x173);}catch{}const _0x113b4a=readConfig(),_0x2e75b6=typeof _0x113b4a[_0x207d09(0x120)]===_0x207d09(0x13b)?_0x113b4a['env']:undefined,_0x20f622={};for(const _0x50bd57 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x113b4a[_0x50bd57]!=null)_0x20f622[_0x50bd57]=_0x113b4a[_0x50bd57];}const _0x5c7682=buildCanonicalProjectConfig(_0x20f622,{'appCodes':_0x165704?[_0x165704]:[],'env':_0x3a4979||_0x2e75b6||_0x207d09(0x162),'metadata':{'createdAt':new Date()[_0x207d09(0x16d)](),'version':_0x4471c8}});writeConfigFile(_0x431b73,_0x5c7682),_0x165704?console[_0x207d09(0x160)](_0x207d09(0x154)+Object['keys'](_0x5c7682[_0x207d09(0x159)]||{})['join'](',\x20')+'\x20|\x20Default:\x20'+_0x5c7682[_0x207d09(0x16a)]):console[_0x207d09(0x160)]('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+'\x20config\x20set\x20appcode\x20<app-code>\x27'),logger[_0x207d09(0x144)](_0x207d09(0x11c),'配置应用AppCode:\x20'+_0x165704);}catch(_0x25b9ac){logger[_0x207d09(0x11f)](_0x207d09(0x11c),_0x207d09(0x131));}}
@@ -1 +1 @@
1
- (function(_0x26fd33,_0x30e166){const _0x376213=a133_0x3f4f,_0x506cf0=_0x26fd33();while(!![]){try{const _0x211640=-parseInt(_0x376213(0xdd))/0x1+-parseInt(_0x376213(0xc0))/0x2*(-parseInt(_0x376213(0xbe))/0x3)+-parseInt(_0x376213(0xc1))/0x4*(-parseInt(_0x376213(0xaf))/0x5)+-parseInt(_0x376213(0xc4))/0x6*(parseInt(_0x376213(0xd7))/0x7)+-parseInt(_0x376213(0xb6))/0x8+parseInt(_0x376213(0xca))/0x9*(-parseInt(_0x376213(0xd0))/0xa)+parseInt(_0x376213(0xc3))/0xb;if(_0x211640===_0x30e166)break;else _0x506cf0['push'](_0x506cf0['shift']());}catch(_0x5de31f){_0x506cf0['push'](_0x506cf0['shift']());}}}(a133_0x6ba8,0x4c97b));function a133_0x3f4f(_0x41ce23,_0x313e0c){_0x41ce23=_0x41ce23-0xa2;const _0x6ba8ff=a133_0x6ba8();let _0x3f4f37=_0x6ba8ff[_0x41ce23];return _0x3f4f37;}import a133_0x1bfb1b from'path';import a133_0x3810c2 from'fs/promises';import{existsSync}from'fs';function a133_0x6ba8(){const _0x223633=['package.json','7UBXrER','bun','chdir','\x20\x20√\x20Pulled\x20','\x20\x20Pulling\x20API\x20configuration...','Project\x20name\x20cannot\x20be\x20empty.','346186gjTEEq','\x20\x20rabetbase\x20run\x20start\x0a','\x20\x20√\x20Code\x20formatted','\x20\x20√\x20Configuration\x20file\x20created','\x20dataset(s),\x20generated\x20','resolve','parse','\x20\x20Installing\x20dependencies...','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','\x20\x20√\x20Project\x20template\x20created','join','validation','Project\x20name\x20contains\x20invalid\x20characters.','\x0a\x20\x20cd\x20','65LPomft','npm','env','trim','cwd','production','access','3499504fMsLRu','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','constants','\x20created\x20successfully!','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','needsUpgrade','modelCount','readFile','3GCvdSS','*\x20Creating\x20project\x20','1240948zxRtTZ','2548Fbotyi','length','12927915bdfVUP','3181182ktNmJI','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','description','log','belowMinimum','ignore','9IcaLjO','dirname','name','W_OK','Use\x20a\x20different\x20project\x20name.','\x22\x20already\x20exists.','1764760PZkUJx','Cannot\x20create\x20project\x20in\x20current\x20directory.','bun\x20run\x20format','toLocaleString','\x20api\x20pull`\x20manually\x20later.','...'];a133_0x6ba8=function(){return _0x223633;};return a133_0x6ba8();}import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x4c3746,_0x4faf09,_0x5f531e,_0x599bc5){const _0x4f0f77=a133_0x3f4f,_0x284e8e=await checkCliVersion();(_0x284e8e[_0x4f0f77(0xbb)]||_0x284e8e[_0x4f0f77(0xc8)])&&(printCliUpgradeWarning(_0x284e8e),assertCliVersionSupported(_0x284e8e));if(!_0x4c3746||_0x4c3746[_0x4f0f77(0xb2)]()==='')throw CliErrors['validation'](_0x4f0f77(0xdc));const _0xaab121=/[<>:"|?*\x00-\x1f\x7f]/;if(_0xaab121['test'](_0x4c3746))throw CliErrors['validation'](_0x4f0f77(0xad),_0x4f0f77(0xa9));if(_0x4c3746[_0x4f0f77(0xc2)]>0x64)throw CliErrors['validation'](_0x4f0f77(0xba));const _0x3fd37f=a133_0x1bfb1b['resolve'](process['cwd'](),_0x4c3746);if(existsSync(_0x3fd37f))throw CliErrors[_0x4f0f77(0xac)]('Project\x20directory\x20\x22'+_0x4c3746+_0x4f0f77(0xcf),_0x4f0f77(0xce));try{const _0x4465de=a133_0x1bfb1b[_0x4f0f77(0xcb)](_0x3fd37f);await a133_0x3810c2[_0x4f0f77(0xb5)](_0x4465de,a133_0x3810c2[_0x4f0f77(0xb8)][_0x4f0f77(0xcd)]);}catch{throw CliErrors[_0x4f0f77(0xac)](_0x4f0f77(0xd1),'Check\x20directory\x20permissions.');}try{console[_0x4f0f77(0xc7)](_0x4f0f77(0xbf)+_0x4c3746+_0x4f0f77(0xd5));const _0x3b2070=getSubAppReactDemoTemplateDir();await copyDirectory(_0x3b2070,_0x3fd37f),console[_0x4f0f77(0xc7)](_0x4f0f77(0xaa)),await updatePackageJsonName(_0x4c3746),console[_0x4f0f77(0xc7)]('\x20\x20√\x20package.json\x20updated'),console[_0x4f0f77(0xc7)](_0x4f0f77(0xa8)),console[_0x4f0f77(0xc7)](_0x4f0f77(0xb7)),await formatCode(_0x3fd37f),console['log'](_0x4f0f77(0xa3)),await configureProject(_0x4c3746,_0x5f531e,_0x4faf09),console[_0x4f0f77(0xc7)](_0x4f0f77(0xa4)),_0x5f531e&&await pullApiConfig(_0x3fd37f,_0x5f531e,_0x4faf09,_0x599bc5),console[_0x4f0f77(0xc7)]('\x0a√\x20Project\x20'+_0x4c3746+_0x4f0f77(0xb9)),console['log'](_0x4f0f77(0xae)+_0x4c3746),console[_0x4f0f77(0xc7)](_0x4f0f77(0xa2));}catch(_0x2ff150){try{existsSync(_0x3fd37f)&&await a133_0x3810c2['rm'](_0x3fd37f,{'recursive':!![],'force':!![]});}catch{}throw _0x2ff150;}}async function updatePackageJsonName(_0x16428d){const _0x3d7f8e=a133_0x3f4f,_0x37bf98=a133_0x1bfb1b['resolve'](process[_0x3d7f8e(0xb3)](),_0x16428d),_0x1c9634=a133_0x1bfb1b[_0x3d7f8e(0xab)](_0x37bf98,_0x3d7f8e(0xd6)),_0x3b91d0=await a133_0x3810c2[_0x3d7f8e(0xbd)](_0x1c9634,'utf-8'),_0x1ba108=JSON[_0x3d7f8e(0xa7)](_0x3b91d0);_0x1ba108[_0x3d7f8e(0xcc)]=_0x16428d,_0x1ba108[_0x3d7f8e(0xc6)]='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a133_0x3810c2['writeFile'](_0x1c9634,JSON['stringify'](_0x1ba108,null,0x2)+'\x0a');}function detectPackageManager(){const _0x27af98=a133_0x3f4f;try{return execSync('bun\x20--version',{'stdio':_0x27af98(0xc9)}),_0x27af98(0xd8);}catch{return _0x27af98(0xb0);}}async function formatCode(_0x1cf6dd){const _0x2d2b36=a133_0x3f4f;try{await execAsync(_0x2d2b36(0xd2),{'cwd':_0x1cf6dd});}catch{}}async function configureProject(_0x2e054d,_0x9861a1,_0x26f9f3){const _0x52de99=a133_0x3f4f,_0x357680=a133_0x1bfb1b[_0x52de99(0xa6)](process[_0x52de99(0xb3)](),_0x2e054d),_0x402874=a133_0x1bfb1b[_0x52de99(0xab)](_0x357680,NEW_CONFIG_NAME),_0x1ecf94=readConfig(),_0x56340b=typeof _0x1ecf94[_0x52de99(0xb1)]==='string'?_0x1ecf94[_0x52de99(0xb1)]:undefined,_0x1e6550={};for(const _0x58e667 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x1ecf94[_0x58e667]!=null)_0x1e6550[_0x58e667]=_0x1ecf94[_0x58e667];}const _0x3e4f50=buildCanonicalProjectConfig(_0x1e6550,{'appCodes':_0x9861a1?[_0x9861a1]:[],'env':_0x26f9f3||_0x56340b||_0x52de99(0xb4),'metadata':{'createdAt':new Date()[_0x52de99(0xd3)](),'version':getCliVersion()}});writeConfigFile(_0x402874,_0x3e4f50);}async function pullApiConfig(_0x1ece04,_0x10ae3d,_0x295e44,_0x531b1b){const _0xc14839=a133_0x3f4f,_0x2c2a06=process[_0xc14839(0xb3)]();try{process[_0xc14839(0xd9)](_0x1ece04);const _0x41fef5=_0x295e44||'production';initEnv(_0x41fef5),console['log'](_0xc14839(0xdb));const {configArray:_0x495646}=await fetchModelList(_0x10ae3d,_0x531b1b||''),_0x185934=await generateApiFile(_0x495646,'',_0x10ae3d,!![],_0x41fef5,DEFAULT_API_DIR);console[_0xc14839(0xc7)](_0xc14839(0xda)+_0x495646['length']+_0xc14839(0xa5)+_0x185934[_0xc14839(0xbc)]+'\x20model(s)');}catch(_0x355144){console[_0xc14839(0xc7)](_0xc14839(0xc5)+CLI_BIN_NAME+_0xc14839(0xd4));}finally{process[_0xc14839(0xd9)](_0x2c2a06);}}
1
+ (function(_0x4ac796,_0x5c9575){const _0x277387=a135_0x4ebc,_0x22eb26=_0x4ac796();while(!![]){try{const _0x4bf5a5=parseInt(_0x277387(0x200))/0x1*(-parseInt(_0x277387(0x1f1))/0x2)+-parseInt(_0x277387(0x1fe))/0x3+-parseInt(_0x277387(0x210))/0x4*(-parseInt(_0x277387(0x1ef))/0x5)+-parseInt(_0x277387(0x1f8))/0x6+-parseInt(_0x277387(0x204))/0x7+parseInt(_0x277387(0x20e))/0x8*(parseInt(_0x277387(0x1fb))/0x9)+-parseInt(_0x277387(0x1fc))/0xa*(-parseInt(_0x277387(0x21e))/0xb);if(_0x4bf5a5===_0x5c9575)break;else _0x22eb26['push'](_0x22eb26['shift']());}catch(_0x11bf6e){_0x22eb26['push'](_0x22eb26['shift']());}}}(a135_0x1262,0x2e73b));import a135_0xe8dbb1 from'path';import a135_0x5e5b1c from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';function a135_0x4ebc(_0x55e739,_0x4733d4){_0x55e739=_0x55e739-0x1ea;const _0x1262a5=a135_0x1262();let _0x4ebc28=_0x1262a5[_0x55e739];return _0x4ebc28;}function a135_0x1262(){const _0x26104d=['validation','trim','needsUpgrade','\x20\x20√\x20Pulled\x20','770622QdwbMJ','cwd','Project\x20name\x20cannot\x20be\x20empty.','45dpwMWD','20qCIlNh','\x20\x20√\x20package.json\x20updated','311835QJuniD','\x20created\x20successfully!','1JgnxUu','*\x20Creating\x20project\x20','ignore','\x0a√\x20Project\x20','1058246qpmvSk','Project\x20directory\x20\x22','production','bun\x20--version','string','length','package.json','\x20api\x20pull`\x20manually\x20later.','Use\x20a\x20different\x20project\x20name.','npm','201560TFRzBT','\x20model(s)','66684bjxyqD','\x0a\x20\x20cd\x20','chdir','bun','join','resolve','log','access','env','bun\x20run\x20format','writeFile','\x20\x20√\x20Configuration\x20file\x20created','belowMinimum','\x20\x20Pulling\x20API\x20configuration...','2529164bEDKbS','...','\x20\x20√\x20Project\x20template\x20created','Cannot\x20create\x20project\x20in\x20current\x20directory.','dirname','\x20\x20√\x20Code\x20formatted','description','W_OK','\x22\x20already\x20exists.','name','25bESojd','\x20dataset(s),\x20generated\x20','190702peJxJr','constants','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.'];a135_0x1262=function(){return _0x26104d;};return a135_0x1262();}import{fetchModelList}from'../../../core/api-client.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';import{PROJECT_CREATE_INHERITABLE_KEYS,buildCanonicalProjectConfig}from'../../../config/schema.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x1fee81,_0x396f8a,_0x527f7c,_0x5056ec){const _0x141098=a135_0x4ebc,_0xd1c2e0=await checkCliVersion();(_0xd1c2e0[_0x141098(0x1f6)]||_0xd1c2e0[_0x141098(0x21c)])&&(printCliUpgradeWarning(_0xd1c2e0),assertCliVersionSupported(_0xd1c2e0));if(!_0x1fee81||_0x1fee81[_0x141098(0x1f5)]()==='')throw CliErrors[_0x141098(0x1f4)](_0x141098(0x1fa));const _0x1bb677=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x1bb677['test'](_0x1fee81))throw CliErrors['validation']('Project\x20name\x20contains\x20invalid\x20characters.','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x1fee81[_0x141098(0x209)]>0x64)throw CliErrors[_0x141098(0x1f4)](_0x141098(0x1f3));const _0x46ddf6=a135_0xe8dbb1['resolve'](process[_0x141098(0x1f9)](),_0x1fee81);if(existsSync(_0x46ddf6))throw CliErrors[_0x141098(0x1f4)](_0x141098(0x205)+_0x1fee81+_0x141098(0x1ed),_0x141098(0x20c));try{const _0x2b7780=a135_0xe8dbb1[_0x141098(0x222)](_0x46ddf6);await a135_0x5e5b1c[_0x141098(0x217)](_0x2b7780,a135_0x5e5b1c[_0x141098(0x1f2)][_0x141098(0x1ec)]);}catch{throw CliErrors[_0x141098(0x1f4)](_0x141098(0x221),'Check\x20directory\x20permissions.');}try{console[_0x141098(0x216)](_0x141098(0x201)+_0x1fee81+_0x141098(0x21f));const _0x224e82=getSubAppReactDemoTemplateDir();await copyDirectory(_0x224e82,_0x46ddf6),console[_0x141098(0x216)](_0x141098(0x220)),await updatePackageJsonName(_0x1fee81),console[_0x141098(0x216)](_0x141098(0x1fd)),console[_0x141098(0x216)]('\x20\x20Installing\x20dependencies...'),console[_0x141098(0x216)]('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x46ddf6),console[_0x141098(0x216)](_0x141098(0x1ea)),await configureProject(_0x1fee81,_0x527f7c,_0x396f8a),console['log'](_0x141098(0x21b)),_0x527f7c&&await pullApiConfig(_0x46ddf6,_0x527f7c,_0x396f8a,_0x5056ec),console[_0x141098(0x216)](_0x141098(0x203)+_0x1fee81+_0x141098(0x1ff)),console['log'](_0x141098(0x211)+_0x1fee81),console[_0x141098(0x216)]('\x20\x20rabetbase\x20run\x20start\x0a');}catch(_0x166f77){try{existsSync(_0x46ddf6)&&await a135_0x5e5b1c['rm'](_0x46ddf6,{'recursive':!![],'force':!![]});}catch{}throw _0x166f77;}}async function updatePackageJsonName(_0x4ee0fa){const _0x619046=a135_0x4ebc,_0x4a7a04=a135_0xe8dbb1[_0x619046(0x215)](process['cwd'](),_0x4ee0fa),_0x2f5a93=a135_0xe8dbb1[_0x619046(0x214)](_0x4a7a04,_0x619046(0x20a)),_0x30bdf6=await a135_0x5e5b1c['readFile'](_0x2f5a93,'utf-8'),_0x36b316=JSON['parse'](_0x30bdf6);_0x36b316[_0x619046(0x1ee)]=_0x4ee0fa,_0x36b316[_0x619046(0x1eb)]='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a135_0x5e5b1c[_0x619046(0x21a)](_0x2f5a93,JSON['stringify'](_0x36b316,null,0x2)+'\x0a');}function detectPackageManager(){const _0x1cd8a9=a135_0x4ebc;try{return execSync(_0x1cd8a9(0x207),{'stdio':_0x1cd8a9(0x202)}),_0x1cd8a9(0x213);}catch{return _0x1cd8a9(0x20d);}}async function formatCode(_0x17c8cb){const _0x14e874=a135_0x4ebc;try{await execAsync(_0x14e874(0x219),{'cwd':_0x17c8cb});}catch{}}async function configureProject(_0x2d8ea7,_0x386229,_0x276e41){const _0x5ee13a=a135_0x4ebc,_0x546ad6=a135_0xe8dbb1[_0x5ee13a(0x215)](process['cwd'](),_0x2d8ea7),_0x1ca978=a135_0xe8dbb1[_0x5ee13a(0x214)](_0x546ad6,NEW_CONFIG_NAME),_0xc7d596=readConfig(),_0x7bc0ac=typeof _0xc7d596[_0x5ee13a(0x218)]===_0x5ee13a(0x208)?_0xc7d596[_0x5ee13a(0x218)]:undefined,_0x44ad19={};for(const _0x1853ea of PROJECT_CREATE_INHERITABLE_KEYS){if(_0xc7d596[_0x1853ea]!=null)_0x44ad19[_0x1853ea]=_0xc7d596[_0x1853ea];}const _0x26edd5=buildCanonicalProjectConfig(_0x44ad19,{'appCodes':_0x386229?[_0x386229]:[],'env':_0x276e41||_0x7bc0ac||_0x5ee13a(0x206),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':getCliVersion()}});writeConfigFile(_0x1ca978,_0x26edd5);}async function pullApiConfig(_0x333e06,_0xf11c2b,_0x24ac83,_0x19b8fe){const _0x55781f=a135_0x4ebc,_0x3d0930=process['cwd']();try{process[_0x55781f(0x212)](_0x333e06);const _0x26b3a9=_0x24ac83||_0x55781f(0x206);initEnv(_0x26b3a9),console[_0x55781f(0x216)](_0x55781f(0x21d));const {configArray:_0x18522c}=await fetchModelList(_0xf11c2b,_0x19b8fe||''),_0x4c11f4=await generateApiFile(_0x18522c,'',_0xf11c2b,!![],_0x26b3a9,DEFAULT_API_DIR);console[_0x55781f(0x216)](_0x55781f(0x1f7)+_0x18522c[_0x55781f(0x209)]+_0x55781f(0x1f0)+_0x4c11f4['modelCount']+_0x55781f(0x20f));}catch(_0x3b239e){console[_0x55781f(0x216)]('\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`'+CLI_BIN_NAME+_0x55781f(0x20b));}finally{process['chdir'](_0x3d0930);}}
@@ -1 +1 @@
1
- const a134_0xd1b1b8=a134_0x18f9;(function(_0x580ecf,_0x3314d8){const _0x334f74=a134_0x18f9,_0x269d62=_0x580ecf();while(!![]){try{const _0x2f25c0=-parseInt(_0x334f74(0xd4))/0x1+-parseInt(_0x334f74(0xdb))/0x2*(-parseInt(_0x334f74(0xdf))/0x3)+-parseInt(_0x334f74(0xd9))/0x4+-parseInt(_0x334f74(0xd3))/0x5+-parseInt(_0x334f74(0xd8))/0x6*(-parseInt(_0x334f74(0xdc))/0x7)+-parseInt(_0x334f74(0xda))/0x8*(-parseInt(_0x334f74(0xd1))/0x9)+parseInt(_0x334f74(0xd7))/0xa;if(_0x2f25c0===_0x3314d8)break;else _0x269d62['push'](_0x269d62['shift']());}catch(_0x34323b){_0x269d62['push'](_0x269d62['shift']());}}}(a134_0x347f,0x1f096));import a134_0x4ead92 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a134_0x4ead92[a134_0xd1b1b8(0xde)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x5c243f=a134_0xd1b1b8;return a134_0x4ead92[_0x5c243f(0xd6)](__dirname,_0x5c243f(0xd5));}function a134_0x18f9(_0x9f7b72,_0x3bf32f){_0x9f7b72=_0x9f7b72-0xd1;const _0x347ff8=a134_0x347f();let _0x18f9f9=_0x347ff8[_0x9f7b72];return _0x18f9f9;}export function getSubAppReactDemoTemplateDir(){const _0x33d0bb=a134_0xd1b1b8;return a134_0x4ead92[_0x33d0bb(0xdd)](getRabetbaseCliPackageRoot(),_0x33d0bb(0xd2),'projects','sub-app-react-demo');}function a134_0x347f(){const _0x401eb4=['1086930MhLaIO','1419846NXrwCe','53304hdtYyS','4576qNPxbW','204gtbYqZ','7RYjxxK','join','dirname','3081acsUxe','927zIZScZ','templates','1189735wlTCBI','130605YDXqse','../../../../','resolve'];a134_0x347f=function(){return _0x401eb4;};return a134_0x347f();}
1
+ const a136_0xacde18=a136_0x3a70;(function(_0x535bcb,_0x150eb6){const _0x4d320e=a136_0x3a70,_0x2f7bbc=_0x535bcb();while(!![]){try{const _0xb4bcd=parseInt(_0x4d320e(0x9b))/0x1+parseInt(_0x4d320e(0x9f))/0x2+parseInt(_0x4d320e(0x9e))/0x3*(parseInt(_0x4d320e(0x9c))/0x4)+-parseInt(_0x4d320e(0x9a))/0x5*(-parseInt(_0x4d320e(0xa3))/0x6)+parseInt(_0x4d320e(0x99))/0x7*(-parseInt(_0x4d320e(0xa4))/0x8)+-parseInt(_0x4d320e(0xa0))/0x9*(parseInt(_0x4d320e(0x9d))/0xa)+parseInt(_0x4d320e(0xa5))/0xb*(-parseInt(_0x4d320e(0xa7))/0xc);if(_0xb4bcd===_0x150eb6)break;else _0x2f7bbc['push'](_0x2f7bbc['shift']());}catch(_0x4bc0a8){_0x2f7bbc['push'](_0x2f7bbc['shift']());}}}(a136_0x24b2,0x7823b));import a136_0x1238e0 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a136_0x1238e0[a136_0xacde18(0xa1)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){return a136_0x1238e0['resolve'](__dirname,'../../../../');}export function getSubAppReactDemoTemplateDir(){const _0x45b24c=a136_0xacde18;return a136_0x1238e0['join'](getRabetbaseCliPackageRoot(),'templates',_0x45b24c(0xa2),_0x45b24c(0xa6));}function a136_0x3a70(_0x2ea756,_0x652fc3){_0x2ea756=_0x2ea756-0x99;const _0x24b242=a136_0x24b2();let _0x3a707c=_0x24b242[_0x2ea756];return _0x3a707c;}function a136_0x24b2(){const _0x43516c=['projects','4765158NqCmrs','467912eCutwQ','8453577kLOjrb','sub-app-react-demo','12UOOYeE','70UWptCV','5jJOgSt','80088BGYyhO','2892324fuxgbP','30MKaFaw','3ZXIYyk','511396nvvRZp','22716RhSJGw','dirname'];a136_0x24b2=function(){return _0x43516c;};return a136_0x24b2();}
@@ -1 +1 @@
1
- (function(_0x162d7f,_0x24ed55){const _0x1163eb=a135_0x305b,_0x1f56df=_0x162d7f();while(!![]){try{const _0x2f41d9=parseInt(_0x1163eb(0xb3))/0x1+parseInt(_0x1163eb(0xb4))/0x2+parseInt(_0x1163eb(0xb0))/0x3*(parseInt(_0x1163eb(0xad))/0x4)+parseInt(_0x1163eb(0xb2))/0x5+-parseInt(_0x1163eb(0xaf))/0x6*(-parseInt(_0x1163eb(0xa6))/0x7)+parseInt(_0x1163eb(0xac))/0x8+parseInt(_0x1163eb(0xaa))/0x9*(-parseInt(_0x1163eb(0xae))/0xa);if(_0x2f41d9===_0x24ed55)break;else _0x1f56df['push'](_0x1f56df['shift']());}catch(_0x1cfb4a){_0x1f56df['push'](_0x1f56df['shift']());}}}(a135_0x5861,0xd8354));function a135_0x305b(_0x4d95ec,_0x2b2b7e){_0x4d95ec=_0x4d95ec-0xa6;const _0x586139=a135_0x5861();let _0x305b39=_0x586139[_0x4d95ec];return _0x305b39;}import a135_0xf826a4 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x5232fb){const _0x432488=a135_0x305b,_0x1f605b=Date[_0x432488(0xb1)](),_0x1b46f6=a135_0xf826a4['resolve'](process['cwd'](),_0x5232fb);try{logger[_0x432488(0xa7)]('copy',_0x432488(0xa9),{'projectCode':_0x5232fb,'templateDir':templateDir}),await copyDirectory(templateDir,_0x1b46f6);const _0x11da3b=Date[_0x432488(0xb1)]()-_0x1f605b;logger[_0x432488(0xab)](_0x432488(0xa8),'项目模板复制完成',_0x11da3b,{'projectCode':_0x5232fb});}catch(_0x42c35c){const _0x4639c0=Date[_0x432488(0xb1)]()-_0x1f605b;logger['error'](_0x432488(0xa8),'项目模板复制失败',{'projectCode':_0x5232fb,'error':_0x42c35c instanceof Error?_0x42c35c['message']:String(_0x42c35c),'duration':_0x4639c0});throw _0x42c35c;}return formatElapsed(_0x1f605b);}function a135_0x5861(){const _0x4d7100=['success','2058112EHRGqE','4rbmKts','10rFhHBA','3984ycXDsN','2005773AcYHKR','now','8834040jdMlMr','1236051aTlnQQ','436742vVbNAB','4438ELXvpb','info','copy','开始复制项目模板','33142257staPam'];a135_0x5861=function(){return _0x4d7100;};return a135_0x5861();}
1
+ function a137_0x49c0(_0x5dfbd0,_0x3d24d2){_0x5dfbd0=_0x5dfbd0-0x1f1;const _0x4afb32=a137_0x4afb();let _0x49c0e3=_0x4afb32[_0x5dfbd0];return _0x49c0e3;}(function(_0x1c3b78,_0x1ebef0){const _0x48dd41=a137_0x49c0,_0x1f5291=_0x1c3b78();while(!![]){try{const _0x4bdd4f=-parseInt(_0x48dd41(0x201))/0x1*(-parseInt(_0x48dd41(0x1f2))/0x2)+-parseInt(_0x48dd41(0x202))/0x3*(parseInt(_0x48dd41(0x1f9))/0x4)+-parseInt(_0x48dd41(0x1fa))/0x5+parseInt(_0x48dd41(0x1f8))/0x6+-parseInt(_0x48dd41(0x200))/0x7+parseInt(_0x48dd41(0x1fe))/0x8+-parseInt(_0x48dd41(0x1f4))/0x9;if(_0x4bdd4f===_0x1ebef0)break;else _0x1f5291['push'](_0x1f5291['shift']());}catch(_0x1224e9){_0x1f5291['push'](_0x1f5291['shift']());}}}(a137_0x4afb,0xc6efc));import a137_0x50fc32 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();function a137_0x4afb(){const _0x2182ba=['info','copy','6781926nvvVCb','92620JsILiU','2352265OqSgdO','cwd','message','项目模板复制完成','12184432ZxWjMo','now','4774427CVnydz','579085ccEMhn','12OiAmRc','resolve','2YFUuaK','success','10552338leHIYj','项目模板复制失败'];a137_0x4afb=function(){return _0x2182ba;};return a137_0x4afb();}export async function copyProjectTemplate(_0x317e37){const _0x573451=a137_0x49c0,_0x5378b3=Date[_0x573451(0x1ff)](),_0x26059d=a137_0x50fc32[_0x573451(0x1f1)](process[_0x573451(0x1fb)](),_0x317e37);try{logger[_0x573451(0x1f6)](_0x573451(0x1f7),'开始复制项目模板',{'projectCode':_0x317e37,'templateDir':templateDir}),await copyDirectory(templateDir,_0x26059d);const _0x52499d=Date['now']()-_0x5378b3;logger[_0x573451(0x1f3)](_0x573451(0x1f7),_0x573451(0x1fd),_0x52499d,{'projectCode':_0x317e37});}catch(_0x2f3f77){const _0x434c0d=Date['now']()-_0x5378b3;logger['error'](_0x573451(0x1f7),_0x573451(0x1f5),{'projectCode':_0x317e37,'error':_0x2f3f77 instanceof Error?_0x2f3f77[_0x573451(0x1fc)]:String(_0x2f3f77),'duration':_0x434c0d});throw _0x2f3f77;}return formatElapsed(_0x5378b3);}
@@ -1 +1 @@
1
- function a136_0xbc8f(_0x5422c3,_0x32978e){_0x5422c3=_0x5422c3-0x94;const _0x8e02a0=a136_0x8e02();let _0xbc8fc4=_0x8e02a0[_0x5422c3];return _0xbc8fc4;}(function(_0x273263,_0x16be47){const _0x1f0976=a136_0xbc8f,_0x94662b=_0x273263();while(!![]){try{const _0x19ccb2=parseInt(_0x1f0976(0xa8))/0x1*(-parseInt(_0x1f0976(0x9c))/0x2)+parseInt(_0x1f0976(0x97))/0x3+-parseInt(_0x1f0976(0x9b))/0x4+-parseInt(_0x1f0976(0xa3))/0x5*(parseInt(_0x1f0976(0x9f))/0x6)+-parseInt(_0x1f0976(0xa2))/0x7+-parseInt(_0x1f0976(0xa6))/0x8+parseInt(_0x1f0976(0x95))/0x9*(parseInt(_0x1f0976(0x96))/0xa);if(_0x19ccb2===_0x16be47)break;else _0x94662b['push'](_0x94662b['shift']());}catch(_0x9de56d){_0x94662b['push'](_0x94662b['shift']());}}}(a136_0x8e02,0x722a6));import a136_0x1aea16 from'node:path';function a136_0x8e02(){const _0xa0b64=['6288415lEQBVk','335gQbMMj','代码格式化完成','error','5789952mcubJb','npx','55992xHDSNF','cwd','1323uNvinJ','195290osaXzJ','447759ybDkni','now','format','开始格式化代码','246144EOArQg','2vBLHCT','prettier','info','72786SfcOuZ','resolve','success'];a136_0x8e02=function(){return _0xa0b64;};return a136_0x8e02();}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x316cea){const _0x39b0b5=a136_0xbc8f,_0x1edd1d=Date['now'](),_0x2dacc2=a136_0x1aea16[_0x39b0b5(0xa0)](process[_0x39b0b5(0x94)](),_0x316cea);try{logger[_0x39b0b5(0x9e)](_0x39b0b5(0x99),_0x39b0b5(0x9a),{'projectCode':_0x316cea}),await execa(resolveNpmBin(_0x39b0b5(0xa7)),[_0x39b0b5(0x9d),'--write','.'],{'cwd':_0x2dacc2});const _0x34e81b=Date[_0x39b0b5(0x98)]()-_0x1edd1d;logger[_0x39b0b5(0xa1)](_0x39b0b5(0x99),_0x39b0b5(0xa4),_0x34e81b,{'projectCode':_0x316cea});}catch(_0xae984e){const _0x35d9ca=Date['now']()-_0x1edd1d;logger[_0x39b0b5(0xa5)](_0x39b0b5(0x99),'代码格式化失败',{'projectCode':_0x316cea,'error':_0xae984e instanceof Error?_0xae984e['message']:String(_0xae984e),'duration':_0x35d9ca});throw _0xae984e;}return formatElapsed(_0x1edd1d);}
1
+ (function(_0x55c8ab,_0x566169){const _0x4b2c90=a138_0x456f,_0x40e2fb=_0x55c8ab();while(!![]){try{const _0x284b20=-parseInt(_0x4b2c90(0x15b))/0x1*(parseInt(_0x4b2c90(0x150))/0x2)+-parseInt(_0x4b2c90(0x15f))/0x3*(parseInt(_0x4b2c90(0x156))/0x4)+-parseInt(_0x4b2c90(0x152))/0x5+-parseInt(_0x4b2c90(0x158))/0x6+parseInt(_0x4b2c90(0x151))/0x7*(-parseInt(_0x4b2c90(0x161))/0x8)+-parseInt(_0x4b2c90(0x15a))/0x9*(parseInt(_0x4b2c90(0x155))/0xa)+-parseInt(_0x4b2c90(0x14c))/0xb*(-parseInt(_0x4b2c90(0x160))/0xc);if(_0x284b20===_0x566169)break;else _0x40e2fb['push'](_0x40e2fb['shift']());}catch(_0xd36116){_0x40e2fb['push'](_0x40e2fb['shift']());}}}(a138_0x10d5,0x2a2ad));function a138_0x10d5(){const _0x34a64d=['format','--write','开始格式化代码','2OhQSNj','301574souWGj','17925pVPfbb','cwd','代码格式化完成','1702430SroIHF','64FMhtGU','npx','984780Gnirpk','now','18cbWMjN','328003uFtRyi','info','success','message','33585GuLsvL','801972BleZMe','40AjQfnr','231zWAEXX'];a138_0x10d5=function(){return _0x34a64d;};return a138_0x10d5();}import a138_0x1325e1 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a138_0x456f(_0x36259c,_0x5edfca){_0x36259c=_0x36259c-0x14c;const _0x10d550=a138_0x10d5();let _0x456fb4=_0x10d550[_0x36259c];return _0x456fb4;}import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x1ee6ce){const _0x377780=a138_0x456f,_0x25a1e2=Date[_0x377780(0x159)](),_0x2afe7e=a138_0x1325e1['resolve'](process[_0x377780(0x153)](),_0x1ee6ce);try{logger[_0x377780(0x15c)](_0x377780(0x14d),_0x377780(0x14f),{'projectCode':_0x1ee6ce}),await execa(resolveNpmBin(_0x377780(0x157)),['prettier',_0x377780(0x14e),'.'],{'cwd':_0x2afe7e});const _0x13717a=Date[_0x377780(0x159)]()-_0x25a1e2;logger[_0x377780(0x15d)]('format',_0x377780(0x154),_0x13717a,{'projectCode':_0x1ee6ce});}catch(_0x13ae36){const _0x1e4f5f=Date[_0x377780(0x159)]()-_0x25a1e2;logger['error'](_0x377780(0x14d),'代码格式化失败',{'projectCode':_0x1ee6ce,'error':_0x13ae36 instanceof Error?_0x13ae36[_0x377780(0x15e)]:String(_0x13ae36),'duration':_0x1e4f5f});throw _0x13ae36;}return formatElapsed(_0x25a1e2);}
@@ -1 +1 @@
1
- (function(_0x3b9c79,_0x4b2d2a){const _0xc0ab59=a137_0x29e6,_0x5b60b2=_0x3b9c79();while(!![]){try{const _0x3db034=-parseInt(_0xc0ab59(0x1c6))/0x1+-parseInt(_0xc0ab59(0x1ce))/0x2*(-parseInt(_0xc0ab59(0x1c2))/0x3)+parseInt(_0xc0ab59(0x1cd))/0x4*(parseInt(_0xc0ab59(0x1c8))/0x5)+parseInt(_0xc0ab59(0x1d1))/0x6+parseInt(_0xc0ab59(0x1c7))/0x7*(-parseInt(_0xc0ab59(0x1d3))/0x8)+-parseInt(_0xc0ab59(0x1c1))/0x9*(parseInt(_0xc0ab59(0x1d2))/0xa)+parseInt(_0xc0ab59(0x1bf))/0xb;if(_0x3db034===_0x4b2d2a)break;else _0x5b60b2['push'](_0x5b60b2['shift']());}catch(_0xfbe53c){_0x5b60b2['push'](_0x5b60b2['shift']());}}}(a137_0x5831,0xd2c51));import a137_0x2e113b 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 a137_0x29e6(_0x1211d4,_0x559608){_0x1211d4=_0x1211d4-0x1bf;const _0x583175=a137_0x5831();let _0x29e6fd=_0x583175[_0x1211d4];return _0x29e6fd;}export async function installDependencies(_0x3fb5e8){const _0x42bb1c=a137_0x29e6,_0x1a1271=Date[_0x42bb1c(0x1d0)](),_0x2ba7c0=a137_0x2e113b['resolve'](process[_0x42bb1c(0x1cf)](),_0x3fb5e8);try{logger[_0x42bb1c(0x1cb)](_0x42bb1c(0x1ca),_0x42bb1c(0x1c9),{'projectCode':_0x3fb5e8,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin(_0x42bb1c(0x1c3)),['install',_0x42bb1c(0x1c5),_0x42bb1c(0x1c0)],{'cwd':_0x2ba7c0});const _0x5ea192=Date['now']()-_0x1a1271;logger[_0x42bb1c(0x1cc)](_0x42bb1c(0x1ca),'依赖安装完成',_0x5ea192,{'projectCode':_0x3fb5e8});}catch(_0x1b9690){const _0x230706=Date['now']()-_0x1a1271;logger['error'](_0x42bb1c(0x1ca),_0x42bb1c(0x1c4),{'projectCode':_0x3fb5e8,'error':_0x1b9690 instanceof Error?_0x1b9690[_0x42bb1c(0x1d4)]:String(_0x1b9690),'duration':_0x230706});throw _0x1b9690;}return formatElapsed(_0x1a1271);}function a137_0x5831(){const _0x172c98=['npm','依赖安装失败','--registry','181348doIRxY','5537NadCcg','5Sytgym','开始安装依赖','install','info','success','1107880FgdiGt','3201788uDCNwt','cwd','now','5593680MonYCW','10ISIGNX','12784ucRAQK','message','7884943zYIoBS','https://registry.npmmirror.com','10964502XmVYhk','3VAYuqO'];a137_0x5831=function(){return _0x172c98;};return a137_0x5831();}
1
+ function a139_0x7c6d(){const _0x377258=['install','19173xthqpk','8140099PsczsR','142SabJjq','https://registry.npmmirror.com','3TcwCGZ','cwd','依赖安装完成','1302okmxVh','开始安装依赖','info','7138390OpFekk','8304575bbDYkc','5917640SQQZDx','12lbSIwm','423UZKRSG','13588UGGFop','71992UEGBRw','--registry','now'];a139_0x7c6d=function(){return _0x377258;};return a139_0x7c6d();}function a139_0x28aa(_0x79f79a,_0x20a476){_0x79f79a=_0x79f79a-0x179;const _0x7c6d35=a139_0x7c6d();let _0x28aaa3=_0x7c6d35[_0x79f79a];return _0x28aaa3;}(function(_0x390e5f,_0x1c22bf){const _0x3e33a0=a139_0x28aa,_0x1745c6=_0x390e5f();while(!![]){try{const _0x30a157=parseInt(_0x3e33a0(0x181))/0x1*(-parseInt(_0x3e33a0(0x188))/0x2)+parseInt(_0x3e33a0(0x18a))/0x3*(parseInt(_0x3e33a0(0x17e))/0x4)+parseInt(_0x3e33a0(0x17d))/0x5+parseInt(_0x3e33a0(0x179))/0x6*(parseInt(_0x3e33a0(0x186))/0x7)+-parseInt(_0x3e33a0(0x182))/0x8*(parseInt(_0x3e33a0(0x180))/0x9)+-parseInt(_0x3e33a0(0x17c))/0xa+-parseInt(_0x3e33a0(0x187))/0xb*(parseInt(_0x3e33a0(0x17f))/0xc);if(_0x30a157===_0x1c22bf)break;else _0x1745c6['push'](_0x1745c6['shift']());}catch(_0x54ab27){_0x1745c6['push'](_0x1745c6['shift']());}}}(a139_0x7c6d,0xda0d3));import a139_0x1c348b 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(_0x161126){const _0x221798=a139_0x28aa,_0x3b4409=Date[_0x221798(0x184)](),_0x453756=a139_0x1c348b['resolve'](process[_0x221798(0x18b)](),_0x161126);try{logger[_0x221798(0x17b)](_0x221798(0x185),_0x221798(0x17a),{'projectCode':_0x161126,'registry':_0x221798(0x189)}),await execa(resolveNpmBin('npm'),[_0x221798(0x185),_0x221798(0x183),_0x221798(0x189)],{'cwd':_0x453756});const _0x4337bb=Date[_0x221798(0x184)]()-_0x3b4409;logger['success']('install',_0x221798(0x18c),_0x4337bb,{'projectCode':_0x161126});}catch(_0x6b4829){const _0x1f49c5=Date['now']()-_0x3b4409;logger['error'](_0x221798(0x185),'依赖安装失败',{'projectCode':_0x161126,'error':_0x6b4829 instanceof Error?_0x6b4829['message']:String(_0x6b4829),'duration':_0x1f49c5});throw _0x6b4829;}return formatElapsed(_0x3b4409);}
@@ -1 +1 @@
1
- const a138_0x2e350d=a138_0x3611;(function(_0x985b0f,_0xcf87d3){const _0xc6acc2=a138_0x3611,_0x1a359e=_0x985b0f();while(!![]){try{const _0x1ec5fd=-parseInt(_0xc6acc2(0x6f))/0x1*(-parseInt(_0xc6acc2(0x7a))/0x2)+-parseInt(_0xc6acc2(0x80))/0x3+parseInt(_0xc6acc2(0x83))/0x4+-parseInt(_0xc6acc2(0x70))/0x5*(-parseInt(_0xc6acc2(0x73))/0x6)+-parseInt(_0xc6acc2(0x87))/0x7*(-parseInt(_0xc6acc2(0x89))/0x8)+parseInt(_0xc6acc2(0x71))/0x9+-parseInt(_0xc6acc2(0x75))/0xa;if(_0x1ec5fd===_0xcf87d3)break;else _0x1a359e['push'](_0x1a359e['shift']());}catch(_0x1316f6){_0x1a359e['push'](_0x1a359e['shift']());}}}(a138_0x3ab6,0xd72c2));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a138_0x3611(_0x24b46f,_0x2a0ad7){_0x24b46f=_0x24b46f-0x6a;const _0x3ab60d=a138_0x3ab6();let _0x361161=_0x3ab60d[_0x24b46f];return _0x361161;}import{initConfig}from'../../commands/project/init.js';function a138_0x3ab6(){const _0x3a40fd=['App\x20code\x20to\x20initialize','boolean','2XOSHjP','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','project','env','init','Target\x20environment','1651758maZJSG','cookie','nonInteractive','4562080aqKiOM','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','2026-07','yes','469dMMltY','\x20workspace\x20init','198040aOoKPH','../../commands/project/create/main.js','bool','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','trim','validation','str','Project\x20name','write','1272135wVnOIg','3635jcpfdS','6700221QWCcZo','string','13242BCgseJ','Usage:\x20','49882660TCFSDE','appcode','project-name'];a138_0x3ab6=function(){return _0x3a40fd;};return a138_0x3ab6();}import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':a138_0x2e350d(0x76),'type':a138_0x2e350d(0x72),'description':a138_0x2e350d(0x78)},{'name':a138_0x2e350d(0x7d),'type':'string','description':a138_0x2e350d(0x7f)},{'name':a138_0x2e350d(0x86),'type':a138_0x2e350d(0x79),'description':'Auto-confirm\x20prompts','default':![]}],createFlags=[{'name':'name','type':a138_0x2e350d(0x72),'description':a138_0x2e350d(0x6d)},{'name':a138_0x2e350d(0x7d),'type':'string','description':'Target\x20environment'},{'name':a138_0x2e350d(0x76),'type':'string','description':a138_0x2e350d(0x7b)}],upgradeFlags=[{'name':a138_0x2e350d(0x86),'type':a138_0x2e350d(0x79),'description':'Skip\x20confirmation\x20prompt','default':![]}];export const projectDefinitions=[{'service':a138_0x2e350d(0x7c),'command':a138_0x2e350d(0x7e),'description':a138_0x2e350d(0x84),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a138_0x2e350d(0x88),'since':a138_0x2e350d(0x85)},'flags':initFlags,async 'execute'(_0x5702a9){const _0xe0f9d5=a138_0x2e350d;return await initConfig({'appcode':_0x5702a9[_0xe0f9d5(0x6c)]('appcode')||undefined,'env':_0x5702a9[_0xe0f9d5(0x6c)](_0xe0f9d5(0x7d))||undefined,'autoYes':_0x5702a9[_0xe0f9d5(0x8b)](_0xe0f9d5(0x86))}),{'ok':!![]};}},{'service':'project','command':'create','description':'Create\x20a\x20new\x20project','risk':a138_0x2e350d(0x6e),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a138_0x2e350d(0x77),'description':'Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','required':![]}],'flags':createFlags,async 'execute'(_0xc2c0e0){const _0x396702=a138_0x2e350d,{createApp:_0x164d05}=await import(_0x396702(0x8a)),{createProjectNonInteractive:_0x1e62fb}=await import('../../commands/project/create/non-interactive.js'),_0x55f93b=_0xc2c0e0['str']('name')[_0x396702(0x6a)]()||_0xc2c0e0['args'][0x0]?.['trim'](),_0x3d01b5=_0xc2c0e0[_0x396702(0x6c)](_0x396702(0x7d))||undefined,_0x1866a9=_0xc2c0e0[_0x396702(0x6c)]('appcode')||undefined;if(_0xc2c0e0[_0x396702(0x82)]){if(!_0x55f93b)throw CliErrors[_0x396702(0x6b)]('Non-interactive\x20mode\x20requires\x20a\x20project\x20name.',_0x396702(0x74)+CLI_BIN_NAME+_0x396702(0x8c));await _0x1e62fb(_0x55f93b,_0x3d01b5,_0x1866a9,_0xc2c0e0['cookie']);}else await _0x164d05({'projectCode':_0x55f93b,'appCode':_0x1866a9,'env':_0x3d01b5,'cookie':_0xc2c0e0[_0x396702(0x81)]});return{'ok':!![]};}},{'service':a138_0x2e350d(0x7c),'command':'upgrade','description':'Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x4598de){const _0x14c5ee=a138_0x2e350d;return await upgradeApp(_0x4598de['nonInteractive'],{'yes':_0x4598de[_0x14c5ee(0x8b)]('yes')}),{'ok':!![]};}}];
1
+ const a140_0x1eb753=a140_0x1da1;(function(_0x40a6c6,_0x56e5b9){const _0x3d1839=a140_0x1da1,_0x386e73=_0x40a6c6();while(!![]){try{const _0x512034=parseInt(_0x3d1839(0x152))/0x1+parseInt(_0x3d1839(0x155))/0x2+parseInt(_0x3d1839(0x143))/0x3+parseInt(_0x3d1839(0x15a))/0x4*(-parseInt(_0x3d1839(0x162))/0x5)+-parseInt(_0x3d1839(0x13f))/0x6+-parseInt(_0x3d1839(0x163))/0x7*(-parseInt(_0x3d1839(0x156))/0x8)+-parseInt(_0x3d1839(0x160))/0x9*(-parseInt(_0x3d1839(0x145))/0xa);if(_0x512034===_0x56e5b9)break;else _0x386e73['push'](_0x386e73['shift']());}catch(_0x5f405a){_0x386e73['push'](_0x386e73['shift']());}}}(a140_0x2e4f,0x9c55c));function a140_0x1da1(_0x40644f,_0x55591c){_0x40644f=_0x40644f-0x13e;const _0x2e4f92=a140_0x2e4f();let _0x1da166=_0x2e4f92[_0x40644f];return _0x1da166;}function a140_0x2e4f(){const _0x2d9b5d=['trim','../../commands/project/create/main.js','create','87801rLndxL','boolean','Target\x20environment','940TBVKAT','176584hapEBU','project-name','project','cookie','5408SzTqGe','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','Project\x20name','\x20workspace\x20init','str','name','885375HkDIqn','nonInteractive','3640ChxnXK','77pZEQHE','args','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','5169630cOpqCK','2026-07','Skip\x20confirmation\x20prompt','App\x20code\x20to\x20initialize','2923905zuRQDg','env','120ExzYKk','string','appcode','Usage:\x20','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','write','bool','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','Auto-confirm\x20prompts','yes'];a140_0x2e4f=function(){return _0x2d9b5d;};return a140_0x2e4f();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{initConfig}from'../../commands/project/init.js';import{upgradeApp}from'../../commands/project/upgrade.js';const initFlags=[{'name':'appcode','type':a140_0x1eb753(0x146),'description':a140_0x1eb753(0x142)},{'name':'env','type':a140_0x1eb753(0x146),'description':a140_0x1eb753(0x154)},{'name':a140_0x1eb753(0x14e),'type':a140_0x1eb753(0x153),'description':a140_0x1eb753(0x14d),'default':![]}],createFlags=[{'name':a140_0x1eb753(0x15f),'type':a140_0x1eb753(0x146),'description':a140_0x1eb753(0x15c)},{'name':a140_0x1eb753(0x144),'type':'string','description':a140_0x1eb753(0x154)},{'name':a140_0x1eb753(0x147),'type':a140_0x1eb753(0x146),'description':a140_0x1eb753(0x15b)}],upgradeFlags=[{'name':a140_0x1eb753(0x14e),'type':a140_0x1eb753(0x153),'description':a140_0x1eb753(0x141),'default':![]}];export const projectDefinitions=[{'service':'project','command':'init','description':a140_0x1eb753(0x13e),'risk':a140_0x1eb753(0x14a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'hidden':!![],'deprecated':{'replacement':CLI_BIN_NAME+a140_0x1eb753(0x15d),'since':a140_0x1eb753(0x140)},'flags':initFlags,async 'execute'(_0x3df17d){const _0x47b24c=a140_0x1eb753;return await initConfig({'appcode':_0x3df17d[_0x47b24c(0x15e)](_0x47b24c(0x147))||undefined,'env':_0x3df17d[_0x47b24c(0x15e)](_0x47b24c(0x144))||undefined,'autoYes':_0x3df17d[_0x47b24c(0x14b)](_0x47b24c(0x14e))}),{'ok':!![]};}},{'service':a140_0x1eb753(0x158),'command':a140_0x1eb753(0x151),'description':'Create\x20a\x20new\x20project','risk':a140_0x1eb753(0x14a),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a140_0x1eb753(0x157),'description':a140_0x1eb753(0x149),'required':![]}],'flags':createFlags,async 'execute'(_0x59183c){const _0x479984=a140_0x1eb753,{createApp:_0x75d615}=await import(_0x479984(0x150)),{createProjectNonInteractive:_0x12c9f0}=await import('../../commands/project/create/non-interactive.js'),_0x35d2a4=_0x59183c['str'](_0x479984(0x15f))[_0x479984(0x14f)]()||_0x59183c[_0x479984(0x164)][0x0]?.['trim'](),_0x5c3645=_0x59183c[_0x479984(0x15e)](_0x479984(0x144))||undefined,_0x1c5540=_0x59183c['str'](_0x479984(0x147))||undefined;if(_0x59183c[_0x479984(0x161)]){if(!_0x35d2a4)throw CliErrors['validation']('Non-interactive\x20mode\x20requires\x20a\x20project\x20name.',_0x479984(0x148)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x12c9f0(_0x35d2a4,_0x5c3645,_0x1c5540,_0x59183c['cookie']);}else await _0x75d615({'projectCode':_0x35d2a4,'appCode':_0x1c5540,'env':_0x5c3645,'cookie':_0x59183c[_0x479984(0x159)]});return{'ok':!![]};}},{'service':a140_0x1eb753(0x158),'command':'upgrade','description':a140_0x1eb753(0x14c),'risk':a140_0x1eb753(0x14a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x3752b2){const _0x17ac64=a140_0x1eb753;return await upgradeApp(_0x3752b2[_0x17ac64(0x161)],{'yes':_0x3752b2['bool'](_0x17ac64(0x14e))}),{'ok':!![]};}}];
@@ -1 +1 @@
1
- (function(_0x23c265,_0x457a0c){const _0x4c698f=a139_0x2d3b,_0x4bfe5f=_0x23c265();while(!![]){try{const _0xb0c55f=-parseInt(_0x4c698f(0x1e9))/0x1+-parseInt(_0x4c698f(0x1ce))/0x2*(-parseInt(_0x4c698f(0x1d7))/0x3)+parseInt(_0x4c698f(0x1e5))/0x4+-parseInt(_0x4c698f(0x1c8))/0x5+-parseInt(_0x4c698f(0x1d1))/0x6+-parseInt(_0x4c698f(0x1f2))/0x7*(parseInt(_0x4c698f(0x1c3))/0x8)+parseInt(_0x4c698f(0x1ec))/0x9;if(_0xb0c55f===_0x457a0c)break;else _0x4bfe5f['push'](_0x4bfe5f['shift']());}catch(_0x206f8f){_0x4bfe5f['push'](_0x4bfe5f['shift']());}}}(a139_0x4631,0xdf81b));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';function a139_0x2d3b(_0x23c7f7,_0x18eff4){_0x23c7f7=_0x23c7f7-0x1c1;const _0x463154=a139_0x4631();let _0x2d3bde=_0x463154[_0x23c7f7];return _0x2d3bde;}import{fileURLToPath}from'node:url';import a139_0xca6636 from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';function a139_0x4631(){const _0x54129f=['\x20\x20Default:\x20','\x20api\x20generate\x27\x20and\x20\x27','Migration\x20cancelled.\x20Run\x20`','6342615LSyTTk','env','green','production','初始化项目配置文件成功','setLogPath','320wrVWPc','log','init','9281352VBkzhG','package.json','\x20workspace\x20init`\x20to\x20start\x20fresh.','yellow','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','\x20\x20Apps:\x20','18702kpxVSE','?\x20(Old\x20file\x20→\x20*.bak)','trim','parse','✓\x20Upgraded\x20','cyan','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','utf8','\x20api\x20pull\x27','keys','string','App\x20Code\x20cannot\x20be\x20empty','.bak','join','7038180eIiwQH','app','bold','1.0.0','1767574VURnkx','appcode','apps','35921259hHukrx','defaultApp','Invalid\x20App\x20Code','version','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','../..','84tPWtEX','toLocaleString','cwd','从旧配置文件升级成功','\x20\x20appcode:\x20','gray','833176hVIDVW','Upgrade\x20it\x20to\x20'];a139_0x4631=function(){return _0x54129f;};return a139_0x4631();}import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../../context.js';import{validateAppcode}from'../../commands/common/validate.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x1b1b8e){const _0x5a7b77=a139_0x2d3b,{appcode:_0x446bc4,env:_0x28354c,autoYes:_0x57e154}=_0x1b1b8e,_0x2c7ffe=process[_0x5a7b77(0x1f4)]();if(getProjectConfigPath())throw new Error(_0x5a7b77(0x1d5));let _0x3d5044;for(const _0x53e5e9 of LEGACY_CONFIG_NAMES){const _0x1d8483=resolve(_0x2c7ffe,_0x53e5e9);if(existsSync(_0x1d8483)){_0x3d5044=_0x1d8483;break;}}if(_0x3d5044){let _0x532d7b={};try{_0x532d7b=JSON[_0x5a7b77(0x1da)](readFileSync(_0x3d5044,'utf8'));}catch{}const _0x4449c7=basename(_0x3d5044),_0x4ded9e=_0x532d7b?.['appcode']||_0x532d7b?.['app'];let _0x1772cc=_0x57e154;!_0x57e154&&(console[_0x5a7b77(0x1cf)](a139_0xca6636[_0x5a7b77(0x1d4)]('⚠\x20Found\x20legacy\x20configuration\x20file:\x20'+a139_0xca6636[_0x5a7b77(0x1e7)](_0x4449c7))),_0x4ded9e&&console[_0x5a7b77(0x1cf)](a139_0xca6636[_0x5a7b77(0x1dc)](_0x5a7b77(0x1c1)+_0x4ded9e)),_0x1772cc=await confirm({'message':_0x5a7b77(0x1c4)+a139_0xca6636[_0x5a7b77(0x1e7)]('.rabetbase.json')+_0x5a7b77(0x1d8),'default':!![]}));if(!_0x1772cc){console[_0x5a7b77(0x1cf)](_0x5a7b77(0x1c7)+CLI_BIN_NAME+_0x5a7b77(0x1d3));return;}const _0x415afc=resolve(_0x2c7ffe,NEW_CONFIG_NAME),_0x326c0c=getCliVersionFromPkg(),_0x2dac65=readRawConfig(),_0x20f32f=_0x446bc4||(typeof _0x532d7b?.[_0x5a7b77(0x1ea)]===_0x5a7b77(0x1e1)?_0x532d7b[_0x5a7b77(0x1ea)]:undefined)||(typeof _0x532d7b?.['app']==='string'?_0x532d7b[_0x5a7b77(0x1e6)]:undefined)||await askAppcode(),_0x143033=typeof _0x532d7b?.[_0x5a7b77(0x1c9)]===_0x5a7b77(0x1e1)?_0x532d7b[_0x5a7b77(0x1c9)]:typeof _0x2dac65[_0x5a7b77(0x1c9)]===_0x5a7b77(0x1e1)?_0x2dac65[_0x5a7b77(0x1c9)]:'production',_0x283ab0=buildCanonicalProjectConfig({..._0x2dac65,..._0x532d7b},{'appCodes':[_0x20f32f],'env':_0x143033,'metadata':{'version':_0x326c0c,'migratedAt':new Date()['toLocaleString'](),'migratedFrom':_0x3d5044}});writeConfigFile(_0x415afc,_0x283ab0);const _0x475b60=_0x3d5044+_0x5a7b77(0x1e3);renameSync(_0x3d5044,_0x475b60),logger[_0x5a7b77(0x1cd)](_0x2c7ffe),logger['info']('init',_0x5a7b77(0x1f5),{'from':_0x3d5044,'to':_0x415afc,'appcode':_0x20f32f,'env':_0x283ab0[_0x5a7b77(0x1c9)]}),console[_0x5a7b77(0x1cf)](a139_0xca6636[_0x5a7b77(0x1ca)](_0x5a7b77(0x1db)+_0x4449c7+'\x20→\x20.rabetbase.json')),console[_0x5a7b77(0x1cf)](a139_0xca6636['cyan'](_0x5a7b77(0x1d6)+Object[_0x5a7b77(0x1e0)](_0x283ab0[_0x5a7b77(0x1eb)]||{})[_0x5a7b77(0x1e4)](',\x20'))),console['log'](a139_0xca6636[_0x5a7b77(0x1dc)](_0x5a7b77(0x1c5)+_0x283ab0['defaultApp'])),console[_0x5a7b77(0x1cf)](a139_0xca6636[_0x5a7b77(0x1c2)]('\x20\x20Old\x20file\x20backed\x20up\x20as\x20'+_0x4449c7+_0x5a7b77(0x1e3)));return;}const _0x1b484b=_0x446bc4||await askAppcode(),_0xe78ea6=resolve(_0x2c7ffe,NEW_CONFIG_NAME),_0x392d47=getCliVersionFromPkg(),_0x3add15=readRawConfig(),_0x253168=typeof _0x3add15[_0x5a7b77(0x1c9)]===_0x5a7b77(0x1e1)?_0x3add15[_0x5a7b77(0x1c9)]:undefined,_0x2c8a54=buildCanonicalProjectConfig({},{'appCodes':[_0x1b484b],'env':_0x28354c||_0x253168||_0x5a7b77(0x1cb),'metadata':{'version':_0x392d47,'createdAt':new Date()[_0x5a7b77(0x1f3)]()}});writeConfigFile(_0xe78ea6,_0x2c8a54),logger[_0x5a7b77(0x1cd)](_0x2c7ffe),logger['info'](_0x5a7b77(0x1d0),_0x5a7b77(0x1cc),{'appcode':_0x1b484b,'env':_0x2c8a54[_0x5a7b77(0x1c9)],'version':_0x2c8a54[_0x5a7b77(0x1ef)],'configPath':_0xe78ea6}),console[_0x5a7b77(0x1cf)](a139_0xca6636[_0x5a7b77(0x1ca)](_0x5a7b77(0x1dd))),console['log'](a139_0xca6636[_0x5a7b77(0x1dc)](_0x5a7b77(0x1d6)+Object['keys'](_0x2c8a54[_0x5a7b77(0x1eb)]||{})[_0x5a7b77(0x1e4)](',\x20'))),console['log'](a139_0xca6636[_0x5a7b77(0x1dc)]('\x20\x20Default:\x20'+_0x2c8a54[_0x5a7b77(0x1ed)])),console[_0x5a7b77(0x1cf)](_0x5a7b77(0x1f0)+CLI_BIN_NAME+_0x5a7b77(0x1c6)+CLI_BIN_NAME+_0x5a7b77(0x1df));}function askAppcode(){return input({'message':'Please\x20enter\x20App\x20Code:','validate':_0x5a61a9=>{const _0x116fd5=a139_0x2d3b;if(!_0x5a61a9[_0x116fd5(0x1d9)]())return _0x116fd5(0x1e2);const {valid:_0x4dd0e1,message:_0x904c48}=validateAppcode(_0x5a61a9[_0x116fd5(0x1d9)]());return _0x4dd0e1||_0x904c48||_0x116fd5(0x1ee);}});}function getCliVersionFromPkg(){const _0x1bc9ae=a139_0x2d3b;try{const _0x3282d2=fileURLToPath(import.meta.url),_0x38edc6=resolve(dirname(_0x3282d2),_0x1bc9ae(0x1f1)),_0x4261ff=JSON['parse'](readFileSync(resolve(_0x38edc6,_0x1bc9ae(0x1d2)),_0x1bc9ae(0x1de)));return _0x4261ff[_0x1bc9ae(0x1ef)]||_0x1bc9ae(0x1e8);}catch{return'1.0.0';}}
1
+ (function(_0x23c2cf,_0x218d55){const _0x235e6e=a141_0x58a0,_0x39fb52=_0x23c2cf();while(!![]){try{const _0x352f4b=-parseInt(_0x235e6e(0x12f))/0x1+-parseInt(_0x235e6e(0x144))/0x2*(parseInt(_0x235e6e(0x127))/0x3)+parseInt(_0x235e6e(0x118))/0x4*(parseInt(_0x235e6e(0x11c))/0x5)+-parseInt(_0x235e6e(0x11f))/0x6+-parseInt(_0x235e6e(0x11b))/0x7*(parseInt(_0x235e6e(0x112))/0x8)+parseInt(_0x235e6e(0x117))/0x9+parseInt(_0x235e6e(0x141))/0xa;if(_0x352f4b===_0x218d55)break;else _0x39fb52['push'](_0x39fb52['shift']());}catch(_0xf9308b){_0x39fb52['push'](_0x39fb52['shift']());}}}(a141_0x3298,0x60aca));import{readFileSync,existsSync,renameSync}from'node:fs';function a141_0x58a0(_0x32e072,_0xfb1660){_0x32e072=_0x32e072-0x111;const _0x32982f=a141_0x3298();let _0x58a062=_0x32982f[_0x32e072];return _0x58a062;}function a141_0x3298(){const _0x117fac=['trim','appcode','info','\x20api\x20generate\x27\x20and\x20\x27','21AJkEuL','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','toLocaleString','\x20→\x20.rabetbase.json','yellow','log','setLogPath','../..','260688wqdMOM','gray','parse','\x20\x20appcode:\x20','cwd','apps','Invalid\x20App\x20Code','keys','Migration\x20cancelled.\x20Run\x20`','green','✓\x20Upgraded\x20','bold','defaultApp','1.0.0','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','init','\x20api\x20pull\x27','join','9843370gdNjNv','Please\x20enter\x20App\x20Code:','\x20\x20Apps:\x20','61596akGXoz','从旧配置文件升级成功','632ITAwRW','version','Upgrade\x20it\x20to\x20','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','.bak','4352274sWHzPJ','12252CZJLdO','production','\x20\x20Default:\x20','52367sVXwcI','110LMGHtf','env','utf8','432348RXEBHO','cyan','string','app'];a141_0x3298=function(){return _0x117fac;};return a141_0x3298();}import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a141_0x162db1 from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../../context.js';import{validateAppcode}from'../../commands/common/validate.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';export async function initConfig(_0x464843){const _0x5bd512=a141_0x58a0,{appcode:_0x2385db,env:_0xd642e9,autoYes:_0xb0edf4}=_0x464843,_0xd5cebe=process[_0x5bd512(0x133)]();if(getProjectConfigPath())throw new Error(_0x5bd512(0x13d));let _0xda2fcf;for(const _0x434d2f of LEGACY_CONFIG_NAMES){const _0x44bf9a=resolve(_0xd5cebe,_0x434d2f);if(existsSync(_0x44bf9a)){_0xda2fcf=_0x44bf9a;break;}}if(_0xda2fcf){let _0x2d34f8={};try{_0x2d34f8=JSON['parse'](readFileSync(_0xda2fcf,_0x5bd512(0x11e)));}catch{}const _0x42d16b=basename(_0xda2fcf),_0x53fe5c=_0x2d34f8?.[_0x5bd512(0x124)]||_0x2d34f8?.['app'];let _0x3c0e3e=_0xb0edf4;!_0xb0edf4&&(console[_0x5bd512(0x12c)](a141_0x162db1[_0x5bd512(0x12b)](_0x5bd512(0x128)+a141_0x162db1[_0x5bd512(0x13a)](_0x42d16b))),_0x53fe5c&&console[_0x5bd512(0x12c)](a141_0x162db1[_0x5bd512(0x120)](_0x5bd512(0x132)+_0x53fe5c)),_0x3c0e3e=await confirm({'message':_0x5bd512(0x114)+a141_0x162db1['bold']('.rabetbase.json')+'?\x20(Old\x20file\x20→\x20*.bak)','default':!![]}));if(!_0x3c0e3e){console['log'](_0x5bd512(0x137)+CLI_BIN_NAME+'\x20workspace\x20init`\x20to\x20start\x20fresh.');return;}const _0x55f872=resolve(_0xd5cebe,NEW_CONFIG_NAME),_0x30aa65=getCliVersionFromPkg(),_0xda2b44=readRawConfig(),_0xee15ce=_0x2385db||(typeof _0x2d34f8?.[_0x5bd512(0x124)]===_0x5bd512(0x121)?_0x2d34f8[_0x5bd512(0x124)]:undefined)||(typeof _0x2d34f8?.['app']==='string'?_0x2d34f8[_0x5bd512(0x122)]:undefined)||await askAppcode(),_0x43cbc2=typeof _0x2d34f8?.['env']===_0x5bd512(0x121)?_0x2d34f8[_0x5bd512(0x11d)]:typeof _0xda2b44['env']===_0x5bd512(0x121)?_0xda2b44[_0x5bd512(0x11d)]:_0x5bd512(0x119),_0x11b8f2=buildCanonicalProjectConfig({..._0xda2b44,..._0x2d34f8},{'appCodes':[_0xee15ce],'env':_0x43cbc2,'metadata':{'version':_0x30aa65,'migratedAt':new Date()['toLocaleString'](),'migratedFrom':_0xda2fcf}});writeConfigFile(_0x55f872,_0x11b8f2);const _0x11e3aa=_0xda2fcf+_0x5bd512(0x116);renameSync(_0xda2fcf,_0x11e3aa),logger[_0x5bd512(0x12d)](_0xd5cebe),logger[_0x5bd512(0x125)](_0x5bd512(0x13e),_0x5bd512(0x111),{'from':_0xda2fcf,'to':_0x55f872,'appcode':_0xee15ce,'env':_0x11b8f2[_0x5bd512(0x11d)]}),console[_0x5bd512(0x12c)](a141_0x162db1['green'](_0x5bd512(0x139)+_0x42d16b+_0x5bd512(0x12a))),console[_0x5bd512(0x12c)](a141_0x162db1[_0x5bd512(0x120)]('\x20\x20Apps:\x20'+Object['keys'](_0x11b8f2[_0x5bd512(0x134)]||{})[_0x5bd512(0x140)](',\x20'))),console['log'](a141_0x162db1[_0x5bd512(0x120)](_0x5bd512(0x11a)+_0x11b8f2[_0x5bd512(0x13b)])),console[_0x5bd512(0x12c)](a141_0x162db1[_0x5bd512(0x130)]('\x20\x20Old\x20file\x20backed\x20up\x20as\x20'+_0x42d16b+_0x5bd512(0x116)));return;}const _0x264da2=_0x2385db||await askAppcode(),_0x2583fa=resolve(_0xd5cebe,NEW_CONFIG_NAME),_0x732d0b=getCliVersionFromPkg(),_0x402921=readRawConfig(),_0x2a8775=typeof _0x402921[_0x5bd512(0x11d)]==='string'?_0x402921[_0x5bd512(0x11d)]:undefined,_0x5df00a=buildCanonicalProjectConfig({},{'appCodes':[_0x264da2],'env':_0xd642e9||_0x2a8775||_0x5bd512(0x119),'metadata':{'version':_0x732d0b,'createdAt':new Date()[_0x5bd512(0x129)]()}});writeConfigFile(_0x2583fa,_0x5df00a),logger[_0x5bd512(0x12d)](_0xd5cebe),logger[_0x5bd512(0x125)]('init','初始化项目配置文件成功',{'appcode':_0x264da2,'env':_0x5df00a['env'],'version':_0x5df00a[_0x5bd512(0x113)],'configPath':_0x2583fa}),console['log'](a141_0x162db1[_0x5bd512(0x138)]('✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory')),console['log'](a141_0x162db1[_0x5bd512(0x120)](_0x5bd512(0x143)+Object[_0x5bd512(0x136)](_0x5df00a['apps']||{})[_0x5bd512(0x140)](',\x20'))),console[_0x5bd512(0x12c)](a141_0x162db1['cyan'](_0x5bd512(0x11a)+_0x5df00a['defaultApp'])),console[_0x5bd512(0x12c)](_0x5bd512(0x115)+CLI_BIN_NAME+_0x5bd512(0x126)+CLI_BIN_NAME+_0x5bd512(0x13f));}function askAppcode(){const _0x279d10=a141_0x58a0;return input({'message':_0x279d10(0x142),'validate':_0x2eeb93=>{const _0x503fa0=_0x279d10;if(!_0x2eeb93[_0x503fa0(0x123)]())return'App\x20Code\x20cannot\x20be\x20empty';const {valid:_0x1af7c2,message:_0x906cf3}=validateAppcode(_0x2eeb93[_0x503fa0(0x123)]());return _0x1af7c2||_0x906cf3||_0x503fa0(0x135);}});}function getCliVersionFromPkg(){const _0x942aad=a141_0x58a0;try{const _0x2d15b9=fileURLToPath(import.meta.url),_0x4f46ad=resolve(dirname(_0x2d15b9),_0x942aad(0x12e)),_0x5c8ffc=JSON[_0x942aad(0x131)](readFileSync(resolve(_0x4f46ad,'package.json'),_0x942aad(0x11e)));return _0x5c8ffc[_0x942aad(0x113)]||_0x942aad(0x13c);}catch{return'1.0.0';}}
@@ -1 +1 @@
1
- (function(_0x33016d,_0x50c198){const _0x2c24d2=a140_0x23e8,_0x3fd575=_0x33016d();while(!![]){try{const _0xdf38c7=parseInt(_0x2c24d2(0x249))/0x1+-parseInt(_0x2c24d2(0x219))/0x2*(parseInt(_0x2c24d2(0x224))/0x3)+-parseInt(_0x2c24d2(0x1d0))/0x4*(-parseInt(_0x2c24d2(0x1d7))/0x5)+parseInt(_0x2c24d2(0x244))/0x6*(-parseInt(_0x2c24d2(0x24c))/0x7)+-parseInt(_0x2c24d2(0x1cd))/0x8*(parseInt(_0x2c24d2(0x24a))/0x9)+parseInt(_0x2c24d2(0x1d5))/0xa+-parseInt(_0x2c24d2(0x237))/0xb;if(_0xdf38c7===_0x50c198)break;else _0x3fd575['push'](_0x3fd575['shift']());}catch(_0x54a45d){_0x3fd575['push'](_0x3fd575['shift']());}}}(a140_0x7fb3,0xb0100));import a140_0x19e11d from'chalk';import a140_0x41f9d9 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';function a140_0x23e8(_0x7c36a7,_0x174bda){_0x7c36a7=_0x7c36a7-0x1cb;const _0x7fb318=a140_0x7fb3();let _0x23e81d=_0x7fb318[_0x7c36a7];return _0x23e81d;}import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';function a140_0x7fb3(){const _0x3c5d6d=['red','.cursor/rules/lovrabet_rules.mdc','===\x20Upgrade\x20Analysis\x20===','\x20\x20New\x20config\x20(.rabetbase.json):\x20','yellow','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','Remove\x20legacy\x20artifacts','Clean\x20MCP\x20config','1469061GOUMgJ','dependencies','args','green','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','\x20\x20bun\x20install','CANCEL','.claude/skills/lovrabet','Config\x20migration','message','\x20from\x20','isDirectory','detail','66GUhMqU','Skill\x20swap:','utf8','succeed','fail','690668APMnpT','3807774NliDTu','removed\x20','453467khVniC','undefined','isArray','8lxCEZX','Upgrade\x20@lovrabet/sdk','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','1348eZBRxz','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','push','Proceed\x20with\x20upgrade?','package.json','5607490sdbhXa','done','14390VBzBbI','object','white','@lovrabet/sdk','.lovrabet','skipped','no\x20legacy\x20config\x20found','\x20→\x20latest','sdkUpgrade','no\x20matching\x20entry\x20found','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','hasNewConfig','stringify','Upgrade\x20cancelled.','lovrabet/rabetbase','@lovrabet/dataset-mcp-server','oldPath','[\x22@lovrabet/sdk\x22]:\x20','Step\x206/7:\x20Installing\x20new\x20skill...','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','entries','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','yes','devDependencies','Upgrade\x20completed\x20successfully!','join','step','.cursor/mcp.json','Config\x20file:','.bak','path','exit\x20','Step\x201/7:\x20Migrating\x20config...','fields','\x20\x20Fields\x20to\x20migrate:\x20','cwd','files','Legacy\x20artifacts:','log','oldArtifacts','\x20→\x20keys:\x20','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','Step\x201/7:\x20Config\x20migration\x20—\x20','string','Step\x205/7:\x20Removing\x20old\x20skill...','MCP\x20config:','length','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','\x20\x20\x20\x20\x20\x20\x20','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','Step\x204/7:\x20Cleaning\x20MCP\x20config...','FAIL','latest','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','mcpServers','already\x20exists\x20(will\x20merge)','\x20→\x20','FOUND','parse','not\x20found\x20(will\x20create)','cyan','\x20\x20Step\x20','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','skipped\x20(no\x20legacy\x20config)','bold','values','22atIjfC','includes','gray','\x20(backup:\x20','not\x20needed','not\x20found\x20or\x20already\x20at\x20latest','start','inherit','Remove\x20.lovrabet/','configMigration','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','62979rHOCSF','keys','some','error','no\x20legacy\x20entry','status','filter','failed','oldMcpConfig','@lovrabet/sdk:','\x20removed'];a140_0x7fb3=function(){return _0x3c5d6d;};return a140_0x7fb3();}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['filter'](_0x4ded2e=>_0x4ded2e!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x146b43){const _0x3b1055=a140_0x23e8,_0x419c78=[];for(const _0x5b1ffc of Object[_0x3b1055(0x218)](CORE_IDE_CONFIGS)){if(_0x5b1ffc['files'])for(const _0xb7f45e of _0x5b1ffc[_0x3b1055(0x1fb)]){_0x419c78['push'](resolve(_0x146b43,_0xb7f45e[_0x3b1055(0x1f5)]));}}return _0x419c78;}function analyse(_0x4c8582){const _0xd9fad3=a140_0x23e8;let _0x13eecc=null;const _0x4919fd=resolve(_0x4c8582,NEW_CONFIG_NAME),_0x594446=existsSync(_0x4919fd);for(const _0x710718 of LEGACY_CONFIG_NAMES){const _0x389059=resolve(_0x4c8582,_0x710718);if(existsSync(_0x389059)){const _0x4b1299=readConfigFile(_0x389059),_0x16b73f=Object[_0xd9fad3(0x225)](_0x4b1299)[_0xd9fad3(0x22a)](_0x141db0=>typeof _0x4b1299[_0x141db0]!==_0xd9fad3(0x1cb));_0x13eecc={'oldPath':_0x389059,'hasNewConfig':_0x594446,'fields':_0x16b73f};break;}}const _0x57a321=[],_0xafe141=resolve(_0x4c8582,_0xd9fad3(0x1db));if(existsSync(_0xafe141))_0x57a321[_0xd9fad3(0x1d2)](_0xafe141);const _0x39198a=resolve(_0x4c8582,_0xd9fad3(0x230));if(existsSync(_0x39198a))_0x57a321['push'](_0x39198a);const _0x4642ca=resolve(_0x4c8582,_0xd9fad3(0x23e));if(existsSync(_0x4642ca))_0x57a321[_0xd9fad3(0x1d2)](_0x4642ca);for(const _0x560d35 of collectIdeSkillFiles(_0x4c8582)){if(existsSync(_0x560d35))_0x57a321[_0xd9fad3(0x1d2)](_0x560d35);}let _0xf12f41=null;const _0x3886ee=resolve(_0x4c8582,_0xd9fad3(0x1f2));if(existsSync(_0x3886ee))try{const _0x166800=JSON[_0xd9fad3(0x211)](readFileSync(_0x3886ee,'utf8'));if(_0x166800?.[_0xd9fad3(0x20d)]&&typeof _0x166800[_0xd9fad3(0x20d)]==='object'){const _0x2871fd=[];for(const [_0x43f840,_0xba7180]of Object['entries'](_0x166800[_0xd9fad3(0x20d)])){const _0x20b205=_0xba7180;_0x20b205?.[_0xd9fad3(0x239)]&&Array['isArray'](_0x20b205['args'])&&_0x20b205[_0xd9fad3(0x239)][_0xd9fad3(0x226)](_0x12daff=>typeof _0x12daff==='string'&&_0x12daff[_0xd9fad3(0x21a)](_0xd9fad3(0x1e6)))&&_0x2871fd[_0xd9fad3(0x1d2)](_0x43f840);}_0x2871fd[_0xd9fad3(0x205)]>0x0&&(_0xf12f41={'path':_0x3886ee,'keys':_0x2871fd});}}catch{}const _0x4fbb2b=_0x57a321[_0xd9fad3(0x205)]>0x0||_0x13eecc!==null;let _0x4148b2=null;const _0x3e148c=resolve(_0x4c8582,_0xd9fad3(0x1d4));if(existsSync(_0x3e148c))try{const _0x5c8d09=JSON[_0xd9fad3(0x211)](readFileSync(_0x3e148c,_0xd9fad3(0x246)));for(const _0x25e000 of[_0xd9fad3(0x238),_0xd9fad3(0x1ee)]){const _0x5564cf=_0x5c8d09?.[_0x25e000]?.[_0xd9fad3(0x1da)];if(typeof _0x5564cf===_0xd9fad3(0x202)){_0x5564cf!=='latest'&&(_0x4148b2={'pkgPath':_0x3e148c,'currentVersion':_0x5564cf,'field':_0x25e000});break;}}}catch{}return{'configMigration':_0x13eecc,'oldArtifacts':_0x57a321,'oldMcpConfig':_0xf12f41,'needsSkillSwap':_0x4fbb2b,'sdkUpgrade':_0x4148b2};}function printReport(_0x2a7465){const _0x3e03d9=a140_0x23e8,{configMigration:_0x51c56e,oldArtifacts:_0x584bba,oldMcpConfig:_0x32dce5,needsSkillSwap:_0xa1099}=_0x2a7465;console['log'](''),console[_0x3e03d9(0x1fd)](a140_0x19e11d[_0x3e03d9(0x217)](_0x3e03d9(0x231))),console[_0x3e03d9(0x1fd)]('');_0x51c56e?(console[_0x3e03d9(0x1fd)](a140_0x19e11d[_0x3e03d9(0x213)](_0x3e03d9(0x1f3))+('\x20\x20'+a140_0x19e11d[_0x3e03d9(0x233)](_0x51c56e[_0x3e03d9(0x1e7)]))),console[_0x3e03d9(0x1fd)](_0x3e03d9(0x232)+(_0x51c56e['hasNewConfig']?a140_0x19e11d[_0x3e03d9(0x23a)](_0x3e03d9(0x20e)):a140_0x19e11d[_0x3e03d9(0x21b)](_0x3e03d9(0x212)))),console[_0x3e03d9(0x1fd)](_0x3e03d9(0x1f9)+_0x51c56e[_0x3e03d9(0x1f8)]['join'](',\x20')),console[_0x3e03d9(0x1fd)](_0x3e03d9(0x208))):console[_0x3e03d9(0x1fd)](a140_0x19e11d[_0x3e03d9(0x213)]('Config\x20file:')+'\x20\x20'+a140_0x19e11d[_0x3e03d9(0x21b)](_0x3e03d9(0x1dd)));console[_0x3e03d9(0x1fd)]('');if(_0x584bba[_0x3e03d9(0x205)]>0x0){console[_0x3e03d9(0x1fd)](a140_0x19e11d[_0x3e03d9(0x213)](_0x3e03d9(0x1fc)));for(const _0x5cfba7 of _0x584bba){console[_0x3e03d9(0x1fd)]('\x20\x20'+a140_0x19e11d[_0x3e03d9(0x22f)](_0x3e03d9(0x210))+'\x20\x20'+_0x5cfba7);}console[_0x3e03d9(0x1fd)]('\x20\x20Action:\x20delete');}else console[_0x3e03d9(0x1fd)](a140_0x19e11d[_0x3e03d9(0x213)]('Legacy\x20artifacts:')+'\x20\x20'+a140_0x19e11d[_0x3e03d9(0x21b)]('none\x20found'));console['log']('');_0x32dce5?(console[_0x3e03d9(0x1fd)](a140_0x19e11d[_0x3e03d9(0x213)](_0x3e03d9(0x204))+('\x20\x20'+a140_0x19e11d[_0x3e03d9(0x233)](_0x32dce5['path'])+_0x3e03d9(0x1ff)+_0x32dce5['keys']['join'](',\x20'))),console['log']('\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server')):console[_0x3e03d9(0x1fd)](a140_0x19e11d['cyan'](_0x3e03d9(0x204))+'\x20\x20'+a140_0x19e11d[_0x3e03d9(0x21b)](_0x3e03d9(0x228)));console[_0x3e03d9(0x1fd)](''),console[_0x3e03d9(0x1fd)](a140_0x19e11d[_0x3e03d9(0x213)](_0x3e03d9(0x245))+('\x20\x20'+(_0xa1099?a140_0x19e11d[_0x3e03d9(0x233)]('needed'):a140_0x19e11d['green'](_0x3e03d9(0x21d)))));_0xa1099&&console['log'](_0x3e03d9(0x20c)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x3e03d9(0x1fd)]('');if(_0x2a7465[_0x3e03d9(0x1df)]){const {currentVersion:_0x310597,field:_0x1cc4ce,pkgPath:_0x1d3aec}=_0x2a7465[_0x3e03d9(0x1df)];console[_0x3e03d9(0x1fd)](a140_0x19e11d['cyan'](_0x3e03d9(0x22d))+('\x20\x20'+a140_0x19e11d[_0x3e03d9(0x233)](_0x1d3aec))),console[_0x3e03d9(0x1fd)]('\x20\x20Current\x20version\x20in\x20'+_0x1cc4ce+':\x20'+a140_0x19e11d['yellow'](_0x310597)+_0x3e03d9(0x20f)+a140_0x19e11d[_0x3e03d9(0x23a)](_0x3e03d9(0x20b))),console['log'](_0x3e03d9(0x23b));}else console[_0x3e03d9(0x1fd)](a140_0x19e11d[_0x3e03d9(0x213)](_0x3e03d9(0x22d))+'\x20\x20'+a140_0x19e11d[_0x3e03d9(0x21b)](_0x3e03d9(0x21e)));console[_0x3e03d9(0x1fd)]('');}function execConfigMigration(_0x3bc306,_0x496cc4){const _0x2cf3ef=a140_0x23e8,{configMigration:_0x2a4537}=_0x3bc306;if(!_0x2a4537?.['oldPath'])return{'step':0x1,'label':_0x2cf3ef(0x23f),'ok':!![],'detail':_0x2cf3ef(0x216)};const _0x836a65=readConfigFile(_0x2a4537[_0x2cf3ef(0x1e7)]),_0x5e2fee=resolve(_0x496cc4,NEW_CONFIG_NAME),_0x1ad41d=_0x2a4537[_0x2cf3ef(0x1e2)]?readConfigFile(_0x5e2fee):{};for(const [_0x5a4f80,_0x5ae6e7]of Object[_0x2cf3ef(0x1eb)](_0x836a65)){!(_0x5a4f80 in _0x1ad41d)&&(_0x1ad41d[_0x5a4f80]=_0x5ae6e7);}writeConfigFile(_0x5e2fee,_0x1ad41d);const _0x95899a=_0x2a4537[_0x2cf3ef(0x1e7)]+_0x2cf3ef(0x1f4);return renameSync(_0x2a4537['oldPath'],_0x95899a),{'step':0x1,'label':_0x2cf3ef(0x23f),'ok':!![],'detail':_0x2a4537['oldPath']+_0x2cf3ef(0x20f)+_0x5e2fee+_0x2cf3ef(0x21c)+_0x95899a+')'};}function execRemoveOldArtifacts(_0x431f74){const _0x2b4e48=a140_0x23e8,_0xcfb92c=[];for(const _0x187c9f of _0x431f74){try{if(!existsSync(_0x187c9f))continue;const _0x49143d=tryStat(_0x187c9f);_0x49143d?.[_0x2b4e48(0x242)]()?rmSync(_0x187c9f,{'recursive':!![],'force':!![]}):unlinkSync(_0x187c9f);}catch(_0x57d1b9){_0xcfb92c[_0x2b4e48(0x1d2)](_0x187c9f+':\x20'+_0x57d1b9['message']);}}return{'step':0x3,'label':_0x2b4e48(0x235),'ok':_0xcfb92c[_0x2b4e48(0x205)]===0x0,'detail':_0xcfb92c['length']>0x0?_0x431f74[_0x2b4e48(0x205)]-_0xcfb92c[_0x2b4e48(0x205)]+'/'+_0x431f74[_0x2b4e48(0x205)]+'\x20removed\x20('+_0xcfb92c[_0x2b4e48(0x1f0)](';\x20')+')':_0x431f74['length']+_0x2b4e48(0x22e)};}function execCleanMcp(_0x4c92fa){const _0x5cd3b1=a140_0x23e8;if(!_0x4c92fa[_0x5cd3b1(0x22c)])return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x5cd3b1(0x1dc)};try{const _0x4a6720=readFileSync(_0x4c92fa[_0x5cd3b1(0x22c)][_0x5cd3b1(0x1f5)],_0x5cd3b1(0x246)),_0x509245=JSON['parse'](_0x4a6720);if(_0x509245?.[_0x5cd3b1(0x20d)]&&typeof _0x509245['mcpServers']===_0x5cd3b1(0x1d8)){const _0x14358a=[];for(const [_0x55867a,_0x163ee2]of Object[_0x5cd3b1(0x1eb)](_0x509245[_0x5cd3b1(0x20d)])){_0x163ee2?.['args']&&Array[_0x5cd3b1(0x1cc)](_0x163ee2[_0x5cd3b1(0x239)])&&_0x163ee2[_0x5cd3b1(0x239)]['some'](_0xb51449=>typeof _0xb51449==='string'&&_0xb51449[_0x5cd3b1(0x21a)]('@lovrabet/dataset-mcp-server'))&&_0x14358a[_0x5cd3b1(0x1d2)](_0x55867a);}for(const _0x1ec4f6 of _0x14358a){delete _0x509245[_0x5cd3b1(0x20d)][_0x1ec4f6];}return _0x14358a['length']>0x0&&writeFileSync(_0x4c92fa['oldMcpConfig'][_0x5cd3b1(0x1f5)],JSON[_0x5cd3b1(0x1e3)](_0x509245,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x5cd3b1(0x24b)+_0x14358a[_0x5cd3b1(0x1f0)](',\x20')+_0x5cd3b1(0x241)+_0x4c92fa[_0x5cd3b1(0x22c)][_0x5cd3b1(0x1f5)]};}return{'step':0x4,'label':_0x5cd3b1(0x236),'ok':!![],'detail':_0x5cd3b1(0x1e0)};}catch(_0x2f0f52){return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':![],'detail':_0x2f0f52[_0x5cd3b1(0x240)]};}}function execSkillsRemove(_0x1ae4ae,_0x371603){const _0x248b80=a140_0x23e8,_0x1dd2b2=runNpxSkillsRemove(_0x1ae4ae,{'stdio':_0x248b80(0x220),'yes':_0x371603});return{'step':0x5,'label':'Remove\x20old\x20skill','ok':_0x1dd2b2['ok'],'detail':_0x1dd2b2['ok']?'lovrabet/lovrabet-skill\x20removed':_0x1dd2b2[_0x248b80(0x227)]??_0x248b80(0x1f6)+_0x1dd2b2[_0x248b80(0x229)]};}function execSkillsAdd(_0x3aaf58,_0x5223f8){const _0x26e9f2=a140_0x23e8,_0x2826eb=runNpxSkillsAddGlobal(_0x3aaf58,_0x26e9f2(0x1e5),{'stdio':_0x26e9f2(0x220),'yes':_0x5223f8});return{'step':0x6,'label':'Install\x20new\x20skill','ok':_0x2826eb['ok'],'detail':_0x2826eb['ok']?'lovrabet/rabetbase\x20installed\x20globally':_0x2826eb[_0x26e9f2(0x227)]??_0x26e9f2(0x1f6)+_0x2826eb[_0x26e9f2(0x229)]};}function execUpgradeSdk(_0x41602e){const _0x3702c6=a140_0x23e8;if(!_0x41602e[_0x3702c6(0x1df)])return{'step':0x7,'label':_0x3702c6(0x1ce),'ok':!![],'detail':_0x3702c6(0x1ec)};const {pkgPath:_0x19552e,currentVersion:_0xfe9d86,field:_0xb54a66}=_0x41602e[_0x3702c6(0x1df)];try{const _0x24ce78=readFileSync(_0x19552e,_0x3702c6(0x246)),_0x42efc4=JSON['parse'](_0x24ce78);return _0x42efc4[_0xb54a66][_0x3702c6(0x1da)]=_0x3702c6(0x20b),writeFileSync(_0x19552e,JSON[_0x3702c6(0x1e3)](_0x42efc4,null,0x2)+'\x0a',_0x3702c6(0x246)),{'step':0x7,'label':_0x3702c6(0x1ce),'ok':!![],'detail':_0xb54a66+_0x3702c6(0x1e8)+_0xfe9d86+_0x3702c6(0x1de)};}catch(_0x398f7e){return{'step':0x7,'label':_0x3702c6(0x1ce),'ok':![],'detail':_0x398f7e[_0x3702c6(0x240)]};}}function tryStat(_0x35f0fa){try{return statSync(_0x35f0fa);}catch{return undefined;}}function printSummary(_0x15ab1a){const _0x27110f=a140_0x23e8;console[_0x27110f(0x1fd)](''),console[_0x27110f(0x1fd)](a140_0x19e11d[_0x27110f(0x217)]('===\x20Upgrade\x20Summary\x20===')),console['log']('');for(const _0x252be8 of _0x15ab1a){const _0x4add7c=_0x252be8['ok']?a140_0x19e11d[_0x27110f(0x23a)]('OK'):a140_0x19e11d[_0x27110f(0x22f)](_0x27110f(0x20a));console[_0x27110f(0x1fd)]('\x20\x20'+_0x4add7c+_0x27110f(0x214)+_0x252be8[_0x27110f(0x1f1)]+':\x20'+_0x252be8['label']);if(_0x252be8[_0x27110f(0x243)])console[_0x27110f(0x1fd)](_0x27110f(0x207)+a140_0x19e11d[_0x27110f(0x21b)](_0x252be8[_0x27110f(0x243)]));}console[_0x27110f(0x1fd)]('');}export async function upgradeApp(_0x506b5f,_0x410882){const _0x44cb40=a140_0x23e8,_0xfe0cc=process[_0x44cb40(0x1fa)](),_0x3b9cf6=analyse(_0xfe0cc),_0x537e51=!_0x3b9cf6[_0x44cb40(0x222)]&&_0x3b9cf6[_0x44cb40(0x1fe)][_0x44cb40(0x205)]===0x0&&!_0x3b9cf6[_0x44cb40(0x22c)]&&!_0x3b9cf6['needsSkillSwap']&&!_0x3b9cf6[_0x44cb40(0x1df)];if(_0x537e51){console[_0x44cb40(0x1fd)](a140_0x19e11d[_0x44cb40(0x23a)](_0x44cb40(0x1ea)));return;}printReport(_0x3b9cf6);const _0x26e395=!!(_0x410882[_0x44cb40(0x1ed)]||_0x410882['Y']||_0x506b5f);if(!_0x26e395)try{const _0x503bf7=await askConfirm(_0x44cb40(0x1d3));if(!_0x503bf7){console[_0x44cb40(0x1fd)](a140_0x19e11d[_0x44cb40(0x21b)](_0x44cb40(0x1e4)));return;}}catch(_0x5d9dcd){if(_0x5d9dcd?.[_0x44cb40(0x240)]===_0x44cb40(0x23d)){console[_0x44cb40(0x1fd)](a140_0x19e11d[_0x44cb40(0x21b)](_0x44cb40(0x1e4)));return;}throw _0x5d9dcd;}const _0x19a918=[],_0x298a11=a140_0x41f9d9({'text':_0x44cb40(0x1f7),'color':_0x44cb40(0x213)})['start'](),_0xc64fb0=execConfigMigration(_0x3b9cf6,_0xfe0cc);_0x19a918[_0x44cb40(0x1d2)](_0xc64fb0),_0x298a11[_0xc64fb0['ok']?_0x44cb40(0x247):_0x44cb40(0x248)](_0x44cb40(0x201)+(_0xc64fb0[_0x44cb40(0x243)]??(_0xc64fb0['ok']?'done':_0x44cb40(0x22b))));const _0x2e5cbe=resolve(_0xfe0cc,_0x44cb40(0x1db)),_0x190463=a140_0x41f9d9({'text':'Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','color':'cyan'})['start']();if(existsSync(_0x2e5cbe))try{rmSync(_0x2e5cbe,{'recursive':!![],'force':!![]}),_0x190463['succeed'](_0x44cb40(0x234)),_0x19a918[_0x44cb40(0x1d2)]({'step':0x2,'label':_0x44cb40(0x221),'ok':!![]});}catch(_0x15f58b){_0x190463['fail'](_0x44cb40(0x1cf)+_0x15f58b[_0x44cb40(0x240)]),_0x19a918[_0x44cb40(0x1d2)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':![],'detail':_0x15f58b[_0x44cb40(0x240)]});}else _0x190463['info'](_0x44cb40(0x1e1)),_0x19a918[_0x44cb40(0x1d2)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![],'detail':_0x44cb40(0x1dc)});const _0xb1b021=a140_0x41f9d9({'text':'Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','color':_0x44cb40(0x213)})[_0x44cb40(0x21f)](),_0x5ab34f=execRemoveOldArtifacts(_0x3b9cf6[_0x44cb40(0x1fe)]);_0x19a918[_0x44cb40(0x1d2)](_0x5ab34f),_0xb1b021[_0x5ab34f['ok']?_0x44cb40(0x247):_0x44cb40(0x248)](_0x44cb40(0x215)+(_0x5ab34f['detail']??(_0x5ab34f['ok']?'done':_0x44cb40(0x22b))));const _0x2e424f=a140_0x41f9d9({'text':_0x44cb40(0x209),'color':_0x44cb40(0x213)})[_0x44cb40(0x21f)](),_0x4b7d9c=execCleanMcp(_0x3b9cf6);_0x19a918['push'](_0x4b7d9c),_0x2e424f[_0x4b7d9c['ok']?_0x44cb40(0x247):_0x44cb40(0x248)]('Step\x204/7:\x20MCP\x20config\x20—\x20'+(_0x4b7d9c['detail']??(_0x4b7d9c['ok']?_0x44cb40(0x1d6):_0x44cb40(0x22b))));const _0xbb9ebd=a140_0x41f9d9({'text':_0x44cb40(0x203),'color':_0x44cb40(0x213)})[_0x44cb40(0x21f)](),_0x347482=execSkillsRemove(_0xfe0cc,_0x26e395);_0x19a918['push'](_0x347482),_0xbb9ebd[_0x347482['ok']?'succeed':_0x44cb40(0x248)]('Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20'+(_0x347482[_0x44cb40(0x243)]??(_0x347482['ok']?'done':_0x44cb40(0x22b))));const _0x281278=a140_0x41f9d9({'text':_0x44cb40(0x1e9),'color':_0x44cb40(0x213)})[_0x44cb40(0x21f)](),_0x533115=execSkillsAdd(_0xfe0cc,_0x26e395);_0x19a918[_0x44cb40(0x1d2)](_0x533115),_0x281278[_0x533115['ok']?'succeed':_0x44cb40(0x248)](_0x44cb40(0x200)+(_0x533115[_0x44cb40(0x243)]??(_0x533115['ok']?_0x44cb40(0x1d6):'failed')));const _0x176fd7=a140_0x41f9d9({'text':_0x44cb40(0x1d1),'color':'cyan'})[_0x44cb40(0x21f)](),_0x57398c=execUpgradeSdk(_0x3b9cf6);_0x19a918[_0x44cb40(0x1d2)](_0x57398c),_0x176fd7[_0x57398c['ok']?'succeed':'fail'](_0x44cb40(0x223)+(_0x57398c[_0x44cb40(0x243)]??(_0x57398c['ok']?_0x44cb40(0x1d6):'failed'))),printSummary(_0x19a918);const _0x192b9d=_0x19a918['some'](_0x44ac00=>!_0x44ac00['ok']);_0x192b9d?console[_0x44cb40(0x1fd)](a140_0x19e11d[_0x44cb40(0x233)](_0x44cb40(0x206))):console[_0x44cb40(0x1fd)](a140_0x19e11d['green'](_0x44cb40(0x1ef))),_0x57398c['ok']&&_0x3b9cf6[_0x44cb40(0x1df)]&&(console[_0x44cb40(0x1fd)](''),console[_0x44cb40(0x1fd)](a140_0x19e11d[_0x44cb40(0x217)][_0x44cb40(0x213)]('@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.')),console[_0x44cb40(0x1fd)](a140_0x19e11d['cyan']('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console[_0x44cb40(0x1fd)](''),console['log'](a140_0x19e11d['white']('\x20\x20npm\x20install')),console[_0x44cb40(0x1fd)](a140_0x19e11d['white']('\x20\x20#\x20or')),console['log'](a140_0x19e11d[_0x44cb40(0x1d9)](_0x44cb40(0x23c))),console['log'](''));}
1
+ const a142_0x405afc=a142_0x35af;(function(_0x1d6532,_0x2d79f4){const _0x5bd7ee=a142_0x35af,_0x3482f2=_0x1d6532();while(!![]){try{const _0x186420=parseInt(_0x5bd7ee(0x204))/0x1+-parseInt(_0x5bd7ee(0x241))/0x2*(parseInt(_0x5bd7ee(0x208))/0x3)+parseInt(_0x5bd7ee(0x206))/0x4+parseInt(_0x5bd7ee(0x21a))/0x5+parseInt(_0x5bd7ee(0x226))/0x6+parseInt(_0x5bd7ee(0x22b))/0x7+parseInt(_0x5bd7ee(0x247))/0x8*(-parseInt(_0x5bd7ee(0x1d8))/0x9);if(_0x186420===_0x2d79f4)break;else _0x3482f2['push'](_0x3482f2['shift']());}catch(_0x190f54){_0x3482f2['push'](_0x3482f2['shift']());}}}(a142_0x51eb,0x1984d));import a142_0x4fbda6 from'chalk';import a142_0x595cd0 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';function a142_0x35af(_0x579a90,_0x2e4ac6){_0x579a90=_0x579a90-0x1c9;const _0x51eb7e=a142_0x51eb();let _0x35aff8=_0x51eb7e[_0x579a90];return _0x35aff8;}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[a142_0x405afc(0x217)](_0x533758=>_0x533758!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x2e42dd){const _0x39d73c=a142_0x405afc,_0xb75f28=[];for(const _0x4373a7 of Object[_0x39d73c(0x1c9)](CORE_IDE_CONFIGS)){if(_0x4373a7[_0x39d73c(0x203)])for(const _0x1eb8f6 of _0x4373a7['files']){_0xb75f28[_0x39d73c(0x22a)](resolve(_0x2e42dd,_0x1eb8f6[_0x39d73c(0x230)]));}}return _0xb75f28;}function analyse(_0x2c1411){const _0x161f5e=a142_0x405afc;let _0x2ff929=null;const _0x529f51=resolve(_0x2c1411,NEW_CONFIG_NAME),_0x102ecb=existsSync(_0x529f51);for(const _0x8d76dd of LEGACY_CONFIG_NAMES){const _0x2b5e32=resolve(_0x2c1411,_0x8d76dd);if(existsSync(_0x2b5e32)){const _0x35935a=readConfigFile(_0x2b5e32),_0x57c32e=Object[_0x161f5e(0x1fa)](_0x35935a)[_0x161f5e(0x217)](_0x1d0ae8=>typeof _0x35935a[_0x1d0ae8]!==_0x161f5e(0x1e9));_0x2ff929={'oldPath':_0x2b5e32,'hasNewConfig':_0x102ecb,'fields':_0x57c32e};break;}}const _0x43a4bb=[],_0x4c5224=resolve(_0x2c1411,_0x161f5e(0x22f));if(existsSync(_0x4c5224))_0x43a4bb['push'](_0x4c5224);const _0x362132=resolve(_0x2c1411,_0x161f5e(0x1ce));if(existsSync(_0x362132))_0x43a4bb[_0x161f5e(0x22a)](_0x362132);const _0x409383=resolve(_0x2c1411,_0x161f5e(0x1d1));if(existsSync(_0x409383))_0x43a4bb[_0x161f5e(0x22a)](_0x409383);for(const _0x583700 of collectIdeSkillFiles(_0x2c1411)){if(existsSync(_0x583700))_0x43a4bb[_0x161f5e(0x22a)](_0x583700);}let _0x434285=null;const _0x304ae3=resolve(_0x2c1411,'.cursor/mcp.json');if(existsSync(_0x304ae3))try{const _0x1e5c78=JSON['parse'](readFileSync(_0x304ae3,_0x161f5e(0x1cb)));if(_0x1e5c78?.[_0x161f5e(0x1cf)]&&typeof _0x1e5c78[_0x161f5e(0x1cf)]==='object'){const _0x1f7af4=[];for(const [_0x3e7d5e,_0x5663d7]of Object['entries'](_0x1e5c78[_0x161f5e(0x1cf)])){const _0x1974d9=_0x5663d7;_0x1974d9?.['args']&&Array['isArray'](_0x1974d9['args'])&&_0x1974d9[_0x161f5e(0x233)][_0x161f5e(0x200)](_0x5a50f1=>typeof _0x5a50f1===_0x161f5e(0x1dd)&&_0x5a50f1[_0x161f5e(0x1f7)](_0x161f5e(0x225)))&&_0x1f7af4[_0x161f5e(0x22a)](_0x3e7d5e);}_0x1f7af4['length']>0x0&&(_0x434285={'path':_0x304ae3,'keys':_0x1f7af4});}}catch{}const _0x140b63=_0x43a4bb['length']>0x0||_0x2ff929!==null;let _0x6581c0=null;const _0x337720=resolve(_0x2c1411,_0x161f5e(0x1e8));if(existsSync(_0x337720))try{const _0xbb29e7=JSON[_0x161f5e(0x1f6)](readFileSync(_0x337720,_0x161f5e(0x1cb)));for(const _0x13a01c of[_0x161f5e(0x223),_0x161f5e(0x237)]){const _0xd8f86=_0xbb29e7?.[_0x13a01c]?.[_0x161f5e(0x1ff)];if(typeof _0xd8f86===_0x161f5e(0x1dd)){_0xd8f86!==_0x161f5e(0x227)&&(_0x6581c0={'pkgPath':_0x337720,'currentVersion':_0xd8f86,'field':_0x13a01c});break;}}}catch{}return{'configMigration':_0x2ff929,'oldArtifacts':_0x43a4bb,'oldMcpConfig':_0x434285,'needsSkillSwap':_0x140b63,'sdkUpgrade':_0x6581c0};}function printReport(_0xa00886){const _0x2fe460=a142_0x405afc,{configMigration:_0x26051e,oldArtifacts:_0x1ebc11,oldMcpConfig:_0x793bb1,needsSkillSwap:_0x1d4339}=_0xa00886;console[_0x2fe460(0x22d)](''),console['log'](a142_0x4fbda6[_0x2fe460(0x1fb)](_0x2fe460(0x21c))),console[_0x2fe460(0x22d)]('');_0x26051e?(console['log'](a142_0x4fbda6[_0x2fe460(0x1f2)](_0x2fe460(0x215))+('\x20\x20'+a142_0x4fbda6[_0x2fe460(0x1f4)](_0x26051e[_0x2fe460(0x243)]))),console[_0x2fe460(0x22d)](_0x2fe460(0x1fd)+(_0x26051e[_0x2fe460(0x1d3)]?a142_0x4fbda6['green'](_0x2fe460(0x211)):a142_0x4fbda6['gray'](_0x2fe460(0x1cc)))),console[_0x2fe460(0x22d)](_0x2fe460(0x216)+_0x26051e[_0x2fe460(0x22e)]['join'](',\x20')),console[_0x2fe460(0x22d)](_0x2fe460(0x236))):console[_0x2fe460(0x22d)](a142_0x4fbda6[_0x2fe460(0x1f2)](_0x2fe460(0x215))+'\x20\x20'+a142_0x4fbda6[_0x2fe460(0x1db)]('no\x20legacy\x20config\x20found'));console[_0x2fe460(0x22d)]('');if(_0x1ebc11[_0x2fe460(0x1de)]>0x0){console[_0x2fe460(0x22d)](a142_0x4fbda6['cyan']('Legacy\x20artifacts:'));for(const _0x1d076b of _0x1ebc11){console[_0x2fe460(0x22d)]('\x20\x20'+a142_0x4fbda6[_0x2fe460(0x207)]('FOUND')+'\x20\x20'+_0x1d076b);}console['log'](_0x2fe460(0x20e));}else console['log'](a142_0x4fbda6[_0x2fe460(0x1f2)](_0x2fe460(0x1eb))+'\x20\x20'+a142_0x4fbda6[_0x2fe460(0x1db)]('none\x20found'));console[_0x2fe460(0x22d)]('');_0x793bb1?(console['log'](a142_0x4fbda6[_0x2fe460(0x1f2)](_0x2fe460(0x1f5))+('\x20\x20'+a142_0x4fbda6[_0x2fe460(0x1f4)](_0x793bb1[_0x2fe460(0x230)])+_0x2fe460(0x1d6)+_0x793bb1[_0x2fe460(0x1fa)][_0x2fe460(0x212)](',\x20'))),console['log'](_0x2fe460(0x1ca))):console[_0x2fe460(0x22d)](a142_0x4fbda6[_0x2fe460(0x1f2)](_0x2fe460(0x1f5))+'\x20\x20'+a142_0x4fbda6[_0x2fe460(0x1db)]('no\x20legacy\x20entry'));console['log'](''),console[_0x2fe460(0x22d)](a142_0x4fbda6['cyan']('Skill\x20swap:')+('\x20\x20'+(_0x1d4339?a142_0x4fbda6[_0x2fe460(0x1f4)](_0x2fe460(0x1f3)):a142_0x4fbda6['green'](_0x2fe460(0x222)))));_0x1d4339&&console[_0x2fe460(0x22d)]('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x2fe460(0x22d)]('');if(_0xa00886['sdkUpgrade']){const {currentVersion:_0x4f17a8,field:_0x2dda42,pkgPath:_0xb220d0}=_0xa00886[_0x2fe460(0x232)];console[_0x2fe460(0x22d)](a142_0x4fbda6[_0x2fe460(0x1f2)](_0x2fe460(0x1da))+('\x20\x20'+a142_0x4fbda6[_0x2fe460(0x1f4)](_0xb220d0))),console[_0x2fe460(0x22d)](_0x2fe460(0x23e)+_0x2dda42+':\x20'+a142_0x4fbda6[_0x2fe460(0x1f4)](_0x4f17a8)+_0x2fe460(0x234)+a142_0x4fbda6[_0x2fe460(0x21d)](_0x2fe460(0x227))),console['log'](_0x2fe460(0x245));}else console[_0x2fe460(0x22d)](a142_0x4fbda6[_0x2fe460(0x1f2)](_0x2fe460(0x1da))+'\x20\x20'+a142_0x4fbda6[_0x2fe460(0x1db)](_0x2fe460(0x214)));console['log']('');}function execConfigMigration(_0x3bb7cd,_0xb0d8cd){const _0x493057=a142_0x405afc,{configMigration:_0x1de91b}=_0x3bb7cd;if(!_0x1de91b?.[_0x493057(0x243)])return{'step':0x1,'label':_0x493057(0x240),'ok':!![],'detail':_0x493057(0x1ef)};const _0x2cb85e=readConfigFile(_0x1de91b[_0x493057(0x243)]),_0x4290de=resolve(_0xb0d8cd,NEW_CONFIG_NAME),_0x1f7c14=_0x1de91b['hasNewConfig']?readConfigFile(_0x4290de):{};for(const [_0x4cf743,_0x35b4a7]of Object[_0x493057(0x1ec)](_0x2cb85e)){!(_0x4cf743 in _0x1f7c14)&&(_0x1f7c14[_0x4cf743]=_0x35b4a7);}writeConfigFile(_0x4290de,_0x1f7c14);const _0x27b62d=_0x1de91b[_0x493057(0x243)]+_0x493057(0x229);return renameSync(_0x1de91b[_0x493057(0x243)],_0x27b62d),{'step':0x1,'label':_0x493057(0x240),'ok':!![],'detail':_0x1de91b[_0x493057(0x243)]+'\x20→\x20'+_0x4290de+_0x493057(0x1e4)+_0x27b62d+')'};}function execRemoveOldArtifacts(_0x3d9776){const _0x85a65=a142_0x405afc,_0x5a99a2=[];for(const _0x33b928 of _0x3d9776){try{if(!existsSync(_0x33b928))continue;const _0x1a2629=tryStat(_0x33b928);_0x1a2629?.['isDirectory']()?rmSync(_0x33b928,{'recursive':!![],'force':!![]}):unlinkSync(_0x33b928);}catch(_0x21af0c){_0x5a99a2['push'](_0x33b928+':\x20'+_0x21af0c['message']);}}return{'step':0x3,'label':'Remove\x20legacy\x20artifacts','ok':_0x5a99a2['length']===0x0,'detail':_0x5a99a2[_0x85a65(0x1de)]>0x0?_0x3d9776[_0x85a65(0x1de)]-_0x5a99a2['length']+'/'+_0x3d9776['length']+_0x85a65(0x21e)+_0x5a99a2['join'](';\x20')+')':_0x3d9776[_0x85a65(0x1de)]+'\x20removed'};}function execCleanMcp(_0x1343dc){const _0x1f6e7d=a142_0x405afc;if(!_0x1343dc['oldMcpConfig'])return{'step':0x4,'label':_0x1f6e7d(0x221),'ok':!![],'detail':_0x1f6e7d(0x20b)};try{const _0x512dc0=readFileSync(_0x1343dc['oldMcpConfig'][_0x1f6e7d(0x230)],'utf8'),_0x55b545=JSON['parse'](_0x512dc0);if(_0x55b545?.[_0x1f6e7d(0x1cf)]&&typeof _0x55b545[_0x1f6e7d(0x1cf)]==='object'){const _0x27f666=[];for(const [_0x407472,_0x473067]of Object['entries'](_0x55b545[_0x1f6e7d(0x1cf)])){_0x473067?.[_0x1f6e7d(0x233)]&&Array[_0x1f6e7d(0x242)](_0x473067[_0x1f6e7d(0x233)])&&_0x473067[_0x1f6e7d(0x233)][_0x1f6e7d(0x200)](_0xfdd573=>typeof _0xfdd573==='string'&&_0xfdd573[_0x1f6e7d(0x1f7)](_0x1f6e7d(0x225)))&&_0x27f666[_0x1f6e7d(0x22a)](_0x407472);}for(const _0x554dc8 of _0x27f666){delete _0x55b545['mcpServers'][_0x554dc8];}return _0x27f666['length']>0x0&&writeFileSync(_0x1343dc['oldMcpConfig'][_0x1f6e7d(0x230)],JSON[_0x1f6e7d(0x244)](_0x55b545,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':_0x1f6e7d(0x221),'ok':!![],'detail':_0x1f6e7d(0x20f)+_0x27f666['join'](',\x20')+_0x1f6e7d(0x21f)+_0x1343dc[_0x1f6e7d(0x213)]['path']};}return{'step':0x4,'label':_0x1f6e7d(0x221),'ok':!![],'detail':_0x1f6e7d(0x1f9)};}catch(_0x3e4fc3){return{'step':0x4,'label':_0x1f6e7d(0x221),'ok':![],'detail':_0x3e4fc3[_0x1f6e7d(0x1d5)]};}}function execSkillsRemove(_0x177a17,_0x504605){const _0x5d6ea8=a142_0x405afc,_0x5b3b02=runNpxSkillsRemove(_0x177a17,{'stdio':'inherit','yes':_0x504605});return{'step':0x5,'label':_0x5d6ea8(0x231),'ok':_0x5b3b02['ok'],'detail':_0x5b3b02['ok']?'lovrabet/lovrabet-skill\x20removed':_0x5b3b02['error']??_0x5d6ea8(0x23b)+_0x5b3b02[_0x5d6ea8(0x239)]};}function execSkillsAdd(_0xbbb813,_0x46425a){const _0x1628a0=a142_0x405afc,_0x472a1a=runNpxSkillsAddGlobal(_0xbbb813,_0x1628a0(0x1d4),{'stdio':_0x1628a0(0x228),'yes':_0x46425a});return{'step':0x6,'label':_0x1628a0(0x1d9),'ok':_0x472a1a['ok'],'detail':_0x472a1a['ok']?_0x1628a0(0x1f8):_0x472a1a[_0x1628a0(0x1ee)]??_0x1628a0(0x23b)+_0x472a1a[_0x1628a0(0x239)]};}function execUpgradeSdk(_0x200297){const _0x2502ca=a142_0x405afc;if(!_0x200297[_0x2502ca(0x232)])return{'step':0x7,'label':_0x2502ca(0x1df),'ok':!![],'detail':_0x2502ca(0x220)};const {pkgPath:_0x522b44,currentVersion:_0x40e3c9,field:_0x3b3d16}=_0x200297['sdkUpgrade'];try{const _0x50ed6c=readFileSync(_0x522b44,_0x2502ca(0x1cb)),_0x267961=JSON[_0x2502ca(0x1f6)](_0x50ed6c);return _0x267961[_0x3b3d16][_0x2502ca(0x1ff)]='latest',writeFileSync(_0x522b44,JSON['stringify'](_0x267961,null,0x2)+'\x0a',_0x2502ca(0x1cb)),{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':_0x3b3d16+_0x2502ca(0x1e0)+_0x40e3c9+_0x2502ca(0x1e1)};}catch(_0x20dd2b){return{'step':0x7,'label':_0x2502ca(0x1df),'ok':![],'detail':_0x20dd2b[_0x2502ca(0x1d5)]};}}function tryStat(_0x4a620a){try{return statSync(_0x4a620a);}catch{return undefined;}}function a142_0x51eb(){const _0x1121f3=['skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','Clean\x20MCP\x20config','not\x20needed','dependencies','configMigration','@lovrabet/dataset-mcp-server','831984pAHpye','latest','inherit','.bak','push','353479XobPrx','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','log','fields','.lovrabet','path','Remove\x20old\x20skill','sdkUpgrade','args','\x20→\x20','Step\x204/7:\x20Cleaning\x20MCP\x20config...','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','devDependencies','failed','status','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','exit\x20','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','\x20\x20bun\x20install','\x20\x20Current\x20version\x20in\x20','fail','Config\x20migration','223422gPymKF','isArray','oldPath','stringify','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','\x20\x20\x20\x20\x20\x20\x20','288CLIJZF','label','values','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','utf8','not\x20found\x20(will\x20create)','\x20\x20#\x20or','.cursor/rules/lovrabet_rules.mdc','mcpServers','===\x20Upgrade\x20Summary\x20===','.claude/skills/lovrabet','needsSkillSwap','hasNewConfig','lovrabet/rabetbase','message','\x20→\x20keys:\x20','\x20\x20npm\x20install','85680GsxkUR','Install\x20new\x20skill','@lovrabet/sdk:','gray','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','string','length','Upgrade\x20@lovrabet/sdk','[\x22@lovrabet/sdk\x22]:\x20','\x20→\x20latest','succeed','yes','\x20(backup:\x20','step','Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20','Upgrade\x20cancelled.','package.json','undefined','white','Legacy\x20artifacts:','entries','Proceed\x20with\x20upgrade?','error','skipped\x20(no\x20legacy\x20config)','info','Upgrade\x20completed\x20successfully!','cyan','needed','yellow','MCP\x20config:','parse','includes','lovrabet/rabetbase\x20installed\x20globally','no\x20matching\x20entry\x20found','keys','bold','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','\x20\x20New\x20config\x20(.rabetbase.json):\x20','Remove\x20.lovrabet/','@lovrabet/sdk','some','done','cwd','files','142125zWEoAr','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','554540nBzpNy','red','3AIpAiv','detail','\x20\x20Step\x20','skipped','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','FAIL','\x20\x20Action:\x20delete','removed\x20','oldArtifacts','already\x20exists\x20(will\x20merge)','join','oldMcpConfig','not\x20found\x20or\x20already\x20at\x20latest','Config\x20file:','\x20\x20Fields\x20to\x20migrate:\x20','filter','Step\x206/7:\x20Installing\x20new\x20skill...','start','445175aYQTHP','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','===\x20Upgrade\x20Analysis\x20===','green','\x20removed\x20(','\x20from\x20'];a142_0x51eb=function(){return _0x1121f3;};return a142_0x51eb();}function printSummary(_0x3bbf96){const _0x2e6bc7=a142_0x405afc;console['log'](''),console[_0x2e6bc7(0x22d)](a142_0x4fbda6[_0x2e6bc7(0x1fb)](_0x2e6bc7(0x1d0))),console[_0x2e6bc7(0x22d)]('');for(const _0x219d0a of _0x3bbf96){const _0x1d7c32=_0x219d0a['ok']?a142_0x4fbda6['green']('OK'):a142_0x4fbda6[_0x2e6bc7(0x207)](_0x2e6bc7(0x20d));console[_0x2e6bc7(0x22d)]('\x20\x20'+_0x1d7c32+_0x2e6bc7(0x20a)+_0x219d0a[_0x2e6bc7(0x1e5)]+':\x20'+_0x219d0a[_0x2e6bc7(0x248)]);if(_0x219d0a[_0x2e6bc7(0x209)])console[_0x2e6bc7(0x22d)](_0x2e6bc7(0x246)+a142_0x4fbda6[_0x2e6bc7(0x1db)](_0x219d0a[_0x2e6bc7(0x209)]));}console[_0x2e6bc7(0x22d)]('');}export async function upgradeApp(_0x30f277,_0x17f0bd){const _0x31e53d=a142_0x405afc,_0x3b05c8=process[_0x31e53d(0x202)](),_0x2b9cbe=analyse(_0x3b05c8),_0x3be0e5=!_0x2b9cbe[_0x31e53d(0x224)]&&_0x2b9cbe['oldArtifacts'][_0x31e53d(0x1de)]===0x0&&!_0x2b9cbe['oldMcpConfig']&&!_0x2b9cbe[_0x31e53d(0x1d2)]&&!_0x2b9cbe['sdkUpgrade'];if(_0x3be0e5){console[_0x31e53d(0x22d)](a142_0x4fbda6[_0x31e53d(0x21d)]('No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.'));return;}printReport(_0x2b9cbe);const _0x26a412=!!(_0x17f0bd[_0x31e53d(0x1e3)]||_0x17f0bd['Y']||_0x30f277);if(!_0x26a412)try{const _0x10b9ba=await askConfirm(_0x31e53d(0x1ed));if(!_0x10b9ba){console[_0x31e53d(0x22d)](a142_0x4fbda6[_0x31e53d(0x1db)](_0x31e53d(0x1e7)));return;}}catch(_0x1561cb){if(_0x1561cb?.['message']==='CANCEL'){console['log'](a142_0x4fbda6[_0x31e53d(0x1db)](_0x31e53d(0x1e7)));return;}throw _0x1561cb;}const _0x1b3997=[],_0x3644e9=a142_0x595cd0({'text':'Step\x201/7:\x20Migrating\x20config...','color':_0x31e53d(0x1f2)})['start'](),_0x2eb7e6=execConfigMigration(_0x2b9cbe,_0x3b05c8);_0x1b3997['push'](_0x2eb7e6),_0x3644e9[_0x2eb7e6['ok']?_0x31e53d(0x1e2):_0x31e53d(0x23f)]('Step\x201/7:\x20Config\x20migration\x20—\x20'+(_0x2eb7e6[_0x31e53d(0x209)]??(_0x2eb7e6['ok']?'done':_0x31e53d(0x238))));const _0x1ba61d=resolve(_0x3b05c8,_0x31e53d(0x22f)),_0x15553a=a142_0x595cd0({'text':_0x31e53d(0x205),'color':_0x31e53d(0x1f2)})[_0x31e53d(0x219)]();if(existsSync(_0x1ba61d))try{rmSync(_0x1ba61d,{'recursive':!![],'force':!![]}),_0x15553a[_0x31e53d(0x1e2)](_0x31e53d(0x1fc)),_0x1b3997[_0x31e53d(0x22a)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0x4e2c75){_0x15553a[_0x31e53d(0x23f)]('Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0x4e2c75[_0x31e53d(0x1d5)]),_0x1b3997[_0x31e53d(0x22a)]({'step':0x2,'label':_0x31e53d(0x1fe),'ok':![],'detail':_0x4e2c75[_0x31e53d(0x1d5)]});}else _0x15553a[_0x31e53d(0x1f0)](_0x31e53d(0x22c)),_0x1b3997[_0x31e53d(0x22a)]({'step':0x2,'label':_0x31e53d(0x1fe),'ok':!![],'detail':'skipped'});const _0x3a95c3=a142_0x595cd0({'text':_0x31e53d(0x21b),'color':_0x31e53d(0x1f2)})[_0x31e53d(0x219)](),_0x3c1222=execRemoveOldArtifacts(_0x2b9cbe[_0x31e53d(0x210)]);_0x1b3997[_0x31e53d(0x22a)](_0x3c1222),_0x3a95c3[_0x3c1222['ok']?_0x31e53d(0x1e2):_0x31e53d(0x23f)](_0x31e53d(0x23a)+(_0x3c1222['detail']??(_0x3c1222['ok']?_0x31e53d(0x201):_0x31e53d(0x238))));const _0x170c58=a142_0x595cd0({'text':_0x31e53d(0x235),'color':_0x31e53d(0x1f2)})[_0x31e53d(0x219)](),_0xb70c16=execCleanMcp(_0x2b9cbe);_0x1b3997[_0x31e53d(0x22a)](_0xb70c16),_0x170c58[_0xb70c16['ok']?'succeed':'fail']('Step\x204/7:\x20MCP\x20config\x20—\x20'+(_0xb70c16[_0x31e53d(0x209)]??(_0xb70c16['ok']?_0x31e53d(0x201):_0x31e53d(0x238))));const _0x17d714=a142_0x595cd0({'text':'Step\x205/7:\x20Removing\x20old\x20skill...','color':_0x31e53d(0x1f2)})[_0x31e53d(0x219)](),_0x97f252=execSkillsRemove(_0x3b05c8,_0x26a412);_0x1b3997['push'](_0x97f252),_0x17d714[_0x97f252['ok']?_0x31e53d(0x1e2):'fail'](_0x31e53d(0x1e6)+(_0x97f252[_0x31e53d(0x209)]??(_0x97f252['ok']?_0x31e53d(0x201):_0x31e53d(0x238))));const _0x4611ff=a142_0x595cd0({'text':_0x31e53d(0x218),'color':'cyan'})[_0x31e53d(0x219)](),_0x136191=execSkillsAdd(_0x3b05c8,_0x26a412);_0x1b3997[_0x31e53d(0x22a)](_0x136191),_0x4611ff[_0x136191['ok']?_0x31e53d(0x1e2):_0x31e53d(0x23f)]('Step\x206/7:\x20Install\x20new\x20skill\x20—\x20'+(_0x136191[_0x31e53d(0x209)]??(_0x136191['ok']?_0x31e53d(0x201):_0x31e53d(0x238))));const _0x2f1ff3=a142_0x595cd0({'text':_0x31e53d(0x23c),'color':_0x31e53d(0x1f2)})['start'](),_0x5f3aa2=execUpgradeSdk(_0x2b9cbe);_0x1b3997['push'](_0x5f3aa2),_0x2f1ff3[_0x5f3aa2['ok']?_0x31e53d(0x1e2):'fail']('Step\x207/7:\x20@lovrabet/sdk\x20—\x20'+(_0x5f3aa2[_0x31e53d(0x209)]??(_0x5f3aa2['ok']?_0x31e53d(0x201):_0x31e53d(0x238)))),printSummary(_0x1b3997);const _0x14bd87=_0x1b3997['some'](_0x4a9070=>!_0x4a9070['ok']);_0x14bd87?console['log'](a142_0x4fbda6['yellow'](_0x31e53d(0x1dc))):console['log'](a142_0x4fbda6['green'](_0x31e53d(0x1f1))),_0x5f3aa2['ok']&&_0x2b9cbe[_0x31e53d(0x232)]&&(console[_0x31e53d(0x22d)](''),console[_0x31e53d(0x22d)](a142_0x4fbda6['bold'][_0x31e53d(0x1f2)](_0x31e53d(0x20c))),console[_0x31e53d(0x22d)](a142_0x4fbda6[_0x31e53d(0x1f2)]('Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:')),console['log'](''),console[_0x31e53d(0x22d)](a142_0x4fbda6[_0x31e53d(0x1ea)](_0x31e53d(0x1d7))),console[_0x31e53d(0x22d)](a142_0x4fbda6[_0x31e53d(0x1ea)](_0x31e53d(0x1cd))),console[_0x31e53d(0x22d)](a142_0x4fbda6[_0x31e53d(0x1ea)](_0x31e53d(0x23d))),console[_0x31e53d(0x22d)](''));}