@lovrabet/rabetbase-cli 2.1.7-beta.9 → 2.1.8

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 (196) 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/create.js +1 -1
  28. package/lib/commands/bff/delete.js +1 -1
  29. package/lib/commands/bff/detail.js +1 -1
  30. package/lib/commands/bff/index.js +1 -1
  31. package/lib/commands/bff/list.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/data/filter.js +1 -1
  48. package/lib/commands/data/getOne.js +1 -1
  49. package/lib/commands/data/index.js +1 -1
  50. package/lib/commands/data/shared.js +1 -1
  51. package/lib/commands/dataset/delete.js +1 -1
  52. package/lib/commands/dataset/detail.js +1 -1
  53. package/lib/commands/dataset/index.js +1 -1
  54. package/lib/commands/dataset/link-create.js +1 -1
  55. package/lib/commands/dataset/link-delete.js +1 -1
  56. package/lib/commands/dataset/link-shared.js +1 -1
  57. package/lib/commands/dataset/link-update.js +1 -1
  58. package/lib/commands/dataset/links.js +1 -1
  59. package/lib/commands/dataset/list.js +1 -1
  60. package/lib/commands/dataset/operations.js +1 -1
  61. package/lib/commands/db/analyze-cancel.js +1 -1
  62. package/lib/commands/db/analyze-start.js +1 -1
  63. package/lib/commands/db/analyze-status.js +1 -1
  64. package/lib/commands/db/create.js +1 -1
  65. package/lib/commands/db/delete.js +1 -1
  66. package/lib/commands/db/detail.js +1 -1
  67. package/lib/commands/db/diff.js +1 -1
  68. package/lib/commands/db/index.js +1 -1
  69. package/lib/commands/db/list.js +1 -1
  70. package/lib/commands/db/shared.js +1 -1
  71. package/lib/commands/db/tables.js +1 -1
  72. package/lib/commands/db/test.js +1 -1
  73. package/lib/commands/db/update.js +1 -1
  74. package/lib/commands/doctor.js +1 -1
  75. package/lib/commands/init/index.js +1 -1
  76. package/lib/commands/issue/index.js +1 -1
  77. package/lib/commands/issue/report.js +1 -1
  78. package/lib/commands/logs/index.js +1 -1
  79. package/lib/commands/menu/index.js +1 -1
  80. package/lib/commands/menu/shared/compare-table.js +1 -1
  81. package/lib/commands/menu/shared/index.js +1 -1
  82. package/lib/commands/menu/shared/inquirer.js +1 -1
  83. package/lib/commands/menu/shared/local-pages.js +1 -1
  84. package/lib/commands/menu/shared/logic.js +1 -1
  85. package/lib/commands/menu/shared/service.js +1 -1
  86. package/lib/commands/menu/shared/sync-core.js +1 -1
  87. package/lib/commands/menu/shared/update-core.js +1 -1
  88. package/lib/commands/menu/shared/valid-url.js +1 -1
  89. package/lib/commands/menu/sync.js +1 -1
  90. package/lib/commands/menu/update.js +1 -1
  91. package/lib/commands/page/generate-start.js +1 -1
  92. package/lib/commands/page/generate-status.js +1 -1
  93. package/lib/commands/page/index.js +1 -1
  94. package/lib/commands/page/pull.js +1 -1
  95. package/lib/commands/page/push.js +1 -1
  96. package/lib/commands/page/shared.js +1 -1
  97. package/lib/commands/page/standard-page-status.js +1 -1
  98. package/lib/commands/page/sync.js +1 -1
  99. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  100. package/lib/commands/project/create/format-elapsed.js +1 -1
  101. package/lib/commands/project/create/main.js +1 -1
  102. package/lib/commands/project/create/non-interactive.js +1 -1
  103. package/lib/commands/project/create/project-template-path.js +1 -1
  104. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  105. package/lib/commands/project/create/use-format-code.js +1 -1
  106. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  107. package/lib/commands/project/index.js +1 -1
  108. package/lib/commands/project/init.js +1 -1
  109. package/lib/commands/project/upgrade.js +1 -1
  110. package/lib/commands/registry.js +1 -1
  111. package/lib/commands/run/index.js +1 -1
  112. package/lib/commands/schema.js +1 -1
  113. package/lib/commands/skill/index.js +1 -1
  114. package/lib/commands/sql/create.js +1 -1
  115. package/lib/commands/sql/delete.js +1 -1
  116. package/lib/commands/sql/detail.js +1 -1
  117. package/lib/commands/sql/exec.js +1 -1
  118. package/lib/commands/sql/index.js +1 -1
  119. package/lib/commands/sql/list.js +1 -1
  120. package/lib/commands/sql/pull.js +1 -1
  121. package/lib/commands/sql/push.js +1 -1
  122. package/lib/commands/sql/save.js +1 -1
  123. package/lib/commands/sql/shared.js +1 -1
  124. package/lib/commands/sql/status.js +1 -1
  125. package/lib/commands/sql/validate.js +1 -1
  126. package/lib/config/schema.js +1 -1
  127. package/lib/constant/cdn.js +1 -1
  128. package/lib/constant/cli.js +1 -1
  129. package/lib/constant/defaults.js +1 -1
  130. package/lib/constant/domain.js +1 -1
  131. package/lib/constant/env.js +1 -1
  132. package/lib/constant/output.js +1 -1
  133. package/lib/constant/paths.js +1 -1
  134. package/lib/constant/risk.js +1 -1
  135. package/lib/context.js +1 -1
  136. package/lib/core/alias-resolver.js +1 -1
  137. package/lib/core/api-client.js +1 -1
  138. package/lib/core/bff/config.js +1 -1
  139. package/lib/core/bff/file-system.js +1 -1
  140. package/lib/core/bff/hash.js +1 -1
  141. package/lib/core/bff/lock.js +1 -1
  142. package/lib/core/bff/utils.js +1 -1
  143. package/lib/core/db-resolver.js +1 -1
  144. package/lib/core/page/file-system.js +1 -1
  145. package/lib/core/page/hash.js +1 -1
  146. package/lib/core/page/lock.js +1 -1
  147. package/lib/core/sql-sync/config.js +1 -1
  148. package/lib/core/sql-sync/file-system.js +1 -1
  149. package/lib/core/sql-sync/hash.js +1 -1
  150. package/lib/core/sql-sync/lock.js +1 -1
  151. package/lib/core/sql-sync/utils.js +1 -1
  152. package/lib/core/sql-validator.js +1 -1
  153. package/lib/errors.js +1 -1
  154. package/lib/framework/build-all-flags.js +1 -1
  155. package/lib/framework/flags.js +1 -1
  156. package/lib/framework/help.js +1 -1
  157. package/lib/framework/index.js +1 -1
  158. package/lib/framework/output.js +1 -1
  159. package/lib/framework/response.js +1 -1
  160. package/lib/framework/runner-alias.js +1 -1
  161. package/lib/framework/runner.js +1 -1
  162. package/lib/framework/schema-export.js +1 -1
  163. package/lib/framework/types.js +1 -1
  164. package/lib/generated/build-info.js +1 -1
  165. package/lib/help.js +1 -1
  166. package/lib/skills/main.js +1 -1
  167. package/lib/skills/npx-skills-add.js +1 -1
  168. package/lib/telemetry/cli-command-trace.js +1 -1
  169. package/lib/telemetry/cli-help-trace.js +1 -1
  170. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  171. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  172. package/lib/telemetry/send-cli-trace-log.js +1 -1
  173. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  174. package/lib/utils/ai_config.js +1 -1
  175. package/lib/utils/apply-jq-filter.js +1 -1
  176. package/lib/utils/cdn-config.js +1 -1
  177. package/lib/utils/check-sdk-version.js +1 -1
  178. package/lib/utils/cli-version-check.js +1 -1
  179. package/lib/utils/cli-version-policy.js +1 -1
  180. package/lib/utils/config.js +1 -1
  181. package/lib/utils/copy-directory.js +1 -1
  182. package/lib/utils/entity-with-id.js +1 -1
  183. package/lib/utils/file-utils.js +1 -1
  184. package/lib/utils/guides-cdn.js +1 -1
  185. package/lib/utils/http-client.js +1 -1
  186. package/lib/utils/is-non-interactive.js +1 -1
  187. package/lib/utils/logger.js +1 -1
  188. package/lib/utils/params.js +1 -1
  189. package/lib/utils/platform.js +1 -1
  190. package/lib/utils/rules-cdn.js +1 -1
  191. package/lib/utils/sleep.js +1 -1
  192. package/lib/utils/template-replacer.js +1 -1
  193. package/lib/utils/version.js +1 -1
  194. package/lib/utils/with-active-cookie.js +1 -1
  195. package/lib/utils/write-cli-side-channel.js +1 -1
  196. package/package.json +1 -1
