@lovrabet/rabetbase-cli 2.0.4-beta.4 → 2.0.5

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 (143) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/logout.js +1 -1
  11. package/lib/cli-flags.js +1 -1
  12. package/lib/cli.js +1 -1
  13. package/lib/commands/api/doc.js +1 -1
  14. package/lib/commands/api/index.js +1 -1
  15. package/lib/commands/api/list.js +1 -1
  16. package/lib/commands/api/pull.js +1 -1
  17. package/lib/commands/api/shared.js +1 -0
  18. package/lib/commands/app/add.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/remote.js +1 -1
  22. package/lib/commands/app/remove.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app/use.js +1 -1
  25. package/lib/commands/auth/index.js +1 -0
  26. package/lib/commands/bff/delete.js +1 -1
  27. package/lib/commands/bff/detail.js +1 -1
  28. package/lib/commands/bff/index.js +1 -1
  29. package/lib/commands/bff/list.js +1 -1
  30. package/lib/commands/bff/new.js +1 -1
  31. package/lib/commands/bff/pull.js +1 -1
  32. package/lib/commands/bff/push.js +1 -1
  33. package/lib/commands/bff/status.js +1 -1
  34. package/lib/commands/build.js +1 -1
  35. package/lib/commands/cli-update.js +1 -1
  36. package/lib/commands/codegen/index.js +1 -1
  37. package/lib/commands/codegen/sdk.js +1 -1
  38. package/lib/commands/codegen/sql.js +1 -1
  39. package/lib/commands/common/app-selector.js +1 -1
  40. package/lib/commands/common/flags.js +1 -1
  41. package/lib/commands/common/validate.js +1 -1
  42. package/lib/commands/config/get.js +1 -1
  43. package/lib/commands/config/index.js +1 -1
  44. package/lib/commands/config/list.js +1 -1
  45. package/lib/commands/config/set.js +1 -1
  46. package/lib/commands/config/shared.js +1 -1
  47. package/lib/commands/dataset/detail.js +1 -1
  48. package/lib/commands/dataset/index.js +1 -1
  49. package/lib/commands/dataset/links.js +1 -1
  50. package/lib/commands/dataset/list.js +1 -1
  51. package/lib/commands/dataset/operations.js +1 -1
  52. package/lib/commands/doctor.js +1 -1
  53. package/lib/commands/init/index.js +1 -0
  54. package/lib/commands/logs/index.js +1 -0
  55. package/lib/commands/menu/index.js +1 -1
  56. package/lib/commands/menu/shared/compare-table.js +1 -1
  57. package/lib/commands/menu/shared/index.js +1 -1
  58. package/lib/commands/menu/shared/inquirer.js +1 -1
  59. package/lib/commands/menu/shared/local-pages.js +1 -1
  60. package/lib/commands/menu/shared/logic.js +1 -1
  61. package/lib/commands/menu/shared/service.js +1 -1
  62. package/lib/commands/menu/shared/sync-core.js +1 -1
  63. package/lib/commands/menu/shared/update-core.js +1 -1
  64. package/lib/commands/menu/shared/valid-url.js +1 -1
  65. package/lib/commands/menu/sync.js +1 -1
  66. package/lib/commands/menu/update.js +1 -1
  67. package/lib/commands/preview.js +1 -1
  68. package/lib/commands/project/index.js +1 -0
  69. package/lib/commands/project-upgrade.js +1 -1
  70. package/lib/commands/registry.js +1 -1
  71. package/lib/commands/run/index.js +1 -0
  72. package/lib/commands/skill/index.js +1 -0
  73. package/lib/commands/sql/detail.js +1 -1
  74. package/lib/commands/sql/exec.js +1 -1
  75. package/lib/commands/sql/index.js +1 -1
  76. package/lib/commands/sql/list.js +1 -1
  77. package/lib/commands/sql/save.js +1 -1
  78. package/lib/commands/sql/validate.js +1 -1
  79. package/lib/commands/start.js +1 -1
  80. package/lib/constant/cli.js +1 -1
  81. package/lib/constant/domain.js +1 -1
  82. package/lib/constant/env.js +1 -1
  83. package/lib/context.js +1 -1
  84. package/lib/core/alias-resolver.js +1 -1
  85. package/lib/core/api-client.js +1 -1
  86. package/lib/core/bff/config.js +1 -1
  87. package/lib/core/bff/file-system.js +1 -1
  88. package/lib/core/bff/hash.js +1 -1
  89. package/lib/core/bff/lock.js +1 -1
  90. package/lib/core/bff/utils.js +1 -1
  91. package/lib/core/db-resolver.js +1 -1
  92. package/lib/core/sql-validator.js +1 -1
  93. package/lib/create-app/enhanced-guided-create.js +1 -1
  94. package/lib/create-app/format-elapsed.js +1 -1
  95. package/lib/create-app/main.js +1 -1
  96. package/lib/create-app/non-interactive.js +1 -1
  97. package/lib/create-app/use-copy-project-template.js +1 -1
  98. package/lib/create-app/use-format-code.js +1 -1
  99. package/lib/create-app/use-install-dependencies.js +1 -1
  100. package/lib/errors.js +1 -1
  101. package/lib/framework/flags.js +1 -1
  102. package/lib/framework/help.js +1 -1
  103. package/lib/framework/index.js +1 -1
  104. package/lib/framework/output.js +1 -1
  105. package/lib/framework/response.js +1 -1
  106. package/lib/framework/runner.js +1 -1
  107. package/lib/framework/types.js +1 -1
  108. package/lib/generated/build-info.js +1 -1
  109. package/lib/help.js +1 -1
  110. package/lib/init/main.js +1 -1
  111. package/lib/skills/main.js +1 -1
  112. package/lib/skills/npx-skills-add.js +1 -1
  113. package/lib/telemetry/cli-command-trace.js +1 -0
  114. package/lib/telemetry/cli-help-trace.js +1 -1
  115. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  116. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  117. package/lib/telemetry/send-cli-trace-log.js +1 -1
  118. package/lib/utils/ai_config.js +1 -1
  119. package/lib/utils/cdn-config.js +1 -1
  120. package/lib/utils/check-sdk-version.js +1 -1
  121. package/lib/utils/cli-version-check.js +1 -1
  122. package/lib/utils/config.js +1 -1
  123. package/lib/utils/copy-directory.js +1 -1
  124. package/lib/utils/file-utils.js +1 -1
  125. package/lib/utils/guides-cdn.js +1 -1
  126. package/lib/utils/http-client.js +1 -1
  127. package/lib/utils/is-non-interactive.js +1 -1
  128. package/lib/utils/logger.js +1 -1
  129. package/lib/utils/platform.js +1 -1
  130. package/lib/utils/rules-cdn.js +1 -1
  131. package/lib/utils/sleep.js +1 -1
  132. package/lib/utils/template-replacer.js +1 -1
  133. package/lib/utils/version.js +1 -1
  134. package/lib/utils/with-active-cookie.js +1 -1
  135. package/package.json +2 -2
  136. package/lib/commands/auth.js +0 -1
  137. package/lib/commands/create.js +0 -1
  138. package/lib/commands/init.js +0 -1
  139. package/lib/commands/logout.js +0 -1
  140. package/lib/commands/logs.js +0 -1
  141. package/lib/commands/run.js +0 -1
  142. package/lib/commands/skill.js +0 -1
  143. package/lib/commands/smart-init.js +0 -1
