@lovrabet/rabetbase-cli 2.3.3-beta.4 → 2.3.4-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/discover.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/flags.js +1 -1
  47. package/lib/commands/common/validate.js +1 -1
  48. package/lib/commands/config/get.js +1 -1
  49. package/lib/commands/config/index.js +1 -1
  50. package/lib/commands/config/list.js +1 -1
  51. package/lib/commands/config/set.js +1 -1
  52. package/lib/commands/config/shared.js +1 -1
  53. package/lib/commands/data/filter.js +1 -1
  54. package/lib/commands/data/getOne.js +1 -1
  55. package/lib/commands/data/index.js +1 -1
  56. package/lib/commands/data/shared.js +1 -1
  57. package/lib/commands/dataset/business-group-update.js +1 -1
  58. package/lib/commands/dataset/capability.js +1 -1
  59. package/lib/commands/dataset/delete.js +1 -1
  60. package/lib/commands/dataset/detail.js +1 -1
  61. package/lib/commands/dataset/extend-update.js +1 -1
  62. package/lib/commands/dataset/field-update.js +1 -1
  63. package/lib/commands/dataset/generate.js +1 -1
  64. package/lib/commands/dataset/index.js +1 -1
  65. package/lib/commands/dataset/list.js +1 -1
  66. package/lib/commands/dataset/operations.js +1 -1
  67. package/lib/commands/dataset/relation-audit.js +1 -1
  68. package/lib/commands/dataset/relation-create.js +1 -1
  69. package/lib/commands/dataset/relation-delete.js +1 -1
  70. package/lib/commands/dataset/relation-shared.js +1 -1
  71. package/lib/commands/dataset/relation-update.js +1 -1
  72. package/lib/commands/dataset/relations.js +1 -1
  73. package/lib/commands/dataset/rename.js +1 -1
  74. package/lib/commands/dataset/restore.js +1 -1
  75. package/lib/commands/db/analyze-cancel.js +1 -1
  76. package/lib/commands/db/analyze-start.js +1 -1
  77. package/lib/commands/db/analyze-status.js +1 -1
  78. package/lib/commands/db/create.js +1 -1
  79. package/lib/commands/db/delete.js +1 -1
  80. package/lib/commands/db/detail.js +1 -1
  81. package/lib/commands/db/diff.js +1 -1
  82. package/lib/commands/db/index.js +1 -1
  83. package/lib/commands/db/list.js +1 -1
  84. package/lib/commands/db/shared.js +1 -1
  85. package/lib/commands/db/tables.js +1 -1
  86. package/lib/commands/db/test.js +1 -1
  87. package/lib/commands/db/update.js +1 -1
  88. package/lib/commands/doctor.js +1 -1
  89. package/lib/commands/init/index.js +1 -1
  90. package/lib/commands/issue/index.js +1 -1
  91. package/lib/commands/issue/nudge.js +1 -1
  92. package/lib/commands/issue/report.js +1 -1
  93. package/lib/commands/issue/shared.js +1 -1
  94. package/lib/commands/logs/index.js +1 -1
  95. package/lib/commands/menu/index.js +1 -1
  96. package/lib/commands/menu/list.js +1 -1
  97. package/lib/commands/menu/shared/compare-table.js +1 -1
  98. package/lib/commands/menu/shared/index.js +1 -1
  99. package/lib/commands/menu/shared/inquirer.js +1 -1
  100. package/lib/commands/menu/shared/local-pages.js +1 -1
  101. package/lib/commands/menu/shared/logic.js +1 -1
  102. package/lib/commands/menu/shared/service.js +1 -1
  103. package/lib/commands/menu/shared/sync-core.js +1 -1
  104. package/lib/commands/menu/shared/update-core.js +1 -1
  105. package/lib/commands/menu/shared/valid-url.js +1 -1
  106. package/lib/commands/menu/sync.js +1 -1
  107. package/lib/commands/menu/update.js +1 -1
  108. package/lib/commands/page/generate-start.js +1 -1
  109. package/lib/commands/page/generate-status.js +1 -1
  110. package/lib/commands/page/index.js +1 -1
  111. package/lib/commands/page/pull.js +1 -1
  112. package/lib/commands/page/push.js +1 -1
  113. package/lib/commands/page/relation-audit.js +1 -1
  114. package/lib/commands/page/shared.js +1 -1
  115. package/lib/commands/page/standard-page-status.js +1 -1
  116. package/lib/commands/page/sync.js +1 -1
  117. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  118. package/lib/commands/project/create/format-elapsed.js +1 -1
  119. package/lib/commands/project/create/main.js +1 -1
  120. package/lib/commands/project/create/non-interactive.js +1 -1
  121. package/lib/commands/project/create/project-template-path.js +1 -1
  122. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  123. package/lib/commands/project/create/use-format-code.js +1 -1
  124. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  125. package/lib/commands/project/index.js +1 -1
  126. package/lib/commands/project/init.js +1 -1
  127. package/lib/commands/project/upgrade.js +1 -1
  128. package/lib/commands/registry.js +1 -1
  129. package/lib/commands/run/index.js +1 -1
  130. package/lib/commands/schema.js +1 -1
  131. package/lib/commands/sql/create.js +1 -1
  132. package/lib/commands/sql/delete.js +1 -1
  133. package/lib/commands/sql/detail.js +1 -1
  134. package/lib/commands/sql/exec.js +1 -1
  135. package/lib/commands/sql/index.js +1 -1
  136. package/lib/commands/sql/list.js +1 -1
  137. package/lib/commands/sql/pull.js +1 -1
  138. package/lib/commands/sql/push.js +1 -1
  139. package/lib/commands/sql/save.js +1 -1
  140. package/lib/commands/sql/shared.js +1 -1
  141. package/lib/commands/sql/status.js +1 -1
  142. package/lib/commands/sql/validate.js +1 -1
  143. package/lib/commands/workspace/index.js +1 -1
  144. package/lib/config/schema.js +1 -1
  145. package/lib/constant/cdn.js +1 -1
  146. package/lib/constant/cli.js +1 -1
  147. package/lib/constant/defaults.js +1 -1
  148. package/lib/constant/domain.js +1 -1
  149. package/lib/constant/env.js +1 -1
  150. package/lib/constant/output.js +1 -1
  151. package/lib/constant/paths.js +1 -1
  152. package/lib/constant/risk.js +1 -1
  153. package/lib/context/app-resolver.js +1 -1
  154. package/lib/context/auth-resolver.js +1 -1
  155. package/lib/context/config-loader.js +1 -1
  156. package/lib/context.js +1 -1
  157. package/lib/core/alias-resolver.js +1 -1
  158. package/lib/core/api-client.js +1 -1
  159. package/lib/core/bff/config.js +1 -1
  160. package/lib/core/bff/file-system.js +1 -1
  161. package/lib/core/bff/hash.js +1 -1
  162. package/lib/core/bff/lock.js +1 -1
  163. package/lib/core/bff/utils.js +1 -1
  164. package/lib/core/db-resolver.js +1 -1
  165. package/lib/core/page/file-system.js +1 -1
  166. package/lib/core/page/hash.js +1 -1
  167. package/lib/core/page/lock.js +1 -1
  168. package/lib/core/sql-sync/config.js +1 -1
  169. package/lib/core/sql-sync/file-system.js +1 -1
  170. package/lib/core/sql-sync/hash.js +1 -1
  171. package/lib/core/sql-sync/lock.js +1 -1
  172. package/lib/core/sql-sync/utils.js +1 -1
  173. package/lib/core/sql-validator.js +1 -1
  174. package/lib/errors.js +1 -1
  175. package/lib/framework/build-all-flags.js +1 -1
  176. package/lib/framework/flags.js +1 -1
  177. package/lib/framework/help.js +1 -1
  178. package/lib/framework/index.js +1 -1
  179. package/lib/framework/output.js +1 -1
  180. package/lib/framework/response.js +1 -1
  181. package/lib/framework/runner-alias.js +1 -1
  182. package/lib/framework/runner.js +1 -1
  183. package/lib/framework/schema-export.js +1 -1
  184. package/lib/framework/types.js +1 -1
  185. package/lib/generated/build-info.js +1 -1
  186. package/lib/help.js +1 -1
  187. package/lib/skills/main.js +1 -1
  188. package/lib/skills/npx-skills-add.js +1 -1
  189. package/lib/telemetry/cli-command-trace.js +1 -1
  190. package/lib/telemetry/cli-help-trace.js +1 -1
  191. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  192. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  193. package/lib/telemetry/send-cli-trace-log.js +1 -1
  194. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  195. package/lib/utils/ai_config.js +1 -1
  196. package/lib/utils/apply-jq-filter.js +1 -1
  197. package/lib/utils/cdn-config.js +1 -1
  198. package/lib/utils/check-sdk-version.js +1 -1
  199. package/lib/utils/cli-version-check.js +1 -1
  200. package/lib/utils/cli-version-policy.js +1 -1
  201. package/lib/utils/config.js +1 -1
  202. package/lib/utils/copy-directory.js +1 -1
  203. package/lib/utils/entity-with-id.js +1 -1
  204. package/lib/utils/file-utils.js +1 -1
  205. package/lib/utils/guides-cdn.js +1 -1
  206. package/lib/utils/http-client.js +1 -1
  207. package/lib/utils/is-non-interactive.js +1 -1
  208. package/lib/utils/logger.js +1 -1
  209. package/lib/utils/params.js +1 -1
  210. package/lib/utils/platform.js +1 -1
  211. package/lib/utils/rules-cdn.js +1 -1
  212. package/lib/utils/sleep.js +1 -1
  213. package/lib/utils/template-replacer.js +1 -1
  214. package/lib/utils/update-notice.js +1 -1
  215. package/lib/utils/version.js +1 -1
  216. package/lib/utils/with-active-cookie.js +1 -1
  217. package/lib/utils/write-cli-side-channel.js +1 -1
  218. package/package.json +2 -2
  219. package/lib/commands/app/use.js +0 -1
