@lovrabet/rabetbase-cli 2.0.10 → 2.0.11

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 (138) 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/save.js +1 -1
  86. package/lib/commands/sql/validate.js +1 -1
  87. package/lib/constant/cli.js +1 -1
  88. package/lib/constant/domain.js +1 -1
  89. package/lib/constant/env.js +1 -1
  90. package/lib/constant/paths.js +1 -1
  91. package/lib/context.js +1 -1
  92. package/lib/core/alias-resolver.js +1 -1
  93. package/lib/core/api-client.js +1 -1
  94. package/lib/core/bff/config.js +1 -1
  95. package/lib/core/bff/file-system.js +1 -1
  96. package/lib/core/bff/hash.js +1 -1
  97. package/lib/core/bff/lock.js +1 -1
  98. package/lib/core/bff/utils.js +1 -1
  99. package/lib/core/db-resolver.js +1 -1
  100. package/lib/core/sql-validator.js +1 -1
  101. package/lib/errors.js +1 -1
  102. package/lib/framework/build-all-flags.js +1 -1
  103. package/lib/framework/flags.js +1 -1
  104. package/lib/framework/help.js +1 -1
  105. package/lib/framework/index.js +1 -1
  106. package/lib/framework/output.js +1 -1
  107. package/lib/framework/response.js +1 -1
  108. package/lib/framework/runner.js +1 -1
  109. package/lib/framework/schema-export.js +1 -1
  110. package/lib/framework/types.js +1 -1
  111. package/lib/generated/build-info.js +1 -1
  112. package/lib/help.js +1 -1
  113. package/lib/skills/main.js +1 -1
  114. package/lib/skills/npx-skills-add.js +1 -1
  115. package/lib/telemetry/cli-command-trace.js +1 -1
  116. package/lib/telemetry/cli-help-trace.js +1 -1
  117. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  118. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  119. package/lib/telemetry/send-cli-trace-log.js +1 -1
  120. package/lib/utils/ai_config.js +1 -1
  121. package/lib/utils/apply-jq-filter.js +1 -1
  122. package/lib/utils/cdn-config.js +1 -1
  123. package/lib/utils/check-sdk-version.js +1 -1
  124. package/lib/utils/cli-version-check.js +1 -1
  125. package/lib/utils/config.js +1 -1
  126. package/lib/utils/copy-directory.js +1 -1
  127. package/lib/utils/file-utils.js +1 -1
  128. package/lib/utils/guides-cdn.js +1 -1
  129. package/lib/utils/http-client.js +1 -1
  130. package/lib/utils/is-non-interactive.js +1 -1
  131. package/lib/utils/logger.js +1 -1
  132. package/lib/utils/platform.js +1 -1
  133. package/lib/utils/rules-cdn.js +1 -1
  134. package/lib/utils/sleep.js +1 -1
  135. package/lib/utils/template-replacer.js +1 -1
  136. package/lib/utils/version.js +1 -1
  137. package/lib/utils/with-active-cookie.js +1 -1
  138. package/package.json +1 -1
