@lovrabet/rabetbase-cli 2.1.2-beta.3 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (161) 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/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/discover.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app/use.js +1 -1
  26. package/lib/commands/auth/index.js +1 -1
  27. package/lib/commands/bff/delete.js +1 -1
  28. package/lib/commands/bff/detail.js +1 -1
  29. package/lib/commands/bff/index.js +1 -1
  30. package/lib/commands/bff/list.js +1 -1
  31. package/lib/commands/bff/new.js +1 -1
  32. package/lib/commands/bff/pull.js +1 -1
  33. package/lib/commands/bff/push.js +1 -1
  34. package/lib/commands/bff/status.js +1 -1
  35. package/lib/commands/cli-update.js +1 -1
  36. package/lib/commands/codegen/index.js +1 -1
  37. package/lib/commands/codegen/sdk.js +1 -1
  38. package/lib/commands/codegen/sql.js +1 -1
  39. package/lib/commands/common/app-selector.js +1 -1
  40. package/lib/commands/common/flags.js +1 -1
  41. package/lib/commands/common/validate.js +1 -1
  42. package/lib/commands/config/get.js +1 -1
  43. package/lib/commands/config/index.js +1 -1
  44. package/lib/commands/config/list.js +1 -1
  45. package/lib/commands/config/set.js +1 -1
  46. package/lib/commands/config/shared.js +1 -1
  47. package/lib/commands/dataset/detail.js +1 -1
  48. package/lib/commands/dataset/index.js +1 -1
  49. package/lib/commands/dataset/links.js +1 -1
  50. package/lib/commands/dataset/list.js +1 -1
  51. package/lib/commands/dataset/operations.js +1 -1
  52. package/lib/commands/db/analyze-cancel.js +1 -1
  53. package/lib/commands/db/analyze-start.js +1 -1
  54. package/lib/commands/db/analyze-status.js +1 -1
  55. package/lib/commands/db/create.js +1 -1
  56. package/lib/commands/db/delete.js +1 -1
  57. package/lib/commands/db/detail.js +1 -1
  58. package/lib/commands/db/diff.js +1 -1
  59. package/lib/commands/db/index.js +1 -1
  60. package/lib/commands/db/list.js +1 -1
  61. package/lib/commands/db/shared.js +1 -1
  62. package/lib/commands/db/tables.js +1 -1
  63. package/lib/commands/db/test.js +1 -1
  64. package/lib/commands/db/update.js +1 -1
  65. package/lib/commands/doctor.js +1 -1
  66. package/lib/commands/init/index.js +1 -1
  67. package/lib/commands/logs/index.js +1 -1
  68. package/lib/commands/menu/index.js +1 -1
  69. package/lib/commands/menu/shared/compare-table.js +1 -1
  70. package/lib/commands/menu/shared/index.js +1 -1
  71. package/lib/commands/menu/shared/inquirer.js +1 -1
  72. package/lib/commands/menu/shared/local-pages.js +1 -1
  73. package/lib/commands/menu/shared/logic.js +1 -1
  74. package/lib/commands/menu/shared/service.js +1 -1
  75. package/lib/commands/menu/shared/sync-core.js +1 -1
  76. package/lib/commands/menu/shared/update-core.js +1 -1
  77. package/lib/commands/menu/shared/valid-url.js +1 -1
  78. package/lib/commands/menu/sync.js +1 -1
  79. package/lib/commands/menu/update.js +1 -1
  80. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  81. package/lib/commands/project/create/format-elapsed.js +1 -1
  82. package/lib/commands/project/create/main.js +1 -1
  83. package/lib/commands/project/create/non-interactive.js +1 -1
  84. package/lib/commands/project/create/project-template-path.js +1 -1
  85. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  86. package/lib/commands/project/create/use-format-code.js +1 -1
  87. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  88. package/lib/commands/project/index.js +1 -1
  89. package/lib/commands/project/init.js +1 -1
  90. package/lib/commands/project/upgrade.js +1 -1
  91. package/lib/commands/registry.js +1 -1
  92. package/lib/commands/run/index.js +1 -1
  93. package/lib/commands/schema.js +1 -1
  94. package/lib/commands/skill/index.js +1 -1
  95. package/lib/commands/sql/detail.js +1 -1
  96. package/lib/commands/sql/exec.js +1 -1
  97. package/lib/commands/sql/index.js +1 -1
  98. package/lib/commands/sql/list.js +1 -1
  99. package/lib/commands/sql/pull.js +1 -1
  100. package/lib/commands/sql/save.js +1 -1
  101. package/lib/commands/sql/shared.js +1 -1
  102. package/lib/commands/sql/validate.js +1 -1
  103. package/lib/config/schema.js +1 -1
  104. package/lib/constant/cli.js +1 -1
  105. package/lib/constant/defaults.js +1 -1
  106. package/lib/constant/domain.js +1 -1
  107. package/lib/constant/env.js +1 -1
  108. package/lib/constant/output.js +1 -1
  109. package/lib/constant/paths.js +1 -1
  110. package/lib/constant/risk.js +1 -1
  111. package/lib/context.js +1 -1
  112. package/lib/core/alias-resolver.js +1 -1
  113. package/lib/core/api-client.js +1 -1
  114. package/lib/core/bff/config.js +1 -1
  115. package/lib/core/bff/file-system.js +1 -1
  116. package/lib/core/bff/hash.js +1 -1
  117. package/lib/core/bff/lock.js +1 -1
  118. package/lib/core/bff/utils.js +1 -1
  119. package/lib/core/db-resolver.js +1 -1
  120. package/lib/core/sql-validator.js +1 -1
  121. package/lib/errors.js +1 -1
  122. package/lib/framework/build-all-flags.js +1 -1
  123. package/lib/framework/flags.js +1 -1
  124. package/lib/framework/help.js +1 -1
  125. package/lib/framework/index.js +1 -1
  126. package/lib/framework/output.js +1 -1
  127. package/lib/framework/response.js +1 -1
  128. package/lib/framework/runner-alias.js +1 -1
  129. package/lib/framework/runner.js +1 -1
  130. package/lib/framework/schema-export.js +1 -1
  131. package/lib/framework/types.js +1 -1
  132. package/lib/generated/build-info.js +1 -1
  133. package/lib/help.js +1 -1
  134. package/lib/skills/main.js +1 -1
  135. package/lib/skills/npx-skills-add.js +1 -1
  136. package/lib/telemetry/cli-command-trace.js +1 -1
  137. package/lib/telemetry/cli-help-trace.js +1 -1
  138. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  139. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  140. package/lib/telemetry/send-cli-trace-log.js +1 -1
  141. package/lib/utils/ai_config.js +1 -1
  142. package/lib/utils/apply-jq-filter.js +1 -1
  143. package/lib/utils/cdn-config.js +1 -1
  144. package/lib/utils/check-sdk-version.js +1 -1
  145. package/lib/utils/cli-version-check.js +1 -1
  146. package/lib/utils/config.js +1 -1
  147. package/lib/utils/copy-directory.js +1 -1
  148. package/lib/utils/entity-with-id.js +1 -1
  149. package/lib/utils/file-utils.js +1 -1
  150. package/lib/utils/guides-cdn.js +1 -1
  151. package/lib/utils/http-client.js +1 -1
  152. package/lib/utils/is-non-interactive.js +1 -1
  153. package/lib/utils/logger.js +1 -1
  154. package/lib/utils/platform.js +1 -1
  155. package/lib/utils/rules-cdn.js +1 -1
  156. package/lib/utils/sleep.js +1 -1
  157. package/lib/utils/template-replacer.js +1 -1
  158. package/lib/utils/version.js +1 -1
  159. package/lib/utils/with-active-cookie.js +1 -1
  160. package/lib/utils/write-cli-side-channel.js +1 -1
  161. package/package.json +1 -1
