@lovrabet/rabetbase-cli 2.2.1-beta.1 → 2.2.1-beta.2

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 (204) 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/capability.js +1 -1
  52. package/lib/commands/dataset/delete.js +1 -1
  53. package/lib/commands/dataset/detail.js +1 -1
  54. package/lib/commands/dataset/extend-update.js +1 -1
  55. package/lib/commands/dataset/field-update.js +1 -1
  56. package/lib/commands/dataset/index.js +1 -1
  57. package/lib/commands/dataset/list.js +1 -1
  58. package/lib/commands/dataset/operations.js +1 -1
  59. package/lib/commands/dataset/relation-create.js +1 -1
  60. package/lib/commands/dataset/relation-delete.js +1 -1
  61. package/lib/commands/dataset/relation-shared.js +1 -1
  62. package/lib/commands/dataset/relation-update.js +1 -1
  63. package/lib/commands/dataset/relations.js +1 -1
  64. package/lib/commands/dataset/rename.js +1 -1
  65. package/lib/commands/db/analyze-cancel.js +1 -1
  66. package/lib/commands/db/analyze-start.js +1 -1
  67. package/lib/commands/db/analyze-status.js +1 -1
  68. package/lib/commands/db/create.js +1 -1
  69. package/lib/commands/db/delete.js +1 -1
  70. package/lib/commands/db/detail.js +1 -1
  71. package/lib/commands/db/diff.js +1 -1
  72. package/lib/commands/db/index.js +1 -1
  73. package/lib/commands/db/list.js +1 -1
  74. package/lib/commands/db/shared.js +1 -1
  75. package/lib/commands/db/tables.js +1 -1
  76. package/lib/commands/db/test.js +1 -1
  77. package/lib/commands/db/update.js +1 -1
  78. package/lib/commands/doctor.js +1 -1
  79. package/lib/commands/init/index.js +1 -1
  80. package/lib/commands/issue/index.js +1 -1
  81. package/lib/commands/issue/nudge.js +1 -1
  82. package/lib/commands/issue/report.js +1 -1
  83. package/lib/commands/issue/shared.js +1 -1
  84. package/lib/commands/logs/index.js +1 -1
  85. package/lib/commands/menu/index.js +1 -1
  86. package/lib/commands/menu/shared/compare-table.js +1 -1
  87. package/lib/commands/menu/shared/index.js +1 -1
  88. package/lib/commands/menu/shared/inquirer.js +1 -1
  89. package/lib/commands/menu/shared/local-pages.js +1 -1
  90. package/lib/commands/menu/shared/logic.js +1 -1
  91. package/lib/commands/menu/shared/service.js +1 -1
  92. package/lib/commands/menu/shared/sync-core.js +1 -1
  93. package/lib/commands/menu/shared/update-core.js +1 -1
  94. package/lib/commands/menu/shared/valid-url.js +1 -1
  95. package/lib/commands/menu/sync.js +1 -1
  96. package/lib/commands/menu/update.js +1 -1
  97. package/lib/commands/page/generate-start.js +1 -1
  98. package/lib/commands/page/generate-status.js +1 -1
  99. package/lib/commands/page/index.js +1 -1
  100. package/lib/commands/page/pull.js +1 -1
  101. package/lib/commands/page/push.js +1 -1
  102. package/lib/commands/page/relation-audit.js +1 -1
  103. package/lib/commands/page/shared.js +1 -1
  104. package/lib/commands/page/standard-page-status.js +1 -1
  105. package/lib/commands/page/sync.js +1 -1
  106. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  107. package/lib/commands/project/create/format-elapsed.js +1 -1
  108. package/lib/commands/project/create/main.js +1 -1
  109. package/lib/commands/project/create/non-interactive.js +1 -1
  110. package/lib/commands/project/create/project-template-path.js +1 -1
  111. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  112. package/lib/commands/project/create/use-format-code.js +1 -1
  113. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  114. package/lib/commands/project/index.js +1 -1
  115. package/lib/commands/project/init.js +1 -1
  116. package/lib/commands/project/upgrade.js +1 -1
  117. package/lib/commands/registry.js +1 -1
  118. package/lib/commands/run/index.js +1 -1
  119. package/lib/commands/schema.js +1 -1
  120. package/lib/commands/skill/index.js +1 -1
  121. package/lib/commands/sql/create.js +1 -1
  122. package/lib/commands/sql/delete.js +1 -1
  123. package/lib/commands/sql/detail.js +1 -1
  124. package/lib/commands/sql/exec.js +1 -1
  125. package/lib/commands/sql/index.js +1 -1
  126. package/lib/commands/sql/list.js +1 -1
  127. package/lib/commands/sql/pull.js +1 -1
  128. package/lib/commands/sql/push.js +1 -1
  129. package/lib/commands/sql/save.js +1 -1
  130. package/lib/commands/sql/shared.js +1 -1
  131. package/lib/commands/sql/status.js +1 -1
  132. package/lib/commands/sql/validate.js +1 -1
  133. package/lib/config/schema.js +1 -1
  134. package/lib/constant/cdn.js +1 -1
  135. package/lib/constant/cli.js +1 -1
  136. package/lib/constant/defaults.js +1 -1
  137. package/lib/constant/domain.js +1 -1
  138. package/lib/constant/env.js +1 -1
  139. package/lib/constant/output.js +1 -1
  140. package/lib/constant/paths.js +1 -1
  141. package/lib/constant/risk.js +1 -1
  142. package/lib/context.js +1 -1
  143. package/lib/core/alias-resolver.js +1 -1
  144. package/lib/core/api-client.js +1 -1
  145. package/lib/core/bff/config.js +1 -1
  146. package/lib/core/bff/file-system.js +1 -1
  147. package/lib/core/bff/hash.js +1 -1
  148. package/lib/core/bff/lock.js +1 -1
  149. package/lib/core/bff/utils.js +1 -1
  150. package/lib/core/db-resolver.js +1 -1
  151. package/lib/core/page/file-system.js +1 -1
  152. package/lib/core/page/hash.js +1 -1
  153. package/lib/core/page/lock.js +1 -1
  154. package/lib/core/sql-sync/config.js +1 -1
  155. package/lib/core/sql-sync/file-system.js +1 -1
  156. package/lib/core/sql-sync/hash.js +1 -1
  157. package/lib/core/sql-sync/lock.js +1 -1
  158. package/lib/core/sql-sync/utils.js +1 -1
  159. package/lib/core/sql-validator.js +1 -1
  160. package/lib/errors.js +1 -1
  161. package/lib/framework/build-all-flags.js +1 -1
  162. package/lib/framework/flags.js +1 -1
  163. package/lib/framework/help.js +1 -1
  164. package/lib/framework/index.js +1 -1
  165. package/lib/framework/output.js +1 -1
  166. package/lib/framework/response.js +1 -1
  167. package/lib/framework/runner-alias.js +1 -1
  168. package/lib/framework/runner.js +1 -1
  169. package/lib/framework/schema-export.js +1 -1
  170. package/lib/framework/types.js +1 -1
  171. package/lib/generated/build-info.js +1 -1
  172. package/lib/help.js +1 -1
  173. package/lib/skills/main.js +1 -1
  174. package/lib/skills/npx-skills-add.js +1 -1
  175. package/lib/telemetry/cli-command-trace.js +1 -1
  176. package/lib/telemetry/cli-help-trace.js +1 -1
  177. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  178. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  179. package/lib/telemetry/send-cli-trace-log.js +1 -1
  180. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  181. package/lib/utils/ai_config.js +1 -1
  182. package/lib/utils/apply-jq-filter.js +1 -1
  183. package/lib/utils/cdn-config.js +1 -1
  184. package/lib/utils/check-sdk-version.js +1 -1
  185. package/lib/utils/cli-version-check.js +1 -1
  186. package/lib/utils/cli-version-policy.js +1 -1
  187. package/lib/utils/config.js +1 -1
  188. package/lib/utils/copy-directory.js +1 -1
  189. package/lib/utils/entity-with-id.js +1 -1
  190. package/lib/utils/file-utils.js +1 -1
  191. package/lib/utils/guides-cdn.js +1 -1
  192. package/lib/utils/http-client.js +1 -1
  193. package/lib/utils/is-non-interactive.js +1 -1
  194. package/lib/utils/logger.js +1 -1
  195. package/lib/utils/params.js +1 -1
  196. package/lib/utils/platform.js +1 -1
  197. package/lib/utils/rules-cdn.js +1 -1
  198. package/lib/utils/sleep.js +1 -1
  199. package/lib/utils/template-replacer.js +1 -1
  200. package/lib/utils/update-notice.js +1 -1
  201. package/lib/utils/version.js +1 -1
  202. package/lib/utils/with-active-cookie.js +1 -1
  203. package/lib/utils/write-cli-side-channel.js +1 -1
  204. package/package.json +1 -1
