@lovrabet/rabetbase-cli 2.1.14-beta.1 → 2.1.14-beta.2

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 (203) hide show
  1. package/README.md +18 -0
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/add.js +1 -1
  21. package/lib/commands/app/discover.js +1 -1
  22. package/lib/commands/app/index.js +1 -1
  23. package/lib/commands/app/list.js +1 -1
  24. package/lib/commands/app/remove.js +1 -1
  25. package/lib/commands/app/shared.js +1 -1
  26. package/lib/commands/app/use.js +1 -1
  27. package/lib/commands/auth/index.js +1 -1
  28. package/lib/commands/bff/create.js +1 -1
  29. package/lib/commands/bff/delete.js +1 -1
  30. package/lib/commands/bff/detail.js +1 -1
  31. package/lib/commands/bff/index.js +1 -1
  32. package/lib/commands/bff/list.js +1 -1
  33. package/lib/commands/bff/pull.js +1 -1
  34. package/lib/commands/bff/push.js +1 -1
  35. package/lib/commands/bff/status.js +1 -1
  36. package/lib/commands/cli-update.js +1 -1
  37. package/lib/commands/codegen/index.js +1 -1
  38. package/lib/commands/codegen/sdk.js +1 -1
  39. package/lib/commands/codegen/sql.js +1 -1
  40. package/lib/commands/common/app-selector.js +1 -1
  41. package/lib/commands/common/flags.js +1 -1
  42. package/lib/commands/common/validate.js +1 -1
  43. package/lib/commands/config/get.js +1 -1
  44. package/lib/commands/config/index.js +1 -1
  45. package/lib/commands/config/list.js +1 -1
  46. package/lib/commands/config/set.js +1 -1
  47. package/lib/commands/config/shared.js +1 -1
  48. package/lib/commands/data/filter.js +1 -1
  49. package/lib/commands/data/getOne.js +1 -1
  50. package/lib/commands/data/index.js +1 -1
  51. package/lib/commands/data/shared.js +1 -1
  52. package/lib/commands/dataset/capability.js +1 -1
  53. package/lib/commands/dataset/delete.js +1 -1
  54. package/lib/commands/dataset/detail.js +1 -1
  55. package/lib/commands/dataset/extend-update.js +1 -1
  56. package/lib/commands/dataset/field-update.js +1 -1
  57. package/lib/commands/dataset/index.js +1 -1
  58. package/lib/commands/dataset/link-create.js +1 -1
  59. package/lib/commands/dataset/link-delete.js +1 -1
  60. package/lib/commands/dataset/link-shared.js +1 -1
  61. package/lib/commands/dataset/link-update.js +1 -1
  62. package/lib/commands/dataset/links.js +1 -1
  63. package/lib/commands/dataset/list.js +1 -1
  64. package/lib/commands/dataset/operations.js +1 -1
  65. package/lib/commands/dataset/rename.js +1 -1
  66. package/lib/commands/db/analyze-cancel.js +1 -1
  67. package/lib/commands/db/analyze-start.js +1 -1
  68. package/lib/commands/db/analyze-status.js +1 -1
  69. package/lib/commands/db/create.js +1 -1
  70. package/lib/commands/db/delete.js +1 -1
  71. package/lib/commands/db/detail.js +1 -1
  72. package/lib/commands/db/diff.js +1 -1
  73. package/lib/commands/db/index.js +1 -1
  74. package/lib/commands/db/list.js +1 -1
  75. package/lib/commands/db/shared.js +1 -1
  76. package/lib/commands/db/tables.js +1 -1
  77. package/lib/commands/db/test.js +1 -1
  78. package/lib/commands/db/update.js +1 -1
  79. package/lib/commands/doctor.js +1 -1
  80. package/lib/commands/init/index.js +1 -1
  81. package/lib/commands/issue/index.js +1 -1
  82. package/lib/commands/issue/nudge.js +1 -1
  83. package/lib/commands/issue/report.js +1 -1
  84. package/lib/commands/issue/shared.js +1 -1
  85. package/lib/commands/logs/index.js +1 -1
  86. package/lib/commands/menu/index.js +1 -1
  87. package/lib/commands/menu/shared/compare-table.js +1 -1
  88. package/lib/commands/menu/shared/index.js +1 -1
  89. package/lib/commands/menu/shared/inquirer.js +1 -1
  90. package/lib/commands/menu/shared/local-pages.js +1 -1
  91. package/lib/commands/menu/shared/logic.js +1 -1
  92. package/lib/commands/menu/shared/service.js +1 -1
  93. package/lib/commands/menu/shared/sync-core.js +1 -1
  94. package/lib/commands/menu/shared/update-core.js +1 -1
  95. package/lib/commands/menu/shared/valid-url.js +1 -1
  96. package/lib/commands/menu/sync.js +1 -1
  97. package/lib/commands/menu/update.js +1 -1
  98. package/lib/commands/page/generate-start.js +1 -1
  99. package/lib/commands/page/generate-status.js +1 -1
  100. package/lib/commands/page/index.js +1 -1
  101. package/lib/commands/page/pull.js +1 -1
  102. package/lib/commands/page/push.js +1 -1
  103. package/lib/commands/page/shared.js +1 -1
  104. package/lib/commands/page/standard-page-status.js +1 -1
  105. package/lib/commands/page/sync.js +1 -1
  106. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  107. package/lib/commands/project/create/format-elapsed.js +1 -1
  108. package/lib/commands/project/create/main.js +1 -1
  109. package/lib/commands/project/create/non-interactive.js +1 -1
  110. package/lib/commands/project/create/project-template-path.js +1 -1
  111. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  112. package/lib/commands/project/create/use-format-code.js +1 -1
  113. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  114. package/lib/commands/project/index.js +1 -1
  115. package/lib/commands/project/init.js +1 -1
  116. package/lib/commands/project/upgrade.js +1 -1
  117. package/lib/commands/registry.js +1 -1
  118. package/lib/commands/run/index.js +1 -1
  119. package/lib/commands/schema.js +1 -1
  120. package/lib/commands/skill/index.js +1 -1
  121. package/lib/commands/sql/create.js +1 -1
  122. package/lib/commands/sql/delete.js +1 -1
  123. package/lib/commands/sql/detail.js +1 -1
  124. package/lib/commands/sql/exec.js +1 -1
  125. package/lib/commands/sql/index.js +1 -1
  126. package/lib/commands/sql/list.js +1 -1
  127. package/lib/commands/sql/pull.js +1 -1
  128. package/lib/commands/sql/push.js +1 -1
  129. package/lib/commands/sql/save.js +1 -1
  130. package/lib/commands/sql/shared.js +1 -1
  131. package/lib/commands/sql/status.js +1 -1
  132. package/lib/commands/sql/validate.js +1 -1
  133. package/lib/config/schema.js +1 -1
  134. package/lib/constant/cdn.js +1 -1
  135. package/lib/constant/cli.js +1 -1
  136. package/lib/constant/defaults.js +1 -1
  137. package/lib/constant/domain.js +1 -1
  138. package/lib/constant/env.js +1 -1
  139. package/lib/constant/output.js +1 -1
  140. package/lib/constant/paths.js +1 -1
  141. package/lib/constant/risk.js +1 -1
  142. package/lib/context.js +1 -1
  143. package/lib/core/alias-resolver.js +1 -1
  144. package/lib/core/api-client.js +1 -1
  145. package/lib/core/bff/config.js +1 -1
  146. package/lib/core/bff/file-system.js +1 -1
  147. package/lib/core/bff/hash.js +1 -1
  148. package/lib/core/bff/lock.js +1 -1
  149. package/lib/core/bff/utils.js +1 -1
  150. package/lib/core/db-resolver.js +1 -1
  151. package/lib/core/page/file-system.js +1 -1
  152. package/lib/core/page/hash.js +1 -1
  153. package/lib/core/page/lock.js +1 -1
  154. package/lib/core/sql-sync/config.js +1 -1
  155. package/lib/core/sql-sync/file-system.js +1 -1
  156. package/lib/core/sql-sync/hash.js +1 -1
  157. package/lib/core/sql-sync/lock.js +1 -1
  158. package/lib/core/sql-sync/utils.js +1 -1
  159. package/lib/core/sql-validator.js +1 -1
  160. package/lib/errors.js +1 -1
  161. package/lib/framework/build-all-flags.js +1 -1
  162. package/lib/framework/flags.js +1 -1
  163. package/lib/framework/help.js +1 -1
  164. package/lib/framework/index.js +1 -1
  165. package/lib/framework/output.js +1 -1
  166. package/lib/framework/response.js +1 -1
  167. package/lib/framework/runner-alias.js +1 -1
  168. package/lib/framework/runner.js +1 -1
  169. package/lib/framework/schema-export.js +1 -1
  170. package/lib/framework/types.js +1 -1
  171. package/lib/generated/build-info.js +1 -1
  172. package/lib/help.js +1 -1
  173. package/lib/skills/main.js +1 -1
  174. package/lib/skills/npx-skills-add.js +1 -1
  175. package/lib/telemetry/cli-command-trace.js +1 -1
  176. package/lib/telemetry/cli-help-trace.js +1 -1
  177. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  178. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  179. package/lib/telemetry/send-cli-trace-log.js +1 -1
  180. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  181. package/lib/utils/ai_config.js +1 -1
  182. package/lib/utils/apply-jq-filter.js +1 -1
  183. package/lib/utils/cdn-config.js +1 -1
  184. package/lib/utils/check-sdk-version.js +1 -1
  185. package/lib/utils/cli-version-check.js +1 -1
  186. package/lib/utils/cli-version-policy.js +1 -1
  187. package/lib/utils/config.js +1 -1
  188. package/lib/utils/copy-directory.js +1 -1
  189. package/lib/utils/entity-with-id.js +1 -1
  190. package/lib/utils/file-utils.js +1 -1
  191. package/lib/utils/guides-cdn.js +1 -1
  192. package/lib/utils/http-client.js +1 -1
  193. package/lib/utils/is-non-interactive.js +1 -1
  194. package/lib/utils/logger.js +1 -1
  195. package/lib/utils/params.js +1 -1
  196. package/lib/utils/platform.js +1 -1
  197. package/lib/utils/rules-cdn.js +1 -1
  198. package/lib/utils/sleep.js +1 -1
  199. package/lib/utils/template-replacer.js +1 -1
  200. package/lib/utils/version.js +1 -1
  201. package/lib/utils/with-active-cookie.js +1 -1
  202. package/lib/utils/write-cli-side-channel.js +1 -1
  203. package/package.json +3 -3
