@lovrabet/rabetbase-cli 2.1.9 → 2.1.10-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (197) 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/field-update.js +1 -0
  54. package/lib/commands/dataset/index.js +1 -1
  55. package/lib/commands/dataset/link-create.js +1 -1
  56. package/lib/commands/dataset/link-delete.js +1 -1
  57. package/lib/commands/dataset/link-shared.js +1 -1
  58. package/lib/commands/dataset/link-update.js +1 -1
  59. package/lib/commands/dataset/links.js +1 -1
  60. package/lib/commands/dataset/list.js +1 -1
  61. package/lib/commands/dataset/operations.js +1 -1
  62. package/lib/commands/db/analyze-cancel.js +1 -1
  63. package/lib/commands/db/analyze-start.js +1 -1
  64. package/lib/commands/db/analyze-status.js +1 -1
  65. package/lib/commands/db/create.js +1 -1
  66. package/lib/commands/db/delete.js +1 -1
  67. package/lib/commands/db/detail.js +1 -1
  68. package/lib/commands/db/diff.js +1 -1
  69. package/lib/commands/db/index.js +1 -1
  70. package/lib/commands/db/list.js +1 -1
  71. package/lib/commands/db/shared.js +1 -1
  72. package/lib/commands/db/tables.js +1 -1
  73. package/lib/commands/db/test.js +1 -1
  74. package/lib/commands/db/update.js +1 -1
  75. package/lib/commands/doctor.js +1 -1
  76. package/lib/commands/init/index.js +1 -1
  77. package/lib/commands/issue/index.js +1 -1
  78. package/lib/commands/issue/report.js +1 -1
  79. package/lib/commands/logs/index.js +1 -1
  80. package/lib/commands/menu/index.js +1 -1
  81. package/lib/commands/menu/shared/compare-table.js +1 -1
  82. package/lib/commands/menu/shared/index.js +1 -1
  83. package/lib/commands/menu/shared/inquirer.js +1 -1
  84. package/lib/commands/menu/shared/local-pages.js +1 -1
  85. package/lib/commands/menu/shared/logic.js +1 -1
  86. package/lib/commands/menu/shared/service.js +1 -1
  87. package/lib/commands/menu/shared/sync-core.js +1 -1
  88. package/lib/commands/menu/shared/update-core.js +1 -1
  89. package/lib/commands/menu/shared/valid-url.js +1 -1
  90. package/lib/commands/menu/sync.js +1 -1
  91. package/lib/commands/menu/update.js +1 -1
  92. package/lib/commands/page/generate-start.js +1 -1
  93. package/lib/commands/page/generate-status.js +1 -1
  94. package/lib/commands/page/index.js +1 -1
  95. package/lib/commands/page/pull.js +1 -1
  96. package/lib/commands/page/push.js +1 -1
  97. package/lib/commands/page/shared.js +1 -1
  98. package/lib/commands/page/standard-page-status.js +1 -1
  99. package/lib/commands/page/sync.js +1 -1
  100. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  101. package/lib/commands/project/create/format-elapsed.js +1 -1
  102. package/lib/commands/project/create/main.js +1 -1
  103. package/lib/commands/project/create/non-interactive.js +1 -1
  104. package/lib/commands/project/create/project-template-path.js +1 -1
  105. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  106. package/lib/commands/project/create/use-format-code.js +1 -1
  107. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  108. package/lib/commands/project/index.js +1 -1
  109. package/lib/commands/project/init.js +1 -1
  110. package/lib/commands/project/upgrade.js +1 -1
  111. package/lib/commands/registry.js +1 -1
  112. package/lib/commands/run/index.js +1 -1
  113. package/lib/commands/schema.js +1 -1
  114. package/lib/commands/skill/index.js +1 -1
  115. package/lib/commands/sql/create.js +1 -1
  116. package/lib/commands/sql/delete.js +1 -1
  117. package/lib/commands/sql/detail.js +1 -1
  118. package/lib/commands/sql/exec.js +1 -1
  119. package/lib/commands/sql/index.js +1 -1
  120. package/lib/commands/sql/list.js +1 -1
  121. package/lib/commands/sql/pull.js +1 -1
  122. package/lib/commands/sql/push.js +1 -1
  123. package/lib/commands/sql/save.js +1 -1
  124. package/lib/commands/sql/shared.js +1 -1
  125. package/lib/commands/sql/status.js +1 -1
  126. package/lib/commands/sql/validate.js +1 -1
  127. package/lib/config/schema.js +1 -1
  128. package/lib/constant/cdn.js +1 -1
  129. package/lib/constant/cli.js +1 -1
  130. package/lib/constant/defaults.js +1 -1
  131. package/lib/constant/domain.js +1 -1
  132. package/lib/constant/env.js +1 -1
  133. package/lib/constant/output.js +1 -1
  134. package/lib/constant/paths.js +1 -1
  135. package/lib/constant/risk.js +1 -1
  136. package/lib/context.js +1 -1
  137. package/lib/core/alias-resolver.js +1 -1
  138. package/lib/core/api-client.js +1 -1
  139. package/lib/core/bff/config.js +1 -1
  140. package/lib/core/bff/file-system.js +1 -1
  141. package/lib/core/bff/hash.js +1 -1
  142. package/lib/core/bff/lock.js +1 -1
  143. package/lib/core/bff/utils.js +1 -1
  144. package/lib/core/db-resolver.js +1 -1
  145. package/lib/core/page/file-system.js +1 -1
  146. package/lib/core/page/hash.js +1 -1
  147. package/lib/core/page/lock.js +1 -1
  148. package/lib/core/sql-sync/config.js +1 -1
  149. package/lib/core/sql-sync/file-system.js +1 -1
  150. package/lib/core/sql-sync/hash.js +1 -1
  151. package/lib/core/sql-sync/lock.js +1 -1
  152. package/lib/core/sql-sync/utils.js +1 -1
  153. package/lib/core/sql-validator.js +1 -1
  154. package/lib/errors.js +1 -1
  155. package/lib/framework/build-all-flags.js +1 -1
  156. package/lib/framework/flags.js +1 -1
  157. package/lib/framework/help.js +1 -1
  158. package/lib/framework/index.js +1 -1
  159. package/lib/framework/output.js +1 -1
  160. package/lib/framework/response.js +1 -1
  161. package/lib/framework/runner-alias.js +1 -1
  162. package/lib/framework/runner.js +1 -1
  163. package/lib/framework/schema-export.js +1 -1
  164. package/lib/framework/types.js +1 -1
  165. package/lib/generated/build-info.js +1 -1
  166. package/lib/help.js +1 -1
  167. package/lib/skills/main.js +1 -1
  168. package/lib/skills/npx-skills-add.js +1 -1
  169. package/lib/telemetry/cli-command-trace.js +1 -1
  170. package/lib/telemetry/cli-help-trace.js +1 -1
  171. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  172. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  173. package/lib/telemetry/send-cli-trace-log.js +1 -1
  174. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  175. package/lib/utils/ai_config.js +1 -1
  176. package/lib/utils/apply-jq-filter.js +1 -1
  177. package/lib/utils/cdn-config.js +1 -1
  178. package/lib/utils/check-sdk-version.js +1 -1
  179. package/lib/utils/cli-version-check.js +1 -1
  180. package/lib/utils/cli-version-policy.js +1 -1
  181. package/lib/utils/config.js +1 -1
  182. package/lib/utils/copy-directory.js +1 -1
  183. package/lib/utils/entity-with-id.js +1 -1
  184. package/lib/utils/file-utils.js +1 -1
  185. package/lib/utils/guides-cdn.js +1 -1
  186. package/lib/utils/http-client.js +1 -1
  187. package/lib/utils/is-non-interactive.js +1 -1
  188. package/lib/utils/logger.js +1 -1
  189. package/lib/utils/params.js +1 -1
  190. package/lib/utils/platform.js +1 -1
  191. package/lib/utils/rules-cdn.js +1 -1
  192. package/lib/utils/sleep.js +1 -1
  193. package/lib/utils/template-replacer.js +1 -1
  194. package/lib/utils/version.js +1 -1
  195. package/lib/utils/with-active-cookie.js +1 -1
  196. package/lib/utils/write-cli-side-channel.js +1 -1
  197. package/package.json +2 -1
