@lovrabet/rabetbase-cli 2.0.12 → 2.0.13

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 (140) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/logout.js +1 -1
  11. package/lib/cli-flags.js +1 -1
  12. package/lib/cli.js +1 -1
  13. package/lib/commands/api/doc.js +1 -1
  14. package/lib/commands/api/index.js +1 -1
  15. package/lib/commands/api/list.js +1 -1
  16. package/lib/commands/api/pull.js +1 -1
  17. package/lib/commands/api/shared.js +1 -1
  18. package/lib/commands/app/add.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/remote.js +1 -1
  22. package/lib/commands/app/remove.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app/use.js +1 -1
  25. package/lib/commands/auth/index.js +1 -1
  26. package/lib/commands/bff/delete.js +1 -1
  27. package/lib/commands/bff/detail.js +1 -1
  28. package/lib/commands/bff/index.js +1 -1
  29. package/lib/commands/bff/list.js +1 -1
  30. package/lib/commands/bff/new.js +1 -1
  31. package/lib/commands/bff/pull.js +1 -1
  32. package/lib/commands/bff/push.js +1 -1
  33. package/lib/commands/bff/status.js +1 -1
  34. package/lib/commands/cli-update.js +1 -1
  35. package/lib/commands/codegen/index.js +1 -1
  36. package/lib/commands/codegen/sdk.js +1 -1
  37. package/lib/commands/codegen/sql.js +1 -1
  38. package/lib/commands/common/app-selector.js +1 -1
  39. package/lib/commands/common/flags.js +1 -1
  40. package/lib/commands/common/validate.js +1 -1
  41. package/lib/commands/config/get.js +1 -1
  42. package/lib/commands/config/index.js +1 -1
  43. package/lib/commands/config/list.js +1 -1
  44. package/lib/commands/config/set.js +1 -1
  45. package/lib/commands/config/shared.js +1 -1
  46. package/lib/commands/dataset/detail.js +1 -1
  47. package/lib/commands/dataset/index.js +1 -1
  48. package/lib/commands/dataset/links.js +1 -1
  49. package/lib/commands/dataset/list.js +1 -1
  50. package/lib/commands/dataset/operations.js +1 -1
  51. package/lib/commands/doctor.js +1 -1
  52. package/lib/commands/init/index.js +1 -1
  53. package/lib/commands/logs/index.js +1 -1
  54. package/lib/commands/menu/index.js +1 -1
  55. package/lib/commands/menu/shared/compare-table.js +1 -1
  56. package/lib/commands/menu/shared/index.js +1 -1
  57. package/lib/commands/menu/shared/inquirer.js +1 -1
  58. package/lib/commands/menu/shared/local-pages.js +1 -1
  59. package/lib/commands/menu/shared/logic.js +1 -1
  60. package/lib/commands/menu/shared/service.js +1 -1
  61. package/lib/commands/menu/shared/sync-core.js +1 -1
  62. package/lib/commands/menu/shared/update-core.js +1 -1
  63. package/lib/commands/menu/shared/valid-url.js +1 -1
  64. package/lib/commands/menu/sync.js +1 -1
  65. package/lib/commands/menu/update.js +1 -1
  66. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  67. package/lib/commands/project/create/format-elapsed.js +1 -1
  68. package/lib/commands/project/create/main.js +1 -1
  69. package/lib/commands/project/create/non-interactive.js +1 -1
  70. package/lib/commands/project/create/project-template-path.js +1 -1
  71. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  72. package/lib/commands/project/create/use-format-code.js +1 -1
  73. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  74. package/lib/commands/project/index.js +1 -1
  75. package/lib/commands/project/init.js +1 -1
  76. package/lib/commands/project/upgrade.js +1 -1
  77. package/lib/commands/registry.js +1 -1
  78. package/lib/commands/run/index.js +1 -1
  79. package/lib/commands/schema.js +1 -1
  80. package/lib/commands/skill/index.js +1 -1
  81. package/lib/commands/sql/detail.js +1 -1
  82. package/lib/commands/sql/exec.js +1 -1
  83. package/lib/commands/sql/index.js +1 -1
  84. package/lib/commands/sql/list.js +1 -1
  85. package/lib/commands/sql/pull.js +1 -0
  86. package/lib/commands/sql/save.js +1 -1
  87. package/lib/commands/sql/shared.js +1 -0
  88. package/lib/commands/sql/validate.js +1 -1
  89. package/lib/constant/cli.js +1 -1
  90. package/lib/constant/domain.js +1 -1
  91. package/lib/constant/env.js +1 -1
  92. package/lib/constant/paths.js +1 -1
  93. package/lib/context.js +1 -1
  94. package/lib/core/alias-resolver.js +1 -1
  95. package/lib/core/api-client.js +1 -1
  96. package/lib/core/bff/config.js +1 -1
  97. package/lib/core/bff/file-system.js +1 -1
  98. package/lib/core/bff/hash.js +1 -1
  99. package/lib/core/bff/lock.js +1 -1
  100. package/lib/core/bff/utils.js +1 -1
  101. package/lib/core/db-resolver.js +1 -1
  102. package/lib/core/sql-validator.js +1 -1
  103. package/lib/errors.js +1 -1
  104. package/lib/framework/build-all-flags.js +1 -1
  105. package/lib/framework/flags.js +1 -1
  106. package/lib/framework/help.js +1 -1
  107. package/lib/framework/index.js +1 -1
  108. package/lib/framework/output.js +1 -1
  109. package/lib/framework/response.js +1 -1
  110. package/lib/framework/runner.js +1 -1
  111. package/lib/framework/schema-export.js +1 -1
  112. package/lib/framework/types.js +1 -1
  113. package/lib/generated/build-info.js +1 -1
  114. package/lib/help.js +1 -1
  115. package/lib/skills/main.js +1 -1
  116. package/lib/skills/npx-skills-add.js +1 -1
  117. package/lib/telemetry/cli-command-trace.js +1 -1
  118. package/lib/telemetry/cli-help-trace.js +1 -1
  119. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  120. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  121. package/lib/telemetry/send-cli-trace-log.js +1 -1
  122. package/lib/utils/ai_config.js +1 -1
  123. package/lib/utils/apply-jq-filter.js +1 -1
  124. package/lib/utils/cdn-config.js +1 -1
  125. package/lib/utils/check-sdk-version.js +1 -1
  126. package/lib/utils/cli-version-check.js +1 -1
  127. package/lib/utils/config.js +1 -1
  128. package/lib/utils/copy-directory.js +1 -1
  129. package/lib/utils/file-utils.js +1 -1
  130. package/lib/utils/guides-cdn.js +1 -1
  131. package/lib/utils/http-client.js +1 -1
  132. package/lib/utils/is-non-interactive.js +1 -1
  133. package/lib/utils/logger.js +1 -1
  134. package/lib/utils/platform.js +1 -1
  135. package/lib/utils/rules-cdn.js +1 -1
  136. package/lib/utils/sleep.js +1 -1
  137. package/lib/utils/template-replacer.js +1 -1
  138. package/lib/utils/version.js +1 -1
  139. package/lib/utils/with-active-cookie.js +1 -1
  140. package/package.json +1 -1