@@ -1 +1 @@
1
- const a104_0x40d294=a104_0x3d2f;(function(_0x4a1a65,_0x409d1f){const _0xdde9fb=a104_0x3d2f,_0x38b63b=_0x4a1a65();while(!![]){try{const _0x555024=parseInt(_0xdde9fb(0x90))/0x1+-parseInt(_0xdde9fb(0x94))/0x2*(parseInt(_0xdde9fb(0x86))/0x3)+parseInt(_0xdde9fb(0x9f))/0x4+-parseInt(_0xdde9fb(0x8b))/0x5+-parseInt(_0xdde9fb(0x9b))/0x6+-parseInt(_0xdde9fb(0x97))/0x7*(parseInt(_0xdde9fb(0x99))/0x8)+parseInt(_0xdde9fb(0x8d))/0x9;if(_0x555024===_0x409d1f)break;else _0x38b63b['push'](_0x38b63b['shift']());}catch(_0x12340b){_0x38b63b['push'](_0x38b63b['shift']());}}}(a104_0x5cd7,0x51b5c));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{loadDatasetDetailForPage,prepareDatasetAction,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';function a104_0x5cd7(){const _0x267c55=['isArray','page','7WITewM','failedPages','4641048IPeStW','同步成功','2487354tsQlhY','sync','undeletedPages','/smartapi/lovrabet/dataset/','2076764peegWN','部分页面同步失败','\x20undeleted\x20related\x20page(s)\x20found','69MRUCrx','fieldCount','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','/sync-to-pages','alias','768255pHiRRX','Sync\x20dataset\x20changes\x20to\x20related\x20Smart\x20List\x20Pages','10577727kvnTVF','dataset','length','137510JbphPN','code','relatedPages','appCode','30346vWVYCl'];a104_0x5cd7=function(){return _0x267c55;};return a104_0x5cd7();}function a104_0x3d2f(_0x175eee,_0x588115){_0x175eee=_0x175eee-0x85;const _0x5cd7ac=a104_0x5cd7();let _0x3d2fe0=_0x5cd7ac[_0x175eee];return _0x3d2fe0;}import{syncStandardPages}from'../../core/api-client.js';export const pageSync={'service':a104_0x40d294(0x96),'command':'sync','description':a104_0x40d294(0x8c),'risk':'write','defaultOutputFormat':'compress','flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':a104_0x40d294(0x8a),'type':'string','description':a104_0x40d294(0x88)}],async 'validate'(_0x59a679){validateDatasetSelector(_0x59a679);},async 'dryRun'(_0x3122d6){const _0x340562=a104_0x40d294,_0xfcb021=await prepare(_0x3122d6);return{'method':'POST','url':_0x340562(0x9e)+_0xfcb021[_0x340562(0x8e)][_0x340562(0x91)]+_0x340562(0x89),'body':{'appCode':_0x3122d6[_0x340562(0x93)]},'description':serializeDryRunDescription({'dataset':{'id':_0xfcb021['dataset']['id'],'code':_0xfcb021[_0x340562(0x8e)][_0x340562(0x91)],'name':_0xfcb021[_0x340562(0x8e)]['name'],'fieldCount':_0xfcb021['dataset'][_0x340562(0x87)]},'relatedPages':{'total':_0xfcb021[_0x340562(0x8e)][_0x340562(0x92)][_0x340562(0x8f)],'undeletedCount':_0xfcb021['undeletedPages'][_0x340562(0x8f)]},'action':_0x340562(0x9c),'reason':_0xfcb021[_0x340562(0x9d)][_0x340562(0x8f)]+_0x340562(0x85)})};},async 'execute'(_0x340a87){const _0x315853=a104_0x40d294,_0x80de47=await prepare(_0x340a87),_0x7ff511=await syncStandardPages(_0x340a87[_0x315853(0x93)],_0x80de47['dataset'][_0x315853(0x91)]),_0x535310=Array[_0x315853(0x95)](_0x7ff511[_0x315853(0x98)])&&_0x7ff511[_0x315853(0x98)][_0x315853(0x8f)]>0x0,_0x1ea8c0=_0x535310?_0x315853(0xa0):_0x315853(0x9a);return{'ok':!![],'message':_0x1ea8c0,'data':{'datasetCode':_0x80de47[_0x315853(0x8e)]['code'],..._0x7ff511}};}};async function prepare(_0x432dde){const _0x193e68=a104_0x40d294,_0x321ff9=await loadDatasetDetailForPage(_0x432dde);return prepareDatasetAction(_0x321ff9,_0x193e68(0x9c));}
1
+ function a104_0x10ba(){const _0x42de2a=['18415wwIcjM','/smartapi/lovrabet/dataset/','compress','253336tFCbIA','60oAbepz','691128mapLnz','\x20undeleted\x20related\x20page(s)\x20found','242693qiNoBP','relatedPages','POST','132393BHfrMX','sync','同步成功','84JQavFR','Sync\x20dataset\x20changes\x20to\x20related\x20Smart\x20List\x20Pages','部分页面同步失败','name','/sync-to-pages','dataset','code','appCode','Dataset\x20alias\x20from\x20api.ts\x20(resolves\x20to\x20dataset\x20code\x20automatically)','string','179604XUQeiv','failedPages','78PMEmSb','length','undeletedPages','4RxPtLd','814NuMXxQ'];a104_0x10ba=function(){return _0x42de2a;};return a104_0x10ba();}const a104_0x55de76=a104_0x3946;(function(_0x5b13eb,_0xdb19da){const _0x3f77da=a104_0x3946,_0x17133c=_0x5b13eb();while(!![]){try{const _0x354671=-parseInt(_0x3f77da(0x92))/0x1+-parseInt(_0x3f77da(0xa5))/0x2*(parseInt(_0x3f77da(0xa1))/0x3)+parseInt(_0x3f77da(0xa4))/0x4*(-parseInt(_0x3f77da(0xa6))/0x5)+parseInt(_0x3f77da(0x8d))/0x6+parseInt(_0x3f77da(0x95))/0x7*(parseInt(_0x3f77da(0x8b))/0x8)+parseInt(_0x3f77da(0x9f))/0x9*(-parseInt(_0x3f77da(0x8c))/0xa)+-parseInt(_0x3f77da(0x8f))/0xb;if(_0x354671===_0xdb19da)break;else _0x17133c['push'](_0x17133c['shift']());}catch(_0x1f4783){_0x17133c['push'](_0x17133c['shift']());}}}(a104_0x10ba,0x3278f));import{APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{loadDatasetDetailForPage,prepareDatasetAction,serializeDryRunDescription,validateDatasetSelector}from'../../commands/page/shared.js';import{syncStandardPages}from'../../core/api-client.js';export const pageSync={'service':'page','command':'sync','description':a104_0x55de76(0x96),'risk':'write','defaultOutputFormat':a104_0x55de76(0xa8),'flags':[APPCODE_FLAG_OPTIONAL,DATASETCODE_FLAG_OPTIONAL,{'name':'alias','type':a104_0x55de76(0x9e),'description':a104_0x55de76(0x9d)}],async 'validate'(_0x4ced68){validateDatasetSelector(_0x4ced68);},async 'dryRun'(_0xf50291){const _0x5f3c7d=a104_0x55de76,_0x501597=await prepare(_0xf50291);return{'method':_0x5f3c7d(0x91),'url':_0x5f3c7d(0xa7)+_0x501597[_0x5f3c7d(0x9a)][_0x5f3c7d(0x9b)]+_0x5f3c7d(0x99),'body':{'appCode':_0xf50291[_0x5f3c7d(0x9c)]},'description':serializeDryRunDescription({'dataset':{'id':_0x501597[_0x5f3c7d(0x9a)]['id'],'code':_0x501597[_0x5f3c7d(0x9a)][_0x5f3c7d(0x9b)],'name':_0x501597[_0x5f3c7d(0x9a)][_0x5f3c7d(0x98)],'fieldCount':_0x501597[_0x5f3c7d(0x9a)]['fieldCount']},'relatedPages':{'total':_0x501597['dataset'][_0x5f3c7d(0x90)]['length'],'undeletedCount':_0x501597['undeletedPages']['length']},'action':_0x5f3c7d(0x93),'reason':_0x501597[_0x5f3c7d(0xa3)][_0x5f3c7d(0xa2)]+_0x5f3c7d(0x8e)})};},async 'execute'(_0x2547ea){const _0xce499=a104_0x55de76,_0x13453c=await prepare(_0x2547ea),_0x14f970=await syncStandardPages(_0x2547ea['appCode'],_0x13453c[_0xce499(0x9a)][_0xce499(0x9b)]),_0x5a0f32=Array['isArray'](_0x14f970[_0xce499(0xa0)])&&_0x14f970[_0xce499(0xa0)][_0xce499(0xa2)]>0x0,_0x45000d=_0x5a0f32?_0xce499(0x97):_0xce499(0x94);return{'ok':!![],'message':_0x45000d,'data':{'datasetCode':_0x13453c[_0xce499(0x9a)][_0xce499(0x9b)],..._0x14f970}};}};function a104_0x3946(_0x5944b3,_0x4619a3){_0x5944b3=_0x5944b3-0x8b;const _0x10ba3b=a104_0x10ba();let _0x3946ac=_0x10ba3b[_0x5944b3];return _0x3946ac;}async function prepare(_0x177441){const _0xfee548=a104_0x55de76,_0x455a7e=await loadDatasetDetailForPage(_0x177441);return prepareDatasetAction(_0x455a7e,_0xfee548(0x93));}
@@ -1 +1 @@
1
- (function(_0x242fa8,_0x43dc6f){const _0x36195b=a105_0x1b00,_0x2bf233=_0x242fa8();while(!![]){try{const _0x291e69=-parseInt(_0x36195b(0x7b))/0x1+parseInt(_0x36195b(0x84))/0x2+parseInt(_0x36195b(0x7f))/0x3*(-parseInt(_0x36195b(0x71))/0x4)+-parseInt(_0x36195b(0x88))/0x5+-parseInt(_0x36195b(0x75))/0x6+parseInt(_0x36195b(0x78))/0x7*(parseInt(_0x36195b(0x70))/0x8)+parseInt(_0x36195b(0x81))/0x9*(parseInt(_0x36195b(0x7c))/0xa);if(_0x291e69===_0x43dc6f)break;else _0x2bf233['push'](_0x2bf233['shift']());}catch(_0x5dea05){_0x2bf233['push'](_0x2bf233['shift']());}}}(a105_0x5685,0xa4fc8));import{existsSync}from'node:fs';function a105_0x1b00(_0x4ea116,_0x4eab78){_0x4ea116=_0x4ea116-0x6e;const _0x568597=a105_0x5685();let _0x1b0018=_0x568597[_0x4ea116];return _0x1b0018;}import a105_0x41d719 from'node:path';import a105_0x108397 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 a105_0x5685(){const _0x159cec=['31788JYmLsP','resolve','Not\x20set','1324802clqNiw','√\x20App\x20Code:\x20','Logged\x20in','green','3694540QFZACy','\x22\x20already\x20exists','trim','log','env','8xZbAdU','20SJoAuT','string','Directory\x20\x22','Skipped','3696534kmStbh','production','Login\x20failed','372022lBTGru','cyan','my-app','270711muPchW','5900LvvzNk','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','√\x20Login\x20status:\x20','298761UYcUOh','Project\x20name\x20cannot\x20exceed\x2050\x20characters'];a105_0x5685=function(){return _0x159cec;};return a105_0x5685();}import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x1cda8b,_0x1ed30c,_0x5339bc){const _0x25d1c1=a105_0x1b00,_0x3fcf01=_0x25d1c1(0x7a),_0x4c7aeb=readConfig(),_0x206513=typeof _0x4c7aeb['env']===_0x25d1c1(0x72)?_0x4c7aeb[_0x25d1c1(0x6f)]:undefined,_0x25b88b=await input({'message':'Project\x20name:','default':_0x3fcf01,'validate':_0x52b087=>{const _0x2d6d63=_0x25d1c1,_0x34c450=_0x52b087[_0x2d6d63(0x8a)]()||_0x3fcf01;if(_0x34c450['length']>0x32)return _0x2d6d63(0x80);const _0x242a81=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x34c450&&!_0x242a81['test'](_0x34c450))return _0x2d6d63(0x7d);const _0x3d2077=a105_0x41d719[_0x2d6d63(0x82)](process['cwd'](),_0x34c450);if(existsSync(_0x3d2077))return _0x2d6d63(0x73)+_0x34c450+_0x2d6d63(0x89);return!![];}});console[_0x25d1c1(0x6e)](a105_0x108397[_0x25d1c1(0x87)]('√\x20Project\x20Name:\x20'+a105_0x108397['cyan'](_0x25b88b)));const _0x259c6e=await selectSingleAppcode(_0x5339bc);console[_0x25d1c1(0x6e)](a105_0x108397[_0x25d1c1(0x87)](_0x25d1c1(0x85)+a105_0x108397['cyan'](_0x259c6e||_0x25d1c1(0x83))));if(_0x259c6e){const _0x1d1150=await getIsSessionValid();if(!_0x1d1150){const _0x4a9f3a=await confirm({'message':'No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','default':!![]});if(_0x4a9f3a){const _0x11f6a7=await authServer({'silent':!![]});console[_0x25d1c1(0x6e)](a105_0x108397[_0x25d1c1(0x87)](_0x25d1c1(0x7e)+a105_0x108397[_0x25d1c1(0x79)](_0x11f6a7?_0x25d1c1(0x86):_0x25d1c1(0x77))));}else console[_0x25d1c1(0x6e)](a105_0x108397['green'](_0x25d1c1(0x7e)+a105_0x108397[_0x25d1c1(0x79)](_0x25d1c1(0x74))));}await _0x1cda8b({'projectName':_0x25b88b,'appCode':_0x259c6e,'env':_0x1ed30c||_0x206513||_0x25d1c1(0x76)});}else await _0x1cda8b({'projectName':_0x25b88b,'env':_0x1ed30c||_0x206513||_0x25d1c1(0x76)});}
1
+ (function(_0x1b5f71,_0x508472){const _0x34d467=a105_0x5bd2,_0x2221f8=_0x1b5f71();while(!![]){try{const _0x1cc3da=-parseInt(_0x34d467(0x1bb))/0x1*(parseInt(_0x34d467(0x1c1))/0x2)+-parseInt(_0x34d467(0x1ba))/0x3+parseInt(_0x34d467(0x1b6))/0x4*(-parseInt(_0x34d467(0x1b1))/0x5)+parseInt(_0x34d467(0x1aa))/0x6+parseInt(_0x34d467(0x1af))/0x7*(-parseInt(_0x34d467(0x1b5))/0x8)+parseInt(_0x34d467(0x1a4))/0x9*(-parseInt(_0x34d467(0x1c0))/0xa)+parseInt(_0x34d467(0x1a6))/0xb;if(_0x1cc3da===_0x508472)break;else _0x2221f8['push'](_0x2221f8['shift']());}catch(_0x328e46){_0x2221f8['push'](_0x2221f8['shift']());}}}(a105_0x5464,0x961d5));import{existsSync}from'node:fs';import a105_0x42df58 from'node:path';import a105_0x313755 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';function a105_0x5bd2(_0x362547,_0x3c7f33){_0x362547=_0x362547-0x1a4;const _0x546404=a105_0x5464();let _0x5bd270=_0x546404[_0x362547];return _0x5bd270;}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(_0x242974,_0x3f19aa,_0x5b604b){const _0x4cc3c9=a105_0x5bd2,_0x9280c5='my-app',_0x2545eb=readConfig(),_0x2bf7b8=typeof _0x2545eb[_0x4cc3c9(0x1bf)]===_0x4cc3c9(0x1ac)?_0x2545eb[_0x4cc3c9(0x1bf)]:undefined,_0x4a6a6d=await input({'message':_0x4cc3c9(0x1be),'default':_0x9280c5,'validate':_0x2f779d=>{const _0x61bdf5=_0x4cc3c9,_0x179082=_0x2f779d[_0x61bdf5(0x1a5)]()||_0x9280c5;if(_0x179082[_0x61bdf5(0x1b3)]>0x32)return _0x61bdf5(0x1b2);const _0x51ff51=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x179082&&!_0x51ff51[_0x61bdf5(0x1b9)](_0x179082))return _0x61bdf5(0x1a7);const _0x484086=a105_0x42df58[_0x61bdf5(0x1bd)](process['cwd'](),_0x179082);if(existsSync(_0x484086))return _0x61bdf5(0x1b4)+_0x179082+_0x61bdf5(0x1ab);return!![];}});console[_0x4cc3c9(0x1b7)](a105_0x313755[_0x4cc3c9(0x1a9)](_0x4cc3c9(0x1b8)+a105_0x313755[_0x4cc3c9(0x1c3)](_0x4a6a6d)));const _0x119b32=await selectSingleAppcode(_0x5b604b);console['log'](a105_0x313755[_0x4cc3c9(0x1a9)](_0x4cc3c9(0x1bc)+a105_0x313755['cyan'](_0x119b32||_0x4cc3c9(0x1b0))));if(_0x119b32){const _0x12203b=await getIsSessionValid();if(!_0x12203b){const _0x540da1=await confirm({'message':'No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','default':!![]});if(_0x540da1){const _0x2452b7=await authServer({'silent':!![]});console[_0x4cc3c9(0x1b7)](a105_0x313755[_0x4cc3c9(0x1a9)](_0x4cc3c9(0x1c2)+a105_0x313755['cyan'](_0x2452b7?_0x4cc3c9(0x1ae):'Login\x20failed')));}else console[_0x4cc3c9(0x1b7)](a105_0x313755[_0x4cc3c9(0x1a9)]('√\x20Login\x20status:\x20'+a105_0x313755[_0x4cc3c9(0x1c3)](_0x4cc3c9(0x1ad))));}await _0x242974({'projectName':_0x4a6a6d,'appCode':_0x119b32,'env':_0x3f19aa||_0x2bf7b8||_0x4cc3c9(0x1a8)});}else await _0x242974({'projectName':_0x4a6a6d,'env':_0x3f19aa||_0x2bf7b8||'production'});}function a105_0x5464(){const _0x47179f=['Directory\x20\x22','248tpXvkd','1004212pGzIjA','log','√\x20Project\x20Name:\x20','test','2616003YJwdHI','1zsNjlt','√\x20App\x20Code:\x20','resolve','Project\x20name:','env','7005500HzRLeZ','474434nillaI','√\x20Login\x20status:\x20','cyan','9vAArke','trim','25405666UMjFze','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','production','green','6063258ZWgfZG','\x22\x20already\x20exists','string','Skipped','Logged\x20in','145523jqMSef','Not\x20set','5SMTQSi','Project\x20name\x20cannot\x20exceed\x2050\x20characters','length'];a105_0x5464=function(){return _0x47179f;};return a105_0x5464();}
@@ -1 +1 @@
1
- (function(_0x526d85,_0xd2df80){const _0xb9126d=a106_0x36ef,_0x461c24=_0x526d85();while(!![]){try{const _0x55768d=parseInt(_0xb9126d(0x1c5))/0x1*(parseInt(_0xb9126d(0x1c8))/0x2)+-parseInt(_0xb9126d(0x1ce))/0x3+-parseInt(_0xb9126d(0x1cd))/0x4*(-parseInt(_0xb9126d(0x1ca))/0x5)+-parseInt(_0xb9126d(0x1cf))/0x6+parseInt(_0xb9126d(0x1c4))/0x7*(parseInt(_0xb9126d(0x1c7))/0x8)+parseInt(_0xb9126d(0x1c3))/0x9*(-parseInt(_0xb9126d(0x1cc))/0xa)+-parseInt(_0xb9126d(0x1cb))/0xb*(-parseInt(_0xb9126d(0x1c6))/0xc);if(_0x55768d===_0xd2df80)break;else _0x461c24['push'](_0x461c24['shift']());}catch(_0x378336){_0x461c24['push'](_0x461c24['shift']());}}}(a106_0x3efd,0x5cc0b));function a106_0x36ef(_0x18be78,_0x16d8be){_0x18be78=_0x18be78-0x1c3;const _0x3efd87=a106_0x3efd();let _0x36ef9a=_0x3efd87[_0x18be78];return _0x36ef9a;}export function formatElapsed(_0x540a7){const _0x262b6b=a106_0x36ef,_0x1e0c0d=Date[_0x262b6b(0x1c9)]()-_0x540a7;if(_0x1e0c0d<0x3e8)return _0x1e0c0d+'ms';const _0x426e45=(_0x1e0c0d/0x3e8)['toFixed'](0x2),_0x26a3b5=_0x426e45['replace'](/\.?0+$/u,'');return _0x26a3b5+'s';}function a106_0x3efd(){const _0x1b56c9=['546952CNhpPV','2KNGKYm','now','136115yByiQG','4821916AUWvTO','40570HYvKuj','16oRWrGX','963729QlLcTr','950760QrkIMo','1143WUHZCN','14qMlIzv','690871ihWWmx','12vkiapW'];a106_0x3efd=function(){return _0x1b56c9;};return a106_0x3efd();}
1
+ function a106_0x5059(_0x4fc72a,_0x12de3c){_0x4fc72a=_0x4fc72a-0xc0;const _0x2196f4=a106_0x2196();let _0x5059df=_0x2196f4[_0x4fc72a];return _0x5059df;}(function(_0x1842ea,_0xf53425){const _0x246846=a106_0x5059,_0x4a1890=_0x1842ea();while(!![]){try{const _0x467e60=parseInt(_0x246846(0xc8))/0x1+parseInt(_0x246846(0xcc))/0x2*(parseInt(_0x246846(0xc1))/0x3)+parseInt(_0x246846(0xc2))/0x4*(parseInt(_0x246846(0xc9))/0x5)+parseInt(_0x246846(0xca))/0x6+parseInt(_0x246846(0xc7))/0x7+parseInt(_0x246846(0xcb))/0x8*(parseInt(_0x246846(0xc3))/0x9)+-parseInt(_0x246846(0xc6))/0xa;if(_0x467e60===_0xf53425)break;else _0x4a1890['push'](_0x4a1890['shift']());}catch(_0x5c933e){_0x4a1890['push'](_0x4a1890['shift']());}}}(a106_0x2196,0xbafbc));function a106_0x2196(){const _0x471fc1=['5856571LRSqnc','740709fcpWab','5zLWMfo','754314ByjCHz','16ShKNVn','50hLyKQV','toFixed','170859lJVtWe','2875888WbYZLX','82827QHkPUB','now','replace','30984000iHJsiq'];a106_0x2196=function(){return _0x471fc1;};return a106_0x2196();}export function formatElapsed(_0x225823){const _0x55b6af=a106_0x5059,_0x38ce1a=Date[_0x55b6af(0xc4)]()-_0x225823;if(_0x38ce1a<0x3e8)return _0x38ce1a+'ms';const _0x3b1d2b=(_0x38ce1a/0x3e8)[_0x55b6af(0xc0)](0x2),_0x49aae4=_0x3b1d2b[_0x55b6af(0xc5)](/\.?0+$/u,'');return _0x49aae4+'s';}
@@ -1 +1 @@
1
- (function(_0x1e039a,_0x2b18ee){const _0x256c17=a107_0x4d70,_0x529cd5=_0x1e039a();while(!![]){try{const _0x2be60c=-parseInt(_0x256c17(0x1d1))/0x1*(parseInt(_0x256c17(0x1ca))/0x2)+-parseInt(_0x256c17(0x201))/0x3*(-parseInt(_0x256c17(0x1ac))/0x4)+-parseInt(_0x256c17(0x1c2))/0x5*(-parseInt(_0x256c17(0x1b7))/0x6)+parseInt(_0x256c17(0x205))/0x7+-parseInt(_0x256c17(0x1f5))/0x8+parseInt(_0x256c17(0x1d5))/0x9+parseInt(_0x256c17(0x204))/0xa*(-parseInt(_0x256c17(0x1b3))/0xb);if(_0x2be60c===_0x2b18ee)break;else _0x529cd5['push'](_0x529cd5['shift']());}catch(_0x51abc0){_0x529cd5['push'](_0x529cd5['shift']());}}}(a107_0x3ee5,0x25fd0));import a107_0x39e381 from'path';import a107_0x2e2cc0 from'fs';function a107_0x4d70(_0x40d59a,_0x1078ce){_0x40d59a=_0x40d59a-0x1ab;const _0x3ee539=a107_0x3ee5();let _0x4d7036=_0x3ee539[_0x40d59a];return _0x4d7036;}import a107_0x4803e0 from'chalk';import a107_0x323bf7 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../api/fetch-model-list.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';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(_0x22d2ae){const _0x5783a1=a107_0x4d70,_0x40fdfc=await checkCliVersion();(_0x40fdfc[_0x5783a1(0x1d6)]||_0x40fdfc[_0x5783a1(0x1d8)])&&(printCliUpgradeWarning(_0x40fdfc),assertCliVersionSupported(_0x40fdfc),logger[_0x5783a1(0x1ad)](_0x5783a1(0x1fc),_0x5783a1(0x1da),{'currentVersion':_0x40fdfc[_0x5783a1(0x1cb)],'stableVersion':_0x40fdfc[_0x5783a1(0x1c7)],'minimumVersion':_0x40fdfc['minimumVersion'],'needsUpgrade':_0x40fdfc[_0x5783a1(0x1d6)],'belowMinimum':_0x40fdfc[_0x5783a1(0x1d8)]}));if(_0x22d2ae[_0x5783a1(0x1fa)]&&_0x22d2ae['appCode'])await runCreate({'projectName':_0x22d2ae[_0x5783a1(0x1fa)],'appCode':_0x22d2ae[_0x5783a1(0x1b0)],'env':_0x22d2ae[_0x5783a1(0x1dc)]},_0x22d2ae);else{if(_0x22d2ae[_0x5783a1(0x1fa)]){const _0x169d78=await selectSingleAppcode(_0x22d2ae[_0x5783a1(0x1cc)]);await runCreate({'projectName':_0x22d2ae[_0x5783a1(0x1fa)],'appCode':_0x169d78||undefined,'env':_0x22d2ae['env']},_0x22d2ae);}else await guidedCreateProject(_0xb20ee8=>runCreate(_0xb20ee8,_0x22d2ae),_0x22d2ae[_0x5783a1(0x1dc)],_0x22d2ae[_0x5783a1(0x1cc)]);}}async function runCreate(_0x109967,_0x5875f8){const _0x243d4b=a107_0x4d70;if(!_0x109967[_0x243d4b(0x1cf)]||_0x109967[_0x243d4b(0x1cf)][_0x243d4b(0x1ab)]()==='')throw new Error('Project\x20name\x20cannot\x20be\x20empty');const _0x349319=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x349319[_0x243d4b(0x1dd)](_0x109967['projectName']))throw new Error('Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x109967['projectName'][_0x243d4b(0x1f1)]>0x64)throw new Error(_0x243d4b(0x1e8));const _0x5444e1=a107_0x39e381[_0x243d4b(0x1e0)](process[_0x243d4b(0x1b9)](),_0x109967[_0x243d4b(0x1cf)]);if(a107_0x2e2cc0['existsSync'](_0x5444e1))throw new Error('Project\x20directory\x20'+_0x109967[_0x243d4b(0x1cf)]+_0x243d4b(0x1cd));try{a107_0x2e2cc0[_0x243d4b(0x1ec)](a107_0x39e381[_0x243d4b(0x1de)](_0x5444e1),a107_0x2e2cc0[_0x243d4b(0x1eb)][_0x243d4b(0x1d0)]);}catch{throw new Error(_0x243d4b(0x1b5));}logger[_0x243d4b(0x1c9)](_0x5444e1),logger[_0x243d4b(0x1ad)](_0x243d4b(0x1fc),_0x243d4b(0x1f7)+_0x109967[_0x243d4b(0x1cf)],{'projectDir':_0x5444e1,'appCode':_0x109967[_0x243d4b(0x1b0)]}),console[_0x243d4b(0x1b8)](),console[_0x243d4b(0x1b8)](a107_0x4803e0[_0x243d4b(0x1d7)](_0x243d4b(0x1bf))+_0x243d4b(0x1bc)+a107_0x4803e0[_0x243d4b(0x1d7)](_0x109967[_0x243d4b(0x1cf)])+(_0x109967[_0x243d4b(0x1b0)]?_0x243d4b(0x1c8)+a107_0x4803e0[_0x243d4b(0x1d3)](_0x109967[_0x243d4b(0x1b0)]):''));try{await runTask(_0x243d4b(0x1ef),()=>copyProjectTemplate(_0x109967[_0x243d4b(0x1cf)])),await updatePackageJsonName(_0x109967[_0x243d4b(0x1cf)]),await runTask(_0x243d4b(0x1bb),()=>installDependencies(_0x109967['projectName'])),await runTask(_0x243d4b(0x1fd),()=>formatProjectCode(_0x109967[_0x243d4b(0x1cf)])),await configureAppCode(_0x109967[_0x243d4b(0x1cf)],_0x109967['appCode']||'',_0x109967[_0x243d4b(0x1dc)]);let _0x30252d=![];if(_0x109967[_0x243d4b(0x1b0)]){console[_0x243d4b(0x1b8)]('*\x20Pulling\x20API\x20configuration...');const _0x526efc=process[_0x243d4b(0x1b9)]();try{process[_0x243d4b(0x202)](_0x5444e1);const _0x592ab7=_0x109967[_0x243d4b(0x1dc)]||'production';initEnv(_0x592ab7);const {configArray:_0xaf736a}=await fetchModelList(_0x109967['appCode'],_0x5875f8['cookie']||''),_0x427d2a=DEFAULT_API_DIR,_0x3ad768=await generateApiFile(_0xaf736a,'',_0x109967[_0x243d4b(0x1b0)],!![],_0x592ab7,_0x427d2a);console['log'](_0x243d4b(0x1e3)+_0xaf736a[_0x243d4b(0x1f1)]+_0x243d4b(0x1fb)+_0x3ad768[_0x243d4b(0x1ee)]+_0x243d4b(0x1b6)),logger[_0x243d4b(0x1ad)]('create','API\x20configuration\x20pulled:\x20'+_0x109967['appCode']);}catch(_0x278e41){_0x30252d=!![],console[_0x243d4b(0x1b8)](_0x243d4b(0x1ae)),logger[_0x243d4b(0x200)]('create',_0x243d4b(0x1f4),{'error':_0x278e41 instanceof Error?_0x278e41[_0x243d4b(0x1df)]:String(_0x278e41)});}finally{process[_0x243d4b(0x202)](_0x526efc);}}logger['success']('create',_0x243d4b(0x1e7)+_0x109967[_0x243d4b(0x1cf)]),console[_0x243d4b(0x1b8)](),console[_0x243d4b(0x1b8)](a107_0x4803e0[_0x243d4b(0x1d7)]('─'[_0x243d4b(0x1be)](0x3c))),console[_0x243d4b(0x1b8)](a107_0x4803e0[_0x243d4b(0x1d3)][_0x243d4b(0x207)](_0x243d4b(0x1f0))),console[_0x243d4b(0x1b8)](),console[_0x243d4b(0x1b8)](_0x243d4b(0x1e4)+a107_0x4803e0[_0x243d4b(0x1d3)]['bold'](_0x243d4b(0x1db)+_0x109967[_0x243d4b(0x1cf)]+_0x243d4b(0x1f2)+CLI_BIN_NAME+'\x20run\x20start')),_0x30252d&&console[_0x243d4b(0x1b8)]('\x20\x202.\x20Pull\x20API\x20configuration:\x20'+a107_0x4803e0['cyan'][_0x243d4b(0x207)](CLI_BIN_NAME+'\x20api\x20pull')),console['log'](a107_0x4803e0[_0x243d4b(0x1d7)]('─'['repeat'](0x3c)));}catch(_0x3ac4f4){logger[_0x243d4b(0x1ff)]('create',_0x243d4b(0x203)+_0x109967[_0x243d4b(0x1cf)],{'error':_0x3ac4f4 instanceof Error?_0x3ac4f4[_0x243d4b(0x1df)]:String(_0x3ac4f4)});try{a107_0x2e2cc0['existsSync'](_0x5444e1)&&(console[_0x243d4b(0x1b8)](_0x243d4b(0x1b4)+_0x5444e1),a107_0x2e2cc0[_0x243d4b(0x1c3)](_0x5444e1,{'recursive':!![],'force':!![]}));}catch{logger['warn'](_0x243d4b(0x1fc),_0x243d4b(0x1c1)+_0x5444e1);}throw _0x3ac4f4;}}async function runTask(_0x48a1ca,_0x346980){const _0x228aa6=a107_0x4d70,_0x1d672a=a107_0x323bf7(_0x48a1ca+'...')[_0x228aa6(0x1ea)]();try{const _0x2761c7=await _0x346980();_0x1d672a[_0x228aa6(0x1f8)](),console[_0x228aa6(0x1b8)](''+a107_0x4803e0['green'](_0x228aa6(0x1bf))+_0x48a1ca+'\x20'+a107_0x4803e0[_0x228aa6(0x1ed)]('['+_0x2761c7+']'));}catch(_0x399efc){_0x1d672a[_0x228aa6(0x1fe)](_0x48a1ca);throw _0x399efc;}}async function updatePackageJsonName(_0x13db2d){const _0x4c7c2d=a107_0x4d70,_0x34d99d=a107_0x39e381[_0x4c7c2d(0x1e0)](process[_0x4c7c2d(0x1b9)](),_0x13db2d),_0x5acb01=a107_0x39e381[_0x4c7c2d(0x1e2)](_0x34d99d,_0x4c7c2d(0x1c6));try{console['log'](_0x4c7c2d(0x1ce));const _0x1f14a8=getRabetbaseCliPackageRoot(),_0x4407e3=a107_0x39e381['join'](_0x1f14a8,_0x4c7c2d(0x1c6));let _0x4290b7='1.0.0';try{const _0x4337fe=JSON[_0x4c7c2d(0x1e9)](a107_0x2e2cc0['readFileSync'](_0x4407e3,'utf8'));_0x4290b7=_0x4337fe[_0x4c7c2d(0x1d4)]||_0x4c7c2d(0x1f9);}catch{}const _0x25a095=a107_0x2e2cc0[_0x4c7c2d(0x1b2)](_0x5acb01,'utf8'),_0x5b198c=JSON['parse'](_0x25a095);_0x5b198c['name']=_0x13db2d,_0x5b198c[_0x4c7c2d(0x1c4)]=_0x13db2d+_0x4c7c2d(0x1af)+_0x4290b7,a107_0x2e2cc0[_0x4c7c2d(0x1c0)](_0x5acb01,JSON[_0x4c7c2d(0x1e5)](_0x5b198c,null,0x2)+'\x0a',_0x4c7c2d(0x1e1)),console[_0x4c7c2d(0x1b8)](_0x4c7c2d(0x1f3)+_0x13db2d),logger['info']('create',_0x4c7c2d(0x1d9));}catch(_0x23a825){logger['error'](_0x4c7c2d(0x1fc),_0x4c7c2d(0x1ba));throw _0x23a825;}}async function configureAppCode(_0x2dc8c6,_0x454262,_0x408a46){const _0x52f0ee=a107_0x4d70,_0xbd6200=a107_0x39e381['resolve'](process[_0x52f0ee(0x1b9)](),_0x2dc8c6),_0x39e44a=a107_0x39e381[_0x52f0ee(0x1e2)](_0xbd6200,NEW_CONFIG_NAME);try{_0x454262?console[_0x52f0ee(0x1b8)](_0x52f0ee(0x208)+_0x2dc8c6+':\x20'+_0x454262):console[_0x52f0ee(0x1b8)]('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0x2dc8c6);const _0x4f0522=getRabetbaseCliPackageRoot(),_0x299b33=a107_0x39e381[_0x52f0ee(0x1e2)](_0x4f0522,'package.json');let _0xc0a566=_0x52f0ee(0x1f9);try{const _0x5ac4d8=JSON['parse'](a107_0x2e2cc0[_0x52f0ee(0x1b2)](_0x299b33,_0x52f0ee(0x1e1)));_0xc0a566=_0x5ac4d8['version']||_0x52f0ee(0x1f9);}catch{}const _0x33cbb0=readConfig(),_0x481195=typeof _0x33cbb0[_0x52f0ee(0x1dc)]==='string'?_0x33cbb0[_0x52f0ee(0x1dc)]:undefined,_0x3f9e61={};for(const _0x961174 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x33cbb0[_0x961174]!=null)_0x3f9e61[_0x961174]=_0x33cbb0[_0x961174];}const _0x2e3898=buildCanonicalProjectConfig(_0x3f9e61,{'appCodes':_0x454262?[_0x454262]:[],'env':_0x408a46||_0x481195||_0x52f0ee(0x1d2),'metadata':{'createdAt':new Date()[_0x52f0ee(0x1e6)](),'version':_0xc0a566}});writeConfigFile(_0x39e44a,_0x2e3898),_0x454262?console[_0x52f0ee(0x1b8)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object[_0x52f0ee(0x1bd)](_0x2e3898[_0x52f0ee(0x1f6)]||{})[_0x52f0ee(0x1e2)](',\x20')+'\x20|\x20Default:\x20'+_0x2e3898[_0x52f0ee(0x1c5)]):console[_0x52f0ee(0x1b8)]('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+_0x52f0ee(0x206)),logger[_0x52f0ee(0x1ad)](_0x52f0ee(0x1fc),_0x52f0ee(0x1b1)+_0x454262);}catch(_0x59f09d){logger[_0x52f0ee(0x1ff)](_0x52f0ee(0x1fc),'配置应用AppCode失败');}}function a107_0x3ee5(){const _0x10771a=['🚀\x20Next\x20Steps:','length','\x20&&\x20','√\x20package.json\x20updated:\x20name=','API\x20配置拉取异常','1993912VckIAc','apps','开始创建项目:\x20','stop','1.0.0','projectCode','\x20dataset(s),\x20generated\x20','create','Format\x20code','fail','error','warn','826854CQnpOR','chdir','项目创建失败:\x20','10hnqUDO','2104697BoyBXF','\x20config\x20set\x20appcode\x20<app-code>\x27','bold','*\x20Configuring\x20AppCode\x20for\x20project\x20','trim','4KNpGFU','info','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','\x20Generated\x20by\x20rabetbase\x20cli\x20','appCode','配置应用AppCode:\x20','readFileSync','5160903WgicqH','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','\x20model(s)','22290RnthSN','log','cwd','更新\x20package.json\x20失败','Install\x20dependencies','Project\x20name:\x20','keys','repeat','\x20√\x20','writeFileSync','清理项目目录失败:\x20','385ivkNNs','rmSync','description','defaultApp','package.json','stableVersion','\x20|\x20AppCode:\x20','setLogPath','5630RIaLuo','currentVersion','cookie','\x20already\x20exists','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','projectName','W_OK','17wIeBrC','production','cyan','version','535707cavQzB','needsUpgrade','green','belowMinimum','更新\x20package.json\x20name','CLI\x20版本检查','cd\x20','env','test','dirname','message','resolve','utf8','join','√\x20Pulled\x20','\x20\x201.\x20Start\x20project:\x20','stringify','toLocaleString','项目创建完成:\x20','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','parse','start','constants','accessSync','gray','modelCount','Copy\x20project\x20files'];a107_0x3ee5=function(){return _0x10771a;};return a107_0x3ee5();}
1
+ (function(_0x52cee4,_0x221341){const _0xc4c8bc=a107_0x1fe3,_0x58f6e2=_0x52cee4();while(!![]){try{const _0x2bffea=-parseInt(_0xc4c8bc(0x18b))/0x1*(parseInt(_0xc4c8bc(0x16b))/0x2)+-parseInt(_0xc4c8bc(0x16c))/0x3*(parseInt(_0xc4c8bc(0x161))/0x4)+parseInt(_0xc4c8bc(0x18d))/0x5+-parseInt(_0xc4c8bc(0x162))/0x6*(-parseInt(_0xc4c8bc(0x190))/0x7)+-parseInt(_0xc4c8bc(0x17a))/0x8*(-parseInt(_0xc4c8bc(0x15e))/0x9)+parseInt(_0xc4c8bc(0x14b))/0xa+-parseInt(_0xc4c8bc(0x16a))/0xb;if(_0x2bffea===_0x221341)break;else _0x58f6e2['push'](_0x58f6e2['shift']());}catch(_0x5818f7){_0x58f6e2['push'](_0x58f6e2['shift']());}}}(a107_0xfb96,0x2f436));import a107_0x1dbfc7 from'path';import a107_0x4094a0 from'fs';import a107_0x5bc8bf from'chalk';import a107_0x3d88b6 from'ora';import{guidedCreateProject}from'../../../commands/project/create/enhanced-guided-create.js';import{fetchModelList}from'../../../api/fetch-model-list.js';import{generateApiFile}from'../../../api/generate-api-file.js';function a107_0x1fe3(_0xae8397,_0x4fe2ae){_0xae8397=_0xae8397-0x140;const _0xfb9611=a107_0xfb96();let _0x1fe350=_0xfb9611[_0xae8397];return _0x1fe350;}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';import{formatProjectCode}from'../../../commands/project/create/use-format-code.js';function a107_0xfb96(){const _0x35a07f=['bold','package.json','minimumVersion','Project\x20name:\x20','accessSync','Project\x20directory\x20','开始创建项目:\x20','apps','parse','error','test','stableVersion','\x20model(s)','Project\x20name\x20cannot\x20be\x20empty','cyan','start','log','utf8','length','message','清理项目目录失败:\x20','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','string','appCode','1785840ZHqEkE','stringify','Copy\x20project\x20files','info','...','setLogPath','\x20|\x20Default:\x20','\x20√\x20','配置应用AppCode失败','name','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','green','1.0.0','项目创建失败:\x20','projectCode','projectName','keys','belowMinimum','API\x20配置拉取异常','168471qKMDXX','√\x20package.json\x20updated:\x20name=','API\x20configuration\x20pulled:\x20','4iSEIzg','6dIaTFk','项目创建完成:\x20','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','constants','Install\x20dependencies','description','\x20|\x20AppCode:\x20','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','3719650RRyOMv','4314nnXKRx','228828GMdvlN','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','🚀\x20Next\x20Steps:','resolve','production','*\x20Configuring\x20AppCode\x20for\x20project\x20','needsUpgrade','stop','*\x20Pulling\x20API\x20configuration...','\x20dataset(s),\x20generated\x20','Format\x20code','readFileSync','repeat','modelCount','32xdmbnI','cookie','rmSync','\x20\x201.\x20Start\x20project:\x20','join','warn','\x20config\x20set\x20appcode\x20<app-code>\x27','√\x20Pulled\x20','create','trim','W_OK','\x20api\x20pull','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','cwd','\x20\x202.\x20Pull\x20API\x20configuration:\x20','writeFileSync','defaultApp','167GyRhIz','env','1772985OVZMFX','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','dirname','2521246AWvEYn'];a107_0xfb96=function(){return _0x35a07f;};return a107_0xfb96();}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(_0x13cc34){const _0x62e3d=a107_0x1fe3,_0x4b46fe=await checkCliVersion();(_0x4b46fe[_0x62e3d(0x172)]||_0x4b46fe[_0x62e3d(0x15c)])&&(printCliUpgradeWarning(_0x4b46fe),assertCliVersionSupported(_0x4b46fe),logger[_0x62e3d(0x14e)](_0x62e3d(0x182),'CLI\x20版本检查',{'currentVersion':_0x4b46fe['currentVersion'],'stableVersion':_0x4b46fe[_0x62e3d(0x19c)],'minimumVersion':_0x4b46fe[_0x62e3d(0x193)],'needsUpgrade':_0x4b46fe[_0x62e3d(0x172)],'belowMinimum':_0x4b46fe[_0x62e3d(0x15c)]}));if(_0x13cc34[_0x62e3d(0x159)]&&_0x13cc34['appCode'])await runCreate({'projectName':_0x13cc34[_0x62e3d(0x159)],'appCode':_0x13cc34['appCode'],'env':_0x13cc34[_0x62e3d(0x18c)]},_0x13cc34);else{if(_0x13cc34[_0x62e3d(0x159)]){const _0x83466f=await selectSingleAppcode(_0x13cc34['cookie']);await runCreate({'projectName':_0x13cc34['projectCode'],'appCode':_0x83466f||undefined,'env':_0x13cc34['env']},_0x13cc34);}else await guidedCreateProject(_0x5278d=>runCreate(_0x5278d,_0x13cc34),_0x13cc34[_0x62e3d(0x18c)],_0x13cc34[_0x62e3d(0x17b)]);}}async function runCreate(_0x5b07bb,_0x43e4db){const _0x36e04c=a107_0x1fe3;if(!_0x5b07bb[_0x36e04c(0x15a)]||_0x5b07bb[_0x36e04c(0x15a)][_0x36e04c(0x183)]()==='')throw new Error(_0x36e04c(0x140));const _0x2842eb=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x2842eb[_0x36e04c(0x19b)](_0x5b07bb[_0x36e04c(0x15a)]))throw new Error(_0x36e04c(0x148));if(_0x5b07bb[_0x36e04c(0x15a)][_0x36e04c(0x145)]>0x64)throw new Error(_0x36e04c(0x164));const _0xfec7d=a107_0x1dbfc7[_0x36e04c(0x16f)](process[_0x36e04c(0x187)](),_0x5b07bb[_0x36e04c(0x15a)]);if(a107_0x4094a0['existsSync'](_0xfec7d))throw new Error(_0x36e04c(0x196)+_0x5b07bb[_0x36e04c(0x15a)]+'\x20already\x20exists');try{a107_0x4094a0[_0x36e04c(0x195)](a107_0x1dbfc7[_0x36e04c(0x18f)](_0xfec7d),a107_0x4094a0[_0x36e04c(0x165)][_0x36e04c(0x184)]);}catch{throw new Error(_0x36e04c(0x18e));}logger[_0x36e04c(0x150)](_0xfec7d),logger['info'](_0x36e04c(0x182),_0x36e04c(0x197)+_0x5b07bb[_0x36e04c(0x15a)],{'projectDir':_0xfec7d,'appCode':_0x5b07bb[_0x36e04c(0x14a)]}),console['log'](),console[_0x36e04c(0x143)](a107_0x5bc8bf['green'](_0x36e04c(0x152))+_0x36e04c(0x194)+a107_0x5bc8bf[_0x36e04c(0x156)](_0x5b07bb[_0x36e04c(0x15a)])+(_0x5b07bb[_0x36e04c(0x14a)]?_0x36e04c(0x168)+a107_0x5bc8bf[_0x36e04c(0x141)](_0x5b07bb[_0x36e04c(0x14a)]):''));try{await runTask(_0x36e04c(0x14d),()=>copyProjectTemplate(_0x5b07bb[_0x36e04c(0x15a)])),await updatePackageJsonName(_0x5b07bb[_0x36e04c(0x15a)]),await runTask(_0x36e04c(0x166),()=>installDependencies(_0x5b07bb[_0x36e04c(0x15a)])),await runTask(_0x36e04c(0x176),()=>formatProjectCode(_0x5b07bb[_0x36e04c(0x15a)])),await configureAppCode(_0x5b07bb['projectName'],_0x5b07bb[_0x36e04c(0x14a)]||'',_0x5b07bb[_0x36e04c(0x18c)]);let _0x2c7162=![];if(_0x5b07bb['appCode']){console[_0x36e04c(0x143)](_0x36e04c(0x174));const _0x199e84=process['cwd']();try{process['chdir'](_0xfec7d);const _0x4eaae6=_0x5b07bb[_0x36e04c(0x18c)]||'production';initEnv(_0x4eaae6);const {configArray:_0x1cc850}=await fetchModelList(_0x5b07bb[_0x36e04c(0x14a)],_0x43e4db['cookie']||''),_0x28788f=DEFAULT_API_DIR,_0x330d42=await generateApiFile(_0x1cc850,'',_0x5b07bb[_0x36e04c(0x14a)],!![],_0x4eaae6,_0x28788f);console[_0x36e04c(0x143)](_0x36e04c(0x181)+_0x1cc850['length']+_0x36e04c(0x175)+_0x330d42[_0x36e04c(0x179)]+_0x36e04c(0x19d)),logger[_0x36e04c(0x14e)](_0x36e04c(0x182),_0x36e04c(0x160)+_0x5b07bb[_0x36e04c(0x14a)]);}catch(_0x3701e8){_0x2c7162=!![],console[_0x36e04c(0x143)](_0x36e04c(0x169)),logger[_0x36e04c(0x17f)](_0x36e04c(0x182),_0x36e04c(0x15d),{'error':_0x3701e8 instanceof Error?_0x3701e8[_0x36e04c(0x146)]:String(_0x3701e8)});}finally{process['chdir'](_0x199e84);}}logger['success']('create',_0x36e04c(0x163)+_0x5b07bb[_0x36e04c(0x15a)]),console[_0x36e04c(0x143)](),console[_0x36e04c(0x143)](a107_0x5bc8bf[_0x36e04c(0x156)]('─'[_0x36e04c(0x178)](0x3c))),console[_0x36e04c(0x143)](a107_0x5bc8bf[_0x36e04c(0x141)][_0x36e04c(0x191)](_0x36e04c(0x16e))),console[_0x36e04c(0x143)](),console[_0x36e04c(0x143)](_0x36e04c(0x17d)+a107_0x5bc8bf[_0x36e04c(0x141)][_0x36e04c(0x191)]('cd\x20'+_0x5b07bb[_0x36e04c(0x15a)]+'\x20&&\x20'+CLI_BIN_NAME+'\x20run\x20start')),_0x2c7162&&console[_0x36e04c(0x143)](_0x36e04c(0x188)+a107_0x5bc8bf[_0x36e04c(0x141)]['bold'](CLI_BIN_NAME+_0x36e04c(0x185))),console[_0x36e04c(0x143)](a107_0x5bc8bf[_0x36e04c(0x156)]('─'[_0x36e04c(0x178)](0x3c)));}catch(_0x410a5c){logger['error'](_0x36e04c(0x182),_0x36e04c(0x158)+_0x5b07bb[_0x36e04c(0x15a)],{'error':_0x410a5c instanceof Error?_0x410a5c[_0x36e04c(0x146)]:String(_0x410a5c)});try{a107_0x4094a0['existsSync'](_0xfec7d)&&(console[_0x36e04c(0x143)]('*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20'+_0xfec7d),a107_0x4094a0[_0x36e04c(0x17c)](_0xfec7d,{'recursive':!![],'force':!![]}));}catch{logger['warn'](_0x36e04c(0x182),_0x36e04c(0x147)+_0xfec7d);}throw _0x410a5c;}}async function runTask(_0x51a2f1,_0xdfdd2a){const _0x2f56fd=a107_0x1fe3,_0x5c67cd=a107_0x3d88b6(_0x51a2f1+_0x2f56fd(0x14f))[_0x2f56fd(0x142)]();try{const _0x1b1253=await _0xdfdd2a();_0x5c67cd[_0x2f56fd(0x173)](),console[_0x2f56fd(0x143)](''+a107_0x5bc8bf[_0x2f56fd(0x156)](_0x2f56fd(0x152))+_0x51a2f1+'\x20'+a107_0x5bc8bf['gray']('['+_0x1b1253+']'));}catch(_0x3ad54a){_0x5c67cd['fail'](_0x51a2f1);throw _0x3ad54a;}}async function updatePackageJsonName(_0x2e3e6d){const _0x2d3660=a107_0x1fe3,_0x3959cc=a107_0x1dbfc7[_0x2d3660(0x16f)](process[_0x2d3660(0x187)](),_0x2e3e6d),_0x44d3d6=a107_0x1dbfc7['join'](_0x3959cc,_0x2d3660(0x192));try{console[_0x2d3660(0x143)](_0x2d3660(0x186));const _0x3062ae=getRabetbaseCliPackageRoot(),_0x23b952=a107_0x1dbfc7[_0x2d3660(0x17e)](_0x3062ae,_0x2d3660(0x192));let _0x154345=_0x2d3660(0x157);try{const _0x3bacea=JSON[_0x2d3660(0x199)](a107_0x4094a0['readFileSync'](_0x23b952,_0x2d3660(0x144)));_0x154345=_0x3bacea['version']||'1.0.0';}catch{}const _0x1a3fae=a107_0x4094a0[_0x2d3660(0x177)](_0x44d3d6,_0x2d3660(0x144)),_0x35da67=JSON[_0x2d3660(0x199)](_0x1a3fae);_0x35da67[_0x2d3660(0x154)]=_0x2e3e6d,_0x35da67[_0x2d3660(0x167)]=_0x2e3e6d+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0x154345,a107_0x4094a0[_0x2d3660(0x189)](_0x44d3d6,JSON[_0x2d3660(0x14c)](_0x35da67,null,0x2)+'\x0a','utf8'),console[_0x2d3660(0x143)](_0x2d3660(0x15f)+_0x2e3e6d),logger[_0x2d3660(0x14e)](_0x2d3660(0x182),'更新\x20package.json\x20name');}catch(_0x23aaa9){logger['error']('create','更新\x20package.json\x20失败');throw _0x23aaa9;}}async function configureAppCode(_0x128077,_0x14a211,_0x6ce0a2){const _0x4bc1a9=a107_0x1fe3,_0x486633=a107_0x1dbfc7[_0x4bc1a9(0x16f)](process[_0x4bc1a9(0x187)](),_0x128077),_0x11d436=a107_0x1dbfc7[_0x4bc1a9(0x17e)](_0x486633,NEW_CONFIG_NAME);try{_0x14a211?console[_0x4bc1a9(0x143)](_0x4bc1a9(0x171)+_0x128077+':\x20'+_0x14a211):console[_0x4bc1a9(0x143)](_0x4bc1a9(0x16d)+_0x128077);const _0x47bc2b=getRabetbaseCliPackageRoot(),_0x32b431=a107_0x1dbfc7[_0x4bc1a9(0x17e)](_0x47bc2b,_0x4bc1a9(0x192));let _0x2445d8=_0x4bc1a9(0x157);try{const _0x4c9c4d=JSON['parse'](a107_0x4094a0[_0x4bc1a9(0x177)](_0x32b431,_0x4bc1a9(0x144)));_0x2445d8=_0x4c9c4d['version']||_0x4bc1a9(0x157);}catch{}const _0x37e8e3=readConfig(),_0x3dc79e=typeof _0x37e8e3[_0x4bc1a9(0x18c)]===_0x4bc1a9(0x149)?_0x37e8e3['env']:undefined,_0x5f1a39={};for(const _0x109fe4 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x37e8e3[_0x109fe4]!=null)_0x5f1a39[_0x109fe4]=_0x37e8e3[_0x109fe4];}const _0x494fa7=buildCanonicalProjectConfig(_0x5f1a39,{'appCodes':_0x14a211?[_0x14a211]:[],'env':_0x6ce0a2||_0x3dc79e||_0x4bc1a9(0x170),'metadata':{'createdAt':new Date()['toLocaleString'](),'version':_0x2445d8}});writeConfigFile(_0x11d436,_0x494fa7),_0x14a211?console[_0x4bc1a9(0x143)]('√\x20Configuration\x20file\x20created,\x20Apps:\x20'+Object[_0x4bc1a9(0x15b)](_0x494fa7[_0x4bc1a9(0x198)]||{})[_0x4bc1a9(0x17e)](',\x20')+_0x4bc1a9(0x151)+_0x494fa7[_0x4bc1a9(0x18a)]):console['log'](_0x4bc1a9(0x155)+CLI_BIN_NAME+_0x4bc1a9(0x180)),logger[_0x4bc1a9(0x14e)](_0x4bc1a9(0x182),'配置应用AppCode:\x20'+_0x14a211);}catch(_0x909439){logger[_0x4bc1a9(0x19a)](_0x4bc1a9(0x182),_0x4bc1a9(0x153));}}
@@ -1 +1 @@
1
- (function(_0x2a7773,_0x41175e){const _0x961384=a108_0x206e,_0x2ed405=_0x2a7773();while(!![]){try{const _0xd9ffa2=-parseInt(_0x961384(0x1b5))/0x1+parseInt(_0x961384(0x1d1))/0x2*(parseInt(_0x961384(0x1c9))/0x3)+-parseInt(_0x961384(0x1b3))/0x4*(-parseInt(_0x961384(0x1bf))/0x5)+-parseInt(_0x961384(0x1a6))/0x6+parseInt(_0x961384(0x19f))/0x7*(-parseInt(_0x961384(0x1b2))/0x8)+parseInt(_0x961384(0x1c5))/0x9+parseInt(_0x961384(0x19d))/0xa*(parseInt(_0x961384(0x1a1))/0xb);if(_0xd9ffa2===_0x41175e)break;else _0x2ed405['push'](_0x2ed405['shift']());}catch(_0x1025db){_0x2ed405['push'](_0x2ed405['shift']());}}}(a108_0x26af,0x350a0));import a108_0x48c9ab from'path';import a108_0x4124cc 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';function a108_0x26af(){const _0x377b51=['npm','writeFile','39xUZbae','\x20\x20Pulling\x20API\x20configuration...','join','production','*\x20Creating\x20project\x20','readFile','Project\x20name\x20cannot\x20be\x20empty.','env','38078MmrQIi','\x0a√\x20Project\x20','log','dirname','14590qThBIq','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','124271GehdtE','length','407suoygS','\x20\x20Installing\x20dependencies...','test','ignore','cwd','1588662WnlPXs','\x20model(s)','\x20\x20√\x20Project\x20template\x20created','resolve','\x20created\x20successfully!','package.json','utf-8','bun','validation','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','string','Use\x20a\x20different\x20project\x20name.','72vXhOuE','416koxncI','Cannot\x20create\x20project\x20in\x20current\x20directory.','117554CwOAao','description','...','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','\x20\x20√\x20Code\x20formatted','\x22\x20already\x20exists.','Project\x20directory\x20\x22','\x20\x20√\x20Configuration\x20file\x20created','name','chdir','17215rZGFrb','constants','modelCount','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','toLocaleString','Check\x20directory\x20permissions.','898146LterBW','\x20dataset(s),\x20generated\x20'];a108_0x26af=function(){return _0x377b51;};return a108_0x26af();}import{promisify}from'util';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';function a108_0x206e(_0x2971f5,_0xc883fc){_0x2971f5=_0x2971f5-0x19b;const _0x26afa9=a108_0x26af();let _0x206ec9=_0x26afa9[_0x2971f5];return _0x206ec9;}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'../../../api/fetch-model-list.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(_0x17dfd7,_0xc42b38,_0x5422fa,_0x352576){const _0x57533c=a108_0x206e,_0x142ecf=await checkCliVersion();(_0x142ecf['needsUpgrade']||_0x142ecf['belowMinimum'])&&(printCliUpgradeWarning(_0x142ecf),assertCliVersionSupported(_0x142ecf));if(!_0x17dfd7||_0x17dfd7['trim']()==='')throw CliErrors[_0x57533c(0x1ae)](_0x57533c(0x1cf));const _0x197a9a=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x197a9a[_0x57533c(0x1a3)](_0x17dfd7))throw CliErrors[_0x57533c(0x1ae)]('Project\x20name\x20contains\x20invalid\x20characters.',_0x57533c(0x1c2));if(_0x17dfd7[_0x57533c(0x1a0)]>0x64)throw CliErrors[_0x57533c(0x1ae)](_0x57533c(0x19e));const _0x301656=a108_0x48c9ab[_0x57533c(0x1a9)](process[_0x57533c(0x1a5)](),_0x17dfd7);if(existsSync(_0x301656))throw CliErrors[_0x57533c(0x1ae)](_0x57533c(0x1bb)+_0x17dfd7+_0x57533c(0x1ba),_0x57533c(0x1b1));try{const _0x4aad36=a108_0x48c9ab[_0x57533c(0x19c)](_0x301656);await a108_0x4124cc['access'](_0x4aad36,a108_0x4124cc[_0x57533c(0x1c0)]['W_OK']);}catch{throw CliErrors[_0x57533c(0x1ae)](_0x57533c(0x1b4),_0x57533c(0x1c4));}try{console[_0x57533c(0x19b)](_0x57533c(0x1cd)+_0x17dfd7+_0x57533c(0x1b7));const _0x11242e=getSubAppReactDemoTemplateDir();await copyDirectory(_0x11242e,_0x301656),console[_0x57533c(0x19b)](_0x57533c(0x1a8)),await updatePackageJsonName(_0x17dfd7),console[_0x57533c(0x19b)]('\x20\x20√\x20package.json\x20updated'),console[_0x57533c(0x19b)](_0x57533c(0x1a2)),console[_0x57533c(0x19b)](_0x57533c(0x1b8)),await formatCode(_0x301656),console[_0x57533c(0x19b)](_0x57533c(0x1b9)),await configureProject(_0x17dfd7,_0x5422fa,_0xc42b38),console[_0x57533c(0x19b)](_0x57533c(0x1bc)),_0x5422fa&&await pullApiConfig(_0x301656,_0x5422fa,_0xc42b38,_0x352576),console['log'](_0x57533c(0x1d2)+_0x17dfd7+_0x57533c(0x1aa)),console[_0x57533c(0x19b)]('\x0a\x20\x20cd\x20'+_0x17dfd7),console[_0x57533c(0x19b)]('\x20\x20rabetbase\x20run\x20start\x0a');}catch(_0x504405){try{existsSync(_0x301656)&&await a108_0x4124cc['rm'](_0x301656,{'recursive':!![],'force':!![]});}catch{}throw _0x504405;}}async function updatePackageJsonName(_0x2bd50a){const _0x3e0600=a108_0x206e,_0x19e148=a108_0x48c9ab[_0x3e0600(0x1a9)](process[_0x3e0600(0x1a5)](),_0x2bd50a),_0x23455d=a108_0x48c9ab[_0x3e0600(0x1cb)](_0x19e148,_0x3e0600(0x1ab)),_0x16c302=await a108_0x4124cc[_0x3e0600(0x1ce)](_0x23455d,_0x3e0600(0x1ac)),_0x320a98=JSON['parse'](_0x16c302);_0x320a98[_0x3e0600(0x1bd)]=_0x2bd50a,_0x320a98[_0x3e0600(0x1b6)]='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a108_0x4124cc[_0x3e0600(0x1c8)](_0x23455d,JSON['stringify'](_0x320a98,null,0x2)+'\x0a');}function detectPackageManager(){const _0x1faee7=a108_0x206e;try{return execSync('bun\x20--version',{'stdio':_0x1faee7(0x1a4)}),_0x1faee7(0x1ad);}catch{return _0x1faee7(0x1c7);}}async function formatCode(_0x218375){try{await execAsync('bun\x20run\x20format',{'cwd':_0x218375});}catch{}}async function configureProject(_0x397b07,_0x57c811,_0x5f2b12){const _0x4ce220=a108_0x206e,_0xae6de7=a108_0x48c9ab[_0x4ce220(0x1a9)](process[_0x4ce220(0x1a5)](),_0x397b07),_0x231a46=a108_0x48c9ab['join'](_0xae6de7,NEW_CONFIG_NAME),_0x147f52=readConfig(),_0x2d8806=typeof _0x147f52[_0x4ce220(0x1d0)]===_0x4ce220(0x1b0)?_0x147f52['env']:undefined,_0x4451d8={};for(const _0x2b83b8 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x147f52[_0x2b83b8]!=null)_0x4451d8[_0x2b83b8]=_0x147f52[_0x2b83b8];}const _0x6f25ae=buildCanonicalProjectConfig(_0x4451d8,{'appCodes':_0x57c811?[_0x57c811]:[],'env':_0x5f2b12||_0x2d8806||'production','metadata':{'createdAt':new Date()[_0x4ce220(0x1c3)](),'version':getCliVersion()}});writeConfigFile(_0x231a46,_0x6f25ae);}async function pullApiConfig(_0x582745,_0x1819ba,_0x4616f1,_0x22531a){const _0x28a15e=a108_0x206e,_0x4c9ac4=process[_0x28a15e(0x1a5)]();try{process[_0x28a15e(0x1be)](_0x582745);const _0x5d6a50=_0x4616f1||_0x28a15e(0x1cc);initEnv(_0x5d6a50),console['log'](_0x28a15e(0x1ca));const {configArray:_0x2477d6}=await fetchModelList(_0x1819ba,_0x22531a||''),_0x1eb249=await generateApiFile(_0x2477d6,'',_0x1819ba,!![],_0x5d6a50,DEFAULT_API_DIR);console[_0x28a15e(0x19b)]('\x20\x20√\x20Pulled\x20'+_0x2477d6['length']+_0x28a15e(0x1c6)+_0x1eb249[_0x28a15e(0x1c1)]+_0x28a15e(0x1a7));}catch(_0x73a4a5){console['log'](_0x28a15e(0x1af)+CLI_BIN_NAME+'\x20api\x20pull`\x20manually\x20later.');}finally{process[_0x28a15e(0x1be)](_0x4c9ac4);}}
1
+ (function(_0x1b6b94,_0x926044){const _0x2542bb=a108_0x42e8,_0x338603=_0x1b6b94();while(!![]){try{const _0x195bbe=-parseInt(_0x2542bb(0xfe))/0x1*(-parseInt(_0x2542bb(0x102))/0x2)+parseInt(_0x2542bb(0xdc))/0x3*(-parseInt(_0x2542bb(0xea))/0x4)+-parseInt(_0x2542bb(0xf7))/0x5*(parseInt(_0x2542bb(0xf4))/0x6)+parseInt(_0x2542bb(0xf0))/0x7*(-parseInt(_0x2542bb(0xe6))/0x8)+parseInt(_0x2542bb(0xed))/0x9*(-parseInt(_0x2542bb(0xf6))/0xa)+parseInt(_0x2542bb(0xfc))/0xb*(parseInt(_0x2542bb(0xe1))/0xc)+parseInt(_0x2542bb(0xfa))/0xd*(parseInt(_0x2542bb(0xf1))/0xe);if(_0x195bbe===_0x926044)break;else _0x338603['push'](_0x338603['shift']());}catch(_0x3c792d){_0x338603['push'](_0x338603['shift']());}}}(a108_0x9389,0xbfa18));import a108_0x96ee17 from'path';import a108_0x425d8e 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';function a108_0x9389(){const _0x23383b=['constants','writeFile','env','118044AxPMAs','npm','\x20\x20Installing\x20dependencies...','modelCount','bun\x20run\x20format','1688zFhKPf','test','W_OK','ignore','12rXgWaJ','...','readFile','9rLNQKL','chdir','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','36638JmCnGn','29529598mddCfe','production','\x20\x20√\x20Code\x20formatted','78KBjejc','\x20\x20√\x20package.json\x20updated','9374970bOfFeu','166040ivHfIc','\x22\x20already\x20exists.','needsUpgrade','13uLvGvg','validation','649hvvMqC','name','378064XqPyHj','Project\x20name\x20cannot\x20be\x20empty.','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','cwd','8ZNPTys','\x20\x20√\x20Configuration\x20file\x20created','\x20\x20√\x20Pulled\x20','Use\x20a\x20different\x20project\x20name.','\x20created\x20successfully!','string','Cannot\x20create\x20project\x20in\x20current\x20directory.','dirname','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','package.json','bun','\x20\x20rabetbase\x20run\x20start\x0a','bun\x20--version','Project\x20name\x20contains\x20invalid\x20characters.','toLocaleString','trim','length','resolve','Check\x20directory\x20permissions.','join','description','utf-8','943401qcYcEY','log'];a108_0x9389=function(){return _0x23383b;};return a108_0x9389();}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 a108_0x42e8(_0x2b1d7c,_0x50656f){_0x2b1d7c=_0x2b1d7c-0xdc;const _0x938910=a108_0x9389();let _0x42e853=_0x938910[_0x2b1d7c];return _0x42e853;}import{fetchModelList}from'../../../api/fetch-model-list.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(_0x59dabb,_0xc4dd59,_0xd5ff92,_0x79475e){const _0x267ed8=a108_0x42e8,_0x577154=await checkCliVersion();(_0x577154[_0x267ed8(0xf9)]||_0x577154['belowMinimum'])&&(printCliUpgradeWarning(_0x577154),assertCliVersionSupported(_0x577154));if(!_0x59dabb||_0x59dabb[_0x267ed8(0x113)]()==='')throw CliErrors[_0x267ed8(0xfb)](_0x267ed8(0xff));const _0xaa24d5=/[<>:"|?*\x00-\x1f\x7f]/;if(_0xaa24d5[_0x267ed8(0xe7)](_0x59dabb))throw CliErrors['validation'](_0x267ed8(0x111),_0x267ed8(0x10c));if(_0x59dabb[_0x267ed8(0x114)]>0x64)throw CliErrors[_0x267ed8(0xfb)](_0x267ed8(0xef));const _0x5f04a4=a108_0x96ee17[_0x267ed8(0x115)](process[_0x267ed8(0x101)](),_0x59dabb);if(existsSync(_0x5f04a4))throw CliErrors[_0x267ed8(0xfb)]('Project\x20directory\x20\x22'+_0x59dabb+_0x267ed8(0xf8),_0x267ed8(0x105));try{const _0x2dc194=a108_0x96ee17[_0x267ed8(0x109)](_0x5f04a4);await a108_0x425d8e['access'](_0x2dc194,a108_0x425d8e[_0x267ed8(0xde)][_0x267ed8(0xe8)]);}catch{throw CliErrors[_0x267ed8(0xfb)](_0x267ed8(0x108),_0x267ed8(0x116));}try{console[_0x267ed8(0xdd)]('*\x20Creating\x20project\x20'+_0x59dabb+_0x267ed8(0xeb));const _0x55b9c9=getSubAppReactDemoTemplateDir();await copyDirectory(_0x55b9c9,_0x5f04a4),console[_0x267ed8(0xdd)]('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x59dabb),console[_0x267ed8(0xdd)](_0x267ed8(0xf5)),console[_0x267ed8(0xdd)](_0x267ed8(0xe3)),console[_0x267ed8(0xdd)](_0x267ed8(0x10b)),await formatCode(_0x5f04a4),console[_0x267ed8(0xdd)](_0x267ed8(0xf3)),await configureProject(_0x59dabb,_0xd5ff92,_0xc4dd59),console[_0x267ed8(0xdd)](_0x267ed8(0x103)),_0xd5ff92&&await pullApiConfig(_0x5f04a4,_0xd5ff92,_0xc4dd59,_0x79475e),console[_0x267ed8(0xdd)]('\x0a√\x20Project\x20'+_0x59dabb+_0x267ed8(0x106)),console['log']('\x0a\x20\x20cd\x20'+_0x59dabb),console[_0x267ed8(0xdd)](_0x267ed8(0x10f));}catch(_0xff3dbc){try{existsSync(_0x5f04a4)&&await a108_0x425d8e['rm'](_0x5f04a4,{'recursive':!![],'force':!![]});}catch{}throw _0xff3dbc;}}async function updatePackageJsonName(_0x10d2d6){const _0x998ff6=a108_0x42e8,_0x158385=a108_0x96ee17[_0x998ff6(0x115)](process['cwd'](),_0x10d2d6),_0x358f96=a108_0x96ee17['join'](_0x158385,_0x998ff6(0x10d)),_0x4548fd=await a108_0x425d8e[_0x998ff6(0xec)](_0x358f96,_0x998ff6(0x119)),_0x263d95=JSON['parse'](_0x4548fd);_0x263d95[_0x998ff6(0xfd)]=_0x10d2d6,_0x263d95[_0x998ff6(0x118)]=_0x998ff6(0x10a),await a108_0x425d8e[_0x998ff6(0xdf)](_0x358f96,JSON['stringify'](_0x263d95,null,0x2)+'\x0a');}function detectPackageManager(){const _0x4914ba=a108_0x42e8;try{return execSync(_0x4914ba(0x110),{'stdio':_0x4914ba(0xe9)}),_0x4914ba(0x10e);}catch{return _0x4914ba(0xe2);}}async function formatCode(_0x1290ca){const _0x5ef5b7=a108_0x42e8;try{await execAsync(_0x5ef5b7(0xe5),{'cwd':_0x1290ca});}catch{}}async function configureProject(_0x1a86db,_0x462192,_0x56d729){const _0x3f1138=a108_0x42e8,_0x5e7dce=a108_0x96ee17[_0x3f1138(0x115)](process[_0x3f1138(0x101)](),_0x1a86db),_0xb9b8c0=a108_0x96ee17[_0x3f1138(0x117)](_0x5e7dce,NEW_CONFIG_NAME),_0x4b0f04=readConfig(),_0x139576=typeof _0x4b0f04[_0x3f1138(0xe0)]===_0x3f1138(0x107)?_0x4b0f04[_0x3f1138(0xe0)]:undefined,_0x36798b={};for(const _0x942f60 of PROJECT_CREATE_INHERITABLE_KEYS){if(_0x4b0f04[_0x942f60]!=null)_0x36798b[_0x942f60]=_0x4b0f04[_0x942f60];}const _0x1fa1e6=buildCanonicalProjectConfig(_0x36798b,{'appCodes':_0x462192?[_0x462192]:[],'env':_0x56d729||_0x139576||_0x3f1138(0xf2),'metadata':{'createdAt':new Date()[_0x3f1138(0x112)](),'version':getCliVersion()}});writeConfigFile(_0xb9b8c0,_0x1fa1e6);}async function pullApiConfig(_0x2d1e5d,_0x3c2aaa,_0x2553b0,_0x176c95){const _0x3ddcda=a108_0x42e8,_0x57f902=process[_0x3ddcda(0x101)]();try{process[_0x3ddcda(0xee)](_0x2d1e5d);const _0xe532e7=_0x2553b0||_0x3ddcda(0xf2);initEnv(_0xe532e7),console[_0x3ddcda(0xdd)]('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x41d1e1}=await fetchModelList(_0x3c2aaa,_0x176c95||''),_0x340256=await generateApiFile(_0x41d1e1,'',_0x3c2aaa,!![],_0xe532e7,DEFAULT_API_DIR);console[_0x3ddcda(0xdd)](_0x3ddcda(0x104)+_0x41d1e1[_0x3ddcda(0x114)]+'\x20dataset(s),\x20generated\x20'+_0x340256[_0x3ddcda(0xe4)]+'\x20model(s)');}catch(_0x37acea){console[_0x3ddcda(0xdd)](_0x3ddcda(0x100)+CLI_BIN_NAME+'\x20api\x20pull`\x20manually\x20later.');}finally{process[_0x3ddcda(0xee)](_0x57f902);}}
@@ -1 +1 @@
1
- function a109_0x32ac(){const _0x2d3504=['9519rOtIms','2403306zXevfG','12133152maavFA','templates','projects','join','286jQHXGD','784AlHMDc','7225sffxLs','resolve','2145GBHUSv','87460SxBRBu','984uOYibA','1348BkiiuK','../../../../','3386QuueEZ','34783MzVeII','dirname','sub-app-react-demo'];a109_0x32ac=function(){return _0x2d3504;};return a109_0x32ac();}const a109_0x2ee491=a109_0x4da8;(function(_0x4e187d,_0xfb0c63){const _0x47f7fe=a109_0x4da8,_0x48d38f=_0x4e187d();while(!![]){try{const _0x4d7f84=-parseInt(_0x47f7fe(0x15c))/0x1*(-parseInt(_0x47f7fe(0x165))/0x2)+-parseInt(_0x47f7fe(0x169))/0x3*(-parseInt(_0x47f7fe(0x163))/0x4)+parseInt(_0x47f7fe(0x15e))/0x5*(parseInt(_0x47f7fe(0x162))/0x6)+-parseInt(_0x47f7fe(0x166))/0x7*(parseInt(_0x47f7fe(0x15d))/0x8)+parseInt(_0x47f7fe(0x16a))/0x9+parseInt(_0x47f7fe(0x161))/0xa*(-parseInt(_0x47f7fe(0x160))/0xb)+parseInt(_0x47f7fe(0x16b))/0xc;if(_0x4d7f84===_0xfb0c63)break;else _0x48d38f['push'](_0x48d38f['shift']());}catch(_0x132f42){_0x48d38f['push'](_0x48d38f['shift']());}}}(a109_0x32ac,0xd5e91));import a109_0xcf633e from'node:path';import{fileURLToPath}from'node:url';const __dirname=a109_0xcf633e[a109_0x2ee491(0x167)](fileURLToPath(import.meta.url));function a109_0x4da8(_0x23b66f,_0x59ca0){_0x23b66f=_0x23b66f-0x15c;const _0x32ac5e=a109_0x32ac();let _0x4da8c5=_0x32ac5e[_0x23b66f];return _0x4da8c5;}export function getRabetbaseCliPackageRoot(){const _0x517358=a109_0x2ee491;return a109_0xcf633e[_0x517358(0x15f)](__dirname,_0x517358(0x164));}export function getSubAppReactDemoTemplateDir(){const _0x46e85d=a109_0x2ee491;return a109_0xcf633e[_0x46e85d(0x16e)](getRabetbaseCliPackageRoot(),_0x46e85d(0x16c),_0x46e85d(0x16d),_0x46e85d(0x168));}
1
+ (function(_0x3b24d1,_0x30e8e5){const _0x2da4f1=a109_0x4888,_0x1f11ee=_0x3b24d1();while(!![]){try{const _0x5da4c1=-parseInt(_0x2da4f1(0x98))/0x1+-parseInt(_0x2da4f1(0x94))/0x2+parseInt(_0x2da4f1(0x9b))/0x3+parseInt(_0x2da4f1(0x96))/0x4*(parseInt(_0x2da4f1(0x9d))/0x5)+-parseInt(_0x2da4f1(0x97))/0x6*(-parseInt(_0x2da4f1(0xa0))/0x7)+-parseInt(_0x2da4f1(0x9a))/0x8+parseInt(_0x2da4f1(0x99))/0x9;if(_0x5da4c1===_0x30e8e5)break;else _0x1f11ee['push'](_0x1f11ee['shift']());}catch(_0x3fc4b7){_0x1f11ee['push'](_0x1f11ee['shift']());}}}(a109_0x14c9,0xe70c9));import a109_0x5ba2c2 from'node:path';function a109_0x4888(_0x42e397,_0x3161ee){_0x42e397=_0x42e397-0x94;const _0x14c947=a109_0x14c9();let _0x4888ac=_0x14c947[_0x42e397];return _0x4888ac;}import{fileURLToPath}from'node:url';const __dirname=a109_0x5ba2c2['dirname'](fileURLToPath(import.meta.url));function a109_0x14c9(){const _0xde2b30=['91AVypsP','1763468xABNgG','join','44BsVsoe','436020CRWtVt','547003oeRFmq','3055878ZQPDSf','1676400MzFIyf','2604237cfcImR','resolve','196515fXRVcv','sub-app-react-demo','projects'];a109_0x14c9=function(){return _0xde2b30;};return a109_0x14c9();}export function getRabetbaseCliPackageRoot(){const _0xd03c07=a109_0x4888;return a109_0x5ba2c2[_0xd03c07(0x9c)](__dirname,'../../../../');}export function getSubAppReactDemoTemplateDir(){const _0x3c9787=a109_0x4888;return a109_0x5ba2c2[_0x3c9787(0x95)](getRabetbaseCliPackageRoot(),'templates',_0x3c9787(0x9f),_0x3c9787(0x9e));}
@@ -1 +1 @@
1
- (function(_0xa66ec0,_0x1d7f2c){const _0x5f5656=a110_0x1d7b,_0x1f6b56=_0xa66ec0();while(!![]){try{const _0xa9726c=-parseInt(_0x5f5656(0x1de))/0x1+-parseInt(_0x5f5656(0x1e3))/0x2+-parseInt(_0x5f5656(0x1e2))/0x3+-parseInt(_0x5f5656(0x1d6))/0x4+-parseInt(_0x5f5656(0x1d8))/0x5+-parseInt(_0x5f5656(0x1e1))/0x6+parseInt(_0x5f5656(0x1e0))/0x7*(parseInt(_0x5f5656(0x1e7))/0x8);if(_0xa9726c===_0x1d7f2c)break;else _0x1f6b56['push'](_0x1f6b56['shift']());}catch(_0x400bbb){_0x1f6b56['push'](_0x1f6b56['shift']());}}}(a110_0x30e1,0x1a096));function a110_0x1d7b(_0x17bc04,_0x1725c0){_0x17bc04=_0x17bc04-0x1d6;const _0x30e1a3=a110_0x30e1();let _0x1d7b4f=_0x30e1a3[_0x17bc04];return _0x1d7b4f;}import a110_0x4c9d03 from'node:path';function a110_0x30e1(){const _0x1d41a1=['118666XzImNb','resolve','success','now','152ZqMEzi','54780nFbywF','error','616700NAeNOe','开始复制项目模板','copy','cwd','项目模板复制完成','info','127539UpHRdI','message','175217hyeDFT','177036rmgyNi','46590jAIMPP'];a110_0x30e1=function(){return _0x1d41a1;};return a110_0x30e1();}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(_0x54ad67){const _0x3a6eda=a110_0x1d7b,_0x105b8b=Date[_0x3a6eda(0x1e6)](),_0x3e1070=a110_0x4c9d03[_0x3a6eda(0x1e4)](process[_0x3a6eda(0x1db)](),_0x54ad67);try{logger[_0x3a6eda(0x1dd)](_0x3a6eda(0x1da),_0x3a6eda(0x1d9),{'projectCode':_0x54ad67,'templateDir':templateDir}),await copyDirectory(templateDir,_0x3e1070);const _0x584756=Date[_0x3a6eda(0x1e6)]()-_0x105b8b;logger[_0x3a6eda(0x1e5)](_0x3a6eda(0x1da),_0x3a6eda(0x1dc),_0x584756,{'projectCode':_0x54ad67});}catch(_0x487fff){const _0x284cde=Date[_0x3a6eda(0x1e6)]()-_0x105b8b;logger[_0x3a6eda(0x1d7)](_0x3a6eda(0x1da),'项目模板复制失败',{'projectCode':_0x54ad67,'error':_0x487fff instanceof Error?_0x487fff[_0x3a6eda(0x1df)]:String(_0x487fff),'duration':_0x284cde});throw _0x487fff;}return formatElapsed(_0x105b8b);}
1
+ (function(_0x1f9855,_0x547439){const _0x560494=a110_0x382c,_0x4b196b=_0x1f9855();while(!![]){try{const _0x5b4343=parseInt(_0x560494(0x1ac))/0x1+parseInt(_0x560494(0x1af))/0x2+parseInt(_0x560494(0x1ad))/0x3*(-parseInt(_0x560494(0x1a0))/0x4)+-parseInt(_0x560494(0x1ae))/0x5+parseInt(_0x560494(0x1a6))/0x6+-parseInt(_0x560494(0x1a1))/0x7+parseInt(_0x560494(0x1ab))/0x8;if(_0x5b4343===_0x547439)break;else _0x4b196b['push'](_0x4b196b['shift']());}catch(_0x176b13){_0x4b196b['push'](_0x4b196b['shift']());}}}(a110_0x1843,0x5b524));import a110_0x155a64 from'node:path';function a110_0x1843(){const _0x2cd251=['3137056tvfGTJ','107015Vxfaba','12eIyzZa','3320385CMZdZi','578646FbacZm','copy','47072yBEiot','2606786ykpZTc','开始复制项目模板','cwd','resolve','now','4014774mZmpCF','message','项目模板复制失败','项目模板复制完成','error'];a110_0x1843=function(){return _0x2cd251;};return a110_0x1843();}import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';function a110_0x382c(_0x37e979,_0x2cd1fb){_0x37e979=_0x37e979-0x19f;const _0x1843a0=a110_0x1843();let _0x382cfa=_0x1843a0[_0x37e979];return _0x382cfa;}import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0xf9a8cb){const _0x4968d3=a110_0x382c,_0x56cdde=Date[_0x4968d3(0x1a5)](),_0x4b0b5b=a110_0x155a64[_0x4968d3(0x1a4)](process[_0x4968d3(0x1a3)](),_0xf9a8cb);try{logger['info'](_0x4968d3(0x19f),_0x4968d3(0x1a2),{'projectCode':_0xf9a8cb,'templateDir':templateDir}),await copyDirectory(templateDir,_0x4b0b5b);const _0xf897c0=Date[_0x4968d3(0x1a5)]()-_0x56cdde;logger['success'](_0x4968d3(0x19f),_0x4968d3(0x1a9),_0xf897c0,{'projectCode':_0xf9a8cb});}catch(_0x25bbb8){const _0x5ee215=Date[_0x4968d3(0x1a5)]()-_0x56cdde;logger[_0x4968d3(0x1aa)]('copy',_0x4968d3(0x1a8),{'projectCode':_0xf9a8cb,'error':_0x25bbb8 instanceof Error?_0x25bbb8[_0x4968d3(0x1a7)]:String(_0x25bbb8),'duration':_0x5ee215});throw _0x25bbb8;}return formatElapsed(_0x56cdde);}
@@ -1 +1 @@
1
- (function(_0x1c402a,_0x31336c){const _0x35db01=a111_0x1f2b,_0x1e5f35=_0x1c402a();while(!![]){try{const _0x36dce0=parseInt(_0x35db01(0x143))/0x1*(parseInt(_0x35db01(0x147))/0x2)+-parseInt(_0x35db01(0x146))/0x3+parseInt(_0x35db01(0x14d))/0x4*(parseInt(_0x35db01(0x149))/0x5)+parseInt(_0x35db01(0x148))/0x6*(-parseInt(_0x35db01(0x14b))/0x7)+parseInt(_0x35db01(0x13e))/0x8*(-parseInt(_0x35db01(0x14c))/0x9)+-parseInt(_0x35db01(0x14f))/0xa+parseInt(_0x35db01(0x14a))/0xb;if(_0x36dce0===_0x31336c)break;else _0x1e5f35['push'](_0x1e5f35['shift']());}catch(_0x58f148){_0x1e5f35['push'](_0x1e5f35['shift']());}}}(a111_0x1e19,0x5525e));import a111_0x29b914 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a111_0x1f2b(_0x201cf4,_0x518e68){_0x201cf4=_0x201cf4-0x13d;const _0x1e1921=a111_0x1e19();let _0x1f2b0c=_0x1e1921[_0x201cf4];return _0x1f2b0c;}import{resolveNpmBin}from'../../../utils/platform.js';function a111_0x1e19(){const _0xac0a7f=['format','message','27647bTJFGh','info','error','179136Xbyanx','24kPtzID','2953770GeAERZ','581615KFJrux','11559086eibVex','7KYUYsq','657xuneSA','8TtWFZN','success','2410580vWsDRx','--write','开始格式化代码','cwd','51880cfDVYf','resolve','now'];a111_0x1e19=function(){return _0xac0a7f;};return a111_0x1e19();}export async function formatProjectCode(_0x528122){const _0x2ef1f2=a111_0x1f2b,_0x3ea86e=Date[_0x2ef1f2(0x140)](),_0x58a1c1=a111_0x29b914[_0x2ef1f2(0x13f)](process[_0x2ef1f2(0x13d)](),_0x528122);try{logger[_0x2ef1f2(0x144)](_0x2ef1f2(0x141),_0x2ef1f2(0x151),{'projectCode':_0x528122}),await execa(resolveNpmBin('npx'),['prettier',_0x2ef1f2(0x150),'.'],{'cwd':_0x58a1c1});const _0x58927e=Date[_0x2ef1f2(0x140)]()-_0x3ea86e;logger[_0x2ef1f2(0x14e)](_0x2ef1f2(0x141),'代码格式化完成',_0x58927e,{'projectCode':_0x528122});}catch(_0x2accb6){const _0x12cb3f=Date[_0x2ef1f2(0x140)]()-_0x3ea86e;logger[_0x2ef1f2(0x145)](_0x2ef1f2(0x141),'代码格式化失败',{'projectCode':_0x528122,'error':_0x2accb6 instanceof Error?_0x2accb6[_0x2ef1f2(0x142)]:String(_0x2accb6),'duration':_0x12cb3f});throw _0x2accb6;}return formatElapsed(_0x3ea86e);}
1
+ (function(_0x3baee0,_0x21a004){const _0x3a3ba1=a111_0x1d35,_0x3cb749=_0x3baee0();while(!![]){try{const _0x167575=parseInt(_0x3a3ba1(0xd5))/0x1+parseInt(_0x3a3ba1(0xcf))/0x2*(parseInt(_0x3a3ba1(0xda))/0x3)+parseInt(_0x3a3ba1(0xd3))/0x4+parseInt(_0x3a3ba1(0xd6))/0x5+-parseInt(_0x3a3ba1(0xd9))/0x6+-parseInt(_0x3a3ba1(0xd4))/0x7+-parseInt(_0x3a3ba1(0xce))/0x8;if(_0x167575===_0x21a004)break;else _0x3cb749['push'](_0x3cb749['shift']());}catch(_0x1270ad){_0x3cb749['push'](_0x3cb749['shift']());}}}(a111_0x194c,0x5b6e8));import a111_0x3ffe2d from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a111_0x1d35(_0x511193,_0x116734){_0x511193=_0x511193-0xc9;const _0x194cec=a111_0x194c();let _0x1d35bb=_0x194cec[_0x511193];return _0x1d35bb;}function a111_0x194c(){const _0x2a7d7b=['now','info','success','10282456qrgECX','200206Issumw','resolve','开始格式化代码','message','353336UhXykH','656614hOntuo','460530IzSxGN','2716075dfvugU','代码格式化失败','代码格式化完成','235122bWECxA','21WhxzWe','npx','error','format','--write'];a111_0x194c=function(){return _0x2a7d7b;};return a111_0x194c();}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x499e63){const _0x766d0d=a111_0x1d35,_0x375049=Date[_0x766d0d(0xcb)](),_0x50862b=a111_0x3ffe2d[_0x766d0d(0xd0)](process['cwd'](),_0x499e63);try{logger[_0x766d0d(0xcc)](_0x766d0d(0xc9),_0x766d0d(0xd1),{'projectCode':_0x499e63}),await execa(resolveNpmBin(_0x766d0d(0xdb)),['prettier',_0x766d0d(0xca),'.'],{'cwd':_0x50862b});const _0x9ef60d=Date[_0x766d0d(0xcb)]()-_0x375049;logger[_0x766d0d(0xcd)]('format',_0x766d0d(0xd8),_0x9ef60d,{'projectCode':_0x499e63});}catch(_0x30717e){const _0x28a0ba=Date[_0x766d0d(0xcb)]()-_0x375049;logger[_0x766d0d(0xdc)](_0x766d0d(0xc9),_0x766d0d(0xd7),{'projectCode':_0x499e63,'error':_0x30717e instanceof Error?_0x30717e[_0x766d0d(0xd2)]:String(_0x30717e),'duration':_0x28a0ba});throw _0x30717e;}return formatElapsed(_0x375049);}
@@ -1 +1 @@
1
- function a112_0x4b0c(){const _0x3ef9be=['1877442TUCpmY','now','resolve','2521780MNisSj','4CHVRWK','info','message','23538AoCBHg','error','--registry','20BundMt','1849383tzNotV','1972752NZuIxZ','777Eueqio','https://registry.npmmirror.com','install','npm','448362VNqAnN','cwd','660064clSEpm'];a112_0x4b0c=function(){return _0x3ef9be;};return a112_0x4b0c();}(function(_0x594b32,_0x52c6ed){const _0x52f8d5=a112_0x13e9,_0x549708=_0x594b32();while(!![]){try{const _0x4d2e90=-parseInt(_0x52f8d5(0x1bb))/0x1+-parseInt(_0x52f8d5(0x1b9))/0x2+parseInt(_0x52f8d5(0x1bc))/0x3*(parseInt(_0x52f8d5(0x1c0))/0x4)+-parseInt(_0x52f8d5(0x1bf))/0x5+-parseInt(_0x52f8d5(0x1c3))/0x6*(-parseInt(_0x52f8d5(0x1c9))/0x7)+parseInt(_0x52f8d5(0x1c8))/0x8+-parseInt(_0x52f8d5(0x1c7))/0x9*(-parseInt(_0x52f8d5(0x1c6))/0xa);if(_0x4d2e90===_0x52c6ed)break;else _0x549708['push'](_0x549708['shift']());}catch(_0x3b58fe){_0x549708['push'](_0x549708['shift']());}}}(a112_0x4b0c,0x509fa));import a112_0xcd78f6 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a112_0x13e9(_0x332608,_0x339512){_0x332608=_0x332608-0x1b9;const _0x4b0c6e=a112_0x4b0c();let _0x13e959=_0x4b0c6e[_0x332608];return _0x13e959;}import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x3e3ed9){const _0x2105db=a112_0x13e9,_0x14d8a0=Date[_0x2105db(0x1bd)](),_0x2bdc59=a112_0xcd78f6[_0x2105db(0x1be)](process[_0x2105db(0x1ba)](),_0x3e3ed9);try{logger[_0x2105db(0x1c1)]('install','开始安装依赖',{'projectCode':_0x3e3ed9,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin(_0x2105db(0x1cc)),[_0x2105db(0x1cb),_0x2105db(0x1c5),_0x2105db(0x1ca)],{'cwd':_0x2bdc59});const _0x2fba31=Date['now']()-_0x14d8a0;logger['success'](_0x2105db(0x1cb),'依赖安装完成',_0x2fba31,{'projectCode':_0x3e3ed9});}catch(_0x43fa0b){const _0x2e89e7=Date[_0x2105db(0x1bd)]()-_0x14d8a0;logger[_0x2105db(0x1c4)]('install','依赖安装失败',{'projectCode':_0x3e3ed9,'error':_0x43fa0b instanceof Error?_0x43fa0b[_0x2105db(0x1c2)]:String(_0x43fa0b),'duration':_0x2e89e7});throw _0x43fa0b;}return formatElapsed(_0x14d8a0);}
1
+ (function(_0x3f55c8,_0x15bd6b){const _0x516da1=a112_0x4b4e,_0x4a555f=_0x3f55c8();while(!![]){try{const _0x1842b7=parseInt(_0x516da1(0x7c))/0x1*(-parseInt(_0x516da1(0x7a))/0x2)+parseInt(_0x516da1(0x85))/0x3*(-parseInt(_0x516da1(0x81))/0x4)+parseInt(_0x516da1(0x89))/0x5*(-parseInt(_0x516da1(0x7e))/0x6)+-parseInt(_0x516da1(0x88))/0x7*(parseInt(_0x516da1(0x7f))/0x8)+parseInt(_0x516da1(0x8c))/0x9+-parseInt(_0x516da1(0x8e))/0xa+parseInt(_0x516da1(0x83))/0xb*(parseInt(_0x516da1(0x7b))/0xc);if(_0x1842b7===_0x15bd6b)break;else _0x4a555f['push'](_0x4a555f['shift']());}catch(_0x4a203d){_0x4a555f['push'](_0x4a555f['shift']());}}}(a112_0x3776,0xbd18a));import a112_0x11df2a from'node:path';import{execa}from'execa';function a112_0x3776(){const _0x16e1be=['823REbuAC','npm','42YHfvBN','2400056bAOGhb','install','24zRDyCS','message','37538457yZKAmE','开始安装依赖','239730sJJvFW','https://registry.npmmirror.com','success','7XzChaY','737785iUDQJT','now','info','2599569tfNRvP','--registry','4651770ZQJwaU','error','依赖安装失败','依赖安装完成','1578WFiEZo','12FbWdfu'];a112_0x3776=function(){return _0x16e1be;};return a112_0x3776();}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';function a112_0x4b4e(_0x3626dc,_0x25ed26){_0x3626dc=_0x3626dc-0x77;const _0x3776df=a112_0x3776();let _0x4b4e43=_0x3776df[_0x3626dc];return _0x4b4e43;}export async function installDependencies(_0x10a29a){const _0x1bc779=a112_0x4b4e,_0x1568bb=Date[_0x1bc779(0x8a)](),_0x3b99db=a112_0x11df2a['resolve'](process['cwd'](),_0x10a29a);try{logger[_0x1bc779(0x8b)](_0x1bc779(0x80),_0x1bc779(0x84),{'projectCode':_0x10a29a,'registry':_0x1bc779(0x86)}),await execa(resolveNpmBin(_0x1bc779(0x7d)),[_0x1bc779(0x80),_0x1bc779(0x8d),_0x1bc779(0x86)],{'cwd':_0x3b99db});const _0x3bd69c=Date[_0x1bc779(0x8a)]()-_0x1568bb;logger[_0x1bc779(0x87)]('install',_0x1bc779(0x79),_0x3bd69c,{'projectCode':_0x10a29a});}catch(_0x34cd7d){const _0xb88a15=Date[_0x1bc779(0x8a)]()-_0x1568bb;logger[_0x1bc779(0x77)](_0x1bc779(0x80),_0x1bc779(0x78),{'projectCode':_0x10a29a,'error':_0x34cd7d instanceof Error?_0x34cd7d[_0x1bc779(0x82)]:String(_0x34cd7d),'duration':_0xb88a15});throw _0x34cd7d;}return formatElapsed(_0x1568bb);}
@@ -1 +1 @@
1
- const a113_0x352873=a113_0x1387;function a113_0x476d(){const _0x4f2036=['Skip\x20confirmation\x20prompt','cookie','appcode','966977LCEWpP','nonInteractive','Project\x20name','bool','10QGEyEa','project','350119VoiYca','Auto-confirm\x20prompts','39AoiIqo','../../commands/project/create/main.js','name','string','create','350CcSghx','project-name','args','validation','yes','1787094FbqBwF','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','trim','4276hjmSCL','init','1348770yJRWuC','boolean','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','187lnqPZP','Target\x20environment','../../commands/project/create/non-interactive.js','Create\x20a\x20new\x20project','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','5Ltejar','App\x20code\x20to\x20initialize','1824664aNOHth','env','str','Initialize\x20.rabetbase.json\x20config\x20in\x20existing\x20project','upgrade','write'];a113_0x476d=function(){return _0x4f2036;};return a113_0x476d();}(function(_0x574162,_0x16f239){const _0x5abc00=a113_0x1387,_0x59d109=_0x574162();while(!![]){try{const _0x2375d0=-parseInt(_0x5abc00(0x1fc))/0x1*(parseInt(_0x5abc00(0x1ef))/0x2)+-parseInt(_0x5abc00(0x1ea))/0x3*(parseInt(_0x5abc00(0x1f7))/0x4)+parseInt(_0x5abc00(0x201))/0x5*(-parseInt(_0x5abc00(0x1f9))/0x6)+parseInt(_0x5abc00(0x1e8))/0x7+parseInt(_0x5abc00(0x203))/0x8+parseInt(_0x5abc00(0x1f4))/0x9+-parseInt(_0x5abc00(0x1e6))/0xa*(parseInt(_0x5abc00(0x1e2))/0xb);if(_0x2375d0===_0x16f239)break;else _0x59d109['push'](_0x59d109['shift']());}catch(_0x77ad80){_0x59d109['push'](_0x59d109['shift']());}}}(a113_0x476d,0x1ca5e));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':a113_0x352873(0x1ed),'description':a113_0x352873(0x202)},{'name':a113_0x352873(0x204),'type':a113_0x352873(0x1ed),'description':a113_0x352873(0x1fd)},{'name':a113_0x352873(0x1f3),'type':a113_0x352873(0x1fa),'description':a113_0x352873(0x1e9),'default':![]}],createFlags=[{'name':a113_0x352873(0x1ec),'type':'string','description':a113_0x352873(0x1e4)},{'name':a113_0x352873(0x204),'type':'string','description':'Target\x20environment'},{'name':a113_0x352873(0x1e1),'type':a113_0x352873(0x1ed),'description':a113_0x352873(0x200)}],upgradeFlags=[{'name':'yes','type':a113_0x352873(0x1fa),'description':a113_0x352873(0x209),'default':![]}];function a113_0x1387(_0x42db3b,_0x374a3e){_0x42db3b=_0x42db3b-0x1e1;const _0x476d42=a113_0x476d();let _0x1387bf=_0x476d42[_0x42db3b];return _0x1387bf;}export const projectDefinitions=[{'service':a113_0x352873(0x1e7),'command':a113_0x352873(0x1f8),'description':a113_0x352873(0x206),'risk':a113_0x352873(0x208),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x326d2){const _0x2c5e9f=a113_0x352873;return await initConfig({'appcode':_0x326d2['str'](_0x2c5e9f(0x1e1))||undefined,'env':_0x326d2[_0x2c5e9f(0x205)]('env')||undefined,'autoYes':_0x326d2[_0x2c5e9f(0x1e5)]('yes')}),{'ok':!![]};}},{'service':'project','command':a113_0x352873(0x1ee),'description':a113_0x352873(0x1ff),'risk':a113_0x352873(0x208),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a113_0x352873(0x1f0),'description':a113_0x352873(0x1fb),'required':![]}],'flags':createFlags,async 'execute'(_0x50b8d5){const _0x4bbb00=a113_0x352873,{createApp:_0x3c0689}=await import(_0x4bbb00(0x1eb)),{createProjectNonInteractive:_0x3601a1}=await import(_0x4bbb00(0x1fe)),_0x97f508=_0x50b8d5[_0x4bbb00(0x205)](_0x4bbb00(0x1ec))[_0x4bbb00(0x1f6)]()||_0x50b8d5[_0x4bbb00(0x1f1)][0x0]?.[_0x4bbb00(0x1f6)](),_0x48e342=_0x50b8d5[_0x4bbb00(0x205)](_0x4bbb00(0x204))||undefined,_0x46fe6d=_0x50b8d5['str'](_0x4bbb00(0x1e1))||undefined;if(_0x50b8d5[_0x4bbb00(0x1e3)]){if(!_0x97f508)throw CliErrors[_0x4bbb00(0x1f2)](_0x4bbb00(0x1f5),'Usage:\x20'+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x3601a1(_0x97f508,_0x48e342,_0x46fe6d,_0x50b8d5[_0x4bbb00(0x20a)]);}else await _0x3c0689({'projectCode':_0x97f508,'appCode':_0x46fe6d,'env':_0x48e342,'cookie':_0x50b8d5[_0x4bbb00(0x20a)]});return{'ok':!![]};}},{'service':a113_0x352873(0x1e7),'command':a113_0x352873(0x207),'description':'Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x3e124b){const _0x2d9bfd=a113_0x352873;return await upgradeApp(_0x3e124b[_0x2d9bfd(0x1e3)],{'yes':_0x3e124b[_0x2d9bfd(0x1e5)]('yes')}),{'ok':!![]};}}];
1
+ const a113_0x451115=a113_0x1528;(function(_0x39d5c4,_0x1c4e25){const _0x579887=a113_0x1528,_0xac06f7=_0x39d5c4();while(!![]){try{const _0x4c006b=parseInt(_0x579887(0xd8))/0x1+-parseInt(_0x579887(0xf3))/0x2+parseInt(_0x579887(0xf0))/0x3+-parseInt(_0x579887(0xe1))/0x4+parseInt(_0x579887(0xec))/0x5+parseInt(_0x579887(0xde))/0x6+parseInt(_0x579887(0xdf))/0x7*(-parseInt(_0x579887(0xd9))/0x8);if(_0x4c006b===_0x1c4e25)break;else _0xac06f7['push'](_0xac06f7['shift']());}catch(_0x446126){_0xac06f7['push'](_0xac06f7['shift']());}}}(a113_0x1d99,0x71108));function a113_0x1528(_0x1269dd,_0x2c86c4){_0x1269dd=_0x1269dd-0xd7;const _0x1d9968=a113_0x1d99();let _0x152861=_0x1d9968[_0x1269dd];return _0x152861;}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';function a113_0x1d99(){const _0x276128=['Create\x20a\x20new\x20project','Target\x20environment','Auto-confirm\x20prompts','name','validation','2391545srNrXZ','appcode','Non-interactive\x20mode\x20requires\x20a\x20project\x20name.','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','1295157KbPxpL','args','string','819018qLQCZn','upgrade','str','yes','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','App\x20code\x20to\x20initialize','project','508424HQCigW','8yTiTde','cookie','write','../../commands/project/create/main.js','nonInteractive','5427462ysDysm','6187559KYMwJN','Initialize\x20.rabetbase.json\x20config\x20in\x20existing\x20project','2265884OYXgiv','boolean','env','trim','Skip\x20confirmation\x20prompt','init'];a113_0x1d99=function(){return _0x276128;};return a113_0x1d99();}const initFlags=[{'name':a113_0x451115(0xed),'type':a113_0x451115(0xf2),'description':a113_0x451115(0xf8)},{'name':a113_0x451115(0xe3),'type':a113_0x451115(0xf2),'description':a113_0x451115(0xe8)},{'name':'yes','type':a113_0x451115(0xe2),'description':a113_0x451115(0xe9),'default':![]}],createFlags=[{'name':a113_0x451115(0xea),'type':a113_0x451115(0xf2),'description':'Project\x20name'},{'name':'env','type':a113_0x451115(0xf2),'description':a113_0x451115(0xe8)},{'name':'appcode','type':'string','description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'}],upgradeFlags=[{'name':a113_0x451115(0xf6),'type':'boolean','description':a113_0x451115(0xe5),'default':![]}];export const projectDefinitions=[{'service':a113_0x451115(0xd7),'command':a113_0x451115(0xe6),'description':a113_0x451115(0xe0),'risk':a113_0x451115(0xdb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x4158d9){const _0x414d8f=a113_0x451115;return await initConfig({'appcode':_0x4158d9[_0x414d8f(0xf5)]('appcode')||undefined,'env':_0x4158d9[_0x414d8f(0xf5)]('env')||undefined,'autoYes':_0x4158d9['bool'](_0x414d8f(0xf6))}),{'ok':!![]};}},{'service':a113_0x451115(0xd7),'command':'create','description':a113_0x451115(0xe7),'risk':a113_0x451115(0xdb),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'project-name','description':a113_0x451115(0xf7),'required':![]}],'flags':createFlags,async 'execute'(_0x49a046){const _0x32c30d=a113_0x451115,{createApp:_0x11c3d1}=await import(_0x32c30d(0xdc)),{createProjectNonInteractive:_0x575150}=await import('../../commands/project/create/non-interactive.js'),_0x136e33=_0x49a046[_0x32c30d(0xf5)](_0x32c30d(0xea))[_0x32c30d(0xe4)]()||_0x49a046[_0x32c30d(0xf1)][0x0]?.[_0x32c30d(0xe4)](),_0x497fbd=_0x49a046[_0x32c30d(0xf5)]('env')||undefined,_0x22bc30=_0x49a046[_0x32c30d(0xf5)](_0x32c30d(0xed))||undefined;if(_0x49a046[_0x32c30d(0xdd)]){if(!_0x136e33)throw CliErrors[_0x32c30d(0xeb)](_0x32c30d(0xee),'Usage:\x20'+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x575150(_0x136e33,_0x497fbd,_0x22bc30,_0x49a046[_0x32c30d(0xda)]);}else await _0x11c3d1({'projectCode':_0x136e33,'appCode':_0x22bc30,'env':_0x497fbd,'cookie':_0x49a046[_0x32c30d(0xda)]});return{'ok':!![]};}},{'service':'project','command':a113_0x451115(0xf4),'description':a113_0x451115(0xef),'risk':a113_0x451115(0xdb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x4e3f92){const _0xe9cc8f=a113_0x451115;return await upgradeApp(_0x4e3f92[_0xe9cc8f(0xdd)],{'yes':_0x4e3f92['bool'](_0xe9cc8f(0xf6))}),{'ok':!![]};}}];
@@ -1 +1 @@
1
- (function(_0x480f3e,_0x4947e6){const _0xe32cd3=a114_0x401e,_0x3310b3=_0x480f3e();while(!![]){try{const _0x24e40e=-parseInt(_0xe32cd3(0x7a))/0x1*(-parseInt(_0xe32cd3(0x83))/0x2)+parseInt(_0xe32cd3(0x95))/0x3+parseInt(_0xe32cd3(0x73))/0x4+-parseInt(_0xe32cd3(0x6f))/0x5+-parseInt(_0xe32cd3(0x6c))/0x6+parseInt(_0xe32cd3(0x8e))/0x7+-parseInt(_0xe32cd3(0x74))/0x8;if(_0x24e40e===_0x4947e6)break;else _0x3310b3['push'](_0x3310b3['shift']());}catch(_0x284ed1){_0x3310b3['push'](_0x3310b3['shift']());}}}(a114_0x2517,0x1cd90));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';function a114_0x401e(_0x54e99f,_0x5cf3ca){_0x54e99f=_0x54e99f-0x68;const _0x251765=a114_0x2517();let _0x401e82=_0x251765[_0x54e99f];return _0x401e82;}import a114_0x2eefa3 from'chalk';function a114_0x2517(){const _0x4e7962=['gray','?\x20(Old\x20file\x20→\x20*.bak)','.bak','version','290689MamhdZ','env','bold','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','init','Please\x20enter\x20App\x20Code:','yellow','681132rsoMen','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','app','\x20api\x20pull\x27','Upgrade\x20it\x20to\x20','join','defaultApp','197304MxrRWr','log','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','713995OFnlzb','cyan','toLocaleString','Invalid\x20App\x20Code','837648TZTnxE','1656608wvOdln','Migration\x20cancelled.\x20Run\x20`','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','green','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','apps','22936ztmtNe','appcode','\x20\x20Apps:\x20','\x20→\x20.rabetbase.json','初始化项目配置文件成功','string','keys','trim','production','2XDzluZ','1.0.0','\x20project\x20init`\x20to\x20start\x20fresh.','从旧配置文件升级成功','info','\x20\x20Default:\x20','App\x20Code\x20cannot\x20be\x20empty'];a114_0x2517=function(){return _0x4e7962;};return a114_0x2517();}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(_0x6b20c8){const _0x28b052=a114_0x401e,{appcode:_0x22a972,env:_0x32c866,autoYes:_0x2e9d1e}=_0x6b20c8,_0x15912a=process['cwd']();if(getProjectConfigPath())throw new Error(_0x28b052(0x6e));let _0x557250;for(const _0x434b07 of LEGACY_CONFIG_NAMES){const _0xdfd0=resolve(_0x15912a,_0x434b07);if(existsSync(_0xdfd0)){_0x557250=_0xdfd0;break;}}if(_0x557250){let _0x46b372={};try{_0x46b372=JSON['parse'](readFileSync(_0x557250,'utf8'));}catch{}const _0x4d0857=basename(_0x557250),_0x2442e5=_0x46b372?.['appcode']||_0x46b372?.[_0x28b052(0x97)];let _0x1ec3cb=_0x2e9d1e;!_0x2e9d1e&&(console[_0x28b052(0x6d)](a114_0x2eefa3[_0x28b052(0x94)](_0x28b052(0x78)+a114_0x2eefa3[_0x28b052(0x90)](_0x4d0857))),_0x2442e5&&console[_0x28b052(0x6d)](a114_0x2eefa3[_0x28b052(0x70)]('\x20\x20appcode:\x20'+_0x2442e5)),_0x1ec3cb=await confirm({'message':_0x28b052(0x69)+a114_0x2eefa3[_0x28b052(0x90)]('.rabetbase.json')+_0x28b052(0x8b),'default':!![]}));if(!_0x1ec3cb){console['log'](_0x28b052(0x75)+CLI_BIN_NAME+_0x28b052(0x85));return;}const _0x7b7d8e=resolve(_0x15912a,NEW_CONFIG_NAME),_0x522cd9=getCliVersionFromPkg(),_0x169f3b=readRawConfig(),_0x3ae170=_0x22a972||(typeof _0x46b372?.['appcode']===_0x28b052(0x7f)?_0x46b372[_0x28b052(0x7b)]:undefined)||(typeof _0x46b372?.['app']===_0x28b052(0x7f)?_0x46b372[_0x28b052(0x97)]:undefined)||await askAppcode(),_0x9815af=typeof _0x46b372?.[_0x28b052(0x8f)]===_0x28b052(0x7f)?_0x46b372['env']:typeof _0x169f3b[_0x28b052(0x8f)]===_0x28b052(0x7f)?_0x169f3b[_0x28b052(0x8f)]:_0x28b052(0x82),_0x388bc2=buildCanonicalProjectConfig({..._0x169f3b,..._0x46b372},{'appCodes':[_0x3ae170],'env':_0x9815af,'metadata':{'version':_0x522cd9,'migratedAt':new Date()[_0x28b052(0x71)](),'migratedFrom':_0x557250}});writeConfigFile(_0x7b7d8e,_0x388bc2);const _0xfba0e3=_0x557250+_0x28b052(0x8c);renameSync(_0x557250,_0xfba0e3),logger['setLogPath'](_0x15912a),logger[_0x28b052(0x87)](_0x28b052(0x92),_0x28b052(0x86),{'from':_0x557250,'to':_0x7b7d8e,'appcode':_0x3ae170,'env':_0x388bc2[_0x28b052(0x8f)]}),console[_0x28b052(0x6d)](a114_0x2eefa3[_0x28b052(0x77)]('✓\x20Upgraded\x20'+_0x4d0857+_0x28b052(0x7d))),console[_0x28b052(0x6d)](a114_0x2eefa3[_0x28b052(0x70)](_0x28b052(0x7c)+Object['keys'](_0x388bc2[_0x28b052(0x79)]||{})[_0x28b052(0x6a)](',\x20'))),console[_0x28b052(0x6d)](a114_0x2eefa3[_0x28b052(0x70)](_0x28b052(0x88)+_0x388bc2[_0x28b052(0x6b)])),console[_0x28b052(0x6d)](a114_0x2eefa3[_0x28b052(0x8a)](_0x28b052(0x91)+_0x4d0857+_0x28b052(0x8c)));return;}const _0x4b2381=_0x22a972||await askAppcode(),_0x118789=resolve(_0x15912a,NEW_CONFIG_NAME),_0x2fb358=getCliVersionFromPkg(),_0x237e3c=readRawConfig(),_0x5976c0=typeof _0x237e3c[_0x28b052(0x8f)]===_0x28b052(0x7f)?_0x237e3c['env']:undefined,_0xf8b025=buildCanonicalProjectConfig({},{'appCodes':[_0x4b2381],'env':_0x32c866||_0x5976c0||_0x28b052(0x82),'metadata':{'version':_0x2fb358,'createdAt':new Date()[_0x28b052(0x71)]()}});writeConfigFile(_0x118789,_0xf8b025),logger['setLogPath'](_0x15912a),logger['info'](_0x28b052(0x92),_0x28b052(0x7e),{'appcode':_0x4b2381,'env':_0xf8b025[_0x28b052(0x8f)],'version':_0xf8b025[_0x28b052(0x8d)],'configPath':_0x118789}),console[_0x28b052(0x6d)](a114_0x2eefa3['green'](_0x28b052(0x76))),console['log'](a114_0x2eefa3[_0x28b052(0x70)]('\x20\x20Apps:\x20'+Object[_0x28b052(0x80)](_0xf8b025[_0x28b052(0x79)]||{})['join'](',\x20'))),console[_0x28b052(0x6d)](a114_0x2eefa3[_0x28b052(0x70)](_0x28b052(0x88)+_0xf8b025['defaultApp'])),console[_0x28b052(0x6d)](_0x28b052(0x96)+CLI_BIN_NAME+'\x20api\x20generate\x27\x20and\x20\x27'+CLI_BIN_NAME+_0x28b052(0x68));}function askAppcode(){const _0x4097c7=a114_0x401e;return input({'message':_0x4097c7(0x93),'validate':_0x44c4c7=>{const _0x109c62=_0x4097c7;if(!_0x44c4c7[_0x109c62(0x81)]())return _0x109c62(0x89);const {valid:_0x1adc77,message:_0x474213}=validateAppcode(_0x44c4c7[_0x109c62(0x81)]());return _0x1adc77||_0x474213||_0x109c62(0x72);}});}function getCliVersionFromPkg(){const _0x2519ab=a114_0x401e;try{const _0x2e590c=fileURLToPath(import.meta.url),_0xf9b77e=resolve(dirname(_0x2e590c),'../..'),_0x51ab48=JSON['parse'](readFileSync(resolve(_0xf9b77e,'package.json'),'utf8'));return _0x51ab48[_0x2519ab(0x8d)]||_0x2519ab(0x84);}catch{return _0x2519ab(0x84);}}
1
+ (function(_0x132bc5,_0x5808a1){const _0x4b5849=a114_0xe044,_0x3d2678=_0x132bc5();while(!![]){try{const _0x1b420b=parseInt(_0x4b5849(0x170))/0x1+-parseInt(_0x4b5849(0x16d))/0x2+parseInt(_0x4b5849(0x187))/0x3*(-parseInt(_0x4b5849(0x186))/0x4)+parseInt(_0x4b5849(0x176))/0x5+-parseInt(_0x4b5849(0x165))/0x6+parseInt(_0x4b5849(0x18e))/0x7*(parseInt(_0x4b5849(0x17d))/0x8)+-parseInt(_0x4b5849(0x190))/0x9*(parseInt(_0x4b5849(0x169))/0xa);if(_0x1b420b===_0x5808a1)break;else _0x3d2678['push'](_0x3d2678['shift']());}catch(_0x4fcbff){_0x3d2678['push'](_0x3d2678['shift']());}}}(a114_0x5de5,0x47bae));function a114_0x5de5(){const _0x53c0f5=['499671mhjUwF','setLogPath','production','1.0.0','defaultApp','Please\x20enter\x20App\x20Code:','1775676JhMOAC','yellow','app','string','80nTfCmT','\x20\x20appcode:\x20','info','App\x20Code\x20cannot\x20be\x20empty','130188CSKThP','version','trim','197960jbiweZ','utf8','toLocaleString','apps','.bak','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','2624710eHdINU','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','init','env','../..','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','green','224FlqEce','log','appcode','parse','✓\x20Upgraded\x20','gray','?\x20(Old\x20file\x20→\x20*.bak)','cyan','bold','8aOvbKr','304836kFmHwG','Invalid\x20App\x20Code','\x20project\x20init`\x20to\x20start\x20fresh.','cwd','Migration\x20cancelled.\x20Run\x20`','初始化项目配置文件成功','join','144830NngmIc','keys'];a114_0x5de5=function(){return _0x53c0f5;};return a114_0x5de5();}import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a114_0xe00102 from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';function a114_0xe044(_0x4c0f95,_0xd4db3){_0x4c0f95=_0x4c0f95-0x160;const _0x5de54a=a114_0x5de5();let _0xe0449c=_0x5de54a[_0x4c0f95];return _0xe0449c;}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(_0x28d819){const _0x33203a=a114_0xe044,{appcode:_0x55b03b,env:_0x31b3e1,autoYes:_0x4c08e5}=_0x28d819,_0x35f31a=process[_0x33203a(0x18a)]();if(getProjectConfigPath())throw new Error(_0x33203a(0x17b));let _0x3f907a;for(const _0x5ca435 of LEGACY_CONFIG_NAMES){const _0x324645=resolve(_0x35f31a,_0x5ca435);if(existsSync(_0x324645)){_0x3f907a=_0x324645;break;}}if(_0x3f907a){let _0x4c2410={};try{_0x4c2410=JSON[_0x33203a(0x180)](readFileSync(_0x3f907a,_0x33203a(0x171)));}catch{}const _0x125177=basename(_0x3f907a),_0x265bc7=_0x4c2410?.[_0x33203a(0x17f)]||_0x4c2410?.['app'];let _0x1d2303=_0x4c08e5;!_0x4c08e5&&(console[_0x33203a(0x17e)](a114_0xe00102[_0x33203a(0x166)]('⚠\x20Found\x20legacy\x20configuration\x20file:\x20'+a114_0xe00102[_0x33203a(0x185)](_0x125177))),_0x265bc7&&console['log'](a114_0xe00102[_0x33203a(0x184)](_0x33203a(0x16a)+_0x265bc7)),_0x1d2303=await confirm({'message':'Upgrade\x20it\x20to\x20'+a114_0xe00102[_0x33203a(0x185)]('.rabetbase.json')+_0x33203a(0x183),'default':!![]}));if(!_0x1d2303){console['log'](_0x33203a(0x18b)+CLI_BIN_NAME+_0x33203a(0x189));return;}const _0x1ed9f7=resolve(_0x35f31a,NEW_CONFIG_NAME),_0x32c8ec=getCliVersionFromPkg(),_0x381908=readRawConfig(),_0x5bb9e1=_0x55b03b||(typeof _0x4c2410?.['appcode']===_0x33203a(0x168)?_0x4c2410[_0x33203a(0x17f)]:undefined)||(typeof _0x4c2410?.[_0x33203a(0x167)]===_0x33203a(0x168)?_0x4c2410[_0x33203a(0x167)]:undefined)||await askAppcode(),_0x585f66=typeof _0x4c2410?.['env']===_0x33203a(0x168)?_0x4c2410[_0x33203a(0x179)]:typeof _0x381908[_0x33203a(0x179)]===_0x33203a(0x168)?_0x381908[_0x33203a(0x179)]:_0x33203a(0x161),_0x36c5f5=buildCanonicalProjectConfig({..._0x381908,..._0x4c2410},{'appCodes':[_0x5bb9e1],'env':_0x585f66,'metadata':{'version':_0x32c8ec,'migratedAt':new Date()['toLocaleString'](),'migratedFrom':_0x3f907a}});writeConfigFile(_0x1ed9f7,_0x36c5f5);const _0x4b673c=_0x3f907a+_0x33203a(0x174);renameSync(_0x3f907a,_0x4b673c),logger['setLogPath'](_0x35f31a),logger[_0x33203a(0x16b)](_0x33203a(0x178),'从旧配置文件升级成功',{'from':_0x3f907a,'to':_0x1ed9f7,'appcode':_0x5bb9e1,'env':_0x36c5f5[_0x33203a(0x179)]}),console[_0x33203a(0x17e)](a114_0xe00102['green'](_0x33203a(0x181)+_0x125177+'\x20→\x20.rabetbase.json')),console[_0x33203a(0x17e)](a114_0xe00102['cyan']('\x20\x20Apps:\x20'+Object['keys'](_0x36c5f5[_0x33203a(0x173)]||{})[_0x33203a(0x18d)](',\x20'))),console['log'](a114_0xe00102[_0x33203a(0x184)]('\x20\x20Default:\x20'+_0x36c5f5[_0x33203a(0x163)])),console['log'](a114_0xe00102[_0x33203a(0x182)](_0x33203a(0x175)+_0x125177+_0x33203a(0x174)));return;}const _0x43ceec=_0x55b03b||await askAppcode(),_0x2f325a=resolve(_0x35f31a,NEW_CONFIG_NAME),_0x4b32cc=getCliVersionFromPkg(),_0x2b5c6e=readRawConfig(),_0x132192=typeof _0x2b5c6e[_0x33203a(0x179)]===_0x33203a(0x168)?_0x2b5c6e['env']:undefined,_0x49144d=buildCanonicalProjectConfig({},{'appCodes':[_0x43ceec],'env':_0x31b3e1||_0x132192||'production','metadata':{'version':_0x4b32cc,'createdAt':new Date()[_0x33203a(0x172)]()}});writeConfigFile(_0x2f325a,_0x49144d),logger[_0x33203a(0x160)](_0x35f31a),logger['info'](_0x33203a(0x178),_0x33203a(0x18c),{'appcode':_0x43ceec,'env':_0x49144d['env'],'version':_0x49144d[_0x33203a(0x16e)],'configPath':_0x2f325a}),console[_0x33203a(0x17e)](a114_0xe00102[_0x33203a(0x17c)](_0x33203a(0x177))),console[_0x33203a(0x17e)](a114_0xe00102[_0x33203a(0x184)]('\x20\x20Apps:\x20'+Object[_0x33203a(0x18f)](_0x49144d[_0x33203a(0x173)]||{})[_0x33203a(0x18d)](',\x20'))),console[_0x33203a(0x17e)](a114_0xe00102[_0x33203a(0x184)]('\x20\x20Default:\x20'+_0x49144d[_0x33203a(0x163)])),console[_0x33203a(0x17e)]('\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27'+CLI_BIN_NAME+'\x20api\x20generate\x27\x20and\x20\x27'+CLI_BIN_NAME+'\x20api\x20pull\x27');}function askAppcode(){const _0x24b3d8=a114_0xe044;return input({'message':_0x24b3d8(0x164),'validate':_0x4d2d3d=>{const _0x29b20f=_0x24b3d8;if(!_0x4d2d3d[_0x29b20f(0x16f)]())return _0x29b20f(0x16c);const {valid:_0x404bf0,message:_0x4d744b}=validateAppcode(_0x4d2d3d[_0x29b20f(0x16f)]());return _0x404bf0||_0x4d744b||_0x29b20f(0x188);}});}function getCliVersionFromPkg(){const _0x39361f=a114_0xe044;try{const _0x72db46=fileURLToPath(import.meta.url),_0x3379e1=resolve(dirname(_0x72db46),_0x39361f(0x17a)),_0x45955d=JSON[_0x39361f(0x180)](readFileSync(resolve(_0x3379e1,'package.json'),'utf8'));return _0x45955d[_0x39361f(0x16e)]||'1.0.0';}catch{return _0x39361f(0x162);}}
@@ -1 +1 @@
1
- (function(_0x3664b1,_0x13e800){const _0x55c5ab=a115_0x180b,_0x5aea33=_0x3664b1();while(!![]){try{const _0x5b53e8=-parseInt(_0x55c5ab(0x155))/0x1+-parseInt(_0x55c5ab(0x13f))/0x2+-parseInt(_0x55c5ab(0x183))/0x3+-parseInt(_0x55c5ab(0x149))/0x4+-parseInt(_0x55c5ab(0x150))/0x5*(-parseInt(_0x55c5ab(0x171))/0x6)+-parseInt(_0x55c5ab(0x142))/0x7*(parseInt(_0x55c5ab(0x160))/0x8)+parseInt(_0x55c5ab(0x152))/0x9;if(_0x5b53e8===_0x13e800)break;else _0x5aea33['push'](_0x5aea33['shift']());}catch(_0x4cf446){_0x5aea33['push'](_0x5aea33['shift']());}}}(a115_0x4d90,0x211e8));import a115_0x107f49 from'chalk';import a115_0x3f3f7a from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0x2fbb73=>_0x2fbb73!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x11d8cd){const _0x7c9746=a115_0x180b,_0x183454=[];for(const _0x537dad of Object[_0x7c9746(0x167)](CORE_IDE_CONFIGS)){if(_0x537dad[_0x7c9746(0x144)])for(const _0x1b595f of _0x537dad[_0x7c9746(0x144)]){_0x183454[_0x7c9746(0x11f)](resolve(_0x11d8cd,_0x1b595f[_0x7c9746(0x143)]));}}return _0x183454;}function analyse(_0x3dc1be){const _0x38c142=a115_0x180b;let _0x170a18=null;const _0x4318b7=resolve(_0x3dc1be,NEW_CONFIG_NAME),_0x432868=existsSync(_0x4318b7);for(const _0x136fb7 of LEGACY_CONFIG_NAMES){const _0x4f0035=resolve(_0x3dc1be,_0x136fb7);if(existsSync(_0x4f0035)){const _0x53d257=readConfigFile(_0x4f0035),_0x3f9e59=Object[_0x38c142(0x173)](_0x53d257)[_0x38c142(0x10a)](_0x45ec9f=>typeof _0x53d257[_0x45ec9f]!==_0x38c142(0x15b));_0x170a18={'oldPath':_0x4f0035,'hasNewConfig':_0x432868,'fields':_0x3f9e59};break;}}const _0x3aa068=[],_0x156e80=resolve(_0x3dc1be,'.lovrabet');if(existsSync(_0x156e80))_0x3aa068[_0x38c142(0x11f)](_0x156e80);const _0x4179cd=resolve(_0x3dc1be,_0x38c142(0x15d));if(existsSync(_0x4179cd))_0x3aa068[_0x38c142(0x11f)](_0x4179cd);const _0x2d6fca=resolve(_0x3dc1be,_0x38c142(0x15c));if(existsSync(_0x2d6fca))_0x3aa068[_0x38c142(0x11f)](_0x2d6fca);for(const _0x16dd88 of collectIdeSkillFiles(_0x3dc1be)){if(existsSync(_0x16dd88))_0x3aa068[_0x38c142(0x11f)](_0x16dd88);}let _0xcf8845=null;const _0x3d93f9=resolve(_0x3dc1be,_0x38c142(0x176));if(existsSync(_0x3d93f9))try{const _0x24363b=JSON['parse'](readFileSync(_0x3d93f9,_0x38c142(0x106)));if(_0x24363b?.[_0x38c142(0x13c)]&&typeof _0x24363b['mcpServers']==='object'){const _0x518050=[];for(const [_0x434bad,_0x45a404]of Object['entries'](_0x24363b[_0x38c142(0x13c)])){const _0x246dc4=_0x45a404;_0x246dc4?.[_0x38c142(0x10e)]&&Array[_0x38c142(0x139)](_0x246dc4[_0x38c142(0x10e)])&&_0x246dc4['args']['some'](_0x36ccac=>typeof _0x36ccac===_0x38c142(0x125)&&_0x36ccac[_0x38c142(0x124)](_0x38c142(0x140)))&&_0x518050[_0x38c142(0x11f)](_0x434bad);}_0x518050[_0x38c142(0x12f)]>0x0&&(_0xcf8845={'path':_0x3d93f9,'keys':_0x518050});}}catch{}const _0x4a12fe=_0x3aa068[_0x38c142(0x12f)]>0x0||_0x170a18!==null;let _0x1ed386=null;const _0x57cb0a=resolve(_0x3dc1be,_0x38c142(0x11b));if(existsSync(_0x57cb0a))try{const _0x2a1429=JSON['parse'](readFileSync(_0x57cb0a,_0x38c142(0x106)));for(const _0xb51606 of[_0x38c142(0x14e),_0x38c142(0x129)]){const _0x1a43f9=_0x2a1429?.[_0xb51606]?.['@lovrabet/sdk'];if(typeof _0x1a43f9==='string'){_0x1a43f9!==_0x38c142(0x180)&&(_0x1ed386={'pkgPath':_0x57cb0a,'currentVersion':_0x1a43f9,'field':_0xb51606});break;}}}catch{}return{'configMigration':_0x170a18,'oldArtifacts':_0x3aa068,'oldMcpConfig':_0xcf8845,'needsSkillSwap':_0x4a12fe,'sdkUpgrade':_0x1ed386};}function printReport(_0x16a2b3){const _0x480da0=a115_0x180b,{configMigration:_0x1cc93b,oldArtifacts:_0x181723,oldMcpConfig:_0x28f99a,needsSkillSwap:_0x379a6d}=_0x16a2b3;console[_0x480da0(0x14a)](''),console[_0x480da0(0x14a)](a115_0x107f49[_0x480da0(0x137)](_0x480da0(0x10f))),console['log']('');_0x1cc93b?(console[_0x480da0(0x14a)](a115_0x107f49[_0x480da0(0x16a)]('Config\x20file:')+('\x20\x20'+a115_0x107f49['yellow'](_0x1cc93b['oldPath']))),console[_0x480da0(0x14a)](_0x480da0(0x107)+(_0x1cc93b[_0x480da0(0x182)]?a115_0x107f49[_0x480da0(0x172)](_0x480da0(0x12d)):a115_0x107f49['gray'](_0x480da0(0x17e)))),console['log'](_0x480da0(0x141)+_0x1cc93b['fields']['join'](',\x20')),console[_0x480da0(0x14a)](_0x480da0(0x15e))):console[_0x480da0(0x14a)](a115_0x107f49['cyan'](_0x480da0(0x156))+'\x20\x20'+a115_0x107f49[_0x480da0(0x165)]('no\x20legacy\x20config\x20found'));console[_0x480da0(0x14a)]('');if(_0x181723['length']>0x0){console[_0x480da0(0x14a)](a115_0x107f49[_0x480da0(0x16a)](_0x480da0(0x104)));for(const _0x2e6f9f of _0x181723){console['log']('\x20\x20'+a115_0x107f49[_0x480da0(0x130)](_0x480da0(0x177))+'\x20\x20'+_0x2e6f9f);}console['log'](_0x480da0(0x153));}else console[_0x480da0(0x14a)](a115_0x107f49[_0x480da0(0x16a)]('Legacy\x20artifacts:')+'\x20\x20'+a115_0x107f49['gray'](_0x480da0(0x145)));console[_0x480da0(0x14a)]('');_0x28f99a?(console[_0x480da0(0x14a)](a115_0x107f49[_0x480da0(0x16a)]('MCP\x20config:')+('\x20\x20'+a115_0x107f49[_0x480da0(0x168)](_0x28f99a[_0x480da0(0x143)])+_0x480da0(0x170)+_0x28f99a['keys'][_0x480da0(0x12b)](',\x20'))),console[_0x480da0(0x14a)](_0x480da0(0x16b))):console['log'](a115_0x107f49[_0x480da0(0x16a)](_0x480da0(0x122))+'\x20\x20'+a115_0x107f49[_0x480da0(0x165)](_0x480da0(0x123)));console[_0x480da0(0x14a)](''),console['log'](a115_0x107f49['cyan'](_0x480da0(0x111))+('\x20\x20'+(_0x379a6d?a115_0x107f49['yellow'](_0x480da0(0x133)):a115_0x107f49['green']('not\x20needed'))));_0x379a6d&&console[_0x480da0(0x14a)]('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`'+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console[_0x480da0(0x14a)]('');if(_0x16a2b3['sdkUpgrade']){const {currentVersion:_0x14e142,field:_0x40b87f,pkgPath:_0x3687b8}=_0x16a2b3['sdkUpgrade'];console['log'](a115_0x107f49[_0x480da0(0x16a)](_0x480da0(0x17b))+('\x20\x20'+a115_0x107f49['yellow'](_0x3687b8))),console[_0x480da0(0x14a)]('\x20\x20Current\x20version\x20in\x20'+_0x40b87f+':\x20'+a115_0x107f49[_0x480da0(0x168)](_0x14e142)+_0x480da0(0x10d)+a115_0x107f49[_0x480da0(0x172)]('latest')),console[_0x480da0(0x14a)](_0x480da0(0x169));}else console[_0x480da0(0x14a)](a115_0x107f49[_0x480da0(0x16a)](_0x480da0(0x17b))+'\x20\x20'+a115_0x107f49[_0x480da0(0x165)](_0x480da0(0x109)));console[_0x480da0(0x14a)]('');}function execConfigMigration(_0x526c81,_0x4c8d5f){const _0x12bb49=a115_0x180b,{configMigration:_0x375600}=_0x526c81;if(!_0x375600?.['oldPath'])return{'step':0x1,'label':_0x12bb49(0x113),'ok':!![],'detail':_0x12bb49(0x16c)};const _0x3a3aa4=readConfigFile(_0x375600['oldPath']),_0x444071=resolve(_0x4c8d5f,NEW_CONFIG_NAME),_0x4299ff=_0x375600[_0x12bb49(0x182)]?readConfigFile(_0x444071):{};for(const [_0x4c4c28,_0x3a3b35]of Object[_0x12bb49(0x147)](_0x3a3aa4)){!(_0x4c4c28 in _0x4299ff)&&(_0x4299ff[_0x4c4c28]=_0x3a3b35);}writeConfigFile(_0x444071,_0x4299ff);const _0x43847d=_0x375600[_0x12bb49(0x13b)]+_0x12bb49(0x126);return renameSync(_0x375600['oldPath'],_0x43847d),{'step':0x1,'label':_0x12bb49(0x113),'ok':!![],'detail':_0x375600['oldPath']+_0x12bb49(0x10d)+_0x444071+'\x20(backup:\x20'+_0x43847d+')'};}function execRemoveOldArtifacts(_0x3ac346){const _0x158f48=a115_0x180b,_0xba444b=[];for(const _0x566013 of _0x3ac346){try{if(!existsSync(_0x566013))continue;const _0x3a8c87=tryStat(_0x566013);_0x3a8c87?.[_0x158f48(0x164)]()?rmSync(_0x566013,{'recursive':!![],'force':!![]}):unlinkSync(_0x566013);}catch(_0x1aba3c){_0xba444b[_0x158f48(0x11f)](_0x566013+':\x20'+_0x1aba3c[_0x158f48(0x157)]);}}return{'step':0x3,'label':'Remove\x20legacy\x20artifacts','ok':_0xba444b[_0x158f48(0x12f)]===0x0,'detail':_0xba444b[_0x158f48(0x12f)]>0x0?_0x3ac346[_0x158f48(0x12f)]-_0xba444b[_0x158f48(0x12f)]+'/'+_0x3ac346[_0x158f48(0x12f)]+_0x158f48(0x151)+_0xba444b[_0x158f48(0x12b)](';\x20')+')':_0x3ac346[_0x158f48(0x12f)]+_0x158f48(0x17f)};}function execCleanMcp(_0x24e995){const _0x4e58e3=a115_0x180b;if(!_0x24e995[_0x4e58e3(0x148)])return{'step':0x4,'label':_0x4e58e3(0x114),'ok':!![],'detail':_0x4e58e3(0x179)};try{const _0x5d94b7=readFileSync(_0x24e995[_0x4e58e3(0x148)][_0x4e58e3(0x143)],_0x4e58e3(0x106)),_0x355d41=JSON[_0x4e58e3(0x12a)](_0x5d94b7);if(_0x355d41?.[_0x4e58e3(0x13c)]&&typeof _0x355d41[_0x4e58e3(0x13c)]===_0x4e58e3(0x17c)){const _0x20cab2=[];for(const [_0x3afb59,_0x50aea9]of Object[_0x4e58e3(0x147)](_0x355d41[_0x4e58e3(0x13c)])){_0x50aea9?.[_0x4e58e3(0x10e)]&&Array[_0x4e58e3(0x139)](_0x50aea9[_0x4e58e3(0x10e)])&&_0x50aea9[_0x4e58e3(0x10e)][_0x4e58e3(0x184)](_0x10eed2=>typeof _0x10eed2===_0x4e58e3(0x125)&&_0x10eed2[_0x4e58e3(0x124)]('@lovrabet/dataset-mcp-server'))&&_0x20cab2['push'](_0x3afb59);}for(const _0x593180 of _0x20cab2){delete _0x355d41[_0x4e58e3(0x13c)][_0x593180];}return _0x20cab2['length']>0x0&&writeFileSync(_0x24e995['oldMcpConfig']['path'],JSON[_0x4e58e3(0x134)](_0x355d41,null,0x2)+'\x0a',_0x4e58e3(0x106)),{'step':0x4,'label':_0x4e58e3(0x114),'ok':!![],'detail':_0x4e58e3(0x121)+_0x20cab2[_0x4e58e3(0x12b)](',\x20')+_0x4e58e3(0x13d)+_0x24e995[_0x4e58e3(0x148)]['path']};}return{'step':0x4,'label':_0x4e58e3(0x114),'ok':!![],'detail':_0x4e58e3(0x16e)};}catch(_0x35851f){return{'step':0x4,'label':_0x4e58e3(0x114),'ok':![],'detail':_0x35851f[_0x4e58e3(0x157)]};}}function execSkillsRemove(_0x421cfa,_0x3323b3){const _0x193581=a115_0x180b,_0x49a8ac=runNpxSkillsRemove(_0x421cfa,{'stdio':_0x193581(0x127),'yes':_0x3323b3});return{'step':0x5,'label':_0x193581(0x174),'ok':_0x49a8ac['ok'],'detail':_0x49a8ac['ok']?_0x193581(0x128):_0x49a8ac[_0x193581(0x13e)]??_0x193581(0x117)+_0x49a8ac[_0x193581(0x15f)]};}function execSkillsAdd(_0x50badd,_0x3c4f6e){const _0xd0e14=a115_0x180b,_0x1196a8=runNpxSkillsAddGlobal(_0x50badd,_0xd0e14(0x11c),{'stdio':'inherit','yes':_0x3c4f6e});return{'step':0x6,'label':_0xd0e14(0x135),'ok':_0x1196a8['ok'],'detail':_0x1196a8['ok']?_0xd0e14(0x112):_0x1196a8['error']??_0xd0e14(0x117)+_0x1196a8[_0xd0e14(0x15f)]};}function a115_0x180b(_0x594794,_0x2674f2){_0x594794=_0x594794-0x104;const _0x4d904b=a115_0x4d90();let _0x180b9c=_0x4d904b[_0x594794];return _0x180b9c;}function execUpgradeSdk(_0x5a6d4b){const _0x226813=a115_0x180b;if(!_0x5a6d4b['sdkUpgrade'])return{'step':0x7,'label':'Upgrade\x20@lovrabet/sdk','ok':!![],'detail':'skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)'};const {pkgPath:_0x1fa1ea,currentVersion:_0x5d23df,field:_0xd622b9}=_0x5a6d4b[_0x226813(0x12e)];try{const _0x46fe3e=readFileSync(_0x1fa1ea,_0x226813(0x106)),_0x3446ec=JSON[_0x226813(0x12a)](_0x46fe3e);return _0x3446ec[_0xd622b9][_0x226813(0x158)]='latest',writeFileSync(_0x1fa1ea,JSON[_0x226813(0x134)](_0x3446ec,null,0x2)+'\x0a','utf8'),{'step':0x7,'label':_0x226813(0x115),'ok':!![],'detail':_0xd622b9+_0x226813(0x163)+_0x5d23df+'\x20→\x20latest'};}catch(_0x54004a){return{'step':0x7,'label':_0x226813(0x115),'ok':![],'detail':_0x54004a[_0x226813(0x157)]};}}function tryStat(_0x23545e){try{return statSync(_0x23545e);}catch{return undefined;}}function printSummary(_0x6d9aa){const _0x3846e8=a115_0x180b;console[_0x3846e8(0x14a)](''),console[_0x3846e8(0x14a)](a115_0x107f49['bold'](_0x3846e8(0x11a))),console[_0x3846e8(0x14a)]('');for(const _0x1acd86 of _0x6d9aa){const _0x1d4ab5=_0x1acd86['ok']?a115_0x107f49[_0x3846e8(0x172)]('OK'):a115_0x107f49[_0x3846e8(0x130)]('FAIL');console[_0x3846e8(0x14a)]('\x20\x20'+_0x1d4ab5+_0x3846e8(0x11d)+_0x1acd86['step']+':\x20'+_0x1acd86[_0x3846e8(0x181)]);if(_0x1acd86['detail'])console[_0x3846e8(0x14a)]('\x20\x20\x20\x20\x20\x20\x20'+a115_0x107f49['gray'](_0x1acd86[_0x3846e8(0x119)]));}console[_0x3846e8(0x14a)]('');}function a115_0x4d90(){const _0x2afd0a=['package.json','lovrabet/rabetbase','\x20\x20Step\x20','Remove\x20.lovrabet/','push','start','removed\x20','MCP\x20config:','no\x20legacy\x20entry','includes','string','.bak','inherit','lovrabet/lovrabet-skill\x20removed','devDependencies','parse','join','configMigration','already\x20exists\x20(will\x20merge)','sdkUpgrade','length','red','Step\x203/7:\x20Legacy\x20artifacts\x20—\x20','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','needed','stringify','Install\x20new\x20skill','yes','bold','\x20\x20bun\x20install','isArray','done','oldPath','mcpServers','\x20from\x20','error','489506VddpZi','@lovrabet/dataset-mcp-server','\x20\x20Fields\x20to\x20migrate:\x20','931049IIKkhI','path','files','none\x20found','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','entries','oldMcpConfig','280288CSppya','log','Step\x206/7:\x20Installing\x20new\x20skill...','succeed','info','dependencies','CANCEL','105juJhUe','\x20removed\x20(','4954365CoVRKt','\x20\x20Action:\x20delete','white','64345YnLQVW','Config\x20file:','message','@lovrabet/sdk','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','undefined','.claude/skills/lovrabet','.cursor/rules/lovrabet_rules.mdc','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','status','8LsDOVy','Proceed\x20with\x20upgrade?','\x20\x20npm\x20install','[\x22@lovrabet/sdk\x22]:\x20','isDirectory','gray','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','values','yellow','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','cyan','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','skipped\x20(no\x20legacy\x20config)','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','no\x20matching\x20entry\x20found','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','\x20→\x20keys:\x20','34158TYIaqN','green','keys','Remove\x20old\x20skill','fail','.cursor/mcp.json','FOUND','failed','skipped','Step\x201/7:\x20Config\x20migration\x20—\x20','@lovrabet/sdk:','object','Upgrade\x20cancelled.','not\x20found\x20(will\x20create)','\x20removed','latest','label','hasNewConfig','66615HEqWzc','some','Legacy\x20artifacts:','Step\x201/7:\x20Migrating\x20config...','utf8','\x20\x20New\x20config\x20(.rabetbase.json):\x20','cwd','not\x20found\x20or\x20already\x20at\x20latest','filter','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','needsSkillSwap','\x20→\x20','args','===\x20Upgrade\x20Analysis\x20===','\x20\x20#\x20or','Skill\x20swap:','lovrabet/rabetbase\x20installed\x20globally','Config\x20migration','Clean\x20MCP\x20config','Upgrade\x20@lovrabet/sdk','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','exit\x20','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','detail','===\x20Upgrade\x20Summary\x20==='];a115_0x4d90=function(){return _0x2afd0a;};return a115_0x4d90();}export async function upgradeApp(_0x51a6e4,_0x3cd40c){const _0x720e4f=a115_0x180b,_0x24af9d=process[_0x720e4f(0x108)](),_0x46f3b4=analyse(_0x24af9d),_0x2f3b3e=!_0x46f3b4[_0x720e4f(0x12c)]&&_0x46f3b4['oldArtifacts'][_0x720e4f(0x12f)]===0x0&&!_0x46f3b4[_0x720e4f(0x148)]&&!_0x46f3b4[_0x720e4f(0x10c)]&&!_0x46f3b4[_0x720e4f(0x12e)];if(_0x2f3b3e){console['log'](a115_0x107f49[_0x720e4f(0x172)](_0x720e4f(0x16d)));return;}printReport(_0x46f3b4);const _0x37ceba=!!(_0x3cd40c[_0x720e4f(0x136)]||_0x3cd40c['Y']||_0x51a6e4);if(!_0x37ceba)try{const _0x31e359=await askConfirm(_0x720e4f(0x161));if(!_0x31e359){console[_0x720e4f(0x14a)](a115_0x107f49[_0x720e4f(0x165)](_0x720e4f(0x17d)));return;}}catch(_0x287d98){if(_0x287d98?.[_0x720e4f(0x157)]===_0x720e4f(0x14f)){console[_0x720e4f(0x14a)](a115_0x107f49[_0x720e4f(0x165)](_0x720e4f(0x17d)));return;}throw _0x287d98;}const _0xff5395=[],_0x24623e=a115_0x3f3f7a({'text':_0x720e4f(0x105),'color':_0x720e4f(0x16a)})[_0x720e4f(0x120)](),_0x488b30=execConfigMigration(_0x46f3b4,_0x24af9d);_0xff5395[_0x720e4f(0x11f)](_0x488b30),_0x24623e[_0x488b30['ok']?_0x720e4f(0x14c):'fail'](_0x720e4f(0x17a)+(_0x488b30[_0x720e4f(0x119)]??(_0x488b30['ok']?_0x720e4f(0x13a):_0x720e4f(0x178))));const _0x5f5c7d=resolve(_0x24af9d,'.lovrabet'),_0x53c5b6=a115_0x3f3f7a({'text':'Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','color':_0x720e4f(0x16a)})['start']();if(existsSync(_0x5f5c7d))try{rmSync(_0x5f5c7d,{'recursive':!![],'force':!![]}),_0x53c5b6[_0x720e4f(0x14c)]('Step\x202/7:\x20.lovrabet/\x20directory\x20removed'),_0xff5395[_0x720e4f(0x11f)]({'step':0x2,'label':_0x720e4f(0x11e),'ok':!![]});}catch(_0x10f9d0){_0x53c5b6[_0x720e4f(0x175)](_0x720e4f(0x146)+_0x10f9d0[_0x720e4f(0x157)]),_0xff5395[_0x720e4f(0x11f)]({'step':0x2,'label':_0x720e4f(0x11e),'ok':![],'detail':_0x10f9d0[_0x720e4f(0x157)]});}else _0x53c5b6[_0x720e4f(0x14d)](_0x720e4f(0x15a)),_0xff5395[_0x720e4f(0x11f)]({'step':0x2,'label':_0x720e4f(0x11e),'ok':!![],'detail':_0x720e4f(0x179)});const _0x12be2b=a115_0x3f3f7a({'text':_0x720e4f(0x166),'color':_0x720e4f(0x16a)})[_0x720e4f(0x120)](),_0x2f21dd=execRemoveOldArtifacts(_0x46f3b4['oldArtifacts']);_0xff5395[_0x720e4f(0x11f)](_0x2f21dd),_0x12be2b[_0x2f21dd['ok']?_0x720e4f(0x14c):_0x720e4f(0x175)](_0x720e4f(0x131)+(_0x2f21dd['detail']??(_0x2f21dd['ok']?'done':_0x720e4f(0x178))));const _0x3ebf18=a115_0x3f3f7a({'text':'Step\x204/7:\x20Cleaning\x20MCP\x20config...','color':_0x720e4f(0x16a)})[_0x720e4f(0x120)](),_0xaf93e3=execCleanMcp(_0x46f3b4);_0xff5395[_0x720e4f(0x11f)](_0xaf93e3),_0x3ebf18[_0xaf93e3['ok']?_0x720e4f(0x14c):'fail']('Step\x204/7:\x20MCP\x20config\x20—\x20'+(_0xaf93e3[_0x720e4f(0x119)]??(_0xaf93e3['ok']?_0x720e4f(0x13a):_0x720e4f(0x178))));const _0x4863a2=a115_0x3f3f7a({'text':'Step\x205/7:\x20Removing\x20old\x20skill...','color':_0x720e4f(0x16a)})[_0x720e4f(0x120)](),_0xf28413=execSkillsRemove(_0x24af9d,_0x37ceba);_0xff5395['push'](_0xf28413),_0x4863a2[_0xf28413['ok']?_0x720e4f(0x14c):_0x720e4f(0x175)]('Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20'+(_0xf28413['detail']??(_0xf28413['ok']?_0x720e4f(0x13a):_0x720e4f(0x178))));const _0x3a80a2=a115_0x3f3f7a({'text':_0x720e4f(0x14b),'color':_0x720e4f(0x16a)})[_0x720e4f(0x120)](),_0x5209cb=execSkillsAdd(_0x24af9d,_0x37ceba);_0xff5395[_0x720e4f(0x11f)](_0x5209cb),_0x3a80a2[_0x5209cb['ok']?_0x720e4f(0x14c):_0x720e4f(0x175)](_0x720e4f(0x132)+(_0x5209cb[_0x720e4f(0x119)]??(_0x5209cb['ok']?'done':_0x720e4f(0x178))));const _0x376376=a115_0x3f3f7a({'text':_0x720e4f(0x159),'color':_0x720e4f(0x16a)})[_0x720e4f(0x120)](),_0x545321=execUpgradeSdk(_0x46f3b4);_0xff5395['push'](_0x545321),_0x376376[_0x545321['ok']?_0x720e4f(0x14c):_0x720e4f(0x175)](_0x720e4f(0x16f)+(_0x545321[_0x720e4f(0x119)]??(_0x545321['ok']?'done':_0x720e4f(0x178)))),printSummary(_0xff5395);const _0xbe5f23=_0xff5395[_0x720e4f(0x184)](_0x195d10=>!_0x195d10['ok']);_0xbe5f23?console['log'](a115_0x107f49['yellow'](_0x720e4f(0x116))):console[_0x720e4f(0x14a)](a115_0x107f49['green']('Upgrade\x20completed\x20successfully!')),_0x545321['ok']&&_0x46f3b4[_0x720e4f(0x12e)]&&(console[_0x720e4f(0x14a)](''),console[_0x720e4f(0x14a)](a115_0x107f49[_0x720e4f(0x137)][_0x720e4f(0x16a)](_0x720e4f(0x118))),console[_0x720e4f(0x14a)](a115_0x107f49[_0x720e4f(0x16a)](_0x720e4f(0x10b))),console[_0x720e4f(0x14a)](''),console[_0x720e4f(0x14a)](a115_0x107f49['white'](_0x720e4f(0x162))),console[_0x720e4f(0x14a)](a115_0x107f49[_0x720e4f(0x154)](_0x720e4f(0x110))),console['log'](a115_0x107f49[_0x720e4f(0x154)](_0x720e4f(0x138))),console[_0x720e4f(0x14a)](''));}
1
+ function a115_0x3352(){const _0x3d9968=['inherit','64696oiaUGl','Step\x206/7:\x20Install\x20new\x20skill\x20—\x20','Step\x204/7:\x20Cleaning\x20MCP\x20config...','needsSkillSwap','@lovrabet/sdk\x20has\x20been\x20updated\x20to\x20latest\x20in\x20package.json.','\x20\x20Step\x20','parse','\x20\x20New\x20config\x20(.rabetbase.json):\x20','lovrabet/rabetbase\x20installed\x20globally','CANCEL','\x20→\x20','gray','.cursor/mcp.json','Step\x203/7:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','filter','keys','skipped\x20(no\x20legacy\x20config)','utf8','hasNewConfig','isDirectory','skipped','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20via\x20`','succeed','Step\x202/7:\x20.lovrabet/\x20not\x20found,\x20skipped','fail','\x20\x20npm\x20install','push','label','lovrabet/rabetbase','green','yes','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','\x20\x20\x20\x20\x20\x20\x20','cyan','\x20\x20Action:\x20update\x20package.json\x20(you\x20will\x20need\x20to\x20re-run\x20install)','skipped\x20(not\x20found\x20or\x20already\x20at\x20latest)','502962kyhPAH','package.json','args','includes','Step\x207/7:\x20@lovrabet/sdk\x20—\x20','oldPath','start','needed','Clean\x20MCP\x20config','Step\x207/7:\x20Upgrading\x20@lovrabet/sdk\x20in\x20package.json...','Legacy\x20artifacts:','===\x20Upgrade\x20Summary\x20===','105ToCFNE','object','.lovrabet','failed','error','\x20from\x20','not\x20found\x20or\x20already\x20at\x20latest','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','\x20→\x20keys:\x20','detail','87459eJLbdw','Please\x20re-install\x20dependencies\x20to\x20apply\x20the\x20change:','done','length','no\x20matching\x20entry\x20found','Step\x202/7:\x20.lovrabet/\x20directory\x20removed','34656vyFZTD','sdkUpgrade','Remove\x20.lovrabet/','undefined','already\x20exists\x20(will\x20merge)','3257170mCvrdV','not\x20needed','mcpServers','.bak','Remove\x20old\x20skill','12410892idyuhn','@lovrabet/sdk','Step\x202/7:\x20.lovrabet/\x20removal\x20failed\x20—\x20','MCP\x20config:','@lovrabet/sdk:','46IQbcdg','@lovrabet/dataset-mcp-server','Step\x205/7:\x20Removing\x20old\x20skill...','status','\x20\x20#\x20or','Proceed\x20with\x20upgrade?','oldMcpConfig','10dlAAZe','path','\x20\x20Current\x20version\x20in\x20','files','log','message','not\x20found\x20(will\x20create)','red','stringify','FAIL','string','white','Upgrade\x20cancelled.','isArray','some','bold','exit\x20','6052528NyCWjZ','yellow','\x20→\x20latest','.claude/skills/lovrabet','join','\x20removed','devDependencies','configMigration','fields','step','removed\x20','cwd','Upgrade\x20completed\x20successfully!','latest','FOUND','Config\x20migration','oldArtifacts','Step\x202/7:\x20Removing\x20.lovrabet/\x20directory...','Step\x201/7:\x20Config\x20migration\x20—\x20','entries','Upgrade\x20@lovrabet/sdk'];a115_0x3352=function(){return _0x3d9968;};return a115_0x3352();}const a115_0x411376=a115_0x150d;(function(_0x5b2038,_0x20bd6b){const _0x1c116b=a115_0x150d,_0x22b904=_0x5b2038();while(!![]){try{const _0x6679e1=parseInt(_0x1c116b(0x21f))/0x1+-parseInt(_0x1c116b(0x22e))/0x2*(-parseInt(_0x1c116b(0x219))/0x3)+parseInt(_0x1c116b(0x1df))/0x4*(-parseInt(_0x1c116b(0x20f))/0x5)+-parseInt(_0x1c116b(0x203))/0x6+-parseInt(_0x1c116b(0x224))/0x7+-parseInt(_0x1c116b(0x246))/0x8+parseInt(_0x1c116b(0x229))/0x9*(parseInt(_0x1c116b(0x235))/0xa);if(_0x6679e1===_0x20bd6b)break;else _0x22b904['push'](_0x22b904['shift']());}catch(_0x104d57){_0x22b904['push'](_0x22b904['shift']());}}}(a115_0x3352,0x6b216));import a115_0x586797 from'chalk';import a115_0x4e291e from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';function a115_0x150d(_0x4a4ef3,_0x4cd806){_0x4a4ef3=_0x4a4ef3-0x1d8;const _0x33528b=a115_0x3352();let _0x150dbd=_0x33528b[_0x4a4ef3];return _0x150dbd;}import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../../context.js';import{CORE_IDE_CONFIGS}from'../../utils/ai_config.js';import{NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE,runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../../skills/npx-skills-add.js';import{askConfirm}from'../../commands/menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a115_0x411376(0x1ed)](_0x424c89=>_0x424c89!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x28b9cf){const _0x5676e8=a115_0x411376,_0x12796b=[];for(const _0x54a222 of Object['values'](CORE_IDE_CONFIGS)){if(_0x54a222[_0x5676e8(0x238)])for(const _0x3e1804 of _0x54a222[_0x5676e8(0x238)]){_0x12796b[_0x5676e8(0x1f9)](resolve(_0x28b9cf,_0x3e1804['path']));}}return _0x12796b;}function analyse(_0x373087){const _0x3f520f=a115_0x411376;let _0x2beb7f=null;const _0x17ff81=resolve(_0x373087,NEW_CONFIG_NAME),_0x24e46e=existsSync(_0x17ff81);for(const _0x405019 of LEGACY_CONFIG_NAMES){const _0x18d32c=resolve(_0x373087,_0x405019);if(existsSync(_0x18d32c)){const _0x49fc26=readConfigFile(_0x18d32c),_0x157371=Object[_0x3f520f(0x1ee)](_0x49fc26)[_0x3f520f(0x1ed)](_0x1deae1=>typeof _0x49fc26[_0x1deae1]!==_0x3f520f(0x222));_0x2beb7f={'oldPath':_0x18d32c,'hasNewConfig':_0x24e46e,'fields':_0x157371};break;}}const _0x30df35=[],_0x42e442=resolve(_0x373087,_0x3f520f(0x211));if(existsSync(_0x42e442))_0x30df35[_0x3f520f(0x1f9)](_0x42e442);const _0x478a97=resolve(_0x373087,'.cursor/rules/lovrabet_rules.mdc');if(existsSync(_0x478a97))_0x30df35[_0x3f520f(0x1f9)](_0x478a97);const _0x1eca90=resolve(_0x373087,_0x3f520f(0x249));if(existsSync(_0x1eca90))_0x30df35[_0x3f520f(0x1f9)](_0x1eca90);for(const _0x19f5e3 of collectIdeSkillFiles(_0x373087)){if(existsSync(_0x19f5e3))_0x30df35[_0x3f520f(0x1f9)](_0x19f5e3);}let _0x4400f2=null;const _0x547980=resolve(_0x373087,_0x3f520f(0x1eb));if(existsSync(_0x547980))try{const _0x12e49c=JSON['parse'](readFileSync(_0x547980,_0x3f520f(0x1f0)));if(_0x12e49c?.[_0x3f520f(0x226)]&&typeof _0x12e49c[_0x3f520f(0x226)]==='object'){const _0x5d7505=[];for(const [_0x5144f4,_0xd49b81]of Object[_0x3f520f(0x1dc)](_0x12e49c[_0x3f520f(0x226)])){const _0x4cdce2=_0xd49b81;_0x4cdce2?.[_0x3f520f(0x205)]&&Array[_0x3f520f(0x242)](_0x4cdce2['args'])&&_0x4cdce2[_0x3f520f(0x205)][_0x3f520f(0x243)](_0x2dde92=>typeof _0x2dde92===_0x3f520f(0x23f)&&_0x2dde92[_0x3f520f(0x206)](_0x3f520f(0x22f)))&&_0x5d7505[_0x3f520f(0x1f9)](_0x5144f4);}_0x5d7505[_0x3f520f(0x21c)]>0x0&&(_0x4400f2={'path':_0x547980,'keys':_0x5d7505});}}catch{}const _0x271da6=_0x30df35['length']>0x0||_0x2beb7f!==null;let _0x47dcda=null;const _0x327121=resolve(_0x373087,_0x3f520f(0x204));if(existsSync(_0x327121))try{const _0x4a2663=JSON['parse'](readFileSync(_0x327121,_0x3f520f(0x1f0)));for(const _0x294700 of['dependencies',_0x3f520f(0x24c)]){const _0x515780=_0x4a2663?.[_0x294700]?.[_0x3f520f(0x22a)];if(typeof _0x515780===_0x3f520f(0x23f)){_0x515780!==_0x3f520f(0x253)&&(_0x47dcda={'pkgPath':_0x327121,'currentVersion':_0x515780,'field':_0x294700});break;}}}catch{}return{'configMigration':_0x2beb7f,'oldArtifacts':_0x30df35,'oldMcpConfig':_0x4400f2,'needsSkillSwap':_0x271da6,'sdkUpgrade':_0x47dcda};}function printReport(_0x241c11){const _0x33eeef=a115_0x411376,{configMigration:_0x1f74c2,oldArtifacts:_0x331581,oldMcpConfig:_0x1fb2f1,needsSkillSwap:_0x2a880d}=_0x241c11;console[_0x33eeef(0x239)](''),console['log'](a115_0x586797[_0x33eeef(0x244)]('===\x20Upgrade\x20Analysis\x20===')),console[_0x33eeef(0x239)]('');_0x1f74c2?(console[_0x33eeef(0x239)](a115_0x586797[_0x33eeef(0x200)]('Config\x20file:')+('\x20\x20'+a115_0x586797[_0x33eeef(0x247)](_0x1f74c2[_0x33eeef(0x208)]))),console[_0x33eeef(0x239)](_0x33eeef(0x1e6)+(_0x1f74c2[_0x33eeef(0x1f1)]?a115_0x586797[_0x33eeef(0x1fc)](_0x33eeef(0x223)):a115_0x586797[_0x33eeef(0x1ea)](_0x33eeef(0x23b)))),console[_0x33eeef(0x239)]('\x20\x20Fields\x20to\x20migrate:\x20'+_0x1f74c2[_0x33eeef(0x24e)][_0x33eeef(0x24a)](',\x20')),console[_0x33eeef(0x239)]('\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak')):console['log'](a115_0x586797[_0x33eeef(0x200)]('Config\x20file:')+'\x20\x20'+a115_0x586797['gray']('no\x20legacy\x20config\x20found'));console[_0x33eeef(0x239)]('');if(_0x331581[_0x33eeef(0x21c)]>0x0){console['log'](a115_0x586797[_0x33eeef(0x200)](_0x33eeef(0x20d)));for(const _0x2d7971 of _0x331581){console['log']('\x20\x20'+a115_0x586797[_0x33eeef(0x23c)](_0x33eeef(0x254))+'\x20\x20'+_0x2d7971);}console[_0x33eeef(0x239)]('\x20\x20Action:\x20delete');}else console[_0x33eeef(0x239)](a115_0x586797[_0x33eeef(0x200)](_0x33eeef(0x20d))+'\x20\x20'+a115_0x586797['gray']('none\x20found'));console[_0x33eeef(0x239)]('');_0x1fb2f1?(console['log'](a115_0x586797[_0x33eeef(0x200)](_0x33eeef(0x22c))+('\x20\x20'+a115_0x586797[_0x33eeef(0x247)](_0x1fb2f1[_0x33eeef(0x236)])+_0x33eeef(0x217)+_0x1fb2f1[_0x33eeef(0x1ee)][_0x33eeef(0x24a)](',\x20'))),console[_0x33eeef(0x239)](_0x33eeef(0x216))):console['log'](a115_0x586797['cyan']('MCP\x20config:')+'\x20\x20'+a115_0x586797['gray']('no\x20legacy\x20entry'));console[_0x33eeef(0x239)](''),console[_0x33eeef(0x239)](a115_0x586797[_0x33eeef(0x200)]('Skill\x20swap:')+('\x20\x20'+(_0x2a880d?a115_0x586797[_0x33eeef(0x247)](_0x33eeef(0x20a)):a115_0x586797[_0x33eeef(0x1fc)](_0x33eeef(0x225)))));_0x2a880d&&console[_0x33eeef(0x239)](_0x33eeef(0x1f4)+NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE+'`');console['log']('');if(_0x241c11[_0x33eeef(0x220)]){const {currentVersion:_0x3991e7,field:_0x5bea99,pkgPath:_0x593a60}=_0x241c11['sdkUpgrade'];console['log'](a115_0x586797['cyan']('@lovrabet/sdk:')+('\x20\x20'+a115_0x586797[_0x33eeef(0x247)](_0x593a60))),console[_0x33eeef(0x239)](_0x33eeef(0x237)+_0x5bea99+':\x20'+a115_0x586797[_0x33eeef(0x247)](_0x3991e7)+_0x33eeef(0x1e9)+a115_0x586797['green'](_0x33eeef(0x253))),console[_0x33eeef(0x239)](_0x33eeef(0x201));}else console[_0x33eeef(0x239)](a115_0x586797[_0x33eeef(0x200)](_0x33eeef(0x22d))+'\x20\x20'+a115_0x586797[_0x33eeef(0x1ea)](_0x33eeef(0x215)));console[_0x33eeef(0x239)]('');}function execConfigMigration(_0x465f2d,_0x4f1618){const _0x4e7818=a115_0x411376,{configMigration:_0x284ee3}=_0x465f2d;if(!_0x284ee3?.[_0x4e7818(0x208)])return{'step':0x1,'label':_0x4e7818(0x1d8),'ok':!![],'detail':_0x4e7818(0x1ef)};const _0x5ce7cc=readConfigFile(_0x284ee3[_0x4e7818(0x208)]),_0x4101fd=resolve(_0x4f1618,NEW_CONFIG_NAME),_0xf3032=_0x284ee3[_0x4e7818(0x1f1)]?readConfigFile(_0x4101fd):{};for(const [_0x303f85,_0x413662]of Object[_0x4e7818(0x1dc)](_0x5ce7cc)){!(_0x303f85 in _0xf3032)&&(_0xf3032[_0x303f85]=_0x413662);}writeConfigFile(_0x4101fd,_0xf3032);const _0x4bc694=_0x284ee3[_0x4e7818(0x208)]+_0x4e7818(0x227);return renameSync(_0x284ee3[_0x4e7818(0x208)],_0x4bc694),{'step':0x1,'label':_0x4e7818(0x1d8),'ok':!![],'detail':_0x284ee3[_0x4e7818(0x208)]+_0x4e7818(0x1e9)+_0x4101fd+'\x20(backup:\x20'+_0x4bc694+')'};}function execRemoveOldArtifacts(_0x1f790d){const _0x24289d=a115_0x411376,_0x5cb606=[];for(const _0x266a03 of _0x1f790d){try{if(!existsSync(_0x266a03))continue;const _0x399a9e=tryStat(_0x266a03);_0x399a9e?.[_0x24289d(0x1f2)]()?rmSync(_0x266a03,{'recursive':!![],'force':!![]}):unlinkSync(_0x266a03);}catch(_0x481984){_0x5cb606[_0x24289d(0x1f9)](_0x266a03+':\x20'+_0x481984[_0x24289d(0x23a)]);}}return{'step':0x3,'label':'Remove\x20legacy\x20artifacts','ok':_0x5cb606['length']===0x0,'detail':_0x5cb606[_0x24289d(0x21c)]>0x0?_0x1f790d[_0x24289d(0x21c)]-_0x5cb606[_0x24289d(0x21c)]+'/'+_0x1f790d[_0x24289d(0x21c)]+'\x20removed\x20('+_0x5cb606['join'](';\x20')+')':_0x1f790d[_0x24289d(0x21c)]+_0x24289d(0x24b)};}function execCleanMcp(_0x45c9da){const _0x983941=a115_0x411376;if(!_0x45c9da[_0x983941(0x234)])return{'step':0x4,'label':_0x983941(0x20b),'ok':!![],'detail':_0x983941(0x1f3)};try{const _0x1687dd=readFileSync(_0x45c9da[_0x983941(0x234)][_0x983941(0x236)],_0x983941(0x1f0)),_0x4e4a6f=JSON['parse'](_0x1687dd);if(_0x4e4a6f?.[_0x983941(0x226)]&&typeof _0x4e4a6f['mcpServers']===_0x983941(0x210)){const _0x8d01ed=[];for(const [_0x9a6b7b,_0x24f8e1]of Object[_0x983941(0x1dc)](_0x4e4a6f[_0x983941(0x226)])){_0x24f8e1?.['args']&&Array[_0x983941(0x242)](_0x24f8e1['args'])&&_0x24f8e1[_0x983941(0x205)]['some'](_0x21a3c1=>typeof _0x21a3c1===_0x983941(0x23f)&&_0x21a3c1[_0x983941(0x206)](_0x983941(0x22f)))&&_0x8d01ed[_0x983941(0x1f9)](_0x9a6b7b);}for(const _0x4e1678 of _0x8d01ed){delete _0x4e4a6f[_0x983941(0x226)][_0x4e1678];}return _0x8d01ed[_0x983941(0x21c)]>0x0&&writeFileSync(_0x45c9da[_0x983941(0x234)][_0x983941(0x236)],JSON[_0x983941(0x23d)](_0x4e4a6f,null,0x2)+'\x0a',_0x983941(0x1f0)),{'step':0x4,'label':_0x983941(0x20b),'ok':!![],'detail':_0x983941(0x250)+_0x8d01ed[_0x983941(0x24a)](',\x20')+_0x983941(0x214)+_0x45c9da[_0x983941(0x234)][_0x983941(0x236)]};}return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x983941(0x21d)};}catch(_0x422789){return{'step':0x4,'label':_0x983941(0x20b),'ok':![],'detail':_0x422789[_0x983941(0x23a)]};}}function execSkillsRemove(_0x14cf2b,_0x11a47f){const _0x41b624=a115_0x411376,_0x483730=runNpxSkillsRemove(_0x14cf2b,{'stdio':_0x41b624(0x1de),'yes':_0x11a47f});return{'step':0x5,'label':_0x41b624(0x228),'ok':_0x483730['ok'],'detail':_0x483730['ok']?'lovrabet/lovrabet-skill\x20removed':_0x483730[_0x41b624(0x213)]??_0x41b624(0x245)+_0x483730[_0x41b624(0x231)]};}function execSkillsAdd(_0x1a015a,_0x300b90){const _0xf01e61=a115_0x411376,_0x127085=runNpxSkillsAddGlobal(_0x1a015a,_0xf01e61(0x1fb),{'stdio':_0xf01e61(0x1de),'yes':_0x300b90});return{'step':0x6,'label':'Install\x20new\x20skill','ok':_0x127085['ok'],'detail':_0x127085['ok']?_0xf01e61(0x1e7):_0x127085[_0xf01e61(0x213)]??_0xf01e61(0x245)+_0x127085['status']};}function execUpgradeSdk(_0x406198){const _0x16fd9d=a115_0x411376;if(!_0x406198[_0x16fd9d(0x220)])return{'step':0x7,'label':_0x16fd9d(0x1dd),'ok':!![],'detail':_0x16fd9d(0x202)};const {pkgPath:_0x4d84b2,currentVersion:_0x5c4c6f,field:_0x1b7e88}=_0x406198[_0x16fd9d(0x220)];try{const _0x1a97cb=readFileSync(_0x4d84b2,_0x16fd9d(0x1f0)),_0x117c7f=JSON[_0x16fd9d(0x1e5)](_0x1a97cb);return _0x117c7f[_0x1b7e88]['@lovrabet/sdk']=_0x16fd9d(0x253),writeFileSync(_0x4d84b2,JSON['stringify'](_0x117c7f,null,0x2)+'\x0a',_0x16fd9d(0x1f0)),{'step':0x7,'label':_0x16fd9d(0x1dd),'ok':!![],'detail':_0x1b7e88+'[\x22@lovrabet/sdk\x22]:\x20'+_0x5c4c6f+_0x16fd9d(0x248)};}catch(_0x2fc151){return{'step':0x7,'label':_0x16fd9d(0x1dd),'ok':![],'detail':_0x2fc151[_0x16fd9d(0x23a)]};}}function tryStat(_0x1d8be7){try{return statSync(_0x1d8be7);}catch{return undefined;}}function printSummary(_0x6d36c1){const _0x3e8621=a115_0x411376;console['log'](''),console[_0x3e8621(0x239)](a115_0x586797[_0x3e8621(0x244)](_0x3e8621(0x20e))),console[_0x3e8621(0x239)]('');for(const _0x200b5b of _0x6d36c1){const _0x37597a=_0x200b5b['ok']?a115_0x586797['green']('OK'):a115_0x586797[_0x3e8621(0x23c)](_0x3e8621(0x23e));console[_0x3e8621(0x239)]('\x20\x20'+_0x37597a+_0x3e8621(0x1e4)+_0x200b5b[_0x3e8621(0x24f)]+':\x20'+_0x200b5b[_0x3e8621(0x1fa)]);if(_0x200b5b[_0x3e8621(0x218)])console[_0x3e8621(0x239)](_0x3e8621(0x1ff)+a115_0x586797['gray'](_0x200b5b[_0x3e8621(0x218)]));}console[_0x3e8621(0x239)]('');}export async function upgradeApp(_0x5a46a4,_0x50108b){const _0x58af5c=a115_0x411376,_0x35a9ab=process[_0x58af5c(0x251)](),_0x5e8f22=analyse(_0x35a9ab),_0x13be67=!_0x5e8f22[_0x58af5c(0x24d)]&&_0x5e8f22[_0x58af5c(0x1d9)][_0x58af5c(0x21c)]===0x0&&!_0x5e8f22['oldMcpConfig']&&!_0x5e8f22[_0x58af5c(0x1e2)]&&!_0x5e8f22['sdkUpgrade'];if(_0x13be67){console[_0x58af5c(0x239)](a115_0x586797[_0x58af5c(0x1fc)](_0x58af5c(0x1fe)));return;}printReport(_0x5e8f22);const _0x475af0=!!(_0x50108b[_0x58af5c(0x1fd)]||_0x50108b['Y']||_0x5a46a4);if(!_0x475af0)try{const _0x292cfc=await askConfirm(_0x58af5c(0x233));if(!_0x292cfc){console[_0x58af5c(0x239)](a115_0x586797['gray'](_0x58af5c(0x241)));return;}}catch(_0x4c9657){if(_0x4c9657?.[_0x58af5c(0x23a)]===_0x58af5c(0x1e8)){console[_0x58af5c(0x239)](a115_0x586797[_0x58af5c(0x1ea)](_0x58af5c(0x241)));return;}throw _0x4c9657;}const _0x3dd3c4=[],_0x29f9c5=a115_0x4e291e({'text':'Step\x201/7:\x20Migrating\x20config...','color':'cyan'})[_0x58af5c(0x209)](),_0x1084ad=execConfigMigration(_0x5e8f22,_0x35a9ab);_0x3dd3c4[_0x58af5c(0x1f9)](_0x1084ad),_0x29f9c5[_0x1084ad['ok']?'succeed':_0x58af5c(0x1f7)](_0x58af5c(0x1db)+(_0x1084ad[_0x58af5c(0x218)]??(_0x1084ad['ok']?_0x58af5c(0x21b):_0x58af5c(0x212))));const _0x21869=resolve(_0x35a9ab,'.lovrabet'),_0x3ee119=a115_0x4e291e({'text':_0x58af5c(0x1da),'color':'cyan'})[_0x58af5c(0x209)]();if(existsSync(_0x21869))try{rmSync(_0x21869,{'recursive':!![],'force':!![]}),_0x3ee119['succeed'](_0x58af5c(0x21e)),_0x3dd3c4[_0x58af5c(0x1f9)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0x53b47a){_0x3ee119[_0x58af5c(0x1f7)](_0x58af5c(0x22b)+_0x53b47a['message']),_0x3dd3c4[_0x58af5c(0x1f9)]({'step':0x2,'label':_0x58af5c(0x221),'ok':![],'detail':_0x53b47a[_0x58af5c(0x23a)]});}else _0x3ee119['info'](_0x58af5c(0x1f6)),_0x3dd3c4[_0x58af5c(0x1f9)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![],'detail':_0x58af5c(0x1f3)});const _0x28df1a=a115_0x4e291e({'text':_0x58af5c(0x1ec),'color':'cyan'})[_0x58af5c(0x209)](),_0x5b2e0f=execRemoveOldArtifacts(_0x5e8f22[_0x58af5c(0x1d9)]);_0x3dd3c4['push'](_0x5b2e0f),_0x28df1a[_0x5b2e0f['ok']?_0x58af5c(0x1f5):_0x58af5c(0x1f7)]('Step\x203/7:\x20Legacy\x20artifacts\x20—\x20'+(_0x5b2e0f['detail']??(_0x5b2e0f['ok']?'done':_0x58af5c(0x212))));const _0x1161d6=a115_0x4e291e({'text':_0x58af5c(0x1e1),'color':_0x58af5c(0x200)})[_0x58af5c(0x209)](),_0x2a827b=execCleanMcp(_0x5e8f22);_0x3dd3c4[_0x58af5c(0x1f9)](_0x2a827b),_0x1161d6[_0x2a827b['ok']?_0x58af5c(0x1f5):_0x58af5c(0x1f7)]('Step\x204/7:\x20MCP\x20config\x20—\x20'+(_0x2a827b[_0x58af5c(0x218)]??(_0x2a827b['ok']?'done':_0x58af5c(0x212))));const _0x1f7a13=a115_0x4e291e({'text':_0x58af5c(0x230),'color':_0x58af5c(0x200)})[_0x58af5c(0x209)](),_0x53d97b=execSkillsRemove(_0x35a9ab,_0x475af0);_0x3dd3c4['push'](_0x53d97b),_0x1f7a13[_0x53d97b['ok']?'succeed':_0x58af5c(0x1f7)]('Step\x205/7:\x20Remove\x20old\x20skill\x20—\x20'+(_0x53d97b[_0x58af5c(0x218)]??(_0x53d97b['ok']?_0x58af5c(0x21b):_0x58af5c(0x212))));const _0x3b1ab0=a115_0x4e291e({'text':'Step\x206/7:\x20Installing\x20new\x20skill...','color':_0x58af5c(0x200)})[_0x58af5c(0x209)](),_0x5f1796=execSkillsAdd(_0x35a9ab,_0x475af0);_0x3dd3c4[_0x58af5c(0x1f9)](_0x5f1796),_0x3b1ab0[_0x5f1796['ok']?_0x58af5c(0x1f5):'fail'](_0x58af5c(0x1e0)+(_0x5f1796[_0x58af5c(0x218)]??(_0x5f1796['ok']?_0x58af5c(0x21b):_0x58af5c(0x212))));const _0x315784=a115_0x4e291e({'text':_0x58af5c(0x20c),'color':'cyan'})['start'](),_0x2d0734=execUpgradeSdk(_0x5e8f22);_0x3dd3c4[_0x58af5c(0x1f9)](_0x2d0734),_0x315784[_0x2d0734['ok']?_0x58af5c(0x1f5):_0x58af5c(0x1f7)](_0x58af5c(0x207)+(_0x2d0734['detail']??(_0x2d0734['ok']?_0x58af5c(0x21b):_0x58af5c(0x212)))),printSummary(_0x3dd3c4);const _0x4fe1c8=_0x3dd3c4[_0x58af5c(0x243)](_0xfa9df6=>!_0xfa9df6['ok']);_0x4fe1c8?console[_0x58af5c(0x239)](a115_0x586797[_0x58af5c(0x247)]('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console['log'](a115_0x586797[_0x58af5c(0x1fc)](_0x58af5c(0x252))),_0x2d0734['ok']&&_0x5e8f22[_0x58af5c(0x220)]&&(console[_0x58af5c(0x239)](''),console[_0x58af5c(0x239)](a115_0x586797[_0x58af5c(0x244)][_0x58af5c(0x200)](_0x58af5c(0x1e3))),console[_0x58af5c(0x239)](a115_0x586797[_0x58af5c(0x200)](_0x58af5c(0x21a))),console['log'](''),console[_0x58af5c(0x239)](a115_0x586797[_0x58af5c(0x240)](_0x58af5c(0x1f8))),console[_0x58af5c(0x239)](a115_0x586797[_0x58af5c(0x240)](_0x58af5c(0x232))),console['log'](a115_0x586797['white']('\x20\x20bun\x20install')),console[_0x58af5c(0x239)](''));}
@@ -1 +1 @@
1
- const a116_0xbfe5ef=a116_0x4261;(function(_0x320f7c,_0x38a258){const _0xe5f655=a116_0x4261,_0x51ee76=_0x320f7c();while(!![]){try{const _0x15d031=-parseInt(_0xe5f655(0x15b))/0x1+parseInt(_0xe5f655(0x158))/0x2+-parseInt(_0xe5f655(0x167))/0x3+parseInt(_0xe5f655(0x14c))/0x4+-parseInt(_0xe5f655(0x14e))/0x5+parseInt(_0xe5f655(0x13c))/0x6*(parseInt(_0xe5f655(0x13f))/0x7)+parseInt(_0xe5f655(0x14a))/0x8;if(_0x15d031===_0x38a258)break;else _0x51ee76['push'](_0x51ee76['shift']());}catch(_0x4c2048){_0x51ee76['push'](_0x51ee76['shift']());}}}(a116_0x2c62,0x55f07));function a116_0x4261(_0x1c62e0,_0x8c8a8b){_0x1c62e0=_0x1c62e0-0x139;const _0x2c620c=a116_0x2c62();let _0x42619b=_0x2c620c[_0x1c62e0];return _0x42619b;}import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dataDefinitions}from'../commands/data/index.js';import{dbDefinitions}from'../commands/db/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';function a116_0x2c62(){const _0x51a648=['2467912JoaFMR','preview','1788765RDwOpZ','from','Self\x20Update','run','has','SQL\x20Queries','commands','build','Skills','login','7622qmSqzv','Logs','command','7498uwkwZd','BFF\x20Scripts','show','values','Dataset\x20&\x20Operations','Instant\x20API','service','project','Menu','\x20\x20[high-risk-write]','API','Code\x20Generation','1332915XGbQrv','\x20\x20[write]','wildcardDef','isSingleCommand','<script>','create','description','App\x20Management','96EeSiJg','get','length','7259BjaBdD','Project','install','Schema','Authentication','Smart\x20List\x20Pages','start','read','write','map','Configuration','4193456LBtKxY','set'];a116_0x2c62=function(){return _0x51a648;};return a116_0x2c62();}import{appDefinitions}from'../commands/app/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x4a4916){const _0x14c989=a116_0x4261;for(const _0x2527a0 of _0x4a4916){definitions[_0x14c989(0x14b)](_0x2527a0[_0x14c989(0x161)]+':'+_0x2527a0[_0x14c989(0x15a)],_0x2527a0);let _0x10a39f=serviceGroups['get'](_0x2527a0[_0x14c989(0x161)]);!_0x10a39f&&(_0x10a39f=[],serviceGroups[_0x14c989(0x14b)](_0x2527a0[_0x14c989(0x161)],_0x10a39f)),_0x10a39f['push'](_0x2527a0);}}function registerDeclarativeService(_0x161d47,_0x2c4bf5,_0xb7bcd9){const _0x5ca3ba=a116_0x4261;registerDefinitions(_0x2c4bf5);_0xb7bcd9?.[_0x5ca3ba(0x169)]&&registerDefinitions([_0xb7bcd9[_0x5ca3ba(0x169)]]);const _0x1e1fff=_0x1bb254=>_0x1bb254===_0x5ca3ba(0x146)?'':_0x1bb254===_0x5ca3ba(0x147)?_0x5ca3ba(0x168):_0x5ca3ba(0x164),_0x2705e4={'service':_0x2c4bf5[0x0][_0x5ca3ba(0x161)],'label':_0x161d47,'commands':_0x2c4bf5[_0x5ca3ba(0x148)](_0x561dbc=>({'command':_0x561dbc[_0x5ca3ba(0x15a)],'description':_0x561dbc[_0x5ca3ba(0x13a)],'tag':_0x1e1fff(_0x561dbc['risk'])})),'declarative':!![],'defaultCommand':_0xb7bcd9?.['defaultCommand']??(_0xb7bcd9?.[_0x5ca3ba(0x16a)]?_0x2c4bf5[0x0][_0x5ca3ba(0x15a)]:undefined),'wildcardDef':_0xb7bcd9?.[_0x5ca3ba(0x169)],'isSingleCommand':_0xb7bcd9?.[_0x5ca3ba(0x16a)]};serviceRegistry['push'](_0x2705e4),serviceByName['set'](_0x2705e4[_0x5ca3ba(0x161)],_0x2705e4);}registerDeclarativeService('Quick\x20Start',initDefinitions,{'defaultCommand':a116_0xbfe5ef(0x151),'isSingleCommand':!![]}),registerDeclarativeService(a116_0xbfe5ef(0x140),projectDefinitions),registerDeclarativeService(a116_0xbfe5ef(0x13b),appDefinitions),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});{const last=serviceRegistry[serviceRegistry[a116_0xbfe5ef(0x13e)]-0x1];last[a116_0xbfe5ef(0x154)]=[{'command':a116_0xbfe5ef(0x16b),'description':'Run\x20any\x20package.json\x20script','tag':''}];}registerDeclarativeService(a116_0xbfe5ef(0x143),authDefinitions,{'defaultCommand':a116_0xbfe5ef(0x157)}),registerDeclarativeService(a116_0xbfe5ef(0x150),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a116_0xbfe5ef(0x142),[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a116_0xbfe5ef(0x149),configDefinitions),registerDeclarativeService('Platform\x20Issue',issueDefinitions),registerDeclarativeService(a116_0xbfe5ef(0x165),apiDefinitions),registerDeclarativeService(a116_0xbfe5ef(0x163),menuDefinitions),registerDeclarativeService('Database\x20Connections',dbDefinitions),registerDeclarativeService(a116_0xbfe5ef(0x15f),datasetDefinitions),registerDeclarativeService(a116_0xbfe5ef(0x144),pageDefinitions),registerDeclarativeService(a116_0xbfe5ef(0x160),dataDefinitions),registerDeclarativeService(a116_0xbfe5ef(0x15c),bffDefinitions),registerDeclarativeService(a116_0xbfe5ef(0x153),sqlDefinitions),registerDeclarativeService(a116_0xbfe5ef(0x166),codegenDefinitions),registerDeclarativeService(a116_0xbfe5ef(0x156),skillDefinitions),registerDeclarativeService(a116_0xbfe5ef(0x159),logsDefinitions,{'defaultCommand':a116_0xbfe5ef(0x15d)});export const deprecatedAliases={'create':{'service':a116_0xbfe5ef(0x162),'command':a116_0xbfe5ef(0x139)},'start':{'service':a116_0xbfe5ef(0x151),'command':a116_0xbfe5ef(0x145)},'build':{'service':a116_0xbfe5ef(0x151),'command':a116_0xbfe5ef(0x155)},'preview':{'service':a116_0xbfe5ef(0x151),'command':a116_0xbfe5ef(0x14d)},'logout':{'service':'auth','command':'logout'},'skills':{'service':'skill','command':a116_0xbfe5ef(0x141)}};export const deprecatedSubcommands={'bff':{'new':a116_0xbfe5ef(0x139)},'sql':{'new':a116_0xbfe5ef(0x139)}};export function resolveDeprecatedSubcommand(_0x53e58f,_0x3e9884){return deprecatedSubcommands[_0x53e58f]?.[_0x3e9884];}export function findDefinition(_0x4c80e1,_0x5dee37){const _0x4a5ad6=a116_0xbfe5ef;return definitions[_0x4a5ad6(0x13d)](_0x4c80e1+':'+_0x5dee37);}export function isKnownService(_0x2be2f9){const _0x10183b=a116_0xbfe5ef;return serviceByName[_0x10183b(0x152)](_0x2be2f9);}export function isDeclarativeService(_0x53eba6){const _0x54625c=a116_0xbfe5ef;return serviceGroups['has'](_0x53eba6)||serviceByName[_0x54625c(0x13d)](_0x53eba6)?.[_0x54625c(0x169)]!==undefined;}export function getServiceEntry(_0x1c009c){const _0x565379=a116_0xbfe5ef;return serviceByName[_0x565379(0x13d)](_0x1c009c);}export function getLegacyHandler(_0x5ab534,_0x4349c3){return undefined;}export function getAllDefinitions(){const _0x40aecf=a116_0xbfe5ef;return Array[_0x40aecf(0x14f)](definitions[_0x40aecf(0x15e)]());}
1
+ const a116_0x42ee10=a116_0x41af;(function(_0x2487e9,_0x252bd1){const _0x40d492=a116_0x41af,_0x38784f=_0x2487e9();while(!![]){try{const _0x48ed18=-parseInt(_0x40d492(0x143))/0x1*(-parseInt(_0x40d492(0x127))/0x2)+parseInt(_0x40d492(0x135))/0x3+-parseInt(_0x40d492(0x147))/0x4*(parseInt(_0x40d492(0x12c))/0x5)+-parseInt(_0x40d492(0x141))/0x6+parseInt(_0x40d492(0x130))/0x7*(-parseInt(_0x40d492(0x129))/0x8)+-parseInt(_0x40d492(0x121))/0x9*(parseInt(_0x40d492(0x12d))/0xa)+parseInt(_0x40d492(0x12a))/0xb;if(_0x48ed18===_0x252bd1)break;else _0x38784f['push'](_0x38784f['shift']());}catch(_0x221255){_0x38784f['push'](_0x38784f['shift']());}}}(a116_0x202a,0x66b78));import{apiDefinitions}from'../commands/api/index.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{pageDefinitions}from'../commands/page/index.js';import{dataDefinitions}from'../commands/data/index.js';import{dbDefinitions}from'../commands/db/index.js';import{codegenDefinitions}from'../commands/codegen/index.js';import{menuDefinitions}from'../commands/menu/index.js';import{appDefinitions}from'../commands/app/index.js';import{configDefinitions}from'../commands/config/index.js';import{doctorDefinition}from'../commands/doctor.js';import{updateDefinition}from'../commands/cli-update.js';import{schemaDefinition}from'../commands/schema.js';import{issueDefinitions}from'../commands/issue/index.js';import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{projectDefinitions}from'../commands/project/index.js';import{initDefinitions}from'../commands/init/index.js';import{runDefinition}from'../commands/run/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();function a116_0x41af(_0x43c744,_0x26ca34){_0x43c744=_0x43c744-0x115;const _0x202a96=a116_0x202a();let _0x41aff7=_0x202a96[_0x43c744];return _0x41aff7;}export const serviceGroups=new Map();function registerDefinitions(_0x2a5317){const _0x4e77da=a116_0x41af;for(const _0x412bca of _0x2a5317){definitions[_0x4e77da(0x13c)](_0x412bca[_0x4e77da(0x13f)]+':'+_0x412bca['command'],_0x412bca);let _0x1f428d=serviceGroups[_0x4e77da(0x11c)](_0x412bca['service']);!_0x1f428d&&(_0x1f428d=[],serviceGroups['set'](_0x412bca['service'],_0x1f428d)),_0x1f428d[_0x4e77da(0x126)](_0x412bca);}}function registerDeclarativeService(_0x75bd15,_0x432f2f,_0x1f25b7){const _0x5960bd=a116_0x41af;registerDefinitions(_0x432f2f);_0x1f25b7?.['wildcardDef']&&registerDefinitions([_0x1f25b7['wildcardDef']]);const _0xf1bf57=_0x36eef9=>_0x36eef9===_0x5960bd(0x136)?'':_0x36eef9===_0x5960bd(0x11d)?_0x5960bd(0x133):_0x5960bd(0x117),_0x1ed0e2={'service':_0x432f2f[0x0][_0x5960bd(0x13f)],'label':_0x75bd15,'commands':_0x432f2f['map'](_0x8073f9=>({'command':_0x8073f9['command'],'description':_0x8073f9[_0x5960bd(0x120)],'tag':_0xf1bf57(_0x8073f9[_0x5960bd(0x137)])})),'declarative':!![],'defaultCommand':_0x1f25b7?.[_0x5960bd(0x14b)]??(_0x1f25b7?.[_0x5960bd(0x14a)]?_0x432f2f[0x0][_0x5960bd(0x11e)]:undefined),'wildcardDef':_0x1f25b7?.['wildcardDef'],'isSingleCommand':_0x1f25b7?.[_0x5960bd(0x14a)]};serviceRegistry[_0x5960bd(0x126)](_0x1ed0e2),serviceByName[_0x5960bd(0x13c)](_0x1ed0e2[_0x5960bd(0x13f)],_0x1ed0e2);}registerDeclarativeService(a116_0x42ee10(0x140),initDefinitions,{'defaultCommand':a116_0x42ee10(0x148),'isSingleCommand':!![]}),registerDeclarativeService(a116_0x42ee10(0x138),projectDefinitions),registerDeclarativeService(a116_0x42ee10(0x131),appDefinitions),registerDeclarativeService('Run\x20Scripts',[runDefinition],{'wildcardDef':runDefinition});function a116_0x202a(){const _0x295789=['Instant\x20API','\x20\x20[write]','Platform\x20Issue','546960rLuROZ','read','risk','Project','logout','Dataset\x20&\x20Operations','Logs','set','start','install','service','Quick\x20Start','12300lvfoUl','build','140766pLArwh','create','Self\x20Update','Code\x20Generation','4xgHmVv','run','Authentication','isSingleCommand','defaultCommand','wildcardDef','values','show','auth','preview','\x20\x20[high-risk-write]','Diagnostics','login','commands','has','get','write','command','from','description','9jImNlz','Run\x20any\x20package.json\x20script','length','Configuration','API','push','6oMvxag','Menu','5223208IBsgbU','21782519tquKtv','Smart\x20List\x20Pages','3879395UDnYHE','7332890LmZfJl','project','Database\x20Connections','7OJbJBN','App\x20Management'];a116_0x202a=function(){return _0x295789;};return a116_0x202a();}{const last=serviceRegistry[serviceRegistry[a116_0x42ee10(0x123)]-0x1];last[a116_0x42ee10(0x11a)]=[{'command':'<script>','description':a116_0x42ee10(0x122),'tag':''}];}registerDeclarativeService(a116_0x42ee10(0x149),authDefinitions,{'defaultCommand':a116_0x42ee10(0x119)}),registerDeclarativeService(a116_0x42ee10(0x145),[updateDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a116_0x42ee10(0x118),[doctorDefinition],{'isSingleCommand':!![]}),registerDeclarativeService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerDeclarativeService(a116_0x42ee10(0x124),configDefinitions),registerDeclarativeService(a116_0x42ee10(0x134),issueDefinitions),registerDeclarativeService(a116_0x42ee10(0x125),apiDefinitions),registerDeclarativeService(a116_0x42ee10(0x128),menuDefinitions),registerDeclarativeService(a116_0x42ee10(0x12f),dbDefinitions),registerDeclarativeService(a116_0x42ee10(0x13a),datasetDefinitions),registerDeclarativeService(a116_0x42ee10(0x12b),pageDefinitions),registerDeclarativeService(a116_0x42ee10(0x132),dataDefinitions),registerDeclarativeService('BFF\x20Scripts',bffDefinitions),registerDeclarativeService('SQL\x20Queries',sqlDefinitions),registerDeclarativeService(a116_0x42ee10(0x146),codegenDefinitions),registerDeclarativeService('Skills',skillDefinitions),registerDeclarativeService(a116_0x42ee10(0x13b),logsDefinitions,{'defaultCommand':a116_0x42ee10(0x14e)});export const deprecatedAliases={'create':{'service':a116_0x42ee10(0x12e),'command':'create'},'start':{'service':a116_0x42ee10(0x148),'command':a116_0x42ee10(0x13d)},'build':{'service':a116_0x42ee10(0x148),'command':a116_0x42ee10(0x142)},'preview':{'service':a116_0x42ee10(0x148),'command':a116_0x42ee10(0x116)},'logout':{'service':a116_0x42ee10(0x115),'command':a116_0x42ee10(0x139)},'skills':{'service':'skill','command':a116_0x42ee10(0x13e)}};export const deprecatedSubcommands={'bff':{'new':a116_0x42ee10(0x144)},'sql':{'new':a116_0x42ee10(0x144)}};export function resolveDeprecatedSubcommand(_0x3adaf6,_0x1a4e6b){return deprecatedSubcommands[_0x3adaf6]?.[_0x1a4e6b];}export function findDefinition(_0x3137bb,_0xed710e){return definitions['get'](_0x3137bb+':'+_0xed710e);}export function isKnownService(_0x4155e7){const _0x10073a=a116_0x42ee10;return serviceByName[_0x10073a(0x11b)](_0x4155e7);}export function isDeclarativeService(_0x263066){const _0x3f21af=a116_0x42ee10;return serviceGroups['has'](_0x263066)||serviceByName[_0x3f21af(0x11c)](_0x263066)?.[_0x3f21af(0x14c)]!==undefined;}export function getServiceEntry(_0x198309){const _0x39b5a0=a116_0x42ee10;return serviceByName[_0x39b5a0(0x11c)](_0x198309);}export function getLegacyHandler(_0x593c02,_0x89f5fb){return undefined;}export function getAllDefinitions(){const _0x287e31=a116_0x42ee10;return Array[_0x287e31(0x11f)](definitions[_0x287e31(0x14d)]());}