@@ -1 +1 @@
1
- const a79_0x26115d=a79_0x2751;function a79_0x1b4b(){const _0x48c5d1=['\x20error(s)).','skipped','local\x20differs\x20from\x20remote','length','yes','appCode','Would\x20pull\x20','sqlcode','12JgAmjV','local\x20differs\x20from\x20remote\x20(use\x20--force\x20to\x20overwrite)','\x20SQL\x20file(s)\x20under\x20','close','Force\x20pull\x20will\x20overwrite\x20local\x20SQL\x20that\x20differs\x20from\x20remote.\x20Continue?\x20[y/N]\x20','POST','cancelled','str','question','Pull\x20complete:\x20','9hTlFGe','stdin','unchanged','382YvrpND','stderr','name','\x20failed','sqlCode','Force\x20pull\x20cancelled.','tableData','sqlName','would_pull','paging','conflict','boolean','5080768soQIfl','message','645771UPIPbP','62otyMMr','10025260ZQZjnw','\x20written,\x20','14795580zFACkq','26380zMntXc','push','\x20skipped,\x20','Overwrite\x20local\x20files\x20that\x20differ\x20from\x20remote','string','/smartapi/custom/queryUserCustomSqlList','11WodQbW','sql','sqlContent','utf8','trim','362812kNeSvw','toLowerCase','1140ZadoAM','write','Pull\x20remote\x20custom\x20SQL\x20queries\x20into\x20.rabetbase/sql/'];a79_0x1b4b=function(){return _0x48c5d1;};return a79_0x1b4b();}(function(_0xf6a5d,_0xaf2ec9){const _0x1bc6b2=a79_0x2751,_0x38075d=_0xf6a5d();while(!![]){try{const _0x512323=-parseInt(_0x1bc6b2(0x12f))/0x1*(-parseInt(_0x1bc6b2(0x106))/0x2)+parseInt(_0x1bc6b2(0x122))/0x3*(parseInt(_0x1bc6b2(0x115))/0x4)+parseInt(_0x1bc6b2(0x10a))/0x5*(parseInt(_0x1bc6b2(0x117))/0x6)+parseInt(_0x1bc6b2(0x105))/0x7+-parseInt(_0x1bc6b2(0x103))/0x8*(parseInt(_0x1bc6b2(0x12c))/0x9)+parseInt(_0x1bc6b2(0x107))/0xa+-parseInt(_0x1bc6b2(0x110))/0xb*(parseInt(_0x1bc6b2(0x109))/0xc);if(_0x512323===_0xaf2ec9)break;else _0x38075d['push'](_0x38075d['shift']());}catch(_0x2b116f){_0x38075d['push'](_0x38075d['shift']());}}}(a79_0x1b4b,0x936a4));import{createInterface}from'node:readline';import{readFile,writeFile}from'node:fs/promises';import{join}from'node:path';import{getSqlQueryInfo,listSqlQueries}from'../../core/api-client.js';import{ensureParentDirectory,fileExists}from'../../core/bff/file-system.js';import{findProjectRootDirectory}from'../../context.js';import{assignSqlFileNames,buildPulledSqlFileContent,resolveSqlLocalDir}from'../../commands/sql/shared.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const PAGE_SIZE=0x64;function a79_0x2751(_0x2894a4,_0x4a99d7){_0x2894a4=_0x2894a4-0xfd;const _0x1b4b21=a79_0x1b4b();let _0x275134=_0x1b4b21[_0x2894a4];return _0x275134;}async function fetchAllSqlQueries(_0x21da06,_0x21b65e){const _0x588f33=a79_0x2751,_0x471b8b=[];let _0x12112d=0x1;while(!![]){const _0x3628e8=await listSqlQueries(_0x21da06,{'currentPage':_0x12112d,'pageSize':PAGE_SIZE,'sqlCode':_0x21b65e[_0x588f33(0x133)],'sqlName':_0x21b65e[_0x588f33(0xfe)]}),_0x549d19=_0x3628e8[_0x588f33(0xfd)]??[];_0x471b8b['push'](..._0x549d19);if(_0x549d19[_0x588f33(0x11d)]===0x0)break;const _0x5108d4=_0x3628e8[_0x588f33(0x100)]?.['totalCount'];if(_0x5108d4!=null?_0x471b8b[_0x588f33(0x11d)]>=_0x5108d4:_0x549d19[_0x588f33(0x11d)]<PAGE_SIZE)break;_0x12112d++;}return _0x471b8b;}async function ensureSqlContent(_0x3e903d,_0x18940c){const _0x30a0f4=a79_0x2751;if(_0x18940c[_0x30a0f4(0x112)]!=null&&String(_0x18940c[_0x30a0f4(0x112)])['length']>0x0)return _0x18940c;return getSqlQueryInfo(_0x3e903d,_0x18940c[_0x30a0f4(0x133)]);}export const sqlPull={'service':a79_0x26115d(0x111),'command':'pull','description':a79_0x26115d(0x119),'risk':a79_0x26115d(0x118),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a79_0x26115d(0x131),'type':a79_0x26115d(0x10e),'description':'Filter\x20by\x20SQL\x20display\x20name\x20(API\x20filter)'},{'name':'force','type':a79_0x26115d(0x102),'description':a79_0x26115d(0x10d)}],async 'dryRun'(_0x4d6b4c){const _0x195cf1=a79_0x26115d,_0x12619a=findProjectRootDirectory(),_0x2a8fbf=resolveSqlLocalDir(_0x12619a),_0x212b2b=_0x4d6b4c[_0x195cf1(0x129)](_0x195cf1(0x121))||undefined,_0x14fff9=_0x4d6b4c[_0x195cf1(0x129)](_0x195cf1(0x131))||undefined,_0x17847e=await fetchAllSqlQueries(_0x4d6b4c[_0x195cf1(0x11f)],{'sqlCode':_0x212b2b,'sqlName':_0x14fff9}),_0x425648=[],_0x2047eb=[];for(const _0x168022 of _0x17847e){try{_0x425648[_0x195cf1(0x10b)](await ensureSqlContent(_0x4d6b4c[_0x195cf1(0x11f)],_0x168022));}catch(_0x1cc8cf){_0x2047eb[_0x195cf1(0x10b)]({'sqlCode':_0x168022[_0x195cf1(0x133)],'error':_0x1cc8cf instanceof Error?_0x1cc8cf[_0x195cf1(0x104)]:String(_0x1cc8cf)});}}const _0x54a967=assignSqlFileNames(_0x425648),_0x5661e0=[];for(const [_0x35ddd0,_0x19f119]of _0x54a967){const _0x565e5b=join(_0x2a8fbf,_0x35ddd0),_0x141f37=buildPulledSqlFileContent(_0x19f119);let _0x3a451f=_0x195cf1(0xff),_0x5c8074;if(await fileExists(_0x565e5b)){const _0x3cff2b=await readFile(_0x565e5b,_0x195cf1(0x113));_0x3cff2b===_0x141f37?(_0x3a451f=_0x195cf1(0x11b),_0x5c8074=_0x195cf1(0x12e)):(_0x3a451f=_0x195cf1(0x101),_0x5c8074=_0x195cf1(0x123));}_0x5661e0['push']({'sqlCode':_0x19f119['sqlCode'],'sqlName':_0x19f119['sqlName'],'filePath':_0x565e5b,'status':_0x3a451f,'reason':_0x5c8074});}return{'method':_0x195cf1(0x127),'url':_0x195cf1(0x10f),'body':{'appCode':_0x4d6b4c[_0x195cf1(0x11f)],'sqlCode':_0x212b2b??null,'sqlName':_0x14fff9??null,'loadErrors':_0x2047eb,'files':_0x5661e0},'description':_0x195cf1(0x120)+_0x5661e0[_0x195cf1(0x11d)]+_0x195cf1(0x124)+_0x2a8fbf};},async 'execute'(_0x461191){const _0x246f02=a79_0x26115d,_0x1a1a93=findProjectRootDirectory(),_0x1c213f=resolveSqlLocalDir(_0x1a1a93),_0x2ecab4=_0x461191['str'](_0x246f02(0x121))||undefined,_0x136c18=_0x461191[_0x246f02(0x129)](_0x246f02(0x131))||undefined,_0x3dce7d=_0x461191['bool']('force'),_0x182120=await fetchAllSqlQueries(_0x461191[_0x246f02(0x11f)],{'sqlCode':_0x2ecab4,'sqlName':_0x136c18});if(_0x182120[_0x246f02(0x11d)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':'No\x20remote\x20SQL\x20queries\x20matched.'};const _0x52a24e=[],_0x219b88=[];for(const _0x5265d3 of _0x182120){try{_0x52a24e[_0x246f02(0x10b)](await ensureSqlContent(_0x461191[_0x246f02(0x11f)],_0x5265d3));}catch(_0x59cba5){_0x219b88[_0x246f02(0x10b)]({'sqlCode':_0x5265d3['sqlCode'],'error':_0x59cba5 instanceof Error?_0x59cba5[_0x246f02(0x104)]:String(_0x59cba5)});}}if(_0x52a24e[_0x246f02(0x11d)]===0x0)return{'ok':![],'data':{'pulled':[],'skipped':[],'failed':_0x219b88},'message':'Pull\x20failed:\x20could\x20not\x20load\x20SQL\x20content\x20('+_0x219b88[_0x246f02(0x11d)]+_0x246f02(0x11a)};const _0x15d363=assignSqlFileNames(_0x52a24e);if(_0x3dce7d&&!_0x461191['nonInteractive']){let _0x537511=![];for(const [_0x5818d9,_0x4e9272]of _0x15d363){const _0x1a9bb5=join(_0x1c213f,_0x5818d9),_0x31e710=buildPulledSqlFileContent(_0x4e9272);if(await fileExists(_0x1a9bb5)){const _0x54ab96=await readFile(_0x1a9bb5,_0x246f02(0x113));if(_0x54ab96!==_0x31e710){_0x537511=!![];break;}}}if(_0x537511){const _0x54a02d=await confirmForce();if(!_0x54a02d)throw CliErrors[_0x246f02(0x128)](_0x246f02(0x134));}}const _0x4b4dfd=[],_0x2ba38d=[];for(const [_0x4a1a92,_0x15e826]of _0x15d363){const _0x190598=join(_0x1c213f,_0x4a1a92),_0x18fc6a=buildPulledSqlFileContent(_0x15e826);try{if(await fileExists(_0x190598)){const _0x1d5961=await readFile(_0x190598,'utf8');if(_0x1d5961===_0x18fc6a){_0x2ba38d[_0x246f02(0x10b)]({'sqlCode':_0x15e826[_0x246f02(0x133)],'reason':_0x246f02(0x12e)});continue;}if(!_0x3dce7d){_0x2ba38d['push']({'sqlCode':_0x15e826['sqlCode'],'reason':_0x246f02(0x11c)});continue;}}await ensureParentDirectory(_0x190598),await writeFile(_0x190598,_0x18fc6a,_0x246f02(0x113)),_0x4b4dfd['push']({'sqlCode':_0x15e826[_0x246f02(0x133)],'filePath':_0x190598});}catch(_0x4003d0){_0x219b88['push']({'sqlCode':_0x15e826[_0x246f02(0x133)],'error':_0x4003d0 instanceof Error?_0x4003d0[_0x246f02(0x104)]:String(_0x4003d0)});}}const _0x170213=_0x219b88['length']===0x0;return{'ok':_0x170213,'data':{'pulled':_0x4b4dfd,'skipped':_0x2ba38d,'failed':_0x219b88},'message':_0x246f02(0x12b)+_0x4b4dfd[_0x246f02(0x11d)]+_0x246f02(0x108)+_0x2ba38d['length']+_0x246f02(0x10c)+_0x219b88['length']+_0x246f02(0x132)};}};async function confirmForce(){const _0x5e90b6=a79_0x26115d,_0x323603=createInterface({'input':process[_0x5e90b6(0x12d)],'output':process[_0x5e90b6(0x130)]}),_0x1f0d63=await new Promise(_0x3dc4b7=>{const _0x5aa0e7=_0x5e90b6;_0x323603[_0x5aa0e7(0x12a)](_0x5aa0e7(0x126),_0x3dc4b7);});return _0x323603[_0x5e90b6(0x125)](),['y',_0x5e90b6(0x11e)]['includes'](_0x1f0d63[_0x5e90b6(0x114)]()[_0x5e90b6(0x116)]());}
1
+ const a79_0x36ff5c=a79_0x5406;(function(_0x5ce282,_0x3db250){const _0x3e1ac5=a79_0x5406,_0x356542=_0x5ce282();while(!![]){try{const _0x23dbde=-parseInt(_0x3e1ac5(0x201))/0x1+parseInt(_0x3e1ac5(0x1f5))/0x2*(parseInt(_0x3e1ac5(0x206))/0x3)+-parseInt(_0x3e1ac5(0x218))/0x4+-parseInt(_0x3e1ac5(0x1f9))/0x5+parseInt(_0x3e1ac5(0x20d))/0x6*(parseInt(_0x3e1ac5(0x212))/0x7)+-parseInt(_0x3e1ac5(0x1f8))/0x8+parseInt(_0x3e1ac5(0x1ed))/0x9*(parseInt(_0x3e1ac5(0x1eb))/0xa);if(_0x23dbde===_0x3db250)break;else _0x356542['push'](_0x356542['shift']());}catch(_0x2c53d1){_0x356542['push'](_0x356542['shift']());}}}(a79_0x492f,0xde946));import{createInterface}from'node:readline';function a79_0x492f(){const _0x4f40b4=['name','push','local\x20differs\x20from\x20remote\x20(use\x20--force\x20to\x20overwrite)','local\x20differs\x20from\x20remote','No\x20remote\x20SQL\x20queries\x20matched.','8dwCBFi','paging','unchanged','7383336YsWmem','7789205cICelg','message','Overwrite\x20local\x20files\x20that\x20differ\x20from\x20remote','Pull\x20remote\x20custom\x20SQL\x20queries\x20into\x20.rabetbase/sql/','\x20skipped,\x20','pull','\x20error(s)).','conflict','754359uLdauE','question','str','skipped','would_pull','1038927scIPmI','trim','yes','bool','utf8','Pull\x20failed:\x20could\x20not\x20load\x20SQL\x20content\x20(','Filter\x20by\x20SQL\x20display\x20name\x20(API\x20filter)','9732gehraH','Force\x20pull\x20cancelled.','totalCount','includes','stderr','1491bvrshC','POST','close','sqlcode','toLowerCase','nonInteractive','2079640IjhioF','Would\x20pull\x20','\x20failed','sqlCode','force','appCode','stdin','write','cancelled','610aqFLMn','length','433179smGgqq','sqlName','sql'];a79_0x492f=function(){return _0x4f40b4;};return a79_0x492f();}import{readFile,writeFile}from'node:fs/promises';import{join}from'node:path';import{getSqlQueryInfo,listSqlQueries}from'../../core/api-client.js';import{ensureParentDirectory,fileExists}from'../../core/bff/file-system.js';import{findProjectRootDirectory}from'../../context.js';function a79_0x5406(_0x492039,_0x5e2806){_0x492039=_0x492039-0x1e5;const _0x492f4d=a79_0x492f();let _0x540688=_0x492f4d[_0x492039];return _0x540688;}import{assignSqlFileNames,buildPulledSqlFileContent,resolveSqlLocalDir}from'../../commands/sql/shared.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const PAGE_SIZE=0x64;async function fetchAllSqlQueries(_0x3955e4,_0x96bcf){const _0x455f6d=a79_0x5406,_0x5835c2=[];let _0x1f6e42=0x1;while(!![]){const _0x350895=await listSqlQueries(_0x3955e4,{'currentPage':_0x1f6e42,'pageSize':PAGE_SIZE,'sqlCode':_0x96bcf[_0x455f6d(0x1e5)],'sqlName':_0x96bcf['sqlName']}),_0x1a4b8a=_0x350895['tableData']??[];_0x5835c2[_0x455f6d(0x1f1)](..._0x1a4b8a);if(_0x1a4b8a[_0x455f6d(0x1ec)]===0x0)break;const _0x57d66a=_0x350895[_0x455f6d(0x1f6)]?.[_0x455f6d(0x20f)];if(_0x57d66a!=null?_0x5835c2[_0x455f6d(0x1ec)]>=_0x57d66a:_0x1a4b8a['length']<PAGE_SIZE)break;_0x1f6e42++;}return _0x5835c2;}async function ensureSqlContent(_0x1f8563,_0x396023){const _0xe34b1a=a79_0x5406;if(_0x396023['sqlContent']!=null&&String(_0x396023['sqlContent'])[_0xe34b1a(0x1ec)]>0x0)return _0x396023;return getSqlQueryInfo(_0x1f8563,_0x396023['sqlCode']);}export const sqlPull={'service':a79_0x36ff5c(0x1ef),'command':a79_0x36ff5c(0x1fe),'description':a79_0x36ff5c(0x1fc),'risk':a79_0x36ff5c(0x1e9),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a79_0x36ff5c(0x1f0),'type':'string','description':a79_0x36ff5c(0x20c)},{'name':a79_0x36ff5c(0x1e6),'type':'boolean','description':a79_0x36ff5c(0x1fb)}],async 'dryRun'(_0x521170){const _0x4058eb=a79_0x36ff5c,_0x1f1d5f=findProjectRootDirectory(),_0x251450=resolveSqlLocalDir(_0x1f1d5f),_0x1efdf1=_0x521170['str'](_0x4058eb(0x215))||undefined,_0x2539ac=_0x521170[_0x4058eb(0x203)](_0x4058eb(0x1f0))||undefined,_0x3fb1a1=await fetchAllSqlQueries(_0x521170['appCode'],{'sqlCode':_0x1efdf1,'sqlName':_0x2539ac}),_0x53f60a=[],_0x211b71=[];for(const _0x36b9f8 of _0x3fb1a1){try{_0x53f60a['push'](await ensureSqlContent(_0x521170[_0x4058eb(0x1e7)],_0x36b9f8));}catch(_0x3ba79b){_0x211b71[_0x4058eb(0x1f1)]({'sqlCode':_0x36b9f8[_0x4058eb(0x1e5)],'error':_0x3ba79b instanceof Error?_0x3ba79b[_0x4058eb(0x1fa)]:String(_0x3ba79b)});}}const _0x507a76=assignSqlFileNames(_0x53f60a),_0xefd88f=[];for(const [_0x408371,_0x1a57d2]of _0x507a76){const _0x720aa4=join(_0x251450,_0x408371),_0x24f5c1=buildPulledSqlFileContent(_0x1a57d2);let _0x3bd590=_0x4058eb(0x205),_0x557a14;if(await fileExists(_0x720aa4)){const _0x14b8ed=await readFile(_0x720aa4,_0x4058eb(0x20a));_0x14b8ed===_0x24f5c1?(_0x3bd590=_0x4058eb(0x204),_0x557a14=_0x4058eb(0x1f7)):(_0x3bd590=_0x4058eb(0x200),_0x557a14=_0x4058eb(0x1f2));}_0xefd88f[_0x4058eb(0x1f1)]({'sqlCode':_0x1a57d2[_0x4058eb(0x1e5)],'sqlName':_0x1a57d2[_0x4058eb(0x1ee)],'filePath':_0x720aa4,'status':_0x3bd590,'reason':_0x557a14});}return{'method':_0x4058eb(0x213),'url':'/smartapi/custom/queryUserCustomSqlList','body':{'appCode':_0x521170[_0x4058eb(0x1e7)],'sqlCode':_0x1efdf1??null,'sqlName':_0x2539ac??null,'loadErrors':_0x211b71,'files':_0xefd88f},'description':_0x4058eb(0x219)+_0xefd88f['length']+'\x20SQL\x20file(s)\x20under\x20'+_0x251450};},async 'execute'(_0x2a9d66){const _0x297a4d=a79_0x36ff5c,_0x22c808=findProjectRootDirectory(),_0x58f2f5=resolveSqlLocalDir(_0x22c808),_0x4f15e7=_0x2a9d66['str'](_0x297a4d(0x215))||undefined,_0x29d6e0=_0x2a9d66['str'](_0x297a4d(0x1f0))||undefined,_0x37bfa3=_0x2a9d66[_0x297a4d(0x209)](_0x297a4d(0x1e6)),_0x502e13=await fetchAllSqlQueries(_0x2a9d66[_0x297a4d(0x1e7)],{'sqlCode':_0x4f15e7,'sqlName':_0x29d6e0});if(_0x502e13[_0x297a4d(0x1ec)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x297a4d(0x1f4)};const _0x427600=[],_0x5b6c6d=[];for(const _0x206b6b of _0x502e13){try{_0x427600[_0x297a4d(0x1f1)](await ensureSqlContent(_0x2a9d66[_0x297a4d(0x1e7)],_0x206b6b));}catch(_0x4458d8){_0x5b6c6d['push']({'sqlCode':_0x206b6b[_0x297a4d(0x1e5)],'error':_0x4458d8 instanceof Error?_0x4458d8[_0x297a4d(0x1fa)]:String(_0x4458d8)});}}if(_0x427600[_0x297a4d(0x1ec)]===0x0)return{'ok':![],'data':{'pulled':[],'skipped':[],'failed':_0x5b6c6d},'message':_0x297a4d(0x20b)+_0x5b6c6d[_0x297a4d(0x1ec)]+_0x297a4d(0x1ff)};const _0x324a57=assignSqlFileNames(_0x427600);if(_0x37bfa3&&!_0x2a9d66[_0x297a4d(0x217)]){let _0x8b0c25=![];for(const [_0x17b579,_0xcca2ce]of _0x324a57){const _0x26191d=join(_0x58f2f5,_0x17b579),_0x360ec8=buildPulledSqlFileContent(_0xcca2ce);if(await fileExists(_0x26191d)){const _0x1f4040=await readFile(_0x26191d,_0x297a4d(0x20a));if(_0x1f4040!==_0x360ec8){_0x8b0c25=!![];break;}}}if(_0x8b0c25){const _0x44a50d=await confirmForce();if(!_0x44a50d)throw CliErrors[_0x297a4d(0x1ea)](_0x297a4d(0x20e));}}const _0x165e48=[],_0x16241c=[];for(const [_0x44afc6,_0x21c8af]of _0x324a57){const _0x90ae26=join(_0x58f2f5,_0x44afc6),_0x5e9e53=buildPulledSqlFileContent(_0x21c8af);try{if(await fileExists(_0x90ae26)){const _0x45837e=await readFile(_0x90ae26,'utf8');if(_0x45837e===_0x5e9e53){_0x16241c[_0x297a4d(0x1f1)]({'sqlCode':_0x21c8af['sqlCode'],'reason':_0x297a4d(0x1f7)});continue;}if(!_0x37bfa3){_0x16241c[_0x297a4d(0x1f1)]({'sqlCode':_0x21c8af[_0x297a4d(0x1e5)],'reason':_0x297a4d(0x1f3)});continue;}}await ensureParentDirectory(_0x90ae26),await writeFile(_0x90ae26,_0x5e9e53,_0x297a4d(0x20a)),_0x165e48['push']({'sqlCode':_0x21c8af['sqlCode'],'filePath':_0x90ae26});}catch(_0x485c52){_0x5b6c6d[_0x297a4d(0x1f1)]({'sqlCode':_0x21c8af[_0x297a4d(0x1e5)],'error':_0x485c52 instanceof Error?_0x485c52[_0x297a4d(0x1fa)]:String(_0x485c52)});}}const _0x5365e1=_0x5b6c6d['length']===0x0;return{'ok':_0x5365e1,'data':{'pulled':_0x165e48,'skipped':_0x16241c,'failed':_0x5b6c6d},'message':'Pull\x20complete:\x20'+_0x165e48[_0x297a4d(0x1ec)]+'\x20written,\x20'+_0x16241c[_0x297a4d(0x1ec)]+_0x297a4d(0x1fd)+_0x5b6c6d[_0x297a4d(0x1ec)]+_0x297a4d(0x21a)};}};async function confirmForce(){const _0x233677=a79_0x36ff5c,_0xe6fe69=createInterface({'input':process[_0x233677(0x1e8)],'output':process[_0x233677(0x211)]}),_0x55cfbc=await new Promise(_0x4aae18=>{const _0x4bdb15=_0x233677;_0xe6fe69[_0x4bdb15(0x202)]('Force\x20pull\x20will\x20overwrite\x20local\x20SQL\x20that\x20differs\x20from\x20remote.\x20Continue?\x20[y/N]\x20',_0x4aae18);});return _0xe6fe69[_0x233677(0x214)](),['y',_0x233677(0x208)][_0x233677(0x210)](_0x55cfbc[_0x233677(0x207)]()[_0x233677(0x216)]());}
@@ -1 +1 @@
1
- const a83_0x2c4f56=a83_0x17e7;(function(_0x379c1b,_0x4f761c){const _0xe10f7c=a83_0x17e7,_0x1eaf78=_0x379c1b();while(!![]){try{const _0x128a1c=parseInt(_0xe10f7c(0x206))/0x1+-parseInt(_0xe10f7c(0x200))/0x2+-parseInt(_0xe10f7c(0x20c))/0x3*(parseInt(_0xe10f7c(0x209))/0x4)+-parseInt(_0xe10f7c(0x1eb))/0x5*(-parseInt(_0xe10f7c(0x20d))/0x6)+-parseInt(_0xe10f7c(0x211))/0x7+-parseInt(_0xe10f7c(0x1e7))/0x8+parseInt(_0xe10f7c(0x204))/0x9;if(_0x128a1c===_0x4f761c)break;else _0x1eaf78['push'](_0x1eaf78['shift']());}catch(_0x5b57f6){_0x1eaf78['push'](_0x1eaf78['shift']());}}}(a83_0xf3b5,0x262bf));function a83_0xf3b5(){const _0xa07406=['SQL\x20validation\x20failed:\x20','Type:\x20','message','sqlType','POST','\x20chars)','str','Path\x20to\x20the\x20SQL\x20file','parameters','none','utf-8','cwd','\x20|\x20Tables:\x20','sqlcode','tables','Conflict\x20detected','sql','\x20successfully','string','validation','311114oXcefh','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','blocked','created','3819879JvswSp','sqlCode','243427CZLEzL','Save\x20or\x20update\x20a\x20custom\x20SQL\x20query\x20(validates\x20before\x20saving)','save','157016bXqQjT','Updated','action','3PBUboG','26130yqWCDc','\x20|\x20Params:\x20','valid','join','1130444LMeXrF','file','write','dbId','description','/api/node-toolbox/sql/save','sqlname','Created','N/A','1415832QVSWid','sqlName','appCode','SQL\x20query\x20display\x20name','25ZbJwZC'];a83_0xf3b5=function(){return _0xa07406;};return a83_0xf3b5();}import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{saveSqlQuery}from'../../core/api-client.js';import{resolveOneDb}from'../../core/db-resolver.js';import{validateSql}from'../../core/sql-validator.js';function a83_0x17e7(_0x14ca74,_0x5a093d){_0x14ca74=_0x14ca74-0x1e2;const _0xf3b57=a83_0xf3b5();let _0x17e7a1=_0xf3b57[_0x14ca74];return _0x17e7a1;}import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlSave={'service':a83_0x2c4f56(0x1fc),'command':a83_0x2c4f56(0x208),'description':a83_0x2c4f56(0x207),'risk':a83_0x2c4f56(0x213),'flags':[{'name':a83_0x2c4f56(0x212),'type':a83_0x2c4f56(0x1fe),'required':!![],'description':a83_0x2c4f56(0x1f3)},SQLCODE_FLAG_OPTIONAL,{'name':a83_0x2c4f56(0x1e4),'type':a83_0x2c4f56(0x1fe),'description':a83_0x2c4f56(0x1ea)},{'name':'db','type':a83_0x2c4f56(0x1fe),'description':a83_0x2c4f56(0x201)},{'name':a83_0x2c4f56(0x1e2),'type':a83_0x2c4f56(0x1fe),'description':'SQL\x20query\x20description'}],async 'validate'(_0x47fc88){const _0x512bb7=a83_0x2c4f56,_0x34bd9e=resolve(process[_0x512bb7(0x1f7)](),_0x47fc88[_0x512bb7(0x1f2)]('file'));if(!existsSync(_0x34bd9e))throw CliErrors[_0x512bb7(0x1ff)]('File\x20not\x20found:\x20'+_0x34bd9e);const _0x1e29b0=readFileSync(_0x34bd9e,_0x512bb7(0x1f6)),_0x332a2d=validateSql(_0x1e29b0);if(!_0x332a2d[_0x512bb7(0x20f)])throw CliErrors[_0x512bb7(0x1ff)](_0x512bb7(0x1ec)+_0x332a2d[_0x512bb7(0x1ee)]);},async 'dryRun'(_0x22b127){const _0x32e581=a83_0x2c4f56,_0x141a14=resolve(process[_0x32e581(0x1f7)](),_0x22b127[_0x32e581(0x1f2)](_0x32e581(0x212))),_0x2b2822=readFileSync(_0x141a14,'utf-8'),_0x33c8f1=validateSql(_0x2b2822),_0x1f2e0e=_0x22b127[_0x32e581(0x1f2)]('db')||undefined,{db:_0x511cff,error:_0x534ed7}=await resolveOneDb(_0x22b127[_0x32e581(0x1e9)],_0x1f2e0e);return{'method':_0x32e581(0x1f0),'url':_0x32e581(0x1e3),'body':{'appCode':_0x22b127[_0x32e581(0x1e9)],'sqlContent':'('+_0x2b2822['length']+_0x32e581(0x1f1),'sqlCode':_0x22b127[_0x32e581(0x1f2)](_0x32e581(0x1f9))||undefined,'sqlName':_0x22b127[_0x32e581(0x1f2)](_0x32e581(0x1e4))||undefined,'db':_0x511cff?_0x511cff['dbName']+'\x20('+_0x511cff[_0x32e581(0x214)]+')':_0x534ed7},'description':['Save\x20SQL\x20query\x20from\x20'+_0x22b127['str'](_0x32e581(0x212)),'Validation:\x20'+_0x33c8f1[_0x32e581(0x1ee)],_0x32e581(0x1ed)+_0x33c8f1[_0x32e581(0x1ef)]['type']+_0x32e581(0x1f8)+(_0x33c8f1[_0x32e581(0x1fa)]['join'](',\x20')||_0x32e581(0x1e6))+_0x32e581(0x20e)+(_0x33c8f1[_0x32e581(0x1f4)][_0x32e581(0x210)](',\x20')||_0x32e581(0x1f5))][_0x32e581(0x210)]('\x0a')};},async 'execute'(_0x17ca4c){const _0x133c04=a83_0x2c4f56,_0x10cf34=resolve(process[_0x133c04(0x1f7)](),_0x17ca4c[_0x133c04(0x1f2)](_0x133c04(0x212))),_0x3e4040=readFileSync(_0x10cf34,_0x133c04(0x1f6)),_0x1e189e=_0x17ca4c[_0x133c04(0x1f2)]('db')||undefined,{db:_0x176948,error:_0x3381f1}=await resolveOneDb(_0x17ca4c[_0x133c04(0x1e9)],_0x1e189e);if(_0x3381f1)throw CliErrors[_0x133c04(0x1ff)](_0x3381f1);const _0x408cfd=await saveSqlQuery({'appCode':_0x17ca4c[_0x133c04(0x1e9)],'sqlContent':_0x3e4040,'sqlCode':_0x17ca4c[_0x133c04(0x1f2)](_0x133c04(0x1f9))||undefined,'sqlName':_0x17ca4c[_0x133c04(0x1f2)](_0x133c04(0x1e4))||undefined,'dbId':_0x176948[_0x133c04(0x214)],'description':_0x17ca4c[_0x133c04(0x1f2)](_0x133c04(0x1e2))||undefined});if(_0x408cfd[_0x133c04(0x202)])return{'ok':![],'data':_0x408cfd,'message':_0x408cfd['message']||_0x133c04(0x1fb)};return{'ok':!![],'data':{'sqlCode':_0x408cfd[_0x133c04(0x205)],'sqlName':_0x408cfd[_0x133c04(0x1e8)],'action':_0x408cfd[_0x133c04(0x20b)]},'message':(_0x408cfd[_0x133c04(0x20b)]===_0x133c04(0x203)?_0x133c04(0x1e5):_0x133c04(0x20a))+_0x133c04(0x1fd)+(_0x408cfd[_0x133c04(0x205)]?'\x20('+_0x408cfd[_0x133c04(0x205)]+')':'')};}};
1
+ function a83_0x24f3(){const _0x3d81e0=['Updated','Path\x20to\x20the\x20SQL\x20file','blocked','Save\x20or\x20update\x20a\x20custom\x20SQL\x20query\x20(validates\x20before\x20saving)','658072ZERatA','appCode','write','validation','message','none','dbName','SQL\x20query\x20description','sqlType','Validation:\x20','sqlcode','parameters','\x20chars)','sql','Save\x20SQL\x20query\x20from\x20','string','cwd','dbId','\x20successfully','tables','Type:\x20','POST','1499882cRrgTA','join','Conflict\x20detected','utf-8','3152SPblyE','str','Created','3282430oEzRxk','110430cIGees','SQL\x20query\x20display\x20name','sqlCode','sqlname','created','valid','4llBjCi','action','save','SQL\x20validation\x20failed:\x20','\x20|\x20Tables:\x20','1858251ewgsxj','file','4463870zsozZt','11823UaWLMp','/api/node-toolbox/sql/save','sqlName','9aduTYB'];a83_0x24f3=function(){return _0x3d81e0;};return a83_0x24f3();}const a83_0x465f0c=a83_0x3a87;(function(_0x1424ac,_0x1b903c){const _0x36da20=a83_0x3a87,_0x37c7b5=_0x1424ac();while(!![]){try{const _0x7ddc6f=parseInt(_0x36da20(0x19b))/0x1+-parseInt(_0x36da20(0x17d))/0x2+-parseInt(_0x36da20(0x190))/0x3+-parseInt(_0x36da20(0x18b))/0x4*(-parseInt(_0x36da20(0x192))/0x5)+-parseInt(_0x36da20(0x185))/0x6+-parseInt(_0x36da20(0x193))/0x7*(-parseInt(_0x36da20(0x181))/0x8)+-parseInt(_0x36da20(0x196))/0x9*(parseInt(_0x36da20(0x184))/0xa);if(_0x7ddc6f===_0x1b903c)break;else _0x37c7b5['push'](_0x37c7b5['shift']());}catch(_0x15b60f){_0x37c7b5['push'](_0x37c7b5['shift']());}}}(a83_0x24f3,0x7a252));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{saveSqlQuery}from'../../core/api-client.js';import{resolveOneDb}from'../../core/db-resolver.js';import{validateSql}from'../../core/sql-validator.js';import{CliErrors}from'../../errors.js';function a83_0x3a87(_0x255082,_0x910b52){_0x255082=_0x255082-0x168;const _0x24f385=a83_0x24f3();let _0x3a878d=_0x24f385[_0x255082];return _0x3a878d;}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlSave={'service':a83_0x465f0c(0x174),'command':a83_0x465f0c(0x18d),'description':a83_0x465f0c(0x19a),'risk':a83_0x465f0c(0x169),'flags':[{'name':a83_0x465f0c(0x191),'type':'string','required':!![],'description':a83_0x465f0c(0x198)},SQLCODE_FLAG_OPTIONAL,{'name':a83_0x465f0c(0x188),'type':a83_0x465f0c(0x176),'description':a83_0x465f0c(0x186)},{'name':'db','type':'string','description':'Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)'},{'name':'description','type':'string','description':a83_0x465f0c(0x16e)}],async 'validate'(_0x57aa1f){const _0x5548ab=a83_0x465f0c,_0x517732=resolve(process[_0x5548ab(0x177)](),_0x57aa1f['str'](_0x5548ab(0x191)));if(!existsSync(_0x517732))throw CliErrors[_0x5548ab(0x16a)]('File\x20not\x20found:\x20'+_0x517732);const _0x428540=readFileSync(_0x517732,_0x5548ab(0x180)),_0x18405a=validateSql(_0x428540);if(!_0x18405a[_0x5548ab(0x18a)])throw CliErrors[_0x5548ab(0x16a)](_0x5548ab(0x18e)+_0x18405a['message']);},async 'dryRun'(_0x4000fd){const _0x310762=a83_0x465f0c,_0x3aab22=resolve(process[_0x310762(0x177)](),_0x4000fd[_0x310762(0x182)](_0x310762(0x191))),_0x222a6f=readFileSync(_0x3aab22,_0x310762(0x180)),_0x451371=validateSql(_0x222a6f),_0x182d99=_0x4000fd[_0x310762(0x182)]('db')||undefined,{db:_0x293dd8,error:_0x2ad110}=await resolveOneDb(_0x4000fd[_0x310762(0x168)],_0x182d99);return{'method':_0x310762(0x17c),'url':_0x310762(0x194),'body':{'appCode':_0x4000fd[_0x310762(0x168)],'sqlContent':'('+_0x222a6f['length']+_0x310762(0x173),'sqlCode':_0x4000fd[_0x310762(0x182)](_0x310762(0x171))||undefined,'sqlName':_0x4000fd[_0x310762(0x182)]('sqlname')||undefined,'db':_0x293dd8?_0x293dd8[_0x310762(0x16d)]+'\x20('+_0x293dd8['dbId']+')':_0x2ad110},'description':[_0x310762(0x175)+_0x4000fd[_0x310762(0x182)](_0x310762(0x191)),_0x310762(0x170)+_0x451371[_0x310762(0x16b)],_0x310762(0x17b)+_0x451371[_0x310762(0x16f)]['type']+_0x310762(0x18f)+(_0x451371[_0x310762(0x17a)][_0x310762(0x17e)](',\x20')||'N/A')+'\x20|\x20Params:\x20'+(_0x451371[_0x310762(0x172)][_0x310762(0x17e)](',\x20')||_0x310762(0x16c))]['join']('\x0a')};},async 'execute'(_0x5cf53e){const _0x3f7d1f=a83_0x465f0c,_0x50c487=resolve(process[_0x3f7d1f(0x177)](),_0x5cf53e[_0x3f7d1f(0x182)](_0x3f7d1f(0x191))),_0x3382ed=readFileSync(_0x50c487,_0x3f7d1f(0x180)),_0x117597=_0x5cf53e[_0x3f7d1f(0x182)]('db')||undefined,{db:_0x21c345,error:_0x31b895}=await resolveOneDb(_0x5cf53e['appCode'],_0x117597);if(_0x31b895)throw CliErrors[_0x3f7d1f(0x16a)](_0x31b895);const _0x19e84b=await saveSqlQuery({'appCode':_0x5cf53e[_0x3f7d1f(0x168)],'sqlContent':_0x3382ed,'sqlCode':_0x5cf53e[_0x3f7d1f(0x182)](_0x3f7d1f(0x171))||undefined,'sqlName':_0x5cf53e[_0x3f7d1f(0x182)](_0x3f7d1f(0x188))||undefined,'dbId':_0x21c345[_0x3f7d1f(0x178)],'description':_0x5cf53e[_0x3f7d1f(0x182)]('description')||undefined});if(_0x19e84b[_0x3f7d1f(0x199)])return{'ok':![],'data':_0x19e84b,'message':_0x19e84b[_0x3f7d1f(0x16b)]||_0x3f7d1f(0x17f)};return{'ok':!![],'data':{'sqlCode':_0x19e84b[_0x3f7d1f(0x187)],'sqlName':_0x19e84b[_0x3f7d1f(0x195)],'action':_0x19e84b[_0x3f7d1f(0x18c)]},'message':(_0x19e84b['action']===_0x3f7d1f(0x189)?_0x3f7d1f(0x183):_0x3f7d1f(0x197))+_0x3f7d1f(0x179)+(_0x19e84b[_0x3f7d1f(0x187)]?'\x20('+_0x19e84b['sqlCode']+')':'')};}};
@@ -1 +1 @@
1
- (function(_0xf42180,_0x5a1bdc){const _0x2d4cba=a84_0x5ebc,_0x50e75c=_0xf42180();while(!![]){try{const _0x3fba07=parseInt(_0x2d4cba(0xa0))/0x1+-parseInt(_0x2d4cba(0x9f))/0x2+-parseInt(_0x2d4cba(0x97))/0x3+-parseInt(_0x2d4cba(0xa4))/0x4+parseInt(_0x2d4cba(0xa9))/0x5+-parseInt(_0x2d4cba(0xa8))/0x6+parseInt(_0x2d4cba(0xaa))/0x7;if(_0x3fba07===_0x5a1bdc)break;else _0x50e75c['push'](_0x50e75c['shift']());}catch(_0x2e9971){_0x50e75c['push'](_0x50e75c['shift']());}}}(a84_0x406a,0xb8a87));function a84_0x5ebc(_0x3edf13,_0x17a935){_0x3edf13=_0x3edf13-0x97;const _0x406a51=a84_0x406a();let _0x5ebc39=_0x406a51[_0x3edf13];return _0x5ebc39;}import{join}from'node:path';export const SQL_LOCAL_REL_DIR='.rabetbase/sql';export function resolveSqlLocalDir(_0x1d9e75){return join(_0x1d9e75,SQL_LOCAL_REL_DIR);}export function safeSqlFileBaseName(_0x33a024){const _0x74f56d=a84_0x5ebc,_0x20215b=_0x33a024['trim']()||'unnamed',_0x59f327=_0x20215b[_0x74f56d(0x98)](/[/\\?%*:|"<>]/g,'_')[_0x74f56d(0x98)](/\s+/g,'_')[_0x74f56d(0x98)](/_+/g,'_');return _0x59f327||'unnamed';}function a84_0x406a(){const _0x27fce2=['replace','has','description','sqlCode','endsWith','sqlContent','unknown','2344200NgoBbQ','996769jWdomi','--\x20@lovrabet.sqlCode:\x20','set','sqlName','1088768BbXrcn','--\x20@lovrabet.sqlName:\x20','.sql','join','8998452FZnhyu','3775515jmnWMs','20931491RSJFUt','--\x20@lovrabet.description:','unnamed','trimEnd','3125076Ymzjev'];a84_0x406a=function(){return _0x27fce2;};return a84_0x406a();}export function assignSqlFileNames(_0x4eac24){const _0x44e262=a84_0x5ebc,_0x2b747f=new Map();for(const _0x368670 of _0x4eac24){const _0x30e264=safeSqlFileBaseName(_0x368670[_0x44e262(0xa3)]??'unnamed');let _0x34a330=_0x30e264+_0x44e262(0xa6);if(_0x2b747f[_0x44e262(0x99)](_0x34a330)){const _0x2ef5c1=(_0x368670[_0x44e262(0x9b)]??_0x44e262(0x9e))[_0x44e262(0x98)](/-/g,'');_0x34a330=_0x30e264+'__'+_0x2ef5c1+_0x44e262(0xa6);}let _0x58cded=0x0,_0x125ae6=_0x34a330;while(_0x2b747f[_0x44e262(0x99)](_0x125ae6)){_0x58cded++,_0x125ae6=_0x30e264+'__'+_0x58cded+_0x44e262(0xa6);}_0x2b747f[_0x44e262(0xa2)](_0x125ae6,_0x368670);}return _0x2b747f;}export function buildPulledSqlFileContent(_0x51807e){const _0x48363f=a84_0x5ebc,_0x3ba8e5=_0x51807e[_0x48363f(0xa3)]??_0x48363f(0xac),_0x2864f2=_0x51807e[_0x48363f(0x9b)]??'',_0x2b1220=(_0x51807e[_0x48363f(0x9a)]??'')['replace'](/\r?\n/g,'\x20')['trim'](),_0x73ac9b=_0x51807e[_0x48363f(0x9d)]??'',_0x41875d=[_0x48363f(0xa5)+_0x3ba8e5,_0x48363f(0xa1)+_0x2864f2,_0x48363f(0xab)+(_0x2b1220?'\x20'+_0x2b1220:''),'',_0x73ac9b[_0x48363f(0xad)]()],_0x5bcb48=_0x41875d[_0x48363f(0xa7)]('\x0a');return _0x5bcb48[_0x48363f(0x9c)]('\x0a')?_0x5bcb48:_0x5bcb48+'\x0a';}
1
+ const a84_0x3d6e90=a84_0x5d62;(function(_0x345f32,_0x2f538e){const _0x52b2b9=a84_0x5d62,_0x4b1a56=_0x345f32();while(!![]){try{const _0x4533d5=-parseInt(_0x52b2b9(0x180))/0x1*(-parseInt(_0x52b2b9(0x178))/0x2)+-parseInt(_0x52b2b9(0x171))/0x3*(parseInt(_0x52b2b9(0x17e))/0x4)+parseInt(_0x52b2b9(0x185))/0x5+-parseInt(_0x52b2b9(0x16e))/0x6*(-parseInt(_0x52b2b9(0x186))/0x7)+-parseInt(_0x52b2b9(0x17b))/0x8*(parseInt(_0x52b2b9(0x17d))/0x9)+-parseInt(_0x52b2b9(0x184))/0xa+-parseInt(_0x52b2b9(0x177))/0xb;if(_0x4533d5===_0x2f538e)break;else _0x4b1a56['push'](_0x4b1a56['shift']());}catch(_0x5826a9){_0x4b1a56['push'](_0x4b1a56['shift']());}}}(a84_0x342b,0x38bb6));function a84_0x5d62(_0x5256c5,_0x50eb42){_0x5256c5=_0x5256c5-0x16e;const _0x342bc2=a84_0x342b();let _0x5d6223=_0x342bc2[_0x5256c5];return _0x5d6223;}function a84_0x342b(){const _0x31f0db=['2657208BNbqFs','sqlName','9seXzYT','163412TTGwIp','endsWith','46azcBTA','set','.rabetbase/sql','.sql','2587550olnwxt','1702930CGcMvb','698138aeHksC','trimEnd','join','24EWZqSw','trim','unknown','3yUpBLf','description','replace','sqlContent','unnamed','--\x20@lovrabet.sqlName:\x20','3356837SICVWg','18686lBSujG','has','sqlCode'];a84_0x342b=function(){return _0x31f0db;};return a84_0x342b();}import{join}from'node:path';export const SQL_LOCAL_REL_DIR=a84_0x3d6e90(0x182);export function resolveSqlLocalDir(_0x47eae4){return join(_0x47eae4,SQL_LOCAL_REL_DIR);}export function safeSqlFileBaseName(_0x574beb){const _0x199c0b=a84_0x3d6e90,_0x9b2275=_0x574beb['trim']()||'unnamed',_0x57fedf=_0x9b2275[_0x199c0b(0x173)](/[/\\?%*:|"<>]/g,'_')[_0x199c0b(0x173)](/\s+/g,'_')[_0x199c0b(0x173)](/_+/g,'_');return _0x57fedf||_0x199c0b(0x175);}export function assignSqlFileNames(_0xbbb343){const _0x2ad361=a84_0x3d6e90,_0x18827c=new Map();for(const _0x5f43d7 of _0xbbb343){const _0xe79e71=safeSqlFileBaseName(_0x5f43d7[_0x2ad361(0x17c)]??'unnamed');let _0x1edc0b=_0xe79e71+_0x2ad361(0x183);if(_0x18827c[_0x2ad361(0x179)](_0x1edc0b)){const _0x551ce0=(_0x5f43d7['sqlCode']??_0x2ad361(0x170))['replace'](/-/g,'');_0x1edc0b=_0xe79e71+'__'+_0x551ce0+_0x2ad361(0x183);}let _0x25e879=0x0,_0x4c42d0=_0x1edc0b;while(_0x18827c[_0x2ad361(0x179)](_0x4c42d0)){_0x25e879++,_0x4c42d0=_0xe79e71+'__'+_0x25e879+_0x2ad361(0x183);}_0x18827c[_0x2ad361(0x181)](_0x4c42d0,_0x5f43d7);}return _0x18827c;}export function buildPulledSqlFileContent(_0x3395c2){const _0x3caba9=a84_0x3d6e90,_0x599ef7=_0x3395c2['sqlName']??_0x3caba9(0x175),_0x3bf102=_0x3395c2[_0x3caba9(0x17a)]??'',_0x386f00=(_0x3395c2[_0x3caba9(0x172)]??'')[_0x3caba9(0x173)](/\r?\n/g,'\x20')[_0x3caba9(0x16f)](),_0x5619aa=_0x3395c2[_0x3caba9(0x174)]??'',_0x25bf0a=[_0x3caba9(0x176)+_0x599ef7,'--\x20@lovrabet.sqlCode:\x20'+_0x3bf102,'--\x20@lovrabet.description:'+(_0x386f00?'\x20'+_0x386f00:''),'',_0x5619aa[_0x3caba9(0x187)]()],_0x4c8d66=_0x25bf0a[_0x3caba9(0x188)]('\x0a');return _0x4c8d66[_0x3caba9(0x17f)]('\x0a')?_0x4c8d66:_0x4c8d66+'\x0a';}
@@ -1 +1 @@
1
- const a78_0x52f55b=a78_0x1195;(function(_0x263544,_0x566195){const _0x2aba6b=a78_0x1195,_0x4b2c1a=_0x263544();while(!![]){try{const _0x1b6eb0=-parseInt(_0x2aba6b(0x158))/0x1+-parseInt(_0x2aba6b(0x141))/0x2+parseInt(_0x2aba6b(0x148))/0x3+parseInt(_0x2aba6b(0x16a))/0x4+-parseInt(_0x2aba6b(0x14e))/0x5*(parseInt(_0x2aba6b(0x13f))/0x6)+-parseInt(_0x2aba6b(0x16b))/0x7+-parseInt(_0x2aba6b(0x13e))/0x8*(-parseInt(_0x2aba6b(0x150))/0x9);if(_0x1b6eb0===_0x566195)break;else _0x4b2c1a['push'](_0x4b2c1a['shift']());}catch(_0x57a684){_0x4b2c1a['push'](_0x4b2c1a['shift']());}}}(a78_0x25b0,0xb22e0));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';function a78_0x25b0(){const _0x178485=['schemas','File\x20not\x20found:\x20','2091999kFaDqd','string','sqlType','valid','parameters','file','90URahyS','fields','17134452kLAhJh','str','tableName','cwd','reason','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','filter','flagMissing','474623nnxLyL','from','Dataset\x20\x22','length','isDangerous','size','Table\x20\x22','schemaWarnings','appCode','isSelectOnly','toLowerCase','isArray','get','schema:','dbtableConfig','read','validation','\x22\x20not\x20found\x20or\x20not\x20accessible','4133332uXmZPv','697837dgBFvB','message','sql','tables','8IjYNdW','298884sHFxls','push','2867408WnSTiY','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','validate','Provide\x20--file\x20or\x20--sql','map'];a78_0x25b0=function(){return _0x178485;};return a78_0x25b0();}import{validateSql}from'../../core/sql-validator.js';function a78_0x1195(_0x23cd56,_0x395b27){_0x23cd56=_0x23cd56-0x13e;const _0x25b09a=a78_0x25b0();let _0x119569=_0x25b09a[_0x23cd56];return _0x119569;}import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const sqlValidate={'service':a78_0x52f55b(0x16d),'command':a78_0x52f55b(0x143),'description':a78_0x52f55b(0x155),'risk':a78_0x52f55b(0x167),'flags':[{'name':a78_0x52f55b(0x14d),'type':a78_0x52f55b(0x149),'description':'Path\x20to\x20the\x20SQL\x20file\x20to\x20validate'},{'name':a78_0x52f55b(0x16d),'type':'string','description':'Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)'},{'name':a78_0x52f55b(0x146),'type':a78_0x52f55b(0x149),'description':a78_0x52f55b(0x142)}],async 'execute'(_0x1054f4){const _0x59f266=a78_0x52f55b,_0x556ac6=_0x1054f4[_0x59f266(0x151)](_0x59f266(0x14d)),_0x1d0a24=_0x1054f4[_0x59f266(0x151)](_0x59f266(0x16d));if(!_0x556ac6&&!_0x1d0a24)throw CliErrors[_0x59f266(0x157)](_0x59f266(0x14d),_0x59f266(0x144));let _0x3998fd;if(_0x556ac6){const _0x1fa951=resolve(process[_0x59f266(0x153)](),_0x556ac6);if(!existsSync(_0x1fa951))throw CliErrors[_0x59f266(0x168)](_0x59f266(0x147)+_0x1fa951);_0x3998fd=readFileSync(_0x1fa951,'utf-8');}else _0x3998fd=_0x1d0a24;const _0x88cb08=validateSql(_0x3998fd),_0x3c8058={'valid':_0x88cb08[_0x59f266(0x14b)],'sqlType':_0x88cb08[_0x59f266(0x14a)]['type'],'isSelectOnly':_0x88cb08[_0x59f266(0x14a)][_0x59f266(0x161)],'isDangerous':_0x88cb08['sqlType'][_0x59f266(0x15c)],'tables':_0x88cb08['tables'],'parameters':_0x88cb08[_0x59f266(0x14c)],'message':_0x88cb08['message']};_0x88cb08['sqlType'][_0x59f266(0x154)]&&(_0x3c8058[_0x59f266(0x154)]=_0x88cb08[_0x59f266(0x14a)][_0x59f266(0x154)]);const _0x4c5437=_0x1054f4[_0x59f266(0x151)](_0x59f266(0x146));if(_0x4c5437&&_0x88cb08['valid']){const _0x350ab6=_0x4c5437['split'](',')['map'](_0x2cfd79=>_0x2cfd79['trim']())[_0x59f266(0x156)](Boolean),_0x1e65bf=[],_0x356747=await listDatasets(_0x1054f4[_0x59f266(0x160)]),_0x1dcacc=new Map(_0x356747[_0x59f266(0x145)](_0x4f03e4=>[_0x4f03e4[_0x59f266(0x166)]?.[_0x59f266(0x152)]?.['toLowerCase'](),_0x4f03e4]));for(const _0x3b17e9 of _0x88cb08[_0x59f266(0x16e)]){const _0x42f5a7=_0x1dcacc[_0x59f266(0x164)](_0x3b17e9[_0x59f266(0x162)]());!_0x42f5a7&&_0x1e65bf['push'](_0x59f266(0x15e)+_0x3b17e9+'\x22\x20not\x20found\x20in\x20any\x20dataset');}for(const _0x4812d1 of _0x350ab6){try{const _0x272da9=await getDatasetDetail(_0x4812d1),_0x216fbf=Array[_0x59f266(0x163)](_0x272da9[_0x59f266(0x14f)])?_0x272da9[_0x59f266(0x14f)]:[],_0x1edc6d=new Set(_0x216fbf['map'](_0x3caddc=>_0x3caddc['name']?.['toLowerCase']())),_0x2024f9=_0x272da9[_0x59f266(0x166)]?.['tableName']||_0x272da9[_0x59f266(0x152)]||_0x4812d1;_0x3c8058[_0x59f266(0x165)+_0x2024f9]={'code':_0x4812d1,'tableName':_0x2024f9,'fieldCount':_0x1edc6d[_0x59f266(0x15d)],'fields':Array[_0x59f266(0x159)](_0x1edc6d)};}catch{_0x1e65bf[_0x59f266(0x140)](_0x59f266(0x15a)+_0x4812d1+_0x59f266(0x169));}}_0x1e65bf[_0x59f266(0x15b)]>0x0&&(_0x3c8058[_0x59f266(0x15f)]=_0x1e65bf);}return{'ok':_0x88cb08[_0x59f266(0x14b)],'data':_0x3c8058,'message':_0x88cb08[_0x59f266(0x16c)]};}};
1
+ const a78_0x241cb0=a78_0x59b0;function a78_0x409c(){const _0xd18dde=['utf-8','file','6335660CrgBjc','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','\x22\x20not\x20found\x20in\x20any\x20dataset','isSelectOnly','3001275DdDfDh','appCode','6466020RVtrqf','map','validate','string','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','fields','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','validation','3509942aCBSvm','67995050ZiMtmj','message','from','str','dbtableConfig','schemas','push','tableName','filter','trim','type','size','reason','length','flagMissing','Provide\x20--file\x20or\x20--sql','sql','3294375IZHsMh','parameters','toLowerCase','tables','File\x20not\x20found:\x20','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','valid','1vxvIMe','4323855zUryFJ','schema:','sqlType','40GIGPjH','cwd','5WcjbKU'];a78_0x409c=function(){return _0xd18dde;};return a78_0x409c();}(function(_0x2fd963,_0x162ed4){const _0x20660f=a78_0x59b0,_0x42c05f=_0x2fd963();while(!![]){try{const _0x449416=parseInt(_0x20660f(0x134))/0x1*(-parseInt(_0x20660f(0x14b))/0x2)+-parseInt(_0x20660f(0x135))/0x3+parseInt(_0x20660f(0x13d))/0x4*(-parseInt(_0x20660f(0x13a))/0x5)+parseInt(_0x20660f(0x143))/0x6+-parseInt(_0x20660f(0x12d))/0x7+parseInt(_0x20660f(0x138))/0x8*(-parseInt(_0x20660f(0x141))/0x9)+parseInt(_0x20660f(0x14c))/0xa;if(_0x449416===_0x162ed4)break;else _0x42c05f['push'](_0x42c05f['shift']());}catch(_0x54edeb){_0x42c05f['push'](_0x42c05f['shift']());}}}(a78_0x409c,0xea21c));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';function a78_0x59b0(_0x37753a,_0x543f95){_0x37753a=_0x37753a-0x123;const _0x409c9c=a78_0x409c();let _0x59b0ec=_0x409c9c[_0x37753a];return _0x59b0ec;}import{validateSql}from'../../core/sql-validator.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const sqlValidate={'service':a78_0x241cb0(0x12c),'command':a78_0x241cb0(0x145),'description':a78_0x241cb0(0x13e),'risk':'read','flags':[{'name':a78_0x241cb0(0x13c),'type':a78_0x241cb0(0x146),'description':a78_0x241cb0(0x149)},{'name':a78_0x241cb0(0x12c),'type':'string','description':a78_0x241cb0(0x147)},{'name':'schemas','type':a78_0x241cb0(0x146),'description':a78_0x241cb0(0x132)}],async 'execute'(_0x3e0011){const _0x4f9f60=a78_0x241cb0,_0x25fa51=_0x3e0011[_0x4f9f60(0x14f)](_0x4f9f60(0x13c)),_0x22484e=_0x3e0011[_0x4f9f60(0x14f)](_0x4f9f60(0x12c));if(!_0x25fa51&&!_0x22484e)throw CliErrors[_0x4f9f60(0x12a)]('file',_0x4f9f60(0x12b));let _0x44b150;if(_0x25fa51){const _0x3befed=resolve(process[_0x4f9f60(0x139)](),_0x25fa51);if(!existsSync(_0x3befed))throw CliErrors[_0x4f9f60(0x14a)](_0x4f9f60(0x131)+_0x3befed);_0x44b150=readFileSync(_0x3befed,_0x4f9f60(0x13b));}else _0x44b150=_0x22484e;const _0x22e4bb=validateSql(_0x44b150),_0x4609e8={'valid':_0x22e4bb[_0x4f9f60(0x133)],'sqlType':_0x22e4bb[_0x4f9f60(0x137)][_0x4f9f60(0x126)],'isSelectOnly':_0x22e4bb[_0x4f9f60(0x137)][_0x4f9f60(0x140)],'isDangerous':_0x22e4bb['sqlType']['isDangerous'],'tables':_0x22e4bb[_0x4f9f60(0x130)],'parameters':_0x22e4bb[_0x4f9f60(0x12e)],'message':_0x22e4bb[_0x4f9f60(0x14d)]};_0x22e4bb[_0x4f9f60(0x137)][_0x4f9f60(0x128)]&&(_0x4609e8[_0x4f9f60(0x128)]=_0x22e4bb[_0x4f9f60(0x137)][_0x4f9f60(0x128)]);const _0x444183=_0x3e0011[_0x4f9f60(0x14f)](_0x4f9f60(0x151));if(_0x444183&&_0x22e4bb[_0x4f9f60(0x133)]){const _0x2cb7e1=_0x444183['split'](',')[_0x4f9f60(0x144)](_0x2c1aa1=>_0x2c1aa1[_0x4f9f60(0x125)]())[_0x4f9f60(0x124)](Boolean),_0x5d88ce=[],_0xbb1e8=await listDatasets(_0x3e0011[_0x4f9f60(0x142)]),_0x14efed=new Map(_0xbb1e8[_0x4f9f60(0x144)](_0x1ebbcb=>[_0x1ebbcb['dbtableConfig']?.[_0x4f9f60(0x123)]?.[_0x4f9f60(0x12f)](),_0x1ebbcb]));for(const _0x4fe4ca of _0x22e4bb[_0x4f9f60(0x130)]){const _0x6cb67b=_0x14efed['get'](_0x4fe4ca[_0x4f9f60(0x12f)]());!_0x6cb67b&&_0x5d88ce[_0x4f9f60(0x152)]('Table\x20\x22'+_0x4fe4ca+_0x4f9f60(0x13f));}for(const _0x102fbf of _0x2cb7e1){try{const _0x2fc377=await getDatasetDetail(_0x102fbf),_0x363dc2=Array['isArray'](_0x2fc377[_0x4f9f60(0x148)])?_0x2fc377[_0x4f9f60(0x148)]:[],_0x196514=new Set(_0x363dc2[_0x4f9f60(0x144)](_0x4029ec=>_0x4029ec['name']?.[_0x4f9f60(0x12f)]())),_0x372133=_0x2fc377[_0x4f9f60(0x150)]?.['tableName']||_0x2fc377[_0x4f9f60(0x123)]||_0x102fbf;_0x4609e8[_0x4f9f60(0x136)+_0x372133]={'code':_0x102fbf,'tableName':_0x372133,'fieldCount':_0x196514[_0x4f9f60(0x127)],'fields':Array[_0x4f9f60(0x14e)](_0x196514)};}catch{_0x5d88ce[_0x4f9f60(0x152)]('Dataset\x20\x22'+_0x102fbf+'\x22\x20not\x20found\x20or\x20not\x20accessible');}}_0x5d88ce[_0x4f9f60(0x129)]>0x0&&(_0x4609e8['schemaWarnings']=_0x5d88ce);}return{'ok':_0x22e4bb[_0x4f9f60(0x133)],'data':_0x4609e8,'message':_0x22e4bb['message']};}};
@@ -1 +1 @@
1
- const a34_0x1aea93=a34_0x5445;(function(_0x19f31c,_0x312858){const _0x307b6f=a34_0x5445,_0x121bbe=_0x19f31c();while(!![]){try{const _0x548cd4=parseInt(_0x307b6f(0x102))/0x1*(parseInt(_0x307b6f(0xef))/0x2)+-parseInt(_0x307b6f(0xe3))/0x3*(-parseInt(_0x307b6f(0xfa))/0x4)+parseInt(_0x307b6f(0xf3))/0x5+-parseInt(_0x307b6f(0xf0))/0x6+-parseInt(_0x307b6f(0xf1))/0x7+-parseInt(_0x307b6f(0xea))/0x8+parseInt(_0x307b6f(0xe2))/0x9;if(_0x548cd4===_0x312858)break;else _0x121bbe['push'](_0x121bbe['shift']());}catch(_0x4870e7){_0x121bbe['push'](_0x121bbe['shift']());}}}(a34_0x9764,0x69c40));function a34_0x5445(_0x239eaa,_0x7aeb24){_0x239eaa=_0x239eaa-0xe0;const _0x9764c3=a34_0x9764();let _0x544590=_0x9764c3[_0x239eaa];return _0x544590;}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RABETBASE_ENV_VALUES}from'../constant/env.js';import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{RISK_LEVEL_VALUES}from'../constant/risk.js';export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=[a34_0x1aea93(0xed),a34_0x1aea93(0xe5),'locale',a34_0x1aea93(0xe1),a34_0x1aea93(0x103)];export const TOP_LEVEL_CONFIG_KEYS=new Set(['appcode',a34_0x1aea93(0xe8),a34_0x1aea93(0xf2),a34_0x1aea93(0xe1),'cookie',a34_0x1aea93(0xe5),'apiDir']);function a34_0x9764(){const _0x19828d=['Default\x20page\x20size','pageSize','en-US','3yxPIqx','riskLevel','length','apiDir','defaultApp','format','7204941BqtlgU','523851IFLUHo','keys','accessKey','join','inherit','env','string','4013704ZDlJSs','map','Auth\x20cookie','cookie','apps','276832QBUhFN','2834658AWzsVj','4889808TveKbM','locale','958255HyCFUs','app','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','API\x20directory\x20path','number','Risk\x20level','Access\x20key','16tdpHDY','zh-CN','filter','defaultFormat','Config\x20key\x20('];a34_0x9764=function(){return _0x19828d;};return a34_0x9764();}export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x1b28ab){const _0x316ac2=a34_0x1aea93;return[..._0x1b28ab][_0x316ac2(0xe6)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x3be776){return TOP_LEVEL_CONFIG_KEYS['has'](_0x3be776);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x290f10=a34_0x1aea93;return _0x290f10(0xfe)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':'env','apiDir':a34_0x1aea93(0x105),'cookie':a34_0x1aea93(0xed),'accessKey':a34_0x1aea93(0xe5),'defaultFormat':'format','pageSize':a34_0x1aea93(0x100),'riskLevel':a34_0x1aea93(0x103),'locale':'locale'};export function getAppProfileFlagDefs(){const _0x30fb34=a34_0x1aea93;return[{'name':'env','type':_0x30fb34(0xe9),'description':'Target\x20environment','enum':[...RABETBASE_ENV_VALUES]},{'name':_0x30fb34(0x105),'type':_0x30fb34(0xe9),'description':_0x30fb34(0xf6)},{'name':_0x30fb34(0xed),'type':'string','description':_0x30fb34(0xec),'hidden':!![]},{'name':_0x30fb34(0xe5),'type':'string','description':_0x30fb34(0xf9),'hidden':!![]},{'name':_0x30fb34(0xfd),'type':'string','description':_0x30fb34(0xf5),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0x30fb34(0x100),'type':_0x30fb34(0xf7),'description':_0x30fb34(0xff)},{'name':_0x30fb34(0x103),'type':_0x30fb34(0xe9),'description':_0x30fb34(0xf8),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x30fb34(0xf2),'type':_0x30fb34(0xe9),'description':'Locale'}];}export function collectAppProfileOverrides(_0x2c46d3){const _0x412c16=a34_0x1aea93,_0x30fbd1={};for(const [_0x2a1893,_0x263003]of Object['entries'](APP_PROFILE_FLAG_KEY_MAP)){const _0xfd8732=_0x2c46d3(_0x2a1893);if(!_0xfd8732)continue;_0x30fbd1[_0x263003]=_0x263003===_0x412c16(0x100)?Number(_0xfd8732):_0xfd8732;}return _0x30fbd1;}export function buildAppProfileListFields(_0x1ba708){const _0x4f1eff=a34_0x1aea93;return{'env':_0x1ba708[_0x4f1eff(0xe8)]??null,'apiDir':_0x1ba708[_0x4f1eff(0x105)]??null,'hasCookie':!!_0x1ba708[_0x4f1eff(0xed)],'hasAccessKey':!!_0x1ba708['accessKey'],'format':_0x1ba708['format']??null,'pageSize':_0x1ba708['pageSize']??null,'riskLevel':_0x1ba708['riskLevel']??null,'locale':_0x1ba708['locale']??null};}export function buildAppDoctorFields(_0x21ec4,_0x4dd04e){const _0x49ccee=a34_0x1aea93;return{'env':{'value':_0x21ec4[_0x49ccee(0xe8)]||_0x4dd04e[_0x49ccee(0xe8)],'source':_0x21ec4[_0x49ccee(0xe8)]?_0x49ccee(0xf4):'inherit'},'apiDir':{'value':_0x21ec4[_0x49ccee(0x105)]||_0x4dd04e[_0x49ccee(0x105)],'source':_0x21ec4[_0x49ccee(0x105)]?_0x49ccee(0xf4):_0x49ccee(0xe7)},'cookie':{'value':_0x21ec4['cookie']||_0x4dd04e[_0x49ccee(0xed)],'source':_0x21ec4[_0x49ccee(0xed)]?'app':_0x49ccee(0xe7)},'accessKey':{'value':_0x21ec4[_0x49ccee(0xe5)]||_0x4dd04e['accessKey'],'source':_0x21ec4[_0x49ccee(0xe5)]?_0x49ccee(0xf4):_0x49ccee(0xe7)}};}export function buildCanonicalAppConfig(_0x54a95a,_0x5dac98){const _0x4b3031=a34_0x1aea93,_0x4f71ac=_0x54a95a[_0x4b3031(0xeb)](_0x29365b=>String(_0x29365b||'')['trim']())[_0x4b3031(0xfc)](Boolean);if(_0x4f71ac[_0x4b3031(0x104)]===0x0)return{};const _0xff797e={};for(const _0x1decf2 of _0x4f71ac){_0xff797e[_0x1decf2]=_0x5dac98?{'appcode':_0x1decf2,'env':_0x5dac98}:{'appcode':_0x1decf2};}return{'apps':_0xff797e,'defaultApp':_0x4f71ac[0x0]};}export function buildCanonicalProjectConfig(_0x27b043,_0x1c776a){const _0x12e30a=a34_0x1aea93,{appCodes:appCodes=[],env:_0x3cc720,metadata:_0x55bea6}=_0x1c776a,_0x45ecdd={..._0x27b043,..._0x55bea6||{}};delete _0x45ecdd['appcode'],delete _0x45ecdd[_0x12e30a(0xf4)];if(_0x3cc720)_0x45ecdd[_0x12e30a(0xe8)]=_0x3cc720;else!_0x45ecdd[_0x12e30a(0xe8)]&&(_0x45ecdd[_0x12e30a(0xe8)]=DEFAULT_CONFIG_VALUES[_0x12e30a(0xe8)]);const _0x1f71bd=buildCanonicalAppConfig(appCodes,_0x45ecdd[_0x12e30a(0xe8)]);return Object[_0x12e30a(0xe4)](_0x1f71bd)[_0x12e30a(0x104)]>0x0&&(_0x45ecdd[_0x12e30a(0xee)]=_0x1f71bd['apps'],_0x45ecdd[_0x12e30a(0xe0)]=_0x1f71bd[_0x12e30a(0xe0)]),_0x45ecdd;}const LOCALE_MAP={'zh':a34_0x1aea93(0xfb),'zh-cn':a34_0x1aea93(0xfb),'zh_cn':a34_0x1aea93(0xfb),'en':a34_0x1aea93(0x101),'en-us':a34_0x1aea93(0x101),'en_us':'en-US'};export function normalizeLocale(_0xcd0e9c){if(!_0xcd0e9c)return null;return LOCALE_MAP[_0xcd0e9c['toLowerCase']()]??null;}
1
+ const a34_0x2c37ab=a34_0x2e11;(function(_0x225082,_0x4137f5){const _0xe27be=a34_0x2e11,_0x27104a=_0x225082();while(!![]){try{const _0x3df40c=-parseInt(_0xe27be(0x115))/0x1+parseInt(_0xe27be(0x10f))/0x2+-parseInt(_0xe27be(0xf7))/0x3*(parseInt(_0xe27be(0x101))/0x4)+-parseInt(_0xe27be(0xf4))/0x5+-parseInt(_0xe27be(0xff))/0x6+-parseInt(_0xe27be(0xfc))/0x7+parseInt(_0xe27be(0x109))/0x8;if(_0x3df40c===_0x4137f5)break;else _0x27104a['push'](_0x27104a['shift']());}catch(_0x3e10c6){_0x27104a['push'](_0x27104a['shift']());}}}(a34_0x68e4,0xdb19a));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RABETBASE_ENV_VALUES}from'../constant/env.js';import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{RISK_LEVEL_VALUES}from'../constant/risk.js';export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=[a34_0x2c37ab(0x11b),a34_0x2c37ab(0x102),a34_0x2c37ab(0x114),a34_0x2c37ab(0xfe),a34_0x2c37ab(0x105)];export const TOP_LEVEL_CONFIG_KEYS=new Set([a34_0x2c37ab(0x119),a34_0x2c37ab(0x111),a34_0x2c37ab(0x114),a34_0x2c37ab(0xfe),a34_0x2c37ab(0x11b),a34_0x2c37ab(0x102),a34_0x2c37ab(0x11a)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x898c8c){const _0x5aaed7=a34_0x2c37ab;return[..._0x898c8c][_0x5aaed7(0x100)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x433c62){const _0x3973ec=a34_0x2c37ab;return TOP_LEVEL_CONFIG_KEYS[_0x3973ec(0x104)](_0x433c62);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x398a56=a34_0x2c37ab;return _0x398a56(0xf9)+getTopLevelConfigKeySummary()+')';}function a34_0x2e11(_0x2f5068,_0x292177){_0x2f5068=_0x2f5068-0xf4;const _0x68e465=a34_0x68e4();let _0x2e1109=_0x68e465[_0x2f5068];return _0x2e1109;}export const APP_PROFILE_FLAG_KEY_MAP={'env':a34_0x2c37ab(0x111),'apiDir':a34_0x2c37ab(0x11a),'cookie':a34_0x2c37ab(0x11b),'accessKey':'accessKey','defaultFormat':'format','pageSize':a34_0x2c37ab(0xf5),'riskLevel':'riskLevel','locale':a34_0x2c37ab(0x114)};export function getAppProfileFlagDefs(){const _0x2fb58b=a34_0x2c37ab;return[{'name':_0x2fb58b(0x111),'type':'string','description':'Target\x20environment','enum':[...RABETBASE_ENV_VALUES]},{'name':_0x2fb58b(0x11a),'type':'string','description':_0x2fb58b(0xf6)},{'name':_0x2fb58b(0x11b),'type':_0x2fb58b(0x113),'description':_0x2fb58b(0x117),'hidden':!![]},{'name':_0x2fb58b(0x102),'type':_0x2fb58b(0x113),'description':'Access\x20key','hidden':!![]},{'name':_0x2fb58b(0x110),'type':'string','description':_0x2fb58b(0x106),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':'pageSize','type':_0x2fb58b(0x116),'description':_0x2fb58b(0x112)},{'name':_0x2fb58b(0x105),'type':_0x2fb58b(0x113),'description':_0x2fb58b(0x10a),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x2fb58b(0x114),'type':'string','description':_0x2fb58b(0x10c)}];}export function collectAppProfileOverrides(_0x21214e){const _0x3ee753=a34_0x2c37ab,_0x5d988b={};for(const [_0x2d9b1a,_0x3bdbe8]of Object['entries'](APP_PROFILE_FLAG_KEY_MAP)){const _0x410012=_0x21214e(_0x2d9b1a);if(!_0x410012)continue;_0x5d988b[_0x3bdbe8]=_0x3bdbe8===_0x3ee753(0xf5)?Number(_0x410012):_0x410012;}return _0x5d988b;}export function buildAppProfileListFields(_0x1eb13c){const _0x5da990=a34_0x2c37ab;return{'env':_0x1eb13c[_0x5da990(0x111)]??null,'apiDir':_0x1eb13c['apiDir']??null,'hasCookie':!!_0x1eb13c[_0x5da990(0x11b)],'hasAccessKey':!!_0x1eb13c[_0x5da990(0x102)],'format':_0x1eb13c[_0x5da990(0xfe)]??null,'pageSize':_0x1eb13c[_0x5da990(0xf5)]??null,'riskLevel':_0x1eb13c['riskLevel']??null,'locale':_0x1eb13c[_0x5da990(0x114)]??null};}export function buildAppDoctorFields(_0x4fb030,_0x4cdf38){const _0x567a09=a34_0x2c37ab;return{'env':{'value':_0x4fb030['env']||_0x4cdf38['env'],'source':_0x4fb030['env']?'app':_0x567a09(0xfd)},'apiDir':{'value':_0x4fb030[_0x567a09(0x11a)]||_0x4cdf38[_0x567a09(0x11a)],'source':_0x4fb030[_0x567a09(0x11a)]?'app':_0x567a09(0xfd)},'cookie':{'value':_0x4fb030['cookie']||_0x4cdf38[_0x567a09(0x11b)],'source':_0x4fb030['cookie']?_0x567a09(0x103):_0x567a09(0xfd)},'accessKey':{'value':_0x4fb030['accessKey']||_0x4cdf38['accessKey'],'source':_0x4fb030['accessKey']?'app':_0x567a09(0xfd)}};}export function buildCanonicalAppConfig(_0x1f74cc,_0x29d613){const _0x114645=a34_0x2c37ab,_0x3274f2=_0x1f74cc[_0x114645(0x118)](_0x46d64a=>String(_0x46d64a||'')[_0x114645(0xf8)]())[_0x114645(0x10d)](Boolean);if(_0x3274f2[_0x114645(0xfb)]===0x0)return{};const _0x4021fe={};for(const _0x3fe6f7 of _0x3274f2){_0x4021fe[_0x3fe6f7]=_0x29d613?{'appcode':_0x3fe6f7,'env':_0x29d613}:{'appcode':_0x3fe6f7};}return{'apps':_0x4021fe,'defaultApp':_0x3274f2[0x0]};}function a34_0x68e4(){const _0x38a007=['trim','Config\x20key\x20(','en-US','length','12371611ilkUau','inherit','format','4570974DLizds','join','8332rgOVFu','accessKey','app','has','riskLevel','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','keys','defaultApp','45210584nEONLQ','Risk\x20level','zh-CN','Locale','filter','apps','2880506QIiIdk','defaultFormat','env','Default\x20page\x20size','string','locale','1478408kKpbkR','number','Auth\x20cookie','map','appcode','apiDir','cookie','7704010JZbyMS','pageSize','API\x20directory\x20path','930OFpupa'];a34_0x68e4=function(){return _0x38a007;};return a34_0x68e4();}export function buildCanonicalProjectConfig(_0x42feeb,_0x4a9c56){const _0x1a74f0=a34_0x2c37ab,{appCodes:appCodes=[],env:_0x3be6b5,metadata:_0x55bf27}=_0x4a9c56,_0x26f876={..._0x42feeb,..._0x55bf27||{}};delete _0x26f876[_0x1a74f0(0x119)],delete _0x26f876['app'];if(_0x3be6b5)_0x26f876['env']=_0x3be6b5;else!_0x26f876[_0x1a74f0(0x111)]&&(_0x26f876['env']=DEFAULT_CONFIG_VALUES[_0x1a74f0(0x111)]);const _0x3bd986=buildCanonicalAppConfig(appCodes,_0x26f876[_0x1a74f0(0x111)]);return Object[_0x1a74f0(0x107)](_0x3bd986)[_0x1a74f0(0xfb)]>0x0&&(_0x26f876[_0x1a74f0(0x10e)]=_0x3bd986[_0x1a74f0(0x10e)],_0x26f876[_0x1a74f0(0x108)]=_0x3bd986['defaultApp']),_0x26f876;}const LOCALE_MAP={'zh':a34_0x2c37ab(0x10b),'zh-cn':a34_0x2c37ab(0x10b),'zh_cn':a34_0x2c37ab(0x10b),'en':a34_0x2c37ab(0xfa),'en-us':a34_0x2c37ab(0xfa),'en_us':a34_0x2c37ab(0xfa)};export function normalizeLocale(_0x86620){if(!_0x86620)return null;return LOCALE_MAP[_0x86620['toLowerCase']()]??null;}
@@ -1 +1 @@
1
- const a56_0x200e0b=a56_0x2626;(function(_0x3d6d47,_0x3d4e4b){const _0x181d33=a56_0x2626,_0x4e0888=_0x3d6d47();while(!![]){try{const _0x4379f1=parseInt(_0x181d33(0x229))/0x1+-parseInt(_0x181d33(0x236))/0x2*(parseInt(_0x181d33(0x22a))/0x3)+parseInt(_0x181d33(0x21a))/0x4+-parseInt(_0x181d33(0x232))/0x5*(parseInt(_0x181d33(0x1f1))/0x6)+parseInt(_0x181d33(0x1f3))/0x7+parseInt(_0x181d33(0x1f8))/0x8+-parseInt(_0x181d33(0x22d))/0x9;if(_0x4379f1===_0x3d4e4b)break;else _0x4e0888['push'](_0x4e0888['shift']());}catch(_0x3aa02d){_0x4e0888['push'](_0x4e0888['shift']());}}}(a56_0x598d,0xb3c75));export const CLI_BIN_NAME='rabetbase';function a56_0x2626(_0x5d4a9f,_0x5d62cc){_0x5d4a9f=_0x5d4a9f-0x1f0;const _0x598d81=a56_0x598d();let _0x2626eb=_0x598d81[_0x5d4a9f];return _0x2626eb;}export const CLI_DISPLAY_NAME=a56_0x200e0b(0x1f9);export const NPM_PACKAGE_NAME=a56_0x200e0b(0x23e);export const GLOBAL_FLAGS=[{'name':a56_0x200e0b(0x223),'meowKey':a56_0x200e0b(0x223),'type':'string','description':'Override\x20appcode','hint':a56_0x200e0b(0x24a)},{'name':a56_0x200e0b(0x200),'meowKey':a56_0x200e0b(0x200),'type':a56_0x200e0b(0x218),'description':a56_0x200e0b(0x209),'hint':a56_0x200e0b(0x21b)},{'name':'env','meowKey':a56_0x200e0b(0x233),'type':a56_0x200e0b(0x218),'description':a56_0x200e0b(0x224),'hint':'production\x20|\x20daily'},{'name':a56_0x200e0b(0x205),'meowKey':a56_0x200e0b(0x205),'type':a56_0x200e0b(0x218),'description':a56_0x200e0b(0x1f7),'hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':a56_0x200e0b(0x218),'description':a56_0x200e0b(0x20a),'hint':a56_0x200e0b(0x249)},{'name':'dry-run','meowKey':a56_0x200e0b(0x225),'type':a56_0x200e0b(0x1fe),'description':a56_0x200e0b(0x22f)},{'name':a56_0x200e0b(0x202),'meowKey':a56_0x200e0b(0x202),'type':a56_0x200e0b(0x1fe),'description':a56_0x200e0b(0x21f)},{'name':'non-interactive','meowKey':a56_0x200e0b(0x1fd),'type':'boolean','description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':a56_0x200e0b(0x208),'meowKey':a56_0x200e0b(0x208),'type':a56_0x200e0b(0x1fe),'description':'Use\x20global\x20config\x20scope'},{'name':a56_0x200e0b(0x239),'meowKey':a56_0x200e0b(0x239),'type':a56_0x200e0b(0x1fe),'description':a56_0x200e0b(0x203)},{'name':'ci','meowKey':'ci','type':a56_0x200e0b(0x1fe),'description':a56_0x200e0b(0x23c),'hidden':!![]},{'name':a56_0x200e0b(0x23f),'meowKey':a56_0x200e0b(0x23f),'type':a56_0x200e0b(0x1fe),'description':a56_0x200e0b(0x240)},{'name':'name','meowKey':a56_0x200e0b(0x21c),'type':a56_0x200e0b(0x218),'description':a56_0x200e0b(0x231),'hidden':!![]},{'name':a56_0x200e0b(0x238),'meowKey':a56_0x200e0b(0x238),'type':'boolean','description':a56_0x200e0b(0x219),'hidden':!![]},{'name':'watch','meowKey':a56_0x200e0b(0x244),'type':a56_0x200e0b(0x1fe),'description':a56_0x200e0b(0x1f6),'hidden':!![]},{'name':a56_0x200e0b(0x245),'meowKey':a56_0x200e0b(0x245),'type':'string','description':a56_0x200e0b(0x1fc),'hidden':!![]},{'name':a56_0x200e0b(0x216),'meowKey':a56_0x200e0b(0x216),'type':a56_0x200e0b(0x218),'description':a56_0x200e0b(0x215),'hidden':!![]},{'name':a56_0x200e0b(0x241),'meowKey':a56_0x200e0b(0x241),'type':a56_0x200e0b(0x218),'description':a56_0x200e0b(0x24d),'hidden':!![]},{'name':'all','meowKey':'all','type':a56_0x200e0b(0x1fe),'description':a56_0x200e0b(0x22c),'hidden':!![]},{'name':a56_0x200e0b(0x22b),'meowKey':a56_0x200e0b(0x23b),'type':a56_0x200e0b(0x1fe),'description':a56_0x200e0b(0x217),'hidden':!![]},{'name':'id','meowKey':'id','type':a56_0x200e0b(0x218),'description':a56_0x200e0b(0x1fa),'hidden':!![]},{'name':a56_0x200e0b(0x234),'meowKey':'type','type':a56_0x200e0b(0x218),'description':a56_0x200e0b(0x237),'hidden':!![]},{'name':a56_0x200e0b(0x20f),'meowKey':a56_0x200e0b(0x20f),'type':a56_0x200e0b(0x218),'description':a56_0x200e0b(0x1f5),'hidden':!![]},{'name':a56_0x200e0b(0x24c),'meowKey':a56_0x200e0b(0x24c),'type':a56_0x200e0b(0x218),'description':a56_0x200e0b(0x246),'hidden':!![]},{'name':a56_0x200e0b(0x207),'meowKey':a56_0x200e0b(0x207),'type':a56_0x200e0b(0x218),'description':'SQL\x20name','hidden':!![]},{'name':a56_0x200e0b(0x220),'meowKey':a56_0x200e0b(0x220),'type':'string','description':a56_0x200e0b(0x227),'hidden':!![]},{'name':a56_0x200e0b(0x21d),'meowKey':a56_0x200e0b(0x21d),'type':'string','description':a56_0x200e0b(0x247),'hidden':!![]},{'name':a56_0x200e0b(0x20b),'meowKey':a56_0x200e0b(0x20b),'type':'string','description':a56_0x200e0b(0x1f2),'hidden':!![]},{'name':a56_0x200e0b(0x235),'meowKey':'pagesize','type':a56_0x200e0b(0x218),'description':a56_0x200e0b(0x210),'hidden':!![]},{'name':a56_0x200e0b(0x20d),'meowKey':a56_0x200e0b(0x20d),'type':a56_0x200e0b(0x218),'description':a56_0x200e0b(0x1f0),'hidden':!![]},{'name':a56_0x200e0b(0x201),'meowKey':a56_0x200e0b(0x201),'type':a56_0x200e0b(0x218),'description':'Code\x20filter','hidden':!![]},{'name':a56_0x200e0b(0x24e),'meowKey':a56_0x200e0b(0x24e),'type':a56_0x200e0b(0x218),'description':a56_0x200e0b(0x20e),'hidden':!![]},{'name':'schemas','meowKey':a56_0x200e0b(0x242),'type':a56_0x200e0b(0x218),'description':a56_0x200e0b(0x228),'hidden':!![]},{'name':a56_0x200e0b(0x214),'meowKey':a56_0x200e0b(0x214),'type':a56_0x200e0b(0x218),'description':a56_0x200e0b(0x212),'hidden':!![]},{'name':a56_0x200e0b(0x204),'meowKey':a56_0x200e0b(0x204),'type':a56_0x200e0b(0x218),'description':a56_0x200e0b(0x23a),'hidden':!![]},{'name':'skip-imports','meowKey':'skipImports','type':'boolean','description':a56_0x200e0b(0x221),'hidden':!![]},{'name':a56_0x200e0b(0x20c),'meowKey':a56_0x200e0b(0x20c),'type':'string','description':'Config\x20key','hidden':!![]},{'name':a56_0x200e0b(0x243),'meowKey':'value','type':a56_0x200e0b(0x218),'description':'Config\x20value','hidden':!![]},{'name':'force','meowKey':a56_0x200e0b(0x1fb),'type':a56_0x200e0b(0x1fe),'description':a56_0x200e0b(0x24b),'hidden':!![]},{'name':a56_0x200e0b(0x206),'meowKey':a56_0x200e0b(0x206),'type':a56_0x200e0b(0x1fe),'description':a56_0x200e0b(0x23d),'hidden':!![]},{'name':a56_0x200e0b(0x248),'meowKey':a56_0x200e0b(0x248),'type':a56_0x200e0b(0x1fe),'description':a56_0x200e0b(0x230),'hidden':!![]},{'name':a56_0x200e0b(0x222),'meowKey':a56_0x200e0b(0x211),'type':a56_0x200e0b(0x218),'description':a56_0x200e0b(0x212),'hidden':!![]},{'name':a56_0x200e0b(0x1f4),'meowKey':a56_0x200e0b(0x213),'type':a56_0x200e0b(0x218),'description':a56_0x200e0b(0x1ff),'hidden':!![]}];function a56_0x598d(){const _0x54a08f=['enable-bff-save','Apply\x20to\x20all','2735433zyJgtp','non-interactive','Preview\x20operation\x20without\x20executing','Verbose\x20output','Name','2163295KwhxqX','env','type','pagesize','2LGrsJc','Type\x20filter','clear','project','Target\x20path','enableBffSave','Alias\x20for\x20--non-interactive','Use\x20remote','@lovrabet/rabetbase-cli','help','Show\x20help','datasetcode','schemas','value','watch','output','SQL\x20code','Description','verbose','<expr>','<code>','Force\x20overwrite','sqlcode','Dataset\x20code','sql','Keyword\x20filter','6ctpBZn','Page\x20number','135716TnQttO','function-node','File\x20path','Watch\x20mode','Output\x20format','3921096ikvChl','Rabetbase\x20CLI','Record\x20ID','force','Output\x20path','nonInteractive','boolean','Function\x20node','app','code','yes','Use\x20project\x20config\x20scope','target','format','remote','sqlname','global','Select\x20app\x20profile\x20by\x20name','Filter\x20JSON\x20output\x20(bundled\x20jq\x20via\x20node-jq,\x20else\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','page','key','keyword','SQL\x20string','file','Page\x20size','operationType','Operation\x20type','functionNode','operation','JSON\x20params','params','Enable\x20BFF\x20save','string','Clear','1326196xzhKId','<name>','name','description','meowKey','Skip\x20confirmation\x20for\x20high-risk\x20writes','dbid','Skip\x20import\x20generation','operation-type','appcode','Environment','dryRun','dry-run','DB\x20ID','Schemas','1305416ckElIW','2020563cQainh'];a56_0x598d=function(){return _0x54a08f;};return a56_0x598d();}export const PIPELINE_FLAG_NAMES=new Set([a56_0x200e0b(0x223),a56_0x200e0b(0x200),'env',a56_0x200e0b(0x205),'jq',a56_0x200e0b(0x226),'yes',a56_0x200e0b(0x22e),'ci']);export function buildMeowFlags(){const _0x605c3e=a56_0x200e0b;return Object['fromEntries'](GLOBAL_FLAGS['map'](_0x5c91d7=>[_0x5c91d7[_0x605c3e(0x21e)],{'type':_0x5c91d7[_0x605c3e(0x234)]}]));}
1
+ const a56_0x50508a=a56_0x36fc;function a56_0xa18f(){const _0xd3963a=['schemas','Code\x20filter','code','appcode','all','Clear','62736wVRpSv','value','Schemas','Verbose\x20output','DB\x20ID','env','functionNode','4083MQQgld','Override\x20appcode','operation','Alias\x20for\x20--non-interactive','dbid','key','3300gPoiIm','production\x20|\x20daily','Use\x20project\x20config\x20scope','Filter\x20JSON\x20output\x20(bundled\x20jq\x20via\x20node-jq,\x20else\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','target','function-node','description','Enable\x20BFF\x20save','keyword','Output\x20format','verbose','project','@lovrabet/rabetbase-cli','Operation\x20type','Record\x20ID','Show\x20help','Page\x20size','clear','meowKey','Apply\x20to\x20all','Description','40wmXcTs','Page\x20number','22391310XOhHkt','File\x20path','JSON\x20params','force','655173vlDnkE','Config\x20key','Select\x20app\x20profile\x20by\x20name','format','dryRun','yes','page','type','734peAYSu','json\x20|\x20pretty\x20|\x20compress','5575cRYPfV','string','global','datasetcode','output','nonInteractive','6587420XLAUmt','Dataset\x20code','remote','params','4547574ZGphWX','pagesize','rabetbase','Target\x20path','SQL\x20name','<expr>','sql','file','app','non-interactive','name','Config\x20value','Skip\x20confirmation\x20for\x20high-risk\x20writes','SQL\x20code','Use\x20remote','Type\x20filter','Keyword\x20filter','watch','dry-run','Force\x20overwrite','sqlcode','skipImports','help','operation-type','boolean','operationType','Output\x20path'];a56_0xa18f=function(){return _0xd3963a;};return a56_0xa18f();}(function(_0x48b6cc,_0x333e18){const _0x61a610=a56_0x36fc,_0x3ee171=_0x48b6cc();while(!![]){try{const _0x3bd90d=parseInt(_0x61a610(0x248))/0x1+parseInt(_0x61a610(0x21b))/0x2*(parseInt(_0x61a610(0x24f))/0x3)+-parseInt(_0x61a610(0x1f8))/0x4*(parseInt(_0x61a610(0x21d))/0x5)+-parseInt(_0x61a610(0x227))/0x6+-parseInt(_0x61a610(0x223))/0x7+-parseInt(_0x61a610(0x20d))/0x8*(-parseInt(_0x61a610(0x213))/0x9)+parseInt(_0x61a610(0x20f))/0xa;if(_0x3bd90d===_0x333e18)break;else _0x3ee171['push'](_0x3ee171['shift']());}catch(_0x51f2b8){_0x3ee171['push'](_0x3ee171['shift']());}}}(a56_0xa18f,0x856ab));export const CLI_BIN_NAME=a56_0x50508a(0x229);function a56_0x36fc(_0x28fcf6,_0x3800b2){_0x28fcf6=_0x28fcf6-0x1f3;const _0xa18f27=a56_0xa18f();let _0x36fc1c=_0xa18f27[_0x28fcf6];return _0x36fc1c;}export const CLI_DISPLAY_NAME='Rabetbase\x20CLI';export const NPM_PACKAGE_NAME=a56_0x50508a(0x204);export const GLOBAL_FLAGS=[{'name':a56_0x50508a(0x245),'meowKey':a56_0x50508a(0x245),'type':a56_0x50508a(0x21e),'description':a56_0x50508a(0x1f3),'hint':'<code>'},{'name':a56_0x50508a(0x22f),'meowKey':a56_0x50508a(0x22f),'type':a56_0x50508a(0x21e),'description':a56_0x50508a(0x215),'hint':'<name>'},{'name':'env','meowKey':a56_0x50508a(0x24d),'type':a56_0x50508a(0x21e),'description':'Environment','hint':a56_0x50508a(0x1f9)},{'name':a56_0x50508a(0x216),'meowKey':a56_0x50508a(0x216),'type':a56_0x50508a(0x21e),'description':a56_0x50508a(0x201),'hint':a56_0x50508a(0x21c)},{'name':'jq','meowKey':'jq','type':a56_0x50508a(0x21e),'description':a56_0x50508a(0x1fb),'hint':a56_0x50508a(0x22c)},{'name':a56_0x50508a(0x239),'meowKey':a56_0x50508a(0x217),'type':a56_0x50508a(0x23f),'description':'Preview\x20operation\x20without\x20executing'},{'name':a56_0x50508a(0x218),'meowKey':a56_0x50508a(0x218),'type':'boolean','description':a56_0x50508a(0x233)},{'name':a56_0x50508a(0x230),'meowKey':a56_0x50508a(0x222),'type':a56_0x50508a(0x23f),'description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':a56_0x50508a(0x21f),'meowKey':a56_0x50508a(0x21f),'type':'boolean','description':'Use\x20global\x20config\x20scope'},{'name':'project','meowKey':a56_0x50508a(0x203),'type':a56_0x50508a(0x23f),'description':a56_0x50508a(0x1fa)},{'name':'ci','meowKey':'ci','type':a56_0x50508a(0x23f),'description':a56_0x50508a(0x1f5),'hidden':!![]},{'name':a56_0x50508a(0x23d),'meowKey':a56_0x50508a(0x23d),'type':'boolean','description':a56_0x50508a(0x207)},{'name':'name','meowKey':a56_0x50508a(0x231),'type':a56_0x50508a(0x21e),'description':'Name','hidden':!![]},{'name':a56_0x50508a(0x209),'meowKey':a56_0x50508a(0x209),'type':a56_0x50508a(0x23f),'description':a56_0x50508a(0x247),'hidden':!![]},{'name':a56_0x50508a(0x238),'meowKey':'watch','type':a56_0x50508a(0x23f),'description':'Watch\x20mode','hidden':!![]},{'name':a56_0x50508a(0x221),'meowKey':a56_0x50508a(0x221),'type':a56_0x50508a(0x21e),'description':a56_0x50508a(0x241),'hidden':!![]},{'name':a56_0x50508a(0x226),'meowKey':a56_0x50508a(0x226),'type':a56_0x50508a(0x21e),'description':a56_0x50508a(0x211),'hidden':!![]},{'name':a56_0x50508a(0x220),'meowKey':a56_0x50508a(0x220),'type':a56_0x50508a(0x21e),'description':a56_0x50508a(0x224),'hidden':!![]},{'name':a56_0x50508a(0x246),'meowKey':a56_0x50508a(0x246),'type':a56_0x50508a(0x23f),'description':a56_0x50508a(0x20b),'hidden':!![]},{'name':'enable-bff-save','meowKey':'enableBffSave','type':a56_0x50508a(0x23f),'description':a56_0x50508a(0x1ff),'hidden':!![]},{'name':'id','meowKey':'id','type':a56_0x50508a(0x21e),'description':a56_0x50508a(0x206),'hidden':!![]},{'name':'type','meowKey':a56_0x50508a(0x21a),'type':a56_0x50508a(0x21e),'description':a56_0x50508a(0x236),'hidden':!![]},{'name':a56_0x50508a(0x22e),'meowKey':a56_0x50508a(0x22e),'type':a56_0x50508a(0x21e),'description':a56_0x50508a(0x210),'hidden':!![]},{'name':a56_0x50508a(0x23b),'meowKey':a56_0x50508a(0x23b),'type':a56_0x50508a(0x21e),'description':a56_0x50508a(0x234),'hidden':!![]},{'name':'sqlname','meowKey':'sqlname','type':a56_0x50508a(0x21e),'description':a56_0x50508a(0x22b),'hidden':!![]},{'name':a56_0x50508a(0x1f6),'meowKey':'dbid','type':a56_0x50508a(0x21e),'description':a56_0x50508a(0x24c),'hidden':!![]},{'name':'description','meowKey':a56_0x50508a(0x1fe),'type':a56_0x50508a(0x21e),'description':a56_0x50508a(0x20c),'hidden':!![]},{'name':a56_0x50508a(0x219),'meowKey':a56_0x50508a(0x219),'type':a56_0x50508a(0x21e),'description':a56_0x50508a(0x20e),'hidden':!![]},{'name':a56_0x50508a(0x228),'meowKey':a56_0x50508a(0x228),'type':'string','description':a56_0x50508a(0x208),'hidden':!![]},{'name':a56_0x50508a(0x200),'meowKey':'keyword','type':a56_0x50508a(0x21e),'description':a56_0x50508a(0x237),'hidden':!![]},{'name':a56_0x50508a(0x244),'meowKey':'code','type':a56_0x50508a(0x21e),'description':a56_0x50508a(0x243),'hidden':!![]},{'name':a56_0x50508a(0x22d),'meowKey':'sql','type':a56_0x50508a(0x21e),'description':'SQL\x20string','hidden':!![]},{'name':a56_0x50508a(0x242),'meowKey':a56_0x50508a(0x242),'type':a56_0x50508a(0x21e),'description':a56_0x50508a(0x24a),'hidden':!![]},{'name':a56_0x50508a(0x1f4),'meowKey':a56_0x50508a(0x1f4),'type':'string','description':a56_0x50508a(0x205),'hidden':!![]},{'name':a56_0x50508a(0x1fc),'meowKey':a56_0x50508a(0x1fc),'type':'string','description':a56_0x50508a(0x22a),'hidden':!![]},{'name':'skip-imports','meowKey':a56_0x50508a(0x23c),'type':a56_0x50508a(0x23f),'description':'Skip\x20import\x20generation','hidden':!![]},{'name':a56_0x50508a(0x1f7),'meowKey':a56_0x50508a(0x1f7),'type':'string','description':a56_0x50508a(0x214),'hidden':!![]},{'name':a56_0x50508a(0x249),'meowKey':a56_0x50508a(0x249),'type':a56_0x50508a(0x21e),'description':a56_0x50508a(0x232),'hidden':!![]},{'name':a56_0x50508a(0x212),'meowKey':a56_0x50508a(0x212),'type':a56_0x50508a(0x23f),'description':a56_0x50508a(0x23a),'hidden':!![]},{'name':a56_0x50508a(0x225),'meowKey':'remote','type':a56_0x50508a(0x23f),'description':a56_0x50508a(0x235),'hidden':!![]},{'name':a56_0x50508a(0x202),'meowKey':'verbose','type':a56_0x50508a(0x23f),'description':a56_0x50508a(0x24b),'hidden':!![]},{'name':a56_0x50508a(0x23e),'meowKey':a56_0x50508a(0x240),'type':a56_0x50508a(0x21e),'description':a56_0x50508a(0x205),'hidden':!![]},{'name':a56_0x50508a(0x1fd),'meowKey':a56_0x50508a(0x24e),'type':a56_0x50508a(0x21e),'description':'Function\x20node','hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a56_0x50508a(0x245),'app','env',a56_0x50508a(0x216),'jq',a56_0x50508a(0x239),a56_0x50508a(0x218),a56_0x50508a(0x230),'ci']);export function buildMeowFlags(){const _0x350186=a56_0x50508a;return Object['fromEntries'](GLOBAL_FLAGS['map'](_0x3e1bc3=>[_0x3e1bc3[_0x350186(0x20a)],{'type':_0x3e1bc3[_0x350186(0x21a)]}]));}
@@ -1 +1 @@
1
- const a51_0xd8c721=a51_0x1268;(function(_0x23e891,_0x1413a9){const _0x16ac6e=a51_0x1268,_0x5965eb=_0x23e891();while(!![]){try{const _0x570309=-parseInt(_0x16ac6e(0xa7))/0x1*(parseInt(_0x16ac6e(0xa6))/0x2)+parseInt(_0x16ac6e(0xa5))/0x3*(-parseInt(_0x16ac6e(0xa3))/0x4)+parseInt(_0x16ac6e(0x9f))/0x5*(-parseInt(_0x16ac6e(0xa2))/0x6)+-parseInt(_0x16ac6e(0xab))/0x7+-parseInt(_0x16ac6e(0xa8))/0x8+parseInt(_0x16ac6e(0xa1))/0x9+parseInt(_0x16ac6e(0xa4))/0xa;if(_0x570309===_0x1413a9)break;else _0x5965eb['push'](_0x5965eb['shift']());}catch(_0x5a8468){_0x5965eb['push'](_0x5965eb['shift']());}}}(a51_0xbc6d,0xd08bb));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a51_0xd8c721(0xa0),'format':a51_0xd8c721(0xa9),'locale':'en-US','riskLevel':a51_0xd8c721(0xaa),'apiDir':DEFAULT_API_DIR};function a51_0xbc6d(){const _0xe2b0ff=['3fadUSi','146mRiRYF','22783stGxlS','5071032QfbINn','compress','high-risk-write','8849183UlDEvN','2550850uROFbn','production','465939YnwHoT','18cTBsQv','4661752oHapzO','70595870kjBmYV'];a51_0xbc6d=function(){return _0xe2b0ff;};return a51_0xbc6d();}function a51_0x1268(_0x3d2838,_0x2b6e77){_0x3d2838=_0x3d2838-0x9f;const _0xbc6de0=a51_0xbc6d();let _0x1268b8=_0xbc6de0[_0x3d2838];return _0x1268b8;}export const DEFAULT_COMMAND_OUTPUT_FORMAT=a51_0xd8c721(0xa9);
1
+ const a51_0x3b5075=a51_0x1de9;(function(_0xb6d619,_0x3d5111){const _0xcc4804=a51_0x1de9,_0x3a3f58=_0xb6d619();while(!![]){try{const _0x5788cc=parseInt(_0xcc4804(0x125))/0x1+-parseInt(_0xcc4804(0x128))/0x2*(-parseInt(_0xcc4804(0x126))/0x3)+-parseInt(_0xcc4804(0x127))/0x4+parseInt(_0xcc4804(0x12c))/0x5*(-parseInt(_0xcc4804(0x12b))/0x6)+parseInt(_0xcc4804(0x124))/0x7+-parseInt(_0xcc4804(0x12e))/0x8*(parseInt(_0xcc4804(0x123))/0x9)+parseInt(_0xcc4804(0x122))/0xa;if(_0x5788cc===_0x3d5111)break;else _0x3a3f58['push'](_0x3a3f58['shift']());}catch(_0x536b28){_0x3a3f58['push'](_0x3a3f58['shift']());}}}(a51_0x37e1,0xe93b3));import{DEFAULT_API_DIR}from'../constant/paths.js';function a51_0x1de9(_0x408527,_0x3cce35){_0x408527=_0x408527-0x122;const _0x37e16b=a51_0x37e1();let _0x1de993=_0x37e16b[_0x408527];return _0x1de993;}export const DEFAULT_CONFIG_VALUES={'env':'production','format':a51_0x3b5075(0x129),'locale':a51_0x3b5075(0x12d),'riskLevel':a51_0x3b5075(0x12a),'apiDir':DEFAULT_API_DIR};function a51_0x37e1(){const _0x16c136=['en-US','34248VcvXcN','9727540VRrWvQ','2169kuAAsO','6793192xbLuup','1369504qWfypT','2292QzThkW','4815348lprAAw','4486KClOgL','compress','high-risk-write','11012958TmSQCp','5VnpIiL'];a51_0x37e1=function(){return _0x16c136;};return a51_0x37e1();}export const DEFAULT_COMMAND_OUTPUT_FORMAT=a51_0x3b5075(0x129);
@@ -1 +1 @@
1
- function a50_0x465e(_0x563756,_0x30ebfa){_0x563756=_0x563756-0x7a;const _0x38af83=a50_0x38af();let _0x465e90=_0x38af83[_0x563756];return _0x465e90;}const a50_0xd57666=a50_0x465e;(function(_0x4d5003,_0x407d8a){const _0x20e937=a50_0x465e,_0x1207c2=_0x4d5003();while(!![]){try{const _0x4539fb=parseInt(_0x20e937(0x81))/0x1*(parseInt(_0x20e937(0x7c))/0x2)+-parseInt(_0x20e937(0x7f))/0x3*(-parseInt(_0x20e937(0x7d))/0x4)+-parseInt(_0x20e937(0x84))/0x5*(parseInt(_0x20e937(0x7b))/0x6)+-parseInt(_0x20e937(0x80))/0x7+parseInt(_0x20e937(0x86))/0x8+-parseInt(_0x20e937(0x87))/0x9*(parseInt(_0x20e937(0x83))/0xa)+parseInt(_0x20e937(0x85))/0xb;if(_0x4539fb===_0x407d8a)break;else _0x1207c2['push'](_0x1207c2['shift']());}catch(_0x516273){_0x1207c2['push'](_0x1207c2['shift']());}}}(a50_0x38af,0x3bbeb));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x5e3753){const _0x2ae85e=a50_0x465e;customApiDomain=_0x5e3753?.[_0x2ae85e(0x88)],customUserDomain=_0x5e3753?.[_0x2ae85e(0x82)],customRuntimeDomain=_0x5e3753?.[_0x2ae85e(0x7a)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?'https://user.lovrabet.com':'https://user-daily.lovrabet.com');function a50_0x38af(){const _0x979026=['6880995GstyTX','2456872uIMVyS','3426750gPXKmb','apiDomain','runtimeDomain','246GMdCXU','8qbXnBo','32972ljWavu','https://api.lovrabet.com','24jSLLtD','3029544DVqgbS','41862BBLhWu','userDomain','10FPlxuV','13145jGscEW'];a50_0x38af=function(){return _0x979026;};return a50_0x38af();}export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a50_0xd57666(0x7e):'https://daily-api.lovrabet.com');export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?'https://runtime.lovrabet.com':'https://daily-runtime.lovrabet.com');
1
+ const a50_0x8dd587=a50_0x1774;function a50_0x1774(_0x59005d,_0xe5482b){_0x59005d=_0x59005d-0xf4;const _0x1e5428=a50_0x1e54();let _0x177473=_0x1e5428[_0x59005d];return _0x177473;}(function(_0x48342f,_0x50c058){const _0x394235=a50_0x1774,_0x4935eb=_0x48342f();while(!![]){try{const _0x34d4b4=parseInt(_0x394235(0x102))/0x1*(parseInt(_0x394235(0xf7))/0x2)+parseInt(_0x394235(0xf9))/0x3+-parseInt(_0x394235(0xfb))/0x4*(-parseInt(_0x394235(0xfa))/0x5)+-parseInt(_0x394235(0xff))/0x6+parseInt(_0x394235(0xf4))/0x7+parseInt(_0x394235(0xfd))/0x8*(-parseInt(_0x394235(0x101))/0x9)+-parseInt(_0x394235(0x100))/0xa;if(_0x34d4b4===_0x50c058)break;else _0x4935eb['push'](_0x4935eb['shift']());}catch(_0x53c206){_0x4935eb['push'](_0x4935eb['shift']());}}}(a50_0x1e54,0xc20cc));function a50_0x1e54(){const _0x506f30=['12813840DnPMoc','50832NyhjPx','93063LWyfcR','1902075wQXpAe','https://user.lovrabet.com','https://api.lovrabet.com','16ZgZgfF','https://runtime.lovrabet.com','4386129xBUcDd','675625jpercQ','44oMPztq','https://daily-runtime.lovrabet.com','1256qBMzVM','https://user-daily.lovrabet.com','6010194IMEovy'];a50_0x1e54=function(){return _0x506f30;};return a50_0x1e54();}import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x2a2f79){customApiDomain=_0x2a2f79?.['apiDomain'],customUserDomain=_0x2a2f79?.['userDomain'],customRuntimeDomain=_0x2a2f79?.['runtimeDomain'];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a50_0x8dd587(0xf5):a50_0x8dd587(0xfe));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a50_0x8dd587(0xf6):'https://daily-api.lovrabet.com');export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a50_0x8dd587(0xf8):a50_0x8dd587(0xfc));
@@ -1 +1 @@
1
- const a54_0x4aeecf=a54_0x3634;(function(_0x5d7444,_0x1987ab){const _0x162900=a54_0x3634,_0x13966d=_0x5d7444();while(!![]){try{const _0x34ebf3=parseInt(_0x162900(0x188))/0x1+-parseInt(_0x162900(0x180))/0x2*(-parseInt(_0x162900(0x18c))/0x3)+parseInt(_0x162900(0x187))/0x4*(parseInt(_0x162900(0x186))/0x5)+parseInt(_0x162900(0x18e))/0x6+parseInt(_0x162900(0x181))/0x7*(parseInt(_0x162900(0x18b))/0x8)+parseInt(_0x162900(0x185))/0x9+parseInt(_0x162900(0x184))/0xa*(-parseInt(_0x162900(0x183))/0xb);if(_0x34ebf3===_0x1987ab)break;else _0x13966d['push'](_0x13966d['shift']());}catch(_0x588694){_0x13966d['push'](_0x13966d['shift']());}}}(a54_0x20ef,0xa980e));export const RABETBASE_ENV_VALUES=[a54_0x4aeecf(0x189),'daily'];export function normalizeEnv(_0x21c6f5){const _0x2a82f0=a54_0x4aeecf;return _0x21c6f5===_0x2a82f0(0x18d)?_0x2a82f0(0x189):_0x21c6f5;}function a54_0x3634(_0x40eeef,_0x147d64){_0x40eeef=_0x40eeef-0x180;const _0x20ef6b=a54_0x20ef();let _0x363443=_0x20ef6b[_0x40eeef];return _0x363443;}export function isProduction(_0x3a79fd){const _0x2fc5a2=a54_0x4aeecf;return normalizeEnv(_0x3a79fd)===_0x2fc5a2(0x189);}export function isDaily(_0x4f870d){const _0x2e976d=a54_0x4aeecf;return normalizeEnv(_0x4f870d)===_0x2e976d(0x182);}function a54_0x20ef(){const _0x4d89f8=['179944bHopeE','842534LBtDlm','production','development','16fOkCJG','3281907LkQxnl','online','3283080vsuYdo','2vnMTTK','1398509MHsvVr','daily','757163QjejIj','560fsfkqU','6893613BicWwW','100cEwDsI'];a54_0x20ef=function(){return _0x4d89f8;};return a54_0x20ef();}export function isDev(_0x14ef0c){const _0x4200b0=a54_0x4aeecf,_0x1cacbe=normalizeEnv(_0x14ef0c);return _0x1cacbe===_0x4200b0(0x18a)||_0x1cacbe==='dev';}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a54_0x4aeecf(0x189));export function getEnv(){return env;}export function initEnv(_0x4cd208){env=normalizeEnv(_0x4cd208);}
1
+ const a54_0x42538b=a54_0x3651;function a54_0x21eb(){const _0x491769=['2768495oYRQdM','332139VkhhBn','93GWjRZs','19526660ivFdqE','68038lurZRi','dev','8tLfwQU','6yHcUOg','online','development','daily','8996776qjknVK','production','303177YSexMA','10513845kSLWTM'];a54_0x21eb=function(){return _0x491769;};return a54_0x21eb();}(function(_0x40e3ed,_0x142637){const _0x4afa63=a54_0x3651,_0x57739c=_0x40e3ed();while(!![]){try{const _0x58886e=parseInt(_0x4afa63(0x8c))/0x1+parseInt(_0x4afa63(0x8f))/0x2*(parseInt(_0x4afa63(0x8d))/0x3)+parseInt(_0x4afa63(0x91))/0x4*(parseInt(_0x4afa63(0x8b))/0x5)+-parseInt(_0x4afa63(0x92))/0x6*(-parseInt(_0x4afa63(0x89))/0x7)+-parseInt(_0x4afa63(0x87))/0x8+parseInt(_0x4afa63(0x8a))/0x9+-parseInt(_0x4afa63(0x8e))/0xa;if(_0x58886e===_0x142637)break;else _0x57739c['push'](_0x57739c['shift']());}catch(_0x390cfc){_0x57739c['push'](_0x57739c['shift']());}}}(a54_0x21eb,0x9969b));export const RABETBASE_ENV_VALUES=[a54_0x42538b(0x88),a54_0x42538b(0x86)];function a54_0x3651(_0x1e4ccb,_0x3b6582){_0x1e4ccb=_0x1e4ccb-0x85;const _0x21ebca=a54_0x21eb();let _0x36518e=_0x21ebca[_0x1e4ccb];return _0x36518e;}export function normalizeEnv(_0x2c2add){const _0xf64849=a54_0x42538b;return _0x2c2add===_0xf64849(0x93)?_0xf64849(0x88):_0x2c2add;}export function isProduction(_0x22386c){const _0x4a96a7=a54_0x42538b;return normalizeEnv(_0x22386c)===_0x4a96a7(0x88);}export function isDaily(_0x15260e){const _0x4b2558=a54_0x42538b;return normalizeEnv(_0x15260e)===_0x4b2558(0x86);}export function isDev(_0xc07444){const _0xe3e31=a54_0x42538b,_0x4914b1=normalizeEnv(_0xc07444);return _0x4914b1===_0xe3e31(0x85)||_0x4914b1===_0xe3e31(0x90);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a54_0x42538b(0x88));export function getEnv(){return env;}export function initEnv(_0x3b6a23){env=normalizeEnv(_0x3b6a23);}
@@ -1 +1 @@
1
- function a55_0x5eb4(_0xc55ed3,_0x112021){_0xc55ed3=_0xc55ed3-0x19a;const _0x1e7290=a55_0x1e72();let _0x5eb483=_0x1e7290[_0xc55ed3];return _0x5eb483;}const a55_0x3f52a0=a55_0x5eb4;(function(_0x56226d,_0x1e23bd){const _0x564151=a55_0x5eb4,_0x12861c=_0x56226d();while(!![]){try{const _0x4c9a8e=-parseInt(_0x564151(0x1a4))/0x1+parseInt(_0x564151(0x19e))/0x2*(parseInt(_0x564151(0x19d))/0x3)+-parseInt(_0x564151(0x19f))/0x4+-parseInt(_0x564151(0x1a3))/0x5*(-parseInt(_0x564151(0x19b))/0x6)+-parseInt(_0x564151(0x1a5))/0x7+-parseInt(_0x564151(0x19c))/0x8+-parseInt(_0x564151(0x19a))/0x9*(-parseInt(_0x564151(0x1a1))/0xa);if(_0x4c9a8e===_0x1e23bd)break;else _0x12861c['push'](_0x12861c['shift']());}catch(_0xe4fc6d){_0x12861c['push'](_0x12861c['shift']());}}}(a55_0x1e72,0x9aa72));function a55_0x1e72(){const _0x25819e=['14BBZCsc','3554328LDmBOb','pretty','1458790NYfrCa','json','2450kMIjpi','609418CSpyOq','5095867KNdcyw','117BHeAPu','14604ERHMPA','6693672vDBizO','260169sIxYIJ'];a55_0x1e72=function(){return _0x25819e;};return a55_0x1e72();}export const RABETBASE_OUTPUT_FORMAT_VALUES=[a55_0x3f52a0(0x1a2),a55_0x3f52a0(0x1a0),'compress'];
1
+ function a55_0x50ff(){const _0x21e10e=['21762RpTITs','33651xZatbe','2pHsCYH','153964KhchPo','1327839vylgzv','3130agIoMb','compress','4491040djBGUy','497kEkhFl','2728260smZcrT','142303sMERuD'];a55_0x50ff=function(){return _0x21e10e;};return a55_0x50ff();}const a55_0x7ad2f7=a55_0x53bb;(function(_0x16216b,_0x3bbbc7){const _0x314635=a55_0x53bb,_0x5c09bb=_0x16216b();while(!![]){try{const _0x37fc8d=-parseInt(_0x314635(0xf7))/0x1*(parseInt(_0x314635(0xfa))/0x2)+-parseInt(_0x314635(0xfc))/0x3+parseInt(_0x314635(0xfb))/0x4+-parseInt(_0x314635(0x101))/0x5+-parseInt(_0x314635(0xf8))/0x6*(parseInt(_0x314635(0x100))/0x7)+parseInt(_0x314635(0xff))/0x8+-parseInt(_0x314635(0xf9))/0x9*(-parseInt(_0x314635(0xfd))/0xa);if(_0x37fc8d===_0x3bbbc7)break;else _0x5c09bb['push'](_0x5c09bb['shift']());}catch(_0x212157){_0x5c09bb['push'](_0x5c09bb['shift']());}}}(a55_0x50ff,0x5d48d));function a55_0x53bb(_0x3e8a0a,_0x4a3229){_0x3e8a0a=_0x3e8a0a-0xf7;const _0x50ff51=a55_0x50ff();let _0x53bbd8=_0x50ff51[_0x3e8a0a];return _0x53bbd8;}export const RABETBASE_OUTPUT_FORMAT_VALUES=['json','pretty',a55_0x7ad2f7(0xfe)];
@@ -1 +1 @@
1
- const a53_0x87659e=a53_0x1d72;function a53_0x2b46(){const _0x5dae11=['./src/api','379848HRkrdP','226116NhZpwk','896073XapJAG','418754UjRvfa','37971uCtfJi','258piHCmU','5zmkiWv','1677844ZvAjAv','18319MAIneF','536aLNxQi','20HpESzX'];a53_0x2b46=function(){return _0x5dae11;};return a53_0x2b46();}function a53_0x1d72(_0x5644ff,_0x4f5239){_0x5644ff=_0x5644ff-0xfe;const _0x2b46f0=a53_0x2b46();let _0x1d72e9=_0x2b46f0[_0x5644ff];return _0x1d72e9;}(function(_0x1e9f85,_0xa14d3b){const _0x2c8120=a53_0x1d72,_0x23cd22=_0x1e9f85();while(!![]){try{const _0x1ad34e=-parseInt(_0x2c8120(0xfe))/0x1+parseInt(_0x2c8120(0x102))/0x2+-parseInt(_0x2c8120(0x109))/0x3+parseInt(_0x2c8120(0x107))/0x4*(parseInt(_0x2c8120(0x101))/0x5)+parseInt(_0x2c8120(0x100))/0x6*(-parseInt(_0x2c8120(0x103))/0x7)+parseInt(_0x2c8120(0x104))/0x8*(parseInt(_0x2c8120(0xff))/0x9)+-parseInt(_0x2c8120(0x105))/0xa*(-parseInt(_0x2c8120(0x108))/0xb);if(_0x1ad34e===_0xa14d3b)break;else _0x23cd22['push'](_0x23cd22['shift']());}catch(_0x4a25a7){_0x23cd22['push'](_0x23cd22['shift']());}}}(a53_0x2b46,0x686ad));export const DEFAULT_API_DIR=a53_0x87659e(0x106);
1
+ function a53_0x28f7(){const _0x390371=['313331rICXQO','7916656auQNRp','3290176pllhII','1678200rOicmU','858249JDIPxt','489579SJWPHO','12DHldJp','460010vnkxMu'];a53_0x28f7=function(){return _0x390371;};return a53_0x28f7();}function a53_0x4e97(_0x48dfad,_0x46c107){_0x48dfad=_0x48dfad-0x126;const _0x28f774=a53_0x28f7();let _0x4e9701=_0x28f774[_0x48dfad];return _0x4e9701;}(function(_0x52f1f2,_0x5bd24b){const _0x2e176e=a53_0x4e97,_0x3b659c=_0x52f1f2();while(!![]){try{const _0x16253e=-parseInt(_0x2e176e(0x126))/0x1+parseInt(_0x2e176e(0x12c))/0x2*(-parseInt(_0x2e176e(0x12b))/0x3)+parseInt(_0x2e176e(0x128))/0x4+-parseInt(_0x2e176e(0x12d))/0x5+parseInt(_0x2e176e(0x129))/0x6+-parseInt(_0x2e176e(0x12a))/0x7+parseInt(_0x2e176e(0x127))/0x8;if(_0x16253e===_0x5bd24b)break;else _0x3b659c['push'](_0x3b659c['shift']());}catch(_0x3357f4){_0x3b659c['push'](_0x3b659c['shift']());}}}(a53_0x28f7,0x8ec18));export const DEFAULT_API_DIR='./src/api';
@@ -1 +1 @@
1
- function a52_0x599f(){const _0x482116=['144wvEYkN','50520aZkhsT','10WIDvdq','high-risk-write','35mKIWXI','3568400kKzIGy','3JJpqKZ','166858aesubp','308152TQAuCY','471966CfQVHq','2355440UFmGJI','554877JSGmbC'];a52_0x599f=function(){return _0x482116;};return a52_0x599f();}const a52_0x4fcfaa=a52_0x111d;function a52_0x111d(_0x4b3e71,_0x139d02){_0x4b3e71=_0x4b3e71-0xf7;const _0x599f1b=a52_0x599f();let _0x111dac=_0x599f1b[_0x4b3e71];return _0x111dac;}(function(_0x25b4c5,_0x1b55d8){const _0x3f9109=a52_0x111d,_0x45cdd5=_0x25b4c5();while(!![]){try{const _0x3067e5=-parseInt(_0x3f9109(0x100))/0x1+-parseInt(_0x3f9109(0xff))/0x2*(parseInt(_0x3f9109(0xfe))/0x3)+-parseInt(_0x3f9109(0xf8))/0x4*(-parseInt(_0x3f9109(0xf9))/0x5)+-parseInt(_0x3f9109(0x101))/0x6*(-parseInt(_0x3f9109(0xfc))/0x7)+parseInt(_0x3f9109(0x102))/0x8+-parseInt(_0x3f9109(0xf7))/0x9+parseInt(_0x3f9109(0xfa))/0xa*(-parseInt(_0x3f9109(0xfd))/0xb);if(_0x3067e5===_0x1b55d8)break;else _0x45cdd5['push'](_0x45cdd5['shift']());}catch(_0x22318b){_0x45cdd5['push'](_0x45cdd5['shift']());}}}(a52_0x599f,0x42db5));export const RISK_LEVEL_VALUES=['read','write',a52_0x4fcfaa(0xfb)];
1
+ function a52_0x1d2c(){const _0x25e8e1=['5290080iYsjDg','13329kSrCQf','478340YPRnYR','high-risk-write','114585IqdVmS','1240EBRASk','135702IMtgMT','72PyJhCU','53620qEOTXE','604336KbtEsS','read','3yqKBbn'];a52_0x1d2c=function(){return _0x25e8e1;};return a52_0x1d2c();}const a52_0x17749=a52_0x3bff;(function(_0x1c1d61,_0x2d1092){const _0x1d4e4a=a52_0x3bff,_0x579929=_0x1c1d61();while(!![]){try{const _0x228e79=-parseInt(_0x1d4e4a(0xc1))/0x1+parseInt(_0x1d4e4a(0xba))/0x2+-parseInt(_0x1d4e4a(0xbc))/0x3*(-parseInt(_0x1d4e4a(0xbf))/0x4)+parseInt(_0x1d4e4a(0xb9))/0x5*(parseInt(_0x1d4e4a(0xb8))/0x6)+parseInt(_0x1d4e4a(0xb7))/0x7+-parseInt(_0x1d4e4a(0xc2))/0x8*(-parseInt(_0x1d4e4a(0xbe))/0x9)+-parseInt(_0x1d4e4a(0xbd))/0xa;if(_0x228e79===_0x2d1092)break;else _0x579929['push'](_0x579929['shift']());}catch(_0x3c5409){_0x579929['push'](_0x579929['shift']());}}}(a52_0x1d2c,0x2608d));function a52_0x3bff(_0x31bc45,_0x701bee){_0x31bc45=_0x31bc45-0xb7;const _0x1d2c82=a52_0x1d2c();let _0x3bff16=_0x1d2c82[_0x31bc45];return _0x3bff16;}export const RISK_LEVEL_VALUES=[a52_0x17749(0xbb),'write',a52_0x17749(0xc0)];
package/lib/context.js CHANGED
@@ -1 +1 @@
1
- const a33_0x3bfedc=a33_0x2c09;(function(_0x410772,_0x3dc0e3){const _0x5d23a3=a33_0x2c09,_0x312d04=_0x410772();while(!![]){try{const _0x5e8622=-parseInt(_0x5d23a3(0x188))/0x1*(parseInt(_0x5d23a3(0x166))/0x2)+-parseInt(_0x5d23a3(0x175))/0x3+-parseInt(_0x5d23a3(0x171))/0x4*(parseInt(_0x5d23a3(0x18d))/0x5)+-parseInt(_0x5d23a3(0x168))/0x6*(-parseInt(_0x5d23a3(0x190))/0x7)+parseInt(_0x5d23a3(0x15c))/0x8*(parseInt(_0x5d23a3(0x160))/0x9)+parseInt(_0x5d23a3(0x17e))/0xa+parseInt(_0x5d23a3(0x170))/0xb;if(_0x5e8622===_0x3dc0e3)break;else _0x312d04['push'](_0x312d04['shift']());}catch(_0x393a64){_0x312d04['push'](_0x312d04['shift']());}}}(a33_0x57ef,0xa6d2e));import{readFileSync,writeFileSync,existsSync,mkdirSync,renameSync,unlinkSync}from'node:fs';import{resolve,dirname,parse}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{getIsSessionValid}from'./auth/is-session-valid.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';function env(_0x2cc03a){return process.env[`RABETBASE_${_0x2cc03a}`]||process.env[`LOVRABET_${_0x2cc03a}`]||undefined;}export const NEW_CONFIG_NAME='.rabetbase.json';export const CONFIG_NAMES=['.rabetbase.json',a33_0x3bfedc(0x17b),'.lovrabetrc'];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a33_0x3bfedc(0x173)](_0x1dd09e=>_0x1dd09e!==NEW_CONFIG_NAME);function a33_0x2c09(_0x19b870,_0x259bbc){_0x19b870=_0x19b870-0x143;const _0x57effa=a33_0x57ef();let _0x2c0948=_0x57effa[_0x19b870];return _0x2c0948;}export function resolveConfigPath(_0x171589){for(const _0x4af4a8 of CONFIG_NAMES){const _0x5e2fd9=resolve(_0x171589,_0x4af4a8);if(existsSync(_0x5e2fd9))return _0x5e2fd9;}return undefined;}export function findProjectRootDirectory(_0x4a07e4=process[a33_0x3bfedc(0x17a)]()){let _0x19dac2=resolve(_0x4a07e4);const {root:_0x23c3c6}=parse(_0x19dac2),_0x578eaa=homedir();while(!![]){if(resolveConfigPath(_0x19dac2)){if(_0x19dac2===_0x578eaa)break;return _0x19dac2;}if(_0x19dac2===_0x23c3c6||_0x19dac2===_0x578eaa)break;const _0x18d93a=dirname(_0x19dac2);if(_0x18d93a===_0x19dac2)break;_0x19dac2=_0x18d93a;}return resolve(_0x4a07e4);}export async function createContext(_0x43337b){const _0xa5e571=a33_0x3bfedc,_0x3b2800=readRawConfig(),_0x54b809=buildConfig(_0x3b2800,_0x43337b),{initEnv:_0x41ee53}=await import(_0xa5e571(0x14f));if(_0x54b809[_0xa5e571(0x187)])_0x41ee53(_0x54b809[_0xa5e571(0x187)]);else _0x43337b['env']&&typeof _0x43337b[_0xa5e571(0x187)]==='string'&&_0x41ee53(_0x43337b[_0xa5e571(0x187)]);const {initDomains:_0x17eb94,getUserDomain:_0x3ca1a4,getApiDomain:_0x49ff92}=await import(_0xa5e571(0x177));_0x17eb94({'apiDomain':_0x3b2800['apiDomain']||undefined,'userDomain':_0x3b2800['userDomain']||undefined,'runtimeDomain':_0x3b2800[_0xa5e571(0x143)]||undefined});const _0x58b3cf={'apiDomain':_0x49ff92(),'userDomain':_0x3ca1a4()},_0xe1ff86=await buildAuth(_0x54b809);logger[_0xa5e571(0x17f)](process[_0xa5e571(0x17a)]());const _0x513a2f=(CLI_BIN_NAME+'\x20'+process[_0xa5e571(0x16a)][_0xa5e571(0x154)](0x2)[_0xa5e571(0x159)]('\x20'))[_0xa5e571(0x16e)]();logger[_0xa5e571(0x14d)](_0x513a2f);const {isNonInteractive:_0x3fe946}=await import(_0xa5e571(0x18b)),_0x36ae19=_0x3fe946(_0x43337b);return{'config':_0x54b809,'auth':_0xe1ff86,'logger':logger,'env':_0x58b3cf,'nonInteractive':_0x36ae19};}export function buildConfigFromFlags(_0x59e794){return buildConfig(readRawConfig(),_0x59e794);}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}function a33_0x57ef(){const _0x3ae36e=['project','map','136MUwoDk','merged','PAGE_SIZE','stringify','257373lmhnVP','cookie','message','appcode','FORMAT','projectConfig','2hWtFef','length','3997482SUUeGN','missing','argv','./auth/get-cookie.js','format','empty','trim','api.ts','1766248gJCJSD','892UXrlqV','object','filter','ACCESS_KEY','2645604JPwHOH','apiDir','./constant/domain.js','https://g.lovrabet.com/dist/lovrabet-skill','warn','cwd','.lovrabet.json','read','ENV','5149390mAuhaq','setLogPath','APP','riskLevel','app','-api.ts','migrated','true','keys','env','39502DzjjRU','utf8','defaultApp','./utils/is-non-interactive.js','config','5005PUzLLH','set','entries','7uoljxr','write','runtimeDomain','inherit','error','apps','MAX_RISK','template_base_url','values','authRequired','find','pageSize','setRawCommand','locale','./constant/env.js','string','COOKIE','daily','status','slice','production','APPCODE','Global','accessKey','join'];a33_0x57ef=function(){return _0x3ae36e;};return a33_0x57ef();}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x5c4851){const _0x409850=a33_0x3bfedc;if(!existsSync(_0x5c4851))return{'status':_0x409850(0x169)};try{const _0x1e7028=readFileSync(_0x5c4851,{'encoding':'utf8'});if(!_0x1e7028?.[_0x409850(0x16e)]())return{'status':_0x409850(0x16d)};const _0x159b20=JSON['parse'](_0x1e7028);return{'status':'ok','data':_0x159b20};}catch(_0x2a4021){return{'status':_0x409850(0x145),'message':_0x2a4021 instanceof Error?_0x2a4021[_0x409850(0x162)]:String(_0x2a4021)};}}function parseCliConfigJsonFile(_0xf05905,_0x2fb0e8,_0x3525b6){const _0x415044=a33_0x3bfedc,_0x222ee=inspectCliConfigJsonFile(_0xf05905);if(_0x222ee['status']===_0x415044(0x169)||_0x222ee['status']===_0x415044(0x16d))return{};if(_0x222ee[_0x415044(0x153)]==='ok')return _0x222ee['data'];return _0x2fb0e8===_0x415044(0x179)&&_0x3525b6&&console[_0x415044(0x145)](CLI_BIN_NAME+':\x20'+_0x3525b6+'\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20'+_0xf05905+'\x0a\x20\x20'+_0x222ee['message']),{};}const normalizedWriteCache=new Map();function normalizeLegacyConfigShape(_0x4f95e6){const _0x4624cc=a33_0x3bfedc;if(!_0x4f95e6||typeof _0x4f95e6!==_0x4624cc(0x172))return{'config':{},'migrated':![]};const _0x6b7fd7={..._0x4f95e6},_0x194522=_0x6b7fd7[_0x4624cc(0x146)]&&typeof _0x6b7fd7['apps']===_0x4624cc(0x172)?{..._0x6b7fd7[_0x4624cc(0x146)]}:{},_0x3432bd=Object['keys'](_0x194522)[_0x4624cc(0x167)],_0x215863=_0x6b7fd7[_0x4624cc(0x163)]||_0x6b7fd7['app'];let _0x55d737=![];if(_0x215863&&_0x3432bd===0x0){const _0x24544d=typeof _0x6b7fd7[_0x4624cc(0x18a)]===_0x4624cc(0x150)&&_0x6b7fd7[_0x4624cc(0x18a)]['trim']()?_0x6b7fd7[_0x4624cc(0x18a)]:String(_0x215863)[_0x4624cc(0x16e)]();_0x194522[_0x24544d]={'appcode':String(_0x215863)[_0x4624cc(0x16e)](),..._0x6b7fd7['env']!=null?{'env':_0x6b7fd7[_0x4624cc(0x187)]}:{},..._0x6b7fd7[_0x4624cc(0x176)]!=null?{'apiDir':_0x6b7fd7['apiDir']}:{},..._0x6b7fd7[_0x4624cc(0x161)]!=null?{'cookie':_0x6b7fd7['cookie']}:{},..._0x6b7fd7[_0x4624cc(0x158)]!=null?{'accessKey':_0x6b7fd7[_0x4624cc(0x158)]}:{},..._0x6b7fd7[_0x4624cc(0x16c)]!=null?{'format':_0x6b7fd7[_0x4624cc(0x16c)]}:{},..._0x6b7fd7[_0x4624cc(0x14c)]!=null?{'pageSize':_0x6b7fd7[_0x4624cc(0x14c)]}:{},..._0x6b7fd7[_0x4624cc(0x181)]!=null?{'riskLevel':_0x6b7fd7[_0x4624cc(0x181)]}:{},..._0x6b7fd7['locale']!=null?{'locale':_0x6b7fd7[_0x4624cc(0x14e)]}:{}},_0x6b7fd7['apps']=_0x194522;if(!_0x6b7fd7[_0x4624cc(0x18a)])_0x6b7fd7['defaultApp']=_0x24544d;_0x55d737=!![];}return(_0x4624cc(0x163)in _0x6b7fd7||_0x4624cc(0x182)in _0x6b7fd7)&&(delete _0x6b7fd7['appcode'],delete _0x6b7fd7[_0x4624cc(0x182)],_0x55d737=!![]),{'config':_0x6b7fd7,'migrated':_0x55d737};}function writeNormalizedConfigIfNeeded(_0x5045b2,_0x1ab5d4){const _0x257e6f=a33_0x3bfedc,_0x9b16e7=JSON['stringify'](_0x1ab5d4,null,0x2)+'\x0a';if(normalizedWriteCache['get'](_0x5045b2)===_0x9b16e7)return;writeConfigFile(_0x5045b2,_0x1ab5d4),normalizedWriteCache[_0x257e6f(0x18e)](_0x5045b2,_0x9b16e7);}function parseAndNormalizeConfig(_0x111ba3,_0x14094f,_0x5a1a91){const _0x366a09=a33_0x3bfedc,_0x871cb1=parseCliConfigJsonFile(_0x111ba3,_0x14094f,_0x5a1a91),_0x51dc7c=normalizeLegacyConfigShape(_0x871cb1);if(_0x51dc7c[_0x366a09(0x184)])try{writeNormalizedConfigIfNeeded(_0x111ba3,_0x51dc7c[_0x366a09(0x18c)]);}catch{}return _0x51dc7c[_0x366a09(0x18c)];}export function loadRawConfigLayers(_0x33fdfc){const _0x4735cf=a33_0x3bfedc;let _0x3b5ebc={},_0xf527ab={};const _0x304798=resolveConfigPath(homedir());_0x304798&&(_0x3b5ebc=parseAndNormalizeConfig(_0x304798,_0x4735cf(0x179),_0x4735cf(0x157)));const _0x2a9538=_0x33fdfc??findProjectRootDirectory(),_0x4c35f0=resolveConfigPath(_0x2a9538);return _0x4c35f0&&(_0xf527ab=parseAndNormalizeConfig(_0x4c35f0,'warn','Project')),{'globalPath':_0x304798,'projectPath':_0x4c35f0,'globalConfig':_0x3b5ebc,'projectConfig':_0xf527ab};}function mergeRawConfigLayers(_0x5c2318){const _0x23df3f=a33_0x3bfedc,{globalConfig:_0x1511eb,projectConfig:_0x38508a}=_0x5c2318;if(_0x38508a[_0x23df3f(0x144)]===![]){const _0x481665={..._0x38508a};delete _0x481665['inherit'];const _0x3152d3=_0x38508a[_0x23df3f(0x146)]&&typeof _0x38508a['apps']==='object'?_0x38508a[_0x23df3f(0x146)]:{};Object[_0x23df3f(0x186)](_0x3152d3)[_0x23df3f(0x167)]>0x0?_0x481665[_0x23df3f(0x146)]=_0x3152d3:delete _0x481665['apps'];if(_0x23df3f(0x18a)in _0x38508a)_0x481665[_0x23df3f(0x18a)]=_0x38508a[_0x23df3f(0x18a)];else Object[_0x23df3f(0x186)](_0x3152d3)[_0x23df3f(0x167)]>0x0&&(_0x481665[_0x23df3f(0x18a)]=Object['keys'](_0x3152d3)[0x0]);return _0x481665;}const _0x11f6c8=_0x1511eb[_0x23df3f(0x146)]&&typeof _0x1511eb[_0x23df3f(0x146)]==='object'?_0x1511eb[_0x23df3f(0x146)]:{},_0x33823c=_0x38508a[_0x23df3f(0x146)]&&typeof _0x38508a['apps']===_0x23df3f(0x172)?_0x38508a[_0x23df3f(0x146)]:{},_0x158854={..._0x11f6c8,..._0x33823c},_0x6df72b={..._0x1511eb,..._0x38508a};Object[_0x23df3f(0x186)](_0x158854)['length']>0x0&&(_0x6df72b['apps']=_0x158854);if(_0x23df3f(0x18a)in _0x38508a)_0x6df72b['defaultApp']=_0x38508a[_0x23df3f(0x18a)];else{if(_0x33823c&&Object[_0x23df3f(0x186)](_0x33823c)['length']>0x0)_0x6df72b[_0x23df3f(0x18a)]=Object['keys'](_0x33823c)[0x0];else{if(_0x1511eb[_0x23df3f(0x18a)])_0x6df72b[_0x23df3f(0x18a)]=_0x1511eb['defaultApp'];else{const _0x58d48c=Object[_0x23df3f(0x186)](_0x11f6c8);_0x58d48c[_0x23df3f(0x167)]>0x0&&(_0x6df72b['defaultApp']=_0x58d48c[0x0]);}}}return _0x6df72b;}export function readRawConfigWithLayers(_0x36c78b){const _0x106527=loadRawConfigLayers(_0x36c78b);return{'config':mergeRawConfigLayers(_0x106527),'layers':_0x106527};}export function readRawConfig(_0x3af9d7){return mergeRawConfigLayers(loadRawConfigLayers(_0x3af9d7));}export function getConfigAppCode(_0x2b9a61){const _0x2e85ba=a33_0x3bfedc,_0xa93a9a=readRawConfig(_0x2b9a61);if(_0xa93a9a[_0x2e85ba(0x146)]&&typeof _0xa93a9a[_0x2e85ba(0x146)]===_0x2e85ba(0x172)){const _0x4938fe=_0xa93a9a['defaultApp'];if(_0x4938fe&&_0xa93a9a[_0x2e85ba(0x146)][_0x4938fe]?.['appcode'])return String(_0xa93a9a[_0x2e85ba(0x146)][_0x4938fe][_0x2e85ba(0x163)])[_0x2e85ba(0x16e)]();const _0x51e477=Object[_0x2e85ba(0x149)](_0xa93a9a['apps'])[0x0];if(_0x51e477?.[_0x2e85ba(0x163)])return String(_0x51e477['appcode'])[_0x2e85ba(0x16e)]();}const _0x3af87c=_0xa93a9a['appcode']||_0xa93a9a[_0x2e85ba(0x182)];if(typeof _0x3af87c!=='string'||_0x3af87c['trim']()==='')return undefined;return _0x3af87c[_0x2e85ba(0x16e)]();}export function getMultiAppConfigs(_0x58ca0e='project',_0x429a0a){const _0x3549b2=a33_0x3bfedc,_0x52b234=_0x58ca0e===_0x3549b2(0x15d)?readRawConfig(_0x429a0a):loadRawConfigLayers(_0x429a0a)[_0x3549b2(0x165)],_0x27f004=_0x52b234[_0x3549b2(0x146)];if(!_0x27f004||typeof _0x27f004!==_0x3549b2(0x172)||Object[_0x3549b2(0x186)](_0x27f004)[_0x3549b2(0x167)]===0x0)return null;const _0x4e6cee=_0x52b234['defaultApp'];return Object[_0x3549b2(0x18f)](_0x27f004)[_0x3549b2(0x15b)](([_0xf3d259,_0x4dc9f0])=>({'name':_0xf3d259,'appcode':_0x4dc9f0?.[_0x3549b2(0x163)]||'','isDefault':_0xf3d259===_0x4e6cee,'env':_0x4dc9f0?.[_0x3549b2(0x187)],'apiDir':_0x4dc9f0?.[_0x3549b2(0x176)],'cookie':_0x4dc9f0?.[_0x3549b2(0x161)]||undefined}))[_0x3549b2(0x173)](_0x483346=>_0x483346['appcode']);}export function getTemplateBaseUrl(_0x5d6fc5){const _0x3c3c=a33_0x3bfedc,_0x10d6fe=readRawConfig(_0x5d6fc5);if(_0x10d6fe['template_base_url']&&typeof _0x10d6fe['template_base_url']===_0x3c3c(0x150))return _0x10d6fe[_0x3c3c(0x148)]['replace'](/\/$/,'');return _0x3c3c(0x178);}export function readConfigFile(_0x13255b){return parseAndNormalizeConfig(_0x13255b,'silent');}export function writeConfigFile(_0x2aeb84,_0x3fd95b){const _0x3818c2=a33_0x3bfedc,_0x495fdd=dirname(_0x2aeb84);!existsSync(_0x495fdd)&&mkdirSync(_0x495fdd,{'recursive':!![]});const _0xe15ec8=_0x2aeb84+'.tmp';try{writeFileSync(_0xe15ec8,JSON[_0x3818c2(0x15f)](_0x3fd95b,null,0x2)+'\x0a',{'encoding':_0x3818c2(0x189),'mode':0x180}),renameSync(_0xe15ec8,_0x2aeb84);}catch(_0x5e23dd){try{unlinkSync(_0xe15ec8);}catch{}throw _0x5e23dd;}}export function resolveWriteConfigPath(_0x25fa93){const _0x178bee=a33_0x3bfedc,_0x5ddb19=_0x25fa93===_0x178bee(0x15a)?process[_0x178bee(0x17a)]():homedir(),_0x3b0c88=resolveConfigPath(_0x5ddb19);return _0x3b0c88??resolve(_0x5ddb19,NEW_CONFIG_NAME);}function buildConfig(_0x268524,_0x2ae8b4){const _0x37509a=a33_0x3bfedc,_0x59bc43={};if(_0x268524[_0x37509a(0x146)]&&typeof _0x268524[_0x37509a(0x146)]===_0x37509a(0x172))for(const [_0x2e56e4,_0x28540b]of Object['entries'](_0x268524['apps'])){_0x28540b&&typeof _0x28540b===_0x37509a(0x172)&&_0x28540b['appcode']&&(_0x59bc43[_0x2e56e4]=_0x28540b);}const _0x45b969=_0x268524[_0x37509a(0x18a)]||undefined,_0x17f68f=Object['keys'](_0x59bc43)[_0x37509a(0x167)]>0x0,_0x599071=_0x2ae8b4[_0x37509a(0x182)]||env(_0x37509a(0x180))||undefined,_0x353cc1=_0x599071||_0x45b969||undefined,_0x37c963=_0x2ae8b4[_0x37509a(0x163)]||env(_0x37509a(0x156))||undefined,_0x1b2ea4=_0x37c963?Object[_0x37509a(0x18f)](_0x59bc43)[_0x37509a(0x14b)](([,_0x2bfb1e])=>_0x2bfb1e?.['appcode']===_0x37c963):undefined,_0x2066ff=_0x1b2ea4?.[0x0],_0x1e2bed=_0x1b2ea4?.[0x1];let _0x3b5d96=_0x37c963?_0x2066ff:_0x353cc1,_0x2dd0cf=_0x3b5d96&&_0x59bc43[_0x3b5d96]?_0x59bc43[_0x3b5d96]:undefined;_0x37c963&&_0x1e2bed&&(_0x2dd0cf=_0x1e2bed);const _0x23dc5f=_0x37c963?_0x1e2bed??_0x2dd0cf:_0x2dd0cf,_0x12e1ea=_0x599071||(_0x37c963?_0x2066ff:undefined),_0xd39819=_0x37c963||_0x23dc5f?.[_0x37509a(0x163)]||undefined,_0x404194=_0x2ae8b4[_0x37509a(0x187)]||env(_0x37509a(0x17d))||_0x23dc5f?.[_0x37509a(0x187)]||_0x268524[_0x37509a(0x187)]||DEFAULT_CONFIG_VALUES[_0x37509a(0x187)],_0x5aef5a=_0x23dc5f?.[_0x37509a(0x14e)]||_0x268524['locale']||DEFAULT_CONFIG_VALUES[_0x37509a(0x14e)],_0x20dc04=env(_0x37509a(0x151))||_0x23dc5f?.[_0x37509a(0x161)]||_0x268524[_0x37509a(0x161)]||undefined,_0x5baffe=env(_0x37509a(0x174))||_0x23dc5f?.[_0x37509a(0x158)]||_0x268524['accessKey']||undefined,_0x453a77=_0x2ae8b4[_0x37509a(0x16c)]||env(_0x37509a(0x164))||_0x23dc5f?.[_0x37509a(0x16c)]||_0x268524[_0x37509a(0x16c)],_0x43ee4f=normalizeLegacyOutputFormat(_0x453a77),_0x18ff9c=env(_0x37509a(0x15e))||_0x23dc5f?.['pageSize']||_0x268524[_0x37509a(0x14c)],_0x51fc95=_0x18ff9c?Number(_0x18ff9c)||undefined:undefined,_0x55aaf8=env('RISK_LEVEL')||env(_0x37509a(0x147))||_0x23dc5f?.[_0x37509a(0x181)]||_0x268524[_0x37509a(0x181)]||_0x268524['maxRisk'],_0x19a027=_0x55aaf8===_0x37509a(0x17c)||_0x55aaf8===_0x37509a(0x191)?_0x55aaf8:DEFAULT_CONFIG_VALUES[_0x37509a(0x181)],_0x31c9ea=env('VERBOSE'),_0x31de5c=_0x31c9ea==='1'||_0x31c9ea===_0x37509a(0x185),_0x57ff80=_0x23dc5f?.[_0x37509a(0x176)]||_0x268524['apiDir']||DEFAULT_CONFIG_VALUES['apiDir'],_0x2281d5=isDaily(normalizeEnv(String(_0x404194)))?_0x37509a(0x152):_0x37509a(0x155);return{'appCode':typeof _0xd39819==='string'&&_0xd39819[_0x37509a(0x16e)]()?_0xd39819[_0x37509a(0x16e)]():undefined,'env':_0x2281d5,'locale':_0x5aef5a,'cookie':_0x20dc04,'accessKey':_0x5baffe,'format':_0x43ee4f,'pageSize':_0x51fc95,'riskLevel':_0x19a027,'verbose':_0x31de5c,'apiDir':_0x57ff80,'apps':_0x59bc43,'defaultApp':_0x45b969,'currentApp':_0x17f68f?_0x3b5d96:undefined,'explicitAppName':_0x12e1ea,'raw':_0x268524};}async function buildAuth(_0x4f6897){const _0xcfe01f=a33_0x3bfedc,{getCookie:_0x1f865f}=await import(_0xcfe01f(0x16b)),_0x412d3b=_0x4f6897['cookie']||_0x1f865f(),_0x39235a=_0x412d3b?await getIsSessionValid():![];return{'cookie':_0x412d3b,'isLoggedIn':_0x39235a,async 'getOrLogin'(){const _0x548b6d=_0xcfe01f;if(_0x412d3b&&_0x39235a)return _0x412d3b;throw CliErrors[_0x548b6d(0x14a)]();}};}export function resolveApiFilePath(_0x18b5bc,_0x5cfa44){const _0x3a4f19=a33_0x3bfedc,_0x1e8b66=resolve(process['cwd'](),_0x18b5bc),_0xf0ce7b=resolve(_0x1e8b66,_0x3a4f19(0x16f));if(!_0x5cfa44)return _0xf0ce7b;const _0xd738a4=readRawConfig(),_0x5c9479=_0xd738a4['apps']&&typeof _0xd738a4[_0x3a4f19(0x146)]===_0x3a4f19(0x172)?_0xd738a4['apps']:{},_0x5d5a2f=Object[_0x3a4f19(0x18f)](_0x5c9479)[_0x3a4f19(0x14b)](([,_0x187190])=>_0x187190?.['appcode']===_0x5cfa44);if(!_0x5d5a2f)return _0xf0ce7b;const [_0x453649,_0x207ebc]=_0x5d5a2f,_0x29405d=typeof _0xd738a4[_0x3a4f19(0x18a)]===_0x3a4f19(0x150)?_0xd738a4[_0x3a4f19(0x18a)]:undefined;if(_0x207ebc?.[_0x3a4f19(0x176)])return _0xf0ce7b;if(_0x29405d&&_0x453649!==_0x29405d)return resolve(_0x1e8b66,_0x453649+_0x3a4f19(0x183));return _0xf0ce7b;}
1
+ const a33_0x2638b9=a33_0x6b50;(function(_0x2bb85e,_0x1424e7){const _0xe288e4=a33_0x6b50,_0x4bff72=_0x2bb85e();while(!![]){try{const _0x289d0a=-parseInt(_0xe288e4(0xed))/0x1*(-parseInt(_0xe288e4(0xe6))/0x2)+parseInt(_0xe288e4(0xf6))/0x3*(-parseInt(_0xe288e4(0xfc))/0x4)+parseInt(_0xe288e4(0xf4))/0x5*(-parseInt(_0xe288e4(0x118))/0x6)+parseInt(_0xe288e4(0x121))/0x7*(-parseInt(_0xe288e4(0xf8))/0x8)+parseInt(_0xe288e4(0x10b))/0x9+parseInt(_0xe288e4(0x106))/0xa+-parseInt(_0xe288e4(0xf9))/0xb;if(_0x289d0a===_0x1424e7)break;else _0x4bff72['push'](_0x4bff72['shift']());}catch(_0x5432f2){_0x4bff72['push'](_0x4bff72['shift']());}}}(a33_0x1551,0xa6aba));import{readFileSync,writeFileSync,existsSync,mkdirSync,renameSync,unlinkSync}from'node:fs';import{resolve,dirname,parse}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{getIsSessionValid}from'./auth/is-session-valid.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';function env(_0x1dcbc9){return process.env[`RABETBASE_${_0x1dcbc9}`]||process.env[`LOVRABET_${_0x1dcbc9}`]||undefined;}export const NEW_CONFIG_NAME=a33_0x2638b9(0xdf);export const CONFIG_NAMES=['.rabetbase.json',a33_0x2638b9(0x10c),a33_0x2638b9(0xdc)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a33_0x2638b9(0x10e)](_0x448f8a=>_0x448f8a!==NEW_CONFIG_NAME);export function resolveConfigPath(_0x5c9a57){for(const _0x1a7b8e of CONFIG_NAMES){const _0x330348=resolve(_0x5c9a57,_0x1a7b8e);if(existsSync(_0x330348))return _0x330348;}return undefined;}export function findProjectRootDirectory(_0x446f7f=process['cwd']()){let _0x39b4de=resolve(_0x446f7f);const {root:_0x26f46a}=parse(_0x39b4de),_0x4a57dd=homedir();while(!![]){if(resolveConfigPath(_0x39b4de)){if(_0x39b4de===_0x4a57dd)break;return _0x39b4de;}if(_0x39b4de===_0x26f46a||_0x39b4de===_0x4a57dd)break;const _0x739a80=dirname(_0x39b4de);if(_0x739a80===_0x39b4de)break;_0x39b4de=_0x739a80;}return resolve(_0x446f7f);}export async function createContext(_0x107f58){const _0x30dc75=a33_0x2638b9,_0x3b6a61=readRawConfig(),_0x115477=buildConfig(_0x3b6a61,_0x107f58),{initEnv:_0x2b7648}=await import(_0x30dc75(0x101));if(_0x115477['env'])_0x2b7648(_0x115477[_0x30dc75(0xd2)]);else _0x107f58[_0x30dc75(0xd2)]&&typeof _0x107f58['env']==='string'&&_0x2b7648(_0x107f58['env']);const {initDomains:_0x567370,getUserDomain:_0x4d9b1c,getApiDomain:_0x5449d7}=await import('./constant/domain.js');_0x567370({'apiDomain':_0x3b6a61['apiDomain']||undefined,'userDomain':_0x3b6a61[_0x30dc75(0xd6)]||undefined,'runtimeDomain':_0x3b6a61[_0x30dc75(0xee)]||undefined});const _0x481232={'apiDomain':_0x5449d7(),'userDomain':_0x4d9b1c()},_0xb099a2=await buildAuth(_0x115477);logger[_0x30dc75(0xfb)](process[_0x30dc75(0x11b)]());const _0x296415=(CLI_BIN_NAME+'\x20'+process['argv']['slice'](0x2)[_0x30dc75(0xf1)]('\x20'))[_0x30dc75(0x117)]();logger['setRawCommand'](_0x296415);const {isNonInteractive:_0x5a8c25}=await import(_0x30dc75(0xfa)),_0x12274f=_0x5a8c25(_0x107f58);return{'config':_0x115477,'auth':_0xb099a2,'logger':logger,'env':_0x481232,'nonInteractive':_0x12274f};}export function buildConfigFromFlags(_0x1c8306){return buildConfig(readRawConfig(),_0x1c8306);}export function getProjectConfigPath(){const _0x33c9b9=a33_0x2638b9;return resolveConfigPath(process[_0x33c9b9(0x11b)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x3d86d2){const _0x4439b3=a33_0x2638b9;if(!existsSync(_0x3d86d2))return{'status':_0x4439b3(0xd8)};try{const _0x201de4=readFileSync(_0x3d86d2,{'encoding':_0x4439b3(0xe8)});if(!_0x201de4?.[_0x4439b3(0x117)]())return{'status':_0x4439b3(0xf3)};const _0x5d7357=JSON[_0x4439b3(0xe4)](_0x201de4);return{'status':'ok','data':_0x5d7357};}catch(_0x5be55c){return{'status':_0x4439b3(0xf7),'message':_0x5be55c instanceof Error?_0x5be55c[_0x4439b3(0x120)]:String(_0x5be55c)};}}function parseCliConfigJsonFile(_0x3985ff,_0x51589b,_0x4a4647){const _0x5130af=a33_0x2638b9,_0x4d36e3=inspectCliConfigJsonFile(_0x3985ff);if(_0x4d36e3[_0x5130af(0x103)]===_0x5130af(0xd8)||_0x4d36e3[_0x5130af(0x103)]===_0x5130af(0xf3))return{};if(_0x4d36e3['status']==='ok')return _0x4d36e3['data'];return _0x51589b===_0x5130af(0x10d)&&_0x4a4647&&console[_0x5130af(0xf7)](CLI_BIN_NAME+':\x20'+_0x4a4647+_0x5130af(0xd4)+_0x3985ff+'\x0a\x20\x20'+_0x4d36e3[_0x5130af(0x120)]),{};}const normalizedWriteCache=new Map();function normalizeLegacyConfigShape(_0xaf3fec){const _0x54c477=a33_0x2638b9;if(!_0xaf3fec||typeof _0xaf3fec!==_0x54c477(0xd9))return{'config':{},'migrated':![]};const _0x230344={..._0xaf3fec},_0x10d151=_0x230344[_0x54c477(0xda)]&&typeof _0x230344[_0x54c477(0xda)]===_0x54c477(0xd9)?{..._0x230344[_0x54c477(0xda)]}:{},_0x58b494=Object[_0x54c477(0x105)](_0x10d151)['length'],_0x232929=_0x230344[_0x54c477(0xe5)]||_0x230344[_0x54c477(0xeb)];let _0x3fa681=![];if(_0x232929&&_0x58b494===0x0){const _0x2d866c=typeof _0x230344[_0x54c477(0xd7)]==='string'&&_0x230344[_0x54c477(0xd7)][_0x54c477(0x117)]()?_0x230344[_0x54c477(0xd7)]:String(_0x232929)[_0x54c477(0x117)]();_0x10d151[_0x2d866c]={'appcode':String(_0x232929)[_0x54c477(0x117)](),..._0x230344[_0x54c477(0xd2)]!=null?{'env':_0x230344[_0x54c477(0xd2)]}:{},..._0x230344['apiDir']!=null?{'apiDir':_0x230344[_0x54c477(0xd5)]}:{},..._0x230344[_0x54c477(0xea)]!=null?{'cookie':_0x230344[_0x54c477(0xea)]}:{},..._0x230344['accessKey']!=null?{'accessKey':_0x230344[_0x54c477(0xe7)]}:{},..._0x230344[_0x54c477(0xff)]!=null?{'format':_0x230344[_0x54c477(0xff)]}:{},..._0x230344[_0x54c477(0x104)]!=null?{'pageSize':_0x230344[_0x54c477(0x104)]}:{},..._0x230344[_0x54c477(0x108)]!=null?{'riskLevel':_0x230344[_0x54c477(0x108)]}:{},..._0x230344[_0x54c477(0x11f)]!=null?{'locale':_0x230344['locale']}:{}},_0x230344['apps']=_0x10d151;if(!_0x230344[_0x54c477(0xd7)])_0x230344[_0x54c477(0xd7)]=_0x2d866c;_0x3fa681=!![];}return(_0x54c477(0xe5)in _0x230344||_0x54c477(0xeb)in _0x230344)&&(delete _0x230344['appcode'],delete _0x230344[_0x54c477(0xeb)],_0x3fa681=!![]),{'config':_0x230344,'migrated':_0x3fa681};}function writeNormalizedConfigIfNeeded(_0x5e91da,_0xa79c5){const _0x52f64d=a33_0x2638b9,_0x5f5415=JSON[_0x52f64d(0x11a)](_0xa79c5,null,0x2)+'\x0a';if(normalizedWriteCache[_0x52f64d(0x11e)](_0x5e91da)===_0x5f5415)return;writeConfigFile(_0x5e91da,_0xa79c5),normalizedWriteCache[_0x52f64d(0x115)](_0x5e91da,_0x5f5415);}function parseAndNormalizeConfig(_0x2b2bfa,_0x336c9b,_0x47e1c1){const _0x22ee7c=a33_0x2638b9,_0x51284c=parseCliConfigJsonFile(_0x2b2bfa,_0x336c9b,_0x47e1c1),_0x5ef677=normalizeLegacyConfigShape(_0x51284c);if(_0x5ef677[_0x22ee7c(0x113)])try{writeNormalizedConfigIfNeeded(_0x2b2bfa,_0x5ef677[_0x22ee7c(0xd1)]);}catch{}return _0x5ef677[_0x22ee7c(0xd1)];}export function loadRawConfigLayers(_0x5d03f1){const _0x340a85=a33_0x2638b9;let _0x4208a6={},_0x20fea3={};const _0x5a0bce=resolveConfigPath(homedir());_0x5a0bce&&(_0x4208a6=parseAndNormalizeConfig(_0x5a0bce,_0x340a85(0x10d),_0x340a85(0xe0)));const _0x707c8c=_0x5d03f1??findProjectRootDirectory(),_0x443b12=resolveConfigPath(_0x707c8c);return _0x443b12&&(_0x20fea3=parseAndNormalizeConfig(_0x443b12,_0x340a85(0x10d),_0x340a85(0x119))),{'globalPath':_0x5a0bce,'projectPath':_0x443b12,'globalConfig':_0x4208a6,'projectConfig':_0x20fea3};}function mergeRawConfigLayers(_0x18e9f2){const _0x22fc79=a33_0x2638b9,{globalConfig:_0x2c0d57,projectConfig:_0x599be5}=_0x18e9f2;if(_0x599be5[_0x22fc79(0x114)]===![]){const _0x4e91d3={..._0x599be5};delete _0x4e91d3['inherit'];const _0x34433b=_0x599be5[_0x22fc79(0xda)]&&typeof _0x599be5[_0x22fc79(0xda)]===_0x22fc79(0xd9)?_0x599be5[_0x22fc79(0xda)]:{};Object[_0x22fc79(0x105)](_0x34433b)['length']>0x0?_0x4e91d3[_0x22fc79(0xda)]=_0x34433b:delete _0x4e91d3[_0x22fc79(0xda)];if(_0x22fc79(0xd7)in _0x599be5)_0x4e91d3[_0x22fc79(0xd7)]=_0x599be5['defaultApp'];else Object[_0x22fc79(0x105)](_0x34433b)[_0x22fc79(0xd3)]>0x0&&(_0x4e91d3[_0x22fc79(0xd7)]=Object['keys'](_0x34433b)[0x0]);return _0x4e91d3;}const _0x32bd35=_0x2c0d57[_0x22fc79(0xda)]&&typeof _0x2c0d57[_0x22fc79(0xda)]===_0x22fc79(0xd9)?_0x2c0d57[_0x22fc79(0xda)]:{},_0x23bce6=_0x599be5['apps']&&typeof _0x599be5['apps']==='object'?_0x599be5['apps']:{},_0x48fbe3={..._0x32bd35,..._0x23bce6},_0x14b279={..._0x2c0d57,..._0x599be5};Object[_0x22fc79(0x105)](_0x48fbe3)['length']>0x0&&(_0x14b279['apps']=_0x48fbe3);if(_0x22fc79(0xd7)in _0x599be5)_0x14b279['defaultApp']=_0x599be5[_0x22fc79(0xd7)];else{if(_0x23bce6&&Object[_0x22fc79(0x105)](_0x23bce6)[_0x22fc79(0xd3)]>0x0)_0x14b279[_0x22fc79(0xd7)]=Object['keys'](_0x23bce6)[0x0];else{if(_0x2c0d57['defaultApp'])_0x14b279[_0x22fc79(0xd7)]=_0x2c0d57[_0x22fc79(0xd7)];else{const _0xb3a69=Object[_0x22fc79(0x105)](_0x32bd35);_0xb3a69[_0x22fc79(0xd3)]>0x0&&(_0x14b279['defaultApp']=_0xb3a69[0x0]);}}}return _0x14b279;}export function readRawConfigWithLayers(_0x2b2c1f){const _0x6b99cc=loadRawConfigLayers(_0x2b2c1f);return{'config':mergeRawConfigLayers(_0x6b99cc),'layers':_0x6b99cc};}export function readRawConfig(_0x13ea1c){return mergeRawConfigLayers(loadRawConfigLayers(_0x13ea1c));}export function getConfigAppCode(_0x30a633){const _0x326b42=a33_0x2638b9,_0x144720=readRawConfig(_0x30a633);if(_0x144720[_0x326b42(0xda)]&&typeof _0x144720[_0x326b42(0xda)]===_0x326b42(0xd9)){const _0x2a8426=_0x144720['defaultApp'];if(_0x2a8426&&_0x144720[_0x326b42(0xda)][_0x2a8426]?.[_0x326b42(0xe5)])return String(_0x144720[_0x326b42(0xda)][_0x2a8426][_0x326b42(0xe5)])[_0x326b42(0x117)]();const _0x489343=Object['values'](_0x144720[_0x326b42(0xda)])[0x0];if(_0x489343?.[_0x326b42(0xe5)])return String(_0x489343[_0x326b42(0xe5)])['trim']();}const _0x5ef020=_0x144720[_0x326b42(0xe5)]||_0x144720[_0x326b42(0xeb)];if(typeof _0x5ef020!==_0x326b42(0xdb)||_0x5ef020[_0x326b42(0x117)]()==='')return undefined;return _0x5ef020[_0x326b42(0x117)]();}export function getMultiAppConfigs(_0x1f9627=a33_0x2638b9(0xef),_0x2717a6){const _0x3858e2=a33_0x2638b9,_0x228219=_0x1f9627===_0x3858e2(0x10a)?readRawConfig(_0x2717a6):loadRawConfigLayers(_0x2717a6)['projectConfig'],_0x4d590d=_0x228219[_0x3858e2(0xda)];if(!_0x4d590d||typeof _0x4d590d!==_0x3858e2(0xd9)||Object['keys'](_0x4d590d)[_0x3858e2(0xd3)]===0x0)return null;const _0x8466ee=_0x228219[_0x3858e2(0xd7)];return Object[_0x3858e2(0x107)](_0x4d590d)['map'](([_0x2af29f,_0xa785ad])=>({'name':_0x2af29f,'appcode':_0xa785ad?.[_0x3858e2(0xe5)]||'','isDefault':_0x2af29f===_0x8466ee,'env':_0xa785ad?.['env'],'apiDir':_0xa785ad?.[_0x3858e2(0xd5)],'cookie':_0xa785ad?.[_0x3858e2(0xea)]||undefined}))['filter'](_0x49eb80=>_0x49eb80[_0x3858e2(0xe5)]);}export function getTemplateBaseUrl(_0x510ce1){const _0x2584cb=a33_0x2638b9,_0x32f727=readRawConfig(_0x510ce1);if(_0x32f727[_0x2584cb(0xe2)]&&typeof _0x32f727[_0x2584cb(0xe2)]===_0x2584cb(0xdb))return _0x32f727['template_base_url'][_0x2584cb(0x11c)](/\/$/,'');return'https://g.lovrabet.com/dist/lovrabet-skill';}export function readConfigFile(_0x13aee9){const _0x184273=a33_0x2638b9;return parseAndNormalizeConfig(_0x13aee9,_0x184273(0x111));}export function writeConfigFile(_0x461b0e,_0x93df04){const _0x5a5568=a33_0x2638b9,_0x1fa4b1=dirname(_0x461b0e);!existsSync(_0x1fa4b1)&&mkdirSync(_0x1fa4b1,{'recursive':!![]});const _0x4343d7=_0x461b0e+_0x5a5568(0x102);try{writeFileSync(_0x4343d7,JSON[_0x5a5568(0x11a)](_0x93df04,null,0x2)+'\x0a',{'encoding':_0x5a5568(0xe8),'mode':0x180}),renameSync(_0x4343d7,_0x461b0e);}catch(_0x122775){try{unlinkSync(_0x4343d7);}catch{}throw _0x122775;}}export function resolveWriteConfigPath(_0xad3d92){const _0x367554=a33_0x2638b9,_0x16533c=_0xad3d92===_0x367554(0xef)?process[_0x367554(0x11b)]():homedir(),_0x202cff=resolveConfigPath(_0x16533c);return _0x202cff??resolve(_0x16533c,NEW_CONFIG_NAME);}function buildConfig(_0x553ce7,_0x1ee2b2){const _0x40dd5d=a33_0x2638b9,_0x219572={};if(_0x553ce7[_0x40dd5d(0xda)]&&typeof _0x553ce7[_0x40dd5d(0xda)]===_0x40dd5d(0xd9))for(const [_0x152848,_0x3e48b8]of Object[_0x40dd5d(0x107)](_0x553ce7[_0x40dd5d(0xda)])){_0x3e48b8&&typeof _0x3e48b8===_0x40dd5d(0xd9)&&_0x3e48b8[_0x40dd5d(0xe5)]&&(_0x219572[_0x152848]=_0x3e48b8);}const _0x5d9023=_0x553ce7[_0x40dd5d(0xd7)]||undefined,_0x190c62=Object[_0x40dd5d(0x105)](_0x219572)[_0x40dd5d(0xd3)]>0x0,_0x3a5a7c=_0x1ee2b2[_0x40dd5d(0xeb)]||env('APP')||undefined,_0x45f6fe=_0x3a5a7c||_0x5d9023||undefined,_0x513f8a=_0x1ee2b2['appcode']||env(_0x40dd5d(0xe9))||undefined,_0xf80780=_0x513f8a?Object[_0x40dd5d(0x107)](_0x219572)[_0x40dd5d(0xde)](([,_0x2b04bc])=>_0x2b04bc?.[_0x40dd5d(0xe5)]===_0x513f8a):undefined,_0xc8f3e9=_0xf80780?.[0x0],_0x29d0e1=_0xf80780?.[0x1];let _0x104507=_0x513f8a?_0xc8f3e9:_0x45f6fe,_0x3ffc45=_0x104507&&_0x219572[_0x104507]?_0x219572[_0x104507]:undefined;_0x513f8a&&_0x29d0e1&&(_0x3ffc45=_0x29d0e1);const _0x368fd2=_0x513f8a?_0x29d0e1??_0x3ffc45:_0x3ffc45,_0x12d538=_0x3a5a7c||(_0x513f8a?_0xc8f3e9:undefined),_0x2afd0f=_0x513f8a||_0x368fd2?.[_0x40dd5d(0xe5)]||undefined,_0x46c26b=_0x1ee2b2[_0x40dd5d(0xd2)]||env(_0x40dd5d(0xf5))||_0x368fd2?.['env']||_0x553ce7['env']||DEFAULT_CONFIG_VALUES['env'],_0x2d604f=_0x368fd2?.[_0x40dd5d(0x11f)]||_0x553ce7[_0x40dd5d(0x11f)]||DEFAULT_CONFIG_VALUES[_0x40dd5d(0x11f)],_0x426363=env(_0x40dd5d(0xe1))||_0x368fd2?.[_0x40dd5d(0xea)]||_0x553ce7[_0x40dd5d(0xea)]||undefined,_0x12bb9d=env('ACCESS_KEY')||_0x368fd2?.[_0x40dd5d(0xe7)]||_0x553ce7[_0x40dd5d(0xe7)]||undefined,_0x3a56c4=_0x1ee2b2[_0x40dd5d(0xff)]||env(_0x40dd5d(0xfd))||_0x368fd2?.[_0x40dd5d(0xff)]||_0x553ce7['format'],_0x42f2a2=normalizeLegacyOutputFormat(_0x3a56c4),_0x5ce715=env('PAGE_SIZE')||_0x368fd2?.[_0x40dd5d(0x104)]||_0x553ce7[_0x40dd5d(0x104)],_0x3b5772=_0x5ce715?Number(_0x5ce715)||undefined:undefined,_0x4267d4=env(_0x40dd5d(0xec))||env(_0x40dd5d(0x116))||_0x368fd2?.[_0x40dd5d(0x108)]||_0x553ce7['riskLevel']||_0x553ce7[_0x40dd5d(0x112)],_0x4590bc=_0x4267d4===_0x40dd5d(0xfe)||_0x4267d4===_0x40dd5d(0x100)?_0x4267d4:DEFAULT_CONFIG_VALUES[_0x40dd5d(0x108)],_0x3c3111=env(_0x40dd5d(0x10f)),_0x48c0ee=_0x3c3111==='1'||_0x3c3111===_0x40dd5d(0x11d),_0x88c997=_0x368fd2?.[_0x40dd5d(0xd5)]||_0x553ce7['apiDir']||DEFAULT_CONFIG_VALUES['apiDir'],_0x43e962=isDaily(normalizeEnv(String(_0x46c26b)))?_0x40dd5d(0xdd):_0x40dd5d(0xf0);return{'appCode':typeof _0x2afd0f===_0x40dd5d(0xdb)&&_0x2afd0f[_0x40dd5d(0x117)]()?_0x2afd0f[_0x40dd5d(0x117)]():undefined,'env':_0x43e962,'locale':_0x2d604f,'cookie':_0x426363,'accessKey':_0x12bb9d,'format':_0x42f2a2,'pageSize':_0x3b5772,'riskLevel':_0x4590bc,'verbose':_0x48c0ee,'apiDir':_0x88c997,'apps':_0x219572,'defaultApp':_0x5d9023,'currentApp':_0x190c62?_0x104507:undefined,'explicitAppName':_0x12d538,'raw':_0x553ce7};}function a33_0x1551(){const _0x2f7e9b=['5753448QmHvzG','.lovrabet.json','warn','filter','VERBOSE','./auth/get-cookie.js','silent','maxRisk','migrated','inherit','set','MAX_RISK','trim','6ozBRpo','Project','stringify','cwd','replace','true','get','locale','message','7TGOYZC','config','env','length','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','apiDir','userDomain','defaultApp','missing','object','apps','string','.lovrabetrc','daily','find','.rabetbase.json','Global','COOKIE','template_base_url','api.ts','parse','appcode','10Bfdrag','accessKey','utf8','APPCODE','cookie','app','RISK_LEVEL','189061bqfBGG','runtimeDomain','project','production','join','authRequired','empty','2650775lMSVuU','ENV','499227Vlpaex','error','1485144pzwwqV','3301991LNDhkU','./utils/is-non-interactive.js','setLogPath','12KXCeTL','FORMAT','read','format','write','./constant/env.js','.tmp','status','pageSize','keys','6133110FyUUdX','entries','riskLevel','-api.ts','merged'];a33_0x1551=function(){return _0x2f7e9b;};return a33_0x1551();}async function buildAuth(_0x4b5987){const _0x5a971f=a33_0x2638b9,{getCookie:_0x3b1711}=await import(_0x5a971f(0x110)),_0x3a780d=_0x4b5987[_0x5a971f(0xea)]||_0x3b1711(),_0x4033f8=_0x3a780d?await getIsSessionValid():![];return{'cookie':_0x3a780d,'isLoggedIn':_0x4033f8,async 'getOrLogin'(){const _0x451ba3=_0x5a971f;if(_0x3a780d&&_0x4033f8)return _0x3a780d;throw CliErrors[_0x451ba3(0xf2)]();}};}function a33_0x6b50(_0x21ffdc,_0x56697c){_0x21ffdc=_0x21ffdc-0xd1;const _0x15517a=a33_0x1551();let _0x6b5031=_0x15517a[_0x21ffdc];return _0x6b5031;}export function resolveApiFilePath(_0x325ace,_0x52706f){const _0x231856=a33_0x2638b9,_0x4f99ce=resolve(process[_0x231856(0x11b)](),_0x325ace),_0x49144e=resolve(_0x4f99ce,_0x231856(0xe3));if(!_0x52706f)return _0x49144e;const _0x197788=readRawConfig(),_0x3eae27=_0x197788[_0x231856(0xda)]&&typeof _0x197788[_0x231856(0xda)]==='object'?_0x197788[_0x231856(0xda)]:{},_0xd3b7a3=Object[_0x231856(0x107)](_0x3eae27)['find'](([,_0x38e6c6])=>_0x38e6c6?.['appcode']===_0x52706f);if(!_0xd3b7a3)return _0x49144e;const [_0x48744e,_0x1af975]=_0xd3b7a3,_0x3f6c53=typeof _0x197788['defaultApp']===_0x231856(0xdb)?_0x197788[_0x231856(0xd7)]:undefined;if(_0x1af975?.[_0x231856(0xd5)])return _0x49144e;if(_0x3f6c53&&_0x48744e!==_0x3f6c53)return resolve(_0x4f99ce,_0x48744e+_0x231856(0x109));return _0x49144e;}
@@ -1 +1 @@
1
- (function(_0x590ffb,_0x58b5b3){const _0x563415=a157_0x55f2,_0x1434c4=_0x590ffb();while(!![]){try{const _0x21a3ca=-parseInt(_0x563415(0x154))/0x1*(parseInt(_0x563415(0x149))/0x2)+parseInt(_0x563415(0x143))/0x3*(parseInt(_0x563415(0x153))/0x4)+parseInt(_0x563415(0x146))/0x5+parseInt(_0x563415(0x145))/0x6*(-parseInt(_0x563415(0x144))/0x7)+-parseInt(_0x563415(0x150))/0x8*(parseInt(_0x563415(0x147))/0x9)+parseInt(_0x563415(0x14f))/0xa+parseInt(_0x563415(0x14e))/0xb;if(_0x21a3ca===_0x58b5b3)break;else _0x1434c4['push'](_0x1434c4['shift']());}catch(_0x1f4aaa){_0x1434c4['push'](_0x1434c4['shift']());}}}(a157_0x114b,0x1e674));import{readFileSync,existsSync}from'node:fs';function a157_0x114b(){const _0x1402f6=['870IWRWSX','903655nFjwHz','18NUimPC','exec','2LOiBQH','has','api.ts','find','cwd','2493810uUEgcO','1206930dKHNtq','357064WfMkxC','set','alias','64808EqiMRj','239623wyQpOC','push','3yZaQPQ','4389TKqHGn'];a157_0x114b=function(){return _0x1402f6;};return a157_0x114b();}import{resolve}from'node:path';function a157_0x55f2(_0x4b44e3,_0x533c66){_0x4b44e3=_0x4b44e3-0x142;const _0x114b93=a157_0x114b();let _0x55f25d=_0x114b93[_0x4b44e3];return _0x55f25d;}const cache=new Map();function parseApiFile(_0x4d81f2){const _0x4aff18=a157_0x55f2,_0x224214=[],_0xb7dc80=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x1e4a3a;while((_0x1e4a3a=_0xb7dc80[_0x4aff18(0x148)](_0x4d81f2))!==null){_0x224214[_0x4aff18(0x142)]({'datasetCode':_0x1e4a3a[0x1],'tableName':_0x1e4a3a[0x2],'name':_0x1e4a3a[0x3],'alias':_0x1e4a3a[0x4]});}return _0x224214;}export function loadAliasMap(_0x1d14ce,_0xaf09a7,_0x38ea5d){const _0x110f77=a157_0x55f2,_0x292a0d=_0x38ea5d??resolve(process[_0x110f77(0x14d)](),_0x1d14ce,_0x110f77(0x14b));if(cache[_0x110f77(0x14a)](_0x292a0d))return cache['get'](_0x292a0d);if(!existsSync(_0x292a0d))return cache['set'](_0x292a0d,[]),[];try{const _0x2440ac=readFileSync(_0x292a0d,'utf-8'),_0x4587f6=parseApiFile(_0x2440ac);return cache[_0x110f77(0x151)](_0x292a0d,_0x4587f6),_0x4587f6;}catch{return cache[_0x110f77(0x151)](_0x292a0d,[]),[];}}export function resolveAlias(_0x417187,_0x350f08,_0x2ad2d8,_0x382796){const _0x34541e=a157_0x55f2;if(!_0x350f08)return undefined;const _0x3abf61=loadAliasMap(_0x417187,_0x2ad2d8,_0x382796),_0x1d1c6f=_0x3abf61[_0x34541e(0x14c)](_0x126b2b=>_0x126b2b[_0x34541e(0x152)]===_0x350f08);return _0x1d1c6f?.['datasetCode'];}export function listAliases(_0x5906d5,_0x300cb3,_0x4a4e0e){return loadAliasMap(_0x5906d5,_0x300cb3,_0x4a4e0e);}
1
+ (function(_0x48aeaa,_0x27b812){const _0x509184=a157_0x511f,_0x38c15d=_0x48aeaa();while(!![]){try{const _0x18e7fe=-parseInt(_0x509184(0x10e))/0x1*(parseInt(_0x509184(0x109))/0x2)+-parseInt(_0x509184(0x112))/0x3+parseInt(_0x509184(0x119))/0x4+-parseInt(_0x509184(0x10d))/0x5*(-parseInt(_0x509184(0x117))/0x6)+-parseInt(_0x509184(0x111))/0x7+-parseInt(_0x509184(0x113))/0x8+-parseInt(_0x509184(0x118))/0x9*(-parseInt(_0x509184(0x10a))/0xa);if(_0x18e7fe===_0x27b812)break;else _0x38c15d['push'](_0x38c15d['shift']());}catch(_0x450da4){_0x38c15d['push'](_0x38c15d['shift']());}}}(a157_0x28d3,0x2d4e5));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';function a157_0x511f(_0x7ad92d,_0x25acc4){_0x7ad92d=_0x7ad92d-0x108;const _0x28d39e=a157_0x28d3();let _0x511fa0=_0x28d39e[_0x7ad92d];return _0x511fa0;}const cache=new Map();function parseApiFile(_0xf2ee20){const _0x2473bb=a157_0x511f,_0x325b13=[],_0x4d5e40=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x303660;while((_0x303660=_0x4d5e40['exec'](_0xf2ee20))!==null){_0x325b13[_0x2473bb(0x116)]({'datasetCode':_0x303660[0x1],'tableName':_0x303660[0x2],'name':_0x303660[0x3],'alias':_0x303660[0x4]});}return _0x325b13;}export function loadAliasMap(_0x77aa7,_0x33d38c,_0x215ec1){const _0x28ac60=a157_0x511f,_0x22ed92=_0x215ec1??resolve(process[_0x28ac60(0x10f)](),_0x77aa7,_0x28ac60(0x10c));if(cache['has'](_0x22ed92))return cache[_0x28ac60(0x108)](_0x22ed92);if(!existsSync(_0x22ed92))return cache['set'](_0x22ed92,[]),[];try{const _0x4806d0=readFileSync(_0x22ed92,_0x28ac60(0x10b)),_0x5505a5=parseApiFile(_0x4806d0);return cache[_0x28ac60(0x114)](_0x22ed92,_0x5505a5),_0x5505a5;}catch{return cache['set'](_0x22ed92,[]),[];}}function a157_0x28d3(){const _0x4c738d=['find','1069481nxcYhU','1031529bKXKxH','345136pizDMt','set','alias','push','54nSEmwZ','9gRSfsh','864972TvytUw','get','10xQLXoa','8075090GfsBrG','utf-8','api.ts','37405AwIxIz','73148VZtjTY','cwd'];a157_0x28d3=function(){return _0x4c738d;};return a157_0x28d3();}export function resolveAlias(_0x59126d,_0x23baec,_0x334204,_0x255e34){const _0x2d5469=a157_0x511f;if(!_0x23baec)return undefined;const _0x1dc659=loadAliasMap(_0x59126d,_0x334204,_0x255e34),_0x5c5aea=_0x1dc659[_0x2d5469(0x110)](_0x43f0eb=>_0x43f0eb[_0x2d5469(0x115)]===_0x23baec);return _0x5c5aea?.['datasetCode'];}export function listAliases(_0x583930,_0x5d128d,_0x9b3e99){return loadAliasMap(_0x583930,_0x5d128d,_0x9b3e99);}