@lovrabet/rabetbase-cli 2.0.2-beta.2 → 2.0.2-beta.3

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 (146) hide show
  1. package/lib/ai-setup/config.js +1 -1
  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/api/pull-silent.js +1 -1
  6. package/lib/auth/auth-server-ui.js +1 -1
  7. package/lib/auth/auth-server.js +1 -1
  8. package/lib/auth/constant.js +1 -1
  9. package/lib/auth/get-cookie.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 -0
  15. package/lib/commands/api/index.js +1 -0
  16. package/lib/commands/api/list.js +1 -0
  17. package/lib/commands/api/pull.js +1 -0
  18. package/lib/commands/app.js +1 -1
  19. package/lib/commands/auth.js +1 -1
  20. package/lib/commands/bff/delete.js +1 -1
  21. package/lib/commands/bff/detail.js +1 -1
  22. package/lib/commands/bff/index.js +1 -1
  23. package/lib/commands/bff/list.js +1 -1
  24. package/lib/commands/bff/new.js +1 -1
  25. package/lib/commands/bff/pull.js +1 -1
  26. package/lib/commands/bff/push.js +1 -1
  27. package/lib/commands/bff/status.js +1 -1
  28. package/lib/commands/build.js +1 -1
  29. package/lib/commands/codegen/index.js +1 -1
  30. package/lib/commands/codegen/sdk.js +1 -1
  31. package/lib/commands/codegen/sql.js +1 -1
  32. package/lib/commands/common/flags.js +1 -0
  33. package/lib/commands/config.js +1 -1
  34. package/lib/commands/create.js +1 -1
  35. package/lib/commands/dataset/detail.js +1 -1
  36. package/lib/commands/dataset/index.js +1 -1
  37. package/lib/commands/dataset/links.js +1 -1
  38. package/lib/commands/dataset/list.js +1 -1
  39. package/lib/commands/dataset/operations.js +1 -1
  40. package/lib/commands/init.js +1 -1
  41. package/lib/commands/logout.js +1 -1
  42. package/lib/commands/logs.js +1 -1
  43. package/lib/commands/mcp.js +1 -1
  44. package/lib/commands/menu/index.js +1 -0
  45. package/lib/commands/menu/shared/compare-table.js +1 -0
  46. package/lib/commands/menu/shared/index.js +1 -0
  47. package/lib/commands/menu/shared/inquirer.js +1 -0
  48. package/lib/commands/menu/shared/local-pages.js +1 -0
  49. package/lib/commands/menu/shared/logic.js +1 -0
  50. package/lib/commands/menu/shared/service.js +1 -0
  51. package/lib/commands/menu/shared/sync-core.js +1 -0
  52. package/lib/commands/menu/shared/update-core.js +1 -0
  53. package/lib/commands/menu/shared/valid-url.js +1 -0
  54. package/lib/commands/menu/sync.js +1 -0
  55. package/lib/commands/menu/update.js +1 -0
  56. package/lib/commands/preview.js +1 -1
  57. package/lib/commands/registry.js +1 -1
  58. package/lib/commands/run.js +1 -1
  59. package/lib/commands/skill.js +1 -1
  60. package/lib/commands/sql/detail.js +1 -1
  61. package/lib/commands/sql/exec.js +1 -1
  62. package/lib/commands/sql/index.js +1 -1
  63. package/lib/commands/sql/list.js +1 -1
  64. package/lib/commands/sql/save.js +1 -1
  65. package/lib/commands/sql/validate.js +1 -1
  66. package/lib/commands/start.js +1 -1
  67. package/lib/config/config-help.js +1 -1
  68. package/lib/config/main.js +1 -1
  69. package/lib/constant/cli.js +1 -1
  70. package/lib/constant/domain.js +1 -1
  71. package/lib/constant/env.js +1 -1
  72. package/lib/context.js +1 -1
  73. package/lib/core/alias-resolver.js +1 -1
  74. package/lib/core/api-client.js +1 -1
  75. package/lib/core/bff/config.js +1 -1
  76. package/lib/core/bff/file-system.js +1 -1
  77. package/lib/core/bff/hash.js +1 -1
  78. package/lib/core/bff/lock.js +1 -1
  79. package/lib/core/bff/utils.js +1 -1
  80. package/lib/core/db-resolver.js +1 -1
  81. package/lib/core/sql-validator.js +1 -1
  82. package/lib/create-app/enhanced-guided-create.js +1 -1
  83. package/lib/create-app/format-elapsed.js +1 -1
  84. package/lib/create-app/main.js +1 -1
  85. package/lib/create-app/non-interactive.js +1 -1
  86. package/lib/create-app/task-finished.js +1 -1
  87. package/lib/create-app/task-loading.js +1 -1
  88. package/lib/create-app/task-running.js +1 -1
  89. package/lib/create-app/task-time.js +1 -1
  90. package/lib/create-app/use-copy-project-template.js +1 -1
  91. package/lib/create-app/use-format-code.js +1 -1
  92. package/lib/create-app/use-install-dependencies.js +1 -1
  93. package/lib/errors.js +1 -1
  94. package/lib/framework/flags.js +1 -1
  95. package/lib/framework/help.js +1 -1
  96. package/lib/framework/index.js +1 -1
  97. package/lib/framework/output.js +1 -1
  98. package/lib/framework/response.js +1 -1
  99. package/lib/framework/runner.js +1 -1
  100. package/lib/generated/build-info.js +1 -1
  101. package/lib/help.js +1 -1
  102. package/lib/init/main.js +1 -1
  103. package/lib/mcp/McpInstallUI.js +1 -1
  104. package/lib/mcp/claude.js +1 -1
  105. package/lib/mcp/cursor.js +1 -1
  106. package/lib/mcp/main.js +1 -1
  107. package/lib/mcp/mcp-install-non-interactive.js +1 -1
  108. package/lib/mcp/mcp-installer.js +1 -1
  109. package/lib/skills/main.js +1 -1
  110. package/lib/skills/npx-skills-add.js +1 -1
  111. package/lib/ui/IDESelector.js +1 -1
  112. package/lib/ui/useIDESelection.js +1 -1
  113. package/lib/utils/ai_config.js +1 -1
  114. package/lib/utils/cdn-config.js +1 -1
  115. package/lib/utils/check-sdk-version.js +1 -1
  116. package/lib/utils/cli-version-check.js +1 -1
  117. package/lib/utils/config.js +1 -1
  118. package/lib/utils/copy-directory.js +1 -1
  119. package/lib/utils/file-utils.js +1 -1
  120. package/lib/utils/guides-cdn.js +1 -1
  121. package/lib/utils/http-client.js +1 -1
  122. package/lib/utils/logger.js +1 -1
  123. package/lib/utils/rules-cdn.js +1 -1
  124. package/lib/utils/sleep.js +1 -1
  125. package/lib/utils/template-replacer.js +1 -1
  126. package/package.json +5 -2
  127. package/templates/generate-api/api.ts.tpl +4 -4
  128. package/templates/generate-api/client.ts.tpl +2 -2
  129. package/lib/api/api-doc-ui.js +0 -1
  130. package/lib/api/api-pull-ui.js +0 -1
  131. package/lib/api/main.js +0 -1
  132. package/lib/app-menu/app-menu-sync-ui.js +0 -1
  133. package/lib/app-menu/create-menu.js +0 -1
  134. package/lib/app-menu/get-local-pages.js +0 -1
  135. package/lib/app-menu/get-online-menu-list.js +0 -1
  136. package/lib/app-menu/types.js +0 -1
  137. package/lib/app-menu/use-get-online-menu-list.js +0 -1
  138. package/lib/app-menu/utils.js +0 -1
  139. package/lib/app-menu/valid-url.js +0 -1
  140. package/lib/app-menu-update-cdn/current-content.js +0 -1
  141. package/lib/app-menu-update-cdn/input-cdn-asset.js +0 -1
  142. package/lib/app-menu-update-cdn/main.js +0 -1
  143. package/lib/app-menu-update-cdn/update-menu-cdn-url.js +0 -1
  144. package/lib/commands/api.js +0 -1
  145. package/lib/commands/menu.js +0 -1
  146. /package/lib/{app-menu-update-cdn → commands/menu/shared}/types.js +0 -0
