@lovrabet/rabetbase-cli 2.3.3 → 2.3.4-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 (220) hide show
  1. package/README.md +99 -560
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/add.js +1 -1
  21. package/lib/commands/app/discover.js +1 -1
  22. package/lib/commands/app/index.js +1 -1
  23. package/lib/commands/app/list.js +1 -1
  24. package/lib/commands/app/remove.js +1 -1
  25. package/lib/commands/app/shared.js +1 -1
  26. package/lib/commands/app-config/delete.js +1 -1
  27. package/lib/commands/app-config/get.js +1 -1
  28. package/lib/commands/app-config/index.js +1 -1
  29. package/lib/commands/app-config/list.js +1 -1
  30. package/lib/commands/app-config/set.js +1 -1
  31. package/lib/commands/app-config/shared.js +1 -1
  32. package/lib/commands/auth/index.js +1 -1
  33. package/lib/commands/bff/create.js +1 -1
  34. package/lib/commands/bff/delete.js +1 -1
  35. package/lib/commands/bff/detail.js +1 -1
  36. package/lib/commands/bff/index.js +1 -1
  37. package/lib/commands/bff/list.js +1 -1
  38. package/lib/commands/bff/pull.js +1 -1
  39. package/lib/commands/bff/push.js +1 -1
  40. package/lib/commands/bff/status.js +1 -1
  41. package/lib/commands/cli-skill/index.js +1 -1
  42. package/lib/commands/cli-update.js +1 -1
  43. package/lib/commands/codegen/index.js +1 -1
  44. package/lib/commands/codegen/sdk.js +1 -1
  45. package/lib/commands/codegen/sql.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/flags.js +1 -1
  48. package/lib/commands/common/validate.js +1 -1
  49. package/lib/commands/config/get.js +1 -1
  50. package/lib/commands/config/index.js +1 -1
  51. package/lib/commands/config/list.js +1 -1
  52. package/lib/commands/config/set.js +1 -1
  53. package/lib/commands/config/shared.js +1 -1
  54. package/lib/commands/data/filter.js +1 -1
  55. package/lib/commands/data/getOne.js +1 -1
  56. package/lib/commands/data/index.js +1 -1
  57. package/lib/commands/data/shared.js +1 -1
  58. package/lib/commands/dataset/business-group-update.js +1 -1
  59. package/lib/commands/dataset/capability.js +1 -1
  60. package/lib/commands/dataset/delete.js +1 -1
  61. package/lib/commands/dataset/detail.js +1 -1
  62. package/lib/commands/dataset/extend-update.js +1 -1
  63. package/lib/commands/dataset/field-update.js +1 -1
  64. package/lib/commands/dataset/generate.js +1 -1
  65. package/lib/commands/dataset/index.js +1 -1
  66. package/lib/commands/dataset/list.js +1 -1
  67. package/lib/commands/dataset/operations.js +1 -1
  68. package/lib/commands/dataset/relation-audit.js +1 -1
  69. package/lib/commands/dataset/relation-create.js +1 -1
  70. package/lib/commands/dataset/relation-delete.js +1 -1
  71. package/lib/commands/dataset/relation-shared.js +1 -1
  72. package/lib/commands/dataset/relation-update.js +1 -1
  73. package/lib/commands/dataset/relations.js +1 -1
  74. package/lib/commands/dataset/rename.js +1 -1
  75. package/lib/commands/dataset/restore.js +1 -1
  76. package/lib/commands/db/analyze-cancel.js +1 -1
  77. package/lib/commands/db/analyze-start.js +1 -1
  78. package/lib/commands/db/analyze-status.js +1 -1
  79. package/lib/commands/db/create.js +1 -1
  80. package/lib/commands/db/delete.js +1 -1
  81. package/lib/commands/db/detail.js +1 -1
  82. package/lib/commands/db/diff.js +1 -1
  83. package/lib/commands/db/index.js +1 -1
  84. package/lib/commands/db/list.js +1 -1
  85. package/lib/commands/db/shared.js +1 -1
  86. package/lib/commands/db/tables.js +1 -1
  87. package/lib/commands/db/test.js +1 -1
  88. package/lib/commands/db/update.js +1 -1
  89. package/lib/commands/doctor.js +1 -1
  90. package/lib/commands/init/index.js +1 -1
  91. package/lib/commands/issue/index.js +1 -1
  92. package/lib/commands/issue/nudge.js +1 -1
  93. package/lib/commands/issue/report.js +1 -1
  94. package/lib/commands/issue/shared.js +1 -1
  95. package/lib/commands/logs/index.js +1 -1
  96. package/lib/commands/menu/index.js +1 -1
  97. package/lib/commands/menu/list.js +1 -1
  98. package/lib/commands/menu/shared/compare-table.js +1 -1
  99. package/lib/commands/menu/shared/index.js +1 -1
  100. package/lib/commands/menu/shared/inquirer.js +1 -1
  101. package/lib/commands/menu/shared/local-pages.js +1 -1
  102. package/lib/commands/menu/shared/logic.js +1 -1
  103. package/lib/commands/menu/shared/service.js +1 -1
  104. package/lib/commands/menu/shared/sync-core.js +1 -1
  105. package/lib/commands/menu/shared/update-core.js +1 -1
  106. package/lib/commands/menu/shared/valid-url.js +1 -1
  107. package/lib/commands/menu/sync.js +1 -1
  108. package/lib/commands/menu/update.js +1 -1
  109. package/lib/commands/page/generate-start.js +1 -1
  110. package/lib/commands/page/generate-status.js +1 -1
  111. package/lib/commands/page/index.js +1 -1
  112. package/lib/commands/page/pull.js +1 -1
  113. package/lib/commands/page/push.js +1 -1
  114. package/lib/commands/page/relation-audit.js +1 -1
  115. package/lib/commands/page/shared.js +1 -1
  116. package/lib/commands/page/standard-page-status.js +1 -1
  117. package/lib/commands/page/sync.js +1 -1
  118. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  119. package/lib/commands/project/create/format-elapsed.js +1 -1
  120. package/lib/commands/project/create/main.js +1 -1
  121. package/lib/commands/project/create/non-interactive.js +1 -1
  122. package/lib/commands/project/create/project-template-path.js +1 -1
  123. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  124. package/lib/commands/project/create/use-format-code.js +1 -1
  125. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  126. package/lib/commands/project/index.js +1 -1
  127. package/lib/commands/project/init.js +1 -1
  128. package/lib/commands/project/upgrade.js +1 -1
  129. package/lib/commands/registry.js +1 -1
  130. package/lib/commands/run/index.js +1 -1
  131. package/lib/commands/schema.js +1 -1
  132. package/lib/commands/sql/create.js +1 -1
  133. package/lib/commands/sql/delete.js +1 -1
  134. package/lib/commands/sql/detail.js +1 -1
  135. package/lib/commands/sql/exec.js +1 -1
  136. package/lib/commands/sql/index.js +1 -1
  137. package/lib/commands/sql/list.js +1 -1
  138. package/lib/commands/sql/pull.js +1 -1
  139. package/lib/commands/sql/push.js +1 -1
  140. package/lib/commands/sql/save.js +1 -1
  141. package/lib/commands/sql/shared.js +1 -1
  142. package/lib/commands/sql/status.js +1 -1
  143. package/lib/commands/sql/validate.js +1 -1
  144. package/lib/commands/workspace/index.js +1 -1
  145. package/lib/config/schema.js +1 -1
  146. package/lib/constant/cdn.js +1 -1
  147. package/lib/constant/cli.js +1 -1
  148. package/lib/constant/defaults.js +1 -1
  149. package/lib/constant/domain.js +1 -1
  150. package/lib/constant/env.js +1 -1
  151. package/lib/constant/output.js +1 -1
  152. package/lib/constant/paths.js +1 -1
  153. package/lib/constant/risk.js +1 -1
  154. package/lib/context/app-resolver.js +1 -1
  155. package/lib/context/auth-resolver.js +1 -1
  156. package/lib/context/config-loader.js +1 -1
  157. package/lib/context.js +1 -1
  158. package/lib/core/alias-resolver.js +1 -1
  159. package/lib/core/api-client.js +1 -1
  160. package/lib/core/bff/config.js +1 -1
  161. package/lib/core/bff/file-system.js +1 -1
  162. package/lib/core/bff/hash.js +1 -1
  163. package/lib/core/bff/lock.js +1 -1
  164. package/lib/core/bff/utils.js +1 -1
  165. package/lib/core/db-resolver.js +1 -1
  166. package/lib/core/page/file-system.js +1 -1
  167. package/lib/core/page/hash.js +1 -1
  168. package/lib/core/page/lock.js +1 -1
  169. package/lib/core/sql-sync/config.js +1 -1
  170. package/lib/core/sql-sync/file-system.js +1 -1
  171. package/lib/core/sql-sync/hash.js +1 -1
  172. package/lib/core/sql-sync/lock.js +1 -1
  173. package/lib/core/sql-sync/utils.js +1 -1
  174. package/lib/core/sql-validator.js +1 -1
  175. package/lib/errors.js +1 -1
  176. package/lib/framework/build-all-flags.js +1 -1
  177. package/lib/framework/flags.js +1 -1
  178. package/lib/framework/help.js +1 -1
  179. package/lib/framework/index.js +1 -1
  180. package/lib/framework/output.js +1 -1
  181. package/lib/framework/response.js +1 -1
  182. package/lib/framework/runner-alias.js +1 -1
  183. package/lib/framework/runner.js +1 -1
  184. package/lib/framework/schema-export.js +1 -1
  185. package/lib/framework/types.js +1 -1
  186. package/lib/generated/build-info.js +1 -1
  187. package/lib/help.js +1 -1
  188. package/lib/skills/main.js +1 -1
  189. package/lib/skills/npx-skills-add.js +1 -1
  190. package/lib/telemetry/cli-command-trace.js +1 -1
  191. package/lib/telemetry/cli-help-trace.js +1 -1
  192. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  193. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  194. package/lib/telemetry/send-cli-trace-log.js +1 -1
  195. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  196. package/lib/utils/ai_config.js +1 -1
  197. package/lib/utils/apply-jq-filter.js +1 -1
  198. package/lib/utils/cdn-config.js +1 -1
  199. package/lib/utils/check-sdk-version.js +1 -1
  200. package/lib/utils/cli-version-check.js +1 -1
  201. package/lib/utils/cli-version-policy.js +1 -1
  202. package/lib/utils/config.js +1 -1
  203. package/lib/utils/copy-directory.js +1 -1
  204. package/lib/utils/entity-with-id.js +1 -1
  205. package/lib/utils/file-utils.js +1 -1
  206. package/lib/utils/guides-cdn.js +1 -1
  207. package/lib/utils/http-client.js +1 -1
  208. package/lib/utils/is-non-interactive.js +1 -1
  209. package/lib/utils/logger.js +1 -1
  210. package/lib/utils/params.js +1 -1
  211. package/lib/utils/platform.js +1 -1
  212. package/lib/utils/rules-cdn.js +1 -1
  213. package/lib/utils/sleep.js +1 -1
  214. package/lib/utils/template-replacer.js +1 -1
  215. package/lib/utils/update-notice.js +1 -1
  216. package/lib/utils/version.js +1 -1
  217. package/lib/utils/with-active-cookie.js +1 -1
  218. package/lib/utils/write-cli-side-channel.js +1 -1
  219. package/package.json +19 -3
  220. package/lib/commands/app/use.js +0 -1
