@lovrabet/rabetbase-cli 2.0.12 → 2.1.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/README.md +2 -2
  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/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/doc.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app/use.js +1 -1
  26. package/lib/commands/auth/index.js +1 -1
  27. package/lib/commands/bff/delete.js +1 -1
  28. package/lib/commands/bff/detail.js +1 -1
  29. package/lib/commands/bff/index.js +1 -1
  30. package/lib/commands/bff/list.js +1 -1
  31. package/lib/commands/bff/new.js +1 -1
  32. package/lib/commands/bff/pull.js +1 -1
  33. package/lib/commands/bff/push.js +1 -1
  34. package/lib/commands/bff/status.js +1 -1
  35. package/lib/commands/cli-update.js +1 -1
  36. package/lib/commands/codegen/index.js +1 -1
  37. package/lib/commands/codegen/sdk.js +1 -1
  38. package/lib/commands/codegen/sql.js +1 -1
  39. package/lib/commands/common/app-selector.js +1 -1
  40. package/lib/commands/common/flags.js +1 -1
  41. package/lib/commands/common/validate.js +1 -1
  42. package/lib/commands/config/get.js +1 -1
  43. package/lib/commands/config/index.js +1 -1
  44. package/lib/commands/config/list.js +1 -1
  45. package/lib/commands/config/set.js +1 -1
  46. package/lib/commands/config/shared.js +1 -1
  47. package/lib/commands/dataset/detail.js +1 -1
  48. package/lib/commands/dataset/index.js +1 -1
  49. package/lib/commands/dataset/links.js +1 -1
  50. package/lib/commands/dataset/list.js +1 -1
  51. package/lib/commands/dataset/operations.js +1 -1
  52. package/lib/commands/db/analyze-cancel.js +1 -0
  53. package/lib/commands/db/analyze-start.js +1 -0
  54. package/lib/commands/db/analyze-status.js +1 -0
  55. package/lib/commands/db/create.js +1 -0
  56. package/lib/commands/db/delete.js +1 -0
  57. package/lib/commands/db/detail.js +1 -0
  58. package/lib/commands/db/diff.js +1 -0
  59. package/lib/commands/db/index.js +1 -0
  60. package/lib/commands/db/list.js +1 -0
  61. package/lib/commands/db/shared.js +1 -0
  62. package/lib/commands/db/tables.js +1 -0
  63. package/lib/commands/db/test.js +1 -0
  64. package/lib/commands/db/update.js +1 -0
  65. package/lib/commands/doctor.js +1 -1
  66. package/lib/commands/init/index.js +1 -1
  67. package/lib/commands/logs/index.js +1 -1
  68. package/lib/commands/menu/index.js +1 -1
  69. package/lib/commands/menu/shared/compare-table.js +1 -1
  70. package/lib/commands/menu/shared/index.js +1 -1
  71. package/lib/commands/menu/shared/inquirer.js +1 -1
  72. package/lib/commands/menu/shared/local-pages.js +1 -1
  73. package/lib/commands/menu/shared/logic.js +1 -1
  74. package/lib/commands/menu/shared/service.js +1 -1
  75. package/lib/commands/menu/shared/sync-core.js +1 -1
  76. package/lib/commands/menu/shared/update-core.js +1 -1
  77. package/lib/commands/menu/shared/valid-url.js +1 -1
  78. package/lib/commands/menu/sync.js +1 -1
  79. package/lib/commands/menu/update.js +1 -1
  80. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  81. package/lib/commands/project/create/format-elapsed.js +1 -1
  82. package/lib/commands/project/create/main.js +1 -1
  83. package/lib/commands/project/create/non-interactive.js +1 -1
  84. package/lib/commands/project/create/project-template-path.js +1 -1
  85. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  86. package/lib/commands/project/create/use-format-code.js +1 -1
  87. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  88. package/lib/commands/project/index.js +1 -1
  89. package/lib/commands/project/init.js +1 -1
  90. package/lib/commands/project/upgrade.js +1 -1
  91. package/lib/commands/registry.js +1 -1
  92. package/lib/commands/run/index.js +1 -1
  93. package/lib/commands/schema.js +1 -1
  94. package/lib/commands/skill/index.js +1 -1
  95. package/lib/commands/sql/detail.js +1 -1
  96. package/lib/commands/sql/exec.js +1 -1
  97. package/lib/commands/sql/index.js +1 -1
  98. package/lib/commands/sql/list.js +1 -1
  99. package/lib/commands/sql/pull.js +1 -0
  100. package/lib/commands/sql/save.js +1 -1
  101. package/lib/commands/sql/shared.js +1 -0
  102. package/lib/commands/sql/validate.js +1 -1
  103. package/lib/constant/cli.js +1 -1
  104. package/lib/constant/domain.js +1 -1
  105. package/lib/constant/env.js +1 -1
  106. package/lib/constant/paths.js +1 -1
  107. package/lib/context.js +1 -1
  108. package/lib/core/alias-resolver.js +1 -1
  109. package/lib/core/api-client.js +1 -1
  110. package/lib/core/bff/config.js +1 -1
  111. package/lib/core/bff/file-system.js +1 -1
  112. package/lib/core/bff/hash.js +1 -1
  113. package/lib/core/bff/lock.js +1 -1
  114. package/lib/core/bff/utils.js +1 -1
  115. package/lib/core/db-resolver.js +1 -1
  116. package/lib/core/sql-validator.js +1 -1
  117. package/lib/errors.js +1 -1
  118. package/lib/framework/build-all-flags.js +1 -1
  119. package/lib/framework/flags.js +1 -1
  120. package/lib/framework/help.js +1 -1
  121. package/lib/framework/index.js +1 -1
  122. package/lib/framework/output.js +1 -1
  123. package/lib/framework/response.js +1 -1
  124. package/lib/framework/runner.js +1 -1
  125. package/lib/framework/schema-export.js +1 -1
  126. package/lib/framework/types.js +1 -1
  127. package/lib/generated/build-info.js +1 -1
  128. package/lib/help.js +1 -1
  129. package/lib/skills/main.js +1 -1
  130. package/lib/skills/npx-skills-add.js +1 -1
  131. package/lib/telemetry/cli-command-trace.js +1 -1
  132. package/lib/telemetry/cli-help-trace.js +1 -1
  133. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  134. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  135. package/lib/telemetry/send-cli-trace-log.js +1 -1
  136. package/lib/utils/ai_config.js +1 -1
  137. package/lib/utils/apply-jq-filter.js +1 -1
  138. package/lib/utils/cdn-config.js +1 -1
  139. package/lib/utils/check-sdk-version.js +1 -1
  140. package/lib/utils/cli-version-check.js +1 -1
  141. package/lib/utils/config.js +1 -1
  142. package/lib/utils/copy-directory.js +1 -1
  143. package/lib/utils/file-utils.js +1 -1
  144. package/lib/utils/guides-cdn.js +1 -1
  145. package/lib/utils/http-client.js +1 -1
  146. package/lib/utils/is-non-interactive.js +1 -1
  147. package/lib/utils/logger.js +1 -1
  148. package/lib/utils/platform.js +1 -1
  149. package/lib/utils/rules-cdn.js +1 -1
  150. package/lib/utils/sleep.js +1 -1
  151. package/lib/utils/template-replacer.js +1 -1
  152. package/lib/utils/version.js +1 -1
  153. package/lib/utils/with-active-cookie.js +1 -1
  154. package/lib/utils/write-cli-side-channel.js +1 -0
  155. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x4382b6,_0x46b5ec){const _0x5a4d68=a63_0x4412,_0x5b2513=_0x4382b6();while(!![]){try{const _0x1d0967=parseInt(_0x5a4d68(0x1c4))/0x1+-parseInt(_0x5a4d68(0x1c6))/0x2+-parseInt(_0x5a4d68(0x1c8))/0x3+parseInt(_0x5a4d68(0x1c3))/0x4+parseInt(_0x5a4d68(0x1be))/0x5+parseInt(_0x5a4d68(0x1c0))/0x6*(parseInt(_0x5a4d68(0x1bf))/0x7)+-parseInt(_0x5a4d68(0x1c2))/0x8;if(_0x1d0967===_0x46b5ec)break;else _0x5b2513['push'](_0x5b2513['shift']());}catch(_0x34c986){_0x5b2513['push'](_0x5b2513['shift']());}}}(a63_0x71cc,0xa0b27));export function isValidJsHttpsUrl(_0x1b9f5f){const _0x57e879=a63_0x4412;return/^https:\/\/.+\.js(\?.*)?$/[_0x57e879(0x1c7)](_0x1b9f5f[_0x57e879(0x1c1)]());}export function isValidCssHttpsUrl(_0xafe2b6){const _0x576026=a63_0x4412;return/^https:\/\/.+\.css(\?.*)?$/[_0x576026(0x1c7)](_0xafe2b6['trim']());}export async function isUrlReachable(_0x502535){const _0x2fed87=a63_0x4412;try{const _0x15122e=await fetch(_0x502535,{'method':_0x2fed87(0x1c5)});return _0x15122e['ok'];}catch{return![];}}function a63_0x4412(_0x1d36a7,_0x2b7b04){_0x1d36a7=_0x1d36a7-0x1be;const _0x71cc9d=a63_0x71cc();let _0x441216=_0x71cc9d[_0x1d36a7];return _0x441216;}function a63_0x71cc(){const _0x25b916=['trim','11648240sTtfSO','3786984rYkXDN','310127AbVDqB','HEAD','1735628vRNVnE','test','751053lAvaoQ','6509150DcHiqd','1571983QTSaNw','18VzUIOs'];a63_0x71cc=function(){return _0x25b916;};return a63_0x71cc();}