@@ -1 +1 @@
1
- const a76_0x6b92e6=a76_0x4126;(function(_0x29c172,_0x584d2d){const _0x34a097=a76_0x4126,_0x9b669d=_0x29c172();while(!![]){try{const _0x18800b=parseInt(_0x34a097(0x1b4))/0x1*(-parseInt(_0x34a097(0x1a1))/0x2)+-parseInt(_0x34a097(0x19b))/0x3*(parseInt(_0x34a097(0x19f))/0x4)+-parseInt(_0x34a097(0x199))/0x5+-parseInt(_0x34a097(0x1b2))/0x6+-parseInt(_0x34a097(0x1a7))/0x7+parseInt(_0x34a097(0x195))/0x8+-parseInt(_0x34a097(0x1b5))/0x9*(-parseInt(_0x34a097(0x193))/0xa);if(_0x18800b===_0x584d2d)break;else _0x9b669d['push'](_0x9b669d['shift']());}catch(_0x18ddcf){_0x9b669d['push'](_0x9b669d['shift']());}}}(a76_0x3c4c,0xdf3a3));function a76_0x3c4c(){const _0x12ca14=['4641581THBarl','after','HOOK/','code','before','split','beforeScriptId','datasetCode','endsWith','functionName','trim','6973260gbdvPn','COMMON','246211JFpsvs','9zFOuvY','isDirectory','afterScriptId','functionNode','56871490XyEqQJ','scriptsRootDir','13424976qQZrnd','set','push','operationType','8200160VhSyDj','HOOK','657957FxbILk','toUpperCase','replace','F_OK','32imTtAi','name','10CKYamR','ENOENT','.js','get','all','ENDPOINT'];a76_0x3c4c=function(){return _0x12ca14;};return a76_0x3c4c();}import{access,mkdir,readdir,stat}from'node:fs/promises';function a76_0x4126(_0x52eead,_0x2cb044){_0x52eead=_0x52eead-0x192;const _0x3c4c0f=a76_0x3c4c();let _0x41266d=_0x3c4c0f[_0x52eead];return _0x41266d;}import{constants}from'node:fs';import{dirname,join}from'node:path';import{findHookLocationByRemoteId,snakeToCamel}from'./utils.js';export const SUPPORTED_BFF_TYPES=[a76_0x6b92e6(0x1b3),a76_0x6b92e6(0x1a6),'HOOK'];export function normalizeBffType(_0x1ad606){const _0x14debd=a76_0x6b92e6;if(!_0x1ad606)return undefined;const _0x22fee1=_0x1ad606[_0x14debd(0x1b1)]()[_0x14debd(0x19c)]();return SUPPORTED_BFF_TYPES['includes'](_0x22fee1)?_0x22fee1:undefined;}async function scanJsFilesRecursively(_0x527f4a,_0x26bcd0){const _0x120d5b=a76_0x6b92e6,_0x3bc445=[];try{const _0x34c539=await readdir(_0x527f4a,{'withFileTypes':!![]});for(const _0x461bb2 of _0x34c539){const _0x3e059d=join(_0x527f4a,_0x461bb2['name']);if(_0x461bb2[_0x120d5b(0x1b6)]())_0x3bc445['push'](...await scanJsFilesRecursively(_0x3e059d,_0x26bcd0+'/'+_0x461bb2[_0x120d5b(0x1a0)]));else _0x461bb2['isFile']()&&_0x461bb2[_0x120d5b(0x1a0)][_0x120d5b(0x1af)](_0x120d5b(0x1a3))&&_0x3bc445[_0x120d5b(0x197)]({'lockKey':_0x26bcd0+'/'+_0x461bb2[_0x120d5b(0x1a0)][_0x120d5b(0x19d)](/\.js$/,''),'filePath':_0x3e059d});}}catch(_0x5682b1){if(_0x5682b1[_0x120d5b(0x1aa)]!=='ENOENT')throw _0x5682b1;}return _0x3bc445;}async function scanFlatFunctions(_0x2d7734,_0x3fe095){const _0x1e5986=a76_0x6b92e6,_0x4793e5=join(_0x2d7734[_0x1e5986(0x194)],_0x3fe095),_0x2ccd51=await scanJsFilesRecursively(_0x4793e5,_0x3fe095);return _0x2ccd51['map'](({lockKey:_0x37e52b,filePath:_0x3bc58c})=>({'type':_0x3fe095,'name':_0x37e52b[_0x1e5986(0x1ac)]('/')['at'](-0x1)??'','filePath':_0x3bc58c,'lockKey':_0x37e52b}));}async function scanHookFunctions(_0x483961){const _0x1c887e=a76_0x6b92e6,_0x57b9e6=join(_0x483961[_0x1c887e(0x194)],_0x1c887e(0x19a)),_0x5c1456=[];try{const _0x51d1a4=await readdir(_0x57b9e6,{'withFileTypes':!![]});for(const _0x52d5e9 of _0x51d1a4){if(!_0x52d5e9[_0x1c887e(0x1b6)]())continue;const _0xe045a3=_0x52d5e9[_0x1c887e(0x1a0)],_0x5bc3f4=join(_0x57b9e6,_0xe045a3),_0x511e92=await readdir(_0x5bc3f4,{'withFileTypes':!![]});for(const _0x2d1e3f of _0x511e92){if(!_0x2d1e3f[_0x1c887e(0x1b6)]())continue;const _0x4150cf=_0x2d1e3f[_0x1c887e(0x1a0)],_0x5bc24d=join(_0x5bc3f4,_0x4150cf),_0x2679a4=await readdir(_0x5bc24d,{'withFileTypes':!![]});for(const _0xff309d of _0x2679a4){if(!_0xff309d[_0x1c887e(0x1b6)]())continue;const _0x3db5a5=_0xff309d[_0x1c887e(0x1a0)],_0x4bd661=join(_0x5bc24d,_0x3db5a5),_0x58a8cd=await readdir(_0x4bd661,{'withFileTypes':!![]});for(const _0x5c114d of _0x58a8cd){if(!_0x5c114d['isFile']()||!_0x5c114d[_0x1c887e(0x1a0)][_0x1c887e(0x1af)](_0x1c887e(0x1a3)))continue;const _0x1759a8=_0x5c114d[_0x1c887e(0x1a0)][_0x1c887e(0x19d)](/\.js$/,'');_0x5c1456[_0x1c887e(0x197)]({'type':'HOOK','name':_0x1759a8,'filePath':join(_0x4bd661,_0x5c114d['name']),'lockKey':_0x1c887e(0x1a9)+_0xe045a3+'/'+_0x4150cf+'/'+_0x3db5a5+'/'+_0x1759a8,'alias':_0xe045a3,'operationType':_0x4150cf,'functionNode':_0x3db5a5});}}}}}catch(_0x33e711){if(_0x33e711[_0x1c887e(0x1aa)]!==_0x1c887e(0x1a2))throw _0x33e711;}return _0x5c1456;}export async function scanLocalBffFunctions(_0x5a9a39,_0x351c67){const _0x478f84=a76_0x6b92e6;if(_0x351c67===_0x478f84(0x1b3)||_0x351c67==='ENDPOINT')return scanFlatFunctions(_0x5a9a39,_0x351c67);if(_0x351c67==='HOOK')return scanHookFunctions(_0x5a9a39);const [_0x345efe,_0x3fff71,_0x1f1a2a]=await Promise[_0x478f84(0x1a5)]([scanFlatFunctions(_0x5a9a39,_0x478f84(0x1b3)),scanFlatFunctions(_0x5a9a39,_0x478f84(0x1a6)),scanHookFunctions(_0x5a9a39)]);return[..._0x345efe,..._0x3fff71,..._0x1f1a2a];}export function resolveLocalFilePathFromLockKey(_0x51e46e,_0x49e0af){const _0x164a49=a76_0x6b92e6;return join(_0x51e46e[_0x164a49(0x194)],..._0x49e0af[_0x164a49(0x1ac)]('/'))+_0x164a49(0x1a3);}export function createHookLocationMap(_0x40afbd){const _0xf37389=a76_0x6b92e6,_0x3bb8df=new Map();for(const _0x163b17 of _0x40afbd){_0x163b17[_0xf37389(0x1ad)]&&_0x3bb8df[_0xf37389(0x196)](_0x163b17['beforeScriptId'],{'datasetCode':_0x163b17[_0xf37389(0x1ae)],'operationType':snakeToCamel(_0x163b17[_0xf37389(0x198)]),'functionNode':_0xf37389(0x1ab)}),_0x163b17[_0xf37389(0x1b7)]&&_0x3bb8df[_0xf37389(0x196)](_0x163b17[_0xf37389(0x1b7)],{'datasetCode':_0x163b17['datasetCode'],'operationType':snakeToCamel(_0x163b17[_0xf37389(0x198)]),'functionNode':_0xf37389(0x1a8)});}return _0x3bb8df;}export function resolveRemoteScriptTarget(_0x6c13e8,_0x7269ab,_0x6d6fe,_0x564362,_0x24b2bf){const _0x1fb31d=a76_0x6b92e6,_0x3a70e6=normalizeBffType(_0x7269ab['scriptType']);if(!_0x3a70e6||!_0x7269ab[_0x1fb31d(0x1b0)])return null;if(_0x3a70e6===_0x1fb31d(0x19a)){const _0x5e2992=(_0x7269ab['id']?_0x6d6fe['get'](_0x7269ab['id']):undefined)??findHookLocationByRemoteId(_0x564362,_0x7269ab['id']);if(!_0x5e2992)return null;const _0x2ae58a=_0x5e2992['alias']||_0x24b2bf[_0x1fb31d(0x1a4)](_0x5e2992['datasetCode']),_0x5d1e1a=_0x2ae58a??_0x5e2992[_0x1fb31d(0x1ae)],_0x51e280={..._0x5e2992,'alias':_0x2ae58a},_0xfb6f9f='HOOK/'+_0x5d1e1a+'/'+_0x51e280[_0x1fb31d(0x198)]+'/'+_0x51e280[_0x1fb31d(0x192)]+'/'+_0x7269ab[_0x1fb31d(0x1b0)];return{'lockKey':_0xfb6f9f,'filePath':resolveLocalFilePathFromLockKey(_0x6c13e8,_0xfb6f9f),'type':_0x1fb31d(0x19a),'hookLocation':_0x51e280};}const _0x4b4b2a=_0x3a70e6+'/'+_0x7269ab[_0x1fb31d(0x1b0)];return{'lockKey':_0x4b4b2a,'filePath':resolveLocalFilePathFromLockKey(_0x6c13e8,_0x4b4b2a),'type':_0x3a70e6};}export async function ensureParentDirectory(_0x4afd6c){await mkdir(dirname(_0x4afd6c),{'recursive':!![]});}export async function fileExists(_0x5d0e1b){const _0x584115=a76_0x6b92e6;try{return await access(_0x5d0e1b,constants[_0x584115(0x19e)]),!![];}catch{return![];}}export async function directoryExists(_0x99e3c5){try{const _0xaf51c2=await stat(_0x99e3c5);return _0xaf51c2['isDirectory']();}catch{return![];}}
1
+ const a76_0x46817a=a76_0x4ba3;(function(_0x5347ce,_0x459efc){const _0x2e533f=a76_0x4ba3,_0x53e85a=_0x5347ce();while(!![]){try{const _0xe47997=parseInt(_0x2e533f(0x83))/0x1+-parseInt(_0x2e533f(0x81))/0x2*(parseInt(_0x2e533f(0x89))/0x3)+parseInt(_0x2e533f(0x8b))/0x4+-parseInt(_0x2e533f(0x87))/0x5+parseInt(_0x2e533f(0x7f))/0x6*(parseInt(_0x2e533f(0x86))/0x7)+-parseInt(_0x2e533f(0x8d))/0x8*(parseInt(_0x2e533f(0x85))/0x9)+-parseInt(_0x2e533f(0x8f))/0xa*(-parseInt(_0x2e533f(0x79))/0xb);if(_0xe47997===_0x459efc)break;else _0x53e85a['push'](_0x53e85a['shift']());}catch(_0x44cace){_0x53e85a['push'](_0x53e85a['shift']());}}}(a76_0x5414,0xb3173));import{access,mkdir,readdir,stat}from'node:fs/promises';import{constants}from'node:fs';import{dirname,join}from'node:path';import{findHookLocationByRemoteId,snakeToCamel}from'./utils.js';export const SUPPORTED_BFF_TYPES=[a76_0x46817a(0x78),a76_0x46817a(0x96),a76_0x46817a(0x94)];export function normalizeBffType(_0x43b2c6){const _0x4a7c93=a76_0x46817a;if(!_0x43b2c6)return undefined;const _0x99fa4=_0x43b2c6[_0x4a7c93(0x7d)]()[_0x4a7c93(0x84)]();return SUPPORTED_BFF_TYPES[_0x4a7c93(0x99)](_0x99fa4)?_0x99fa4:undefined;}async function scanJsFilesRecursively(_0x23f2c6,_0x1abbcb){const _0xfe147d=a76_0x46817a,_0x10b8f6=[];try{const _0x5b1e51=await readdir(_0x23f2c6,{'withFileTypes':!![]});for(const _0x2d3711 of _0x5b1e51){const _0x22c914=join(_0x23f2c6,_0x2d3711[_0xfe147d(0x8a)]);if(_0x2d3711['isDirectory']())_0x10b8f6[_0xfe147d(0x97)](...await scanJsFilesRecursively(_0x22c914,_0x1abbcb+'/'+_0x2d3711[_0xfe147d(0x8a)]));else _0x2d3711[_0xfe147d(0x7c)]()&&_0x2d3711[_0xfe147d(0x8a)][_0xfe147d(0x9b)](_0xfe147d(0x92))&&_0x10b8f6[_0xfe147d(0x97)]({'lockKey':_0x1abbcb+'/'+_0x2d3711[_0xfe147d(0x8a)]['replace'](/\.js$/,''),'filePath':_0x22c914});}}catch(_0x3340fb){if(_0x3340fb[_0xfe147d(0x76)]!=='ENOENT')throw _0x3340fb;}return _0x10b8f6;}function a76_0x5414(){const _0x508196=['25986oTdZXc','get','2lANcqd','alias','557708nGSbmt','toUpperCase','549uUPrNW','2303QfGphV','3265655xZzrOo','all','2747988sdGXBo','name','1420956CQltuZ','datasetCode','48952PgyhpP','HOOK/','676190IVTLHZ','afterScriptId','set','.js','isDirectory','HOOK','operationType','ENDPOINT','push','beforeScriptId','includes','functionName','endsWith','functionNode','replace','scriptsRootDir','code','scriptType','COMMON','55UcGRcK','before','F_OK','isFile','trim','split'];a76_0x5414=function(){return _0x508196;};return a76_0x5414();}async function scanFlatFunctions(_0x1eb312,_0x32419f){const _0x2b72f7=a76_0x46817a,_0x413973=join(_0x1eb312['scriptsRootDir'],_0x32419f),_0x219262=await scanJsFilesRecursively(_0x413973,_0x32419f);return _0x219262['map'](({lockKey:_0x219608,filePath:_0x507abf})=>({'type':_0x32419f,'name':_0x219608[_0x2b72f7(0x7e)]('/')['at'](-0x1)??'','filePath':_0x507abf,'lockKey':_0x219608}));}async function scanHookFunctions(_0xb6a956){const _0x291a58=a76_0x46817a,_0x5491a2=join(_0xb6a956[_0x291a58(0x75)],_0x291a58(0x94)),_0x4ea520=[];try{const _0xf90805=await readdir(_0x5491a2,{'withFileTypes':!![]});for(const _0xc0d645 of _0xf90805){if(!_0xc0d645['isDirectory']())continue;const _0x1f5251=_0xc0d645['name'],_0x421f02=join(_0x5491a2,_0x1f5251),_0x429e78=await readdir(_0x421f02,{'withFileTypes':!![]});for(const _0xc87480 of _0x429e78){if(!_0xc87480[_0x291a58(0x93)]())continue;const _0x3cd916=_0xc87480[_0x291a58(0x8a)],_0x29e865=join(_0x421f02,_0x3cd916),_0x253997=await readdir(_0x29e865,{'withFileTypes':!![]});for(const _0x5d8500 of _0x253997){if(!_0x5d8500['isDirectory']())continue;const _0x952e5f=_0x5d8500[_0x291a58(0x8a)],_0x4be15=join(_0x29e865,_0x952e5f),_0x68e511=await readdir(_0x4be15,{'withFileTypes':!![]});for(const _0x4bec78 of _0x68e511){if(!_0x4bec78[_0x291a58(0x7c)]()||!_0x4bec78[_0x291a58(0x8a)][_0x291a58(0x9b)]('.js'))continue;const _0x2820af=_0x4bec78[_0x291a58(0x8a)][_0x291a58(0x74)](/\.js$/,'');_0x4ea520[_0x291a58(0x97)]({'type':_0x291a58(0x94),'name':_0x2820af,'filePath':join(_0x4be15,_0x4bec78[_0x291a58(0x8a)]),'lockKey':_0x291a58(0x8e)+_0x1f5251+'/'+_0x3cd916+'/'+_0x952e5f+'/'+_0x2820af,'alias':_0x1f5251,'operationType':_0x3cd916,'functionNode':_0x952e5f});}}}}}catch(_0x473a01){if(_0x473a01[_0x291a58(0x76)]!=='ENOENT')throw _0x473a01;}return _0x4ea520;}function a76_0x4ba3(_0x5105e0,_0x57520e){_0x5105e0=_0x5105e0-0x73;const _0x541488=a76_0x5414();let _0x4ba353=_0x541488[_0x5105e0];return _0x4ba353;}export async function scanLocalBffFunctions(_0x2a229b,_0x5758da){const _0x1208b6=a76_0x46817a;if(_0x5758da===_0x1208b6(0x78)||_0x5758da===_0x1208b6(0x96))return scanFlatFunctions(_0x2a229b,_0x5758da);if(_0x5758da==='HOOK')return scanHookFunctions(_0x2a229b);const [_0x458ff9,_0x236411,_0x18f419]=await Promise[_0x1208b6(0x88)]([scanFlatFunctions(_0x2a229b,_0x1208b6(0x78)),scanFlatFunctions(_0x2a229b,_0x1208b6(0x96)),scanHookFunctions(_0x2a229b)]);return[..._0x458ff9,..._0x236411,..._0x18f419];}export function resolveLocalFilePathFromLockKey(_0x50fcac,_0x336269){const _0x128859=a76_0x46817a;return join(_0x50fcac[_0x128859(0x75)],..._0x336269[_0x128859(0x7e)]('/'))+_0x128859(0x92);}export function createHookLocationMap(_0xbf0a59){const _0x235ffa=a76_0x46817a,_0x32751f=new Map();for(const _0x59f42e of _0xbf0a59){_0x59f42e[_0x235ffa(0x98)]&&_0x32751f['set'](_0x59f42e['beforeScriptId'],{'datasetCode':_0x59f42e[_0x235ffa(0x8c)],'operationType':snakeToCamel(_0x59f42e[_0x235ffa(0x95)]),'functionNode':_0x235ffa(0x7a)}),_0x59f42e[_0x235ffa(0x90)]&&_0x32751f[_0x235ffa(0x91)](_0x59f42e['afterScriptId'],{'datasetCode':_0x59f42e[_0x235ffa(0x8c)],'operationType':snakeToCamel(_0x59f42e[_0x235ffa(0x95)]),'functionNode':'after'});}return _0x32751f;}export function resolveRemoteScriptTarget(_0x500fdc,_0x361f6f,_0x4c88cc,_0x57982a,_0xb37576){const _0x5b1298=a76_0x46817a,_0x4b0ec2=normalizeBffType(_0x361f6f[_0x5b1298(0x77)]);if(!_0x4b0ec2||!_0x361f6f[_0x5b1298(0x9a)])return null;if(_0x4b0ec2===_0x5b1298(0x94)){const _0x30f937=(_0x361f6f['id']?_0x4c88cc[_0x5b1298(0x80)](_0x361f6f['id']):undefined)??findHookLocationByRemoteId(_0x57982a,_0x361f6f['id']);if(!_0x30f937)return null;const _0x19f6ce=_0x30f937[_0x5b1298(0x82)]||_0xb37576['get'](_0x30f937[_0x5b1298(0x8c)]),_0xef1345=_0x19f6ce??_0x30f937[_0x5b1298(0x8c)],_0x51e509={..._0x30f937,'alias':_0x19f6ce},_0x4d9620=_0x5b1298(0x8e)+_0xef1345+'/'+_0x51e509['operationType']+'/'+_0x51e509[_0x5b1298(0x73)]+'/'+_0x361f6f['functionName'];return{'lockKey':_0x4d9620,'filePath':resolveLocalFilePathFromLockKey(_0x500fdc,_0x4d9620),'type':'HOOK','hookLocation':_0x51e509};}const _0x4a7757=_0x4b0ec2+'/'+_0x361f6f['functionName'];return{'lockKey':_0x4a7757,'filePath':resolveLocalFilePathFromLockKey(_0x500fdc,_0x4a7757),'type':_0x4b0ec2};}export async function ensureParentDirectory(_0xed777e){await mkdir(dirname(_0xed777e),{'recursive':!![]});}export async function fileExists(_0x22b653){const _0x147f44=a76_0x46817a;try{return await access(_0x22b653,constants[_0x147f44(0x7b)]),!![];}catch{return![];}}export async function directoryExists(_0x36f477){const _0x2e115b=a76_0x46817a;try{const _0x52a4f6=await stat(_0x36f477);return _0x52a4f6[_0x2e115b(0x93)]();}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x4a6a8e,_0x33d196){const _0x5d38a2=a77_0x361d,_0x16c277=_0x4a6a8e();while(!![]){try{const _0x15cbc0=parseInt(_0x5d38a2(0x17f))/0x1*(-parseInt(_0x5d38a2(0x188))/0x2)+parseInt(_0x5d38a2(0x182))/0x3*(parseInt(_0x5d38a2(0x179))/0x4)+-parseInt(_0x5d38a2(0x17b))/0x5*(parseInt(_0x5d38a2(0x17e))/0x6)+parseInt(_0x5d38a2(0x17d))/0x7*(-parseInt(_0x5d38a2(0x17c))/0x8)+parseInt(_0x5d38a2(0x184))/0x9*(parseInt(_0x5d38a2(0x187))/0xa)+parseInt(_0x5d38a2(0x185))/0xb+-parseInt(_0x5d38a2(0x17a))/0xc*(-parseInt(_0x5d38a2(0x18b))/0xd);if(_0x15cbc0===_0x33d196)break;else _0x16c277['push'](_0x16c277['shift']());}catch(_0x2293d6){_0x16c277['push'](_0x16c277['shift']());}}}(a77_0x3c54,0xab92f));import{readFile}from'node:fs/promises';import a77_0x11e706 from'node:crypto';function a77_0x3c54(){const _0x5149ef=['hex','update','1155468GdwCVH','createHash','9itrLqg','9667768LHTtcM','utf8','3728170xcShrD','26kaIXgF','digest','md5','25883XWgqum','4mlRFcP','5916jRSeLc','1341095HgcBAK','2442128pQuuGE','28CBmoTq','6aBVBdF','32798kEfwuL'];a77_0x3c54=function(){return _0x5149ef;};return a77_0x3c54();}export function computeContentHash(_0xfd7323){const _0x2aa4ff=a77_0x361d;return a77_0x11e706[_0x2aa4ff(0x183)](_0x2aa4ff(0x18a))[_0x2aa4ff(0x181)](_0xfd7323)[_0x2aa4ff(0x189)](_0x2aa4ff(0x180));}function a77_0x361d(_0x5732e3,_0x45c79a){_0x5732e3=_0x5732e3-0x179;const _0x3c548f=a77_0x3c54();let _0x361d76=_0x3c548f[_0x5732e3];return _0x361d76;}export async function computeFileHash(_0x15633b){const _0x134086=a77_0x361d,_0x183245=await readFile(_0x15633b,_0x134086(0x186));return computeContentHash(_0x183245);}
1
+ function a77_0x54fd(){const _0x740582=['568086rbQOyJ','update','1314486xmVDQN','createHash','utf8','digest','3299715xfNAng','269128rJFnAT','2152815VoVAxR','31650BrmqiI','hex','7dHTcxE','4QcDFQv','1992056dopbwm','4yMeXjh','3091kdbmPJ'];a77_0x54fd=function(){return _0x740582;};return a77_0x54fd();}function a77_0x7b1e(_0x4a7192,_0x4fc6f7){_0x4a7192=_0x4a7192-0x135;const _0x54fd8a=a77_0x54fd();let _0x7b1e44=_0x54fd8a[_0x4a7192];return _0x7b1e44;}(function(_0x1f4e66,_0x148baf){const _0x18bad9=a77_0x7b1e,_0x6129d7=_0x1f4e66();while(!![]){try{const _0x4d85c2=-parseInt(_0x18bad9(0x13c))/0x1*(-parseInt(_0x18bad9(0x143))/0x2)+-parseInt(_0x18bad9(0x137))/0x3+parseInt(_0x18bad9(0x141))/0x4*(parseInt(_0x18bad9(0x13d))/0x5)+parseInt(_0x18bad9(0x135))/0x6+-parseInt(_0x18bad9(0x140))/0x7*(-parseInt(_0x18bad9(0x142))/0x8)+parseInt(_0x18bad9(0x13b))/0x9+-parseInt(_0x18bad9(0x13e))/0xa*(parseInt(_0x18bad9(0x144))/0xb);if(_0x4d85c2===_0x148baf)break;else _0x6129d7['push'](_0x6129d7['shift']());}catch(_0x57d3a9){_0x6129d7['push'](_0x6129d7['shift']());}}}(a77_0x54fd,0x55d7f));import{readFile}from'node:fs/promises';import a77_0x53f2b4 from'node:crypto';export function computeContentHash(_0x25b643){const _0x1c3057=a77_0x7b1e;return a77_0x53f2b4[_0x1c3057(0x138)]('md5')[_0x1c3057(0x136)](_0x25b643)[_0x1c3057(0x13a)](_0x1c3057(0x13f));}export async function computeFileHash(_0x5b49f1){const _0x2d4ef5=a77_0x7b1e,_0x4739b=await readFile(_0x5b49f1,_0x2d4ef5(0x139));return computeContentHash(_0x4739b);}
@@ -1 +1 @@
1
- (function(_0x4edcd5,_0x57b030){const _0x5c344c=a78_0x2a12,_0x8213c2=_0x4edcd5();while(!![]){try{const _0x2bf9e2=parseInt(_0x5c344c(0x80))/0x1*(-parseInt(_0x5c344c(0x8b))/0x2)+-parseInt(_0x5c344c(0x7b))/0x3*(parseInt(_0x5c344c(0x81))/0x4)+parseInt(_0x5c344c(0x8a))/0x5+-parseInt(_0x5c344c(0x74))/0x6+-parseInt(_0x5c344c(0x84))/0x7+-parseInt(_0x5c344c(0x72))/0x8*(-parseInt(_0x5c344c(0x7d))/0x9)+parseInt(_0x5c344c(0x78))/0xa;if(_0x2bf9e2===_0x57b030)break;else _0x8213c2['push'](_0x8213c2['shift']());}catch(_0x53fd75){_0x8213c2['push'](_0x8213c2['shift']());}}}(a78_0x3084,0xc114e));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyBffLock(_0x28e8f3){return{'aliases':_0x28e8f3?{'default':_0x28e8f3}:{},'apps':{}};}function normalizeLockFile(_0x309a73,_0x25414e,_0x555981){const _0x443330=a78_0x2a12;if(_0x443330(0x82)in _0x309a73&&_0x309a73[_0x443330(0x82)]&&typeof _0x309a73[_0x443330(0x82)]===_0x443330(0x86))return(!_0x309a73['aliases']||typeof _0x309a73[_0x443330(0x87)]!==_0x443330(0x86))&&(_0x309a73[_0x443330(0x87)]={}),!_0x309a73[_0x443330(0x87)][_0x443330(0x7c)]&&(_0x309a73['aliases']['default']=_0x25414e),_0x309a73;const _0x7e97dd=_0x309a73,_0x510e8=_0x7e97dd['meta']?.['appCode']?.[_0x443330(0x75)]()||_0x25414e,_0x57eef7=_0x7e97dd[_0x443330(0x7a)]?.[_0x443330(0x76)]?.[_0x443330(0x75)]()||_0x555981;return{'aliases':{'default':_0x510e8},'apps':{[_0x510e8]:{'scriptsRoot':_0x57eef7,'lastSync':_0x7e97dd[_0x443330(0x8d)]||'','functions':_0x7e97dd[_0x443330(0x77)]||{}}}};}export function ensureLockScope(_0x1a84ad,_0x477eb2,_0x4f0224,_0x861e4e,_0x3b6496,_0x29a70b){const _0xa28fc3=a78_0x2a12,_0x23e182=normalizeLockFile(_0x1a84ad,_0x3b6496,_0x29a70b);!_0x23e182[_0xa28fc3(0x87)][_0xa28fc3(0x7c)]&&(_0x23e182['aliases']['default']=_0x3b6496);let _0x431ed9=_0x23e182['apps'][_0x477eb2];if(!_0x431ed9)return _0x431ed9={'scriptsRoot':_0x4f0224,'lastSync':'','functions':{}},_0x23e182[_0xa28fc3(0x82)][_0x477eb2]=_0x431ed9,{'lockData':_0x23e182,'appLock':_0x431ed9};if(!_0x431ed9['scriptsRoot'])_0x431ed9[_0xa28fc3(0x76)]=_0x4f0224;else{if(_0x431ed9[_0xa28fc3(0x76)]!==_0x4f0224)throw new Error(_0x861e4e+_0xa28fc3(0x79)+('current\x20\x22'+_0x4f0224+'\x22\x20vs\x20lock\x20\x22'+_0x431ed9['scriptsRoot']+_0xa28fc3(0x8c))+_0xa28fc3(0x89));}return!_0x431ed9['functions']&&(_0x431ed9[_0xa28fc3(0x77)]={}),!_0x431ed9[_0xa28fc3(0x8d)]&&(_0x431ed9[_0xa28fc3(0x8d)]=''),{'lockData':_0x23e182,'appLock':_0x431ed9};}export async function readBffLockFile(_0x569f95){const _0x34cf2a=a78_0x2a12;try{const _0x673e28=await readFile(_0x569f95,_0x34cf2a(0x73));return JSON[_0x34cf2a(0x7e)](_0x673e28);}catch(_0x55a105){if(_0x55a105[_0x34cf2a(0x85)]===_0x34cf2a(0x88))return null;throw new Error(_0x34cf2a(0x7f)+String(_0x55a105));}}function a78_0x2a12(_0x1b71ce,_0x19dc19){_0x1b71ce=_0x1b71ce-0x72;const _0x30846b=a78_0x3084();let _0x2a1299=_0x30846b[_0x1b71ce];return _0x2a1299;}function a78_0x3084(){const _0x39006f=['meta','15bAEits','default','153gEoSHp','parse','Failed\x20to\x20read\x20BFF\x20lock\x20file:\x20','167ELtSFH','1208056qlnbfo','apps','stringify','2691577GtmHQG','code','object','aliases','ENOENT','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','6490785QltMDQ','146ThiCql','\x22.\x20','lastSync','53368ctnEvD','utf8','7594578oXfKLn','trim','scriptsRoot','functions','25518330nGeOGA',':\x20scriptsRoot\x20mismatch\x20—\x20'];a78_0x3084=function(){return _0x39006f;};return a78_0x3084();}export async function writeBffLockFile(_0x1c067a,_0x23434b){const _0x41699c=a78_0x2a12;await mkdir(dirname(_0x1c067a),{'recursive':!![]}),await writeFile(_0x1c067a,JSON[_0x41699c(0x83)](_0x23434b,null,0x2),_0x41699c(0x73));}
1
+ (function(_0x15d8dd,_0x5c225d){const _0x374744=a78_0x26a6,_0x4d04fa=_0x15d8dd();while(!![]){try{const _0x3706fc=-parseInt(_0x374744(0x13c))/0x1+parseInt(_0x374744(0x146))/0x2+parseInt(_0x374744(0x140))/0x3+-parseInt(_0x374744(0x13f))/0x4+-parseInt(_0x374744(0x152))/0x5*(parseInt(_0x374744(0x14b))/0x6)+parseInt(_0x374744(0x145))/0x7*(-parseInt(_0x374744(0x154))/0x8)+parseInt(_0x374744(0x153))/0x9*(parseInt(_0x374744(0x147))/0xa);if(_0x3706fc===_0x5c225d)break;else _0x4d04fa['push'](_0x4d04fa['shift']());}catch(_0x39798b){_0x4d04fa['push'](_0x4d04fa['shift']());}}}(a78_0x16d7,0xd2204));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyBffLock(_0x5ba408){return{'aliases':_0x5ba408?{'default':_0x5ba408}:{},'apps':{}};}function normalizeLockFile(_0x590152,_0x2c1654,_0x40c3bd){const _0x237071=a78_0x26a6;if('apps'in _0x590152&&_0x590152[_0x237071(0x143)]&&typeof _0x590152['apps']===_0x237071(0x141))return(!_0x590152['aliases']||typeof _0x590152[_0x237071(0x150)]!==_0x237071(0x141))&&(_0x590152[_0x237071(0x150)]={}),!_0x590152['aliases'][_0x237071(0x14a)]&&(_0x590152['aliases'][_0x237071(0x14a)]=_0x2c1654),_0x590152;const _0x371e6a=_0x590152,_0x373330=_0x371e6a[_0x237071(0x14f)]?.['appCode']?.[_0x237071(0x148)]()||_0x2c1654,_0x2f5ab8=_0x371e6a[_0x237071(0x14f)]?.['scriptsRoot']?.['trim']()||_0x40c3bd;return{'aliases':{'default':_0x373330},'apps':{[_0x373330]:{'scriptsRoot':_0x2f5ab8,'lastSync':_0x371e6a[_0x237071(0x14c)]||'','functions':_0x371e6a[_0x237071(0x151)]||{}}}};}export function ensureLockScope(_0x7d6e87,_0x31d977,_0x512fe6,_0x49be43,_0x685fa4,_0x3dad74){const _0x46c83d=a78_0x26a6,_0x6b954b=normalizeLockFile(_0x7d6e87,_0x685fa4,_0x3dad74);!_0x6b954b[_0x46c83d(0x150)]['default']&&(_0x6b954b[_0x46c83d(0x150)][_0x46c83d(0x14a)]=_0x685fa4);let _0x4bc0c3=_0x6b954b[_0x46c83d(0x143)][_0x31d977];if(!_0x4bc0c3)return _0x4bc0c3={'scriptsRoot':_0x512fe6,'lastSync':'','functions':{}},_0x6b954b[_0x46c83d(0x143)][_0x31d977]=_0x4bc0c3,{'lockData':_0x6b954b,'appLock':_0x4bc0c3};if(!_0x4bc0c3['scriptsRoot'])_0x4bc0c3['scriptsRoot']=_0x512fe6;else{if(_0x4bc0c3['scriptsRoot']!==_0x512fe6)throw new Error(_0x49be43+_0x46c83d(0x13e)+(_0x46c83d(0x149)+_0x512fe6+_0x46c83d(0x14e)+_0x4bc0c3['scriptsRoot']+'\x22.\x20')+'Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.');}return!_0x4bc0c3[_0x46c83d(0x151)]&&(_0x4bc0c3['functions']={}),!_0x4bc0c3['lastSync']&&(_0x4bc0c3['lastSync']=''),{'lockData':_0x6b954b,'appLock':_0x4bc0c3};}export async function readBffLockFile(_0x219bc3){const _0x4144a1=a78_0x26a6;try{const _0x546138=await readFile(_0x219bc3,_0x4144a1(0x144));return JSON[_0x4144a1(0x13d)](_0x546138);}catch(_0x497513){if(_0x497513[_0x4144a1(0x14d)]==='ENOENT')return null;throw new Error('Failed\x20to\x20read\x20BFF\x20lock\x20file:\x20'+String(_0x497513));}}function a78_0x16d7(){const _0x22b8c7=['11856MouvTX','653742xPVHNW','parse',':\x20scriptsRoot\x20mismatch\x20—\x20','2889392wCEPIS','1140948NklPfv','object','stringify','apps','utf8','301DradUs','2211068opZjZG','40CFsLBv','trim','current\x20\x22','default','246EHPfsV','lastSync','code','\x22\x20vs\x20lock\x20\x22','meta','aliases','functions','73350dUFEMd','3186252VWJbUL'];a78_0x16d7=function(){return _0x22b8c7;};return a78_0x16d7();}function a78_0x26a6(_0x40a748,_0x3f9da0){_0x40a748=_0x40a748-0x13c;const _0x16d799=a78_0x16d7();let _0x26a615=_0x16d799[_0x40a748];return _0x26a615;}export async function writeBffLockFile(_0x49ecf9,_0x21dbf8){const _0x57819b=a78_0x26a6;await mkdir(dirname(_0x49ecf9),{'recursive':!![]}),await writeFile(_0x49ecf9,JSON[_0x57819b(0x142)](_0x21dbf8,null,0x2),_0x57819b(0x144));}
@@ -1 +1 @@
1
- (function(_0x4df584,_0x4dcf73){const _0xedb30d=a80_0x3230,_0x1fbec5=_0x4df584();while(!![]){try{const _0x27a1d0=-parseInt(_0xedb30d(0xd4))/0x1*(parseInt(_0xedb30d(0xcb))/0x2)+parseInt(_0xedb30d(0xc8))/0x3+-parseInt(_0xedb30d(0xc2))/0x4+-parseInt(_0xedb30d(0xcd))/0x5+parseInt(_0xedb30d(0xc9))/0x6+parseInt(_0xedb30d(0xc4))/0x7+parseInt(_0xedb30d(0xd2))/0x8*(-parseInt(_0xedb30d(0xd1))/0x9);if(_0x27a1d0===_0x4dcf73)break;else _0x1fbec5['push'](_0x1fbec5['shift']());}catch(_0x42de5e){_0x1fbec5['push'](_0x1fbec5['shift']());}}}(a80_0x2bc0,0x552f3));function a80_0x3230(_0x25a806,_0x4b539b){_0x25a806=_0x25a806-0xc1;const _0x2bc0f8=a80_0x2bc0();let _0x323096=_0x2bc0f8[_0x25a806];return _0x323096;}export function snakeToCamel(_0x4c3b4b){const _0x38d4e6=a80_0x3230;return _0x4c3b4b[_0x38d4e6(0xd0)]()['replace'](/_([a-z])/g,(_0x4884f2,_0x5edca7)=>_0x5edca7[_0x38d4e6(0xcc)]());}export function findHookLocationByRemoteId(_0x227dcb,_0x1fdd94){const _0x5b3f9d=a80_0x3230;if(!_0x1fdd94)return undefined;for(const _0x4466e5 of Object[_0x5b3f9d(0xc3)](_0x227dcb)){if(_0x4466e5[_0x5b3f9d(0xc5)]===_0x1fdd94&&_0x4466e5[_0x5b3f9d(0xcf)]&&_0x4466e5['operationType']&&_0x4466e5[_0x5b3f9d(0xca)])return{'datasetCode':_0x4466e5[_0x5b3f9d(0xcf)],'operationType':_0x4466e5[_0x5b3f9d(0xc6)],'functionNode':_0x4466e5[_0x5b3f9d(0xca)]};}return undefined;}function a80_0x2bc0(){const _0x4cd12d=['toUpperCase','2596690HRSSsN','test','datasetCode','toLowerCase','44865Lenkhc','224WMXxwu','match','1386GmWMZt','before','947084PMiYCt','values','4883998dSoQxY','remoteId','operationType','trim','1874139uzHKab','3042414YPOUwV','functionNode','844bnmWJA'];a80_0x2bc0=function(){return _0x4cd12d;};return a80_0x2bc0();}export function extractScriptDescription(_0xee0adc){const _0xc6e516=a80_0x3230,_0x201c01=_0xee0adc[_0xc6e516(0xd3)](/\[\s*脚本描述\s*]\s*(.+)/);return _0x201c01?.[0x1]?.['trim']()||undefined;}export function isValidBffFunctionName(_0x1b804b){const _0x505577=a80_0x3230;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x505577(0xce)](_0x1b804b);}export function normalizeHookFunctionNode(_0xf1e354){const _0x43936e=a80_0x3230;if(!_0xf1e354)return undefined;const _0xfc4d66=_0xf1e354[_0x43936e(0xc7)]()[_0x43936e(0xd0)]();if(_0xfc4d66===_0x43936e(0xc1)||_0xfc4d66==='after')return _0xfc4d66;return undefined;}
1
+ (function(_0x449e3c,_0x3000e1){const _0x4dcee7=a80_0x1d17,_0x14cf4e=_0x449e3c();while(!![]){try{const _0x414dcb=-parseInt(_0x4dcee7(0x114))/0x1+parseInt(_0x4dcee7(0x118))/0x2*(-parseInt(_0x4dcee7(0x116))/0x3)+-parseInt(_0x4dcee7(0x11d))/0x4+parseInt(_0x4dcee7(0x113))/0x5*(-parseInt(_0x4dcee7(0x119))/0x6)+parseInt(_0x4dcee7(0x121))/0x7+-parseInt(_0x4dcee7(0x120))/0x8*(-parseInt(_0x4dcee7(0x112))/0x9)+-parseInt(_0x4dcee7(0x10f))/0xa;if(_0x414dcb===_0x3000e1)break;else _0x14cf4e['push'](_0x14cf4e['shift']());}catch(_0x1b9074){_0x14cf4e['push'](_0x14cf4e['shift']());}}}(a80_0x5b3c,0x407ca));function a80_0x5b3c(){const _0x9cedcb=['35YZMbIf','107499PfkbQo','toLowerCase','313815HBDhks','functionNode','4SGFGvY','20088kZBTdS','trim','values','remoteId','238548tZwMCC','operationType','datasetCode','768HFeaQP','2638615dLOSdj','before','616970LRfeIa','toUpperCase','replace','32688TXaGda'];a80_0x5b3c=function(){return _0x9cedcb;};return a80_0x5b3c();}export function snakeToCamel(_0x13f095){const _0xf4c8e7=a80_0x1d17;return _0x13f095[_0xf4c8e7(0x115)]()[_0xf4c8e7(0x111)](/_([a-z])/g,(_0xaf36b3,_0x83116b)=>_0x83116b[_0xf4c8e7(0x110)]());}function a80_0x1d17(_0x1b38e2,_0x2f8c6a){_0x1b38e2=_0x1b38e2-0x10e;const _0x5b3c50=a80_0x5b3c();let _0x1d1724=_0x5b3c50[_0x1b38e2];return _0x1d1724;}export function findHookLocationByRemoteId(_0x4dced6,_0x4b31c8){const _0x2a70e7=a80_0x1d17;if(!_0x4b31c8)return undefined;for(const _0x295f28 of Object[_0x2a70e7(0x11b)](_0x4dced6)){if(_0x295f28[_0x2a70e7(0x11c)]===_0x4b31c8&&_0x295f28['datasetCode']&&_0x295f28[_0x2a70e7(0x11e)]&&_0x295f28[_0x2a70e7(0x117)])return{'datasetCode':_0x295f28[_0x2a70e7(0x11f)],'operationType':_0x295f28[_0x2a70e7(0x11e)],'functionNode':_0x295f28[_0x2a70e7(0x117)]};}return undefined;}export function extractScriptDescription(_0x380c80){const _0x5b377c=a80_0x1d17,_0x8f306a=_0x380c80['match'](/\[\s*脚本描述\s*]\s*(.+)/);return _0x8f306a?.[0x1]?.[_0x5b377c(0x11a)]()||undefined;}export function isValidBffFunctionName(_0x4e33d6){return/^[A-Za-z_$][A-Za-z0-9_$]*$/['test'](_0x4e33d6);}export function normalizeHookFunctionNode(_0x372c83){const _0x51de0e=a80_0x1d17;if(!_0x372c83)return undefined;const _0x2110cf=_0x372c83[_0x51de0e(0x11a)]()[_0x51de0e(0x115)]();if(_0x2110cf===_0x51de0e(0x10e)||_0x2110cf==='after')return _0x2110cf;return undefined;}
@@ -1 +1 @@
1
- function a81_0x3a8a(){const _0x581793=['find','71613oTUDxj','2OvgsUy','3738183JScyFv','dbName','join','.\x20Be\x20more\x20specific.','1675021uSvwrU','No\x20linked\x20databases\x20found\x20for\x20this\x20app.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','1729665NILuJH','filter','length','\x22.\x20Available:\x20','14844280AWTlfN','set','3975365pyhXCm','isNaN','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','8KbqCbX','\x22\x20matches\x20multiple\x20databases:\x20','entries','toLowerCase','dbtableConfig','No\x20database\x20matching\x20\x22','includes','map','dbId','4152480ttBJbJ','1112FPUzav'];a81_0x3a8a=function(){return _0x581793;};return a81_0x3a8a();}(function(_0x213c31,_0x3132a6){const _0x2d923e=a81_0x1187,_0x328188=_0x213c31();while(!![]){try{const _0x258ef9=parseInt(_0x2d923e(0x1d5))/0x1+parseInt(_0x2d923e(0x1d0))/0x2*(parseInt(_0x2d923e(0x1d1))/0x3)+-parseInt(_0x2d923e(0x1c3))/0x4*(-parseInt(_0x2d923e(0x1c0))/0x5)+-parseInt(_0x2d923e(0x1cc))/0x6+-parseInt(_0x2d923e(0x1d7))/0x7+-parseInt(_0x2d923e(0x1cd))/0x8*(parseInt(_0x2d923e(0x1cf))/0x9)+-parseInt(_0x2d923e(0x1be))/0xa;if(_0x258ef9===_0x3132a6)break;else _0x328188['push'](_0x328188['shift']());}catch(_0x553383){_0x328188['push'](_0x328188['shift']());}}}(a81_0x3a8a,0xefa62));import{listDatasets}from'./api-client.js';const cache=new Map();function a81_0x1187(_0xd83163,_0x52b16f){_0xd83163=_0xd83163-0x1bd;const _0x3a8aa0=a81_0x3a8a();let _0x118701=_0x3a8aa0[_0xd83163];return _0x118701;}export async function listDatabases(_0x338de6){const _0x380cb4=a81_0x1187;if(cache['has'](_0x338de6))return cache['get'](_0x338de6);const _0x1f5e29=await listDatasets(_0x338de6),_0x53b103=new Map();for(const _0x288ba2 of _0x1f5e29){const _0x568ae7=_0x288ba2[_0x380cb4(0x1c7)];_0x568ae7?.['dbId']!=null&&_0x53b103[_0x380cb4(0x1bf)](_0x568ae7[_0x380cb4(0x1cb)],_0x568ae7[_0x380cb4(0x1d2)]??'db-'+_0x568ae7[_0x380cb4(0x1cb)]);}const _0x30919d=[..._0x53b103[_0x380cb4(0x1c5)]()][_0x380cb4(0x1ca)](([_0x2fcaf6,_0x27ac3d])=>({'dbId':_0x2fcaf6,'dbName':_0x27ac3d}));return cache[_0x380cb4(0x1bf)](_0x338de6,_0x30919d),_0x30919d;}export async function resolveDb(_0x5d8e02,_0x5f12a4){const _0x17a2f1=a81_0x1187,_0x1e71a8=await listDatabases(_0x5d8e02);if(_0x1e71a8[_0x17a2f1(0x1d9)]===0x0)return{'resolved':[],'error':_0x17a2f1(0x1d6)};if(!_0x5f12a4)return{'resolved':_0x1e71a8};const _0x5af0cd=Number(_0x5f12a4);if(!Number[_0x17a2f1(0x1c1)](_0x5af0cd)){const _0x705bc4=_0x1e71a8['find'](_0x3982fd=>_0x3982fd[_0x17a2f1(0x1cb)]===_0x5af0cd);if(_0x705bc4)return{'resolved':[_0x705bc4]};}const _0x358095=_0x5f12a4[_0x17a2f1(0x1c6)](),_0x532d05=_0x1e71a8[_0x17a2f1(0x1d8)](_0x709bdd=>_0x709bdd[_0x17a2f1(0x1d2)]['toLowerCase']()[_0x17a2f1(0x1c9)](_0x358095));if(_0x532d05[_0x17a2f1(0x1d9)]>0x0)return{'resolved':_0x532d05};const _0x261063=_0x1e71a8[_0x17a2f1(0x1ca)](_0x3cff14=>_0x3cff14[_0x17a2f1(0x1d2)]+'\x20('+_0x3cff14[_0x17a2f1(0x1cb)]+')')[_0x17a2f1(0x1d3)](',\x20');return{'resolved':[],'error':_0x17a2f1(0x1c8)+_0x5f12a4+_0x17a2f1(0x1bd)+_0x261063};}export async function resolveOneDb(_0x5c238f,_0x1542f1){const _0x3da541=a81_0x1187,{resolved:_0x388cf4,error:_0x3032d7}=await resolveDb(_0x5c238f,_0x1542f1);if(_0x3032d7)return{'db':null,'error':_0x3032d7};if(_0x388cf4[_0x3da541(0x1d9)]===0x1)return{'db':_0x388cf4[0x0]};if(!_0x1542f1){const _0x1b2135=_0x388cf4[_0x3da541(0x1ca)](_0x598092=>_0x598092[_0x3da541(0x1d2)]+'\x20('+_0x598092[_0x3da541(0x1cb)]+')')['join'](',\x20');return{'db':null,'error':_0x3da541(0x1c2)+_0x1b2135};}const _0x93f53d=_0x388cf4[_0x3da541(0x1ca)](_0x3a584f=>_0x3a584f[_0x3da541(0x1d2)]+'\x20('+_0x3a584f[_0x3da541(0x1cb)]+')')['join'](',\x20');return{'db':null,'error':'\x22'+_0x1542f1+_0x3da541(0x1c4)+_0x93f53d+_0x3da541(0x1d4)};}export async function getDbName(_0x1921c1,_0x4a5317){const _0x688da9=a81_0x1187,_0x208e00=await listDatabases(_0x1921c1);return _0x208e00[_0x688da9(0x1ce)](_0x171ae2=>_0x171ae2[_0x688da9(0x1cb)]===_0x4a5317)?.[_0x688da9(0x1d2)];}
1
+ (function(_0x1ecb29,_0x114f24){const _0x182039=a81_0x347a,_0x25e829=_0x1ecb29();while(!![]){try{const _0x30ac5d=parseInt(_0x182039(0xc4))/0x1*(-parseInt(_0x182039(0xdd))/0x2)+-parseInt(_0x182039(0xda))/0x3+-parseInt(_0x182039(0xcd))/0x4*(parseInt(_0x182039(0xc6))/0x5)+-parseInt(_0x182039(0xdf))/0x6+parseInt(_0x182039(0xc7))/0x7*(-parseInt(_0x182039(0xcb))/0x8)+parseInt(_0x182039(0xde))/0x9*(parseInt(_0x182039(0xce))/0xa)+parseInt(_0x182039(0xd6))/0xb;if(_0x30ac5d===_0x114f24)break;else _0x25e829['push'](_0x25e829['shift']());}catch(_0x48abe7){_0x25e829['push'](_0x25e829['shift']());}}}(a81_0x6e6d,0xcb712));import{listDatasets}from'./api-client.js';const cache=new Map();export async function listDatabases(_0x268359){const _0x2e64e4=a81_0x347a;if(cache[_0x2e64e4(0xca)](_0x268359))return cache[_0x2e64e4(0xcc)](_0x268359);const _0x4f15a2=await listDatasets(_0x268359),_0x351682=new Map();for(const _0x303b73 of _0x4f15a2){const _0x42937f=_0x303b73[_0x2e64e4(0xd1)];_0x42937f?.[_0x2e64e4(0xc5)]!=null&&_0x351682['set'](_0x42937f[_0x2e64e4(0xc5)],_0x42937f[_0x2e64e4(0xe0)]??_0x2e64e4(0xd5)+_0x42937f[_0x2e64e4(0xc5)]);}const _0x3f5094=[..._0x351682[_0x2e64e4(0xd9)]()][_0x2e64e4(0xcf)](([_0x2c0275,_0x4291d8])=>({'dbId':_0x2c0275,'dbName':_0x4291d8}));return cache[_0x2e64e4(0xdc)](_0x268359,_0x3f5094),_0x3f5094;}export async function resolveDb(_0x423f6f,_0x5995f6){const _0x2c1048=a81_0x347a,_0x30846a=await listDatabases(_0x423f6f);if(_0x30846a[_0x2c1048(0xd2)]===0x0)return{'resolved':[],'error':_0x2c1048(0xc3)};if(!_0x5995f6)return{'resolved':_0x30846a};const _0xb0fa3c=Number(_0x5995f6);if(!Number[_0x2c1048(0xd0)](_0xb0fa3c)){const _0x589cb4=_0x30846a[_0x2c1048(0xd8)](_0x1099db=>_0x1099db[_0x2c1048(0xc5)]===_0xb0fa3c);if(_0x589cb4)return{'resolved':[_0x589cb4]};}const _0x1380fc=_0x5995f6[_0x2c1048(0xc9)](),_0x3ed167=_0x30846a[_0x2c1048(0xdb)](_0x17fb6c=>_0x17fb6c['dbName']['toLowerCase']()[_0x2c1048(0xe1)](_0x1380fc));if(_0x3ed167['length']>0x0)return{'resolved':_0x3ed167};const _0x3f16a0=_0x30846a['map'](_0x355ec3=>_0x355ec3[_0x2c1048(0xe0)]+'\x20('+_0x355ec3[_0x2c1048(0xc5)]+')')['join'](',\x20');return{'resolved':[],'error':_0x2c1048(0xd3)+_0x5995f6+_0x2c1048(0xd4)+_0x3f16a0};}export async function resolveOneDb(_0x1234d6,_0x4dfdf3){const _0x24e5e9=a81_0x347a,{resolved:_0x4a4800,error:_0x19d705}=await resolveDb(_0x1234d6,_0x4dfdf3);if(_0x19d705)return{'db':null,'error':_0x19d705};if(_0x4a4800[_0x24e5e9(0xd2)]===0x1)return{'db':_0x4a4800[0x0]};if(!_0x4dfdf3){const _0x1a95cb=_0x4a4800[_0x24e5e9(0xcf)](_0x56b233=>_0x56b233['dbName']+'\x20('+_0x56b233[_0x24e5e9(0xc5)]+')')[_0x24e5e9(0xd7)](',\x20');return{'db':null,'error':'Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20'+_0x1a95cb};}const _0x1633c8=_0x4a4800[_0x24e5e9(0xcf)](_0x53583a=>_0x53583a['dbName']+'\x20('+_0x53583a[_0x24e5e9(0xc5)]+')')[_0x24e5e9(0xd7)](',\x20');return{'db':null,'error':'\x22'+_0x4dfdf3+'\x22\x20matches\x20multiple\x20databases:\x20'+_0x1633c8+_0x24e5e9(0xc8)};}function a81_0x347a(_0x3a5432,_0x194b86){_0x3a5432=_0x3a5432-0xc3;const _0x6e6dab=a81_0x6e6d();let _0x347a45=_0x6e6dab[_0x3a5432];return _0x347a45;}function a81_0x6e6d(){const _0x40f723=['2692676JIUyiQ','.\x20Be\x20more\x20specific.','toLowerCase','has','8Qtwblx','get','130348ZciNQS','20RozquN','map','isNaN','dbtableConfig','length','No\x20database\x20matching\x20\x22','\x22.\x20Available:\x20','db-','34031294WSMHfs','join','find','entries','3072474nVTOxd','filter','set','8KvhmsA','5901066ROlnGs','2786982FPReMH','dbName','includes','No\x20linked\x20databases\x20found\x20for\x20this\x20app.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','335006FVZNAJ','dbId','55xDCDaM'];a81_0x6e6d=function(){return _0x40f723;};return a81_0x6e6d();}export async function getDbName(_0x2ff56d,_0x337c51){const _0x24197b=a81_0x347a,_0x23b25=await listDatabases(_0x2ff56d);return _0x23b25[_0x24197b(0xd8)](_0x1ddc0d=>_0x1ddc0d['dbId']===_0x337c51)?.['dbName'];}
@@ -1 +1 @@
1
- (function(_0x3cbede,_0x1c0921){const _0x54476b=a82_0x1777,_0x114c91=_0x3cbede();while(!![]){try{const _0x1c6e85=-parseInt(_0x54476b(0x163))/0x1+parseInt(_0x54476b(0x151))/0x2+-parseInt(_0x54476b(0x14c))/0x3+-parseInt(_0x54476b(0x149))/0x4*(parseInt(_0x54476b(0x16a))/0x5)+parseInt(_0x54476b(0x155))/0x6*(-parseInt(_0x54476b(0x15e))/0x7)+parseInt(_0x54476b(0x157))/0x8+parseInt(_0x54476b(0x15c))/0x9;if(_0x1c6e85===_0x1c0921)break;else _0x114c91['push'](_0x114c91['shift']());}catch(_0x2f3b2b){_0x114c91['push'](_0x114c91['shift']());}}}(a82_0x4c19,0xa5f47));export function detectSqlType(_0x1cc8af){const _0x461a31=a82_0x1777;if(!_0x1cc8af?.[_0x461a31(0x165)]())return{'type':_0x461a31(0x14f),'isSelectOnly':![],'isDangerous':![],'reason':_0x461a31(0x167)};const _0xd68921=_0x1cc8af[_0x461a31(0x15b)](/#\{[^}]*\}/g,'?')[_0x461a31(0x15b)](/\$\{[^}]*\}/g,'?')[_0x461a31(0x15b)](/@[^(\s]+(\([^)]*\))?/g,'')[_0x461a31(0x165)](),_0x273308=_0xd68921['split']('\x0a');let _0x2ecc93='';for(const _0x4fbf91 of _0x273308){const _0x3235a1=_0x4fbf91[_0x461a31(0x165)]();if(!_0x3235a1||_0x3235a1[_0x461a31(0x16d)]('--')||_0x3235a1[_0x461a31(0x16d)]('/*'))continue;_0x2ecc93=_0x3235a1;break;}const _0x5e4107=_0x2ecc93['toUpperCase']();if(_0x5e4107['startsWith'](_0x461a31(0x16b))||_0x5e4107[_0x461a31(0x16d)](_0x461a31(0x15a))){const _0x38559d=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x461a31(0x15d)](_0xd68921);return{'type':'SELECT','isSelectOnly':!_0x38559d,'isDangerous':_0x38559d,'reason':_0x38559d?_0x461a31(0x161):undefined};}if(_0x5e4107[_0x461a31(0x16d)](_0x461a31(0x14d)))return{'type':_0x461a31(0x14d),'isSelectOnly':![],'isDangerous':![]};if(_0x5e4107[_0x461a31(0x16d)](_0x461a31(0x169)))return{'type':_0x461a31(0x169),'isSelectOnly':![],'isDangerous':![]};if(_0x5e4107[_0x461a31(0x16d)](_0x461a31(0x166)))return{'type':_0x461a31(0x166),'isSelectOnly':![],'isDangerous':!![],'reason':_0x461a31(0x158)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x461a31(0x15d)](_0x5e4107))return{'type':_0x461a31(0x162),'isSelectOnly':![],'isDangerous':!![],'reason':_0x461a31(0x168)};return{'type':_0x461a31(0x14f),'isSelectOnly':![],'isDangerous':![]};}function a82_0x4c19(){const _0xc9a601=['SELECT','length','startsWith','1124kJcVGN','\x20with\x20parameters:\x20','\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','3608301fmNBWj','INSERT','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','UNKNOWN','type','2021020BgvHPd','includes','matchAll','join','1830oJnNLm','add','8347216YbDjcG','DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save','unknown\x20table(s)','WITH','replace','14971734OYTEaY','test','5999lPOmdh','reason','\x20query\x20targeting\x20','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','DDL','750486iQdjZc','push','trim','DELETE','SQL\x20content\x20is\x20empty','DDL\x20statements\x20are\x20blocked\x20from\x20auto-save','UPDATE','14645KvOpYu'];a82_0x4c19=function(){return _0xc9a601;};return a82_0x4c19();}function a82_0x1777(_0x5dc2c3,_0x38edc1){_0x5dc2c3=_0x5dc2c3-0x149;const _0x4c1976=a82_0x4c19();let _0x177718=_0x4c1976[_0x5dc2c3];return _0x177718;}function extractTables(_0x35d1f2){const _0x152061=a82_0x1777,_0x69d741=_0x35d1f2['replace'](/#\{[^}]*\}/g,'?')[_0x152061(0x15b)](/\$\{[^}]*\}/g,'?')[_0x152061(0x15b)](/'[^']*'/g,'\x27\x27')[_0x152061(0x15b)](/--.*$/gm,'')['replace'](/\/\*[\s\S]*?\*\//g,''),_0x196cfb=[],_0x3a7a96=_0x69d741['match'](/FROM\s+([^\s,)(]+)/i);if(_0x3a7a96?.[0x1])_0x196cfb[_0x152061(0x164)](_0x3a7a96[0x1]['replace'](/[`"]/g,''));for(const _0x177454 of _0x69d741['matchAll'](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){const _0x5cc81c=_0x177454[0x1]?.['replace'](/[`"]/g,'');if(_0x5cc81c&&!_0x196cfb[_0x152061(0x152)](_0x5cc81c))_0x196cfb[_0x152061(0x164)](_0x5cc81c);}const _0x581a77=_0x69d741['match'](/INTO\s+([^\s(]+)/i);if(_0x581a77?.[0x1]){const _0xdb3c4c=_0x581a77[0x1][_0x152061(0x15b)](/[`"]/g,'');if(!_0x196cfb[_0x152061(0x152)](_0xdb3c4c))_0x196cfb[_0x152061(0x164)](_0xdb3c4c);}const _0x21bc16=_0x69d741['match'](/UPDATE\s+([^\s,)(]+)/i);if(_0x21bc16?.[0x1]){const _0x215fe2=_0x21bc16[0x1][_0x152061(0x15b)](/[`"]/g,'');if(!_0x196cfb[_0x152061(0x152)](_0x215fe2))_0x196cfb[_0x152061(0x164)](_0x215fe2);}return _0x196cfb;}function extractParameters(_0x1efc1d){const _0x10c05e=a82_0x1777,_0x19a830=new Set();for(const _0x5e72e2 of _0x1efc1d['matchAll'](/#\{(\w+)\}/g))if(_0x5e72e2[0x1])_0x19a830['add'](_0x5e72e2[0x1]);for(const _0x42a1dd of _0x1efc1d[_0x10c05e(0x153)](/\$\{(\w+)\}/g))if(_0x42a1dd[0x1])_0x19a830[_0x10c05e(0x156)](_0x42a1dd[0x1]);return Array['from'](_0x19a830);}export function validateSql(_0x4fa64b){const _0x254948=a82_0x1777,_0x51e034=detectSqlType(_0x4fa64b),_0x31404c=extractTables(_0x4fa64b),_0x2f70f6=extractParameters(_0x4fa64b);if(_0x51e034['isDangerous'])return{'valid':![],'sqlType':_0x51e034,'tables':_0x31404c,'parameters':_0x2f70f6,'message':_0x51e034[_0x254948(0x15f)]||_0x51e034['type']+_0x254948(0x14b)};if(_0x51e034[_0x254948(0x150)]===_0x254948(0x14f))return{'valid':![],'sqlType':_0x51e034,'tables':_0x31404c,'parameters':_0x2f70f6,'message':_0x254948(0x14e)};return{'valid':!![],'sqlType':_0x51e034,'tables':_0x31404c,'parameters':_0x2f70f6,'message':_0x51e034[_0x254948(0x150)]+_0x254948(0x160)+(_0x31404c[_0x254948(0x16c)]?_0x31404c[_0x254948(0x154)](',\x20'):_0x254948(0x159))+(_0x2f70f6['length']?_0x254948(0x14a)+_0x2f70f6[_0x254948(0x154)](',\x20'):'')};}
1
+ (function(_0x14132d,_0x4e2f09){const _0x3e4fad=a82_0x3633,_0x3df194=_0x14132d();while(!![]){try{const _0x507de7=-parseInt(_0x3e4fad(0x12e))/0x1+parseInt(_0x3e4fad(0x125))/0x2+parseInt(_0x3e4fad(0x134))/0x3+-parseInt(_0x3e4fad(0x142))/0x4+parseInt(_0x3e4fad(0x12a))/0x5+-parseInt(_0x3e4fad(0x138))/0x6*(-parseInt(_0x3e4fad(0x13f))/0x7)+-parseInt(_0x3e4fad(0x140))/0x8*(-parseInt(_0x3e4fad(0x144))/0x9);if(_0x507de7===_0x4e2f09)break;else _0x3df194['push'](_0x3df194['shift']());}catch(_0x5234d3){_0x3df194['push'](_0x3df194['shift']());}}}(a82_0x5716,0x90d28));export function detectSqlType(_0x36c94f){const _0x62ca7c=a82_0x3633;if(!_0x36c94f?.[_0x62ca7c(0x136)]())return{'type':_0x62ca7c(0x148),'isSelectOnly':![],'isDangerous':![],'reason':'SQL\x20content\x20is\x20empty'};const _0x8a7cef=_0x36c94f[_0x62ca7c(0x13c)](/#\{[^}]*\}/g,'?')[_0x62ca7c(0x13c)](/\$\{[^}]*\}/g,'?')[_0x62ca7c(0x13c)](/@[^(\s]+(\([^)]*\))?/g,'')[_0x62ca7c(0x13c)](/\/\*[\s\S]*?\*\//g,'')[_0x62ca7c(0x136)](),_0x96350c=_0x8a7cef[_0x62ca7c(0x135)]('\x0a');let _0x280b2b='';for(const _0x1c2de7 of _0x96350c){const _0xfa9771=_0x1c2de7['trim']();if(!_0xfa9771||_0xfa9771[_0x62ca7c(0x133)]('--')||_0xfa9771[_0x62ca7c(0x133)]('/*'))continue;_0x280b2b=_0xfa9771;break;}const _0x330e90=_0x280b2b[_0x62ca7c(0x141)]();if(_0x330e90[_0x62ca7c(0x133)]('SELECT')||_0x330e90[_0x62ca7c(0x133)](_0x62ca7c(0x130))){const _0x287183=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x62ca7c(0x13b)](_0x8a7cef);return{'type':_0x62ca7c(0x143),'isSelectOnly':!_0x287183,'isDangerous':_0x287183,'reason':_0x287183?_0x62ca7c(0x146):undefined};}if(_0x330e90['startsWith']('INSERT'))return{'type':_0x62ca7c(0x147),'isSelectOnly':![],'isDangerous':![]};if(_0x330e90[_0x62ca7c(0x133)](_0x62ca7c(0x132)))return{'type':'UPDATE','isSelectOnly':![],'isDangerous':![]};if(_0x330e90[_0x62ca7c(0x133)](_0x62ca7c(0x149)))return{'type':_0x62ca7c(0x149),'isSelectOnly':![],'isDangerous':!![],'reason':_0x62ca7c(0x12b)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x62ca7c(0x13b)](_0x330e90))return{'type':_0x62ca7c(0x128),'isSelectOnly':![],'isDangerous':!![],'reason':_0x62ca7c(0x13d)};return{'type':_0x62ca7c(0x148),'isSelectOnly':![],'isDangerous':![]};}function a82_0x5716(){const _0xd70bca=['\x20query\x20targeting\x20','DDL','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','26505ZFCYaC','DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save','includes','add','1059551xEZUZm','\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','WITH','join','UPDATE','startsWith','1564239qgsZIy','split','trim','reason','421260dYuPhx','from','type','test','replace','DDL\x20statements\x20are\x20blocked\x20from\x20auto-save','length','91vlVgPE','3516008BfaMrS','toUpperCase','2402580DaflTp','SELECT','9CZqCla','push','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','INSERT','UNKNOWN','DELETE','matchAll','748886dwMPYz','match'];a82_0x5716=function(){return _0xd70bca;};return a82_0x5716();}function a82_0x3633(_0x355853,_0x16382){_0x355853=_0x355853-0x124;const _0x57163c=a82_0x5716();let _0x3633d4=_0x57163c[_0x355853];return _0x3633d4;}function extractTables(_0x533267){const _0x153d0f=a82_0x3633,_0x52eb78=_0x533267[_0x153d0f(0x13c)](/#\{[^}]*\}/g,'?')[_0x153d0f(0x13c)](/\$\{[^}]*\}/g,'?')[_0x153d0f(0x13c)](/'[^']*'/g,'\x27\x27')[_0x153d0f(0x13c)](/--.*$/gm,'')['replace'](/\/\*[\s\S]*?\*\//g,''),_0x2d298d=[],_0x496400=_0x52eb78['match'](/FROM\s+([^\s,)(]+)/i);if(_0x496400?.[0x1])_0x2d298d[_0x153d0f(0x145)](_0x496400[0x1][_0x153d0f(0x13c)](/[`"]/g,''));for(const _0x4554dd of _0x52eb78[_0x153d0f(0x124)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){const _0x804671=_0x4554dd[0x1]?.[_0x153d0f(0x13c)](/[`"]/g,'');if(_0x804671&&!_0x2d298d[_0x153d0f(0x12c)](_0x804671))_0x2d298d[_0x153d0f(0x145)](_0x804671);}const _0x2be8b5=_0x52eb78[_0x153d0f(0x126)](/INTO\s+([^\s(]+)/i);if(_0x2be8b5?.[0x1]){const _0x13f681=_0x2be8b5[0x1][_0x153d0f(0x13c)](/[`"]/g,'');if(!_0x2d298d['includes'](_0x13f681))_0x2d298d[_0x153d0f(0x145)](_0x13f681);}const _0x123608=_0x52eb78[_0x153d0f(0x126)](/UPDATE\s+([^\s,)(]+)/i);if(_0x123608?.[0x1]){const _0x4533d3=_0x123608[0x1][_0x153d0f(0x13c)](/[`"]/g,'');if(!_0x2d298d['includes'](_0x4533d3))_0x2d298d['push'](_0x4533d3);}return _0x2d298d;}function extractParameters(_0x35b99e){const _0x37d662=a82_0x3633,_0x19fbac=new Set();for(const _0x227b5d of _0x35b99e[_0x37d662(0x124)](/#\{(\w+)\}/g))if(_0x227b5d[0x1])_0x19fbac[_0x37d662(0x12d)](_0x227b5d[0x1]);for(const _0x4403a0 of _0x35b99e[_0x37d662(0x124)](/\$\{(\w+)\}/g))if(_0x4403a0[0x1])_0x19fbac[_0x37d662(0x12d)](_0x4403a0[0x1]);return Array[_0x37d662(0x139)](_0x19fbac);}export function validateSql(_0x1330b4){const _0x3aed4e=a82_0x3633,_0x4b4d1c=detectSqlType(_0x1330b4),_0x27b53c=extractTables(_0x1330b4),_0x9f7d09=extractParameters(_0x1330b4);if(_0x4b4d1c['isDangerous'])return{'valid':![],'sqlType':_0x4b4d1c,'tables':_0x27b53c,'parameters':_0x9f7d09,'message':_0x4b4d1c[_0x3aed4e(0x137)]||_0x4b4d1c[_0x3aed4e(0x13a)]+_0x3aed4e(0x12f)};if(_0x4b4d1c['type']==='UNKNOWN')return{'valid':![],'sqlType':_0x4b4d1c,'tables':_0x27b53c,'parameters':_0x9f7d09,'message':_0x3aed4e(0x129)};return{'valid':!![],'sqlType':_0x4b4d1c,'tables':_0x27b53c,'parameters':_0x9f7d09,'message':_0x4b4d1c[_0x3aed4e(0x13a)]+_0x3aed4e(0x127)+(_0x27b53c['length']?_0x27b53c[_0x3aed4e(0x131)](',\x20'):'unknown\x20table(s)')+(_0x9f7d09[_0x3aed4e(0x13e)]?'\x20with\x20parameters:\x20'+_0x9f7d09[_0x3aed4e(0x131)](',\x20'):'')};}
@@ -1 +1 @@
1
- (function(_0xda691c,_0x3b81e4){const _0xca188f=a83_0x3bd9,_0x2c6224=_0xda691c();while(!![]){try{const _0x1c7ff9=-parseInt(_0xca188f(0x1f1))/0x1+-parseInt(_0xca188f(0x201))/0x2+-parseInt(_0xca188f(0x1ec))/0x3+parseInt(_0xca188f(0x1cc))/0x4+-parseInt(_0xca188f(0x1d3))/0x5*(-parseInt(_0xca188f(0x1fc))/0x6)+parseInt(_0xca188f(0x1f2))/0x7+-parseInt(_0xca188f(0x1e2))/0x8;if(_0x1c7ff9===_0x3b81e4)break;else _0x2c6224['push'](_0x2c6224['shift']());}catch(_0x248f23){_0x2c6224['push'](_0x2c6224['shift']());}}}(a83_0x22f9,0x34274));import{jsx as a83_0x198ccc,jsxs as a83_0x3054d9,Fragment as a83_0x45c821}from'react/jsx-runtime';import{useState}from'react';import{Text,Box,useInput}from'ink';function a83_0x3bd9(_0x1c6e10,_0x69c752){_0x1c6e10=_0x1c6e10-0x1c1;const _0x22f938=a83_0x22f9();let _0x3bd94a=_0x22f938[_0x1c6e10];return _0x3bd94a;}import{existsSync}from'node:fs';import a83_0x542c8c from'node:path';import{getIsSessionValid}from'../auth/is-session-valid.js';function a83_0x22f9(){const _0x3e46e6=['Yes','production','\x20Logging\x20in...','\x20←\x20','AppCode\x20cannot\x20exceed\x20100\x20characters','creating','!\x20No\x20valid\x20login\x20detected','*\x20Project\x20name:\x20','*\x20Logging\x20in,\x20please\x20complete\x20in\x20browser...','yellow','556680BTrqCB','confirm-api-pull','login-process','cyan','[optional]:\x20','project-name','cwd','confirm-mcp-setup','skills-mcp-setup','*\x20Automatically\x20pull\x20API\x20config?','236922iagWCq','\x20already\x20exists,\x20please\x20use\x20a\x20different\x20name','Project\x20name\x20must\x20start\x20with\x20a\x20letter\x20or\x20number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','column','rightArrow','105751yBrnNx','1460557mrILsa','login-check','Invalid\x20AppCode','*\x20Creating\x20project...','trim','If\x20Yes,\x20npx\x20skills\x20will\x20guide\x20you\x20to\x20select\x20an\x20AI\x20agent\x20and\x20install\x20the\x20developer\x20skill\x20pack,\x20then\x20Cursor\x20MCP\x20will\x20be\x20configured\x20automatically','backspace','*\x20Create\x20new\x20project','Invalid\x20project\x20name','app-code','192mVqdCO','AppCode\x20can\x20only\x20contain\x20letters,\x20numbers,\x20hyphens\x20and\x20underscores,\x20and\x20must\x20start\x20with\x20a\x20letter\x20or\x20number','Project\x20directory\x20','value','*\x20Install\x20AI\x20Skills\x20and\x20configure\x20MCP?','310400fuhIeN','login','App\x20Code','\x20Checking...','Directory\x20\x22','*\x20Checking\x20login\x20status...','red','includes','Project\x20name\x20cannot\x20exceed\x2050\x20characters','leftArrow','login-prompt','delete','Pull\x20API\x20config','length','api-pull','\x20\x20Use\x20←→\x20to\x20choose,\x20press\x20Enter\x20to\x20confirm','resolve','step','gray','492220PuKIqs','Login\x20status','Press\x20Enter\x20to\x20confirm\x20or\x20type\x20a\x20custom\x20name','green','Skills\x20&\x20MCP','return','env','45535utrkTh','test','Logged\x20in','\x22\x20already\x20exists','√\x20Valid\x20login\x20detected'];a83_0x22f9=function(){return _0x3e46e6;};return a83_0x22f9();}import{authServer}from'../auth/auth-server.js';import{readConfig}from'../utils/config.js';export function EnhancedGuidedCreate(_0x11b300){const _0x35ee9a=a83_0x3bd9,{onCreate:_0x421fe6,env:_0x18f6fb}=_0x11b300,[_0x165b0a,_0x159686]=useState('project-name'),[_0x4f0ee8,_0x2c04fe]=useState(''),[_0x405bdb,_0x64a3]=useState(''),[_0x5e6d73,_0x457858]=useState(''),[_0x4ea882,_0x1f7551]=useState(''),[_0x446acf,_0x519303]=useState([]),[_0x57a654,_0x94271b]=useState(null),[_0xc804b9,_0x146fec]=useState(![]),[_0x574d49,_0xeb6f6d]=useState(![]),[_0x304766,_0x32a0d8]=useState(![]),[_0x39d507,_0x33e627]=useState(0x0),[_0x79631e,_0x3fa72a]=useState(0x0),[_0x57c78e,_0x2df04f]=useState(0x0),[_0x3f69e6,_0x632ae7]=useState(''),_0x2e0ad0='my-app',_0x26b0b2=readConfig(),_0x4b3984=typeof _0x26b0b2[_0x35ee9a(0x1d2)]==='string'?_0x26b0b2[_0x35ee9a(0x1d2)]:undefined;function _0x1c3785(_0x1df5b2){const _0x24c485=_0x35ee9a,_0x59f601=_0x1df5b2||_0x2e0ad0,_0x33eba8=a83_0x542c8c[_0x24c485(0x1c9)](process[_0x24c485(0x1e8)](),_0x59f601);return existsSync(_0x33eba8);}function _0x4a9c03(_0x5d13b8){const _0x2d2435=_0x35ee9a;if(_0x5d13b8[_0x2d2435(0x1c6)]>0x32)return{'valid':![],'message':_0x2d2435(0x1c1)};const _0x106b9c=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x5d13b8?.[_0x2d2435(0x1f6)]()&&!_0x106b9c[_0x2d2435(0x1d4)](_0x5d13b8))return{'valid':![],'message':_0x2d2435(0x1ee)};return{'valid':!![]};}function _0x2299b7(_0x9ca254){const _0x135ad6=_0x35ee9a;if(!_0x9ca254['trim']())return{'valid':!![]};if(_0x9ca254['length']>0x64)return{'valid':![],'message':_0x135ad6(0x1dc)};const _0x2fd026=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x2fd026[_0x135ad6(0x1d4)](_0x9ca254))return{'valid':![],'message':_0x135ad6(0x1fd)};return{'valid':!![]};}async function _0x453112(){_0x146fec(!![]);try{const _0x5193a5=await getIsSessionValid();return _0x94271b(_0x5193a5),_0x5193a5;}catch(_0x271926){return _0x94271b(![]),![];}finally{_0x146fec(![]);}}async function _0x4f6ab2(){_0xeb6f6d(!![]);try{const _0xe84391=await authServer({'silent':!![]});return _0x94271b(_0xe84391),_0xe84391;}catch(_0x556c82){return _0x94271b(![]),![];}finally{_0xeb6f6d(![]);}}return useInput(async(_0x274d5b,_0x16862c)=>{const _0x32fb90=_0x35ee9a;if(_0x16862c[_0x32fb90(0x1c2)]||_0x16862c[_0x32fb90(0x1f0)]){if(_0x165b0a===_0x32fb90(0x1e3)){_0x33e627(_0x46f320=>_0x46f320===0x0?0x1:0x0);return;}if(_0x165b0a===_0x32fb90(0x1e9)){_0x3fa72a(_0x415fef=>_0x415fef===0x0?0x1:0x0);return;}if(_0x165b0a===_0x32fb90(0x1c3)){_0x2df04f(_0x1b618d=>_0x1b618d===0x0?0x1:0x0);return;}}if(_0x16862c[_0x32fb90(0x1d1)]){if(_0x165b0a===_0x32fb90(0x1e7)){const _0x4242b3=_0x5e6d73[_0x32fb90(0x1f6)]()||_0x2e0ad0;if(_0x4ea882)return;if(_0x1c3785(_0x4242b3)){_0x632ae7(_0x32fb90(0x1fe)+_0x4242b3+_0x32fb90(0x1ed));return;}_0x2c04fe(_0x4242b3),_0x519303([{'step':_0x32fb90(0x1e7),'label':'Project\x20Name','value':_0x4242b3}]),_0x457858(''),_0x1f7551(''),_0x632ae7(''),_0x159686(_0x32fb90(0x1fb));return;}if(_0x165b0a===_0x32fb90(0x1fb)){if(_0x4ea882)return;const _0x42a0e8=_0x5e6d73[_0x32fb90(0x1f6)]();_0x64a3(_0x42a0e8),_0x519303(_0x12c291=>[..._0x12c291,{'step':'app-code','label':_0x32fb90(0x203),'value':_0x42a0e8||'Not\x20set'}]),_0x457858(''),_0x1f7551('');if(_0x42a0e8){_0x159686(_0x32fb90(0x1f3));const _0x1cb6db=await _0x453112();_0x1cb6db?_0x159686(_0x32fb90(0x1e3)):_0x159686(_0x32fb90(0x1c3));}else{const _0x49f923=_0x18f6fb||_0x4b3984||_0x32fb90(0x1d9);_0x421fe6({'projectName':_0x4f0ee8,'appCode':undefined,'pullApi':![],'setupMcp':![],'env':_0x49f923}),_0x159686('creating');}return;}if(_0x165b0a===_0x32fb90(0x1e3)){const _0xa78b46=_0x39d507===0x0;_0x32a0d8(_0xa78b46),_0x519303(_0x582591=>[..._0x582591,{'step':_0x32fb90(0x1c7),'label':_0x32fb90(0x1c5),'value':_0xa78b46?'Yes':'No'}]),_0x159686(_0x32fb90(0x1e9));return;}if(_0x165b0a===_0x32fb90(0x1e9)){const _0x4d0f00=_0x79631e===0x0;_0x519303(_0x48cf30=>[..._0x48cf30,{'step':_0x32fb90(0x1ea),'label':_0x32fb90(0x1d0),'value':_0x4d0f00?_0x32fb90(0x1d8):'No'}]);const _0x1756a9=_0x18f6fb||_0x4b3984||_0x32fb90(0x1d9);_0x421fe6({'projectName':_0x4f0ee8,'appCode':_0x405bdb,'pullApi':_0x304766,'setupMcp':_0x4d0f00,'env':_0x1756a9}),_0x159686(_0x32fb90(0x1dd));return;}if(_0x165b0a===_0x32fb90(0x1c3)){const _0xf2ea99=_0x57c78e===0x0;if(_0xf2ea99){_0x159686('login-process');const _0x47212d=await _0x4f6ab2();_0x47212d?(_0x519303(_0x509e52=>[..._0x509e52,{'step':_0x32fb90(0x202),'label':_0x32fb90(0x1cd),'value':_0x32fb90(0x1d5)}]),_0x159686('confirm-api-pull')):(_0x519303(_0x31770c=>[..._0x31770c,{'step':'login','label':_0x32fb90(0x1cd),'value':'Login\x20failed'}]),_0x159686(_0x32fb90(0x1e9)));}else _0x519303(_0x231782=>[..._0x231782,{'step':'login','label':_0x32fb90(0x1cd),'value':'Login\x20skipped'}]),_0x159686(_0x32fb90(0x1e9));return;}}if(_0x16862c[_0x32fb90(0x1f8)]||_0x16862c[_0x32fb90(0x1c4)]){_0x457858(_0xd5014d=>{const _0x49a5cb=_0x32fb90,_0x3e08e2=_0xd5014d['slice'](0x0,-0x1);if(_0x165b0a===_0x49a5cb(0x1e7)){const {valid:_0x164f08,message:_0x3ce979}=_0x4a9c03(_0x3e08e2);_0x1f7551(_0x164f08?'':_0x3ce979||_0x49a5cb(0x1fa));if(_0x164f08&&!_0x4ea882){const _0x517a44=_0x3e08e2||_0x2e0ad0;_0x1c3785(_0x517a44)?_0x632ae7(_0x49a5cb(0x205)+_0x517a44+_0x49a5cb(0x1d6)):_0x632ae7('');}}else{if(_0x165b0a===_0x49a5cb(0x1fb)){const {valid:_0x2bc3af,message:_0x55bc85}=_0x2299b7(_0x3e08e2);_0x1f7551(_0x2bc3af?'':_0x55bc85||_0x49a5cb(0x1f4));}}return _0x3e08e2;});return;}if([_0x32fb90(0x1dd),_0x32fb90(0x1f3),_0x32fb90(0x1e4),'confirm-api-pull','confirm-mcp-setup',_0x32fb90(0x1c3)][_0x32fb90(0x208)](_0x165b0a))return;_0x457858(_0x5c8c74=>{const _0x2e0c42=_0x32fb90,_0x1cd933=_0x5c8c74+_0x274d5b;if(_0x165b0a==='project-name'){const {valid:_0x3a8556,message:_0x1ef2ce}=_0x4a9c03(_0x1cd933);_0x1f7551(_0x3a8556?'':_0x1ef2ce||_0x2e0c42(0x1fa));if(_0x3a8556&&!_0x4ea882){const _0x1f5e63=_0x1cd933||_0x2e0ad0;_0x1c3785(_0x1f5e63)?_0x632ae7('Directory\x20\x22'+_0x1f5e63+_0x2e0c42(0x1d6)):_0x632ae7('');}}else{if(_0x165b0a===_0x2e0c42(0x1fb)){const {valid:_0x3bb755,message:_0x4c4bb0}=_0x2299b7(_0x1cd933);_0x1f7551(_0x3bb755?'':_0x4c4bb0||_0x2e0c42(0x1f4));}}return _0x1cd933;});}),a83_0x3054d9(Box,{'flexDirection':_0x35ee9a(0x1ef),'marginTop':0x1,'children':[_0x446acf[_0x35ee9a(0x1c6)]===0x0&&a83_0x198ccc(Box,{'children':a83_0x198ccc(Text,{'color':_0x35ee9a(0x1e5),'children':_0x35ee9a(0x1f9)})}),_0x446acf['map'](_0x146a5b=>a83_0x3054d9(Box,{'children':[a83_0x198ccc(Text,{'color':'green','children':'√\x20'+_0x146a5b['label']+':\x20'}),a83_0x198ccc(Text,{'color':_0x35ee9a(0x1e5),'children':_0x146a5b[_0x35ee9a(0x1ff)]})]},_0x146a5b[_0x35ee9a(0x1ca)])),_0x165b0a===_0x35ee9a(0x1e7)&&a83_0x3054d9(a83_0x45c821,{'children':[a83_0x3054d9(Box,{'children':[a83_0x198ccc(Text,{'children':_0x35ee9a(0x1df)}),_0x5e6d73?a83_0x198ccc(Text,{'color':_0x35ee9a(0x1cf),'children':_0x5e6d73}):a83_0x198ccc(Text,{'color':_0x35ee9a(0x1cb),'children':_0x2e0ad0}),_0x4ea882&&a83_0x3054d9(Text,{'color':_0x35ee9a(0x207),'children':[_0x35ee9a(0x1db),_0x4ea882]}),_0x3f69e6&&a83_0x3054d9(Text,{'color':'red','children':['\x20←\x20',_0x3f69e6]})]}),!_0x4ea882&&!_0x3f69e6&&!_0x5e6d73&&a83_0x198ccc(Box,{'children':a83_0x198ccc(Text,{'color':'gray','children':_0x35ee9a(0x1ce)})})]}),_0x165b0a===_0x35ee9a(0x1fb)&&a83_0x3054d9(a83_0x45c821,{'children':[a83_0x3054d9(Box,{'children':[a83_0x198ccc(Text,{'children':'*\x20AppCode\x20'}),a83_0x198ccc(Text,{'color':_0x35ee9a(0x1cb),'children':_0x35ee9a(0x1e6)}),a83_0x198ccc(Text,{'color':'green','children':_0x5e6d73}),_0x4ea882&&a83_0x3054d9(Text,{'color':_0x35ee9a(0x207),'children':[_0x35ee9a(0x1db),_0x4ea882]})]}),!_0x4ea882&&a83_0x198ccc(Box,{'children':a83_0x198ccc(Text,{'color':'gray','children':'Bind\x20AppCode\x20to\x20auto-configure\x20API,\x20e.g.\x20app-c4c89304\x20(press\x20Enter\x20to\x20skip)'})})]}),_0x165b0a===_0x35ee9a(0x1f3)&&a83_0x3054d9(Box,{'children':[a83_0x198ccc(Text,{'children':_0x35ee9a(0x206)}),_0xc804b9&&a83_0x198ccc(Text,{'color':'gray','children':_0x35ee9a(0x204)})]}),_0x165b0a===_0x35ee9a(0x1e3)&&a83_0x3054d9(a83_0x45c821,{'children':[a83_0x198ccc(Box,{'children':a83_0x198ccc(Text,{'color':_0x35ee9a(0x1cf),'children':_0x35ee9a(0x1d7)})}),a83_0x198ccc(Box,{'marginTop':0x1,'children':a83_0x198ccc(Text,{'children':_0x35ee9a(0x1eb)})}),a83_0x3054d9(Box,{'marginLeft':0x2,'children':[a83_0x3054d9(Text,{'color':_0x39d507===0x0?_0x35ee9a(0x1cf):_0x35ee9a(0x1cb),'children':[_0x39d507===0x0?'▶\x20':'\x20\x20',_0x35ee9a(0x1d8)]}),a83_0x198ccc(Text,{'children':'\x20'}),a83_0x3054d9(Text,{'color':_0x39d507===0x1?_0x35ee9a(0x1cf):_0x35ee9a(0x1cb),'children':[_0x39d507===0x1?'▶\x20':'\x20\x20','No']})]}),a83_0x198ccc(Box,{'children':a83_0x198ccc(Text,{'color':_0x35ee9a(0x1cb),'children':_0x35ee9a(0x1c8)})}),a83_0x198ccc(Box,{'children':a83_0x198ccc(Text,{'color':_0x35ee9a(0x1e1),'children':'\x20\x20Recommended:\x20Yes,\x20to\x20auto-configure\x20API'})})]}),_0x165b0a===_0x35ee9a(0x1e9)&&a83_0x3054d9(a83_0x45c821,{'children':[a83_0x198ccc(Box,{'children':a83_0x198ccc(Text,{'color':_0x35ee9a(0x1cf),'children':'√'})}),a83_0x198ccc(Box,{'marginTop':0x1,'children':a83_0x198ccc(Text,{'children':_0x35ee9a(0x200)})}),a83_0x3054d9(Box,{'marginLeft':0x2,'children':[a83_0x3054d9(Text,{'color':_0x79631e===0x0?_0x35ee9a(0x1cf):'gray','children':[_0x79631e===0x0?'▶\x20':'\x20\x20',_0x35ee9a(0x1d8)]}),a83_0x198ccc(Text,{'children':'\x20'}),a83_0x3054d9(Text,{'color':_0x79631e===0x1?_0x35ee9a(0x1cf):'gray','children':[_0x79631e===0x1?'▶\x20':'\x20\x20','No']})]}),a83_0x198ccc(Box,{'children':a83_0x198ccc(Text,{'color':_0x35ee9a(0x1cb),'children':_0x35ee9a(0x1c8)})}),a83_0x198ccc(Box,{'marginTop':0x1,'children':a83_0x198ccc(Text,{'color':_0x35ee9a(0x1cb),'children':_0x35ee9a(0x1f7)})})]}),_0x165b0a===_0x35ee9a(0x1c3)&&a83_0x3054d9(a83_0x45c821,{'children':[a83_0x198ccc(Box,{'children':a83_0x198ccc(Text,{'color':'yellow','children':_0x35ee9a(0x1de)})}),a83_0x198ccc(Box,{'marginTop':0x1,'children':a83_0x198ccc(Text,{'children':'*\x20Login\x20first\x20to\x20pull\x20API\x20config?'})}),a83_0x3054d9(Box,{'marginLeft':0x2,'children':[a83_0x3054d9(Text,{'color':_0x57c78e===0x0?'green':_0x35ee9a(0x1cb),'children':[_0x57c78e===0x0?'▶\x20':'\x20\x20',_0x35ee9a(0x1d8)]}),a83_0x198ccc(Text,{'children':'\x20'}),a83_0x3054d9(Text,{'color':_0x57c78e===0x1?_0x35ee9a(0x1cf):_0x35ee9a(0x1cb),'children':[_0x57c78e===0x1?'▶\x20':'\x20\x20','No']})]}),a83_0x198ccc(Box,{'children':a83_0x198ccc(Text,{'color':_0x35ee9a(0x1cb),'children':_0x35ee9a(0x1c8)})})]}),_0x165b0a===_0x35ee9a(0x1e4)&&a83_0x3054d9(Box,{'children':[a83_0x198ccc(Text,{'children':_0x35ee9a(0x1e0)}),_0x574d49&&a83_0x198ccc(Text,{'color':_0x35ee9a(0x1cb),'children':_0x35ee9a(0x1da)})]}),_0x165b0a==='creating'&&a83_0x198ccc(Box,{'children':a83_0x198ccc(Text,{'color':_0x35ee9a(0x1cf),'children':_0x35ee9a(0x1f5)})})]});}
1
+ (function(_0x5eae64,_0x3d4e42){const _0x30bbcc=a83_0x16f6,_0x49a224=_0x5eae64();while(!![]){try{const _0x31f51a=-parseInt(_0x30bbcc(0x185))/0x1*(parseInt(_0x30bbcc(0x17e))/0x2)+parseInt(_0x30bbcc(0x16f))/0x3*(-parseInt(_0x30bbcc(0x178))/0x4)+parseInt(_0x30bbcc(0x190))/0x5*(parseInt(_0x30bbcc(0x179))/0x6)+parseInt(_0x30bbcc(0x172))/0x7+-parseInt(_0x30bbcc(0x18a))/0x8+parseInt(_0x30bbcc(0x194))/0x9+parseInt(_0x30bbcc(0x198))/0xa;if(_0x31f51a===_0x3d4e42)break;else _0x49a224['push'](_0x49a224['shift']());}catch(_0x3fa01a){_0x49a224['push'](_0x49a224['shift']());}}}(a83_0xf090,0x66ee9));import{jsx as a83_0x1c721c,jsxs as a83_0x13eb79,Fragment as a83_0x2f2715}from'react/jsx-runtime';import{useState}from'react';function a83_0x16f6(_0x3f3c1f,_0x3d1dac){_0x3f3c1f=_0x3f3c1f-0x157;const _0xf09014=a83_0xf090();let _0x16f6ab=_0xf09014[_0x3f3c1f];return _0x16f6ab;}import{Text,Box,useInput}from'ink';import{existsSync}from'node:fs';import a83_0x25e046 from'node:path';import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{readConfig}from'../utils/config.js';export function EnhancedGuidedCreate(_0xa9c9ed){const _0x13a0a8=a83_0x16f6,{onCreate:_0x29417a,env:_0x39bd96}=_0xa9c9ed,[_0x3adb7c,_0x3e5b77]=useState(_0x13a0a8(0x176)),[_0x333365,_0x340369]=useState(''),[_0x557758,_0x24259c]=useState(''),[_0x5e8e04,_0x1ae54d]=useState(''),[_0x39be45,_0x3f7be4]=useState(''),[_0x560b3d,_0x5c9e1a]=useState([]),[_0x1d530f,_0x248051]=useState(null),[_0x191bd7,_0x3ec529]=useState(![]),[_0x33f815,_0x5cbd03]=useState(![]),[_0x333924,_0x3e3b55]=useState(![]),[_0x5b4c57,_0x397436]=useState(0x0),[_0x4cc8a5,_0x4d9c1d]=useState(0x0),[_0x47ec0,_0x3de2af]=useState(0x0),[_0x4331a8,_0x377b77]=useState(''),_0x5aff69=_0x13a0a8(0x187),_0x1f94f3=readConfig(),_0x49e3f7=typeof _0x1f94f3[_0x13a0a8(0x19d)]===_0x13a0a8(0x184)?_0x1f94f3[_0x13a0a8(0x19d)]:undefined;function _0x543491(_0x2ab9d2){const _0x158684=_0x13a0a8,_0x42307a=_0x2ab9d2||_0x5aff69,_0x3fb29a=a83_0x25e046[_0x158684(0x165)](process['cwd'](),_0x42307a);return existsSync(_0x3fb29a);}function _0x393039(_0x4a41d7){const _0x32ed00=_0x13a0a8;if(_0x4a41d7[_0x32ed00(0x18c)]>0x32)return{'valid':![],'message':_0x32ed00(0x15e)};const _0x5cf747=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x4a41d7?.[_0x32ed00(0x173)]()&&!_0x5cf747[_0x32ed00(0x163)](_0x4a41d7))return{'valid':![],'message':_0x32ed00(0x16d)};return{'valid':!![]};}function _0x332463(_0x53740e){const _0x25f3a7=_0x13a0a8;if(!_0x53740e['trim']())return{'valid':!![]};if(_0x53740e[_0x25f3a7(0x18c)]>0x64)return{'valid':![],'message':_0x25f3a7(0x1a0)};const _0x843f99=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x843f99['test'](_0x53740e))return{'valid':![],'message':_0x25f3a7(0x186)};return{'valid':!![]};}async function _0x3a0952(){_0x3ec529(!![]);try{const _0x2ca405=await getIsSessionValid();return _0x248051(_0x2ca405),_0x2ca405;}catch(_0x175e0c){return _0x248051(![]),![];}finally{_0x3ec529(![]);}}async function _0x14f595(){_0x5cbd03(!![]);try{const _0x161ab6=await authServer({'silent':!![]});return _0x248051(_0x161ab6),_0x161ab6;}catch(_0x380b70){return _0x248051(![]),![];}finally{_0x5cbd03(![]);}}return useInput(async(_0x5e5d38,_0x313c49)=>{const _0xe5e976=_0x13a0a8;if(_0x313c49[_0xe5e976(0x16b)]||_0x313c49['rightArrow']){if(_0x3adb7c===_0xe5e976(0x18f)){_0x397436(_0x281b81=>_0x281b81===0x0?0x1:0x0);return;}if(_0x3adb7c===_0xe5e976(0x16e)){_0x4d9c1d(_0xddec9d=>_0xddec9d===0x0?0x1:0x0);return;}if(_0x3adb7c==='login-prompt'){_0x3de2af(_0x17cc3c=>_0x17cc3c===0x0?0x1:0x0);return;}}if(_0x313c49[_0xe5e976(0x177)]){if(_0x3adb7c===_0xe5e976(0x176)){const _0x33832f=_0x5e8e04[_0xe5e976(0x173)]()||_0x5aff69;if(_0x39be45)return;if(_0x543491(_0x33832f)){_0x377b77(_0xe5e976(0x17d)+_0x33832f+'\x20already\x20exists,\x20please\x20use\x20a\x20different\x20name');return;}_0x340369(_0x33832f),_0x5c9e1a([{'step':_0xe5e976(0x176),'label':_0xe5e976(0x170),'value':_0x33832f}]),_0x1ae54d(''),_0x3f7be4(''),_0x377b77(''),_0x3e5b77('app-code');return;}if(_0x3adb7c===_0xe5e976(0x189)){if(_0x39be45)return;const _0x323487=_0x5e8e04[_0xe5e976(0x173)]();_0x24259c(_0x323487),_0x5c9e1a(_0x497963=>[..._0x497963,{'step':_0xe5e976(0x189),'label':'App\x20Code','value':_0x323487||_0xe5e976(0x19f)}]),_0x1ae54d(''),_0x3f7be4('');if(_0x323487){_0x3e5b77(_0xe5e976(0x17a));const _0x2e06e8=await _0x3a0952();_0x2e06e8?_0x3e5b77(_0xe5e976(0x18f)):_0x3e5b77(_0xe5e976(0x183));}else{const _0x42428a=_0x39bd96||_0x49e3f7||_0xe5e976(0x15d);_0x29417a({'projectName':_0x333365,'appCode':undefined,'pullApi':![],'setupMcp':![],'env':_0x42428a}),_0x3e5b77(_0xe5e976(0x157));}return;}if(_0x3adb7c===_0xe5e976(0x18f)){const _0x3c23dd=_0x5b4c57===0x0;_0x3e3b55(_0x3c23dd),_0x5c9e1a(_0x206503=>[..._0x206503,{'step':'api-pull','label':'Pull\x20API\x20config','value':_0x3c23dd?_0xe5e976(0x182):'No'}]),_0x3e5b77(_0xe5e976(0x16e));return;}if(_0x3adb7c==='confirm-mcp-setup'){const _0x14fed9=_0x4cc8a5===0x0;_0x5c9e1a(_0x4364e8=>[..._0x4364e8,{'step':_0xe5e976(0x158),'label':'Skills\x20&\x20MCP','value':_0x14fed9?_0xe5e976(0x182):'No'}]);const _0x46c3f9=_0x39bd96||_0x49e3f7||_0xe5e976(0x15d);_0x29417a({'projectName':_0x333365,'appCode':_0x557758,'pullApi':_0x333924,'setupMcp':_0x14fed9,'env':_0x46c3f9}),_0x3e5b77(_0xe5e976(0x157));return;}if(_0x3adb7c==='login-prompt'){const _0x47d274=_0x47ec0===0x0;if(_0x47d274){_0x3e5b77('login-process');const _0x404f9f=await _0x14f595();_0x404f9f?(_0x5c9e1a(_0x42e31a=>[..._0x42e31a,{'step':_0xe5e976(0x15b),'label':'Login\x20status','value':_0xe5e976(0x19e)}]),_0x3e5b77('confirm-api-pull')):(_0x5c9e1a(_0x34aebb=>[..._0x34aebb,{'step':_0xe5e976(0x15b),'label':_0xe5e976(0x17c),'value':'Login\x20failed'}]),_0x3e5b77('confirm-mcp-setup'));}else _0x5c9e1a(_0x2db199=>[..._0x2db199,{'step':'login','label':'Login\x20status','value':_0xe5e976(0x18d)}]),_0x3e5b77('confirm-mcp-setup');return;}}if(_0x313c49['backspace']||_0x313c49[_0xe5e976(0x193)]){_0x1ae54d(_0x547347=>{const _0x307509=_0xe5e976,_0x19a686=_0x547347[_0x307509(0x171)](0x0,-0x1);if(_0x3adb7c===_0x307509(0x176)){const {valid:_0x531820,message:_0x210e31}=_0x393039(_0x19a686);_0x3f7be4(_0x531820?'':_0x210e31||_0x307509(0x168));if(_0x531820&&!_0x39be45){const _0x4b6837=_0x19a686||_0x5aff69;_0x543491(_0x4b6837)?_0x377b77(_0x307509(0x162)+_0x4b6837+_0x307509(0x15f)):_0x377b77('');}}else{if(_0x3adb7c===_0x307509(0x189)){const {valid:_0xbfad83,message:_0x1dcd43}=_0x332463(_0x19a686);_0x3f7be4(_0xbfad83?'':_0x1dcd43||'Invalid\x20AppCode');}}return _0x19a686;});return;}if([_0xe5e976(0x157),_0xe5e976(0x17a),_0xe5e976(0x166),_0xe5e976(0x18f),'confirm-mcp-setup',_0xe5e976(0x183)][_0xe5e976(0x169)](_0x3adb7c))return;_0x1ae54d(_0x2d35fc=>{const _0x35fe09=_0xe5e976,_0x982628=_0x2d35fc+_0x5e5d38;if(_0x3adb7c==='project-name'){const {valid:_0x1abaf0,message:_0x5c14a8}=_0x393039(_0x982628);_0x3f7be4(_0x1abaf0?'':_0x5c14a8||_0x35fe09(0x168));if(_0x1abaf0&&!_0x39be45){const _0x3a6767=_0x982628||_0x5aff69;_0x543491(_0x3a6767)?_0x377b77(_0x35fe09(0x162)+_0x3a6767+_0x35fe09(0x15f)):_0x377b77('');}}else{if(_0x3adb7c===_0x35fe09(0x189)){const {valid:_0x4ff3ef,message:_0x564fc0}=_0x332463(_0x982628);_0x3f7be4(_0x4ff3ef?'':_0x564fc0||_0x35fe09(0x18b));}}return _0x982628;});}),a83_0x13eb79(Box,{'flexDirection':_0x13a0a8(0x19a),'marginTop':0x1,'children':[_0x560b3d[_0x13a0a8(0x18c)]===0x0&&a83_0x1c721c(Box,{'children':a83_0x1c721c(Text,{'color':'cyan','children':_0x13a0a8(0x15a)})}),_0x560b3d[_0x13a0a8(0x174)](_0x181faa=>a83_0x13eb79(Box,{'children':[a83_0x1c721c(Text,{'color':_0x13a0a8(0x17f),'children':'√\x20'+_0x181faa[_0x13a0a8(0x175)]+':\x20'}),a83_0x1c721c(Text,{'color':_0x13a0a8(0x196),'children':_0x181faa[_0x13a0a8(0x19b)]})]},_0x181faa[_0x13a0a8(0x195)])),_0x3adb7c==='project-name'&&a83_0x13eb79(a83_0x2f2715,{'children':[a83_0x13eb79(Box,{'children':[a83_0x1c721c(Text,{'children':_0x13a0a8(0x15c)}),_0x5e8e04?a83_0x1c721c(Text,{'color':_0x13a0a8(0x17f),'children':_0x5e8e04}):a83_0x1c721c(Text,{'color':'gray','children':_0x5aff69}),_0x39be45&&a83_0x13eb79(Text,{'color':_0x13a0a8(0x180),'children':[_0x13a0a8(0x161),_0x39be45]}),_0x4331a8&&a83_0x13eb79(Text,{'color':_0x13a0a8(0x180),'children':['\x20←\x20',_0x4331a8]})]}),!_0x39be45&&!_0x4331a8&&!_0x5e8e04&&a83_0x1c721c(Box,{'children':a83_0x1c721c(Text,{'color':_0x13a0a8(0x191),'children':_0x13a0a8(0x17b)})})]}),_0x3adb7c==='app-code'&&a83_0x13eb79(a83_0x2f2715,{'children':[a83_0x13eb79(Box,{'children':[a83_0x1c721c(Text,{'children':_0x13a0a8(0x192)}),a83_0x1c721c(Text,{'color':'gray','children':'[optional]:\x20'}),a83_0x1c721c(Text,{'color':_0x13a0a8(0x17f),'children':_0x5e8e04}),_0x39be45&&a83_0x13eb79(Text,{'color':'red','children':[_0x13a0a8(0x161),_0x39be45]})]}),!_0x39be45&&a83_0x1c721c(Box,{'children':a83_0x1c721c(Text,{'color':_0x13a0a8(0x191),'children':'Bind\x20AppCode\x20to\x20auto-configure\x20API,\x20e.g.\x20app-c4c89304\x20(press\x20Enter\x20to\x20skip)'})})]}),_0x3adb7c===_0x13a0a8(0x17a)&&a83_0x13eb79(Box,{'children':[a83_0x1c721c(Text,{'children':_0x13a0a8(0x181)}),_0x191bd7&&a83_0x1c721c(Text,{'color':_0x13a0a8(0x191),'children':'\x20Checking...'})]}),_0x3adb7c===_0x13a0a8(0x18f)&&a83_0x13eb79(a83_0x2f2715,{'children':[a83_0x1c721c(Box,{'children':a83_0x1c721c(Text,{'color':_0x13a0a8(0x17f),'children':_0x13a0a8(0x18e)})}),a83_0x1c721c(Box,{'marginTop':0x1,'children':a83_0x1c721c(Text,{'children':'*\x20Automatically\x20pull\x20API\x20config?'})}),a83_0x13eb79(Box,{'marginLeft':0x2,'children':[a83_0x13eb79(Text,{'color':_0x5b4c57===0x0?'green':_0x13a0a8(0x191),'children':[_0x5b4c57===0x0?'▶\x20':'\x20\x20',_0x13a0a8(0x182)]}),a83_0x1c721c(Text,{'children':'\x20'}),a83_0x13eb79(Text,{'color':_0x5b4c57===0x1?'green':_0x13a0a8(0x191),'children':[_0x5b4c57===0x1?'▶\x20':'\x20\x20','No']})]}),a83_0x1c721c(Box,{'children':a83_0x1c721c(Text,{'color':'gray','children':_0x13a0a8(0x19c)})}),a83_0x1c721c(Box,{'children':a83_0x1c721c(Text,{'color':_0x13a0a8(0x199),'children':_0x13a0a8(0x164)})})]}),_0x3adb7c===_0x13a0a8(0x16e)&&a83_0x13eb79(a83_0x2f2715,{'children':[a83_0x1c721c(Box,{'children':a83_0x1c721c(Text,{'color':_0x13a0a8(0x17f),'children':'√'})}),a83_0x1c721c(Box,{'marginTop':0x1,'children':a83_0x1c721c(Text,{'children':_0x13a0a8(0x160)})}),a83_0x13eb79(Box,{'marginLeft':0x2,'children':[a83_0x13eb79(Text,{'color':_0x4cc8a5===0x0?_0x13a0a8(0x17f):_0x13a0a8(0x191),'children':[_0x4cc8a5===0x0?'▶\x20':'\x20\x20',_0x13a0a8(0x182)]}),a83_0x1c721c(Text,{'children':'\x20'}),a83_0x13eb79(Text,{'color':_0x4cc8a5===0x1?'green':'gray','children':[_0x4cc8a5===0x1?'▶\x20':'\x20\x20','No']})]}),a83_0x1c721c(Box,{'children':a83_0x1c721c(Text,{'color':_0x13a0a8(0x191),'children':'\x20\x20Use\x20←→\x20to\x20choose,\x20press\x20Enter\x20to\x20confirm'})}),a83_0x1c721c(Box,{'marginTop':0x1,'children':a83_0x1c721c(Text,{'color':_0x13a0a8(0x191),'children':_0x13a0a8(0x16c)})})]}),_0x3adb7c===_0x13a0a8(0x183)&&a83_0x13eb79(a83_0x2f2715,{'children':[a83_0x1c721c(Box,{'children':a83_0x1c721c(Text,{'color':_0x13a0a8(0x199),'children':_0x13a0a8(0x159)})}),a83_0x1c721c(Box,{'marginTop':0x1,'children':a83_0x1c721c(Text,{'children':_0x13a0a8(0x167)})}),a83_0x13eb79(Box,{'marginLeft':0x2,'children':[a83_0x13eb79(Text,{'color':_0x47ec0===0x0?'green':_0x13a0a8(0x191),'children':[_0x47ec0===0x0?'▶\x20':'\x20\x20',_0x13a0a8(0x182)]}),a83_0x1c721c(Text,{'children':'\x20'}),a83_0x13eb79(Text,{'color':_0x47ec0===0x1?_0x13a0a8(0x17f):_0x13a0a8(0x191),'children':[_0x47ec0===0x1?'▶\x20':'\x20\x20','No']})]}),a83_0x1c721c(Box,{'children':a83_0x1c721c(Text,{'color':_0x13a0a8(0x191),'children':_0x13a0a8(0x19c)})})]}),_0x3adb7c==='login-process'&&a83_0x13eb79(Box,{'children':[a83_0x1c721c(Text,{'children':_0x13a0a8(0x197)}),_0x33f815&&a83_0x1c721c(Text,{'color':_0x13a0a8(0x191),'children':_0x13a0a8(0x188)})]}),_0x3adb7c===_0x13a0a8(0x157)&&a83_0x1c721c(Box,{'children':a83_0x1c721c(Text,{'color':_0x13a0a8(0x17f),'children':_0x13a0a8(0x16a)})})]});}function a83_0xf090(){const _0x2caa6e=['slice','3438134zBuiwS','trim','map','label','project-name','return','39692KLjpFi','130926uNugyi','login-check','Press\x20Enter\x20to\x20confirm\x20or\x20type\x20a\x20custom\x20name','Login\x20status','Project\x20directory\x20','12330yUAJXo','green','red','*\x20Checking\x20login\x20status...','Yes','login-prompt','string','62eQUTXT','AppCode\x20can\x20only\x20contain\x20letters,\x20numbers,\x20hyphens\x20and\x20underscores,\x20and\x20must\x20start\x20with\x20a\x20letter\x20or\x20number','my-app','\x20Logging\x20in...','app-code','4494408nqFAzY','Invalid\x20AppCode','length','Login\x20skipped','√\x20Valid\x20login\x20detected','confirm-api-pull','140rGEwOe','gray','*\x20AppCode\x20','delete','2497059lkNFqX','step','cyan','*\x20Logging\x20in,\x20please\x20complete\x20in\x20browser...','1745760mzLJHQ','yellow','column','value','\x20\x20Use\x20←→\x20to\x20choose,\x20press\x20Enter\x20to\x20confirm','env','Logged\x20in','Not\x20set','AppCode\x20cannot\x20exceed\x20100\x20characters','creating','skills-mcp-setup','!\x20No\x20valid\x20login\x20detected','*\x20Create\x20new\x20project','login','*\x20Project\x20name:\x20','production','Project\x20name\x20cannot\x20exceed\x2050\x20characters','\x22\x20already\x20exists','*\x20Install\x20AI\x20Skills\x20and\x20configure\x20MCP?','\x20←\x20','Directory\x20\x22','test','\x20\x20Recommended:\x20Yes,\x20to\x20auto-configure\x20API','resolve','login-process','*\x20Login\x20first\x20to\x20pull\x20API\x20config?','Invalid\x20project\x20name','includes','*\x20Creating\x20project...','leftArrow','If\x20Yes,\x20npx\x20skills\x20will\x20guide\x20you\x20to\x20select\x20an\x20AI\x20agent\x20and\x20install\x20the\x20developer\x20skill\x20pack,\x20then\x20Cursor\x20MCP\x20will\x20be\x20configured\x20automatically','Project\x20name\x20must\x20start\x20with\x20a\x20letter\x20or\x20number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','confirm-mcp-setup','57jJguyw','Project\x20Name'];a83_0xf090=function(){return _0x2caa6e;};return a83_0xf090();}
@@ -1 +1 @@
1
- function a84_0x5fc5(){const _0x41841c=['226599zWHUUP','5928895SaNayz','1172768JqlDJJ','2pTNUGQ','1507070MojzPy','55018KmocKu','replace','1962894Myejwz','249096eHPCyL'];a84_0x5fc5=function(){return _0x41841c;};return a84_0x5fc5();}(function(_0x1062d3,_0x3a90fc){const _0x4840a2=a84_0x5216,_0x50b97d=_0x1062d3();while(!![]){try{const _0x30cb5d=-parseInt(_0x4840a2(0x1e2))/0x1+-parseInt(_0x4840a2(0x1e0))/0x2*(parseInt(_0x4840a2(0x1e6))/0x3)+-parseInt(_0x4840a2(0x1e8))/0x4+-parseInt(_0x4840a2(0x1e1))/0x5+parseInt(_0x4840a2(0x1e4))/0x6+parseInt(_0x4840a2(0x1e7))/0x7+parseInt(_0x4840a2(0x1e5))/0x8;if(_0x30cb5d===_0x3a90fc)break;else _0x50b97d['push'](_0x50b97d['shift']());}catch(_0xbb32d8){_0x50b97d['push'](_0x50b97d['shift']());}}}(a84_0x5fc5,0x75372));function a84_0x5216(_0x26e44c,_0x1896fa){_0x26e44c=_0x26e44c-0x1e0;const _0x5fc548=a84_0x5fc5();let _0x521675=_0x5fc548[_0x26e44c];return _0x521675;}export function formatElapsed(_0x39078f){const _0x4384ec=a84_0x5216,_0x211f3d=Date['now']()-_0x39078f;if(_0x211f3d<0x3e8)return _0x211f3d+'ms';const _0x574e96=(_0x211f3d/0x3e8)['toFixed'](0x2),_0x1b2502=_0x574e96[_0x4384ec(0x1e3)](/\.?0+$/u,'');return _0x1b2502+'s';}
1
+ (function(_0x44ef2e,_0x2b8ae3){const _0x36b66e=a84_0x3949,_0x27b418=_0x44ef2e();while(!![]){try{const _0x36d6a3=parseInt(_0x36b66e(0x15a))/0x1*(-parseInt(_0x36b66e(0x154))/0x2)+-parseInt(_0x36b66e(0x153))/0x3+parseInt(_0x36b66e(0x158))/0x4*(parseInt(_0x36b66e(0x151))/0x5)+-parseInt(_0x36b66e(0x156))/0x6*(-parseInt(_0x36b66e(0x150))/0x7)+-parseInt(_0x36b66e(0x15b))/0x8*(-parseInt(_0x36b66e(0x152))/0x9)+parseInt(_0x36b66e(0x159))/0xa+-parseInt(_0x36b66e(0x157))/0xb*(parseInt(_0x36b66e(0x15d))/0xc);if(_0x36d6a3===_0x2b8ae3)break;else _0x27b418['push'](_0x27b418['shift']());}catch(_0x553f4b){_0x27b418['push'](_0x27b418['shift']());}}}(a84_0x38e3,0x1cc35));function a84_0x3949(_0x5ea37d,_0x56aed6){_0x5ea37d=_0x5ea37d-0x150;const _0x38e3f0=a84_0x38e3();let _0x3949ed=_0x38e3f0[_0x5ea37d];return _0x3949ed;}function a84_0x38e3(){const _0x48bdd5=['131412MzFiOK','4ivgCTC','replace','6rXqNTz','143GBzKxE','36488wAxfea','1429770YElmTy','48976pdpNXS','213232MfczJY','toFixed','173436OzuuOS','874223HRVhos','40RnfgDw','36FklWrQ'];a84_0x38e3=function(){return _0x48bdd5;};return a84_0x38e3();}export function formatElapsed(_0x52b842){const _0x270d37=a84_0x3949,_0x56c952=Date['now']()-_0x52b842;if(_0x56c952<0x3e8)return _0x56c952+'ms';const _0x247d43=(_0x56c952/0x3e8)[_0x270d37(0x15c)](0x2),_0x35c470=_0x247d43[_0x270d37(0x155)](/\.?0+$/u,'');return _0x35c470+'s';}
@@ -1 +1 @@
1
- (function(_0x3654b3,_0x5d04c5){const _0x362478=a85_0x28cd,_0xb3a07a=_0x3654b3();while(!![]){try{const _0x585232=-parseInt(_0x362478(0xd8))/0x1*(-parseInt(_0x362478(0x84))/0x2)+parseInt(_0x362478(0xc7))/0x3+parseInt(_0x362478(0xd1))/0x4*(-parseInt(_0x362478(0xa8))/0x5)+-parseInt(_0x362478(0x88))/0x6+-parseInt(_0x362478(0x75))/0x7*(parseInt(_0x362478(0x74))/0x8)+-parseInt(_0x362478(0xd4))/0x9*(-parseInt(_0x362478(0xc8))/0xa)+parseInt(_0x362478(0xaf))/0xb;if(_0x585232===_0x5d04c5)break;else _0xb3a07a['push'](_0xb3a07a['shift']());}catch(_0xc43e63){_0xb3a07a['push'](_0xb3a07a['shift']());}}}(a85_0x13d1,0x35b34));import{jsx as a85_0x54212b,Fragment as a85_0x4dada8,jsxs as a85_0x2dd0f5}from'react/jsx-runtime';import a85_0x31b05a from'path';import a85_0x441cf4 from'fs';import{fileURLToPath}from'node:url';import{Box,Text}from'ink';import{useEffect,useState}from'react';import{EnhancedGuidedCreate}from'./enhanced-guided-create.js';import{pullApiSilent}from'../api/pull-silent.js';import{readConfig}from'../utils/config.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../context.js';import{useCopyProjectTemplate}from'./use-copy-project-template.js';function a85_0x13d1(){const _0x52512d=['package.json','√\x20Configuration\x20file\x20created,\x20AppCode:\x20','开始创建项目:\x20','warn','10JVreDp','配置应用AppCode失败','resolve','mcp-','\x20√\x20','cyan','\x20\x20(Skipped\x20npx;\x20assuming\x20skills\x20are\x20already\x20installed)','1657392MLasoC','Configure\x20MCP\x20server:\x20','更新\x20package.json\x20失败','API\x20配置拉取成功:\x20','inherit','\x20Generated\x20by\x20rabetbase\x20cli\x20','green','repeat','CLI\x20版本检查','Project\x20name\x20contains\x20invalid\x20characters.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','setLogPath','info','cd\x20','join','W_OK','1.\x20','pullApi','rabetbase\x20api\x20pull','projectCode','*\x20Pulling\x20API\x20configuration...','项目创建完成:\x20','×\x20Project\x20creation\x20failed:\x20','Cursor','length','1156554SLtmKI','26970xVbeWV','status','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','name','success','../..','message','create','needsUpgrade','661372jGBwXm','map','*\x20Configuring\x20MCP...','36NSjnwN','parse','currentVersion','toLocaleString','1097nkeDoa','production','utf8','配置应用AppCode:\x20','*\x20Configuring\x20AppCode\x20for\x20project\x20','then','16ZNmjOJ','80423YCnOJF','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','readFileSync','\x20MCP\x20Cursor:\x20','*\x20Installing\x20AI\x20Skills\x20via\x20npx\x20skills...','更新\x20package.json\x20name','existsSync','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','description','rabetbase\x20mcp\x20install','projectName','cursor','🚀\x20Next\x20Steps:','Pull\x20API\x20configuration:','error','764KnjEgD','accessSync','skipped','\x20\x20✗\x20MCP\x20Cursor:\x20','2354472JobZMR','dirname','column','Start\x20project:','项目创建失败:\x20','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','manual','push','1.0.0','test','Project\x20directory\x20','yellow','log','√\x20package.json\x20updated:\x20name=','doTask','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27rabetbase\x20config\x20set\x20appcode\x20<app-code>\x27','Skills\x20installed\x20and\x20MCP\x20configured','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','env','cwd','API\x20配置拉取失败:\x20','Project\x20name\x20cannot\x20be\x20empty','red','2.\x20','trim','\x20|\x20AppCode:\x20','appCode','white'];a85_0x13d1=function(){return _0x52512d;};return a85_0x13d1();}function a85_0x28cd(_0x32088d,_0x19ab83){_0x32088d=_0x32088d-0x70;const _0x13d173=a85_0x13d1();let _0x28cd00=_0x13d173[_0x32088d];return _0x28cd00;}import{useInstallDependencies}from'./use-install-dependencies.js';import{useFormatCode}from'./use-format-code.js';import{TaskFinished}from'./task-finished.js';import{TaskRunning}from'./task-running.js';import{logger}from'../utils/logger.js';import{configureMcp}from'../ai-setup/config.js';import{runNpxSkillsAdd,NPX_SKILLS_ADD_COMMAND_LINE}from'../skills/npx-skills-add.js';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';export function CreateApp(_0x2ec990){const _0x22fba1=a85_0x28cd,[_0x35de4f,_0x35c705]=useState(![]),[_0x313f1c,_0x39b23e]=useState(![]),[_0x31add8,_0x2e7659]=useState(null),[_0x24309e,_0x26f7b6]=useState(null),[_0x19eaa5,_0x21d0e2]=useState(![]),_0x27cb41=useCopyProjectTemplate(),_0x231d32=useInstallDependencies(),_0x2e4795=useFormatCode();useEffect(()=>{const _0x14a073=a85_0x28cd;checkCliVersion()[_0x14a073(0x73)](_0x540549=>{const _0x492deb=_0x14a073;_0x540549[_0x492deb(0xd0)]&&(printCliUpgradeWarning(_0x540549),logger[_0x492deb(0xba)](_0x492deb(0xcf),_0x492deb(0xb7),{'currentVersion':_0x540549[_0x492deb(0xd6)],'stableVersion':_0x540549['stableVersion'],'needsUpgrade':_0x540549[_0x492deb(0xd0)]}));});},[]);const _0x572160=async _0x21f4c0=>{const _0x1977cf=a85_0x28cd;if(!_0x21f4c0[_0x1977cf(0x7f)]||_0x21f4c0['projectName'][_0x1977cf(0xa0)]()===''){console['error'](_0x1977cf(0x9d));return;}const _0x3b6ebb=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x3b6ebb[_0x1977cf(0x91)](_0x21f4c0[_0x1977cf(0x7f)])){console[_0x1977cf(0x83)](_0x1977cf(0xb8));return;}if(_0x21f4c0[_0x1977cf(0x7f)][_0x1977cf(0xc6)]>0x64){console[_0x1977cf(0x83)](_0x1977cf(0x99));return;}const _0x2510d8=a85_0x31b05a[_0x1977cf(0xaa)](process['cwd'](),_0x21f4c0[_0x1977cf(0x7f)]);if(a85_0x441cf4[_0x1977cf(0x7b)](_0x2510d8)){console[_0x1977cf(0x83)](_0x1977cf(0x92)+_0x21f4c0[_0x1977cf(0x7f)]+'\x20already\x20exists,\x20please\x20use\x20a\x20different\x20name');return;}try{const _0x45859c=a85_0x31b05a['dirname'](_0x2510d8);a85_0x441cf4[_0x1977cf(0x85)](_0x45859c,a85_0x441cf4['constants'][_0x1977cf(0xbd)]);}catch(_0x9df4f3){console[_0x1977cf(0x83)](_0x1977cf(0x76));return;}_0x2e7659(_0x21f4c0),_0x35c705(!![]),logger[_0x1977cf(0xb9)](_0x2510d8),logger[_0x1977cf(0xba)]('create',_0x1977cf(0xa6)+_0x21f4c0['projectName'],{'projectDir':_0x2510d8,'appCode':_0x21f4c0[_0x1977cf(0xa2)]});try{await _0x27cb41[_0x1977cf(0x96)](_0x21f4c0[_0x1977cf(0x7f)]),await _0x168347(_0x21f4c0[_0x1977cf(0x7f)]),await _0x231d32[_0x1977cf(0x96)](_0x21f4c0['projectName']),await _0x2e4795[_0x1977cf(0x96)](_0x21f4c0[_0x1977cf(0x7f)]),await _0x2597fb(_0x21f4c0[_0x1977cf(0x7f)],_0x21f4c0['appCode']||'',_0x21f4c0[_0x1977cf(0x9a)]);if(_0x21f4c0[_0x1977cf(0xbf)]&&_0x21f4c0['appCode']){console[_0x1977cf(0x94)](_0x1977cf(0xc2));try{const _0x3b58e2=await pullApiSilent(_0x21f4c0[_0x1977cf(0xa2)],undefined,_0x2510d8,_0x21f4c0[_0x1977cf(0x9a)]);_0x3b58e2?(console[_0x1977cf(0x94)]('√\x20API\x20configuration\x20pulled\x20successfully'),logger[_0x1977cf(0xba)](_0x1977cf(0xcf),_0x1977cf(0xb2)+_0x21f4c0['appCode'])):(console['log']('!\x20API\x20configuration\x20pull\x20failed,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull'),logger[_0x1977cf(0xa7)](_0x1977cf(0xcf),_0x1977cf(0x9c)+_0x21f4c0[_0x1977cf(0xa2)]));}catch(_0x22fe99){console[_0x1977cf(0x94)]('!\x20API\x20configuration\x20pull\x20error,\x20project\x20created,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull'),logger[_0x1977cf(0xa7)](_0x1977cf(0xcf),'API\x20配置拉取异常',{'error':_0x22fe99 instanceof Error?_0x22fe99[_0x1977cf(0xce)]:String(_0x22fe99)});}}const _0x1abd2a=[];let _0x48d62f=![];if(_0x21f4c0['setupMcp']&&_0x21f4c0[_0x1977cf(0xa2)]){console['log'](_0x1977cf(0x79));try{const _0x5198e4=runNpxSkillsAdd(_0x2510d8,{'stdio':_0x1977cf(0xb3)});_0x48d62f=_0x5198e4['ok'],_0x5198e4[_0x1977cf(0x86)]&&console[_0x1977cf(0x94)](_0x1977cf(0xae));}catch(_0x467f6f){logger[_0x1977cf(0xa7)](_0x1977cf(0xcf),'Skills\x20安装异常,继续配置\x20MCP',{'error':_0x467f6f instanceof Error?_0x467f6f[_0x1977cf(0xce)]:String(_0x467f6f)});}console[_0x1977cf(0x94)](_0x1977cf(0xd3));const _0x36fb02=_0x1977cf(0x80);try{const _0x318cf3=await configureMcp(_0x36fb02,_0x2510d8);_0x1abd2a[_0x1977cf(0x8f)]({'ide':'Cursor','status':_0x318cf3['status'],'message':_0x318cf3[_0x1977cf(0xce)]}),console[_0x1977cf(0x94)]('\x20\x20'+(_0x318cf3[_0x1977cf(0xc9)]===_0x1977cf(0xcc)?'✓':_0x318cf3['status']===_0x1977cf(0x8e)?'⚠️':'✗')+_0x1977cf(0x78)+_0x318cf3[_0x1977cf(0xce)]);}catch(_0x4a7c5f){_0x1abd2a[_0x1977cf(0x8f)]({'ide':_0x1977cf(0xc5),'status':_0x1977cf(0x83),'message':_0x4a7c5f instanceof Error?_0x4a7c5f[_0x1977cf(0xce)]:String(_0x4a7c5f)}),console[_0x1977cf(0x94)](_0x1977cf(0x87)+(_0x4a7c5f instanceof Error?_0x4a7c5f[_0x1977cf(0xce)]:String(_0x4a7c5f)));}}_0x21d0e2(_0x48d62f),_0x26f7b6(_0x1abd2a[_0x1977cf(0xc6)]>0x0?_0x1abd2a:null),console['log']('√\x20Lovrabet\x20MCP\x20and\x20Skill\x20configuration\x20completed'),logger[_0x1977cf(0xcc)](_0x1977cf(0xcf),_0x1977cf(0xc3)+_0x21f4c0['projectName']),_0x39b23e(!![]),_0x35c705(![]);}catch(_0x1741b8){logger[_0x1977cf(0x83)](_0x1977cf(0xcf),_0x1977cf(0x8c)+_0x21f4c0[_0x1977cf(0x7f)],{'error':_0x1741b8 instanceof Error?_0x1741b8[_0x1977cf(0xce)]:String(_0x1741b8)});try{a85_0x441cf4[_0x1977cf(0x7b)](_0x2510d8)&&(console['log'](_0x1977cf(0xca)+_0x2510d8),a85_0x441cf4['rmSync'](_0x2510d8,{'recursive':!![],'force':!![]}));}catch(_0x121509){logger[_0x1977cf(0xa7)](_0x1977cf(0xcf),'清理项目目录失败:\x20'+_0x2510d8);}_0x35c705(![]),console[_0x1977cf(0x83)](_0x1977cf(0xc4)+(_0x1741b8 instanceof Error?_0x1741b8[_0x1977cf(0xce)]:String(_0x1741b8)));}},_0xb71533=async _0x4683d6=>{const _0xc58189=a85_0x28cd;await _0x572160({'projectName':_0x4683d6,'env':_0x2ec990[_0xc58189(0x9a)]});},_0x168347=async _0x20288=>{const _0x2c8af2=a85_0x28cd,_0x1ec24d=a85_0x31b05a[_0x2c8af2(0xaa)](process[_0x2c8af2(0x9b)](),_0x20288),_0xfb3c2b=a85_0x31b05a[_0x2c8af2(0xbc)](_0x1ec24d,'package.json');try{console[_0x2c8af2(0x94)](_0x2c8af2(0x8d));const _0x165b7a=fileURLToPath(import.meta.url),_0x5c3192=a85_0x31b05a['resolve'](a85_0x31b05a[_0x2c8af2(0x89)](_0x165b7a),_0x2c8af2(0xcd)),_0x3c8452=a85_0x31b05a[_0x2c8af2(0xbc)](_0x5c3192,_0x2c8af2(0xa4));let _0x502050=_0x2c8af2(0x90);try{const _0x2e6a4b=JSON[_0x2c8af2(0xd5)](a85_0x441cf4['readFileSync'](_0x3c8452,'utf8'));_0x502050=_0x2e6a4b['version']||'1.0.0';}catch(_0x597742){}const _0xc53d6e=a85_0x441cf4[_0x2c8af2(0x77)](_0xfb3c2b,_0x2c8af2(0x70)),_0x4a89ca=JSON[_0x2c8af2(0xd5)](_0xc53d6e);_0x4a89ca[_0x2c8af2(0xcb)]=_0x20288,_0x4a89ca[_0x2c8af2(0x7d)]=_0x20288+_0x2c8af2(0xb4)+_0x502050,a85_0x441cf4['writeFileSync'](_0xfb3c2b,JSON['stringify'](_0x4a89ca,null,0x2)+'\x0a',_0x2c8af2(0x70)),console[_0x2c8af2(0x94)](_0x2c8af2(0x95)+_0x20288),logger[_0x2c8af2(0xba)](_0x2c8af2(0xcf),_0x2c8af2(0x7a));}catch(_0x46f2e7){logger[_0x2c8af2(0x83)](_0x2c8af2(0xcf),_0x2c8af2(0xb1));throw _0x46f2e7;}},_0x2597fb=async(_0x21b39a,_0x29d2b1,_0x76ecd8)=>{const _0xc53622=a85_0x28cd,_0x5c5bb2=a85_0x31b05a[_0xc53622(0xaa)](process[_0xc53622(0x9b)](),_0x21b39a),_0x2d8fef=a85_0x31b05a[_0xc53622(0xbc)](_0x5c5bb2,NEW_CONFIG_NAME);try{_0x29d2b1?console[_0xc53622(0x94)](_0xc53622(0x72)+_0x21b39a+':\x20'+_0x29d2b1):console[_0xc53622(0x94)](_0xc53622(0x7c)+_0x21b39a);const _0x5cedfa=fileURLToPath(import.meta.url),_0x122789=a85_0x31b05a[_0xc53622(0xaa)](a85_0x31b05a[_0xc53622(0x89)](_0x5cedfa),_0xc53622(0xcd)),_0x3ed33c=a85_0x31b05a['join'](_0x122789,_0xc53622(0xa4));let _0x5103f3=_0xc53622(0x90);try{const _0x4edbc2=JSON[_0xc53622(0xd5)](a85_0x441cf4[_0xc53622(0x77)](_0x3ed33c,_0xc53622(0x70)));_0x5103f3=_0x4edbc2['version']||_0xc53622(0x90);}catch{}const _0x59d3a5=readConfig(),_0x115953=typeof _0x59d3a5['env']==='string'?_0x59d3a5['env']:undefined,{app:_0x437ffa,appcode:_0x437860,..._0x38c310}=_0x59d3a5,_0x4ffc13={..._0x38c310,'appcode':_0x29d2b1||'','env':_0x76ecd8||_0x115953||_0xc53622(0xd9),'createdAt':new Date()[_0xc53622(0xd7)](),'version':_0x5103f3};writeConfigFile(_0x2d8fef,_0x4ffc13),_0x29d2b1?console[_0xc53622(0x94)](_0xc53622(0xa5)+_0x29d2b1):console[_0xc53622(0x94)](_0xc53622(0x97)),logger[_0xc53622(0xba)](_0xc53622(0xcf),_0xc53622(0x71)+_0x29d2b1);}catch(_0x46fc8b){logger[_0xc53622(0x83)](_0xc53622(0xcf),_0xc53622(0xa9));}};useEffect(()=>{const _0x1bb23b=a85_0x28cd;_0x2ec990[_0x1bb23b(0xc1)]&&_0xb71533(_0x2ec990[_0x1bb23b(0xc1)]);},[_0x2ec990[_0x22fba1(0xc1)]]);if(!_0x35de4f&&!_0x313f1c&&!_0x2ec990[_0x22fba1(0xc1)])return a85_0x54212b(EnhancedGuidedCreate,{'onCreate':_0x572160,'env':_0x2ec990['env']});if(_0x35de4f)return a85_0x2dd0f5(a85_0x4dada8,{'children':[a85_0x2dd0f5(Box,{'marginTop':0x1,'children':[a85_0x54212b(Box,{'width':'1'}),a85_0x54212b(Text,{'color':_0x22fba1(0xb5),'children':_0x22fba1(0xac)}),a85_0x54212b(Text,{'children':'Project\x20name:\x20'}),a85_0x54212b(Text,{'color':_0x22fba1(0xb5),'children':_0x31add8?.['projectName']}),_0x31add8?.['appCode']&&a85_0x2dd0f5(a85_0x4dada8,{'children':[a85_0x54212b(Text,{'children':_0x22fba1(0xa1)}),a85_0x54212b(Text,{'color':_0x22fba1(0xad),'children':_0x31add8['appCode']})]})]}),a85_0x54212b(TaskRunning,{..._0x27cb41}),a85_0x54212b(TaskRunning,{..._0x231d32}),a85_0x54212b(TaskRunning,{..._0x2e4795})]});if(_0x313f1c){const _0x4dfa70=_0x24309e&&_0x24309e[_0x22fba1(0xc6)]>0x0,_0x2f34d3=_0x4dfa70||_0x19eaa5;let _0xecea61=0x1;const _0x448e71=_0x2f34d3?_0xecea61++:_0xecea61+0x2,_0x44f59a=_0x2f34d3?_0xecea61:_0xecea61+0x3;return a85_0x2dd0f5(a85_0x4dada8,{'children':[a85_0x2dd0f5(Box,{'marginTop':0x1,'children':[a85_0x54212b(Box,{'width':'1'}),a85_0x54212b(Text,{'color':_0x22fba1(0xb5),'children':_0x22fba1(0xac)}),a85_0x54212b(Text,{'children':'Project\x20name:\x20'}),a85_0x54212b(Text,{'color':_0x22fba1(0xb5),'children':_0x31add8?.[_0x22fba1(0x7f)]}),_0x31add8?.[_0x22fba1(0xa2)]&&a85_0x2dd0f5(a85_0x4dada8,{'children':[a85_0x54212b(Text,{'children':'\x20|\x20AppCode:\x20'}),a85_0x54212b(Text,{'color':_0x22fba1(0xad),'children':_0x31add8[_0x22fba1(0xa2)]})]})]}),a85_0x54212b(TaskFinished,{..._0x27cb41}),a85_0x54212b(TaskFinished,{..._0x231d32}),a85_0x54212b(TaskFinished,{..._0x2e4795}),_0x4dfa70&&a85_0x2dd0f5(a85_0x4dada8,{'children':[a85_0x54212b(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a85_0x54212b(Text,{'color':_0x22fba1(0xb5),'children':'─'[_0x22fba1(0xb6)](0x3c)})}),a85_0x54212b(Box,{'marginTop':0x1,'children':a85_0x54212b(Text,{'color':_0x22fba1(0xb5),'bold':!![],'children':_0x22fba1(0x98)})}),_0x24309e[_0x22fba1(0xd2)]((_0x5e692f,_0x437cb4)=>a85_0x54212b(Box,{'marginLeft':0x2,'children':a85_0x2dd0f5(Text,{'color':_0x5e692f[_0x22fba1(0xc9)]===_0x22fba1(0xcc)?_0x22fba1(0xa3):_0x5e692f[_0x22fba1(0xc9)]===_0x22fba1(0x8e)?_0x22fba1(0x93):_0x22fba1(0x9e),'children':[_0x5e692f['ide'],':\x20',_0x5e692f['message']]})},_0x22fba1(0xab)+_0x437cb4))]}),a85_0x54212b(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a85_0x54212b(Text,{'color':_0x22fba1(0xb5),'children':'─'[_0x22fba1(0xb6)](0x3c)})}),a85_0x54212b(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a85_0x54212b(Text,{'color':_0x22fba1(0xad),'bold':!![],'children':_0x22fba1(0x81)})}),a85_0x2dd0f5(Box,{'marginLeft':0x2,'flexDirection':_0x22fba1(0x8a),'children':[!_0x2f34d3&&a85_0x2dd0f5(a85_0x4dada8,{'children':[a85_0x2dd0f5(Box,{'children':[a85_0x54212b(Text,{'color':_0x22fba1(0xb5),'children':_0x22fba1(0xbe)}),a85_0x54212b(Text,{'color':_0x22fba1(0xa3),'children':'Install\x20AI\x20Skills:\x20'}),a85_0x54212b(Text,{'color':'cyan','bold':!![],'children':NPX_SKILLS_ADD_COMMAND_LINE})]}),_0x31add8?.['appCode']&&a85_0x2dd0f5(Box,{'marginTop':0x1,'children':[a85_0x54212b(Text,{'color':_0x22fba1(0x93),'children':_0x22fba1(0x9f)}),a85_0x54212b(Text,{'color':_0x22fba1(0xa3),'children':_0x22fba1(0xb0)}),a85_0x54212b(Text,{'color':'cyan','bold':!![],'children':_0x22fba1(0x7e)})]})]}),a85_0x2dd0f5(Box,{'marginTop':_0x2f34d3?0x0:0x1,'children':[a85_0x2dd0f5(Text,{'color':_0x2f34d3?_0x22fba1(0xb5):_0x22fba1(0x93),'children':[_0x2f34d3?'1':_0x31add8?.[_0x22fba1(0xa2)]?'3':'2','.','\x20']}),a85_0x54212b(Text,{'color':_0x22fba1(0xa3),'children':_0x22fba1(0x8b)}),a85_0x54212b(Text,{'color':_0x22fba1(0xad),'bold':!![],'children':_0x22fba1(0xbb)+_0x31add8?.['projectName']+'\x20&&\x20rabetbase\x20start'})]}),_0x31add8?.[_0x22fba1(0xa2)]&&!_0x31add8?.[_0x22fba1(0xbf)]&&a85_0x2dd0f5(Box,{'children':[a85_0x2dd0f5(Text,{'color':_0x2f34d3?_0x22fba1(0xb5):_0x22fba1(0x93),'children':[_0x2f34d3?'2':'4','.','\x20']}),a85_0x54212b(Text,{'color':_0x22fba1(0xa3),'children':_0x22fba1(0x82)}),a85_0x54212b(Text,{'color':_0x22fba1(0xad),'bold':!![],'children':_0x22fba1(0xc0)})]})]}),a85_0x54212b(Box,{'marginTop':0x1,'children':a85_0x54212b(Text,{'color':'green','children':'─'[_0x22fba1(0xb6)](0x3c)})})]});}return null;}
1
+ (function(_0x142303,_0x1cef2d){const _0x48ad3b=a85_0x374d,_0x2cd0b0=_0x142303();while(!![]){try{const _0x3969e3=-parseInt(_0x48ad3b(0x94))/0x1*(parseInt(_0x48ad3b(0xbe))/0x2)+-parseInt(_0x48ad3b(0xb5))/0x3+parseInt(_0x48ad3b(0xba))/0x4*(-parseInt(_0x48ad3b(0xc4))/0x5)+-parseInt(_0x48ad3b(0xc9))/0x6*(-parseInt(_0x48ad3b(0x98))/0x7)+parseInt(_0x48ad3b(0xa0))/0x8+parseInt(_0x48ad3b(0xdd))/0x9+parseInt(_0x48ad3b(0xc8))/0xa*(parseInt(_0x48ad3b(0xb3))/0xb);if(_0x3969e3===_0x1cef2d)break;else _0x2cd0b0['push'](_0x2cd0b0['shift']());}catch(_0x6a6974){_0x2cd0b0['push'](_0x2cd0b0['shift']());}}}(a85_0x4810,0xb84df));function a85_0x374d(_0x21ab6c,_0x14ce69){_0x21ab6c=_0x21ab6c-0x7e;const _0x481098=a85_0x4810();let _0x374d89=_0x481098[_0x21ab6c];return _0x374d89;}import{jsx as a85_0xfd2ba4,Fragment as a85_0x59aae5,jsxs as a85_0x324d2e}from'react/jsx-runtime';import a85_0x2e6014 from'path';import a85_0x5a8124 from'fs';import{fileURLToPath}from'node:url';import{Box,Text}from'ink';import{useEffect,useState}from'react';import{EnhancedGuidedCreate}from'./enhanced-guided-create.js';import{pullApiSilent}from'../api/pull-silent.js';import{readConfig}from'../utils/config.js';function a85_0x4810(){const _0x536612=['324588TicMZy','currentVersion','1185639jwseou','parse','mcp-','setLogPath','\x20|\x20AppCode:\x20','2972QimdFB','√\x20API\x20configuration\x20pulled\x20successfully','dirname','更新\x20package.json\x20name','480982YVNGOY','Start\x20project:','cd\x20','map','*\x20Installing\x20AI\x20Skills\x20via\x20npx\x20skills...','join','7555TdkRJv','projectName','readFileSync','version','430Laoscr','6420GXCsbu','test','projectCode','Project\x20name\x20contains\x20invalid\x20characters.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','\x20Generated\x20by\x20rabetbase\x20cli\x20','配置应用AppCode:\x20','API\x20配置拉取异常','env','*\x20Pulling\x20API\x20configuration...','manual','info','W_OK','CLI\x20版本检查','error','repeat','√\x20Configuration\x20file\x20created,\x20AppCode:\x20','√\x20Lovrabet\x20MCP\x20and\x20Skill\x20configuration\x20completed','skipped','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','message','3984255uZqIfW','ide','doTask','trim','red','accessSync','utf8','create','white','status','Skills\x20installed\x20and\x20MCP\x20configured','cursor','appCode','Cursor','log','column','开始创建项目:\x20','配置应用AppCode失败','Project\x20directory\x20','then','Install\x20AI\x20Skills:\x20','length','Pull\x20API\x20configuration:','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','cwd','package.json','stringify','*\x20Configuring\x20MCP...','\x20\x20✗\x20MCP\x20Cursor:\x20','green','resolve','rmSync','\x20√\x20','existsSync','1JWAGRM','更新\x20package.json\x20失败','rabetbase\x20api\x20pull','API\x20配置拉取失败:\x20','3066gololX','constants','\x20already\x20exists,\x20please\x20use\x20a\x20different\x20name','\x20\x20(Skipped\x20npx;\x20assuming\x20skills\x20are\x20already\x20installed)','warn','success','production','toLocaleString','2664712RhTIxb','🚀\x20Next\x20Steps:','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','../..','清理项目目录失败:\x20','inherit','Project\x20name\x20cannot\x20be\x20empty','项目创建失败:\x20','*\x20Configuring\x20AppCode\x20for\x20project\x20','pullApi','cyan','rabetbase\x20mcp\x20install','needsUpgrade','Project\x20name:\x20','stableVersion','1.0.0','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','Configure\x20MCP\x20server:\x20','yellow'];a85_0x4810=function(){return _0x536612;};return a85_0x4810();}import{writeConfigFile,NEW_CONFIG_NAME}from'../context.js';import{useCopyProjectTemplate}from'./use-copy-project-template.js';import{useInstallDependencies}from'./use-install-dependencies.js';import{useFormatCode}from'./use-format-code.js';import{TaskFinished}from'./task-finished.js';import{TaskRunning}from'./task-running.js';import{logger}from'../utils/logger.js';import{configureMcp}from'../ai-setup/config.js';import{runNpxSkillsAdd,NPX_SKILLS_ADD_COMMAND_LINE}from'../skills/npx-skills-add.js';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';export function CreateApp(_0x4d4dbf){const _0xd3d093=a85_0x374d,[_0x29c99e,_0x57f517]=useState(![]),[_0x11b197,_0x17c1c0]=useState(![]),[_0x364b17,_0x374cff]=useState(null),[_0x3df9d2,_0x22d24a]=useState(null),[_0x5d669c,_0x2d0399]=useState(![]),_0x9637b1=useCopyProjectTemplate(),_0xefa9b3=useInstallDependencies(),_0x82bc06=useFormatCode();useEffect(()=>{const _0x55e6b3=a85_0x374d;checkCliVersion()[_0x55e6b3(0x85)](_0x15a58d=>{const _0x378227=_0x55e6b3;_0x15a58d[_0x378227(0xac)]&&(printCliUpgradeWarning(_0x15a58d),logger[_0x378227(0xd3)](_0x378227(0xe4),_0x378227(0xd5),{'currentVersion':_0x15a58d[_0x378227(0xb4)],'stableVersion':_0x15a58d[_0x378227(0xae)],'needsUpgrade':_0x15a58d[_0x378227(0xac)]}));});},[]);const _0xb87ae9=async _0xdc5c2e=>{const _0x318eaf=a85_0x374d;if(!_0xdc5c2e[_0x318eaf(0xc5)]||_0xdc5c2e['projectName'][_0x318eaf(0xe0)]()===''){console[_0x318eaf(0xd6)](_0x318eaf(0xa6));return;}const _0xce1e7f=/[<>:"|?*\x00-\x1f\x7f]/;if(_0xce1e7f[_0x318eaf(0xca)](_0xdc5c2e[_0x318eaf(0xc5)])){console[_0x318eaf(0xd6)](_0x318eaf(0xcc));return;}if(_0xdc5c2e[_0x318eaf(0xc5)]['length']>0x64){console[_0x318eaf(0xd6)](_0x318eaf(0x89));return;}const _0x350e69=a85_0x2e6014[_0x318eaf(0x90)](process[_0x318eaf(0x8a)](),_0xdc5c2e[_0x318eaf(0xc5)]);if(a85_0x5a8124['existsSync'](_0x350e69)){console[_0x318eaf(0xd6)](_0x318eaf(0x84)+_0xdc5c2e[_0x318eaf(0xc5)]+_0x318eaf(0x9a));return;}try{const _0x497cb=a85_0x2e6014['dirname'](_0x350e69);a85_0x5a8124[_0x318eaf(0xe2)](_0x497cb,a85_0x5a8124[_0x318eaf(0x99)][_0x318eaf(0xd4)]);}catch(_0x91b8e8){console[_0x318eaf(0xd6)](_0x318eaf(0xa2));return;}_0x374cff(_0xdc5c2e),_0x57f517(!![]),logger[_0x318eaf(0xb8)](_0x350e69),logger[_0x318eaf(0xd3)]('create',_0x318eaf(0x82)+_0xdc5c2e[_0x318eaf(0xc5)],{'projectDir':_0x350e69,'appCode':_0xdc5c2e[_0x318eaf(0x7e)]});try{await _0x9637b1[_0x318eaf(0xdf)](_0xdc5c2e[_0x318eaf(0xc5)]),await _0xe01da0(_0xdc5c2e[_0x318eaf(0xc5)]),await _0xefa9b3[_0x318eaf(0xdf)](_0xdc5c2e[_0x318eaf(0xc5)]),await _0x82bc06[_0x318eaf(0xdf)](_0xdc5c2e[_0x318eaf(0xc5)]),await _0x543558(_0xdc5c2e[_0x318eaf(0xc5)],_0xdc5c2e[_0x318eaf(0x7e)]||'',_0xdc5c2e['env']);if(_0xdc5c2e[_0x318eaf(0xa9)]&&_0xdc5c2e[_0x318eaf(0x7e)]){console[_0x318eaf(0x80)](_0x318eaf(0xd1));try{const _0x163bc4=await pullApiSilent(_0xdc5c2e[_0x318eaf(0x7e)],_0x4d4dbf['cookie']||'',undefined,_0x350e69,_0xdc5c2e['env']);_0x163bc4?(console[_0x318eaf(0x80)](_0x318eaf(0xbb)),logger[_0x318eaf(0xd3)](_0x318eaf(0xe4),'API\x20配置拉取成功:\x20'+_0xdc5c2e[_0x318eaf(0x7e)])):(console[_0x318eaf(0x80)]('!\x20API\x20configuration\x20pull\x20failed,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull'),logger[_0x318eaf(0x9c)]('create',_0x318eaf(0x97)+_0xdc5c2e[_0x318eaf(0x7e)]));}catch(_0x549880){console[_0x318eaf(0x80)]('!\x20API\x20configuration\x20pull\x20error,\x20project\x20created,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull'),logger[_0x318eaf(0x9c)](_0x318eaf(0xe4),_0x318eaf(0xcf),{'error':_0x549880 instanceof Error?_0x549880['message']:String(_0x549880)});}}const _0x149e9f=[];let _0x402fb8=![];if(_0xdc5c2e['setupMcp']&&_0xdc5c2e['appCode']){console[_0x318eaf(0x80)](_0x318eaf(0xc2));try{const _0x559bf0=runNpxSkillsAdd(_0x350e69,{'stdio':_0x318eaf(0xa5)});_0x402fb8=_0x559bf0['ok'],_0x559bf0[_0x318eaf(0xda)]&&console[_0x318eaf(0x80)](_0x318eaf(0x9b));}catch(_0x5d9e25){logger[_0x318eaf(0x9c)](_0x318eaf(0xe4),'Skills\x20安装异常,继续配置\x20MCP',{'error':_0x5d9e25 instanceof Error?_0x5d9e25[_0x318eaf(0xdc)]:String(_0x5d9e25)});}console[_0x318eaf(0x80)](_0x318eaf(0x8d));const _0x22054a=_0x318eaf(0xe8);try{const _0x5887aa=await configureMcp(_0x22054a,_0x350e69);_0x149e9f['push']({'ide':_0x318eaf(0x7f),'status':_0x5887aa[_0x318eaf(0xe6)],'message':_0x5887aa[_0x318eaf(0xdc)]}),console[_0x318eaf(0x80)]('\x20\x20'+(_0x5887aa['status']===_0x318eaf(0x9d)?'✓':_0x5887aa[_0x318eaf(0xe6)]===_0x318eaf(0xd2)?'⚠️':'✗')+'\x20MCP\x20Cursor:\x20'+_0x5887aa[_0x318eaf(0xdc)]);}catch(_0x3e134d){_0x149e9f['push']({'ide':_0x318eaf(0x7f),'status':_0x318eaf(0xd6),'message':_0x3e134d instanceof Error?_0x3e134d[_0x318eaf(0xdc)]:String(_0x3e134d)}),console['log'](_0x318eaf(0x8e)+(_0x3e134d instanceof Error?_0x3e134d[_0x318eaf(0xdc)]:String(_0x3e134d)));}}_0x2d0399(_0x402fb8),_0x22d24a(_0x149e9f[_0x318eaf(0x87)]>0x0?_0x149e9f:null),console[_0x318eaf(0x80)](_0x318eaf(0xd9)),logger['success'](_0x318eaf(0xe4),'项目创建完成:\x20'+_0xdc5c2e['projectName']),_0x17c1c0(!![]),_0x57f517(![]);}catch(_0xa3f32c){logger[_0x318eaf(0xd6)](_0x318eaf(0xe4),_0x318eaf(0xa7)+_0xdc5c2e[_0x318eaf(0xc5)],{'error':_0xa3f32c instanceof Error?_0xa3f32c[_0x318eaf(0xdc)]:String(_0xa3f32c)});try{a85_0x5a8124[_0x318eaf(0x93)](_0x350e69)&&(console[_0x318eaf(0x80)](_0x318eaf(0xdb)+_0x350e69),a85_0x5a8124[_0x318eaf(0x91)](_0x350e69,{'recursive':!![],'force':!![]}));}catch(_0x5e611b){logger[_0x318eaf(0x9c)](_0x318eaf(0xe4),_0x318eaf(0xa4)+_0x350e69);}_0x57f517(![]),console['error']('×\x20Project\x20creation\x20failed:\x20'+(_0xa3f32c instanceof Error?_0xa3f32c['message']:String(_0xa3f32c)));}},_0x379aaa=async _0x22d913=>{const _0x4d9b73=a85_0x374d;await _0xb87ae9({'projectName':_0x22d913,'env':_0x4d4dbf[_0x4d9b73(0xd0)]});},_0xe01da0=async _0x1234cf=>{const _0x5cd7f2=a85_0x374d,_0x28c8d2=a85_0x2e6014[_0x5cd7f2(0x90)](process[_0x5cd7f2(0x8a)](),_0x1234cf),_0xaead1a=a85_0x2e6014[_0x5cd7f2(0xc3)](_0x28c8d2,_0x5cd7f2(0x8b));try{console[_0x5cd7f2(0x80)](_0x5cd7f2(0xb0));const _0x13eaf8=fileURLToPath(import.meta.url),_0x3c56df=a85_0x2e6014['resolve'](a85_0x2e6014['dirname'](_0x13eaf8),_0x5cd7f2(0xa3)),_0x56b1db=a85_0x2e6014[_0x5cd7f2(0xc3)](_0x3c56df,'package.json');let _0x541bd2='1.0.0';try{const _0xe9f0bd=JSON[_0x5cd7f2(0xb6)](a85_0x5a8124[_0x5cd7f2(0xc6)](_0x56b1db,'utf8'));_0x541bd2=_0xe9f0bd['version']||_0x5cd7f2(0xaf);}catch(_0x5bf9e1){}const _0x57586b=a85_0x5a8124[_0x5cd7f2(0xc6)](_0xaead1a,_0x5cd7f2(0xe3)),_0x20ce8a=JSON[_0x5cd7f2(0xb6)](_0x57586b);_0x20ce8a['name']=_0x1234cf,_0x20ce8a['description']=_0x1234cf+_0x5cd7f2(0xcd)+_0x541bd2,a85_0x5a8124['writeFileSync'](_0xaead1a,JSON[_0x5cd7f2(0x8c)](_0x20ce8a,null,0x2)+'\x0a','utf8'),console[_0x5cd7f2(0x80)]('√\x20package.json\x20updated:\x20name='+_0x1234cf),logger[_0x5cd7f2(0xd3)](_0x5cd7f2(0xe4),_0x5cd7f2(0xbd));}catch(_0x2a3be1){logger[_0x5cd7f2(0xd6)](_0x5cd7f2(0xe4),_0x5cd7f2(0x95));throw _0x2a3be1;}},_0x543558=async(_0xfff68,_0xdafced,_0x4b704b)=>{const _0x5e7305=a85_0x374d,_0x3a0617=a85_0x2e6014[_0x5e7305(0x90)](process[_0x5e7305(0x8a)](),_0xfff68),_0x3021a3=a85_0x2e6014[_0x5e7305(0xc3)](_0x3a0617,NEW_CONFIG_NAME);try{_0xdafced?console[_0x5e7305(0x80)](_0x5e7305(0xa8)+_0xfff68+':\x20'+_0xdafced):console[_0x5e7305(0x80)]('*\x20Creating\x20configuration\x20file\x20for\x20project\x20'+_0xfff68);const _0x530b3c=fileURLToPath(import.meta.url),_0x2b186f=a85_0x2e6014[_0x5e7305(0x90)](a85_0x2e6014[_0x5e7305(0xbc)](_0x530b3c),'../..'),_0x1b1c3b=a85_0x2e6014[_0x5e7305(0xc3)](_0x2b186f,_0x5e7305(0x8b));let _0x4d2cf7='1.0.0';try{const _0x341cd5=JSON[_0x5e7305(0xb6)](a85_0x5a8124[_0x5e7305(0xc6)](_0x1b1c3b,_0x5e7305(0xe3)));_0x4d2cf7=_0x341cd5[_0x5e7305(0xc7)]||_0x5e7305(0xaf);}catch{}const _0x422c1e=readConfig(),_0x196686=typeof _0x422c1e['env']==='string'?_0x422c1e[_0x5e7305(0xd0)]:undefined,{app:_0x4478cd,appcode:_0x3aaaf6,..._0x73aff8}=_0x422c1e,_0x40db3f={..._0x73aff8,'appcode':_0xdafced||'','env':_0x4b704b||_0x196686||_0x5e7305(0x9e),'createdAt':new Date()[_0x5e7305(0x9f)](),'version':_0x4d2cf7};writeConfigFile(_0x3021a3,_0x40db3f),_0xdafced?console[_0x5e7305(0x80)](_0x5e7305(0xd8)+_0xdafced):console['log']('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27rabetbase\x20config\x20set\x20appcode\x20<app-code>\x27'),logger[_0x5e7305(0xd3)](_0x5e7305(0xe4),_0x5e7305(0xce)+_0xdafced);}catch(_0x291b58){logger['error']('create',_0x5e7305(0x83));}};useEffect(()=>{const _0x5dc8cb=a85_0x374d;_0x4d4dbf[_0x5dc8cb(0xcb)]&&_0x379aaa(_0x4d4dbf[_0x5dc8cb(0xcb)]);},[_0x4d4dbf[_0xd3d093(0xcb)]]);if(!_0x29c99e&&!_0x11b197&&!_0x4d4dbf[_0xd3d093(0xcb)])return a85_0xfd2ba4(EnhancedGuidedCreate,{'onCreate':_0xb87ae9,'env':_0x4d4dbf[_0xd3d093(0xd0)]});if(_0x29c99e)return a85_0x324d2e(a85_0x59aae5,{'children':[a85_0x324d2e(Box,{'marginTop':0x1,'children':[a85_0xfd2ba4(Box,{'width':'1'}),a85_0xfd2ba4(Text,{'color':_0xd3d093(0x8f),'children':_0xd3d093(0x92)}),a85_0xfd2ba4(Text,{'children':_0xd3d093(0xad)}),a85_0xfd2ba4(Text,{'color':_0xd3d093(0x8f),'children':_0x364b17?.[_0xd3d093(0xc5)]}),_0x364b17?.['appCode']&&a85_0x324d2e(a85_0x59aae5,{'children':[a85_0xfd2ba4(Text,{'children':_0xd3d093(0xb9)}),a85_0xfd2ba4(Text,{'color':_0xd3d093(0xaa),'children':_0x364b17[_0xd3d093(0x7e)]})]})]}),a85_0xfd2ba4(TaskRunning,{..._0x9637b1}),a85_0xfd2ba4(TaskRunning,{..._0xefa9b3}),a85_0xfd2ba4(TaskRunning,{..._0x82bc06})]});if(_0x11b197){const _0x1c5831=_0x3df9d2&&_0x3df9d2[_0xd3d093(0x87)]>0x0,_0x76565d=_0x1c5831||_0x5d669c;let _0x4feabe=0x1;const _0x2ab682=_0x76565d?_0x4feabe++:_0x4feabe+0x2,_0x463ea6=_0x76565d?_0x4feabe:_0x4feabe+0x3;return a85_0x324d2e(a85_0x59aae5,{'children':[a85_0x324d2e(Box,{'marginTop':0x1,'children':[a85_0xfd2ba4(Box,{'width':'1'}),a85_0xfd2ba4(Text,{'color':_0xd3d093(0x8f),'children':_0xd3d093(0x92)}),a85_0xfd2ba4(Text,{'children':_0xd3d093(0xad)}),a85_0xfd2ba4(Text,{'color':_0xd3d093(0x8f),'children':_0x364b17?.[_0xd3d093(0xc5)]}),_0x364b17?.[_0xd3d093(0x7e)]&&a85_0x324d2e(a85_0x59aae5,{'children':[a85_0xfd2ba4(Text,{'children':_0xd3d093(0xb9)}),a85_0xfd2ba4(Text,{'color':_0xd3d093(0xaa),'children':_0x364b17[_0xd3d093(0x7e)]})]})]}),a85_0xfd2ba4(TaskFinished,{..._0x9637b1}),a85_0xfd2ba4(TaskFinished,{..._0xefa9b3}),a85_0xfd2ba4(TaskFinished,{..._0x82bc06}),_0x1c5831&&a85_0x324d2e(a85_0x59aae5,{'children':[a85_0xfd2ba4(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a85_0xfd2ba4(Text,{'color':'green','children':'─'[_0xd3d093(0xd7)](0x3c)})}),a85_0xfd2ba4(Box,{'marginTop':0x1,'children':a85_0xfd2ba4(Text,{'color':_0xd3d093(0x8f),'bold':!![],'children':_0xd3d093(0xe7)})}),_0x3df9d2[_0xd3d093(0xc1)]((_0x15218b,_0x5e5f25)=>a85_0xfd2ba4(Box,{'marginLeft':0x2,'children':a85_0x324d2e(Text,{'color':_0x15218b[_0xd3d093(0xe6)]===_0xd3d093(0x9d)?'white':_0x15218b[_0xd3d093(0xe6)]===_0xd3d093(0xd2)?_0xd3d093(0xb2):_0xd3d093(0xe1),'children':[_0x15218b[_0xd3d093(0xde)],':\x20',_0x15218b[_0xd3d093(0xdc)]]})},_0xd3d093(0xb7)+_0x5e5f25))]}),a85_0xfd2ba4(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a85_0xfd2ba4(Text,{'color':_0xd3d093(0x8f),'children':'─'[_0xd3d093(0xd7)](0x3c)})}),a85_0xfd2ba4(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a85_0xfd2ba4(Text,{'color':'cyan','bold':!![],'children':_0xd3d093(0xa1)})}),a85_0x324d2e(Box,{'marginLeft':0x2,'flexDirection':_0xd3d093(0x81),'children':[!_0x76565d&&a85_0x324d2e(a85_0x59aae5,{'children':[a85_0x324d2e(Box,{'children':[a85_0xfd2ba4(Text,{'color':_0xd3d093(0x8f),'children':'1.\x20'}),a85_0xfd2ba4(Text,{'color':_0xd3d093(0xe5),'children':_0xd3d093(0x86)}),a85_0xfd2ba4(Text,{'color':'cyan','bold':!![],'children':NPX_SKILLS_ADD_COMMAND_LINE})]}),_0x364b17?.[_0xd3d093(0x7e)]&&a85_0x324d2e(Box,{'marginTop':0x1,'children':[a85_0xfd2ba4(Text,{'color':'yellow','children':'2.\x20'}),a85_0xfd2ba4(Text,{'color':'white','children':_0xd3d093(0xb1)}),a85_0xfd2ba4(Text,{'color':_0xd3d093(0xaa),'bold':!![],'children':_0xd3d093(0xab)})]})]}),a85_0x324d2e(Box,{'marginTop':_0x76565d?0x0:0x1,'children':[a85_0x324d2e(Text,{'color':_0x76565d?'green':_0xd3d093(0xb2),'children':[_0x76565d?'1':_0x364b17?.[_0xd3d093(0x7e)]?'3':'2','.','\x20']}),a85_0xfd2ba4(Text,{'color':_0xd3d093(0xe5),'children':_0xd3d093(0xbf)}),a85_0xfd2ba4(Text,{'color':_0xd3d093(0xaa),'bold':!![],'children':_0xd3d093(0xc0)+_0x364b17?.['projectName']+'\x20&&\x20rabetbase\x20start'})]}),_0x364b17?.[_0xd3d093(0x7e)]&&!_0x364b17?.['pullApi']&&a85_0x324d2e(Box,{'children':[a85_0x324d2e(Text,{'color':_0x76565d?_0xd3d093(0x8f):'yellow','children':[_0x76565d?'2':'4','.','\x20']}),a85_0xfd2ba4(Text,{'color':_0xd3d093(0xe5),'children':_0xd3d093(0x88)}),a85_0xfd2ba4(Text,{'color':_0xd3d093(0xaa),'bold':!![],'children':_0xd3d093(0x96)})]})]}),a85_0xfd2ba4(Box,{'marginTop':0x1,'children':a85_0xfd2ba4(Text,{'color':'green','children':'─'[_0xd3d093(0xd7)](0x3c)})})]});}return null;}
@@ -1 +1 @@
1
- (function(_0x46be0a,_0x558832){const _0x2760b9=a86_0x106a,_0x11fc0e=_0x46be0a();while(!![]){try{const _0x347431=parseInt(_0x2760b9(0x1af))/0x1*(parseInt(_0x2760b9(0x1a4))/0x2)+parseInt(_0x2760b9(0x1aa))/0x3+-parseInt(_0x2760b9(0x17d))/0x4*(-parseInt(_0x2760b9(0x183))/0x5)+-parseInt(_0x2760b9(0x19d))/0x6+parseInt(_0x2760b9(0x185))/0x7+-parseInt(_0x2760b9(0x19f))/0x8*(-parseInt(_0x2760b9(0x19b))/0x9)+-parseInt(_0x2760b9(0x17e))/0xa;if(_0x347431===_0x558832)break;else _0x11fc0e['push'](_0x11fc0e['shift']());}catch(_0x2858f7){_0x11fc0e['push'](_0x11fc0e['shift']());}}}(a86_0x415e,0x49dd6));import a86_0x30622e from'path';import{fileURLToPath}from'url';import a86_0x2cbbaa from'fs/promises';import{existsSync}from'fs';import{copyDirectory}from'../utils/copy-directory.js';import{exec}from'child_process';import{promisify}from'util';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';const execAsync=promisify(exec);function a86_0x106a(_0x5c80ef,_0x332e0b){_0x5c80ef=_0x5c80ef-0x17d;const _0x415e0f=a86_0x415e();let _0x106a35=_0x415e0f[_0x5c80ef];return _0x106a35;}function getTemplateDir(){const _0x588706=a86_0x106a,_0xdaa9ed=fileURLToPath(import.meta.url),_0x4b5565=a86_0x30622e['dirname'](_0xdaa9ed);return a86_0x30622e[_0x588706(0x1a7)](_0x4b5565,_0x588706(0x1a5));}export async function createProjectNonInteractive(_0x8e99d4,_0x5cf2b3){const _0x11090b=a86_0x106a,_0x28d870=await checkCliVersion();_0x28d870[_0x11090b(0x187)]&&printCliUpgradeWarning(_0x28d870);(!_0x8e99d4||_0x8e99d4['trim']()==='')&&(console[_0x11090b(0x180)](_0x11090b(0x198)),process[_0x11090b(0x19e)](0x1));const _0x46db79=/[<>:"|?*\x00-\x1f\x7f]/;_0x46db79['test'](_0x8e99d4)&&(console['error'](_0x11090b(0x1b0)),process[_0x11090b(0x19e)](0x1));_0x8e99d4[_0x11090b(0x1a9)]>0x64&&(console['error']('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters'),process[_0x11090b(0x19e)](0x1));const _0x5ab0ab=a86_0x30622e[_0x11090b(0x1a7)](process['cwd'](),_0x8e99d4);existsSync(_0x5ab0ab)&&(console[_0x11090b(0x180)]('Project\x20directory\x20'+_0x8e99d4+_0x11090b(0x1a6)),process[_0x11090b(0x19e)](0x1));try{const _0x43ecf9=a86_0x30622e[_0x11090b(0x1ad)](_0x5ab0ab);await a86_0x2cbbaa['access'](_0x43ecf9,a86_0x2cbbaa['constants'][_0x11090b(0x181)]);}catch(_0x20b1a7){console[_0x11090b(0x180)](_0x11090b(0x1ab)),process[_0x11090b(0x19e)](0x1);}try{console[_0x11090b(0x18a)](_0x11090b(0x1a2)+_0x8e99d4+_0x11090b(0x18d));const _0x2e107d=getTemplateDir();await copyDirectory(_0x2e107d,_0x5ab0ab),console[_0x11090b(0x18a)](_0x11090b(0x1a0)),await updatePackageJsonName(_0x8e99d4),console['log']('\x20\x20√\x20package.json\x20updated'),console[_0x11090b(0x18a)](_0x11090b(0x192)),console[_0x11090b(0x18a)](_0x11090b(0x1a1)),await formatCode(_0x5ab0ab),console[_0x11090b(0x18a)](_0x11090b(0x1ae)),await configureAppEnv(_0x8e99d4,_0x5cf2b3),console['log'](_0x11090b(0x193)),console[_0x11090b(0x18a)](_0x11090b(0x18c)+_0x8e99d4+_0x11090b(0x189)),console[_0x11090b(0x18a)](_0x11090b(0x194)+_0x8e99d4),console[_0x11090b(0x18a)](_0x11090b(0x197));}catch(_0x2cf084){const _0x44b0d9=_0x2cf084 instanceof Error?_0x2cf084[_0x11090b(0x184)]:String(_0x2cf084);try{existsSync(_0x5ab0ab)&&await a86_0x2cbbaa['rm'](_0x5ab0ab,{'recursive':!![],'force':!![]});}catch{}console[_0x11090b(0x180)]('×\x20Project\x20creation\x20failed:\x20'+_0x44b0d9),process['exit'](0x1);}}async function updatePackageJsonName(_0x4c80b6){const _0x4d05e8=a86_0x106a,_0x169797=a86_0x30622e['resolve'](process[_0x4d05e8(0x190)](),_0x4c80b6),_0x1c919c=a86_0x30622e[_0x4d05e8(0x195)](_0x169797,_0x4d05e8(0x199)),_0x347d05=await a86_0x2cbbaa[_0x4d05e8(0x18e)](_0x1c919c,_0x4d05e8(0x18b)),_0x241eb0=JSON[_0x4d05e8(0x19a)](_0x347d05);_0x241eb0[_0x4d05e8(0x1ac)]=_0x4c80b6,_0x241eb0[_0x4d05e8(0x196)]=_0x4d05e8(0x182),await a86_0x2cbbaa[_0x4d05e8(0x19c)](_0x1c919c,JSON['stringify'](_0x241eb0,null,0x2)+'\x0a');}async function installDependencies(_0x491fcf){const _0x306402=a86_0x106a,_0x280c17=detectPackageManager(),_0x402c90=_0x280c17+'\x20install';try{await execAsync(_0x402c90,{'cwd':_0x491fcf});}catch(_0x28411d){throw new Error(_0x306402(0x17f)+_0x28411d);}}function detectPackageManager(){const _0x4ff57d=a86_0x106a;try{return execAsync(_0x4ff57d(0x186),{}),_0x4ff57d(0x191);}catch{return _0x4ff57d(0x18f);}}async function formatCode(_0x2ad706){const _0x1947df=a86_0x106a;try{await execAsync(_0x1947df(0x188),{'cwd':_0x2ad706});}catch{}}async function configureAppEnv(_0x412841,_0x1259ab){const _0x2bfb7e=a86_0x106a,_0x2e8024=a86_0x30622e[_0x2bfb7e(0x1a7)](process[_0x2bfb7e(0x190)](),_0x412841),_0x92a4b2=a86_0x30622e[_0x2bfb7e(0x195)](_0x2e8024,'rabetbase.config.json');let _0x30c42f={};if(existsSync(_0x92a4b2)){const _0x46b611=await a86_0x2cbbaa[_0x2bfb7e(0x18e)](_0x92a4b2,_0x2bfb7e(0x18b));_0x30c42f=JSON[_0x2bfb7e(0x19a)](_0x46b611);}_0x1259ab&&(_0x30c42f[_0x2bfb7e(0x1a8)]=_0x1259ab),await a86_0x2cbbaa[_0x2bfb7e(0x19c)](_0x92a4b2,JSON[_0x2bfb7e(0x1a3)](_0x30c42f,null,0x2)+'\x0a');}function a86_0x415e(){const _0x2af6ac=['stringify','1083674PIwMGO','../../templates/projects/sub-app-react-demo','\x20already\x20exists,\x20please\x20use\x20a\x20different\x20name','resolve','env','length','1252137cUcWgO','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','name','dirname','\x20\x20√\x20Code\x20formatted','1uzfyUa','Project\x20name\x20contains\x20invalid\x20characters.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','4OwqLSm','8391020YcCleH','依赖安装失败:\x20','error','W_OK','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','1048755IdDcQn','message','1866410WsZJIu','bun\x20--version','needsUpgrade','bun\x20run\x20format','\x20created\x20successfully!','log','utf-8','\x0a√\x20Project\x20','...','readFile','npm','cwd','bun','\x20\x20Installing\x20dependencies...','\x20\x20√\x20Environment\x20configured','\x0a\x20\x20cd\x20','join','description','\x20\x20rabetbase\x20start\x0a','Project\x20name\x20cannot\x20be\x20empty','package.json','parse','9muxFKV','writeFile','1800846ONtLoF','exit','49568AqBKqw','\x20\x20√\x20Project\x20template\x20created','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','*\x20Creating\x20project\x20'];a86_0x415e=function(){return _0x2af6ac;};return a86_0x415e();}
1
+ (function(_0x421035,_0x30085c){const _0x4dadd3=a86_0x50d5,_0x4d0892=_0x421035();while(!![]){try{const _0x468e02=parseInt(_0x4dadd3(0xa3))/0x1*(parseInt(_0x4dadd3(0x93))/0x2)+-parseInt(_0x4dadd3(0x79))/0x3*(-parseInt(_0x4dadd3(0xac))/0x4)+-parseInt(_0x4dadd3(0x91))/0x5+parseInt(_0x4dadd3(0xaa))/0x6+parseInt(_0x4dadd3(0xa9))/0x7*(parseInt(_0x4dadd3(0x8c))/0x8)+parseInt(_0x4dadd3(0x7f))/0x9*(-parseInt(_0x4dadd3(0xa0))/0xa)+parseInt(_0x4dadd3(0x99))/0xb*(-parseInt(_0x4dadd3(0x7c))/0xc);if(_0x468e02===_0x30085c)break;else _0x4d0892['push'](_0x4d0892['shift']());}catch(_0x26dc14){_0x4d0892['push'](_0x4d0892['shift']());}}}(a86_0x5390,0x370ce));import a86_0xf75763 from'path';import{fileURLToPath}from'url';import a86_0x250abe from'fs/promises';import{existsSync}from'fs';import{copyDirectory}from'../utils/copy-directory.js';import{exec}from'child_process';import{promisify}from'util';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';const execAsync=promisify(exec);function a86_0x5390(){const _0x1024ca=['npm','bun','env','Project\x20name\x20cannot\x20be\x20empty','84742hlwhIZ','199584SUxvHQ','package.json','311252ZRoWxi','\x0a\x20\x20cd\x20','依赖安装失败:\x20','15WOCCpe','cwd','\x20\x20Installing\x20dependencies...','45888aJjUzd','log','Project\x20name\x20contains\x20invalid\x20characters.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','294741YocrFQ','constants','needsUpgrade','...','\x20\x20√\x20Environment\x20configured','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','join','bun\x20--version','error','W_OK','length','resolve','\x20\x20rabetbase\x20start\x0a','8WVuUkg','dirname','\x20already\x20exists,\x20please\x20use\x20a\x20different\x20name','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','utf-8','2067125rWmOcA','exit','668JpJrGx','*\x20Creating\x20project\x20','×\x20Project\x20creation\x20failed:\x20','test','\x20\x20√\x20package.json\x20updated','parse','66mPllVh','Project\x20directory\x20','message','trim','rabetbase.config.json','writeFile','readFile','20hJctik','name','\x20\x20√\x20Project\x20template\x20created','877cXeHEf','stringify'];a86_0x5390=function(){return _0x1024ca;};return a86_0x5390();}function getTemplateDir(){const _0x3655eb=a86_0x50d5,_0x315cd6=fileURLToPath(import.meta.url),_0x3dbc58=a86_0xf75763['dirname'](_0x315cd6);return a86_0xf75763[_0x3655eb(0x8a)](_0x3dbc58,'../../templates/projects/sub-app-react-demo');}export async function createProjectNonInteractive(_0x27698e,_0x4157d7){const _0x5638cd=a86_0x50d5,_0x33930d=await checkCliVersion();_0x33930d[_0x5638cd(0x81)]&&printCliUpgradeWarning(_0x33930d);(!_0x27698e||_0x27698e[_0x5638cd(0x9c)]()==='')&&(console[_0x5638cd(0x87)](_0x5638cd(0xa8)),process[_0x5638cd(0x92)](0x1));const _0x2f05a5=/[<>:"|?*\x00-\x1f\x7f]/;_0x2f05a5[_0x5638cd(0x96)](_0x27698e)&&(console[_0x5638cd(0x87)](_0x5638cd(0x7e)),process['exit'](0x1));_0x27698e[_0x5638cd(0x89)]>0x64&&(console['error']('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters'),process[_0x5638cd(0x92)](0x1));const _0x58330f=a86_0xf75763['resolve'](process[_0x5638cd(0x7a)](),_0x27698e);existsSync(_0x58330f)&&(console[_0x5638cd(0x87)](_0x5638cd(0x9a)+_0x27698e+_0x5638cd(0x8e)),process[_0x5638cd(0x92)](0x1));try{const _0xf4ea78=a86_0xf75763[_0x5638cd(0x8d)](_0x58330f);await a86_0x250abe['access'](_0xf4ea78,a86_0x250abe[_0x5638cd(0x80)][_0x5638cd(0x88)]);}catch(_0x3f0afc){console[_0x5638cd(0x87)](_0x5638cd(0x8f)),process['exit'](0x1);}try{console[_0x5638cd(0x7d)](_0x5638cd(0x94)+_0x27698e+_0x5638cd(0x82));const _0x380205=getTemplateDir();await copyDirectory(_0x380205,_0x58330f),console[_0x5638cd(0x7d)](_0x5638cd(0xa2)),await updatePackageJsonName(_0x27698e),console[_0x5638cd(0x7d)](_0x5638cd(0x97)),console[_0x5638cd(0x7d)](_0x5638cd(0x7b)),console[_0x5638cd(0x7d)](_0x5638cd(0x84)),await formatCode(_0x58330f),console[_0x5638cd(0x7d)]('\x20\x20√\x20Code\x20formatted'),await configureAppEnv(_0x27698e,_0x4157d7),console[_0x5638cd(0x7d)](_0x5638cd(0x83)),console[_0x5638cd(0x7d)]('\x0a√\x20Project\x20'+_0x27698e+'\x20created\x20successfully!'),console[_0x5638cd(0x7d)](_0x5638cd(0xad)+_0x27698e),console[_0x5638cd(0x7d)](_0x5638cd(0x8b));}catch(_0x1d5add){const _0x103296=_0x1d5add instanceof Error?_0x1d5add[_0x5638cd(0x9b)]:String(_0x1d5add);try{existsSync(_0x58330f)&&await a86_0x250abe['rm'](_0x58330f,{'recursive':!![],'force':!![]});}catch{}console[_0x5638cd(0x87)](_0x5638cd(0x95)+_0x103296),process['exit'](0x1);}}async function updatePackageJsonName(_0x205c3b){const _0x3aac9a=a86_0x50d5,_0x23c087=a86_0xf75763['resolve'](process['cwd'](),_0x205c3b),_0x3a14a8=a86_0xf75763[_0x3aac9a(0x85)](_0x23c087,_0x3aac9a(0xab)),_0x59789c=await a86_0x250abe[_0x3aac9a(0x9f)](_0x3a14a8,_0x3aac9a(0x90)),_0x47e3ec=JSON['parse'](_0x59789c);_0x47e3ec[_0x3aac9a(0xa1)]=_0x205c3b,_0x47e3ec['description']='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a86_0x250abe['writeFile'](_0x3a14a8,JSON[_0x3aac9a(0xa4)](_0x47e3ec,null,0x2)+'\x0a');}async function installDependencies(_0x362e68){const _0x5011c7=a86_0x50d5,_0x141473=detectPackageManager(),_0x424041=_0x141473+'\x20install';try{await execAsync(_0x424041,{'cwd':_0x362e68});}catch(_0x4987b3){throw new Error(_0x5011c7(0x78)+_0x4987b3);}}function a86_0x50d5(_0x3aa4db,_0x106d44){_0x3aa4db=_0x3aa4db-0x78;const _0x539018=a86_0x5390();let _0x50d5df=_0x539018[_0x3aa4db];return _0x50d5df;}function detectPackageManager(){const _0x2b289d=a86_0x50d5;try{return execAsync(_0x2b289d(0x86),{}),_0x2b289d(0xa6);}catch{return _0x2b289d(0xa5);}}async function formatCode(_0x5db1cd){try{await execAsync('bun\x20run\x20format',{'cwd':_0x5db1cd});}catch{}}async function configureAppEnv(_0x3e34f9,_0x5ec59f){const _0x3a2600=a86_0x50d5,_0x2ae296=a86_0xf75763[_0x3a2600(0x8a)](process[_0x3a2600(0x7a)](),_0x3e34f9),_0x157fce=a86_0xf75763[_0x3a2600(0x85)](_0x2ae296,_0x3a2600(0x9d));let _0x1b76e9={};if(existsSync(_0x157fce)){const _0x2643e1=await a86_0x250abe[_0x3a2600(0x9f)](_0x157fce,'utf-8');_0x1b76e9=JSON[_0x3a2600(0x98)](_0x2643e1);}_0x5ec59f&&(_0x1b76e9[_0x3a2600(0xa7)]=_0x5ec59f),await a86_0x250abe[_0x3a2600(0x9e)](_0x157fce,JSON[_0x3a2600(0xa4)](_0x1b76e9,null,0x2)+'\x0a');}
@@ -1 +1 @@
1
- function a87_0x4666(_0x298d1f,_0x461fa3){_0x298d1f=_0x298d1f-0x1ef;var _0x14268c=a87_0x1426();var _0x466680=_0x14268c[_0x298d1f];return _0x466680;}(function(_0xa8be04,_0x15606d){var _0x512e48=a87_0x4666,_0x13f5c6=_0xa8be04();while(!![]){try{var _0x3982ac=parseInt(_0x512e48(0x1f0))/0x1*(parseInt(_0x512e48(0x1ef))/0x2)+-parseInt(_0x512e48(0x1f4))/0x3+parseInt(_0x512e48(0x1f8))/0x4+-parseInt(_0x512e48(0x1f2))/0x5+-parseInt(_0x512e48(0x1f7))/0x6+parseInt(_0x512e48(0x1f9))/0x7+parseInt(_0x512e48(0x1f3))/0x8*(parseInt(_0x512e48(0x1f1))/0x9);if(_0x3982ac===_0x15606d)break;else _0x13f5c6['push'](_0x13f5c6['shift']());}catch(_0x1c4072){_0x13f5c6['push'](_0x13f5c6['shift']());}}}(a87_0x1426,0xb3730));import{jsx as a87_0x3039e0,jsxs as a87_0x3e75f6}from'react/jsx-runtime';import{Box,Text}from'ink';import{TaskTime}from'./task-time.js';function a87_0x1426(){var _0x16862e=['\x20√\x20','3207792pFoJWU','4623668zNDoQB','8221031xivPYa','green','8AbHNMO','48661qsLwMR','2430BPsceM','2297145cVffTw','5704agpTRM','2965257cDcCKz','taskName'];a87_0x1426=function(){return _0x16862e;};return a87_0x1426();}export function TaskFinished(_0x53ee29){var _0x1a08e9=a87_0x4666;return a87_0x3e75f6(Box,{'children':[a87_0x3039e0(Box,{'width':'1'}),a87_0x3039e0(Text,{'color':_0x1a08e9(0x1fa),'children':_0x1a08e9(0x1f6)}),a87_0x3039e0(Text,{'children':_0x53ee29[_0x1a08e9(0x1f5)]}),a87_0x3039e0(TaskTime,{'elapsed':_0x53ee29['elapsed']})]});}
1
+ (function(_0x79054a,_0x3b935e){var _0x2d1142=a87_0x55c7,_0x4f07ad=_0x79054a();while(!![]){try{var _0x3f416e=parseInt(_0x2d1142(0x126))/0x1+-parseInt(_0x2d1142(0x128))/0x2+-parseInt(_0x2d1142(0x130))/0x3*(parseInt(_0x2d1142(0x12e))/0x4)+parseInt(_0x2d1142(0x12d))/0x5*(-parseInt(_0x2d1142(0x129))/0x6)+-parseInt(_0x2d1142(0x12b))/0x7*(parseInt(_0x2d1142(0x127))/0x8)+-parseInt(_0x2d1142(0x12f))/0x9+parseInt(_0x2d1142(0x12a))/0xa;if(_0x3f416e===_0x3b935e)break;else _0x4f07ad['push'](_0x4f07ad['shift']());}catch(_0x14cd30){_0x4f07ad['push'](_0x4f07ad['shift']());}}}(a87_0x10b6,0x1bd15));import{jsx as a87_0x1135e5,jsxs as a87_0x34cd2f}from'react/jsx-runtime';function a87_0x10b6(){var _0x1ca0aa=['2412ZnCEcU','1915983HkwpMS','879HbWHtX','green','101860sLfeCK','15360yyDHif','154804cpHCTH','152700YprbDK','7263190dXUYru','252DWlooX','elapsed','35uTsaFM'];a87_0x10b6=function(){return _0x1ca0aa;};return a87_0x10b6();}function a87_0x55c7(_0x1ef97f,_0x4c5c73){_0x1ef97f=_0x1ef97f-0x125;var _0x10b613=a87_0x10b6();var _0x55c7e4=_0x10b613[_0x1ef97f];return _0x55c7e4;}import{Box,Text}from'ink';import{TaskTime}from'./task-time.js';export function TaskFinished(_0x735fa8){var _0x4281ce=a87_0x55c7;return a87_0x34cd2f(Box,{'children':[a87_0x1135e5(Box,{'width':'1'}),a87_0x1135e5(Text,{'color':_0x4281ce(0x125),'children':'\x20√\x20'}),a87_0x1135e5(Text,{'children':_0x735fa8['taskName']}),a87_0x1135e5(TaskTime,{'elapsed':_0x735fa8[_0x4281ce(0x12c)]})]});}
@@ -1 +1 @@
1
- (function(_0x44590a,_0x566a2f){var _0x4cdbdd=a88_0x50d8,_0x4aa0b0=_0x44590a();while(!![]){try{var _0x379e26=parseInt(_0x4cdbdd(0xf5))/0x1*(parseInt(_0x4cdbdd(0xff))/0x2)+-parseInt(_0x4cdbdd(0x104))/0x3*(parseInt(_0x4cdbdd(0xf9))/0x4)+-parseInt(_0x4cdbdd(0x105))/0x5*(parseInt(_0x4cdbdd(0xfc))/0x6)+parseInt(_0x4cdbdd(0x103))/0x7*(-parseInt(_0x4cdbdd(0xf6))/0x8)+-parseInt(_0x4cdbdd(0xfa))/0x9*(-parseInt(_0x4cdbdd(0xfd))/0xa)+parseInt(_0x4cdbdd(0x102))/0xb+-parseInt(_0x4cdbdd(0xfb))/0xc;if(_0x379e26===_0x566a2f)break;else _0x4aa0b0['push'](_0x4aa0b0['shift']());}catch(_0x17de5a){_0x4aa0b0['push'](_0x4aa0b0['shift']());}}}(a88_0x4ec0,0x44631));import{jsx as a88_0x4ddc34,jsxs as a88_0x45679a}from'react/jsx-runtime';import{Text}from'ink';import a88_0x309471 from'ink-spinner';export function TaskLoading(_0x2ede00){var _0x38a8c4=a88_0x50d8;if(_0x2ede00[_0x38a8c4(0x100)])return a88_0x4ddc34(Text,{'color':_0x38a8c4(0xfe),'children':_0x38a8c4(0xf8)});if(_0x2ede00[_0x38a8c4(0x101)])return a88_0x45679a(Text,{'color':'green','children':['\x20',a88_0x4ddc34(a88_0x309471,{'type':_0x38a8c4(0xf7)}),'\x20']});return a88_0x4ddc34(Text,{'children':'\x20\x20\x20'});}function a88_0x50d8(_0x1f67a8,_0x4db34b){_0x1f67a8=_0x1f67a8-0xf5;var _0x4ec081=a88_0x4ec0();var _0x50d827=_0x4ec081[_0x1f67a8];return _0x50d827;}function a88_0x4ec0(){var _0x3443bb=['finished','loading','4895132FqPejv','203tWVMRi','263379fQSMcQ','358630DcpPQM','1Qpwrmy','85768vSKeiq','dots','\x20√\x20','16vqsMUc','4679523MbmYPg','864600wCgFzI','36UWsGPr','10zdYHbr','green','959282crFccb'];a88_0x4ec0=function(){return _0x3443bb;};return a88_0x4ec0();}
1
+ (function(_0xda1e54,_0x2b2451){var _0x35dd00=a88_0xd295,_0x4d0c8f=_0xda1e54();while(!![]){try{var _0x6af3ec=-parseInt(_0x35dd00(0x1dc))/0x1*(-parseInt(_0x35dd00(0x1e6))/0x2)+parseInt(_0x35dd00(0x1e0))/0x3*(parseInt(_0x35dd00(0x1e4))/0x4)+-parseInt(_0x35dd00(0x1dd))/0x5*(parseInt(_0x35dd00(0x1de))/0x6)+-parseInt(_0x35dd00(0x1e3))/0x7*(-parseInt(_0x35dd00(0x1df))/0x8)+parseInt(_0x35dd00(0x1e7))/0x9+parseInt(_0x35dd00(0x1e8))/0xa+-parseInt(_0x35dd00(0x1e9))/0xb*(parseInt(_0x35dd00(0x1e5))/0xc);if(_0x6af3ec===_0x2b2451)break;else _0x4d0c8f['push'](_0x4d0c8f['shift']());}catch(_0x296157){_0x4d0c8f['push'](_0x4d0c8f['shift']());}}}(a88_0x4dcc,0x8b820));import{jsx as a88_0x409a0d,jsxs as a88_0x4218c1}from'react/jsx-runtime';import{Text}from'ink';function a88_0x4dcc(){var _0x18a545=['4WonEiV','8366328QTndgB','454874CJjaFT','4716819IukwIU','6668510nvvGAY','33rLAhBA','4ioYJmO','5GINoKy','2209374eUMUjJ','776rCaImO','419403PEvnIV','finished','\x20√\x20','57064ATBWEy'];a88_0x4dcc=function(){return _0x18a545;};return a88_0x4dcc();}import a88_0x5c6378 from'ink-spinner';function a88_0xd295(_0x405695,_0x33b5ed){_0x405695=_0x405695-0x1dc;var _0x4dccf9=a88_0x4dcc();var _0xd29582=_0x4dccf9[_0x405695];return _0xd29582;}export function TaskLoading(_0x58eecc){var _0x51c08a=a88_0xd295;if(_0x58eecc[_0x51c08a(0x1e1)])return a88_0x409a0d(Text,{'color':'green','children':_0x51c08a(0x1e2)});if(_0x58eecc['loading'])return a88_0x4218c1(Text,{'color':'green','children':['\x20',a88_0x409a0d(a88_0x5c6378,{'type':'dots'}),'\x20']});return a88_0x409a0d(Text,{'children':'\x20\x20\x20'});}
@@ -1 +1 @@
1
- function a89_0x4780(){var _0x30d807=['8811190UZLSAb','1119758QYXPVc','elapsed','98inUIfb','14937273uFAcdV','11tZjhOU','654REzDvK','taskName','626262stOtlp','4659EhApMX','8DWqcQb','5656108YlXLGm','7922610gTXqvE'];a89_0x4780=function(){return _0x30d807;};return a89_0x4780();}(function(_0x5335e6,_0x1dd000){var _0x35bf5a=a89_0x1e68,_0x2884a8=_0x5335e6();while(!![]){try{var _0x49c673=parseInt(_0x35bf5a(0x11c))/0x1+parseInt(_0x35bf5a(0x121))/0x2*(parseInt(_0x35bf5a(0x124))/0x3)+-parseInt(_0x35bf5a(0x119))/0x4+-parseInt(_0x35bf5a(0x11a))/0x5+parseInt(_0x35bf5a(0x123))/0x6*(parseInt(_0x35bf5a(0x11e))/0x7)+parseInt(_0x35bf5a(0x125))/0x8*(parseInt(_0x35bf5a(0x11f))/0x9)+-parseInt(_0x35bf5a(0x11b))/0xa*(parseInt(_0x35bf5a(0x120))/0xb);if(_0x49c673===_0x1dd000)break;else _0x2884a8['push'](_0x2884a8['shift']());}catch(_0x5adb15){_0x2884a8['push'](_0x2884a8['shift']());}}}(a89_0x4780,0xd4220));import{jsx as a89_0x378a3e,jsxs as a89_0x2fdeaf}from'react/jsx-runtime';import{Box,Text}from'ink';import{TaskLoading}from'./task-loading.js';function a89_0x1e68(_0xfb3ed,_0x266a71){_0xfb3ed=_0xfb3ed-0x119;var _0x478032=a89_0x4780();var _0x1e6868=_0x478032[_0xfb3ed];return _0x1e6868;}import{TaskTime}from'./task-time.js';export function TaskRunning(_0x26a379){var _0x176228=a89_0x1e68;return a89_0x2fdeaf(Box,{'children':[a89_0x378a3e(Box,{'width':'1'}),a89_0x378a3e(TaskLoading,{..._0x26a379}),a89_0x378a3e(Text,{'children':_0x26a379[_0x176228(0x122)]}),a89_0x378a3e(TaskTime,{'elapsed':_0x26a379[_0x176228(0x11d)]})]});}
1
+ (function(_0x2e463f,_0x4b4e6c){var _0x155869=a89_0x5b70,_0x58acb2=_0x2e463f();while(!![]){try{var _0x41e266=parseInt(_0x155869(0x1a5))/0x1*(-parseInt(_0x155869(0x1a0))/0x2)+parseInt(_0x155869(0x1a1))/0x3*(-parseInt(_0x155869(0x1a6))/0x4)+-parseInt(_0x155869(0x1aa))/0x5+parseInt(_0x155869(0x1a2))/0x6+-parseInt(_0x155869(0x1a4))/0x7*(parseInt(_0x155869(0x1ac))/0x8)+parseInt(_0x155869(0x1ab))/0x9+-parseInt(_0x155869(0x1a9))/0xa*(-parseInt(_0x155869(0x1a7))/0xb);if(_0x41e266===_0x4b4e6c)break;else _0x58acb2['push'](_0x58acb2['shift']());}catch(_0x357e97){_0x58acb2['push'](_0x58acb2['shift']());}}}(a89_0x2f9b,0xbb3f7));import{jsx as a89_0x1fac54,jsxs as a89_0x2575c5}from'react/jsx-runtime';import{Box,Text}from'ink';function a89_0x2f9b(){var _0x928591=['72030UpJBdq','taskName','56GStNMW','1861eNTTnu','254992DjlBNa','193567SeoCoU','elapsed','2020mplLGE','5470940BxvSUL','5157819FWPKuu','704568nzLBql','1486SStkDn','9wMmNZm'];a89_0x2f9b=function(){return _0x928591;};return a89_0x2f9b();}function a89_0x5b70(_0x393739,_0x28c783){_0x393739=_0x393739-0x1a0;var _0x2f9b5e=a89_0x2f9b();var _0x5b70cb=_0x2f9b5e[_0x393739];return _0x5b70cb;}import{TaskLoading}from'./task-loading.js';import{TaskTime}from'./task-time.js';export function TaskRunning(_0x4889fa){var _0x3addce=a89_0x5b70;return a89_0x2575c5(Box,{'children':[a89_0x1fac54(Box,{'width':'1'}),a89_0x1fac54(TaskLoading,{..._0x4889fa}),a89_0x1fac54(Text,{'children':_0x4889fa[_0x3addce(0x1a3)]}),a89_0x1fac54(TaskTime,{'elapsed':_0x4889fa[_0x3addce(0x1a8)]})]});}
@@ -1 +1 @@
1
- function a90_0x4471(){var _0x28b923=['2866138ZRalZl','279341jPFygt','1528wpvntd','8GFydau','1494RjdypQ','144388AwEZMP','1350780IufkZe','3126402pdrZYj','1111502eYplde','15diGkyO','18qZyqIf','gray','elapsed'];a90_0x4471=function(){return _0x28b923;};return a90_0x4471();}(function(_0x263801,_0x3ca7a0){var _0x5be15f=a90_0x5eb9,_0x2f95ea=_0x263801();while(!![]){try{var _0x34b5e9=-parseInt(_0x5be15f(0x18d))/0x1+parseInt(_0x5be15f(0x18e))/0x2*(-parseInt(_0x5be15f(0x190))/0x3)+parseInt(_0x5be15f(0x191))/0x4*(parseInt(_0x5be15f(0x195))/0x5)+parseInt(_0x5be15f(0x196))/0x6*(parseInt(_0x5be15f(0x194))/0x7)+-parseInt(_0x5be15f(0x18f))/0x8*(-parseInt(_0x5be15f(0x193))/0x9)+-parseInt(_0x5be15f(0x192))/0xa+parseInt(_0x5be15f(0x199))/0xb;if(_0x34b5e9===_0x3ca7a0)break;else _0x2f95ea['push'](_0x2f95ea['shift']());}catch(_0x94d93e){_0x2f95ea['push'](_0x2f95ea['shift']());}}}(a90_0x4471,0x6117e));function a90_0x5eb9(_0x31f847,_0x2ce99d){_0x31f847=_0x31f847-0x18d;var _0x44711d=a90_0x4471();var _0x5eb951=_0x44711d[_0x31f847];return _0x5eb951;}import{jsx as a90_0x4b1f59,Fragment as a90_0x3ee362,jsxs as a90_0x4e8d11}from'react/jsx-runtime';import{Text}from'ink';export function TaskTime(_0x48916f){var _0x445eb0=a90_0x5eb9;if(_0x48916f[_0x445eb0(0x198)])return a90_0x4e8d11(a90_0x3ee362,{'children':[a90_0x4b1f59(Text,{'color':'gray','children':'\x20['}),a90_0x4b1f59(Text,{'color':_0x445eb0(0x197),'bold':!![],'children':_0x48916f[_0x445eb0(0x198)]}),a90_0x4b1f59(Text,{'color':'gray','children':']'})]});return null;}
1
+ (function(_0x3c8efd,_0x5bec90){var _0x3795e0=a90_0x2d3f,_0x44204d=_0x3c8efd();while(!![]){try{var _0x2e9293=parseInt(_0x3795e0(0xc4))/0x1*(parseInt(_0x3795e0(0xc8))/0x2)+parseInt(_0x3795e0(0xcc))/0x3+-parseInt(_0x3795e0(0xcb))/0x4+-parseInt(_0x3795e0(0xc9))/0x5*(-parseInt(_0x3795e0(0xc6))/0x6)+-parseInt(_0x3795e0(0xc2))/0x7*(-parseInt(_0x3795e0(0xca))/0x8)+parseInt(_0x3795e0(0xc3))/0x9+-parseInt(_0x3795e0(0xc5))/0xa;if(_0x2e9293===_0x5bec90)break;else _0x44204d['push'](_0x44204d['shift']());}catch(_0x3487d4){_0x44204d['push'](_0x44204d['shift']());}}}(a90_0x5b20,0xdb4c5));function a90_0x2d3f(_0x2d4129,_0x29f4e3){_0x2d4129=_0x2d4129-0xc2;var _0x5b20fb=a90_0x5b20();var _0x2d3f7b=_0x5b20fb[_0x2d4129];return _0x2d3f7b;}import{jsx as a90_0xa7b42a,Fragment as a90_0x29a523,jsxs as a90_0x25d458}from'react/jsx-runtime';import{Text}from'ink';function a90_0x5b20(){var _0x5133c9=['376767ofuHpv','104ebMGcS','19888790SyPMYD','17400fsytjB','elapsed','22370PADyjZ','2935SlqaNn','8BfEVbO','4864064BVvuRs','2301105vLDWHC','gray','3000914VtRdam'];a90_0x5b20=function(){return _0x5133c9;};return a90_0x5b20();}export function TaskTime(_0x1c2b6c){var _0x35b563=a90_0x2d3f;if(_0x1c2b6c[_0x35b563(0xc7)])return a90_0x25d458(a90_0x29a523,{'children':[a90_0xa7b42a(Text,{'color':_0x35b563(0xcd),'children':'\x20['}),a90_0xa7b42a(Text,{'color':_0x35b563(0xcd),'bold':!![],'children':_0x1c2b6c[_0x35b563(0xc7)]}),a90_0xa7b42a(Text,{'color':_0x35b563(0xcd),'children':']'})]});return null;}
@@ -1 +1 @@
1
- const a91_0x29551a=a91_0x2815;(function(_0x5bf09f,_0x5c65c3){const _0x33a7b3=a91_0x2815,_0x1b4721=_0x5bf09f();while(!![]){try{const _0x1592a8=parseInt(_0x33a7b3(0xb9))/0x1+-parseInt(_0x33a7b3(0xac))/0x2*(parseInt(_0x33a7b3(0xb6))/0x3)+parseInt(_0x33a7b3(0xbc))/0x4*(parseInt(_0x33a7b3(0xb4))/0x5)+parseInt(_0x33a7b3(0xb7))/0x6*(-parseInt(_0x33a7b3(0xaa))/0x7)+parseInt(_0x33a7b3(0xaf))/0x8+-parseInt(_0x33a7b3(0xad))/0x9+parseInt(_0x33a7b3(0xb3))/0xa*(-parseInt(_0x33a7b3(0xb2))/0xb);if(_0x1592a8===_0x5c65c3)break;else _0x1b4721['push'](_0x1b4721['shift']());}catch(_0xda4791){_0x1b4721['push'](_0x1b4721['shift']());}}}(a91_0x1b21,0x4618d));import a91_0x558ee8 from'node:path';function a91_0x2815(_0x54946c,_0xee9f87){_0x54946c=_0x54946c-0xaa;const _0x1b2149=a91_0x1b21();let _0x281520=_0x1b2149[_0x54946c];return _0x281520;}import{fileURLToPath}from'node:url';import{useCallback,useState}from'react';import{copyDirectory}from'../utils/copy-directory.js';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';function a91_0x1b21(){const _0x5c5da9=['68NgGIkH','1229589UnlKBK','now','4260344OYYGHZ','resolve','success','264jWTTDV','184660OtzYcf','170fiGaXY','项目模板复制失败','22893jLsihg','78nXESxI','Copy\x20project\x20files','235606aCNILJ','开始复制项目模板','info','46520qLjYiF','../../templates/projects/sub-app-react-demo','copy','20027nCRrGQ','dirname'];a91_0x1b21=function(){return _0x5c5da9;};return a91_0x1b21();}const __dirname=a91_0x558ee8[a91_0x29551a(0xab)](fileURLToPath(import.meta.url)),templateDir=a91_0x558ee8[a91_0x29551a(0xb0)](__dirname,a91_0x29551a(0xbd));export function useCopyProjectTemplate(){const _0xf6c5cc=a91_0x29551a,[_0x27a3b8,_0x11eff2]=useState(![]),[_0x433832,_0x10f680]=useState(![]),[_0x3c33fe,_0x10c2c8]=useState(''),_0xbe4d39=useCallback(async _0x1b077a=>{const _0x44456e=a91_0x2815,_0x194753=Date[_0x44456e(0xae)](),_0x24df56=a91_0x558ee8[_0x44456e(0xb0)](process['cwd'](),_0x1b077a);_0x11eff2(!![]);try{logger[_0x44456e(0xbb)](_0x44456e(0xbe),_0x44456e(0xba),{'projectCode':_0x1b077a,'templateDir':templateDir}),await copyDirectory(templateDir,_0x24df56);const _0x57737d=Date[_0x44456e(0xae)]()-_0x194753;logger[_0x44456e(0xb1)](_0x44456e(0xbe),'项目模板复制完成',_0x57737d,{'projectCode':_0x1b077a});}catch(_0x1f7a06){const _0x2bebef=Date['now']()-_0x194753;logger['error']('copy',_0x44456e(0xb5),{'projectCode':_0x1b077a,'error':_0x1f7a06 instanceof Error?_0x1f7a06['message']:String(_0x1f7a06),'duration':_0x2bebef});throw _0x1f7a06;}finally{_0x11eff2(![]),_0x10f680(!![]),_0x10c2c8(formatElapsed(_0x194753));}},[]);return{'taskName':_0xf6c5cc(0xb8),'finished':_0x433832,'loading':_0x27a3b8,'elapsed':_0x3c33fe,'doTask':_0xbe4d39};}
1
+ const a91_0x558e63=a91_0x1ef9;(function(_0x2d2bcc,_0x13f4bc){const _0xb5dc4e=a91_0x1ef9,_0x9554b3=_0x2d2bcc();while(!![]){try{const _0x409fb7=parseInt(_0xb5dc4e(0x191))/0x1+-parseInt(_0xb5dc4e(0x193))/0x2*(parseInt(_0xb5dc4e(0x182))/0x3)+-parseInt(_0xb5dc4e(0x185))/0x4+-parseInt(_0xb5dc4e(0x187))/0x5+parseInt(_0xb5dc4e(0x18a))/0x6+-parseInt(_0xb5dc4e(0x186))/0x7+parseInt(_0xb5dc4e(0x18f))/0x8*(parseInt(_0xb5dc4e(0x18b))/0x9);if(_0x409fb7===_0x13f4bc)break;else _0x9554b3['push'](_0x9554b3['shift']());}catch(_0x4c7fae){_0x9554b3['push'](_0x9554b3['shift']());}}}(a91_0x2851,0x444a3));function a91_0x2851(){const _0x123fac=['6543mUtLjY','dirname','success','项目模板复制失败','2472THBktX','resolve','247078FhzTzF','项目模板复制完成','761302VlxIkm','now','cwd','message','3zOYaKQ','开始复制项目模板','copy','260128ZqDbnL','899955DLrvNd','301275hnicJK','../../templates/projects/sub-app-react-demo','error','2654982VUrYDa'];a91_0x2851=function(){return _0x123fac;};return a91_0x2851();}import a91_0x2f89d3 from'node:path';import{fileURLToPath}from'node:url';import{useCallback,useState}from'react';import{copyDirectory}from'../utils/copy-directory.js';import{formatElapsed}from'./format-elapsed.js';function a91_0x1ef9(_0x1b7bb3,_0x96adc3){_0x1b7bb3=_0x1b7bb3-0x181;const _0x2851d2=a91_0x2851();let _0x1ef970=_0x2851d2[_0x1b7bb3];return _0x1ef970;}import{logger}from'../utils/logger.js';const __dirname=a91_0x2f89d3[a91_0x558e63(0x18c)](fileURLToPath(import.meta.url)),templateDir=a91_0x2f89d3[a91_0x558e63(0x190)](__dirname,a91_0x558e63(0x188));export function useCopyProjectTemplate(){const [_0xf45af,_0x28cb56]=useState(![]),[_0x57cc5d,_0x310f0d]=useState(![]),[_0x56adc8,_0x625806]=useState(''),_0x443d75=useCallback(async _0x504aae=>{const _0x4d2893=a91_0x1ef9,_0x3d6a3b=Date['now'](),_0x4dc8e9=a91_0x2f89d3['resolve'](process[_0x4d2893(0x195)](),_0x504aae);_0x28cb56(!![]);try{logger['info'](_0x4d2893(0x184),_0x4d2893(0x183),{'projectCode':_0x504aae,'templateDir':templateDir}),await copyDirectory(templateDir,_0x4dc8e9);const _0x301053=Date['now']()-_0x3d6a3b;logger[_0x4d2893(0x18d)](_0x4d2893(0x184),_0x4d2893(0x192),_0x301053,{'projectCode':_0x504aae});}catch(_0x42aa41){const _0x5177fc=Date[_0x4d2893(0x194)]()-_0x3d6a3b;logger[_0x4d2893(0x189)]('copy',_0x4d2893(0x18e),{'projectCode':_0x504aae,'error':_0x42aa41 instanceof Error?_0x42aa41[_0x4d2893(0x181)]:String(_0x42aa41),'duration':_0x5177fc});throw _0x42aa41;}finally{_0x28cb56(![]),_0x310f0d(!![]),_0x625806(formatElapsed(_0x3d6a3b));}},[]);return{'taskName':'Copy\x20project\x20files','finished':_0x57cc5d,'loading':_0xf45af,'elapsed':_0x56adc8,'doTask':_0x443d75};}
@@ -1 +1 @@
1
- function a92_0x2e49(){const _0x474882=['npx','1567998ucfZRd','cwd','1234704wQATMV','Format\x20code','231YEfoip','23416GqtKIX','now','success','2052900rGjVKu','74JRRwgI','prettier','message','5620iLsqlD','代码格式化完成','8001459kDuziN','10dtZxbK','231436LGmbbf','format','error','resolve','info','--write'];a92_0x2e49=function(){return _0x474882;};return a92_0x2e49();}function a92_0x5988(_0x3481fa,_0x3578c2){_0x3481fa=_0x3481fa-0x164;const _0x2e4936=a92_0x2e49();let _0x5988f0=_0x2e4936[_0x3481fa];return _0x5988f0;}(function(_0x79f5d7,_0x3d921a){const _0x207f72=a92_0x5988,_0x4e9237=_0x79f5d7();while(!![]){try{const _0x2f13d3=-parseInt(_0x207f72(0x175))/0x1*(-parseInt(_0x207f72(0x178))/0x2)+parseInt(_0x207f72(0x16c))/0x3+-parseInt(_0x207f72(0x165))/0x4+parseInt(_0x207f72(0x174))/0x5+parseInt(_0x207f72(0x16e))/0x6+parseInt(_0x207f72(0x170))/0x7*(-parseInt(_0x207f72(0x171))/0x8)+parseInt(_0x207f72(0x17a))/0x9*(-parseInt(_0x207f72(0x164))/0xa);if(_0x2f13d3===_0x3d921a)break;else _0x4e9237['push'](_0x4e9237['shift']());}catch(_0x4b1d32){_0x4e9237['push'](_0x4e9237['shift']());}}}(a92_0x2e49,0x4a16d));import a92_0x57d62f from'node:path';import{useCallback,useState}from'react';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';export function useFormatCode(){const _0x3c8feb=a92_0x5988,[_0x104c4f,_0x1fdb35]=useState(![]),[_0x3ed829,_0x1aa3ce]=useState(![]),[_0x473a8b,_0x1748b2]=useState(''),_0x2ce69e=useCallback(async _0x2f93f5=>{const _0x52b724=a92_0x5988,_0x1393b4=Date[_0x52b724(0x172)](),_0x1b199b=a92_0x57d62f[_0x52b724(0x168)](process[_0x52b724(0x16d)](),_0x2f93f5);_0x1fdb35(!![]);try{logger[_0x52b724(0x169)](_0x52b724(0x166),'开始格式化代码',{'projectCode':_0x2f93f5}),await execa(_0x52b724(0x16b),[_0x52b724(0x176),_0x52b724(0x16a),'.'],{'cwd':_0x1b199b});const _0x56a9b8=Date[_0x52b724(0x172)]()-_0x1393b4;logger[_0x52b724(0x173)]('format',_0x52b724(0x179),_0x56a9b8,{'projectCode':_0x2f93f5});}catch(_0x5cd8e2){const _0x32ae42=Date[_0x52b724(0x172)]()-_0x1393b4;logger[_0x52b724(0x167)](_0x52b724(0x166),'代码格式化失败',{'projectCode':_0x2f93f5,'error':_0x5cd8e2 instanceof Error?_0x5cd8e2[_0x52b724(0x177)]:String(_0x5cd8e2),'duration':_0x32ae42});throw _0x5cd8e2;}finally{_0x1fdb35(![]),_0x1aa3ce(!![]),_0x1748b2(formatElapsed(_0x1393b4));}},[]);return{'taskName':_0x3c8feb(0x16f),'finished':_0x3ed829,'loading':_0x104c4f,'elapsed':_0x473a8b,'doTask':_0x2ce69e};}
1
+ (function(_0x52fb39,_0x1e3b94){const _0x768168=a92_0x4b2f,_0x40ea26=_0x52fb39();while(!![]){try{const _0x311495=parseInt(_0x768168(0xcf))/0x1*(-parseInt(_0x768168(0xc7))/0x2)+parseInt(_0x768168(0xd2))/0x3+-parseInt(_0x768168(0xcb))/0x4+parseInt(_0x768168(0xc9))/0x5*(-parseInt(_0x768168(0xce))/0x6)+parseInt(_0x768168(0xd5))/0x7+parseInt(_0x768168(0xc0))/0x8+-parseInt(_0x768168(0xc4))/0x9*(-parseInt(_0x768168(0xc8))/0xa);if(_0x311495===_0x1e3b94)break;else _0x40ea26['push'](_0x40ea26['shift']());}catch(_0x3d889e){_0x40ea26['push'](_0x40ea26['shift']());}}}(a92_0x35df,0xe723f));import a92_0x5cc472 from'node:path';function a92_0x4b2f(_0x536a52,_0x581cb3){_0x536a52=_0x536a52-0xbf;const _0x35dfc9=a92_0x35df();let _0x4b2fa4=_0x35dfc9[_0x536a52];return _0x4b2fa4;}import{useCallback,useState}from'react';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';function a92_0x35df(){const _0x537ef4=['Format\x20code','108pJCPNY','1734427YXcBjY','now','npx','1635705EzFGCW','resolve','success','9456426GGmsES','error','9162008CDoQNz','代码格式化失败','prettier','cwd','18lhXZgz','代码格式化完成','info','2wrjPTP','12639610FZXsQW','448580cimlSD','format','5093040ohgkGi','开始格式化代码'];a92_0x35df=function(){return _0x537ef4;};return a92_0x35df();}export function useFormatCode(){const _0x2bf2cc=a92_0x4b2f,[_0x34db30,_0x159b5d]=useState(![]),[_0xd90844,_0x5f231d]=useState(![]),[_0xee2e5,_0x4c0b72]=useState(''),_0x22981a=useCallback(async _0x29938b=>{const _0x43babc=a92_0x4b2f,_0x25bddb=Date[_0x43babc(0xd0)](),_0x3aa4ac=a92_0x5cc472[_0x43babc(0xd3)](process[_0x43babc(0xc3)](),_0x29938b);_0x159b5d(!![]);try{logger[_0x43babc(0xc6)](_0x43babc(0xca),_0x43babc(0xcc),{'projectCode':_0x29938b}),await execa(_0x43babc(0xd1),[_0x43babc(0xc2),'--write','.'],{'cwd':_0x3aa4ac});const _0x44968c=Date[_0x43babc(0xd0)]()-_0x25bddb;logger[_0x43babc(0xd4)](_0x43babc(0xca),_0x43babc(0xc5),_0x44968c,{'projectCode':_0x29938b});}catch(_0x357679){const _0x5dc3c1=Date[_0x43babc(0xd0)]()-_0x25bddb;logger[_0x43babc(0xbf)](_0x43babc(0xca),_0x43babc(0xc1),{'projectCode':_0x29938b,'error':_0x357679 instanceof Error?_0x357679['message']:String(_0x357679),'duration':_0x5dc3c1});throw _0x357679;}finally{_0x159b5d(![]),_0x5f231d(!![]),_0x4c0b72(formatElapsed(_0x25bddb));}},[]);return{'taskName':_0x2bf2cc(0xcd),'finished':_0xd90844,'loading':_0x34db30,'elapsed':_0xee2e5,'doTask':_0x22981a};}