@lovrabet/rabetbase-cli 2.0.4-beta.5 → 2.0.6

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 (135) 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 -1
  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 -1
  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 -1
  54. package/lib/commands/logs/index.js +1 -1
  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 -1
  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 -1
  72. package/lib/commands/skill/index.js +1 -1
  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 -1
  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
@@ -1 +1 @@
1
- const a0_0xf2e3c3=a0_0x17ad;function a0_0x17ad(_0x521b08,_0x4f656a){_0x521b08=_0x521b08-0x1f2;const _0x11bf47=a0_0x11bf();let _0x17adfd=_0x11bf47[_0x521b08];return _0x17adfd;}(function(_0x4cf153,_0x5df6ba){const _0x4aed55=a0_0x17ad,_0x36167c=_0x4cf153();while(!![]){try{const _0x4018fa=parseInt(_0x4aed55(0x1fa))/0x1*(-parseInt(_0x4aed55(0x215))/0x2)+-parseInt(_0x4aed55(0x1fe))/0x3*(-parseInt(_0x4aed55(0x206))/0x4)+parseInt(_0x4aed55(0x207))/0x5*(-parseInt(_0x4aed55(0x1f5))/0x6)+-parseInt(_0x4aed55(0x1f6))/0x7+parseInt(_0x4aed55(0x204))/0x8+parseInt(_0x4aed55(0x1f7))/0x9*(-parseInt(_0x4aed55(0x212))/0xa)+-parseInt(_0x4aed55(0x20c))/0xb*(-parseInt(_0x4aed55(0x203))/0xc);if(_0x4018fa===_0x5df6ba)break;else _0x36167c['push'](_0x36167c['shift']());}catch(_0x30c0e7){_0x36167c['push'](_0x36167c['shift']());}}}(a0_0x11bf,0x5c634));import{mkdirSync,writeFileSync}from'node:fs';import a0_0x4b4da3 from'node:path';import{getApiDomain}from'../constant/domain.js';function a0_0x11bf(){const _0xfac11c=['push','37012FvFdaB','10670ivIyfr','utf8','join','生成文档失败:\x20','length','17319929lXcpxz','):\x20missing\x20data.markdown\x20field','./docs','.md\x20-\x20','error',']\x20Generating:\x20','5569990vHNXos','name','log','45068lPmxKs','✗\x20Failed:\x20','Waiting\x203\x20seconds...\x0a','.md','markdown','1590DwOhTL','3709146HJXPQN','9lHHaac','.md\x20(','生成文档成功:\x20','5aUbNLY','Invalid\x20response\x20format\x20(','success','string','27hoAFQB','✓\x20Generated:\x20','datasetCode','/api/node-toolbox/api-doc-generator','message','12SOMqCz','3885288rZqllb'];a0_0x11bf=function(){return _0xfac11c;};return a0_0x11bf();}import{logger}from'../utils/logger.js';import{platformFetch}from'../core/api-client.js';export async function fetchDatasetDoc(_0x50ea03){const _0x1738dc=a0_0x17ad,{appCode:_0x5d8035,cookie:_0x29e70b,datasetCode:_0x40ca64,datasetId:_0x1bb994,extraParams:_0x3c7da5}=_0x50ea03,_0x33cda0=getApiDomain()+_0x1738dc(0x201),_0x5cd302=await platformFetch(_0x33cda0,{'method':'POST','body':{'appCode':_0x5d8035,'datasetCode':_0x40ca64,'datasetId':_0x1bb994,..._0x3c7da5||{}},'cookie':_0x29e70b,'label':'Fetch\x20doc\x20('+_0x40ca64+')'});if(!_0x5cd302||typeof _0x5cd302[_0x1738dc(0x1f4)]!==_0x1738dc(0x1fd))throw new Error(_0x1738dc(0x1fb)+_0x40ca64+_0x1738dc(0x20d));return _0x5cd302[_0x1738dc(0x1f4)];}function delay(_0x34739f){return new Promise(_0x330715=>setTimeout(_0x330715,_0x34739f));}export async function generateDatasetDocs(_0x1072cb,_0x5bb924,_0x60ac49,_0x61256d=a0_0xf2e3c3(0x20e),_0x4a4e79,_0x23f47b){const _0x1dd54a=a0_0xf2e3c3;mkdirSync(_0x61256d,{'recursive':!![]});const _0x2c4c0d=[],_0x83b61b=_0x1072cb[_0x1dd54a(0x20b)];console[_0x1dd54a(0x214)]('\x0a'+_0x83b61b+'\x20datasets\x20to\x20generate\x20docs\x20for\x0a');for(let _0x356751=0x0;_0x356751<_0x1072cb['length'];_0x356751++){const _0x406959=_0x1072cb[_0x356751],_0x5275c0=_0x356751+0x1,_0x380a64=_0x406959['tableName'];try{console[_0x1dd54a(0x214)]('['+_0x5275c0+'/'+_0x83b61b+_0x1dd54a(0x211)+_0x380a64+_0x1dd54a(0x1f8)+_0x406959[_0x1dd54a(0x213)]+')');if(_0x4a4e79)_0x4a4e79(_0x5275c0,_0x83b61b,_0x380a64);const _0x36a4f0=await fetchDatasetDoc({'appCode':_0x5bb924,'cookie':_0x60ac49,'datasetCode':_0x406959['datasetCode'],'datasetId':_0x406959['id'],'enableAI':![],'extraParams':_0x23f47b}),_0x43a23b=a0_0x4b4da3[_0x1dd54a(0x209)](_0x61256d,_0x380a64+_0x1dd54a(0x1f3));writeFileSync(_0x43a23b,_0x36a4f0,{'encoding':_0x1dd54a(0x208)}),console[_0x1dd54a(0x214)](_0x1dd54a(0x1ff)+_0x380a64+'.md'),logger[_0x1dd54a(0x1fc)]('api-doc',_0x1dd54a(0x1f9)+_0x380a64,undefined,{'datasetCode':_0x406959[_0x1dd54a(0x200)],'datasetName':_0x406959['name'],'filePath':_0x43a23b,'progress':_0x5275c0+'/'+_0x83b61b}),_0x2c4c0d[_0x1dd54a(0x205)]({'datasetCode':_0x406959[_0x1dd54a(0x200)],'datasetName':_0x406959[_0x1dd54a(0x213)],'filePath':_0x43a23b,'success':!![]});if(_0x5275c0<_0x83b61b)await delay(0x1388);}catch(_0x3fc2f8){const _0x205d02=_0x3fc2f8 instanceof Error?_0x3fc2f8[_0x1dd54a(0x202)]:String(_0x3fc2f8);console[_0x1dd54a(0x214)](_0x1dd54a(0x216)+_0x380a64+_0x1dd54a(0x20f)+_0x205d02),logger[_0x1dd54a(0x210)]('api-doc',_0x1dd54a(0x20a)+_0x406959[_0x1dd54a(0x200)],{'datasetCode':_0x406959[_0x1dd54a(0x200)],'datasetName':_0x406959[_0x1dd54a(0x213)],'error':_0x205d02,'progress':_0x5275c0+'/'+_0x83b61b}),_0x2c4c0d[_0x1dd54a(0x205)]({'datasetCode':_0x406959[_0x1dd54a(0x200)],'datasetName':_0x406959[_0x1dd54a(0x213)],'filePath':'','success':![],'error':_0x205d02}),_0x5275c0<_0x83b61b&&(console['log'](_0x1dd54a(0x1f2)),await delay(0xbb8));}}return _0x2c4c0d;}
1
+ const a0_0x2c73d3=a0_0x4f51;(function(_0x15f705,_0x320d01){const _0x5b17a6=a0_0x4f51,_0x34775b=_0x15f705();while(!![]){try{const _0x2b6408=-parseInt(_0x5b17a6(0x1d4))/0x1*(parseInt(_0x5b17a6(0x1dc))/0x2)+parseInt(_0x5b17a6(0x1cd))/0x3*(parseInt(_0x5b17a6(0x1d9))/0x4)+-parseInt(_0x5b17a6(0x1e1))/0x5+-parseInt(_0x5b17a6(0x1d3))/0x6*(parseInt(_0x5b17a6(0x1da))/0x7)+-parseInt(_0x5b17a6(0x1de))/0x8+-parseInt(_0x5b17a6(0x1d0))/0x9*(-parseInt(_0x5b17a6(0x1dd))/0xa)+-parseInt(_0x5b17a6(0x1e8))/0xb*(-parseInt(_0x5b17a6(0x1df))/0xc);if(_0x2b6408===_0x320d01)break;else _0x34775b['push'](_0x34775b['shift']());}catch(_0x4aad45){_0x34775b['push'](_0x34775b['shift']());}}}(a0_0x3aac,0xc3e5a));import{mkdirSync,writeFileSync}from'node:fs';import a0_0x50eaaf from'node:path';function a0_0x4f51(_0x6c0e91,_0x1beb1d){_0x6c0e91=_0x6c0e91-0x1cb;const _0x3aac20=a0_0x3aac();let _0x4f51af=_0x3aac20[_0x6c0e91];return _0x4f51af;}import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';function a0_0x3aac(){const _0xaf48aa=['1171NuqAlK','markdown','/api/node-toolbox/api-doc-generator','api-doc','.md','844PtQkue','161rdYzNc','./docs','396wzCmad','2112370hfXhuc','8993920RWOhOj','5685588PdiQLR','error','1608270oiCerq','Fetch\x20doc\x20(','Waiting\x203\x20seconds...\x0a','datasetCode','.md\x20-\x20','生成文档失败:\x20','name','22TepoRl','Invalid\x20response\x20format\x20(',']\x20Generating:\x20','length','success','push','20232iUkpYR','log','utf8','27PCdGSh','):\x20missing\x20data.markdown\x20field','生成文档成功:\x20','136734WJEuzu'];a0_0x3aac=function(){return _0xaf48aa;};return a0_0x3aac();}import{platformFetch}from'../core/api-client.js';export async function fetchDatasetDoc(_0x140c2d){const _0x3989b2=a0_0x4f51,{appCode:_0x5e28e1,cookie:_0x449032,datasetCode:_0x53abf0,datasetId:_0x5b16fd,extraParams:_0x3bc139}=_0x140c2d,_0x3438b5=getApiDomain()+_0x3989b2(0x1d6),_0x3540db=await platformFetch(_0x3438b5,{'method':'POST','body':{'appCode':_0x5e28e1,'datasetCode':_0x53abf0,'datasetId':_0x5b16fd,..._0x3bc139||{}},'cookie':_0x449032,'label':_0x3989b2(0x1e2)+_0x53abf0+')'});if(!_0x3540db||typeof _0x3540db['markdown']!=='string')throw new Error(_0x3989b2(0x1e9)+_0x53abf0+_0x3989b2(0x1d1));return _0x3540db[_0x3989b2(0x1d5)];}function delay(_0x11e9ef){return new Promise(_0x3291c9=>setTimeout(_0x3291c9,_0x11e9ef));}export async function generateDatasetDocs(_0x4956d6,_0x39af1a,_0x2c032a,_0x101741=a0_0x2c73d3(0x1db),_0x4ddfb8,_0x2845a2){const _0x461c33=a0_0x2c73d3;mkdirSync(_0x101741,{'recursive':!![]});const _0x58b526=[],_0x45e42e=_0x4956d6[_0x461c33(0x1eb)];console[_0x461c33(0x1ce)]('\x0a'+_0x45e42e+'\x20datasets\x20to\x20generate\x20docs\x20for\x0a');for(let _0x20a54c=0x0;_0x20a54c<_0x4956d6['length'];_0x20a54c++){const _0x224c93=_0x4956d6[_0x20a54c],_0x115f0b=_0x20a54c+0x1,_0x532e98=_0x224c93['tableName'];try{console[_0x461c33(0x1ce)]('['+_0x115f0b+'/'+_0x45e42e+_0x461c33(0x1ea)+_0x532e98+'.md\x20('+_0x224c93[_0x461c33(0x1e7)]+')');if(_0x4ddfb8)_0x4ddfb8(_0x115f0b,_0x45e42e,_0x532e98);const _0x44a9b9=await fetchDatasetDoc({'appCode':_0x39af1a,'cookie':_0x2c032a,'datasetCode':_0x224c93['datasetCode'],'datasetId':_0x224c93['id'],'enableAI':![],'extraParams':_0x2845a2}),_0x581831=a0_0x50eaaf['join'](_0x101741,_0x532e98+'.md');writeFileSync(_0x581831,_0x44a9b9,{'encoding':_0x461c33(0x1cf)}),console[_0x461c33(0x1ce)]('✓\x20Generated:\x20'+_0x532e98+_0x461c33(0x1d8)),logger[_0x461c33(0x1cb)](_0x461c33(0x1d7),_0x461c33(0x1d2)+_0x532e98,undefined,{'datasetCode':_0x224c93[_0x461c33(0x1e4)],'datasetName':_0x224c93['name'],'filePath':_0x581831,'progress':_0x115f0b+'/'+_0x45e42e}),_0x58b526[_0x461c33(0x1cc)]({'datasetCode':_0x224c93[_0x461c33(0x1e4)],'datasetName':_0x224c93[_0x461c33(0x1e7)],'filePath':_0x581831,'success':!![]});if(_0x115f0b<_0x45e42e)await delay(0x1388);}catch(_0x69b5a0){const _0x4f0060=_0x69b5a0 instanceof Error?_0x69b5a0['message']:String(_0x69b5a0);console['log']('✗\x20Failed:\x20'+_0x532e98+_0x461c33(0x1e5)+_0x4f0060),logger[_0x461c33(0x1e0)]('api-doc',_0x461c33(0x1e6)+_0x224c93[_0x461c33(0x1e4)],{'datasetCode':_0x224c93['datasetCode'],'datasetName':_0x224c93[_0x461c33(0x1e7)],'error':_0x4f0060,'progress':_0x115f0b+'/'+_0x45e42e}),_0x58b526['push']({'datasetCode':_0x224c93[_0x461c33(0x1e4)],'datasetName':_0x224c93[_0x461c33(0x1e7)],'filePath':'','success':![],'error':_0x4f0060}),_0x115f0b<_0x45e42e&&(console['log'](_0x461c33(0x1e3)),await delay(0xbb8));}}return _0x58b526;}
@@ -1 +1 @@
1
- (function(_0x8df2c4,_0x46a0c4){const _0x2707a3=a1_0x5a7b,_0x50f462=_0x8df2c4();while(!![]){try{const _0x2b0f5c=parseInt(_0x2707a3(0x132))/0x1*(parseInt(_0x2707a3(0x12c))/0x2)+parseInt(_0x2707a3(0x12e))/0x3*(-parseInt(_0x2707a3(0x12a))/0x4)+-parseInt(_0x2707a3(0x13a))/0x5+parseInt(_0x2707a3(0x13e))/0x6*(-parseInt(_0x2707a3(0x139))/0x7)+-parseInt(_0x2707a3(0x13c))/0x8*(parseInt(_0x2707a3(0x137))/0x9)+-parseInt(_0x2707a3(0x134))/0xa+parseInt(_0x2707a3(0x133))/0xb;if(_0x2b0f5c===_0x46a0c4)break;else _0x50f462['push'](_0x50f462['shift']());}catch(_0x32a88e){_0x50f462['push'](_0x50f462['shift']());}}}(a1_0x4aa8,0x5ff8c));import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';import{getEnv}from'../constant/env.js';import{platformFetch}from'../core/api-client.js';function a1_0x4aa8(){const _0x517742=['replace','20SqAFgd','trim','63165rPrkpn','configArray','正在从服务器拉取模型列表...\x20(环境:\x20','name','927zeFMjT','29262475nXKYvR','3498980XEVLxh','fetch-model-list','Fetch\x20datasets','9yQeWvc','/api/node-toolbox/dataset/model-list?appcode=','1997009VTdynM','657395JWZKYF','map','4573912xYuNOE','info','12FqqlLs','124mYlNfT'];a1_0x4aa8=function(){return _0x517742;};return a1_0x4aa8();}function a1_0x5a7b(_0x3766cf,_0x165fa2){_0x3766cf=_0x3766cf-0x12a;const _0x4aa85c=a1_0x4aa8();let _0x5a7b84=_0x4aa85c[_0x3766cf];return _0x5a7b84;}function cleanNewlines(_0x3b82dd){const _0x57e366=a1_0x5a7b;return _0x3b82dd[_0x57e366(0x12b)](/[\r\n]+/g,'\x20')[_0x57e366(0x12d)]();}function cleanDatasetName(_0x114153){const _0x504d65=a1_0x5a7b;if(!_0x114153['name'])return _0x114153;return{..._0x114153,'name':cleanNewlines(_0x114153[_0x504d65(0x131)])};}export async function fetchModelList(_0x2de16c,_0x21710e){const _0x548c81=a1_0x5a7b,_0x2670aa=getEnv(),_0x5e9a02=getApiDomain()+_0x548c81(0x138)+_0x2de16c+'&otype=array';logger[_0x548c81(0x13d)](_0x548c81(0x135),_0x548c81(0x130)+_0x2670aa+')',{'apiUrl':_0x5e9a02});const _0x1ed9f8=await platformFetch(_0x5e9a02,{'cookie':_0x21710e,'label':_0x548c81(0x136)}),_0x12b52e=(_0x1ed9f8[_0x548c81(0x12f)]??[])[_0x548c81(0x13b)](cleanDatasetName);return{'configArray':_0x12b52e,'count':_0x12b52e['length']};}
1
+ (function(_0x4d33fb,_0x4d6b8e){const _0x49cfee=a1_0x2f12,_0x504dda=_0x4d33fb();while(!![]){try{const _0x340cbc=-parseInt(_0x49cfee(0x1ea))/0x1+-parseInt(_0x49cfee(0x1f3))/0x2+-parseInt(_0x49cfee(0x1e7))/0x3+-parseInt(_0x49cfee(0x1e6))/0x4*(-parseInt(_0x49cfee(0x1ee))/0x5)+parseInt(_0x49cfee(0x1e3))/0x6*(-parseInt(_0x49cfee(0x1eb))/0x7)+-parseInt(_0x49cfee(0x1f1))/0x8+parseInt(_0x49cfee(0x1e4))/0x9*(parseInt(_0x49cfee(0x1ed))/0xa);if(_0x340cbc===_0x4d6b8e)break;else _0x504dda['push'](_0x504dda['shift']());}catch(_0x31a32f){_0x504dda['push'](_0x504dda['shift']());}}}(a1_0x412c,0x931bb));import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';import{getEnv}from'../constant/env.js';function a1_0x2f12(_0x3a88a2,_0x235dc6){_0x3a88a2=_0x3a88a2-0x1e0;const _0x412cc2=a1_0x412c();let _0x2f125e=_0x412cc2[_0x3a88a2];return _0x2f125e;}import{platformFetch}from'../core/api-client.js';function cleanNewlines(_0x50c3e5){const _0x8f5f5e=a1_0x2f12;return _0x50c3e5[_0x8f5f5e(0x1e2)](/[\r\n]+/g,'\x20')[_0x8f5f5e(0x1e9)]();}function cleanDatasetName(_0x23ff88){const _0x58e2b8=a1_0x2f12;if(!_0x23ff88[_0x58e2b8(0x1ec)])return _0x23ff88;return{..._0x23ff88,'name':cleanNewlines(_0x23ff88['name'])};}function a1_0x412c(){const _0x2331e4=['Fetch\x20datasets','7434840FdGnTe','configArray','2285816tAwUQy','正在从服务器拉取模型列表...\x20(环境:\x20','fetch-model-list','replace','5785116txHHhF','3536883zhBCJh','/api/node-toolbox/dataset/model-list?appcode=','16684JKJICS','2466618ZLrOMU','map','trim','1073063cVszYe','7sblhNe','name','130pmpcZj','510InbOQG','length'];a1_0x412c=function(){return _0x2331e4;};return a1_0x412c();}export async function fetchModelList(_0x521b6d,_0x57fd10){const _0x26c3d2=a1_0x2f12,_0x44084d=getEnv(),_0x30fadd=getApiDomain()+_0x26c3d2(0x1e5)+_0x521b6d+'&otype=array';logger['info'](_0x26c3d2(0x1e1),_0x26c3d2(0x1e0)+_0x44084d+')',{'apiUrl':_0x30fadd});const _0x18fe2f=await platformFetch(_0x30fadd,{'cookie':_0x57fd10,'label':_0x26c3d2(0x1f0)}),_0x1da4d5=(_0x18fe2f[_0x26c3d2(0x1f2)]??[])[_0x26c3d2(0x1e8)](cleanDatasetName);return{'configArray':_0x1da4d5,'count':_0x1da4d5[_0x26c3d2(0x1ef)]};}
@@ -1 +1 @@
1
- function a2_0x3a13(){const _0x30a4e6=['399895rdFrxm','replace','client.ts.tpl','name','36yMYyhr','1635489JHcAyi','{\x20apiConfigName:\x20\x22','init-api','test','tableName','toUpperCase','client','../..',',\x20env:\x20\x22','6038496tJaZAL','utf8','api.ts.tpl','forEach','alias','CONFIG_NAMES.DEFAULT','22757sUqYSG','LOVRABET','join','7441384GQhmud','878453pZwDLg','dirname','resolve','api','30rqnxhg','typescript','3159584XwFzJv','push','length','.ts'];a2_0x3a13=function(){return _0x30a4e6;};return a2_0x3a13();}(function(_0x5f244d,_0x7cf024){const _0x5b0cbd=a2_0x2176,_0x12cc51=_0x5f244d();while(!![]){try{const _0x1227b8=parseInt(_0x5b0cbd(0x1da))/0x1+parseInt(_0x5b0cbd(0x1e0))/0x2+parseInt(_0x5b0cbd(0x1e9))/0x3+parseInt(_0x5b0cbd(0x1d0))/0x4+parseInt(_0x5b0cbd(0x1e4))/0x5+-parseInt(_0x5b0cbd(0x1de))/0x6*(-parseInt(_0x5b0cbd(0x1d6))/0x7)+parseInt(_0x5b0cbd(0x1d9))/0x8*(-parseInt(_0x5b0cbd(0x1e8))/0x9);if(_0x1227b8===_0x7cf024)break;else _0x12cc51['push'](_0x12cc51['shift']());}catch(_0x29bf86){_0x12cc51['push'](_0x12cc51['shift']());}}}(a2_0x3a13,0xd8efe));import a2_0x308c53 from'prettier';import{mkdirSync,writeFileSync,readFileSync}from'node:fs';import a2_0x5cf161 from'node:path';import{fileURLToPath}from'node:url';function a2_0x2176(_0x33c9a9,_0x21e9cc){_0x33c9a9=_0x33c9a9-0x1d0;const _0x3a13e2=a2_0x3a13();let _0x217697=_0x3a13e2[_0x33c9a9];return _0x217697;}import{TemplateReplacer}from'../utils/template-replacer.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{logger}from'../utils/logger.js';export async function generateApiFile(_0x269c22,_0x32e52b,_0xb809ee,_0x450c5a,_0x716b8e,_0x56dc19,_0x3b7c27){const _0x2d34d9=a2_0x2176;if(!_0xb809ee)throw new Error('Please\x20configure\x20app\x20code\x20first\x20via\x20`'+CLI_BIN_NAME+'\x20config\x20set\x20app\x20<value>`');const _0x350054=_0x450c5a&&!_0x3b7c27,_0xd7670a=_0x3b7c27||_0xb809ee,_0x3aa7e3=_0x350054?_0x2d34d9(0x1d5):'\x22'+_0xd7670a+'\x22',_0x5c38a7=_0x716b8e!=='production';let _0x1224f6;if(_0x350054)_0x5c38a7?_0x1224f6='{\x20apiConfigName:\x20'+_0x3aa7e3+_0x2d34d9(0x1f1)+_0x716b8e+'\x22\x20}':_0x1224f6='';else{const _0x546ef5=_0x5c38a7?_0x2d34d9(0x1f1)+_0x716b8e+'\x22':'';_0x1224f6=_0x2d34d9(0x1ea)+_0xd7670a+'\x22'+_0x546ef5+'\x20}';}const _0x587b5d=_0x32e52b?_0x32e52b+'-api':_0x2d34d9(0x1dd),_0x238176=_0x32e52b?_0x32e52b+'-client':_0x2d34d9(0x1ef),_0x207de2=_0x32e52b&&!/^app-[a-f0-9]+$/i[_0x2d34d9(0x1ec)](_0x32e52b)?_0x32e52b[_0x2d34d9(0x1e5)](/-/g,'_')[_0x2d34d9(0x1ee)]():_0x2d34d9(0x1d7),_0x44f34a=[];_0x269c22[_0x2d34d9(0x1d3)](_0x3c51b9=>{const _0x24c79f=_0x2d34d9;_0x44f34a[_0x24c79f(0x1e1)]({'datasetCode':_0x3c51b9['datasetCode'],'tableName':_0x3c51b9[_0x24c79f(0x1ed)],'name':_0x3c51b9[_0x24c79f(0x1e7)]||'','alias':_0x3c51b9['alias']||_0x3c51b9['key']});});const _0x13541b=fileURLToPath(import.meta.url),_0x46f83b=a2_0x5cf161[_0x2d34d9(0x1dc)](a2_0x5cf161[_0x2d34d9(0x1db)](_0x13541b),_0x2d34d9(0x1f0)),_0x436c9b=a2_0x5cf161['join'](_0x46f83b,'templates/generate-api'),_0x3748a8=a2_0x5cf161[_0x2d34d9(0x1d8)](_0x436c9b,_0x2d34d9(0x1d2)),_0x21127a=a2_0x5cf161['join'](_0x436c9b,_0x2d34d9(0x1e6)),_0x1a39b0=_0x56dc19;mkdirSync(_0x1a39b0,{'recursive':!![]});const _0x17ecc9=_0x44f34a[0x0]?.[_0x2d34d9(0x1d4)],_0x1b0d6b=readFileSync(_0x3748a8,'utf8'),_0x48dc5d=TemplateReplacer['replaceApiContent'](_0x1b0d6b,_0xb809ee,_0x44f34a,_0x17ecc9,_0x587b5d,_0x3aa7e3,undefined,_0x207de2),_0x1cef3d=await a2_0x308c53['format'](_0x48dc5d,{'parser':_0x2d34d9(0x1df)}),_0x95fd4c=a2_0x5cf161[_0x2d34d9(0x1d8)](_0x1a39b0,_0x587b5d+_0x2d34d9(0x1e3));writeFileSync(_0x95fd4c,_0x1cef3d,{'encoding':_0x2d34d9(0x1d1)});const _0x204bce=readFileSync(_0x21127a,'utf8'),_0x442451=TemplateReplacer['replaceApiContent'](_0x204bce,_0xb809ee,_0x44f34a,_0x17ecc9,_0x587b5d,_0x3aa7e3,_0x1224f6,_0x207de2),_0x408e17=await a2_0x308c53['format'](_0x442451,{'parser':'typescript'}),_0x1ecb44=a2_0x5cf161[_0x2d34d9(0x1d8)](_0x1a39b0,_0x238176+_0x2d34d9(0x1e3));writeFileSync(_0x1ecb44,_0x408e17,{'encoding':_0x2d34d9(0x1d1)});const _0x19bcaa=_0x44f34a[_0x2d34d9(0x1e2)];return logger['success'](_0x2d34d9(0x1eb),'API\x20文件生成成功!',undefined,{'apiFile':_0x95fd4c,'clientFile':_0x1ecb44,'modelCount':_0x19bcaa,'configName':_0x3aa7e3}),{'modelCount':_0x19bcaa,'apiFilePath':_0x95fd4c,'clientFilePath':_0x1ecb44,'configName':_0x3aa7e3};}
1
+ (function(_0x1ec01a,_0x7ff036){const _0x28c21c=a2_0x43eb,_0x68ef19=_0x1ec01a();while(!![]){try{const _0x1b68b2=parseInt(_0x28c21c(0x11e))/0x1+-parseInt(_0x28c21c(0x116))/0x2+-parseInt(_0x28c21c(0x12e))/0x3*(parseInt(_0x28c21c(0x121))/0x4)+parseInt(_0x28c21c(0x11d))/0x5+parseInt(_0x28c21c(0x123))/0x6+-parseInt(_0x28c21c(0x11a))/0x7*(-parseInt(_0x28c21c(0x117))/0x8)+parseInt(_0x28c21c(0x113))/0x9;if(_0x1b68b2===_0x7ff036)break;else _0x68ef19['push'](_0x68ef19['shift']());}catch(_0xdaf1c4){_0x68ef19['push'](_0x68ef19['shift']());}}}(a2_0x22d0,0xf14e9));import a2_0x132e04 from'prettier';import{mkdirSync,writeFileSync,readFileSync}from'node:fs';import a2_0x26bba7 from'node:path';import{fileURLToPath}from'node:url';import{TemplateReplacer}from'../utils/template-replacer.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a2_0x22d0(){const _0x2a45e7=[',\x20env:\x20\x22','api','datasetCode','utf8','client','\x22\x20}','toUpperCase','{\x20apiConfigName:\x20\x22','\x20config\x20set\x20app\x20<value>`','3mKrHKc','replace','alias','API\x20文件生成成功!','typescript','production','{\x20apiConfigName:\x20','tableName','.ts','replaceApiContent','../..','join','CONFIG_NAMES.DEFAULT','3428046gzJyIv','-api','resolve','3623392doYkyP','1208ygwTXg','-client','client.ts.tpl','20279yLLpgj','Please\x20configure\x20app\x20code\x20first\x20via\x20`','api.ts.tpl','8220080YWOFOi','250293zQbcnX','LOVRABET','format','4047592KyAxqr','forEach','6596022IotXyu','init-api'];a2_0x22d0=function(){return _0x2a45e7;};return a2_0x22d0();}function a2_0x43eb(_0x58cb79,_0x530255){_0x58cb79=_0x58cb79-0x10a;const _0x22d0cd=a2_0x22d0();let _0x43eb17=_0x22d0cd[_0x58cb79];return _0x43eb17;}import{logger}from'../utils/logger.js';export async function generateApiFile(_0x4013cb,_0x4cae57,_0xbca2b2,_0x2a60b0,_0x11ee81,_0x4c58ad,_0x2cf27b){const _0x13ddc1=a2_0x43eb;if(!_0xbca2b2)throw new Error(_0x13ddc1(0x11b)+CLI_BIN_NAME+_0x13ddc1(0x12d));const _0x558353=_0x2a60b0&&!_0x2cf27b,_0x553878=_0x2cf27b||_0xbca2b2,_0xa96725=_0x558353?_0x13ddc1(0x112):'\x22'+_0x553878+'\x22',_0x351fbe=_0x11ee81!==_0x13ddc1(0x10b);let _0x28f997;if(_0x558353)_0x351fbe?_0x28f997=_0x13ddc1(0x10c)+_0xa96725+_0x13ddc1(0x125)+_0x11ee81+_0x13ddc1(0x12a):_0x28f997='';else{const _0x21c2a9=_0x351fbe?_0x13ddc1(0x125)+_0x11ee81+'\x22':'';_0x28f997=_0x13ddc1(0x12c)+_0x553878+'\x22'+_0x21c2a9+'\x20}';}const _0xc25896=_0x4cae57?_0x4cae57+_0x13ddc1(0x114):_0x13ddc1(0x126),_0x2f8351=_0x4cae57?_0x4cae57+_0x13ddc1(0x118):_0x13ddc1(0x129),_0x27f448=_0x4cae57&&!/^app-[a-f0-9]+$/i['test'](_0x4cae57)?_0x4cae57[_0x13ddc1(0x12f)](/-/g,'_')[_0x13ddc1(0x12b)]():_0x13ddc1(0x11f),_0x27a2d1=[];_0x4013cb[_0x13ddc1(0x122)](_0x476496=>{const _0x2490b7=_0x13ddc1;_0x27a2d1['push']({'datasetCode':_0x476496[_0x2490b7(0x127)],'tableName':_0x476496[_0x2490b7(0x10d)],'name':_0x476496['name']||'','alias':_0x476496[_0x2490b7(0x130)]||_0x476496['key']});});const _0x44aa5e=fileURLToPath(import.meta.url),_0x3e06c4=a2_0x26bba7[_0x13ddc1(0x115)](a2_0x26bba7['dirname'](_0x44aa5e),_0x13ddc1(0x110)),_0x3fee7b=a2_0x26bba7[_0x13ddc1(0x111)](_0x3e06c4,'templates/generate-api'),_0x19f720=a2_0x26bba7[_0x13ddc1(0x111)](_0x3fee7b,_0x13ddc1(0x11c)),_0x2ee470=a2_0x26bba7[_0x13ddc1(0x111)](_0x3fee7b,_0x13ddc1(0x119)),_0x4aec93=_0x4c58ad;mkdirSync(_0x4aec93,{'recursive':!![]});const _0x5e5985=_0x27a2d1[0x0]?.[_0x13ddc1(0x130)],_0x2b0e63=readFileSync(_0x19f720,_0x13ddc1(0x128)),_0x3b2ab2=TemplateReplacer[_0x13ddc1(0x10f)](_0x2b0e63,_0xbca2b2,_0x27a2d1,_0x5e5985,_0xc25896,_0xa96725,undefined,_0x27f448),_0x5e40b9=await a2_0x132e04[_0x13ddc1(0x120)](_0x3b2ab2,{'parser':'typescript'}),_0x15d516=a2_0x26bba7[_0x13ddc1(0x111)](_0x4aec93,_0xc25896+_0x13ddc1(0x10e));writeFileSync(_0x15d516,_0x5e40b9,{'encoding':_0x13ddc1(0x128)});const _0x5c8e7f=readFileSync(_0x2ee470,'utf8'),_0x2487a3=TemplateReplacer[_0x13ddc1(0x10f)](_0x5c8e7f,_0xbca2b2,_0x27a2d1,_0x5e5985,_0xc25896,_0xa96725,_0x28f997,_0x27f448),_0x20f361=await a2_0x132e04[_0x13ddc1(0x120)](_0x2487a3,{'parser':_0x13ddc1(0x10a)}),_0x52e26d=a2_0x26bba7[_0x13ddc1(0x111)](_0x4aec93,_0x2f8351+_0x13ddc1(0x10e));writeFileSync(_0x52e26d,_0x20f361,{'encoding':'utf8'});const _0x3e2824=_0x27a2d1['length'];return logger['success'](_0x13ddc1(0x124),_0x13ddc1(0x131),undefined,{'apiFile':_0x15d516,'clientFile':_0x52e26d,'modelCount':_0x3e2824,'configName':_0xa96725}),{'modelCount':_0x3e2824,'apiFilePath':_0x15d516,'clientFilePath':_0x52e26d,'configName':_0xa96725};}
@@ -1 +1 @@
1
- (function(_0x50c34a,_0x42e320){const _0x59efbb=a3_0x3904,_0x4165e9=_0x50c34a();while(!![]){try{const _0x5c6311=parseInt(_0x59efbb(0x183))/0x1+-parseInt(_0x59efbb(0x180))/0x2*(-parseInt(_0x59efbb(0x185))/0x3)+parseInt(_0x59efbb(0x184))/0x4*(-parseInt(_0x59efbb(0x18b))/0x5)+-parseInt(_0x59efbb(0x18a))/0x6*(parseInt(_0x59efbb(0x17e))/0x7)+parseInt(_0x59efbb(0x18c))/0x8+parseInt(_0x59efbb(0x181))/0x9+-parseInt(_0x59efbb(0x17f))/0xa*(parseInt(_0x59efbb(0x187))/0xb);if(_0x5c6311===_0x42e320)break;else _0x4165e9['push'](_0x4165e9['shift']());}catch(_0x363468){_0x4165e9['push'](_0x4165e9['shift']());}}}(a3_0xb8db,0x1f29d));import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';function a3_0x3904(_0x43f30f,_0x10b12a){_0x43f30f=_0x43f30f-0x17c;const _0xb8dbfd=a3_0xb8db();let _0x39041d=_0xb8dbfd[_0x43f30f];return _0x39041d;}function a3_0xb8db(){const _0x24a02f=['1633266aDhVFV','log','134885jvOqrr','56agreGD','103101NfxDZA','start','165GCKZQL','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','No\x20valid\x20session.\x20Login\x20now?','1254wKrjFB','8905BNAVsk','1271144YCsaMo','stop','!\x20Login\x20failed.','6279DXEFyf','204690NYVDIA','10QrEOYK'];a3_0xb8db=function(){return _0x24a02f;};return a3_0xb8db();}import{confirm}from'@inquirer/prompts';import a3_0x496cb2 from'ora';export async function runAuthServer(){const _0x3cbf0c=a3_0x3904,_0x3a1bd9=await getIsSessionValid();if(_0x3a1bd9){console['log']('√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.');return;}const _0x48551c=await confirm({'message':_0x3cbf0c(0x189),'default':!![]});if(!_0x48551c)return;const _0x2e9e08=a3_0x496cb2(_0x3cbf0c(0x188))[_0x3cbf0c(0x186)](),_0x136d17=await authServer({'silent':!![]});_0x2e9e08[_0x3cbf0c(0x17c)](),_0x136d17?console[_0x3cbf0c(0x182)]('*\x20Login\x20successful!'):console[_0x3cbf0c(0x182)](_0x3cbf0c(0x17d));}
1
+ function a3_0x4748(){const _0x2cce6d=['start','!\x20Login\x20failed.','9399smqRLL','1731570LyThDy','14TSrEvG','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','248CDpymt','*\x20Login\x20successful!','69363MWGXCk','18wzMgAs','Logging\x20in...\x20Please\x20complete\x20login\x20in\x20your\x20browser.','4549970nBkTVS','495832JvgXxK','9641460HUqXtP','815834rpHYcl'];a3_0x4748=function(){return _0x2cce6d;};return a3_0x4748();}(function(_0x46b86f,_0x3eeeb9){const _0x5793d2=a3_0x5dbb,_0x12dd9b=_0x46b86f();while(!![]){try{const _0x21c432=-parseInt(_0x5793d2(0x99))/0x1+-parseInt(_0x5793d2(0x9f))/0x2+parseInt(_0x5793d2(0xa2))/0x3*(parseInt(_0x5793d2(0xa6))/0x4)+-parseInt(_0x5793d2(0x9c))/0x5+-parseInt(_0x5793d2(0xa3))/0x6*(-parseInt(_0x5793d2(0xa4))/0x7)+parseInt(_0x5793d2(0x9d))/0x8*(parseInt(_0x5793d2(0x9a))/0x9)+parseInt(_0x5793d2(0x9e))/0xa;if(_0x21c432===_0x3eeeb9)break;else _0x12dd9b['push'](_0x12dd9b['shift']());}catch(_0x4a96ae){_0x12dd9b['push'](_0x12dd9b['shift']());}}}(a3_0x4748,0x734ca));function a3_0x5dbb(_0x15e7b6,_0x596ff7){_0x15e7b6=_0x15e7b6-0x99;const _0x4748f9=a3_0x4748();let _0x5dbbac=_0x4748f9[_0x15e7b6];return _0x5dbbac;}import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';import{confirm}from'@inquirer/prompts';import a3_0x2d566d from'ora';export async function runAuthServer(){const _0x51fb5c=a3_0x5dbb,_0x3f20c0=await getIsSessionValid();if(_0x3f20c0){console['log'](_0x51fb5c(0xa5));return;}const _0x483780=await confirm({'message':'No\x20valid\x20session.\x20Login\x20now?','default':!![]});if(!_0x483780)return;const _0x398112=a3_0x2d566d(_0x51fb5c(0x9b))[_0x51fb5c(0xa0)](),_0x566a07=await authServer({'silent':!![]});_0x398112['stop'](),_0x566a07?console['log'](_0x51fb5c(0xa7)):console['log'](_0x51fb5c(0xa1));}
@@ -1 +1 @@
1
- const a4_0x4a1d94=a4_0x1c5d;(function(_0x11dc6f,_0x212318){const _0x4b5061=a4_0x1c5d,_0x9b2e65=_0x11dc6f();while(!![]){try{const _0x4094b2=-parseInt(_0x4b5061(0x192))/0x1+parseInt(_0x4b5061(0x181))/0x2*(-parseInt(_0x4b5061(0x193))/0x3)+-parseInt(_0x4b5061(0x194))/0x4*(-parseInt(_0x4b5061(0x19a))/0x5)+parseInt(_0x4b5061(0x196))/0x6*(-parseInt(_0x4b5061(0x1a4))/0x7)+parseInt(_0x4b5061(0x1a0))/0x8*(-parseInt(_0x4b5061(0x18a))/0x9)+-parseInt(_0x4b5061(0x18c))/0xa+-parseInt(_0x4b5061(0x18d))/0xb*(-parseInt(_0x4b5061(0x185))/0xc);if(_0x4094b2===_0x212318)break;else _0x9b2e65['push'](_0x9b2e65['shift']());}catch(_0x452468){_0x9b2e65['push'](_0x9b2e65['shift']());}}}(a4_0x2f06,0x1ccf6));function a4_0x1c5d(_0x13b477,_0xef0842){_0x13b477=_0x13b477-0x17d;const _0x2f06ce=a4_0x2f06();let _0x1c5d2c=_0x2f06ce[_0x13b477];return _0x1c5d2c;}import{writeFileSync}from'node:fs';import a4_0x171fd6 from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';export async function authServer(_0x173a7d){const _0xa47f34=a4_0x1c5d,_0x467777=_0x173a7d?.[_0xa47f34(0x1a9)]||![];if(await getIsSessionValid())return!![];const _0x3c9506=await(await fetch(_0xa47f34(0x17f)))[_0xa47f34(0x198)]();return new Promise(async(_0x48f396,_0x374b1a)=>{const _0x3665c9=_0xa47f34;let _0x124629=0x0;const _0x1f7bba=a4_0x171fd6['createServer'](_0x3c9506,async(_0x124d9e,_0xf47306)=>{const _0x4289f4=a4_0x1c5d,_0xe8f694=getUserDomain(),_0x3e8a5c=_0x124d9e['headers'][_0x4289f4(0x1a5)]||'',_0x4d1c9a=await fetch(_0xe8f694+'/api/auth/get-session',{'headers':{'cookie':_0x3e8a5c}})['then'](_0x342755=>_0x342755[_0x4289f4(0x198)]()),_0x133c0e=_0x4d1c9a&&_0x4d1c9a[_0x4289f4(0x19d)]&&_0x4d1c9a[_0x4289f4(0x1a8)];if(_0x133c0e){writeFileSync(cookieFile,_0x3e8a5c,'utf-8'),_0x48f396(!![]);const _0x5988bc=_0x4289f4(0x19c),_0x55672f=_0x4289f4(0x183)+_0x4289f4(0x187)+_0x4289f4(0x180),_0x3e4c89=_0x4289f4(0x191),_0x5c748b='<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>'+_0x5988bc+'</title></head>\x0a<body>\x0a\x20\x20<div>'+_0x55672f+_0x4289f4(0x1a3)+_0x3e4c89+'</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20如果自动关闭无效,显示文本提示让用户手动关闭\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>';_0xf47306[_0x4289f4(0x18b)](0xc8,{'Content-Type':_0x4289f4(0x184)}),_0xf47306[_0x4289f4(0x1a6)](_0x5c748b),_0x1f7bba[_0x4289f4(0x190)]();}else{const _0x4db998=''+encodeURIComponent(_0x4289f4(0x197)+_0x124629);_0xf47306[_0x4289f4(0x18b)](0x12e,{'location':_0xe8f694+_0x4289f4(0x1a2)+_0x4db998}),_0xf47306[_0x4289f4(0x1a6)]();return;}});_0x1f7bba['listen'](0x0,'127.0.0.1',()=>{const _0x4dd070=a4_0x1c5d,_0x213e87=_0x1f7bba['address']();_0x124629=typeof _0x213e87==='object'&&_0x213e87?_0x213e87['port']:Number(_0x213e87);const _0x299c81=_0x4dd070(0x197)+_0x124629;!_0x467777&&(console[_0x4dd070(0x19e)](_0x4dd070(0x186)),console[_0x4dd070(0x19e)](_0x4dd070(0x1a7),_0x299c81),console['log'](_0x4dd070(0x17d)),console['log'](''),console[_0x4dd070(0x19e)](_0x4dd070(0x17e)),console[_0x4dd070(0x19e)]('')),openInBrowser(_0x299c81)[_0x4dd070(0x195)](_0x3a8325=>{const _0x48c78e=_0x4dd070;!_0x467777&&(_0x3a8325?console['log']('✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.'):(console[_0x48c78e(0x19e)]('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console[_0x48c78e(0x19e)](_0x48c78e(0x1aa),_0x299c81)),console['log'](''));})[_0x4dd070(0x19f)](()=>{const _0x43dc52=_0x4dd070;!_0x467777&&(console[_0x43dc52(0x19e)]('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console[_0x43dc52(0x19e)]('🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:',_0x299c81),console['log'](''));});}),_0x1f7bba['on'](_0x3665c9(0x189),_0x39ef46=>{const _0x5cf05c=_0x3665c9;!_0x467777&&console['error'](_0x5cf05c(0x1a1),_0x39ef46),_0x374b1a(_0x39ef46);});});}function a4_0x2f06(){const _0x38bd4d=['user','silent','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','https://g.yuntooai.com/cert/lovrabet-dev.json','\x20seconds.','92eFaKDG','platform','Login\x20successful.\x20Please\x20return\x20to\x20the\x20CLI\x20to\x20continue.\x20This\x20window\x20will\x20close\x20in\x20','text/html;\x20charset=utf-8','5346948KDKeVh','🔐\x20Starting\x20login\x20service...','<span\x20id=\x22t\x22>5</span>','cmd\x20/c\x20start\x20\x22\x22\x20\x22','error','45VOcLCN','writeHead','784610IfCtGW','11GxymyX','xdg-open\x20\x22','isAuth','close','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','189296eVOMJN','15258DrknNr','44sBbgBs','then','21426ULbMwj','https://dev.lovrabet.com:','json','darwin','87835jBLivv','win32','Login\x20Successful','session','log','catch','19128gUpCpb','Auth\x20server\x20error:','/sign-in?redirect=','</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>','14ftwEry','cookie','end','📍\x20Login\x20URL:'];a4_0x2f06=function(){return _0x38bd4d;};return a4_0x2f06();}function openInBrowser(_0x198207){return new Promise(_0x30fc99=>{const _0x5cb892=a4_0x1c5d,_0x48acad=process[_0x5cb892(0x182)];let _0x4ffc48;if(_0x48acad===_0x5cb892(0x19b))_0x4ffc48=_0x5cb892(0x188)+_0x198207+'\x22';else _0x48acad===_0x5cb892(0x199)?_0x4ffc48='open\x20\x22'+_0x198207+'\x22':_0x4ffc48=_0x5cb892(0x18e)+_0x198207+'\x22';exec(_0x4ffc48,_0x28e1d7=>{_0x28e1d7?_0x30fc99(![]):_0x30fc99(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a4_0x4a1d94(0x19e)](a4_0x4a1d94(0x18f),isAuth);}
1
+ const a4_0x129df5=a4_0x42d9;(function(_0x56ec00,_0x51798d){const _0xbb9d8f=a4_0x42d9,_0x264576=_0x56ec00();while(!![]){try{const _0x1defc0=parseInt(_0xbb9d8f(0x1f6))/0x1+-parseInt(_0xbb9d8f(0x1ff))/0x2+-parseInt(_0xbb9d8f(0x1fa))/0x3*(parseInt(_0xbb9d8f(0x1f1))/0x4)+-parseInt(_0xbb9d8f(0x207))/0x5*(-parseInt(_0xbb9d8f(0x1f3))/0x6)+parseInt(_0xbb9d8f(0x201))/0x7+parseInt(_0xbb9d8f(0x1ed))/0x8*(-parseInt(_0xbb9d8f(0x1f7))/0x9)+-parseInt(_0xbb9d8f(0x1e5))/0xa;if(_0x1defc0===_0x51798d)break;else _0x264576['push'](_0x264576['shift']());}catch(_0x2ecadb){_0x264576['push'](_0x264576['shift']());}}}(a4_0x1c81,0xd946d));function a4_0x42d9(_0x3c5c68,_0x17d433){_0x3c5c68=_0x3c5c68-0x1dc;const _0x1c81a4=a4_0x1c81();let _0x42d93a=_0x1c81a4[_0x3c5c68];return _0x42d93a;}function a4_0x1c81(){const _0x12ec5f=['open\x20\x22','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','isAuth','</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>','<span\x20id=\x22t\x22>5</span>','createServer','cookie','catch','object','listen','/api/auth/get-session','writeHead','4245220FLrSoC','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','end','https://dev.lovrabet.com:','<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>','then','🔐\x20Starting\x20login\x20service...','/sign-in?redirect=','24LFnatu','log','silent','cmd\x20/c\x20start\x20\x22\x22\x20\x22','12xXMsbm','user','32196wLeiko','xdg-open\x20\x22','\x20seconds.','1252203KJPUUM','929151hftFjf','</title></head>\x0a<body>\x0a\x20\x20<div>','error','1417278jQrOMW','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','darwin','close','json','306236nUDTYe','text/html;\x20charset=utf-8','11643555nPFOMJ','win32','session','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','127.0.0.1','260bDfDHr','address','headers'];a4_0x1c81=function(){return _0x12ec5f;};return a4_0x1c81();}import{writeFileSync}from'node:fs';import a4_0x530d76 from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';export async function authServer(_0x8633cc){const _0x1a80ba=a4_0x42d9,_0x33691c=_0x8633cc?.[_0x1a80ba(0x1ef)]||![];if(await getIsSessionValid())return!![];const _0x1c091b=await(await fetch('https://g.yuntooai.com/cert/lovrabet-dev.json'))['json']();return new Promise(async(_0x17dd07,_0xc62ffc)=>{const _0x1632f4=_0x1a80ba;let _0x51d2d4=0x0;const _0xd71b6f=a4_0x530d76[_0x1632f4(0x1de)](_0x1c091b,async(_0x839556,_0x58612a)=>{const _0x20e2ed=_0x1632f4,_0x1093ef=getUserDomain(),_0x5c54c1=_0x839556[_0x20e2ed(0x209)][_0x20e2ed(0x1df)]||'',_0x4d53a2=await fetch(_0x1093ef+_0x20e2ed(0x1e3),{'headers':{'cookie':_0x5c54c1}})[_0x20e2ed(0x1ea)](_0x18ef3e=>_0x18ef3e[_0x20e2ed(0x1fe)]()),_0xaffce=_0x4d53a2&&_0x4d53a2[_0x20e2ed(0x203)]&&_0x4d53a2[_0x20e2ed(0x1f2)];if(_0xaffce){writeFileSync(cookieFile,_0x5c54c1,'utf-8'),_0x17dd07(!![]);const _0x3c8015='Login\x20Successful',_0x5de8de='Login\x20successful.\x20Please\x20return\x20to\x20the\x20CLI\x20to\x20continue.\x20This\x20window\x20will\x20close\x20in\x20'+_0x20e2ed(0x1dd)+_0x20e2ed(0x1f5),_0x3b3bb7=_0x20e2ed(0x204),_0xb93910=_0x20e2ed(0x1e9)+_0x3c8015+_0x20e2ed(0x1f8)+_0x5de8de+_0x20e2ed(0x1dc)+_0x3b3bb7+'</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20如果自动关闭无效,显示文本提示让用户手动关闭\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>';_0x58612a['writeHead'](0xc8,{'Content-Type':_0x20e2ed(0x200)}),_0x58612a[_0x20e2ed(0x1e7)](_0xb93910),_0xd71b6f[_0x20e2ed(0x1fd)]();}else{const _0x65bcd4=''+encodeURIComponent(_0x20e2ed(0x1e8)+_0x51d2d4);_0x58612a[_0x20e2ed(0x1e4)](0x12e,{'location':_0x1093ef+_0x20e2ed(0x1ec)+_0x65bcd4}),_0x58612a[_0x20e2ed(0x1e7)]();return;}});_0xd71b6f[_0x1632f4(0x1e2)](0x0,_0x1632f4(0x206),()=>{const _0x8d02d4=_0x1632f4,_0x2c7c38=_0xd71b6f[_0x8d02d4(0x208)]();_0x51d2d4=typeof _0x2c7c38===_0x8d02d4(0x1e1)&&_0x2c7c38?_0x2c7c38['port']:Number(_0x2c7c38);const _0x4d73a7=_0x8d02d4(0x1e8)+_0x51d2d4;!_0x33691c&&(console[_0x8d02d4(0x1ee)](_0x8d02d4(0x1eb)),console[_0x8d02d4(0x1ee)]('📍\x20Login\x20URL:',_0x4d73a7),console['log'](_0x8d02d4(0x1e6)),console[_0x8d02d4(0x1ee)](''),console['log']('💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.'),console[_0x8d02d4(0x1ee)]('')),openInBrowser(_0x4d73a7)[_0x8d02d4(0x1ea)](_0x2cdab2=>{const _0xb02c27=_0x8d02d4;!_0x33691c&&(_0x2cdab2?console[_0xb02c27(0x1ee)](_0xb02c27(0x205)):(console[_0xb02c27(0x1ee)](_0xb02c27(0x20b)),console[_0xb02c27(0x1ee)](_0xb02c27(0x1fb),_0x4d73a7)),console[_0xb02c27(0x1ee)](''));})[_0x8d02d4(0x1e0)](()=>{const _0x599a65=_0x8d02d4;!_0x33691c&&(console[_0x599a65(0x1ee)]('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console[_0x599a65(0x1ee)](_0x599a65(0x1fb),_0x4d73a7),console[_0x599a65(0x1ee)](''));});}),_0xd71b6f['on']('error',_0x36219f=>{const _0x209b80=_0x1632f4;!_0x33691c&&console[_0x209b80(0x1f9)]('Auth\x20server\x20error:',_0x36219f),_0xc62ffc(_0x36219f);});});}function openInBrowser(_0x1658ea){return new Promise(_0x4e4917=>{const _0x28f751=a4_0x42d9,_0x4ae26c=process['platform'];let _0x5d62f0;if(_0x4ae26c===_0x28f751(0x202))_0x5d62f0=_0x28f751(0x1f0)+_0x1658ea+'\x22';else _0x4ae26c===_0x28f751(0x1fc)?_0x5d62f0=_0x28f751(0x20a)+_0x1658ea+'\x22':_0x5d62f0=_0x28f751(0x1f4)+_0x1658ea+'\x22';exec(_0x5d62f0,_0x22c8ab=>{_0x22c8ab?_0x4e4917(![]):_0x4e4917(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a4_0x129df5(0x1ee)](a4_0x129df5(0x20c),isAuth);}
@@ -1 +1 @@
1
- const a5_0x182245=a5_0x28b5;function a5_0x4615(){const _0x4e831a=['1179TJqeNm','1492XbEoaM','3560095sTtfSo','1113432LvhLTX','12HSOagH','4TmUEpj','16vQmSzf','3558599vJllGt','1895796pUBJqu','459257KiYoqA','40YQiInj','162715VCBjcV','cookie'];a5_0x4615=function(){return _0x4e831a;};return a5_0x4615();}(function(_0x15a860,_0x1e8414){const _0xee52bc=a5_0x28b5,_0x3efa12=_0x15a860();while(!![]){try{const _0x48d1be=parseInt(_0xee52bc(0xc7))/0x1*(parseInt(_0xee52bc(0xc3))/0x2)+parseInt(_0xee52bc(0xbe))/0x3*(parseInt(_0xee52bc(0xbf))/0x4)+parseInt(_0xee52bc(0xc0))/0x5+-parseInt(_0xee52bc(0xc1))/0x6+parseInt(_0xee52bc(0xbc))/0x7*(parseInt(_0xee52bc(0xc4))/0x8)+-parseInt(_0xee52bc(0xc6))/0x9*(parseInt(_0xee52bc(0xbb))/0xa)+-parseInt(_0xee52bc(0xc5))/0xb*(parseInt(_0xee52bc(0xc2))/0xc);if(_0x48d1be===_0x1e8414)break;else _0x3efa12['push'](_0x3efa12['shift']());}catch(_0x1252db){_0x3efa12['push'](_0x3efa12['shift']());}}}(a5_0x4615,0x73393));import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),'.lovrabet');export const cookieFile=join(configDir,a5_0x182245(0xbd));function a5_0x28b5(_0x21c067,_0x4fb44e){_0x21c067=_0x21c067-0xbb;const _0x461598=a5_0x4615();let _0x28b5f4=_0x461598[_0x21c067];return _0x28b5f4;}mkdirSync(configDir,{'recursive':!![]});
1
+ const a5_0x408e1e=a5_0x400d;(function(_0xb6168c,_0x1a38b5){const _0x5296a6=a5_0x400d,_0x2d09ab=_0xb6168c();while(!![]){try{const _0x1e9b1b=-parseInt(_0x5296a6(0x123))/0x1*(parseInt(_0x5296a6(0x117))/0x2)+parseInt(_0x5296a6(0x11b))/0x3+parseInt(_0x5296a6(0x118))/0x4*(parseInt(_0x5296a6(0x120))/0x5)+-parseInt(_0x5296a6(0x11f))/0x6*(parseInt(_0x5296a6(0x11a))/0x7)+parseInt(_0x5296a6(0x11c))/0x8+parseInt(_0x5296a6(0x121))/0x9*(parseInt(_0x5296a6(0x11e))/0xa)+-parseInt(_0x5296a6(0x122))/0xb;if(_0x1e9b1b===_0x1a38b5)break;else _0x2d09ab['push'](_0x2d09ab['shift']());}catch(_0x52aa69){_0x2d09ab['push'](_0x2d09ab['shift']());}}}(a5_0x32af,0x4c3a0));import{mkdirSync}from'node:fs';function a5_0x400d(_0x838509,_0x196176){_0x838509=_0x838509-0x117;const _0x32af37=a5_0x32af();let _0x400d8e=_0x32af37[_0x838509];return _0x400d8e;}import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a5_0x408e1e(0x11d));export const cookieFile=join(configDir,a5_0x408e1e(0x119));function a5_0x32af(){const _0xb2de22=['22HRCQHR','8EaUNIT','cookie','686sgPDlG','1151268oPPKmW','3057472mgtecw','.lovrabet','1370CJGWep','3132tDFKbp','782570JUvhCN','17379pGAwci','5873846yJCUkz','40559fYOXnI'];a5_0x32af=function(){return _0xb2de22;};return a5_0x32af();}mkdirSync(configDir,{'recursive':!![]});
@@ -1 +1 @@
1
- (function(_0xaae2,_0x5cb0c0){var _0x599346=a6_0x4d7e,_0x3b0701=_0xaae2();while(!![]){try{var _0x16c273=parseInt(_0x599346(0xec))/0x1*(parseInt(_0x599346(0xef))/0x2)+-parseInt(_0x599346(0xe6))/0x3+parseInt(_0x599346(0xe5))/0x4*(parseInt(_0x599346(0xeb))/0x5)+-parseInt(_0x599346(0xe8))/0x6*(-parseInt(_0x599346(0xe7))/0x7)+-parseInt(_0x599346(0xe4))/0x8+-parseInt(_0x599346(0xea))/0x9*(parseInt(_0x599346(0xe9))/0xa)+parseInt(_0x599346(0xed))/0xb*(parseInt(_0x599346(0xee))/0xc);if(_0x16c273===_0x5cb0c0)break;else _0x3b0701['push'](_0x3b0701['shift']());}catch(_0x2e8686){_0x3b0701['push'](_0x3b0701['shift']());}}}(a6_0x528f,0xd5394));import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){try{return readFileSync(cookieFile,'utf-8');}catch{}return'';}function a6_0x4d7e(_0x1b0d6c,_0x2702c7){_0x1b0d6c=_0x1b0d6c-0xe4;var _0x528f40=a6_0x528f();var _0x4d7e10=_0x528f40[_0x1b0d6c];return _0x4d7e10;}function a6_0x528f(){var _0x30b94f=['5041580UCRdRu','3896817gjteDj','5317123UFHYiH','12tYiOHj','550tndnFa','97254bUMHhm','5ZxwkBQ','50353RKpqNh','10582xXwrAM','7752fTyhnO','6fZTgCh','6283608hteRHR'];a6_0x528f=function(){return _0x30b94f;};return a6_0x528f();}
1
+ (function(_0x3e3a53,_0x27bb14){var _0x2f83ff=a6_0xa2b9,_0x332474=_0x3e3a53();while(!![]){try{var _0x34c266=parseInt(_0x2f83ff(0x185))/0x1*(parseInt(_0x2f83ff(0x180))/0x2)+-parseInt(_0x2f83ff(0x184))/0x3*(-parseInt(_0x2f83ff(0x182))/0x4)+parseInt(_0x2f83ff(0x17b))/0x5+parseInt(_0x2f83ff(0x183))/0x6+parseInt(_0x2f83ff(0x17e))/0x7*(-parseInt(_0x2f83ff(0x181))/0x8)+parseInt(_0x2f83ff(0x17d))/0x9*(parseInt(_0x2f83ff(0x17f))/0xa)+-parseInt(_0x2f83ff(0x17c))/0xb;if(_0x34c266===_0x27bb14)break;else _0x332474['push'](_0x332474['shift']());}catch(_0x518478){_0x332474['push'](_0x332474['shift']());}}}(a6_0xc19c,0x62d9a));function a6_0xc19c(){var _0x36519a=['9cgifkb','91TvjDmZ','6047090AqKyNP','42548jdqRco','420824BIHorF','2430964SiwiGR','3134346eEizov','3bgoDhn','19IVCxhj','1812530pMkSBQ','15541064nNcriD'];a6_0xc19c=function(){return _0x36519a;};return a6_0xc19c();}function a6_0xa2b9(_0xcf8936,_0x5d0744){_0xcf8936=_0xcf8936-0x17b;var _0xc19c97=a6_0xc19c();var _0xa2b94a=_0xc19c97[_0xcf8936];return _0xa2b94a;}import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){try{return readFileSync(cookieFile,'utf-8');}catch{}return'';}
@@ -1 +1 @@
1
- (function(_0x3b9fff,_0x2c6d84){const _0x13d25c=a7_0x2b7e,_0xb27936=_0x3b9fff();while(!![]){try{const _0x2d12b4=parseInt(_0x13d25c(0x144))/0x1*(-parseInt(_0x13d25c(0x14c))/0x2)+-parseInt(_0x13d25c(0x148))/0x3+-parseInt(_0x13d25c(0x146))/0x4*(parseInt(_0x13d25c(0x14d))/0x5)+-parseInt(_0x13d25c(0x147))/0x6+parseInt(_0x13d25c(0x14b))/0x7*(parseInt(_0x13d25c(0x14a))/0x8)+-parseInt(_0x13d25c(0x142))/0x9+parseInt(_0x13d25c(0x149))/0xa;if(_0x2d12b4===_0x2c6d84)break;else _0xb27936['push'](_0xb27936['shift']());}catch(_0x233bd4){_0xb27936['push'](_0xb27936['shift']());}}}(a7_0x13f9,0xa215c));function a7_0x13f9(){const _0x2575e2=['1098792JmaJYd','56Jqvlzv','646890dxXifx','670VXnVpv','user','json','1772802deWMep','session','1pxGNPk','/api/auth/get-session','36672VjZwOZ','46812sZbYdN','3368754xgpmvk','24447630QSSLkb'];a7_0x13f9=function(){return _0x2575e2;};return a7_0x13f9();}function a7_0x2b7e(_0x42dd1e,_0x2d92db){_0x42dd1e=_0x42dd1e-0x142;const _0x13f940=a7_0x13f9();let _0x2b7e98=_0x13f940[_0x42dd1e];return _0x2b7e98;}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';export async function getSessionUserInfo(){const _0x31404d=a7_0x2b7e;try{if(!existsSync(cookieFile))return null;const _0x3e1ebd=readFileSync(cookieFile,'utf-8'),_0x2bdd6e=await fetch(getUserDomain()+_0x31404d(0x145),{'headers':{'cookie':_0x3e1ebd}});if(!_0x2bdd6e['ok'])return null;const _0x3c4e4a=await _0x2bdd6e[_0x31404d(0x14f)]();if(!_0x3c4e4a[_0x31404d(0x143)]||!_0x3c4e4a[_0x31404d(0x14e)])return null;return _0x3c4e4a;}catch{return null;}}
1
+ (function(_0x2eece2,_0x57d495){const _0x23969d=a7_0x2d3c,_0x590f6c=_0x2eece2();while(!![]){try{const _0x33d8dd=-parseInt(_0x23969d(0xf1))/0x1+parseInt(_0x23969d(0xf9))/0x2+-parseInt(_0x23969d(0xf6))/0x3*(-parseInt(_0x23969d(0xee))/0x4)+parseInt(_0x23969d(0xf4))/0x5*(parseInt(_0x23969d(0xf7))/0x6)+parseInt(_0x23969d(0xed))/0x7*(parseInt(_0x23969d(0xf2))/0x8)+-parseInt(_0x23969d(0xfa))/0x9+-parseInt(_0x23969d(0xf5))/0xa;if(_0x33d8dd===_0x57d495)break;else _0x590f6c['push'](_0x590f6c['shift']());}catch(_0x340239){_0x590f6c['push'](_0x590f6c['shift']());}}}(a7_0x42ae,0x98a5d));function a7_0x42ae(){const _0x54e011=['json','9912QchwpK','6316PHVwXh','session','user','366015iyJtRZ','5472AflwfP','/api/auth/get-session','15QeGtMw','14165080iAxmaz','2307qLAimE','88470qJKsHE','utf-8','2280106YlkqLg','8633835jNLCCq'];a7_0x42ae=function(){return _0x54e011;};return a7_0x42ae();}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';function a7_0x2d3c(_0x10999f,_0x28a593){_0x10999f=_0x10999f-0xec;const _0x42aec6=a7_0x42ae();let _0x2d3c38=_0x42aec6[_0x10999f];return _0x2d3c38;}export async function getSessionUserInfo(){const _0x13193f=a7_0x2d3c;try{if(!existsSync(cookieFile))return null;const _0x1c6bec=readFileSync(cookieFile,_0x13193f(0xf8)),_0x1e8fdb=await fetch(getUserDomain()+_0x13193f(0xf3),{'headers':{'cookie':_0x1c6bec}});if(!_0x1e8fdb['ok'])return null;const _0x8c1458=await _0x1e8fdb[_0x13193f(0xec)]();if(!_0x8c1458[_0x13193f(0xef)]||!_0x8c1458[_0x13193f(0xf0)])return null;return _0x8c1458;}catch{return null;}}
@@ -1 +1 @@
1
- (function(_0xc3c52f,_0x1ec580){const _0x2e643a=a8_0x3d0f,_0x1ffd99=_0xc3c52f();while(!![]){try{const _0xa35be7=-parseInt(_0x2e643a(0x1f0))/0x1*(parseInt(_0x2e643a(0x1f6))/0x2)+parseInt(_0x2e643a(0x1f1))/0x3*(-parseInt(_0x2e643a(0x1f3))/0x4)+parseInt(_0x2e643a(0x1f8))/0x5*(-parseInt(_0x2e643a(0x1fe))/0x6)+-parseInt(_0x2e643a(0x1fc))/0x7+parseInt(_0x2e643a(0x1f2))/0x8*(parseInt(_0x2e643a(0x1fd))/0x9)+parseInt(_0x2e643a(0x1f5))/0xa+parseInt(_0x2e643a(0x201))/0xb*(parseInt(_0x2e643a(0x1f7))/0xc);if(_0xa35be7===_0x1ec580)break;else _0x1ffd99['push'](_0x1ffd99['shift']());}catch(_0x5e4176){_0x1ffd99['push'](_0x1ffd99['shift']());}}}(a8_0x46f3,0xd623c));function a8_0x3d0f(_0xa6a4b4,_0x28486c){_0xa6a4b4=_0xa6a4b4-0x1f0;const _0x46f38c=a8_0x46f3();let _0x3d0fe4=_0x46f38c[_0xa6a4b4];return _0x3d0fe4;}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0x3bea3b=a8_0x3d0f;try{if(!existsSync(cookieFile))return![];const _0x269a38=readFileSync(cookieFile,_0x3bea3b(0x1fb)),_0xcacbf1=await fetch(getUserDomain()+_0x3bea3b(0x1f9),{'headers':{'cookie':_0x269a38}})[_0x3bea3b(0x200)](_0x2e971a=>_0x2e971a[_0x3bea3b(0x1fa)]());return _0xcacbf1&&_0xcacbf1[_0x3bea3b(0x1f4)]&&_0xcacbf1[_0x3bea3b(0x1ff)];}catch{}return![];}function a8_0x46f3(){const _0x561bd3=['18764ojrnQs','session','4585490kIgaXL','2tvyRUc','168dpnsKK','5RFMJiw','/api/auth/get-session','json','utf-8','3851127Oplzix','1935JMgrpp','4874316Mitcpt','user','then','2188967YOtAuH','378041JsQMUH','639vKrKei','13856FfXHJW'];a8_0x46f3=function(){return _0x561bd3;};return a8_0x46f3();}
1
+ function a8_0x5900(_0xf49f82,_0xea6700){_0xf49f82=_0xf49f82-0xe7;const _0xf27705=a8_0xf277();let _0x5900bf=_0xf27705[_0xf49f82];return _0x5900bf;}(function(_0x290f94,_0x553f06){const _0x542e2a=a8_0x5900,_0x739e47=_0x290f94();while(!![]){try{const _0x3e46c1=parseInt(_0x542e2a(0xee))/0x1*(-parseInt(_0x542e2a(0xec))/0x2)+parseInt(_0x542e2a(0xf7))/0x3*(-parseInt(_0x542e2a(0xe7))/0x4)+-parseInt(_0x542e2a(0xf5))/0x5*(-parseInt(_0x542e2a(0xf1))/0x6)+-parseInt(_0x542e2a(0xf2))/0x7*(-parseInt(_0x542e2a(0xf4))/0x8)+-parseInt(_0x542e2a(0xef))/0x9+parseInt(_0x542e2a(0xf3))/0xa*(-parseInt(_0x542e2a(0xe8))/0xb)+-parseInt(_0x542e2a(0xf8))/0xc*(-parseInt(_0x542e2a(0xe9))/0xd);if(_0x3e46c1===_0x553f06)break;else _0x739e47['push'](_0x739e47['shift']());}catch(_0x4da92c){_0x739e47['push'](_0x739e47['shift']());}}}(a8_0xf277,0xf0b39));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';function a8_0xf277(){const _0x507819=['55328429eDjoSn','user','/api/auth/get-session','1151702vuipuI','then','1alYPdl','12186378URguuf','session','84KMEtBv','21007weEkhN','12140yXZSmn','2648FVpPhZ','107425mEaYlE','utf-8','9201fyXonw','12ISUZaY','2424GBDmsX','7029dMBcrF'];a8_0xf277=function(){return _0x507819;};return a8_0xf277();}export async function getIsSessionValid(){const _0x2a5061=a8_0x5900;try{if(!existsSync(cookieFile))return![];const _0x53038e=readFileSync(cookieFile,_0x2a5061(0xf6)),_0x4e62fb=await fetch(getUserDomain()+_0x2a5061(0xeb),{'headers':{'cookie':_0x53038e}})[_0x2a5061(0xed)](_0x15901f=>_0x15901f['json']());return _0x4e62fb&&_0x4e62fb[_0x2a5061(0xf0)]&&_0x4e62fb[_0x2a5061(0xea)];}catch{}return![];}
@@ -1 +1 @@
1
- (function(_0x5921a6,_0x1bb35f){var _0xb01029=a9_0x19df,_0x5abd7b=_0x5921a6();while(!![]){try{var _0x40d45f=-parseInt(_0xb01029(0xa0))/0x1+parseInt(_0xb01029(0xa9))/0x2+parseInt(_0xb01029(0xa1))/0x3+-parseInt(_0xb01029(0xa7))/0x4+parseInt(_0xb01029(0xa5))/0x5*(-parseInt(_0xb01029(0xa3))/0x6)+-parseInt(_0xb01029(0xa4))/0x7+-parseInt(_0xb01029(0xa6))/0x8*(-parseInt(_0xb01029(0xa2))/0x9);if(_0x40d45f===_0x1bb35f)break;else _0x5abd7b['push'](_0x5abd7b['shift']());}catch(_0x4c15ca){_0x5abd7b['push'](_0x5abd7b['shift']());}}}(a9_0x3ed2,0x4b11d));import{unlinkSync,existsSync}from'node:fs';function a9_0x3ed2(){var _0x2b2864=['118658keFWhh','!\x20Not\x20logged\x20in','397905PKAquw','1169223JOxAam','36fvnzWE','9972ZbFtbu','1657257eZkoBv','815QKqjbF','2663216Mbbckt','2270524VlSLxJ','✓\x20Logged\x20out'];a9_0x3ed2=function(){return _0x2b2864;};return a9_0x3ed2();}import{cookieFile}from'./constant.js';function a9_0x19df(_0x158851,_0x36674c){_0x158851=_0x158851-0x9f;var _0x3ed2a2=a9_0x3ed2();var _0x19df91=_0x3ed2a2[_0x158851];return _0x19df91;}export function logout(){var _0x17e721=a9_0x19df;existsSync(cookieFile)?(unlinkSync(cookieFile),console['log'](_0x17e721(0xa8))):console['log'](_0x17e721(0x9f));}
1
+ (function(_0x50e760,_0x29915a){var _0x4257c8=a9_0x5749,_0x488921=_0x50e760();while(!![]){try{var _0x4e96ba=-parseInt(_0x4257c8(0x7d))/0x1+parseInt(_0x4257c8(0x85))/0x2*(parseInt(_0x4257c8(0x83))/0x3)+parseInt(_0x4257c8(0x80))/0x4+parseInt(_0x4257c8(0x7c))/0x5+parseInt(_0x4257c8(0x81))/0x6+-parseInt(_0x4257c8(0x82))/0x7*(parseInt(_0x4257c8(0x7e))/0x8)+-parseInt(_0x4257c8(0x87))/0x9;if(_0x4e96ba===_0x29915a)break;else _0x488921['push'](_0x488921['shift']());}catch(_0x3e83a7){_0x488921['push'](_0x488921['shift']());}}}(a9_0x51c8,0x5abbc));import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';function a9_0x5749(_0x2fc9a6,_0x92afa2){_0x2fc9a6=_0x2fc9a6-0x7c;var _0x51c872=a9_0x51c8();var _0x57490d=_0x51c872[_0x2fc9a6];return _0x57490d;}function a9_0x51c8(){var _0x589e6a=['3440245ilDvQQ','304596eVlqxf','3043864wTCqjr','!\x20Not\x20logged\x20in','448352htceKu','3348198MFqhJt','7AZhFiG','628317BWogvy','log','4OOjjcm','✓\x20Logged\x20out','6482925uoKxOW'];a9_0x51c8=function(){return _0x589e6a;};return a9_0x51c8();}export function logout(){var _0x3eb259=a9_0x5749;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x3eb259(0x84)](_0x3eb259(0x86))):console['log'](_0x3eb259(0x7f));}
package/lib/cli-flags.js CHANGED
@@ -1 +1 @@
1
- (function(_0x1ad764,_0x39a6d3){const _0x24da8f=a10_0x2aed,_0x1f6a50=_0x1ad764();while(!![]){try{const _0xe8cf53=-parseInt(_0x24da8f(0xe5))/0x1*(-parseInt(_0x24da8f(0xe0))/0x2)+-parseInt(_0x24da8f(0xe1))/0x3*(-parseInt(_0x24da8f(0xe9))/0x4)+-parseInt(_0x24da8f(0xe7))/0x5*(-parseInt(_0x24da8f(0xe3))/0x6)+-parseInt(_0x24da8f(0xe4))/0x7+-parseInt(_0x24da8f(0xe6))/0x8*(parseInt(_0x24da8f(0xe2))/0x9)+-parseInt(_0x24da8f(0xe8))/0xa+parseInt(_0x24da8f(0xea))/0xb;if(_0xe8cf53===_0x39a6d3)break;else _0x1f6a50['push'](_0x1f6a50['shift']());}catch(_0x1ea1da){_0x1f6a50['push'](_0x1f6a50['shift']());}}}(a10_0x1418,0xd8dcc));function a10_0x2aed(_0x3708f8,_0x486eba){_0x3708f8=_0x3708f8-0xe0;const _0x14184a=a10_0x1418();let _0x2aed19=_0x14184a[_0x3708f8];return _0x2aed19;}export const dynamicCliFlags={'enableBffSave':{'type':'boolean'}};function a10_0x1418(){const _0x2e718a=['6989661HEAgCf','2456106LQJEXb','7436485iGUBZd','66499UyyCOc','8rAmvEK','5TiYomR','155720AAmWvy','4gWsiTi','8029032CMzNBD','36CsZszY','1219737YYIQwa'];a10_0x1418=function(){return _0x2e718a;};return a10_0x1418();}
1
+ function a10_0x9c0d(_0x34fda4,_0x2d9f1e){_0x34fda4=_0x34fda4-0xba;const _0x579de3=a10_0x579d();let _0x9c0d1c=_0x579de3[_0x34fda4];return _0x9c0d1c;}(function(_0x51fcbe,_0x243e2c){const _0x5b2248=a10_0x9c0d,_0x202080=_0x51fcbe();while(!![]){try{const _0x3de7b7=parseInt(_0x5b2248(0xba))/0x1+parseInt(_0x5b2248(0xbc))/0x2+parseInt(_0x5b2248(0xbe))/0x3+-parseInt(_0x5b2248(0xbf))/0x4*(parseInt(_0x5b2248(0xbb))/0x5)+-parseInt(_0x5b2248(0xc1))/0x6+-parseInt(_0x5b2248(0xc0))/0x7+-parseInt(_0x5b2248(0xbd))/0x8;if(_0x3de7b7===_0x243e2c)break;else _0x202080['push'](_0x202080['shift']());}catch(_0x40eea8){_0x202080['push'](_0x202080['shift']());}}}(a10_0x579d,0x91151));function a10_0x579d(){const _0x2b066a=['592xfzZZA','7934969RnoEnJ','716244YskuiS','670537pPyNkW','8310LMHKxi','1375998sdbxPD','2235808CblkVO','3042342keGtcY'];a10_0x579d=function(){return _0x2b066a;};return a10_0x579d();}export const dynamicCliFlags={'enableBffSave':{'type':'boolean'}};
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const a11_0x10bece=a11_0x1b2b;(function(_0x2a8d50,_0x4f7e1d){const _0x5b5474=a11_0x1b2b,_0x4ea496=_0x2a8d50();while(!![]){try{const _0x2722f2=-parseInt(_0x5b5474(0x14b))/0x1*(-parseInt(_0x5b5474(0x15c))/0x2)+parseInt(_0x5b5474(0x141))/0x3+-parseInt(_0x5b5474(0x138))/0x4+-parseInt(_0x5b5474(0x13b))/0x5+-parseInt(_0x5b5474(0x168))/0x6+-parseInt(_0x5b5474(0x151))/0x7*(parseInt(_0x5b5474(0x146))/0x8)+parseInt(_0x5b5474(0x155))/0x9*(parseInt(_0x5b5474(0x16a))/0xa);if(_0x2722f2===_0x4f7e1d)break;else _0x4ea496['push'](_0x4ea496['shift']());}catch(_0x1bb6b0){_0x4ea496['push'](_0x4ea496['shift']());}}}(a11_0x244a,0x21e40));import a11_0x2ba4f3 from'meow';import{showHelp}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{isKnownService,getServiceEntry,findDefinition,deprecatedAliases}from'./commands/registry.js';import{runCommand}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{getCookie}from'./auth/get-cookie.js';import{getApiDomain}from'./constant/domain.js';import{CLI_BIN_NAME,buildMeowFlags}from'./constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'./generated/build-info.js';import{reportCliHelpTrace}from'./telemetry/cli-help-trace.js';import{reportCommandTrace}from'./telemetry/cli-command-trace.js';import{isNonInteractive as a11_0x198816}from'./utils/is-non-interactive.js';import{registerOtelShutdownOnExit,exitWithOtelShutdown}from'./telemetry/register-otel-exit-shutdown.js';let dynamicCliFlags=null;try{dynamicCliFlags=(await import(a11_0x10bece(0x15b)))[a11_0x10bece(0x163)];}catch{}function a11_0x1b2b(_0x772416,_0x107ec4){_0x772416=_0x772416-0x135;const _0x244aa0=a11_0x244a();let _0x1b2b80=_0x244aa0[_0x772416];return _0x1b2b80;}const helpText=generateFullHelp(),cliVersion=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[a11_0x10bece(0x165)](0x0,0xa)+')':VERSION,cli=a11_0x2ba4f3(helpText,{'importMeta':import.meta,'version':cliVersion,'flags':{...buildMeowFlags(),...dynamicCliFlags||{}}});registerOtelShutdownOnExit(),await run();async function run(){const _0x22b92d=a11_0x10bece;let _0x3e6d44=cli[_0x22b92d(0x136)][0x0],_0x411526=cli['input'][0x1];const _0x2f3170=cli[_0x22b92d(0x161)];if(!_0x3e6d44){await reportCliHelpTrace('global'),showHelp();return;}const _0x255489=deprecatedAliases[_0x3e6d44];if(_0x255489&&!isKnownService(_0x3e6d44)){const _0x2987ba=_0x411526?CLI_BIN_NAME+'\x20'+_0x3e6d44+'\x20'+_0x411526:CLI_BIN_NAME+'\x20'+_0x3e6d44,_0x3f4b60=CLI_BIN_NAME+'\x20'+_0x255489[_0x22b92d(0x164)]+'\x20'+_0x255489[_0x22b92d(0x158)];console[_0x22b92d(0x142)](_0x22b92d(0x148)+_0x2987ba+_0x22b92d(0x162)+_0x3f4b60+_0x22b92d(0x157)+_0x22b92d(0x166)),await exitWithOtelShutdown(0x1);}if(!isKnownService(_0x3e6d44)){await reportCliHelpTrace(_0x22b92d(0x140),{'service':_0x3e6d44}),showHelp();return;}const _0x28adf1=getServiceEntry(_0x3e6d44);if(_0x2f3170[_0x22b92d(0x160)]&&typeof _0x2f3170[_0x22b92d(0x160)]===_0x22b92d(0x15d)){const {initEnv:_0x506493}=await import(_0x22b92d(0x137));_0x506493(_0x2f3170[_0x22b92d(0x160)]);}const {buildConfigFromFlags:_0x137a84}=await import(_0x22b92d(0x150)),_0xbc7686=_0x137a84(_0x2f3170);if(!_0x2f3170[_0x22b92d(0x160)]&&_0xbc7686['env']){const {initEnv:_0x4e5855}=await import(_0x22b92d(0x137));_0x4e5855(_0xbc7686[_0x22b92d(0x160)]);}if(_0xbc7686[_0x22b92d(0x14a)]?.[_0x22b92d(0x13c)]||_0xbc7686['raw']?.[_0x22b92d(0x16b)]||_0xbc7686[_0x22b92d(0x14a)]?.[_0x22b92d(0x153)]){const {initDomains:_0x104994}=await import(_0x22b92d(0x13f));_0x104994({'apiDomain':_0xbc7686[_0x22b92d(0x14a)][_0x22b92d(0x13c)]||undefined,'userDomain':_0xbc7686[_0x22b92d(0x14a)][_0x22b92d(0x16b)]||undefined,'runtimeDomain':_0xbc7686['raw'][_0x22b92d(0x153)]||undefined});}if(!_0x411526){if(_0x28adf1['defaultCommand'])_0x411526=_0x28adf1['defaultCommand'];else{if(_0x28adf1[_0x22b92d(0x139)]){if(_0x2f3170[_0x22b92d(0x159)]){printServiceHelp(_0x3e6d44);return;}await dispatchDeclarative(_0x28adf1[_0x22b92d(0x139)],_0x3e6d44,'',[],_0x2f3170,_0xbc7686);return;}else{printServiceHelp(_0x3e6d44);return;}}}if(_0x2f3170[_0x22b92d(0x159)]&&!findDefinition(_0x3e6d44,_0x411526)){printServiceHelp(_0x3e6d44);return;}{let _0x281e5a=findDefinition(_0x3e6d44,_0x411526),_0x458444=cli[_0x22b92d(0x136)]['slice'](0x2);if(!_0x281e5a){if(_0x28adf1[_0x22b92d(0x139)]){if(_0x2f3170[_0x22b92d(0x159)]){printServiceHelp(_0x3e6d44);return;}_0x281e5a=_0x28adf1['wildcardDef'],_0x458444=[_0x411526,...cli[_0x22b92d(0x136)][_0x22b92d(0x165)](0x2)];}else{printServiceHelp(_0x3e6d44),await handleErrorAsync(CliErrors[_0x22b92d(0x144)](_0x3e6d44+'\x20'+_0x411526));return;}}if(_0x2f3170[_0x22b92d(0x159)]){console[_0x22b92d(0x13a)](generateCommandHelp(_0x281e5a));return;}await dispatchDeclarative(_0x281e5a,_0x3e6d44,_0x411526,_0x458444,_0x2f3170,_0xbc7686);}}async function dispatchDeclarative(_0x3cfc02,_0x32c90f,_0x5ec952,_0x4501d4,_0x58a510,_0x5d0295){const _0x40b0bf=a11_0x10bece,_0x3c3b58=Date[_0x40b0bf(0x15e)]();let _0x5553a5;try{await runCommand(_0x3cfc02,{'rawFlags':_0x58a510,'args':_0x4501d4,'resolveAppCode':()=>_0x5d0295[_0x40b0bf(0x169)]||_0x58a510[_0x40b0bf(0x13e)]||process.env.RABETBASE_APPCODE||process.env.LOVRABET_APPCODE||undefined,'resolveCookie':()=>_0x5d0295[_0x40b0bf(0x152)]||getCookie(),'resolveApiDomain':()=>getApiDomain(),'isNonInteractive':a11_0x198816(_0x58a510),'defaultFormat':_0x5d0295[_0x40b0bf(0x147)],'defaultPageSize':_0x5d0295[_0x40b0bf(0x167)],'defaultVerbose':_0x5d0295[_0x40b0bf(0x143)],'apiDir':_0x5d0295[_0x40b0bf(0x14d)],'riskLevel':_0x5d0295['riskLevel'],'selectedAppName':_0x5d0295[_0x40b0bf(0x13d)]});}catch(_0x37ebc9){_0x5553a5=_0x37ebc9;}await reportCommandTrace({'service':_0x32c90f,'command':_0x5ec952,'flags':_0x58a510,'durationMs':Date['now']()-_0x3c3b58,'error':_0x5553a5});if(_0x5553a5)await handleErrorAsync(_0x5553a5);}function a11_0x244a(){const _0x5254b0=['error','verbose','unknownCommand','code','448408oDRSXr','format','⚠\x20`','hint','raw','761epEXWo','Error:\x20','apiDir','Unexpected\x20error:','message','./context.js','7HpLbHy','cookie','runtimeDomain','cancelled','9exHeEs','exitCode','`\x20in\x20v2.0.\x0a','command','help','stderr','./cli-flags.js','304eOviaH','string','now','write','env','flags','`\x20has\x20been\x20moved\x20to\x20`','dynamicCliFlags','service','slice','\x20\x20Please\x20update\x20your\x20command\x20and\x20try\x20again.\x0a','pageSize','1257600oDZYbK','appCode','2253170pwuBSX','userDomain','\x0aCancelled.\x0a','input','./constant/env.js','240620IWEEDH','wildcardDef','log','134090YNblcg','apiDomain','explicitAppName','appcode','./constant/domain.js','unknown_service','451353xqcpMR'];a11_0x244a=function(){return _0x5254b0;};return a11_0x244a();}function printServiceHelp(_0x544e1c){const _0x4c544f=a11_0x10bece;console[_0x4c544f(0x13a)](generateServiceHelp(_0x544e1c));}async function handleErrorAsync(_0x7ba860){const _0x262072=a11_0x10bece;if(_0x7ba860 instanceof Error&&_0x7ba860['name']==='ExitPromptError')return process[_0x262072(0x15a)][_0x262072(0x15f)](_0x262072(0x135)),await exitWithOtelShutdown(0x0);if(_0x7ba860 instanceof CliError){if(_0x7ba860[_0x262072(0x145)]===_0x262072(0x154))return process[_0x262072(0x15a)]['write']('\x0a'+_0x7ba860[_0x262072(0x14f)]+'\x0a'),await exitWithOtelShutdown(0x0);console['error'](_0x262072(0x14c)+_0x7ba860[_0x262072(0x14f)]);if(_0x7ba860[_0x262072(0x149)])console[_0x262072(0x142)]('Hint:\x20'+_0x7ba860[_0x262072(0x149)]);return await exitWithOtelShutdown(_0x7ba860[_0x262072(0x156)]);}return console[_0x262072(0x142)](_0x262072(0x14e),_0x7ba860),await exitWithOtelShutdown(0x1);}
2
+ const a11_0x9a400f=a11_0x40d4;(function(_0x5ef452,_0x11c294){const _0x35c964=a11_0x40d4,_0xfad895=_0x5ef452();while(!![]){try{const _0x123cf1=-parseInt(_0x35c964(0x19d))/0x1+parseInt(_0x35c964(0x18f))/0x2+-parseInt(_0x35c964(0x190))/0x3*(parseInt(_0x35c964(0x188))/0x4)+parseInt(_0x35c964(0x19c))/0x5*(parseInt(_0x35c964(0x184))/0x6)+parseInt(_0x35c964(0x1a3))/0x7+-parseInt(_0x35c964(0x19e))/0x8*(parseInt(_0x35c964(0x1ac))/0x9)+parseInt(_0x35c964(0x187))/0xa;if(_0x123cf1===_0x11c294)break;else _0xfad895['push'](_0xfad895['shift']());}catch(_0x1edff0){_0xfad895['push'](_0xfad895['shift']());}}}(a11_0x5b5e,0xc64b2));import a11_0x9c39d1 from'meow';import{showHelp}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{isKnownService,getServiceEntry,findDefinition,deprecatedAliases}from'./commands/registry.js';import{runCommand}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{getCookie}from'./auth/get-cookie.js';import{getApiDomain}from'./constant/domain.js';import{CLI_BIN_NAME,buildMeowFlags}from'./constant/cli.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'./generated/build-info.js';import{reportCliHelpTrace}from'./telemetry/cli-help-trace.js';import{reportCommandTrace}from'./telemetry/cli-command-trace.js';import{isNonInteractive as a11_0x2963b4}from'./utils/is-non-interactive.js';import{registerOtelShutdownOnExit,exitWithOtelShutdown}from'./telemetry/register-otel-exit-shutdown.js';let dynamicCliFlags=null;try{dynamicCliFlags=(await import(a11_0x9a400f(0x198)))[a11_0x9a400f(0x1a5)];}catch{}const helpText=generateFullHelp(),cliVersion=GIT_COMMIT!==a11_0x9a400f(0x19b)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME['slice'](0x0,0xa)+')':VERSION,cli=a11_0x9c39d1(helpText,{'importMeta':import.meta,'version':cliVersion,'flags':{...buildMeowFlags(),...dynamicCliFlags||{}}});registerOtelShutdownOnExit(),await run();async function run(){const _0x1fd9ed=a11_0x9a400f;let _0x1c5680=cli['input'][0x0],_0x5494c0=cli[_0x1fd9ed(0x183)][0x1];const _0x5b8f0d=cli[_0x1fd9ed(0x1ad)];if(!_0x1c5680){await reportCliHelpTrace('global'),showHelp();return;}const _0x560c08=deprecatedAliases[_0x1c5680];if(_0x560c08&&!isKnownService(_0x1c5680)){const _0x5b239b=_0x5494c0?CLI_BIN_NAME+'\x20'+_0x1c5680+'\x20'+_0x5494c0:CLI_BIN_NAME+'\x20'+_0x1c5680,_0x572b7c=CLI_BIN_NAME+'\x20'+_0x560c08[_0x1fd9ed(0x1a0)]+'\x20'+_0x560c08[_0x1fd9ed(0x182)];console[_0x1fd9ed(0x1a8)](_0x1fd9ed(0x193)+_0x5b239b+_0x1fd9ed(0x19a)+_0x572b7c+'`\x20in\x20v2.0.\x0a'+_0x1fd9ed(0x1a7)),await exitWithOtelShutdown(0x1);}if(!isKnownService(_0x1c5680)){await reportCliHelpTrace(_0x1fd9ed(0x1a2),{'service':_0x1c5680}),showHelp();return;}const _0x2e698a=getServiceEntry(_0x1c5680);if(_0x5b8f0d[_0x1fd9ed(0x191)]&&typeof _0x5b8f0d[_0x1fd9ed(0x191)]===_0x1fd9ed(0x18c)){const {initEnv:_0x596336}=await import(_0x1fd9ed(0x17d));_0x596336(_0x5b8f0d[_0x1fd9ed(0x191)]);}const {buildConfigFromFlags:_0x54e638}=await import(_0x1fd9ed(0x186)),_0x465b60=_0x54e638(_0x5b8f0d);if(!_0x5b8f0d['env']&&_0x465b60[_0x1fd9ed(0x191)]){const {initEnv:_0xaad663}=await import(_0x1fd9ed(0x17d));_0xaad663(_0x465b60[_0x1fd9ed(0x191)]);}if(_0x465b60['raw']?.[_0x1fd9ed(0x19f)]||_0x465b60[_0x1fd9ed(0x17b)]?.['userDomain']||_0x465b60[_0x1fd9ed(0x17b)]?.[_0x1fd9ed(0x1a9)]){const {initDomains:_0x180693}=await import(_0x1fd9ed(0x17e));_0x180693({'apiDomain':_0x465b60[_0x1fd9ed(0x17b)][_0x1fd9ed(0x19f)]||undefined,'userDomain':_0x465b60['raw']['userDomain']||undefined,'runtimeDomain':_0x465b60[_0x1fd9ed(0x17b)]['runtimeDomain']||undefined});}if(!_0x5494c0){if(_0x2e698a[_0x1fd9ed(0x1a4)])_0x5494c0=_0x2e698a['defaultCommand'];else{if(_0x2e698a[_0x1fd9ed(0x1aa)]){if(_0x5b8f0d[_0x1fd9ed(0x180)]){console[_0x1fd9ed(0x194)](generateCommandHelp(_0x2e698a[_0x1fd9ed(0x1aa)]));return;}await dispatchDeclarative(_0x2e698a[_0x1fd9ed(0x1aa)],_0x1c5680,'',[],_0x5b8f0d,_0x465b60);return;}else{printServiceHelp(_0x1c5680);return;}}}if(_0x5b8f0d[_0x1fd9ed(0x180)]&&!findDefinition(_0x1c5680,_0x5494c0)){printServiceHelp(_0x1c5680);return;}{let _0x302941=findDefinition(_0x1c5680,_0x5494c0),_0x60ab3d=cli['input'][_0x1fd9ed(0x17f)](0x2);if(!_0x302941){if(_0x2e698a[_0x1fd9ed(0x1aa)]){if(_0x5b8f0d['help']){console[_0x1fd9ed(0x194)](generateCommandHelp(_0x2e698a[_0x1fd9ed(0x1aa)]));return;}_0x302941=_0x2e698a[_0x1fd9ed(0x1aa)],_0x60ab3d=[_0x5494c0,...cli['input']['slice'](0x2)];}else{printServiceHelp(_0x1c5680),await handleErrorAsync(CliErrors[_0x1fd9ed(0x18a)](_0x1c5680+'\x20'+_0x5494c0));return;}}if(_0x5b8f0d[_0x1fd9ed(0x180)]){console[_0x1fd9ed(0x194)](generateCommandHelp(_0x302941));return;}await dispatchDeclarative(_0x302941,_0x1c5680,_0x5494c0,_0x60ab3d,_0x5b8f0d,_0x465b60);}}async function dispatchDeclarative(_0x2e37d7,_0x5455a9,_0xda575a,_0x360cd2,_0x50a786,_0x50395c){const _0xbbb096=a11_0x9a400f,_0x87b2e0=Date[_0xbbb096(0x1ab)]();let _0x25f057;try{await runCommand(_0x2e37d7,{'rawFlags':_0x50a786,'args':_0x360cd2,'resolveAppCode':()=>_0x50395c[_0xbbb096(0x195)]||_0x50a786[_0xbbb096(0x197)]||process.env.RABETBASE_APPCODE||process.env.LOVRABET_APPCODE||undefined,'resolveCookie':()=>_0x50395c['cookie']||getCookie(),'resolveApiDomain':()=>getApiDomain(),'isNonInteractive':a11_0x2963b4(_0x50a786),'defaultFormat':_0x50395c[_0xbbb096(0x196)],'defaultPageSize':_0x50395c[_0xbbb096(0x192)],'defaultVerbose':_0x50395c['verbose'],'apiDir':_0x50395c[_0xbbb096(0x1a1)],'riskLevel':_0x50395c['riskLevel'],'selectedAppName':_0x50395c['explicitAppName']});}catch(_0x452d3e){_0x25f057=_0x452d3e;}await reportCommandTrace({'service':_0x5455a9,'command':_0xda575a,'flags':_0x50a786,'durationMs':Date['now']()-_0x87b2e0,'error':_0x25f057});if(_0x25f057)await handleErrorAsync(_0x25f057);}function printServiceHelp(_0x5df5bb){const _0xb52f56=a11_0x9a400f;console[_0xb52f56(0x194)](generateServiceHelp(_0x5df5bb));}function a11_0x40d4(_0x1543a9,_0x15d587){_0x1543a9=_0x1543a9-0x17b;const _0x5b5e56=a11_0x5b5e();let _0x40d4d7=_0x5b5e56[_0x1543a9];return _0x40d4d7;}function a11_0x5b5e(){const _0x46173d=['724585qFrlzI','1168344pMQoyt','8KXOUKG','apiDomain','service','apiDir','unknown_service','2152563eddrpl','defaultCommand','dynamicCliFlags','code','\x20\x20Please\x20update\x20your\x20command\x20and\x20try\x20again.\x0a','error','runtimeDomain','wildcardDef','now','6368472nThOtP','flags','Unexpected\x20error:','raw','\x0aCancelled.\x0a','./constant/env.js','./constant/domain.js','slice','help','message','command','input','12OPGmbE','write','./context.js','23784340SIJSox','4GdkwyU','name','unknownCommand','hint','string','Error:\x20','stderr','1145512TDHeMU','2581113cafKYb','env','pageSize','⚠\x20`','log','appCode','format','appcode','./cli-flags.js','Hint:\x20','`\x20has\x20been\x20moved\x20to\x20`','unknown'];a11_0x5b5e=function(){return _0x46173d;};return a11_0x5b5e();}async function handleErrorAsync(_0x2b5b7e){const _0x3379e1=a11_0x9a400f;if(_0x2b5b7e instanceof Error&&_0x2b5b7e[_0x3379e1(0x189)]==='ExitPromptError')return process[_0x3379e1(0x18e)][_0x3379e1(0x185)](_0x3379e1(0x17c)),await exitWithOtelShutdown(0x0);if(_0x2b5b7e instanceof CliError){if(_0x2b5b7e[_0x3379e1(0x1a6)]==='cancelled')return process[_0x3379e1(0x18e)]['write']('\x0a'+_0x2b5b7e[_0x3379e1(0x181)]+'\x0a'),await exitWithOtelShutdown(0x0);console['error'](_0x3379e1(0x18d)+_0x2b5b7e[_0x3379e1(0x181)]);if(_0x2b5b7e[_0x3379e1(0x18b)])console['error'](_0x3379e1(0x199)+_0x2b5b7e[_0x3379e1(0x18b)]);return await exitWithOtelShutdown(_0x2b5b7e['exitCode']);}return console[_0x3379e1(0x1a8)](_0x3379e1(0x1ae),_0x2b5b7e),await exitWithOtelShutdown(0x1);}
@@ -1 +1 @@
1
- const a12_0x35bb22=a12_0x374f;function a12_0x5734(){const _0x154269=['\x20file(s)','238qiFUlO','\x20doc(s)\x20failed','\x20dataset(s)','appCode','Failed\x20to\x20fetch\x20datasets','some','\x20dataset(s)\x1b[0m','Doc\x20generation\x20complete:\x20','Fetched\x20','trim','775JKMAkW','success','str','write','!\x20No\x20datasets\x20found.','\x20succeeded,\x20','start','split','3768216QFXSyz','\x20failed','\x20doc(s)\x20in\x20','isArray','join','error','./docs','None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20','fail','4406JeMdwb','Output\x20directory\x20(default:\x20./docs)','datasetcode','1005GjYjlD','log','padStart','filter','10206180vvRxpv','output','string','params','\x20\x20•\x20','Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)','):\x20','Fetching\x20dataset\x20list\x20for\x20','\x1b[90m*\x20Filtered\x20','46254iGeqZq','cookie','api','9636940BGvMWs','parse','51112JjnpbA','Invalid\x20--params:\x20','\x1b[0m','1267030nVOUPr','\x0d\x20\x20[','validation','.md','datasetCode','Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27','message','\x20of\x20','\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20','Doc\x20generation:\x20','length','Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','--datasetcode\x20cannot\x20be\x20empty.'];a12_0x5734=function(){return _0x154269;};return a12_0x5734();}(function(_0x558ee5,_0xd3842e){const _0x253fd0=a12_0x374f,_0x498eea=_0x558ee5();while(!![]){try{const _0x554928=parseInt(_0x253fd0(0xb8))/0x1+-parseInt(_0x253fd0(0xa0))/0x2*(parseInt(_0x253fd0(0xa3))/0x3)+parseInt(_0x253fd0(0x97))/0x4+-parseInt(_0x253fd0(0x8f))/0x5*(parseInt(_0x253fd0(0xb0))/0x6)+parseInt(_0x253fd0(0x85))/0x7*(parseInt(_0x253fd0(0xb5))/0x8)+parseInt(_0x253fd0(0xa7))/0x9+-parseInt(_0x253fd0(0xb3))/0xa;if(_0x554928===_0xd3842e)break;else _0x498eea['push'](_0x498eea['shift']());}catch(_0x1efcb6){_0x498eea['push'](_0x498eea['shift']());}}}(a12_0x5734,0xa20b8));import a12_0x39e3b5 from'ora';function a12_0x374f(_0x2be273,_0x3176e6){_0x2be273=_0x2be273-0x7c;const _0x573478=a12_0x5734();let _0x374f33=_0x573478[_0x2be273];return _0x374f33;}import{fetchModelList}from'../../api/fetch-model-list.js';import{generateDatasetDocs}from'../../api/api-doc.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../common/flags.js';export const apiDoc={'service':a12_0x35bb22(0xb2),'command':'doc','description':a12_0x35bb22(0x82),'risk':a12_0x35bb22(0x92),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a12_0x35bb22(0xa8),'type':a12_0x35bb22(0xa9),'description':a12_0x35bb22(0xa1)},{'name':a12_0x35bb22(0xa2),'type':a12_0x35bb22(0xa9),'description':'Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for'},{'name':a12_0x35bb22(0xaa),'type':a12_0x35bb22(0xa9),'description':a12_0x35bb22(0xac)}],async 'execute'(_0x193065){const _0x1fc9da=a12_0x35bb22,_0x309e98=_0x193065[_0x1fc9da(0x91)](_0x1fc9da(0xa8))||_0x1fc9da(0x9d),_0x3b8bf5=_0x193065[_0x1fc9da(0x91)]('datasetcode'),_0x49e631=_0x193065[_0x1fc9da(0x91)](_0x1fc9da(0xaa));let _0x55a565;if(_0x49e631)try{_0x55a565=JSON[_0x1fc9da(0xb4)](_0x49e631);if(typeof _0x55a565!=='object'||_0x55a565===null||Array[_0x1fc9da(0x9a)](_0x55a565))throw new Error('must\x20be\x20a\x20JSON\x20object');}catch(_0x4ce69d){throw CliErrors['validation'](_0x1fc9da(0xb6)+(_0x4ce69d instanceof Error?_0x4ce69d[_0x1fc9da(0x7d)]:String(_0x4ce69d)),_0x1fc9da(0x7c));}let _0x184624;if(_0x3b8bf5){const _0x182653=_0x3b8bf5[_0x1fc9da(0x96)](',')['map'](_0x244b40=>_0x244b40[_0x1fc9da(0x8e)]())[_0x1fc9da(0xa6)](_0x29dbd6=>_0x29dbd6['length']>0x0);if(_0x182653[_0x1fc9da(0x81)]===0x0)throw CliErrors[_0x1fc9da(0xba)](_0x1fc9da(0x83));_0x184624=new Set(_0x182653),console[_0x1fc9da(0xa4)]('\x1b[90m*\x20Generating\x20docs\x20for:\x20'+_0x182653['join'](',\x20')+_0x1fc9da(0xb7));}const _0x429684=a12_0x39e3b5(_0x1fc9da(0xae)+_0x193065[_0x1fc9da(0x88)]+'...')[_0x1fc9da(0x95)]();let _0x35df21;try{({configArray:_0x35df21}=await fetchModelList(_0x193065[_0x1fc9da(0x88)],_0x193065[_0x1fc9da(0xb1)]),_0x429684['succeed'](_0x1fc9da(0x8d)+_0x35df21[_0x1fc9da(0x81)]+_0x1fc9da(0x87)));}catch(_0x2cfdd4){_0x429684[_0x1fc9da(0x9f)](_0x1fc9da(0x89));throw _0x2cfdd4;}if(_0x35df21[_0x1fc9da(0x81)]===0x0)return console[_0x1fc9da(0xa4)](_0x1fc9da(0x93)),{'ok':!![]};let _0x4211d6=_0x35df21;if(_0x184624){_0x4211d6=_0x35df21['filter'](_0x460e50=>_0x184624['has'](_0x460e50[_0x1fc9da(0xbc)]));const _0x2afbc4=[..._0x184624][_0x1fc9da(0xa6)](_0x3cbafd=>!_0x35df21[_0x1fc9da(0x8a)](_0x2e7b09=>_0x2e7b09[_0x1fc9da(0xbc)]===_0x3cbafd));_0x2afbc4[_0x1fc9da(0x81)]>0x0&&console[_0x1fc9da(0xa4)](_0x1fc9da(0x7f)+_0x2afbc4[_0x1fc9da(0x9b)](',\x20')+_0x1fc9da(0xb7));if(_0x4211d6['length']===0x0)throw CliErrors[_0x1fc9da(0xba)](_0x1fc9da(0x9e)+[..._0x184624]['join'](',\x20'));console['log'](_0x1fc9da(0xaf)+_0x4211d6['length']+_0x1fc9da(0x7e)+_0x35df21[_0x1fc9da(0x81)]+_0x1fc9da(0x8b));}let _0x7663e2=0x0;const _0x3414f7=await generateDatasetDocs(_0x4211d6,_0x193065[_0x1fc9da(0x88)],_0x193065[_0x1fc9da(0xb1)],_0x309e98,(_0x19e547,_0x48fb74,_0x385521)=>{const _0xb2e948=_0x1fc9da;_0x7663e2=_0x19e547,process['stdout'][_0xb2e948(0x92)](_0xb2e948(0xb9)+String(_0x19e547)[_0xb2e948(0xa5)](String(_0x48fb74)[_0xb2e948(0x81)])+'/'+_0x48fb74+']\x20'+_0x385521+_0xb2e948(0xbb));},_0x55a565);if(_0x7663e2>0x0)process['stdout']['write']('\x0a');const _0x3a453c=_0x3414f7[_0x1fc9da(0xa6)](_0x27634f=>_0x27634f[_0x1fc9da(0x90)])[_0x1fc9da(0x81)],_0x14944d=_0x3414f7[_0x1fc9da(0xa6)](_0x2c1e99=>!_0x2c1e99[_0x1fc9da(0x90)])[_0x1fc9da(0x81)];console[_0x1fc9da(0xa4)](),console[_0x1fc9da(0xa4)]('✓\x20Generated\x20'+_0x3a453c+_0x1fc9da(0x99)+_0x309e98);if(_0x14944d>0x0){console[_0x1fc9da(0x9c)]('!\x20'+_0x14944d+_0x1fc9da(0x86));for(const _0x49a24f of _0x3414f7['filter'](_0x5f2b1=>!_0x5f2b1[_0x1fc9da(0x90)])){console['error'](_0x1fc9da(0xab)+_0x49a24f['datasetName']+'\x20('+_0x49a24f[_0x1fc9da(0xbc)]+_0x1fc9da(0xad)+_0x49a24f[_0x1fc9da(0x9c)]);}}return{'ok':_0x14944d===0x0,'message':_0x14944d>0x0?_0x1fc9da(0x80)+_0x3a453c+_0x1fc9da(0x94)+_0x14944d+_0x1fc9da(0x98):_0x1fc9da(0x8c)+_0x3a453c+_0x1fc9da(0x84)};}};
1
+ const a12_0x103509=a12_0x3cd3;(function(_0x12fdf6,_0x25e33d){const _0x559818=a12_0x3cd3,_0x104e77=_0x12fdf6();while(!![]){try{const _0x1c4580=-parseInt(_0x559818(0x161))/0x1*(-parseInt(_0x559818(0x170))/0x2)+parseInt(_0x559818(0x159))/0x3*(parseInt(_0x559818(0x151))/0x4)+parseInt(_0x559818(0x16a))/0x5+-parseInt(_0x559818(0x149))/0x6*(-parseInt(_0x559818(0x15d))/0x7)+parseInt(_0x559818(0x133))/0x8+parseInt(_0x559818(0x137))/0x9+parseInt(_0x559818(0x152))/0xa*(-parseInt(_0x559818(0x160))/0xb);if(_0x1c4580===_0x25e33d)break;else _0x104e77['push'](_0x104e77['shift']());}catch(_0x23409b){_0x104e77['push'](_0x104e77['shift']());}}}(a12_0x8496,0x9fa9f));import a12_0x256392 from'ora';import{fetchModelList}from'../../api/fetch-model-list.js';import{generateDatasetDocs}from'../../api/api-doc.js';function a12_0x3cd3(_0x2b5dee,_0x44fe05){_0x2b5dee=_0x2b5dee-0x12f;const _0x849622=a12_0x8496();let _0x3cd3a0=_0x849622[_0x2b5dee];return _0x3cd3a0;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../common/flags.js';function a12_0x8496(){const _0x3c6119=['Fetching\x20dataset\x20list\x20for\x20','\x20file(s)','\x20doc(s)\x20in\x20','4409713LCHBHW','map','must\x20be\x20a\x20JSON\x20object','22421267wvhdYL','5qbccbf','output','\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20','\x0d\x20\x20[','str','succeed','\x20doc(s)\x20failed','params','✓\x20Generated\x20','2153250gjArir','None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20','string','datasetCode','.md','Invalid\x20--params:\x20','513848lgglRD','Doc\x20generation\x20complete:\x20','some','join','padStart','isArray','4480536PmQRol','object','Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27','datasetName','8650980mSDTGo','filter','Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for','api','has','message','\x20succeeded,\x20','\x1b[90m*\x20Generating\x20docs\x20for:\x20','!\x20No\x20datasets\x20found.','--datasetcode\x20cannot\x20be\x20empty.','appCode','Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','length','Doc\x20generation:\x20','Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)','\x1b[90m*\x20Filtered\x20','cookie','log','6mHrLAm','...','error','write','):\x20','success','trim','Failed\x20to\x20fetch\x20datasets','148FeGdOJ','20anoRWi','\x1b[0m','split','fail','validation','\x20dataset(s)\x1b[0m','./docs','70059kZJUJj'];a12_0x8496=function(){return _0x3c6119;};return a12_0x8496();}export const apiDoc={'service':a12_0x103509(0x13a),'command':'doc','description':a12_0x103509(0x142),'risk':a12_0x103509(0x14c),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a12_0x103509(0x162),'type':a12_0x103509(0x16c),'description':'Output\x20directory\x20(default:\x20./docs)'},{'name':'datasetcode','type':a12_0x103509(0x16c),'description':a12_0x103509(0x139)},{'name':a12_0x103509(0x168),'type':'string','description':a12_0x103509(0x145)}],async 'execute'(_0x1d38e3){const _0x54b075=a12_0x103509,_0xfc9589=_0x1d38e3[_0x54b075(0x165)](_0x54b075(0x162))||_0x54b075(0x158),_0x2174d8=_0x1d38e3[_0x54b075(0x165)]('datasetcode'),_0x36a283=_0x1d38e3[_0x54b075(0x165)](_0x54b075(0x168));let _0x136c16;if(_0x36a283)try{_0x136c16=JSON['parse'](_0x36a283);if(typeof _0x136c16!==_0x54b075(0x134)||_0x136c16===null||Array[_0x54b075(0x132)](_0x136c16))throw new Error(_0x54b075(0x15f));}catch(_0x3f3246){throw CliErrors['validation'](_0x54b075(0x16f)+(_0x3f3246 instanceof Error?_0x3f3246[_0x54b075(0x13c)]:String(_0x3f3246)),_0x54b075(0x135));}let _0x3e357d;if(_0x2174d8){const _0x20c4b3=_0x2174d8[_0x54b075(0x154)](',')[_0x54b075(0x15e)](_0x4f8c67=>_0x4f8c67[_0x54b075(0x14f)]())[_0x54b075(0x138)](_0x74dd98=>_0x74dd98[_0x54b075(0x143)]>0x0);if(_0x20c4b3[_0x54b075(0x143)]===0x0)throw CliErrors[_0x54b075(0x156)](_0x54b075(0x140));_0x3e357d=new Set(_0x20c4b3),console['log'](_0x54b075(0x13e)+_0x20c4b3[_0x54b075(0x130)](',\x20')+'\x1b[0m');}const _0x195851=a12_0x256392(_0x54b075(0x15a)+_0x1d38e3['appCode']+_0x54b075(0x14a))['start']();let _0x4c9e28;try{({configArray:_0x4c9e28}=await fetchModelList(_0x1d38e3[_0x54b075(0x141)],_0x1d38e3[_0x54b075(0x147)]),_0x195851[_0x54b075(0x166)]('Fetched\x20'+_0x4c9e28[_0x54b075(0x143)]+'\x20dataset(s)'));}catch(_0x29dbfc){_0x195851[_0x54b075(0x155)](_0x54b075(0x150));throw _0x29dbfc;}if(_0x4c9e28['length']===0x0)return console[_0x54b075(0x148)](_0x54b075(0x13f)),{'ok':!![]};let _0x4a7968=_0x4c9e28;if(_0x3e357d){_0x4a7968=_0x4c9e28['filter'](_0x40a22c=>_0x3e357d[_0x54b075(0x13b)](_0x40a22c[_0x54b075(0x16d)]));const _0x1fd079=[..._0x3e357d][_0x54b075(0x138)](_0x1e0db3=>!_0x4c9e28[_0x54b075(0x12f)](_0x1121ef=>_0x1121ef[_0x54b075(0x16d)]===_0x1e0db3));_0x1fd079['length']>0x0&&console['log'](_0x54b075(0x163)+_0x1fd079[_0x54b075(0x130)](',\x20')+_0x54b075(0x153));if(_0x4a7968[_0x54b075(0x143)]===0x0)throw CliErrors[_0x54b075(0x156)](_0x54b075(0x16b)+[..._0x3e357d][_0x54b075(0x130)](',\x20'));console['log'](_0x54b075(0x146)+_0x4a7968['length']+'\x20of\x20'+_0x4c9e28['length']+_0x54b075(0x157));}let _0x2ccb48=0x0;const _0x586945=await generateDatasetDocs(_0x4a7968,_0x1d38e3[_0x54b075(0x141)],_0x1d38e3[_0x54b075(0x147)],_0xfc9589,(_0x23aa1a,_0x1fc1f5,_0x57fc70)=>{const _0x3a7443=_0x54b075;_0x2ccb48=_0x23aa1a,process['stdout'][_0x3a7443(0x14c)](_0x3a7443(0x164)+String(_0x23aa1a)[_0x3a7443(0x131)](String(_0x1fc1f5)[_0x3a7443(0x143)])+'/'+_0x1fc1f5+']\x20'+_0x57fc70+_0x3a7443(0x16e));},_0x136c16);if(_0x2ccb48>0x0)process['stdout']['write']('\x0a');const _0x4a407d=_0x586945['filter'](_0x526cac=>_0x526cac[_0x54b075(0x14e)])[_0x54b075(0x143)],_0xf4150e=_0x586945['filter'](_0x18f992=>!_0x18f992[_0x54b075(0x14e)])[_0x54b075(0x143)];console[_0x54b075(0x148)](),console[_0x54b075(0x148)](_0x54b075(0x169)+_0x4a407d+_0x54b075(0x15c)+_0xfc9589);if(_0xf4150e>0x0){console['error']('!\x20'+_0xf4150e+_0x54b075(0x167));for(const _0x3ddfde of _0x586945[_0x54b075(0x138)](_0x569dbb=>!_0x569dbb[_0x54b075(0x14e)])){console[_0x54b075(0x14b)]('\x20\x20•\x20'+_0x3ddfde[_0x54b075(0x136)]+'\x20('+_0x3ddfde[_0x54b075(0x16d)]+_0x54b075(0x14d)+_0x3ddfde[_0x54b075(0x14b)]);}}return{'ok':_0xf4150e===0x0,'message':_0xf4150e>0x0?_0x54b075(0x144)+_0x4a407d+_0x54b075(0x13d)+_0xf4150e+'\x20failed':_0x54b075(0x171)+_0x4a407d+_0x54b075(0x15b)};}};
@@ -1 +1 @@
1
- (function(_0x286cb6,_0x1d83b8){const _0x13df4c=a13_0xe95e,_0x2532a2=_0x286cb6();while(!![]){try{const _0x37f7bf=parseInt(_0x13df4c(0x170))/0x1*(-parseInt(_0x13df4c(0x16a))/0x2)+-parseInt(_0x13df4c(0x172))/0x3+parseInt(_0x13df4c(0x16e))/0x4*(parseInt(_0x13df4c(0x16c))/0x5)+-parseInt(_0x13df4c(0x174))/0x6*(parseInt(_0x13df4c(0x16f))/0x7)+-parseInt(_0x13df4c(0x16b))/0x8*(parseInt(_0x13df4c(0x173))/0x9)+parseInt(_0x13df4c(0x16d))/0xa+parseInt(_0x13df4c(0x175))/0xb*(parseInt(_0x13df4c(0x171))/0xc);if(_0x37f7bf===_0x1d83b8)break;else _0x2532a2['push'](_0x2532a2['shift']());}catch(_0x23afcc){_0x2532a2['push'](_0x2532a2['shift']());}}}(a13_0x37bd,0x67e29));import{apiList}from'./list.js';import{apiPull}from'./pull.js';import{apiDoc}from'./doc.js';function a13_0xe95e(_0x187982,_0x216344){_0x187982=_0x187982-0x16a;const _0x37bd49=a13_0x37bd();let _0xe95e78=_0x37bd49[_0x187982];return _0xe95e78;}function a13_0x37bd(){const _0x10ddda=['1125408TIJLzj','1920099lnHQGO','531YcUxRa','2266338CtzvNE','297yjSRJv','58oAGcIc','83152NiFXyl','850895hDPSaV','1367910rvCHUj','4dQsZLq','7ubCaHk','26987ttHqqy'];a13_0x37bd=function(){return _0x10ddda;};return a13_0x37bd();}export const apiDefinitions=[apiList,apiPull,apiDoc];
1
+ (function(_0x1339a1,_0x1df8a1){const _0x408bbd=a13_0x4860,_0x37b063=_0x1339a1();while(!![]){try{const _0x3249aa=-parseInt(_0x408bbd(0x98))/0x1*(-parseInt(_0x408bbd(0x9b))/0x2)+parseInt(_0x408bbd(0x97))/0x3+parseInt(_0x408bbd(0x9c))/0x4*(-parseInt(_0x408bbd(0x95))/0x5)+parseInt(_0x408bbd(0x96))/0x6+parseInt(_0x408bbd(0x9e))/0x7*(parseInt(_0x408bbd(0x9d))/0x8)+parseInt(_0x408bbd(0x9f))/0x9*(parseInt(_0x408bbd(0x9a))/0xa)+-parseInt(_0x408bbd(0x99))/0xb;if(_0x3249aa===_0x1df8a1)break;else _0x37b063['push'](_0x37b063['shift']());}catch(_0x1d50a3){_0x37b063['push'](_0x37b063['shift']());}}}(a13_0xe68e,0x9bb4b));import{apiList}from'./list.js';import{apiPull}from'./pull.js';import{apiDoc}from'./doc.js';function a13_0x4860(_0x40a2d1,_0x5d84a7){_0x40a2d1=_0x40a2d1-0x95;const _0xe68e16=a13_0xe68e();let _0x486030=_0xe68e16[_0x40a2d1];return _0x486030;}function a13_0xe68e(){const _0x5a8133=['536661jKKnDQ','85trftlN','5662704Zbzrpa','2622036JNrLtq','9lFCcMg','35415996OReGBO','210FBwCQe','219122XaDUHs','164572FAcbrZ','250392UagEhq','112Dvevqd'];a13_0xe68e=function(){return _0x5a8133;};return a13_0xe68e();}export const apiDefinitions=[apiList,apiPull,apiDoc];
@@ -1 +1 @@
1
- const a14_0x14321a=a14_0x5328;(function(_0x30fbe2,_0x18a7fc){const _0x188b67=a14_0x5328,_0x79d8e1=_0x30fbe2();while(!![]){try{const _0x43aad0=-parseInt(_0x188b67(0x7b))/0x1+parseInt(_0x188b67(0x75))/0x2*(parseInt(_0x188b67(0x78))/0x3)+parseInt(_0x188b67(0x80))/0x4+-parseInt(_0x188b67(0x73))/0x5*(parseInt(_0x188b67(0x7a))/0x6)+-parseInt(_0x188b67(0x72))/0x7*(parseInt(_0x188b67(0x74))/0x8)+parseInt(_0x188b67(0x70))/0x9*(parseInt(_0x188b67(0x76))/0xa)+parseInt(_0x188b67(0x84))/0xb;if(_0x43aad0===_0x18a7fc)break;else _0x79d8e1['push'](_0x79d8e1['shift']());}catch(_0x4cbc41){_0x79d8e1['push'](_0x79d8e1['shift']());}}}(a14_0x5b46,0x6da45));function a14_0x5b46(){const _0x35d9b5=['env','List\x20all\x20datasets/models\x20for\x20the\x20configured\x20app(s)','api','17538675igvTBA','read','push','77463RgALPc','appCode','605290PUJpbL','35SjwSPX','16pItpoo','381322ELIAVw','90rPHtUw','appcode','3avhpuC','name','765678YJgGer','554274FApuMy','cookie','str','isDefault','map','828196jBrftj'];a14_0x5b46=function(){return _0x35d9b5;};return a14_0x5b46();}import{initEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';import{APPCODE_FLAG_OPTIONAL}from'../common/flags.js';import{resolveTargetApps}from'./shared.js';function a14_0x5328(_0x476e7a,_0x1d8aed){_0x476e7a=_0x476e7a-0x6e;const _0x5b4618=a14_0x5b46();let _0x532837=_0x5b4618[_0x476e7a];return _0x532837;}export const apiList={'service':a14_0x14321a(0x83),'command':'list','description':a14_0x14321a(0x82),'risk':a14_0x14321a(0x6e),'requiresAppCode':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]}],async 'execute'(_0x276c76){const _0x47b4e7=a14_0x14321a,_0x47b2f3=_0x276c76[_0x47b4e7(0x7d)](_0x47b4e7(0x77)),_0x3e4436=resolveTargetApps(_0x276c76,_0x47b2f3);if(_0x3e4436){const _0x2361a8=[];for(const _0x49f3af of _0x3e4436){const _0x218b04=_0x49f3af['cookie']||_0x276c76[_0x47b4e7(0x7c)],_0x16af3e=_0x49f3af[_0x47b4e7(0x81)]||'production';initEnv(_0x16af3e);const {configArray:_0x415b53}=await fetchModelList(_0x49f3af[_0x47b4e7(0x77)],_0x218b04);_0x2361a8[_0x47b4e7(0x6f)](..._0x415b53[_0x47b4e7(0x7f)](_0x109f6b=>({..._0x109f6b,'_appName':_0x49f3af[_0x47b4e7(0x79)],'_appCode':_0x49f3af[_0x47b4e7(0x77)],'_env':_0x16af3e,'_isDefault':_0x49f3af[_0x47b4e7(0x7e)]})));}return{'ok':!![],'data':_0x2361a8};}const {configArray:_0xe4ffef}=await fetchModelList(_0x276c76[_0x47b4e7(0x71)],_0x276c76['cookie']);return{'ok':!![],'data':_0xe4ffef};}};
1
+ function a14_0x26d5(_0xe6aa49,_0x37102e){_0xe6aa49=_0xe6aa49-0x1a0;const _0x1aec6d=a14_0x1aec();let _0x26d5a7=_0x1aec6d[_0xe6aa49];return _0x26d5a7;}const a14_0x302913=a14_0x26d5;(function(_0x10f6d3,_0x284530){const _0x1f8422=a14_0x26d5,_0x50e0ab=_0x10f6d3();while(!![]){try{const _0x3dc475=-parseInt(_0x1f8422(0x1a4))/0x1*(parseInt(_0x1f8422(0x1af))/0x2)+parseInt(_0x1f8422(0x1a9))/0x3*(-parseInt(_0x1f8422(0x1b3))/0x4)+parseInt(_0x1f8422(0x1a5))/0x5*(parseInt(_0x1f8422(0x1ad))/0x6)+-parseInt(_0x1f8422(0x1b1))/0x7+-parseInt(_0x1f8422(0x1ac))/0x8+-parseInt(_0x1f8422(0x1a6))/0x9+parseInt(_0x1f8422(0x1a0))/0xa;if(_0x3dc475===_0x284530)break;else _0x50e0ab['push'](_0x50e0ab['shift']());}catch(_0x4dd4c3){_0x50e0ab['push'](_0x50e0ab['shift']());}}}(a14_0x1aec,0xc8555));function a14_0x1aec(){const _0xe29e1a=['List\x20all\x20datasets/models\x20for\x20the\x20configured\x20app(s)','push','appCode','1741QgYNHe','122675gANeLi','11056572XTpSrf','list','appcode','3375726aYEXbq','isDefault','name','2466456OjHcDp','114hnusnD','cookie','1086GKKjIi','str','6730535FrlpIt','env','4sRIvLW','api','49233250eoQRtX'];a14_0x1aec=function(){return _0xe29e1a;};return a14_0x1aec();}import{initEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';import{APPCODE_FLAG_OPTIONAL}from'../common/flags.js';import{resolveTargetApps}from'./shared.js';export const apiList={'service':a14_0x302913(0x1b4),'command':a14_0x302913(0x1a7),'description':a14_0x302913(0x1a1),'risk':'read','requiresAppCode':!![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]}],async 'execute'(_0x515d52){const _0x579b7c=a14_0x302913,_0x580fc1=_0x515d52[_0x579b7c(0x1b0)](_0x579b7c(0x1a8)),_0x34b84e=resolveTargetApps(_0x515d52,_0x580fc1);if(_0x34b84e){const _0x23fd6b=[];for(const _0x43479b of _0x34b84e){const _0x1e8e93=_0x43479b[_0x579b7c(0x1ae)]||_0x515d52[_0x579b7c(0x1ae)],_0x5d82de=_0x43479b[_0x579b7c(0x1b2)]||'production';initEnv(_0x5d82de);const {configArray:_0x519314}=await fetchModelList(_0x43479b[_0x579b7c(0x1a8)],_0x1e8e93);_0x23fd6b[_0x579b7c(0x1a2)](..._0x519314['map'](_0x35e09b=>({..._0x35e09b,'_appName':_0x43479b[_0x579b7c(0x1ab)],'_appCode':_0x43479b['appcode'],'_env':_0x5d82de,'_isDefault':_0x43479b[_0x579b7c(0x1aa)]})));}return{'ok':!![],'data':_0x23fd6b};}const {configArray:_0x5cd3ff}=await fetchModelList(_0x515d52[_0x579b7c(0x1a3)],_0x515d52[_0x579b7c(0x1ae)]);return{'ok':!![],'data':_0x5cd3ff};}};
@@ -1 +1 @@
1
- const a15_0x2c3df7=a15_0x3ab4;(function(_0x152fa2,_0x114bc8){const _0x42c006=a15_0x3ab4,_0x454a13=_0x152fa2();while(!![]){try{const _0x2cac53=-parseInt(_0x42c006(0x9a))/0x1+-parseInt(_0x42c006(0xaa))/0x2+-parseInt(_0x42c006(0x98))/0x3+-parseInt(_0x42c006(0xbf))/0x4*(-parseInt(_0x42c006(0xb7))/0x5)+-parseInt(_0x42c006(0x93))/0x6+parseInt(_0x42c006(0xa4))/0x7+parseInt(_0x42c006(0xb9))/0x8;if(_0x2cac53===_0x114bc8)break;else _0x454a13['push'](_0x454a13['shift']());}catch(_0x74749b){_0x454a13['push'](_0x454a13['shift']());}}}(a15_0x3cc9,0x4d8a8));import a15_0x4acfe3 from'ora';function a15_0x3ab4(_0x4e1e71,_0x17fa44){_0x4e1e71=_0x4e1e71-0x91;const _0x3cc9c1=a15_0x3cc9();let _0x3ab474=_0x3cc9c1[_0x4e1e71];return _0x3ab474;}function a15_0x3cc9(){const _0x31a517=[')...','modelCount','slice','220500izxlgS','apiDir','name','split','.ts','768147YCnOEA','apiFilePath','505275RzdLMD','str','clientFilePath','./src/api/','-api','fail','Output\x20directory\x20(default:\x20./src/api/)','Pulling\x20API\x20config\x20for\x20','isDefault','Pulled\x20','2619540PlEtoE','output','start','error','Done:\x20','\x20dataset(s),\x20generated\x20','281710aSLuZs','log','api','succeed','Failed:\x20','includes','appcode','\x20failed','appCode','Pull\x20datasets\x20and\x20generate\x20API\x20config\x20files\x20(./src/api/)','\x20dataset(s)\x20→\x20','\x20model(s)','env','63670pRkWfh','pull','6549176WMXACq','\x20\x20•\x20','join','write','length','\x20succeeded,\x20','20zSbvBw','...','Pulling\x20','production','cookie'];a15_0x3cc9=function(){return _0x31a517;};return a15_0x3cc9();}import a15_0x582fdd from'node:path';import{initEnv,getEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';import{generateApiFile}from'../../api/generate-api-file.js';import{APPCODE_FLAG_OPTIONAL}from'../common/flags.js';import{resolveTargetApps}from'./shared.js';export const apiPull={'service':a15_0x2c3df7(0xac),'command':a15_0x2c3df7(0xb8),'description':a15_0x2c3df7(0xb3),'risk':a15_0x2c3df7(0xbc),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a15_0x2c3df7(0xa5),'type':'string','description':a15_0x2c3df7(0xa0)}],async 'execute'(_0x4bef81){const _0x172fe6=a15_0x2c3df7,_0x5a4ecf=_0x4bef81[_0x172fe6(0x9b)]('appcode'),_0x4905f9=_0x4bef81[_0x172fe6(0x9b)]('output')||undefined,_0x52a5be=resolveTargetApps(_0x4bef81,_0x5a4ecf);if(_0x52a5be){let _0x389fbe=0x0,_0x47a4b1=0x0;for(const _0x3286c0 of _0x52a5be){const _0x5c698d=_0x3286c0[_0x172fe6(0xc3)]||_0x4bef81[_0x172fe6(0xc3)],_0x573693=_0x3286c0[_0x172fe6(0xb6)]||_0x172fe6(0xc2);initEnv(_0x573693);const _0x406c47=_0x3286c0['apiDir']||_0x4905f9||_0x172fe6(0x9d),_0x5d7881=_0x3286c0[_0x172fe6(0xa2)]?'':_0x3286c0[_0x172fe6(0x95)]||_0x3286c0[_0x172fe6(0xb0)],_0x4b669b=a15_0x4acfe3(_0x172fe6(0xc1)+_0x3286c0[_0x172fe6(0x95)]+'\x20('+_0x3286c0[_0x172fe6(0xb0)]+_0x172fe6(0xc4))[_0x172fe6(0xa6)]();try{const {configArray:_0x2506c5}=await fetchModelList(_0x3286c0[_0x172fe6(0xb0)],_0x5c698d),_0x147eb3=await generateApiFile(_0x2506c5,_0x5d7881,_0x3286c0[_0x172fe6(0xb0)],_0x3286c0['isDefault'],_0x573693,_0x406c47,_0x3286c0[_0x172fe6(0x95)]);_0x4b669b[_0x172fe6(0xad)](_0x3286c0[_0x172fe6(0x95)]+':\x20'+_0x2506c5[_0x172fe6(0xbd)]+_0x172fe6(0xb4)+_0x147eb3[_0x172fe6(0x91)]+_0x172fe6(0xb5)),console[_0x172fe6(0xab)](_0x172fe6(0xba)+_0x147eb3[_0x172fe6(0x99)]),console[_0x172fe6(0xab)](_0x172fe6(0xba)+_0x147eb3[_0x172fe6(0x9c)]),_0x389fbe++;}catch(_0x53b9de){_0x4b669b['fail'](_0x3286c0[_0x172fe6(0x95)]+':\x20'+(_0x53b9de instanceof Error?_0x53b9de['message']:String(_0x53b9de))),_0x47a4b1++;}}console[_0x172fe6(0xab)]();if(_0x47a4b1>0x0)console[_0x172fe6(0xa7)]('!\x20'+_0x47a4b1+'\x20app(s)\x20failed');return{'ok':_0x47a4b1===0x0,'message':_0x172fe6(0xa8)+_0x389fbe+_0x172fe6(0xbe)+_0x47a4b1+_0x172fe6(0xb1)};}const _0x4c7382=_0x5a4ecf&&_0x5a4ecf[_0x172fe6(0xaf)]('-')?_0x5a4ecf[_0x172fe6(0x96)]('-')[_0x172fe6(0x92)](0x1)[_0x172fe6(0xbb)]('-'):'',_0x92f10=_0x4905f9||_0x4bef81[_0x172fe6(0x94)]||_0x172fe6(0x9d),_0x2998f2=!_0x5a4ecf,_0x449daf=a15_0x4acfe3(_0x172fe6(0xa1)+_0x4bef81[_0x172fe6(0xb2)]+_0x172fe6(0xc0))[_0x172fe6(0xa6)]();try{const {configArray:_0x5d80cf}=await fetchModelList(_0x4bef81[_0x172fe6(0xb2)],_0x4bef81[_0x172fe6(0xc3)]),_0xb79625=await generateApiFile(_0x5d80cf,_0x4c7382,_0x4bef81[_0x172fe6(0xb2)],_0x2998f2,getEnv(),_0x92f10);_0x449daf[_0x172fe6(0xad)](_0x172fe6(0xa3)+_0x5d80cf[_0x172fe6(0xbd)]+_0x172fe6(0xa9)+_0xb79625['modelCount']+_0x172fe6(0xb5));const _0x5352e9=_0x4c7382?_0x4c7382+_0x172fe6(0x9e):_0x172fe6(0xac),_0x434860=_0x4c7382?_0x4c7382+'-client':'client';return console['log'](_0x172fe6(0xba)+a15_0x582fdd[_0x172fe6(0xbb)](_0x92f10,_0x5352e9+_0x172fe6(0x97))),console['log'](_0x172fe6(0xba)+a15_0x582fdd[_0x172fe6(0xbb)](_0x92f10,_0x434860+_0x172fe6(0x97))),{'ok':!![],'data':{'datasetCount':_0x5d80cf[_0x172fe6(0xbd)],'modelCount':_0xb79625[_0x172fe6(0x91)]}};}catch(_0x476a6d){_0x449daf[_0x172fe6(0x9f)](_0x172fe6(0xae)+(_0x476a6d instanceof Error?_0x476a6d['message']:String(_0x476a6d)));throw _0x476a6d;}}};
1
+ const a15_0x2b3dfe=a15_0x3d83;function a15_0x3d83(_0x5b42dd,_0x579a79){_0x5b42dd=_0x5b42dd-0x190;const _0x12dfa8=a15_0x12df();let _0x3d8301=_0x12dfa8[_0x5b42dd];return _0x3d8301;}(function(_0x58bf74,_0x3bcdca){const _0x5c18ea=a15_0x3d83,_0x269412=_0x58bf74();while(!![]){try{const _0x5a72f1=-parseInt(_0x5c18ea(0x1a0))/0x1*(-parseInt(_0x5c18ea(0x192))/0x2)+-parseInt(_0x5c18ea(0x1b7))/0x3*(parseInt(_0x5c18ea(0x1aa))/0x4)+-parseInt(_0x5c18ea(0x194))/0x5*(-parseInt(_0x5c18ea(0x1af))/0x6)+-parseInt(_0x5c18ea(0x1bb))/0x7+-parseInt(_0x5c18ea(0x1c2))/0x8*(-parseInt(_0x5c18ea(0x19b))/0x9)+parseInt(_0x5c18ea(0x1c1))/0xa+-parseInt(_0x5c18ea(0x1a7))/0xb*(-parseInt(_0x5c18ea(0x1a8))/0xc);if(_0x5a72f1===_0x3bcdca)break;else _0x269412['push'](_0x269412['shift']());}catch(_0x536b8b){_0x269412['push'](_0x269412['shift']());}}}(a15_0x12df,0xf1f1e));import a15_0x26a5f2 from'ora';function a15_0x12df(){const _0x12a986=['\x20model(s)','Output\x20directory\x20(default:\x20./src/api/)','appCode','\x20failed','./src/api/','Done:\x20','1332219yvNijf','length','Failed:\x20','string','12502833YcJJcy','Pulling\x20API\x20config\x20for\x20','name','join','message','fail','8243290pmDvrN','72784hXYBxW','.ts','cookie','96FsWwuc','split','895eiDYoF','appcode','\x20app(s)\x20failed','Pulled\x20','Pull\x20datasets\x20and\x20generate\x20API\x20config\x20files\x20(./src/api/)','write','apiDir','1593ufufKX','start','apiFilePath',')...','error','28326jMOdDT','...','-api','output','succeed','\x20succeeded,\x20','log','11TIaCRI','3148428pJZDje','client','16rIKiLJ','\x20\x20•\x20','env','api','str','16650oNVMPQ','isDefault'];a15_0x12df=function(){return _0x12a986;};return a15_0x12df();}import a15_0x3db6d9 from'node:path';import{initEnv,getEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';import{generateApiFile}from'../../api/generate-api-file.js';import{APPCODE_FLAG_OPTIONAL}from'../common/flags.js';import{resolveTargetApps}from'./shared.js';export const apiPull={'service':a15_0x2b3dfe(0x1ad),'command':'pull','description':a15_0x2b3dfe(0x198),'risk':a15_0x2b3dfe(0x199),'requiresAppCode':!![],'hasFormat':![],'flags':[{...APPCODE_FLAG_OPTIONAL,'hidden':!![]},{'name':a15_0x2b3dfe(0x1a3),'type':a15_0x2b3dfe(0x1ba),'description':a15_0x2b3dfe(0x1b2)}],async 'execute'(_0x4d9219){const _0x30709e=a15_0x2b3dfe,_0x2621a2=_0x4d9219[_0x30709e(0x1ae)](_0x30709e(0x195)),_0x51f28b=_0x4d9219['str'](_0x30709e(0x1a3))||undefined,_0x323939=resolveTargetApps(_0x4d9219,_0x2621a2);if(_0x323939){let _0x40a98d=0x0,_0x31a5dc=0x0;for(const _0x5a9906 of _0x323939){const _0x633e09=_0x5a9906['cookie']||_0x4d9219[_0x30709e(0x191)],_0x5ad50c=_0x5a9906[_0x30709e(0x1ac)]||'production';initEnv(_0x5ad50c);const _0x2a4489=_0x5a9906['apiDir']||_0x51f28b||_0x30709e(0x1b5),_0x577cc1=_0x5a9906[_0x30709e(0x1b0)]?'':_0x5a9906[_0x30709e(0x1bd)]||_0x5a9906[_0x30709e(0x195)],_0x39fe29=a15_0x26a5f2('Pulling\x20'+_0x5a9906[_0x30709e(0x1bd)]+'\x20('+_0x5a9906[_0x30709e(0x195)]+_0x30709e(0x19e))[_0x30709e(0x19c)]();try{const {configArray:_0x13815c}=await fetchModelList(_0x5a9906['appcode'],_0x633e09),_0x1df9e0=await generateApiFile(_0x13815c,_0x577cc1,_0x5a9906[_0x30709e(0x195)],_0x5a9906['isDefault'],_0x5ad50c,_0x2a4489,_0x5a9906[_0x30709e(0x1bd)]);_0x39fe29['succeed'](_0x5a9906[_0x30709e(0x1bd)]+':\x20'+_0x13815c[_0x30709e(0x1b8)]+'\x20dataset(s)\x20→\x20'+_0x1df9e0['modelCount']+_0x30709e(0x1b1)),console['log'](_0x30709e(0x1ab)+_0x1df9e0[_0x30709e(0x19d)]),console[_0x30709e(0x1a6)]('\x20\x20•\x20'+_0x1df9e0['clientFilePath']),_0x40a98d++;}catch(_0x4892a8){_0x39fe29[_0x30709e(0x1c0)](_0x5a9906[_0x30709e(0x1bd)]+':\x20'+(_0x4892a8 instanceof Error?_0x4892a8[_0x30709e(0x1bf)]:String(_0x4892a8))),_0x31a5dc++;}}console[_0x30709e(0x1a6)]();if(_0x31a5dc>0x0)console[_0x30709e(0x19f)]('!\x20'+_0x31a5dc+_0x30709e(0x196));return{'ok':_0x31a5dc===0x0,'message':_0x30709e(0x1b6)+_0x40a98d+_0x30709e(0x1a5)+_0x31a5dc+_0x30709e(0x1b4)};}const _0x2862da=_0x2621a2&&_0x2621a2['includes']('-')?_0x2621a2[_0x30709e(0x193)]('-')['slice'](0x1)[_0x30709e(0x1be)]('-'):'',_0x35a90e=_0x51f28b||_0x4d9219[_0x30709e(0x19a)]||_0x30709e(0x1b5),_0x1ae50c=!_0x2621a2,_0x34cf05=a15_0x26a5f2(_0x30709e(0x1bc)+_0x4d9219[_0x30709e(0x1b3)]+_0x30709e(0x1a1))[_0x30709e(0x19c)]();try{const {configArray:_0x149c3f}=await fetchModelList(_0x4d9219[_0x30709e(0x1b3)],_0x4d9219['cookie']),_0x280bab=await generateApiFile(_0x149c3f,_0x2862da,_0x4d9219[_0x30709e(0x1b3)],_0x1ae50c,getEnv(),_0x35a90e);_0x34cf05[_0x30709e(0x1a4)](_0x30709e(0x197)+_0x149c3f[_0x30709e(0x1b8)]+'\x20dataset(s),\x20generated\x20'+_0x280bab['modelCount']+_0x30709e(0x1b1));const _0x41591b=_0x2862da?_0x2862da+_0x30709e(0x1a2):_0x30709e(0x1ad),_0x4828ec=_0x2862da?_0x2862da+'-client':_0x30709e(0x1a9);return console['log'](_0x30709e(0x1ab)+a15_0x3db6d9[_0x30709e(0x1be)](_0x35a90e,_0x41591b+_0x30709e(0x190))),console[_0x30709e(0x1a6)](_0x30709e(0x1ab)+a15_0x3db6d9[_0x30709e(0x1be)](_0x35a90e,_0x4828ec+_0x30709e(0x190))),{'ok':!![],'data':{'datasetCount':_0x149c3f['length'],'modelCount':_0x280bab['modelCount']}};}catch(_0x32a411){_0x34cf05[_0x30709e(0x1c0)](_0x30709e(0x1b9)+(_0x32a411 instanceof Error?_0x32a411[_0x30709e(0x1bf)]:String(_0x32a411)));throw _0x32a411;}}};
@@ -1 +1 @@
1
- function a16_0x1d6c(_0x2f6bc1,_0x39e5eb){_0x2f6bc1=_0x2f6bc1-0xc6;const _0x2bd90c=a16_0x2bd9();let _0x1d6cbf=_0x2bd90c[_0x2f6bc1];return _0x1d6cbf;}(function(_0x19db84,_0x3ecf38){const _0xe423ab=a16_0x1d6c,_0x140912=_0x19db84();while(!![]){try{const _0x44c0bb=parseInt(_0xe423ab(0xcf))/0x1+-parseInt(_0xe423ab(0xce))/0x2*(-parseInt(_0xe423ab(0xd4))/0x3)+-parseInt(_0xe423ab(0xc9))/0x4*(-parseInt(_0xe423ab(0xd3))/0x5)+-parseInt(_0xe423ab(0xcd))/0x6+parseInt(_0xe423ab(0xc8))/0x7+parseInt(_0xe423ab(0xd1))/0x8+-parseInt(_0xe423ab(0xd5))/0x9;if(_0x44c0bb===_0x3ecf38)break;else _0x140912['push'](_0x140912['shift']());}catch(_0x57e888){_0x140912['push'](_0x140912['shift']());}}}(a16_0x2bd9,0xa3fb8));import{getMultiAppConfigs}from'../../utils/config.js';function a16_0x2bd9(){const _0x34a5ad=['length','166810HaJrBa','573nwrmpc','10485891LUqnbd','App\x20\x22','\x22\x20not\x20found\x20in\x20config.\x20Available:\x20','5992553jxXRSU','4AdceYP','map','selectedAppName','filter','6124956zTXHzt','316bRJbuR','1201391xgbGvz','join','5892696xGgSxz'];a16_0x2bd9=function(){return _0x34a5ad;};return a16_0x2bd9();}import{CliErrors}from'../../errors.js';export function resolveTargetApps(_0x4f63ef,_0x3023ea){const _0x2b4de6=a16_0x1d6c;if(_0x3023ea)return null;let _0x1c6449=getMultiAppConfigs();if(!_0x1c6449||_0x1c6449['length']===0x0)return null;if(_0x4f63ef[_0x2b4de6(0xcb)]){const _0x39b2a8=_0x1c6449[_0x2b4de6(0xcc)](_0x38a365=>_0x38a365['name']===_0x4f63ef[_0x2b4de6(0xcb)]);if(_0x39b2a8[_0x2b4de6(0xd2)]===0x0){const _0x45f38d=_0x1c6449[_0x2b4de6(0xca)](_0x3f3f27=>_0x3f3f27['name'])[_0x2b4de6(0xd0)](',\x20');throw CliErrors['validation'](_0x2b4de6(0xc6)+_0x4f63ef[_0x2b4de6(0xcb)]+_0x2b4de6(0xc7)+_0x45f38d);}_0x1c6449=_0x39b2a8;}return _0x1c6449;}
1
+ function a16_0x163e(){const _0x48c4e6=['64wlLgWA','name','825903cwGMIk','selectedAppName','length','507GkBfBr','9660IHWBNh','6820947JvnLWx','3507738RVDRTU','561616SkhKQX','filter','635052LguFUK','App\x20\x22','8854ZxjTNI','map'];a16_0x163e=function(){return _0x48c4e6;};return a16_0x163e();}(function(_0xd50159,_0x59d6bd){const _0x5c1003=a16_0x561f,_0x3252e3=_0xd50159();while(!![]){try{const _0x3b5b68=parseInt(_0x5c1003(0x83))/0x1+-parseInt(_0x5c1003(0x85))/0x2*(-parseInt(_0x5c1003(0x8c))/0x3)+parseInt(_0x5c1003(0x81))/0x4+parseInt(_0x5c1003(0x8d))/0x5+-parseInt(_0x5c1003(0x8f))/0x6+-parseInt(_0x5c1003(0x8e))/0x7+parseInt(_0x5c1003(0x87))/0x8*(parseInt(_0x5c1003(0x89))/0x9);if(_0x3b5b68===_0x59d6bd)break;else _0x3252e3['push'](_0x3252e3['shift']());}catch(_0x2b3472){_0x3252e3['push'](_0x3252e3['shift']());}}}(a16_0x163e,0xab0e3));import{getMultiAppConfigs}from'../../utils/config.js';function a16_0x561f(_0x2928d9,_0x4931eb){_0x2928d9=_0x2928d9-0x81;const _0x163e20=a16_0x163e();let _0x561fde=_0x163e20[_0x2928d9];return _0x561fde;}import{CliErrors}from'../../errors.js';export function resolveTargetApps(_0x3073f1,_0x4d614b){const _0x1a0d8c=a16_0x561f;if(_0x4d614b)return null;let _0x568f38=getMultiAppConfigs();if(!_0x568f38||_0x568f38[_0x1a0d8c(0x8b)]===0x0)return null;if(_0x3073f1[_0x1a0d8c(0x8a)]){const _0x12a2b5=_0x568f38[_0x1a0d8c(0x82)](_0x5ab2af=>_0x5ab2af['name']===_0x3073f1[_0x1a0d8c(0x8a)]);if(_0x12a2b5[_0x1a0d8c(0x8b)]===0x0){const _0x48161c=_0x568f38[_0x1a0d8c(0x86)](_0x5b471c=>_0x5b471c[_0x1a0d8c(0x88)])['join'](',\x20');throw CliErrors['validation'](_0x1a0d8c(0x84)+_0x3073f1[_0x1a0d8c(0x8a)]+'\x22\x20not\x20found\x20in\x20config.\x20Available:\x20'+_0x48161c);}_0x568f38=_0x12a2b5;}return _0x568f38;}
@@ -1 +1 @@
1
- const a17_0x1313f3=a17_0x262c;(function(_0x18d10a,_0x32c858){const _0x3d1cf1=a17_0x262c,_0x3b363e=_0x18d10a();while(!![]){try{const _0x180754=-parseInt(_0x3d1cf1(0x10b))/0x1+parseInt(_0x3d1cf1(0xec))/0x2*(parseInt(_0x3d1cf1(0x101))/0x3)+parseInt(_0x3d1cf1(0xfc))/0x4*(-parseInt(_0x3d1cf1(0xff))/0x5)+-parseInt(_0x3d1cf1(0x118))/0x6+-parseInt(_0x3d1cf1(0xf5))/0x7*(parseInt(_0x3d1cf1(0x11c))/0x8)+-parseInt(_0x3d1cf1(0x113))/0x9+parseInt(_0x3d1cf1(0xef))/0xa*(parseInt(_0x3d1cf1(0x102))/0xb);if(_0x180754===_0x32c858)break;else _0x3b363e['push'](_0x3b363e['shift']());}catch(_0x898ad9){_0x3b363e['push'](_0x3b363e['shift']());}}}(a17_0x2d79,0xaef76));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a17_0x2d79(){const _0x34db1f=['app','global','\x20Set\x20as\x20default\x20app.','Access\x20key','flag','28EZaimK','validation','\x20app\x20\x22','Target\x20environment','defaultApp','apiDir','pageSize','4321892teBtMb','Default\x20page\x20size','cookie','5Kajqsb','env','1092222sOnlKH','847RgEuLB','\x22\x20(appcode:\x20','App\x20name','Add\x20or\x20update\x20an\x20app\x20in\x20config','name','locale','Usage:\x20','keys','appcode','843051AnIOUE','string','format','add','write','Default\x20output\x20format','boolean','length','12661632CCjFvO','str','apps','number','bool','3320856sodDUq','Use\x20global\x20config\x20scope','\x20app\x20add\x20--name\x20<name>\x20--appcode\x20<code>','Auth\x20cookie','1514064fNOvTz','riskLevel','Added','4lNauEZ','Risk\x20level','accessKey','601220sguOfW'];a17_0x2d79=function(){return _0x34db1f;};return a17_0x2d79();}import{readConfig,writeConfig,scopeLabel,migrateLegacySingleApp}from'./shared.js';function a17_0x262c(_0x37615e,_0x3cdd99){_0x37615e=_0x37615e-0xea;const _0x2d7971=a17_0x2d79();let _0x262c05=_0x2d7971[_0x37615e];return _0x262c05;}const PROFILE_FLAG_KEYS={'env':'env','apiDir':a17_0x1313f3(0xfa),'cookie':a17_0x1313f3(0xfe),'accessKey':a17_0x1313f3(0xee),'format':'format','pageSize':a17_0x1313f3(0xfb),'riskLevel':a17_0x1313f3(0xea),'locale':a17_0x1313f3(0x107)};async function execute(_0x8e6a3f){const _0x5ce20b=a17_0x1313f3,_0x3c2425=_0x8e6a3f[_0x5ce20b(0x114)]('name');if(!_0x3c2425)throw CliErrors[_0x5ce20b(0xf6)]('Missing\x20app\x20name.',_0x5ce20b(0x108)+CLI_BIN_NAME+_0x5ce20b(0x11a));const _0x3f8548=_0x8e6a3f[_0x5ce20b(0x114)](_0x5ce20b(0x10a));if(!_0x3f8548)throw CliErrors['flagMissing'](_0x5ce20b(0x10a),_0x5ce20b(0x108)+CLI_BIN_NAME+_0x5ce20b(0x11a));const _0x10c8b1={'global':_0x8e6a3f[_0x5ce20b(0x117)](_0x5ce20b(0xf1))},_0x60182a=readConfig(_0x10c8b1);if(!_0x60182a[_0x5ce20b(0x115)])_0x60182a[_0x5ce20b(0x115)]={};Object[_0x5ce20b(0x109)](_0x60182a[_0x5ce20b(0x115)])[_0x5ce20b(0x112)]===0x0&&migrateLegacySingleApp(_0x60182a,_0x3c2425);const _0x22dc7e={'appcode':_0x3f8548};for(const [_0x442219,_0x17dc53]of Object['entries'](PROFILE_FLAG_KEYS)){const _0x429547=_0x8e6a3f[_0x5ce20b(0xf4)](_0x442219);_0x429547!=null&&_0x429547!==''&&_0x429547!==![]&&(_0x22dc7e[_0x17dc53]=_0x17dc53===_0x5ce20b(0xfb)?Number(_0x429547):_0x429547);}const _0x3d8738=_0x60182a[_0x5ce20b(0x115)],_0x2d3b3f=!!_0x3d8738[_0x3c2425];_0x3d8738[_0x3c2425]=_0x22dc7e;if(!_0x60182a[_0x5ce20b(0xf9)])_0x60182a[_0x5ce20b(0xf9)]=_0x3c2425;writeConfig(_0x60182a,_0x10c8b1);const _0x5a6464=!_0x2d3b3f&&_0x60182a[_0x5ce20b(0xf9)]===_0x3c2425?_0x5ce20b(0xf2):'';return{'ok':!![],'message':(_0x2d3b3f?'Updated':_0x5ce20b(0xeb))+_0x5ce20b(0xf7)+_0x3c2425+_0x5ce20b(0x103)+_0x3f8548+')'+scopeLabel(_0x10c8b1)+'.'+_0x5a6464};}export const appAddDefinition={'service':a17_0x1313f3(0xf0),'command':a17_0x1313f3(0x10e),'description':a17_0x1313f3(0x105),'risk':a17_0x1313f3(0x10f),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a17_0x1313f3(0x106),'type':a17_0x1313f3(0x10c),'description':a17_0x1313f3(0x104),'required':!![]},{'name':a17_0x1313f3(0x10a),'type':a17_0x1313f3(0x10c),'description':'App\x20code','required':!![]},{'name':a17_0x1313f3(0xf1),'type':a17_0x1313f3(0x111),'description':a17_0x1313f3(0x119),'default':![]},{'name':a17_0x1313f3(0x100),'type':'string','description':a17_0x1313f3(0xf8)},{'name':a17_0x1313f3(0xfa),'type':'string','description':'API\x20directory\x20path'},{'name':a17_0x1313f3(0xfe),'type':'string','description':a17_0x1313f3(0x11b),'hidden':!![]},{'name':a17_0x1313f3(0xee),'type':'string','description':a17_0x1313f3(0xf3),'hidden':!![]},{'name':a17_0x1313f3(0x10d),'type':a17_0x1313f3(0x10c),'description':a17_0x1313f3(0x110)},{'name':'pageSize','type':a17_0x1313f3(0x116),'description':a17_0x1313f3(0xfd)},{'name':'riskLevel','type':'string','description':a17_0x1313f3(0xed)},{'name':a17_0x1313f3(0x107),'type':a17_0x1313f3(0x10c),'description':'Locale'}],'execute':execute};
1
+ const a17_0x48e1b9=a17_0x1fe7;(function(_0x577c04,_0x24a502){const _0x528408=a17_0x1fe7,_0x462e4e=_0x577c04();while(!![]){try{const _0x467cc7=parseInt(_0x528408(0x107))/0x1*(parseInt(_0x528408(0xef))/0x2)+parseInt(_0x528408(0xfb))/0x3*(parseInt(_0x528408(0xf1))/0x4)+parseInt(_0x528408(0xed))/0x5+parseInt(_0x528408(0x116))/0x6+-parseInt(_0x528408(0x115))/0x7+parseInt(_0x528408(0x113))/0x8+parseInt(_0x528408(0x110))/0x9*(-parseInt(_0x528408(0xf2))/0xa);if(_0x467cc7===_0x24a502)break;else _0x462e4e['push'](_0x462e4e['shift']());}catch(_0x2167d4){_0x462e4e['push'](_0x462e4e['shift']());}}}(a17_0x2a7d,0x7b92b));function a17_0x1fe7(_0x4b652c,_0x2a7182){_0x4b652c=_0x4b652c-0xed;const _0x2a7de0=a17_0x2a7d();let _0x1fe7e2=_0x2a7de0[_0x4b652c];return _0x1fe7e2;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{readConfig,writeConfig,scopeLabel,migrateLegacySingleApp}from'./shared.js';const PROFILE_FLAG_KEYS={'env':'env','apiDir':'apiDir','cookie':a17_0x48e1b9(0x100),'accessKey':a17_0x48e1b9(0x111),'format':a17_0x48e1b9(0x10a),'pageSize':a17_0x48e1b9(0x10d),'riskLevel':'riskLevel','locale':a17_0x48e1b9(0x108)};async function execute(_0x4676ff){const _0x37e20e=a17_0x48e1b9,_0x5631d4=_0x4676ff[_0x37e20e(0xfe)](_0x37e20e(0xee));if(!_0x5631d4)throw CliErrors[_0x37e20e(0x101)](_0x37e20e(0x10b),_0x37e20e(0xfa)+CLI_BIN_NAME+_0x37e20e(0xf0));const _0x51f716=_0x4676ff[_0x37e20e(0xfe)]('appcode');if(!_0x51f716)throw CliErrors['flagMissing']('appcode','Usage:\x20'+CLI_BIN_NAME+_0x37e20e(0xf0));const _0x46f32c={'global':_0x4676ff['bool'](_0x37e20e(0x104))},_0x223a21=readConfig(_0x46f32c);if(!_0x223a21[_0x37e20e(0xf4)])_0x223a21['apps']={};Object[_0x37e20e(0x109)](_0x223a21[_0x37e20e(0xf4)])[_0x37e20e(0xfc)]===0x0&&migrateLegacySingleApp(_0x223a21,_0x5631d4);const _0x336700={'appcode':_0x51f716};for(const [_0xc96d98,_0x404d7e]of Object['entries'](PROFILE_FLAG_KEYS)){const _0x51f2a6=_0x4676ff[_0x37e20e(0xf5)](_0xc96d98);_0x51f2a6!=null&&_0x51f2a6!==''&&_0x51f2a6!==![]&&(_0x336700[_0x404d7e]=_0x404d7e===_0x37e20e(0x10d)?Number(_0x51f2a6):_0x51f2a6);}const _0x490880=_0x223a21[_0x37e20e(0xf4)],_0x46187e=!!_0x490880[_0x5631d4];_0x490880[_0x5631d4]=_0x336700;if(!_0x223a21[_0x37e20e(0x10e)])_0x223a21[_0x37e20e(0x10e)]=_0x5631d4;writeConfig(_0x223a21,_0x46f32c);const _0x5aa739=!_0x46187e&&_0x223a21[_0x37e20e(0x10e)]===_0x5631d4?'\x20Set\x20as\x20default\x20app.':'';return{'ok':!![],'message':(_0x46187e?_0x37e20e(0xf9):_0x37e20e(0x118))+_0x37e20e(0xff)+_0x5631d4+_0x37e20e(0xf7)+_0x51f716+')'+scopeLabel(_0x46f32c)+'.'+_0x5aa739};}function a17_0x2a7d(){const _0x41f909=['keys','format','Missing\x20app\x20name.','boolean','pageSize','defaultApp','number','1287eiZrTl','accessKey','App\x20code','7893336DvUPuR','App\x20name','3086706moWTNc','681180ltQyOb','write','Added','1922325bHhqLQ','name','1191084mMiMQU','\x20app\x20add\x20--name\x20<name>\x20--appcode\x20<code>','820PYnncf','144020LdyJlc','Auth\x20cookie','apps','flag','Access\x20key','\x22\x20(appcode:\x20','env','Updated','Usage:\x20','13557eZXGXo','length','appcode','str','\x20app\x20\x22','cookie','validation','Locale','Add\x20or\x20update\x20an\x20app\x20in\x20config','global','Default\x20page\x20size','string','1JaOZgZ','locale'];a17_0x2a7d=function(){return _0x41f909;};return a17_0x2a7d();}export const appAddDefinition={'service':'app','command':'add','description':a17_0x48e1b9(0x103),'risk':a17_0x48e1b9(0x117),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a17_0x48e1b9(0xee),'type':'string','description':a17_0x48e1b9(0x114),'required':!![]},{'name':a17_0x48e1b9(0xfd),'type':'string','description':a17_0x48e1b9(0x112),'required':!![]},{'name':a17_0x48e1b9(0x104),'type':a17_0x48e1b9(0x10c),'description':'Use\x20global\x20config\x20scope','default':![]},{'name':a17_0x48e1b9(0xf8),'type':'string','description':'Target\x20environment'},{'name':'apiDir','type':'string','description':'API\x20directory\x20path'},{'name':a17_0x48e1b9(0x100),'type':a17_0x48e1b9(0x106),'description':a17_0x48e1b9(0xf3),'hidden':!![]},{'name':'accessKey','type':a17_0x48e1b9(0x106),'description':a17_0x48e1b9(0xf6),'hidden':!![]},{'name':a17_0x48e1b9(0x10a),'type':a17_0x48e1b9(0x106),'description':'Default\x20output\x20format'},{'name':'pageSize','type':a17_0x48e1b9(0x10f),'description':a17_0x48e1b9(0x105)},{'name':'riskLevel','type':'string','description':'Risk\x20level'},{'name':a17_0x48e1b9(0x108),'type':a17_0x48e1b9(0x106),'description':a17_0x48e1b9(0x102)}],'execute':execute};
@@ -1 +1 @@
1
- (function(_0xc90c64,_0x16f6df){const _0x3f675c=a18_0x168d,_0x578104=_0xc90c64();while(!![]){try{const _0x4ac06b=-parseInt(_0x3f675c(0x9c))/0x1*(parseInt(_0x3f675c(0xa7))/0x2)+-parseInt(_0x3f675c(0x9e))/0x3*(-parseInt(_0x3f675c(0xa0))/0x4)+parseInt(_0x3f675c(0xa3))/0x5+-parseInt(_0x3f675c(0xa1))/0x6*(-parseInt(_0x3f675c(0xa4))/0x7)+parseInt(_0x3f675c(0xa2))/0x8*(parseInt(_0x3f675c(0x9b))/0x9)+parseInt(_0x3f675c(0xa6))/0xa*(parseInt(_0x3f675c(0x9d))/0xb)+parseInt(_0x3f675c(0xa5))/0xc*(-parseInt(_0x3f675c(0x9f))/0xd);if(_0x4ac06b===_0x16f6df)break;else _0x578104['push'](_0x578104['shift']());}catch(_0x32b7ea){_0x578104['push'](_0x578104['shift']());}}}(a18_0x55dc,0x9a2ba));function a18_0x168d(_0x4938d3,_0x1dd9ef){_0x4938d3=_0x4938d3-0x9b;const _0x55dc2f=a18_0x55dc();let _0x168deb=_0x55dc2f[_0x4938d3];return _0x168deb;}import{appListDefinition}from'./list.js';import{appRemoteDefinition}from'./remote.js';import{appUseDefinition}from'./use.js';function a18_0x55dc(){const _0x3defb2=['758122soxWnq','8672337UxftSM','1xfJBkD','4796QwZVbI','26841WzHUbJ','416pIMaih','148QeCllc','3569466MzDrgV','8xwyGmx','6185340DYSZQb','7IyFLrh','960132VnusiS','10190ksfRwG'];a18_0x55dc=function(){return _0x3defb2;};return a18_0x55dc();}import{appAddDefinition}from'./add.js';import{appRemoveDefinition}from'./remove.js';export const appDefinitions=[appListDefinition,appRemoteDefinition,appUseDefinition,appAddDefinition,appRemoveDefinition];
1
+ (function(_0x1a1ac7,_0x332d16){const _0x33096a=a18_0x73db,_0xca0add=_0x1a1ac7();while(!![]){try{const _0xd46f40=parseInt(_0x33096a(0x11a))/0x1+parseInt(_0x33096a(0x11f))/0x2+-parseInt(_0x33096a(0x122))/0x3*(parseInt(_0x33096a(0x11d))/0x4)+-parseInt(_0x33096a(0x11e))/0x5+-parseInt(_0x33096a(0x11c))/0x6*(-parseInt(_0x33096a(0x11b))/0x7)+-parseInt(_0x33096a(0x120))/0x8+-parseInt(_0x33096a(0x123))/0x9*(-parseInt(_0x33096a(0x121))/0xa);if(_0xd46f40===_0x332d16)break;else _0xca0add['push'](_0xca0add['shift']());}catch(_0x106cfc){_0xca0add['push'](_0xca0add['shift']());}}}(a18_0x1b48,0x63d5a));import{appListDefinition}from'./list.js';import{appRemoteDefinition}from'./remote.js';import{appUseDefinition}from'./use.js';function a18_0x1b48(){const _0x1911ad=['42730iOXUbh','2721NIWPDP','801qsjOqT','817736NpZmRf','7WnNUrE','3269622XWVpdY','1864RZlMbK','3602475wuPhcy','1110842LjDvhk','5970496sTacVS'];a18_0x1b48=function(){return _0x1911ad;};return a18_0x1b48();}import{appAddDefinition}from'./add.js';import{appRemoveDefinition}from'./remove.js';function a18_0x73db(_0x247b23,_0x4c7aa4){_0x247b23=_0x247b23-0x11a;const _0x1b4835=a18_0x1b48();let _0x73db03=_0x1b4835[_0x247b23];return _0x73db03;}export const appDefinitions=[appListDefinition,appRemoteDefinition,appUseDefinition,appAddDefinition,appRemoveDefinition];
@@ -1 +1 @@
1
- const a19_0xf3fbaf=a19_0x35d9;(function(_0x58af6e,_0x56aac7){const _0x8af6e=a19_0x35d9,_0x2286ce=_0x58af6e();while(!![]){try{const _0x488b2e=-parseInt(_0x8af6e(0xc3))/0x1*(-parseInt(_0x8af6e(0xd3))/0x2)+-parseInt(_0x8af6e(0xd4))/0x3*(-parseInt(_0x8af6e(0xd0))/0x4)+-parseInt(_0x8af6e(0xcb))/0x5*(-parseInt(_0x8af6e(0xd5))/0x6)+parseInt(_0x8af6e(0xd2))/0x7*(-parseInt(_0x8af6e(0xcf))/0x8)+parseInt(_0x8af6e(0xce))/0x9+parseInt(_0x8af6e(0xc8))/0xa+-parseInt(_0x8af6e(0xc2))/0xb;if(_0x488b2e===_0x56aac7)break;else _0x2286ce['push'](_0x2286ce['shift']());}catch(_0x4b2bb4){_0x2286ce['push'](_0x2286ce['shift']());}}}(a19_0xf0d4,0x64108));function a19_0xf0d4(){const _0x33a6bc=['cookie','apiDir','\x20app\x20add\x20--name\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','entries','19553897KzFPKa','63421UPgHsL','riskLevel','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20enable\x20multi-app\x20mode.','locale','length','7914870fCccaz','List\x20all\x20configured\x20apps','appcode','150ogqkaH','Single-app\x20mode.\x20Use\x20`','list','4918086uuUyuv','40WtKCrl','32ENmHMr','env','281771lPYEyv','2Ziifvg','260169VSptaP','58722dOHGAq'];a19_0xf0d4=function(){return _0x33a6bc;};return a19_0xf0d4();}import{readConfig}from'./shared.js';function a19_0x35d9(_0x1d25cc,_0x451665){_0x1d25cc=_0x1d25cc-0xc1;const _0xf0d47a=a19_0xf0d4();let _0x35d983=_0xf0d47a[_0x1d25cc];return _0x35d983;}import{CLI_BIN_NAME}from'../../constant/cli.js';async function execute(_0xce4c7d){const _0x4bac7a=a19_0x35d9,_0x572d8f=readConfig(),{apps:apps={},defaultApp:_0x28dc5a,currentApp:_0x27bfae}=_0x572d8f,_0x5d0aef=Object[_0x4bac7a(0xc1)](apps);if(_0x5d0aef[_0x4bac7a(0xc7)]===0x0){const _0x404b27=_0x572d8f['appcode'];if(_0x404b27)return{'ok':!![],'data':{'mode':'single-app','appcode':_0x404b27,'env':_0x572d8f[_0x4bac7a(0xd1)]},'message':_0x4bac7a(0xcc)+CLI_BIN_NAME+_0x4bac7a(0xc5)};return{'ok':!![],'data':[],'message':'No\x20apps\x20configured.\x20Use\x20`'+CLI_BIN_NAME+_0x4bac7a(0xd8)};}const _0x521a02=_0x5d0aef['map'](([_0x567e72,_0x2371ac])=>({'name':_0x567e72,'appcode':_0x2371ac[_0x4bac7a(0xca)],'isDefault':_0x567e72===_0x28dc5a,'isCurrent':_0x567e72===(_0x27bfae??_0x28dc5a),'env':_0x2371ac[_0x4bac7a(0xd1)]??null,'apiDir':_0x2371ac[_0x4bac7a(0xd7)]??null,'hasCookie':!!_0x2371ac[_0x4bac7a(0xd6)],'hasAccessKey':!!_0x2371ac['accessKey'],'format':_0x2371ac['format']??null,'pageSize':_0x2371ac['pageSize']??null,'riskLevel':_0x2371ac[_0x4bac7a(0xc4)]??null,'locale':_0x2371ac[_0x4bac7a(0xc6)]??null}));return{'ok':!![],'data':_0x521a02};}export const appListDefinition={'service':'app','command':a19_0xf3fbaf(0xcd),'description':a19_0xf3fbaf(0xc9),'risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[],'execute':execute};
1
+ const a19_0x21f469=a19_0x1dec;function a19_0x1dec(_0x52da96,_0x26ec09){_0x52da96=_0x52da96-0x1ca;const _0x310efa=a19_0x310e();let _0x1decc9=_0x310efa[_0x52da96];return _0x1decc9;}(function(_0x5841e7,_0x228ce7){const _0x22ad70=a19_0x1dec,_0x1e8ea9=_0x5841e7();while(!![]){try{const _0x47884b=parseInt(_0x22ad70(0x1d2))/0x1*(-parseInt(_0x22ad70(0x1e1))/0x2)+parseInt(_0x22ad70(0x1df))/0x3+-parseInt(_0x22ad70(0x1de))/0x4*(-parseInt(_0x22ad70(0x1cc))/0x5)+parseInt(_0x22ad70(0x1e0))/0x6+parseInt(_0x22ad70(0x1d7))/0x7+parseInt(_0x22ad70(0x1cf))/0x8*(parseInt(_0x22ad70(0x1d9))/0x9)+-parseInt(_0x22ad70(0x1da))/0xa;if(_0x47884b===_0x228ce7)break;else _0x1e8ea9['push'](_0x1e8ea9['shift']());}catch(_0x5bc3a1){_0x1e8ea9['push'](_0x1e8ea9['shift']());}}}(a19_0x310e,0xb4c44));function a19_0x310e(){const _0x1ae045=['16jNFfiv','accessKey','length','19435DOhbdB','format','entries','locale','No\x20apps\x20configured.\x20Use\x20`','9495472brNWcN','riskLevel','5912307YFGlsF','29219510MvIvBr','\x20app\x20add\x20--name\x20<name>\x20--appcode\x20<code>`\x20to\x20add\x20one.','appcode','list','1668QIITmy','1906596RpVOTb','3042540LPpTLF','40CLOvHU','\x20app\x20add\x20<name>\x20--appcode\x20<code>`\x20to\x20enable\x20multi-app\x20mode.','app','2855ygVgrP','pageSize','env'];a19_0x310e=function(){return _0x1ae045;};return a19_0x310e();}import{readConfig}from'./shared.js';import{CLI_BIN_NAME}from'../../constant/cli.js';async function execute(_0x9641de){const _0x3b06c3=a19_0x1dec,_0x11688b=readConfig(),{apps:apps={},defaultApp:_0x213387,currentApp:_0x5bfb8f}=_0x11688b,_0x496886=Object[_0x3b06c3(0x1d4)](apps);if(_0x496886[_0x3b06c3(0x1d1)]===0x0){const _0x5c5cd7=_0x11688b[_0x3b06c3(0x1dc)];if(_0x5c5cd7)return{'ok':!![],'data':{'mode':'single-app','appcode':_0x5c5cd7,'env':_0x11688b[_0x3b06c3(0x1ce)]},'message':'Single-app\x20mode.\x20Use\x20`'+CLI_BIN_NAME+_0x3b06c3(0x1ca)};return{'ok':!![],'data':[],'message':_0x3b06c3(0x1d6)+CLI_BIN_NAME+_0x3b06c3(0x1db)};}const _0x5d962a=_0x496886['map'](([_0x56bc91,_0x5ae33a])=>({'name':_0x56bc91,'appcode':_0x5ae33a['appcode'],'isDefault':_0x56bc91===_0x213387,'isCurrent':_0x56bc91===(_0x5bfb8f??_0x213387),'env':_0x5ae33a[_0x3b06c3(0x1ce)]??null,'apiDir':_0x5ae33a['apiDir']??null,'hasCookie':!!_0x5ae33a['cookie'],'hasAccessKey':!!_0x5ae33a[_0x3b06c3(0x1d0)],'format':_0x5ae33a[_0x3b06c3(0x1d3)]??null,'pageSize':_0x5ae33a[_0x3b06c3(0x1cd)]??null,'riskLevel':_0x5ae33a[_0x3b06c3(0x1d8)]??null,'locale':_0x5ae33a[_0x3b06c3(0x1d5)]??null}));return{'ok':!![],'data':_0x5d962a};}export const appListDefinition={'service':a19_0x21f469(0x1cb),'command':a19_0x21f469(0x1dd),'description':'List\x20all\x20configured\x20apps','risk':'read','requiresAuth':![],'requiresAppCode':![],'flags':[],'execute':execute};