@@ -1 +1 @@
1
- const a127_0xcfa1cd=a127_0x474a;(function(_0x266d33,_0x48bbc1){const _0x2f266e=a127_0x474a,_0x585a0e=_0x266d33();while(!![]){try{const _0x1d1f78=parseInt(_0x2f266e(0x19b))/0x1+-parseInt(_0x2f266e(0x187))/0x2+-parseInt(_0x2f266e(0x178))/0x3+parseInt(_0x2f266e(0x180))/0x4*(-parseInt(_0x2f266e(0x186))/0x5)+-parseInt(_0x2f266e(0x1a1))/0x6*(parseInt(_0x2f266e(0x174))/0x7)+parseInt(_0x2f266e(0x191))/0x8*(-parseInt(_0x2f266e(0x16e))/0x9)+parseInt(_0x2f266e(0x167))/0xa*(parseInt(_0x2f266e(0x199))/0xb);if(_0x1d1f78===_0x48bbc1)break;else _0x585a0e['push'](_0x585a0e['shift']());}catch(_0xa93c2){_0x585a0e['push'](_0x585a0e['shift']());}}}(a127_0x4a63,0x19ba5));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';function a127_0x474a(_0x2204a5,_0x2a1271){_0x2204a5=_0x2204a5-0x165;const _0x4a6349=a127_0x4a63();let _0x474afd=_0x4a6349[_0x2204a5];return _0x474afd;}import{CliErrors}from'../../errors.js';function a127_0x4a63(){const _0x2366e0=['423OvLFOg','trimStart','description','Force\x20pull\x20will\x20overwrite\x20local\x20SQL\x20that\x20differs\x20from\x20remote.','force','push','21343hhgBEN','utf8','sqlcode','totalCount','201705xaHHqB','Force\x20pull\x20cancelled.','dbId','catch','pull','boolean','sqlRootDir','sqlContent','31660nnbyhE','local\x20differs\x20from\x20remote\x20(use\x20--force\x20to\x20overwrite)','local\x20differs\x20from\x20remote','join','Filter\x20by\x20SQL\x20display\x20name','bool','105OvnaLT','69354UwMfRI','nonInteractive','appCode','path','POST','Force\x20overwrite\x20local\x20unsynced\x20changes','message','test','/smartapi/custom/queryUserCustomSqlList\x20+\x20/smartapi/custom/getUserCustomSql','\x20SQL\x20file(s)\x20into\x20','20688JrFfLT','split','\x20written,\x20','str','mybatisXml','tableData','would_pull','length','6680773UJAUaP','filter','55402fxqEDa','apps','paging','sql','lastSync','sqls','330SDbhcI','Pull\x20complete:\x20','lockFilePath','string','cancelled','skipped','10pSiydi','unchanged','conflict','name','toISOString','sqlName','sqlCode'];a127_0x4a63=function(){return _0x2366e0;};return a127_0x4a63();}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(_0x38424d,_0x26f089){const _0x449ec2=a127_0x474a,_0x31e265=[];let _0x34748b=0x1;while(!![]){const _0x4299db=await listSqlQueries(_0x38424d,{'currentPage':_0x34748b,'pageSize':PAGE_SIZE,'sqlCode':_0x26f089['sqlCode'],'sqlName':_0x26f089[_0x449ec2(0x16c)]}),_0x5479db=_0x4299db[_0x449ec2(0x196)]??[];_0x31e265[_0x449ec2(0x173)](..._0x5479db);if(_0x5479db[_0x449ec2(0x198)]===0x0)break;const _0x5322f8=_0x4299db[_0x449ec2(0x19d)]?.[_0x449ec2(0x177)];if(_0x5322f8!=null?_0x31e265[_0x449ec2(0x198)]>=_0x5322f8:_0x5479db['length']<PAGE_SIZE)break;_0x34748b++;}return _0x31e265;}async function ensureSqlContent(_0x32ed5f){const _0x5d7745=a127_0x474a;if(_0x32ed5f[_0x5d7745(0x17f)]!=null&&String(_0x32ed5f['sqlContent'])[_0x5d7745(0x198)]>0x0)return _0x32ed5f;return getSqlQueryDetail(_0x32ed5f[_0x5d7745(0x16d)]);}export const sqlPull={'service':a127_0xcfa1cd(0x19e),'command':a127_0xcfa1cd(0x17c),'description':'Pull\x20remote\x20SQL\x20queries\x20to\x20local\x20.rabetbase/sql/','risk':'write','flags':[SQLCODE_FLAG_OPTIONAL,{'name':'name','type':a127_0xcfa1cd(0x1a4),'description':a127_0xcfa1cd(0x184)},{'name':a127_0xcfa1cd(0x172),'type':a127_0xcfa1cd(0x17d),'description':a127_0xcfa1cd(0x18c)}],async 'dryRun'(_0x3c5b3e){const _0x2028cf=a127_0xcfa1cd,_0x4af34e=loadSqlProjectConfig(_0x3c5b3e['appCode']),_0x4b7126=await readSqlLockFile(_0x4af34e['lockFilePath']),{appLock:_0x2d9b3e}=ensureSqlLockScope(_0x4b7126??createEmptySqlLock(),_0x4af34e[_0x2028cf(0x189)],_0x4af34e['sqlRoot'],'pull'),_0x4f42a0=await fetchAllSqlQueries(_0x3c5b3e['appCode'],{'sqlCode':_0x3c5b3e[_0x2028cf(0x194)](_0x2028cf(0x176))||undefined,'sqlName':_0x3c5b3e[_0x2028cf(0x194)](_0x2028cf(0x16a))||undefined}),_0x2c5e51=[];for(const _0x5d53eb of _0x4f42a0){const _0x4e2a41=await ensureSqlContent(_0x5d53eb),_0x32b64a=ensureRemoteSqlContent(_0x4e2a41),_0x4a62ba=detectModeFromSql(_0x4e2a41),_0x1665bb=_0x4e2a41['dbId']?await getDbName(_0x3c5b3e[_0x2028cf(0x189)],Number(_0x4e2a41[_0x2028cf(0x17a)]))[_0x2028cf(0x17b)](()=>undefined):undefined,_0x5332c1=buildLocalSqlFileContent({'sqlCode':_0x4e2a41[_0x2028cf(0x16d)],'sqlName':_0x4e2a41[_0x2028cf(0x16c)],'dbId':_0x4e2a41[_0x2028cf(0x17a)]},_0x32b64a,{'dbName':_0x1665bb,'mode':_0x4a62ba,'syncedAt':new Date()[_0x2028cf(0x16b)](),'description':_0x4e2a41[_0x2028cf(0x170)]}),_0x575019=buildSqlLockEntry(_0x4e2a41,_0x32b64a,'',{'dbName':_0x1665bb}),_0x651824=resolveLocalSqlFilePath(_0x4af34e,_0x4e2a41[_0x2028cf(0x16d)],_0x575019);let _0x1080ed=_0x2028cf(0x197),_0x5d0638;if(await fileExists(_0x651824)){const _0x3bbdae=await readFile(_0x651824,'utf8');isEquivalentPulledSqlFile(_0x3bbdae,_0x5332c1,_0x4a62ba)?(_0x1080ed=_0x2028cf(0x166),_0x5d0638=_0x2028cf(0x168)):(_0x1080ed=_0x2028cf(0x169),_0x5d0638=_0x2028cf(0x181));}_0x2c5e51[_0x2028cf(0x173)]({'sqlCode':_0x4e2a41['sqlCode'],'sqlName':_0x4e2a41['sqlName'],'filePath':_0x651824,'status':_0x1080ed,'reason':_0x5d0638});}return{'method':_0x2028cf(0x18b),'url':_0x2028cf(0x18f),'body':{'appCode':_0x3c5b3e[_0x2028cf(0x189)],'sqlCode':_0x3c5b3e[_0x2028cf(0x194)](_0x2028cf(0x176))||null,'sqlName':_0x3c5b3e[_0x2028cf(0x194)](_0x2028cf(0x16a))||null,'files':_0x2c5e51},'description':'Would\x20pull\x20'+_0x2c5e51[_0x2028cf(0x198)]+_0x2028cf(0x190)+_0x4af34e[_0x2028cf(0x17e)]};},async 'execute'(_0x10ab3d){const _0xb89654=a127_0xcfa1cd,_0x4ba8ce=loadSqlProjectConfig(_0x10ab3d[_0xb89654(0x189)]),_0x15acc7=await readSqlLockFile(_0x4ba8ce[_0xb89654(0x1a3)]),{lockData:_0x4c8a82,appLock:_0x1cb7c2}=ensureSqlLockScope(_0x15acc7??createEmptySqlLock(),_0x4ba8ce[_0xb89654(0x189)],_0x4ba8ce['sqlRoot'],_0xb89654(0x17c)),_0x3af5b0=_0x10ab3d[_0xb89654(0x185)](_0xb89654(0x172)),_0x5766f3=await fetchAllSqlQueries(_0x10ab3d['appCode'],{'sqlCode':_0x10ab3d[_0xb89654(0x194)](_0xb89654(0x176))||undefined,'sqlName':_0x10ab3d['str']('name')||undefined});if(_0x5766f3[_0xb89654(0x198)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':'No\x20remote\x20SQL\x20queries\x20matched.'};const _0x1ebb4f=[],_0x396ff3=[];for(const _0x5733f0 of _0x5766f3){try{_0x1ebb4f['push'](await ensureSqlContent(_0x5733f0));}catch(_0x7f4446){_0x396ff3[_0xb89654(0x173)]({'sqlCode':_0x5733f0['sqlCode'],'error':_0x7f4446 instanceof Error?_0x7f4446['message']:String(_0x7f4446)});}}if(_0x3af5b0&&!_0x10ab3d[_0xb89654(0x188)]){let _0x3f62b8=![];for(const _0x1d006c of _0x1ebb4f){const _0x54d362=detectModeFromSql(_0x1d006c),_0x1c61fa=_0x1d006c['dbId']?await getDbName(_0x10ab3d[_0xb89654(0x189)],Number(_0x1d006c['dbId']))[_0xb89654(0x17b)](()=>undefined):undefined,_0x3c9fe9=buildLocalSqlFileContent({'sqlCode':_0x1d006c[_0xb89654(0x16d)],'sqlName':_0x1d006c['sqlName'],'dbId':_0x1d006c['dbId']},ensureRemoteSqlContent(_0x1d006c),{'dbName':_0x1c61fa,'mode':_0x54d362,'syncedAt':new Date()[_0xb89654(0x16b)](),'description':_0x1d006c[_0xb89654(0x170)]}),_0x853421=resolveLocalSqlFilePath(_0x4ba8ce,_0x1d006c['sqlCode'],buildSqlLockEntry(_0x1d006c,ensureRemoteSqlContent(_0x1d006c),'',{'dbName':_0x1c61fa}));if(await fileExists(_0x853421)){const _0x4e345c=await readFile(_0x853421,_0xb89654(0x175));if(!isEquivalentPulledSqlFile(_0x4e345c,_0x3c9fe9,_0x54d362)){_0x3f62b8=!![];break;}}}if(_0x3f62b8){const _0x2468dc=await confirmForceOverwrite(_0xb89654(0x171));if(!_0x2468dc)throw CliErrors[_0xb89654(0x165)](_0xb89654(0x179));}}const _0x2bf294=cloneSqlLockData(_0x4c8a82),_0x4a9300=_0x2bf294[_0xb89654(0x19c)][_0x4ba8ce[_0xb89654(0x189)]],_0x44bbcf=[],_0x544880=[];for(const _0x13705d of _0x1ebb4f){const _0x3a5583=_0x4a9300['sqls'][_0x13705d['sqlCode']],_0x20e352=ensureRemoteSqlContent(_0x13705d),_0x227bce=detectModeFromSql(_0x13705d),_0x349eea=_0x13705d[_0xb89654(0x17a)]?await getDbName(_0x10ab3d[_0xb89654(0x189)],Number(_0x13705d['dbId']))[_0xb89654(0x17b)](()=>undefined):undefined,_0x539fa4=buildLocalSqlFileContent({'sqlCode':_0x13705d[_0xb89654(0x16d)],'sqlName':_0x13705d[_0xb89654(0x16c)],'dbId':_0x13705d[_0xb89654(0x17a)]},_0x20e352,{'dbName':_0x349eea,'mode':_0x227bce,'syncedAt':new Date()['toISOString'](),'description':_0x13705d[_0xb89654(0x170)]}),_0x3b7102=buildSqlLockEntry(_0x13705d,_0x20e352,computeSqlContentHash(_0x539fa4),{'dbName':_0x349eea}),_0x6b925e=_0x3b7102[_0xb89654(0x18a)],_0x1bc664=join(_0x4ba8ce[_0xb89654(0x17e)],_0x6b925e);try{if(await fileExists(_0x1bc664)){const _0x1b6746=await readFile(_0x1bc664,_0xb89654(0x175));if(isEquivalentPulledSqlFile(_0x1b6746,_0x539fa4,_0x227bce)){_0x544880[_0xb89654(0x173)]({'sqlCode':_0x13705d[_0xb89654(0x16d)],'reason':_0xb89654(0x168)}),_0x4a9300[_0xb89654(0x1a0)][_0x13705d[_0xb89654(0x16d)]]={..._0x3b7102,'hash':computeSqlContentHash(_0x1b6746),'path':_0x6b925e};continue;}if(!_0x3af5b0){_0x544880[_0xb89654(0x173)]({'sqlCode':_0x13705d['sqlCode'],'reason':_0xb89654(0x182)});continue;}}const _0x1274b2=_0x3a5583?.[_0xb89654(0x18a)]?join(_0x4ba8ce[_0xb89654(0x17e)],_0x3a5583[_0xb89654(0x18a)]):undefined;_0x1274b2&&_0x1274b2!==_0x1bc664&&await fileExists(_0x1274b2)&&await rm(_0x1274b2,{'force':!![]}),await ensureParentDirectory(_0x1bc664),await writeFile(_0x1bc664,_0x539fa4,'utf8'),_0x4a9300[_0xb89654(0x1a0)][_0x13705d[_0xb89654(0x16d)]]={..._0x3b7102,'path':_0x6b925e},_0x44bbcf[_0xb89654(0x173)]({'sqlCode':_0x13705d[_0xb89654(0x16d)],'filePath':_0x1bc664});}catch(_0x29768b){_0x396ff3['push']({'sqlCode':_0x13705d[_0xb89654(0x16d)],'error':_0x29768b instanceof Error?_0x29768b[_0xb89654(0x18d)]:String(_0x29768b)});}}return _0x4a9300[_0xb89654(0x19f)]=new Date()[_0xb89654(0x16b)](),await writeSqlLockFile(_0x4ba8ce[_0xb89654(0x1a3)],_0x2bf294),{'ok':_0x396ff3['length']===0x0,'data':{'pulled':_0x44bbcf,'skipped':_0x544880,'failed':_0x396ff3},'message':_0xb89654(0x1a2)+_0x44bbcf[_0xb89654(0x198)]+_0xb89654(0x193)+_0x544880[_0xb89654(0x198)]+'\x20skipped,\x20'+_0x396ff3[_0xb89654(0x198)]+'\x20failed'};}};function detectModeFromSql(_0x1ead5f){const _0x5431b9=a127_0xcfa1cd,_0x121c97=ensureRemoteSqlContent(_0x1ead5f),_0x119666=stripLocalSqlMetadata(_0x121c97,_0x5431b9(0x195))[_0x5431b9(0x16f)]();if(/^<(select|insert|update|delete)\b/i[_0x5431b9(0x18e)](_0x119666))return _0x5431b9(0x195);return'sql';}function isEquivalentPulledSqlFile(_0x1e7c7b,_0x2573c1,_0x9e8018){return normalizePullComparableContent(_0x1e7c7b,_0x9e8018)===normalizePullComparableContent(_0x2573c1,_0x9e8018);}function normalizePullComparableContent(_0x2c0d79,_0x9ac9e0){const _0x272d31=a127_0xcfa1cd,_0x527709=_0x2c0d79['replace'](/\r\n/g,'\x0a')[_0x272d31(0x192)]('\x0a'),_0x48ed20=_0x527709[_0x272d31(0x19a)](_0x28d137=>!isSyncedAtMetadataLine(_0x28d137,_0x9ac9e0));return _0x48ed20[_0x272d31(0x183)]('\x0a');}function isSyncedAtMetadataLine(_0x8293d4,_0x4762d0){const _0x4ebcab=a127_0xcfa1cd;if(_0x4762d0===_0x4ebcab(0x195))return/^\s*<!--\s*@lovrabet\.syncedAt:/[_0x4ebcab(0x18e)](_0x8293d4);return/^\s*--\s*@lovrabet\.syncedAt:/[_0x4ebcab(0x18e)](_0x8293d4);}
1
+ const a127_0x2d0df4=a127_0x2cbc;(function(_0x4a4d21,_0x6607a){const _0x498331=a127_0x2cbc,_0x35fb8f=_0x4a4d21();while(!![]){try{const _0x3744d8=-parseInt(_0x498331(0x1b1))/0x1*(-parseInt(_0x498331(0x1c3))/0x2)+parseInt(_0x498331(0x1a8))/0x3+-parseInt(_0x498331(0x1c7))/0x4+-parseInt(_0x498331(0x1bf))/0x5*(-parseInt(_0x498331(0x1ca))/0x6)+-parseInt(_0x498331(0x19e))/0x7+parseInt(_0x498331(0x1a5))/0x8*(parseInt(_0x498331(0x1c4))/0x9)+parseInt(_0x498331(0x19f))/0xa*(parseInt(_0x498331(0x1be))/0xb);if(_0x3744d8===_0x6607a)break;else _0x35fb8f['push'](_0x35fb8f['shift']());}catch(_0x3ea2e2){_0x35fb8f['push'](_0x35fb8f['shift']());}}}(a127_0x50b6,0xde035));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';function a127_0x2cbc(_0x1c7efe,_0x2def5e){_0x1c7efe=_0x1c7efe-0x194;const _0x50b60a=a127_0x50b6();let _0x2cbc7e=_0x50b60a[_0x1c7efe];return _0x2cbc7e;}import{getDbName}from'../../core/db-resolver.js';function a127_0x50b6(){const _0x4a4619=['Force\x20pull\x20cancelled.','join','4026696Nxbqny','unchanged','force','split','catch','POST','tableData','/smartapi/custom/queryUserCustomSqlList\x20+\x20/smartapi/custom/getUserCustomSql','nonInteractive','write','would_pull','pull','name','path','lockFilePath','Pull\x20remote\x20SQL\x20queries\x20to\x20local\x20.rabetbase/sql/','9969246XadKJy','720xxfGJV','test','sqlName','sqlRootDir','\x20skipped,\x20','local\x20differs\x20from\x20remote','95224QBSLGF','dbId','totalCount','2455410jZCzFr','bool','sqls','sql','conflict','utf8','skipped','Force\x20overwrite\x20local\x20unsynced\x20changes','sqlcode','69WdjZRE','sqlContent','description','replace','length','trimStart','lastSync','sqlCode','toISOString','str','local\x20differs\x20from\x20remote\x20(use\x20--force\x20to\x20overwrite)','appCode','Filter\x20by\x20SQL\x20display\x20name','146476nkOQHm','5YHdNar','Would\x20pull\x20','push','mybatisXml','17734KRFNaR','549ZHKibd','filter','string','5810804pGSOry'];a127_0x50b6=function(){return _0x4a4619;};return a127_0x50b6();}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(_0x8912a,_0x451cb2){const _0x5e65bb=a127_0x2cbc,_0x35a51d=[];let _0x98ce7c=0x1;while(!![]){const _0x46e07e=await listSqlQueries(_0x8912a,{'currentPage':_0x98ce7c,'pageSize':PAGE_SIZE,'sqlCode':_0x451cb2[_0x5e65bb(0x1b8)],'sqlName':_0x451cb2[_0x5e65bb(0x1a1)]}),_0x535cdd=_0x46e07e[_0x5e65bb(0x194)]??[];_0x35a51d[_0x5e65bb(0x1c1)](..._0x535cdd);if(_0x535cdd[_0x5e65bb(0x1b5)]===0x0)break;const _0x35d387=_0x46e07e['paging']?.[_0x5e65bb(0x1a7)];if(_0x35d387!=null?_0x35a51d['length']>=_0x35d387:_0x535cdd[_0x5e65bb(0x1b5)]<PAGE_SIZE)break;_0x98ce7c++;}return _0x35a51d;}async function ensureSqlContent(_0xbb3677){const _0x3c905d=a127_0x2cbc;if(_0xbb3677[_0x3c905d(0x1b2)]!=null&&String(_0xbb3677[_0x3c905d(0x1b2)])[_0x3c905d(0x1b5)]>0x0)return _0xbb3677;return getSqlQueryDetail(_0xbb3677[_0x3c905d(0x1b8)]);}export const sqlPull={'service':a127_0x2d0df4(0x1ab),'command':a127_0x2d0df4(0x199),'description':a127_0x2d0df4(0x19d),'risk':a127_0x2d0df4(0x197),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':'name','type':a127_0x2d0df4(0x1c6),'description':a127_0x2d0df4(0x1bd)},{'name':'force','type':'boolean','description':a127_0x2d0df4(0x1af)}],async 'dryRun'(_0x1bf751){const _0x2da281=a127_0x2d0df4,_0xfae71f=loadSqlProjectConfig(_0x1bf751[_0x2da281(0x1bc)]),_0x1ea870=await readSqlLockFile(_0xfae71f[_0x2da281(0x19c)]),{appLock:_0x48cb5f}=ensureSqlLockScope(_0x1ea870??createEmptySqlLock(),_0xfae71f[_0x2da281(0x1bc)],_0xfae71f['sqlRoot'],_0x2da281(0x199)),_0x4ea9c9=await fetchAllSqlQueries(_0x1bf751[_0x2da281(0x1bc)],{'sqlCode':_0x1bf751[_0x2da281(0x1ba)](_0x2da281(0x1b0))||undefined,'sqlName':_0x1bf751[_0x2da281(0x1ba)](_0x2da281(0x19a))||undefined}),_0x11094e=[];for(const _0x4b97cd of _0x4ea9c9){const _0x19373b=await ensureSqlContent(_0x4b97cd),_0x191bf=ensureRemoteSqlContent(_0x19373b),_0xeab30a=detectModeFromSql(_0x19373b),_0x3779c0=_0x19373b['dbId']?await getDbName(_0x1bf751['appCode'],Number(_0x19373b[_0x2da281(0x1a6)]))['catch'](()=>undefined):undefined,_0x2927b9=buildLocalSqlFileContent({'sqlCode':_0x19373b[_0x2da281(0x1b8)],'sqlName':_0x19373b['sqlName'],'dbId':_0x19373b[_0x2da281(0x1a6)]},_0x191bf,{'dbName':_0x3779c0,'mode':_0xeab30a,'syncedAt':new Date()['toISOString'](),'description':_0x19373b['description']}),_0x16dc21=buildSqlLockEntry(_0x19373b,_0x191bf,'',{'dbName':_0x3779c0}),_0x169828=resolveLocalSqlFilePath(_0xfae71f,_0x19373b[_0x2da281(0x1b8)],_0x16dc21);let _0xbc2c82=_0x2da281(0x198),_0x56a1f0;if(await fileExists(_0x169828)){const _0x315d88=await readFile(_0x169828,_0x2da281(0x1ad));isEquivalentPulledSqlFile(_0x315d88,_0x2927b9,_0xeab30a)?(_0xbc2c82=_0x2da281(0x1ae),_0x56a1f0=_0x2da281(0x1cb)):(_0xbc2c82=_0x2da281(0x1ac),_0x56a1f0=_0x2da281(0x1bb));}_0x11094e['push']({'sqlCode':_0x19373b['sqlCode'],'sqlName':_0x19373b['sqlName'],'filePath':_0x169828,'status':_0xbc2c82,'reason':_0x56a1f0});}return{'method':_0x2da281(0x1cf),'url':_0x2da281(0x195),'body':{'appCode':_0x1bf751[_0x2da281(0x1bc)],'sqlCode':_0x1bf751[_0x2da281(0x1ba)](_0x2da281(0x1b0))||null,'sqlName':_0x1bf751[_0x2da281(0x1ba)](_0x2da281(0x19a))||null,'files':_0x11094e},'description':_0x2da281(0x1c0)+_0x11094e[_0x2da281(0x1b5)]+'\x20SQL\x20file(s)\x20into\x20'+_0xfae71f[_0x2da281(0x1a2)]};},async 'execute'(_0x26c383){const _0x460c42=a127_0x2d0df4,_0x218a84=loadSqlProjectConfig(_0x26c383['appCode']),_0x1d22cc=await readSqlLockFile(_0x218a84[_0x460c42(0x19c)]),{lockData:_0x5350,appLock:_0x2e2146}=ensureSqlLockScope(_0x1d22cc??createEmptySqlLock(),_0x218a84[_0x460c42(0x1bc)],_0x218a84['sqlRoot'],_0x460c42(0x199)),_0x303998=_0x26c383[_0x460c42(0x1a9)](_0x460c42(0x1cc)),_0xea3b27=await fetchAllSqlQueries(_0x26c383[_0x460c42(0x1bc)],{'sqlCode':_0x26c383['str'](_0x460c42(0x1b0))||undefined,'sqlName':_0x26c383[_0x460c42(0x1ba)](_0x460c42(0x19a))||undefined});if(_0xea3b27[_0x460c42(0x1b5)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':'No\x20remote\x20SQL\x20queries\x20matched.'};const _0x4e0d52=[],_0x5418e2=[];for(const _0x389852 of _0xea3b27){try{_0x4e0d52[_0x460c42(0x1c1)](await ensureSqlContent(_0x389852));}catch(_0x4b01f1){_0x5418e2['push']({'sqlCode':_0x389852[_0x460c42(0x1b8)],'error':_0x4b01f1 instanceof Error?_0x4b01f1['message']:String(_0x4b01f1)});}}if(_0x303998&&!_0x26c383[_0x460c42(0x196)]){let _0x5d9129=![];for(const _0x104482 of _0x4e0d52){const _0x10f0b5=detectModeFromSql(_0x104482),_0x4b8f74=_0x104482[_0x460c42(0x1a6)]?await getDbName(_0x26c383['appCode'],Number(_0x104482[_0x460c42(0x1a6)]))[_0x460c42(0x1ce)](()=>undefined):undefined,_0x1c1699=buildLocalSqlFileContent({'sqlCode':_0x104482[_0x460c42(0x1b8)],'sqlName':_0x104482[_0x460c42(0x1a1)],'dbId':_0x104482[_0x460c42(0x1a6)]},ensureRemoteSqlContent(_0x104482),{'dbName':_0x4b8f74,'mode':_0x10f0b5,'syncedAt':new Date()[_0x460c42(0x1b9)](),'description':_0x104482['description']}),_0x41b081=resolveLocalSqlFilePath(_0x218a84,_0x104482['sqlCode'],buildSqlLockEntry(_0x104482,ensureRemoteSqlContent(_0x104482),'',{'dbName':_0x4b8f74}));if(await fileExists(_0x41b081)){const _0x51bcf5=await readFile(_0x41b081,_0x460c42(0x1ad));if(!isEquivalentPulledSqlFile(_0x51bcf5,_0x1c1699,_0x10f0b5)){_0x5d9129=!![];break;}}}if(_0x5d9129){const _0x109cd7=await confirmForceOverwrite('Force\x20pull\x20will\x20overwrite\x20local\x20SQL\x20that\x20differs\x20from\x20remote.');if(!_0x109cd7)throw CliErrors['cancelled'](_0x460c42(0x1c8));}}const _0x203918=cloneSqlLockData(_0x5350),_0x491110=_0x203918['apps'][_0x218a84[_0x460c42(0x1bc)]],_0x130beb=[],_0x52f4b6=[];for(const _0x239e02 of _0x4e0d52){const _0x2cf27d=_0x491110[_0x460c42(0x1aa)][_0x239e02[_0x460c42(0x1b8)]],_0x2ccd86=ensureRemoteSqlContent(_0x239e02),_0x332725=detectModeFromSql(_0x239e02),_0x38e8c8=_0x239e02[_0x460c42(0x1a6)]?await getDbName(_0x26c383['appCode'],Number(_0x239e02[_0x460c42(0x1a6)]))[_0x460c42(0x1ce)](()=>undefined):undefined,_0x1f3e43=buildLocalSqlFileContent({'sqlCode':_0x239e02[_0x460c42(0x1b8)],'sqlName':_0x239e02[_0x460c42(0x1a1)],'dbId':_0x239e02[_0x460c42(0x1a6)]},_0x2ccd86,{'dbName':_0x38e8c8,'mode':_0x332725,'syncedAt':new Date()[_0x460c42(0x1b9)](),'description':_0x239e02[_0x460c42(0x1b3)]}),_0x2e2278=buildSqlLockEntry(_0x239e02,_0x2ccd86,computeSqlContentHash(_0x1f3e43),{'dbName':_0x38e8c8}),_0x88eba0=_0x2e2278[_0x460c42(0x19b)],_0x2022ce=join(_0x218a84[_0x460c42(0x1a2)],_0x88eba0);try{if(await fileExists(_0x2022ce)){const _0xc49a8e=await readFile(_0x2022ce,_0x460c42(0x1ad));if(isEquivalentPulledSqlFile(_0xc49a8e,_0x1f3e43,_0x332725)){_0x52f4b6[_0x460c42(0x1c1)]({'sqlCode':_0x239e02[_0x460c42(0x1b8)],'reason':'unchanged'}),_0x491110[_0x460c42(0x1aa)][_0x239e02[_0x460c42(0x1b8)]]={..._0x2e2278,'hash':computeSqlContentHash(_0xc49a8e),'path':_0x88eba0};continue;}if(!_0x303998){_0x52f4b6[_0x460c42(0x1c1)]({'sqlCode':_0x239e02[_0x460c42(0x1b8)],'reason':_0x460c42(0x1a4)});continue;}}const _0x16f6f2=_0x2cf27d?.[_0x460c42(0x19b)]?join(_0x218a84[_0x460c42(0x1a2)],_0x2cf27d[_0x460c42(0x19b)]):undefined;_0x16f6f2&&_0x16f6f2!==_0x2022ce&&await fileExists(_0x16f6f2)&&await rm(_0x16f6f2,{'force':!![]}),await ensureParentDirectory(_0x2022ce),await writeFile(_0x2022ce,_0x1f3e43,_0x460c42(0x1ad)),_0x491110[_0x460c42(0x1aa)][_0x239e02['sqlCode']]={..._0x2e2278,'path':_0x88eba0},_0x130beb[_0x460c42(0x1c1)]({'sqlCode':_0x239e02[_0x460c42(0x1b8)],'filePath':_0x2022ce});}catch(_0x58c464){_0x5418e2[_0x460c42(0x1c1)]({'sqlCode':_0x239e02[_0x460c42(0x1b8)],'error':_0x58c464 instanceof Error?_0x58c464['message']:String(_0x58c464)});}}return _0x491110[_0x460c42(0x1b7)]=new Date()[_0x460c42(0x1b9)](),await writeSqlLockFile(_0x218a84['lockFilePath'],_0x203918),{'ok':_0x5418e2['length']===0x0,'data':{'pulled':_0x130beb,'skipped':_0x52f4b6,'failed':_0x5418e2},'message':'Pull\x20complete:\x20'+_0x130beb[_0x460c42(0x1b5)]+'\x20written,\x20'+_0x52f4b6['length']+_0x460c42(0x1a3)+_0x5418e2[_0x460c42(0x1b5)]+'\x20failed'};}};function detectModeFromSql(_0x259fa2){const _0x7def74=a127_0x2d0df4,_0x117a80=ensureRemoteSqlContent(_0x259fa2),_0xf64e85=stripLocalSqlMetadata(_0x117a80,_0x7def74(0x1c2))[_0x7def74(0x1b6)]();if(/^<(select|insert|update|delete)\b/i[_0x7def74(0x1a0)](_0xf64e85))return _0x7def74(0x1c2);return _0x7def74(0x1ab);}function isEquivalentPulledSqlFile(_0x298f85,_0x5b2afb,_0x45ec84){return normalizePullComparableContent(_0x298f85,_0x45ec84)===normalizePullComparableContent(_0x5b2afb,_0x45ec84);}function normalizePullComparableContent(_0x5e89d5,_0x1775b2){const _0x4c1da8=a127_0x2d0df4,_0x2c8aa3=_0x5e89d5[_0x4c1da8(0x1b4)](/\r\n/g,'\x0a')[_0x4c1da8(0x1cd)]('\x0a'),_0x494834=_0x2c8aa3[_0x4c1da8(0x1c5)](_0x53567c=>!isSyncedAtMetadataLine(_0x53567c,_0x1775b2));return _0x494834[_0x4c1da8(0x1c9)]('\x0a');}function isSyncedAtMetadataLine(_0x4d43ca,_0x1c5d3b){const _0x24812c=a127_0x2d0df4;if(_0x1c5d3b===_0x24812c(0x1c2))return/^\s*<!--\s*@lovrabet\.syncedAt:/['test'](_0x4d43ca);return/^\s*--\s*@lovrabet\.syncedAt:/[_0x24812c(0x1a0)](_0x4d43ca);}
@@ -1 +1 @@
1
- const a128_0x41ced6=a128_0x1ddd;(function(_0x2e3d23,_0x2849fb){const _0x10be5a=a128_0x1ddd,_0xf702d5=_0x2e3d23();while(!![]){try{const _0x3759e2=parseInt(_0x10be5a(0x156))/0x1+parseInt(_0x10be5a(0x13b))/0x2*(-parseInt(_0x10be5a(0x15b))/0x3)+parseInt(_0x10be5a(0x159))/0x4*(-parseInt(_0x10be5a(0x135))/0x5)+-parseInt(_0x10be5a(0x149))/0x6+-parseInt(_0x10be5a(0x151))/0x7+-parseInt(_0x10be5a(0x168))/0x8+parseInt(_0x10be5a(0x162))/0x9*(parseInt(_0x10be5a(0x13c))/0xa);if(_0x3759e2===_0x2849fb)break;else _0xf702d5['push'](_0xf702d5['shift']());}catch(_0x48d8f5){_0xf702d5['push'](_0xf702d5['shift']());}}}(a128_0x18d7,0x63cba));import{mkdir,readFile,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{updateSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{getDbName,listDatabases}from'../../core/db-resolver.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{fileExists}from'../../core/bff/file-system.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildSqlLockEntry,stripLocalSqlMetadata}from'./shared.js';import{buildDbDirectoryName}from'../../core/sql-sync/utils.js';async function getTargetSqlQueries(_0x1326a9,_0x77bd3d,_0x4e916b){const _0x4fca3c=a128_0x1ddd,_0x3f7a2b=await scanLocalSqlQueries(_0x1326a9),_0x4067dc=new Map();for(const _0x13d6cb of _0x3f7a2b){if(_0x4e916b&&_0x13d6cb['sqlCode']!==_0x4e916b)continue;const _0x33c105=_0x4067dc[_0x4fca3c(0x157)](_0x13d6cb['sqlCode'])??[];_0x33c105[_0x4fca3c(0x13f)](_0x13d6cb),_0x4067dc[_0x4fca3c(0x132)](_0x13d6cb[_0x4fca3c(0x166)],_0x33c105);}if(_0x4e916b&&!_0x4067dc[_0x4fca3c(0x12e)](_0x4e916b))throw CliErrors['validation'](_0x4fca3c(0x13e)+_0x4e916b);const _0x2d9326=[];for(const [_0x1b4848,_0x1efec2]of _0x4067dc['entries']()){if(_0x1efec2[_0x4fca3c(0x147)]===0x1){_0x2d9326[_0x4fca3c(0x13f)](_0x1efec2[0x0]);continue;}const _0x2fbdff=_0x77bd3d[_0x4fca3c(0x14b)][_0x1b4848],_0x55a1b3=_0x2fbdff?.[_0x4fca3c(0x137)],_0x5bcc5b=_0x55a1b3?_0x1efec2['filter'](_0x5a9f69=>_0x5a9f69[_0x4fca3c(0x165)]!==_0x55a1b3):_0x1efec2;if(_0x2fbdff&&_0x5bcc5b[_0x4fca3c(0x147)]===0x1){_0x2d9326[_0x4fca3c(0x13f)](_0x5bcc5b[0x0]);continue;}throw CliErrors[_0x4fca3c(0x14d)]('Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20'+_0x1b4848+_0x4fca3c(0x163));}return _0x2d9326;}export const sqlPush={'service':a128_0x41ced6(0x141),'command':a128_0x41ced6(0x13f),'description':a128_0x41ced6(0x153),'risk':a128_0x41ced6(0x14e),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a128_0x41ced6(0x14c),'type':a128_0x41ced6(0x130),'description':'Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock'}],async 'dryRun'(_0x1f7bd1){const _0x58a5df=a128_0x41ced6,_0x1602f4=loadSqlProjectConfig(_0x1f7bd1[_0x58a5df(0x15d)]),_0x1efb7c=await readSqlLockFile(_0x1602f4[_0x58a5df(0x158)]),{appLock:_0x3b71b7}=ensureSqlLockScope(_0x1efb7c??createEmptySqlLock(),_0x1f7bd1['appCode'],_0x1602f4[_0x58a5df(0x15c)],_0x58a5df(0x13f)),_0x5da79b=await getTargetSqlQueries(_0x1602f4,_0x3b71b7,_0x1f7bd1[_0x58a5df(0x134)]('sqlcode')||undefined),_0x644fc7=[];for(const _0x2920a2 of _0x5da79b){const _0x4a4e88=await computeSqlFileHash(_0x2920a2[_0x58a5df(0x154)]),_0x5b0ce5=_0x3b71b7[_0x58a5df(0x14b)][_0x2920a2[_0x58a5df(0x166)]],_0x5de208=!!_0x5b0ce5&&(_0x5b0ce5[_0x58a5df(0x137)]!==_0x2920a2[_0x58a5df(0x165)]||!!_0x2920a2[_0x58a5df(0x140)]&&_0x5b0ce5['sqlName']!==_0x2920a2[_0x58a5df(0x140)]);if(!_0x1f7bd1[_0x58a5df(0x145)](_0x58a5df(0x14c))&&_0x5b0ce5&&_0x5b0ce5[_0x58a5df(0x14a)]===_0x4a4e88&&!_0x5de208)continue;_0x644fc7[_0x58a5df(0x13f)](_0x2920a2[_0x58a5df(0x166)]);}return{'method':_0x58a5df(0x155),'url':'/smartapi/custom/updateUserCustomSql','body':{'sqlCodes':_0x644fc7,'appCode':_0x1f7bd1[_0x58a5df(0x15d)]},'description':_0x58a5df(0x16a)+_0x644fc7[_0x58a5df(0x147)]+'\x20SQL\x20file(s)'};},async 'execute'(_0x25bb8d){const _0x288951=a128_0x41ced6,_0x8fd2be=loadSqlProjectConfig(_0x25bb8d['appCode']),_0x537068=await readSqlLockFile(_0x8fd2be[_0x288951(0x158)]),{lockData:_0x17456c,appLock:_0x5113a7}=ensureSqlLockScope(_0x537068??createEmptySqlLock(),_0x25bb8d['appCode'],_0x8fd2be[_0x288951(0x15c)],'push'),_0x48aa25=await getTargetSqlQueries(_0x8fd2be,_0x5113a7,_0x25bb8d[_0x288951(0x134)](_0x288951(0x160))||undefined);if(_0x48aa25[_0x288951(0x147)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x288951(0x16b)};const _0x1c6a9f=[],_0x4891b8=[],_0x318875=[];for(const _0x2082ba of _0x48aa25){const _0x311e3d=_0x5113a7[_0x288951(0x14b)][_0x2082ba[_0x288951(0x166)]];if(!_0x311e3d){_0x318875['push']({'sqlCode':_0x2082ba[_0x288951(0x166)],'error':_0x288951(0x146)});continue;}try{const _0x5c73cd=await computeSqlFileHash(_0x2082ba[_0x288951(0x154)]),_0x2d2b2a=_0x311e3d[_0x288951(0x137)]!==_0x2082ba[_0x288951(0x165)]||!!_0x2082ba[_0x288951(0x140)]&&_0x311e3d[_0x288951(0x140)]!==_0x2082ba['sqlName'];if(!_0x25bb8d[_0x288951(0x145)](_0x288951(0x14c))&&_0x311e3d[_0x288951(0x14a)]===_0x5c73cd&&!_0x2d2b2a){_0x4891b8[_0x288951(0x13f)]({'sqlCode':_0x2082ba['sqlCode'],'reason':'unchanged'});continue;}if(_0x311e3d[_0x288951(0x138)]==null){_0x318875['push']({'sqlCode':_0x2082ba['sqlCode'],'error':_0x288951(0x152)});continue;}const _0x24eb7e=await readFile(_0x2082ba[_0x288951(0x154)],'utf8'),_0x3a2cd7=stripLocalSqlMetadata(_0x24eb7e,_0x2082ba[_0x288951(0x150)]),_0x212fc1=_0x2082ba[_0x288951(0x140)]||_0x311e3d[_0x288951(0x140)],_0x551a52=await resolveTargetDbBinding(_0x25bb8d['appCode'],_0x2082ba,_0x311e3d),_0x456025=await updateSqlQuery({'id':_0x311e3d[_0x288951(0x15e)],'appCode':_0x25bb8d['appCode'],'sqlCode':_0x2082ba[_0x288951(0x166)],'sqlName':_0x212fc1,'dbId':_0x551a52['dbId'],'version':_0x311e3d['version'],'sqlContent':_0x3a2cd7,'sqlConfig':_0x311e3d['sqlConfig']??undefined}),_0x32e3b7=_0x456025[_0x288951(0x13d)]?await getDbName(_0x25bb8d['appCode'],Number(_0x456025[_0x288951(0x13d)]))[_0x288951(0x139)](()=>_0x551a52[_0x288951(0x167)]):_0x551a52[_0x288951(0x167)];_0x5113a7[_0x288951(0x14b)][_0x2082ba[_0x288951(0x166)]]={...buildSqlLockEntry(_0x456025,_0x3a2cd7,_0x5c73cd,{'dbName':_0x32e3b7}),'path':_0x2082ba['relativePath'],'mode':_0x311e3d[_0x288951(0x150)]},await archivePreviousSqlFileIfNeeded(_0x8fd2be,_0x311e3d[_0x288951(0x137)],_0x2082ba[_0x288951(0x165)]),_0x1c6a9f[_0x288951(0x13f)]({'sqlCode':_0x2082ba['sqlCode'],'remoteId':_0x311e3d[_0x288951(0x15e)]});}catch(_0x2c7ee7){_0x318875[_0x288951(0x13f)]({'sqlCode':_0x2082ba['sqlCode'],'error':_0x2c7ee7 instanceof Error?_0x2c7ee7[_0x288951(0x16c)]:String(_0x2c7ee7)});}}return _0x5113a7[_0x288951(0x144)]=new Date()['toISOString'](),await writeSqlLockFile(_0x8fd2be[_0x288951(0x158)],_0x17456c),{'ok':_0x318875[_0x288951(0x147)]===0x0,'data':{'pushed':_0x1c6a9f,'skipped':_0x4891b8,'failed':_0x318875},'message':_0x288951(0x133)+_0x1c6a9f[_0x288951(0x147)]+_0x288951(0x142)+_0x4891b8[_0x288951(0x147)]+_0x288951(0x164)+_0x318875[_0x288951(0x147)]+'\x20failed'};}};async function archivePreviousSqlFileIfNeeded(_0x1a3a3a,_0x4e0ddb,_0x2cd77d){const _0x175f95=a128_0x41ced6;if(!_0x4e0ddb||_0x4e0ddb===_0x2cd77d)return;const _0x2d09f4=join(_0x1a3a3a[_0x175f95(0x12f)],_0x4e0ddb);if(!await fileExists(_0x2d09f4))return;const _0x35c115=await moveToTrash(_0x1a3a3a['projectRoot'],_0x1a3a3a[_0x175f95(0x15f)],_0x2d09f4);await cleanupEmptyDirectories(dirname(_0x2d09f4),_0x1a3a3a[_0x175f95(0x12f)]),void _0x35c115;}function a128_0x1ddd(_0x59d991,_0x6866d8){_0x59d991=_0x59d991-0x12e;const _0x18d790=a128_0x18d7();let _0x1ddd7f=_0x18d790[_0x59d991];return _0x1ddd7f;}async function moveToTrash(_0x403398,_0x4a382f,_0x48bd07){const _0x41f3d7=new Date()['toISOString']()['replace'](/[:.]/g,'-'),_0x1fcd36=relative(_0x403398,_0x48bd07),_0x18b49c=join(_0x4a382f,_0x41f3d7,_0x1fcd36);return await mkdir(dirname(_0x18b49c),{'recursive':!![]}),await rename(_0x48bd07,_0x18b49c),_0x18b49c;}async function cleanupEmptyDirectories(_0xe6ff9a,_0xe52137){let _0x579661=resolve(_0xe6ff9a);const _0x1ea44a=resolve(_0xe52137);while(_0x579661['startsWith'](''+_0x1ea44a+sep)||_0x579661===_0x1ea44a){if(_0x579661===_0x1ea44a)return;try{const _0x4038ab=await readdir(_0x579661);if(_0x4038ab['length']>0x0)return;await rmdir(_0x579661);}catch{return;}_0x579661=dirname(_0x579661);}}async function resolveTargetDbBinding(_0x2d5c6d,_0x16ca58,_0x5eeadf){const _0x2704b9=a128_0x41ced6,_0x36acc5=_0x16ca58[_0x2704b9(0x169)];if(!_0x36acc5)return{'dbId':_0x5eeadf[_0x2704b9(0x13d)],'dbName':_0x5eeadf[_0x2704b9(0x167)]};const _0x3b79ee=buildDbDirectoryName(_0x5eeadf[_0x2704b9(0x167)],_0x5eeadf[_0x2704b9(0x13d)]);if(_0x36acc5===_0x3b79ee)return{'dbId':_0x5eeadf['dbId'],'dbName':_0x5eeadf[_0x2704b9(0x167)]};const _0x6f95fa=parseExplicitDbDirectory(_0x36acc5);if(_0x6f95fa!=null)return{'dbId':_0x6f95fa,'dbName':await getDbName(_0x2d5c6d,_0x6f95fa)['catch'](()=>undefined)};const _0x4db32b=await listDatabases(_0x2d5c6d),_0x23c75e=_0x4db32b[_0x2704b9(0x14f)](_0x3cf6ee=>buildDbDirectoryName(_0x3cf6ee['dbName'],_0x3cf6ee['dbId'])===_0x36acc5);if(_0x23c75e['length']===0x1)return{'dbId':_0x23c75e[0x0]['dbId'],'dbName':_0x23c75e[0x0][_0x2704b9(0x167)]};if(_0x23c75e['length']===0x0)throw CliErrors[_0x2704b9(0x14d)](_0x2704b9(0x15a)+_0x36acc5+_0x2704b9(0x13a)+_0x16ca58[_0x2704b9(0x166)]+'.');const _0x8f51e2=_0x23c75e[_0x2704b9(0x143)](_0x22c6ec=>_0x22c6ec[_0x2704b9(0x167)]+'\x20('+_0x22c6ec[_0x2704b9(0x13d)]+')')[_0x2704b9(0x136)](',\x20');throw CliErrors[_0x2704b9(0x14d)](_0x2704b9(0x161)+_0x36acc5+'\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20'+_0x16ca58[_0x2704b9(0x166)]+':\x20'+_0x8f51e2);}function parseExplicitDbDirectory(_0xd4426){const _0x5e4a5e=a128_0x41ced6,_0x58c4f2=/^db-(\d+)$/[_0x5e4a5e(0x148)](_0xd4426);if(!_0x58c4f2)return null;const _0x19c41b=Number(_0x58c4f2[0x1]);return Number[_0x5e4a5e(0x131)](_0x19c41b)&&_0x19c41b>0x0?_0x19c41b:null;}function a128_0x18d7(){const _0x2e083b=['Local\x20directory\x20\x22','12051yKBoVV','.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.','\x20skipped,\x20','relativePath','sqlCode','dbName','2890648LZiLbP','dbDirectory','Would\x20push\x20','No\x20local\x20SQL\x20files\x20found.','message','has','sqlRootDir','boolean','isFinite','set','Push\x20complete:\x20','str','2048935niDOol','join','path','version','catch','\x22\x20for\x20sqlCode\x20','8266LRkLMo','21610xdPOQP','dbId','Local\x20SQL\x20not\x20found:\x20','push','sqlName','sql','\x20pushed,\x20','map','lastSync','bool','local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first','length','exec','4188618QlCPAx','hash','sqls','force','validation','high-risk-write','filter','mode','2485378gQgWaz','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','Push\x20local\x20SQL\x20files\x20to\x20remote','filePath','POST','4871ZlqvRr','get','lockFilePath','4iBStku','No\x20database\x20matches\x20local\x20directory\x20\x22','483JSwbkI','sqlRoot','appCode','remoteId','trashDir','sqlcode'];a128_0x18d7=function(){return _0x2e083b;};return a128_0x18d7();}
1
+ const a128_0x5cf880=a128_0x4618;(function(_0x470965,_0x3fa04d){const _0x563285=a128_0x4618,_0xfd6194=_0x470965();while(!![]){try{const _0x383729=parseInt(_0x563285(0x15c))/0x1*(parseInt(_0x563285(0x18d))/0x2)+parseInt(_0x563285(0x180))/0x3*(parseInt(_0x563285(0x168))/0x4)+parseInt(_0x563285(0x176))/0x5+-parseInt(_0x563285(0x16d))/0x6*(-parseInt(_0x563285(0x18a))/0x7)+parseInt(_0x563285(0x164))/0x8+parseInt(_0x563285(0x14f))/0x9*(-parseInt(_0x563285(0x153))/0xa)+parseInt(_0x563285(0x162))/0xb*(-parseInt(_0x563285(0x170))/0xc);if(_0x383729===_0x3fa04d)break;else _0xfd6194['push'](_0xfd6194['shift']());}catch(_0x1b14ca){_0xfd6194['push'](_0xfd6194['shift']());}}}(a128_0x5420,0x7414c));import{mkdir,readFile,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{updateSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{getDbName,listDatabases}from'../../core/db-resolver.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';function a128_0x4618(_0xce0fd9,_0x4d082d){_0xce0fd9=_0xce0fd9-0x14b;const _0x5420bb=a128_0x5420();let _0x46185b=_0x5420bb[_0xce0fd9];return _0x46185b;}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(_0x4afb2f,_0x47a392,_0x532b94){const _0x2f2b85=a128_0x4618,_0x1342ef=await scanLocalSqlQueries(_0x4afb2f),_0x27de5a=new Map();for(const _0x46abf2 of _0x1342ef){if(_0x532b94&&_0x46abf2[_0x2f2b85(0x17a)]!==_0x532b94)continue;const _0x3a424e=_0x27de5a['get'](_0x46abf2[_0x2f2b85(0x17a)])??[];_0x3a424e[_0x2f2b85(0x17e)](_0x46abf2),_0x27de5a['set'](_0x46abf2['sqlCode'],_0x3a424e);}if(_0x532b94&&!_0x27de5a[_0x2f2b85(0x160)](_0x532b94))throw CliErrors[_0x2f2b85(0x161)](_0x2f2b85(0x17b)+_0x532b94);const _0x58f2e5=[];for(const [_0x3c30ab,_0x422466]of _0x27de5a[_0x2f2b85(0x14d)]()){if(_0x422466['length']===0x1){_0x58f2e5[_0x2f2b85(0x17e)](_0x422466[0x0]);continue;}const _0x440f7a=_0x47a392[_0x2f2b85(0x187)][_0x3c30ab],_0xe99304=_0x440f7a?.[_0x2f2b85(0x15b)],_0x3c6b6e=_0xe99304?_0x422466[_0x2f2b85(0x169)](_0xd0d81a=>_0xd0d81a[_0x2f2b85(0x154)]!==_0xe99304):_0x422466;if(_0x440f7a&&_0x3c6b6e[_0x2f2b85(0x16f)]===0x1){_0x58f2e5['push'](_0x3c6b6e[0x0]);continue;}throw CliErrors[_0x2f2b85(0x161)](_0x2f2b85(0x181)+_0x3c30ab+_0x2f2b85(0x185));}return _0x58f2e5;}export const sqlPush={'service':a128_0x5cf880(0x14e),'command':a128_0x5cf880(0x17e),'description':a128_0x5cf880(0x15e),'risk':a128_0x5cf880(0x16c),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a128_0x5cf880(0x158),'type':a128_0x5cf880(0x155),'description':'Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock'}],async 'dryRun'(_0x3cdb8b){const _0x37a08b=a128_0x5cf880,_0x132661=loadSqlProjectConfig(_0x3cdb8b[_0x37a08b(0x165)]),_0x42b86c=await readSqlLockFile(_0x132661[_0x37a08b(0x179)]),{appLock:_0x1ba841}=ensureSqlLockScope(_0x42b86c??createEmptySqlLock(),_0x3cdb8b['appCode'],_0x132661[_0x37a08b(0x17c)],_0x37a08b(0x17e)),_0x24a36d=await getTargetSqlQueries(_0x132661,_0x1ba841,_0x3cdb8b[_0x37a08b(0x186)](_0x37a08b(0x172))||undefined),_0x45697e=[];for(const _0x593e7a of _0x24a36d){const _0xe451bc=await computeSqlFileHash(_0x593e7a[_0x37a08b(0x17f)]),_0x5d1765=_0x1ba841[_0x37a08b(0x187)][_0x593e7a[_0x37a08b(0x17a)]],_0x3cf702=!!_0x5d1765&&(_0x5d1765[_0x37a08b(0x15b)]!==_0x593e7a[_0x37a08b(0x154)]||!!_0x593e7a[_0x37a08b(0x17d)]&&_0x5d1765[_0x37a08b(0x17d)]!==_0x593e7a[_0x37a08b(0x17d)]);if(!_0x3cdb8b[_0x37a08b(0x16b)]('force')&&_0x5d1765&&_0x5d1765[_0x37a08b(0x174)]===_0xe451bc&&!_0x3cf702)continue;_0x45697e[_0x37a08b(0x17e)](_0x593e7a[_0x37a08b(0x17a)]);}return{'method':_0x37a08b(0x18c),'url':_0x37a08b(0x175),'body':{'sqlCodes':_0x45697e,'appCode':_0x3cdb8b[_0x37a08b(0x165)]},'description':_0x37a08b(0x182)+_0x45697e['length']+_0x37a08b(0x18b)};},async 'execute'(_0x2e2e69){const _0x274385=a128_0x5cf880,_0x21207c=loadSqlProjectConfig(_0x2e2e69[_0x274385(0x165)]),_0x10e8c1=await readSqlLockFile(_0x21207c[_0x274385(0x179)]),{lockData:_0x29148e,appLock:_0x227a2b}=ensureSqlLockScope(_0x10e8c1??createEmptySqlLock(),_0x2e2e69[_0x274385(0x165)],_0x21207c['sqlRoot'],_0x274385(0x17e)),_0x161df6=await getTargetSqlQueries(_0x21207c,_0x227a2b,_0x2e2e69['str'](_0x274385(0x172))||undefined);if(_0x161df6['length']===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x274385(0x173)};const _0x4def20=[],_0xff2f6b=[],_0x1e7ce7=[];for(const _0x5524e5 of _0x161df6){const _0x1917f5=_0x227a2b['sqls'][_0x5524e5[_0x274385(0x17a)]];if(!_0x1917f5){_0x1e7ce7[_0x274385(0x17e)]({'sqlCode':_0x5524e5[_0x274385(0x17a)],'error':_0x274385(0x159)});continue;}try{const _0x3eb66a=await computeSqlFileHash(_0x5524e5[_0x274385(0x17f)]),_0x3af6df=_0x1917f5['path']!==_0x5524e5[_0x274385(0x154)]||!!_0x5524e5[_0x274385(0x17d)]&&_0x1917f5[_0x274385(0x17d)]!==_0x5524e5[_0x274385(0x17d)];if(!_0x2e2e69[_0x274385(0x16b)](_0x274385(0x158))&&_0x1917f5['hash']===_0x3eb66a&&!_0x3af6df){_0xff2f6b[_0x274385(0x17e)]({'sqlCode':_0x5524e5[_0x274385(0x17a)],'reason':_0x274385(0x15f)});continue;}if(_0x1917f5[_0x274385(0x163)]==null){_0x1e7ce7[_0x274385(0x17e)]({'sqlCode':_0x5524e5[_0x274385(0x17a)],'error':_0x274385(0x184)});continue;}const _0x15c606=await readFile(_0x5524e5[_0x274385(0x17f)],'utf8'),_0x19ac07=stripLocalSqlMetadata(_0x15c606,_0x5524e5[_0x274385(0x171)]),_0x4889ad=_0x5524e5[_0x274385(0x17d)]||_0x1917f5['sqlName'],_0x4a7666=await resolveTargetDbBinding(_0x2e2e69[_0x274385(0x165)],_0x5524e5,_0x1917f5),_0x3cfd10=await updateSqlQuery({'id':_0x1917f5[_0x274385(0x15d)],'appCode':_0x2e2e69[_0x274385(0x165)],'sqlCode':_0x5524e5[_0x274385(0x17a)],'sqlName':_0x4889ad,'dbId':_0x4a7666[_0x274385(0x150)],'version':_0x1917f5[_0x274385(0x163)],'sqlContent':_0x19ac07,'sqlConfig':_0x1917f5['sqlConfig']??undefined}),_0x3e4ddd=_0x3cfd10[_0x274385(0x150)]?await getDbName(_0x2e2e69[_0x274385(0x165)],Number(_0x3cfd10[_0x274385(0x150)]))[_0x274385(0x151)](()=>_0x4a7666[_0x274385(0x189)]):_0x4a7666['dbName'];_0x227a2b[_0x274385(0x187)][_0x5524e5[_0x274385(0x17a)]]={...buildSqlLockEntry(_0x3cfd10,_0x19ac07,_0x3eb66a,{'dbName':_0x3e4ddd}),'path':_0x5524e5['relativePath'],'mode':_0x1917f5[_0x274385(0x171)]},await archivePreviousSqlFileIfNeeded(_0x21207c,_0x1917f5['path'],_0x5524e5[_0x274385(0x154)]),_0x4def20['push']({'sqlCode':_0x5524e5[_0x274385(0x17a)],'remoteId':_0x1917f5[_0x274385(0x15d)]});}catch(_0xcc81b6){_0x1e7ce7['push']({'sqlCode':_0x5524e5[_0x274385(0x17a)],'error':_0xcc81b6 instanceof Error?_0xcc81b6['message']:String(_0xcc81b6)});}}return _0x227a2b[_0x274385(0x16e)]=new Date()[_0x274385(0x16a)](),await writeSqlLockFile(_0x21207c[_0x274385(0x179)],_0x29148e),{'ok':_0x1e7ce7[_0x274385(0x16f)]===0x0,'data':{'pushed':_0x4def20,'skipped':_0xff2f6b,'failed':_0x1e7ce7},'message':_0x274385(0x15a)+_0x4def20[_0x274385(0x16f)]+_0x274385(0x183)+_0xff2f6b['length']+_0x274385(0x178)+_0x1e7ce7[_0x274385(0x16f)]+'\x20failed'};}};async function archivePreviousSqlFileIfNeeded(_0x5f02c6,_0x348aec,_0x155f71){const _0x325d1a=a128_0x5cf880;if(!_0x348aec||_0x348aec===_0x155f71)return;const _0x185f39=join(_0x5f02c6[_0x325d1a(0x156)],_0x348aec);if(!await fileExists(_0x185f39))return;const _0x26633e=await moveToTrash(_0x5f02c6[_0x325d1a(0x14b)],_0x5f02c6[_0x325d1a(0x188)],_0x185f39);await cleanupEmptyDirectories(dirname(_0x185f39),_0x5f02c6['sqlRootDir']),void _0x26633e;}async function moveToTrash(_0x581793,_0x3226b2,_0x8bbd06){const _0x57343d=a128_0x5cf880,_0x402b72=new Date()[_0x57343d(0x16a)]()[_0x57343d(0x157)](/[:.]/g,'-'),_0x2d03f1=relative(_0x581793,_0x8bbd06),_0x5046c2=join(_0x3226b2,_0x402b72,_0x2d03f1);return await mkdir(dirname(_0x5046c2),{'recursive':!![]}),await rename(_0x8bbd06,_0x5046c2),_0x5046c2;}async function cleanupEmptyDirectories(_0x598373,_0x4325c8){const _0x9f6a4c=a128_0x5cf880;let _0x177e6d=resolve(_0x598373);const _0x4ffad2=resolve(_0x4325c8);while(_0x177e6d[_0x9f6a4c(0x177)](''+_0x4ffad2+sep)||_0x177e6d===_0x4ffad2){if(_0x177e6d===_0x4ffad2)return;try{const _0x22998d=await readdir(_0x177e6d);if(_0x22998d[_0x9f6a4c(0x16f)]>0x0)return;await rmdir(_0x177e6d);}catch{return;}_0x177e6d=dirname(_0x177e6d);}}async function resolveTargetDbBinding(_0x748a86,_0x46c498,_0x370ebb){const _0x9ab199=a128_0x5cf880,_0x164d14=_0x46c498[_0x9ab199(0x166)];if(!_0x164d14)return{'dbId':_0x370ebb[_0x9ab199(0x150)],'dbName':_0x370ebb[_0x9ab199(0x189)]};const _0x277dbc=buildDbDirectoryName(_0x370ebb[_0x9ab199(0x189)],_0x370ebb[_0x9ab199(0x150)]);if(_0x164d14===_0x277dbc)return{'dbId':_0x370ebb[_0x9ab199(0x150)],'dbName':_0x370ebb['dbName']};const _0x4324e2=parseExplicitDbDirectory(_0x164d14);if(_0x4324e2!=null)return{'dbId':_0x4324e2,'dbName':await getDbName(_0x748a86,_0x4324e2)[_0x9ab199(0x151)](()=>undefined)};const _0xbf70c8=await listDatabases(_0x748a86),_0x4395b8=_0xbf70c8['filter'](_0x3c2e4f=>buildDbDirectoryName(_0x3c2e4f['dbName'],_0x3c2e4f[_0x9ab199(0x150)])===_0x164d14);if(_0x4395b8['length']===0x1)return{'dbId':_0x4395b8[0x0][_0x9ab199(0x150)],'dbName':_0x4395b8[0x0][_0x9ab199(0x189)]};if(_0x4395b8[_0x9ab199(0x16f)]===0x0)throw CliErrors[_0x9ab199(0x161)]('No\x20database\x20matches\x20local\x20directory\x20\x22'+_0x164d14+'\x22\x20for\x20sqlCode\x20'+_0x46c498[_0x9ab199(0x17a)]+'.');const _0x4df4b2=_0x4395b8[_0x9ab199(0x14c)](_0x21c19a=>_0x21c19a['dbName']+'\x20('+_0x21c19a[_0x9ab199(0x150)]+')')['join'](',\x20');throw CliErrors['validation'](_0x9ab199(0x152)+_0x164d14+_0x9ab199(0x167)+_0x46c498['sqlCode']+':\x20'+_0x4df4b2);}function a128_0x5420(){const _0x50b351=['push','filePath','132wTXBbM','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','Would\x20push\x20','\x20pushed,\x20','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.','str','sqls','trashDir','dbName','581IdWJAL','\x20SQL\x20file(s)','POST','34HbBGjA','projectRoot','map','entries','sql','5985JgrxTF','dbId','catch','Local\x20directory\x20\x22','240VHqkAx','relativePath','boolean','sqlRootDir','replace','force','local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first','Push\x20complete:\x20','path','29453zneTqr','remoteId','Push\x20local\x20SQL\x20files\x20to\x20remote','unchanged','has','validation','2004365TsAgNk','version','6525328UMifDg','appCode','dbDirectory','\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20','40804KPWujp','filter','toISOString','bool','high-risk-write','53142vQreCz','lastSync','length','156WUIWel','mode','sqlcode','No\x20local\x20SQL\x20files\x20found.','hash','/smartapi/custom/updateUserCustomSql','1799405GsIXCZ','startsWith','\x20skipped,\x20','lockFilePath','sqlCode','Local\x20SQL\x20not\x20found:\x20','sqlRoot','sqlName'];a128_0x5420=function(){return _0x50b351;};return a128_0x5420();}function parseExplicitDbDirectory(_0x5d3956){const _0x35176f=/^db-(\d+)$/['exec'](_0x5d3956);if(!_0x35176f)return null;const _0x23f986=Number(_0x35176f[0x1]);return Number['isFinite'](_0x23f986)&&_0x23f986>0x0?_0x23f986:null;}
@@ -1 +1 @@
1
- const a129_0x3397f7=a129_0x995c;function a129_0x5bd2(){const _0x5123ac=['Query\x20description','string','1500738MfWaFE','2625150JsYMVk','write','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','description','join','160128xXJtST','file','Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.','sqlname','427762qTZumP','`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.','sql','127182UFkjMG','5900NQnjWR','save','5053450IjAvBj','SQL\x20query\x20display\x20name','validation','Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','1923nZLxSY','18qGKysq','42UTwffF'];a129_0x5bd2=function(){return _0x5123ac;};return a129_0x5bd2();}function a129_0x995c(_0x205c06,_0x577b8a){_0x205c06=_0x205c06-0x1d6;const _0x5bd271=a129_0x5bd2();let _0x995c09=_0x5bd271[_0x205c06];return _0x995c09;}(function(_0x3d2328,_0x2ea2ed){const _0x1b52db=a129_0x995c,_0x10ae7a=_0x3d2328();while(!![]){try{const _0x1a5900=parseInt(_0x1b52db(0x1e3))/0x1+parseInt(_0x1b52db(0x1d9))/0x2+parseInt(_0x1b52db(0x1ed))/0x3*(parseInt(_0x1b52db(0x1e7))/0x4)+-parseInt(_0x1b52db(0x1da))/0x5+parseInt(_0x1b52db(0x1e6))/0x6+-parseInt(_0x1b52db(0x1d6))/0x7*(-parseInt(_0x1b52db(0x1df))/0x8)+parseInt(_0x1b52db(0x1ee))/0x9*(-parseInt(_0x1b52db(0x1e9))/0xa);if(_0x1a5900===_0x2ea2ed)break;else _0x10ae7a['push'](_0x10ae7a['shift']());}catch(_0x251f02){_0x10ae7a['push'](_0x10ae7a['shift']());}}}(a129_0x5bd2,0xb205b));import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const SQL_SAVE_DEPRECATED_HINT=[a129_0x3397f7(0x1e4),a129_0x3397f7(0x1e1),'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`.'][a129_0x3397f7(0x1de)]('\x0a');export const sqlSave={'service':a129_0x3397f7(0x1e5),'command':a129_0x3397f7(0x1e8),'description':a129_0x3397f7(0x1ec),'risk':a129_0x3397f7(0x1db),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a129_0x3397f7(0x1e0),'type':a129_0x3397f7(0x1d8),'required':!![],'description':'Path\x20to\x20the\x20SQL\x20file'},SQLCODE_FLAG_OPTIONAL,{'name':a129_0x3397f7(0x1e2),'type':a129_0x3397f7(0x1d8),'description':a129_0x3397f7(0x1ea)},{'name':'db','type':'string','description':a129_0x3397f7(0x1dc)},{'name':a129_0x3397f7(0x1dd),'type':a129_0x3397f7(0x1d8),'description':a129_0x3397f7(0x1d7)}],async 'validate'(){const _0x6f5497=a129_0x3397f7;throw CliErrors[_0x6f5497(0x1eb)](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){const _0x272e3f=a129_0x3397f7;throw CliErrors[_0x272e3f(0x1eb)](SQL_SAVE_DEPRECATED_HINT);}};
1
+ function a129_0x4d5a(_0x42e17a,_0xefc3b3){_0x42e17a=_0x42e17a-0x83;const _0x31548f=a129_0x3154();let _0x4d5a06=_0x31548f[_0x42e17a];return _0x4d5a06;}const a129_0x431c8c=a129_0x4d5a;function a129_0x3154(){const _0x1e1b19=['557313YeGPUA','`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.','5vTVrlQ','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`.','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','4269904zFBdXi','sqlname','SQL\x20query\x20display\x20name','join','5071509yHwSll','validation','927292MACbyA','3bvFaLu','134974lRIhpe','3430833bGguef','write','3512586SMtsPG','string','Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','description'];a129_0x3154=function(){return _0x1e1b19;};return a129_0x3154();}(function(_0x1c6f90,_0x22f741){const _0x22a2f8=a129_0x4d5a,_0x4020c2=_0x1c6f90();while(!![]){try{const _0x1de763=parseInt(_0x22a2f8(0x90))/0x1+parseInt(_0x22a2f8(0x89))/0x2*(-parseInt(_0x22a2f8(0x88))/0x3)+parseInt(_0x22a2f8(0x87))/0x4*(-parseInt(_0x22a2f8(0x92))/0x5)+parseInt(_0x22a2f8(0x8c))/0x6+-parseInt(_0x22a2f8(0x8a))/0x7+parseInt(_0x22a2f8(0x95))/0x8+-parseInt(_0x22a2f8(0x85))/0x9;if(_0x1de763===_0x22f741)break;else _0x4020c2['push'](_0x4020c2['shift']());}catch(_0x3503b8){_0x4020c2['push'](_0x4020c2['shift']());}}}(a129_0x3154,0x4efe0));import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const SQL_SAVE_DEPRECATED_HINT=[a129_0x431c8c(0x91),'Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.',a129_0x431c8c(0x93)][a129_0x431c8c(0x84)]('\x0a');export const sqlSave={'service':'sql','command':'save','description':a129_0x431c8c(0x8e),'risk':a129_0x431c8c(0x8b),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'file','type':a129_0x431c8c(0x8d),'required':!![],'description':'Path\x20to\x20the\x20SQL\x20file'},SQLCODE_FLAG_OPTIONAL,{'name':a129_0x431c8c(0x96),'type':a129_0x431c8c(0x8d),'description':a129_0x431c8c(0x83)},{'name':'db','type':a129_0x431c8c(0x8d),'description':a129_0x431c8c(0x94)},{'name':a129_0x431c8c(0x8f),'type':a129_0x431c8c(0x8d),'description':'Query\x20description'}],async 'validate'(){const _0x352a99=a129_0x431c8c;throw CliErrors[_0x352a99(0x86)](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){const _0x17fe77=a129_0x431c8c;throw CliErrors[_0x17fe77(0x86)](SQL_SAVE_DEPRECATED_HINT);}};
@@ -1 +1 @@
1
- function a130_0x4a0c(){const _0x2ec299=['toLowerCase','stderr','4187964VREjAr','<!--\x20@lovrabet.','includes','split','map','stdin','mybatisXml','39630fBzaBK','version','endsWith','push','sqlContent','5646141uaiqVD','.rabetbase/sql','\x20-->','replace','3218310SLVfia','apps','filter','sqls','join','--\x20@lovrabet.','close','8vlrIaN','dbId','sqlRoot','syncedAt','path','trimStart','1637174QxgQyz','\x20[y/N]\x20','question','1640702WTtYvM','lastSync','test','1060624zVYkXV','description','sqlCode','dbName','entries','trim','sqlName','mode','length','204jercjn'];a130_0x4a0c=function(){return _0x2ec299;};return a130_0x4a0c();}const a130_0x19cdaa=a130_0x1425;(function(_0xa7ae74,_0xf5a926){const _0xa8d5ed=a130_0x1425,_0x4e7f01=_0xa7ae74();while(!![]){try{const _0x4cf976=parseInt(_0xa8d5ed(0x124))/0x1+-parseInt(_0xa8d5ed(0x150))/0x2+parseInt(_0xa8d5ed(0x137))/0x3*(parseInt(_0xa8d5ed(0x12d))/0x4)+-parseInt(_0xa8d5ed(0x140))/0x5+parseInt(_0xa8d5ed(0x130))/0x6+parseInt(_0xa8d5ed(0x14d))/0x7*(parseInt(_0xa8d5ed(0x147))/0x8)+-parseInt(_0xa8d5ed(0x13c))/0x9;if(_0x4cf976===_0xf5a926)break;else _0x4e7f01['push'](_0x4e7f01['shift']());}catch(_0x75e8bf){_0x4e7f01['push'](_0x4e7f01['shift']());}}}(a130_0x4a0c,0x8c580));import{createInterface}from'node:readline';function a130_0x1425(_0x20c81e,_0x45562b){_0x20c81e=_0x20c81e-0x122;const _0x4a0ca4=a130_0x4a0c();let _0x1425d3=_0x4a0ca4[_0x20c81e];return _0x1425d3;}import{join}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath,detectSqlMode}from'../../core/sql-sync/utils.js';export const SQL_LOCAL_REL_DIR=a130_0x19cdaa(0x13d);export function buildSqlLockEntry(_0x5a0c7e,_0x56a2b3,_0xacd607,_0x219c4f){const _0x3749c8=a130_0x19cdaa,_0x390936=detectSqlMode(_0x56a2b3);return{'path':buildSqlRelativePath(_0x5a0c7e[_0x3749c8(0x126)],_0x5a0c7e['sqlName'],_0x219c4f?.[_0x3749c8(0x127)],_0x390936,_0x5a0c7e['dbId']),'hash':_0xacd607,'remoteId':_0x5a0c7e['id'],'version':_0x5a0c7e[_0x3749c8(0x138)],'dbId':Number(_0x5a0c7e[_0x3749c8(0x148)]),'dbName':_0x219c4f?.[_0x3749c8(0x127)],'sqlName':_0x5a0c7e[_0x3749c8(0x12a)],'sqlConfig':_0x5a0c7e['sqlConfig']??undefined,'mode':_0x390936};}export function cloneSqlLockData(_0x32afbe){const _0x21c4fc=a130_0x19cdaa;return{'apps':Object['fromEntries'](Object[_0x21c4fc(0x128)](_0x32afbe[_0x21c4fc(0x141)])[_0x21c4fc(0x134)](([_0x3a1083,_0x4c2326])=>[_0x3a1083,{'sqlRoot':_0x4c2326[_0x21c4fc(0x149)],'lastSync':_0x4c2326[_0x21c4fc(0x122)],'sqls':{..._0x4c2326[_0x21c4fc(0x143)]}}]))};}export function ensureRemoteSqlContent(_0x49a74f){const _0x524dca=a130_0x19cdaa;return _0x49a74f[_0x524dca(0x13b)]??'';}export function buildLocalSqlFileContent(_0x2d6249,_0x41129e,_0x5923a8){const _0x2d9228=a130_0x19cdaa,_0x3fedaf=_0x5923a8?.[_0x2d9228(0x12b)]??detectSqlMode(_0x41129e),_0x5dabdf=stripLocalSqlMetadata(_0x41129e,_0x3fedaf)[_0x2d9228(0x129)](),_0x4dff73=[...buildMetadataHeaderLines({'sqlCode':_0x2d6249['sqlCode'],'sqlName':_0x2d6249[_0x2d9228(0x12a)],'dbId':_0x2d6249[_0x2d9228(0x148)],'dbName':_0x5923a8?.[_0x2d9228(0x127)],'mode':_0x3fedaf,'syncedAt':_0x5923a8?.[_0x2d9228(0x14a)],'description':_0x5923a8?.[_0x2d9228(0x125)]},_0x3fedaf),'',_0x5dabdf],_0x5f524c=_0x4dff73[_0x2d9228(0x144)]('\x0a');return _0x5f524c[_0x2d9228(0x139)]('\x0a')?_0x5f524c:_0x5f524c+'\x0a';}export function stripLocalSqlMetadata(_0x35c1c1,_0x330ca3){const _0x486c92=a130_0x19cdaa,_0xde12b8=_0x35c1c1[_0x486c92(0x13f)](/\r\n/g,'\x0a')[_0x486c92(0x133)]('\x0a'),_0x2bb041=[];let _0x1b418f=0x0;if(_0x330ca3==='mybatisXml')while(_0x1b418f<_0xde12b8[_0x486c92(0x12c)]){const _0x261977=_0xde12b8[_0x1b418f]??'';if(/^\s*<!--\s*@lovrabet\./[_0x486c92(0x123)](_0x261977)){_0x1b418f++;continue;}if(_0x261977[_0x486c92(0x129)]()===''&&_0x1b418f>0x0){_0x1b418f++;continue;}break;}else while(_0x1b418f<_0xde12b8[_0x486c92(0x12c)]){const _0xb5c252=_0xde12b8[_0x1b418f]??'';if(/^\s*--\s*@lovrabet\./['test'](_0xb5c252)){_0x1b418f++;continue;}if(_0xb5c252[_0x486c92(0x129)]()===''&&_0x1b418f>0x0){_0x1b418f++;continue;}break;}for(;_0x1b418f<_0xde12b8[_0x486c92(0x12c)];_0x1b418f++){_0x2bb041[_0x486c92(0x13a)](_0xde12b8[_0x1b418f]);}return _0x2bb041[_0x486c92(0x144)]('\x0a')[_0x486c92(0x14c)]();}export function resolveSqlMode(_0x32e61c,_0x3ff400){const _0x591a30=a130_0x19cdaa;if(_0x3ff400?.['mode'])return _0x3ff400[_0x591a30(0x12b)];return detectSqlMode(_0x32e61c);}export function resolveSqlFileName(_0x1874de,_0x1d2205,_0x141507){const _0x3bcece=a130_0x19cdaa;if(_0x141507?.[_0x3bcece(0x14b)])return _0x141507['path'];if(_0x141507?.[_0x3bcece(0x12a)]||_0x141507?.['dbName'])return buildSqlRelativePath(_0x1874de,_0x141507?.['sqlName'],_0x141507?.['dbName'],resolveSqlMode(_0x1d2205,_0x141507),_0x141507?.[_0x3bcece(0x148)]);return buildDefaultSqlFileName(_0x1874de,resolveSqlMode(_0x1d2205,_0x141507));}export function resolveSqlLocalDir(_0x23f22b,_0x79509a){return join(_0x23f22b,SQL_LOCAL_REL_DIR,_0x79509a);}export async function confirmForceOverwrite(_0x16af08){const _0x3e7561=a130_0x19cdaa,_0x55da6c=createInterface({'input':process[_0x3e7561(0x135)],'output':process[_0x3e7561(0x12f)]}),_0x3e6f79=await new Promise(_0x24ee30=>{const _0x4d9e8d=_0x3e7561;_0x55da6c[_0x4d9e8d(0x14f)](_0x16af08+_0x4d9e8d(0x14e),_0x24ee30);});return _0x55da6c[_0x3e7561(0x146)](),['y','yes'][_0x3e7561(0x132)](_0x3e6f79[_0x3e7561(0x129)]()[_0x3e7561(0x12e)]());}export function findSqlLockScope(_0x1904d0,_0x20e9a1){const _0x43033=a130_0x19cdaa;return _0x1904d0[_0x43033(0x141)][_0x20e9a1];}function buildMetadataHeaderLines(_0x257c1e,_0x40ea7b){const _0x1b1ae1=a130_0x19cdaa,_0x313f2b=[['sqlCode',_0x257c1e[_0x1b1ae1(0x126)]],[_0x1b1ae1(0x12a),_0x257c1e[_0x1b1ae1(0x12a)]],[_0x1b1ae1(0x148),_0x257c1e['dbId']],['dbName',_0x257c1e[_0x1b1ae1(0x127)]],[_0x1b1ae1(0x12b),_0x257c1e['mode']],[_0x1b1ae1(0x14a),_0x257c1e[_0x1b1ae1(0x14a)]],[_0x1b1ae1(0x125),_0x257c1e['description']]];if(_0x40ea7b===_0x1b1ae1(0x136))return _0x313f2b[_0x1b1ae1(0x142)](([,_0x1470e1])=>_0x1470e1!==undefined&&_0x1470e1!==null&&String(_0x1470e1)[_0x1b1ae1(0x129)]()!=='')['map'](([_0x4e9798,_0x384a6d])=>_0x1b1ae1(0x131)+_0x4e9798+':\x20'+String(_0x384a6d)+_0x1b1ae1(0x13e));return _0x313f2b[_0x1b1ae1(0x142)](([,_0x1e6a46])=>_0x1e6a46!==undefined&&_0x1e6a46!==null&&String(_0x1e6a46)['trim']()!=='')[_0x1b1ae1(0x134)](([_0x128368,_0x798ab4])=>_0x1b1ae1(0x145)+_0x128368+':\x20'+String(_0x798ab4));}
1
+ const a130_0xa3c748=a130_0x3875;function a130_0x3875(_0x359393,_0xf90f34){_0x359393=_0x359393-0xe8;const _0x1d6edb=a130_0x1d6e();let _0x3875fa=_0x1d6edb[_0x359393];return _0x3875fa;}(function(_0x870d59,_0x51cb2c){const _0x7a8194=a130_0x3875,_0x12783f=_0x870d59();while(!![]){try{const _0x5621af=parseInt(_0x7a8194(0xf0))/0x1+parseInt(_0x7a8194(0x107))/0x2+parseInt(_0x7a8194(0x104))/0x3+parseInt(_0x7a8194(0xfb))/0x4*(-parseInt(_0x7a8194(0xfe))/0x5)+parseInt(_0x7a8194(0x108))/0x6+-parseInt(_0x7a8194(0x110))/0x7*(parseInt(_0x7a8194(0xee))/0x8)+-parseInt(_0x7a8194(0xf5))/0x9*(parseInt(_0x7a8194(0x10f))/0xa);if(_0x5621af===_0x51cb2c)break;else _0x12783f['push'](_0x12783f['shift']());}catch(_0x1b0185){_0x12783f['push'](_0x12783f['shift']());}}}(a130_0x1d6e,0x61c70));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=a130_0xa3c748(0xf6);export function buildSqlLockEntry(_0x37f774,_0x8d7012,_0x378b81,_0x679987){const _0x59e067=a130_0xa3c748,_0x5d226c=detectSqlMode(_0x8d7012);return{'path':buildSqlRelativePath(_0x37f774[_0x59e067(0x114)],_0x37f774[_0x59e067(0xf3)],_0x679987?.[_0x59e067(0xe9)],_0x5d226c,_0x37f774[_0x59e067(0xfc)]),'hash':_0x378b81,'remoteId':_0x37f774['id'],'version':_0x37f774[_0x59e067(0x10e)],'dbId':Number(_0x37f774[_0x59e067(0xfc)]),'dbName':_0x679987?.[_0x59e067(0xe9)],'sqlName':_0x37f774[_0x59e067(0xf3)],'sqlConfig':_0x37f774[_0x59e067(0xea)]??undefined,'mode':_0x5d226c};}export function cloneSqlLockData(_0x346858){const _0xa9fb86=a130_0xa3c748;return{'apps':Object[_0xa9fb86(0x112)](Object[_0xa9fb86(0xef)](_0x346858[_0xa9fb86(0x102)])[_0xa9fb86(0x103)](([_0x2bafe2,_0xbbe654])=>[_0x2bafe2,{'sqlRoot':_0xbbe654['sqlRoot'],'lastSync':_0xbbe654[_0xa9fb86(0xf8)],'sqls':{..._0xbbe654[_0xa9fb86(0xe8)]}}]))};}export function ensureRemoteSqlContent(_0x870ec1){const _0x418669=a130_0xa3c748;return _0x870ec1[_0x418669(0x111)]??'';}export function buildLocalSqlFileContent(_0x1cd913,_0x303921,_0x588464){const _0x1d5c92=a130_0xa3c748,_0x2676fe=_0x588464?.[_0x1d5c92(0xf4)]??detectSqlMode(_0x303921),_0x5e75c1=stripLocalSqlMetadata(_0x303921,_0x2676fe)[_0x1d5c92(0xec)](),_0x1ac3cb=[...buildMetadataHeaderLines({'sqlCode':_0x1cd913[_0x1d5c92(0x114)],'sqlName':_0x1cd913[_0x1d5c92(0xf3)],'dbId':_0x1cd913[_0x1d5c92(0xfc)],'dbName':_0x588464?.['dbName'],'mode':_0x2676fe,'syncedAt':_0x588464?.[_0x1d5c92(0x10c)],'description':_0x588464?.[_0x1d5c92(0xed)]},_0x2676fe),'',_0x5e75c1],_0x54661e=_0x1ac3cb[_0x1d5c92(0xfa)]('\x0a');return _0x54661e[_0x1d5c92(0xf9)]('\x0a')?_0x54661e:_0x54661e+'\x0a';}export function stripLocalSqlMetadata(_0x7ef0be,_0x29621f){const _0x3a7c15=a130_0xa3c748,_0x29ea51=_0x7ef0be[_0x3a7c15(0xff)](/\r\n/g,'\x0a')['split']('\x0a'),_0x39b33c=[];let _0x50c619=0x0;if(_0x29621f==='mybatisXml')while(_0x50c619<_0x29ea51[_0x3a7c15(0xf2)]){const _0x159e19=_0x29ea51[_0x50c619]??'';if(/^\s*<!--\s*@lovrabet\./[_0x3a7c15(0x113)](_0x159e19)){_0x50c619++;continue;}if(_0x159e19[_0x3a7c15(0xec)]()===''&&_0x50c619>0x0){_0x50c619++;continue;}break;}else while(_0x50c619<_0x29ea51['length']){const _0x97ad34=_0x29ea51[_0x50c619]??'';if(/^\s*--\s*@lovrabet\./[_0x3a7c15(0x113)](_0x97ad34)){_0x50c619++;continue;}if(_0x97ad34[_0x3a7c15(0xec)]()===''&&_0x50c619>0x0){_0x50c619++;continue;}break;}for(;_0x50c619<_0x29ea51[_0x3a7c15(0xf2)];_0x50c619++){_0x39b33c[_0x3a7c15(0xf7)](_0x29ea51[_0x50c619]);}return _0x39b33c[_0x3a7c15(0xfa)]('\x0a')[_0x3a7c15(0x105)]();}export function resolveSqlMode(_0x51dfc9,_0x15e7f5){const _0x97215f=a130_0xa3c748;if(_0x15e7f5?.[_0x97215f(0xf4)])return _0x15e7f5[_0x97215f(0xf4)];return detectSqlMode(_0x51dfc9);}function a130_0x1d6e(){const _0x481c69=['path','version','20dGKLjW','23597xWTprx','sqlContent','fromEntries','test','sqlCode','sqls','dbName','sqlConfig','toLowerCase','trim','description','712viqzit','entries','762375QeBBgC','filter','length','sqlName','mode','1976085flSHLK','.rabetbase/sql','push','lastSync','endsWith','join','1364424LVljcS','dbId','stdin','10umfQqe','replace','yes','<!--\x20@lovrabet.','apps','map','2087487YHmcqZ','trimStart','\x20[y/N]\x20','374258loDLck','1059144dIRfxy','--\x20@lovrabet.','close','mybatisXml','syncedAt'];a130_0x1d6e=function(){return _0x481c69;};return a130_0x1d6e();}export function resolveSqlFileName(_0x38e593,_0x4076ca,_0x45daa6){const _0x5f48df=a130_0xa3c748;if(_0x45daa6?.['path'])return _0x45daa6[_0x5f48df(0x10d)];if(_0x45daa6?.[_0x5f48df(0xf3)]||_0x45daa6?.[_0x5f48df(0xe9)])return buildSqlRelativePath(_0x38e593,_0x45daa6?.[_0x5f48df(0xf3)],_0x45daa6?.[_0x5f48df(0xe9)],resolveSqlMode(_0x4076ca,_0x45daa6),_0x45daa6?.[_0x5f48df(0xfc)]);return buildDefaultSqlFileName(_0x38e593,resolveSqlMode(_0x4076ca,_0x45daa6));}export function resolveSqlLocalDir(_0x1060c6,_0x2674f8){return join(_0x1060c6,SQL_LOCAL_REL_DIR,_0x2674f8);}export async function confirmForceOverwrite(_0x3d011d){const _0x518f29=a130_0xa3c748,_0x165196=createInterface({'input':process[_0x518f29(0xfd)],'output':process['stderr']}),_0x23d2a1=await new Promise(_0x225063=>{const _0x55134a=_0x518f29;_0x165196['question'](_0x3d011d+_0x55134a(0x106),_0x225063);});return _0x165196[_0x518f29(0x10a)](),['y',_0x518f29(0x100)]['includes'](_0x23d2a1[_0x518f29(0xec)]()[_0x518f29(0xeb)]());}export function findSqlLockScope(_0x59f20e,_0x4a666e){const _0x1ecbf3=a130_0xa3c748;return _0x59f20e[_0x1ecbf3(0x102)][_0x4a666e];}function buildMetadataHeaderLines(_0x50a61d,_0x1917f7){const _0x51aa5a=a130_0xa3c748,_0x1edac7=[[_0x51aa5a(0x114),_0x50a61d[_0x51aa5a(0x114)]],[_0x51aa5a(0xf3),_0x50a61d['sqlName']],[_0x51aa5a(0xfc),_0x50a61d[_0x51aa5a(0xfc)]],[_0x51aa5a(0xe9),_0x50a61d['dbName']],[_0x51aa5a(0xf4),_0x50a61d[_0x51aa5a(0xf4)]],['syncedAt',_0x50a61d[_0x51aa5a(0x10c)]],[_0x51aa5a(0xed),_0x50a61d['description']]];if(_0x1917f7===_0x51aa5a(0x10b))return _0x1edac7[_0x51aa5a(0xf1)](([,_0x1fd029])=>_0x1fd029!==undefined&&_0x1fd029!==null&&String(_0x1fd029)[_0x51aa5a(0xec)]()!=='')[_0x51aa5a(0x103)](([_0x458b6a,_0x2e92ee])=>_0x51aa5a(0x101)+_0x458b6a+':\x20'+String(_0x2e92ee)+'\x20-->');return _0x1edac7[_0x51aa5a(0xf1)](([,_0x429af6])=>_0x429af6!==undefined&&_0x429af6!==null&&String(_0x429af6)[_0x51aa5a(0xec)]()!=='')[_0x51aa5a(0x103)](([_0x472604,_0x1b69ee])=>_0x51aa5a(0x109)+_0x472604+':\x20'+String(_0x1b69ee));}
@@ -1 +1 @@
1
- const a131_0x46262e=a131_0x1b95;(function(_0x30d5d4,_0x379fbc){const _0x125932=a131_0x1b95,_0x5e4a9d=_0x30d5d4();while(!![]){try{const _0x2f3b32=parseInt(_0x125932(0x1c2))/0x1*(parseInt(_0x125932(0x1b4))/0x2)+parseInt(_0x125932(0x1b6))/0x3*(parseInt(_0x125932(0x1c8))/0x4)+-parseInt(_0x125932(0x1af))/0x5+parseInt(_0x125932(0x1be))/0x6+parseInt(_0x125932(0x1ad))/0x7+parseInt(_0x125932(0x1b1))/0x8+parseInt(_0x125932(0x1bf))/0x9*(-parseInt(_0x125932(0x1a6))/0xa);if(_0x2f3b32===_0x379fbc)break;else _0x5e4a9d['push'](_0x5e4a9d['shift']());}catch(_0x175566){_0x5e4a9d['push'](_0x5e4a9d['shift']());}}}(a131_0xa58c,0x9724e));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';function a131_0xa58c(){const _0x627711=['filePath','240493ZaYyoU','\x20unchanged','\x20remote-only','lockFilePath','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','All\x20SQL\x20queries\x20are\x20in\x20sync.','4byqaee','read','has','20NUOsVj','appCode','sqlName','paging','tableData','remote','sqls','6243370HniCAV','hash','5071835zCoqgP','lockKey','1840288mGpsca','status','bool','2ITybYn','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','484359BnEfcD','length','push','totalCount','sql','path','relativePath','sqlCode','5276394LBywKN','3464271dWGWpB','map'];a131_0xa58c=function(){return _0x627711;};return a131_0xa58c();}import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';function a131_0x1b95(_0x1ee3c7,_0x44f09e){_0x1ee3c7=_0x1ee3c7-0x1a6;const _0xa58cb9=a131_0xa58c();let _0x1b95c7=_0xa58cb9[_0x1ee3c7];return _0x1b95c7;}const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x1a89ba){const _0x438f6b=a131_0x1b95,_0x1bc54b=[];let _0x489566=0x1;while(!![]){const _0x5e70fd=await listSqlQueries(_0x1a89ba,{'currentPage':_0x489566,'pageSize':PAGE_SIZE}),_0x1d047a=_0x5e70fd[_0x438f6b(0x1aa)]??[];_0x1bc54b[_0x438f6b(0x1b8)](..._0x1d047a[_0x438f6b(0x1c0)](_0x472ad2=>_0x472ad2[_0x438f6b(0x1bd)]));if(_0x1d047a[_0x438f6b(0x1b7)]===0x0)break;const _0x39fdb2=_0x5e70fd[_0x438f6b(0x1a9)]?.[_0x438f6b(0x1b9)];if(_0x39fdb2!=null?_0x1bc54b[_0x438f6b(0x1b7)]>=_0x39fdb2:_0x1d047a[_0x438f6b(0x1b7)]<PAGE_SIZE)break;_0x489566++;}return _0x1bc54b;}export const sqlStatus={'service':a131_0x46262e(0x1ba),'command':'status','description':a131_0x46262e(0x1b5),'risk':a131_0x46262e(0x1c9),'flags':[{'name':a131_0x46262e(0x1ab),'type':'boolean','description':a131_0x46262e(0x1c6)}],async 'execute'(_0x5b876d){const _0x12131f=a131_0x46262e,_0x515c30=loadSqlProjectConfig(_0x5b876d['appCode']),_0xa0fdfc=await readSqlLockFile(_0x515c30[_0x12131f(0x1c5)]),{appLock:_0x481ae0}=ensureSqlLockScope(_0xa0fdfc??createEmptySqlLock(),_0x515c30[_0x12131f(0x1a7)],_0x515c30['sqlRoot'],_0x12131f(0x1b2)),_0x5e9e46=await scanLocalSqlQueries(_0x515c30),_0x293c00=[],_0x2f71bc=[],_0x61436=[],_0x1d83e8=[],_0x477039=new Set(_0x5e9e46[_0x12131f(0x1c0)](_0x137efa=>_0x137efa['lockKey']));for(const _0x47b07b of _0x5e9e46){const _0x2440ce=await computeSqlFileHash(_0x47b07b[_0x12131f(0x1c1)]),_0x5866ba=_0x481ae0[_0x12131f(0x1ac)][_0x47b07b[_0x12131f(0x1b0)]],_0x2096c6=!!_0x5866ba&&_0x5866ba[_0x12131f(0x1bb)]!==_0x47b07b[_0x12131f(0x1bc)],_0x1f0fe4=!!_0x5866ba&&!!_0x47b07b[_0x12131f(0x1a8)]&&_0x5866ba[_0x12131f(0x1a8)]!==_0x47b07b[_0x12131f(0x1a8)];if(!_0x5866ba)_0x293c00[_0x12131f(0x1b8)](_0x47b07b['lockKey']);else _0x5866ba[_0x12131f(0x1ae)]!==_0x2440ce||_0x2096c6||_0x1f0fe4?_0x2f71bc['push'](_0x47b07b[_0x12131f(0x1b0)]):_0x61436[_0x12131f(0x1b8)](_0x47b07b['lockKey']);}for(const _0xdf7a37 of Object['keys'](_0x481ae0['sqls'])){!_0x477039[_0x12131f(0x1ca)](_0xdf7a37)&&_0x1d83e8[_0x12131f(0x1b8)](_0xdf7a37);}const _0x4ba99d=[];if(_0x5b876d[_0x12131f(0x1b3)](_0x12131f(0x1ab))){const _0x39be8b=await fetchAllSqlCodes(_0x5b876d[_0x12131f(0x1a7)]);for(const _0x5ba95c of _0x39be8b){!_0x477039[_0x12131f(0x1ca)](_0x5ba95c)&&!_0x481ae0['sqls'][_0x5ba95c]&&_0x4ba99d[_0x12131f(0x1b8)](_0x5ba95c);}}const _0x196b10=_0x293c00['length']===0x0&&_0x2f71bc[_0x12131f(0x1b7)]===0x0&&_0x1d83e8[_0x12131f(0x1b7)]===0x0&&_0x4ba99d[_0x12131f(0x1b7)]===0x0;return{'ok':!![],'data':{'added':_0x293c00,'modified':_0x2f71bc,'missing':_0x1d83e8,'unchanged':_0x61436,'remoteOnly':_0x4ba99d},'message':_0x196b10?_0x12131f(0x1c7):_0x293c00[_0x12131f(0x1b7)]+'\x20added,\x20'+_0x2f71bc[_0x12131f(0x1b7)]+'\x20modified,\x20'+_0x1d83e8['length']+'\x20missing,\x20'+_0x61436[_0x12131f(0x1b7)]+_0x12131f(0x1c3)+(_0x4ba99d[_0x12131f(0x1b7)]>0x0?',\x20'+_0x4ba99d['length']+_0x12131f(0x1c4):'')};}};
1
+ const a131_0x11d6ff=a131_0x7981;(function(_0x4c6672,_0xa4c72b){const _0x1a9011=a131_0x7981,_0x327bf5=_0x4c6672();while(!![]){try{const _0x400662=-parseInt(_0x1a9011(0xe4))/0x1*(parseInt(_0x1a9011(0xfb))/0x2)+parseInt(_0x1a9011(0xf3))/0x3*(-parseInt(_0x1a9011(0xf6))/0x4)+parseInt(_0x1a9011(0x104))/0x5*(-parseInt(_0x1a9011(0xfa))/0x6)+-parseInt(_0x1a9011(0x105))/0x7*(parseInt(_0x1a9011(0xe7))/0x8)+parseInt(_0x1a9011(0xeb))/0x9*(-parseInt(_0x1a9011(0xef))/0xa)+-parseInt(_0x1a9011(0xf1))/0xb*(parseInt(_0x1a9011(0xfe))/0xc)+-parseInt(_0x1a9011(0xf2))/0xd*(-parseInt(_0x1a9011(0xf5))/0xe);if(_0x400662===_0xa4c72b)break;else _0x327bf5['push'](_0x327bf5['shift']());}catch(_0x5e1727){_0x327bf5['push'](_0x327bf5['shift']());}}}(a131_0x7e41,0x65177));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';function a131_0x7981(_0x3e323b,_0x2888ae){_0x3e323b=_0x3e323b-0xe4;const _0x7e418e=a131_0x7e41();let _0x798128=_0x7e418e[_0x3e323b];return _0x798128;}function a131_0x7e41(){const _0x552d64=['Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','\x20added,\x20','map','10uzkmBB','bool','319ZWtrGC','130jKhzTh','3HsdRdi','relativePath','4581220pXbzTC','446300RfhUrW','remote','keys','\x20remote-only','54yLXZwt','203482GNrxvW','lockFilePath','sqls','81936iawkQo','appCode','boolean','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','length','status','349235EDmGOg','216559PBUMdn','sqlName','lockKey','sqlRoot','paging','has','7FMqZYr','\x20unchanged','filePath','152pKdzVS','push','hash','\x20modified,\x20','5580261lSHjPt'];a131_0x7e41=function(){return _0x552d64;};return a131_0x7e41();}import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x8b29f9){const _0x3a0dde=a131_0x7981,_0x1cb16e=[];let _0x45a5fe=0x1;while(!![]){const _0x9ea499=await listSqlQueries(_0x8b29f9,{'currentPage':_0x45a5fe,'pageSize':PAGE_SIZE}),_0x30e0e5=_0x9ea499['tableData']??[];_0x1cb16e[_0x3a0dde(0xe8)](..._0x30e0e5[_0x3a0dde(0xee)](_0x5e7426=>_0x5e7426['sqlCode']));if(_0x30e0e5[_0x3a0dde(0x102)]===0x0)break;const _0x2e50d0=_0x9ea499[_0x3a0dde(0x109)]?.['totalCount'];if(_0x2e50d0!=null?_0x1cb16e[_0x3a0dde(0x102)]>=_0x2e50d0:_0x30e0e5[_0x3a0dde(0x102)]<PAGE_SIZE)break;_0x45a5fe++;}return _0x1cb16e;}export const sqlStatus={'service':'sql','command':a131_0x11d6ff(0x103),'description':a131_0x11d6ff(0x101),'risk':'read','flags':[{'name':a131_0x11d6ff(0xf7),'type':a131_0x11d6ff(0x100),'description':a131_0x11d6ff(0xec)}],async 'execute'(_0x3ca3c1){const _0x441a65=a131_0x11d6ff,_0x57fa7a=loadSqlProjectConfig(_0x3ca3c1[_0x441a65(0xff)]),_0x426842=await readSqlLockFile(_0x57fa7a[_0x441a65(0xfc)]),{appLock:_0x2ea26c}=ensureSqlLockScope(_0x426842??createEmptySqlLock(),_0x57fa7a[_0x441a65(0xff)],_0x57fa7a[_0x441a65(0x108)],_0x441a65(0x103)),_0x47a45a=await scanLocalSqlQueries(_0x57fa7a),_0x1aa817=[],_0x2a5a61=[],_0x46b7de=[],_0x29937a=[],_0x4d22e3=new Set(_0x47a45a['map'](_0xe93715=>_0xe93715[_0x441a65(0x107)]));for(const _0x18a928 of _0x47a45a){const _0x26539f=await computeSqlFileHash(_0x18a928[_0x441a65(0xe6)]),_0x17ca31=_0x2ea26c[_0x441a65(0xfd)][_0x18a928['lockKey']],_0x28f177=!!_0x17ca31&&_0x17ca31['path']!==_0x18a928[_0x441a65(0xf4)],_0x33817d=!!_0x17ca31&&!!_0x18a928['sqlName']&&_0x17ca31[_0x441a65(0x106)]!==_0x18a928[_0x441a65(0x106)];if(!_0x17ca31)_0x1aa817['push'](_0x18a928['lockKey']);else _0x17ca31[_0x441a65(0xe9)]!==_0x26539f||_0x28f177||_0x33817d?_0x2a5a61[_0x441a65(0xe8)](_0x18a928['lockKey']):_0x46b7de[_0x441a65(0xe8)](_0x18a928[_0x441a65(0x107)]);}for(const _0x2bcc45 of Object[_0x441a65(0xf8)](_0x2ea26c[_0x441a65(0xfd)])){!_0x4d22e3[_0x441a65(0x10a)](_0x2bcc45)&&_0x29937a['push'](_0x2bcc45);}const _0x55ca50=[];if(_0x3ca3c1[_0x441a65(0xf0)](_0x441a65(0xf7))){const _0x69b49d=await fetchAllSqlCodes(_0x3ca3c1[_0x441a65(0xff)]);for(const _0x194f05 of _0x69b49d){!_0x4d22e3['has'](_0x194f05)&&!_0x2ea26c[_0x441a65(0xfd)][_0x194f05]&&_0x55ca50[_0x441a65(0xe8)](_0x194f05);}}const _0x366915=_0x1aa817[_0x441a65(0x102)]===0x0&&_0x2a5a61[_0x441a65(0x102)]===0x0&&_0x29937a[_0x441a65(0x102)]===0x0&&_0x55ca50['length']===0x0;return{'ok':!![],'data':{'added':_0x1aa817,'modified':_0x2a5a61,'missing':_0x29937a,'unchanged':_0x46b7de,'remoteOnly':_0x55ca50},'message':_0x366915?'All\x20SQL\x20queries\x20are\x20in\x20sync.':_0x1aa817['length']+_0x441a65(0xed)+_0x2a5a61[_0x441a65(0x102)]+_0x441a65(0xea)+_0x29937a['length']+'\x20missing,\x20'+_0x46b7de[_0x441a65(0x102)]+_0x441a65(0xe5)+(_0x55ca50['length']>0x0?',\x20'+_0x55ca50[_0x441a65(0x102)]+_0x441a65(0xf9):'')};}};
@@ -1 +1 @@
1
- const a132_0x21d3d3=a132_0x2503;(function(_0x15a775,_0x59a1fd){const _0x1c5c67=a132_0x2503,_0x1f6d7d=_0x15a775();while(!![]){try{const _0x39b6bb=-parseInt(_0x1c5c67(0x14f))/0x1+-parseInt(_0x1c5c67(0x12c))/0x2+parseInt(_0x1c5c67(0x144))/0x3+-parseInt(_0x1c5c67(0x12a))/0x4*(-parseInt(_0x1c5c67(0x140))/0x5)+-parseInt(_0x1c5c67(0x135))/0x6+parseInt(_0x1c5c67(0x12e))/0x7*(parseInt(_0x1c5c67(0x149))/0x8)+-parseInt(_0x1c5c67(0x136))/0x9;if(_0x39b6bb===_0x59a1fd)break;else _0x1f6d7d['push'](_0x1f6d7d['shift']());}catch(_0x310718){_0x1f6d7d['push'](_0x1f6d7d['shift']());}}}(a132_0x40ad,0x36f5a));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';function a132_0x2503(_0x58a05b,_0x2f0ccf){_0x58a05b=_0x58a05b-0x129;const _0x40ad71=a132_0x40ad();let _0x250366=_0x40ad71[_0x58a05b];return _0x250366;}import{CliErrors}from'../../errors.js';import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';function a132_0x40ad(){const _0x25de7d=['length','fields','\x22\x20not\x20found\x20in\x20any\x20dataset','appCode','split','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','flagMissing','Dataset\x20\x22','1331732ozbAiL','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','101168GslWag','file','408065IpeQOp','cwd','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','get','\x22\x20not\x20found\x20or\x20not\x20accessible','utf-8','str','42702vqkEnb','2405592xcRSHd','size','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','push','trim','isArray','filter','tableName','map','SQL\x20schema\x20validation','5WJNBxp','read','valid','from','945138PBPeOL','schemaWarnings','tables','toLowerCase','message','8JRAGga','schemas','schema:','string','isSelectOnly','sql','156171cYyTvg','name','dbtableConfig','reason','sqlType'];a132_0x40ad=function(){return _0x25de7d;};return a132_0x40ad();}export const sqlValidate={'service':a132_0x21d3d3(0x14e),'command':'validate','description':a132_0x21d3d3(0x12b),'risk':a132_0x21d3d3(0x141),'flags':[{'name':'file','type':a132_0x21d3d3(0x14c),'description':a132_0x21d3d3(0x130)},{'name':a132_0x21d3d3(0x14e),'type':'string','description':a132_0x21d3d3(0x159)},{'name':a132_0x21d3d3(0x14a),'type':a132_0x21d3d3(0x14c),'description':a132_0x21d3d3(0x138)}],async 'execute'(_0x95c40d){const _0x269935=a132_0x21d3d3,_0x18520b=_0x95c40d[_0x269935(0x134)](_0x269935(0x12d)),_0x40e9e9=_0x95c40d['str'](_0x269935(0x14e));if(!_0x18520b&&!_0x40e9e9)throw CliErrors[_0x269935(0x15a)](_0x269935(0x12d),'Provide\x20--file\x20or\x20--sql');let _0x716451;if(_0x18520b){const _0x4ab8a6=resolve(process[_0x269935(0x12f)](),_0x18520b);if(!existsSync(_0x4ab8a6))throw CliErrors['validation']('File\x20not\x20found:\x20'+_0x4ab8a6);_0x716451=readFileSync(_0x4ab8a6,_0x269935(0x133));}else _0x716451=_0x40e9e9;const _0x200f86=validateSql(_0x716451),_0x1b5ea0={'valid':_0x200f86['valid'],'sqlType':_0x200f86['sqlType']['type'],'isSelectOnly':_0x200f86[_0x269935(0x153)][_0x269935(0x14d)],'isDangerous':_0x200f86[_0x269935(0x153)]['isDangerous'],'tables':_0x200f86[_0x269935(0x146)],'parameters':_0x200f86['parameters'],'message':_0x200f86[_0x269935(0x148)]};_0x200f86[_0x269935(0x153)]['reason']&&(_0x1b5ea0[_0x269935(0x152)]=_0x200f86[_0x269935(0x153)]['reason']);const _0x43caa=_0x95c40d[_0x269935(0x134)](_0x269935(0x14a));if(_0x43caa&&_0x200f86[_0x269935(0x142)]){const _0x46b91d=_0x43caa[_0x269935(0x158)](',')['map'](_0x25d31d=>_0x25d31d[_0x269935(0x13a)]())[_0x269935(0x13c)](Boolean),_0x4c13bb=[],_0x1ed622=filterDbTableBackedDatasets(await listDatasets(_0x95c40d[_0x269935(0x157)])),_0x1302c7=new Map(_0x1ed622[_0x269935(0x13e)](_0x36f13e=>[_0x36f13e['dbtableConfig']?.[_0x269935(0x13d)]?.[_0x269935(0x147)](),_0x36f13e]));for(const _0x2447e0 of _0x200f86[_0x269935(0x146)]){const _0x380ec4=_0x1302c7[_0x269935(0x131)](_0x2447e0[_0x269935(0x147)]());!_0x380ec4&&_0x4c13bb[_0x269935(0x139)]('Table\x20\x22'+_0x2447e0+_0x269935(0x156));}for(const _0x17e12d of _0x46b91d){let _0x523d98;try{_0x523d98=await getDatasetDetail(_0x17e12d);}catch{_0x4c13bb[_0x269935(0x139)](_0x269935(0x129)+_0x17e12d+_0x269935(0x132));continue;}assertDatasetIsDbTableBacked(_0x523d98,_0x269935(0x13f));const _0x43024d=Array[_0x269935(0x13b)](_0x523d98[_0x269935(0x155)])?_0x523d98[_0x269935(0x155)]:[],_0x1fba57=new Set(_0x43024d[_0x269935(0x13e)](_0x4fd7e8=>_0x4fd7e8[_0x269935(0x150)]?.[_0x269935(0x147)]())),_0x316d9b=_0x523d98[_0x269935(0x151)]?.[_0x269935(0x13d)]||_0x523d98[_0x269935(0x13d)]||_0x17e12d;_0x1b5ea0[_0x269935(0x14b)+_0x316d9b]={'code':_0x17e12d,'tableName':_0x316d9b,'fieldCount':_0x1fba57[_0x269935(0x137)],'fields':Array[_0x269935(0x143)](_0x1fba57)};}_0x4c13bb[_0x269935(0x154)]>0x0&&(_0x1b5ea0[_0x269935(0x145)]=_0x4c13bb);}return{'ok':_0x200f86[_0x269935(0x142)],'data':_0x1b5ea0,'message':_0x200f86[_0x269935(0x148)]};}};
1
+ const a132_0x58043a=a132_0x497c;(function(_0x524646,_0x5a6c99){const _0x5563b1=a132_0x497c,_0xd12ccf=_0x524646();while(!![]){try{const _0x3860cf=-parseInt(_0x5563b1(0x1f1))/0x1+parseInt(_0x5563b1(0x1f7))/0x2*(-parseInt(_0x5563b1(0x1dc))/0x3)+-parseInt(_0x5563b1(0x1e8))/0x4+parseInt(_0x5563b1(0x1e3))/0x5+parseInt(_0x5563b1(0x201))/0x6+-parseInt(_0x5563b1(0x1e7))/0x7*(-parseInt(_0x5563b1(0x208))/0x8)+parseInt(_0x5563b1(0x1fc))/0x9;if(_0x3860cf===_0x5a6c99)break;else _0xd12ccf['push'](_0xd12ccf['shift']());}catch(_0x1225ce){_0xd12ccf['push'](_0xd12ccf['shift']());}}}(a132_0x3d0b,0x629d1));function a132_0x3d0b(){const _0x5525d8=['message','str','valid','\x22\x20not\x20found\x20or\x20not\x20accessible','43288HLSOey','utf-8','push','470853ZeEeZS','trim','tableName','schemas','cwd','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','fields','2434610ljPbUa','split','validate','size','119tliudY','1221096OVmLtQ','file','File\x20not\x20found:\x20','type','parameters','filter','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','get','isArray','359162ISDTVC','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','reason','map','string','Dataset\x20\x22','6VrotHT','validation','sql','isDangerous','schema:','5856570OTYEuF','dbtableConfig','\x22\x20not\x20found\x20in\x20any\x20dataset','sqlType','toLowerCase','1857426MqakSX','appCode','Table\x20\x22'];a132_0x3d0b=function(){return _0x5525d8;};return a132_0x3d0b();}import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';function a132_0x497c(_0x357f1a,_0x545ef7){_0x357f1a=_0x357f1a-0x1db;const _0x3d0b13=a132_0x3d0b();let _0x497c94=_0x3d0b13[_0x357f1a];return _0x497c94;}import{validateSql}from'../../core/sql-validator.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';export const sqlValidate={'service':a132_0x58043a(0x1f9),'command':a132_0x58043a(0x1e5),'description':a132_0x58043a(0x1f2),'risk':'read','flags':[{'name':'file','type':a132_0x58043a(0x1f5),'description':'Path\x20to\x20the\x20SQL\x20file\x20to\x20validate'},{'name':a132_0x58043a(0x1f9),'type':a132_0x58043a(0x1f5),'description':a132_0x58043a(0x1e1)},{'name':a132_0x58043a(0x1df),'type':a132_0x58043a(0x1f5),'description':a132_0x58043a(0x1ee)}],async 'execute'(_0x185bd8){const _0xba3cbd=a132_0x58043a,_0x278dbd=_0x185bd8[_0xba3cbd(0x205)](_0xba3cbd(0x1e9)),_0x25bceb=_0x185bd8[_0xba3cbd(0x205)]('sql');if(!_0x278dbd&&!_0x25bceb)throw CliErrors['flagMissing'](_0xba3cbd(0x1e9),'Provide\x20--file\x20or\x20--sql');let _0x4ad2b1;if(_0x278dbd){const _0x47dde1=resolve(process[_0xba3cbd(0x1e0)](),_0x278dbd);if(!existsSync(_0x47dde1))throw CliErrors[_0xba3cbd(0x1f8)](_0xba3cbd(0x1ea)+_0x47dde1);_0x4ad2b1=readFileSync(_0x47dde1,_0xba3cbd(0x209));}else _0x4ad2b1=_0x25bceb;const _0xe81b4c=validateSql(_0x4ad2b1),_0x32d504={'valid':_0xe81b4c[_0xba3cbd(0x206)],'sqlType':_0xe81b4c[_0xba3cbd(0x1ff)][_0xba3cbd(0x1eb)],'isSelectOnly':_0xe81b4c['sqlType']['isSelectOnly'],'isDangerous':_0xe81b4c[_0xba3cbd(0x1ff)][_0xba3cbd(0x1fa)],'tables':_0xe81b4c['tables'],'parameters':_0xe81b4c[_0xba3cbd(0x1ec)],'message':_0xe81b4c['message']};_0xe81b4c[_0xba3cbd(0x1ff)][_0xba3cbd(0x1f3)]&&(_0x32d504[_0xba3cbd(0x1f3)]=_0xe81b4c[_0xba3cbd(0x1ff)][_0xba3cbd(0x1f3)]);const _0x3703b0=_0x185bd8[_0xba3cbd(0x205)](_0xba3cbd(0x1df));if(_0x3703b0&&_0xe81b4c['valid']){const _0x2b8927=_0x3703b0[_0xba3cbd(0x1e4)](',')[_0xba3cbd(0x1f4)](_0x275083=>_0x275083[_0xba3cbd(0x1dd)]())[_0xba3cbd(0x1ed)](Boolean),_0x20497f=[],_0x2d1ed0=filterDbTableBackedDatasets(await listDatasets(_0x185bd8[_0xba3cbd(0x202)])),_0x4265fb=new Map(_0x2d1ed0[_0xba3cbd(0x1f4)](_0x4938e4=>[_0x4938e4['dbtableConfig']?.['tableName']?.[_0xba3cbd(0x200)](),_0x4938e4]));for(const _0x21b9b1 of _0xe81b4c['tables']){const _0x52e53f=_0x4265fb[_0xba3cbd(0x1ef)](_0x21b9b1[_0xba3cbd(0x200)]());!_0x52e53f&&_0x20497f[_0xba3cbd(0x1db)](_0xba3cbd(0x203)+_0x21b9b1+_0xba3cbd(0x1fe));}for(const _0x36f83d of _0x2b8927){let _0x598999;try{_0x598999=await getDatasetDetail(_0x36f83d);}catch{_0x20497f[_0xba3cbd(0x1db)](_0xba3cbd(0x1f6)+_0x36f83d+_0xba3cbd(0x207));continue;}assertDatasetIsDbTableBacked(_0x598999,'SQL\x20schema\x20validation');const _0x1db67f=Array[_0xba3cbd(0x1f0)](_0x598999[_0xba3cbd(0x1e2)])?_0x598999['fields']:[],_0x416c4a=new Set(_0x1db67f[_0xba3cbd(0x1f4)](_0x3432b2=>_0x3432b2['name']?.[_0xba3cbd(0x200)]())),_0x4cade6=_0x598999[_0xba3cbd(0x1fd)]?.['tableName']||_0x598999[_0xba3cbd(0x1de)]||_0x36f83d;_0x32d504[_0xba3cbd(0x1fb)+_0x4cade6]={'code':_0x36f83d,'tableName':_0x4cade6,'fieldCount':_0x416c4a[_0xba3cbd(0x1e6)],'fields':Array['from'](_0x416c4a)};}_0x20497f['length']>0x0&&(_0x32d504['schemaWarnings']=_0x20497f);}return{'ok':_0xe81b4c[_0xba3cbd(0x206)],'data':_0x32d504,'message':_0xe81b4c[_0xba3cbd(0x204)]};}};
@@ -1 +1 @@
1
- const a133_0x24571f=a133_0xf37d;(function(_0x1062d5,_0x5c4248){const _0x230eb6=a133_0xf37d,_0xe4d75d=_0x1062d5();while(!![]){try{const _0x8ccd5e=parseInt(_0x230eb6(0x12a))/0x1+-parseInt(_0x230eb6(0x139))/0x2+-parseInt(_0x230eb6(0x13e))/0x3+parseInt(_0x230eb6(0x122))/0x4+parseInt(_0x230eb6(0x141))/0x5+parseInt(_0x230eb6(0x12d))/0x6*(parseInt(_0x230eb6(0x120))/0x7)+-parseInt(_0x230eb6(0x143))/0x8*(-parseInt(_0x230eb6(0x12f))/0x9);if(_0x8ccd5e===_0x5c4248)break;else _0xe4d75d['push'](_0xe4d75d['shift']());}catch(_0x241f03){_0xe4d75d['push'](_0xe4d75d['shift']());}}}(a133_0x56bf,0x8ffaa));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=[a133_0x24571f(0x133),a133_0x24571f(0x13b),a133_0x24571f(0x129),'format',a133_0x24571f(0x126)];export const TOP_LEVEL_CONFIG_KEYS=new Set([a133_0x24571f(0x12c),a133_0x24571f(0x130),a133_0x24571f(0x129),a133_0x24571f(0x132),a133_0x24571f(0x133),a133_0x24571f(0x13b),a133_0x24571f(0x13c)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x2e3a30){return[..._0x2e3a30]['join'](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x3af8c7){const _0x4f9ab7=a133_0x24571f;return TOP_LEVEL_CONFIG_KEYS[_0x4f9ab7(0x138)](_0x3af8c7);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x5e9a69=a133_0x24571f;return _0x5e9a69(0x124)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':a133_0x24571f(0x130),'apiDir':'apiDir','cookie':a133_0x24571f(0x133),'accessKey':a133_0x24571f(0x13b),'defaultFormat':'format','pageSize':'pageSize','riskLevel':'riskLevel','locale':a133_0x24571f(0x129)};export function getAppProfileFlagDefs(){const _0x1010d8=a133_0x24571f;return[{'name':_0x1010d8(0x130),'type':_0x1010d8(0x136),'description':_0x1010d8(0x11e),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x1010d8(0x13c),'type':'string','description':_0x1010d8(0x131)},{'name':_0x1010d8(0x133),'type':_0x1010d8(0x136),'description':'Auth\x20cookie','hidden':!![]},{'name':'accessKey','type':_0x1010d8(0x136),'description':_0x1010d8(0x142),'hidden':!![]},{'name':_0x1010d8(0x125),'type':_0x1010d8(0x136),'description':_0x1010d8(0x123),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0x1010d8(0x137),'type':_0x1010d8(0x128),'description':'Default\x20page\x20size'},{'name':_0x1010d8(0x126),'type':_0x1010d8(0x136),'description':_0x1010d8(0x11c),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x1010d8(0x129),'type':_0x1010d8(0x136),'description':_0x1010d8(0x11d)}];}export function collectAppProfileOverrides(_0x421231){const _0x5073be=a133_0x24571f,_0x2a981e={};for(const [_0x54e5e2,_0x9b9ced]of Object[_0x5073be(0x134)](APP_PROFILE_FLAG_KEY_MAP)){const _0x18376a=_0x421231(_0x54e5e2);if(!_0x18376a)continue;_0x2a981e[_0x9b9ced]=_0x9b9ced===_0x5073be(0x137)?Number(_0x18376a):_0x18376a;}return _0x2a981e;}function a133_0xf37d(_0x504920,_0x3ad693){_0x504920=_0x504920-0x11c;const _0x56bf89=a133_0x56bf();let _0xf37dac=_0x56bf89[_0x504920];return _0xf37dac;}export function buildAppProfileListFields(_0x5967cd){const _0x549b59=a133_0x24571f;return{'env':_0x5967cd['env']??null,'apiDir':_0x5967cd[_0x549b59(0x13c)]??null,'hasCookie':!!_0x5967cd[_0x549b59(0x133)],'hasAccessKey':!!_0x5967cd[_0x549b59(0x13b)],'format':_0x5967cd[_0x549b59(0x132)]??null,'pageSize':_0x5967cd['pageSize']??null,'riskLevel':_0x5967cd[_0x549b59(0x126)]??null,'locale':_0x5967cd[_0x549b59(0x129)]??null};}export function buildAppDoctorFields(_0x4369d6,_0x269a44){const _0x21f98a=a133_0x24571f;return{'env':{'value':_0x4369d6['env']||_0x269a44['env'],'source':_0x4369d6[_0x21f98a(0x130)]?_0x21f98a(0x127):_0x21f98a(0x13a)},'apiDir':{'value':_0x4369d6[_0x21f98a(0x13c)]||_0x269a44['apiDir'],'source':_0x4369d6[_0x21f98a(0x13c)]?_0x21f98a(0x127):_0x21f98a(0x13a)},'cookie':{'value':_0x4369d6[_0x21f98a(0x133)]||_0x269a44[_0x21f98a(0x133)],'source':_0x4369d6['cookie']?_0x21f98a(0x127):'inherit'},'accessKey':{'value':_0x4369d6['accessKey']||_0x269a44[_0x21f98a(0x13b)],'source':_0x4369d6['accessKey']?_0x21f98a(0x127):_0x21f98a(0x13a)}};}export function buildCanonicalAppConfig(_0x4b16d,_0x166e80){const _0x3bd4a6=a133_0x24571f,_0x2ea58c=_0x4b16d[_0x3bd4a6(0x12b)](_0x2a4957=>String(_0x2a4957||'')[_0x3bd4a6(0x11f)]())[_0x3bd4a6(0x13f)](Boolean);if(_0x2ea58c[_0x3bd4a6(0x13d)]===0x0)return{};const _0xab2466={};for(const _0x4e03c5 of _0x2ea58c){_0xab2466[_0x4e03c5]=_0x166e80?{'appcode':_0x4e03c5,'env':_0x166e80}:{'appcode':_0x4e03c5};}return{'apps':_0xab2466,'defaultApp':_0x2ea58c[0x0]};}export function buildCanonicalProjectConfig(_0x6a595e,_0xe39997){const _0x27e5cb=a133_0x24571f,{appCodes:appCodes=[],env:_0x4dec50,metadata:_0x2b9527}=_0xe39997,_0x444043={..._0x6a595e,..._0x2b9527||{}};delete _0x444043[_0x27e5cb(0x12c)],delete _0x444043[_0x27e5cb(0x127)];if(_0x4dec50)_0x444043['env']=_0x4dec50;else!_0x444043[_0x27e5cb(0x130)]&&(_0x444043[_0x27e5cb(0x130)]=DEFAULT_CONFIG_VALUES[_0x27e5cb(0x130)]);const _0x27e0df=buildCanonicalAppConfig(appCodes,_0x444043[_0x27e5cb(0x130)]);return Object[_0x27e5cb(0x140)](_0x27e0df)[_0x27e5cb(0x13d)]>0x0&&(_0x444043[_0x27e5cb(0x12e)]=_0x27e0df[_0x27e5cb(0x12e)],_0x444043['defaultApp']=_0x27e0df[_0x27e5cb(0x121)]),_0x444043;}const LOCALE_MAP={'zh':'zh-CN','zh-cn':'zh-CN','zh_cn':'zh-CN','en':a133_0x24571f(0x135),'en-us':a133_0x24571f(0x135),'en_us':a133_0x24571f(0x135)};export function normalizeLocale(_0xf7f6e1){if(!_0xf7f6e1)return null;return LOCALE_MAP[_0xf7f6e1['toLowerCase']()]??null;}function a133_0x56bf(){const _0x4390f4=['defaultFormat','riskLevel','app','number','locale','433616lYvFyA','map','appcode','2688yrPpAO','apps','545985yliifQ','env','API\x20directory\x20path','format','cookie','entries','en-US','string','pageSize','has','1640638PokwJg','inherit','accessKey','apiDir','length','3284916saMiUh','filter','keys','2287965glKJkc','Access\x20key','136QoIBWI','Risk\x20level','Locale','Target\x20environment','trim','5488zzutrQ','defaultApp','925132iIWKUv','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','Config\x20key\x20('];a133_0x56bf=function(){return _0x4390f4;};return a133_0x56bf();}
1
+ const a133_0x1aa9e0=a133_0x2038;(function(_0x2e64f2,_0x4abdd9){const _0x52a856=a133_0x2038,_0x414f9f=_0x2e64f2();while(!![]){try{const _0x1ba2c9=parseInt(_0x52a856(0x151))/0x1*(parseInt(_0x52a856(0x158))/0x2)+-parseInt(_0x52a856(0x16d))/0x3*(parseInt(_0x52a856(0x160))/0x4)+-parseInt(_0x52a856(0x150))/0x5*(-parseInt(_0x52a856(0x170))/0x6)+-parseInt(_0x52a856(0x15b))/0x7+-parseInt(_0x52a856(0x15a))/0x8+parseInt(_0x52a856(0x174))/0x9*(parseInt(_0x52a856(0x169))/0xa)+-parseInt(_0x52a856(0x16a))/0xb;if(_0x1ba2c9===_0x4abdd9)break;else _0x414f9f['push'](_0x414f9f['shift']());}catch(_0x591940){_0x414f9f['push'](_0x414f9f['shift']());}}}(a133_0x33e4,0xbadd3));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RABETBASE_ENV_VALUES}from'../constant/env.js';function a133_0x33e4(){const _0x2086a3=['Auth\x20cookie','apiDir','string','appcode','defaultApp','Access\x20key','3372bwiFbb','keys','1919816KMNqlJ','7633997nMgSHg','inherit','toLowerCase','en-US','entries','8fbSVtj','Config\x20key\x20(','trim','cookie','locale','apps','defaultFormat','riskLevel','filter','174470osnWKr','1221253opNlNz','zh-CN','app','593841unKGuq','Default\x20page\x20size','accessKey','6242466QZXEjM','format','has','Risk\x20level','639aoltXE','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','API\x20directory\x20path','env','number','join','map','pageSize','Locale','5NuKAbI','192lyVYXl'];a133_0x33e4=function(){return _0x2086a3;};return a133_0x33e4();}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=[a133_0x1aa9e0(0x163),'accessKey',a133_0x1aa9e0(0x164),a133_0x1aa9e0(0x171),a133_0x1aa9e0(0x167)];export const TOP_LEVEL_CONFIG_KEYS=new Set([a133_0x1aa9e0(0x155),a133_0x1aa9e0(0x177),a133_0x1aa9e0(0x164),'format',a133_0x1aa9e0(0x163),a133_0x1aa9e0(0x16f),a133_0x1aa9e0(0x153)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x3d6dc5){const _0x52e11a=a133_0x1aa9e0;return[..._0x3d6dc5][_0x52e11a(0x179)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x4764fb){const _0x47d8b5=a133_0x1aa9e0;return TOP_LEVEL_CONFIG_KEYS[_0x47d8b5(0x172)](_0x4764fb);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x1f27ce=a133_0x1aa9e0;return _0x1f27ce(0x161)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':'env','apiDir':a133_0x1aa9e0(0x153),'cookie':'cookie','accessKey':a133_0x1aa9e0(0x16f),'defaultFormat':a133_0x1aa9e0(0x171),'pageSize':a133_0x1aa9e0(0x14e),'riskLevel':a133_0x1aa9e0(0x167),'locale':'locale'};export function getAppProfileFlagDefs(){const _0x56c181=a133_0x1aa9e0;return[{'name':_0x56c181(0x177),'type':_0x56c181(0x154),'description':'Target\x20environment','enum':[...RABETBASE_ENV_VALUES]},{'name':'apiDir','type':'string','description':_0x56c181(0x176)},{'name':_0x56c181(0x163),'type':'string','description':_0x56c181(0x152),'hidden':!![]},{'name':_0x56c181(0x16f),'type':_0x56c181(0x154),'description':_0x56c181(0x157),'hidden':!![]},{'name':_0x56c181(0x166),'type':_0x56c181(0x154),'description':_0x56c181(0x175),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':'pageSize','type':_0x56c181(0x178),'description':_0x56c181(0x16e)},{'name':_0x56c181(0x167),'type':_0x56c181(0x154),'description':_0x56c181(0x173),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x56c181(0x164),'type':_0x56c181(0x154),'description':_0x56c181(0x14f)}];}function a133_0x2038(_0x17ebda,_0x35e9b7){_0x17ebda=_0x17ebda-0x14d;const _0x33e47c=a133_0x33e4();let _0x2038f4=_0x33e47c[_0x17ebda];return _0x2038f4;}export function collectAppProfileOverrides(_0x208375){const _0x219e65=a133_0x1aa9e0,_0x52d243={};for(const [_0x3a26b0,_0x58ceae]of Object[_0x219e65(0x15f)](APP_PROFILE_FLAG_KEY_MAP)){const _0x20ce6e=_0x208375(_0x3a26b0);if(!_0x20ce6e)continue;_0x52d243[_0x58ceae]=_0x58ceae===_0x219e65(0x14e)?Number(_0x20ce6e):_0x20ce6e;}return _0x52d243;}export function buildAppProfileListFields(_0x4dead4){const _0x499a66=a133_0x1aa9e0;return{'env':_0x4dead4[_0x499a66(0x177)]??null,'apiDir':_0x4dead4[_0x499a66(0x153)]??null,'hasCookie':!!_0x4dead4['cookie'],'hasAccessKey':!!_0x4dead4[_0x499a66(0x16f)],'format':_0x4dead4['format']??null,'pageSize':_0x4dead4['pageSize']??null,'riskLevel':_0x4dead4['riskLevel']??null,'locale':_0x4dead4['locale']??null};}export function buildAppDoctorFields(_0x21b7d6,_0xb84ac5){const _0xa1c0a9=a133_0x1aa9e0;return{'env':{'value':_0x21b7d6[_0xa1c0a9(0x177)]||_0xb84ac5[_0xa1c0a9(0x177)],'source':_0x21b7d6['env']?'app':_0xa1c0a9(0x15c)},'apiDir':{'value':_0x21b7d6[_0xa1c0a9(0x153)]||_0xb84ac5[_0xa1c0a9(0x153)],'source':_0x21b7d6[_0xa1c0a9(0x153)]?_0xa1c0a9(0x16c):_0xa1c0a9(0x15c)},'cookie':{'value':_0x21b7d6['cookie']||_0xb84ac5[_0xa1c0a9(0x163)],'source':_0x21b7d6[_0xa1c0a9(0x163)]?_0xa1c0a9(0x16c):'inherit'},'accessKey':{'value':_0x21b7d6[_0xa1c0a9(0x16f)]||_0xb84ac5[_0xa1c0a9(0x16f)],'source':_0x21b7d6[_0xa1c0a9(0x16f)]?_0xa1c0a9(0x16c):_0xa1c0a9(0x15c)}};}export function buildCanonicalAppConfig(_0x412b53,_0x18a1be){const _0x240835=a133_0x1aa9e0,_0x59617a=_0x412b53[_0x240835(0x14d)](_0x100ee3=>String(_0x100ee3||'')[_0x240835(0x162)]())[_0x240835(0x168)](Boolean);if(_0x59617a['length']===0x0)return{};const _0x4fec6d={};for(const _0x6f004c of _0x59617a){_0x4fec6d[_0x6f004c]=_0x18a1be?{'appcode':_0x6f004c,'env':_0x18a1be}:{'appcode':_0x6f004c};}return{'apps':_0x4fec6d,'defaultApp':_0x59617a[0x0]};}export function buildCanonicalProjectConfig(_0x23755e,_0xbab17e){const _0x9fc2e1=a133_0x1aa9e0,{appCodes:appCodes=[],env:_0xf1d998,metadata:_0x3f0168}=_0xbab17e,_0x4a0170={..._0x23755e,..._0x3f0168||{}};delete _0x4a0170[_0x9fc2e1(0x155)],delete _0x4a0170['app'];if(_0xf1d998)_0x4a0170['env']=_0xf1d998;else!_0x4a0170[_0x9fc2e1(0x177)]&&(_0x4a0170['env']=DEFAULT_CONFIG_VALUES[_0x9fc2e1(0x177)]);const _0x5e3c47=buildCanonicalAppConfig(appCodes,_0x4a0170[_0x9fc2e1(0x177)]);return Object[_0x9fc2e1(0x159)](_0x5e3c47)['length']>0x0&&(_0x4a0170[_0x9fc2e1(0x165)]=_0x5e3c47[_0x9fc2e1(0x165)],_0x4a0170[_0x9fc2e1(0x156)]=_0x5e3c47['defaultApp']),_0x4a0170;}const LOCALE_MAP={'zh':a133_0x1aa9e0(0x16b),'zh-cn':a133_0x1aa9e0(0x16b),'zh_cn':a133_0x1aa9e0(0x16b),'en':'en-US','en-us':a133_0x1aa9e0(0x15e),'en_us':a133_0x1aa9e0(0x15e)};export function normalizeLocale(_0x1ad164){const _0x9628cd=a133_0x1aa9e0;if(!_0x1ad164)return null;return LOCALE_MAP[_0x1ad164[_0x9628cd(0x15d)]()]??null;}
@@ -1 +1 @@
1
- function a134_0xe029(_0x552ff9,_0x6c2628){_0x552ff9=_0x552ff9-0x1c9;const _0x199fb8=a134_0x199f();let _0xe029ed=_0x199fb8[_0x552ff9];return _0xe029ed;}function a134_0x199f(){const _0x19ec51=['7117166zYtRNJ','3001976acPlfd','683473LOgjzw','63QCWAeN','3vOGJRA','6917844yngJrY','292172yIFTZD','2697788mqfizn','5826650QjYbwF'];a134_0x199f=function(){return _0x19ec51;};return a134_0x199f();}(function(_0xb254e2,_0x3baff7){const _0x37272f=a134_0xe029,_0x23a3ab=_0xb254e2();while(!![]){try{const _0x3a7a37=parseInt(_0x37272f(0x1cc))/0x1+parseInt(_0x37272f(0x1d1))/0x2*(parseInt(_0x37272f(0x1ce))/0x3)+parseInt(_0x37272f(0x1d0))/0x4+parseInt(_0x37272f(0x1c9))/0x5+parseInt(_0x37272f(0x1cf))/0x6+-parseInt(_0x37272f(0x1ca))/0x7+-parseInt(_0x37272f(0x1cb))/0x8*(parseInt(_0x37272f(0x1cd))/0x9);if(_0x3a7a37===_0x3baff7)break;else _0x23a3ab['push'](_0x23a3ab['shift']());}catch(_0x134ed5){_0x23a3ab['push'](_0x23a3ab['shift']());}}}(a134_0x199f,0xbe7d7));export const CLI_VERSION_POLICY_URL='https://g.lovrabet.com/dist/rabetbase-cli/config/index.json';
1
+ const a134_0x1264f6=a134_0x2c33;function a134_0x2c33(_0x51e29a,_0x59a402){_0x51e29a=_0x51e29a-0x1ef;const _0xedb35e=a134_0xedb3();let _0x2c3380=_0xedb35e[_0x51e29a];return _0x2c3380;}function a134_0xedb3(){const _0xfd39ca=['24212556RjMWnZ','2tIAoAz','6hkxddc','https://g.lovrabet.com/dist/rabetbase-cli/config/index.json','662985EuKCbc','1223365Wdmmwg','1340176fHnixs','8715469JoZDwW','5052512JXmSan','4290753QpWHex'];a134_0xedb3=function(){return _0xfd39ca;};return a134_0xedb3();}(function(_0x22fc64,_0x345c07){const _0x533a3b=a134_0x2c33,_0x4c7450=_0x22fc64();while(!![]){try{const _0x42f4de=-parseInt(_0x533a3b(0x1f3))/0x1+parseInt(_0x533a3b(0x1ef))/0x2*(parseInt(_0x533a3b(0x1f7))/0x3)+-parseInt(_0x533a3b(0x1f4))/0x4+parseInt(_0x533a3b(0x1f2))/0x5+parseInt(_0x533a3b(0x1f0))/0x6*(-parseInt(_0x533a3b(0x1f5))/0x7)+-parseInt(_0x533a3b(0x1f6))/0x8+parseInt(_0x533a3b(0x1f8))/0x9;if(_0x42f4de===_0x345c07)break;else _0x4c7450['push'](_0x4c7450['shift']());}catch(_0x377990){_0x4c7450['push'](_0x4c7450['shift']());}}}(a134_0xedb3,0xc7bac));export const CLI_VERSION_POLICY_URL=a134_0x1264f6(0x1f1);
@@ -1 +1 @@
1
- const a135_0x168761=a135_0x6626;(function(_0xb90d07,_0x511890){const _0x9f4f5c=a135_0x6626,_0x1cab58=_0xb90d07();while(!![]){try{const _0x3e382d=parseInt(_0x9f4f5c(0x1c3))/0x1+parseInt(_0x9f4f5c(0x1a8))/0x2+-parseInt(_0x9f4f5c(0x16b))/0x3+-parseInt(_0x9f4f5c(0x182))/0x4+parseInt(_0x9f4f5c(0x1c2))/0x5*(-parseInt(_0x9f4f5c(0x196))/0x6)+parseInt(_0x9f4f5c(0x1a6))/0x7*(-parseInt(_0x9f4f5c(0x1bf))/0x8)+parseInt(_0x9f4f5c(0x1cc))/0x9;if(_0x3e382d===_0x511890)break;else _0x1cab58['push'](_0x1cab58['shift']());}catch(_0xef7b86){_0x1cab58['push'](_0x1cab58['shift']());}}}(a135_0x4cca,0x9d376));function a135_0x6626(_0x51b86a,_0x4e680a){_0x51b86a=_0x51b86a-0x169;const _0x4cca71=a135_0x4cca();let _0x662629=_0x4cca71[_0x51b86a];return _0x662629;}export const CLI_BIN_NAME=a135_0x168761(0x1a0);function a135_0x4cca(){const _0x5e5642=['Force\x20overwrite','schemas','string','Confirm\x20destructive\x20action','page','format','title','43528QggBCB','Output\x20path','dryRun','5KdnrjU','691149ikXCyL','Target\x20path','Skip\x20confirmation\x20for\x20high-risk\x20writes','Override\x20appcode','appcode','operationType','description','expectedCount','enable-bff-save','20752254IZbGsh','code','db-id','yes','params','target','<code>','dbid','skip-imports','SQL\x20string','3118014EUIJav','production\x20|\x20daily','expected-count','all','Code\x20filter','Environment','<name>','Use\x20global\x20config\x20scope','force','Description','<expr>','Alias\x20for\x20--non-interactive','sql-name','Type\x20filter','Function\x20node','env','JSON\x20params','type','project','boolean','pagesize','Verbose\x20output','Dataset\x20code','2534028qwFecw','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','file','Config\x20value','Record\x20ID','sql','value','File\x20path','non-interactive','Keyword\x20filter','Operation\x20type','Output\x20format','verbose','SQL\x20code','Show\x20help','function-node','global','meowKey','datasetcode','output','2787774kRzmmT','sqlname','keyword','name','operation-type','Watch\x20mode','Clear','enableBffSave','sqlcode','Page\x20size','rabetbase','Preview\x20operation\x20without\x20executing','help','key','watch','Rabetbase\x20CLI','903CajCFE','functionNode','972732UPRKRE','@lovrabet/rabetbase-cli','remote','sqlName','Schemas','Description\x20file','Enable\x20BFF\x20save','Force\x20non-interactive\x20mode\x20(CI)','Title','clear','app','Name','DB\x20ID','confirm','nonInteractive','dry-run'];a135_0x4cca=function(){return _0x5e5642;};return a135_0x4cca();}export const CLI_DISPLAY_NAME=a135_0x168761(0x1a5);export const NPM_PACKAGE_NAME=a135_0x168761(0x1a9);export const GLOBAL_FLAGS=[{'name':a135_0x168761(0x1c7),'meowKey':a135_0x168761(0x1c7),'type':a135_0x168761(0x1ba),'description':a135_0x168761(0x1c6),'hint':a135_0x168761(0x1d2)},{'name':a135_0x168761(0x1b2),'meowKey':a135_0x168761(0x1b2),'type':'string','description':'Select\x20app\x20profile\x20by\x20name','hint':a135_0x168761(0x171)},{'name':a135_0x168761(0x17a),'meowKey':a135_0x168761(0x17a),'type':'string','description':a135_0x168761(0x170),'hint':a135_0x168761(0x16c)},{'name':'format','meowKey':a135_0x168761(0x1bd),'type':a135_0x168761(0x1ba),'description':a135_0x168761(0x18d),'hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':a135_0x168761(0x1ba),'description':a135_0x168761(0x183),'hint':a135_0x168761(0x175)},{'name':a135_0x168761(0x1b7),'meowKey':a135_0x168761(0x1c1),'type':a135_0x168761(0x17e),'description':a135_0x168761(0x1a1)},{'name':'yes','meowKey':a135_0x168761(0x1cf),'type':a135_0x168761(0x17e),'description':a135_0x168761(0x1c5)},{'name':a135_0x168761(0x18a),'meowKey':a135_0x168761(0x1b6),'type':a135_0x168761(0x17e),'description':a135_0x168761(0x1af)},{'name':'global','meowKey':a135_0x168761(0x192),'type':'boolean','description':a135_0x168761(0x172)},{'name':'project','meowKey':a135_0x168761(0x17d),'type':a135_0x168761(0x17e),'description':'Use\x20project\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':'boolean','description':a135_0x168761(0x176),'hidden':!![]},{'name':a135_0x168761(0x1a2),'meowKey':a135_0x168761(0x1a2),'type':'boolean','description':a135_0x168761(0x190)},{'name':a135_0x168761(0x199),'meowKey':a135_0x168761(0x199),'type':a135_0x168761(0x1ba),'description':a135_0x168761(0x1b3),'hidden':!![]},{'name':a135_0x168761(0x1be),'meowKey':'title','type':a135_0x168761(0x1ba),'description':a135_0x168761(0x1b0),'hidden':!![]},{'name':a135_0x168761(0x1b1),'meowKey':a135_0x168761(0x1b1),'type':'boolean','description':a135_0x168761(0x19c),'hidden':!![]},{'name':a135_0x168761(0x1a4),'meowKey':a135_0x168761(0x1a4),'type':'boolean','description':a135_0x168761(0x19b),'hidden':!![]},{'name':'output','meowKey':a135_0x168761(0x195),'type':'string','description':a135_0x168761(0x1c0),'hidden':!![]},{'name':'params','meowKey':a135_0x168761(0x1d0),'type':'string','description':a135_0x168761(0x17b),'hidden':!![]},{'name':a135_0x168761(0x194),'meowKey':a135_0x168761(0x194),'type':a135_0x168761(0x1ba),'description':a135_0x168761(0x181),'hidden':!![]},{'name':a135_0x168761(0x16e),'meowKey':a135_0x168761(0x16e),'type':a135_0x168761(0x17e),'description':'Apply\x20to\x20all','hidden':!![]},{'name':a135_0x168761(0x1cb),'meowKey':a135_0x168761(0x19d),'type':a135_0x168761(0x17e),'description':a135_0x168761(0x1ae),'hidden':!![]},{'name':'id','meowKey':'id','type':'string','description':a135_0x168761(0x186),'hidden':!![]},{'name':a135_0x168761(0x17c),'meowKey':'type','type':a135_0x168761(0x1ba),'description':a135_0x168761(0x178),'hidden':!![]},{'name':a135_0x168761(0x184),'meowKey':a135_0x168761(0x184),'type':'string','description':a135_0x168761(0x189),'hidden':!![]},{'name':a135_0x168761(0x19e),'meowKey':a135_0x168761(0x19e),'type':'string','description':a135_0x168761(0x18f),'hidden':!![]},{'name':a135_0x168761(0x177),'meowKey':a135_0x168761(0x1ab),'type':a135_0x168761(0x1ba),'description':'SQL\x20name','hidden':!![]},{'name':a135_0x168761(0x197),'meowKey':a135_0x168761(0x197),'type':a135_0x168761(0x1ba),'description':'SQL\x20name','hidden':!![]},{'name':a135_0x168761(0x1ce),'meowKey':'dbId','type':'string','description':'DB\x20ID','hidden':!![]},{'name':a135_0x168761(0x1d3),'meowKey':'dbid','type':a135_0x168761(0x1ba),'description':a135_0x168761(0x1b4),'hidden':!![]},{'name':'description','meowKey':a135_0x168761(0x1c9),'type':a135_0x168761(0x1ba),'description':a135_0x168761(0x174),'hidden':!![]},{'name':'description-file','meowKey':'descriptionFile','type':a135_0x168761(0x1ba),'description':a135_0x168761(0x1ad),'hidden':!![]},{'name':a135_0x168761(0x1bc),'meowKey':'page','type':'string','description':'Page\x20number','hidden':!![]},{'name':a135_0x168761(0x17f),'meowKey':a135_0x168761(0x17f),'type':'string','description':a135_0x168761(0x19f),'hidden':!![]},{'name':a135_0x168761(0x198),'meowKey':a135_0x168761(0x198),'type':'string','description':a135_0x168761(0x18b),'hidden':!![]},{'name':'code','meowKey':a135_0x168761(0x1cd),'type':'string','description':a135_0x168761(0x16f),'hidden':!![]},{'name':a135_0x168761(0x187),'meowKey':a135_0x168761(0x187),'type':a135_0x168761(0x1ba),'description':a135_0x168761(0x16a),'hidden':!![]},{'name':a135_0x168761(0x1b9),'meowKey':a135_0x168761(0x1b9),'type':'string','description':a135_0x168761(0x1ac),'hidden':!![]},{'name':'operation','meowKey':'operation','type':'string','description':a135_0x168761(0x18c),'hidden':!![]},{'name':a135_0x168761(0x1d1),'meowKey':'target','type':a135_0x168761(0x1ba),'description':a135_0x168761(0x1c4),'hidden':!![]},{'name':a135_0x168761(0x169),'meowKey':'skipImports','type':a135_0x168761(0x17e),'description':'Skip\x20import\x20generation','hidden':!![]},{'name':a135_0x168761(0x1a3),'meowKey':a135_0x168761(0x1a3),'type':'string','description':'Config\x20key','hidden':!![]},{'name':a135_0x168761(0x188),'meowKey':'value','type':a135_0x168761(0x1ba),'description':a135_0x168761(0x185),'hidden':!![]},{'name':a135_0x168761(0x173),'meowKey':a135_0x168761(0x173),'type':'boolean','description':a135_0x168761(0x1b8),'hidden':!![]},{'name':a135_0x168761(0x1b5),'meowKey':'confirm','type':a135_0x168761(0x17e),'description':a135_0x168761(0x1bb),'hidden':!![]},{'name':'remote','meowKey':a135_0x168761(0x1aa),'type':a135_0x168761(0x17e),'description':'Use\x20remote','hidden':!![]},{'name':a135_0x168761(0x18e),'meowKey':a135_0x168761(0x18e),'type':a135_0x168761(0x17e),'description':a135_0x168761(0x180),'hidden':!![]},{'name':a135_0x168761(0x16d),'meowKey':a135_0x168761(0x1ca),'type':a135_0x168761(0x1ba),'description':'Expected\x20affected\x20count','hidden':!![]},{'name':a135_0x168761(0x19a),'meowKey':a135_0x168761(0x1c8),'type':a135_0x168761(0x1ba),'description':'Operation\x20type','hidden':!![]},{'name':a135_0x168761(0x191),'meowKey':a135_0x168761(0x1a7),'type':a135_0x168761(0x1ba),'description':a135_0x168761(0x179),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a135_0x168761(0x1c7),'app','env',a135_0x168761(0x1bd),'jq',a135_0x168761(0x1b7),a135_0x168761(0x1cf),'non-interactive','ci']);export function buildMeowFlags(){const _0x257dec=a135_0x168761;return Object['fromEntries'](GLOBAL_FLAGS['map'](_0x153ab1=>[_0x153ab1[_0x257dec(0x193)],{'type':_0x153ab1[_0x257dec(0x17c)]}]));}
1
+ const a135_0x2beecb=a135_0x22cf;(function(_0x5f3555,_0x2cbdc1){const _0x4476ce=a135_0x22cf,_0x3e809b=_0x5f3555();while(!![]){try{const _0x39ac0c=-parseInt(_0x4476ce(0xc8))/0x1+parseInt(_0x4476ce(0xe1))/0x2*(-parseInt(_0x4476ce(0x105))/0x3)+-parseInt(_0x4476ce(0x10d))/0x4+-parseInt(_0x4476ce(0x11b))/0x5+-parseInt(_0x4476ce(0xe5))/0x6+parseInt(_0x4476ce(0xbe))/0x7+parseInt(_0x4476ce(0x10e))/0x8;if(_0x39ac0c===_0x2cbdc1)break;else _0x3e809b['push'](_0x3e809b['shift']());}catch(_0x478665){_0x3e809b['push'](_0x3e809b['shift']());}}}(a135_0x5ee9,0x616df));export const CLI_BIN_NAME=a135_0x2beecb(0x113);function a135_0x22cf(_0x397c25,_0x17d18a){_0x397c25=_0x397c25-0xba;const _0x5ee9ba=a135_0x5ee9();let _0x22cf82=_0x5ee9ba[_0x397c25];return _0x22cf82;}export const CLI_DISPLAY_NAME=a135_0x2beecb(0x108);export const NPM_PACKAGE_NAME=a135_0x2beecb(0xce);function a135_0x5ee9(){const _0x28fe3e=['code','SQL\x20name','boolean','rabetbase','description','<name>','Output\x20path','JSON\x20params','Clear','Skip\x20import\x20generation','meowKey','2293980wgrXGd','DB\x20ID','confirm','file','page','type','map','yes','verbose','5364401OTKXVJ','description-file','Function\x20node','operation','sql-name','Name','value','enable-bff-save','Config\x20value','Show\x20help','634383JQVfVm','expectedCount','key','Enable\x20BFF\x20save','watch','Type\x20filter','@lovrabet/rabetbase-cli','production\x20|\x20daily','Target\x20path','Expected\x20affected\x20count','descriptionFile','Operation\x20type','dbid','Alias\x20for\x20--non-interactive','keyword','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','SQL\x20code','remote','Environment','nonInteractive','pagesize','Title','Skip\x20confirmation\x20for\x20high-risk\x20writes','<expr>','Schemas','928AquqzU','sql','target','sqlName','4625304VzvurU','operation-type','appcode','dry-run','format','Preview\x20operation\x20without\x20executing','force','all','skip-imports','Confirm\x20destructive\x20action','Record\x20ID','help','function-node','Verbose\x20output','project','SQL\x20string','Page\x20number','operationType','sqlcode','string','Use\x20global\x20config\x20scope','output','Keyword\x20filter','datasetcode','Config\x20key','name','env','params','app','File\x20path','Override\x20appcode','non-interactive','3177JsDJdB','sqlname','title','Rabetbase\x20CLI','db-id','clear','global','Force\x20overwrite','1896852ROseWT','19699040uPKyhX','Code\x20filter'];a135_0x5ee9=function(){return _0x28fe3e;};return a135_0x5ee9();}export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':a135_0x2beecb(0xe7),'type':a135_0x2beecb(0xf8),'description':a135_0x2beecb(0x103),'hint':'<code>'},{'name':a135_0x2beecb(0x101),'meowKey':a135_0x2beecb(0x101),'type':'string','description':'Select\x20app\x20profile\x20by\x20name','hint':a135_0x2beecb(0x115)},{'name':a135_0x2beecb(0xff),'meowKey':'env','type':a135_0x2beecb(0xf8),'description':a135_0x2beecb(0xda),'hint':a135_0x2beecb(0xcf)},{'name':a135_0x2beecb(0xe9),'meowKey':a135_0x2beecb(0xe9),'type':'string','description':'Output\x20format','hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':a135_0x2beecb(0xf8),'description':a135_0x2beecb(0xd7),'hint':a135_0x2beecb(0xdf)},{'name':a135_0x2beecb(0xe8),'meowKey':'dryRun','type':a135_0x2beecb(0x112),'description':a135_0x2beecb(0xea)},{'name':a135_0x2beecb(0xbc),'meowKey':a135_0x2beecb(0xbc),'type':a135_0x2beecb(0x112),'description':a135_0x2beecb(0xde)},{'name':a135_0x2beecb(0x104),'meowKey':a135_0x2beecb(0xdb),'type':a135_0x2beecb(0x112),'description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':a135_0x2beecb(0x10b),'meowKey':a135_0x2beecb(0x10b),'type':'boolean','description':a135_0x2beecb(0xf9)},{'name':a135_0x2beecb(0xf3),'meowKey':'project','type':a135_0x2beecb(0x112),'description':'Use\x20project\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':'boolean','description':a135_0x2beecb(0xd5),'hidden':!![]},{'name':'help','meowKey':a135_0x2beecb(0xf0),'type':a135_0x2beecb(0x112),'description':a135_0x2beecb(0xc7)},{'name':a135_0x2beecb(0xfe),'meowKey':a135_0x2beecb(0xfe),'type':'string','description':a135_0x2beecb(0xc3),'hidden':!![]},{'name':'title','meowKey':a135_0x2beecb(0x107),'type':a135_0x2beecb(0xf8),'description':a135_0x2beecb(0xdd),'hidden':!![]},{'name':a135_0x2beecb(0x10a),'meowKey':'clear','type':a135_0x2beecb(0x112),'description':a135_0x2beecb(0x118),'hidden':!![]},{'name':a135_0x2beecb(0xcc),'meowKey':a135_0x2beecb(0xcc),'type':'boolean','description':'Watch\x20mode','hidden':!![]},{'name':'output','meowKey':a135_0x2beecb(0xfa),'type':'string','description':a135_0x2beecb(0x116),'hidden':!![]},{'name':a135_0x2beecb(0x100),'meowKey':'params','type':a135_0x2beecb(0xf8),'description':a135_0x2beecb(0x117),'hidden':!![]},{'name':a135_0x2beecb(0xfc),'meowKey':'datasetcode','type':'string','description':'Dataset\x20code','hidden':!![]},{'name':a135_0x2beecb(0xec),'meowKey':a135_0x2beecb(0xec),'type':a135_0x2beecb(0x112),'description':'Apply\x20to\x20all','hidden':!![]},{'name':a135_0x2beecb(0xc5),'meowKey':'enableBffSave','type':a135_0x2beecb(0x112),'description':a135_0x2beecb(0xcb),'hidden':!![]},{'name':'id','meowKey':'id','type':'string','description':a135_0x2beecb(0xef),'hidden':!![]},{'name':a135_0x2beecb(0xba),'meowKey':'type','type':'string','description':a135_0x2beecb(0xcd),'hidden':!![]},{'name':'file','meowKey':a135_0x2beecb(0x11e),'type':a135_0x2beecb(0xf8),'description':a135_0x2beecb(0x102),'hidden':!![]},{'name':a135_0x2beecb(0xf7),'meowKey':a135_0x2beecb(0xf7),'type':'string','description':a135_0x2beecb(0xd8),'hidden':!![]},{'name':a135_0x2beecb(0xc2),'meowKey':a135_0x2beecb(0xe4),'type':a135_0x2beecb(0xf8),'description':a135_0x2beecb(0x111),'hidden':!![]},{'name':a135_0x2beecb(0x106),'meowKey':a135_0x2beecb(0x106),'type':a135_0x2beecb(0xf8),'description':a135_0x2beecb(0x111),'hidden':!![]},{'name':a135_0x2beecb(0x109),'meowKey':'dbId','type':a135_0x2beecb(0xf8),'description':a135_0x2beecb(0x11c),'hidden':!![]},{'name':a135_0x2beecb(0xd4),'meowKey':a135_0x2beecb(0xd4),'type':a135_0x2beecb(0xf8),'description':a135_0x2beecb(0x11c),'hidden':!![]},{'name':a135_0x2beecb(0x114),'meowKey':a135_0x2beecb(0x114),'type':a135_0x2beecb(0xf8),'description':'Description','hidden':!![]},{'name':a135_0x2beecb(0xbf),'meowKey':a135_0x2beecb(0xd2),'type':a135_0x2beecb(0xf8),'description':'Description\x20file','hidden':!![]},{'name':'page','meowKey':a135_0x2beecb(0x11f),'type':a135_0x2beecb(0xf8),'description':a135_0x2beecb(0xf5),'hidden':!![]},{'name':a135_0x2beecb(0xdc),'meowKey':'pagesize','type':'string','description':'Page\x20size','hidden':!![]},{'name':'keyword','meowKey':a135_0x2beecb(0xd6),'type':a135_0x2beecb(0xf8),'description':a135_0x2beecb(0xfb),'hidden':!![]},{'name':a135_0x2beecb(0x110),'meowKey':a135_0x2beecb(0x110),'type':a135_0x2beecb(0xf8),'description':a135_0x2beecb(0x10f),'hidden':!![]},{'name':a135_0x2beecb(0xe2),'meowKey':a135_0x2beecb(0xe2),'type':a135_0x2beecb(0xf8),'description':a135_0x2beecb(0xf4),'hidden':!![]},{'name':'schemas','meowKey':'schemas','type':a135_0x2beecb(0xf8),'description':a135_0x2beecb(0xe0),'hidden':!![]},{'name':a135_0x2beecb(0xc1),'meowKey':a135_0x2beecb(0xc1),'type':a135_0x2beecb(0xf8),'description':a135_0x2beecb(0xd3),'hidden':!![]},{'name':a135_0x2beecb(0xe3),'meowKey':a135_0x2beecb(0xe3),'type':a135_0x2beecb(0xf8),'description':a135_0x2beecb(0xd0),'hidden':!![]},{'name':a135_0x2beecb(0xed),'meowKey':'skipImports','type':a135_0x2beecb(0x112),'description':a135_0x2beecb(0x119),'hidden':!![]},{'name':a135_0x2beecb(0xca),'meowKey':'key','type':a135_0x2beecb(0xf8),'description':a135_0x2beecb(0xfd),'hidden':!![]},{'name':a135_0x2beecb(0xc4),'meowKey':a135_0x2beecb(0xc4),'type':a135_0x2beecb(0xf8),'description':a135_0x2beecb(0xc6),'hidden':!![]},{'name':a135_0x2beecb(0xeb),'meowKey':'force','type':'boolean','description':a135_0x2beecb(0x10c),'hidden':!![]},{'name':a135_0x2beecb(0x11d),'meowKey':'confirm','type':a135_0x2beecb(0x112),'description':a135_0x2beecb(0xee),'hidden':!![]},{'name':a135_0x2beecb(0xd9),'meowKey':a135_0x2beecb(0xd9),'type':'boolean','description':'Use\x20remote','hidden':!![]},{'name':a135_0x2beecb(0xbd),'meowKey':a135_0x2beecb(0xbd),'type':a135_0x2beecb(0x112),'description':a135_0x2beecb(0xf2),'hidden':!![]},{'name':'expected-count','meowKey':a135_0x2beecb(0xc9),'type':'string','description':a135_0x2beecb(0xd1),'hidden':!![]},{'name':a135_0x2beecb(0xe6),'meowKey':a135_0x2beecb(0xf6),'type':a135_0x2beecb(0xf8),'description':'Operation\x20type','hidden':!![]},{'name':a135_0x2beecb(0xf1),'meowKey':'functionNode','type':a135_0x2beecb(0xf8),'description':a135_0x2beecb(0xc0),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set(['appcode',a135_0x2beecb(0x101),'env',a135_0x2beecb(0xe9),'jq',a135_0x2beecb(0xe8),'yes','non-interactive','ci']);export function buildMeowFlags(){const _0x2093c6=a135_0x2beecb;return Object['fromEntries'](GLOBAL_FLAGS[_0x2093c6(0xbb)](_0x19e847=>[_0x19e847[_0x2093c6(0x11a)],{'type':_0x19e847[_0x2093c6(0xba)]}]));}
@@ -1 +1 @@
1
- const a136_0x53679b=a136_0x2462;(function(_0x3ed09c,_0x29fcdf){const _0x4182b7=a136_0x2462,_0x4ed83e=_0x3ed09c();while(!![]){try{const _0x45a173=-parseInt(_0x4182b7(0x86))/0x1*(-parseInt(_0x4182b7(0x7d))/0x2)+parseInt(_0x4182b7(0x87))/0x3*(-parseInt(_0x4182b7(0x7f))/0x4)+-parseInt(_0x4182b7(0x82))/0x5*(-parseInt(_0x4182b7(0x7c))/0x6)+parseInt(_0x4182b7(0x80))/0x7*(-parseInt(_0x4182b7(0x7b))/0x8)+-parseInt(_0x4182b7(0x8a))/0x9+-parseInt(_0x4182b7(0x84))/0xa*(parseInt(_0x4182b7(0x83))/0xb)+parseInt(_0x4182b7(0x7e))/0xc;if(_0x45a173===_0x29fcdf)break;else _0x4ed83e['push'](_0x4ed83e['shift']());}catch(_0x35240a){_0x4ed83e['push'](_0x4ed83e['shift']());}}}(a136_0x455e,0x99937));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a136_0x53679b(0x81),'format':'compress','locale':a136_0x53679b(0x88),'riskLevel':a136_0x53679b(0x85),'apiDir':DEFAULT_API_DIR};function a136_0x2462(_0x17fd0b,_0x56fee7){_0x17fd0b=_0x17fd0b-0x7b;const _0x455e0c=a136_0x455e();let _0x246259=_0x455e0c[_0x17fd0b];return _0x246259;}export const DEFAULT_COMMAND_OUTPUT_FORMAT=a136_0x53679b(0x89);function a136_0x455e(){const _0x1a74a8=['11hHKZYT','3229550lckdJF','high-risk-write','1Mxlhni','9bjjMpR','en-US','compress','3522834AsXhGf','181880JAGjaJ','6JWOzCv','935254AmIJFQ','19003848cFRWhI','1543100SDQXEc','175NlBlUk','production','5089235wfiSjN'];a136_0x455e=function(){return _0x1a74a8;};return a136_0x455e();}
1
+ const a136_0x33a6eb=a136_0x1cd1;(function(_0x49eab7,_0x3dffc2){const _0x496d0b=a136_0x1cd1,_0x522ce4=_0x49eab7();while(!![]){try{const _0x326f5=parseInt(_0x496d0b(0x1e4))/0x1+parseInt(_0x496d0b(0x1eb))/0x2+-parseInt(_0x496d0b(0x1ea))/0x3+-parseInt(_0x496d0b(0x1e7))/0x4*(parseInt(_0x496d0b(0x1e2))/0x5)+parseInt(_0x496d0b(0x1e5))/0x6+-parseInt(_0x496d0b(0x1e3))/0x7*(parseInt(_0x496d0b(0x1ed))/0x8)+-parseInt(_0x496d0b(0x1e9))/0x9;if(_0x326f5===_0x3dffc2)break;else _0x522ce4['push'](_0x522ce4['shift']());}catch(_0x39a0c4){_0x522ce4['push'](_0x522ce4['shift']());}}}(a136_0x3df0,0xdd910));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a136_0x33a6eb(0x1e8),'format':a136_0x33a6eb(0x1e1),'locale':a136_0x33a6eb(0x1ec),'riskLevel':a136_0x33a6eb(0x1e6),'apiDir':DEFAULT_API_DIR};function a136_0x1cd1(_0x3b43cc,_0x574168){_0x3b43cc=_0x3b43cc-0x1e1;const _0x3df01c=a136_0x3df0();let _0x1cd1f0=_0x3df01c[_0x3b43cc];return _0x1cd1f0;}function a136_0x3df0(){const _0x48f632=['5KABPNe','11998qDleRI','1071269uDVNkf','9936768QLUYYf','high-risk-write','2792284HMNnsN','production','7384599qcoXim','3350811jkmuVb','2697424JSPxfo','en-US','2488hvfqCU','compress'];a136_0x3df0=function(){return _0x48f632;};return a136_0x3df0();}export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';
@@ -1 +1 @@
1
- function a137_0xdd12(){const _0x40c81d=['137331cCjsfh','15WrQSkZ','https://user-daily.lovrabet.com','https://daily-runtime.lovrabet.com','8486118ZUyHpK','https://runtime.lovrabet.com','20539818UGSyWJ','7qKVcXv','userDomain','11wtzavT','12589540pDinsl','2683248XwHHUU','https://user.lovrabet.com','126692nTTknD','257952GTqeZW','116OeQIHj','24fAEePj','https://daily-api.lovrabet.com','14mtXkRE'];a137_0xdd12=function(){return _0x40c81d;};return a137_0xdd12();}const a137_0x2cf3ff=a137_0x2a6b;function a137_0x2a6b(_0x3bc5e6,_0x2acb41){_0x3bc5e6=_0x3bc5e6-0xc7;const _0xdd1256=a137_0xdd12();let _0x2a6bcd=_0xdd1256[_0x3bc5e6];return _0x2a6bcd;}(function(_0x311d19,_0x25dfbc){const _0x4f058f=a137_0x2a6b,_0x337d91=_0x311d19();while(!![]){try{const _0x58487c=-parseInt(_0x4f058f(0xd4))/0x1*(-parseInt(_0x4f058f(0xc7))/0x2)+-parseInt(_0x4f058f(0xcd))/0x3*(parseInt(_0x4f058f(0xc9))/0x4)+parseInt(_0x4f058f(0xce))/0x5*(-parseInt(_0x4f058f(0xd8))/0x6)+parseInt(_0x4f058f(0xcc))/0x7*(parseInt(_0x4f058f(0xc8))/0x8)+parseInt(_0x4f058f(0xd1))/0x9+-parseInt(_0x4f058f(0xd7))/0xa*(parseInt(_0x4f058f(0xd6))/0xb)+-parseInt(_0x4f058f(0xca))/0xc*(-parseInt(_0x4f058f(0xd3))/0xd);if(_0x58487c===_0x25dfbc)break;else _0x337d91['push'](_0x337d91['shift']());}catch(_0x2bf7e2){_0x337d91['push'](_0x337d91['shift']());}}}(a137_0xdd12,0xa6ab1));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x486625){const _0xd121ad=a137_0x2a6b;customApiDomain=_0x486625?.['apiDomain'],customUserDomain=_0x486625?.[_0xd121ad(0xd5)],customRuntimeDomain=_0x486625?.['runtimeDomain'];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a137_0x2cf3ff(0xd9):a137_0x2cf3ff(0xcf));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?'https://api.lovrabet.com':a137_0x2cf3ff(0xcb));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a137_0x2cf3ff(0xd2):a137_0x2cf3ff(0xd0));
1
+ function a137_0x410c(_0x19dea6,_0x37c3bc){_0x19dea6=_0x19dea6-0x1aa;const _0x1fdfe7=a137_0x1fdf();let _0x410c47=_0x1fdfe7[_0x19dea6];return _0x410c47;}const a137_0x399135=a137_0x410c;(function(_0x497d63,_0x5b2723){const _0x4db678=a137_0x410c,_0x258909=_0x497d63();while(!![]){try{const _0xc48654=-parseInt(_0x4db678(0x1b9))/0x1*(-parseInt(_0x4db678(0x1b7))/0x2)+parseInt(_0x4db678(0x1b4))/0x3+parseInt(_0x4db678(0x1af))/0x4*(-parseInt(_0x4db678(0x1ba))/0x5)+parseInt(_0x4db678(0x1b5))/0x6+-parseInt(_0x4db678(0x1ad))/0x7+-parseInt(_0x4db678(0x1b0))/0x8*(-parseInt(_0x4db678(0x1b1))/0x9)+parseInt(_0x4db678(0x1b3))/0xa;if(_0xc48654===_0x5b2723)break;else _0x258909['push'](_0x258909['shift']());}catch(_0x5d4abd){_0x258909['push'](_0x258909['shift']());}}}(a137_0x1fdf,0xd8bf6));function a137_0x1fdf(){const _0x92fc6f=['https://api.lovrabet.com','https://runtime.lovrabet.com','7680267yQscmX','userDomain','27796AWxqWc','279856fbwfKp','252HmoKIb','https://daily-api.lovrabet.com','7723680fbNNJD','821076ethGgh','2199138OHvEFF','runtimeDomain','2bUSwUL','https://user-daily.lovrabet.com','155769lNDHbl','405BbYFYF','https://daily-runtime.lovrabet.com'];a137_0x1fdf=function(){return _0x92fc6f;};return a137_0x1fdf();}import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x4fd026){const _0xf06b1b=a137_0x410c;customApiDomain=_0x4fd026?.['apiDomain'],customUserDomain=_0x4fd026?.[_0xf06b1b(0x1ae)],customRuntimeDomain=_0x4fd026?.[_0xf06b1b(0x1b6)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?'https://user.lovrabet.com':a137_0x399135(0x1b8));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a137_0x399135(0x1ab):a137_0x399135(0x1b2));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a137_0x399135(0x1ac):a137_0x399135(0x1aa));
@@ -1 +1 @@
1
- const a138_0x8df4eb=a138_0x2189;(function(_0x23cd67,_0x4470e3){const _0x26a2fe=a138_0x2189,_0x488f2e=_0x23cd67();while(!![]){try{const _0x1f1aa5=parseInt(_0x26a2fe(0x1d5))/0x1*(parseInt(_0x26a2fe(0x1cc))/0x2)+parseInt(_0x26a2fe(0x1ce))/0x3*(parseInt(_0x26a2fe(0x1cf))/0x4)+parseInt(_0x26a2fe(0x1d4))/0x5+parseInt(_0x26a2fe(0x1cd))/0x6+-parseInt(_0x26a2fe(0x1d0))/0x7+parseInt(_0x26a2fe(0x1c9))/0x8+-parseInt(_0x26a2fe(0x1d1))/0x9;if(_0x1f1aa5===_0x4470e3)break;else _0x488f2e['push'](_0x488f2e['shift']());}catch(_0x11fbf2){_0x488f2e['push'](_0x488f2e['shift']());}}}(a138_0x5a9b,0xbf32d));function a138_0x2189(_0x4423a4,_0x2ea4d0){_0x4423a4=_0x4423a4-0x1c9;const _0x5a9b0e=a138_0x5a9b();let _0x218950=_0x5a9b0e[_0x4423a4];return _0x218950;}export const RABETBASE_ENV_VALUES=[a138_0x8df4eb(0x1cb),'daily'];export function normalizeEnv(_0x4bf45a){const _0x4b05cc=a138_0x8df4eb;return _0x4bf45a===_0x4b05cc(0x1d3)?_0x4b05cc(0x1cb):_0x4bf45a;}export function isProduction(_0x510a29){const _0x4dc024=a138_0x8df4eb;return normalizeEnv(_0x510a29)===_0x4dc024(0x1cb);}function a138_0x5a9b(){const _0x3389ab=['7582440jZvIMl','development','production','777982XKqeWF','3511206azWDHj','153591TpNsrp','20FtqPZD','7402703jgQubm','12996540MvphRT','daily','online','1643870KHslKT','3AGdQsQ'];a138_0x5a9b=function(){return _0x3389ab;};return a138_0x5a9b();}export function isDaily(_0x42dbe3){const _0x892622=a138_0x8df4eb;return normalizeEnv(_0x42dbe3)===_0x892622(0x1d2);}export function isDev(_0x4e0b7b){const _0xf74bdf=a138_0x8df4eb,_0x7fea69=normalizeEnv(_0x4e0b7b);return _0x7fea69===_0xf74bdf(0x1ca)||_0x7fea69==='dev';}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a138_0x8df4eb(0x1cb));export function getEnv(){return env;}export function initEnv(_0x11bf0d){env=normalizeEnv(_0x11bf0d);}
1
+ const a138_0x142067=a138_0x3ea0;(function(_0x2ca887,_0x270a4b){const _0x299d3c=a138_0x3ea0,_0x5b2ffc=_0x2ca887();while(!![]){try{const _0x1ced60=-parseInt(_0x299d3c(0xec))/0x1*(-parseInt(_0x299d3c(0xf3))/0x2)+-parseInt(_0x299d3c(0xed))/0x3+-parseInt(_0x299d3c(0xe9))/0x4*(-parseInt(_0x299d3c(0xf4))/0x5)+parseInt(_0x299d3c(0xef))/0x6+-parseInt(_0x299d3c(0xeb))/0x7*(parseInt(_0x299d3c(0xe7))/0x8)+-parseInt(_0x299d3c(0xea))/0x9*(parseInt(_0x299d3c(0xe8))/0xa)+parseInt(_0x299d3c(0xee))/0xb;if(_0x1ced60===_0x270a4b)break;else _0x5b2ffc['push'](_0x5b2ffc['shift']());}catch(_0x52c9b1){_0x5b2ffc['push'](_0x5b2ffc['shift']());}}}(a138_0x8c2b,0x95f20));export const RABETBASE_ENV_VALUES=[a138_0x142067(0xf0),'daily'];export function normalizeEnv(_0xa02ccc){const _0x58a8ea=a138_0x142067;return _0xa02ccc===_0x58a8ea(0xf2)?_0x58a8ea(0xf0):_0xa02ccc;}function a138_0x8c2b(){const _0x44f2d2=['6883620rQDexa','production','daily','online','1580042OfPKiJ','1520DQCHqJ','dev','21856XxiSjq','1452460nKanGu','4496Wvhsgj','18qdgHdz','2142UkwqbB','1AkpVzl','2017323YggpPC','1475254UZEjxq'];a138_0x8c2b=function(){return _0x44f2d2;};return a138_0x8c2b();}export function isProduction(_0x41c9df){const _0x34afc1=a138_0x142067;return normalizeEnv(_0x41c9df)===_0x34afc1(0xf0);}function a138_0x3ea0(_0x38438b,_0xef5d24){_0x38438b=_0x38438b-0xe7;const _0x8c2b22=a138_0x8c2b();let _0x3ea058=_0x8c2b22[_0x38438b];return _0x3ea058;}export function isDaily(_0x17bc9a){const _0x1bb9c2=a138_0x142067;return normalizeEnv(_0x17bc9a)===_0x1bb9c2(0xf1);}export function isDev(_0x4ccd23){const _0x143683=a138_0x142067,_0x5c3671=normalizeEnv(_0x4ccd23);return _0x5c3671==='development'||_0x5c3671===_0x143683(0xf5);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a138_0x142067(0xf0));export function getEnv(){return env;}export function initEnv(_0x5b2f7c){env=normalizeEnv(_0x5b2f7c);}
@@ -1 +1 @@
1
- function a139_0x4950(_0x74a21,_0x431bb4){_0x74a21=_0x74a21-0xc8;const _0x15754e=a139_0x1575();let _0x49509a=_0x15754e[_0x74a21];return _0x49509a;}const a139_0x505bfa=a139_0x4950;(function(_0xf105db,_0x42c330){const _0x1ae60e=a139_0x4950,_0xab85c5=_0xf105db();while(!![]){try{const _0x1bfc37=-parseInt(_0x1ae60e(0xcd))/0x1*(parseInt(_0x1ae60e(0xca))/0x2)+-parseInt(_0x1ae60e(0xd0))/0x3*(parseInt(_0x1ae60e(0xcc))/0x4)+-parseInt(_0x1ae60e(0xd5))/0x5*(parseInt(_0x1ae60e(0xc8))/0x6)+parseInt(_0x1ae60e(0xc9))/0x7+parseInt(_0x1ae60e(0xd1))/0x8+parseInt(_0x1ae60e(0xd3))/0x9+parseInt(_0x1ae60e(0xce))/0xa*(-parseInt(_0x1ae60e(0xcb))/0xb);if(_0x1bfc37===_0x42c330)break;else _0xab85c5['push'](_0xab85c5['shift']());}catch(_0x3eb916){_0xab85c5['push'](_0xab85c5['shift']());}}}(a139_0x1575,0x530c7));function a139_0x1575(){const _0x290b12=['95SpThQg','996iLMcFD','4678555ckWFck','2BJvXDg','3182245BUjGhs','4plzoom','672188RMznDm','10EWkINZ','compress','81714GGXBUk','1426240aiqvOk','json','4368573vrXUYf','pretty'];a139_0x1575=function(){return _0x290b12;};return a139_0x1575();}export const RABETBASE_OUTPUT_FORMAT_VALUES=[a139_0x505bfa(0xd2),a139_0x505bfa(0xd4),a139_0x505bfa(0xcf)];
1
+ function a139_0x1163(_0x142a17,_0x49badd){_0x142a17=_0x142a17-0xf9;const _0x2ce3f0=a139_0x2ce3();let _0x1163fa=_0x2ce3f0[_0x142a17];return _0x1163fa;}function a139_0x2ce3(){const _0x39be54=['136nsfkqW','28622dvrXCw','compress','16zKjHcp','30EokoYT','516ouxzSc','5HpqRoT','10027470vzswMg','1698403MFYfxT','json','6060258YVsACG','19278cFyHKw','2348MyBoIy','981258LkVJfY'];a139_0x2ce3=function(){return _0x39be54;};return a139_0x2ce3();}const a139_0x5d02d2=a139_0x1163;(function(_0x7728fa,_0x151f9b){const _0x29ebd1=a139_0x1163,_0x320277=_0x7728fa();while(!![]){try{const _0x6648d9=parseInt(_0x29ebd1(0xf9))/0x1*(-parseInt(_0x29ebd1(0xff))/0x2)+-parseInt(_0x29ebd1(0x106))/0x3*(-parseInt(_0x29ebd1(0xfb))/0x4)+parseInt(_0x29ebd1(0x101))/0x5*(-parseInt(_0x29ebd1(0xfa))/0x6)+parseInt(_0x29ebd1(0x103))/0x7+-parseInt(_0x29ebd1(0xfe))/0x8*(-parseInt(_0x29ebd1(0x105))/0x9)+-parseInt(_0x29ebd1(0x102))/0xa+-parseInt(_0x29ebd1(0xfc))/0xb*(-parseInt(_0x29ebd1(0x100))/0xc);if(_0x6648d9===_0x151f9b)break;else _0x320277['push'](_0x320277['shift']());}catch(_0x779739){_0x320277['push'](_0x320277['shift']());}}}(a139_0x2ce3,0xaf585));export const RABETBASE_OUTPUT_FORMAT_VALUES=[a139_0x5d02d2(0x104),'pretty',a139_0x5d02d2(0xfd)];
@@ -1 +1 @@
1
- function a140_0x2424(){const _0x33a921=['312325OnyIxk','148062EiRdOR','861792SsbUqw','102QCDghS','83HfmFNg','36tfZXwd','4203353ypBPfR','1068FenHAd','31394JAFqAb','16624wYFIvZ','5068650KtxaLX','10WUyZUp','371Yvdrpp'];a140_0x2424=function(){return _0x33a921;};return a140_0x2424();}function a140_0x2645(_0x4daf67,_0x43f87e){_0x4daf67=_0x4daf67-0x8e;const _0x24249b=a140_0x2424();let _0x26459a=_0x24249b[_0x4daf67];return _0x26459a;}(function(_0x1a6d18,_0x14a859){const _0x2793c5=a140_0x2645,_0xdc23b2=_0x1a6d18();while(!![]){try{const _0x1f111b=parseInt(_0x2793c5(0x90))/0x1*(parseInt(_0x2793c5(0x94))/0x2)+-parseInt(_0x2793c5(0x8f))/0x3*(-parseInt(_0x2793c5(0x95))/0x4)+parseInt(_0x2793c5(0x96))/0x5+parseInt(_0x2793c5(0x9a))/0x6*(parseInt(_0x2793c5(0x98))/0x7)+-parseInt(_0x2793c5(0x8e))/0x8*(parseInt(_0x2793c5(0x91))/0x9)+parseInt(_0x2793c5(0x97))/0xa*(-parseInt(_0x2793c5(0x92))/0xb)+parseInt(_0x2793c5(0x93))/0xc*(-parseInt(_0x2793c5(0x99))/0xd);if(_0x1f111b===_0x14a859)break;else _0xdc23b2['push'](_0xdc23b2['shift']());}catch(_0x23b52f){_0xdc23b2['push'](_0xdc23b2['shift']());}}}(a140_0x2424,0xc6dba));export const DEFAULT_API_DIR='./src/api';
1
+ function a140_0x1928(_0x4d2375,_0x875b48){_0x4d2375=_0x4d2375-0xf5;const _0x1d30a9=a140_0x1d30();let _0x1928b6=_0x1d30a9[_0x4d2375];return _0x1928b6;}const a140_0x21f03b=a140_0x1928;(function(_0x4dda36,_0x317a83){const _0x3ed3ca=a140_0x1928,_0x3c0ea7=_0x4dda36();while(!![]){try{const _0x2a2f5f=-parseInt(_0x3ed3ca(0xfd))/0x1*(-parseInt(_0x3ed3ca(0xf5))/0x2)+parseInt(_0x3ed3ca(0x100))/0x3*(parseInt(_0x3ed3ca(0x101))/0x4)+-parseInt(_0x3ed3ca(0xfa))/0x5*(parseInt(_0x3ed3ca(0xff))/0x6)+-parseInt(_0x3ed3ca(0xfe))/0x7*(-parseInt(_0x3ed3ca(0xf8))/0x8)+-parseInt(_0x3ed3ca(0xf9))/0x9+-parseInt(_0x3ed3ca(0xf7))/0xa*(-parseInt(_0x3ed3ca(0xf6))/0xb)+-parseInt(_0x3ed3ca(0xfc))/0xc;if(_0x2a2f5f===_0x317a83)break;else _0x3c0ea7['push'](_0x3c0ea7['shift']());}catch(_0x657eb1){_0x3c0ea7['push'](_0x3c0ea7['shift']());}}}(a140_0x1d30,0x1c1c7));export const DEFAULT_API_DIR=a140_0x21f03b(0xfb);function a140_0x1d30(){const _0x5f39c2=['8ZnkOIK','1173105JwtDFr','178010ZcIrpq','./src/api','4376460sSKMfN','7818BfYRkE','1178219VDvzbl','6KiHCJw','222744eEuxPY','12tOqOoO','26PJRxBp','16841smoAcj','1000wrnqHN'];a140_0x1d30=function(){return _0x5f39c2;};return a140_0x1d30();}
@@ -1 +1 @@
1
- const a141_0x49f97b=a141_0x2171;function a141_0x2171(_0x4182b1,_0x1c0fcc){_0x4182b1=_0x4182b1-0x13a;const _0x16d8e3=a141_0x16d8();let _0x217188=_0x16d8e3[_0x4182b1];return _0x217188;}function a141_0x16d8(){const _0x217f5a=['2cgexMt','18155MbQoPD','140631gYrjDY','4103BGKwmb','7kkXiSz','5954940xHEkLN','read','1664592eUXyON','write','high-risk-write','1053222YFbObD','2952632vqrYLJ','204cUJRxU','10870ePOMiA'];a141_0x16d8=function(){return _0x217f5a;};return a141_0x16d8();}(function(_0x3f233c,_0x4d805f){const _0x38c0c4=a141_0x2171,_0x5d5503=_0x3f233c();while(!![]){try{const _0x36bcc6=-parseInt(_0x38c0c4(0x147))/0x1*(-parseInt(_0x38c0c4(0x145))/0x2)+-parseInt(_0x38c0c4(0x141))/0x3+-parseInt(_0x38c0c4(0x143))/0x4*(-parseInt(_0x38c0c4(0x146))/0x5)+-parseInt(_0x38c0c4(0x13e))/0x6*(parseInt(_0x38c0c4(0x13b))/0x7)+-parseInt(_0x38c0c4(0x142))/0x8+parseInt(_0x38c0c4(0x13c))/0x9+-parseInt(_0x38c0c4(0x144))/0xa*(-parseInt(_0x38c0c4(0x13a))/0xb);if(_0x36bcc6===_0x4d805f)break;else _0x5d5503['push'](_0x5d5503['shift']());}catch(_0x256ff3){_0x5d5503['push'](_0x5d5503['shift']());}}}(a141_0x16d8,0x6084a));export const RISK_LEVEL_VALUES=[a141_0x49f97b(0x13d),a141_0x49f97b(0x13f),a141_0x49f97b(0x140)];
1
+ const a141_0x47298d=a141_0x4a5c;(function(_0x52c01f,_0x3e90d9){const _0x2b7501=a141_0x4a5c,_0x447d6a=_0x52c01f();while(!![]){try{const _0x53a729=-parseInt(_0x2b7501(0x69))/0x1*(-parseInt(_0x2b7501(0x6b))/0x2)+parseInt(_0x2b7501(0x6e))/0x3*(parseInt(_0x2b7501(0x65))/0x4)+parseInt(_0x2b7501(0x66))/0x5+-parseInt(_0x2b7501(0x67))/0x6+parseInt(_0x2b7501(0x71))/0x7+-parseInt(_0x2b7501(0x6d))/0x8+-parseInt(_0x2b7501(0x6a))/0x9*(parseInt(_0x2b7501(0x6f))/0xa);if(_0x53a729===_0x3e90d9)break;else _0x447d6a['push'](_0x447d6a['shift']());}catch(_0x1d1225){_0x447d6a['push'](_0x447d6a['shift']());}}}(a141_0x27bc,0x9390c));export const RISK_LEVEL_VALUES=[a141_0x47298d(0x68),a141_0x47298d(0x70),a141_0x47298d(0x6c)];function a141_0x4a5c(_0x26edcd,_0x557072){_0x26edcd=_0x26edcd-0x65;const _0x27bc98=a141_0x27bc();let _0x4a5c38=_0x27bc98[_0x26edcd];return _0x4a5c38;}function a141_0x27bc(){const _0x18f045=['778384MDFFXJ','3147JKCyvI','20nevjwq','write','5753496bmVCEr','828WvmSgC','4295735mkkjRd','6902136xWqCnL','read','9170lMEAxn','4210317ZgkQXV','194dZgNOv','high-risk-write'];a141_0x27bc=function(){return _0x18f045;};return a141_0x27bc();}