@@ -1 +1 @@
1
- const a120_0x5bda34=a120_0x3f66;(function(_0x2a9746,_0xc5633c){const _0x240a83=a120_0x3f66,_0x5115c4=_0x2a9746();while(!![]){try{const _0x46d33b=parseInt(_0x240a83(0x20d))/0x1*(-parseInt(_0x240a83(0x1e7))/0x2)+-parseInt(_0x240a83(0x1e6))/0x3+parseInt(_0x240a83(0x201))/0x4+-parseInt(_0x240a83(0x1e5))/0x5+-parseInt(_0x240a83(0x225))/0x6*(parseInt(_0x240a83(0x204))/0x7)+parseInt(_0x240a83(0x1eb))/0x8*(-parseInt(_0x240a83(0x1fb))/0x9)+parseInt(_0x240a83(0x223))/0xa;if(_0x46d33b===_0xc5633c)break;else _0x5115c4['push'](_0x5115c4['shift']());}catch(_0x48d81f){_0x5115c4['push'](_0x5115c4['shift']());}}}(a120_0x3794,0xc9a34));import{readFile,rm,writeFile}from'node:fs/promises';import{join}from'node:path';import{getSqlQueryDetail,listSqlQueries}from'../../core/api-client.js';function a120_0x3f66(_0x224227,_0x4a62ba){_0x224227=_0x224227-0x1e3;const _0x3794dd=a120_0x3794();let _0x3f6607=_0x3794dd[_0x224227];return _0x3f6607;}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(_0x453d42,_0x11f6b3){const _0x38d57c=a120_0x3f66,_0x330d38=[];let _0xa6680a=0x1;while(!![]){const _0x82a2ba=await listSqlQueries(_0x453d42,{'currentPage':_0xa6680a,'pageSize':PAGE_SIZE,'sqlCode':_0x11f6b3[_0x38d57c(0x1f8)],'sqlName':_0x11f6b3[_0x38d57c(0x1f4)]}),_0xc1f96c=_0x82a2ba['tableData']??[];_0x330d38[_0x38d57c(0x210)](..._0xc1f96c);if(_0xc1f96c[_0x38d57c(0x208)]===0x0)break;const _0xfbadd3=_0x82a2ba[_0x38d57c(0x220)]?.[_0x38d57c(0x1f0)];if(_0xfbadd3!=null?_0x330d38[_0x38d57c(0x208)]>=_0xfbadd3:_0xc1f96c[_0x38d57c(0x208)]<PAGE_SIZE)break;_0xa6680a++;}return _0x330d38;}async function ensureSqlContent(_0x57439c){const _0x23bfac=a120_0x3f66;if(_0x57439c[_0x23bfac(0x218)]!=null&&String(_0x57439c[_0x23bfac(0x218)])[_0x23bfac(0x208)]>0x0)return _0x57439c;return getSqlQueryDetail(_0x57439c[_0x23bfac(0x1f8)]);}export const sqlPull={'service':'sql','command':'pull','description':a120_0x5bda34(0x1ee),'risk':a120_0x5bda34(0x214),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a120_0x5bda34(0x216),'type':a120_0x5bda34(0x21d),'description':a120_0x5bda34(0x1fd)},{'name':a120_0x5bda34(0x1f2),'type':a120_0x5bda34(0x1f9),'description':a120_0x5bda34(0x222)}],async 'dryRun'(_0x382cbf){const _0x330a03=a120_0x5bda34,_0x46a784=loadSqlProjectConfig(_0x382cbf[_0x330a03(0x1f5)]),_0x42a900=await readSqlLockFile(_0x46a784['lockFilePath']),{appLock:_0x189f7c}=ensureSqlLockScope(_0x42a900??createEmptySqlLock(),_0x46a784[_0x330a03(0x1f5)],_0x46a784[_0x330a03(0x21a)],_0x330a03(0x1ff)),_0x406fb5=await fetchAllSqlQueries(_0x382cbf[_0x330a03(0x1f5)],{'sqlCode':_0x382cbf['str'](_0x330a03(0x219))||undefined,'sqlName':_0x382cbf[_0x330a03(0x1ef)](_0x330a03(0x216))||undefined}),_0x532913=[];for(const _0x19d590 of _0x406fb5){const _0x18255f=await ensureSqlContent(_0x19d590),_0x5bcfe6=ensureRemoteSqlContent(_0x18255f),_0x43ebb5=detectModeFromSql(_0x18255f),_0x3a122d=_0x18255f[_0x330a03(0x1e4)]?await getDbName(_0x382cbf['appCode'],Number(_0x18255f[_0x330a03(0x1e4)]))[_0x330a03(0x215)](()=>undefined):undefined,_0xe05460=buildLocalSqlFileContent({'sqlCode':_0x18255f[_0x330a03(0x1f8)],'sqlName':_0x18255f[_0x330a03(0x1f4)],'dbId':_0x18255f[_0x330a03(0x1e4)]},_0x5bcfe6,{'dbName':_0x3a122d,'mode':_0x43ebb5,'syncedAt':new Date()[_0x330a03(0x209)](),'description':_0x18255f[_0x330a03(0x20b)]}),_0x344e04=buildSqlLockEntry(_0x18255f,_0x5bcfe6,'',{'dbName':_0x3a122d}),_0x5e105b=resolveLocalSqlFilePath(_0x46a784,_0x18255f['sqlCode'],_0x344e04);let _0x5dfb3e=_0x330a03(0x202),_0x4b506a;if(await fileExists(_0x5e105b)){const _0x4974d3=await readFile(_0x5e105b,_0x330a03(0x1f7));isEquivalentPulledSqlFile(_0x4974d3,_0xe05460,_0x43ebb5)?(_0x5dfb3e=_0x330a03(0x217),_0x4b506a=_0x330a03(0x1fe)):(_0x5dfb3e=_0x330a03(0x207),_0x4b506a=_0x330a03(0x205));}_0x532913['push']({'sqlCode':_0x18255f[_0x330a03(0x1f8)],'sqlName':_0x18255f[_0x330a03(0x1f4)],'filePath':_0x5e105b,'status':_0x5dfb3e,'reason':_0x4b506a});}return{'method':_0x330a03(0x1fa),'url':'/smartapi/custom/queryUserCustomSqlList\x20+\x20/smartapi/custom/getUserCustomSql','body':{'appCode':_0x382cbf[_0x330a03(0x1f5)],'sqlCode':_0x382cbf[_0x330a03(0x1ef)](_0x330a03(0x219))||null,'sqlName':_0x382cbf[_0x330a03(0x1ef)](_0x330a03(0x216))||null,'files':_0x532913},'description':'Would\x20pull\x20'+_0x532913[_0x330a03(0x208)]+_0x330a03(0x1e9)+_0x46a784[_0x330a03(0x1f1)]};},async 'execute'(_0x4b749d){const _0x31579c=a120_0x5bda34,_0x289249=loadSqlProjectConfig(_0x4b749d[_0x31579c(0x1f5)]),_0x41b30a=await readSqlLockFile(_0x289249[_0x31579c(0x1f3)]),{lockData:_0x3a116d,appLock:_0x300120}=ensureSqlLockScope(_0x41b30a??createEmptySqlLock(),_0x289249[_0x31579c(0x1f5)],_0x289249[_0x31579c(0x21a)],_0x31579c(0x1ff)),_0x422c2d=_0x4b749d[_0x31579c(0x221)](_0x31579c(0x1f2)),_0x4d7bcc=await fetchAllSqlQueries(_0x4b749d[_0x31579c(0x1f5)],{'sqlCode':_0x4b749d[_0x31579c(0x1ef)](_0x31579c(0x219))||undefined,'sqlName':_0x4b749d[_0x31579c(0x1ef)](_0x31579c(0x216))||undefined});if(_0x4d7bcc[_0x31579c(0x208)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x31579c(0x21c)};const _0x5133d1=[],_0x2ea1b1=[];for(const _0x578c53 of _0x4d7bcc){try{_0x5133d1['push'](await ensureSqlContent(_0x578c53));}catch(_0x579d20){_0x2ea1b1[_0x31579c(0x210)]({'sqlCode':_0x578c53['sqlCode'],'error':_0x579d20 instanceof Error?_0x579d20[_0x31579c(0x1fc)]:String(_0x579d20)});}}if(_0x422c2d&&!_0x4b749d[_0x31579c(0x20c)]){let _0x183522=![];for(const _0x171793 of _0x5133d1){const _0x5ea632=detectModeFromSql(_0x171793),_0x1a0018=_0x171793[_0x31579c(0x1e4)]?await getDbName(_0x4b749d['appCode'],Number(_0x171793[_0x31579c(0x1e4)]))[_0x31579c(0x215)](()=>undefined):undefined,_0x2f8771=buildLocalSqlFileContent({'sqlCode':_0x171793[_0x31579c(0x1f8)],'sqlName':_0x171793[_0x31579c(0x1f4)],'dbId':_0x171793['dbId']},ensureRemoteSqlContent(_0x171793),{'dbName':_0x1a0018,'mode':_0x5ea632,'syncedAt':new Date()[_0x31579c(0x209)](),'description':_0x171793[_0x31579c(0x20b)]}),_0x40b6a1=resolveLocalSqlFilePath(_0x289249,_0x171793['sqlCode'],buildSqlLockEntry(_0x171793,ensureRemoteSqlContent(_0x171793),'',{'dbName':_0x1a0018}));if(await fileExists(_0x40b6a1)){const _0x4cff03=await readFile(_0x40b6a1,_0x31579c(0x1f7));if(!isEquivalentPulledSqlFile(_0x4cff03,_0x2f8771,_0x5ea632)){_0x183522=!![];break;}}}if(_0x183522){const _0xad85f2=await confirmForceOverwrite('Force\x20pull\x20will\x20overwrite\x20local\x20SQL\x20that\x20differs\x20from\x20remote.');if(!_0xad85f2)throw CliErrors[_0x31579c(0x1ec)](_0x31579c(0x1f6));}}const _0x226754=cloneSqlLockData(_0x3a116d),_0xcd2919=_0x226754[_0x31579c(0x200)][_0x289249[_0x31579c(0x1f5)]],_0x4275d0=[],_0x3ad743=[];for(const _0x4110cb of _0x5133d1){const _0x5c80d6=_0xcd2919['sqls'][_0x4110cb[_0x31579c(0x1f8)]],_0x53e275=ensureRemoteSqlContent(_0x4110cb),_0x42fa6a=detectModeFromSql(_0x4110cb),_0x57f5cf=_0x4110cb['dbId']?await getDbName(_0x4b749d[_0x31579c(0x1f5)],Number(_0x4110cb[_0x31579c(0x1e4)]))[_0x31579c(0x215)](()=>undefined):undefined,_0x4a2c32=buildLocalSqlFileContent({'sqlCode':_0x4110cb[_0x31579c(0x1f8)],'sqlName':_0x4110cb[_0x31579c(0x1f4)],'dbId':_0x4110cb[_0x31579c(0x1e4)]},_0x53e275,{'dbName':_0x57f5cf,'mode':_0x42fa6a,'syncedAt':new Date()[_0x31579c(0x209)](),'description':_0x4110cb[_0x31579c(0x20b)]}),_0xde1cb=buildSqlLockEntry(_0x4110cb,_0x53e275,computeSqlContentHash(_0x4a2c32),{'dbName':_0x57f5cf}),_0x30606f=_0xde1cb[_0x31579c(0x1e3)],_0x553850=join(_0x289249[_0x31579c(0x1f1)],_0x30606f);try{if(await fileExists(_0x553850)){const _0x5e23b4=await readFile(_0x553850,'utf8');if(isEquivalentPulledSqlFile(_0x5e23b4,_0x4a2c32,_0x42fa6a)){_0x3ad743[_0x31579c(0x210)]({'sqlCode':_0x4110cb[_0x31579c(0x1f8)],'reason':_0x31579c(0x1fe)}),_0xcd2919['sqls'][_0x4110cb[_0x31579c(0x1f8)]]={..._0xde1cb,'hash':computeSqlContentHash(_0x5e23b4),'path':_0x30606f};continue;}if(!_0x422c2d){_0x3ad743[_0x31579c(0x210)]({'sqlCode':_0x4110cb[_0x31579c(0x1f8)],'reason':_0x31579c(0x211)});continue;}}const _0x1eb960=_0x5c80d6?.[_0x31579c(0x1e3)]?join(_0x289249[_0x31579c(0x1f1)],_0x5c80d6['path']):undefined;_0x1eb960&&_0x1eb960!==_0x553850&&await fileExists(_0x1eb960)&&await rm(_0x1eb960,{'force':!![]}),await ensureParentDirectory(_0x553850),await writeFile(_0x553850,_0x4a2c32,_0x31579c(0x1f7)),_0xcd2919[_0x31579c(0x20e)][_0x4110cb[_0x31579c(0x1f8)]]={..._0xde1cb,'path':_0x30606f},_0x4275d0[_0x31579c(0x210)]({'sqlCode':_0x4110cb[_0x31579c(0x1f8)],'filePath':_0x553850});}catch(_0x934e7){_0x2ea1b1[_0x31579c(0x210)]({'sqlCode':_0x4110cb[_0x31579c(0x1f8)],'error':_0x934e7 instanceof Error?_0x934e7[_0x31579c(0x1fc)]:String(_0x934e7)});}}return _0xcd2919[_0x31579c(0x20a)]=new Date()[_0x31579c(0x209)](),await writeSqlLockFile(_0x289249[_0x31579c(0x1f3)],_0x226754),{'ok':_0x2ea1b1[_0x31579c(0x208)]===0x0,'data':{'pulled':_0x4275d0,'skipped':_0x3ad743,'failed':_0x2ea1b1},'message':_0x31579c(0x224)+_0x4275d0['length']+_0x31579c(0x21b)+_0x3ad743[_0x31579c(0x208)]+_0x31579c(0x1e8)+_0x2ea1b1[_0x31579c(0x208)]+_0x31579c(0x1ea)};}};function detectModeFromSql(_0x28a0ba){const _0x3174ac=a120_0x5bda34,_0x58fd97=ensureRemoteSqlContent(_0x28a0ba),_0x237e43=stripLocalSqlMetadata(_0x58fd97,'mybatisXml')[_0x3174ac(0x212)]();if(/^<(select|insert|update|delete)\b/i['test'](_0x237e43))return _0x3174ac(0x203);return _0x3174ac(0x213);}function a120_0x3794(){const _0x31d3b6=['72432VLlkSD','6NcQxTO','\x20skipped,\x20','\x20SQL\x20file(s)\x20into\x20','\x20failed','1432PZJIDD','cancelled','split','Pull\x20remote\x20SQL\x20queries\x20to\x20local\x20.rabetbase/sql/','str','totalCount','sqlRootDir','force','lockFilePath','sqlName','appCode','Force\x20pull\x20cancelled.','utf8','sqlCode','boolean','POST','55899IHcLrB','message','Filter\x20by\x20SQL\x20display\x20name','unchanged','pull','apps','4248396iCBnJN','would_pull','mybatisXml','416948DibGsa','local\x20differs\x20from\x20remote\x20(use\x20--force\x20to\x20overwrite)','filter','conflict','length','toISOString','lastSync','description','nonInteractive','42597pBLRDg','sqls','join','push','local\x20differs\x20from\x20remote','trimStart','sql','write','catch','name','skipped','sqlContent','sqlcode','sqlRoot','\x20written,\x20','No\x20remote\x20SQL\x20queries\x20matched.','string','replace','test','paging','bool','Force\x20overwrite\x20local\x20unsynced\x20changes','21130050VEjPQs','Pull\x20complete:\x20','36kGWSRK','path','dbId','3640540LYyjqn'];a120_0x3794=function(){return _0x31d3b6;};return a120_0x3794();}function isEquivalentPulledSqlFile(_0x1b0750,_0x299575,_0x3e099e){return normalizePullComparableContent(_0x1b0750,_0x3e099e)===normalizePullComparableContent(_0x299575,_0x3e099e);}function normalizePullComparableContent(_0x17e1a8,_0x414db3){const _0x11928d=a120_0x5bda34,_0xbc1a82=_0x17e1a8[_0x11928d(0x21e)](/\r\n/g,'\x0a')[_0x11928d(0x1ed)]('\x0a'),_0x3359aa=_0xbc1a82[_0x11928d(0x206)](_0x20a07b=>!isSyncedAtMetadataLine(_0x20a07b,_0x414db3));return _0x3359aa[_0x11928d(0x20f)]('\x0a');}function isSyncedAtMetadataLine(_0x41bebf,_0x307136){const _0x1d409a=a120_0x5bda34;if(_0x307136===_0x1d409a(0x203))return/^\s*<!--\s*@lovrabet\.syncedAt:/[_0x1d409a(0x21f)](_0x41bebf);return/^\s*--\s*@lovrabet\.syncedAt:/['test'](_0x41bebf);}
1
+ const a121_0xb8ffa6=a121_0x1de3;(function(_0x397860,_0x366394){const _0x35ae64=a121_0x1de3,_0x4ca59c=_0x397860();while(!![]){try{const _0x26aa9b=-parseInt(_0x35ae64(0x17f))/0x1+parseInt(_0x35ae64(0x179))/0x2+parseInt(_0x35ae64(0x17d))/0x3+parseInt(_0x35ae64(0x161))/0x4*(-parseInt(_0x35ae64(0x175))/0x5)+-parseInt(_0x35ae64(0x18e))/0x6+parseInt(_0x35ae64(0x192))/0x7*(-parseInt(_0x35ae64(0x15f))/0x8)+parseInt(_0x35ae64(0x190))/0x9;if(_0x26aa9b===_0x366394)break;else _0x4ca59c['push'](_0x4ca59c['shift']());}catch(_0x46802a){_0x4ca59c['push'](_0x4ca59c['shift']());}}}(a121_0xcd25,0x83bb8));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';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(_0x40891c,_0x3da9bc){const _0x211da6=a121_0x1de3,_0x1740fb=[];let _0x22def3=0x1;while(!![]){const _0x58e118=await listSqlQueries(_0x40891c,{'currentPage':_0x22def3,'pageSize':PAGE_SIZE,'sqlCode':_0x3da9bc['sqlCode'],'sqlName':_0x3da9bc[_0x211da6(0x182)]}),_0x59e36f=_0x58e118[_0x211da6(0x171)]??[];_0x1740fb['push'](..._0x59e36f);if(_0x59e36f[_0x211da6(0x17a)]===0x0)break;const _0x4ac7fb=_0x58e118['paging']?.['totalCount'];if(_0x4ac7fb!=null?_0x1740fb[_0x211da6(0x17a)]>=_0x4ac7fb:_0x59e36f[_0x211da6(0x17a)]<PAGE_SIZE)break;_0x22def3++;}return _0x1740fb;}function a121_0xcd25(){const _0xe6296e=['trimStart','test','split','Force\x20overwrite\x20local\x20unsynced\x20changes','\x20written,\x20','appCode','sqlContent','str','pull','sqlRoot','cancelled','sqls','skipped','local\x20differs\x20from\x20remote\x20(use\x20--force\x20to\x20overwrite)','tableData','path','push','sqlcode','5QUMyAb','No\x20remote\x20SQL\x20queries\x20matched.','description','nonInteractive','269146gzHTAt','length','name','sql','58482GFHnWN','write','590282pVGNoG','string','apps','sqlName','\x20SQL\x20file(s)\x20into\x20','utf8','filter','mybatisXml','bool','POST','Pull\x20complete:\x20','toISOString','sqlRootDir','unchanged','\x20skipped,\x20','3402714lurJCP','Force\x20pull\x20cancelled.','29895876eVwlqg','lockFilePath','497psBtaP','lastSync','catch','conflict','replace','dbId','message','sqlCode','101176hqgQij','Force\x20pull\x20will\x20overwrite\x20local\x20SQL\x20that\x20differs\x20from\x20remote.','3523668JPnQjx','\x20failed'];a121_0xcd25=function(){return _0xe6296e;};return a121_0xcd25();}async function ensureSqlContent(_0x463446){const _0x4988c7=a121_0x1de3;if(_0x463446[_0x4988c7(0x169)]!=null&&String(_0x463446[_0x4988c7(0x169)])[_0x4988c7(0x17a)]>0x0)return _0x463446;return getSqlQueryDetail(_0x463446['sqlCode']);}function a121_0x1de3(_0x27027e,_0x3d8bfa){_0x27027e=_0x27027e-0x15d;const _0xcd257e=a121_0xcd25();let _0x1de38e=_0xcd257e[_0x27027e];return _0x1de38e;}export const sqlPull={'service':a121_0xb8ffa6(0x17c),'command':a121_0xb8ffa6(0x16b),'description':'Pull\x20remote\x20SQL\x20queries\x20to\x20local\x20.rabetbase/sql/','risk':a121_0xb8ffa6(0x17e),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a121_0xb8ffa6(0x17b),'type':a121_0xb8ffa6(0x180),'description':'Filter\x20by\x20SQL\x20display\x20name'},{'name':'force','type':'boolean','description':a121_0xb8ffa6(0x166)}],async 'dryRun'(_0x404a6b){const _0x5ca979=a121_0xb8ffa6,_0x1ecea9=loadSqlProjectConfig(_0x404a6b[_0x5ca979(0x168)]),_0xc77458=await readSqlLockFile(_0x1ecea9['lockFilePath']),{appLock:_0x4ce798}=ensureSqlLockScope(_0xc77458??createEmptySqlLock(),_0x1ecea9[_0x5ca979(0x168)],_0x1ecea9['sqlRoot'],_0x5ca979(0x16b)),_0x2819e3=await fetchAllSqlQueries(_0x404a6b['appCode'],{'sqlCode':_0x404a6b[_0x5ca979(0x16a)](_0x5ca979(0x174))||undefined,'sqlName':_0x404a6b[_0x5ca979(0x16a)](_0x5ca979(0x17b))||undefined}),_0x4a4130=[];for(const _0x4eb1d0 of _0x2819e3){const _0x12f6c8=await ensureSqlContent(_0x4eb1d0),_0x412329=ensureRemoteSqlContent(_0x12f6c8),_0x3d18a2=detectModeFromSql(_0x12f6c8),_0x3d4237=_0x12f6c8[_0x5ca979(0x197)]?await getDbName(_0x404a6b[_0x5ca979(0x168)],Number(_0x12f6c8['dbId']))['catch'](()=>undefined):undefined,_0x4a2870=buildLocalSqlFileContent({'sqlCode':_0x12f6c8[_0x5ca979(0x15e)],'sqlName':_0x12f6c8[_0x5ca979(0x182)],'dbId':_0x12f6c8[_0x5ca979(0x197)]},_0x412329,{'dbName':_0x3d4237,'mode':_0x3d18a2,'syncedAt':new Date()[_0x5ca979(0x18a)](),'description':_0x12f6c8[_0x5ca979(0x177)]}),_0x1f7a43=buildSqlLockEntry(_0x12f6c8,_0x412329,'',{'dbName':_0x3d4237}),_0x406183=resolveLocalSqlFilePath(_0x1ecea9,_0x12f6c8['sqlCode'],_0x1f7a43);let _0x201c96='would_pull',_0x2e8ba0;if(await fileExists(_0x406183)){const _0x189f64=await readFile(_0x406183,_0x5ca979(0x184));isEquivalentPulledSqlFile(_0x189f64,_0x4a2870,_0x3d18a2)?(_0x201c96=_0x5ca979(0x16f),_0x2e8ba0=_0x5ca979(0x18c)):(_0x201c96=_0x5ca979(0x195),_0x2e8ba0=_0x5ca979(0x170));}_0x4a4130[_0x5ca979(0x173)]({'sqlCode':_0x12f6c8[_0x5ca979(0x15e)],'sqlName':_0x12f6c8[_0x5ca979(0x182)],'filePath':_0x406183,'status':_0x201c96,'reason':_0x2e8ba0});}return{'method':_0x5ca979(0x188),'url':'/smartapi/custom/queryUserCustomSqlList\x20+\x20/smartapi/custom/getUserCustomSql','body':{'appCode':_0x404a6b[_0x5ca979(0x168)],'sqlCode':_0x404a6b[_0x5ca979(0x16a)](_0x5ca979(0x174))||null,'sqlName':_0x404a6b[_0x5ca979(0x16a)](_0x5ca979(0x17b))||null,'files':_0x4a4130},'description':'Would\x20pull\x20'+_0x4a4130[_0x5ca979(0x17a)]+_0x5ca979(0x183)+_0x1ecea9['sqlRootDir']};},async 'execute'(_0x599b02){const _0x4cb92f=a121_0xb8ffa6,_0x4ba6b5=loadSqlProjectConfig(_0x599b02[_0x4cb92f(0x168)]),_0x21ba81=await readSqlLockFile(_0x4ba6b5[_0x4cb92f(0x191)]),{lockData:_0x134623,appLock:_0x43399a}=ensureSqlLockScope(_0x21ba81??createEmptySqlLock(),_0x4ba6b5['appCode'],_0x4ba6b5[_0x4cb92f(0x16c)],_0x4cb92f(0x16b)),_0x45b176=_0x599b02[_0x4cb92f(0x187)]('force'),_0x47077d=await fetchAllSqlQueries(_0x599b02['appCode'],{'sqlCode':_0x599b02[_0x4cb92f(0x16a)](_0x4cb92f(0x174))||undefined,'sqlName':_0x599b02[_0x4cb92f(0x16a)](_0x4cb92f(0x17b))||undefined});if(_0x47077d[_0x4cb92f(0x17a)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x4cb92f(0x176)};const _0x2ef602=[],_0x364327=[];for(const _0x210ad2 of _0x47077d){try{_0x2ef602['push'](await ensureSqlContent(_0x210ad2));}catch(_0x3cce5d){_0x364327['push']({'sqlCode':_0x210ad2[_0x4cb92f(0x15e)],'error':_0x3cce5d instanceof Error?_0x3cce5d[_0x4cb92f(0x15d)]:String(_0x3cce5d)});}}if(_0x45b176&&!_0x599b02[_0x4cb92f(0x178)]){let _0x593e50=![];for(const _0x24d694 of _0x2ef602){const _0x114b33=detectModeFromSql(_0x24d694),_0x4577a3=_0x24d694[_0x4cb92f(0x197)]?await getDbName(_0x599b02['appCode'],Number(_0x24d694[_0x4cb92f(0x197)]))[_0x4cb92f(0x194)](()=>undefined):undefined,_0xacd6f6=buildLocalSqlFileContent({'sqlCode':_0x24d694[_0x4cb92f(0x15e)],'sqlName':_0x24d694[_0x4cb92f(0x182)],'dbId':_0x24d694[_0x4cb92f(0x197)]},ensureRemoteSqlContent(_0x24d694),{'dbName':_0x4577a3,'mode':_0x114b33,'syncedAt':new Date()[_0x4cb92f(0x18a)](),'description':_0x24d694[_0x4cb92f(0x177)]}),_0x20edcb=resolveLocalSqlFilePath(_0x4ba6b5,_0x24d694[_0x4cb92f(0x15e)],buildSqlLockEntry(_0x24d694,ensureRemoteSqlContent(_0x24d694),'',{'dbName':_0x4577a3}));if(await fileExists(_0x20edcb)){const _0x2017b1=await readFile(_0x20edcb,_0x4cb92f(0x184));if(!isEquivalentPulledSqlFile(_0x2017b1,_0xacd6f6,_0x114b33)){_0x593e50=!![];break;}}}if(_0x593e50){const _0x23bb90=await confirmForceOverwrite(_0x4cb92f(0x160));if(!_0x23bb90)throw CliErrors[_0x4cb92f(0x16d)](_0x4cb92f(0x18f));}}const _0x9b53de=cloneSqlLockData(_0x134623),_0x1ea490=_0x9b53de[_0x4cb92f(0x181)][_0x4ba6b5[_0x4cb92f(0x168)]],_0x455878=[],_0x5651fe=[];for(const _0x4fe0a7 of _0x2ef602){const _0x1d8f00=_0x1ea490['sqls'][_0x4fe0a7[_0x4cb92f(0x15e)]],_0x4510a2=ensureRemoteSqlContent(_0x4fe0a7),_0x3caa63=detectModeFromSql(_0x4fe0a7),_0x387142=_0x4fe0a7['dbId']?await getDbName(_0x599b02[_0x4cb92f(0x168)],Number(_0x4fe0a7[_0x4cb92f(0x197)]))[_0x4cb92f(0x194)](()=>undefined):undefined,_0x2ebe4c=buildLocalSqlFileContent({'sqlCode':_0x4fe0a7[_0x4cb92f(0x15e)],'sqlName':_0x4fe0a7[_0x4cb92f(0x182)],'dbId':_0x4fe0a7['dbId']},_0x4510a2,{'dbName':_0x387142,'mode':_0x3caa63,'syncedAt':new Date()['toISOString'](),'description':_0x4fe0a7[_0x4cb92f(0x177)]}),_0x4b3abb=buildSqlLockEntry(_0x4fe0a7,_0x4510a2,computeSqlContentHash(_0x2ebe4c),{'dbName':_0x387142}),_0x468842=_0x4b3abb[_0x4cb92f(0x172)],_0x48797c=join(_0x4ba6b5[_0x4cb92f(0x18b)],_0x468842);try{if(await fileExists(_0x48797c)){const _0x429ac1=await readFile(_0x48797c,'utf8');if(isEquivalentPulledSqlFile(_0x429ac1,_0x2ebe4c,_0x3caa63)){_0x5651fe[_0x4cb92f(0x173)]({'sqlCode':_0x4fe0a7[_0x4cb92f(0x15e)],'reason':_0x4cb92f(0x18c)}),_0x1ea490[_0x4cb92f(0x16e)][_0x4fe0a7[_0x4cb92f(0x15e)]]={..._0x4b3abb,'hash':computeSqlContentHash(_0x429ac1),'path':_0x468842};continue;}if(!_0x45b176){_0x5651fe[_0x4cb92f(0x173)]({'sqlCode':_0x4fe0a7[_0x4cb92f(0x15e)],'reason':'local\x20differs\x20from\x20remote'});continue;}}const _0xa3ad1e=_0x1d8f00?.[_0x4cb92f(0x172)]?join(_0x4ba6b5[_0x4cb92f(0x18b)],_0x1d8f00[_0x4cb92f(0x172)]):undefined;_0xa3ad1e&&_0xa3ad1e!==_0x48797c&&await fileExists(_0xa3ad1e)&&await rm(_0xa3ad1e,{'force':!![]}),await ensureParentDirectory(_0x48797c),await writeFile(_0x48797c,_0x2ebe4c,_0x4cb92f(0x184)),_0x1ea490[_0x4cb92f(0x16e)][_0x4fe0a7[_0x4cb92f(0x15e)]]={..._0x4b3abb,'path':_0x468842},_0x455878[_0x4cb92f(0x173)]({'sqlCode':_0x4fe0a7['sqlCode'],'filePath':_0x48797c});}catch(_0x430f91){_0x364327[_0x4cb92f(0x173)]({'sqlCode':_0x4fe0a7[_0x4cb92f(0x15e)],'error':_0x430f91 instanceof Error?_0x430f91[_0x4cb92f(0x15d)]:String(_0x430f91)});}}return _0x1ea490[_0x4cb92f(0x193)]=new Date()[_0x4cb92f(0x18a)](),await writeSqlLockFile(_0x4ba6b5['lockFilePath'],_0x9b53de),{'ok':_0x364327[_0x4cb92f(0x17a)]===0x0,'data':{'pulled':_0x455878,'skipped':_0x5651fe,'failed':_0x364327},'message':_0x4cb92f(0x189)+_0x455878[_0x4cb92f(0x17a)]+_0x4cb92f(0x167)+_0x5651fe[_0x4cb92f(0x17a)]+_0x4cb92f(0x18d)+_0x364327[_0x4cb92f(0x17a)]+_0x4cb92f(0x162)};}};function detectModeFromSql(_0x14b976){const _0x776c4=a121_0xb8ffa6,_0x301fe2=ensureRemoteSqlContent(_0x14b976),_0x1d9832=stripLocalSqlMetadata(_0x301fe2,_0x776c4(0x186))[_0x776c4(0x163)]();if(/^<(select|insert|update|delete)\b/i['test'](_0x1d9832))return _0x776c4(0x186);return _0x776c4(0x17c);}function isEquivalentPulledSqlFile(_0xc0cf4d,_0x6f5048,_0x55aa95){return normalizePullComparableContent(_0xc0cf4d,_0x55aa95)===normalizePullComparableContent(_0x6f5048,_0x55aa95);}function normalizePullComparableContent(_0x4177a6,_0x5a1045){const _0x4e5935=a121_0xb8ffa6,_0x5c50db=_0x4177a6[_0x4e5935(0x196)](/\r\n/g,'\x0a')[_0x4e5935(0x165)]('\x0a'),_0x4b8511=_0x5c50db[_0x4e5935(0x185)](_0x2bb1cc=>!isSyncedAtMetadataLine(_0x2bb1cc,_0x5a1045));return _0x4b8511['join']('\x0a');}function isSyncedAtMetadataLine(_0x1ee276,_0x5c770f){const _0x14bbc9=a121_0xb8ffa6;if(_0x5c770f===_0x14bbc9(0x186))return/^\s*<!--\s*@lovrabet\.syncedAt:/[_0x14bbc9(0x164)](_0x1ee276);return/^\s*--\s*@lovrabet\.syncedAt:/[_0x14bbc9(0x164)](_0x1ee276);}
@@ -1 +1 @@
1
- const a121_0x27487b=a121_0x5636;(function(_0x5accb0,_0x5eab89){const _0x5d329c=a121_0x5636,_0x58a3fa=_0x5accb0();while(!![]){try{const _0x5d9794=-parseInt(_0x5d329c(0x13e))/0x1+parseInt(_0x5d329c(0x12e))/0x2+parseInt(_0x5d329c(0x114))/0x3+parseInt(_0x5d329c(0x12f))/0x4+-parseInt(_0x5d329c(0x117))/0x5*(parseInt(_0x5d329c(0x121))/0x6)+parseInt(_0x5d329c(0x130))/0x7*(-parseInt(_0x5d329c(0x139))/0x8)+parseInt(_0x5d329c(0x147))/0x9;if(_0x5d9794===_0x5eab89)break;else _0x58a3fa['push'](_0x58a3fa['shift']());}catch(_0x6a09df){_0x58a3fa['push'](_0x58a3fa['shift']());}}}(a121_0x3e16,0x93138));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_0x5636(_0x2c1031,_0x5b9b17){_0x2c1031=_0x2c1031-0x10c;const _0x3e161c=a121_0x3e16();let _0x5636ff=_0x3e161c[_0x2c1031];return _0x5636ff;}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';import{buildSqlLockEntry,stripLocalSqlMetadata}from'./shared.js';import{buildDbDirectoryName}from'../../core/sql-sync/utils.js';async function getTargetSqlQueries(_0x1b28a2,_0x258ede,_0x525e33){const _0x15bb5d=a121_0x5636,_0xfe25fe=await scanLocalSqlQueries(_0x1b28a2),_0xdc1f88=new Map();for(const _0x26b007 of _0xfe25fe){if(_0x525e33&&_0x26b007[_0x15bb5d(0x13c)]!==_0x525e33)continue;const _0x42e7bc=_0xdc1f88[_0x15bb5d(0x11e)](_0x26b007[_0x15bb5d(0x13c)])??[];_0x42e7bc[_0x15bb5d(0x127)](_0x26b007),_0xdc1f88['set'](_0x26b007[_0x15bb5d(0x13c)],_0x42e7bc);}if(_0x525e33&&!_0xdc1f88[_0x15bb5d(0x12b)](_0x525e33))throw CliErrors[_0x15bb5d(0x13b)]('Local\x20SQL\x20not\x20found:\x20'+_0x525e33);const _0x3a5c68=[];for(const [_0x502def,_0x13f079]of _0xdc1f88[_0x15bb5d(0x10f)]()){if(_0x13f079['length']===0x1){_0x3a5c68['push'](_0x13f079[0x0]);continue;}const _0x55746e=_0x258ede[_0x15bb5d(0x124)][_0x502def],_0x35fa65=_0x55746e?.[_0x15bb5d(0x144)],_0x2c57ff=_0x35fa65?_0x13f079[_0x15bb5d(0x11d)](_0x2e9474=>_0x2e9474['relativePath']!==_0x35fa65):_0x13f079;if(_0x55746e&&_0x2c57ff[_0x15bb5d(0x111)]===0x1){_0x3a5c68['push'](_0x2c57ff[0x0]);continue;}throw CliErrors[_0x15bb5d(0x13b)](_0x15bb5d(0x143)+_0x502def+_0x15bb5d(0x12c));}return _0x3a5c68;}export const sqlPush={'service':a121_0x27487b(0x126),'command':a121_0x27487b(0x127),'description':a121_0x27487b(0x125),'risk':a121_0x27487b(0x118),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a121_0x27487b(0x10c),'type':a121_0x27487b(0x133),'description':'Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock'}],async 'dryRun'(_0x4fdfe0){const _0x970348=a121_0x27487b,_0x1d88f9=loadSqlProjectConfig(_0x4fdfe0['appCode']),_0x4794d3=await readSqlLockFile(_0x1d88f9[_0x970348(0x120)]),{appLock:_0x5477a4}=ensureSqlLockScope(_0x4794d3??createEmptySqlLock(),_0x4fdfe0[_0x970348(0x13d)],_0x1d88f9['sqlRoot'],'push'),_0x5e346=await getTargetSqlQueries(_0x1d88f9,_0x5477a4,_0x4fdfe0[_0x970348(0x146)](_0x970348(0x135))||undefined),_0xbd524=[];for(const _0x54f64a of _0x5e346){const _0x1bd2b5=await computeSqlFileHash(_0x54f64a[_0x970348(0x13a)]),_0x5a788a=_0x5477a4['sqls'][_0x54f64a[_0x970348(0x13c)]],_0x53b213=!!_0x5a788a&&(_0x5a788a['path']!==_0x54f64a['relativePath']||!!_0x54f64a[_0x970348(0x136)]&&_0x5a788a['sqlName']!==_0x54f64a[_0x970348(0x136)]);if(!_0x4fdfe0[_0x970348(0x129)](_0x970348(0x10c))&&_0x5a788a&&_0x5a788a[_0x970348(0x123)]===_0x1bd2b5&&!_0x53b213)continue;_0xbd524[_0x970348(0x127)](_0x54f64a['sqlCode']);}return{'method':_0x970348(0x10e),'url':_0x970348(0x113),'body':{'sqlCodes':_0xbd524,'appCode':_0x4fdfe0['appCode']},'description':_0x970348(0x140)+_0xbd524['length']+_0x970348(0x11a)};},async 'execute'(_0x185076){const _0x2fce28=a121_0x27487b,_0x438def=loadSqlProjectConfig(_0x185076[_0x2fce28(0x13d)]),_0x558bc9=await readSqlLockFile(_0x438def[_0x2fce28(0x120)]),{lockData:_0x50290f,appLock:_0x295e4a}=ensureSqlLockScope(_0x558bc9??createEmptySqlLock(),_0x185076[_0x2fce28(0x13d)],_0x438def[_0x2fce28(0x132)],'push'),_0x24b585=await getTargetSqlQueries(_0x438def,_0x295e4a,_0x185076[_0x2fce28(0x146)]('sqlcode')||undefined);if(_0x24b585[_0x2fce28(0x111)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':'No\x20local\x20SQL\x20files\x20found.'};const _0x304e51=[],_0x177fb7=[],_0x23fe0a=[];for(const _0x1b390b of _0x24b585){const _0x33d6c7=_0x295e4a[_0x2fce28(0x124)][_0x1b390b['sqlCode']];if(!_0x33d6c7){_0x23fe0a[_0x2fce28(0x127)]({'sqlCode':_0x1b390b[_0x2fce28(0x13c)],'error':'local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first'});continue;}try{const _0x2a544c=await computeSqlFileHash(_0x1b390b[_0x2fce28(0x13a)]),_0x2fb720=_0x33d6c7[_0x2fce28(0x144)]!==_0x1b390b[_0x2fce28(0x138)]||!!_0x1b390b[_0x2fce28(0x136)]&&_0x33d6c7['sqlName']!==_0x1b390b[_0x2fce28(0x136)];if(!_0x185076[_0x2fce28(0x129)]('force')&&_0x33d6c7[_0x2fce28(0x123)]===_0x2a544c&&!_0x2fb720){_0x177fb7[_0x2fce28(0x127)]({'sqlCode':_0x1b390b['sqlCode'],'reason':_0x2fce28(0x11f)});continue;}if(_0x33d6c7['version']==null){_0x23fe0a[_0x2fce28(0x127)]({'sqlCode':_0x1b390b['sqlCode'],'error':_0x2fce28(0x142)});continue;}const _0x5cd0db=await readFile(_0x1b390b[_0x2fce28(0x13a)],'utf8'),_0x1a7328=stripLocalSqlMetadata(_0x5cd0db,_0x1b390b['mode']),_0x852f7c=_0x1b390b[_0x2fce28(0x136)]||_0x33d6c7[_0x2fce28(0x136)],_0x3e4189=await resolveTargetDbBinding(_0x185076['appCode'],_0x1b390b,_0x33d6c7),_0x517427=await updateSqlQuery({'id':_0x33d6c7[_0x2fce28(0x11c)],'appCode':_0x185076[_0x2fce28(0x13d)],'sqlCode':_0x1b390b[_0x2fce28(0x13c)],'sqlName':_0x852f7c,'dbId':_0x3e4189[_0x2fce28(0x131)],'version':_0x33d6c7[_0x2fce28(0x112)],'sqlContent':_0x1a7328,'sqlConfig':_0x33d6c7[_0x2fce28(0x12a)]??undefined}),_0x345993=_0x517427[_0x2fce28(0x131)]?await getDbName(_0x185076[_0x2fce28(0x13d)],Number(_0x517427['dbId']))[_0x2fce28(0x119)](()=>_0x3e4189[_0x2fce28(0x122)]):_0x3e4189[_0x2fce28(0x122)];_0x295e4a[_0x2fce28(0x124)][_0x1b390b[_0x2fce28(0x13c)]]={...buildSqlLockEntry(_0x517427,_0x1a7328,_0x2a544c,{'dbName':_0x345993}),'path':_0x1b390b[_0x2fce28(0x138)],'mode':_0x33d6c7[_0x2fce28(0x10d)]},await archivePreviousSqlFileIfNeeded(_0x438def,_0x33d6c7[_0x2fce28(0x144)],_0x1b390b[_0x2fce28(0x138)]),_0x304e51[_0x2fce28(0x127)]({'sqlCode':_0x1b390b[_0x2fce28(0x13c)],'remoteId':_0x33d6c7[_0x2fce28(0x11c)]});}catch(_0x2908a6){_0x23fe0a['push']({'sqlCode':_0x1b390b[_0x2fce28(0x13c)],'error':_0x2908a6 instanceof Error?_0x2908a6[_0x2fce28(0x13f)]:String(_0x2908a6)});}}return _0x295e4a['lastSync']=new Date()[_0x2fce28(0x115)](),await writeSqlLockFile(_0x438def[_0x2fce28(0x120)],_0x50290f),{'ok':_0x23fe0a[_0x2fce28(0x111)]===0x0,'data':{'pushed':_0x304e51,'skipped':_0x177fb7,'failed':_0x23fe0a},'message':'Push\x20complete:\x20'+_0x304e51[_0x2fce28(0x111)]+_0x2fce28(0x128)+_0x177fb7[_0x2fce28(0x111)]+_0x2fce28(0x12d)+_0x23fe0a[_0x2fce28(0x111)]+_0x2fce28(0x137)};}};async function archivePreviousSqlFileIfNeeded(_0x142403,_0x404844,_0x4587eb){const _0x57d707=a121_0x27487b;if(!_0x404844||_0x404844===_0x4587eb)return;const _0x2ff59f=join(_0x142403[_0x57d707(0x116)],_0x404844);if(!await fileExists(_0x2ff59f))return;const _0x1098c2=await moveToTrash(_0x142403['projectRoot'],_0x142403[_0x57d707(0x145)],_0x2ff59f);await cleanupEmptyDirectories(dirname(_0x2ff59f),_0x142403[_0x57d707(0x116)]),void _0x1098c2;}async function moveToTrash(_0x42161b,_0x1ec182,_0x3b73ff){const _0x741f67=a121_0x27487b,_0x241961=new Date()[_0x741f67(0x115)]()['replace'](/[:.]/g,'-'),_0x416ce6=relative(_0x42161b,_0x3b73ff),_0x2b8ebd=join(_0x1ec182,_0x241961,_0x416ce6);return await mkdir(dirname(_0x2b8ebd),{'recursive':!![]}),await rename(_0x3b73ff,_0x2b8ebd),_0x2b8ebd;}async function cleanupEmptyDirectories(_0x5dce44,_0x3117be){const _0x5345a4=a121_0x27487b;let _0x47d3ef=resolve(_0x5dce44);const _0x20938c=resolve(_0x3117be);while(_0x47d3ef[_0x5345a4(0x148)](''+_0x20938c+sep)||_0x47d3ef===_0x20938c){if(_0x47d3ef===_0x20938c)return;try{const _0x5abf65=await readdir(_0x47d3ef);if(_0x5abf65[_0x5345a4(0x111)]>0x0)return;await rmdir(_0x47d3ef);}catch{return;}_0x47d3ef=dirname(_0x47d3ef);}}async function resolveTargetDbBinding(_0x8330fb,_0x32df63,_0x56eb8c){const _0x23dc35=a121_0x27487b,_0xc7262=_0x32df63[_0x23dc35(0x141)];if(!_0xc7262)return{'dbId':_0x56eb8c[_0x23dc35(0x131)],'dbName':_0x56eb8c[_0x23dc35(0x122)]};const _0x4052ee=buildDbDirectoryName(_0x56eb8c[_0x23dc35(0x122)],_0x56eb8c[_0x23dc35(0x131)]);if(_0xc7262===_0x4052ee)return{'dbId':_0x56eb8c[_0x23dc35(0x131)],'dbName':_0x56eb8c[_0x23dc35(0x122)]};const _0x1b124a=parseExplicitDbDirectory(_0xc7262);if(_0x1b124a!=null)return{'dbId':_0x1b124a,'dbName':await getDbName(_0x8330fb,_0x1b124a)[_0x23dc35(0x119)](()=>undefined)};const _0x3ced0e=await listDatabases(_0x8330fb),_0x39a005=_0x3ced0e[_0x23dc35(0x11d)](_0xa49cfe=>buildDbDirectoryName(_0xa49cfe[_0x23dc35(0x122)],_0xa49cfe['dbId'])===_0xc7262);if(_0x39a005[_0x23dc35(0x111)]===0x1)return{'dbId':_0x39a005[0x0][_0x23dc35(0x131)],'dbName':_0x39a005[0x0][_0x23dc35(0x122)]};if(_0x39a005[_0x23dc35(0x111)]===0x0)throw CliErrors['validation']('No\x20database\x20matches\x20local\x20directory\x20\x22'+_0xc7262+_0x23dc35(0x134)+_0x32df63[_0x23dc35(0x13c)]+'.');const _0x56874d=_0x39a005['map'](_0x3a2962=>_0x3a2962['dbName']+'\x20('+_0x3a2962[_0x23dc35(0x131)]+')')[_0x23dc35(0x11b)](',\x20');throw CliErrors[_0x23dc35(0x13b)]('Local\x20directory\x20\x22'+_0xc7262+'\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20'+_0x32df63['sqlCode']+':\x20'+_0x56874d);}function a121_0x3e16(){const _0x131fe9=['sqlcode','sqlName','\x20failed','relativePath','398584ESLeJH','filePath','validation','sqlCode','appCode','766018KBPFkI','message','Would\x20push\x20','dbDirectory','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','path','trashDir','str','15696099VKdtWj','startsWith','force','mode','POST','entries','isFinite','length','version','/smartapi/custom/updateUserCustomSql','651600lAyVMI','toISOString','sqlRootDir','410vpBxlA','high-risk-write','catch','\x20SQL\x20file(s)','join','remoteId','filter','get','unchanged','lockFilePath','70542gMCAaq','dbName','hash','sqls','Push\x20local\x20SQL\x20files\x20to\x20remote','sql','push','\x20pushed,\x20','bool','sqlConfig','has','.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.','\x20skipped,\x20','858972BYwOqN','4350992OxuGqA','161VqvDFK','dbId','sqlRoot','boolean','\x22\x20for\x20sqlCode\x20'];a121_0x3e16=function(){return _0x131fe9;};return a121_0x3e16();}function parseExplicitDbDirectory(_0x426af2){const _0x57e7e5=a121_0x27487b,_0x59207a=/^db-(\d+)$/['exec'](_0x426af2);if(!_0x59207a)return null;const _0x15464a=Number(_0x59207a[0x1]);return Number[_0x57e7e5(0x110)](_0x15464a)&&_0x15464a>0x0?_0x15464a:null;}
1
+ const a122_0x4995ca=a122_0x2c40;(function(_0x40598c,_0x3ab99c){const _0x86143b=a122_0x2c40,_0x5c01db=_0x40598c();while(!![]){try{const _0xcd622f=-parseInt(_0x86143b(0xac))/0x1*(-parseInt(_0x86143b(0x7c))/0x2)+-parseInt(_0x86143b(0x88))/0x3+-parseInt(_0x86143b(0x9c))/0x4*(-parseInt(_0x86143b(0x7d))/0x5)+parseInt(_0x86143b(0xa9))/0x6+parseInt(_0x86143b(0x86))/0x7+-parseInt(_0x86143b(0x90))/0x8+-parseInt(_0x86143b(0x73))/0x9;if(_0xcd622f===_0x3ab99c)break;else _0x5c01db['push'](_0x5c01db['shift']());}catch(_0xb5a3b5){_0x5c01db['push'](_0x5c01db['shift']());}}}(a122_0x5834,0x1ac5b));import{mkdir,readFile,readdir,rename,rmdir}from'node:fs/promises';function a122_0x5834(){const _0x56dac0=['push','toISOString','1095792oJdskm','startsWith','filter','lastSync','relativePath','force','dbName','length','sqlRootDir','\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20','local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first','No\x20database\x20matches\x20local\x20directory\x20\x22','3228DXFaZw','version','\x20SQL\x20file(s)','get','has','appCode','validation','sqlName','sql','sqlCode','Local\x20directory\x20\x22','dbId','hash','1098774iZqwoA','message','boolean','13559nMgFCE','Would\x20push\x20','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','path','map','1668060IHAXGM','dbDirectory','unchanged','exec','No\x20local\x20SQL\x20files\x20found.','\x20failed','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','trashDir','.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.','26jDDfTV','955TBVuyb','sqls','sqlcode','mode','\x20pushed,\x20','sqlRoot','lockFilePath','Push\x20complete:\x20','filePath','948507PdGqAG','remoteId','651183mLlCzZ','entries','projectRoot','high-risk-write','str','catch'];a122_0x5834=function(){return _0x56dac0;};return a122_0x5834();}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';import{buildSqlLockEntry,stripLocalSqlMetadata}from'./shared.js';import{buildDbDirectoryName}from'../../core/sql-sync/utils.js';async function getTargetSqlQueries(_0x37675c,_0xe0b56b,_0x3e0ecb){const _0x193084=a122_0x2c40,_0x3654b4=await scanLocalSqlQueries(_0x37675c),_0x36f08d=new Map();for(const _0x5c59b9 of _0x3654b4){if(_0x3e0ecb&&_0x5c59b9[_0x193084(0xa5)]!==_0x3e0ecb)continue;const _0x3251ab=_0x36f08d[_0x193084(0x9f)](_0x5c59b9[_0x193084(0xa5)])??[];_0x3251ab[_0x193084(0x8e)](_0x5c59b9),_0x36f08d['set'](_0x5c59b9['sqlCode'],_0x3251ab);}if(_0x3e0ecb&&!_0x36f08d[_0x193084(0xa0)](_0x3e0ecb))throw CliErrors[_0x193084(0xa2)]('Local\x20SQL\x20not\x20found:\x20'+_0x3e0ecb);const _0x2d660e=[];for(const [_0x4f4add,_0x2d9f8e]of _0x36f08d[_0x193084(0x89)]()){if(_0x2d9f8e[_0x193084(0x97)]===0x1){_0x2d660e[_0x193084(0x8e)](_0x2d9f8e[0x0]);continue;}const _0x4e4598=_0xe0b56b[_0x193084(0x7e)][_0x4f4add],_0x37459f=_0x4e4598?.[_0x193084(0xaf)],_0x5c7466=_0x37459f?_0x2d9f8e[_0x193084(0x92)](_0x525ca4=>_0x525ca4[_0x193084(0x94)]!==_0x37459f):_0x2d9f8e;if(_0x4e4598&&_0x5c7466[_0x193084(0x97)]===0x1){_0x2d660e[_0x193084(0x8e)](_0x5c7466[0x0]);continue;}throw CliErrors[_0x193084(0xa2)]('Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20'+_0x4f4add+_0x193084(0x7b));}return _0x2d660e;}export const sqlPush={'service':a122_0x4995ca(0xa4),'command':'push','description':'Push\x20local\x20SQL\x20files\x20to\x20remote','risk':a122_0x4995ca(0x8b),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':'force','type':a122_0x4995ca(0xab),'description':a122_0x4995ca(0xae)}],async 'dryRun'(_0x1fe7df){const _0x1e95de=a122_0x4995ca,_0x234ae6=loadSqlProjectConfig(_0x1fe7df[_0x1e95de(0xa1)]),_0x588fba=await readSqlLockFile(_0x234ae6[_0x1e95de(0x83)]),{appLock:_0x193a2e}=ensureSqlLockScope(_0x588fba??createEmptySqlLock(),_0x1fe7df[_0x1e95de(0xa1)],_0x234ae6['sqlRoot'],_0x1e95de(0x8e)),_0x8c4343=await getTargetSqlQueries(_0x234ae6,_0x193a2e,_0x1fe7df[_0x1e95de(0x8c)]('sqlcode')||undefined),_0x1307cd=[];for(const _0x5cae76 of _0x8c4343){const _0x1b266c=await computeSqlFileHash(_0x5cae76['filePath']),_0x499bed=_0x193a2e[_0x1e95de(0x7e)][_0x5cae76[_0x1e95de(0xa5)]],_0x55c2a5=!!_0x499bed&&(_0x499bed[_0x1e95de(0xaf)]!==_0x5cae76[_0x1e95de(0x94)]||!!_0x5cae76[_0x1e95de(0xa3)]&&_0x499bed['sqlName']!==_0x5cae76[_0x1e95de(0xa3)]);if(!_0x1fe7df['bool'](_0x1e95de(0x95))&&_0x499bed&&_0x499bed[_0x1e95de(0xa8)]===_0x1b266c&&!_0x55c2a5)continue;_0x1307cd['push'](_0x5cae76[_0x1e95de(0xa5)]);}return{'method':'POST','url':'/smartapi/custom/updateUserCustomSql','body':{'sqlCodes':_0x1307cd,'appCode':_0x1fe7df[_0x1e95de(0xa1)]},'description':_0x1e95de(0xad)+_0x1307cd[_0x1e95de(0x97)]+_0x1e95de(0x9e)};},async 'execute'(_0x129823){const _0x549ad4=a122_0x4995ca,_0x3495b8=loadSqlProjectConfig(_0x129823[_0x549ad4(0xa1)]),_0x48223f=await readSqlLockFile(_0x3495b8['lockFilePath']),{lockData:_0x274b24,appLock:_0x238fc7}=ensureSqlLockScope(_0x48223f??createEmptySqlLock(),_0x129823[_0x549ad4(0xa1)],_0x3495b8[_0x549ad4(0x82)],_0x549ad4(0x8e)),_0x5bc8ae=await getTargetSqlQueries(_0x3495b8,_0x238fc7,_0x129823[_0x549ad4(0x8c)](_0x549ad4(0x7f))||undefined);if(_0x5bc8ae[_0x549ad4(0x97)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x549ad4(0x77)};const _0x165cca=[],_0x57b407=[],_0x3040d4=[];for(const _0x37e5cb of _0x5bc8ae){const _0x1d31ed=_0x238fc7[_0x549ad4(0x7e)][_0x37e5cb[_0x549ad4(0xa5)]];if(!_0x1d31ed){_0x3040d4[_0x549ad4(0x8e)]({'sqlCode':_0x37e5cb['sqlCode'],'error':_0x549ad4(0x9a)});continue;}try{const _0x5badcb=await computeSqlFileHash(_0x37e5cb[_0x549ad4(0x85)]),_0x4095ce=_0x1d31ed[_0x549ad4(0xaf)]!==_0x37e5cb[_0x549ad4(0x94)]||!!_0x37e5cb[_0x549ad4(0xa3)]&&_0x1d31ed[_0x549ad4(0xa3)]!==_0x37e5cb[_0x549ad4(0xa3)];if(!_0x129823['bool']('force')&&_0x1d31ed[_0x549ad4(0xa8)]===_0x5badcb&&!_0x4095ce){_0x57b407[_0x549ad4(0x8e)]({'sqlCode':_0x37e5cb[_0x549ad4(0xa5)],'reason':_0x549ad4(0x75)});continue;}if(_0x1d31ed[_0x549ad4(0x9d)]==null){_0x3040d4[_0x549ad4(0x8e)]({'sqlCode':_0x37e5cb[_0x549ad4(0xa5)],'error':_0x549ad4(0x79)});continue;}const _0x46c21b=await readFile(_0x37e5cb[_0x549ad4(0x85)],'utf8'),_0xefdc2e=stripLocalSqlMetadata(_0x46c21b,_0x37e5cb[_0x549ad4(0x80)]),_0x2036f7=_0x37e5cb[_0x549ad4(0xa3)]||_0x1d31ed[_0x549ad4(0xa3)],_0x743265=await resolveTargetDbBinding(_0x129823[_0x549ad4(0xa1)],_0x37e5cb,_0x1d31ed),_0x660831=await updateSqlQuery({'id':_0x1d31ed[_0x549ad4(0x87)],'appCode':_0x129823[_0x549ad4(0xa1)],'sqlCode':_0x37e5cb['sqlCode'],'sqlName':_0x2036f7,'dbId':_0x743265[_0x549ad4(0xa7)],'version':_0x1d31ed['version'],'sqlContent':_0xefdc2e,'sqlConfig':_0x1d31ed['sqlConfig']??undefined}),_0x592f8a=_0x660831[_0x549ad4(0xa7)]?await getDbName(_0x129823[_0x549ad4(0xa1)],Number(_0x660831[_0x549ad4(0xa7)]))[_0x549ad4(0x8d)](()=>_0x743265[_0x549ad4(0x96)]):_0x743265[_0x549ad4(0x96)];_0x238fc7[_0x549ad4(0x7e)][_0x37e5cb[_0x549ad4(0xa5)]]={...buildSqlLockEntry(_0x660831,_0xefdc2e,_0x5badcb,{'dbName':_0x592f8a}),'path':_0x37e5cb[_0x549ad4(0x94)],'mode':_0x1d31ed['mode']},await archivePreviousSqlFileIfNeeded(_0x3495b8,_0x1d31ed['path'],_0x37e5cb[_0x549ad4(0x94)]),_0x165cca[_0x549ad4(0x8e)]({'sqlCode':_0x37e5cb[_0x549ad4(0xa5)],'remoteId':_0x1d31ed[_0x549ad4(0x87)]});}catch(_0x97394d){_0x3040d4[_0x549ad4(0x8e)]({'sqlCode':_0x37e5cb['sqlCode'],'error':_0x97394d instanceof Error?_0x97394d[_0x549ad4(0xaa)]:String(_0x97394d)});}}return _0x238fc7[_0x549ad4(0x93)]=new Date()[_0x549ad4(0x8f)](),await writeSqlLockFile(_0x3495b8[_0x549ad4(0x83)],_0x274b24),{'ok':_0x3040d4[_0x549ad4(0x97)]===0x0,'data':{'pushed':_0x165cca,'skipped':_0x57b407,'failed':_0x3040d4},'message':_0x549ad4(0x84)+_0x165cca['length']+_0x549ad4(0x81)+_0x57b407[_0x549ad4(0x97)]+'\x20skipped,\x20'+_0x3040d4['length']+_0x549ad4(0x78)};}};async function archivePreviousSqlFileIfNeeded(_0x243abe,_0x3cd810,_0x598e02){const _0x200f1d=a122_0x4995ca;if(!_0x3cd810||_0x3cd810===_0x598e02)return;const _0x3bd009=join(_0x243abe[_0x200f1d(0x98)],_0x3cd810);if(!await fileExists(_0x3bd009))return;const _0xb60df8=await moveToTrash(_0x243abe[_0x200f1d(0x8a)],_0x243abe[_0x200f1d(0x7a)],_0x3bd009);await cleanupEmptyDirectories(dirname(_0x3bd009),_0x243abe[_0x200f1d(0x98)]),void _0xb60df8;}async function moveToTrash(_0x113d47,_0x4a6ce2,_0x4d947a){const _0xb11af4=a122_0x4995ca,_0x10f27b=new Date()[_0xb11af4(0x8f)]()['replace'](/[:.]/g,'-'),_0x2f8100=relative(_0x113d47,_0x4d947a),_0x3311ad=join(_0x4a6ce2,_0x10f27b,_0x2f8100);return await mkdir(dirname(_0x3311ad),{'recursive':!![]}),await rename(_0x4d947a,_0x3311ad),_0x3311ad;}async function cleanupEmptyDirectories(_0x5d16be,_0x523339){const _0x3d7c9f=a122_0x4995ca;let _0x5cd6dd=resolve(_0x5d16be);const _0x15de97=resolve(_0x523339);while(_0x5cd6dd[_0x3d7c9f(0x91)](''+_0x15de97+sep)||_0x5cd6dd===_0x15de97){if(_0x5cd6dd===_0x15de97)return;try{const _0x567af3=await readdir(_0x5cd6dd);if(_0x567af3['length']>0x0)return;await rmdir(_0x5cd6dd);}catch{return;}_0x5cd6dd=dirname(_0x5cd6dd);}}async function resolveTargetDbBinding(_0x38c825,_0x267a21,_0x5e85f7){const _0x2be84f=a122_0x4995ca,_0x3f3504=_0x267a21[_0x2be84f(0x74)];if(!_0x3f3504)return{'dbId':_0x5e85f7[_0x2be84f(0xa7)],'dbName':_0x5e85f7[_0x2be84f(0x96)]};const _0x1bb9e7=buildDbDirectoryName(_0x5e85f7['dbName'],_0x5e85f7[_0x2be84f(0xa7)]);if(_0x3f3504===_0x1bb9e7)return{'dbId':_0x5e85f7[_0x2be84f(0xa7)],'dbName':_0x5e85f7['dbName']};const _0x2df9f7=parseExplicitDbDirectory(_0x3f3504);if(_0x2df9f7!=null)return{'dbId':_0x2df9f7,'dbName':await getDbName(_0x38c825,_0x2df9f7)[_0x2be84f(0x8d)](()=>undefined)};const _0x29de73=await listDatabases(_0x38c825),_0x2bc4de=_0x29de73[_0x2be84f(0x92)](_0x4530ff=>buildDbDirectoryName(_0x4530ff[_0x2be84f(0x96)],_0x4530ff[_0x2be84f(0xa7)])===_0x3f3504);if(_0x2bc4de[_0x2be84f(0x97)]===0x1)return{'dbId':_0x2bc4de[0x0][_0x2be84f(0xa7)],'dbName':_0x2bc4de[0x0][_0x2be84f(0x96)]};if(_0x2bc4de['length']===0x0)throw CliErrors['validation'](_0x2be84f(0x9b)+_0x3f3504+'\x22\x20for\x20sqlCode\x20'+_0x267a21['sqlCode']+'.');const _0x4166a8=_0x2bc4de[_0x2be84f(0xb0)](_0x4fcfdd=>_0x4fcfdd[_0x2be84f(0x96)]+'\x20('+_0x4fcfdd[_0x2be84f(0xa7)]+')')['join'](',\x20');throw CliErrors[_0x2be84f(0xa2)](_0x2be84f(0xa6)+_0x3f3504+_0x2be84f(0x99)+_0x267a21[_0x2be84f(0xa5)]+':\x20'+_0x4166a8);}function a122_0x2c40(_0x57b6e2,_0x5c6142){_0x57b6e2=_0x57b6e2-0x73;const _0x5834c5=a122_0x5834();let _0x2c402e=_0x5834c5[_0x57b6e2];return _0x2c402e;}function parseExplicitDbDirectory(_0x5159bc){const _0x1ab763=a122_0x4995ca,_0xdddf72=/^db-(\d+)$/[_0x1ab763(0x76)](_0x5159bc);if(!_0xdddf72)return null;const _0x2fb389=Number(_0xdddf72[0x1]);return Number['isFinite'](_0x2fb389)&&_0x2fb389>0x0?_0x2fb389:null;}
@@ -1 +1 @@
1
- function a122_0x4d0b(){const _0x2b17bd=['24YyKvqS','Path\x20to\x20the\x20SQL\x20file','description','SQL\x20query\x20display\x20name','58jWOGMw','3401rBpoIM','902BrWmdk','9020bBKtuj','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','string','save','2571003APUfGH','join','3990660OYunTS','sql','267510iWwFfQ','sqlname','1382876tvIFsg','1013873DJPbHe','Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.','write','validation','Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','3QqGKUT','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`.','8dJVGWD'];a122_0x4d0b=function(){return _0x2b17bd;};return a122_0x4d0b();}const a122_0x511e8f=a122_0x5d92;(function(_0x700b81,_0x50b7b4){const _0x424e15=a122_0x5d92,_0x2ba6c4=_0x700b81();while(!![]){try{const _0x4d7ea8=-parseInt(_0x424e15(0x185))/0x1*(-parseInt(_0x424e15(0x184))/0x2)+parseInt(_0x424e15(0x17d))/0x3*(parseInt(_0x424e15(0x177))/0x4)+-parseInt(_0x424e15(0x175))/0x5*(parseInt(_0x424e15(0x180))/0x6)+parseInt(_0x424e15(0x178))/0x7*(-parseInt(_0x424e15(0x17f))/0x8)+-parseInt(_0x424e15(0x171))/0x9+parseInt(_0x424e15(0x187))/0xa*(parseInt(_0x424e15(0x186))/0xb)+parseInt(_0x424e15(0x173))/0xc;if(_0x4d7ea8===_0x50b7b4)break;else _0x2ba6c4['push'](_0x2ba6c4['shift']());}catch(_0xca7d1){_0x2ba6c4['push'](_0x2ba6c4['shift']());}}}(a122_0x4d0b,0x32611));import{CliErrors}from'../../errors.js';function a122_0x5d92(_0x55fced,_0xa2f2b2){_0x55fced=_0x55fced-0x16e;const _0x4d0b89=a122_0x4d0b();let _0x5d92fa=_0x4d0b89[_0x55fced];return _0x5d92fa;}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const SQL_SAVE_DEPRECATED_HINT=['`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.',a122_0x511e8f(0x179),a122_0x511e8f(0x17e)][a122_0x511e8f(0x172)]('\x0a');export const sqlSave={'service':a122_0x511e8f(0x174),'command':a122_0x511e8f(0x170),'description':a122_0x511e8f(0x17c),'risk':a122_0x511e8f(0x17a),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'file','type':'string','required':!![],'description':a122_0x511e8f(0x181)},SQLCODE_FLAG_OPTIONAL,{'name':a122_0x511e8f(0x176),'type':a122_0x511e8f(0x16f),'description':a122_0x511e8f(0x183)},{'name':'db','type':a122_0x511e8f(0x16f),'description':a122_0x511e8f(0x16e)},{'name':a122_0x511e8f(0x182),'type':a122_0x511e8f(0x16f),'description':'Query\x20description'}],async 'validate'(){const _0x32a579=a122_0x511e8f;throw CliErrors[_0x32a579(0x17b)](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){const _0x30d185=a122_0x511e8f;throw CliErrors[_0x30d185(0x17b)](SQL_SAVE_DEPRECATED_HINT);}};
1
+ function a123_0x21e3(_0x51966d,_0x56b0f8){_0x51966d=_0x51966d-0x152;const _0x1140ac=a123_0x1140();let _0x21e318=_0x1140ac[_0x51966d];return _0x21e318;}const a123_0x48b781=a123_0x21e3;(function(_0x3f4b52,_0xf11d02){const _0x52dce7=a123_0x21e3,_0x1a3fbc=_0x3f4b52();while(!![]){try{const _0x25e301=-parseInt(_0x52dce7(0x15c))/0x1+parseInt(_0x52dce7(0x166))/0x2+parseInt(_0x52dce7(0x15b))/0x3+-parseInt(_0x52dce7(0x165))/0x4*(parseInt(_0x52dce7(0x158))/0x5)+-parseInt(_0x52dce7(0x15e))/0x6+parseInt(_0x52dce7(0x164))/0x7*(parseInt(_0x52dce7(0x156))/0x8)+-parseInt(_0x52dce7(0x15d))/0x9*(-parseInt(_0x52dce7(0x153))/0xa);if(_0x25e301===_0xf11d02)break;else _0x1a3fbc['push'](_0x1a3fbc['shift']());}catch(_0x32be0e){_0x1a3fbc['push'](_0x1a3fbc['shift']());}}}(a123_0x1140,0xdd3dc));import{CliErrors}from'../../errors.js';function a123_0x1140(){const _0x1f984e=['Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','64967kjeKot','4QwVgCX','152384kNZQJT','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.','2410BbbdXt','Path\x20to\x20the\x20SQL\x20file','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`.','16TctwiO','file','8754005LbRglp','sqlname','sql','5130915rtaudM','1059560AWuUNh','135207shlizL','10254222vmtVEW','validation','Query\x20description','join','string'];a123_0x1140=function(){return _0x1f984e;};return a123_0x1140();}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const SQL_SAVE_DEPRECATED_HINT=[a123_0x48b781(0x152),'Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.',a123_0x48b781(0x155)][a123_0x48b781(0x161)]('\x0a');export const sqlSave={'service':a123_0x48b781(0x15a),'command':'save','description':a123_0x48b781(0x163),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a123_0x48b781(0x157),'type':a123_0x48b781(0x162),'required':!![],'description':a123_0x48b781(0x154)},SQLCODE_FLAG_OPTIONAL,{'name':a123_0x48b781(0x159),'type':a123_0x48b781(0x162),'description':'SQL\x20query\x20display\x20name'},{'name':'db','type':a123_0x48b781(0x162),'description':a123_0x48b781(0x167)},{'name':'description','type':a123_0x48b781(0x162),'description':a123_0x48b781(0x160)}],async 'validate'(){const _0x5393c2=a123_0x48b781;throw CliErrors[_0x5393c2(0x15f)](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){throw CliErrors['validation'](SQL_SAVE_DEPRECATED_HINT);}};
@@ -1 +1 @@
1
- const a123_0x5e60cf=a123_0x4105;(function(_0x4b1aa4,_0x4ea193){const _0x13e244=a123_0x4105,_0x2a060d=_0x4b1aa4();while(!![]){try{const _0x1c3cb5=parseInt(_0x13e244(0x15f))/0x1+-parseInt(_0x13e244(0x17c))/0x2*(parseInt(_0x13e244(0x17d))/0x3)+parseInt(_0x13e244(0x15c))/0x4*(-parseInt(_0x13e244(0x178))/0x5)+-parseInt(_0x13e244(0x182))/0x6+-parseInt(_0x13e244(0x17a))/0x7+-parseInt(_0x13e244(0x175))/0x8+-parseInt(_0x13e244(0x16e))/0x9*(-parseInt(_0x13e244(0x158))/0xa);if(_0x1c3cb5===_0x4ea193)break;else _0x2a060d['push'](_0x2a060d['shift']());}catch(_0x27d843){_0x2a060d['push'](_0x2a060d['shift']());}}}(a123_0x40c7,0x7428e));import{createInterface}from'node:readline';import{join}from'node:path';function a123_0x40c7(){const _0x3f078b=['test','sqlConfig','890hNFZaS','syncedAt','path','mode','4OxSwEM','sqlCode','trim','599655LOGNpJ','dbName','toLowerCase','trimStart','split','stderr','--\x20@lovrabet.','filter','dbId','lastSync','description','<!--\x20@lovrabet.','\x20[y/N]\x20','sqls','map','220041CzDDSO','length','entries','replace','apps','\x20-->','sqlContent','5215520mtAcSD','mybatisXml','version','4450340LFROMS','sqlRoot','3653986jqsBhq','yes','64606DslHjz','6FBIkEX','join','includes','sqlName','close','1027284YDSGrH','endsWith','.rabetbase/sql'];a123_0x40c7=function(){return _0x3f078b;};return a123_0x40c7();}import{buildDefaultSqlFileName,buildSqlRelativePath,detectSqlMode}from'../../core/sql-sync/utils.js';export const SQL_LOCAL_REL_DIR=a123_0x5e60cf(0x155);export function buildSqlLockEntry(_0x218b90,_0x89c005,_0x1de6b2,_0x243761){const _0x3463ee=a123_0x5e60cf,_0x33d9ad=detectSqlMode(_0x89c005);return{'path':buildSqlRelativePath(_0x218b90[_0x3463ee(0x15d)],_0x218b90['sqlName'],_0x243761?.[_0x3463ee(0x160)],_0x33d9ad,_0x218b90[_0x3463ee(0x167)]),'hash':_0x1de6b2,'remoteId':_0x218b90['id'],'version':_0x218b90[_0x3463ee(0x177)],'dbId':Number(_0x218b90[_0x3463ee(0x167)]),'dbName':_0x243761?.[_0x3463ee(0x160)],'sqlName':_0x218b90[_0x3463ee(0x180)],'sqlConfig':_0x218b90[_0x3463ee(0x157)]??undefined,'mode':_0x33d9ad};}export function cloneSqlLockData(_0x2b96f2){const _0x13f293=a123_0x5e60cf;return{'apps':Object['fromEntries'](Object[_0x13f293(0x170)](_0x2b96f2[_0x13f293(0x172)])[_0x13f293(0x16d)](([_0x3184e6,_0x18983e])=>[_0x3184e6,{'sqlRoot':_0x18983e[_0x13f293(0x179)],'lastSync':_0x18983e[_0x13f293(0x168)],'sqls':{..._0x18983e[_0x13f293(0x16c)]}}]))};}export function ensureRemoteSqlContent(_0x470395){const _0x5d8e61=a123_0x5e60cf;return _0x470395[_0x5d8e61(0x174)]??'';}function a123_0x4105(_0x12ab8b,_0x2bc23a){_0x12ab8b=_0x12ab8b-0x155;const _0x40c7cf=a123_0x40c7();let _0x41055e=_0x40c7cf[_0x12ab8b];return _0x41055e;}export function buildLocalSqlFileContent(_0x1c2ff4,_0x28516b,_0x2927b1){const _0xcb8d08=a123_0x5e60cf,_0x46bece=_0x2927b1?.[_0xcb8d08(0x15b)]??detectSqlMode(_0x28516b),_0x1acced=stripLocalSqlMetadata(_0x28516b,_0x46bece)['trim'](),_0x3e4f4e=[...buildMetadataHeaderLines({'sqlCode':_0x1c2ff4[_0xcb8d08(0x15d)],'sqlName':_0x1c2ff4['sqlName'],'dbId':_0x1c2ff4[_0xcb8d08(0x167)],'dbName':_0x2927b1?.[_0xcb8d08(0x160)],'mode':_0x46bece,'syncedAt':_0x2927b1?.[_0xcb8d08(0x159)],'description':_0x2927b1?.[_0xcb8d08(0x169)]},_0x46bece),'',_0x1acced],_0x5f4197=_0x3e4f4e[_0xcb8d08(0x17e)]('\x0a');return _0x5f4197[_0xcb8d08(0x183)]('\x0a')?_0x5f4197:_0x5f4197+'\x0a';}export function stripLocalSqlMetadata(_0x18b5c0,_0x23d368){const _0x3d7e12=a123_0x5e60cf,_0x504c97=_0x18b5c0[_0x3d7e12(0x171)](/\r\n/g,'\x0a')[_0x3d7e12(0x163)]('\x0a'),_0x9107fd=[];let _0x5ee04e=0x0;if(_0x23d368===_0x3d7e12(0x176))while(_0x5ee04e<_0x504c97[_0x3d7e12(0x16f)]){const _0xe4db52=_0x504c97[_0x5ee04e]??'';if(/^\s*<!--\s*@lovrabet\./['test'](_0xe4db52)){_0x5ee04e++;continue;}if(_0xe4db52[_0x3d7e12(0x15e)]()===''&&_0x5ee04e>0x0){_0x5ee04e++;continue;}break;}else while(_0x5ee04e<_0x504c97[_0x3d7e12(0x16f)]){const _0x3bdb03=_0x504c97[_0x5ee04e]??'';if(/^\s*--\s*@lovrabet\./[_0x3d7e12(0x156)](_0x3bdb03)){_0x5ee04e++;continue;}if(_0x3bdb03[_0x3d7e12(0x15e)]()===''&&_0x5ee04e>0x0){_0x5ee04e++;continue;}break;}for(;_0x5ee04e<_0x504c97[_0x3d7e12(0x16f)];_0x5ee04e++){_0x9107fd['push'](_0x504c97[_0x5ee04e]);}return _0x9107fd['join']('\x0a')[_0x3d7e12(0x162)]();}export function resolveSqlMode(_0x4c5427,_0x147b95){const _0x3ddd5c=a123_0x5e60cf;if(_0x147b95?.['mode'])return _0x147b95[_0x3ddd5c(0x15b)];return detectSqlMode(_0x4c5427);}export function resolveSqlFileName(_0xf8d0af,_0x21ff0d,_0x1d5202){const _0x1fcd24=a123_0x5e60cf;if(_0x1d5202?.[_0x1fcd24(0x15a)])return _0x1d5202[_0x1fcd24(0x15a)];if(_0x1d5202?.[_0x1fcd24(0x180)]||_0x1d5202?.[_0x1fcd24(0x160)])return buildSqlRelativePath(_0xf8d0af,_0x1d5202?.[_0x1fcd24(0x180)],_0x1d5202?.[_0x1fcd24(0x160)],resolveSqlMode(_0x21ff0d,_0x1d5202),_0x1d5202?.[_0x1fcd24(0x167)]);return buildDefaultSqlFileName(_0xf8d0af,resolveSqlMode(_0x21ff0d,_0x1d5202));}export function resolveSqlLocalDir(_0xe87214,_0x38ec53){return join(_0xe87214,SQL_LOCAL_REL_DIR,_0x38ec53);}export async function confirmForceOverwrite(_0x1e5482){const _0x188ed5=a123_0x5e60cf,_0x34edfe=createInterface({'input':process['stdin'],'output':process[_0x188ed5(0x164)]}),_0x7c6b8e=await new Promise(_0x3637fb=>{const _0x8a1013=_0x188ed5;_0x34edfe['question'](_0x1e5482+_0x8a1013(0x16b),_0x3637fb);});return _0x34edfe[_0x188ed5(0x181)](),['y',_0x188ed5(0x17b)][_0x188ed5(0x17f)](_0x7c6b8e[_0x188ed5(0x15e)]()[_0x188ed5(0x161)]());}export function findSqlLockScope(_0x39d4f0,_0x30d887){const _0x3fbbb1=a123_0x5e60cf;return _0x39d4f0[_0x3fbbb1(0x172)][_0x30d887];}function buildMetadataHeaderLines(_0x4c5ebd,_0x193634){const _0x430959=a123_0x5e60cf,_0xf4e46e=[[_0x430959(0x15d),_0x4c5ebd[_0x430959(0x15d)]],[_0x430959(0x180),_0x4c5ebd['sqlName']],[_0x430959(0x167),_0x4c5ebd['dbId']],['dbName',_0x4c5ebd[_0x430959(0x160)]],[_0x430959(0x15b),_0x4c5ebd['mode']],[_0x430959(0x159),_0x4c5ebd[_0x430959(0x159)]],[_0x430959(0x169),_0x4c5ebd[_0x430959(0x169)]]];if(_0x193634==='mybatisXml')return _0xf4e46e[_0x430959(0x166)](([,_0x76fa2a])=>_0x76fa2a!==undefined&&_0x76fa2a!==null&&String(_0x76fa2a)[_0x430959(0x15e)]()!=='')[_0x430959(0x16d)](([_0x23f4a4,_0x237335])=>_0x430959(0x16a)+_0x23f4a4+':\x20'+String(_0x237335)+_0x430959(0x173));return _0xf4e46e[_0x430959(0x166)](([,_0x5636e3])=>_0x5636e3!==undefined&&_0x5636e3!==null&&String(_0x5636e3)[_0x430959(0x15e)]()!=='')['map'](([_0x53f124,_0x29a9ad])=>_0x430959(0x165)+_0x53f124+':\x20'+String(_0x29a9ad));}
1
+ const a124_0x9ad5a1=a124_0x26d7;(function(_0x4bad88,_0x458596){const _0x56c4fc=a124_0x26d7,_0x2ae8b2=_0x4bad88();while(!![]){try{const _0x43c1ec=-parseInt(_0x56c4fc(0x1a4))/0x1+-parseInt(_0x56c4fc(0x1a2))/0x2*(-parseInt(_0x56c4fc(0x1a5))/0x3)+parseInt(_0x56c4fc(0x18e))/0x4*(-parseInt(_0x56c4fc(0x1a1))/0x5)+parseInt(_0x56c4fc(0x19a))/0x6+-parseInt(_0x56c4fc(0x192))/0x7+parseInt(_0x56c4fc(0x186))/0x8+-parseInt(_0x56c4fc(0x183))/0x9;if(_0x43c1ec===_0x458596)break;else _0x2ae8b2['push'](_0x2ae8b2['shift']());}catch(_0x18e853){_0x2ae8b2['push'](_0x2ae8b2['shift']());}}}(a124_0x543c,0x57099));function a124_0x26d7(_0xc347f7,_0x4636b2){_0xc347f7=_0xc347f7-0x17e;const _0x543cb8=a124_0x543c();let _0x26d710=_0x543cb8[_0xc347f7];return _0x26d710;}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=a124_0x9ad5a1(0x1a6);export function buildSqlLockEntry(_0x1138c3,_0x32dff8,_0x3d78eb,_0x2d542b){const _0x10cfac=a124_0x9ad5a1,_0x3afd48=detectSqlMode(_0x32dff8);return{'path':buildSqlRelativePath(_0x1138c3['sqlCode'],_0x1138c3['sqlName'],_0x2d542b?.[_0x10cfac(0x197)],_0x3afd48,_0x1138c3[_0x10cfac(0x189)]),'hash':_0x3d78eb,'remoteId':_0x1138c3['id'],'version':_0x1138c3[_0x10cfac(0x19d)],'dbId':Number(_0x1138c3[_0x10cfac(0x189)]),'dbName':_0x2d542b?.[_0x10cfac(0x197)],'sqlName':_0x1138c3[_0x10cfac(0x195)],'sqlConfig':_0x1138c3[_0x10cfac(0x1a3)]??undefined,'mode':_0x3afd48};}export function cloneSqlLockData(_0x2572b5){const _0x3bc77c=a124_0x9ad5a1;return{'apps':Object[_0x3bc77c(0x185)](Object[_0x3bc77c(0x181)](_0x2572b5['apps'])[_0x3bc77c(0x199)](([_0x56581e,_0x4b4b5f])=>[_0x56581e,{'sqlRoot':_0x4b4b5f['sqlRoot'],'lastSync':_0x4b4b5f[_0x3bc77c(0x191)],'sqls':{..._0x4b4b5f['sqls']}}]))};}export function ensureRemoteSqlContent(_0x4a685c){const _0x54ba3f=a124_0x9ad5a1;return _0x4a685c[_0x54ba3f(0x19b)]??'';}export function buildLocalSqlFileContent(_0x20399c,_0x59882f,_0x1c2f62){const _0x51b74d=a124_0x9ad5a1,_0x34523e=_0x1c2f62?.[_0x51b74d(0x198)]??detectSqlMode(_0x59882f),_0xab220d=stripLocalSqlMetadata(_0x59882f,_0x34523e)[_0x51b74d(0x18c)](),_0x194f02=[...buildMetadataHeaderLines({'sqlCode':_0x20399c[_0x51b74d(0x180)],'sqlName':_0x20399c[_0x51b74d(0x195)],'dbId':_0x20399c[_0x51b74d(0x189)],'dbName':_0x1c2f62?.[_0x51b74d(0x197)],'mode':_0x34523e,'syncedAt':_0x1c2f62?.['syncedAt'],'description':_0x1c2f62?.['description']},_0x34523e),'',_0xab220d],_0x25c2e8=_0x194f02[_0x51b74d(0x19e)]('\x0a');return _0x25c2e8[_0x51b74d(0x17e)]('\x0a')?_0x25c2e8:_0x25c2e8+'\x0a';}export function stripLocalSqlMetadata(_0x255175,_0x4cd094){const _0x124463=a124_0x9ad5a1,_0xde9c48=_0x255175[_0x124463(0x19c)](/\r\n/g,'\x0a')['split']('\x0a'),_0x46c476=[];let _0x510ea2=0x0;if(_0x4cd094===_0x124463(0x18b))while(_0x510ea2<_0xde9c48['length']){const _0x3b0ec1=_0xde9c48[_0x510ea2]??'';if(/^\s*<!--\s*@lovrabet\./[_0x124463(0x187)](_0x3b0ec1)){_0x510ea2++;continue;}if(_0x3b0ec1[_0x124463(0x18c)]()===''&&_0x510ea2>0x0){_0x510ea2++;continue;}break;}else while(_0x510ea2<_0xde9c48['length']){const _0x3c901a=_0xde9c48[_0x510ea2]??'';if(/^\s*--\s*@lovrabet\./[_0x124463(0x187)](_0x3c901a)){_0x510ea2++;continue;}if(_0x3c901a[_0x124463(0x18c)]()===''&&_0x510ea2>0x0){_0x510ea2++;continue;}break;}for(;_0x510ea2<_0xde9c48[_0x124463(0x18f)];_0x510ea2++){_0x46c476[_0x124463(0x193)](_0xde9c48[_0x510ea2]);}return _0x46c476['join']('\x0a')['trimStart']();}export function resolveSqlMode(_0x4d2ac5,_0x2a3814){if(_0x2a3814?.['mode'])return _0x2a3814['mode'];return detectSqlMode(_0x4d2ac5);}export function resolveSqlFileName(_0x37e9fe,_0x2e9e15,_0x14adde){const _0x389a83=a124_0x9ad5a1;if(_0x14adde?.[_0x389a83(0x194)])return _0x14adde[_0x389a83(0x194)];if(_0x14adde?.[_0x389a83(0x195)]||_0x14adde?.[_0x389a83(0x197)])return buildSqlRelativePath(_0x37e9fe,_0x14adde?.[_0x389a83(0x195)],_0x14adde?.[_0x389a83(0x197)],resolveSqlMode(_0x2e9e15,_0x14adde),_0x14adde?.['dbId']);return buildDefaultSqlFileName(_0x37e9fe,resolveSqlMode(_0x2e9e15,_0x14adde));}function a124_0x543c(){const _0x25e152=['sqlCode','entries','<!--\x20@lovrabet.','1084806nHncsx','\x20[y/N]\x20','fromEntries','3085128KXSKmb','test','toLowerCase','dbId','\x20-->','mybatisXml','trim','apps','160GzKGtR','length','--\x20@lovrabet.','lastSync','2158786blwoQs','push','path','sqlName','stdin','dbName','mode','map','3430086EMvkGW','sqlContent','replace','version','join','includes','stderr','55300uSKMLO','348zQFLEK','sqlConfig','314299bZSUHv','10083FJyojs','.rabetbase/sql','endsWith','filter'];a124_0x543c=function(){return _0x25e152;};return a124_0x543c();}export function resolveSqlLocalDir(_0x1cb85d,_0x56c53c){return join(_0x1cb85d,SQL_LOCAL_REL_DIR,_0x56c53c);}export async function confirmForceOverwrite(_0x171078){const _0x106e0b=a124_0x9ad5a1,_0x29828e=createInterface({'input':process[_0x106e0b(0x196)],'output':process[_0x106e0b(0x1a0)]}),_0x168220=await new Promise(_0x409820=>{const _0x425c67=_0x106e0b;_0x29828e['question'](_0x171078+_0x425c67(0x184),_0x409820);});return _0x29828e['close'](),['y','yes'][_0x106e0b(0x19f)](_0x168220[_0x106e0b(0x18c)]()[_0x106e0b(0x188)]());}export function findSqlLockScope(_0x538faa,_0x1a6f14){const _0x4618a3=a124_0x9ad5a1;return _0x538faa[_0x4618a3(0x18d)][_0x1a6f14];}function buildMetadataHeaderLines(_0x155631,_0x55a337){const _0x56262=a124_0x9ad5a1,_0x4d3708=[[_0x56262(0x180),_0x155631['sqlCode']],[_0x56262(0x195),_0x155631['sqlName']],['dbId',_0x155631['dbId']],[_0x56262(0x197),_0x155631['dbName']],[_0x56262(0x198),_0x155631[_0x56262(0x198)]],['syncedAt',_0x155631['syncedAt']],['description',_0x155631['description']]];if(_0x55a337===_0x56262(0x18b))return _0x4d3708['filter'](([,_0xa1c8d0])=>_0xa1c8d0!==undefined&&_0xa1c8d0!==null&&String(_0xa1c8d0)[_0x56262(0x18c)]()!=='')[_0x56262(0x199)](([_0x37ae02,_0x58c31d])=>_0x56262(0x182)+_0x37ae02+':\x20'+String(_0x58c31d)+_0x56262(0x18a));return _0x4d3708[_0x56262(0x17f)](([,_0xce7373])=>_0xce7373!==undefined&&_0xce7373!==null&&String(_0xce7373)['trim']()!=='')[_0x56262(0x199)](([_0x53ff0a,_0x37fb4d])=>_0x56262(0x190)+_0x53ff0a+':\x20'+String(_0x37fb4d));}
@@ -1 +1 @@
1
- const a124_0x2455d2=a124_0x54c4;(function(_0x14d71,_0x29a370){const _0x3c73e9=a124_0x54c4,_0x50e9b0=_0x14d71();while(!![]){try{const _0x3ce82=parseInt(_0x3c73e9(0x1b4))/0x1*(-parseInt(_0x3c73e9(0x1ba))/0x2)+-parseInt(_0x3c73e9(0x1a2))/0x3*(parseInt(_0x3c73e9(0x1bd))/0x4)+-parseInt(_0x3c73e9(0x1a1))/0x5+-parseInt(_0x3c73e9(0x1a9))/0x6+-parseInt(_0x3c73e9(0x1a4))/0x7*(parseInt(_0x3c73e9(0x1c1))/0x8)+parseInt(_0x3c73e9(0x1af))/0x9*(-parseInt(_0x3c73e9(0x1c5))/0xa)+parseInt(_0x3c73e9(0x1a3))/0xb;if(_0x3ce82===_0x29a370)break;else _0x50e9b0['push'](_0x50e9b0['shift']());}catch(_0x1e322e){_0x50e9b0['push'](_0x50e9b0['shift']());}}}(a124_0x677a,0xa0199));function a124_0x677a(){const _0x3ab4df=['5236878BpUMqH','sql','status','\x20missing,\x20','length','appCode','365832uigaWM','map','paging','filePath','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','332uOPQar','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','lockKey','tableData','sqlRoot','remote','7058iQjzUa','bool','sqlCode','4881724ObiGWc','keys','push','has','2913736KuCFao','relativePath','\x20remote-only','All\x20SQL\x20queries\x20are\x20in\x20sync.','70YZnGhU','sqls','hash','479210BSRvVW','3nqsCsH','55323983wxfBhC','14CnvqwN','sqlName','\x20unchanged','path','read'];a124_0x677a=function(){return _0x3ab4df;};return a124_0x677a();}import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';function a124_0x54c4(_0x3ae7d6,_0x450b04){_0x3ae7d6=_0x3ae7d6-0x19f;const _0x677a7=a124_0x677a();let _0x54c45a=_0x677a7[_0x3ae7d6];return _0x54c45a;}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(_0x321fa9){const _0x39e241=a124_0x54c4,_0x2066a3=[];let _0xbb3166=0x1;while(!![]){const _0x1a06d5=await listSqlQueries(_0x321fa9,{'currentPage':_0xbb3166,'pageSize':PAGE_SIZE}),_0x26eef5=_0x1a06d5[_0x39e241(0x1b7)]??[];_0x2066a3[_0x39e241(0x1bf)](..._0x26eef5[_0x39e241(0x1b0)](_0x611345=>_0x611345[_0x39e241(0x1bc)]));if(_0x26eef5['length']===0x0)break;const _0x4fd0ea=_0x1a06d5[_0x39e241(0x1b1)]?.['totalCount'];if(_0x4fd0ea!=null?_0x2066a3['length']>=_0x4fd0ea:_0x26eef5[_0x39e241(0x1ad)]<PAGE_SIZE)break;_0xbb3166++;}return _0x2066a3;}export const sqlStatus={'service':a124_0x2455d2(0x1aa),'command':a124_0x2455d2(0x1ab),'description':a124_0x2455d2(0x1b3),'risk':a124_0x2455d2(0x1a8),'flags':[{'name':'remote','type':'boolean','description':a124_0x2455d2(0x1b5)}],async 'execute'(_0x31d968){const _0x365d9b=a124_0x2455d2,_0x4a28dd=loadSqlProjectConfig(_0x31d968[_0x365d9b(0x1ae)]),_0x323752=await readSqlLockFile(_0x4a28dd['lockFilePath']),{appLock:_0x5f5812}=ensureSqlLockScope(_0x323752??createEmptySqlLock(),_0x4a28dd[_0x365d9b(0x1ae)],_0x4a28dd[_0x365d9b(0x1b8)],_0x365d9b(0x1ab)),_0x5dd69a=await scanLocalSqlQueries(_0x4a28dd),_0x1382bd=[],_0x18d366=[],_0x164943=[],_0x1d834f=[],_0x1a4ead=new Set(_0x5dd69a[_0x365d9b(0x1b0)](_0x5d4aac=>_0x5d4aac[_0x365d9b(0x1b6)]));for(const _0x583ef1 of _0x5dd69a){const _0x1ba499=await computeSqlFileHash(_0x583ef1[_0x365d9b(0x1b2)]),_0x41dfb2=_0x5f5812[_0x365d9b(0x19f)][_0x583ef1['lockKey']],_0x4f61aa=!!_0x41dfb2&&_0x41dfb2[_0x365d9b(0x1a7)]!==_0x583ef1[_0x365d9b(0x1c2)],_0x53946c=!!_0x41dfb2&&!!_0x583ef1[_0x365d9b(0x1a5)]&&_0x41dfb2[_0x365d9b(0x1a5)]!==_0x583ef1[_0x365d9b(0x1a5)];if(!_0x41dfb2)_0x1382bd['push'](_0x583ef1['lockKey']);else _0x41dfb2[_0x365d9b(0x1a0)]!==_0x1ba499||_0x4f61aa||_0x53946c?_0x18d366['push'](_0x583ef1[_0x365d9b(0x1b6)]):_0x164943[_0x365d9b(0x1bf)](_0x583ef1[_0x365d9b(0x1b6)]);}for(const _0x103996 of Object[_0x365d9b(0x1be)](_0x5f5812[_0x365d9b(0x19f)])){!_0x1a4ead[_0x365d9b(0x1c0)](_0x103996)&&_0x1d834f[_0x365d9b(0x1bf)](_0x103996);}const _0x20fe68=[];if(_0x31d968[_0x365d9b(0x1bb)](_0x365d9b(0x1b9))){const _0x1738a2=await fetchAllSqlCodes(_0x31d968['appCode']);for(const _0x532f06 of _0x1738a2){!_0x1a4ead['has'](_0x532f06)&&!_0x5f5812['sqls'][_0x532f06]&&_0x20fe68['push'](_0x532f06);}}const _0x254f6b=_0x1382bd[_0x365d9b(0x1ad)]===0x0&&_0x18d366[_0x365d9b(0x1ad)]===0x0&&_0x1d834f[_0x365d9b(0x1ad)]===0x0&&_0x20fe68[_0x365d9b(0x1ad)]===0x0;return{'ok':!![],'data':{'added':_0x1382bd,'modified':_0x18d366,'missing':_0x1d834f,'unchanged':_0x164943,'remoteOnly':_0x20fe68},'message':_0x254f6b?_0x365d9b(0x1c4):_0x1382bd[_0x365d9b(0x1ad)]+'\x20added,\x20'+_0x18d366[_0x365d9b(0x1ad)]+'\x20modified,\x20'+_0x1d834f['length']+_0x365d9b(0x1ac)+_0x164943[_0x365d9b(0x1ad)]+_0x365d9b(0x1a6)+(_0x20fe68[_0x365d9b(0x1ad)]>0x0?',\x20'+_0x20fe68[_0x365d9b(0x1ad)]+_0x365d9b(0x1c3):'')};}};
1
+ function a125_0x5052(){const _0x13e322=['1885304auBjlM','length','bool','\x20missing,\x20','push','sqlRoot','lockKey','4729984mjWvze','filePath','paging','appCode','1297994yhLNTY','keys','sqlCode','1klSuqU','7ogIIgc','has','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','3596790RLKfVi','All\x20SQL\x20queries\x20are\x20in\x20sync.','sqls','sql','remote','map','\x20unchanged','\x20modified,\x20','boolean','path','tableData','read','5962590gKFYAc','82575WCkuFA','3497568BsnUpJ','hash','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','sqlName','\x20added,\x20'];a125_0x5052=function(){return _0x13e322;};return a125_0x5052();}const a125_0xdb1436=a125_0x42c0;(function(_0x1f9bb9,_0x45f7d0){const _0x28c861=a125_0x42c0,_0x23a0e7=_0x1f9bb9();while(!![]){try{const _0x1347b5=parseInt(_0x28c861(0x93))/0x1*(parseInt(_0x28c861(0x90))/0x2)+-parseInt(_0x28c861(0x80))/0x3+parseInt(_0x28c861(0x8c))/0x4+parseInt(_0x28c861(0x7f))/0x5+-parseInt(_0x28c861(0x97))/0x6+parseInt(_0x28c861(0x94))/0x7*(parseInt(_0x28c861(0x85))/0x8)+parseInt(_0x28c861(0x7e))/0x9;if(_0x1347b5===_0x45f7d0)break;else _0x23a0e7['push'](_0x23a0e7['shift']());}catch(_0x5814ef){_0x23a0e7['push'](_0x23a0e7['shift']());}}}(a125_0x5052,0xef77c));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';const PAGE_SIZE=0x64;function a125_0x42c0(_0x20b92e,_0x4db861){_0x20b92e=_0x20b92e-0x78;const _0x50520a=a125_0x5052();let _0x42c02b=_0x50520a[_0x20b92e];return _0x42c02b;}async function fetchAllSqlCodes(_0x32ba52){const _0x41ee16=a125_0x42c0,_0x2f5660=[];let _0x2aa969=0x1;while(!![]){const _0x4c541c=await listSqlQueries(_0x32ba52,{'currentPage':_0x2aa969,'pageSize':PAGE_SIZE}),_0x52dbab=_0x4c541c[_0x41ee16(0x7c)]??[];_0x2f5660['push'](..._0x52dbab[_0x41ee16(0x9c)](_0x302283=>_0x302283[_0x41ee16(0x92)]));if(_0x52dbab[_0x41ee16(0x86)]===0x0)break;const _0xc6de43=_0x4c541c[_0x41ee16(0x8e)]?.['totalCount'];if(_0xc6de43!=null?_0x2f5660[_0x41ee16(0x86)]>=_0xc6de43:_0x52dbab[_0x41ee16(0x86)]<PAGE_SIZE)break;_0x2aa969++;}return _0x2f5660;}export const sqlStatus={'service':a125_0xdb1436(0x9a),'command':'status','description':a125_0xdb1436(0x82),'risk':a125_0xdb1436(0x7d),'flags':[{'name':a125_0xdb1436(0x9b),'type':a125_0xdb1436(0x7a),'description':a125_0xdb1436(0x96)}],async 'execute'(_0x2554cd){const _0x52c64e=a125_0xdb1436,_0x17a432=loadSqlProjectConfig(_0x2554cd[_0x52c64e(0x8f)]),_0x558a76=await readSqlLockFile(_0x17a432['lockFilePath']),{appLock:_0x3411b3}=ensureSqlLockScope(_0x558a76??createEmptySqlLock(),_0x17a432[_0x52c64e(0x8f)],_0x17a432[_0x52c64e(0x8a)],'status'),_0x1250be=await scanLocalSqlQueries(_0x17a432),_0x5d6336=[],_0x18d50b=[],_0x2b180c=[],_0x595daf=[],_0x5af1e0=new Set(_0x1250be[_0x52c64e(0x9c)](_0xa397f4=>_0xa397f4[_0x52c64e(0x8b)]));for(const _0x372a0d of _0x1250be){const _0x19a59c=await computeSqlFileHash(_0x372a0d[_0x52c64e(0x8d)]),_0x123019=_0x3411b3['sqls'][_0x372a0d['lockKey']],_0x4cec71=!!_0x123019&&_0x123019[_0x52c64e(0x7b)]!==_0x372a0d['relativePath'],_0x5f612f=!!_0x123019&&!!_0x372a0d[_0x52c64e(0x83)]&&_0x123019[_0x52c64e(0x83)]!==_0x372a0d[_0x52c64e(0x83)];if(!_0x123019)_0x5d6336[_0x52c64e(0x89)](_0x372a0d[_0x52c64e(0x8b)]);else _0x123019[_0x52c64e(0x81)]!==_0x19a59c||_0x4cec71||_0x5f612f?_0x18d50b['push'](_0x372a0d[_0x52c64e(0x8b)]):_0x2b180c[_0x52c64e(0x89)](_0x372a0d[_0x52c64e(0x8b)]);}for(const _0x3a6ef6 of Object[_0x52c64e(0x91)](_0x3411b3[_0x52c64e(0x99)])){!_0x5af1e0[_0x52c64e(0x95)](_0x3a6ef6)&&_0x595daf[_0x52c64e(0x89)](_0x3a6ef6);}const _0x26ea80=[];if(_0x2554cd[_0x52c64e(0x87)](_0x52c64e(0x9b))){const _0x57dc2d=await fetchAllSqlCodes(_0x2554cd[_0x52c64e(0x8f)]);for(const _0x382257 of _0x57dc2d){!_0x5af1e0['has'](_0x382257)&&!_0x3411b3['sqls'][_0x382257]&&_0x26ea80[_0x52c64e(0x89)](_0x382257);}}const _0x509369=_0x5d6336[_0x52c64e(0x86)]===0x0&&_0x18d50b[_0x52c64e(0x86)]===0x0&&_0x595daf['length']===0x0&&_0x26ea80[_0x52c64e(0x86)]===0x0;return{'ok':!![],'data':{'added':_0x5d6336,'modified':_0x18d50b,'missing':_0x595daf,'unchanged':_0x2b180c,'remoteOnly':_0x26ea80},'message':_0x509369?_0x52c64e(0x98):_0x5d6336[_0x52c64e(0x86)]+_0x52c64e(0x84)+_0x18d50b[_0x52c64e(0x86)]+_0x52c64e(0x79)+_0x595daf[_0x52c64e(0x86)]+_0x52c64e(0x88)+_0x2b180c['length']+_0x52c64e(0x78)+(_0x26ea80[_0x52c64e(0x86)]>0x0?',\x20'+_0x26ea80[_0x52c64e(0x86)]+'\x20remote-only':'')};}};
@@ -1 +1 @@
1
- function a125_0x1362(_0x348a51,_0x3615d6){_0x348a51=_0x348a51-0x135;const _0x4e98af=a125_0x4e98();let _0x1362ba=_0x4e98af[_0x348a51];return _0x1362ba;}const a125_0x2818fe=a125_0x1362;(function(_0xf03a6d,_0x4d37a8){const _0x4828a1=a125_0x1362,_0x535055=_0xf03a6d();while(!![]){try{const _0xe0e5b=-parseInt(_0x4828a1(0x15f))/0x1*(parseInt(_0x4828a1(0x154))/0x2)+parseInt(_0x4828a1(0x14d))/0x3+parseInt(_0x4828a1(0x14a))/0x4+parseInt(_0x4828a1(0x135))/0x5+-parseInt(_0x4828a1(0x14c))/0x6+-parseInt(_0x4828a1(0x138))/0x7*(parseInt(_0x4828a1(0x13f))/0x8)+parseInt(_0x4828a1(0x13a))/0x9;if(_0xe0e5b===_0x4d37a8)break;else _0x535055['push'](_0x535055['shift']());}catch(_0x20cf72){_0x535055['push'](_0x535055['shift']());}}}(a125_0x4e98,0x4358a));import{readFileSync,existsSync}from'node:fs';function a125_0x4e98(){const _0x1acf2d=['split','759470Fwelbu','isSelectOnly','sql','462LmIZdm','str','1903545EFJTlW','parameters','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','cwd','Dataset\x20\x22','40120JZkIzE','string','get','file','fields','toLowerCase','size','tables','File\x20not\x20found:\x20','appCode','map','1516132jNbffV','Provide\x20--file\x20or\x20--sql','668082ivUGgp','1547772mGjDwH','utf-8','validation','isArray','schemas','\x22\x20not\x20found\x20in\x20any\x20dataset','valid','1080338EbfUUv','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','Table\x20\x22','isDangerous','sqlType','\x22\x20not\x20found\x20or\x20not\x20accessible','tableName','from','filter','name','push','1pqHtlG','message','reason','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','flagMissing','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)'];a125_0x4e98=function(){return _0x1acf2d;};return a125_0x4e98();}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_0x2818fe(0x137),'command':'validate','description':a125_0x2818fe(0x164),'risk':'read','flags':[{'name':a125_0x2818fe(0x142),'type':a125_0x2818fe(0x140),'description':a125_0x2818fe(0x155)},{'name':a125_0x2818fe(0x137),'type':a125_0x2818fe(0x140),'description':a125_0x2818fe(0x162)},{'name':a125_0x2818fe(0x151),'type':a125_0x2818fe(0x140),'description':a125_0x2818fe(0x13c)}],async 'execute'(_0x75d018){const _0x3d8f73=a125_0x2818fe,_0x2243b8=_0x75d018[_0x3d8f73(0x139)](_0x3d8f73(0x142)),_0x198f12=_0x75d018[_0x3d8f73(0x139)](_0x3d8f73(0x137));if(!_0x2243b8&&!_0x198f12)throw CliErrors[_0x3d8f73(0x163)](_0x3d8f73(0x142),_0x3d8f73(0x14b));let _0x14da6c;if(_0x2243b8){const _0xa94f79=resolve(process[_0x3d8f73(0x13d)](),_0x2243b8);if(!existsSync(_0xa94f79))throw CliErrors[_0x3d8f73(0x14f)](_0x3d8f73(0x147)+_0xa94f79);_0x14da6c=readFileSync(_0xa94f79,_0x3d8f73(0x14e));}else _0x14da6c=_0x198f12;const _0x4494f0=validateSql(_0x14da6c),_0x5d4020={'valid':_0x4494f0[_0x3d8f73(0x153)],'sqlType':_0x4494f0[_0x3d8f73(0x158)]['type'],'isSelectOnly':_0x4494f0[_0x3d8f73(0x158)][_0x3d8f73(0x136)],'isDangerous':_0x4494f0['sqlType'][_0x3d8f73(0x157)],'tables':_0x4494f0[_0x3d8f73(0x146)],'parameters':_0x4494f0[_0x3d8f73(0x13b)],'message':_0x4494f0[_0x3d8f73(0x160)]};_0x4494f0['sqlType'][_0x3d8f73(0x161)]&&(_0x5d4020[_0x3d8f73(0x161)]=_0x4494f0[_0x3d8f73(0x158)]['reason']);const _0x28b4ca=_0x75d018['str']('schemas');if(_0x28b4ca&&_0x4494f0[_0x3d8f73(0x153)]){const _0x531571=_0x28b4ca[_0x3d8f73(0x165)](',')[_0x3d8f73(0x149)](_0x186f40=>_0x186f40['trim']())[_0x3d8f73(0x15c)](Boolean),_0x2c6e55=[],_0x23d3fd=await listDatasets(_0x75d018[_0x3d8f73(0x148)]),_0x5307fd=new Map(_0x23d3fd[_0x3d8f73(0x149)](_0x5348e7=>[_0x5348e7['dbtableConfig']?.['tableName']?.[_0x3d8f73(0x144)](),_0x5348e7]));for(const _0x5c5365 of _0x4494f0[_0x3d8f73(0x146)]){const _0x475879=_0x5307fd[_0x3d8f73(0x141)](_0x5c5365[_0x3d8f73(0x144)]());!_0x475879&&_0x2c6e55['push'](_0x3d8f73(0x156)+_0x5c5365+_0x3d8f73(0x152));}for(const _0xcc8437 of _0x531571){try{const _0x2fd24e=await getDatasetDetail(_0xcc8437),_0x22303b=Array[_0x3d8f73(0x150)](_0x2fd24e[_0x3d8f73(0x143)])?_0x2fd24e[_0x3d8f73(0x143)]:[],_0x2b259b=new Set(_0x22303b[_0x3d8f73(0x149)](_0x5918c8=>_0x5918c8[_0x3d8f73(0x15d)]?.[_0x3d8f73(0x144)]())),_0x280bc6=_0x2fd24e['dbtableConfig']?.[_0x3d8f73(0x15a)]||_0x2fd24e[_0x3d8f73(0x15a)]||_0xcc8437;_0x5d4020['schema:'+_0x280bc6]={'code':_0xcc8437,'tableName':_0x280bc6,'fieldCount':_0x2b259b[_0x3d8f73(0x145)],'fields':Array[_0x3d8f73(0x15b)](_0x2b259b)};}catch{_0x2c6e55[_0x3d8f73(0x15e)](_0x3d8f73(0x13e)+_0xcc8437+_0x3d8f73(0x159));}}_0x2c6e55['length']>0x0&&(_0x5d4020['schemaWarnings']=_0x2c6e55);}return{'ok':_0x4494f0[_0x3d8f73(0x153)],'data':_0x5d4020,'message':_0x4494f0[_0x3d8f73(0x160)]};}};
1
+ const a126_0x2f23c9=a126_0x7f73;(function(_0x57ff4f,_0x5035c2){const _0x1a9ee0=a126_0x7f73,_0x560952=_0x57ff4f();while(!![]){try{const _0x1e4007=parseInt(_0x1a9ee0(0x139))/0x1+-parseInt(_0x1a9ee0(0x13b))/0x2+-parseInt(_0x1a9ee0(0x152))/0x3*(parseInt(_0x1a9ee0(0x147))/0x4)+parseInt(_0x1a9ee0(0x154))/0x5*(parseInt(_0x1a9ee0(0x15d))/0x6)+-parseInt(_0x1a9ee0(0x13e))/0x7*(-parseInt(_0x1a9ee0(0x153))/0x8)+parseInt(_0x1a9ee0(0x166))/0x9+-parseInt(_0x1a9ee0(0x144))/0xa;if(_0x1e4007===_0x5035c2)break;else _0x560952['push'](_0x560952['shift']());}catch(_0x59b392){_0x560952['push'](_0x560952['shift']());}}}(a126_0xf90b,0xe97b8));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';function a126_0x7f73(_0x22382b,_0x4ae8ed){_0x22382b=_0x22382b-0x139;const _0xf90b4c=a126_0xf90b();let _0x7f734e=_0xf90b4c[_0x22382b];return _0x7f734e;}import{validateSql}from'../../core/sql-validator.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a126_0xf90b(){const _0x3c93ad=['file','string','message','validate','reason','2260074qEikYO','read','schemas','cwd','trim','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','Provide\x20--file\x20or\x20--sql','map','Table\x20\x22','7049934FLXKTC','dbtableConfig','str','1700430dCWEkT','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','2149714vCIoev','tableName','size','2546355cMtnNW','from','flagMissing','valid','File\x20not\x20found:\x20','isSelectOnly','14866650HBweJD','tables','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','8992uSowXy','sqlType','isArray','Dataset\x20\x22','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','toLowerCase','validation','sql','parameters','fields','isDangerous','579sIZLqe','24NEZkUu','5kqmcbh','push','name','appCode'];a126_0xf90b=function(){return _0x3c93ad;};return a126_0xf90b();}export const sqlValidate={'service':a126_0x2f23c9(0x14e),'command':a126_0x2f23c9(0x15b),'description':a126_0x2f23c9(0x13a),'risk':a126_0x2f23c9(0x15e),'flags':[{'name':a126_0x2f23c9(0x158),'type':a126_0x2f23c9(0x159),'description':a126_0x2f23c9(0x14b)},{'name':a126_0x2f23c9(0x14e),'type':a126_0x2f23c9(0x159),'description':a126_0x2f23c9(0x146)},{'name':a126_0x2f23c9(0x15f),'type':a126_0x2f23c9(0x159),'description':a126_0x2f23c9(0x162)}],async 'execute'(_0x42ff7e){const _0x1032b4=a126_0x2f23c9,_0xf67ce=_0x42ff7e['str'](_0x1032b4(0x158)),_0x3c479d=_0x42ff7e[_0x1032b4(0x168)](_0x1032b4(0x14e));if(!_0xf67ce&&!_0x3c479d)throw CliErrors[_0x1032b4(0x140)](_0x1032b4(0x158),_0x1032b4(0x163));let _0x2acf94;if(_0xf67ce){const _0x316d7c=resolve(process[_0x1032b4(0x160)](),_0xf67ce);if(!existsSync(_0x316d7c))throw CliErrors[_0x1032b4(0x14d)](_0x1032b4(0x142)+_0x316d7c);_0x2acf94=readFileSync(_0x316d7c,'utf-8');}else _0x2acf94=_0x3c479d;const _0x5389b4=validateSql(_0x2acf94),_0x3e9041={'valid':_0x5389b4[_0x1032b4(0x141)],'sqlType':_0x5389b4[_0x1032b4(0x148)]['type'],'isSelectOnly':_0x5389b4[_0x1032b4(0x148)][_0x1032b4(0x143)],'isDangerous':_0x5389b4['sqlType'][_0x1032b4(0x151)],'tables':_0x5389b4[_0x1032b4(0x145)],'parameters':_0x5389b4[_0x1032b4(0x14f)],'message':_0x5389b4[_0x1032b4(0x15a)]};_0x5389b4[_0x1032b4(0x148)][_0x1032b4(0x15c)]&&(_0x3e9041[_0x1032b4(0x15c)]=_0x5389b4[_0x1032b4(0x148)][_0x1032b4(0x15c)]);const _0xa35208=_0x42ff7e['str'](_0x1032b4(0x15f));if(_0xa35208&&_0x5389b4['valid']){const _0x3e154d=_0xa35208['split'](',')['map'](_0x548b32=>_0x548b32[_0x1032b4(0x161)]())['filter'](Boolean),_0x27f138=[],_0xa6376a=await listDatasets(_0x42ff7e[_0x1032b4(0x157)]),_0x458f55=new Map(_0xa6376a[_0x1032b4(0x164)](_0xd37417=>[_0xd37417[_0x1032b4(0x167)]?.[_0x1032b4(0x13c)]?.[_0x1032b4(0x14c)](),_0xd37417]));for(const _0x429ade of _0x5389b4['tables']){const _0x392ec2=_0x458f55['get'](_0x429ade[_0x1032b4(0x14c)]());!_0x392ec2&&_0x27f138[_0x1032b4(0x155)](_0x1032b4(0x165)+_0x429ade+'\x22\x20not\x20found\x20in\x20any\x20dataset');}for(const _0x268250 of _0x3e154d){try{const _0x2013c0=await getDatasetDetail(_0x268250),_0x1b7a9d=Array[_0x1032b4(0x149)](_0x2013c0[_0x1032b4(0x150)])?_0x2013c0[_0x1032b4(0x150)]:[],_0x28161a=new Set(_0x1b7a9d['map'](_0x40c2d3=>_0x40c2d3[_0x1032b4(0x156)]?.[_0x1032b4(0x14c)]())),_0x2ac4b8=_0x2013c0[_0x1032b4(0x167)]?.[_0x1032b4(0x13c)]||_0x2013c0[_0x1032b4(0x13c)]||_0x268250;_0x3e9041['schema:'+_0x2ac4b8]={'code':_0x268250,'tableName':_0x2ac4b8,'fieldCount':_0x28161a[_0x1032b4(0x13d)],'fields':Array[_0x1032b4(0x13f)](_0x28161a)};}catch{_0x27f138[_0x1032b4(0x155)](_0x1032b4(0x14a)+_0x268250+'\x22\x20not\x20found\x20or\x20not\x20accessible');}}_0x27f138['length']>0x0&&(_0x3e9041['schemaWarnings']=_0x27f138);}return{'ok':_0x5389b4['valid'],'data':_0x3e9041,'message':_0x5389b4['message']};}};
@@ -1 +1 @@
1
- const a126_0x134329=a126_0x3b7c;(function(_0x38d3e7,_0x157f7c){const _0x10e9cf=a126_0x3b7c,_0x4a75ad=_0x38d3e7();while(!![]){try{const _0x1005c5=parseInt(_0x10e9cf(0xfa))/0x1+parseInt(_0x10e9cf(0xfb))/0x2+-parseInt(_0x10e9cf(0x108))/0x3*(parseInt(_0x10e9cf(0xfe))/0x4)+parseInt(_0x10e9cf(0x111))/0x5+-parseInt(_0x10e9cf(0x107))/0x6+parseInt(_0x10e9cf(0x10c))/0x7*(-parseInt(_0x10e9cf(0x11c))/0x8)+parseInt(_0x10e9cf(0x105))/0x9;if(_0x1005c5===_0x157f7c)break;else _0x4a75ad['push'](_0x4a75ad['shift']());}catch(_0x3f49d7){_0x4a75ad['push'](_0x4a75ad['shift']());}}}(a126_0x2849,0x3dcdd));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_0x134329(0x104),'accessKey',a126_0x134329(0x113),'format',a126_0x134329(0x116)];export const TOP_LEVEL_CONFIG_KEYS=new Set([a126_0x134329(0x110),a126_0x134329(0x114),'locale',a126_0x134329(0x10b),a126_0x134329(0x104),a126_0x134329(0x103),a126_0x134329(0x106)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x1f022b){const _0x5c88cb=a126_0x134329;return[..._0x1f022b][_0x5c88cb(0x11a)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x87cd27){return TOP_LEVEL_CONFIG_KEYS['has'](_0x87cd27);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x16de04=a126_0x134329;return _0x16de04(0x101)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':a126_0x134329(0x114),'apiDir':a126_0x134329(0x106),'cookie':a126_0x134329(0x104),'accessKey':a126_0x134329(0x103),'defaultFormat':a126_0x134329(0x10b),'pageSize':'pageSize','riskLevel':'riskLevel','locale':a126_0x134329(0x113)};export function getAppProfileFlagDefs(){const _0x35ee82=a126_0x134329;return[{'name':_0x35ee82(0x114),'type':_0x35ee82(0x10d),'description':'Target\x20environment','enum':[...RABETBASE_ENV_VALUES]},{'name':_0x35ee82(0x106),'type':'string','description':_0x35ee82(0x100)},{'name':_0x35ee82(0x104),'type':_0x35ee82(0x10d),'description':_0x35ee82(0xf7),'hidden':!![]},{'name':_0x35ee82(0x103),'type':_0x35ee82(0x10d),'description':_0x35ee82(0x10a),'hidden':!![]},{'name':'defaultFormat','type':_0x35ee82(0x10d),'description':_0x35ee82(0x10f),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0x35ee82(0xff),'type':_0x35ee82(0x115),'description':'Default\x20page\x20size'},{'name':_0x35ee82(0x116),'type':'string','description':_0x35ee82(0x11b),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x35ee82(0x113),'type':_0x35ee82(0x10d),'description':_0x35ee82(0x118)}];}export function collectAppProfileOverrides(_0x533ee9){const _0x25a46b=a126_0x134329,_0x36cd7a={};for(const [_0x5d4c83,_0x3ac20a]of Object[_0x25a46b(0x112)](APP_PROFILE_FLAG_KEY_MAP)){const _0x5539aa=_0x533ee9(_0x5d4c83);if(!_0x5539aa)continue;_0x36cd7a[_0x3ac20a]=_0x3ac20a===_0x25a46b(0xff)?Number(_0x5539aa):_0x5539aa;}return _0x36cd7a;}export function buildAppProfileListFields(_0x29794c){const _0x254848=a126_0x134329;return{'env':_0x29794c['env']??null,'apiDir':_0x29794c[_0x254848(0x106)]??null,'hasCookie':!!_0x29794c['cookie'],'hasAccessKey':!!_0x29794c[_0x254848(0x103)],'format':_0x29794c[_0x254848(0x10b)]??null,'pageSize':_0x29794c[_0x254848(0xff)]??null,'riskLevel':_0x29794c['riskLevel']??null,'locale':_0x29794c['locale']??null};}export function buildAppDoctorFields(_0x56f4e0,_0x196492){const _0x5ed940=a126_0x134329;return{'env':{'value':_0x56f4e0[_0x5ed940(0x114)]||_0x196492[_0x5ed940(0x114)],'source':_0x56f4e0['env']?'app':_0x5ed940(0x119)},'apiDir':{'value':_0x56f4e0['apiDir']||_0x196492[_0x5ed940(0x106)],'source':_0x56f4e0[_0x5ed940(0x106)]?_0x5ed940(0x109):_0x5ed940(0x119)},'cookie':{'value':_0x56f4e0[_0x5ed940(0x104)]||_0x196492[_0x5ed940(0x104)],'source':_0x56f4e0['cookie']?_0x5ed940(0x109):'inherit'},'accessKey':{'value':_0x56f4e0[_0x5ed940(0x103)]||_0x196492[_0x5ed940(0x103)],'source':_0x56f4e0[_0x5ed940(0x103)]?_0x5ed940(0x109):_0x5ed940(0x119)}};}export function buildCanonicalAppConfig(_0x38ad1f,_0x204b7f){const _0x29cce7=a126_0x134329,_0x539e34=_0x38ad1f[_0x29cce7(0x117)](_0x458b3a=>String(_0x458b3a||'')[_0x29cce7(0xfc)]())['filter'](Boolean);if(_0x539e34[_0x29cce7(0xfd)]===0x0)return{};const _0x337461={};for(const _0xce7c41 of _0x539e34){_0x337461[_0xce7c41]=_0x204b7f?{'appcode':_0xce7c41,'env':_0x204b7f}:{'appcode':_0xce7c41};}return{'apps':_0x337461,'defaultApp':_0x539e34[0x0]};}export function buildCanonicalProjectConfig(_0x464214,_0x17b591){const _0x47ac05=a126_0x134329,{appCodes:appCodes=[],env:_0x57cdc8,metadata:_0x3e981b}=_0x17b591,_0x3ce582={..._0x464214,..._0x3e981b||{}};delete _0x3ce582[_0x47ac05(0x110)],delete _0x3ce582['app'];if(_0x57cdc8)_0x3ce582[_0x47ac05(0x114)]=_0x57cdc8;else!_0x3ce582[_0x47ac05(0x114)]&&(_0x3ce582['env']=DEFAULT_CONFIG_VALUES[_0x47ac05(0x114)]);const _0xa81f48=buildCanonicalAppConfig(appCodes,_0x3ce582[_0x47ac05(0x114)]);return Object['keys'](_0xa81f48)[_0x47ac05(0xfd)]>0x0&&(_0x3ce582[_0x47ac05(0x102)]=_0xa81f48['apps'],_0x3ce582[_0x47ac05(0x10e)]=_0xa81f48[_0x47ac05(0x10e)]),_0x3ce582;}const LOCALE_MAP={'zh':a126_0x134329(0xf8),'zh-cn':'zh-CN','zh_cn':a126_0x134329(0xf8),'en':a126_0x134329(0xf9),'en-us':a126_0x134329(0xf9),'en_us':a126_0x134329(0xf9)};function a126_0x3b7c(_0x312730,_0x3f1e98){_0x312730=_0x312730-0xf7;const _0x2849c6=a126_0x2849();let _0x3b7c3a=_0x2849c6[_0x312730];return _0x3b7c3a;}export function normalizeLocale(_0x1f2481){if(!_0x1f2481)return null;return LOCALE_MAP[_0x1f2481['toLowerCase']()]??null;}function a126_0x2849(){const _0x22f672=['app','Access\x20key','format','469CjCAst','string','defaultApp','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','appcode','1488460fRnwyM','entries','locale','env','number','riskLevel','map','Locale','inherit','join','Risk\x20level','17704jLGZvD','Auth\x20cookie','zh-CN','en-US','274063Qydlds','897758aSEDyc','trim','length','8ueNjuB','pageSize','API\x20directory\x20path','Config\x20key\x20(','apps','accessKey','cookie','919377eOzSDv','apiDir','1515870kdUTne','703083GjYSjR'];a126_0x2849=function(){return _0x22f672;};return a126_0x2849();}
1
+ const a127_0x5baba2=a127_0x2186;(function(_0x2d6d32,_0x328b52){const _0x115cf1=a127_0x2186,_0x18e040=_0x2d6d32();while(!![]){try{const _0x1e347c=parseInt(_0x115cf1(0x179))/0x1+-parseInt(_0x115cf1(0x185))/0x2*(-parseInt(_0x115cf1(0x17e))/0x3)+-parseInt(_0x115cf1(0x181))/0x4+parseInt(_0x115cf1(0x180))/0x5*(-parseInt(_0x115cf1(0x193))/0x6)+-parseInt(_0x115cf1(0x18a))/0x7+parseInt(_0x115cf1(0x194))/0x8*(-parseInt(_0x115cf1(0x17a))/0x9)+-parseInt(_0x115cf1(0x191))/0xa*(-parseInt(_0x115cf1(0x17b))/0xb);if(_0x1e347c===_0x328b52)break;else _0x18e040['push'](_0x18e040['shift']());}catch(_0x5651b9){_0x18e040['push'](_0x18e040['shift']());}}}(a127_0xc676,0x7eb90));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',a127_0x5baba2(0x18c),'locale',a127_0x5baba2(0x18b),'riskLevel'];function a127_0xc676(){const _0x4e9f56=['appcode','apps','string','5810kCFAII','toLowerCase','369828uxTmOP','72CGXyVf','riskLevel','cookie','defaultApp','inherit','Risk\x20level','Locale','keys','trim','pageSize','Config\x20key\x20(','locale','join','875342CToswe','348858avOALM','26147OAFbYz','has','app','111FDsAyO','env','75iJalop','3124196kRVvwq','Target\x20environment','Auth\x20cookie','API\x20directory\x20path','51970KvAmLk','zh-CN','apiDir','en-US','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','4510037KTvQca','format','accessKey','map'];a127_0xc676=function(){return _0x4e9f56;};return a127_0xc676();}export const TOP_LEVEL_CONFIG_KEYS=new Set([a127_0x5baba2(0x18e),a127_0x5baba2(0x17f),'locale',a127_0x5baba2(0x18b),a127_0x5baba2(0x196),'accessKey',a127_0x5baba2(0x187)]);function a127_0x2186(_0x47881f,_0x5750ec){_0x47881f=_0x47881f-0x176;const _0xc67646=a127_0xc676();let _0x218642=_0xc67646[_0x47881f];return _0x218642;}export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0xdfa175){const _0x3b273b=a127_0x5baba2;return[..._0xdfa175][_0x3b273b(0x178)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x4e8d77){const _0x18fd3d=a127_0x5baba2;return TOP_LEVEL_CONFIG_KEYS[_0x18fd3d(0x17c)](_0x4e8d77);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x54fd20=a127_0x5baba2;return _0x54fd20(0x176)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':'env','apiDir':a127_0x5baba2(0x187),'cookie':a127_0x5baba2(0x196),'accessKey':a127_0x5baba2(0x18c),'defaultFormat':a127_0x5baba2(0x18b),'pageSize':a127_0x5baba2(0x19d),'riskLevel':a127_0x5baba2(0x195),'locale':a127_0x5baba2(0x177)};export function getAppProfileFlagDefs(){const _0xb227b6=a127_0x5baba2;return[{'name':_0xb227b6(0x17f),'type':_0xb227b6(0x190),'description':_0xb227b6(0x182),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0xb227b6(0x187),'type':_0xb227b6(0x190),'description':_0xb227b6(0x184)},{'name':_0xb227b6(0x196),'type':_0xb227b6(0x190),'description':_0xb227b6(0x183),'hidden':!![]},{'name':_0xb227b6(0x18c),'type':_0xb227b6(0x190),'description':'Access\x20key','hidden':!![]},{'name':'defaultFormat','type':_0xb227b6(0x190),'description':_0xb227b6(0x189),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':'pageSize','type':'number','description':'Default\x20page\x20size'},{'name':_0xb227b6(0x195),'type':_0xb227b6(0x190),'description':_0xb227b6(0x199),'enum':[...RISK_LEVEL_VALUES]},{'name':_0xb227b6(0x177),'type':'string','description':_0xb227b6(0x19a)}];}export function collectAppProfileOverrides(_0x3522ce){const _0x4a3e9a=a127_0x5baba2,_0x5a125d={};for(const [_0x26aac1,_0x121776]of Object['entries'](APP_PROFILE_FLAG_KEY_MAP)){const _0x31e03e=_0x3522ce(_0x26aac1);if(!_0x31e03e)continue;_0x5a125d[_0x121776]=_0x121776===_0x4a3e9a(0x19d)?Number(_0x31e03e):_0x31e03e;}return _0x5a125d;}export function buildAppProfileListFields(_0x5c9340){const _0x5911ac=a127_0x5baba2;return{'env':_0x5c9340[_0x5911ac(0x17f)]??null,'apiDir':_0x5c9340[_0x5911ac(0x187)]??null,'hasCookie':!!_0x5c9340['cookie'],'hasAccessKey':!!_0x5c9340[_0x5911ac(0x18c)],'format':_0x5c9340[_0x5911ac(0x18b)]??null,'pageSize':_0x5c9340[_0x5911ac(0x19d)]??null,'riskLevel':_0x5c9340[_0x5911ac(0x195)]??null,'locale':_0x5c9340['locale']??null};}export function buildAppDoctorFields(_0x438646,_0x50c83d){const _0x1aaa9b=a127_0x5baba2;return{'env':{'value':_0x438646[_0x1aaa9b(0x17f)]||_0x50c83d[_0x1aaa9b(0x17f)],'source':_0x438646['env']?'app':_0x1aaa9b(0x198)},'apiDir':{'value':_0x438646[_0x1aaa9b(0x187)]||_0x50c83d['apiDir'],'source':_0x438646[_0x1aaa9b(0x187)]?_0x1aaa9b(0x17d):_0x1aaa9b(0x198)},'cookie':{'value':_0x438646['cookie']||_0x50c83d[_0x1aaa9b(0x196)],'source':_0x438646[_0x1aaa9b(0x196)]?_0x1aaa9b(0x17d):_0x1aaa9b(0x198)},'accessKey':{'value':_0x438646[_0x1aaa9b(0x18c)]||_0x50c83d[_0x1aaa9b(0x18c)],'source':_0x438646[_0x1aaa9b(0x18c)]?'app':_0x1aaa9b(0x198)}};}export function buildCanonicalAppConfig(_0x28ea3c,_0x844072){const _0x324313=a127_0x5baba2,_0x53c424=_0x28ea3c[_0x324313(0x18d)](_0x5b303f=>String(_0x5b303f||'')[_0x324313(0x19c)]())['filter'](Boolean);if(_0x53c424['length']===0x0)return{};const _0x1845f3={};for(const _0x228351 of _0x53c424){_0x1845f3[_0x228351]=_0x844072?{'appcode':_0x228351,'env':_0x844072}:{'appcode':_0x228351};}return{'apps':_0x1845f3,'defaultApp':_0x53c424[0x0]};}export function buildCanonicalProjectConfig(_0x36cd25,_0x4c4951){const _0x1b49d1=a127_0x5baba2,{appCodes:appCodes=[],env:_0x28ad7b,metadata:_0x35d591}=_0x4c4951,_0x151890={..._0x36cd25,..._0x35d591||{}};delete _0x151890[_0x1b49d1(0x18e)],delete _0x151890['app'];if(_0x28ad7b)_0x151890[_0x1b49d1(0x17f)]=_0x28ad7b;else!_0x151890[_0x1b49d1(0x17f)]&&(_0x151890[_0x1b49d1(0x17f)]=DEFAULT_CONFIG_VALUES[_0x1b49d1(0x17f)]);const _0x3f6d46=buildCanonicalAppConfig(appCodes,_0x151890['env']);return Object[_0x1b49d1(0x19b)](_0x3f6d46)['length']>0x0&&(_0x151890[_0x1b49d1(0x18f)]=_0x3f6d46[_0x1b49d1(0x18f)],_0x151890[_0x1b49d1(0x197)]=_0x3f6d46[_0x1b49d1(0x197)]),_0x151890;}const LOCALE_MAP={'zh':a127_0x5baba2(0x186),'zh-cn':a127_0x5baba2(0x186),'zh_cn':a127_0x5baba2(0x186),'en':a127_0x5baba2(0x188),'en-us':'en-US','en_us':a127_0x5baba2(0x188)};export function normalizeLocale(_0x59c9b0){const _0x20671c=a127_0x5baba2;if(!_0x59c9b0)return null;return LOCALE_MAP[_0x59c9b0[_0x20671c(0x192)]()]??null;}
@@ -1 +1 @@
1
- const a127_0x34ffc7=a127_0x1ee3;function a127_0x1ee3(_0x190526,_0x561022){_0x190526=_0x190526-0x131;const _0x572819=a127_0x5728();let _0x1ee36d=_0x572819[_0x190526];return _0x1ee36d;}(function(_0x5dad22,_0x1d5fd6){const _0x4bc71c=a127_0x1ee3,_0x45c0be=_0x5dad22();while(!![]){try{const _0x5e5537=parseInt(_0x4bc71c(0x132))/0x1*(parseInt(_0x4bc71c(0x13b))/0x2)+parseInt(_0x4bc71c(0x134))/0x3*(-parseInt(_0x4bc71c(0x136))/0x4)+parseInt(_0x4bc71c(0x133))/0x5*(-parseInt(_0x4bc71c(0x13a))/0x6)+parseInt(_0x4bc71c(0x138))/0x7+-parseInt(_0x4bc71c(0x131))/0x8+parseInt(_0x4bc71c(0x137))/0x9+parseInt(_0x4bc71c(0x135))/0xa;if(_0x5e5537===_0x1d5fd6)break;else _0x45c0be['push'](_0x45c0be['shift']());}catch(_0x6f3002){_0x45c0be['push'](_0x45c0be['shift']());}}}(a127_0x5728,0xa8fdc));export const CLI_VERSION_POLICY_URL=a127_0x34ffc7(0x139);function a127_0x5728(){const _0x23405c=['4hlTgkR','2629125RplVBO','9317504cdHBfT','https://g.lovrabet.com/dist/rabetbase-cli/config/index.json','30zrVHya','407578CAntkw','4806824rnRkwZ','2zyqnsQ','743215pKeCOf','2475183CInGOT','8305420RZcdyN'];a127_0x5728=function(){return _0x23405c;};return a127_0x5728();}
1
+ (function(_0xe57895,_0xe3687d){const _0x330235=a128_0x25d7,_0x58165c=_0xe57895();while(!![]){try{const _0x1567ac=parseInt(_0x330235(0x1c1))/0x1+parseInt(_0x330235(0x1c0))/0x2+parseInt(_0x330235(0x1be))/0x3*(parseInt(_0x330235(0x1c3))/0x4)+parseInt(_0x330235(0x1bf))/0x5+parseInt(_0x330235(0x1bc))/0x6*(-parseInt(_0x330235(0x1bb))/0x7)+-parseInt(_0x330235(0x1bd))/0x8*(parseInt(_0x330235(0x1c4))/0x9)+-parseInt(_0x330235(0x1c2))/0xa;if(_0x1567ac===_0xe3687d)break;else _0x58165c['push'](_0x58165c['shift']());}catch(_0xa7b477){_0x58165c['push'](_0x58165c['shift']());}}}(a128_0x30d4,0x33e86));export const CLI_VERSION_POLICY_URL='https://g.lovrabet.com/dist/rabetbase-cli/config/index.json';function a128_0x25d7(_0xda605d,_0x335dfd){_0xda605d=_0xda605d-0x1bb;const _0x30d450=a128_0x30d4();let _0x25d777=_0x30d450[_0xda605d];return _0x25d777;}function a128_0x30d4(){const _0x239ea8=['33948nCfZuT','451585fjsJCX','424870lUeBmY','347714shmnvW','6074120STbCrY','128PlMvrk','296793QTktOA','455pkWhEB','14730WewhkS','8KXApmH'];a128_0x30d4=function(){return _0x239ea8;};return a128_0x30d4();}
@@ -1 +1 @@
1
- const a128_0x5ecee1=a128_0x24b9;(function(_0xff3d24,_0x487a43){const _0x34f76e=a128_0x24b9,_0x509a45=_0xff3d24();while(!![]){try{const _0x12c570=-parseInt(_0x34f76e(0x1d8))/0x1*(parseInt(_0x34f76e(0x219))/0x2)+parseInt(_0x34f76e(0x207))/0x3+parseInt(_0x34f76e(0x210))/0x4*(parseInt(_0x34f76e(0x22c))/0x5)+parseInt(_0x34f76e(0x21f))/0x6+-parseInt(_0x34f76e(0x237))/0x7+parseInt(_0x34f76e(0x204))/0x8*(parseInt(_0x34f76e(0x228))/0x9)+-parseInt(_0x34f76e(0x1d7))/0xa;if(_0x12c570===_0x487a43)break;else _0x509a45['push'](_0x509a45['shift']());}catch(_0x2c2783){_0x509a45['push'](_0x509a45['shift']());}}}(a128_0x5a86,0x4efff));export const CLI_BIN_NAME=a128_0x5ecee1(0x224);function a128_0x5a86(){const _0x56cb29=['dbId','Operation\x20type','SQL\x20code','sql-name','operation','skip-imports','Code\x20filter','Schemas','Skip\x20confirmation\x20for\x20high-risk\x20writes','808qAoqIe','env','sqlname','213840hTyzul','skipImports','all','DB\x20ID','File\x20path','value','SQL\x20name','output','datasetcode','4tkXIYU','Alias\x20for\x20--non-interactive','Output\x20path','key','Skip\x20import\x20generation','appcode','string','dryRun','Use\x20global\x20config\x20scope','2uyrHDO','confirm','enable-bff-save','sql','yes','Select\x20app\x20profile\x20by\x20name','3259272RJjYFa','watch','verbose','non-interactive','remote','rabetbase','Page\x20size','Function\x20node','force','47979gpVojY','pagesize','db-id','Confirm\x20destructive\x20action','1341565ibxeSR','<name>','functionNode','expected-count','<expr>','function-node','format','nonInteractive','Environment','keyword','params','3919377NmvntQ','SQL\x20string','json\x20|\x20pretty\x20|\x20compress','Override\x20appcode','name','clear','351950SyOTKf','502547BQVTbT','boolean','schemas','Config\x20key','Use\x20remote','sqlcode','Enable\x20BFF\x20save','Keyword\x20filter','map','global','description','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','Expected\x20affected\x20count','help','Record\x20ID','Output\x20format','Dataset\x20code','enableBffSave','descriptionFile','Force\x20overwrite','app','Rabetbase\x20CLI','Description','file','dbid','project','target','production\x20|\x20daily','Page\x20number','type','operationType','Preview\x20operation\x20without\x20executing','Use\x20project\x20config\x20scope','Show\x20help','title'];a128_0x5a86=function(){return _0x56cb29;};return a128_0x5a86();}export const CLI_DISPLAY_NAME=a128_0x5ecee1(0x1ed);function a128_0x24b9(_0x451ea3,_0x4b3fc5){_0x451ea3=_0x451ea3-0x1d5;const _0x5a8680=a128_0x5a86();let _0x24b9e9=_0x5a8680[_0x451ea3];return _0x24b9e9;}export const NPM_PACKAGE_NAME='@lovrabet/rabetbase-cli';export const GLOBAL_FLAGS=[{'name':a128_0x5ecee1(0x215),'meowKey':a128_0x5ecee1(0x215),'type':a128_0x5ecee1(0x216),'description':a128_0x5ecee1(0x23a),'hint':'<code>'},{'name':a128_0x5ecee1(0x1ec),'meowKey':'app','type':a128_0x5ecee1(0x216),'description':a128_0x5ecee1(0x21e),'hint':a128_0x5ecee1(0x22d)},{'name':'env','meowKey':'env','type':a128_0x5ecee1(0x216),'description':a128_0x5ecee1(0x234),'hint':a128_0x5ecee1(0x1f3)},{'name':a128_0x5ecee1(0x232),'meowKey':a128_0x5ecee1(0x232),'type':a128_0x5ecee1(0x216),'description':a128_0x5ecee1(0x1e7),'hint':a128_0x5ecee1(0x239)},{'name':'jq','meowKey':'jq','type':a128_0x5ecee1(0x216),'description':a128_0x5ecee1(0x1e3),'hint':a128_0x5ecee1(0x230)},{'name':'dry-run','meowKey':a128_0x5ecee1(0x217),'type':a128_0x5ecee1(0x1d9),'description':a128_0x5ecee1(0x1f7)},{'name':a128_0x5ecee1(0x21d),'meowKey':a128_0x5ecee1(0x21d),'type':a128_0x5ecee1(0x1d9),'description':a128_0x5ecee1(0x203)},{'name':a128_0x5ecee1(0x222),'meowKey':a128_0x5ecee1(0x233),'type':'boolean','description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':'global','meowKey':a128_0x5ecee1(0x1e1),'type':a128_0x5ecee1(0x1d9),'description':a128_0x5ecee1(0x218)},{'name':a128_0x5ecee1(0x1f1),'meowKey':a128_0x5ecee1(0x1f1),'type':'boolean','description':a128_0x5ecee1(0x1f8)},{'name':'ci','meowKey':'ci','type':a128_0x5ecee1(0x1d9),'description':a128_0x5ecee1(0x211),'hidden':!![]},{'name':a128_0x5ecee1(0x1e5),'meowKey':a128_0x5ecee1(0x1e5),'type':a128_0x5ecee1(0x1d9),'description':a128_0x5ecee1(0x1f9)},{'name':a128_0x5ecee1(0x1d5),'meowKey':a128_0x5ecee1(0x1d5),'type':a128_0x5ecee1(0x216),'description':'Name','hidden':!![]},{'name':a128_0x5ecee1(0x1fa),'meowKey':'title','type':a128_0x5ecee1(0x216),'description':'Title','hidden':!![]},{'name':a128_0x5ecee1(0x1d6),'meowKey':a128_0x5ecee1(0x1d6),'type':a128_0x5ecee1(0x1d9),'description':'Clear','hidden':!![]},{'name':a128_0x5ecee1(0x220),'meowKey':a128_0x5ecee1(0x220),'type':a128_0x5ecee1(0x1d9),'description':'Watch\x20mode','hidden':!![]},{'name':a128_0x5ecee1(0x20e),'meowKey':'output','type':a128_0x5ecee1(0x216),'description':a128_0x5ecee1(0x212),'hidden':!![]},{'name':a128_0x5ecee1(0x236),'meowKey':a128_0x5ecee1(0x236),'type':a128_0x5ecee1(0x216),'description':'JSON\x20params','hidden':!![]},{'name':a128_0x5ecee1(0x20f),'meowKey':'datasetcode','type':a128_0x5ecee1(0x216),'description':a128_0x5ecee1(0x1e8),'hidden':!![]},{'name':a128_0x5ecee1(0x209),'meowKey':a128_0x5ecee1(0x209),'type':'boolean','description':'Apply\x20to\x20all','hidden':!![]},{'name':a128_0x5ecee1(0x21b),'meowKey':a128_0x5ecee1(0x1e9),'type':a128_0x5ecee1(0x1d9),'description':a128_0x5ecee1(0x1de),'hidden':!![]},{'name':'id','meowKey':'id','type':a128_0x5ecee1(0x216),'description':a128_0x5ecee1(0x1e6),'hidden':!![]},{'name':a128_0x5ecee1(0x1f5),'meowKey':a128_0x5ecee1(0x1f5),'type':'string','description':'Type\x20filter','hidden':!![]},{'name':'file','meowKey':a128_0x5ecee1(0x1ef),'type':a128_0x5ecee1(0x216),'description':a128_0x5ecee1(0x20b),'hidden':!![]},{'name':a128_0x5ecee1(0x1dd),'meowKey':a128_0x5ecee1(0x1dd),'type':a128_0x5ecee1(0x216),'description':a128_0x5ecee1(0x1fd),'hidden':!![]},{'name':a128_0x5ecee1(0x1fe),'meowKey':'sqlName','type':a128_0x5ecee1(0x216),'description':a128_0x5ecee1(0x20d),'hidden':!![]},{'name':a128_0x5ecee1(0x206),'meowKey':a128_0x5ecee1(0x206),'type':a128_0x5ecee1(0x216),'description':a128_0x5ecee1(0x20d),'hidden':!![]},{'name':a128_0x5ecee1(0x22a),'meowKey':a128_0x5ecee1(0x1fb),'type':'string','description':a128_0x5ecee1(0x20a),'hidden':!![]},{'name':a128_0x5ecee1(0x1f0),'meowKey':'dbid','type':'string','description':a128_0x5ecee1(0x20a),'hidden':!![]},{'name':a128_0x5ecee1(0x1e2),'meowKey':a128_0x5ecee1(0x1e2),'type':a128_0x5ecee1(0x216),'description':a128_0x5ecee1(0x1ee),'hidden':!![]},{'name':'description-file','meowKey':a128_0x5ecee1(0x1ea),'type':a128_0x5ecee1(0x216),'description':'Description\x20file','hidden':!![]},{'name':'page','meowKey':'page','type':'string','description':a128_0x5ecee1(0x1f4),'hidden':!![]},{'name':a128_0x5ecee1(0x229),'meowKey':a128_0x5ecee1(0x229),'type':a128_0x5ecee1(0x216),'description':a128_0x5ecee1(0x225),'hidden':!![]},{'name':a128_0x5ecee1(0x235),'meowKey':a128_0x5ecee1(0x235),'type':'string','description':a128_0x5ecee1(0x1df),'hidden':!![]},{'name':'code','meowKey':'code','type':a128_0x5ecee1(0x216),'description':a128_0x5ecee1(0x201),'hidden':!![]},{'name':a128_0x5ecee1(0x21c),'meowKey':a128_0x5ecee1(0x21c),'type':a128_0x5ecee1(0x216),'description':a128_0x5ecee1(0x238),'hidden':!![]},{'name':a128_0x5ecee1(0x1da),'meowKey':a128_0x5ecee1(0x1da),'type':a128_0x5ecee1(0x216),'description':a128_0x5ecee1(0x202),'hidden':!![]},{'name':'operation','meowKey':a128_0x5ecee1(0x1ff),'type':a128_0x5ecee1(0x216),'description':a128_0x5ecee1(0x1fc),'hidden':!![]},{'name':'target','meowKey':a128_0x5ecee1(0x1f2),'type':a128_0x5ecee1(0x216),'description':'Target\x20path','hidden':!![]},{'name':a128_0x5ecee1(0x200),'meowKey':a128_0x5ecee1(0x208),'type':'boolean','description':a128_0x5ecee1(0x214),'hidden':!![]},{'name':a128_0x5ecee1(0x213),'meowKey':'key','type':a128_0x5ecee1(0x216),'description':a128_0x5ecee1(0x1db),'hidden':!![]},{'name':'value','meowKey':a128_0x5ecee1(0x20c),'type':a128_0x5ecee1(0x216),'description':'Config\x20value','hidden':!![]},{'name':a128_0x5ecee1(0x227),'meowKey':a128_0x5ecee1(0x227),'type':a128_0x5ecee1(0x1d9),'description':a128_0x5ecee1(0x1eb),'hidden':!![]},{'name':'confirm','meowKey':a128_0x5ecee1(0x21a),'type':'boolean','description':a128_0x5ecee1(0x22b),'hidden':!![]},{'name':a128_0x5ecee1(0x223),'meowKey':a128_0x5ecee1(0x223),'type':'boolean','description':a128_0x5ecee1(0x1dc),'hidden':!![]},{'name':'verbose','meowKey':a128_0x5ecee1(0x221),'type':a128_0x5ecee1(0x1d9),'description':'Verbose\x20output','hidden':!![]},{'name':a128_0x5ecee1(0x22f),'meowKey':'expectedCount','type':a128_0x5ecee1(0x216),'description':a128_0x5ecee1(0x1e4),'hidden':!![]},{'name':'operation-type','meowKey':a128_0x5ecee1(0x1f6),'type':'string','description':'Operation\x20type','hidden':!![]},{'name':a128_0x5ecee1(0x231),'meowKey':a128_0x5ecee1(0x22e),'type':a128_0x5ecee1(0x216),'description':a128_0x5ecee1(0x226),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a128_0x5ecee1(0x215),a128_0x5ecee1(0x1ec),a128_0x5ecee1(0x205),'format','jq','dry-run',a128_0x5ecee1(0x21d),a128_0x5ecee1(0x222),'ci']);export function buildMeowFlags(){const _0x13dd49=a128_0x5ecee1;return Object['fromEntries'](GLOBAL_FLAGS[_0x13dd49(0x1e0)](_0x51bf9d=>[_0x51bf9d['meowKey'],{'type':_0x51bf9d['type']}]));}
1
+ const a129_0x27e5f6=a129_0x3be0;(function(_0x353efd,_0x1295cb){const _0x5e874f=a129_0x3be0,_0x5f463c=_0x353efd();while(!![]){try{const _0x3a6458=-parseInt(_0x5e874f(0x21a))/0x1*(-parseInt(_0x5e874f(0x1c8))/0x2)+-parseInt(_0x5e874f(0x1ea))/0x3+-parseInt(_0x5e874f(0x1e6))/0x4+parseInt(_0x5e874f(0x216))/0x5*(-parseInt(_0x5e874f(0x1df))/0x6)+-parseInt(_0x5e874f(0x20a))/0x7*(parseInt(_0x5e874f(0x1d5))/0x8)+parseInt(_0x5e874f(0x1d6))/0x9*(-parseInt(_0x5e874f(0x1de))/0xa)+parseInt(_0x5e874f(0x1d2))/0xb;if(_0x3a6458===_0x1295cb)break;else _0x5f463c['push'](_0x5f463c['shift']());}catch(_0x8721f1){_0x5f463c['push'](_0x5f463c['shift']());}}}(a129_0x4ba3,0x1bb8a));export const CLI_BIN_NAME=a129_0x27e5f6(0x1e1);export const CLI_DISPLAY_NAME=a129_0x27e5f6(0x1f6);function a129_0x4ba3(){const _0x3cd641=['Code\x20filter','@lovrabet/rabetbase-cli','force','title','type','Title','Page\x20size','Preview\x20operation\x20without\x20executing','description','file','name','Function\x20node','1547sxFDFO','expectedCount','Config\x20key','sqlName','Type\x20filter','Operation\x20type','global','skip-imports','Use\x20remote','description-file','function-node','File\x20path','390gNtsuq','format','meowKey','yes','2WCbtHz','db-id','clear','Output\x20format','env','page','project','production\x20|\x20daily','Force\x20non-interactive\x20mode\x20(CI)','Clear','Use\x20global\x20config\x20scope','map','Expected\x20affected\x20count','key','descriptionFile','appcode','watch','Select\x20app\x20profile\x20by\x20name','Keyword\x20filter','pagesize','Override\x20appcode','enableBffSave','help','Skip\x20confirmation\x20for\x20high-risk\x20writes','Dataset\x20code','value','187672MoAvuK','boolean','fromEntries','sql-name','dbId','target','verbose','operationType','Name','json\x20|\x20pretty\x20|\x20compress','7040198AHDNkX','code','Environment','3464LEQMhS','166644FVhiKu','dryRun','confirm','SQL\x20string','Show\x20help','Description\x20file','Output\x20path','non-interactive','90StFHkE','16434oHaiWq','schemas','rabetbase','sqlcode','Force\x20overwrite','Description','expected-count','475892inuFVm','Use\x20project\x20config\x20scope','<name>','operation','357576Awzmcg','Config\x20value','all','<code>','SQL\x20name','output','Target\x20path','params','Watch\x20mode','datasetcode','DB\x20ID','string','Rabetbase\x20CLI','dry-run','app','dbid','skipImports','functionNode','keyword','SQL\x20code'];a129_0x4ba3=function(){return _0x3cd641;};return a129_0x4ba3();}export const NPM_PACKAGE_NAME=a129_0x27e5f6(0x1ff);function a129_0x3be0(_0x2fbb1c,_0x13fe6b){_0x2fbb1c=_0x2fbb1c-0x1c3;const _0x4ba314=a129_0x4ba3();let _0x3be003=_0x4ba314[_0x2fbb1c];return _0x3be003;}export const GLOBAL_FLAGS=[{'name':a129_0x27e5f6(0x229),'meowKey':a129_0x27e5f6(0x229),'type':a129_0x27e5f6(0x1f5),'description':a129_0x27e5f6(0x22e),'hint':a129_0x27e5f6(0x1ed)},{'name':a129_0x27e5f6(0x1f8),'meowKey':a129_0x27e5f6(0x1f8),'type':a129_0x27e5f6(0x1f5),'description':a129_0x27e5f6(0x22b),'hint':a129_0x27e5f6(0x1e8)},{'name':a129_0x27e5f6(0x21e),'meowKey':'env','type':a129_0x27e5f6(0x1f5),'description':a129_0x27e5f6(0x1d4),'hint':a129_0x27e5f6(0x221)},{'name':a129_0x27e5f6(0x217),'meowKey':a129_0x27e5f6(0x217),'type':a129_0x27e5f6(0x1f5),'description':a129_0x27e5f6(0x21d),'hint':a129_0x27e5f6(0x1d1)},{'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':'<expr>'},{'name':a129_0x27e5f6(0x1f7),'meowKey':a129_0x27e5f6(0x1d7),'type':a129_0x27e5f6(0x1c9),'description':a129_0x27e5f6(0x205)},{'name':a129_0x27e5f6(0x219),'meowKey':'yes','type':'boolean','description':a129_0x27e5f6(0x1c5)},{'name':a129_0x27e5f6(0x1dd),'meowKey':'nonInteractive','type':a129_0x27e5f6(0x1c9),'description':a129_0x27e5f6(0x222)},{'name':'global','meowKey':a129_0x27e5f6(0x210),'type':'boolean','description':a129_0x27e5f6(0x224)},{'name':'project','meowKey':a129_0x27e5f6(0x220),'type':a129_0x27e5f6(0x1c9),'description':a129_0x27e5f6(0x1e7)},{'name':'ci','meowKey':'ci','type':'boolean','description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':a129_0x27e5f6(0x1c4),'meowKey':'help','type':a129_0x27e5f6(0x1c9),'description':a129_0x27e5f6(0x1da)},{'name':a129_0x27e5f6(0x208),'meowKey':'name','type':a129_0x27e5f6(0x1f5),'description':a129_0x27e5f6(0x1d0),'hidden':!![]},{'name':'title','meowKey':a129_0x27e5f6(0x201),'type':a129_0x27e5f6(0x1f5),'description':a129_0x27e5f6(0x203),'hidden':!![]},{'name':a129_0x27e5f6(0x21c),'meowKey':a129_0x27e5f6(0x21c),'type':a129_0x27e5f6(0x1c9),'description':a129_0x27e5f6(0x223),'hidden':!![]},{'name':'watch','meowKey':a129_0x27e5f6(0x22a),'type':a129_0x27e5f6(0x1c9),'description':a129_0x27e5f6(0x1f2),'hidden':!![]},{'name':a129_0x27e5f6(0x1ef),'meowKey':'output','type':'string','description':a129_0x27e5f6(0x1dc),'hidden':!![]},{'name':a129_0x27e5f6(0x1f1),'meowKey':a129_0x27e5f6(0x1f1),'type':a129_0x27e5f6(0x1f5),'description':'JSON\x20params','hidden':!![]},{'name':a129_0x27e5f6(0x1f3),'meowKey':'datasetcode','type':a129_0x27e5f6(0x1f5),'description':a129_0x27e5f6(0x1c6),'hidden':!![]},{'name':'all','meowKey':a129_0x27e5f6(0x1ec),'type':a129_0x27e5f6(0x1c9),'description':'Apply\x20to\x20all','hidden':!![]},{'name':'enable-bff-save','meowKey':a129_0x27e5f6(0x1c3),'type':'boolean','description':'Enable\x20BFF\x20save','hidden':!![]},{'name':'id','meowKey':'id','type':a129_0x27e5f6(0x1f5),'description':'Record\x20ID','hidden':!![]},{'name':a129_0x27e5f6(0x202),'meowKey':a129_0x27e5f6(0x202),'type':a129_0x27e5f6(0x1f5),'description':a129_0x27e5f6(0x20e),'hidden':!![]},{'name':a129_0x27e5f6(0x207),'meowKey':'file','type':'string','description':a129_0x27e5f6(0x215),'hidden':!![]},{'name':a129_0x27e5f6(0x1e2),'meowKey':a129_0x27e5f6(0x1e2),'type':'string','description':a129_0x27e5f6(0x1fd),'hidden':!![]},{'name':a129_0x27e5f6(0x1cb),'meowKey':a129_0x27e5f6(0x20d),'type':a129_0x27e5f6(0x1f5),'description':a129_0x27e5f6(0x1ee),'hidden':!![]},{'name':'sqlname','meowKey':'sqlname','type':a129_0x27e5f6(0x1f5),'description':a129_0x27e5f6(0x1ee),'hidden':!![]},{'name':a129_0x27e5f6(0x21b),'meowKey':a129_0x27e5f6(0x1cc),'type':a129_0x27e5f6(0x1f5),'description':'DB\x20ID','hidden':!![]},{'name':'dbid','meowKey':a129_0x27e5f6(0x1f9),'type':a129_0x27e5f6(0x1f5),'description':a129_0x27e5f6(0x1f4),'hidden':!![]},{'name':a129_0x27e5f6(0x206),'meowKey':'description','type':a129_0x27e5f6(0x1f5),'description':a129_0x27e5f6(0x1e4),'hidden':!![]},{'name':a129_0x27e5f6(0x213),'meowKey':a129_0x27e5f6(0x228),'type':a129_0x27e5f6(0x1f5),'description':a129_0x27e5f6(0x1db),'hidden':!![]},{'name':a129_0x27e5f6(0x21f),'meowKey':a129_0x27e5f6(0x21f),'type':a129_0x27e5f6(0x1f5),'description':'Page\x20number','hidden':!![]},{'name':a129_0x27e5f6(0x22d),'meowKey':a129_0x27e5f6(0x22d),'type':a129_0x27e5f6(0x1f5),'description':a129_0x27e5f6(0x204),'hidden':!![]},{'name':a129_0x27e5f6(0x1fc),'meowKey':'keyword','type':a129_0x27e5f6(0x1f5),'description':a129_0x27e5f6(0x22c),'hidden':!![]},{'name':a129_0x27e5f6(0x1d3),'meowKey':a129_0x27e5f6(0x1d3),'type':'string','description':a129_0x27e5f6(0x1fe),'hidden':!![]},{'name':'sql','meowKey':'sql','type':a129_0x27e5f6(0x1f5),'description':a129_0x27e5f6(0x1d9),'hidden':!![]},{'name':'schemas','meowKey':a129_0x27e5f6(0x1e0),'type':'string','description':'Schemas','hidden':!![]},{'name':'operation','meowKey':a129_0x27e5f6(0x1e9),'type':'string','description':a129_0x27e5f6(0x20f),'hidden':!![]},{'name':a129_0x27e5f6(0x1cd),'meowKey':'target','type':a129_0x27e5f6(0x1f5),'description':a129_0x27e5f6(0x1f0),'hidden':!![]},{'name':a129_0x27e5f6(0x211),'meowKey':a129_0x27e5f6(0x1fa),'type':a129_0x27e5f6(0x1c9),'description':'Skip\x20import\x20generation','hidden':!![]},{'name':a129_0x27e5f6(0x227),'meowKey':a129_0x27e5f6(0x227),'type':a129_0x27e5f6(0x1f5),'description':a129_0x27e5f6(0x20c),'hidden':!![]},{'name':a129_0x27e5f6(0x1c7),'meowKey':a129_0x27e5f6(0x1c7),'type':'string','description':a129_0x27e5f6(0x1eb),'hidden':!![]},{'name':'force','meowKey':a129_0x27e5f6(0x200),'type':a129_0x27e5f6(0x1c9),'description':a129_0x27e5f6(0x1e3),'hidden':!![]},{'name':a129_0x27e5f6(0x1d8),'meowKey':a129_0x27e5f6(0x1d8),'type':a129_0x27e5f6(0x1c9),'description':'Confirm\x20destructive\x20action','hidden':!![]},{'name':'remote','meowKey':'remote','type':a129_0x27e5f6(0x1c9),'description':a129_0x27e5f6(0x212),'hidden':!![]},{'name':a129_0x27e5f6(0x1ce),'meowKey':a129_0x27e5f6(0x1ce),'type':a129_0x27e5f6(0x1c9),'description':'Verbose\x20output','hidden':!![]},{'name':a129_0x27e5f6(0x1e5),'meowKey':a129_0x27e5f6(0x20b),'type':a129_0x27e5f6(0x1f5),'description':a129_0x27e5f6(0x226),'hidden':!![]},{'name':'operation-type','meowKey':a129_0x27e5f6(0x1cf),'type':'string','description':a129_0x27e5f6(0x20f),'hidden':!![]},{'name':a129_0x27e5f6(0x214),'meowKey':a129_0x27e5f6(0x1fb),'type':a129_0x27e5f6(0x1f5),'description':a129_0x27e5f6(0x209),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a129_0x27e5f6(0x229),a129_0x27e5f6(0x1f8),a129_0x27e5f6(0x21e),a129_0x27e5f6(0x217),'jq',a129_0x27e5f6(0x1f7),a129_0x27e5f6(0x219),'non-interactive','ci']);export function buildMeowFlags(){const _0x3ffa70=a129_0x27e5f6;return Object[_0x3ffa70(0x1ca)](GLOBAL_FLAGS[_0x3ffa70(0x225)](_0x1ac476=>[_0x1ac476[_0x3ffa70(0x218)],{'type':_0x1ac476[_0x3ffa70(0x202)]}]));}
@@ -1 +1 @@
1
- const a129_0x4abbbd=a129_0x5b51;function a129_0x5b51(_0x28ab90,_0xc72e4c){_0x28ab90=_0x28ab90-0x144;const _0x389704=a129_0x3897();let _0x5b51c0=_0x389704[_0x28ab90];return _0x5b51c0;}(function(_0x308fc1,_0x531cb4){const _0x469340=a129_0x5b51,_0x5a8208=_0x308fc1();while(!![]){try{const _0x487846=-parseInt(_0x469340(0x14a))/0x1+-parseInt(_0x469340(0x14c))/0x2*(-parseInt(_0x469340(0x14b))/0x3)+parseInt(_0x469340(0x14f))/0x4+-parseInt(_0x469340(0x144))/0x5+parseInt(_0x469340(0x14d))/0x6+parseInt(_0x469340(0x145))/0x7*(-parseInt(_0x469340(0x149))/0x8)+parseInt(_0x469340(0x146))/0x9;if(_0x487846===_0x531cb4)break;else _0x5a8208['push'](_0x5a8208['shift']());}catch(_0x58db4e){_0x5a8208['push'](_0x5a8208['shift']());}}}(a129_0x3897,0x3fb53));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a129_0x4abbbd(0x147),'format':a129_0x4abbbd(0x150),'locale':a129_0x4abbbd(0x148),'riskLevel':a129_0x4abbbd(0x14e),'apiDir':DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a129_0x4abbbd(0x150);function a129_0x3897(){const _0x49c3b7=['55624TIjqnb','320629TzZjvm','1014DdKyQn','2980taPeIT','766086FDfLMo','high-risk-write','335908unBDKD','compress','703575EhScJa','91pAGaAj','876618xItjxW','production','en-US'];a129_0x3897=function(){return _0x49c3b7;};return a129_0x3897();}
1
+ const a130_0x2dd26f=a130_0x3dbc;(function(_0x965ebc,_0x7c08fd){const _0x557e06=a130_0x3dbc,_0x4e3c4b=_0x965ebc();while(!![]){try{const _0x51bef6=-parseInt(_0x557e06(0x19b))/0x1*(-parseInt(_0x557e06(0x1a3))/0x2)+parseInt(_0x557e06(0x19f))/0x3*(-parseInt(_0x557e06(0x198))/0x4)+parseInt(_0x557e06(0x1a1))/0x5*(parseInt(_0x557e06(0x19c))/0x6)+-parseInt(_0x557e06(0x1a6))/0x7*(parseInt(_0x557e06(0x199))/0x8)+parseInt(_0x557e06(0x19e))/0x9*(parseInt(_0x557e06(0x1a2))/0xa)+parseInt(_0x557e06(0x19d))/0xb*(-parseInt(_0x557e06(0x1a0))/0xc)+-parseInt(_0x557e06(0x1a4))/0xd;if(_0x51bef6===_0x7c08fd)break;else _0x4e3c4b['push'](_0x4e3c4b['shift']());}catch(_0x446b0c){_0x4e3c4b['push'](_0x4e3c4b['shift']());}}}(a130_0x25cf,0x27f79));function a130_0x3dbc(_0x58451c,_0x12ec2d){_0x58451c=_0x58451c-0x198;const _0x25cf07=a130_0x25cf();let _0x3dbce4=_0x25cf07[_0x58451c];return _0x3dbce4;}import{DEFAULT_API_DIR}from'../constant/paths.js';function a130_0x25cf(){const _0xe88baf=['production','122395auTSIl','288OuFADp','8uGynVz','compress','196549cRvjyS','958098rWsjvR','2519MUlsYE','1197KgGRIC','7209YLXEpi','3840eHmyle','5yTgaeY','12820fXmICM','2yrHvcI','1290276GgnMux'];a130_0x25cf=function(){return _0xe88baf;};return a130_0x25cf();}export const DEFAULT_CONFIG_VALUES={'env':a130_0x2dd26f(0x1a5),'format':a130_0x2dd26f(0x19a),'locale':'en-US','riskLevel':'high-risk-write','apiDir':DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';
@@ -1 +1 @@
1
- function a130_0x59fd(_0x48ce4d,_0x4df10e){_0x48ce4d=_0x48ce4d-0x96;const _0x5ea80e=a130_0x5ea8();let _0x59fd0b=_0x5ea80e[_0x48ce4d];return _0x59fd0b;}const a130_0x1cf11d=a130_0x59fd;function a130_0x5ea8(){const _0x5de7a6=['968778scaJLQ','userDomain','133156BcvcNv','29940gRmaXH','1drzDZP','35QzIJdT','65bTgvSn','https://daily-runtime.lovrabet.com','1388004GGAkCs','259QxzRBs','1782PQyCdv','apiDomain','https://daily-api.lovrabet.com','802792wPkSKE','56388eAFKvd','27DDdkld','823800OcLkmK','https://user.lovrabet.com','https://api.lovrabet.com'];a130_0x5ea8=function(){return _0x5de7a6;};return a130_0x5ea8();}(function(_0x2cb3a0,_0xa32e86){const _0x14d86c=a130_0x59fd,_0x2b4842=_0x2cb3a0();while(!![]){try{const _0xb08363=-parseInt(_0x14d86c(0xa5))/0x1*(-parseInt(_0x14d86c(0xa1))/0x2)+-parseInt(_0x14d86c(0x9e))/0x3+-parseInt(_0x14d86c(0xa3))/0x4*(-parseInt(_0x14d86c(0xa6))/0x5)+-parseInt(_0x14d86c(0x9c))/0x6*(parseInt(_0x14d86c(0x97))/0x7)+-parseInt(_0x14d86c(0x9b))/0x8*(-parseInt(_0x14d86c(0x9d))/0x9)+-parseInt(_0x14d86c(0xa4))/0xa*(-parseInt(_0x14d86c(0x98))/0xb)+-parseInt(_0x14d86c(0x96))/0xc*(parseInt(_0x14d86c(0xa7))/0xd);if(_0xb08363===_0xa32e86)break;else _0x2b4842['push'](_0x2b4842['shift']());}catch(_0x1d8bda){_0x2b4842['push'](_0x2b4842['shift']());}}}(a130_0x5ea8,0x49eea));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x1ca940){const _0x2560e4=a130_0x59fd;customApiDomain=_0x1ca940?.[_0x2560e4(0x99)],customUserDomain=_0x1ca940?.[_0x2560e4(0xa2)],customRuntimeDomain=_0x1ca940?.['runtimeDomain'];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a130_0x1cf11d(0x9f):'https://user-daily.lovrabet.com');export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a130_0x1cf11d(0xa0):a130_0x1cf11d(0x9a));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?'https://runtime.lovrabet.com':a130_0x1cf11d(0xa8));
1
+ const a131_0x494b4d=a131_0x2f52;(function(_0x2d0b83,_0x3b1cb0){const _0x40901f=a131_0x2f52,_0x36d766=_0x2d0b83();while(!![]){try{const _0x49a254=parseInt(_0x40901f(0xac))/0x1*(parseInt(_0x40901f(0xb4))/0x2)+-parseInt(_0x40901f(0xb5))/0x3*(-parseInt(_0x40901f(0xa9))/0x4)+parseInt(_0x40901f(0xb2))/0x5+parseInt(_0x40901f(0xb8))/0x6+-parseInt(_0x40901f(0xaa))/0x7*(-parseInt(_0x40901f(0xb0))/0x8)+-parseInt(_0x40901f(0xb9))/0x9*(-parseInt(_0x40901f(0xb1))/0xa)+-parseInt(_0x40901f(0xb3))/0xb;if(_0x49a254===_0x3b1cb0)break;else _0x36d766['push'](_0x36d766['shift']());}catch(_0x5ceb6f){_0x36d766['push'](_0x36d766['shift']());}}}(a131_0x9e38,0xa8137));import{getEnv,isProduction}from'../constant/env.js';function a131_0x2f52(_0x1af167,_0x180d53){_0x1af167=_0x1af167-0xa8;const _0x9e381=a131_0x9e38();let _0x2f5290=_0x9e381[_0x1af167];return _0x2f5290;}let customApiDomain,customUserDomain,customRuntimeDomain;function a131_0x9e38(){const _0x3f2332=['apiDomain','32hfFPKg','https://user.lovrabet.com','userDomain','https://runtime.lovrabet.com','4737200lKkqQE','18290snYXjN','5936965FZfxFx','41188708ikDsde','35590JkGzch','323793KiTuRp','https://api.lovrabet.com','https://daily-runtime.lovrabet.com','4000410WlOtRl','873ZNNbWZ','https://user-daily.lovrabet.com','runtimeDomain','https://daily-api.lovrabet.com','24rwKFYK','14rBcZuH'];a131_0x9e38=function(){return _0x3f2332;};return a131_0x9e38();}export function initDomains(_0x216179){const _0xce6354=a131_0x2f52;customApiDomain=_0x216179?.[_0xce6354(0xab)],customUserDomain=_0x216179?.[_0xce6354(0xae)],customRuntimeDomain=_0x216179?.[_0xce6354(0xbb)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a131_0x494b4d(0xad):a131_0x494b4d(0xba));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a131_0x494b4d(0xb6):a131_0x494b4d(0xa8));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a131_0x494b4d(0xaf):a131_0x494b4d(0xb7));
@@ -1 +1 @@
1
- const a131_0x2b5331=a131_0x52c2;(function(_0x1267b4,_0x2510f4){const _0x2c60a5=a131_0x52c2,_0x164223=_0x1267b4();while(!![]){try{const _0x1b2fd6=parseInt(_0x2c60a5(0x144))/0x1+-parseInt(_0x2c60a5(0x13e))/0x2*(-parseInt(_0x2c60a5(0x149))/0x3)+-parseInt(_0x2c60a5(0x13f))/0x4*(parseInt(_0x2c60a5(0x147))/0x5)+-parseInt(_0x2c60a5(0x13d))/0x6+-parseInt(_0x2c60a5(0x143))/0x7*(-parseInt(_0x2c60a5(0x14a))/0x8)+parseInt(_0x2c60a5(0x140))/0x9*(parseInt(_0x2c60a5(0x148))/0xa)+parseInt(_0x2c60a5(0x142))/0xb*(-parseInt(_0x2c60a5(0x145))/0xc);if(_0x1b2fd6===_0x2510f4)break;else _0x164223['push'](_0x164223['shift']());}catch(_0x44bf4f){_0x164223['push'](_0x164223['shift']());}}}(a131_0x1f31,0xad963));export const RABETBASE_ENV_VALUES=['production','daily'];export function normalizeEnv(_0x31cd13){const _0x78f0dc=a131_0x52c2;return _0x31cd13==='online'?_0x78f0dc(0x146):_0x31cd13;}export function isProduction(_0x4aa6ef){return normalizeEnv(_0x4aa6ef)==='production';}function a131_0x1f31(){const _0x16d449=['development','7740755QvzJQn','4931150iCdROS','177434mSXPIi','12UbLsoC','production','890tPZESe','10aUrjBN','110091YdqegF','8FiLYbA','daily','4863690QDJLje','76JihOjf','19648cdVNTi','7409673mkfipd'];a131_0x1f31=function(){return _0x16d449;};return a131_0x1f31();}function a131_0x52c2(_0x4aec1a,_0x1cf2c5){_0x4aec1a=_0x4aec1a-0x13d;const _0x1f31a9=a131_0x1f31();let _0x52c2ce=_0x1f31a9[_0x4aec1a];return _0x52c2ce;}export function isDaily(_0x1a21df){const _0x196260=a131_0x52c2;return normalizeEnv(_0x1a21df)===_0x196260(0x14b);}export function isDev(_0x548d56){const _0x1cc45d=a131_0x52c2,_0x22bffd=normalizeEnv(_0x548d56);return _0x22bffd===_0x1cc45d(0x141)||_0x22bffd==='dev';}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a131_0x2b5331(0x146));export function getEnv(){return env;}export function initEnv(_0x11769b){env=normalizeEnv(_0x11769b);}
1
+ const a132_0x5c56cc=a132_0xa0bd;(function(_0x56d0b4,_0x597926){const _0x1c8e5c=a132_0xa0bd,_0x57a924=_0x56d0b4();while(!![]){try{const _0x4d6980=parseInt(_0x1c8e5c(0x1cd))/0x1+-parseInt(_0x1c8e5c(0x1c7))/0x2+parseInt(_0x1c8e5c(0x1c5))/0x3*(parseInt(_0x1c8e5c(0x1ca))/0x4)+parseInt(_0x1c8e5c(0x1c4))/0x5*(parseInt(_0x1c8e5c(0x1c8))/0x6)+-parseInt(_0x1c8e5c(0x1c6))/0x7+parseInt(_0x1c8e5c(0x1cc))/0x8+-parseInt(_0x1c8e5c(0x1c9))/0x9;if(_0x4d6980===_0x597926)break;else _0x57a924['push'](_0x57a924['shift']());}catch(_0x3e5e85){_0x57a924['push'](_0x57a924['shift']());}}}(a132_0x3705,0xe806c));export const RABETBASE_ENV_VALUES=[a132_0x5c56cc(0x1c2),'daily'];export function normalizeEnv(_0x42f89d){return _0x42f89d==='online'?'production':_0x42f89d;}export function isProduction(_0x303c71){return normalizeEnv(_0x303c71)==='production';}export function isDaily(_0x434f8b){const _0x4f5422=a132_0x5c56cc;return normalizeEnv(_0x434f8b)===_0x4f5422(0x1cb);}function a132_0xa0bd(_0x4a5828,_0x389ef0){_0x4a5828=_0x4a5828-0x1c2;const _0x370544=a132_0x3705();let _0xa0bd6e=_0x370544[_0x4a5828];return _0xa0bd6e;}export function isDev(_0x2f1f3d){const _0x231804=a132_0x5c56cc,_0x563256=normalizeEnv(_0x2f1f3d);return _0x563256==='development'||_0x563256===_0x231804(0x1c3);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a132_0x5c56cc(0x1c2));function a132_0x3705(){const _0x4fbd37=['12474592kipjUL','1196569SCeJll','production','dev','5JyuxFF','315UQXeLv','9140796JKjmci','326816mpUBDB','1479186IqKVer','11244132FowLgQ','25392LOHzis','daily'];a132_0x3705=function(){return _0x4fbd37;};return a132_0x3705();}export function getEnv(){return env;}export function initEnv(_0x2126f5){env=normalizeEnv(_0x2126f5);}
@@ -1 +1 @@
1
- const a132_0x341917=a132_0x5505;function a132_0x420b(){const _0x3e41e5=['387035vGTTua','828400OsVFeo','json','pretty','6261iEGTTX','compress','294736eBdGNO','42bOyHvN','204CcnMlW','45YSRMkK','874153FADBIl','666008ordADs','17470840JozKdC'];a132_0x420b=function(){return _0x3e41e5;};return a132_0x420b();}(function(_0xbd9ffe,_0x518bc2){const _0x5c0133=a132_0x5505,_0x9091f7=_0xbd9ffe();while(!![]){try{const _0x13b165=parseInt(_0x5c0133(0x1b0))/0x1+-parseInt(_0x5c0133(0x1ad))/0x2*(-parseInt(_0x5c0133(0x1b6))/0x3)+parseInt(_0x5c0133(0x1b3))/0x4+parseInt(_0x5c0133(0x1b2))/0x5+parseInt(_0x5c0133(0x1b9))/0x6*(parseInt(_0x5c0133(0x1af))/0x7)+-parseInt(_0x5c0133(0x1b8))/0x8*(-parseInt(_0x5c0133(0x1ae))/0x9)+-parseInt(_0x5c0133(0x1b1))/0xa;if(_0x13b165===_0x518bc2)break;else _0x9091f7['push'](_0x9091f7['shift']());}catch(_0x1f30e7){_0x9091f7['push'](_0x9091f7['shift']());}}}(a132_0x420b,0x73e2c));function a132_0x5505(_0xa312bc,_0x5cfeed){_0xa312bc=_0xa312bc-0x1ad;const _0x420bd2=a132_0x420b();let _0x5505b8=_0x420bd2[_0xa312bc];return _0x5505b8;}export const RABETBASE_OUTPUT_FORMAT_VALUES=[a132_0x341917(0x1b4),a132_0x341917(0x1b5),a132_0x341917(0x1b7)];
1
+ const a133_0x4f0395=a133_0x4053;(function(_0x57b999,_0x54834b){const _0xac874=a133_0x4053,_0x381075=_0x57b999();while(!![]){try{const _0x5f18f9=-parseInt(_0xac874(0x1b0))/0x1*(-parseInt(_0xac874(0x1be))/0x2)+parseInt(_0xac874(0x1af))/0x3*(-parseInt(_0xac874(0x1b7))/0x4)+-parseInt(_0xac874(0x1b4))/0x5*(-parseInt(_0xac874(0x1ae))/0x6)+parseInt(_0xac874(0x1ba))/0x7*(parseInt(_0xac874(0x1bc))/0x8)+-parseInt(_0xac874(0x1b2))/0x9*(parseInt(_0xac874(0x1b5))/0xa)+-parseInt(_0xac874(0x1bd))/0xb*(-parseInt(_0xac874(0x1b8))/0xc)+-parseInt(_0xac874(0x1b1))/0xd*(parseInt(_0xac874(0x1b3))/0xe);if(_0x5f18f9===_0x54834b)break;else _0x381075['push'](_0x381075['shift']());}catch(_0x10f0f5){_0x381075['push'](_0x381075['shift']());}}}(a133_0x596d,0x8ea4c));function a133_0x4053(_0x5a4111,_0x3999f0){_0x5a4111=_0x5a4111-0x1ae;const _0x596dee=a133_0x596d();let _0x405399=_0x596dee[_0x5a4111];return _0x405399;}function a133_0x596d(){const _0x53db7d=['9XzLlad','14FeMOLr','692885OZrjHi','1440710PnKgMK','json','12Gkahbc','84IwGrnw','pretty','7pBtrgT','compress','5903432kqZJgn','312829hlcQax','26piUbZW','48fuajOb','873192iiXpOI','7459VnMvWw','7033702PdSUlF'];a133_0x596d=function(){return _0x53db7d;};return a133_0x596d();}export const RABETBASE_OUTPUT_FORMAT_VALUES=[a133_0x4f0395(0x1b6),a133_0x4f0395(0x1b9),a133_0x4f0395(0x1bb)];
@@ -1 +1 @@
1
- function a133_0x272d(){const _0x175031=['1624014ZKQxwT','15KQCFJm','2125315EpxXYP','./src/api','1999060JkqFht','1566860cSzrNS','81qHbSgp','1122314cCLCPm','1hlJoJp','11Ebrrqk','13820uwMnlj','246544jXrnLh'];a133_0x272d=function(){return _0x175031;};return a133_0x272d();}const a133_0x108be6=a133_0x201d;(function(_0x273319,_0xe7d84d){const _0x40283a=a133_0x201d,_0x2062d3=_0x273319();while(!![]){try{const _0x125888=parseInt(_0x40283a(0x169))/0x1*(-parseInt(_0x40283a(0x168))/0x2)+-parseInt(_0x40283a(0x16e))/0x3*(parseInt(_0x40283a(0x16b))/0x4)+parseInt(_0x40283a(0x16f))/0x5+-parseInt(_0x40283a(0x16d))/0x6+parseInt(_0x40283a(0x171))/0x7+-parseInt(_0x40283a(0x16c))/0x8*(-parseInt(_0x40283a(0x167))/0x9)+parseInt(_0x40283a(0x166))/0xa*(parseInt(_0x40283a(0x16a))/0xb);if(_0x125888===_0xe7d84d)break;else _0x2062d3['push'](_0x2062d3['shift']());}catch(_0x54cd8c){_0x2062d3['push'](_0x2062d3['shift']());}}}(a133_0x272d,0x482a6));function a133_0x201d(_0x16c52c,_0x4a5e2f){_0x16c52c=_0x16c52c-0x166;const _0x272dab=a133_0x272d();let _0x201d42=_0x272dab[_0x16c52c];return _0x201d42;}export const DEFAULT_API_DIR=a133_0x108be6(0x170);
1
+ const a134_0x461c6f=a134_0x5ba5;(function(_0x246822,_0x51593d){const _0x3fea26=a134_0x5ba5,_0x13eda8=_0x246822();while(!![]){try{const _0x161073=parseInt(_0x3fea26(0xc4))/0x1+-parseInt(_0x3fea26(0xbf))/0x2+-parseInt(_0x3fea26(0xbd))/0x3+parseInt(_0x3fea26(0xbb))/0x4*(parseInt(_0x3fea26(0xbc))/0x5)+-parseInt(_0x3fea26(0xc3))/0x6+parseInt(_0x3fea26(0xbe))/0x7*(-parseInt(_0x3fea26(0xc1))/0x8)+-parseInt(_0x3fea26(0xc2))/0x9*(-parseInt(_0x3fea26(0xc5))/0xa);if(_0x161073===_0x51593d)break;else _0x13eda8['push'](_0x13eda8['shift']());}catch(_0x5298f6){_0x13eda8['push'](_0x13eda8['shift']());}}}(a134_0x23c4,0x645f2));export const DEFAULT_API_DIR=a134_0x461c6f(0xc0);function a134_0x5ba5(_0x4f7d37,_0x3764db){_0x4f7d37=_0x4f7d37-0xbb;const _0x23c4cb=a134_0x23c4();let _0x5ba562=_0x23c4cb[_0x4f7d37];return _0x5ba562;}function a134_0x23c4(){const _0x2da06b=['130CAqLpT','865908LEWpYF','15fxxOGL','452436kcStXi','273iXEqPd','1308652TgaXvO','./src/api','143656fwVDze','489798iUcvRv','763800ZbWGOT','686966zJLQXH'];a134_0x23c4=function(){return _0x2da06b;};return a134_0x23c4();}
@@ -1 +1 @@
1
- function a134_0x172c(){const _0x3af70a=['136300BowJhS','230MoIihO','160919wsijoT','write','read','320AReRPt','16LNnogf','6DpCMmy','253986tMpmaN','high-risk-write','4655784rvyyPp','7033355PTuAjz','75916aEsbAk','63720eIBmzq'];a134_0x172c=function(){return _0x3af70a;};return a134_0x172c();}const a134_0x4872cb=a134_0x3e07;function a134_0x3e07(_0xf1d87b,_0x3edb30){_0xf1d87b=_0xf1d87b-0x1a7;const _0x172c1a=a134_0x172c();let _0x3e07d5=_0x172c1a[_0xf1d87b];return _0x3e07d5;}(function(_0x4272ca,_0x39e277){const _0x49595a=a134_0x3e07,_0x1899a9=_0x4272ca();while(!![]){try{const _0x59f1c0=-parseInt(_0x49595a(0x1a7))/0x1+-parseInt(_0x49595a(0x1ad))/0x2*(-parseInt(_0x49595a(0x1af))/0x3)+-parseInt(_0x49595a(0x1b3))/0x4*(-parseInt(_0x49595a(0x1a8))/0x5)+parseInt(_0x49595a(0x1ae))/0x6*(-parseInt(_0x49595a(0x1b2))/0x7)+parseInt(_0x49595a(0x1b1))/0x8+parseInt(_0x49595a(0x1b4))/0x9+-parseInt(_0x49595a(0x1ac))/0xa*(parseInt(_0x49595a(0x1a9))/0xb);if(_0x59f1c0===_0x39e277)break;else _0x1899a9['push'](_0x1899a9['shift']());}catch(_0x1f8263){_0x1899a9['push'](_0x1899a9['shift']());}}}(a134_0x172c,0x8170e));export const RISK_LEVEL_VALUES=[a134_0x4872cb(0x1ab),a134_0x4872cb(0x1aa),a134_0x4872cb(0x1b0)];
1
+ const a135_0x1d02f7=a135_0x220d;(function(_0x350987,_0x7605d1){const _0x4ff109=a135_0x220d,_0x553feb=_0x350987();while(!![]){try{const _0x129f4d=-parseInt(_0x4ff109(0xb3))/0x1*(parseInt(_0x4ff109(0xb8))/0x2)+parseInt(_0x4ff109(0xb9))/0x3+-parseInt(_0x4ff109(0xb5))/0x4+-parseInt(_0x4ff109(0xba))/0x5+parseInt(_0x4ff109(0xb7))/0x6+parseInt(_0x4ff109(0xb1))/0x7+parseInt(_0x4ff109(0xb4))/0x8;if(_0x129f4d===_0x7605d1)break;else _0x553feb['push'](_0x553feb['shift']());}catch(_0x191d7a){_0x553feb['push'](_0x553feb['shift']());}}}(a135_0x5345,0xe0ece));function a135_0x5345(){const _0x4f2931=['130RgAQaP','3178578bUtsUX','5729875gRNrEg','2622004tCfOmk','high-risk-write','3753LRVIhb','8465704ZozflT','4164832vQqbDh','read','5160666zfDeeX'];a135_0x5345=function(){return _0x4f2931;};return a135_0x5345();}function a135_0x220d(_0x4a28ad,_0x1c3d97){_0x4a28ad=_0x4a28ad-0xb1;const _0x53455c=a135_0x5345();let _0x220dcb=_0x53455c[_0x4a28ad];return _0x220dcb;}export const RISK_LEVEL_VALUES=[a135_0x1d02f7(0xb6),'write',a135_0x1d02f7(0xb2)];