@@ -1 +1 @@
1
- function a120_0x28ec(){const _0x219bde=['279232jpVobP','19449QCmaPu','Force\x20overwrite\x20local\x20unsynced\x20changes','Force\x20pull\x20will\x20overwrite\x20local\x20SQL\x20that\x20differs\x20from\x20remote.','boolean','description','join','498rYqRiD','POST','appCode','toISOString','bool','Filter\x20by\x20SQL\x20display\x20name','lockFilePath','lastSync','skipped','apps','1554800cnOOyR','sql','No\x20remote\x20SQL\x20queries\x20matched.','sqlName','replace','sqlRootDir','sqlCode','11963rPFTxK','74082VrTLPt','push','Pull\x20complete:\x20','length','unchanged','/smartapi/custom/queryUserCustomSqlList\x20+\x20/smartapi/custom/getUserCustomSql','Would\x20pull\x20','test','trimStart','Force\x20pull\x20cancelled.','local\x20differs\x20from\x20remote','\x20skipped,\x20','nonInteractive','name','catch','mybatisXml','local\x20differs\x20from\x20remote\x20(use\x20--force\x20to\x20overwrite)','filter','130PxVNZj','4wXVMEi','sqlcode','sqls','paging','str','would_pull','35876pnRtUT','85lrODQy','write','sqlRoot','path','utf8','\x20failed','4113395SFDsfq','Pull\x20remote\x20SQL\x20queries\x20to\x20local\x20.rabetbase/sql/','sqlContent','dbId','\x20written,\x20','conflict','string','pull'];a120_0x28ec=function(){return _0x219bde;};return a120_0x28ec();}const a120_0x5b5265=a120_0x47fb;(function(_0x34ad0f,_0x18df49){const _0x20af07=a120_0x47fb,_0x498bb8=_0x34ad0f();while(!![]){try{const _0x51ff04=parseInt(_0x20af07(0x17d))/0x1+-parseInt(_0x20af07(0x1a9))/0x2*(parseInt(_0x20af07(0x196))/0x3)+-parseInt(_0x20af07(0x1af))/0x4*(parseInt(_0x20af07(0x1b0))/0x5)+-parseInt(_0x20af07(0x184))/0x6*(parseInt(_0x20af07(0x195))/0x7)+-parseInt(_0x20af07(0x18e))/0x8+-parseInt(_0x20af07(0x17e))/0x9*(-parseInt(_0x20af07(0x1a8))/0xa)+parseInt(_0x20af07(0x175))/0xb;if(_0x51ff04===_0x18df49)break;else _0x498bb8['push'](_0x498bb8['shift']());}catch(_0x373da1){_0x498bb8['push'](_0x498bb8['shift']());}}}(a120_0x28ec,0x22f6c));import{readFile,rm,writeFile}from'node:fs/promises';import{join}from'node:path';function a120_0x47fb(_0x5d2be6,_0x8e40ff){_0x5d2be6=_0x5d2be6-0x175;const _0x28ec8e=a120_0x28ec();let _0x47fb3f=_0x28ec8e[_0x5d2be6];return _0x47fb3f;}import{getSqlQueryDetail,listSqlQueries}from'../../core/api-client.js';import{ensureParentDirectory,fileExists}from'../../core/bff/file-system.js';import{getDbName}from'../../core/db-resolver.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{computeSqlContentHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{resolveLocalSqlFilePath}from'../../core/sql-sync/file-system.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildLocalSqlFileContent,buildSqlLockEntry,cloneSqlLockData,confirmForceOverwrite,ensureRemoteSqlContent,stripLocalSqlMetadata}from'./shared.js';const PAGE_SIZE=0x64;async function fetchAllSqlQueries(_0x5586ee,_0x11a94f){const _0x493b2c=a120_0x47fb,_0x44aecb=[];let _0x212155=0x1;while(!![]){const _0x1b9fba=await listSqlQueries(_0x5586ee,{'currentPage':_0x212155,'pageSize':PAGE_SIZE,'sqlCode':_0x11a94f[_0x493b2c(0x194)],'sqlName':_0x11a94f[_0x493b2c(0x191)]}),_0x540565=_0x1b9fba['tableData']??[];_0x44aecb[_0x493b2c(0x197)](..._0x540565);if(_0x540565[_0x493b2c(0x199)]===0x0)break;const _0x25924e=_0x1b9fba[_0x493b2c(0x1ac)]?.['totalCount'];if(_0x25924e!=null?_0x44aecb[_0x493b2c(0x199)]>=_0x25924e:_0x540565[_0x493b2c(0x199)]<PAGE_SIZE)break;_0x212155++;}return _0x44aecb;}async function ensureSqlContent(_0x2f5957){const _0x4e7696=a120_0x47fb;if(_0x2f5957[_0x4e7696(0x177)]!=null&&String(_0x2f5957[_0x4e7696(0x177)])[_0x4e7696(0x199)]>0x0)return _0x2f5957;return getSqlQueryDetail(_0x2f5957[_0x4e7696(0x194)]);}export const sqlPull={'service':'sql','command':a120_0x5b5265(0x17c),'description':a120_0x5b5265(0x176),'risk':a120_0x5b5265(0x1b1),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a120_0x5b5265(0x1a3),'type':a120_0x5b5265(0x17b),'description':a120_0x5b5265(0x189)},{'name':'force','type':a120_0x5b5265(0x181),'description':a120_0x5b5265(0x17f)}],async 'dryRun'(_0x1163e6){const _0x21e039=a120_0x5b5265,_0x291abc=loadSqlProjectConfig(_0x1163e6[_0x21e039(0x186)]),_0x42c3b2=await readSqlLockFile(_0x291abc[_0x21e039(0x18a)]),{appLock:_0x1f37e6}=ensureSqlLockScope(_0x42c3b2??createEmptySqlLock(),_0x291abc[_0x21e039(0x186)],_0x291abc['sqlRoot'],_0x21e039(0x17c)),_0xecb83a=await fetchAllSqlQueries(_0x1163e6[_0x21e039(0x186)],{'sqlCode':_0x1163e6['str']('sqlcode')||undefined,'sqlName':_0x1163e6[_0x21e039(0x1ad)]('name')||undefined}),_0x1f0165=[];for(const _0x3cb94a of _0xecb83a){const _0x477dc7=await ensureSqlContent(_0x3cb94a),_0x37a7e2=ensureRemoteSqlContent(_0x477dc7),_0x3d92b4=detectModeFromSql(_0x477dc7),_0x5898ef=_0x477dc7['dbId']?await getDbName(_0x1163e6[_0x21e039(0x186)],Number(_0x477dc7['dbId']))[_0x21e039(0x1a4)](()=>undefined):undefined,_0x442692=buildLocalSqlFileContent({'sqlCode':_0x477dc7[_0x21e039(0x194)],'sqlName':_0x477dc7[_0x21e039(0x191)],'dbId':_0x477dc7[_0x21e039(0x178)]},_0x37a7e2,{'dbName':_0x5898ef,'mode':_0x3d92b4,'syncedAt':new Date()[_0x21e039(0x187)](),'description':_0x477dc7[_0x21e039(0x182)]}),_0x472c27=buildSqlLockEntry(_0x477dc7,_0x37a7e2,'',{'dbName':_0x5898ef}),_0x14e9cc=resolveLocalSqlFilePath(_0x291abc,_0x477dc7[_0x21e039(0x194)],_0x472c27);let _0x17db02=_0x21e039(0x1ae),_0x189cc8;if(await fileExists(_0x14e9cc)){const _0x491491=await readFile(_0x14e9cc,_0x21e039(0x1b4));isEquivalentPulledSqlFile(_0x491491,_0x442692,_0x3d92b4)?(_0x17db02=_0x21e039(0x18c),_0x189cc8='unchanged'):(_0x17db02=_0x21e039(0x17a),_0x189cc8=_0x21e039(0x1a6));}_0x1f0165[_0x21e039(0x197)]({'sqlCode':_0x477dc7[_0x21e039(0x194)],'sqlName':_0x477dc7['sqlName'],'filePath':_0x14e9cc,'status':_0x17db02,'reason':_0x189cc8});}return{'method':_0x21e039(0x185),'url':_0x21e039(0x19b),'body':{'appCode':_0x1163e6[_0x21e039(0x186)],'sqlCode':_0x1163e6[_0x21e039(0x1ad)]('sqlcode')||null,'sqlName':_0x1163e6[_0x21e039(0x1ad)](_0x21e039(0x1a3))||null,'files':_0x1f0165},'description':_0x21e039(0x19c)+_0x1f0165['length']+'\x20SQL\x20file(s)\x20into\x20'+_0x291abc['sqlRootDir']};},async 'execute'(_0x5ca377){const _0x2b04c5=a120_0x5b5265,_0x4f5355=loadSqlProjectConfig(_0x5ca377[_0x2b04c5(0x186)]),_0x47384b=await readSqlLockFile(_0x4f5355[_0x2b04c5(0x18a)]),{lockData:_0x2bb963,appLock:_0x3c1f91}=ensureSqlLockScope(_0x47384b??createEmptySqlLock(),_0x4f5355[_0x2b04c5(0x186)],_0x4f5355[_0x2b04c5(0x1b2)],_0x2b04c5(0x17c)),_0x3299d8=_0x5ca377[_0x2b04c5(0x188)]('force'),_0x26cc00=await fetchAllSqlQueries(_0x5ca377['appCode'],{'sqlCode':_0x5ca377[_0x2b04c5(0x1ad)](_0x2b04c5(0x1aa))||undefined,'sqlName':_0x5ca377[_0x2b04c5(0x1ad)](_0x2b04c5(0x1a3))||undefined});if(_0x26cc00['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x2b04c5(0x190)};const _0x46cf1d=[],_0x43e4c1=[];for(const _0x5b2b22 of _0x26cc00){try{_0x46cf1d['push'](await ensureSqlContent(_0x5b2b22));}catch(_0x9ad96){_0x43e4c1[_0x2b04c5(0x197)]({'sqlCode':_0x5b2b22[_0x2b04c5(0x194)],'error':_0x9ad96 instanceof Error?_0x9ad96['message']:String(_0x9ad96)});}}if(_0x3299d8&&!_0x5ca377[_0x2b04c5(0x1a2)]){let _0xa2b9ef=![];for(const _0x5ea3d8 of _0x46cf1d){const _0x1e5f9e=detectModeFromSql(_0x5ea3d8),_0x5ce561=_0x5ea3d8[_0x2b04c5(0x178)]?await getDbName(_0x5ca377[_0x2b04c5(0x186)],Number(_0x5ea3d8[_0x2b04c5(0x178)]))[_0x2b04c5(0x1a4)](()=>undefined):undefined,_0x1a71b0=buildLocalSqlFileContent({'sqlCode':_0x5ea3d8[_0x2b04c5(0x194)],'sqlName':_0x5ea3d8[_0x2b04c5(0x191)],'dbId':_0x5ea3d8[_0x2b04c5(0x178)]},ensureRemoteSqlContent(_0x5ea3d8),{'dbName':_0x5ce561,'mode':_0x1e5f9e,'syncedAt':new Date()[_0x2b04c5(0x187)](),'description':_0x5ea3d8[_0x2b04c5(0x182)]}),_0x5c402b=resolveLocalSqlFilePath(_0x4f5355,_0x5ea3d8['sqlCode'],buildSqlLockEntry(_0x5ea3d8,ensureRemoteSqlContent(_0x5ea3d8),'',{'dbName':_0x5ce561}));if(await fileExists(_0x5c402b)){const _0x4057b3=await readFile(_0x5c402b,'utf8');if(!isEquivalentPulledSqlFile(_0x4057b3,_0x1a71b0,_0x1e5f9e)){_0xa2b9ef=!![];break;}}}if(_0xa2b9ef){const _0x3f6a45=await confirmForceOverwrite(_0x2b04c5(0x180));if(!_0x3f6a45)throw CliErrors['cancelled'](_0x2b04c5(0x19f));}}const _0x53de49=cloneSqlLockData(_0x2bb963),_0x3e2214=_0x53de49[_0x2b04c5(0x18d)][_0x4f5355[_0x2b04c5(0x186)]],_0x47d5e0=[],_0x2acf69=[];for(const _0x109307 of _0x46cf1d){const _0x450cc7=_0x3e2214[_0x2b04c5(0x1ab)][_0x109307[_0x2b04c5(0x194)]],_0x432f5b=ensureRemoteSqlContent(_0x109307),_0x502413=detectModeFromSql(_0x109307),_0x358ac7=_0x109307['dbId']?await getDbName(_0x5ca377['appCode'],Number(_0x109307['dbId']))['catch'](()=>undefined):undefined,_0x51f15a=buildLocalSqlFileContent({'sqlCode':_0x109307[_0x2b04c5(0x194)],'sqlName':_0x109307['sqlName'],'dbId':_0x109307[_0x2b04c5(0x178)]},_0x432f5b,{'dbName':_0x358ac7,'mode':_0x502413,'syncedAt':new Date()[_0x2b04c5(0x187)](),'description':_0x109307[_0x2b04c5(0x182)]}),_0x3d0f0a=buildSqlLockEntry(_0x109307,_0x432f5b,computeSqlContentHash(_0x51f15a),{'dbName':_0x358ac7}),_0x3b1d48=_0x3d0f0a[_0x2b04c5(0x1b3)],_0x322547=join(_0x4f5355[_0x2b04c5(0x193)],_0x3b1d48);try{if(await fileExists(_0x322547)){const _0x3ae9f8=await readFile(_0x322547,'utf8');if(isEquivalentPulledSqlFile(_0x3ae9f8,_0x51f15a,_0x502413)){_0x2acf69['push']({'sqlCode':_0x109307['sqlCode'],'reason':_0x2b04c5(0x19a)}),_0x3e2214['sqls'][_0x109307[_0x2b04c5(0x194)]]={..._0x3d0f0a,'hash':computeSqlContentHash(_0x3ae9f8),'path':_0x3b1d48};continue;}if(!_0x3299d8){_0x2acf69[_0x2b04c5(0x197)]({'sqlCode':_0x109307[_0x2b04c5(0x194)],'reason':_0x2b04c5(0x1a0)});continue;}}const _0x15c469=_0x450cc7?.[_0x2b04c5(0x1b3)]?join(_0x4f5355[_0x2b04c5(0x193)],_0x450cc7[_0x2b04c5(0x1b3)]):undefined;_0x15c469&&_0x15c469!==_0x322547&&await fileExists(_0x15c469)&&await rm(_0x15c469,{'force':!![]}),await ensureParentDirectory(_0x322547),await writeFile(_0x322547,_0x51f15a,_0x2b04c5(0x1b4)),_0x3e2214['sqls'][_0x109307[_0x2b04c5(0x194)]]={..._0x3d0f0a,'path':_0x3b1d48},_0x47d5e0[_0x2b04c5(0x197)]({'sqlCode':_0x109307[_0x2b04c5(0x194)],'filePath':_0x322547});}catch(_0x2f542b){_0x43e4c1[_0x2b04c5(0x197)]({'sqlCode':_0x109307[_0x2b04c5(0x194)],'error':_0x2f542b instanceof Error?_0x2f542b['message']:String(_0x2f542b)});}}return _0x3e2214[_0x2b04c5(0x18b)]=new Date()['toISOString'](),await writeSqlLockFile(_0x4f5355[_0x2b04c5(0x18a)],_0x53de49),{'ok':_0x43e4c1[_0x2b04c5(0x199)]===0x0,'data':{'pulled':_0x47d5e0,'skipped':_0x2acf69,'failed':_0x43e4c1},'message':_0x2b04c5(0x198)+_0x47d5e0[_0x2b04c5(0x199)]+_0x2b04c5(0x179)+_0x2acf69['length']+_0x2b04c5(0x1a1)+_0x43e4c1[_0x2b04c5(0x199)]+_0x2b04c5(0x1b5)};}};function detectModeFromSql(_0x5e2a25){const _0x5108dd=a120_0x5b5265,_0x5abcbc=ensureRemoteSqlContent(_0x5e2a25),_0x1b53e6=stripLocalSqlMetadata(_0x5abcbc,_0x5108dd(0x1a5))[_0x5108dd(0x19e)]();if(/^<(select|insert|update|delete)\b/i[_0x5108dd(0x19d)](_0x1b53e6))return _0x5108dd(0x1a5);return _0x5108dd(0x18f);}function isEquivalentPulledSqlFile(_0xab58fe,_0x38a4da,_0x3c1e2e){return normalizePullComparableContent(_0xab58fe,_0x3c1e2e)===normalizePullComparableContent(_0x38a4da,_0x3c1e2e);}function normalizePullComparableContent(_0x1e507b,_0x489231){const _0x42cdc2=a120_0x5b5265,_0x4b8e8c=_0x1e507b[_0x42cdc2(0x192)](/\r\n/g,'\x0a')['split']('\x0a'),_0x42da1a=_0x4b8e8c[_0x42cdc2(0x1a7)](_0xd17786=>!isSyncedAtMetadataLine(_0xd17786,_0x489231));return _0x42da1a[_0x42cdc2(0x183)]('\x0a');}function isSyncedAtMetadataLine(_0x4a194c,_0x5eee3f){const _0x496a3a=a120_0x5b5265;if(_0x5eee3f==='mybatisXml')return/^\s*<!--\s*@lovrabet\.syncedAt:/[_0x496a3a(0x19d)](_0x4a194c);return/^\s*--\s*@lovrabet\.syncedAt:/['test'](_0x4a194c);}
1
+ const a120_0x4889ed=a120_0x54fb;(function(_0x21013a,_0x1db557){const _0x773419=a120_0x54fb,_0x10028a=_0x21013a();while(!![]){try{const _0x48e00f=parseInt(_0x773419(0x17b))/0x1*(-parseInt(_0x773419(0x1aa))/0x2)+-parseInt(_0x773419(0x18a))/0x3*(-parseInt(_0x773419(0x19f))/0x4)+parseInt(_0x773419(0x1a9))/0x5+parseInt(_0x773419(0x1b6))/0x6*(-parseInt(_0x773419(0x183))/0x7)+parseInt(_0x773419(0x1ac))/0x8+-parseInt(_0x773419(0x181))/0x9+parseInt(_0x773419(0x17a))/0xa*(parseInt(_0x773419(0x182))/0xb);if(_0x48e00f===_0x1db557)break;else _0x10028a['push'](_0x10028a['shift']());}catch(_0x151f98){_0x10028a['push'](_0x10028a['shift']());}}}(a120_0x549c,0xd29c7));import{readFile,rm,writeFile}from'node:fs/promises';import{join}from'node:path';import{getSqlQueryDetail,listSqlQueries}from'../../core/api-client.js';import{ensureParentDirectory,fileExists}from'../../core/bff/file-system.js';import{getDbName}from'../../core/db-resolver.js';function a120_0x549c(){const _0x13278b=['mybatisXml','conflict','\x20failed','totalCount','7104663lMKyTI','22AyXFVr','3031mIYNgw','length','str','path','nonInteractive','force','write','2409KtQkEO','catch','Force\x20pull\x20will\x20overwrite\x20local\x20SQL\x20that\x20differs\x20from\x20remote.','filter','unchanged','Would\x20pull\x20','description','/smartapi/custom/queryUserCustomSqlList\x20+\x20/smartapi/custom/getUserCustomSql','apps','string','bool','sqlRoot','name','test','pull','message','Pull\x20complete:\x20','push','\x20skipped,\x20','sqlContent','tableData','7444SwJZjn','local\x20differs\x20from\x20remote\x20(use\x20--force\x20to\x20overwrite)','sqls','sqlRootDir','toISOString','Pull\x20remote\x20SQL\x20queries\x20to\x20local\x20.rabetbase/sql/','paging','No\x20remote\x20SQL\x20queries\x20matched.','boolean','cancelled','1458875NIyJOd','838364mjcDDU','sqlName','7981024HnbqvR','sql','lastSync','\x20written,\x20','Force\x20pull\x20cancelled.','Force\x20overwrite\x20local\x20unsynced\x20changes','dbId','appCode','sqlCode','sqlcode','11028LfakGa','skipped','utf8','split','POST','would_pull','4608420TIwyEI','3BuKRBV','lockFilePath'];a120_0x549c=function(){return _0x13278b;};return a120_0x549c();}import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{computeSqlContentHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{resolveLocalSqlFilePath}from'../../core/sql-sync/file-system.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildLocalSqlFileContent,buildSqlLockEntry,cloneSqlLockData,confirmForceOverwrite,ensureRemoteSqlContent,stripLocalSqlMetadata}from'./shared.js';const PAGE_SIZE=0x64;function a120_0x54fb(_0x52ec6e,_0x328825){_0x52ec6e=_0x52ec6e-0x179;const _0x549cbd=a120_0x549c();let _0x54fbc7=_0x549cbd[_0x52ec6e];return _0x54fbc7;}async function fetchAllSqlQueries(_0x18128f,_0x14f909){const _0x4eb69f=a120_0x54fb,_0x565c43=[];let _0xc7cb44=0x1;while(!![]){const _0x33f782=await listSqlQueries(_0x18128f,{'currentPage':_0xc7cb44,'pageSize':PAGE_SIZE,'sqlCode':_0x14f909[_0x4eb69f(0x1b4)],'sqlName':_0x14f909[_0x4eb69f(0x1ab)]}),_0x1c1e52=_0x33f782[_0x4eb69f(0x19e)]??[];_0x565c43['push'](..._0x1c1e52);if(_0x1c1e52[_0x4eb69f(0x184)]===0x0)break;const _0x17179f=_0x33f782[_0x4eb69f(0x1a5)]?.[_0x4eb69f(0x180)];if(_0x17179f!=null?_0x565c43[_0x4eb69f(0x184)]>=_0x17179f:_0x1c1e52[_0x4eb69f(0x184)]<PAGE_SIZE)break;_0xc7cb44++;}return _0x565c43;}async function ensureSqlContent(_0x19f1d4){const _0x3b6b10=a120_0x54fb;if(_0x19f1d4['sqlContent']!=null&&String(_0x19f1d4[_0x3b6b10(0x19d)])['length']>0x0)return _0x19f1d4;return getSqlQueryDetail(_0x19f1d4[_0x3b6b10(0x1b4)]);}export const sqlPull={'service':a120_0x4889ed(0x1ad),'command':a120_0x4889ed(0x198),'description':a120_0x4889ed(0x1a4),'risk':a120_0x4889ed(0x189),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a120_0x4889ed(0x196),'type':a120_0x4889ed(0x193),'description':'Filter\x20by\x20SQL\x20display\x20name'},{'name':'force','type':a120_0x4889ed(0x1a7),'description':a120_0x4889ed(0x1b1)}],async 'dryRun'(_0x2d8d6b){const _0x503e05=a120_0x4889ed,_0x29d6b2=loadSqlProjectConfig(_0x2d8d6b[_0x503e05(0x1b3)]),_0x47f34b=await readSqlLockFile(_0x29d6b2[_0x503e05(0x17c)]),{appLock:_0x336d5c}=ensureSqlLockScope(_0x47f34b??createEmptySqlLock(),_0x29d6b2[_0x503e05(0x1b3)],_0x29d6b2[_0x503e05(0x195)],_0x503e05(0x198)),_0x29f617=await fetchAllSqlQueries(_0x2d8d6b[_0x503e05(0x1b3)],{'sqlCode':_0x2d8d6b[_0x503e05(0x185)](_0x503e05(0x1b5))||undefined,'sqlName':_0x2d8d6b[_0x503e05(0x185)](_0x503e05(0x196))||undefined}),_0x2dda48=[];for(const _0x318ca7 of _0x29f617){const _0x7e49c0=await ensureSqlContent(_0x318ca7),_0x188a7a=ensureRemoteSqlContent(_0x7e49c0),_0x4eeb71=detectModeFromSql(_0x7e49c0),_0x20718e=_0x7e49c0['dbId']?await getDbName(_0x2d8d6b[_0x503e05(0x1b3)],Number(_0x7e49c0[_0x503e05(0x1b2)]))[_0x503e05(0x18b)](()=>undefined):undefined,_0x4bea53=buildLocalSqlFileContent({'sqlCode':_0x7e49c0[_0x503e05(0x1b4)],'sqlName':_0x7e49c0[_0x503e05(0x1ab)],'dbId':_0x7e49c0[_0x503e05(0x1b2)]},_0x188a7a,{'dbName':_0x20718e,'mode':_0x4eeb71,'syncedAt':new Date()[_0x503e05(0x1a3)](),'description':_0x7e49c0[_0x503e05(0x190)]}),_0x3dfdc7=buildSqlLockEntry(_0x7e49c0,_0x188a7a,'',{'dbName':_0x20718e}),_0x1630d6=resolveLocalSqlFilePath(_0x29d6b2,_0x7e49c0[_0x503e05(0x1b4)],_0x3dfdc7);let _0x6c617d=_0x503e05(0x179),_0x359a93;if(await fileExists(_0x1630d6)){const _0x1c5c71=await readFile(_0x1630d6,_0x503e05(0x1b8));isEquivalentPulledSqlFile(_0x1c5c71,_0x4bea53,_0x4eeb71)?(_0x6c617d=_0x503e05(0x1b7),_0x359a93=_0x503e05(0x18e)):(_0x6c617d=_0x503e05(0x17e),_0x359a93=_0x503e05(0x1a0));}_0x2dda48[_0x503e05(0x19b)]({'sqlCode':_0x7e49c0[_0x503e05(0x1b4)],'sqlName':_0x7e49c0[_0x503e05(0x1ab)],'filePath':_0x1630d6,'status':_0x6c617d,'reason':_0x359a93});}return{'method':_0x503e05(0x1ba),'url':_0x503e05(0x191),'body':{'appCode':_0x2d8d6b['appCode'],'sqlCode':_0x2d8d6b[_0x503e05(0x185)](_0x503e05(0x1b5))||null,'sqlName':_0x2d8d6b[_0x503e05(0x185)]('name')||null,'files':_0x2dda48},'description':_0x503e05(0x18f)+_0x2dda48['length']+'\x20SQL\x20file(s)\x20into\x20'+_0x29d6b2[_0x503e05(0x1a2)]};},async 'execute'(_0x63da69){const _0x1e50fb=a120_0x4889ed,_0x4e4f27=loadSqlProjectConfig(_0x63da69[_0x1e50fb(0x1b3)]),_0x193ef0=await readSqlLockFile(_0x4e4f27[_0x1e50fb(0x17c)]),{lockData:_0xbad6c3,appLock:_0x5d26cf}=ensureSqlLockScope(_0x193ef0??createEmptySqlLock(),_0x4e4f27['appCode'],_0x4e4f27[_0x1e50fb(0x195)],_0x1e50fb(0x198)),_0x59f8e6=_0x63da69[_0x1e50fb(0x194)](_0x1e50fb(0x188)),_0x1396b4=await fetchAllSqlQueries(_0x63da69['appCode'],{'sqlCode':_0x63da69['str'](_0x1e50fb(0x1b5))||undefined,'sqlName':_0x63da69[_0x1e50fb(0x185)]('name')||undefined});if(_0x1396b4[_0x1e50fb(0x184)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x1e50fb(0x1a6)};const _0x2c787a=[],_0x5d65f0=[];for(const _0x5f196c of _0x1396b4){try{_0x2c787a[_0x1e50fb(0x19b)](await ensureSqlContent(_0x5f196c));}catch(_0x57dfa6){_0x5d65f0[_0x1e50fb(0x19b)]({'sqlCode':_0x5f196c[_0x1e50fb(0x1b4)],'error':_0x57dfa6 instanceof Error?_0x57dfa6[_0x1e50fb(0x199)]:String(_0x57dfa6)});}}if(_0x59f8e6&&!_0x63da69[_0x1e50fb(0x187)]){let _0x19c305=![];for(const _0x339566 of _0x2c787a){const _0x3ea473=detectModeFromSql(_0x339566),_0x1f35d4=_0x339566[_0x1e50fb(0x1b2)]?await getDbName(_0x63da69['appCode'],Number(_0x339566['dbId']))[_0x1e50fb(0x18b)](()=>undefined):undefined,_0x5a6360=buildLocalSqlFileContent({'sqlCode':_0x339566['sqlCode'],'sqlName':_0x339566['sqlName'],'dbId':_0x339566[_0x1e50fb(0x1b2)]},ensureRemoteSqlContent(_0x339566),{'dbName':_0x1f35d4,'mode':_0x3ea473,'syncedAt':new Date()['toISOString'](),'description':_0x339566[_0x1e50fb(0x190)]}),_0xd424b1=resolveLocalSqlFilePath(_0x4e4f27,_0x339566[_0x1e50fb(0x1b4)],buildSqlLockEntry(_0x339566,ensureRemoteSqlContent(_0x339566),'',{'dbName':_0x1f35d4}));if(await fileExists(_0xd424b1)){const _0x26f695=await readFile(_0xd424b1,'utf8');if(!isEquivalentPulledSqlFile(_0x26f695,_0x5a6360,_0x3ea473)){_0x19c305=!![];break;}}}if(_0x19c305){const _0x531ad4=await confirmForceOverwrite(_0x1e50fb(0x18c));if(!_0x531ad4)throw CliErrors[_0x1e50fb(0x1a8)](_0x1e50fb(0x1b0));}}const _0x84884a=cloneSqlLockData(_0xbad6c3),_0x4a11c7=_0x84884a[_0x1e50fb(0x192)][_0x4e4f27[_0x1e50fb(0x1b3)]],_0xb0d6fe=[],_0x4cc8bd=[];for(const _0x3087ab of _0x2c787a){const _0x53b9f8=_0x4a11c7['sqls'][_0x3087ab['sqlCode']],_0xa64e1f=ensureRemoteSqlContent(_0x3087ab),_0x4e799a=detectModeFromSql(_0x3087ab),_0x5b70b6=_0x3087ab[_0x1e50fb(0x1b2)]?await getDbName(_0x63da69[_0x1e50fb(0x1b3)],Number(_0x3087ab['dbId']))['catch'](()=>undefined):undefined,_0x4539f7=buildLocalSqlFileContent({'sqlCode':_0x3087ab[_0x1e50fb(0x1b4)],'sqlName':_0x3087ab[_0x1e50fb(0x1ab)],'dbId':_0x3087ab[_0x1e50fb(0x1b2)]},_0xa64e1f,{'dbName':_0x5b70b6,'mode':_0x4e799a,'syncedAt':new Date()[_0x1e50fb(0x1a3)](),'description':_0x3087ab[_0x1e50fb(0x190)]}),_0x2199a9=buildSqlLockEntry(_0x3087ab,_0xa64e1f,computeSqlContentHash(_0x4539f7),{'dbName':_0x5b70b6}),_0x272b57=_0x2199a9['path'],_0x3f144b=join(_0x4e4f27['sqlRootDir'],_0x272b57);try{if(await fileExists(_0x3f144b)){const _0x55e838=await readFile(_0x3f144b,_0x1e50fb(0x1b8));if(isEquivalentPulledSqlFile(_0x55e838,_0x4539f7,_0x4e799a)){_0x4cc8bd['push']({'sqlCode':_0x3087ab[_0x1e50fb(0x1b4)],'reason':_0x1e50fb(0x18e)}),_0x4a11c7[_0x1e50fb(0x1a1)][_0x3087ab['sqlCode']]={..._0x2199a9,'hash':computeSqlContentHash(_0x55e838),'path':_0x272b57};continue;}if(!_0x59f8e6){_0x4cc8bd['push']({'sqlCode':_0x3087ab[_0x1e50fb(0x1b4)],'reason':'local\x20differs\x20from\x20remote'});continue;}}const _0xf549d9=_0x53b9f8?.[_0x1e50fb(0x186)]?join(_0x4e4f27[_0x1e50fb(0x1a2)],_0x53b9f8['path']):undefined;_0xf549d9&&_0xf549d9!==_0x3f144b&&await fileExists(_0xf549d9)&&await rm(_0xf549d9,{'force':!![]}),await ensureParentDirectory(_0x3f144b),await writeFile(_0x3f144b,_0x4539f7,_0x1e50fb(0x1b8)),_0x4a11c7[_0x1e50fb(0x1a1)][_0x3087ab[_0x1e50fb(0x1b4)]]={..._0x2199a9,'path':_0x272b57},_0xb0d6fe[_0x1e50fb(0x19b)]({'sqlCode':_0x3087ab['sqlCode'],'filePath':_0x3f144b});}catch(_0x544c2b){_0x5d65f0['push']({'sqlCode':_0x3087ab[_0x1e50fb(0x1b4)],'error':_0x544c2b instanceof Error?_0x544c2b[_0x1e50fb(0x199)]:String(_0x544c2b)});}}return _0x4a11c7[_0x1e50fb(0x1ae)]=new Date()[_0x1e50fb(0x1a3)](),await writeSqlLockFile(_0x4e4f27[_0x1e50fb(0x17c)],_0x84884a),{'ok':_0x5d65f0[_0x1e50fb(0x184)]===0x0,'data':{'pulled':_0xb0d6fe,'skipped':_0x4cc8bd,'failed':_0x5d65f0},'message':_0x1e50fb(0x19a)+_0xb0d6fe['length']+_0x1e50fb(0x1af)+_0x4cc8bd['length']+_0x1e50fb(0x19c)+_0x5d65f0[_0x1e50fb(0x184)]+_0x1e50fb(0x17f)};}};function detectModeFromSql(_0xde3e6f){const _0x14b0c6=a120_0x4889ed,_0x79c20e=ensureRemoteSqlContent(_0xde3e6f),_0x2ad92c=stripLocalSqlMetadata(_0x79c20e,'mybatisXml')['trimStart']();if(/^<(select|insert|update|delete)\b/i[_0x14b0c6(0x197)](_0x2ad92c))return _0x14b0c6(0x17d);return'sql';}function isEquivalentPulledSqlFile(_0xb46ecb,_0x565115,_0x3115ed){return normalizePullComparableContent(_0xb46ecb,_0x3115ed)===normalizePullComparableContent(_0x565115,_0x3115ed);}function normalizePullComparableContent(_0x42b1fd,_0x10da84){const _0x17330c=a120_0x4889ed,_0x416da8=_0x42b1fd['replace'](/\r\n/g,'\x0a')[_0x17330c(0x1b9)]('\x0a'),_0x3635d7=_0x416da8[_0x17330c(0x18d)](_0x4a4236=>!isSyncedAtMetadataLine(_0x4a4236,_0x10da84));return _0x3635d7['join']('\x0a');}function isSyncedAtMetadataLine(_0x15ded,_0x301c54){const _0x410517=a120_0x4889ed;if(_0x301c54===_0x410517(0x17d))return/^\s*<!--\s*@lovrabet\.syncedAt:/[_0x410517(0x197)](_0x15ded);return/^\s*--\s*@lovrabet\.syncedAt:/['test'](_0x15ded);}
@@ -1 +1 @@
1
- const a121_0x16bd1e=a121_0x5652;(function(_0x5048fd,_0x361671){const _0x33defb=a121_0x5652,_0x51d025=_0x5048fd();while(!![]){try{const _0x6b38a9=parseInt(_0x33defb(0xae))/0x1*(parseInt(_0x33defb(0xce))/0x2)+-parseInt(_0x33defb(0xb2))/0x3+parseInt(_0x33defb(0xa2))/0x4*(-parseInt(_0x33defb(0xcd))/0x5)+-parseInt(_0x33defb(0xb3))/0x6+parseInt(_0x33defb(0xad))/0x7+parseInt(_0x33defb(0xa9))/0x8*(parseInt(_0x33defb(0xc4))/0x9)+parseInt(_0x33defb(0xbd))/0xa;if(_0x6b38a9===_0x361671)break;else _0x51d025['push'](_0x51d025['shift']());}catch(_0x18e8b1){_0x51d025['push'](_0x51d025['shift']());}}}(a121_0x2983,0xd8931));import{mkdir,readFile,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{updateSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{getDbName,listDatabases}from'../../core/db-resolver.js';function a121_0x2983(){const _0x323b00=['str','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','validation','631043AmGRnd','3553nqWVir','get','exec','map','3299061VLbVIU','1994352NLzmLW','Push\x20local\x20SQL\x20files\x20to\x20remote','dbDirectory','dbId','high-risk-write','sql','remoteId','sqlRoot','mode','force','17654990fWstHC','filePath','sqlCode','\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20','sqlName','projectRoot','unchanged','369PdBPHV','sqlConfig','/smartapi/custom/updateUserCustomSql','boolean','filter','version','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','appCode','startsWith','25XCtZuC','132LzJJkH','replace','sqlRootDir','toISOString','join','\x20pushed,\x20','lastSync','sqls','POST','Would\x20push\x20','push','utf8','No\x20local\x20SQL\x20files\x20found.','trashDir','sqlcode','message','length','path','relativePath','626516FbzizT','dbName','bool','No\x20database\x20matches\x20local\x20directory\x20\x22','catch','hash','lockFilePath','197496mVjori'];a121_0x2983=function(){return _0x323b00;};return a121_0x2983();}import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{fileExists}from'../../core/bff/file-system.js';function a121_0x5652(_0x53ece0,_0x1deea9){_0x53ece0=_0x53ece0-0x98;const _0x29833e=a121_0x2983();let _0x56525c=_0x29833e[_0x53ece0];return _0x56525c;}import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildSqlLockEntry,stripLocalSqlMetadata}from'./shared.js';import{buildDbDirectoryName}from'../../core/sql-sync/utils.js';async function getTargetSqlQueries(_0xd6b912,_0x3eed7a,_0x2671bb){const _0x1bb1e4=a121_0x5652,_0x50d18a=await scanLocalSqlQueries(_0xd6b912),_0x3432c2=new Map();for(const _0x209088 of _0x50d18a){if(_0x2671bb&&_0x209088[_0x1bb1e4(0xbf)]!==_0x2671bb)continue;const _0x164b89=_0x3432c2[_0x1bb1e4(0xaf)](_0x209088[_0x1bb1e4(0xbf)])??[];_0x164b89[_0x1bb1e4(0x99)](_0x209088),_0x3432c2['set'](_0x209088[_0x1bb1e4(0xbf)],_0x164b89);}if(_0x2671bb&&!_0x3432c2['has'](_0x2671bb))throw CliErrors[_0x1bb1e4(0xac)]('Local\x20SQL\x20not\x20found:\x20'+_0x2671bb);const _0x3903c7=[];for(const [_0x32c87e,_0x2f8e1e]of _0x3432c2['entries']()){if(_0x2f8e1e[_0x1bb1e4(0x9f)]===0x1){_0x3903c7[_0x1bb1e4(0x99)](_0x2f8e1e[0x0]);continue;}const _0x4b4d79=_0x3eed7a[_0x1bb1e4(0xd5)][_0x32c87e],_0x17f231=_0x4b4d79?.[_0x1bb1e4(0xa0)],_0x36f2d6=_0x17f231?_0x2f8e1e['filter'](_0x5f2d25=>_0x5f2d25['relativePath']!==_0x17f231):_0x2f8e1e;if(_0x4b4d79&&_0x36f2d6[_0x1bb1e4(0x9f)]===0x1){_0x3903c7[_0x1bb1e4(0x99)](_0x36f2d6[0x0]);continue;}throw CliErrors['validation']('Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20'+_0x32c87e+'.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.');}return _0x3903c7;}export const sqlPush={'service':a121_0x16bd1e(0xb8),'command':a121_0x16bd1e(0x99),'description':a121_0x16bd1e(0xb4),'risk':a121_0x16bd1e(0xb7),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':'force','type':a121_0x16bd1e(0xc7),'description':a121_0x16bd1e(0xab)}],async 'dryRun'(_0x229f79){const _0x4e25d2=a121_0x16bd1e,_0x44886f=loadSqlProjectConfig(_0x229f79['appCode']),_0x3c198a=await readSqlLockFile(_0x44886f[_0x4e25d2(0xa8)]),{appLock:_0x11d93e}=ensureSqlLockScope(_0x3c198a??createEmptySqlLock(),_0x229f79[_0x4e25d2(0xcb)],_0x44886f[_0x4e25d2(0xba)],_0x4e25d2(0x99)),_0x168f05=await getTargetSqlQueries(_0x44886f,_0x11d93e,_0x229f79[_0x4e25d2(0xaa)](_0x4e25d2(0x9d))||undefined),_0x1216d0=[];for(const _0x401dcc of _0x168f05){const _0x331cec=await computeSqlFileHash(_0x401dcc[_0x4e25d2(0xbe)]),_0x55f52e=_0x11d93e['sqls'][_0x401dcc[_0x4e25d2(0xbf)]],_0x54ed9c=!!_0x55f52e&&(_0x55f52e[_0x4e25d2(0xa0)]!==_0x401dcc[_0x4e25d2(0xa1)]||!!_0x401dcc[_0x4e25d2(0xc1)]&&_0x55f52e['sqlName']!==_0x401dcc[_0x4e25d2(0xc1)]);if(!_0x229f79[_0x4e25d2(0xa4)](_0x4e25d2(0xbc))&&_0x55f52e&&_0x55f52e[_0x4e25d2(0xa7)]===_0x331cec&&!_0x54ed9c)continue;_0x1216d0['push'](_0x401dcc[_0x4e25d2(0xbf)]);}return{'method':_0x4e25d2(0xd6),'url':_0x4e25d2(0xc6),'body':{'sqlCodes':_0x1216d0,'appCode':_0x229f79[_0x4e25d2(0xcb)]},'description':_0x4e25d2(0x98)+_0x1216d0[_0x4e25d2(0x9f)]+'\x20SQL\x20file(s)'};},async 'execute'(_0x5730a8){const _0x2779c5=a121_0x16bd1e,_0x11f1ee=loadSqlProjectConfig(_0x5730a8[_0x2779c5(0xcb)]),_0x1ec88a=await readSqlLockFile(_0x11f1ee[_0x2779c5(0xa8)]),{lockData:_0x5df2b0,appLock:_0x99ccad}=ensureSqlLockScope(_0x1ec88a??createEmptySqlLock(),_0x5730a8[_0x2779c5(0xcb)],_0x11f1ee['sqlRoot'],_0x2779c5(0x99)),_0x4640bb=await getTargetSqlQueries(_0x11f1ee,_0x99ccad,_0x5730a8['str'](_0x2779c5(0x9d))||undefined);if(_0x4640bb[_0x2779c5(0x9f)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x2779c5(0x9b)};const _0x43b13b=[],_0x681a29=[],_0xdfbfc3=[];for(const _0xd25aad of _0x4640bb){const _0x38bee4=_0x99ccad[_0x2779c5(0xd5)][_0xd25aad[_0x2779c5(0xbf)]];if(!_0x38bee4){_0xdfbfc3[_0x2779c5(0x99)]({'sqlCode':_0xd25aad[_0x2779c5(0xbf)],'error':'local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first'});continue;}try{const _0x2fbfc2=await computeSqlFileHash(_0xd25aad[_0x2779c5(0xbe)]),_0x4ae418=_0x38bee4[_0x2779c5(0xa0)]!==_0xd25aad['relativePath']||!!_0xd25aad[_0x2779c5(0xc1)]&&_0x38bee4[_0x2779c5(0xc1)]!==_0xd25aad[_0x2779c5(0xc1)];if(!_0x5730a8[_0x2779c5(0xa4)](_0x2779c5(0xbc))&&_0x38bee4[_0x2779c5(0xa7)]===_0x2fbfc2&&!_0x4ae418){_0x681a29['push']({'sqlCode':_0xd25aad[_0x2779c5(0xbf)],'reason':_0x2779c5(0xc3)});continue;}if(_0x38bee4['version']==null){_0xdfbfc3[_0x2779c5(0x99)]({'sqlCode':_0xd25aad[_0x2779c5(0xbf)],'error':_0x2779c5(0xca)});continue;}const _0x399c52=await readFile(_0xd25aad[_0x2779c5(0xbe)],_0x2779c5(0x9a)),_0x465434=stripLocalSqlMetadata(_0x399c52,_0xd25aad[_0x2779c5(0xbb)]),_0x387c1e=_0xd25aad[_0x2779c5(0xc1)]||_0x38bee4['sqlName'],_0x2ff236=await resolveTargetDbBinding(_0x5730a8[_0x2779c5(0xcb)],_0xd25aad,_0x38bee4),_0x1ec4e8=await updateSqlQuery({'id':_0x38bee4[_0x2779c5(0xb9)],'appCode':_0x5730a8['appCode'],'sqlCode':_0xd25aad[_0x2779c5(0xbf)],'sqlName':_0x387c1e,'dbId':_0x2ff236[_0x2779c5(0xb6)],'version':_0x38bee4[_0x2779c5(0xc9)],'sqlContent':_0x465434,'sqlConfig':_0x38bee4[_0x2779c5(0xc5)]??undefined}),_0x49ba84=_0x1ec4e8[_0x2779c5(0xb6)]?await getDbName(_0x5730a8['appCode'],Number(_0x1ec4e8[_0x2779c5(0xb6)]))['catch'](()=>_0x2ff236[_0x2779c5(0xa3)]):_0x2ff236[_0x2779c5(0xa3)];_0x99ccad[_0x2779c5(0xd5)][_0xd25aad['sqlCode']]={...buildSqlLockEntry(_0x1ec4e8,_0x465434,_0x2fbfc2,{'dbName':_0x49ba84}),'path':_0xd25aad['relativePath'],'mode':_0x38bee4[_0x2779c5(0xbb)]},await archivePreviousSqlFileIfNeeded(_0x11f1ee,_0x38bee4[_0x2779c5(0xa0)],_0xd25aad[_0x2779c5(0xa1)]),_0x43b13b[_0x2779c5(0x99)]({'sqlCode':_0xd25aad[_0x2779c5(0xbf)],'remoteId':_0x38bee4[_0x2779c5(0xb9)]});}catch(_0x14c104){_0xdfbfc3[_0x2779c5(0x99)]({'sqlCode':_0xd25aad['sqlCode'],'error':_0x14c104 instanceof Error?_0x14c104[_0x2779c5(0x9e)]:String(_0x14c104)});}}return _0x99ccad[_0x2779c5(0xd4)]=new Date()[_0x2779c5(0xd1)](),await writeSqlLockFile(_0x11f1ee[_0x2779c5(0xa8)],_0x5df2b0),{'ok':_0xdfbfc3['length']===0x0,'data':{'pushed':_0x43b13b,'skipped':_0x681a29,'failed':_0xdfbfc3},'message':'Push\x20complete:\x20'+_0x43b13b['length']+_0x2779c5(0xd3)+_0x681a29[_0x2779c5(0x9f)]+'\x20skipped,\x20'+_0xdfbfc3[_0x2779c5(0x9f)]+'\x20failed'};}};async function archivePreviousSqlFileIfNeeded(_0x2116cc,_0x4137ba,_0x765ea7){const _0x4380af=a121_0x16bd1e;if(!_0x4137ba||_0x4137ba===_0x765ea7)return;const _0x1f0eda=join(_0x2116cc['sqlRootDir'],_0x4137ba);if(!await fileExists(_0x1f0eda))return;const _0x5d7b84=await moveToTrash(_0x2116cc[_0x4380af(0xc2)],_0x2116cc[_0x4380af(0x9c)],_0x1f0eda);await cleanupEmptyDirectories(dirname(_0x1f0eda),_0x2116cc[_0x4380af(0xd0)]),void _0x5d7b84;}async function moveToTrash(_0x351616,_0x7cf02e,_0x13a1d3){const _0x28c927=a121_0x16bd1e,_0x2e4823=new Date()[_0x28c927(0xd1)]()[_0x28c927(0xcf)](/[:.]/g,'-'),_0x32a059=relative(_0x351616,_0x13a1d3),_0x523332=join(_0x7cf02e,_0x2e4823,_0x32a059);return await mkdir(dirname(_0x523332),{'recursive':!![]}),await rename(_0x13a1d3,_0x523332),_0x523332;}async function cleanupEmptyDirectories(_0x343e2e,_0x3b1598){const _0x5b7588=a121_0x16bd1e;let _0x3eab1c=resolve(_0x343e2e);const _0x39b8ff=resolve(_0x3b1598);while(_0x3eab1c[_0x5b7588(0xcc)](''+_0x39b8ff+sep)||_0x3eab1c===_0x39b8ff){if(_0x3eab1c===_0x39b8ff)return;try{const _0x22d387=await readdir(_0x3eab1c);if(_0x22d387[_0x5b7588(0x9f)]>0x0)return;await rmdir(_0x3eab1c);}catch{return;}_0x3eab1c=dirname(_0x3eab1c);}}async function resolveTargetDbBinding(_0x107f26,_0x280170,_0x49d4cc){const _0x58f9e8=a121_0x16bd1e,_0x46c07c=_0x280170[_0x58f9e8(0xb5)];if(!_0x46c07c)return{'dbId':_0x49d4cc[_0x58f9e8(0xb6)],'dbName':_0x49d4cc[_0x58f9e8(0xa3)]};const _0x45e0e9=buildDbDirectoryName(_0x49d4cc[_0x58f9e8(0xa3)],_0x49d4cc['dbId']);if(_0x46c07c===_0x45e0e9)return{'dbId':_0x49d4cc[_0x58f9e8(0xb6)],'dbName':_0x49d4cc[_0x58f9e8(0xa3)]};const _0x5c2c04=parseExplicitDbDirectory(_0x46c07c);if(_0x5c2c04!=null)return{'dbId':_0x5c2c04,'dbName':await getDbName(_0x107f26,_0x5c2c04)[_0x58f9e8(0xa6)](()=>undefined)};const _0x11cf1b=await listDatabases(_0x107f26),_0x347df6=_0x11cf1b[_0x58f9e8(0xc8)](_0x466168=>buildDbDirectoryName(_0x466168[_0x58f9e8(0xa3)],_0x466168[_0x58f9e8(0xb6)])===_0x46c07c);if(_0x347df6[_0x58f9e8(0x9f)]===0x1)return{'dbId':_0x347df6[0x0][_0x58f9e8(0xb6)],'dbName':_0x347df6[0x0][_0x58f9e8(0xa3)]};if(_0x347df6[_0x58f9e8(0x9f)]===0x0)throw CliErrors['validation'](_0x58f9e8(0xa5)+_0x46c07c+'\x22\x20for\x20sqlCode\x20'+_0x280170[_0x58f9e8(0xbf)]+'.');const _0x3eda5f=_0x347df6[_0x58f9e8(0xb1)](_0x57bbba=>_0x57bbba[_0x58f9e8(0xa3)]+'\x20('+_0x57bbba['dbId']+')')[_0x58f9e8(0xd2)](',\x20');throw CliErrors[_0x58f9e8(0xac)]('Local\x20directory\x20\x22'+_0x46c07c+_0x58f9e8(0xc0)+_0x280170['sqlCode']+':\x20'+_0x3eda5f);}function parseExplicitDbDirectory(_0xf1205f){const _0x469fa=a121_0x16bd1e,_0xc00ab9=/^db-(\d+)$/[_0x469fa(0xb0)](_0xf1205f);if(!_0xc00ab9)return null;const _0x2b3870=Number(_0xc00ab9[0x1]);return Number['isFinite'](_0x2b3870)&&_0x2b3870>0x0?_0x2b3870:null;}
1
+ const a121_0x4585ee=a121_0x28f9;(function(_0x3525b5,_0x771c74){const _0xe869a6=a121_0x28f9,_0x57e2bf=_0x3525b5();while(!![]){try{const _0x1e7a24=parseInt(_0xe869a6(0xec))/0x1*(-parseInt(_0xe869a6(0x10d))/0x2)+parseInt(_0xe869a6(0x115))/0x3+-parseInt(_0xe869a6(0xfa))/0x4*(-parseInt(_0xe869a6(0x107))/0x5)+parseInt(_0xe869a6(0x102))/0x6+parseInt(_0xe869a6(0x10a))/0x7*(parseInt(_0xe869a6(0xfe))/0x8)+-parseInt(_0xe869a6(0x10e))/0x9*(parseInt(_0xe869a6(0x100))/0xa)+-parseInt(_0xe869a6(0xff))/0xb;if(_0x1e7a24===_0x771c74)break;else _0x57e2bf['push'](_0x57e2bf['shift']());}catch(_0x1d00b9){_0x57e2bf['push'](_0x57e2bf['shift']());}}}(a121_0x468e,0x6fef9));import{mkdir,readFile,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{updateSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{getDbName,listDatabases}from'../../core/db-resolver.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{fileExists}from'../../core/bff/file-system.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a121_0x28f9(_0x42ac03,_0xca87a6){_0x42ac03=_0x42ac03-0xe4;const _0x468e67=a121_0x468e();let _0x28f9b1=_0x468e67[_0x42ac03];return _0x28f9b1;}import{buildSqlLockEntry,stripLocalSqlMetadata}from'./shared.js';import{buildDbDirectoryName}from'../../core/sql-sync/utils.js';async function getTargetSqlQueries(_0x246cfe,_0x36ec73,_0x5e8609){const _0x1a0e65=a121_0x28f9,_0x4eaf99=await scanLocalSqlQueries(_0x246cfe),_0x2d6fc7=new Map();for(const _0x3481ad of _0x4eaf99){if(_0x5e8609&&_0x3481ad[_0x1a0e65(0xf7)]!==_0x5e8609)continue;const _0x5a213e=_0x2d6fc7[_0x1a0e65(0xfd)](_0x3481ad[_0x1a0e65(0xf7)])??[];_0x5a213e['push'](_0x3481ad),_0x2d6fc7[_0x1a0e65(0x11d)](_0x3481ad[_0x1a0e65(0xf7)],_0x5a213e);}if(_0x5e8609&&!_0x2d6fc7['has'](_0x5e8609))throw CliErrors[_0x1a0e65(0xf5)](_0x1a0e65(0xf6)+_0x5e8609);const _0xb350ad=[];for(const [_0x35fdc1,_0x826910]of _0x2d6fc7['entries']()){if(_0x826910[_0x1a0e65(0x103)]===0x1){_0xb350ad[_0x1a0e65(0xeb)](_0x826910[0x0]);continue;}const _0x2c3152=_0x36ec73[_0x1a0e65(0x104)][_0x35fdc1],_0x1ebb53=_0x2c3152?.[_0x1a0e65(0xf0)],_0xc9afd0=_0x1ebb53?_0x826910[_0x1a0e65(0xf9)](_0x5b8d46=>_0x5b8d46['relativePath']!==_0x1ebb53):_0x826910;if(_0x2c3152&&_0xc9afd0[_0x1a0e65(0x103)]===0x1){_0xb350ad['push'](_0xc9afd0[0x0]);continue;}throw CliErrors[_0x1a0e65(0xf5)]('Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20'+_0x35fdc1+_0x1a0e65(0x11b));}return _0xb350ad;}export const sqlPush={'service':'sql','command':a121_0x4585ee(0xeb),'description':a121_0x4585ee(0x113),'risk':a121_0x4585ee(0xe7),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a121_0x4585ee(0x10f),'type':a121_0x4585ee(0x120),'description':a121_0x4585ee(0x106)}],async 'dryRun'(_0x2c6d27){const _0xe8d0d=a121_0x4585ee,_0x324e15=loadSqlProjectConfig(_0x2c6d27[_0xe8d0d(0x121)]),_0x361af9=await readSqlLockFile(_0x324e15[_0xe8d0d(0xe5)]),{appLock:_0x408030}=ensureSqlLockScope(_0x361af9??createEmptySqlLock(),_0x2c6d27[_0xe8d0d(0x121)],_0x324e15[_0xe8d0d(0x11f)],_0xe8d0d(0xeb)),_0x1b29bd=await getTargetSqlQueries(_0x324e15,_0x408030,_0x2c6d27[_0xe8d0d(0xe9)]('sqlcode')||undefined),_0x49ac3d=[];for(const _0x4cfed9 of _0x1b29bd){const _0x567079=await computeSqlFileHash(_0x4cfed9[_0xe8d0d(0xe8)]),_0x3032c1=_0x408030[_0xe8d0d(0x104)][_0x4cfed9[_0xe8d0d(0xf7)]],_0xf53ca6=!!_0x3032c1&&(_0x3032c1[_0xe8d0d(0xf0)]!==_0x4cfed9[_0xe8d0d(0x108)]||!!_0x4cfed9[_0xe8d0d(0x110)]&&_0x3032c1[_0xe8d0d(0x110)]!==_0x4cfed9[_0xe8d0d(0x110)]);if(!_0x2c6d27['bool'](_0xe8d0d(0x10f))&&_0x3032c1&&_0x3032c1[_0xe8d0d(0x114)]===_0x567079&&!_0xf53ca6)continue;_0x49ac3d['push'](_0x4cfed9[_0xe8d0d(0xf7)]);}return{'method':_0xe8d0d(0x109),'url':_0xe8d0d(0xee),'body':{'sqlCodes':_0x49ac3d,'appCode':_0x2c6d27[_0xe8d0d(0x121)]},'description':'Would\x20push\x20'+_0x49ac3d[_0xe8d0d(0x103)]+'\x20SQL\x20file(s)'};},async 'execute'(_0x5cd0d1){const _0x5a413f=a121_0x4585ee,_0x1e81c4=loadSqlProjectConfig(_0x5cd0d1[_0x5a413f(0x121)]),_0x1859fe=await readSqlLockFile(_0x1e81c4['lockFilePath']),{lockData:_0x127585,appLock:_0x35f708}=ensureSqlLockScope(_0x1859fe??createEmptySqlLock(),_0x5cd0d1[_0x5a413f(0x121)],_0x1e81c4['sqlRoot'],_0x5a413f(0xeb)),_0x2f12da=await getTargetSqlQueries(_0x1e81c4,_0x35f708,_0x5cd0d1['str']('sqlcode')||undefined);if(_0x2f12da[_0x5a413f(0x103)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x5a413f(0x11c)};const _0xdc2b2c=[],_0x20ccea=[],_0x3b2e1b=[];for(const _0x357d38 of _0x2f12da){const _0x3355ea=_0x35f708['sqls'][_0x357d38['sqlCode']];if(!_0x3355ea){_0x3b2e1b['push']({'sqlCode':_0x357d38[_0x5a413f(0xf7)],'error':'local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first'});continue;}try{const _0x4dc014=await computeSqlFileHash(_0x357d38[_0x5a413f(0xe8)]),_0x4040b7=_0x3355ea[_0x5a413f(0xf0)]!==_0x357d38['relativePath']||!!_0x357d38[_0x5a413f(0x110)]&&_0x3355ea['sqlName']!==_0x357d38['sqlName'];if(!_0x5cd0d1['bool'](_0x5a413f(0x10f))&&_0x3355ea[_0x5a413f(0x114)]===_0x4dc014&&!_0x4040b7){_0x20ccea[_0x5a413f(0xeb)]({'sqlCode':_0x357d38[_0x5a413f(0xf7)],'reason':_0x5a413f(0xe6)});continue;}if(_0x3355ea[_0x5a413f(0xf3)]==null){_0x3b2e1b[_0x5a413f(0xeb)]({'sqlCode':_0x357d38[_0x5a413f(0xf7)],'error':_0x5a413f(0xf2)});continue;}const _0x396d16=await readFile(_0x357d38[_0x5a413f(0xe8)],'utf8'),_0x24fec9=stripLocalSqlMetadata(_0x396d16,_0x357d38['mode']),_0x3cd0e1=_0x357d38['sqlName']||_0x3355ea['sqlName'],_0x13345f=await resolveTargetDbBinding(_0x5cd0d1[_0x5a413f(0x121)],_0x357d38,_0x3355ea),_0x352b77=await updateSqlQuery({'id':_0x3355ea[_0x5a413f(0x10b)],'appCode':_0x5cd0d1[_0x5a413f(0x121)],'sqlCode':_0x357d38[_0x5a413f(0xf7)],'sqlName':_0x3cd0e1,'dbId':_0x13345f[_0x5a413f(0x105)],'version':_0x3355ea[_0x5a413f(0xf3)],'sqlContent':_0x24fec9,'sqlConfig':_0x3355ea[_0x5a413f(0x111)]??undefined}),_0x217310=_0x352b77[_0x5a413f(0x105)]?await getDbName(_0x5cd0d1['appCode'],Number(_0x352b77[_0x5a413f(0x105)]))[_0x5a413f(0xfc)](()=>_0x13345f[_0x5a413f(0x10c)]):_0x13345f['dbName'];_0x35f708[_0x5a413f(0x104)][_0x357d38[_0x5a413f(0xf7)]]={...buildSqlLockEntry(_0x352b77,_0x24fec9,_0x4dc014,{'dbName':_0x217310}),'path':_0x357d38[_0x5a413f(0x108)],'mode':_0x3355ea[_0x5a413f(0x112)]},await archivePreviousSqlFileIfNeeded(_0x1e81c4,_0x3355ea['path'],_0x357d38['relativePath']),_0xdc2b2c[_0x5a413f(0xeb)]({'sqlCode':_0x357d38[_0x5a413f(0xf7)],'remoteId':_0x3355ea['remoteId']});}catch(_0x25c779){_0x3b2e1b[_0x5a413f(0xeb)]({'sqlCode':_0x357d38[_0x5a413f(0xf7)],'error':_0x25c779 instanceof Error?_0x25c779[_0x5a413f(0xe4)]:String(_0x25c779)});}}return _0x35f708[_0x5a413f(0xed)]=new Date()[_0x5a413f(0x119)](),await writeSqlLockFile(_0x1e81c4[_0x5a413f(0xe5)],_0x127585),{'ok':_0x3b2e1b[_0x5a413f(0x103)]===0x0,'data':{'pushed':_0xdc2b2c,'skipped':_0x20ccea,'failed':_0x3b2e1b},'message':_0x5a413f(0x116)+_0xdc2b2c[_0x5a413f(0x103)]+'\x20pushed,\x20'+_0x20ccea['length']+_0x5a413f(0xef)+_0x3b2e1b[_0x5a413f(0x103)]+'\x20failed'};}};function a121_0x468e(){const _0x34d3f7=['str','sqlRootDir','push','3tsvDEP','lastSync','/smartapi/custom/updateUserCustomSql','\x20skipped,\x20','path','replace','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','version','startsWith','validation','Local\x20SQL\x20not\x20found:\x20','sqlCode','exec','filter','88OUwjim','trashDir','catch','get','6184tGRoQP','4528018Lmjbpu','60STAmuH','\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20','1448178PcuxnH','length','sqls','dbId','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','13415CAAtIl','relativePath','POST','7581gQNKcq','remoteId','dbName','125318YmalDQ','841959IepVrX','force','sqlName','sqlConfig','mode','Push\x20local\x20SQL\x20files\x20to\x20remote','hash','1445586kYiZLp','Push\x20complete:\x20','Local\x20directory\x20\x22','dbDirectory','toISOString','\x22\x20for\x20sqlCode\x20','.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.','No\x20local\x20SQL\x20files\x20found.','set','join','sqlRoot','boolean','appCode','message','lockFilePath','unchanged','high-risk-write','filePath'];a121_0x468e=function(){return _0x34d3f7;};return a121_0x468e();}async function archivePreviousSqlFileIfNeeded(_0x5bc858,_0x47265f,_0x490480){const _0x46ae6c=a121_0x4585ee;if(!_0x47265f||_0x47265f===_0x490480)return;const _0xc2d39d=join(_0x5bc858[_0x46ae6c(0xea)],_0x47265f);if(!await fileExists(_0xc2d39d))return;const _0x29a683=await moveToTrash(_0x5bc858['projectRoot'],_0x5bc858[_0x46ae6c(0xfb)],_0xc2d39d);await cleanupEmptyDirectories(dirname(_0xc2d39d),_0x5bc858[_0x46ae6c(0xea)]),void _0x29a683;}async function moveToTrash(_0x4e2b91,_0x1ea841,_0x3b46ce){const _0x4dee21=a121_0x4585ee,_0xb02742=new Date()[_0x4dee21(0x119)]()[_0x4dee21(0xf1)](/[:.]/g,'-'),_0x329d45=relative(_0x4e2b91,_0x3b46ce),_0x154d63=join(_0x1ea841,_0xb02742,_0x329d45);return await mkdir(dirname(_0x154d63),{'recursive':!![]}),await rename(_0x3b46ce,_0x154d63),_0x154d63;}async function cleanupEmptyDirectories(_0x4134ed,_0xa975b4){const _0x28e386=a121_0x4585ee;let _0x16429c=resolve(_0x4134ed);const _0xb1d4e3=resolve(_0xa975b4);while(_0x16429c[_0x28e386(0xf4)](''+_0xb1d4e3+sep)||_0x16429c===_0xb1d4e3){if(_0x16429c===_0xb1d4e3)return;try{const _0xe57b59=await readdir(_0x16429c);if(_0xe57b59['length']>0x0)return;await rmdir(_0x16429c);}catch{return;}_0x16429c=dirname(_0x16429c);}}async function resolveTargetDbBinding(_0x1da415,_0x29533e,_0x339fc4){const _0x27fb2a=a121_0x4585ee,_0x5a292f=_0x29533e[_0x27fb2a(0x118)];if(!_0x5a292f)return{'dbId':_0x339fc4[_0x27fb2a(0x105)],'dbName':_0x339fc4['dbName']};const _0x1b19b9=buildDbDirectoryName(_0x339fc4[_0x27fb2a(0x10c)],_0x339fc4[_0x27fb2a(0x105)]);if(_0x5a292f===_0x1b19b9)return{'dbId':_0x339fc4[_0x27fb2a(0x105)],'dbName':_0x339fc4['dbName']};const _0x263195=parseExplicitDbDirectory(_0x5a292f);if(_0x263195!=null)return{'dbId':_0x263195,'dbName':await getDbName(_0x1da415,_0x263195)[_0x27fb2a(0xfc)](()=>undefined)};const _0x50727d=await listDatabases(_0x1da415),_0x238885=_0x50727d['filter'](_0x4a07a4=>buildDbDirectoryName(_0x4a07a4['dbName'],_0x4a07a4['dbId'])===_0x5a292f);if(_0x238885[_0x27fb2a(0x103)]===0x1)return{'dbId':_0x238885[0x0][_0x27fb2a(0x105)],'dbName':_0x238885[0x0]['dbName']};if(_0x238885[_0x27fb2a(0x103)]===0x0)throw CliErrors['validation']('No\x20database\x20matches\x20local\x20directory\x20\x22'+_0x5a292f+_0x27fb2a(0x11a)+_0x29533e[_0x27fb2a(0xf7)]+'.');const _0x15b208=_0x238885['map'](_0x903cb3=>_0x903cb3[_0x27fb2a(0x10c)]+'\x20('+_0x903cb3[_0x27fb2a(0x105)]+')')[_0x27fb2a(0x11e)](',\x20');throw CliErrors[_0x27fb2a(0xf5)](_0x27fb2a(0x117)+_0x5a292f+_0x27fb2a(0x101)+_0x29533e[_0x27fb2a(0xf7)]+':\x20'+_0x15b208);}function parseExplicitDbDirectory(_0x2aeb50){const _0x16be5a=a121_0x4585ee,_0x17c8a0=/^db-(\d+)$/[_0x16be5a(0xf8)](_0x2aeb50);if(!_0x17c8a0)return null;const _0x1b0f4a=Number(_0x17c8a0[0x1]);return Number['isFinite'](_0x1b0f4a)&&_0x1b0f4a>0x0?_0x1b0f4a:null;}
@@ -1 +1 @@
1
- function a122_0x12a1(){const _0x5bf686=['Update\x20existing\x20SQL\x20by\x20editing\x20the\x20synced\x20file\x20under\x20`.rabetbase/sql/<appCode>/<dbName|db-<id>>/`\x20and\x20then\x20running\x20`rabetbase\x20sql\x20push\x20--sqlcode\x20<code>\x20--yes`.','8SKlBwX','string','1037541MBmgQO','12822viNJLO','38211276gkhjBp','4208910ONjTKS','join','Path\x20to\x20the\x20SQL\x20file','5HtofGk','description','file','3LsUQAR','Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','Query\x20description','21AdofPs','20QMZOfq','47336Grbqby','sqlname','3612466NMuApC','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.','save','14496858zzYyOe','write','validation'];a122_0x12a1=function(){return _0x5bf686;};return a122_0x12a1();}const a122_0x57150c=a122_0xe63d;(function(_0x176189,_0x500b82){const _0x27e4f8=a122_0xe63d,_0x1fb057=_0x176189();while(!![]){try{const _0x4aed24=parseInt(_0x27e4f8(0x91))/0x1*(parseInt(_0x27e4f8(0x89))/0x2)+parseInt(_0x27e4f8(0x88))/0x3*(-parseInt(_0x27e4f8(0xa0))/0x4)+parseInt(_0x27e4f8(0x8e))/0x5*(-parseInt(_0x27e4f8(0x8b))/0x6)+parseInt(_0x27e4f8(0x94))/0x7*(parseInt(_0x27e4f8(0x96))/0x8)+-parseInt(_0x27e4f8(0x9c))/0x9+parseInt(_0x27e4f8(0x95))/0xa*(parseInt(_0x27e4f8(0x98))/0xb)+parseInt(_0x27e4f8(0x8a))/0xc;if(_0x4aed24===_0x500b82)break;else _0x1fb057['push'](_0x1fb057['shift']());}catch(_0x35e5e3){_0x1fb057['push'](_0x1fb057['shift']());}}}(a122_0x12a1,0xd5690));import{CliErrors}from'../../errors.js';function a122_0xe63d(_0x366df0,_0x1be3aa){_0x366df0=_0x366df0-0x87;const _0x12a15c=a122_0x12a1();let _0xe63d25=_0x12a15c[_0x366df0];return _0xe63d25;}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const SQL_SAVE_DEPRECATED_HINT=['`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.',a122_0x57150c(0x9a),a122_0x57150c(0x9f)][a122_0x57150c(0x8c)]('\x0a');export const sqlSave={'service':'sql','command':a122_0x57150c(0x9b),'description':a122_0x57150c(0x92),'risk':a122_0x57150c(0x9d),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a122_0x57150c(0x90),'type':a122_0x57150c(0x87),'required':!![],'description':a122_0x57150c(0x8d)},SQLCODE_FLAG_OPTIONAL,{'name':a122_0x57150c(0x97),'type':'string','description':'SQL\x20query\x20display\x20name'},{'name':'db','type':a122_0x57150c(0x87),'description':a122_0x57150c(0x99)},{'name':a122_0x57150c(0x8f),'type':a122_0x57150c(0x87),'description':a122_0x57150c(0x93)}],async 'validate'(){const _0x55c0b4=a122_0x57150c;throw CliErrors[_0x55c0b4(0x9e)](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){const _0xa4511c=a122_0x57150c;throw CliErrors[_0xa4511c(0x9e)](SQL_SAVE_DEPRECATED_HINT);}};
1
+ const a122_0x5e758f=a122_0x17d2;function a122_0x18b2(){const _0x2d3488=['Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','52806HjUaPK','2702508mbjVVC','string','`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.','16618bufals','27445XnmueB','sqlname','1580JPfQgr','Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','Query\x20description','260sXRznY','validation','file','Update\x20existing\x20SQL\x20by\x20editing\x20the\x20synced\x20file\x20under\x20`.rabetbase/sql/<appCode>/<dbName|db-<id>>/`\x20and\x20then\x20running\x20`rabetbase\x20sql\x20push\x20--sqlcode\x20<code>\x20--yes`.','Path\x20to\x20the\x20SQL\x20file','40PicDSn','289TcBTrx','3570pbjNPq','144qTMVhJ','join','466NvkSDQ','write','164169cLdEkk','description'];a122_0x18b2=function(){return _0x2d3488;};return a122_0x18b2();}(function(_0x4eb016,_0x23b392){const _0x9d4a2c=a122_0x17d2,_0x167f90=_0x4eb016();while(!![]){try{const _0x109dc8=parseInt(_0x9d4a2c(0x186))/0x1*(-parseInt(_0x9d4a2c(0x18a))/0x2)+parseInt(_0x9d4a2c(0x18f))/0x3*(parseInt(_0x9d4a2c(0x185))/0x4)+parseInt(_0x9d4a2c(0x17d))/0x5*(-parseInt(_0x9d4a2c(0x187))/0x6)+-parseInt(_0x9d4a2c(0x17a))/0x7*(-parseInt(_0x9d4a2c(0x188))/0x8)+-parseInt(_0x9d4a2c(0x18c))/0x9+parseInt(_0x9d4a2c(0x180))/0xa*(-parseInt(_0x9d4a2c(0x17b))/0xb)+parseInt(_0x9d4a2c(0x190))/0xc;if(_0x109dc8===_0x23b392)break;else _0x167f90['push'](_0x167f90['shift']());}catch(_0x1a2b4){_0x167f90['push'](_0x167f90['shift']());}}}(a122_0x18b2,0x19c15));function a122_0x17d2(_0x413a6a,_0x3f666e){_0x413a6a=_0x413a6a-0x17a;const _0x18b2eb=a122_0x18b2();let _0x17d2a3=_0x18b2eb[_0x413a6a];return _0x17d2a3;}import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const SQL_SAVE_DEPRECATED_HINT=[a122_0x5e758f(0x192),'Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.',a122_0x5e758f(0x183)][a122_0x5e758f(0x189)]('\x0a');export const sqlSave={'service':'sql','command':'save','description':a122_0x5e758f(0x17e),'risk':a122_0x5e758f(0x18b),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a122_0x5e758f(0x182),'type':a122_0x5e758f(0x191),'required':!![],'description':a122_0x5e758f(0x184)},SQLCODE_FLAG_OPTIONAL,{'name':a122_0x5e758f(0x17c),'type':'string','description':'SQL\x20query\x20display\x20name'},{'name':'db','type':'string','description':a122_0x5e758f(0x18e)},{'name':a122_0x5e758f(0x18d),'type':a122_0x5e758f(0x191),'description':a122_0x5e758f(0x17f)}],async 'validate'(){const _0x527e90=a122_0x5e758f;throw CliErrors[_0x527e90(0x181)](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){const _0x19e896=a122_0x5e758f;throw CliErrors[_0x19e896(0x181)](SQL_SAVE_DEPRECATED_HINT);}};
@@ -1 +1 @@
1
- (function(_0x3b60e5,_0x40e136){const _0x563da3=a123_0x2cdc,_0x51fb2d=_0x3b60e5();while(!![]){try{const _0xf2e4a7=-parseInt(_0x563da3(0xb7))/0x1*(-parseInt(_0x563da3(0xab))/0x2)+-parseInt(_0x563da3(0xc2))/0x3*(parseInt(_0x563da3(0xbf))/0x4)+parseInt(_0x563da3(0xac))/0x5*(parseInt(_0x563da3(0xc9))/0x6)+parseInt(_0x563da3(0xa4))/0x7+parseInt(_0x563da3(0xb4))/0x8+-parseInt(_0x563da3(0xcb))/0x9+-parseInt(_0x563da3(0xb2))/0xa;if(_0xf2e4a7===_0x40e136)break;else _0x51fb2d['push'](_0x51fb2d['shift']());}catch(_0x1da939){_0x51fb2d['push'](_0x51fb2d['shift']());}}}(a123_0x5bf9,0x8b892));import{createInterface}from'node:readline';function a123_0x5bf9(){const _0x556e32=['1086vkAaSw','stdin','8175969UozSVE','split','--\x20@lovrabet.','description','dbId','4597425JSsCoa','replace','filter','stderr','syncedAt','question','lastSync','1006kavFxY','24585jxBfHX','map','\x20-->','path','sqlCode','push','13358730nSIPhz','test','6817520wwsqhB','trim','join','2081VmxzDC','sqlName','dbName','trimStart','close','sqls','fromEntries','length','4PKbhvu','sqlRoot','mybatisXml','1889499HTObSE','<!--\x20@lovrabet.','sqlConfig','mode','apps','\x20[y/N]\x20','yes'];a123_0x5bf9=function(){return _0x556e32;};return a123_0x5bf9();}import{join}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath,detectSqlMode}from'../../core/sql-sync/utils.js';export const SQL_LOCAL_REL_DIR='.rabetbase/sql';export function buildSqlLockEntry(_0x5050f9,_0xbafec9,_0x4309c3,_0x92810){const _0x41f78b=a123_0x2cdc,_0x1f507e=detectSqlMode(_0xbafec9);return{'path':buildSqlRelativePath(_0x5050f9[_0x41f78b(0xb0)],_0x5050f9[_0x41f78b(0xb8)],_0x92810?.[_0x41f78b(0xb9)],_0x1f507e,_0x5050f9[_0x41f78b(0xa3)]),'hash':_0x4309c3,'remoteId':_0x5050f9['id'],'version':_0x5050f9['version'],'dbId':Number(_0x5050f9['dbId']),'dbName':_0x92810?.[_0x41f78b(0xb9)],'sqlName':_0x5050f9[_0x41f78b(0xb8)],'sqlConfig':_0x5050f9[_0x41f78b(0xc4)]??undefined,'mode':_0x1f507e};}export function cloneSqlLockData(_0x38e20f){const _0x15e08d=a123_0x2cdc;return{'apps':Object[_0x15e08d(0xbd)](Object['entries'](_0x38e20f[_0x15e08d(0xc6)])[_0x15e08d(0xad)](([_0x17b5f8,_0x33f90a])=>[_0x17b5f8,{'sqlRoot':_0x33f90a[_0x15e08d(0xc0)],'lastSync':_0x33f90a[_0x15e08d(0xaa)],'sqls':{..._0x33f90a[_0x15e08d(0xbc)]}}]))};}export function ensureRemoteSqlContent(_0x1db24d){return _0x1db24d['sqlContent']??'';}export function buildLocalSqlFileContent(_0x1d1e70,_0x5a53ee,_0x2889db){const _0x4c2ef4=a123_0x2cdc,_0x4ea0bd=_0x2889db?.[_0x4c2ef4(0xc5)]??detectSqlMode(_0x5a53ee),_0x56ed29=stripLocalSqlMetadata(_0x5a53ee,_0x4ea0bd)['trim'](),_0x172389=[...buildMetadataHeaderLines({'sqlCode':_0x1d1e70[_0x4c2ef4(0xb0)],'sqlName':_0x1d1e70[_0x4c2ef4(0xb8)],'dbId':_0x1d1e70[_0x4c2ef4(0xa3)],'dbName':_0x2889db?.[_0x4c2ef4(0xb9)],'mode':_0x4ea0bd,'syncedAt':_0x2889db?.['syncedAt'],'description':_0x2889db?.[_0x4c2ef4(0xa2)]},_0x4ea0bd),'',_0x56ed29],_0x211dcb=_0x172389[_0x4c2ef4(0xb6)]('\x0a');return _0x211dcb['endsWith']('\x0a')?_0x211dcb:_0x211dcb+'\x0a';}function a123_0x2cdc(_0x32127a,_0x4bbfa3){_0x32127a=_0x32127a-0xa2;const _0x5bf96c=a123_0x5bf9();let _0x2cdc88=_0x5bf96c[_0x32127a];return _0x2cdc88;}export function stripLocalSqlMetadata(_0x5402ed,_0x210178){const _0x420718=a123_0x2cdc,_0x3b46c9=_0x5402ed[_0x420718(0xa5)](/\r\n/g,'\x0a')[_0x420718(0xcc)]('\x0a'),_0x3717ae=[];let _0x12598e=0x0;if(_0x210178===_0x420718(0xc1))while(_0x12598e<_0x3b46c9[_0x420718(0xbe)]){const _0x148e92=_0x3b46c9[_0x12598e]??'';if(/^\s*<!--\s*@lovrabet\./[_0x420718(0xb3)](_0x148e92)){_0x12598e++;continue;}if(_0x148e92[_0x420718(0xb5)]()===''&&_0x12598e>0x0){_0x12598e++;continue;}break;}else while(_0x12598e<_0x3b46c9['length']){const _0x5efbeb=_0x3b46c9[_0x12598e]??'';if(/^\s*--\s*@lovrabet\./[_0x420718(0xb3)](_0x5efbeb)){_0x12598e++;continue;}if(_0x5efbeb[_0x420718(0xb5)]()===''&&_0x12598e>0x0){_0x12598e++;continue;}break;}for(;_0x12598e<_0x3b46c9[_0x420718(0xbe)];_0x12598e++){_0x3717ae[_0x420718(0xb1)](_0x3b46c9[_0x12598e]);}return _0x3717ae['join']('\x0a')[_0x420718(0xba)]();}export function resolveSqlMode(_0x24b3a4,_0xab7c5b){const _0x3a0e48=a123_0x2cdc;if(_0xab7c5b?.['mode'])return _0xab7c5b[_0x3a0e48(0xc5)];return detectSqlMode(_0x24b3a4);}export function resolveSqlFileName(_0x27c6e5,_0x9d9a9,_0x2a6e96){const _0x3bb5e8=a123_0x2cdc;if(_0x2a6e96?.[_0x3bb5e8(0xaf)])return _0x2a6e96[_0x3bb5e8(0xaf)];if(_0x2a6e96?.[_0x3bb5e8(0xb8)]||_0x2a6e96?.[_0x3bb5e8(0xb9)])return buildSqlRelativePath(_0x27c6e5,_0x2a6e96?.[_0x3bb5e8(0xb8)],_0x2a6e96?.[_0x3bb5e8(0xb9)],resolveSqlMode(_0x9d9a9,_0x2a6e96),_0x2a6e96?.[_0x3bb5e8(0xa3)]);return buildDefaultSqlFileName(_0x27c6e5,resolveSqlMode(_0x9d9a9,_0x2a6e96));}export function resolveSqlLocalDir(_0x3d9dec,_0x315278){return join(_0x3d9dec,SQL_LOCAL_REL_DIR,_0x315278);}export async function confirmForceOverwrite(_0x3ef961){const _0x3d0dbc=a123_0x2cdc,_0x2342f8=createInterface({'input':process[_0x3d0dbc(0xca)],'output':process[_0x3d0dbc(0xa7)]}),_0x474698=await new Promise(_0x477e17=>{const _0x2b59ed=_0x3d0dbc;_0x2342f8[_0x2b59ed(0xa9)](_0x3ef961+_0x2b59ed(0xc7),_0x477e17);});return _0x2342f8[_0x3d0dbc(0xbb)](),['y',_0x3d0dbc(0xc8)]['includes'](_0x474698[_0x3d0dbc(0xb5)]()['toLowerCase']());}export function findSqlLockScope(_0x4e99b0,_0x1a87c4){const _0x5d8d8d=a123_0x2cdc;return _0x4e99b0[_0x5d8d8d(0xc6)][_0x1a87c4];}function buildMetadataHeaderLines(_0x491b2d,_0x764c79){const _0x7823a1=a123_0x2cdc,_0x7cdd4d=[['sqlCode',_0x491b2d[_0x7823a1(0xb0)]],[_0x7823a1(0xb8),_0x491b2d[_0x7823a1(0xb8)]],[_0x7823a1(0xa3),_0x491b2d[_0x7823a1(0xa3)]],[_0x7823a1(0xb9),_0x491b2d['dbName']],[_0x7823a1(0xc5),_0x491b2d[_0x7823a1(0xc5)]],['syncedAt',_0x491b2d[_0x7823a1(0xa8)]],[_0x7823a1(0xa2),_0x491b2d[_0x7823a1(0xa2)]]];if(_0x764c79==='mybatisXml')return _0x7cdd4d[_0x7823a1(0xa6)](([,_0x368297])=>_0x368297!==undefined&&_0x368297!==null&&String(_0x368297)['trim']()!=='')[_0x7823a1(0xad)](([_0x3d2abc,_0x318b3f])=>_0x7823a1(0xc3)+_0x3d2abc+':\x20'+String(_0x318b3f)+_0x7823a1(0xae));return _0x7cdd4d[_0x7823a1(0xa6)](([,_0x332a4d])=>_0x332a4d!==undefined&&_0x332a4d!==null&&String(_0x332a4d)['trim']()!=='')['map'](([_0x3507aa,_0x26fcfe])=>_0x7823a1(0xcd)+_0x3507aa+':\x20'+String(_0x26fcfe));}
1
+ (function(_0x2545a3,_0x3ff25f){const _0x2438fe=a123_0x4475,_0x668919=_0x2545a3();while(!![]){try{const _0x3adcc5=parseInt(_0x2438fe(0x1f2))/0x1+parseInt(_0x2438fe(0x213))/0x2+-parseInt(_0x2438fe(0x1f5))/0x3*(-parseInt(_0x2438fe(0x215))/0x4)+-parseInt(_0x2438fe(0x205))/0x5+-parseInt(_0x2438fe(0x20a))/0x6+-parseInt(_0x2438fe(0x214))/0x7+parseInt(_0x2438fe(0x20d))/0x8;if(_0x3adcc5===_0x3ff25f)break;else _0x668919['push'](_0x668919['shift']());}catch(_0x5ea267){_0x668919['push'](_0x668919['shift']());}}}(a123_0x2c84,0x6529b));import{createInterface}from'node:readline';import{join}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath,detectSqlMode}from'../../core/sql-sync/utils.js';export const SQL_LOCAL_REL_DIR='.rabetbase/sql';export function buildSqlLockEntry(_0x3dd372,_0x57ac69,_0x2b2a57,_0x42416b){const _0x122ee0=a123_0x4475,_0x11c8db=detectSqlMode(_0x57ac69);return{'path':buildSqlRelativePath(_0x3dd372[_0x122ee0(0x1f8)],_0x3dd372[_0x122ee0(0x20e)],_0x42416b?.[_0x122ee0(0x1f3)],_0x11c8db,_0x3dd372[_0x122ee0(0x1fb)]),'hash':_0x2b2a57,'remoteId':_0x3dd372['id'],'version':_0x3dd372[_0x122ee0(0x210)],'dbId':Number(_0x3dd372['dbId']),'dbName':_0x42416b?.[_0x122ee0(0x1f3)],'sqlName':_0x3dd372['sqlName'],'sqlConfig':_0x3dd372[_0x122ee0(0x207)]??undefined,'mode':_0x11c8db};}export function cloneSqlLockData(_0x3186ac){const _0x2e4010=a123_0x4475;return{'apps':Object[_0x2e4010(0x1fd)](Object[_0x2e4010(0x20b)](_0x3186ac[_0x2e4010(0x21b)])['map'](([_0x238449,_0x32fd59])=>[_0x238449,{'sqlRoot':_0x32fd59[_0x2e4010(0x202)],'lastSync':_0x32fd59['lastSync'],'sqls':{..._0x32fd59[_0x2e4010(0x1f9)]}}]))};}export function ensureRemoteSqlContent(_0x38a2df){const _0x5831b7=a123_0x4475;return _0x38a2df[_0x5831b7(0x204)]??'';}function a123_0x4475(_0xddc41b,_0x23dc58){_0xddc41b=_0xddc41b-0x1f1;const _0x2c8463=a123_0x2c84();let _0x4475f4=_0x2c8463[_0xddc41b];return _0x4475f4;}function a123_0x2c84(){const _0x4eb544=['6425856tIjKcr','sqlName','push','version','split','includes','837652jtnQjp','2786595lHOzXl','7864WjykmO','length','mybatisXml','<!--\x20@lovrabet.','endsWith','map','apps','stderr','description','402786wHCIet','dbName','yes','315PVPdLK','path','trim','sqlCode','sqls','syncedAt','dbId','close','fromEntries','\x20-->','question','test','toLowerCase','sqlRoot','mode','sqlContent','2315740sHcOur','filter','sqlConfig','stdin','--\x20@lovrabet.','3334068TVLiQZ','entries','\x20[y/N]\x20'];a123_0x2c84=function(){return _0x4eb544;};return a123_0x2c84();}export function buildLocalSqlFileContent(_0x4314cd,_0x43384,_0x585f9e){const _0x13ead1=a123_0x4475,_0x318969=_0x585f9e?.['mode']??detectSqlMode(_0x43384),_0x302f14=stripLocalSqlMetadata(_0x43384,_0x318969)[_0x13ead1(0x1f7)](),_0x5f2b0c=[...buildMetadataHeaderLines({'sqlCode':_0x4314cd['sqlCode'],'sqlName':_0x4314cd[_0x13ead1(0x20e)],'dbId':_0x4314cd['dbId'],'dbName':_0x585f9e?.[_0x13ead1(0x1f3)],'mode':_0x318969,'syncedAt':_0x585f9e?.[_0x13ead1(0x1fa)],'description':_0x585f9e?.[_0x13ead1(0x1f1)]},_0x318969),'',_0x302f14],_0x2c676c=_0x5f2b0c['join']('\x0a');return _0x2c676c[_0x13ead1(0x219)]('\x0a')?_0x2c676c:_0x2c676c+'\x0a';}export function stripLocalSqlMetadata(_0x1145f1,_0x485258){const _0x222548=a123_0x4475,_0x4ef0e8=_0x1145f1['replace'](/\r\n/g,'\x0a')[_0x222548(0x211)]('\x0a'),_0x13c108=[];let _0x59f499=0x0;if(_0x485258===_0x222548(0x217))while(_0x59f499<_0x4ef0e8[_0x222548(0x216)]){const _0x8f9157=_0x4ef0e8[_0x59f499]??'';if(/^\s*<!--\s*@lovrabet\./[_0x222548(0x200)](_0x8f9157)){_0x59f499++;continue;}if(_0x8f9157['trim']()===''&&_0x59f499>0x0){_0x59f499++;continue;}break;}else while(_0x59f499<_0x4ef0e8[_0x222548(0x216)]){const _0x22a385=_0x4ef0e8[_0x59f499]??'';if(/^\s*--\s*@lovrabet\./[_0x222548(0x200)](_0x22a385)){_0x59f499++;continue;}if(_0x22a385[_0x222548(0x1f7)]()===''&&_0x59f499>0x0){_0x59f499++;continue;}break;}for(;_0x59f499<_0x4ef0e8[_0x222548(0x216)];_0x59f499++){_0x13c108[_0x222548(0x20f)](_0x4ef0e8[_0x59f499]);}return _0x13c108['join']('\x0a')['trimStart']();}export function resolveSqlMode(_0x5497d4,_0x5d1b90){const _0x16cd39=a123_0x4475;if(_0x5d1b90?.[_0x16cd39(0x203)])return _0x5d1b90[_0x16cd39(0x203)];return detectSqlMode(_0x5497d4);}export function resolveSqlFileName(_0x534685,_0x48765,_0xb543ed){const _0x456fa2=a123_0x4475;if(_0xb543ed?.[_0x456fa2(0x1f6)])return _0xb543ed[_0x456fa2(0x1f6)];if(_0xb543ed?.[_0x456fa2(0x20e)]||_0xb543ed?.[_0x456fa2(0x1f3)])return buildSqlRelativePath(_0x534685,_0xb543ed?.[_0x456fa2(0x20e)],_0xb543ed?.[_0x456fa2(0x1f3)],resolveSqlMode(_0x48765,_0xb543ed),_0xb543ed?.['dbId']);return buildDefaultSqlFileName(_0x534685,resolveSqlMode(_0x48765,_0xb543ed));}export function resolveSqlLocalDir(_0x42ed8e,_0x1f0b6f){return join(_0x42ed8e,SQL_LOCAL_REL_DIR,_0x1f0b6f);}export async function confirmForceOverwrite(_0x3f1829){const _0xddc20b=a123_0x4475,_0x2df95d=createInterface({'input':process[_0xddc20b(0x208)],'output':process[_0xddc20b(0x21c)]}),_0x237ffc=await new Promise(_0x4dcbdb=>{const _0x690a67=_0xddc20b;_0x2df95d[_0x690a67(0x1ff)](_0x3f1829+_0x690a67(0x20c),_0x4dcbdb);});return _0x2df95d[_0xddc20b(0x1fc)](),['y',_0xddc20b(0x1f4)][_0xddc20b(0x212)](_0x237ffc[_0xddc20b(0x1f7)]()[_0xddc20b(0x201)]());}export function findSqlLockScope(_0x4d845b,_0x260154){const _0x3fe9dd=a123_0x4475;return _0x4d845b[_0x3fe9dd(0x21b)][_0x260154];}function buildMetadataHeaderLines(_0xc8748,_0x4195ea){const _0x374b36=a123_0x4475,_0x7e6308=[[_0x374b36(0x1f8),_0xc8748[_0x374b36(0x1f8)]],[_0x374b36(0x20e),_0xc8748['sqlName']],[_0x374b36(0x1fb),_0xc8748[_0x374b36(0x1fb)]],[_0x374b36(0x1f3),_0xc8748[_0x374b36(0x1f3)]],['mode',_0xc8748[_0x374b36(0x203)]],[_0x374b36(0x1fa),_0xc8748[_0x374b36(0x1fa)]],[_0x374b36(0x1f1),_0xc8748['description']]];if(_0x4195ea===_0x374b36(0x217))return _0x7e6308[_0x374b36(0x206)](([,_0x3878fc])=>_0x3878fc!==undefined&&_0x3878fc!==null&&String(_0x3878fc)[_0x374b36(0x1f7)]()!=='')['map'](([_0x143021,_0x5c4ad6])=>_0x374b36(0x218)+_0x143021+':\x20'+String(_0x5c4ad6)+_0x374b36(0x1fe));return _0x7e6308[_0x374b36(0x206)](([,_0x436b08])=>_0x436b08!==undefined&&_0x436b08!==null&&String(_0x436b08)[_0x374b36(0x1f7)]()!=='')[_0x374b36(0x21a)](([_0x5497cd,_0x99b628])=>_0x374b36(0x209)+_0x5497cd+':\x20'+String(_0x99b628));}
@@ -1 +1 @@
1
- function a124_0x2426(_0x2f57a1,_0x3a4214){_0x2f57a1=_0x2f57a1-0x174;const _0xab51de=a124_0xab51();let _0x2426d7=_0xab51de[_0x2f57a1];return _0x2426d7;}const a124_0xc7f8b4=a124_0x2426;(function(_0x243535,_0x458783){const _0x1f55df=a124_0x2426,_0x4a0ae4=_0x243535();while(!![]){try{const _0x5a5a5f=-parseInt(_0x1f55df(0x18c))/0x1+-parseInt(_0x1f55df(0x176))/0x2+parseInt(_0x1f55df(0x189))/0x3*(parseInt(_0x1f55df(0x178))/0x4)+parseInt(_0x1f55df(0x17a))/0x5*(-parseInt(_0x1f55df(0x184))/0x6)+parseInt(_0x1f55df(0x186))/0x7+parseInt(_0x1f55df(0x18e))/0x8*(parseInt(_0x1f55df(0x182))/0x9)+parseInt(_0x1f55df(0x195))/0xa*(-parseInt(_0x1f55df(0x193))/0xb);if(_0x5a5a5f===_0x458783)break;else _0x4a0ae4['push'](_0x4a0ae4['shift']());}catch(_0x1bcac3){_0x4a0ae4['push'](_0x4a0ae4['shift']());}}}(a124_0xab51,0x60722));import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';function a124_0xab51(){const _0x554f48=['280wkMiYk','status','sqls','map','All\x20SQL\x20queries\x20are\x20in\x20sync.','55UecRsZ','sqlRoot','124220mAKYlR','tableData','sqlName','144728pUewYT','\x20unchanged','9588qePsql','has','5CUTuGI','\x20remote-only','\x20added,\x20','push','length','read','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','sql','108639fTmRhn','appCode','3233190pxQUZU','lockKey','1348270UeCxcL','bool','hash','813MrMHHS','totalCount','filePath','196301jidcSU','remote'];a124_0xab51=function(){return _0x554f48;};return a124_0xab51();}const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x552699){const _0x580dfe=a124_0x2426,_0x4fd2cb=[];let _0x4c816a=0x1;while(!![]){const _0x5448c1=await listSqlQueries(_0x552699,{'currentPage':_0x4c816a,'pageSize':PAGE_SIZE}),_0x284b27=_0x5448c1[_0x580dfe(0x174)]??[];_0x4fd2cb[_0x580dfe(0x17d)](..._0x284b27[_0x580dfe(0x191)](_0x5a44e8=>_0x5a44e8['sqlCode']));if(_0x284b27[_0x580dfe(0x17e)]===0x0)break;const _0x11c758=_0x5448c1['paging']?.[_0x580dfe(0x18a)];if(_0x11c758!=null?_0x4fd2cb[_0x580dfe(0x17e)]>=_0x11c758:_0x284b27[_0x580dfe(0x17e)]<PAGE_SIZE)break;_0x4c816a++;}return _0x4fd2cb;}export const sqlStatus={'service':a124_0xc7f8b4(0x181),'command':a124_0xc7f8b4(0x18f),'description':'Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','risk':a124_0xc7f8b4(0x17f),'flags':[{'name':a124_0xc7f8b4(0x18d),'type':'boolean','description':a124_0xc7f8b4(0x180)}],async 'execute'(_0x4e72b1){const _0x4c7724=a124_0xc7f8b4,_0x3f2331=loadSqlProjectConfig(_0x4e72b1[_0x4c7724(0x183)]),_0x364c55=await readSqlLockFile(_0x3f2331['lockFilePath']),{appLock:_0x46effe}=ensureSqlLockScope(_0x364c55??createEmptySqlLock(),_0x3f2331[_0x4c7724(0x183)],_0x3f2331[_0x4c7724(0x194)],_0x4c7724(0x18f)),_0x2132a6=await scanLocalSqlQueries(_0x3f2331),_0x1615c2=[],_0x381a0e=[],_0x4e8311=[],_0x25dba1=[],_0x220211=new Set(_0x2132a6[_0x4c7724(0x191)](_0x5e15e1=>_0x5e15e1[_0x4c7724(0x185)]));for(const _0x138798 of _0x2132a6){const _0x2ea308=await computeSqlFileHash(_0x138798[_0x4c7724(0x18b)]),_0x4e268d=_0x46effe[_0x4c7724(0x190)][_0x138798[_0x4c7724(0x185)]],_0xb3e086=!!_0x4e268d&&_0x4e268d['path']!==_0x138798['relativePath'],_0x4a427e=!!_0x4e268d&&!!_0x138798[_0x4c7724(0x175)]&&_0x4e268d[_0x4c7724(0x175)]!==_0x138798['sqlName'];if(!_0x4e268d)_0x1615c2[_0x4c7724(0x17d)](_0x138798[_0x4c7724(0x185)]);else _0x4e268d[_0x4c7724(0x188)]!==_0x2ea308||_0xb3e086||_0x4a427e?_0x381a0e[_0x4c7724(0x17d)](_0x138798[_0x4c7724(0x185)]):_0x4e8311['push'](_0x138798[_0x4c7724(0x185)]);}for(const _0x4f93fa of Object['keys'](_0x46effe[_0x4c7724(0x190)])){!_0x220211['has'](_0x4f93fa)&&_0x25dba1[_0x4c7724(0x17d)](_0x4f93fa);}const _0x10899e=[];if(_0x4e72b1[_0x4c7724(0x187)](_0x4c7724(0x18d))){const _0xbd2e7=await fetchAllSqlCodes(_0x4e72b1[_0x4c7724(0x183)]);for(const _0x3acf1b of _0xbd2e7){!_0x220211[_0x4c7724(0x179)](_0x3acf1b)&&!_0x46effe[_0x4c7724(0x190)][_0x3acf1b]&&_0x10899e[_0x4c7724(0x17d)](_0x3acf1b);}}const _0x575932=_0x1615c2[_0x4c7724(0x17e)]===0x0&&_0x381a0e[_0x4c7724(0x17e)]===0x0&&_0x25dba1['length']===0x0&&_0x10899e[_0x4c7724(0x17e)]===0x0;return{'ok':!![],'data':{'added':_0x1615c2,'modified':_0x381a0e,'missing':_0x25dba1,'unchanged':_0x4e8311,'remoteOnly':_0x10899e},'message':_0x575932?_0x4c7724(0x192):_0x1615c2[_0x4c7724(0x17e)]+_0x4c7724(0x17c)+_0x381a0e[_0x4c7724(0x17e)]+'\x20modified,\x20'+_0x25dba1[_0x4c7724(0x17e)]+'\x20missing,\x20'+_0x4e8311[_0x4c7724(0x17e)]+_0x4c7724(0x177)+(_0x10899e[_0x4c7724(0x17e)]>0x0?',\x20'+_0x10899e[_0x4c7724(0x17e)]+_0x4c7724(0x17b):'')};}};
1
+ const a124_0x1054e8=a124_0x3774;(function(_0x1213cc,_0x44bc5b){const _0x1b44cc=a124_0x3774,_0x1a4d00=_0x1213cc();while(!![]){try{const _0x4f3439=parseInt(_0x1b44cc(0x1e4))/0x1+-parseInt(_0x1b44cc(0x1cf))/0x2+-parseInt(_0x1b44cc(0x1d3))/0x3*(-parseInt(_0x1b44cc(0x1e3))/0x4)+-parseInt(_0x1b44cc(0x1ce))/0x5*(-parseInt(_0x1b44cc(0x1e2))/0x6)+-parseInt(_0x1b44cc(0x1ed))/0x7+-parseInt(_0x1b44cc(0x1ee))/0x8*(-parseInt(_0x1b44cc(0x1d1))/0x9)+parseInt(_0x1b44cc(0x1ea))/0xa*(-parseInt(_0x1b44cc(0x1e7))/0xb);if(_0x4f3439===_0x44bc5b)break;else _0x1a4d00['push'](_0x1a4d00['shift']());}catch(_0x1bcd1e){_0x1a4d00['push'](_0x1a4d00['shift']());}}}(a124_0x57e1,0x4f0a3));import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';function a124_0x57e1(){const _0x24e06a=['totalCount','remote','1290qWyyCl','\x20added,\x20','sqlName','376292ocsdlC','16WBivgu','tableData','relativePath','\x20unchanged','lockFilePath','\x20missing,\x20','sqlRoot','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','5ixKOei','843760sbZzFl','\x20remote-only','2113119lmyrek','map','30IDboDk','push','read','paging','sqlCode','keys','has','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','lockKey','status','appCode','length','filePath','path','sql','3533226IIEmQH','190492SHiNtH','510195vLXIXi','hash','sqls','106205pUKOmg'];a124_0x57e1=function(){return _0x24e06a;};return a124_0x57e1();}function a124_0x3774(_0x494041,_0x212dda){_0x494041=_0x494041-0x1c7;const _0x57e1be=a124_0x57e1();let _0x377409=_0x57e1be[_0x494041];return _0x377409;}import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x25c0dc){const _0xa0a146=a124_0x3774,_0x2dfed0=[];let _0x37fb24=0x1;while(!![]){const _0x4f19ea=await listSqlQueries(_0x25c0dc,{'currentPage':_0x37fb24,'pageSize':PAGE_SIZE}),_0x5c74bc=_0x4f19ea[_0xa0a146(0x1c7)]??[];_0x2dfed0[_0xa0a146(0x1d4)](..._0x5c74bc[_0xa0a146(0x1d2)](_0x54651f=>_0x54651f[_0xa0a146(0x1d7)]));if(_0x5c74bc['length']===0x0)break;const _0x37de13=_0x4f19ea[_0xa0a146(0x1d6)]?.[_0xa0a146(0x1e8)];if(_0x37de13!=null?_0x2dfed0[_0xa0a146(0x1de)]>=_0x37de13:_0x5c74bc[_0xa0a146(0x1de)]<PAGE_SIZE)break;_0x37fb24++;}return _0x2dfed0;}export const sqlStatus={'service':a124_0x1054e8(0x1e1),'command':'status','description':a124_0x1054e8(0x1cd),'risk':a124_0x1054e8(0x1d5),'flags':[{'name':'remote','type':'boolean','description':a124_0x1054e8(0x1da)}],async 'execute'(_0x55d080){const _0x912fc5=a124_0x1054e8,_0x14bd01=loadSqlProjectConfig(_0x55d080[_0x912fc5(0x1dd)]),_0x4934a8=await readSqlLockFile(_0x14bd01[_0x912fc5(0x1ca)]),{appLock:_0x3283c8}=ensureSqlLockScope(_0x4934a8??createEmptySqlLock(),_0x14bd01[_0x912fc5(0x1dd)],_0x14bd01[_0x912fc5(0x1cc)],_0x912fc5(0x1dc)),_0x3260f7=await scanLocalSqlQueries(_0x14bd01),_0x24cce5=[],_0x3141fc=[],_0x2692b7=[],_0x277a9a=[],_0x4195a2=new Set(_0x3260f7['map'](_0x3a0ca9=>_0x3a0ca9[_0x912fc5(0x1db)]));for(const _0x4b94ef of _0x3260f7){const _0x3eb8eb=await computeSqlFileHash(_0x4b94ef[_0x912fc5(0x1df)]),_0x3e33b0=_0x3283c8[_0x912fc5(0x1e6)][_0x4b94ef[_0x912fc5(0x1db)]],_0x487ad4=!!_0x3e33b0&&_0x3e33b0[_0x912fc5(0x1e0)]!==_0x4b94ef[_0x912fc5(0x1c8)],_0x3625cb=!!_0x3e33b0&&!!_0x4b94ef['sqlName']&&_0x3e33b0[_0x912fc5(0x1ec)]!==_0x4b94ef[_0x912fc5(0x1ec)];if(!_0x3e33b0)_0x24cce5[_0x912fc5(0x1d4)](_0x4b94ef[_0x912fc5(0x1db)]);else _0x3e33b0[_0x912fc5(0x1e5)]!==_0x3eb8eb||_0x487ad4||_0x3625cb?_0x3141fc[_0x912fc5(0x1d4)](_0x4b94ef[_0x912fc5(0x1db)]):_0x2692b7[_0x912fc5(0x1d4)](_0x4b94ef[_0x912fc5(0x1db)]);}for(const _0x51422a of Object[_0x912fc5(0x1d8)](_0x3283c8[_0x912fc5(0x1e6)])){!_0x4195a2[_0x912fc5(0x1d9)](_0x51422a)&&_0x277a9a[_0x912fc5(0x1d4)](_0x51422a);}const _0x3ceb41=[];if(_0x55d080['bool'](_0x912fc5(0x1e9))){const _0x5310d1=await fetchAllSqlCodes(_0x55d080[_0x912fc5(0x1dd)]);for(const _0x4f812c of _0x5310d1){!_0x4195a2['has'](_0x4f812c)&&!_0x3283c8[_0x912fc5(0x1e6)][_0x4f812c]&&_0x3ceb41[_0x912fc5(0x1d4)](_0x4f812c);}}const _0x19dea5=_0x24cce5[_0x912fc5(0x1de)]===0x0&&_0x3141fc['length']===0x0&&_0x277a9a[_0x912fc5(0x1de)]===0x0&&_0x3ceb41[_0x912fc5(0x1de)]===0x0;return{'ok':!![],'data':{'added':_0x24cce5,'modified':_0x3141fc,'missing':_0x277a9a,'unchanged':_0x2692b7,'remoteOnly':_0x3ceb41},'message':_0x19dea5?'All\x20SQL\x20queries\x20are\x20in\x20sync.':_0x24cce5[_0x912fc5(0x1de)]+_0x912fc5(0x1eb)+_0x3141fc[_0x912fc5(0x1de)]+'\x20modified,\x20'+_0x277a9a[_0x912fc5(0x1de)]+_0x912fc5(0x1cb)+_0x2692b7[_0x912fc5(0x1de)]+_0x912fc5(0x1c9)+(_0x3ceb41[_0x912fc5(0x1de)]>0x0?',\x20'+_0x3ceb41[_0x912fc5(0x1de)]+_0x912fc5(0x1d0):'')};}};
@@ -1 +1 @@
1
- const a125_0x39781c=a125_0x57b8;function a125_0x57b8(_0x3c7f26,_0x456f8d){_0x3c7f26=_0x3c7f26-0x15a;const _0x581ab9=a125_0x581a();let _0x57b8a0=_0x581ab9[_0x3c7f26];return _0x57b8a0;}(function(_0x4e78b5,_0x295f2d){const _0x1ff7c4=a125_0x57b8,_0x2131f4=_0x4e78b5();while(!![]){try{const _0x409471=parseInt(_0x1ff7c4(0x15c))/0x1+parseInt(_0x1ff7c4(0x15f))/0x2*(-parseInt(_0x1ff7c4(0x177))/0x3)+parseInt(_0x1ff7c4(0x17a))/0x4+-parseInt(_0x1ff7c4(0x171))/0x5+parseInt(_0x1ff7c4(0x164))/0x6+parseInt(_0x1ff7c4(0x181))/0x7+-parseInt(_0x1ff7c4(0x173))/0x8;if(_0x409471===_0x295f2d)break;else _0x2131f4['push'](_0x2131f4['shift']());}catch(_0x5be4b1){_0x2131f4['push'](_0x2131f4['shift']());}}}(a125_0x581a,0x5d2d2));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';function a125_0x581a(){const _0x347526=['269407IFiLQm','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','string','1092ertEpj','file','parameters','sqlType','isSelectOnly','3992622QiQbtr','push','schemas','Dataset\x20\x22','appCode','\x22\x20not\x20found\x20or\x20not\x20accessible','validate','flagMissing','split','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','get','map','str','553170jcDaZX','isDangerous','10977560omZBru','utf-8','valid','cwd','2481LUQQve','Provide\x20--file\x20or\x20--sql','isArray','2856056MLbBCG','reason','toLowerCase','\x22\x20not\x20found\x20in\x20any\x20dataset','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','fields','validation','4670141HNyXlh','dbtableConfig','Table\x20\x22','tables','tableName','sql'];a125_0x581a=function(){return _0x347526;};return a125_0x581a();}import{CliErrors}from'../../errors.js';export const sqlValidate={'service':a125_0x39781c(0x15b),'command':a125_0x39781c(0x16a),'description':a125_0x39781c(0x17e),'risk':'read','flags':[{'name':a125_0x39781c(0x160),'type':a125_0x39781c(0x15e),'description':a125_0x39781c(0x16d)},{'name':a125_0x39781c(0x15b),'type':'string','description':'Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)'},{'name':a125_0x39781c(0x166),'type':'string','description':a125_0x39781c(0x15d)}],async 'execute'(_0x4a7273){const _0x51d4ce=a125_0x39781c,_0x1796c3=_0x4a7273[_0x51d4ce(0x170)](_0x51d4ce(0x160)),_0xb63afd=_0x4a7273[_0x51d4ce(0x170)](_0x51d4ce(0x15b));if(!_0x1796c3&&!_0xb63afd)throw CliErrors[_0x51d4ce(0x16b)](_0x51d4ce(0x160),_0x51d4ce(0x178));let _0x25ceae;if(_0x1796c3){const _0x34fcee=resolve(process[_0x51d4ce(0x176)](),_0x1796c3);if(!existsSync(_0x34fcee))throw CliErrors[_0x51d4ce(0x180)]('File\x20not\x20found:\x20'+_0x34fcee);_0x25ceae=readFileSync(_0x34fcee,_0x51d4ce(0x174));}else _0x25ceae=_0xb63afd;const _0x2bcc6e=validateSql(_0x25ceae),_0x217475={'valid':_0x2bcc6e['valid'],'sqlType':_0x2bcc6e[_0x51d4ce(0x162)]['type'],'isSelectOnly':_0x2bcc6e['sqlType'][_0x51d4ce(0x163)],'isDangerous':_0x2bcc6e[_0x51d4ce(0x162)][_0x51d4ce(0x172)],'tables':_0x2bcc6e[_0x51d4ce(0x184)],'parameters':_0x2bcc6e[_0x51d4ce(0x161)],'message':_0x2bcc6e['message']};_0x2bcc6e[_0x51d4ce(0x162)]['reason']&&(_0x217475[_0x51d4ce(0x17b)]=_0x2bcc6e[_0x51d4ce(0x162)][_0x51d4ce(0x17b)]);const _0x28c122=_0x4a7273['str'](_0x51d4ce(0x166));if(_0x28c122&&_0x2bcc6e[_0x51d4ce(0x175)]){const _0x7a6615=_0x28c122[_0x51d4ce(0x16c)](',')['map'](_0x2a1c28=>_0x2a1c28['trim']())['filter'](Boolean),_0x333600=[],_0x398bc7=await listDatasets(_0x4a7273[_0x51d4ce(0x168)]),_0x580a20=new Map(_0x398bc7[_0x51d4ce(0x16f)](_0x1f8d35=>[_0x1f8d35['dbtableConfig']?.[_0x51d4ce(0x15a)]?.[_0x51d4ce(0x17c)](),_0x1f8d35]));for(const _0x336376 of _0x2bcc6e[_0x51d4ce(0x184)]){const _0x41c617=_0x580a20[_0x51d4ce(0x16e)](_0x336376['toLowerCase']());!_0x41c617&&_0x333600[_0x51d4ce(0x165)](_0x51d4ce(0x183)+_0x336376+_0x51d4ce(0x17d));}for(const _0x254bdd of _0x7a6615){try{const _0x2b2f2f=await getDatasetDetail(_0x254bdd),_0x1d0727=Array[_0x51d4ce(0x179)](_0x2b2f2f['fields'])?_0x2b2f2f[_0x51d4ce(0x17f)]:[],_0x2811ed=new Set(_0x1d0727[_0x51d4ce(0x16f)](_0x3bc7d1=>_0x3bc7d1['name']?.[_0x51d4ce(0x17c)]())),_0x32dfe7=_0x2b2f2f[_0x51d4ce(0x182)]?.[_0x51d4ce(0x15a)]||_0x2b2f2f[_0x51d4ce(0x15a)]||_0x254bdd;_0x217475['schema:'+_0x32dfe7]={'code':_0x254bdd,'tableName':_0x32dfe7,'fieldCount':_0x2811ed['size'],'fields':Array['from'](_0x2811ed)};}catch{_0x333600[_0x51d4ce(0x165)](_0x51d4ce(0x167)+_0x254bdd+_0x51d4ce(0x169));}}_0x333600['length']>0x0&&(_0x217475['schemaWarnings']=_0x333600);}return{'ok':_0x2bcc6e[_0x51d4ce(0x175)],'data':_0x217475,'message':_0x2bcc6e['message']};}};
1
+ const a125_0x2f62a1=a125_0x56a7;function a125_0x56a7(_0x1a65c5,_0x50a6a3){_0x1a65c5=_0x1a65c5-0x1bf;const _0x5e9fb4=a125_0x5e9f();let _0x56a724=_0x5e9fb4[_0x1a65c5];return _0x56a724;}(function(_0x3e91f1,_0x22619b){const _0x1b2243=a125_0x56a7,_0x4d3578=_0x3e91f1();while(!![]){try{const _0x51f49b=-parseInt(_0x1b2243(0x1d7))/0x1+parseInt(_0x1b2243(0x1d8))/0x2+-parseInt(_0x1b2243(0x1d1))/0x3+parseInt(_0x1b2243(0x1df))/0x4+-parseInt(_0x1b2243(0x1cd))/0x5+parseInt(_0x1b2243(0x1e4))/0x6+-parseInt(_0x1b2243(0x1d5))/0x7;if(_0x51f49b===_0x22619b)break;else _0x4d3578['push'](_0x4d3578['shift']());}catch(_0x173423){_0x4d3578['push'](_0x4d3578['shift']());}}}(a125_0x5e9f,0xd1ba1));function a125_0x5e9f(){const _0x3d4ee5=['2387830JXVoec','isDangerous','filter','size','2149806svXZhE','get','reason','Provide\x20--file\x20or\x20--sql','1169126NwIOxu','utf-8','302056JOUQWs','1359428yeFLtn','dbtableConfig','sqlType','validate','sql','cwd','isSelectOnly','2332008tDxJef','File\x20not\x20found:\x20','flagMissing','Table\x20\x22','string','7557402Fhkmol','tables','file','schemas','parameters','read','Dataset\x20\x22','message','fields','schemaWarnings','type','map','trim','validation','valid','isArray','from','tableName','str','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','toLowerCase','\x22\x20not\x20found\x20in\x20any\x20dataset','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','push'];a125_0x5e9f=function(){return _0x3d4ee5;};return a125_0x5e9f();}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';export const sqlValidate={'service':a125_0x2f62a1(0x1dc),'command':a125_0x2f62a1(0x1db),'description':a125_0x2f62a1(0x1c8),'risk':a125_0x2f62a1(0x1e9),'flags':[{'name':a125_0x2f62a1(0x1e6),'type':a125_0x2f62a1(0x1e3),'description':'Path\x20to\x20the\x20SQL\x20file\x20to\x20validate'},{'name':a125_0x2f62a1(0x1dc),'type':a125_0x2f62a1(0x1e3),'description':a125_0x2f62a1(0x1cb)},{'name':a125_0x2f62a1(0x1e7),'type':a125_0x2f62a1(0x1e3),'description':'Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against'}],async 'execute'(_0x287f0b){const _0x172a43=a125_0x2f62a1,_0x2dd6cd=_0x287f0b[_0x172a43(0x1c7)](_0x172a43(0x1e6)),_0x2e1942=_0x287f0b[_0x172a43(0x1c7)](_0x172a43(0x1dc));if(!_0x2dd6cd&&!_0x2e1942)throw CliErrors[_0x172a43(0x1e1)](_0x172a43(0x1e6),_0x172a43(0x1d4));let _0x1643b3;if(_0x2dd6cd){const _0x2382c0=resolve(process[_0x172a43(0x1dd)](),_0x2dd6cd);if(!existsSync(_0x2382c0))throw CliErrors[_0x172a43(0x1c2)](_0x172a43(0x1e0)+_0x2382c0);_0x1643b3=readFileSync(_0x2382c0,_0x172a43(0x1d6));}else _0x1643b3=_0x2e1942;const _0x3b2786=validateSql(_0x1643b3),_0x640130={'valid':_0x3b2786[_0x172a43(0x1c3)],'sqlType':_0x3b2786[_0x172a43(0x1da)][_0x172a43(0x1bf)],'isSelectOnly':_0x3b2786[_0x172a43(0x1da)][_0x172a43(0x1de)],'isDangerous':_0x3b2786['sqlType'][_0x172a43(0x1ce)],'tables':_0x3b2786[_0x172a43(0x1e5)],'parameters':_0x3b2786[_0x172a43(0x1e8)],'message':_0x3b2786[_0x172a43(0x1eb)]};_0x3b2786['sqlType'][_0x172a43(0x1d3)]&&(_0x640130[_0x172a43(0x1d3)]=_0x3b2786[_0x172a43(0x1da)]['reason']);const _0xbf0ce8=_0x287f0b[_0x172a43(0x1c7)](_0x172a43(0x1e7));if(_0xbf0ce8&&_0x3b2786['valid']){const _0x5762fc=_0xbf0ce8['split'](',')[_0x172a43(0x1c0)](_0xfa563f=>_0xfa563f[_0x172a43(0x1c1)]())[_0x172a43(0x1cf)](Boolean),_0x193e08=[],_0x4b89ef=await listDatasets(_0x287f0b['appCode']),_0x3033bc=new Map(_0x4b89ef[_0x172a43(0x1c0)](_0x1f6213=>[_0x1f6213[_0x172a43(0x1d9)]?.['tableName']?.[_0x172a43(0x1c9)](),_0x1f6213]));for(const _0x2a045f of _0x3b2786[_0x172a43(0x1e5)]){const _0x54633f=_0x3033bc[_0x172a43(0x1d2)](_0x2a045f[_0x172a43(0x1c9)]());!_0x54633f&&_0x193e08[_0x172a43(0x1cc)](_0x172a43(0x1e2)+_0x2a045f+_0x172a43(0x1ca));}for(const _0x3468a7 of _0x5762fc){try{const _0x1287b9=await getDatasetDetail(_0x3468a7),_0x315b2c=Array[_0x172a43(0x1c4)](_0x1287b9[_0x172a43(0x1ec)])?_0x1287b9[_0x172a43(0x1ec)]:[],_0x28e454=new Set(_0x315b2c[_0x172a43(0x1c0)](_0x109154=>_0x109154['name']?.[_0x172a43(0x1c9)]())),_0x2d62b7=_0x1287b9[_0x172a43(0x1d9)]?.[_0x172a43(0x1c6)]||_0x1287b9[_0x172a43(0x1c6)]||_0x3468a7;_0x640130['schema:'+_0x2d62b7]={'code':_0x3468a7,'tableName':_0x2d62b7,'fieldCount':_0x28e454[_0x172a43(0x1d0)],'fields':Array[_0x172a43(0x1c5)](_0x28e454)};}catch{_0x193e08[_0x172a43(0x1cc)](_0x172a43(0x1ea)+_0x3468a7+'\x22\x20not\x20found\x20or\x20not\x20accessible');}}_0x193e08['length']>0x0&&(_0x640130[_0x172a43(0x1ed)]=_0x193e08);}return{'ok':_0x3b2786[_0x172a43(0x1c3)],'data':_0x640130,'message':_0x3b2786[_0x172a43(0x1eb)]};}};
@@ -1 +1 @@
1
- const a126_0x372b14=a126_0x3645;(function(_0x56af4b,_0x14d41f){const _0x43a8f7=a126_0x3645,_0x2dca97=_0x56af4b();while(!![]){try{const _0x528ed8=-parseInt(_0x43a8f7(0x1bf))/0x1*(parseInt(_0x43a8f7(0x1c7))/0x2)+-parseInt(_0x43a8f7(0x1bd))/0x3+-parseInt(_0x43a8f7(0x1ae))/0x4*(parseInt(_0x43a8f7(0x1af))/0x5)+-parseInt(_0x43a8f7(0x1c0))/0x6+-parseInt(_0x43a8f7(0x1c2))/0x7*(-parseInt(_0x43a8f7(0x1a5))/0x8)+-parseInt(_0x43a8f7(0x1a1))/0x9*(parseInt(_0x43a8f7(0x1a2))/0xa)+parseInt(_0x43a8f7(0x1b5))/0xb*(parseInt(_0x43a8f7(0x1a0))/0xc);if(_0x528ed8===_0x14d41f)break;else _0x2dca97['push'](_0x2dca97['shift']());}catch(_0x1da71a){_0x2dca97['push'](_0x2dca97['shift']());}}}(a126_0x4b83,0x92641));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=['cookie',a126_0x372b14(0x1a9),a126_0x372b14(0x1c8),'format','riskLevel'];export const TOP_LEVEL_CONFIG_KEYS=new Set([a126_0x372b14(0x1c9),a126_0x372b14(0x1a4),'locale','format','cookie','accessKey','apiDir']);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x55fa04){const _0x5181ca=a126_0x372b14;return[..._0x55fa04][_0x5181ca(0x1a6)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x1b8fb2){const _0x489a79=a126_0x372b14;return TOP_LEVEL_CONFIG_KEYS[_0x489a79(0x1b6)](_0x1b8fb2);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){return'Config\x20key\x20('+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':a126_0x372b14(0x1a4),'apiDir':'apiDir','cookie':a126_0x372b14(0x1c6),'accessKey':a126_0x372b14(0x1a9),'defaultFormat':a126_0x372b14(0x1b4),'pageSize':'pageSize','riskLevel':a126_0x372b14(0x1a8),'locale':a126_0x372b14(0x1c8)};export function getAppProfileFlagDefs(){const _0x16d101=a126_0x372b14;return[{'name':_0x16d101(0x1a4),'type':_0x16d101(0x1b3),'description':_0x16d101(0x1ab),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x16d101(0x1ad),'type':_0x16d101(0x1b3),'description':_0x16d101(0x1c4)},{'name':_0x16d101(0x1c6),'type':_0x16d101(0x1b3),'description':'Auth\x20cookie','hidden':!![]},{'name':_0x16d101(0x1a9),'type':_0x16d101(0x1b3),'description':_0x16d101(0x1bc),'hidden':!![]},{'name':_0x16d101(0x1bb),'type':_0x16d101(0x1b3),'description':_0x16d101(0x1c3),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':'pageSize','type':_0x16d101(0x1aa),'description':_0x16d101(0x1b8)},{'name':_0x16d101(0x1a8),'type':_0x16d101(0x1b3),'description':'Risk\x20level','enum':[...RISK_LEVEL_VALUES]},{'name':_0x16d101(0x1c8),'type':_0x16d101(0x1b3),'description':_0x16d101(0x1be)}];}export function collectAppProfileOverrides(_0x2f99a2){const _0x109aa2={};for(const [_0x146b8a,_0x401d6d]of Object['entries'](APP_PROFILE_FLAG_KEY_MAP)){const _0x17905d=_0x2f99a2(_0x146b8a);if(!_0x17905d)continue;_0x109aa2[_0x401d6d]=_0x401d6d==='pageSize'?Number(_0x17905d):_0x17905d;}return _0x109aa2;}export function buildAppProfileListFields(_0x360c41){const _0x2d7705=a126_0x372b14;return{'env':_0x360c41['env']??null,'apiDir':_0x360c41[_0x2d7705(0x1ad)]??null,'hasCookie':!!_0x360c41['cookie'],'hasAccessKey':!!_0x360c41['accessKey'],'format':_0x360c41[_0x2d7705(0x1b4)]??null,'pageSize':_0x360c41[_0x2d7705(0x1b7)]??null,'riskLevel':_0x360c41[_0x2d7705(0x1a8)]??null,'locale':_0x360c41[_0x2d7705(0x1c8)]??null};}export function buildAppDoctorFields(_0xc856a9,_0x541faf){const _0x1e1691=a126_0x372b14;return{'env':{'value':_0xc856a9[_0x1e1691(0x1a4)]||_0x541faf[_0x1e1691(0x1a4)],'source':_0xc856a9[_0x1e1691(0x1a4)]?_0x1e1691(0x1b9):_0x1e1691(0x1c1)},'apiDir':{'value':_0xc856a9[_0x1e1691(0x1ad)]||_0x541faf[_0x1e1691(0x1ad)],'source':_0xc856a9['apiDir']?_0x1e1691(0x1b9):_0x1e1691(0x1c1)},'cookie':{'value':_0xc856a9[_0x1e1691(0x1c6)]||_0x541faf[_0x1e1691(0x1c6)],'source':_0xc856a9[_0x1e1691(0x1c6)]?_0x1e1691(0x1b9):_0x1e1691(0x1c1)},'accessKey':{'value':_0xc856a9[_0x1e1691(0x1a9)]||_0x541faf[_0x1e1691(0x1a9)],'source':_0xc856a9[_0x1e1691(0x1a9)]?_0x1e1691(0x1b9):'inherit'}};}function a126_0x3645(_0x317f2e,_0x5c7645){_0x317f2e=_0x317f2e-0x1a0;const _0x4b835b=a126_0x4b83();let _0x36456b=_0x4b835b[_0x317f2e];return _0x36456b;}export function buildCanonicalAppConfig(_0x31186f,_0x5b7b9d){const _0x2ba4b3=a126_0x372b14,_0x1c55d5=_0x31186f[_0x2ba4b3(0x1ac)](_0x364821=>String(_0x364821||'')['trim']())[_0x2ba4b3(0x1b2)](Boolean);if(_0x1c55d5[_0x2ba4b3(0x1a7)]===0x0)return{};const _0x1d36e7={};for(const _0x58d67f of _0x1c55d5){_0x1d36e7[_0x58d67f]=_0x5b7b9d?{'appcode':_0x58d67f,'env':_0x5b7b9d}:{'appcode':_0x58d67f};}return{'apps':_0x1d36e7,'defaultApp':_0x1c55d5[0x0]};}export function buildCanonicalProjectConfig(_0xb10538,_0x250d8c){const _0x1a8269=a126_0x372b14,{appCodes:appCodes=[],env:_0x127d5a,metadata:_0x154734}=_0x250d8c,_0x48b114={..._0xb10538,..._0x154734||{}};delete _0x48b114[_0x1a8269(0x1c9)],delete _0x48b114[_0x1a8269(0x1b9)];if(_0x127d5a)_0x48b114['env']=_0x127d5a;else!_0x48b114[_0x1a8269(0x1a4)]&&(_0x48b114[_0x1a8269(0x1a4)]=DEFAULT_CONFIG_VALUES[_0x1a8269(0x1a4)]);const _0x4977e1=buildCanonicalAppConfig(appCodes,_0x48b114[_0x1a8269(0x1a4)]);return Object[_0x1a8269(0x1c5)](_0x4977e1)['length']>0x0&&(_0x48b114[_0x1a8269(0x1b0)]=_0x4977e1[_0x1a8269(0x1b0)],_0x48b114[_0x1a8269(0x1ba)]=_0x4977e1['defaultApp']),_0x48b114;}const LOCALE_MAP={'zh':a126_0x372b14(0x1b1),'zh-cn':a126_0x372b14(0x1b1),'zh_cn':a126_0x372b14(0x1b1),'en':a126_0x372b14(0x1a3),'en-us':'en-US','en_us':a126_0x372b14(0x1a3)};export function normalizeLocale(_0x20e252){if(!_0x20e252)return null;return LOCALE_MAP[_0x20e252['toLowerCase']()]??null;}function a126_0x4b83(){const _0x5c8131=['228tybhap','37728oBtTRb','600RYoqKr','en-US','env','120twFweH','join','length','riskLevel','accessKey','number','Target\x20environment','map','apiDir','1705492rykRCr','5nMsXAl','apps','zh-CN','filter','string','format','1222870KVIuvB','has','pageSize','Default\x20page\x20size','app','defaultApp','defaultFormat','Access\x20key','2358132wlXSdX','Locale','263dDnTvX','4653792vumrID','inherit','400981UPGiCT','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','API\x20directory\x20path','keys','cookie','1006AlyRjP','locale','appcode'];a126_0x4b83=function(){return _0x5c8131;};return a126_0x4b83();}
1
+ const a126_0x52207c=a126_0x3496;(function(_0x2817c0,_0x4b7bfb){const _0x44b271=a126_0x3496,_0x1dd957=_0x2817c0();while(!![]){try{const _0x5744fb=parseInt(_0x44b271(0x10e))/0x1+parseInt(_0x44b271(0x107))/0x2+parseInt(_0x44b271(0x12d))/0x3+parseInt(_0x44b271(0x11d))/0x4*(parseInt(_0x44b271(0x119))/0x5)+-parseInt(_0x44b271(0x10a))/0x6*(-parseInt(_0x44b271(0x109))/0x7)+parseInt(_0x44b271(0x115))/0x8+parseInt(_0x44b271(0x126))/0x9*(-parseInt(_0x44b271(0x125))/0xa);if(_0x5744fb===_0x4b7bfb)break;else _0x1dd957['push'](_0x1dd957['shift']());}catch(_0x5161ef){_0x1dd957['push'](_0x1dd957['shift']());}}}(a126_0x449f,0x2b7bf));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=[a126_0x52207c(0x114),a126_0x52207c(0x110),a126_0x52207c(0x112),a126_0x52207c(0x127),a126_0x52207c(0x113)];export const TOP_LEVEL_CONFIG_KEYS=new Set([a126_0x52207c(0x111),'env',a126_0x52207c(0x112),a126_0x52207c(0x127),a126_0x52207c(0x114),'accessKey','apiDir']);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x4fe3c3){return[..._0x4fe3c3]['join'](',\x20');}function a126_0x3496(_0x11f30c,_0x5c5f6a){_0x11f30c=_0x11f30c-0x107;const _0x449f72=a126_0x449f();let _0x3496b7=_0x449f72[_0x11f30c];return _0x3496b7;}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x30d96b){const _0x1722de=a126_0x52207c;return TOP_LEVEL_CONFIG_KEYS[_0x1722de(0x124)](_0x30d96b);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x20d201=a126_0x52207c;return _0x20d201(0x10b)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':a126_0x52207c(0x12c),'apiDir':a126_0x52207c(0x10c),'cookie':a126_0x52207c(0x114),'accessKey':a126_0x52207c(0x110),'defaultFormat':a126_0x52207c(0x127),'pageSize':a126_0x52207c(0x108),'riskLevel':a126_0x52207c(0x113),'locale':a126_0x52207c(0x112)};function a126_0x449f(){const _0x43e4cb=['en-US','Auth\x20cookie','463272UBDrAn','pageSize','321433HjNcNn','24XgQTtA','Config\x20key\x20(','apiDir','inherit','133037OmZpVu','entries','accessKey','appcode','locale','riskLevel','cookie','1642528KwtRGY','length','zh-CN','toLowerCase','5jlHvIf','Target\x20environment','defaultApp','string','1149740qrNyJb','app','Risk\x20level','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','apps','trim','Locale','has','2525200JxaayX','36wajXVe','format','map','defaultFormat','filter','number','env','441273hPDRjK'];a126_0x449f=function(){return _0x43e4cb;};return a126_0x449f();}export function getAppProfileFlagDefs(){const _0x5aea9f=a126_0x52207c;return[{'name':_0x5aea9f(0x12c),'type':_0x5aea9f(0x11c),'description':_0x5aea9f(0x11a),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x5aea9f(0x10c),'type':_0x5aea9f(0x11c),'description':'API\x20directory\x20path'},{'name':_0x5aea9f(0x114),'type':_0x5aea9f(0x11c),'description':_0x5aea9f(0x12f),'hidden':!![]},{'name':_0x5aea9f(0x110),'type':_0x5aea9f(0x11c),'description':'Access\x20key','hidden':!![]},{'name':_0x5aea9f(0x129),'type':'string','description':_0x5aea9f(0x120),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0x5aea9f(0x108),'type':_0x5aea9f(0x12b),'description':'Default\x20page\x20size'},{'name':'riskLevel','type':'string','description':_0x5aea9f(0x11f),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x5aea9f(0x112),'type':'string','description':_0x5aea9f(0x123)}];}export function collectAppProfileOverrides(_0x515cbc){const _0x45fe81=a126_0x52207c,_0xf0ef8a={};for(const [_0x4f1d08,_0x5ed817]of Object[_0x45fe81(0x10f)](APP_PROFILE_FLAG_KEY_MAP)){const _0x12e5a5=_0x515cbc(_0x4f1d08);if(!_0x12e5a5)continue;_0xf0ef8a[_0x5ed817]=_0x5ed817===_0x45fe81(0x108)?Number(_0x12e5a5):_0x12e5a5;}return _0xf0ef8a;}export function buildAppProfileListFields(_0x4de3c5){const _0x9e22ad=a126_0x52207c;return{'env':_0x4de3c5[_0x9e22ad(0x12c)]??null,'apiDir':_0x4de3c5['apiDir']??null,'hasCookie':!!_0x4de3c5['cookie'],'hasAccessKey':!!_0x4de3c5[_0x9e22ad(0x110)],'format':_0x4de3c5['format']??null,'pageSize':_0x4de3c5['pageSize']??null,'riskLevel':_0x4de3c5['riskLevel']??null,'locale':_0x4de3c5[_0x9e22ad(0x112)]??null};}export function buildAppDoctorFields(_0x49f664,_0x4aa8a0){const _0x4896d9=a126_0x52207c;return{'env':{'value':_0x49f664['env']||_0x4aa8a0[_0x4896d9(0x12c)],'source':_0x49f664[_0x4896d9(0x12c)]?_0x4896d9(0x11e):_0x4896d9(0x10d)},'apiDir':{'value':_0x49f664['apiDir']||_0x4aa8a0[_0x4896d9(0x10c)],'source':_0x49f664[_0x4896d9(0x10c)]?_0x4896d9(0x11e):_0x4896d9(0x10d)},'cookie':{'value':_0x49f664[_0x4896d9(0x114)]||_0x4aa8a0[_0x4896d9(0x114)],'source':_0x49f664[_0x4896d9(0x114)]?'app':_0x4896d9(0x10d)},'accessKey':{'value':_0x49f664[_0x4896d9(0x110)]||_0x4aa8a0[_0x4896d9(0x110)],'source':_0x49f664[_0x4896d9(0x110)]?_0x4896d9(0x11e):_0x4896d9(0x10d)}};}export function buildCanonicalAppConfig(_0x4e37a3,_0x2afdc0){const _0x4534b6=a126_0x52207c,_0xa7d13=_0x4e37a3[_0x4534b6(0x128)](_0x271a42=>String(_0x271a42||'')[_0x4534b6(0x122)]())[_0x4534b6(0x12a)](Boolean);if(_0xa7d13[_0x4534b6(0x116)]===0x0)return{};const _0x46688f={};for(const _0x46856f of _0xa7d13){_0x46688f[_0x46856f]=_0x2afdc0?{'appcode':_0x46856f,'env':_0x2afdc0}:{'appcode':_0x46856f};}return{'apps':_0x46688f,'defaultApp':_0xa7d13[0x0]};}export function buildCanonicalProjectConfig(_0xf628f3,_0x488d20){const _0x4ac513=a126_0x52207c,{appCodes:appCodes=[],env:_0x317d8c,metadata:_0x20d0a7}=_0x488d20,_0xff316={..._0xf628f3,..._0x20d0a7||{}};delete _0xff316[_0x4ac513(0x111)],delete _0xff316[_0x4ac513(0x11e)];if(_0x317d8c)_0xff316[_0x4ac513(0x12c)]=_0x317d8c;else!_0xff316['env']&&(_0xff316['env']=DEFAULT_CONFIG_VALUES['env']);const _0x5d2644=buildCanonicalAppConfig(appCodes,_0xff316['env']);return Object['keys'](_0x5d2644)['length']>0x0&&(_0xff316['apps']=_0x5d2644[_0x4ac513(0x121)],_0xff316['defaultApp']=_0x5d2644[_0x4ac513(0x11b)]),_0xff316;}const LOCALE_MAP={'zh':a126_0x52207c(0x117),'zh-cn':a126_0x52207c(0x117),'zh_cn':'zh-CN','en':a126_0x52207c(0x12e),'en-us':a126_0x52207c(0x12e),'en_us':a126_0x52207c(0x12e)};export function normalizeLocale(_0x2d358e){const _0x140f67=a126_0x52207c;if(!_0x2d358e)return null;return LOCALE_MAP[_0x2d358e[_0x140f67(0x118)]()]??null;}
@@ -1 +1 @@
1
- function a127_0x59d7(_0x368f5b,_0x4a6578){_0x368f5b=_0x368f5b-0x6b;const _0x3be024=a127_0x3be0();let _0x59d770=_0x3be024[_0x368f5b];return _0x59d770;}function a127_0x3be0(){const _0xe0c612=['7tTVRaP','12CgGqhu','284PwqAJF','4814TGEnQx','640330XbUPte','18PFEsdO','1232328khnUdN','718434JDYlKk','27435vCWXOM','7558925kowwzK','1667220HuQSFK','156dSxoso'];a127_0x3be0=function(){return _0xe0c612;};return a127_0x3be0();}(function(_0x5ea79c,_0x166d75){const _0xee9f0d=a127_0x59d7,_0x15a138=_0x5ea79c();while(!![]){try{const _0x96fc7b=parseInt(_0xee9f0d(0x72))/0x1*(-parseInt(_0xee9f0d(0x6e))/0x2)+-parseInt(_0xee9f0d(0x76))/0x3+-parseInt(_0xee9f0d(0x71))/0x4*(-parseInt(_0xee9f0d(0x6b))/0x5)+-parseInt(_0xee9f0d(0x6d))/0x6+-parseInt(_0xee9f0d(0x6f))/0x7*(-parseInt(_0xee9f0d(0x75))/0x8)+parseInt(_0xee9f0d(0x74))/0x9*(-parseInt(_0xee9f0d(0x73))/0xa)+-parseInt(_0xee9f0d(0x6c))/0xb*(-parseInt(_0xee9f0d(0x70))/0xc);if(_0x96fc7b===_0x166d75)break;else _0x15a138['push'](_0x15a138['shift']());}catch(_0x27c29a){_0x15a138['push'](_0x15a138['shift']());}}}(a127_0x3be0,0x333df));export const CLI_VERSION_POLICY_URL='https://g.lovrabet.com/dist/rabetbase-cli/config/index.json';
1
+ const a127_0x2cdc94=a127_0x542c;function a127_0x542c(_0x52c6e8,_0x1b818f){_0x52c6e8=_0x52c6e8-0xd6;const _0xffc122=a127_0xffc1();let _0x542c37=_0xffc122[_0x52c6e8];return _0x542c37;}(function(_0x552884,_0x3f18de){const _0x31071c=a127_0x542c,_0x395178=_0x552884();while(!![]){try{const _0x4d475f=-parseInt(_0x31071c(0xdf))/0x1*(parseInt(_0x31071c(0xd7))/0x2)+parseInt(_0x31071c(0xe0))/0x3*(parseInt(_0x31071c(0xda))/0x4)+parseInt(_0x31071c(0xdc))/0x5+-parseInt(_0x31071c(0xdb))/0x6+parseInt(_0x31071c(0xd8))/0x7+-parseInt(_0x31071c(0xdd))/0x8*(parseInt(_0x31071c(0xde))/0x9)+parseInt(_0x31071c(0xe1))/0xa*(parseInt(_0x31071c(0xd9))/0xb);if(_0x4d475f===_0x3f18de)break;else _0x395178['push'](_0x395178['shift']());}catch(_0x482c62){_0x395178['push'](_0x395178['shift']());}}}(a127_0xffc1,0xa02c2));export const CLI_VERSION_POLICY_URL=a127_0x2cdc94(0xd6);function a127_0xffc1(){const _0x1f76a4=['3UYTdRn','3855JPpdvY','90cJAlWU','https://g.lovrabet.com/dist/rabetbase-cli/config/index.json','505714FVwzSw','4326133gNYssJ','564223OfCbSP','3148kFMhqX','4336260azoEaq','6559425CMrlJd','94616PQqOct','963gqvfRu'];a127_0xffc1=function(){return _0x1f76a4;};return a127_0xffc1();}
@@ -1 +1 @@
1
- const a128_0xa9a544=a128_0x1a2c;(function(_0xe657c7,_0x2ebb64){const _0x3c94cd=a128_0x1a2c,_0x2f0ee9=_0xe657c7();while(!![]){try{const _0x2a189a=parseInt(_0x3c94cd(0x215))/0x1*(-parseInt(_0x3c94cd(0x1ea))/0x2)+parseInt(_0x3c94cd(0x227))/0x3+parseInt(_0x3c94cd(0x203))/0x4*(-parseInt(_0x3c94cd(0x222))/0x5)+parseInt(_0x3c94cd(0x220))/0x6*(-parseInt(_0x3c94cd(0x1d6))/0x7)+parseInt(_0x3c94cd(0x22f))/0x8+-parseInt(_0x3c94cd(0x1d5))/0x9+parseInt(_0x3c94cd(0x1d2))/0xa;if(_0x2a189a===_0x2ebb64)break;else _0x2f0ee9['push'](_0x2f0ee9['shift']());}catch(_0x3b1464){_0x2f0ee9['push'](_0x2f0ee9['shift']());}}}(a128_0x2530,0xa3fba));export const CLI_BIN_NAME=a128_0xa9a544(0x200);function a128_0x2530(){const _0x5d36ca=['Function\x20node','Page\x20size','force','rabetbase','map','page','44YVGKho','Type\x20filter','clear','Override\x20appcode','skipImports','Preview\x20operation\x20without\x20executing','Output\x20format','yes','nonInteractive','Code\x20filter','Record\x20ID','enable-bff-save','code','Skip\x20import\x20generation','dry-run','schemas','Target\x20path','json\x20|\x20pretty\x20|\x20compress','1OFpKzE','keyword','JSON\x20params','project','Use\x20global\x20config\x20scope','Force\x20non-interactive\x20mode\x20(CI)','db-id','sqlName','meowKey','env','app','11442wyQEcf','name','324965JGMGxD','SQL\x20code','Rabetbase\x20CLI','verbose','skip-imports','304608SQxLGM','format','SQL\x20string','Name','sql','expected-count','watch','all','7160904mdzzXi','dbId','type','value','sqlname','description','global','appcode','function-node','27055700KrAvsA','Select\x20app\x20profile\x20by\x20name','pagesize','11682846eItrVq','3689HNRwAW','file','Verbose\x20output','params','Confirm\x20destructive\x20action','Operation\x20type','Config\x20key','<code>','operation-type','File\x20path','Show\x20help','<expr>','sql-name','enableBffSave','key','expectedCount','string','sqlcode','non-interactive','SQL\x20name','25078mAqFGL','boolean','help','remote','Force\x20overwrite','Page\x20number','Use\x20remote','title','DB\x20ID','confirm','output','Title','target','datasetcode','production\x20|\x20daily','dryRun','operation','dbid','Clear'];a128_0x2530=function(){return _0x5d36ca;};return a128_0x2530();}export const CLI_DISPLAY_NAME=a128_0xa9a544(0x224);export const NPM_PACKAGE_NAME='@lovrabet/rabetbase-cli';export const GLOBAL_FLAGS=[{'name':a128_0xa9a544(0x1d0),'meowKey':a128_0xa9a544(0x1d0),'type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x206),'hint':a128_0xa9a544(0x1dd)},{'name':'app','meowKey':a128_0xa9a544(0x21f),'type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x1d3),'hint':'<name>'},{'name':'env','meowKey':a128_0xa9a544(0x21e),'type':a128_0xa9a544(0x1e6),'description':'Environment','hint':a128_0xa9a544(0x1f8)},{'name':a128_0xa9a544(0x228),'meowKey':a128_0xa9a544(0x228),'type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x209),'hint':a128_0xa9a544(0x214)},{'name':'jq','meowKey':'jq','type':'string','description':'Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','hint':a128_0xa9a544(0x1e1)},{'name':a128_0xa9a544(0x211),'meowKey':a128_0xa9a544(0x1f9),'type':a128_0xa9a544(0x1eb),'description':a128_0xa9a544(0x208)},{'name':a128_0xa9a544(0x20a),'meowKey':a128_0xa9a544(0x20a),'type':a128_0xa9a544(0x1eb),'description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':a128_0xa9a544(0x1e8),'meowKey':a128_0xa9a544(0x20b),'type':a128_0xa9a544(0x1eb),'description':a128_0xa9a544(0x21a)},{'name':a128_0xa9a544(0x1cf),'meowKey':a128_0xa9a544(0x1cf),'type':'boolean','description':a128_0xa9a544(0x219)},{'name':a128_0xa9a544(0x218),'meowKey':a128_0xa9a544(0x218),'type':a128_0xa9a544(0x1eb),'description':'Use\x20project\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a128_0xa9a544(0x1eb),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':'help','meowKey':a128_0xa9a544(0x1ec),'type':a128_0xa9a544(0x1eb),'description':a128_0xa9a544(0x1e0)},{'name':'name','meowKey':a128_0xa9a544(0x221),'type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x22a),'hidden':!![]},{'name':a128_0xa9a544(0x1f1),'meowKey':'title','type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x1f5),'hidden':!![]},{'name':a128_0xa9a544(0x205),'meowKey':a128_0xa9a544(0x205),'type':a128_0xa9a544(0x1eb),'description':a128_0xa9a544(0x1fc),'hidden':!![]},{'name':a128_0xa9a544(0x22d),'meowKey':a128_0xa9a544(0x22d),'type':a128_0xa9a544(0x1eb),'description':'Watch\x20mode','hidden':!![]},{'name':a128_0xa9a544(0x1f4),'meowKey':a128_0xa9a544(0x1f4),'type':a128_0xa9a544(0x1e6),'description':'Output\x20path','hidden':!![]},{'name':'params','meowKey':a128_0xa9a544(0x1d9),'type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x217),'hidden':!![]},{'name':a128_0xa9a544(0x1f7),'meowKey':a128_0xa9a544(0x1f7),'type':a128_0xa9a544(0x1e6),'description':'Dataset\x20code','hidden':!![]},{'name':a128_0xa9a544(0x22e),'meowKey':a128_0xa9a544(0x22e),'type':a128_0xa9a544(0x1eb),'description':'Apply\x20to\x20all','hidden':!![]},{'name':a128_0xa9a544(0x20e),'meowKey':a128_0xa9a544(0x1e3),'type':a128_0xa9a544(0x1eb),'description':'Enable\x20BFF\x20save','hidden':!![]},{'name':'id','meowKey':'id','type':'string','description':a128_0xa9a544(0x20d),'hidden':!![]},{'name':a128_0xa9a544(0x1cb),'meowKey':a128_0xa9a544(0x1cb),'type':'string','description':a128_0xa9a544(0x204),'hidden':!![]},{'name':'file','meowKey':a128_0xa9a544(0x1d7),'type':'string','description':a128_0xa9a544(0x1df),'hidden':!![]},{'name':a128_0xa9a544(0x1e7),'meowKey':'sqlcode','type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x223),'hidden':!![]},{'name':a128_0xa9a544(0x1e2),'meowKey':a128_0xa9a544(0x21c),'type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x1e9),'hidden':!![]},{'name':a128_0xa9a544(0x1cd),'meowKey':'sqlname','type':a128_0xa9a544(0x1e6),'description':'SQL\x20name','hidden':!![]},{'name':a128_0xa9a544(0x21b),'meowKey':a128_0xa9a544(0x230),'type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x1f2),'hidden':!![]},{'name':a128_0xa9a544(0x1fb),'meowKey':'dbid','type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x1f2),'hidden':!![]},{'name':a128_0xa9a544(0x1ce),'meowKey':'description','type':'string','description':'Description','hidden':!![]},{'name':'description-file','meowKey':'descriptionFile','type':a128_0xa9a544(0x1e6),'description':'Description\x20file','hidden':!![]},{'name':a128_0xa9a544(0x202),'meowKey':a128_0xa9a544(0x202),'type':'string','description':a128_0xa9a544(0x1ef),'hidden':!![]},{'name':'pagesize','meowKey':a128_0xa9a544(0x1d4),'type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x1fe),'hidden':!![]},{'name':a128_0xa9a544(0x216),'meowKey':a128_0xa9a544(0x216),'type':'string','description':'Keyword\x20filter','hidden':!![]},{'name':'code','meowKey':a128_0xa9a544(0x20f),'type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x20c),'hidden':!![]},{'name':'sql','meowKey':a128_0xa9a544(0x22b),'type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x229),'hidden':!![]},{'name':a128_0xa9a544(0x212),'meowKey':a128_0xa9a544(0x212),'type':'string','description':'Schemas','hidden':!![]},{'name':a128_0xa9a544(0x1fa),'meowKey':a128_0xa9a544(0x1fa),'type':'string','description':a128_0xa9a544(0x1db),'hidden':!![]},{'name':a128_0xa9a544(0x1f6),'meowKey':a128_0xa9a544(0x1f6),'type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x213),'hidden':!![]},{'name':a128_0xa9a544(0x226),'meowKey':a128_0xa9a544(0x207),'type':a128_0xa9a544(0x1eb),'description':a128_0xa9a544(0x210),'hidden':!![]},{'name':a128_0xa9a544(0x1e4),'meowKey':a128_0xa9a544(0x1e4),'type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x1dc),'hidden':!![]},{'name':a128_0xa9a544(0x1cc),'meowKey':a128_0xa9a544(0x1cc),'type':a128_0xa9a544(0x1e6),'description':'Config\x20value','hidden':!![]},{'name':a128_0xa9a544(0x1ff),'meowKey':a128_0xa9a544(0x1ff),'type':'boolean','description':a128_0xa9a544(0x1ee),'hidden':!![]},{'name':'confirm','meowKey':a128_0xa9a544(0x1f3),'type':a128_0xa9a544(0x1eb),'description':a128_0xa9a544(0x1da),'hidden':!![]},{'name':a128_0xa9a544(0x1ed),'meowKey':a128_0xa9a544(0x1ed),'type':a128_0xa9a544(0x1eb),'description':a128_0xa9a544(0x1f0),'hidden':!![]},{'name':a128_0xa9a544(0x225),'meowKey':a128_0xa9a544(0x225),'type':a128_0xa9a544(0x1eb),'description':a128_0xa9a544(0x1d8),'hidden':!![]},{'name':a128_0xa9a544(0x22c),'meowKey':a128_0xa9a544(0x1e5),'type':a128_0xa9a544(0x1e6),'description':'Expected\x20affected\x20count','hidden':!![]},{'name':a128_0xa9a544(0x1de),'meowKey':'operationType','type':a128_0xa9a544(0x1e6),'description':'Operation\x20type','hidden':!![]},{'name':a128_0xa9a544(0x1d1),'meowKey':'functionNode','type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x1fd),'hidden':!![]}];function a128_0x1a2c(_0xdaddb3,_0x2d58c2){_0xdaddb3=_0xdaddb3-0x1cb;const _0x2530b6=a128_0x2530();let _0x1a2c72=_0x2530b6[_0xdaddb3];return _0x1a2c72;}export const PIPELINE_FLAG_NAMES=new Set([a128_0xa9a544(0x1d0),a128_0xa9a544(0x21f),a128_0xa9a544(0x21e),a128_0xa9a544(0x228),'jq',a128_0xa9a544(0x211),'yes',a128_0xa9a544(0x1e8),'ci']);export function buildMeowFlags(){const _0x58fde6=a128_0xa9a544;return Object['fromEntries'](GLOBAL_FLAGS[_0x58fde6(0x201)](_0x2c9e3e=>[_0x2c9e3e[_0x58fde6(0x21d)],{'type':_0x2c9e3e['type']}]));}
1
+ function a128_0x47dd(){const _0xc3ef9a=['verbose','operationType','output','function-node','target','pagesize','Description\x20file','key','db-id','52420dbDSWy','dbid','7oFPvtG','production\x20|\x20daily','Title','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','Code\x20filter','format','SQL\x20string','global','Force\x20overwrite','Override\x20appcode','type','sqlname','Dataset\x20code','all','sql','Config\x20value','dbId','@lovrabet/rabetbase-cli','JSON\x20params','Confirm\x20destructive\x20action','datasetcode','value','Name','page','nonInteractive','file','env','Preview\x20operation\x20without\x20executing','Clear','skip-imports','Type\x20filter','File\x20path','title','yes','Skip\x20import\x20generation','description-file','confirm','name','Use\x20remote','Page\x20size','DB\x20ID','expected-count','non-interactive','Skip\x20confirmation\x20for\x20high-risk\x20writes','Select\x20app\x20profile\x20by\x20name','dryRun','operation','13543060gfQSQW','fromEntries','Expected\x20affected\x20count','app','boolean','dry-run','string','description','params','Operation\x20type','map','clear','SQL\x20code','sqlcode','Alias\x20for\x20--non-interactive','1109262TbLVKm','Page\x20number','remote','1032816pSDsOn','8986752FOeoxs','meowKey','SQL\x20name','appcode','Description','force','help','1439135nTLqGO','schemas','Rabetbase\x20CLI','descriptionFile','project','Schemas','129PecCCS','Enable\x20BFF\x20save','<code>','skipImports','Output\x20format','watch','Target\x20path','18uHTIBC','keyword','Verbose\x20output','enable-bff-save','code','1092600ynbxbS'];a128_0x47dd=function(){return _0xc3ef9a;};return a128_0x47dd();}const a128_0x2dc4d4=a128_0x4d9c;(function(_0x3ac0ce,_0x97c1f7){const _0x44e4da=a128_0x4d9c,_0x379a61=_0x3ac0ce();while(!![]){try{const _0x5c9f2d=parseInt(_0x44e4da(0x156))/0x1+parseInt(_0x44e4da(0x1ba))/0x2+parseInt(_0x44e4da(0x164))/0x3*(-parseInt(_0x44e4da(0x17a))/0x4)+-parseInt(_0x44e4da(0x15e))/0x5*(parseInt(_0x44e4da(0x16b))/0x6)+-parseInt(_0x44e4da(0x17c))/0x7*(-parseInt(_0x44e4da(0x170))/0x8)+-parseInt(_0x44e4da(0x157))/0x9+parseInt(_0x44e4da(0x1ab))/0xa;if(_0x5c9f2d===_0x97c1f7)break;else _0x379a61['push'](_0x379a61['shift']());}catch(_0x146cb1){_0x379a61['push'](_0x379a61['shift']());}}}(a128_0x47dd,0x9f604));export const CLI_BIN_NAME='rabetbase';export const CLI_DISPLAY_NAME=a128_0x2dc4d4(0x160);export const NPM_PACKAGE_NAME=a128_0x2dc4d4(0x18d);export const GLOBAL_FLAGS=[{'name':a128_0x2dc4d4(0x15a),'meowKey':a128_0x2dc4d4(0x15a),'type':a128_0x2dc4d4(0x1b1),'description':a128_0x2dc4d4(0x185),'hint':a128_0x2dc4d4(0x166)},{'name':'app','meowKey':a128_0x2dc4d4(0x1ae),'type':'string','description':a128_0x2dc4d4(0x1a8),'hint':'<name>'},{'name':'env','meowKey':a128_0x2dc4d4(0x196),'type':a128_0x2dc4d4(0x1b1),'description':'Environment','hint':a128_0x2dc4d4(0x17d)},{'name':a128_0x2dc4d4(0x181),'meowKey':'format','type':'string','description':a128_0x2dc4d4(0x168),'hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':a128_0x2dc4d4(0x1b1),'description':a128_0x2dc4d4(0x17f),'hint':'<expr>'},{'name':a128_0x2dc4d4(0x1b0),'meowKey':a128_0x2dc4d4(0x1a9),'type':a128_0x2dc4d4(0x1af),'description':a128_0x2dc4d4(0x197)},{'name':a128_0x2dc4d4(0x19d),'meowKey':a128_0x2dc4d4(0x19d),'type':a128_0x2dc4d4(0x1af),'description':a128_0x2dc4d4(0x1a7)},{'name':a128_0x2dc4d4(0x1a6),'meowKey':a128_0x2dc4d4(0x194),'type':a128_0x2dc4d4(0x1af),'description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':a128_0x2dc4d4(0x183),'meowKey':a128_0x2dc4d4(0x183),'type':a128_0x2dc4d4(0x1af),'description':'Use\x20global\x20config\x20scope'},{'name':a128_0x2dc4d4(0x162),'meowKey':a128_0x2dc4d4(0x162),'type':a128_0x2dc4d4(0x1af),'description':'Use\x20project\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a128_0x2dc4d4(0x1af),'description':a128_0x2dc4d4(0x1b9),'hidden':!![]},{'name':a128_0x2dc4d4(0x15d),'meowKey':a128_0x2dc4d4(0x15d),'type':a128_0x2dc4d4(0x1af),'description':'Show\x20help'},{'name':'name','meowKey':a128_0x2dc4d4(0x1a1),'type':a128_0x2dc4d4(0x1b1),'description':a128_0x2dc4d4(0x192),'hidden':!![]},{'name':a128_0x2dc4d4(0x19c),'meowKey':a128_0x2dc4d4(0x19c),'type':a128_0x2dc4d4(0x1b1),'description':a128_0x2dc4d4(0x17e),'hidden':!![]},{'name':'clear','meowKey':a128_0x2dc4d4(0x1b6),'type':'boolean','description':a128_0x2dc4d4(0x198),'hidden':!![]},{'name':a128_0x2dc4d4(0x169),'meowKey':a128_0x2dc4d4(0x169),'type':a128_0x2dc4d4(0x1af),'description':'Watch\x20mode','hidden':!![]},{'name':'output','meowKey':a128_0x2dc4d4(0x173),'type':a128_0x2dc4d4(0x1b1),'description':'Output\x20path','hidden':!![]},{'name':'params','meowKey':a128_0x2dc4d4(0x1b3),'type':'string','description':a128_0x2dc4d4(0x18e),'hidden':!![]},{'name':a128_0x2dc4d4(0x190),'meowKey':a128_0x2dc4d4(0x190),'type':'string','description':a128_0x2dc4d4(0x188),'hidden':!![]},{'name':a128_0x2dc4d4(0x189),'meowKey':a128_0x2dc4d4(0x189),'type':a128_0x2dc4d4(0x1af),'description':'Apply\x20to\x20all','hidden':!![]},{'name':a128_0x2dc4d4(0x16e),'meowKey':'enableBffSave','type':a128_0x2dc4d4(0x1af),'description':a128_0x2dc4d4(0x165),'hidden':!![]},{'name':'id','meowKey':'id','type':a128_0x2dc4d4(0x1b1),'description':'Record\x20ID','hidden':!![]},{'name':a128_0x2dc4d4(0x186),'meowKey':a128_0x2dc4d4(0x186),'type':'string','description':a128_0x2dc4d4(0x19a),'hidden':!![]},{'name':'file','meowKey':a128_0x2dc4d4(0x195),'type':a128_0x2dc4d4(0x1b1),'description':a128_0x2dc4d4(0x19b),'hidden':!![]},{'name':a128_0x2dc4d4(0x1b8),'meowKey':a128_0x2dc4d4(0x1b8),'type':a128_0x2dc4d4(0x1b1),'description':a128_0x2dc4d4(0x1b7),'hidden':!![]},{'name':'sql-name','meowKey':'sqlName','type':a128_0x2dc4d4(0x1b1),'description':a128_0x2dc4d4(0x159),'hidden':!![]},{'name':a128_0x2dc4d4(0x187),'meowKey':a128_0x2dc4d4(0x187),'type':'string','description':'SQL\x20name','hidden':!![]},{'name':a128_0x2dc4d4(0x179),'meowKey':a128_0x2dc4d4(0x18c),'type':'string','description':a128_0x2dc4d4(0x1a4),'hidden':!![]},{'name':a128_0x2dc4d4(0x17b),'meowKey':a128_0x2dc4d4(0x17b),'type':a128_0x2dc4d4(0x1b1),'description':a128_0x2dc4d4(0x1a4),'hidden':!![]},{'name':a128_0x2dc4d4(0x1b2),'meowKey':'description','type':'string','description':a128_0x2dc4d4(0x15b),'hidden':!![]},{'name':a128_0x2dc4d4(0x19f),'meowKey':a128_0x2dc4d4(0x161),'type':a128_0x2dc4d4(0x1b1),'description':a128_0x2dc4d4(0x177),'hidden':!![]},{'name':'page','meowKey':a128_0x2dc4d4(0x193),'type':a128_0x2dc4d4(0x1b1),'description':a128_0x2dc4d4(0x1bb),'hidden':!![]},{'name':a128_0x2dc4d4(0x176),'meowKey':a128_0x2dc4d4(0x176),'type':a128_0x2dc4d4(0x1b1),'description':a128_0x2dc4d4(0x1a3),'hidden':!![]},{'name':a128_0x2dc4d4(0x16c),'meowKey':a128_0x2dc4d4(0x16c),'type':a128_0x2dc4d4(0x1b1),'description':'Keyword\x20filter','hidden':!![]},{'name':a128_0x2dc4d4(0x16f),'meowKey':a128_0x2dc4d4(0x16f),'type':a128_0x2dc4d4(0x1b1),'description':a128_0x2dc4d4(0x180),'hidden':!![]},{'name':'sql','meowKey':a128_0x2dc4d4(0x18a),'type':a128_0x2dc4d4(0x1b1),'description':a128_0x2dc4d4(0x182),'hidden':!![]},{'name':'schemas','meowKey':a128_0x2dc4d4(0x15f),'type':a128_0x2dc4d4(0x1b1),'description':a128_0x2dc4d4(0x163),'hidden':!![]},{'name':a128_0x2dc4d4(0x1aa),'meowKey':a128_0x2dc4d4(0x1aa),'type':a128_0x2dc4d4(0x1b1),'description':'Operation\x20type','hidden':!![]},{'name':a128_0x2dc4d4(0x175),'meowKey':a128_0x2dc4d4(0x175),'type':a128_0x2dc4d4(0x1b1),'description':a128_0x2dc4d4(0x16a),'hidden':!![]},{'name':a128_0x2dc4d4(0x199),'meowKey':a128_0x2dc4d4(0x167),'type':'boolean','description':a128_0x2dc4d4(0x19e),'hidden':!![]},{'name':a128_0x2dc4d4(0x178),'meowKey':a128_0x2dc4d4(0x178),'type':'string','description':'Config\x20key','hidden':!![]},{'name':a128_0x2dc4d4(0x191),'meowKey':'value','type':a128_0x2dc4d4(0x1b1),'description':a128_0x2dc4d4(0x18b),'hidden':!![]},{'name':a128_0x2dc4d4(0x15c),'meowKey':a128_0x2dc4d4(0x15c),'type':a128_0x2dc4d4(0x1af),'description':a128_0x2dc4d4(0x184),'hidden':!![]},{'name':a128_0x2dc4d4(0x1a0),'meowKey':a128_0x2dc4d4(0x1a0),'type':a128_0x2dc4d4(0x1af),'description':a128_0x2dc4d4(0x18f),'hidden':!![]},{'name':a128_0x2dc4d4(0x155),'meowKey':a128_0x2dc4d4(0x155),'type':'boolean','description':a128_0x2dc4d4(0x1a2),'hidden':!![]},{'name':a128_0x2dc4d4(0x171),'meowKey':a128_0x2dc4d4(0x171),'type':a128_0x2dc4d4(0x1af),'description':a128_0x2dc4d4(0x16d),'hidden':!![]},{'name':a128_0x2dc4d4(0x1a5),'meowKey':'expectedCount','type':a128_0x2dc4d4(0x1b1),'description':a128_0x2dc4d4(0x1ad),'hidden':!![]},{'name':'operation-type','meowKey':a128_0x2dc4d4(0x172),'type':'string','description':a128_0x2dc4d4(0x1b4),'hidden':!![]},{'name':a128_0x2dc4d4(0x174),'meowKey':'functionNode','type':a128_0x2dc4d4(0x1b1),'description':'Function\x20node','hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set(['appcode',a128_0x2dc4d4(0x1ae),a128_0x2dc4d4(0x196),'format','jq',a128_0x2dc4d4(0x1b0),a128_0x2dc4d4(0x19d),'non-interactive','ci']);function a128_0x4d9c(_0x4dc740,_0x5b5ae2){_0x4dc740=_0x4dc740-0x155;const _0x47ddd5=a128_0x47dd();let _0x4d9c2f=_0x47ddd5[_0x4dc740];return _0x4d9c2f;}export function buildMeowFlags(){const _0x163594=a128_0x2dc4d4;return Object[_0x163594(0x1ac)](GLOBAL_FLAGS[_0x163594(0x1b5)](_0x2ee2b3=>[_0x2ee2b3[_0x163594(0x158)],{'type':_0x2ee2b3['type']}]));}
@@ -1 +1 @@
1
- const a129_0x55d12=a129_0xe95f;(function(_0x499686,_0x592d17){const _0x1249e5=a129_0xe95f,_0x3e4eb1=_0x499686();while(!![]){try{const _0x517885=parseInt(_0x1249e5(0x1a7))/0x1+-parseInt(_0x1249e5(0x1ac))/0x2+parseInt(_0x1249e5(0x1aa))/0x3*(parseInt(_0x1249e5(0x1b3))/0x4)+parseInt(_0x1249e5(0x1a6))/0x5+-parseInt(_0x1249e5(0x1b0))/0x6*(-parseInt(_0x1249e5(0x1af))/0x7)+parseInt(_0x1249e5(0x1a5))/0x8*(-parseInt(_0x1249e5(0x1ab))/0x9)+-parseInt(_0x1249e5(0x1b1))/0xa*(-parseInt(_0x1249e5(0x1a8))/0xb);if(_0x517885===_0x592d17)break;else _0x3e4eb1['push'](_0x3e4eb1['shift']());}catch(_0x3493cf){_0x3e4eb1['push'](_0x3e4eb1['shift']());}}}(a129_0x284a,0x6137b));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a129_0x55d12(0x1a9),'format':a129_0x55d12(0x1ad),'locale':a129_0x55d12(0x1b2),'riskLevel':a129_0x55d12(0x1ae),'apiDir':DEFAULT_API_DIR};function a129_0x284a(){const _0x3a0e63=['3663usImHL','1404498EnIckr','compress','high-risk-write','7WrUEnW','3706338txMouU','250oCoUze','en-US','697108efFquF','15256JUPupE','1691245PNYfKA','648677fzMqvP','42977OGDxiQ','production','3qSXrDh'];a129_0x284a=function(){return _0x3a0e63;};return a129_0x284a();}function a129_0xe95f(_0x54c1b8,_0x2edc58){_0x54c1b8=_0x54c1b8-0x1a5;const _0x284a5c=a129_0x284a();let _0xe95f19=_0x284a5c[_0x54c1b8];return _0xe95f19;}export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';
1
+ const a129_0x16316a=a129_0x4578;(function(_0x2f273f,_0x188125){const _0x269f3a=a129_0x4578,_0x423904=_0x2f273f();while(!![]){try{const _0x486fda=parseInt(_0x269f3a(0x6d))/0x1+-parseInt(_0x269f3a(0x70))/0x2+parseInt(_0x269f3a(0x76))/0x3+-parseInt(_0x269f3a(0x74))/0x4*(-parseInt(_0x269f3a(0x77))/0x5)+parseInt(_0x269f3a(0x71))/0x6*(-parseInt(_0x269f3a(0x72))/0x7)+parseInt(_0x269f3a(0x75))/0x8+-parseInt(_0x269f3a(0x6f))/0x9;if(_0x486fda===_0x188125)break;else _0x423904['push'](_0x423904['shift']());}catch(_0x23518d){_0x423904['push'](_0x423904['shift']());}}}(a129_0x1b40,0x97700));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':'production','format':'compress','locale':a129_0x16316a(0x73),'riskLevel':a129_0x16316a(0x6e),'apiDir':DEFAULT_API_DIR};function a129_0x1b40(){const _0x58ae5d=['7RgFqZP','en-US','16sIlDti','3803280DAuJwc','1343100XYwnCc','486120DfsdJf','compress','644042ijhHnp','high-risk-write','6030261TioJuc','1122588gnOswM','626622NiMfDF'];a129_0x1b40=function(){return _0x58ae5d;};return a129_0x1b40();}function a129_0x4578(_0x25b879,_0x7f0a00){_0x25b879=_0x25b879-0x6c;const _0x1b4022=a129_0x1b40();let _0x4578e7=_0x1b4022[_0x25b879];return _0x4578e7;}export const DEFAULT_COMMAND_OUTPUT_FORMAT=a129_0x16316a(0x6c);
@@ -1 +1 @@
1
- function a130_0x1aeb(_0x48a759,_0x27639c){_0x48a759=_0x48a759-0xf7;const _0x59b82f=a130_0x59b8();let _0x1aeb13=_0x59b82f[_0x48a759];return _0x1aeb13;}const a130_0x3e50d4=a130_0x1aeb;(function(_0x65be3d,_0x163cbc){const _0x38f9e0=a130_0x1aeb,_0xa4bbaf=_0x65be3d();while(!![]){try{const _0x50ac6d=-parseInt(_0x38f9e0(0xf8))/0x1+parseInt(_0x38f9e0(0xf9))/0x2+-parseInt(_0x38f9e0(0x106))/0x3*(parseInt(_0x38f9e0(0xfe))/0x4)+-parseInt(_0x38f9e0(0x107))/0x5*(-parseInt(_0x38f9e0(0xfa))/0x6)+parseInt(_0x38f9e0(0xff))/0x7*(-parseInt(_0x38f9e0(0x109))/0x8)+-parseInt(_0x38f9e0(0xf7))/0x9*(-parseInt(_0x38f9e0(0x101))/0xa)+-parseInt(_0x38f9e0(0x105))/0xb*(-parseInt(_0x38f9e0(0xfb))/0xc);if(_0x50ac6d===_0x163cbc)break;else _0xa4bbaf['push'](_0xa4bbaf['shift']());}catch(_0x413193){_0xa4bbaf['push'](_0xa4bbaf['shift']());}}}(a130_0x59b8,0xcd9ee));import{getEnv,isProduction}from'../constant/env.js';function a130_0x59b8(){const _0x177977=['23620uENnsc','https://user-daily.lovrabet.com','8xEyflP','9MVxkqf','1001090uCBHUS','242362bbWYyL','78pdyNbT','15184140KiFArI','runtimeDomain','apiDomain','4iSNXtw','8685999qJcBeL','https://daily-runtime.lovrabet.com','473630BkGZtP','https://daily-api.lovrabet.com','https://runtime.lovrabet.com','https://user.lovrabet.com','33eFHcYg','2825466gcLnrL'];a130_0x59b8=function(){return _0x177977;};return a130_0x59b8();}let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0xbbfab9){const _0xeb1b45=a130_0x1aeb;customApiDomain=_0xbbfab9?.[_0xeb1b45(0xfd)],customUserDomain=_0xbbfab9?.['userDomain'],customRuntimeDomain=_0xbbfab9?.[_0xeb1b45(0xfc)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a130_0x3e50d4(0x104):a130_0x3e50d4(0x108));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?'https://api.lovrabet.com':a130_0x3e50d4(0x102));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a130_0x3e50d4(0x103):a130_0x3e50d4(0x100));
1
+ const a130_0x85f8e4=a130_0x4025;(function(_0x17ed9f,_0x287be8){const _0x57c580=a130_0x4025,_0x70aa6d=_0x17ed9f();while(!![]){try{const _0x3b4994=parseInt(_0x57c580(0x1ab))/0x1+parseInt(_0x57c580(0x1ac))/0x2+parseInt(_0x57c580(0x1a9))/0x3+parseInt(_0x57c580(0x1b1))/0x4*(-parseInt(_0x57c580(0x1b6))/0x5)+parseInt(_0x57c580(0x1b7))/0x6+parseInt(_0x57c580(0x1b3))/0x7*(-parseInt(_0x57c580(0x1b4))/0x8)+-parseInt(_0x57c580(0x1b5))/0x9*(parseInt(_0x57c580(0x1af))/0xa);if(_0x3b4994===_0x287be8)break;else _0x70aa6d['push'](_0x70aa6d['shift']());}catch(_0x477bec){_0x70aa6d['push'](_0x70aa6d['shift']());}}}(a130_0x5b41,0x53b98));function a130_0x5b41(){const _0x2a8614=['runtimeDomain','680cVzFQm','userDomain','409160gQGyhU','https://user-daily.lovrabet.com','21553GHNjfP','1264XsVUws','36126pdrRQK','10waOEkF','1437606NTKZst','https://runtime.lovrabet.com','1080786uGYXpC','https://daily-api.lovrabet.com','186861MyBTxH','1040452MWXwSf','https://daily-runtime.lovrabet.com'];a130_0x5b41=function(){return _0x2a8614;};return a130_0x5b41();}import{getEnv,isProduction}from'../constant/env.js';function a130_0x4025(_0x1b317b,_0x2b6557){_0x1b317b=_0x1b317b-0x1a9;const _0x5b4139=a130_0x5b41();let _0x402575=_0x5b4139[_0x1b317b];return _0x402575;}let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x226807){const _0x5e4c16=a130_0x4025;customApiDomain=_0x226807?.['apiDomain'],customUserDomain=_0x226807?.[_0x5e4c16(0x1b0)],customRuntimeDomain=_0x226807?.[_0x5e4c16(0x1ae)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?'https://user.lovrabet.com':a130_0x85f8e4(0x1b2));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?'https://api.lovrabet.com':a130_0x85f8e4(0x1aa));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a130_0x85f8e4(0x1b8):a130_0x85f8e4(0x1ad));
@@ -1 +1 @@
1
- const a131_0x4ff3ee=a131_0x46ed;(function(_0x312544,_0x224318){const _0x560617=a131_0x46ed,_0x2dc7d3=_0x312544();while(!![]){try{const _0x2f6180=-parseInt(_0x560617(0xb7))/0x1*(-parseInt(_0x560617(0xb4))/0x2)+parseInt(_0x560617(0xb6))/0x3+-parseInt(_0x560617(0xb8))/0x4+-parseInt(_0x560617(0xb5))/0x5+-parseInt(_0x560617(0xbb))/0x6+parseInt(_0x560617(0xbd))/0x7*(parseInt(_0x560617(0xb9))/0x8)+parseInt(_0x560617(0xba))/0x9;if(_0x2f6180===_0x224318)break;else _0x2dc7d3['push'](_0x2dc7d3['shift']());}catch(_0x1e0c91){_0x2dc7d3['push'](_0x2dc7d3['shift']());}}}(a131_0x1711,0xcf76d));export const RABETBASE_ENV_VALUES=[a131_0x4ff3ee(0xbe),a131_0x4ff3ee(0xbf)];export function normalizeEnv(_0x9c5c5c){const _0xc490=a131_0x4ff3ee;return _0x9c5c5c===_0xc490(0xb3)?_0xc490(0xbe):_0x9c5c5c;}export function isProduction(_0x1cda3d){const _0x1e7e51=a131_0x4ff3ee;return normalizeEnv(_0x1cda3d)===_0x1e7e51(0xbe);}export function isDaily(_0x1bf1b9){const _0x53aa74=a131_0x4ff3ee;return normalizeEnv(_0x1bf1b9)===_0x53aa74(0xbf);}function a131_0x1711(){const _0x2bc1e0=['21060918uflDWZ','3333906zjHskZ','development','7DPxLhn','production','daily','online','60dLuVoI','7802800FTYWwc','223095iceisl','28799Icgljz','1502888VYVMCM','506152GyYhez'];a131_0x1711=function(){return _0x2bc1e0;};return a131_0x1711();}export function isDev(_0x15b340){const _0x105b30=a131_0x4ff3ee,_0x5dfda7=normalizeEnv(_0x15b340);return _0x5dfda7===_0x105b30(0xbc)||_0x5dfda7==='dev';}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a131_0x4ff3ee(0xbe));function a131_0x46ed(_0x4da2c2,_0x46bd62){_0x4da2c2=_0x4da2c2-0xb3;const _0x171152=a131_0x1711();let _0x46ed48=_0x171152[_0x4da2c2];return _0x46ed48;}export function getEnv(){return env;}export function initEnv(_0x3dc522){env=normalizeEnv(_0x3dc522);}
1
+ const a131_0x7d281=a131_0x21e1;function a131_0x4b59(){const _0x5b1a16=['development','96913KjZBub','1381041pxHAnb','production','1736912XQeYLq','4465AtUphU','4oBVEpO','1746oYtaCJ','26829JbbFAs','daily','2110LLpaPI','497163YiMSiq','online','72424yBCCIr','7yRQqWI'];a131_0x4b59=function(){return _0x5b1a16;};return a131_0x4b59();}(function(_0x14a02b,_0x1b94e4){const _0x30099e=a131_0x21e1,_0x131491=_0x14a02b();while(!![]){try{const _0x2aea81=-parseInt(_0x30099e(0x199))/0x1+-parseInt(_0x30099e(0x196))/0x2+parseInt(_0x30099e(0x194))/0x3*(parseInt(_0x30099e(0x19e))/0x4)+-parseInt(_0x30099e(0x19d))/0x5*(-parseInt(_0x30099e(0x19f))/0x6)+-parseInt(_0x30099e(0x197))/0x7*(-parseInt(_0x30099e(0x19c))/0x8)+parseInt(_0x30099e(0x19a))/0x9+parseInt(_0x30099e(0x1a2))/0xa*(-parseInt(_0x30099e(0x1a0))/0xb);if(_0x2aea81===_0x1b94e4)break;else _0x131491['push'](_0x131491['shift']());}catch(_0x3d7dd7){_0x131491['push'](_0x131491['shift']());}}}(a131_0x4b59,0x243a9));export const RABETBASE_ENV_VALUES=['production',a131_0x7d281(0x1a1)];export function normalizeEnv(_0x269be5){const _0x246dd5=a131_0x7d281;return _0x269be5===_0x246dd5(0x195)?_0x246dd5(0x19b):_0x269be5;}function a131_0x21e1(_0x5a4c33,_0x595941){_0x5a4c33=_0x5a4c33-0x194;const _0x4b59ab=a131_0x4b59();let _0x21e1b8=_0x4b59ab[_0x5a4c33];return _0x21e1b8;}export function isProduction(_0x47a289){const _0x48f6f3=a131_0x7d281;return normalizeEnv(_0x47a289)===_0x48f6f3(0x19b);}export function isDaily(_0x246554){return normalizeEnv(_0x246554)==='daily';}export function isDev(_0x3f4f0b){const _0x52bb26=a131_0x7d281,_0x2855e3=normalizeEnv(_0x3f4f0b);return _0x2855e3===_0x52bb26(0x198)||_0x2855e3==='dev';}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a131_0x7d281(0x19b));export function getEnv(){return env;}export function initEnv(_0x3d7d2f){env=normalizeEnv(_0x3d7d2f);}
@@ -1 +1 @@
1
- const a132_0x3c90dc=a132_0x1f4f;function a132_0x1f4f(_0x3fae1b,_0xedd0ed){_0x3fae1b=_0x3fae1b-0x1ad;const _0xc58492=a132_0xc584();let _0x1f4f9b=_0xc58492[_0x3fae1b];return _0x1f4f9b;}(function(_0x4f7353,_0x53e1b7){const _0x4612b0=a132_0x1f4f,_0x58b046=_0x4f7353();while(!![]){try{const _0x38eaa1=parseInt(_0x4612b0(0x1b4))/0x1+-parseInt(_0x4612b0(0x1af))/0x2*(parseInt(_0x4612b0(0x1ad))/0x3)+parseInt(_0x4612b0(0x1b7))/0x4+parseInt(_0x4612b0(0x1b9))/0x5*(-parseInt(_0x4612b0(0x1b3))/0x6)+-parseInt(_0x4612b0(0x1b8))/0x7*(-parseInt(_0x4612b0(0x1ae))/0x8)+parseInt(_0x4612b0(0x1b0))/0x9+-parseInt(_0x4612b0(0x1b5))/0xa*(parseInt(_0x4612b0(0x1b6))/0xb);if(_0x38eaa1===_0x53e1b7)break;else _0x58b046['push'](_0x58b046['shift']());}catch(_0x2b6a22){_0x58b046['push'](_0x58b046['shift']());}}}(a132_0xc584,0x50fa5));export const RABETBASE_OUTPUT_FORMAT_VALUES=['json',a132_0x3c90dc(0x1b2),a132_0x3c90dc(0x1b1)];function a132_0xc584(){const _0x3544d2=['5774uEJbXc','5211468nxawAa','compress','pretty','6OueDpQ','457150qhKOqw','237620Ymychx','451dfmVXK','1806180uTJvuL','1022XHnhYH','3214985EXfgKU','63kftcsI','28592VKmPVV'];a132_0xc584=function(){return _0x3544d2;};return a132_0xc584();}
1
+ function a132_0x4b8c(_0x4c172a,_0x202964){_0x4c172a=_0x4c172a-0x73;const _0x373dc1=a132_0x373d();let _0x4b8c2e=_0x373dc1[_0x4c172a];return _0x4b8c2e;}const a132_0x234921=a132_0x4b8c;(function(_0x243556,_0x4e215a){const _0x43ff61=a132_0x4b8c,_0x1419c0=_0x243556();while(!![]){try{const _0x374e0f=-parseInt(_0x43ff61(0x7d))/0x1*(parseInt(_0x43ff61(0x75))/0x2)+parseInt(_0x43ff61(0x76))/0x3+parseInt(_0x43ff61(0x79))/0x4*(-parseInt(_0x43ff61(0x74))/0x5)+-parseInt(_0x43ff61(0x7a))/0x6+parseInt(_0x43ff61(0x78))/0x7+-parseInt(_0x43ff61(0x7b))/0x8+parseInt(_0x43ff61(0x7c))/0x9*(parseInt(_0x43ff61(0x77))/0xa);if(_0x374e0f===_0x4e215a)break;else _0x1419c0['push'](_0x1419c0['shift']());}catch(_0x50027c){_0x1419c0['push'](_0x1419c0['shift']());}}}(a132_0x373d,0xbd5b5));export const RABETBASE_OUTPUT_FORMAT_VALUES=[a132_0x234921(0x7e),'pretty',a132_0x234921(0x73)];function a132_0x373d(){const _0x7e7fb8=['26171720JlJJFr','3684478IgbwIN','29576iRrWGh','1769556UUQDsx','7620392bMpvMJ','9VOBFlK','2382XAEplf','json','compress','965igDcwK','122kVdnyW','1355694FPIDsl'];a132_0x373d=function(){return _0x7e7fb8;};return a132_0x373d();}
@@ -1 +1 @@
1
- function a133_0x1408(){const _0x56a0c2=['894958eWLnNA','10YPtnAy','33629652VLwiiT','332200pMCsJM','2573488KvNIFW','./src/api','2zKQlsA','3431442USQjja','8642334MEVfGq','16XHXNcN','2112687MFhlas'];a133_0x1408=function(){return _0x56a0c2;};return a133_0x1408();}const a133_0x2942c8=a133_0x5e6d;(function(_0x3de435,_0x30826e){const _0x527e6b=a133_0x5e6d,_0x28ea21=_0x3de435();while(!![]){try{const _0x1d36e2=parseInt(_0x527e6b(0x94))/0x1*(parseInt(_0x527e6b(0x99))/0x2)+parseInt(_0x527e6b(0x98))/0x3+parseInt(_0x527e6b(0x9d))/0x4+-parseInt(_0x527e6b(0x9c))/0x5+parseInt(_0x527e6b(0x96))/0x6+parseInt(_0x527e6b(0x95))/0x7*(parseInt(_0x527e6b(0x97))/0x8)+parseInt(_0x527e6b(0x9b))/0x9*(-parseInt(_0x527e6b(0x9a))/0xa);if(_0x1d36e2===_0x30826e)break;else _0x28ea21['push'](_0x28ea21['shift']());}catch(_0x49c827){_0x28ea21['push'](_0x28ea21['shift']());}}}(a133_0x1408,0xd2084));function a133_0x5e6d(_0x1dc6be,_0x54fd92){_0x1dc6be=_0x1dc6be-0x93;const _0x14085a=a133_0x1408();let _0x5e6da5=_0x14085a[_0x1dc6be];return _0x5e6da5;}export const DEFAULT_API_DIR=a133_0x2942c8(0x93);
1
+ const a133_0x38c349=a133_0xc20b;function a133_0x5dab(){const _0x432b24=['8752920dmYyMa','1270psbmRU','19156nqfRde','./src/api','6DOfBax','8036630LoeMUF','5711990oUDAFC','101VPNBYg','44937WRDHfI','925336uWoGVc','133008qeWcsq','116XLhdeY'];a133_0x5dab=function(){return _0x432b24;};return a133_0x5dab();}function a133_0xc20b(_0x588aa5,_0x3e1282){_0x588aa5=_0x588aa5-0xe8;const _0x5dab28=a133_0x5dab();let _0xc20b38=_0x5dab28[_0x588aa5];return _0xc20b38;}(function(_0x3bfc8a,_0x1a58eb){const _0x25c2bf=a133_0xc20b,_0x556cfa=_0x3bfc8a();while(!![]){try{const _0x26d133=-parseInt(_0x25c2bf(0xe8))/0x1*(-parseInt(_0x25c2bf(0xef))/0x2)+parseInt(_0x25c2bf(0xeb))/0x3*(-parseInt(_0x25c2bf(0xec))/0x4)+parseInt(_0x25c2bf(0xf3))/0x5*(parseInt(_0x25c2bf(0xf1))/0x6)+parseInt(_0x25c2bf(0xf2))/0x7+parseInt(_0x25c2bf(0xea))/0x8+-parseInt(_0x25c2bf(0xe9))/0x9*(parseInt(_0x25c2bf(0xee))/0xa)+-parseInt(_0x25c2bf(0xed))/0xb;if(_0x26d133===_0x1a58eb)break;else _0x556cfa['push'](_0x556cfa['shift']());}catch(_0x3caa21){_0x556cfa['push'](_0x556cfa['shift']());}}}(a133_0x5dab,0xa0a26));export const DEFAULT_API_DIR=a133_0x38c349(0xf0);
@@ -1 +1 @@
1
- const a134_0x153c41=a134_0x54e5;(function(_0x432f1e,_0x5b4fcd){const _0x31f029=a134_0x54e5,_0x457cd9=_0x432f1e();while(!![]){try{const _0x16d074=-parseInt(_0x31f029(0x106))/0x1*(parseInt(_0x31f029(0x10f))/0x2)+-parseInt(_0x31f029(0x104))/0x3+-parseInt(_0x31f029(0x10c))/0x4+-parseInt(_0x31f029(0x10d))/0x5*(-parseInt(_0x31f029(0x108))/0x6)+-parseInt(_0x31f029(0x10b))/0x7*(-parseInt(_0x31f029(0x10e))/0x8)+-parseInt(_0x31f029(0x10a))/0x9+parseInt(_0x31f029(0x105))/0xa;if(_0x16d074===_0x5b4fcd)break;else _0x457cd9['push'](_0x457cd9['shift']());}catch(_0x271d68){_0x457cd9['push'](_0x457cd9['shift']());}}}(a134_0x359a,0x21a33));function a134_0x359a(){const _0x375145=['1816ZwHgye','269396qPfpoH','801975uMFqtk','4993100SpYFne','1oYrmtL','write','6bUgzVE','read','115542jVzXvA','3934dtfNGc','393100gLJvmG','120155HWwtvd'];a134_0x359a=function(){return _0x375145;};return a134_0x359a();}function a134_0x54e5(_0x41aed4,_0x9a42c0){_0x41aed4=_0x41aed4-0x104;const _0x359a78=a134_0x359a();let _0x54e52a=_0x359a78[_0x41aed4];return _0x54e52a;}export const RISK_LEVEL_VALUES=[a134_0x153c41(0x109),a134_0x153c41(0x107),'high-risk-write'];
1
+ const a134_0x266009=a134_0x43a8;(function(_0x4466e3,_0x417089){const _0xbe670c=a134_0x43a8,_0xb58e24=_0x4466e3();while(!![]){try{const _0x26fff6=-parseInt(_0xbe670c(0x89))/0x1*(-parseInt(_0xbe670c(0x8b))/0x2)+-parseInt(_0xbe670c(0x8f))/0x3*(parseInt(_0xbe670c(0x92))/0x4)+-parseInt(_0xbe670c(0x8d))/0x5+-parseInt(_0xbe670c(0x91))/0x6*(-parseInt(_0xbe670c(0x90))/0x7)+parseInt(_0xbe670c(0x8a))/0x8+parseInt(_0xbe670c(0x94))/0x9+parseInt(_0xbe670c(0x95))/0xa*(parseInt(_0xbe670c(0x8e))/0xb);if(_0x26fff6===_0x417089)break;else _0xb58e24['push'](_0xb58e24['shift']());}catch(_0x2bc2c9){_0xb58e24['push'](_0xb58e24['shift']());}}}(a134_0xacc0,0xdc8d9));export const RISK_LEVEL_VALUES=[a134_0x266009(0x93),a134_0x266009(0x8c),'high-risk-write'];function a134_0x43a8(_0x3b33cc,_0x5cdc08){_0x3b33cc=_0x3b33cc-0x89;const _0xacc031=a134_0xacc0();let _0x43a8fc=_0xacc031[_0x3b33cc];return _0x43a8fc;}function a134_0xacc0(){const _0xb0912c=['20mBBZgt','read','3571569KutWet','69130UlyMdO','57973HuuCYQ','6324224EyEXcV','10HvMEmQ','write','5518725DwJULm','407CZmLkW','913449rlCdsf','12575710llDnmC','6WTECSZ'];a134_0xacc0=function(){return _0xb0912c;};return a134_0xacc0();}