@lovrabet/rabetbase-cli 2.1.2-beta.0 → 2.1.2-beta.1

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 (160) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/discover.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app/use.js +1 -1
  26. package/lib/commands/auth/index.js +1 -1
  27. package/lib/commands/bff/delete.js +1 -1
  28. package/lib/commands/bff/detail.js +1 -1
  29. package/lib/commands/bff/index.js +1 -1
  30. package/lib/commands/bff/list.js +1 -1
  31. package/lib/commands/bff/new.js +1 -1
  32. package/lib/commands/bff/pull.js +1 -1
  33. package/lib/commands/bff/push.js +1 -1
  34. package/lib/commands/bff/status.js +1 -1
  35. package/lib/commands/cli-update.js +1 -1
  36. package/lib/commands/codegen/index.js +1 -1
  37. package/lib/commands/codegen/sdk.js +1 -1
  38. package/lib/commands/codegen/sql.js +1 -1
  39. package/lib/commands/common/app-selector.js +1 -1
  40. package/lib/commands/common/flags.js +1 -1
  41. package/lib/commands/common/validate.js +1 -1
  42. package/lib/commands/config/get.js +1 -1
  43. package/lib/commands/config/index.js +1 -1
  44. package/lib/commands/config/list.js +1 -1
  45. package/lib/commands/config/set.js +1 -1
  46. package/lib/commands/config/shared.js +1 -1
  47. package/lib/commands/dataset/detail.js +1 -1
  48. package/lib/commands/dataset/index.js +1 -1
  49. package/lib/commands/dataset/links.js +1 -1
  50. package/lib/commands/dataset/list.js +1 -1
  51. package/lib/commands/dataset/operations.js +1 -1
  52. package/lib/commands/db/analyze-cancel.js +1 -1
  53. package/lib/commands/db/analyze-start.js +1 -1
  54. package/lib/commands/db/analyze-status.js +1 -1
  55. package/lib/commands/db/create.js +1 -1
  56. package/lib/commands/db/delete.js +1 -1
  57. package/lib/commands/db/detail.js +1 -1
  58. package/lib/commands/db/diff.js +1 -1
  59. package/lib/commands/db/index.js +1 -1
  60. package/lib/commands/db/list.js +1 -1
  61. package/lib/commands/db/shared.js +1 -1
  62. package/lib/commands/db/tables.js +1 -1
  63. package/lib/commands/db/test.js +1 -1
  64. package/lib/commands/db/update.js +1 -1
  65. package/lib/commands/doctor.js +1 -1
  66. package/lib/commands/init/index.js +1 -1
  67. package/lib/commands/logs/index.js +1 -1
  68. package/lib/commands/menu/index.js +1 -1
  69. package/lib/commands/menu/shared/compare-table.js +1 -1
  70. package/lib/commands/menu/shared/index.js +1 -1
  71. package/lib/commands/menu/shared/inquirer.js +1 -1
  72. package/lib/commands/menu/shared/local-pages.js +1 -1
  73. package/lib/commands/menu/shared/logic.js +1 -1
  74. package/lib/commands/menu/shared/service.js +1 -1
  75. package/lib/commands/menu/shared/sync-core.js +1 -1
  76. package/lib/commands/menu/shared/update-core.js +1 -1
  77. package/lib/commands/menu/shared/valid-url.js +1 -1
  78. package/lib/commands/menu/sync.js +1 -1
  79. package/lib/commands/menu/update.js +1 -1
  80. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  81. package/lib/commands/project/create/format-elapsed.js +1 -1
  82. package/lib/commands/project/create/main.js +1 -1
  83. package/lib/commands/project/create/non-interactive.js +1 -1
  84. package/lib/commands/project/create/project-template-path.js +1 -1
  85. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  86. package/lib/commands/project/create/use-format-code.js +1 -1
  87. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  88. package/lib/commands/project/index.js +1 -1
  89. package/lib/commands/project/init.js +1 -1
  90. package/lib/commands/project/upgrade.js +1 -1
  91. package/lib/commands/registry.js +1 -1
  92. package/lib/commands/run/index.js +1 -1
  93. package/lib/commands/schema.js +1 -1
  94. package/lib/commands/skill/index.js +1 -1
  95. package/lib/commands/sql/detail.js +1 -1
  96. package/lib/commands/sql/exec.js +1 -1
  97. package/lib/commands/sql/index.js +1 -1
  98. package/lib/commands/sql/list.js +1 -1
  99. package/lib/commands/sql/pull.js +1 -1
  100. package/lib/commands/sql/save.js +1 -1
  101. package/lib/commands/sql/shared.js +1 -1
  102. package/lib/commands/sql/validate.js +1 -1
  103. package/lib/config/schema.js +1 -1
  104. package/lib/constant/cli.js +1 -1
  105. package/lib/constant/defaults.js +1 -1
  106. package/lib/constant/domain.js +1 -1
  107. package/lib/constant/env.js +1 -1
  108. package/lib/constant/output.js +1 -1
  109. package/lib/constant/paths.js +1 -1
  110. package/lib/constant/risk.js +1 -1
  111. package/lib/context.js +1 -1
  112. package/lib/core/alias-resolver.js +1 -1
  113. package/lib/core/api-client.js +1 -1
  114. package/lib/core/bff/config.js +1 -1
  115. package/lib/core/bff/file-system.js +1 -1
  116. package/lib/core/bff/hash.js +1 -1
  117. package/lib/core/bff/lock.js +1 -1
  118. package/lib/core/bff/utils.js +1 -1
  119. package/lib/core/db-resolver.js +1 -1
  120. package/lib/core/sql-validator.js +1 -1
  121. package/lib/errors.js +1 -1
  122. package/lib/framework/build-all-flags.js +1 -1
  123. package/lib/framework/flags.js +1 -1
  124. package/lib/framework/help.js +1 -1
  125. package/lib/framework/index.js +1 -1
  126. package/lib/framework/output.js +1 -1
  127. package/lib/framework/response.js +1 -1
  128. package/lib/framework/runner-alias.js +1 -1
  129. package/lib/framework/runner.js +1 -1
  130. package/lib/framework/schema-export.js +1 -1
  131. package/lib/framework/types.js +1 -1
  132. package/lib/generated/build-info.js +1 -1
  133. package/lib/help.js +1 -1
  134. package/lib/skills/main.js +1 -1
  135. package/lib/skills/npx-skills-add.js +1 -1
  136. package/lib/telemetry/cli-command-trace.js +1 -1
  137. package/lib/telemetry/cli-help-trace.js +1 -1
  138. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  139. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  140. package/lib/telemetry/send-cli-trace-log.js +1 -1
  141. package/lib/utils/ai_config.js +1 -1
  142. package/lib/utils/apply-jq-filter.js +1 -1
  143. package/lib/utils/cdn-config.js +1 -1
  144. package/lib/utils/check-sdk-version.js +1 -1
  145. package/lib/utils/cli-version-check.js +1 -1
  146. package/lib/utils/config.js +1 -1
  147. package/lib/utils/copy-directory.js +1 -1
  148. package/lib/utils/file-utils.js +1 -1
  149. package/lib/utils/guides-cdn.js +1 -1
  150. package/lib/utils/http-client.js +1 -1
  151. package/lib/utils/is-non-interactive.js +1 -1
  152. package/lib/utils/logger.js +1 -1
  153. package/lib/utils/platform.js +1 -1
  154. package/lib/utils/rules-cdn.js +1 -1
  155. package/lib/utils/sleep.js +1 -1
  156. package/lib/utils/template-replacer.js +1 -1
  157. package/lib/utils/version.js +1 -1
  158. package/lib/utils/with-active-cookie.js +1 -1
  159. package/lib/utils/write-cli-side-channel.js +1 -1
  160. package/package.json +1 -1