@@ -1 +1 @@
1
- const a139_0xd8b238=a139_0x37f3;(function(_0x709eb5,_0x88f821){const _0x2955b2=a139_0x37f3,_0x6f28e8=_0x709eb5();while(!![]){try{const _0x565134=parseInt(_0x2955b2(0x141))/0x1+parseInt(_0x2955b2(0x110))/0x2*(-parseInt(_0x2955b2(0x100))/0x3)+parseInt(_0x2955b2(0x13b))/0x4*(-parseInt(_0x2955b2(0x142))/0x5)+parseInt(_0x2955b2(0x134))/0x6*(parseInt(_0x2955b2(0x126))/0x7)+-parseInt(_0x2955b2(0x13a))/0x8*(parseInt(_0x2955b2(0x116))/0x9)+parseInt(_0x2955b2(0x119))/0xa+parseInt(_0x2955b2(0x10e))/0xb;if(_0x565134===_0x88f821)break;else _0x6f28e8['push'](_0x6f28e8['shift']());}catch(_0x1b59a8){_0x6f28e8['push'](_0x6f28e8['shift']());}}}(a139_0x5df0,0x96696));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';function a139_0x5df0(){const _0x45877a=['path','replace','Push\x20local\x20SQL\x20files\x20to\x20remote','unchanged','map','1330ihAmFD','\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20','entries','toISOString','validation','message','dbId','sqlCode','length','/smartapi/custom/updateUserCustomSql','trashDir','mode','\x20pushed,\x20','sqlRootDir','8310BJgcpy','force','remoteId','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','startsWith','Local\x20directory\x20\x22','373640PYFdkk','4660804jhMUkl','appCode','filter','join','hash','str','493416hwOoen','5JePJuu','No\x20local\x20SQL\x20files\x20found.','\x22\x20for\x20sqlCode\x20','No\x20database\x20matches\x20local\x20directory\x20\x22','153kYGdJK','bool','POST','projectRoot','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','\x20failed','exec','sqls','sqlRoot','isFinite','sqlcode','sql','sqlName','dbDirectory','10684267xKDunF','\x20SQL\x20file(s)','9316HiKwuA','version','local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first','push','sqlConfig','set','9Igqgkl','lastSync','catch','3376870DaBkjU','relativePath','lockFilePath','get','Push\x20complete:\x20','.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.','dbName','utf8'];a139_0x5df0=function(){return _0x45877a;};return a139_0x5df0();}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(_0x14031e,_0xb4e7a,_0x42b383){const _0x46ab44=a139_0x37f3,_0x4d641e=await scanLocalSqlQueries(_0x14031e),_0x1e0999=new Map();for(const _0x358fd3 of _0x4d641e){if(_0x42b383&&_0x358fd3[_0x46ab44(0x12d)]!==_0x42b383)continue;const _0x2641f7=_0x1e0999[_0x46ab44(0x11c)](_0x358fd3[_0x46ab44(0x12d)])??[];_0x2641f7[_0x46ab44(0x113)](_0x358fd3),_0x1e0999[_0x46ab44(0x115)](_0x358fd3[_0x46ab44(0x12d)],_0x2641f7);}if(_0x42b383&&!_0x1e0999['has'](_0x42b383))throw CliErrors['validation']('Local\x20SQL\x20not\x20found:\x20'+_0x42b383);const _0x4990e9=[];for(const [_0x50cf34,_0x277574]of _0x1e0999[_0x46ab44(0x128)]()){if(_0x277574[_0x46ab44(0x12e)]===0x1){_0x4990e9[_0x46ab44(0x113)](_0x277574[0x0]);continue;}const _0x10532a=_0xb4e7a['sqls'][_0x50cf34],_0x2b3342=_0x10532a?.[_0x46ab44(0x121)],_0x1fb7cf=_0x2b3342?_0x277574['filter'](_0x235d52=>_0x235d52[_0x46ab44(0x11a)]!==_0x2b3342):_0x277574;if(_0x10532a&&_0x1fb7cf[_0x46ab44(0x12e)]===0x1){_0x4990e9['push'](_0x1fb7cf[0x0]);continue;}throw CliErrors[_0x46ab44(0x12a)](_0x46ab44(0x104)+_0x50cf34+_0x46ab44(0x11e));}return _0x4990e9;}export const sqlPush={'service':a139_0xd8b238(0x10b),'command':a139_0xd8b238(0x113),'description':a139_0xd8b238(0x123),'risk':'high-risk-write','flags':[SQLCODE_FLAG_OPTIONAL,{'name':'force','type':'boolean','description':a139_0xd8b238(0x137)}],async 'dryRun'(_0x20c2a3){const _0xc9c6a7=a139_0xd8b238,_0x35e344=loadSqlProjectConfig(_0x20c2a3[_0xc9c6a7(0x13c)]),_0x1b7e95=await readSqlLockFile(_0x35e344[_0xc9c6a7(0x11b)]),{appLock:_0x28dcdf}=ensureSqlLockScope(_0x1b7e95??createEmptySqlLock(),_0x20c2a3[_0xc9c6a7(0x13c)],_0x35e344[_0xc9c6a7(0x108)],_0xc9c6a7(0x113)),_0x2a909e=await getTargetSqlQueries(_0x35e344,_0x28dcdf,_0x20c2a3[_0xc9c6a7(0x140)](_0xc9c6a7(0x10a))||undefined),_0x138370=[];for(const _0x26ffd6 of _0x2a909e){const _0x375662=await computeSqlFileHash(_0x26ffd6['filePath']),_0x1456dd=_0x28dcdf['sqls'][_0x26ffd6['sqlCode']],_0x22e58d=!!_0x1456dd&&(_0x1456dd['path']!==_0x26ffd6['relativePath']||!!_0x26ffd6['sqlName']&&_0x1456dd['sqlName']!==_0x26ffd6[_0xc9c6a7(0x10c)]);if(!_0x20c2a3[_0xc9c6a7(0x101)](_0xc9c6a7(0x135))&&_0x1456dd&&_0x1456dd[_0xc9c6a7(0x13f)]===_0x375662&&!_0x22e58d)continue;_0x138370[_0xc9c6a7(0x113)](_0x26ffd6['sqlCode']);}return{'method':_0xc9c6a7(0x102),'url':_0xc9c6a7(0x12f),'body':{'sqlCodes':_0x138370,'appCode':_0x20c2a3[_0xc9c6a7(0x13c)]},'description':'Would\x20push\x20'+_0x138370['length']+_0xc9c6a7(0x10f)};},async 'execute'(_0x10a2d4){const _0x386a26=a139_0xd8b238,_0x3aecef=loadSqlProjectConfig(_0x10a2d4[_0x386a26(0x13c)]),_0x56d9f7=await readSqlLockFile(_0x3aecef[_0x386a26(0x11b)]),{lockData:_0x1759fe,appLock:_0x1d28d3}=ensureSqlLockScope(_0x56d9f7??createEmptySqlLock(),_0x10a2d4[_0x386a26(0x13c)],_0x3aecef['sqlRoot'],_0x386a26(0x113)),_0x53ae8a=await getTargetSqlQueries(_0x3aecef,_0x1d28d3,_0x10a2d4[_0x386a26(0x140)](_0x386a26(0x10a))||undefined);if(_0x53ae8a['length']===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x386a26(0x143)};const _0x119789=[],_0x1b830a=[],_0x4448a1=[];for(const _0x4464a3 of _0x53ae8a){const _0x5809fd=_0x1d28d3['sqls'][_0x4464a3[_0x386a26(0x12d)]];if(!_0x5809fd){_0x4448a1['push']({'sqlCode':_0x4464a3[_0x386a26(0x12d)],'error':_0x386a26(0x112)});continue;}try{const _0x17c527=await computeSqlFileHash(_0x4464a3['filePath']),_0x2f87dc=_0x5809fd[_0x386a26(0x121)]!==_0x4464a3[_0x386a26(0x11a)]||!!_0x4464a3['sqlName']&&_0x5809fd[_0x386a26(0x10c)]!==_0x4464a3[_0x386a26(0x10c)];if(!_0x10a2d4[_0x386a26(0x101)](_0x386a26(0x135))&&_0x5809fd['hash']===_0x17c527&&!_0x2f87dc){_0x1b830a[_0x386a26(0x113)]({'sqlCode':_0x4464a3[_0x386a26(0x12d)],'reason':_0x386a26(0x124)});continue;}if(_0x5809fd[_0x386a26(0x111)]==null){_0x4448a1['push']({'sqlCode':_0x4464a3[_0x386a26(0x12d)],'error':'missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first'});continue;}const _0x5ee1d7=await readFile(_0x4464a3['filePath'],_0x386a26(0x120)),_0x19cd52=stripLocalSqlMetadata(_0x5ee1d7,_0x4464a3[_0x386a26(0x131)]),_0xa2ba8d=_0x4464a3[_0x386a26(0x10c)]||_0x5809fd[_0x386a26(0x10c)],_0x2759b8=await resolveTargetDbBinding(_0x10a2d4['appCode'],_0x4464a3,_0x5809fd),_0xe4be56=await updateSqlQuery({'id':_0x5809fd[_0x386a26(0x136)],'appCode':_0x10a2d4[_0x386a26(0x13c)],'sqlCode':_0x4464a3[_0x386a26(0x12d)],'sqlName':_0xa2ba8d,'dbId':_0x2759b8[_0x386a26(0x12c)],'version':_0x5809fd['version'],'sqlContent':_0x19cd52,'sqlConfig':_0x5809fd[_0x386a26(0x114)]??undefined}),_0x54d8a8=_0xe4be56['dbId']?await getDbName(_0x10a2d4[_0x386a26(0x13c)],Number(_0xe4be56['dbId']))[_0x386a26(0x118)](()=>_0x2759b8[_0x386a26(0x11f)]):_0x2759b8['dbName'];_0x1d28d3[_0x386a26(0x107)][_0x4464a3[_0x386a26(0x12d)]]={...buildSqlLockEntry(_0xe4be56,_0x19cd52,_0x17c527,{'dbName':_0x54d8a8}),'path':_0x4464a3['relativePath'],'mode':_0x5809fd[_0x386a26(0x131)]},await archivePreviousSqlFileIfNeeded(_0x3aecef,_0x5809fd['path'],_0x4464a3[_0x386a26(0x11a)]),_0x119789[_0x386a26(0x113)]({'sqlCode':_0x4464a3[_0x386a26(0x12d)],'remoteId':_0x5809fd['remoteId']});}catch(_0x363476){_0x4448a1[_0x386a26(0x113)]({'sqlCode':_0x4464a3[_0x386a26(0x12d)],'error':_0x363476 instanceof Error?_0x363476[_0x386a26(0x12b)]:String(_0x363476)});}}return _0x1d28d3[_0x386a26(0x117)]=new Date()[_0x386a26(0x129)](),await writeSqlLockFile(_0x3aecef[_0x386a26(0x11b)],_0x1759fe),{'ok':_0x4448a1[_0x386a26(0x12e)]===0x0,'data':{'pushed':_0x119789,'skipped':_0x1b830a,'failed':_0x4448a1},'message':_0x386a26(0x11d)+_0x119789['length']+_0x386a26(0x132)+_0x1b830a[_0x386a26(0x12e)]+'\x20skipped,\x20'+_0x4448a1['length']+_0x386a26(0x105)};}};function a139_0x37f3(_0x46c74c,_0x22e501){_0x46c74c=_0x46c74c-0x100;const _0x5df063=a139_0x5df0();let _0x37f364=_0x5df063[_0x46c74c];return _0x37f364;}async function archivePreviousSqlFileIfNeeded(_0x3fa40a,_0x14c095,_0x345411){const _0x58dfe1=a139_0xd8b238;if(!_0x14c095||_0x14c095===_0x345411)return;const _0x37c94c=join(_0x3fa40a[_0x58dfe1(0x133)],_0x14c095);if(!await fileExists(_0x37c94c))return;const _0x208e6b=await moveToTrash(_0x3fa40a[_0x58dfe1(0x103)],_0x3fa40a[_0x58dfe1(0x130)],_0x37c94c);await cleanupEmptyDirectories(dirname(_0x37c94c),_0x3fa40a[_0x58dfe1(0x133)]),void _0x208e6b;}async function moveToTrash(_0x4b80a4,_0x40ee4c,_0x41d31e){const _0x4d995c=a139_0xd8b238,_0x32ce13=new Date()[_0x4d995c(0x129)]()[_0x4d995c(0x122)](/[:.]/g,'-'),_0x487378=relative(_0x4b80a4,_0x41d31e),_0xe7e9e7=join(_0x40ee4c,_0x32ce13,_0x487378);return await mkdir(dirname(_0xe7e9e7),{'recursive':!![]}),await rename(_0x41d31e,_0xe7e9e7),_0xe7e9e7;}async function cleanupEmptyDirectories(_0x22e859,_0x18c90c){const _0x2d01a3=a139_0xd8b238;let _0x388333=resolve(_0x22e859);const _0x341bf3=resolve(_0x18c90c);while(_0x388333[_0x2d01a3(0x138)](''+_0x341bf3+sep)||_0x388333===_0x341bf3){if(_0x388333===_0x341bf3)return;try{const _0x537bd1=await readdir(_0x388333);if(_0x537bd1[_0x2d01a3(0x12e)]>0x0)return;await rmdir(_0x388333);}catch{return;}_0x388333=dirname(_0x388333);}}async function resolveTargetDbBinding(_0x39473b,_0x1878fe,_0x260e7e){const _0x1eefe0=a139_0xd8b238,_0x1103b9=_0x1878fe[_0x1eefe0(0x10d)];if(!_0x1103b9)return{'dbId':_0x260e7e[_0x1eefe0(0x12c)],'dbName':_0x260e7e[_0x1eefe0(0x11f)]};const _0x1b76b7=buildDbDirectoryName(_0x260e7e[_0x1eefe0(0x11f)],_0x260e7e[_0x1eefe0(0x12c)]);if(_0x1103b9===_0x1b76b7)return{'dbId':_0x260e7e[_0x1eefe0(0x12c)],'dbName':_0x260e7e[_0x1eefe0(0x11f)]};const _0x6df82c=parseExplicitDbDirectory(_0x1103b9);if(_0x6df82c!=null)return{'dbId':_0x6df82c,'dbName':await getDbName(_0x39473b,_0x6df82c)[_0x1eefe0(0x118)](()=>undefined)};const _0x2a2b4c=await listDatabases(_0x39473b),_0x46ad2c=_0x2a2b4c[_0x1eefe0(0x13d)](_0x1034e2=>buildDbDirectoryName(_0x1034e2['dbName'],_0x1034e2['dbId'])===_0x1103b9);if(_0x46ad2c[_0x1eefe0(0x12e)]===0x1)return{'dbId':_0x46ad2c[0x0]['dbId'],'dbName':_0x46ad2c[0x0][_0x1eefe0(0x11f)]};if(_0x46ad2c['length']===0x0)throw CliErrors[_0x1eefe0(0x12a)](_0x1eefe0(0x145)+_0x1103b9+_0x1eefe0(0x144)+_0x1878fe[_0x1eefe0(0x12d)]+'.');const _0x106dab=_0x46ad2c[_0x1eefe0(0x125)](_0x35be2d=>_0x35be2d[_0x1eefe0(0x11f)]+'\x20('+_0x35be2d[_0x1eefe0(0x12c)]+')')[_0x1eefe0(0x13e)](',\x20');throw CliErrors[_0x1eefe0(0x12a)](_0x1eefe0(0x139)+_0x1103b9+_0x1eefe0(0x127)+_0x1878fe[_0x1eefe0(0x12d)]+':\x20'+_0x106dab);}function parseExplicitDbDirectory(_0x11872d){const _0xe01889=a139_0xd8b238,_0x7147f1=/^db-(\d+)$/[_0xe01889(0x106)](_0x11872d);if(!_0x7147f1)return null;const _0x323320=Number(_0x7147f1[0x1]);return Number[_0xe01889(0x109)](_0x323320)&&_0x323320>0x0?_0x323320:null;}
1
+ const a138_0x2d39ec=a138_0xbdbd;(function(_0x371292,_0x5c4607){const _0xb81963=a138_0xbdbd,_0x493e42=_0x371292();while(!![]){try{const _0x186167=parseInt(_0xb81963(0x11e))/0x1*(parseInt(_0xb81963(0x116))/0x2)+parseInt(_0xb81963(0xf2))/0x3+-parseInt(_0xb81963(0xff))/0x4+-parseInt(_0xb81963(0xe8))/0x5+-parseInt(_0xb81963(0x10b))/0x6+-parseInt(_0xb81963(0xeb))/0x7*(parseInt(_0xb81963(0x10e))/0x8)+parseInt(_0xb81963(0xfa))/0x9;if(_0x186167===_0x5c4607)break;else _0x493e42['push'](_0x493e42['shift']());}catch(_0xfb77a3){_0x493e42['push'](_0x493e42['shift']());}}}(a138_0x5107,0x77ad2));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';function a138_0xbdbd(_0x31bbb5,_0x1ccb40){_0x31bbb5=_0x31bbb5-0xe4;const _0x5107d0=a138_0x5107();let _0xbdbd4e=_0x5107d0[_0x31bbb5];return _0xbdbd4e;}import{buildDbDirectoryName}from'../../core/sql-sync/utils.js';async function getTargetSqlQueries(_0x462dd1,_0x1aa153,_0x111054){const _0x22c2ab=a138_0xbdbd,_0x5ced8f=await scanLocalSqlQueries(_0x462dd1),_0x3353f1=new Map();for(const _0x44196e of _0x5ced8f){if(_0x111054&&_0x44196e['sqlCode']!==_0x111054)continue;const _0x435083=_0x3353f1['get'](_0x44196e[_0x22c2ab(0xec)])??[];_0x435083[_0x22c2ab(0xfd)](_0x44196e),_0x3353f1[_0x22c2ab(0x105)](_0x44196e[_0x22c2ab(0xec)],_0x435083);}if(_0x111054&&!_0x3353f1[_0x22c2ab(0x100)](_0x111054))throw CliErrors['validation'](_0x22c2ab(0xfe)+_0x111054);const _0x11595e=[];for(const [_0x12f164,_0x2560bd]of _0x3353f1[_0x22c2ab(0xf9)]()){if(_0x2560bd[_0x22c2ab(0x115)]===0x1){_0x11595e['push'](_0x2560bd[0x0]);continue;}const _0x782912=_0x1aa153[_0x22c2ab(0xef)][_0x12f164],_0x36484c=_0x782912?.[_0x22c2ab(0xf8)],_0x69e61c=_0x36484c?_0x2560bd[_0x22c2ab(0x10a)](_0x547104=>_0x547104['relativePath']!==_0x36484c):_0x2560bd;if(_0x782912&&_0x69e61c[_0x22c2ab(0x115)]===0x1){_0x11595e['push'](_0x69e61c[0x0]);continue;}throw CliErrors[_0x22c2ab(0xfb)](_0x22c2ab(0xee)+_0x12f164+'.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.');}return _0x11595e;}export const sqlPush={'service':a138_0x2d39ec(0x113),'command':a138_0x2d39ec(0xfd),'description':'Push\x20local\x20SQL\x20files\x20to\x20remote','risk':a138_0x2d39ec(0x11f),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':'force','type':a138_0x2d39ec(0xea),'description':'Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock'}],async 'dryRun'(_0x47efe9){const _0x480e97=a138_0x2d39ec,_0x21a88a=loadSqlProjectConfig(_0x47efe9['appCode']),_0x45d866=await readSqlLockFile(_0x21a88a[_0x480e97(0xe5)]),{appLock:_0x4d7995}=ensureSqlLockScope(_0x45d866??createEmptySqlLock(),_0x47efe9[_0x480e97(0xf0)],_0x21a88a[_0x480e97(0x11d)],'push'),_0x423a6c=await getTargetSqlQueries(_0x21a88a,_0x4d7995,_0x47efe9[_0x480e97(0x10c)](_0x480e97(0x111))||undefined),_0x12f9ef=[];for(const _0x736700 of _0x423a6c){const _0x22b93e=await computeSqlFileHash(_0x736700[_0x480e97(0xf3)]),_0x12d5d4=_0x4d7995['sqls'][_0x736700[_0x480e97(0xec)]],_0x1625c0=!!_0x12d5d4&&(_0x12d5d4[_0x480e97(0xf8)]!==_0x736700['relativePath']||!!_0x736700[_0x480e97(0xe7)]&&_0x12d5d4[_0x480e97(0xe7)]!==_0x736700[_0x480e97(0xe7)]);if(!_0x47efe9[_0x480e97(0x11a)](_0x480e97(0x112))&&_0x12d5d4&&_0x12d5d4[_0x480e97(0x106)]===_0x22b93e&&!_0x1625c0)continue;_0x12f9ef[_0x480e97(0xfd)](_0x736700['sqlCode']);}return{'method':_0x480e97(0x102),'url':'/smartapi/custom/updateUserCustomSql','body':{'sqlCodes':_0x12f9ef,'appCode':_0x47efe9[_0x480e97(0xf0)]},'description':'Would\x20push\x20'+_0x12f9ef['length']+'\x20SQL\x20file(s)'};},async 'execute'(_0x1572fc){const _0x26bdee=a138_0x2d39ec,_0x9a77d1=loadSqlProjectConfig(_0x1572fc[_0x26bdee(0xf0)]),_0x27249f=await readSqlLockFile(_0x9a77d1[_0x26bdee(0xe5)]),{lockData:_0x3c97ab,appLock:_0x1cedf5}=ensureSqlLockScope(_0x27249f??createEmptySqlLock(),_0x1572fc[_0x26bdee(0xf0)],_0x9a77d1[_0x26bdee(0x11d)],'push'),_0x2efb9e=await getTargetSqlQueries(_0x9a77d1,_0x1cedf5,_0x1572fc['str']('sqlcode')||undefined);if(_0x2efb9e['length']===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':'No\x20local\x20SQL\x20files\x20found.'};const _0x17b03d=[],_0x243fb5=[],_0x4af279=[];for(const _0x31a130 of _0x2efb9e){const _0x36dbb7=_0x1cedf5[_0x26bdee(0xef)][_0x31a130[_0x26bdee(0xec)]];if(!_0x36dbb7){_0x4af279[_0x26bdee(0xfd)]({'sqlCode':_0x31a130[_0x26bdee(0xec)],'error':_0x26bdee(0xed)});continue;}try{const _0x2ee3e2=await computeSqlFileHash(_0x31a130[_0x26bdee(0xf3)]),_0x4246f9=_0x36dbb7[_0x26bdee(0xf8)]!==_0x31a130['relativePath']||!!_0x31a130[_0x26bdee(0xe7)]&&_0x36dbb7[_0x26bdee(0xe7)]!==_0x31a130[_0x26bdee(0xe7)];if(!_0x1572fc[_0x26bdee(0x11a)](_0x26bdee(0x112))&&_0x36dbb7['hash']===_0x2ee3e2&&!_0x4246f9){_0x243fb5[_0x26bdee(0xfd)]({'sqlCode':_0x31a130['sqlCode'],'reason':_0x26bdee(0x11b)});continue;}if(_0x36dbb7[_0x26bdee(0xf4)]==null){_0x4af279[_0x26bdee(0xfd)]({'sqlCode':_0x31a130['sqlCode'],'error':'missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first'});continue;}const _0x555d13=await readFile(_0x31a130[_0x26bdee(0xf3)],'utf8'),_0x470e7a=stripLocalSqlMetadata(_0x555d13,_0x31a130[_0x26bdee(0x104)]),_0x2ec810=_0x31a130[_0x26bdee(0xe7)]||_0x36dbb7['sqlName'],_0x12b13e=await resolveTargetDbBinding(_0x1572fc[_0x26bdee(0xf0)],_0x31a130,_0x36dbb7),_0x19137a=await updateSqlQuery({'id':_0x36dbb7[_0x26bdee(0x10f)],'appCode':_0x1572fc[_0x26bdee(0xf0)],'sqlCode':_0x31a130[_0x26bdee(0xec)],'sqlName':_0x2ec810,'dbId':_0x12b13e['dbId'],'version':_0x36dbb7[_0x26bdee(0xf4)],'sqlContent':_0x470e7a,'sqlConfig':_0x36dbb7[_0x26bdee(0xf6)]??undefined}),_0x430c51=_0x19137a[_0x26bdee(0x117)]?await getDbName(_0x1572fc[_0x26bdee(0xf0)],Number(_0x19137a[_0x26bdee(0x117)]))[_0x26bdee(0x103)](()=>_0x12b13e[_0x26bdee(0x119)]):_0x12b13e[_0x26bdee(0x119)];_0x1cedf5[_0x26bdee(0xef)][_0x31a130[_0x26bdee(0xec)]]={...buildSqlLockEntry(_0x19137a,_0x470e7a,_0x2ee3e2,{'dbName':_0x430c51}),'path':_0x31a130[_0x26bdee(0x10d)],'mode':_0x36dbb7['mode']},await archivePreviousSqlFileIfNeeded(_0x9a77d1,_0x36dbb7[_0x26bdee(0xf8)],_0x31a130[_0x26bdee(0x10d)]),_0x17b03d[_0x26bdee(0xfd)]({'sqlCode':_0x31a130[_0x26bdee(0xec)],'remoteId':_0x36dbb7[_0x26bdee(0x10f)]});}catch(_0x597be0){_0x4af279[_0x26bdee(0xfd)]({'sqlCode':_0x31a130[_0x26bdee(0xec)],'error':_0x597be0 instanceof Error?_0x597be0['message']:String(_0x597be0)});}}return _0x1cedf5[_0x26bdee(0xf1)]=new Date()[_0x26bdee(0xfc)](),await writeSqlLockFile(_0x9a77d1[_0x26bdee(0xe5)],_0x3c97ab),{'ok':_0x4af279[_0x26bdee(0x115)]===0x0,'data':{'pushed':_0x17b03d,'skipped':_0x243fb5,'failed':_0x4af279},'message':_0x26bdee(0x108)+_0x17b03d['length']+_0x26bdee(0x11c)+_0x243fb5[_0x26bdee(0x115)]+_0x26bdee(0x110)+_0x4af279[_0x26bdee(0x115)]+_0x26bdee(0xe4)};}};async function archivePreviousSqlFileIfNeeded(_0x4af167,_0xb9a134,_0x127861){const _0xea662d=a138_0x2d39ec;if(!_0xb9a134||_0xb9a134===_0x127861)return;const _0x4a60bc=join(_0x4af167[_0xea662d(0x107)],_0xb9a134);if(!await fileExists(_0x4a60bc))return;const _0xead643=await moveToTrash(_0x4af167[_0xea662d(0x101)],_0x4af167[_0xea662d(0xf5)],_0x4a60bc);await cleanupEmptyDirectories(dirname(_0x4a60bc),_0x4af167[_0xea662d(0x107)]),void _0xead643;}async function moveToTrash(_0x3e743a,_0x4ef95a,_0x26453a){const _0x474d1b=a138_0x2d39ec,_0x14ab64=new Date()[_0x474d1b(0xfc)]()[_0x474d1b(0x109)](/[:.]/g,'-'),_0x2facda=relative(_0x3e743a,_0x26453a),_0x43c8fa=join(_0x4ef95a,_0x14ab64,_0x2facda);return await mkdir(dirname(_0x43c8fa),{'recursive':!![]}),await rename(_0x26453a,_0x43c8fa),_0x43c8fa;}async function cleanupEmptyDirectories(_0xdd7168,_0x508adf){let _0x40107d=resolve(_0xdd7168);const _0x2f6ed7=resolve(_0x508adf);while(_0x40107d['startsWith'](''+_0x2f6ed7+sep)||_0x40107d===_0x2f6ed7){if(_0x40107d===_0x2f6ed7)return;try{const _0x5e915a=await readdir(_0x40107d);if(_0x5e915a['length']>0x0)return;await rmdir(_0x40107d);}catch{return;}_0x40107d=dirname(_0x40107d);}}async function resolveTargetDbBinding(_0x14a324,_0x4b086a,_0x784051){const _0x4b5d44=a138_0x2d39ec,_0x2a2b99=_0x4b086a[_0x4b5d44(0xf7)];if(!_0x2a2b99)return{'dbId':_0x784051[_0x4b5d44(0x117)],'dbName':_0x784051[_0x4b5d44(0x119)]};const _0x54ea6d=buildDbDirectoryName(_0x784051[_0x4b5d44(0x119)],_0x784051['dbId']);if(_0x2a2b99===_0x54ea6d)return{'dbId':_0x784051[_0x4b5d44(0x117)],'dbName':_0x784051[_0x4b5d44(0x119)]};const _0x415b87=parseExplicitDbDirectory(_0x2a2b99);if(_0x415b87!=null)return{'dbId':_0x415b87,'dbName':await getDbName(_0x14a324,_0x415b87)[_0x4b5d44(0x103)](()=>undefined)};const _0x5732f5=await listDatabases(_0x14a324),_0x15e5c3=_0x5732f5['filter'](_0xec0d20=>buildDbDirectoryName(_0xec0d20[_0x4b5d44(0x119)],_0xec0d20[_0x4b5d44(0x117)])===_0x2a2b99);if(_0x15e5c3['length']===0x1)return{'dbId':_0x15e5c3[0x0][_0x4b5d44(0x117)],'dbName':_0x15e5c3[0x0]['dbName']};if(_0x15e5c3['length']===0x0)throw CliErrors[_0x4b5d44(0xfb)]('No\x20database\x20matches\x20local\x20directory\x20\x22'+_0x2a2b99+_0x4b5d44(0x114)+_0x4b086a[_0x4b5d44(0xec)]+'.');const _0x5e0c79=_0x15e5c3['map'](_0x2cf025=>_0x2cf025['dbName']+'\x20('+_0x2cf025['dbId']+')')[_0x4b5d44(0xe9)](',\x20');throw CliErrors[_0x4b5d44(0xfb)]('Local\x20directory\x20\x22'+_0x2a2b99+'\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20'+_0x4b086a[_0x4b5d44(0xec)]+':\x20'+_0x5e0c79);}function parseExplicitDbDirectory(_0x26887a){const _0x631ea9=a138_0x2d39ec,_0x2876f3=/^db-(\d+)$/[_0x631ea9(0x118)](_0x26887a);if(!_0x2876f3)return null;const _0x1bce02=Number(_0x2876f3[0x1]);return Number[_0x631ea9(0xe6)](_0x1bce02)&&_0x1bce02>0x0?_0x1bce02:null;}function a138_0x5107(){const _0x61f6f2=['has','projectRoot','POST','catch','mode','set','hash','sqlRootDir','Push\x20complete:\x20','replace','filter','2779560avdvLk','str','relativePath','8fwWBtO','remoteId','\x20skipped,\x20','sqlcode','force','sql','\x22\x20for\x20sqlCode\x20','length','30CtWFwm','dbId','exec','dbName','bool','unchanged','\x20pushed,\x20','sqlRoot','1298vnVzdW','high-risk-write','\x20failed','lockFilePath','isFinite','sqlName','3647175eUuEIO','join','boolean','2573207mZUdYO','sqlCode','local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','sqls','appCode','lastSync','2066943nkhDNP','filePath','version','trashDir','sqlConfig','dbDirectory','path','entries','15244551iKOPNv','validation','toISOString','push','Local\x20SQL\x20not\x20found:\x20','1407200JtVGGn'];a138_0x5107=function(){return _0x61f6f2;};return a138_0x5107();}
@@ -1 +1 @@
1
- const a140_0xb38a7c=a140_0x3da1;(function(_0x4a5741,_0x3b811a){const _0x1699f7=a140_0x3da1,_0x30290f=_0x4a5741();while(!![]){try{const _0x55d6b2=parseInt(_0x1699f7(0xe4))/0x1+parseInt(_0x1699f7(0xe0))/0x2+parseInt(_0x1699f7(0xf0))/0x3*(parseInt(_0x1699f7(0xef))/0x4)+-parseInt(_0x1699f7(0xf4))/0x5+parseInt(_0x1699f7(0xec))/0x6*(parseInt(_0x1699f7(0xe7))/0x7)+-parseInt(_0x1699f7(0xe1))/0x8*(parseInt(_0x1699f7(0xe9))/0x9)+-parseInt(_0x1699f7(0xdf))/0xa;if(_0x55d6b2===_0x3b811a)break;else _0x30290f['push'](_0x30290f['shift']());}catch(_0x29d01f){_0x30290f['push'](_0x30290f['shift']());}}}(a140_0x5d07,0x2d551));function a140_0x5d07(){const _0x4a123a=['87xgHLgM','`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.','Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.','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`.','1357270Brakph','1563750nmigEa','490856srrPnQ','303776yJZETj','file','sqlname','223984eOBdFs','validation','Path\x20to\x20the\x20SQL\x20file','10493bAhXOo','description','63bQIsUE','string','Query\x20description','1014uwjkYL','SQL\x20query\x20display\x20name','Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','21596rekPBo'];a140_0x5d07=function(){return _0x4a123a;};return a140_0x5d07();}import{CliErrors}from'../../errors.js';function a140_0x3da1(_0x36f1bf,_0x1a16e8){_0x36f1bf=_0x36f1bf-0xdf;const _0x5d0710=a140_0x5d07();let _0x3da1ca=_0x5d0710[_0x36f1bf];return _0x3da1ca;}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const SQL_SAVE_DEPRECATED_HINT=[a140_0xb38a7c(0xf1),a140_0xb38a7c(0xf2),a140_0xb38a7c(0xf3)]['join']('\x0a');export const sqlSave={'service':'sql','command':'save','description':a140_0xb38a7c(0xee),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a140_0xb38a7c(0xe2),'type':a140_0xb38a7c(0xea),'required':!![],'description':a140_0xb38a7c(0xe6)},SQLCODE_FLAG_OPTIONAL,{'name':a140_0xb38a7c(0xe3),'type':a140_0xb38a7c(0xea),'description':a140_0xb38a7c(0xed)},{'name':'db','type':a140_0xb38a7c(0xea),'description':'Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)'},{'name':a140_0xb38a7c(0xe8),'type':a140_0xb38a7c(0xea),'description':a140_0xb38a7c(0xeb)}],async 'validate'(){const _0x419f69=a140_0xb38a7c;throw CliErrors[_0x419f69(0xe5)](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){const _0x598365=a140_0xb38a7c;throw CliErrors[_0x598365(0xe5)](SQL_SAVE_DEPRECATED_HINT);}};
1
+ const a139_0x2dd907=a139_0xdae1;(function(_0x41876c,_0x4fe56d){const _0x421a48=a139_0xdae1,_0x5372d7=_0x41876c();while(!![]){try{const _0xdedf71=-parseInt(_0x421a48(0xa8))/0x1+-parseInt(_0x421a48(0xac))/0x2+parseInt(_0x421a48(0xa2))/0x3*(parseInt(_0x421a48(0xa5))/0x4)+-parseInt(_0x421a48(0xa0))/0x5+-parseInt(_0x421a48(0xaa))/0x6*(-parseInt(_0x421a48(0xa3))/0x7)+-parseInt(_0x421a48(0xa9))/0x8+parseInt(_0x421a48(0xb0))/0x9;if(_0xdedf71===_0x4fe56d)break;else _0x5372d7['push'](_0x5372d7['shift']());}catch(_0x12474e){_0x5372d7['push'](_0x5372d7['shift']());}}}(a139_0x1620,0x3af9e));import{CliErrors}from'../../errors.js';function a139_0xdae1(_0x315cec,_0xd709a2){_0x315cec=_0x315cec-0x9a;const _0x1620da=a139_0x1620();let _0xdae1d3=_0x1620da[_0x315cec];return _0xdae1d3;}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const SQL_SAVE_DEPRECATED_HINT=['`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.',a139_0x2dd907(0x9a),a139_0x2dd907(0xae)][a139_0x2dd907(0x9e)]('\x0a');function a139_0x1620(){const _0xea9f9=['write','447540sVDOPe','SQL\x20query\x20display\x20name','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`.','string','6050583fJJkRN','Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.','save','Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','join','file','1452430rzPJmf','Path\x20to\x20the\x20SQL\x20file','21VBPSQL','14RGgbtv','Query\x20description','252544KyTyiC','sqlname','sql','461781KKgVfp','26880rOcAjF','320172jrZAZJ'];a139_0x1620=function(){return _0xea9f9;};return a139_0x1620();}export const sqlSave={'service':a139_0x2dd907(0xa7),'command':a139_0x2dd907(0x9b),'description':a139_0x2dd907(0x9c),'risk':a139_0x2dd907(0xab),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a139_0x2dd907(0x9f),'type':a139_0x2dd907(0xaf),'required':!![],'description':a139_0x2dd907(0xa1)},SQLCODE_FLAG_OPTIONAL,{'name':a139_0x2dd907(0xa6),'type':a139_0x2dd907(0xaf),'description':a139_0x2dd907(0xad)},{'name':'db','type':a139_0x2dd907(0xaf),'description':a139_0x2dd907(0x9d)},{'name':'description','type':a139_0x2dd907(0xaf),'description':a139_0x2dd907(0xa4)}],async 'validate'(){throw CliErrors['validation'](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){throw CliErrors['validation'](SQL_SAVE_DEPRECATED_HINT);}};
@@ -1 +1 @@
1
- const a141_0x369f6a=a141_0x4faf;(function(_0x11672f,_0x328a49){const _0x25ccbe=a141_0x4faf,_0x30dd96=_0x11672f();while(!![]){try{const _0xe8bc0c=parseInt(_0x25ccbe(0x163))/0x1+-parseInt(_0x25ccbe(0x142))/0x2+parseInt(_0x25ccbe(0x169))/0x3*(parseInt(_0x25ccbe(0x14b))/0x4)+parseInt(_0x25ccbe(0x14a))/0x5+-parseInt(_0x25ccbe(0x166))/0x6+-parseInt(_0x25ccbe(0x161))/0x7*(-parseInt(_0x25ccbe(0x13e))/0x8)+parseInt(_0x25ccbe(0x150))/0x9;if(_0xe8bc0c===_0x328a49)break;else _0x30dd96['push'](_0x30dd96['shift']());}catch(_0x29253f){_0x30dd96['push'](_0x30dd96['shift']());}}}(a141_0x5c2e,0xcc292));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=a141_0x369f6a(0x146);function a141_0x4faf(_0x559b34,_0x3d4cca){_0x559b34=_0x559b34-0x13d;const _0x5c2eb7=a141_0x5c2e();let _0x4faf4a=_0x5c2eb7[_0x559b34];return _0x4faf4a;}export function buildSqlLockEntry(_0x5537d5,_0x297e5d,_0x5732cd,_0x20f7b6){const _0x5346bb=a141_0x369f6a,_0x2cc664=detectSqlMode(_0x297e5d);return{'path':buildSqlRelativePath(_0x5537d5[_0x5346bb(0x160)],_0x5537d5[_0x5346bb(0x159)],_0x20f7b6?.['dbName'],_0x2cc664,_0x5537d5[_0x5346bb(0x149)]),'hash':_0x5732cd,'remoteId':_0x5537d5['id'],'version':_0x5537d5[_0x5346bb(0x152)],'dbId':Number(_0x5537d5[_0x5346bb(0x149)]),'dbName':_0x20f7b6?.[_0x5346bb(0x162)],'sqlName':_0x5537d5[_0x5346bb(0x159)],'sqlConfig':_0x5537d5[_0x5346bb(0x155)]??undefined,'mode':_0x2cc664};}export function cloneSqlLockData(_0x95016e){const _0xb1aa68=a141_0x369f6a;return{'apps':Object[_0xb1aa68(0x158)](Object[_0xb1aa68(0x14e)](_0x95016e[_0xb1aa68(0x15e)])[_0xb1aa68(0x154)](([_0x2be884,_0x3c012c])=>[_0x2be884,{'sqlRoot':_0x3c012c[_0xb1aa68(0x148)],'lastSync':_0x3c012c[_0xb1aa68(0x15f)],'sqls':{..._0x3c012c[_0xb1aa68(0x15c)]}}]))};}export function ensureRemoteSqlContent(_0x5ada81){const _0x4a39e3=a141_0x369f6a;return _0x5ada81[_0x4a39e3(0x165)]??'';}export function buildLocalSqlFileContent(_0x8b90b,_0x831eea,_0x267e0f){const _0xf24982=a141_0x369f6a,_0x3500b8=_0x267e0f?.[_0xf24982(0x14d)]??detectSqlMode(_0x831eea),_0x5ba5f0=stripLocalSqlMetadata(_0x831eea,_0x3500b8)['trim'](),_0x51b000=[...buildMetadataHeaderLines({'sqlCode':_0x8b90b[_0xf24982(0x160)],'sqlName':_0x8b90b['sqlName'],'dbId':_0x8b90b[_0xf24982(0x149)],'dbName':_0x267e0f?.[_0xf24982(0x162)],'mode':_0x3500b8,'syncedAt':_0x267e0f?.[_0xf24982(0x167)],'description':_0x267e0f?.[_0xf24982(0x13d)]},_0x3500b8),'',_0x5ba5f0],_0x4bed7a=_0x51b000[_0xf24982(0x157)]('\x0a');return _0x4bed7a[_0xf24982(0x16a)]('\x0a')?_0x4bed7a:_0x4bed7a+'\x0a';}export function stripLocalSqlMetadata(_0x39efbf,_0x13cd19){const _0x1dc8ec=a141_0x369f6a,_0x100a95=_0x39efbf[_0x1dc8ec(0x145)](/\r\n/g,'\x0a')[_0x1dc8ec(0x144)]('\x0a'),_0x3378b9=[];let _0x314170=0x0;if(_0x13cd19===_0x1dc8ec(0x15b))while(_0x314170<_0x100a95['length']){const _0xbbeafa=_0x100a95[_0x314170]??'';if(/^\s*<!--\s*@lovrabet\./[_0x1dc8ec(0x15a)](_0xbbeafa)){_0x314170++;continue;}if(_0xbbeafa[_0x1dc8ec(0x14c)]()===''&&_0x314170>0x0){_0x314170++;continue;}break;}else while(_0x314170<_0x100a95['length']){const _0x5bee35=_0x100a95[_0x314170]??'';if(/^\s*--\s*@lovrabet\./['test'](_0x5bee35)){_0x314170++;continue;}if(_0x5bee35[_0x1dc8ec(0x14c)]()===''&&_0x314170>0x0){_0x314170++;continue;}break;}for(;_0x314170<_0x100a95[_0x1dc8ec(0x140)];_0x314170++){_0x3378b9[_0x1dc8ec(0x151)](_0x100a95[_0x314170]);}return _0x3378b9['join']('\x0a')[_0x1dc8ec(0x143)]();}export function resolveSqlMode(_0xa6fb8b,_0x13915f){const _0x1040c7=a141_0x369f6a;if(_0x13915f?.[_0x1040c7(0x14d)])return _0x13915f[_0x1040c7(0x14d)];return detectSqlMode(_0xa6fb8b);}export function resolveSqlFileName(_0x32bfc9,_0x3c0a98,_0xa1b2c){const _0x48817d=a141_0x369f6a;if(_0xa1b2c?.[_0x48817d(0x164)])return _0xa1b2c[_0x48817d(0x164)];if(_0xa1b2c?.[_0x48817d(0x159)]||_0xa1b2c?.[_0x48817d(0x162)])return buildSqlRelativePath(_0x32bfc9,_0xa1b2c?.[_0x48817d(0x159)],_0xa1b2c?.['dbName'],resolveSqlMode(_0x3c0a98,_0xa1b2c),_0xa1b2c?.['dbId']);return buildDefaultSqlFileName(_0x32bfc9,resolveSqlMode(_0x3c0a98,_0xa1b2c));}export function resolveSqlLocalDir(_0x1f4687,_0x520c90){return join(_0x1f4687,SQL_LOCAL_REL_DIR,_0x520c90);}export async function confirmForceOverwrite(_0x1bbd00){const _0x3dd46d=a141_0x369f6a,_0x5464f4=createInterface({'input':process[_0x3dd46d(0x141)],'output':process[_0x3dd46d(0x153)]}),_0x394457=await new Promise(_0x399e11=>{_0x5464f4['question'](_0x1bbd00+'\x20[y/N]\x20',_0x399e11);});return _0x5464f4[_0x3dd46d(0x168)](),['y','yes'][_0x3dd46d(0x147)](_0x394457[_0x3dd46d(0x14c)]()[_0x3dd46d(0x14f)]());}export function findSqlLockScope(_0x41a88a,_0x20809e){return _0x41a88a['apps'][_0x20809e];}function buildMetadataHeaderLines(_0x28294d,_0x2acc11){const _0x5b45bc=a141_0x369f6a,_0x24e493=[[_0x5b45bc(0x160),_0x28294d[_0x5b45bc(0x160)]],['sqlName',_0x28294d[_0x5b45bc(0x159)]],['dbId',_0x28294d[_0x5b45bc(0x149)]],['dbName',_0x28294d[_0x5b45bc(0x162)]],[_0x5b45bc(0x14d),_0x28294d[_0x5b45bc(0x14d)]],[_0x5b45bc(0x167),_0x28294d[_0x5b45bc(0x167)]],['description',_0x28294d[_0x5b45bc(0x13d)]]];if(_0x2acc11===_0x5b45bc(0x15b))return _0x24e493[_0x5b45bc(0x15d)](([,_0x58406a])=>_0x58406a!==undefined&&_0x58406a!==null&&String(_0x58406a)[_0x5b45bc(0x14c)]()!=='')[_0x5b45bc(0x154)](([_0x26abe3,_0x4d2dd5])=>'<!--\x20@lovrabet.'+_0x26abe3+':\x20'+String(_0x4d2dd5)+_0x5b45bc(0x156));return _0x24e493[_0x5b45bc(0x15d)](([,_0x53fe42])=>_0x53fe42!==undefined&&_0x53fe42!==null&&String(_0x53fe42)[_0x5b45bc(0x14c)]()!=='')[_0x5b45bc(0x154)](([_0x594425,_0x1fa7cf])=>_0x5b45bc(0x13f)+_0x594425+':\x20'+String(_0x1fa7cf));}function a141_0x5c2e(){const _0x54d9c3=['trim','mode','entries','toLowerCase','14274765zeroQR','push','version','stderr','map','sqlConfig','\x20-->','join','fromEntries','sqlName','test','mybatisXml','sqls','filter','apps','lastSync','sqlCode','131579hucekY','dbName','159358kAVoww','path','sqlContent','6890832FDKoVG','syncedAt','close','84393iaeJAK','endsWith','description','216HnqKJd','--\x20@lovrabet.','length','stdin','3145064WbfULi','trimStart','split','replace','.rabetbase/sql','includes','sqlRoot','dbId','2442425LIyDfy','116GkBMFh'];a141_0x5c2e=function(){return _0x54d9c3;};return a141_0x5c2e();}
1
+ const a140_0x1ce38d=a140_0x570e;(function(_0x1649c3,_0x96418a){const _0x4b1678=a140_0x570e,_0x391fd5=_0x1649c3();while(!![]){try{const _0x181187=parseInt(_0x4b1678(0x1f7))/0x1+-parseInt(_0x4b1678(0x20c))/0x2+parseInt(_0x4b1678(0x20a))/0x3+parseInt(_0x4b1678(0x1f6))/0x4+-parseInt(_0x4b1678(0x1ee))/0x5*(parseInt(_0x4b1678(0x207))/0x6)+-parseInt(_0x4b1678(0x1e4))/0x7+parseInt(_0x4b1678(0x1fa))/0x8;if(_0x181187===_0x96418a)break;else _0x391fd5['push'](_0x391fd5['shift']());}catch(_0x40f81a){_0x391fd5['push'](_0x391fd5['shift']());}}}(a140_0x1c94,0xe16f8));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=a140_0x1ce38d(0x1f4);export function buildSqlLockEntry(_0x180de6,_0x45a6d7,_0x4827c7,_0x48de10){const _0x2206a4=a140_0x1ce38d,_0x51cd08=detectSqlMode(_0x45a6d7);return{'path':buildSqlRelativePath(_0x180de6[_0x2206a4(0x1e9)],_0x180de6[_0x2206a4(0x1e7)],_0x48de10?.['dbName'],_0x51cd08,_0x180de6[_0x2206a4(0x1f9)]),'hash':_0x4827c7,'remoteId':_0x180de6['id'],'version':_0x180de6[_0x2206a4(0x1e2)],'dbId':Number(_0x180de6['dbId']),'dbName':_0x48de10?.['dbName'],'sqlName':_0x180de6[_0x2206a4(0x1e7)],'sqlConfig':_0x180de6['sqlConfig']??undefined,'mode':_0x51cd08};}function a140_0x1c94(){const _0x7d7cec=['mode','question','stderr','sqlContent','path','fromEntries','description','close','<!--\x20@lovrabet.','168mgscNY','join','test','124026bixwES','--\x20@lovrabet.','2258528ctpJRs','mybatisXml','version','\x20[y/N]\x20','2553376qqyueX','map','replace','sqlName','syncedAt','sqlCode','endsWith','includes','trimStart','filter','184215DLGwrG','lastSync','length','dbName','sqlRoot','trim','.rabetbase/sql','entries','2340340JgsIeO','1129841KwVWPE','stdin','dbId','13542016pveRKM','apps','yes','split'];a140_0x1c94=function(){return _0x7d7cec;};return a140_0x1c94();}export function cloneSqlLockData(_0x29f28c){const _0x3a70c4=a140_0x1ce38d;return{'apps':Object[_0x3a70c4(0x203)](Object[_0x3a70c4(0x1f5)](_0x29f28c[_0x3a70c4(0x1fb)])[_0x3a70c4(0x1e5)](([_0x417c3e,_0x34102f])=>[_0x417c3e,{'sqlRoot':_0x34102f[_0x3a70c4(0x1f2)],'lastSync':_0x34102f[_0x3a70c4(0x1ef)],'sqls':{..._0x34102f['sqls']}}]))};}export function ensureRemoteSqlContent(_0x447ef6){const _0x3b2642=a140_0x1ce38d;return _0x447ef6[_0x3b2642(0x201)]??'';}export function buildLocalSqlFileContent(_0x36ec61,_0x941046,_0x19461e){const _0x11f13c=a140_0x1ce38d,_0x2c1059=_0x19461e?.[_0x11f13c(0x1fe)]??detectSqlMode(_0x941046),_0x9f24f0=stripLocalSqlMetadata(_0x941046,_0x2c1059)[_0x11f13c(0x1f3)](),_0x2a8783=[...buildMetadataHeaderLines({'sqlCode':_0x36ec61[_0x11f13c(0x1e9)],'sqlName':_0x36ec61['sqlName'],'dbId':_0x36ec61[_0x11f13c(0x1f9)],'dbName':_0x19461e?.['dbName'],'mode':_0x2c1059,'syncedAt':_0x19461e?.[_0x11f13c(0x1e8)],'description':_0x19461e?.[_0x11f13c(0x204)]},_0x2c1059),'',_0x9f24f0],_0x3634e7=_0x2a8783[_0x11f13c(0x208)]('\x0a');return _0x3634e7[_0x11f13c(0x1ea)]('\x0a')?_0x3634e7:_0x3634e7+'\x0a';}export function stripLocalSqlMetadata(_0x55631a,_0x4e9480){const _0xca4805=a140_0x1ce38d,_0x168cfb=_0x55631a[_0xca4805(0x1e6)](/\r\n/g,'\x0a')[_0xca4805(0x1fd)]('\x0a'),_0x131694=[];let _0x3bf078=0x0;if(_0x4e9480===_0xca4805(0x20d))while(_0x3bf078<_0x168cfb['length']){const _0x184906=_0x168cfb[_0x3bf078]??'';if(/^\s*<!--\s*@lovrabet\./[_0xca4805(0x209)](_0x184906)){_0x3bf078++;continue;}if(_0x184906[_0xca4805(0x1f3)]()===''&&_0x3bf078>0x0){_0x3bf078++;continue;}break;}else while(_0x3bf078<_0x168cfb[_0xca4805(0x1f0)]){const _0x493222=_0x168cfb[_0x3bf078]??'';if(/^\s*--\s*@lovrabet\./[_0xca4805(0x209)](_0x493222)){_0x3bf078++;continue;}if(_0x493222[_0xca4805(0x1f3)]()===''&&_0x3bf078>0x0){_0x3bf078++;continue;}break;}for(;_0x3bf078<_0x168cfb[_0xca4805(0x1f0)];_0x3bf078++){_0x131694['push'](_0x168cfb[_0x3bf078]);}return _0x131694[_0xca4805(0x208)]('\x0a')[_0xca4805(0x1ec)]();}export function resolveSqlMode(_0x57c487,_0xb3884d){if(_0xb3884d?.['mode'])return _0xb3884d['mode'];return detectSqlMode(_0x57c487);}export function resolveSqlFileName(_0x51f78e,_0x578160,_0x4425e2){const _0x566c69=a140_0x1ce38d;if(_0x4425e2?.[_0x566c69(0x202)])return _0x4425e2['path'];if(_0x4425e2?.['sqlName']||_0x4425e2?.[_0x566c69(0x1f1)])return buildSqlRelativePath(_0x51f78e,_0x4425e2?.[_0x566c69(0x1e7)],_0x4425e2?.[_0x566c69(0x1f1)],resolveSqlMode(_0x578160,_0x4425e2),_0x4425e2?.[_0x566c69(0x1f9)]);return buildDefaultSqlFileName(_0x51f78e,resolveSqlMode(_0x578160,_0x4425e2));}function a140_0x570e(_0x2089f8,_0xf93511){_0x2089f8=_0x2089f8-0x1e2;const _0x1c9456=a140_0x1c94();let _0x570e12=_0x1c9456[_0x2089f8];return _0x570e12;}export function resolveSqlLocalDir(_0x59221c,_0x45648d){return join(_0x59221c,SQL_LOCAL_REL_DIR,_0x45648d);}export async function confirmForceOverwrite(_0x261f4f){const _0x1dc7a4=a140_0x1ce38d,_0x27744a=createInterface({'input':process[_0x1dc7a4(0x1f8)],'output':process[_0x1dc7a4(0x200)]}),_0x5e01d2=await new Promise(_0x3bf6b7=>{const _0x4d0883=_0x1dc7a4;_0x27744a[_0x4d0883(0x1ff)](_0x261f4f+_0x4d0883(0x1e3),_0x3bf6b7);});return _0x27744a[_0x1dc7a4(0x205)](),['y',_0x1dc7a4(0x1fc)][_0x1dc7a4(0x1eb)](_0x5e01d2[_0x1dc7a4(0x1f3)]()['toLowerCase']());}export function findSqlLockScope(_0x49e81b,_0x2d7a58){const _0x2f176e=a140_0x1ce38d;return _0x49e81b[_0x2f176e(0x1fb)][_0x2d7a58];}function buildMetadataHeaderLines(_0x30c696,_0x197534){const _0x522fae=a140_0x1ce38d,_0x562142=[['sqlCode',_0x30c696[_0x522fae(0x1e9)]],[_0x522fae(0x1e7),_0x30c696[_0x522fae(0x1e7)]],[_0x522fae(0x1f9),_0x30c696[_0x522fae(0x1f9)]],['dbName',_0x30c696[_0x522fae(0x1f1)]],[_0x522fae(0x1fe),_0x30c696['mode']],[_0x522fae(0x1e8),_0x30c696[_0x522fae(0x1e8)]],[_0x522fae(0x204),_0x30c696[_0x522fae(0x204)]]];if(_0x197534===_0x522fae(0x20d))return _0x562142[_0x522fae(0x1ed)](([,_0x233c88])=>_0x233c88!==undefined&&_0x233c88!==null&&String(_0x233c88)[_0x522fae(0x1f3)]()!=='')[_0x522fae(0x1e5)](([_0x40ca1f,_0x3a4811])=>_0x522fae(0x206)+_0x40ca1f+':\x20'+String(_0x3a4811)+'\x20-->');return _0x562142[_0x522fae(0x1ed)](([,_0x212c5d])=>_0x212c5d!==undefined&&_0x212c5d!==null&&String(_0x212c5d)[_0x522fae(0x1f3)]()!=='')['map'](([_0x47b0a9,_0x296a7c])=>_0x522fae(0x20b)+_0x47b0a9+':\x20'+String(_0x296a7c));}
@@ -1 +1 @@
1
- const a142_0x2a0ffd=a142_0x499e;(function(_0x5c3164,_0x13b960){const _0x38a3ca=a142_0x499e,_0x1642b1=_0x5c3164();while(!![]){try{const _0x2e198a=-parseInt(_0x38a3ca(0x19a))/0x1*(-parseInt(_0x38a3ca(0x18a))/0x2)+parseInt(_0x38a3ca(0x19e))/0x3+-parseInt(_0x38a3ca(0x1a5))/0x4*(-parseInt(_0x38a3ca(0x1a4))/0x5)+-parseInt(_0x38a3ca(0x1a6))/0x6+parseInt(_0x38a3ca(0x193))/0x7+parseInt(_0x38a3ca(0x199))/0x8+-parseInt(_0x38a3ca(0x1a8))/0x9;if(_0x2e198a===_0x13b960)break;else _0x1642b1['push'](_0x1642b1['shift']());}catch(_0xadab6f){_0x1642b1['push'](_0x1642b1['shift']());}}}(a142_0x12bb,0x52bc0));import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';function a142_0x499e(_0x115e71,_0x1f3556){_0x115e71=_0x115e71-0x186;const _0x12bb1b=a142_0x12bb();let _0x499e19=_0x12bb1b[_0x115e71];return _0x499e19;}import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';const PAGE_SIZE=0x64;function a142_0x12bb(){const _0x2f0843=['59124WCrszO','1822698nMGSso','push','6805539UDKERB','sqls','All\x20SQL\x20queries\x20are\x20in\x20sync.','paging','hash','bool','filePath','path','164602aIiGxS','sqlName','appCode','lockKey','length','remote','map','tableData','has','1870204IbOOIg','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','relativePath','\x20unchanged','\x20modified,\x20','\x20added,\x20','1871416BPNWDM','1wprJpL','read','sqlRoot','totalCount','583896wJgSoR','boolean','sql','status','sqlCode','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','210ZTHBrg'];a142_0x12bb=function(){return _0x2f0843;};return a142_0x12bb();}async function fetchAllSqlCodes(_0x35f4cc){const _0x5dbeeb=a142_0x499e,_0x426b0d=[];let _0x5cf930=0x1;while(!![]){const _0x436f8a=await listSqlQueries(_0x35f4cc,{'currentPage':_0x5cf930,'pageSize':PAGE_SIZE}),_0x40031d=_0x436f8a[_0x5dbeeb(0x191)]??[];_0x426b0d[_0x5dbeeb(0x1a7)](..._0x40031d[_0x5dbeeb(0x190)](_0x4401f5=>_0x4401f5[_0x5dbeeb(0x1a2)]));if(_0x40031d[_0x5dbeeb(0x18e)]===0x0)break;const _0x1dc1f7=_0x436f8a[_0x5dbeeb(0x1ab)]?.[_0x5dbeeb(0x19d)];if(_0x1dc1f7!=null?_0x426b0d['length']>=_0x1dc1f7:_0x40031d[_0x5dbeeb(0x18e)]<PAGE_SIZE)break;_0x5cf930++;}return _0x426b0d;}export const sqlStatus={'service':a142_0x2a0ffd(0x1a0),'command':a142_0x2a0ffd(0x1a1),'description':a142_0x2a0ffd(0x194),'risk':a142_0x2a0ffd(0x19b),'flags':[{'name':a142_0x2a0ffd(0x18f),'type':a142_0x2a0ffd(0x19f),'description':a142_0x2a0ffd(0x1a3)}],async 'execute'(_0x47830b){const _0x3255ab=a142_0x2a0ffd,_0x8215ea=loadSqlProjectConfig(_0x47830b[_0x3255ab(0x18c)]),_0x589cf3=await readSqlLockFile(_0x8215ea['lockFilePath']),{appLock:_0x1619a5}=ensureSqlLockScope(_0x589cf3??createEmptySqlLock(),_0x8215ea['appCode'],_0x8215ea[_0x3255ab(0x19c)],'status'),_0x3be661=await scanLocalSqlQueries(_0x8215ea),_0x8d752f=[],_0x5c0477=[],_0x996316=[],_0x57540d=[],_0xaa374=new Set(_0x3be661[_0x3255ab(0x190)](_0xa6c713=>_0xa6c713['lockKey']));for(const _0x42ef2a of _0x3be661){const _0x30d6d8=await computeSqlFileHash(_0x42ef2a[_0x3255ab(0x188)]),_0x2d8f05=_0x1619a5[_0x3255ab(0x1a9)][_0x42ef2a[_0x3255ab(0x18d)]],_0x4f2dfa=!!_0x2d8f05&&_0x2d8f05[_0x3255ab(0x189)]!==_0x42ef2a[_0x3255ab(0x195)],_0x5046c8=!!_0x2d8f05&&!!_0x42ef2a[_0x3255ab(0x18b)]&&_0x2d8f05[_0x3255ab(0x18b)]!==_0x42ef2a['sqlName'];if(!_0x2d8f05)_0x8d752f[_0x3255ab(0x1a7)](_0x42ef2a[_0x3255ab(0x18d)]);else _0x2d8f05[_0x3255ab(0x186)]!==_0x30d6d8||_0x4f2dfa||_0x5046c8?_0x5c0477[_0x3255ab(0x1a7)](_0x42ef2a[_0x3255ab(0x18d)]):_0x996316[_0x3255ab(0x1a7)](_0x42ef2a[_0x3255ab(0x18d)]);}for(const _0x2db688 of Object['keys'](_0x1619a5[_0x3255ab(0x1a9)])){!_0xaa374[_0x3255ab(0x192)](_0x2db688)&&_0x57540d[_0x3255ab(0x1a7)](_0x2db688);}const _0x2b2b8d=[];if(_0x47830b[_0x3255ab(0x187)]('remote')){const _0x48ac8e=await fetchAllSqlCodes(_0x47830b[_0x3255ab(0x18c)]);for(const _0x54ba63 of _0x48ac8e){!_0xaa374[_0x3255ab(0x192)](_0x54ba63)&&!_0x1619a5['sqls'][_0x54ba63]&&_0x2b2b8d[_0x3255ab(0x1a7)](_0x54ba63);}}const _0x3ef2bd=_0x8d752f[_0x3255ab(0x18e)]===0x0&&_0x5c0477[_0x3255ab(0x18e)]===0x0&&_0x57540d[_0x3255ab(0x18e)]===0x0&&_0x2b2b8d[_0x3255ab(0x18e)]===0x0;return{'ok':!![],'data':{'added':_0x8d752f,'modified':_0x5c0477,'missing':_0x57540d,'unchanged':_0x996316,'remoteOnly':_0x2b2b8d},'message':_0x3ef2bd?_0x3255ab(0x1aa):_0x8d752f[_0x3255ab(0x18e)]+_0x3255ab(0x198)+_0x5c0477['length']+_0x3255ab(0x197)+_0x57540d[_0x3255ab(0x18e)]+'\x20missing,\x20'+_0x996316[_0x3255ab(0x18e)]+_0x3255ab(0x196)+(_0x2b2b8d[_0x3255ab(0x18e)]>0x0?',\x20'+_0x2b2b8d[_0x3255ab(0x18e)]+'\x20remote-only':'')};}};
1
+ const a141_0x1e75de=a141_0x585f;(function(_0x282de2,_0x4788bf){const _0x3d42bb=a141_0x585f,_0x8332b=_0x282de2();while(!![]){try{const _0x35abc4=-parseInt(_0x3d42bb(0x1be))/0x1*(parseInt(_0x3d42bb(0x1b7))/0x2)+-parseInt(_0x3d42bb(0x1a3))/0x3+-parseInt(_0x3d42bb(0x1b6))/0x4+-parseInt(_0x3d42bb(0x1ba))/0x5+parseInt(_0x3d42bb(0x1a9))/0x6+-parseInt(_0x3d42bb(0x1b9))/0x7+parseInt(_0x3d42bb(0x1b1))/0x8;if(_0x35abc4===_0x4788bf)break;else _0x8332b['push'](_0x8332b['shift']());}catch(_0x2420d6){_0x8332b['push'](_0x8332b['shift']());}}}(a141_0x23be,0x21444));import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';function a141_0x585f(_0x3637c5,_0xb7e9bd){_0x3637c5=_0x3637c5-0x1a2;const _0x23be19=a141_0x23be();let _0x585ffd=_0x23be19[_0x3637c5];return _0x585ffd;}import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';function a141_0x23be(){const _0x5af411=['lockKey','tableData','has','\x20remote-only','remote','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','582594EDmTFs','length','lockFilePath','path','status','sqlCode','1597074skboDw','relativePath','paging','\x20missing,\x20','map','sqls','totalCount','sql','6078384DfBPTE','filePath','hash','bool','push','416688VHEHol','191038tbDqix','All\x20SQL\x20queries\x20are\x20in\x20sync.','1809521jPYGkv','709030nIXZJA','sqlName','keys','appCode','2gbjXZq'];a141_0x23be=function(){return _0x5af411;};return a141_0x23be();}const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x282a05){const _0xb6495b=a141_0x585f,_0x5b8ef9=[];let _0x58a6b6=0x1;while(!![]){const _0x22e9ae=await listSqlQueries(_0x282a05,{'currentPage':_0x58a6b6,'pageSize':PAGE_SIZE}),_0x585363=_0x22e9ae[_0xb6495b(0x1c0)]??[];_0x5b8ef9[_0xb6495b(0x1b5)](..._0x585363[_0xb6495b(0x1ad)](_0x2415f1=>_0x2415f1[_0xb6495b(0x1a8)]));if(_0x585363[_0xb6495b(0x1a4)]===0x0)break;const _0x1e0953=_0x22e9ae[_0xb6495b(0x1ab)]?.[_0xb6495b(0x1af)];if(_0x1e0953!=null?_0x5b8ef9['length']>=_0x1e0953:_0x585363[_0xb6495b(0x1a4)]<PAGE_SIZE)break;_0x58a6b6++;}return _0x5b8ef9;}export const sqlStatus={'service':a141_0x1e75de(0x1b0),'command':a141_0x1e75de(0x1a7),'description':'Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','risk':'read','flags':[{'name':'remote','type':'boolean','description':a141_0x1e75de(0x1a2)}],async 'execute'(_0x4aa21c){const _0x10a73e=a141_0x1e75de,_0xbf2a4d=loadSqlProjectConfig(_0x4aa21c[_0x10a73e(0x1bd)]),_0x336ba6=await readSqlLockFile(_0xbf2a4d[_0x10a73e(0x1a5)]),{appLock:_0x273376}=ensureSqlLockScope(_0x336ba6??createEmptySqlLock(),_0xbf2a4d[_0x10a73e(0x1bd)],_0xbf2a4d['sqlRoot'],'status'),_0x2b82ee=await scanLocalSqlQueries(_0xbf2a4d),_0x5b74ff=[],_0x5dc30e=[],_0x5dedd1=[],_0x22ee82=[],_0x24e960=new Set(_0x2b82ee[_0x10a73e(0x1ad)](_0x1f4d88=>_0x1f4d88[_0x10a73e(0x1bf)]));for(const _0x1d73fa of _0x2b82ee){const _0x120bd7=await computeSqlFileHash(_0x1d73fa[_0x10a73e(0x1b2)]),_0x1343d4=_0x273376['sqls'][_0x1d73fa[_0x10a73e(0x1bf)]],_0x537e40=!!_0x1343d4&&_0x1343d4[_0x10a73e(0x1a6)]!==_0x1d73fa[_0x10a73e(0x1aa)],_0x41bcc9=!!_0x1343d4&&!!_0x1d73fa[_0x10a73e(0x1bb)]&&_0x1343d4[_0x10a73e(0x1bb)]!==_0x1d73fa['sqlName'];if(!_0x1343d4)_0x5b74ff[_0x10a73e(0x1b5)](_0x1d73fa['lockKey']);else _0x1343d4[_0x10a73e(0x1b3)]!==_0x120bd7||_0x537e40||_0x41bcc9?_0x5dc30e[_0x10a73e(0x1b5)](_0x1d73fa[_0x10a73e(0x1bf)]):_0x5dedd1['push'](_0x1d73fa[_0x10a73e(0x1bf)]);}for(const _0x276cc1 of Object[_0x10a73e(0x1bc)](_0x273376[_0x10a73e(0x1ae)])){!_0x24e960[_0x10a73e(0x1c1)](_0x276cc1)&&_0x22ee82[_0x10a73e(0x1b5)](_0x276cc1);}const _0x4e867c=[];if(_0x4aa21c[_0x10a73e(0x1b4)](_0x10a73e(0x1c3))){const _0x1e973b=await fetchAllSqlCodes(_0x4aa21c[_0x10a73e(0x1bd)]);for(const _0x5678bf of _0x1e973b){!_0x24e960[_0x10a73e(0x1c1)](_0x5678bf)&&!_0x273376[_0x10a73e(0x1ae)][_0x5678bf]&&_0x4e867c[_0x10a73e(0x1b5)](_0x5678bf);}}const _0x308809=_0x5b74ff['length']===0x0&&_0x5dc30e[_0x10a73e(0x1a4)]===0x0&&_0x22ee82[_0x10a73e(0x1a4)]===0x0&&_0x4e867c[_0x10a73e(0x1a4)]===0x0;return{'ok':!![],'data':{'added':_0x5b74ff,'modified':_0x5dc30e,'missing':_0x22ee82,'unchanged':_0x5dedd1,'remoteOnly':_0x4e867c},'message':_0x308809?_0x10a73e(0x1b8):_0x5b74ff[_0x10a73e(0x1a4)]+'\x20added,\x20'+_0x5dc30e[_0x10a73e(0x1a4)]+'\x20modified,\x20'+_0x22ee82[_0x10a73e(0x1a4)]+_0x10a73e(0x1ac)+_0x5dedd1[_0x10a73e(0x1a4)]+'\x20unchanged'+(_0x4e867c[_0x10a73e(0x1a4)]>0x0?',\x20'+_0x4e867c[_0x10a73e(0x1a4)]+_0x10a73e(0x1c2):'')};}};
@@ -1 +1 @@
1
- const a143_0xacb4ea=a143_0x1ab8;(function(_0x436106,_0x42c568){const _0x1b425b=a143_0x1ab8,_0x468968=_0x436106();while(!![]){try{const _0x553ebc=-parseInt(_0x1b425b(0x119))/0x1+-parseInt(_0x1b425b(0x12d))/0x2+parseInt(_0x1b425b(0x12f))/0x3*(parseInt(_0x1b425b(0x129))/0x4)+parseInt(_0x1b425b(0x128))/0x5*(-parseInt(_0x1b425b(0x133))/0x6)+-parseInt(_0x1b425b(0x10f))/0x7+parseInt(_0x1b425b(0x122))/0x8*(parseInt(_0x1b425b(0x106))/0x9)+parseInt(_0x1b425b(0x134))/0xa;if(_0x553ebc===_0x42c568)break;else _0x468968['push'](_0x468968['shift']());}catch(_0x1b62b2){_0x468968['push'](_0x468968['shift']());}}}(a143_0x4b58,0xbade0));function a143_0x1ab8(_0x54553f,_0x3a02e7){_0x54553f=_0x54553f-0x103;const _0x4b58bd=a143_0x4b58();let _0x1ab8eb=_0x4b58bd[_0x54553f];return _0x1ab8eb;}import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';function a143_0x4b58(){const _0x296be7=['split','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','Dataset\x20\x22','tableName','2445848zBeSCh','File\x20not\x20found:\x20','schema:','validate','trim','isSelectOnly','10rtMWZx','1449724Ofadfg','schemaWarnings','dbtableConfig','toLowerCase','1993036USDdJp','parameters','6ZDXbrD','schemas','from','\x22\x20not\x20found\x20or\x20not\x20accessible','309696MlfcGu','10461820FyZBjk','isArray','isDangerous','tables','36vzzJDr','push','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','string','Table\x20\x22','Provide\x20--file\x20or\x20--sql','fields','valid','reason','5065711YRdugc','sql','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','message','name','appCode','filter','str','utf-8','\x22\x20not\x20found\x20in\x20any\x20dataset','405137XYdnOQ','sqlType','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','map','flagMissing'];a143_0x4b58=function(){return _0x296be7;};return a143_0x4b58();}export const sqlValidate={'service':a143_0xacb4ea(0x110),'command':a143_0xacb4ea(0x125),'description':a143_0xacb4ea(0x111),'risk':'read','flags':[{'name':'file','type':a143_0xacb4ea(0x109),'description':a143_0xacb4ea(0x11f)},{'name':a143_0xacb4ea(0x110),'type':a143_0xacb4ea(0x109),'description':a143_0xacb4ea(0x108)},{'name':a143_0xacb4ea(0x130),'type':a143_0xacb4ea(0x109),'description':a143_0xacb4ea(0x11b)}],async 'execute'(_0xa7916){const _0x31ffda=a143_0xacb4ea,_0x1ee4d3=_0xa7916['str']('file'),_0x52ecce=_0xa7916['str'](_0x31ffda(0x110));if(!_0x1ee4d3&&!_0x52ecce)throw CliErrors[_0x31ffda(0x11d)]('file',_0x31ffda(0x10b));let _0xfda90b;if(_0x1ee4d3){const _0x2c797a=resolve(process['cwd'](),_0x1ee4d3);if(!existsSync(_0x2c797a))throw CliErrors['validation'](_0x31ffda(0x123)+_0x2c797a);_0xfda90b=readFileSync(_0x2c797a,_0x31ffda(0x117));}else _0xfda90b=_0x52ecce;const _0x1a2644=validateSql(_0xfda90b),_0x297249={'valid':_0x1a2644[_0x31ffda(0x10d)],'sqlType':_0x1a2644[_0x31ffda(0x11a)]['type'],'isSelectOnly':_0x1a2644[_0x31ffda(0x11a)][_0x31ffda(0x127)],'isDangerous':_0x1a2644[_0x31ffda(0x11a)][_0x31ffda(0x104)],'tables':_0x1a2644[_0x31ffda(0x105)],'parameters':_0x1a2644[_0x31ffda(0x12e)],'message':_0x1a2644['message']};_0x1a2644[_0x31ffda(0x11a)]['reason']&&(_0x297249[_0x31ffda(0x10e)]=_0x1a2644[_0x31ffda(0x11a)]['reason']);const _0x4e1c2d=_0xa7916[_0x31ffda(0x116)](_0x31ffda(0x130));if(_0x4e1c2d&&_0x1a2644[_0x31ffda(0x10d)]){const _0x5d0793=_0x4e1c2d[_0x31ffda(0x11e)](',')[_0x31ffda(0x11c)](_0x58229c=>_0x58229c[_0x31ffda(0x126)]())[_0x31ffda(0x115)](Boolean),_0xfc7012=[],_0x578553=filterDbTableBackedDatasets(await listDatasets(_0xa7916[_0x31ffda(0x114)])),_0x2e4831=new Map(_0x578553['map'](_0x5489ac=>[_0x5489ac['dbtableConfig']?.[_0x31ffda(0x121)]?.[_0x31ffda(0x12c)](),_0x5489ac]));for(const _0x3e53c3 of _0x1a2644[_0x31ffda(0x105)]){const _0x3ecf7c=_0x2e4831['get'](_0x3e53c3[_0x31ffda(0x12c)]());!_0x3ecf7c&&_0xfc7012[_0x31ffda(0x107)](_0x31ffda(0x10a)+_0x3e53c3+_0x31ffda(0x118));}for(const _0x37c9c6 of _0x5d0793){let _0x32c37a;try{_0x32c37a=await getDatasetDetail(_0x37c9c6);}catch{_0xfc7012[_0x31ffda(0x107)](_0x31ffda(0x120)+_0x37c9c6+_0x31ffda(0x132));continue;}assertDatasetIsDbTableBacked(_0x32c37a,'SQL\x20schema\x20validation');const _0x1f90c3=Array[_0x31ffda(0x103)](_0x32c37a[_0x31ffda(0x10c)])?_0x32c37a[_0x31ffda(0x10c)]:[],_0x3403a5=new Set(_0x1f90c3[_0x31ffda(0x11c)](_0x11fdb3=>_0x11fdb3[_0x31ffda(0x113)]?.[_0x31ffda(0x12c)]())),_0x570cfd=_0x32c37a[_0x31ffda(0x12b)]?.[_0x31ffda(0x121)]||_0x32c37a[_0x31ffda(0x121)]||_0x37c9c6;_0x297249[_0x31ffda(0x124)+_0x570cfd]={'code':_0x37c9c6,'tableName':_0x570cfd,'fieldCount':_0x3403a5['size'],'fields':Array[_0x31ffda(0x131)](_0x3403a5)};}_0xfc7012['length']>0x0&&(_0x297249[_0x31ffda(0x12a)]=_0xfc7012);}return{'ok':_0x1a2644[_0x31ffda(0x10d)],'data':_0x297249,'message':_0x1a2644[_0x31ffda(0x112)]};}};
1
+ const a142_0x3d3488=a142_0x2763;(function(_0x437b5f,_0x3006c2){const _0x7a4c43=a142_0x2763,_0x1b57bb=_0x437b5f();while(!![]){try{const _0x174791=-parseInt(_0x7a4c43(0x16e))/0x1*(parseInt(_0x7a4c43(0x14f))/0x2)+-parseInt(_0x7a4c43(0x171))/0x3+-parseInt(_0x7a4c43(0x174))/0x4*(-parseInt(_0x7a4c43(0x170))/0x5)+parseInt(_0x7a4c43(0x161))/0x6*(parseInt(_0x7a4c43(0x179))/0x7)+-parseInt(_0x7a4c43(0x17b))/0x8*(parseInt(_0x7a4c43(0x158))/0x9)+-parseInt(_0x7a4c43(0x15b))/0xa+parseInt(_0x7a4c43(0x15f))/0xb;if(_0x174791===_0x3006c2)break;else _0x1b57bb['push'](_0x1b57bb['shift']());}catch(_0x531d40){_0x1b57bb['push'](_0x1b57bb['shift']());}}}(a142_0x37d3,0x1f5b1));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';function a142_0x2763(_0x589d95,_0x35530c){_0x589d95=_0x589d95-0x14a;const _0x37d301=a142_0x37d3();let _0x276374=_0x37d301[_0x589d95];return _0x276374;}import{getDatasetDetail,listDatasets}from'../../core/api-client.js';function a142_0x37d3(){const _0x8e992e=['trim','message','102epDVJa','name','str','validation','length','fields','schemas','from','tableName','9DCgcBI','size','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','1669740fZGvtj','Provide\x20--file\x20or\x20--sql','isSelectOnly','tables','4404917DipPJH','SQL\x20schema\x20validation','9258rWQoMf','isArray','cwd','validate','Dataset\x20\x22','sql','File\x20not\x20found:\x20','schema:','appCode','map','schemaWarnings','\x22\x20not\x20found\x20or\x20not\x20accessible','push','941VGvCEH','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','187070QPpslS','742704oAyhor','isDangerous','Table\x20\x22','12IZzjQB','string','sqlType','file','read','497jIMmXi','valid','250208NTDFKW','toLowerCase','reason','flagMissing','\x22\x20not\x20found\x20in\x20any\x20dataset'];a142_0x37d3=function(){return _0x8e992e;};return a142_0x37d3();}import{CliErrors}from'../../errors.js';import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';export const sqlValidate={'service':a142_0x3d3488(0x166),'command':a142_0x3d3488(0x164),'description':'Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','risk':a142_0x3d3488(0x178),'flags':[{'name':a142_0x3d3488(0x177),'type':'string','description':'Path\x20to\x20the\x20SQL\x20file\x20to\x20validate'},{'name':a142_0x3d3488(0x166),'type':a142_0x3d3488(0x175),'description':a142_0x3d3488(0x16f)},{'name':a142_0x3d3488(0x155),'type':a142_0x3d3488(0x175),'description':a142_0x3d3488(0x15a)}],async 'execute'(_0x291db0){const _0x3b8d77=a142_0x3d3488,_0x172323=_0x291db0[_0x3b8d77(0x151)](_0x3b8d77(0x177)),_0x18e3a2=_0x291db0[_0x3b8d77(0x151)](_0x3b8d77(0x166));if(!_0x172323&&!_0x18e3a2)throw CliErrors[_0x3b8d77(0x14b)]('file',_0x3b8d77(0x15c));let _0x21daff;if(_0x172323){const _0xc49840=resolve(process[_0x3b8d77(0x163)](),_0x172323);if(!existsSync(_0xc49840))throw CliErrors[_0x3b8d77(0x152)](_0x3b8d77(0x167)+_0xc49840);_0x21daff=readFileSync(_0xc49840,'utf-8');}else _0x21daff=_0x18e3a2;const _0x5042a9=validateSql(_0x21daff),_0x512007={'valid':_0x5042a9[_0x3b8d77(0x17a)],'sqlType':_0x5042a9[_0x3b8d77(0x176)]['type'],'isSelectOnly':_0x5042a9['sqlType'][_0x3b8d77(0x15d)],'isDangerous':_0x5042a9[_0x3b8d77(0x176)][_0x3b8d77(0x172)],'tables':_0x5042a9[_0x3b8d77(0x15e)],'parameters':_0x5042a9['parameters'],'message':_0x5042a9[_0x3b8d77(0x14e)]};_0x5042a9[_0x3b8d77(0x176)]['reason']&&(_0x512007[_0x3b8d77(0x14a)]=_0x5042a9['sqlType']['reason']);const _0x1cae32=_0x291db0[_0x3b8d77(0x151)](_0x3b8d77(0x155));if(_0x1cae32&&_0x5042a9[_0x3b8d77(0x17a)]){const _0x4c5731=_0x1cae32['split'](',')[_0x3b8d77(0x16a)](_0x92fb05=>_0x92fb05[_0x3b8d77(0x14d)]())['filter'](Boolean),_0x177715=[],_0x3dad8=filterDbTableBackedDatasets(await listDatasets(_0x291db0[_0x3b8d77(0x169)])),_0x2e18d4=new Map(_0x3dad8[_0x3b8d77(0x16a)](_0x2e77d7=>[_0x2e77d7['dbtableConfig']?.['tableName']?.['toLowerCase'](),_0x2e77d7]));for(const _0x5ccfd9 of _0x5042a9['tables']){const _0x5d55b2=_0x2e18d4['get'](_0x5ccfd9[_0x3b8d77(0x17c)]());!_0x5d55b2&&_0x177715[_0x3b8d77(0x16d)](_0x3b8d77(0x173)+_0x5ccfd9+_0x3b8d77(0x14c));}for(const _0x43c722 of _0x4c5731){let _0x53de6d;try{_0x53de6d=await getDatasetDetail(_0x43c722);}catch{_0x177715[_0x3b8d77(0x16d)](_0x3b8d77(0x165)+_0x43c722+_0x3b8d77(0x16c));continue;}assertDatasetIsDbTableBacked(_0x53de6d,_0x3b8d77(0x160));const _0x12fbd2=Array[_0x3b8d77(0x162)](_0x53de6d['fields'])?_0x53de6d[_0x3b8d77(0x154)]:[],_0x104d3f=new Set(_0x12fbd2['map'](_0x5358a9=>_0x5358a9[_0x3b8d77(0x150)]?.[_0x3b8d77(0x17c)]())),_0x3d65d3=_0x53de6d['dbtableConfig']?.[_0x3b8d77(0x157)]||_0x53de6d[_0x3b8d77(0x157)]||_0x43c722;_0x512007[_0x3b8d77(0x168)+_0x3d65d3]={'code':_0x43c722,'tableName':_0x3d65d3,'fieldCount':_0x104d3f[_0x3b8d77(0x159)],'fields':Array[_0x3b8d77(0x156)](_0x104d3f)};}_0x177715[_0x3b8d77(0x153)]>0x0&&(_0x512007[_0x3b8d77(0x16b)]=_0x177715);}return{'ok':_0x5042a9[_0x3b8d77(0x17a)],'data':_0x512007,'message':_0x5042a9[_0x3b8d77(0x14e)]};}};
@@ -1 +1 @@
1
- const a144_0x4ea71c=a144_0x3fa6;(function(_0x4ba654,_0xfcc294){const _0x235597=a144_0x3fa6,_0x538cf1=_0x4ba654();while(!![]){try{const _0x164578=-parseInt(_0x235597(0xdc))/0x1*(-parseInt(_0x235597(0xc7))/0x2)+-parseInt(_0x235597(0xd9))/0x3+-parseInt(_0x235597(0xd7))/0x4+-parseInt(_0x235597(0xe0))/0x5*(-parseInt(_0x235597(0xe6))/0x6)+-parseInt(_0x235597(0xe7))/0x7*(parseInt(_0x235597(0xe2))/0x8)+parseInt(_0x235597(0xf0))/0x9*(parseInt(_0x235597(0xbe))/0xa)+-parseInt(_0x235597(0xd2))/0xb*(-parseInt(_0x235597(0xeb))/0xc);if(_0x164578===_0xfcc294)break;else _0x538cf1['push'](_0x538cf1['shift']());}catch(_0x21863a){_0x538cf1['push'](_0x538cf1['shift']());}}}(a144_0xdb08,0x48786));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.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';import{validateAppcode}from'../../commands/common/validate.js';function a144_0xdb08(){const _0x52c02d=['riskLevel','Locale\x20for\x20this\x20workspace\x20app\x20profile','5795ksoRjy','keys','3525128rMfouj','use','apiDir','Initialize\x20the\x20current\x20workspace\x20app\x20binding','2922LKunHU','7RJgDzj','Switch\x20the\x20current\x20workspace\x20app\x20binding','\x20--appcode\x20<code>`.','str','5819460rsfjCT','validation',').\x20Config:\x20','.\x20Credentials:\x20not\x20written.','Target\x20environment','9IpTqFs','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','object','\x20workspace\x20use\x20--app\x20<name>`.','write','3900440UxLwxF','Missing\x20workspace\x20app\x20selector.','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','flag','length','defaultFormat','init','app','Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','3466HaDPoV','apps','locale','initialized','\x20--app\x20','workspace','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','Workspace\x20','trim','isArray','11iQKhDS','appcode','Use\x20`','string','defaultApp','1253456WPVugm','env','1503702aPtdRs','pageSize','format','65LoqrdX','Invalid\x20appcode:\x20'];a144_0xdb08=function(){return _0x52c02d;};return a144_0xdb08();}import{readConfigFile,readRawConfigWithLayers,resolveWriteConfigPath,writeConfigFile}from'../../context.js';const WORKSPACE_USAGE=CLI_BIN_NAME+a144_0x4ea71c(0xce),SAFE_PROFILE_KEYS=[a144_0x4ea71c(0xd3),a144_0x4ea71c(0xd8),a144_0x4ea71c(0xe4),'format',a144_0x4ea71c(0xda),a144_0x4ea71c(0xde),'locale'],workspaceFlags=[{'name':a144_0x4ea71c(0xc5),'type':'string','description':a144_0x4ea71c(0xcd)},{'name':'appcode','type':a144_0x4ea71c(0xd5),'description':'App\x20code\x20to\x20bind\x20to\x20this\x20workspace'},{'name':a144_0x4ea71c(0xd8),'type':a144_0x4ea71c(0xd5),'description':a144_0x4ea71c(0xef),'enum':[...RABETBASE_ENV_VALUES]},{'name':'apiDir','type':a144_0x4ea71c(0xd5),'description':'API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile'},{'name':'defaultFormat','type':a144_0x4ea71c(0xd5),'description':a144_0x4ea71c(0xc6),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':'pageSize','type':'number','description':'Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile'},{'name':a144_0x4ea71c(0xde),'type':'string','description':'Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RISK_LEVEL_VALUES]},{'name':a144_0x4ea71c(0xc9),'type':a144_0x4ea71c(0xd5),'description':a144_0x4ea71c(0xdf)}];function isRecord(_0x97017a){const _0x549f64=a144_0x4ea71c;return!!_0x97017a&&typeof _0x97017a===_0x549f64(0xbb)&&!Array[_0x549f64(0xd1)](_0x97017a);}function assertValidAppcode(_0x34f105){const _0x57f6cb=a144_0x4ea71c,{valid:_0x173e79,message:_0x20b618}=validateAppcode(_0x34f105);if(!_0x173e79)throw CliErrors[_0x57f6cb(0xec)](_0x57f6cb(0xdd)+_0x34f105,_0x20b618);}function sanitizeProfile(_0x4d26a4){if(!isRecord(_0x4d26a4))return{};const _0x277a83={};for(const _0x3bd495 of SAFE_PROFILE_KEYS){if(_0x4d26a4[_0x3bd495]!==undefined)_0x277a83[_0x3bd495]=_0x4d26a4[_0x3bd495];}return _0x277a83;}function a144_0x3fa6(_0x474f90,_0x4210a9){_0x474f90=_0x474f90-0xbb;const _0xdb085d=a144_0xdb08();let _0x3fa6f1=_0xdb085d[_0x474f90];return _0x3fa6f1;}function cloneProfile(_0x4e3eb3){return isRecord(_0x4e3eb3)?{..._0x4e3eb3}:{};}function collectWorkspaceProfileOverrides(_0x34c007){const _0x45c4fa=a144_0x4ea71c,_0x11bcf6={},_0x20b474=_0x34c007[_0x45c4fa(0xea)](_0x45c4fa(0xd8)),_0x4da921=_0x34c007[_0x45c4fa(0xea)]('apiDir'),_0x71daf6=_0x34c007['str'](_0x45c4fa(0xc3)),_0x3d37ca=_0x34c007[_0x45c4fa(0xc1)](_0x45c4fa(0xda)),_0x4bfd3d=_0x34c007[_0x45c4fa(0xea)](_0x45c4fa(0xde)),_0x600635=_0x34c007[_0x45c4fa(0xea)](_0x45c4fa(0xc9));if(_0x20b474)_0x11bcf6[_0x45c4fa(0xd8)]=_0x20b474;if(_0x4da921)_0x11bcf6[_0x45c4fa(0xe4)]=_0x4da921;if(_0x71daf6)_0x11bcf6[_0x45c4fa(0xdb)]=_0x71daf6;if(_0x3d37ca!==undefined&&_0x3d37ca!=='')_0x11bcf6[_0x45c4fa(0xda)]=Number(_0x3d37ca);if(_0x4bfd3d)_0x11bcf6[_0x45c4fa(0xde)]=_0x4bfd3d;if(_0x600635)_0x11bcf6[_0x45c4fa(0xc9)]=_0x600635;return _0x11bcf6;}async function validateWorkspaceArgs(_0x6028bd){const _0x15cfe3=a144_0x4ea71c,_0x475deb=_0x6028bd[_0x15cfe3(0xea)](_0x15cfe3(0xc5))[_0x15cfe3(0xd0)](),_0x264e9e=_0x6028bd['str'](_0x15cfe3(0xd3))[_0x15cfe3(0xd0)]();if(!_0x475deb&&!_0x264e9e)throw CliErrors['validation'](_0x15cfe3(0xbf),'Use\x20`'+CLI_BIN_NAME+_0x15cfe3(0xf1)+CLI_BIN_NAME+_0x15cfe3(0xbc));if(_0x264e9e)assertValidAppcode(_0x264e9e);}function resolveKnownApps(){const _0x59f184=a144_0x4ea71c,{config:_0x12d2b1,layers:_0x35f552}=readRawConfigWithLayers(),_0x4ab25a=isRecord(_0x12d2b1[_0x59f184(0xc8)])?_0x12d2b1[_0x59f184(0xc8)]:{},_0xa7a136=isRecord(_0x35f552['globalConfig'][_0x59f184(0xc8)])?_0x35f552['globalConfig']['apps']:{};return{..._0xa7a136,..._0x4ab25a};}async function configureWorkspace(_0x367acf,_0x5469b8){const _0x2332ee=a144_0x4ea71c,_0x4a64c0=_0x367acf[_0x2332ee(0xea)]('app')['trim'](),_0x13aed2=_0x367acf['str'](_0x2332ee(0xd3))[_0x2332ee(0xd0)](),_0x8d235d=_0x4a64c0||_0x13aed2;if(!_0x8d235d)throw CliErrors[_0x2332ee(0xec)](_0x2332ee(0xbf),'Use\x20`'+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'+CLI_BIN_NAME+_0x2332ee(0xbc));if(_0x13aed2)assertValidAppcode(_0x13aed2);const _0x164e44=resolveWriteConfigPath('project'),_0x3d1256=readConfigFile(_0x164e44),_0x3a7c87=resolveKnownApps(),_0x2d794b=isRecord(_0x3d1256[_0x2332ee(0xc8)])?{..._0x3d1256['apps']}:{},_0x5b2657=cloneProfile(_0x2d794b[_0x8d235d]),_0x397b49=sanitizeProfile(_0x3a7c87[_0x8d235d]),_0x31bb9d=_0x13aed2?{}:_0x397b49,_0x25b64a=_0x13aed2||_0x31bb9d[_0x2332ee(0xd3)];if(!_0x25b64a){const _0xf4d921=Object[_0x2332ee(0xe1)](_0x3a7c87),_0x61f126=_0xf4d921[_0x2332ee(0xc2)]===0x0?_0x2332ee(0xd4)+CLI_BIN_NAME+'\x20workspace\x20'+_0x5469b8+_0x2332ee(0xcb)+_0x8d235d+_0x2332ee(0xe9):_0x2332ee(0xc0)+_0xf4d921['join'](',\x20');throw CliErrors['validation']('App\x20\x22'+_0x8d235d+'\x22\x20not\x20found.',_0x61f126);}assertValidAppcode(String(_0x25b64a));const _0x382492={..._0x31bb9d,..._0x5b2657,'appcode':String(_0x25b64a),...collectWorkspaceProfileOverrides(_0x367acf)};return _0x2d794b[_0x8d235d]=_0x382492,_0x3d1256[_0x2332ee(0xc8)]=_0x2d794b,_0x3d1256[_0x2332ee(0xd6)]=_0x8d235d,delete _0x3d1256[_0x2332ee(0xd3)],delete _0x3d1256[_0x2332ee(0xc5)],_0x382492[_0x2332ee(0xd8)]&&(_0x3d1256['env']=_0x382492['env']),writeConfigFile(_0x164e44,_0x3d1256),{'ok':!![],'message':_0x2332ee(0xcf)+(_0x5469b8===_0x2332ee(0xc4)?_0x2332ee(0xca):'updated')+':\x20'+_0x8d235d+'\x20(appcode:\x20'+_0x382492[_0x2332ee(0xd3)]+_0x2332ee(0xed)+_0x164e44+_0x2332ee(0xee),'data':{'operation':'workspace.'+_0x5469b8,'configPath':_0x164e44,'app':_0x8d235d,'appcode':_0x382492['appcode'],'env':_0x382492[_0x2332ee(0xd8)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':'workspace','command':a144_0x4ea71c(0xc4),'description':a144_0x4ea71c(0xe5),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x234d9d=>configureWorkspace(_0x234d9d,a144_0x4ea71c(0xc4))},workspaceUseDefinition={'service':a144_0x4ea71c(0xcc),'command':a144_0x4ea71c(0xe3),'description':a144_0x4ea71c(0xe8),'risk':a144_0x4ea71c(0xbd),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x44af69=>configureWorkspace(_0x44af69,a144_0x4ea71c(0xe3))};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition];export{WORKSPACE_USAGE};
1
+ const a143_0x1f5be5=a143_0x4699;(function(_0x3387cd,_0x160a24){const _0x4858b0=a143_0x4699,_0x2c95f2=_0x3387cd();while(!![]){try{const _0x6ba679=parseInt(_0x4858b0(0x1cb))/0x1*(parseInt(_0x4858b0(0x1b8))/0x2)+-parseInt(_0x4858b0(0x1cf))/0x3*(parseInt(_0x4858b0(0x1b1))/0x4)+parseInt(_0x4858b0(0x1d3))/0x5+parseInt(_0x4858b0(0x1c3))/0x6+parseInt(_0x4858b0(0x1e1))/0x7+parseInt(_0x4858b0(0x1be))/0x8+-parseInt(_0x4858b0(0x1e3))/0x9*(parseInt(_0x4858b0(0x1e7))/0xa);if(_0x6ba679===_0x160a24)break;else _0x2c95f2['push'](_0x2c95f2['shift']());}catch(_0x3a42a7){_0x2c95f2['push'](_0x2c95f2['shift']());}}}(a143_0x16cd,0x7726a));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.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';import{validateAppcode}from'../../commands/common/validate.js';import{readConfigFile,readRawConfigWithLayers,resolveWriteConfigPath,writeConfigFile}from'../../context.js';const WORKSPACE_USAGE=CLI_BIN_NAME+a143_0x1f5be5(0x1c1),SAFE_PROFILE_KEYS=[a143_0x1f5be5(0x1d2),'env','apiDir',a143_0x1f5be5(0x1ca),a143_0x1f5be5(0x1cd),a143_0x1f5be5(0x1b6),a143_0x1f5be5(0x1bb)],workspaceFlags=[{'name':'app','type':a143_0x1f5be5(0x1c2),'description':a143_0x1f5be5(0x1b7)},{'name':a143_0x1f5be5(0x1d2),'type':'string','description':a143_0x1f5be5(0x1c7)},{'name':a143_0x1f5be5(0x1c4),'type':'string','description':a143_0x1f5be5(0x1b4),'enum':[...RABETBASE_ENV_VALUES]},{'name':a143_0x1f5be5(0x1d8),'type':a143_0x1f5be5(0x1c2),'description':a143_0x1f5be5(0x1d0)},{'name':a143_0x1f5be5(0x1df),'type':a143_0x1f5be5(0x1c2),'description':a143_0x1f5be5(0x1e2),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a143_0x1f5be5(0x1cd),'type':a143_0x1f5be5(0x1d9),'description':a143_0x1f5be5(0x1d7)},{'name':a143_0x1f5be5(0x1b6),'type':a143_0x1f5be5(0x1c2),'description':a143_0x1f5be5(0x1e6),'enum':[...RISK_LEVEL_VALUES]},{'name':'locale','type':'string','description':a143_0x1f5be5(0x1d1)}];function a143_0x4699(_0x5017dd,_0x425746){_0x5017dd=_0x5017dd-0x1af;const _0x16cd2d=a143_0x16cd();let _0x4699a8=_0x16cd2d[_0x5017dd];return _0x4699a8;}function isRecord(_0x4900e8){const _0x396af3=a143_0x1f5be5;return!!_0x4900e8&&typeof _0x4900e8==='object'&&!Array[_0x396af3(0x1da)](_0x4900e8);}function assertValidAppcode(_0x5f01f1){const _0x579596=a143_0x1f5be5,{valid:_0x39a1bb,message:_0x5b4828}=validateAppcode(_0x5f01f1);if(!_0x39a1bb)throw CliErrors[_0x579596(0x1e4)](_0x579596(0x1bc)+_0x5f01f1,_0x5b4828);}function sanitizeProfile(_0x768cd3){if(!isRecord(_0x768cd3))return{};const _0x19efe4={};for(const _0x25f82b of SAFE_PROFILE_KEYS){if(_0x768cd3[_0x25f82b]!==undefined)_0x19efe4[_0x25f82b]=_0x768cd3[_0x25f82b];}return _0x19efe4;}function cloneProfile(_0x3688a9){return isRecord(_0x3688a9)?{..._0x3688a9}:{};}function collectWorkspaceProfileOverrides(_0x34f31f){const _0xb3b8b6=a143_0x1f5be5,_0x1d7bfd={},_0x2cfbdf=_0x34f31f['str'](_0xb3b8b6(0x1c4)),_0x1349d2=_0x34f31f[_0xb3b8b6(0x1ea)](_0xb3b8b6(0x1d8)),_0x19f1d1=_0x34f31f[_0xb3b8b6(0x1ea)](_0xb3b8b6(0x1df)),_0x2d3198=_0x34f31f[_0xb3b8b6(0x1e8)](_0xb3b8b6(0x1cd)),_0xd4d49=_0x34f31f[_0xb3b8b6(0x1ea)](_0xb3b8b6(0x1b6)),_0x5260ef=_0x34f31f[_0xb3b8b6(0x1ea)](_0xb3b8b6(0x1bb));if(_0x2cfbdf)_0x1d7bfd[_0xb3b8b6(0x1c4)]=_0x2cfbdf;if(_0x1349d2)_0x1d7bfd['apiDir']=_0x1349d2;if(_0x19f1d1)_0x1d7bfd[_0xb3b8b6(0x1ca)]=_0x19f1d1;if(_0x2d3198!==undefined&&_0x2d3198!=='')_0x1d7bfd[_0xb3b8b6(0x1cd)]=Number(_0x2d3198);if(_0xd4d49)_0x1d7bfd['riskLevel']=_0xd4d49;if(_0x5260ef)_0x1d7bfd[_0xb3b8b6(0x1bb)]=_0x5260ef;return _0x1d7bfd;}async function validateWorkspaceArgs(_0x4ed398){const _0x50bf00=a143_0x1f5be5,_0xe19e57=_0x4ed398[_0x50bf00(0x1ea)](_0x50bf00(0x1d6))[_0x50bf00(0x1ce)](),_0x3444bf=_0x4ed398[_0x50bf00(0x1ea)](_0x50bf00(0x1d2))[_0x50bf00(0x1ce)]();if(!_0xe19e57&&!_0x3444bf)throw CliErrors[_0x50bf00(0x1e4)](_0x50bf00(0x1c5),_0x50bf00(0x1e9)+CLI_BIN_NAME+_0x50bf00(0x1dc)+CLI_BIN_NAME+_0x50bf00(0x1e5));if(_0x3444bf)assertValidAppcode(_0x3444bf);}function a143_0x16cd(){const _0x4a1bef=['Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','8231211QumKwA','validation','\x20workspace\x20use\x20--app\x20<name>`.','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','10OthPWe','flag','Use\x20`','str','\x20(appcode:\x20','workspace','\x20--app\x20','3560444gYmUNP','apps','globalConfig','Target\x20environment','\x20--appcode\x20<code>`.','riskLevel','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','1834YbqHea','\x22\x20not\x20found.','use','locale','Invalid\x20appcode:\x20','init','3661848IBUASJ','Workspace\x20','workspace.','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','string','2785518lQQCbw','env','Missing\x20workspace\x20app\x20selector.','initialized','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','Initialize\x20the\x20current\x20workspace\x20app\x20binding','write','format','229srCZsr','App\x20\x22','pageSize','trim','3AMjwgE','API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile','Locale\x20for\x20this\x20workspace\x20app\x20profile','appcode','3584565qOLlke','Switch\x20the\x20current\x20workspace\x20app\x20binding',').\x20Config:\x20','app','Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile','apiDir','number','isArray','.\x20Credentials:\x20not\x20written.','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','join','keys','defaultFormat','project','3106894agpOQl'];a143_0x16cd=function(){return _0x4a1bef;};return a143_0x16cd();}function resolveKnownApps(){const _0x2698c9=a143_0x1f5be5,{config:_0x53b9bb,layers:_0x32819e}=readRawConfigWithLayers(),_0x3f375c=isRecord(_0x53b9bb[_0x2698c9(0x1b2)])?_0x53b9bb[_0x2698c9(0x1b2)]:{},_0x27a185=isRecord(_0x32819e[_0x2698c9(0x1b3)][_0x2698c9(0x1b2)])?_0x32819e['globalConfig'][_0x2698c9(0x1b2)]:{};return{..._0x27a185,..._0x3f375c};}async function configureWorkspace(_0x44b519,_0x15f0b2){const _0x21eefd=a143_0x1f5be5,_0x1de354=_0x44b519['str'](_0x21eefd(0x1d6))[_0x21eefd(0x1ce)](),_0x33b6c4=_0x44b519['str'](_0x21eefd(0x1d2))[_0x21eefd(0x1ce)](),_0x40f163=_0x1de354||_0x33b6c4;if(!_0x40f163)throw CliErrors['validation'](_0x21eefd(0x1c5),_0x21eefd(0x1e9)+CLI_BIN_NAME+_0x21eefd(0x1dc)+CLI_BIN_NAME+_0x21eefd(0x1e5));if(_0x33b6c4)assertValidAppcode(_0x33b6c4);const _0x120dc2=resolveWriteConfigPath(_0x21eefd(0x1e0)),_0x812e19=readConfigFile(_0x120dc2),_0x5cea33=resolveKnownApps(),_0x305161=isRecord(_0x812e19[_0x21eefd(0x1b2)])?{..._0x812e19[_0x21eefd(0x1b2)]}:{},_0x360d0e=cloneProfile(_0x305161[_0x40f163]),_0x67e191=sanitizeProfile(_0x5cea33[_0x40f163]),_0xe6414=_0x33b6c4?{}:_0x67e191,_0x2eed46=_0x33b6c4||_0xe6414['appcode'];if(!_0x2eed46){const _0x36e914=Object[_0x21eefd(0x1de)](_0x5cea33),_0x1474f8=_0x36e914['length']===0x0?_0x21eefd(0x1e9)+CLI_BIN_NAME+'\x20workspace\x20'+_0x15f0b2+_0x21eefd(0x1b0)+_0x40f163+_0x21eefd(0x1b5):'Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20'+_0x36e914[_0x21eefd(0x1dd)](',\x20');throw CliErrors[_0x21eefd(0x1e4)](_0x21eefd(0x1cc)+_0x40f163+_0x21eefd(0x1b9),_0x1474f8);}assertValidAppcode(String(_0x2eed46));const _0x44c87a={..._0xe6414,..._0x360d0e,'appcode':String(_0x2eed46),...collectWorkspaceProfileOverrides(_0x44b519)};return _0x305161[_0x40f163]=_0x44c87a,_0x812e19['apps']=_0x305161,_0x812e19['defaultApp']=_0x40f163,delete _0x812e19[_0x21eefd(0x1d2)],delete _0x812e19[_0x21eefd(0x1d6)],_0x44c87a[_0x21eefd(0x1c4)]&&(_0x812e19[_0x21eefd(0x1c4)]=_0x44c87a[_0x21eefd(0x1c4)]),writeConfigFile(_0x120dc2,_0x812e19),{'ok':!![],'message':_0x21eefd(0x1bf)+(_0x15f0b2===_0x21eefd(0x1bd)?_0x21eefd(0x1c6):'updated')+':\x20'+_0x40f163+_0x21eefd(0x1eb)+_0x44c87a[_0x21eefd(0x1d2)]+_0x21eefd(0x1d5)+_0x120dc2+_0x21eefd(0x1db),'data':{'operation':_0x21eefd(0x1c0)+_0x15f0b2,'configPath':_0x120dc2,'app':_0x40f163,'appcode':_0x44c87a[_0x21eefd(0x1d2)],'env':_0x44c87a[_0x21eefd(0x1c4)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':a143_0x1f5be5(0x1af),'command':a143_0x1f5be5(0x1bd),'description':a143_0x1f5be5(0x1c8),'risk':a143_0x1f5be5(0x1c9),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x2ff5fa=>configureWorkspace(_0x2ff5fa,a143_0x1f5be5(0x1bd))},workspaceUseDefinition={'service':a143_0x1f5be5(0x1af),'command':a143_0x1f5be5(0x1ba),'description':a143_0x1f5be5(0x1d4),'risk':a143_0x1f5be5(0x1c9),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x3cd6e6=>configureWorkspace(_0x3cd6e6,a143_0x1f5be5(0x1ba))};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition];export{WORKSPACE_USAGE};
@@ -1 +1 @@
1
- const a145_0x49298f=a145_0x6856;(function(_0x3a24a6,_0x1c9bb4){const _0x33f72e=a145_0x6856,_0x8a3b77=_0x3a24a6();while(!![]){try{const _0x13df92=-parseInt(_0x33f72e(0x1e7))/0x1+-parseInt(_0x33f72e(0x202))/0x2+parseInt(_0x33f72e(0x205))/0x3*(parseInt(_0x33f72e(0x1fe))/0x4)+parseInt(_0x33f72e(0x1f9))/0x5*(parseInt(_0x33f72e(0x1fb))/0x6)+parseInt(_0x33f72e(0x1f2))/0x7+-parseInt(_0x33f72e(0x206))/0x8*(parseInt(_0x33f72e(0x1f1))/0x9)+-parseInt(_0x33f72e(0x1fc))/0xa*(parseInt(_0x33f72e(0x1f0))/0xb);if(_0x13df92===_0x1c9bb4)break;else _0x8a3b77['push'](_0x8a3b77['shift']());}catch(_0x77decf){_0x8a3b77['push'](_0x8a3b77['shift']());}}}(a145_0x3cfe,0x1909f));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';function a145_0x3cfe(){const _0xf92e2a=['string','toLowerCase','defaultApp','env','inherit','format','23816srxJip','pageSize','accessKey','locale','Locale','number','zh-CN','Access\x20key','map','11ollRhz','387lQbSOm','792512bTvppx','en-US','Auth\x20cookie','has','defaultFormat','length','cookie','5BARyQK','apiDir','896730hgyVIm','1695230NyxBTw','riskLevel','24jNPIgI','apps','API\x20directory\x20path','appcode','263686yCEmzR','Default\x20page\x20size','app','98703ZSRkjM','6016zjvjnw','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','entries'];a145_0x3cfe=function(){return _0xf92e2a;};return a145_0x3cfe();}import{RISK_LEVEL_VALUES}from'../constant/risk.js';export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=[a145_0x49298f(0x1f8),a145_0x49298f(0x1e9),'locale','format','riskLevel'];export const TOP_LEVEL_CONFIG_KEYS=new Set([a145_0x49298f(0x201),a145_0x49298f(0x1e4),a145_0x49298f(0x1ea),'format','cookie',a145_0x49298f(0x1e9),a145_0x49298f(0x1fa)]);function a145_0x6856(_0x480308,_0xdc794b){_0x480308=_0x480308-0x1e2;const _0x3cfe7c=a145_0x3cfe();let _0x6856e3=_0x3cfe7c[_0x480308];return _0x6856e3;}export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x4f44eb){return[..._0x4f44eb]['join'](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x48e81b){const _0x13b6f7=a145_0x49298f;return TOP_LEVEL_CONFIG_KEYS[_0x13b6f7(0x1f5)](_0x48e81b);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){return'Config\x20key\x20('+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':'env','apiDir':'apiDir','cookie':a145_0x49298f(0x1f8),'accessKey':a145_0x49298f(0x1e9),'defaultFormat':'format','pageSize':'pageSize','riskLevel':a145_0x49298f(0x1fd),'locale':a145_0x49298f(0x1ea)};export function getAppProfileFlagDefs(){const _0x2c6671=a145_0x49298f;return[{'name':_0x2c6671(0x1e4),'type':_0x2c6671(0x209),'description':'Target\x20environment','enum':[...RABETBASE_ENV_VALUES]},{'name':_0x2c6671(0x1fa),'type':'string','description':_0x2c6671(0x200)},{'name':'cookie','type':'string','description':_0x2c6671(0x1f4),'hidden':!![]},{'name':_0x2c6671(0x1e9),'type':_0x2c6671(0x209),'description':_0x2c6671(0x1ee),'hidden':!![]},{'name':_0x2c6671(0x1f6),'type':_0x2c6671(0x209),'description':_0x2c6671(0x207),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':'pageSize','type':_0x2c6671(0x1ec),'description':_0x2c6671(0x203)},{'name':_0x2c6671(0x1fd),'type':_0x2c6671(0x209),'description':'Risk\x20level','enum':[...RISK_LEVEL_VALUES]},{'name':_0x2c6671(0x1ea),'type':_0x2c6671(0x209),'description':_0x2c6671(0x1eb)}];}export function collectAppProfileOverrides(_0xe8c439){const _0x52d45d=a145_0x49298f,_0x1b0cd9={};for(const [_0x35d828,_0x383157]of Object[_0x52d45d(0x208)](APP_PROFILE_FLAG_KEY_MAP)){const _0x282e8a=_0xe8c439(_0x35d828);if(!_0x282e8a)continue;_0x1b0cd9[_0x383157]=_0x383157===_0x52d45d(0x1e8)?Number(_0x282e8a):_0x282e8a;}return _0x1b0cd9;}export function buildAppProfileListFields(_0x18730c){const _0x24c682=a145_0x49298f;return{'env':_0x18730c[_0x24c682(0x1e4)]??null,'apiDir':_0x18730c[_0x24c682(0x1fa)]??null,'hasCookie':!!_0x18730c['cookie'],'hasAccessKey':!!_0x18730c[_0x24c682(0x1e9)],'format':_0x18730c[_0x24c682(0x1e6)]??null,'pageSize':_0x18730c[_0x24c682(0x1e8)]??null,'riskLevel':_0x18730c['riskLevel']??null,'locale':_0x18730c[_0x24c682(0x1ea)]??null};}export function buildAppDoctorFields(_0x50fc40,_0x47c9fa){const _0x49e37c=a145_0x49298f;return{'env':{'value':_0x50fc40[_0x49e37c(0x1e4)]||_0x47c9fa['env'],'source':_0x50fc40['env']?_0x49e37c(0x204):_0x49e37c(0x1e5)},'apiDir':{'value':_0x50fc40['apiDir']||_0x47c9fa['apiDir'],'source':_0x50fc40['apiDir']?'app':_0x49e37c(0x1e5)},'cookie':{'value':_0x50fc40[_0x49e37c(0x1f8)]||_0x47c9fa[_0x49e37c(0x1f8)],'source':_0x50fc40[_0x49e37c(0x1f8)]?_0x49e37c(0x204):_0x49e37c(0x1e5)},'accessKey':{'value':_0x50fc40['accessKey']||_0x47c9fa[_0x49e37c(0x1e9)],'source':_0x50fc40['accessKey']?_0x49e37c(0x204):_0x49e37c(0x1e5)}};}export function buildCanonicalAppConfig(_0x519802,_0xf4d8de){const _0x43fda9=a145_0x49298f,_0x28976f=_0x519802[_0x43fda9(0x1ef)](_0x43e02e=>String(_0x43e02e||'')['trim']())['filter'](Boolean);if(_0x28976f[_0x43fda9(0x1f7)]===0x0)return{};const _0x34b4d9={};for(const _0x335fed of _0x28976f){_0x34b4d9[_0x335fed]=_0xf4d8de?{'appcode':_0x335fed,'env':_0xf4d8de}:{'appcode':_0x335fed};}return{'apps':_0x34b4d9,'defaultApp':_0x28976f[0x0]};}export function buildCanonicalProjectConfig(_0xe18d38,_0xcfa9c9){const _0x9c5c72=a145_0x49298f,{appCodes:appCodes=[],env:_0x510352,metadata:_0x136940}=_0xcfa9c9,_0x32603c={..._0xe18d38,..._0x136940||{}};delete _0x32603c[_0x9c5c72(0x201)],delete _0x32603c[_0x9c5c72(0x204)];if(_0x510352)_0x32603c[_0x9c5c72(0x1e4)]=_0x510352;else!_0x32603c[_0x9c5c72(0x1e4)]&&(_0x32603c['env']=DEFAULT_CONFIG_VALUES['env']);const _0x25765a=buildCanonicalAppConfig(appCodes,_0x32603c[_0x9c5c72(0x1e4)]);return Object['keys'](_0x25765a)[_0x9c5c72(0x1f7)]>0x0&&(_0x32603c[_0x9c5c72(0x1ff)]=_0x25765a['apps'],_0x32603c[_0x9c5c72(0x1e3)]=_0x25765a[_0x9c5c72(0x1e3)]),_0x32603c;}const LOCALE_MAP={'zh':a145_0x49298f(0x1ed),'zh-cn':a145_0x49298f(0x1ed),'zh_cn':a145_0x49298f(0x1ed),'en':'en-US','en-us':'en-US','en_us':a145_0x49298f(0x1f3)};export function normalizeLocale(_0x3b07ed){const _0x17f9ab=a145_0x49298f;if(!_0x3b07ed)return null;return LOCALE_MAP[_0x3b07ed[_0x17f9ab(0x1e2)]()]??null;}
1
+ const a144_0x29cc8f=a144_0x1d2e;(function(_0x417e41,_0x5376ce){const _0x265b88=a144_0x1d2e,_0x10704c=_0x417e41();while(!![]){try{const _0x549ba1=-parseInt(_0x265b88(0x6d))/0x1*(-parseInt(_0x265b88(0x83))/0x2)+-parseInt(_0x265b88(0x8a))/0x3*(parseInt(_0x265b88(0x7c))/0x4)+-parseInt(_0x265b88(0x73))/0x5+parseInt(_0x265b88(0x79))/0x6+parseInt(_0x265b88(0x85))/0x7+parseInt(_0x265b88(0x86))/0x8*(parseInt(_0x265b88(0x8d))/0x9)+parseInt(_0x265b88(0x89))/0xa*(-parseInt(_0x265b88(0x8c))/0xb);if(_0x549ba1===_0x5376ce)break;else _0x10704c['push'](_0x10704c['shift']());}catch(_0x220eeb){_0x10704c['push'](_0x10704c['shift']());}}}(a144_0x402a,0x96be7));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RABETBASE_ENV_VALUES}from'../constant/env.js';import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{RISK_LEVEL_VALUES}from'../constant/risk.js';export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=['cookie',a144_0x29cc8f(0x77),a144_0x29cc8f(0x87),a144_0x29cc8f(0x7e),a144_0x29cc8f(0x8f)];function a144_0x1d2e(_0x3a4faf,_0x1ed003){_0x3a4faf=_0x3a4faf-0x6b;const _0x402aa9=a144_0x402a();let _0x1d2ef8=_0x402aa9[_0x3a4faf];return _0x1d2ef8;}export const TOP_LEVEL_CONFIG_KEYS=new Set([a144_0x29cc8f(0x7b),a144_0x29cc8f(0x88),a144_0x29cc8f(0x87),a144_0x29cc8f(0x7e),a144_0x29cc8f(0x75),a144_0x29cc8f(0x77),a144_0x29cc8f(0x8e)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x457765){return[..._0x457765]['join'](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x3abc93){const _0x572da7=a144_0x29cc8f;return TOP_LEVEL_CONFIG_KEYS[_0x572da7(0x81)](_0x3abc93);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){return'Config\x20key\x20('+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':a144_0x29cc8f(0x88),'apiDir':a144_0x29cc8f(0x8e),'cookie':a144_0x29cc8f(0x75),'accessKey':a144_0x29cc8f(0x77),'defaultFormat':a144_0x29cc8f(0x7e),'pageSize':'pageSize','riskLevel':a144_0x29cc8f(0x8f),'locale':'locale'};export function getAppProfileFlagDefs(){const _0x1e2c74=a144_0x29cc8f;return[{'name':_0x1e2c74(0x88),'type':_0x1e2c74(0x78),'description':_0x1e2c74(0x76),'enum':[...RABETBASE_ENV_VALUES]},{'name':'apiDir','type':'string','description':'API\x20directory\x20path'},{'name':_0x1e2c74(0x75),'type':_0x1e2c74(0x78),'description':_0x1e2c74(0x6c),'hidden':!![]},{'name':_0x1e2c74(0x77),'type':_0x1e2c74(0x78),'description':_0x1e2c74(0x7f),'hidden':!![]},{'name':_0x1e2c74(0x90),'type':'string','description':_0x1e2c74(0x74),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0x1e2c74(0x8b),'type':'number','description':'Default\x20page\x20size'},{'name':'riskLevel','type':_0x1e2c74(0x78),'description':_0x1e2c74(0x80),'enum':[...RISK_LEVEL_VALUES]},{'name':'locale','type':_0x1e2c74(0x78),'description':'Locale'}];}export function collectAppProfileOverrides(_0x33a031){const _0x4db2c4=a144_0x29cc8f,_0x332f69={};for(const [_0x5b726f,_0xf5464c]of Object['entries'](APP_PROFILE_FLAG_KEY_MAP)){const _0x29644=_0x33a031(_0x5b726f);if(!_0x29644)continue;_0x332f69[_0xf5464c]=_0xf5464c===_0x4db2c4(0x8b)?Number(_0x29644):_0x29644;}return _0x332f69;}export function buildAppProfileListFields(_0x31a2ba){const _0x1f48e0=a144_0x29cc8f;return{'env':_0x31a2ba[_0x1f48e0(0x88)]??null,'apiDir':_0x31a2ba['apiDir']??null,'hasCookie':!!_0x31a2ba[_0x1f48e0(0x75)],'hasAccessKey':!!_0x31a2ba[_0x1f48e0(0x77)],'format':_0x31a2ba[_0x1f48e0(0x7e)]??null,'pageSize':_0x31a2ba['pageSize']??null,'riskLevel':_0x31a2ba[_0x1f48e0(0x8f)]??null,'locale':_0x31a2ba['locale']??null};}export function buildAppDoctorFields(_0x228aa8,_0x353015){const _0x1c7647=a144_0x29cc8f;return{'env':{'value':_0x228aa8['env']||_0x353015[_0x1c7647(0x88)],'source':_0x228aa8['env']?_0x1c7647(0x84):'inherit'},'apiDir':{'value':_0x228aa8['apiDir']||_0x353015[_0x1c7647(0x8e)],'source':_0x228aa8['apiDir']?_0x1c7647(0x84):_0x1c7647(0x70)},'cookie':{'value':_0x228aa8[_0x1c7647(0x75)]||_0x353015[_0x1c7647(0x75)],'source':_0x228aa8[_0x1c7647(0x75)]?'app':_0x1c7647(0x70)},'accessKey':{'value':_0x228aa8[_0x1c7647(0x77)]||_0x353015[_0x1c7647(0x77)],'source':_0x228aa8[_0x1c7647(0x77)]?_0x1c7647(0x84):_0x1c7647(0x70)}};}export function buildCanonicalAppConfig(_0x2dfc26,_0x28fddf){const _0x3051cb=a144_0x29cc8f,_0x14ed1c=_0x2dfc26[_0x3051cb(0x82)](_0x3f4946=>String(_0x3f4946||'')['trim']())[_0x3051cb(0x7a)](Boolean);if(_0x14ed1c['length']===0x0)return{};const _0x491cad={};for(const _0x48b648 of _0x14ed1c){_0x491cad[_0x48b648]=_0x28fddf?{'appcode':_0x48b648,'env':_0x28fddf}:{'appcode':_0x48b648};}return{'apps':_0x491cad,'defaultApp':_0x14ed1c[0x0]};}export function buildCanonicalProjectConfig(_0x33734a,_0x176f40){const _0x1cf64a=a144_0x29cc8f,{appCodes:appCodes=[],env:_0xe7a691,metadata:_0x355311}=_0x176f40,_0x3973d1={..._0x33734a,..._0x355311||{}};delete _0x3973d1['appcode'],delete _0x3973d1[_0x1cf64a(0x84)];if(_0xe7a691)_0x3973d1[_0x1cf64a(0x88)]=_0xe7a691;else!_0x3973d1[_0x1cf64a(0x88)]&&(_0x3973d1[_0x1cf64a(0x88)]=DEFAULT_CONFIG_VALUES[_0x1cf64a(0x88)]);const _0x15a995=buildCanonicalAppConfig(appCodes,_0x3973d1['env']);return Object[_0x1cf64a(0x7d)](_0x15a995)[_0x1cf64a(0x6b)]>0x0&&(_0x3973d1[_0x1cf64a(0x6f)]=_0x15a995['apps'],_0x3973d1[_0x1cf64a(0x72)]=_0x15a995['defaultApp']),_0x3973d1;}function a144_0x402a(){const _0xeeda91=['zh-CN','length','Auth\x20cookie','5426lmzVXI','toLowerCase','apps','inherit','en-US','defaultApp','71995qSeXQt','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','cookie','Target\x20environment','accessKey','string','2374770xchtbj','filter','appcode','85868QJOfyL','keys','format','Access\x20key','Risk\x20level','has','map','454DclTwN','app','2507029avXWxZ','1624vljSKh','locale','env','28370dIFfLv','105zjYHSD','pageSize','3685QkToVS','15426jWDkVy','apiDir','riskLevel','defaultFormat'];a144_0x402a=function(){return _0xeeda91;};return a144_0x402a();}const LOCALE_MAP={'zh':a144_0x29cc8f(0x91),'zh-cn':'zh-CN','zh_cn':a144_0x29cc8f(0x91),'en':a144_0x29cc8f(0x71),'en-us':a144_0x29cc8f(0x71),'en_us':a144_0x29cc8f(0x71)};export function normalizeLocale(_0x108640){const _0x3f116f=a144_0x29cc8f;if(!_0x108640)return null;return LOCALE_MAP[_0x108640[_0x3f116f(0x6e)]()]??null;}
@@ -1 +1 @@
1
- function a146_0x396b(_0x37c821,_0x3a04c4){_0x37c821=_0x37c821-0x126;const _0x6b68ca=a146_0x6b68();let _0x396bd3=_0x6b68ca[_0x37c821];return _0x396bd3;}const a146_0x416463=a146_0x396b;(function(_0x2df937,_0x57cd15){const _0x2ce712=a146_0x396b,_0x4c3214=_0x2df937();while(!![]){try{const _0x214d26=parseInt(_0x2ce712(0x129))/0x1+-parseInt(_0x2ce712(0x12d))/0x2*(parseInt(_0x2ce712(0x12c))/0x3)+parseInt(_0x2ce712(0x12a))/0x4*(-parseInt(_0x2ce712(0x127))/0x5)+parseInt(_0x2ce712(0x131))/0x6+parseInt(_0x2ce712(0x12f))/0x7+parseInt(_0x2ce712(0x130))/0x8*(-parseInt(_0x2ce712(0x128))/0x9)+parseInt(_0x2ce712(0x12e))/0xa*(parseInt(_0x2ce712(0x12b))/0xb);if(_0x214d26===_0x57cd15)break;else _0x4c3214['push'](_0x4c3214['shift']());}catch(_0x534f98){_0x4c3214['push'](_0x4c3214['shift']());}}}(a146_0x6b68,0x7b39b));function a146_0x6b68(){const _0x49853c=['92JIpvpE','610EdGMZp','229831DneAog','53904ANFxOv','804210ZRgfvO','https://g.lovrabet.com/dist/rabetbase-cli/config/index.json','15whNKHh','279eCDOjo','301185EcgFXm','696936TEAYmv','173162YtexKV','12522MFzXKb'];a146_0x6b68=function(){return _0x49853c;};return a146_0x6b68();}export const CLI_VERSION_POLICY_URL=a146_0x416463(0x126);
1
+ (function(_0x3f8c1b,_0x2ee71a){const _0x1650c2=a145_0x7672,_0x168be2=_0x3f8c1b();while(!![]){try{const _0x2aae9b=-parseInt(_0x1650c2(0xdb))/0x1*(parseInt(_0x1650c2(0xdc))/0x2)+parseInt(_0x1650c2(0xd9))/0x3*(parseInt(_0x1650c2(0xd6))/0x4)+parseInt(_0x1650c2(0xe0))/0x5+parseInt(_0x1650c2(0xdd))/0x6*(-parseInt(_0x1650c2(0xda))/0x7)+-parseInt(_0x1650c2(0xdf))/0x8+-parseInt(_0x1650c2(0xd7))/0x9+parseInt(_0x1650c2(0xde))/0xa*(parseInt(_0x1650c2(0xd8))/0xb);if(_0x2aae9b===_0x2ee71a)break;else _0x168be2['push'](_0x168be2['shift']());}catch(_0x10039d){_0x168be2['push'](_0x168be2['shift']());}}}(a145_0x5488,0xd3349));function a145_0x5488(){const _0x465583=['1580kNarkF','5617280bZSUkR','7426650gxkVXr','772oPpzGv','8152128ifcoUx','114301mDdJuj','14253zYPlxm','3074967bKCNPB','253159ipOnlG','2BtJyZT','18kbVlLd'];a145_0x5488=function(){return _0x465583;};return a145_0x5488();}function a145_0x7672(_0x4b24a9,_0x3da710){_0x4b24a9=_0x4b24a9-0xd6;const _0x54885d=a145_0x5488();let _0x7672b8=_0x54885d[_0x4b24a9];return _0x7672b8;}export const CLI_VERSION_POLICY_URL='https://g.lovrabet.com/dist/rabetbase-cli/config/index.json';
@@ -1 +1 @@
1
- const a147_0x30ce60=a147_0x571d;(function(_0xfccc4e,_0x2dee66){const _0xbe637=a147_0x571d,_0x2dea66=_0xfccc4e();while(!![]){try{const _0x4458fc=-parseInt(_0xbe637(0x197))/0x1*(-parseInt(_0xbe637(0x163))/0x2)+parseInt(_0xbe637(0x1a2))/0x3*(parseInt(_0xbe637(0x1cd))/0x4)+-parseInt(_0xbe637(0x1af))/0x5*(-parseInt(_0xbe637(0x19c))/0x6)+-parseInt(_0xbe637(0x198))/0x7+-parseInt(_0xbe637(0x1b9))/0x8*(parseInt(_0xbe637(0x182))/0x9)+parseInt(_0xbe637(0x18b))/0xa+-parseInt(_0xbe637(0x1b6))/0xb;if(_0x4458fc===_0x2dee66)break;else _0x2dea66['push'](_0x2dea66['shift']());}catch(_0x5ce6aa){_0x2dea66['push'](_0x2dea66['shift']());}}}(a147_0x72e0,0xc4bce));export const CLI_BIN_NAME=a147_0x30ce60(0x17c);export const CLI_DISPLAY_NAME=a147_0x30ce60(0x1bd);function a147_0x571d(_0x4a0bc4,_0xd5ad3){_0x4a0bc4=_0x4a0bc4-0x163;const _0x72e06b=a147_0x72e0();let _0x571d51=_0x72e06b[_0x4a0bc4];return _0x571d51;}export const NPM_PACKAGE_NAME=a147_0x30ce60(0x1bf);export const GLOBAL_FLAGS=[{'name':a147_0x30ce60(0x16d),'meowKey':a147_0x30ce60(0x16d),'type':'string','description':a147_0x30ce60(0x1aa),'hint':a147_0x30ce60(0x1a9)},{'name':a147_0x30ce60(0x1b3),'meowKey':'app','type':'string','description':a147_0x30ce60(0x1a5),'hint':'<name>'},{'name':a147_0x30ce60(0x1a4),'meowKey':a147_0x30ce60(0x1a4),'type':a147_0x30ce60(0x18e),'description':'Environment','hint':'production\x20|\x20daily'},{'name':a147_0x30ce60(0x169),'meowKey':'format','type':a147_0x30ce60(0x18e),'description':'Output\x20format','hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':a147_0x30ce60(0x18e),'description':a147_0x30ce60(0x18a),'hint':a147_0x30ce60(0x185)},{'name':a147_0x30ce60(0x172),'meowKey':a147_0x30ce60(0x1ca),'type':'boolean','description':a147_0x30ce60(0x1bb)},{'name':a147_0x30ce60(0x1b8),'meowKey':a147_0x30ce60(0x1b8),'type':'boolean','description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':a147_0x30ce60(0x1b7),'meowKey':'nonInteractive','type':a147_0x30ce60(0x196),'description':a147_0x30ce60(0x191)},{'name':a147_0x30ce60(0x192),'meowKey':'global','type':a147_0x30ce60(0x196),'description':a147_0x30ce60(0x187)},{'name':'project','meowKey':'project','type':'boolean','description':'Use\x20project\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a147_0x30ce60(0x196),'description':a147_0x30ce60(0x17f),'hidden':!![]},{'name':'help','meowKey':a147_0x30ce60(0x1bc),'type':a147_0x30ce60(0x196),'description':'Show\x20help'},{'name':a147_0x30ce60(0x1a0),'meowKey':'name','type':'string','description':'Name','hidden':!![]},{'name':a147_0x30ce60(0x164),'meowKey':a147_0x30ce60(0x164),'type':'string','description':a147_0x30ce60(0x17d),'hidden':!![]},{'name':a147_0x30ce60(0x1c1),'meowKey':a147_0x30ce60(0x1c1),'type':a147_0x30ce60(0x196),'description':a147_0x30ce60(0x178),'hidden':!![]},{'name':a147_0x30ce60(0x1a3),'meowKey':a147_0x30ce60(0x1a3),'type':a147_0x30ce60(0x196),'description':a147_0x30ce60(0x199),'hidden':!![]},{'name':a147_0x30ce60(0x1b1),'meowKey':a147_0x30ce60(0x1b1),'type':'string','description':a147_0x30ce60(0x1c5),'hidden':!![]},{'name':a147_0x30ce60(0x168),'meowKey':a147_0x30ce60(0x168),'type':a147_0x30ce60(0x18e),'description':a147_0x30ce60(0x193),'hidden':!![]},{'name':a147_0x30ce60(0x1a7),'meowKey':a147_0x30ce60(0x1a7),'type':a147_0x30ce60(0x18e),'description':'Dataset\x20code','hidden':!![]},{'name':'all','meowKey':a147_0x30ce60(0x170),'type':'boolean','description':a147_0x30ce60(0x1b4),'hidden':!![]},{'name':'enable-bff-save','meowKey':'enableBffSave','type':a147_0x30ce60(0x196),'description':a147_0x30ce60(0x1c8),'hidden':!![]},{'name':'id','meowKey':'id','type':a147_0x30ce60(0x18e),'description':a147_0x30ce60(0x18c),'hidden':!![]},{'name':a147_0x30ce60(0x177),'meowKey':'type','type':a147_0x30ce60(0x18e),'description':a147_0x30ce60(0x16e),'hidden':!![]},{'name':'file','meowKey':'file','type':a147_0x30ce60(0x18e),'description':'File\x20path','hidden':!![]},{'name':a147_0x30ce60(0x173),'meowKey':a147_0x30ce60(0x173),'type':'string','description':a147_0x30ce60(0x1ad),'hidden':!![]},{'name':'sql-name','meowKey':a147_0x30ce60(0x166),'type':a147_0x30ce60(0x18e),'description':a147_0x30ce60(0x19f),'hidden':!![]},{'name':a147_0x30ce60(0x16f),'meowKey':a147_0x30ce60(0x16f),'type':a147_0x30ce60(0x18e),'description':a147_0x30ce60(0x19f),'hidden':!![]},{'name':a147_0x30ce60(0x1c9),'meowKey':a147_0x30ce60(0x195),'type':a147_0x30ce60(0x18e),'description':a147_0x30ce60(0x175),'hidden':!![]},{'name':a147_0x30ce60(0x1ba),'meowKey':'dbid','type':'string','description':a147_0x30ce60(0x175),'hidden':!![]},{'name':a147_0x30ce60(0x1ab),'meowKey':'description','type':a147_0x30ce60(0x18e),'description':a147_0x30ce60(0x16b),'hidden':!![]},{'name':'description-file','meowKey':a147_0x30ce60(0x1cc),'type':'string','description':a147_0x30ce60(0x188),'hidden':!![]},{'name':'page','meowKey':a147_0x30ce60(0x1a8),'type':a147_0x30ce60(0x18e),'description':'Page\x20number','hidden':!![]},{'name':a147_0x30ce60(0x186),'meowKey':'pagesize','type':a147_0x30ce60(0x18e),'description':'Page\x20size','hidden':!![]},{'name':a147_0x30ce60(0x1c3),'meowKey':'keyword','type':a147_0x30ce60(0x18e),'description':a147_0x30ce60(0x1cb),'hidden':!![]},{'name':'code','meowKey':'code','type':a147_0x30ce60(0x18e),'description':'Code\x20filter','hidden':!![]},{'name':a147_0x30ce60(0x167),'meowKey':a147_0x30ce60(0x167),'type':a147_0x30ce60(0x18e),'description':'SQL\x20string','hidden':!![]},{'name':'schemas','meowKey':'schemas','type':a147_0x30ce60(0x18e),'description':'Schemas','hidden':!![]},{'name':a147_0x30ce60(0x16c),'meowKey':a147_0x30ce60(0x16c),'type':a147_0x30ce60(0x18e),'description':a147_0x30ce60(0x1c6),'hidden':!![]},{'name':a147_0x30ce60(0x1a6),'meowKey':'target','type':a147_0x30ce60(0x18e),'description':a147_0x30ce60(0x176),'hidden':!![]},{'name':a147_0x30ce60(0x19b),'meowKey':a147_0x30ce60(0x17e),'type':a147_0x30ce60(0x196),'description':a147_0x30ce60(0x183),'hidden':!![]},{'name':a147_0x30ce60(0x1a1),'meowKey':'key','type':'string','description':a147_0x30ce60(0x16a),'hidden':!![]},{'name':a147_0x30ce60(0x171),'meowKey':a147_0x30ce60(0x171),'type':a147_0x30ce60(0x18e),'description':a147_0x30ce60(0x19d),'hidden':!![]},{'name':a147_0x30ce60(0x19a),'meowKey':a147_0x30ce60(0x19a),'type':a147_0x30ce60(0x18e),'description':a147_0x30ce60(0x181),'hidden':!![]},{'name':a147_0x30ce60(0x19e),'meowKey':a147_0x30ce60(0x19e),'type':a147_0x30ce60(0x196),'description':a147_0x30ce60(0x190),'hidden':!![]},{'name':a147_0x30ce60(0x18f),'meowKey':'fromEnv','type':a147_0x30ce60(0x18e),'description':a147_0x30ce60(0x1b5),'hidden':!![]},{'name':a147_0x30ce60(0x1b0),'meowKey':'reveal','type':a147_0x30ce60(0x196),'description':a147_0x30ce60(0x1ae),'hidden':!![]},{'name':'force','meowKey':a147_0x30ce60(0x1ac),'type':a147_0x30ce60(0x196),'description':a147_0x30ce60(0x189),'hidden':!![]},{'name':a147_0x30ce60(0x1c7),'meowKey':'confirm','type':a147_0x30ce60(0x196),'description':a147_0x30ce60(0x194),'hidden':!![]},{'name':a147_0x30ce60(0x165),'meowKey':a147_0x30ce60(0x165),'type':a147_0x30ce60(0x196),'description':a147_0x30ce60(0x1c0),'hidden':!![]},{'name':a147_0x30ce60(0x18d),'meowKey':'verbose','type':'boolean','description':a147_0x30ce60(0x1c2),'hidden':!![]},{'name':a147_0x30ce60(0x17a),'meowKey':a147_0x30ce60(0x179),'type':'string','description':a147_0x30ce60(0x1be),'hidden':!![]},{'name':a147_0x30ce60(0x174),'meowKey':a147_0x30ce60(0x1b2),'type':'string','description':a147_0x30ce60(0x1c6),'hidden':!![]},{'name':a147_0x30ce60(0x184),'meowKey':a147_0x30ce60(0x17b),'type':a147_0x30ce60(0x18e),'description':a147_0x30ce60(0x180),'hidden':!![]}];function a147_0x72e0(){const _0x24ad65=['sqlcode','operation-type','DB\x20ID','Target\x20path','type','Clear','expectedCount','expected-count','functionNode','rabetbase','Title','skipImports','Alias\x20for\x20--non-interactive','Function\x20node','Tags','9sujFAM','Skip\x20import\x20generation','function-node','<expr>','pagesize','Use\x20global\x20config\x20scope','Description\x20file','Force\x20overwrite','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','12142020zESwbm','Record\x20ID','verbose','string','from-env','Read\x20value\x20from\x20stdin','Force\x20non-interactive\x20mode\x20(CI)','global','JSON\x20params','Confirm\x20destructive\x20action','dbId','boolean','1288939dQlYvI','1574811yrbhPN','Watch\x20mode','tags','skip-imports','4962xzZacg','Config\x20value','stdin','SQL\x20name','name','key','6mNwCsU','watch','env','Select\x20app\x20profile\x20by\x20name','target','datasetcode','page','<code>','Override\x20appcode','description','force','SQL\x20code','Reveal\x20sensitive\x20value','5615lvXivn','reveal','output','operationType','app','Apply\x20to\x20all','Read\x20value\x20from\x20environment\x20variable','17586272ArINQK','non-interactive','yes','8175352YxWHJS','dbid','Preview\x20operation\x20without\x20executing','help','Rabetbase\x20CLI','Expected\x20affected\x20count','@lovrabet/rabetbase-cli','Use\x20remote','clear','Verbose\x20output','keyword','map','Output\x20path','Operation\x20type','confirm','Enable\x20BFF\x20save','db-id','dryRun','Keyword\x20filter','descriptionFile','439240XomWKt','2yfUZmk','title','remote','sqlName','sql','params','format','Config\x20key','Description','operation','appcode','Type\x20filter','sqlname','all','value','dry-run'];a147_0x72e0=function(){return _0x24ad65;};return a147_0x72e0();}export const PIPELINE_FLAG_NAMES=new Set([a147_0x30ce60(0x16d),a147_0x30ce60(0x1b3),a147_0x30ce60(0x1a4),a147_0x30ce60(0x169),'jq',a147_0x30ce60(0x172),'yes','non-interactive','ci']);export function buildMeowFlags(){const _0xe4304c=a147_0x30ce60;return Object['fromEntries'](GLOBAL_FLAGS[_0xe4304c(0x1c4)](_0x316304=>[_0x316304['meowKey'],{'type':_0x316304[_0xe4304c(0x177)]}]));}
1
+ const a146_0x144bf2=a146_0x4b5b;(function(_0x69e2e1,_0x2698bf){const _0x5dad7b=a146_0x4b5b,_0x35dd00=_0x69e2e1();while(!![]){try{const _0x4a4ef2=parseInt(_0x5dad7b(0x22a))/0x1*(-parseInt(_0x5dad7b(0x1de))/0x2)+parseInt(_0x5dad7b(0x20a))/0x3+parseInt(_0x5dad7b(0x1e3))/0x4+parseInt(_0x5dad7b(0x1fa))/0x5*(-parseInt(_0x5dad7b(0x209))/0x6)+-parseInt(_0x5dad7b(0x206))/0x7+-parseInt(_0x5dad7b(0x213))/0x8+parseInt(_0x5dad7b(0x204))/0x9;if(_0x4a4ef2===_0x2698bf)break;else _0x35dd00['push'](_0x35dd00['shift']());}catch(_0x128b98){_0x35dd00['push'](_0x35dd00['shift']());}}}(a146_0xb7b8,0xa49a8));export const CLI_BIN_NAME='rabetbase';function a146_0xb7b8(){const _0x19f141=['Schemas','10459448gWGsgr','non-interactive','sql','schemas','Show\x20help','expected-count','Confirm\x20destructive\x20action','help','code','SQL\x20name','Page\x20number','json\x20|\x20pretty\x20|\x20compress','confirm','Preview\x20operation\x20without\x20executing','sqlcode','Page\x20size','Function\x20node','type','Code\x20filter','Dataset\x20code','Use\x20remote','env','pagesize','1uHvOPJ','DB\x20ID','keyword','fromEntries','remote','Config\x20value','Apply\x20to\x20all','@lovrabet/rabetbase-cli','enableBffSave','stdin','boolean','Name','project','operation','Target\x20path','Reveal\x20sensitive\x20value','Output\x20path','target','title','skip-imports','tags','datasetcode','meowKey','fromEnv','Description\x20file','global','File\x20path','description-file','string','params','Description','Use\x20global\x20config\x20scope','descriptionFile','SQL\x20string','1965638ThbEQT','dryRun','key','<code>','reveal','4941356NpsJXd','expectedCount','all','skipImports','<expr>','Skip\x20confirmation\x20for\x20high-risk\x20writes','Tags','value','name','description','Title','Use\x20project\x20config\x20scope','watch','enable-bff-save','functionNode','Rabetbase\x20CLI','clear','page','Clear','format','Skip\x20import\x20generation','yes','<name>','15155qeHIUw','Read\x20value\x20from\x20environment\x20variable','file','verbose','production\x20|\x20daily','output','Output\x20format','Select\x20app\x20profile\x20by\x20name','dry-run','nonInteractive','29505393qUXVRg','app','5293323EgqLsa','Verbose\x20output','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','1968uchPGE','603321CPmNRQ','dbid','Config\x20key','Operation\x20type','Type\x20filter','SQL\x20code','appcode','force'];a146_0xb7b8=function(){return _0x19f141;};return a146_0xb7b8();}export const CLI_DISPLAY_NAME=a146_0x144bf2(0x1f2);export const NPM_PACKAGE_NAME=a146_0x144bf2(0x231);function a146_0x4b5b(_0x4ed5a2,_0x57404f){_0x4ed5a2=_0x4ed5a2-0x1c6;const _0xb7b84=a146_0xb7b8();let _0x4b5bde=_0xb7b84[_0x4ed5a2];return _0x4b5bde;}export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':a146_0x144bf2(0x210),'type':a146_0x144bf2(0x1d8),'description':'Override\x20appcode','hint':a146_0x144bf2(0x1e1)},{'name':a146_0x144bf2(0x205),'meowKey':a146_0x144bf2(0x205),'type':a146_0x144bf2(0x1d8),'description':a146_0x144bf2(0x201),'hint':a146_0x144bf2(0x1f9)},{'name':'env','meowKey':a146_0x144bf2(0x228),'type':'string','description':'Environment','hint':a146_0x144bf2(0x1fe)},{'name':a146_0x144bf2(0x1f6),'meowKey':'format','type':a146_0x144bf2(0x1d8),'description':a146_0x144bf2(0x200),'hint':a146_0x144bf2(0x21e)},{'name':'jq','meowKey':'jq','type':a146_0x144bf2(0x1d8),'description':a146_0x144bf2(0x208),'hint':a146_0x144bf2(0x1e7)},{'name':a146_0x144bf2(0x202),'meowKey':a146_0x144bf2(0x1df),'type':a146_0x144bf2(0x1c6),'description':a146_0x144bf2(0x220)},{'name':a146_0x144bf2(0x1f8),'meowKey':a146_0x144bf2(0x1f8),'type':a146_0x144bf2(0x1c6),'description':a146_0x144bf2(0x1e8)},{'name':a146_0x144bf2(0x214),'meowKey':a146_0x144bf2(0x203),'type':a146_0x144bf2(0x1c6),'description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':a146_0x144bf2(0x1d5),'meowKey':a146_0x144bf2(0x1d5),'type':'boolean','description':a146_0x144bf2(0x1db)},{'name':a146_0x144bf2(0x1c8),'meowKey':'project','type':a146_0x144bf2(0x1c6),'description':a146_0x144bf2(0x1ee)},{'name':'ci','meowKey':'ci','type':a146_0x144bf2(0x1c6),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':a146_0x144bf2(0x21a),'meowKey':a146_0x144bf2(0x21a),'type':a146_0x144bf2(0x1c6),'description':a146_0x144bf2(0x217)},{'name':a146_0x144bf2(0x1eb),'meowKey':a146_0x144bf2(0x1eb),'type':a146_0x144bf2(0x1d8),'description':a146_0x144bf2(0x1c7),'hidden':!![]},{'name':a146_0x144bf2(0x1ce),'meowKey':a146_0x144bf2(0x1ce),'type':'string','description':a146_0x144bf2(0x1ed),'hidden':!![]},{'name':a146_0x144bf2(0x1f3),'meowKey':a146_0x144bf2(0x1f3),'type':a146_0x144bf2(0x1c6),'description':a146_0x144bf2(0x1f5),'hidden':!![]},{'name':a146_0x144bf2(0x1ef),'meowKey':a146_0x144bf2(0x1ef),'type':'boolean','description':'Watch\x20mode','hidden':!![]},{'name':a146_0x144bf2(0x1ff),'meowKey':a146_0x144bf2(0x1ff),'type':a146_0x144bf2(0x1d8),'description':a146_0x144bf2(0x1cc),'hidden':!![]},{'name':a146_0x144bf2(0x1d9),'meowKey':'params','type':a146_0x144bf2(0x1d8),'description':'JSON\x20params','hidden':!![]},{'name':a146_0x144bf2(0x1d1),'meowKey':a146_0x144bf2(0x1d1),'type':a146_0x144bf2(0x1d8),'description':a146_0x144bf2(0x226),'hidden':!![]},{'name':a146_0x144bf2(0x1e5),'meowKey':a146_0x144bf2(0x1e5),'type':a146_0x144bf2(0x1c6),'description':a146_0x144bf2(0x230),'hidden':!![]},{'name':a146_0x144bf2(0x1f0),'meowKey':a146_0x144bf2(0x232),'type':'boolean','description':'Enable\x20BFF\x20save','hidden':!![]},{'name':'id','meowKey':'id','type':a146_0x144bf2(0x1d8),'description':'Record\x20ID','hidden':!![]},{'name':a146_0x144bf2(0x224),'meowKey':'type','type':a146_0x144bf2(0x1d8),'description':a146_0x144bf2(0x20e),'hidden':!![]},{'name':'file','meowKey':a146_0x144bf2(0x1fc),'type':'string','description':a146_0x144bf2(0x1d6),'hidden':!![]},{'name':a146_0x144bf2(0x221),'meowKey':a146_0x144bf2(0x221),'type':'string','description':a146_0x144bf2(0x20f),'hidden':!![]},{'name':'sql-name','meowKey':'sqlName','type':a146_0x144bf2(0x1d8),'description':'SQL\x20name','hidden':!![]},{'name':'sqlname','meowKey':'sqlname','type':a146_0x144bf2(0x1d8),'description':a146_0x144bf2(0x21c),'hidden':!![]},{'name':'db-id','meowKey':'dbId','type':a146_0x144bf2(0x1d8),'description':a146_0x144bf2(0x22b),'hidden':!![]},{'name':'dbid','meowKey':a146_0x144bf2(0x20b),'type':'string','description':a146_0x144bf2(0x22b),'hidden':!![]},{'name':a146_0x144bf2(0x1ec),'meowKey':a146_0x144bf2(0x1ec),'type':a146_0x144bf2(0x1d8),'description':a146_0x144bf2(0x1da),'hidden':!![]},{'name':a146_0x144bf2(0x1d7),'meowKey':a146_0x144bf2(0x1dc),'type':'string','description':a146_0x144bf2(0x1d4),'hidden':!![]},{'name':a146_0x144bf2(0x1f4),'meowKey':'page','type':a146_0x144bf2(0x1d8),'description':a146_0x144bf2(0x21d),'hidden':!![]},{'name':a146_0x144bf2(0x229),'meowKey':a146_0x144bf2(0x229),'type':'string','description':a146_0x144bf2(0x222),'hidden':!![]},{'name':'keyword','meowKey':a146_0x144bf2(0x22c),'type':a146_0x144bf2(0x1d8),'description':'Keyword\x20filter','hidden':!![]},{'name':a146_0x144bf2(0x21b),'meowKey':a146_0x144bf2(0x21b),'type':a146_0x144bf2(0x1d8),'description':a146_0x144bf2(0x225),'hidden':!![]},{'name':a146_0x144bf2(0x215),'meowKey':'sql','type':a146_0x144bf2(0x1d8),'description':a146_0x144bf2(0x1dd),'hidden':!![]},{'name':a146_0x144bf2(0x216),'meowKey':a146_0x144bf2(0x216),'type':a146_0x144bf2(0x1d8),'description':a146_0x144bf2(0x212),'hidden':!![]},{'name':a146_0x144bf2(0x1c9),'meowKey':a146_0x144bf2(0x1c9),'type':'string','description':a146_0x144bf2(0x20d),'hidden':!![]},{'name':a146_0x144bf2(0x1cd),'meowKey':a146_0x144bf2(0x1cd),'type':'string','description':a146_0x144bf2(0x1ca),'hidden':!![]},{'name':a146_0x144bf2(0x1cf),'meowKey':a146_0x144bf2(0x1e6),'type':'boolean','description':a146_0x144bf2(0x1f7),'hidden':!![]},{'name':a146_0x144bf2(0x1e0),'meowKey':a146_0x144bf2(0x1e0),'type':'string','description':a146_0x144bf2(0x20c),'hidden':!![]},{'name':a146_0x144bf2(0x1ea),'meowKey':a146_0x144bf2(0x1ea),'type':'string','description':a146_0x144bf2(0x22f),'hidden':!![]},{'name':a146_0x144bf2(0x1d0),'meowKey':a146_0x144bf2(0x1d0),'type':a146_0x144bf2(0x1d8),'description':a146_0x144bf2(0x1e9),'hidden':!![]},{'name':a146_0x144bf2(0x233),'meowKey':a146_0x144bf2(0x233),'type':a146_0x144bf2(0x1c6),'description':'Read\x20value\x20from\x20stdin','hidden':!![]},{'name':'from-env','meowKey':a146_0x144bf2(0x1d3),'type':'string','description':a146_0x144bf2(0x1fb),'hidden':!![]},{'name':a146_0x144bf2(0x1e2),'meowKey':a146_0x144bf2(0x1e2),'type':a146_0x144bf2(0x1c6),'description':a146_0x144bf2(0x1cb),'hidden':!![]},{'name':a146_0x144bf2(0x211),'meowKey':a146_0x144bf2(0x211),'type':a146_0x144bf2(0x1c6),'description':'Force\x20overwrite','hidden':!![]},{'name':a146_0x144bf2(0x21f),'meowKey':a146_0x144bf2(0x21f),'type':a146_0x144bf2(0x1c6),'description':a146_0x144bf2(0x219),'hidden':!![]},{'name':a146_0x144bf2(0x22e),'meowKey':a146_0x144bf2(0x22e),'type':a146_0x144bf2(0x1c6),'description':a146_0x144bf2(0x227),'hidden':!![]},{'name':'verbose','meowKey':a146_0x144bf2(0x1fd),'type':a146_0x144bf2(0x1c6),'description':a146_0x144bf2(0x207),'hidden':!![]},{'name':a146_0x144bf2(0x218),'meowKey':a146_0x144bf2(0x1e4),'type':'string','description':'Expected\x20affected\x20count','hidden':!![]},{'name':'operation-type','meowKey':'operationType','type':a146_0x144bf2(0x1d8),'description':a146_0x144bf2(0x20d),'hidden':!![]},{'name':'function-node','meowKey':a146_0x144bf2(0x1f1),'type':a146_0x144bf2(0x1d8),'description':a146_0x144bf2(0x223),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a146_0x144bf2(0x210),a146_0x144bf2(0x205),'env','format','jq',a146_0x144bf2(0x202),a146_0x144bf2(0x1f8),a146_0x144bf2(0x214),'ci']);export function buildMeowFlags(){const _0x2466d6=a146_0x144bf2;return Object[_0x2466d6(0x22d)](GLOBAL_FLAGS['map'](_0x4c8862=>[_0x4c8862[_0x2466d6(0x1d2)],{'type':_0x4c8862[_0x2466d6(0x224)]}]));}
@@ -1 +1 @@
1
- const a148_0x5ec45e=a148_0x3d1b;(function(_0x10a215,_0x5764b1){const _0x5aadd0=a148_0x3d1b,_0x363e63=_0x10a215();while(!![]){try{const _0x47e1a5=parseInt(_0x5aadd0(0xf9))/0x1*(parseInt(_0x5aadd0(0xfd))/0x2)+-parseInt(_0x5aadd0(0xff))/0x3*(-parseInt(_0x5aadd0(0xf6))/0x4)+parseInt(_0x5aadd0(0xf7))/0x5+-parseInt(_0x5aadd0(0x100))/0x6+parseInt(_0x5aadd0(0xfa))/0x7+-parseInt(_0x5aadd0(0xf5))/0x8+parseInt(_0x5aadd0(0xf8))/0x9;if(_0x47e1a5===_0x5764b1)break;else _0x363e63['push'](_0x363e63['shift']());}catch(_0x447ec2){_0x363e63['push'](_0x363e63['shift']());}}}(a148_0x4a3b,0xda8c4));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a148_0x5ec45e(0xfc),'format':a148_0x5ec45e(0xfb),'locale':a148_0x5ec45e(0x101),'riskLevel':a148_0x5ec45e(0xfe),'apiDir':DEFAULT_API_DIR};function a148_0x3d1b(_0x10b499,_0x1d4de2){_0x10b499=_0x10b499-0xf5;const _0x4a3b08=a148_0x4a3b();let _0x3d1bc9=_0x4a3b08[_0x10b499];return _0x3d1bc9;}export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';function a148_0x4a3b(){const _0x1a0483=['1631470HfxwNm','4100184tIAKwC','9dQfMDe','6632710yNAhbe','compress','production','115052tWupIj','high-risk-write','3GMzoJJ','4717260hezAoP','en-US','10431632bjkXqL','2952808CAjRvo'];a148_0x4a3b=function(){return _0x1a0483;};return a148_0x4a3b();}
1
+ function a147_0x2387(){const _0x175bea=['961820oOsPnb','95845ywLlsA','291EYxuCQ','10436lQtLvV','6sNheIM','en-US','342534HRULcQ','production','781670cjgGCN','1858262ylggFa','high-risk-write','25911zMVPCS','336zgYOFS','compress'];a147_0x2387=function(){return _0x175bea;};return a147_0x2387();}const a147_0x4fb1b0=a147_0xa536;function a147_0xa536(_0x1a4248,_0x593fcb){_0x1a4248=_0x1a4248-0x8a;const _0x238782=a147_0x2387();let _0xa53662=_0x238782[_0x1a4248];return _0xa53662;}(function(_0x243a48,_0x1168c3){const _0x6f6898=a147_0xa536,_0x2a2ea7=_0x243a48();while(!![]){try{const _0x387128=parseInt(_0x6f6898(0x97))/0x1+-parseInt(_0x6f6898(0x8e))/0x2+parseInt(_0x6f6898(0x8a))/0x3*(parseInt(_0x6f6898(0x8b))/0x4)+parseInt(_0x6f6898(0x96))/0x5*(parseInt(_0x6f6898(0x8c))/0x6)+-parseInt(_0x6f6898(0x91))/0x7+parseInt(_0x6f6898(0x94))/0x8*(parseInt(_0x6f6898(0x93))/0x9)+-parseInt(_0x6f6898(0x90))/0xa;if(_0x387128===_0x1168c3)break;else _0x2a2ea7['push'](_0x2a2ea7['shift']());}catch(_0x2d162f){_0x2a2ea7['push'](_0x2a2ea7['shift']());}}}(a147_0x2387,0x23f64));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a147_0x4fb1b0(0x8f),'format':a147_0x4fb1b0(0x95),'locale':a147_0x4fb1b0(0x8d),'riskLevel':a147_0x4fb1b0(0x92),'apiDir':DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a147_0x4fb1b0(0x95);
@@ -1 +1 @@
1
- const a149_0x2b0313=a149_0x51e5;(function(_0x453d40,_0x2dd25c){const _0x44a88e=a149_0x51e5,_0x2fe5e5=_0x453d40();while(!![]){try{const _0x1e24a9=-parseInt(_0x44a88e(0x129))/0x1*(parseInt(_0x44a88e(0x12d))/0x2)+-parseInt(_0x44a88e(0x128))/0x3*(-parseInt(_0x44a88e(0x116))/0x4)+-parseInt(_0x44a88e(0x120))/0x5*(parseInt(_0x44a88e(0x11d))/0x6)+-parseInt(_0x44a88e(0x122))/0x7*(parseInt(_0x44a88e(0x12a))/0x8)+-parseInt(_0x44a88e(0x11e))/0x9*(-parseInt(_0x44a88e(0x126))/0xa)+-parseInt(_0x44a88e(0x124))/0xb*(parseInt(_0x44a88e(0x11f))/0xc)+parseInt(_0x44a88e(0x119))/0xd*(parseInt(_0x44a88e(0x117))/0xe);if(_0x1e24a9===_0x2dd25c)break;else _0x2fe5e5['push'](_0x2fe5e5['shift']());}catch(_0x1da313){_0x2fe5e5['push'](_0x2fe5e5['shift']());}}}(a149_0x2149,0x6d488));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0xa1de2){const _0x1314ff=a149_0x51e5;customApiDomain=_0xa1de2?.['apiDomain'],customUserDomain=_0xa1de2?.[_0x1314ff(0x12c)],customRuntimeDomain=_0xa1de2?.[_0x1314ff(0x11a)];}function a149_0x51e5(_0x20abb3,_0x3c2a4c){_0x20abb3=_0x20abb3-0x116;const _0x2149ab=a149_0x2149();let _0x51e570=_0x2149ab[_0x20abb3];return _0x51e570;}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?'https://user.lovrabet.com':a149_0x2b0313(0x12e));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a149_0x2b0313(0x125):a149_0x2b0313(0x127));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a149_0x2b0313(0x11c):a149_0x2b0313(0x123));export const getAppDomain=()=>isProduction(getEnv())?a149_0x2b0313(0x11b):'https://daily.lovrabet.com';function a149_0x2149(){const _0x327404=['/web-app/app/','3523NMeZBE','runtimeDomain','https://app.lovrabet.com','https://runtime.lovrabet.com','6HoHBvP','369UcBxIz','396hlawpl','1341215XTQfCy','trim','20804qgXBEj','https://daily-runtime.lovrabet.com','46156GzFmkh','https://api.lovrabet.com','172390HTSBUm','https://daily-api.lovrabet.com','771eruNKJ','443IiCeKo','1760kDtyLF','/app/','userDomain','1706RmTRYa','https://user-daily.lovrabet.com','11576cLAGms','22498lclVZE'];a149_0x2149=function(){return _0x327404;};return a149_0x2149();}export const getAppBaseUrl=_0x337e29=>{const _0x45df13=a149_0x2b0313,_0x2af585=encodeURIComponent(_0x337e29[_0x45df13(0x121)]());return isProduction(getEnv())?getAppDomain()+_0x45df13(0x12b)+_0x2af585:getAppDomain()+_0x45df13(0x118)+_0x2af585;};
1
+ const a148_0x319a2c=a148_0xc2e6;(function(_0x585e82,_0x581c2a){const _0x556ca=a148_0xc2e6,_0x2e0bef=_0x585e82();while(!![]){try{const _0x1d190f=-parseInt(_0x556ca(0x1fc))/0x1*(-parseInt(_0x556ca(0x1fa))/0x2)+-parseInt(_0x556ca(0x1f9))/0x3*(-parseInt(_0x556ca(0x1fb))/0x4)+parseInt(_0x556ca(0x1f1))/0x5+-parseInt(_0x556ca(0x1f5))/0x6*(parseInt(_0x556ca(0x1ef))/0x7)+parseInt(_0x556ca(0x1e7))/0x8+parseInt(_0x556ca(0x1ea))/0x9+parseInt(_0x556ca(0x1e9))/0xa*(-parseInt(_0x556ca(0x1f4))/0xb);if(_0x1d190f===_0x581c2a)break;else _0x2e0bef['push'](_0x2e0bef['shift']());}catch(_0x410c72){_0x2e0bef['push'](_0x2e0bef['shift']());}}}(a148_0x39fa,0x79b15));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0xd7f5ba){const _0x4e2eac=a148_0xc2e6;customApiDomain=_0xd7f5ba?.[_0x4e2eac(0x1f6)],customUserDomain=_0xd7f5ba?.[_0x4e2eac(0x1f2)],customRuntimeDomain=_0xd7f5ba?.[_0x4e2eac(0x1f3)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a148_0x319a2c(0x1ec):a148_0x319a2c(0x1f8));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a148_0x319a2c(0x1f7):a148_0x319a2c(0x1ee));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?'https://runtime.lovrabet.com':a148_0x319a2c(0x1eb));export const getAppDomain=()=>isProduction(getEnv())?a148_0x319a2c(0x1e8):a148_0x319a2c(0x1f0);function a148_0xc2e6(_0xcaaee8,_0x3eb717){_0xcaaee8=_0xcaaee8-0x1e6;const _0x39fa1c=a148_0x39fa();let _0xc2e69e=_0x39fa1c[_0xcaaee8];return _0xc2e69e;}function a148_0x39fa(){const _0x56a4df=['3070215BfQcyT','userDomain','runtimeDomain','3381741ZNlvST','608196wVqEuN','apiDomain','https://api.lovrabet.com','https://user-daily.lovrabet.com','3HKqUGi','586748BmrhLh','824276wfQMWq','3Cbqjfe','/app/','2382320wzoSlu','https://app.lovrabet.com','40kJtKSH','4869729aomroN','https://daily-runtime.lovrabet.com','https://user.lovrabet.com','/web-app/app/','https://daily-api.lovrabet.com','56ouBXDY','https://daily.lovrabet.com'];a148_0x39fa=function(){return _0x56a4df;};return a148_0x39fa();}export const getAppBaseUrl=_0xd717e8=>{const _0x567ce7=a148_0x319a2c,_0x49cf85=encodeURIComponent(_0xd717e8['trim']());return isProduction(getEnv())?getAppDomain()+_0x567ce7(0x1e6)+_0x49cf85:getAppDomain()+_0x567ce7(0x1ed)+_0x49cf85;};
@@ -1 +1 @@
1
- const a150_0x30658b=a150_0x386c;(function(_0x215ccf,_0x5149ba){const _0x628331=a150_0x386c,_0x3fb8cf=_0x215ccf();while(!![]){try{const _0x5f3686=-parseInt(_0x628331(0xaa))/0x1+parseInt(_0x628331(0xa4))/0x2*(parseInt(_0x628331(0xa5))/0x3)+-parseInt(_0x628331(0xa7))/0x4+parseInt(_0x628331(0xad))/0x5*(-parseInt(_0x628331(0xa8))/0x6)+parseInt(_0x628331(0xb0))/0x7+parseInt(_0x628331(0xae))/0x8+parseInt(_0x628331(0xac))/0x9;if(_0x5f3686===_0x5149ba)break;else _0x3fb8cf['push'](_0x3fb8cf['shift']());}catch(_0x2b4999){_0x3fb8cf['push'](_0x3fb8cf['shift']());}}}(a150_0x1ed2,0xe0358));export const RABETBASE_ENV_VALUES=['production',a150_0x30658b(0xa9)];function a150_0x386c(_0x4ea040,_0x4fa6b7){_0x4ea040=_0x4ea040-0xa4;const _0x1ed211=a150_0x1ed2();let _0x386c27=_0x1ed211[_0x4ea040];return _0x386c27;}export function normalizeEnv(_0x547bfb){return _0x547bfb==='online'?'production':_0x547bfb;}export function isProduction(_0x85d79c){return normalizeEnv(_0x85d79c)==='production';}export function isDaily(_0x342263){const _0x9964a1=a150_0x30658b;return normalizeEnv(_0x342263)===_0x9964a1(0xa9);}export function isDev(_0x118b98){const _0x29ae99=a150_0x30658b,_0x50c777=normalizeEnv(_0x118b98);return _0x50c777===_0x29ae99(0xaf)||_0x50c777===_0x29ae99(0xab);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a150_0x30658b(0xa6));export function getEnv(){return env;}export function initEnv(_0x56b0bd){env=normalizeEnv(_0x56b0bd);}function a150_0x1ed2(){const _0x407102=['development','1763097wJtAMg','2FuUNCI','4091775ECMxHL','production','3929092fYlWyu','890658fYukFN','daily','282868whEvcU','dev','12083211oOsJli','45WtJTTx','4488904ADWUGd'];a150_0x1ed2=function(){return _0x407102;};return a150_0x1ed2();}
1
+ const a149_0x5481c3=a149_0x159e;(function(_0xff3845,_0x25736b){const _0x55cbf7=a149_0x159e,_0x3d4dad=_0xff3845();while(!![]){try{const _0x52088c=parseInt(_0x55cbf7(0x13d))/0x1*(-parseInt(_0x55cbf7(0x13e))/0x2)+parseInt(_0x55cbf7(0x137))/0x3*(-parseInt(_0x55cbf7(0x133))/0x4)+-parseInt(_0x55cbf7(0x13c))/0x5+parseInt(_0x55cbf7(0x132))/0x6*(parseInt(_0x55cbf7(0x136))/0x7)+parseInt(_0x55cbf7(0x139))/0x8+-parseInt(_0x55cbf7(0x134))/0x9+parseInt(_0x55cbf7(0x131))/0xa;if(_0x52088c===_0x25736b)break;else _0x3d4dad['push'](_0x3d4dad['shift']());}catch(_0x5391a6){_0x3d4dad['push'](_0x3d4dad['shift']());}}}(a149_0x172d,0x50d00));function a149_0x159e(_0x4c2876,_0x2aa11d){_0x4c2876=_0x4c2876-0x131;const _0x172d9d=a149_0x172d();let _0x159eba=_0x172d9d[_0x4c2876];return _0x159eba;}export const RABETBASE_ENV_VALUES=[a149_0x5481c3(0x13a),'daily'];function a149_0x172d(){const _0x5a8ea=['production','dev','1322470pDgNvn','3827hiuVlG','110qAlsVg','8749930VXvyfn','536358cgCTAu','8JQwqpT','4396842bXlVxw','development','21mdlvzs','61413wYTpPV','daily','1538360bTDhVU'];a149_0x172d=function(){return _0x5a8ea;};return a149_0x172d();}export function normalizeEnv(_0x56ea35){return _0x56ea35==='online'?'production':_0x56ea35;}export function isProduction(_0x34eea4){const _0x229113=a149_0x5481c3;return normalizeEnv(_0x34eea4)===_0x229113(0x13a);}export function isDaily(_0x759021){const _0x25998e=a149_0x5481c3;return normalizeEnv(_0x759021)===_0x25998e(0x138);}export function isDev(_0x39c965){const _0x21a407=a149_0x5481c3,_0x5b8247=normalizeEnv(_0x39c965);return _0x5b8247===_0x21a407(0x135)||_0x5b8247===_0x21a407(0x13b);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a149_0x5481c3(0x13a));export function getEnv(){return env;}export function initEnv(_0x37bcd1){env=normalizeEnv(_0x37bcd1);}
@@ -1 +1 @@
1
- (function(_0x317eca,_0x2a5381){const _0x164ec1=a151_0x313b,_0x49a8ff=_0x317eca();while(!![]){try{const _0x4d54c0=-parseInt(_0x164ec1(0x17c))/0x1*(-parseInt(_0x164ec1(0x17a))/0x2)+parseInt(_0x164ec1(0x17d))/0x3*(parseInt(_0x164ec1(0x17b))/0x4)+-parseInt(_0x164ec1(0x174))/0x5*(-parseInt(_0x164ec1(0x175))/0x6)+parseInt(_0x164ec1(0x176))/0x7+parseInt(_0x164ec1(0x177))/0x8*(parseInt(_0x164ec1(0x178))/0x9)+parseInt(_0x164ec1(0x179))/0xa+-parseInt(_0x164ec1(0x173))/0xb;if(_0x4d54c0===_0x2a5381)break;else _0x49a8ff['push'](_0x49a8ff['shift']());}catch(_0x249814){_0x49a8ff['push'](_0x49a8ff['shift']());}}}(a151_0x5a67,0x40caa));function a151_0x313b(_0x5db5f8,_0x4d88d5){_0x5db5f8=_0x5db5f8-0x173;const _0x5a67d0=a151_0x5a67();let _0x313bd3=_0x5a67d0[_0x5db5f8];return _0x313bd3;}export const RABETBASE_OUTPUT_FORMAT_VALUES=['json','pretty','compress'];function a151_0x5a67(){const _0xdaed73=['51321FWPODp','12966250sdpsvR','5QQTtgv','1143918NVupOa','1817949aDKJgw','224EryvEU','67131ZpMfeo','320920vWEzOD','114XHgDnK','84YvefVz','6905mxQAJz'];a151_0x5a67=function(){return _0xdaed73;};return a151_0x5a67();}
1
+ function a150_0x314e(){const _0x3e3c53=['847176OKJWjS','42ZZwnwC','22482vkAlkS','431356KKqueu','135265JefUQf','163261HFCKUi','8945350BbkWdv','json','19886ReTZrQ','11nFImWF','27Ureabo','13EfzNiX'];a150_0x314e=function(){return _0x3e3c53;};return a150_0x314e();}const a150_0x319279=a150_0xb7d4;function a150_0xb7d4(_0x3725ea,_0x4c5494){_0x3725ea=_0x3725ea-0x178;const _0x314ebe=a150_0x314e();let _0xb7d4d7=_0x314ebe[_0x3725ea];return _0xb7d4d7;}(function(_0x2c5be7,_0x27dd3a){const _0x1981dd=a150_0xb7d4,_0x431423=_0x2c5be7();while(!![]){try{const _0x328442=parseInt(_0x1981dd(0x17a))/0x1*(-parseInt(_0x1981dd(0x183))/0x2)+-parseInt(_0x1981dd(0x17d))/0x3+-parseInt(_0x1981dd(0x17e))/0x4+parseInt(_0x1981dd(0x17f))/0x5+-parseInt(_0x1981dd(0x17c))/0x6*(parseInt(_0x1981dd(0x180))/0x7)+parseInt(_0x1981dd(0x17b))/0x8*(-parseInt(_0x1981dd(0x179))/0x9)+-parseInt(_0x1981dd(0x181))/0xa*(-parseInt(_0x1981dd(0x178))/0xb);if(_0x328442===_0x27dd3a)break;else _0x431423['push'](_0x431423['shift']());}catch(_0x1ad9dd){_0x431423['push'](_0x431423['shift']());}}}(a150_0x314e,0x2fdcc));export const RABETBASE_OUTPUT_FORMAT_VALUES=[a150_0x319279(0x182),'pretty','compress'];
@@ -1 +1 @@
1
- function a152_0x93ff(){const _0x4ba444=['3622416QPRPvJ','228067ntcBHv','20JpvrAV','7119279twFAlQ','5044204PCUTIe','44vxFkti','8xnAGkU','126XagsFI','49011kftmAQ','984880EbkJDr','69vGhUPI','29790vlbIRE','26zovsdl'];a152_0x93ff=function(){return _0x4ba444;};return a152_0x93ff();}(function(_0x35e47b,_0x5e15de){const _0x41285b=a152_0x4875,_0x4fdd3a=_0x35e47b();while(!![]){try{const _0x5d4928=parseInt(_0x41285b(0x11b))/0x1*(parseInt(_0x41285b(0x11c))/0x2)+parseInt(_0x41285b(0x119))/0x3*(parseInt(_0x41285b(0x116))/0x4)+-parseInt(_0x41285b(0x11a))/0x5+parseInt(_0x41285b(0x118))/0x6*(parseInt(_0x41285b(0x112))/0x7)+-parseInt(_0x41285b(0x117))/0x8*(parseInt(_0x41285b(0x114))/0x9)+parseInt(_0x41285b(0x113))/0xa*(-parseInt(_0x41285b(0x115))/0xb)+parseInt(_0x41285b(0x111))/0xc*(parseInt(_0x41285b(0x11d))/0xd);if(_0x5d4928===_0x5e15de)break;else _0x4fdd3a['push'](_0x4fdd3a['shift']());}catch(_0x17f547){_0x4fdd3a['push'](_0x4fdd3a['shift']());}}}(a152_0x93ff,0x901b8));function a152_0x4875(_0x16b904,_0x1515c6){_0x16b904=_0x16b904-0x111;const _0x93ffc8=a152_0x93ff();let _0x4875f6=_0x93ffc8[_0x16b904];return _0x4875f6;}export const DEFAULT_API_DIR='./src/api';
1
+ function a151_0x24e5(){const _0x1ddf92=['8OcrRbS','1447260qooYpj','5789781vnHyMd','33gQMByu','14526Yloqrf','1751407WaPNFv','323551NMWOuO','3028314VhBtBt','332600RygJlc'];a151_0x24e5=function(){return _0x1ddf92;};return a151_0x24e5();}(function(_0x3100c6,_0x203aec){const _0x1a178b=a151_0x34a5,_0x297f69=_0x3100c6();while(!![]){try{const _0x389bec=-parseInt(_0x1a178b(0x160))/0x1+-parseInt(_0x1a178b(0x15e))/0x2*(-parseInt(_0x1a178b(0x15d))/0x3)+-parseInt(_0x1a178b(0x162))/0x4+-parseInt(_0x1a178b(0x15b))/0x5+parseInt(_0x1a178b(0x161))/0x6+parseInt(_0x1a178b(0x15f))/0x7*(-parseInt(_0x1a178b(0x15a))/0x8)+parseInt(_0x1a178b(0x15c))/0x9;if(_0x389bec===_0x203aec)break;else _0x297f69['push'](_0x297f69['shift']());}catch(_0x26dedb){_0x297f69['push'](_0x297f69['shift']());}}}(a151_0x24e5,0x44bdf));function a151_0x34a5(_0x26dbfe,_0x150371){_0x26dbfe=_0x26dbfe-0x15a;const _0x24e518=a151_0x24e5();let _0x34a5ce=_0x24e518[_0x26dbfe];return _0x34a5ce;}export const DEFAULT_API_DIR='./src/api';
@@ -1 +1 @@
1
- const a153_0xc2808f=a153_0xb536;function a153_0xb536(_0x58c77a,_0x49f37d){_0x58c77a=_0x58c77a-0x1c9;const _0x40e420=a153_0x40e4();let _0xb536ea=_0x40e420[_0x58c77a];return _0xb536ea;}function a153_0x40e4(){const _0x5f08b7=['read','4034240txbVcx','840759QozKDR','3284Ufooiu','9yHjOlG','4195UExXrJ','304048fJEEMd','4075368wOxMvU','2443360jFvmwB','2futkLX','5397644VZeAfH'];a153_0x40e4=function(){return _0x5f08b7;};return a153_0x40e4();}(function(_0x379b15,_0x3ff3d7){const _0x7663bc=a153_0xb536,_0x36d5d5=_0x379b15();while(!![]){try{const _0x2a944a=parseInt(_0x7663bc(0x1d2))/0x1+-parseInt(_0x7663bc(0x1ca))/0x2*(-parseInt(_0x7663bc(0x1ce))/0x3)+parseInt(_0x7663bc(0x1cf))/0x4*(parseInt(_0x7663bc(0x1d1))/0x5)+parseInt(_0x7663bc(0x1d3))/0x6+-parseInt(_0x7663bc(0x1cb))/0x7+-parseInt(_0x7663bc(0x1cd))/0x8*(parseInt(_0x7663bc(0x1d0))/0x9)+-parseInt(_0x7663bc(0x1c9))/0xa;if(_0x2a944a===_0x3ff3d7)break;else _0x36d5d5['push'](_0x36d5d5['shift']());}catch(_0x4130e3){_0x36d5d5['push'](_0x36d5d5['shift']());}}}(a153_0x40e4,0x69a00));export const RISK_LEVEL_VALUES=[a153_0xc2808f(0x1cc),'write','high-risk-write'];
1
+ function a152_0x1093(_0x27fc31,_0x4f2363){_0x27fc31=_0x27fc31-0x95;const _0x353dd7=a152_0x353d();let _0x10938e=_0x353dd7[_0x27fc31];return _0x10938e;}function a152_0x353d(){const _0x20d5af=['40670NrBbay','5190876GVkYrm','520557dIrheo','14406957uXUtxv','647758tBTAHL','1438443iUbGwj','15sOqNoM','high-risk-write','1229752gaVXqS','328vjbKSe','read'];a152_0x353d=function(){return _0x20d5af;};return a152_0x353d();}const a152_0x54a2e1=a152_0x1093;(function(_0x387c41,_0x4bb16d){const _0x3bb54d=a152_0x1093,_0x722b54=_0x387c41();while(!![]){try{const _0x5b2050=parseInt(_0x3bb54d(0x95))/0x1+-parseInt(_0x3bb54d(0x9f))/0x2+-parseInt(_0x3bb54d(0x9d))/0x3+parseInt(_0x3bb54d(0x98))/0x4*(parseInt(_0x3bb54d(0x96))/0x5)+parseInt(_0x3bb54d(0x9c))/0x6+parseInt(_0x3bb54d(0x9b))/0x7*(-parseInt(_0x3bb54d(0x99))/0x8)+-parseInt(_0x3bb54d(0x9e))/0x9;if(_0x5b2050===_0x4bb16d)break;else _0x722b54['push'](_0x722b54['shift']());}catch(_0x591be8){_0x722b54['push'](_0x722b54['shift']());}}}(a152_0x353d,0xd92b2));export const RISK_LEVEL_VALUES=[a152_0x54a2e1(0x9a),'write',a152_0x54a2e1(0x97)];