1
+ (function(_0x465552,_0x3518fd){const _0x4e00a9=a76_0x51bc,_0x4139da=_0x465552();while(!![]){try{const _0x209fe9=-parseInt(_0x4e00a9(0xe3))/0x1*(-parseInt(_0x4e00a9(0xe8))/0x2)+-parseInt(_0x4e00a9(0xe0))/0x3+-parseInt(_0x4e00a9(0xe1))/0x4+parseInt(_0x4e00a9(0xdd))/0x5*(parseInt(_0x4e00a9(0xdb))/0x6)+parseInt(_0x4e00a9(0xda))/0x7*(parseInt(_0x4e00a9(0xe4))/0x8)+-parseInt(_0x4e00a9(0xe2))/0x9*(-parseInt(_0x4e00a9(0xe6))/0xa)+parseInt(_0x4e00a9(0xdc))/0xb*(-parseInt(_0x4e00a9(0xe7))/0xc);if(_0x209fe9===_0x3518fd)break;else _0x4139da['push'](_0x4139da['shift']());}catch(_0x1832aa){_0x4139da['push'](_0x4139da['shift']());}}}(a76_0x4265,0x245bc));function a76_0x4265(){const _0x49c3ab=['2146fqXMkw','694631kjnbAs','4632TmvMXx','1353jVGrfA','920nRvtgA','HEAD','trim','802596rygZKg','592504qRsdVi','18729JjpEKq','226yEttux','24PKubnW','test','690bYHUHS','25488zuGbZF'];a76_0x4265=function(){return _0x49c3ab;};return a76_0x4265();}function a76_0x51bc(_0x54f35e,_0x3c2e5f){_0x54f35e=_0x54f35e-0xda;const _0x4265c3=a76_0x4265();let _0x51bc25=_0x4265c3[_0x54f35e];return _0x51bc25;}export function isValidJsHttpsUrl(_0x4ba2e8){const _0x2a1701=a76_0x51bc;return/^https:\/\/.+\.js(\?.*)?$/[_0x2a1701(0xe5)](_0x4ba2e8[_0x2a1701(0xdf)]());}export function isValidCssHttpsUrl(_0x37931f){const _0x484745=a76_0x51bc;return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x37931f[_0x484745(0xdf)]());}export async function isUrlReachable(_0x373d04){const _0x3c54a5=a76_0x51bc;try{const _0x9263b7=await fetch(_0x373d04,{'method':_0x3c54a5(0xde)});return _0x9263b7['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- const a64_0x59b597=a64_0x39a7;(function(_0x57c910,_0x2ab7ac){const _0x806cf3=a64_0x39a7,_0x362cf6=_0x57c910();while(!![]){try{const _0x1b8968=parseInt(_0x806cf3(0x138))/0x1+-parseInt(_0x806cf3(0x133))/0x2*(-parseInt(_0x806cf3(0x13a))/0x3)+parseInt(_0x806cf3(0x151))/0x4*(-parseInt(_0x806cf3(0x136))/0x5)+-parseInt(_0x806cf3(0x129))/0x6*(parseInt(_0x806cf3(0x13e))/0x7)+parseInt(_0x806cf3(0x125))/0x8+-parseInt(_0x806cf3(0x13f))/0x9+parseInt(_0x806cf3(0x12d))/0xa*(parseInt(_0x806cf3(0x12e))/0xb);if(_0x1b8968===_0x2ab7ac)break;else _0x362cf6['push'](_0x362cf6['shift']());}catch(_0x2c743e){_0x362cf6['push'](_0x362cf6['shift']());}}}(a64_0x3f89,0x6b59a));import a64_0xa769ba from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';function a64_0x39a7(_0x46bbaf,_0x52eb08){_0x46bbaf=_0x46bbaf-0x125;const _0x3f890a=a64_0x3f89();let _0x39a770=_0x3f890a[_0x46bbaf];return _0x39a770;}import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{runMenuSyncCore,readPageLabelsFromStdin}from'../../commands/menu/shared/sync-core.js';import{getLocalPages}from'../../commands/menu/shared/local-pages.js';export const menuSync={'service':'menu','command':a64_0x59b597(0x134),'description':a64_0x59b597(0x12a),'risk':a64_0x59b597(0x13c),'flags':[{'name':a64_0x59b597(0x15d),'type':a64_0x59b597(0x154),'description':a64_0x59b597(0x144)+a64_0x59b597(0x150)},{'name':a64_0x59b597(0x14b),'type':a64_0x59b597(0x152),'description':a64_0x59b597(0x14e)}],async 'execute'(_0x45410d){const _0x1befb6=a64_0x59b597,_0x27a363=_0x45410d[_0x1befb6(0x153)](_0x1befb6(0x14b)),_0x89413e=_0x45410d['str'](_0x1befb6(0x15d)),_0x5233c9=parseParams(_0x89413e),_0x173c5b=!!(_0x5233c9[_0x1befb6(0x148)]||_0x5233c9[_0x1befb6(0x131)]||_0x5233c9[_0x1befb6(0x149)]&&_0x5233c9[_0x1befb6(0x149)][_0x1befb6(0x127)]>0x0);if(_0x27a363||_0x173c5b){let _0x50f2de=[];!isInteractive()&&!_0x5233c9[_0x1befb6(0x149)]?.[_0x1befb6(0x127)]&&(_0x50f2de=await readPageLabelsFromStdin());const _0x4d9fc1=await runMenuSyncCore(_0x45410d[_0x1befb6(0x14c)],_0x45410d[_0x1befb6(0x145)],_0x50f2de[_0x1befb6(0x127)]>0x0?_0x50f2de:_0x5233c9[_0x1befb6(0x149)]??[],_0x89413e);if(_0x4d9fc1['skipped']){const _0x14812f=getLocalPages();_0x14812f[_0x1befb6(0x127)]===0x0?console[_0x1befb6(0x13d)](_0x1befb6(0x126)):console['log'](_0x1befb6(0x141));}else console[_0x1befb6(0x13d)](_0x1befb6(0x147)+_0x4d9fc1[_0x1befb6(0x14a)]+_0x1befb6(0x142));return{'ok':!![]};}requireInteractive();const _0x5730ea=startSpinner(_0x1befb6(0x137));let _0x13b6bb,_0x4f37c3,_0x505dba;try{const _0x282ee1=await fetchMenuData(_0x45410d[_0x1befb6(0x14c)],_0x45410d['cookie']);_0x13b6bb=_0x282ee1[_0x1befb6(0x158)],_0x4f37c3=_0x282ee1[_0x1befb6(0x128)],_0x505dba=_0x282ee1[_0x1befb6(0x130)],stopSpinner(_0x5730ea,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x461a9d){stopSpinner(_0x5730ea,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors['validation'](_0x461a9d instanceof Error?_0x461a9d[_0x1befb6(0x15e)]:_0x1befb6(0x12f));}if(_0x13b6bb[_0x1befb6(0x127)]===0x0)return console[_0x1befb6(0x13d)](a64_0xa769ba[_0x1befb6(0x146)](_0x1befb6(0x160))),{'ok':!![]};const _0x288ab3=buildCompareRows(_0x13b6bb,_0x4f37c3);console['log'](renderCompareTable(_0x288ab3)),console['log']();const _0x50322c=_0x5233c9[_0x1befb6(0x149)],_0x4436c4=await selectPages(_0x13b6bb,_0x4f37c3,_0x50322c);console[_0x1befb6(0x13d)](),console[_0x1befb6(0x13d)](a64_0xa769ba[_0x1befb6(0x13b)](_0x1befb6(0x140)+_0x4436c4[_0x1befb6(0x127)]+_0x1befb6(0x15f)));const _0x4b4d26=_0x5233c9['jsUrl']&&_0x5233c9[_0x1befb6(0x131)];if(!_0x4b4d26){console[_0x1befb6(0x13d)](renderSyncSummary(_0x4436c4,_0x4f37c3[_0x1befb6(0x135)]>0x0));const _0x890f06=await askConfirm(_0x1befb6(0x155));if(!_0x890f06)return console[_0x1befb6(0x13d)](a64_0xa769ba['gray'](_0x1befb6(0x132))),{'ok':!![]};}let _0x434960=_0x5233c9['jsUrl'],_0x550bb0=_0x5233c9[_0x1befb6(0x131)];!_0x434960&&(_0x434960=await askJsUrl());!_0x550bb0&&(_0x550bb0=await askCssUrl());const _0x23ac50=await askConfirm('\x20\x20Create\x20'+_0x4436c4['length']+'\x20menu(s)\x20with\x20JS:\x20'+_0x434960+_0x1befb6(0x139)+_0x550bb0+'?');if(!_0x23ac50)return console[_0x1befb6(0x13d)](a64_0xa769ba[_0x1befb6(0x156)](_0x1befb6(0x132))),{'ok':!![]};const _0x61367=[_0x434960,_0x550bb0],_0x5fe8a4=startSpinner('Creating\x20'+_0x4436c4[_0x1befb6(0x127)]+'\x20menu(s)...');try{const _0x3177d2=await doCreateMenus(_0x45410d[_0x1befb6(0x14c)],_0x45410d['cookie'],_0x4436c4,_0x61367);return stopSpinner(_0x5fe8a4,'Created\x20'+_0x3177d2[_0x1befb6(0x14a)]+_0x1befb6(0x12b),!![]),{'ok':!![],'data':_0x3177d2,'message':_0x1befb6(0x14d)+_0x3177d2['created']+_0x1befb6(0x15a)+_0x3177d2[_0x1befb6(0x161)]+_0x1befb6(0x14f)};}catch(_0x3fbef1){stopSpinner(_0x5fe8a4,_0x1befb6(0x12c),![]);throw CliErrors['validation'](_0x3fbef1 instanceof Error?_0x3fbef1[_0x1befb6(0x15e)]:_0x1befb6(0x12c));}}};function parseParams(_0x456577){const _0x38a717=a64_0x59b597;if(!_0x456577)return{};try{const _0x5534ef=JSON[_0x38a717(0x15c)](_0x456577);if(typeof _0x5534ef!==_0x38a717(0x15b)||_0x5534ef===null||Array[_0x38a717(0x143)](_0x5534ef))return{};return{'jsUrl':typeof _0x5534ef[_0x38a717(0x148)]==='string'?_0x5534ef[_0x38a717(0x148)][_0x38a717(0x159)]():undefined,'cssUrl':typeof _0x5534ef[_0x38a717(0x131)]==='string'?_0x5534ef['cssUrl'][_0x38a717(0x159)]():undefined,'pages':Array[_0x38a717(0x143)](_0x5534ef[_0x38a717(0x149)])?_0x5534ef[_0x38a717(0x149)][_0x38a717(0x157)](String):undefined};}catch{return{};}}function a64_0x3f89(){const _0x543448=['Menu\x20creation\x20failed','146380daUHYg','99bjYnHX','Failed\x20to\x20fetch\x20online\x20menu\x20list','onlineMenuList','cssUrl','\x20\x20Cancelled.','4bYTSlO','sync','size','5jWRFWK','Fetching\x20online\x20menu\x20list...','851604yxZWAd','\x20and\x20CSS:\x20','72693TCysEI','cyan','write','log','1715QrmXKw','3010320hGietp','\x20\x20✓\x20Selected:\x20','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','\x20menu(s)\x20created','isArray','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','cookie','yellow','✓\x20Menu\x20sync\x20completed:\x20','jsUrl','pages','created','yes','appCode','Menu\x20sync\x20completed:\x20','Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform','\x20failed.','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','2845784aJeJiq','boolean','flag','string','\x20\x20Continue\x20with\x20creation?','gray','map','localPages','trim','\x20created,\x20','object','parse','params','message','\x20page(s)','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','failed','4004952edPXxx','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','length','onlinePaths','1146ZASqSk','Sync\x20local\x20pages\x20as\x20platform\x20menus','\x20menu(s)'];a64_0x3f89=function(){return _0x543448;};return a64_0x3f89();}
1
+ const a77_0x20bfe0=a77_0x19a9;(function(_0x6ad66e,_0x58b580){const _0x1dbc5c=a77_0x19a9,_0x303f32=_0x6ad66e();while(!![]){try{const _0xd5c631=parseInt(_0x1dbc5c(0x1e4))/0x1+parseInt(_0x1dbc5c(0x1f1))/0x2+-parseInt(_0x1dbc5c(0x202))/0x3*(parseInt(_0x1dbc5c(0x1d9))/0x4)+parseInt(_0x1dbc5c(0x1d2))/0x5*(-parseInt(_0x1dbc5c(0x1f4))/0x6)+-parseInt(_0x1dbc5c(0x1f5))/0x7+parseInt(_0x1dbc5c(0x1e6))/0x8+-parseInt(_0x1dbc5c(0x1ef))/0x9*(-parseInt(_0x1dbc5c(0x1d7))/0xa);if(_0xd5c631===_0x58b580)break;else _0x303f32['push'](_0x303f32['shift']());}catch(_0x1fff19){_0x303f32['push'](_0x303f32['shift']());}}}(a77_0x14e0,0x4b369));import a77_0x29405f from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'../../commands/menu/shared/logic.js';import{renderCompareTable,renderSyncSummary}from'../../commands/menu/shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';function a77_0x14e0(){const _0x4f0a52=['25629ZVBHYZ','isArray','onlineMenuList','appCode','\x20and\x20CSS:\x20','gray','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','created','3037435QXDYFb','\x20created,\x20','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','Fetching\x20online\x20menu\x20list...','trim','250190zHqctv','length','12vhQLiZ','cookie','onlinePaths','menu','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','Online\x20menu\x20list\x20fetched','pages','\x20failed.','Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform','params','message','520091BHqZeg','Sync\x20local\x20pages\x20as\x20platform\x20menus','624752kuxMMv','string','parse','Created\x20','\x20\x20Create\x20','failed','size','\x20menu(s)\x20with\x20JS:\x20','skipped','45UXszrb','✓\x20Menu\x20sync\x20completed:\x20','437614qheoVz','\x20menu(s)\x20created','\x20menu(s)','6zXvxbv','6286cRNGPp','Creating\x20','validation','Failed\x20to\x20fetch\x20online\x20menu\x20list','yes','jsUrl','flag','cyan','cssUrl','sync','map','Menu\x20sync\x20completed:\x20','Menu\x20creation\x20failed'];a77_0x14e0=function(){return _0x4f0a52;};return a77_0x14e0();}import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuSyncCore,readPageLabelsFromStdin}from'../../commands/menu/shared/sync-core.js';function a77_0x19a9(_0x454abc,_0x369987){_0x454abc=_0x454abc-0x1ce;const _0x14e045=a77_0x14e0();let _0x19a9e9=_0x14e045[_0x454abc];return _0x19a9e9;}import{getLocalPages}from'../../commands/menu/shared/local-pages.js';export const menuSync={'service':a77_0x20bfe0(0x1dc),'command':a77_0x20bfe0(0x1fe),'description':a77_0x20bfe0(0x1e5),'risk':'write','flags':[{'name':a77_0x20bfe0(0x1e2),'type':a77_0x20bfe0(0x1e7),'description':'Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20'+a77_0x20bfe0(0x1dd)},{'name':'yes','type':'boolean','description':a77_0x20bfe0(0x1e1)}],async 'execute'(_0x33dd01){const _0x4e4861=a77_0x20bfe0,_0x1c968e=_0x33dd01[_0x4e4861(0x1fb)](_0x4e4861(0x1f9)),_0xa94492=_0x33dd01['str']('params'),_0x2a835a=parseParams(_0xa94492),_0x2f70c5=!!(_0x2a835a['jsUrl']||_0x2a835a[_0x4e4861(0x1fd)]||_0x2a835a[_0x4e4861(0x1df)]&&_0x2a835a[_0x4e4861(0x1df)][_0x4e4861(0x1d8)]>0x0);if(_0x1c968e||_0x2f70c5){let _0x48d870=[];!isInteractive()&&!_0x2a835a[_0x4e4861(0x1df)]?.[_0x4e4861(0x1d8)]&&(_0x48d870=await readPageLabelsFromStdin());const _0x92f6be=await runMenuSyncCore(_0x33dd01[_0x4e4861(0x205)],_0x33dd01[_0x4e4861(0x1da)],_0x48d870[_0x4e4861(0x1d8)]>0x0?_0x48d870:_0x2a835a[_0x4e4861(0x1df)]??[],_0xa94492);if(_0x92f6be[_0x4e4861(0x1ee)]){const _0x1352e6=getLocalPages();_0x1352e6[_0x4e4861(0x1d8)]===0x0?writeCliSideChannelLine(_0x4e4861(0x1d4)):writeCliSideChannelLine(_0x4e4861(0x1d0));}else writeCliSideChannelLine(_0x4e4861(0x1f0)+_0x92f6be[_0x4e4861(0x1d1)]+_0x4e4861(0x1f2));return{'ok':!![]};}requireInteractive();const _0x2eb624=startSpinner(_0x4e4861(0x1d5));let _0x49c5af,_0x2cb7dd,_0x578c58;try{const _0x267287=await fetchMenuData(_0x33dd01[_0x4e4861(0x205)],_0x33dd01[_0x4e4861(0x1da)]);_0x49c5af=_0x267287['localPages'],_0x2cb7dd=_0x267287[_0x4e4861(0x1db)],_0x578c58=_0x267287[_0x4e4861(0x204)],stopSpinner(_0x2eb624,_0x4e4861(0x1de),!![]);}catch(_0xa9f307){stopSpinner(_0x2eb624,_0x4e4861(0x1f8),![]);throw CliErrors[_0x4e4861(0x1f7)](_0xa9f307 instanceof Error?_0xa9f307[_0x4e4861(0x1e3)]:_0x4e4861(0x1f8));}if(_0x49c5af[_0x4e4861(0x1d8)]===0x0)return writeCliSideChannelLine(a77_0x29405f['yellow']('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x343654=buildCompareRows(_0x49c5af,_0x2cb7dd);writeCliSideChannelLine(renderCompareTable(_0x343654)),writeCliSideChannelLine('');const _0x5535ca=_0x2a835a[_0x4e4861(0x1df)],_0x1e24fa=await selectPages(_0x49c5af,_0x2cb7dd,_0x5535ca);writeCliSideChannelLine(''),writeCliSideChannelLine(a77_0x29405f[_0x4e4861(0x1fc)]('\x20\x20✓\x20Selected:\x20'+_0x1e24fa[_0x4e4861(0x1d8)]+'\x20page(s)'));const _0x141ca1=_0x2a835a['jsUrl']&&_0x2a835a[_0x4e4861(0x1fd)];if(!_0x141ca1){writeCliSideChannelLine(renderSyncSummary(_0x1e24fa,_0x2cb7dd[_0x4e4861(0x1ec)]>0x0));const _0x4e4857=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x4e4857)return writeCliSideChannelLine(a77_0x29405f[_0x4e4861(0x1cf)]('\x20\x20Cancelled.')),{'ok':!![]};}let _0x3bad36=_0x2a835a[_0x4e4861(0x1fa)],_0x3787ec=_0x2a835a[_0x4e4861(0x1fd)];!_0x3bad36&&(_0x3bad36=await askJsUrl());!_0x3787ec&&(_0x3787ec=await askCssUrl());const _0x9a17a5=await askConfirm(_0x4e4861(0x1ea)+_0x1e24fa[_0x4e4861(0x1d8)]+_0x4e4861(0x1ed)+_0x3bad36+_0x4e4861(0x1ce)+_0x3787ec+'?');if(!_0x9a17a5)return writeCliSideChannelLine(a77_0x29405f['gray']('\x20\x20Cancelled.')),{'ok':!![]};const _0x3e822f=[_0x3bad36,_0x3787ec],_0x3dcb00=startSpinner(_0x4e4861(0x1f6)+_0x1e24fa[_0x4e4861(0x1d8)]+'\x20menu(s)...');try{const _0x11387f=await doCreateMenus(_0x33dd01[_0x4e4861(0x205)],_0x33dd01[_0x4e4861(0x1da)],_0x1e24fa,_0x3e822f);return stopSpinner(_0x3dcb00,_0x4e4861(0x1e9)+_0x11387f[_0x4e4861(0x1d1)]+_0x4e4861(0x1f3),!![]),{'ok':!![],'data':_0x11387f,'message':_0x4e4861(0x200)+_0x11387f[_0x4e4861(0x1d1)]+_0x4e4861(0x1d3)+_0x11387f[_0x4e4861(0x1eb)]+_0x4e4861(0x1e0)};}catch(_0x379848){stopSpinner(_0x3dcb00,_0x4e4861(0x201),![]);throw CliErrors['validation'](_0x379848 instanceof Error?_0x379848[_0x4e4861(0x1e3)]:_0x4e4861(0x201));}}};function parseParams(_0x437d35){const _0x44d812=a77_0x20bfe0;if(!_0x437d35)return{};try{const _0x1d6fbf=JSON[_0x44d812(0x1e8)](_0x437d35);if(typeof _0x1d6fbf!=='object'||_0x1d6fbf===null||Array[_0x44d812(0x203)](_0x1d6fbf))return{};return{'jsUrl':typeof _0x1d6fbf[_0x44d812(0x1fa)]===_0x44d812(0x1e7)?_0x1d6fbf['jsUrl'][_0x44d812(0x1d6)]():undefined,'cssUrl':typeof _0x1d6fbf[_0x44d812(0x1fd)]==='string'?_0x1d6fbf[_0x44d812(0x1fd)][_0x44d812(0x1d6)]():undefined,'pages':Array[_0x44d812(0x203)](_0x1d6fbf[_0x44d812(0x1df)])?_0x1d6fbf[_0x44d812(0x1df)][_0x44d812(0x1ff)](String):undefined};}catch{return{};}}
@@ -1 +1 @@
1
- function a65_0xee71(_0x5da186,_0x52f1c7){_0x5da186=_0x5da186-0x1ab;const _0x1ad356=a65_0x1ad3();let _0xee71b9=_0x1ad356[_0x5da186];return _0xee71b9;}const a65_0x4df611=a65_0xee71;(function(_0x14ce46,_0x42c630){const _0x210539=a65_0xee71,_0x364a8e=_0x14ce46();while(!![]){try{const _0x21107f=-parseInt(_0x210539(0x1c4))/0x1*(-parseInt(_0x210539(0x1c2))/0x2)+parseInt(_0x210539(0x1bc))/0x3*(-parseInt(_0x210539(0x1c6))/0x4)+-parseInt(_0x210539(0x1df))/0x5+parseInt(_0x210539(0x1c0))/0x6*(parseInt(_0x210539(0x1cd))/0x7)+-parseInt(_0x210539(0x1d4))/0x8+parseInt(_0x210539(0x1b7))/0x9*(parseInt(_0x210539(0x1d1))/0xa)+-parseInt(_0x210539(0x1c9))/0xb*(-parseInt(_0x210539(0x1d5))/0xc);if(_0x21107f===_0x42c630)break;else _0x364a8e['push'](_0x364a8e['shift']());}catch(_0x3e74f1){_0x364a8e['push'](_0x364a8e['shift']());}}}(a65_0x1ad3,0x4bea0));import a65_0x4a6d35 from'chalk';import{filterMenusWithResources,doUpdateCdnUrls,fetchOnlineMenuList}from'../../commands/menu/shared/logic.js';import{renderUpdateSummary}from'../../commands/menu/shared/compare-table.js';import{askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{runMenuUpdateCore}from'../../commands/menu/shared/update-core.js';export const menuUpdate={'service':a65_0x4df611(0x1da),'command':'update','description':a65_0x4df611(0x1d8),'risk':a65_0x4df611(0x1c8),'flags':[{'name':'params','type':'string','description':a65_0x4df611(0x1be)+a65_0x4df611(0x1bf)},{'name':'yes','type':a65_0x4df611(0x1af),'description':'Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation'}],async 'execute'(_0x6bc858){const _0xe21c5=a65_0x4df611,_0x31c4a3=_0x6bc858[_0xe21c5(0x1b2)]('yes'),_0x2e74df=_0x6bc858[_0xe21c5(0x1c3)]('params'),_0x2f8750=parseParams(_0x2e74df),_0x585343=!!(_0x2f8750[_0xe21c5(0x1ac)]||_0x2f8750['cssUrl']);if(_0x31c4a3||_0x585343&&!isInteractive()){const _0x1cb9d9=await runMenuUpdateCore(_0x6bc858[_0xe21c5(0x1d6)],_0x6bc858[_0xe21c5(0x1ab)],_0x2e74df);return _0x1cb9d9[_0xe21c5(0x1c5)]?console[_0xe21c5(0x1ca)]('!\x20No\x20menus\x20with\x20existing\x20resources\x20found'):(console[_0xe21c5(0x1ca)]('✓\x20Menu\x20update\x20completed:\x20'+_0x1cb9d9[_0xe21c5(0x1b1)]+'\x20menu(s)\x20updated'),_0x1cb9d9['failed']>0x0&&console['error']('!\x20'+_0x1cb9d9[_0xe21c5(0x1bb)]+_0xe21c5(0x1b6))),{'ok':_0x1cb9d9[_0xe21c5(0x1bb)]===0x0};}requireInteractive();const _0x19c0d0=startSpinner(_0xe21c5(0x1ce));let _0x1e548b;try{_0x1e548b=await fetchOnlineMenuList(_0x6bc858[_0xe21c5(0x1d6)],_0x6bc858['cookie']),stopSpinner(_0x19c0d0,_0xe21c5(0x1b3),!![]);}catch(_0x5694a4){stopSpinner(_0x19c0d0,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0xe21c5(0x1bd)](_0x5694a4 instanceof Error?_0x5694a4[_0xe21c5(0x1d9)]:_0xe21c5(0x1c7));}const _0xdf282c=filterMenusWithResources(_0x1e548b);if(_0xdf282c[_0xe21c5(0x1d7)]===0x0)return console[_0xe21c5(0x1ca)](a65_0x4a6d35['yellow'](_0xe21c5(0x1c1))),{'ok':!![]};console[_0xe21c5(0x1ca)](),console[_0xe21c5(0x1ca)](a65_0x4a6d35[_0xe21c5(0x1b8)](_0xe21c5(0x1b0)+_0xdf282c[_0xe21c5(0x1d7)]+'\x20menu(s)\x20with\x20existing\x20resources')),console[_0xe21c5(0x1ca)](renderUpdateSummary(_0xdf282c[_0xe21c5(0x1ae)](_0x42a7a3=>_0x42a7a3[_0xe21c5(0x1cb)]),[_0x2f8750[_0xe21c5(0x1ac)],_0x2f8750[_0xe21c5(0x1e0)]])),console[_0xe21c5(0x1ca)]();let _0x4cb29c=_0x2f8750[_0xe21c5(0x1ac)],_0x164bcb=_0x2f8750['cssUrl'];!_0x4cb29c&&(_0x4cb29c=await askJsUrl());!_0x164bcb&&(_0x164bcb=await askCssUrl());const _0x3fef7a=await askConfirm(_0xe21c5(0x1cc)+_0xdf282c['length']+_0xe21c5(0x1de)+_0x4cb29c+_0xe21c5(0x1d3)+_0x164bcb+'?');if(!_0x3fef7a)return console[_0xe21c5(0x1ca)](a65_0x4a6d35[_0xe21c5(0x1ad)](_0xe21c5(0x1dd))),{'ok':!![]};const _0x140437=[_0x4cb29c,_0x164bcb],_0x54f37e=startSpinner(_0xe21c5(0x1b5)+_0xdf282c[_0xe21c5(0x1d7)]+'\x20menu(s)...');try{const _0x4959ba=await doUpdateCdnUrls(_0x6bc858[_0xe21c5(0x1d6)],_0x6bc858[_0xe21c5(0x1ab)],_0xdf282c,_0x140437);return stopSpinner(_0x54f37e,_0xe21c5(0x1d0)+_0x4959ba['updated']+_0xe21c5(0x1b9),_0x4959ba[_0xe21c5(0x1bb)]===0x0),{'ok':_0x4959ba[_0xe21c5(0x1bb)]===0x0,'data':_0x4959ba,'message':_0x4959ba[_0xe21c5(0x1bb)]>0x0?_0xe21c5(0x1ba)+_0x4959ba[_0xe21c5(0x1b1)]+'\x20updated,\x20'+_0x4959ba['failed']+_0xe21c5(0x1b4):'Menu\x20update\x20completed:\x20'+_0x4959ba[_0xe21c5(0x1b1)]+_0xe21c5(0x1d2)};}catch(_0x1c2c74){stopSpinner(_0x54f37e,_0xe21c5(0x1db),![]);throw CliErrors[_0xe21c5(0x1bd)](_0x1c2c74 instanceof Error?_0x1c2c74[_0xe21c5(0x1d9)]:_0xe21c5(0x1db));}}};function a65_0x1ad3(){const _0x5ee30a=['\x20failed.','Updating\x20','\x20menu(s)\x20failed','27HxGxAv','cyan','\x20menu(s)','Menu\x20update\x20completed:\x20','failed','705RdwJap','validation','Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','18LuFJNL','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','65420AaUbRm','str','16JsHOiV','skipped','7724sPmfuT','Failed\x20to\x20fetch\x20online\x20menu\x20list','write','737YGUlEC','log','label','\x20\x20Update\x20','336749tknPoa','Fetching\x20online\x20menu\x20list...','parse','Updated\x20','1935090ERPfHs','\x20updated.','\x20and\x20CSS:\x20','2244176RWfUXA','68280CEKGLu','appCode','length','Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','message','menu','Menu\x20update\x20failed','string','\x20\x20Cancelled.','\x20menu(s)\x20with\x20JS:\x20','2920935PSNCgk','cssUrl','trim','object','cookie','jsUrl','gray','map','boolean','\x20\x20Found\x20','updated','flag','Online\x20menu\x20list\x20fetched'];a65_0x1ad3=function(){return _0x5ee30a;};return a65_0x1ad3();}function parseParams(_0x13c243){const _0x3efb85=a65_0x4df611;if(!_0x13c243)return{};try{const _0x4b69bf=JSON[_0x3efb85(0x1cf)](_0x13c243);if(typeof _0x4b69bf!==_0x3efb85(0x1e2)||_0x4b69bf===null||Array['isArray'](_0x4b69bf))return{};return{'jsUrl':typeof _0x4b69bf[_0x3efb85(0x1ac)]===_0x3efb85(0x1dc)?_0x4b69bf[_0x3efb85(0x1ac)][_0x3efb85(0x1e1)]():undefined,'cssUrl':typeof _0x4b69bf[_0x3efb85(0x1e0)]===_0x3efb85(0x1dc)?_0x4b69bf[_0x3efb85(0x1e0)][_0x3efb85(0x1e1)]():undefined};}catch{return{};}}
1
+ const a78_0x306723=a78_0xc646;(function(_0x4dec8e,_0x13064b){const _0x97dfa0=a78_0xc646,_0x5a4566=_0x4dec8e();while(!![]){try{const _0x3375e3=parseInt(_0x97dfa0(0x1b6))/0x1*(parseInt(_0x97dfa0(0x1cb))/0x2)+parseInt(_0x97dfa0(0x1b8))/0x3+-parseInt(_0x97dfa0(0x1a7))/0x4+-parseInt(_0x97dfa0(0x1a0))/0x5+-parseInt(_0x97dfa0(0x1b3))/0x6*(parseInt(_0x97dfa0(0x1c0))/0x7)+-parseInt(_0x97dfa0(0x1b0))/0x8*(parseInt(_0x97dfa0(0x19e))/0x9)+parseInt(_0x97dfa0(0x19f))/0xa;if(_0x3375e3===_0x13064b)break;else _0x5a4566['push'](_0x5a4566['shift']());}catch(_0x10c537){_0x5a4566['push'](_0x5a4566['shift']());}}}(a78_0x3ee5,0xb82fd));import a78_0x49d8bf from'chalk';import{filterMenusWithResources,doUpdateCdnUrls,fetchOnlineMenuList}from'../../commands/menu/shared/logic.js';function a78_0xc646(_0x144f36,_0x5b196d){_0x144f36=_0x144f36-0x19c;const _0x3ee5e4=a78_0x3ee5();let _0xc646c3=_0x3ee5e4[_0x144f36];return _0xc646c3;}import{renderUpdateSummary}from'../../commands/menu/shared/compare-table.js';import{askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'../../commands/menu/shared/inquirer.js';import{CliErrors}from'../../errors.js';import{writeCliSideChannelLine}from'../../utils/write-cli-side-channel.js';import{runMenuUpdateCore}from'../../commands/menu/shared/update-core.js';export const menuUpdate={'service':a78_0x306723(0x1a9),'command':a78_0x306723(0x1b9),'description':'Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','risk':a78_0x306723(0x1be),'flags':[{'name':a78_0x306723(0x1b5),'type':'string','description':'Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20'+a78_0x306723(0x1c4)},{'name':a78_0x306723(0x1bc),'type':a78_0x306723(0x1b1),'description':a78_0x306723(0x1c8)}],async 'execute'(_0x10644a){const _0x394e01=a78_0x306723,_0x39660d=_0x10644a[_0x394e01(0x1a1)](_0x394e01(0x1bc)),_0x12babf=_0x10644a[_0x394e01(0x1c3)](_0x394e01(0x1b5)),_0x90aa77=parseParams(_0x12babf),_0x369b1c=!!(_0x90aa77['jsUrl']||_0x90aa77['cssUrl']);if(_0x39660d||_0x369b1c&&!isInteractive()){const _0x32d29e=await runMenuUpdateCore(_0x10644a[_0x394e01(0x1ad)],_0x10644a[_0x394e01(0x19d)],_0x12babf);return _0x32d29e[_0x394e01(0x1a4)]?writeCliSideChannelLine('!\x20No\x20menus\x20with\x20existing\x20resources\x20found'):(writeCliSideChannelLine('✓\x20Menu\x20update\x20completed:\x20'+_0x32d29e[_0x394e01(0x1cc)]+'\x20menu(s)\x20updated'),_0x32d29e[_0x394e01(0x1cd)]>0x0&&writeCliSideChannelLine('!\x20'+_0x32d29e[_0x394e01(0x1cd)]+_0x394e01(0x1a6))),{'ok':_0x32d29e[_0x394e01(0x1cd)]===0x0};}requireInteractive();const _0x34ef2c=startSpinner(_0x394e01(0x1ba));let _0x122fd2;try{_0x122fd2=await fetchOnlineMenuList(_0x10644a[_0x394e01(0x1ad)],_0x10644a['cookie']),stopSpinner(_0x34ef2c,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0xe541e8){stopSpinner(_0x34ef2c,_0x394e01(0x1c7),![]);throw CliErrors[_0x394e01(0x1c1)](_0xe541e8 instanceof Error?_0xe541e8[_0x394e01(0x1c2)]:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}const _0x4bd185=filterMenusWithResources(_0x122fd2);if(_0x4bd185[_0x394e01(0x1a8)]===0x0)return writeCliSideChannelLine(a78_0x49d8bf[_0x394e01(0x1c5)](_0x394e01(0x1bb))),{'ok':!![]};writeCliSideChannelLine(''),writeCliSideChannelLine(a78_0x49d8bf[_0x394e01(0x1aa)](_0x394e01(0x19c)+_0x4bd185[_0x394e01(0x1a8)]+_0x394e01(0x1a3))),writeCliSideChannelLine(renderUpdateSummary(_0x4bd185[_0x394e01(0x1b7)](_0x3855dd=>_0x3855dd['label']),[_0x90aa77[_0x394e01(0x1b4)],_0x90aa77['cssUrl']])),writeCliSideChannelLine('');let _0x51250a=_0x90aa77[_0x394e01(0x1b4)],_0x33c592=_0x90aa77[_0x394e01(0x1ce)];!_0x51250a&&(_0x51250a=await askJsUrl());!_0x33c592&&(_0x33c592=await askCssUrl());const _0x334793=await askConfirm(_0x394e01(0x1bd)+_0x4bd185['length']+_0x394e01(0x1ae)+_0x51250a+_0x394e01(0x1ac)+_0x33c592+'?');if(!_0x334793)return writeCliSideChannelLine(a78_0x49d8bf[_0x394e01(0x1ab)](_0x394e01(0x1a5))),{'ok':!![]};const _0x5cc147=[_0x51250a,_0x33c592],_0x12edfa=startSpinner(_0x394e01(0x1a2)+_0x4bd185[_0x394e01(0x1a8)]+'\x20menu(s)...');try{const _0x39d65a=await doUpdateCdnUrls(_0x10644a[_0x394e01(0x1ad)],_0x10644a[_0x394e01(0x19d)],_0x4bd185,_0x5cc147);return stopSpinner(_0x12edfa,_0x394e01(0x1bf)+_0x39d65a[_0x394e01(0x1cc)]+'\x20menu(s)',_0x39d65a[_0x394e01(0x1cd)]===0x0),{'ok':_0x39d65a['failed']===0x0,'data':_0x39d65a,'message':_0x39d65a[_0x394e01(0x1cd)]>0x0?'Menu\x20update\x20completed:\x20'+_0x39d65a[_0x394e01(0x1cc)]+_0x394e01(0x1c6)+_0x39d65a[_0x394e01(0x1cd)]+'\x20failed.':'Menu\x20update\x20completed:\x20'+_0x39d65a[_0x394e01(0x1cc)]+'\x20updated.'};}catch(_0x112b3e){stopSpinner(_0x12edfa,_0x394e01(0x1ca),![]);throw CliErrors['validation'](_0x112b3e instanceof Error?_0x112b3e['message']:_0x394e01(0x1ca));}}};function a78_0x3ee5(){const _0x3467f9=['gray','\x20and\x20CSS:\x20','appCode','\x20menu(s)\x20with\x20JS:\x20','string','464TtOavV','boolean','isArray','150OsPClf','jsUrl','params','523PVoERc','map','4095210wcOPda','update','Fetching\x20online\x20menu\x20list...','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','yes','\x20\x20Update\x20','write','Updated\x20','75593MROBjo','validation','message','str','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','yellow','\x20updated,\x20','Failed\x20to\x20fetch\x20online\x20menu\x20list','Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation','trim','Menu\x20update\x20failed','3524XuiGJS','updated','failed','cssUrl','\x20\x20Found\x20','cookie','217125bUkRHN','16916080kDYCYM','5303740uZptzK','flag','Updating\x20','\x20menu(s)\x20with\x20existing\x20resources','skipped','\x20\x20Cancelled.','\x20menu(s)\x20failed','1975208IApOce','length','menu','cyan'];a78_0x3ee5=function(){return _0x3467f9;};return a78_0x3ee5();}function parseParams(_0x75ec30){const _0x9aeb37=a78_0x306723;if(!_0x75ec30)return{};try{const _0x22947c=JSON['parse'](_0x75ec30);if(typeof _0x22947c!=='object'||_0x22947c===null||Array[_0x9aeb37(0x1b2)](_0x22947c))return{};return{'jsUrl':typeof _0x22947c['jsUrl']==='string'?_0x22947c[_0x9aeb37(0x1b4)][_0x9aeb37(0x1c9)]():undefined,'cssUrl':typeof _0x22947c[_0x9aeb37(0x1ce)]===_0x9aeb37(0x1af)?_0x22947c[_0x9aeb37(0x1ce)]['trim']():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x72f42f,_0x2de988){const _0x317cfd=a66_0x3e1d,_0x582106=_0x72f42f();while(!![]){try{const _0x3af089=parseInt(_0x317cfd(0x204))/0x1+parseInt(_0x317cfd(0x1f5))/0x2+parseInt(_0x317cfd(0x1f2))/0x3+parseInt(_0x317cfd(0x1fd))/0x4*(parseInt(_0x317cfd(0x206))/0x5)+parseInt(_0x317cfd(0x1f1))/0x6*(-parseInt(_0x317cfd(0x1f8))/0x7)+-parseInt(_0x317cfd(0x200))/0x8+-parseInt(_0x317cfd(0x207))/0x9;if(_0x3af089===_0x2de988)break;else _0x582106['push'](_0x582106['shift']());}catch(_0x1432c7){_0x582106['push'](_0x582106['shift']());}}}(a66_0xf60e,0xf1f17));import{existsSync}from'node:fs';import a66_0x3fb5bf from'node:path';import a66_0x54070b from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';function a66_0x3e1d(_0xd2e441,_0x23f3e3){_0xd2e441=_0xd2e441-0x1f0;const _0xf60eea=a66_0xf60e();let _0x3e1d64=_0xf60eea[_0xd2e441];return _0x3e1d64;}import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x3b3537,_0x4b185a,_0x5104c2){const _0x454d32=a66_0x3e1d,_0x1a80b5='my-app',_0x146c1c=readConfig(),_0x3ffd87=typeof _0x146c1c[_0x454d32(0x1f7)]==='string'?_0x146c1c[_0x454d32(0x1f7)]:undefined,_0x485b59=await input({'message':_0x454d32(0x208),'default':_0x1a80b5,'validate':_0x50519e=>{const _0x35be5d=_0x454d32,_0x10149a=_0x50519e[_0x35be5d(0x201)]()||_0x1a80b5;if(_0x10149a['length']>0x32)return _0x35be5d(0x205);const _0x5c0db4=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x10149a&&!_0x5c0db4[_0x35be5d(0x1f3)](_0x10149a))return'Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_';const _0x3df914=a66_0x3fb5bf[_0x35be5d(0x1fb)](process['cwd'](),_0x10149a);if(existsSync(_0x3df914))return'Directory\x20\x22'+_0x10149a+_0x35be5d(0x1f0);return!![];}});console[_0x454d32(0x209)](a66_0x54070b[_0x454d32(0x203)](_0x454d32(0x202)+a66_0x54070b[_0x454d32(0x1f4)](_0x485b59)));const _0x185526=await selectSingleAppcode(_0x5104c2);console[_0x454d32(0x209)](a66_0x54070b[_0x454d32(0x203)](_0x454d32(0x1fc)+a66_0x54070b[_0x454d32(0x1f4)](_0x185526||_0x454d32(0x1f6))));if(_0x185526){const _0x1b6adc=await getIsSessionValid();if(!_0x1b6adc){const _0x12476a=await confirm({'message':'No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','default':!![]});if(_0x12476a){const _0x5b4332=await authServer({'silent':!![]});console['log'](a66_0x54070b[_0x454d32(0x203)]('√\x20Login\x20status:\x20'+a66_0x54070b[_0x454d32(0x1f4)](_0x5b4332?_0x454d32(0x1fe):_0x454d32(0x1ff))));}else console[_0x454d32(0x209)](a66_0x54070b[_0x454d32(0x203)](_0x454d32(0x1f9)+a66_0x54070b['cyan'](_0x454d32(0x1fa))));}await _0x3b3537({'projectName':_0x485b59,'appCode':_0x185526,'env':_0x4b185a||_0x3ffd87||'production'});}else await _0x3b3537({'projectName':_0x485b59,'env':_0x4b185a||_0x3ffd87||'production'});}function a66_0xf60e(){const _0x3ad790=['Project\x20name:','log','\x22\x20already\x20exists','3858kdITMo','5274495rrQqta','test','cyan','1768986fWuWSO','Not\x20set','env','11732aDwUPw','√\x20Login\x20status:\x20','Skipped','resolve','√\x20App\x20Code:\x20','11364gWYnbP','Logged\x20in','Login\x20failed','8482696tUWOFO','trim','√\x20Project\x20Name:\x20','green','491908eZNWXJ','Project\x20name\x20cannot\x20exceed\x2050\x20characters','1780dNOJyC','9152622mbvgRg'];a66_0xf60e=function(){return _0x3ad790;};return a66_0xf60e();}
1
+ (function(_0x41b3f6,_0x4a6e1c){const _0x311805=a79_0x5ed5,_0x545250=_0x41b3f6();while(!![]){try{const _0x3d8e75=parseInt(_0x311805(0x11d))/0x1*(-parseInt(_0x311805(0x12c))/0x2)+parseInt(_0x311805(0x122))/0x3+-parseInt(_0x311805(0x126))/0x4*(parseInt(_0x311805(0x133))/0x5)+-parseInt(_0x311805(0x138))/0x6+parseInt(_0x311805(0x11b))/0x7*(parseInt(_0x311805(0x11a))/0x8)+parseInt(_0x311805(0x121))/0x9+parseInt(_0x311805(0x123))/0xa*(parseInt(_0x311805(0x135))/0xb);if(_0x3d8e75===_0x4a6e1c)break;else _0x545250['push'](_0x545250['shift']());}catch(_0x30479d){_0x545250['push'](_0x545250['shift']());}}}(a79_0x55d3,0x9ef6f));import{existsSync}from'node:fs';import a79_0x4ce1d0 from'node:path';import a79_0x590c3f from'chalk';function a79_0x5ed5(_0x2a96ac,_0x39bb61){_0x2a96ac=_0x2a96ac-0x11a;const _0x55d39c=a79_0x55d3();let _0x5ed5c7=_0x55d39c[_0x2a96ac];return _0x5ed5c7;}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 a79_0x55d3(){const _0x39f618=['No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','Not\x20set','√\x20App\x20Code:\x20','trim','5KQhLJx','Logged\x20in','11fbvaPx','Login\x20failed','log','7490736MzSkqB','cwd','54384TCNuEh','777TqXtFN','green','286729OvGSpI','env','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','length','6377355LhiRpS','2971962agYtav','10983630aCWIQc','my-app','Project\x20name\x20cannot\x20exceed\x2050\x20characters','2022796YsjsYR','Directory\x20\x22','√\x20Login\x20status:\x20','string','cyan','\x22\x20already\x20exists','8ihettC','production','resolve'];a79_0x55d3=function(){return _0x39f618;};return a79_0x55d3();}import{selectSingleAppcode}from'../../../commands/common/app-selector.js';export async function guidedCreateProject(_0x556fe7,_0x23fae7,_0x2a3330){const _0x1cfd16=a79_0x5ed5,_0x44d994=_0x1cfd16(0x124),_0x50b7c3=readConfig(),_0x15942c=typeof _0x50b7c3[_0x1cfd16(0x11e)]===_0x1cfd16(0x129)?_0x50b7c3[_0x1cfd16(0x11e)]:undefined,_0x5d8192=await input({'message':'Project\x20name:','default':_0x44d994,'validate':_0x38f453=>{const _0x2033e8=_0x1cfd16,_0xaeca08=_0x38f453[_0x2033e8(0x132)]()||_0x44d994;if(_0xaeca08[_0x2033e8(0x120)]>0x32)return _0x2033e8(0x125);const _0x449ddb=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0xaeca08&&!_0x449ddb['test'](_0xaeca08))return _0x2033e8(0x11f);const _0x4d02b8=a79_0x4ce1d0[_0x2033e8(0x12e)](process[_0x2033e8(0x139)](),_0xaeca08);if(existsSync(_0x4d02b8))return _0x2033e8(0x127)+_0xaeca08+_0x2033e8(0x12b);return!![];}});console['log'](a79_0x590c3f[_0x1cfd16(0x11c)]('√\x20Project\x20Name:\x20'+a79_0x590c3f[_0x1cfd16(0x12a)](_0x5d8192)));const _0x52e738=await selectSingleAppcode(_0x2a3330);console['log'](a79_0x590c3f[_0x1cfd16(0x11c)](_0x1cfd16(0x131)+a79_0x590c3f['cyan'](_0x52e738||_0x1cfd16(0x130))));if(_0x52e738){const _0x38316a=await getIsSessionValid();if(!_0x38316a){const _0xa75390=await confirm({'message':_0x1cfd16(0x12f),'default':!![]});if(_0xa75390){const _0x13a6dd=await authServer({'silent':!![]});console[_0x1cfd16(0x137)](a79_0x590c3f[_0x1cfd16(0x11c)](_0x1cfd16(0x128)+a79_0x590c3f[_0x1cfd16(0x12a)](_0x13a6dd?_0x1cfd16(0x134):_0x1cfd16(0x136))));}else console[_0x1cfd16(0x137)](a79_0x590c3f['green'](_0x1cfd16(0x128)+a79_0x590c3f['cyan']('Skipped')));}await _0x556fe7({'projectName':_0x5d8192,'appCode':_0x52e738,'env':_0x23fae7||_0x15942c||_0x1cfd16(0x12d)});}else await _0x556fe7({'projectName':_0x5d8192,'env':_0x23fae7||_0x15942c||_0x1cfd16(0x12d)});}
@@ -1 +1 @@
1
- (function(_0x1ffc66,_0x48136a){const _0x39b9d1=a67_0x30a8,_0x4b6bcc=_0x1ffc66();while(!![]){try{const _0xadfcea=parseInt(_0x39b9d1(0xd4))/0x1*(-parseInt(_0x39b9d1(0xd1))/0x2)+parseInt(_0x39b9d1(0xd9))/0x3+-parseInt(_0x39b9d1(0xd5))/0x4+-parseInt(_0x39b9d1(0xdb))/0x5+-parseInt(_0x39b9d1(0xd2))/0x6+parseInt(_0x39b9d1(0xd3))/0x7*(-parseInt(_0x39b9d1(0xd6))/0x8)+parseInt(_0x39b9d1(0xd7))/0x9;if(_0xadfcea===_0x48136a)break;else _0x4b6bcc['push'](_0x4b6bcc['shift']());}catch(_0x1958b6){_0x4b6bcc['push'](_0x4b6bcc['shift']());}}}(a67_0x24e5,0xdec85));function a67_0x30a8(_0x50f318,_0x51c730){_0x50f318=_0x50f318-0xd1;const _0x24e5c1=a67_0x24e5();let _0x30a821=_0x24e5c1[_0x50f318];return _0x30a821;}export function formatElapsed(_0x45a34b){const _0x33e9cc=a67_0x30a8,_0x293284=Date[_0x33e9cc(0xda)]()-_0x45a34b;if(_0x293284<0x3e8)return _0x293284+'ms';const _0x11b638=(_0x293284/0x3e8)['toFixed'](0x2),_0x2a7d45=_0x11b638[_0x33e9cc(0xd8)](/\.?0+$/u,'');return _0x2a7d45+'s';}function a67_0x24e5(){const _0x2f1232=['430274yOpgfv','7924872FwgMOd','2443DayhpI','5afgOtv','2840256HwPAcO','35920PAGXGy','60313752mdTBrJ','replace','1588761eIHxwK','now','8225135KyGPsn'];a67_0x24e5=function(){return _0x2f1232;};return a67_0x24e5();}
1
+ function a80_0x1b18(_0x484b21,_0x8b3937){_0x484b21=_0x484b21-0x6e;const _0x433cfd=a80_0x433c();let _0x1b183a=_0x433cfd[_0x484b21];return _0x1b183a;}(function(_0x3a21a2,_0x901ed){const _0x5a81ef=a80_0x1b18,_0x3c06cb=_0x3a21a2();while(!![]){try{const _0x52dc43=-parseInt(_0x5a81ef(0x6f))/0x1+parseInt(_0x5a81ef(0x74))/0x2*(parseInt(_0x5a81ef(0x71))/0x3)+-parseInt(_0x5a81ef(0x76))/0x4*(-parseInt(_0x5a81ef(0x6e))/0x5)+parseInt(_0x5a81ef(0x77))/0x6*(-parseInt(_0x5a81ef(0x75))/0x7)+parseInt(_0x5a81ef(0x73))/0x8+-parseInt(_0x5a81ef(0x72))/0x9+-parseInt(_0x5a81ef(0x78))/0xa*(parseInt(_0x5a81ef(0x70))/0xb);if(_0x52dc43===_0x901ed)break;else _0x3c06cb['push'](_0x3c06cb['shift']());}catch(_0x13a531){_0x3c06cb['push'](_0x3c06cb['shift']());}}}(a80_0x433c,0x2a6c6));export function formatElapsed(_0x3397f9){const _0x4a1fe2=a80_0x1b18,_0x5d4e3f=Date['now']()-_0x3397f9;if(_0x5d4e3f<0x3e8)return _0x5d4e3f+'ms';const _0x53d6b8=(_0x5d4e3f/0x3e8)[_0x4a1fe2(0x79)](0x2),_0x4ae333=_0x53d6b8[_0x4a1fe2(0x7a)](/\.?0+$/u,'');return _0x4ae333+'s';}function a80_0x433c(){const _0x493749=['3oTrJwL','455949KTpWbz','633184QlSKoq','379518bOmAPn','147GaEEIK','808ZaTdiY','7122PXuIYI','60kMVdRh','toFixed','replace','4440sseWNx','39119LxAwvb','292985UmCRGj'];a80_0x433c=function(){return _0x493749;};return a80_0x433c();}
@@ -1 +1 @@
1
- function a68_0x1ec7(){const _0x139f70=['CLI\x20版本检查','√\x20Configuration\x20file\x20created,\x20AppCode:\x20','834iBLLfn','\x20√\x20','dirname','...','更新\x20package.json\x20name','modelCount','\x20run\x20start','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','Project\x20name\x20cannot\x20be\x20empty','production','fail','description','\x20already\x20exists','stableVersion','projectName','green','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','info','√\x20Pulled\x20','Format\x20code','cookie','string','1167597uLdYfP','chdir','readFileSync','name','resolve','log','565JbVPEn','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','清理项目目录失败:\x20','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','accessSync','parse','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','projectCode','API\x20配置拉取异常','\x20\x201.\x20Start\x20project:\x20','appCode','1.0.0','utf8','√\x20package.json\x20updated:\x20name=','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','setLogPath','stringify','510482LxtRZz','join','\x20model(s)','bold','cwd','\x20\x202.\x20Pull\x20API\x20configuration:\x20','trim','40kZSRMN','writeFileSync','*\x20Configuring\x20AppCode\x20for\x20project\x20','cd\x20','warn','package.json','stop','success','968478oZkuTy','705354lbEJeY','\x20api\x20pull','start','\x20Generated\x20by\x20rabetbase\x20cli\x20','301520foSWku','length','env','gray','currentVersion','\x20|\x20AppCode:\x20','Project\x20name:\x20','existsSync','rmSync','toLocaleString','cyan','*\x20Pulling\x20API\x20configuration...','needsUpgrade','repeat','create','🚀\x20Next\x20Steps:','error','620690MSpnpN'];a68_0x1ec7=function(){return _0x139f70;};return a68_0x1ec7();}(function(_0x25a92c,_0x27c375){const _0x4108e0=a68_0x49ef,_0x59dc69=_0x25a92c();while(!![]){try{const _0xf5e247=parseInt(_0x4108e0(0x15b))/0x1*(-parseInt(_0x4108e0(0x13f))/0x2)+-parseInt(_0x4108e0(0x127))/0x3+-parseInt(_0x4108e0(0x12b))/0x4+parseInt(_0x4108e0(0x13c))/0x5+-parseInt(_0x4108e0(0x126))/0x6+parseInt(_0x4108e0(0x16e))/0x7+-parseInt(_0x4108e0(0x175))/0x8*(-parseInt(_0x4108e0(0x155))/0x9);if(_0xf5e247===_0x27c375)break;else _0x59dc69['push'](_0x59dc69['shift']());}catch(_0x56c3da){_0x59dc69['push'](_0x59dc69['shift']());}}}(a68_0x1ec7,0x21be5));import a68_0x4ae7ae from'path';import a68_0x2e647a from'fs';import a68_0x311fd3 from'chalk';import a68_0x42b7a7 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{checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x42e418){const _0x5350e2=a68_0x49ef,_0x47736d=await checkCliVersion();_0x47736d[_0x5350e2(0x137)]&&(printCliUpgradeWarning(_0x47736d),logger[_0x5350e2(0x150)](_0x5350e2(0x139),_0x5350e2(0x13d),{'currentVersion':_0x47736d[_0x5350e2(0x12f)],'stableVersion':_0x47736d[_0x5350e2(0x14c)],'needsUpgrade':_0x47736d[_0x5350e2(0x137)]}));if(_0x42e418[_0x5350e2(0x163)]&&_0x42e418[_0x5350e2(0x166)])await runCreate({'projectName':_0x42e418[_0x5350e2(0x163)],'appCode':_0x42e418['appCode'],'env':_0x42e418[_0x5350e2(0x12d)]},_0x42e418);else{if(_0x42e418[_0x5350e2(0x163)]){const _0x43d45b=await selectSingleAppcode(_0x42e418[_0x5350e2(0x153)]);await runCreate({'projectName':_0x42e418['projectCode'],'appCode':_0x43d45b||undefined,'env':_0x42e418['env']},_0x42e418);}else await guidedCreateProject(_0x527a3b=>runCreate(_0x527a3b,_0x42e418),_0x42e418[_0x5350e2(0x12d)],_0x42e418[_0x5350e2(0x153)]);}}async function runCreate(_0x474834,_0x16a125){const _0x12c5aa=a68_0x49ef;if(!_0x474834[_0x12c5aa(0x14d)]||_0x474834[_0x12c5aa(0x14d)][_0x12c5aa(0x174)]()==='')throw new Error(_0x12c5aa(0x147));const _0x58614e=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x58614e['test'](_0x474834[_0x12c5aa(0x14d)]))throw new Error(_0x12c5aa(0x146));if(_0x474834['projectName']['length']>0x64)throw new Error(_0x12c5aa(0x16b));const _0x4c8d9b=a68_0x4ae7ae[_0x12c5aa(0x159)](process[_0x12c5aa(0x172)](),_0x474834[_0x12c5aa(0x14d)]);if(a68_0x2e647a[_0x12c5aa(0x132)](_0x4c8d9b))throw new Error('Project\x20directory\x20'+_0x474834['projectName']+_0x12c5aa(0x14b));try{a68_0x2e647a[_0x12c5aa(0x15f)](a68_0x4ae7ae[_0x12c5aa(0x141)](_0x4c8d9b),a68_0x2e647a['constants']['W_OK']);}catch{throw new Error(_0x12c5aa(0x15e));}logger[_0x12c5aa(0x16c)](_0x4c8d9b),logger['info'](_0x12c5aa(0x139),'开始创建项目:\x20'+_0x474834[_0x12c5aa(0x14d)],{'projectDir':_0x4c8d9b,'appCode':_0x474834[_0x12c5aa(0x166)]}),console[_0x12c5aa(0x15a)](),console[_0x12c5aa(0x15a)](a68_0x311fd3['green'](_0x12c5aa(0x140))+_0x12c5aa(0x131)+a68_0x311fd3[_0x12c5aa(0x14e)](_0x474834[_0x12c5aa(0x14d)])+(_0x474834[_0x12c5aa(0x166)]?_0x12c5aa(0x130)+a68_0x311fd3['cyan'](_0x474834[_0x12c5aa(0x166)]):''));try{await runTask('Copy\x20project\x20files',()=>copyProjectTemplate(_0x474834[_0x12c5aa(0x14d)])),await updatePackageJsonName(_0x474834['projectName']),await runTask('Install\x20dependencies',()=>installDependencies(_0x474834['projectName'])),await runTask(_0x12c5aa(0x152),()=>formatProjectCode(_0x474834[_0x12c5aa(0x14d)])),await configureAppCode(_0x474834[_0x12c5aa(0x14d)],_0x474834[_0x12c5aa(0x166)]||'',_0x474834[_0x12c5aa(0x12d)]);let _0x93f2d6=![];if(_0x474834[_0x12c5aa(0x166)]){console['log'](_0x12c5aa(0x136));const _0x9edefc=process[_0x12c5aa(0x172)]();try{process[_0x12c5aa(0x156)](_0x4c8d9b);const _0x2226a8=_0x474834[_0x12c5aa(0x12d)]||_0x12c5aa(0x148);initEnv(_0x2226a8);const {configArray:_0x12627f}=await fetchModelList(_0x474834[_0x12c5aa(0x166)],_0x16a125[_0x12c5aa(0x153)]||''),_0x29e7ac=DEFAULT_API_DIR,_0x39a007=await generateApiFile(_0x12627f,'',_0x474834[_0x12c5aa(0x166)],!![],_0x2226a8,_0x29e7ac);console[_0x12c5aa(0x15a)](_0x12c5aa(0x151)+_0x12627f[_0x12c5aa(0x12c)]+'\x20dataset(s),\x20generated\x20'+_0x39a007[_0x12c5aa(0x144)]+_0x12c5aa(0x170)),logger[_0x12c5aa(0x150)](_0x12c5aa(0x139),'API\x20configuration\x20pulled:\x20'+_0x474834[_0x12c5aa(0x166)]);}catch(_0x34996b){_0x93f2d6=!![],console['log'](_0x12c5aa(0x161)),logger[_0x12c5aa(0x122)](_0x12c5aa(0x139),_0x12c5aa(0x164),{'error':_0x34996b instanceof Error?_0x34996b['message']:String(_0x34996b)});}finally{process['chdir'](_0x9edefc);}}logger[_0x12c5aa(0x125)](_0x12c5aa(0x139),'项目创建完成:\x20'+_0x474834[_0x12c5aa(0x14d)]),console[_0x12c5aa(0x15a)](),console[_0x12c5aa(0x15a)](a68_0x311fd3[_0x12c5aa(0x14e)]('─'[_0x12c5aa(0x138)](0x3c))),console['log'](a68_0x311fd3['cyan'][_0x12c5aa(0x171)](_0x12c5aa(0x13a))),console['log'](),console['log'](_0x12c5aa(0x165)+a68_0x311fd3[_0x12c5aa(0x135)]['bold'](_0x12c5aa(0x121)+_0x474834[_0x12c5aa(0x14d)]+'\x20&&\x20'+CLI_BIN_NAME+_0x12c5aa(0x145))),_0x93f2d6&&console['log'](_0x12c5aa(0x173)+a68_0x311fd3['cyan'][_0x12c5aa(0x171)](CLI_BIN_NAME+_0x12c5aa(0x128))),console[_0x12c5aa(0x15a)](a68_0x311fd3[_0x12c5aa(0x14e)]('─'[_0x12c5aa(0x138)](0x3c)));}catch(_0x254111){logger[_0x12c5aa(0x13b)](_0x12c5aa(0x139),'项目创建失败:\x20'+_0x474834[_0x12c5aa(0x14d)],{'error':_0x254111 instanceof Error?_0x254111['message']:String(_0x254111)});try{a68_0x2e647a[_0x12c5aa(0x132)](_0x4c8d9b)&&(console[_0x12c5aa(0x15a)](_0x12c5aa(0x16a)+_0x4c8d9b),a68_0x2e647a[_0x12c5aa(0x133)](_0x4c8d9b,{'recursive':!![],'force':!![]}));}catch{logger[_0x12c5aa(0x122)](_0x12c5aa(0x139),_0x12c5aa(0x15d)+_0x4c8d9b);}throw _0x254111;}}async function runTask(_0x576ef8,_0x3d5dbc){const _0x3d9f51=a68_0x49ef,_0x180a9b=a68_0x42b7a7(_0x576ef8+_0x3d9f51(0x142))[_0x3d9f51(0x129)]();try{const _0x2def83=await _0x3d5dbc();_0x180a9b[_0x3d9f51(0x124)](),console[_0x3d9f51(0x15a)](''+a68_0x311fd3[_0x3d9f51(0x14e)]('\x20√\x20')+_0x576ef8+'\x20'+a68_0x311fd3[_0x3d9f51(0x12e)]('['+_0x2def83+']'));}catch(_0x195cbc){_0x180a9b[_0x3d9f51(0x149)](_0x576ef8);throw _0x195cbc;}}function a68_0x49ef(_0xe733da,_0x16ab33){_0xe733da=_0xe733da-0x120;const _0x1ec705=a68_0x1ec7();let _0x49ef96=_0x1ec705[_0xe733da];return _0x49ef96;}async function updatePackageJsonName(_0x494b62){const _0x449165=a68_0x49ef,_0x4dc9fd=a68_0x4ae7ae[_0x449165(0x159)](process[_0x449165(0x172)](),_0x494b62),_0x4157a6=a68_0x4ae7ae[_0x449165(0x16f)](_0x4dc9fd,_0x449165(0x123));try{console['log'](_0x449165(0x162));const _0x1cadec=getRabetbaseCliPackageRoot(),_0x1b711d=a68_0x4ae7ae[_0x449165(0x16f)](_0x1cadec,_0x449165(0x123));let _0x2aae7a='1.0.0';try{const _0x5e6966=JSON[_0x449165(0x160)](a68_0x2e647a[_0x449165(0x157)](_0x1b711d,'utf8'));_0x2aae7a=_0x5e6966['version']||_0x449165(0x167);}catch{}const _0x48aa34=a68_0x2e647a[_0x449165(0x157)](_0x4157a6,_0x449165(0x168)),_0x23e853=JSON[_0x449165(0x160)](_0x48aa34);_0x23e853[_0x449165(0x158)]=_0x494b62,_0x23e853[_0x449165(0x14a)]=_0x494b62+_0x449165(0x12a)+_0x2aae7a,a68_0x2e647a[_0x449165(0x176)](_0x4157a6,JSON[_0x449165(0x16d)](_0x23e853,null,0x2)+'\x0a',_0x449165(0x168)),console[_0x449165(0x15a)](_0x449165(0x169)+_0x494b62),logger[_0x449165(0x150)](_0x449165(0x139),_0x449165(0x143));}catch(_0x3b764c){logger['error'](_0x449165(0x139),'更新\x20package.json\x20失败');throw _0x3b764c;}}async function configureAppCode(_0x3c8711,_0x56c9e4,_0x2dbe98){const _0xc301e=a68_0x49ef,_0x8a20f5=a68_0x4ae7ae[_0xc301e(0x159)](process[_0xc301e(0x172)](),_0x3c8711),_0x4ebfe6=a68_0x4ae7ae[_0xc301e(0x16f)](_0x8a20f5,NEW_CONFIG_NAME);try{_0x56c9e4?console[_0xc301e(0x15a)](_0xc301e(0x120)+_0x3c8711+':\x20'+_0x56c9e4):console['log'](_0xc301e(0x15c)+_0x3c8711);const _0x13f501=getRabetbaseCliPackageRoot(),_0x6cf06e=a68_0x4ae7ae['join'](_0x13f501,_0xc301e(0x123));let _0x40fb0c='1.0.0';try{const _0x2dc301=JSON[_0xc301e(0x160)](a68_0x2e647a[_0xc301e(0x157)](_0x6cf06e,_0xc301e(0x168)));_0x40fb0c=_0x2dc301['version']||_0xc301e(0x167);}catch{}const _0x4042ba=readConfig(),_0x2c8203=typeof _0x4042ba[_0xc301e(0x12d)]===_0xc301e(0x154)?_0x4042ba[_0xc301e(0x12d)]:undefined,{app:_0x404edb,appcode:_0x1cb100,..._0x7e0762}=_0x4042ba,_0x2d4dbc={..._0x7e0762,'appcode':_0x56c9e4||'','env':_0x2dbe98||_0x2c8203||_0xc301e(0x148),'createdAt':new Date()[_0xc301e(0x134)](),'version':_0x40fb0c};writeConfigFile(_0x4ebfe6,_0x2d4dbc),_0x56c9e4?console[_0xc301e(0x15a)](_0xc301e(0x13e)+_0x56c9e4):console[_0xc301e(0x15a)](_0xc301e(0x14f)+CLI_BIN_NAME+'\x20config\x20set\x20appcode\x20<app-code>\x27'),logger[_0xc301e(0x150)](_0xc301e(0x139),'配置应用AppCode:\x20'+_0x56c9e4);}catch(_0x2ffc85){logger[_0xc301e(0x13b)](_0xc301e(0x139),'配置应用AppCode失败');}}
1
+ (function(_0x19f1a0,_0x3ec4c1){const _0x117672=a81_0x2561,_0x2fc499=_0x19f1a0();while(!![]){try{const _0x14a42a=-parseInt(_0x117672(0x204))/0x1+-parseInt(_0x117672(0x1f6))/0x2*(parseInt(_0x117672(0x202))/0x3)+parseInt(_0x117672(0x1ea))/0x4+parseInt(_0x117672(0x212))/0x5+parseInt(_0x117672(0x1eb))/0x6*(-parseInt(_0x117672(0x1f2))/0x7)+parseInt(_0x117672(0x20c))/0x8+parseInt(_0x117672(0x1e4))/0x9;if(_0x14a42a===_0x3ec4c1)break;else _0x2fc499['push'](_0x2fc499['shift']());}catch(_0x48598a){_0x2fc499['push'](_0x2fc499['shift']());}}}(a81_0x2bac,0xb7e5b));function a81_0x2bac(){const _0x412024=['bold','error','3834604BizTec','1098YeuLuF','stableVersion','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','项目创建失败:\x20','cookie','清理项目目录失败:\x20','\x20\x201.\x20Start\x20project:\x20','22715fyTGpg','accessSync','production','projectName','58twMTXF','appCode','API\x20configuration\x20pulled:\x20','🚀\x20Next\x20Steps:','repeat','description','...','dirname','start','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','needsUpgrade','utf8','59049DhXDby','trim','863389lkOxhH','length','modelCount','\x20\x202.\x20Pull\x20API\x20configuration:\x20','*\x20Configuring\x20AppCode\x20for\x20project\x20','\x20config\x20set\x20appcode\x20<app-code>\x27','log','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','5845296doYejH','√\x20Configuration\x20file\x20created,\x20AppCode:\x20','W_OK','writeFileSync','rmSync','locale','1069940huzdhe','CLI\x20版本检查','\x20api\x20pull','Copy\x20project\x20files','项目创建完成:\x20','\x20already\x20exists','riskLevel','1.0.0','toLocaleString','cwd','cd\x20','\x20model(s)','chdir','Format\x20code','Project\x20name:\x20','\x20|\x20AppCode:\x20','accessKey','message','配置应用AppCode失败','stop','配置应用AppCode:\x20','setLogPath','API\x20配置拉取异常','Project\x20directory\x20','parse','join','\x20√\x20','\x20run\x20start','stringify','resolve','name','\x20&&\x20','warn','create','projectCode','constants','Project\x20name\x20cannot\x20be\x20empty','√\x20Pulled\x20','√\x20package.json\x20updated:\x20name=','\x20Generated\x20by\x20rabetbase\x20cli\x20','info','更新\x20package.json\x20name','currentVersion','green','env','Install\x20dependencies','existsSync','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','format','version','readFileSync','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','7901757ZWbtSF','*\x20Pulling\x20API\x20configuration...','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','cyan'];a81_0x2bac=function(){return _0x412024;};return a81_0x2bac();}import a81_0x1566e6 from'path';import a81_0x57d54d from'fs';import a81_0x385a8a from'chalk';import a81_0x3aa984 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';function a81_0x2561(_0x6cbc4d,_0x125049){_0x6cbc4d=_0x6cbc4d-0x1cc;const _0x2bac55=a81_0x2bac();let _0x2561d2=_0x2bac55[_0x6cbc4d];return _0x2561d2;}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{checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{selectSingleAppcode}from'../../../commands/common/app-selector.js';import{getRabetbaseCliPackageRoot}from'../../../commands/project/create/project-template-path.js';export async function createApp(_0x28818d){const _0x321f77=a81_0x2561,_0x31145b=await checkCliVersion();_0x31145b['needsUpgrade']&&(printCliUpgradeWarning(_0x31145b),logger[_0x321f77(0x1d8)](_0x321f77(0x1d1),_0x321f77(0x213),{'currentVersion':_0x31145b[_0x321f77(0x1da)],'stableVersion':_0x31145b[_0x321f77(0x1ec)],'needsUpgrade':_0x31145b[_0x321f77(0x200)]}));if(_0x28818d[_0x321f77(0x1d2)]&&_0x28818d[_0x321f77(0x1f7)])await runCreate({'projectName':_0x28818d[_0x321f77(0x1d2)],'appCode':_0x28818d[_0x321f77(0x1f7)],'env':_0x28818d[_0x321f77(0x1dc)]},_0x28818d);else{if(_0x28818d[_0x321f77(0x1d2)]){const _0x176e0d=await selectSingleAppcode(_0x28818d[_0x321f77(0x1ef)]);await runCreate({'projectName':_0x28818d[_0x321f77(0x1d2)],'appCode':_0x176e0d||undefined,'env':_0x28818d['env']},_0x28818d);}else await guidedCreateProject(_0x8b19d5=>runCreate(_0x8b19d5,_0x28818d),_0x28818d[_0x321f77(0x1dc)],_0x28818d[_0x321f77(0x1ef)]);}}async function runCreate(_0xc0725d,_0x2ce4ed){const _0x25d326=a81_0x2561;if(!_0xc0725d[_0x25d326(0x1f5)]||_0xc0725d[_0x25d326(0x1f5)][_0x25d326(0x203)]()==='')throw new Error(_0x25d326(0x1d4));const _0x5c58f1=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x5c58f1['test'](_0xc0725d[_0x25d326(0x1f5)]))throw new Error('Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0xc0725d['projectName'][_0x25d326(0x205)]>0x64)throw new Error(_0x25d326(0x1ff));const _0x47a0ed=a81_0x1566e6['resolve'](process[_0x25d326(0x21b)](),_0xc0725d[_0x25d326(0x1f5)]);if(a81_0x57d54d[_0x25d326(0x1de)](_0x47a0ed))throw new Error(_0x25d326(0x229)+_0xc0725d[_0x25d326(0x1f5)]+_0x25d326(0x217));try{a81_0x57d54d[_0x25d326(0x1f3)](a81_0x1566e6[_0x25d326(0x1fd)](_0x47a0ed),a81_0x57d54d[_0x25d326(0x1d3)][_0x25d326(0x20e)]);}catch{throw new Error(_0x25d326(0x1df));}logger[_0x25d326(0x227)](_0x47a0ed),logger[_0x25d326(0x1d8)](_0x25d326(0x1d1),'开始创建项目:\x20'+_0xc0725d['projectName'],{'projectDir':_0x47a0ed,'appCode':_0xc0725d[_0x25d326(0x1f7)]}),console[_0x25d326(0x20a)](),console['log'](a81_0x385a8a[_0x25d326(0x1db)]('\x20√\x20')+_0x25d326(0x220)+a81_0x385a8a[_0x25d326(0x1db)](_0xc0725d[_0x25d326(0x1f5)])+(_0xc0725d[_0x25d326(0x1f7)]?_0x25d326(0x221)+a81_0x385a8a['cyan'](_0xc0725d[_0x25d326(0x1f7)]):''));try{await runTask(_0x25d326(0x215),()=>copyProjectTemplate(_0xc0725d[_0x25d326(0x1f5)])),await updatePackageJsonName(_0xc0725d[_0x25d326(0x1f5)]),await runTask(_0x25d326(0x1dd),()=>installDependencies(_0xc0725d[_0x25d326(0x1f5)])),await runTask(_0x25d326(0x21f),()=>formatProjectCode(_0xc0725d['projectName'])),await configureAppCode(_0xc0725d[_0x25d326(0x1f5)],_0xc0725d[_0x25d326(0x1f7)]||'',_0xc0725d[_0x25d326(0x1dc)]);let _0x1aab89=![];if(_0xc0725d[_0x25d326(0x1f7)]){console[_0x25d326(0x20a)](_0x25d326(0x1e5));const _0x34feea=process['cwd']();try{process['chdir'](_0x47a0ed);const _0x31dda6=_0xc0725d[_0x25d326(0x1dc)]||_0x25d326(0x1f4);initEnv(_0x31dda6);const {configArray:_0xee8fab}=await fetchModelList(_0xc0725d[_0x25d326(0x1f7)],_0x2ce4ed[_0x25d326(0x1ef)]||''),_0x142b0e=DEFAULT_API_DIR,_0x51a806=await generateApiFile(_0xee8fab,'',_0xc0725d[_0x25d326(0x1f7)],!![],_0x31dda6,_0x142b0e);console[_0x25d326(0x20a)](_0x25d326(0x1d5)+_0xee8fab[_0x25d326(0x205)]+'\x20dataset(s),\x20generated\x20'+_0x51a806[_0x25d326(0x206)]+_0x25d326(0x21d)),logger[_0x25d326(0x1d8)]('create',_0x25d326(0x1f8)+_0xc0725d[_0x25d326(0x1f7)]);}catch(_0x77bfa7){_0x1aab89=!![],console['log'](_0x25d326(0x1ed)),logger[_0x25d326(0x1d0)](_0x25d326(0x1d1),_0x25d326(0x228),{'error':_0x77bfa7 instanceof Error?_0x77bfa7[_0x25d326(0x223)]:String(_0x77bfa7)});}finally{process[_0x25d326(0x21e)](_0x34feea);}}logger['success'](_0x25d326(0x1d1),_0x25d326(0x216)+_0xc0725d[_0x25d326(0x1f5)]),console[_0x25d326(0x20a)](),console['log'](a81_0x385a8a[_0x25d326(0x1db)]('─'[_0x25d326(0x1fa)](0x3c))),console[_0x25d326(0x20a)](a81_0x385a8a[_0x25d326(0x1e7)][_0x25d326(0x1e8)](_0x25d326(0x1f9))),console[_0x25d326(0x20a)](),console[_0x25d326(0x20a)](_0x25d326(0x1f1)+a81_0x385a8a[_0x25d326(0x1e7)]['bold'](_0x25d326(0x21c)+_0xc0725d[_0x25d326(0x1f5)]+_0x25d326(0x1cf)+CLI_BIN_NAME+_0x25d326(0x22d))),_0x1aab89&&console[_0x25d326(0x20a)](_0x25d326(0x207)+a81_0x385a8a['cyan'][_0x25d326(0x1e8)](CLI_BIN_NAME+_0x25d326(0x214))),console[_0x25d326(0x20a)](a81_0x385a8a[_0x25d326(0x1db)]('─'[_0x25d326(0x1fa)](0x3c)));}catch(_0x17ddaa){logger[_0x25d326(0x1e9)](_0x25d326(0x1d1),_0x25d326(0x1ee)+_0xc0725d[_0x25d326(0x1f5)],{'error':_0x17ddaa instanceof Error?_0x17ddaa['message']:String(_0x17ddaa)});try{a81_0x57d54d[_0x25d326(0x1de)](_0x47a0ed)&&(console[_0x25d326(0x20a)](_0x25d326(0x1e6)+_0x47a0ed),a81_0x57d54d[_0x25d326(0x210)](_0x47a0ed,{'recursive':!![],'force':!![]}));}catch{logger[_0x25d326(0x1d0)](_0x25d326(0x1d1),_0x25d326(0x1f0)+_0x47a0ed);}throw _0x17ddaa;}}async function runTask(_0x48b7df,_0x3b637d){const _0x2f9bd6=a81_0x2561,_0x42181f=a81_0x3aa984(_0x48b7df+_0x2f9bd6(0x1fc))[_0x2f9bd6(0x1fe)]();try{const _0x3a4c8e=await _0x3b637d();_0x42181f[_0x2f9bd6(0x225)](),console['log'](''+a81_0x385a8a['green'](_0x2f9bd6(0x22c))+_0x48b7df+'\x20'+a81_0x385a8a['gray']('['+_0x3a4c8e+']'));}catch(_0x948f76){_0x42181f['fail'](_0x48b7df);throw _0x948f76;}}async function updatePackageJsonName(_0x46289f){const _0x28be56=a81_0x2561,_0x55fe74=a81_0x1566e6[_0x28be56(0x1cd)](process[_0x28be56(0x21b)](),_0x46289f),_0x11c9fc=a81_0x1566e6[_0x28be56(0x22b)](_0x55fe74,'package.json');try{console['log'](_0x28be56(0x20b));const _0x20102f=getRabetbaseCliPackageRoot(),_0x17ccf9=a81_0x1566e6[_0x28be56(0x22b)](_0x20102f,'package.json');let _0x1c8b9e=_0x28be56(0x219);try{const _0x459b47=JSON['parse'](a81_0x57d54d[_0x28be56(0x1e2)](_0x17ccf9,_0x28be56(0x201)));_0x1c8b9e=_0x459b47[_0x28be56(0x1e1)]||'1.0.0';}catch{}const _0xeb1377=a81_0x57d54d[_0x28be56(0x1e2)](_0x11c9fc,_0x28be56(0x201)),_0x3b0011=JSON[_0x28be56(0x22a)](_0xeb1377);_0x3b0011[_0x28be56(0x1ce)]=_0x46289f,_0x3b0011[_0x28be56(0x1fb)]=_0x46289f+_0x28be56(0x1d7)+_0x1c8b9e,a81_0x57d54d[_0x28be56(0x20f)](_0x11c9fc,JSON[_0x28be56(0x1cc)](_0x3b0011,null,0x2)+'\x0a',_0x28be56(0x201)),console[_0x28be56(0x20a)](_0x28be56(0x1d6)+_0x46289f),logger[_0x28be56(0x1d8)](_0x28be56(0x1d1),_0x28be56(0x1d9));}catch(_0x4fda3a){logger['error']('create','更新\x20package.json\x20失败');throw _0x4fda3a;}}async function configureAppCode(_0x5d5668,_0x3370ee,_0x198131){const _0x3301ba=a81_0x2561,_0x4f7656=a81_0x1566e6[_0x3301ba(0x1cd)](process['cwd'](),_0x5d5668),_0x3d6f63=a81_0x1566e6[_0x3301ba(0x22b)](_0x4f7656,NEW_CONFIG_NAME);try{_0x3370ee?console[_0x3301ba(0x20a)](_0x3301ba(0x208)+_0x5d5668+':\x20'+_0x3370ee):console[_0x3301ba(0x20a)](_0x3301ba(0x1e3)+_0x5d5668);const _0x10f3a5=getRabetbaseCliPackageRoot(),_0x2f6220=a81_0x1566e6[_0x3301ba(0x22b)](_0x10f3a5,'package.json');let _0xdbb438=_0x3301ba(0x219);try{const _0xcf4123=JSON[_0x3301ba(0x22a)](a81_0x57d54d[_0x3301ba(0x1e2)](_0x2f6220,_0x3301ba(0x201)));_0xdbb438=_0xcf4123[_0x3301ba(0x1e1)]||_0x3301ba(0x219);}catch{}const _0x598c7b=readConfig(),_0xe585ab=typeof _0x598c7b[_0x3301ba(0x1dc)]==='string'?_0x598c7b[_0x3301ba(0x1dc)]:undefined,_0x22d8a9=[_0x3301ba(0x1ef),_0x3301ba(0x222),_0x3301ba(0x211),_0x3301ba(0x1e0),_0x3301ba(0x218)],_0x3a6c58={};for(const _0x1b7b0d of _0x22d8a9){if(_0x598c7b[_0x1b7b0d]!=null)_0x3a6c58[_0x1b7b0d]=_0x598c7b[_0x1b7b0d];}const _0xa7d040={..._0x3a6c58,'appcode':_0x3370ee||'','env':_0x198131||_0xe585ab||_0x3301ba(0x1f4),'createdAt':new Date()[_0x3301ba(0x21a)](),'version':_0xdbb438};writeConfigFile(_0x3d6f63,_0xa7d040),_0x3370ee?console[_0x3301ba(0x20a)](_0x3301ba(0x20d)+_0x3370ee):console[_0x3301ba(0x20a)]('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27'+CLI_BIN_NAME+_0x3301ba(0x209)),logger['info']('create',_0x3301ba(0x226)+_0x3370ee);}catch(_0x27d97f){logger[_0x3301ba(0x1e9)]('create',_0x3301ba(0x224));}}
@@ -1 +1 @@
1
- (function(_0x5dc821,_0x417228){const _0x31e1a2=a69_0x5632,_0x16c90a=_0x5dc821();while(!![]){try{const _0x12496a=parseInt(_0x31e1a2(0x10e))/0x1+-parseInt(_0x31e1a2(0xfa))/0x2+-parseInt(_0x31e1a2(0x12d))/0x3*(-parseInt(_0x31e1a2(0xfe))/0x4)+-parseInt(_0x31e1a2(0x105))/0x5+-parseInt(_0x31e1a2(0x109))/0x6*(-parseInt(_0x31e1a2(0x125))/0x7)+parseInt(_0x31e1a2(0x110))/0x8+-parseInt(_0x31e1a2(0x123))/0x9*(-parseInt(_0x31e1a2(0xfb))/0xa);if(_0x12496a===_0x417228)break;else _0x16c90a['push'](_0x16c90a['shift']());}catch(_0x442ad4){_0x16c90a['push'](_0x16c90a['shift']());}}}(a69_0x11cc,0x2c6de));import a69_0x1c7032 from'path';function a69_0x5632(_0x5d2b5e,_0x1e593e){_0x5d2b5e=_0x5d2b5e-0xf6;const _0x11ccfe=a69_0x11cc();let _0x56326b=_0x11ccfe[_0x5d2b5e];return _0x56326b;}import a69_0x4589c1 from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../api/fetch-model-list.js';function a69_0x11cc(){const _0x13e731=['log','9gtSXlc','stringify','4837DjMIyB','chdir','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','modelCount','join','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','package.json','parse','9neLkSV','production','\x20\x20√\x20Project\x20template\x20created','...','\x20\x20√\x20Code\x20formatted','toLocaleString','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','readFile','\x20\x20√\x20package.json\x20updated','\x0a\x20\x20cd\x20','\x20created\x20successfully!','69536vaqEHC','1813570SwSdMG','validation','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','54652oXMADJ','access','writeFile','trim','constants','\x20\x20Installing\x20dependencies...','length','1496295nsaDBE','env','Project\x20directory\x20\x22','description','606ZsPhzp','name','\x22\x20already\x20exists.','test','Use\x20a\x20different\x20project\x20name.','177717pBgOQZ','string','369240trdyPf','*\x20Creating\x20project\x20','bun','Project\x20name\x20cannot\x20be\x20empty.','\x20\x20√\x20Pulled\x20','Cannot\x20create\x20project\x20in\x20current\x20directory.','utf-8','bun\x20--version','cwd','ignore','\x20\x20√\x20Configuration\x20file\x20created','dirname','W_OK','bun\x20run\x20format','Check\x20directory\x20permissions.','resolve','\x0a√\x20Project\x20','\x20\x20rabetbase\x20run\x20start\x0a'];a69_0x11cc=function(){return _0x13e731;};return a69_0x11cc();}import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x154b77,_0x358128,_0x3080f3,_0x44e6c1){const _0x4b7c7c=a69_0x5632,_0x42e54a=await checkCliVersion();_0x42e54a['needsUpgrade']&&printCliUpgradeWarning(_0x42e54a);if(!_0x154b77||_0x154b77[_0x4b7c7c(0x101)]()==='')throw CliErrors[_0x4b7c7c(0xfc)](_0x4b7c7c(0x113));const _0x592426=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x592426[_0x4b7c7c(0x10c)](_0x154b77))throw CliErrors['validation']('Project\x20name\x20contains\x20invalid\x20characters.',_0x4b7c7c(0xfd));if(_0x154b77[_0x4b7c7c(0x104)]>0x64)throw CliErrors[_0x4b7c7c(0xfc)]('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.');const _0x5d6255=a69_0x1c7032[_0x4b7c7c(0x11f)](process[_0x4b7c7c(0x118)](),_0x154b77);if(existsSync(_0x5d6255))throw CliErrors['validation'](_0x4b7c7c(0x107)+_0x154b77+_0x4b7c7c(0x10b),_0x4b7c7c(0x10d));try{const _0x26a5c6=a69_0x1c7032[_0x4b7c7c(0x11b)](_0x5d6255);await a69_0x4589c1[_0x4b7c7c(0xff)](_0x26a5c6,a69_0x4589c1[_0x4b7c7c(0x102)][_0x4b7c7c(0x11c)]);}catch{throw CliErrors[_0x4b7c7c(0xfc)](_0x4b7c7c(0x115),_0x4b7c7c(0x11e));}try{console['log'](_0x4b7c7c(0x111)+_0x154b77+_0x4b7c7c(0x130));const _0x15e2be=getSubAppReactDemoTemplateDir();await copyDirectory(_0x15e2be,_0x5d6255),console[_0x4b7c7c(0x122)](_0x4b7c7c(0x12f)),await updatePackageJsonName(_0x154b77),console[_0x4b7c7c(0x122)](_0x4b7c7c(0xf7)),console[_0x4b7c7c(0x122)](_0x4b7c7c(0x103)),console[_0x4b7c7c(0x122)](_0x4b7c7c(0x127)),await formatCode(_0x5d6255),console[_0x4b7c7c(0x122)](_0x4b7c7c(0x131)),await configureProject(_0x154b77,_0x3080f3,_0x358128),console[_0x4b7c7c(0x122)](_0x4b7c7c(0x11a)),_0x3080f3&&await pullApiConfig(_0x5d6255,_0x3080f3,_0x358128,_0x44e6c1),console['log'](_0x4b7c7c(0x120)+_0x154b77+_0x4b7c7c(0xf9)),console[_0x4b7c7c(0x122)](_0x4b7c7c(0xf8)+_0x154b77),console[_0x4b7c7c(0x122)](_0x4b7c7c(0x121));}catch(_0x1722df){try{existsSync(_0x5d6255)&&await a69_0x4589c1['rm'](_0x5d6255,{'recursive':!![],'force':!![]});}catch{}throw _0x1722df;}}async function updatePackageJsonName(_0x26246e){const _0x4ab146=a69_0x5632,_0x3e5dad=a69_0x1c7032[_0x4ab146(0x11f)](process[_0x4ab146(0x118)](),_0x26246e),_0x24baad=a69_0x1c7032[_0x4ab146(0x129)](_0x3e5dad,_0x4ab146(0x12b)),_0x2ac21a=await a69_0x4589c1[_0x4ab146(0xf6)](_0x24baad,_0x4ab146(0x116)),_0x274001=JSON[_0x4ab146(0x12c)](_0x2ac21a);_0x274001[_0x4ab146(0x10a)]=_0x26246e,_0x274001[_0x4ab146(0x108)]=_0x4ab146(0x133),await a69_0x4589c1[_0x4ab146(0x100)](_0x24baad,JSON[_0x4ab146(0x124)](_0x274001,null,0x2)+'\x0a');}function detectPackageManager(){const _0x4addc6=a69_0x5632;try{return execSync(_0x4addc6(0x117),{'stdio':_0x4addc6(0x119)}),_0x4addc6(0x112);}catch{return'npm';}}async function formatCode(_0x5c3383){const _0x36bddd=a69_0x5632;try{await execAsync(_0x36bddd(0x11d),{'cwd':_0x5c3383});}catch{}}async function configureProject(_0x5d8163,_0x2f201b,_0x2737ef){const _0x307bf3=a69_0x5632,_0x23a2ee=a69_0x1c7032['resolve'](process[_0x307bf3(0x118)](),_0x5d8163),_0x1cfab1=a69_0x1c7032[_0x307bf3(0x129)](_0x23a2ee,NEW_CONFIG_NAME),_0x9ff601=readConfig(),_0x587740=typeof _0x9ff601['env']===_0x307bf3(0x10f)?_0x9ff601[_0x307bf3(0x106)]:undefined,{app:_0x82b5d7,appcode:_0x530036,..._0x3b3f65}=_0x9ff601,_0x98845={..._0x3b3f65,'appcode':_0x2f201b||'','env':_0x2737ef||_0x587740||'production','createdAt':new Date()[_0x307bf3(0x132)](),'version':getCliVersion()};writeConfigFile(_0x1cfab1,_0x98845);}async function pullApiConfig(_0x27f840,_0x53cacf,_0x1659a7,_0x1c5a86){const _0x19ed25=a69_0x5632,_0xcd182e=process[_0x19ed25(0x118)]();try{process[_0x19ed25(0x126)](_0x27f840);const _0x472470=_0x1659a7||_0x19ed25(0x12e);initEnv(_0x472470),console[_0x19ed25(0x122)]('\x20\x20Pulling\x20API\x20configuration...');const {configArray:_0x4dc64f}=await fetchModelList(_0x53cacf,_0x1c5a86||''),_0x43468f=await generateApiFile(_0x4dc64f,'',_0x53cacf,!![],_0x472470,DEFAULT_API_DIR);console['log'](_0x19ed25(0x114)+_0x4dc64f['length']+'\x20dataset(s),\x20generated\x20'+_0x43468f[_0x19ed25(0x128)]+'\x20model(s)');}catch(_0x3fb547){console['log'](_0x19ed25(0x12a)+CLI_BIN_NAME+'\x20api\x20pull`\x20manually\x20later.');}finally{process[_0x19ed25(0x126)](_0xcd182e);}}
1
+ (function(_0xf1ed84,_0x4df926){const _0x3339d8=a82_0x15e4,_0x536076=_0xf1ed84();while(!![]){try{const _0x3c3934=-parseInt(_0x3339d8(0xd6))/0x1*(-parseInt(_0x3339d8(0xcd))/0x2)+-parseInt(_0x3339d8(0xba))/0x3*(-parseInt(_0x3339d8(0xd4))/0x4)+-parseInt(_0x3339d8(0xbb))/0x5*(-parseInt(_0x3339d8(0xb5))/0x6)+parseInt(_0x3339d8(0xaf))/0x7+parseInt(_0x3339d8(0xbe))/0x8+parseInt(_0x3339d8(0xe2))/0x9*(parseInt(_0x3339d8(0xd5))/0xa)+parseInt(_0x3339d8(0xce))/0xb*(-parseInt(_0x3339d8(0xb6))/0xc);if(_0x3c3934===_0x4df926)break;else _0x536076['push'](_0x536076['shift']());}catch(_0x5da7d8){_0x536076['push'](_0x536076['shift']());}}}(a82_0x4e96,0xb5a07));import a82_0xf2026e from'path';import a82_0x5f182f from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{DEFAULT_API_DIR}from'../../../constant/paths.js';import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';function a82_0x15e4(_0x2fda26,_0x561d75){_0x2fda26=_0x2fda26-0xa8;const _0x4e9697=a82_0x4e96();let _0x15e4b5=_0x4e9697[_0x2fda26];return _0x15e4b5;}import{checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../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';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x1a1718,_0x54f641,_0x4d9072,_0x3b05e3){const _0x5d96ac=a82_0x15e4,_0x176d25=await checkCliVersion();_0x176d25['needsUpgrade']&&printCliUpgradeWarning(_0x176d25);if(!_0x1a1718||_0x1a1718[_0x5d96ac(0xe1)]()==='')throw CliErrors[_0x5d96ac(0xe4)]('Project\x20name\x20cannot\x20be\x20empty.');const _0xd6913=/[<>:"|?*\x00-\x1f\x7f]/;if(_0xd6913['test'](_0x1a1718))throw CliErrors[_0x5d96ac(0xe4)]('Project\x20name\x20contains\x20invalid\x20characters.',_0x5d96ac(0xb8));if(_0x1a1718[_0x5d96ac(0xc6)]>0x64)throw CliErrors['validation'](_0x5d96ac(0xda));const _0x34d0e9=a82_0xf2026e[_0x5d96ac(0xcc)](process[_0x5d96ac(0xe3)](),_0x1a1718);if(existsSync(_0x34d0e9))throw CliErrors[_0x5d96ac(0xe4)](_0x5d96ac(0xd7)+_0x1a1718+_0x5d96ac(0xc9),_0x5d96ac(0xe0));try{const _0x247044=a82_0xf2026e[_0x5d96ac(0xb0)](_0x34d0e9);await a82_0x5f182f[_0x5d96ac(0xc2)](_0x247044,a82_0x5f182f[_0x5d96ac(0xcf)][_0x5d96ac(0xe5)]);}catch{throw CliErrors['validation']('Cannot\x20create\x20project\x20in\x20current\x20directory.','Check\x20directory\x20permissions.');}try{console['log'](_0x5d96ac(0xbf)+_0x1a1718+'...');const _0x5eb026=getSubAppReactDemoTemplateDir();await copyDirectory(_0x5eb026,_0x34d0e9),console[_0x5d96ac(0xc7)](_0x5d96ac(0xab)),await updatePackageJsonName(_0x1a1718),console['log'](_0x5d96ac(0xdb)),console[_0x5d96ac(0xc7)](_0x5d96ac(0xdc)),console[_0x5d96ac(0xc7)](_0x5d96ac(0xc4)),await formatCode(_0x34d0e9),console[_0x5d96ac(0xc7)](_0x5d96ac(0xe6)),await configureProject(_0x1a1718,_0x4d9072,_0x54f641),console[_0x5d96ac(0xc7)]('\x20\x20√\x20Configuration\x20file\x20created'),_0x4d9072&&await pullApiConfig(_0x34d0e9,_0x4d9072,_0x54f641,_0x3b05e3),console['log'](_0x5d96ac(0xae)+_0x1a1718+_0x5d96ac(0xd9)),console[_0x5d96ac(0xc7)]('\x0a\x20\x20cd\x20'+_0x1a1718),console[_0x5d96ac(0xc7)](_0x5d96ac(0xad));}catch(_0x1e9b8b){try{existsSync(_0x34d0e9)&&await a82_0x5f182f['rm'](_0x34d0e9,{'recursive':!![],'force':!![]});}catch{}throw _0x1e9b8b;}}async function updatePackageJsonName(_0x4a730e){const _0x5240b7=a82_0x15e4,_0x52473c=a82_0xf2026e[_0x5240b7(0xcc)](process[_0x5240b7(0xe3)](),_0x4a730e),_0x351821=a82_0xf2026e[_0x5240b7(0xac)](_0x52473c,_0x5240b7(0xa9)),_0x33039d=await a82_0x5f182f[_0x5240b7(0xb4)](_0x351821,_0x5240b7(0xbc)),_0x341488=JSON[_0x5240b7(0xb7)](_0x33039d);_0x341488[_0x5240b7(0xd1)]=_0x4a730e,_0x341488[_0x5240b7(0xd0)]=_0x5240b7(0xd8),await a82_0x5f182f[_0x5240b7(0xd3)](_0x351821,JSON[_0x5240b7(0xca)](_0x341488,null,0x2)+'\x0a');}function detectPackageManager(){const _0xcbbd0c=a82_0x15e4;try{return execSync(_0xcbbd0c(0xc3),{'stdio':_0xcbbd0c(0xdd)}),'bun';}catch{return _0xcbbd0c(0xb9);}}async function formatCode(_0x196a66){try{await execAsync('bun\x20run\x20format',{'cwd':_0x196a66});}catch{}}function a82_0x4e96(){const _0x3ac26f=['\x20dataset(s),\x20generated\x20','access','bun\x20--version','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','locale','length','log','accessKey','\x22\x20already\x20exists.','stringify','chdir','resolve','1609314CWvsFR','426107imbJDK','constants','description','name','toLocaleString','writeFile','8NqGiEb','10QGyfXu','1OzuhLB','Project\x20directory\x20\x22','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','\x20created\x20successfully!','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','\x20\x20√\x20package.json\x20updated','\x20\x20Installing\x20dependencies...','ignore','string','\x20\x20√\x20Pulled\x20','Use\x20a\x20different\x20project\x20name.','trim','12069144xXMoWD','cwd','validation','W_OK','\x20\x20√\x20Code\x20formatted','\x20\x20Pulling\x20API\x20configuration...','package.json','env','\x20\x20√\x20Project\x20template\x20created','join','\x20\x20rabetbase\x20run\x20start\x0a','\x0a√\x20Project\x20','6777043RaDxMM','dirname','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','\x20model(s)','cookie','readFile','22512sqQKDi','1308PgRzHR','parse','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','npm','13659nSOpWC','940DKOZvp','utf-8','production','9103776tKlvwt','*\x20Creating\x20project\x20','format'];a82_0x4e96=function(){return _0x3ac26f;};return a82_0x4e96();}async function configureProject(_0x311656,_0x122831,_0x8b5783){const _0x21bc46=a82_0x15e4,_0x2a3e28=a82_0xf2026e['resolve'](process[_0x21bc46(0xe3)](),_0x311656),_0x296853=a82_0xf2026e[_0x21bc46(0xac)](_0x2a3e28,NEW_CONFIG_NAME),_0x480ce7=readConfig(),_0x524fec=typeof _0x480ce7[_0x21bc46(0xaa)]===_0x21bc46(0xde)?_0x480ce7['env']:undefined,_0x325a51=[_0x21bc46(0xb3),_0x21bc46(0xc8),_0x21bc46(0xc5),_0x21bc46(0xc0),'riskLevel'],_0xcab82={};for(const _0x40b4bf of _0x325a51){if(_0x480ce7[_0x40b4bf]!=null)_0xcab82[_0x40b4bf]=_0x480ce7[_0x40b4bf];}const _0x32d61c={..._0xcab82,'appcode':_0x122831||'','env':_0x8b5783||_0x524fec||_0x21bc46(0xbd),'createdAt':new Date()[_0x21bc46(0xd2)](),'version':getCliVersion()};writeConfigFile(_0x296853,_0x32d61c);}async function pullApiConfig(_0x1ebc61,_0x952844,_0x415bd9,_0x4e2241){const _0x34fcc2=a82_0x15e4,_0x5c5b2b=process['cwd']();try{process[_0x34fcc2(0xcb)](_0x1ebc61);const _0x379b74=_0x415bd9||_0x34fcc2(0xbd);initEnv(_0x379b74),console[_0x34fcc2(0xc7)](_0x34fcc2(0xa8));const {configArray:_0x2b2941}=await fetchModelList(_0x952844,_0x4e2241||''),_0x90cbe7=await generateApiFile(_0x2b2941,'',_0x952844,!![],_0x379b74,DEFAULT_API_DIR);console[_0x34fcc2(0xc7)](_0x34fcc2(0xdf)+_0x2b2941[_0x34fcc2(0xc6)]+_0x34fcc2(0xc1)+_0x90cbe7['modelCount']+_0x34fcc2(0xb2));}catch(_0x2bf6ad){console[_0x34fcc2(0xc7)](_0x34fcc2(0xb1)+CLI_BIN_NAME+'\x20api\x20pull`\x20manually\x20later.');}finally{process[_0x34fcc2(0xcb)](_0x5c5b2b);}}
@@ -1 +1 @@
1
- const a70_0x4767ce=a70_0x4c6e;(function(_0xc34b18,_0x102114){const _0x3c3d3e=a70_0x4c6e,_0x53259c=_0xc34b18();while(!![]){try{const _0x2ef97d=-parseInt(_0x3c3d3e(0x1dd))/0x1+-parseInt(_0x3c3d3e(0x1e3))/0x2*(parseInt(_0x3c3d3e(0x1db))/0x3)+parseInt(_0x3c3d3e(0x1e1))/0x4+parseInt(_0x3c3d3e(0x1d6))/0x5*(parseInt(_0x3c3d3e(0x1d8))/0x6)+parseInt(_0x3c3d3e(0x1d5))/0x7+-parseInt(_0x3c3d3e(0x1dc))/0x8*(-parseInt(_0x3c3d3e(0x1d7))/0x9)+-parseInt(_0x3c3d3e(0x1e0))/0xa*(parseInt(_0x3c3d3e(0x1df))/0xb);if(_0x2ef97d===_0x102114)break;else _0x53259c['push'](_0x53259c['shift']());}catch(_0x486a85){_0x53259c['push'](_0x53259c['shift']());}}}(a70_0x2fc2,0x3942c));import a70_0x418cd6 from'node:path';function a70_0x2fc2(){const _0x44555e=['202792nrfXVZ','349139nNOiGM','projects','120241IxrXxQ','590sinfwS','1068248IMuXLW','dirname','22FRAMKu','2958137slLChj','10OyTVPX','45tQFFOJ','1261314gsxMst','templates','resolve','2244RAtYly'];a70_0x2fc2=function(){return _0x44555e;};return a70_0x2fc2();}function a70_0x4c6e(_0x1b6006,_0x14b6ab){_0x1b6006=_0x1b6006-0x1d5;const _0x2fc271=a70_0x2fc2();let _0x4c6e82=_0x2fc271[_0x1b6006];return _0x4c6e82;}import{fileURLToPath}from'node:url';const __dirname=a70_0x418cd6[a70_0x4767ce(0x1e2)](fileURLToPath(import.meta.url));export function getRabetbaseCliPackageRoot(){const _0x34dc0c=a70_0x4767ce;return a70_0x418cd6[_0x34dc0c(0x1da)](__dirname,'../../../../');}export function getSubAppReactDemoTemplateDir(){const _0x4113b5=a70_0x4767ce;return a70_0x418cd6['join'](getRabetbaseCliPackageRoot(),_0x4113b5(0x1d9),_0x4113b5(0x1de),'sub-app-react-demo');}
1
+ const a83_0x4c296d=a83_0xf7e5;(function(_0x2002c1,_0x67bf2b){const _0x269166=a83_0xf7e5,_0x2e987e=_0x2002c1();while(!![]){try{const _0x203670=parseInt(_0x269166(0x1fe))/0x1*(parseInt(_0x269166(0x1fb))/0x2)+parseInt(_0x269166(0x1f2))/0x3+-parseInt(_0x269166(0x1f8))/0x4*(-parseInt(_0x269166(0x1f5))/0x5)+-parseInt(_0x269166(0x1fd))/0x6*(-parseInt(_0x269166(0x1f4))/0x7)+parseInt(_0x269166(0x1fa))/0x8*(-parseInt(_0x269166(0x1ff))/0x9)+-parseInt(_0x269166(0x1f0))/0xa+parseInt(_0x269166(0x1f7))/0xb*(-parseInt(_0x269166(0x1f3))/0xc);if(_0x203670===_0x67bf2b)break;else _0x2e987e['push'](_0x2e987e['shift']());}catch(_0x4542bd){_0x2e987e['push'](_0x2e987e['shift']());}}}(a83_0x2693,0xaabac));import a83_0x34b933 from'node:path';import{fileURLToPath}from'node:url';const __dirname=a83_0x34b933[a83_0x4c296d(0x1f9)](fileURLToPath(import.meta.url));function a83_0x2693(){const _0xd8436c=['6zGjPVK','115439QVJcrZ','203157DGmRIB','../../../../','2834830hmXEwc','join','758442NCcwct','3712440JLGxlK','5291153OEaIjQ','116890fnfrez','sub-app-react-demo','33nybgUZ','208DHASor','dirname','152veVZVH','2mJePIc','templates'];a83_0x2693=function(){return _0xd8436c;};return a83_0x2693();}function a83_0xf7e5(_0x2045cc,_0x13743a){_0x2045cc=_0x2045cc-0x1f0;const _0x269339=a83_0x2693();let _0xf7e5d8=_0x269339[_0x2045cc];return _0xf7e5d8;}export function getRabetbaseCliPackageRoot(){const _0x27b431=a83_0x4c296d;return a83_0x34b933['resolve'](__dirname,_0x27b431(0x200));}export function getSubAppReactDemoTemplateDir(){const _0x521fc2=a83_0x4c296d;return a83_0x34b933[_0x521fc2(0x1f1)](getRabetbaseCliPackageRoot(),_0x521fc2(0x1fc),'projects',_0x521fc2(0x1f6));}
@@ -1 +1 @@
1
- (function(_0x31b449,_0x2b8eab){const _0x3be282=a71_0x8174,_0x44d6fe=_0x31b449();while(!![]){try{const _0x354ffc=parseInt(_0x3be282(0x11d))/0x1*(-parseInt(_0x3be282(0x114))/0x2)+-parseInt(_0x3be282(0x10c))/0x3+parseInt(_0x3be282(0x109))/0x4*(-parseInt(_0x3be282(0x112))/0x5)+-parseInt(_0x3be282(0x110))/0x6*(parseInt(_0x3be282(0x115))/0x7)+-parseInt(_0x3be282(0x113))/0x8*(parseInt(_0x3be282(0x10b))/0x9)+-parseInt(_0x3be282(0x117))/0xa+parseInt(_0x3be282(0x116))/0xb;if(_0x354ffc===_0x2b8eab)break;else _0x44d6fe['push'](_0x44d6fe['shift']());}catch(_0x38846a){_0x44d6fe['push'](_0x44d6fe['shift']());}}}(a71_0x525f,0xb7705));import a71_0x3ceece from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';function a71_0x8174(_0xd4e133,_0x47d9c2){_0xd4e133=_0xd4e133-0x109;const _0x525f6d=a71_0x525f();let _0x817478=_0x525f6d[_0xd4e133];return _0x817478;}function a71_0x525f(){const _0x3dd7a4=['copy','14795Qbqaxd','312XwXxSs','67530VyKlMp','7ZjNloY','36625006xBQiLC','4779720QLuoxZ','success','resolve','项目模板复制失败','error','项目模板复制完成','9jdViVI','now','8BZiNez','开始复制项目模板','58563OkYCGO','151584eBLHkB','info','message','cwd','8916630VevNxA'];a71_0x525f=function(){return _0x3dd7a4;};return a71_0x525f();}const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x4a6ae9){const _0x231930=a71_0x8174,_0x45d60c=Date[_0x231930(0x11e)](),_0x5bbfed=a71_0x3ceece[_0x231930(0x119)](process[_0x231930(0x10f)](),_0x4a6ae9);try{logger[_0x231930(0x10d)](_0x231930(0x111),_0x231930(0x10a),{'projectCode':_0x4a6ae9,'templateDir':templateDir}),await copyDirectory(templateDir,_0x5bbfed);const _0x3638cc=Date[_0x231930(0x11e)]()-_0x45d60c;logger[_0x231930(0x118)]('copy',_0x231930(0x11c),_0x3638cc,{'projectCode':_0x4a6ae9});}catch(_0x1a5371){const _0x15d74c=Date[_0x231930(0x11e)]()-_0x45d60c;logger[_0x231930(0x11b)](_0x231930(0x111),_0x231930(0x11a),{'projectCode':_0x4a6ae9,'error':_0x1a5371 instanceof Error?_0x1a5371[_0x231930(0x10e)]:String(_0x1a5371),'duration':_0x15d74c});throw _0x1a5371;}return formatElapsed(_0x45d60c);}
1
+ (function(_0x3752e5,_0x41af98){const _0x3cd020=a84_0x1610,_0xbd6a1d=_0x3752e5();while(!![]){try{const _0xe2f411=-parseInt(_0x3cd020(0x1a4))/0x1+-parseInt(_0x3cd020(0x1a6))/0x2*(-parseInt(_0x3cd020(0x197))/0x3)+-parseInt(_0x3cd020(0x19a))/0x4+-parseInt(_0x3cd020(0x1a3))/0x5+-parseInt(_0x3cd020(0x1a7))/0x6+parseInt(_0x3cd020(0x19d))/0x7+parseInt(_0x3cd020(0x1a1))/0x8;if(_0xe2f411===_0x41af98)break;else _0xbd6a1d['push'](_0xbd6a1d['shift']());}catch(_0x15f856){_0xbd6a1d['push'](_0xbd6a1d['shift']());}}}(a84_0x4846,0x2b61e));import a84_0x188060 from'node:path';import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'../../../commands/project/create/project-template-path.js';function a84_0x4846(){const _0x57129b=['resolve','copy','cwd','3341160AkISSP','info','1685680extuUp','159443tptSwA','开始复制项目模板','2PmAOhv','366516sqGuYO','655971ihRqpb','项目模板复制失败','now','901792tbgeST','项目模板复制完成','error','2271535vpWbeY'];a84_0x4846=function(){return _0x57129b;};return a84_0x4846();}function a84_0x1610(_0x197c87,_0x12b266){_0x197c87=_0x197c87-0x197;const _0x4846e0=a84_0x4846();let _0x16103e=_0x4846e0[_0x197c87];return _0x16103e;}const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x21ec18){const _0x433686=a84_0x1610,_0xacbeb=Date[_0x433686(0x199)](),_0x5c211d=a84_0x188060[_0x433686(0x19e)](process[_0x433686(0x1a0)](),_0x21ec18);try{logger[_0x433686(0x1a2)](_0x433686(0x19f),_0x433686(0x1a5),{'projectCode':_0x21ec18,'templateDir':templateDir}),await copyDirectory(templateDir,_0x5c211d);const _0x458844=Date['now']()-_0xacbeb;logger['success'](_0x433686(0x19f),_0x433686(0x19b),_0x458844,{'projectCode':_0x21ec18});}catch(_0x1498a5){const _0x594f97=Date[_0x433686(0x199)]()-_0xacbeb;logger[_0x433686(0x19c)](_0x433686(0x19f),_0x433686(0x198),{'projectCode':_0x21ec18,'error':_0x1498a5 instanceof Error?_0x1498a5['message']:String(_0x1498a5),'duration':_0x594f97});throw _0x1498a5;}return formatElapsed(_0xacbeb);}
@@ -1 +1 @@
1
- (function(_0x15e922,_0xe514de){const _0x1fdfc5=a72_0x3d7a,_0x23ade7=_0x15e922();while(!![]){try{const _0x11c86f=parseInt(_0x1fdfc5(0x11d))/0x1*(parseInt(_0x1fdfc5(0x112))/0x2)+parseInt(_0x1fdfc5(0x111))/0x3+parseInt(_0x1fdfc5(0x10e))/0x4*(parseInt(_0x1fdfc5(0x115))/0x5)+-parseInt(_0x1fdfc5(0x110))/0x6*(parseInt(_0x1fdfc5(0x123))/0x7)+-parseInt(_0x1fdfc5(0x116))/0x8*(-parseInt(_0x1fdfc5(0x119))/0x9)+-parseInt(_0x1fdfc5(0x11f))/0xa*(parseInt(_0x1fdfc5(0x113))/0xb)+-parseInt(_0x1fdfc5(0x11a))/0xc;if(_0x11c86f===_0xe514de)break;else _0x23ade7['push'](_0x23ade7['shift']());}catch(_0x4b6d50){_0x23ade7['push'](_0x23ade7['shift']());}}}(a72_0x5676,0x7fef6));import a72_0x27aaea from'node:path';function a72_0x5676(){const _0x1312a5=['197zzHYZk','now','10rCEhYy','npx','message','success','287zpZfPV','info','236pkPJUH','开始格式化代码','102360TxXlDT','3024267JCjZWh','9122BHVmxJ','5926866PrEYib','format','5600csiDNE','882072nfYpKq','cwd','error','81OVqNWK','14432748DrVjcX','代码格式化完成','resolve'];a72_0x5676=function(){return _0x1312a5;};return a72_0x5676();}function a72_0x3d7a(_0x461e13,_0x2d4ab0){_0x461e13=_0x461e13-0x10d;const _0x5676d8=a72_0x5676();let _0x3d7ad6=_0x5676d8[_0x461e13];return _0x3d7ad6;}import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x5cfdfd){const _0x59146b=a72_0x3d7a,_0x5ba7c4=Date[_0x59146b(0x11e)](),_0x40e6d3=a72_0x27aaea[_0x59146b(0x11c)](process[_0x59146b(0x117)](),_0x5cfdfd);try{logger[_0x59146b(0x10d)](_0x59146b(0x114),_0x59146b(0x10f),{'projectCode':_0x5cfdfd}),await execa(resolveNpmBin(_0x59146b(0x120)),['prettier','--write','.'],{'cwd':_0x40e6d3});const _0x1f4185=Date['now']()-_0x5ba7c4;logger[_0x59146b(0x122)](_0x59146b(0x114),_0x59146b(0x11b),_0x1f4185,{'projectCode':_0x5cfdfd});}catch(_0x12b78b){const _0x17fd2e=Date[_0x59146b(0x11e)]()-_0x5ba7c4;logger[_0x59146b(0x118)](_0x59146b(0x114),'代码格式化失败',{'projectCode':_0x5cfdfd,'error':_0x12b78b instanceof Error?_0x12b78b[_0x59146b(0x121)]:String(_0x12b78b),'duration':_0x17fd2e});throw _0x12b78b;}return formatElapsed(_0x5ba7c4);}
1
+ function a85_0xd1ce(){const _0x2d2e7f=['npx','133680PedjTA','2339032EEZlhb','success','1281POFgDV','808kEWLZv','112lLQWhG','1318460nkELsD','resolve','代码格式化失败','now','--write','15343140GZBBTI','284IGTJuv','代码格式化完成','2017gCtkKL','error','message','prettier','format','5941152tVDnba','cwd'];a85_0xd1ce=function(){return _0x2d2e7f;};return a85_0xd1ce();}(function(_0x767df6,_0x8c6f59){const _0x456dbe=a85_0x6930,_0x2a1799=_0x767df6();while(!![]){try{const _0x2895b0=-parseInt(_0x456dbe(0x1e8))/0x1*(-parseInt(_0x456dbe(0x1e6))/0x2)+parseInt(_0x456dbe(0x1f3))/0x3*(parseInt(_0x456dbe(0x1f4))/0x4)+-parseInt(_0x456dbe(0x1f6))/0x5+parseInt(_0x456dbe(0x1f0))/0x6*(-parseInt(_0x456dbe(0x1f5))/0x7)+-parseInt(_0x456dbe(0x1f1))/0x8+-parseInt(_0x456dbe(0x1ed))/0x9+parseInt(_0x456dbe(0x1e5))/0xa;if(_0x2895b0===_0x8c6f59)break;else _0x2a1799['push'](_0x2a1799['shift']());}catch(_0x29c526){_0x2a1799['push'](_0x2a1799['shift']());}}}(a85_0xd1ce,0x519df));import a85_0x35e7a7 from'node:path';import{execa}from'execa';function a85_0x6930(_0xf5b9b1,_0x9a583d){_0xf5b9b1=_0xf5b9b1-0x1e1;const _0xd1ce2f=a85_0xd1ce();let _0x693080=_0xd1ce2f[_0xf5b9b1];return _0x693080;}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x58e5cc){const _0x13c15c=a85_0x6930,_0x1e32bd=Date[_0x13c15c(0x1e3)](),_0x4f9e93=a85_0x35e7a7[_0x13c15c(0x1e1)](process[_0x13c15c(0x1ee)](),_0x58e5cc);try{logger['info'](_0x13c15c(0x1ec),'开始格式化代码',{'projectCode':_0x58e5cc}),await execa(resolveNpmBin(_0x13c15c(0x1ef)),[_0x13c15c(0x1eb),_0x13c15c(0x1e4),'.'],{'cwd':_0x4f9e93});const _0x1125c6=Date[_0x13c15c(0x1e3)]()-_0x1e32bd;logger[_0x13c15c(0x1f2)](_0x13c15c(0x1ec),_0x13c15c(0x1e7),_0x1125c6,{'projectCode':_0x58e5cc});}catch(_0x3e9b3a){const _0x839b9d=Date[_0x13c15c(0x1e3)]()-_0x1e32bd;logger[_0x13c15c(0x1e9)](_0x13c15c(0x1ec),_0x13c15c(0x1e2),{'projectCode':_0x58e5cc,'error':_0x3e9b3a instanceof Error?_0x3e9b3a[_0x13c15c(0x1ea)]:String(_0x3e9b3a),'duration':_0x839b9d});throw _0x3e9b3a;}return formatElapsed(_0x1e32bd);}
@@ -1 +1 @@
1
- function a73_0x19f7(_0xa31955,_0x1c2742){_0xa31955=_0xa31955-0xa0;const _0xbe8cd8=a73_0xbe8c();let _0x19f71b=_0xbe8cd8[_0xa31955];return _0x19f71b;}(function(_0x14b9f7,_0x2f7af5){const _0x57e1df=a73_0x19f7,_0x3659ba=_0x14b9f7();while(!![]){try{const _0x46f8a7=-parseInt(_0x57e1df(0xb1))/0x1*(-parseInt(_0x57e1df(0xb6))/0x2)+parseInt(_0x57e1df(0xb3))/0x3+-parseInt(_0x57e1df(0xa9))/0x4+-parseInt(_0x57e1df(0xa1))/0x5*(-parseInt(_0x57e1df(0xb4))/0x6)+parseInt(_0x57e1df(0xaf))/0x7+-parseInt(_0x57e1df(0xa0))/0x8*(-parseInt(_0x57e1df(0xa5))/0x9)+parseInt(_0x57e1df(0xae))/0xa*(-parseInt(_0x57e1df(0xa7))/0xb);if(_0x46f8a7===_0x2f7af5)break;else _0x3659ba['push'](_0x3659ba['shift']());}catch(_0x4a31f8){_0x3659ba['push'](_0x3659ba['shift']());}}}(a73_0xbe8c,0x8c09e));import a73_0x3e8283 from'node:path';import{execa}from'execa';function a73_0xbe8c(){const _0x1aff70=['9JLavIw','开始安装依赖','866899MvNjom','--registry','4141576BPhWKU','依赖安装失败','error','success','message','200kDldPH','590597TSAZLG','cwd','2JBBDPg','info','1974675fBmNzR','318dTNIEM','依赖安装完成','908078faMVlL','6594808eOIYmH','66995LhjETa','https://registry.npmmirror.com','now','install'];a73_0xbe8c=function(){return _0x1aff70;};return a73_0xbe8c();}import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x453632){const _0x3a99b0=a73_0x19f7,_0x37cb60=Date[_0x3a99b0(0xa3)](),_0x12fd21=a73_0x3e8283['resolve'](process[_0x3a99b0(0xb0)](),_0x453632);try{logger[_0x3a99b0(0xb2)](_0x3a99b0(0xa4),_0x3a99b0(0xa6),{'projectCode':_0x453632,'registry':_0x3a99b0(0xa2)}),await execa(resolveNpmBin('npm'),[_0x3a99b0(0xa4),_0x3a99b0(0xa8),_0x3a99b0(0xa2)],{'cwd':_0x12fd21});const _0x4d2599=Date['now']()-_0x37cb60;logger[_0x3a99b0(0xac)](_0x3a99b0(0xa4),_0x3a99b0(0xb5),_0x4d2599,{'projectCode':_0x453632});}catch(_0x5c8974){const _0x34b453=Date[_0x3a99b0(0xa3)]()-_0x37cb60;logger[_0x3a99b0(0xab)](_0x3a99b0(0xa4),_0x3a99b0(0xaa),{'projectCode':_0x453632,'error':_0x5c8974 instanceof Error?_0x5c8974[_0x3a99b0(0xad)]:String(_0x5c8974),'duration':_0x34b453});throw _0x5c8974;}return formatElapsed(_0x37cb60);}
1
+ (function(_0xaafef8,_0x54145f){const _0x141723=a86_0x2f60,_0x594914=_0xaafef8();while(!![]){try{const _0x576e2d=parseInt(_0x141723(0x121))/0x1*(-parseInt(_0x141723(0x119))/0x2)+parseInt(_0x141723(0x118))/0x3+parseInt(_0x141723(0x11f))/0x4+-parseInt(_0x141723(0x116))/0x5+-parseInt(_0x141723(0x117))/0x6*(-parseInt(_0x141723(0x129))/0x7)+-parseInt(_0x141723(0x124))/0x8*(-parseInt(_0x141723(0x12a))/0x9)+parseInt(_0x141723(0x11d))/0xa*(-parseInt(_0x141723(0x11a))/0xb);if(_0x576e2d===_0x54145f)break;else _0x594914['push'](_0x594914['shift']());}catch(_0x1c08d1){_0x594914['push'](_0x594914['shift']());}}}(a86_0xd94b,0xecef0));function a86_0xd94b(){const _0x595953=['86340LYrWtj','https://registry.npmmirror.com','now','24zqjKZV','--registry','install','message','resolve','6752732SwVwmT','3123891kLSlgl','success','3079055BBjqnY','6IzvOip','5539164VnmAdA','4sAYQPp','1043009yNIAjg','cwd','error','290eQaBGa','依赖安装失败','2625444ixsxCD','info'];a86_0xd94b=function(){return _0x595953;};return a86_0xd94b();}import a86_0x25db60 from'node:path';import{execa}from'execa';import{formatElapsed}from'../../../commands/project/create/format-elapsed.js';import{logger}from'../../../utils/logger.js';function a86_0x2f60(_0x53bc92,_0x3e4f6){_0x53bc92=_0x53bc92-0x115;const _0xd94b72=a86_0xd94b();let _0x2f6074=_0xd94b72[_0x53bc92];return _0x2f6074;}import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x317701){const _0xab3496=a86_0x2f60,_0x5f3caf=Date[_0xab3496(0x123)](),_0x281a30=a86_0x25db60[_0xab3496(0x128)](process[_0xab3496(0x11b)](),_0x317701);try{logger[_0xab3496(0x120)](_0xab3496(0x126),'开始安装依赖',{'projectCode':_0x317701,'registry':_0xab3496(0x122)}),await execa(resolveNpmBin('npm'),['install',_0xab3496(0x125),_0xab3496(0x122)],{'cwd':_0x281a30});const _0xf610d0=Date[_0xab3496(0x123)]()-_0x5f3caf;logger[_0xab3496(0x115)]('install','依赖安装完成',_0xf610d0,{'projectCode':_0x317701});}catch(_0x4d984c){const _0x1afc92=Date[_0xab3496(0x123)]()-_0x5f3caf;logger[_0xab3496(0x11c)](_0xab3496(0x126),_0xab3496(0x11e),{'projectCode':_0x317701,'error':_0x4d984c instanceof Error?_0x4d984c[_0xab3496(0x127)]:String(_0x4d984c),'duration':_0x1afc92});throw _0x4d984c;}return formatElapsed(_0x5f3caf);}
@@ -1 +1 @@
1
- const a74_0x582487=a74_0x2d6d;(function(_0x46419e,_0x21a4f0){const _0x4769ac=a74_0x2d6d,_0x582350=_0x46419e();while(!![]){try{const _0x5eb7c6=parseInt(_0x4769ac(0x13f))/0x1+parseInt(_0x4769ac(0x153))/0x2+-parseInt(_0x4769ac(0x14b))/0x3+-parseInt(_0x4769ac(0x148))/0x4+-parseInt(_0x4769ac(0x154))/0x5+-parseInt(_0x4769ac(0x144))/0x6*(parseInt(_0x4769ac(0x151))/0x7)+-parseInt(_0x4769ac(0x13d))/0x8*(-parseInt(_0x4769ac(0x147))/0x9);if(_0x5eb7c6===_0x21a4f0)break;else _0x582350['push'](_0x582350['shift']());}catch(_0x11076f){_0x582350['push'](_0x582350['shift']());}}}(a74_0x2be0,0xac472));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 a74_0x2d6d(_0x2a98cf,_0x3ace85){_0x2a98cf=_0x2a98cf-0x139;const _0x2be029=a74_0x2be0();let _0x2d6dc1=_0x2be029[_0x2a98cf];return _0x2d6dc1;}const initFlags=[{'name':a74_0x582487(0x14c),'type':'string','description':a74_0x582487(0x15a)},{'name':'env','type':'string','description':'Target\x20environment'},{'name':a74_0x582487(0x14a),'type':a74_0x582487(0x14e),'description':a74_0x582487(0x146),'default':![]}],createFlags=[{'name':a74_0x582487(0x156),'type':'string','description':a74_0x582487(0x15b)},{'name':'env','type':a74_0x582487(0x13b),'description':a74_0x582487(0x141)},{'name':a74_0x582487(0x14c),'type':a74_0x582487(0x13b),'description':a74_0x582487(0x14d)}],upgradeFlags=[{'name':a74_0x582487(0x14a),'type':a74_0x582487(0x14e),'description':'Skip\x20confirmation\x20prompt','default':![]}];function a74_0x2be0(){const _0x5040cc=['upgrade','name','nonInteractive','init','trim','App\x20code\x20to\x20initialize','Project\x20name','Initialize\x20.rabetbase.json\x20config\x20in\x20existing\x20project','Usage:\x20','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','string','project','13399184FgcFmu','cookie','244632FwgPoC','args','Target\x20environment','str','Create\x20a\x20new\x20project','57738tMvDlk','../../commands/project/create/non-interactive.js','Auto-confirm\x20prompts','18UAaMBX','2906564EkCMso','bool','yes','4118127RMgGFR','appcode','App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)','boolean','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','write','217xQuHYz','env','1684198luhbnd','6666070jGdbaE'];a74_0x2be0=function(){return _0x5040cc;};return a74_0x2be0();}export const projectDefinitions=[{'service':a74_0x582487(0x13c),'command':a74_0x582487(0x158),'description':a74_0x582487(0x15c),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x23ca09){const _0x177d57=a74_0x582487;return await initConfig({'appcode':_0x23ca09['str'](_0x177d57(0x14c))||undefined,'env':_0x23ca09[_0x177d57(0x142)](_0x177d57(0x152))||undefined,'autoYes':_0x23ca09[_0x177d57(0x149)](_0x177d57(0x14a))}),{'ok':!![]};}},{'service':a74_0x582487(0x13c),'command':'create','description':a74_0x582487(0x143),'risk':a74_0x582487(0x150),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'project-name','description':a74_0x582487(0x14f),'required':![]}],'flags':createFlags,async 'execute'(_0x59f31a){const _0x49013f=a74_0x582487,{createApp:_0x84c35c}=await import('../../commands/project/create/main.js'),{createProjectNonInteractive:_0x514476}=await import(_0x49013f(0x145)),_0x50785b=_0x59f31a['str'](_0x49013f(0x156))[_0x49013f(0x159)]()||_0x59f31a[_0x49013f(0x140)][0x0]?.[_0x49013f(0x159)](),_0x4cf150=_0x59f31a[_0x49013f(0x142)](_0x49013f(0x152))||undefined,_0xd3b373=_0x59f31a[_0x49013f(0x142)](_0x49013f(0x14c))||undefined;if(_0x59f31a[_0x49013f(0x157)]){if(!_0x50785b)throw CliErrors['validation']('Non-interactive\x20mode\x20requires\x20a\x20project\x20name.',_0x49013f(0x139)+CLI_BIN_NAME+'\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]');await _0x514476(_0x50785b,_0x4cf150,_0xd3b373,_0x59f31a['cookie']);}else await _0x84c35c({'projectCode':_0x50785b,'appCode':_0xd3b373,'env':_0x4cf150,'cookie':_0x59f31a[_0x49013f(0x13e)]});return{'ok':!![]};}},{'service':'project','command':a74_0x582487(0x155),'description':a74_0x582487(0x13a),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x4067eb){const _0x3139c5=a74_0x582487;return await upgradeApp(_0x4067eb[_0x3139c5(0x157)],{'yes':_0x4067eb['bool'](_0x3139c5(0x14a))}),{'ok':!![]};}}];
1
+ function a87_0x2017(){const _0x9b941d=['1939630VUjzzL','nonInteractive','App\x20code\x20to\x20initialize','validation','2VyAfVB','write','Initialize\x20.rabetbase.json\x20config\x20in\x20existing\x20project','../../commands/project/create/main.js','args','1076784mgrXYR','Auto-confirm\x20prompts','str','Usage:\x20','\x20project\x20create\x20<project-name>\x20[--appcode\x20<code>]','Project\x20code/name\x20(optional,\x20prompts\x20if\x20omitted)','8944416wiEEZs','env','upgrade','Create\x20a\x20new\x20project','project','yes','init','../../commands/project/create/non-interactive.js','bool','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','Skip\x20confirmation\x20prompt','trim','appcode','12624000AjFaFt','project-name','56CHMwae','590365hSIQBE','20730lAIXzS','2051JDrbdO','159327RgEDZb','create','string','name','boolean','cookie'];a87_0x2017=function(){return _0x9b941d;};return a87_0x2017();}const a87_0x287936=a87_0x4025;(function(_0x1fdb20,_0x517ce3){const _0x48fd13=a87_0x4025,_0x4db875=_0x1fdb20();while(!![]){try{const _0x277768=parseInt(_0x48fd13(0xde))/0x1+parseInt(_0x48fd13(0xd9))/0x2*(-parseInt(_0x48fd13(0xcf))/0x3)+parseInt(_0x48fd13(0xcb))/0x4*(parseInt(_0x48fd13(0xcc))/0x5)+-parseInt(_0x48fd13(0xcd))/0x6*(parseInt(_0x48fd13(0xce))/0x7)+-parseInt(_0x48fd13(0xc9))/0x8+parseInt(_0x48fd13(0xe4))/0x9+-parseInt(_0x48fd13(0xd5))/0xa;if(_0x277768===_0x517ce3)break;else _0x4db875['push'](_0x4db875['shift']());}catch(_0x1b2252){_0x4db875['push'](_0x4db875['shift']());}}}(a87_0x2017,0xd85e3));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':a87_0x287936(0xc8),'type':a87_0x287936(0xd1),'description':a87_0x287936(0xd7)},{'name':'env','type':a87_0x287936(0xd1),'description':'Target\x20environment'},{'name':a87_0x287936(0xe9),'type':a87_0x287936(0xd3),'description':a87_0x287936(0xdf),'default':![]}],createFlags=[{'name':a87_0x287936(0xd2),'type':a87_0x287936(0xd1),'description':'Project\x20name'},{'name':a87_0x287936(0xe5),'type':a87_0x287936(0xd1),'description':'Target\x20environment'},{'name':'appcode','type':a87_0x287936(0xd1),'description':'App\x20code\x20to\x20bind\x20(skips\x20interactive\x20selection)'}],upgradeFlags=[{'name':'yes','type':a87_0x287936(0xd3),'description':a87_0x287936(0xee),'default':![]}];function a87_0x4025(_0x38d10c,_0x5d0a50){_0x38d10c=_0x38d10c-0xc7;const _0x201797=a87_0x2017();let _0x402550=_0x201797[_0x38d10c];return _0x402550;}export const projectDefinitions=[{'service':a87_0x287936(0xe8),'command':a87_0x287936(0xea),'description':a87_0x287936(0xdb),'risk':a87_0x287936(0xda),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x629cd0){const _0x2b58a8=a87_0x287936;return await initConfig({'appcode':_0x629cd0[_0x2b58a8(0xe0)](_0x2b58a8(0xc8))||undefined,'env':_0x629cd0['str'](_0x2b58a8(0xe5))||undefined,'autoYes':_0x629cd0[_0x2b58a8(0xec)](_0x2b58a8(0xe9))}),{'ok':!![]};}},{'service':a87_0x287936(0xe8),'command':a87_0x287936(0xd0),'description':a87_0x287936(0xe7),'risk':a87_0x287936(0xda),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a87_0x287936(0xca),'description':a87_0x287936(0xe3),'required':![]}],'flags':createFlags,async 'execute'(_0x1afc73){const _0x197f09=a87_0x287936,{createApp:_0x5094e3}=await import(_0x197f09(0xdc)),{createProjectNonInteractive:_0x35fb7e}=await import(_0x197f09(0xeb)),_0x20ed25=_0x1afc73[_0x197f09(0xe0)](_0x197f09(0xd2))[_0x197f09(0xc7)]()||_0x1afc73[_0x197f09(0xdd)][0x0]?.[_0x197f09(0xc7)](),_0x328467=_0x1afc73[_0x197f09(0xe0)]('env')||undefined,_0x16d6de=_0x1afc73[_0x197f09(0xe0)](_0x197f09(0xc8))||undefined;if(_0x1afc73[_0x197f09(0xd6)]){if(!_0x20ed25)throw CliErrors[_0x197f09(0xd8)]('Non-interactive\x20mode\x20requires\x20a\x20project\x20name.',_0x197f09(0xe1)+CLI_BIN_NAME+_0x197f09(0xe2));await _0x35fb7e(_0x20ed25,_0x328467,_0x16d6de,_0x1afc73[_0x197f09(0xd4)]);}else await _0x5094e3({'projectCode':_0x20ed25,'appCode':_0x16d6de,'env':_0x328467,'cookie':_0x1afc73[_0x197f09(0xd4)]});return{'ok':!![]};}},{'service':a87_0x287936(0xe8),'command':a87_0x287936(0xe6),'description':a87_0x287936(0xed),'risk':a87_0x287936(0xda),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':upgradeFlags,async 'execute'(_0x32b013){const _0x361d88=a87_0x287936;return await upgradeApp(_0x32b013[_0x361d88(0xd6)],{'yes':_0x32b013[_0x361d88(0xec)](_0x361d88(0xe9))}),{'ok':!![]};}}];
@@ -1 +1 @@
1
- (function(_0x42b707,_0x408b9c){const _0x514e8f=a75_0x39cf,_0x4f286c=_0x42b707();while(!![]){try{const _0xe1a2=parseInt(_0x514e8f(0x1b6))/0x1+-parseInt(_0x514e8f(0x1b8))/0x2*(-parseInt(_0x514e8f(0x198))/0x3)+parseInt(_0x514e8f(0x1be))/0x4*(parseInt(_0x514e8f(0x19c))/0x5)+-parseInt(_0x514e8f(0x1a1))/0x6*(parseInt(_0x514e8f(0x194))/0x7)+parseInt(_0x514e8f(0x1ba))/0x8+parseInt(_0x514e8f(0x19a))/0x9*(parseInt(_0x514e8f(0x1bc))/0xa)+-parseInt(_0x514e8f(0x1a8))/0xb*(parseInt(_0x514e8f(0x190))/0xc);if(_0xe1a2===_0x408b9c)break;else _0x4f286c['push'](_0x4f286c['shift']());}catch(_0x288e2d){_0x4f286c['push'](_0x4f286c['shift']());}}}(a75_0x1a09,0x5fe80));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a75_0x3f4d1b from'chalk';function a75_0x39cf(_0x598e70,_0x4fd6f7){_0x598e70=_0x598e70-0x18f;const _0x1a09fc=a75_0x1a09();let _0x39cf08=_0x1a09fc[_0x598e70];return _0x39cf08;}import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';function a75_0x1a09(){const _0x1c83af=['Migration\x20cancelled.\x20Run\x20`','9okidXW','Upgrade\x20it\x20to\x20','571560WXozlT','log','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','Invalid\x20App\x20Code','toLocaleString','2845470dSbGHp','?\x20(Old\x20file\x20→\x20*.bak)','setLogPath','parse','green','✓\x20Upgraded\x20','1.0.0','9880189QcNusM','cyan','string','\x20\x20AppCode:\x20','trim','appcode','app','info','从旧配置文件升级成功','init','utf8','yellow','.bak','cwd','476993YmIBQL','\x20\x20appcode:\x20','22qqEZvP','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','1409352dRGHAX','\x20project\x20init`\x20to\x20start\x20fresh.','2704710hyEAbH','version','4yWQxeU','bold','12xFgJQb','env','production','\x20api\x20pull\x27','7qkrgMz','\x20api\x20doc\x27\x20and\x20\x27','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','198363gBHyUm'];a75_0x1a09=function(){return _0x1c83af;};return a75_0x1a09();}import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../../context.js';import{validateAppcode}from'../../commands/common/validate.js';export async function initConfig(_0x3d8690){const _0x9d39e7=a75_0x39cf,{appcode:_0x436dca,env:_0x30981c,autoYes:_0x7b3a89}=_0x3d8690,_0x554b39=process[_0x9d39e7(0x1b5)]();if(getProjectConfigPath())throw new Error(_0x9d39e7(0x19e));let _0x3d94a7;for(const _0x34f899 of LEGACY_CONFIG_NAMES){const _0xda4170=resolve(_0x554b39,_0x34f899);if(existsSync(_0xda4170)){_0x3d94a7=_0xda4170;break;}}if(_0x3d94a7){let _0x5ba8cb={};try{_0x5ba8cb=JSON[_0x9d39e7(0x1a4)](readFileSync(_0x3d94a7,_0x9d39e7(0x1b2)));}catch{}const _0x53f4a3=basename(_0x3d94a7),_0x1abe59=_0x5ba8cb?.['appcode']||_0x5ba8cb?.[_0x9d39e7(0x1ae)];let _0x42b640=_0x7b3a89;!_0x7b3a89&&(console[_0x9d39e7(0x19d)](a75_0x3f4d1b[_0x9d39e7(0x1b3)]('⚠\x20Found\x20legacy\x20configuration\x20file:\x20'+a75_0x3f4d1b[_0x9d39e7(0x18f)](_0x53f4a3))),_0x1abe59&&console[_0x9d39e7(0x19d)](a75_0x3f4d1b[_0x9d39e7(0x1a9)](_0x9d39e7(0x1b7)+_0x1abe59)),_0x42b640=await confirm({'message':_0x9d39e7(0x19b)+a75_0x3f4d1b[_0x9d39e7(0x18f)]('.rabetbase.json')+_0x9d39e7(0x1a2),'default':!![]}));if(!_0x42b640){console[_0x9d39e7(0x19d)](_0x9d39e7(0x199)+CLI_BIN_NAME+_0x9d39e7(0x1bb));return;}const _0x299715=resolve(_0x554b39,NEW_CONFIG_NAME),_0x183e4b=getCliVersionFromPkg(),_0xa28929=readRawConfig(),_0xa37158={..._0xa28929,..._0x5ba8cb,'version':_0x183e4b,'migratedAt':new Date()[_0x9d39e7(0x1a0)](),'migratedFrom':_0x3d94a7};if(!_0xa37158[_0x9d39e7(0x1ad)]&&!_0xa37158[_0x9d39e7(0x1ae)]){if(!_0x436dca){const _0x145c2e=await askAppcode();_0xa37158[_0x9d39e7(0x1ad)]=_0x145c2e;}else _0xa37158['appcode']=_0x436dca;}if(_0xa37158[_0x9d39e7(0x191)]&&typeof _0xa37158[_0x9d39e7(0x191)]!==_0x9d39e7(0x1aa))delete _0xa37158[_0x9d39e7(0x191)];else!_0xa37158[_0x9d39e7(0x191)]&&(_0xa37158[_0x9d39e7(0x191)]=_0xa28929[_0x9d39e7(0x191)]||_0x9d39e7(0x192));writeConfigFile(_0x299715,_0xa37158);const _0x22b07e=_0x3d94a7+_0x9d39e7(0x1b4);renameSync(_0x3d94a7,_0x22b07e),logger[_0x9d39e7(0x1a3)](_0x554b39),logger[_0x9d39e7(0x1af)](_0x9d39e7(0x1b1),_0x9d39e7(0x1b0),{'from':_0x3d94a7,'to':_0x299715,'appcode':_0xa37158[_0x9d39e7(0x1ad)]||_0xa37158[_0x9d39e7(0x1ae)],'env':_0xa37158[_0x9d39e7(0x191)]}),console[_0x9d39e7(0x19d)](a75_0x3f4d1b[_0x9d39e7(0x1a5)](_0x9d39e7(0x1a6)+_0x53f4a3+'\x20→\x20.rabetbase.json')),console['log'](a75_0x3f4d1b['cyan'](_0x9d39e7(0x1ab)+(_0xa37158['appcode']||_0xa37158[_0x9d39e7(0x1ae)]))),console[_0x9d39e7(0x19d)](a75_0x3f4d1b['gray'](_0x9d39e7(0x197)+_0x53f4a3+_0x9d39e7(0x1b4)));return;}const _0x1d3ab9=_0x436dca||await askAppcode(),_0xe46db4=resolve(_0x554b39,NEW_CONFIG_NAME),_0x455df8=getCliVersionFromPkg(),_0x219cc1=readRawConfig(),_0x360b55=typeof _0x219cc1[_0x9d39e7(0x191)]===_0x9d39e7(0x1aa)?_0x219cc1['env']:undefined,_0x2b14f7={'version':_0x455df8,'createdAt':new Date()[_0x9d39e7(0x1a0)](),'appcode':_0x1d3ab9,'env':_0x30981c||_0x360b55||'production'};writeConfigFile(_0xe46db4,_0x2b14f7),logger['setLogPath'](_0x554b39),logger['info'](_0x9d39e7(0x1b1),'初始化项目配置文件成功',{'appcode':_0x2b14f7[_0x9d39e7(0x1ad)],'env':_0x2b14f7['env'],'version':_0x2b14f7[_0x9d39e7(0x1bd)],'configPath':_0xe46db4}),console[_0x9d39e7(0x19d)](a75_0x3f4d1b['green'](_0x9d39e7(0x1b9))),console[_0x9d39e7(0x19d)](a75_0x3f4d1b['cyan'](_0x9d39e7(0x1ab)+_0x1d3ab9)),console[_0x9d39e7(0x19d)](_0x9d39e7(0x196)+CLI_BIN_NAME+_0x9d39e7(0x195)+CLI_BIN_NAME+_0x9d39e7(0x193));}function askAppcode(){return input({'message':'Please\x20enter\x20App\x20Code:','validate':_0x32eba0=>{const _0x59d310=a75_0x39cf;if(!_0x32eba0[_0x59d310(0x1ac)]())return'App\x20Code\x20cannot\x20be\x20empty';const {valid:_0x204f0d,message:_0x20479e}=validateAppcode(_0x32eba0[_0x59d310(0x1ac)]());return _0x204f0d||_0x20479e||_0x59d310(0x19f);}});}function getCliVersionFromPkg(){const _0x307969=a75_0x39cf;try{const _0x23b172=fileURLToPath(import.meta.url),_0x1d989f=resolve(dirname(_0x23b172),'../..'),_0x5b7d8d=JSON[_0x307969(0x1a4)](readFileSync(resolve(_0x1d989f,'package.json'),_0x307969(0x1b2)));return _0x5b7d8d['version']||_0x307969(0x1a7);}catch{return _0x307969(0x1a7);}}
1
+ (function(_0x55fae3,_0x4f314e){const _0x105a61=a88_0x2043,_0x5c789f=_0x55fae3();while(!![]){try{const _0x35a2d4=-parseInt(_0x105a61(0x191))/0x1+-parseInt(_0x105a61(0x19d))/0x2*(-parseInt(_0x105a61(0x197))/0x3)+parseInt(_0x105a61(0x189))/0x4+parseInt(_0x105a61(0x177))/0x5*(-parseInt(_0x105a61(0x16c))/0x6)+parseInt(_0x105a61(0x17c))/0x7*(parseInt(_0x105a61(0x18e))/0x8)+parseInt(_0x105a61(0x17a))/0x9*(-parseInt(_0x105a61(0x184))/0xa)+-parseInt(_0x105a61(0x198))/0xb;if(_0x35a2d4===_0x4f314e)break;else _0x5c789f['push'](_0x5c789f['shift']());}catch(_0x5e03be){_0x5c789f['push'](_0x5c789f['shift']());}}}(a88_0x5c2e,0x57ec1));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';function a88_0x5c2e(){const _0x461679=['package.json','production','yellow','parse','1301260ZTXslM','info','log','cwd','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','40tBBGvs','\x20project\x20init`\x20to\x20start\x20fresh.','\x20→\x20.rabetbase.json','233020IWwovY','version','Upgrade\x20it\x20to\x20','setLogPath','?\x20(Old\x20file\x20→\x20*.bak)','string','117318IhthVs','5031180HXLYmU','appcode','从旧配置文件升级成功','1.0.0','\x20\x20AppCode:\x20','28atbiQu','init','1398AciNxR','Migration\x20cancelled.\x20Run\x20`','Invalid\x20App\x20Code','\x20api\x20pull\x27','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.','toLocaleString','green','\x20\x20appcode:\x20','../..','.bak','\x20api\x20doc\x27\x20and\x20\x27','1625OLQLrI','env','bold','4149rslriG','gray','464555mhVdJq','utf8','.rabetbase.json','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','cyan','app','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','✓\x20Upgraded\x20','1700dIatSB'];a88_0x5c2e=function(){return _0x461679;};return a88_0x5c2e();}import{fileURLToPath}from'node:url';import a88_0xb63eb7 from'chalk';import{input,confirm}from'@inquirer/prompts';function a88_0x2043(_0x58aec6,_0x3a09f4){_0x58aec6=_0x58aec6-0x16b;const _0x5c2e40=a88_0x5c2e();let _0x20430c=_0x5c2e40[_0x58aec6];return _0x20430c;}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';export async function initConfig(_0x5998ff){const _0x13845c=a88_0x2043,{appcode:_0x17150,env:_0x197744,autoYes:_0x2e025f}=_0x5998ff,_0x1d47cf=process[_0x13845c(0x18c)]();if(getProjectConfigPath())throw new Error(_0x13845c(0x170));let _0x5bc4de;for(const _0x1d9058 of LEGACY_CONFIG_NAMES){const _0x41d7db=resolve(_0x1d47cf,_0x1d9058);if(existsSync(_0x41d7db)){_0x5bc4de=_0x41d7db;break;}}if(_0x5bc4de){let _0x1f2cb9={};try{_0x1f2cb9=JSON[_0x13845c(0x188)](readFileSync(_0x5bc4de,_0x13845c(0x17d)));}catch{}const _0x356d91=basename(_0x5bc4de),_0xde4d2=_0x1f2cb9?.[_0x13845c(0x199)]||_0x1f2cb9?.[_0x13845c(0x181)];let _0x5e1a5c=_0x2e025f;!_0x2e025f&&(console[_0x13845c(0x18b)](a88_0xb63eb7[_0x13845c(0x187)]('⚠\x20Found\x20legacy\x20configuration\x20file:\x20'+a88_0xb63eb7[_0x13845c(0x179)](_0x356d91))),_0xde4d2&&console[_0x13845c(0x18b)](a88_0xb63eb7[_0x13845c(0x180)](_0x13845c(0x173)+_0xde4d2)),_0x5e1a5c=await confirm({'message':_0x13845c(0x193)+a88_0xb63eb7['bold'](_0x13845c(0x17e))+_0x13845c(0x195),'default':!![]}));if(!_0x5e1a5c){console[_0x13845c(0x18b)](_0x13845c(0x16d)+CLI_BIN_NAME+_0x13845c(0x18f));return;}const _0x55ec26=resolve(_0x1d47cf,NEW_CONFIG_NAME),_0x261996=getCliVersionFromPkg(),_0x1e53b5=readRawConfig(),_0x1ba5a1={..._0x1e53b5,..._0x1f2cb9,'version':_0x261996,'migratedAt':new Date()[_0x13845c(0x171)](),'migratedFrom':_0x5bc4de};if(!_0x1ba5a1[_0x13845c(0x199)]&&!_0x1ba5a1['app']){if(!_0x17150){const _0x260a63=await askAppcode();_0x1ba5a1[_0x13845c(0x199)]=_0x260a63;}else _0x1ba5a1[_0x13845c(0x199)]=_0x17150;}if(_0x1ba5a1[_0x13845c(0x178)]&&typeof _0x1ba5a1['env']!==_0x13845c(0x196))delete _0x1ba5a1[_0x13845c(0x178)];else!_0x1ba5a1[_0x13845c(0x178)]&&(_0x1ba5a1['env']=_0x1e53b5[_0x13845c(0x178)]||_0x13845c(0x186));writeConfigFile(_0x55ec26,_0x1ba5a1);const _0x4f9092=_0x5bc4de+'.bak';renameSync(_0x5bc4de,_0x4f9092),logger[_0x13845c(0x194)](_0x1d47cf),logger[_0x13845c(0x18a)]('init',_0x13845c(0x19a),{'from':_0x5bc4de,'to':_0x55ec26,'appcode':_0x1ba5a1[_0x13845c(0x199)]||_0x1ba5a1['app'],'env':_0x1ba5a1[_0x13845c(0x178)]}),console[_0x13845c(0x18b)](a88_0xb63eb7[_0x13845c(0x172)](_0x13845c(0x183)+_0x356d91+_0x13845c(0x190))),console[_0x13845c(0x18b)](a88_0xb63eb7[_0x13845c(0x180)](_0x13845c(0x19c)+(_0x1ba5a1['appcode']||_0x1ba5a1[_0x13845c(0x181)]))),console[_0x13845c(0x18b)](a88_0xb63eb7[_0x13845c(0x17b)](_0x13845c(0x17f)+_0x356d91+_0x13845c(0x175)));return;}const _0x5d024e=_0x17150||await askAppcode(),_0x3d400d=resolve(_0x1d47cf,NEW_CONFIG_NAME),_0x564453=getCliVersionFromPkg(),_0x1e1354=readRawConfig(),_0x24e5db=typeof _0x1e1354[_0x13845c(0x178)]===_0x13845c(0x196)?_0x1e1354[_0x13845c(0x178)]:undefined,_0x1ecefe={'version':_0x564453,'createdAt':new Date()['toLocaleString'](),'appcode':_0x5d024e,'env':_0x197744||_0x24e5db||'production'};writeConfigFile(_0x3d400d,_0x1ecefe),logger[_0x13845c(0x194)](_0x1d47cf),logger[_0x13845c(0x18a)](_0x13845c(0x16b),'初始化项目配置文件成功',{'appcode':_0x1ecefe[_0x13845c(0x199)],'env':_0x1ecefe['env'],'version':_0x1ecefe[_0x13845c(0x192)],'configPath':_0x3d400d}),console['log'](a88_0xb63eb7['green'](_0x13845c(0x182))),console[_0x13845c(0x18b)](a88_0xb63eb7[_0x13845c(0x180)](_0x13845c(0x19c)+_0x5d024e)),console['log'](_0x13845c(0x18d)+CLI_BIN_NAME+_0x13845c(0x176)+CLI_BIN_NAME+_0x13845c(0x16f));}function askAppcode(){return input({'message':'Please\x20enter\x20App\x20Code:','validate':_0x59ce80=>{const _0x429d0b=a88_0x2043;if(!_0x59ce80['trim']())return'App\x20Code\x20cannot\x20be\x20empty';const {valid:_0x541ceb,message:_0x307e07}=validateAppcode(_0x59ce80['trim']());return _0x541ceb||_0x307e07||_0x429d0b(0x16e);}});}function getCliVersionFromPkg(){const _0xf15a8f=a88_0x2043;try{const _0x526c67=fileURLToPath(import.meta.url),_0xd9f746=resolve(dirname(_0x526c67),_0xf15a8f(0x174)),_0x1458d0=JSON[_0xf15a8f(0x188)](readFileSync(resolve(_0xd9f746,_0xf15a8f(0x185)),'utf8'));return _0x1458d0[_0xf15a8f(0x192)]||_0xf15a8f(0x19b);}catch{return'1.0.0';}}