@@ -1 +1 @@
1
- const a100_0x226f40=a100_0x1d10;(function(_0x328400,_0x4eebd7){const _0x215410=a100_0x1d10,_0x3a157f=_0x328400();while(!![]){try{const _0xae7e07=-parseInt(_0x215410(0x16f))/0x1*(-parseInt(_0x215410(0x164))/0x2)+-parseInt(_0x215410(0x149))/0x3+-parseInt(_0x215410(0x16e))/0x4+-parseInt(_0x215410(0x16a))/0x5+-parseInt(_0x215410(0x15d))/0x6+-parseInt(_0x215410(0x152))/0x7+-parseInt(_0x215410(0x16d))/0x8*(-parseInt(_0x215410(0x175))/0x9);if(_0xae7e07===_0x4eebd7)break;else _0x3a157f['push'](_0x3a157f['shift']());}catch(_0x581942){_0x3a157f['push'](_0x3a157f['shift']());}}}(a100_0x273e,0x4e2ad));function a100_0x273e(){const _0x426f37=['9704vAMksn','2110680nvBSPY','35077CmEwKf','Validation:\x20','/api/node-toolbox/sql/save','appCode','SQL\x20query\x20description','File\x20not\x20found:\x20','14283utwkQQ','Type:\x20','732495zjlRKJ','length','blocked','\x20chars)','Save\x20SQL\x20query\x20from\x20','sqlName','\x20|\x20Tables:\x20','utf-8','cwd','3750698HkVFPN','string','sqlname','sqlCode','write','file','POST','tables','validation','description','str','3807990lKmyAd','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','action','sqlcode','Path\x20to\x20the\x20SQL\x20file','dbId','sqlType','24xSWjgN','message','parameters','\x20successfully','created','join','417340sXckjF','sql','type'];a100_0x273e=function(){return _0x426f37;};return a100_0x273e();}import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{saveSqlQuery}from'../../core/api-client.js';import{resolveOneDb}from'../../core/db-resolver.js';import{validateSql}from'../../core/sql-validator.js';function a100_0x1d10(_0x37d5c4,_0xf0bdba){_0x37d5c4=_0x37d5c4-0x148;const _0x273ed4=a100_0x273e();let _0x1d1076=_0x273ed4[_0x37d5c4];return _0x1d1076;}import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlSave={'service':a100_0x226f40(0x16b),'command':'save','description':'Save\x20or\x20update\x20a\x20custom\x20SQL\x20query\x20(validates\x20before\x20saving)','risk':a100_0x226f40(0x156),'flags':[{'name':a100_0x226f40(0x157),'type':'string','required':!![],'description':a100_0x226f40(0x161)},SQLCODE_FLAG_OPTIONAL,{'name':a100_0x226f40(0x154),'type':'string','description':'SQL\x20query\x20display\x20name'},{'name':'db','type':'string','description':a100_0x226f40(0x15e)},{'name':a100_0x226f40(0x15b),'type':a100_0x226f40(0x153),'description':a100_0x226f40(0x173)}],async 'validate'(_0xc3e05d){const _0x2bae2d=a100_0x226f40,_0x45768a=resolve(process[_0x2bae2d(0x151)](),_0xc3e05d[_0x2bae2d(0x15c)](_0x2bae2d(0x157)));if(!existsSync(_0x45768a))throw CliErrors[_0x2bae2d(0x15a)](_0x2bae2d(0x174)+_0x45768a);const _0x42cf03=readFileSync(_0x45768a,_0x2bae2d(0x150)),_0xc3463e=validateSql(_0x42cf03);if(!_0xc3463e['valid'])throw CliErrors[_0x2bae2d(0x15a)]('SQL\x20validation\x20failed:\x20'+_0xc3463e[_0x2bae2d(0x165)]);},async 'dryRun'(_0x103964){const _0x5e5159=a100_0x226f40,_0x559fed=resolve(process[_0x5e5159(0x151)](),_0x103964[_0x5e5159(0x15c)](_0x5e5159(0x157))),_0x39c5f1=readFileSync(_0x559fed,_0x5e5159(0x150)),_0x403d80=validateSql(_0x39c5f1),_0x19593f=_0x103964[_0x5e5159(0x15c)]('db')||undefined,{db:_0x1162f3,error:_0x17ab7b}=await resolveOneDb(_0x103964[_0x5e5159(0x172)],_0x19593f);return{'method':_0x5e5159(0x158),'url':_0x5e5159(0x171),'body':{'appCode':_0x103964[_0x5e5159(0x172)],'sqlContent':'('+_0x39c5f1[_0x5e5159(0x14a)]+_0x5e5159(0x14c),'sqlCode':_0x103964[_0x5e5159(0x15c)]('sqlcode')||undefined,'sqlName':_0x103964[_0x5e5159(0x15c)](_0x5e5159(0x154))||undefined,'db':_0x1162f3?_0x1162f3['dbName']+'\x20('+_0x1162f3['dbId']+')':_0x17ab7b},'description':[_0x5e5159(0x14d)+_0x103964[_0x5e5159(0x15c)](_0x5e5159(0x157)),_0x5e5159(0x170)+_0x403d80[_0x5e5159(0x165)],_0x5e5159(0x148)+_0x403d80[_0x5e5159(0x163)][_0x5e5159(0x16c)]+_0x5e5159(0x14f)+(_0x403d80[_0x5e5159(0x159)]['join'](',\x20')||'N/A')+'\x20|\x20Params:\x20'+(_0x403d80[_0x5e5159(0x166)][_0x5e5159(0x169)](',\x20')||'none')][_0x5e5159(0x169)]('\x0a')};},async 'execute'(_0x5c48e6){const _0x7f4013=a100_0x226f40,_0x1f537f=resolve(process[_0x7f4013(0x151)](),_0x5c48e6[_0x7f4013(0x15c)](_0x7f4013(0x157))),_0xc5d510=readFileSync(_0x1f537f,_0x7f4013(0x150)),_0x1e0cce=_0x5c48e6['str']('db')||undefined,{db:_0x40e737,error:_0x48062d}=await resolveOneDb(_0x5c48e6[_0x7f4013(0x172)],_0x1e0cce);if(_0x48062d)throw CliErrors[_0x7f4013(0x15a)](_0x48062d);const _0xc436ad=await saveSqlQuery({'appCode':_0x5c48e6[_0x7f4013(0x172)],'sqlContent':_0xc5d510,'sqlCode':_0x5c48e6[_0x7f4013(0x15c)](_0x7f4013(0x160))||undefined,'sqlName':_0x5c48e6[_0x7f4013(0x15c)](_0x7f4013(0x154))||undefined,'dbId':_0x40e737[_0x7f4013(0x162)],'description':_0x5c48e6[_0x7f4013(0x15c)](_0x7f4013(0x15b))||undefined});if(_0xc436ad[_0x7f4013(0x14b)])return{'ok':![],'data':_0xc436ad,'message':_0xc436ad[_0x7f4013(0x165)]||'Conflict\x20detected'};return{'ok':!![],'data':{'sqlCode':_0xc436ad[_0x7f4013(0x155)],'sqlName':_0xc436ad[_0x7f4013(0x14e)],'action':_0xc436ad[_0x7f4013(0x15f)]},'message':(_0xc436ad['action']===_0x7f4013(0x168)?'Created':'Updated')+_0x7f4013(0x167)+(_0xc436ad[_0x7f4013(0x155)]?'\x20('+_0xc436ad[_0x7f4013(0x155)]+')':'')};}};
1
+ const a100_0x499a99=a100_0x5294;(function(_0x17a5fb,_0x4a16a6){const _0x3f8848=a100_0x5294,_0x169253=_0x17a5fb();while(!![]){try{const _0x54c859=-parseInt(_0x3f8848(0x19f))/0x1*(-parseInt(_0x3f8848(0x1a5))/0x2)+parseInt(_0x3f8848(0x1ba))/0x3*(-parseInt(_0x3f8848(0x19e))/0x4)+parseInt(_0x3f8848(0x199))/0x5*(parseInt(_0x3f8848(0x1ab))/0x6)+parseInt(_0x3f8848(0x1a3))/0x7*(parseInt(_0x3f8848(0x197))/0x8)+parseInt(_0x3f8848(0x1a6))/0x9*(parseInt(_0x3f8848(0x1bd))/0xa)+-parseInt(_0x3f8848(0x1a4))/0xb*(-parseInt(_0x3f8848(0x191))/0xc)+-parseInt(_0x3f8848(0x1b6))/0xd;if(_0x54c859===_0x4a16a6)break;else _0x169253['push'](_0x169253['shift']());}catch(_0x3bdc59){_0x169253['push'](_0x169253['shift']());}}}(a100_0xb421,0xd2c54));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';function a100_0xb421(){const _0x3e47df=['424868CqqXMb','25812MtCRRg','write','save','Conflict\x20detected','sqlcode','30DMNSAq','utf-8','string','sqlName','sqlType','validation','str','sqlCode','Save\x20or\x20update\x20a\x20custom\x20SQL\x20query\x20(validates\x20before\x20saving)','SQL\x20query\x20display\x20name','\x20|\x20Tables:\x20','30931719PVZRPZ','\x20successfully','File\x20not\x20found:\x20','valid','1262421CfKSXh','Validation:\x20','created','730wXWtWx','tables','Type:\x20','appCode','Path\x20to\x20the\x20SQL\x20file','description','none','SQL\x20validation\x20failed:\x20','sql','12pWlsvU','length','sqlname','blocked','action','join','591688Gosqlc','\x20chars)','1180335tIWCVO','\x20|\x20Params:\x20','file','Save\x20SQL\x20query\x20from\x20','message','12YLaxez','8KRjdCN','cwd','parameters','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','56ueqBDc','9066651jicvBi'];a100_0xb421=function(){return _0x3e47df;};return a100_0xb421();}import{validateSql}from'../../core/sql-validator.js';function a100_0x5294(_0x55522f,_0x3eeb96){_0x55522f=_0x55522f-0x189;const _0xb4215d=a100_0xb421();let _0x529465=_0xb4215d[_0x55522f];return _0x529465;}import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlSave={'service':a100_0x499a99(0x190),'command':a100_0x499a99(0x1a8),'description':a100_0x499a99(0x1b3),'risk':a100_0x499a99(0x1a7),'flags':[{'name':a100_0x499a99(0x19b),'type':a100_0x499a99(0x1ad),'required':!![],'description':a100_0x499a99(0x18c)},SQLCODE_FLAG_OPTIONAL,{'name':'sqlname','type':'string','description':a100_0x499a99(0x1b4)},{'name':'db','type':a100_0x499a99(0x1ad),'description':a100_0x499a99(0x1a2)},{'name':a100_0x499a99(0x18d),'type':a100_0x499a99(0x1ad),'description':'SQL\x20query\x20description'}],async 'validate'(_0x311ef1){const _0x258480=a100_0x499a99,_0x2130db=resolve(process[_0x258480(0x1a0)](),_0x311ef1[_0x258480(0x1b1)](_0x258480(0x19b)));if(!existsSync(_0x2130db))throw CliErrors[_0x258480(0x1b0)](_0x258480(0x1b8)+_0x2130db);const _0x4ce511=readFileSync(_0x2130db,'utf-8'),_0x178638=validateSql(_0x4ce511);if(!_0x178638[_0x258480(0x1b9)])throw CliErrors[_0x258480(0x1b0)](_0x258480(0x18f)+_0x178638[_0x258480(0x19d)]);},async 'dryRun'(_0x466ee9){const _0x4585db=a100_0x499a99,_0x4b94d0=resolve(process[_0x4585db(0x1a0)](),_0x466ee9[_0x4585db(0x1b1)]('file')),_0x5999df=readFileSync(_0x4b94d0,_0x4585db(0x1ac)),_0x3714a9=validateSql(_0x5999df),_0x268b6a=_0x466ee9[_0x4585db(0x1b1)]('db')||undefined,{db:_0x5bed97,error:_0x16cc97}=await resolveOneDb(_0x466ee9[_0x4585db(0x18b)],_0x268b6a);return{'method':'POST','url':'/api/node-toolbox/sql/save','body':{'appCode':_0x466ee9[_0x4585db(0x18b)],'sqlContent':'('+_0x5999df[_0x4585db(0x192)]+_0x4585db(0x198),'sqlCode':_0x466ee9['str'](_0x4585db(0x1aa))||undefined,'sqlName':_0x466ee9[_0x4585db(0x1b1)]('sqlname')||undefined,'db':_0x5bed97?_0x5bed97['dbName']+'\x20('+_0x5bed97['dbId']+')':_0x16cc97},'description':[_0x4585db(0x19c)+_0x466ee9[_0x4585db(0x1b1)](_0x4585db(0x19b)),_0x4585db(0x1bb)+_0x3714a9['message'],_0x4585db(0x18a)+_0x3714a9[_0x4585db(0x1af)]['type']+_0x4585db(0x1b5)+(_0x3714a9[_0x4585db(0x189)][_0x4585db(0x196)](',\x20')||'N/A')+_0x4585db(0x19a)+(_0x3714a9[_0x4585db(0x1a1)]['join'](',\x20')||_0x4585db(0x18e))]['join']('\x0a')};},async 'execute'(_0x3b25f5){const _0x189abf=a100_0x499a99,_0x234faa=resolve(process['cwd'](),_0x3b25f5[_0x189abf(0x1b1)](_0x189abf(0x19b))),_0x557c82=readFileSync(_0x234faa,_0x189abf(0x1ac)),_0x46a9f4=_0x3b25f5['str']('db')||undefined,{db:_0x5ad5c9,error:_0x1b5c71}=await resolveOneDb(_0x3b25f5[_0x189abf(0x18b)],_0x46a9f4);if(_0x1b5c71)throw CliErrors[_0x189abf(0x1b0)](_0x1b5c71);const _0x23e0fc=await saveSqlQuery({'appCode':_0x3b25f5[_0x189abf(0x18b)],'sqlContent':_0x557c82,'sqlCode':_0x3b25f5['str']('sqlcode')||undefined,'sqlName':_0x3b25f5[_0x189abf(0x1b1)](_0x189abf(0x193))||undefined,'dbId':_0x5ad5c9['dbId'],'description':_0x3b25f5[_0x189abf(0x1b1)](_0x189abf(0x18d))||undefined});if(_0x23e0fc[_0x189abf(0x194)])return{'ok':![],'data':_0x23e0fc,'message':_0x23e0fc[_0x189abf(0x19d)]||_0x189abf(0x1a9)};return{'ok':!![],'data':{'sqlCode':_0x23e0fc['sqlCode'],'sqlName':_0x23e0fc[_0x189abf(0x1ae)],'action':_0x23e0fc['action']},'message':(_0x23e0fc[_0x189abf(0x195)]===_0x189abf(0x1bc)?'Created':'Updated')+_0x189abf(0x1b7)+(_0x23e0fc['sqlCode']?'\x20('+_0x23e0fc[_0x189abf(0x1b2)]+')':'')};}};
@@ -1 +1 @@
1
- function a101_0x5a1b(){const _0x435f45=['join','100578EDhFLi','replace','.sql','524063WsHCwz','sqlContent','trimEnd','endsWith','6615288ktwEuJ','888660nHnOFO','--\x20@lovrabet.sqlName:\x20','145pYkfAM','2451460udHCTs','sqlCode','77240vzzwBv','trim','sqlName','.rabetbase/sql','description','99046zIgWHu','set','18zeRJfh','98bzvusA','has','unnamed'];a101_0x5a1b=function(){return _0x435f45;};return a101_0x5a1b();}const a101_0xe19a4e=a101_0x1c80;(function(_0x3d45e8,_0x4a738d){const _0x4d7d40=a101_0x1c80,_0x3e3d9b=_0x3d45e8();while(!![]){try{const _0x492e7f=-parseInt(_0x4d7d40(0xe0))/0x1+parseInt(_0x4d7d40(0xd6))/0x2*(parseInt(_0x4d7d40(0xd8))/0x3)+-parseInt(_0x4d7d40(0xcc))/0x4+-parseInt(_0x4d7d40(0xce))/0x5*(-parseInt(_0x4d7d40(0xdd))/0x6)+-parseInt(_0x4d7d40(0xd9))/0x7*(parseInt(_0x4d7d40(0xd1))/0x8)+parseInt(_0x4d7d40(0xcb))/0x9+-parseInt(_0x4d7d40(0xcf))/0xa;if(_0x492e7f===_0x4a738d)break;else _0x3e3d9b['push'](_0x3e3d9b['shift']());}catch(_0x1a9286){_0x3e3d9b['push'](_0x3e3d9b['shift']());}}}(a101_0x5a1b,0x5fa49));function a101_0x1c80(_0x5f3af7,_0x1f899d){_0x5f3af7=_0x5f3af7-0xca;const _0x5a1be9=a101_0x5a1b();let _0x1c8096=_0x5a1be9[_0x5f3af7];return _0x1c8096;}import{join}from'node:path';export const SQL_LOCAL_REL_DIR=a101_0xe19a4e(0xd4);export function resolveSqlLocalDir(_0x2ae508){return join(_0x2ae508,SQL_LOCAL_REL_DIR);}export function safeSqlFileBaseName(_0x5ba10a){const _0x8fbf16=a101_0xe19a4e,_0x45b473=_0x5ba10a['trim']()||_0x8fbf16(0xdb),_0x45adeb=_0x45b473[_0x8fbf16(0xde)](/[/\\?%*:|"<>]/g,'_')['replace'](/\s+/g,'_')[_0x8fbf16(0xde)](/_+/g,'_');return _0x45adeb||_0x8fbf16(0xdb);}export function assignSqlFileNames(_0x2b0c88){const _0x29d85b=a101_0xe19a4e,_0x2911bb=new Map();for(const _0x4ed588 of _0x2b0c88){const _0x5f3df7=safeSqlFileBaseName(_0x4ed588[_0x29d85b(0xd3)]??_0x29d85b(0xdb));let _0x1fcb53=_0x5f3df7+'.sql';if(_0x2911bb[_0x29d85b(0xda)](_0x1fcb53)){const _0x34f39f=(_0x4ed588[_0x29d85b(0xd0)]??'unknown')[_0x29d85b(0xde)](/-/g,'');_0x1fcb53=_0x5f3df7+'__'+_0x34f39f+_0x29d85b(0xdf);}let _0x518ce0=0x0,_0x757071=_0x1fcb53;while(_0x2911bb[_0x29d85b(0xda)](_0x757071)){_0x518ce0++,_0x757071=_0x5f3df7+'__'+_0x518ce0+'.sql';}_0x2911bb[_0x29d85b(0xd7)](_0x757071,_0x4ed588);}return _0x2911bb;}export function buildPulledSqlFileContent(_0x51014f){const _0x2380f2=a101_0xe19a4e,_0x43c716=_0x51014f[_0x2380f2(0xd3)]??'unnamed',_0x3ace60=_0x51014f['sqlCode']??'',_0x4e8c6c=(_0x51014f[_0x2380f2(0xd5)]??'')[_0x2380f2(0xde)](/\r?\n/g,'\x20')[_0x2380f2(0xd2)](),_0x41f67c=_0x51014f[_0x2380f2(0xe1)]??'',_0x2a9bf5=[_0x2380f2(0xcd)+_0x43c716,'--\x20@lovrabet.sqlCode:\x20'+_0x3ace60,'--\x20@lovrabet.description:'+(_0x4e8c6c?'\x20'+_0x4e8c6c:''),'',_0x41f67c[_0x2380f2(0xe2)]()],_0x1ac08f=_0x2a9bf5[_0x2380f2(0xdc)]('\x0a');return _0x1ac08f[_0x2380f2(0xca)]('\x0a')?_0x1ac08f:_0x1ac08f+'\x0a';}
1
+ (function(_0x2309f9,_0x30086a){const _0x5866af=a101_0x4d25,_0x43f8b9=_0x2309f9();while(!![]){try{const _0x4fe623=-parseInt(_0x5866af(0x92))/0x1+parseInt(_0x5866af(0x9f))/0x2*(-parseInt(_0x5866af(0x94))/0x3)+-parseInt(_0x5866af(0x96))/0x4+parseInt(_0x5866af(0x8c))/0x5+-parseInt(_0x5866af(0x95))/0x6*(-parseInt(_0x5866af(0xa1))/0x7)+parseInt(_0x5866af(0x9e))/0x8*(parseInt(_0x5866af(0x98))/0x9)+-parseInt(_0x5866af(0xa2))/0xa*(-parseInt(_0x5866af(0x8e))/0xb);if(_0x4fe623===_0x30086a)break;else _0x43f8b9['push'](_0x43f8b9['shift']());}catch(_0x106472){_0x43f8b9['push'](_0x43f8b9['shift']());}}}(a101_0x1f00,0xc84f1));import{join}from'node:path';export const SQL_LOCAL_REL_DIR='.rabetbase/sql';export function resolveSqlLocalDir(_0x506491){return join(_0x506491,SQL_LOCAL_REL_DIR);}function a101_0x4d25(_0x59e4a6,_0x46f990){_0x59e4a6=_0x59e4a6-0x8a;const _0x1f00a7=a101_0x1f00();let _0x4d2581=_0x1f00a7[_0x59e4a6];return _0x4d2581;}export function safeSqlFileBaseName(_0x43181f){const _0x57b4d9=a101_0x4d25,_0x196665=_0x43181f[_0x57b4d9(0x99)]()||_0x57b4d9(0x90),_0x2443d4=_0x196665[_0x57b4d9(0x97)](/[/\\?%*:|"<>]/g,'_')['replace'](/\s+/g,'_')[_0x57b4d9(0x97)](/_+/g,'_');return _0x2443d4||'unnamed';}export function assignSqlFileNames(_0xcc7619){const _0x421ccf=a101_0x4d25,_0x1ef76c=new Map();for(const _0x4fa789 of _0xcc7619){const _0x1b381b=safeSqlFileBaseName(_0x4fa789[_0x421ccf(0x8a)]??_0x421ccf(0x90));let _0x42edce=_0x1b381b+_0x421ccf(0x93);if(_0x1ef76c['has'](_0x42edce)){const _0x4ccabe=(_0x4fa789[_0x421ccf(0x8f)]??_0x421ccf(0x8b))[_0x421ccf(0x97)](/-/g,'');_0x42edce=_0x1b381b+'__'+_0x4ccabe+'.sql';}let _0x3aa603=0x0,_0x5b5073=_0x42edce;while(_0x1ef76c['has'](_0x5b5073)){_0x3aa603++,_0x5b5073=_0x1b381b+'__'+_0x3aa603+_0x421ccf(0x93);}_0x1ef76c[_0x421ccf(0x9c)](_0x5b5073,_0x4fa789);}return _0x1ef76c;}function a101_0x1f00(){const _0x350b8a=['12hvlIHN','196902mKlchw','5425232voZXtd','replace','1770435wkubtr','trim','trimEnd','--\x20@lovrabet.description:','set','description','8NXObAh','597752vqrpHt','--\x20@lovrabet.sqlName:\x20','84LyUjEP','32643980jxxoGG','sqlName','unknown','3274130FStFxw','endsWith','11ZLWzAq','sqlCode','unnamed','sqlContent','1137466KkSYlH','.sql'];a101_0x1f00=function(){return _0x350b8a;};return a101_0x1f00();}export function buildPulledSqlFileContent(_0x25e3a8){const _0x3a9f54=a101_0x4d25,_0x502320=_0x25e3a8[_0x3a9f54(0x8a)]??_0x3a9f54(0x90),_0x5497af=_0x25e3a8[_0x3a9f54(0x8f)]??'',_0x561c2f=(_0x25e3a8[_0x3a9f54(0x9d)]??'')[_0x3a9f54(0x97)](/\r?\n/g,'\x20')[_0x3a9f54(0x99)](),_0x3b770e=_0x25e3a8[_0x3a9f54(0x91)]??'',_0x2b62e6=[_0x3a9f54(0xa0)+_0x502320,'--\x20@lovrabet.sqlCode:\x20'+_0x5497af,_0x3a9f54(0x9b)+(_0x561c2f?'\x20'+_0x561c2f:''),'',_0x3b770e[_0x3a9f54(0x9a)]()],_0x51dc71=_0x2b62e6['join']('\x0a');return _0x51dc71[_0x3a9f54(0x8d)]('\x0a')?_0x51dc71:_0x51dc71+'\x0a';}
@@ -1 +1 @@
1
- const a102_0x2d6cec=a102_0x55b0;(function(_0x12c6b6,_0x1e712a){const _0x5e2f6a=a102_0x55b0,_0x2794ea=_0x12c6b6();while(!![]){try{const _0x2e69b7=parseInt(_0x5e2f6a(0x86))/0x1*(parseInt(_0x5e2f6a(0x76))/0x2)+parseInt(_0x5e2f6a(0x8c))/0x3+-parseInt(_0x5e2f6a(0x89))/0x4+parseInt(_0x5e2f6a(0x87))/0x5+parseInt(_0x5e2f6a(0x7d))/0x6+-parseInt(_0x5e2f6a(0x73))/0x7+-parseInt(_0x5e2f6a(0x9d))/0x8*(parseInt(_0x5e2f6a(0x82))/0x9);if(_0x2e69b7===_0x1e712a)break;else _0x2794ea['push'](_0x2794ea['shift']());}catch(_0x21bdc5){_0x2794ea['push'](_0x2794ea['shift']());}}}(a102_0x38a2,0x40a8f));function a102_0x38a2(){const _0xe7bcab=['valid','1523382flBWJF','name','parameters','304ozteEz','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','length','reason','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','tables','from','337212VErvpz','tableName','fields','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','schema:','337437vMAoSQ','flagMissing','str','isDangerous','1612xgUkiA','1991860iezHIX','schemas','1158136WKglGz','sql','sqlType','667143xyGQOD','message','schemaWarnings','dbtableConfig','toLowerCase','utf-8','map','isSelectOnly','split','Dataset\x20\x22','push','Provide\x20--file\x20or\x20--sql','trim','file','isArray','type','validate','32YgnEFg','size','Table\x20\x22','File\x20not\x20found:\x20','\x22\x20not\x20found\x20in\x20any\x20dataset','filter','string','\x22\x20not\x20found\x20or\x20not\x20accessible','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate'];a102_0x38a2=function(){return _0xe7bcab;};return a102_0x38a2();}import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a102_0x55b0(_0x49b1b2,_0x4e799f){_0x49b1b2=_0x49b1b2-0x70;const _0x38a209=a102_0x38a2();let _0x55b0ad=_0x38a209[_0x49b1b2];return _0x55b0ad;}export const sqlValidate={'service':'sql','command':a102_0x2d6cec(0x9c),'description':a102_0x2d6cec(0x7a),'risk':'read','flags':[{'name':a102_0x2d6cec(0x99),'type':a102_0x2d6cec(0xa3),'description':a102_0x2d6cec(0x71)},{'name':'sql','type':a102_0x2d6cec(0xa3),'description':a102_0x2d6cec(0x80)},{'name':'schemas','type':'string','description':a102_0x2d6cec(0x77)}],async 'execute'(_0x2c061b){const _0x328dbe=a102_0x2d6cec,_0x673552=_0x2c061b[_0x328dbe(0x84)]('file'),_0x4c90a4=_0x2c061b['str'](_0x328dbe(0x8a));if(!_0x673552&&!_0x4c90a4)throw CliErrors[_0x328dbe(0x83)](_0x328dbe(0x99),_0x328dbe(0x97));let _0x2bafe4;if(_0x673552){const _0x35bbe5=resolve(process['cwd'](),_0x673552);if(!existsSync(_0x35bbe5))throw CliErrors['validation'](_0x328dbe(0xa0)+_0x35bbe5);_0x2bafe4=readFileSync(_0x35bbe5,_0x328dbe(0x91));}else _0x2bafe4=_0x4c90a4;const _0x3f06f9=validateSql(_0x2bafe4),_0x107dcf={'valid':_0x3f06f9[_0x328dbe(0x72)],'sqlType':_0x3f06f9[_0x328dbe(0x8b)][_0x328dbe(0x9b)],'isSelectOnly':_0x3f06f9[_0x328dbe(0x8b)][_0x328dbe(0x93)],'isDangerous':_0x3f06f9[_0x328dbe(0x8b)][_0x328dbe(0x85)],'tables':_0x3f06f9[_0x328dbe(0x7b)],'parameters':_0x3f06f9[_0x328dbe(0x75)],'message':_0x3f06f9[_0x328dbe(0x8d)]};_0x3f06f9[_0x328dbe(0x8b)]['reason']&&(_0x107dcf['reason']=_0x3f06f9[_0x328dbe(0x8b)][_0x328dbe(0x79)]);const _0x181740=_0x2c061b[_0x328dbe(0x84)](_0x328dbe(0x88));if(_0x181740&&_0x3f06f9[_0x328dbe(0x72)]){const _0x22abd0=_0x181740[_0x328dbe(0x94)](',')[_0x328dbe(0x92)](_0x3d248d=>_0x3d248d[_0x328dbe(0x98)]())[_0x328dbe(0xa2)](Boolean),_0x2a2850=[],_0x180471=await listDatasets(_0x2c061b['appCode']),_0xedef41=new Map(_0x180471[_0x328dbe(0x92)](_0x2c79bf=>[_0x2c79bf[_0x328dbe(0x8f)]?.['tableName']?.['toLowerCase'](),_0x2c79bf]));for(const _0x1b86de of _0x3f06f9[_0x328dbe(0x7b)]){const _0x4727ce=_0xedef41['get'](_0x1b86de[_0x328dbe(0x90)]());!_0x4727ce&&_0x2a2850[_0x328dbe(0x96)](_0x328dbe(0x9f)+_0x1b86de+_0x328dbe(0xa1));}for(const _0x240511 of _0x22abd0){try{const _0x3f607b=await getDatasetDetail(_0x240511),_0x1c42b3=Array[_0x328dbe(0x9a)](_0x3f607b[_0x328dbe(0x7f)])?_0x3f607b[_0x328dbe(0x7f)]:[],_0x3903d6=new Set(_0x1c42b3[_0x328dbe(0x92)](_0x449a98=>_0x449a98[_0x328dbe(0x74)]?.[_0x328dbe(0x90)]())),_0x3664a3=_0x3f607b['dbtableConfig']?.[_0x328dbe(0x7e)]||_0x3f607b[_0x328dbe(0x7e)]||_0x240511;_0x107dcf[_0x328dbe(0x81)+_0x3664a3]={'code':_0x240511,'tableName':_0x3664a3,'fieldCount':_0x3903d6[_0x328dbe(0x9e)],'fields':Array[_0x328dbe(0x7c)](_0x3903d6)};}catch{_0x2a2850[_0x328dbe(0x96)](_0x328dbe(0x95)+_0x240511+_0x328dbe(0x70));}}_0x2a2850[_0x328dbe(0x78)]>0x0&&(_0x107dcf[_0x328dbe(0x8e)]=_0x2a2850);}return{'ok':_0x3f06f9[_0x328dbe(0x72)],'data':_0x107dcf,'message':_0x3f06f9['message']};}};
1
+ const a102_0x4a33b6=a102_0xe07a;function a102_0x305a(){const _0x34acc7=['1269670bNVpVs','File\x20not\x20found:\x20','schemas','flagMissing','2BPduLc','\x22\x20not\x20found\x20or\x20not\x20accessible','tableName','map','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','name','push','633597ODOQdP','5505gYuKGO','schemaWarnings','size','dbtableConfig','4KZbQVW','sqlType','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','length','1829735VXRdfd','\x22\x20not\x20found\x20in\x20any\x20dataset','1150416sXjTRJ','str','read','type','from','tables','4876128xMWlYY','isSelectOnly','Dataset\x20\x22','trim','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','isDangerous','file','message','reason','isArray','fields','230292WaDkZH','Table\x20\x22','validate','Provide\x20--file\x20or\x20--sql','schema:','string','valid','cwd','get','70DTfPUD','filter','toLowerCase','parameters','sql'];a102_0x305a=function(){return _0x34acc7;};return a102_0x305a();}(function(_0x43abdc,_0x514bf7){const _0x543fc9=a102_0xe07a,_0x2a6d64=_0x43abdc();while(!![]){try{const _0x3e893d=parseInt(_0x543fc9(0x1c3))/0x1+-parseInt(_0x543fc9(0x1bb))/0x2*(-parseInt(_0x543fc9(0x1c2))/0x3)+parseInt(_0x543fc9(0x1c7))/0x4*(parseInt(_0x543fc9(0x1cc))/0x5)+parseInt(_0x543fc9(0x1df))/0x6*(parseInt(_0x543fc9(0x1e8))/0x7)+parseInt(_0x543fc9(0x1ce))/0x8+-parseInt(_0x543fc9(0x1d4))/0x9+-parseInt(_0x543fc9(0x1ed))/0xa;if(_0x3e893d===_0x514bf7)break;else _0x2a6d64['push'](_0x2a6d64['shift']());}catch(_0x56fdd0){_0x2a6d64['push'](_0x2a6d64['shift']());}}}(a102_0x305a,0x6bcaa));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a102_0xe07a(_0x5e8343,_0x4f7da8){_0x5e8343=_0x5e8343-0x1b8;const _0x305a20=a102_0x305a();let _0xe07ad8=_0x305a20[_0x5e8343];return _0xe07ad8;}export const sqlValidate={'service':'sql','command':a102_0x4a33b6(0x1e1),'description':a102_0x4a33b6(0x1bf),'risk':a102_0x4a33b6(0x1d0),'flags':[{'name':a102_0x4a33b6(0x1da),'type':'string','description':a102_0x4a33b6(0x1c9)},{'name':a102_0x4a33b6(0x1ec),'type':a102_0x4a33b6(0x1e4),'description':a102_0x4a33b6(0x1ca)},{'name':a102_0x4a33b6(0x1b9),'type':a102_0x4a33b6(0x1e4),'description':a102_0x4a33b6(0x1d8)}],async 'execute'(_0x236f58){const _0x7e9008=a102_0x4a33b6,_0x4fb7ab=_0x236f58[_0x7e9008(0x1cf)](_0x7e9008(0x1da)),_0xfae4c0=_0x236f58['str']('sql');if(!_0x4fb7ab&&!_0xfae4c0)throw CliErrors[_0x7e9008(0x1ba)](_0x7e9008(0x1da),_0x7e9008(0x1e2));let _0x283b09;if(_0x4fb7ab){const _0x5491f5=resolve(process[_0x7e9008(0x1e6)](),_0x4fb7ab);if(!existsSync(_0x5491f5))throw CliErrors['validation'](_0x7e9008(0x1b8)+_0x5491f5);_0x283b09=readFileSync(_0x5491f5,'utf-8');}else _0x283b09=_0xfae4c0;const _0x1d9ff0=validateSql(_0x283b09),_0x3c96e1={'valid':_0x1d9ff0[_0x7e9008(0x1e5)],'sqlType':_0x1d9ff0[_0x7e9008(0x1c8)][_0x7e9008(0x1d1)],'isSelectOnly':_0x1d9ff0[_0x7e9008(0x1c8)][_0x7e9008(0x1d5)],'isDangerous':_0x1d9ff0[_0x7e9008(0x1c8)][_0x7e9008(0x1d9)],'tables':_0x1d9ff0[_0x7e9008(0x1d3)],'parameters':_0x1d9ff0[_0x7e9008(0x1eb)],'message':_0x1d9ff0[_0x7e9008(0x1db)]};_0x1d9ff0[_0x7e9008(0x1c8)]['reason']&&(_0x3c96e1['reason']=_0x1d9ff0['sqlType'][_0x7e9008(0x1dc)]);const _0x483ec2=_0x236f58[_0x7e9008(0x1cf)](_0x7e9008(0x1b9));if(_0x483ec2&&_0x1d9ff0[_0x7e9008(0x1e5)]){const _0x2645f3=_0x483ec2['split'](',')[_0x7e9008(0x1be)](_0x3c5d5c=>_0x3c5d5c[_0x7e9008(0x1d7)]())[_0x7e9008(0x1e9)](Boolean),_0x5b4b52=[],_0x1188b1=await listDatasets(_0x236f58['appCode']),_0x354c49=new Map(_0x1188b1['map'](_0x14b2d5=>[_0x14b2d5[_0x7e9008(0x1c6)]?.[_0x7e9008(0x1bd)]?.['toLowerCase'](),_0x14b2d5]));for(const _0x28ac73 of _0x1d9ff0['tables']){const _0x8afd5=_0x354c49[_0x7e9008(0x1e7)](_0x28ac73[_0x7e9008(0x1ea)]());!_0x8afd5&&_0x5b4b52[_0x7e9008(0x1c1)](_0x7e9008(0x1e0)+_0x28ac73+_0x7e9008(0x1cd));}for(const _0x39dd78 of _0x2645f3){try{const _0x33295f=await getDatasetDetail(_0x39dd78),_0x4e15c5=Array[_0x7e9008(0x1dd)](_0x33295f[_0x7e9008(0x1de)])?_0x33295f['fields']:[],_0x4cab51=new Set(_0x4e15c5[_0x7e9008(0x1be)](_0x29d09f=>_0x29d09f[_0x7e9008(0x1c0)]?.['toLowerCase']())),_0x39de54=_0x33295f[_0x7e9008(0x1c6)]?.[_0x7e9008(0x1bd)]||_0x33295f[_0x7e9008(0x1bd)]||_0x39dd78;_0x3c96e1[_0x7e9008(0x1e3)+_0x39de54]={'code':_0x39dd78,'tableName':_0x39de54,'fieldCount':_0x4cab51[_0x7e9008(0x1c5)],'fields':Array[_0x7e9008(0x1d2)](_0x4cab51)};}catch{_0x5b4b52['push'](_0x7e9008(0x1d6)+_0x39dd78+_0x7e9008(0x1bc));}}_0x5b4b52[_0x7e9008(0x1cb)]>0x0&&(_0x3c96e1[_0x7e9008(0x1c4)]=_0x5b4b52);}return{'ok':_0x1d9ff0[_0x7e9008(0x1e5)],'data':_0x3c96e1,'message':_0x1d9ff0['message']};}};
@@ -1 +1 @@
1
- const a103_0x3349bb=a103_0x3a7d;(function(_0x348c81,_0x5a8d49){const _0x3f2fbc=a103_0x3a7d,_0x919f74=_0x348c81();while(!![]){try{const _0x3314cb=parseInt(_0x3f2fbc(0x1e0))/0x1+parseInt(_0x3f2fbc(0x1f7))/0x2+-parseInt(_0x3f2fbc(0x1e5))/0x3*(-parseInt(_0x3f2fbc(0x1fe))/0x4)+-parseInt(_0x3f2fbc(0x1ee))/0x5+-parseInt(_0x3f2fbc(0x1fd))/0x6*(-parseInt(_0x3f2fbc(0x1eb))/0x7)+-parseInt(_0x3f2fbc(0x1f0))/0x8*(parseInt(_0x3f2fbc(0x1e8))/0x9)+-parseInt(_0x3f2fbc(0x1e9))/0xa*(-parseInt(_0x3f2fbc(0x1f9))/0xb);if(_0x3314cb===_0x5a8d49)break;else _0x919f74['push'](_0x919f74['shift']());}catch(_0x2bb1f2){_0x919f74['push'](_0x919f74['shift']());}}}(a103_0x430f,0x65d69));function a103_0x3a7d(_0x1896da,_0x5c0c3e){_0x1896da=_0x1896da-0x1df;const _0x430f8e=a103_0x430f();let _0x3a7d04=_0x430f8e[_0x1896da];return _0x3a7d04;}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RABETBASE_ENV_VALUES}from'../constant/env.js';import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{RISK_LEVEL_VALUES}from'../constant/risk.js';export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=[a103_0x3349bb(0x1e6),a103_0x3349bb(0x1fa),a103_0x3349bb(0x1ff),a103_0x3349bb(0x201),'riskLevel'];export const TOP_LEVEL_CONFIG_KEYS=new Set([a103_0x3349bb(0x206),a103_0x3349bb(0x1e1),a103_0x3349bb(0x1ff),a103_0x3349bb(0x201),a103_0x3349bb(0x1e6),a103_0x3349bb(0x1fa),'apiDir']);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0xdbfd42){return[..._0xdbfd42]['join'](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x359f0b){const _0x437c5f=a103_0x3349bb;return TOP_LEVEL_CONFIG_KEYS[_0x437c5f(0x1f5)](_0x359f0b);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x425e80=a103_0x3349bb;return _0x425e80(0x202)+getTopLevelConfigKeySummary()+')';}function a103_0x430f(){const _0x14690d=['format','Config\x20key\x20(','API\x20directory\x20path','apps','pageSize','appcode','Default\x20page\x20size','216252QMmfKr','env','apiDir','defaultFormat','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','4443vODplT','cookie','app','7390179waKsWe','10HLKNWY','Target\x20environment','7HOWRYc','Locale','zh-CN','3662530SVMPIh','en-US','8tSFZug','length','riskLevel','Auth\x20cookie','filter','has','number','765814AASZNU','trim','6107277VyfxEc','accessKey','Risk\x20level','inherit','4196406iesFqc','316WLIhGc','locale','string'];a103_0x430f=function(){return _0x14690d;};return a103_0x430f();}export const APP_PROFILE_FLAG_KEY_MAP={'env':a103_0x3349bb(0x1e1),'apiDir':a103_0x3349bb(0x1e2),'cookie':a103_0x3349bb(0x1e6),'accessKey':a103_0x3349bb(0x1fa),'defaultFormat':a103_0x3349bb(0x201),'pageSize':a103_0x3349bb(0x205),'riskLevel':'riskLevel','locale':a103_0x3349bb(0x1ff)};export function getAppProfileFlagDefs(){const _0x547afc=a103_0x3349bb;return[{'name':_0x547afc(0x1e1),'type':'string','description':_0x547afc(0x1ea),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x547afc(0x1e2),'type':_0x547afc(0x200),'description':_0x547afc(0x203)},{'name':_0x547afc(0x1e6),'type':_0x547afc(0x200),'description':_0x547afc(0x1f3),'hidden':!![]},{'name':_0x547afc(0x1fa),'type':_0x547afc(0x200),'description':'Access\x20key','hidden':!![]},{'name':_0x547afc(0x1e3),'type':_0x547afc(0x200),'description':_0x547afc(0x1e4),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':'pageSize','type':_0x547afc(0x1f6),'description':_0x547afc(0x1df)},{'name':_0x547afc(0x1f2),'type':_0x547afc(0x200),'description':_0x547afc(0x1fb),'enum':[...RISK_LEVEL_VALUES]},{'name':'locale','type':'string','description':_0x547afc(0x1ec)}];}export function collectAppProfileOverrides(_0x3a9d5b){const _0x132ee6=a103_0x3349bb,_0x4b366b={};for(const [_0x102009,_0x56fa8e]of Object['entries'](APP_PROFILE_FLAG_KEY_MAP)){const _0xd9e912=_0x3a9d5b(_0x102009);if(!_0xd9e912)continue;_0x4b366b[_0x56fa8e]=_0x56fa8e===_0x132ee6(0x205)?Number(_0xd9e912):_0xd9e912;}return _0x4b366b;}export function buildAppProfileListFields(_0x287afd){const _0x422303=a103_0x3349bb;return{'env':_0x287afd[_0x422303(0x1e1)]??null,'apiDir':_0x287afd['apiDir']??null,'hasCookie':!!_0x287afd['cookie'],'hasAccessKey':!!_0x287afd['accessKey'],'format':_0x287afd[_0x422303(0x201)]??null,'pageSize':_0x287afd['pageSize']??null,'riskLevel':_0x287afd[_0x422303(0x1f2)]??null,'locale':_0x287afd[_0x422303(0x1ff)]??null};}export function buildAppDoctorFields(_0x20508d,_0x3abb8d){const _0x490a11=a103_0x3349bb;return{'env':{'value':_0x20508d[_0x490a11(0x1e1)]||_0x3abb8d['env'],'source':_0x20508d[_0x490a11(0x1e1)]?_0x490a11(0x1e7):_0x490a11(0x1fc)},'apiDir':{'value':_0x20508d['apiDir']||_0x3abb8d[_0x490a11(0x1e2)],'source':_0x20508d[_0x490a11(0x1e2)]?'app':'inherit'},'cookie':{'value':_0x20508d['cookie']||_0x3abb8d['cookie'],'source':_0x20508d[_0x490a11(0x1e6)]?_0x490a11(0x1e7):'inherit'},'accessKey':{'value':_0x20508d[_0x490a11(0x1fa)]||_0x3abb8d[_0x490a11(0x1fa)],'source':_0x20508d[_0x490a11(0x1fa)]?_0x490a11(0x1e7):'inherit'}};}export function buildCanonicalAppConfig(_0xa4f799,_0x2fbe03){const _0x47fe2f=a103_0x3349bb,_0x3fa2fd=_0xa4f799['map'](_0x4ce38b=>String(_0x4ce38b||'')[_0x47fe2f(0x1f8)]())[_0x47fe2f(0x1f4)](Boolean);if(_0x3fa2fd[_0x47fe2f(0x1f1)]===0x0)return{};const _0x8920fe={};for(const _0x36a8e2 of _0x3fa2fd){_0x8920fe[_0x36a8e2]=_0x2fbe03?{'appcode':_0x36a8e2,'env':_0x2fbe03}:{'appcode':_0x36a8e2};}return{'apps':_0x8920fe,'defaultApp':_0x3fa2fd[0x0]};}export function buildCanonicalProjectConfig(_0x5deae2,_0x28c4e0){const _0x10dca5=a103_0x3349bb,{appCodes:appCodes=[],env:_0x3e19cf,metadata:_0x17e4b5}=_0x28c4e0,_0xe743c8={..._0x5deae2,..._0x17e4b5||{}};delete _0xe743c8['appcode'],delete _0xe743c8[_0x10dca5(0x1e7)];if(_0x3e19cf)_0xe743c8[_0x10dca5(0x1e1)]=_0x3e19cf;else!_0xe743c8[_0x10dca5(0x1e1)]&&(_0xe743c8[_0x10dca5(0x1e1)]=DEFAULT_CONFIG_VALUES[_0x10dca5(0x1e1)]);const _0x1cc1e3=buildCanonicalAppConfig(appCodes,_0xe743c8[_0x10dca5(0x1e1)]);return Object['keys'](_0x1cc1e3)[_0x10dca5(0x1f1)]>0x0&&(_0xe743c8[_0x10dca5(0x204)]=_0x1cc1e3[_0x10dca5(0x204)],_0xe743c8['defaultApp']=_0x1cc1e3['defaultApp']),_0xe743c8;}const LOCALE_MAP={'zh':'zh-CN','zh-cn':a103_0x3349bb(0x1ed),'zh_cn':a103_0x3349bb(0x1ed),'en':'en-US','en-us':a103_0x3349bb(0x1ef),'en_us':'en-US'};export function normalizeLocale(_0x598c7e){if(!_0x598c7e)return null;return LOCALE_MAP[_0x598c7e['toLowerCase']()]??null;}
1
+ const a103_0x58f6d5=a103_0x1edc;(function(_0x4709de,_0x11188f){const _0x2d35b1=a103_0x1edc,_0x5aa163=_0x4709de();while(!![]){try{const _0x4ecd08=parseInt(_0x2d35b1(0x7f))/0x1*(-parseInt(_0x2d35b1(0x89))/0x2)+-parseInt(_0x2d35b1(0x73))/0x3+-parseInt(_0x2d35b1(0x74))/0x4*(parseInt(_0x2d35b1(0x78))/0x5)+-parseInt(_0x2d35b1(0x70))/0x6*(-parseInt(_0x2d35b1(0x69))/0x7)+-parseInt(_0x2d35b1(0x86))/0x8+-parseInt(_0x2d35b1(0x7d))/0x9+parseInt(_0x2d35b1(0x87))/0xa;if(_0x4ecd08===_0x11188f)break;else _0x5aa163['push'](_0x5aa163['shift']());}catch(_0x3c5847){_0x5aa163['push'](_0x5aa163['shift']());}}}(a103_0x53e2,0x806e4));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a103_0x1edc(_0x235e68,_0x40c3e7){_0x235e68=_0x235e68-0x68;const _0x53e2d3=a103_0x53e2();let _0x1edcad=_0x53e2d3[_0x235e68];return _0x1edcad;}import{RABETBASE_ENV_VALUES}from'../constant/env.js';import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{RISK_LEVEL_VALUES}from'../constant/risk.js';export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=['cookie',a103_0x58f6d5(0x88),a103_0x58f6d5(0x76),'format',a103_0x58f6d5(0x6f)];export const TOP_LEVEL_CONFIG_KEYS=new Set([a103_0x58f6d5(0x83),a103_0x58f6d5(0x7a),a103_0x58f6d5(0x76),'format',a103_0x58f6d5(0x6a),'accessKey','apiDir']);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x1d4112){const _0x4ced39=a103_0x58f6d5;return[..._0x1d4112][_0x4ced39(0x85)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0xc05c17){const _0x222b98=a103_0x58f6d5;return TOP_LEVEL_CONFIG_KEYS[_0x222b98(0x71)](_0xc05c17);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){return'Config\x20key\x20('+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':a103_0x58f6d5(0x7a),'apiDir':a103_0x58f6d5(0x6b),'cookie':a103_0x58f6d5(0x6a),'accessKey':a103_0x58f6d5(0x88),'defaultFormat':'format','pageSize':a103_0x58f6d5(0x81),'riskLevel':a103_0x58f6d5(0x6f),'locale':a103_0x58f6d5(0x76)};export function getAppProfileFlagDefs(){const _0x3f7e49=a103_0x58f6d5;return[{'name':_0x3f7e49(0x7a),'type':_0x3f7e49(0x79),'description':_0x3f7e49(0x77),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x3f7e49(0x6b),'type':'string','description':'API\x20directory\x20path'},{'name':_0x3f7e49(0x6a),'type':_0x3f7e49(0x79),'description':_0x3f7e49(0x6e),'hidden':!![]},{'name':_0x3f7e49(0x88),'type':_0x3f7e49(0x79),'description':_0x3f7e49(0x8c),'hidden':!![]},{'name':'defaultFormat','type':_0x3f7e49(0x79),'description':'Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':'pageSize','type':'number','description':'Default\x20page\x20size'},{'name':'riskLevel','type':_0x3f7e49(0x79),'description':'Risk\x20level','enum':[...RISK_LEVEL_VALUES]},{'name':_0x3f7e49(0x76),'type':'string','description':_0x3f7e49(0x7c)}];}export function collectAppProfileOverrides(_0x4cd001){const _0x54377e=a103_0x58f6d5,_0x4e5f19={};for(const [_0x53d24a,_0xcfd3a2]of Object[_0x54377e(0x82)](APP_PROFILE_FLAG_KEY_MAP)){const _0x5255fd=_0x4cd001(_0x53d24a);if(!_0x5255fd)continue;_0x4e5f19[_0xcfd3a2]=_0xcfd3a2==='pageSize'?Number(_0x5255fd):_0x5255fd;}return _0x4e5f19;}export function buildAppProfileListFields(_0x2ee7be){const _0x411121=a103_0x58f6d5;return{'env':_0x2ee7be['env']??null,'apiDir':_0x2ee7be[_0x411121(0x6b)]??null,'hasCookie':!!_0x2ee7be[_0x411121(0x6a)],'hasAccessKey':!!_0x2ee7be[_0x411121(0x88)],'format':_0x2ee7be[_0x411121(0x72)]??null,'pageSize':_0x2ee7be[_0x411121(0x81)]??null,'riskLevel':_0x2ee7be[_0x411121(0x6f)]??null,'locale':_0x2ee7be[_0x411121(0x76)]??null};}function a103_0x53e2(){const _0x6c57c9=['352943mVpaGM','keys','pageSize','entries','appcode','inherit','join','3748936lIasgF','31080280MvMrOT','accessKey','4DoHRHW','toLowerCase','filter','Access\x20key','en-US','defaultApp','42TKPhpI','cookie','apiDir','app','map','Auth\x20cookie','riskLevel','5250PQazCy','has','format','2992710StPLdN','444468bwfeDC','apps','locale','Target\x20environment','15pwhgnV','string','env','zh-CN','Locale','736218JIaneU','length'];a103_0x53e2=function(){return _0x6c57c9;};return a103_0x53e2();}export function buildAppDoctorFields(_0x5716c3,_0x4a5eab){const _0x3e1697=a103_0x58f6d5;return{'env':{'value':_0x5716c3[_0x3e1697(0x7a)]||_0x4a5eab['env'],'source':_0x5716c3[_0x3e1697(0x7a)]?_0x3e1697(0x6c):_0x3e1697(0x84)},'apiDir':{'value':_0x5716c3[_0x3e1697(0x6b)]||_0x4a5eab[_0x3e1697(0x6b)],'source':_0x5716c3[_0x3e1697(0x6b)]?_0x3e1697(0x6c):_0x3e1697(0x84)},'cookie':{'value':_0x5716c3[_0x3e1697(0x6a)]||_0x4a5eab['cookie'],'source':_0x5716c3['cookie']?_0x3e1697(0x6c):'inherit'},'accessKey':{'value':_0x5716c3[_0x3e1697(0x88)]||_0x4a5eab[_0x3e1697(0x88)],'source':_0x5716c3['accessKey']?'app':_0x3e1697(0x84)}};}export function buildCanonicalAppConfig(_0x158319,_0x13f6f4){const _0x4d026c=a103_0x58f6d5,_0xcbd4db=_0x158319[_0x4d026c(0x6d)](_0x211288=>String(_0x211288||'')['trim']())[_0x4d026c(0x8b)](Boolean);if(_0xcbd4db[_0x4d026c(0x7e)]===0x0)return{};const _0x362bc5={};for(const _0x5e2f1f of _0xcbd4db){_0x362bc5[_0x5e2f1f]=_0x13f6f4?{'appcode':_0x5e2f1f,'env':_0x13f6f4}:{'appcode':_0x5e2f1f};}return{'apps':_0x362bc5,'defaultApp':_0xcbd4db[0x0]};}export function buildCanonicalProjectConfig(_0x53d27d,_0x44b91f){const _0x4746a9=a103_0x58f6d5,{appCodes:appCodes=[],env:_0x56ea9b,metadata:_0x4b3985}=_0x44b91f,_0x4e81cc={..._0x53d27d,..._0x4b3985||{}};delete _0x4e81cc[_0x4746a9(0x83)],delete _0x4e81cc[_0x4746a9(0x6c)];if(_0x56ea9b)_0x4e81cc[_0x4746a9(0x7a)]=_0x56ea9b;else!_0x4e81cc['env']&&(_0x4e81cc['env']=DEFAULT_CONFIG_VALUES[_0x4746a9(0x7a)]);const _0x2f921f=buildCanonicalAppConfig(appCodes,_0x4e81cc[_0x4746a9(0x7a)]);return Object[_0x4746a9(0x80)](_0x2f921f)[_0x4746a9(0x7e)]>0x0&&(_0x4e81cc[_0x4746a9(0x75)]=_0x2f921f['apps'],_0x4e81cc[_0x4746a9(0x68)]=_0x2f921f[_0x4746a9(0x68)]),_0x4e81cc;}const LOCALE_MAP={'zh':a103_0x58f6d5(0x7b),'zh-cn':'zh-CN','zh_cn':a103_0x58f6d5(0x7b),'en':'en-US','en-us':'en-US','en_us':a103_0x58f6d5(0x8d)};export function normalizeLocale(_0x228801){const _0x113596=a103_0x58f6d5;if(!_0x228801)return null;return LOCALE_MAP[_0x228801[_0x113596(0x8a)]()]??null;}
@@ -1 +1 @@
1
- const a104_0x5000bb=a104_0xc000;(function(_0x107066,_0x44a69d){const _0x231c25=a104_0xc000,_0x2f54af=_0x107066();while(!![]){try{const _0x169d34=parseInt(_0x231c25(0x115))/0x1*(-parseInt(_0x231c25(0x153))/0x2)+-parseInt(_0x231c25(0x10e))/0x3+-parseInt(_0x231c25(0x15d))/0x4+parseInt(_0x231c25(0x138))/0x5*(parseInt(_0x231c25(0x117))/0x6)+-parseInt(_0x231c25(0x151))/0x7*(-parseInt(_0x231c25(0x135))/0x8)+-parseInt(_0x231c25(0x134))/0x9+parseInt(_0x231c25(0x10d))/0xa*(parseInt(_0x231c25(0x130))/0xb);if(_0x169d34===_0x44a69d)break;else _0x2f54af['push'](_0x2f54af['shift']());}catch(_0x216a11){_0x2f54af['push'](_0x2f54af['shift']());}}}(a104_0xee9a,0xd9840));function a104_0xc000(_0xf09550,_0x598a0c){_0xf09550=_0xf09550-0x109;const _0xee9a06=a104_0xee9a();let _0xc000e=_0xee9a06[_0xf09550];return _0xc000e;}function a104_0xee9a(){const _0x2fe0a3=['Output\x20path','yes','nonInteractive','Type\x20filter','keyword','map','operation','format','key','Use\x20remote','force','global','6587wpGWUQ','string','2DRVRbz','DB\x20ID','@lovrabet/rabetbase-cli','functionNode','SQL\x20string','Page\x20size','project','operationType','params','meowKey','123436JuwdCE','SQL\x20name','Page\x20number','env','Config\x20value','dbid','rabetbase','operation-type','verbose','output','Use\x20project\x20config\x20scope','pagesize','app','remote','Target\x20path','Output\x20format','2830350SxLvPG','2118048PvLrqU','Operation\x20type','json\x20|\x20pretty\x20|\x20compress','value','Dataset\x20code','name','Use\x20global\x20config\x20scope','1323919qWXBdd','<expr>','9783282FpdGdJ','non-interactive','sqlname','code','page','clear','sql','enable-bff-save','Force\x20overwrite','production\x20|\x20daily','Skip\x20import\x20generation','SQL\x20code','<code>','Select\x20app\x20profile\x20by\x20name','appcode','Keyword\x20filter','Clear','Enable\x20BFF\x20save','file','Watch\x20mode','Force\x20non-interactive\x20mode\x20(CI)','all','watch','enableBffSave','JSON\x20params','55SuxMJS','type','Alias\x20for\x20--non-interactive','Record\x20ID','13735674ZfVvst','12176URkqsT','Environment','Filter\x20JSON\x20output\x20(bundled\x20jq\x20via\x20node-jq,\x20else\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','5wrpTPo','Apply\x20to\x20all','Description','skip-imports','Rabetbase\x20CLI','dry-run','dryRun','help','schemas','Verbose\x20output','boolean','Override\x20appcode','datasetcode'];a104_0xee9a=function(){return _0x2fe0a3;};return a104_0xee9a();}export const CLI_BIN_NAME=a104_0x5000bb(0x163);export const CLI_DISPLAY_NAME=a104_0x5000bb(0x13c);export const NPM_PACKAGE_NAME=a104_0x5000bb(0x155);export const GLOBAL_FLAGS=[{'name':a104_0x5000bb(0x125),'meowKey':a104_0x5000bb(0x125),'type':a104_0x5000bb(0x152),'description':a104_0x5000bb(0x143),'hint':a104_0x5000bb(0x123)},{'name':a104_0x5000bb(0x109),'meowKey':a104_0x5000bb(0x109),'type':a104_0x5000bb(0x152),'description':a104_0x5000bb(0x124),'hint':'<name>'},{'name':a104_0x5000bb(0x160),'meowKey':'env','type':a104_0x5000bb(0x152),'description':a104_0x5000bb(0x136),'hint':a104_0x5000bb(0x120)},{'name':a104_0x5000bb(0x14c),'meowKey':a104_0x5000bb(0x14c),'type':'string','description':a104_0x5000bb(0x10c),'hint':a104_0x5000bb(0x110)},{'name':'jq','meowKey':'jq','type':a104_0x5000bb(0x152),'description':a104_0x5000bb(0x137),'hint':a104_0x5000bb(0x116)},{'name':'dry-run','meowKey':a104_0x5000bb(0x13e),'type':a104_0x5000bb(0x142),'description':'Preview\x20operation\x20without\x20executing'},{'name':a104_0x5000bb(0x146),'meowKey':a104_0x5000bb(0x146),'type':a104_0x5000bb(0x142),'description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':a104_0x5000bb(0x118),'meowKey':a104_0x5000bb(0x147),'type':a104_0x5000bb(0x142),'description':a104_0x5000bb(0x12b)},{'name':a104_0x5000bb(0x150),'meowKey':'global','type':'boolean','description':a104_0x5000bb(0x114)},{'name':'project','meowKey':a104_0x5000bb(0x159),'type':a104_0x5000bb(0x142),'description':a104_0x5000bb(0x167)},{'name':'ci','meowKey':'ci','type':a104_0x5000bb(0x142),'description':a104_0x5000bb(0x132),'hidden':!![]},{'name':a104_0x5000bb(0x13f),'meowKey':a104_0x5000bb(0x13f),'type':a104_0x5000bb(0x142),'description':'Show\x20help'},{'name':a104_0x5000bb(0x113),'meowKey':a104_0x5000bb(0x113),'type':a104_0x5000bb(0x152),'description':'Name','hidden':!![]},{'name':a104_0x5000bb(0x11c),'meowKey':a104_0x5000bb(0x11c),'type':a104_0x5000bb(0x142),'description':a104_0x5000bb(0x127),'hidden':!![]},{'name':a104_0x5000bb(0x12d),'meowKey':'watch','type':'boolean','description':a104_0x5000bb(0x12a),'hidden':!![]},{'name':'output','meowKey':a104_0x5000bb(0x166),'type':a104_0x5000bb(0x152),'description':a104_0x5000bb(0x145),'hidden':!![]},{'name':a104_0x5000bb(0x15b),'meowKey':a104_0x5000bb(0x15b),'type':a104_0x5000bb(0x152),'description':a104_0x5000bb(0x12f),'hidden':!![]},{'name':'datasetcode','meowKey':a104_0x5000bb(0x144),'type':'string','description':a104_0x5000bb(0x112),'hidden':!![]},{'name':a104_0x5000bb(0x12c),'meowKey':a104_0x5000bb(0x12c),'type':a104_0x5000bb(0x142),'description':a104_0x5000bb(0x139),'hidden':!![]},{'name':a104_0x5000bb(0x11e),'meowKey':a104_0x5000bb(0x12e),'type':'boolean','description':a104_0x5000bb(0x128),'hidden':!![]},{'name':'id','meowKey':'id','type':a104_0x5000bb(0x152),'description':a104_0x5000bb(0x133),'hidden':!![]},{'name':a104_0x5000bb(0x131),'meowKey':a104_0x5000bb(0x131),'type':a104_0x5000bb(0x152),'description':a104_0x5000bb(0x148),'hidden':!![]},{'name':a104_0x5000bb(0x129),'meowKey':'file','type':a104_0x5000bb(0x152),'description':'File\x20path','hidden':!![]},{'name':'sqlcode','meowKey':'sqlcode','type':a104_0x5000bb(0x152),'description':a104_0x5000bb(0x122),'hidden':!![]},{'name':a104_0x5000bb(0x119),'meowKey':a104_0x5000bb(0x119),'type':a104_0x5000bb(0x152),'description':a104_0x5000bb(0x15e),'hidden':!![]},{'name':a104_0x5000bb(0x162),'meowKey':'dbid','type':'string','description':a104_0x5000bb(0x154),'hidden':!![]},{'name':'description','meowKey':'description','type':a104_0x5000bb(0x152),'description':a104_0x5000bb(0x13a),'hidden':!![]},{'name':'page','meowKey':a104_0x5000bb(0x11b),'type':a104_0x5000bb(0x152),'description':a104_0x5000bb(0x15f),'hidden':!![]},{'name':a104_0x5000bb(0x168),'meowKey':'pagesize','type':a104_0x5000bb(0x152),'description':a104_0x5000bb(0x158),'hidden':!![]},{'name':'keyword','meowKey':a104_0x5000bb(0x149),'type':a104_0x5000bb(0x152),'description':a104_0x5000bb(0x126),'hidden':!![]},{'name':a104_0x5000bb(0x11a),'meowKey':a104_0x5000bb(0x11a),'type':a104_0x5000bb(0x152),'description':'Code\x20filter','hidden':!![]},{'name':'sql','meowKey':a104_0x5000bb(0x11d),'type':a104_0x5000bb(0x152),'description':a104_0x5000bb(0x157),'hidden':!![]},{'name':a104_0x5000bb(0x140),'meowKey':'schemas','type':'string','description':'Schemas','hidden':!![]},{'name':a104_0x5000bb(0x14b),'meowKey':a104_0x5000bb(0x14b),'type':a104_0x5000bb(0x152),'description':a104_0x5000bb(0x10f),'hidden':!![]},{'name':'target','meowKey':'target','type':'string','description':a104_0x5000bb(0x10b),'hidden':!![]},{'name':a104_0x5000bb(0x13b),'meowKey':'skipImports','type':a104_0x5000bb(0x142),'description':a104_0x5000bb(0x121),'hidden':!![]},{'name':a104_0x5000bb(0x14d),'meowKey':a104_0x5000bb(0x14d),'type':a104_0x5000bb(0x152),'description':'Config\x20key','hidden':!![]},{'name':a104_0x5000bb(0x111),'meowKey':a104_0x5000bb(0x111),'type':'string','description':a104_0x5000bb(0x161),'hidden':!![]},{'name':a104_0x5000bb(0x14f),'meowKey':a104_0x5000bb(0x14f),'type':a104_0x5000bb(0x142),'description':a104_0x5000bb(0x11f),'hidden':!![]},{'name':a104_0x5000bb(0x10a),'meowKey':a104_0x5000bb(0x10a),'type':a104_0x5000bb(0x142),'description':a104_0x5000bb(0x14e),'hidden':!![]},{'name':a104_0x5000bb(0x165),'meowKey':a104_0x5000bb(0x165),'type':'boolean','description':a104_0x5000bb(0x141),'hidden':!![]},{'name':a104_0x5000bb(0x164),'meowKey':a104_0x5000bb(0x15a),'type':a104_0x5000bb(0x152),'description':a104_0x5000bb(0x10f),'hidden':!![]},{'name':'function-node','meowKey':a104_0x5000bb(0x156),'type':a104_0x5000bb(0x152),'description':'Function\x20node','hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a104_0x5000bb(0x125),'app',a104_0x5000bb(0x160),a104_0x5000bb(0x14c),'jq',a104_0x5000bb(0x13d),a104_0x5000bb(0x146),'non-interactive','ci']);export function buildMeowFlags(){const _0x16a667=a104_0x5000bb;return Object['fromEntries'](GLOBAL_FLAGS[_0x16a667(0x14a)](_0x15edc2=>[_0x15edc2[_0x16a667(0x15c)],{'type':_0x15edc2[_0x16a667(0x131)]}]));}
1
+ function a104_0x51f7(){const _0x4fea33=['Select\x20app\x20profile\x20by\x20name','Output\x20path','page','value','clear','watch','Rabetbase\x20CLI','name','Show\x20help','verbose','dryRun','nonInteractive','1764kxCyRg','File\x20path','Record\x20ID','enableBffSave','dry-run','Use\x20remote','Config\x20value','help','json\x20|\x20pretty\x20|\x20compress','Operation\x20type','dbid','984IFapPH','production\x20|\x20daily','format','Keyword\x20filter','Function\x20node','boolean','sqlname','pagesize','SQL\x20string','Page\x20number','env','63320gvhCdZ','Schemas','skipImports','functionNode','datasetcode','2490502ipWGYU','SQL\x20name','DB\x20ID','operationType','appcode','894OSBHHs','Override\x20appcode','output','remote','all','Description','Apply\x20to\x20all','7929366cMFgbe','operation-type','Skip\x20import\x20generation','Use\x20global\x20config\x20scope','Target\x20path','params','<expr>','schemas','5gotHcp','yes','Dataset\x20code','Type\x20filter','Use\x20project\x20config\x20scope','string','Page\x20size','file','sql','keyword','Clear','enable-bff-save','Enable\x20BFF\x20save','force','<code>','Alias\x20for\x20--non-interactive','key','Environment','non-interactive','type','Preview\x20operation\x20without\x20executing','24CrWPUQ','5289620KIXGKt','sqlcode','code','36027112RUAhKQ','@lovrabet/rabetbase-cli','1099405sVyytS','Verbose\x20output','app','<name>','Output\x20format','target','map','description','Force\x20non-interactive\x20mode\x20(CI)','meowKey','global','operation','Skip\x20confirmation\x20for\x20high-risk\x20writes'];a104_0x51f7=function(){return _0x4fea33;};return a104_0x51f7();}const a104_0x5f4aa2=a104_0x4e40;(function(_0x1729f4,_0x1d1cbc){const _0x1bc2f5=a104_0x4e40,_0x5eef74=_0x1729f4();while(!![]){try{const _0x25ac5b=-parseInt(_0x1bc2f5(0x203))/0x1+-parseInt(_0x1bc2f5(0x1d9))/0x2*(-parseInt(_0x1bc2f5(0x227))/0x3)+parseInt(_0x1bc2f5(0x1fe))/0x4+-parseInt(_0x1bc2f5(0x1e8))/0x5*(-parseInt(_0x1bc2f5(0x1e0))/0x6)+parseInt(_0x1bc2f5(0x237))/0x7*(parseInt(_0x1bc2f5(0x1fd))/0x8)+parseInt(_0x1bc2f5(0x21c))/0x9*(parseInt(_0x1bc2f5(0x232))/0xa)+-parseInt(_0x1bc2f5(0x201))/0xb;if(_0x25ac5b===_0x1d1cbc)break;else _0x5eef74['push'](_0x5eef74['shift']());}catch(_0x22ac75){_0x5eef74['push'](_0x5eef74['shift']());}}}(a104_0x51f7,0xb0dbf));export const CLI_BIN_NAME='rabetbase';export const CLI_DISPLAY_NAME=a104_0x5f4aa2(0x216);function a104_0x4e40(_0x33c738,_0x39b11a){_0x33c738=_0x33c738-0x1d6;const _0x51f7e5=a104_0x51f7();let _0x4e407b=_0x51f7e5[_0x33c738];return _0x4e407b;}export const NPM_PACKAGE_NAME=a104_0x5f4aa2(0x202);export const GLOBAL_FLAGS=[{'name':a104_0x5f4aa2(0x1d8),'meowKey':a104_0x5f4aa2(0x1d8),'type':a104_0x5f4aa2(0x1ed),'description':a104_0x5f4aa2(0x1da),'hint':a104_0x5f4aa2(0x1f6)},{'name':a104_0x5f4aa2(0x205),'meowKey':a104_0x5f4aa2(0x205),'type':a104_0x5f4aa2(0x1ed),'description':a104_0x5f4aa2(0x210),'hint':a104_0x5f4aa2(0x206)},{'name':a104_0x5f4aa2(0x231),'meowKey':a104_0x5f4aa2(0x231),'type':'string','description':a104_0x5f4aa2(0x1f9),'hint':a104_0x5f4aa2(0x228)},{'name':'format','meowKey':'format','type':a104_0x5f4aa2(0x1ed),'description':a104_0x5f4aa2(0x207),'hint':a104_0x5f4aa2(0x224)},{'name':'jq','meowKey':'jq','type':'string','description':'Filter\x20JSON\x20output\x20(bundled\x20jq\x20via\x20node-jq,\x20else\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','hint':a104_0x5f4aa2(0x1e6)},{'name':a104_0x5f4aa2(0x220),'meowKey':a104_0x5f4aa2(0x21a),'type':'boolean','description':a104_0x5f4aa2(0x1fc)},{'name':a104_0x5f4aa2(0x1e9),'meowKey':a104_0x5f4aa2(0x1e9),'type':a104_0x5f4aa2(0x22c),'description':a104_0x5f4aa2(0x20f)},{'name':a104_0x5f4aa2(0x1fa),'meowKey':a104_0x5f4aa2(0x21b),'type':a104_0x5f4aa2(0x22c),'description':a104_0x5f4aa2(0x20b)},{'name':'global','meowKey':a104_0x5f4aa2(0x20d),'type':'boolean','description':a104_0x5f4aa2(0x1e3)},{'name':'project','meowKey':'project','type':a104_0x5f4aa2(0x22c),'description':a104_0x5f4aa2(0x1ec)},{'name':'ci','meowKey':'ci','type':a104_0x5f4aa2(0x22c),'description':a104_0x5f4aa2(0x1f7),'hidden':!![]},{'name':a104_0x5f4aa2(0x223),'meowKey':a104_0x5f4aa2(0x223),'type':a104_0x5f4aa2(0x22c),'description':a104_0x5f4aa2(0x218)},{'name':a104_0x5f4aa2(0x217),'meowKey':'name','type':'string','description':'Name','hidden':!![]},{'name':a104_0x5f4aa2(0x214),'meowKey':'clear','type':'boolean','description':a104_0x5f4aa2(0x1f2),'hidden':!![]},{'name':a104_0x5f4aa2(0x215),'meowKey':a104_0x5f4aa2(0x215),'type':'boolean','description':'Watch\x20mode','hidden':!![]},{'name':a104_0x5f4aa2(0x1db),'meowKey':a104_0x5f4aa2(0x1db),'type':a104_0x5f4aa2(0x1ed),'description':a104_0x5f4aa2(0x211),'hidden':!![]},{'name':a104_0x5f4aa2(0x1e5),'meowKey':'params','type':a104_0x5f4aa2(0x1ed),'description':'JSON\x20params','hidden':!![]},{'name':a104_0x5f4aa2(0x236),'meowKey':a104_0x5f4aa2(0x236),'type':a104_0x5f4aa2(0x1ed),'description':a104_0x5f4aa2(0x1ea),'hidden':!![]},{'name':a104_0x5f4aa2(0x1dd),'meowKey':a104_0x5f4aa2(0x1dd),'type':'boolean','description':a104_0x5f4aa2(0x1df),'hidden':!![]},{'name':a104_0x5f4aa2(0x1f3),'meowKey':a104_0x5f4aa2(0x21f),'type':a104_0x5f4aa2(0x22c),'description':a104_0x5f4aa2(0x1f4),'hidden':!![]},{'name':'id','meowKey':'id','type':'string','description':a104_0x5f4aa2(0x21e),'hidden':!![]},{'name':a104_0x5f4aa2(0x1fb),'meowKey':a104_0x5f4aa2(0x1fb),'type':'string','description':a104_0x5f4aa2(0x1eb),'hidden':!![]},{'name':'file','meowKey':a104_0x5f4aa2(0x1ef),'type':'string','description':a104_0x5f4aa2(0x21d),'hidden':!![]},{'name':a104_0x5f4aa2(0x1ff),'meowKey':a104_0x5f4aa2(0x1ff),'type':a104_0x5f4aa2(0x1ed),'description':'SQL\x20code','hidden':!![]},{'name':'sqlname','meowKey':a104_0x5f4aa2(0x22d),'type':a104_0x5f4aa2(0x1ed),'description':a104_0x5f4aa2(0x238),'hidden':!![]},{'name':a104_0x5f4aa2(0x226),'meowKey':'dbid','type':a104_0x5f4aa2(0x1ed),'description':a104_0x5f4aa2(0x1d6),'hidden':!![]},{'name':a104_0x5f4aa2(0x20a),'meowKey':a104_0x5f4aa2(0x20a),'type':'string','description':a104_0x5f4aa2(0x1de),'hidden':!![]},{'name':'page','meowKey':a104_0x5f4aa2(0x212),'type':a104_0x5f4aa2(0x1ed),'description':a104_0x5f4aa2(0x230),'hidden':!![]},{'name':a104_0x5f4aa2(0x22e),'meowKey':'pagesize','type':a104_0x5f4aa2(0x1ed),'description':a104_0x5f4aa2(0x1ee),'hidden':!![]},{'name':a104_0x5f4aa2(0x1f1),'meowKey':a104_0x5f4aa2(0x1f1),'type':'string','description':a104_0x5f4aa2(0x22a),'hidden':!![]},{'name':a104_0x5f4aa2(0x200),'meowKey':a104_0x5f4aa2(0x200),'type':a104_0x5f4aa2(0x1ed),'description':'Code\x20filter','hidden':!![]},{'name':a104_0x5f4aa2(0x1f0),'meowKey':'sql','type':a104_0x5f4aa2(0x1ed),'description':a104_0x5f4aa2(0x22f),'hidden':!![]},{'name':a104_0x5f4aa2(0x1e7),'meowKey':'schemas','type':a104_0x5f4aa2(0x1ed),'description':a104_0x5f4aa2(0x233),'hidden':!![]},{'name':a104_0x5f4aa2(0x20e),'meowKey':a104_0x5f4aa2(0x20e),'type':a104_0x5f4aa2(0x1ed),'description':a104_0x5f4aa2(0x225),'hidden':!![]},{'name':a104_0x5f4aa2(0x208),'meowKey':'target','type':'string','description':a104_0x5f4aa2(0x1e4),'hidden':!![]},{'name':'skip-imports','meowKey':a104_0x5f4aa2(0x234),'type':'boolean','description':a104_0x5f4aa2(0x1e2),'hidden':!![]},{'name':a104_0x5f4aa2(0x1f8),'meowKey':a104_0x5f4aa2(0x1f8),'type':'string','description':'Config\x20key','hidden':!![]},{'name':a104_0x5f4aa2(0x213),'meowKey':a104_0x5f4aa2(0x213),'type':a104_0x5f4aa2(0x1ed),'description':a104_0x5f4aa2(0x222),'hidden':!![]},{'name':a104_0x5f4aa2(0x1f5),'meowKey':a104_0x5f4aa2(0x1f5),'type':a104_0x5f4aa2(0x22c),'description':'Force\x20overwrite','hidden':!![]},{'name':a104_0x5f4aa2(0x1dc),'meowKey':a104_0x5f4aa2(0x1dc),'type':'boolean','description':a104_0x5f4aa2(0x221),'hidden':!![]},{'name':'verbose','meowKey':a104_0x5f4aa2(0x219),'type':a104_0x5f4aa2(0x22c),'description':a104_0x5f4aa2(0x204),'hidden':!![]},{'name':a104_0x5f4aa2(0x1e1),'meowKey':a104_0x5f4aa2(0x1d7),'type':a104_0x5f4aa2(0x1ed),'description':a104_0x5f4aa2(0x225),'hidden':!![]},{'name':'function-node','meowKey':a104_0x5f4aa2(0x235),'type':a104_0x5f4aa2(0x1ed),'description':a104_0x5f4aa2(0x22b),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set(['appcode',a104_0x5f4aa2(0x205),a104_0x5f4aa2(0x231),a104_0x5f4aa2(0x229),'jq',a104_0x5f4aa2(0x220),a104_0x5f4aa2(0x1e9),a104_0x5f4aa2(0x1fa),'ci']);export function buildMeowFlags(){const _0x268ab6=a104_0x5f4aa2;return Object['fromEntries'](GLOBAL_FLAGS[_0x268ab6(0x209)](_0x2a905d=>[_0x2a905d[_0x268ab6(0x20c)],{'type':_0x2a905d['type']}]));}
@@ -1 +1 @@
1
- const a105_0x3ef1ca=a105_0x355c;function a105_0x355c(_0x4e5d62,_0x1473fa){_0x4e5d62=_0x4e5d62-0x1a1;const _0x5e8c1d=a105_0x5e8c();let _0x355c56=_0x5e8c1d[_0x4e5d62];return _0x355c56;}(function(_0x41312f,_0x1d34df){const _0x44f993=a105_0x355c,_0x1aad24=_0x41312f();while(!![]){try{const _0x35818b=-parseInt(_0x44f993(0x1a1))/0x1*(parseInt(_0x44f993(0x1a6))/0x2)+-parseInt(_0x44f993(0x1ae))/0x3*(parseInt(_0x44f993(0x1a9))/0x4)+parseInt(_0x44f993(0x1a3))/0x5*(parseInt(_0x44f993(0x1aa))/0x6)+parseInt(_0x44f993(0x1ab))/0x7+-parseInt(_0x44f993(0x1ad))/0x8+-parseInt(_0x44f993(0x1a4))/0x9*(parseInt(_0x44f993(0x1ac))/0xa)+parseInt(_0x44f993(0x1af))/0xb;if(_0x35818b===_0x1d34df)break;else _0x1aad24['push'](_0x1aad24['shift']());}catch(_0x51ef03){_0x1aad24['push'](_0x1aad24['shift']());}}}(a105_0x5e8c,0x863f5));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a105_0x3ef1ca(0x1a2),'format':a105_0x3ef1ca(0x1a7),'locale':a105_0x3ef1ca(0x1a8),'riskLevel':a105_0x3ef1ca(0x1a5),'apiDir':DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';function a105_0x5e8c(){const _0x57cf91=['production','37745HVNWOq','34866rtlRjF','high-risk-write','426ORfdAC','compress','en-US','4NWMMZn','300LxYgsG','2479715sEEASl','1970uhcMFi','8517296IHFHXR','773823uGgPAB','32712482mnZdls','5023aaAKKo'];a105_0x5e8c=function(){return _0x57cf91;};return a105_0x5e8c();}
1
+ const a105_0x5117a5=a105_0x1cb6;(function(_0x897da2,_0x2d6145){const _0x4068de=a105_0x1cb6,_0xd5b590=_0x897da2();while(!![]){try{const _0x1d9435=-parseInt(_0x4068de(0x1bc))/0x1*(-parseInt(_0x4068de(0x1c0))/0x2)+parseInt(_0x4068de(0x1bf))/0x3*(parseInt(_0x4068de(0x1ba))/0x4)+parseInt(_0x4068de(0x1be))/0x5*(parseInt(_0x4068de(0x1b9))/0x6)+-parseInt(_0x4068de(0x1bd))/0x7+-parseInt(_0x4068de(0x1c3))/0x8+-parseInt(_0x4068de(0x1b8))/0x9+-parseInt(_0x4068de(0x1bb))/0xa;if(_0x1d9435===_0x2d6145)break;else _0xd5b590['push'](_0xd5b590['shift']());}catch(_0x2a3e2a){_0xd5b590['push'](_0xd5b590['shift']());}}}(a105_0x29d2,0x75893));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a105_0x5117a5(0x1c4),'format':a105_0x5117a5(0x1c2),'locale':a105_0x5117a5(0x1c1),'riskLevel':'high-risk-write','apiDir':DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a105_0x5117a5(0x1c2);function a105_0x1cb6(_0x225260,_0x34c6ba){_0x225260=_0x225260-0x1b8;const _0x29d236=a105_0x29d2();let _0x1cb681=_0x29d236[_0x225260];return _0x1cb681;}function a105_0x29d2(){const _0x32873b=['production','1123083SUICdw','4002uSPwtb','37476LyhTBf','2050010WOeSZN','244182RzuQwd','4905033fVQkff','3155HAdwFE','252qEFHyy','6kAztRE','en-US','compress','3427880iRRuBw'];a105_0x29d2=function(){return _0x32873b;};return a105_0x29d2();}
@@ -1 +1 @@
1
- const a106_0x4dc1bc=a106_0xadc4;(function(_0x35723a,_0x1a8e37){const _0x33781b=a106_0xadc4,_0x4f7029=_0x35723a();while(!![]){try{const _0x4544b1=parseInt(_0x33781b(0x96))/0x1*(-parseInt(_0x33781b(0x9a))/0x2)+parseInt(_0x33781b(0x9b))/0x3*(parseInt(_0x33781b(0x9d))/0x4)+parseInt(_0x33781b(0x9e))/0x5+-parseInt(_0x33781b(0x91))/0x6+parseInt(_0x33781b(0x8f))/0x7*(-parseInt(_0x33781b(0x8d))/0x8)+parseInt(_0x33781b(0x9c))/0x9*(-parseInt(_0x33781b(0x99))/0xa)+parseInt(_0x33781b(0x94))/0xb*(parseInt(_0x33781b(0x8e))/0xc);if(_0x4544b1===_0x1a8e37)break;else _0x4f7029['push'](_0x4f7029['shift']());}catch(_0x7a93df){_0x4f7029['push'](_0x4f7029['shift']());}}}(a106_0x7ca0,0xaf36c));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x5a2862){const _0x311cc1=a106_0xadc4;customApiDomain=_0x5a2862?.['apiDomain'],customUserDomain=_0x5a2862?.[_0x311cc1(0x93)],customRuntimeDomain=_0x5a2862?.[_0x311cc1(0x92)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a106_0x4dc1bc(0x97):a106_0x4dc1bc(0x98));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a106_0x4dc1bc(0x95):'https://daily-api.lovrabet.com');export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a106_0x4dc1bc(0x90):'https://daily-runtime.lovrabet.com');function a106_0xadc4(_0x1c778b,_0x20e321){_0x1c778b=_0x1c778b-0x8d;const _0x7ca0b1=a106_0x7ca0();let _0xadc46b=_0x7ca0b1[_0x1c778b];return _0xadc46b;}function a106_0x7ca0(){const _0x4197ff=['8GqOuVA','12qxepIt','6278685TWpTzW','https://runtime.lovrabet.com','4203210qNrieF','runtimeDomain','userDomain','13057242ennZbP','https://api.lovrabet.com','5AfmrWX','https://user.lovrabet.com','https://user-daily.lovrabet.com','116590gsZXlP','59026llVbIi','3YIUwdR','99xwuVNB','4902816XjXjIB','891270nbqupD'];a106_0x7ca0=function(){return _0x4197ff;};return a106_0x7ca0();}
1
+ const a106_0x2fd7b2=a106_0xf26a;(function(_0x3910c4,_0x25b517){const _0x57046d=a106_0xf26a,_0x39fa99=_0x3910c4();while(!![]){try{const _0x20afb0=parseInt(_0x57046d(0xef))/0x1*(parseInt(_0x57046d(0xf8))/0x2)+-parseInt(_0x57046d(0xea))/0x3+parseInt(_0x57046d(0xec))/0x4+-parseInt(_0x57046d(0xee))/0x5*(-parseInt(_0x57046d(0xf7))/0x6)+-parseInt(_0x57046d(0xed))/0x7+-parseInt(_0x57046d(0xf6))/0x8+-parseInt(_0x57046d(0xf1))/0x9*(-parseInt(_0x57046d(0xf0))/0xa);if(_0x20afb0===_0x25b517)break;else _0x39fa99['push'](_0x39fa99['shift']());}catch(_0x4187f5){_0x39fa99['push'](_0x39fa99['shift']());}}}(a106_0x2d9e,0xcd8a8));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;function a106_0xf26a(_0xb23386,_0x16221a){_0xb23386=_0xb23386-0xea;const _0x2d9e12=a106_0x2d9e();let _0xf26a95=_0x2d9e12[_0xb23386];return _0xf26a95;}export function initDomains(_0x132201){const _0x45b51c=a106_0xf26a;customApiDomain=_0x132201?.[_0x45b51c(0xf4)],customUserDomain=_0x132201?.[_0x45b51c(0xf5)],customRuntimeDomain=_0x132201?.[_0x45b51c(0xf2)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a106_0x2fd7b2(0xfa):a106_0x2fd7b2(0xeb));function a106_0x2d9e(){const _0x3df3ad=['22rskZGw','https://api.lovrabet.com','https://user.lovrabet.com','3538194wnRlGj','https://user-daily.lovrabet.com','2369328dGqLxS','6760012usLLAa','6381920kLYrzy','4798XJBuSg','10qzSyrz','20282715mDjRMx','runtimeDomain','https://daily-runtime.lovrabet.com','apiDomain','userDomain','9504952KVbrKB','6SyBMIc'];a106_0x2d9e=function(){return _0x3df3ad;};return a106_0x2d9e();}export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a106_0x2fd7b2(0xf9):'https://daily-api.lovrabet.com');export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?'https://runtime.lovrabet.com':a106_0x2fd7b2(0xf3));
@@ -1 +1 @@
1
- const a107_0x1ad1d5=a107_0x976d;(function(_0x375799,_0x397cb6){const _0x3464e6=a107_0x976d,_0x462565=_0x375799();while(!![]){try{const _0x3068db=-parseInt(_0x3464e6(0x19f))/0x1*(-parseInt(_0x3464e6(0x1a8))/0x2)+parseInt(_0x3464e6(0x1a5))/0x3*(-parseInt(_0x3464e6(0x19c))/0x4)+-parseInt(_0x3464e6(0x19a))/0x5*(parseInt(_0x3464e6(0x1a1))/0x6)+parseInt(_0x3464e6(0x1a6))/0x7*(-parseInt(_0x3464e6(0x19b))/0x8)+-parseInt(_0x3464e6(0x197))/0x9*(-parseInt(_0x3464e6(0x1a2))/0xa)+parseInt(_0x3464e6(0x198))/0xb+-parseInt(_0x3464e6(0x1a3))/0xc*(-parseInt(_0x3464e6(0x19d))/0xd);if(_0x3068db===_0x397cb6)break;else _0x462565['push'](_0x462565['shift']());}catch(_0x2b3cc9){_0x462565['push'](_0x462565['shift']());}}}(a107_0xc28f,0x69ee6));function a107_0x976d(_0x18b014,_0x17399f){_0x18b014=_0x18b014-0x197;const _0xc28ffa=a107_0xc28f();let _0x976da4=_0xc28ffa[_0x18b014];return _0x976da4;}export const RABETBASE_ENV_VALUES=[a107_0x1ad1d5(0x1a7),a107_0x1ad1d5(0x1a4)];export function normalizeEnv(_0x35eb4b){const _0x417e3e=a107_0x1ad1d5;return _0x35eb4b===_0x417e3e(0x199)?_0x417e3e(0x1a7):_0x35eb4b;}export function isProduction(_0x1efbf1){return normalizeEnv(_0x1efbf1)==='production';}export function isDaily(_0xa1ece2){const _0x4c8fe3=a107_0x1ad1d5;return normalizeEnv(_0xa1ece2)===_0x4c8fe3(0x1a4);}export function isDev(_0x38fef5){const _0x35ac06=a107_0x1ad1d5,_0x3cdae6=normalizeEnv(_0x38fef5);return _0x3cdae6===_0x35ac06(0x19e)||_0x3cdae6===_0x35ac06(0x1a0);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||'production');export function getEnv(){return env;}export function initEnv(_0x2f7a05){env=normalizeEnv(_0x2f7a05);}function a107_0xc28f(){const _0x59dbff=['35PHqtyF','811376eDWOoX','5652vdZlQu','14810809ViUNEY','development','1ItfPzd','dev','565368lJoziZ','349730QMkJKU','12djVwof','daily','1245BJuAEm','14TgPJqR','production','479824zCsUss','27HNqCfE','4384655LGwQQf','online'];a107_0xc28f=function(){return _0x59dbff;};return a107_0xc28f();}
1
+ const a107_0x48aaff=a107_0x56ea;(function(_0x4c39c0,_0x3e8b75){const _0x1783f6=a107_0x56ea,_0x4d5ba0=_0x4c39c0();while(!![]){try{const _0x366393=-parseInt(_0x1783f6(0xe7))/0x1+-parseInt(_0x1783f6(0xde))/0x2*(-parseInt(_0x1783f6(0xdb))/0x3)+-parseInt(_0x1783f6(0xe8))/0x4*(-parseInt(_0x1783f6(0xe4))/0x5)+-parseInt(_0x1783f6(0xe2))/0x6*(-parseInt(_0x1783f6(0xe3))/0x7)+-parseInt(_0x1783f6(0xe0))/0x8*(-parseInt(_0x1783f6(0xe6))/0x9)+parseInt(_0x1783f6(0xdc))/0xa*(-parseInt(_0x1783f6(0xdf))/0xb)+-parseInt(_0x1783f6(0xdd))/0xc;if(_0x366393===_0x3e8b75)break;else _0x4d5ba0['push'](_0x4d5ba0['shift']());}catch(_0x933070){_0x4d5ba0['push'](_0x4d5ba0['shift']());}}}(a107_0x1200,0x553d5));export const RABETBASE_ENV_VALUES=['production',a107_0x48aaff(0xe9)];export function normalizeEnv(_0x18f73e){const _0x449d3e=a107_0x48aaff;return _0x18f73e===_0x449d3e(0xea)?_0x449d3e(0xe1):_0x18f73e;}export function isProduction(_0x4657ac){const _0x4a4c97=a107_0x48aaff;return normalizeEnv(_0x4657ac)===_0x4a4c97(0xe1);}export function isDaily(_0x513f7d){return normalizeEnv(_0x513f7d)==='daily';}export function isDev(_0xa7f5de){const _0x5a262b=a107_0x48aaff,_0x3405a3=normalizeEnv(_0xa7f5de);return _0x3405a3===_0x5a262b(0xda)||_0x3405a3===_0x5a262b(0xe5);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a107_0x48aaff(0xe1));function a107_0x1200(){const _0x13e2e6=['production','3222GKHdBw','7553zDzqBW','416015AwOpUX','dev','414hIAyfY','351540iSOVci','4KeaGdt','daily','online','development','9Xvirwj','5412430tpOAZY','65640nnfMcA','159508MeerNZ','11ZeSSKZ','60088GoGIYb'];a107_0x1200=function(){return _0x13e2e6;};return a107_0x1200();}export function getEnv(){return env;}function a107_0x56ea(_0x45268c,_0x51916a){_0x45268c=_0x45268c-0xda;const _0x120075=a107_0x1200();let _0x56eaf2=_0x120075[_0x45268c];return _0x56eaf2;}export function initEnv(_0x4a742f){env=normalizeEnv(_0x4a742f);}
@@ -1 +1 @@
1
- function a108_0x39f5(_0x700ba1,_0x2b7c19){_0x700ba1=_0x700ba1-0xed;const _0x1ad9ca=a108_0x1ad9();let _0x39f5d0=_0x1ad9ca[_0x700ba1];return _0x39f5d0;}const a108_0x18fd87=a108_0x39f5;function a108_0x1ad9(){const _0x52f3e5=['28116KzSEKH','160mGesRj','832506GBzquh','115250WPfIez','515exVaNi','compress','5651464gyyBRN','json','2593332JGNtwx','3548676vLNHkF','2vBPDbj','732528iZscOp'];a108_0x1ad9=function(){return _0x52f3e5;};return a108_0x1ad9();}(function(_0x3d10d6,_0x406f88){const _0x2bbada=a108_0x39f5,_0xc5d6bc=_0x3d10d6();while(!![]){try{const _0x1eeb3f=parseInt(_0x2bbada(0xf3))/0x1+-parseInt(_0x2bbada(0xee))/0x2*(parseInt(_0x2bbada(0xf2))/0x3)+parseInt(_0x2bbada(0xed))/0x4+-parseInt(_0x2bbada(0xf4))/0x5*(parseInt(_0x2bbada(0xf0))/0x6)+-parseInt(_0x2bbada(0xf8))/0x7+-parseInt(_0x2bbada(0xf6))/0x8+-parseInt(_0x2bbada(0xef))/0x9*(-parseInt(_0x2bbada(0xf1))/0xa);if(_0x1eeb3f===_0x406f88)break;else _0xc5d6bc['push'](_0xc5d6bc['shift']());}catch(_0x279c91){_0xc5d6bc['push'](_0xc5d6bc['shift']());}}}(a108_0x1ad9,0x722a6));export const RABETBASE_OUTPUT_FORMAT_VALUES=[a108_0x18fd87(0xf7),'pretty',a108_0x18fd87(0xf5)];
1
+ const a108_0x35b68c=a108_0x4999;(function(_0x23775f,_0x15f998){const _0x38bb69=a108_0x4999,_0x4b3892=_0x23775f();while(!![]){try{const _0x129cb3=-parseInt(_0x38bb69(0x9b))/0x1+-parseInt(_0x38bb69(0xa4))/0x2*(parseInt(_0x38bb69(0x9f))/0x3)+-parseInt(_0x38bb69(0xa5))/0x4+-parseInt(_0x38bb69(0xa2))/0x5+parseInt(_0x38bb69(0xa0))/0x6+parseInt(_0x38bb69(0x9e))/0x7+parseInt(_0x38bb69(0xa1))/0x8*(parseInt(_0x38bb69(0x9c))/0x9);if(_0x129cb3===_0x15f998)break;else _0x4b3892['push'](_0x4b3892['shift']());}catch(_0xf280b1){_0x4b3892['push'](_0x4b3892['shift']());}}}(a108_0x2857,0x88360));function a108_0x4999(_0x59a3d3,_0x4b3b74){_0x59a3d3=_0x59a3d3-0x9b;const _0x2857f2=a108_0x2857();let _0x4999ea=_0x2857f2[_0x59a3d3];return _0x4999ea;}function a108_0x2857(){const _0x567157=['234002ncbtVW','126WPmfXX','json','6091183ggwTiG','494535gNsgre','6265884MMXMCO','428216fMnbFy','2818940sIkQbI','pretty','6ijKQFj','3254464pCXqyn'];a108_0x2857=function(){return _0x567157;};return a108_0x2857();}export const RABETBASE_OUTPUT_FORMAT_VALUES=[a108_0x35b68c(0x9d),a108_0x35b68c(0xa3),'compress'];
@@ -1 +1 @@
1
- const a109_0x57b156=a109_0x7044;function a109_0x7044(_0x325687,_0x2e09ef){_0x325687=_0x325687-0x1b9;const _0x3d3d4f=a109_0x3d3d();let _0x70441c=_0x3d3d4f[_0x325687];return _0x70441c;}(function(_0x23c500,_0x143ba0){const _0x2cc6c6=a109_0x7044,_0x522271=_0x23c500();while(!![]){try{const _0x4f0aeb=parseInt(_0x2cc6c6(0x1bd))/0x1*(parseInt(_0x2cc6c6(0x1bb))/0x2)+parseInt(_0x2cc6c6(0x1b9))/0x3*(parseInt(_0x2cc6c6(0x1be))/0x4)+parseInt(_0x2cc6c6(0x1bf))/0x5*(parseInt(_0x2cc6c6(0x1c6))/0x6)+parseInt(_0x2cc6c6(0x1c1))/0x7+-parseInt(_0x2cc6c6(0x1ba))/0x8*(-parseInt(_0x2cc6c6(0x1c4))/0x9)+parseInt(_0x2cc6c6(0x1c3))/0xa*(parseInt(_0x2cc6c6(0x1c5))/0xb)+-parseInt(_0x2cc6c6(0x1bc))/0xc*(parseInt(_0x2cc6c6(0x1c0))/0xd);if(_0x4f0aeb===_0x143ba0)break;else _0x522271['push'](_0x522271['shift']());}catch(_0x1bfd92){_0x522271['push'](_0x522271['shift']());}}}(a109_0x3d3d,0xc00db));function a109_0x3d3d(){const _0x572605=['4887RQuQui','3644157iYHQLj','60ABMNaC','45IyREAp','2872NSkumA','2wSFVvX','60evUXoW','146912sHpvjE','54564EnNABE','585145hhvpxh','4882384gLITTC','1996141REiUvk','./src/api','20cOGBLQ'];a109_0x3d3d=function(){return _0x572605;};return a109_0x3d3d();}export const DEFAULT_API_DIR=a109_0x57b156(0x1c2);
1
+ function a109_0x24b3(){const _0x509de6=['290748obQnvv','3402gMffqT','80440kKAQPS','1070ueoJcq','36511ZDYRPu','1655360maHsLW','24cUSbmY','./src/api','22905eSbyoU','394tHOZpi','82210cCRdug'];a109_0x24b3=function(){return _0x509de6;};return a109_0x24b3();}const a109_0xb1d16c=a109_0x43d3;(function(_0x40204c,_0x43e91){const _0x562d67=a109_0x43d3,_0x107249=_0x40204c();while(!![]){try{const _0x25d7b2=-parseInt(_0x562d67(0x177))/0x1+-parseInt(_0x562d67(0x171))/0x2*(-parseInt(_0x562d67(0x174))/0x3)+-parseInt(_0x562d67(0x173))/0x4+-parseInt(_0x562d67(0x172))/0x5*(-parseInt(_0x562d67(0x179))/0x6)+parseInt(_0x562d67(0x178))/0x7+-parseInt(_0x562d67(0x175))/0x8+-parseInt(_0x562d67(0x17b))/0x9*(parseInt(_0x562d67(0x176))/0xa);if(_0x25d7b2===_0x43e91)break;else _0x107249['push'](_0x107249['shift']());}catch(_0x448c8c){_0x107249['push'](_0x107249['shift']());}}}(a109_0x24b3,0x20bbe));function a109_0x43d3(_0x2b7dbc,_0x4a17ac){_0x2b7dbc=_0x2b7dbc-0x171;const _0x24b357=a109_0x24b3();let _0x43d377=_0x24b357[_0x2b7dbc];return _0x43d377;}export const DEFAULT_API_DIR=a109_0xb1d16c(0x17a);
@@ -1 +1 @@
1
- const a110_0xa84346=a110_0x165c;function a110_0x3e80(){const _0x4712a9=['401359rABIUZ','read','1515771lLNRtt','104vsNWVV','7160nStCfS','2940126FqrbCq','2146362RvYaCl','high-risk-write','4890606ogEkQD','4196LOFBuV','19515933xoZvKp','write'];a110_0x3e80=function(){return _0x4712a9;};return a110_0x3e80();}(function(_0x51b1dc,_0x401cd2){const _0x2ae99d=a110_0x165c,_0x2b5203=_0x51b1dc();while(!![]){try{const _0x26bfb9=parseInt(_0x2ae99d(0x184))/0x1+-parseInt(_0x2ae99d(0x188))/0x2+parseInt(_0x2ae99d(0x187))/0x3+parseInt(_0x2ae99d(0x18b))/0x4*(parseInt(_0x2ae99d(0x186))/0x5)+parseInt(_0x2ae99d(0x18a))/0x6+parseInt(_0x2ae99d(0x182))/0x7*(-parseInt(_0x2ae99d(0x185))/0x8)+-parseInt(_0x2ae99d(0x18c))/0x9;if(_0x26bfb9===_0x401cd2)break;else _0x2b5203['push'](_0x2b5203['shift']());}catch(_0x5696b9){_0x2b5203['push'](_0x2b5203['shift']());}}}(a110_0x3e80,0xc9ae3));function a110_0x165c(_0x7b17c2,_0x4b17b5){_0x7b17c2=_0x7b17c2-0x181;const _0x3e80eb=a110_0x3e80();let _0x165cbe=_0x3e80eb[_0x7b17c2];return _0x165cbe;}export const RISK_LEVEL_VALUES=[a110_0xa84346(0x183),a110_0xa84346(0x181),a110_0xa84346(0x189)];
1
+ function a110_0x622c(){const _0xff81e7=['high-risk-write','read','2OlQfCe','22XwsMuG','769207OeNxsK','2563578UPyOWV','411932BeuvOW','5378415VrCeRy','275190eNBfqD','1058226otyktg','2953345kLWhuh','6pPsnes','8SBkeZU'];a110_0x622c=function(){return _0xff81e7;};return a110_0x622c();}const a110_0x288351=a110_0x7ad8;(function(_0x3faafc,_0x3f7dd1){const _0x25b738=a110_0x7ad8,_0x31f690=_0x3faafc();while(!![]){try{const _0x5a8ff4=parseInt(_0x25b738(0x1be))/0x1*(parseInt(_0x25b738(0x1bc))/0x2)+-parseInt(_0x25b738(0x1c3))/0x3+-parseInt(_0x25b738(0x1c0))/0x4+parseInt(_0x25b738(0x1c4))/0x5*(parseInt(_0x25b738(0x1b8))/0x6)+-parseInt(_0x25b738(0x1c1))/0x7+-parseInt(_0x25b738(0x1b9))/0x8*(-parseInt(_0x25b738(0x1bf))/0x9)+-parseInt(_0x25b738(0x1c2))/0xa*(-parseInt(_0x25b738(0x1bd))/0xb);if(_0x5a8ff4===_0x3f7dd1)break;else _0x31f690['push'](_0x31f690['shift']());}catch(_0x3e3f00){_0x31f690['push'](_0x31f690['shift']());}}}(a110_0x622c,0x74226));function a110_0x7ad8(_0x116fa2,_0x5eeef4){_0x116fa2=_0x116fa2-0x1b8;const _0x622cf3=a110_0x622c();let _0x7ad827=_0x622cf3[_0x116fa2];return _0x7ad827;}export const RISK_LEVEL_VALUES=[a110_0x288351(0x1bb),'write',a110_0x288351(0x1ba)];
package/lib/context.js CHANGED
@@ -1 +1 @@
1
- const a111_0xcd8bcc=a111_0x2d8f;(function(_0x287713,_0x37e72d){const _0x24ad89=a111_0x2d8f,_0x374508=_0x287713();while(!![]){try{const _0x36020b=-parseInt(_0x24ad89(0x185))/0x1*(-parseInt(_0x24ad89(0x1d0))/0x2)+-parseInt(_0x24ad89(0x1ad))/0x3+-parseInt(_0x24ad89(0x1c8))/0x4+-parseInt(_0x24ad89(0x1bf))/0x5*(parseInt(_0x24ad89(0x1ce))/0x6)+-parseInt(_0x24ad89(0x197))/0x7*(parseInt(_0x24ad89(0x1b7))/0x8)+-parseInt(_0x24ad89(0x1c0))/0x9+-parseInt(_0x24ad89(0x1c4))/0xa*(-parseInt(_0x24ad89(0x18b))/0xb);if(_0x36020b===_0x37e72d)break;else _0x374508['push'](_0x374508['shift']());}catch(_0x1b34c1){_0x374508['push'](_0x374508['shift']());}}}(a111_0x80ed,0xed507));import{readFileSync,writeFileSync,existsSync,mkdirSync,renameSync,unlinkSync}from'node:fs';import{resolve,dirname,parse}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{getIsSessionValid}from'./auth/is-session-valid.js';import{CliErrors}from'./errors.js';function a111_0x2d8f(_0x3167fe,_0x4a049f){_0x3167fe=_0x3167fe-0x185;const _0x80ed54=a111_0x80ed();let _0x2d8ffa=_0x80ed54[_0x3167fe];return _0x2d8ffa;}import{CLI_BIN_NAME}from'./constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';function env(_0x3196a0){return process.env[`RABETBASE_${_0x3196a0}`]||process.env[`LOVRABET_${_0x3196a0}`]||undefined;}export const NEW_CONFIG_NAME=a111_0xcd8bcc(0x1ac);export const CONFIG_NAMES=[a111_0xcd8bcc(0x1ac),'.lovrabet.json',a111_0xcd8bcc(0x1d1)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a111_0xcd8bcc(0x1af)](_0x738d6=>_0x738d6!==NEW_CONFIG_NAME);export function resolveConfigPath(_0x195dba){for(const _0x57a956 of CONFIG_NAMES){const _0x55b089=resolve(_0x195dba,_0x57a956);if(existsSync(_0x55b089))return _0x55b089;}return undefined;}export function findProjectRootDirectory(_0x21e835=process[a111_0xcd8bcc(0x1cf)]()){let _0x1f6e10=resolve(_0x21e835);const {root:_0x2fbb0e}=parse(_0x1f6e10),_0x10c8a7=homedir();while(!![]){if(resolveConfigPath(_0x1f6e10)){if(_0x1f6e10===_0x10c8a7)break;return _0x1f6e10;}if(_0x1f6e10===_0x2fbb0e||_0x1f6e10===_0x10c8a7)break;const _0x4b56cf=dirname(_0x1f6e10);if(_0x4b56cf===_0x1f6e10)break;_0x1f6e10=_0x4b56cf;}return resolve(_0x21e835);}export async function createContext(_0x574763){const _0x49e1ac=a111_0xcd8bcc,_0x3c6177=readRawConfig(),_0x1b35aa=buildConfig(_0x3c6177,_0x574763),{initEnv:_0x2eb72e}=await import('./constant/env.js');if(_0x1b35aa[_0x49e1ac(0x192)])_0x2eb72e(_0x1b35aa['env']);else _0x574763[_0x49e1ac(0x192)]&&typeof _0x574763[_0x49e1ac(0x192)]===_0x49e1ac(0x19f)&&_0x2eb72e(_0x574763[_0x49e1ac(0x192)]);const {initDomains:_0x2e31ef,getUserDomain:_0x11ec15,getApiDomain:_0x1f6d92}=await import(_0x49e1ac(0x19c));_0x2e31ef({'apiDomain':_0x3c6177[_0x49e1ac(0x19b)]||undefined,'userDomain':_0x3c6177[_0x49e1ac(0x193)]||undefined,'runtimeDomain':_0x3c6177[_0x49e1ac(0x1cb)]||undefined});const _0x35578a={'apiDomain':_0x1f6d92(),'userDomain':_0x11ec15()},_0x18ece3=await buildAuth(_0x1b35aa);logger[_0x49e1ac(0x187)](process['cwd']());const _0x2b6991=(CLI_BIN_NAME+'\x20'+process[_0x49e1ac(0x1ba)][_0x49e1ac(0x1ca)](0x2)['join']('\x20'))[_0x49e1ac(0x1d2)]();logger['setRawCommand'](_0x2b6991);const {isNonInteractive:_0x3bd77e}=await import(_0x49e1ac(0x18a)),_0x13e220=_0x3bd77e(_0x574763);return{'config':_0x1b35aa,'auth':_0x18ece3,'logger':logger,'env':_0x35578a,'nonInteractive':_0x13e220};}export function buildConfigFromFlags(_0x435920){return buildConfig(readRawConfig(),_0x435920);}export function getProjectConfigPath(){const _0x1520af=a111_0xcd8bcc;return resolveConfigPath(process[_0x1520af(0x1cf)]());}function a111_0x80ed(){const _0x3e2d37=['pageSize','authRequired','appcode','projectConfig','env','userDomain','locale','silent','data','24493xLvjHf','defaultApp','find','RISK_LEVEL','apiDomain','./constant/domain.js','apps','migrated','string','riskLevel','apiDir','write','inherit','./auth/get-cookie.js','APPCODE','\x0a\x20\x20','read','message','PAGE_SIZE','missing','api.ts','.rabetbase.json','2212143FwEdcS','COOKIE','filter','FORMAT','parse','set','length','-api.ts','error','empty','3368eCgFtS','entries','warn','argv','values','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','keys','merged','6755yyEaCA','13459896EIKZMT','map','get','ENV','120OqAPbf','daily','status','https://g.lovrabet.com/dist/lovrabet-skill','5850780TapviR','object','slice','runtimeDomain','Project','accessKey','2496GCQgGm','cwd','756092ijuVHr','.lovrabetrc','trim','app','cookie','1xxZdSV','format','setLogPath','APP','template_base_url','./utils/is-non-interactive.js','5797649zPQvjG','config','replace'];a111_0x80ed=function(){return _0x3e2d37;};return a111_0x80ed();}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x445e72){const _0x47f4ba=a111_0xcd8bcc;if(!existsSync(_0x445e72))return{'status':_0x47f4ba(0x1aa)};try{const _0x33ffe8=readFileSync(_0x445e72,{'encoding':'utf8'});if(!_0x33ffe8?.[_0x47f4ba(0x1d2)]())return{'status':_0x47f4ba(0x1b6)};const _0x2f380d=JSON[_0x47f4ba(0x1b1)](_0x33ffe8);return{'status':'ok','data':_0x2f380d};}catch(_0x3a7150){return{'status':_0x47f4ba(0x1b5),'message':_0x3a7150 instanceof Error?_0x3a7150['message']:String(_0x3a7150)};}}function parseCliConfigJsonFile(_0x534ee8,_0x5165c5,_0x21c6cd){const _0x4d54df=a111_0xcd8bcc,_0x1569cf=inspectCliConfigJsonFile(_0x534ee8);if(_0x1569cf[_0x4d54df(0x1c6)]===_0x4d54df(0x1aa)||_0x1569cf[_0x4d54df(0x1c6)]==='empty')return{};if(_0x1569cf['status']==='ok')return _0x1569cf[_0x4d54df(0x196)];return _0x5165c5===_0x4d54df(0x1b9)&&_0x21c6cd&&console[_0x4d54df(0x1b5)](CLI_BIN_NAME+':\x20'+_0x21c6cd+_0x4d54df(0x1bc)+_0x534ee8+_0x4d54df(0x1a6)+_0x1569cf[_0x4d54df(0x1a8)]),{};}const normalizedWriteCache=new Map();function normalizeLegacyConfigShape(_0x544fa7){const _0x248e31=a111_0xcd8bcc;if(!_0x544fa7||typeof _0x544fa7!==_0x248e31(0x1c9))return{'config':{},'migrated':![]};const _0x1ec514={..._0x544fa7},_0x3ea702=_0x1ec514[_0x248e31(0x19d)]&&typeof _0x1ec514[_0x248e31(0x19d)]===_0x248e31(0x1c9)?{..._0x1ec514['apps']}:{},_0x44de28=Object['keys'](_0x3ea702)[_0x248e31(0x1b3)],_0x4a0ea3=_0x1ec514[_0x248e31(0x190)]||_0x1ec514[_0x248e31(0x1d3)];let _0xc1d464=![];if(_0x4a0ea3&&_0x44de28===0x0){const _0xf9eaf4=typeof _0x1ec514[_0x248e31(0x198)]==='string'&&_0x1ec514[_0x248e31(0x198)][_0x248e31(0x1d2)]()?_0x1ec514[_0x248e31(0x198)]:String(_0x4a0ea3)[_0x248e31(0x1d2)]();_0x3ea702[_0xf9eaf4]={'appcode':String(_0x4a0ea3)['trim'](),..._0x1ec514[_0x248e31(0x192)]!=null?{'env':_0x1ec514['env']}:{},..._0x1ec514[_0x248e31(0x1a1)]!=null?{'apiDir':_0x1ec514[_0x248e31(0x1a1)]}:{},..._0x1ec514[_0x248e31(0x1d4)]!=null?{'cookie':_0x1ec514[_0x248e31(0x1d4)]}:{},..._0x1ec514[_0x248e31(0x1cd)]!=null?{'accessKey':_0x1ec514[_0x248e31(0x1cd)]}:{},..._0x1ec514[_0x248e31(0x186)]!=null?{'format':_0x1ec514['format']}:{},..._0x1ec514[_0x248e31(0x18e)]!=null?{'pageSize':_0x1ec514[_0x248e31(0x18e)]}:{},..._0x1ec514['riskLevel']!=null?{'riskLevel':_0x1ec514[_0x248e31(0x1a0)]}:{},..._0x1ec514[_0x248e31(0x194)]!=null?{'locale':_0x1ec514[_0x248e31(0x194)]}:{}},_0x1ec514[_0x248e31(0x19d)]=_0x3ea702;if(!_0x1ec514[_0x248e31(0x198)])_0x1ec514[_0x248e31(0x198)]=_0xf9eaf4;_0xc1d464=!![];}return(_0x248e31(0x190)in _0x1ec514||_0x248e31(0x1d3)in _0x1ec514)&&(delete _0x1ec514[_0x248e31(0x190)],delete _0x1ec514['app'],_0xc1d464=!![]),{'config':_0x1ec514,'migrated':_0xc1d464};}function writeNormalizedConfigIfNeeded(_0x247be1,_0x168a90){const _0x9cfd34=a111_0xcd8bcc,_0x380e9a=JSON['stringify'](_0x168a90,null,0x2)+'\x0a';if(normalizedWriteCache[_0x9cfd34(0x1c2)](_0x247be1)===_0x380e9a)return;writeConfigFile(_0x247be1,_0x168a90),normalizedWriteCache[_0x9cfd34(0x1b2)](_0x247be1,_0x380e9a);}function parseAndNormalizeConfig(_0x2d34fc,_0x9e2b33,_0x5041a6){const _0x1497e6=a111_0xcd8bcc,_0x9aaa6f=parseCliConfigJsonFile(_0x2d34fc,_0x9e2b33,_0x5041a6),_0x2f3fd9=normalizeLegacyConfigShape(_0x9aaa6f);if(_0x2f3fd9[_0x1497e6(0x19e)])try{writeNormalizedConfigIfNeeded(_0x2d34fc,_0x2f3fd9[_0x1497e6(0x18c)]);}catch{}return _0x2f3fd9[_0x1497e6(0x18c)];}export function loadRawConfigLayers(_0x579527){const _0x2820c4=a111_0xcd8bcc;let _0x3fbc46={},_0x2325cf={};const _0x9d20ec=resolveConfigPath(homedir());_0x9d20ec&&(_0x3fbc46=parseAndNormalizeConfig(_0x9d20ec,_0x2820c4(0x1b9),'Global'));const _0x3c1319=_0x579527??findProjectRootDirectory(),_0x2885e2=resolveConfigPath(_0x3c1319);return _0x2885e2&&(_0x2325cf=parseAndNormalizeConfig(_0x2885e2,_0x2820c4(0x1b9),_0x2820c4(0x1cc))),{'globalPath':_0x9d20ec,'projectPath':_0x2885e2,'globalConfig':_0x3fbc46,'projectConfig':_0x2325cf};}function mergeRawConfigLayers(_0x51d431){const _0x43c4b7=a111_0xcd8bcc,{globalConfig:_0x3ec2e2,projectConfig:_0x1eb68f}=_0x51d431;if(_0x1eb68f[_0x43c4b7(0x1a3)]===![]){const _0x58cfda={..._0x1eb68f};delete _0x58cfda[_0x43c4b7(0x1a3)];const _0x5960d4=_0x1eb68f['apps']&&typeof _0x1eb68f[_0x43c4b7(0x19d)]===_0x43c4b7(0x1c9)?_0x1eb68f[_0x43c4b7(0x19d)]:{};Object[_0x43c4b7(0x1bd)](_0x5960d4)['length']>0x0?_0x58cfda['apps']=_0x5960d4:delete _0x58cfda[_0x43c4b7(0x19d)];if(_0x43c4b7(0x198)in _0x1eb68f)_0x58cfda['defaultApp']=_0x1eb68f['defaultApp'];else Object[_0x43c4b7(0x1bd)](_0x5960d4)[_0x43c4b7(0x1b3)]>0x0&&(_0x58cfda['defaultApp']=Object[_0x43c4b7(0x1bd)](_0x5960d4)[0x0]);return _0x58cfda;}const _0x574773=_0x3ec2e2[_0x43c4b7(0x19d)]&&typeof _0x3ec2e2[_0x43c4b7(0x19d)]===_0x43c4b7(0x1c9)?_0x3ec2e2[_0x43c4b7(0x19d)]:{},_0x3f13e7=_0x1eb68f[_0x43c4b7(0x19d)]&&typeof _0x1eb68f[_0x43c4b7(0x19d)]===_0x43c4b7(0x1c9)?_0x1eb68f[_0x43c4b7(0x19d)]:{},_0x550533={..._0x574773,..._0x3f13e7},_0x2a4b06={..._0x3ec2e2,..._0x1eb68f};Object[_0x43c4b7(0x1bd)](_0x550533)[_0x43c4b7(0x1b3)]>0x0&&(_0x2a4b06[_0x43c4b7(0x19d)]=_0x550533);if(_0x43c4b7(0x198)in _0x1eb68f)_0x2a4b06['defaultApp']=_0x1eb68f['defaultApp'];else{if(_0x3f13e7&&Object[_0x43c4b7(0x1bd)](_0x3f13e7)[_0x43c4b7(0x1b3)]>0x0)_0x2a4b06[_0x43c4b7(0x198)]=Object[_0x43c4b7(0x1bd)](_0x3f13e7)[0x0];else{if(_0x3ec2e2[_0x43c4b7(0x198)])_0x2a4b06['defaultApp']=_0x3ec2e2[_0x43c4b7(0x198)];else{const _0x1e4e7c=Object[_0x43c4b7(0x1bd)](_0x574773);_0x1e4e7c[_0x43c4b7(0x1b3)]>0x0&&(_0x2a4b06[_0x43c4b7(0x198)]=_0x1e4e7c[0x0]);}}}return _0x2a4b06;}export function readRawConfigWithLayers(_0x354fae){const _0x4baa10=loadRawConfigLayers(_0x354fae);return{'config':mergeRawConfigLayers(_0x4baa10),'layers':_0x4baa10};}export function readRawConfig(_0x56a68d){return mergeRawConfigLayers(loadRawConfigLayers(_0x56a68d));}export function getConfigAppCode(_0xfbd6c8){const _0x2db7e0=a111_0xcd8bcc,_0x39c1cc=readRawConfig(_0xfbd6c8);if(_0x39c1cc[_0x2db7e0(0x19d)]&&typeof _0x39c1cc['apps']===_0x2db7e0(0x1c9)){const _0x1cde1d=_0x39c1cc[_0x2db7e0(0x198)];if(_0x1cde1d&&_0x39c1cc[_0x2db7e0(0x19d)][_0x1cde1d]?.[_0x2db7e0(0x190)])return String(_0x39c1cc[_0x2db7e0(0x19d)][_0x1cde1d][_0x2db7e0(0x190)])[_0x2db7e0(0x1d2)]();const _0x213c7c=Object[_0x2db7e0(0x1bb)](_0x39c1cc['apps'])[0x0];if(_0x213c7c?.[_0x2db7e0(0x190)])return String(_0x213c7c['appcode'])[_0x2db7e0(0x1d2)]();}const _0x4b80a6=_0x39c1cc[_0x2db7e0(0x190)]||_0x39c1cc['app'];if(typeof _0x4b80a6!==_0x2db7e0(0x19f)||_0x4b80a6[_0x2db7e0(0x1d2)]()==='')return undefined;return _0x4b80a6['trim']();}export function getMultiAppConfigs(_0x174df6='project',_0x5db25f){const _0x2ab857=a111_0xcd8bcc,_0xedf821=_0x174df6===_0x2ab857(0x1be)?readRawConfig(_0x5db25f):loadRawConfigLayers(_0x5db25f)[_0x2ab857(0x191)],_0x3666f8=_0xedf821[_0x2ab857(0x19d)];if(!_0x3666f8||typeof _0x3666f8!==_0x2ab857(0x1c9)||Object[_0x2ab857(0x1bd)](_0x3666f8)[_0x2ab857(0x1b3)]===0x0)return null;const _0x4d87b4=_0xedf821[_0x2ab857(0x198)];return Object[_0x2ab857(0x1b8)](_0x3666f8)[_0x2ab857(0x1c1)](([_0x31ceb7,_0x2a65df])=>({'name':_0x31ceb7,'appcode':_0x2a65df?.['appcode']||'','isDefault':_0x31ceb7===_0x4d87b4,'env':_0x2a65df?.['env'],'apiDir':_0x2a65df?.[_0x2ab857(0x1a1)],'cookie':_0x2a65df?.[_0x2ab857(0x1d4)]||undefined}))[_0x2ab857(0x1af)](_0x28c36d=>_0x28c36d[_0x2ab857(0x190)]);}export function getTemplateBaseUrl(_0x10ccf0){const _0x4a72a8=a111_0xcd8bcc,_0x10ecf1=readRawConfig(_0x10ccf0);if(_0x10ecf1[_0x4a72a8(0x189)]&&typeof _0x10ecf1[_0x4a72a8(0x189)]==='string')return _0x10ecf1[_0x4a72a8(0x189)][_0x4a72a8(0x18d)](/\/$/,'');return _0x4a72a8(0x1c7);}export function readConfigFile(_0x23ba5b){const _0x3476b1=a111_0xcd8bcc;return parseAndNormalizeConfig(_0x23ba5b,_0x3476b1(0x195));}export function writeConfigFile(_0x43d49b,_0x518829){const _0x1720c8=dirname(_0x43d49b);!existsSync(_0x1720c8)&&mkdirSync(_0x1720c8,{'recursive':!![]});const _0x201987=_0x43d49b+'.tmp';try{writeFileSync(_0x201987,JSON['stringify'](_0x518829,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0x201987,_0x43d49b);}catch(_0xa2b735){try{unlinkSync(_0x201987);}catch{}throw _0xa2b735;}}export function resolveWriteConfigPath(_0x2975f9){const _0x1de376=a111_0xcd8bcc,_0x5ca911=_0x2975f9==='project'?process[_0x1de376(0x1cf)]():homedir(),_0x315564=resolveConfigPath(_0x5ca911);return _0x315564??resolve(_0x5ca911,NEW_CONFIG_NAME);}function buildConfig(_0x17d366,_0x48161a){const _0x48b68e=a111_0xcd8bcc,_0x5a2b69={};if(_0x17d366['apps']&&typeof _0x17d366[_0x48b68e(0x19d)]===_0x48b68e(0x1c9))for(const [_0x5e8d87,_0x15f99e]of Object[_0x48b68e(0x1b8)](_0x17d366[_0x48b68e(0x19d)])){_0x15f99e&&typeof _0x15f99e===_0x48b68e(0x1c9)&&_0x15f99e[_0x48b68e(0x190)]&&(_0x5a2b69[_0x5e8d87]=_0x15f99e);}const _0x5b4cbc=_0x17d366[_0x48b68e(0x198)]||undefined,_0x14cffd=Object[_0x48b68e(0x1bd)](_0x5a2b69)[_0x48b68e(0x1b3)]>0x0,_0x37b73c=_0x48161a[_0x48b68e(0x1d3)]||env(_0x48b68e(0x188))||undefined,_0x1d405f=_0x37b73c||_0x5b4cbc||undefined,_0x357835=_0x48161a['appcode']||env(_0x48b68e(0x1a5))||undefined,_0x44a90d=_0x357835?Object[_0x48b68e(0x1b8)](_0x5a2b69)[_0x48b68e(0x199)](([,_0x1b7428])=>_0x1b7428?.[_0x48b68e(0x190)]===_0x357835):undefined,_0x30dd54=_0x44a90d?.[0x0],_0x51d809=_0x44a90d?.[0x1];let _0xb313c7=_0x357835?_0x30dd54:_0x1d405f,_0x396dc4=_0xb313c7&&_0x5a2b69[_0xb313c7]?_0x5a2b69[_0xb313c7]:undefined;_0x357835&&_0x51d809&&(_0x396dc4=_0x51d809);const _0x26bc5d=_0x357835?_0x51d809??_0x396dc4:_0x396dc4,_0x315a5d=_0x37b73c||(_0x357835?_0x30dd54:undefined),_0x480c61=_0x357835||_0x26bc5d?.['appcode']||undefined,_0x25eace=_0x48161a[_0x48b68e(0x192)]||env(_0x48b68e(0x1c3))||_0x26bc5d?.['env']||_0x17d366[_0x48b68e(0x192)]||DEFAULT_CONFIG_VALUES[_0x48b68e(0x192)],_0x283a34=_0x26bc5d?.['locale']||_0x17d366[_0x48b68e(0x194)]||DEFAULT_CONFIG_VALUES['locale'],_0x31a8f8=env(_0x48b68e(0x1ae))||_0x26bc5d?.['cookie']||_0x17d366['cookie']||undefined,_0x38a83a=env('ACCESS_KEY')||_0x26bc5d?.[_0x48b68e(0x1cd)]||_0x17d366['accessKey']||undefined,_0x2cb48a=_0x48161a['format']||env(_0x48b68e(0x1b0))||_0x26bc5d?.[_0x48b68e(0x186)]||_0x17d366[_0x48b68e(0x186)],_0x4b7653=normalizeLegacyOutputFormat(_0x2cb48a),_0x29147a=env(_0x48b68e(0x1a9))||_0x26bc5d?.[_0x48b68e(0x18e)]||_0x17d366[_0x48b68e(0x18e)],_0xf083af=_0x29147a?Number(_0x29147a)||undefined:undefined,_0x4bbbf0=env(_0x48b68e(0x19a))||env('MAX_RISK')||_0x26bc5d?.[_0x48b68e(0x1a0)]||_0x17d366[_0x48b68e(0x1a0)]||_0x17d366['maxRisk'],_0x584d52=_0x4bbbf0===_0x48b68e(0x1a7)||_0x4bbbf0===_0x48b68e(0x1a2)?_0x4bbbf0:DEFAULT_CONFIG_VALUES['riskLevel'],_0xa5f3b6=env('VERBOSE'),_0x41c66d=_0xa5f3b6==='1'||_0xa5f3b6==='true',_0x5e22c0=_0x26bc5d?.[_0x48b68e(0x1a1)]||_0x17d366[_0x48b68e(0x1a1)]||DEFAULT_CONFIG_VALUES['apiDir'],_0x4b1885=isDaily(normalizeEnv(String(_0x25eace)))?_0x48b68e(0x1c5):'production';return{'appCode':typeof _0x480c61===_0x48b68e(0x19f)&&_0x480c61['trim']()?_0x480c61['trim']():undefined,'env':_0x4b1885,'locale':_0x283a34,'cookie':_0x31a8f8,'accessKey':_0x38a83a,'format':_0x4b7653,'pageSize':_0xf083af,'riskLevel':_0x584d52,'verbose':_0x41c66d,'apiDir':_0x5e22c0,'apps':_0x5a2b69,'defaultApp':_0x5b4cbc,'currentApp':_0x14cffd?_0xb313c7:undefined,'explicitAppName':_0x315a5d,'raw':_0x17d366};}async function buildAuth(_0x1a77ed){const _0x36f103=a111_0xcd8bcc,{getCookie:_0x922d88}=await import(_0x36f103(0x1a4)),_0x3d1271=_0x1a77ed[_0x36f103(0x1d4)]||_0x922d88(),_0x1ad804=_0x3d1271?await getIsSessionValid():![];return{'cookie':_0x3d1271,'isLoggedIn':_0x1ad804,async 'getOrLogin'(){const _0x46db41=_0x36f103;if(_0x3d1271&&_0x1ad804)return _0x3d1271;throw CliErrors[_0x46db41(0x18f)]();}};}export function resolveApiFilePath(_0x219feb,_0x2c3040){const _0x5c7769=a111_0xcd8bcc,_0x2a5f29=resolve(process[_0x5c7769(0x1cf)](),_0x219feb),_0x3e5d60=resolve(_0x2a5f29,_0x5c7769(0x1ab));if(!_0x2c3040)return _0x3e5d60;const _0x15f2bc=readRawConfig(),_0x10e273=_0x15f2bc[_0x5c7769(0x19d)]&&typeof _0x15f2bc['apps']===_0x5c7769(0x1c9)?_0x15f2bc[_0x5c7769(0x19d)]:{},_0x4fadf7=Object['entries'](_0x10e273)['find'](([,_0x177529])=>_0x177529?.['appcode']===_0x2c3040);if(!_0x4fadf7)return _0x3e5d60;const [_0x4cba63,_0x172e0b]=_0x4fadf7,_0x2bf88c=typeof _0x15f2bc[_0x5c7769(0x198)]===_0x5c7769(0x19f)?_0x15f2bc[_0x5c7769(0x198)]:undefined;if(_0x172e0b?.['apiDir'])return _0x3e5d60;if(_0x2bf88c&&_0x4cba63!==_0x2bf88c)return resolve(_0x2a5f29,_0x4cba63+_0x5c7769(0x1b4));return _0x3e5d60;}
1
+ const a111_0x235eeb=a111_0x4b16;(function(_0x563410,_0x6b7ed8){const _0x399115=a111_0x4b16,_0x252979=_0x563410();while(!![]){try{const _0x568aa4=parseInt(_0x399115(0x212))/0x1*(parseInt(_0x399115(0x206))/0x2)+-parseInt(_0x399115(0x207))/0x3+parseInt(_0x399115(0x22b))/0x4*(-parseInt(_0x399115(0x219))/0x5)+parseInt(_0x399115(0x1ec))/0x6+-parseInt(_0x399115(0x1dc))/0x7*(-parseInt(_0x399115(0x1dd))/0x8)+-parseInt(_0x399115(0x1e3))/0x9+parseInt(_0x399115(0x1e4))/0xa*(parseInt(_0x399115(0x20e))/0xb);if(_0x568aa4===_0x6b7ed8)break;else _0x252979['push'](_0x252979['shift']());}catch(_0x519376){_0x252979['push'](_0x252979['shift']());}}}(a111_0x1239,0x21822));import{readFileSync,writeFileSync,existsSync,mkdirSync,renameSync,unlinkSync}from'node:fs';import{resolve,dirname,parse}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{getIsSessionValid}from'./auth/is-session-valid.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';function a111_0x4b16(_0x2a2164,_0x361aaa){_0x2a2164=_0x2a2164-0x1d8;const _0x1239fd=a111_0x1239();let _0x4b1646=_0x1239fd[_0x2a2164];return _0x4b1646;}import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';function env(_0x238b4b){return process.env[`RABETBASE_${_0x238b4b}`]||process.env[`LOVRABET_${_0x238b4b}`]||undefined;}export const NEW_CONFIG_NAME=a111_0x235eeb(0x200);export const CONFIG_NAMES=[a111_0x235eeb(0x200),a111_0x235eeb(0x1f1),a111_0x235eeb(0x1ef)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a111_0x235eeb(0x1f7)](_0x52507d=>_0x52507d!==NEW_CONFIG_NAME);export function resolveConfigPath(_0x4c4809){for(const _0x241fb8 of CONFIG_NAMES){const _0x1fed26=resolve(_0x4c4809,_0x241fb8);if(existsSync(_0x1fed26))return _0x1fed26;}return undefined;}export function findProjectRootDirectory(_0x5a0423=process[a111_0x235eeb(0x22a)]()){let _0xddc69a=resolve(_0x5a0423);const {root:_0x44440f}=parse(_0xddc69a),_0x1499ae=homedir();while(!![]){if(resolveConfigPath(_0xddc69a)){if(_0xddc69a===_0x1499ae)break;return _0xddc69a;}if(_0xddc69a===_0x44440f||_0xddc69a===_0x1499ae)break;const _0x452796=dirname(_0xddc69a);if(_0x452796===_0xddc69a)break;_0xddc69a=_0x452796;}return resolve(_0x5a0423);}export async function createContext(_0x18579c){const _0x3cd71d=a111_0x235eeb,_0x5733ad=readRawConfig(),_0x2d12bf=buildConfig(_0x5733ad,_0x18579c),{initEnv:_0x1b1738}=await import(_0x3cd71d(0x1d9));if(_0x2d12bf['env'])_0x1b1738(_0x2d12bf['env']);else _0x18579c[_0x3cd71d(0x21c)]&&typeof _0x18579c['env']===_0x3cd71d(0x1fd)&&_0x1b1738(_0x18579c[_0x3cd71d(0x21c)]);const {initDomains:_0xdbc783,getUserDomain:_0x3e0ccf,getApiDomain:_0x327288}=await import(_0x3cd71d(0x1ea));_0xdbc783({'apiDomain':_0x5733ad[_0x3cd71d(0x21d)]||undefined,'userDomain':_0x5733ad[_0x3cd71d(0x205)]||undefined,'runtimeDomain':_0x5733ad[_0x3cd71d(0x222)]||undefined});const _0x5c3845={'apiDomain':_0x327288(),'userDomain':_0x3e0ccf()},_0x4cc9d8=await buildAuth(_0x2d12bf);logger[_0x3cd71d(0x202)](process['cwd']());const _0x43d287=(CLI_BIN_NAME+'\x20'+process[_0x3cd71d(0x1e5)][_0x3cd71d(0x1e1)](0x2)[_0x3cd71d(0x209)]('\x20'))[_0x3cd71d(0x1fb)]();logger[_0x3cd71d(0x211)](_0x43d287);const {isNonInteractive:_0x9fde9e}=await import(_0x3cd71d(0x1f2)),_0x57c7fc=_0x9fde9e(_0x18579c);return{'config':_0x2d12bf,'auth':_0x4cc9d8,'logger':logger,'env':_0x5c3845,'nonInteractive':_0x57c7fc};}export function buildConfigFromFlags(_0x5d6b43){return buildConfig(readRawConfig(),_0x5d6b43);}export function getProjectConfigPath(){const _0x401e9d=a111_0x235eeb;return resolveConfigPath(process[_0x401e9d(0x22a)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x78ab53){const _0xb9b772=a111_0x235eeb;if(!existsSync(_0x78ab53))return{'status':_0xb9b772(0x1ed)};try{const _0x2f41e6=readFileSync(_0x78ab53,{'encoding':_0xb9b772(0x1eb)});if(!_0x2f41e6?.[_0xb9b772(0x1fb)]())return{'status':_0xb9b772(0x20d)};const _0x3f342e=JSON[_0xb9b772(0x20a)](_0x2f41e6);return{'status':'ok','data':_0x3f342e};}catch(_0x24b4be){return{'status':'error','message':_0x24b4be instanceof Error?_0x24b4be['message']:String(_0x24b4be)};}}function parseCliConfigJsonFile(_0x8c75f4,_0x2347dd,_0x3fce0d){const _0x295bb3=a111_0x235eeb,_0x225d40=inspectCliConfigJsonFile(_0x8c75f4);if(_0x225d40[_0x295bb3(0x1e8)]==='missing'||_0x225d40[_0x295bb3(0x1e8)]==='empty')return{};if(_0x225d40[_0x295bb3(0x1e8)]==='ok')return _0x225d40[_0x295bb3(0x1e9)];return _0x2347dd===_0x295bb3(0x227)&&_0x3fce0d&&console[_0x295bb3(0x1e2)](CLI_BIN_NAME+':\x20'+_0x3fce0d+_0x295bb3(0x1e6)+_0x8c75f4+_0x295bb3(0x1e0)+_0x225d40[_0x295bb3(0x204)]),{};}const normalizedWriteCache=new Map();function normalizeLegacyConfigShape(_0x11cdd0){const _0x3f6920=a111_0x235eeb;if(!_0x11cdd0||typeof _0x11cdd0!==_0x3f6920(0x1db))return{'config':{},'migrated':![]};const _0x55deec={..._0x11cdd0},_0x1dd225=_0x55deec['apps']&&typeof _0x55deec[_0x3f6920(0x1f6)]===_0x3f6920(0x1db)?{..._0x55deec[_0x3f6920(0x1f6)]}:{},_0x5bb035=Object[_0x3f6920(0x21e)](_0x1dd225)[_0x3f6920(0x216)],_0x1f8f87=_0x55deec[_0x3f6920(0x21b)]||_0x55deec['app'];let _0x1d6f60=![];if(_0x1f8f87&&_0x5bb035===0x0){const _0x464680=typeof _0x55deec['defaultApp']===_0x3f6920(0x1fd)&&_0x55deec['defaultApp']['trim']()?_0x55deec[_0x3f6920(0x1ee)]:String(_0x1f8f87)[_0x3f6920(0x1fb)]();_0x1dd225[_0x464680]={'appcode':String(_0x1f8f87)['trim'](),..._0x55deec[_0x3f6920(0x21c)]!=null?{'env':_0x55deec[_0x3f6920(0x21c)]}:{},..._0x55deec[_0x3f6920(0x220)]!=null?{'apiDir':_0x55deec[_0x3f6920(0x220)]}:{},..._0x55deec[_0x3f6920(0x225)]!=null?{'cookie':_0x55deec[_0x3f6920(0x225)]}:{},..._0x55deec['accessKey']!=null?{'accessKey':_0x55deec['accessKey']}:{},..._0x55deec['format']!=null?{'format':_0x55deec[_0x3f6920(0x20b)]}:{},..._0x55deec[_0x3f6920(0x1f5)]!=null?{'pageSize':_0x55deec[_0x3f6920(0x1f5)]}:{},..._0x55deec[_0x3f6920(0x1f8)]!=null?{'riskLevel':_0x55deec[_0x3f6920(0x1f8)]}:{},..._0x55deec[_0x3f6920(0x1fa)]!=null?{'locale':_0x55deec[_0x3f6920(0x1fa)]}:{}},_0x55deec[_0x3f6920(0x1f6)]=_0x1dd225;if(!_0x55deec[_0x3f6920(0x1ee)])_0x55deec[_0x3f6920(0x1ee)]=_0x464680;_0x1d6f60=!![];}return(_0x3f6920(0x21b)in _0x55deec||_0x3f6920(0x1da)in _0x55deec)&&(delete _0x55deec[_0x3f6920(0x21b)],delete _0x55deec['app'],_0x1d6f60=!![]),{'config':_0x55deec,'migrated':_0x1d6f60};}function writeNormalizedConfigIfNeeded(_0x37db4b,_0x78434f){const _0x3e88b0=a111_0x235eeb,_0x47d11b=JSON[_0x3e88b0(0x22c)](_0x78434f,null,0x2)+'\x0a';if(normalizedWriteCache[_0x3e88b0(0x21f)](_0x37db4b)===_0x47d11b)return;writeConfigFile(_0x37db4b,_0x78434f),normalizedWriteCache[_0x3e88b0(0x223)](_0x37db4b,_0x47d11b);}function parseAndNormalizeConfig(_0x422700,_0x2bd8d0,_0x16739b){const _0x201ffb=a111_0x235eeb,_0x13530b=parseCliConfigJsonFile(_0x422700,_0x2bd8d0,_0x16739b),_0xfeed06=normalizeLegacyConfigShape(_0x13530b);if(_0xfeed06[_0x201ffb(0x217)])try{writeNormalizedConfigIfNeeded(_0x422700,_0xfeed06[_0x201ffb(0x218)]);}catch{}return _0xfeed06[_0x201ffb(0x218)];}export function loadRawConfigLayers(_0x101c2d){const _0x39b810=a111_0x235eeb;let _0x2fc7ba={},_0xb9e31c={};const _0x2b082e=resolveConfigPath(homedir());_0x2b082e&&(_0x2fc7ba=parseAndNormalizeConfig(_0x2b082e,'warn',_0x39b810(0x1de)));const _0x1e207f=_0x101c2d??findProjectRootDirectory(),_0x190137=resolveConfigPath(_0x1e207f);return _0x190137&&(_0xb9e31c=parseAndNormalizeConfig(_0x190137,_0x39b810(0x227),'Project')),{'globalPath':_0x2b082e,'projectPath':_0x190137,'globalConfig':_0x2fc7ba,'projectConfig':_0xb9e31c};}function mergeRawConfigLayers(_0x3611e0){const _0x577b8c=a111_0x235eeb,{globalConfig:_0x1df6a6,projectConfig:_0x30f7d6}=_0x3611e0;if(_0x30f7d6[_0x577b8c(0x20f)]===![]){const _0x55c16e={..._0x30f7d6};delete _0x55c16e[_0x577b8c(0x20f)];const _0x4364a5=_0x30f7d6['apps']&&typeof _0x30f7d6[_0x577b8c(0x1f6)]===_0x577b8c(0x1db)?_0x30f7d6['apps']:{};Object['keys'](_0x4364a5)[_0x577b8c(0x216)]>0x0?_0x55c16e[_0x577b8c(0x1f6)]=_0x4364a5:delete _0x55c16e[_0x577b8c(0x1f6)];if(_0x577b8c(0x1ee)in _0x30f7d6)_0x55c16e['defaultApp']=_0x30f7d6['defaultApp'];else Object[_0x577b8c(0x21e)](_0x4364a5)['length']>0x0&&(_0x55c16e[_0x577b8c(0x1ee)]=Object[_0x577b8c(0x21e)](_0x4364a5)[0x0]);return _0x55c16e;}const _0x43a48c=_0x1df6a6[_0x577b8c(0x1f6)]&&typeof _0x1df6a6[_0x577b8c(0x1f6)]===_0x577b8c(0x1db)?_0x1df6a6[_0x577b8c(0x1f6)]:{},_0x5cb7a7=_0x30f7d6['apps']&&typeof _0x30f7d6[_0x577b8c(0x1f6)]===_0x577b8c(0x1db)?_0x30f7d6['apps']:{},_0x1cc78a={..._0x43a48c,..._0x5cb7a7},_0x61eb58={..._0x1df6a6,..._0x30f7d6};Object[_0x577b8c(0x21e)](_0x1cc78a)[_0x577b8c(0x216)]>0x0&&(_0x61eb58[_0x577b8c(0x1f6)]=_0x1cc78a);if(_0x577b8c(0x1ee)in _0x30f7d6)_0x61eb58['defaultApp']=_0x30f7d6['defaultApp'];else{if(_0x5cb7a7&&Object[_0x577b8c(0x21e)](_0x5cb7a7)[_0x577b8c(0x216)]>0x0)_0x61eb58['defaultApp']=Object[_0x577b8c(0x21e)](_0x5cb7a7)[0x0];else{if(_0x1df6a6[_0x577b8c(0x1ee)])_0x61eb58[_0x577b8c(0x1ee)]=_0x1df6a6['defaultApp'];else{const _0x353811=Object[_0x577b8c(0x21e)](_0x43a48c);_0x353811[_0x577b8c(0x216)]>0x0&&(_0x61eb58[_0x577b8c(0x1ee)]=_0x353811[0x0]);}}}return _0x61eb58;}export function readRawConfigWithLayers(_0x1e2126){const _0x463e00=loadRawConfigLayers(_0x1e2126);return{'config':mergeRawConfigLayers(_0x463e00),'layers':_0x463e00};}export function readRawConfig(_0x860115){return mergeRawConfigLayers(loadRawConfigLayers(_0x860115));}function a111_0x1239(){const _0x9398cb=['message','userDomain','45412rVtMqA','426300QdNdgs','project','join','parse','format','find','empty','11huddVo','inherit','entries','setRawCommand','2gTQdiP','write','authRequired','MAX_RISK','length','migrated','config','5ytWvBD','projectConfig','appcode','env','apiDomain','keys','get','apiDir','silent','runtimeDomain','set','values','cookie','FORMAT','warn','replace','PAGE_SIZE','cwd','831304Ynucmf','stringify','daily','./constant/env.js','app','object','127393PnNpqW','40OsujSh','Global','COOKIE','\x0a\x20\x20','slice','error','261675oRcOvu','2285790yCuUJX','argv','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','./auth/get-cookie.js','status','data','./constant/domain.js','utf8','907590QelWnY','missing','defaultApp','.lovrabetrc','maxRisk','.lovrabet.json','./utils/is-non-interactive.js','ACCESS_KEY','https://g.lovrabet.com/dist/lovrabet-skill','pageSize','apps','filter','riskLevel','merged','locale','trim','template_base_url','string','accessKey','production','.rabetbase.json','.tmp','setLogPath','true'];a111_0x1239=function(){return _0x9398cb;};return a111_0x1239();}export function getConfigAppCode(_0x143645){const _0x324a60=a111_0x235eeb,_0xe0a590=readRawConfig(_0x143645);if(_0xe0a590[_0x324a60(0x1f6)]&&typeof _0xe0a590['apps']===_0x324a60(0x1db)){const _0x174a9f=_0xe0a590[_0x324a60(0x1ee)];if(_0x174a9f&&_0xe0a590[_0x324a60(0x1f6)][_0x174a9f]?.[_0x324a60(0x21b)])return String(_0xe0a590[_0x324a60(0x1f6)][_0x174a9f][_0x324a60(0x21b)])[_0x324a60(0x1fb)]();const _0x237a99=Object[_0x324a60(0x224)](_0xe0a590[_0x324a60(0x1f6)])[0x0];if(_0x237a99?.[_0x324a60(0x21b)])return String(_0x237a99['appcode'])['trim']();}const _0x1136b6=_0xe0a590[_0x324a60(0x21b)]||_0xe0a590[_0x324a60(0x1da)];if(typeof _0x1136b6!==_0x324a60(0x1fd)||_0x1136b6[_0x324a60(0x1fb)]()==='')return undefined;return _0x1136b6[_0x324a60(0x1fb)]();}export function getMultiAppConfigs(_0x11bdf9=a111_0x235eeb(0x208),_0x53a78a){const _0x2b4037=a111_0x235eeb,_0x5009f1=_0x11bdf9===_0x2b4037(0x1f9)?readRawConfig(_0x53a78a):loadRawConfigLayers(_0x53a78a)[_0x2b4037(0x21a)],_0x33f0ab=_0x5009f1[_0x2b4037(0x1f6)];if(!_0x33f0ab||typeof _0x33f0ab!==_0x2b4037(0x1db)||Object['keys'](_0x33f0ab)[_0x2b4037(0x216)]===0x0)return null;const _0x15b9ea=_0x5009f1[_0x2b4037(0x1ee)];return Object[_0x2b4037(0x210)](_0x33f0ab)['map'](([_0x5939be,_0x489643])=>({'name':_0x5939be,'appcode':_0x489643?.['appcode']||'','isDefault':_0x5939be===_0x15b9ea,'env':_0x489643?.[_0x2b4037(0x21c)],'apiDir':_0x489643?.[_0x2b4037(0x220)],'cookie':_0x489643?.[_0x2b4037(0x225)]||undefined}))[_0x2b4037(0x1f7)](_0x735559=>_0x735559[_0x2b4037(0x21b)]);}export function getTemplateBaseUrl(_0x38dea7){const _0x4481f6=a111_0x235eeb,_0x16797b=readRawConfig(_0x38dea7);if(_0x16797b[_0x4481f6(0x1fc)]&&typeof _0x16797b[_0x4481f6(0x1fc)]===_0x4481f6(0x1fd))return _0x16797b['template_base_url'][_0x4481f6(0x228)](/\/$/,'');return _0x4481f6(0x1f4);}export function readConfigFile(_0x24184c){const _0x86cc64=a111_0x235eeb;return parseAndNormalizeConfig(_0x24184c,_0x86cc64(0x221));}export function writeConfigFile(_0x5c3d73,_0x5b106f){const _0x1b6122=a111_0x235eeb,_0x3db38d=dirname(_0x5c3d73);!existsSync(_0x3db38d)&&mkdirSync(_0x3db38d,{'recursive':!![]});const _0x1af416=_0x5c3d73+_0x1b6122(0x201);try{writeFileSync(_0x1af416,JSON['stringify'](_0x5b106f,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0x1af416,_0x5c3d73);}catch(_0x9c6f8e){try{unlinkSync(_0x1af416);}catch{}throw _0x9c6f8e;}}export function resolveWriteConfigPath(_0x486dd6){const _0x5f0c81=_0x486dd6==='project'?process['cwd']():homedir(),_0x3588de=resolveConfigPath(_0x5f0c81);return _0x3588de??resolve(_0x5f0c81,NEW_CONFIG_NAME);}function buildConfig(_0x5e2cdb,_0x4f2785){const _0x5ed790=a111_0x235eeb,_0x2f6783={};if(_0x5e2cdb[_0x5ed790(0x1f6)]&&typeof _0x5e2cdb[_0x5ed790(0x1f6)]===_0x5ed790(0x1db))for(const [_0x1790cc,_0x48460c]of Object['entries'](_0x5e2cdb[_0x5ed790(0x1f6)])){_0x48460c&&typeof _0x48460c===_0x5ed790(0x1db)&&_0x48460c[_0x5ed790(0x21b)]&&(_0x2f6783[_0x1790cc]=_0x48460c);}const _0xf8c933=_0x5e2cdb['defaultApp']||undefined,_0x4ae88b=Object[_0x5ed790(0x21e)](_0x2f6783)[_0x5ed790(0x216)]>0x0,_0x2042bd=_0x4f2785[_0x5ed790(0x1da)]||env('APP')||undefined,_0x1a475a=_0x2042bd||_0xf8c933||undefined,_0x238eb0=_0x4f2785['appcode']||env('APPCODE')||undefined,_0x3a505b=_0x238eb0?Object[_0x5ed790(0x210)](_0x2f6783)[_0x5ed790(0x20c)](([,_0x4a62a6])=>_0x4a62a6?.[_0x5ed790(0x21b)]===_0x238eb0):undefined,_0x15e469=_0x3a505b?.[0x0],_0x1fe107=_0x3a505b?.[0x1];let _0x5d7283=_0x238eb0?_0x15e469:_0x1a475a,_0x331ad6=_0x5d7283&&_0x2f6783[_0x5d7283]?_0x2f6783[_0x5d7283]:undefined;_0x238eb0&&_0x1fe107&&(_0x331ad6=_0x1fe107);const _0x3918bb=_0x238eb0?_0x1fe107??_0x331ad6:_0x331ad6,_0x5f3709=_0x2042bd||(_0x238eb0?_0x15e469:undefined),_0x32c4a8=_0x238eb0||_0x3918bb?.['appcode']||undefined,_0x817d86=_0x4f2785[_0x5ed790(0x21c)]||env('ENV')||_0x3918bb?.[_0x5ed790(0x21c)]||_0x5e2cdb[_0x5ed790(0x21c)]||DEFAULT_CONFIG_VALUES[_0x5ed790(0x21c)],_0x45bd6a=_0x3918bb?.[_0x5ed790(0x1fa)]||_0x5e2cdb[_0x5ed790(0x1fa)]||DEFAULT_CONFIG_VALUES[_0x5ed790(0x1fa)],_0x78c8c1=env(_0x5ed790(0x1df))||_0x3918bb?.['cookie']||_0x5e2cdb[_0x5ed790(0x225)]||undefined,_0x4e7599=env(_0x5ed790(0x1f3))||_0x3918bb?.[_0x5ed790(0x1fe)]||_0x5e2cdb[_0x5ed790(0x1fe)]||undefined,_0x28e3d8=_0x4f2785[_0x5ed790(0x20b)]||env(_0x5ed790(0x226))||_0x3918bb?.[_0x5ed790(0x20b)]||_0x5e2cdb[_0x5ed790(0x20b)],_0x358c5f=normalizeLegacyOutputFormat(_0x28e3d8),_0x4e45d7=env(_0x5ed790(0x229))||_0x3918bb?.[_0x5ed790(0x1f5)]||_0x5e2cdb[_0x5ed790(0x1f5)],_0x116511=_0x4e45d7?Number(_0x4e45d7)||undefined:undefined,_0x519885=env('RISK_LEVEL')||env(_0x5ed790(0x215))||_0x3918bb?.[_0x5ed790(0x1f8)]||_0x5e2cdb[_0x5ed790(0x1f8)]||_0x5e2cdb[_0x5ed790(0x1f0)],_0x2d74fd=_0x519885==='read'||_0x519885===_0x5ed790(0x213)?_0x519885:DEFAULT_CONFIG_VALUES['riskLevel'],_0x2cc6e5=env('VERBOSE'),_0x73f289=_0x2cc6e5==='1'||_0x2cc6e5===_0x5ed790(0x203),_0x5229fd=_0x3918bb?.['apiDir']||_0x5e2cdb[_0x5ed790(0x220)]||DEFAULT_CONFIG_VALUES[_0x5ed790(0x220)],_0x45e9bb=isDaily(normalizeEnv(String(_0x817d86)))?_0x5ed790(0x1d8):_0x5ed790(0x1ff);return{'appCode':typeof _0x32c4a8===_0x5ed790(0x1fd)&&_0x32c4a8['trim']()?_0x32c4a8['trim']():undefined,'env':_0x45e9bb,'locale':_0x45bd6a,'cookie':_0x78c8c1,'accessKey':_0x4e7599,'format':_0x358c5f,'pageSize':_0x116511,'riskLevel':_0x2d74fd,'verbose':_0x73f289,'apiDir':_0x5229fd,'apps':_0x2f6783,'defaultApp':_0xf8c933,'currentApp':_0x4ae88b?_0x5d7283:undefined,'explicitAppName':_0x5f3709,'raw':_0x5e2cdb};}async function buildAuth(_0x338bce){const _0x5d3d88=a111_0x235eeb,{getCookie:_0x5cc2a0}=await import(_0x5d3d88(0x1e7)),_0x5af948=_0x338bce[_0x5d3d88(0x225)]||_0x5cc2a0(),_0x4dfde8=_0x5af948?await getIsSessionValid():![];return{'cookie':_0x5af948,'isLoggedIn':_0x4dfde8,async 'getOrLogin'(){const _0x2f1e7b=_0x5d3d88;if(_0x5af948&&_0x4dfde8)return _0x5af948;throw CliErrors[_0x2f1e7b(0x214)]();}};}export function resolveApiFilePath(_0x58d6a2,_0x572f71){const _0x3ca373=a111_0x235eeb,_0x4d41ca=resolve(process[_0x3ca373(0x22a)](),_0x58d6a2),_0x3ed823=resolve(_0x4d41ca,'api.ts');if(!_0x572f71)return _0x3ed823;const _0x107ba2=readRawConfig(),_0x36555a=_0x107ba2[_0x3ca373(0x1f6)]&&typeof _0x107ba2[_0x3ca373(0x1f6)]==='object'?_0x107ba2[_0x3ca373(0x1f6)]:{},_0x59594d=Object['entries'](_0x36555a)[_0x3ca373(0x20c)](([,_0x132ef0])=>_0x132ef0?.['appcode']===_0x572f71);if(!_0x59594d)return _0x3ed823;const [_0x3c518e,_0x372b55]=_0x59594d,_0x37b983=typeof _0x107ba2[_0x3ca373(0x1ee)]===_0x3ca373(0x1fd)?_0x107ba2[_0x3ca373(0x1ee)]:undefined;if(_0x372b55?.[_0x3ca373(0x220)])return _0x3ed823;if(_0x37b983&&_0x3c518e!==_0x37b983)return resolve(_0x4d41ca,_0x3c518e+'-api.ts');return _0x3ed823;}
@@ -1 +1 @@
1
- (function(_0x2f84ea,_0x45cec3){const _0x8a2ef4=a112_0x4360,_0x30305f=_0x2f84ea();while(!![]){try{const _0x2c91ac=parseInt(_0x8a2ef4(0x1f1))/0x1+parseInt(_0x8a2ef4(0x1f8))/0x2*(-parseInt(_0x8a2ef4(0x1f9))/0x3)+parseInt(_0x8a2ef4(0x1f4))/0x4+-parseInt(_0x8a2ef4(0x1f0))/0x5+parseInt(_0x8a2ef4(0x1ff))/0x6*(parseInt(_0x8a2ef4(0x1f5))/0x7)+parseInt(_0x8a2ef4(0x1f6))/0x8*(-parseInt(_0x8a2ef4(0x200))/0x9)+-parseInt(_0x8a2ef4(0x201))/0xa;if(_0x2c91ac===_0x45cec3)break;else _0x30305f['push'](_0x30305f['shift']());}catch(_0x2b1186){_0x30305f['push'](_0x30305f['shift']());}}}(a112_0x4aaf,0xf1245));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';const cache=new Map();function parseApiFile(_0x2a821c){const _0x1c6929=a112_0x4360,_0x4115ad=[],_0x1979e7=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x599ed0;while((_0x599ed0=_0x1979e7[_0x1c6929(0x1f3)](_0x2a821c))!==null){_0x4115ad[_0x1c6929(0x1f7)]({'datasetCode':_0x599ed0[0x1],'tableName':_0x599ed0[0x2],'name':_0x599ed0[0x3],'alias':_0x599ed0[0x4]});}return _0x4115ad;}function a112_0x4360(_0x4ccbcb,_0x14f156){_0x4ccbcb=_0x4ccbcb-0x1f0;const _0x4aaf93=a112_0x4aaf();let _0x436046=_0x4aaf93[_0x4ccbcb];return _0x436046;}export function loadAliasMap(_0x9f20d5,_0x588f2a,_0x4d061a){const _0x2987b9=a112_0x4360,_0x5f4de3=_0x4d061a??resolve(process['cwd'](),_0x9f20d5,_0x2987b9(0x1fe));if(cache[_0x2987b9(0x1fb)](_0x5f4de3))return cache['get'](_0x5f4de3);if(!existsSync(_0x5f4de3))return cache[_0x2987b9(0x1fa)](_0x5f4de3,[]),[];try{const _0x4252fb=readFileSync(_0x5f4de3,'utf-8'),_0x2b37e2=parseApiFile(_0x4252fb);return cache[_0x2987b9(0x1fa)](_0x5f4de3,_0x2b37e2),_0x2b37e2;}catch{return cache['set'](_0x5f4de3,[]),[];}}function a112_0x4aaf(){const _0x5b83cb=['96341fWbnEc','4208168HtQuzl','push','196mHBKGe','14295mxlmJM','set','has','datasetCode','find','api.ts','756uoFUgE','18aEQuGe','5411660lbbbFT','8539890RlhZal','1527628JEWqVX','alias','exec','5976428DuZtog'];a112_0x4aaf=function(){return _0x5b83cb;};return a112_0x4aaf();}export function resolveAlias(_0x3b5e23,_0x2f364d,_0x5b42ca,_0x2d4958){const _0x3436e2=a112_0x4360;if(!_0x2f364d)return undefined;const _0x593e36=loadAliasMap(_0x3b5e23,_0x5b42ca,_0x2d4958),_0x1f74e7=_0x593e36[_0x3436e2(0x1fd)](_0x42aac0=>_0x42aac0[_0x3436e2(0x1f2)]===_0x2f364d);return _0x1f74e7?.[_0x3436e2(0x1fc)];}export function listAliases(_0x332af5,_0x2daae4,_0x19458d){return loadAliasMap(_0x332af5,_0x2daae4,_0x19458d);}
1
+ (function(_0x4345d1,_0x5082af){const _0x163097=a112_0x3a80,_0x4f7f37=_0x4345d1();while(!![]){try{const _0x2d08fd=parseInt(_0x163097(0x16f))/0x1*(-parseInt(_0x163097(0x16a))/0x2)+-parseInt(_0x163097(0x165))/0x3*(-parseInt(_0x163097(0x16c))/0x4)+-parseInt(_0x163097(0x166))/0x5*(-parseInt(_0x163097(0x169))/0x6)+-parseInt(_0x163097(0x160))/0x7+-parseInt(_0x163097(0x16d))/0x8*(parseInt(_0x163097(0x161))/0x9)+-parseInt(_0x163097(0x164))/0xa*(-parseInt(_0x163097(0x16e))/0xb)+parseInt(_0x163097(0x168))/0xc;if(_0x2d08fd===_0x5082af)break;else _0x4f7f37['push'](_0x4f7f37['shift']());}catch(_0x18e090){_0x4f7f37['push'](_0x4f7f37['shift']());}}}(a112_0x50bf,0x84bfd));function a112_0x3a80(_0x431331,_0x48f302){_0x431331=_0x431331-0x15e;const _0x50bf08=a112_0x50bf();let _0x3a8073=_0x50bf08[_0x431331];return _0x3a8073;}import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';function a112_0x50bf(){const _0xeaaebf=['4cUgNwT','2304wLTIzx','33ZMsLvR','10428gRzQeV','set','datasetCode','get','utf-8','7089383eFlixp','32328fnqKDD','exec','has','1316530xADgXG','1845342adCmnL','15LeYMpo','push','21647508RDVyqo','1702116wkWhdP','206EtFNvw','cwd'];a112_0x50bf=function(){return _0xeaaebf;};return a112_0x50bf();}const cache=new Map();function parseApiFile(_0x3dfb81){const _0x19c9d8=a112_0x3a80,_0x16c045=[],_0x47d740=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x419074;while((_0x419074=_0x47d740[_0x19c9d8(0x162)](_0x3dfb81))!==null){_0x16c045[_0x19c9d8(0x167)]({'datasetCode':_0x419074[0x1],'tableName':_0x419074[0x2],'name':_0x419074[0x3],'alias':_0x419074[0x4]});}return _0x16c045;}export function loadAliasMap(_0x35e293,_0x4d32bd,_0xcda0a5){const _0x2a3b5a=a112_0x3a80,_0x5de855=_0xcda0a5??resolve(process[_0x2a3b5a(0x16b)](),_0x35e293,'api.ts');if(cache[_0x2a3b5a(0x163)](_0x5de855))return cache[_0x2a3b5a(0x15e)](_0x5de855);if(!existsSync(_0x5de855))return cache[_0x2a3b5a(0x170)](_0x5de855,[]),[];try{const _0x2125a3=readFileSync(_0x5de855,_0x2a3b5a(0x15f)),_0xcf253e=parseApiFile(_0x2125a3);return cache[_0x2a3b5a(0x170)](_0x5de855,_0xcf253e),_0xcf253e;}catch{return cache[_0x2a3b5a(0x170)](_0x5de855,[]),[];}}export function resolveAlias(_0x2b2c9b,_0x341f31,_0x19d785,_0x4aaa4b){const _0x147255=a112_0x3a80;if(!_0x341f31)return undefined;const _0x38a174=loadAliasMap(_0x2b2c9b,_0x19d785,_0x4aaa4b),_0x343700=_0x38a174['find'](_0x56ea9c=>_0x56ea9c['alias']===_0x341f31);return _0x343700?.[_0x147255(0x171)];}export function listAliases(_0x2bfc3b,_0x27675f,_0x4623cd){return loadAliasMap(_0x2bfc3b,_0x27675f,_0x4623cd);}
@@ -1 +1 @@
1
- (function(_0x32aa36,_0x445b01){const _0x3ddfca=a113_0x3471,_0x98d44c=_0x32aa36();while(!![]){try{const _0x12dbb4=-parseInt(_0x3ddfca(0x19f))/0x1+parseInt(_0x3ddfca(0x1f5))/0x2+parseInt(_0x3ddfca(0x1bd))/0x3+parseInt(_0x3ddfca(0x1ee))/0x4+parseInt(_0x3ddfca(0x19d))/0x5*(-parseInt(_0x3ddfca(0x194))/0x6)+-parseInt(_0x3ddfca(0x1ff))/0x7+parseInt(_0x3ddfca(0x1b2))/0x8;if(_0x12dbb4===_0x445b01)break;else _0x98d44c['push'](_0x98d44c['shift']());}catch(_0xc06bd6){_0x98d44c['push'](_0x98d44c['shift']());}}}(a113_0x3905,0xb8b35));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{CliErrors}from'../errors.js';import{extractList,extractPaging}from'../framework/response.js';function a113_0x3905(){const _0x569c3f=['Request\x20timeout:\x20','includeImports','errorCode','operationName','sqlCode','/smartapi/dblink/getTableDiffV2ByPage','/api/node-toolbox/sql/save','/smartapi/dblink/create','if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);','validation','\x20failed','\x20\x20\x20\x20sqlCode:\x20\x27','join','name','export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{','Unauthorized','BFF\x20script\x20not\x20found:\x20id=','filter','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','6rMnBfU','modelCode','totalCount','success','label','\x20\x20pageSize:\x2020,','toString','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','errorMessage','4012490darVNC','apiError','1443303pAKZeK','isArray','entries','pageSize','//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly','create','/smartapi/dataset/get-dataset-operation','/smartapi/db-analysis/jobs/cancel','operations','pageIndex','scriptName','code','replace','const\x20result\x20=\x20await\x20client.models.','description','tableList','displayName','/api/management/library/scripts/info?id=','Warning:\x20showing\x20first\x20','9057440ZzVBdc','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','target','//\x20SQL:\x20','&type=','status','/smartapi/dblink/getOne','body','API\x20error\x20code:\x20','responseFields','set','4207332CqaMxs','\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({','tableName','json','AbortError','currentPage','(/*\x20params\x20*/);','\x20\x20return\x20rows;','/smartapi/dblink/getAllTableList','object','const\x20data\x20=\x20await\x20client.sql.execute({','\x20failed,\x20HTTP\x20','find','message','functionName','\x20\x20where:\x20{},','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','stringify','\x20of\x20','/smartapi/dataset/get-dataset-list','test','dataset_','remove','errorMsg','table','\x20\x20currentPage:\x201,','string','has','UNAUTHORIZED','.create({\x20/*\x20fields\x20*/\x20});','authRequired','tableData','modelId','/api/management/library/scripts/delete','/api/management/library/scripts/statistics?appCode=','API\x20error:\x20','method','GET','/smartapi/db-analysis/status/','/smartapi/dataset/get-driven-data?','abort','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','enabled','length','cookie','requestFields','add','warn','\x20\x20});','1456732FwWDAc','data','type','Use\x20the\x20platform\x20console\x20to\x20see\x20all.','signal','sqlName','});','1471520TVFBaZ','push','POST','401','application/json','includes','.getOne(id);','map','dbtableConfig','SQL\x20query\x20not\x20found:\x20','4425631Kfgvld','toLowerCase','update'];a113_0x3905=function(){return _0x569c3f;};return a113_0x3905();}let _activeCookie;export function setActiveCookie(_0x343f9b){_activeCookie=_0x343f9b||undefined;}export function clearActiveCookie(){_activeCookie=undefined;}async function apiRequest(_0x49bc87,_0x1f6119={}){const _0x2eae73=a113_0x3471,{method:method=_0x2eae73(0x1e2),body:_0xfa57bf,headers:headers={},timeout:timeout=0x7530,useRuntime:useRuntime=![]}=_0x1f6119,_0xb62655=useRuntime?getRuntimeDomain():getApiDomain(),_0x439c9f=_activeCookie||getCookie(),_0x3d427e=''+_0xb62655+_0x49bc87,_0x1f6177=new AbortController(),_0x2f82e9=setTimeout(()=>_0x1f6177[_0x2eae73(0x1e5)](),timeout);try{const _0x451862=await fetch(_0x3d427e,{'method':method,'headers':{'Content-Type':_0x2eae73(0x1f9),'Cookie':_0x439c9f,'X-Invoke-Source':'cli:rabetbase',...headers},'body':_0xfa57bf?JSON['stringify'](_0xfa57bf):undefined,'signal':_0x1f6177[_0x2eae73(0x1f2)]});let _0x4f27e4;try{_0x4f27e4=await _0x451862[_0x2eae73(0x1c0)]();}catch{throw CliErrors[_0x2eae73(0x19e)](_0x2eae73(0x1e6)+_0x451862[_0x2eae73(0x1b7)]+')',_0x451862[_0x2eae73(0x1b7)]>=0x190?_0x2eae73(0x193):undefined);}if(!_0x451862['ok']||_0x4f27e4[_0x2eae73(0x197)]===![])throw CliErrors[_0x2eae73(0x19e)](_0x4f27e4[_0x2eae73(0x1d4)]||_0x4f27e4['message']||_0x2eae73(0x1e0)+_0x451862[_0x2eae73(0x1b7)],_0x4f27e4['errorCode']?_0x2eae73(0x1ba)+_0x4f27e4[_0x2eae73(0x204)]:undefined);return _0x4f27e4;}catch(_0x2b47fa){if(_0x2b47fa instanceof Error&&_0x2b47fa[_0x2eae73(0x18e)]===_0x2eae73(0x1c1))throw CliErrors[_0x2eae73(0x19e)](_0x2eae73(0x202)+_0x3d427e);throw _0x2b47fa;}finally{clearTimeout(_0x2f82e9);}}function isAuthFailure(_0x1884f5){const _0x102273=a113_0x3471,_0x466cff=_0x1884f5[_0x102273(0x1d4)]||_0x1884f5[_0x102273(0x1ca)]||_0x1884f5[_0x102273(0x1ef)]?.['message']||_0x1884f5[_0x102273(0x19c)]||_0x1884f5['error']||'';return _0x1884f5['errorCode']===_0x102273(0x1d9)||_0x1884f5[_0x102273(0x1aa)]===0x191||_0x1884f5['code']===_0x102273(0x1f8)||_0x466cff[_0x102273(0x1fa)](_0x102273(0x1f8))||_0x466cff[_0x102273(0x1fa)](_0x102273(0x190))||_0x466cff['includes']('登录')||_0x466cff[_0x102273(0x1fa)]('认证');}export async function platformFetch(_0xe60fb8,_0x34a3db){const _0x4199d6=a113_0x3471,_0x5dfa7b=await fetch(_0xe60fb8,{'method':_0x34a3db[_0x4199d6(0x1e1)]??_0x4199d6(0x1e2),'headers':{'Content-Type':_0x4199d6(0x1f9),'Cookie':_0x34a3db[_0x4199d6(0x1e9)]},..._0x34a3db[_0x4199d6(0x1b9)]&&{'body':JSON[_0x4199d6(0x1ce)](_0x34a3db[_0x4199d6(0x1b9)])}});if(!_0x5dfa7b['ok']){if(_0x5dfa7b[_0x4199d6(0x1b7)]===0x191)throw CliErrors['authRequired']();throw CliErrors[_0x4199d6(0x19e)](_0x34a3db[_0x4199d6(0x198)]+_0x4199d6(0x1c8)+_0x5dfa7b[_0x4199d6(0x1b7)]);}const _0x583de9=await _0x5dfa7b[_0x4199d6(0x1c0)]();if(_0x583de9['success']===![]){if(isAuthFailure(_0x583de9))throw CliErrors[_0x4199d6(0x1db)]();throw CliErrors[_0x4199d6(0x19e)](_0x583de9[_0x4199d6(0x1d4)]||_0x583de9[_0x4199d6(0x1ca)]||_0x34a3db[_0x4199d6(0x198)]+_0x4199d6(0x20c));}return _0x583de9['data'];}export async function listBffScripts(_0x263195,_0x49a6bc,_0x43994d){const _0x3fbfdb=a113_0x3471;let _0x5c1baf='/api/management/library/scripts/list?appCode='+_0x263195;if(_0x49a6bc)_0x5c1baf+=_0x3fbfdb(0x1b6)+_0x49a6bc;const _0x973550=await apiRequest(_0x5c1baf);let _0x74f7c2=extractList(_0x973550[_0x3fbfdb(0x1ef)]);if(_0x43994d?.[_0x3fbfdb(0x1a9)]){const _0x52ab23=_0x43994d[_0x3fbfdb(0x1a9)][_0x3fbfdb(0x200)]();_0x74f7c2=_0x74f7c2[_0x3fbfdb(0x192)](_0x2bcd88=>_0x2bcd88[_0x3fbfdb(0x1cb)]?.[_0x3fbfdb(0x200)]()[_0x3fbfdb(0x1fa)](_0x52ab23)||_0x2bcd88[_0x3fbfdb(0x1ad)]?.[_0x3fbfdb(0x200)]()[_0x3fbfdb(0x1fa)](_0x52ab23));}return _0x74f7c2;}export async function getBffScriptInfo(_0x1dec59){const _0x527b21=a113_0x3471,_0xbaaedc=await apiRequest(_0x527b21(0x1b0)+_0x1dec59);if(!_0xbaaedc[_0x527b21(0x1ef)])throw CliErrors[_0x527b21(0x20b)](_0x527b21(0x191)+_0x1dec59);return _0xbaaedc[_0x527b21(0x1ef)];}export async function saveBffScript(_0x596a5f){const _0xb50eb=a113_0x3471,_0x1e415d=await apiRequest('/api/management/library/scripts/save',{'method':_0xb50eb(0x1f7),'body':_0x596a5f});return _0x1e415d[_0xb50eb(0x1ef)];}export async function deleteBffScript(_0x211b7a){const _0xfa978e=a113_0x3471;await apiRequest(_0xfa978e(0x1de),{'method':_0xfa978e(0x1f7),'body':{'id':_0x211b7a}});}export async function getBffScriptStatistics(_0x211fa8){const _0x436773=a113_0x3471,_0x24440b=await apiRequest(_0x436773(0x1df)+_0x211fa8);return extractList(_0x24440b['data']);}export async function listBffDatasetOperations(_0x9ca3f3,_0x19050d){const _0x55fd67=a113_0x3471,_0x52d8a5=await apiRequest(_0x55fd67(0x1a5),{'method':_0x55fd67(0x1f7),'body':{'appCode':_0x9ca3f3,'datasetId':_0x19050d}});return _0x52d8a5[_0x55fd67(0x1ef)];}export async function listSqlQueries(_0x1d8c83,_0x9f702d){const _0x38a4cf=a113_0x3471,_0x1fe340=await apiRequest('/smartapi/custom/queryUserCustomSqlList',{'method':_0x38a4cf(0x1f7),'body':{'appCode':_0x1d8c83,'currentPage':_0x9f702d?.[_0x38a4cf(0x1c2)]??0x1,'pageSize':_0x9f702d?.[_0x38a4cf(0x1a2)]??0x32,'sqlCode':_0x9f702d?.[_0x38a4cf(0x206)],'sqlName':_0x9f702d?.['sqlName']}});return _0x1fe340[_0x38a4cf(0x1ef)];}export async function getSqlQueryInfo(_0x3043f2,_0x947c52){const _0x5b8442=a113_0x3471,_0x256f62=await listSqlQueries(_0x3043f2,{'sqlCode':_0x947c52}),_0x3cf6ca=_0x256f62[_0x5b8442(0x1dc)]?.[0x0];if(!_0x3cf6ca)throw CliErrors[_0x5b8442(0x20b)](_0x5b8442(0x1fe)+_0x947c52);return _0x3cf6ca;}export async function saveSqlQuery(_0x2b99d0){const _0x9cf8d0=a113_0x3471,_0x381570=await apiRequest(_0x9cf8d0(0x208),{'method':_0x9cf8d0(0x1f7),'body':_0x2b99d0});return _0x381570[_0x9cf8d0(0x1ef)];}export async function executeSql(_0xbca99,_0x5dc182,_0x46d805){const _0x4f22de=a113_0x3471,_0x5169be=await apiRequest('/api/custom/executeSql',{'method':_0x4f22de(0x1f7),'body':{'appCode':_0xbca99,'sqlCode':_0x5dc182,..._0x46d805&&{'params':_0x46d805}},'useRuntime':!![]});return _0x5169be[_0x4f22de(0x1ef)];}function a113_0x3471(_0x16ef67,_0x6b5d8c){_0x16ef67=_0x16ef67-0x18e;const _0x39051e=a113_0x3905();let _0x347127=_0x39051e[_0x16ef67];return _0x347127;}export async function listDatasets(_0x294008,_0x3cf691){const _0x597cb2=a113_0x3471,_0xb216b3={'appCode':_0x294008,'deleted':![]};if(_0x3cf691?.[_0x597cb2(0x1aa)])_0xb216b3[_0x597cb2(0x1aa)]=_0x3cf691[_0x597cb2(0x1aa)];if(_0x3cf691?.[_0x597cb2(0x18e)])_0xb216b3[_0x597cb2(0x18e)]=_0x3cf691[_0x597cb2(0x18e)];const _0x398ae5=await apiRequest(_0x597cb2(0x1d0),{'method':'POST','body':_0xb216b3});return extractList(_0x398ae5[_0x597cb2(0x1ef)]);}export async function searchDatasets(_0x3aad54,_0x53b1b0){const _0x5df17a=a113_0x3471,_0x2bbfca=await listDatasets(_0x3aad54,{'name':_0x53b1b0}),_0x2a188d=_0x53b1b0[_0x5df17a(0x200)](),_0x15d93c=new Set(_0x2bbfca[_0x5df17a(0x1fc)](_0x4ceb28=>_0x4ceb28['id'])),_0x28483e=_0x2bbfca[_0x5df17a(0x192)](_0xf2f58d=>_0xf2f58d[_0x5df17a(0x1fd)]?.[_0x5df17a(0x1bf)]?.[_0x5df17a(0x200)]()[_0x5df17a(0x1fa)](_0x2a188d)||_0xf2f58d[_0x5df17a(0x1ad)]?.[_0x5df17a(0x200)]()[_0x5df17a(0x1fa)](_0x2a188d)),_0x523aad=await listDatasets(_0x3aad54,{'code':_0x53b1b0});for(const _0x16b501 of _0x523aad){!_0x15d93c[_0x5df17a(0x1d8)](_0x16b501['id'])&&(_0x2bbfca['push'](_0x16b501),_0x15d93c[_0x5df17a(0x1eb)](_0x16b501['id']));}return _0x2bbfca;}export function normalizeDatasetOperations(_0x10d232){const _0x484eee=a113_0x3471;if(Array[_0x484eee(0x1a0)](_0x10d232))return _0x10d232['filter'](_0x370cc3=>_0x370cc3!=null&&typeof _0x370cc3===_0x484eee(0x1c6));if(_0x10d232&&typeof _0x10d232===_0x484eee(0x1c6))return Object[_0x484eee(0x1a1)](_0x10d232)[_0x484eee(0x192)](([,_0x3492fe])=>_0x3492fe!=null&&typeof _0x3492fe===_0x484eee(0x1c6))[_0x484eee(0x1fc)](([_0x11b8f7,_0x59a702])=>({..._0x59a702,'name':_0x59a702[_0x484eee(0x18e)]??_0x59a702['operationName']??_0x11b8f7}));return[];}export async function getDatasetDetail(_0x1725ff){const _0x2f43fe=a113_0x3471,_0x139b4f=/^\d+$/['test'](_0x1725ff)?'id':_0x2f43fe(0x1aa),_0x58e08b=await apiRequest(_0x2f43fe(0x1e4)+_0x139b4f+'='+_0x1725ff);return _0x58e08b['data'];}export async function getDatasetOperations(_0x4c231b){const _0x11f169=a113_0x3471,_0x37606d=await getDatasetDetail(_0x4c231b),_0x3e0890=normalizeDatasetOperations(_0x37606d[_0x11f169(0x1a7)])['map'](_0x21ce45=>({'name':_0x21ce45['name']||_0x21ce45[_0x11f169(0x205)],'displayName':_0x21ce45[_0x11f169(0x1af)]||_0x21ce45[_0x11f169(0x18e)],'type':_0x21ce45[_0x11f169(0x1f0)],'method':_0x21ce45[_0x11f169(0x1e1)],'path':_0x21ce45['path'],'enabled':_0x21ce45[_0x11f169(0x1e7)]??!![],'requestFields':_0x21ce45[_0x11f169(0x1ea)],'responseFields':_0x21ce45[_0x11f169(0x1bb)]}));return{'dataset':{'id':_0x37606d['id']??_0x37606d['modelId'],'name':_0x37606d[_0x11f169(0x18e)],'code':_0x37606d[_0x11f169(0x1aa)]||_0x37606d[_0x11f169(0x195)],'tableName':_0x37606d[_0x11f169(0x1bf)]||_0x37606d[_0x11f169(0x1fd)]?.[_0x11f169(0x1bf)]},'operations':_0x3e0890};}export async function getOperationDetail(_0x1cb939,_0x5448e1,_0x4110c5){const _0x4a4a20=a113_0x3471;let _0x40be5d=_0x5448e1;if(!/^\d+$/[_0x4a4a20(0x1d1)](_0x5448e1)){const _0x199cd9=await listDatasets(_0x1cb939,{'code':_0x5448e1}),_0x47db8e=_0x199cd9[_0x4a4a20(0x1c9)](_0x2b8883=>_0x2b8883[_0x4a4a20(0x1aa)]===_0x5448e1||String(_0x2b8883['id'])===_0x5448e1);if(!_0x47db8e)throw CliErrors[_0x4a4a20(0x20b)]('Dataset\x20not\x20found:\x20'+_0x5448e1);_0x40be5d=String(_0x47db8e['id']);}const _0x18bd56=await getDatasetDetail(_0x40be5d),_0x4f7282=normalizeDatasetOperations(_0x18bd56['operations'])[_0x4a4a20(0x1c9)](_0x39e61b=>(_0x39e61b['name']||_0x39e61b[_0x4a4a20(0x205)])===_0x4110c5);if(!_0x4f7282)throw CliErrors[_0x4a4a20(0x20b)]('Operation\x20\x22'+_0x4110c5+'\x22\x20not\x20found\x20in\x20dataset\x20'+_0x5448e1);return{'dataset':{'id':_0x18bd56['id']??_0x18bd56[_0x4a4a20(0x1dd)],'name':_0x18bd56[_0x4a4a20(0x18e)],'code':_0x18bd56['code']||_0x18bd56[_0x4a4a20(0x195)],'tableName':_0x18bd56[_0x4a4a20(0x1bf)]||_0x18bd56[_0x4a4a20(0x1fd)]?.[_0x4a4a20(0x1bf)]},'operation':_0x4f7282};}export function generateSdkCode(_0x3bd100,_0x132ff0,_0x3933b4){const _0x1f8519=a113_0x3471,_0x278078=_0x3933b4?.['includeImports']??!![],_0x542812=_0x1f8519(0x1d2)+_0x3bd100['code']?.[_0x1f8519(0x1ab)](/-/g,'_'),_0x56220c=_0x132ff0[_0x1f8519(0x18e)]||_0x132ff0[_0x1f8519(0x205)]||'filter',_0x337fc5=[];_0x278078&&_0x337fc5[_0x1f8519(0x1f6)]('import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','',_0x1f8519(0x1b3),'');_0x337fc5[_0x1f8519(0x1f6)]('//\x20'+_0x3bd100['name']+'\x20('+(_0x3bd100[_0x1f8519(0x1bf)]||_0x1f8519(0x1d5))+')');if(_0x56220c===_0x1f8519(0x192))_0x337fc5[_0x1f8519(0x1f6)]('const\x20result\x20=\x20await\x20client.models.'+_0x542812+'.filter({',_0x1f8519(0x1cc),_0x1f8519(0x199),_0x1f8519(0x1d6),_0x1f8519(0x1f4));else{if(_0x56220c==='getOne')_0x337fc5[_0x1f8519(0x1f6)](_0x1f8519(0x1ac)+_0x542812+_0x1f8519(0x1fb));else{if(_0x56220c===_0x1f8519(0x1a4))_0x337fc5[_0x1f8519(0x1f6)](_0x1f8519(0x1ac)+_0x542812+_0x1f8519(0x1da));else{if(_0x56220c===_0x1f8519(0x201))_0x337fc5['push']('const\x20result\x20=\x20await\x20client.models.'+_0x542812+'.update(id,\x20{\x20/*\x20fields\x20*/\x20});');else _0x56220c==='delete'||_0x56220c===_0x1f8519(0x1d3)?_0x337fc5['push']('const\x20result\x20=\x20await\x20client.models.'+_0x542812+'.remove(id);'):_0x337fc5[_0x1f8519(0x1f6)]('const\x20result\x20=\x20await\x20client.models.'+_0x542812+'.'+_0x56220c+_0x1f8519(0x1c3));}}}return _0x337fc5['join']('\x0a');}export function generateSqlCodeTemplate(_0x22c545,_0x5ec4f0){const _0x17c823=a113_0x3471,_0x43dc7b=_0x5ec4f0?.[_0x17c823(0x1b4)]??'sdk',_0x2988e7=_0x5ec4f0?.[_0x17c823(0x203)]??!![],_0x55f67f=[];return _0x55f67f[_0x17c823(0x1f6)](_0x17c823(0x1b5)+_0x22c545[_0x17c823(0x1f3)]+'\x20('+_0x22c545[_0x17c823(0x206)]+')'),_0x43dc7b==='sdk'?(_0x2988e7&&_0x55f67f[_0x17c823(0x1f6)]('import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','',_0x17c823(0x1b3),''),_0x55f67f[_0x17c823(0x1f6)](_0x17c823(0x1c7),'\x20\x20sqlCode:\x20\x27'+_0x22c545[_0x17c823(0x206)]+'\x27,',_0x17c823(0x1cd),_0x17c823(0x1f4),_0x17c823(0x20a),'const\x20results\x20=\x20data.execResult\x20||\x20[];')):_0x55f67f[_0x17c823(0x1f6)](_0x17c823(0x1a3),_0x17c823(0x18f),_0x17c823(0x1be),_0x17c823(0x20d)+_0x22c545[_0x17c823(0x206)]+'\x27,',_0x17c823(0x19b),_0x17c823(0x1ed),_0x17c823(0x1c4),'}'),_0x55f67f[_0x17c823(0x20e)]('\x0a');}export async function getErConfig(_0x1552d3,_0x8f6964){const _0x487830=a113_0x3471,_0xdf8f1f=await apiRequest('/smartapi/question/er-config',{'method':_0x487830(0x1f7),'body':{'appCode':_0x1552d3,'dblinkId':_0x8f6964}});return _0xdf8f1f[_0x487830(0x1ef)];}function buildQuery(_0x207a59){const _0x3fbe99=a113_0x3471,_0x267953=new URLSearchParams();for(const [_0x48bc2f,_0xdc872c]of Object[_0x3fbe99(0x1a1)](_0x207a59)){if(_0xdc872c===undefined||_0xdc872c==='')continue;_0x267953[_0x3fbe99(0x1bc)](_0x48bc2f,String(_0xdc872c));}const _0x37119c=_0x267953[_0x3fbe99(0x19a)]();return _0x37119c?'?'+_0x37119c:'';}export async function listDbLinks(_0x58dd38,_0x2fde16){const _0x29c062=a113_0x3471,_0x34c8d3=await apiRequest('/smartapi/dblink/getList',{'method':_0x29c062(0x1f7),'body':{'appCode':_0x58dd38,'currentPage':_0x2fde16?.['currentPage']??0x1,'pageSize':_0x2fde16?.[_0x29c062(0x1a2)]??0x64}});return{'items':extractList(_0x34c8d3[_0x29c062(0x1ef)]),'paging':extractPaging(_0x34c8d3[_0x29c062(0x1ef)])};}export async function getDbLinkInfo(_0x1080c0){const _0x4eb9ca=a113_0x3471,_0x3c864a=await apiRequest(_0x4eb9ca(0x1b8)+buildQuery({'id':_0x1080c0}));return _0x3c864a[_0x4eb9ca(0x1ef)];}export async function createDbLink(_0x16046a){const _0x4baae2=a113_0x3471,_0x2bef44=await apiRequest(_0x4baae2(0x209),{'method':_0x4baae2(0x1f7),'body':_0x16046a});return _0x2bef44[_0x4baae2(0x1ef)];}export async function updateDbLink(_0x9fc300){const _0x27b8df=a113_0x3471,_0x1cda97=await apiRequest('/smartapi/dblink/update',{'method':_0x27b8df(0x1f7),'body':_0x9fc300});return _0x1cda97[_0x27b8df(0x1ef)];}export async function deleteDbLink(_0x5bbd41){const _0x1cf84f=a113_0x3471;await apiRequest('/smartapi/dblink/delete',{'method':_0x1cf84f(0x1f7),'body':{'id':_0x5bbd41}});}export async function testDbLinkConnect(_0x23f5dc){const _0x332c5d=a113_0x3471,_0x2cc8c2=await apiRequest('/smartapi/dblink/testConnect'+buildQuery({'id':_0x23f5dc}));return _0x2cc8c2[_0x332c5d(0x1ef)];}export async function startDbAnalysis(_0x4d30bf,_0x493340){const _0x253ee1=a113_0x3471,_0x56bfd2=await apiRequest('/smartapi/db-analysis/start',{'method':'POST','body':{'dbLinkId':_0x4d30bf,..._0x493340&&_0x493340[_0x253ee1(0x1e8)]>0x0?{'tableNames':_0x493340}:{}}}),_0x35c285=_0x56bfd2[_0x253ee1(0x1ef)];if(typeof _0x35c285===_0x253ee1(0x1d7))return _0x35c285;if(_0x35c285&&typeof _0x35c285===_0x253ee1(0x1c6)&&typeof _0x35c285['planId']===_0x253ee1(0x1d7))return _0x35c285['planId'];return _0x35c285!=null?String(_0x35c285):'';}export async function cancelDbAnalysis(_0x4324c0){const _0x4d8244=a113_0x3471;await apiRequest(_0x4d8244(0x1a6)+buildQuery({'planId':_0x4324c0}),{'method':_0x4d8244(0x1f7)});}export async function getDbAnalysisStatus(_0x5ebd0e){const _0x3cd657=a113_0x3471,_0x5170cc=await apiRequest(_0x3cd657(0x1e3)+encodeURIComponent(_0x5ebd0e));return _0x5170cc[_0x3cd657(0x1ef)];}export async function getDbAllTableList(_0x52c30e,_0x3bd7c9){const _0x52cd35=a113_0x3471,_0x52f3db=await apiRequest(_0x52cd35(0x1c5)+buildQuery({'appCode':_0x52c30e,'dbLinkId':_0x3bd7c9})),_0x3b1e2d=_0x52f3db[_0x52cd35(0x1ef)];if(Array[_0x52cd35(0x1a0)](_0x3b1e2d))return _0x3b1e2d;return extractList(_0x3b1e2d);}export async function getDbTableDiff(_0x1533f2,_0x4c2b83,_0x36854d){const _0x569b8a=a113_0x3471,_0x2cefaa=await apiRequest(_0x569b8a(0x207)+buildQuery({'appCode':_0x1533f2,'dbLinkId':_0x4c2b83,'pageIndex':_0x36854d?.[_0x569b8a(0x1a8)]??0x1,'pageSize':_0x36854d?.['pageSize']??0x14,'tableName':_0x36854d?.['tableName']})),_0x220242=_0x2cefaa[_0x569b8a(0x1ef)];return{'totalCount':_0x220242?.[_0x569b8a(0x196)]??0x0,'tableList':Array[_0x569b8a(0x1a0)](_0x220242?.[_0x569b8a(0x1ae)])?_0x220242[_0x569b8a(0x1ae)]:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0x55e1c3=a113_0x3471,_0x2073ac=await apiRequest('/smartapi/app/getList',{'method':_0x55e1c3(0x1f7),'body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0x37afca=extractList(_0x2073ac[_0x55e1c3(0x1ef)]),_0x35bc7e=extractPaging(_0x2073ac['data']);return _0x35bc7e&&_0x35bc7e[_0x55e1c3(0x196)]>REMOTE_APP_PAGE_SIZE&&console[_0x55e1c3(0x1ec)](_0x55e1c3(0x1b1)+REMOTE_APP_PAGE_SIZE+_0x55e1c3(0x1cf)+_0x35bc7e[_0x55e1c3(0x196)]+'\x20apps.\x20'+_0x55e1c3(0x1f1)),_0x37afca;}
1
+ function a113_0x305f(){const _0x153178=['/smartapi/dblink/getTableDiffV2ByPage','body','4061075poriBo','//\x20','pageSize','operations','set','4785944kAfWCA','scriptName','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','map','join','remove','name','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','6234276OjOHuj','string','sqlName','Operation\x20\x22','object','/api/node-toolbox/sql/save','/smartapi/dblink/delete','/smartapi/dataset/get-dataset-list','displayName','currentPage','&type=','dataset_','Warning:\x20showing\x20first\x20','.remove(id);','sqlCode','requestFields','modelId','functionName','/smartapi/question/er-config','toLowerCase','const\x20result\x20=\x20await\x20client.models.','success','\x20\x20return\x20rows;','label','errorCode','find','cli:rabetbase','type','length','AbortError','4pNsYzj','create','validation','.filter({','});','POST','code','SQL\x20query\x20not\x20found:\x20','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','delete','\x20apps.\x20','.update(id,\x20{\x20/*\x20fields\x20*/\x20});','planId','includeImports','path','\x20\x20sqlCode:\x20\x27','Use\x20the\x20platform\x20console\x20to\x20see\x20all.','application/json','test','const\x20data\x20=\x20await\x20client.sql.execute({','192486JjPfLd','BFF\x20script\x20not\x20found:\x20id=','(/*\x20params\x20*/);','Dataset\x20not\x20found:\x20','json','apiError','/smartapi/dblink/update','/api/management/library/scripts/save','error','/smartapi/app/getList','operationName','add','sdk','//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly','45RqeHoQ','export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{','isArray','\x20failed,\x20HTTP\x20','method','modelCode','2975917QTShbE','/smartapi/dblink/getList','errorMsg','abort','tableName','status','\x20\x20where:\x20{},','/api/management/library/scripts/info?id=','401','UNAUTHORIZED','//\x20SQL:\x20','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','/smartapi/custom/queryUserCustomSqlList','push','message','description','tableList','errorMessage','const\x20results\x20=\x20data.execResult\x20||\x20[];','API\x20error\x20code:\x20','3523782GCpcAr','includes','update','filter','/smartapi/dataset/get-dataset-operation','data','/smartapi/db-analysis/status/','totalCount','Request\x20timeout:\x20','/smartapi/dataset/get-driven-data?','519226sNVquy','tableData','\x20\x20currentPage:\x201,','enabled','table','authRequired','target','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','Unauthorized','getOne','/smartapi/dblink/getOne','cookie','API\x20error:\x20','GET','dbtableConfig','stringify','entries'];a113_0x305f=function(){return _0x153178;};return a113_0x305f();}(function(_0x5b576e,_0x12e0ef){const _0xeeb14f=a113_0x5352,_0x2b0202=_0x5b576e();while(!![]){try{const _0x16bd6b=-parseInt(_0xeeb14f(0x17d))/0x1+-parseInt(_0xeeb14f(0x12b))/0x2+parseInt(_0xeeb14f(0x121))/0x3*(-parseInt(_0xeeb14f(0x169))/0x4)+parseInt(_0xeeb14f(0x13e))/0x5+-parseInt(_0xeeb14f(0x14b))/0x6+-parseInt(_0xeeb14f(0x10d))/0x7+-parseInt(_0xeeb14f(0x143))/0x8*(-parseInt(_0xeeb14f(0x107))/0x9);if(_0x16bd6b===_0x12e0ef)break;else _0x2b0202['push'](_0x2b0202['shift']());}catch(_0x1cac8a){_0x2b0202['push'](_0x2b0202['shift']());}}}(a113_0x305f,0xadf70));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{CliErrors}from'../errors.js';import{extractList,extractPaging}from'../framework/response.js';let _activeCookie;export function setActiveCookie(_0x47f4e8){_activeCookie=_0x47f4e8||undefined;}export function clearActiveCookie(){_activeCookie=undefined;}async function apiRequest(_0x758f3e,_0x35cbcf={}){const _0x3d452a=a113_0x5352,{method:method=_0x3d452a(0x138),body:_0x11519e,headers:headers={},timeout:timeout=0x7530,useRuntime:useRuntime=![]}=_0x35cbcf,_0x1b9614=useRuntime?getRuntimeDomain():getApiDomain(),_0x3be657=_activeCookie||getCookie(),_0x127807=''+_0x1b9614+_0x758f3e,_0xc42b4d=new AbortController(),_0x12cfad=setTimeout(()=>_0xc42b4d[_0x3d452a(0x110)](),timeout);try{const _0x35f7cb=await fetch(_0x127807,{'method':method,'headers':{'Content-Type':_0x3d452a(0x17a),'Cookie':_0x3be657,'X-Invoke-Source':_0x3d452a(0x165),...headers},'body':_0x11519e?JSON[_0x3d452a(0x13a)](_0x11519e):undefined,'signal':_0xc42b4d['signal']});let _0x1be41f;try{_0x1be41f=await _0x35f7cb[_0x3d452a(0x181)]();}catch{throw CliErrors[_0x3d452a(0x182)](_0x3d452a(0x14a)+_0x35f7cb[_0x3d452a(0x112)]+')',_0x35f7cb[_0x3d452a(0x112)]>=0x190?_0x3d452a(0x118):undefined);}if(!_0x35f7cb['ok']||_0x1be41f[_0x3d452a(0x160)]===![])throw CliErrors['apiError'](_0x1be41f[_0x3d452a(0x10f)]||_0x1be41f[_0x3d452a(0x11b)]||_0x3d452a(0x137)+_0x35f7cb['status'],_0x1be41f[_0x3d452a(0x163)]?_0x3d452a(0x120)+_0x1be41f[_0x3d452a(0x163)]:undefined);return _0x1be41f;}catch(_0x242dcc){if(_0x242dcc instanceof Error&&_0x242dcc['name']===_0x3d452a(0x168))throw CliErrors[_0x3d452a(0x182)](_0x3d452a(0x129)+_0x127807);throw _0x242dcc;}finally{clearTimeout(_0x12cfad);}}function isAuthFailure(_0x4e08e6){const _0x55689c=a113_0x5352,_0x2484da=_0x4e08e6[_0x55689c(0x10f)]||_0x4e08e6[_0x55689c(0x11b)]||_0x4e08e6['data']?.['message']||_0x4e08e6[_0x55689c(0x11e)]||_0x4e08e6[_0x55689c(0x185)]||'';return _0x4e08e6[_0x55689c(0x163)]===_0x55689c(0x116)||_0x4e08e6[_0x55689c(0x16f)]===0x191||_0x4e08e6[_0x55689c(0x16f)]===_0x55689c(0x115)||_0x2484da[_0x55689c(0x122)]('401')||_0x2484da[_0x55689c(0x122)](_0x55689c(0x133))||_0x2484da[_0x55689c(0x122)]('登录')||_0x2484da[_0x55689c(0x122)]('认证');}export async function platformFetch(_0x44baa2,_0xe3b662){const _0x2dd785=a113_0x5352,_0x5a33f8=await fetch(_0x44baa2,{'method':_0xe3b662[_0x2dd785(0x10b)]??'GET','headers':{'Content-Type':_0x2dd785(0x17a),'Cookie':_0xe3b662[_0x2dd785(0x136)]},..._0xe3b662[_0x2dd785(0x13d)]&&{'body':JSON[_0x2dd785(0x13a)](_0xe3b662[_0x2dd785(0x13d)])}});if(!_0x5a33f8['ok']){if(_0x5a33f8['status']===0x191)throw CliErrors[_0x2dd785(0x130)]();throw CliErrors[_0x2dd785(0x182)](_0xe3b662[_0x2dd785(0x162)]+_0x2dd785(0x10a)+_0x5a33f8[_0x2dd785(0x112)]);}const _0x128963=await _0x5a33f8[_0x2dd785(0x181)]();if(_0x128963[_0x2dd785(0x160)]===![]){if(isAuthFailure(_0x128963))throw CliErrors[_0x2dd785(0x130)]();throw CliErrors['apiError'](_0x128963[_0x2dd785(0x10f)]||_0x128963[_0x2dd785(0x11b)]||_0xe3b662[_0x2dd785(0x162)]+'\x20failed');}return _0x128963[_0x2dd785(0x126)];}export async function listBffScripts(_0x22ceaf,_0x43259f,_0x2a764c){const _0x227f01=a113_0x5352;let _0x49c28='/api/management/library/scripts/list?appCode='+_0x22ceaf;if(_0x43259f)_0x49c28+=_0x227f01(0x155)+_0x43259f;const _0x171eb6=await apiRequest(_0x49c28);let _0x294011=extractList(_0x171eb6['data']);if(_0x2a764c?.[_0x227f01(0x144)]){const _0x1bdb28=_0x2a764c[_0x227f01(0x144)][_0x227f01(0x15e)]();_0x294011=_0x294011[_0x227f01(0x124)](_0x2e5c1e=>_0x2e5c1e[_0x227f01(0x15c)]?.[_0x227f01(0x15e)]()[_0x227f01(0x122)](_0x1bdb28)||_0x2e5c1e[_0x227f01(0x11c)]?.[_0x227f01(0x15e)]()[_0x227f01(0x122)](_0x1bdb28));}return _0x294011;}export async function getBffScriptInfo(_0x3424db){const _0x43b0af=a113_0x5352,_0x595f7f=await apiRequest(_0x43b0af(0x114)+_0x3424db);if(!_0x595f7f[_0x43b0af(0x126)])throw CliErrors[_0x43b0af(0x16b)](_0x43b0af(0x17e)+_0x3424db);return _0x595f7f[_0x43b0af(0x126)];}export async function saveBffScript(_0xebc112){const _0x52ae96=a113_0x5352,_0x43af5c=await apiRequest(_0x52ae96(0x184),{'method':'POST','body':_0xebc112});return _0x43af5c[_0x52ae96(0x126)];}export async function deleteBffScript(_0xee5199){const _0x26bbe1=a113_0x5352;await apiRequest('/api/management/library/scripts/delete',{'method':_0x26bbe1(0x16e),'body':{'id':_0xee5199}});}export async function getBffScriptStatistics(_0x2136a3){const _0x164c0f=a113_0x5352,_0x55a131=await apiRequest('/api/management/library/scripts/statistics?appCode='+_0x2136a3);return extractList(_0x55a131[_0x164c0f(0x126)]);}export async function listBffDatasetOperations(_0xcff263,_0xea7889){const _0x563422=a113_0x5352,_0x4fa711=await apiRequest(_0x563422(0x125),{'method':_0x563422(0x16e),'body':{'appCode':_0xcff263,'datasetId':_0xea7889}});return _0x4fa711['data'];}export async function listSqlQueries(_0x28dd69,_0x5b20e4){const _0x486429=a113_0x5352,_0x482328=await apiRequest(_0x486429(0x119),{'method':_0x486429(0x16e),'body':{'appCode':_0x28dd69,'currentPage':_0x5b20e4?.[_0x486429(0x154)]??0x1,'pageSize':_0x5b20e4?.[_0x486429(0x140)]??0x32,'sqlCode':_0x5b20e4?.[_0x486429(0x159)],'sqlName':_0x5b20e4?.[_0x486429(0x14d)]}});return _0x482328['data'];}export async function getSqlQueryInfo(_0x13d661,_0x52bcf4){const _0x4b9eec=a113_0x5352,_0x286535=await listSqlQueries(_0x13d661,{'sqlCode':_0x52bcf4}),_0x5c825=_0x286535[_0x4b9eec(0x12c)]?.[0x0];if(!_0x5c825)throw CliErrors['validation'](_0x4b9eec(0x170)+_0x52bcf4);return _0x5c825;}export async function saveSqlQuery(_0x4063ac){const _0x2037db=a113_0x5352,_0x5aeecf=await apiRequest(_0x2037db(0x150),{'method':_0x2037db(0x16e),'body':_0x4063ac});return _0x5aeecf[_0x2037db(0x126)];}export async function executeSql(_0x20a92b,_0x287c02,_0x3c874d){const _0x254abc=a113_0x5352,_0x52566a=await apiRequest('/api/custom/executeSql',{'method':_0x254abc(0x16e),'body':{'appCode':_0x20a92b,'sqlCode':_0x287c02,..._0x3c874d&&{'params':_0x3c874d}},'useRuntime':!![]});return _0x52566a['data'];}export async function listDatasets(_0x58c0b8,_0xdeb2d5){const _0x5ef26b=a113_0x5352,_0x2f3f81={'appCode':_0x58c0b8,'deleted':![]};if(_0xdeb2d5?.['code'])_0x2f3f81[_0x5ef26b(0x16f)]=_0xdeb2d5[_0x5ef26b(0x16f)];if(_0xdeb2d5?.['name'])_0x2f3f81[_0x5ef26b(0x149)]=_0xdeb2d5[_0x5ef26b(0x149)];const _0x1692e5=await apiRequest(_0x5ef26b(0x152),{'method':_0x5ef26b(0x16e),'body':_0x2f3f81});return extractList(_0x1692e5[_0x5ef26b(0x126)]);}export async function searchDatasets(_0x2af31b,_0x2a1754){const _0x3cd2e3=a113_0x5352,_0x16a629=await listDatasets(_0x2af31b,{'name':_0x2a1754}),_0x257392=_0x2a1754[_0x3cd2e3(0x15e)](),_0x194b08=new Set(_0x16a629[_0x3cd2e3(0x146)](_0x39699a=>_0x39699a['id'])),_0x3b6037=_0x16a629[_0x3cd2e3(0x124)](_0xc607a8=>_0xc607a8['dbtableConfig']?.[_0x3cd2e3(0x111)]?.['toLowerCase']()['includes'](_0x257392)||_0xc607a8[_0x3cd2e3(0x11c)]?.[_0x3cd2e3(0x15e)]()[_0x3cd2e3(0x122)](_0x257392)),_0x107b96=await listDatasets(_0x2af31b,{'code':_0x2a1754});for(const _0x2fdb42 of _0x107b96){!_0x194b08['has'](_0x2fdb42['id'])&&(_0x16a629['push'](_0x2fdb42),_0x194b08[_0x3cd2e3(0x188)](_0x2fdb42['id']));}return _0x16a629;}export function normalizeDatasetOperations(_0x48a814){const _0x2c33b8=a113_0x5352;if(Array[_0x2c33b8(0x109)](_0x48a814))return _0x48a814[_0x2c33b8(0x124)](_0x221ab3=>_0x221ab3!=null&&typeof _0x221ab3===_0x2c33b8(0x14f));if(_0x48a814&&typeof _0x48a814===_0x2c33b8(0x14f))return Object[_0x2c33b8(0x13b)](_0x48a814)[_0x2c33b8(0x124)](([,_0x442c12])=>_0x442c12!=null&&typeof _0x442c12===_0x2c33b8(0x14f))['map'](([_0x55c958,_0x345d90])=>({..._0x345d90,'name':_0x345d90[_0x2c33b8(0x149)]??_0x345d90[_0x2c33b8(0x187)]??_0x55c958}));return[];}export async function getDatasetDetail(_0x2edf4c){const _0x2da92b=a113_0x5352,_0x2b6dcb=/^\d+$/[_0x2da92b(0x17b)](_0x2edf4c)?'id':_0x2da92b(0x16f),_0x262789=await apiRequest(_0x2da92b(0x12a)+_0x2b6dcb+'='+_0x2edf4c);return _0x262789[_0x2da92b(0x126)];}export async function getDatasetOperations(_0x36cf8f){const _0x23ba37=a113_0x5352,_0x2b266f=await getDatasetDetail(_0x36cf8f),_0x30a4fe=normalizeDatasetOperations(_0x2b266f['operations'])[_0x23ba37(0x146)](_0x45959c=>({'name':_0x45959c[_0x23ba37(0x149)]||_0x45959c[_0x23ba37(0x187)],'displayName':_0x45959c[_0x23ba37(0x153)]||_0x45959c[_0x23ba37(0x149)],'type':_0x45959c[_0x23ba37(0x166)],'method':_0x45959c[_0x23ba37(0x10b)],'path':_0x45959c[_0x23ba37(0x177)],'enabled':_0x45959c[_0x23ba37(0x12e)]??!![],'requestFields':_0x45959c[_0x23ba37(0x15a)],'responseFields':_0x45959c['responseFields']}));return{'dataset':{'id':_0x2b266f['id']??_0x2b266f[_0x23ba37(0x15b)],'name':_0x2b266f[_0x23ba37(0x149)],'code':_0x2b266f[_0x23ba37(0x16f)]||_0x2b266f[_0x23ba37(0x10c)],'tableName':_0x2b266f[_0x23ba37(0x111)]||_0x2b266f[_0x23ba37(0x139)]?.[_0x23ba37(0x111)]},'operations':_0x30a4fe};}export async function getOperationDetail(_0x30f7a4,_0x46d6ac,_0x1dc1fe){const _0x2a6e29=a113_0x5352;let _0x5a8271=_0x46d6ac;if(!/^\d+$/[_0x2a6e29(0x17b)](_0x46d6ac)){const _0x3b1416=await listDatasets(_0x30f7a4,{'code':_0x46d6ac}),_0x4a0ca2=_0x3b1416[_0x2a6e29(0x164)](_0x2c2925=>_0x2c2925['code']===_0x46d6ac||String(_0x2c2925['id'])===_0x46d6ac);if(!_0x4a0ca2)throw CliErrors['validation'](_0x2a6e29(0x180)+_0x46d6ac);_0x5a8271=String(_0x4a0ca2['id']);}const _0x475416=await getDatasetDetail(_0x5a8271),_0x1d19af=normalizeDatasetOperations(_0x475416[_0x2a6e29(0x141)])[_0x2a6e29(0x164)](_0x21e060=>(_0x21e060[_0x2a6e29(0x149)]||_0x21e060[_0x2a6e29(0x187)])===_0x1dc1fe);if(!_0x1d19af)throw CliErrors[_0x2a6e29(0x16b)](_0x2a6e29(0x14e)+_0x1dc1fe+'\x22\x20not\x20found\x20in\x20dataset\x20'+_0x46d6ac);return{'dataset':{'id':_0x475416['id']??_0x475416[_0x2a6e29(0x15b)],'name':_0x475416[_0x2a6e29(0x149)],'code':_0x475416[_0x2a6e29(0x16f)]||_0x475416[_0x2a6e29(0x10c)],'tableName':_0x475416['tableName']||_0x475416[_0x2a6e29(0x139)]?.['tableName']},'operation':_0x1d19af};}export function generateSdkCode(_0x773dbd,_0x567c69,_0x307f89){const _0x47c19e=a113_0x5352,_0x15d4fd=_0x307f89?.[_0x47c19e(0x176)]??!![],_0x47ac76=_0x47c19e(0x156)+_0x773dbd[_0x47c19e(0x16f)]?.['replace'](/-/g,'_'),_0x1c0f4e=_0x567c69[_0x47c19e(0x149)]||_0x567c69[_0x47c19e(0x187)]||_0x47c19e(0x124),_0x1ff9cb=[];_0x15d4fd&&_0x1ff9cb[_0x47c19e(0x11a)](_0x47c19e(0x145),'',_0x47c19e(0x171),'');_0x1ff9cb[_0x47c19e(0x11a)](_0x47c19e(0x13f)+_0x773dbd[_0x47c19e(0x149)]+'\x20('+(_0x773dbd[_0x47c19e(0x111)]||_0x47c19e(0x12f))+')');if(_0x1c0f4e===_0x47c19e(0x124))_0x1ff9cb['push'](_0x47c19e(0x15f)+_0x47ac76+_0x47c19e(0x16c),_0x47c19e(0x113),'\x20\x20pageSize:\x2020,',_0x47c19e(0x12d),_0x47c19e(0x16d));else{if(_0x1c0f4e===_0x47c19e(0x134))_0x1ff9cb[_0x47c19e(0x11a)]('const\x20result\x20=\x20await\x20client.models.'+_0x47ac76+'.getOne(id);');else{if(_0x1c0f4e===_0x47c19e(0x16a))_0x1ff9cb[_0x47c19e(0x11a)](_0x47c19e(0x15f)+_0x47ac76+'.create({\x20/*\x20fields\x20*/\x20});');else{if(_0x1c0f4e===_0x47c19e(0x123))_0x1ff9cb[_0x47c19e(0x11a)](_0x47c19e(0x15f)+_0x47ac76+_0x47c19e(0x174));else _0x1c0f4e===_0x47c19e(0x172)||_0x1c0f4e===_0x47c19e(0x148)?_0x1ff9cb[_0x47c19e(0x11a)](_0x47c19e(0x15f)+_0x47ac76+_0x47c19e(0x158)):_0x1ff9cb[_0x47c19e(0x11a)](_0x47c19e(0x15f)+_0x47ac76+'.'+_0x1c0f4e+_0x47c19e(0x17f));}}}return _0x1ff9cb[_0x47c19e(0x147)]('\x0a');}export function generateSqlCodeTemplate(_0x5edb31,_0x2373ad){const _0x1435da=a113_0x5352,_0x2f51da=_0x2373ad?.[_0x1435da(0x131)]??'sdk',_0x2ed002=_0x2373ad?.[_0x1435da(0x176)]??!![],_0x7119ea=[];return _0x7119ea[_0x1435da(0x11a)](_0x1435da(0x117)+_0x5edb31[_0x1435da(0x14d)]+'\x20('+_0x5edb31['sqlCode']+')'),_0x2f51da===_0x1435da(0x105)?(_0x2ed002&&_0x7119ea['push'](_0x1435da(0x145),'',_0x1435da(0x171),''),_0x7119ea[_0x1435da(0x11a)](_0x1435da(0x17c),_0x1435da(0x178)+_0x5edb31[_0x1435da(0x159)]+'\x27,','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','});','if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);',_0x1435da(0x11f))):_0x7119ea['push'](_0x1435da(0x106),_0x1435da(0x108),'\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({','\x20\x20\x20\x20sqlCode:\x20\x27'+_0x5edb31[_0x1435da(0x159)]+'\x27,',_0x1435da(0x132),'\x20\x20});',_0x1435da(0x161),'}'),_0x7119ea[_0x1435da(0x147)]('\x0a');}export async function getErConfig(_0x5caffc,_0x58e82e){const _0x247d58=a113_0x5352,_0x381730=await apiRequest(_0x247d58(0x15d),{'method':'POST','body':{'appCode':_0x5caffc,'dblinkId':_0x58e82e}});return _0x381730[_0x247d58(0x126)];}function buildQuery(_0x4bb5b1){const _0x8d6ec=a113_0x5352,_0xaccf7d=new URLSearchParams();for(const [_0x10eb9c,_0x1b3daa]of Object[_0x8d6ec(0x13b)](_0x4bb5b1)){if(_0x1b3daa===undefined||_0x1b3daa==='')continue;_0xaccf7d[_0x8d6ec(0x142)](_0x10eb9c,String(_0x1b3daa));}const _0x490d5d=_0xaccf7d['toString']();return _0x490d5d?'?'+_0x490d5d:'';}export async function listDbLinks(_0x5e8926,_0x2d12c4){const _0x43273b=a113_0x5352,_0x308c33=await apiRequest(_0x43273b(0x10e),{'method':_0x43273b(0x16e),'body':{'appCode':_0x5e8926,'currentPage':_0x2d12c4?.[_0x43273b(0x154)]??0x1,'pageSize':_0x2d12c4?.[_0x43273b(0x140)]??0x64}});return{'items':extractList(_0x308c33[_0x43273b(0x126)]),'paging':extractPaging(_0x308c33['data'])};}export async function getDbLinkInfo(_0x30d743){const _0x532c51=a113_0x5352,_0x46c5cf=await apiRequest(_0x532c51(0x135)+buildQuery({'id':_0x30d743}));return _0x46c5cf['data'];}function a113_0x5352(_0x16c16f,_0xab1462){_0x16c16f=_0x16c16f-0x105;const _0x305fbc=a113_0x305f();let _0x535233=_0x305fbc[_0x16c16f];return _0x535233;}export async function createDbLink(_0x4824ba){const _0x262cce=a113_0x5352,_0x3c50f9=await apiRequest('/smartapi/dblink/create',{'method':_0x262cce(0x16e),'body':_0x4824ba});return _0x3c50f9[_0x262cce(0x126)];}export async function updateDbLink(_0xb6982b){const _0x23b6ed=a113_0x5352,_0x3b1728=await apiRequest(_0x23b6ed(0x183),{'method':'POST','body':_0xb6982b});return _0x3b1728['data'];}export async function deleteDbLink(_0x42597a){const _0x2a0301=a113_0x5352;await apiRequest(_0x2a0301(0x151),{'method':'POST','body':{'id':_0x42597a}});}export async function testDbLinkConnect(_0xab7bb1){const _0x2b8803=a113_0x5352,_0x428964=await apiRequest('/smartapi/dblink/testConnect'+buildQuery({'id':_0xab7bb1}));return _0x428964[_0x2b8803(0x126)];}export async function startDbAnalysis(_0x5b07d1,_0x2d16c8){const _0x4e9856=a113_0x5352,_0x560dd4=await apiRequest('/smartapi/db-analysis/start',{'method':_0x4e9856(0x16e),'body':{'dbLinkId':_0x5b07d1,..._0x2d16c8&&_0x2d16c8[_0x4e9856(0x167)]>0x0?{'tableNames':_0x2d16c8}:{}}}),_0x5ad9f0=_0x560dd4[_0x4e9856(0x126)];if(typeof _0x5ad9f0===_0x4e9856(0x14c))return _0x5ad9f0;if(_0x5ad9f0&&typeof _0x5ad9f0==='object'&&typeof _0x5ad9f0['planId']===_0x4e9856(0x14c))return _0x5ad9f0[_0x4e9856(0x175)];return _0x5ad9f0!=null?String(_0x5ad9f0):'';}export async function cancelDbAnalysis(_0x2f00f6){await apiRequest('/smartapi/db-analysis/jobs/cancel'+buildQuery({'planId':_0x2f00f6}),{'method':'POST'});}export async function getDbAnalysisStatus(_0x57a3cb){const _0x23d448=a113_0x5352,_0x3fc65f=await apiRequest(_0x23d448(0x127)+encodeURIComponent(_0x57a3cb));return _0x3fc65f[_0x23d448(0x126)];}export async function getDbAllTableList(_0x25a916,_0x23bf72){const _0x42a34b=a113_0x5352,_0x5b8531=await apiRequest('/smartapi/dblink/getAllTableList'+buildQuery({'appCode':_0x25a916,'dbLinkId':_0x23bf72})),_0x5ea5d2=_0x5b8531[_0x42a34b(0x126)];if(Array['isArray'](_0x5ea5d2))return _0x5ea5d2;return extractList(_0x5ea5d2);}export async function getDbTableDiff(_0x17ea22,_0xd49e18,_0x3c692b){const _0x182fe3=a113_0x5352,_0x44b6b6=await apiRequest(_0x182fe3(0x13c)+buildQuery({'appCode':_0x17ea22,'dbLinkId':_0xd49e18,'pageIndex':_0x3c692b?.['pageIndex']??0x1,'pageSize':_0x3c692b?.['pageSize']??0x14,'tableName':_0x3c692b?.[_0x182fe3(0x111)]})),_0x12c323=_0x44b6b6[_0x182fe3(0x126)];return{'totalCount':_0x12c323?.[_0x182fe3(0x128)]??0x0,'tableList':Array[_0x182fe3(0x109)](_0x12c323?.[_0x182fe3(0x11d)])?_0x12c323['tableList']:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0xc54bd8=a113_0x5352,_0x526655=await apiRequest(_0xc54bd8(0x186),{'method':'POST','body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0x14cbfb=extractList(_0x526655['data']),_0x14d98f=extractPaging(_0x526655['data']);return _0x14d98f&&_0x14d98f[_0xc54bd8(0x128)]>REMOTE_APP_PAGE_SIZE&&console['warn'](_0xc54bd8(0x157)+REMOTE_APP_PAGE_SIZE+'\x20of\x20'+_0x14d98f[_0xc54bd8(0x128)]+_0xc54bd8(0x173)+_0xc54bd8(0x179)),_0x14cbfb;}