@@ -1 +1 @@
1
- const a78_0x294317=a78_0x3309;(function(_0x2e4b41,_0x38e062){const _0x3107e3=a78_0x3309,_0x5915af=_0x2e4b41();while(!![]){try{const _0x64f497=-parseInt(_0x3107e3(0x186))/0x1+-parseInt(_0x3107e3(0x18c))/0x2*(parseInt(_0x3107e3(0x163))/0x3)+-parseInt(_0x3107e3(0x168))/0x4*(-parseInt(_0x3107e3(0x196))/0x5)+parseInt(_0x3107e3(0x167))/0x6*(-parseInt(_0x3107e3(0x165))/0x7)+parseInt(_0x3107e3(0x170))/0x8+parseInt(_0x3107e3(0x176))/0x9+parseInt(_0x3107e3(0x164))/0xa;if(_0x64f497===_0x38e062)break;else _0x5915af['push'](_0x5915af['shift']());}catch(_0x46624d){_0x5915af['push'](_0x5915af['shift']());}}}(a78_0x2daf,0x7ff87));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';function a78_0x2daf(){const _0x567ad7=['2815992lElcGS','3638980DuTtJb','588889oBFBzu','No\x20scripts\x20defined\x20in\x20package.json.','42CgolCe','4wBUTTB','read','inherit','vite','node_modules','cwd','has','validation','8144536JNaUxR','\x20\x20\x20\x20','log','\x20\x20EXAMPLES','bun','preview','9083178RneAsC','--watch','entries','\x20run\x20<script>\x0a','bun.lockb','push','keys','scripts','yarn.lock','\x20run\x20','build','max','args','Run\x20a\x20package.json\x20script','npm','dev','851097HemcqR','vite\x20preview\x20exited\x20with\x20code\x20','padEnd','yarn','\x0a\x20\x20Usage:\x20','.bin','2QDqctM','error','needsUpgrade','close','Script\x20\x22','\x20run\x20preview','length','bool','Enable\x20watch\x20mode\x20for\x20preview','Script\x20name\x20defined\x20in\x20package.json','2558050rBYsmH','all','watch','join','\x20run\x20start','utf-8','Available:\x20','\x20\x20AVAILABLE\x20SCRIPTS\x20\x20(current\x20project)'];a78_0x2daf=function(){return _0x567ad7;};return a78_0x2daf();}import{resolve,delimiter,join}from'node:path';function a78_0x3309(_0x73d943,_0x4cf69a){_0x73d943=_0x73d943-0x15e;const _0x2daf53=a78_0x2daf();let _0x330916=_0x2daf53[_0x73d943];return _0x330916;}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(['start',a78_0x294317(0x185)]);function readPackageScripts(_0x11f91f){const _0x3fe71e=a78_0x294317,_0x30193f=resolve(_0x11f91f,'package.json');if(!existsSync(_0x30193f))return null;try{const _0x51f216=JSON['parse'](readFileSync(_0x30193f,_0x3fe71e(0x160)));return _0x51f216[_0x3fe71e(0x17d)]??{};}catch{return null;}}function detectPackageManager(_0x3f1934){const _0x2060f9=a78_0x294317;if(existsSync(resolve(_0x3f1934,_0x2060f9(0x17a)))||existsSync(resolve(_0x3f1934,'bun.lock')))return _0x2060f9(0x174);if(existsSync(resolve(_0x3f1934,'pnpm-lock.yaml')))return'pnpm';if(existsSync(resolve(_0x3f1934,_0x2060f9(0x17e))))return _0x2060f9(0x189);return _0x2060f9(0x184);}async function versionCheck(_0x474c0e){const _0x471ba8=a78_0x294317,_0x294001=await checkCliVersion();if(_0x294001[_0x471ba8(0x18e)])printCliUpgradeWarning(_0x294001);const _0x239987=await checkSdkVersion(_0x474c0e);if(_0x239987[_0x471ba8(0x18e)])printSdkUpgradeWarning(_0x239987);}function spawnScript(_0x4876a2,_0x10aa6c,_0x18088f,_0x24d0d5){return new Promise((_0x214af0,_0x5a3d76)=>{const _0x28aaeb=a78_0x3309,_0x5e6ac2=['run',_0x10aa6c,..._0x18088f],_0x9eaaef=spawn(_0x4876a2,_0x5e6ac2,{'cwd':_0x24d0d5,'stdio':_0x28aaeb(0x16a),'shell':!![],'env':{...process.env,'PATH':''+join(_0x24d0d5,_0x28aaeb(0x16c),_0x28aaeb(0x18b))+delimiter+process.env.PATH}});_0x9eaaef['on'](_0x28aaeb(0x18f),_0x1f17b1=>{const _0x126d0d=_0x28aaeb;if(_0x1f17b1===0x0||_0x1f17b1===null)_0x214af0();else _0x5a3d76(new Error(_0x4876a2+_0x126d0d(0x17f)+_0x10aa6c+'\x20exited\x20with\x20code\x20'+_0x1f17b1));}),_0x9eaaef['on'](_0x28aaeb(0x18d),_0x5a3d76);});}function spawnViteBuildWatch(_0x5af217){return new Promise((_0x13f8f0,_0x5359f5)=>{const _0x584db6=a78_0x3309,_0x396a64=spawn(_0x584db6(0x16b),[_0x584db6(0x180),_0x584db6(0x177)],{'cwd':_0x5af217,'stdio':'inherit','shell':!![],'env':{...process.env,'PATH':''+join(_0x5af217,'node_modules',_0x584db6(0x18b))+delimiter+process.env.PATH}});_0x396a64['on'](_0x584db6(0x18f),_0x4c5b85=>{if(_0x4c5b85===0x0||_0x4c5b85===null)_0x13f8f0();else _0x5359f5(new Error('vite\x20build\x20--watch\x20exited\x20with\x20code\x20'+_0x4c5b85));}),_0x396a64['on']('error',_0x5359f5);});}function spawnVitePreview(_0x505c4c){return new Promise((_0xf7fe63,_0x4cbcf2)=>{const _0x3ea35b=a78_0x3309,_0x3e95d5=spawn(_0x3ea35b(0x16b),[_0x3ea35b(0x175)],{'cwd':_0x505c4c,'stdio':_0x3ea35b(0x16a),'shell':!![],'env':{...process.env,'PATH':''+join(_0x505c4c,_0x3ea35b(0x16c),_0x3ea35b(0x18b))+delimiter+process.env.PATH}});_0x3e95d5['on'](_0x3ea35b(0x18f),_0x8fabd5=>{const _0x10038e=_0x3ea35b;if(_0x8fabd5===0x0||_0x8fabd5===null)_0xf7fe63();else _0x4cbcf2(new Error(_0x10038e(0x187)+_0x8fabd5));}),_0x3e95d5['on'](_0x3ea35b(0x18d),_0x4cbcf2);});}const runFlags=[{'name':a78_0x294317(0x198),'type':'boolean','description':a78_0x294317(0x194),'default':![]}];export const runDefinition={'service':'run','command':'run','description':a78_0x294317(0x183),'risk':a78_0x294317(0x169),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'script','description':a78_0x294317(0x195),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x2d86ea=a78_0x294317,_0x372c02=readPackageScripts(process[_0x2d86ea(0x16d)]()),_0x27881c=[];if(_0x372c02&&Object[_0x2d86ea(0x17c)](_0x372c02)[_0x2d86ea(0x192)]>0x0){const _0x439a8f=Object[_0x2d86ea(0x17c)](_0x372c02),_0x46aae3=Math[_0x2d86ea(0x181)](..._0x439a8f['map'](_0x3079b7=>_0x3079b7['length']));_0x27881c['push'](_0x2d86ea(0x162));for(const [_0x2fc8f7,_0x305bc1]of Object[_0x2d86ea(0x178)](_0x372c02)){_0x27881c['push']('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x2d86ea(0x17f)+_0x2fc8f7['padEnd'](_0x46aae3+0x2)+'#\x20'+_0x305bc1);}}else _0x27881c[_0x2d86ea(0x17b)](_0x2d86ea(0x173)),_0x27881c['push'](_0x2d86ea(0x171)+CLI_BIN_NAME+_0x2d86ea(0x15f)),_0x27881c[_0x2d86ea(0x17b)](_0x2d86ea(0x171)+CLI_BIN_NAME+'\x20run\x20build'),_0x27881c[_0x2d86ea(0x17b)](_0x2d86ea(0x171)+CLI_BIN_NAME+_0x2d86ea(0x191)),_0x27881c[_0x2d86ea(0x17b)](_0x2d86ea(0x171)+CLI_BIN_NAME+'\x20run\x20preview\x20--watch\x20\x20\x20#\x20parallel\x20build\x20--watch\x20+\x20preview');return _0x27881c[_0x2d86ea(0x15e)]('\x0a');},async 'execute'(_0x34aa52){const _0x2ee37c=a78_0x294317,_0x52adc0=process['cwd'](),_0xa59a53=_0x34aa52['args'][0x0],_0x30e123=_0x34aa52[_0x2ee37c(0x182)]['slice'](0x1),_0x38d77a=readPackageScripts(_0x52adc0);if(!_0x38d77a)throw CliErrors[_0x2ee37c(0x16f)]('No\x20package.json\x20found\x20in\x20current\x20directory.');if(!_0xa59a53){const _0x2af5dd=Object['keys'](_0x38d77a);if(_0x2af5dd[_0x2ee37c(0x192)]===0x0)console[_0x2ee37c(0x172)](_0x2ee37c(0x166));else{console[_0x2ee37c(0x172)]('\x0a\x20\x20Available\x20scripts:\x0a');const _0x15475c=Math[_0x2ee37c(0x181)](..._0x2af5dd['map'](_0x4a1f68=>_0x4a1f68[_0x2ee37c(0x192)]));for(const [_0x3ab8cb,_0x2463c1]of Object['entries'](_0x38d77a)){console['log'](_0x2ee37c(0x171)+_0x3ab8cb[_0x2ee37c(0x188)](_0x15475c+0x2)+_0x2463c1);}console['log'](_0x2ee37c(0x18a)+CLI_BIN_NAME+_0x2ee37c(0x179));}return{'ok':!![]};}if(!_0x38d77a[_0xa59a53])throw CliErrors[_0x2ee37c(0x16f)](_0x2ee37c(0x190)+_0xa59a53+'\x22\x20not\x20found\x20in\x20package.json.',_0x2ee37c(0x161)+(Object[_0x2ee37c(0x17c)](_0x38d77a)[_0x2ee37c(0x15e)](',\x20')||'(none)'));const _0x5f1526=detectPackageManager(_0x52adc0);VERSION_CHECK_SCRIPTS[_0x2ee37c(0x16e)](_0xa59a53)&&await versionCheck(_0x52adc0);if(_0xa59a53===_0x2ee37c(0x175)&&_0x34aa52[_0x2ee37c(0x193)](_0x2ee37c(0x198)))return await Promise[_0x2ee37c(0x197)]([spawnViteBuildWatch(_0x52adc0),spawnVitePreview(_0x52adc0)]),{'ok':!![]};return await spawnScript(_0x5f1526,_0xa59a53,_0x30e123,_0x52adc0),{'ok':!![]};}};
1
+ const a78_0x1baf21=a78_0x24d5;(function(_0x1482ed,_0x522321){const _0x275e30=a78_0x24d5,_0x29bf0b=_0x1482ed();while(!![]){try{const _0x2569a0=parseInt(_0x275e30(0x1df))/0x1+parseInt(_0x275e30(0x1f3))/0x2+-parseInt(_0x275e30(0x1c2))/0x3*(-parseInt(_0x275e30(0x1c6))/0x4)+parseInt(_0x275e30(0x1fd))/0x5*(parseInt(_0x275e30(0x1d1))/0x6)+-parseInt(_0x275e30(0x1dd))/0x7+-parseInt(_0x275e30(0x1e5))/0x8+-parseInt(_0x275e30(0x1ef))/0x9;if(_0x2569a0===_0x522321)break;else _0x29bf0b['push'](_0x29bf0b['shift']());}catch(_0x390661){_0x29bf0b['push'](_0x29bf0b['shift']());}}}(a78_0x5e4e,0xc9d64));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';function a78_0x5e4e(){const _0x27784d=['preview','285jPTyiQ','push','.bin','package.json','38020jeFPxi','close','scripts','\x20\x20\x20\x20','\x20\x20AVAILABLE\x20SCRIPTS\x20\x20(current\x20project)','Available:\x20','validation','\x20run\x20','No\x20scripts\x20defined\x20in\x20package.json.','run','args','254526JqWaWx','log','\x20run\x20build','watch','node_modules','yarn','Script\x20name\x20defined\x20in\x20package.json','\x0a\x20\x20Available\x20scripts:\x0a','vite\x20preview\x20exited\x20with\x20code\x20','padEnd','has','(none)','128198JAbSvO','Enable\x20watch\x20mode\x20for\x20preview','1234818MyzkxG','\x20exited\x20with\x20code\x20','join','vite','utf-8','\x20run\x20preview','3717464Fxhvcd','length','inherit','parse','--watch','\x20\x20EXAMPLES','error','bun','needsUpgrade','entries','18592641hTaUCH','dev','start','keys','1796818TPcYJx','\x20run\x20preview\x20--watch\x20\x20\x20#\x20parallel\x20build\x20--watch\x20+\x20preview','Run\x20a\x20package.json\x20script','\x20run\x20<script>\x0a','bun.lockb','pnpm','\x20run\x20start','boolean','map','cwd','40sUDWQU'];a78_0x5e4e=function(){return _0x27784d;};return a78_0x5e4e();}import{checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';function a78_0x24d5(_0x210fa7,_0x5e8a9e){_0x210fa7=_0x210fa7-0x1c2;const _0x5e4e1d=a78_0x5e4e();let _0x24d563=_0x5e4e1d[_0x210fa7];return _0x24d563;}const VERSION_CHECK_SCRIPTS=new Set([a78_0x1baf21(0x1f1),a78_0x1baf21(0x1f0)]);function readPackageScripts(_0x4ba54d){const _0x24be22=a78_0x1baf21,_0x369753=resolve(_0x4ba54d,_0x24be22(0x1c5));if(!existsSync(_0x369753))return null;try{const _0x305933=JSON[_0x24be22(0x1e8)](readFileSync(_0x369753,_0x24be22(0x1e3)));return _0x305933[_0x24be22(0x1c8)]??{};}catch{return null;}}function detectPackageManager(_0x5cd8f3){const _0x1a5500=a78_0x1baf21;if(existsSync(resolve(_0x5cd8f3,_0x1a5500(0x1f7)))||existsSync(resolve(_0x5cd8f3,'bun.lock')))return _0x1a5500(0x1ec);if(existsSync(resolve(_0x5cd8f3,'pnpm-lock.yaml')))return _0x1a5500(0x1f8);if(existsSync(resolve(_0x5cd8f3,'yarn.lock')))return _0x1a5500(0x1d6);return'npm';}async function versionCheck(_0x51c749){const _0x6d5177=a78_0x1baf21,_0x100534=await checkCliVersion();if(_0x100534[_0x6d5177(0x1ed)])printCliUpgradeWarning(_0x100534);const _0x51e7dc=await checkSdkVersion(_0x51c749);if(_0x51e7dc[_0x6d5177(0x1ed)])printSdkUpgradeWarning(_0x51e7dc);}function spawnScript(_0x58376a,_0x426780,_0x4eeb4a,_0x6e8e23){return new Promise((_0x5875f9,_0x5ba6d0)=>{const _0x2c7395=a78_0x24d5,_0x57d415=[_0x2c7395(0x1cf),_0x426780,..._0x4eeb4a],_0x5d5903=spawn(_0x58376a,_0x57d415,{'cwd':_0x6e8e23,'stdio':_0x2c7395(0x1e7),'shell':!![],'env':{...process.env,'PATH':''+join(_0x6e8e23,_0x2c7395(0x1d5),_0x2c7395(0x1c4))+delimiter+process.env.PATH}});_0x5d5903['on'](_0x2c7395(0x1c7),_0x34e40c=>{const _0x7bd639=_0x2c7395;if(_0x34e40c===0x0||_0x34e40c===null)_0x5875f9();else _0x5ba6d0(new Error(_0x58376a+'\x20run\x20'+_0x426780+_0x7bd639(0x1e0)+_0x34e40c));}),_0x5d5903['on'](_0x2c7395(0x1eb),_0x5ba6d0);});}function spawnViteBuildWatch(_0x2848e9){return new Promise((_0x263110,_0x478f65)=>{const _0x265f3c=a78_0x24d5,_0x2f0cdc=spawn(_0x265f3c(0x1e2),['build',_0x265f3c(0x1e9)],{'cwd':_0x2848e9,'stdio':_0x265f3c(0x1e7),'shell':!![],'env':{...process.env,'PATH':''+join(_0x2848e9,_0x265f3c(0x1d5),'.bin')+delimiter+process.env.PATH}});_0x2f0cdc['on']('close',_0x3f157b=>{if(_0x3f157b===0x0||_0x3f157b===null)_0x263110();else _0x478f65(new Error('vite\x20build\x20--watch\x20exited\x20with\x20code\x20'+_0x3f157b));}),_0x2f0cdc['on'](_0x265f3c(0x1eb),_0x478f65);});}function spawnVitePreview(_0x2ad812){return new Promise((_0x3580fe,_0x8867ae)=>{const _0xaa5e2f=a78_0x24d5,_0x4f5681=spawn(_0xaa5e2f(0x1e2),[_0xaa5e2f(0x1fe)],{'cwd':_0x2ad812,'stdio':_0xaa5e2f(0x1e7),'shell':!![],'env':{...process.env,'PATH':''+join(_0x2ad812,_0xaa5e2f(0x1d5),_0xaa5e2f(0x1c4))+delimiter+process.env.PATH}});_0x4f5681['on']('close',_0x425372=>{const _0x26a2ac=_0xaa5e2f;if(_0x425372===0x0||_0x425372===null)_0x3580fe();else _0x8867ae(new Error(_0x26a2ac(0x1d9)+_0x425372));}),_0x4f5681['on']('error',_0x8867ae);});}const runFlags=[{'name':a78_0x1baf21(0x1d4),'type':a78_0x1baf21(0x1fa),'description':a78_0x1baf21(0x1de),'default':![]}];export const runDefinition={'service':a78_0x1baf21(0x1cf),'command':'run','description':a78_0x1baf21(0x1f5),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'script','description':a78_0x1baf21(0x1d7),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x4aabf1=a78_0x1baf21,_0x1b1605=readPackageScripts(process[_0x4aabf1(0x1fc)]()),_0x4939f5=[];if(_0x1b1605&&Object[_0x4aabf1(0x1f2)](_0x1b1605)[_0x4aabf1(0x1e6)]>0x0){const _0x40ce19=Object['keys'](_0x1b1605),_0x21dabb=Math['max'](..._0x40ce19[_0x4aabf1(0x1fb)](_0x78c698=>_0x78c698[_0x4aabf1(0x1e6)]));_0x4939f5['push'](_0x4aabf1(0x1ca));for(const [_0x467126,_0x224e5d]of Object[_0x4aabf1(0x1ee)](_0x1b1605)){_0x4939f5[_0x4aabf1(0x1c3)](_0x4aabf1(0x1c9)+CLI_BIN_NAME+_0x4aabf1(0x1cd)+_0x467126[_0x4aabf1(0x1da)](_0x21dabb+0x2)+'#\x20'+_0x224e5d);}}else _0x4939f5[_0x4aabf1(0x1c3)](_0x4aabf1(0x1ea)),_0x4939f5[_0x4aabf1(0x1c3)]('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x4aabf1(0x1f9)),_0x4939f5['push'](_0x4aabf1(0x1c9)+CLI_BIN_NAME+_0x4aabf1(0x1d3)),_0x4939f5['push'](_0x4aabf1(0x1c9)+CLI_BIN_NAME+_0x4aabf1(0x1e4)),_0x4939f5['push'](_0x4aabf1(0x1c9)+CLI_BIN_NAME+_0x4aabf1(0x1f4));return _0x4939f5[_0x4aabf1(0x1e1)]('\x0a');},async 'execute'(_0x393e97){const _0xfef0=a78_0x1baf21,_0x27e955=process['cwd'](),_0x30e617=_0x393e97[_0xfef0(0x1d0)][0x0],_0x263d0e=_0x393e97[_0xfef0(0x1d0)]['slice'](0x1),_0x34ed7d=readPackageScripts(_0x27e955);if(!_0x34ed7d)throw CliErrors[_0xfef0(0x1cc)]('No\x20package.json\x20found\x20in\x20current\x20directory.');if(!_0x30e617){const _0x368094=Object[_0xfef0(0x1f2)](_0x34ed7d);if(_0x368094[_0xfef0(0x1e6)]===0x0)console[_0xfef0(0x1d2)](_0xfef0(0x1ce));else{console[_0xfef0(0x1d2)](_0xfef0(0x1d8));const _0x3bebfe=Math['max'](..._0x368094[_0xfef0(0x1fb)](_0x497cf6=>_0x497cf6[_0xfef0(0x1e6)]));for(const [_0x5a795a,_0x3bda09]of Object['entries'](_0x34ed7d)){console[_0xfef0(0x1d2)](_0xfef0(0x1c9)+_0x5a795a[_0xfef0(0x1da)](_0x3bebfe+0x2)+_0x3bda09);}console[_0xfef0(0x1d2)]('\x0a\x20\x20Usage:\x20'+CLI_BIN_NAME+_0xfef0(0x1f6));}return{'ok':!![]};}if(!_0x34ed7d[_0x30e617])throw CliErrors[_0xfef0(0x1cc)]('Script\x20\x22'+_0x30e617+'\x22\x20not\x20found\x20in\x20package.json.',_0xfef0(0x1cb)+(Object[_0xfef0(0x1f2)](_0x34ed7d)[_0xfef0(0x1e1)](',\x20')||_0xfef0(0x1dc)));const _0x481cbd=detectPackageManager(_0x27e955);VERSION_CHECK_SCRIPTS[_0xfef0(0x1db)](_0x30e617)&&await versionCheck(_0x27e955);if(_0x30e617==='preview'&&_0x393e97['bool']('watch'))return await Promise['all']([spawnViteBuildWatch(_0x27e955),spawnVitePreview(_0x27e955)]),{'ok':!![]};return await spawnScript(_0x481cbd,_0x30e617,_0x263d0e,_0x27e955),{'ok':!![]};}};
@@ -1 +1 @@
1
- const a79_0x1d3692=a79_0x4f3e;function a79_0x38b1(){const _0x1f54a1=['88Ldtyxe','Export\x20machine-readable\x20command\x20schema\x20(JSON)','60AaFbxX','585765kQuONf','740rPcXZe','451198WSMNlw','649791mITRLf','6937210kNMpiq','6CDSMvP','256929NFAvhN','json','646008kulqvT','1418417XSYjdX'];a79_0x38b1=function(){return _0x1f54a1;};return a79_0x38b1();}function a79_0x4f3e(_0x2a9463,_0x4f4b0b){_0x2a9463=_0x2a9463-0x112;const _0x38b1b7=a79_0x38b1();let _0x4f3ef7=_0x38b1b7[_0x2a9463];return _0x4f3ef7;}(function(_0x4cf3d6,_0x5c3e33){const _0x532131=a79_0x4f3e,_0x27419f=_0x4cf3d6();while(!![]){try{const _0x5426b0=-parseInt(_0x532131(0x117))/0x1+-parseInt(_0x532131(0x116))/0x2+-parseInt(_0x532131(0x114))/0x3*(-parseInt(_0x532131(0x11a))/0x4)+parseInt(_0x532131(0x11b))/0x5+-parseInt(_0x532131(0x113))/0x6*(parseInt(_0x532131(0x112))/0x7)+-parseInt(_0x532131(0x118))/0x8*(parseInt(_0x532131(0x11e))/0x9)+-parseInt(_0x532131(0x11c))/0xa*(-parseInt(_0x532131(0x11d))/0xb);if(_0x5426b0===_0x5c3e33)break;else _0x27419f['push'](_0x27419f['shift']());}catch(_0x3bf418){_0x27419f['push'](_0x27419f['shift']());}}}(a79_0x38b1,0xde49a));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x3137fb){const _0x776b2d=await buildSchemaPayload();return{'ok':!![],'data':_0x776b2d};}export const schemaDefinition={'service':'schema','command':'export','description':a79_0x1d3692(0x119),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a79_0x1d3692(0x115),'flags':[],'execute':execute};
1
+ const a79_0x267637=a79_0x58be;(function(_0x524d04,_0x4a9406){const _0xd39569=a79_0x58be,_0x111ec6=_0x524d04();while(!![]){try{const _0x9c8e59=-parseInt(_0xd39569(0x1a3))/0x1*(-parseInt(_0xd39569(0x19c))/0x2)+parseInt(_0xd39569(0x1a7))/0x3+-parseInt(_0xd39569(0x1a5))/0x4+-parseInt(_0xd39569(0x19e))/0x5*(parseInt(_0xd39569(0x1a6))/0x6)+-parseInt(_0xd39569(0x19f))/0x7*(-parseInt(_0xd39569(0x1a4))/0x8)+-parseInt(_0xd39569(0x19d))/0x9+parseInt(_0xd39569(0x1a2))/0xa;if(_0x9c8e59===_0x4a9406)break;else _0x111ec6['push'](_0x111ec6['shift']());}catch(_0x3725bb){_0x111ec6['push'](_0x111ec6['shift']());}}}(a79_0x5982,0xb7c3a));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x2b72d8){const _0x3b18be=await buildSchemaPayload();return{'ok':!![],'data':_0x3b18be};}function a79_0x58be(_0x3bf146,_0x387f14){_0x3bf146=_0x3bf146-0x19c;const _0x598252=a79_0x5982();let _0x58becb=_0x598252[_0x3bf146];return _0x58becb;}function a79_0x5982(){const _0x2fc417=['1131350BgjVya','5446LkitqJ','Export\x20machine-readable\x20command\x20schema\x20(JSON)','export','5849080SsVqZf','42oXvpRE','32BvnDUr','1685548DtVykF','18uwHnoJ','4231551Gpyjlk','38474phZXMc','8582364lKcnJV'];a79_0x5982=function(){return _0x2fc417;};return a79_0x5982();}export const schemaDefinition={'service':'schema','command':a79_0x267637(0x1a1),'description':a79_0x267637(0x1a0),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':'json','flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a80_0x306b82=a80_0xf89c;(function(_0x43fbca,_0x183427){const _0x50309e=a80_0xf89c,_0x5f0dcf=_0x43fbca();while(!![]){try{const _0x216927=-parseInt(_0x50309e(0x1b5))/0x1+-parseInt(_0x50309e(0x1b9))/0x2*(parseInt(_0x50309e(0x1b6))/0x3)+parseInt(_0x50309e(0x1c0))/0x4*(parseInt(_0x50309e(0x1ca))/0x5)+-parseInt(_0x50309e(0x1ad))/0x6+-parseInt(_0x50309e(0x1bf))/0x7+-parseInt(_0x50309e(0x1b2))/0x8*(-parseInt(_0x50309e(0x1b4))/0x9)+parseInt(_0x50309e(0x1ae))/0xa;if(_0x216927===_0x183427)break;else _0x5f0dcf['push'](_0x5f0dcf['shift']());}catch(_0x168533){_0x5f0dcf['push'](_0x5f0dcf['shift']());}}}(a80_0x2735,0x43f5e));import{CliErrors}from'../../errors.js';function a80_0xf89c(_0x5d6e76,_0x2929c6){_0x5d6e76=_0x5d6e76-0x1ac;const _0x2735d6=a80_0x2735();let _0xf89c42=_0x2735d6[_0x5d6e76];return _0xf89c42;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';export const skillDefinitions=[{'service':a80_0x306b82(0x1be),'command':a80_0x306b82(0x1c5),'description':a80_0x306b82(0x1ba),'risk':a80_0x306b82(0x1c1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1a57a3){const _0x49be5b=a80_0x306b82;logger['setLogPath'](process[_0x49be5b(0x1b0)]()),logger[_0x49be5b(0x1c4)](_0x49be5b(0x1c8),_0x49be5b(0x1af));const {runNpxSkillsAddGlobal:_0x1cf057}=await import(_0x49be5b(0x1b3)),_0x469f00=_0x1a57a3[_0x49be5b(0x1b7)]?_0x49be5b(0x1bd):_0x49be5b(0x1c3);console[_0x49be5b(0x1b8)](_0x49be5b(0x1c7));const _0x28775b=_0x1cf057(process['cwd'](),_0x49be5b(0x1c9),{'stdio':_0x469f00});if(_0x28775b[_0x49be5b(0x1b1)])console[_0x49be5b(0x1b8)](_0x49be5b(0x1c6));else{if(_0x28775b['ok'])console[_0x49be5b(0x1b8)](CLI_BIN_NAME+_0x49be5b(0x1bc));else throw CliErrors[_0x49be5b(0x1cb)](_0x49be5b(0x1ac)+(_0x28775b[_0x49be5b(0x1c2)]||'unknown'),_0x49be5b(0x1bb));}return{'ok':!![]};}}];function a80_0x2735(){const _0x2afe9e=['11995290RUwQgo','执行安装技能包命令(委托给\x20npx\x20skills\x20--global)','cwd','skipped','1409504ODYePz','../../skills/npx-skills-add.js','18PZicYv','555410yAThhZ','261024yFMzvO','nonInteractive','log','8qvelcR','Install\x20developer\x20skill\x20package','Check\x20network\x20connectivity\x20and\x20try\x20again.','\x20skill\x20installed','pipe','skill','2350096ZOnFjK','8cROOac','write','error','inherit','info','install','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20skill\x20is\x20already\x20present.','Installing\x20official\x20skill\x20via\x20npx\x20(npx\x20-y\x20skills\x20add\x20lovrabet/rabetbase\x20--global)...','skill-install','lovrabet/rabetbase','645595GlVwOl','apiError','npx\x20skills\x20add\x20failed:\x20','1755642bIKhbZ'];a80_0x2735=function(){return _0x2afe9e;};return a80_0x2735();}
1
+ const a80_0xd5f6b1=a80_0x4b1e;function a80_0x3157(){const _0x8ebbe0=['cwd','skipped','796901JHyiNK','9070dXgSpk','log','3225270qKOQEC','90lEEvNu','inherit','3397310Tnepjd','4263796gFQCwf','pipe','执行安装技能包命令(委托给\x20npx\x20skills\x20--global)','Check\x20network\x20connectivity\x20and\x20try\x20again.','lovrabet/rabetbase','apiError','skill','105dppgRo','write','info','\x20skill\x20installed','../../skills/npx-skills-add.js','install','177RinQvq','451848ahPzaI','124788QFBldf'];a80_0x3157=function(){return _0x8ebbe0;};return a80_0x3157();}function a80_0x4b1e(_0x2f20e9,_0x4b7c18){_0x2f20e9=_0x2f20e9-0xe6;const _0x315701=a80_0x3157();let _0x4b1ee9=_0x315701[_0x2f20e9];return _0x4b1ee9;}(function(_0x4fcf84,_0xed8ba){const _0x4e976e=a80_0x4b1e,_0x410b1f=_0x4fcf84();while(!![]){try{const _0x2d441c=-parseInt(_0x4e976e(0xfc))/0x1+parseInt(_0x4e976e(0xfd))/0x2*(-parseInt(_0x4e976e(0xf7))/0x3)+parseInt(_0x4e976e(0xea))/0x4+parseInt(_0x4e976e(0xe9))/0x5+-parseInt(_0x4e976e(0xf9))/0x6*(-parseInt(_0x4e976e(0xf1))/0x7)+parseInt(_0x4e976e(0xf8))/0x8*(-parseInt(_0x4e976e(0xe7))/0x9)+parseInt(_0x4e976e(0xe6))/0xa;if(_0x2d441c===_0xed8ba)break;else _0x410b1f['push'](_0x410b1f['shift']());}catch(_0x3407a2){_0x410b1f['push'](_0x410b1f['shift']());}}}(a80_0x3157,0xb7428));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{logger}from'../../utils/logger.js';export const skillDefinitions=[{'service':a80_0xd5f6b1(0xf0),'command':a80_0xd5f6b1(0xf6),'description':'Install\x20developer\x20skill\x20package','risk':a80_0xd5f6b1(0xf2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x358c91){const _0x4acaa3=a80_0xd5f6b1;logger['setLogPath'](process[_0x4acaa3(0xfa)]()),logger[_0x4acaa3(0xf3)]('skill-install',_0x4acaa3(0xec));const {runNpxSkillsAddGlobal:_0x5b601b}=await import(_0x4acaa3(0xf5)),_0x624e25=_0x358c91['nonInteractive']?_0x4acaa3(0xeb):_0x4acaa3(0xe8);console[_0x4acaa3(0xfe)]('Installing\x20official\x20skill\x20via\x20npx\x20(npx\x20-y\x20skills\x20add\x20lovrabet/rabetbase\x20--global)...');const _0x19ca8c=_0x5b601b(process['cwd'](),_0x4acaa3(0xee),{'stdio':_0x624e25});if(_0x19ca8c[_0x4acaa3(0xfb)])console[_0x4acaa3(0xfe)]('Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20skill\x20is\x20already\x20present.');else{if(_0x19ca8c['ok'])console[_0x4acaa3(0xfe)](CLI_BIN_NAME+_0x4acaa3(0xf4));else throw CliErrors[_0x4acaa3(0xef)]('npx\x20skills\x20add\x20failed:\x20'+(_0x19ca8c['error']||'unknown'),_0x4acaa3(0xed));}return{'ok':!![]};}}];
@@ -1 +1 @@
1
- function a81_0x4887(_0x131055,_0x31f4c7){_0x131055=_0x131055-0x108;const _0x5c0d7c=a81_0x5c0d();let _0x48875a=_0x5c0d7c[_0x131055];return _0x48875a;}const a81_0x64dff2=a81_0x4887;function a81_0x5c0d(){const _0x25dfa8=['5812839aKFuoQ','str','sqlContent','sqlCode','3349056JdUeBU','appCode','730338lUBSdO','Return\x20full\x20raw\x20SQL\x20query\x20object','10sfmGMO','26289rtqqZC','4QRxVjr','sql','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','description','1079175uyADOE','14766224joojXO','dbId','28jaKOLS','sqlcode','sqlName','bool','4zVubul','verbose','2842795JOcCBU'];a81_0x5c0d=function(){return _0x25dfa8;};return a81_0x5c0d();}(function(_0x1bad96,_0x3f6275){const _0x1ed05a=a81_0x4887,_0x4c9b3c=_0x1bad96();while(!![]){try{const _0xc1bf=parseInt(_0x1ed05a(0x11a))/0x1*(parseInt(_0x1ed05a(0x10e))/0x2)+-parseInt(_0x1ed05a(0x11f))/0x3+parseInt(_0x1ed05a(0x11b))/0x4*(parseInt(_0x1ed05a(0x110))/0x5)+-parseInt(_0x1ed05a(0x117))/0x6*(-parseInt(_0x1ed05a(0x10a))/0x7)+parseInt(_0x1ed05a(0x115))/0x8+-parseInt(_0x1ed05a(0x111))/0x9*(-parseInt(_0x1ed05a(0x119))/0xa)+-parseInt(_0x1ed05a(0x108))/0xb;if(_0xc1bf===_0x3f6275)break;else _0x4c9b3c['push'](_0x4c9b3c['shift']());}catch(_0x4f7c11){_0x4c9b3c['push'](_0x4c9b3c['shift']());}}}(a81_0x5c0d,0x72d97));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':a81_0x64dff2(0x11c),'command':'detail','description':a81_0x64dff2(0x11d),'risk':'read','flags':[SQLCODE_FLAG,{'name':a81_0x64dff2(0x10f),'type':'boolean','description':a81_0x64dff2(0x118)}],async 'execute'(_0x3434f6){const _0x3593c5=a81_0x64dff2,_0x5246c2=await getSqlQueryInfo(_0x3434f6[_0x3593c5(0x116)],_0x3434f6[_0x3593c5(0x112)](_0x3593c5(0x10b))),_0x20d3ba=_0x3434f6[_0x3593c5(0x10d)](_0x3593c5(0x10f));if(_0x20d3ba)return{'ok':!![],'data':_0x5246c2};const _0x5f2b31=_0x5246c2[_0x3593c5(0x109)]?await getDbName(_0x3434f6[_0x3593c5(0x116)],_0x5246c2[_0x3593c5(0x109)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x5246c2[_0x3593c5(0x114)],'sqlName':_0x5246c2[_0x3593c5(0x10c)],'db':_0x5f2b31?_0x5f2b31+'\x20('+_0x5246c2[_0x3593c5(0x109)]+')':_0x5246c2[_0x3593c5(0x109)]??'','description':_0x5246c2[_0x3593c5(0x11e)]??'','sqlContent':_0x5246c2[_0x3593c5(0x113)]??''}};}};
1
+ function a81_0x4309(_0x385cf0,_0xcf4ebc){_0x385cf0=_0x385cf0-0x1f0;const _0x592f76=a81_0x592f();let _0x430964=_0x592f76[_0x385cf0];return _0x430964;}const a81_0x4e3c95=a81_0x4309;(function(_0x118a0c,_0x11e10a){const _0x34aaed=a81_0x4309,_0x12b398=_0x118a0c();while(!![]){try{const _0x51034b=-parseInt(_0x34aaed(0x1ff))/0x1*(-parseInt(_0x34aaed(0x1fe))/0x2)+parseInt(_0x34aaed(0x206))/0x3*(-parseInt(_0x34aaed(0x1fd))/0x4)+-parseInt(_0x34aaed(0x209))/0x5*(parseInt(_0x34aaed(0x201))/0x6)+-parseInt(_0x34aaed(0x205))/0x7+-parseInt(_0x34aaed(0x1fa))/0x8*(parseInt(_0x34aaed(0x1f5))/0x9)+parseInt(_0x34aaed(0x1f3))/0xa*(-parseInt(_0x34aaed(0x1f2))/0xb)+parseInt(_0x34aaed(0x204))/0xc;if(_0x51034b===_0x11e10a)break;else _0x12b398['push'](_0x12b398['shift']());}catch(_0x16932e){_0x12b398['push'](_0x12b398['shift']());}}}(a81_0x592f,0x43a48));import{getSqlQueryInfo}from'../../core/api-client.js';function a81_0x592f(){const _0x376677=['1360653TSIVXo','sqlName','sql','5BkGYUs','dbId','sqlContent','619465xoFjGn','70uwijEE','boolean','2060919zeEjma','description','sqlcode','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','bool','16mfHHYb','sqlCode','detail','4ezgYRC','20wjWHOJ','25349KqjCPu','read','2554800FpiAdW','appCode','Return\x20full\x20raw\x20SQL\x20query\x20object','26187468QAlDKV','2990239QnTnRM'];a81_0x592f=function(){return _0x376677;};return a81_0x592f();}import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':a81_0x4e3c95(0x208),'command':a81_0x4e3c95(0x1fc),'description':a81_0x4e3c95(0x1f8),'risk':a81_0x4e3c95(0x200),'flags':[SQLCODE_FLAG,{'name':'verbose','type':a81_0x4e3c95(0x1f4),'description':a81_0x4e3c95(0x203)}],async 'execute'(_0x278a4c){const _0x142a2d=a81_0x4e3c95,_0x393f97=await getSqlQueryInfo(_0x278a4c[_0x142a2d(0x202)],_0x278a4c['str'](_0x142a2d(0x1f7))),_0x42a72a=_0x278a4c[_0x142a2d(0x1f9)]('verbose');if(_0x42a72a)return{'ok':!![],'data':_0x393f97};const _0x26a1ff=_0x393f97[_0x142a2d(0x1f0)]?await getDbName(_0x278a4c[_0x142a2d(0x202)],_0x393f97[_0x142a2d(0x1f0)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x393f97[_0x142a2d(0x1fb)],'sqlName':_0x393f97[_0x142a2d(0x207)],'db':_0x26a1ff?_0x26a1ff+'\x20('+_0x393f97[_0x142a2d(0x1f0)]+')':_0x393f97[_0x142a2d(0x1f0)]??'','description':_0x393f97[_0x142a2d(0x1f6)]??'','sqlContent':_0x393f97[_0x142a2d(0x1f1)]??''}};}};
@@ -1 +1 @@
1
- function a82_0x5046(_0x51c5e7,_0x3f6bb4){_0x51c5e7=_0x51c5e7-0x183;const _0xf0b5e4=a82_0xf0b5();let _0x5046b7=_0xf0b5e4[_0x51c5e7];return _0x5046b7;}const a82_0x245f76=a82_0x5046;(function(_0x1fc13d,_0x3aba90){const _0x5b5b8b=a82_0x5046,_0x248a44=_0x1fc13d();while(!![]){try{const _0x13ec61=-parseInt(_0x5b5b8b(0x183))/0x1+-parseInt(_0x5b5b8b(0x18b))/0x2*(-parseInt(_0x5b5b8b(0x197))/0x3)+parseInt(_0x5b5b8b(0x186))/0x4*(parseInt(_0x5b5b8b(0x19d))/0x5)+parseInt(_0x5b5b8b(0x19a))/0x6+parseInt(_0x5b5b8b(0x185))/0x7*(-parseInt(_0x5b5b8b(0x199))/0x8)+parseInt(_0x5b5b8b(0x184))/0x9*(-parseInt(_0x5b5b8b(0x189))/0xa)+parseInt(_0x5b5b8b(0x198))/0xb;if(_0x13ec61===_0x3aba90)break;else _0x248a44['push'](_0x248a44['shift']());}catch(_0x54c605){_0x248a44['push'](_0x248a44['shift']());}}}(a82_0xf0b5,0x7d2f2));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_0x245f76(0x194),'command':'exec','description':'Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','risk':'read','flags':[SQLCODE_FLAG,{'name':a82_0x245f76(0x192),'type':a82_0x245f76(0x188),'description':'SQL\x20parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)'}],async 'execute'(_0x4c93ee){const _0x1123d5=a82_0x245f76;let _0x2d80d5;const _0x2a8f81=_0x4c93ee[_0x1123d5(0x195)](_0x1123d5(0x192));if(_0x2a8f81)try{_0x2d80d5=JSON[_0x1123d5(0x19b)](_0x2a8f81);}catch{throw CliErrors[_0x1123d5(0x187)](_0x1123d5(0x190)+_0x2a8f81);}const _0x2043e9=Date[_0x1123d5(0x18f)](),_0x111fc5=await executeSql(_0x4c93ee[_0x1123d5(0x18c)],_0x4c93ee[_0x1123d5(0x195)](_0x1123d5(0x18d)),_0x2d80d5),_0x196f44=Date[_0x1123d5(0x18f)]()-_0x2043e9,_0x2cff2c=_0x111fc5?.['execResult']??_0x111fc5,_0x11c18e=_0x111fc5?.[_0x1123d5(0x196)]??!![];if(!_0x11c18e)return{'ok':![],'data':{'error':_0x111fc5?.['execError']||_0x1123d5(0x193),'elapsed':_0x196f44},'message':_0x1123d5(0x193)};const _0x89f459=Array[_0x1123d5(0x18e)](_0x2cff2c)?_0x2cff2c:[];return{'ok':!![],'data':{'rows':_0x89f459,'rowCount':_0x89f459['length'],'elapsed':_0x196f44},'message':_0x1123d5(0x19c)+_0x89f459[_0x1123d5(0x18a)]+_0x1123d5(0x191)+_0x196f44+'ms'};}};function a82_0xf0b5(){const _0x53f37b=['637062inDbYv','8352JYMsnx','87066dHxMJZ','46712mCwTka','validation','string','4220ZDfKwu','length','976622IfBxEa','appCode','sqlcode','isArray','now','Invalid\x20JSON\x20for\x20--params:\x20','\x20row(s)\x20in\x20','params','SQL\x20execution\x20failed','sql','str','execSuccess','3kJuvNE','1954414KjrTac','96IZYdYW','262506zovSbX','parse','Returned\x20','420JnTbzW'];a82_0xf0b5=function(){return _0x53f37b;};return a82_0xf0b5();}
1
+ const a82_0x104b23=a82_0x5697;(function(_0x34090b,_0x5020f7){const _0xe5d720=a82_0x5697,_0x41ea98=_0x34090b();while(!![]){try{const _0x2207f9=parseInt(_0xe5d720(0xd6))/0x1+-parseInt(_0xe5d720(0xd4))/0x2+-parseInt(_0xe5d720(0xcb))/0x3*(-parseInt(_0xe5d720(0xbf))/0x4)+parseInt(_0xe5d720(0xc0))/0x5+-parseInt(_0xe5d720(0xc1))/0x6+-parseInt(_0xe5d720(0xcf))/0x7*(-parseInt(_0xe5d720(0xc8))/0x8)+-parseInt(_0xe5d720(0xbe))/0x9*(parseInt(_0xe5d720(0xd1))/0xa);if(_0x2207f9===_0x5020f7)break;else _0x41ea98['push'](_0x41ea98['shift']());}catch(_0xc865d4){_0x41ea98['push'](_0x41ea98['shift']());}}}(a82_0x7efb,0x9903b));import{executeSql}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a82_0x7efb(){const _0x26d614=['Invalid\x20JSON\x20for\x20--params:\x20','SQL\x20parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','parse','string','execError','4890744tVzmto','isArray','appCode','2697BwNDTG','length','validation','sql','14uUJvSG','str','10RktTgA','execSuccess','params','411152VRKpgS','execResult','774441uKwTBb','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','now','Returned\x20','exec','19006398nYgABi','1448Ymgekp','4301660QmiWVV','1432512aZOBWG','SQL\x20execution\x20failed'];a82_0x7efb=function(){return _0x26d614;};return a82_0x7efb();}function a82_0x5697(_0x180a90,_0x14b9df){_0x180a90=_0x180a90-0xbb;const _0x7efbd0=a82_0x7efb();let _0x5697a9=_0x7efbd0[_0x180a90];return _0x5697a9;}export const sqlExec={'service':a82_0x104b23(0xce),'command':a82_0x104b23(0xbd),'description':a82_0x104b23(0xd7),'risk':'read','flags':[SQLCODE_FLAG,{'name':'params','type':a82_0x104b23(0xc6),'description':a82_0x104b23(0xc4)}],async 'execute'(_0x324cd6){const _0x56ceb5=a82_0x104b23;let _0x18f65d;const _0x36930d=_0x324cd6[_0x56ceb5(0xd0)](_0x56ceb5(0xd3));if(_0x36930d)try{_0x18f65d=JSON[_0x56ceb5(0xc5)](_0x36930d);}catch{throw CliErrors[_0x56ceb5(0xcd)](_0x56ceb5(0xc3)+_0x36930d);}const _0x2f10c8=Date[_0x56ceb5(0xbb)](),_0x31f6b2=await executeSql(_0x324cd6[_0x56ceb5(0xca)],_0x324cd6['str']('sqlcode'),_0x18f65d),_0x2922c1=Date[_0x56ceb5(0xbb)]()-_0x2f10c8,_0x3fe41d=_0x31f6b2?.[_0x56ceb5(0xd5)]??_0x31f6b2,_0x2b11d7=_0x31f6b2?.[_0x56ceb5(0xd2)]??!![];if(!_0x2b11d7)return{'ok':![],'data':{'error':_0x31f6b2?.[_0x56ceb5(0xc7)]||_0x56ceb5(0xc2),'elapsed':_0x2922c1},'message':_0x56ceb5(0xc2)};const _0x299cc1=Array[_0x56ceb5(0xc9)](_0x3fe41d)?_0x3fe41d:[];return{'ok':!![],'data':{'rows':_0x299cc1,'rowCount':_0x299cc1[_0x56ceb5(0xcc)],'elapsed':_0x2922c1},'message':_0x56ceb5(0xbc)+_0x299cc1['length']+'\x20row(s)\x20in\x20'+_0x2922c1+'ms'};}};
@@ -1 +1 @@
1
- (function(_0x2fb1fd,_0x364b44){const _0x240da4=a83_0x228a,_0x25b6fd=_0x2fb1fd();while(!![]){try{const _0x191683=-parseInt(_0x240da4(0xeb))/0x1*(-parseInt(_0x240da4(0xe8))/0x2)+parseInt(_0x240da4(0xea))/0x3+-parseInt(_0x240da4(0xe6))/0x4*(-parseInt(_0x240da4(0xe5))/0x5)+-parseInt(_0x240da4(0xec))/0x6+-parseInt(_0x240da4(0xe4))/0x7+-parseInt(_0x240da4(0xe7))/0x8*(parseInt(_0x240da4(0xe3))/0x9)+-parseInt(_0x240da4(0xe9))/0xa;if(_0x191683===_0x364b44)break;else _0x25b6fd['push'](_0x25b6fd['shift']());}catch(_0x34ff4c){_0x25b6fd['push'](_0x25b6fd['shift']());}}}(a83_0x2952,0x940a6));import{sqlList}from'../../commands/sql/list.js';import{sqlDetail}from'../../commands/sql/detail.js';import{sqlValidate}from'../../commands/sql/validate.js';import{sqlSave}from'../../commands/sql/save.js';function a83_0x2952(){const _0x176d2d=['2676216SNwheQ','260962PgAmHR','197820cnASBz','606465wNrWJm','2025541GKLuqB','4473060SoqZzz','4hBMuNT','88dOxtkc','4DXNxeq','6386660ZiDKNo'];a83_0x2952=function(){return _0x176d2d;};return a83_0x2952();}function a83_0x228a(_0x286574,_0x54a677){_0x286574=_0x286574-0xe3;const _0x2952c5=a83_0x2952();let _0x228a01=_0x2952c5[_0x286574];return _0x228a01;}import{sqlExec}from'../../commands/sql/exec.js';export const sqlDefinitions=[sqlList,sqlDetail,sqlValidate,sqlSave,sqlExec];
1
+ (function(_0x5cf007,_0x1f93a2){const _0x5011c2=a83_0x3c3c,_0x6d5ea3=_0x5cf007();while(!![]){try{const _0xf7e595=parseInt(_0x5011c2(0x7b))/0x1+parseInt(_0x5011c2(0x74))/0x2*(-parseInt(_0x5011c2(0x76))/0x3)+-parseInt(_0x5011c2(0x7a))/0x4+parseInt(_0x5011c2(0x77))/0x5*(-parseInt(_0x5011c2(0x79))/0x6)+-parseInt(_0x5011c2(0x7c))/0x7+parseInt(_0x5011c2(0x78))/0x8+parseInt(_0x5011c2(0x75))/0x9;if(_0xf7e595===_0x1f93a2)break;else _0x6d5ea3['push'](_0x6d5ea3['shift']());}catch(_0x492f09){_0x6d5ea3['push'](_0x6d5ea3['shift']());}}}(a83_0x43fd,0x94dc3));import{sqlList}from'../../commands/sql/list.js';function a83_0x43fd(){const _0x394678=['3064128mxaYXt','326604jcpBRb','2673812pGBwEt','504102NRpiea','6732341mtMAOP','1456620CUarnY','19220157OMDyqw','3yiqdcD','5wLAMfd'];a83_0x43fd=function(){return _0x394678;};return a83_0x43fd();}import{sqlDetail}from'../../commands/sql/detail.js';import{sqlValidate}from'../../commands/sql/validate.js';function a83_0x3c3c(_0x1703d3,_0x5d383e){_0x1703d3=_0x1703d3-0x74;const _0x43fde2=a83_0x43fd();let _0x3c3c47=_0x43fde2[_0x1703d3];return _0x3c3c47;}import{sqlSave}from'../../commands/sql/save.js';import{sqlExec}from'../../commands/sql/exec.js';export const sqlDefinitions=[sqlList,sqlDetail,sqlValidate,sqlSave,sqlExec];
@@ -1 +1 @@
1
- function a84_0x3876(_0x76b410,_0x134976){_0x76b410=_0x76b410-0x11b;const _0x43557d=a84_0x4355();let _0x387653=_0x43557d[_0x76b410];return _0x387653;}function a84_0x4355(){const _0x5a0557=['num','7741492schUZQ','totalCount','description','name','all','60021PcHHGJ','319326NRZbsQ','914512LVjBzL','1460pejLdD','string','\x20SQL\x20queries\x20(total:\x20','pagesize','1158UDUYNX','3559672mjYLzd','read','sql','bool','sqlName','2637ZeZeZS','number','map','Return\x20full\x20SQL\x20query\x20objects\x20including\x20parameters\x20and\x20SQL\x20content','str','page','8210YEvdll','Found\x20','tableData','Page\x20number','length','dbId','50ACDYvT','paging','Page\x20size','7qahFyH','sqlCode'];a84_0x4355=function(){return _0x5a0557;};return a84_0x4355();}const a84_0x322728=a84_0x3876;(function(_0x527ad9,_0x3d3b13){const _0x1fbfe3=a84_0x3876,_0x391f26=_0x527ad9();while(!![]){try{const _0x4495f7=parseInt(_0x1fbfe3(0x128))/0x1+-parseInt(_0x1fbfe3(0x12a))/0x2+-parseInt(_0x1fbfe3(0x12f))/0x3*(-parseInt(_0x1fbfe3(0x12b))/0x4)+parseInt(_0x1fbfe3(0x11d))/0x5*(parseInt(_0x1fbfe3(0x129))/0x6)+-parseInt(_0x1fbfe3(0x120))/0x7*(parseInt(_0x1fbfe3(0x130))/0x8)+parseInt(_0x1fbfe3(0x135))/0x9*(-parseInt(_0x1fbfe3(0x13b))/0xa)+parseInt(_0x1fbfe3(0x123))/0xb;if(_0x4495f7===_0x3d3b13)break;else _0x391f26['push'](_0x391f26['shift']());}catch(_0x2372bf){_0x391f26['push'](_0x391f26['shift']());}}}(a84_0x4355,0x47ced));import{listSqlQueries}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlList={'service':a84_0x322728(0x132),'command':'list','description':'List\x20custom\x20SQL\x20queries','risk':a84_0x322728(0x131),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a84_0x322728(0x126),'type':a84_0x322728(0x12c),'description':'Filter\x20by\x20SQL\x20name'},{'name':a84_0x322728(0x13a),'type':a84_0x322728(0x136),'description':a84_0x322728(0x13e),'default':0x1},{'name':'pagesize','type':a84_0x322728(0x136),'description':a84_0x322728(0x11f)},{'name':'verbose','type':'boolean','description':a84_0x322728(0x138)}],async 'execute'(_0x304bc8){const _0x58c5f6=a84_0x322728,_0x1e6555=await listSqlQueries(_0x304bc8['appCode'],{'sqlCode':_0x304bc8[_0x58c5f6(0x139)]('sqlcode')||undefined,'sqlName':_0x304bc8['str'](_0x58c5f6(0x126))||undefined,'currentPage':_0x304bc8[_0x58c5f6(0x122)](_0x58c5f6(0x13a)),'pageSize':_0x304bc8[_0x58c5f6(0x122)](_0x58c5f6(0x12e),0x32)}),_0x176a2f=_0x304bc8[_0x58c5f6(0x133)]('verbose'),_0x7eae52=_0x1e6555[_0x58c5f6(0x13d)]??[],_0x780dc=_0x1e6555[_0x58c5f6(0x11e)]?.[_0x58c5f6(0x124)]??_0x7eae52['length'];let _0x37ee90;return _0x176a2f?_0x37ee90=_0x7eae52:_0x37ee90=await Promise[_0x58c5f6(0x127)](_0x7eae52[_0x58c5f6(0x137)](async _0x2128af=>{const _0x1c1a3f=_0x58c5f6,_0x2304d6=_0x2128af[_0x1c1a3f(0x11c)]?await getDbName(_0x304bc8['appCode'],_0x2128af['dbId']):undefined;return{'sqlCode':_0x2128af[_0x1c1a3f(0x121)],'sqlName':_0x2128af[_0x1c1a3f(0x134)],'description':_0x2128af[_0x1c1a3f(0x125)]??'','db':_0x2304d6?_0x2304d6+'\x20('+_0x2128af['dbId']+')':_0x2128af[_0x1c1a3f(0x11c)]??''};})),{'ok':!![],'data':_0x37ee90,'message':_0x7eae52[_0x58c5f6(0x11b)]===0x0?'No\x20custom\x20SQL\x20queries\x20found.':_0x58c5f6(0x13c)+_0x7eae52[_0x58c5f6(0x11b)]+_0x58c5f6(0x12d)+_0x780dc+').'};}};
1
+ const a84_0x3cc2d9=a84_0x23ad;function a84_0x23ad(_0x18ed19,_0x35ce21){_0x18ed19=_0x18ed19-0xda;const _0x1ab13a=a84_0x1ab1();let _0x23ad14=_0x1ab13a[_0x18ed19];return _0x23ad14;}function a84_0x1ab1(){const _0x26587f=['5802962CFJsuw','sqlName','bool','2988bHlYBe','sqlcode','Found\x20','pagesize','2172527iqcdJt','str','39411GGAElS','page','num','name','35256LpEeeX','List\x20custom\x20SQL\x20queries','2670TXYugd','string','list','3222npvIPW','\x20SQL\x20queries\x20(total:\x20','number','totalCount','Return\x20full\x20SQL\x20query\x20objects\x20including\x20parameters\x20and\x20SQL\x20content','appCode','sqlCode','Filter\x20by\x20SQL\x20name','dbId','14065nrKlGB','5565856TeeaKP','Page\x20size','length','105236xGbFOn','boolean','3EdUxse','map','tableData','27RRhXcL','8jSwMKu','verbose','No\x20custom\x20SQL\x20queries\x20found.','sql'];a84_0x1ab1=function(){return _0x26587f;};return a84_0x1ab1();}(function(_0x3d2e39,_0x1c65e4){const _0x388bd7=a84_0x23ad,_0x3c1860=_0x3d2e39();while(!![]){try{const _0x4011e5=parseInt(_0x388bd7(0xf0))/0x1*(-parseInt(_0x388bd7(0xeb))/0x2)+parseInt(_0x388bd7(0xed))/0x3*(parseInt(_0x388bd7(0xe8))/0x4)+parseInt(_0x388bd7(0xe7))/0x5*(parseInt(_0x388bd7(0xde))/0x6)+-parseInt(_0x388bd7(0xfc))/0x7*(-parseInt(_0x388bd7(0xf1))/0x8)+-parseInt(_0x388bd7(0xfe))/0x9*(parseInt(_0x388bd7(0xdb))/0xa)+-parseInt(_0x388bd7(0xf5))/0xb+-parseInt(_0x388bd7(0xf8))/0xc*(-parseInt(_0x388bd7(0x102))/0xd);if(_0x4011e5===_0x1c65e4)break;else _0x3c1860['push'](_0x3c1860['shift']());}catch(_0x2891fa){_0x3c1860['push'](_0x3c1860['shift']());}}}(a84_0x1ab1,0xbc0e1));import{listSqlQueries}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlList={'service':a84_0x3cc2d9(0xf4),'command':a84_0x3cc2d9(0xdd),'description':a84_0x3cc2d9(0xda),'risk':'read','flags':[SQLCODE_FLAG_OPTIONAL,{'name':a84_0x3cc2d9(0x101),'type':a84_0x3cc2d9(0xdc),'description':a84_0x3cc2d9(0xe5)},{'name':'page','type':a84_0x3cc2d9(0xe0),'description':'Page\x20number','default':0x1},{'name':a84_0x3cc2d9(0xfb),'type':a84_0x3cc2d9(0xe0),'description':a84_0x3cc2d9(0xe9)},{'name':a84_0x3cc2d9(0xf2),'type':a84_0x3cc2d9(0xec),'description':a84_0x3cc2d9(0xe2)}],async 'execute'(_0x57b16c){const _0x8931fb=a84_0x3cc2d9,_0xa8aaa3=await listSqlQueries(_0x57b16c[_0x8931fb(0xe3)],{'sqlCode':_0x57b16c[_0x8931fb(0xfd)](_0x8931fb(0xf9))||undefined,'sqlName':_0x57b16c[_0x8931fb(0xfd)](_0x8931fb(0x101))||undefined,'currentPage':_0x57b16c[_0x8931fb(0x100)](_0x8931fb(0xff)),'pageSize':_0x57b16c['num']('pagesize',0x32)}),_0x492c9c=_0x57b16c[_0x8931fb(0xf7)](_0x8931fb(0xf2)),_0x229b63=_0xa8aaa3[_0x8931fb(0xef)]??[],_0x437e4f=_0xa8aaa3['paging']?.[_0x8931fb(0xe1)]??_0x229b63[_0x8931fb(0xea)];let _0x2a635e;return _0x492c9c?_0x2a635e=_0x229b63:_0x2a635e=await Promise['all'](_0x229b63[_0x8931fb(0xee)](async _0x4bbc7a=>{const _0x27ff8c=_0x8931fb,_0x2a6f14=_0x4bbc7a[_0x27ff8c(0xe6)]?await getDbName(_0x57b16c[_0x27ff8c(0xe3)],_0x4bbc7a[_0x27ff8c(0xe6)]):undefined;return{'sqlCode':_0x4bbc7a[_0x27ff8c(0xe4)],'sqlName':_0x4bbc7a[_0x27ff8c(0xf6)],'description':_0x4bbc7a['description']??'','db':_0x2a6f14?_0x2a6f14+'\x20('+_0x4bbc7a[_0x27ff8c(0xe6)]+')':_0x4bbc7a[_0x27ff8c(0xe6)]??''};})),{'ok':!![],'data':_0x2a635e,'message':_0x229b63[_0x8931fb(0xea)]===0x0?_0x8931fb(0xf3):_0x8931fb(0xfa)+_0x229b63[_0x8931fb(0xea)]+_0x8931fb(0xdf)+_0x437e4f+').'};}};
@@ -1 +1 @@
1
- const a85_0x27208b=a85_0x4cbd;function a85_0x4cbd(_0x5607fb,_0x38b50a){_0x5607fb=_0x5607fb-0xdd;const _0x2f89c6=a85_0x2f89();let _0x4cbdaa=_0x2f89c6[_0x5607fb];return _0x4cbdaa;}(function(_0x2f71ed,_0x253759){const _0x5f4836=a85_0x4cbd,_0xc0e386=_0x2f71ed();while(!![]){try{const _0x53c3c2=-parseInt(_0x5f4836(0x108))/0x1+parseInt(_0x5f4836(0xfc))/0x2*(parseInt(_0x5f4836(0xff))/0x3)+-parseInt(_0x5f4836(0xe3))/0x4*(-parseInt(_0x5f4836(0x10c))/0x5)+parseInt(_0x5f4836(0xe2))/0x6*(-parseInt(_0x5f4836(0xe9))/0x7)+parseInt(_0x5f4836(0x106))/0x8*(parseInt(_0x5f4836(0x102))/0x9)+-parseInt(_0x5f4836(0x10b))/0xa*(parseInt(_0x5f4836(0x104))/0xb)+-parseInt(_0x5f4836(0xdd))/0xc;if(_0x53c3c2===_0x253759)break;else _0xc0e386['push'](_0xc0e386['shift']());}catch(_0x1355e1){_0xc0e386['push'](_0xc0e386['shift']());}}}(a85_0x2f89,0xd1457));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_0x2f89(){const _0x214234=['1916211vHUtpZ','description','\x20chars)','18pFUfRg','join','24497zwXLdW','\x20|\x20Params:\x20','5556456NIDkDZ','Created','637995Nbxjop','action','Path\x20to\x20the\x20SQL\x20file','4670LrVULX','55mjysAx','11871576nXgalj','tables','sqlcode','string','valid','4122aDtdIc','573956GJyQLP','sqlName','\x20|\x20Tables:\x20','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','dbId','File\x20not\x20found:\x20','833pPBhSZ','str','sqlType','utf-8','message','POST','dbName','save','validation','appCode','SQL\x20query\x20display\x20name','/api/node-toolbox/sql/save','Save\x20or\x20update\x20a\x20custom\x20SQL\x20query\x20(validates\x20before\x20saving)','file','cwd','blocked','sqlname','sqlCode','length','2RiOfDJ','sql','Save\x20SQL\x20query\x20from\x20'];a85_0x2f89=function(){return _0x214234;};return a85_0x2f89();}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlSave={'service':a85_0x27208b(0xfd),'command':a85_0x27208b(0xf0),'description':a85_0x27208b(0xf5),'risk':'write','flags':[{'name':'file','type':a85_0x27208b(0xe0),'required':!![],'description':a85_0x27208b(0x10a)},SQLCODE_FLAG_OPTIONAL,{'name':a85_0x27208b(0xf9),'type':'string','description':a85_0x27208b(0xf3)},{'name':'db','type':a85_0x27208b(0xe0),'description':a85_0x27208b(0xe6)},{'name':a85_0x27208b(0x100),'type':a85_0x27208b(0xe0),'description':'SQL\x20query\x20description'}],async 'validate'(_0x25e81a){const _0x2fed12=a85_0x27208b,_0x395085=resolve(process[_0x2fed12(0xf7)](),_0x25e81a[_0x2fed12(0xea)](_0x2fed12(0xf6)));if(!existsSync(_0x395085))throw CliErrors[_0x2fed12(0xf1)](_0x2fed12(0xe8)+_0x395085);const _0x3405c2=readFileSync(_0x395085,_0x2fed12(0xec)),_0x35fed4=validateSql(_0x3405c2);if(!_0x35fed4[_0x2fed12(0xe1)])throw CliErrors['validation']('SQL\x20validation\x20failed:\x20'+_0x35fed4[_0x2fed12(0xed)]);},async 'dryRun'(_0x4e4447){const _0x41b4c9=a85_0x27208b,_0x19bdfe=resolve(process[_0x41b4c9(0xf7)](),_0x4e4447[_0x41b4c9(0xea)]('file')),_0x506258=readFileSync(_0x19bdfe,_0x41b4c9(0xec)),_0x1d2544=validateSql(_0x506258),_0x42f18c=_0x4e4447[_0x41b4c9(0xea)]('db')||undefined,{db:_0x4dbfd7,error:_0x494eba}=await resolveOneDb(_0x4e4447[_0x41b4c9(0xf2)],_0x42f18c);return{'method':_0x41b4c9(0xee),'url':_0x41b4c9(0xf4),'body':{'appCode':_0x4e4447[_0x41b4c9(0xf2)],'sqlContent':'('+_0x506258[_0x41b4c9(0xfb)]+_0x41b4c9(0x101),'sqlCode':_0x4e4447[_0x41b4c9(0xea)](_0x41b4c9(0xdf))||undefined,'sqlName':_0x4e4447[_0x41b4c9(0xea)]('sqlname')||undefined,'db':_0x4dbfd7?_0x4dbfd7[_0x41b4c9(0xef)]+'\x20('+_0x4dbfd7[_0x41b4c9(0xe7)]+')':_0x494eba},'description':[_0x41b4c9(0xfe)+_0x4e4447[_0x41b4c9(0xea)](_0x41b4c9(0xf6)),'Validation:\x20'+_0x1d2544[_0x41b4c9(0xed)],'Type:\x20'+_0x1d2544[_0x41b4c9(0xeb)]['type']+_0x41b4c9(0xe5)+(_0x1d2544[_0x41b4c9(0xde)][_0x41b4c9(0x103)](',\x20')||'N/A')+_0x41b4c9(0x105)+(_0x1d2544['parameters'][_0x41b4c9(0x103)](',\x20')||'none')]['join']('\x0a')};},async 'execute'(_0x3bebbc){const _0x1ba083=a85_0x27208b,_0x3dc8bc=resolve(process['cwd'](),_0x3bebbc[_0x1ba083(0xea)]('file')),_0x1388df=readFileSync(_0x3dc8bc,'utf-8'),_0x2c3f23=_0x3bebbc[_0x1ba083(0xea)]('db')||undefined,{db:_0x41d981,error:_0x4c10f5}=await resolveOneDb(_0x3bebbc[_0x1ba083(0xf2)],_0x2c3f23);if(_0x4c10f5)throw CliErrors['validation'](_0x4c10f5);const _0x2c5e09=await saveSqlQuery({'appCode':_0x3bebbc[_0x1ba083(0xf2)],'sqlContent':_0x1388df,'sqlCode':_0x3bebbc[_0x1ba083(0xea)](_0x1ba083(0xdf))||undefined,'sqlName':_0x3bebbc['str'](_0x1ba083(0xf9))||undefined,'dbId':_0x41d981[_0x1ba083(0xe7)],'description':_0x3bebbc[_0x1ba083(0xea)](_0x1ba083(0x100))||undefined});if(_0x2c5e09[_0x1ba083(0xf8)])return{'ok':![],'data':_0x2c5e09,'message':_0x2c5e09[_0x1ba083(0xed)]||'Conflict\x20detected'};return{'ok':!![],'data':{'sqlCode':_0x2c5e09[_0x1ba083(0xfa)],'sqlName':_0x2c5e09[_0x1ba083(0xe4)],'action':_0x2c5e09[_0x1ba083(0x109)]},'message':(_0x2c5e09[_0x1ba083(0x109)]==='created'?_0x1ba083(0x107):'Updated')+'\x20successfully'+(_0x2c5e09[_0x1ba083(0xfa)]?'\x20('+_0x2c5e09[_0x1ba083(0xfa)]+')':'')};}};
1
+ const a85_0x12138d=a85_0x174a;(function(_0x488153,_0x89bfbf){const _0x2f2145=a85_0x174a,_0x58fdd8=_0x488153();while(!![]){try{const _0x2befb3=-parseInt(_0x2f2145(0x177))/0x1*(-parseInt(_0x2f2145(0x19e))/0x2)+parseInt(_0x2f2145(0x17e))/0x3*(parseInt(_0x2f2145(0x193))/0x4)+parseInt(_0x2f2145(0x180))/0x5+parseInt(_0x2f2145(0x195))/0x6*(-parseInt(_0x2f2145(0x181))/0x7)+-parseInt(_0x2f2145(0x18f))/0x8*(parseInt(_0x2f2145(0x19f))/0x9)+-parseInt(_0x2f2145(0x174))/0xa*(parseInt(_0x2f2145(0x17b))/0xb)+parseInt(_0x2f2145(0x185))/0xc*(-parseInt(_0x2f2145(0x173))/0xd);if(_0x2befb3===_0x89bfbf)break;else _0x58fdd8['push'](_0x58fdd8['shift']());}catch(_0x1c34eb){_0x58fdd8['push'](_0x58fdd8['shift']());}}}(a85_0x3364,0x4b26a));import{readFileSync,existsSync}from'node:fs';function a85_0x174a(_0x5b7c90,_0x163283){_0x5b7c90=_0x5b7c90-0x171;const _0x33643a=a85_0x3364();let _0x174ab2=_0x33643a[_0x5b7c90];return _0x174ab2;}import{resolve}from'node:path';import{saveSqlQuery}from'../../core/api-client.js';import{resolveOneDb}from'../../core/db-resolver.js';function a85_0x3364(){const _0x4bcfc3=['1195RxBmJh','validation','parameters','type','110wwjVCH','appCode','Created','9jjmxYd','SQL\x20query\x20description','2465695knGSpI','92953kgiDth','utf-8','Updated','sqlcode','2579244PTQWpw','valid','SQL\x20validation\x20failed:\x20','cwd','action','tables','sqlname','Type:\x20','string','sql','16RvSacp','description','message','dbId','378824sJjQbh','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','30IdcfxU','POST','file','dbName','Path\x20to\x20the\x20SQL\x20file','sqlType','Conflict\x20detected','SQL\x20query\x20display\x20name','sqlCode','802mfGcdN','2500704skDkNo','save','\x20successfully','13iBwgoF','111590iqZEPg','str','join'];a85_0x3364=function(){return _0x4bcfc3;};return a85_0x3364();}import{validateSql}from'../../core/sql-validator.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlSave={'service':a85_0x12138d(0x18e),'command':a85_0x12138d(0x171),'description':'Save\x20or\x20update\x20a\x20custom\x20SQL\x20query\x20(validates\x20before\x20saving)','risk':'write','flags':[{'name':a85_0x12138d(0x197),'type':'string','required':!![],'description':a85_0x12138d(0x199)},SQLCODE_FLAG_OPTIONAL,{'name':'sqlname','type':a85_0x12138d(0x18d),'description':a85_0x12138d(0x19c)},{'name':'db','type':a85_0x12138d(0x18d),'description':a85_0x12138d(0x194)},{'name':a85_0x12138d(0x190),'type':a85_0x12138d(0x18d),'description':a85_0x12138d(0x17f)}],async 'validate'(_0xcf1944){const _0x411909=a85_0x12138d,_0x13ec96=resolve(process[_0x411909(0x188)](),_0xcf1944[_0x411909(0x175)](_0x411909(0x197)));if(!existsSync(_0x13ec96))throw CliErrors[_0x411909(0x178)]('File\x20not\x20found:\x20'+_0x13ec96);const _0xfc1f07=readFileSync(_0x13ec96,_0x411909(0x182)),_0x80112=validateSql(_0xfc1f07);if(!_0x80112[_0x411909(0x186)])throw CliErrors[_0x411909(0x178)](_0x411909(0x187)+_0x80112[_0x411909(0x191)]);},async 'dryRun'(_0x1375fe){const _0x241ed8=a85_0x12138d,_0x19cb07=resolve(process[_0x241ed8(0x188)](),_0x1375fe[_0x241ed8(0x175)](_0x241ed8(0x197))),_0xe2cbfa=readFileSync(_0x19cb07,_0x241ed8(0x182)),_0x913ee7=validateSql(_0xe2cbfa),_0x4e3c30=_0x1375fe['str']('db')||undefined,{db:_0x3f6164,error:_0x527ef7}=await resolveOneDb(_0x1375fe[_0x241ed8(0x17c)],_0x4e3c30);return{'method':_0x241ed8(0x196),'url':'/api/node-toolbox/sql/save','body':{'appCode':_0x1375fe[_0x241ed8(0x17c)],'sqlContent':'('+_0xe2cbfa['length']+'\x20chars)','sqlCode':_0x1375fe[_0x241ed8(0x175)](_0x241ed8(0x184))||undefined,'sqlName':_0x1375fe[_0x241ed8(0x175)](_0x241ed8(0x18b))||undefined,'db':_0x3f6164?_0x3f6164[_0x241ed8(0x198)]+'\x20('+_0x3f6164[_0x241ed8(0x192)]+')':_0x527ef7},'description':['Save\x20SQL\x20query\x20from\x20'+_0x1375fe[_0x241ed8(0x175)]('file'),'Validation:\x20'+_0x913ee7[_0x241ed8(0x191)],_0x241ed8(0x18c)+_0x913ee7[_0x241ed8(0x19a)][_0x241ed8(0x17a)]+'\x20|\x20Tables:\x20'+(_0x913ee7[_0x241ed8(0x18a)]['join'](',\x20')||'N/A')+'\x20|\x20Params:\x20'+(_0x913ee7[_0x241ed8(0x179)][_0x241ed8(0x176)](',\x20')||'none')][_0x241ed8(0x176)]('\x0a')};},async 'execute'(_0x3096fd){const _0x44e4e7=a85_0x12138d,_0x2255e4=resolve(process['cwd'](),_0x3096fd['str'](_0x44e4e7(0x197))),_0x254a79=readFileSync(_0x2255e4,_0x44e4e7(0x182)),_0x17ccd6=_0x3096fd[_0x44e4e7(0x175)]('db')||undefined,{db:_0x14d36d,error:_0x9c534b}=await resolveOneDb(_0x3096fd[_0x44e4e7(0x17c)],_0x17ccd6);if(_0x9c534b)throw CliErrors['validation'](_0x9c534b);const _0x2d2d53=await saveSqlQuery({'appCode':_0x3096fd[_0x44e4e7(0x17c)],'sqlContent':_0x254a79,'sqlCode':_0x3096fd[_0x44e4e7(0x175)](_0x44e4e7(0x184))||undefined,'sqlName':_0x3096fd[_0x44e4e7(0x175)](_0x44e4e7(0x18b))||undefined,'dbId':_0x14d36d['dbId'],'description':_0x3096fd[_0x44e4e7(0x175)]('description')||undefined});if(_0x2d2d53['blocked'])return{'ok':![],'data':_0x2d2d53,'message':_0x2d2d53[_0x44e4e7(0x191)]||_0x44e4e7(0x19b)};return{'ok':!![],'data':{'sqlCode':_0x2d2d53[_0x44e4e7(0x19d)],'sqlName':_0x2d2d53['sqlName'],'action':_0x2d2d53['action']},'message':(_0x2d2d53[_0x44e4e7(0x189)]==='created'?_0x44e4e7(0x17d):_0x44e4e7(0x183))+_0x44e4e7(0x172)+(_0x2d2d53[_0x44e4e7(0x19d)]?'\x20('+_0x2d2d53['sqlCode']+')':'')};}};
@@ -1 +1 @@
1
- const a86_0x34ea46=a86_0x30ca;(function(_0x4619b6,_0x27ae5f){const _0x3b242a=a86_0x30ca,_0x3886db=_0x4619b6();while(!![]){try{const _0x3ef7c1=-parseInt(_0x3b242a(0x104))/0x1*(parseInt(_0x3b242a(0xe1))/0x2)+parseInt(_0x3b242a(0xd9))/0x3+parseInt(_0x3b242a(0xe3))/0x4*(parseInt(_0x3b242a(0xe2))/0x5)+parseInt(_0x3b242a(0xe8))/0x6+parseInt(_0x3b242a(0xf5))/0x7*(parseInt(_0x3b242a(0xe6))/0x8)+-parseInt(_0x3b242a(0xe9))/0x9+-parseInt(_0x3b242a(0xff))/0xa;if(_0x3ef7c1===_0x27ae5f)break;else _0x3886db['push'](_0x3886db['shift']());}catch(_0x2189f5){_0x3886db['push'](_0x3886db['shift']());}}}(a86_0x5c75,0xc7ee2));import{readFileSync,existsSync}from'node:fs';function a86_0x5c75(){const _0x18ac77=['Provide\x20--file\x20or\x20--sql','validate','cwd','isArray','utf-8','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','10hEUNiq','93315xOibrd','80GtPTPO','\x22\x20not\x20found\x20in\x20any\x20dataset','read','32sJTbYD','valid','3990468LSvYMw','7734681wInfrH','File\x20not\x20found:\x20','push','toLowerCase','string','trim','message','from','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','validation','dbtableConfig','reason','2707187afGpZh','map','str','split','filter','name','sqlType','schemaWarnings','\x22\x20not\x20found\x20or\x20not\x20accessible','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','9580740cVgDWD','type','fields','tableName','parameters','99628juGrnL','file','size','tables','schemas','get','Dataset\x20\x22','flagMissing','Table\x20\x22','appCode','1647705dfwVOx','sql'];a86_0x5c75=function(){return _0x18ac77;};return a86_0x5c75();}import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';function a86_0x30ca(_0x108372,_0x3796f2){_0x108372=_0x108372-0xd0;const _0x5c7587=a86_0x5c75();let _0x30ca2b=_0x5c7587[_0x108372];return _0x30ca2b;}import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const sqlValidate={'service':a86_0x34ea46(0xda),'command':a86_0x34ea46(0xdc),'description':'Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','risk':a86_0x34ea46(0xe5),'flags':[{'name':a86_0x34ea46(0xd0),'type':a86_0x34ea46(0xed),'description':a86_0x34ea46(0xe0)},{'name':a86_0x34ea46(0xda),'type':a86_0x34ea46(0xed),'description':a86_0x34ea46(0xf1)},{'name':a86_0x34ea46(0xd3),'type':a86_0x34ea46(0xed),'description':a86_0x34ea46(0xfe)}],async 'execute'(_0xaf33df){const _0x19fddd=a86_0x34ea46,_0x5a6219=_0xaf33df[_0x19fddd(0xf7)](_0x19fddd(0xd0)),_0x2f3669=_0xaf33df[_0x19fddd(0xf7)]('sql');if(!_0x5a6219&&!_0x2f3669)throw CliErrors[_0x19fddd(0xd6)](_0x19fddd(0xd0),_0x19fddd(0xdb));let _0x34e355;if(_0x5a6219){const _0x519b13=resolve(process[_0x19fddd(0xdd)](),_0x5a6219);if(!existsSync(_0x519b13))throw CliErrors[_0x19fddd(0xf2)](_0x19fddd(0xea)+_0x519b13);_0x34e355=readFileSync(_0x519b13,_0x19fddd(0xdf));}else _0x34e355=_0x2f3669;const _0x57ae53=validateSql(_0x34e355),_0x15acdc={'valid':_0x57ae53[_0x19fddd(0xe7)],'sqlType':_0x57ae53[_0x19fddd(0xfb)][_0x19fddd(0x100)],'isSelectOnly':_0x57ae53[_0x19fddd(0xfb)]['isSelectOnly'],'isDangerous':_0x57ae53['sqlType']['isDangerous'],'tables':_0x57ae53[_0x19fddd(0xd2)],'parameters':_0x57ae53[_0x19fddd(0x103)],'message':_0x57ae53[_0x19fddd(0xef)]};_0x57ae53['sqlType']['reason']&&(_0x15acdc[_0x19fddd(0xf4)]=_0x57ae53[_0x19fddd(0xfb)][_0x19fddd(0xf4)]);const _0x149e03=_0xaf33df[_0x19fddd(0xf7)]('schemas');if(_0x149e03&&_0x57ae53[_0x19fddd(0xe7)]){const _0x86ab64=_0x149e03[_0x19fddd(0xf8)](',')[_0x19fddd(0xf6)](_0x2a28d5=>_0x2a28d5[_0x19fddd(0xee)]())[_0x19fddd(0xf9)](Boolean),_0x40ed3b=[],_0x33bb08=await listDatasets(_0xaf33df[_0x19fddd(0xd8)]),_0x1405b5=new Map(_0x33bb08[_0x19fddd(0xf6)](_0xef0e10=>[_0xef0e10[_0x19fddd(0xf3)]?.['tableName']?.[_0x19fddd(0xec)](),_0xef0e10]));for(const _0x59db45 of _0x57ae53[_0x19fddd(0xd2)]){const _0xef6d23=_0x1405b5[_0x19fddd(0xd4)](_0x59db45[_0x19fddd(0xec)]());!_0xef6d23&&_0x40ed3b[_0x19fddd(0xeb)](_0x19fddd(0xd7)+_0x59db45+_0x19fddd(0xe4));}for(const _0xadc4 of _0x86ab64){try{const _0xa63e7d=await getDatasetDetail(_0xadc4),_0x3b15a0=Array[_0x19fddd(0xde)](_0xa63e7d[_0x19fddd(0x101)])?_0xa63e7d['fields']:[],_0x56a793=new Set(_0x3b15a0[_0x19fddd(0xf6)](_0x14829f=>_0x14829f[_0x19fddd(0xfa)]?.[_0x19fddd(0xec)]())),_0x52a504=_0xa63e7d[_0x19fddd(0xf3)]?.[_0x19fddd(0x102)]||_0xa63e7d['tableName']||_0xadc4;_0x15acdc['schema:'+_0x52a504]={'code':_0xadc4,'tableName':_0x52a504,'fieldCount':_0x56a793[_0x19fddd(0xd1)],'fields':Array[_0x19fddd(0xf0)](_0x56a793)};}catch{_0x40ed3b[_0x19fddd(0xeb)](_0x19fddd(0xd5)+_0xadc4+_0x19fddd(0xfd));}}_0x40ed3b['length']>0x0&&(_0x15acdc[_0x19fddd(0xfc)]=_0x40ed3b);}return{'ok':_0x57ae53[_0x19fddd(0xe7)],'data':_0x15acdc,'message':_0x57ae53[_0x19fddd(0xef)]};}};
1
+ const a86_0x2558ec=a86_0x2129;(function(_0x89220a,_0x369dca){const _0x459705=a86_0x2129,_0x442e4f=_0x89220a();while(!![]){try{const _0x43d8c3=parseInt(_0x459705(0x193))/0x1*(-parseInt(_0x459705(0x177))/0x2)+-parseInt(_0x459705(0x16b))/0x3+parseInt(_0x459705(0x16a))/0x4+-parseInt(_0x459705(0x184))/0x5*(parseInt(_0x459705(0x189))/0x6)+parseInt(_0x459705(0x178))/0x7+parseInt(_0x459705(0x18a))/0x8*(parseInt(_0x459705(0x17e))/0x9)+parseInt(_0x459705(0x179))/0xa;if(_0x43d8c3===_0x369dca)break;else _0x442e4f['push'](_0x442e4f['shift']());}catch(_0x2b57db){_0x442e4f['push'](_0x442e4f['shift']());}}}(a86_0x30e8,0x2dfcf));import{readFileSync,existsSync}from'node:fs';function a86_0x30e8(){const _0x5d8d10=['message','valid','227916XxTdEn','tables','schema:','split','file','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','335LXMTmJ','sqlType','Table\x20\x22','tableName','toLowerCase','5706cDANeX','64RhswVX','cwd','str','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','isSelectOnly','size','\x22\x20not\x20found\x20in\x20any\x20dataset','push','isDangerous','920gWnvwm','map','trim','sql','filter','schemas','Provide\x20--file\x20or\x20--sql','string','length','dbtableConfig','1344032uVjlUO','557901ujGFlL','validate','File\x20not\x20found:\x20','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','parameters','read','fields','flagMissing','schemaWarnings','reason','get','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','770WVlxxO','86506bDqZPo','2412930zTtFCv','from','type'];a86_0x30e8=function(){return _0x5d8d10;};return a86_0x30e8();}import{resolve}from'node:path';function a86_0x2129(_0x20cc70,_0x125632){_0x20cc70=_0x20cc70-0x165;const _0x30e80b=a86_0x30e8();let _0x212969=_0x30e80b[_0x20cc70];return _0x212969;}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_0x2558ec(0x196),'command':a86_0x2558ec(0x16c),'description':a86_0x2558ec(0x176),'risk':a86_0x2558ec(0x170),'flags':[{'name':a86_0x2558ec(0x182),'type':a86_0x2558ec(0x167),'description':a86_0x2558ec(0x16e)},{'name':'sql','type':a86_0x2558ec(0x167),'description':a86_0x2558ec(0x18d)},{'name':a86_0x2558ec(0x165),'type':a86_0x2558ec(0x167),'description':a86_0x2558ec(0x183)}],async 'execute'(_0x419f37){const _0xedf647=a86_0x2558ec,_0x7a9d09=_0x419f37['str'](_0xedf647(0x182)),_0x2ab195=_0x419f37[_0xedf647(0x18c)](_0xedf647(0x196));if(!_0x7a9d09&&!_0x2ab195)throw CliErrors[_0xedf647(0x172)](_0xedf647(0x182),_0xedf647(0x166));let _0x3fa75e;if(_0x7a9d09){const _0x514f64=resolve(process[_0xedf647(0x18b)](),_0x7a9d09);if(!existsSync(_0x514f64))throw CliErrors['validation'](_0xedf647(0x16d)+_0x514f64);_0x3fa75e=readFileSync(_0x514f64,'utf-8');}else _0x3fa75e=_0x2ab195;const _0x118517=validateSql(_0x3fa75e),_0x19bd44={'valid':_0x118517[_0xedf647(0x17d)],'sqlType':_0x118517[_0xedf647(0x185)][_0xedf647(0x17b)],'isSelectOnly':_0x118517[_0xedf647(0x185)][_0xedf647(0x18e)],'isDangerous':_0x118517['sqlType'][_0xedf647(0x192)],'tables':_0x118517[_0xedf647(0x17f)],'parameters':_0x118517[_0xedf647(0x16f)],'message':_0x118517['message']};_0x118517[_0xedf647(0x185)][_0xedf647(0x174)]&&(_0x19bd44[_0xedf647(0x174)]=_0x118517[_0xedf647(0x185)][_0xedf647(0x174)]);const _0x46dc4d=_0x419f37[_0xedf647(0x18c)](_0xedf647(0x165));if(_0x46dc4d&&_0x118517[_0xedf647(0x17d)]){const _0x3665f7=_0x46dc4d[_0xedf647(0x181)](',')[_0xedf647(0x194)](_0x3447de=>_0x3447de[_0xedf647(0x195)]())[_0xedf647(0x197)](Boolean),_0x44bdf8=[],_0x1aced4=await listDatasets(_0x419f37['appCode']),_0x13d3ca=new Map(_0x1aced4[_0xedf647(0x194)](_0x52da8a=>[_0x52da8a['dbtableConfig']?.[_0xedf647(0x187)]?.[_0xedf647(0x188)](),_0x52da8a]));for(const _0x5d0ee8 of _0x118517[_0xedf647(0x17f)]){const _0x174f9f=_0x13d3ca[_0xedf647(0x175)](_0x5d0ee8[_0xedf647(0x188)]());!_0x174f9f&&_0x44bdf8[_0xedf647(0x191)](_0xedf647(0x186)+_0x5d0ee8+_0xedf647(0x190));}for(const _0x480394 of _0x3665f7){try{const _0x260959=await getDatasetDetail(_0x480394),_0x56ea34=Array['isArray'](_0x260959[_0xedf647(0x171)])?_0x260959[_0xedf647(0x171)]:[],_0x4384a1=new Set(_0x56ea34['map'](_0x2a852a=>_0x2a852a['name']?.['toLowerCase']())),_0x2cdbf8=_0x260959[_0xedf647(0x169)]?.[_0xedf647(0x187)]||_0x260959[_0xedf647(0x187)]||_0x480394;_0x19bd44[_0xedf647(0x180)+_0x2cdbf8]={'code':_0x480394,'tableName':_0x2cdbf8,'fieldCount':_0x4384a1[_0xedf647(0x18f)],'fields':Array[_0xedf647(0x17a)](_0x4384a1)};}catch{_0x44bdf8[_0xedf647(0x191)]('Dataset\x20\x22'+_0x480394+'\x22\x20not\x20found\x20or\x20not\x20accessible');}}_0x44bdf8[_0xedf647(0x168)]>0x0&&(_0x19bd44[_0xedf647(0x173)]=_0x44bdf8);}return{'ok':_0x118517['valid'],'data':_0x19bd44,'message':_0x118517[_0xedf647(0x17c)]};}};
@@ -1 +1 @@
1
- const a87_0x186a16=a87_0x182f;(function(_0x14d207,_0x241ad1){const _0xcfd8da=a87_0x182f,_0x212bc1=_0x14d207();while(!![]){try{const _0x3a2c6c=-parseInt(_0xcfd8da(0xa1))/0x1*(-parseInt(_0xcfd8da(0xbb))/0x2)+-parseInt(_0xcfd8da(0xa2))/0x3*(parseInt(_0xcfd8da(0xba))/0x4)+parseInt(_0xcfd8da(0x9c))/0x5+-parseInt(_0xcfd8da(0x89))/0x6*(parseInt(_0xcfd8da(0xb4))/0x7)+parseInt(_0xcfd8da(0x8f))/0x8+parseInt(_0xcfd8da(0x93))/0x9+-parseInt(_0xcfd8da(0xaf))/0xa*(parseInt(_0xcfd8da(0xc5))/0xb);if(_0x3a2c6c===_0x241ad1)break;else _0x212bc1['push'](_0x212bc1['shift']());}catch(_0x9768d0){_0x212bc1['push'](_0x212bc1['shift']());}}}(a87_0x2a58,0xb93dd));export const CLI_BIN_NAME=a87_0x186a16(0xc1);export const CLI_DISPLAY_NAME='Rabetbase\x20CLI';export const NPM_PACKAGE_NAME=a87_0x186a16(0xb0);export const GLOBAL_FLAGS=[{'name':a87_0x186a16(0xcb),'meowKey':a87_0x186a16(0xcb),'type':a87_0x186a16(0x82),'description':'Override\x20appcode','hint':a87_0x186a16(0xbd)},{'name':a87_0x186a16(0x99),'meowKey':a87_0x186a16(0x99),'type':a87_0x186a16(0x82),'description':a87_0x186a16(0x98),'hint':a87_0x186a16(0x97)},{'name':a87_0x186a16(0x9f),'meowKey':a87_0x186a16(0x9f),'type':'string','description':a87_0x186a16(0x94),'hint':a87_0x186a16(0xb6)},{'name':a87_0x186a16(0xd3),'meowKey':a87_0x186a16(0xd3),'type':a87_0x186a16(0x82),'description':a87_0x186a16(0xb5),'hint':a87_0x186a16(0x83)},{'name':'jq','meowKey':'jq','type':'string','description':a87_0x186a16(0xdc),'hint':a87_0x186a16(0x81)},{'name':a87_0x186a16(0xae),'meowKey':a87_0x186a16(0x9a),'type':a87_0x186a16(0xe2),'description':a87_0x186a16(0x92)},{'name':a87_0x186a16(0xdd),'meowKey':a87_0x186a16(0xdd),'type':a87_0x186a16(0xe2),'description':a87_0x186a16(0x9d)},{'name':a87_0x186a16(0x96),'meowKey':a87_0x186a16(0xbf),'type':a87_0x186a16(0xe2),'description':a87_0x186a16(0xb8)},{'name':'global','meowKey':a87_0x186a16(0x7e),'type':'boolean','description':a87_0x186a16(0xc4)},{'name':'project','meowKey':a87_0x186a16(0xb3),'type':'boolean','description':a87_0x186a16(0xa3)},{'name':'ci','meowKey':'ci','type':a87_0x186a16(0xe2),'description':a87_0x186a16(0xa4),'hidden':!![]},{'name':a87_0x186a16(0x88),'meowKey':a87_0x186a16(0x88),'type':a87_0x186a16(0xe2),'description':a87_0x186a16(0xc3)},{'name':a87_0x186a16(0xc2),'meowKey':a87_0x186a16(0xc2),'type':a87_0x186a16(0x82),'description':a87_0x186a16(0xa5),'hidden':!![]},{'name':a87_0x186a16(0xb9),'meowKey':a87_0x186a16(0xb9),'type':a87_0x186a16(0xe2),'description':a87_0x186a16(0x95),'hidden':!![]},{'name':a87_0x186a16(0xe3),'meowKey':a87_0x186a16(0xe3),'type':a87_0x186a16(0xe2),'description':a87_0x186a16(0x8d),'hidden':!![]},{'name':a87_0x186a16(0xc6),'meowKey':'output','type':a87_0x186a16(0x82),'description':'Output\x20path','hidden':!![]},{'name':a87_0x186a16(0x87),'meowKey':'params','type':a87_0x186a16(0x82),'description':a87_0x186a16(0xc7),'hidden':!![]},{'name':a87_0x186a16(0xac),'meowKey':'datasetcode','type':a87_0x186a16(0x82),'description':a87_0x186a16(0xbc),'hidden':!![]},{'name':a87_0x186a16(0xcc),'meowKey':a87_0x186a16(0xcc),'type':a87_0x186a16(0xe2),'description':a87_0x186a16(0xdb),'hidden':!![]},{'name':a87_0x186a16(0xa0),'meowKey':'enableBffSave','type':a87_0x186a16(0xe2),'description':a87_0x186a16(0x8e),'hidden':!![]},{'name':'id','meowKey':'id','type':a87_0x186a16(0x82),'description':a87_0x186a16(0xc8),'hidden':!![]},{'name':'type','meowKey':a87_0x186a16(0xa8),'type':a87_0x186a16(0x82),'description':a87_0x186a16(0xc0),'hidden':!![]},{'name':a87_0x186a16(0xcf),'meowKey':'file','type':a87_0x186a16(0x82),'description':a87_0x186a16(0x85),'hidden':!![]},{'name':a87_0x186a16(0xd9),'meowKey':a87_0x186a16(0xd9),'type':a87_0x186a16(0x82),'description':a87_0x186a16(0xdf),'hidden':!![]},{'name':a87_0x186a16(0x7f),'meowKey':'sqlname','type':'string','description':a87_0x186a16(0xa7),'hidden':!![]},{'name':a87_0x186a16(0xd7),'meowKey':a87_0x186a16(0xd7),'type':a87_0x186a16(0x82),'description':a87_0x186a16(0xde),'hidden':!![]},{'name':a87_0x186a16(0xd0),'meowKey':a87_0x186a16(0xd0),'type':a87_0x186a16(0x82),'description':a87_0x186a16(0xd5),'hidden':!![]},{'name':a87_0x186a16(0xb2),'meowKey':a87_0x186a16(0xb2),'type':a87_0x186a16(0x82),'description':a87_0x186a16(0x8a),'hidden':!![]},{'name':a87_0x186a16(0xe0),'meowKey':a87_0x186a16(0xe0),'type':a87_0x186a16(0x82),'description':a87_0x186a16(0xda),'hidden':!![]},{'name':a87_0x186a16(0xce),'meowKey':'keyword','type':a87_0x186a16(0x82),'description':'Keyword\x20filter','hidden':!![]},{'name':a87_0x186a16(0x80),'meowKey':'code','type':a87_0x186a16(0x82),'description':a87_0x186a16(0xc9),'hidden':!![]},{'name':'sql','meowKey':a87_0x186a16(0x86),'type':a87_0x186a16(0x82),'description':'SQL\x20string','hidden':!![]},{'name':'schemas','meowKey':a87_0x186a16(0xd8),'type':a87_0x186a16(0x82),'description':a87_0x186a16(0xcd),'hidden':!![]},{'name':a87_0x186a16(0xe1),'meowKey':a87_0x186a16(0xe1),'type':a87_0x186a16(0x82),'description':a87_0x186a16(0xb1),'hidden':!![]},{'name':'target','meowKey':a87_0x186a16(0xa6),'type':a87_0x186a16(0x82),'description':a87_0x186a16(0xad),'hidden':!![]},{'name':a87_0x186a16(0xa9),'meowKey':a87_0x186a16(0xd2),'type':'boolean','description':a87_0x186a16(0x8b),'hidden':!![]},{'name':a87_0x186a16(0xbe),'meowKey':a87_0x186a16(0xbe),'type':a87_0x186a16(0x82),'description':a87_0x186a16(0xaa),'hidden':!![]},{'name':a87_0x186a16(0xab),'meowKey':a87_0x186a16(0xab),'type':a87_0x186a16(0x82),'description':a87_0x186a16(0x9e),'hidden':!![]},{'name':a87_0x186a16(0xb7),'meowKey':a87_0x186a16(0xb7),'type':a87_0x186a16(0xe2),'description':'Force\x20overwrite','hidden':!![]},{'name':a87_0x186a16(0xd6),'meowKey':a87_0x186a16(0xd6),'type':a87_0x186a16(0xe2),'description':a87_0x186a16(0x91),'hidden':!![]},{'name':a87_0x186a16(0x9b),'meowKey':a87_0x186a16(0x9b),'type':a87_0x186a16(0xe2),'description':a87_0x186a16(0x84),'hidden':!![]},{'name':'operation-type','meowKey':'operationType','type':a87_0x186a16(0x82),'description':a87_0x186a16(0xb1),'hidden':!![]},{'name':'function-node','meowKey':a87_0x186a16(0xd1),'type':a87_0x186a16(0x82),'description':a87_0x186a16(0x90),'hidden':!![]}];function a87_0x182f(_0x1a2551,_0xdcf8d){_0x1a2551=_0x1a2551-0x7e;const _0x2a5822=a87_0x2a58();let _0x182f78=_0x2a5822[_0x1a2551];return _0x182f78;}function a87_0x2a58(){const _0x527b27=['Page\x20number','Skip\x20import\x20generation','map','Watch\x20mode','Enable\x20BFF\x20save','6622608dnovOv','Function\x20node','Use\x20remote','Preview\x20operation\x20without\x20executing','9013869GrXUni','Environment','Clear','non-interactive','<name>','Select\x20app\x20profile\x20by\x20name','app','dryRun','verbose','6015375ZwZWhe','Skip\x20confirmation\x20for\x20high-risk\x20writes','Config\x20value','env','enable-bff-save','7bvrjqz','3SRakfb','Use\x20project\x20config\x20scope','Alias\x20for\x20--non-interactive','Name','target','SQL\x20name','type','skip-imports','Config\x20key','value','datasetcode','Target\x20path','dry-run','771610kVbMau','@lovrabet/rabetbase-cli','Operation\x20type','page','project','518ERZEiN','Output\x20format','production\x20|\x20daily','force','Force\x20non-interactive\x20mode\x20(CI)','clear','3020604koVNhX','50674RoqpNx','Dataset\x20code','<code>','key','nonInteractive','Type\x20filter','rabetbase','name','Show\x20help','Use\x20global\x20config\x20scope','55gznWCR','output','JSON\x20params','Record\x20ID','Code\x20filter','meowKey','appcode','all','Schemas','keyword','file','description','functionNode','skipImports','format','fromEntries','Description','remote','dbid','schemas','sqlcode','Page\x20size','Apply\x20to\x20all','Filter\x20JSON\x20output\x20(bundled\x20jq\x20via\x20node-jq,\x20else\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','yes','DB\x20ID','SQL\x20code','pagesize','operation','boolean','watch','global','sqlname','code','<expr>','string','json\x20|\x20pretty\x20|\x20compress','Verbose\x20output','File\x20path','sql','params','help','106224ZkboiI'];a87_0x2a58=function(){return _0x527b27;};return a87_0x2a58();}export function buildMeowFlags(){const _0x300028=a87_0x186a16;return Object[_0x300028(0xd4)](GLOBAL_FLAGS[_0x300028(0x8c)](_0x58e641=>[_0x58e641[_0x300028(0xca)],{'type':_0x58e641[_0x300028(0xa8)]}]));}
1
+ function a87_0x3e12(_0x449c9b,_0x564204){_0x449c9b=_0x449c9b-0x19c;const _0x71f931=a87_0x71f9();let _0x3e1265=_0x71f931[_0x449c9b];return _0x3e1265;}const a87_0x2abbeb=a87_0x3e12;(function(_0x53d2ea,_0x4ea3d6){const _0x16b9f3=a87_0x3e12,_0x2309b4=_0x53d2ea();while(!![]){try{const _0x2348ae=parseInt(_0x16b9f3(0x1f0))/0x1+-parseInt(_0x16b9f3(0x1da))/0x2+-parseInt(_0x16b9f3(0x1e7))/0x3+parseInt(_0x16b9f3(0x1f9))/0x4+parseInt(_0x16b9f3(0x1d0))/0x5*(-parseInt(_0x16b9f3(0x1a4))/0x6)+-parseInt(_0x16b9f3(0x1e9))/0x7*(-parseInt(_0x16b9f3(0x1a9))/0x8)+parseInt(_0x16b9f3(0x1a2))/0x9*(parseInt(_0x16b9f3(0x1f8))/0xa);if(_0x2348ae===_0x4ea3d6)break;else _0x2309b4['push'](_0x2309b4['shift']());}catch(_0x5a59a6){_0x2309b4['push'](_0x2309b4['shift']());}}}(a87_0x71f9,0x2af27));export const CLI_BIN_NAME=a87_0x2abbeb(0x1de);export const CLI_DISPLAY_NAME='Rabetbase\x20CLI';export const NPM_PACKAGE_NAME='@lovrabet/rabetbase-cli';export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':'appcode','type':a87_0x2abbeb(0x1b5),'description':a87_0x2abbeb(0x1fb),'hint':a87_0x2abbeb(0x1c5)},{'name':a87_0x2abbeb(0x1c2),'meowKey':a87_0x2abbeb(0x1c2),'type':'string','description':a87_0x2abbeb(0x1e0),'hint':a87_0x2abbeb(0x1ca)},{'name':a87_0x2abbeb(0x1c1),'meowKey':a87_0x2abbeb(0x1c1),'type':a87_0x2abbeb(0x1b5),'description':a87_0x2abbeb(0x1a5),'hint':'production\x20|\x20daily'},{'name':a87_0x2abbeb(0x1ea),'meowKey':'format','type':a87_0x2abbeb(0x1b5),'description':a87_0x2abbeb(0x1dc),'hint':a87_0x2abbeb(0x1b9)},{'name':'jq','meowKey':'jq','type':'string','description':a87_0x2abbeb(0x1be),'hint':a87_0x2abbeb(0x1b4)},{'name':'dry-run','meowKey':a87_0x2abbeb(0x1e8),'type':a87_0x2abbeb(0x1db),'description':a87_0x2abbeb(0x1e6)},{'name':a87_0x2abbeb(0x1a8),'meowKey':a87_0x2abbeb(0x1a8),'type':a87_0x2abbeb(0x1db),'description':a87_0x2abbeb(0x1ad)},{'name':'non-interactive','meowKey':a87_0x2abbeb(0x19c),'type':a87_0x2abbeb(0x1db),'description':a87_0x2abbeb(0x19e)},{'name':a87_0x2abbeb(0x1ce),'meowKey':'global','type':a87_0x2abbeb(0x1db),'description':a87_0x2abbeb(0x19d)},{'name':a87_0x2abbeb(0x1bc),'meowKey':a87_0x2abbeb(0x1bc),'type':'boolean','description':a87_0x2abbeb(0x1bb)},{'name':'ci','meowKey':'ci','type':a87_0x2abbeb(0x1db),'description':a87_0x2abbeb(0x1b6),'hidden':!![]},{'name':a87_0x2abbeb(0x1ac),'meowKey':a87_0x2abbeb(0x1ac),'type':'boolean','description':'Show\x20help'},{'name':'name','meowKey':a87_0x2abbeb(0x1d6),'type':'string','description':a87_0x2abbeb(0x1d2),'hidden':!![]},{'name':a87_0x2abbeb(0x1c9),'meowKey':a87_0x2abbeb(0x1c9),'type':a87_0x2abbeb(0x1db),'description':'Clear','hidden':!![]},{'name':a87_0x2abbeb(0x1ef),'meowKey':'watch','type':a87_0x2abbeb(0x1db),'description':a87_0x2abbeb(0x1d7),'hidden':!![]},{'name':a87_0x2abbeb(0x1cc),'meowKey':a87_0x2abbeb(0x1cc),'type':'string','description':'Output\x20path','hidden':!![]},{'name':a87_0x2abbeb(0x1df),'meowKey':a87_0x2abbeb(0x1df),'type':a87_0x2abbeb(0x1b5),'description':a87_0x2abbeb(0x1f7),'hidden':!![]},{'name':'datasetcode','meowKey':a87_0x2abbeb(0x1f4),'type':a87_0x2abbeb(0x1b5),'description':'Dataset\x20code','hidden':!![]},{'name':a87_0x2abbeb(0x1f1),'meowKey':'all','type':a87_0x2abbeb(0x1db),'description':a87_0x2abbeb(0x1b7),'hidden':!![]},{'name':a87_0x2abbeb(0x1b1),'meowKey':a87_0x2abbeb(0x1b3),'type':a87_0x2abbeb(0x1db),'description':a87_0x2abbeb(0x1d1),'hidden':!![]},{'name':'id','meowKey':'id','type':a87_0x2abbeb(0x1b5),'description':a87_0x2abbeb(0x1fa),'hidden':!![]},{'name':'type','meowKey':a87_0x2abbeb(0x1d9),'type':'string','description':a87_0x2abbeb(0x1c7),'hidden':!![]},{'name':a87_0x2abbeb(0x1aa),'meowKey':a87_0x2abbeb(0x1aa),'type':a87_0x2abbeb(0x1b5),'description':a87_0x2abbeb(0x1eb),'hidden':!![]},{'name':a87_0x2abbeb(0x1ec),'meowKey':'sqlcode','type':'string','description':a87_0x2abbeb(0x1c8),'hidden':!![]},{'name':'sqlname','meowKey':a87_0x2abbeb(0x1b2),'type':a87_0x2abbeb(0x1b5),'description':a87_0x2abbeb(0x1bf),'hidden':!![]},{'name':a87_0x2abbeb(0x1f2),'meowKey':a87_0x2abbeb(0x1f2),'type':a87_0x2abbeb(0x1b5),'description':a87_0x2abbeb(0x1ba),'hidden':!![]},{'name':a87_0x2abbeb(0x1b8),'meowKey':a87_0x2abbeb(0x1b8),'type':a87_0x2abbeb(0x1b5),'description':a87_0x2abbeb(0x1a3),'hidden':!![]},{'name':a87_0x2abbeb(0x1f5),'meowKey':a87_0x2abbeb(0x1f5),'type':a87_0x2abbeb(0x1b5),'description':a87_0x2abbeb(0x1ed),'hidden':!![]},{'name':a87_0x2abbeb(0x1e5),'meowKey':a87_0x2abbeb(0x1e5),'type':a87_0x2abbeb(0x1b5),'description':a87_0x2abbeb(0x1a1),'hidden':!![]},{'name':a87_0x2abbeb(0x1a0),'meowKey':a87_0x2abbeb(0x1a0),'type':a87_0x2abbeb(0x1b5),'description':'Keyword\x20filter','hidden':!![]},{'name':a87_0x2abbeb(0x1c3),'meowKey':a87_0x2abbeb(0x1c3),'type':a87_0x2abbeb(0x1b5),'description':a87_0x2abbeb(0x1cb),'hidden':!![]},{'name':a87_0x2abbeb(0x1e2),'meowKey':a87_0x2abbeb(0x1e2),'type':a87_0x2abbeb(0x1b5),'description':'SQL\x20string','hidden':!![]},{'name':a87_0x2abbeb(0x1f6),'meowKey':a87_0x2abbeb(0x1f6),'type':'string','description':a87_0x2abbeb(0x1e4),'hidden':!![]},{'name':a87_0x2abbeb(0x1c4),'meowKey':a87_0x2abbeb(0x1c4),'type':a87_0x2abbeb(0x1b5),'description':'Operation\x20type','hidden':!![]},{'name':a87_0x2abbeb(0x1b0),'meowKey':a87_0x2abbeb(0x1b0),'type':'string','description':a87_0x2abbeb(0x1e3),'hidden':!![]},{'name':'skip-imports','meowKey':a87_0x2abbeb(0x1a7),'type':'boolean','description':'Skip\x20import\x20generation','hidden':!![]},{'name':a87_0x2abbeb(0x1cf),'meowKey':a87_0x2abbeb(0x1cf),'type':a87_0x2abbeb(0x1b5),'description':a87_0x2abbeb(0x19f),'hidden':!![]},{'name':a87_0x2abbeb(0x1cd),'meowKey':a87_0x2abbeb(0x1cd),'type':a87_0x2abbeb(0x1b5),'description':a87_0x2abbeb(0x1ab),'hidden':!![]},{'name':a87_0x2abbeb(0x1d5),'meowKey':'force','type':a87_0x2abbeb(0x1db),'description':a87_0x2abbeb(0x1f3),'hidden':!![]},{'name':'remote','meowKey':a87_0x2abbeb(0x1ae),'type':'boolean','description':a87_0x2abbeb(0x1d4),'hidden':!![]},{'name':a87_0x2abbeb(0x1c6),'meowKey':a87_0x2abbeb(0x1c6),'type':'boolean','description':a87_0x2abbeb(0x1a6),'hidden':!![]},{'name':a87_0x2abbeb(0x1ee),'meowKey':a87_0x2abbeb(0x1c0),'type':a87_0x2abbeb(0x1b5),'description':'Operation\x20type','hidden':!![]},{'name':a87_0x2abbeb(0x1d3),'meowKey':a87_0x2abbeb(0x1dd),'type':a87_0x2abbeb(0x1b5),'description':a87_0x2abbeb(0x1af),'hidden':!![]}];function a87_0x71f9(){const _0x552c2c=['File\x20path','sqlcode','Page\x20number','operation-type','watch','120298eFdhxB','all','dbid','Force\x20overwrite','datasetcode','page','schemas','JSON\x20params','670OvYfmt','545220ZKYlxb','Record\x20ID','Override\x20appcode','nonInteractive','Use\x20global\x20config\x20scope','Force\x20non-interactive\x20mode\x20(CI)','Config\x20key','keyword','Page\x20size','87201pMHYJH','Description','119772svPlCZ','Environment','Verbose\x20output','skipImports','yes','500728jkJILW','file','Config\x20value','help','Skip\x20confirmation\x20for\x20high-risk\x20writes','remote','Function\x20node','target','enable-bff-save','sqlname','enableBffSave','<expr>','string','Alias\x20for\x20--non-interactive','Apply\x20to\x20all','description','json\x20|\x20pretty\x20|\x20compress','DB\x20ID','Use\x20project\x20config\x20scope','project','map','Filter\x20JSON\x20output\x20(bundled\x20jq\x20via\x20node-jq,\x20else\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','SQL\x20name','operationType','env','app','code','operation','<code>','verbose','Type\x20filter','SQL\x20code','clear','<name>','Code\x20filter','output','value','global','key','45JfjzCp','Enable\x20BFF\x20save','Name','function-node','Use\x20remote','force','name','Watch\x20mode','fromEntries','type','555538iDNmUV','boolean','Output\x20format','functionNode','rabetbase','params','Select\x20app\x20profile\x20by\x20name','meowKey','sql','Target\x20path','Schemas','pagesize','Preview\x20operation\x20without\x20executing','1005057fLHngZ','dryRun','7ZhEvPX','format'];a87_0x71f9=function(){return _0x552c2c;};return a87_0x71f9();}export function buildMeowFlags(){const _0x2c237e=a87_0x2abbeb;return Object[_0x2c237e(0x1d8)](GLOBAL_FLAGS[_0x2c237e(0x1bd)](_0x4ac82c=>[_0x4ac82c[_0x2c237e(0x1e1)],{'type':_0x4ac82c['type']}]));}
@@ -1 +1 @@
1
- const a88_0x5856b6=a88_0x6f55;(function(_0x5dbf6,_0x48496b){const _0x1ad444=a88_0x6f55,_0x51f396=_0x5dbf6();while(!![]){try{const _0x5ca62e=-parseInt(_0x1ad444(0xb2))/0x1*(parseInt(_0x1ad444(0xab))/0x2)+-parseInt(_0x1ad444(0xb3))/0x3*(parseInt(_0x1ad444(0xb0))/0x4)+-parseInt(_0x1ad444(0xb1))/0x5+-parseInt(_0x1ad444(0xb9))/0x6+-parseInt(_0x1ad444(0xbb))/0x7*(-parseInt(_0x1ad444(0xaf))/0x8)+-parseInt(_0x1ad444(0xb8))/0x9*(parseInt(_0x1ad444(0xb6))/0xa)+parseInt(_0x1ad444(0xac))/0xb*(parseInt(_0x1ad444(0xad))/0xc);if(_0x5ca62e===_0x48496b)break;else _0x51f396['push'](_0x51f396['shift']());}catch(_0xc0baa){_0x51f396['push'](_0x51f396['shift']());}}}(a88_0x59f0,0x25fc8));function a88_0x59f0(){const _0x5d2b32=['167211lqILAp','468BIELdg','https://user-daily.lovrabet.com','56pdsWmz','8EICnpC','327865WYFLWW','106761VftdNQ','52293bzUMCU','https://runtime.lovrabet.com','https://daily-api.lovrabet.com','2564670rFDMDq','https://user.lovrabet.com','9syceZK','100032TRzLjw','apiDomain','149849fFqgSQ','https://api.lovrabet.com','runtimeDomain','production','https://daily-runtime.lovrabet.com','4DlOldI'];a88_0x59f0=function(){return _0x5d2b32;};return a88_0x59f0();}import{getEnv}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x4294df){const _0x38869e=a88_0x6f55;customApiDomain=_0x4294df?.[_0x38869e(0xba)],customUserDomain=_0x4294df?.['userDomain'],customRuntimeDomain=_0x4294df?.[_0x38869e(0xbd)];}export const getUserDomain=()=>customUserDomain||(getEnv()===a88_0x5856b6(0xbe)?a88_0x5856b6(0xb7):a88_0x5856b6(0xae));export const getApiDomain=()=>customApiDomain||(getEnv()==='production'?a88_0x5856b6(0xbc):a88_0x5856b6(0xb5));function a88_0x6f55(_0x14affb,_0x2bc969){_0x14affb=_0x14affb-0xab;const _0x59f065=a88_0x59f0();let _0x6f55b4=_0x59f065[_0x14affb];return _0x6f55b4;}export const getRuntimeDomain=()=>customRuntimeDomain||(getEnv()==='production'?a88_0x5856b6(0xb4):a88_0x5856b6(0xbf));
1
+ const a88_0x2b2721=a88_0x1a6e;(function(_0x391f3e,_0x19a149){const _0x3b6e2c=a88_0x1a6e,_0x13dd67=_0x391f3e();while(!![]){try{const _0x168490=parseInt(_0x3b6e2c(0x67))/0x1*(-parseInt(_0x3b6e2c(0x6a))/0x2)+parseInt(_0x3b6e2c(0x6b))/0x3+parseInt(_0x3b6e2c(0x6d))/0x4+parseInt(_0x3b6e2c(0x68))/0x5*(parseInt(_0x3b6e2c(0x74))/0x6)+parseInt(_0x3b6e2c(0x6e))/0x7+-parseInt(_0x3b6e2c(0x72))/0x8*(-parseInt(_0x3b6e2c(0x69))/0x9)+-parseInt(_0x3b6e2c(0x6f))/0xa;if(_0x168490===_0x19a149)break;else _0x13dd67['push'](_0x13dd67['shift']());}catch(_0x3e4d2a){_0x13dd67['push'](_0x13dd67['shift']());}}}(a88_0x293b,0x7a34a));function a88_0x293b(){const _0x28ae7e=['9WugSVp','1891784Aalrmq','2702751tAaJCF','https://runtime.lovrabet.com','2085296xVvCNE','6257139yNmlOx','15574970STiMUU','https://api.lovrabet.com','runtimeDomain','2347832YyGVTS','userDomain','12nEFQKZ','apiDomain','https://user-daily.lovrabet.com','production','1PkEXEj','985865ecuPXK'];a88_0x293b=function(){return _0x28ae7e;};return a88_0x293b();}import{getEnv}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;function a88_0x1a6e(_0x54237d,_0x214fae){_0x54237d=_0x54237d-0x65;const _0x293b22=a88_0x293b();let _0x1a6ec7=_0x293b22[_0x54237d];return _0x1a6ec7;}export function initDomains(_0x5533d9){const _0x5658e5=a88_0x1a6e;customApiDomain=_0x5533d9?.[_0x5658e5(0x75)],customUserDomain=_0x5533d9?.[_0x5658e5(0x73)],customRuntimeDomain=_0x5533d9?.[_0x5658e5(0x71)];}export const getUserDomain=()=>customUserDomain||(getEnv()===a88_0x2b2721(0x66)?'https://user.lovrabet.com':a88_0x2b2721(0x65));export const getApiDomain=()=>customApiDomain||(getEnv()===a88_0x2b2721(0x66)?a88_0x2b2721(0x70):'https://daily-api.lovrabet.com');export const getRuntimeDomain=()=>customRuntimeDomain||(getEnv()===a88_0x2b2721(0x66)?a88_0x2b2721(0x6c):'https://daily-runtime.lovrabet.com');
@@ -1 +1 @@
1
- const a89_0x3ce203=a89_0x53ee;(function(_0xc4ca9c,_0x9d8789){const _0x41b89d=a89_0x53ee,_0x455bda=_0xc4ca9c();while(!![]){try{const _0x13a69b=parseInt(_0x41b89d(0x19f))/0x1*(parseInt(_0x41b89d(0x19e))/0x2)+parseInt(_0x41b89d(0x19b))/0x3+-parseInt(_0x41b89d(0x198))/0x4+parseInt(_0x41b89d(0x19a))/0x5+parseInt(_0x41b89d(0x19c))/0x6+-parseInt(_0x41b89d(0x1a1))/0x7*(-parseInt(_0x41b89d(0x199))/0x8)+-parseInt(_0x41b89d(0x197))/0x9;if(_0x13a69b===_0x9d8789)break;else _0x455bda['push'](_0x455bda['shift']());}catch(_0x4536ea){_0x455bda['push'](_0x455bda['shift']());}}}(a89_0x42cb,0xeab3e));function a89_0x53ee(_0x311e53,_0x29a0a7){_0x311e53=_0x311e53-0x197;const _0x42cbd4=a89_0x42cb();let _0x53ee9c=_0x42cbd4[_0x311e53];return _0x53ee9c;}export function normalizeEnv(_0x5dc6c7){const _0x5b613a=a89_0x53ee;return _0x5dc6c7===_0x5b613a(0x1a0)?_0x5b613a(0x19d):_0x5dc6c7;}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a89_0x3ce203(0x19d));export function getEnv(){return env;}function a89_0x42cb(){const _0x3e6e3b=['8813646AxOLfD','production','409346FRrzTU','8CktADk','online','8966251votbds','31804641rnldqh','3171708VcSiJq','8zunSgU','3226825tNHzoP','766605mXUSrN'];a89_0x42cb=function(){return _0x3e6e3b;};return a89_0x42cb();}export function initEnv(_0x1c551d){env=normalizeEnv(_0x1c551d);}
1
+ const a89_0x10b161=a89_0x7bff;(function(_0x1ab5b5,_0x4f9ae8){const _0x538e80=a89_0x7bff,_0x10f934=_0x1ab5b5();while(!![]){try{const _0xd444c4=parseInt(_0x538e80(0x92))/0x1*(-parseInt(_0x538e80(0x95))/0x2)+parseInt(_0x538e80(0x93))/0x3+parseInt(_0x538e80(0x9c))/0x4*(-parseInt(_0x538e80(0x96))/0x5)+parseInt(_0x538e80(0x9b))/0x6+parseInt(_0x538e80(0x97))/0x7*(-parseInt(_0x538e80(0x94))/0x8)+-parseInt(_0x538e80(0x99))/0x9*(parseInt(_0x538e80(0x9d))/0xa)+parseInt(_0x538e80(0x98))/0xb;if(_0xd444c4===_0x4f9ae8)break;else _0x10f934['push'](_0x10f934['shift']());}catch(_0x1e6e80){_0x10f934['push'](_0x10f934['shift']());}}}(a89_0x447a,0xe2eca));export function normalizeEnv(_0x498923){const _0x4a3615=a89_0x7bff;return _0x498923===_0x4a3615(0x9e)?_0x4a3615(0x9a):_0x498923;}function a89_0x7bff(_0x3e6684,_0x22675d){_0x3e6684=_0x3e6684-0x92;const _0x447ae9=a89_0x447a();let _0x7bff28=_0x447ae9[_0x3e6684];return _0x7bff28;}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a89_0x10b161(0x9a));function a89_0x447a(){const _0x476390=['144mSyxlU','3710EAeRjH','5FrReIs','266518QoplVY','26768148grafzy','18jxhuAg','production','2554650PhqPzk','5760116rQNaGa','2120490MwtrEP','online','101DUYHer','2421159fqbOWI'];a89_0x447a=function(){return _0x476390;};return a89_0x447a();}export function getEnv(){return env;}export function initEnv(_0x1155c6){env=normalizeEnv(_0x1155c6);}
@@ -1 +1 @@
1
- const a90_0x7ba2be=a90_0x2504;function a90_0x2504(_0x532ae5,_0x44cd0f){_0x532ae5=_0x532ae5-0xa9;const _0x34fc89=a90_0x34fc();let _0x25049c=_0x34fc89[_0x532ae5];return _0x25049c;}function a90_0x34fc(){const _0x56cf7b=['15zrLjen','./src/api','7005504iJqQgn','110UvmDju','4857209PBsgmF','178096xBwotU','346602NKFkGK','282laRuxi','1000953sYHrnE','41032NOyaTu','24516xpXply'];a90_0x34fc=function(){return _0x56cf7b;};return a90_0x34fc();}(function(_0x50cb17,_0x562c37){const _0x3012e7=a90_0x2504,_0x52a1db=_0x50cb17();while(!![]){try{const _0x19fffa=-parseInt(_0x3012e7(0xa9))/0x1+-parseInt(_0x3012e7(0xad))/0x2+parseInt(_0x3012e7(0xab))/0x3*(-parseInt(_0x3012e7(0xae))/0x4)+parseInt(_0x3012e7(0xaf))/0x5*(parseInt(_0x3012e7(0xaa))/0x6)+parseInt(_0x3012e7(0xb3))/0x7+-parseInt(_0x3012e7(0xb1))/0x8+parseInt(_0x3012e7(0xac))/0x9*(parseInt(_0x3012e7(0xb2))/0xa);if(_0x19fffa===_0x562c37)break;else _0x52a1db['push'](_0x52a1db['shift']());}catch(_0x22c4b1){_0x52a1db['push'](_0x52a1db['shift']());}}}(a90_0x34fc,0x6b755));export const DEFAULT_API_DIR=a90_0x7ba2be(0xb0);
1
+ function a90_0x4c4e(){const _0x493f62=['410271DVFqSw','3165600XATXKP','3163YcwEIz','./src/api','15959688wCoxhi','106OCwvkz','98832KGZHgG','916872HAQkZF','5521502inIRKl'];a90_0x4c4e=function(){return _0x493f62;};return a90_0x4c4e();}function a90_0x21c3(_0x97cd6,_0x45fc13){_0x97cd6=_0x97cd6-0x1e2;const _0x4c4e0c=a90_0x4c4e();let _0x21c3f1=_0x4c4e0c[_0x97cd6];return _0x21c3f1;}const a90_0x2e1605=a90_0x21c3;(function(_0x184474,_0x56bebf){const _0x55c44c=a90_0x21c3,_0x332b69=_0x184474();while(!![]){try{const _0x40b995=-parseInt(_0x55c44c(0x1e2))/0x1*(parseInt(_0x55c44c(0x1e5))/0x2)+-parseInt(_0x55c44c(0x1e9))/0x3+-parseInt(_0x55c44c(0x1e6))/0x4+-parseInt(_0x55c44c(0x1ea))/0x5+parseInt(_0x55c44c(0x1e7))/0x6+-parseInt(_0x55c44c(0x1e8))/0x7+parseInt(_0x55c44c(0x1e4))/0x8;if(_0x40b995===_0x56bebf)break;else _0x332b69['push'](_0x332b69['shift']());}catch(_0x58f0a6){_0x332b69['push'](_0x332b69['shift']());}}}(a90_0x4c4e,0x60ddb));export const DEFAULT_API_DIR=a90_0x2e1605(0x1e3);
package/lib/context.js CHANGED
@@ -1 +1 @@
1
- function a91_0x55a9(){const _0x346f5c=['length','./constant/env.js','./utils/is-non-interactive.js','.rabetbase.json','1673usyCPa','read','find','entries','807204GYUlgv','write','trim','apiDomain','authRequired','api.ts','pageSize','APP','locale','stringify','1362255IsCyoD','empty','apiDir','runtimeDomain','7227608HZxuMN','appcode','\x0a\x20\x20','PAGE_SIZE','production','slice','defaultApp','180599KEZGlE','Global','riskLevel','RISK_LEVEL','setLogPath','./auth/get-cookie.js','ACCESS_KEY','userDomain','cwd','keys','Project','APPCODE','object','message','.lovrabet.json','MAX_RISK','COOKIE','true','setRawCommand','maxRisk','join','high-risk-write','status','./constant/domain.js','1687128UuqgEy','env','utf8','string','online','format','missing','VERBOSE','-api.ts','daily','error','en-US','parse','accessKey','app','apps','warn','cookie','15558Uygjtt','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','3024512CGikoq','.lovrabetrc','filter'];a91_0x55a9=function(){return _0x346f5c;};return a91_0x55a9();}const a91_0x1a9cc5=a91_0x52ca;(function(_0xaf6dfe,_0x4ac52d){const _0x36c322=a91_0x52ca,_0x1d9bd5=_0xaf6dfe();while(!![]){try{const _0x350eed=-parseInt(_0x36c322(0x1fe))/0x1+parseInt(_0x36c322(0x1e9))/0x2+-parseInt(_0x36c322(0x216))/0x3+parseInt(_0x36c322(0x1de))/0x4+parseInt(_0x36c322(0x1f3))/0x5+-parseInt(_0x36c322(0x1dc))/0x6*(-parseInt(_0x36c322(0x1e5))/0x7)+-parseInt(_0x36c322(0x1f7))/0x8;if(_0x350eed===_0x4ac52d)break;else _0x1d9bd5['push'](_0x1d9bd5['shift']());}catch(_0x815ce2){_0x1d9bd5['push'](_0x1d9bd5['shift']());}}}(a91_0x55a9,0x62fea));import{readFileSync,writeFileSync,existsSync,mkdirSync,renameSync,unlinkSync}from'node:fs';import{resolve,dirname}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';function a91_0x52ca(_0x471149,_0x290282){_0x471149=_0x471149-0x1d5;const _0x55a95d=a91_0x55a9();let _0x52ca95=_0x55a95d[_0x471149];return _0x52ca95;}import{DEFAULT_API_DIR}from'./constant/paths.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';function env(_0x21e0ce){return process.env[`RABETBASE_${_0x21e0ce}`]||process.env[`LOVRABET_${_0x21e0ce}`]||undefined;}export const NEW_CONFIG_NAME=a91_0x1a9cc5(0x1e4);export const CONFIG_NAMES=[a91_0x1a9cc5(0x1e4),a91_0x1a9cc5(0x20c),a91_0x1a9cc5(0x1df)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a91_0x1a9cc5(0x1e0)](_0x20cd7e=>_0x20cd7e!==NEW_CONFIG_NAME);export function resolveConfigPath(_0x3330d4){for(const _0x5f4660 of CONFIG_NAMES){const _0x2ec503=resolve(_0x3330d4,_0x5f4660);if(existsSync(_0x2ec503))return _0x2ec503;}return undefined;}export async function createContext(_0x4197fd){const _0x99546e=a91_0x1a9cc5,_0x344212=readRawConfig(),_0x1a4a42=buildConfig(_0x344212,_0x4197fd),{initEnv:_0x489742}=await import(_0x99546e(0x1e2));if(_0x1a4a42[_0x99546e(0x217)])_0x489742(_0x1a4a42[_0x99546e(0x217)]);else _0x4197fd[_0x99546e(0x217)]&&typeof _0x4197fd[_0x99546e(0x217)]===_0x99546e(0x219)&&_0x489742(_0x4197fd['env']);const {initDomains:_0x511a5a,getUserDomain:_0xb8c4bc,getApiDomain:_0x4ad0ff}=await import(_0x99546e(0x215));_0x511a5a({'apiDomain':_0x344212[_0x99546e(0x1ec)]||undefined,'userDomain':_0x344212[_0x99546e(0x205)]||undefined,'runtimeDomain':_0x344212[_0x99546e(0x1f6)]||undefined});const _0x95db03={'apiDomain':_0x4ad0ff(),'userDomain':_0xb8c4bc()},_0x1bfe71=await buildAuth(_0x1a4a42);logger[_0x99546e(0x202)](process[_0x99546e(0x206)]());const _0x7657f4=(CLI_BIN_NAME+'\x20'+process['argv'][_0x99546e(0x1fc)](0x2)[_0x99546e(0x212)]('\x20'))[_0x99546e(0x1eb)]();logger[_0x99546e(0x210)](_0x7657f4);const {isNonInteractive:_0x55094b}=await import(_0x99546e(0x1e3)),_0x1ffddf=_0x55094b(_0x4197fd);return{'config':_0x1a4a42,'auth':_0x1bfe71,'logger':logger,'env':_0x95db03,'nonInteractive':_0x1ffddf};}export function buildConfigFromFlags(_0x3e3506){return buildConfig(readRawConfig(),_0x3e3506);}export function getProjectConfigPath(){const _0x1e8452=a91_0x1a9cc5;return resolveConfigPath(process[_0x1e8452(0x206)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x4d9b7c){const _0x4e457a=a91_0x1a9cc5;if(!existsSync(_0x4d9b7c))return{'status':_0x4e457a(0x21c)};try{const _0x5886eb=readFileSync(_0x4d9b7c,{'encoding':_0x4e457a(0x218)});if(!_0x5886eb?.['trim']())return{'status':_0x4e457a(0x1f4)};const _0x1a2afb=JSON[_0x4e457a(0x1d6)](_0x5886eb);return{'status':'ok','data':_0x1a2afb};}catch(_0x26e9cc){return{'status':_0x4e457a(0x220),'message':_0x26e9cc instanceof Error?_0x26e9cc[_0x4e457a(0x20b)]:String(_0x26e9cc)};}}function parseCliConfigJsonFile(_0x4f4c88,_0x2b6b2b,_0x39b622){const _0x59f9ad=a91_0x1a9cc5,_0x1c0f1a=inspectCliConfigJsonFile(_0x4f4c88);if(_0x1c0f1a[_0x59f9ad(0x214)]===_0x59f9ad(0x21c)||_0x1c0f1a[_0x59f9ad(0x214)]===_0x59f9ad(0x1f4))return{};if(_0x1c0f1a[_0x59f9ad(0x214)]==='ok')return _0x1c0f1a['data'];return _0x2b6b2b==='warn'&&_0x39b622&&console['error'](CLI_BIN_NAME+':\x20'+_0x39b622+_0x59f9ad(0x1dd)+_0x4f4c88+_0x59f9ad(0x1f9)+_0x1c0f1a[_0x59f9ad(0x20b)]),{};}export function loadRawConfigLayers(_0x4c1f26){const _0x146107=a91_0x1a9cc5;let _0x19c5c1={},_0x1b460e={};const _0x5d0358=resolveConfigPath(homedir());_0x5d0358&&(_0x19c5c1=parseCliConfigJsonFile(_0x5d0358,'warn',_0x146107(0x1ff)));const _0x4e2ea9=_0x4c1f26||process[_0x146107(0x206)](),_0x2da943=resolveConfigPath(_0x4e2ea9);return _0x2da943&&(_0x1b460e=parseCliConfigJsonFile(_0x2da943,_0x146107(0x1da),_0x146107(0x208))),{'globalPath':_0x5d0358,'projectPath':_0x2da943,'globalConfig':_0x19c5c1,'projectConfig':_0x1b460e};}function mergeRawConfigLayers(_0x10954b){const _0x3c4a51=a91_0x1a9cc5,{globalConfig:_0x147d49,projectConfig:_0x195a30}=_0x10954b,_0x6e811b=_0x147d49[_0x3c4a51(0x1d9)]&&typeof _0x147d49[_0x3c4a51(0x1d9)]===_0x3c4a51(0x20a)?_0x147d49[_0x3c4a51(0x1d9)]:{},_0xe26887=_0x195a30[_0x3c4a51(0x1d9)]&&typeof _0x195a30[_0x3c4a51(0x1d9)]==='object'?_0x195a30[_0x3c4a51(0x1d9)]:{},_0xab00d6={..._0x6e811b,..._0xe26887},_0x5786c9={..._0x147d49,..._0x195a30};Object['keys'](_0xab00d6)[_0x3c4a51(0x1e1)]>0x0&&(_0x5786c9['apps']=_0xab00d6);if(_0x3c4a51(0x1fd)in _0x195a30)_0x5786c9[_0x3c4a51(0x1fd)]=_0x195a30[_0x3c4a51(0x1fd)];else{if(_0xe26887&&Object[_0x3c4a51(0x207)](_0xe26887)[_0x3c4a51(0x1e1)]>0x0)_0x5786c9[_0x3c4a51(0x1fd)]=Object['keys'](_0xe26887)[0x0];else _0x147d49[_0x3c4a51(0x1fd)]&&(_0x5786c9[_0x3c4a51(0x1fd)]=_0x147d49['defaultApp']);}return _0x5786c9;}export function readRawConfigWithLayers(_0x299d21){const _0x32a257=loadRawConfigLayers(_0x299d21);return{'config':mergeRawConfigLayers(_0x32a257),'layers':_0x32a257};}export function readRawConfig(_0x5f0a78){return mergeRawConfigLayers(loadRawConfigLayers(_0x5f0a78));}export function readConfigFile(_0x339819){return parseCliConfigJsonFile(_0x339819,'silent');}export function writeConfigFile(_0x528747,_0x263c19){const _0x202ccd=a91_0x1a9cc5,_0x7be52f=dirname(_0x528747);!existsSync(_0x7be52f)&&mkdirSync(_0x7be52f,{'recursive':!![]});const _0x3cea3a=_0x528747+'.tmp';try{writeFileSync(_0x3cea3a,JSON[_0x202ccd(0x1f2)](_0x263c19,null,0x2)+'\x0a',{'encoding':_0x202ccd(0x218),'mode':0x180}),renameSync(_0x3cea3a,_0x528747);}catch(_0x242dce){try{unlinkSync(_0x3cea3a);}catch{}throw _0x242dce;}}export function resolveWriteConfigPath(_0x30bf3f){const _0x483394=a91_0x1a9cc5,_0x281de9=_0x30bf3f==='project'?process[_0x483394(0x206)]():homedir(),_0x9aee05=resolveConfigPath(_0x281de9);return _0x9aee05??resolve(_0x281de9,NEW_CONFIG_NAME);}function buildConfig(_0x5b7705,_0x574070){const _0x34c776=a91_0x1a9cc5,_0x448d5d={};if(_0x5b7705['apps']&&typeof _0x5b7705[_0x34c776(0x1d9)]===_0x34c776(0x20a))for(const [_0x5ac2e0,_0x47eab2]of Object['entries'](_0x5b7705[_0x34c776(0x1d9)])){_0x47eab2&&typeof _0x47eab2==='object'&&_0x47eab2['appcode']&&(_0x448d5d[_0x5ac2e0]=_0x47eab2);}const _0xf4563e=_0x5b7705[_0x34c776(0x1fd)]||undefined,_0x20f0e3=Object[_0x34c776(0x207)](_0x448d5d)[_0x34c776(0x1e1)]>0x0,_0x24d82d=_0x574070[_0x34c776(0x1d8)]||env(_0x34c776(0x1f0))||undefined,_0x55fce4=_0x24d82d||_0xf4563e||undefined,_0x17783d=_0x574070[_0x34c776(0x1f8)]||env(_0x34c776(0x209))||undefined,_0x11e64c=_0x17783d?Object[_0x34c776(0x1e8)](_0x448d5d)['find'](([,_0x57c693])=>_0x57c693?.[_0x34c776(0x1f8)]===_0x17783d):undefined,_0x5d621b=_0x11e64c?.[0x0],_0x1ee70f=_0x11e64c?.[0x1];let _0x1b6ae3=_0x17783d?_0x5d621b:_0x55fce4,_0x3e261d=_0x1b6ae3&&_0x448d5d[_0x1b6ae3]?_0x448d5d[_0x1b6ae3]:undefined;_0x17783d&&_0x1ee70f&&(_0x3e261d=_0x1ee70f);const _0x3d9602=_0x17783d?_0x1ee70f??_0x3e261d:_0x3e261d,_0x581f41=_0x24d82d||(_0x17783d?_0x5d621b:undefined),_0x351adb=_0x17783d||_0x3d9602?.[_0x34c776(0x1f8)]||_0x5b7705['appcode']||_0x5b7705[_0x34c776(0x1d8)]||undefined,_0x3d18cc=_0x574070[_0x34c776(0x217)]||env('ENV')||_0x3d9602?.['env']||_0x5b7705[_0x34c776(0x217)]||_0x34c776(0x1fb),_0x340237=_0x3d9602?.['locale']||_0x5b7705[_0x34c776(0x1f1)]||_0x34c776(0x1d5),_0x382241=env(_0x34c776(0x20e))||_0x3d9602?.[_0x34c776(0x1db)]||_0x5b7705[_0x34c776(0x1db)]||undefined,_0x2a5c7a=env(_0x34c776(0x204))||_0x3d9602?.[_0x34c776(0x1d7)]||_0x5b7705[_0x34c776(0x1d7)]||undefined,_0x3b8cfa=_0x574070[_0x34c776(0x21b)]||env('FORMAT')||_0x3d9602?.[_0x34c776(0x21b)]||_0x5b7705[_0x34c776(0x21b)],_0x39599a=normalizeLegacyOutputFormat(_0x3b8cfa),_0x542fc6=env(_0x34c776(0x1fa))||_0x3d9602?.[_0x34c776(0x1ef)]||_0x5b7705[_0x34c776(0x1ef)],_0x4982b8=_0x542fc6?Number(_0x542fc6)||undefined:undefined,_0x37b802=env(_0x34c776(0x201))||env(_0x34c776(0x20d))||_0x3d9602?.[_0x34c776(0x200)]||_0x5b7705[_0x34c776(0x200)]||_0x5b7705[_0x34c776(0x211)],_0x23103d=_0x37b802===_0x34c776(0x1e6)||_0x37b802===_0x34c776(0x1ea)?_0x37b802:_0x34c776(0x213),_0x235f49=env(_0x34c776(0x21d)),_0x5af83d=_0x235f49==='1'||_0x235f49===_0x34c776(0x20f),_0x3bd942=_0x3d9602?.[_0x34c776(0x1f5)]||_0x5b7705[_0x34c776(0x1f5)]||DEFAULT_API_DIR;return{'appCode':typeof _0x351adb===_0x34c776(0x219)&&_0x351adb[_0x34c776(0x1eb)]()?_0x351adb[_0x34c776(0x1eb)]():undefined,'env':_0x3d18cc===_0x34c776(0x21a)?_0x34c776(0x1fb):_0x3d18cc==='daily'?_0x34c776(0x21f):_0x34c776(0x1fb),'locale':_0x340237,'cookie':_0x382241,'accessKey':_0x2a5c7a,'format':_0x39599a,'pageSize':_0x4982b8,'riskLevel':_0x23103d,'verbose':_0x5af83d,'apiDir':_0x3bd942,'apps':_0x448d5d,'defaultApp':_0xf4563e,'currentApp':_0x20f0e3?_0x1b6ae3:undefined,'explicitAppName':_0x581f41,'raw':_0x5b7705};}async function buildAuth(_0x2cbe7d){const _0x3b1cbe=a91_0x1a9cc5,{getCookie:_0x58dab7}=await import(_0x3b1cbe(0x203)),_0x535087=_0x2cbe7d[_0x3b1cbe(0x1db)]||_0x58dab7(),_0x4f61d2=_0x535087?await getIsSessionValid():![];return{'cookie':_0x535087,'isLoggedIn':_0x4f61d2,async 'getOrLogin'(){const _0x123a0e=_0x3b1cbe;if(_0x535087&&_0x4f61d2)return _0x535087;throw CliErrors[_0x123a0e(0x1ed)]();}};}export function resolveApiFilePath(_0x286386,_0x20ce95){const _0xa360d5=a91_0x1a9cc5,_0x38ac02=resolve(process[_0xa360d5(0x206)](),_0x286386),_0x1057d0=resolve(_0x38ac02,_0xa360d5(0x1ee));if(!_0x20ce95)return _0x1057d0;const _0x45747d=readRawConfig(),_0x53eb07=_0x45747d[_0xa360d5(0x1d9)]&&typeof _0x45747d[_0xa360d5(0x1d9)]==='object'?_0x45747d[_0xa360d5(0x1d9)]:{},_0x43a619=Object['entries'](_0x53eb07)[_0xa360d5(0x1e7)](([,_0x4f9367])=>_0x4f9367?.[_0xa360d5(0x1f8)]===_0x20ce95);if(!_0x43a619)return _0x1057d0;const [_0x7c779d,_0x37095f]=_0x43a619,_0x5c9b5b=typeof _0x45747d['defaultApp']===_0xa360d5(0x219)?_0x45747d[_0xa360d5(0x1fd)]:undefined;if(_0x37095f?.[_0xa360d5(0x1f5)])return _0x1057d0;if(_0x5c9b5b&&_0x7c779d!==_0x5c9b5b)return resolve(_0x38ac02,_0x7c779d+_0xa360d5(0x21e));return _0x1057d0;}
1
+ const a91_0x50add3=a91_0x2cf3;(function(_0x2f75b7,_0x50c86f){const _0x121bf3=a91_0x2cf3,_0x4cc0cc=_0x2f75b7();while(!![]){try{const _0x2a33c0=-parseInt(_0x121bf3(0x205))/0x1+-parseInt(_0x121bf3(0x234))/0x2+-parseInt(_0x121bf3(0x22e))/0x3*(-parseInt(_0x121bf3(0x216))/0x4)+-parseInt(_0x121bf3(0x220))/0x5*(-parseInt(_0x121bf3(0x206))/0x6)+parseInt(_0x121bf3(0x22b))/0x7*(parseInt(_0x121bf3(0x1f5))/0x8)+parseInt(_0x121bf3(0x200))/0x9+parseInt(_0x121bf3(0x212))/0xa*(-parseInt(_0x121bf3(0x1f7))/0xb);if(_0x2a33c0===_0x50c86f)break;else _0x4cc0cc['push'](_0x4cc0cc['shift']());}catch(_0x128734){_0x4cc0cc['push'](_0x4cc0cc['shift']());}}}(a91_0x1358,0x46457));import{readFileSync,writeFileSync,existsSync,mkdirSync,renameSync,unlinkSync}from'node:fs';import{resolve,dirname}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';function a91_0x1358(){const _0x28f506=['setLogPath','project','warn','1422065cUXwEC','.lovrabet.json','find','high-risk-write','read','utf8','\x0a\x20\x20','cookie','format','write','en-US','1770167khMMpb','./auth/get-cookie.js','ACCESS_KEY','209847trSiWH','PAGE_SIZE','accessKey','daily','riskLevel','object','1096562IZbVhb','.rabetbase.json','-api.ts','env','./constant/env.js','Global','cwd','MAX_RISK','COOKIE','VERBOSE','production','silent','appcode','16deyeDZ','apiDir','197571OawQTs','missing','keys','locale','userDomain','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','pageSize','length','true','2843136AgOvHr','slice','apps','filter','api.ts','476024vcwryw','6fNntXc','app','.tmp','ENV','error','join','stringify','RISK_LEVEL','empty','defaultApp','Project','data','80bybUHe','trim','./utils/is-non-interactive.js','entries','20julCgm','string','authRequired','message','online','runtimeDomain','APPCODE'];a91_0x1358=function(){return _0x28f506;};return a91_0x1358();}import{DEFAULT_API_DIR}from'./constant/paths.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';function env(_0x40b51b){return process.env[`RABETBASE_${_0x40b51b}`]||process.env[`LOVRABET_${_0x40b51b}`]||undefined;}export const NEW_CONFIG_NAME=a91_0x50add3(0x235);export const CONFIG_NAMES=['.rabetbase.json',a91_0x50add3(0x221),'.lovrabetrc'];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a91_0x50add3(0x203)](_0xe53972=>_0xe53972!==NEW_CONFIG_NAME);export function resolveConfigPath(_0x40a6a6){for(const _0x5c5dc4 of CONFIG_NAMES){const _0x31b807=resolve(_0x40a6a6,_0x5c5dc4);if(existsSync(_0x31b807))return _0x31b807;}return undefined;}export async function createContext(_0x1e9aa9){const _0x4bb9a7=a91_0x50add3,_0x19c09c=readRawConfig(),_0x54e8b5=buildConfig(_0x19c09c,_0x1e9aa9),{initEnv:_0x51298d}=await import(_0x4bb9a7(0x1ec));if(_0x54e8b5[_0x4bb9a7(0x1eb)])_0x51298d(_0x54e8b5['env']);else _0x1e9aa9[_0x4bb9a7(0x1eb)]&&typeof _0x1e9aa9[_0x4bb9a7(0x1eb)]==='string'&&_0x51298d(_0x1e9aa9[_0x4bb9a7(0x1eb)]);const {initDomains:_0x779c96,getUserDomain:_0x3311d4,getApiDomain:_0x2e9929}=await import('./constant/domain.js');_0x779c96({'apiDomain':_0x19c09c['apiDomain']||undefined,'userDomain':_0x19c09c[_0x4bb9a7(0x1fb)]||undefined,'runtimeDomain':_0x19c09c[_0x4bb9a7(0x21b)]||undefined});const _0x393e27={'apiDomain':_0x2e9929(),'userDomain':_0x3311d4()},_0x543258=await buildAuth(_0x54e8b5);logger[_0x4bb9a7(0x21d)](process['cwd']());const _0x346833=(CLI_BIN_NAME+'\x20'+process['argv'][_0x4bb9a7(0x201)](0x2)[_0x4bb9a7(0x20b)]('\x20'))[_0x4bb9a7(0x213)]();logger['setRawCommand'](_0x346833);const {isNonInteractive:_0x393d98}=await import(_0x4bb9a7(0x214)),_0x2da333=_0x393d98(_0x1e9aa9);return{'config':_0x54e8b5,'auth':_0x543258,'logger':logger,'env':_0x393e27,'nonInteractive':_0x2da333};}export function buildConfigFromFlags(_0x34ea80){return buildConfig(readRawConfig(),_0x34ea80);}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}function a91_0x2cf3(_0x3f1f2c,_0x54ccec){_0x3f1f2c=_0x3f1f2c-0x1ea;const _0x1358a5=a91_0x1358();let _0x2cf325=_0x1358a5[_0x3f1f2c];return _0x2cf325;}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x3cf7b2){const _0xfd8e74=a91_0x50add3;if(!existsSync(_0x3cf7b2))return{'status':_0xfd8e74(0x1f8)};try{const _0x59887c=readFileSync(_0x3cf7b2,{'encoding':'utf8'});if(!_0x59887c?.[_0xfd8e74(0x213)]())return{'status':'empty'};const _0x5e69ea=JSON['parse'](_0x59887c);return{'status':'ok','data':_0x5e69ea};}catch(_0x4b6afa){return{'status':_0xfd8e74(0x20a),'message':_0x4b6afa instanceof Error?_0x4b6afa['message']:String(_0x4b6afa)};}}function parseCliConfigJsonFile(_0x361ee7,_0x18e652,_0x274f20){const _0x310e6a=a91_0x50add3,_0x361eae=inspectCliConfigJsonFile(_0x361ee7);if(_0x361eae['status']===_0x310e6a(0x1f8)||_0x361eae['status']===_0x310e6a(0x20e))return{};if(_0x361eae['status']==='ok')return _0x361eae[_0x310e6a(0x211)];return _0x18e652===_0x310e6a(0x21f)&&_0x274f20&&console['error'](CLI_BIN_NAME+':\x20'+_0x274f20+_0x310e6a(0x1fc)+_0x361ee7+_0x310e6a(0x226)+_0x361eae[_0x310e6a(0x219)]),{};}export function loadRawConfigLayers(_0x5cf02a){const _0x8c768d=a91_0x50add3;let _0x1f0dd1={},_0x3b9460={};const _0x55a439=resolveConfigPath(homedir());_0x55a439&&(_0x1f0dd1=parseCliConfigJsonFile(_0x55a439,_0x8c768d(0x21f),_0x8c768d(0x1ed)));const _0x3f291a=_0x5cf02a||process[_0x8c768d(0x1ee)](),_0x5407ad=resolveConfigPath(_0x3f291a);return _0x5407ad&&(_0x3b9460=parseCliConfigJsonFile(_0x5407ad,'warn',_0x8c768d(0x210))),{'globalPath':_0x55a439,'projectPath':_0x5407ad,'globalConfig':_0x1f0dd1,'projectConfig':_0x3b9460};}function mergeRawConfigLayers(_0x663a0d){const _0x301e14=a91_0x50add3,{globalConfig:_0x775a98,projectConfig:_0x23f1e7}=_0x663a0d,_0x5c747b=_0x775a98[_0x301e14(0x202)]&&typeof _0x775a98[_0x301e14(0x202)]===_0x301e14(0x233)?_0x775a98[_0x301e14(0x202)]:{},_0x1ea6b9=_0x23f1e7['apps']&&typeof _0x23f1e7[_0x301e14(0x202)]===_0x301e14(0x233)?_0x23f1e7[_0x301e14(0x202)]:{},_0x108d7b={..._0x5c747b,..._0x1ea6b9},_0x56cec8={..._0x775a98,..._0x23f1e7};Object[_0x301e14(0x1f9)](_0x108d7b)[_0x301e14(0x1fe)]>0x0&&(_0x56cec8[_0x301e14(0x202)]=_0x108d7b);if(_0x301e14(0x20f)in _0x23f1e7)_0x56cec8['defaultApp']=_0x23f1e7[_0x301e14(0x20f)];else{if(_0x1ea6b9&&Object[_0x301e14(0x1f9)](_0x1ea6b9)[_0x301e14(0x1fe)]>0x0)_0x56cec8['defaultApp']=Object[_0x301e14(0x1f9)](_0x1ea6b9)[0x0];else _0x775a98['defaultApp']&&(_0x56cec8[_0x301e14(0x20f)]=_0x775a98[_0x301e14(0x20f)]);}return _0x56cec8;}export function readRawConfigWithLayers(_0x41e480){const _0x286f4c=loadRawConfigLayers(_0x41e480);return{'config':mergeRawConfigLayers(_0x286f4c),'layers':_0x286f4c};}export function readRawConfig(_0x29d221){return mergeRawConfigLayers(loadRawConfigLayers(_0x29d221));}export function readConfigFile(_0x3e75da){const _0x357559=a91_0x50add3;return parseCliConfigJsonFile(_0x3e75da,_0x357559(0x1f3));}export function writeConfigFile(_0x57b40b,_0x3b111f){const _0x3914b0=a91_0x50add3,_0x1520e4=dirname(_0x57b40b);!existsSync(_0x1520e4)&&mkdirSync(_0x1520e4,{'recursive':!![]});const _0x3d18da=_0x57b40b+_0x3914b0(0x208);try{writeFileSync(_0x3d18da,JSON[_0x3914b0(0x20c)](_0x3b111f,null,0x2)+'\x0a',{'encoding':_0x3914b0(0x225),'mode':0x180}),renameSync(_0x3d18da,_0x57b40b);}catch(_0x4a6199){try{unlinkSync(_0x3d18da);}catch{}throw _0x4a6199;}}export function resolveWriteConfigPath(_0xd66ccb){const _0x2d4b24=a91_0x50add3,_0x4ddee2=_0xd66ccb===_0x2d4b24(0x21e)?process[_0x2d4b24(0x1ee)]():homedir(),_0x37b99c=resolveConfigPath(_0x4ddee2);return _0x37b99c??resolve(_0x4ddee2,NEW_CONFIG_NAME);}function buildConfig(_0x4e0753,_0x1beabb){const _0x4cb7a4=a91_0x50add3,_0x4e3c18={};if(_0x4e0753[_0x4cb7a4(0x202)]&&typeof _0x4e0753[_0x4cb7a4(0x202)]===_0x4cb7a4(0x233))for(const [_0x1d41d3,_0xd6015c]of Object['entries'](_0x4e0753[_0x4cb7a4(0x202)])){_0xd6015c&&typeof _0xd6015c==='object'&&_0xd6015c['appcode']&&(_0x4e3c18[_0x1d41d3]=_0xd6015c);}const _0x5c7b2b=_0x4e0753[_0x4cb7a4(0x20f)]||undefined,_0x14775d=Object[_0x4cb7a4(0x1f9)](_0x4e3c18)['length']>0x0,_0x7c623c=_0x1beabb[_0x4cb7a4(0x207)]||env('APP')||undefined,_0x513390=_0x7c623c||_0x5c7b2b||undefined,_0x50cc51=_0x1beabb['appcode']||env(_0x4cb7a4(0x21c))||undefined,_0x191bf5=_0x50cc51?Object[_0x4cb7a4(0x215)](_0x4e3c18)['find'](([,_0x43d684])=>_0x43d684?.[_0x4cb7a4(0x1f4)]===_0x50cc51):undefined,_0x318ca4=_0x191bf5?.[0x0],_0x52d6a8=_0x191bf5?.[0x1];let _0x791d8f=_0x50cc51?_0x318ca4:_0x513390,_0x5d03b3=_0x791d8f&&_0x4e3c18[_0x791d8f]?_0x4e3c18[_0x791d8f]:undefined;_0x50cc51&&_0x52d6a8&&(_0x5d03b3=_0x52d6a8);const _0x53dd0a=_0x50cc51?_0x52d6a8??_0x5d03b3:_0x5d03b3,_0x4809e1=_0x7c623c||(_0x50cc51?_0x318ca4:undefined),_0x546ee5=_0x50cc51||_0x53dd0a?.['appcode']||_0x4e0753[_0x4cb7a4(0x1f4)]||_0x4e0753[_0x4cb7a4(0x207)]||undefined,_0x23e888=_0x1beabb[_0x4cb7a4(0x1eb)]||env(_0x4cb7a4(0x209))||_0x53dd0a?.[_0x4cb7a4(0x1eb)]||_0x4e0753[_0x4cb7a4(0x1eb)]||_0x4cb7a4(0x1f2),_0x1880e8=_0x53dd0a?.[_0x4cb7a4(0x1fa)]||_0x4e0753[_0x4cb7a4(0x1fa)]||_0x4cb7a4(0x22a),_0x45a84b=env(_0x4cb7a4(0x1f0))||_0x53dd0a?.['cookie']||_0x4e0753['cookie']||undefined,_0x42c441=env(_0x4cb7a4(0x22d))||_0x53dd0a?.[_0x4cb7a4(0x230)]||_0x4e0753[_0x4cb7a4(0x230)]||undefined,_0x41c28e=_0x1beabb[_0x4cb7a4(0x228)]||env('FORMAT')||_0x53dd0a?.[_0x4cb7a4(0x228)]||_0x4e0753[_0x4cb7a4(0x228)],_0x445103=normalizeLegacyOutputFormat(_0x41c28e),_0xa0f192=env(_0x4cb7a4(0x22f))||_0x53dd0a?.[_0x4cb7a4(0x1fd)]||_0x4e0753['pageSize'],_0x53d9ac=_0xa0f192?Number(_0xa0f192)||undefined:undefined,_0x31c230=env(_0x4cb7a4(0x20d))||env(_0x4cb7a4(0x1ef))||_0x53dd0a?.['riskLevel']||_0x4e0753[_0x4cb7a4(0x232)]||_0x4e0753['maxRisk'],_0x105c97=_0x31c230===_0x4cb7a4(0x224)||_0x31c230===_0x4cb7a4(0x229)?_0x31c230:_0x4cb7a4(0x223),_0x2a759f=env(_0x4cb7a4(0x1f1)),_0x2c7e06=_0x2a759f==='1'||_0x2a759f===_0x4cb7a4(0x1ff),_0x885e8=_0x53dd0a?.[_0x4cb7a4(0x1f6)]||_0x4e0753[_0x4cb7a4(0x1f6)]||DEFAULT_API_DIR;return{'appCode':typeof _0x546ee5===_0x4cb7a4(0x217)&&_0x546ee5[_0x4cb7a4(0x213)]()?_0x546ee5[_0x4cb7a4(0x213)]():undefined,'env':_0x23e888===_0x4cb7a4(0x21a)?_0x4cb7a4(0x1f2):_0x23e888===_0x4cb7a4(0x231)?_0x4cb7a4(0x231):'production','locale':_0x1880e8,'cookie':_0x45a84b,'accessKey':_0x42c441,'format':_0x445103,'pageSize':_0x53d9ac,'riskLevel':_0x105c97,'verbose':_0x2c7e06,'apiDir':_0x885e8,'apps':_0x4e3c18,'defaultApp':_0x5c7b2b,'currentApp':_0x14775d?_0x791d8f:undefined,'explicitAppName':_0x4809e1,'raw':_0x4e0753};}async function buildAuth(_0x207b2c){const _0x1c8ac0=a91_0x50add3,{getCookie:_0x33e985}=await import(_0x1c8ac0(0x22c)),_0x26ab3f=_0x207b2c[_0x1c8ac0(0x227)]||_0x33e985(),_0x3d8679=_0x26ab3f?await getIsSessionValid():![];return{'cookie':_0x26ab3f,'isLoggedIn':_0x3d8679,async 'getOrLogin'(){const _0x495ab9=_0x1c8ac0;if(_0x26ab3f&&_0x3d8679)return _0x26ab3f;throw CliErrors[_0x495ab9(0x218)]();}};}export function resolveApiFilePath(_0x4187e2,_0x38e08d){const _0xdb3f6d=a91_0x50add3,_0x244825=resolve(process[_0xdb3f6d(0x1ee)](),_0x4187e2),_0x267c03=resolve(_0x244825,_0xdb3f6d(0x204));if(!_0x38e08d)return _0x267c03;const _0x37ccb9=readRawConfig(),_0xe1d64e=_0x37ccb9['apps']&&typeof _0x37ccb9['apps']==='object'?_0x37ccb9[_0xdb3f6d(0x202)]:{},_0x1f32b8=Object[_0xdb3f6d(0x215)](_0xe1d64e)[_0xdb3f6d(0x222)](([,_0x38463f])=>_0x38463f?.[_0xdb3f6d(0x1f4)]===_0x38e08d);if(!_0x1f32b8)return _0x267c03;const [_0x53c235,_0x2687a9]=_0x1f32b8,_0x933e2e=typeof _0x37ccb9[_0xdb3f6d(0x20f)]==='string'?_0x37ccb9[_0xdb3f6d(0x20f)]:undefined;if(_0x2687a9?.[_0xdb3f6d(0x1f6)])return _0x267c03;if(_0x933e2e&&_0x53c235!==_0x933e2e)return resolve(_0x244825,_0x53c235+_0xdb3f6d(0x1ea));return _0x267c03;}
@@ -1 +1 @@
1
- (function(_0x2b8f24,_0x2ac2e1){const _0x54dce2=a92_0x55da,_0x3ef6b6=_0x2b8f24();while(!![]){try{const _0xf06869=parseInt(_0x54dce2(0x91))/0x1*(-parseInt(_0x54dce2(0x8e))/0x2)+-parseInt(_0x54dce2(0x9a))/0x3*(parseInt(_0x54dce2(0x95))/0x4)+-parseInt(_0x54dce2(0x9b))/0x5+-parseInt(_0x54dce2(0x8f))/0x6*(-parseInt(_0x54dce2(0x96))/0x7)+parseInt(_0x54dce2(0x8a))/0x8+parseInt(_0x54dce2(0x87))/0x9*(-parseInt(_0x54dce2(0x99))/0xa)+parseInt(_0x54dce2(0x98))/0xb*(parseInt(_0x54dce2(0x9c))/0xc);if(_0xf06869===_0x2ac2e1)break;else _0x3ef6b6['push'](_0x3ef6b6['shift']());}catch(_0x271ff2){_0x3ef6b6['push'](_0x3ef6b6['shift']());}}}(a92_0x1361,0x92093));import{readFileSync,existsSync}from'node:fs';function a92_0x55da(_0x4dfb23,_0xae9f86){_0x4dfb23=_0x4dfb23-0x86;const _0x13616e=a92_0x1361();let _0x55daec=_0x13616e[_0x4dfb23];return _0x55daec;}import{resolve}from'node:path';const cache=new Map();function a92_0x1361(){const _0x4d5a3b=['99024XvMwmB','cwd','12239nscuyw','set','find','datasetCode','8mvPHnn','56maLsmi','utf-8','95689vxsoPs','6911690kqxkzo','106374kiGMGJ','1009850VeHcUG','2292fkNHhU','push','9xmbMPl','alias','exec','5590728LAHSTe','has','api.ts','get','152dDCLTX'];a92_0x1361=function(){return _0x4d5a3b;};return a92_0x1361();}function parseApiFile(_0x34c291){const _0x559565=a92_0x55da,_0x555be1=[],_0x3d9b74=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x1d8c93;while((_0x1d8c93=_0x3d9b74[_0x559565(0x89)](_0x34c291))!==null){_0x555be1[_0x559565(0x86)]({'datasetCode':_0x1d8c93[0x1],'tableName':_0x1d8c93[0x2],'name':_0x1d8c93[0x3],'alias':_0x1d8c93[0x4]});}return _0x555be1;}export function loadAliasMap(_0x40d085,_0x223820,_0x3bf9e5){const _0x779711=a92_0x55da,_0x2ae0a5=_0x3bf9e5??resolve(process[_0x779711(0x90)](),_0x40d085,_0x779711(0x8c));if(cache[_0x779711(0x8b)](_0x2ae0a5))return cache[_0x779711(0x8d)](_0x2ae0a5);if(!existsSync(_0x2ae0a5))return cache['set'](_0x2ae0a5,[]),[];try{const _0x301451=readFileSync(_0x2ae0a5,_0x779711(0x97)),_0x15810d=parseApiFile(_0x301451);return cache[_0x779711(0x92)](_0x2ae0a5,_0x15810d),_0x15810d;}catch{return cache[_0x779711(0x92)](_0x2ae0a5,[]),[];}}export function resolveAlias(_0x5fdae5,_0x1e3dc4,_0x135bc7,_0x3a051c){const _0x56da93=a92_0x55da;if(!_0x1e3dc4)return undefined;const _0x3a08dc=loadAliasMap(_0x5fdae5,_0x135bc7,_0x3a051c),_0x1c2e4a=_0x3a08dc[_0x56da93(0x93)](_0xfbf145=>_0xfbf145[_0x56da93(0x88)]===_0x1e3dc4);return _0x1c2e4a?.[_0x56da93(0x94)];}export function listAliases(_0x2f3c57,_0x2e8ea0,_0x5852cb){return loadAliasMap(_0x2f3c57,_0x2e8ea0,_0x5852cb);}
1
+ (function(_0x14827f,_0x5af67b){const _0x574ec7=a92_0x301c,_0x86010=_0x14827f();while(!![]){try{const _0x24e88e=parseInt(_0x574ec7(0x74))/0x1*(parseInt(_0x574ec7(0x7e))/0x2)+-parseInt(_0x574ec7(0x80))/0x3*(parseInt(_0x574ec7(0x79))/0x4)+parseInt(_0x574ec7(0x73))/0x5*(parseInt(_0x574ec7(0x7b))/0x6)+parseInt(_0x574ec7(0x76))/0x7*(-parseInt(_0x574ec7(0x77))/0x8)+-parseInt(_0x574ec7(0x7a))/0x9+parseInt(_0x574ec7(0x7c))/0xa*(parseInt(_0x574ec7(0x82))/0xb)+-parseInt(_0x574ec7(0x6f))/0xc*(-parseInt(_0x574ec7(0x72))/0xd);if(_0x24e88e===_0x5af67b)break;else _0x86010['push'](_0x86010['shift']());}catch(_0x42cb88){_0x86010['push'](_0x86010['shift']());}}}(a92_0x4981,0xd3cbe));function a92_0x4981(){const _0x2579d0=['set','21518tphPyV','3816rdiSdH','cwd','36ELgyYh','14643963pXfMUh','1668vnQXAP','2606980IXdXwJ','api.ts','10DNwIgF','datasetCode','30153Omnlyy','alias','33gTXbhi','find','60BMgizp','has','exec','1709461pOBEAB','17705RGRcxv','325481cpHyUs'];a92_0x4981=function(){return _0x2579d0;};return a92_0x4981();}import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';const cache=new Map();function parseApiFile(_0x47b287){const _0x47faf3=a92_0x301c,_0x4c4c1a=[],_0x2d6be2=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x31b85e;while((_0x31b85e=_0x2d6be2[_0x47faf3(0x71)](_0x47b287))!==null){_0x4c4c1a['push']({'datasetCode':_0x31b85e[0x1],'tableName':_0x31b85e[0x2],'name':_0x31b85e[0x3],'alias':_0x31b85e[0x4]});}return _0x4c4c1a;}function a92_0x301c(_0x45341c,_0x54c0f7){_0x45341c=_0x45341c-0x6e;const _0x498115=a92_0x4981();let _0x301c9c=_0x498115[_0x45341c];return _0x301c9c;}export function loadAliasMap(_0x5ed398,_0x3d9ed1,_0x5748fb){const _0x57924e=a92_0x301c,_0xbee92e=_0x5748fb??resolve(process[_0x57924e(0x78)](),_0x5ed398,_0x57924e(0x7d));if(cache[_0x57924e(0x70)](_0xbee92e))return cache['get'](_0xbee92e);if(!existsSync(_0xbee92e))return cache[_0x57924e(0x75)](_0xbee92e,[]),[];try{const _0x367fef=readFileSync(_0xbee92e,'utf-8'),_0x277d2c=parseApiFile(_0x367fef);return cache[_0x57924e(0x75)](_0xbee92e,_0x277d2c),_0x277d2c;}catch{return cache['set'](_0xbee92e,[]),[];}}export function resolveAlias(_0x2064ea,_0x39465e,_0x3433d1,_0x4c7d02){const _0x42557a=a92_0x301c;if(!_0x39465e)return undefined;const _0xd82907=loadAliasMap(_0x2064ea,_0x3433d1,_0x4c7d02),_0x151240=_0xd82907[_0x42557a(0x6e)](_0xc878e5=>_0xc878e5[_0x42557a(0x81)]===_0x39465e);return _0x151240?.[_0x42557a(0x7f)];}export function listAliases(_0x4091fe,_0x6f2005,_0xae1c6d){return loadAliasMap(_0x4091fe,_0x6f2005,_0xae1c6d);}