@@ -1 +1 @@
1
- const a88_0x4c0cb5=a88_0x554d;(function(_0x30eeea,_0x38e4ef){const _0xe1a35c=a88_0x554d,_0x57beaf=_0x30eeea();while(!![]){try{const _0x4468fa=-parseInt(_0xe1a35c(0x20d))/0x1+-parseInt(_0xe1a35c(0x203))/0x2+-parseInt(_0xe1a35c(0x1f1))/0x3*(parseInt(_0xe1a35c(0x209))/0x4)+-parseInt(_0xe1a35c(0x212))/0x5+-parseInt(_0xe1a35c(0x1f7))/0x6*(parseInt(_0xe1a35c(0x1fa))/0x7)+parseInt(_0xe1a35c(0x20c))/0x8+parseInt(_0xe1a35c(0x207))/0x9*(parseInt(_0xe1a35c(0x20a))/0xa);if(_0x4468fa===_0x38e4ef)break;else _0x57beaf['push'](_0x57beaf['shift']());}catch(_0x196d67){_0x57beaf['push'](_0x57beaf['shift']());}}}(a88_0x1565,0x2ec95));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';function a88_0x1565(){const _0x5a339e=['isFile','set','283266MQStsl','HOOK','18388AuuGyv','310NYHfwc','alias','2565048cJoFiI','210902IksySR','functionName','toUpperCase','split','.js','776485luhBUx','ENDPOINT','all','F_OK','endsWith','map','126iXantW','replace','ENOENT','HOOK/','name','operationType','138moSWBm','COMMON','afterScriptId','68124WjIqer','after','beforeScriptId','get','before','scriptsRootDir','datasetCode','code','isDirectory','643158ztFdlR','push'];a88_0x1565=function(){return _0x5a339e;};return a88_0x1565();}export const SUPPORTED_BFF_TYPES=[a88_0x4c0cb5(0x1f8),a88_0x4c0cb5(0x213),a88_0x4c0cb5(0x208)];export function normalizeBffType(_0x5b8863){const _0x564277=a88_0x4c0cb5;if(!_0x5b8863)return undefined;const _0xf2f704=_0x5b8863['trim']()[_0x564277(0x20f)]();return SUPPORTED_BFF_TYPES['includes'](_0xf2f704)?_0xf2f704:undefined;}async function scanJsFilesRecursively(_0x243ab2,_0x419920){const _0x549346=a88_0x4c0cb5,_0x2f22a0=[];try{const _0x1bb3e9=await readdir(_0x243ab2,{'withFileTypes':!![]});for(const _0x58b464 of _0x1bb3e9){const _0x54758b=join(_0x243ab2,_0x58b464['name']);if(_0x58b464[_0x549346(0x202)]())_0x2f22a0['push'](...await scanJsFilesRecursively(_0x54758b,_0x419920+'/'+_0x58b464[_0x549346(0x1f5)]));else _0x58b464[_0x549346(0x205)]()&&_0x58b464[_0x549346(0x1f5)][_0x549346(0x1ef)](_0x549346(0x211))&&_0x2f22a0[_0x549346(0x204)]({'lockKey':_0x419920+'/'+_0x58b464[_0x549346(0x1f5)][_0x549346(0x1f2)](/\.js$/,''),'filePath':_0x54758b});}}catch(_0x218eff){if(_0x218eff['code']!==_0x549346(0x1f3))throw _0x218eff;}return _0x2f22a0;}async function scanFlatFunctions(_0x435e4a,_0x5a5db3){const _0x113132=a88_0x4c0cb5,_0x6e21f8=join(_0x435e4a[_0x113132(0x1ff)],_0x5a5db3),_0x12a8c6=await scanJsFilesRecursively(_0x6e21f8,_0x5a5db3);return _0x12a8c6[_0x113132(0x1f0)](({lockKey:_0x56f039,filePath:_0x2cc578})=>({'type':_0x5a5db3,'name':_0x56f039[_0x113132(0x210)]('/')['at'](-0x1)??'','filePath':_0x2cc578,'lockKey':_0x56f039}));}async function scanHookFunctions(_0x1bbac5){const _0x4a4fbf=a88_0x4c0cb5,_0x1c6dfb=join(_0x1bbac5[_0x4a4fbf(0x1ff)],'HOOK'),_0x162378=[];try{const _0x59aed0=await readdir(_0x1c6dfb,{'withFileTypes':!![]});for(const _0xe47c71 of _0x59aed0){if(!_0xe47c71[_0x4a4fbf(0x202)]())continue;const _0x3d0627=_0xe47c71[_0x4a4fbf(0x1f5)],_0x432d15=join(_0x1c6dfb,_0x3d0627),_0x445a70=await readdir(_0x432d15,{'withFileTypes':!![]});for(const _0xd40450 of _0x445a70){if(!_0xd40450['isDirectory']())continue;const _0x56fa9b=_0xd40450[_0x4a4fbf(0x1f5)],_0x222cf3=join(_0x432d15,_0x56fa9b),_0x334546=await readdir(_0x222cf3,{'withFileTypes':!![]});for(const _0x288f73 of _0x334546){if(!_0x288f73[_0x4a4fbf(0x202)]())continue;const _0x547090=_0x288f73['name'],_0x2a89db=join(_0x222cf3,_0x547090),_0x257f10=await readdir(_0x2a89db,{'withFileTypes':!![]});for(const _0x4d007a of _0x257f10){if(!_0x4d007a[_0x4a4fbf(0x205)]()||!_0x4d007a[_0x4a4fbf(0x1f5)]['endsWith'](_0x4a4fbf(0x211)))continue;const _0x3ed882=_0x4d007a[_0x4a4fbf(0x1f5)][_0x4a4fbf(0x1f2)](/\.js$/,'');_0x162378[_0x4a4fbf(0x204)]({'type':'HOOK','name':_0x3ed882,'filePath':join(_0x2a89db,_0x4d007a['name']),'lockKey':_0x4a4fbf(0x1f4)+_0x3d0627+'/'+_0x56fa9b+'/'+_0x547090+'/'+_0x3ed882,'alias':_0x3d0627,'operationType':_0x56fa9b,'functionNode':_0x547090});}}}}}catch(_0x2bd66f){if(_0x2bd66f[_0x4a4fbf(0x201)]!=='ENOENT')throw _0x2bd66f;}return _0x162378;}function a88_0x554d(_0x54b428,_0x357bc4){_0x54b428=_0x54b428-0x1ee;const _0x15653f=a88_0x1565();let _0x554dc9=_0x15653f[_0x54b428];return _0x554dc9;}export async function scanLocalBffFunctions(_0x516616,_0x56990c){const _0x2f8723=a88_0x4c0cb5;if(_0x56990c===_0x2f8723(0x1f8)||_0x56990c==='ENDPOINT')return scanFlatFunctions(_0x516616,_0x56990c);if(_0x56990c===_0x2f8723(0x208))return scanHookFunctions(_0x516616);const [_0x5736d1,_0x2a603b,_0x405d23]=await Promise[_0x2f8723(0x214)]([scanFlatFunctions(_0x516616,_0x2f8723(0x1f8)),scanFlatFunctions(_0x516616,'ENDPOINT'),scanHookFunctions(_0x516616)]);return[..._0x5736d1,..._0x2a603b,..._0x405d23];}export function resolveLocalFilePathFromLockKey(_0x4efff9,_0x47e667){const _0x3cb393=a88_0x4c0cb5;return join(_0x4efff9[_0x3cb393(0x1ff)],..._0x47e667[_0x3cb393(0x210)]('/'))+'.js';}export function createHookLocationMap(_0x364a4b){const _0x4e72d3=a88_0x4c0cb5,_0x1c67e5=new Map();for(const _0x39cfbe of _0x364a4b){_0x39cfbe[_0x4e72d3(0x1fc)]&&_0x1c67e5[_0x4e72d3(0x206)](_0x39cfbe[_0x4e72d3(0x1fc)],{'datasetCode':_0x39cfbe[_0x4e72d3(0x200)],'operationType':snakeToCamel(_0x39cfbe[_0x4e72d3(0x1f6)]),'functionNode':_0x4e72d3(0x1fe)}),_0x39cfbe[_0x4e72d3(0x1f9)]&&_0x1c67e5[_0x4e72d3(0x206)](_0x39cfbe[_0x4e72d3(0x1f9)],{'datasetCode':_0x39cfbe['datasetCode'],'operationType':snakeToCamel(_0x39cfbe[_0x4e72d3(0x1f6)]),'functionNode':_0x4e72d3(0x1fb)});}return _0x1c67e5;}export function resolveRemoteScriptTarget(_0x13d4e5,_0x30309d,_0x58ae53,_0xa21053,_0x4ffda5){const _0x1cc541=a88_0x4c0cb5,_0x9f472=normalizeBffType(_0x30309d['scriptType']);if(!_0x9f472||!_0x30309d[_0x1cc541(0x20e)])return null;if(_0x9f472===_0x1cc541(0x208)){const _0x87687f=(_0x30309d['id']?_0x58ae53[_0x1cc541(0x1fd)](_0x30309d['id']):undefined)??findHookLocationByRemoteId(_0xa21053,_0x30309d['id']);if(!_0x87687f)return null;const _0x38b411=_0x87687f[_0x1cc541(0x20b)]||_0x4ffda5[_0x1cc541(0x1fd)](_0x87687f['datasetCode']),_0x1f5dec=_0x38b411??_0x87687f[_0x1cc541(0x200)],_0x54b1ff={..._0x87687f,'alias':_0x38b411},_0xf89043='HOOK/'+_0x1f5dec+'/'+_0x54b1ff[_0x1cc541(0x1f6)]+'/'+_0x54b1ff['functionNode']+'/'+_0x30309d['functionName'];return{'lockKey':_0xf89043,'filePath':resolveLocalFilePathFromLockKey(_0x13d4e5,_0xf89043),'type':_0x1cc541(0x208),'hookLocation':_0x54b1ff};}const _0xfc529d=_0x9f472+'/'+_0x30309d['functionName'];return{'lockKey':_0xfc529d,'filePath':resolveLocalFilePathFromLockKey(_0x13d4e5,_0xfc529d),'type':_0x9f472};}export async function ensureParentDirectory(_0x322ca1){await mkdir(dirname(_0x322ca1),{'recursive':!![]});}export async function fileExists(_0x4d5ed6){const _0xa0523a=a88_0x4c0cb5;try{return await access(_0x4d5ed6,constants[_0xa0523a(0x1ee)]),!![];}catch{return![];}}export async function directoryExists(_0x53c3f7){const _0x5e3fca=a88_0x4c0cb5;try{const _0x4692ea=await stat(_0x53c3f7);return _0x4692ea[_0x5e3fca(0x202)]();}catch{return![];}}
1
+ const a87_0x1dd8c9=a87_0x1ad5;(function(_0x5accc0,_0x38bf83){const _0x18944d=a87_0x1ad5,_0x4358f3=_0x5accc0();while(!![]){try{const _0x1286eb=parseInt(_0x18944d(0x106))/0x1+parseInt(_0x18944d(0xfb))/0x2*(-parseInt(_0x18944d(0xf0))/0x3)+parseInt(_0x18944d(0xec))/0x4*(parseInt(_0x18944d(0xeb))/0x5)+parseInt(_0x18944d(0x104))/0x6+-parseInt(_0x18944d(0xf5))/0x7+-parseInt(_0x18944d(0xe4))/0x8+-parseInt(_0x18944d(0xfd))/0x9*(-parseInt(_0x18944d(0xfa))/0xa);if(_0x1286eb===_0x38bf83)break;else _0x4358f3['push'](_0x4358f3['shift']());}catch(_0x1cc764){_0x4358f3['push'](_0x4358f3['shift']());}}}(a87_0x2221,0x97a27));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=[a87_0x1dd8c9(0xe9),a87_0x1dd8c9(0xea),a87_0x1dd8c9(0xf9)];export function normalizeBffType(_0x135745){const _0x564092=a87_0x1dd8c9;if(!_0x135745)return undefined;const _0x332487=_0x135745['trim']()[_0x564092(0x100)]();return SUPPORTED_BFF_TYPES[_0x564092(0xee)](_0x332487)?_0x332487:undefined;}async function scanJsFilesRecursively(_0x22d10f,_0x1628d5){const _0x51ee2d=a87_0x1dd8c9,_0x51a327=[];try{const _0x51a9a8=await readdir(_0x22d10f,{'withFileTypes':!![]});for(const _0x1dace6 of _0x51a9a8){const _0x3be597=join(_0x22d10f,_0x1dace6[_0x51ee2d(0xe8)]);if(_0x1dace6[_0x51ee2d(0xf2)]())_0x51a327[_0x51ee2d(0x107)](...await scanJsFilesRecursively(_0x3be597,_0x1628d5+'/'+_0x1dace6[_0x51ee2d(0xe8)]));else _0x1dace6[_0x51ee2d(0x102)]()&&_0x1dace6['name'][_0x51ee2d(0xf3)](_0x51ee2d(0x101))&&_0x51a327[_0x51ee2d(0x107)]({'lockKey':_0x1628d5+'/'+_0x1dace6[_0x51ee2d(0xe8)]['replace'](/\.js$/,''),'filePath':_0x3be597});}}catch(_0xa4b866){if(_0xa4b866['code']!==_0x51ee2d(0xff))throw _0xa4b866;}return _0x51a327;}async function scanFlatFunctions(_0x315cf8,_0x385c7f){const _0x7580ae=a87_0x1dd8c9,_0x4cb56a=join(_0x315cf8[_0x7580ae(0xfc)],_0x385c7f),_0x1fb293=await scanJsFilesRecursively(_0x4cb56a,_0x385c7f);return _0x1fb293[_0x7580ae(0xef)](({lockKey:_0x58cea3,filePath:_0xc348cb})=>({'type':_0x385c7f,'name':_0x58cea3[_0x7580ae(0xf7)]('/')['at'](-0x1)??'','filePath':_0xc348cb,'lockKey':_0x58cea3}));}async function scanHookFunctions(_0x3cad37){const _0x45ef0c=a87_0x1dd8c9,_0x32e1a7=join(_0x3cad37[_0x45ef0c(0xfc)],'HOOK'),_0x4659f5=[];try{const _0x53d4f0=await readdir(_0x32e1a7,{'withFileTypes':!![]});for(const _0x2f24bf of _0x53d4f0){if(!_0x2f24bf[_0x45ef0c(0xf2)]())continue;const _0x1c9c4f=_0x2f24bf[_0x45ef0c(0xe8)],_0x5ef1c0=join(_0x32e1a7,_0x1c9c4f),_0x50f48b=await readdir(_0x5ef1c0,{'withFileTypes':!![]});for(const _0x2766bd of _0x50f48b){if(!_0x2766bd[_0x45ef0c(0xf2)]())continue;const _0x31459f=_0x2766bd['name'],_0x7bebda=join(_0x5ef1c0,_0x31459f),_0x452376=await readdir(_0x7bebda,{'withFileTypes':!![]});for(const _0x3b2fcc of _0x452376){if(!_0x3b2fcc[_0x45ef0c(0xf2)]())continue;const _0x1d9036=_0x3b2fcc[_0x45ef0c(0xe8)],_0x35fc63=join(_0x7bebda,_0x1d9036),_0x5b2b48=await readdir(_0x35fc63,{'withFileTypes':!![]});for(const _0x27406e of _0x5b2b48){if(!_0x27406e[_0x45ef0c(0x102)]()||!_0x27406e['name'][_0x45ef0c(0xf3)](_0x45ef0c(0x101)))continue;const _0x575116=_0x27406e[_0x45ef0c(0xe8)][_0x45ef0c(0xf6)](/\.js$/,'');_0x4659f5[_0x45ef0c(0x107)]({'type':'HOOK','name':_0x575116,'filePath':join(_0x35fc63,_0x27406e[_0x45ef0c(0xe8)]),'lockKey':_0x45ef0c(0xf1)+_0x1c9c4f+'/'+_0x31459f+'/'+_0x1d9036+'/'+_0x575116,'alias':_0x1c9c4f,'operationType':_0x31459f,'functionNode':_0x1d9036});}}}}}catch(_0x6aa275){if(_0x6aa275[_0x45ef0c(0xf8)]!=='ENOENT')throw _0x6aa275;}return _0x4659f5;}export async function scanLocalBffFunctions(_0x32f6f4,_0x137cc8){const _0x2be498=a87_0x1dd8c9;if(_0x137cc8===_0x2be498(0xe9)||_0x137cc8==='ENDPOINT')return scanFlatFunctions(_0x32f6f4,_0x137cc8);if(_0x137cc8==='HOOK')return scanHookFunctions(_0x32f6f4);const [_0xbac53,_0xce7f0e,_0x26db00]=await Promise['all']([scanFlatFunctions(_0x32f6f4,_0x2be498(0xe9)),scanFlatFunctions(_0x32f6f4,_0x2be498(0xea)),scanHookFunctions(_0x32f6f4)]);return[..._0xbac53,..._0xce7f0e,..._0x26db00];}function a87_0x1ad5(_0x39b116,_0x1067ab){_0x39b116=_0x39b116-0xe2;const _0x22210a=a87_0x2221();let _0x1ad577=_0x22210a[_0x39b116];return _0x1ad577;}function a87_0x2221(){const _0x4d93c6=['58508CezfZG','after','includes','map','3yAHhsa','HOOK/','isDirectory','endsWith','functionName','853167SLjtyx','replace','split','code','HOOK','130couneq','1012678yURvfd','scriptsRootDir','94356UnhkJL','operationType','ENOENT','toUpperCase','.js','isFile','alias','345048owekCj','get','735785YpoqbN','push','functionNode','scriptType','4697152SjGFUu','datasetCode','beforeScriptId','F_OK','name','COMMON','ENDPOINT','310vqzILg'];a87_0x2221=function(){return _0x4d93c6;};return a87_0x2221();}export function resolveLocalFilePathFromLockKey(_0x4b36bf,_0x56429c){const _0x271063=a87_0x1dd8c9;return join(_0x4b36bf[_0x271063(0xfc)],..._0x56429c['split']('/'))+'.js';}export function createHookLocationMap(_0x43dc88){const _0x528fa5=a87_0x1dd8c9,_0x20218e=new Map();for(const _0x2578d1 of _0x43dc88){_0x2578d1[_0x528fa5(0xe6)]&&_0x20218e['set'](_0x2578d1['beforeScriptId'],{'datasetCode':_0x2578d1[_0x528fa5(0xe5)],'operationType':snakeToCamel(_0x2578d1['operationType']),'functionNode':'before'}),_0x2578d1['afterScriptId']&&_0x20218e['set'](_0x2578d1['afterScriptId'],{'datasetCode':_0x2578d1[_0x528fa5(0xe5)],'operationType':snakeToCamel(_0x2578d1[_0x528fa5(0xfe)]),'functionNode':_0x528fa5(0xed)});}return _0x20218e;}export function resolveRemoteScriptTarget(_0x123e01,_0x1872b3,_0x10e974,_0x2988e4,_0x386d6f){const _0x25a03a=a87_0x1dd8c9,_0x3eda5b=normalizeBffType(_0x1872b3[_0x25a03a(0xe3)]);if(!_0x3eda5b||!_0x1872b3[_0x25a03a(0xf4)])return null;if(_0x3eda5b===_0x25a03a(0xf9)){const _0x131ab6=(_0x1872b3['id']?_0x10e974[_0x25a03a(0x105)](_0x1872b3['id']):undefined)??findHookLocationByRemoteId(_0x2988e4,_0x1872b3['id']);if(!_0x131ab6)return null;const _0x510e13=_0x131ab6[_0x25a03a(0x103)]||_0x386d6f[_0x25a03a(0x105)](_0x131ab6[_0x25a03a(0xe5)]),_0x2cbfb6=_0x510e13??_0x131ab6[_0x25a03a(0xe5)],_0x17fbc0={..._0x131ab6,'alias':_0x510e13},_0xcdf480=_0x25a03a(0xf1)+_0x2cbfb6+'/'+_0x17fbc0[_0x25a03a(0xfe)]+'/'+_0x17fbc0[_0x25a03a(0xe2)]+'/'+_0x1872b3[_0x25a03a(0xf4)];return{'lockKey':_0xcdf480,'filePath':resolveLocalFilePathFromLockKey(_0x123e01,_0xcdf480),'type':'HOOK','hookLocation':_0x17fbc0};}const _0x365632=_0x3eda5b+'/'+_0x1872b3['functionName'];return{'lockKey':_0x365632,'filePath':resolveLocalFilePathFromLockKey(_0x123e01,_0x365632),'type':_0x3eda5b};}export async function ensureParentDirectory(_0x3055a2){await mkdir(dirname(_0x3055a2),{'recursive':!![]});}export async function fileExists(_0x1188d4){const _0x3cd685=a87_0x1dd8c9;try{return await access(_0x1188d4,constants[_0x3cd685(0xe7)]),!![];}catch{return![];}}export async function directoryExists(_0x4aa6b4){const _0x288595=a87_0x1dd8c9;try{const _0x1d867a=await stat(_0x4aa6b4);return _0x1d867a[_0x288595(0xf2)]();}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x1742e1,_0x36f699){const _0x471490=a89_0x358a,_0x5f358d=_0x1742e1();while(!![]){try{const _0x28b770=parseInt(_0x471490(0xc7))/0x1*(-parseInt(_0x471490(0xd1))/0x2)+parseInt(_0x471490(0xc4))/0x3+parseInt(_0x471490(0xd2))/0x4+-parseInt(_0x471490(0xc6))/0x5*(parseInt(_0x471490(0xcd))/0x6)+-parseInt(_0x471490(0xc2))/0x7+-parseInt(_0x471490(0xc5))/0x8*(parseInt(_0x471490(0xcf))/0x9)+parseInt(_0x471490(0xce))/0xa*(parseInt(_0x471490(0xca))/0xb);if(_0x28b770===_0x36f699)break;else _0x5f358d['push'](_0x5f358d['shift']());}catch(_0x57d490){_0x5f358d['push'](_0x5f358d['shift']());}}}(a89_0x219b,0x9708d));import{readFile}from'node:fs/promises';import a89_0x5e5d8b from'node:crypto';function a89_0x358a(_0x6e8f63,_0x37d4a4){_0x6e8f63=_0x6e8f63-0xc2;const _0x219b00=a89_0x219b();let _0x358a74=_0x219b00[_0x6e8f63];return _0x358a74;}export function computeContentHash(_0x484513){const _0x1a79f8=a89_0x358a;return a89_0x5e5d8b[_0x1a79f8(0xcb)](_0x1a79f8(0xd0))[_0x1a79f8(0xc8)](_0x484513)[_0x1a79f8(0xc3)](_0x1a79f8(0xcc));}export async function computeFileHash(_0x4e672d){const _0x3909be=a89_0x358a,_0x541084=await readFile(_0x4e672d,_0x3909be(0xc9));return computeContentHash(_0x541084);}function a89_0x219b(){const _0x1876c3=['digest','1540470RidHOz','8fTrCGn','10PLYeJm','11aCgfIm','update','utf8','15785paeXQk','createHash','hex','3376830mTMnGC','13890yvDXNH','6121422YlwURw','md5','64442dHUKYw','3261148pIgOec','3802092IBylkA'];a89_0x219b=function(){return _0x1876c3;};return a89_0x219b();}
1
+ function a88_0x3bfb(_0x3b9415,_0x242735){_0x3b9415=_0x3b9415-0xb8;const _0x55428b=a88_0x5542();let _0x3bfbc8=_0x55428b[_0x3b9415];return _0x3bfbc8;}(function(_0x84e052,_0x5406e8){const _0x59fa86=a88_0x3bfb,_0x1ef6a3=_0x84e052();while(!![]){try{const _0x1a2ada=parseInt(_0x59fa86(0xbb))/0x1*(parseInt(_0x59fa86(0xba))/0x2)+parseInt(_0x59fa86(0xbe))/0x3*(parseInt(_0x59fa86(0xb8))/0x4)+parseInt(_0x59fa86(0xb9))/0x5+parseInt(_0x59fa86(0xc2))/0x6*(-parseInt(_0x59fa86(0xbd))/0x7)+-parseInt(_0x59fa86(0xc3))/0x8+-parseInt(_0x59fa86(0xbf))/0x9*(parseInt(_0x59fa86(0xbc))/0xa)+parseInt(_0x59fa86(0xc1))/0xb;if(_0x1a2ada===_0x5406e8)break;else _0x1ef6a3['push'](_0x1ef6a3['shift']());}catch(_0xafa4dc){_0x1ef6a3['push'](_0x1ef6a3['shift']());}}}(a88_0x5542,0x5381c));import{readFile}from'node:fs/promises';import a88_0x4f9acd from'node:crypto';function a88_0x5542(){const _0x1d7dfe=['126snnRIM','4158928NlxYNG','md5','1402796TnmJpT','1874835YTvWlT','230414maErbN','4scpGPC','6735810BiRzlF','191401YiujFH','3yewrqe','9CqInpi','utf8','10155200VFeCPf'];a88_0x5542=function(){return _0x1d7dfe;};return a88_0x5542();}export function computeContentHash(_0x940557){const _0x3b6e1b=a88_0x3bfb;return a88_0x4f9acd['createHash'](_0x3b6e1b(0xc4))['update'](_0x940557)['digest']('hex');}export async function computeFileHash(_0x58817f){const _0x4b1c7f=a88_0x3bfb,_0x1c3aae=await readFile(_0x58817f,_0x4b1c7f(0xc0));return computeContentHash(_0x1c3aae);}
@@ -1 +1 @@
1
- (function(_0x52a9eb,_0x20a4a5){const _0x4323d2=a90_0x5787,_0x19ec36=_0x52a9eb();while(!![]){try{const _0x285372=-parseInt(_0x4323d2(0x1b0))/0x1*(parseInt(_0x4323d2(0x1a3))/0x2)+parseInt(_0x4323d2(0x1ae))/0x3*(-parseInt(_0x4323d2(0x1b6))/0x4)+parseInt(_0x4323d2(0x1a7))/0x5+parseInt(_0x4323d2(0x19f))/0x6*(-parseInt(_0x4323d2(0x1b3))/0x7)+parseInt(_0x4323d2(0x1af))/0x8*(parseInt(_0x4323d2(0x1a4))/0x9)+parseInt(_0x4323d2(0x1a2))/0xa*(-parseInt(_0x4323d2(0x1a6))/0xb)+parseInt(_0x4323d2(0x19e))/0xc;if(_0x285372===_0x20a4a5)break;else _0x19ec36['push'](_0x19ec36['shift']());}catch(_0x4f3cf3){_0x19ec36['push'](_0x19ec36['shift']());}}}(a90_0x49e2,0xbdb78));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0xdf6351,_0x3d59af,_0x3d4d8b,_0x2781c5){const _0x3f24cf=a90_0x5787,_0x199ec4={'apps':_0xdf6351['apps']&&typeof _0xdf6351[_0x3f24cf(0x1a1)]===_0x3f24cf(0x1ad)?_0xdf6351[_0x3f24cf(0x1a1)]:{}};let _0x37c001=_0x199ec4[_0x3f24cf(0x1a1)][_0x3d59af];if(!_0x37c001)return _0x37c001={'scriptsRoot':_0x3d4d8b,'lastSync':'','functions':{}},_0x199ec4[_0x3f24cf(0x1a1)][_0x3d59af]=_0x37c001,{'lockData':_0x199ec4,'appLock':_0x37c001};if(!_0x37c001[_0x3f24cf(0x1a0)])_0x37c001[_0x3f24cf(0x1a0)]=_0x3d4d8b;else{if(_0x37c001[_0x3f24cf(0x1a0)]!==_0x3d4d8b)throw new Error(_0x2781c5+_0x3f24cf(0x1a9)+(_0x3f24cf(0x1b1)+_0x3d4d8b+_0x3f24cf(0x1ab)+_0x37c001[_0x3f24cf(0x1a0)]+'\x22.\x20')+_0x3f24cf(0x1a5));}return!_0x37c001[_0x3f24cf(0x1b5)]&&(_0x37c001[_0x3f24cf(0x1b5)]={}),!_0x37c001[_0x3f24cf(0x1ac)]&&(_0x37c001[_0x3f24cf(0x1ac)]=''),{'lockData':_0x199ec4,'appLock':_0x37c001};}export async function readBffLockFile(_0x5c84eb){const _0x30f297=a90_0x5787;try{const _0x8eed36=await readFile(_0x5c84eb,_0x30f297(0x1b4)),_0x3a7cdd=JSON[_0x30f297(0x1b2)](_0x8eed36);return{'apps':_0x3a7cdd[_0x30f297(0x1a1)]&&typeof _0x3a7cdd[_0x30f297(0x1a1)]==='object'?_0x3a7cdd[_0x30f297(0x1a1)]:{}};}catch(_0x5ab142){if(_0x5ab142[_0x30f297(0x1b7)]===_0x30f297(0x1aa))return null;throw new Error(_0x30f297(0x19d)+String(_0x5ab142));}}export async function writeBffLockFile(_0x47b1ae,_0x6f94fe){const _0x39adbf=a90_0x5787;await mkdir(dirname(_0x47b1ae),{'recursive':!![]}),await writeFile(_0x47b1ae,JSON[_0x39adbf(0x1a8)](_0x6f94fe,null,0x2),_0x39adbf(0x1b4));}function a90_0x5787(_0xf0c311,_0x36216e){_0xf0c311=_0xf0c311-0x19d;const _0x49e2c7=a90_0x49e2();let _0x5787ca=_0x49e2c7[_0xf0c311];return _0x5787ca;}function a90_0x49e2(){const _0x35f43f=['\x22\x20vs\x20lock\x20\x22','lastSync','object','222yHBBLq','733224VvLvkP','45HgkLji','current\x20\x22','parse','2046401zbUkNG','utf8','functions','19704cywzTA','code','Failed\x20to\x20read\x20BFF\x20lock\x20file:\x20','26614692xrutcI','12AzVFDT','scriptsRoot','apps','280FMATGJ','42528mmzHIN','81jHTrtw','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','590315gOrBxj','5715110nRyGDB','stringify',':\x20scriptsRoot\x20mismatch\x20—\x20','ENOENT'];a90_0x49e2=function(){return _0x35f43f;};return a90_0x49e2();}
1
+ (function(_0x3b58b3,_0x8b8318){const _0x45fe03=a89_0x217c,_0x262bc2=_0x3b58b3();while(!![]){try{const _0x39236c=parseInt(_0x45fe03(0x189))/0x1*(-parseInt(_0x45fe03(0x17d))/0x2)+-parseInt(_0x45fe03(0x17f))/0x3*(parseInt(_0x45fe03(0x188))/0x4)+-parseInt(_0x45fe03(0x17b))/0x5*(parseInt(_0x45fe03(0x17c))/0x6)+-parseInt(_0x45fe03(0x183))/0x7*(parseInt(_0x45fe03(0x176))/0x8)+-parseInt(_0x45fe03(0x178))/0x9+-parseInt(_0x45fe03(0x185))/0xa+parseInt(_0x45fe03(0x186))/0xb;if(_0x39236c===_0x8b8318)break;else _0x262bc2['push'](_0x262bc2['shift']());}catch(_0x39c9a8){_0x262bc2['push'](_0x262bc2['shift']());}}}(a89_0x3a50,0xd9130));import{mkdir,readFile,writeFile}from'node:fs/promises';function a89_0x217c(_0x3334a4,_0x54fd03){_0x3334a4=_0x3334a4-0x172;const _0x3a50e5=a89_0x3a50();let _0x217c67=_0x3a50e5[_0x3334a4];return _0x217c67;}import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x3227f7,_0x3b4f3a,_0x273fe4,_0x474a53){const _0x59b740=a89_0x217c,_0x22cb20={'apps':_0x3227f7[_0x59b740(0x182)]&&typeof _0x3227f7[_0x59b740(0x182)]===_0x59b740(0x181)?_0x3227f7['apps']:{}};let _0x544f7a=_0x22cb20[_0x59b740(0x182)][_0x3b4f3a];if(!_0x544f7a)return _0x544f7a={'scriptsRoot':_0x273fe4,'lastSync':'','functions':{}},_0x22cb20[_0x59b740(0x182)][_0x3b4f3a]=_0x544f7a,{'lockData':_0x22cb20,'appLock':_0x544f7a};if(!_0x544f7a[_0x59b740(0x174)])_0x544f7a[_0x59b740(0x174)]=_0x273fe4;else{if(_0x544f7a[_0x59b740(0x174)]!==_0x273fe4)throw new Error(_0x474a53+_0x59b740(0x180)+(_0x59b740(0x179)+_0x273fe4+'\x22\x20vs\x20lock\x20\x22'+_0x544f7a['scriptsRoot']+'\x22.\x20')+'Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.');}return!_0x544f7a[_0x59b740(0x172)]&&(_0x544f7a[_0x59b740(0x172)]={}),!_0x544f7a['lastSync']&&(_0x544f7a[_0x59b740(0x175)]=''),{'lockData':_0x22cb20,'appLock':_0x544f7a};}export async function readBffLockFile(_0x4d9951){const _0x2f9bbc=a89_0x217c;try{const _0x48981f=await readFile(_0x4d9951,'utf8'),_0x41256f=JSON[_0x2f9bbc(0x177)](_0x48981f);return{'apps':_0x41256f[_0x2f9bbc(0x182)]&&typeof _0x41256f[_0x2f9bbc(0x182)]===_0x2f9bbc(0x181)?_0x41256f[_0x2f9bbc(0x182)]:{}};}catch(_0x46f291){if(_0x46f291[_0x2f9bbc(0x184)]===_0x2f9bbc(0x173))return null;throw new Error(_0x2f9bbc(0x17a)+String(_0x46f291));}}export async function writeBffLockFile(_0x2d5c5d,_0x34f6be){const _0x49968e=a89_0x217c;await mkdir(dirname(_0x2d5c5d),{'recursive':!![]}),await writeFile(_0x2d5c5d,JSON[_0x49968e(0x17e)](_0x34f6be,null,0x2),_0x49968e(0x187));}function a89_0x3a50(){const _0x200835=['784rXngPz','parse','11826072mjyMXM','current\x20\x22','Failed\x20to\x20read\x20BFF\x20lock\x20file:\x20','8192665QsWfyj','6kphXRg','6398hSWKQG','stringify','3tZGckJ',':\x20scriptsRoot\x20mismatch\x20—\x20','object','apps','13727tBZTRy','code','12783330JegnVi','80126079TwkAZH','utf8','4151572uRMQRT','292WwTpzD','functions','ENOENT','scriptsRoot','lastSync'];a89_0x3a50=function(){return _0x200835;};return a89_0x3a50();}
@@ -1 +1 @@
1
- (function(_0x2c818f,_0x5cc21b){const _0x29bb8c=a92_0x20bd,_0x87a87a=_0x2c818f();while(!![]){try{const _0x5090d5=-parseInt(_0x29bb8c(0x79))/0x1*(parseInt(_0x29bb8c(0x72))/0x2)+-parseInt(_0x29bb8c(0x73))/0x3+parseInt(_0x29bb8c(0x77))/0x4*(parseInt(_0x29bb8c(0x78))/0x5)+parseInt(_0x29bb8c(0x7b))/0x6+parseInt(_0x29bb8c(0x82))/0x7*(-parseInt(_0x29bb8c(0x74))/0x8)+-parseInt(_0x29bb8c(0x6e))/0x9*(parseInt(_0x29bb8c(0x81))/0xa)+parseInt(_0x29bb8c(0x70))/0xb*(parseInt(_0x29bb8c(0x7c))/0xc);if(_0x5090d5===_0x5cc21b)break;else _0x87a87a['push'](_0x87a87a['shift']());}catch(_0x2aed2a){_0x87a87a['push'](_0x87a87a['shift']());}}}(a92_0x55a1,0xb4457));export function snakeToCamel(_0xfb057d){const _0x1c97f5=a92_0x20bd;return _0xfb057d[_0x1c97f5(0x7e)]()[_0x1c97f5(0x7f)](/_([a-z])/g,(_0x17b18a,_0x2c259f)=>_0x2c259f[_0x1c97f5(0x75)]());}export function findHookLocationByRemoteId(_0x4f1c5a,_0x35366c){const _0x3aa813=a92_0x20bd;if(!_0x35366c)return undefined;for(const _0x34b90f of Object['values'](_0x4f1c5a)){if(_0x34b90f[_0x3aa813(0x80)]===_0x35366c&&_0x34b90f[_0x3aa813(0x71)]&&_0x34b90f['operationType']&&_0x34b90f[_0x3aa813(0x76)])return{'datasetCode':_0x34b90f[_0x3aa813(0x71)],'operationType':_0x34b90f[_0x3aa813(0x6f)],'functionNode':_0x34b90f[_0x3aa813(0x76)]};}return undefined;}function a92_0x20bd(_0x1086e9,_0x58da1b){_0x1086e9=_0x1086e9-0x6d;const _0x55a160=a92_0x55a1();let _0x20bdb1=_0x55a160[_0x1086e9];return _0x20bdb1;}function a92_0x55a1(){const _0x1a7276=['3247223nHskwv','trim','18KuZbBm','operationType','9224435OxjSvf','datasetCode','6pMJSkY','750798yFJkCU','24OMPClU','toUpperCase','functionNode','8CnMsGN','1548435YXbOwC','340159TfGygQ','after','2166258ZcNFWV','48hXeDTG','test','toLowerCase','replace','remoteId','4669780XFJlFC'];a92_0x55a1=function(){return _0x1a7276;};return a92_0x55a1();}export function extractScriptDescription(_0x102fdc){const _0xea6f3=a92_0x20bd,_0x27b03f=_0x102fdc['match'](/\[\s*脚本描述\s*]\s*(.+)/);return _0x27b03f?.[0x1]?.[_0xea6f3(0x6d)]()||undefined;}export function isValidBffFunctionName(_0x4ec680){const _0x221aa3=a92_0x20bd;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x221aa3(0x7d)](_0x4ec680);}export function normalizeHookFunctionNode(_0x5cd0c1){const _0xca5775=a92_0x20bd;if(!_0x5cd0c1)return undefined;const _0x94fd71=_0x5cd0c1[_0xca5775(0x6d)]()[_0xca5775(0x7e)]();if(_0x94fd71==='before'||_0x94fd71===_0xca5775(0x7a))return _0x94fd71;return undefined;}
1
+ (function(_0x3f30a0,_0x26f683){const _0x2c61b1=a91_0x3640,_0x3273b2=_0x3f30a0();while(!![]){try{const _0x368fa9=parseInt(_0x2c61b1(0x160))/0x1+-parseInt(_0x2c61b1(0x169))/0x2*(parseInt(_0x2c61b1(0x172))/0x3)+-parseInt(_0x2c61b1(0x16e))/0x4+-parseInt(_0x2c61b1(0x170))/0x5*(parseInt(_0x2c61b1(0x167))/0x6)+parseInt(_0x2c61b1(0x16c))/0x7*(parseInt(_0x2c61b1(0x162))/0x8)+parseInt(_0x2c61b1(0x163))/0x9+-parseInt(_0x2c61b1(0x173))/0xa*(parseInt(_0x2c61b1(0x174))/0xb);if(_0x368fa9===_0x26f683)break;else _0x3273b2['push'](_0x3273b2['shift']());}catch(_0x3b9924){_0x3273b2['push'](_0x3273b2['shift']());}}}(a91_0x3d92,0x491ed));export function snakeToCamel(_0x23b20b){const _0x494354=a91_0x3640;return _0x23b20b[_0x494354(0x168)]()[_0x494354(0x16a)](/_([a-z])/g,(_0x179156,_0x55be68)=>_0x55be68[_0x494354(0x16f)]());}export function findHookLocationByRemoteId(_0x4587f3,_0x52fc4e){const _0x31086a=a91_0x3640;if(!_0x52fc4e)return undefined;for(const _0x5532b5 of Object[_0x31086a(0x15f)](_0x4587f3)){if(_0x5532b5['remoteId']===_0x52fc4e&&_0x5532b5[_0x31086a(0x166)]&&_0x5532b5[_0x31086a(0x171)]&&_0x5532b5['functionNode'])return{'datasetCode':_0x5532b5[_0x31086a(0x166)],'operationType':_0x5532b5[_0x31086a(0x171)],'functionNode':_0x5532b5[_0x31086a(0x165)]};}return undefined;}function a91_0x3640(_0x229122,_0x5e65ee){_0x229122=_0x229122-0x15e;const _0x3d92d1=a91_0x3d92();let _0x364092=_0x3d92d1[_0x229122];return _0x364092;}function a91_0x3d92(){const _0x36603d=['test','3595640qscahi','4196421mOfgQt','match','functionNode','datasetCode','56454rWBFot','toLowerCase','1766hOttRe','replace','after','7TuJXVV','before','9484WPRfzD','toUpperCase','270mymhVr','operationType','1107zsgDJD','91850wMeYpX','253QDKcjs','trim','values','431316ETnODT'];a91_0x3d92=function(){return _0x36603d;};return a91_0x3d92();}export function extractScriptDescription(_0x75464b){const _0x24d8e9=a91_0x3640,_0x16f70d=_0x75464b[_0x24d8e9(0x164)](/\[\s*脚本描述\s*]\s*(.+)/);return _0x16f70d?.[0x1]?.[_0x24d8e9(0x15e)]()||undefined;}export function isValidBffFunctionName(_0x28532d){const _0x491956=a91_0x3640;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x491956(0x161)](_0x28532d);}export function normalizeHookFunctionNode(_0x32197e){const _0x351aea=a91_0x3640;if(!_0x32197e)return undefined;const _0x2169fe=_0x32197e['trim']()['toLowerCase']();if(_0x2169fe===_0x351aea(0x16d)||_0x2169fe===_0x351aea(0x16b))return _0x2169fe;return undefined;}
@@ -1 +1 @@
1
- (function(_0x4400ec,_0x5647f6){const _0x943ff2=a93_0x508f,_0x425fd9=_0x4400ec();while(!![]){try{const _0x22c440=parseInt(_0x943ff2(0x115))/0x1*(parseInt(_0x943ff2(0x121))/0x2)+-parseInt(_0x943ff2(0x120))/0x3+-parseInt(_0x943ff2(0x11b))/0x4*(-parseInt(_0x943ff2(0x114))/0x5)+parseInt(_0x943ff2(0x119))/0x6*(-parseInt(_0x943ff2(0x11e))/0x7)+-parseInt(_0x943ff2(0x10a))/0x8+parseInt(_0x943ff2(0x109))/0x9*(parseInt(_0x943ff2(0x11f))/0xa)+parseInt(_0x943ff2(0x10b))/0xb;if(_0x22c440===_0x5647f6)break;else _0x425fd9['push'](_0x425fd9['shift']());}catch(_0x250dc){_0x425fd9['push'](_0x425fd9['shift']());}}}(a93_0x42cd,0xb1dc4));function a93_0x508f(_0x10c8b0,_0x4a6c05){_0x10c8b0=_0x10c8b0-0x107;const _0x42cd66=a93_0x42cd();let _0x508f95=_0x42cd66[_0x10c8b0];return _0x508f95;}function a93_0x42cd(){const _0x18ceb3=['108pqCOBr','isNaN','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','21rTKkXi','10198030GAgcSV','4027215qDwldi','1957948gUCzRs','.\x20Be\x20more\x20specific.','dbName','set','\x22\x20matches\x20multiple\x20databases:\x20','db-','9JIvLbP','3467272vbgffv','13535302BCDciq','toLowerCase','length','has','map','No\x20linked\x20databases\x20found\x20for\x20this\x20app.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','filter','dbId','\x22.\x20Available:\x20','112620koKYfc','1ehCFWc','find','join','entries','2666154krJJbw','No\x20database\x20matching\x20\x22'];a93_0x42cd=function(){return _0x18ceb3;};return a93_0x42cd();}import{listDatasets}from'./api-client.js';const cache=new Map();export async function listDatabases(_0x504760){const _0x4a319a=a93_0x508f;if(cache[_0x4a319a(0x10e)](_0x504760))return cache['get'](_0x504760);const _0x219bc2=await listDatasets(_0x504760),_0x3df02f=new Map();for(const _0x580e58 of _0x219bc2){const _0x242d5e=_0x580e58['dbtableConfig'];_0x242d5e?.[_0x4a319a(0x112)]!=null&&_0x3df02f[_0x4a319a(0x124)](_0x242d5e[_0x4a319a(0x112)],_0x242d5e[_0x4a319a(0x123)]??_0x4a319a(0x108)+_0x242d5e[_0x4a319a(0x112)]);}const _0x2abc89=[..._0x3df02f[_0x4a319a(0x118)]()][_0x4a319a(0x10f)](([_0xe14d2,_0x55da80])=>({'dbId':_0xe14d2,'dbName':_0x55da80}));return cache[_0x4a319a(0x124)](_0x504760,_0x2abc89),_0x2abc89;}export async function resolveDb(_0x296148,_0x6c259f){const _0x31ad84=a93_0x508f,_0x4762d7=await listDatabases(_0x296148);if(_0x4762d7[_0x31ad84(0x10d)]===0x0)return{'resolved':[],'error':_0x31ad84(0x110)};if(!_0x6c259f)return{'resolved':_0x4762d7};const _0x2c5802=Number(_0x6c259f);if(!Number[_0x31ad84(0x11c)](_0x2c5802)){const _0x35b22a=_0x4762d7[_0x31ad84(0x116)](_0x3f4558=>_0x3f4558[_0x31ad84(0x112)]===_0x2c5802);if(_0x35b22a)return{'resolved':[_0x35b22a]};}const _0x165de7=_0x6c259f[_0x31ad84(0x10c)](),_0x55902b=_0x4762d7[_0x31ad84(0x111)](_0x16e476=>_0x16e476[_0x31ad84(0x123)][_0x31ad84(0x10c)]()['includes'](_0x165de7));if(_0x55902b[_0x31ad84(0x10d)]>0x0)return{'resolved':_0x55902b};const _0x5d1054=_0x4762d7[_0x31ad84(0x10f)](_0x229e47=>_0x229e47[_0x31ad84(0x123)]+'\x20('+_0x229e47[_0x31ad84(0x112)]+')')[_0x31ad84(0x117)](',\x20');return{'resolved':[],'error':_0x31ad84(0x11a)+_0x6c259f+_0x31ad84(0x113)+_0x5d1054};}export async function resolveOneDb(_0x4a4473,_0x4ce30d){const _0x27e8be=a93_0x508f,{resolved:_0x21a1a2,error:_0x17595c}=await resolveDb(_0x4a4473,_0x4ce30d);if(_0x17595c)return{'db':null,'error':_0x17595c};if(_0x21a1a2[_0x27e8be(0x10d)]===0x1)return{'db':_0x21a1a2[0x0]};if(!_0x4ce30d){const _0x25442f=_0x21a1a2[_0x27e8be(0x10f)](_0x3193fa=>_0x3193fa[_0x27e8be(0x123)]+'\x20('+_0x3193fa[_0x27e8be(0x112)]+')')[_0x27e8be(0x117)](',\x20');return{'db':null,'error':_0x27e8be(0x11d)+_0x25442f};}const _0x14ac59=_0x21a1a2['map'](_0x3db77f=>_0x3db77f[_0x27e8be(0x123)]+'\x20('+_0x3db77f[_0x27e8be(0x112)]+')')['join'](',\x20');return{'db':null,'error':'\x22'+_0x4ce30d+_0x27e8be(0x107)+_0x14ac59+_0x27e8be(0x122)};}export async function getDbName(_0x446b6d,_0x2bc115){const _0x3bbdd4=a93_0x508f,_0x288a59=await listDatabases(_0x446b6d);return _0x288a59[_0x3bbdd4(0x116)](_0x3acfe6=>_0x3acfe6[_0x3bbdd4(0x112)]===_0x2bc115)?.[_0x3bbdd4(0x123)];}
1
+ (function(_0x1e2d15,_0x3eec98){const _0x3afe9e=a92_0x1bca,_0x4beb8f=_0x1e2d15();while(!![]){try{const _0x213a8a=-parseInt(_0x3afe9e(0xce))/0x1*(-parseInt(_0x3afe9e(0xcf))/0x2)+-parseInt(_0x3afe9e(0xe2))/0x3*(parseInt(_0x3afe9e(0xd3))/0x4)+-parseInt(_0x3afe9e(0xd4))/0x5*(parseInt(_0x3afe9e(0xdb))/0x6)+-parseInt(_0x3afe9e(0xd9))/0x7*(parseInt(_0x3afe9e(0xdf))/0x8)+parseInt(_0x3afe9e(0xdc))/0x9+parseInt(_0x3afe9e(0xd0))/0xa*(parseInt(_0x3afe9e(0xd7))/0xb)+parseInt(_0x3afe9e(0xe4))/0xc*(parseInt(_0x3afe9e(0xe9))/0xd);if(_0x213a8a===_0x3eec98)break;else _0x4beb8f['push'](_0x4beb8f['shift']());}catch(_0x2aec96){_0x4beb8f['push'](_0x4beb8f['shift']());}}}(a92_0x406e,0x8313f));import{listDatasets}from'./api-client.js';function a92_0x406e(){const _0x1879d8=['3231004xfYDsC','135GrKtoo','db-','\x22.\x20Available:\x20','40601zDknGN','filter','7pDjNJI','length','132786yCrcRM','6345918kIZRQN','dbtableConfig','dbId','6950216JnKSol','join','get','3qBDbYx','toLowerCase','12PlSzzj','set','isNaN','has','find','18686057CzxaiP','entries','No\x20linked\x20databases\x20found\x20for\x20this\x20app.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','398SCvclb','2xEjsbc','1810GEJfMR','map','dbName'];a92_0x406e=function(){return _0x1879d8;};return a92_0x406e();}const cache=new Map();export async function listDatabases(_0x560d24){const _0x1b6c35=a92_0x1bca;if(cache[_0x1b6c35(0xe7)](_0x560d24))return cache[_0x1b6c35(0xe1)](_0x560d24);const _0x4beb4b=await listDatasets(_0x560d24),_0x549eff=new Map();for(const _0x24ffbf of _0x4beb4b){const _0x43ebd5=_0x24ffbf[_0x1b6c35(0xdd)];_0x43ebd5?.[_0x1b6c35(0xde)]!=null&&_0x549eff[_0x1b6c35(0xe5)](_0x43ebd5[_0x1b6c35(0xde)],_0x43ebd5[_0x1b6c35(0xd2)]??_0x1b6c35(0xd5)+_0x43ebd5['dbId']);}const _0x5e1374=[..._0x549eff[_0x1b6c35(0xea)]()]['map'](([_0x5c2edc,_0x1cdc2f])=>({'dbId':_0x5c2edc,'dbName':_0x1cdc2f}));return cache[_0x1b6c35(0xe5)](_0x560d24,_0x5e1374),_0x5e1374;}export async function resolveDb(_0x126837,_0x310f14){const _0x438570=a92_0x1bca,_0x1dea85=await listDatabases(_0x126837);if(_0x1dea85[_0x438570(0xda)]===0x0)return{'resolved':[],'error':_0x438570(0xeb)};if(!_0x310f14)return{'resolved':_0x1dea85};const _0x534c1a=Number(_0x310f14);if(!Number[_0x438570(0xe6)](_0x534c1a)){const _0x218188=_0x1dea85[_0x438570(0xe8)](_0x4c0dc2=>_0x4c0dc2[_0x438570(0xde)]===_0x534c1a);if(_0x218188)return{'resolved':[_0x218188]};}const _0x1445c1=_0x310f14[_0x438570(0xe3)](),_0x26d09e=_0x1dea85[_0x438570(0xd8)](_0x3a9ff7=>_0x3a9ff7['dbName'][_0x438570(0xe3)]()['includes'](_0x1445c1));if(_0x26d09e['length']>0x0)return{'resolved':_0x26d09e};const _0x2f3842=_0x1dea85[_0x438570(0xd1)](_0x402074=>_0x402074[_0x438570(0xd2)]+'\x20('+_0x402074[_0x438570(0xde)]+')')[_0x438570(0xe0)](',\x20');return{'resolved':[],'error':'No\x20database\x20matching\x20\x22'+_0x310f14+_0x438570(0xd6)+_0x2f3842};}export async function resolveOneDb(_0x2f9838,_0x4d2887){const _0x505cb3=a92_0x1bca,{resolved:_0x5151d7,error:_0x2c5b38}=await resolveDb(_0x2f9838,_0x4d2887);if(_0x2c5b38)return{'db':null,'error':_0x2c5b38};if(_0x5151d7[_0x505cb3(0xda)]===0x1)return{'db':_0x5151d7[0x0]};if(!_0x4d2887){const _0x17a72a=_0x5151d7[_0x505cb3(0xd1)](_0x5aee82=>_0x5aee82['dbName']+'\x20('+_0x5aee82[_0x505cb3(0xde)]+')')['join'](',\x20');return{'db':null,'error':'Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20'+_0x17a72a};}const _0x31cfb9=_0x5151d7[_0x505cb3(0xd1)](_0x5c5846=>_0x5c5846[_0x505cb3(0xd2)]+'\x20('+_0x5c5846[_0x505cb3(0xde)]+')')[_0x505cb3(0xe0)](',\x20');return{'db':null,'error':'\x22'+_0x4d2887+'\x22\x20matches\x20multiple\x20databases:\x20'+_0x31cfb9+'.\x20Be\x20more\x20specific.'};}function a92_0x1bca(_0x1c0555,_0x1b6b34){_0x1c0555=_0x1c0555-0xce;const _0x406eeb=a92_0x406e();let _0x1bca8f=_0x406eeb[_0x1c0555];return _0x1bca8f;}export async function getDbName(_0x5c3f90,_0x5c1510){const _0x284587=a92_0x1bca,_0x35ca79=await listDatabases(_0x5c3f90);return _0x35ca79['find'](_0x2d6c6c=>_0x2d6c6c['dbId']===_0x5c1510)?.[_0x284587(0xd2)];}
@@ -1 +1 @@
1
- function a94_0x57eb(){const _0x5594d9=['matchAll','trim','replace','9641784oroNyX','push','isDangerous','6723972XGbuBD','add','startsWith','UPDATE','DELETE','DDL','489777PmhMWg','5105403FitJco','unknown\x20table(s)','type','DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save','\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','40054SjRkCu','length','INSERT','reason','12ulFBBz','UNKNOWN','6BtPjrr','2484350wQLKdj','WITH','split','SELECT','6614013MlpJMM','test','DDL\x20statements\x20are\x20blocked\x20from\x20auto-save'];a94_0x57eb=function(){return _0x5594d9;};return a94_0x57eb();}function a94_0x3d3c(_0x212165,_0x37c962){_0x212165=_0x212165-0x1ce;const _0x57ebdc=a94_0x57eb();let _0x3d3cc9=_0x57ebdc[_0x212165];return _0x3d3cc9;}(function(_0x5780bb,_0x2c42a9){const _0x16b33e=a94_0x3d3c,_0x916847=_0x5780bb();while(!![]){try{const _0x5b82e8=parseInt(_0x16b33e(0x1df))/0x1*(parseInt(_0x16b33e(0x1d9))/0x2)+-parseInt(_0x16b33e(0x1d3))/0x3*(-parseInt(_0x16b33e(0x1dd))/0x4)+parseInt(_0x16b33e(0x1e0))/0x5+parseInt(_0x16b33e(0x1ed))/0x6+-parseInt(_0x16b33e(0x1e4))/0x7+-parseInt(_0x16b33e(0x1ea))/0x8+parseInt(_0x16b33e(0x1d4))/0x9;if(_0x5b82e8===_0x2c42a9)break;else _0x916847['push'](_0x916847['shift']());}catch(_0x18c187){_0x916847['push'](_0x916847['shift']());}}}(a94_0x57eb,0x9d630));export function detectSqlType(_0x8437cc){const _0x23f107=a94_0x3d3c;if(!_0x8437cc?.[_0x23f107(0x1e8)]())return{'type':_0x23f107(0x1de),'isSelectOnly':![],'isDangerous':![],'reason':'SQL\x20content\x20is\x20empty'};const _0x10376d=_0x8437cc[_0x23f107(0x1e9)](/#\{[^}]*\}/g,'?')[_0x23f107(0x1e9)](/\$\{[^}]*\}/g,'?')[_0x23f107(0x1e9)](/@[^(\s]+(\([^)]*\))?/g,'')['replace'](/\/\*[\s\S]*?\*\//g,'')[_0x23f107(0x1e8)](),_0x13d9cd=_0x10376d[_0x23f107(0x1e2)]('\x0a');let _0x59b8e4='';for(const _0x31952c of _0x13d9cd){const _0x188819=_0x31952c['trim']();if(!_0x188819||_0x188819['startsWith']('--')||_0x188819['startsWith']('/*'))continue;_0x59b8e4=_0x188819;break;}const _0x2532db=_0x59b8e4['toUpperCase']();if(_0x2532db[_0x23f107(0x1cf)](_0x23f107(0x1e3))||_0x2532db['startsWith'](_0x23f107(0x1e1))){const _0x140e1a=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x23f107(0x1e5)](_0x10376d);return{'type':_0x23f107(0x1e3),'isSelectOnly':!_0x140e1a,'isDangerous':_0x140e1a,'reason':_0x140e1a?'SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT':undefined};}if(_0x2532db['startsWith'](_0x23f107(0x1db)))return{'type':_0x23f107(0x1db),'isSelectOnly':![],'isDangerous':![]};if(_0x2532db[_0x23f107(0x1cf)](_0x23f107(0x1d0)))return{'type':'UPDATE','isSelectOnly':![],'isDangerous':![]};if(_0x2532db[_0x23f107(0x1cf)]('DELETE'))return{'type':_0x23f107(0x1d1),'isSelectOnly':![],'isDangerous':!![],'reason':_0x23f107(0x1d7)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x23f107(0x1e5)](_0x2532db))return{'type':_0x23f107(0x1d2),'isSelectOnly':![],'isDangerous':!![],'reason':_0x23f107(0x1e6)};return{'type':_0x23f107(0x1de),'isSelectOnly':![],'isDangerous':![]};}function extractTables(_0x361374){const _0x4fbb31=a94_0x3d3c,_0x481fa0=_0x361374[_0x4fbb31(0x1e9)](/#\{[^}]*\}/g,'?')[_0x4fbb31(0x1e9)](/\$\{[^}]*\}/g,'?')[_0x4fbb31(0x1e9)](/'[^']*'/g,'\x27\x27')[_0x4fbb31(0x1e9)](/--.*$/gm,'')[_0x4fbb31(0x1e9)](/\/\*[\s\S]*?\*\//g,''),_0x10bbee=[],_0x1d8e50=_0x481fa0['match'](/FROM\s+([^\s,)(]+)/i);if(_0x1d8e50?.[0x1])_0x10bbee[_0x4fbb31(0x1eb)](_0x1d8e50[0x1]['replace'](/[`"]/g,''));for(const _0x2a9400 of _0x481fa0['matchAll'](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){const _0x4e3147=_0x2a9400[0x1]?.[_0x4fbb31(0x1e9)](/[`"]/g,'');if(_0x4e3147&&!_0x10bbee['includes'](_0x4e3147))_0x10bbee[_0x4fbb31(0x1eb)](_0x4e3147);}const _0x3a3bec=_0x481fa0['match'](/INTO\s+([^\s(]+)/i);if(_0x3a3bec?.[0x1]){const _0x431189=_0x3a3bec[0x1][_0x4fbb31(0x1e9)](/[`"]/g,'');if(!_0x10bbee['includes'](_0x431189))_0x10bbee[_0x4fbb31(0x1eb)](_0x431189);}const _0x1623b2=_0x481fa0['match'](/UPDATE\s+([^\s,)(]+)/i);if(_0x1623b2?.[0x1]){const _0x19bb09=_0x1623b2[0x1][_0x4fbb31(0x1e9)](/[`"]/g,'');if(!_0x10bbee['includes'](_0x19bb09))_0x10bbee[_0x4fbb31(0x1eb)](_0x19bb09);}return _0x10bbee;}function extractParameters(_0x56ffbd){const _0x4b17c6=a94_0x3d3c,_0x447309=new Set();for(const _0x969ef3 of _0x56ffbd[_0x4b17c6(0x1e7)](/#\{(\w+)\}/g))if(_0x969ef3[0x1])_0x447309[_0x4b17c6(0x1ce)](_0x969ef3[0x1]);for(const _0x5d0bf6 of _0x56ffbd[_0x4b17c6(0x1e7)](/\$\{(\w+)\}/g))if(_0x5d0bf6[0x1])_0x447309[_0x4b17c6(0x1ce)](_0x5d0bf6[0x1]);return Array['from'](_0x447309);}export function validateSql(_0x5e105a){const _0x47fc63=a94_0x3d3c,_0x49064d=detectSqlType(_0x5e105a),_0x2d0993=extractTables(_0x5e105a),_0x41087b=extractParameters(_0x5e105a);if(_0x49064d[_0x47fc63(0x1ec)])return{'valid':![],'sqlType':_0x49064d,'tables':_0x2d0993,'parameters':_0x41087b,'message':_0x49064d[_0x47fc63(0x1dc)]||_0x49064d['type']+_0x47fc63(0x1d8)};if(_0x49064d[_0x47fc63(0x1d6)]===_0x47fc63(0x1de))return{'valid':![],'sqlType':_0x49064d,'tables':_0x2d0993,'parameters':_0x41087b,'message':'Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.'};return{'valid':!![],'sqlType':_0x49064d,'tables':_0x2d0993,'parameters':_0x41087b,'message':_0x49064d[_0x47fc63(0x1d6)]+'\x20query\x20targeting\x20'+(_0x2d0993[_0x47fc63(0x1da)]?_0x2d0993['join'](',\x20'):_0x47fc63(0x1d5))+(_0x41087b[_0x47fc63(0x1da)]?'\x20with\x20parameters:\x20'+_0x41087b['join'](',\x20'):'')};}
1
+ (function(_0x26aa74,_0x4e5a8f){const _0x27f8f6=a93_0x3e3e,_0x320581=_0x26aa74();while(!![]){try{const _0x3b08ad=-parseInt(_0x27f8f6(0x135))/0x1*(parseInt(_0x27f8f6(0x12a))/0x2)+-parseInt(_0x27f8f6(0x11a))/0x3*(parseInt(_0x27f8f6(0x137))/0x4)+parseInt(_0x27f8f6(0x116))/0x5*(-parseInt(_0x27f8f6(0x117))/0x6)+-parseInt(_0x27f8f6(0x128))/0x7*(-parseInt(_0x27f8f6(0x131))/0x8)+-parseInt(_0x27f8f6(0x12c))/0x9+parseInt(_0x27f8f6(0x12d))/0xa+parseInt(_0x27f8f6(0x11d))/0xb;if(_0x3b08ad===_0x4e5a8f)break;else _0x320581['push'](_0x320581['shift']());}catch(_0x510954){_0x320581['push'](_0x320581['shift']());}}}(a93_0x31fd,0x6d78a));function a93_0x31fd(){const _0x4933c9=['DDL\x20statements\x20are\x20blocked\x20from\x20auto-save','24vmOOKA','join','DDL','from','match','DELETE','INSERT','75zDusjE','261234urFDMz','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','add','90039erbbAI','replace','unknown\x20table(s)','9645361GYorYc','test','type','length','\x20query\x20targeting\x20','\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','reason','DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save','includes','UNKNOWN','matchAll','1380911KTHMmY','toUpperCase','10TAmvoJ','isDangerous','3027285qOLWmH','6923130bzqmSZ','startsWith','SQL\x20content\x20is\x20empty','trim','8odmKkk','split','UPDATE','push','29703jinHgP'];a93_0x31fd=function(){return _0x4933c9;};return a93_0x31fd();}export function detectSqlType(_0x5795d9){const _0x491613=a93_0x3e3e;if(!_0x5795d9?.[_0x491613(0x130)]())return{'type':_0x491613(0x126),'isSelectOnly':![],'isDangerous':![],'reason':_0x491613(0x12f)};const _0x241992=_0x5795d9[_0x491613(0x11b)](/#\{[^}]*\}/g,'?')[_0x491613(0x11b)](/\$\{[^}]*\}/g,'?')['replace'](/@[^(\s]+(\([^)]*\))?/g,'')[_0x491613(0x11b)](/\/\*[\s\S]*?\*\//g,'')[_0x491613(0x130)](),_0x30ced4=_0x241992[_0x491613(0x132)]('\x0a');let _0x4a74aa='';for(const _0x44057e of _0x30ced4){const _0x45dcd7=_0x44057e['trim']();if(!_0x45dcd7||_0x45dcd7['startsWith']('--')||_0x45dcd7[_0x491613(0x12e)]('/*'))continue;_0x4a74aa=_0x45dcd7;break;}const _0x137ea=_0x4a74aa[_0x491613(0x129)]();if(_0x137ea[_0x491613(0x12e)]('SELECT')||_0x137ea[_0x491613(0x12e)]('WITH')){const _0x409a5e=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x491613(0x11e)](_0x241992);return{'type':'SELECT','isSelectOnly':!_0x409a5e,'isDangerous':_0x409a5e,'reason':_0x409a5e?'SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT':undefined};}if(_0x137ea[_0x491613(0x12e)]('INSERT'))return{'type':_0x491613(0x115),'isSelectOnly':![],'isDangerous':![]};if(_0x137ea[_0x491613(0x12e)](_0x491613(0x133)))return{'type':'UPDATE','isSelectOnly':![],'isDangerous':![]};if(_0x137ea[_0x491613(0x12e)](_0x491613(0x114)))return{'type':_0x491613(0x114),'isSelectOnly':![],'isDangerous':!![],'reason':_0x491613(0x124)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x491613(0x11e)](_0x137ea))return{'type':_0x491613(0x139),'isSelectOnly':![],'isDangerous':!![],'reason':_0x491613(0x136)};return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![]};}function extractTables(_0x205134){const _0x2bd32a=a93_0x3e3e,_0x9b1af2=_0x205134[_0x2bd32a(0x11b)](/#\{[^}]*\}/g,'?')['replace'](/\$\{[^}]*\}/g,'?')[_0x2bd32a(0x11b)](/'[^']*'/g,'\x27\x27')[_0x2bd32a(0x11b)](/--.*$/gm,'')[_0x2bd32a(0x11b)](/\/\*[\s\S]*?\*\//g,''),_0x5c03d8=[],_0x2237c5=_0x9b1af2[_0x2bd32a(0x13b)](/FROM\s+([^\s,)(]+)/i);if(_0x2237c5?.[0x1])_0x5c03d8[_0x2bd32a(0x134)](_0x2237c5[0x1][_0x2bd32a(0x11b)](/[`"]/g,''));for(const _0x56705d of _0x9b1af2['matchAll'](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){const _0x57da84=_0x56705d[0x1]?.[_0x2bd32a(0x11b)](/[`"]/g,'');if(_0x57da84&&!_0x5c03d8['includes'](_0x57da84))_0x5c03d8['push'](_0x57da84);}const _0x50977f=_0x9b1af2[_0x2bd32a(0x13b)](/INTO\s+([^\s(]+)/i);if(_0x50977f?.[0x1]){const _0x2d036f=_0x50977f[0x1][_0x2bd32a(0x11b)](/[`"]/g,'');if(!_0x5c03d8[_0x2bd32a(0x125)](_0x2d036f))_0x5c03d8[_0x2bd32a(0x134)](_0x2d036f);}const _0x33bb67=_0x9b1af2[_0x2bd32a(0x13b)](/UPDATE\s+([^\s,)(]+)/i);if(_0x33bb67?.[0x1]){const _0x29ed2e=_0x33bb67[0x1][_0x2bd32a(0x11b)](/[`"]/g,'');if(!_0x5c03d8[_0x2bd32a(0x125)](_0x29ed2e))_0x5c03d8['push'](_0x29ed2e);}return _0x5c03d8;}function a93_0x3e3e(_0x91e4cd,_0x7aa5f){_0x91e4cd=_0x91e4cd-0x114;const _0x31fd0c=a93_0x31fd();let _0x3e3e8a=_0x31fd0c[_0x91e4cd];return _0x3e3e8a;}function extractParameters(_0xf8aa09){const _0x36e900=a93_0x3e3e,_0x31180a=new Set();for(const _0x206484 of _0xf8aa09[_0x36e900(0x127)](/#\{(\w+)\}/g))if(_0x206484[0x1])_0x31180a[_0x36e900(0x119)](_0x206484[0x1]);for(const _0x446990 of _0xf8aa09[_0x36e900(0x127)](/\$\{(\w+)\}/g))if(_0x446990[0x1])_0x31180a[_0x36e900(0x119)](_0x446990[0x1]);return Array[_0x36e900(0x13a)](_0x31180a);}export function validateSql(_0x5ccd6b){const _0x394169=a93_0x3e3e,_0x44fbd0=detectSqlType(_0x5ccd6b),_0x2c8902=extractTables(_0x5ccd6b),_0x3d0c10=extractParameters(_0x5ccd6b);if(_0x44fbd0[_0x394169(0x12b)])return{'valid':![],'sqlType':_0x44fbd0,'tables':_0x2c8902,'parameters':_0x3d0c10,'message':_0x44fbd0[_0x394169(0x123)]||_0x44fbd0[_0x394169(0x11f)]+_0x394169(0x122)};if(_0x44fbd0[_0x394169(0x11f)]==='UNKNOWN')return{'valid':![],'sqlType':_0x44fbd0,'tables':_0x2c8902,'parameters':_0x3d0c10,'message':_0x394169(0x118)};return{'valid':!![],'sqlType':_0x44fbd0,'tables':_0x2c8902,'parameters':_0x3d0c10,'message':_0x44fbd0[_0x394169(0x11f)]+_0x394169(0x121)+(_0x2c8902[_0x394169(0x120)]?_0x2c8902[_0x394169(0x138)](',\x20'):_0x394169(0x11c))+(_0x3d0c10['length']?'\x20with\x20parameters:\x20'+_0x3d0c10['join'](',\x20'):'')};}
@@ -1 +1 @@
1
- (function(_0x2f6158,_0x48ef7c){const _0x2b8e5d=a95_0x1835,_0x1a517a=_0x2f6158();while(!![]){try{const _0x114e0d=parseInt(_0x2b8e5d(0xe8))/0x1*(-parseInt(_0x2b8e5d(0xef))/0x2)+-parseInt(_0x2b8e5d(0xf3))/0x3+parseInt(_0x2b8e5d(0xdd))/0x4+parseInt(_0x2b8e5d(0xec))/0x5+parseInt(_0x2b8e5d(0xf0))/0x6*(-parseInt(_0x2b8e5d(0xe0))/0x7)+-parseInt(_0x2b8e5d(0xf1))/0x8+parseInt(_0x2b8e5d(0xf2))/0x9;if(_0x114e0d===_0x48ef7c)break;else _0x1a517a['push'](_0x1a517a['shift']());}catch(_0x256029){_0x1a517a['push'](_0x1a517a['shift']());}}}(a95_0x18be,0xeb399));import{existsSync}from'node:fs';import a95_0xc08ee3 from'node:path';import a95_0x51488d from'chalk';function a95_0x1835(_0x43edbf,_0x2d0143){_0x43edbf=_0x43edbf-0xda;const _0x18becc=a95_0x18be();let _0x18358f=_0x18becc[_0x43edbf];return _0x18358f;}import{input,confirm}from'@inquirer/prompts';function a95_0x18be(){const _0x34e41b=['cwd','√\x20App\x20Code:\x20','production','6403720ttsqhd','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','√\x20Login\x20status:\x20','2161330XxUsom','6LjEskW','3082024flEnla','25919415KDAQqq','5007372fjSqrQ','Logged\x20in','trim','Directory\x20\x22','Not\x20set','Skipped','4795060ehKXpK','\x22\x20already\x20exists','Project\x20name:','8826447IXNyJR','env','log','green','resolve','cyan','length','Project\x20name\x20cannot\x20exceed\x2050\x20characters','1oHHufI'];a95_0x18be=function(){return _0x34e41b;};return a95_0x18be();}import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{readConfig}from'../utils/config.js';import{selectSingleAppcode}from'../commands/common/app-selector.js';export async function guidedCreateProject(_0x28ff8e,_0x2ce896,_0x21a1b7){const _0x3ce6a6=a95_0x1835,_0xe1ab15='my-app',_0x1d3736=readConfig(),_0x453fcd=typeof _0x1d3736[_0x3ce6a6(0xe1)]==='string'?_0x1d3736[_0x3ce6a6(0xe1)]:undefined,_0x1fd112=await input({'message':_0x3ce6a6(0xdf),'default':_0xe1ab15,'validate':_0x25a60c=>{const _0x4d604e=_0x3ce6a6,_0x455abd=_0x25a60c[_0x4d604e(0xf5)]()||_0xe1ab15;if(_0x455abd[_0x4d604e(0xe6)]>0x32)return _0x4d604e(0xe7);const _0x3d059c=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x455abd&&!_0x3d059c['test'](_0x455abd))return _0x4d604e(0xed);const _0x581985=a95_0xc08ee3[_0x4d604e(0xe4)](process[_0x4d604e(0xe9)](),_0x455abd);if(existsSync(_0x581985))return _0x4d604e(0xda)+_0x455abd+_0x4d604e(0xde);return!![];}});console['log'](a95_0x51488d[_0x3ce6a6(0xe3)]('√\x20Project\x20Name:\x20'+a95_0x51488d['cyan'](_0x1fd112)));const _0x522251=await selectSingleAppcode(_0x21a1b7);console[_0x3ce6a6(0xe2)](a95_0x51488d[_0x3ce6a6(0xe3)](_0x3ce6a6(0xea)+a95_0x51488d[_0x3ce6a6(0xe5)](_0x522251||_0x3ce6a6(0xdb))));if(_0x522251){const _0xb88e30=await getIsSessionValid();if(!_0xb88e30){const _0x1a7c73=await confirm({'message':'No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','default':!![]});if(_0x1a7c73){const _0x17644b=await authServer({'silent':!![]});console[_0x3ce6a6(0xe2)](a95_0x51488d['green'](_0x3ce6a6(0xee)+a95_0x51488d['cyan'](_0x17644b?_0x3ce6a6(0xf4):'Login\x20failed')));}else console[_0x3ce6a6(0xe2)](a95_0x51488d[_0x3ce6a6(0xe3)](_0x3ce6a6(0xee)+a95_0x51488d[_0x3ce6a6(0xe5)](_0x3ce6a6(0xdc))));}await _0x28ff8e({'projectName':_0x1fd112,'appCode':_0x522251,'env':_0x2ce896||_0x453fcd||_0x3ce6a6(0xeb)});}else await _0x28ff8e({'projectName':_0x1fd112,'env':_0x2ce896||_0x453fcd||_0x3ce6a6(0xeb)});}
1
+ function a94_0x5347(_0x4c060e,_0x26f605){_0x4c060e=_0x4c060e-0x1ac;const _0x2b0842=a94_0x2b08();let _0x5347e2=_0x2b0842[_0x4c060e];return _0x5347e2;}(function(_0x2ec9d9,_0x525027){const _0x5451ac=a94_0x5347,_0x1e87af=_0x2ec9d9();while(!![]){try{const _0x4b5686=parseInt(_0x5451ac(0x1ca))/0x1+-parseInt(_0x5451ac(0x1b5))/0x2+-parseInt(_0x5451ac(0x1ba))/0x3+parseInt(_0x5451ac(0x1b7))/0x4*(parseInt(_0x5451ac(0x1ac))/0x5)+parseInt(_0x5451ac(0x1b2))/0x6*(parseInt(_0x5451ac(0x1bf))/0x7)+-parseInt(_0x5451ac(0x1c9))/0x8*(parseInt(_0x5451ac(0x1bb))/0x9)+-parseInt(_0x5451ac(0x1cb))/0xa*(-parseInt(_0x5451ac(0x1b8))/0xb);if(_0x4b5686===_0x525027)break;else _0x1e87af['push'](_0x1e87af['shift']());}catch(_0x529744){_0x1e87af['push'](_0x1e87af['shift']());}}}(a94_0x2b08,0x1ef6d));import{existsSync}from'node:fs';function a94_0x2b08(){const _0x2dd16f=['11485RqmvnL','\x22\x20already\x20exists','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','resolve','env','√\x20Login\x20status:\x20','294BCgNvM','Project\x20name\x20cannot\x20exceed\x2050\x20characters','cwd','428806nsZoBL','length','404JHjxEm','33mBqBHy','Logged\x20in','227943mIGotf','1170gUgPIM','test','log','green','7987pJOMOt','Directory\x20\x22','Project\x20name:','Not\x20set','cyan','trim','Login\x20failed','my-app','√\x20App\x20Code:\x20','production','1200YmIKjq','109006Palfoq','132670SnoYGr'];a94_0x2b08=function(){return _0x2dd16f;};return a94_0x2b08();}import a94_0x83ff1 from'node:path';import a94_0x5d5097 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{readConfig}from'../utils/config.js';import{selectSingleAppcode}from'../commands/common/app-selector.js';export async function guidedCreateProject(_0x3b2c00,_0x47a3cd,_0x69494b){const _0x181886=a94_0x5347,_0xef629e=_0x181886(0x1c6),_0xc2ccb9=readConfig(),_0x21aa61=typeof _0xc2ccb9[_0x181886(0x1b0)]==='string'?_0xc2ccb9[_0x181886(0x1b0)]:undefined,_0x16b6e9=await input({'message':_0x181886(0x1c1),'default':_0xef629e,'validate':_0x1f7832=>{const _0x494ddc=_0x181886,_0x447c08=_0x1f7832[_0x494ddc(0x1c4)]()||_0xef629e;if(_0x447c08[_0x494ddc(0x1b6)]>0x32)return _0x494ddc(0x1b3);const _0x371070=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x447c08&&!_0x371070[_0x494ddc(0x1bc)](_0x447c08))return _0x494ddc(0x1ae);const _0x5bc859=a94_0x83ff1[_0x494ddc(0x1af)](process[_0x494ddc(0x1b4)](),_0x447c08);if(existsSync(_0x5bc859))return _0x494ddc(0x1c0)+_0x447c08+_0x494ddc(0x1ad);return!![];}});console[_0x181886(0x1bd)](a94_0x5d5097[_0x181886(0x1be)]('√\x20Project\x20Name:\x20'+a94_0x5d5097[_0x181886(0x1c3)](_0x16b6e9)));const _0x1f1eba=await selectSingleAppcode(_0x69494b);console['log'](a94_0x5d5097['green'](_0x181886(0x1c7)+a94_0x5d5097[_0x181886(0x1c3)](_0x1f1eba||_0x181886(0x1c2))));if(_0x1f1eba){const _0xa62e52=await getIsSessionValid();if(!_0xa62e52){const _0x574835=await confirm({'message':'No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','default':!![]});if(_0x574835){const _0x3c4259=await authServer({'silent':!![]});console[_0x181886(0x1bd)](a94_0x5d5097[_0x181886(0x1be)](_0x181886(0x1b1)+a94_0x5d5097['cyan'](_0x3c4259?_0x181886(0x1b9):_0x181886(0x1c5))));}else console[_0x181886(0x1bd)](a94_0x5d5097['green'](_0x181886(0x1b1)+a94_0x5d5097[_0x181886(0x1c3)]('Skipped')));}await _0x3b2c00({'projectName':_0x16b6e9,'appCode':_0x1f1eba,'env':_0x47a3cd||_0x21aa61||_0x181886(0x1c8)});}else await _0x3b2c00({'projectName':_0x16b6e9,'env':_0x47a3cd||_0x21aa61||'production'});}
@@ -1 +1 @@
1
- function a96_0x4c95(){const _0x68ec3d=['7XHSeiQ','replace','2728872hBPyvL','878BINuxj','14740NDcokO','4578604ULNUEB','toFixed','9320298aawRnc','902803uiEXws','now','3933jmcmFi','9885RUGMEF','1511590VRXYLn'];a96_0x4c95=function(){return _0x68ec3d;};return a96_0x4c95();}(function(_0x45700b,_0x5568e5){const _0x517f8f=a96_0x3c3a,_0x1d7b29=_0x45700b();while(!![]){try{const _0x578c88=-parseInt(_0x517f8f(0x147))/0x1+parseInt(_0x517f8f(0x142))/0x2*(parseInt(_0x517f8f(0x14a))/0x3)+parseInt(_0x517f8f(0x144))/0x4+-parseInt(_0x517f8f(0x14b))/0x5+parseInt(_0x517f8f(0x146))/0x6*(-parseInt(_0x517f8f(0x14c))/0x7)+parseInt(_0x517f8f(0x141))/0x8+parseInt(_0x517f8f(0x149))/0x9*(parseInt(_0x517f8f(0x143))/0xa);if(_0x578c88===_0x5568e5)break;else _0x1d7b29['push'](_0x1d7b29['shift']());}catch(_0x664d40){_0x1d7b29['push'](_0x1d7b29['shift']());}}}(a96_0x4c95,0xc7aeb));function a96_0x3c3a(_0xc1a403,_0x40b0c1){_0xc1a403=_0xc1a403-0x141;const _0x4c95d9=a96_0x4c95();let _0x3c3a93=_0x4c95d9[_0xc1a403];return _0x3c3a93;}export function formatElapsed(_0x3c6b3c){const _0x3b2000=a96_0x3c3a,_0x5f1200=Date[_0x3b2000(0x148)]()-_0x3c6b3c;if(_0x5f1200<0x3e8)return _0x5f1200+'ms';const _0x4ecea1=(_0x5f1200/0x3e8)[_0x3b2000(0x145)](0x2),_0x250a92=_0x4ecea1[_0x3b2000(0x14d)](/\.?0+$/u,'');return _0x250a92+'s';}
1
+ (function(_0x4da4b5,_0xf62aee){const _0x505317=a95_0x2a77,_0x2aace1=_0x4da4b5();while(!![]){try{const _0x4b3186=parseInt(_0x505317(0x72))/0x1*(parseInt(_0x505317(0x76))/0x2)+-parseInt(_0x505317(0x6e))/0x3+parseInt(_0x505317(0x75))/0x4*(parseInt(_0x505317(0x70))/0x5)+parseInt(_0x505317(0x74))/0x6*(-parseInt(_0x505317(0x7a))/0x7)+parseInt(_0x505317(0x73))/0x8*(-parseInt(_0x505317(0x78))/0x9)+parseInt(_0x505317(0x6f))/0xa*(-parseInt(_0x505317(0x71))/0xb)+parseInt(_0x505317(0x77))/0xc*(parseInt(_0x505317(0x79))/0xd);if(_0x4b3186===_0xf62aee)break;else _0x2aace1['push'](_0x2aace1['shift']());}catch(_0xb71c7a){_0x2aace1['push'](_0x2aace1['shift']());}}}(a95_0x5e75,0x6368f));function a95_0x2a77(_0x523668,_0x1da3f0){_0x523668=_0x523668-0x6e;const _0x5e75b6=a95_0x5e75();let _0x2a77f5=_0x5e75b6[_0x523668];return _0x2a77f5;}export function formatElapsed(_0x2e09d0){const _0xc4099f=a95_0x2a77,_0x24c42e=Date['now']()-_0x2e09d0;if(_0x24c42e<0x3e8)return _0x24c42e+'ms';const _0x19d9d6=(_0x24c42e/0x3e8)[_0xc4099f(0x7c)](0x2),_0x474b5b=_0x19d9d6[_0xc4099f(0x7b)](/\.?0+$/u,'');return _0x474b5b+'s';}function a95_0x5e75(){const _0x3eb547=['10FkSNDL','10aaMHfn','3957987quEEml','4AhrHBd','72544rWYHNR','797736UjcUkg','1483252vRcOar','3094LSSLhS','565188vppMfU','369GDqhps','403egTYaK','28XXrIkr','replace','toFixed','1611813HxhQxU'];a95_0x5e75=function(){return _0x3eb547;};return a95_0x5e75();}
@@ -1 +1 @@
1
- function a97_0x27d6(_0x11fb11,_0x12d7c0){_0x11fb11=_0x11fb11-0x183;const _0x50ed47=a97_0x50ed();let _0x27d6db=_0x50ed47[_0x11fb11];return _0x27d6db;}(function(_0x461ba3,_0x238e9e){const _0x1f8a33=a97_0x27d6,_0x33e3e7=_0x461ba3();while(!![]){try{const _0x2c9c3c=parseInt(_0x1f8a33(0x186))/0x1+-parseInt(_0x1f8a33(0x19d))/0x2+parseInt(_0x1f8a33(0x1a6))/0x3*(parseInt(_0x1f8a33(0x1c7))/0x4)+-parseInt(_0x1f8a33(0x1a7))/0x5+parseInt(_0x1f8a33(0x1cd))/0x6*(-parseInt(_0x1f8a33(0x1ac))/0x7)+parseInt(_0x1f8a33(0x19b))/0x8+parseInt(_0x1f8a33(0x1c1))/0x9;if(_0x2c9c3c===_0x238e9e)break;else _0x33e3e7['push'](_0x33e3e7['shift']());}catch(_0x4b3f86){_0x33e3e7['push'](_0x33e3e7['shift']());}}}(a97_0x50ed,0x7ac12));import a97_0x1fe3eb from'path';import a97_0x111a94 from'fs';import{fileURLToPath}from'node:url';import a97_0x3ef1a5 from'chalk';import a97_0xa8bff6 from'ora';import{guidedCreateProject}from'./enhanced-guided-create.js';import{fetchModelList}from'../api/fetch-model-list.js';import{generateApiFile}from'../api/generate-api-file.js';import{initEnv}from'../constant/env.js';function a97_0x50ed(){const _0x2abe15=['rmSync','existsSync','更新\x20package.json\x20name','\x20&&\x20rabetbase\x20run\x20start','projectName','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','string','repeat','readFileSync','Project\x20name:\x20','test','appCode','length','join','production','W_OK','6327288XhrFUW','dirname','parse','info','warn','1.0.0','126124byyxBj','cyan','cookie','constants','description','stop','2508816sKnxGR','\x20\x202.\x20Pull\x20API\x20configuration:\x20','gray','writeFileSync','!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','projectCode','utf8','log','API\x20配置拉取异常','setLogPath','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27rabetbase\x20config\x20set\x20appcode\x20<app-code>\x27','API\x20configuration\x20pulled:\x20','500970LeVBjp','error','项目创建完成:\x20','Install\x20dependencies','resolve','toLocaleString','env','Project\x20name\x20cannot\x20be\x20empty','start','chdir','Copy\x20project\x20files','create','package.json','开始创建项目:\x20','success','green','Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','name','\x20√\x20','更新\x20package.json\x20失败','message','4207944KMlBbo','bold','1543552BqEVGt','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','\x20dataset(s),\x20generated\x20','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','fail','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','项目创建失败:\x20','trim','\x20Generated\x20by\x20rabetbase\x20cli\x20','54BIwvJG','3024195Klqprv','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','./src/api/','cwd','🚀\x20Next\x20Steps:','7oUVHMx','√\x20Configuration\x20file\x20created,\x20AppCode:\x20','needsUpgrade','../..','Format\x20code'];a97_0x50ed=function(){return _0x2abe15;};return a97_0x50ed();}import{readConfig}from'../utils/config.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../context.js';import{copyProjectTemplate}from'./use-copy-project-template.js';import{installDependencies}from'./use-install-dependencies.js';import{formatProjectCode}from'./use-format-code.js';import{logger}from'../utils/logger.js';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';import{selectSingleAppcode}from'../commands/common/app-selector.js';export async function createApp(_0x536eab){const _0x3480f5=a97_0x27d6,_0x3c72f6=await checkCliVersion();_0x3c72f6[_0x3480f5(0x1ae)]&&(printCliUpgradeWarning(_0x3c72f6),logger['info']('create','CLI\x20版本检查',{'currentVersion':_0x3c72f6['currentVersion'],'stableVersion':_0x3c72f6['stableVersion'],'needsUpgrade':_0x3c72f6['needsUpgrade']}));if(_0x536eab[_0x3480f5(0x1d2)]&&_0x536eab[_0x3480f5(0x1bc)])await runCreate({'projectName':_0x536eab['projectCode'],'appCode':_0x536eab[_0x3480f5(0x1bc)],'env':_0x536eab[_0x3480f5(0x18c)]},_0x536eab);else{if(_0x536eab[_0x3480f5(0x1d2)]){const _0x2a7cc9=await selectSingleAppcode(_0x536eab[_0x3480f5(0x1c9)]);await runCreate({'projectName':_0x536eab[_0x3480f5(0x1d2)],'appCode':_0x2a7cc9||undefined,'env':_0x536eab[_0x3480f5(0x18c)]},_0x536eab);}else await guidedCreateProject(_0x3177a8=>runCreate(_0x3177a8,_0x536eab),_0x536eab[_0x3480f5(0x18c)],_0x536eab[_0x3480f5(0x1c9)]);}}async function runCreate(_0x3b18a0,_0x1a49a5){const _0x4a99e7=a97_0x27d6;if(!_0x3b18a0[_0x4a99e7(0x1b5)]||_0x3b18a0[_0x4a99e7(0x1b5)][_0x4a99e7(0x1a4)]()==='')throw new Error(_0x4a99e7(0x18d));const _0x51f74f=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x51f74f[_0x4a99e7(0x1bb)](_0x3b18a0[_0x4a99e7(0x1b5)]))throw new Error(_0x4a99e7(0x196));if(_0x3b18a0['projectName'][_0x4a99e7(0x1bd)]>0x64)throw new Error(_0x4a99e7(0x1b6));const _0x4885d1=a97_0x1fe3eb[_0x4a99e7(0x18a)](process[_0x4a99e7(0x1aa)](),_0x3b18a0[_0x4a99e7(0x1b5)]);if(a97_0x111a94['existsSync'](_0x4885d1))throw new Error('Project\x20directory\x20'+_0x3b18a0[_0x4a99e7(0x1b5)]+'\x20already\x20exists');try{a97_0x111a94['accessSync'](a97_0x1fe3eb[_0x4a99e7(0x1c2)](_0x4885d1),a97_0x111a94[_0x4a99e7(0x1ca)][_0x4a99e7(0x1c0)]);}catch{throw new Error(_0x4a99e7(0x1a8));}logger[_0x4a99e7(0x183)](_0x4885d1),logger['info'](_0x4a99e7(0x191),_0x4a99e7(0x193)+_0x3b18a0[_0x4a99e7(0x1b5)],{'projectDir':_0x4885d1,'appCode':_0x3b18a0[_0x4a99e7(0x1bc)]}),console[_0x4a99e7(0x1d4)](),console['log'](a97_0x3ef1a5[_0x4a99e7(0x195)]('\x20√\x20')+_0x4a99e7(0x1ba)+a97_0x3ef1a5[_0x4a99e7(0x195)](_0x3b18a0[_0x4a99e7(0x1b5)])+(_0x3b18a0[_0x4a99e7(0x1bc)]?'\x20|\x20AppCode:\x20'+a97_0x3ef1a5[_0x4a99e7(0x1c8)](_0x3b18a0[_0x4a99e7(0x1bc)]):''));try{await runTask(_0x4a99e7(0x190),()=>copyProjectTemplate(_0x3b18a0[_0x4a99e7(0x1b5)])),await updatePackageJsonName(_0x3b18a0[_0x4a99e7(0x1b5)]),await runTask(_0x4a99e7(0x189),()=>installDependencies(_0x3b18a0[_0x4a99e7(0x1b5)])),await runTask(_0x4a99e7(0x1b0),()=>formatProjectCode(_0x3b18a0[_0x4a99e7(0x1b5)])),await configureAppCode(_0x3b18a0[_0x4a99e7(0x1b5)],_0x3b18a0[_0x4a99e7(0x1bc)]||'',_0x3b18a0['env']);let _0x31917f=![];if(_0x3b18a0[_0x4a99e7(0x1bc)]){console['log']('*\x20Pulling\x20API\x20configuration...');const _0x4aebcd=process[_0x4a99e7(0x1aa)]();try{process[_0x4a99e7(0x18f)](_0x4885d1);const _0x556020=_0x3b18a0[_0x4a99e7(0x18c)]||_0x4a99e7(0x1bf);initEnv(_0x556020);const {configArray:_0x31dc12}=await fetchModelList(_0x3b18a0['appCode'],_0x1a49a5['cookie']||''),_0x52f748=_0x4a99e7(0x1a9),_0x7c7a2a=await generateApiFile(_0x31dc12,'',_0x3b18a0['appCode'],!![],_0x556020,_0x52f748);console[_0x4a99e7(0x1d4)]('√\x20Pulled\x20'+_0x31dc12[_0x4a99e7(0x1bd)]+_0x4a99e7(0x19f)+_0x7c7a2a['modelCount']+'\x20model(s)'),logger[_0x4a99e7(0x1c4)]('create',_0x4a99e7(0x185)+_0x3b18a0[_0x4a99e7(0x1bc)]);}catch(_0x4dc85f){_0x31917f=!![],console[_0x4a99e7(0x1d4)](_0x4a99e7(0x1d1)),logger['warn'](_0x4a99e7(0x191),_0x4a99e7(0x1d5),{'error':_0x4dc85f instanceof Error?_0x4dc85f[_0x4a99e7(0x19a)]:String(_0x4dc85f)});}finally{process[_0x4a99e7(0x18f)](_0x4aebcd);}}logger[_0x4a99e7(0x194)](_0x4a99e7(0x191),_0x4a99e7(0x188)+_0x3b18a0[_0x4a99e7(0x1b5)]),console[_0x4a99e7(0x1d4)](),console[_0x4a99e7(0x1d4)](a97_0x3ef1a5['green']('─'[_0x4a99e7(0x1b8)](0x3c))),console[_0x4a99e7(0x1d4)](a97_0x3ef1a5[_0x4a99e7(0x1c8)][_0x4a99e7(0x19c)](_0x4a99e7(0x1ab))),console[_0x4a99e7(0x1d4)](),console[_0x4a99e7(0x1d4)]('\x20\x201.\x20Start\x20project:\x20'+a97_0x3ef1a5['cyan'][_0x4a99e7(0x19c)]('cd\x20'+_0x3b18a0['projectName']+_0x4a99e7(0x1b4))),_0x31917f&&console[_0x4a99e7(0x1d4)](_0x4a99e7(0x1ce)+a97_0x3ef1a5[_0x4a99e7(0x1c8)][_0x4a99e7(0x19c)]('rabetbase\x20api\x20pull')),console[_0x4a99e7(0x1d4)](a97_0x3ef1a5[_0x4a99e7(0x195)]('─'[_0x4a99e7(0x1b8)](0x3c)));}catch(_0x301b26){logger[_0x4a99e7(0x187)](_0x4a99e7(0x191),_0x4a99e7(0x1a3)+_0x3b18a0['projectName'],{'error':_0x301b26 instanceof Error?_0x301b26[_0x4a99e7(0x19a)]:String(_0x301b26)});try{a97_0x111a94[_0x4a99e7(0x1b2)](_0x4885d1)&&(console[_0x4a99e7(0x1d4)](_0x4a99e7(0x1a0)+_0x4885d1),a97_0x111a94[_0x4a99e7(0x1b1)](_0x4885d1,{'recursive':!![],'force':!![]}));}catch{logger[_0x4a99e7(0x1c5)](_0x4a99e7(0x191),'清理项目目录失败:\x20'+_0x4885d1);}throw _0x301b26;}}async function runTask(_0x2fea42,_0x33c585){const _0x8b71dd=a97_0x27d6,_0x4ca832=a97_0xa8bff6(_0x2fea42+'...')[_0x8b71dd(0x18e)]();try{const _0x53270c=await _0x33c585();_0x4ca832[_0x8b71dd(0x1cc)](),console[_0x8b71dd(0x1d4)](''+a97_0x3ef1a5[_0x8b71dd(0x195)](_0x8b71dd(0x198))+_0x2fea42+'\x20'+a97_0x3ef1a5[_0x8b71dd(0x1cf)]('['+_0x53270c+']'));}catch(_0x481049){_0x4ca832[_0x8b71dd(0x1a1)](_0x2fea42);throw _0x481049;}}async function updatePackageJsonName(_0x53c705){const _0xa21c08=a97_0x27d6,_0x30d662=a97_0x1fe3eb[_0xa21c08(0x18a)](process[_0xa21c08(0x1aa)](),_0x53c705),_0x323bd3=a97_0x1fe3eb[_0xa21c08(0x1be)](_0x30d662,_0xa21c08(0x192));try{console[_0xa21c08(0x1d4)](_0xa21c08(0x1a2));const _0x53ce87=fileURLToPath(import.meta.url),_0x58a9cb=a97_0x1fe3eb[_0xa21c08(0x18a)](a97_0x1fe3eb[_0xa21c08(0x1c2)](_0x53ce87),_0xa21c08(0x1af)),_0x234c69=a97_0x1fe3eb[_0xa21c08(0x1be)](_0x58a9cb,_0xa21c08(0x192));let _0x1082da=_0xa21c08(0x1c6);try{const _0x330f7f=JSON['parse'](a97_0x111a94[_0xa21c08(0x1b9)](_0x234c69,'utf8'));_0x1082da=_0x330f7f['version']||'1.0.0';}catch{}const _0x55a327=a97_0x111a94[_0xa21c08(0x1b9)](_0x323bd3,'utf8'),_0x5603b9=JSON[_0xa21c08(0x1c3)](_0x55a327);_0x5603b9[_0xa21c08(0x197)]=_0x53c705,_0x5603b9[_0xa21c08(0x1cb)]=_0x53c705+_0xa21c08(0x1a5)+_0x1082da,a97_0x111a94[_0xa21c08(0x1d0)](_0x323bd3,JSON['stringify'](_0x5603b9,null,0x2)+'\x0a',_0xa21c08(0x1d3)),console[_0xa21c08(0x1d4)]('√\x20package.json\x20updated:\x20name='+_0x53c705),logger[_0xa21c08(0x1c4)](_0xa21c08(0x191),_0xa21c08(0x1b3));}catch(_0x4483f6){logger[_0xa21c08(0x187)](_0xa21c08(0x191),_0xa21c08(0x199));throw _0x4483f6;}}async function configureAppCode(_0x524112,_0x7f625a,_0xf153cb){const _0x5c9495=a97_0x27d6,_0x431269=a97_0x1fe3eb[_0x5c9495(0x18a)](process['cwd'](),_0x524112),_0x2f77a4=a97_0x1fe3eb['join'](_0x431269,NEW_CONFIG_NAME);try{_0x7f625a?console['log']('*\x20Configuring\x20AppCode\x20for\x20project\x20'+_0x524112+':\x20'+_0x7f625a):console[_0x5c9495(0x1d4)](_0x5c9495(0x19e)+_0x524112);const _0x4b7503=fileURLToPath(import.meta.url),_0x364fa6=a97_0x1fe3eb[_0x5c9495(0x18a)](a97_0x1fe3eb[_0x5c9495(0x1c2)](_0x4b7503),_0x5c9495(0x1af)),_0x5d482e=a97_0x1fe3eb[_0x5c9495(0x1be)](_0x364fa6,_0x5c9495(0x192));let _0x39b554=_0x5c9495(0x1c6);try{const _0x7f9166=JSON[_0x5c9495(0x1c3)](a97_0x111a94[_0x5c9495(0x1b9)](_0x5d482e,_0x5c9495(0x1d3)));_0x39b554=_0x7f9166['version']||_0x5c9495(0x1c6);}catch{}const _0x5191fa=readConfig(),_0x407e6f=typeof _0x5191fa[_0x5c9495(0x18c)]===_0x5c9495(0x1b7)?_0x5191fa[_0x5c9495(0x18c)]:undefined,{app:_0x579268,appcode:_0x5ae8a2,..._0x7e378d}=_0x5191fa,_0x58bcce={..._0x7e378d,'appcode':_0x7f625a||'','env':_0xf153cb||_0x407e6f||'production','createdAt':new Date()[_0x5c9495(0x18b)](),'version':_0x39b554};writeConfigFile(_0x2f77a4,_0x58bcce),_0x7f625a?console['log'](_0x5c9495(0x1ad)+_0x7f625a):console['log'](_0x5c9495(0x184)),logger[_0x5c9495(0x1c4)]('create','配置应用AppCode:\x20'+_0x7f625a);}catch(_0x7adf56){logger[_0x5c9495(0x187)](_0x5c9495(0x191),'配置应用AppCode失败');}}
1
+ (function(_0xa0667f,_0x26c2e8){const _0x21df6c=a96_0x2adb,_0x2aff3f=_0xa0667f();while(!![]){try{const _0x555809=parseInt(_0x21df6c(0x16b))/0x1+-parseInt(_0x21df6c(0x14f))/0x2*(parseInt(_0x21df6c(0x18b))/0x3)+parseInt(_0x21df6c(0x192))/0x4*(parseInt(_0x21df6c(0x157))/0x5)+parseInt(_0x21df6c(0x178))/0x6+parseInt(_0x21df6c(0x184))/0x7*(parseInt(_0x21df6c(0x17f))/0x8)+-parseInt(_0x21df6c(0x179))/0x9*(-parseInt(_0x21df6c(0x19a))/0xa)+-parseInt(_0x21df6c(0x14b))/0xb;if(_0x555809===_0x26c2e8)break;else _0x2aff3f['push'](_0x2aff3f['shift']());}catch(_0x1ac460){_0x2aff3f['push'](_0x2aff3f['shift']());}}}(a96_0x4abc,0x2d820));import a96_0x90dcf2 from'path';import a96_0x5128cc from'fs';import{fileURLToPath}from'node:url';import a96_0x42b0cd from'chalk';import a96_0x266cd7 from'ora';import{guidedCreateProject}from'./enhanced-guided-create.js';import{fetchModelList}from'../api/fetch-model-list.js';import{generateApiFile}from'../api/generate-api-file.js';import{initEnv}from'../constant/env.js';function a96_0x2adb(_0x339105,_0x420cd3){_0x339105=_0x339105-0x13c;const _0x4abc47=a96_0x4abc();let _0x2adbd4=_0x4abc47[_0x339105];return _0x2adbd4;}import{readConfig}from'../utils/config.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../context.js';import{copyProjectTemplate}from'./use-copy-project-template.js';import{installDependencies}from'./use-install-dependencies.js';import{formatProjectCode}from'./use-format-code.js';import{logger}from'../utils/logger.js';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';import{selectSingleAppcode}from'../commands/common/app-selector.js';export async function createApp(_0x4d13f9){const _0x37f01a=a96_0x2adb,_0x40206e=await checkCliVersion();_0x40206e['needsUpgrade']&&(printCliUpgradeWarning(_0x40206e),logger[_0x37f01a(0x15f)](_0x37f01a(0x148),_0x37f01a(0x166),{'currentVersion':_0x40206e[_0x37f01a(0x189)],'stableVersion':_0x40206e[_0x37f01a(0x188)],'needsUpgrade':_0x40206e['needsUpgrade']}));if(_0x4d13f9[_0x37f01a(0x144)]&&_0x4d13f9['appCode'])await runCreate({'projectName':_0x4d13f9['projectCode'],'appCode':_0x4d13f9['appCode'],'env':_0x4d13f9['env']},_0x4d13f9);else{if(_0x4d13f9[_0x37f01a(0x144)]){const _0x3c7ab3=await selectSingleAppcode(_0x4d13f9[_0x37f01a(0x155)]);await runCreate({'projectName':_0x4d13f9[_0x37f01a(0x144)],'appCode':_0x3c7ab3||undefined,'env':_0x4d13f9[_0x37f01a(0x17e)]},_0x4d13f9);}else await guidedCreateProject(_0x1d4f75=>runCreate(_0x1d4f75,_0x4d13f9),_0x4d13f9[_0x37f01a(0x17e)],_0x4d13f9[_0x37f01a(0x155)]);}}async function runCreate(_0x14db7f,_0x6c8db6){const _0x38cc30=a96_0x2adb;if(!_0x14db7f[_0x38cc30(0x13d)]||_0x14db7f[_0x38cc30(0x13d)][_0x38cc30(0x158)]()==='')throw new Error(_0x38cc30(0x13e));const _0x4cf9ab=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x4cf9ab[_0x38cc30(0x141)](_0x14db7f[_0x38cc30(0x13d)]))throw new Error('Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x14db7f[_0x38cc30(0x13d)][_0x38cc30(0x13c)]>0x64)throw new Error(_0x38cc30(0x181));const _0x13cacc=a96_0x90dcf2[_0x38cc30(0x161)](process[_0x38cc30(0x185)](),_0x14db7f[_0x38cc30(0x13d)]);if(a96_0x5128cc[_0x38cc30(0x168)](_0x13cacc))throw new Error(_0x38cc30(0x164)+_0x14db7f[_0x38cc30(0x13d)]+_0x38cc30(0x13f));try{a96_0x5128cc[_0x38cc30(0x15b)](a96_0x90dcf2[_0x38cc30(0x16c)](_0x13cacc),a96_0x5128cc[_0x38cc30(0x156)]['W_OK']);}catch{throw new Error(_0x38cc30(0x159));}logger['setLogPath'](_0x13cacc),logger['info'](_0x38cc30(0x148),_0x38cc30(0x151)+_0x14db7f[_0x38cc30(0x13d)],{'projectDir':_0x13cacc,'appCode':_0x14db7f[_0x38cc30(0x15e)]}),console['log'](),console[_0x38cc30(0x14a)](a96_0x42b0cd[_0x38cc30(0x163)](_0x38cc30(0x160))+'Project\x20name:\x20'+a96_0x42b0cd[_0x38cc30(0x163)](_0x14db7f[_0x38cc30(0x13d)])+(_0x14db7f[_0x38cc30(0x15e)]?_0x38cc30(0x17b)+a96_0x42b0cd[_0x38cc30(0x170)](_0x14db7f['appCode']):''));try{await runTask(_0x38cc30(0x199),()=>copyProjectTemplate(_0x14db7f[_0x38cc30(0x13d)])),await updatePackageJsonName(_0x14db7f[_0x38cc30(0x13d)]),await runTask(_0x38cc30(0x16e),()=>installDependencies(_0x14db7f['projectName'])),await runTask(_0x38cc30(0x162),()=>formatProjectCode(_0x14db7f['projectName'])),await configureAppCode(_0x14db7f[_0x38cc30(0x13d)],_0x14db7f[_0x38cc30(0x15e)]||'',_0x14db7f[_0x38cc30(0x17e)]);let _0x3b9b7d=![];if(_0x14db7f[_0x38cc30(0x15e)]){console[_0x38cc30(0x14a)](_0x38cc30(0x173));const _0x569122=process[_0x38cc30(0x185)]();try{process['chdir'](_0x13cacc);const _0x21abcc=_0x14db7f[_0x38cc30(0x17e)]||_0x38cc30(0x17d);initEnv(_0x21abcc);const {configArray:_0x341279}=await fetchModelList(_0x14db7f[_0x38cc30(0x15e)],_0x6c8db6[_0x38cc30(0x155)]||''),_0x332acc=_0x38cc30(0x15c),_0x477c35=await generateApiFile(_0x341279,'',_0x14db7f[_0x38cc30(0x15e)],!![],_0x21abcc,_0x332acc);console['log'](_0x38cc30(0x171)+_0x341279[_0x38cc30(0x13c)]+_0x38cc30(0x18a)+_0x477c35[_0x38cc30(0x183)]+'\x20model(s)'),logger['info']('create',_0x38cc30(0x186)+_0x14db7f[_0x38cc30(0x15e)]);}catch(_0x428932){_0x3b9b7d=!![],console[_0x38cc30(0x14a)]('!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull'),logger[_0x38cc30(0x176)](_0x38cc30(0x148),_0x38cc30(0x190),{'error':_0x428932 instanceof Error?_0x428932[_0x38cc30(0x16f)]:String(_0x428932)});}finally{process[_0x38cc30(0x18d)](_0x569122);}}logger[_0x38cc30(0x145)](_0x38cc30(0x148),_0x38cc30(0x177)+_0x14db7f['projectName']),console[_0x38cc30(0x14a)](),console['log'](a96_0x42b0cd[_0x38cc30(0x163)]('─'[_0x38cc30(0x193)](0x3c))),console['log'](a96_0x42b0cd['cyan'][_0x38cc30(0x143)](_0x38cc30(0x196))),console[_0x38cc30(0x14a)](),console[_0x38cc30(0x14a)](_0x38cc30(0x16a)+a96_0x42b0cd['cyan']['bold']('cd\x20'+_0x14db7f[_0x38cc30(0x13d)]+'\x20&&\x20'+CLI_BIN_NAME+_0x38cc30(0x140))),_0x3b9b7d&&console[_0x38cc30(0x14a)](_0x38cc30(0x194)+a96_0x42b0cd[_0x38cc30(0x170)][_0x38cc30(0x143)](CLI_BIN_NAME+'\x20api\x20pull')),console['log'](a96_0x42b0cd[_0x38cc30(0x163)]('─'['repeat'](0x3c)));}catch(_0x134852){logger[_0x38cc30(0x167)](_0x38cc30(0x148),_0x38cc30(0x197)+_0x14db7f['projectName'],{'error':_0x134852 instanceof Error?_0x134852[_0x38cc30(0x16f)]:String(_0x134852)});try{a96_0x5128cc[_0x38cc30(0x168)](_0x13cacc)&&(console[_0x38cc30(0x14a)](_0x38cc30(0x142)+_0x13cacc),a96_0x5128cc[_0x38cc30(0x198)](_0x13cacc,{'recursive':!![],'force':!![]}));}catch{logger['warn'](_0x38cc30(0x148),_0x38cc30(0x180)+_0x13cacc);}throw _0x134852;}}function a96_0x4abc(){const _0x2a4ce2=['Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','version','modelCount','175nwNbEL','cwd','API\x20configuration\x20pulled:\x20','配置应用AppCode:\x20','stableVersion','currentVersion','\x20dataset(s),\x20generated\x20','432ojqgaC','1.0.0','chdir','stringify','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','API\x20配置拉取异常','join','30644gZqTnj','repeat','\x20\x202.\x20Pull\x20API\x20configuration:\x20','utf8','🚀\x20Next\x20Steps:','项目创建失败:\x20','rmSync','Copy\x20project\x20files','20OIFQIz','length','projectName','Project\x20name\x20cannot\x20be\x20empty','\x20already\x20exists','\x20run\x20start','test','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','bold','projectCode','success','toLocaleString','*\x20Configuring\x20AppCode\x20for\x20project\x20','create','配置应用AppCode失败','log','7449530ASMnGP','更新\x20package.json\x20name','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','start','4388VwmLRP','readFileSync','开始创建项目:\x20','gray','\x20Generated\x20by\x20rabetbase\x20cli\x20','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','cookie','constants','185MDcVNV','trim','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','package.json','accessSync','./src/api/','√\x20Configuration\x20file\x20created,\x20AppCode:\x20','appCode','info','\x20√\x20','resolve','Format\x20code','green','Project\x20directory\x20','description','CLI\x20版本检查','error','existsSync','stop','\x20\x201.\x20Start\x20project:\x20','288505xYxYXo','dirname','fail','Install\x20dependencies','message','cyan','√\x20Pulled\x20','\x20config\x20set\x20appcode\x20<app-code>\x27','*\x20Pulling\x20API\x20configuration...','../..','parse','warn','项目创建完成:\x20','29898VHZSCD','1213407KlTFhQ','name','\x20|\x20AppCode:\x20','√\x20package.json\x20updated:\x20name=','production','env','106552MyjTxU','清理项目目录失败:\x20'];a96_0x4abc=function(){return _0x2a4ce2;};return a96_0x4abc();}async function runTask(_0x41c6a4,_0x24ca17){const _0x4c324f=a96_0x2adb,_0x24ef0d=a96_0x266cd7(_0x41c6a4+'...')[_0x4c324f(0x14e)]();try{const _0x25182c=await _0x24ca17();_0x24ef0d[_0x4c324f(0x169)](),console[_0x4c324f(0x14a)](''+a96_0x42b0cd[_0x4c324f(0x163)]('\x20√\x20')+_0x41c6a4+'\x20'+a96_0x42b0cd[_0x4c324f(0x152)]('['+_0x25182c+']'));}catch(_0x5730ef){_0x24ef0d[_0x4c324f(0x16d)](_0x41c6a4);throw _0x5730ef;}}async function updatePackageJsonName(_0x74911c){const _0x19cbbd=a96_0x2adb,_0x3ff378=a96_0x90dcf2[_0x19cbbd(0x161)](process[_0x19cbbd(0x185)](),_0x74911c),_0x308570=a96_0x90dcf2[_0x19cbbd(0x191)](_0x3ff378,'package.json');try{console[_0x19cbbd(0x14a)](_0x19cbbd(0x14d));const _0x24631e=fileURLToPath(import.meta.url),_0x3728cf=a96_0x90dcf2[_0x19cbbd(0x161)](a96_0x90dcf2[_0x19cbbd(0x16c)](_0x24631e),_0x19cbbd(0x174)),_0x1ff146=a96_0x90dcf2['join'](_0x3728cf,_0x19cbbd(0x15a));let _0x21ce29=_0x19cbbd(0x18c);try{const _0x398f6f=JSON[_0x19cbbd(0x175)](a96_0x5128cc[_0x19cbbd(0x150)](_0x1ff146,_0x19cbbd(0x195)));_0x21ce29=_0x398f6f[_0x19cbbd(0x182)]||_0x19cbbd(0x18c);}catch{}const _0x386198=a96_0x5128cc['readFileSync'](_0x308570,'utf8'),_0x359f59=JSON['parse'](_0x386198);_0x359f59[_0x19cbbd(0x17a)]=_0x74911c,_0x359f59[_0x19cbbd(0x165)]=_0x74911c+_0x19cbbd(0x153)+_0x21ce29,a96_0x5128cc['writeFileSync'](_0x308570,JSON[_0x19cbbd(0x18e)](_0x359f59,null,0x2)+'\x0a',_0x19cbbd(0x195)),console[_0x19cbbd(0x14a)](_0x19cbbd(0x17c)+_0x74911c),logger[_0x19cbbd(0x15f)](_0x19cbbd(0x148),_0x19cbbd(0x14c));}catch(_0x27236e){logger[_0x19cbbd(0x167)](_0x19cbbd(0x148),'更新\x20package.json\x20失败');throw _0x27236e;}}async function configureAppCode(_0x57fd41,_0x177328,_0x421c8a){const _0x340a20=a96_0x2adb,_0x2d3159=a96_0x90dcf2[_0x340a20(0x161)](process[_0x340a20(0x185)](),_0x57fd41),_0x1ace64=a96_0x90dcf2[_0x340a20(0x191)](_0x2d3159,NEW_CONFIG_NAME);try{_0x177328?console[_0x340a20(0x14a)](_0x340a20(0x147)+_0x57fd41+':\x20'+_0x177328):console[_0x340a20(0x14a)](_0x340a20(0x18f)+_0x57fd41);const _0x4fba3e=fileURLToPath(import.meta.url),_0x53ee9f=a96_0x90dcf2['resolve'](a96_0x90dcf2['dirname'](_0x4fba3e),_0x340a20(0x174)),_0x3408f1=a96_0x90dcf2['join'](_0x53ee9f,'package.json');let _0x1276e4='1.0.0';try{const _0x281292=JSON[_0x340a20(0x175)](a96_0x5128cc['readFileSync'](_0x3408f1,'utf8'));_0x1276e4=_0x281292[_0x340a20(0x182)]||_0x340a20(0x18c);}catch{}const _0x28fbc9=readConfig(),_0x29d6f4=typeof _0x28fbc9[_0x340a20(0x17e)]==='string'?_0x28fbc9['env']:undefined,{app:_0x53e03a,appcode:_0x2df9cf,..._0x413372}=_0x28fbc9,_0x311c0e={..._0x413372,'appcode':_0x177328||'','env':_0x421c8a||_0x29d6f4||_0x340a20(0x17d),'createdAt':new Date()[_0x340a20(0x146)](),'version':_0x1276e4};writeConfigFile(_0x1ace64,_0x311c0e),_0x177328?console[_0x340a20(0x14a)](_0x340a20(0x15d)+_0x177328):console['log'](_0x340a20(0x154)+CLI_BIN_NAME+_0x340a20(0x172)),logger['info'](_0x340a20(0x148),_0x340a20(0x187)+_0x177328);}catch(_0x52e756){logger[_0x340a20(0x167)]('create',_0x340a20(0x149));}}
@@ -1 +1 @@
1
- (function(_0x56282f,_0x3232c8){const _0x364d86=a98_0x2dd1,_0x494de9=_0x56282f();while(!![]){try{const _0x22a36c=parseInt(_0x364d86(0xd5))/0x1+-parseInt(_0x364d86(0xff))/0x2*(-parseInt(_0x364d86(0xce))/0x3)+-parseInt(_0x364d86(0xfa))/0x4*(-parseInt(_0x364d86(0xe6))/0x5)+-parseInt(_0x364d86(0xf4))/0x6+-parseInt(_0x364d86(0xcd))/0x7+parseInt(_0x364d86(0xef))/0x8*(-parseInt(_0x364d86(0xd6))/0x9)+-parseInt(_0x364d86(0xf3))/0xa*(parseInt(_0x364d86(0xfe))/0xb);if(_0x22a36c===_0x3232c8)break;else _0x494de9['push'](_0x494de9['shift']());}catch(_0xb278fb){_0x494de9['push'](_0x494de9['shift']());}}}(a98_0x517f,0xea2ff));import a98_0x20c313 from'path';import{fileURLToPath}from'url';import a98_0x20d6e7 from'fs/promises';import{existsSync}from'fs';import{exec,execSync}from'child_process';function a98_0x2dd1(_0x9cedb6,_0x31d49f){_0x9cedb6=_0x9cedb6-0xca;const _0x517fe4=a98_0x517f();let _0x2dd1a1=_0x517fe4[_0x9cedb6];return _0x2dd1a1;}import{copyDirectory}from'../utils/copy-directory.js';import{promisify}from'util';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';function a98_0x517f(){const _0x40b7cf=['\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','trim','\x20\x20rabetbase\x20run\x20start\x0a','Project\x20name\x20cannot\x20be\x20empty.','writeFile','\x20\x20Installing\x20dependencies...','needsUpgrade','341605GiBmLt','utf-8','\x20\x20√\x20Configuration\x20file\x20created','parse','\x0a√\x20Project\x20','bun\x20run\x20format','\x20\x20√\x20Project\x20template\x20created','name','chdir','1928JezRVr','join','Check\x20directory\x20permissions.','Project\x20name\x20contains\x20invalid\x20characters.','20ZHInie','7574106xuIiFb','\x20\x20√\x20package.json\x20updated','cwd','dirname','resolve','\x20created\x20successfully!','4unPTCm','./src/api/','validation','\x0a\x20\x20cd\x20','695761jmuJOE','180950PBAJmW','toLocaleString','log','string','access','../../templates/projects/sub-app-react-demo','\x20\x20√\x20Code\x20formatted','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`rabetbase\x20api\x20pull`\x20manually\x20later.','1664299vLsSNx','42bSsGjW','\x20\x20√\x20Pulled\x20','stringify','env','length','package.json','...','1380528JNToag','4842KCvcOG','\x20dataset(s),\x20generated\x20','bun','description','\x20model(s)','\x20\x20Pulling\x20API\x20configuration...','Use\x20a\x20different\x20project\x20name.','bun\x20--version','production'];a98_0x517f=function(){return _0x40b7cf;};return a98_0x517f();}import{writeConfigFile,NEW_CONFIG_NAME}from'../context.js';import{readConfig}from'../utils/config.js';import{getCliVersion}from'../utils/version.js';import{CliErrors}from'../errors.js';import{fetchModelList}from'../api/fetch-model-list.js';import{generateApiFile}from'../api/generate-api-file.js';import{initEnv}from'../constant/env.js';const execAsync=promisify(exec);function getTemplateDir(){const _0x424c8c=a98_0x2dd1,_0x2922bb=fileURLToPath(import.meta.url),_0x1ef818=a98_0x20c313[_0x424c8c(0xf7)](_0x2922bb);return a98_0x20c313[_0x424c8c(0xf8)](_0x1ef818,_0x424c8c(0xca));}export async function createProjectNonInteractive(_0x443fec,_0x5652ef,_0x41c9a9,_0x596143){const _0x1a7593=a98_0x2dd1,_0x3ddfc2=await checkCliVersion();_0x3ddfc2[_0x1a7593(0xe5)]&&printCliUpgradeWarning(_0x3ddfc2);if(!_0x443fec||_0x443fec[_0x1a7593(0xe0)]()==='')throw CliErrors[_0x1a7593(0xfc)](_0x1a7593(0xe2));const _0x24c9c4=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x24c9c4['test'](_0x443fec))throw CliErrors[_0x1a7593(0xfc)](_0x1a7593(0xf2),'Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x443fec[_0x1a7593(0xd2)]>0x64)throw CliErrors['validation']('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.');const _0x1fb2b4=a98_0x20c313[_0x1a7593(0xf8)](process[_0x1a7593(0xf6)](),_0x443fec);if(existsSync(_0x1fb2b4))throw CliErrors[_0x1a7593(0xfc)]('Project\x20directory\x20\x22'+_0x443fec+'\x22\x20already\x20exists.',_0x1a7593(0xdc));try{const _0x3249ea=a98_0x20c313[_0x1a7593(0xf7)](_0x1fb2b4);await a98_0x20d6e7[_0x1a7593(0x103)](_0x3249ea,a98_0x20d6e7['constants']['W_OK']);}catch{throw CliErrors[_0x1a7593(0xfc)]('Cannot\x20create\x20project\x20in\x20current\x20directory.',_0x1a7593(0xf1));}try{console[_0x1a7593(0x101)]('*\x20Creating\x20project\x20'+_0x443fec+_0x1a7593(0xd4));const _0x5ac748=getTemplateDir();await copyDirectory(_0x5ac748,_0x1fb2b4),console[_0x1a7593(0x101)](_0x1a7593(0xec)),await updatePackageJsonName(_0x443fec),console[_0x1a7593(0x101)](_0x1a7593(0xf5)),console[_0x1a7593(0x101)](_0x1a7593(0xe4)),console['log'](_0x1a7593(0xdf)),await formatCode(_0x1fb2b4),console[_0x1a7593(0x101)](_0x1a7593(0xcb)),await configureProject(_0x443fec,_0x41c9a9,_0x5652ef),console['log'](_0x1a7593(0xe8)),_0x41c9a9&&await pullApiConfig(_0x1fb2b4,_0x41c9a9,_0x5652ef,_0x596143),console[_0x1a7593(0x101)](_0x1a7593(0xea)+_0x443fec+_0x1a7593(0xf9)),console[_0x1a7593(0x101)](_0x1a7593(0xfd)+_0x443fec),console['log'](_0x1a7593(0xe1));}catch(_0x24128e){try{existsSync(_0x1fb2b4)&&await a98_0x20d6e7['rm'](_0x1fb2b4,{'recursive':!![],'force':!![]});}catch{}throw _0x24128e;}}async function updatePackageJsonName(_0x153600){const _0x2ecbf4=a98_0x2dd1,_0x5e1648=a98_0x20c313[_0x2ecbf4(0xf8)](process[_0x2ecbf4(0xf6)](),_0x153600),_0x52a407=a98_0x20c313['join'](_0x5e1648,_0x2ecbf4(0xd3)),_0x555db4=await a98_0x20d6e7['readFile'](_0x52a407,_0x2ecbf4(0xe7)),_0x232417=JSON[_0x2ecbf4(0xe9)](_0x555db4);_0x232417[_0x2ecbf4(0xed)]=_0x153600,_0x232417[_0x2ecbf4(0xd9)]='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a98_0x20d6e7[_0x2ecbf4(0xe3)](_0x52a407,JSON[_0x2ecbf4(0xd0)](_0x232417,null,0x2)+'\x0a');}function detectPackageManager(){const _0x19f9d0=a98_0x2dd1;try{return execSync(_0x19f9d0(0xdd),{'stdio':'ignore'}),_0x19f9d0(0xd8);}catch{return'npm';}}async function formatCode(_0x30ec61){const _0xfd1d58=a98_0x2dd1;try{await execAsync(_0xfd1d58(0xeb),{'cwd':_0x30ec61});}catch{}}async function configureProject(_0x5e3094,_0x216fae,_0x22cc8b){const _0xc97362=a98_0x2dd1,_0x3c2442=a98_0x20c313[_0xc97362(0xf8)](process['cwd'](),_0x5e3094),_0x2227a1=a98_0x20c313[_0xc97362(0xf0)](_0x3c2442,NEW_CONFIG_NAME),_0x43afdb=readConfig(),_0x1bdf68=typeof _0x43afdb[_0xc97362(0xd1)]===_0xc97362(0x102)?_0x43afdb[_0xc97362(0xd1)]:undefined,{app:_0xa9f692,appcode:_0x26c60c,..._0x49107f}=_0x43afdb,_0x57d20f={..._0x49107f,'appcode':_0x216fae||'','env':_0x22cc8b||_0x1bdf68||_0xc97362(0xde),'createdAt':new Date()[_0xc97362(0x100)](),'version':getCliVersion()};writeConfigFile(_0x2227a1,_0x57d20f);}async function pullApiConfig(_0x1119f9,_0x31b048,_0x428210,_0x6ca852){const _0xaf3baa=a98_0x2dd1,_0x447e28=process[_0xaf3baa(0xf6)]();try{process['chdir'](_0x1119f9);const _0x6ee22e=_0x428210||_0xaf3baa(0xde);initEnv(_0x6ee22e),console[_0xaf3baa(0x101)](_0xaf3baa(0xdb));const {configArray:_0xd32402}=await fetchModelList(_0x31b048,_0x6ca852||''),_0x31c169=await generateApiFile(_0xd32402,'',_0x31b048,!![],_0x6ee22e,_0xaf3baa(0xfb));console[_0xaf3baa(0x101)](_0xaf3baa(0xcf)+_0xd32402[_0xaf3baa(0xd2)]+_0xaf3baa(0xd7)+_0x31c169['modelCount']+_0xaf3baa(0xda));}catch(_0x382497){console['log'](_0xaf3baa(0xcc));}finally{process[_0xaf3baa(0xee)](_0x447e28);}}
1
+ function a97_0x4452(_0x311dcb,_0x294fec){_0x311dcb=_0x311dcb-0x193;const _0x15883a=a97_0x1588();let _0x44522c=_0x15883a[_0x311dcb];return _0x44522c;}(function(_0x3dcb93,_0x3881ae){const _0x13343d=a97_0x4452,_0xe680de=_0x3dcb93();while(!![]){try{const _0x5077cf=parseInt(_0x13343d(0x1bc))/0x1*(-parseInt(_0x13343d(0x1d3))/0x2)+parseInt(_0x13343d(0x196))/0x3*(-parseInt(_0x13343d(0x1ab))/0x4)+-parseInt(_0x13343d(0x1d0))/0x5+-parseInt(_0x13343d(0x1b3))/0x6*(parseInt(_0x13343d(0x1b9))/0x7)+parseInt(_0x13343d(0x1b0))/0x8+-parseInt(_0x13343d(0x194))/0x9+parseInt(_0x13343d(0x1b4))/0xa*(parseInt(_0x13343d(0x19d))/0xb);if(_0x5077cf===_0x3881ae)break;else _0xe680de['push'](_0xe680de['shift']());}catch(_0x20b1d3){_0xe680de['push'](_0xe680de['shift']());}}}(a97_0x1588,0x8cb7a));import a97_0x14f5cf from'path';import{fileURLToPath}from'url';import a97_0x2095ca from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../constant/cli.js';function a97_0x1588(){const _0x1f7265=['89092paoNjE','./src/api/','needsUpgrade','trim','*\x20Creating\x20project\x20','3188736rrGHMF','length','\x22\x20already\x20exists.','330vPEOLn','150KPijlD','\x20\x20rabetbase\x20run\x20start\x0a','\x20created\x20successfully!','Project\x20name\x20cannot\x20be\x20empty.','bun\x20run\x20format','99925yWNAVg','\x0a\x20\x20cd\x20','name','1mnhGjM','Project\x20directory\x20\x22','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','W_OK','Check\x20directory\x20permissions.','\x20api\x20pull`\x20manually\x20later.','bun','\x20\x20√\x20Pulled\x20','Use\x20a\x20different\x20project\x20name.','Project\x20name\x20contains\x20invalid\x20characters.','\x0a√\x20Project\x20','constants','utf-8','\x20\x20Installing\x20dependencies...','\x20model(s)','...','resolve','package.json','\x20\x20√\x20Code\x20formatted','validation','2800460uEsVfC','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','Cannot\x20create\x20project\x20in\x20current\x20directory.','1315162JCKxoc','modelCount','1303722AxKttp','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','123dKJStq','ignore','readFile','writeFile','dirname','join','parse','2374999QDDJkQ','log','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','\x20dataset(s),\x20generated\x20','cwd','\x20\x20√\x20Configuration\x20file\x20created','\x20\x20Pulling\x20API\x20configuration...','toLocaleString','test','bun\x20--version','production','access','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','chdir'];a97_0x1588=function(){return _0x1f7265;};return a97_0x1588();}import{exec,execSync}from'child_process';import{copyDirectory}from'../utils/copy-directory.js';import{promisify}from'util';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../context.js';import{readConfig}from'../utils/config.js';import{getCliVersion}from'../utils/version.js';import{CliErrors}from'../errors.js';import{fetchModelList}from'../api/fetch-model-list.js';import{generateApiFile}from'../api/generate-api-file.js';import{initEnv}from'../constant/env.js';const execAsync=promisify(exec);function getTemplateDir(){const _0x5ea9a8=a97_0x4452,_0x1b8033=fileURLToPath(import.meta.url),_0x45a64c=a97_0x14f5cf[_0x5ea9a8(0x19a)](_0x1b8033);return a97_0x14f5cf['resolve'](_0x45a64c,'../../templates/projects/sub-app-react-demo');}export async function createProjectNonInteractive(_0x4fa746,_0x59ae0c,_0xb22895,_0x224316){const _0x5e0a3c=a97_0x4452,_0x4e6dc6=await checkCliVersion();_0x4e6dc6[_0x5e0a3c(0x1ad)]&&printCliUpgradeWarning(_0x4e6dc6);if(!_0x4fa746||_0x4fa746[_0x5e0a3c(0x1ae)]()==='')throw CliErrors[_0x5e0a3c(0x1cf)](_0x5e0a3c(0x1b7));const _0x31175e=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x31175e[_0x5e0a3c(0x1a5)](_0x4fa746))throw CliErrors[_0x5e0a3c(0x1cf)](_0x5e0a3c(0x1c5),_0x5e0a3c(0x1d1));if(_0x4fa746['length']>0x64)throw CliErrors[_0x5e0a3c(0x1cf)](_0x5e0a3c(0x1be));const _0x5ce153=a97_0x14f5cf['resolve'](process[_0x5e0a3c(0x1a1)](),_0x4fa746);if(existsSync(_0x5ce153))throw CliErrors['validation'](_0x5e0a3c(0x1bd)+_0x4fa746+_0x5e0a3c(0x1b2),_0x5e0a3c(0x1c4));try{const _0x49486b=a97_0x14f5cf[_0x5e0a3c(0x19a)](_0x5ce153);await a97_0x2095ca[_0x5e0a3c(0x1a8)](_0x49486b,a97_0x2095ca[_0x5e0a3c(0x1c7)][_0x5e0a3c(0x1bf)]);}catch{throw CliErrors[_0x5e0a3c(0x1cf)](_0x5e0a3c(0x1d2),_0x5e0a3c(0x1c0));}try{console[_0x5e0a3c(0x19e)](_0x5e0a3c(0x1af)+_0x4fa746+_0x5e0a3c(0x1cb));const _0x35e33f=getTemplateDir();await copyDirectory(_0x35e33f,_0x5ce153),console[_0x5e0a3c(0x19e)]('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x4fa746),console['log']('\x20\x20√\x20package.json\x20updated'),console[_0x5e0a3c(0x19e)](_0x5e0a3c(0x1c9)),console['log'](_0x5e0a3c(0x195)),await formatCode(_0x5ce153),console[_0x5e0a3c(0x19e)](_0x5e0a3c(0x1ce)),await configureProject(_0x4fa746,_0xb22895,_0x59ae0c),console[_0x5e0a3c(0x19e)](_0x5e0a3c(0x1a2)),_0xb22895&&await pullApiConfig(_0x5ce153,_0xb22895,_0x59ae0c,_0x224316),console[_0x5e0a3c(0x19e)](_0x5e0a3c(0x1c6)+_0x4fa746+_0x5e0a3c(0x1b6)),console['log'](_0x5e0a3c(0x1ba)+_0x4fa746),console['log'](_0x5e0a3c(0x1b5));}catch(_0x488712){try{existsSync(_0x5ce153)&&await a97_0x2095ca['rm'](_0x5ce153,{'recursive':!![],'force':!![]});}catch{}throw _0x488712;}}async function updatePackageJsonName(_0x24dec5){const _0x23e9ca=a97_0x4452,_0x2ce788=a97_0x14f5cf['resolve'](process['cwd'](),_0x24dec5),_0x3265ab=a97_0x14f5cf[_0x23e9ca(0x19b)](_0x2ce788,_0x23e9ca(0x1cd)),_0xb3ecb2=await a97_0x2095ca[_0x23e9ca(0x198)](_0x3265ab,_0x23e9ca(0x1c8)),_0x4984b4=JSON[_0x23e9ca(0x19c)](_0xb3ecb2);_0x4984b4[_0x23e9ca(0x1bb)]=_0x24dec5,_0x4984b4['description']=_0x23e9ca(0x1a9),await a97_0x2095ca[_0x23e9ca(0x199)](_0x3265ab,JSON['stringify'](_0x4984b4,null,0x2)+'\x0a');}function detectPackageManager(){const _0x38812e=a97_0x4452;try{return execSync(_0x38812e(0x1a6),{'stdio':_0x38812e(0x197)}),_0x38812e(0x1c2);}catch{return'npm';}}async function formatCode(_0x16f7d9){const _0x5bb7bf=a97_0x4452;try{await execAsync(_0x5bb7bf(0x1b8),{'cwd':_0x16f7d9});}catch{}}async function configureProject(_0x4bccaa,_0x5c1256,_0x52bda4){const _0x1281f6=a97_0x4452,_0x1fa448=a97_0x14f5cf[_0x1281f6(0x1cc)](process[_0x1281f6(0x1a1)](),_0x4bccaa),_0x405585=a97_0x14f5cf['join'](_0x1fa448,NEW_CONFIG_NAME),_0x479382=readConfig(),_0x2bccfd=typeof _0x479382['env']==='string'?_0x479382['env']:undefined,{app:_0x35e0e0,appcode:_0x4242fa,..._0x249780}=_0x479382,_0x21e6ef={..._0x249780,'appcode':_0x5c1256||'','env':_0x52bda4||_0x2bccfd||_0x1281f6(0x1a7),'createdAt':new Date()[_0x1281f6(0x1a4)](),'version':getCliVersion()};writeConfigFile(_0x405585,_0x21e6ef);}async function pullApiConfig(_0x359b66,_0x4bfc0d,_0x3b558e,_0x55b9d6){const _0x5e9d51=a97_0x4452,_0x2a44f6=process[_0x5e9d51(0x1a1)]();try{process['chdir'](_0x359b66);const _0x1b29ce=_0x3b558e||_0x5e9d51(0x1a7);initEnv(_0x1b29ce),console['log'](_0x5e9d51(0x1a3));const {configArray:_0x143240}=await fetchModelList(_0x4bfc0d,_0x55b9d6||''),_0x301494=await generateApiFile(_0x143240,'',_0x4bfc0d,!![],_0x1b29ce,_0x5e9d51(0x1ac));console[_0x5e9d51(0x19e)](_0x5e9d51(0x1c3)+_0x143240[_0x5e9d51(0x1b1)]+_0x5e9d51(0x1a0)+_0x301494[_0x5e9d51(0x193)]+_0x5e9d51(0x1ca));}catch(_0x4dd2af){console[_0x5e9d51(0x19e)](_0x5e9d51(0x19f)+CLI_BIN_NAME+_0x5e9d51(0x1c1));}finally{process[_0x5e9d51(0x1aa)](_0x2a44f6);}}
@@ -1 +1 @@
1
- (function(_0x48cef1,_0x1f97dc){const _0x352b05=a99_0x4c72,_0x209bb4=_0x48cef1();while(!![]){try{const _0x10c8a3=parseInt(_0x352b05(0x85))/0x1*(-parseInt(_0x352b05(0x8b))/0x2)+parseInt(_0x352b05(0x8d))/0x3*(parseInt(_0x352b05(0x7a))/0x4)+parseInt(_0x352b05(0x82))/0x5*(parseInt(_0x352b05(0x7d))/0x6)+parseInt(_0x352b05(0x90))/0x7*(-parseInt(_0x352b05(0x86))/0x8)+parseInt(_0x352b05(0x83))/0x9+parseInt(_0x352b05(0x87))/0xa*(parseInt(_0x352b05(0x89))/0xb)+parseInt(_0x352b05(0x84))/0xc*(parseInt(_0x352b05(0x88))/0xd);if(_0x10c8a3===_0x1f97dc)break;else _0x209bb4['push'](_0x209bb4['shift']());}catch(_0x315d56){_0x209bb4['push'](_0x209bb4['shift']());}}}(a99_0x5bbc,0x6618d));import a99_0x36523c from'node:path';import{fileURLToPath}from'node:url';import{copyDirectory}from'../utils/copy-directory.js';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';const __dirname=a99_0x36523c['dirname'](fileURLToPath(import.meta.url)),templateDir=a99_0x36523c['resolve'](__dirname,'../../templates/projects/sub-app-react-demo');export async function copyProjectTemplate(_0x5574cf){const _0x5bc5c5=a99_0x4c72,_0xf08416=Date[_0x5bc5c5(0x80)](),_0x702ab8=a99_0x36523c[_0x5bc5c5(0x8f)](process[_0x5bc5c5(0x8e)](),_0x5574cf);try{logger[_0x5bc5c5(0x8c)]('copy',_0x5bc5c5(0x7f),{'projectCode':_0x5574cf,'templateDir':templateDir}),await copyDirectory(templateDir,_0x702ab8);const _0x1ca485=Date[_0x5bc5c5(0x80)]()-_0xf08416;logger[_0x5bc5c5(0x8a)](_0x5bc5c5(0x7b),_0x5bc5c5(0x7c),_0x1ca485,{'projectCode':_0x5574cf});}catch(_0x2f7c26){const _0x593d67=Date['now']()-_0xf08416;logger[_0x5bc5c5(0x81)](_0x5bc5c5(0x7b),'项目模板复制失败',{'projectCode':_0x5574cf,'error':_0x2f7c26 instanceof Error?_0x2f7c26[_0x5bc5c5(0x7e)]:String(_0x2f7c26),'duration':_0x593d67});throw _0x2f7c26;}return formatElapsed(_0xf08416);}function a99_0x4c72(_0x38890d,_0x105e4e){_0x38890d=_0x38890d-0x7a;const _0x5bbc0d=a99_0x5bbc();let _0x4c721e=_0x5bbc0d[_0x38890d];return _0x4c721e;}function a99_0x5bbc(){const _0x53f9cd=['344ZuzUQa','1130hfdGhL','2107027DDPZho','23309cSPVGP','success','1590156WkJHdh','info','546YHFBRX','cwd','resolve','107975JbCyeq','14820ZLiJVj','copy','项目模板复制完成','6kgOtTK','message','开始复制项目模板','now','error','1117855cRHvoq','2276793NEJyMs','36vqswfv','1xiyKAM'];a99_0x5bbc=function(){return _0x53f9cd;};return a99_0x5bbc();}
1
+ const a98_0x4c3172=a98_0x3337;(function(_0x39a080,_0xfe5567){const _0x5b70ba=a98_0x3337,_0x304947=_0x39a080();while(!![]){try{const _0xe65624=-parseInt(_0x5b70ba(0x1da))/0x1+-parseInt(_0x5b70ba(0x1e9))/0x2+-parseInt(_0x5b70ba(0x1dc))/0x3*(-parseInt(_0x5b70ba(0x1d4))/0x4)+parseInt(_0x5b70ba(0x1db))/0x5*(parseInt(_0x5b70ba(0x1e7))/0x6)+parseInt(_0x5b70ba(0x1e8))/0x7*(parseInt(_0x5b70ba(0x1e2))/0x8)+-parseInt(_0x5b70ba(0x1e5))/0x9*(-parseInt(_0x5b70ba(0x1ea))/0xa)+parseInt(_0x5b70ba(0x1d9))/0xb*(-parseInt(_0x5b70ba(0x1e6))/0xc);if(_0xe65624===_0xfe5567)break;else _0x304947['push'](_0x304947['shift']());}catch(_0x15d4c1){_0x304947['push'](_0x304947['shift']());}}}(a98_0x2fe3,0xc152e));import a98_0x2a4429 from'node:path';import{fileURLToPath}from'node:url';import{copyDirectory}from'../utils/copy-directory.js';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';const __dirname=a98_0x2a4429[a98_0x4c3172(0x1e4)](fileURLToPath(import.meta.url)),templateDir=a98_0x2a4429[a98_0x4c3172(0x1e1)](__dirname,a98_0x4c3172(0x1e3));export async function copyProjectTemplate(_0x542b9d){const _0x23fa79=a98_0x4c3172,_0x58f831=Date[_0x23fa79(0x1de)](),_0xf6f65e=a98_0x2a4429[_0x23fa79(0x1e1)](process[_0x23fa79(0x1df)](),_0x542b9d);try{logger[_0x23fa79(0x1e0)](_0x23fa79(0x1dd),_0x23fa79(0x1d7),{'projectCode':_0x542b9d,'templateDir':templateDir}),await copyDirectory(templateDir,_0xf6f65e);const _0x1dc8de=Date[_0x23fa79(0x1de)]()-_0x58f831;logger[_0x23fa79(0x1eb)](_0x23fa79(0x1dd),_0x23fa79(0x1d5),_0x1dc8de,{'projectCode':_0x542b9d});}catch(_0xb4044a){const _0x109c2d=Date[_0x23fa79(0x1de)]()-_0x58f831;logger[_0x23fa79(0x1d6)](_0x23fa79(0x1dd),'项目模板复制失败',{'projectCode':_0x542b9d,'error':_0xb4044a instanceof Error?_0xb4044a[_0x23fa79(0x1d8)]:String(_0xb4044a),'duration':_0x109c2d});throw _0xb4044a;}return formatElapsed(_0x58f831);}function a98_0x3337(_0x50d160,_0x113d7a){_0x50d160=_0x50d160-0x1d4;const _0x2fe3c1=a98_0x2fe3();let _0x333745=_0x2fe3c1[_0x50d160];return _0x333745;}function a98_0x2fe3(){const _0x14278d=['272738xtUvXH','7536410itrfuG','success','77460ixvMiv','项目模板复制完成','error','开始复制项目模板','message','11vlSheX','1321340rUTmPb','65xRsbrU','123tgtYrH','copy','now','cwd','info','resolve','6581304SaBYlu','../../templates/projects/sub-app-react-demo','dirname','9AwYUkm','10320972JqTVXV','341250HKrsFB','7JgAamG'];a98_0x2fe3=function(){return _0x14278d;};return a98_0x2fe3();}
@@ -1 +1 @@
1
- (function(_0x574f38,_0x1d6a8d){const _0x1878d7=a100_0x3c35,_0x1e872b=_0x574f38();while(!![]){try{const _0x30f2e3=parseInt(_0x1878d7(0xac))/0x1+-parseInt(_0x1878d7(0xb5))/0x2*(parseInt(_0x1878d7(0xbe))/0x3)+-parseInt(_0x1878d7(0xb0))/0x4+parseInt(_0x1878d7(0xb1))/0x5+-parseInt(_0x1878d7(0xb9))/0x6*(parseInt(_0x1878d7(0xb7))/0x7)+-parseInt(_0x1878d7(0xae))/0x8+-parseInt(_0x1878d7(0xab))/0x9*(-parseInt(_0x1878d7(0xaf))/0xa);if(_0x30f2e3===_0x1d6a8d)break;else _0x1e872b['push'](_0x1e872b['shift']());}catch(_0x2c3d38){_0x1e872b['push'](_0x1e872b['shift']());}}}(a100_0x430d,0xd5ec0));import a100_0x35e921 from'node:path';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';function a100_0x3c35(_0x563d27,_0x5187d1){_0x563d27=_0x563d27-0xab;const _0x430d8=a100_0x430d();let _0x3c35ce=_0x430d8[_0x563d27];return _0x3c35ce;}function a100_0x430d(){const _0x5c76b8=['cwd','resolve','363330WpJXHD','218225FKRqWx','format','2222272ImFmob','230rVEIvE','1864564eUSOfq','4891765iIVlPa','npx','error','info','218840AVJjJh','success','470813ytQrlo','代码格式化完成','6WHcdqi','now','开始格式化代码','--write','prettier','12mCSihV','代码格式化失败'];a100_0x430d=function(){return _0x5c76b8;};return a100_0x430d();}import{logger}from'../utils/logger.js';import{resolveNpmBin}from'../utils/platform.js';export async function formatProjectCode(_0x1a4ad6){const _0x3c6f95=a100_0x3c35,_0xa6a996=Date[_0x3c6f95(0xba)](),_0x213f86=a100_0x35e921[_0x3c6f95(0xc1)](process[_0x3c6f95(0xc0)](),_0x1a4ad6);try{logger[_0x3c6f95(0xb4)](_0x3c6f95(0xad),_0x3c6f95(0xbb),{'projectCode':_0x1a4ad6}),await execa(resolveNpmBin(_0x3c6f95(0xb2)),[_0x3c6f95(0xbd),_0x3c6f95(0xbc),'.'],{'cwd':_0x213f86});const _0x7afce1=Date[_0x3c6f95(0xba)]()-_0xa6a996;logger[_0x3c6f95(0xb6)]('format',_0x3c6f95(0xb8),_0x7afce1,{'projectCode':_0x1a4ad6});}catch(_0x2580c0){const _0x970860=Date[_0x3c6f95(0xba)]()-_0xa6a996;logger[_0x3c6f95(0xb3)](_0x3c6f95(0xad),_0x3c6f95(0xbf),{'projectCode':_0x1a4ad6,'error':_0x2580c0 instanceof Error?_0x2580c0['message']:String(_0x2580c0),'duration':_0x970860});throw _0x2580c0;}return formatElapsed(_0xa6a996);}
1
+ (function(_0x37407d,_0x37658b){const _0x59ed0e=a99_0x1425,_0x2eaa0e=_0x37407d();while(!![]){try{const _0x2cb0a6=parseInt(_0x59ed0e(0xe6))/0x1+-parseInt(_0x59ed0e(0xeb))/0x2*(-parseInt(_0x59ed0e(0xe5))/0x3)+parseInt(_0x59ed0e(0xda))/0x4*(-parseInt(_0x59ed0e(0xea))/0x5)+-parseInt(_0x59ed0e(0xde))/0x6*(parseInt(_0x59ed0e(0xe0))/0x7)+-parseInt(_0x59ed0e(0xef))/0x8*(-parseInt(_0x59ed0e(0xe3))/0x9)+-parseInt(_0x59ed0e(0xe1))/0xa+parseInt(_0x59ed0e(0xdd))/0xb;if(_0x2cb0a6===_0x37658b)break;else _0x2eaa0e['push'](_0x2eaa0e['shift']());}catch(_0x255c3d){_0x2eaa0e['push'](_0x2eaa0e['shift']());}}}(a99_0x2a52,0x6bc7a));import a99_0x158bb9 from'node:path';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';function a99_0x2a52(){const _0x190839=['info','--write','245448CMNjJs','代码格式化完成','npx','2520428KkHQyT','resolve','format','484660rfQtvh','30viUsjj','cwd','790937FXFHgn','7609370opOnjV','success','243oBiRTk','prettier','190122EQWoup','701156GpNNdk','now','message','开始格式化代码','5yoFsoW','26oVvsFK','代码格式化失败'];a99_0x2a52=function(){return _0x190839;};return a99_0x2a52();}function a99_0x1425(_0x539359,_0x424a4f){_0x539359=_0x539359-0xda;const _0x2a5245=a99_0x2a52();let _0x14250b=_0x2a5245[_0x539359];return _0x14250b;}import{logger}from'../utils/logger.js';import{resolveNpmBin}from'../utils/platform.js';export async function formatProjectCode(_0x3c9cd0){const _0x2bd1b2=a99_0x1425,_0x45eacb=Date[_0x2bd1b2(0xe7)](),_0xf7e957=a99_0x158bb9[_0x2bd1b2(0xdb)](process[_0x2bd1b2(0xdf)](),_0x3c9cd0);try{logger[_0x2bd1b2(0xed)](_0x2bd1b2(0xdc),_0x2bd1b2(0xe9),{'projectCode':_0x3c9cd0}),await execa(resolveNpmBin(_0x2bd1b2(0xf1)),[_0x2bd1b2(0xe4),_0x2bd1b2(0xee),'.'],{'cwd':_0xf7e957});const _0x7cf527=Date[_0x2bd1b2(0xe7)]()-_0x45eacb;logger[_0x2bd1b2(0xe2)](_0x2bd1b2(0xdc),_0x2bd1b2(0xf0),_0x7cf527,{'projectCode':_0x3c9cd0});}catch(_0x15cbf0){const _0x3acf64=Date['now']()-_0x45eacb;logger['error'](_0x2bd1b2(0xdc),_0x2bd1b2(0xec),{'projectCode':_0x3c9cd0,'error':_0x15cbf0 instanceof Error?_0x15cbf0[_0x2bd1b2(0xe8)]:String(_0x15cbf0),'duration':_0x3acf64});throw _0x15cbf0;}return formatElapsed(_0x45eacb);}
@@ -1 +1 @@
1
- function a101_0x18ff(){const _0x429463=['20986UmooyY','8411klwkvV','install','859470daAJZO','依赖安装失败','11312833rEIChy','1092321rPSFtr','error','info','11NtSeBf','依赖安装完成','7492560rsEdVo','9iRSxrp','https://registry.npmmirror.com','resolve','8HEuEBc','--registry','522812jBBkOE','now','40QMWGHC','890eLxAKX','1gpOMQV','15948HfSSSt','success'];a101_0x18ff=function(){return _0x429463;};return a101_0x18ff();}(function(_0x599f09,_0x39c1cd){const _0x340e6f=a101_0x5178,_0x4bb36d=_0x599f09();while(!![]){try{const _0x67f673=parseInt(_0x340e6f(0x8a))/0x1*(parseInt(_0x340e6f(0x90))/0x2)+-parseInt(_0x340e6f(0x81))/0x3*(parseInt(_0x340e6f(0x86))/0x4)+-parseInt(_0x340e6f(0x89))/0x5*(-parseInt(_0x340e6f(0x8b))/0x6)+-parseInt(_0x340e6f(0x92))/0x7*(parseInt(_0x340e6f(0x84))/0x8)+parseInt(_0x340e6f(0x93))/0x9*(parseInt(_0x340e6f(0x88))/0xa)+-parseInt(_0x340e6f(0x7e))/0xb*(-parseInt(_0x340e6f(0x80))/0xc)+parseInt(_0x340e6f(0x8e))/0xd*(parseInt(_0x340e6f(0x8d))/0xe);if(_0x67f673===_0x39c1cd)break;else _0x4bb36d['push'](_0x4bb36d['shift']());}catch(_0x172990){_0x4bb36d['push'](_0x4bb36d['shift']());}}}(a101_0x18ff,0xede04));import a101_0x5b99de from'node:path';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';function a101_0x5178(_0xfd328d,_0x4d85d8){_0xfd328d=_0xfd328d-0x7e;const _0x18ff85=a101_0x18ff();let _0x51789c=_0x18ff85[_0xfd328d];return _0x51789c;}import{resolveNpmBin}from'../utils/platform.js';export async function installDependencies(_0x53e2aa){const _0x13ab10=a101_0x5178,_0xd33429=Date['now'](),_0x14655c=a101_0x5b99de[_0x13ab10(0x83)](process['cwd'](),_0x53e2aa);try{logger[_0x13ab10(0x95)](_0x13ab10(0x8f),'开始安装依赖',{'projectCode':_0x53e2aa,'registry':_0x13ab10(0x82)}),await execa(resolveNpmBin('npm'),[_0x13ab10(0x8f),_0x13ab10(0x85),_0x13ab10(0x82)],{'cwd':_0x14655c});const _0x877c34=Date[_0x13ab10(0x87)]()-_0xd33429;logger[_0x13ab10(0x8c)](_0x13ab10(0x8f),_0x13ab10(0x7f),_0x877c34,{'projectCode':_0x53e2aa});}catch(_0x41a15d){const _0x47255e=Date[_0x13ab10(0x87)]()-_0xd33429;logger[_0x13ab10(0x94)](_0x13ab10(0x8f),_0x13ab10(0x91),{'projectCode':_0x53e2aa,'error':_0x41a15d instanceof Error?_0x41a15d['message']:String(_0x41a15d),'duration':_0x47255e});throw _0x41a15d;}return formatElapsed(_0xd33429);}
1
+ (function(_0x4aa595,_0x415757){const _0x450cea=a100_0x5513,_0x16f518=_0x4aa595();while(!![]){try{const _0x1db04f=parseInt(_0x450cea(0xd3))/0x1*(parseInt(_0x450cea(0xd8))/0x2)+parseInt(_0x450cea(0xca))/0x3+-parseInt(_0x450cea(0xd5))/0x4+parseInt(_0x450cea(0xdc))/0x5+parseInt(_0x450cea(0xcb))/0x6+parseInt(_0x450cea(0xdd))/0x7*(parseInt(_0x450cea(0xc9))/0x8)+-parseInt(_0x450cea(0xd2))/0x9;if(_0x1db04f===_0x415757)break;else _0x16f518['push'](_0x16f518['shift']());}catch(_0xe1f2c5){_0x16f518['push'](_0x16f518['shift']());}}}(a100_0x25d4,0xba15e));import a100_0x509b82 from'node:path';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';function a100_0x5513(_0x209483,_0xb685ee){_0x209483=_0x209483-0xc9;const _0x25d438=a100_0x25d4();let _0x551359=_0x25d438[_0x209483];return _0x551359;}import{resolveNpmBin}from'../utils/platform.js';function a100_0x25d4(){const _0x5a719=['16357770GnhSTv','172sWfTAR','install','5412232cUHagF','error','success','10148IMiVWB','https://registry.npmmirror.com','resolve','依赖安装失败','4578230PMfVho','1044071kEKvpD','72ZyDFbB','1311606amvjXX','2189046TSvUyB','开始安装依赖','info','now','npm','--registry','依赖安装完成'];a100_0x25d4=function(){return _0x5a719;};return a100_0x25d4();}export async function installDependencies(_0x544544){const _0x4f6317=a100_0x5513,_0x42935f=Date[_0x4f6317(0xce)](),_0x3f9453=a100_0x509b82[_0x4f6317(0xda)](process['cwd'](),_0x544544);try{logger[_0x4f6317(0xcd)](_0x4f6317(0xd4),_0x4f6317(0xcc),{'projectCode':_0x544544,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin(_0x4f6317(0xcf)),[_0x4f6317(0xd4),_0x4f6317(0xd0),_0x4f6317(0xd9)],{'cwd':_0x3f9453});const _0x5d2f19=Date[_0x4f6317(0xce)]()-_0x42935f;logger[_0x4f6317(0xd7)]('install',_0x4f6317(0xd1),_0x5d2f19,{'projectCode':_0x544544});}catch(_0x32707f){const _0x1dea70=Date['now']()-_0x42935f;logger[_0x4f6317(0xd6)](_0x4f6317(0xd4),_0x4f6317(0xdb),{'projectCode':_0x544544,'error':_0x32707f instanceof Error?_0x32707f['message']:String(_0x32707f),'duration':_0x1dea70});throw _0x32707f;}return formatElapsed(_0x42935f);}
package/lib/errors.js CHANGED
@@ -1 +1 @@
1
- const a102_0x2cbeab=a102_0x4226;(function(_0x293d39,_0x1cc10b){const _0x55c953=a102_0x4226,_0x5a768e=_0x293d39();while(!![]){try{const _0x9744c5=-parseInt(_0x55c953(0xcc))/0x1*(parseInt(_0x55c953(0xdf))/0x2)+parseInt(_0x55c953(0xd0))/0x3+parseInt(_0x55c953(0xc6))/0x4+parseInt(_0x55c953(0xd5))/0x5+parseInt(_0x55c953(0xc5))/0x6*(parseInt(_0x55c953(0xc2))/0x7)+parseInt(_0x55c953(0xd6))/0x8+-parseInt(_0x55c953(0xc3))/0x9;if(_0x9744c5===_0x1cc10b)break;else _0x5a768e['push'](_0x5a768e['shift']());}catch(_0x1c8a9b){_0x5a768e['push'](_0x5a768e['shift']());}}}(a102_0x551b,0xcdad3));function a102_0x4226(_0x4e2695,_0x1d44da){_0x4e2695=_0x4e2695-0xbf;const _0x551bbd=a102_0x551b();let _0x4226ee=_0x551bbd[_0x4e2695];return _0x4226ee;}import{CLI_BIN_NAME}from'./constant/cli.js';export class CliError extends Error{[a102_0x2cbeab(0xc9)];[a102_0x2cbeab(0xda)];[a102_0x2cbeab(0xcd)];constructor(_0x13e232,_0x584379,_0x35078a,_0x38c03a){const _0x2ef350=a102_0x2cbeab;super(_0x35078a),this[_0x2ef350(0xc8)]=_0x2ef350(0xce),this[_0x2ef350(0xc9)]=_0x13e232,this[_0x2ef350(0xda)]=_0x584379,this['hint']=_0x38c03a;}}function a102_0x551b(){const _0x3426d9=['23149818hNsueT','\x20auth`\x20to\x20login\x20first.','2536392dlkwnm','2664044nivHev','not_in_project','name','code','api_error','flag_missing','241mIVqLo','hint','CliError','Authentication\x20required','4916583RWlfGn','Tip:\x20`','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','\x20--help`\x20to\x20see\x20available\x20commands.','auth_required','6887275lPSvXn','355224BQBPai','\x20project\x20directory','validation_error','join','exitCode','Set\x20appcode\x20via\x20`','Operation\x20cancelled.','Run\x20`','Configuration\x20file\x20not\x20found','6098eVFJQQ','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','\x0a\x20\x20\x20\x20\x20\x20\x20','config_missing','7cqxxoO'];a102_0x551b=function(){return _0x3426d9;};return a102_0x551b();}export const CliErrors={'authRequired':_0x52e387=>new CliError(a102_0x2cbeab(0xd4),0x1,a102_0x2cbeab(0xcf),_0x52e387??a102_0x2cbeab(0xdd)+CLI_BIN_NAME+a102_0x2cbeab(0xc4)),'configMissing':_0x3385f0=>new CliError(a102_0x2cbeab(0xc1),0x1,a102_0x2cbeab(0xde),_0x3385f0??[a102_0x2cbeab(0xdb)+CLI_BIN_NAME+a102_0x2cbeab(0xd2),a102_0x2cbeab(0xd1)+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>\x20--global`\x20registers\x20globally\x20so\x20you\x20can\x20use\x20it\x20from\x20anywhere.'][a102_0x2cbeab(0xd9)](a102_0x2cbeab(0xc0))),'notInProject':()=>new CliError(a102_0x2cbeab(0xc7),0x1,'Not\x20in\x20a\x20'+CLI_BIN_NAME+a102_0x2cbeab(0xd7),a102_0x2cbeab(0xbf)),'apiError':(_0x165548,_0x5e5547)=>new CliError(a102_0x2cbeab(0xca),0x2,_0x165548,_0x5e5547),'networkError':_0x38a359=>new CliError('network_error',0x2,'Network\x20error:\x20'+_0x38a359,'Check\x20your\x20internet\x20connection\x20and\x20try\x20again.'),'unknownCommand':_0x2fde63=>new CliError('unknown_command',0x1,'Unknown\x20command:\x20'+_0x2fde63,a102_0x2cbeab(0xdd)+CLI_BIN_NAME+a102_0x2cbeab(0xd3)),'flagMissing':(_0x25c1a3,_0x12ead4)=>new CliError(a102_0x2cbeab(0xcb),0x1,'Missing\x20required\x20flag:\x20--'+_0x25c1a3,_0x12ead4),'validation':(_0x494836,_0x125507)=>new CliError(a102_0x2cbeab(0xd8),0x1,_0x494836,_0x125507),'cancelled':_0x26a2cf=>new CliError('cancelled',0x0,_0x26a2cf??a102_0x2cbeab(0xdc),undefined)};
1
+ function a101_0xaa81(_0x218340,_0x50bf02){_0x218340=_0x218340-0x1a7;const _0x237221=a101_0x2372();let _0xaa81eb=_0x237221[_0x218340];return _0xaa81eb;}const a101_0xaa8993=a101_0xaa81;(function(_0x220038,_0x4771e8){const _0x26c07a=a101_0xaa81,_0x2be45a=_0x220038();while(!![]){try{const _0x31aa38=parseInt(_0x26c07a(0x1b9))/0x1+-parseInt(_0x26c07a(0x1ac))/0x2+-parseInt(_0x26c07a(0x1a8))/0x3*(parseInt(_0x26c07a(0x1c4))/0x4)+-parseInt(_0x26c07a(0x1be))/0x5+parseInt(_0x26c07a(0x1b6))/0x6+-parseInt(_0x26c07a(0x1b0))/0x7+parseInt(_0x26c07a(0x1c0))/0x8;if(_0x31aa38===_0x4771e8)break;else _0x2be45a['push'](_0x2be45a['shift']());}catch(_0x5a065a){_0x2be45a['push'](_0x2be45a['shift']());}}}(a101_0x2372,0xab0aa));function a101_0x2372(){const _0x2cb219=['code','config_missing','Configuration\x20file\x20not\x20found','779810EgQTJr','\x20--help`\x20to\x20see\x20available\x20commands.','14200496RLatii','hint','exitCode','Tip:\x20`','456028GKlFNE','validation_error','Unknown\x20command:\x20','3pkAOfU','unknown_command','name','\x20auth`\x20to\x20login\x20first.','1413500FUAvRB','Network\x20error:\x20','\x0a\x20\x20\x20\x20\x20\x20\x20','join','6664826kiCLRg','Run\x20`','network_error','Set\x20appcode\x20via\x20`','Missing\x20required\x20flag:\x20--','Check\x20your\x20internet\x20connection\x20and\x20try\x20again.','920532onlOKR','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','700939NECrhv','\x20project\x20directory'];a101_0x2372=function(){return _0x2cb219;};return a101_0x2372();}import{CLI_BIN_NAME}from'./constant/cli.js';export class CliError extends Error{[a101_0xaa8993(0x1bb)];['exitCode'];[a101_0xaa8993(0x1c1)];constructor(_0xf5f2c6,_0x2cc999,_0x57e277,_0x5c1c8e){const _0x15f2f5=a101_0xaa8993;super(_0x57e277),this[_0x15f2f5(0x1aa)]='CliError',this[_0x15f2f5(0x1bb)]=_0xf5f2c6,this[_0x15f2f5(0x1c2)]=_0x2cc999,this[_0x15f2f5(0x1c1)]=_0x5c1c8e;}}export const CliErrors={'authRequired':_0xa2f732=>new CliError('auth_required',0x1,'Authentication\x20required',_0xa2f732??a101_0xaa8993(0x1b1)+CLI_BIN_NAME+a101_0xaa8993(0x1ab)),'configMissing':_0x38b9ea=>new CliError(a101_0xaa8993(0x1bc),0x1,a101_0xaa8993(0x1bd),_0x38b9ea??[a101_0xaa8993(0x1b3)+CLI_BIN_NAME+a101_0xaa8993(0x1b7),a101_0xaa8993(0x1c3)+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>\x20--global`\x20registers\x20globally\x20so\x20you\x20can\x20use\x20it\x20from\x20anywhere.'][a101_0xaa8993(0x1af)](a101_0xaa8993(0x1ae))),'notInProject':()=>new CliError('not_in_project',0x1,'Not\x20in\x20a\x20'+CLI_BIN_NAME+a101_0xaa8993(0x1ba),a101_0xaa8993(0x1b8)),'apiError':(_0x373bbd,_0x4e7714)=>new CliError('api_error',0x2,_0x373bbd,_0x4e7714),'networkError':_0x1ded13=>new CliError(a101_0xaa8993(0x1b2),0x2,a101_0xaa8993(0x1ad)+_0x1ded13,a101_0xaa8993(0x1b5)),'unknownCommand':_0x7186b5=>new CliError(a101_0xaa8993(0x1a9),0x1,a101_0xaa8993(0x1a7)+_0x7186b5,a101_0xaa8993(0x1b1)+CLI_BIN_NAME+a101_0xaa8993(0x1bf)),'flagMissing':(_0x1db41f,_0x4a31bf)=>new CliError('flag_missing',0x1,a101_0xaa8993(0x1b4)+_0x1db41f,_0x4a31bf),'validation':(_0xa029a0,_0x5b80f3)=>new CliError(a101_0xaa8993(0x1c5),0x1,_0xa029a0,_0x5b80f3),'cancelled':_0x50bcc7=>new CliError('cancelled',0x0,_0x50bcc7??'Operation\x20cancelled.',undefined)};
@@ -1 +1 @@
1
- (function(_0x2e153b,_0x57fbbf){const _0x39ae75=a103_0xd41c,_0x1bbbe3=_0x2e153b();while(!![]){try{const _0x42f005=parseInt(_0x39ae75(0x13b))/0x1+parseInt(_0x39ae75(0x121))/0x2+parseInt(_0x39ae75(0x143))/0x3+-parseInt(_0x39ae75(0x11f))/0x4*(-parseInt(_0x39ae75(0x123))/0x5)+-parseInt(_0x39ae75(0x133))/0x6*(-parseInt(_0x39ae75(0x141))/0x7)+parseInt(_0x39ae75(0x13e))/0x8+-parseInt(_0x39ae75(0x132))/0x9;if(_0x42f005===_0x57fbbf)break;else _0x1bbbe3['push'](_0x1bbbe3['shift']());}catch(_0x4e5b){_0x1bbbe3['push'](_0x1bbbe3['shift']());}}}(a103_0x58c6,0xa2b79));function a103_0xd41c(_0x4b6e54,_0x1b2b9c){_0x4b6e54=_0x4b6e54-0x11f;const _0x58c698=a103_0x58c6();let _0xd41c76=_0x58c698[_0x4b6e54];return _0xd41c76;}import{CliErrors}from'../errors.js';export function parseFlags(_0x31b7ef,_0x2f15b2){const _0x571fae=a103_0xd41c,_0x59aabd={};for(const _0x28c6e7 of _0x31b7ef){const _0x2dbabf=_0x2f15b2[_0x28c6e7[_0x571fae(0x12b)]]??_0x2f15b2[toCamelCase(_0x28c6e7[_0x571fae(0x12b)])];if(_0x2dbabf===undefined||_0x2dbabf===null){_0x28c6e7[_0x571fae(0x120)]!==undefined&&(_0x59aabd[_0x28c6e7[_0x571fae(0x12b)]]=_0x28c6e7[_0x571fae(0x120)]);continue;}_0x59aabd[_0x28c6e7[_0x571fae(0x12b)]]=coerce(_0x28c6e7,_0x2dbabf);}for(const _0x71732d of[_0x571fae(0x12a),_0x571fae(0x138),_0x571fae(0x127),'format']){const _0x16fa1e=_0x2f15b2[_0x71732d];if(_0x16fa1e!==undefined){const _0x3a4171=_0x71732d===_0x571fae(0x138)?_0x571fae(0x12a):_0x71732d;_0x59aabd[_0x3a4171]=_0x16fa1e;}}return _0x59aabd;}export function validateFlags(_0x20ed56,_0x8a2557,_0x479231){const _0x561288=a103_0xd41c;for(const _0xe250d5 of _0x20ed56){const _0x4a34f7=_0x8a2557[_0xe250d5['name']];if(_0xe250d5['required']&&(_0x4a34f7===undefined||_0x4a34f7===''))throw CliErrors[_0x561288(0x139)](_0xe250d5[_0x561288(0x12b)],'--'+_0xe250d5[_0x561288(0x12b)]+_0x561288(0x137)+_0x479231+'`.');if(_0xe250d5[_0x561288(0x12d)]&&_0xe250d5[_0x561288(0x12d)][_0x561288(0x140)]>0x0&&_0x4a34f7!==undefined&&_0x4a34f7!==''){if(!_0xe250d5['enum']['includes'](String(_0x4a34f7)))throw CliErrors[_0x561288(0x122)](_0x561288(0x136)+_0x4a34f7+_0x561288(0x12e)+_0xe250d5[_0x561288(0x12b)]+_0x561288(0x142)+_0xe250d5[_0x561288(0x12d)][_0x561288(0x129)](',\x20'));}if(_0xe250d5[_0x561288(0x134)]&&_0x4a34f7!==undefined&&_0x4a34f7!==''){if(!_0xe250d5['pattern'][_0x561288(0x131)][_0x561288(0x13d)](String(_0x4a34f7)))throw CliErrors[_0x561288(0x122)](_0x561288(0x128)+_0xe250d5[_0x561288(0x12b)]+_0x561288(0x124)+_0xe250d5[_0x561288(0x134)][_0x561288(0x12c)]+_0x561288(0x12f)+_0x4a34f7+'\x22.');}}}function coerce(_0x746820,_0x409bfc){const _0x4111bb=a103_0xd41c;switch(_0x746820[_0x4111bb(0x135)]){case _0x4111bb(0x130):return _0x409bfc===!![]||_0x409bfc===_0x4111bb(0x13f);case _0x4111bb(0x13a):{const _0xf01a31=Number(_0x409bfc);if(isNaN(_0xf01a31))throw CliErrors[_0x4111bb(0x122)]('--'+_0x746820['name']+_0x4111bb(0x126)+_0x409bfc+'\x22');return _0xf01a31;}default:return String(_0x409bfc);}}function a103_0x58c6(){const _0x5d3e11=['regex','26227818QcRzYY','564LqSEVG','pattern','type','Invalid\x20value\x20\x22','\x20is\x20required\x20for\x20`','dryRun','flagMissing','number','1323616FxdpiV','toUpperCase','test','3943464GZRIVP','true','length','70133TCDHMI','.\x20Allowed:\x20','1450224kjHswM','28xWedMm','default','138294xirdnX','validation','192715hXshLt',':\x20expected\x20','replace','\x20expects\x20a\x20number,\x20got\x20\x22','yes','Invalid\x20--','join','dry-run','name','description','enum','\x22\x20for\x20--',',\x20got\x20\x22','boolean'];a103_0x58c6=function(){return _0x5d3e11;};return a103_0x58c6();}function toCamelCase(_0x2cba6f){const _0x49b4ee=a103_0xd41c;return _0x2cba6f[_0x49b4ee(0x125)](/-([a-z])/g,(_0x2c8ece,_0xe9e1d0)=>_0xe9e1d0[_0x49b4ee(0x13c)]());}
1
+ (function(_0x1b93d3,_0xa3aa68){const _0xf0275=a102_0x13f3,_0x482384=_0x1b93d3();while(!![]){try{const _0x3e6411=-parseInt(_0xf0275(0xa9))/0x1+parseInt(_0xf0275(0xb0))/0x2*(-parseInt(_0xf0275(0x95))/0x3)+parseInt(_0xf0275(0x96))/0x4+-parseInt(_0xf0275(0xab))/0x5*(-parseInt(_0xf0275(0x92))/0x6)+parseInt(_0xf0275(0xb1))/0x7*(-parseInt(_0xf0275(0x9b))/0x8)+-parseInt(_0xf0275(0xad))/0x9*(parseInt(_0xf0275(0x9f))/0xa)+parseInt(_0xf0275(0x9c))/0xb*(-parseInt(_0xf0275(0x99))/0xc);if(_0x3e6411===_0xa3aa68)break;else _0x482384['push'](_0x482384['shift']());}catch(_0x356637){_0x482384['push'](_0x482384['shift']());}}}(a102_0x494c,0x3db2a));import{CliErrors}from'../errors.js';export function parseFlags(_0x3849dc,_0x5b491f){const _0x324efd=a102_0x13f3,_0x1c3a3a={};for(const _0x37531f of _0x3849dc){const _0x3fd77d=_0x5b491f[_0x37531f[_0x324efd(0x97)]]??_0x5b491f[toCamelCase(_0x37531f['name'])];if(_0x3fd77d===undefined||_0x3fd77d===null){_0x37531f[_0x324efd(0xa3)]!==undefined&&(_0x1c3a3a[_0x37531f['name']]=_0x37531f['default']);continue;}_0x1c3a3a[_0x37531f['name']]=coerce(_0x37531f,_0x3fd77d);}for(const _0xeb559c of[_0x324efd(0x9d),_0x324efd(0x9e),'yes',_0x324efd(0xb2)]){const _0x3cbaf0=_0x5b491f[_0xeb559c];if(_0x3cbaf0!==undefined){const _0x3afd63=_0xeb559c===_0x324efd(0x9e)?'dry-run':_0xeb559c;_0x1c3a3a[_0x3afd63]=_0x3cbaf0;}}return _0x1c3a3a;}export function validateFlags(_0x3a2e39,_0x5445fb,_0x11150f){const _0x1ed678=a102_0x13f3;for(const _0x118679 of _0x3a2e39){const _0x323299=_0x5445fb[_0x118679[_0x1ed678(0x97)]];if(_0x118679[_0x1ed678(0xa6)]&&(_0x323299===undefined||_0x323299===''))throw CliErrors[_0x1ed678(0xac)](_0x118679['name'],'--'+_0x118679[_0x1ed678(0x97)]+_0x1ed678(0x9a)+_0x11150f+'`.');if(_0x118679[_0x1ed678(0xb3)]&&_0x118679[_0x1ed678(0xb3)][_0x1ed678(0xa0)]>0x0&&_0x323299!==undefined&&_0x323299!==''){if(!_0x118679[_0x1ed678(0xb3)]['includes'](String(_0x323299)))throw CliErrors[_0x1ed678(0xa8)]('Invalid\x20value\x20\x22'+_0x323299+_0x1ed678(0x94)+_0x118679[_0x1ed678(0x97)]+_0x1ed678(0xa5)+_0x118679['enum'][_0x1ed678(0xa7)](',\x20'));}if(_0x118679[_0x1ed678(0xa1)]&&_0x323299!==undefined&&_0x323299!==''){if(!_0x118679[_0x1ed678(0xa1)][_0x1ed678(0xaf)]['test'](String(_0x323299)))throw CliErrors['validation']('Invalid\x20--'+_0x118679[_0x1ed678(0x97)]+':\x20expected\x20'+_0x118679['pattern'][_0x1ed678(0x93)]+_0x1ed678(0x98)+_0x323299+'\x22.');}}}function a102_0x494c(){const _0x40301a=['toUpperCase','238695hymelX','flagMissing','306LoZbza','replace','regex','2TeYhCB','301tCTQRk','format','enum','60orjhWg','description','\x22\x20for\x20--','982017epoQpx','1688840vSjcbv','name',',\x20got\x20\x22','48ovywDP','\x20is\x20required\x20for\x20`','7096sHEkUO','126269ikmmdJ','dry-run','dryRun','53330SSvtid','length','pattern','number','default','\x20expects\x20a\x20number,\x20got\x20\x22','.\x20Allowed:\x20','required','join','validation','54168lVgGTi'];a102_0x494c=function(){return _0x40301a;};return a102_0x494c();}function coerce(_0x362064,_0x3ee2ce){const _0x12ce6e=a102_0x13f3;switch(_0x362064['type']){case'boolean':return _0x3ee2ce===!![]||_0x3ee2ce==='true';case _0x12ce6e(0xa2):{const _0x2be637=Number(_0x3ee2ce);if(isNaN(_0x2be637))throw CliErrors[_0x12ce6e(0xa8)]('--'+_0x362064[_0x12ce6e(0x97)]+_0x12ce6e(0xa4)+_0x3ee2ce+'\x22');return _0x2be637;}default:return String(_0x3ee2ce);}}function a102_0x13f3(_0x84fa6b,_0x910ff7){_0x84fa6b=_0x84fa6b-0x92;const _0x494c20=a102_0x494c();let _0x13f34a=_0x494c20[_0x84fa6b];return _0x13f34a;}function toCamelCase(_0x54fc8f){const _0x3513d1=a102_0x13f3;return _0x54fc8f[_0x3513d1(0xae)](/-([a-z])/g,(_0x2ce4c4,_0x182c03)=>_0x182c03[_0x3513d1(0xaa)]());}