@@ -1 +1 @@
1
- const a139_0x3b8f95=a139_0x21b2;(function(_0x57f002,_0x5955f3){const _0x1dd1cf=a139_0x21b2,_0x464652=_0x57f002();while(!![]){try{const _0x1e0b05=parseInt(_0x1dd1cf(0x19a))/0x1+parseInt(_0x1dd1cf(0x19b))/0x2*(-parseInt(_0x1dd1cf(0x1c7))/0x3)+-parseInt(_0x1dd1cf(0x1a0))/0x4+parseInt(_0x1dd1cf(0x1c0))/0x5+-parseInt(_0x1dd1cf(0x1be))/0x6+-parseInt(_0x1dd1cf(0x1c8))/0x7*(parseInt(_0x1dd1cf(0x1ab))/0x8)+parseInt(_0x1dd1cf(0x1a7))/0x9;if(_0x1e0b05===_0x5955f3)break;else _0x464652['push'](_0x464652['shift']());}catch(_0x408656){_0x464652['push'](_0x464652['shift']());}}}(a139_0x3c25,0xec4a2));import{mkdir,readFile,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{updateSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{getDbName,listDatabases}from'../../core/db-resolver.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';function a139_0x3c25(){const _0x47772e=['filePath','sql','\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20','sqlConfig','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','Would\x20push\x20','map','validation','path','/smartapi/custom/updateUserCustomSql','version','catch','sqlName','message','\x20skipped,\x20','projectRoot','6445602nJcMkH','dbName','8259750mwoqqW','lockFilePath','No\x20database\x20matches\x20local\x20directory\x20\x22','get','dbId','Local\x20directory\x20\x22','\x20failed','39qqmdkR','12124595hHigGW','Push\x20complete:\x20','remoteId','.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.','sqlRoot','exec','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','mode','join','Push\x20local\x20SQL\x20files\x20to\x20remote','sqls','startsWith','hash','sqlCode','filter','appCode','Local\x20SQL\x20not\x20found:\x20','sqlRootDir','1629761apJgRa','288776svNuln','local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first','utf8','dbDirectory','\x22\x20for\x20sqlCode\x20','3422744OArcTx','push','toISOString','replace','sqlcode','str','\x20SQL\x20file(s)','29026917fDOOVN','isFinite','relativePath','length','8pUuwfa','force','boolean'];a139_0x3c25=function(){return _0x47772e;};return a139_0x3c25();}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(_0x452f3b,_0x49c649,_0x6fc9d6){const _0x32bbe7=a139_0x21b2,_0x39fdc4=await scanLocalSqlQueries(_0x452f3b),_0x37ce92=new Map();for(const _0x31f434 of _0x39fdc4){if(_0x6fc9d6&&_0x31f434[_0x32bbe7(0x195)]!==_0x6fc9d6)continue;const _0x2ebd15=_0x37ce92[_0x32bbe7(0x1c3)](_0x31f434[_0x32bbe7(0x195)])??[];_0x2ebd15['push'](_0x31f434),_0x37ce92['set'](_0x31f434[_0x32bbe7(0x195)],_0x2ebd15);}if(_0x6fc9d6&&!_0x37ce92['has'](_0x6fc9d6))throw CliErrors['validation'](_0x32bbe7(0x198)+_0x6fc9d6);const _0x2eb8d3=[];for(const [_0x30cdd7,_0x4f50f7]of _0x37ce92['entries']()){if(_0x4f50f7[_0x32bbe7(0x1aa)]===0x1){_0x2eb8d3[_0x32bbe7(0x1a1)](_0x4f50f7[0x0]);continue;}const _0x17346b=_0x49c649[_0x32bbe7(0x192)][_0x30cdd7],_0x4e1bef=_0x17346b?.['path'],_0x259a84=_0x4e1bef?_0x4f50f7['filter'](_0x2ec9b1=>_0x2ec9b1[_0x32bbe7(0x1a9)]!==_0x4e1bef):_0x4f50f7;if(_0x17346b&&_0x259a84[_0x32bbe7(0x1aa)]===0x1){_0x2eb8d3['push'](_0x259a84[0x0]);continue;}throw CliErrors[_0x32bbe7(0x1b5)](_0x32bbe7(0x1b2)+_0x30cdd7+_0x32bbe7(0x1cb));}return _0x2eb8d3;}function a139_0x21b2(_0x3738bb,_0x7cf320){_0x3738bb=_0x3738bb-0x18e;const _0x3c2598=a139_0x3c25();let _0x21b262=_0x3c2598[_0x3738bb];return _0x21b262;}export const sqlPush={'service':a139_0x3b8f95(0x1af),'command':a139_0x3b8f95(0x1a1),'description':a139_0x3b8f95(0x191),'risk':'high-risk-write','flags':[SQLCODE_FLAG_OPTIONAL,{'name':'force','type':a139_0x3b8f95(0x1ad),'description':'Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock'}],async 'dryRun'(_0x247d70){const _0x38b8ab=a139_0x3b8f95,_0x1ccb92=loadSqlProjectConfig(_0x247d70[_0x38b8ab(0x197)]),_0x4e1a7b=await readSqlLockFile(_0x1ccb92[_0x38b8ab(0x1c1)]),{appLock:_0x443418}=ensureSqlLockScope(_0x4e1a7b??createEmptySqlLock(),_0x247d70[_0x38b8ab(0x197)],_0x1ccb92[_0x38b8ab(0x1cc)],'push'),_0x498da0=await getTargetSqlQueries(_0x1ccb92,_0x443418,_0x247d70['str']('sqlcode')||undefined),_0x239fea=[];for(const _0x365f31 of _0x498da0){const _0x4427b6=await computeSqlFileHash(_0x365f31[_0x38b8ab(0x1ae)]),_0x2bd368=_0x443418[_0x38b8ab(0x192)][_0x365f31[_0x38b8ab(0x195)]],_0x3ae459=!!_0x2bd368&&(_0x2bd368[_0x38b8ab(0x1b6)]!==_0x365f31[_0x38b8ab(0x1a9)]||!!_0x365f31[_0x38b8ab(0x1ba)]&&_0x2bd368['sqlName']!==_0x365f31[_0x38b8ab(0x1ba)]);if(!_0x247d70['bool'](_0x38b8ab(0x1ac))&&_0x2bd368&&_0x2bd368[_0x38b8ab(0x194)]===_0x4427b6&&!_0x3ae459)continue;_0x239fea['push'](_0x365f31['sqlCode']);}return{'method':'POST','url':_0x38b8ab(0x1b7),'body':{'sqlCodes':_0x239fea,'appCode':_0x247d70[_0x38b8ab(0x197)]},'description':_0x38b8ab(0x1b3)+_0x239fea[_0x38b8ab(0x1aa)]+_0x38b8ab(0x1a6)};},async 'execute'(_0x1bd078){const _0x3eab2c=a139_0x3b8f95,_0x1a4412=loadSqlProjectConfig(_0x1bd078[_0x3eab2c(0x197)]),_0x4fc66b=await readSqlLockFile(_0x1a4412[_0x3eab2c(0x1c1)]),{lockData:_0x4889d6,appLock:_0x2a109a}=ensureSqlLockScope(_0x4fc66b??createEmptySqlLock(),_0x1bd078['appCode'],_0x1a4412[_0x3eab2c(0x1cc)],'push'),_0x1b4dd4=await getTargetSqlQueries(_0x1a4412,_0x2a109a,_0x1bd078[_0x3eab2c(0x1a5)](_0x3eab2c(0x1a4))||undefined);if(_0x1b4dd4[_0x3eab2c(0x1aa)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':'No\x20local\x20SQL\x20files\x20found.'};const _0x18b76a=[],_0x47f8f4=[],_0x1f66f1=[];for(const _0x391f25 of _0x1b4dd4){const _0x17df90=_0x2a109a[_0x3eab2c(0x192)][_0x391f25['sqlCode']];if(!_0x17df90){_0x1f66f1[_0x3eab2c(0x1a1)]({'sqlCode':_0x391f25[_0x3eab2c(0x195)],'error':_0x3eab2c(0x19c)});continue;}try{const _0x29400d=await computeSqlFileHash(_0x391f25[_0x3eab2c(0x1ae)]),_0x1a11ac=_0x17df90[_0x3eab2c(0x1b6)]!==_0x391f25[_0x3eab2c(0x1a9)]||!!_0x391f25[_0x3eab2c(0x1ba)]&&_0x17df90['sqlName']!==_0x391f25[_0x3eab2c(0x1ba)];if(!_0x1bd078['bool'](_0x3eab2c(0x1ac))&&_0x17df90[_0x3eab2c(0x194)]===_0x29400d&&!_0x1a11ac){_0x47f8f4[_0x3eab2c(0x1a1)]({'sqlCode':_0x391f25['sqlCode'],'reason':'unchanged'});continue;}if(_0x17df90[_0x3eab2c(0x1b8)]==null){_0x1f66f1[_0x3eab2c(0x1a1)]({'sqlCode':_0x391f25[_0x3eab2c(0x195)],'error':_0x3eab2c(0x18e)});continue;}const _0xc6b7de=await readFile(_0x391f25[_0x3eab2c(0x1ae)],_0x3eab2c(0x19d)),_0x34fc61=stripLocalSqlMetadata(_0xc6b7de,_0x391f25[_0x3eab2c(0x18f)]),_0x35abf3=_0x391f25['sqlName']||_0x17df90['sqlName'],_0x4becbc=await resolveTargetDbBinding(_0x1bd078[_0x3eab2c(0x197)],_0x391f25,_0x17df90),_0x3a3d87=await updateSqlQuery({'id':_0x17df90[_0x3eab2c(0x1ca)],'appCode':_0x1bd078[_0x3eab2c(0x197)],'sqlCode':_0x391f25[_0x3eab2c(0x195)],'sqlName':_0x35abf3,'dbId':_0x4becbc[_0x3eab2c(0x1c4)],'version':_0x17df90['version'],'sqlContent':_0x34fc61,'sqlConfig':_0x17df90[_0x3eab2c(0x1b1)]??undefined}),_0x46f338=_0x3a3d87['dbId']?await getDbName(_0x1bd078[_0x3eab2c(0x197)],Number(_0x3a3d87[_0x3eab2c(0x1c4)]))[_0x3eab2c(0x1b9)](()=>_0x4becbc['dbName']):_0x4becbc[_0x3eab2c(0x1bf)];_0x2a109a[_0x3eab2c(0x192)][_0x391f25[_0x3eab2c(0x195)]]={...buildSqlLockEntry(_0x3a3d87,_0x34fc61,_0x29400d,{'dbName':_0x46f338}),'path':_0x391f25[_0x3eab2c(0x1a9)],'mode':_0x17df90[_0x3eab2c(0x18f)]},await archivePreviousSqlFileIfNeeded(_0x1a4412,_0x17df90[_0x3eab2c(0x1b6)],_0x391f25[_0x3eab2c(0x1a9)]),_0x18b76a[_0x3eab2c(0x1a1)]({'sqlCode':_0x391f25[_0x3eab2c(0x195)],'remoteId':_0x17df90['remoteId']});}catch(_0x58cb29){_0x1f66f1[_0x3eab2c(0x1a1)]({'sqlCode':_0x391f25[_0x3eab2c(0x195)],'error':_0x58cb29 instanceof Error?_0x58cb29[_0x3eab2c(0x1bb)]:String(_0x58cb29)});}}return _0x2a109a['lastSync']=new Date()[_0x3eab2c(0x1a2)](),await writeSqlLockFile(_0x1a4412[_0x3eab2c(0x1c1)],_0x4889d6),{'ok':_0x1f66f1[_0x3eab2c(0x1aa)]===0x0,'data':{'pushed':_0x18b76a,'skipped':_0x47f8f4,'failed':_0x1f66f1},'message':_0x3eab2c(0x1c9)+_0x18b76a[_0x3eab2c(0x1aa)]+'\x20pushed,\x20'+_0x47f8f4['length']+_0x3eab2c(0x1bc)+_0x1f66f1[_0x3eab2c(0x1aa)]+_0x3eab2c(0x1c6)};}};async function archivePreviousSqlFileIfNeeded(_0x323d9f,_0x5894c6,_0x3d63de){const _0x26074c=a139_0x3b8f95;if(!_0x5894c6||_0x5894c6===_0x3d63de)return;const _0x4063c2=join(_0x323d9f[_0x26074c(0x199)],_0x5894c6);if(!await fileExists(_0x4063c2))return;const _0x53f423=await moveToTrash(_0x323d9f[_0x26074c(0x1bd)],_0x323d9f['trashDir'],_0x4063c2);await cleanupEmptyDirectories(dirname(_0x4063c2),_0x323d9f[_0x26074c(0x199)]),void _0x53f423;}async function moveToTrash(_0x252e3b,_0x394802,_0x5734c2){const _0x1aeb21=a139_0x3b8f95,_0x396683=new Date()[_0x1aeb21(0x1a2)]()[_0x1aeb21(0x1a3)](/[:.]/g,'-'),_0x160faa=relative(_0x252e3b,_0x5734c2),_0x5a974b=join(_0x394802,_0x396683,_0x160faa);return await mkdir(dirname(_0x5a974b),{'recursive':!![]}),await rename(_0x5734c2,_0x5a974b),_0x5a974b;}async function cleanupEmptyDirectories(_0x5a7cbb,_0x3a7fcf){const _0x5c77fc=a139_0x3b8f95;let _0x34f461=resolve(_0x5a7cbb);const _0x332299=resolve(_0x3a7fcf);while(_0x34f461[_0x5c77fc(0x193)](''+_0x332299+sep)||_0x34f461===_0x332299){if(_0x34f461===_0x332299)return;try{const _0x45d66a=await readdir(_0x34f461);if(_0x45d66a[_0x5c77fc(0x1aa)]>0x0)return;await rmdir(_0x34f461);}catch{return;}_0x34f461=dirname(_0x34f461);}}async function resolveTargetDbBinding(_0x267ff8,_0x10353b,_0x5b2ff6){const _0x467d1a=a139_0x3b8f95,_0x305706=_0x10353b[_0x467d1a(0x19e)];if(!_0x305706)return{'dbId':_0x5b2ff6[_0x467d1a(0x1c4)],'dbName':_0x5b2ff6['dbName']};const _0x1ca43f=buildDbDirectoryName(_0x5b2ff6[_0x467d1a(0x1bf)],_0x5b2ff6[_0x467d1a(0x1c4)]);if(_0x305706===_0x1ca43f)return{'dbId':_0x5b2ff6['dbId'],'dbName':_0x5b2ff6[_0x467d1a(0x1bf)]};const _0x4a7dac=parseExplicitDbDirectory(_0x305706);if(_0x4a7dac!=null)return{'dbId':_0x4a7dac,'dbName':await getDbName(_0x267ff8,_0x4a7dac)[_0x467d1a(0x1b9)](()=>undefined)};const _0x1bd814=await listDatabases(_0x267ff8),_0x3b7f51=_0x1bd814[_0x467d1a(0x196)](_0x2d54ae=>buildDbDirectoryName(_0x2d54ae[_0x467d1a(0x1bf)],_0x2d54ae[_0x467d1a(0x1c4)])===_0x305706);if(_0x3b7f51[_0x467d1a(0x1aa)]===0x1)return{'dbId':_0x3b7f51[0x0][_0x467d1a(0x1c4)],'dbName':_0x3b7f51[0x0][_0x467d1a(0x1bf)]};if(_0x3b7f51[_0x467d1a(0x1aa)]===0x0)throw CliErrors[_0x467d1a(0x1b5)](_0x467d1a(0x1c2)+_0x305706+_0x467d1a(0x19f)+_0x10353b[_0x467d1a(0x195)]+'.');const _0x1d5e1f=_0x3b7f51[_0x467d1a(0x1b4)](_0x4a67af=>_0x4a67af['dbName']+'\x20('+_0x4a67af[_0x467d1a(0x1c4)]+')')[_0x467d1a(0x190)](',\x20');throw CliErrors[_0x467d1a(0x1b5)](_0x467d1a(0x1c5)+_0x305706+_0x467d1a(0x1b0)+_0x10353b[_0x467d1a(0x195)]+':\x20'+_0x1d5e1f);}function parseExplicitDbDirectory(_0x1ad8b2){const _0x507fc7=a139_0x3b8f95,_0x1c6be0=/^db-(\d+)$/[_0x507fc7(0x1cd)](_0x1ad8b2);if(!_0x1c6be0)return null;const _0x94069=Number(_0x1c6be0[0x1]);return Number[_0x507fc7(0x1a8)](_0x94069)&&_0x94069>0x0?_0x94069:null;}
1
+ function a138_0x35f3(_0x23b9ff,_0x5a25e5){_0x23b9ff=_0x23b9ff-0xd3;const _0x2588eb=a138_0x2588();let _0x35f3ca=_0x2588eb[_0x23b9ff];return _0x35f3ca;}const a138_0x5c5a72=a138_0x35f3;(function(_0x4dbb71,_0xaaece5){const _0x4f6955=a138_0x35f3,_0x455bf8=_0x4dbb71();while(!![]){try{const _0x42183e=-parseInt(_0x4f6955(0xfa))/0x1*(-parseInt(_0x4f6955(0xd5))/0x2)+-parseInt(_0x4f6955(0xf9))/0x3+-parseInt(_0x4f6955(0xeb))/0x4+parseInt(_0x4f6955(0xd4))/0x5*(-parseInt(_0x4f6955(0x10c))/0x6)+parseInt(_0x4f6955(0xe1))/0x7+-parseInt(_0x4f6955(0xe5))/0x8+parseInt(_0x4f6955(0xe0))/0x9;if(_0x42183e===_0xaaece5)break;else _0x455bf8['push'](_0x455bf8['shift']());}catch(_0x3f8a7c){_0x455bf8['push'](_0x455bf8['shift']());}}}(a138_0x2588,0x98ffa));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';function a138_0x2588(){const _0x4d409c=['trashDir','boolean','Local\x20directory\x20\x22','remoteId','relativePath','17955252OEvXvN','5080544qeIyfn','sqlcode','force','filePath','6401592qygjfu','\x20failed','Local\x20SQL\x20not\x20found:\x20','dbDirectory','path','map','4402492ufbErj','sqlRootDir','No\x20database\x20matches\x20local\x20directory\x20\x22','dbId','has','Push\x20local\x20SQL\x20files\x20to\x20remote','validation','bool','exec','catch','filter','replace','POST','length','412623ySwluf','2732qSPAgL','Push\x20complete:\x20','sqlName','dbName','appCode','sqlRoot','sqlCode','\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20','lockFilePath','\x22\x20for\x20sqlCode\x20','utf8','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','push','entries','sqlConfig','hash','version','unchanged','165282lMNvMO','high-risk-write','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','join','/smartapi/custom/updateUserCustomSql','lastSync','toISOString','get','25tFRlwz','60foBBbE','message','No\x20local\x20SQL\x20files\x20found.','local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first','sqls','\x20skipped,\x20'];a138_0x2588=function(){return _0x4d409c;};return a138_0x2588();}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(_0x4d2b05,_0x37750f,_0x34d739){const _0x179b09=a138_0x35f3,_0x4ea35d=await scanLocalSqlQueries(_0x4d2b05),_0x927eb2=new Map();for(const _0x3b97a1 of _0x4ea35d){if(_0x34d739&&_0x3b97a1[_0x179b09(0x100)]!==_0x34d739)continue;const _0x38bd45=_0x927eb2[_0x179b09(0xd3)](_0x3b97a1['sqlCode'])??[];_0x38bd45[_0x179b09(0x106)](_0x3b97a1),_0x927eb2['set'](_0x3b97a1['sqlCode'],_0x38bd45);}if(_0x34d739&&!_0x927eb2[_0x179b09(0xef)](_0x34d739))throw CliErrors['validation'](_0x179b09(0xe7)+_0x34d739);const _0x18fe6b=[];for(const [_0x4bed0e,_0x33b79e]of _0x927eb2[_0x179b09(0x107)]()){if(_0x33b79e[_0x179b09(0xf8)]===0x1){_0x18fe6b['push'](_0x33b79e[0x0]);continue;}const _0x599881=_0x37750f[_0x179b09(0xd9)][_0x4bed0e],_0xb71d08=_0x599881?.[_0x179b09(0xe9)],_0x2bff06=_0xb71d08?_0x33b79e[_0x179b09(0xf5)](_0x455003=>_0x455003[_0x179b09(0xdf)]!==_0xb71d08):_0x33b79e;if(_0x599881&&_0x2bff06[_0x179b09(0xf8)]===0x1){_0x18fe6b[_0x179b09(0x106)](_0x2bff06[0x0]);continue;}throw CliErrors[_0x179b09(0xf1)](_0x179b09(0x105)+_0x4bed0e+'.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.');}return _0x18fe6b;}export const sqlPush={'service':'sql','command':a138_0x5c5a72(0x106),'description':a138_0x5c5a72(0xf0),'risk':a138_0x5c5a72(0x10d),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a138_0x5c5a72(0xe3),'type':a138_0x5c5a72(0xdc),'description':a138_0x5c5a72(0x10e)}],async 'dryRun'(_0x5db9c3){const _0x4df48b=a138_0x5c5a72,_0x231611=loadSqlProjectConfig(_0x5db9c3[_0x4df48b(0xfe)]),_0x3e1891=await readSqlLockFile(_0x231611['lockFilePath']),{appLock:_0x1f8e43}=ensureSqlLockScope(_0x3e1891??createEmptySqlLock(),_0x5db9c3[_0x4df48b(0xfe)],_0x231611[_0x4df48b(0xff)],_0x4df48b(0x106)),_0x276290=await getTargetSqlQueries(_0x231611,_0x1f8e43,_0x5db9c3['str'](_0x4df48b(0xe2))||undefined),_0x32b7e3=[];for(const _0xb8f41f of _0x276290){const _0x1b1af3=await computeSqlFileHash(_0xb8f41f[_0x4df48b(0xe4)]),_0x704f9b=_0x1f8e43[_0x4df48b(0xd9)][_0xb8f41f[_0x4df48b(0x100)]],_0x1e2da6=!!_0x704f9b&&(_0x704f9b['path']!==_0xb8f41f[_0x4df48b(0xdf)]||!!_0xb8f41f['sqlName']&&_0x704f9b[_0x4df48b(0xfc)]!==_0xb8f41f['sqlName']);if(!_0x5db9c3[_0x4df48b(0xf2)](_0x4df48b(0xe3))&&_0x704f9b&&_0x704f9b[_0x4df48b(0x109)]===_0x1b1af3&&!_0x1e2da6)continue;_0x32b7e3[_0x4df48b(0x106)](_0xb8f41f[_0x4df48b(0x100)]);}return{'method':_0x4df48b(0xf7),'url':_0x4df48b(0x110),'body':{'sqlCodes':_0x32b7e3,'appCode':_0x5db9c3[_0x4df48b(0xfe)]},'description':'Would\x20push\x20'+_0x32b7e3[_0x4df48b(0xf8)]+'\x20SQL\x20file(s)'};},async 'execute'(_0x49d5de){const _0xc64a0d=a138_0x5c5a72,_0x138277=loadSqlProjectConfig(_0x49d5de[_0xc64a0d(0xfe)]),_0x59abe1=await readSqlLockFile(_0x138277[_0xc64a0d(0x102)]),{lockData:_0x40ff8f,appLock:_0x4ea8ef}=ensureSqlLockScope(_0x59abe1??createEmptySqlLock(),_0x49d5de['appCode'],_0x138277[_0xc64a0d(0xff)],_0xc64a0d(0x106)),_0x41da2b=await getTargetSqlQueries(_0x138277,_0x4ea8ef,_0x49d5de['str']('sqlcode')||undefined);if(_0x41da2b[_0xc64a0d(0xf8)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0xc64a0d(0xd7)};const _0x42a7b1=[],_0x4e14ce=[],_0x5e234b=[];for(const _0x277813 of _0x41da2b){const _0xfd56e5=_0x4ea8ef[_0xc64a0d(0xd9)][_0x277813['sqlCode']];if(!_0xfd56e5){_0x5e234b[_0xc64a0d(0x106)]({'sqlCode':_0x277813[_0xc64a0d(0x100)],'error':_0xc64a0d(0xd8)});continue;}try{const _0x573676=await computeSqlFileHash(_0x277813[_0xc64a0d(0xe4)]),_0x41a316=_0xfd56e5[_0xc64a0d(0xe9)]!==_0x277813[_0xc64a0d(0xdf)]||!!_0x277813['sqlName']&&_0xfd56e5[_0xc64a0d(0xfc)]!==_0x277813['sqlName'];if(!_0x49d5de[_0xc64a0d(0xf2)](_0xc64a0d(0xe3))&&_0xfd56e5[_0xc64a0d(0x109)]===_0x573676&&!_0x41a316){_0x4e14ce[_0xc64a0d(0x106)]({'sqlCode':_0x277813[_0xc64a0d(0x100)],'reason':_0xc64a0d(0x10b)});continue;}if(_0xfd56e5[_0xc64a0d(0x10a)]==null){_0x5e234b[_0xc64a0d(0x106)]({'sqlCode':_0x277813[_0xc64a0d(0x100)],'error':'missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first'});continue;}const _0x20e8ce=await readFile(_0x277813[_0xc64a0d(0xe4)],_0xc64a0d(0x104)),_0x290985=stripLocalSqlMetadata(_0x20e8ce,_0x277813['mode']),_0x43577a=_0x277813['sqlName']||_0xfd56e5[_0xc64a0d(0xfc)],_0x12fdaf=await resolveTargetDbBinding(_0x49d5de[_0xc64a0d(0xfe)],_0x277813,_0xfd56e5),_0x4c06ea=await updateSqlQuery({'id':_0xfd56e5[_0xc64a0d(0xde)],'appCode':_0x49d5de[_0xc64a0d(0xfe)],'sqlCode':_0x277813[_0xc64a0d(0x100)],'sqlName':_0x43577a,'dbId':_0x12fdaf[_0xc64a0d(0xee)],'version':_0xfd56e5['version'],'sqlContent':_0x290985,'sqlConfig':_0xfd56e5[_0xc64a0d(0x108)]??undefined}),_0x2b6e40=_0x4c06ea[_0xc64a0d(0xee)]?await getDbName(_0x49d5de[_0xc64a0d(0xfe)],Number(_0x4c06ea[_0xc64a0d(0xee)]))[_0xc64a0d(0xf4)](()=>_0x12fdaf[_0xc64a0d(0xfd)]):_0x12fdaf['dbName'];_0x4ea8ef[_0xc64a0d(0xd9)][_0x277813[_0xc64a0d(0x100)]]={...buildSqlLockEntry(_0x4c06ea,_0x290985,_0x573676,{'dbName':_0x2b6e40}),'path':_0x277813[_0xc64a0d(0xdf)],'mode':_0xfd56e5['mode']},await archivePreviousSqlFileIfNeeded(_0x138277,_0xfd56e5[_0xc64a0d(0xe9)],_0x277813[_0xc64a0d(0xdf)]),_0x42a7b1[_0xc64a0d(0x106)]({'sqlCode':_0x277813[_0xc64a0d(0x100)],'remoteId':_0xfd56e5[_0xc64a0d(0xde)]});}catch(_0x4f46fc){_0x5e234b[_0xc64a0d(0x106)]({'sqlCode':_0x277813[_0xc64a0d(0x100)],'error':_0x4f46fc instanceof Error?_0x4f46fc[_0xc64a0d(0xd6)]:String(_0x4f46fc)});}}return _0x4ea8ef[_0xc64a0d(0x111)]=new Date()['toISOString'](),await writeSqlLockFile(_0x138277[_0xc64a0d(0x102)],_0x40ff8f),{'ok':_0x5e234b[_0xc64a0d(0xf8)]===0x0,'data':{'pushed':_0x42a7b1,'skipped':_0x4e14ce,'failed':_0x5e234b},'message':_0xc64a0d(0xfb)+_0x42a7b1[_0xc64a0d(0xf8)]+'\x20pushed,\x20'+_0x4e14ce[_0xc64a0d(0xf8)]+_0xc64a0d(0xda)+_0x5e234b[_0xc64a0d(0xf8)]+_0xc64a0d(0xe6)};}};async function archivePreviousSqlFileIfNeeded(_0x371966,_0x40c59a,_0x54fcec){const _0x4ef99e=a138_0x5c5a72;if(!_0x40c59a||_0x40c59a===_0x54fcec)return;const _0x1851c7=join(_0x371966[_0x4ef99e(0xec)],_0x40c59a);if(!await fileExists(_0x1851c7))return;const _0x5d184c=await moveToTrash(_0x371966['projectRoot'],_0x371966[_0x4ef99e(0xdb)],_0x1851c7);await cleanupEmptyDirectories(dirname(_0x1851c7),_0x371966[_0x4ef99e(0xec)]),void _0x5d184c;}async function moveToTrash(_0x22d4fe,_0xd15fff,_0x5283e4){const _0x548161=a138_0x5c5a72,_0x4a23e7=new Date()[_0x548161(0x112)]()[_0x548161(0xf6)](/[:.]/g,'-'),_0x5d8ce3=relative(_0x22d4fe,_0x5283e4),_0xb457d5=join(_0xd15fff,_0x4a23e7,_0x5d8ce3);return await mkdir(dirname(_0xb457d5),{'recursive':!![]}),await rename(_0x5283e4,_0xb457d5),_0xb457d5;}async function cleanupEmptyDirectories(_0x126216,_0x4e0163){const _0x2de1bd=a138_0x5c5a72;let _0x237bdc=resolve(_0x126216);const _0x29a75a=resolve(_0x4e0163);while(_0x237bdc['startsWith'](''+_0x29a75a+sep)||_0x237bdc===_0x29a75a){if(_0x237bdc===_0x29a75a)return;try{const _0x59a933=await readdir(_0x237bdc);if(_0x59a933[_0x2de1bd(0xf8)]>0x0)return;await rmdir(_0x237bdc);}catch{return;}_0x237bdc=dirname(_0x237bdc);}}async function resolveTargetDbBinding(_0x29d78d,_0x898e8d,_0xac178e){const _0x1e2426=a138_0x5c5a72,_0xf96ebb=_0x898e8d[_0x1e2426(0xe8)];if(!_0xf96ebb)return{'dbId':_0xac178e[_0x1e2426(0xee)],'dbName':_0xac178e['dbName']};const _0x396f90=buildDbDirectoryName(_0xac178e[_0x1e2426(0xfd)],_0xac178e['dbId']);if(_0xf96ebb===_0x396f90)return{'dbId':_0xac178e[_0x1e2426(0xee)],'dbName':_0xac178e[_0x1e2426(0xfd)]};const _0x4397c2=parseExplicitDbDirectory(_0xf96ebb);if(_0x4397c2!=null)return{'dbId':_0x4397c2,'dbName':await getDbName(_0x29d78d,_0x4397c2)['catch'](()=>undefined)};const _0x2a0510=await listDatabases(_0x29d78d),_0x57a75e=_0x2a0510[_0x1e2426(0xf5)](_0x113506=>buildDbDirectoryName(_0x113506[_0x1e2426(0xfd)],_0x113506[_0x1e2426(0xee)])===_0xf96ebb);if(_0x57a75e[_0x1e2426(0xf8)]===0x1)return{'dbId':_0x57a75e[0x0]['dbId'],'dbName':_0x57a75e[0x0][_0x1e2426(0xfd)]};if(_0x57a75e[_0x1e2426(0xf8)]===0x0)throw CliErrors[_0x1e2426(0xf1)](_0x1e2426(0xed)+_0xf96ebb+_0x1e2426(0x103)+_0x898e8d[_0x1e2426(0x100)]+'.');const _0x23f010=_0x57a75e[_0x1e2426(0xea)](_0x2eb4f3=>_0x2eb4f3[_0x1e2426(0xfd)]+'\x20('+_0x2eb4f3[_0x1e2426(0xee)]+')')[_0x1e2426(0x10f)](',\x20');throw CliErrors['validation'](_0x1e2426(0xdd)+_0xf96ebb+_0x1e2426(0x101)+_0x898e8d[_0x1e2426(0x100)]+':\x20'+_0x23f010);}function parseExplicitDbDirectory(_0x4d8aca){const _0x20394f=a138_0x5c5a72,_0x5eb66b=/^db-(\d+)$/[_0x20394f(0xf3)](_0x4d8aca);if(!_0x5eb66b)return null;const _0x40ba7c=Number(_0x5eb66b[0x1]);return Number['isFinite'](_0x40ba7c)&&_0x40ba7c>0x0?_0x40ba7c:null;}
@@ -1 +1 @@
1
- const a140_0x263bb8=a140_0x179c;(function(_0x1cdb5c,_0x52749){const _0x578292=a140_0x179c,_0x4e61b1=_0x1cdb5c();while(!![]){try{const _0x58722b=-parseInt(_0x578292(0x1f0))/0x1*(parseInt(_0x578292(0x1f4))/0x2)+parseInt(_0x578292(0x1f6))/0x3+parseInt(_0x578292(0x1f9))/0x4*(-parseInt(_0x578292(0x202))/0x5)+parseInt(_0x578292(0x203))/0x6*(parseInt(_0x578292(0x1ee))/0x7)+parseInt(_0x578292(0x1ed))/0x8*(parseInt(_0x578292(0x201))/0x9)+-parseInt(_0x578292(0x1f3))/0xa*(-parseInt(_0x578292(0x1fe))/0xb)+parseInt(_0x578292(0x1ef))/0xc*(-parseInt(_0x578292(0x1e9))/0xd);if(_0x58722b===_0x52749)break;else _0x4e61b1['push'](_0x4e61b1['shift']());}catch(_0x58e59c){_0x4e61b1['push'](_0x4e61b1['shift']());}}}(a140_0x1009,0x54b87));function a140_0x1009(){const _0x3bb9a2=['Path\x20to\x20the\x20SQL\x20file','SQL\x20query\x20display\x20name','53810ItnhYo','1071258KYAkTi','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`.','908061oKzigy','save','`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.','128GxaSTs','sql','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','join','file','11lNjOpN','string','validation','4671MSKBau','95045CwReCf','2202zPMPhD','Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.','247GyEJQx','sqlname','description','Query\x20description','9960tsphhd','13097poiBLp','94704jMJRyx','1LmQmau'];a140_0x1009=function(){return _0x3bb9a2;};return a140_0x1009();}import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const SQL_SAVE_DEPRECATED_HINT=[a140_0x263bb8(0x1f8),a140_0x263bb8(0x1e8),a140_0x263bb8(0x1f5)][a140_0x263bb8(0x1fc)]('\x0a');function a140_0x179c(_0x5217bd,_0x559976){_0x5217bd=_0x5217bd-0x1e8;const _0x1009bc=a140_0x1009();let _0x179c2b=_0x1009bc[_0x5217bd];return _0x179c2b;}export const sqlSave={'service':a140_0x263bb8(0x1fa),'command':a140_0x263bb8(0x1f7),'description':'Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a140_0x263bb8(0x1fd),'type':a140_0x263bb8(0x1ff),'required':!![],'description':a140_0x263bb8(0x1f1)},SQLCODE_FLAG_OPTIONAL,{'name':a140_0x263bb8(0x1ea),'type':a140_0x263bb8(0x1ff),'description':a140_0x263bb8(0x1f2)},{'name':'db','type':'string','description':a140_0x263bb8(0x1fb)},{'name':a140_0x263bb8(0x1eb),'type':'string','description':a140_0x263bb8(0x1ec)}],async 'validate'(){throw CliErrors['validation'](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){const _0x52bb49=a140_0x263bb8;throw CliErrors[_0x52bb49(0x200)](SQL_SAVE_DEPRECATED_HINT);}};
1
+ const a139_0x33d44b=a139_0x1d0b;(function(_0x4baacc,_0x20725d){const _0x585b80=a139_0x1d0b,_0xd9d2ce=_0x4baacc();while(!![]){try{const _0x5802b2=parseInt(_0x585b80(0xa6))/0x1+parseInt(_0x585b80(0x9b))/0x2+-parseInt(_0x585b80(0xa0))/0x3+parseInt(_0x585b80(0xa1))/0x4*(parseInt(_0x585b80(0xaa))/0x5)+parseInt(_0x585b80(0x9d))/0x6+-parseInt(_0x585b80(0xa2))/0x7*(-parseInt(_0x585b80(0xa3))/0x8)+parseInt(_0x585b80(0xaf))/0x9*(-parseInt(_0x585b80(0xab))/0xa);if(_0x5802b2===_0x20725d)break;else _0xd9d2ce['push'](_0xd9d2ce['shift']());}catch(_0x43b0d5){_0xd9d2ce['push'](_0xd9d2ce['shift']());}}}(a139_0xe55b,0x9461b));import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a139_0x1d0b(_0x1732e4,_0x4bc82f){_0x1732e4=_0x1732e4-0x99;const _0xe55b9e=a139_0xe55b();let _0x1d0bd3=_0xe55b9e[_0x1732e4];return _0x1d0bd3;}const SQL_SAVE_DEPRECATED_HINT=[a139_0x33d44b(0xac),a139_0x33d44b(0x9c),a139_0x33d44b(0xa4)][a139_0x33d44b(0xa5)]('\x0a');export const sqlSave={'service':a139_0x33d44b(0xb0),'command':a139_0x33d44b(0xad),'description':a139_0x33d44b(0x9f),'risk':a139_0x33d44b(0x99),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a139_0x33d44b(0xa8),'type':a139_0x33d44b(0x9e),'required':!![],'description':a139_0x33d44b(0xa9)},SQLCODE_FLAG_OPTIONAL,{'name':a139_0x33d44b(0xae),'type':a139_0x33d44b(0x9e),'description':a139_0x33d44b(0x9a)},{'name':'db','type':'string','description':'Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)'},{'name':a139_0x33d44b(0xa7),'type':a139_0x33d44b(0x9e),'description':'Query\x20description'}],async 'validate'(){throw CliErrors['validation'](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){throw CliErrors['validation'](SQL_SAVE_DEPRECATED_HINT);}};function a139_0xe55b(){const _0x32c944=['410EFbHgP','`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.','save','sqlname','397008VaSkEd','sql','write','SQL\x20query\x20display\x20name','134038MTsDHA','Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.','2866968QixEiY','string','Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','393843xtFmUn','870644WVyKvJ','42WVYxLn','1004952xGuXxh','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`.','join','378439bowaWx','description','file','Path\x20to\x20the\x20SQL\x20file','20BrtVrv'];a139_0xe55b=function(){return _0x32c944;};return a139_0xe55b();}
@@ -1 +1 @@
1
- (function(_0x29759f,_0x447f1f){const _0x39aeda=a141_0x9e66,_0x3774bd=_0x29759f();while(!![]){try{const _0x338b96=parseInt(_0x39aeda(0x12d))/0x1*(-parseInt(_0x39aeda(0x124))/0x2)+parseInt(_0x39aeda(0x128))/0x3+-parseInt(_0x39aeda(0x103))/0x4+-parseInt(_0x39aeda(0x11f))/0x5*(parseInt(_0x39aeda(0x121))/0x6)+parseInt(_0x39aeda(0x127))/0x7+-parseInt(_0x39aeda(0x126))/0x8*(parseInt(_0x39aeda(0x12f))/0x9)+parseInt(_0x39aeda(0x113))/0xa;if(_0x338b96===_0x447f1f)break;else _0x3774bd['push'](_0x3774bd['shift']());}catch(_0x4e68f0){_0x3774bd['push'](_0x3774bd['shift']());}}}(a141_0x41d6,0xc2a84));function a141_0x41d6(){const _0x56c1f1=['sqls','syncedAt','trimStart','join','sqlCode','fromEntries','map','20485660hjfrgB','length','split','dbId','apps','--\x20@lovrabet.','dbName','entries','sqlName','stdin','sqlConfig','stderr','10YrhSGU','sqlRoot','1933782BCHFFN','yes','question','10MlHUve','trim','43512SYKAqO','3668735apDjRR','1557021JRjOuc','toLowerCase','\x20-->','mode','filter','82557LxBrPf','sqlContent','1251cJzYLN','includes','path','1923848FjaHyH','\x20[y/N]\x20','test','push','replace','lastSync','endsWith','close','mybatisXml'];a141_0x41d6=function(){return _0x56c1f1;};return a141_0x41d6();}import{createInterface}from'node:readline';import{join}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath,detectSqlMode}from'../../core/sql-sync/utils.js';export const SQL_LOCAL_REL_DIR='.rabetbase/sql';export function buildSqlLockEntry(_0x8f0237,_0x4bd438,_0x1ae146,_0x5b9aab){const _0x553ff2=a141_0x9e66,_0x489d70=detectSqlMode(_0x4bd438);return{'path':buildSqlRelativePath(_0x8f0237['sqlCode'],_0x8f0237[_0x553ff2(0x11b)],_0x5b9aab?.[_0x553ff2(0x119)],_0x489d70,_0x8f0237[_0x553ff2(0x116)]),'hash':_0x1ae146,'remoteId':_0x8f0237['id'],'version':_0x8f0237['version'],'dbId':Number(_0x8f0237[_0x553ff2(0x116)]),'dbName':_0x5b9aab?.[_0x553ff2(0x119)],'sqlName':_0x8f0237[_0x553ff2(0x11b)],'sqlConfig':_0x8f0237[_0x553ff2(0x11d)]??undefined,'mode':_0x489d70};}export function cloneSqlLockData(_0x3cd2a5){const _0x29192b=a141_0x9e66;return{'apps':Object[_0x29192b(0x111)](Object[_0x29192b(0x11a)](_0x3cd2a5[_0x29192b(0x117)])[_0x29192b(0x112)](([_0x4c73f4,_0x22a98d])=>[_0x4c73f4,{'sqlRoot':_0x22a98d[_0x29192b(0x120)],'lastSync':_0x22a98d[_0x29192b(0x108)],'sqls':{..._0x22a98d[_0x29192b(0x10c)]}}]))};}export function ensureRemoteSqlContent(_0x53e488){const _0x5991d9=a141_0x9e66;return _0x53e488[_0x5991d9(0x12e)]??'';}export function buildLocalSqlFileContent(_0x1a8bb0,_0x3f1877,_0x4faae2){const _0x3713c7=a141_0x9e66,_0x2be994=_0x4faae2?.['mode']??detectSqlMode(_0x3f1877),_0x33bddc=stripLocalSqlMetadata(_0x3f1877,_0x2be994)[_0x3713c7(0x125)](),_0x4fea9d=[...buildMetadataHeaderLines({'sqlCode':_0x1a8bb0[_0x3713c7(0x110)],'sqlName':_0x1a8bb0[_0x3713c7(0x11b)],'dbId':_0x1a8bb0[_0x3713c7(0x116)],'dbName':_0x4faae2?.[_0x3713c7(0x119)],'mode':_0x2be994,'syncedAt':_0x4faae2?.[_0x3713c7(0x10d)],'description':_0x4faae2?.['description']},_0x2be994),'',_0x33bddc],_0x446c8e=_0x4fea9d[_0x3713c7(0x10f)]('\x0a');return _0x446c8e[_0x3713c7(0x109)]('\x0a')?_0x446c8e:_0x446c8e+'\x0a';}export function stripLocalSqlMetadata(_0x5e7e9d,_0x333ae6){const _0x2f4f47=a141_0x9e66,_0x278784=_0x5e7e9d[_0x2f4f47(0x107)](/\r\n/g,'\x0a')[_0x2f4f47(0x115)]('\x0a'),_0x292ed2=[];let _0x444465=0x0;if(_0x333ae6==='mybatisXml')while(_0x444465<_0x278784[_0x2f4f47(0x114)]){const _0x22c934=_0x278784[_0x444465]??'';if(/^\s*<!--\s*@lovrabet\./[_0x2f4f47(0x105)](_0x22c934)){_0x444465++;continue;}if(_0x22c934['trim']()===''&&_0x444465>0x0){_0x444465++;continue;}break;}else while(_0x444465<_0x278784[_0x2f4f47(0x114)]){const _0x4254aa=_0x278784[_0x444465]??'';if(/^\s*--\s*@lovrabet\./[_0x2f4f47(0x105)](_0x4254aa)){_0x444465++;continue;}if(_0x4254aa[_0x2f4f47(0x125)]()===''&&_0x444465>0x0){_0x444465++;continue;}break;}for(;_0x444465<_0x278784['length'];_0x444465++){_0x292ed2[_0x2f4f47(0x106)](_0x278784[_0x444465]);}return _0x292ed2['join']('\x0a')[_0x2f4f47(0x10e)]();}export function resolveSqlMode(_0x294511,_0x128e06){const _0x5a6f95=a141_0x9e66;if(_0x128e06?.[_0x5a6f95(0x12b)])return _0x128e06['mode'];return detectSqlMode(_0x294511);}export function resolveSqlFileName(_0x349efe,_0x1af83c,_0x1f62a2){const _0x3e1684=a141_0x9e66;if(_0x1f62a2?.[_0x3e1684(0x102)])return _0x1f62a2['path'];if(_0x1f62a2?.[_0x3e1684(0x11b)]||_0x1f62a2?.[_0x3e1684(0x119)])return buildSqlRelativePath(_0x349efe,_0x1f62a2?.[_0x3e1684(0x11b)],_0x1f62a2?.[_0x3e1684(0x119)],resolveSqlMode(_0x1af83c,_0x1f62a2),_0x1f62a2?.[_0x3e1684(0x116)]);return buildDefaultSqlFileName(_0x349efe,resolveSqlMode(_0x1af83c,_0x1f62a2));}function a141_0x9e66(_0x4b9979,_0x329ebc){_0x4b9979=_0x4b9979-0x102;const _0x41d676=a141_0x41d6();let _0x9e66db=_0x41d676[_0x4b9979];return _0x9e66db;}export function resolveSqlLocalDir(_0x43d4c5,_0x46df02){return join(_0x43d4c5,SQL_LOCAL_REL_DIR,_0x46df02);}export async function confirmForceOverwrite(_0x591094){const _0x2a0c1f=a141_0x9e66,_0x49ad05=createInterface({'input':process[_0x2a0c1f(0x11c)],'output':process[_0x2a0c1f(0x11e)]}),_0x1ae37d=await new Promise(_0x45e0c9=>{const _0x27dc35=_0x2a0c1f;_0x49ad05[_0x27dc35(0x123)](_0x591094+_0x27dc35(0x104),_0x45e0c9);});return _0x49ad05[_0x2a0c1f(0x10a)](),['y',_0x2a0c1f(0x122)][_0x2a0c1f(0x130)](_0x1ae37d[_0x2a0c1f(0x125)]()[_0x2a0c1f(0x129)]());}export function findSqlLockScope(_0x2cef85,_0x2eaf9a){const _0x304da3=a141_0x9e66;return _0x2cef85[_0x304da3(0x117)][_0x2eaf9a];}function buildMetadataHeaderLines(_0x16dca5,_0x2775a7){const _0x177279=a141_0x9e66,_0xfbe0f7=[['sqlCode',_0x16dca5[_0x177279(0x110)]],[_0x177279(0x11b),_0x16dca5[_0x177279(0x11b)]],[_0x177279(0x116),_0x16dca5[_0x177279(0x116)]],[_0x177279(0x119),_0x16dca5[_0x177279(0x119)]],[_0x177279(0x12b),_0x16dca5[_0x177279(0x12b)]],['syncedAt',_0x16dca5[_0x177279(0x10d)]],['description',_0x16dca5['description']]];if(_0x2775a7===_0x177279(0x10b))return _0xfbe0f7[_0x177279(0x12c)](([,_0x51ef2d])=>_0x51ef2d!==undefined&&_0x51ef2d!==null&&String(_0x51ef2d)[_0x177279(0x125)]()!=='')[_0x177279(0x112)](([_0x30ecff,_0x12a028])=>'<!--\x20@lovrabet.'+_0x30ecff+':\x20'+String(_0x12a028)+_0x177279(0x12a));return _0xfbe0f7['filter'](([,_0x2ca117])=>_0x2ca117!==undefined&&_0x2ca117!==null&&String(_0x2ca117)[_0x177279(0x125)]()!=='')[_0x177279(0x112)](([_0x1b3fac,_0x4d5a83])=>_0x177279(0x118)+_0x1b3fac+':\x20'+String(_0x4d5a83));}
1
+ const a140_0x8fc09e=a140_0x17d1;(function(_0x4e069b,_0x4b8b83){const _0xb25897=a140_0x17d1,_0x391c72=_0x4e069b();while(!![]){try{const _0x493730=parseInt(_0xb25897(0xf8))/0x1*(parseInt(_0xb25897(0xf3))/0x2)+-parseInt(_0xb25897(0x104))/0x3+-parseInt(_0xb25897(0x102))/0x4*(-parseInt(_0xb25897(0x10a))/0x5)+-parseInt(_0xb25897(0xfa))/0x6+parseInt(_0xb25897(0x10e))/0x7+-parseInt(_0xb25897(0x114))/0x8*(-parseInt(_0xb25897(0x10d))/0x9)+parseInt(_0xb25897(0xf5))/0xa*(parseInt(_0xb25897(0x101))/0xb);if(_0x493730===_0x4b8b83)break;else _0x391c72['push'](_0x391c72['shift']());}catch(_0x20a4da){_0x391c72['push'](_0x391c72['shift']());}}}(a140_0x35f8,0x4ace4));import{createInterface}from'node:readline';function a140_0x17d1(_0x1632d6,_0x55da63){_0x1632d6=_0x1632d6-0xf2;const _0x35f8cd=a140_0x35f8();let _0x17d177=_0x35f8cd[_0x1632d6];return _0x17d177;}import{join}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath,detectSqlMode}from'../../core/sql-sync/utils.js';export const SQL_LOCAL_REL_DIR=a140_0x8fc09e(0xf4);function a140_0x35f8(){const _0x3074c7=['\x20[y/N]\x20','filter','lastSync','split','8UljhPc','includes','version','map','sqlName','mybatisXml','sqlContent','length','push','dbName','dbId','yes','syncedAt','trim','740978TyqJYl','.rabetbase/sql','430PsGywh','description','entries','1AgRlsC','question','2657760jhOFFV','--\x20@lovrabet.','\x20-->','path','sqls','test','sqlRoot','45991LQFXYg','452cNWuVg','mode','745887HFdVRY','trimStart','close','sqlConfig','replace','sqlCode','9850LsBeTt','<!--\x20@lovrabet.','apps','506988iHDSmb','1181453xPhLrR','join'];a140_0x35f8=function(){return _0x3074c7;};return a140_0x35f8();}export function buildSqlLockEntry(_0x39e589,_0x1b9554,_0x5ea9a4,_0x4fd401){const _0x62874b=a140_0x8fc09e,_0x404060=detectSqlMode(_0x1b9554);return{'path':buildSqlRelativePath(_0x39e589[_0x62874b(0x109)],_0x39e589[_0x62874b(0x118)],_0x4fd401?.[_0x62874b(0x11d)],_0x404060,_0x39e589[_0x62874b(0x11e)]),'hash':_0x5ea9a4,'remoteId':_0x39e589['id'],'version':_0x39e589[_0x62874b(0x116)],'dbId':Number(_0x39e589[_0x62874b(0x11e)]),'dbName':_0x4fd401?.['dbName'],'sqlName':_0x39e589[_0x62874b(0x118)],'sqlConfig':_0x39e589[_0x62874b(0x107)]??undefined,'mode':_0x404060};}export function cloneSqlLockData(_0x5dcc5c){const _0x12d962=a140_0x8fc09e;return{'apps':Object['fromEntries'](Object[_0x12d962(0xf7)](_0x5dcc5c['apps'])[_0x12d962(0x117)](([_0x43c9f4,_0x5934ca])=>[_0x43c9f4,{'sqlRoot':_0x5934ca[_0x12d962(0x100)],'lastSync':_0x5934ca[_0x12d962(0x112)],'sqls':{..._0x5934ca[_0x12d962(0xfe)]}}]))};}export function ensureRemoteSqlContent(_0x5f1667){const _0x4880f5=a140_0x8fc09e;return _0x5f1667[_0x4880f5(0x11a)]??'';}export function buildLocalSqlFileContent(_0x17e1cc,_0xe3a948,_0x5284bf){const _0x357da4=a140_0x8fc09e,_0x337c32=_0x5284bf?.['mode']??detectSqlMode(_0xe3a948),_0x89ba14=stripLocalSqlMetadata(_0xe3a948,_0x337c32)['trim'](),_0x393587=[...buildMetadataHeaderLines({'sqlCode':_0x17e1cc[_0x357da4(0x109)],'sqlName':_0x17e1cc[_0x357da4(0x118)],'dbId':_0x17e1cc[_0x357da4(0x11e)],'dbName':_0x5284bf?.[_0x357da4(0x11d)],'mode':_0x337c32,'syncedAt':_0x5284bf?.[_0x357da4(0x120)],'description':_0x5284bf?.['description']},_0x337c32),'',_0x89ba14],_0x3f9aab=_0x393587[_0x357da4(0x10f)]('\x0a');return _0x3f9aab['endsWith']('\x0a')?_0x3f9aab:_0x3f9aab+'\x0a';}export function stripLocalSqlMetadata(_0x449ea6,_0x5a5a28){const _0x4dd481=a140_0x8fc09e,_0x57bdc0=_0x449ea6[_0x4dd481(0x108)](/\r\n/g,'\x0a')[_0x4dd481(0x113)]('\x0a'),_0x21244e=[];let _0x5c4463=0x0;if(_0x5a5a28===_0x4dd481(0x119))while(_0x5c4463<_0x57bdc0['length']){const _0x4e0c79=_0x57bdc0[_0x5c4463]??'';if(/^\s*<!--\s*@lovrabet\./[_0x4dd481(0xff)](_0x4e0c79)){_0x5c4463++;continue;}if(_0x4e0c79[_0x4dd481(0xf2)]()===''&&_0x5c4463>0x0){_0x5c4463++;continue;}break;}else while(_0x5c4463<_0x57bdc0[_0x4dd481(0x11b)]){const _0x2a2637=_0x57bdc0[_0x5c4463]??'';if(/^\s*--\s*@lovrabet\./['test'](_0x2a2637)){_0x5c4463++;continue;}if(_0x2a2637[_0x4dd481(0xf2)]()===''&&_0x5c4463>0x0){_0x5c4463++;continue;}break;}for(;_0x5c4463<_0x57bdc0['length'];_0x5c4463++){_0x21244e[_0x4dd481(0x11c)](_0x57bdc0[_0x5c4463]);}return _0x21244e[_0x4dd481(0x10f)]('\x0a')[_0x4dd481(0x105)]();}export function resolveSqlMode(_0x970a3e,_0x3865ce){const _0x3d945e=a140_0x8fc09e;if(_0x3865ce?.[_0x3d945e(0x103)])return _0x3865ce[_0x3d945e(0x103)];return detectSqlMode(_0x970a3e);}export function resolveSqlFileName(_0x1dcc9a,_0x4ed7b4,_0x4515e9){const _0x2e774f=a140_0x8fc09e;if(_0x4515e9?.[_0x2e774f(0xfd)])return _0x4515e9[_0x2e774f(0xfd)];if(_0x4515e9?.[_0x2e774f(0x118)]||_0x4515e9?.['dbName'])return buildSqlRelativePath(_0x1dcc9a,_0x4515e9?.['sqlName'],_0x4515e9?.['dbName'],resolveSqlMode(_0x4ed7b4,_0x4515e9),_0x4515e9?.[_0x2e774f(0x11e)]);return buildDefaultSqlFileName(_0x1dcc9a,resolveSqlMode(_0x4ed7b4,_0x4515e9));}export function resolveSqlLocalDir(_0x3ba0ad,_0x3e7744){return join(_0x3ba0ad,SQL_LOCAL_REL_DIR,_0x3e7744);}export async function confirmForceOverwrite(_0x1689bd){const _0x31fa70=a140_0x8fc09e,_0x51917b=createInterface({'input':process['stdin'],'output':process['stderr']}),_0x589a71=await new Promise(_0x40c3ed=>{const _0xa73e89=a140_0x17d1;_0x51917b[_0xa73e89(0xf9)](_0x1689bd+_0xa73e89(0x110),_0x40c3ed);});return _0x51917b[_0x31fa70(0x106)](),['y',_0x31fa70(0x11f)][_0x31fa70(0x115)](_0x589a71[_0x31fa70(0xf2)]()['toLowerCase']());}export function findSqlLockScope(_0x396b13,_0x9d1b37){const _0x2e4410=a140_0x8fc09e;return _0x396b13[_0x2e4410(0x10c)][_0x9d1b37];}function buildMetadataHeaderLines(_0x53bdf6,_0x201229){const _0x50ed32=a140_0x8fc09e,_0x11fa90=[[_0x50ed32(0x109),_0x53bdf6[_0x50ed32(0x109)]],['sqlName',_0x53bdf6['sqlName']],[_0x50ed32(0x11e),_0x53bdf6[_0x50ed32(0x11e)]],['dbName',_0x53bdf6['dbName']],[_0x50ed32(0x103),_0x53bdf6['mode']],[_0x50ed32(0x120),_0x53bdf6[_0x50ed32(0x120)]],['description',_0x53bdf6[_0x50ed32(0xf6)]]];if(_0x201229===_0x50ed32(0x119))return _0x11fa90[_0x50ed32(0x111)](([,_0x23e7d5])=>_0x23e7d5!==undefined&&_0x23e7d5!==null&&String(_0x23e7d5)[_0x50ed32(0xf2)]()!=='')[_0x50ed32(0x117)](([_0x769aeb,_0x3c2d72])=>_0x50ed32(0x10b)+_0x769aeb+':\x20'+String(_0x3c2d72)+_0x50ed32(0xfc));return _0x11fa90[_0x50ed32(0x111)](([,_0x10e8e8])=>_0x10e8e8!==undefined&&_0x10e8e8!==null&&String(_0x10e8e8)[_0x50ed32(0xf2)]()!=='')[_0x50ed32(0x117)](([_0x5cebf8,_0x5d59c6])=>_0x50ed32(0xfb)+_0x5cebf8+':\x20'+String(_0x5d59c6));}
@@ -1 +1 @@
1
- const a142_0x3fe289=a142_0x441a;(function(_0x18a9ab,_0x27b6fd){const _0x409d33=a142_0x441a,_0x1d5dca=_0x18a9ab();while(!![]){try{const _0x5afe55=parseInt(_0x409d33(0x194))/0x1*(parseInt(_0x409d33(0x19f))/0x2)+-parseInt(_0x409d33(0x18b))/0x3+parseInt(_0x409d33(0x19b))/0x4*(parseInt(_0x409d33(0x199))/0x5)+parseInt(_0x409d33(0x185))/0x6*(parseInt(_0x409d33(0x196))/0x7)+-parseInt(_0x409d33(0x190))/0x8*(parseInt(_0x409d33(0x188))/0x9)+parseInt(_0x409d33(0x180))/0xa*(-parseInt(_0x409d33(0x182))/0xb)+parseInt(_0x409d33(0x19d))/0xc;if(_0x5afe55===_0x27b6fd)break;else _0x1d5dca['push'](_0x1d5dca['shift']());}catch(_0x3bafe8){_0x1d5dca['push'](_0x1d5dca['shift']());}}}(a142_0x57b5,0xcb344));import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';function a142_0x57b5(){const _0x4bb842=['sqlRoot','4412202teNpmn','bool','\x20remote-only','appCode','sqlName','1073008dhxhhV','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','sqlCode','relativePath','7qrNDQz','status','77DrtzhW','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','map','235TGIAqg','totalCount','98012LscTYv','sqls','7579116nKrucX','\x20modified,\x20','50062FgCTFK','filePath','path','has','boolean','hash','push','remote','tableData','length','122750JdagjM','read','451nHxpnZ','sql','lockFilePath','681960uhVaxH','lockKey','All\x20SQL\x20queries\x20are\x20in\x20sync.','27MVeKCD','\x20added,\x20'];a142_0x57b5=function(){return _0x4bb842;};return a142_0x57b5();}import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x547005){const _0x405d00=a142_0x441a,_0xb3f884=[];let _0xab55a4=0x1;while(!![]){const _0x2b68b9=await listSqlQueries(_0x547005,{'currentPage':_0xab55a4,'pageSize':PAGE_SIZE}),_0x43c5cb=_0x2b68b9[_0x405d00(0x17e)]??[];_0xb3f884['push'](..._0x43c5cb[_0x405d00(0x198)](_0x5654c7=>_0x5654c7[_0x405d00(0x192)]));if(_0x43c5cb[_0x405d00(0x17f)]===0x0)break;const _0xabbb6e=_0x2b68b9['paging']?.[_0x405d00(0x19a)];if(_0xabbb6e!=null?_0xb3f884[_0x405d00(0x17f)]>=_0xabbb6e:_0x43c5cb[_0x405d00(0x17f)]<PAGE_SIZE)break;_0xab55a4++;}return _0xb3f884;}function a142_0x441a(_0x3c069e,_0x8eaf3e){_0x3c069e=_0x3c069e-0x17e;const _0x57b5fa=a142_0x57b5();let _0x441a88=_0x57b5fa[_0x3c069e];return _0x441a88;}export const sqlStatus={'service':a142_0x3fe289(0x183),'command':a142_0x3fe289(0x195),'description':a142_0x3fe289(0x197),'risk':a142_0x3fe289(0x181),'flags':[{'name':a142_0x3fe289(0x1a6),'type':a142_0x3fe289(0x1a3),'description':a142_0x3fe289(0x191)}],async 'execute'(_0x4c5f8a){const _0xd2590a=a142_0x3fe289,_0x2092fb=loadSqlProjectConfig(_0x4c5f8a[_0xd2590a(0x18e)]),_0x1474de=await readSqlLockFile(_0x2092fb[_0xd2590a(0x184)]),{appLock:_0x2bcce3}=ensureSqlLockScope(_0x1474de??createEmptySqlLock(),_0x2092fb[_0xd2590a(0x18e)],_0x2092fb[_0xd2590a(0x18a)],'status'),_0x5a94b9=await scanLocalSqlQueries(_0x2092fb),_0x318f30=[],_0x5ee0a6=[],_0x4f8f4e=[],_0x3b8a2b=[],_0x2c3dd7=new Set(_0x5a94b9['map'](_0x4f9235=>_0x4f9235['lockKey']));for(const _0x48718c of _0x5a94b9){const _0x38cfde=await computeSqlFileHash(_0x48718c[_0xd2590a(0x1a0)]),_0x392e08=_0x2bcce3['sqls'][_0x48718c['lockKey']],_0x2ef3ea=!!_0x392e08&&_0x392e08[_0xd2590a(0x1a1)]!==_0x48718c[_0xd2590a(0x193)],_0x1f08df=!!_0x392e08&&!!_0x48718c[_0xd2590a(0x18f)]&&_0x392e08[_0xd2590a(0x18f)]!==_0x48718c[_0xd2590a(0x18f)];if(!_0x392e08)_0x318f30[_0xd2590a(0x1a5)](_0x48718c[_0xd2590a(0x186)]);else _0x392e08[_0xd2590a(0x1a4)]!==_0x38cfde||_0x2ef3ea||_0x1f08df?_0x5ee0a6[_0xd2590a(0x1a5)](_0x48718c['lockKey']):_0x4f8f4e[_0xd2590a(0x1a5)](_0x48718c[_0xd2590a(0x186)]);}for(const _0x223e32 of Object['keys'](_0x2bcce3['sqls'])){!_0x2c3dd7[_0xd2590a(0x1a2)](_0x223e32)&&_0x3b8a2b[_0xd2590a(0x1a5)](_0x223e32);}const _0x27ef05=[];if(_0x4c5f8a[_0xd2590a(0x18c)]('remote')){const _0x377c51=await fetchAllSqlCodes(_0x4c5f8a[_0xd2590a(0x18e)]);for(const _0x44b9d3 of _0x377c51){!_0x2c3dd7[_0xd2590a(0x1a2)](_0x44b9d3)&&!_0x2bcce3[_0xd2590a(0x19c)][_0x44b9d3]&&_0x27ef05[_0xd2590a(0x1a5)](_0x44b9d3);}}const _0x4dfc58=_0x318f30['length']===0x0&&_0x5ee0a6[_0xd2590a(0x17f)]===0x0&&_0x3b8a2b['length']===0x0&&_0x27ef05['length']===0x0;return{'ok':!![],'data':{'added':_0x318f30,'modified':_0x5ee0a6,'missing':_0x3b8a2b,'unchanged':_0x4f8f4e,'remoteOnly':_0x27ef05},'message':_0x4dfc58?_0xd2590a(0x187):_0x318f30[_0xd2590a(0x17f)]+_0xd2590a(0x189)+_0x5ee0a6[_0xd2590a(0x17f)]+_0xd2590a(0x19e)+_0x3b8a2b[_0xd2590a(0x17f)]+'\x20missing,\x20'+_0x4f8f4e[_0xd2590a(0x17f)]+'\x20unchanged'+(_0x27ef05[_0xd2590a(0x17f)]>0x0?',\x20'+_0x27ef05[_0xd2590a(0x17f)]+_0xd2590a(0x18d):'')};}};
1
+ const a141_0x169ce3=a141_0x1b30;(function(_0x3ca7a8,_0x3bc2e1){const _0xc0ce9f=a141_0x1b30,_0x2e8c39=_0x3ca7a8();while(!![]){try{const _0x1af78d=parseInt(_0xc0ce9f(0x86))/0x1+parseInt(_0xc0ce9f(0x96))/0x2*(parseInt(_0xc0ce9f(0x8f))/0x3)+-parseInt(_0xc0ce9f(0x7c))/0x4+parseInt(_0xc0ce9f(0x7e))/0x5*(-parseInt(_0xc0ce9f(0x94))/0x6)+parseInt(_0xc0ce9f(0x8d))/0x7+parseInt(_0xc0ce9f(0x7f))/0x8*(-parseInt(_0xc0ce9f(0x80))/0x9)+-parseInt(_0xc0ce9f(0x7b))/0xa*(-parseInt(_0xc0ce9f(0x7a))/0xb);if(_0x1af78d===_0x3bc2e1)break;else _0x2e8c39['push'](_0x2e8c39['shift']());}catch(_0x3d1598){_0x2e8c39['push'](_0x2e8c39['shift']());}}}(a141_0x50aa,0xb3333));import{listSqlQueries}from'../../core/api-client.js';function a141_0x50aa(){const _0x38254b=['remote','6fIeHQb','relativePath','475390ELcCqP','sqlRoot','length','sql','totalCount','filePath','push','\x20modified,\x20','status','has','706948INeFnt','170niTyxw','743084khGGFW','hash','3915840SQaooh','507480CCCIFC','189yYuUsw','lockKey','All\x20SQL\x20queries\x20are\x20in\x20sync.','\x20remote-only','appCode','\x20unchanged','969063Kotcsf','boolean','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','keys','paging','\x20missing,\x20','tableData','158746UOflrh','bool','12sDEBEt','lockFilePath','sqls','sqlName'];a141_0x50aa=function(){return _0x38254b;};return a141_0x50aa();}import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';const PAGE_SIZE=0x64;function a141_0x1b30(_0x1cf818,_0x33d236){_0x1cf818=_0x1cf818-0x76;const _0x50aa52=a141_0x50aa();let _0x1b3087=_0x50aa52[_0x1cf818];return _0x1b3087;}async function fetchAllSqlCodes(_0x26e2b6){const _0x1f9cb8=a141_0x1b30,_0x132795=[];let _0x49e710=0x1;while(!![]){const _0x26a80d=await listSqlQueries(_0x26e2b6,{'currentPage':_0x49e710,'pageSize':PAGE_SIZE}),_0x179522=_0x26a80d[_0x1f9cb8(0x8c)]??[];_0x132795[_0x1f9cb8(0x76)](..._0x179522['map'](_0x29c645=>_0x29c645['sqlCode']));if(_0x179522[_0x1f9cb8(0x98)]===0x0)break;const _0x45261c=_0x26a80d[_0x1f9cb8(0x8a)]?.[_0x1f9cb8(0x9a)];if(_0x45261c!=null?_0x132795[_0x1f9cb8(0x98)]>=_0x45261c:_0x179522['length']<PAGE_SIZE)break;_0x49e710++;}return _0x132795;}export const sqlStatus={'service':a141_0x169ce3(0x99),'command':a141_0x169ce3(0x78),'description':a141_0x169ce3(0x88),'risk':'read','flags':[{'name':a141_0x169ce3(0x93),'type':a141_0x169ce3(0x87),'description':'Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally'}],async 'execute'(_0x11de1b){const _0x35e4bb=a141_0x169ce3,_0x52bb7c=loadSqlProjectConfig(_0x11de1b['appCode']),_0x322560=await readSqlLockFile(_0x52bb7c[_0x35e4bb(0x90)]),{appLock:_0x3606cf}=ensureSqlLockScope(_0x322560??createEmptySqlLock(),_0x52bb7c[_0x35e4bb(0x84)],_0x52bb7c[_0x35e4bb(0x97)],'status'),_0x1abf69=await scanLocalSqlQueries(_0x52bb7c),_0x57a2d2=[],_0x11a95e=[],_0x456785=[],_0x4d0901=[],_0x2b9c45=new Set(_0x1abf69['map'](_0x30f309=>_0x30f309[_0x35e4bb(0x81)]));for(const _0x28355f of _0x1abf69){const _0x545e1f=await computeSqlFileHash(_0x28355f[_0x35e4bb(0x9b)]),_0x216344=_0x3606cf[_0x35e4bb(0x91)][_0x28355f[_0x35e4bb(0x81)]],_0x4f92e6=!!_0x216344&&_0x216344['path']!==_0x28355f[_0x35e4bb(0x95)],_0x3defd9=!!_0x216344&&!!_0x28355f[_0x35e4bb(0x92)]&&_0x216344['sqlName']!==_0x28355f[_0x35e4bb(0x92)];if(!_0x216344)_0x57a2d2[_0x35e4bb(0x76)](_0x28355f[_0x35e4bb(0x81)]);else _0x216344[_0x35e4bb(0x7d)]!==_0x545e1f||_0x4f92e6||_0x3defd9?_0x11a95e[_0x35e4bb(0x76)](_0x28355f['lockKey']):_0x456785[_0x35e4bb(0x76)](_0x28355f[_0x35e4bb(0x81)]);}for(const _0x37a019 of Object[_0x35e4bb(0x89)](_0x3606cf['sqls'])){!_0x2b9c45['has'](_0x37a019)&&_0x4d0901[_0x35e4bb(0x76)](_0x37a019);}const _0x443de7=[];if(_0x11de1b[_0x35e4bb(0x8e)](_0x35e4bb(0x93))){const _0x51797e=await fetchAllSqlCodes(_0x11de1b[_0x35e4bb(0x84)]);for(const _0x64c9f6 of _0x51797e){!_0x2b9c45[_0x35e4bb(0x79)](_0x64c9f6)&&!_0x3606cf[_0x35e4bb(0x91)][_0x64c9f6]&&_0x443de7[_0x35e4bb(0x76)](_0x64c9f6);}}const _0x41ba6e=_0x57a2d2['length']===0x0&&_0x11a95e['length']===0x0&&_0x4d0901['length']===0x0&&_0x443de7[_0x35e4bb(0x98)]===0x0;return{'ok':!![],'data':{'added':_0x57a2d2,'modified':_0x11a95e,'missing':_0x4d0901,'unchanged':_0x456785,'remoteOnly':_0x443de7},'message':_0x41ba6e?_0x35e4bb(0x82):_0x57a2d2[_0x35e4bb(0x98)]+'\x20added,\x20'+_0x11a95e[_0x35e4bb(0x98)]+_0x35e4bb(0x77)+_0x4d0901['length']+_0x35e4bb(0x8b)+_0x456785[_0x35e4bb(0x98)]+_0x35e4bb(0x85)+(_0x443de7[_0x35e4bb(0x98)]>0x0?',\x20'+_0x443de7[_0x35e4bb(0x98)]+_0x35e4bb(0x83):'')};}};
@@ -1 +1 @@
1
- const a143_0x39f5a9=a143_0x199e;function a143_0x6cf9(){const _0x49f38a=['reason','isSelectOnly','\x22\x20not\x20found\x20or\x20not\x20accessible','schemas','isDangerous','from','5819473jsNePb','tables','validation','message','Dataset\x20\x22','sql','toLowerCase','1449500trQlXY','73014YcAMwv','88821zVicAt','string','340195IQrZBf','cwd','valid','14IZdfNL','file','614PLmKwY','133uAEMnE','push','size','str','split','name','parameters','SQL\x20schema\x20validation','152BCxscB','60OYgMLy','length','dbtableConfig','utf-8','appCode','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','Table\x20\x22','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','fields','filter','59908QXXdzE','trim','map','File\x20not\x20found:\x20','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','sqlType','tableName'];a143_0x6cf9=function(){return _0x49f38a;};return a143_0x6cf9();}(function(_0x30bbb7,_0x431047){const _0x7181ec=a143_0x199e,_0x3f8864=_0x30bbb7();while(!![]){try{const _0x162bd1=-parseInt(_0x7181ec(0x1eb))/0x1*(-parseInt(_0x7181ec(0x21b))/0x2)+-parseInt(_0x7181ec(0x1f4))/0x3*(-parseInt(_0x7181ec(0x1fe))/0x4)+parseInt(_0x7181ec(0x216))/0x5+parseInt(_0x7181ec(0x213))/0x6*(parseInt(_0x7181ec(0x219))/0x7)+parseInt(_0x7181ec(0x1f3))/0x8*(parseInt(_0x7181ec(0x214))/0x9)+parseInt(_0x7181ec(0x212))/0xa+-parseInt(_0x7181ec(0x20b))/0xb;if(_0x162bd1===_0x431047)break;else _0x3f8864['push'](_0x3f8864['shift']());}catch(_0x9a20cf){_0x3f8864['push'](_0x3f8864['shift']());}}}(a143_0x6cf9,0x39a86));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';function a143_0x199e(_0xb178f4,_0x1fd0b1){_0xb178f4=_0xb178f4-0x1eb;const _0x6cf918=a143_0x6cf9();let _0x199eda=_0x6cf918[_0xb178f4];return _0x199eda;}import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';export const sqlValidate={'service':'sql','command':'validate','description':a143_0x39f5a9(0x202),'risk':'read','flags':[{'name':a143_0x39f5a9(0x21a),'type':a143_0x39f5a9(0x215),'description':a143_0x39f5a9(0x1fb)},{'name':a143_0x39f5a9(0x210),'type':'string','description':a143_0x39f5a9(0x1f9)},{'name':a143_0x39f5a9(0x208),'type':a143_0x39f5a9(0x215),'description':'Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against'}],async 'execute'(_0x51f3cf){const _0x4f0664=a143_0x39f5a9,_0x3e83af=_0x51f3cf[_0x4f0664(0x1ee)](_0x4f0664(0x21a)),_0x5f01c4=_0x51f3cf[_0x4f0664(0x1ee)](_0x4f0664(0x210));if(!_0x3e83af&&!_0x5f01c4)throw CliErrors['flagMissing']('file','Provide\x20--file\x20or\x20--sql');let _0x31179f;if(_0x3e83af){const _0x24af4f=resolve(process[_0x4f0664(0x217)](),_0x3e83af);if(!existsSync(_0x24af4f))throw CliErrors[_0x4f0664(0x20d)](_0x4f0664(0x201)+_0x24af4f);_0x31179f=readFileSync(_0x24af4f,_0x4f0664(0x1f7));}else _0x31179f=_0x5f01c4;const _0x2fb28c=validateSql(_0x31179f),_0x27dca5={'valid':_0x2fb28c[_0x4f0664(0x218)],'sqlType':_0x2fb28c[_0x4f0664(0x203)]['type'],'isSelectOnly':_0x2fb28c[_0x4f0664(0x203)][_0x4f0664(0x206)],'isDangerous':_0x2fb28c[_0x4f0664(0x203)][_0x4f0664(0x209)],'tables':_0x2fb28c[_0x4f0664(0x20c)],'parameters':_0x2fb28c[_0x4f0664(0x1f1)],'message':_0x2fb28c[_0x4f0664(0x20e)]};_0x2fb28c['sqlType'][_0x4f0664(0x205)]&&(_0x27dca5[_0x4f0664(0x205)]=_0x2fb28c['sqlType'][_0x4f0664(0x205)]);const _0x4e7f03=_0x51f3cf[_0x4f0664(0x1ee)](_0x4f0664(0x208));if(_0x4e7f03&&_0x2fb28c['valid']){const _0x5cf2b6=_0x4e7f03[_0x4f0664(0x1ef)](',')[_0x4f0664(0x200)](_0x558662=>_0x558662[_0x4f0664(0x1ff)]())[_0x4f0664(0x1fd)](Boolean),_0x17f051=[],_0x4911df=filterDbTableBackedDatasets(await listDatasets(_0x51f3cf[_0x4f0664(0x1f8)])),_0x56d5f7=new Map(_0x4911df['map'](_0x205d9f=>[_0x205d9f[_0x4f0664(0x1f6)]?.[_0x4f0664(0x204)]?.['toLowerCase'](),_0x205d9f]));for(const _0x58dce0 of _0x2fb28c['tables']){const _0x5ac6c8=_0x56d5f7['get'](_0x58dce0[_0x4f0664(0x211)]());!_0x5ac6c8&&_0x17f051[_0x4f0664(0x1ec)](_0x4f0664(0x1fa)+_0x58dce0+'\x22\x20not\x20found\x20in\x20any\x20dataset');}for(const _0x1c442e of _0x5cf2b6){let _0x45a2d9;try{_0x45a2d9=await getDatasetDetail(_0x1c442e);}catch{_0x17f051[_0x4f0664(0x1ec)](_0x4f0664(0x20f)+_0x1c442e+_0x4f0664(0x207));continue;}assertDatasetIsDbTableBacked(_0x45a2d9,_0x4f0664(0x1f2));const _0x566cfe=Array['isArray'](_0x45a2d9['fields'])?_0x45a2d9[_0x4f0664(0x1fc)]:[],_0x4f85c2=new Set(_0x566cfe['map'](_0x415c5a=>_0x415c5a[_0x4f0664(0x1f0)]?.[_0x4f0664(0x211)]())),_0x30b6f8=_0x45a2d9['dbtableConfig']?.['tableName']||_0x45a2d9[_0x4f0664(0x204)]||_0x1c442e;_0x27dca5['schema:'+_0x30b6f8]={'code':_0x1c442e,'tableName':_0x30b6f8,'fieldCount':_0x4f85c2[_0x4f0664(0x1ed)],'fields':Array[_0x4f0664(0x20a)](_0x4f85c2)};}_0x17f051[_0x4f0664(0x1f5)]>0x0&&(_0x27dca5['schemaWarnings']=_0x17f051);}return{'ok':_0x2fb28c[_0x4f0664(0x218)],'data':_0x27dca5,'message':_0x2fb28c[_0x4f0664(0x20e)]};}};
1
+ const a142_0x124fed=a142_0xe2b8;(function(_0x52260,_0x84e059){const _0x2f0105=a142_0xe2b8,_0x16cbd0=_0x52260();while(!![]){try{const _0x416325=parseInt(_0x2f0105(0x102))/0x1+-parseInt(_0x2f0105(0x10a))/0x2*(parseInt(_0x2f0105(0xf7))/0x3)+parseInt(_0x2f0105(0xec))/0x4+-parseInt(_0x2f0105(0xeb))/0x5+parseInt(_0x2f0105(0x118))/0x6*(parseInt(_0x2f0105(0xf6))/0x7)+parseInt(_0x2f0105(0xfc))/0x8+-parseInt(_0x2f0105(0xf8))/0x9*(parseInt(_0x2f0105(0x117))/0xa);if(_0x416325===_0x84e059)break;else _0x16cbd0['push'](_0x16cbd0['shift']());}catch(_0x2e2320){_0x16cbd0['push'](_0x16cbd0['shift']());}}}(a142_0x2b56,0x86bf3));function a142_0xe2b8(_0x5431eb,_0x599cb8){_0x5431eb=_0x5431eb-0xeb;const _0x2b5608=a142_0x2b56();let _0xe2b8d=_0x2b5608[_0x5431eb];return _0xe2b8d;}function a142_0x2b56(){const _0x10f986=['2983916jWXhog','push','File\x20not\x20found:\x20','type','utf-8','SQL\x20schema\x20validation','length','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','file','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','42XxnQxM','3WMjfef','30582JoCuhD','sql','valid','dbtableConfig','5011912CXnLin','string','split','isDangerous','tables','tableName','304601mdDgVj','isArray','validate','trim','schemaWarnings','Dataset\x20\x22','size','Provide\x20--file\x20or\x20--sql','293890xKReLG','isSelectOnly','message','sqlType','schema:','get','reason','read','str','appCode','fields','name','parameters','1860QUTLpS','585036WhVIER','cwd','schemas','\x22\x20not\x20found\x20or\x20not\x20accessible','\x22\x20not\x20found\x20in\x20any\x20dataset','map','toLowerCase','4656045hTqZmr'];a142_0x2b56=function(){return _0x10f986;};return a142_0x2b56();}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';export const sqlValidate={'service':'sql','command':a142_0x124fed(0x104),'description':'Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','risk':a142_0x124fed(0x111),'flags':[{'name':a142_0x124fed(0xf4),'type':a142_0x124fed(0xfd),'description':'Path\x20to\x20the\x20SQL\x20file\x20to\x20validate'},{'name':a142_0x124fed(0xf9),'type':a142_0x124fed(0xfd),'description':a142_0x124fed(0xf5)},{'name':a142_0x124fed(0x11a),'type':a142_0x124fed(0xfd),'description':a142_0x124fed(0xf3)}],async 'execute'(_0xbacee){const _0x281fe6=a142_0x124fed,_0x4ea38a=_0xbacee[_0x281fe6(0x112)](_0x281fe6(0xf4)),_0x3f6953=_0xbacee['str'](_0x281fe6(0xf9));if(!_0x4ea38a&&!_0x3f6953)throw CliErrors['flagMissing'](_0x281fe6(0xf4),_0x281fe6(0x109));let _0x331bfe;if(_0x4ea38a){const _0x343844=resolve(process[_0x281fe6(0x119)](),_0x4ea38a);if(!existsSync(_0x343844))throw CliErrors['validation'](_0x281fe6(0xee)+_0x343844);_0x331bfe=readFileSync(_0x343844,_0x281fe6(0xf0));}else _0x331bfe=_0x3f6953;const _0x5b5263=validateSql(_0x331bfe),_0x2791b1={'valid':_0x5b5263['valid'],'sqlType':_0x5b5263['sqlType'][_0x281fe6(0xef)],'isSelectOnly':_0x5b5263['sqlType'][_0x281fe6(0x10b)],'isDangerous':_0x5b5263['sqlType'][_0x281fe6(0xff)],'tables':_0x5b5263[_0x281fe6(0x100)],'parameters':_0x5b5263[_0x281fe6(0x116)],'message':_0x5b5263[_0x281fe6(0x10c)]};_0x5b5263[_0x281fe6(0x10d)][_0x281fe6(0x110)]&&(_0x2791b1[_0x281fe6(0x110)]=_0x5b5263[_0x281fe6(0x10d)][_0x281fe6(0x110)]);const _0xc0014b=_0xbacee[_0x281fe6(0x112)]('schemas');if(_0xc0014b&&_0x5b5263['valid']){const _0x45afb0=_0xc0014b[_0x281fe6(0xfe)](',')[_0x281fe6(0x11d)](_0x377c85=>_0x377c85[_0x281fe6(0x105)]())['filter'](Boolean),_0xc76f4f=[],_0x38ecd4=filterDbTableBackedDatasets(await listDatasets(_0xbacee[_0x281fe6(0x113)])),_0x295815=new Map(_0x38ecd4['map'](_0x329467=>[_0x329467['dbtableConfig']?.['tableName']?.['toLowerCase'](),_0x329467]));for(const _0xa22761 of _0x5b5263[_0x281fe6(0x100)]){const _0x127c92=_0x295815[_0x281fe6(0x10f)](_0xa22761[_0x281fe6(0x11e)]());!_0x127c92&&_0xc76f4f[_0x281fe6(0xed)]('Table\x20\x22'+_0xa22761+_0x281fe6(0x11c));}for(const _0x62249f of _0x45afb0){let _0xe48120;try{_0xe48120=await getDatasetDetail(_0x62249f);}catch{_0xc76f4f[_0x281fe6(0xed)](_0x281fe6(0x107)+_0x62249f+_0x281fe6(0x11b));continue;}assertDatasetIsDbTableBacked(_0xe48120,_0x281fe6(0xf1));const _0x1b405e=Array[_0x281fe6(0x103)](_0xe48120['fields'])?_0xe48120[_0x281fe6(0x114)]:[],_0x2e14bb=new Set(_0x1b405e[_0x281fe6(0x11d)](_0x49e17f=>_0x49e17f[_0x281fe6(0x115)]?.[_0x281fe6(0x11e)]())),_0x4c5b71=_0xe48120[_0x281fe6(0xfb)]?.[_0x281fe6(0x101)]||_0xe48120['tableName']||_0x62249f;_0x2791b1[_0x281fe6(0x10e)+_0x4c5b71]={'code':_0x62249f,'tableName':_0x4c5b71,'fieldCount':_0x2e14bb[_0x281fe6(0x108)],'fields':Array['from'](_0x2e14bb)};}_0xc76f4f[_0x281fe6(0xf2)]>0x0&&(_0x2791b1[_0x281fe6(0x106)]=_0xc76f4f);}return{'ok':_0x5b5263[_0x281fe6(0xfa)],'data':_0x2791b1,'message':_0x5b5263[_0x281fe6(0x10c)]};}};
@@ -1 +1 @@
1
- const a144_0x1c4420=a144_0x21a0;(function(_0x4aacc1,_0x1cda1c){const _0x282884=a144_0x21a0,_0x20cd58=_0x4aacc1();while(!![]){try{const _0x490753=-parseInt(_0x282884(0x16c))/0x1*(parseInt(_0x282884(0x16e))/0x2)+parseInt(_0x282884(0x156))/0x3+-parseInt(_0x282884(0x13c))/0x4*(-parseInt(_0x282884(0x161))/0x5)+parseInt(_0x282884(0x155))/0x6+-parseInt(_0x282884(0x158))/0x7+-parseInt(_0x282884(0x167))/0x8*(parseInt(_0x282884(0x143))/0x9)+parseInt(_0x282884(0x16a))/0xa*(parseInt(_0x282884(0x149))/0xb);if(_0x490753===_0x1cda1c)break;else _0x20cd58['push'](_0x20cd58['shift']());}catch(_0x1d9776){_0x20cd58['push'](_0x20cd58['shift']());}}}(a144_0x1f34,0x954f5));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+a144_0x1c4420(0x14c),SAFE_PROFILE_KEYS=[a144_0x1c4420(0x13d),'env','apiDir',a144_0x1c4420(0x139),a144_0x1c4420(0x13f),'riskLevel',a144_0x1c4420(0x15e)],workspaceFlags=[{'name':a144_0x1c4420(0x151),'type':'string','description':a144_0x1c4420(0x13e)},{'name':a144_0x1c4420(0x13d),'type':a144_0x1c4420(0x14d),'description':a144_0x1c4420(0x160)},{'name':a144_0x1c4420(0x13b),'type':a144_0x1c4420(0x14d),'description':a144_0x1c4420(0x150),'enum':[...RABETBASE_ENV_VALUES]},{'name':a144_0x1c4420(0x142),'type':a144_0x1c4420(0x14d),'description':'API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile'},{'name':a144_0x1c4420(0x15c),'type':a144_0x1c4420(0x14d),'description':a144_0x1c4420(0x162),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':'pageSize','type':'number','description':a144_0x1c4420(0x141)},{'name':a144_0x1c4420(0x163),'type':a144_0x1c4420(0x14d),'description':'Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RISK_LEVEL_VALUES]},{'name':a144_0x1c4420(0x15e),'type':'string','description':'Locale\x20for\x20this\x20workspace\x20app\x20profile'}];function a144_0x1f34(){const _0x48be96=['\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','\x20--appcode\x20<code>`.','1800euwyhx','validation','Invalid\x20appcode:\x20','40lrmFXi','keys','31ZjLlDc','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','69682NZUUJq','globalConfig','.\x20Credentials:\x20not\x20written.','format','workspace','env','34564THoCaV','appcode','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','pageSize','apps','Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile','apiDir','16578MAbHAP','\x20(appcode:\x20','initialized','use','init','isArray','1047937JveGdy','project','App\x20\x22','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','string','updated','str','Target\x20environment','app','\x20workspace\x20use\x20--app\x20<name>`.','\x20workspace\x20','Switch\x20the\x20current\x20workspace\x20app\x20binding','4392054kkBlUj','2240781jxuVIb','Workspace\x20','1241233LseSuf','workspace.','Initialize\x20the\x20current\x20workspace\x20app\x20binding','trim','defaultFormat','write','locale','join','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','245iPTwkP','Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','riskLevel','Use\x20`'];a144_0x1f34=function(){return _0x48be96;};return a144_0x1f34();}function isRecord(_0x2e8257){const _0x205d71=a144_0x1c4420;return!!_0x2e8257&&typeof _0x2e8257==='object'&&!Array[_0x205d71(0x148)](_0x2e8257);}function assertValidAppcode(_0x3c82eb){const _0x53ebb5=a144_0x1c4420,{valid:_0x1b25da,message:_0x390230}=validateAppcode(_0x3c82eb);if(!_0x1b25da)throw CliErrors[_0x53ebb5(0x168)](_0x53ebb5(0x169)+_0x3c82eb,_0x390230);}function sanitizeProfile(_0x48cbf1){if(!isRecord(_0x48cbf1))return{};const _0xec2048={};for(const _0xb1941a of SAFE_PROFILE_KEYS){if(_0x48cbf1[_0xb1941a]!==undefined)_0xec2048[_0xb1941a]=_0x48cbf1[_0xb1941a];}return _0xec2048;}function cloneProfile(_0x2dbef9){return isRecord(_0x2dbef9)?{..._0x2dbef9}:{};}function collectWorkspaceProfileOverrides(_0x4ffa3a){const _0x2ffc59=a144_0x1c4420,_0x2dd984={},_0x26070d=_0x4ffa3a['str'](_0x2ffc59(0x13b)),_0x11fee3=_0x4ffa3a[_0x2ffc59(0x14f)]('apiDir'),_0x139dba=_0x4ffa3a[_0x2ffc59(0x14f)](_0x2ffc59(0x15c)),_0x2e2fbb=_0x4ffa3a['flag'](_0x2ffc59(0x13f)),_0x4ed2e4=_0x4ffa3a[_0x2ffc59(0x14f)](_0x2ffc59(0x163)),_0x54c7dc=_0x4ffa3a['str'](_0x2ffc59(0x15e));if(_0x26070d)_0x2dd984[_0x2ffc59(0x13b)]=_0x26070d;if(_0x11fee3)_0x2dd984[_0x2ffc59(0x142)]=_0x11fee3;if(_0x139dba)_0x2dd984['format']=_0x139dba;if(_0x2e2fbb!==undefined&&_0x2e2fbb!=='')_0x2dd984[_0x2ffc59(0x13f)]=Number(_0x2e2fbb);if(_0x4ed2e4)_0x2dd984[_0x2ffc59(0x163)]=_0x4ed2e4;if(_0x54c7dc)_0x2dd984[_0x2ffc59(0x15e)]=_0x54c7dc;return _0x2dd984;}function a144_0x21a0(_0x5336fe,_0x4cb0e8){_0x5336fe=_0x5336fe-0x139;const _0x1f34ef=a144_0x1f34();let _0x21a02d=_0x1f34ef[_0x5336fe];return _0x21a02d;}async function validateWorkspaceArgs(_0x121552){const _0x9d0876=a144_0x1c4420,_0x586a2e=_0x121552[_0x9d0876(0x14f)](_0x9d0876(0x151))[_0x9d0876(0x15b)](),_0x5678a0=_0x121552[_0x9d0876(0x14f)](_0x9d0876(0x13d))[_0x9d0876(0x15b)]();if(!_0x586a2e&&!_0x5678a0)throw CliErrors[_0x9d0876(0x168)]('Missing\x20workspace\x20app\x20selector.','Use\x20`'+CLI_BIN_NAME+_0x9d0876(0x165)+CLI_BIN_NAME+_0x9d0876(0x152));if(_0x5678a0)assertValidAppcode(_0x5678a0);}function resolveKnownApps(){const _0x4dcf03=a144_0x1c4420,{config:_0xffac37,layers:_0x11927a}=readRawConfigWithLayers(),_0xd1ca96=isRecord(_0xffac37[_0x4dcf03(0x140)])?_0xffac37[_0x4dcf03(0x140)]:{},_0x4f906e=isRecord(_0x11927a[_0x4dcf03(0x16f)][_0x4dcf03(0x140)])?_0x11927a[_0x4dcf03(0x16f)]['apps']:{};return{..._0x4f906e,..._0xd1ca96};}async function configureWorkspace(_0x4f7b05,_0x119594){const _0x45fefa=a144_0x1c4420,_0x32559c=_0x4f7b05['str'](_0x45fefa(0x151))[_0x45fefa(0x15b)](),_0x939752=_0x4f7b05[_0x45fefa(0x14f)](_0x45fefa(0x13d))['trim'](),_0x828e41=_0x32559c||_0x939752;if(!_0x828e41)throw CliErrors['validation']('Missing\x20workspace\x20app\x20selector.',_0x45fefa(0x164)+CLI_BIN_NAME+_0x45fefa(0x165)+CLI_BIN_NAME+_0x45fefa(0x152));if(_0x939752)assertValidAppcode(_0x939752);const _0x5980e4=resolveWriteConfigPath(_0x45fefa(0x14a)),_0x3b6bd7=readConfigFile(_0x5980e4),_0x243e96=resolveKnownApps(),_0x2dcef4=isRecord(_0x3b6bd7[_0x45fefa(0x140)])?{..._0x3b6bd7[_0x45fefa(0x140)]}:{},_0x3a2f80=cloneProfile(_0x2dcef4[_0x828e41]),_0x2db419=sanitizeProfile(_0x243e96[_0x828e41]),_0x4ed331=_0x939752?{}:_0x2db419,_0x4733a7=_0x939752||_0x4ed331[_0x45fefa(0x13d)];if(!_0x4733a7){const _0x21ef50=Object[_0x45fefa(0x16b)](_0x243e96),_0xf20b5f=_0x21ef50['length']===0x0?_0x45fefa(0x164)+CLI_BIN_NAME+_0x45fefa(0x153)+_0x119594+'\x20--app\x20'+_0x828e41+_0x45fefa(0x166):_0x45fefa(0x16d)+_0x21ef50[_0x45fefa(0x15f)](',\x20');throw CliErrors[_0x45fefa(0x168)](_0x45fefa(0x14b)+_0x828e41+'\x22\x20not\x20found.',_0xf20b5f);}assertValidAppcode(String(_0x4733a7));const _0x34d4fc={..._0x4ed331,..._0x3a2f80,'appcode':String(_0x4733a7),...collectWorkspaceProfileOverrides(_0x4f7b05)};return _0x2dcef4[_0x828e41]=_0x34d4fc,_0x3b6bd7[_0x45fefa(0x140)]=_0x2dcef4,_0x3b6bd7['defaultApp']=_0x828e41,delete _0x3b6bd7['appcode'],delete _0x3b6bd7[_0x45fefa(0x151)],_0x34d4fc[_0x45fefa(0x13b)]&&(_0x3b6bd7[_0x45fefa(0x13b)]=_0x34d4fc[_0x45fefa(0x13b)]),writeConfigFile(_0x5980e4,_0x3b6bd7),{'ok':!![],'message':_0x45fefa(0x157)+(_0x119594===_0x45fefa(0x147)?_0x45fefa(0x145):_0x45fefa(0x14e))+':\x20'+_0x828e41+_0x45fefa(0x144)+_0x34d4fc[_0x45fefa(0x13d)]+').\x20Config:\x20'+_0x5980e4+_0x45fefa(0x170),'data':{'operation':_0x45fefa(0x159)+_0x119594,'configPath':_0x5980e4,'app':_0x828e41,'appcode':_0x34d4fc[_0x45fefa(0x13d)],'env':_0x34d4fc['env']??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':a144_0x1c4420(0x13a),'command':a144_0x1c4420(0x147),'description':a144_0x1c4420(0x15a),'risk':a144_0x1c4420(0x15d),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0xae4aa6=>configureWorkspace(_0xae4aa6,a144_0x1c4420(0x147))},workspaceUseDefinition={'service':a144_0x1c4420(0x13a),'command':'use','description':a144_0x1c4420(0x154),'risk':a144_0x1c4420(0x15d),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x3a4597=>configureWorkspace(_0x3a4597,a144_0x1c4420(0x146))};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition];export{WORKSPACE_USAGE};
1
+ const a143_0xaa26cc=a143_0x8521;(function(_0x3b3c31,_0x30b4bb){const _0x533da6=a143_0x8521,_0xebb8ea=_0x3b3c31();while(!![]){try{const _0x5bef1a=-parseInt(_0x533da6(0x17b))/0x1+parseInt(_0x533da6(0x187))/0x2+parseInt(_0x533da6(0x178))/0x3*(parseInt(_0x533da6(0x17a))/0x4)+parseInt(_0x533da6(0x190))/0x5+parseInt(_0x533da6(0x181))/0x6+parseInt(_0x533da6(0x18d))/0x7+parseInt(_0x533da6(0x195))/0x8*(-parseInt(_0x533da6(0x18f))/0x9);if(_0x5bef1a===_0x30b4bb)break;else _0xebb8ea['push'](_0xebb8ea['shift']());}catch(_0x1f383e){_0xebb8ea['push'](_0xebb8ea['shift']());}}}(a143_0x191f,0xe4c95));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_0xaa26cc(0x16c),SAFE_PROFILE_KEYS=[a143_0xaa26cc(0x164),a143_0xaa26cc(0x17c),a143_0xaa26cc(0x177),'format','pageSize',a143_0xaa26cc(0x198),'locale'],workspaceFlags=[{'name':a143_0xaa26cc(0x166),'type':a143_0xaa26cc(0x188),'description':a143_0xaa26cc(0x176)},{'name':a143_0xaa26cc(0x164),'type':a143_0xaa26cc(0x188),'description':a143_0xaa26cc(0x16b)},{'name':a143_0xaa26cc(0x17c),'type':'string','description':a143_0xaa26cc(0x179),'enum':[...RABETBASE_ENV_VALUES]},{'name':a143_0xaa26cc(0x177),'type':a143_0xaa26cc(0x188),'description':a143_0xaa26cc(0x167)},{'name':a143_0xaa26cc(0x17f),'type':a143_0xaa26cc(0x188),'description':'Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a143_0xaa26cc(0x183),'type':a143_0xaa26cc(0x170),'description':a143_0xaa26cc(0x16e)},{'name':'riskLevel','type':a143_0xaa26cc(0x188),'description':a143_0xaa26cc(0x172),'enum':[...RISK_LEVEL_VALUES]},{'name':'locale','type':a143_0xaa26cc(0x188),'description':a143_0xaa26cc(0x19d)}];function isRecord(_0x364577){const _0x3ebb35=a143_0xaa26cc;return!!_0x364577&&typeof _0x364577==='object'&&!Array[_0x3ebb35(0x16f)](_0x364577);}function a143_0x191f(){const _0x70e494=['format','defaultApp','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','join','16WuqnUV','length','apps','riskLevel','keys','\x20workspace\x20use\x20--app\x20<name>`.','workspace.','locale','Locale\x20for\x20this\x20workspace\x20app\x20profile','workspace','Invalid\x20appcode:\x20','appcode','\x20(appcode:\x20','app','API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile','validation','trim','\x20--appcode\x20<code>`.','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','init','Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile','isArray','number','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','globalConfig','project','Use\x20`','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','apiDir','42skyrqL','Target\x20environment','422428AYVDjt','1145158HCdQMm','env','\x20workspace\x20','Switch\x20the\x20current\x20workspace\x20app\x20binding','defaultFormat','flag','10079046pzQttZ','str','pageSize','updated','Initialize\x20the\x20current\x20workspace\x20app\x20binding','write','735364iRsQYH','string','initialized','Missing\x20workspace\x20app\x20selector.','\x20--app\x20','.\x20Credentials:\x20not\x20written.','11046371bIlkiJ','use','16666884eDyMOJ','3409725xpcpMS'];a143_0x191f=function(){return _0x70e494;};return a143_0x191f();}function assertValidAppcode(_0x3adcc9){const _0x1dcdea=a143_0xaa26cc,{valid:_0x4ea61b,message:_0x15cfdd}=validateAppcode(_0x3adcc9);if(!_0x4ea61b)throw CliErrors[_0x1dcdea(0x168)](_0x1dcdea(0x19f)+_0x3adcc9,_0x15cfdd);}function sanitizeProfile(_0x252e24){if(!isRecord(_0x252e24))return{};const _0x493b55={};for(const _0x3b7d3f of SAFE_PROFILE_KEYS){if(_0x252e24[_0x3b7d3f]!==undefined)_0x493b55[_0x3b7d3f]=_0x252e24[_0x3b7d3f];}return _0x493b55;}function a143_0x8521(_0x4191f7,_0x502fa0){_0x4191f7=_0x4191f7-0x164;const _0x191f0d=a143_0x191f();let _0x8521a3=_0x191f0d[_0x4191f7];return _0x8521a3;}function cloneProfile(_0x29a31c){return isRecord(_0x29a31c)?{..._0x29a31c}:{};}function collectWorkspaceProfileOverrides(_0x29f07d){const _0x8ae517=a143_0xaa26cc,_0x6d831a={},_0x358d4c=_0x29f07d[_0x8ae517(0x182)](_0x8ae517(0x17c)),_0x29aee4=_0x29f07d['str'](_0x8ae517(0x177)),_0x126cff=_0x29f07d['str']('defaultFormat'),_0x3a7fdd=_0x29f07d[_0x8ae517(0x180)]('pageSize'),_0x393d11=_0x29f07d[_0x8ae517(0x182)]('riskLevel'),_0x381e7b=_0x29f07d[_0x8ae517(0x182)](_0x8ae517(0x19c));if(_0x358d4c)_0x6d831a['env']=_0x358d4c;if(_0x29aee4)_0x6d831a[_0x8ae517(0x177)]=_0x29aee4;if(_0x126cff)_0x6d831a[_0x8ae517(0x191)]=_0x126cff;if(_0x3a7fdd!==undefined&&_0x3a7fdd!=='')_0x6d831a[_0x8ae517(0x183)]=Number(_0x3a7fdd);if(_0x393d11)_0x6d831a[_0x8ae517(0x198)]=_0x393d11;if(_0x381e7b)_0x6d831a[_0x8ae517(0x19c)]=_0x381e7b;return _0x6d831a;}async function validateWorkspaceArgs(_0x4d2de2){const _0x3bb54f=a143_0xaa26cc,_0x1644c0=_0x4d2de2[_0x3bb54f(0x182)](_0x3bb54f(0x166))[_0x3bb54f(0x169)](),_0x13f81e=_0x4d2de2[_0x3bb54f(0x182)](_0x3bb54f(0x164))[_0x3bb54f(0x169)]();if(!_0x1644c0&&!_0x13f81e)throw CliErrors[_0x3bb54f(0x168)](_0x3bb54f(0x18a),_0x3bb54f(0x175)+CLI_BIN_NAME+_0x3bb54f(0x171)+CLI_BIN_NAME+_0x3bb54f(0x19a));if(_0x13f81e)assertValidAppcode(_0x13f81e);}function resolveKnownApps(){const _0x14a4b9=a143_0xaa26cc,{config:_0x2baa0f,layers:_0x359910}=readRawConfigWithLayers(),_0x456c0b=isRecord(_0x2baa0f[_0x14a4b9(0x197)])?_0x2baa0f[_0x14a4b9(0x197)]:{},_0x4bf7cc=isRecord(_0x359910['globalConfig'][_0x14a4b9(0x197)])?_0x359910[_0x14a4b9(0x173)][_0x14a4b9(0x197)]:{};return{..._0x4bf7cc,..._0x456c0b};}async function configureWorkspace(_0x443b30,_0x29596e){const _0x361364=a143_0xaa26cc,_0x4b3faa=_0x443b30['str'](_0x361364(0x166))[_0x361364(0x169)](),_0x298ed1=_0x443b30[_0x361364(0x182)](_0x361364(0x164))[_0x361364(0x169)](),_0x4e3b59=_0x4b3faa||_0x298ed1;if(!_0x4e3b59)throw CliErrors[_0x361364(0x168)](_0x361364(0x18a),'Use\x20`'+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`.');if(_0x298ed1)assertValidAppcode(_0x298ed1);const _0x14e54c=resolveWriteConfigPath(_0x361364(0x174)),_0x1a3a1d=readConfigFile(_0x14e54c),_0x256f0d=resolveKnownApps(),_0x302894=isRecord(_0x1a3a1d['apps'])?{..._0x1a3a1d[_0x361364(0x197)]}:{},_0x32e19c=cloneProfile(_0x302894[_0x4e3b59]),_0x3aa6f9=sanitizeProfile(_0x256f0d[_0x4e3b59]),_0x5af224=_0x298ed1?{}:_0x3aa6f9,_0x4c0d50=_0x298ed1||_0x5af224[_0x361364(0x164)];if(!_0x4c0d50){const _0x446d0f=Object[_0x361364(0x199)](_0x256f0d),_0x227bfd=_0x446d0f[_0x361364(0x196)]===0x0?_0x361364(0x175)+CLI_BIN_NAME+_0x361364(0x17d)+_0x29596e+_0x361364(0x18b)+_0x4e3b59+_0x361364(0x16a):_0x361364(0x193)+_0x446d0f[_0x361364(0x194)](',\x20');throw CliErrors[_0x361364(0x168)]('App\x20\x22'+_0x4e3b59+'\x22\x20not\x20found.',_0x227bfd);}assertValidAppcode(String(_0x4c0d50));const _0x1fcc4f={..._0x5af224,..._0x32e19c,'appcode':String(_0x4c0d50),...collectWorkspaceProfileOverrides(_0x443b30)};return _0x302894[_0x4e3b59]=_0x1fcc4f,_0x1a3a1d['apps']=_0x302894,_0x1a3a1d[_0x361364(0x192)]=_0x4e3b59,delete _0x1a3a1d[_0x361364(0x164)],delete _0x1a3a1d['app'],_0x1fcc4f[_0x361364(0x17c)]&&(_0x1a3a1d['env']=_0x1fcc4f[_0x361364(0x17c)]),writeConfigFile(_0x14e54c,_0x1a3a1d),{'ok':!![],'message':'Workspace\x20'+(_0x29596e===_0x361364(0x16d)?_0x361364(0x189):_0x361364(0x184))+':\x20'+_0x4e3b59+_0x361364(0x165)+_0x1fcc4f[_0x361364(0x164)]+').\x20Config:\x20'+_0x14e54c+_0x361364(0x18c),'data':{'operation':_0x361364(0x19b)+_0x29596e,'configPath':_0x14e54c,'app':_0x4e3b59,'appcode':_0x1fcc4f[_0x361364(0x164)],'env':_0x1fcc4f['env']??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':a143_0xaa26cc(0x19e),'command':'init','description':a143_0xaa26cc(0x185),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x1599ec=>configureWorkspace(_0x1599ec,a143_0xaa26cc(0x16d))},workspaceUseDefinition={'service':'workspace','command':'use','description':a143_0xaa26cc(0x17e),'risk':a143_0xaa26cc(0x186),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x3e019c=>configureWorkspace(_0x3e019c,a143_0xaa26cc(0x18e))};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition];export{WORKSPACE_USAGE};
@@ -1 +1 @@
1
- const a145_0x63f95f=a145_0x377a;(function(_0x38ae66,_0x5dbad6){const _0xc06a6a=a145_0x377a,_0x58b9b2=_0x38ae66();while(!![]){try{const _0x7497cb=-parseInt(_0xc06a6a(0xc1))/0x1+-parseInt(_0xc06a6a(0xc0))/0x2+parseInt(_0xc06a6a(0xaa))/0x3+-parseInt(_0xc06a6a(0xbf))/0x4*(-parseInt(_0xc06a6a(0xab))/0x5)+-parseInt(_0xc06a6a(0xb9))/0x6*(parseInt(_0xc06a6a(0xb0))/0x7)+-parseInt(_0xc06a6a(0xc4))/0x8+-parseInt(_0xc06a6a(0xcd))/0x9*(-parseInt(_0xc06a6a(0xc3))/0xa);if(_0x7497cb===_0x5dbad6)break;else _0x58b9b2['push'](_0x58b9b2['shift']());}catch(_0x1bd1ef){_0x58b9b2['push'](_0x58b9b2['shift']());}}}(a145_0x4dec,0xb5037));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',a145_0x63f95f(0xcf),'locale','format',a145_0x63f95f(0xb6)];function a145_0x4dec(){const _0x2df847=['2084apnsXF','2635502SPUzbz','76334tdLLZQ','number','28830qdsloU','4487792uDhAMC','pageSize','string','apiDir','entries','app','en-US','keys','Default\x20page\x20size','7983fuiYwR','inherit','accessKey','cookie','appcode','apps','496488akjooH','12195FZAuPF','length','defaultFormat','Auth\x20cookie','trim','98jEsLox','Target\x20environment','toLowerCase','locale','Risk\x20level','zh-CN','riskLevel','env','map','555834eRuyCf','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','join','filter','defaultApp','Config\x20key\x20('];a145_0x4dec=function(){return _0x2df847;};return a145_0x4dec();}export const TOP_LEVEL_CONFIG_KEYS=new Set([a145_0x63f95f(0xd1),a145_0x63f95f(0xb7),a145_0x63f95f(0xb3),'format','cookie',a145_0x63f95f(0xcf),a145_0x63f95f(0xc7)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x525e86){const _0x51fba0=a145_0x63f95f;return[..._0x525e86][_0x51fba0(0xbb)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0xa7b7f5){return TOP_LEVEL_CONFIG_KEYS['has'](_0xa7b7f5);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x594c95=a145_0x63f95f;return _0x594c95(0xbe)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':a145_0x63f95f(0xb7),'apiDir':a145_0x63f95f(0xc7),'cookie':a145_0x63f95f(0xd0),'accessKey':a145_0x63f95f(0xcf),'defaultFormat':'format','pageSize':a145_0x63f95f(0xc5),'riskLevel':'riskLevel','locale':a145_0x63f95f(0xb3)};export function getAppProfileFlagDefs(){const _0x554497=a145_0x63f95f;return[{'name':_0x554497(0xb7),'type':_0x554497(0xc6),'description':_0x554497(0xb1),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x554497(0xc7),'type':'string','description':'API\x20directory\x20path'},{'name':_0x554497(0xd0),'type':_0x554497(0xc6),'description':_0x554497(0xae),'hidden':!![]},{'name':_0x554497(0xcf),'type':_0x554497(0xc6),'description':'Access\x20key','hidden':!![]},{'name':_0x554497(0xad),'type':_0x554497(0xc6),'description':_0x554497(0xba),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0x554497(0xc5),'type':_0x554497(0xc2),'description':_0x554497(0xcc)},{'name':_0x554497(0xb6),'type':'string','description':_0x554497(0xb4),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x554497(0xb3),'type':_0x554497(0xc6),'description':'Locale'}];}export function collectAppProfileOverrides(_0x201ea0){const _0x4fa326=a145_0x63f95f,_0x153b00={};for(const [_0x2ffad1,_0x1fbe31]of Object[_0x4fa326(0xc8)](APP_PROFILE_FLAG_KEY_MAP)){const _0x16348b=_0x201ea0(_0x2ffad1);if(!_0x16348b)continue;_0x153b00[_0x1fbe31]=_0x1fbe31===_0x4fa326(0xc5)?Number(_0x16348b):_0x16348b;}return _0x153b00;}export function buildAppProfileListFields(_0x45c8c6){const _0xe143d5=a145_0x63f95f;return{'env':_0x45c8c6[_0xe143d5(0xb7)]??null,'apiDir':_0x45c8c6[_0xe143d5(0xc7)]??null,'hasCookie':!!_0x45c8c6[_0xe143d5(0xd0)],'hasAccessKey':!!_0x45c8c6['accessKey'],'format':_0x45c8c6['format']??null,'pageSize':_0x45c8c6[_0xe143d5(0xc5)]??null,'riskLevel':_0x45c8c6[_0xe143d5(0xb6)]??null,'locale':_0x45c8c6['locale']??null};}export function buildAppDoctorFields(_0x319704,_0x1507ae){const _0x4fdf98=a145_0x63f95f;return{'env':{'value':_0x319704[_0x4fdf98(0xb7)]||_0x1507ae[_0x4fdf98(0xb7)],'source':_0x319704[_0x4fdf98(0xb7)]?_0x4fdf98(0xc9):_0x4fdf98(0xce)},'apiDir':{'value':_0x319704[_0x4fdf98(0xc7)]||_0x1507ae[_0x4fdf98(0xc7)],'source':_0x319704[_0x4fdf98(0xc7)]?_0x4fdf98(0xc9):_0x4fdf98(0xce)},'cookie':{'value':_0x319704[_0x4fdf98(0xd0)]||_0x1507ae[_0x4fdf98(0xd0)],'source':_0x319704[_0x4fdf98(0xd0)]?_0x4fdf98(0xc9):_0x4fdf98(0xce)},'accessKey':{'value':_0x319704['accessKey']||_0x1507ae[_0x4fdf98(0xcf)],'source':_0x319704[_0x4fdf98(0xcf)]?'app':_0x4fdf98(0xce)}};}export function buildCanonicalAppConfig(_0xd29839,_0x423848){const _0x32d52c=a145_0x63f95f,_0x43f844=_0xd29839[_0x32d52c(0xb8)](_0x1a3da5=>String(_0x1a3da5||'')[_0x32d52c(0xaf)]())[_0x32d52c(0xbc)](Boolean);if(_0x43f844[_0x32d52c(0xac)]===0x0)return{};const _0x1409ab={};for(const _0x5ee891 of _0x43f844){_0x1409ab[_0x5ee891]=_0x423848?{'appcode':_0x5ee891,'env':_0x423848}:{'appcode':_0x5ee891};}return{'apps':_0x1409ab,'defaultApp':_0x43f844[0x0]};}export function buildCanonicalProjectConfig(_0x5369f0,_0x52f712){const _0x3d8f75=a145_0x63f95f,{appCodes:appCodes=[],env:_0x1e18b3,metadata:_0x3db444}=_0x52f712,_0x48f647={..._0x5369f0,..._0x3db444||{}};delete _0x48f647[_0x3d8f75(0xd1)],delete _0x48f647[_0x3d8f75(0xc9)];if(_0x1e18b3)_0x48f647[_0x3d8f75(0xb7)]=_0x1e18b3;else!_0x48f647[_0x3d8f75(0xb7)]&&(_0x48f647[_0x3d8f75(0xb7)]=DEFAULT_CONFIG_VALUES[_0x3d8f75(0xb7)]);const _0x7dc623=buildCanonicalAppConfig(appCodes,_0x48f647[_0x3d8f75(0xb7)]);return Object[_0x3d8f75(0xcb)](_0x7dc623)[_0x3d8f75(0xac)]>0x0&&(_0x48f647[_0x3d8f75(0xa9)]=_0x7dc623[_0x3d8f75(0xa9)],_0x48f647[_0x3d8f75(0xbd)]=_0x7dc623[_0x3d8f75(0xbd)]),_0x48f647;}const LOCALE_MAP={'zh':a145_0x63f95f(0xb5),'zh-cn':a145_0x63f95f(0xb5),'zh_cn':a145_0x63f95f(0xb5),'en':a145_0x63f95f(0xca),'en-us':a145_0x63f95f(0xca),'en_us':a145_0x63f95f(0xca)};function a145_0x377a(_0x45e9af,_0xa4e746){_0x45e9af=_0x45e9af-0xa9;const _0x4dece0=a145_0x4dec();let _0x377a63=_0x4dece0[_0x45e9af];return _0x377a63;}export function normalizeLocale(_0x2c193e){const _0x5eeea5=a145_0x63f95f;if(!_0x2c193e)return null;return LOCALE_MAP[_0x2c193e[_0x5eeea5(0xb2)]()]??null;}
1
+ const a144_0x4544eb=a144_0x275f;(function(_0x505625,_0x40d0a1){const _0x413b6b=a144_0x275f,_0xf7acc=_0x505625();while(!![]){try{const _0x2f0ca7=-parseInt(_0x413b6b(0x143))/0x1+-parseInt(_0x413b6b(0x161))/0x2*(-parseInt(_0x413b6b(0x158))/0x3)+-parseInt(_0x413b6b(0x148))/0x4+parseInt(_0x413b6b(0x14c))/0x5+-parseInt(_0x413b6b(0x151))/0x6*(parseInt(_0x413b6b(0x156))/0x7)+parseInt(_0x413b6b(0x166))/0x8+-parseInt(_0x413b6b(0x163))/0x9*(-parseInt(_0x413b6b(0x141))/0xa);if(_0x2f0ca7===_0x40d0a1)break;else _0xf7acc['push'](_0xf7acc['shift']());}catch(_0x32f491){_0xf7acc['push'](_0xf7acc['shift']());}}}(a144_0xbcba,0x83f4c));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RABETBASE_ENV_VALUES}from'../constant/env.js';function a144_0xbcba(){const _0x20dea7=['287dWTHHh','env','1293EGlWtv','apps','accessKey','Access\x20key','cookie','length','map','apiDir','format','754byPEqy','Auth\x20cookie','9846FIbvLS','API\x20directory\x20path','keys','5884056DrIwNU','Risk\x20level','appcode','12260EpotNX','trim','26774rWpNdQ','pageSize','Target\x20environment','zh-CN','toLowerCase','4179548EfCPlV','app','join','string','1926230YMESWl','riskLevel','has','en-US','locale','148146zBPbqR','inherit','defaultApp','entries','Config\x20key\x20('];a144_0xbcba=function(){return _0x20dea7;};return a144_0xbcba();}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','accessKey',a144_0x4544eb(0x150),a144_0x4544eb(0x160),a144_0x4544eb(0x14d)];export const TOP_LEVEL_CONFIG_KEYS=new Set([a144_0x4544eb(0x140),a144_0x4544eb(0x157),a144_0x4544eb(0x150),a144_0x4544eb(0x160),a144_0x4544eb(0x15c),a144_0x4544eb(0x15a),a144_0x4544eb(0x15f)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x1cb2f3){const _0xcd21e2=a144_0x4544eb;return[..._0x1cb2f3][_0xcd21e2(0x14a)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x498a32){const _0x2f66d3=a144_0x4544eb;return TOP_LEVEL_CONFIG_KEYS[_0x2f66d3(0x14e)](_0x498a32);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x1ea7e5=a144_0x4544eb;return _0x1ea7e5(0x155)+getTopLevelConfigKeySummary()+')';}function a144_0x275f(_0x5e1630,_0x2e98bb){_0x5e1630=_0x5e1630-0x13f;const _0xbcba2e=a144_0xbcba();let _0x275f78=_0xbcba2e[_0x5e1630];return _0x275f78;}export const APP_PROFILE_FLAG_KEY_MAP={'env':a144_0x4544eb(0x157),'apiDir':a144_0x4544eb(0x15f),'cookie':a144_0x4544eb(0x15c),'accessKey':'accessKey','defaultFormat':a144_0x4544eb(0x160),'pageSize':a144_0x4544eb(0x144),'riskLevel':a144_0x4544eb(0x14d),'locale':'locale'};export function getAppProfileFlagDefs(){const _0x331b08=a144_0x4544eb;return[{'name':_0x331b08(0x157),'type':_0x331b08(0x14b),'description':_0x331b08(0x145),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x331b08(0x15f),'type':_0x331b08(0x14b),'description':_0x331b08(0x164)},{'name':_0x331b08(0x15c),'type':'string','description':_0x331b08(0x162),'hidden':!![]},{'name':'accessKey','type':'string','description':_0x331b08(0x15b),'hidden':!![]},{'name':'defaultFormat','type':_0x331b08(0x14b),'description':'Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0x331b08(0x144),'type':'number','description':'Default\x20page\x20size'},{'name':_0x331b08(0x14d),'type':_0x331b08(0x14b),'description':_0x331b08(0x13f),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x331b08(0x150),'type':_0x331b08(0x14b),'description':'Locale'}];}export function collectAppProfileOverrides(_0xa6b665){const _0x285923=a144_0x4544eb,_0x571213={};for(const [_0x193217,_0x4d6ba2]of Object[_0x285923(0x154)](APP_PROFILE_FLAG_KEY_MAP)){const _0x5100ab=_0xa6b665(_0x193217);if(!_0x5100ab)continue;_0x571213[_0x4d6ba2]=_0x4d6ba2===_0x285923(0x144)?Number(_0x5100ab):_0x5100ab;}return _0x571213;}export function buildAppProfileListFields(_0x230f3f){const _0x49eb2a=a144_0x4544eb;return{'env':_0x230f3f['env']??null,'apiDir':_0x230f3f[_0x49eb2a(0x15f)]??null,'hasCookie':!!_0x230f3f[_0x49eb2a(0x15c)],'hasAccessKey':!!_0x230f3f[_0x49eb2a(0x15a)],'format':_0x230f3f['format']??null,'pageSize':_0x230f3f[_0x49eb2a(0x144)]??null,'riskLevel':_0x230f3f[_0x49eb2a(0x14d)]??null,'locale':_0x230f3f[_0x49eb2a(0x150)]??null};}export function buildAppDoctorFields(_0x9af1cc,_0x368f41){const _0x57948c=a144_0x4544eb;return{'env':{'value':_0x9af1cc[_0x57948c(0x157)]||_0x368f41[_0x57948c(0x157)],'source':_0x9af1cc['env']?'app':_0x57948c(0x152)},'apiDir':{'value':_0x9af1cc[_0x57948c(0x15f)]||_0x368f41[_0x57948c(0x15f)],'source':_0x9af1cc['apiDir']?_0x57948c(0x149):'inherit'},'cookie':{'value':_0x9af1cc[_0x57948c(0x15c)]||_0x368f41[_0x57948c(0x15c)],'source':_0x9af1cc['cookie']?_0x57948c(0x149):_0x57948c(0x152)},'accessKey':{'value':_0x9af1cc[_0x57948c(0x15a)]||_0x368f41[_0x57948c(0x15a)],'source':_0x9af1cc['accessKey']?'app':_0x57948c(0x152)}};}export function buildCanonicalAppConfig(_0x3f143e,_0x20b467){const _0x593393=a144_0x4544eb,_0x21993b=_0x3f143e[_0x593393(0x15e)](_0x23a007=>String(_0x23a007||'')[_0x593393(0x142)]())['filter'](Boolean);if(_0x21993b[_0x593393(0x15d)]===0x0)return{};const _0x4c734e={};for(const _0x3e76d6 of _0x21993b){_0x4c734e[_0x3e76d6]=_0x20b467?{'appcode':_0x3e76d6,'env':_0x20b467}:{'appcode':_0x3e76d6};}return{'apps':_0x4c734e,'defaultApp':_0x21993b[0x0]};}export function buildCanonicalProjectConfig(_0x533904,_0x5c92a5){const _0x5a916c=a144_0x4544eb,{appCodes:appCodes=[],env:_0x71931a,metadata:_0x4b49fe}=_0x5c92a5,_0x5f3273={..._0x533904,..._0x4b49fe||{}};delete _0x5f3273[_0x5a916c(0x140)],delete _0x5f3273[_0x5a916c(0x149)];if(_0x71931a)_0x5f3273[_0x5a916c(0x157)]=_0x71931a;else!_0x5f3273['env']&&(_0x5f3273[_0x5a916c(0x157)]=DEFAULT_CONFIG_VALUES[_0x5a916c(0x157)]);const _0x58c0ae=buildCanonicalAppConfig(appCodes,_0x5f3273['env']);return Object[_0x5a916c(0x165)](_0x58c0ae)[_0x5a916c(0x15d)]>0x0&&(_0x5f3273[_0x5a916c(0x159)]=_0x58c0ae[_0x5a916c(0x159)],_0x5f3273[_0x5a916c(0x153)]=_0x58c0ae[_0x5a916c(0x153)]),_0x5f3273;}const LOCALE_MAP={'zh':a144_0x4544eb(0x146),'zh-cn':a144_0x4544eb(0x146),'zh_cn':a144_0x4544eb(0x146),'en':'en-US','en-us':a144_0x4544eb(0x14f),'en_us':a144_0x4544eb(0x14f)};export function normalizeLocale(_0x5810c8){const _0x4c6431=a144_0x4544eb;if(!_0x5810c8)return null;return LOCALE_MAP[_0x5810c8[_0x4c6431(0x147)]()]??null;}
@@ -1 +1 @@
1
- function a146_0x30d0(){const _0x1fb2c1=['1352320jUXwOA','1165053oAhFRf','2307239lDyItg','3663OpFLkG','21395881KIcqSw','6TrlJUV','4ivovNT','12HiaBcn','1328018oZfBtm','1307467ATMaZB','10ViOAqa','1SiSMNJ','10544XfqKsc'];a146_0x30d0=function(){return _0x1fb2c1;};return a146_0x30d0();}function a146_0x3e1b(_0x5586ab,_0x3bc52f){_0x5586ab=_0x5586ab-0xf0;const _0x30d0be=a146_0x30d0();let _0x3e1bbc=_0x30d0be[_0x5586ab];return _0x3e1bbc;}(function(_0x4edac1,_0x29f33b){const _0x556dc6=a146_0x3e1b,_0x4524c6=_0x4edac1();while(!![]){try{const _0x39116c=-parseInt(_0x556dc6(0xf0))/0x1*(parseInt(_0x556dc6(0xfa))/0x2)+-parseInt(_0x556dc6(0xf3))/0x3*(parseInt(_0x556dc6(0xf8))/0x4)+parseInt(_0x556dc6(0xf2))/0x5+parseInt(_0x556dc6(0xf7))/0x6*(-parseInt(_0x556dc6(0xfb))/0x7)+-parseInt(_0x556dc6(0xf1))/0x8*(parseInt(_0x556dc6(0xf5))/0x9)+-parseInt(_0x556dc6(0xfc))/0xa*(-parseInt(_0x556dc6(0xf4))/0xb)+-parseInt(_0x556dc6(0xf9))/0xc*(-parseInt(_0x556dc6(0xf6))/0xd);if(_0x39116c===_0x29f33b)break;else _0x4524c6['push'](_0x4524c6['shift']());}catch(_0x4e9346){_0x4524c6['push'](_0x4524c6['shift']());}}}(a146_0x30d0,0x55913));export const CLI_VERSION_POLICY_URL='https://g.lovrabet.com/dist/rabetbase-cli/config/index.json';
1
+ const a145_0x5d534b=a145_0x1884;function a145_0xfc44(){const _0x32c472=['24oyrcHl','2778TSdgOe','48vbbTad','10220mUBEut','23319aQLJpG','403222MCNdiN','855440JNtgQy','1NlRfcx','12749XNsCrL','708odLegT','https://g.lovrabet.com/dist/rabetbase-cli/config/index.json','1824111SEKLzP','252090fRwDML'];a145_0xfc44=function(){return _0x32c472;};return a145_0xfc44();}function a145_0x1884(_0x8c799c,_0x5588ef){_0x8c799c=_0x8c799c-0xbc;const _0xfc44c6=a145_0xfc44();let _0x188415=_0xfc44c6[_0x8c799c];return _0x188415;}(function(_0xbcc129,_0x5e37a0){const _0x11c46c=a145_0x1884,_0x47469d=_0xbcc129();while(!![]){try{const _0x4fbac1=-parseInt(_0x11c46c(0xc7))/0x1*(-parseInt(_0x11c46c(0xc5))/0x2)+parseInt(_0x11c46c(0xc4))/0x3*(parseInt(_0x11c46c(0xc2))/0x4)+parseInt(_0x11c46c(0xbf))/0x5+parseInt(_0x11c46c(0xc1))/0x6*(-parseInt(_0x11c46c(0xc3))/0x7)+-parseInt(_0x11c46c(0xc0))/0x8*(-parseInt(_0x11c46c(0xbe))/0x9)+parseInt(_0x11c46c(0xc6))/0xa+-parseInt(_0x11c46c(0xc8))/0xb*(-parseInt(_0x11c46c(0xbc))/0xc);if(_0x4fbac1===_0x5e37a0)break;else _0x47469d['push'](_0x47469d['shift']());}catch(_0x23d3f2){_0x47469d['push'](_0x47469d['shift']());}}}(a145_0xfc44,0x694b7));export const CLI_VERSION_POLICY_URL=a145_0x5d534b(0xbd);
@@ -1 +1 @@
1
- const a147_0x715b0=a147_0x53d5;(function(_0x1707e9,_0x697e33){const _0xec7dee=a147_0x53d5,_0x511a55=_0x1707e9();while(!![]){try{const _0x354c4d=-parseInt(_0xec7dee(0xf1))/0x1*(parseInt(_0xec7dee(0x138))/0x2)+-parseInt(_0xec7dee(0xf2))/0x3*(parseInt(_0xec7dee(0x111))/0x4)+-parseInt(_0xec7dee(0x128))/0x5+-parseInt(_0xec7dee(0xff))/0x6+-parseInt(_0xec7dee(0x10a))/0x7+-parseInt(_0xec7dee(0xfd))/0x8+parseInt(_0xec7dee(0xe6))/0x9;if(_0x354c4d===_0x697e33)break;else _0x511a55['push'](_0x511a55['shift']());}catch(_0x2b6c9e){_0x511a55['push'](_0x511a55['shift']());}}}(a147_0x51d5,0xd30cd));export const CLI_BIN_NAME=a147_0x715b0(0x11f);export const CLI_DISPLAY_NAME=a147_0x715b0(0x147);export const NPM_PACKAGE_NAME='@lovrabet/rabetbase-cli';function a147_0x53d5(_0x5d217e,_0xc9d31b){_0x5d217e=_0x5d217e-0xe2;const _0x51d59a=a147_0x51d5();let _0x53d5a0=_0x51d59a[_0x5d217e];return _0x53d5a0;}function a147_0x51d5(){const _0x35f5fb=['Schemas','dbId','sqlname','DB\x20ID','value','project','Override\x20appcode','sqlName','description-file','479928ZHpBAF','env','name','file','enableBffSave','non-interactive','functionNode','enable-bff-save','tags','target','sql','production\x20|\x20daily','global','code','meowKey','Rabetbase\x20CLI','all','Description\x20file','json\x20|\x20pretty\x20|\x20compress','keyword','reveal','Use\x20remote','output','Title','app','fromEntries','Verbose\x20output','SQL\x20string','46192455olfSug','clear','Force\x20overwrite','stdin','string','nonInteractive','expected-count','Preview\x20operation\x20without\x20executing','sql-name','Show\x20help','Enable\x20BFF\x20save','1smBfRh','3fsXnfS','<expr>','Page\x20number','Function\x20node','params','schemas','<code>','operation','from-env','verbose','pagesize','4288696uefTyk','help','1648062szdAdL','key','Dataset\x20code','dry-run','boolean','page','fromEnv','db-id','expectedCount','Type\x20filter','appcode','1747578ddgtXi','watch','SQL\x20code','Page\x20size','dbid','Skip\x20confirmation\x20for\x20high-risk\x20writes','Confirm\x20destructive\x20action','5152492UEMsqi','yes','descriptionFile','description','Force\x20non-interactive\x20mode\x20(CI)','datasetcode','Use\x20project\x20config\x20scope','confirm','<name>','Reveal\x20sensitive\x20value','Record\x20ID','Read\x20value\x20from\x20stdin','JSON\x20params','Keyword\x20filter','rabetbase','remote','sqlcode','Tags','SQL\x20name','skipImports','Output\x20path','Description','Read\x20value\x20from\x20environment\x20variable','8397645sAlrGY','Config\x20value','Operation\x20type','type','format','Skip\x20import\x20generation','File\x20path'];a147_0x51d5=function(){return _0x35f5fb;};return a147_0x51d5();}export const GLOBAL_FLAGS=[{'name':a147_0x715b0(0x109),'meowKey':a147_0x715b0(0x109),'type':a147_0x715b0(0xea),'description':a147_0x715b0(0x135),'hint':a147_0x715b0(0xf8)},{'name':a147_0x715b0(0xe2),'meowKey':a147_0x715b0(0xe2),'type':a147_0x715b0(0xea),'description':'Select\x20app\x20profile\x20by\x20name','hint':a147_0x715b0(0x119)},{'name':a147_0x715b0(0x139),'meowKey':'env','type':a147_0x715b0(0xea),'description':'Environment','hint':a147_0x715b0(0x143)},{'name':a147_0x715b0(0x12c),'meowKey':a147_0x715b0(0x12c),'type':'string','description':'Output\x20format','hint':a147_0x715b0(0x14a)},{'name':'jq','meowKey':'jq','type':a147_0x715b0(0xea),'description':'Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','hint':a147_0x715b0(0xf3)},{'name':a147_0x715b0(0x102),'meowKey':'dryRun','type':'boolean','description':a147_0x715b0(0xed)},{'name':a147_0x715b0(0x112),'meowKey':a147_0x715b0(0x112),'type':a147_0x715b0(0x103),'description':a147_0x715b0(0x10f)},{'name':'non-interactive','meowKey':a147_0x715b0(0xeb),'type':a147_0x715b0(0x103),'description':a147_0x715b0(0x115)},{'name':a147_0x715b0(0x144),'meowKey':a147_0x715b0(0x144),'type':a147_0x715b0(0x103),'description':'Use\x20global\x20config\x20scope'},{'name':a147_0x715b0(0x134),'meowKey':a147_0x715b0(0x134),'type':'boolean','description':a147_0x715b0(0x117)},{'name':'ci','meowKey':'ci','type':a147_0x715b0(0x103),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':a147_0x715b0(0xfe),'meowKey':'help','type':'boolean','description':a147_0x715b0(0xef)},{'name':'name','meowKey':a147_0x715b0(0x13a),'type':a147_0x715b0(0xea),'description':'Name','hidden':!![]},{'name':'title','meowKey':'title','type':a147_0x715b0(0xea),'description':a147_0x715b0(0x14f),'hidden':!![]},{'name':a147_0x715b0(0xe7),'meowKey':a147_0x715b0(0xe7),'type':'boolean','description':'Clear','hidden':!![]},{'name':a147_0x715b0(0x10b),'meowKey':'watch','type':a147_0x715b0(0x103),'description':'Watch\x20mode','hidden':!![]},{'name':a147_0x715b0(0x14e),'meowKey':a147_0x715b0(0x14e),'type':a147_0x715b0(0xea),'description':a147_0x715b0(0x125),'hidden':!![]},{'name':a147_0x715b0(0xf6),'meowKey':a147_0x715b0(0xf6),'type':a147_0x715b0(0xea),'description':a147_0x715b0(0x11d),'hidden':!![]},{'name':a147_0x715b0(0x116),'meowKey':a147_0x715b0(0x116),'type':a147_0x715b0(0xea),'description':a147_0x715b0(0x101),'hidden':!![]},{'name':a147_0x715b0(0x148),'meowKey':a147_0x715b0(0x148),'type':a147_0x715b0(0x103),'description':'Apply\x20to\x20all','hidden':!![]},{'name':a147_0x715b0(0x13f),'meowKey':a147_0x715b0(0x13c),'type':'boolean','description':a147_0x715b0(0xf0),'hidden':!![]},{'name':'id','meowKey':'id','type':'string','description':a147_0x715b0(0x11b),'hidden':!![]},{'name':a147_0x715b0(0x12b),'meowKey':a147_0x715b0(0x12b),'type':'string','description':a147_0x715b0(0x108),'hidden':!![]},{'name':a147_0x715b0(0x13b),'meowKey':a147_0x715b0(0x13b),'type':'string','description':a147_0x715b0(0x12e),'hidden':!![]},{'name':a147_0x715b0(0x121),'meowKey':a147_0x715b0(0x121),'type':a147_0x715b0(0xea),'description':a147_0x715b0(0x10c),'hidden':!![]},{'name':a147_0x715b0(0xee),'meowKey':a147_0x715b0(0x136),'type':'string','description':'SQL\x20name','hidden':!![]},{'name':a147_0x715b0(0x131),'meowKey':a147_0x715b0(0x131),'type':'string','description':a147_0x715b0(0x123),'hidden':!![]},{'name':a147_0x715b0(0x106),'meowKey':a147_0x715b0(0x130),'type':a147_0x715b0(0xea),'description':a147_0x715b0(0x132),'hidden':!![]},{'name':a147_0x715b0(0x10e),'meowKey':'dbid','type':a147_0x715b0(0xea),'description':a147_0x715b0(0x132),'hidden':!![]},{'name':a147_0x715b0(0x114),'meowKey':a147_0x715b0(0x114),'type':a147_0x715b0(0xea),'description':a147_0x715b0(0x126),'hidden':!![]},{'name':a147_0x715b0(0x137),'meowKey':a147_0x715b0(0x113),'type':a147_0x715b0(0xea),'description':a147_0x715b0(0x149),'hidden':!![]},{'name':a147_0x715b0(0x104),'meowKey':a147_0x715b0(0x104),'type':a147_0x715b0(0xea),'description':a147_0x715b0(0xf4),'hidden':!![]},{'name':a147_0x715b0(0xfc),'meowKey':a147_0x715b0(0xfc),'type':'string','description':a147_0x715b0(0x10d),'hidden':!![]},{'name':'keyword','meowKey':a147_0x715b0(0x14b),'type':a147_0x715b0(0xea),'description':a147_0x715b0(0x11e),'hidden':!![]},{'name':a147_0x715b0(0x145),'meowKey':a147_0x715b0(0x145),'type':a147_0x715b0(0xea),'description':'Code\x20filter','hidden':!![]},{'name':a147_0x715b0(0x142),'meowKey':a147_0x715b0(0x142),'type':a147_0x715b0(0xea),'description':a147_0x715b0(0xe5),'hidden':!![]},{'name':a147_0x715b0(0xf7),'meowKey':'schemas','type':a147_0x715b0(0xea),'description':a147_0x715b0(0x12f),'hidden':!![]},{'name':a147_0x715b0(0xf9),'meowKey':a147_0x715b0(0xf9),'type':a147_0x715b0(0xea),'description':a147_0x715b0(0x12a),'hidden':!![]},{'name':a147_0x715b0(0x141),'meowKey':a147_0x715b0(0x141),'type':a147_0x715b0(0xea),'description':'Target\x20path','hidden':!![]},{'name':'skip-imports','meowKey':a147_0x715b0(0x124),'type':a147_0x715b0(0x103),'description':a147_0x715b0(0x12d),'hidden':!![]},{'name':a147_0x715b0(0x100),'meowKey':a147_0x715b0(0x100),'type':'string','description':'Config\x20key','hidden':!![]},{'name':a147_0x715b0(0x133),'meowKey':a147_0x715b0(0x133),'type':'string','description':a147_0x715b0(0x129),'hidden':!![]},{'name':a147_0x715b0(0x140),'meowKey':'tags','type':'string','description':a147_0x715b0(0x122),'hidden':!![]},{'name':a147_0x715b0(0xe9),'meowKey':a147_0x715b0(0xe9),'type':'boolean','description':a147_0x715b0(0x11c),'hidden':!![]},{'name':a147_0x715b0(0xfa),'meowKey':a147_0x715b0(0x105),'type':a147_0x715b0(0xea),'description':a147_0x715b0(0x127),'hidden':!![]},{'name':a147_0x715b0(0x14c),'meowKey':'reveal','type':a147_0x715b0(0x103),'description':a147_0x715b0(0x11a),'hidden':!![]},{'name':'force','meowKey':'force','type':a147_0x715b0(0x103),'description':a147_0x715b0(0xe8),'hidden':!![]},{'name':a147_0x715b0(0x118),'meowKey':a147_0x715b0(0x118),'type':a147_0x715b0(0x103),'description':a147_0x715b0(0x110),'hidden':!![]},{'name':a147_0x715b0(0x120),'meowKey':'remote','type':a147_0x715b0(0x103),'description':a147_0x715b0(0x14d),'hidden':!![]},{'name':a147_0x715b0(0xfb),'meowKey':'verbose','type':a147_0x715b0(0x103),'description':a147_0x715b0(0xe4),'hidden':!![]},{'name':a147_0x715b0(0xec),'meowKey':a147_0x715b0(0x107),'type':a147_0x715b0(0xea),'description':'Expected\x20affected\x20count','hidden':!![]},{'name':'operation-type','meowKey':'operationType','type':'string','description':'Operation\x20type','hidden':!![]},{'name':'function-node','meowKey':a147_0x715b0(0x13e),'type':a147_0x715b0(0xea),'description':a147_0x715b0(0xf5),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set(['appcode',a147_0x715b0(0xe2),a147_0x715b0(0x139),a147_0x715b0(0x12c),'jq',a147_0x715b0(0x102),a147_0x715b0(0x112),a147_0x715b0(0x13d),'ci']);export function buildMeowFlags(){const _0xb13fe8=a147_0x715b0;return Object[_0xb13fe8(0xe3)](GLOBAL_FLAGS['map'](_0x543a85=>[_0x543a85[_0xb13fe8(0x146)],{'type':_0x543a85[_0xb13fe8(0x12b)]}]));}
1
+ function a146_0x3063(_0x1aa424,_0x446e08){_0x1aa424=_0x1aa424-0x1e2;const _0x2f4bf2=a146_0x2f4b();let _0x30633d=_0x2f4bf2[_0x1aa424];return _0x30633d;}const a146_0x2759d3=a146_0x3063;(function(_0x3f0c64,_0x46a169){const _0x45fd67=a146_0x3063,_0xb9ca35=_0x3f0c64();while(!![]){try{const _0x4982df=-parseInt(_0x45fd67(0x231))/0x1*(-parseInt(_0x45fd67(0x1fd))/0x2)+-parseInt(_0x45fd67(0x24e))/0x3+parseInt(_0x45fd67(0x20f))/0x4*(parseInt(_0x45fd67(0x22a))/0x5)+parseInt(_0x45fd67(0x1fb))/0x6*(-parseInt(_0x45fd67(0x1fc))/0x7)+-parseInt(_0x45fd67(0x202))/0x8+parseInt(_0x45fd67(0x23a))/0x9*(parseInt(_0x45fd67(0x235))/0xa)+-parseInt(_0x45fd67(0x242))/0xb*(-parseInt(_0x45fd67(0x21e))/0xc);if(_0x4982df===_0x46a169)break;else _0xb9ca35['push'](_0xb9ca35['shift']());}catch(_0x208533){_0xb9ca35['push'](_0xb9ca35['shift']());}}}(a146_0x2f4b,0x660a8));export const CLI_BIN_NAME=a146_0x2759d3(0x234);function a146_0x2f4b(){const _0x9f6a2f=['12NFVwLx','output','Watch\x20mode','db-id','type','Preview\x20operation\x20without\x20executing','dry-run','Force\x20overwrite','all','sqlcode','tags','yes','boolean','non-interactive','<expr>','156ZcpbwU','Type\x20filter','params','from-env','format','sql-name','sqlname','name','Description','Confirm\x20destructive\x20action','Schemas','Record\x20ID','15545QuxOXM','Skip\x20confirmation\x20for\x20high-risk\x20writes','SQL\x20string','Clear','Reveal\x20sensitive\x20value','expected-count','description-file','330YAlYfA','datasetcode','global','rabetbase','10FWnpya','key','dryRun','confirm','operation','3183228xxzpqu','<code>','Rabetbase\x20CLI','skip-imports','reveal','string','stdin','Show\x20help','3971MxWUvm','Output\x20format','Config\x20value','file','Override\x20appcode','Force\x20non-interactive\x20mode\x20(CI)','Page\x20number','@lovrabet/rabetbase-cli','fromEntries','target','verbose','sql','1359360BhpXyY','enableBffSave','Title','schemas','nonInteractive','env','operationType','sqlName','Function\x20node','Keyword\x20filter','operation-type','value','dbId','remote','JSON\x20params','Environment','<name>','functionNode','Page\x20size','Target\x20path','Read\x20value\x20from\x20stdin','json\x20|\x20pretty\x20|\x20compress','Expected\x20affected\x20count','description','project','Description\x20file','code','dbid','Tags','Use\x20global\x20config\x20scope','watch','appcode','Select\x20app\x20profile\x20by\x20name','18nIGdHU','264103QPLdtq','3750JQSRVW','production\x20|\x20daily','clear','descriptionFile','map','17560BoQTED','Operation\x20type','SQL\x20name','Skip\x20import\x20generation','title','page','Verbose\x20output','pagesize','expectedCount','DB\x20ID','force','Dataset\x20code','app'];a146_0x2f4b=function(){return _0x9f6a2f;};return a146_0x2f4b();}export const CLI_DISPLAY_NAME=a146_0x2759d3(0x23c);export const NPM_PACKAGE_NAME=a146_0x2759d3(0x249);export const GLOBAL_FLAGS=[{'name':a146_0x2759d3(0x1f9),'meowKey':a146_0x2759d3(0x1f9),'type':a146_0x2759d3(0x23f),'description':a146_0x2759d3(0x246),'hint':a146_0x2759d3(0x23b)},{'name':'app','meowKey':a146_0x2759d3(0x20e),'type':a146_0x2759d3(0x23f),'description':a146_0x2759d3(0x1fa),'hint':a146_0x2759d3(0x1ea)},{'name':a146_0x2759d3(0x253),'meowKey':a146_0x2759d3(0x253),'type':'string','description':a146_0x2759d3(0x1e9),'hint':a146_0x2759d3(0x1fe)},{'name':a146_0x2759d3(0x222),'meowKey':a146_0x2759d3(0x222),'type':a146_0x2759d3(0x23f),'description':a146_0x2759d3(0x243),'hint':a146_0x2759d3(0x1ef)},{'name':'jq','meowKey':'jq','type':a146_0x2759d3(0x23f),'description':'Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','hint':a146_0x2759d3(0x21d)},{'name':a146_0x2759d3(0x215),'meowKey':a146_0x2759d3(0x237),'type':a146_0x2759d3(0x21b),'description':a146_0x2759d3(0x214)},{'name':a146_0x2759d3(0x21a),'meowKey':a146_0x2759d3(0x21a),'type':'boolean','description':a146_0x2759d3(0x22b)},{'name':a146_0x2759d3(0x21c),'meowKey':a146_0x2759d3(0x252),'type':a146_0x2759d3(0x21b),'description':a146_0x2759d3(0x247)},{'name':'global','meowKey':a146_0x2759d3(0x233),'type':a146_0x2759d3(0x21b),'description':a146_0x2759d3(0x1f7)},{'name':a146_0x2759d3(0x1f2),'meowKey':'project','type':a146_0x2759d3(0x21b),'description':'Use\x20project\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a146_0x2759d3(0x21b),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':'help','meowKey':'help','type':'boolean','description':a146_0x2759d3(0x241)},{'name':'name','meowKey':a146_0x2759d3(0x225),'type':a146_0x2759d3(0x23f),'description':'Name','hidden':!![]},{'name':'title','meowKey':a146_0x2759d3(0x206),'type':a146_0x2759d3(0x23f),'description':a146_0x2759d3(0x250),'hidden':!![]},{'name':a146_0x2759d3(0x1ff),'meowKey':a146_0x2759d3(0x1ff),'type':a146_0x2759d3(0x21b),'description':a146_0x2759d3(0x22d),'hidden':!![]},{'name':a146_0x2759d3(0x1f8),'meowKey':'watch','type':a146_0x2759d3(0x21b),'description':a146_0x2759d3(0x211),'hidden':!![]},{'name':a146_0x2759d3(0x210),'meowKey':a146_0x2759d3(0x210),'type':'string','description':'Output\x20path','hidden':!![]},{'name':a146_0x2759d3(0x220),'meowKey':a146_0x2759d3(0x220),'type':a146_0x2759d3(0x23f),'description':a146_0x2759d3(0x1e8),'hidden':!![]},{'name':a146_0x2759d3(0x232),'meowKey':a146_0x2759d3(0x232),'type':a146_0x2759d3(0x23f),'description':a146_0x2759d3(0x20d),'hidden':!![]},{'name':a146_0x2759d3(0x217),'meowKey':a146_0x2759d3(0x217),'type':'boolean','description':'Apply\x20to\x20all','hidden':!![]},{'name':'enable-bff-save','meowKey':a146_0x2759d3(0x24f),'type':a146_0x2759d3(0x21b),'description':'Enable\x20BFF\x20save','hidden':!![]},{'name':'id','meowKey':'id','type':a146_0x2759d3(0x23f),'description':a146_0x2759d3(0x229),'hidden':!![]},{'name':a146_0x2759d3(0x213),'meowKey':a146_0x2759d3(0x213),'type':a146_0x2759d3(0x23f),'description':a146_0x2759d3(0x21f),'hidden':!![]},{'name':a146_0x2759d3(0x245),'meowKey':a146_0x2759d3(0x245),'type':a146_0x2759d3(0x23f),'description':'File\x20path','hidden':!![]},{'name':'sqlcode','meowKey':a146_0x2759d3(0x218),'type':a146_0x2759d3(0x23f),'description':'SQL\x20code','hidden':!![]},{'name':a146_0x2759d3(0x223),'meowKey':a146_0x2759d3(0x255),'type':a146_0x2759d3(0x23f),'description':'SQL\x20name','hidden':!![]},{'name':'sqlname','meowKey':a146_0x2759d3(0x224),'type':a146_0x2759d3(0x23f),'description':a146_0x2759d3(0x204),'hidden':!![]},{'name':a146_0x2759d3(0x212),'meowKey':a146_0x2759d3(0x1e6),'type':a146_0x2759d3(0x23f),'description':'DB\x20ID','hidden':!![]},{'name':a146_0x2759d3(0x1f5),'meowKey':a146_0x2759d3(0x1f5),'type':a146_0x2759d3(0x23f),'description':a146_0x2759d3(0x20b),'hidden':!![]},{'name':'description','meowKey':a146_0x2759d3(0x1f1),'type':a146_0x2759d3(0x23f),'description':a146_0x2759d3(0x226),'hidden':!![]},{'name':a146_0x2759d3(0x230),'meowKey':a146_0x2759d3(0x200),'type':a146_0x2759d3(0x23f),'description':a146_0x2759d3(0x1f3),'hidden':!![]},{'name':a146_0x2759d3(0x207),'meowKey':a146_0x2759d3(0x207),'type':a146_0x2759d3(0x23f),'description':a146_0x2759d3(0x248),'hidden':!![]},{'name':a146_0x2759d3(0x209),'meowKey':a146_0x2759d3(0x209),'type':a146_0x2759d3(0x23f),'description':a146_0x2759d3(0x1ec),'hidden':!![]},{'name':'keyword','meowKey':'keyword','type':a146_0x2759d3(0x23f),'description':a146_0x2759d3(0x1e3),'hidden':!![]},{'name':a146_0x2759d3(0x1f4),'meowKey':a146_0x2759d3(0x1f4),'type':a146_0x2759d3(0x23f),'description':'Code\x20filter','hidden':!![]},{'name':a146_0x2759d3(0x24d),'meowKey':a146_0x2759d3(0x24d),'type':a146_0x2759d3(0x23f),'description':a146_0x2759d3(0x22c),'hidden':!![]},{'name':a146_0x2759d3(0x251),'meowKey':a146_0x2759d3(0x251),'type':a146_0x2759d3(0x23f),'description':a146_0x2759d3(0x228),'hidden':!![]},{'name':a146_0x2759d3(0x239),'meowKey':a146_0x2759d3(0x239),'type':a146_0x2759d3(0x23f),'description':a146_0x2759d3(0x203),'hidden':!![]},{'name':a146_0x2759d3(0x24b),'meowKey':'target','type':a146_0x2759d3(0x23f),'description':a146_0x2759d3(0x1ed),'hidden':!![]},{'name':a146_0x2759d3(0x23d),'meowKey':'skipImports','type':a146_0x2759d3(0x21b),'description':a146_0x2759d3(0x205),'hidden':!![]},{'name':a146_0x2759d3(0x236),'meowKey':a146_0x2759d3(0x236),'type':'string','description':'Config\x20key','hidden':!![]},{'name':a146_0x2759d3(0x1e5),'meowKey':'value','type':a146_0x2759d3(0x23f),'description':a146_0x2759d3(0x244),'hidden':!![]},{'name':a146_0x2759d3(0x219),'meowKey':'tags','type':a146_0x2759d3(0x23f),'description':a146_0x2759d3(0x1f6),'hidden':!![]},{'name':a146_0x2759d3(0x240),'meowKey':a146_0x2759d3(0x240),'type':a146_0x2759d3(0x21b),'description':a146_0x2759d3(0x1ee),'hidden':!![]},{'name':a146_0x2759d3(0x221),'meowKey':'fromEnv','type':a146_0x2759d3(0x23f),'description':'Read\x20value\x20from\x20environment\x20variable','hidden':!![]},{'name':a146_0x2759d3(0x23e),'meowKey':a146_0x2759d3(0x23e),'type':a146_0x2759d3(0x21b),'description':a146_0x2759d3(0x22e),'hidden':!![]},{'name':a146_0x2759d3(0x20c),'meowKey':a146_0x2759d3(0x20c),'type':a146_0x2759d3(0x21b),'description':a146_0x2759d3(0x216),'hidden':!![]},{'name':a146_0x2759d3(0x238),'meowKey':a146_0x2759d3(0x238),'type':a146_0x2759d3(0x21b),'description':a146_0x2759d3(0x227),'hidden':!![]},{'name':a146_0x2759d3(0x1e7),'meowKey':a146_0x2759d3(0x1e7),'type':a146_0x2759d3(0x21b),'description':'Use\x20remote','hidden':!![]},{'name':a146_0x2759d3(0x24c),'meowKey':a146_0x2759d3(0x24c),'type':a146_0x2759d3(0x21b),'description':a146_0x2759d3(0x208),'hidden':!![]},{'name':a146_0x2759d3(0x22f),'meowKey':a146_0x2759d3(0x20a),'type':'string','description':a146_0x2759d3(0x1f0),'hidden':!![]},{'name':a146_0x2759d3(0x1e4),'meowKey':a146_0x2759d3(0x254),'type':'string','description':a146_0x2759d3(0x203),'hidden':!![]},{'name':'function-node','meowKey':a146_0x2759d3(0x1eb),'type':a146_0x2759d3(0x23f),'description':a146_0x2759d3(0x1e2),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a146_0x2759d3(0x1f9),a146_0x2759d3(0x20e),a146_0x2759d3(0x253),a146_0x2759d3(0x222),'jq',a146_0x2759d3(0x215),a146_0x2759d3(0x21a),'non-interactive','ci']);export function buildMeowFlags(){const _0x66ff88=a146_0x2759d3;return Object[_0x66ff88(0x24a)](GLOBAL_FLAGS[_0x66ff88(0x201)](_0x3c505c=>[_0x3c505c['meowKey'],{'type':_0x3c505c['type']}]));}
@@ -1 +1 @@
1
- const a148_0x4eb3cd=a148_0x4b82;function a148_0x4b82(_0x4641b7,_0x5c7134){_0x4641b7=_0x4641b7-0x166;const _0x4a4e6c=a148_0x4a4e();let _0x4b82ca=_0x4a4e6c[_0x4641b7];return _0x4b82ca;}(function(_0x11a085,_0x324052){const _0x509437=a148_0x4b82,_0x325396=_0x11a085();while(!![]){try{const _0x5e2411=-parseInt(_0x509437(0x16c))/0x1+-parseInt(_0x509437(0x167))/0x2+parseInt(_0x509437(0x171))/0x3*(-parseInt(_0x509437(0x16a))/0x4)+parseInt(_0x509437(0x16d))/0x5+parseInt(_0x509437(0x166))/0x6*(parseInt(_0x509437(0x168))/0x7)+parseInt(_0x509437(0x16b))/0x8+parseInt(_0x509437(0x16f))/0x9*(-parseInt(_0x509437(0x170))/0xa);if(_0x5e2411===_0x324052)break;else _0x325396['push'](_0x325396['shift']());}catch(_0x56a673){_0x325396['push'](_0x325396['shift']());}}}(a148_0x4a4e,0x71769));import{DEFAULT_API_DIR}from'../constant/paths.js';function a148_0x4a4e(){const _0x36d821=['142186yPGTRT','3607980Iofuth','compress','296559rDMJbl','90EycZhI','27KXExDA','19476TchAiw','98822YOZnvr','630DvHYCV','production','32080FaBCoK','90760YHORAl'];a148_0x4a4e=function(){return _0x36d821;};return a148_0x4a4e();}export const DEFAULT_CONFIG_VALUES={'env':a148_0x4eb3cd(0x169),'format':a148_0x4eb3cd(0x16e),'locale':'en-US','riskLevel':'high-risk-write','apiDir':DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a148_0x4eb3cd(0x16e);
1
+ const a147_0x407c8d=a147_0x3577;function a147_0x3b72(){const _0x3b5301=['production','367905WIXKuI','1535790tiglra','147fFEYaz','2034480tlwfqY','246580EUlEMO','6wTXqoS','compress','178858QysUby','4891356LCpGKk','954QeqkFW','118344AvaaHQ'];a147_0x3b72=function(){return _0x3b5301;};return a147_0x3b72();}function a147_0x3577(_0x1e636f,_0x58db71){_0x1e636f=_0x1e636f-0x1e3;const _0x3b7276=a147_0x3b72();let _0x357732=_0x3b7276[_0x1e636f];return _0x357732;}(function(_0x3ac3c3,_0x209e30){const _0x121f1a=a147_0x3577,_0x26ea3d=_0x3ac3c3();while(!![]){try{const _0x25e1a9=-parseInt(_0x121f1a(0x1e7))/0x1+parseInt(_0x121f1a(0x1ee))/0x2*(parseInt(_0x121f1a(0x1ec))/0x3)+-parseInt(_0x121f1a(0x1ea))/0x4+-parseInt(_0x121f1a(0x1e8))/0x5+-parseInt(_0x121f1a(0x1e3))/0x6+-parseInt(_0x121f1a(0x1e9))/0x7*(parseInt(_0x121f1a(0x1e5))/0x8)+parseInt(_0x121f1a(0x1e4))/0x9*(parseInt(_0x121f1a(0x1eb))/0xa);if(_0x25e1a9===_0x209e30)break;else _0x26ea3d['push'](_0x26ea3d['shift']());}catch(_0x20c853){_0x26ea3d['push'](_0x26ea3d['shift']());}}}(a147_0x3b72,0x75ee4));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a147_0x407c8d(0x1e6),'format':'compress','locale':'en-US','riskLevel':'high-risk-write','apiDir':DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a147_0x407c8d(0x1ed);
@@ -1 +1 @@
1
- const a149_0x56055a=a149_0x18ba;(function(_0x18c433,_0x2ba294){const _0x55b581=a149_0x18ba,_0x45b2e0=_0x18c433();while(!![]){try{const _0x3d58f9=-parseInt(_0x55b581(0x1e1))/0x1+parseInt(_0x55b581(0x1ea))/0x2*(-parseInt(_0x55b581(0x1dc))/0x3)+parseInt(_0x55b581(0x1e4))/0x4*(-parseInt(_0x55b581(0x1ef))/0x5)+parseInt(_0x55b581(0x1ee))/0x6*(parseInt(_0x55b581(0x1de))/0x7)+-parseInt(_0x55b581(0x1eb))/0x8*(parseInt(_0x55b581(0x1e0))/0x9)+-parseInt(_0x55b581(0x1e2))/0xa+parseInt(_0x55b581(0x1e9))/0xb;if(_0x3d58f9===_0x2ba294)break;else _0x45b2e0['push'](_0x45b2e0['shift']());}catch(_0xa96322){_0x45b2e0['push'](_0x45b2e0['shift']());}}}(a149_0x338a,0xb7cd6));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0xa471d0){const _0xcf030a=a149_0x18ba;customApiDomain=_0xa471d0?.[_0xcf030a(0x1e3)],customUserDomain=_0xa471d0?.['userDomain'],customRuntimeDomain=_0xa471d0?.['runtimeDomain'];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?'https://user.lovrabet.com':a149_0x56055a(0x1e8));function a149_0x338a(){const _0x2a3ede=['https://user-daily.lovrabet.com','63016074IRuaMn','417454OatuNk','8bdwtBf','https://runtime.lovrabet.com','https://daily-api.lovrabet.com','24AUiURh','45065cFIqzq','/app/','3asmZAx','/web-app/app/','340592UlEToq','https://api.lovrabet.com','12487842UXAfKH','1184842wRUayL','11456030IFbqMm','apiDomain','552GVKFVm','trim','https://daily-runtime.lovrabet.com','https://app.lovrabet.com'];a149_0x338a=function(){return _0x2a3ede;};return a149_0x338a();}function a149_0x18ba(_0x25dd70,_0x11f110){_0x25dd70=_0x25dd70-0x1dc;const _0x338a5a=a149_0x338a();let _0x18bab9=_0x338a5a[_0x25dd70];return _0x18bab9;}export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a149_0x56055a(0x1df):a149_0x56055a(0x1ed));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a149_0x56055a(0x1ec):a149_0x56055a(0x1e6));export const getAppDomain=()=>isProduction(getEnv())?a149_0x56055a(0x1e7):'https://daily.lovrabet.com';export const getAppBaseUrl=_0x31cce0=>{const _0x31d209=a149_0x56055a,_0x459f0a=encodeURIComponent(_0x31cce0[_0x31d209(0x1e5)]());return isProduction(getEnv())?getAppDomain()+_0x31d209(0x1f0)+_0x459f0a:getAppDomain()+_0x31d209(0x1dd)+_0x459f0a;};
1
+ const a148_0xf6be2a=a148_0x3738;(function(_0x2c2f57,_0x432b5f){const _0x69310f=a148_0x3738,_0x12caf0=_0x2c2f57();while(!![]){try{const _0x643a3d=parseInt(_0x69310f(0xc7))/0x1*(parseInt(_0x69310f(0xd4))/0x2)+-parseInt(_0x69310f(0xcc))/0x3+parseInt(_0x69310f(0xd0))/0x4*(-parseInt(_0x69310f(0xd8))/0x5)+-parseInt(_0x69310f(0xd2))/0x6*(-parseInt(_0x69310f(0xcd))/0x7)+-parseInt(_0x69310f(0xce))/0x8+parseInt(_0x69310f(0xc9))/0x9+-parseInt(_0x69310f(0xd5))/0xa*(-parseInt(_0x69310f(0xd6))/0xb);if(_0x643a3d===_0x432b5f)break;else _0x12caf0['push'](_0x12caf0['shift']());}catch(_0x25d7d1){_0x12caf0['push'](_0x12caf0['shift']());}}}(a148_0x5bda,0x3b0a7));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x1d80e6){const _0x2b0ae5=a148_0x3738;customApiDomain=_0x1d80e6?.[_0x2b0ae5(0xcf)],customUserDomain=_0x1d80e6?.[_0x2b0ae5(0xd1)],customRuntimeDomain=_0x1d80e6?.[_0x2b0ae5(0xc6)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?'https://user.lovrabet.com':'https://user-daily.lovrabet.com');function a148_0x3738(_0x547f0c,_0x475e9a){_0x547f0c=_0x547f0c-0xc6;const _0x5bdaa6=a148_0x5bda();let _0x37383e=_0x5bdaa6[_0x547f0c];return _0x37383e;}export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a148_0xf6be2a(0xc8):a148_0xf6be2a(0xca));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a148_0xf6be2a(0xda):a148_0xf6be2a(0xd7));export const getAppDomain=()=>isProduction(getEnv())?a148_0xf6be2a(0xdb):a148_0xf6be2a(0xd9);export const getAppBaseUrl=_0x2bd7b9=>{const _0x3d5f=a148_0xf6be2a,_0x1d8350=encodeURIComponent(_0x2bd7b9[_0x3d5f(0xd3)]());return isProduction(getEnv())?getAppDomain()+_0x3d5f(0xcb)+_0x1d8350:getAppDomain()+'/web-app/app/'+_0x1d8350;};function a148_0x5bda(){const _0x5b8a11=['https://api.lovrabet.com','1834686eJslTJ','https://daily-api.lovrabet.com','/app/','1326261fNeqfq','7637IAHrpP','1765440qtGKjf','apiDomain','20492jJEdUD','userDomain','2238tksAvA','trim','1946taBTDq','3184730BzDpem','11IJYEIP','https://daily-runtime.lovrabet.com','365FfAcuf','https://daily.lovrabet.com','https://runtime.lovrabet.com','https://app.lovrabet.com','runtimeDomain','359BgOmDI'];a148_0x5bda=function(){return _0x5b8a11;};return a148_0x5bda();}
@@ -1 +1 @@
1
- const a150_0x48a9a9=a150_0x1fbd;(function(_0x371369,_0x5d872e){const _0x39d94f=a150_0x1fbd,_0xe95999=_0x371369();while(!![]){try{const _0x4c6733=-parseInt(_0x39d94f(0xca))/0x1+parseInt(_0x39d94f(0xc5))/0x2*(-parseInt(_0x39d94f(0xcd))/0x3)+-parseInt(_0x39d94f(0xc7))/0x4*(parseInt(_0x39d94f(0xce))/0x5)+parseInt(_0x39d94f(0xc8))/0x6+parseInt(_0x39d94f(0xc6))/0x7+parseInt(_0x39d94f(0xcf))/0x8*(parseInt(_0x39d94f(0xcc))/0x9)+-parseInt(_0x39d94f(0xc9))/0xa;if(_0x4c6733===_0x5d872e)break;else _0xe95999['push'](_0xe95999['shift']());}catch(_0x34cabf){_0xe95999['push'](_0xe95999['shift']());}}}(a150_0x1872,0x5e52c));export const RABETBASE_ENV_VALUES=['production','daily'];export function normalizeEnv(_0x5fe13e){const _0x4c9e29=a150_0x1fbd;return _0x5fe13e===_0x4c9e29(0xcb)?_0x4c9e29(0xc4):_0x5fe13e;}function a150_0x1fbd(_0x31f08a,_0x3157a6){_0x31f08a=_0x31f08a-0xc1;const _0x18723d=a150_0x1872();let _0x1fbdf4=_0x18723d[_0x31f08a];return _0x1fbdf4;}export function isProduction(_0x3674f8){const _0x40a9f7=a150_0x1fbd;return normalizeEnv(_0x3674f8)===_0x40a9f7(0xc4);}function a150_0x1872(){const _0xce2a30=['652ATEIGf','4657016ifwzXy','445988XlsXdR','771810VEuDBs','49000NtppSb','435253YETxKG','online','63TwHwqp','3333wtDToz','5weMtJz','578584ovKrPj','daily','dev','development','production'];a150_0x1872=function(){return _0xce2a30;};return a150_0x1872();}export function isDaily(_0x3ac029){const _0x2ff5e4=a150_0x1fbd;return normalizeEnv(_0x3ac029)===_0x2ff5e4(0xc1);}export function isDev(_0x503ef2){const _0x2bbdee=a150_0x1fbd,_0x1cd9d8=normalizeEnv(_0x503ef2);return _0x1cd9d8===_0x2bbdee(0xc3)||_0x1cd9d8===_0x2bbdee(0xc2);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a150_0x48a9a9(0xc4));export function getEnv(){return env;}export function initEnv(_0x52725c){env=normalizeEnv(_0x52725c);}
1
+ const a149_0x1002da=a149_0x1ae1;(function(_0x2e1ef1,_0x2b66be){const _0xf958ae=a149_0x1ae1,_0x34d62a=_0x2e1ef1();while(!![]){try{const _0x9c4dbf=-parseInt(_0xf958ae(0xeb))/0x1+-parseInt(_0xf958ae(0xec))/0x2+-parseInt(_0xf958ae(0xf1))/0x3*(parseInt(_0xf958ae(0xf9))/0x4)+parseInt(_0xf958ae(0xea))/0x5*(parseInt(_0xf958ae(0xf5))/0x6)+parseInt(_0xf958ae(0xf4))/0x7*(parseInt(_0xf958ae(0xf0))/0x8)+-parseInt(_0xf958ae(0xf2))/0x9*(-parseInt(_0xf958ae(0xed))/0xa)+-parseInt(_0xf958ae(0xf3))/0xb*(parseInt(_0xf958ae(0xf7))/0xc);if(_0x9c4dbf===_0x2b66be)break;else _0x34d62a['push'](_0x34d62a['shift']());}catch(_0x4f9988){_0x34d62a['push'](_0x34d62a['shift']());}}}(a149_0x501d,0xb3fef));export const RABETBASE_ENV_VALUES=[a149_0x1002da(0xef),a149_0x1002da(0xf8)];export function normalizeEnv(_0x4417ae){const _0x3fb5bf=a149_0x1002da;return _0x4417ae===_0x3fb5bf(0xf6)?'production':_0x4417ae;}export function isProduction(_0x4ade16){const _0x3c3b40=a149_0x1002da;return normalizeEnv(_0x4ade16)===_0x3c3b40(0xef);}function a149_0x501d(){const _0x439a39=['24ixFHeR','daily','4817856hMTSyZ','development','150HyCFUC','141013quZIIP','504304IeBCef','10iKLdUJ','dev','production','5811896UCzaBh','3lnBdTF','10336851MORqhX','5524222LxyZfI','7FAhRuS','292854ADAVDW','online'];a149_0x501d=function(){return _0x439a39;};return a149_0x501d();}export function isDaily(_0xf39a88){const _0x3e562c=a149_0x1002da;return normalizeEnv(_0xf39a88)===_0x3e562c(0xf8);}function a149_0x1ae1(_0x3d748d,_0x39d1c7){_0x3d748d=_0x3d748d-0xea;const _0x501d45=a149_0x501d();let _0x1ae1a1=_0x501d45[_0x3d748d];return _0x1ae1a1;}export function isDev(_0x517226){const _0x1eccc2=a149_0x1002da,_0x5857b5=normalizeEnv(_0x517226);return _0x5857b5===_0x1eccc2(0xfa)||_0x5857b5===_0x1eccc2(0xee);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a149_0x1002da(0xef));export function getEnv(){return env;}export function initEnv(_0x359fdf){env=normalizeEnv(_0x359fdf);}
@@ -1 +1 @@
1
- const a151_0x295019=a151_0x404b;function a151_0x404b(_0x8d48de,_0x351593){_0x8d48de=_0x8d48de-0x1bd;const _0x2fed40=a151_0x2fed();let _0x404b8b=_0x2fed40[_0x8d48de];return _0x404b8b;}function a151_0x2fed(){const _0x25a4d5=['compress','59442Miyrna','3689112DErblA','145xjwysK','457856ErXxlU','pretty','970335RbmEaC','38687YuPBIF','8TTaBXr','15698tXyTfw','86GzLrMd','18970pfjhIH','2142ByvQcH','1428dplqvF'];a151_0x2fed=function(){return _0x25a4d5;};return a151_0x2fed();}(function(_0x720286,_0x275f73){const _0x4ee28b=a151_0x404b,_0x3ca7f2=_0x720286();while(!![]){try{const _0x2a1d8c=parseInt(_0x4ee28b(0x1c2))/0x1*(-parseInt(_0x4ee28b(0x1c1))/0x2)+parseInt(_0x4ee28b(0x1be))/0x3+parseInt(_0x4ee28b(0x1ca))/0x4+-parseInt(_0x4ee28b(0x1c9))/0x5*(-parseInt(_0x4ee28b(0x1c7))/0x6)+-parseInt(_0x4ee28b(0x1c8))/0x7*(parseInt(_0x4ee28b(0x1c0))/0x8)+-parseInt(_0x4ee28b(0x1c4))/0x9*(-parseInt(_0x4ee28b(0x1c3))/0xa)+parseInt(_0x4ee28b(0x1bf))/0xb*(parseInt(_0x4ee28b(0x1c5))/0xc);if(_0x2a1d8c===_0x275f73)break;else _0x3ca7f2['push'](_0x3ca7f2['shift']());}catch(_0x281050){_0x3ca7f2['push'](_0x3ca7f2['shift']());}}}(a151_0x2fed,0x5ffe7));export const RABETBASE_OUTPUT_FORMAT_VALUES=['json',a151_0x295019(0x1bd),a151_0x295019(0x1c6)];
1
+ function a150_0x3e58(){const _0x4bd484=['2258mHOMvp','112620UMTXRy','466200HbEXTj','json','16828hZaxNE','8HSdDUn','418mcxZRm','compress','7160482RYYPPs','645NltPHk','30ZBvAUm','pretty','398889tfqsZZ','1011mPUUtY','5871730bYiWBY'];a150_0x3e58=function(){return _0x4bd484;};return a150_0x3e58();}const a150_0x523c16=a150_0x28f4;function a150_0x28f4(_0x36da02,_0x1fe7b7){_0x36da02=_0x36da02-0x1b6;const _0x3e58e2=a150_0x3e58();let _0x28f4fe=_0x3e58e2[_0x36da02];return _0x28f4fe;}(function(_0x416b53,_0x56113){const _0x2f7d8c=a150_0x28f4,_0x3e6aa4=_0x416b53();while(!![]){try{const _0x103622=parseInt(_0x2f7d8c(0x1ba))/0x1*(-parseInt(_0x2f7d8c(0x1c0))/0x2)+parseInt(_0x2f7d8c(0x1be))/0x3*(parseInt(_0x2f7d8c(0x1c4))/0x4)+parseInt(_0x2f7d8c(0x1bf))/0x5+-parseInt(_0x2f7d8c(0x1c2))/0x6+-parseInt(_0x2f7d8c(0x1b9))/0x7*(parseInt(_0x2f7d8c(0x1b6))/0x8)+-parseInt(_0x2f7d8c(0x1bd))/0x9*(parseInt(_0x2f7d8c(0x1bb))/0xa)+-parseInt(_0x2f7d8c(0x1b7))/0xb*(-parseInt(_0x2f7d8c(0x1c1))/0xc);if(_0x103622===_0x56113)break;else _0x3e6aa4['push'](_0x3e6aa4['shift']());}catch(_0x57e24b){_0x3e6aa4['push'](_0x3e6aa4['shift']());}}}(a150_0x3e58,0xf0f3d));export const RABETBASE_OUTPUT_FORMAT_VALUES=[a150_0x523c16(0x1c3),a150_0x523c16(0x1bc),a150_0x523c16(0x1b8)];
@@ -1 +1 @@
1
- function a152_0x519e(_0x49ec65,_0x3a3381){_0x49ec65=_0x49ec65-0x180;const _0x25b222=a152_0x25b2();let _0x519e98=_0x25b222[_0x49ec65];return _0x519e98;}function a152_0x25b2(){const _0x540577=['289233nJqTly','2147692tuUQhP','1161587yXrtjT','1714923IuBuut','782IXwqaQ','337FKlKvn','687678MHTWsO','24ObaSOZ','693625fjVXDW','./src/api'];a152_0x25b2=function(){return _0x540577;};return a152_0x25b2();}const a152_0x276d92=a152_0x519e;(function(_0x4bd387,_0x169522){const _0x66a8ba=a152_0x519e,_0x5b5706=_0x4bd387();while(!![]){try{const _0xb2aa0e=parseInt(_0x66a8ba(0x188))/0x1*(-parseInt(_0x66a8ba(0x187))/0x2)+-parseInt(_0x66a8ba(0x186))/0x3+parseInt(_0x66a8ba(0x184))/0x4+parseInt(_0x66a8ba(0x181))/0x5+-parseInt(_0x66a8ba(0x189))/0x6+parseInt(_0x66a8ba(0x185))/0x7*(parseInt(_0x66a8ba(0x180))/0x8)+parseInt(_0x66a8ba(0x183))/0x9;if(_0xb2aa0e===_0x169522)break;else _0x5b5706['push'](_0x5b5706['shift']());}catch(_0x96fa5){_0x5b5706['push'](_0x5b5706['shift']());}}}(a152_0x25b2,0x5ea03));export const DEFAULT_API_DIR=a152_0x276d92(0x182);
1
+ function a151_0x1c69(_0x4a0c1f,_0x183533){_0x4a0c1f=_0x4a0c1f-0xe4;const _0x84378=a151_0x8437();let _0x1c694d=_0x84378[_0x4a0c1f];return _0x1c694d;}function a151_0x8437(){const _0x1b2184=['98830fjmxRG','238UkpmLx','18JECczd','./src/api','381GfRNVV','811150ydtgbs','630896FAJBlh','514052sKJKQU','151920LpMrTR','25WqZWWf','4604uoZoOC'];a151_0x8437=function(){return _0x1b2184;};return a151_0x8437();}const a151_0x3c103e=a151_0x1c69;(function(_0x468099,_0x2a8b70){const _0x2448c7=a151_0x1c69,_0x29bf42=_0x468099();while(!![]){try{const _0x1e73cf=-parseInt(_0x2448c7(0xe7))/0x1+-parseInt(_0x2448c7(0xe8))/0x2*(-parseInt(_0x2448c7(0xeb))/0x3)+-parseInt(_0x2448c7(0xe6))/0x4*(parseInt(_0x2448c7(0xe5))/0x5)+parseInt(_0x2448c7(0xe9))/0x6*(parseInt(_0x2448c7(0xee))/0x7)+parseInt(_0x2448c7(0xed))/0x8+-parseInt(_0x2448c7(0xe4))/0x9+-parseInt(_0x2448c7(0xec))/0xa;if(_0x1e73cf===_0x2a8b70)break;else _0x29bf42['push'](_0x29bf42['shift']());}catch(_0x2429f4){_0x29bf42['push'](_0x29bf42['shift']());}}}(a151_0x8437,0x1b457));export const DEFAULT_API_DIR=a151_0x3c103e(0xea);
@@ -1 +1 @@
1
- const a153_0x4b3b20=a153_0x26ec;function a153_0x5cf1(){const _0x465a3d=['80022usUvXi','132141cTewwd','38VGMKlZ','35230coipFy','40qVwtRJ','265836wNVnWe','48235zrykZw','1631754iCbTjZ','read','42YJOegI','8AOKdGa','13554VduvzC','11GeZogk'];a153_0x5cf1=function(){return _0x465a3d;};return a153_0x5cf1();}(function(_0x1df98f,_0x13a496){const _0x496e99=a153_0x26ec,_0x143846=_0x1df98f();while(!![]){try{const _0x1da4fe=-parseInt(_0x496e99(0x1e7))/0x1+-parseInt(_0x496e99(0x1db))/0x2*(-parseInt(_0x496e99(0x1e4))/0x3)+parseInt(_0x496e99(0x1dd))/0x4*(parseInt(_0x496e99(0x1df))/0x5)+-parseInt(_0x496e99(0x1e6))/0x6*(parseInt(_0x496e99(0x1e2))/0x7)+-parseInt(_0x496e99(0x1e3))/0x8*(-parseInt(_0x496e99(0x1e0))/0x9)+parseInt(_0x496e99(0x1dc))/0xa+-parseInt(_0x496e99(0x1e5))/0xb*(-parseInt(_0x496e99(0x1de))/0xc);if(_0x1da4fe===_0x13a496)break;else _0x143846['push'](_0x143846['shift']());}catch(_0x1ebc85){_0x143846['push'](_0x143846['shift']());}}}(a153_0x5cf1,0x2b3eb));function a153_0x26ec(_0x4a836b,_0x4cef4e){_0x4a836b=_0x4a836b-0x1db;const _0x5cf1ca=a153_0x5cf1();let _0x26ec13=_0x5cf1ca[_0x4a836b];return _0x26ec13;}export const RISK_LEVEL_VALUES=[a153_0x4b3b20(0x1e1),'write','high-risk-write'];
1
+ const a152_0x52a703=a152_0xe399;(function(_0x429fb6,_0x52aeda){const _0x432110=a152_0xe399,_0xfddca=_0x429fb6();while(!![]){try{const _0x3535de=-parseInt(_0x432110(0x1f0))/0x1*(-parseInt(_0x432110(0x1ee))/0x2)+-parseInt(_0x432110(0x1e9))/0x3*(-parseInt(_0x432110(0x1ef))/0x4)+parseInt(_0x432110(0x1f1))/0x5+-parseInt(_0x432110(0x1f2))/0x6+parseInt(_0x432110(0x1ea))/0x7+parseInt(_0x432110(0x1eb))/0x8*(-parseInt(_0x432110(0x1ed))/0x9)+parseInt(_0x432110(0x1ec))/0xa;if(_0x3535de===_0x52aeda)break;else _0xfddca['push'](_0xfddca['shift']());}catch(_0x164831){_0xfddca['push'](_0xfddca['shift']());}}}(a152_0x1561,0xd4ec5));function a152_0x1561(){const _0xe78004=['3GLPtaI','5027862KrzFLp','3008664YRzwxn','7762820cMzVmA','18jNqWiL','6hrMZVn','53128qebQDh','299226spVqhr','3473075kUnXLJ','8854944gqcQzz','write'];a152_0x1561=function(){return _0xe78004;};return a152_0x1561();}function a152_0xe399(_0x2b7da5,_0x1c9a60){_0x2b7da5=_0x2b7da5-0x1e9;const _0x156144=a152_0x1561();let _0xe399d8=_0x156144[_0x2b7da5];return _0xe399d8;}export const RISK_LEVEL_VALUES=['read',a152_0x52a703(0x1f3),'high-risk-write'];