@@ -1 +1 @@
1
- const a78_0x349383=a78_0x7633;(function(_0x519947,_0x5470ee){const _0x5a143e=a78_0x7633,_0x36f805=_0x519947();while(!![]){try{const _0x315d72=parseInt(_0x5a143e(0xbf))/0x1+-parseInt(_0x5a143e(0x9d))/0x2*(parseInt(_0x5a143e(0xb9))/0x3)+parseInt(_0x5a143e(0xa9))/0x4+parseInt(_0x5a143e(0x99))/0x5+parseInt(_0x5a143e(0x87))/0x6*(parseInt(_0x5a143e(0xa1))/0x7)+parseInt(_0x5a143e(0x92))/0x8+-parseInt(_0x5a143e(0x8f))/0x9*(parseInt(_0x5a143e(0x8b))/0xa);if(_0x315d72===_0x5470ee)break;else _0x36f805['push'](_0x36f805['shift']());}catch(_0x286cbd){_0x36f805['push'](_0x36f805['shift']());}}}(a78_0x28e8,0xae432));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';import{resolve,delimiter,join}from'node:path';import{spawn}from'node:child_process';import{CliErrors}from'../../errors.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';import{checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set([a78_0x349383(0xa8),a78_0x349383(0x95)]);function readPackageScripts(_0x5323b6){const _0x1f894c=a78_0x349383,_0x8b65c7=resolve(_0x5323b6,_0x1f894c(0xb5));if(!existsSync(_0x8b65c7))return null;try{const _0x43f0bc=JSON[_0x1f894c(0xab)](readFileSync(_0x8b65c7,_0x1f894c(0x86)));return _0x43f0bc['scripts']??{};}catch{return null;}}function a78_0x28e8(){const _0x314462=['npm','length','4271133SSZxFg','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','\x20exited\x20with\x20code\x20','close','log','\x20\x20AVAILABLE\x20SCRIPTS\x20\x20(current\x20project)','323868asCzwI','Script\x20\x22','needsUpgrade','\x20\x20EXAMPLES','.bin','max','slice','\x20run\x20preview\x20--watch\x20\x20\x20#\x20parallel\x20build\x20--watch\x20+\x20preview','utf-8','54RerhWt','join','pnpm-lock.yaml','Available:\x20','130mJwhUW','\x20run\x20','watch','\x20\x20\x20\x20','956673IUGSSl','vite\x20preview\x20exited\x20with\x20code\x20','yarn.lock','1361616ZCgsws','has','error','dev','--watch','bun.lock','padEnd','2789380xzQqmN','entries','\x20run\x20build','keys','2YZivUS','read','\x20run\x20preview','node_modules','943957KSdyuP','boolean','validation','yarn','bool','push','all','start','5014980fmXRnl','cwd','parse','\x20run\x20<script>\x0a','inherit','\x22\x20not\x20found\x20in\x20package.json.','bun','args','pnpm','map','Run\x20a\x20package.json\x20script','run','package.json','vite'];a78_0x28e8=function(){return _0x314462;};return a78_0x28e8();}function detectPackageManager(_0x48c857){const _0x4d7ce2=a78_0x349383;if(existsSync(resolve(_0x48c857,'bun.lockb'))||existsSync(resolve(_0x48c857,_0x4d7ce2(0x97))))return _0x4d7ce2(0xaf);if(existsSync(resolve(_0x48c857,_0x4d7ce2(0x89))))return _0x4d7ce2(0xb1);if(existsSync(resolve(_0x48c857,_0x4d7ce2(0x91))))return _0x4d7ce2(0xa4);return _0x4d7ce2(0xb7);}function a78_0x7633(_0x4ecd09,_0x118116){_0x4ecd09=_0x4ecd09-0x84;const _0x28e8f8=a78_0x28e8();let _0x763335=_0x28e8f8[_0x4ecd09];return _0x763335;}async function versionCheck(_0x35bb03){const _0x47eff4=a78_0x349383,_0x20f73c=await checkCliVersion();if(_0x20f73c['needsUpgrade'])printCliUpgradeWarning(_0x20f73c);const _0x5edbdb=await checkSdkVersion(_0x35bb03);if(_0x5edbdb[_0x47eff4(0xc1)])printSdkUpgradeWarning(_0x5edbdb);}function spawnScript(_0x1fad0f,_0x2e8e3e,_0x42f566,_0xfd9e47){return new Promise((_0x329de1,_0x30c75f)=>{const _0x1056b3=a78_0x7633,_0x3a01f9=['run',_0x2e8e3e,..._0x42f566],_0x5e86f4=spawn(_0x1fad0f,_0x3a01f9,{'cwd':_0xfd9e47,'stdio':_0x1056b3(0xad),'shell':!![],'env':{...process.env,'PATH':''+join(_0xfd9e47,'node_modules',_0x1056b3(0xc3))+delimiter+process.env.PATH}});_0x5e86f4['on']('close',_0xcd8c9a=>{const _0x9046f0=_0x1056b3;if(_0xcd8c9a===0x0||_0xcd8c9a===null)_0x329de1();else _0x30c75f(new Error(_0x1fad0f+'\x20run\x20'+_0x2e8e3e+_0x9046f0(0xbb)+_0xcd8c9a));}),_0x5e86f4['on'](_0x1056b3(0x94),_0x30c75f);});}function spawnViteBuildWatch(_0x4f3cf7){return new Promise((_0x59df11,_0x3244ea)=>{const _0x2405bf=a78_0x7633,_0x5c0686=spawn(_0x2405bf(0xb6),['build',_0x2405bf(0x96)],{'cwd':_0x4f3cf7,'stdio':_0x2405bf(0xad),'shell':!![],'env':{...process.env,'PATH':''+join(_0x4f3cf7,_0x2405bf(0xa0),'.bin')+delimiter+process.env.PATH}});_0x5c0686['on'](_0x2405bf(0xbc),_0x2d40d6=>{const _0x3997c0=_0x2405bf;if(_0x2d40d6===0x0||_0x2d40d6===null)_0x59df11();else _0x3244ea(new Error(_0x3997c0(0xba)+_0x2d40d6));}),_0x5c0686['on'](_0x2405bf(0x94),_0x3244ea);});}function spawnVitePreview(_0x5efd5e){return new Promise((_0x2bccaf,_0x5dbbe1)=>{const _0x55eb51=a78_0x7633,_0x475322=spawn('vite',['preview'],{'cwd':_0x5efd5e,'stdio':_0x55eb51(0xad),'shell':!![],'env':{...process.env,'PATH':''+join(_0x5efd5e,_0x55eb51(0xa0),_0x55eb51(0xc3))+delimiter+process.env.PATH}});_0x475322['on']('close',_0x516b7c=>{const _0x1c5c5e=_0x55eb51;if(_0x516b7c===0x0||_0x516b7c===null)_0x2bccaf();else _0x5dbbe1(new Error(_0x1c5c5e(0x90)+_0x516b7c));}),_0x475322['on'](_0x55eb51(0x94),_0x5dbbe1);});}const runFlags=[{'name':a78_0x349383(0x8d),'type':a78_0x349383(0xa2),'description':'Enable\x20watch\x20mode\x20for\x20preview','default':![]}];export const runDefinition={'service':a78_0x349383(0xb4),'command':a78_0x349383(0xb4),'description':a78_0x349383(0xb3),'risk':a78_0x349383(0x9e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'script','description':'Script\x20name\x20defined\x20in\x20package.json','required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x39e84b=a78_0x349383,_0x55d52b=readPackageScripts(process['cwd']()),_0x1592a6=[];if(_0x55d52b&&Object[_0x39e84b(0x9c)](_0x55d52b)[_0x39e84b(0xb8)]>0x0){const _0xa8df5a=Object['keys'](_0x55d52b),_0x1124ee=Math[_0x39e84b(0xc4)](..._0xa8df5a[_0x39e84b(0xb2)](_0x1118de=>_0x1118de[_0x39e84b(0xb8)]));_0x1592a6[_0x39e84b(0xa6)](_0x39e84b(0xbe));for(const [_0x199585,_0x378330]of Object[_0x39e84b(0x9a)](_0x55d52b)){_0x1592a6[_0x39e84b(0xa6)](_0x39e84b(0x8e)+CLI_BIN_NAME+_0x39e84b(0x8c)+_0x199585['padEnd'](_0x1124ee+0x2)+'#\x20'+_0x378330);}}else _0x1592a6[_0x39e84b(0xa6)](_0x39e84b(0xc2)),_0x1592a6['push'](_0x39e84b(0x8e)+CLI_BIN_NAME+'\x20run\x20start'),_0x1592a6['push'](_0x39e84b(0x8e)+CLI_BIN_NAME+_0x39e84b(0x9b)),_0x1592a6['push'](_0x39e84b(0x8e)+CLI_BIN_NAME+_0x39e84b(0x9f)),_0x1592a6[_0x39e84b(0xa6)](_0x39e84b(0x8e)+CLI_BIN_NAME+_0x39e84b(0x85));return _0x1592a6['join']('\x0a');},async 'execute'(_0x2af62e){const _0x4997a1=a78_0x349383,_0x42db94=process[_0x4997a1(0xaa)](),_0x5dd002=_0x2af62e[_0x4997a1(0xb0)][0x0],_0x5314cc=_0x2af62e['args'][_0x4997a1(0x84)](0x1),_0xfb583a=readPackageScripts(_0x42db94);if(!_0xfb583a)throw CliErrors[_0x4997a1(0xa3)]('No\x20package.json\x20found\x20in\x20current\x20directory.');if(!_0x5dd002){const _0x356eb1=Object[_0x4997a1(0x9c)](_0xfb583a);if(_0x356eb1[_0x4997a1(0xb8)]===0x0)console[_0x4997a1(0xbd)]('No\x20scripts\x20defined\x20in\x20package.json.');else{console[_0x4997a1(0xbd)]('\x0a\x20\x20Available\x20scripts:\x0a');const _0x12dd6d=Math[_0x4997a1(0xc4)](..._0x356eb1[_0x4997a1(0xb2)](_0x492183=>_0x492183[_0x4997a1(0xb8)]));for(const [_0x277970,_0x42b4e9]of Object['entries'](_0xfb583a)){console[_0x4997a1(0xbd)]('\x20\x20\x20\x20'+_0x277970[_0x4997a1(0x98)](_0x12dd6d+0x2)+_0x42b4e9);}console[_0x4997a1(0xbd)]('\x0a\x20\x20Usage:\x20'+CLI_BIN_NAME+_0x4997a1(0xac));}return{'ok':!![]};}if(!_0xfb583a[_0x5dd002])throw CliErrors[_0x4997a1(0xa3)](_0x4997a1(0xc0)+_0x5dd002+_0x4997a1(0xae),_0x4997a1(0x8a)+(Object[_0x4997a1(0x9c)](_0xfb583a)[_0x4997a1(0x88)](',\x20')||'(none)'));const _0x355a6a=detectPackageManager(_0x42db94);VERSION_CHECK_SCRIPTS[_0x4997a1(0x93)](_0x5dd002)&&await versionCheck(_0x42db94);if(_0x5dd002==='preview'&&_0x2af62e[_0x4997a1(0xa5)](_0x4997a1(0x8d)))return await Promise[_0x4997a1(0xa7)]([spawnViteBuildWatch(_0x42db94),spawnVitePreview(_0x42db94)]),{'ok':!![]};return await spawnScript(_0x355a6a,_0x5dd002,_0x5314cc,_0x42db94),{'ok':!![]};}};
1
+ const a78_0xec616d=a78_0x1525;function a78_0x1525(_0x229c25,_0x2640ef){_0x229c25=_0x229c25-0x1bf;const _0x44d80c=a78_0x44d8();let _0x152540=_0x44d80c[_0x229c25];return _0x152540;}(function(_0x53d236,_0x2bb9b8){const _0x453f3d=a78_0x1525,_0x2376fc=_0x53d236();while(!![]){try{const _0x436d65=-parseInt(_0x453f3d(0x1bf))/0x1+-parseInt(_0x453f3d(0x1ed))/0x2+parseInt(_0x453f3d(0x1d5))/0x3+parseInt(_0x453f3d(0x1c1))/0x4*(parseInt(_0x453f3d(0x1f2))/0x5)+-parseInt(_0x453f3d(0x1c3))/0x6+parseInt(_0x453f3d(0x1d0))/0x7*(-parseInt(_0x453f3d(0x1da))/0x8)+parseInt(_0x453f3d(0x1cf))/0x9;if(_0x436d65===_0x2bb9b8)break;else _0x2376fc['push'](_0x2376fc['shift']());}catch(_0x53be32){_0x2376fc['push'](_0x2376fc['shift']());}}}(a78_0x44d8,0x9a275));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';import{resolve,delimiter,join}from'node:path';import{spawn}from'node:child_process';import{CliErrors}from'../../errors.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';import{checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set([a78_0xec616d(0x1d2),a78_0xec616d(0x1f8)]);function readPackageScripts(_0x56c90b){const _0x219120=a78_0xec616d,_0x7c9b60=resolve(_0x56c90b,'package.json');if(!existsSync(_0x7c9b60))return null;try{const _0x3c2293=JSON[_0x219120(0x1e2)](readFileSync(_0x7c9b60,'utf-8'));return _0x3c2293['scripts']??{};}catch{return null;}}function detectPackageManager(_0x429ca4){const _0x458017=a78_0xec616d;if(existsSync(resolve(_0x429ca4,'bun.lockb'))||existsSync(resolve(_0x429ca4,'bun.lock')))return'bun';if(existsSync(resolve(_0x429ca4,_0x458017(0x1f4))))return _0x458017(0x1c5);if(existsSync(resolve(_0x429ca4,_0x458017(0x1d4))))return _0x458017(0x1e7);return _0x458017(0x1cd);}async function versionCheck(_0x443a00){const _0x2855bc=a78_0xec616d,_0x2e437f=await checkCliVersion();if(_0x2e437f['needsUpgrade'])printCliUpgradeWarning(_0x2e437f);const _0x2db6df=await checkSdkVersion(_0x443a00);if(_0x2db6df[_0x2855bc(0x1fa)])printSdkUpgradeWarning(_0x2db6df);}function spawnScript(_0x3a697e,_0x2cdfc9,_0x5c4fc3,_0x5d0153){return new Promise((_0x1f41d9,_0x32eb2f)=>{const _0x228790=a78_0x1525,_0x25dc2d=['run',_0x2cdfc9,..._0x5c4fc3],_0x29bcc5=spawn(_0x3a697e,_0x25dc2d,{'cwd':_0x5d0153,'stdio':_0x228790(0x1df),'shell':!![],'env':{...process.env,'PATH':''+join(_0x5d0153,_0x228790(0x1e9),_0x228790(0x1f6))+delimiter+process.env.PATH}});_0x29bcc5['on'](_0x228790(0x1e5),_0x20db6e=>{const _0x863231=_0x228790;if(_0x20db6e===0x0||_0x20db6e===null)_0x1f41d9();else _0x32eb2f(new Error(_0x3a697e+_0x863231(0x1e3)+_0x2cdfc9+_0x863231(0x1e6)+_0x20db6e));}),_0x29bcc5['on'](_0x228790(0x1c2),_0x32eb2f);});}function spawnViteBuildWatch(_0x17d378){return new Promise((_0x175308,_0x13508c)=>{const _0x3a350c=a78_0x1525,_0x2cf49b=spawn(_0x3a350c(0x1c0),[_0x3a350c(0x1cc),_0x3a350c(0x1d1)],{'cwd':_0x17d378,'stdio':_0x3a350c(0x1df),'shell':!![],'env':{...process.env,'PATH':''+join(_0x17d378,_0x3a350c(0x1e9),'.bin')+delimiter+process.env.PATH}});_0x2cf49b['on'](_0x3a350c(0x1e5),_0x110258=>{if(_0x110258===0x0||_0x110258===null)_0x175308();else _0x13508c(new Error('vite\x20build\x20--watch\x20exited\x20with\x20code\x20'+_0x110258));}),_0x2cf49b['on'](_0x3a350c(0x1c2),_0x13508c);});}function spawnVitePreview(_0x3fd1eb){return new Promise((_0x2769f5,_0x2f7bc7)=>{const _0x13a64d=a78_0x1525,_0x14ac28=spawn(_0x13a64d(0x1c0),[_0x13a64d(0x1db)],{'cwd':_0x3fd1eb,'stdio':_0x13a64d(0x1df),'shell':!![],'env':{...process.env,'PATH':''+join(_0x3fd1eb,_0x13a64d(0x1e9),_0x13a64d(0x1f6))+delimiter+process.env.PATH}});_0x14ac28['on'](_0x13a64d(0x1e5),_0x2cd795=>{const _0x1dafda=_0x13a64d;if(_0x2cd795===0x0||_0x2cd795===null)_0x2769f5();else _0x2f7bc7(new Error(_0x1dafda(0x1fb)+_0x2cd795));}),_0x14ac28['on']('error',_0x2f7bc7);});}function a78_0x44d8(){const _0x2dbdcf=['\x20\x20AVAILABLE\x20SCRIPTS\x20\x20(current\x20project)','\x20\x20\x20\x20','join','24uXCqBa','preview','push','entries','Script\x20name\x20defined\x20in\x20package.json','inherit','args','Script\x20\x22','parse','\x20run\x20','\x0a\x20\x20Available\x20scripts:\x0a','close','\x20exited\x20with\x20code\x20','yarn','keys','node_modules','script','\x20run\x20build','run','1022090cnrzvw','(none)','max','Run\x20a\x20package.json\x20script','validation','5RjbFTv','\x22\x20not\x20found\x20in\x20package.json.','pnpm-lock.yaml','log','.bin','length','dev','Available:\x20','needsUpgrade','vite\x20preview\x20exited\x20with\x20code\x20','\x20run\x20preview\x20--watch\x20\x20\x20#\x20parallel\x20build\x20--watch\x20+\x20preview','818561oOQbuq','vite','1407056dnGQbZ','error','355116uWEXWJ','\x20run\x20start','pnpm','boolean','map','\x20run\x20<script>\x0a','bool','watch','Enable\x20watch\x20mode\x20for\x20preview','build','npm','\x20\x20EXAMPLES','8790201OjoRIH','1310022bmMPNI','--watch','start','No\x20scripts\x20defined\x20in\x20package.json.','yarn.lock','3759570UxRMFo','padEnd'];a78_0x44d8=function(){return _0x2dbdcf;};return a78_0x44d8();}const runFlags=[{'name':a78_0xec616d(0x1ca),'type':a78_0xec616d(0x1c6),'description':a78_0xec616d(0x1cb),'default':![]}];export const runDefinition={'service':a78_0xec616d(0x1ec),'command':a78_0xec616d(0x1ec),'description':a78_0xec616d(0x1f0),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a78_0xec616d(0x1ea),'description':a78_0xec616d(0x1de),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x3f6129=a78_0xec616d,_0x5ed30b=readPackageScripts(process['cwd']()),_0x2a0f1e=[];if(_0x5ed30b&&Object[_0x3f6129(0x1e8)](_0x5ed30b)[_0x3f6129(0x1f7)]>0x0){const _0xa37ec1=Object['keys'](_0x5ed30b),_0x47292d=Math[_0x3f6129(0x1ef)](..._0xa37ec1[_0x3f6129(0x1c7)](_0x307f84=>_0x307f84[_0x3f6129(0x1f7)]));_0x2a0f1e['push'](_0x3f6129(0x1d7));for(const [_0x46a8ac,_0x1b786b]of Object[_0x3f6129(0x1dd)](_0x5ed30b)){_0x2a0f1e[_0x3f6129(0x1dc)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x3f6129(0x1e3)+_0x46a8ac[_0x3f6129(0x1d6)](_0x47292d+0x2)+'#\x20'+_0x1b786b);}}else _0x2a0f1e[_0x3f6129(0x1dc)](_0x3f6129(0x1ce)),_0x2a0f1e['push'](_0x3f6129(0x1d8)+CLI_BIN_NAME+_0x3f6129(0x1c4)),_0x2a0f1e[_0x3f6129(0x1dc)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x3f6129(0x1eb)),_0x2a0f1e[_0x3f6129(0x1dc)](_0x3f6129(0x1d8)+CLI_BIN_NAME+'\x20run\x20preview'),_0x2a0f1e[_0x3f6129(0x1dc)](_0x3f6129(0x1d8)+CLI_BIN_NAME+_0x3f6129(0x1fc));return _0x2a0f1e[_0x3f6129(0x1d9)]('\x0a');},async 'execute'(_0x2f3652){const _0x2ba35a=a78_0xec616d,_0x509dc9=process['cwd'](),_0x3846bb=_0x2f3652[_0x2ba35a(0x1e0)][0x0],_0x39392a=_0x2f3652['args']['slice'](0x1),_0x3b60ee=readPackageScripts(_0x509dc9);if(!_0x3b60ee)throw CliErrors['validation']('No\x20package.json\x20found\x20in\x20current\x20directory.');if(!_0x3846bb){const _0x7d6ef0=Object[_0x2ba35a(0x1e8)](_0x3b60ee);if(_0x7d6ef0[_0x2ba35a(0x1f7)]===0x0)console['log'](_0x2ba35a(0x1d3));else{console['log'](_0x2ba35a(0x1e4));const _0xb03660=Math[_0x2ba35a(0x1ef)](..._0x7d6ef0[_0x2ba35a(0x1c7)](_0x3164cd=>_0x3164cd[_0x2ba35a(0x1f7)]));for(const [_0x16b43a,_0x2d1318]of Object['entries'](_0x3b60ee)){console['log'](_0x2ba35a(0x1d8)+_0x16b43a[_0x2ba35a(0x1d6)](_0xb03660+0x2)+_0x2d1318);}console[_0x2ba35a(0x1f5)]('\x0a\x20\x20Usage:\x20'+CLI_BIN_NAME+_0x2ba35a(0x1c8));}return{'ok':!![]};}if(!_0x3b60ee[_0x3846bb])throw CliErrors[_0x2ba35a(0x1f1)](_0x2ba35a(0x1e1)+_0x3846bb+_0x2ba35a(0x1f3),_0x2ba35a(0x1f9)+(Object['keys'](_0x3b60ee)[_0x2ba35a(0x1d9)](',\x20')||_0x2ba35a(0x1ee)));const _0x3517cf=detectPackageManager(_0x509dc9);VERSION_CHECK_SCRIPTS['has'](_0x3846bb)&&await versionCheck(_0x509dc9);if(_0x3846bb===_0x2ba35a(0x1db)&&_0x2f3652[_0x2ba35a(0x1c9)](_0x2ba35a(0x1ca)))return await Promise['all']([spawnViteBuildWatch(_0x509dc9),spawnVitePreview(_0x509dc9)]),{'ok':!![]};return await spawnScript(_0x3517cf,_0x3846bb,_0x39392a,_0x509dc9),{'ok':!![]};}};
@@ -1 +1 @@
1
- const a79_0x4294d7=a79_0x7050;function a79_0x7050(_0x19165e,_0x3fd62c){_0x19165e=_0x19165e-0x13f;const _0x28ce88=a79_0x28ce();let _0x705092=_0x28ce88[_0x19165e];return _0x705092;}(function(_0x3458b2,_0x42e800){const _0x5456ea=a79_0x7050,_0x3d4da5=_0x3458b2();while(!![]){try{const _0x1f4198=parseInt(_0x5456ea(0x14a))/0x1+parseInt(_0x5456ea(0x141))/0x2+-parseInt(_0x5456ea(0x149))/0x3+-parseInt(_0x5456ea(0x142))/0x4+parseInt(_0x5456ea(0x143))/0x5+-parseInt(_0x5456ea(0x14b))/0x6*(parseInt(_0x5456ea(0x145))/0x7)+-parseInt(_0x5456ea(0x146))/0x8;if(_0x1f4198===_0x42e800)break;else _0x3d4da5['push'](_0x3d4da5['shift']());}catch(_0x4adcfa){_0x3d4da5['push'](_0x3d4da5['shift']());}}}(a79_0x28ce,0xb4a23));import{buildSchemaPayload}from'../framework/schema-export.js';function a79_0x28ce(){const _0x2da674=['read','850773tRmfJX','1134025FntYBx','30nMUSab','export','schema','1573984NSKdns','1923084LBNpfz','3699590zdCmiZ','Export\x20machine-readable\x20command\x20schema\x20(JSON)','1529801IDMlor','511864jIKJya','json'];a79_0x28ce=function(){return _0x2da674;};return a79_0x28ce();}async function execute(_0x492b5e){const _0x2b9e98=await buildSchemaPayload();return{'ok':!![],'data':_0x2b9e98};}export const schemaDefinition={'service':a79_0x4294d7(0x140),'command':a79_0x4294d7(0x13f),'description':a79_0x4294d7(0x144),'risk':a79_0x4294d7(0x148),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a79_0x4294d7(0x147),'flags':[],'execute':execute};
1
+ const a79_0x39cd41=a79_0x4b4d;function a79_0x4b4d(_0x40be04,_0x1f9bf3){_0x40be04=_0x40be04-0x114;const _0x2c5838=a79_0x2c58();let _0x4b4d56=_0x2c5838[_0x40be04];return _0x4b4d56;}(function(_0x22c0c3,_0x5d787f){const _0x727c37=a79_0x4b4d,_0x4a20e4=_0x22c0c3();while(!![]){try{const _0x3a15de=-parseInt(_0x727c37(0x11b))/0x1*(parseInt(_0x727c37(0x117))/0x2)+parseInt(_0x727c37(0x11e))/0x3+parseInt(_0x727c37(0x119))/0x4+parseInt(_0x727c37(0x121))/0x5*(-parseInt(_0x727c37(0x116))/0x6)+parseInt(_0x727c37(0x115))/0x7*(-parseInt(_0x727c37(0x118))/0x8)+-parseInt(_0x727c37(0x11d))/0x9+parseInt(_0x727c37(0x114))/0xa;if(_0x3a15de===_0x5d787f)break;else _0x4a20e4['push'](_0x4a20e4['shift']());}catch(_0x3b62ed){_0x4a20e4['push'](_0x4a20e4['shift']());}}}(a79_0x2c58,0xdd515));function a79_0x2c58(){const _0xfc9108=['export','22696JnlJTz','json','4845843eiLdLi','4705449sGWgvQ','Export\x20machine-readable\x20command\x20schema\x20(JSON)','schema','7429785SKzmjB','31137980zPRTpz','29071pTDWRG','6AIPRsD','110OolNkc','2856ZLXOAx','3918084ZoICEi'];a79_0x2c58=function(){return _0xfc9108;};return a79_0x2c58();}import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x207878){const _0x5ec084=await buildSchemaPayload();return{'ok':!![],'data':_0x5ec084};}export const schemaDefinition={'service':a79_0x39cd41(0x120),'command':a79_0x39cd41(0x11a),'description':a79_0x39cd41(0x11f),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a79_0x39cd41(0x11c),'flags':[],'execute':execute};
@@ -1 +1 @@
1
- function a80_0x4e22(){const _0x33dd00=['pipe','skipped','执行安装技能包命令(委托给\x20npx\x20skills\x20--global)','write','log','\x20skill\x20installed','cwd','install','10mJZLpd','../../skills/npx-skills-add.js','288294JTEOhG','Check\x20network\x20connectivity\x20and\x20try\x20again.','nonInteractive','2795320fBPMoR','558bTcoZz','setLogPath','634130wrIQnW','info','27MNsCOT','npx\x20skills\x20add\x20failed:\x20','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20skill\x20is\x20already\x20present.','error','41010NLjARx','338074gBbfzZ','inherit','apiError','24bggqFl','skill-install','149680VlzevT','Install\x20developer\x20skill\x20package','8636dhLTMD','lovrabet/rabetbase'];a80_0x4e22=function(){return _0x33dd00;};return a80_0x4e22();}const a80_0x31104e=a80_0x1699;(function(_0x386bd4,_0x44fbfa){const _0x2a019c=a80_0x1699,_0x27296f=_0x386bd4();while(!![]){try{const _0x3d7118=parseInt(_0x2a019c(0x1e7))/0x1+parseInt(_0x2a019c(0x1e2))/0x2+-parseInt(_0x2a019c(0x1dd))/0x3*(parseInt(_0x2a019c(0x1e9))/0x4)+parseInt(_0x2a019c(0x1d3))/0x5*(parseInt(_0x2a019c(0x1d5))/0x6)+parseInt(_0x2a019c(0x1db))/0x7*(parseInt(_0x2a019c(0x1e5))/0x8)+parseInt(_0x2a019c(0x1d9))/0x9*(-parseInt(_0x2a019c(0x1e1))/0xa)+-parseInt(_0x2a019c(0x1d8))/0xb;if(_0x3d7118===_0x44fbfa)break;else _0x27296f['push'](_0x27296f['shift']());}catch(_0x170013){_0x27296f['push'](_0x27296f['shift']());}}}(a80_0x4e22,0x26c34));import{CliErrors}from'../../errors.js';function a80_0x1699(_0x216eb5,_0x5db106){_0x216eb5=_0x216eb5-0x1cd;const _0x4e22ec=a80_0x4e22();let _0x169902=_0x4e22ec[_0x216eb5];return _0x169902;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';export const skillDefinitions=[{'service':'skill','command':a80_0x31104e(0x1d2),'description':a80_0x31104e(0x1e8),'risk':a80_0x31104e(0x1ce),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5ba5e4){const _0xdbaca7=a80_0x31104e;logger[_0xdbaca7(0x1da)](process[_0xdbaca7(0x1d1)]()),logger[_0xdbaca7(0x1dc)](_0xdbaca7(0x1e6),_0xdbaca7(0x1cd));const {runNpxSkillsAddGlobal:_0x10ac2e}=await import(_0xdbaca7(0x1d4)),_0x4bf4dd=_0x5ba5e4[_0xdbaca7(0x1d7)]?_0xdbaca7(0x1eb):_0xdbaca7(0x1e3);console[_0xdbaca7(0x1cf)]('Installing\x20official\x20skill\x20via\x20npx\x20(npx\x20-y\x20skills\x20add\x20lovrabet/rabetbase\x20--global)...');const _0x2d3376=_0x10ac2e(process['cwd'](),_0xdbaca7(0x1ea),{'stdio':_0x4bf4dd});if(_0x2d3376[_0xdbaca7(0x1ec)])console[_0xdbaca7(0x1cf)](_0xdbaca7(0x1df));else{if(_0x2d3376['ok'])console[_0xdbaca7(0x1cf)](CLI_BIN_NAME+_0xdbaca7(0x1d0));else throw CliErrors[_0xdbaca7(0x1e4)](_0xdbaca7(0x1de)+(_0x2d3376[_0xdbaca7(0x1e0)]||'unknown'),_0xdbaca7(0x1d6));}return{'ok':!![]};}}];
1
+ const a80_0x93aff=a80_0x2952;(function(_0x243b81,_0x47c95d){const _0x277968=a80_0x2952,_0x37b021=_0x243b81();while(!![]){try{const _0x1e6c9c=-parseInt(_0x277968(0x1c5))/0x1*(-parseInt(_0x277968(0x1ba))/0x2)+parseInt(_0x277968(0x1b8))/0x3*(-parseInt(_0x277968(0x1c4))/0x4)+-parseInt(_0x277968(0x1c7))/0x5+-parseInt(_0x277968(0x1c9))/0x6+parseInt(_0x277968(0x1b4))/0x7+parseInt(_0x277968(0x1bd))/0x8*(-parseInt(_0x277968(0x1b6))/0x9)+parseInt(_0x277968(0x1c1))/0xa;if(_0x1e6c9c===_0x47c95d)break;else _0x37b021['push'](_0x37b021['shift']());}catch(_0x3b01ba){_0x37b021['push'](_0x37b021['shift']());}}}(a80_0x22b7,0xec538));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';function a80_0x2952(_0x3c4920,_0x4b1592){_0x3c4920=_0x3c4920-0x1b0;const _0x22b79c=a80_0x22b7();let _0x29523b=_0x22b79c[_0x3c4920];return _0x29523b;}function a80_0x22b7(){const _0x1326aa=['apiError','6858453KjhrGU','setLogPath','27vslUah','\x20skill\x20installed','3GVPvgq','log','2687900syTMRG','install','nonInteractive','3016472nsNOrA','../../skills/npx-skills-add.js','inherit','pipe','49669680TctjJM','npx\x20skills\x20add\x20failed:\x20','write','5828728CnArgZ','1izOtzt','skill-install','9341990rcvhaz','unknown','11195688HjVPWd','info','cwd','skill','skipped','Installing\x20official\x20skill\x20via\x20npx\x20(npx\x20-y\x20skills\x20add\x20lovrabet/rabetbase\x20--global)...','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20skill\x20is\x20already\x20present.'];a80_0x22b7=function(){return _0x1326aa;};return a80_0x22b7();}export const skillDefinitions=[{'service':a80_0x93aff(0x1cc),'command':a80_0x93aff(0x1bb),'description':'Install\x20developer\x20skill\x20package','risk':a80_0x93aff(0x1c3),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4fa18f){const _0x4f834b=a80_0x93aff;logger[_0x4f834b(0x1b5)](process[_0x4f834b(0x1cb)]()),logger[_0x4f834b(0x1ca)](_0x4f834b(0x1c6),'执行安装技能包命令(委托给\x20npx\x20skills\x20--global)');const {runNpxSkillsAddGlobal:_0x1edca5}=await import(_0x4f834b(0x1be)),_0x358b05=_0x4fa18f[_0x4f834b(0x1bc)]?_0x4f834b(0x1c0):_0x4f834b(0x1bf);console[_0x4f834b(0x1b9)](_0x4f834b(0x1b1));const _0x342f2b=_0x1edca5(process[_0x4f834b(0x1cb)](),'lovrabet/rabetbase',{'stdio':_0x358b05});if(_0x342f2b[_0x4f834b(0x1b0)])console[_0x4f834b(0x1b9)](_0x4f834b(0x1b2));else{if(_0x342f2b['ok'])console[_0x4f834b(0x1b9)](CLI_BIN_NAME+_0x4f834b(0x1b7));else throw CliErrors[_0x4f834b(0x1b3)](_0x4f834b(0x1c2)+(_0x342f2b['error']||_0x4f834b(0x1c8)),'Check\x20network\x20connectivity\x20and\x20try\x20again.');}return{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a81_0x1a940a=a81_0x1f12;(function(_0x4102b6,_0x471c7f){const _0x16debb=a81_0x1f12,_0x34f8c0=_0x4102b6();while(!![]){try{const _0x516537=-parseInt(_0x16debb(0x7c))/0x1*(parseInt(_0x16debb(0x65))/0x2)+-parseInt(_0x16debb(0x6d))/0x3+-parseInt(_0x16debb(0x7a))/0x4+-parseInt(_0x16debb(0x6b))/0x5*(parseInt(_0x16debb(0x71))/0x6)+-parseInt(_0x16debb(0x72))/0x7*(parseInt(_0x16debb(0x66))/0x8)+-parseInt(_0x16debb(0x68))/0x9*(-parseInt(_0x16debb(0x77))/0xa)+-parseInt(_0x16debb(0x73))/0xb*(-parseInt(_0x16debb(0x76))/0xc);if(_0x516537===_0x471c7f)break;else _0x34f8c0['push'](_0x34f8c0['shift']());}catch(_0x3c7c27){_0x34f8c0['push'](_0x34f8c0['shift']());}}}(a81_0x362d,0xb9557));function a81_0x362d(){const _0x1f606d=['1896kOZNMF','130hqzOMR','appCode','sqlName','2240072LxkKTp','str','610424dLLMxu','2naxghd','785904UQOjQE','dbId','790461sBWzqS','read','sqlCode','930QYBCWH','Return\x20full\x20raw\x20SQL\x20query\x20object','3085362Xwvfit','verbose','sql','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','40422acsAnX','91eoaxyu','302599VgvDNV','bool','detail'];a81_0x362d=function(){return _0x1f606d;};return a81_0x362d();}import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a81_0x1f12(_0x122dff,_0x318015){_0x122dff=_0x122dff-0x65;const _0x362d66=a81_0x362d();let _0x1f12c3=_0x362d66[_0x122dff];return _0x1f12c3;}export const sqlDetail={'service':a81_0x1a940a(0x6f),'command':a81_0x1a940a(0x75),'description':a81_0x1a940a(0x70),'risk':a81_0x1a940a(0x69),'flags':[SQLCODE_FLAG,{'name':a81_0x1a940a(0x6e),'type':'boolean','description':a81_0x1a940a(0x6c)}],async 'execute'(_0x52eb2d){const _0x1873fd=a81_0x1a940a,_0x58a117=await getSqlQueryInfo(_0x52eb2d[_0x1873fd(0x78)],_0x52eb2d[_0x1873fd(0x7b)]('sqlcode')),_0x54f203=_0x52eb2d[_0x1873fd(0x74)](_0x1873fd(0x6e));if(_0x54f203)return{'ok':!![],'data':_0x58a117};const _0xe2587=_0x58a117[_0x1873fd(0x67)]?await getDbName(_0x52eb2d[_0x1873fd(0x78)],_0x58a117['dbId']):undefined;return{'ok':!![],'data':{'sqlCode':_0x58a117[_0x1873fd(0x6a)],'sqlName':_0x58a117[_0x1873fd(0x79)],'db':_0xe2587?_0xe2587+'\x20('+_0x58a117[_0x1873fd(0x67)]+')':_0x58a117['dbId']??'','description':_0x58a117['description']??'','sqlContent':_0x58a117['sqlContent']??''}};}};
1
+ const a81_0x2ee90e=a81_0x2a40;(function(_0x51d6bd,_0x3ff790){const _0x3a164f=a81_0x2a40,_0x15e469=_0x51d6bd();while(!![]){try{const _0x4c3028=-parseInt(_0x3a164f(0x149))/0x1*(parseInt(_0x3a164f(0x133))/0x2)+parseInt(_0x3a164f(0x137))/0x3*(-parseInt(_0x3a164f(0x146))/0x4)+-parseInt(_0x3a164f(0x131))/0x5+-parseInt(_0x3a164f(0x134))/0x6*(parseInt(_0x3a164f(0x13e))/0x7)+-parseInt(_0x3a164f(0x145))/0x8*(parseInt(_0x3a164f(0x140))/0x9)+parseInt(_0x3a164f(0x13c))/0xa*(parseInt(_0x3a164f(0x139))/0xb)+parseInt(_0x3a164f(0x147))/0xc;if(_0x4c3028===_0x3ff790)break;else _0x15e469['push'](_0x15e469['shift']());}catch(_0x41f5d9){_0x15e469['push'](_0x15e469['shift']());}}}(a81_0x4515,0x8aada));function a81_0x4515(){const _0x2ee3e6=['35427372sGEFft','appCode','1pdVUQb','boolean','4329005FYGZsS','Return\x20full\x20raw\x20SQL\x20query\x20object','643638jDLyrz','6031686znScMv','sqlCode','sql','29433GYjTXK','read','2182895GhhiiG','bool','description','20eLfoYQ','sqlcode','7yogQuZ','dbId','837ARQuHq','detail','verbose','sqlName','str','4184PhdzoK','220RjghPw'];a81_0x4515=function(){return _0x2ee3e6;};return a81_0x4515();}import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';function a81_0x2a40(_0x8f0a40,_0x17cfaa){_0x8f0a40=_0x8f0a40-0x131;const _0x451520=a81_0x4515();let _0x2a4010=_0x451520[_0x8f0a40];return _0x2a4010;}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':a81_0x2ee90e(0x136),'command':a81_0x2ee90e(0x141),'description':'Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','risk':a81_0x2ee90e(0x138),'flags':[SQLCODE_FLAG,{'name':'verbose','type':a81_0x2ee90e(0x14a),'description':a81_0x2ee90e(0x132)}],async 'execute'(_0x503c46){const _0x514cbc=a81_0x2ee90e,_0x260316=await getSqlQueryInfo(_0x503c46[_0x514cbc(0x148)],_0x503c46[_0x514cbc(0x144)](_0x514cbc(0x13d))),_0x562b0a=_0x503c46[_0x514cbc(0x13a)](_0x514cbc(0x142));if(_0x562b0a)return{'ok':!![],'data':_0x260316};const _0x571343=_0x260316[_0x514cbc(0x13f)]?await getDbName(_0x503c46[_0x514cbc(0x148)],_0x260316[_0x514cbc(0x13f)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x260316[_0x514cbc(0x135)],'sqlName':_0x260316[_0x514cbc(0x143)],'db':_0x571343?_0x571343+'\x20('+_0x260316['dbId']+')':_0x260316[_0x514cbc(0x13f)]??'','description':_0x260316[_0x514cbc(0x13b)]??'','sqlContent':_0x260316['sqlContent']??''}};}};
@@ -1 +1 @@
1
- const a82_0x1f848a=a82_0x3b3b;(function(_0xabb2d5,_0x7af4a5){const _0x5a7fdf=a82_0x3b3b,_0x368927=_0xabb2d5();while(!![]){try{const _0x1d65bb=parseInt(_0x5a7fdf(0x138))/0x1*(-parseInt(_0x5a7fdf(0x13b))/0x2)+-parseInt(_0x5a7fdf(0x134))/0x3+parseInt(_0x5a7fdf(0x139))/0x4+parseInt(_0x5a7fdf(0x137))/0x5*(-parseInt(_0x5a7fdf(0x130))/0x6)+-parseInt(_0x5a7fdf(0x133))/0x7*(parseInt(_0x5a7fdf(0x136))/0x8)+parseInt(_0x5a7fdf(0x131))/0x9+parseInt(_0x5a7fdf(0x12d))/0xa;if(_0x1d65bb===_0x7af4a5)break;else _0x368927['push'](_0x368927['shift']());}catch(_0x33510b){_0x368927['push'](_0x368927['shift']());}}}(a82_0x4ddc,0xc644a));function a82_0x3b3b(_0x4e6ca4,_0x1a6f30){_0x4e6ca4=_0x4e6ca4-0x126;const _0x4ddcb8=a82_0x4ddc();let _0x3b3bd0=_0x4ddcb8[_0x4e6ca4];return _0x3b3bd0;}function a82_0x4ddc(){const _0x383d30=['100270euCdHx','41AwUpik','3898760AWRJTr','\x20row(s)\x20in\x20','40410zstYZo','sqlcode','execError','parse','execResult','Invalid\x20JSON\x20for\x20--params:\x20','sql','length','execSuccess','str','string','now','validation','read','params','23277340qwKWoT','exec','SQL\x20execution\x20failed','138ZSbFey','7240176HGGmTH','isArray','1883YZCQkb','4660452xpyWcY','appCode','13432AhqiPo'];a82_0x4ddc=function(){return _0x383d30;};return a82_0x4ddc();}import{executeSql}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const sqlExec={'service':a82_0x1f848a(0x141),'command':a82_0x1f848a(0x12e),'description':'Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','risk':a82_0x1f848a(0x12b),'flags':[SQLCODE_FLAG,{'name':a82_0x1f848a(0x12c),'type':a82_0x1f848a(0x128),'description':'SQL\x20parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)'}],async 'execute'(_0x346370){const _0x217af1=a82_0x1f848a;let _0x573f66;const _0xf07960=_0x346370[_0x217af1(0x127)](_0x217af1(0x12c));if(_0xf07960)try{_0x573f66=JSON[_0x217af1(0x13e)](_0xf07960);}catch{throw CliErrors[_0x217af1(0x12a)](_0x217af1(0x140)+_0xf07960);}const _0x185e11=Date[_0x217af1(0x129)](),_0x26e283=await executeSql(_0x346370[_0x217af1(0x135)],_0x346370[_0x217af1(0x127)](_0x217af1(0x13c)),_0x573f66),_0xc1ae4b=Date[_0x217af1(0x129)]()-_0x185e11,_0x38f99b=_0x26e283?.[_0x217af1(0x13f)]??_0x26e283,_0xe2d4b7=_0x26e283?.[_0x217af1(0x126)]??!![];if(!_0xe2d4b7)return{'ok':![],'data':{'error':_0x26e283?.[_0x217af1(0x13d)]||_0x217af1(0x12f),'elapsed':_0xc1ae4b},'message':_0x217af1(0x12f)};const _0x3ec59f=Array[_0x217af1(0x132)](_0x38f99b)?_0x38f99b:[];return{'ok':!![],'data':{'rows':_0x3ec59f,'rowCount':_0x3ec59f[_0x217af1(0x142)],'elapsed':_0xc1ae4b},'message':'Returned\x20'+_0x3ec59f[_0x217af1(0x142)]+_0x217af1(0x13a)+_0xc1ae4b+'ms'};}};
1
+ const a82_0x18d5bd=a82_0x3511;(function(_0x318024,_0x60070d){const _0x2772bc=a82_0x3511,_0xe14857=_0x318024();while(!![]){try{const _0x4f4b7b=parseInt(_0x2772bc(0x1dd))/0x1*(-parseInt(_0x2772bc(0x1d9))/0x2)+parseInt(_0x2772bc(0x1e6))/0x3*(-parseInt(_0x2772bc(0x1d2))/0x4)+parseInt(_0x2772bc(0x1d3))/0x5*(-parseInt(_0x2772bc(0x1e5))/0x6)+parseInt(_0x2772bc(0x1e3))/0x7*(parseInt(_0x2772bc(0x1e8))/0x8)+parseInt(_0x2772bc(0x1ea))/0x9*(parseInt(_0x2772bc(0x1f0))/0xa)+-parseInt(_0x2772bc(0x1eb))/0xb*(-parseInt(_0x2772bc(0x1da))/0xc)+parseInt(_0x2772bc(0x1e7))/0xd*(parseInt(_0x2772bc(0x1ed))/0xe);if(_0x4f4b7b===_0x60070d)break;else _0xe14857['push'](_0xe14857['shift']());}catch(_0x7cb058){_0xe14857['push'](_0xe14857['shift']());}}}(a82_0xfcd4,0xc833e));import{executeSql}from'../../core/api-client.js';function a82_0xfcd4(){const _0x346676=['Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','99405XazgMG','22liFSyw','validation','42zsbxjW','execResult','now','1250sGQfVk','Returned\x20','SQL\x20parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','params','3201172qlRwYW','983995rbAVEf','string','Invalid\x20JSON\x20for\x20--params:\x20','length','\x20row(s)\x20in\x20','str','298020pxoLgo','3299316CWkQNB','isArray','sql','11KszotW','execSuccess','read','exec','sqlcode','SQL\x20execution\x20failed','9083858FsNWtP','execError','6fSSQkZ','3Qqaupc','988117NQipjk','8skMaHz'];a82_0xfcd4=function(){return _0x346676;};return a82_0xfcd4();}import{CliErrors}from'../../errors.js';function a82_0x3511(_0x372a6b,_0x9a8100){_0x372a6b=_0x372a6b-0x1d0;const _0xfcd408=a82_0xfcd4();let _0x3511cc=_0xfcd408[_0x372a6b];return _0x3511cc;}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const sqlExec={'service':a82_0x18d5bd(0x1dc),'command':a82_0x18d5bd(0x1e0),'description':a82_0x18d5bd(0x1e9),'risk':a82_0x18d5bd(0x1df),'flags':[SQLCODE_FLAG,{'name':'params','type':a82_0x18d5bd(0x1d4),'description':a82_0x18d5bd(0x1d0)}],async 'execute'(_0x232630){const _0x3e7920=a82_0x18d5bd;let _0x325a9b;const _0x1bb723=_0x232630['str'](_0x3e7920(0x1d1));if(_0x1bb723)try{_0x325a9b=JSON['parse'](_0x1bb723);}catch{throw CliErrors[_0x3e7920(0x1ec)](_0x3e7920(0x1d5)+_0x1bb723);}const _0x537d0b=Date[_0x3e7920(0x1ef)](),_0x1b0cc9=await executeSql(_0x232630['appCode'],_0x232630[_0x3e7920(0x1d8)](_0x3e7920(0x1e1)),_0x325a9b),_0x2ab280=Date['now']()-_0x537d0b,_0x23b9c6=_0x1b0cc9?.[_0x3e7920(0x1ee)]??_0x1b0cc9,_0xdf434a=_0x1b0cc9?.[_0x3e7920(0x1de)]??!![];if(!_0xdf434a)return{'ok':![],'data':{'error':_0x1b0cc9?.[_0x3e7920(0x1e4)]||_0x3e7920(0x1e2),'elapsed':_0x2ab280},'message':_0x3e7920(0x1e2)};const _0x30e285=Array[_0x3e7920(0x1db)](_0x23b9c6)?_0x23b9c6:[];return{'ok':!![],'data':{'rows':_0x30e285,'rowCount':_0x30e285[_0x3e7920(0x1d6)],'elapsed':_0x2ab280},'message':_0x3e7920(0x1f1)+_0x30e285[_0x3e7920(0x1d6)]+_0x3e7920(0x1d7)+_0x2ab280+'ms'};}};
@@ -1 +1 @@
1
- (function(_0x595028,_0x394fbf){const _0x1ffe94=a83_0x2c70,_0x2310e9=_0x595028();while(!![]){try{const _0x357430=-parseInt(_0x1ffe94(0x99))/0x1*(-parseInt(_0x1ffe94(0x9c))/0x2)+parseInt(_0x1ffe94(0x97))/0x3+-parseInt(_0x1ffe94(0x9d))/0x4+parseInt(_0x1ffe94(0x9f))/0x5*(-parseInt(_0x1ffe94(0x9b))/0x6)+-parseInt(_0x1ffe94(0x9e))/0x7+-parseInt(_0x1ffe94(0x98))/0x8*(parseInt(_0x1ffe94(0x96))/0x9)+-parseInt(_0x1ffe94(0x9a))/0xa*(-parseInt(_0x1ffe94(0xa0))/0xb);if(_0x357430===_0x394fbf)break;else _0x2310e9['push'](_0x2310e9['shift']());}catch(_0x399e24){_0x2310e9['push'](_0x2310e9['shift']());}}}(a83_0x259b,0xa053f));import{sqlList}from'../../commands/sql/list.js';import{sqlDetail}from'../../commands/sql/detail.js';function a83_0x259b(){const _0x14e30c=['44axegRZ','2310516OaSjiH','1394499LuHcni','32SlrpUG','40088KMfFmU','4945850YDnNCL','732DHnsxR','58yoxzIE','3247676cPEBXY','1176007WTFpyx','38615ytrphW'];a83_0x259b=function(){return _0x14e30c;};return a83_0x259b();}import{sqlValidate}from'../../commands/sql/validate.js';function a83_0x2c70(_0x1a47c0,_0x1c9192){_0x1a47c0=_0x1a47c0-0x96;const _0x259b54=a83_0x259b();let _0x2c70c1=_0x259b54[_0x1a47c0];return _0x2c70c1;}import{sqlSave}from'../../commands/sql/save.js';import{sqlExec}from'../../commands/sql/exec.js';export const sqlDefinitions=[sqlList,sqlDetail,sqlValidate,sqlSave,sqlExec];
1
+ (function(_0x1db9ae,_0x2785dd){const _0x5995e7=a83_0x552d,_0x40d4c6=_0x1db9ae();while(!![]){try{const _0x392fa9=-parseInt(_0x5995e7(0xb3))/0x1+parseInt(_0x5995e7(0xb5))/0x2+parseInt(_0x5995e7(0xae))/0x3+parseInt(_0x5995e7(0xaf))/0x4+-parseInt(_0x5995e7(0xad))/0x5*(parseInt(_0x5995e7(0xb2))/0x6)+parseInt(_0x5995e7(0xb0))/0x7+parseInt(_0x5995e7(0xb1))/0x8*(parseInt(_0x5995e7(0xb4))/0x9);if(_0x392fa9===_0x2785dd)break;else _0x40d4c6['push'](_0x40d4c6['shift']());}catch(_0x10a73d){_0x40d4c6['push'](_0x40d4c6['shift']());}}}(a83_0x4ef4,0x9650c));import{sqlList}from'../../commands/sql/list.js';function a83_0x4ef4(){const _0xc1c26f=['8lqOohV','12PbGTyC','841111etEsbk','5384961xbQMSU','351988nNPfFo','2483335sqgBZF','752571uTGLin','3970280VIKags','3026709AoCUtA'];a83_0x4ef4=function(){return _0xc1c26f;};return a83_0x4ef4();}import{sqlDetail}from'../../commands/sql/detail.js';function a83_0x552d(_0x1ede7a,_0x3e80ae){_0x1ede7a=_0x1ede7a-0xad;const _0x4ef4f1=a83_0x4ef4();let _0x552daf=_0x4ef4f1[_0x1ede7a];return _0x552daf;}import{sqlValidate}from'../../commands/sql/validate.js';import{sqlSave}from'../../commands/sql/save.js';import{sqlExec}from'../../commands/sql/exec.js';import{sqlPull}from'../../commands/sql/pull.js';export const sqlDefinitions=[sqlList,sqlDetail,sqlValidate,sqlSave,sqlExec,sqlPull];
@@ -1 +1 @@
1
- const a84_0x5a281a=a84_0x1226;(function(_0x188f75,_0x5e814f){const _0x494d9b=a84_0x1226,_0x55676c=_0x188f75();while(!![]){try{const _0x4e4328=parseInt(_0x494d9b(0xdb))/0x1+parseInt(_0x494d9b(0xd3))/0x2*(parseInt(_0x494d9b(0xcc))/0x3)+parseInt(_0x494d9b(0xdd))/0x4+parseInt(_0x494d9b(0xe3))/0x5+-parseInt(_0x494d9b(0xd4))/0x6+parseInt(_0x494d9b(0xe0))/0x7+-parseInt(_0x494d9b(0xcf))/0x8;if(_0x4e4328===_0x5e814f)break;else _0x55676c['push'](_0x55676c['shift']());}catch(_0x3e27c8){_0x55676c['push'](_0x55676c['shift']());}}}(a84_0x4b73,0xc100e));import{listSqlQueries}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a84_0x1226(_0x1be0d3,_0x1b1a04){_0x1be0d3=_0x1be0d3-0xcb;const _0x4b73d8=a84_0x4b73();let _0x1226c6=_0x4b73d8[_0x1be0d3];return _0x1226c6;}function a84_0x4b73(){const _0x2213b6=['totalCount','verbose','577560rkVtuI','boolean','all','12268160zJcyeN','appCode','name','str','6mJMxpt','5683866ONyvGl','read','length','Page\x20size','list','sqlcode','sqlCode','191293WWzrZG','page','379220BbRoOm','pagesize','List\x20custom\x20SQL\x20queries','8917832ylmjyM','number','num','5668695WDCEes','sql','Filter\x20by\x20SQL\x20name','paging','description','map','bool','Return\x20full\x20SQL\x20query\x20objects\x20including\x20parameters\x20and\x20SQL\x20content','\x20SQL\x20queries\x20(total:\x20','tableData','dbId'];a84_0x4b73=function(){return _0x2213b6;};return a84_0x4b73();}export const sqlList={'service':a84_0x5a281a(0xe4),'command':a84_0x5a281a(0xd8),'description':a84_0x5a281a(0xdf),'risk':a84_0x5a281a(0xd5),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a84_0x5a281a(0xd1),'type':'string','description':a84_0x5a281a(0xe5)},{'name':a84_0x5a281a(0xdc),'type':a84_0x5a281a(0xe1),'description':'Page\x20number','default':0x1},{'name':a84_0x5a281a(0xde),'type':'number','description':a84_0x5a281a(0xd7)},{'name':'verbose','type':a84_0x5a281a(0xcd),'description':a84_0x5a281a(0xea)}],async 'execute'(_0x4adbdf){const _0x2cf8ad=a84_0x5a281a,_0x385bf5=await listSqlQueries(_0x4adbdf[_0x2cf8ad(0xd0)],{'sqlCode':_0x4adbdf[_0x2cf8ad(0xd2)](_0x2cf8ad(0xd9))||undefined,'sqlName':_0x4adbdf[_0x2cf8ad(0xd2)]('name')||undefined,'currentPage':_0x4adbdf[_0x2cf8ad(0xe2)](_0x2cf8ad(0xdc)),'pageSize':_0x4adbdf['num'](_0x2cf8ad(0xde),0x32)}),_0x589be1=_0x4adbdf[_0x2cf8ad(0xe9)](_0x2cf8ad(0xcb)),_0x2c694d=_0x385bf5[_0x2cf8ad(0xec)]??[],_0x4269eb=_0x385bf5[_0x2cf8ad(0xe6)]?.[_0x2cf8ad(0xee)]??_0x2c694d[_0x2cf8ad(0xd6)];let _0x2263dd;return _0x589be1?_0x2263dd=_0x2c694d:_0x2263dd=await Promise[_0x2cf8ad(0xce)](_0x2c694d[_0x2cf8ad(0xe8)](async _0x592d4d=>{const _0x335370=_0x2cf8ad,_0x39c31f=_0x592d4d[_0x335370(0xed)]?await getDbName(_0x4adbdf[_0x335370(0xd0)],_0x592d4d[_0x335370(0xed)]):undefined;return{'sqlCode':_0x592d4d[_0x335370(0xda)],'sqlName':_0x592d4d['sqlName'],'description':_0x592d4d[_0x335370(0xe7)]??'','db':_0x39c31f?_0x39c31f+'\x20('+_0x592d4d[_0x335370(0xed)]+')':_0x592d4d[_0x335370(0xed)]??''};})),{'ok':!![],'data':_0x2263dd,'message':_0x2c694d[_0x2cf8ad(0xd6)]===0x0?'No\x20custom\x20SQL\x20queries\x20found.':'Found\x20'+_0x2c694d[_0x2cf8ad(0xd6)]+_0x2cf8ad(0xeb)+_0x4269eb+').'};}};
1
+ function a84_0x3c76(_0xe94410,_0x1fb709){_0xe94410=_0xe94410-0x104;const _0x12c3e3=a84_0x12c3();let _0x3c766d=_0x12c3e3[_0xe94410];return _0x3c766d;}const a84_0x4fbaec=a84_0x3c76;(function(_0x4b56f8,_0x1f2e5d){const _0xd965a2=a84_0x3c76,_0x4d7963=_0x4b56f8();while(!![]){try{const _0x3bca64=-parseInt(_0xd965a2(0x115))/0x1+parseInt(_0xd965a2(0x123))/0x2*(parseInt(_0xd965a2(0x11e))/0x3)+-parseInt(_0xd965a2(0x116))/0x4+parseInt(_0xd965a2(0x125))/0x5+-parseInt(_0xd965a2(0x108))/0x6*(-parseInt(_0xd965a2(0x124))/0x7)+parseInt(_0xd965a2(0x121))/0x8+-parseInt(_0xd965a2(0x11c))/0x9;if(_0x3bca64===_0x1f2e5d)break;else _0x4d7963['push'](_0x4d7963['shift']());}catch(_0x22ac55){_0x4d7963['push'](_0x4d7963['shift']());}}}(a84_0x12c3,0xc976c));import{listSqlQueries}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';function a84_0x12c3(){const _0x3e4c4d=['3698055dtsUZT','Found\x20','length','Return\x20full\x20SQL\x20query\x20objects\x20including\x20parameters\x20and\x20SQL\x20content','description','List\x20custom\x20SQL\x20queries','pagesize','Page\x20size','78XnqphJ','dbId','Page\x20number','page','sqlName','map','boolean','verbose','name','totalCount','No\x20custom\x20SQL\x20queries\x20found.','string','sqlcode','722361JBpnHd','5982412aetCwV','paging','sql','\x20SQL\x20queries\x20(total:\x20','str','bool','7957764GcOKRY','num','1893711BcjjIq','read','number','9719784vQMzeB','Filter\x20by\x20SQL\x20name','2EKbium','722365WCdJpi'];a84_0x12c3=function(){return _0x3e4c4d;};return a84_0x12c3();}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlList={'service':a84_0x4fbaec(0x118),'command':'list','description':a84_0x4fbaec(0x105),'risk':a84_0x4fbaec(0x11f),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':'name','type':a84_0x4fbaec(0x113),'description':a84_0x4fbaec(0x122)},{'name':a84_0x4fbaec(0x10b),'type':a84_0x4fbaec(0x120),'description':a84_0x4fbaec(0x10a),'default':0x1},{'name':a84_0x4fbaec(0x106),'type':a84_0x4fbaec(0x120),'description':a84_0x4fbaec(0x107)},{'name':'verbose','type':a84_0x4fbaec(0x10e),'description':a84_0x4fbaec(0x128)}],async 'execute'(_0x387458){const _0x4fc076=a84_0x4fbaec,_0x5e4f48=await listSqlQueries(_0x387458['appCode'],{'sqlCode':_0x387458[_0x4fc076(0x11a)](_0x4fc076(0x114))||undefined,'sqlName':_0x387458[_0x4fc076(0x11a)](_0x4fc076(0x110))||undefined,'currentPage':_0x387458[_0x4fc076(0x11d)](_0x4fc076(0x10b)),'pageSize':_0x387458['num'](_0x4fc076(0x106),0x32)}),_0x33ec08=_0x387458[_0x4fc076(0x11b)](_0x4fc076(0x10f)),_0x20470f=_0x5e4f48['tableData']??[],_0xc7ef31=_0x5e4f48[_0x4fc076(0x117)]?.[_0x4fc076(0x111)]??_0x20470f[_0x4fc076(0x127)];let _0x2be616;return _0x33ec08?_0x2be616=_0x20470f:_0x2be616=await Promise['all'](_0x20470f[_0x4fc076(0x10d)](async _0x4c689a=>{const _0x5731cc=_0x4fc076;let _0x1e732f;try{_0x1e732f=_0x4c689a['dbId']?await getDbName(_0x387458['appCode'],_0x4c689a[_0x5731cc(0x109)]):undefined;}catch{}return{'sqlCode':_0x4c689a['sqlCode'],'sqlName':_0x4c689a[_0x5731cc(0x10c)],'description':_0x4c689a[_0x5731cc(0x104)]??'','db':_0x1e732f?_0x1e732f+'\x20('+_0x4c689a[_0x5731cc(0x109)]+')':_0x4c689a[_0x5731cc(0x109)]??''};})),{'ok':!![],'data':_0x2be616,'message':_0x20470f[_0x4fc076(0x127)]===0x0?_0x4fc076(0x112):_0x4fc076(0x126)+_0x20470f[_0x4fc076(0x127)]+_0x4fc076(0x119)+_0xc7ef31+').'};}};
@@ -0,0 +1 @@
1
+ const a85_0x3e9a3a=a85_0x565e;(function(_0x136450,_0x31f0fa){const _0x3fb4a2=a85_0x565e,_0x4e8c3f=_0x136450();while(!![]){try{const _0x4f0597=-parseInt(_0x3fb4a2(0x1c7))/0x1+-parseInt(_0x3fb4a2(0x1ba))/0x2*(parseInt(_0x3fb4a2(0x1d1))/0x3)+parseInt(_0x3fb4a2(0x1b4))/0x4*(parseInt(_0x3fb4a2(0x1e6))/0x5)+-parseInt(_0x3fb4a2(0x1d5))/0x6+parseInt(_0x3fb4a2(0x1c5))/0x7*(parseInt(_0x3fb4a2(0x1c6))/0x8)+-parseInt(_0x3fb4a2(0x1d3))/0x9*(parseInt(_0x3fb4a2(0x1c1))/0xa)+parseInt(_0x3fb4a2(0x1c2))/0xb*(parseInt(_0x3fb4a2(0x1b2))/0xc);if(_0x4f0597===_0x31f0fa)break;else _0x4e8c3f['push'](_0x4e8c3f['shift']());}catch(_0x269d82){_0x4e8c3f['push'](_0x4e8c3f['shift']());}}}(a85_0x1486,0x2f0e3));function a85_0x1486(){const _0x4a30ac=['\x20failed','skipped','sqlcode','Force\x20pull\x20will\x20overwrite\x20local\x20SQL\x20that\x20differs\x20from\x20remote.\x20Continue?\x20[y/N]\x20','sqlContent','430atpiYU','force','sqlCode','stderr','cancelled','Force\x20pull\x20cancelled.','toLowerCase','85070ZhpXjj','3806wYPXok','POST','question','7cCSBti','1676264LfCshS','151028qOQvFK','Pull\x20failed:\x20could\x20not\x20load\x20SQL\x20content\x20(','appCode','totalCount','tableData','trim','Overwrite\x20local\x20files\x20that\x20differ\x20from\x20remote','sqlName','Would\x20pull\x20','\x20skipped,\x20','2280HZAWzJ','utf8','153TtAYgS','message','620730ZdVtMj','str','yes','write','push','Filter\x20by\x20SQL\x20display\x20name\x20(API\x20filter)','length','unchanged','close','local\x20differs\x20from\x20remote','includes','string','would_pull','name','conflict','No\x20remote\x20SQL\x20queries\x20matched.','\x20SQL\x20file(s)\x20under\x20','96210WXKIsn','/smartapi/custom/queryUserCustomSqlList','8916mJjJrO','boolean','60HKcylA'];a85_0x1486=function(){return _0x4a30ac;};return a85_0x1486();}function a85_0x565e(_0x23911d,_0x2163ad){_0x23911d=_0x23911d-0x1b1;const _0x1486aa=a85_0x1486();let _0x565e53=_0x1486aa[_0x23911d];return _0x565e53;}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;async function fetchAllSqlQueries(_0x2676d0,_0xcca800){const _0x3a3411=a85_0x565e,_0x4f3eaf=[];let _0x504455=0x1;while(!![]){const _0x1b2511=await listSqlQueries(_0x2676d0,{'currentPage':_0x504455,'pageSize':PAGE_SIZE,'sqlCode':_0xcca800[_0x3a3411(0x1bc)],'sqlName':_0xcca800[_0x3a3411(0x1ce)]}),_0x2839f3=_0x1b2511[_0x3a3411(0x1cb)]??[];_0x4f3eaf[_0x3a3411(0x1d9)](..._0x2839f3);if(_0x2839f3[_0x3a3411(0x1db)]===0x0)break;const _0x249ea4=_0x1b2511['paging']?.[_0x3a3411(0x1ca)];if(_0x249ea4!=null?_0x4f3eaf[_0x3a3411(0x1db)]>=_0x249ea4:_0x2839f3[_0x3a3411(0x1db)]<PAGE_SIZE)break;_0x504455++;}return _0x4f3eaf;}async function ensureSqlContent(_0xdd54a4,_0x5be29a){const _0x270bbd=a85_0x565e;if(_0x5be29a[_0x270bbd(0x1b9)]!=null&&String(_0x5be29a['sqlContent'])['length']>0x0)return _0x5be29a;return getSqlQueryInfo(_0xdd54a4,_0x5be29a[_0x270bbd(0x1bc)]);}export const sqlPull={'service':'sql','command':'pull','description':'Pull\x20remote\x20custom\x20SQL\x20queries\x20into\x20.rabetbase/sql/','risk':a85_0x3e9a3a(0x1d8),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':'name','type':a85_0x3e9a3a(0x1e0),'description':a85_0x3e9a3a(0x1da)},{'name':a85_0x3e9a3a(0x1bb),'type':a85_0x3e9a3a(0x1b3),'description':a85_0x3e9a3a(0x1cd)}],async 'dryRun'(_0x4339b9){const _0x350943=a85_0x3e9a3a,_0x2ac2c6=findProjectRootDirectory(),_0x878df6=resolveSqlLocalDir(_0x2ac2c6),_0x293255=_0x4339b9[_0x350943(0x1d6)](_0x350943(0x1b7))||undefined,_0x2a3515=_0x4339b9[_0x350943(0x1d6)](_0x350943(0x1e2))||undefined,_0x3fd527=await fetchAllSqlQueries(_0x4339b9[_0x350943(0x1c9)],{'sqlCode':_0x293255,'sqlName':_0x2a3515}),_0x55ecdb=[],_0x1f89eb=[];for(const _0x3e3737 of _0x3fd527){try{_0x55ecdb[_0x350943(0x1d9)](await ensureSqlContent(_0x4339b9[_0x350943(0x1c9)],_0x3e3737));}catch(_0x1fc3aa){_0x1f89eb[_0x350943(0x1d9)]({'sqlCode':_0x3e3737['sqlCode'],'error':_0x1fc3aa instanceof Error?_0x1fc3aa[_0x350943(0x1d4)]:String(_0x1fc3aa)});}}const _0x2cc2e3=assignSqlFileNames(_0x55ecdb),_0x4345e5=[];for(const [_0x49eed7,_0x2df274]of _0x2cc2e3){const _0x1c70ea=join(_0x878df6,_0x49eed7),_0x234fdc=buildPulledSqlFileContent(_0x2df274);let _0x3f15e2=_0x350943(0x1e1),_0x32a679;if(await fileExists(_0x1c70ea)){const _0x4dbacf=await readFile(_0x1c70ea,_0x350943(0x1d2));_0x4dbacf===_0x234fdc?(_0x3f15e2=_0x350943(0x1b6),_0x32a679=_0x350943(0x1dc)):(_0x3f15e2=_0x350943(0x1e3),_0x32a679='local\x20differs\x20from\x20remote\x20(use\x20--force\x20to\x20overwrite)');}_0x4345e5[_0x350943(0x1d9)]({'sqlCode':_0x2df274[_0x350943(0x1bc)],'sqlName':_0x2df274['sqlName'],'filePath':_0x1c70ea,'status':_0x3f15e2,'reason':_0x32a679});}return{'method':_0x350943(0x1c3),'url':_0x350943(0x1b1),'body':{'appCode':_0x4339b9[_0x350943(0x1c9)],'sqlCode':_0x293255??null,'sqlName':_0x2a3515??null,'loadErrors':_0x1f89eb,'files':_0x4345e5},'description':_0x350943(0x1cf)+_0x4345e5[_0x350943(0x1db)]+_0x350943(0x1e5)+_0x878df6};},async 'execute'(_0x19739f){const _0xd6f087=a85_0x3e9a3a,_0x170b2b=findProjectRootDirectory(),_0x14147a=resolveSqlLocalDir(_0x170b2b),_0xe1e9d0=_0x19739f[_0xd6f087(0x1d6)](_0xd6f087(0x1b7))||undefined,_0x1b5f36=_0x19739f['str'](_0xd6f087(0x1e2))||undefined,_0x4149af=_0x19739f['bool'](_0xd6f087(0x1bb)),_0x4de1ff=await fetchAllSqlQueries(_0x19739f[_0xd6f087(0x1c9)],{'sqlCode':_0xe1e9d0,'sqlName':_0x1b5f36});if(_0x4de1ff[_0xd6f087(0x1db)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0xd6f087(0x1e4)};const _0x1a2e15=[],_0x5744bb=[];for(const _0x350b86 of _0x4de1ff){try{_0x1a2e15[_0xd6f087(0x1d9)](await ensureSqlContent(_0x19739f[_0xd6f087(0x1c9)],_0x350b86));}catch(_0x20c9b7){_0x5744bb[_0xd6f087(0x1d9)]({'sqlCode':_0x350b86[_0xd6f087(0x1bc)],'error':_0x20c9b7 instanceof Error?_0x20c9b7[_0xd6f087(0x1d4)]:String(_0x20c9b7)});}}if(_0x1a2e15[_0xd6f087(0x1db)]===0x0)return{'ok':![],'data':{'pulled':[],'skipped':[],'failed':_0x5744bb},'message':_0xd6f087(0x1c8)+_0x5744bb[_0xd6f087(0x1db)]+'\x20error(s)).'};const _0x5ca796=assignSqlFileNames(_0x1a2e15);if(_0x4149af&&!_0x19739f['nonInteractive']){let _0xa1dc02=![];for(const [_0x302e9c,_0x5a2fc5]of _0x5ca796){const _0xb3fbc=join(_0x14147a,_0x302e9c),_0x2386f3=buildPulledSqlFileContent(_0x5a2fc5);if(await fileExists(_0xb3fbc)){const _0x20850f=await readFile(_0xb3fbc,_0xd6f087(0x1d2));if(_0x20850f!==_0x2386f3){_0xa1dc02=!![];break;}}}if(_0xa1dc02){const _0x26e06d=await confirmForce();if(!_0x26e06d)throw CliErrors[_0xd6f087(0x1be)](_0xd6f087(0x1bf));}}const _0x540738=[],_0x2d2ef7=[];for(const [_0x3fc092,_0x268836]of _0x5ca796){const _0x363e1f=join(_0x14147a,_0x3fc092),_0x4277ff=buildPulledSqlFileContent(_0x268836);try{if(await fileExists(_0x363e1f)){const _0x2252b1=await readFile(_0x363e1f,_0xd6f087(0x1d2));if(_0x2252b1===_0x4277ff){_0x2d2ef7[_0xd6f087(0x1d9)]({'sqlCode':_0x268836[_0xd6f087(0x1bc)],'reason':_0xd6f087(0x1dc)});continue;}if(!_0x4149af){_0x2d2ef7[_0xd6f087(0x1d9)]({'sqlCode':_0x268836[_0xd6f087(0x1bc)],'reason':_0xd6f087(0x1de)});continue;}}await ensureParentDirectory(_0x363e1f),await writeFile(_0x363e1f,_0x4277ff,_0xd6f087(0x1d2)),_0x540738[_0xd6f087(0x1d9)]({'sqlCode':_0x268836[_0xd6f087(0x1bc)],'filePath':_0x363e1f});}catch(_0x4c8236){_0x5744bb[_0xd6f087(0x1d9)]({'sqlCode':_0x268836[_0xd6f087(0x1bc)],'error':_0x4c8236 instanceof Error?_0x4c8236['message']:String(_0x4c8236)});}}const _0x3e3835=_0x5744bb[_0xd6f087(0x1db)]===0x0;return{'ok':_0x3e3835,'data':{'pulled':_0x540738,'skipped':_0x2d2ef7,'failed':_0x5744bb},'message':'Pull\x20complete:\x20'+_0x540738[_0xd6f087(0x1db)]+'\x20written,\x20'+_0x2d2ef7[_0xd6f087(0x1db)]+_0xd6f087(0x1d0)+_0x5744bb[_0xd6f087(0x1db)]+_0xd6f087(0x1b5)};}};async function confirmForce(){const _0x272698=a85_0x3e9a3a,_0x452ad1=createInterface({'input':process['stdin'],'output':process[_0x272698(0x1bd)]}),_0x1bd49f=await new Promise(_0x41ff4a=>{const _0x49a815=_0x272698;_0x452ad1[_0x49a815(0x1c4)](_0x49a815(0x1b8),_0x41ff4a);});return _0x452ad1[_0x272698(0x1dd)](),['y',_0x272698(0x1d7)][_0x272698(0x1df)](_0x1bd49f[_0x272698(0x1cc)]()[_0x272698(0x1c0)]());}
@@ -1 +1 @@
1
- const a85_0x48c8be=a85_0xbba2;(function(_0x10009e,_0x516a3e){const _0x5829c2=a85_0xbba2,_0x28e64f=_0x10009e();while(!![]){try{const _0x452c22=-parseInt(_0x5829c2(0x198))/0x1*(parseInt(_0x5829c2(0x1a4))/0x2)+parseInt(_0x5829c2(0x18a))/0x3+-parseInt(_0x5829c2(0x1b2))/0x4+parseInt(_0x5829c2(0x1b0))/0x5+-parseInt(_0x5829c2(0x1a5))/0x6*(parseInt(_0x5829c2(0x1a2))/0x7)+-parseInt(_0x5829c2(0x18f))/0x8+-parseInt(_0x5829c2(0x189))/0x9*(-parseInt(_0x5829c2(0x1a9))/0xa);if(_0x452c22===_0x516a3e)break;else _0x28e64f['push'](_0x28e64f['shift']());}catch(_0x7bd7cf){_0x28e64f['push'](_0x28e64f['shift']());}}}(a85_0x4811,0x2ec5d));function a85_0x4811(){const _0x533d81=['sqlcode','Path\x20to\x20the\x20SQL\x20file','95855kGcsff','dbId','821040axcgjS','type','action','\x20|\x20Params:\x20','string','SQL\x20query\x20description','sqlType','join','SQL\x20query\x20display\x20name','valid','Save\x20or\x20update\x20a\x20custom\x20SQL\x20query\x20(validates\x20before\x20saving)','1305aHFnig','158037YJpWsk','none','\x20chars)','str','\x20|\x20Tables:\x20','338728sOPdYT','dbName','Conflict\x20detected','Created','sqlCode','POST','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','/api/node-toolbox/sql/save','appCode','92275mplcxj','file','N/A','save','tables','validation','utf-8','message','Updated','SQL\x20validation\x20failed:\x20','91taOQdM','sqlname','6hmCXGc','172296swkTGP','\x20successfully','sql','parameters','70170ZdxoAO','cwd','blocked','Type:\x20','write'];a85_0x4811=function(){return _0x533d81;};return a85_0x4811();}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 a85_0xbba2(_0x1f105e,_0xe29520){_0x1f105e=_0x1f105e-0x185;const _0x481116=a85_0x4811();let _0xbba24b=_0x481116[_0x1f105e];return _0xbba24b;}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlSave={'service':a85_0x48c8be(0x1a7),'command':a85_0x48c8be(0x19b),'description':a85_0x48c8be(0x188),'risk':a85_0x48c8be(0x1ad),'flags':[{'name':a85_0x48c8be(0x199),'type':a85_0x48c8be(0x1b6),'required':!![],'description':a85_0x48c8be(0x1af)},SQLCODE_FLAG_OPTIONAL,{'name':a85_0x48c8be(0x1a3),'type':'string','description':a85_0x48c8be(0x186)},{'name':'db','type':a85_0x48c8be(0x1b6),'description':a85_0x48c8be(0x195)},{'name':'description','type':a85_0x48c8be(0x1b6),'description':a85_0x48c8be(0x1b7)}],async 'validate'(_0x13cb19){const _0x1c433b=a85_0x48c8be,_0x4e01d3=resolve(process[_0x1c433b(0x1aa)](),_0x13cb19[_0x1c433b(0x18d)](_0x1c433b(0x199)));if(!existsSync(_0x4e01d3))throw CliErrors[_0x1c433b(0x19d)]('File\x20not\x20found:\x20'+_0x4e01d3);const _0xc307e8=readFileSync(_0x4e01d3,'utf-8'),_0x3c79cc=validateSql(_0xc307e8);if(!_0x3c79cc[_0x1c433b(0x187)])throw CliErrors[_0x1c433b(0x19d)](_0x1c433b(0x1a1)+_0x3c79cc['message']);},async 'dryRun'(_0x44c2ce){const _0x4dfd93=a85_0x48c8be,_0x5bda32=resolve(process[_0x4dfd93(0x1aa)](),_0x44c2ce[_0x4dfd93(0x18d)]('file')),_0x596735=readFileSync(_0x5bda32,_0x4dfd93(0x19e)),_0x42550e=validateSql(_0x596735),_0x2ef34b=_0x44c2ce[_0x4dfd93(0x18d)]('db')||undefined,{db:_0x16197f,error:_0x546e4a}=await resolveOneDb(_0x44c2ce['appCode'],_0x2ef34b);return{'method':_0x4dfd93(0x194),'url':_0x4dfd93(0x196),'body':{'appCode':_0x44c2ce['appCode'],'sqlContent':'('+_0x596735['length']+_0x4dfd93(0x18c),'sqlCode':_0x44c2ce[_0x4dfd93(0x18d)](_0x4dfd93(0x1ae))||undefined,'sqlName':_0x44c2ce[_0x4dfd93(0x18d)](_0x4dfd93(0x1a3))||undefined,'db':_0x16197f?_0x16197f[_0x4dfd93(0x190)]+'\x20('+_0x16197f[_0x4dfd93(0x1b1)]+')':_0x546e4a},'description':['Save\x20SQL\x20query\x20from\x20'+_0x44c2ce[_0x4dfd93(0x18d)](_0x4dfd93(0x199)),'Validation:\x20'+_0x42550e[_0x4dfd93(0x19f)],_0x4dfd93(0x1ac)+_0x42550e[_0x4dfd93(0x1b8)][_0x4dfd93(0x1b3)]+_0x4dfd93(0x18e)+(_0x42550e[_0x4dfd93(0x19c)][_0x4dfd93(0x185)](',\x20')||_0x4dfd93(0x19a))+_0x4dfd93(0x1b5)+(_0x42550e[_0x4dfd93(0x1a8)]['join'](',\x20')||_0x4dfd93(0x18b))][_0x4dfd93(0x185)]('\x0a')};},async 'execute'(_0x5152c7){const _0x3c4cb6=a85_0x48c8be,_0x58dfad=resolve(process['cwd'](),_0x5152c7[_0x3c4cb6(0x18d)](_0x3c4cb6(0x199))),_0x118460=readFileSync(_0x58dfad,'utf-8'),_0x1902f5=_0x5152c7[_0x3c4cb6(0x18d)]('db')||undefined,{db:_0x4c7016,error:_0x369009}=await resolveOneDb(_0x5152c7[_0x3c4cb6(0x197)],_0x1902f5);if(_0x369009)throw CliErrors[_0x3c4cb6(0x19d)](_0x369009);const _0x101b6a=await saveSqlQuery({'appCode':_0x5152c7['appCode'],'sqlContent':_0x118460,'sqlCode':_0x5152c7[_0x3c4cb6(0x18d)]('sqlcode')||undefined,'sqlName':_0x5152c7[_0x3c4cb6(0x18d)]('sqlname')||undefined,'dbId':_0x4c7016[_0x3c4cb6(0x1b1)],'description':_0x5152c7[_0x3c4cb6(0x18d)]('description')||undefined});if(_0x101b6a[_0x3c4cb6(0x1ab)])return{'ok':![],'data':_0x101b6a,'message':_0x101b6a['message']||_0x3c4cb6(0x191)};return{'ok':!![],'data':{'sqlCode':_0x101b6a[_0x3c4cb6(0x193)],'sqlName':_0x101b6a['sqlName'],'action':_0x101b6a[_0x3c4cb6(0x1b4)]},'message':(_0x101b6a[_0x3c4cb6(0x1b4)]==='created'?_0x3c4cb6(0x192):_0x3c4cb6(0x1a0))+_0x3c4cb6(0x1a6)+(_0x101b6a[_0x3c4cb6(0x193)]?'\x20('+_0x101b6a['sqlCode']+')':'')};}};
1
+ const a86_0x3eaa40=a86_0x57e2;(function(_0x49197f,_0x56eb6b){const _0x54400f=a86_0x57e2,_0x3c6358=_0x49197f();while(!![]){try{const _0x4ccd39=-parseInt(_0x54400f(0x1dc))/0x1+-parseInt(_0x54400f(0x1cd))/0x2+parseInt(_0x54400f(0x1bf))/0x3*(parseInt(_0x54400f(0x1d3))/0x4)+parseInt(_0x54400f(0x1c4))/0x5+parseInt(_0x54400f(0x1e0))/0x6+-parseInt(_0x54400f(0x1d9))/0x7+parseInt(_0x54400f(0x1d6))/0x8;if(_0x4ccd39===_0x56eb6b)break;else _0x3c6358['push'](_0x3c6358['shift']());}catch(_0xa2e16){_0x3c6358['push'](_0x3c6358['shift']());}}}(a86_0x5c7e,0xc4f59));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{saveSqlQuery}from'../../core/api-client.js';function a86_0x5c7e(){const _0x1da76c=['sqlcode','join','str','length','24pVwjaB','Path\x20to\x20the\x20SQL\x20file','sql','10003032rlbFjd','Updated','file','2084971pGKnql','none','\x20successfully','1400219ouBzLr','sqlName','sqlname','cwd','2230776dRUxHA','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','sqlType','\x20chars)','save','description','message','sqlCode','dbId','string','write','\x20|\x20Params:\x20','POST','action','Validation:\x20','Save\x20or\x20update\x20a\x20custom\x20SQL\x20query\x20(validates\x20before\x20saving)','created','745428BaVIRN','appCode','tables','Created','utf-8','3777175ZKFDai','Conflict\x20detected','N/A','parameters','blocked','type','\x20|\x20Tables:\x20','validation','dbName','2727298DFaJwZ','SQL\x20validation\x20failed:\x20'];a86_0x5c7e=function(){return _0x1da76c;};return a86_0x5c7e();}import{resolveOneDb}from'../../core/db-resolver.js';import{validateSql}from'../../core/sql-validator.js';import{CliErrors}from'../../errors.js';function a86_0x57e2(_0x2b4101,_0x532b6c){_0x2b4101=_0x2b4101-0x1b8;const _0x5c7e19=a86_0x5c7e();let _0x57e2ca=_0x5c7e19[_0x2b4101];return _0x57e2ca;}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlSave={'service':a86_0x3eaa40(0x1d5),'command':a86_0x3eaa40(0x1e4),'description':a86_0x3eaa40(0x1bd),'risk':a86_0x3eaa40(0x1b8),'flags':[{'name':a86_0x3eaa40(0x1d8),'type':a86_0x3eaa40(0x1e9),'required':!![],'description':a86_0x3eaa40(0x1d4)},SQLCODE_FLAG_OPTIONAL,{'name':a86_0x3eaa40(0x1de),'type':a86_0x3eaa40(0x1e9),'description':'SQL\x20query\x20display\x20name'},{'name':'db','type':a86_0x3eaa40(0x1e9),'description':a86_0x3eaa40(0x1e1)},{'name':a86_0x3eaa40(0x1e5),'type':a86_0x3eaa40(0x1e9),'description':'SQL\x20query\x20description'}],async 'validate'(_0x3868ce){const _0x42d8cf=a86_0x3eaa40,_0xf7c2d4=resolve(process[_0x42d8cf(0x1df)](),_0x3868ce[_0x42d8cf(0x1d1)](_0x42d8cf(0x1d8)));if(!existsSync(_0xf7c2d4))throw CliErrors[_0x42d8cf(0x1cb)]('File\x20not\x20found:\x20'+_0xf7c2d4);const _0x245d3a=readFileSync(_0xf7c2d4,'utf-8'),_0x1b5b98=validateSql(_0x245d3a);if(!_0x1b5b98['valid'])throw CliErrors['validation'](_0x42d8cf(0x1ce)+_0x1b5b98[_0x42d8cf(0x1e6)]);},async 'dryRun'(_0x40d3c4){const _0x579f5b=a86_0x3eaa40,_0x428bb0=resolve(process[_0x579f5b(0x1df)](),_0x40d3c4[_0x579f5b(0x1d1)](_0x579f5b(0x1d8))),_0x308d66=readFileSync(_0x428bb0,'utf-8'),_0x322d4c=validateSql(_0x308d66),_0x108d02=_0x40d3c4[_0x579f5b(0x1d1)]('db')||undefined,{db:_0x4633d6,error:_0x34aeb9}=await resolveOneDb(_0x40d3c4['appCode'],_0x108d02);return{'method':_0x579f5b(0x1ba),'url':'/api/node-toolbox/sql/save','body':{'appCode':_0x40d3c4[_0x579f5b(0x1c0)],'sqlContent':'('+_0x308d66[_0x579f5b(0x1d2)]+_0x579f5b(0x1e3),'sqlCode':_0x40d3c4[_0x579f5b(0x1d1)]('sqlcode')||undefined,'sqlName':_0x40d3c4[_0x579f5b(0x1d1)](_0x579f5b(0x1de))||undefined,'db':_0x4633d6?_0x4633d6[_0x579f5b(0x1cc)]+'\x20('+_0x4633d6[_0x579f5b(0x1e8)]+')':_0x34aeb9},'description':['Save\x20SQL\x20query\x20from\x20'+_0x40d3c4[_0x579f5b(0x1d1)]('file'),_0x579f5b(0x1bc)+_0x322d4c[_0x579f5b(0x1e6)],'Type:\x20'+_0x322d4c[_0x579f5b(0x1e2)][_0x579f5b(0x1c9)]+_0x579f5b(0x1ca)+(_0x322d4c[_0x579f5b(0x1c1)][_0x579f5b(0x1d0)](',\x20')||_0x579f5b(0x1c6))+_0x579f5b(0x1b9)+(_0x322d4c[_0x579f5b(0x1c7)][_0x579f5b(0x1d0)](',\x20')||_0x579f5b(0x1da))]['join']('\x0a')};},async 'execute'(_0x24d420){const _0x5a474c=a86_0x3eaa40,_0x47b687=resolve(process[_0x5a474c(0x1df)](),_0x24d420[_0x5a474c(0x1d1)](_0x5a474c(0x1d8))),_0x23675b=readFileSync(_0x47b687,_0x5a474c(0x1c3)),_0x26a12d=_0x24d420[_0x5a474c(0x1d1)]('db')||undefined,{db:_0x24afa1,error:_0x3fcb86}=await resolveOneDb(_0x24d420[_0x5a474c(0x1c0)],_0x26a12d);if(_0x3fcb86)throw CliErrors[_0x5a474c(0x1cb)](_0x3fcb86);const _0x38c73e=await saveSqlQuery({'appCode':_0x24d420[_0x5a474c(0x1c0)],'sqlContent':_0x23675b,'sqlCode':_0x24d420['str'](_0x5a474c(0x1cf))||undefined,'sqlName':_0x24d420['str'](_0x5a474c(0x1de))||undefined,'dbId':_0x24afa1[_0x5a474c(0x1e8)],'description':_0x24d420[_0x5a474c(0x1d1)](_0x5a474c(0x1e5))||undefined});if(_0x38c73e[_0x5a474c(0x1c8)])return{'ok':![],'data':_0x38c73e,'message':_0x38c73e[_0x5a474c(0x1e6)]||_0x5a474c(0x1c5)};return{'ok':!![],'data':{'sqlCode':_0x38c73e[_0x5a474c(0x1e7)],'sqlName':_0x38c73e[_0x5a474c(0x1dd)],'action':_0x38c73e[_0x5a474c(0x1bb)]},'message':(_0x38c73e['action']===_0x5a474c(0x1be)?_0x5a474c(0x1c2):_0x5a474c(0x1d7))+_0x5a474c(0x1db)+(_0x38c73e['sqlCode']?'\x20('+_0x38c73e[_0x5a474c(0x1e7)]+')':'')};}};
@@ -0,0 +1 @@
1
+ const a87_0x5928f9=a87_0xde12;(function(_0x5661f6,_0x502cb8){const _0xe62155=a87_0xde12,_0x453c81=_0x5661f6();while(!![]){try{const _0x16411d=parseInt(_0xe62155(0xd0))/0x1*(-parseInt(_0xe62155(0xc3))/0x2)+-parseInt(_0xe62155(0xc1))/0x3*(-parseInt(_0xe62155(0xc4))/0x4)+-parseInt(_0xe62155(0xc2))/0x5+-parseInt(_0xe62155(0xc5))/0x6+-parseInt(_0xe62155(0xc7))/0x7+-parseInt(_0xe62155(0xcf))/0x8*(parseInt(_0xe62155(0xd6))/0x9)+-parseInt(_0xe62155(0xcb))/0xa*(-parseInt(_0xe62155(0xd4))/0xb);if(_0x16411d===_0x502cb8)break;else _0x453c81['push'](_0x453c81['shift']());}catch(_0x3c45a8){_0x453c81['push'](_0x453c81['shift']());}}}(a87_0x355a,0xb6082));import{join}from'node:path';export const SQL_LOCAL_REL_DIR=a87_0x5928f9(0xc9);function a87_0x355a(){const _0x15be4b=['sqlContent','7402857CrCscU','--\x20@lovrabet.sqlCode:\x20','.rabetbase/sql','--\x20@lovrabet.description:','10SxFSiv','has','set','join','176584ikSTft','5287qKtRYu','sqlName','.sql','endsWith','48533221bgPhKK','trimEnd','333eVxBDv','replace','unnamed','78XnMlkP','5462385DrioaL','162RAAcKU','119348WZAors','6283770AFxsrE'];a87_0x355a=function(){return _0x15be4b;};return a87_0x355a();}export function resolveSqlLocalDir(_0x1b113c){return join(_0x1b113c,SQL_LOCAL_REL_DIR);}export function safeSqlFileBaseName(_0x7b6b2c){const _0x110a1f=a87_0x5928f9,_0x51c304=_0x7b6b2c['trim']()||_0x110a1f(0xc0),_0x21a069=_0x51c304[_0x110a1f(0xd7)](/[/\\?%*:|"<>]/g,'_')[_0x110a1f(0xd7)](/\s+/g,'_')[_0x110a1f(0xd7)](/_+/g,'_');return _0x21a069||'unnamed';}export function assignSqlFileNames(_0x5d4424){const _0x45cbf3=a87_0x5928f9,_0xb01f78=new Map();for(const _0x5ec0cc of _0x5d4424){const _0x38ffa4=safeSqlFileBaseName(_0x5ec0cc[_0x45cbf3(0xd1)]??_0x45cbf3(0xc0));let _0x3b7a66=_0x38ffa4+_0x45cbf3(0xd2);if(_0xb01f78[_0x45cbf3(0xcc)](_0x3b7a66)){const _0x4aaecb=(_0x5ec0cc['sqlCode']??'unknown')[_0x45cbf3(0xd7)](/-/g,'');_0x3b7a66=_0x38ffa4+'__'+_0x4aaecb+_0x45cbf3(0xd2);}let _0x4f81b4=0x0,_0xc9a3d3=_0x3b7a66;while(_0xb01f78['has'](_0xc9a3d3)){_0x4f81b4++,_0xc9a3d3=_0x38ffa4+'__'+_0x4f81b4+'.sql';}_0xb01f78[_0x45cbf3(0xcd)](_0xc9a3d3,_0x5ec0cc);}return _0xb01f78;}function a87_0xde12(_0xfcc341,_0x56cecd){_0xfcc341=_0xfcc341-0xc0;const _0x355a5b=a87_0x355a();let _0xde1280=_0x355a5b[_0xfcc341];return _0xde1280;}export function buildPulledSqlFileContent(_0x313c88){const _0x11e479=a87_0x5928f9,_0x511481=_0x313c88[_0x11e479(0xd1)]??_0x11e479(0xc0),_0x1846b1=_0x313c88['sqlCode']??'',_0x387cc8=(_0x313c88['description']??'')[_0x11e479(0xd7)](/\r?\n/g,'\x20')['trim'](),_0x45ca05=_0x313c88[_0x11e479(0xc6)]??'',_0x46caa0=['--\x20@lovrabet.sqlName:\x20'+_0x511481,_0x11e479(0xc8)+_0x1846b1,_0x11e479(0xca)+(_0x387cc8?'\x20'+_0x387cc8:''),'',_0x45ca05[_0x11e479(0xd5)]()],_0x32b4b8=_0x46caa0[_0x11e479(0xce)]('\x0a');return _0x32b4b8[_0x11e479(0xd3)]('\x0a')?_0x32b4b8:_0x32b4b8+'\x0a';}
@@ -1 +1 @@
1
- const a86_0x343c38=a86_0x3ff9;function a86_0x4629(){const _0xc686b4=['filter','split','854676OKSILc','validate','push','valid','string','type','str','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','toLowerCase','File\x20not\x20found:\x20','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','3224OYRiry','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','isDangerous','10215NbHaMt','appCode','isArray','22flDfjF','flagMissing','map','9032652XsmJGw','\x22\x20not\x20found\x20in\x20any\x20dataset','sql','dbtableConfig','637076fwQmuE','36GvYMAD','isSelectOnly','validation','Provide\x20--file\x20or\x20--sql','tableName','message','sqlType','read','schemas','tables','name','70ziFIZB','reason','1799718QQjiEj','file','\x22\x20not\x20found\x20or\x20not\x20accessible','29555PeBUmZ','10mabPqu','schema:','utf-8','63846eydfly','fields'];a86_0x4629=function(){return _0xc686b4;};return a86_0x4629();}(function(_0x449447,_0x28e18c){const _0x237d28=a86_0x3ff9,_0xd1319e=_0x449447();while(!![]){try{const _0x51dedf=parseInt(_0x237d28(0x133))/0x1+-parseInt(_0x237d28(0x14f))/0x2*(-parseInt(_0x237d28(0x13a))/0x3)+parseInt(_0x237d28(0x126))/0x4*(-parseInt(_0x237d28(0x136))/0x5)+-parseInt(_0x237d28(0x13e))/0x6*(parseInt(_0x237d28(0x131))/0x7)+-parseInt(_0x237d28(0x149))/0x8*(parseInt(_0x237d28(0x14c))/0x9)+parseInt(_0x237d28(0x137))/0xa*(parseInt(_0x237d28(0x125))/0xb)+parseInt(_0x237d28(0x152))/0xc;if(_0x51dedf===_0x28e18c)break;else _0xd1319e['push'](_0xd1319e['shift']());}catch(_0x5f3d5f){_0xd1319e['push'](_0xd1319e['shift']());}}}(a86_0x4629,0xde051));import{readFileSync,existsSync}from'node:fs';function a86_0x3ff9(_0x1e51fd,_0xf0e7c4){_0x1e51fd=_0x1e51fd-0x122;const _0x462943=a86_0x4629();let _0x3ff9e5=_0x462943[_0x1e51fd];return _0x3ff9e5;}import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const sqlValidate={'service':a86_0x343c38(0x123),'command':a86_0x343c38(0x13f),'description':a86_0x343c38(0x148),'risk':a86_0x343c38(0x12d),'flags':[{'name':a86_0x343c38(0x134),'type':a86_0x343c38(0x142),'description':a86_0x343c38(0x145)},{'name':a86_0x343c38(0x123),'type':a86_0x343c38(0x142),'description':a86_0x343c38(0x14a)},{'name':a86_0x343c38(0x12e),'type':a86_0x343c38(0x142),'description':'Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against'}],async 'execute'(_0x172f92){const _0x3c337c=a86_0x343c38,_0x34d596=_0x172f92[_0x3c337c(0x144)](_0x3c337c(0x134)),_0x2ed46d=_0x172f92['str'](_0x3c337c(0x123));if(!_0x34d596&&!_0x2ed46d)throw CliErrors[_0x3c337c(0x150)](_0x3c337c(0x134),_0x3c337c(0x129));let _0x164760;if(_0x34d596){const _0xea32eb=resolve(process['cwd'](),_0x34d596);if(!existsSync(_0xea32eb))throw CliErrors[_0x3c337c(0x128)](_0x3c337c(0x147)+_0xea32eb);_0x164760=readFileSync(_0xea32eb,_0x3c337c(0x139));}else _0x164760=_0x2ed46d;const _0x2bf1e2=validateSql(_0x164760),_0x31c1e0={'valid':_0x2bf1e2[_0x3c337c(0x141)],'sqlType':_0x2bf1e2['sqlType'][_0x3c337c(0x143)],'isSelectOnly':_0x2bf1e2[_0x3c337c(0x12c)][_0x3c337c(0x127)],'isDangerous':_0x2bf1e2[_0x3c337c(0x12c)][_0x3c337c(0x14b)],'tables':_0x2bf1e2[_0x3c337c(0x12f)],'parameters':_0x2bf1e2['parameters'],'message':_0x2bf1e2['message']};_0x2bf1e2[_0x3c337c(0x12c)][_0x3c337c(0x132)]&&(_0x31c1e0['reason']=_0x2bf1e2[_0x3c337c(0x12c)][_0x3c337c(0x132)]);const _0x5b2d06=_0x172f92['str']('schemas');if(_0x5b2d06&&_0x2bf1e2[_0x3c337c(0x141)]){const _0x1d4f76=_0x5b2d06[_0x3c337c(0x13d)](',')['map'](_0x31ca23=>_0x31ca23['trim']())[_0x3c337c(0x13c)](Boolean),_0x346b8a=[],_0x2d363e=await listDatasets(_0x172f92[_0x3c337c(0x14d)]),_0xd619d1=new Map(_0x2d363e[_0x3c337c(0x151)](_0x3a310c=>[_0x3a310c[_0x3c337c(0x124)]?.[_0x3c337c(0x12a)]?.[_0x3c337c(0x146)](),_0x3a310c]));for(const _0xab74ec of _0x2bf1e2[_0x3c337c(0x12f)]){const _0x33511c=_0xd619d1['get'](_0xab74ec[_0x3c337c(0x146)]());!_0x33511c&&_0x346b8a[_0x3c337c(0x140)]('Table\x20\x22'+_0xab74ec+_0x3c337c(0x122));}for(const _0x2468f8 of _0x1d4f76){try{const _0x32fd45=await getDatasetDetail(_0x2468f8),_0x1b31b3=Array[_0x3c337c(0x14e)](_0x32fd45[_0x3c337c(0x13b)])?_0x32fd45[_0x3c337c(0x13b)]:[],_0x4c56fc=new Set(_0x1b31b3[_0x3c337c(0x151)](_0x8b03fd=>_0x8b03fd[_0x3c337c(0x130)]?.[_0x3c337c(0x146)]())),_0x1a3b8d=_0x32fd45[_0x3c337c(0x124)]?.[_0x3c337c(0x12a)]||_0x32fd45[_0x3c337c(0x12a)]||_0x2468f8;_0x31c1e0[_0x3c337c(0x138)+_0x1a3b8d]={'code':_0x2468f8,'tableName':_0x1a3b8d,'fieldCount':_0x4c56fc['size'],'fields':Array['from'](_0x4c56fc)};}catch{_0x346b8a[_0x3c337c(0x140)]('Dataset\x20\x22'+_0x2468f8+_0x3c337c(0x135));}}_0x346b8a['length']>0x0&&(_0x31c1e0['schemaWarnings']=_0x346b8a);}return{'ok':_0x2bf1e2[_0x3c337c(0x141)],'data':_0x31c1e0,'message':_0x2bf1e2[_0x3c337c(0x12b)]};}};
1
+ const a88_0x4dc15f=a88_0xe021;(function(_0x3daa50,_0x5db372){const _0x3c1669=a88_0xe021,_0x53e713=_0x3daa50();while(!![]){try{const _0x55a40f=-parseInt(_0x3c1669(0x89))/0x1+parseInt(_0x3c1669(0xa1))/0x2+parseInt(_0x3c1669(0x87))/0x3+parseInt(_0x3c1669(0xa4))/0x4*(parseInt(_0x3c1669(0x8e))/0x5)+-parseInt(_0x3c1669(0x94))/0x6*(parseInt(_0x3c1669(0x8b))/0x7)+parseInt(_0x3c1669(0xa2))/0x8+-parseInt(_0x3c1669(0x8c))/0x9;if(_0x55a40f===_0x5db372)break;else _0x53e713['push'](_0x53e713['shift']());}catch(_0x3099b5){_0x53e713['push'](_0x53e713['shift']());}}}(a88_0x586f,0x321a5));import{readFileSync,existsSync}from'node:fs';function a88_0x586f(){const _0x442a82=['\x22\x20not\x20found\x20in\x20any\x20dataset','type','sql','parameters','str','\x22\x20not\x20found\x20or\x20not\x20accessible','name','598410OZjcdL','986280vGQMjY','file','20SGHMSs','string','validation','map','Provide\x20--file\x20or\x20--sql','message','push','read','File\x20not\x20found:\x20','schemaWarnings','cwd','sqlType','dbtableConfig','isDangerous','schema:','utf-8','Dataset\x20\x22','tableName','1026678OKXupM','isSelectOnly','251775HeZgcI','trim','7TiHQtW','3441600hbIpHL','reason','162665AeskGn','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','schemas','valid','size','filter','527910UZBNBS','Table\x20\x22','fields','tables','toLowerCase','get'];a88_0x586f=function(){return _0x442a82;};return a88_0x586f();}import{resolve}from'node:path';function a88_0xe021(_0xe66a7a,_0x1c4bd9){_0xe66a7a=_0xe66a7a-0x85;const _0x586f23=a88_0x586f();let _0xe0215=_0x586f23[_0xe66a7a];return _0xe0215;}import{validateSql}from'../../core/sql-validator.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const sqlValidate={'service':a88_0x4dc15f(0x9c),'command':'validate','description':'Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','risk':a88_0x4dc15f(0xab),'flags':[{'name':'file','type':a88_0x4dc15f(0xa5),'description':'Path\x20to\x20the\x20SQL\x20file\x20to\x20validate'},{'name':a88_0x4dc15f(0x9c),'type':a88_0x4dc15f(0xa5),'description':'Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)'},{'name':a88_0x4dc15f(0x90),'type':a88_0x4dc15f(0xa5),'description':a88_0x4dc15f(0x8f)}],async 'execute'(_0x18d5f5){const _0x3086e3=a88_0x4dc15f,_0x3c3e28=_0x18d5f5[_0x3086e3(0x9e)](_0x3086e3(0xa3)),_0x4c0a6a=_0x18d5f5['str'](_0x3086e3(0x9c));if(!_0x3c3e28&&!_0x4c0a6a)throw CliErrors['flagMissing']('file',_0x3086e3(0xa8));let _0xd36945;if(_0x3c3e28){const _0x507d41=resolve(process[_0x3086e3(0xae)](),_0x3c3e28);if(!existsSync(_0x507d41))throw CliErrors[_0x3086e3(0xa6)](_0x3086e3(0xac)+_0x507d41);_0xd36945=readFileSync(_0x507d41,_0x3086e3(0xb3));}else _0xd36945=_0x4c0a6a;const _0x208ad1=validateSql(_0xd36945),_0x3993a6={'valid':_0x208ad1[_0x3086e3(0x91)],'sqlType':_0x208ad1[_0x3086e3(0xaf)][_0x3086e3(0x9b)],'isSelectOnly':_0x208ad1[_0x3086e3(0xaf)][_0x3086e3(0x88)],'isDangerous':_0x208ad1[_0x3086e3(0xaf)][_0x3086e3(0xb1)],'tables':_0x208ad1[_0x3086e3(0x97)],'parameters':_0x208ad1[_0x3086e3(0x9d)],'message':_0x208ad1[_0x3086e3(0xa9)]};_0x208ad1[_0x3086e3(0xaf)][_0x3086e3(0x8d)]&&(_0x3993a6[_0x3086e3(0x8d)]=_0x208ad1[_0x3086e3(0xaf)][_0x3086e3(0x8d)]);const _0x55b519=_0x18d5f5[_0x3086e3(0x9e)](_0x3086e3(0x90));if(_0x55b519&&_0x208ad1[_0x3086e3(0x91)]){const _0x182e48=_0x55b519['split'](',')[_0x3086e3(0xa7)](_0x4e7ef8=>_0x4e7ef8[_0x3086e3(0x8a)]())[_0x3086e3(0x93)](Boolean),_0x135710=[],_0x263d57=await listDatasets(_0x18d5f5['appCode']),_0x152f37=new Map(_0x263d57[_0x3086e3(0xa7)](_0x4d9922=>[_0x4d9922[_0x3086e3(0xb0)]?.[_0x3086e3(0x86)]?.[_0x3086e3(0x98)](),_0x4d9922]));for(const _0x521202 of _0x208ad1['tables']){const _0x389f10=_0x152f37[_0x3086e3(0x99)](_0x521202['toLowerCase']());!_0x389f10&&_0x135710[_0x3086e3(0xaa)](_0x3086e3(0x95)+_0x521202+_0x3086e3(0x9a));}for(const _0x5cfcf0 of _0x182e48){try{const _0xe30687=await getDatasetDetail(_0x5cfcf0),_0x5749f6=Array['isArray'](_0xe30687['fields'])?_0xe30687[_0x3086e3(0x96)]:[],_0x5aa196=new Set(_0x5749f6[_0x3086e3(0xa7)](_0x2a26ed=>_0x2a26ed[_0x3086e3(0xa0)]?.[_0x3086e3(0x98)]())),_0x33a363=_0xe30687[_0x3086e3(0xb0)]?.['tableName']||_0xe30687['tableName']||_0x5cfcf0;_0x3993a6[_0x3086e3(0xb2)+_0x33a363]={'code':_0x5cfcf0,'tableName':_0x33a363,'fieldCount':_0x5aa196[_0x3086e3(0x92)],'fields':Array['from'](_0x5aa196)};}catch{_0x135710[_0x3086e3(0xaa)](_0x3086e3(0x85)+_0x5cfcf0+_0x3086e3(0x9f));}}_0x135710['length']>0x0&&(_0x3993a6[_0x3086e3(0xad)]=_0x135710);}return{'ok':_0x208ad1['valid'],'data':_0x3993a6,'message':_0x208ad1[_0x3086e3(0xa9)]};}};
@@ -1 +1 @@
1
- const a87_0x3b5edb=a87_0x49eb;function a87_0x49eb(_0x3b3039,_0x2b9d0e){_0x3b3039=_0x3b3039-0xf9;const _0x5a9f2d=a87_0x5a9f();let _0x49eb88=_0x5a9f2d[_0x3b3039];return _0x49eb88;}function a87_0x5a9f(){const _0x8d43f=['env','SQL\x20string','appcode','Filter\x20JSON\x20output\x20(bundled\x20jq\x20via\x20node-jq,\x20else\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','description','File\x20path','yes','86hMTaHT','Show\x20help','format','Force\x20overwrite','dbid','function-node','Override\x20appcode','Environment','skipImports','app','dryRun','operation','pagesize','sqlname','enable-bff-save','10qxAzxB','clear','Config\x20value','Apply\x20to\x20all','Page\x20size','Clear','8DBkIEZ','remote','skip-imports','sqlcode','key','Keyword\x20filter','170TKUFVt','Name','map','value','page','rabetbase','project','Rabetbase\x20CLI','output','target','code','Page\x20number','dry-run','help','Record\x20ID','Preview\x20operation\x20without\x20executing','Enable\x20BFF\x20save','Config\x20key','Output\x20path','meowKey','Alias\x20for\x20--non-interactive','params','verbose','SQL\x20code','Use\x20project\x20config\x20scope','string','functionNode','17961VeYUFw','all','JSON\x20params','Type\x20filter','2594067gcUZCb','sql','3186372uYJpew','<expr>','Schemas','datasetcode','719140mjWIWm','watch','467253JEjqDE','boolean','schemas','<name>','Watch\x20mode','Operation\x20type','non-interactive','Verbose\x20output','file','name','17061363yMvjIW','Function\x20node','2313lnpGzz','Skip\x20import\x20generation','force','Output\x20format','SQL\x20name','keyword'];a87_0x5a9f=function(){return _0x8d43f;};return a87_0x5a9f();}(function(_0x3e317e,_0x54af10){const _0xcf6ba3=a87_0x49eb,_0x9d9205=_0x3e317e();while(!![]){try{const _0x95cec9=parseInt(_0xcf6ba3(0x144))/0x1+parseInt(_0xcf6ba3(0x102))/0x2*(-parseInt(_0xcf6ba3(0x138))/0x3)+-parseInt(_0xcf6ba3(0x142))/0x4*(parseInt(_0xcf6ba3(0x111))/0x5)+-parseInt(_0xcf6ba3(0x13e))/0x6+parseInt(_0xcf6ba3(0x13c))/0x7*(-parseInt(_0xcf6ba3(0x117))/0x8)+-parseInt(_0xcf6ba3(0x150))/0x9*(-parseInt(_0xcf6ba3(0x11d))/0xa)+parseInt(_0xcf6ba3(0x14e))/0xb;if(_0x95cec9===_0x54af10)break;else _0x9d9205['push'](_0x9d9205['shift']());}catch(_0x23cc6e){_0x9d9205['push'](_0x9d9205['shift']());}}}(a87_0x5a9f,0x7b0c1));export const CLI_BIN_NAME=a87_0x3b5edb(0x122);export const CLI_DISPLAY_NAME=a87_0x3b5edb(0x124);export const NPM_PACKAGE_NAME='@lovrabet/rabetbase-cli';export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':a87_0x3b5edb(0xfd),'type':a87_0x3b5edb(0x136),'description':a87_0x3b5edb(0x108),'hint':'<code>'},{'name':a87_0x3b5edb(0x10b),'meowKey':a87_0x3b5edb(0x10b),'type':'string','description':'Select\x20app\x20profile\x20by\x20name','hint':a87_0x3b5edb(0x147)},{'name':a87_0x3b5edb(0xfb),'meowKey':a87_0x3b5edb(0xfb),'type':a87_0x3b5edb(0x136),'description':a87_0x3b5edb(0x109),'hint':'production\x20|\x20daily'},{'name':a87_0x3b5edb(0x104),'meowKey':'format','type':a87_0x3b5edb(0x136),'description':a87_0x3b5edb(0x153),'hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':a87_0x3b5edb(0x136),'description':a87_0x3b5edb(0xfe),'hint':a87_0x3b5edb(0x13f)},{'name':a87_0x3b5edb(0x129),'meowKey':a87_0x3b5edb(0x10c),'type':a87_0x3b5edb(0x145),'description':a87_0x3b5edb(0x12c)},{'name':'yes','meowKey':a87_0x3b5edb(0x101),'type':a87_0x3b5edb(0x145),'description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':a87_0x3b5edb(0x14a),'meowKey':'nonInteractive','type':a87_0x3b5edb(0x145),'description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':'global','meowKey':'global','type':a87_0x3b5edb(0x145),'description':'Use\x20global\x20config\x20scope'},{'name':a87_0x3b5edb(0x123),'meowKey':a87_0x3b5edb(0x123),'type':'boolean','description':a87_0x3b5edb(0x135)},{'name':'ci','meowKey':'ci','type':a87_0x3b5edb(0x145),'description':a87_0x3b5edb(0x131),'hidden':!![]},{'name':a87_0x3b5edb(0x12a),'meowKey':'help','type':a87_0x3b5edb(0x145),'description':a87_0x3b5edb(0x103)},{'name':a87_0x3b5edb(0x14d),'meowKey':a87_0x3b5edb(0x14d),'type':a87_0x3b5edb(0x136),'description':a87_0x3b5edb(0x11e),'hidden':!![]},{'name':a87_0x3b5edb(0x112),'meowKey':a87_0x3b5edb(0x112),'type':'boolean','description':a87_0x3b5edb(0x116),'hidden':!![]},{'name':a87_0x3b5edb(0x143),'meowKey':a87_0x3b5edb(0x143),'type':a87_0x3b5edb(0x145),'description':a87_0x3b5edb(0x148),'hidden':!![]},{'name':'output','meowKey':a87_0x3b5edb(0x125),'type':a87_0x3b5edb(0x136),'description':a87_0x3b5edb(0x12f),'hidden':!![]},{'name':'params','meowKey':a87_0x3b5edb(0x132),'type':a87_0x3b5edb(0x136),'description':a87_0x3b5edb(0x13a),'hidden':!![]},{'name':a87_0x3b5edb(0x141),'meowKey':a87_0x3b5edb(0x141),'type':a87_0x3b5edb(0x136),'description':'Dataset\x20code','hidden':!![]},{'name':a87_0x3b5edb(0x139),'meowKey':a87_0x3b5edb(0x139),'type':a87_0x3b5edb(0x145),'description':a87_0x3b5edb(0x114),'hidden':!![]},{'name':a87_0x3b5edb(0x110),'meowKey':'enableBffSave','type':a87_0x3b5edb(0x145),'description':a87_0x3b5edb(0x12d),'hidden':!![]},{'name':'id','meowKey':'id','type':a87_0x3b5edb(0x136),'description':a87_0x3b5edb(0x12b),'hidden':!![]},{'name':'type','meowKey':'type','type':a87_0x3b5edb(0x136),'description':a87_0x3b5edb(0x13b),'hidden':!![]},{'name':a87_0x3b5edb(0x14c),'meowKey':a87_0x3b5edb(0x14c),'type':a87_0x3b5edb(0x136),'description':a87_0x3b5edb(0x100),'hidden':!![]},{'name':'sqlcode','meowKey':a87_0x3b5edb(0x11a),'type':a87_0x3b5edb(0x136),'description':a87_0x3b5edb(0x134),'hidden':!![]},{'name':a87_0x3b5edb(0x10f),'meowKey':'sqlname','type':'string','description':a87_0x3b5edb(0xf9),'hidden':!![]},{'name':a87_0x3b5edb(0x106),'meowKey':a87_0x3b5edb(0x106),'type':'string','description':'DB\x20ID','hidden':!![]},{'name':a87_0x3b5edb(0xff),'meowKey':a87_0x3b5edb(0xff),'type':a87_0x3b5edb(0x136),'description':'Description','hidden':!![]},{'name':a87_0x3b5edb(0x121),'meowKey':a87_0x3b5edb(0x121),'type':a87_0x3b5edb(0x136),'description':a87_0x3b5edb(0x128),'hidden':!![]},{'name':a87_0x3b5edb(0x10e),'meowKey':a87_0x3b5edb(0x10e),'type':a87_0x3b5edb(0x136),'description':a87_0x3b5edb(0x115),'hidden':!![]},{'name':a87_0x3b5edb(0xfa),'meowKey':a87_0x3b5edb(0xfa),'type':a87_0x3b5edb(0x136),'description':a87_0x3b5edb(0x11c),'hidden':!![]},{'name':a87_0x3b5edb(0x127),'meowKey':a87_0x3b5edb(0x127),'type':'string','description':'Code\x20filter','hidden':!![]},{'name':'sql','meowKey':a87_0x3b5edb(0x13d),'type':a87_0x3b5edb(0x136),'description':a87_0x3b5edb(0xfc),'hidden':!![]},{'name':a87_0x3b5edb(0x146),'meowKey':a87_0x3b5edb(0x146),'type':a87_0x3b5edb(0x136),'description':a87_0x3b5edb(0x140),'hidden':!![]},{'name':a87_0x3b5edb(0x10d),'meowKey':a87_0x3b5edb(0x10d),'type':a87_0x3b5edb(0x136),'description':a87_0x3b5edb(0x149),'hidden':!![]},{'name':a87_0x3b5edb(0x126),'meowKey':'target','type':a87_0x3b5edb(0x136),'description':'Target\x20path','hidden':!![]},{'name':a87_0x3b5edb(0x119),'meowKey':a87_0x3b5edb(0x10a),'type':'boolean','description':a87_0x3b5edb(0x151),'hidden':!![]},{'name':a87_0x3b5edb(0x11b),'meowKey':a87_0x3b5edb(0x11b),'type':a87_0x3b5edb(0x136),'description':a87_0x3b5edb(0x12e),'hidden':!![]},{'name':a87_0x3b5edb(0x120),'meowKey':'value','type':a87_0x3b5edb(0x136),'description':a87_0x3b5edb(0x113),'hidden':!![]},{'name':a87_0x3b5edb(0x152),'meowKey':a87_0x3b5edb(0x152),'type':a87_0x3b5edb(0x145),'description':a87_0x3b5edb(0x105),'hidden':!![]},{'name':'remote','meowKey':a87_0x3b5edb(0x118),'type':a87_0x3b5edb(0x145),'description':'Use\x20remote','hidden':!![]},{'name':a87_0x3b5edb(0x133),'meowKey':'verbose','type':'boolean','description':a87_0x3b5edb(0x14b),'hidden':!![]},{'name':'operation-type','meowKey':'operationType','type':'string','description':a87_0x3b5edb(0x149),'hidden':!![]},{'name':a87_0x3b5edb(0x107),'meowKey':a87_0x3b5edb(0x137),'type':a87_0x3b5edb(0x136),'description':a87_0x3b5edb(0x14f),'hidden':!![]}];export function buildMeowFlags(){const _0x395a0e=a87_0x3b5edb;return Object['fromEntries'](GLOBAL_FLAGS[_0x395a0e(0x11f)](_0x343161=>[_0x343161[_0x395a0e(0x130)],{'type':_0x343161['type']}]));}
1
+ const a89_0x5b8f6b=a89_0x1b81;(function(_0x33fcce,_0x2386df){const _0x2b08df=a89_0x1b81,_0x309f8f=_0x33fcce();while(!![]){try{const _0x1bf3eb=parseInt(_0x2b08df(0x219))/0x1*(parseInt(_0x2b08df(0x20b))/0x2)+-parseInt(_0x2b08df(0x1da))/0x3*(-parseInt(_0x2b08df(0x1e9))/0x4)+parseInt(_0x2b08df(0x1e1))/0x5+-parseInt(_0x2b08df(0x21f))/0x6+parseInt(_0x2b08df(0x22e))/0x7*(-parseInt(_0x2b08df(0x1e8))/0x8)+parseInt(_0x2b08df(0x1ec))/0x9*(-parseInt(_0x2b08df(0x210))/0xa)+parseInt(_0x2b08df(0x1dd))/0xb;if(_0x1bf3eb===_0x2386df)break;else _0x309f8f['push'](_0x309f8f['shift']());}catch(_0xd5b49c){_0x309f8f['push'](_0x309f8f['shift']());}}}(a89_0x39c8,0xba21a));export const CLI_BIN_NAME='rabetbase';function a89_0x1b81(_0x461c48,_0x151d2a){_0x461c48=_0x461c48-0x1d4;const _0x39c8df=a89_0x39c8();let _0x1b8178=_0x39c8df[_0x461c48];return _0x1b8178;}export const CLI_DISPLAY_NAME=a89_0x5b8f6b(0x21a);export const NPM_PACKAGE_NAME='@lovrabet/rabetbase-cli';function a89_0x39c8(){const _0x4281e8=['sqlname','Override\x20appcode','pagesize','sql','Watch\x20mode','Skip\x20confirmation\x20for\x20high-risk\x20writes','sqlcode','page','Function\x20node','project','Description','Environment','force','<expr>','code','dryRun','JSON\x20params','target','2CjQwPe','nonInteractive','Type\x20filter','env','Alias\x20for\x20--non-interactive','731740fkZgkx','Skip\x20import\x20generation','skip-imports','Preview\x20operation\x20without\x20executing','Force\x20overwrite','boolean','file','name','fromEntries','817442VSywVf','Rabetbase\x20CLI','<name>','app','Record\x20ID','verbose','3709098AhHzTA','help','Clear','<code>','operation-type','Enable\x20BFF\x20save','Apply\x20to\x20all','keyword','datasetcode','schemas','string','map','Target\x20path','global','all','2678207hpSkZQ','Config\x20value','Dataset\x20code','Use\x20global\x20config\x20scope','SQL\x20code','description','Filter\x20JSON\x20output\x20(bundled\x20jq\x20via\x20node-jq,\x20else\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','File\x20path','format','Operation\x20type','Show\x20help','dry-run','5079ukkhzx','Config\x20key','yes','9915576OfCDsX','type','non-interactive','Force\x20non-interactive\x20mode\x20(CI)','4350450sPcEpN','output','Output\x20format','Use\x20remote','key','enableBffSave','Page\x20number','16SkUCnm','1892vICPcl','Use\x20project\x20config\x20scope','dbid','153heRPFZ','Code\x20filter','value','clear','Output\x20path','enable-bff-save','watch','params','functionNode','meowKey','Select\x20app\x20profile\x20by\x20name','Schemas','Verbose\x20output'];a89_0x39c8=function(){return _0x4281e8;};return a89_0x39c8();}export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':'appcode','type':'string','description':a89_0x5b8f6b(0x1fa),'hint':a89_0x5b8f6b(0x222)},{'name':a89_0x5b8f6b(0x21c),'meowKey':'app','type':a89_0x5b8f6b(0x229),'description':a89_0x5b8f6b(0x1f6),'hint':a89_0x5b8f6b(0x21b)},{'name':a89_0x5b8f6b(0x20e),'meowKey':a89_0x5b8f6b(0x20e),'type':'string','description':a89_0x5b8f6b(0x204),'hint':'production\x20|\x20daily'},{'name':a89_0x5b8f6b(0x1d6),'meowKey':'format','type':'string','description':a89_0x5b8f6b(0x1e3),'hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':a89_0x5b8f6b(0x229),'description':a89_0x5b8f6b(0x1d4),'hint':a89_0x5b8f6b(0x206)},{'name':a89_0x5b8f6b(0x1d9),'meowKey':a89_0x5b8f6b(0x208),'type':a89_0x5b8f6b(0x215),'description':a89_0x5b8f6b(0x213)},{'name':a89_0x5b8f6b(0x1dc),'meowKey':a89_0x5b8f6b(0x1dc),'type':a89_0x5b8f6b(0x215),'description':a89_0x5b8f6b(0x1fe)},{'name':a89_0x5b8f6b(0x1df),'meowKey':a89_0x5b8f6b(0x20c),'type':a89_0x5b8f6b(0x215),'description':a89_0x5b8f6b(0x1e0)},{'name':a89_0x5b8f6b(0x22c),'meowKey':a89_0x5b8f6b(0x22c),'type':a89_0x5b8f6b(0x215),'description':a89_0x5b8f6b(0x231)},{'name':a89_0x5b8f6b(0x202),'meowKey':a89_0x5b8f6b(0x202),'type':'boolean','description':a89_0x5b8f6b(0x1ea)},{'name':'ci','meowKey':'ci','type':'boolean','description':a89_0x5b8f6b(0x20f),'hidden':!![]},{'name':a89_0x5b8f6b(0x220),'meowKey':a89_0x5b8f6b(0x220),'type':'boolean','description':a89_0x5b8f6b(0x1d8)},{'name':a89_0x5b8f6b(0x217),'meowKey':'name','type':a89_0x5b8f6b(0x229),'description':'Name','hidden':!![]},{'name':a89_0x5b8f6b(0x1ef),'meowKey':'clear','type':a89_0x5b8f6b(0x215),'description':a89_0x5b8f6b(0x221),'hidden':!![]},{'name':a89_0x5b8f6b(0x1f2),'meowKey':a89_0x5b8f6b(0x1f2),'type':a89_0x5b8f6b(0x215),'description':a89_0x5b8f6b(0x1fd),'hidden':!![]},{'name':a89_0x5b8f6b(0x1e2),'meowKey':'output','type':a89_0x5b8f6b(0x229),'description':a89_0x5b8f6b(0x1f0),'hidden':!![]},{'name':a89_0x5b8f6b(0x1f3),'meowKey':'params','type':a89_0x5b8f6b(0x229),'description':a89_0x5b8f6b(0x209),'hidden':!![]},{'name':'datasetcode','meowKey':a89_0x5b8f6b(0x227),'type':'string','description':a89_0x5b8f6b(0x230),'hidden':!![]},{'name':a89_0x5b8f6b(0x22d),'meowKey':a89_0x5b8f6b(0x22d),'type':a89_0x5b8f6b(0x215),'description':a89_0x5b8f6b(0x225),'hidden':!![]},{'name':a89_0x5b8f6b(0x1f1),'meowKey':a89_0x5b8f6b(0x1e6),'type':a89_0x5b8f6b(0x215),'description':a89_0x5b8f6b(0x224),'hidden':!![]},{'name':'id','meowKey':'id','type':'string','description':a89_0x5b8f6b(0x21d),'hidden':!![]},{'name':a89_0x5b8f6b(0x1de),'meowKey':a89_0x5b8f6b(0x1de),'type':'string','description':a89_0x5b8f6b(0x20d),'hidden':!![]},{'name':a89_0x5b8f6b(0x216),'meowKey':a89_0x5b8f6b(0x216),'type':a89_0x5b8f6b(0x229),'description':a89_0x5b8f6b(0x1d5),'hidden':!![]},{'name':'sqlcode','meowKey':a89_0x5b8f6b(0x1ff),'type':'string','description':a89_0x5b8f6b(0x232),'hidden':!![]},{'name':a89_0x5b8f6b(0x1f9),'meowKey':a89_0x5b8f6b(0x1f9),'type':'string','description':'SQL\x20name','hidden':!![]},{'name':'dbid','meowKey':a89_0x5b8f6b(0x1eb),'type':'string','description':'DB\x20ID','hidden':!![]},{'name':a89_0x5b8f6b(0x233),'meowKey':a89_0x5b8f6b(0x233),'type':a89_0x5b8f6b(0x229),'description':a89_0x5b8f6b(0x203),'hidden':!![]},{'name':a89_0x5b8f6b(0x200),'meowKey':'page','type':a89_0x5b8f6b(0x229),'description':a89_0x5b8f6b(0x1e7),'hidden':!![]},{'name':a89_0x5b8f6b(0x1fb),'meowKey':'pagesize','type':a89_0x5b8f6b(0x229),'description':'Page\x20size','hidden':!![]},{'name':a89_0x5b8f6b(0x226),'meowKey':a89_0x5b8f6b(0x226),'type':a89_0x5b8f6b(0x229),'description':'Keyword\x20filter','hidden':!![]},{'name':a89_0x5b8f6b(0x207),'meowKey':a89_0x5b8f6b(0x207),'type':'string','description':a89_0x5b8f6b(0x1ed),'hidden':!![]},{'name':a89_0x5b8f6b(0x1fc),'meowKey':a89_0x5b8f6b(0x1fc),'type':a89_0x5b8f6b(0x229),'description':'SQL\x20string','hidden':!![]},{'name':a89_0x5b8f6b(0x228),'meowKey':a89_0x5b8f6b(0x228),'type':a89_0x5b8f6b(0x229),'description':a89_0x5b8f6b(0x1f7),'hidden':!![]},{'name':'operation','meowKey':'operation','type':'string','description':'Operation\x20type','hidden':!![]},{'name':'target','meowKey':a89_0x5b8f6b(0x20a),'type':'string','description':a89_0x5b8f6b(0x22b),'hidden':!![]},{'name':a89_0x5b8f6b(0x212),'meowKey':'skipImports','type':a89_0x5b8f6b(0x215),'description':a89_0x5b8f6b(0x211),'hidden':!![]},{'name':a89_0x5b8f6b(0x1e5),'meowKey':a89_0x5b8f6b(0x1e5),'type':'string','description':a89_0x5b8f6b(0x1db),'hidden':!![]},{'name':a89_0x5b8f6b(0x1ee),'meowKey':a89_0x5b8f6b(0x1ee),'type':a89_0x5b8f6b(0x229),'description':a89_0x5b8f6b(0x22f),'hidden':!![]},{'name':a89_0x5b8f6b(0x205),'meowKey':a89_0x5b8f6b(0x205),'type':a89_0x5b8f6b(0x215),'description':a89_0x5b8f6b(0x214),'hidden':!![]},{'name':'remote','meowKey':'remote','type':a89_0x5b8f6b(0x215),'description':a89_0x5b8f6b(0x1e4),'hidden':!![]},{'name':'verbose','meowKey':a89_0x5b8f6b(0x21e),'type':a89_0x5b8f6b(0x215),'description':a89_0x5b8f6b(0x1f8),'hidden':!![]},{'name':a89_0x5b8f6b(0x223),'meowKey':'operationType','type':a89_0x5b8f6b(0x229),'description':a89_0x5b8f6b(0x1d7),'hidden':!![]},{'name':'function-node','meowKey':a89_0x5b8f6b(0x1f4),'type':a89_0x5b8f6b(0x229),'description':a89_0x5b8f6b(0x201),'hidden':!![]}];export function buildMeowFlags(){const _0x4a1b84=a89_0x5b8f6b;return Object[_0x4a1b84(0x218)](GLOBAL_FLAGS[_0x4a1b84(0x22a)](_0x2f861c=>[_0x2f861c[_0x4a1b84(0x1f5)],{'type':_0x2f861c[_0x4a1b84(0x1de)]}]));}
@@ -1 +1 @@
1
- const a88_0x67da57=a88_0x17b7;(function(_0x4f97a6,_0x156868){const _0x3fd175=a88_0x17b7,_0x4beb41=_0x4f97a6();while(!![]){try{const _0x3958bc=-parseInt(_0x3fd175(0x1ef))/0x1*(-parseInt(_0x3fd175(0x1e2))/0x2)+parseInt(_0x3fd175(0x1e8))/0x3*(parseInt(_0x3fd175(0x1ea))/0x4)+-parseInt(_0x3fd175(0x1ee))/0x5+-parseInt(_0x3fd175(0x1e7))/0x6+parseInt(_0x3fd175(0x1f0))/0x7*(-parseInt(_0x3fd175(0x1e1))/0x8)+parseInt(_0x3fd175(0x1f3))/0x9+parseInt(_0x3fd175(0x1e6))/0xa*(parseInt(_0x3fd175(0x1e4))/0xb);if(_0x3958bc===_0x156868)break;else _0x4beb41['push'](_0x4beb41['shift']());}catch(_0x503a49){_0x4beb41['push'](_0x4beb41['shift']());}}}(a88_0x31b4,0x46eb5));function a88_0x31b4(){const _0x259192=['https://daily-api.lovrabet.com','18330XDDezS','3272802hlFzpv','3QCDzRm','https://api.lovrabet.com','288712BbSkxQ','apiDomain','https://runtime.lovrabet.com','https://daily-runtime.lovrabet.com','96595Wbhpql','13mPIout','434RSlINJ','production','runtimeDomain','2205576sLzwiB','11192PToQyy','44794nfffyo','https://user-daily.lovrabet.com','2002kGjCjs'];a88_0x31b4=function(){return _0x259192;};return a88_0x31b4();}import{getEnv}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x157198){const _0x251c2a=a88_0x17b7;customApiDomain=_0x157198?.[_0x251c2a(0x1eb)],customUserDomain=_0x157198?.['userDomain'],customRuntimeDomain=_0x157198?.[_0x251c2a(0x1f2)];}function a88_0x17b7(_0x310261,_0x50d926){_0x310261=_0x310261-0x1e1;const _0x31b492=a88_0x31b4();let _0x17b7bd=_0x31b492[_0x310261];return _0x17b7bd;}export const getUserDomain=()=>customUserDomain||(getEnv()===a88_0x67da57(0x1f1)?'https://user.lovrabet.com':a88_0x67da57(0x1e3));export const getApiDomain=()=>customApiDomain||(getEnv()===a88_0x67da57(0x1f1)?a88_0x67da57(0x1e9):a88_0x67da57(0x1e5));export const getRuntimeDomain=()=>customRuntimeDomain||(getEnv()===a88_0x67da57(0x1f1)?a88_0x67da57(0x1ec):a88_0x67da57(0x1ed));
1
+ function a90_0x39be(){const _0x2c60a0=['https://daily-runtime.lovrabet.com','3049950yfaoWU','12Glyxke','userDomain','6ZOQhgr','https://user.lovrabet.com','11kQsUOt','runtimeDomain','production','637990icwkNa','53088NBveEv','2sdZAdM','123168WPOhzU','https://user-daily.lovrabet.com','17960UpLfXo','12DGaiCR','234451EoEmaj','https://runtime.lovrabet.com','https://api.lovrabet.com','4546568LnQdEa','261czEMJJ'];a90_0x39be=function(){return _0x2c60a0;};return a90_0x39be();}const a90_0xc73a4a=a90_0x412a;(function(_0xd31063,_0x10abee){const _0x4a675e=a90_0x412a,_0x56b4f2=_0xd31063();while(!![]){try{const _0x1e3965=-parseInt(_0x4a675e(0xe7))/0x1+parseInt(_0x4a675e(0xe8))/0x2*(-parseInt(_0x4a675e(0xe9))/0x3)+parseInt(_0x4a675e(0xdf))/0x4*(-parseInt(_0x4a675e(0xe6))/0x5)+parseInt(_0x4a675e(0xe1))/0x6*(-parseInt(_0x4a675e(0xd8))/0x7)+parseInt(_0x4a675e(0xd6))/0x8*(parseInt(_0x4a675e(0xdc))/0x9)+-parseInt(_0x4a675e(0xde))/0xa*(-parseInt(_0x4a675e(0xe3))/0xb)+parseInt(_0x4a675e(0xd7))/0xc*(parseInt(_0x4a675e(0xdb))/0xd);if(_0x1e3965===_0x10abee)break;else _0x56b4f2['push'](_0x56b4f2['shift']());}catch(_0x3e30d0){_0x56b4f2['push'](_0x56b4f2['shift']());}}}(a90_0x39be,0x331fd));import{getEnv}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x3b72ea){const _0x22bc8b=a90_0x412a;customApiDomain=_0x3b72ea?.['apiDomain'],customUserDomain=_0x3b72ea?.[_0x22bc8b(0xe0)],customRuntimeDomain=_0x3b72ea?.[_0x22bc8b(0xe4)];}export const getUserDomain=()=>customUserDomain||(getEnv()===a90_0xc73a4a(0xe5)?a90_0xc73a4a(0xe2):a90_0xc73a4a(0xea));function a90_0x412a(_0x4be483,_0x4a1ff3){_0x4be483=_0x4be483-0xd6;const _0x39bed2=a90_0x39be();let _0x412a0f=_0x39bed2[_0x4be483];return _0x412a0f;}export const getApiDomain=()=>customApiDomain||(getEnv()===a90_0xc73a4a(0xe5)?a90_0xc73a4a(0xda):'https://daily-api.lovrabet.com');export const getRuntimeDomain=()=>customRuntimeDomain||(getEnv()===a90_0xc73a4a(0xe5)?a90_0xc73a4a(0xd9):a90_0xc73a4a(0xdd));
@@ -1 +1 @@
1
- const a89_0x4e6af8=a89_0x12fe;(function(_0xc8e41f,_0x3d56d7){const _0x446730=a89_0x12fe,_0x127c95=_0xc8e41f();while(!![]){try{const _0x11a027=-parseInt(_0x446730(0x1f4))/0x1+parseInt(_0x446730(0x1f1))/0x2*(-parseInt(_0x446730(0x1f8))/0x3)+parseInt(_0x446730(0x1f9))/0x4+parseInt(_0x446730(0x1f0))/0x5+parseInt(_0x446730(0x1fa))/0x6+parseInt(_0x446730(0x1f3))/0x7*(parseInt(_0x446730(0x1f2))/0x8)+-parseInt(_0x446730(0x1ef))/0x9*(parseInt(_0x446730(0x1f5))/0xa);if(_0x11a027===_0x3d56d7)break;else _0x127c95['push'](_0x127c95['shift']());}catch(_0x176133){_0x127c95['push'](_0x127c95['shift']());}}}(a89_0x4b28,0x3fa41));export function normalizeEnv(_0x3d1836){const _0xbf5d27=a89_0x12fe;return _0x3d1836===_0xbf5d27(0x1f6)?_0xbf5d27(0x1f7):_0x3d1836;}function a89_0x4b28(){const _0x4043f7=['1430664fyWxla','14IuiYxB','25124zZbVZA','1149460yMfrdu','online','production','48ZTJeJR','658812DqvyeT','2423010SZyBIL','63UsCMRA','1587635zrKXyb','19164xZkwFS'];a89_0x4b28=function(){return _0x4043f7;};return a89_0x4b28();}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a89_0x4e6af8(0x1f7));function a89_0x12fe(_0x5e163c,_0x494688){_0x5e163c=_0x5e163c-0x1ef;const _0x4b2848=a89_0x4b28();let _0x12fec4=_0x4b2848[_0x5e163c];return _0x12fec4;}export function getEnv(){return env;}export function initEnv(_0x5e9c71){env=normalizeEnv(_0x5e9c71);}
1
+ const a91_0x31883b=a91_0x2a47;(function(_0x3ca48b,_0x220220){const _0x38372c=a91_0x2a47,_0x158837=_0x3ca48b();while(!![]){try{const _0x1842e8=-parseInt(_0x38372c(0xf0))/0x1*(-parseInt(_0x38372c(0xf7))/0x2)+parseInt(_0x38372c(0xf8))/0x3+parseInt(_0x38372c(0xf1))/0x4*(-parseInt(_0x38372c(0xfa))/0x5)+-parseInt(_0x38372c(0xf9))/0x6+-parseInt(_0x38372c(0xf3))/0x7+parseInt(_0x38372c(0xfc))/0x8*(-parseInt(_0x38372c(0xfb))/0x9)+-parseInt(_0x38372c(0xf6))/0xa*(-parseInt(_0x38372c(0xf2))/0xb);if(_0x1842e8===_0x220220)break;else _0x158837['push'](_0x158837['shift']());}catch(_0x14f800){_0x158837['push'](_0x158837['shift']());}}}(a91_0x4f9c,0xd13f8));function a91_0x2a47(_0x1e4e01,_0x4fa83a){_0x1e4e01=_0x1e4e01-0xf0;const _0x4f9c44=a91_0x4f9c();let _0x2a4723=_0x4f9c44[_0x1e4e01];return _0x2a4723;}export function normalizeEnv(_0x3cad43){const _0x4f47ea=a91_0x2a47;return _0x3cad43===_0x4f47ea(0xf4)?'production':_0x3cad43;}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a91_0x31883b(0xf5));function a91_0x4f9c(){const _0x536205=['4207530DwaTju','9498696WaVIXc','1555LDnRpX','6372207jfZolp','8yzSJIF','1JcSimH','8776HoRxxP','239756XmOGVm','5713862SqyjLo','online','production','1140REZAoD','1519130nYDwCr'];a91_0x4f9c=function(){return _0x536205;};return a91_0x4f9c();}export function getEnv(){return env;}export function initEnv(_0x3dead3){env=normalizeEnv(_0x3dead3);}
@@ -1 +1 @@
1
- const a90_0x558a7d=a90_0x3a40;(function(_0x25a378,_0x15cc68){const _0x2584e0=a90_0x3a40,_0x1fa9f7=_0x25a378();while(!![]){try{const _0x4afb4e=-parseInt(_0x2584e0(0x110))/0x1*(parseInt(_0x2584e0(0x10d))/0x2)+-parseInt(_0x2584e0(0x10e))/0x3+-parseInt(_0x2584e0(0x10f))/0x4*(parseInt(_0x2584e0(0x113))/0x5)+parseInt(_0x2584e0(0x112))/0x6+-parseInt(_0x2584e0(0x10a))/0x7+parseInt(_0x2584e0(0x10c))/0x8+parseInt(_0x2584e0(0x111))/0x9;if(_0x4afb4e===_0x15cc68)break;else _0x1fa9f7['push'](_0x1fa9f7['shift']());}catch(_0x164b04){_0x1fa9f7['push'](_0x1fa9f7['shift']());}}}(a90_0x54e4,0x618aa));function a90_0x3a40(_0x2e009e,_0x4e0a63){_0x2e009e=_0x2e009e-0x10a;const _0x54e424=a90_0x54e4();let _0x3a40c1=_0x54e424[_0x2e009e];return _0x3a40c1;}function a90_0x54e4(){const _0x2f55e8=['2165889eJaJYA','16BTZhSh','28yporNm','13374477cBQEjc','2172066idXEUj','328835mtIxKT','3864560GIGBfO','./src/api','4901672cgIYCs','37438jyvaYp'];a90_0x54e4=function(){return _0x2f55e8;};return a90_0x54e4();}export const DEFAULT_API_DIR=a90_0x558a7d(0x10b);
1
+ const a92_0x1cf5bf=a92_0x47bb;function a92_0x47bb(_0x5a15b5,_0x9ff7bf){_0x5a15b5=_0x5a15b5-0x84;const _0x184c27=a92_0x184c();let _0x47bbaa=_0x184c27[_0x5a15b5];return _0x47bbaa;}(function(_0x5208fd,_0x581d67){const _0x20f7e9=a92_0x47bb,_0x1551c9=_0x5208fd();while(!![]){try{const _0x4f6bf8=-parseInt(_0x20f7e9(0x8c))/0x1+parseInt(_0x20f7e9(0x8f))/0x2*(-parseInt(_0x20f7e9(0x84))/0x3)+parseInt(_0x20f7e9(0x8d))/0x4+-parseInt(_0x20f7e9(0x87))/0x5+-parseInt(_0x20f7e9(0x85))/0x6*(-parseInt(_0x20f7e9(0x86))/0x7)+parseInt(_0x20f7e9(0x8a))/0x8*(-parseInt(_0x20f7e9(0x8b))/0x9)+-parseInt(_0x20f7e9(0x88))/0xa*(-parseInt(_0x20f7e9(0x8e))/0xb);if(_0x4f6bf8===_0x581d67)break;else _0x1551c9['push'](_0x1551c9['shift']());}catch(_0x1f5b40){_0x1551c9['push'](_0x1551c9['shift']());}}}(a92_0x184c,0xcf501));function a92_0x184c(){const _0x10759f=['940uyfjPx','./src/api','200mlcifW','344412wNpALN','1627693UKNekC','75996UilbnM','542817eOnXdg','1717158XbIxdU','3WsPFuG','108oyMajZ','311759sFPtBL','5835790RAhLjr'];a92_0x184c=function(){return _0x10759f;};return a92_0x184c();}export const DEFAULT_API_DIR=a92_0x1cf5bf(0x89);
package/lib/context.js CHANGED
@@ -1 +1 @@
1
- const a91_0x29b968=a91_0x4b98;(function(_0x2c8317,_0x23af63){const _0x54c875=a91_0x4b98,_0x362be2=_0x2c8317();while(!![]){try{const _0x301e41=parseInt(_0x54c875(0x1b6))/0x1+-parseInt(_0x54c875(0x1de))/0x2+-parseInt(_0x54c875(0x1bf))/0x3+-parseInt(_0x54c875(0x1df))/0x4+-parseInt(_0x54c875(0x1d6))/0x5+parseInt(_0x54c875(0x1cc))/0x6*(parseInt(_0x54c875(0x1db))/0x7)+parseInt(_0x54c875(0x19b))/0x8;if(_0x301e41===_0x23af63)break;else _0x362be2['push'](_0x362be2['shift']());}catch(_0x308a76){_0x362be2['push'](_0x362be2['shift']());}}}(a91_0x4c80,0x9375a));import{readFileSync,writeFileSync,existsSync,mkdirSync,renameSync,unlinkSync}from'node:fs';import{resolve,dirname}from'node:path';function a91_0x4c80(){const _0x1196b6=['.lovrabet.json','defaultApp','userDomain','\x0a\x20\x20','APPCODE','find','argv','api.ts','filter','inherit','true','high-risk-write','./constant/env.js','334169cIhGOl','read','COOKIE','APP','error','online','apiDir','empty','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','1485648cHKjIz','./constant/domain.js','missing','ENV','.rabetbase.json','locale','entries','keys','slice','apps','./utils/is-non-interactive.js','silent','message','1776rCkEeU','object','runtimeDomain','pageSize','utf8','join','cookie','daily','format','production','1983915dHKLPn','maxRisk','authRequired','write','stringify','6475DYjzUj','Global','riskLevel','1570200LJodDe','3323712oRXRJk','./auth/get-cookie.js','.lovrabetrc','-api.ts','setRawCommand','RISK_LEVEL','cwd','length','project','20032416RRWrPd','trim','ACCESS_KEY','MAX_RISK','parse','env','VERBOSE','accessKey','string','en-US','warn','PAGE_SIZE','status','appcode'];a91_0x4c80=function(){return _0x1196b6;};return a91_0x4c80();}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_API_DIR}from'./constant/paths.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';function env(_0xb51c68){return process.env[`RABETBASE_${_0xb51c68}`]||process.env[`LOVRABET_${_0xb51c68}`]||undefined;}export const NEW_CONFIG_NAME=a91_0x29b968(0x1c3);export const CONFIG_NAMES=[a91_0x29b968(0x1c3),a91_0x29b968(0x1a9),a91_0x29b968(0x1e1)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a91_0x29b968(0x1b1)](_0x595d11=>_0x595d11!==NEW_CONFIG_NAME);export function resolveConfigPath(_0x548707){for(const _0x1e0707 of CONFIG_NAMES){const _0xffc86d=resolve(_0x548707,_0x1e0707);if(existsSync(_0xffc86d))return _0xffc86d;}return undefined;}export async function createContext(_0x165fc5){const _0x3c9976=a91_0x29b968,_0x5cbcc8=readRawConfig(),_0x39a319=buildConfig(_0x5cbcc8,_0x165fc5),{initEnv:_0x2e671c}=await import(_0x3c9976(0x1b5));if(_0x39a319['env'])_0x2e671c(_0x39a319[_0x3c9976(0x1a0)]);else _0x165fc5[_0x3c9976(0x1a0)]&&typeof _0x165fc5[_0x3c9976(0x1a0)]===_0x3c9976(0x1a3)&&_0x2e671c(_0x165fc5[_0x3c9976(0x1a0)]);const {initDomains:_0x5bddf2,getUserDomain:_0x16b163,getApiDomain:_0x4336ef}=await import(_0x3c9976(0x1c0));_0x5bddf2({'apiDomain':_0x5cbcc8['apiDomain']||undefined,'userDomain':_0x5cbcc8[_0x3c9976(0x1ab)]||undefined,'runtimeDomain':_0x5cbcc8[_0x3c9976(0x1ce)]||undefined});const _0x5a1a37={'apiDomain':_0x4336ef(),'userDomain':_0x16b163()},_0x434056=await buildAuth(_0x39a319);logger['setLogPath'](process[_0x3c9976(0x198)]());const _0x7f0754=(CLI_BIN_NAME+'\x20'+process[_0x3c9976(0x1af)][_0x3c9976(0x1c7)](0x2)[_0x3c9976(0x1d1)]('\x20'))[_0x3c9976(0x19c)]();logger[_0x3c9976(0x196)](_0x7f0754);const {isNonInteractive:_0x31d56b}=await import(_0x3c9976(0x1c9)),_0x182904=_0x31d56b(_0x165fc5);return{'config':_0x39a319,'auth':_0x434056,'logger':logger,'env':_0x5a1a37,'nonInteractive':_0x182904};}export function buildConfigFromFlags(_0x29a6b7){return buildConfig(readRawConfig(),_0x29a6b7);}export function getProjectConfigPath(){const _0x3e430b=a91_0x29b968;return resolveConfigPath(process[_0x3e430b(0x198)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x4fb63d){const _0xfb5bce=a91_0x29b968;if(!existsSync(_0x4fb63d))return{'status':'missing'};try{const _0xbd76a8=readFileSync(_0x4fb63d,{'encoding':'utf8'});if(!_0xbd76a8?.[_0xfb5bce(0x19c)]())return{'status':_0xfb5bce(0x1bd)};const _0x54a63a=JSON[_0xfb5bce(0x19f)](_0xbd76a8);return{'status':'ok','data':_0x54a63a};}catch(_0x1be69e){return{'status':_0xfb5bce(0x1ba),'message':_0x1be69e instanceof Error?_0x1be69e[_0xfb5bce(0x1cb)]:String(_0x1be69e)};}}function parseCliConfigJsonFile(_0x5c5b06,_0x1207a2,_0x4b50d6){const _0x28a6ad=a91_0x29b968,_0x128d9b=inspectCliConfigJsonFile(_0x5c5b06);if(_0x128d9b['status']===_0x28a6ad(0x1c1)||_0x128d9b[_0x28a6ad(0x1a7)]===_0x28a6ad(0x1bd))return{};if(_0x128d9b[_0x28a6ad(0x1a7)]==='ok')return _0x128d9b['data'];return _0x1207a2===_0x28a6ad(0x1a5)&&_0x4b50d6&&console[_0x28a6ad(0x1ba)](CLI_BIN_NAME+':\x20'+_0x4b50d6+_0x28a6ad(0x1be)+_0x5c5b06+_0x28a6ad(0x1ac)+_0x128d9b['message']),{};}function a91_0x4b98(_0xdeb1c2,_0x5595f0){_0xdeb1c2=_0xdeb1c2-0x196;const _0x4c80be=a91_0x4c80();let _0x4b989b=_0x4c80be[_0xdeb1c2];return _0x4b989b;}export function loadRawConfigLayers(_0x23a424){const _0x19e673=a91_0x29b968;let _0xe7de52={},_0x45e965={};const _0x3f9457=resolveConfigPath(homedir());_0x3f9457&&(_0xe7de52=parseCliConfigJsonFile(_0x3f9457,_0x19e673(0x1a5),_0x19e673(0x1dc)));const _0x474dfd=_0x23a424||process[_0x19e673(0x198)](),_0x370df4=resolveConfigPath(_0x474dfd);return _0x370df4&&(_0x45e965=parseCliConfigJsonFile(_0x370df4,'warn','Project')),{'globalPath':_0x3f9457,'projectPath':_0x370df4,'globalConfig':_0xe7de52,'projectConfig':_0x45e965};}function mergeRawConfigLayers(_0x212792){const _0x39e50f=a91_0x29b968,{globalConfig:_0x5eff93,projectConfig:_0x2e0f6c}=_0x212792;if(_0x2e0f6c[_0x39e50f(0x1b2)]===![]){const _0x579bc6={..._0x2e0f6c};delete _0x579bc6[_0x39e50f(0x1b2)];const _0x205ad8=_0x2e0f6c[_0x39e50f(0x1c8)]&&typeof _0x2e0f6c[_0x39e50f(0x1c8)]===_0x39e50f(0x1cd)?_0x2e0f6c[_0x39e50f(0x1c8)]:{};Object['keys'](_0x205ad8)[_0x39e50f(0x199)]>0x0?_0x579bc6[_0x39e50f(0x1c8)]=_0x205ad8:delete _0x579bc6[_0x39e50f(0x1c8)];if(_0x39e50f(0x1aa)in _0x2e0f6c)_0x579bc6['defaultApp']=_0x2e0f6c[_0x39e50f(0x1aa)];else Object['keys'](_0x205ad8)[_0x39e50f(0x199)]>0x0&&(_0x579bc6['defaultApp']=Object[_0x39e50f(0x1c6)](_0x205ad8)[0x0]);return _0x579bc6;}const _0x1950ea=_0x5eff93[_0x39e50f(0x1c8)]&&typeof _0x5eff93[_0x39e50f(0x1c8)]===_0x39e50f(0x1cd)?_0x5eff93['apps']:{},_0x386958=_0x2e0f6c[_0x39e50f(0x1c8)]&&typeof _0x2e0f6c[_0x39e50f(0x1c8)]==='object'?_0x2e0f6c[_0x39e50f(0x1c8)]:{},_0x124b1a={..._0x1950ea,..._0x386958},_0x38892d={..._0x5eff93,..._0x2e0f6c};Object[_0x39e50f(0x1c6)](_0x124b1a)[_0x39e50f(0x199)]>0x0&&(_0x38892d['apps']=_0x124b1a);if('defaultApp'in _0x2e0f6c)_0x38892d[_0x39e50f(0x1aa)]=_0x2e0f6c[_0x39e50f(0x1aa)];else{if(_0x386958&&Object[_0x39e50f(0x1c6)](_0x386958)[_0x39e50f(0x199)]>0x0)_0x38892d[_0x39e50f(0x1aa)]=Object['keys'](_0x386958)[0x0];else _0x5eff93[_0x39e50f(0x1aa)]&&(_0x38892d['defaultApp']=_0x5eff93[_0x39e50f(0x1aa)]);}return _0x38892d;}export function readRawConfigWithLayers(_0x1c2aff){const _0x374045=loadRawConfigLayers(_0x1c2aff);return{'config':mergeRawConfigLayers(_0x374045),'layers':_0x374045};}export function readRawConfig(_0x429f8f){return mergeRawConfigLayers(loadRawConfigLayers(_0x429f8f));}export function readConfigFile(_0x14367d){const _0x4f1a2f=a91_0x29b968;return parseCliConfigJsonFile(_0x14367d,_0x4f1a2f(0x1ca));}export function writeConfigFile(_0x2c950f,_0x1b35cd){const _0x58a5dd=a91_0x29b968,_0xdd53d0=dirname(_0x2c950f);!existsSync(_0xdd53d0)&&mkdirSync(_0xdd53d0,{'recursive':!![]});const _0x258798=_0x2c950f+'.tmp';try{writeFileSync(_0x258798,JSON[_0x58a5dd(0x1da)](_0x1b35cd,null,0x2)+'\x0a',{'encoding':_0x58a5dd(0x1d0),'mode':0x180}),renameSync(_0x258798,_0x2c950f);}catch(_0x1f84a9){try{unlinkSync(_0x258798);}catch{}throw _0x1f84a9;}}export function resolveWriteConfigPath(_0x36de27){const _0x1e1431=a91_0x29b968,_0x46061c=_0x36de27===_0x1e1431(0x19a)?process[_0x1e1431(0x198)]():homedir(),_0x2800e6=resolveConfigPath(_0x46061c);return _0x2800e6??resolve(_0x46061c,NEW_CONFIG_NAME);}function buildConfig(_0x30d9ae,_0x13d33b){const _0x3de017=a91_0x29b968,_0x341d1d={};if(_0x30d9ae[_0x3de017(0x1c8)]&&typeof _0x30d9ae[_0x3de017(0x1c8)]===_0x3de017(0x1cd))for(const [_0x177621,_0x1eb848]of Object[_0x3de017(0x1c5)](_0x30d9ae['apps'])){_0x1eb848&&typeof _0x1eb848===_0x3de017(0x1cd)&&_0x1eb848[_0x3de017(0x1a8)]&&(_0x341d1d[_0x177621]=_0x1eb848);}const _0x4cf551=_0x30d9ae[_0x3de017(0x1aa)]||undefined,_0xf2f00f=Object[_0x3de017(0x1c6)](_0x341d1d)['length']>0x0,_0x34cd38=_0x13d33b['app']||env(_0x3de017(0x1b9))||undefined,_0x5410d1=_0x34cd38||_0x4cf551||undefined,_0x22ada7=_0x13d33b[_0x3de017(0x1a8)]||env(_0x3de017(0x1ad))||undefined,_0x25949f=_0x22ada7?Object[_0x3de017(0x1c5)](_0x341d1d)[_0x3de017(0x1ae)](([,_0x3d73a7])=>_0x3d73a7?.[_0x3de017(0x1a8)]===_0x22ada7):undefined,_0xa3b7ee=_0x25949f?.[0x0],_0x56b939=_0x25949f?.[0x1];let _0x3ab938=_0x22ada7?_0xa3b7ee:_0x5410d1,_0x300e97=_0x3ab938&&_0x341d1d[_0x3ab938]?_0x341d1d[_0x3ab938]:undefined;_0x22ada7&&_0x56b939&&(_0x300e97=_0x56b939);const _0x7e4933=_0x22ada7?_0x56b939??_0x300e97:_0x300e97,_0x1ddec5=_0x34cd38||(_0x22ada7?_0xa3b7ee:undefined),_0x51cd4d=_0x22ada7||_0x7e4933?.[_0x3de017(0x1a8)]||_0x30d9ae[_0x3de017(0x1a8)]||_0x30d9ae['app']||undefined,_0x27bdd3=_0x13d33b[_0x3de017(0x1a0)]||env(_0x3de017(0x1c2))||_0x7e4933?.['env']||_0x30d9ae['env']||_0x3de017(0x1d5),_0x50c2ab=_0x7e4933?.[_0x3de017(0x1c4)]||_0x30d9ae[_0x3de017(0x1c4)]||_0x3de017(0x1a4),_0x591fa6=env(_0x3de017(0x1b8))||_0x7e4933?.[_0x3de017(0x1d2)]||_0x30d9ae[_0x3de017(0x1d2)]||undefined,_0x2aa2db=env(_0x3de017(0x19d))||_0x7e4933?.[_0x3de017(0x1a2)]||_0x30d9ae[_0x3de017(0x1a2)]||undefined,_0x3c6912=_0x13d33b[_0x3de017(0x1d4)]||env('FORMAT')||_0x7e4933?.[_0x3de017(0x1d4)]||_0x30d9ae[_0x3de017(0x1d4)],_0x450d20=normalizeLegacyOutputFormat(_0x3c6912),_0x4f8102=env(_0x3de017(0x1a6))||_0x7e4933?.[_0x3de017(0x1cf)]||_0x30d9ae[_0x3de017(0x1cf)],_0x883a97=_0x4f8102?Number(_0x4f8102)||undefined:undefined,_0x10d033=env(_0x3de017(0x197))||env(_0x3de017(0x19e))||_0x7e4933?.[_0x3de017(0x1dd)]||_0x30d9ae['riskLevel']||_0x30d9ae[_0x3de017(0x1d7)],_0x41a517=_0x10d033===_0x3de017(0x1b7)||_0x10d033===_0x3de017(0x1d9)?_0x10d033:_0x3de017(0x1b4),_0x2d6460=env(_0x3de017(0x1a1)),_0x9fd9a4=_0x2d6460==='1'||_0x2d6460===_0x3de017(0x1b3),_0x111f6c=_0x7e4933?.[_0x3de017(0x1bc)]||_0x30d9ae[_0x3de017(0x1bc)]||DEFAULT_API_DIR;return{'appCode':typeof _0x51cd4d==='string'&&_0x51cd4d['trim']()?_0x51cd4d['trim']():undefined,'env':_0x27bdd3===_0x3de017(0x1bb)?_0x3de017(0x1d5):_0x27bdd3===_0x3de017(0x1d3)?_0x3de017(0x1d3):_0x3de017(0x1d5),'locale':_0x50c2ab,'cookie':_0x591fa6,'accessKey':_0x2aa2db,'format':_0x450d20,'pageSize':_0x883a97,'riskLevel':_0x41a517,'verbose':_0x9fd9a4,'apiDir':_0x111f6c,'apps':_0x341d1d,'defaultApp':_0x4cf551,'currentApp':_0xf2f00f?_0x3ab938:undefined,'explicitAppName':_0x1ddec5,'raw':_0x30d9ae};}async function buildAuth(_0x52be32){const _0x2f24b7=a91_0x29b968,{getCookie:_0x391060}=await import(_0x2f24b7(0x1e0)),_0x4de79a=_0x52be32[_0x2f24b7(0x1d2)]||_0x391060(),_0x27c160=_0x4de79a?await getIsSessionValid():![];return{'cookie':_0x4de79a,'isLoggedIn':_0x27c160,async 'getOrLogin'(){const _0x549243=_0x2f24b7;if(_0x4de79a&&_0x27c160)return _0x4de79a;throw CliErrors[_0x549243(0x1d8)]();}};}export function resolveApiFilePath(_0x3217c4,_0x140732){const _0x259730=a91_0x29b968,_0x518a08=resolve(process[_0x259730(0x198)](),_0x3217c4),_0x5b11ea=resolve(_0x518a08,_0x259730(0x1b0));if(!_0x140732)return _0x5b11ea;const _0x3ca485=readRawConfig(),_0x85010=_0x3ca485[_0x259730(0x1c8)]&&typeof _0x3ca485[_0x259730(0x1c8)]===_0x259730(0x1cd)?_0x3ca485[_0x259730(0x1c8)]:{},_0xe4cc0d=Object[_0x259730(0x1c5)](_0x85010)[_0x259730(0x1ae)](([,_0xee57c])=>_0xee57c?.[_0x259730(0x1a8)]===_0x140732);if(!_0xe4cc0d)return _0x5b11ea;const [_0x1c0e51,_0x3922a4]=_0xe4cc0d,_0x467218=typeof _0x3ca485['defaultApp']===_0x259730(0x1a3)?_0x3ca485[_0x259730(0x1aa)]:undefined;if(_0x3922a4?.[_0x259730(0x1bc)])return _0x5b11ea;if(_0x467218&&_0x1c0e51!==_0x467218)return resolve(_0x518a08,_0x1c0e51+_0x259730(0x1e2));return _0x5b11ea;}
1
+ const a93_0x2763c8=a93_0x1868;(function(_0x524baf,_0x283214){const _0x57b4dc=a93_0x1868,_0x491410=_0x524baf();while(!![]){try{const _0x1f6d5b=-parseInt(_0x57b4dc(0x129))/0x1+-parseInt(_0x57b4dc(0x143))/0x2*(parseInt(_0x57b4dc(0x122))/0x3)+parseInt(_0x57b4dc(0x128))/0x4*(-parseInt(_0x57b4dc(0x151))/0x5)+parseInt(_0x57b4dc(0x11e))/0x6+parseInt(_0x57b4dc(0x135))/0x7*(-parseInt(_0x57b4dc(0x115))/0x8)+parseInt(_0x57b4dc(0x13b))/0x9+parseInt(_0x57b4dc(0x137))/0xa*(parseInt(_0x57b4dc(0x13d))/0xb);if(_0x1f6d5b===_0x283214)break;else _0x491410['push'](_0x491410['shift']());}catch(_0x4bafdb){_0x491410['push'](_0x491410['shift']());}}}(a93_0x2912,0x80cd1));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_API_DIR}from'./constant/paths.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';function env(_0x20bc5e){return process.env[`RABETBASE_${_0x20bc5e}`]||process.env[`LOVRABET_${_0x20bc5e}`]||undefined;}export const NEW_CONFIG_NAME=a93_0x2763c8(0x113);export const CONFIG_NAMES=['.rabetbase.json',a93_0x2763c8(0x114),a93_0x2763c8(0x120)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a93_0x2763c8(0x14b)](_0x42e23a=>_0x42e23a!==NEW_CONFIG_NAME);export function resolveConfigPath(_0x2345d3){for(const _0x20a84f of CONFIG_NAMES){const _0x4cd9fe=resolve(_0x2345d3,_0x20a84f);if(existsSync(_0x4cd9fe))return _0x4cd9fe;}return undefined;}export function findProjectRootDirectory(_0x4cc2d9=process[a93_0x2763c8(0x111)]()){let _0x4a5a8d=resolve(_0x4cc2d9);const {root:_0x2f3d46}=parse(_0x4a5a8d),_0x56f2b2=homedir();while(!![]){if(resolveConfigPath(_0x4a5a8d)){if(_0x4a5a8d===_0x56f2b2)break;return _0x4a5a8d;}if(_0x4a5a8d===_0x2f3d46||_0x4a5a8d===_0x56f2b2)break;const _0x545ed5=dirname(_0x4a5a8d);if(_0x545ed5===_0x4a5a8d)break;_0x4a5a8d=_0x545ed5;}return resolve(_0x4cc2d9);}export async function createContext(_0x4455d5){const _0x51b257=a93_0x2763c8,_0x1712e2=readRawConfig(),_0x1b382e=buildConfig(_0x1712e2,_0x4455d5),{initEnv:_0x4a02f4}=await import(_0x51b257(0x145));if(_0x1b382e['env'])_0x4a02f4(_0x1b382e[_0x51b257(0x125)]);else _0x4455d5['env']&&typeof _0x4455d5[_0x51b257(0x125)]===_0x51b257(0x12c)&&_0x4a02f4(_0x4455d5[_0x51b257(0x125)]);const {initDomains:_0x108c88,getUserDomain:_0x121b7f,getApiDomain:_0x270f26}=await import(_0x51b257(0x110));_0x108c88({'apiDomain':_0x1712e2[_0x51b257(0x14e)]||undefined,'userDomain':_0x1712e2[_0x51b257(0x132)]||undefined,'runtimeDomain':_0x1712e2[_0x51b257(0x124)]||undefined});const _0x1fcc3d={'apiDomain':_0x270f26(),'userDomain':_0x121b7f()},_0x25c77c=await buildAuth(_0x1b382e);logger[_0x51b257(0x13a)](process[_0x51b257(0x111)]());const _0xc56534=(CLI_BIN_NAME+'\x20'+process[_0x51b257(0x153)][_0x51b257(0x13e)](0x2)[_0x51b257(0x14d)]('\x20'))[_0x51b257(0x146)]();logger['setRawCommand'](_0xc56534);const {isNonInteractive:_0x28a6b8}=await import(_0x51b257(0x134)),_0x451752=_0x28a6b8(_0x4455d5);return{'config':_0x1b382e,'auth':_0x25c77c,'logger':logger,'env':_0x1fcc3d,'nonInteractive':_0x451752};}export function buildConfigFromFlags(_0x26ea27){return buildConfig(readRawConfig(),_0x26ea27);}export function getProjectConfigPath(){const _0x1c401f=a93_0x2763c8;return resolveConfigPath(process[_0x1c401f(0x111)]());}function a93_0x2912(){const _0x9bcc45=['1096183VeaPmf','slice','production','status','./auth/get-cookie.js','silent','469202TtsSVn','ACCESS_KEY','./constant/env.js','trim','api.ts','ENV','accessKey','FORMAT','filter','message','join','apiDomain','pageSize','RISK_LEVEL','485fTEHvO','apiDir','argv','authRequired','Global','format','parse','entries','maxRisk','keys','appcode','inherit','./constant/domain.js','cwd','defaultApp','.rabetbase.json','.lovrabet.json','5728NBoXSj','find','utf8','error','Project','locale','cookie','write','object','1096746XfRtdm','riskLevel','.lovrabetrc','apps','3Clqlpc','true','runtimeDomain','env','length','warn','37292LkanCs','92985oyZAwk','read','daily','string','.tmp','app','missing','stringify','-api.ts','userDomain','empty','./utils/is-non-interactive.js','9723vTRxDA','PAGE_SIZE','240IjzMRX','\x0a\x20\x20','data','setLogPath','1615923OpoVRA','en-US'];a93_0x2912=function(){return _0x9bcc45;};return a93_0x2912();}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x24c509){const _0x2d1beb=a93_0x2763c8;if(!existsSync(_0x24c509))return{'status':'missing'};try{const _0x384dba=readFileSync(_0x24c509,{'encoding':_0x2d1beb(0x117)});if(!_0x384dba?.['trim']())return{'status':_0x2d1beb(0x133)};const _0x4caf19=JSON[_0x2d1beb(0x157)](_0x384dba);return{'status':'ok','data':_0x4caf19};}catch(_0x281f57){return{'status':_0x2d1beb(0x118),'message':_0x281f57 instanceof Error?_0x281f57['message']:String(_0x281f57)};}}function a93_0x1868(_0x2765ab,_0x30f08b){_0x2765ab=_0x2765ab-0x10b;const _0x2912f3=a93_0x2912();let _0x186860=_0x2912f3[_0x2765ab];return _0x186860;}function parseCliConfigJsonFile(_0x39ef11,_0x5bae46,_0x3afc59){const _0x126619=a93_0x2763c8,_0xccb7dc=inspectCliConfigJsonFile(_0x39ef11);if(_0xccb7dc[_0x126619(0x140)]===_0x126619(0x12f)||_0xccb7dc[_0x126619(0x140)]===_0x126619(0x133))return{};if(_0xccb7dc[_0x126619(0x140)]==='ok')return _0xccb7dc[_0x126619(0x139)];return _0x5bae46==='warn'&&_0x3afc59&&console[_0x126619(0x118)](CLI_BIN_NAME+':\x20'+_0x3afc59+'\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20'+_0x39ef11+_0x126619(0x138)+_0xccb7dc[_0x126619(0x14c)]),{};}export function loadRawConfigLayers(_0x2fd1b8){const _0x5a36a3=a93_0x2763c8;let _0x1b86f0={},_0x3ce6af={};const _0x1c2361=resolveConfigPath(homedir());_0x1c2361&&(_0x1b86f0=parseCliConfigJsonFile(_0x1c2361,'warn',_0x5a36a3(0x155)));const _0x25b990=_0x2fd1b8??findProjectRootDirectory(),_0x19d691=resolveConfigPath(_0x25b990);return _0x19d691&&(_0x3ce6af=parseCliConfigJsonFile(_0x19d691,_0x5a36a3(0x127),_0x5a36a3(0x119))),{'globalPath':_0x1c2361,'projectPath':_0x19d691,'globalConfig':_0x1b86f0,'projectConfig':_0x3ce6af};}function mergeRawConfigLayers(_0x16556a){const _0x6446de=a93_0x2763c8,{globalConfig:_0x72cd99,projectConfig:_0x4ad5e1}=_0x16556a;if(_0x4ad5e1[_0x6446de(0x10f)]===![]){const _0x22a752={..._0x4ad5e1};delete _0x22a752['inherit'];const _0x294095=_0x4ad5e1['apps']&&typeof _0x4ad5e1[_0x6446de(0x121)]==='object'?_0x4ad5e1['apps']:{};Object[_0x6446de(0x10d)](_0x294095)[_0x6446de(0x126)]>0x0?_0x22a752[_0x6446de(0x121)]=_0x294095:delete _0x22a752[_0x6446de(0x121)];if(_0x6446de(0x112)in _0x4ad5e1)_0x22a752[_0x6446de(0x112)]=_0x4ad5e1[_0x6446de(0x112)];else Object['keys'](_0x294095)['length']>0x0&&(_0x22a752[_0x6446de(0x112)]=Object[_0x6446de(0x10d)](_0x294095)[0x0]);return _0x22a752;}const _0x297a51=_0x72cd99['apps']&&typeof _0x72cd99[_0x6446de(0x121)]===_0x6446de(0x11d)?_0x72cd99[_0x6446de(0x121)]:{},_0x2701f6=_0x4ad5e1[_0x6446de(0x121)]&&typeof _0x4ad5e1[_0x6446de(0x121)]==='object'?_0x4ad5e1[_0x6446de(0x121)]:{},_0x48c718={..._0x297a51,..._0x2701f6},_0x2c2cc3={..._0x72cd99,..._0x4ad5e1};Object[_0x6446de(0x10d)](_0x48c718)[_0x6446de(0x126)]>0x0&&(_0x2c2cc3[_0x6446de(0x121)]=_0x48c718);if(_0x6446de(0x112)in _0x4ad5e1)_0x2c2cc3[_0x6446de(0x112)]=_0x4ad5e1[_0x6446de(0x112)];else{if(_0x2701f6&&Object[_0x6446de(0x10d)](_0x2701f6)['length']>0x0)_0x2c2cc3[_0x6446de(0x112)]=Object[_0x6446de(0x10d)](_0x2701f6)[0x0];else _0x72cd99[_0x6446de(0x112)]&&(_0x2c2cc3['defaultApp']=_0x72cd99['defaultApp']);}return _0x2c2cc3;}export function readRawConfigWithLayers(_0x29fd86){const _0x44dabf=loadRawConfigLayers(_0x29fd86);return{'config':mergeRawConfigLayers(_0x44dabf),'layers':_0x44dabf};}export function readRawConfig(_0x2da92a){return mergeRawConfigLayers(loadRawConfigLayers(_0x2da92a));}export function readConfigFile(_0x5e50f0){const _0x1b59de=a93_0x2763c8;return parseCliConfigJsonFile(_0x5e50f0,_0x1b59de(0x142));}export function writeConfigFile(_0x5a131c,_0x4468fa){const _0x5ce321=a93_0x2763c8,_0x3af8fe=dirname(_0x5a131c);!existsSync(_0x3af8fe)&&mkdirSync(_0x3af8fe,{'recursive':!![]});const _0x5d05a2=_0x5a131c+_0x5ce321(0x12d);try{writeFileSync(_0x5d05a2,JSON[_0x5ce321(0x130)](_0x4468fa,null,0x2)+'\x0a',{'encoding':_0x5ce321(0x117),'mode':0x180}),renameSync(_0x5d05a2,_0x5a131c);}catch(_0x1785b0){try{unlinkSync(_0x5d05a2);}catch{}throw _0x1785b0;}}export function resolveWriteConfigPath(_0x272bf4){const _0x39f722=a93_0x2763c8,_0x347e38=_0x272bf4==='project'?process[_0x39f722(0x111)]():homedir(),_0x4b97b9=resolveConfigPath(_0x347e38);return _0x4b97b9??resolve(_0x347e38,NEW_CONFIG_NAME);}function buildConfig(_0x27ef31,_0x173084){const _0xa095a3=a93_0x2763c8,_0x3c6d1c={};if(_0x27ef31[_0xa095a3(0x121)]&&typeof _0x27ef31[_0xa095a3(0x121)]===_0xa095a3(0x11d))for(const [_0x286875,_0x449401]of Object[_0xa095a3(0x10b)](_0x27ef31[_0xa095a3(0x121)])){_0x449401&&typeof _0x449401===_0xa095a3(0x11d)&&_0x449401['appcode']&&(_0x3c6d1c[_0x286875]=_0x449401);}const _0x2f460c=_0x27ef31[_0xa095a3(0x112)]||undefined,_0x58fdde=Object[_0xa095a3(0x10d)](_0x3c6d1c)[_0xa095a3(0x126)]>0x0,_0x342326=_0x173084[_0xa095a3(0x12e)]||env('APP')||undefined,_0x2b4f48=_0x342326||_0x2f460c||undefined,_0x36d711=_0x173084['appcode']||env('APPCODE')||undefined,_0x36f93e=_0x36d711?Object[_0xa095a3(0x10b)](_0x3c6d1c)[_0xa095a3(0x116)](([,_0x37b2ea])=>_0x37b2ea?.['appcode']===_0x36d711):undefined,_0x4dbc9c=_0x36f93e?.[0x0],_0x18b98c=_0x36f93e?.[0x1];let _0x2f754f=_0x36d711?_0x4dbc9c:_0x2b4f48,_0x484306=_0x2f754f&&_0x3c6d1c[_0x2f754f]?_0x3c6d1c[_0x2f754f]:undefined;_0x36d711&&_0x18b98c&&(_0x484306=_0x18b98c);const _0x33fbb2=_0x36d711?_0x18b98c??_0x484306:_0x484306,_0x28e525=_0x342326||(_0x36d711?_0x4dbc9c:undefined),_0x1d6608=_0x36d711||_0x33fbb2?.[_0xa095a3(0x10e)]||_0x27ef31[_0xa095a3(0x10e)]||_0x27ef31[_0xa095a3(0x12e)]||undefined,_0x4d6c9c=_0x173084[_0xa095a3(0x125)]||env(_0xa095a3(0x148))||_0x33fbb2?.[_0xa095a3(0x125)]||_0x27ef31['env']||_0xa095a3(0x13f),_0x1c1932=_0x33fbb2?.[_0xa095a3(0x11a)]||_0x27ef31[_0xa095a3(0x11a)]||_0xa095a3(0x13c),_0x1de7ae=env('COOKIE')||_0x33fbb2?.[_0xa095a3(0x11b)]||_0x27ef31['cookie']||undefined,_0x53f9f1=env(_0xa095a3(0x144))||_0x33fbb2?.[_0xa095a3(0x149)]||_0x27ef31['accessKey']||undefined,_0xf20098=_0x173084[_0xa095a3(0x156)]||env(_0xa095a3(0x14a))||_0x33fbb2?.[_0xa095a3(0x156)]||_0x27ef31[_0xa095a3(0x156)],_0x52baef=normalizeLegacyOutputFormat(_0xf20098),_0x51e888=env(_0xa095a3(0x136))||_0x33fbb2?.[_0xa095a3(0x14f)]||_0x27ef31[_0xa095a3(0x14f)],_0x2eeab1=_0x51e888?Number(_0x51e888)||undefined:undefined,_0x1ddc8d=env(_0xa095a3(0x150))||env('MAX_RISK')||_0x33fbb2?.[_0xa095a3(0x11f)]||_0x27ef31[_0xa095a3(0x11f)]||_0x27ef31[_0xa095a3(0x10c)],_0x356b9b=_0x1ddc8d===_0xa095a3(0x12a)||_0x1ddc8d===_0xa095a3(0x11c)?_0x1ddc8d:'high-risk-write',_0x6a403=env('VERBOSE'),_0x38ac28=_0x6a403==='1'||_0x6a403===_0xa095a3(0x123),_0x4de783=_0x33fbb2?.['apiDir']||_0x27ef31[_0xa095a3(0x152)]||DEFAULT_API_DIR;return{'appCode':typeof _0x1d6608==='string'&&_0x1d6608['trim']()?_0x1d6608[_0xa095a3(0x146)]():undefined,'env':_0x4d6c9c==='online'?_0xa095a3(0x13f):_0x4d6c9c===_0xa095a3(0x12b)?_0xa095a3(0x12b):'production','locale':_0x1c1932,'cookie':_0x1de7ae,'accessKey':_0x53f9f1,'format':_0x52baef,'pageSize':_0x2eeab1,'riskLevel':_0x356b9b,'verbose':_0x38ac28,'apiDir':_0x4de783,'apps':_0x3c6d1c,'defaultApp':_0x2f460c,'currentApp':_0x58fdde?_0x2f754f:undefined,'explicitAppName':_0x28e525,'raw':_0x27ef31};}async function buildAuth(_0x23560f){const _0x1cff55=a93_0x2763c8,{getCookie:_0x27817f}=await import(_0x1cff55(0x141)),_0x3a8ba8=_0x23560f[_0x1cff55(0x11b)]||_0x27817f(),_0xd24aa7=_0x3a8ba8?await getIsSessionValid():![];return{'cookie':_0x3a8ba8,'isLoggedIn':_0xd24aa7,async 'getOrLogin'(){const _0xb26bcd=_0x1cff55;if(_0x3a8ba8&&_0xd24aa7)return _0x3a8ba8;throw CliErrors[_0xb26bcd(0x154)]();}};}export function resolveApiFilePath(_0x100173,_0x40a684){const _0xa1e50=a93_0x2763c8,_0x2c4578=resolve(process['cwd'](),_0x100173),_0x5d4822=resolve(_0x2c4578,_0xa1e50(0x147));if(!_0x40a684)return _0x5d4822;const _0x3b149b=readRawConfig(),_0x543950=_0x3b149b['apps']&&typeof _0x3b149b['apps']===_0xa1e50(0x11d)?_0x3b149b['apps']:{},_0x2c67e5=Object['entries'](_0x543950)[_0xa1e50(0x116)](([,_0x2b99b8])=>_0x2b99b8?.['appcode']===_0x40a684);if(!_0x2c67e5)return _0x5d4822;const [_0x50fdad,_0xfee852]=_0x2c67e5,_0x4f3d9c=typeof _0x3b149b[_0xa1e50(0x112)]==='string'?_0x3b149b[_0xa1e50(0x112)]:undefined;if(_0xfee852?.[_0xa1e50(0x152)])return _0x5d4822;if(_0x4f3d9c&&_0x50fdad!==_0x4f3d9c)return resolve(_0x2c4578,_0x50fdad+_0xa1e50(0x131));return _0x5d4822;}
@@ -1 +1 @@
1
- function a92_0x4933(){const _0xda4c37=['cwd','2711380wxlfsj','alias','set','5705bKWkVj','utf-8','744eGgOIU','4144504MnqoYK','128lIFcew','9906530vzjxxb','2915MuoZLN','42926829SfvBal','6366kFvFEm','push','datasetCode','has','3hpexCB','api.ts','exec','558CcRbEF'];a92_0x4933=function(){return _0xda4c37;};return a92_0x4933();}(function(_0x588652,_0x30313a){const _0x1290ce=a92_0xdd0e,_0x1095ce=_0x588652();while(!![]){try{const _0x4d7b0a=-parseInt(_0x1290ce(0xfe))/0x1*(-parseInt(_0x1290ce(0xfc))/0x2)+-parseInt(_0x1290ce(0x104))/0x3*(parseInt(_0x1290ce(0xf5))/0x4)+parseInt(_0x1290ce(0xf8))/0x5*(-parseInt(_0x1290ce(0x100))/0x6)+-parseInt(_0x1290ce(0xfb))/0x7+-parseInt(_0x1290ce(0xfa))/0x8*(-parseInt(_0x1290ce(0x107))/0x9)+-parseInt(_0x1290ce(0xfd))/0xa+parseInt(_0x1290ce(0xff))/0xb;if(_0x4d7b0a===_0x30313a)break;else _0x1095ce['push'](_0x1095ce['shift']());}catch(_0x48dff8){_0x1095ce['push'](_0x1095ce['shift']());}}}(a92_0x4933,0x983ea));import{readFileSync,existsSync}from'node:fs';function a92_0xdd0e(_0x6d8ed6,_0x4a5229){_0x6d8ed6=_0x6d8ed6-0xf4;const _0x493397=a92_0x4933();let _0xdd0e6=_0x493397[_0x6d8ed6];return _0xdd0e6;}import{resolve}from'node:path';const cache=new Map();function parseApiFile(_0x2c06e3){const _0x13534a=a92_0xdd0e,_0x5c98eb=[],_0x2a88f7=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0xb39b54;while((_0xb39b54=_0x2a88f7[_0x13534a(0x106)](_0x2c06e3))!==null){_0x5c98eb[_0x13534a(0x101)]({'datasetCode':_0xb39b54[0x1],'tableName':_0xb39b54[0x2],'name':_0xb39b54[0x3],'alias':_0xb39b54[0x4]});}return _0x5c98eb;}export function loadAliasMap(_0x2e2e7d,_0x279076,_0x4511eb){const _0x42ec99=a92_0xdd0e,_0x521903=_0x4511eb??resolve(process[_0x42ec99(0xf4)](),_0x2e2e7d,_0x42ec99(0x105));if(cache[_0x42ec99(0x103)](_0x521903))return cache['get'](_0x521903);if(!existsSync(_0x521903))return cache['set'](_0x521903,[]),[];try{const _0xe1994e=readFileSync(_0x521903,_0x42ec99(0xf9)),_0x3a4b64=parseApiFile(_0xe1994e);return cache[_0x42ec99(0xf7)](_0x521903,_0x3a4b64),_0x3a4b64;}catch{return cache[_0x42ec99(0xf7)](_0x521903,[]),[];}}export function resolveAlias(_0x1d667a,_0x1642f6,_0x38dcf1,_0x584fef){const _0x3d0f6a=a92_0xdd0e;if(!_0x1642f6)return undefined;const _0x218efd=loadAliasMap(_0x1d667a,_0x38dcf1,_0x584fef),_0x24ee55=_0x218efd['find'](_0x4af3fd=>_0x4af3fd[_0x3d0f6a(0xf6)]===_0x1642f6);return _0x24ee55?.[_0x3d0f6a(0x102)];}export function listAliases(_0x48af48,_0x1f617f,_0x3584c4){return loadAliasMap(_0x48af48,_0x1f617f,_0x3584c4);}
1
+ (function(_0x29104b,_0x23a31e){const _0xeb8721=a94_0x2994,_0x5d4f8e=_0x29104b();while(!![]){try{const _0xd9cc10=-parseInt(_0xeb8721(0xa5))/0x1*(parseInt(_0xeb8721(0xa2))/0x2)+-parseInt(_0xeb8721(0xa1))/0x3+parseInt(_0xeb8721(0xb1))/0x4*(-parseInt(_0xeb8721(0xa0))/0x5)+parseInt(_0xeb8721(0xac))/0x6+parseInt(_0xeb8721(0xa7))/0x7*(parseInt(_0xeb8721(0xaf))/0x8)+-parseInt(_0xeb8721(0xaa))/0x9+-parseInt(_0xeb8721(0xae))/0xa*(-parseInt(_0xeb8721(0xa6))/0xb);if(_0xd9cc10===_0x23a31e)break;else _0x5d4f8e['push'](_0x5d4f8e['shift']());}catch(_0x41e25a){_0x5d4f8e['push'](_0x5d4f8e['shift']());}}}(a94_0x2813,0x41227));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';function a94_0x2813(){const _0x1489ec=['4tOIfId','set','has','149579ACWvGC','15198502PANCih','7WjDaUG','datasetCode','cwd','3287745axhBSG','get','17934jigFBm','exec','10yNIACd','1142168ymcmav','api.ts','20CqnylO','416935PzgenM','537759uCxmQg'];a94_0x2813=function(){return _0x1489ec;};return a94_0x2813();}const cache=new Map();function parseApiFile(_0x4fb396){const _0x3e75dc=a94_0x2994,_0x59e729=[],_0x3ffb98=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x3b4100;while((_0x3b4100=_0x3ffb98[_0x3e75dc(0xad)](_0x4fb396))!==null){_0x59e729['push']({'datasetCode':_0x3b4100[0x1],'tableName':_0x3b4100[0x2],'name':_0x3b4100[0x3],'alias':_0x3b4100[0x4]});}return _0x59e729;}export function loadAliasMap(_0x44685c,_0x4f1eee,_0x1bcbf7){const _0x58b5cf=a94_0x2994,_0x277745=_0x1bcbf7??resolve(process[_0x58b5cf(0xa9)](),_0x44685c,_0x58b5cf(0xb0));if(cache[_0x58b5cf(0xa4)](_0x277745))return cache[_0x58b5cf(0xab)](_0x277745);if(!existsSync(_0x277745))return cache[_0x58b5cf(0xa3)](_0x277745,[]),[];try{const _0x295134=readFileSync(_0x277745,'utf-8'),_0x4c947e=parseApiFile(_0x295134);return cache[_0x58b5cf(0xa3)](_0x277745,_0x4c947e),_0x4c947e;}catch{return cache[_0x58b5cf(0xa3)](_0x277745,[]),[];}}export function resolveAlias(_0x4a3e28,_0x301cb5,_0x124e5a,_0x157bf9){const _0x41512a=a94_0x2994;if(!_0x301cb5)return undefined;const _0x31d40d=loadAliasMap(_0x4a3e28,_0x124e5a,_0x157bf9),_0x5c0f4d=_0x31d40d['find'](_0x47909f=>_0x47909f['alias']===_0x301cb5);return _0x5c0f4d?.[_0x41512a(0xa8)];}function a94_0x2994(_0x32b4e3,_0xcd8b8b){_0x32b4e3=_0x32b4e3-0xa0;const _0x2813d2=a94_0x2813();let _0x299436=_0x2813d2[_0x32b4e3];return _0x299436;}export function listAliases(_0xad6091,_0x5bf1a0,_0x5152bc){return loadAliasMap(_0xad6091,_0x5bf1a0,_0x5152bc);}