@lovrabet/rabetbase-cli 2.3.4-beta.4 → 2.3.5-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 (239) 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/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.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-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/validate.js +1 -1
  50. package/lib/commands/config/get.js +1 -1
  51. package/lib/commands/config/index.js +1 -1
  52. package/lib/commands/config/list.js +1 -1
  53. package/lib/commands/config/set.js +1 -1
  54. package/lib/commands/config/shared.js +1 -1
  55. package/lib/commands/data/filter.js +1 -1
  56. package/lib/commands/data/getOne.js +1 -1
  57. package/lib/commands/data/index.js +1 -1
  58. package/lib/commands/data/shared.js +1 -1
  59. package/lib/commands/dataset/business-group-update.js +1 -1
  60. package/lib/commands/dataset/capability.js +1 -1
  61. package/lib/commands/dataset/delete.js +1 -1
  62. package/lib/commands/dataset/detail.js +1 -1
  63. package/lib/commands/dataset/extend-update.js +1 -1
  64. package/lib/commands/dataset/field-update.js +1 -1
  65. package/lib/commands/dataset/generate.js +1 -1
  66. package/lib/commands/dataset/index.js +1 -1
  67. package/lib/commands/dataset/list.js +1 -1
  68. package/lib/commands/dataset/operations.js +1 -1
  69. package/lib/commands/dataset/relation-audit.js +1 -1
  70. package/lib/commands/dataset/relation-create.js +1 -1
  71. package/lib/commands/dataset/relation-delete.js +1 -1
  72. package/lib/commands/dataset/relation-shared.js +1 -1
  73. package/lib/commands/dataset/relation-update.js +1 -1
  74. package/lib/commands/dataset/relations.js +1 -1
  75. package/lib/commands/dataset/rename.js +1 -1
  76. package/lib/commands/dataset/restore.js +1 -1
  77. package/lib/commands/db/analyze-cancel.js +1 -1
  78. package/lib/commands/db/analyze-start.js +1 -1
  79. package/lib/commands/db/analyze-status.js +1 -1
  80. package/lib/commands/db/create.js +1 -1
  81. package/lib/commands/db/delete.js +1 -1
  82. package/lib/commands/db/detail.js +1 -1
  83. package/lib/commands/db/diff.js +1 -1
  84. package/lib/commands/db/index.js +1 -1
  85. package/lib/commands/db/list.js +1 -1
  86. package/lib/commands/db/shared.js +1 -1
  87. package/lib/commands/db/tables.js +1 -1
  88. package/lib/commands/db/test.js +1 -1
  89. package/lib/commands/db/update.js +1 -1
  90. package/lib/commands/doctor.js +1 -1
  91. package/lib/commands/init/index.js +1 -1
  92. package/lib/commands/issue/index.js +1 -1
  93. package/lib/commands/issue/nudge.js +1 -1
  94. package/lib/commands/issue/report.js +1 -1
  95. package/lib/commands/issue/shared.js +1 -1
  96. package/lib/commands/logs/index.js +1 -1
  97. package/lib/commands/menu/index.js +1 -1
  98. package/lib/commands/menu/list.js +1 -1
  99. package/lib/commands/menu/shared/compare-table.js +1 -1
  100. package/lib/commands/menu/shared/index.js +1 -1
  101. package/lib/commands/menu/shared/inquirer.js +1 -1
  102. package/lib/commands/menu/shared/local-pages.js +1 -1
  103. package/lib/commands/menu/shared/logic.js +1 -1
  104. package/lib/commands/menu/shared/service.js +1 -1
  105. package/lib/commands/menu/shared/sync-core.js +1 -1
  106. package/lib/commands/menu/shared/update-core.js +1 -1
  107. package/lib/commands/menu/shared/valid-url.js +1 -1
  108. package/lib/commands/menu/sync.js +1 -1
  109. package/lib/commands/menu/update.js +1 -1
  110. package/lib/commands/page/generate-start.js +1 -1
  111. package/lib/commands/page/generate-status.js +1 -1
  112. package/lib/commands/page/index.js +1 -1
  113. package/lib/commands/page/pull.js +1 -1
  114. package/lib/commands/page/push.js +1 -1
  115. package/lib/commands/page/relation-audit.js +1 -1
  116. package/lib/commands/page/shared.js +1 -1
  117. package/lib/commands/page/standard-page-status.js +1 -1
  118. package/lib/commands/page/sync.js +1 -1
  119. package/lib/commands/permit/index.js +1 -1
  120. package/lib/commands/permit/page-get.js +1 -1
  121. package/lib/commands/permit/page-set.js +1 -1
  122. package/lib/commands/permit/role-apis-set.js +1 -1
  123. package/lib/commands/permit/role-menus-set.js +1 -1
  124. package/lib/commands/permit/role-menus.js +1 -1
  125. package/lib/commands/permit/shared.js +1 -1
  126. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  127. package/lib/commands/project/create/format-elapsed.js +1 -1
  128. package/lib/commands/project/create/main.js +1 -1
  129. package/lib/commands/project/create/non-interactive.js +1 -1
  130. package/lib/commands/project/create/project-template-path.js +1 -1
  131. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  132. package/lib/commands/project/create/use-format-code.js +1 -1
  133. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  134. package/lib/commands/project/index.js +1 -1
  135. package/lib/commands/project/init.js +1 -1
  136. package/lib/commands/project/upgrade.js +1 -1
  137. package/lib/commands/registry.js +1 -1
  138. package/lib/commands/role/create.js +1 -1
  139. package/lib/commands/role/delete.js +1 -1
  140. package/lib/commands/role/detail.js +1 -1
  141. package/lib/commands/role/index.js +1 -1
  142. package/lib/commands/role/list.js +1 -1
  143. package/lib/commands/role/shared.js +1 -1
  144. package/lib/commands/role/update.js +1 -1
  145. package/lib/commands/role/user-add.js +1 -1
  146. package/lib/commands/role/user-remove.js +1 -1
  147. package/lib/commands/role/user-resolve.js +1 -1
  148. package/lib/commands/run/index.js +1 -1
  149. package/lib/commands/schema.js +1 -1
  150. package/lib/commands/sql/create.js +1 -1
  151. package/lib/commands/sql/delete.js +1 -1
  152. package/lib/commands/sql/detail.js +1 -1
  153. package/lib/commands/sql/exec.js +1 -1
  154. package/lib/commands/sql/index.js +1 -1
  155. package/lib/commands/sql/list.js +1 -1
  156. package/lib/commands/sql/pull.js +1 -1
  157. package/lib/commands/sql/push.js +1 -1
  158. package/lib/commands/sql/save.js +1 -1
  159. package/lib/commands/sql/shared.js +1 -1
  160. package/lib/commands/sql/status.js +1 -1
  161. package/lib/commands/sql/validate.js +1 -1
  162. package/lib/commands/workspace/add.js +1 -1
  163. package/lib/commands/workspace/index.js +1 -1
  164. package/lib/commands/workspace/remove.js +1 -1
  165. package/lib/config/schema.js +1 -1
  166. package/lib/constant/cdn.js +1 -1
  167. package/lib/constant/cli.js +1 -1
  168. package/lib/constant/defaults.js +1 -1
  169. package/lib/constant/domain.js +1 -1
  170. package/lib/constant/env.js +1 -1
  171. package/lib/constant/output.js +1 -1
  172. package/lib/constant/paths.js +1 -1
  173. package/lib/constant/risk.js +1 -1
  174. package/lib/context/app-resolver.js +1 -1
  175. package/lib/context/auth-resolver.js +1 -1
  176. package/lib/context/config-loader.js +1 -1
  177. package/lib/context.js +1 -1
  178. package/lib/core/alias-resolver.js +1 -1
  179. package/lib/core/api-client.js +1 -1
  180. package/lib/core/bff/config.js +1 -1
  181. package/lib/core/bff/file-system.js +1 -1
  182. package/lib/core/bff/hash.js +1 -1
  183. package/lib/core/bff/lock.js +1 -1
  184. package/lib/core/bff/utils.js +1 -1
  185. package/lib/core/db-resolver.js +1 -1
  186. package/lib/core/page/file-system.js +1 -1
  187. package/lib/core/page/hash.js +1 -1
  188. package/lib/core/page/lock.js +1 -1
  189. package/lib/core/sql-sync/config.js +1 -1
  190. package/lib/core/sql-sync/file-system.js +1 -1
  191. package/lib/core/sql-sync/hash.js +1 -1
  192. package/lib/core/sql-sync/lock.js +1 -1
  193. package/lib/core/sql-sync/utils.js +1 -1
  194. package/lib/core/sql-validator.js +1 -1
  195. package/lib/errors.js +1 -1
  196. package/lib/framework/build-all-flags.js +1 -1
  197. package/lib/framework/flags.js +1 -1
  198. package/lib/framework/help.js +1 -1
  199. package/lib/framework/index.js +1 -1
  200. package/lib/framework/output.js +1 -1
  201. package/lib/framework/response.js +1 -1
  202. package/lib/framework/runner-alias.js +1 -1
  203. package/lib/framework/runner.js +1 -1
  204. package/lib/framework/schema-export.js +1 -1
  205. package/lib/framework/types.js +1 -1
  206. package/lib/generated/build-info.js +1 -1
  207. package/lib/help.js +1 -1
  208. package/lib/skills/main.js +1 -1
  209. package/lib/skills/npx-skills-add.js +1 -1
  210. package/lib/telemetry/cli-command-trace.js +1 -1
  211. package/lib/telemetry/cli-help-trace.js +1 -1
  212. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  213. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  214. package/lib/telemetry/send-cli-trace-log.js +1 -1
  215. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  216. package/lib/utils/ai_config.js +1 -1
  217. package/lib/utils/apply-jq-filter.js +1 -1
  218. package/lib/utils/cdn-config.js +1 -1
  219. package/lib/utils/check-sdk-version.js +1 -1
  220. package/lib/utils/cli-version-check.js +1 -1
  221. package/lib/utils/cli-version-policy.js +1 -1
  222. package/lib/utils/config.js +1 -1
  223. package/lib/utils/copy-directory.js +1 -1
  224. package/lib/utils/entity-with-id.js +1 -1
  225. package/lib/utils/file-utils.js +1 -1
  226. package/lib/utils/guides-cdn.js +1 -1
  227. package/lib/utils/http-client.js +1 -1
  228. package/lib/utils/is-non-interactive.js +1 -1
  229. package/lib/utils/logger.js +1 -1
  230. package/lib/utils/params.js +1 -1
  231. package/lib/utils/platform.js +1 -1
  232. package/lib/utils/rules-cdn.js +1 -1
  233. package/lib/utils/sleep.js +1 -1
  234. package/lib/utils/template-replacer.js +1 -1
  235. package/lib/utils/update-notice.js +1 -1
  236. package/lib/utils/version.js +1 -1
  237. package/lib/utils/with-active-cookie.js +1 -1
  238. package/lib/utils/write-cli-side-channel.js +1 -1
  239. package/package.json +1 -1
@@ -1 +1 @@
1
- const a157_0xc91b0f=a157_0x5660;(function(_0x463887,_0x170dc0){const _0x1dc419=a157_0x5660,_0x277862=_0x463887();while(!![]){try{const _0x1b57af=parseInt(_0x1dc419(0x126))/0x1+parseInt(_0x1dc419(0x140))/0x2*(parseInt(_0x1dc419(0x13b))/0x3)+parseInt(_0x1dc419(0x12d))/0x4*(parseInt(_0x1dc419(0x120))/0x5)+parseInt(_0x1dc419(0x114))/0x6+-parseInt(_0x1dc419(0x13f))/0x7*(-parseInt(_0x1dc419(0x134))/0x8)+-parseInt(_0x1dc419(0x132))/0x9+-parseInt(_0x1dc419(0x129))/0xa;if(_0x1b57af===_0x170dc0)break;else _0x277862['push'](_0x277862['shift']());}catch(_0x24281e){_0x277862['push'](_0x277862['shift']());}}}(a157_0x2c2b,0x9f33b));import{mkdir,readFile,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';function a157_0x2c2b(){const _0xbad247=['21agJroH','high-risk-write','exec','\x20pushed,\x20','4886YbDxgr','15608kgMVZD','message','No\x20local\x20SQL\x20files\x20found.','entries','lockFilePath','filePath','\x20skipped,\x20','dbDirectory','path','/smartapi/custom/updateUserCustomSql','push','.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.','sqlRoot','dbName','bool','validation','map','isFinite','appCode','utf8','remoteId','unchanged','5045628BZJFif','sqls','filter','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','join','sqlCode','lastSync','local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first','POST','\x20failed','set','toISOString','5GfnKmN','get','relativePath','length','\x22\x20for\x20sqlCode\x20','\x20SQL\x20file(s)','23329lxeqgg','sqlcode','sqlRootDir','8850740EAzPCc','Local\x20SQL\x20not\x20found:\x20','force','projectRoot','3421604ZJlBkl','Push\x20complete:\x20','hash','dbId','catch','7492725BSfbtN','startsWith','6824yoZgXK','replace','mode','sqlName','trashDir','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','str'];a157_0x2c2b=function(){return _0xbad247;};return a157_0x2c2b();}import{updateSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{getDbName,listDatabases}from'../../core/db-resolver.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{fileExists}from'../../core/bff/file-system.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildSqlLockEntry,stripLocalSqlMetadata}from'./shared.js';import{buildDbDirectoryName}from'../../core/sql-sync/utils.js';async function getTargetSqlQueries(_0x172bdf,_0x5cb435,_0x3bec68){const _0x48284a=a157_0x5660,_0x35576c=await scanLocalSqlQueries(_0x172bdf),_0x1d0d9b=new Map();for(const _0x21de04 of _0x35576c){if(_0x3bec68&&_0x21de04[_0x48284a(0x119)]!==_0x3bec68)continue;const _0x38726f=_0x1d0d9b[_0x48284a(0x121)](_0x21de04[_0x48284a(0x119)])??[];_0x38726f[_0x48284a(0x14a)](_0x21de04),_0x1d0d9b[_0x48284a(0x11e)](_0x21de04[_0x48284a(0x119)],_0x38726f);}if(_0x3bec68&&!_0x1d0d9b['has'](_0x3bec68))throw CliErrors[_0x48284a(0x10d)](_0x48284a(0x12a)+_0x3bec68);const _0x32fdb0=[];for(const [_0xc89969,_0x3188ae]of _0x1d0d9b[_0x48284a(0x143)]()){if(_0x3188ae['length']===0x1){_0x32fdb0['push'](_0x3188ae[0x0]);continue;}const _0x1a8d37=_0x5cb435[_0x48284a(0x115)][_0xc89969],_0x4ab094=_0x1a8d37?.[_0x48284a(0x148)],_0x378da1=_0x4ab094?_0x3188ae[_0x48284a(0x116)](_0x58061e=>_0x58061e[_0x48284a(0x122)]!==_0x4ab094):_0x3188ae;if(_0x1a8d37&&_0x378da1['length']===0x1){_0x32fdb0[_0x48284a(0x14a)](_0x378da1[0x0]);continue;}throw CliErrors[_0x48284a(0x10d)]('Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20'+_0xc89969+_0x48284a(0x14b));}return _0x32fdb0;}export const sqlPush={'service':'sql','command':a157_0xc91b0f(0x14a),'description':'Push\x20local\x20SQL\x20files\x20to\x20remote','risk':a157_0xc91b0f(0x13c),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a157_0xc91b0f(0x12b),'type':'boolean','description':a157_0xc91b0f(0x117)}],async 'dryRun'(_0x105948){const _0x5603de=a157_0xc91b0f,_0x55e906=loadSqlProjectConfig(_0x105948['appCode']),_0x8bf608=await readSqlLockFile(_0x55e906[_0x5603de(0x144)]),{appLock:_0x3f1b0d}=ensureSqlLockScope(_0x8bf608??createEmptySqlLock(),_0x105948[_0x5603de(0x110)],_0x55e906['sqlRoot'],'push'),_0x5dfb2e=await getTargetSqlQueries(_0x55e906,_0x3f1b0d,_0x105948[_0x5603de(0x13a)]('sqlcode')||undefined),_0x40ff2a=[];for(const _0x3a5193 of _0x5dfb2e){const _0x3060fd=await computeSqlFileHash(_0x3a5193[_0x5603de(0x145)]),_0x12c283=_0x3f1b0d['sqls'][_0x3a5193['sqlCode']],_0x229094=!!_0x12c283&&(_0x12c283[_0x5603de(0x148)]!==_0x3a5193[_0x5603de(0x122)]||!!_0x3a5193[_0x5603de(0x137)]&&_0x12c283[_0x5603de(0x137)]!==_0x3a5193['sqlName']);if(!_0x105948[_0x5603de(0x10c)](_0x5603de(0x12b))&&_0x12c283&&_0x12c283[_0x5603de(0x12f)]===_0x3060fd&&!_0x229094)continue;_0x40ff2a['push'](_0x3a5193[_0x5603de(0x119)]);}return{'method':_0x5603de(0x11c),'url':_0x5603de(0x149),'body':{'sqlCodes':_0x40ff2a,'appCode':_0x105948[_0x5603de(0x110)]},'description':'Would\x20push\x20'+_0x40ff2a['length']+_0x5603de(0x125)};},async 'execute'(_0x2fee15){const _0x31d6fb=a157_0xc91b0f,_0x671c5d=loadSqlProjectConfig(_0x2fee15['appCode']),_0x462edd=await readSqlLockFile(_0x671c5d[_0x31d6fb(0x144)]),{lockData:_0x29b41d,appLock:_0x2ab5eb}=ensureSqlLockScope(_0x462edd??createEmptySqlLock(),_0x2fee15[_0x31d6fb(0x110)],_0x671c5d[_0x31d6fb(0x14c)],_0x31d6fb(0x14a)),_0x5c00f0=await getTargetSqlQueries(_0x671c5d,_0x2ab5eb,_0x2fee15[_0x31d6fb(0x13a)](_0x31d6fb(0x127))||undefined);if(_0x5c00f0[_0x31d6fb(0x123)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x31d6fb(0x142)};const _0x308edb=[],_0x4165c2=[],_0x5b5e07=[];for(const _0x55e98c of _0x5c00f0){const _0x17691b=_0x2ab5eb[_0x31d6fb(0x115)][_0x55e98c[_0x31d6fb(0x119)]];if(!_0x17691b){_0x5b5e07['push']({'sqlCode':_0x55e98c['sqlCode'],'error':_0x31d6fb(0x11b)});continue;}try{const _0xb498de=await computeSqlFileHash(_0x55e98c[_0x31d6fb(0x145)]),_0x32b597=_0x17691b[_0x31d6fb(0x148)]!==_0x55e98c['relativePath']||!!_0x55e98c[_0x31d6fb(0x137)]&&_0x17691b[_0x31d6fb(0x137)]!==_0x55e98c[_0x31d6fb(0x137)];if(!_0x2fee15['bool']('force')&&_0x17691b[_0x31d6fb(0x12f)]===_0xb498de&&!_0x32b597){_0x4165c2['push']({'sqlCode':_0x55e98c[_0x31d6fb(0x119)],'reason':_0x31d6fb(0x113)});continue;}if(_0x17691b['version']==null){_0x5b5e07[_0x31d6fb(0x14a)]({'sqlCode':_0x55e98c[_0x31d6fb(0x119)],'error':_0x31d6fb(0x139)});continue;}const _0x43c58a=await readFile(_0x55e98c[_0x31d6fb(0x145)],_0x31d6fb(0x111)),_0x97f374=stripLocalSqlMetadata(_0x43c58a,_0x55e98c[_0x31d6fb(0x136)]),_0x3b3f34=_0x55e98c['sqlName']||_0x17691b[_0x31d6fb(0x137)],_0x403575=await resolveTargetDbBinding(_0x2fee15[_0x31d6fb(0x110)],_0x55e98c,_0x17691b),_0x3fd7e9=await updateSqlQuery({'id':_0x17691b[_0x31d6fb(0x112)],'appCode':_0x2fee15['appCode'],'sqlCode':_0x55e98c[_0x31d6fb(0x119)],'sqlName':_0x3b3f34,'dbId':_0x403575[_0x31d6fb(0x130)],'version':_0x17691b['version'],'sqlContent':_0x97f374,'sqlConfig':_0x17691b['sqlConfig']??undefined}),_0x3453da=_0x3fd7e9[_0x31d6fb(0x130)]?await getDbName(_0x2fee15[_0x31d6fb(0x110)],Number(_0x3fd7e9[_0x31d6fb(0x130)]))['catch'](()=>_0x403575[_0x31d6fb(0x10b)]):_0x403575[_0x31d6fb(0x10b)];_0x2ab5eb[_0x31d6fb(0x115)][_0x55e98c[_0x31d6fb(0x119)]]={...buildSqlLockEntry(_0x3fd7e9,_0x97f374,_0xb498de,{'dbName':_0x3453da}),'path':_0x55e98c[_0x31d6fb(0x122)],'mode':_0x17691b[_0x31d6fb(0x136)]},await archivePreviousSqlFileIfNeeded(_0x671c5d,_0x17691b[_0x31d6fb(0x148)],_0x55e98c[_0x31d6fb(0x122)]),_0x308edb[_0x31d6fb(0x14a)]({'sqlCode':_0x55e98c['sqlCode'],'remoteId':_0x17691b[_0x31d6fb(0x112)]});}catch(_0x443a5b){_0x5b5e07['push']({'sqlCode':_0x55e98c[_0x31d6fb(0x119)],'error':_0x443a5b instanceof Error?_0x443a5b[_0x31d6fb(0x141)]:String(_0x443a5b)});}}return _0x2ab5eb[_0x31d6fb(0x11a)]=new Date()[_0x31d6fb(0x11f)](),await writeSqlLockFile(_0x671c5d[_0x31d6fb(0x144)],_0x29b41d),{'ok':_0x5b5e07[_0x31d6fb(0x123)]===0x0,'data':{'pushed':_0x308edb,'skipped':_0x4165c2,'failed':_0x5b5e07},'message':_0x31d6fb(0x12e)+_0x308edb[_0x31d6fb(0x123)]+_0x31d6fb(0x13e)+_0x4165c2['length']+_0x31d6fb(0x146)+_0x5b5e07[_0x31d6fb(0x123)]+_0x31d6fb(0x11d)};}};async function archivePreviousSqlFileIfNeeded(_0x574c1e,_0x1e8217,_0xe1abaa){const _0x47b845=a157_0xc91b0f;if(!_0x1e8217||_0x1e8217===_0xe1abaa)return;const _0x5cf931=join(_0x574c1e[_0x47b845(0x128)],_0x1e8217);if(!await fileExists(_0x5cf931))return;const _0x106b57=await moveToTrash(_0x574c1e[_0x47b845(0x12c)],_0x574c1e[_0x47b845(0x138)],_0x5cf931);await cleanupEmptyDirectories(dirname(_0x5cf931),_0x574c1e[_0x47b845(0x128)]),void _0x106b57;}function a157_0x5660(_0x4aa85b,_0x1d6862){_0x4aa85b=_0x4aa85b-0x10b;const _0x2c2b8f=a157_0x2c2b();let _0x5660ed=_0x2c2b8f[_0x4aa85b];return _0x5660ed;}async function moveToTrash(_0x146819,_0x167f42,_0x4b76f5){const _0x2f28fc=a157_0xc91b0f,_0x6776da=new Date()['toISOString']()[_0x2f28fc(0x135)](/[:.]/g,'-'),_0x334844=relative(_0x146819,_0x4b76f5),_0x306fa9=join(_0x167f42,_0x6776da,_0x334844);return await mkdir(dirname(_0x306fa9),{'recursive':!![]}),await rename(_0x4b76f5,_0x306fa9),_0x306fa9;}async function cleanupEmptyDirectories(_0x2baeb5,_0x540ebf){const _0x7a01ce=a157_0xc91b0f;let _0x2492e5=resolve(_0x2baeb5);const _0x2fd386=resolve(_0x540ebf);while(_0x2492e5[_0x7a01ce(0x133)](''+_0x2fd386+sep)||_0x2492e5===_0x2fd386){if(_0x2492e5===_0x2fd386)return;try{const _0x3c1c21=await readdir(_0x2492e5);if(_0x3c1c21[_0x7a01ce(0x123)]>0x0)return;await rmdir(_0x2492e5);}catch{return;}_0x2492e5=dirname(_0x2492e5);}}async function resolveTargetDbBinding(_0x2bbdd8,_0x2be121,_0x1ad3be){const _0x1aed20=a157_0xc91b0f,_0x4be6ca=_0x2be121[_0x1aed20(0x147)];if(!_0x4be6ca)return{'dbId':_0x1ad3be[_0x1aed20(0x130)],'dbName':_0x1ad3be[_0x1aed20(0x10b)]};const _0x416c49=buildDbDirectoryName(_0x1ad3be[_0x1aed20(0x10b)],_0x1ad3be[_0x1aed20(0x130)]);if(_0x4be6ca===_0x416c49)return{'dbId':_0x1ad3be[_0x1aed20(0x130)],'dbName':_0x1ad3be[_0x1aed20(0x10b)]};const _0x3dadf3=parseExplicitDbDirectory(_0x4be6ca);if(_0x3dadf3!=null)return{'dbId':_0x3dadf3,'dbName':await getDbName(_0x2bbdd8,_0x3dadf3)[_0x1aed20(0x131)](()=>undefined)};const _0x3610e1=await listDatabases(_0x2bbdd8),_0x4f8eda=_0x3610e1['filter'](_0x199dda=>buildDbDirectoryName(_0x199dda[_0x1aed20(0x10b)],_0x199dda[_0x1aed20(0x130)])===_0x4be6ca);if(_0x4f8eda['length']===0x1)return{'dbId':_0x4f8eda[0x0][_0x1aed20(0x130)],'dbName':_0x4f8eda[0x0][_0x1aed20(0x10b)]};if(_0x4f8eda[_0x1aed20(0x123)]===0x0)throw CliErrors[_0x1aed20(0x10d)]('No\x20database\x20matches\x20local\x20directory\x20\x22'+_0x4be6ca+_0x1aed20(0x124)+_0x2be121[_0x1aed20(0x119)]+'.');const _0xdebce6=_0x4f8eda[_0x1aed20(0x10e)](_0x3ed967=>_0x3ed967[_0x1aed20(0x10b)]+'\x20('+_0x3ed967[_0x1aed20(0x130)]+')')[_0x1aed20(0x118)](',\x20');throw CliErrors[_0x1aed20(0x10d)]('Local\x20directory\x20\x22'+_0x4be6ca+'\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20'+_0x2be121['sqlCode']+':\x20'+_0xdebce6);}function parseExplicitDbDirectory(_0x7de341){const _0xa7f16f=a157_0xc91b0f,_0x5d6da8=/^db-(\d+)$/[_0xa7f16f(0x13d)](_0x7de341);if(!_0x5d6da8)return null;const _0xd21720=Number(_0x5d6da8[0x1]);return Number[_0xa7f16f(0x10f)](_0xd21720)&&_0xd21720>0x0?_0xd21720:null;}
1
+ const a157_0x212957=a157_0x5b4c;(function(_0x266177,_0xb6001a){const _0x5ac7e6=a157_0x5b4c,_0x4504c3=_0x266177();while(!![]){try{const _0x453a51=parseInt(_0x5ac7e6(0xa9))/0x1+parseInt(_0x5ac7e6(0x9a))/0x2+parseInt(_0x5ac7e6(0x9f))/0x3+-parseInt(_0x5ac7e6(0x8b))/0x4*(-parseInt(_0x5ac7e6(0x8c))/0x5)+parseInt(_0x5ac7e6(0xb1))/0x6+parseInt(_0x5ac7e6(0x95))/0x7+-parseInt(_0x5ac7e6(0xb3))/0x8;if(_0x453a51===_0xb6001a)break;else _0x4504c3['push'](_0x4504c3['shift']());}catch(_0x5819b6){_0x4504c3['push'](_0x4504c3['shift']());}}}(a157_0x4323,0x70e10));import{mkdir,readFile,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{updateSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{getDbName,listDatabases}from'../../core/db-resolver.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{fileExists}from'../../core/bff/file-system.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildSqlLockEntry,stripLocalSqlMetadata}from'./shared.js';function a157_0x5b4c(_0x4eeec1,_0x5b9d37){_0x4eeec1=_0x4eeec1-0x80;const _0x43233e=a157_0x4323();let _0x5b4c59=_0x43233e[_0x4eeec1];return _0x5b4c59;}import{buildDbDirectoryName}from'../../core/sql-sync/utils.js';async function getTargetSqlQueries(_0xc1effe,_0x1f6953,_0x3f8f82){const _0x2bef2d=a157_0x5b4c,_0x2a36c9=await scanLocalSqlQueries(_0xc1effe),_0x60caec=new Map();for(const _0x692477 of _0x2a36c9){if(_0x3f8f82&&_0x692477['sqlCode']!==_0x3f8f82)continue;const _0x597faa=_0x60caec[_0x2bef2d(0xb6)](_0x692477['sqlCode'])??[];_0x597faa[_0x2bef2d(0xab)](_0x692477),_0x60caec['set'](_0x692477[_0x2bef2d(0xb4)],_0x597faa);}if(_0x3f8f82&&!_0x60caec[_0x2bef2d(0xa7)](_0x3f8f82))throw CliErrors[_0x2bef2d(0x89)](_0x2bef2d(0x84)+_0x3f8f82);const _0xc98683=[];for(const [_0x1a54e3,_0x54116e]of _0x60caec[_0x2bef2d(0x87)]()){if(_0x54116e['length']===0x1){_0xc98683[_0x2bef2d(0xab)](_0x54116e[0x0]);continue;}const _0x3fcd36=_0x1f6953[_0x2bef2d(0x8d)][_0x1a54e3],_0x5b6857=_0x3fcd36?.[_0x2bef2d(0x90)],_0xb5adc7=_0x5b6857?_0x54116e[_0x2bef2d(0x83)](_0x3b08b3=>_0x3b08b3['relativePath']!==_0x5b6857):_0x54116e;if(_0x3fcd36&&_0xb5adc7[_0x2bef2d(0xa1)]===0x1){_0xc98683[_0x2bef2d(0xab)](_0xb5adc7[0x0]);continue;}throw CliErrors[_0x2bef2d(0x89)]('Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20'+_0x1a54e3+'.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.');}return _0xc98683;}export const sqlPush={'service':'sql','command':a157_0x212957(0xab),'description':a157_0x212957(0x96),'risk':a157_0x212957(0xbf),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a157_0x212957(0x81),'type':a157_0x212957(0x94),'description':'Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock'}],async 'dryRun'(_0x1611b9){const _0xa0ab4d=a157_0x212957,_0x402bd3=loadSqlProjectConfig(_0x1611b9[_0xa0ab4d(0xba)]),_0x44210c=await readSqlLockFile(_0x402bd3[_0xa0ab4d(0x82)]),{appLock:_0x4af2ae}=ensureSqlLockScope(_0x44210c??createEmptySqlLock(),_0x1611b9[_0xa0ab4d(0xba)],_0x402bd3[_0xa0ab4d(0xc1)],_0xa0ab4d(0xab)),_0x2f7f14=await getTargetSqlQueries(_0x402bd3,_0x4af2ae,_0x1611b9[_0xa0ab4d(0x91)](_0xa0ab4d(0xa8))||undefined),_0x2acc6d=[];for(const _0x2cd829 of _0x2f7f14){const _0x54a903=await computeSqlFileHash(_0x2cd829[_0xa0ab4d(0x9c)]),_0x43edb0=_0x4af2ae['sqls'][_0x2cd829[_0xa0ab4d(0xb4)]],_0x95163e=!!_0x43edb0&&(_0x43edb0[_0xa0ab4d(0x90)]!==_0x2cd829[_0xa0ab4d(0xa6)]||!!_0x2cd829[_0xa0ab4d(0xac)]&&_0x43edb0[_0xa0ab4d(0xac)]!==_0x2cd829[_0xa0ab4d(0xac)]);if(!_0x1611b9[_0xa0ab4d(0x86)](_0xa0ab4d(0x81))&&_0x43edb0&&_0x43edb0[_0xa0ab4d(0x85)]===_0x54a903&&!_0x95163e)continue;_0x2acc6d['push'](_0x2cd829['sqlCode']);}return{'method':_0xa0ab4d(0x8e),'url':_0xa0ab4d(0xb5),'body':{'sqlCodes':_0x2acc6d,'appCode':_0x1611b9[_0xa0ab4d(0xba)]},'description':_0xa0ab4d(0x93)+_0x2acc6d['length']+'\x20SQL\x20file(s)'};},async 'execute'(_0x389e06){const _0x520712=a157_0x212957,_0x58a473=loadSqlProjectConfig(_0x389e06[_0x520712(0xba)]),_0x2495c3=await readSqlLockFile(_0x58a473['lockFilePath']),{lockData:_0x395dd0,appLock:_0x150276}=ensureSqlLockScope(_0x2495c3??createEmptySqlLock(),_0x389e06[_0x520712(0xba)],_0x58a473[_0x520712(0xc1)],'push'),_0x4365f6=await getTargetSqlQueries(_0x58a473,_0x150276,_0x389e06[_0x520712(0x91)](_0x520712(0xa8))||undefined);if(_0x4365f6[_0x520712(0xa1)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x520712(0xc0)};const _0x2c10df=[],_0x5f2ed4=[],_0x2c7a2a=[];for(const _0x2f8364 of _0x4365f6){const _0x1b74c7=_0x150276[_0x520712(0x8d)][_0x2f8364[_0x520712(0xb4)]];if(!_0x1b74c7){_0x2c7a2a[_0x520712(0xab)]({'sqlCode':_0x2f8364[_0x520712(0xb4)],'error':'local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first'});continue;}try{const _0x381453=await computeSqlFileHash(_0x2f8364['filePath']),_0x8d298f=_0x1b74c7[_0x520712(0x90)]!==_0x2f8364[_0x520712(0xa6)]||!!_0x2f8364[_0x520712(0xac)]&&_0x1b74c7['sqlName']!==_0x2f8364[_0x520712(0xac)];if(!_0x389e06[_0x520712(0x86)](_0x520712(0x81))&&_0x1b74c7['hash']===_0x381453&&!_0x8d298f){_0x5f2ed4['push']({'sqlCode':_0x2f8364[_0x520712(0xb4)],'reason':_0x520712(0x9b)});continue;}if(_0x1b74c7['version']==null){_0x2c7a2a[_0x520712(0xab)]({'sqlCode':_0x2f8364['sqlCode'],'error':_0x520712(0xb2)});continue;}const _0x49382c=await readFile(_0x2f8364[_0x520712(0x9c)],_0x520712(0xad)),_0x292042=stripLocalSqlMetadata(_0x49382c,_0x2f8364[_0x520712(0xa2)]),_0x495018=_0x2f8364[_0x520712(0xac)]||_0x1b74c7[_0x520712(0xac)],_0x32fcd2=await resolveTargetDbBinding(_0x389e06[_0x520712(0xba)],_0x2f8364,_0x1b74c7),_0x559494=await updateSqlQuery({'id':_0x1b74c7[_0x520712(0xbd)],'appCode':_0x389e06['appCode'],'sqlCode':_0x2f8364['sqlCode'],'sqlName':_0x495018,'dbId':_0x32fcd2[_0x520712(0xb9)],'version':_0x1b74c7[_0x520712(0x88)],'sqlContent':_0x292042,'sqlConfig':_0x1b74c7[_0x520712(0xa5)]??undefined}),_0x1cec96=_0x559494[_0x520712(0xb9)]?await getDbName(_0x389e06[_0x520712(0xba)],Number(_0x559494[_0x520712(0xb9)]))[_0x520712(0xb0)](()=>_0x32fcd2[_0x520712(0xa3)]):_0x32fcd2['dbName'];_0x150276[_0x520712(0x8d)][_0x2f8364[_0x520712(0xb4)]]={...buildSqlLockEntry(_0x559494,_0x292042,_0x381453,{'dbName':_0x1cec96}),'path':_0x2f8364[_0x520712(0xa6)],'mode':_0x1b74c7[_0x520712(0xa2)]},await archivePreviousSqlFileIfNeeded(_0x58a473,_0x1b74c7['path'],_0x2f8364['relativePath']),_0x2c10df['push']({'sqlCode':_0x2f8364[_0x520712(0xb4)],'remoteId':_0x1b74c7[_0x520712(0xbd)]});}catch(_0x11a39c){_0x2c7a2a[_0x520712(0xab)]({'sqlCode':_0x2f8364['sqlCode'],'error':_0x11a39c instanceof Error?_0x11a39c[_0x520712(0x8f)]:String(_0x11a39c)});}}return _0x150276[_0x520712(0xbc)]=new Date()[_0x520712(0xa0)](),await writeSqlLockFile(_0x58a473[_0x520712(0x82)],_0x395dd0),{'ok':_0x2c7a2a[_0x520712(0xa1)]===0x0,'data':{'pushed':_0x2c10df,'skipped':_0x5f2ed4,'failed':_0x2c7a2a},'message':_0x520712(0x97)+_0x2c10df[_0x520712(0xa1)]+'\x20pushed,\x20'+_0x5f2ed4['length']+_0x520712(0xaf)+_0x2c7a2a[_0x520712(0xa1)]+_0x520712(0xb8)};}};async function archivePreviousSqlFileIfNeeded(_0x52aff2,_0xdd4faa,_0x195849){const _0x4409cc=a157_0x212957;if(!_0xdd4faa||_0xdd4faa===_0x195849)return;const _0x4367ff=join(_0x52aff2['sqlRootDir'],_0xdd4faa);if(!await fileExists(_0x4367ff))return;const _0xfa7c7a=await moveToTrash(_0x52aff2[_0x4409cc(0x98)],_0x52aff2[_0x4409cc(0x99)],_0x4367ff);await cleanupEmptyDirectories(dirname(_0x4367ff),_0x52aff2[_0x4409cc(0x9d)]),void _0xfa7c7a;}async function moveToTrash(_0xa7450f,_0x3226bd,_0x1dc788){const _0x42e9db=a157_0x212957,_0x2b8de0=new Date()['toISOString']()[_0x42e9db(0xb7)](/[:.]/g,'-'),_0x4e62bb=relative(_0xa7450f,_0x1dc788),_0x2b8998=join(_0x3226bd,_0x2b8de0,_0x4e62bb);return await mkdir(dirname(_0x2b8998),{'recursive':!![]}),await rename(_0x1dc788,_0x2b8998),_0x2b8998;}async function cleanupEmptyDirectories(_0x30a03e,_0x2e5286){const _0x41fa63=a157_0x212957;let _0x2bbc17=resolve(_0x30a03e);const _0x23189d=resolve(_0x2e5286);while(_0x2bbc17[_0x41fa63(0xaa)](''+_0x23189d+sep)||_0x2bbc17===_0x23189d){if(_0x2bbc17===_0x23189d)return;try{const _0xa06fad=await readdir(_0x2bbc17);if(_0xa06fad[_0x41fa63(0xa1)]>0x0)return;await rmdir(_0x2bbc17);}catch{return;}_0x2bbc17=dirname(_0x2bbc17);}}async function resolveTargetDbBinding(_0x25ce37,_0x12bf2b,_0x1a5ae6){const _0x23dae3=a157_0x212957,_0x416f12=_0x12bf2b[_0x23dae3(0xae)];if(!_0x416f12)return{'dbId':_0x1a5ae6['dbId'],'dbName':_0x1a5ae6[_0x23dae3(0xa3)]};const _0x28a051=buildDbDirectoryName(_0x1a5ae6[_0x23dae3(0xa3)],_0x1a5ae6[_0x23dae3(0xb9)]);if(_0x416f12===_0x28a051)return{'dbId':_0x1a5ae6[_0x23dae3(0xb9)],'dbName':_0x1a5ae6['dbName']};const _0x25d5d2=parseExplicitDbDirectory(_0x416f12);if(_0x25d5d2!=null)return{'dbId':_0x25d5d2,'dbName':await getDbName(_0x25ce37,_0x25d5d2)[_0x23dae3(0xb0)](()=>undefined)};const _0x3aa1f2=await listDatabases(_0x25ce37),_0x5f2cb7=_0x3aa1f2['filter'](_0x5c3159=>buildDbDirectoryName(_0x5c3159['dbName'],_0x5c3159[_0x23dae3(0xb9)])===_0x416f12);if(_0x5f2cb7['length']===0x1)return{'dbId':_0x5f2cb7[0x0][_0x23dae3(0xb9)],'dbName':_0x5f2cb7[0x0][_0x23dae3(0xa3)]};if(_0x5f2cb7[_0x23dae3(0xa1)]===0x0)throw CliErrors[_0x23dae3(0x89)]('No\x20database\x20matches\x20local\x20directory\x20\x22'+_0x416f12+_0x23dae3(0x92)+_0x12bf2b['sqlCode']+'.');const _0x2193e9=_0x5f2cb7[_0x23dae3(0x8a)](_0x1b9e06=>_0x1b9e06[_0x23dae3(0xa3)]+'\x20('+_0x1b9e06['dbId']+')')[_0x23dae3(0xbb)](',\x20');throw CliErrors[_0x23dae3(0x89)](_0x23dae3(0xa4)+_0x416f12+_0x23dae3(0x80)+_0x12bf2b[_0x23dae3(0xb4)]+':\x20'+_0x2193e9);}function parseExplicitDbDirectory(_0x2cfecc){const _0x31eb7a=a157_0x212957,_0x724348=/^db-(\d+)$/[_0x31eb7a(0xbe)](_0x2cfecc);if(!_0x724348)return null;const _0x55951a=Number(_0x724348[0x1]);return Number[_0x31eb7a(0x9e)](_0x55951a)&&_0x55951a>0x0?_0x55951a:null;}function a157_0x4323(){const _0x506fee=['exec','high-risk-write','No\x20local\x20SQL\x20files\x20found.','sqlRoot','\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20','force','lockFilePath','filter','Local\x20SQL\x20not\x20found:\x20','hash','bool','entries','version','validation','map','1808nTKZgH','4495fNtLzp','sqls','POST','message','path','str','\x22\x20for\x20sqlCode\x20','Would\x20push\x20','boolean','3232985qSTnXo','Push\x20local\x20SQL\x20files\x20to\x20remote','Push\x20complete:\x20','projectRoot','trashDir','250428PWWphP','unchanged','filePath','sqlRootDir','isFinite','2245110NQLHOP','toISOString','length','mode','dbName','Local\x20directory\x20\x22','sqlConfig','relativePath','has','sqlcode','876571llbTAn','startsWith','push','sqlName','utf8','dbDirectory','\x20skipped,\x20','catch','4766346iwJgBk','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','23603176GsjiaC','sqlCode','/smartapi/custom/updateUserCustomSql','get','replace','\x20failed','dbId','appCode','join','lastSync','remoteId'];a157_0x4323=function(){return _0x506fee;};return a157_0x4323();}
@@ -1 +1 @@
1
- const a158_0x5d44ba=a158_0x28f5;(function(_0xb74e0c,_0x296ffb){const _0x177f3e=a158_0x28f5,_0x105ae2=_0xb74e0c();while(!![]){try{const _0x293913=parseInt(_0x177f3e(0xfd))/0x1+parseInt(_0x177f3e(0xf6))/0x2*(-parseInt(_0x177f3e(0xf7))/0x3)+parseInt(_0x177f3e(0xf8))/0x4+parseInt(_0x177f3e(0x105))/0x5*(parseInt(_0x177f3e(0x100))/0x6)+-parseInt(_0x177f3e(0x103))/0x7+-parseInt(_0x177f3e(0xf0))/0x8*(parseInt(_0x177f3e(0x101))/0x9)+parseInt(_0x177f3e(0xee))/0xa*(parseInt(_0x177f3e(0xf5))/0xb);if(_0x293913===_0x296ffb)break;else _0x105ae2['push'](_0x105ae2['shift']());}catch(_0x1b5830){_0x105ae2['push'](_0x105ae2['shift']());}}}(a158_0x2dcb,0x5889f));import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const SQL_SAVE_DEPRECATED_HINT=['`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.','Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.',a158_0x5d44ba(0x102)]['join']('\x0a');function a158_0x28f5(_0x496165,_0x41cf7e){_0x496165=_0x496165-0xed;const _0x2dcbf3=a158_0x2dcb();let _0x28f50f=_0x2dcbf3[_0x496165];return _0x28f50f;}export const sqlSave={'service':a158_0x5d44ba(0xfa),'command':a158_0x5d44ba(0x104),'description':a158_0x5d44ba(0xf2),'risk':a158_0x5d44ba(0xfb),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a158_0x5d44ba(0xef),'type':'string','required':!![],'description':a158_0x5d44ba(0xfc)},SQLCODE_FLAG_OPTIONAL,{'name':a158_0x5d44ba(0xf4),'type':a158_0x5d44ba(0xf1),'description':a158_0x5d44ba(0xf9)},{'name':'db','type':a158_0x5d44ba(0xf1),'description':a158_0x5d44ba(0xf3)},{'name':a158_0x5d44ba(0xff),'type':a158_0x5d44ba(0xf1),'description':a158_0x5d44ba(0xed)}],async 'validate'(){const _0x40e04f=a158_0x5d44ba;throw CliErrors[_0x40e04f(0xfe)](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){const _0x260e4c=a158_0x5d44ba;throw CliErrors[_0x260e4c(0xfe)](SQL_SAVE_DEPRECATED_HINT);}};function a158_0x2dcb(){const _0x5ce395=['2017372NjoRKE','SQL\x20query\x20display\x20name','sql','write','Path\x20to\x20the\x20SQL\x20file','307019OOlfuD','validation','description','1260KyLscc','6016257iJHZAL','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`.','466921fXUXEm','save','13595SHLlLu','Query\x20description','30yeNQqx','file','8gMPUHi','string','Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','sqlname','1450713gVYkKe','170UUphaW','24006xyrmPw'];a158_0x2dcb=function(){return _0x5ce395;};return a158_0x2dcb();}
1
+ function a158_0x1632(_0x5cc9c1,_0x5b60fb){_0x5cc9c1=_0x5cc9c1-0x1af;const _0x59dec0=a158_0x59de();let _0x163203=_0x59dec0[_0x5cc9c1];return _0x163203;}const a158_0x2a423d=a158_0x1632;(function(_0x5446f3,_0x4f7cc5){const _0x5cbe39=a158_0x1632,_0x5a162f=_0x5446f3();while(!![]){try{const _0x3ada87=parseInt(_0x5cbe39(0x1b2))/0x1+-parseInt(_0x5cbe39(0x1bc))/0x2+-parseInt(_0x5cbe39(0x1b7))/0x3+-parseInt(_0x5cbe39(0x1c3))/0x4*(parseInt(_0x5cbe39(0x1b4))/0x5)+-parseInt(_0x5cbe39(0x1b5))/0x6+parseInt(_0x5cbe39(0x1b9))/0x7+parseInt(_0x5cbe39(0x1c4))/0x8;if(_0x3ada87===_0x4f7cc5)break;else _0x5a162f['push'](_0x5a162f['shift']());}catch(_0x18cab6){_0x5a162f['push'](_0x5a162f['shift']());}}}(a158_0x59de,0xc0b03));import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a158_0x59de(){const _0x283381=['write','Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','2528660cqgCVj','23685968ckklAW','Query\x20description','save','`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.','806409KokUSh','SQL\x20query\x20display\x20name','5kgpIec','7301826strltx','sqlname','2548305XZJjnZ','sql','4677337kiohhi','string','Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.','1895048eZBNtS','Path\x20to\x20the\x20SQL\x20file','validation','file'];a158_0x59de=function(){return _0x283381;};return a158_0x59de();}const SQL_SAVE_DEPRECATED_HINT=[a158_0x2a423d(0x1b1),a158_0x2a423d(0x1bb),'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']('\x0a');export const sqlSave={'service':a158_0x2a423d(0x1b8),'command':a158_0x2a423d(0x1b0),'description':a158_0x2a423d(0x1c1),'risk':a158_0x2a423d(0x1c0),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a158_0x2a423d(0x1bf),'type':'string','required':!![],'description':a158_0x2a423d(0x1bd)},SQLCODE_FLAG_OPTIONAL,{'name':a158_0x2a423d(0x1b6),'type':'string','description':a158_0x2a423d(0x1b3)},{'name':'db','type':a158_0x2a423d(0x1ba),'description':a158_0x2a423d(0x1c2)},{'name':'description','type':a158_0x2a423d(0x1ba),'description':a158_0x2a423d(0x1af)}],async 'validate'(){const _0x4f35d7=a158_0x2a423d;throw CliErrors[_0x4f35d7(0x1be)](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){throw CliErrors['validation'](SQL_SAVE_DEPRECATED_HINT);}};
@@ -1 +1 @@
1
- const a159_0x950f22=a159_0x2bd1;(function(_0x1711eb,_0x571333){const _0x30822c=a159_0x2bd1,_0xc38d23=_0x1711eb();while(!![]){try{const _0x7aff85=parseInt(_0x30822c(0x141))/0x1+parseInt(_0x30822c(0x133))/0x2*(parseInt(_0x30822c(0x138))/0x3)+-parseInt(_0x30822c(0x13a))/0x4+parseInt(_0x30822c(0x14f))/0x5*(parseInt(_0x30822c(0x151))/0x6)+parseInt(_0x30822c(0x145))/0x7*(parseInt(_0x30822c(0x13d))/0x8)+parseInt(_0x30822c(0x13c))/0x9*(-parseInt(_0x30822c(0x139))/0xa)+-parseInt(_0x30822c(0x137))/0xb;if(_0x7aff85===_0x571333)break;else _0xc38d23['push'](_0xc38d23['shift']());}catch(_0x2d1851){_0xc38d23['push'](_0xc38d23['shift']());}}}(a159_0x204a,0xdc8c9));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=a159_0x950f22(0x140);export function buildSqlLockEntry(_0x186828,_0x3b43e9,_0x25db01,_0x454674){const _0x3875b7=a159_0x950f22,_0x52d7b6=detectSqlMode(_0x3b43e9);return{'path':buildSqlRelativePath(_0x186828['sqlCode'],_0x186828[_0x3875b7(0x12d)],_0x454674?.['dbName'],_0x52d7b6,_0x186828[_0x3875b7(0x156)]),'hash':_0x25db01,'remoteId':_0x186828['id'],'version':_0x186828[_0x3875b7(0x152)],'dbId':Number(_0x186828[_0x3875b7(0x156)]),'dbName':_0x454674?.[_0x3875b7(0x154)],'sqlName':_0x186828[_0x3875b7(0x12d)],'sqlConfig':_0x186828[_0x3875b7(0x135)]??undefined,'mode':_0x52d7b6};}export function cloneSqlLockData(_0x531865){const _0x1f2649=a159_0x950f22;return{'apps':Object['fromEntries'](Object['entries'](_0x531865[_0x1f2649(0x148)])[_0x1f2649(0x146)](([_0x46b458,_0x257e25])=>[_0x46b458,{'sqlRoot':_0x257e25[_0x1f2649(0x149)],'lastSync':_0x257e25[_0x1f2649(0x143)],'sqls':{..._0x257e25['sqls']}}]))};}export function ensureRemoteSqlContent(_0x1f6c31){return _0x1f6c31['sqlContent']??'';}export function buildLocalSqlFileContent(_0x476e13,_0x2c6dbe,_0x41c3ef){const _0x10eb58=a159_0x950f22,_0x4c538d=_0x41c3ef?.['mode']??detectSqlMode(_0x2c6dbe),_0x5519cb=stripLocalSqlMetadata(_0x2c6dbe,_0x4c538d)[_0x10eb58(0x150)](),_0x19c22c=[...buildMetadataHeaderLines({'sqlCode':_0x476e13[_0x10eb58(0x130)],'sqlName':_0x476e13[_0x10eb58(0x12d)],'dbId':_0x476e13[_0x10eb58(0x156)],'dbName':_0x41c3ef?.[_0x10eb58(0x154)],'mode':_0x4c538d,'syncedAt':_0x41c3ef?.[_0x10eb58(0x14b)],'description':_0x41c3ef?.[_0x10eb58(0x144)]},_0x4c538d),'',_0x5519cb],_0x51f0cd=_0x19c22c[_0x10eb58(0x157)]('\x0a');return _0x51f0cd[_0x10eb58(0x153)]('\x0a')?_0x51f0cd:_0x51f0cd+'\x0a';}export function stripLocalSqlMetadata(_0x23f45b,_0x2b28d6){const _0x14ce3d=a159_0x950f22,_0x5412e5=_0x23f45b['replace'](/\r\n/g,'\x0a')[_0x14ce3d(0x12e)]('\x0a'),_0xa5d44e=[];let _0x3f0488=0x0;if(_0x2b28d6===_0x14ce3d(0x136))while(_0x3f0488<_0x5412e5[_0x14ce3d(0x142)]){const _0x12299b=_0x5412e5[_0x3f0488]??'';if(/^\s*<!--\s*@lovrabet\./['test'](_0x12299b)){_0x3f0488++;continue;}if(_0x12299b[_0x14ce3d(0x150)]()===''&&_0x3f0488>0x0){_0x3f0488++;continue;}break;}else while(_0x3f0488<_0x5412e5[_0x14ce3d(0x142)]){const _0x4c7d9c=_0x5412e5[_0x3f0488]??'';if(/^\s*--\s*@lovrabet\./[_0x14ce3d(0x13b)](_0x4c7d9c)){_0x3f0488++;continue;}if(_0x4c7d9c['trim']()===''&&_0x3f0488>0x0){_0x3f0488++;continue;}break;}for(;_0x3f0488<_0x5412e5[_0x14ce3d(0x142)];_0x3f0488++){_0xa5d44e[_0x14ce3d(0x12f)](_0x5412e5[_0x3f0488]);}return _0xa5d44e[_0x14ce3d(0x157)]('\x0a')[_0x14ce3d(0x14a)]();}function a159_0x2bd1(_0x4f68da,_0x3eca0b){_0x4f68da=_0x4f68da-0x12d;const _0x204ac1=a159_0x204a();let _0x2bd176=_0x204ac1[_0x4f68da];return _0x2bd176;}export function resolveSqlMode(_0x3ada84,_0x5036c2){const _0x29fa20=a159_0x950f22;if(_0x5036c2?.[_0x29fa20(0x155)])return _0x5036c2['mode'];return detectSqlMode(_0x3ada84);}export function resolveSqlFileName(_0x7c5472,_0x516fd4,_0x4676f3){const _0x5f5a58=a159_0x950f22;if(_0x4676f3?.[_0x5f5a58(0x159)])return _0x4676f3[_0x5f5a58(0x159)];if(_0x4676f3?.[_0x5f5a58(0x12d)]||_0x4676f3?.['dbName'])return buildSqlRelativePath(_0x7c5472,_0x4676f3?.['sqlName'],_0x4676f3?.['dbName'],resolveSqlMode(_0x516fd4,_0x4676f3),_0x4676f3?.[_0x5f5a58(0x156)]);return buildDefaultSqlFileName(_0x7c5472,resolveSqlMode(_0x516fd4,_0x4676f3));}export function resolveSqlLocalDir(_0x5a3a8d,_0x4c748c){return join(_0x5a3a8d,SQL_LOCAL_REL_DIR,_0x4c748c);}export async function confirmForceOverwrite(_0x3409b6){const _0x366952=a159_0x950f22,_0x459b1e=createInterface({'input':process[_0x366952(0x147)],'output':process[_0x366952(0x131)]}),_0x27af29=await new Promise(_0x520ee5=>{const _0x1ba656=_0x366952;_0x459b1e[_0x1ba656(0x13f)](_0x3409b6+'\x20[y/N]\x20',_0x520ee5);});return _0x459b1e[_0x366952(0x132)](),['y',_0x366952(0x14d)][_0x366952(0x13e)](_0x27af29[_0x366952(0x150)]()[_0x366952(0x14c)]());}export function findSqlLockScope(_0x50290c,_0x9c8f13){const _0x478fd7=a159_0x950f22;return _0x50290c[_0x478fd7(0x148)][_0x9c8f13];}function a159_0x204a(){const _0x45eb6c=['--\x20@lovrabet.','path','sqlName','split','push','sqlCode','stderr','close','2lMkqBy','\x20-->','sqlConfig','mybatisXml','17005043JUBFrB','4306062BAuqEt','4142780klPTnl','6582980QRuMOD','test','27gVDNSY','48136LcAUFR','includes','question','.rabetbase/sql','1237470ehXmLL','length','lastSync','description','2009EQxchH','map','stdin','apps','sqlRoot','trimStart','syncedAt','toLowerCase','yes','filter','180415pPIwIM','trim','156XGXPdN','version','endsWith','dbName','mode','dbId','join'];a159_0x204a=function(){return _0x45eb6c;};return a159_0x204a();}function buildMetadataHeaderLines(_0x3d29cf,_0x4958b3){const _0x24f48e=a159_0x950f22,_0x14da45=[['sqlCode',_0x3d29cf[_0x24f48e(0x130)]],[_0x24f48e(0x12d),_0x3d29cf[_0x24f48e(0x12d)]],['dbId',_0x3d29cf[_0x24f48e(0x156)]],['dbName',_0x3d29cf[_0x24f48e(0x154)]],['mode',_0x3d29cf[_0x24f48e(0x155)]],[_0x24f48e(0x14b),_0x3d29cf[_0x24f48e(0x14b)]],[_0x24f48e(0x144),_0x3d29cf[_0x24f48e(0x144)]]];if(_0x4958b3===_0x24f48e(0x136))return _0x14da45[_0x24f48e(0x14e)](([,_0x59b805])=>_0x59b805!==undefined&&_0x59b805!==null&&String(_0x59b805)[_0x24f48e(0x150)]()!=='')[_0x24f48e(0x146)](([_0x4c351a,_0x3d8993])=>'<!--\x20@lovrabet.'+_0x4c351a+':\x20'+String(_0x3d8993)+_0x24f48e(0x134));return _0x14da45[_0x24f48e(0x14e)](([,_0x5dfd88])=>_0x5dfd88!==undefined&&_0x5dfd88!==null&&String(_0x5dfd88)[_0x24f48e(0x150)]()!=='')['map'](([_0x1d6064,_0x345dc8])=>_0x24f48e(0x158)+_0x1d6064+':\x20'+String(_0x345dc8));}
1
+ const a159_0x18d77f=a159_0x2cfd;(function(_0x2b7422,_0xf5a848){const _0x2e4bd9=a159_0x2cfd,_0x4d8117=_0x2b7422();while(!![]){try{const _0x45eecd=parseInt(_0x2e4bd9(0x1d7))/0x1+parseInt(_0x2e4bd9(0x1db))/0x2*(parseInt(_0x2e4bd9(0x1ef))/0x3)+parseInt(_0x2e4bd9(0x1e1))/0x4*(parseInt(_0x2e4bd9(0x1fb))/0x5)+-parseInt(_0x2e4bd9(0x1f6))/0x6*(parseInt(_0x2e4bd9(0x1e8))/0x7)+-parseInt(_0x2e4bd9(0x1df))/0x8*(parseInt(_0x2e4bd9(0x1f3))/0x9)+-parseInt(_0x2e4bd9(0x1f1))/0xa*(parseInt(_0x2e4bd9(0x1d8))/0xb)+-parseInt(_0x2e4bd9(0x1e9))/0xc*(-parseInt(_0x2e4bd9(0x1ea))/0xd);if(_0x45eecd===_0xf5a848)break;else _0x4d8117['push'](_0x4d8117['shift']());}catch(_0xcfff85){_0x4d8117['push'](_0x4d8117['shift']());}}}(a159_0x1f70,0xed505));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=a159_0x18d77f(0x1d3);export function buildSqlLockEntry(_0x132bcc,_0x523ec1,_0x511792,_0x3c962c){const _0x512a13=a159_0x18d77f,_0x4fc3bb=detectSqlMode(_0x523ec1);return{'path':buildSqlRelativePath(_0x132bcc[_0x512a13(0x1fa)],_0x132bcc[_0x512a13(0x1e3)],_0x3c962c?.['dbName'],_0x4fc3bb,_0x132bcc[_0x512a13(0x1d2)]),'hash':_0x511792,'remoteId':_0x132bcc['id'],'version':_0x132bcc[_0x512a13(0x1fe)],'dbId':Number(_0x132bcc[_0x512a13(0x1d2)]),'dbName':_0x3c962c?.['dbName'],'sqlName':_0x132bcc[_0x512a13(0x1e3)],'sqlConfig':_0x132bcc['sqlConfig']??undefined,'mode':_0x4fc3bb};}export function cloneSqlLockData(_0xc0bb18){const _0x2e6332=a159_0x18d77f;return{'apps':Object[_0x2e6332(0x1dc)](Object['entries'](_0xc0bb18[_0x2e6332(0x1eb)])[_0x2e6332(0x1de)](([_0x2e8467,_0x1c741c])=>[_0x2e8467,{'sqlRoot':_0x1c741c[_0x2e6332(0x1f7)],'lastSync':_0x1c741c[_0x2e6332(0x1e0)],'sqls':{..._0x1c741c[_0x2e6332(0x1ed)]}}]))};}export function ensureRemoteSqlContent(_0x453fc2){return _0x453fc2['sqlContent']??'';}function a159_0x2cfd(_0xbd5a3b,_0x41370e){_0xbd5a3b=_0xbd5a3b-0x1d1;const _0x1f7011=a159_0x1f70();let _0x2cfd8b=_0x1f7011[_0xbd5a3b];return _0x2cfd8b;}function a159_0x1f70(){const _0x29cb59=['yes','69979JPLnrd','24rWetkb','3106259uTGmUH','apps','question','sqls','close','5269581zYfJbz','syncedAt','235090tTUUXh','filter','247185fzHvHW','dbName','includes','606eCyvDd','sqlRoot','length','push','sqlCode','5CpxxzW','test','stderr','version','replace','dbId','.rabetbase/sql','mybatisXml','join','mode','397221YqrtGj','880IbVPpB','<!--\x20@lovrabet.','trim','2CoIVuA','fromEntries','path','map','24foqVRG','lastSync','5252860aXkInU','description','sqlName','stdin','\x20[y/N]\x20','endsWith'];a159_0x1f70=function(){return _0x29cb59;};return a159_0x1f70();}export function buildLocalSqlFileContent(_0x31bed2,_0x345f5e,_0x582022){const _0x2ae5d6=a159_0x18d77f,_0x30e9b5=_0x582022?.[_0x2ae5d6(0x1d6)]??detectSqlMode(_0x345f5e),_0x7398ba=stripLocalSqlMetadata(_0x345f5e,_0x30e9b5)[_0x2ae5d6(0x1da)](),_0x30aa88=[...buildMetadataHeaderLines({'sqlCode':_0x31bed2[_0x2ae5d6(0x1fa)],'sqlName':_0x31bed2[_0x2ae5d6(0x1e3)],'dbId':_0x31bed2['dbId'],'dbName':_0x582022?.[_0x2ae5d6(0x1f4)],'mode':_0x30e9b5,'syncedAt':_0x582022?.[_0x2ae5d6(0x1f0)],'description':_0x582022?.[_0x2ae5d6(0x1e2)]},_0x30e9b5),'',_0x7398ba],_0x2f69a0=_0x30aa88[_0x2ae5d6(0x1d5)]('\x0a');return _0x2f69a0[_0x2ae5d6(0x1e6)]('\x0a')?_0x2f69a0:_0x2f69a0+'\x0a';}export function stripLocalSqlMetadata(_0x3cab71,_0x49dd50){const _0x532757=a159_0x18d77f,_0x59e9f0=_0x3cab71[_0x532757(0x1d1)](/\r\n/g,'\x0a')['split']('\x0a'),_0x948a21=[];let _0x390e19=0x0;if(_0x49dd50===_0x532757(0x1d4))while(_0x390e19<_0x59e9f0[_0x532757(0x1f8)]){const _0x2cee77=_0x59e9f0[_0x390e19]??'';if(/^\s*<!--\s*@lovrabet\./[_0x532757(0x1fc)](_0x2cee77)){_0x390e19++;continue;}if(_0x2cee77['trim']()===''&&_0x390e19>0x0){_0x390e19++;continue;}break;}else while(_0x390e19<_0x59e9f0[_0x532757(0x1f8)]){const _0x226438=_0x59e9f0[_0x390e19]??'';if(/^\s*--\s*@lovrabet\./[_0x532757(0x1fc)](_0x226438)){_0x390e19++;continue;}if(_0x226438[_0x532757(0x1da)]()===''&&_0x390e19>0x0){_0x390e19++;continue;}break;}for(;_0x390e19<_0x59e9f0[_0x532757(0x1f8)];_0x390e19++){_0x948a21[_0x532757(0x1f9)](_0x59e9f0[_0x390e19]);}return _0x948a21[_0x532757(0x1d5)]('\x0a')['trimStart']();}export function resolveSqlMode(_0xa53c3f,_0x2577c9){const _0x29a922=a159_0x18d77f;if(_0x2577c9?.[_0x29a922(0x1d6)])return _0x2577c9[_0x29a922(0x1d6)];return detectSqlMode(_0xa53c3f);}export function resolveSqlFileName(_0x46cfb9,_0x510c30,_0xfd4ce5){const _0x367be7=a159_0x18d77f;if(_0xfd4ce5?.[_0x367be7(0x1dd)])return _0xfd4ce5[_0x367be7(0x1dd)];if(_0xfd4ce5?.[_0x367be7(0x1e3)]||_0xfd4ce5?.['dbName'])return buildSqlRelativePath(_0x46cfb9,_0xfd4ce5?.[_0x367be7(0x1e3)],_0xfd4ce5?.[_0x367be7(0x1f4)],resolveSqlMode(_0x510c30,_0xfd4ce5),_0xfd4ce5?.[_0x367be7(0x1d2)]);return buildDefaultSqlFileName(_0x46cfb9,resolveSqlMode(_0x510c30,_0xfd4ce5));}export function resolveSqlLocalDir(_0x5353cf,_0x57393d){return join(_0x5353cf,SQL_LOCAL_REL_DIR,_0x57393d);}export async function confirmForceOverwrite(_0x51bd2a){const _0x551cc4=a159_0x18d77f,_0x402a6d=createInterface({'input':process[_0x551cc4(0x1e4)],'output':process[_0x551cc4(0x1fd)]}),_0x1f58f5=await new Promise(_0x383406=>{const _0x43a959=_0x551cc4;_0x402a6d[_0x43a959(0x1ec)](_0x51bd2a+_0x43a959(0x1e5),_0x383406);});return _0x402a6d[_0x551cc4(0x1ee)](),['y',_0x551cc4(0x1e7)][_0x551cc4(0x1f5)](_0x1f58f5[_0x551cc4(0x1da)]()['toLowerCase']());}export function findSqlLockScope(_0x325c19,_0x458daa){const _0x3cde63=a159_0x18d77f;return _0x325c19[_0x3cde63(0x1eb)][_0x458daa];}function buildMetadataHeaderLines(_0xf4c3c4,_0x4c38d6){const _0xda0160=a159_0x18d77f,_0x19110a=[[_0xda0160(0x1fa),_0xf4c3c4['sqlCode']],[_0xda0160(0x1e3),_0xf4c3c4[_0xda0160(0x1e3)]],[_0xda0160(0x1d2),_0xf4c3c4[_0xda0160(0x1d2)]],[_0xda0160(0x1f4),_0xf4c3c4[_0xda0160(0x1f4)]],['mode',_0xf4c3c4['mode']],[_0xda0160(0x1f0),_0xf4c3c4[_0xda0160(0x1f0)]],[_0xda0160(0x1e2),_0xf4c3c4[_0xda0160(0x1e2)]]];if(_0x4c38d6===_0xda0160(0x1d4))return _0x19110a[_0xda0160(0x1f2)](([,_0x363c61])=>_0x363c61!==undefined&&_0x363c61!==null&&String(_0x363c61)[_0xda0160(0x1da)]()!=='')['map'](([_0x32f255,_0x3d7bcc])=>_0xda0160(0x1d9)+_0x32f255+':\x20'+String(_0x3d7bcc)+'\x20-->');return _0x19110a['filter'](([,_0x15208c])=>_0x15208c!==undefined&&_0x15208c!==null&&String(_0x15208c)['trim']()!=='')['map'](([_0x2233e1,_0x5409b0])=>'--\x20@lovrabet.'+_0x2233e1+':\x20'+String(_0x5409b0));}
@@ -1 +1 @@
1
- const a160_0x22e246=a160_0x70ac;(function(_0x104e2a,_0x23e81d){const _0x411c70=a160_0x70ac,_0x4e081c=_0x104e2a();while(!![]){try{const _0x4ad035=-parseInt(_0x411c70(0x8a))/0x1*(-parseInt(_0x411c70(0x8f))/0x2)+parseInt(_0x411c70(0x86))/0x3+-parseInt(_0x411c70(0x9d))/0x4*(parseInt(_0x411c70(0x7a))/0x5)+-parseInt(_0x411c70(0x8d))/0x6+parseInt(_0x411c70(0x7c))/0x7*(parseInt(_0x411c70(0x81))/0x8)+parseInt(_0x411c70(0x7b))/0x9*(parseInt(_0x411c70(0x7e))/0xa)+-parseInt(_0x411c70(0x9c))/0xb;if(_0x4ad035===_0x23e81d)break;else _0x4e081c['push'](_0x4e081c['shift']());}catch(_0x4dd254){_0x4e081c['push'](_0x4e081c['shift']());}}}(a160_0x18cf,0x59954));import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';function a160_0x18cf(){const _0x45a007=['1686342odinQF','sqls','4226NsEokq','sql','\x20added,\x20','has','lockFilePath','bool','totalCount','relativePath','appCode','tableData','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','push','sqlName','6229630sHuqjZ','288116zwHuTi','5FYKMlx','1841283VGyxCL','413126tcoyxu','boolean','20vZEEGO','hash','All\x20SQL\x20queries\x20are\x20in\x20sync.','24xQDDjl','map','paging','lockKey','\x20remote-only','1739037qsFMIH','sqlRoot','sqlCode','length','57KZAcQl','filePath','status'];a160_0x18cf=function(){return _0x45a007;};return a160_0x18cf();}const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x48a419){const _0x3c5eab=a160_0x70ac,_0x38f3fd=[];let _0x2c2354=0x1;while(!![]){const _0x1a487=await listSqlQueries(_0x48a419,{'currentPage':_0x2c2354,'pageSize':PAGE_SIZE}),_0x32ca6f=_0x1a487[_0x3c5eab(0x98)]??[];_0x38f3fd[_0x3c5eab(0x9a)](..._0x32ca6f['map'](_0x52cc59=>_0x52cc59[_0x3c5eab(0x88)]));if(_0x32ca6f['length']===0x0)break;const _0x40bbaa=_0x1a487[_0x3c5eab(0x83)]?.[_0x3c5eab(0x95)];if(_0x40bbaa!=null?_0x38f3fd['length']>=_0x40bbaa:_0x32ca6f[_0x3c5eab(0x89)]<PAGE_SIZE)break;_0x2c2354++;}return _0x38f3fd;}function a160_0x70ac(_0x1d59a8,_0x5b1cb4){_0x1d59a8=_0x1d59a8-0x7a;const _0x18cf16=a160_0x18cf();let _0x70acaf=_0x18cf16[_0x1d59a8];return _0x70acaf;}export const sqlStatus={'service':a160_0x22e246(0x90),'command':a160_0x22e246(0x8c),'description':'Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','risk':'read','flags':[{'name':'remote','type':a160_0x22e246(0x7d),'description':a160_0x22e246(0x99)}],async 'execute'(_0x519999){const _0x1e041f=a160_0x22e246,_0x1e6bd0=loadSqlProjectConfig(_0x519999[_0x1e041f(0x97)]),_0x3bb3da=await readSqlLockFile(_0x1e6bd0[_0x1e041f(0x93)]),{appLock:_0x2488a0}=ensureSqlLockScope(_0x3bb3da??createEmptySqlLock(),_0x1e6bd0[_0x1e041f(0x97)],_0x1e6bd0[_0x1e041f(0x87)],_0x1e041f(0x8c)),_0x225ea7=await scanLocalSqlQueries(_0x1e6bd0),_0xfc6260=[],_0x194d4b=[],_0x22c0aa=[],_0x2eeef3=[],_0x3c52d2=new Set(_0x225ea7[_0x1e041f(0x82)](_0x68cdc3=>_0x68cdc3[_0x1e041f(0x84)]));for(const _0x35737d of _0x225ea7){const _0x30deec=await computeSqlFileHash(_0x35737d[_0x1e041f(0x8b)]),_0x648dfd=_0x2488a0[_0x1e041f(0x8e)][_0x35737d[_0x1e041f(0x84)]],_0x1e383c=!!_0x648dfd&&_0x648dfd['path']!==_0x35737d[_0x1e041f(0x96)],_0x1cdd9b=!!_0x648dfd&&!!_0x35737d['sqlName']&&_0x648dfd[_0x1e041f(0x9b)]!==_0x35737d[_0x1e041f(0x9b)];if(!_0x648dfd)_0xfc6260[_0x1e041f(0x9a)](_0x35737d['lockKey']);else _0x648dfd[_0x1e041f(0x7f)]!==_0x30deec||_0x1e383c||_0x1cdd9b?_0x194d4b[_0x1e041f(0x9a)](_0x35737d[_0x1e041f(0x84)]):_0x22c0aa[_0x1e041f(0x9a)](_0x35737d[_0x1e041f(0x84)]);}for(const _0x390c28 of Object['keys'](_0x2488a0[_0x1e041f(0x8e)])){!_0x3c52d2[_0x1e041f(0x92)](_0x390c28)&&_0x2eeef3['push'](_0x390c28);}const _0x4fd2e6=[];if(_0x519999[_0x1e041f(0x94)]('remote')){const _0x19b946=await fetchAllSqlCodes(_0x519999[_0x1e041f(0x97)]);for(const _0x47520f of _0x19b946){!_0x3c52d2[_0x1e041f(0x92)](_0x47520f)&&!_0x2488a0['sqls'][_0x47520f]&&_0x4fd2e6[_0x1e041f(0x9a)](_0x47520f);}}const _0x25ecd5=_0xfc6260[_0x1e041f(0x89)]===0x0&&_0x194d4b['length']===0x0&&_0x2eeef3[_0x1e041f(0x89)]===0x0&&_0x4fd2e6[_0x1e041f(0x89)]===0x0;return{'ok':!![],'data':{'added':_0xfc6260,'modified':_0x194d4b,'missing':_0x2eeef3,'unchanged':_0x22c0aa,'remoteOnly':_0x4fd2e6},'message':_0x25ecd5?_0x1e041f(0x80):_0xfc6260[_0x1e041f(0x89)]+_0x1e041f(0x91)+_0x194d4b['length']+'\x20modified,\x20'+_0x2eeef3[_0x1e041f(0x89)]+'\x20missing,\x20'+_0x22c0aa[_0x1e041f(0x89)]+'\x20unchanged'+(_0x4fd2e6['length']>0x0?',\x20'+_0x4fd2e6[_0x1e041f(0x89)]+_0x1e041f(0x85):'')};}};
1
+ const a160_0x3eed82=a160_0x557a;(function(_0x33529d,_0x4fb396){const _0x1ca519=a160_0x557a,_0x40e624=_0x33529d();while(!![]){try{const _0x508bbf=parseInt(_0x1ca519(0xb0))/0x1*(-parseInt(_0x1ca519(0xbc))/0x2)+-parseInt(_0x1ca519(0xa0))/0x3+-parseInt(_0x1ca519(0xb4))/0x4+parseInt(_0x1ca519(0xc0))/0x5*(-parseInt(_0x1ca519(0xc5))/0x6)+parseInt(_0x1ca519(0xba))/0x7+parseInt(_0x1ca519(0xa5))/0x8+parseInt(_0x1ca519(0xa3))/0x9*(parseInt(_0x1ca519(0xc1))/0xa);if(_0x508bbf===_0x4fb396)break;else _0x40e624['push'](_0x40e624['shift']());}catch(_0x1d799f){_0x40e624['push'](_0x40e624['shift']());}}}(a160_0x3c1e,0xc2414));import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';function a160_0x557a(_0x4c32cb,_0x2e6bda){_0x4c32cb=_0x4c32cb-0xa0;const _0x3c1e98=a160_0x3c1e();let _0x557adb=_0x3c1e98[_0x4c32cb];return _0x557adb;}import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';function a160_0x3c1e(){const _0x49399a=['sqlName','tableData','map','filePath','sqls','598809TLNlmM','\x20added,\x20','sqlCode','path','3861784rbkvYw','relativePath','All\x20SQL\x20queries\x20are\x20in\x20sync.','remote','push','lockFilePath','3827236xgESau','has','2ofLGOY','read','status','hash','1152695xaZKRT','10RvHoGV','length','keys','totalCount','12NXDObL','1373610utwZrE','\x20modified,\x20','lockKey','24581403nyIuLj','appCode','6848fEmoSP','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','\x20unchanged','boolean','paging','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally'];a160_0x3c1e=function(){return _0x49399a;};return a160_0x3c1e();}const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0xd3ffe6){const _0x53c6c5=a160_0x557a,_0x422409=[];let _0x1696f9=0x1;while(!![]){const _0x2fb0e9=await listSqlQueries(_0xd3ffe6,{'currentPage':_0x1696f9,'pageSize':PAGE_SIZE}),_0x11ac05=_0x2fb0e9[_0x53c6c5(0xac)]??[];_0x422409[_0x53c6c5(0xb8)](..._0x11ac05[_0x53c6c5(0xad)](_0x53faae=>_0x53faae[_0x53c6c5(0xb2)]));if(_0x11ac05[_0x53c6c5(0xc2)]===0x0)break;const _0x547c36=_0x2fb0e9[_0x53c6c5(0xa9)]?.[_0x53c6c5(0xc4)];if(_0x547c36!=null?_0x422409[_0x53c6c5(0xc2)]>=_0x547c36:_0x11ac05['length']<PAGE_SIZE)break;_0x1696f9++;}return _0x422409;}export const sqlStatus={'service':'sql','command':a160_0x3eed82(0xbe),'description':a160_0x3eed82(0xa6),'risk':a160_0x3eed82(0xbd),'flags':[{'name':a160_0x3eed82(0xb7),'type':a160_0x3eed82(0xa8),'description':a160_0x3eed82(0xaa)}],async 'execute'(_0x27862d){const _0x32ba61=a160_0x3eed82,_0x914517=loadSqlProjectConfig(_0x27862d[_0x32ba61(0xa4)]),_0x539d0b=await readSqlLockFile(_0x914517[_0x32ba61(0xb9)]),{appLock:_0x202b80}=ensureSqlLockScope(_0x539d0b??createEmptySqlLock(),_0x914517[_0x32ba61(0xa4)],_0x914517['sqlRoot'],_0x32ba61(0xbe)),_0x38aa2a=await scanLocalSqlQueries(_0x914517),_0x5a765f=[],_0x2f0162=[],_0x341859=[],_0x2d9384=[],_0x525f6d=new Set(_0x38aa2a[_0x32ba61(0xad)](_0x5e570e=>_0x5e570e[_0x32ba61(0xa2)]));for(const _0x4cab57 of _0x38aa2a){const _0x548e4c=await computeSqlFileHash(_0x4cab57[_0x32ba61(0xae)]),_0x362a71=_0x202b80[_0x32ba61(0xaf)][_0x4cab57[_0x32ba61(0xa2)]],_0x296c32=!!_0x362a71&&_0x362a71[_0x32ba61(0xb3)]!==_0x4cab57[_0x32ba61(0xb5)],_0x381d1a=!!_0x362a71&&!!_0x4cab57[_0x32ba61(0xab)]&&_0x362a71[_0x32ba61(0xab)]!==_0x4cab57[_0x32ba61(0xab)];if(!_0x362a71)_0x5a765f[_0x32ba61(0xb8)](_0x4cab57[_0x32ba61(0xa2)]);else _0x362a71[_0x32ba61(0xbf)]!==_0x548e4c||_0x296c32||_0x381d1a?_0x2f0162[_0x32ba61(0xb8)](_0x4cab57[_0x32ba61(0xa2)]):_0x341859[_0x32ba61(0xb8)](_0x4cab57['lockKey']);}for(const _0x1675fc of Object[_0x32ba61(0xc3)](_0x202b80[_0x32ba61(0xaf)])){!_0x525f6d[_0x32ba61(0xbb)](_0x1675fc)&&_0x2d9384[_0x32ba61(0xb8)](_0x1675fc);}const _0x11998c=[];if(_0x27862d['bool'](_0x32ba61(0xb7))){const _0x343772=await fetchAllSqlCodes(_0x27862d[_0x32ba61(0xa4)]);for(const _0x24eae2 of _0x343772){!_0x525f6d['has'](_0x24eae2)&&!_0x202b80[_0x32ba61(0xaf)][_0x24eae2]&&_0x11998c[_0x32ba61(0xb8)](_0x24eae2);}}const _0x28788f=_0x5a765f[_0x32ba61(0xc2)]===0x0&&_0x2f0162[_0x32ba61(0xc2)]===0x0&&_0x2d9384[_0x32ba61(0xc2)]===0x0&&_0x11998c[_0x32ba61(0xc2)]===0x0;return{'ok':!![],'data':{'added':_0x5a765f,'modified':_0x2f0162,'missing':_0x2d9384,'unchanged':_0x341859,'remoteOnly':_0x11998c},'message':_0x28788f?_0x32ba61(0xb6):_0x5a765f[_0x32ba61(0xc2)]+_0x32ba61(0xb1)+_0x2f0162[_0x32ba61(0xc2)]+_0x32ba61(0xa1)+_0x2d9384[_0x32ba61(0xc2)]+'\x20missing,\x20'+_0x341859[_0x32ba61(0xc2)]+_0x32ba61(0xa7)+(_0x11998c[_0x32ba61(0xc2)]>0x0?',\x20'+_0x11998c[_0x32ba61(0xc2)]+'\x20remote-only':'')};}};
@@ -1 +1 @@
1
- const a161_0x41a216=a161_0x1859;(function(_0x26473b,_0x3668df){const _0x2645b9=a161_0x1859,_0x3ce8d8=_0x26473b();while(!![]){try{const _0x19d3e2=parseInt(_0x2645b9(0x1bd))/0x1+parseInt(_0x2645b9(0x1e4))/0x2+parseInt(_0x2645b9(0x1d2))/0x3+parseInt(_0x2645b9(0x1e1))/0x4*(-parseInt(_0x2645b9(0x1de))/0x5)+parseInt(_0x2645b9(0x1c9))/0x6+parseInt(_0x2645b9(0x1c4))/0x7+parseInt(_0x2645b9(0x1c1))/0x8*(-parseInt(_0x2645b9(0x1d5))/0x9);if(_0x19d3e2===_0x3668df)break;else _0x3ce8d8['push'](_0x3ce8d8['shift']());}catch(_0x35c45e){_0x3ce8d8['push'](_0x3ce8d8['shift']());}}}(a161_0x2664,0x3a9c5));function a161_0x1859(_0x2e3d4b,_0x535e25){_0x2e3d4b=_0x2e3d4b-0x1bc;const _0x2664db=a161_0x2664();let _0x185966=_0x2664db[_0x2e3d4b];return _0x185966;}import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';function a161_0x2664(){const _0x1f1011=['Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','Dataset\x20\x22','1059928fARAGl','Table\x20\x22','\x22\x20not\x20found\x20or\x20not\x20accessible','462554DmfLVA','dbtableConfig','tableName','filter','map','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','split','214608hBabRN','str','Provide\x20--file\x20or\x20--sql','reason','30272OzHsEY','get','string','2354779TdNJaQ','file','schemas','toLowerCase','sqlType','2421930oMzEZT','isDangerous','\x22\x20not\x20found\x20in\x20any\x20dataset','name','push','size','valid','cwd','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','647766scelcN','schema:','SQL\x20schema\x20validation','2133vkoYDb','trim','tables','from','parameters','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','File\x20not\x20found:\x20','fields','message','5sROGem'];a161_0x2664=function(){return _0x1f1011;};return a161_0x2664();}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':'validate','description':a161_0x41a216(0x1da),'risk':'read','flags':[{'name':a161_0x41a216(0x1c5),'type':a161_0x41a216(0x1c3),'description':a161_0x41a216(0x1e9)},{'name':'sql','type':a161_0x41a216(0x1c3),'description':a161_0x41a216(0x1d1)},{'name':a161_0x41a216(0x1c6),'type':a161_0x41a216(0x1c3),'description':a161_0x41a216(0x1df)}],async 'execute'(_0x507015){const _0x8216ec=a161_0x41a216,_0x40d4b2=_0x507015[_0x8216ec(0x1be)]('file'),_0x189ca8=_0x507015[_0x8216ec(0x1be)]('sql');if(!_0x40d4b2&&!_0x189ca8)throw CliErrors['flagMissing']('file',_0x8216ec(0x1bf));let _0x529d24;if(_0x40d4b2){const _0x53b68d=resolve(process[_0x8216ec(0x1d0)](),_0x40d4b2);if(!existsSync(_0x53b68d))throw CliErrors['validation'](_0x8216ec(0x1db)+_0x53b68d);_0x529d24=readFileSync(_0x53b68d,'utf-8');}else _0x529d24=_0x189ca8;const _0x1c4534=validateSql(_0x529d24),_0x31aa5f={'valid':_0x1c4534['valid'],'sqlType':_0x1c4534['sqlType']['type'],'isSelectOnly':_0x1c4534['sqlType']['isSelectOnly'],'isDangerous':_0x1c4534[_0x8216ec(0x1c8)][_0x8216ec(0x1ca)],'tables':_0x1c4534[_0x8216ec(0x1d7)],'parameters':_0x1c4534[_0x8216ec(0x1d9)],'message':_0x1c4534[_0x8216ec(0x1dd)]};_0x1c4534[_0x8216ec(0x1c8)][_0x8216ec(0x1c0)]&&(_0x31aa5f['reason']=_0x1c4534[_0x8216ec(0x1c8)][_0x8216ec(0x1c0)]);const _0x218131=_0x507015[_0x8216ec(0x1be)](_0x8216ec(0x1c6));if(_0x218131&&_0x1c4534[_0x8216ec(0x1cf)]){const _0x5a195b=_0x218131[_0x8216ec(0x1bc)](',')[_0x8216ec(0x1e8)](_0x51e1b7=>_0x51e1b7[_0x8216ec(0x1d6)]())[_0x8216ec(0x1e7)](Boolean),_0x21cf06=[],_0x5c1e05=filterDbTableBackedDatasets(await listDatasets(_0x507015['appCode'])),_0x1be615=new Map(_0x5c1e05[_0x8216ec(0x1e8)](_0x3a77b0=>[_0x3a77b0[_0x8216ec(0x1e5)]?.[_0x8216ec(0x1e6)]?.[_0x8216ec(0x1c7)](),_0x3a77b0]));for(const _0x4fe6d2 of _0x1c4534['tables']){const _0xa4989b=_0x1be615[_0x8216ec(0x1c2)](_0x4fe6d2[_0x8216ec(0x1c7)]());!_0xa4989b&&_0x21cf06[_0x8216ec(0x1cd)](_0x8216ec(0x1e2)+_0x4fe6d2+_0x8216ec(0x1cb));}for(const _0x142c1d of _0x5a195b){let _0xb76cd0;try{_0xb76cd0=await getDatasetDetail(_0x142c1d);}catch{_0x21cf06['push'](_0x8216ec(0x1e0)+_0x142c1d+_0x8216ec(0x1e3));continue;}assertDatasetIsDbTableBacked(_0xb76cd0,_0x8216ec(0x1d4));const _0x378fd3=Array['isArray'](_0xb76cd0[_0x8216ec(0x1dc)])?_0xb76cd0[_0x8216ec(0x1dc)]:[],_0x536365=new Set(_0x378fd3[_0x8216ec(0x1e8)](_0x1c8601=>_0x1c8601[_0x8216ec(0x1cc)]?.[_0x8216ec(0x1c7)]())),_0x1734fe=_0xb76cd0[_0x8216ec(0x1e5)]?.[_0x8216ec(0x1e6)]||_0xb76cd0[_0x8216ec(0x1e6)]||_0x142c1d;_0x31aa5f[_0x8216ec(0x1d3)+_0x1734fe]={'code':_0x142c1d,'tableName':_0x1734fe,'fieldCount':_0x536365[_0x8216ec(0x1ce)],'fields':Array[_0x8216ec(0x1d8)](_0x536365)};}_0x21cf06['length']>0x0&&(_0x31aa5f['schemaWarnings']=_0x21cf06);}return{'ok':_0x1c4534[_0x8216ec(0x1cf)],'data':_0x31aa5f,'message':_0x1c4534[_0x8216ec(0x1dd)]};}};
1
+ const a161_0x46ef9a=a161_0x38c0;(function(_0x497023,_0x4764cb){const _0x207b3b=a161_0x38c0,_0x4ee712=_0x497023();while(!![]){try{const _0x434b68=parseInt(_0x207b3b(0x131))/0x1*(-parseInt(_0x207b3b(0x136))/0x2)+-parseInt(_0x207b3b(0x117))/0x3+parseInt(_0x207b3b(0x130))/0x4*(-parseInt(_0x207b3b(0x125))/0x5)+parseInt(_0x207b3b(0x11e))/0x6+parseInt(_0x207b3b(0x10f))/0x7*(-parseInt(_0x207b3b(0x138))/0x8)+-parseInt(_0x207b3b(0x118))/0x9+parseInt(_0x207b3b(0x113))/0xa;if(_0x434b68===_0x4764cb)break;else _0x4ee712['push'](_0x4ee712['shift']());}catch(_0x3e0333){_0x4ee712['push'](_0x4ee712['shift']());}}}(a161_0x19fb,0x20b7d));import{readFileSync,existsSync}from'node:fs';function a161_0x19fb(){const _0x3c6bbb=['filter','validation','dbtableConfig','read','1277633uRMslF','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','Table\x20\x22','isArray','9979360WrMjPb','SQL\x20schema\x20validation','cwd','isDangerous','419037cVwOWH','2334600eCleCL','flagMissing','sql','file','utf-8','type','584478zcwCuw','str','name','reason','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','get','string','5EPUwcC','File\x20not\x20found:\x20','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','message','push','schemaWarnings','tableName','\x22\x20not\x20found\x20or\x20not\x20accessible','appCode','valid','split','627400ECOjZz','222888YZFoSr','validate','tables','map','fields','2IQSUwR','length','8FoREvH','sqlType','schemas','\x22\x20not\x20found\x20in\x20any\x20dataset','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','isSelectOnly','toLowerCase','parameters'];a161_0x19fb=function(){return _0x3c6bbb;};return a161_0x19fb();}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';function a161_0x38c0(_0x390777,_0x423709){_0x390777=_0x390777-0x10c;const _0x19fb7d=a161_0x19fb();let _0x38c031=_0x19fb7d[_0x390777];return _0x38c031;}import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';export const sqlValidate={'service':'sql','command':a161_0x46ef9a(0x132),'description':a161_0x46ef9a(0x13c),'risk':a161_0x46ef9a(0x10e),'flags':[{'name':a161_0x46ef9a(0x11b),'type':a161_0x46ef9a(0x124),'description':a161_0x46ef9a(0x122)},{'name':a161_0x46ef9a(0x11a),'type':a161_0x46ef9a(0x124),'description':a161_0x46ef9a(0x110)},{'name':a161_0x46ef9a(0x13a),'type':a161_0x46ef9a(0x124),'description':a161_0x46ef9a(0x127)}],async 'execute'(_0x14b21e){const _0x2fb83b=a161_0x46ef9a,_0xa3ba8a=_0x14b21e[_0x2fb83b(0x11f)](_0x2fb83b(0x11b)),_0x1f7257=_0x14b21e['str'](_0x2fb83b(0x11a));if(!_0xa3ba8a&&!_0x1f7257)throw CliErrors[_0x2fb83b(0x119)](_0x2fb83b(0x11b),'Provide\x20--file\x20or\x20--sql');let _0x20c262;if(_0xa3ba8a){const _0x1eb11d=resolve(process[_0x2fb83b(0x115)](),_0xa3ba8a);if(!existsSync(_0x1eb11d))throw CliErrors[_0x2fb83b(0x10c)](_0x2fb83b(0x126)+_0x1eb11d);_0x20c262=readFileSync(_0x1eb11d,_0x2fb83b(0x11c));}else _0x20c262=_0x1f7257;const _0x3f8813=validateSql(_0x20c262),_0x417e16={'valid':_0x3f8813[_0x2fb83b(0x12e)],'sqlType':_0x3f8813[_0x2fb83b(0x139)][_0x2fb83b(0x11d)],'isSelectOnly':_0x3f8813[_0x2fb83b(0x139)][_0x2fb83b(0x13d)],'isDangerous':_0x3f8813['sqlType'][_0x2fb83b(0x116)],'tables':_0x3f8813[_0x2fb83b(0x133)],'parameters':_0x3f8813[_0x2fb83b(0x13f)],'message':_0x3f8813[_0x2fb83b(0x128)]};_0x3f8813['sqlType'][_0x2fb83b(0x121)]&&(_0x417e16[_0x2fb83b(0x121)]=_0x3f8813[_0x2fb83b(0x139)][_0x2fb83b(0x121)]);const _0xf79902=_0x14b21e['str'](_0x2fb83b(0x13a));if(_0xf79902&&_0x3f8813[_0x2fb83b(0x12e)]){const _0x4af42e=_0xf79902[_0x2fb83b(0x12f)](',')[_0x2fb83b(0x134)](_0xcc897a=>_0xcc897a['trim']())[_0x2fb83b(0x140)](Boolean),_0x2f4cf7=[],_0x64384c=filterDbTableBackedDatasets(await listDatasets(_0x14b21e[_0x2fb83b(0x12d)])),_0xed730b=new Map(_0x64384c['map'](_0x1cedeb=>[_0x1cedeb[_0x2fb83b(0x10d)]?.[_0x2fb83b(0x12b)]?.['toLowerCase'](),_0x1cedeb]));for(const _0x2c6743 of _0x3f8813['tables']){const _0x4dcbf8=_0xed730b[_0x2fb83b(0x123)](_0x2c6743['toLowerCase']());!_0x4dcbf8&&_0x2f4cf7[_0x2fb83b(0x129)](_0x2fb83b(0x111)+_0x2c6743+_0x2fb83b(0x13b));}for(const _0x1e2e95 of _0x4af42e){let _0x494c93;try{_0x494c93=await getDatasetDetail(_0x1e2e95);}catch{_0x2f4cf7['push']('Dataset\x20\x22'+_0x1e2e95+_0x2fb83b(0x12c));continue;}assertDatasetIsDbTableBacked(_0x494c93,_0x2fb83b(0x114));const _0x37f2b9=Array[_0x2fb83b(0x112)](_0x494c93[_0x2fb83b(0x135)])?_0x494c93[_0x2fb83b(0x135)]:[],_0x5c6357=new Set(_0x37f2b9[_0x2fb83b(0x134)](_0x5ad728=>_0x5ad728[_0x2fb83b(0x120)]?.[_0x2fb83b(0x13e)]())),_0x345c36=_0x494c93[_0x2fb83b(0x10d)]?.[_0x2fb83b(0x12b)]||_0x494c93[_0x2fb83b(0x12b)]||_0x1e2e95;_0x417e16['schema:'+_0x345c36]={'code':_0x1e2e95,'tableName':_0x345c36,'fieldCount':_0x5c6357['size'],'fields':Array['from'](_0x5c6357)};}_0x2f4cf7[_0x2fb83b(0x137)]>0x0&&(_0x417e16[_0x2fb83b(0x12a)]=_0x2f4cf7);}return{'ok':_0x3f8813[_0x2fb83b(0x12e)],'data':_0x417e16,'message':_0x3f8813[_0x2fb83b(0x128)]};}};
@@ -1 +1 @@
1
- const a162_0x3e6419=a162_0x581d;(function(_0x1fe593,_0x5ac3a5){const _0x5b2e83=a162_0x581d,_0x1464df=_0x1fe593();while(!![]){try{const _0x4135fe=-parseInt(_0x5b2e83(0xfb))/0x1*(-parseInt(_0x5b2e83(0xf2))/0x2)+parseInt(_0x5b2e83(0xf0))/0x3*(-parseInt(_0x5b2e83(0xf4))/0x4)+-parseInt(_0x5b2e83(0xfa))/0x5+parseInt(_0x5b2e83(0xf3))/0x6+parseInt(_0x5b2e83(0xed))/0x7*(-parseInt(_0x5b2e83(0xf6))/0x8)+parseInt(_0x5b2e83(0xf1))/0x9+parseInt(_0x5b2e83(0xf5))/0xa*(parseInt(_0x5b2e83(0xea))/0xb);if(_0x4135fe===_0x5ac3a5)break;else _0x1464df['push'](_0x1464df['shift']());}catch(_0xe82b0d){_0x1464df['push'](_0x1464df['shift']());}}}(a162_0x52bc,0xb5451));function a162_0x581d(_0xe745fe,_0x314c9b){_0xe745fe=_0xe745fe-0xea;const _0x52bc97=a162_0x52bc();let _0x581dd3=_0x52bc97[_0xe745fe];return _0x581dd3;}import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';function a162_0x52bc(){const _0x1d8a73=['425857LkgDOg','74932opcCsB','workspace\x20add','App\x20profile\x20name','1103263netaMl','add','write','2851125uWFGjv','6638742AgiaPR','4tLXlJk','1607904ZnrMbB','4RmNGXY','470oqyDZJ','16CTgVGZ','workspace','Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','name','847130zPWvAi'];a162_0x52bc=function(){return _0x1d8a73;};return a162_0x52bc();}export const workspaceAddDefinition={'service':a162_0x3e6419(0xf7),'command':a162_0x3e6419(0xee),'description':a162_0x3e6419(0xf8),'risk':a162_0x3e6419(0xef),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a162_0x3e6419(0xf9),'description':a162_0x3e6419(0xec),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0x543b4d=>validateAppName(_0x543b4d,a162_0x3e6419(0xeb)),'execute':_0x43cc26=>runAppAdd(_0x43cc26,a162_0x3e6419(0xeb))};
1
+ function a162_0x2747(_0x191080,_0x1a12f2){_0x191080=_0x191080-0x175;const _0x2a1a9d=a162_0x2a1a();let _0x274745=_0x2a1a9d[_0x191080];return _0x274745;}const a162_0x54a6ee=a162_0x2747;(function(_0x4362dc,_0x5ee51f){const _0x4d2f3f=a162_0x2747,_0x334d46=_0x4362dc();while(!![]){try{const _0x1c37a6=-parseInt(_0x4d2f3f(0x17a))/0x1+-parseInt(_0x4d2f3f(0x180))/0x2*(-parseInt(_0x4d2f3f(0x183))/0x3)+parseInt(_0x4d2f3f(0x185))/0x4+parseInt(_0x4d2f3f(0x184))/0x5+-parseInt(_0x4d2f3f(0x17d))/0x6*(parseInt(_0x4d2f3f(0x17e))/0x7)+-parseInt(_0x4d2f3f(0x179))/0x8*(parseInt(_0x4d2f3f(0x175))/0x9)+-parseInt(_0x4d2f3f(0x17c))/0xa*(parseInt(_0x4d2f3f(0x178))/0xb);if(_0x1c37a6===_0x5ee51f)break;else _0x334d46['push'](_0x334d46['shift']());}catch(_0x39b82b){_0x334d46['push'](_0x334d46['shift']());}}}(a162_0x2a1a,0xcf265));import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';export const workspaceAddDefinition={'service':a162_0x54a6ee(0x17f),'command':a162_0x54a6ee(0x17b),'description':'Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','risk':a162_0x54a6ee(0x182),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a162_0x54a6ee(0x176),'description':a162_0x54a6ee(0x177),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0x5c40fc=>validateAppName(_0x5c40fc,a162_0x54a6ee(0x181)),'execute':_0x2d11e4=>runAppAdd(_0x2d11e4,a162_0x54a6ee(0x181))};function a162_0x2a1a(){const _0x51ef0d=['6kZhnZy','workspace\x20add','write','918825JfySEz','3713680hloVfV','5544908jHOcAJ','18gCHvkg','name','App\x20profile\x20name','7250287TWzTIo','103128lelqQU','819043iWQrPV','add','10EDJTDJ','44862DHhEJO','651mCrtkA','workspace'];a162_0x2a1a=function(){return _0x51ef0d;};return a162_0x2a1a();}
@@ -1 +1 @@
1
- const a163_0x44ac2b=a163_0x4b8e;(function(_0x2e5cbd,_0xc3dc2a){const _0x467ae6=a163_0x4b8e,_0x59af11=_0x2e5cbd();while(!![]){try{const _0xc6b9ee=parseInt(_0x467ae6(0xbf))/0x1+-parseInt(_0x467ae6(0xa0))/0x2+-parseInt(_0x467ae6(0xc2))/0x3+-parseInt(_0x467ae6(0xb5))/0x4+-parseInt(_0x467ae6(0xc6))/0x5+-parseInt(_0x467ae6(0xc4))/0x6+parseInt(_0x467ae6(0xab))/0x7;if(_0xc6b9ee===_0xc3dc2a)break;else _0x59af11['push'](_0x59af11['shift']());}catch(_0x4d7984){_0x59af11['push'](_0x59af11['shift']());}}}(a163_0x3878,0xb4ac3));function a163_0x3878(){const _0x1f7312=['object','Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile','apps','Switch\x20the\x20current\x20workspace\x20app\x20binding','\x20workspace\x20','env','pageSize','.\x20Credentials:\x20not\x20written.','format','str','apiDir','2618988ceclSn','\x20--appcode\x20<code>`.','globalConfig','API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile','Missing\x20workspace\x20app\x20selector.','Use\x20`','locale','trim','join','Locale\x20for\x20this\x20workspace\x20app\x20profile','use','23070131pIPSvI','App\x20\x22','validation','\x22\x20not\x20found.','workspace','workspace.','defaultApp','app','flag','init','427988IQfKRe','\x20--app\x20','length','defaultFormat','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','string','isArray','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','Initialize\x20the\x20current\x20workspace\x20app\x20binding','\x20workspace\x20use\x20--app\x20<name>`.','467645vUsmQN','riskLevel','number','3664626iJswfu','project','1917420VFzHfa','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','328700SZfjSc','appcode','write','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','keys','Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile',').\x20Config:\x20','\x20(appcode:\x20'];a163_0x3878=function(){return _0x1f7312;};return a163_0x3878();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';function a163_0x4b8e(_0x5be44d,_0x59558d){_0x5be44d=_0x5be44d-0x95;const _0x387806=a163_0x3878();let _0x4b8e5f=_0x387806[_0x5be44d];return _0x4b8e5f;}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';import{workspaceAddDefinition}from'../../commands/workspace/add.js';import{workspaceRemoveDefinition}from'../../commands/workspace/remove.js';const WORKSPACE_USAGE=CLI_BIN_NAME+a163_0x44ac2b(0xc9),SAFE_PROFILE_KEYS=[a163_0x44ac2b(0xc7),'env',a163_0x44ac2b(0x9f),'format',a163_0x44ac2b(0x9b),a163_0x44ac2b(0xc0),a163_0x44ac2b(0xa6)],workspaceFlags=[{'name':a163_0x44ac2b(0xb2),'type':a163_0x44ac2b(0xba),'description':'App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace'},{'name':a163_0x44ac2b(0xc7),'type':a163_0x44ac2b(0xba),'description':'App\x20code\x20to\x20bind\x20to\x20this\x20workspace'},{'name':a163_0x44ac2b(0x9a),'type':a163_0x44ac2b(0xba),'description':'Target\x20environment','enum':[...RABETBASE_ENV_VALUES]},{'name':a163_0x44ac2b(0x9f),'type':'string','description':a163_0x44ac2b(0xa3)},{'name':a163_0x44ac2b(0xb8),'type':a163_0x44ac2b(0xba),'description':a163_0x44ac2b(0xcb),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a163_0x44ac2b(0x9b),'type':a163_0x44ac2b(0xc1),'description':a163_0x44ac2b(0x96)},{'name':a163_0x44ac2b(0xc0),'type':a163_0x44ac2b(0xba),'description':a163_0x44ac2b(0xb9),'enum':[...RISK_LEVEL_VALUES]},{'name':a163_0x44ac2b(0xa6),'type':a163_0x44ac2b(0xba),'description':a163_0x44ac2b(0xa9)}];function isRecord(_0x3753fb){const _0x50d827=a163_0x44ac2b;return!!_0x3753fb&&typeof _0x3753fb===_0x50d827(0x95)&&!Array[_0x50d827(0xbb)](_0x3753fb);}function assertValidAppcode(_0x3f80ac){const _0x413d0a=a163_0x44ac2b,{valid:_0x2934b9,message:_0x1560b4}=validateAppcode(_0x3f80ac);if(!_0x2934b9)throw CliErrors[_0x413d0a(0xad)]('Invalid\x20appcode:\x20'+_0x3f80ac,_0x1560b4);}function sanitizeProfile(_0x35fe48){if(!isRecord(_0x35fe48))return{};const _0x1171ff={};for(const _0x556e46 of SAFE_PROFILE_KEYS){if(_0x35fe48[_0x556e46]!==undefined)_0x1171ff[_0x556e46]=_0x35fe48[_0x556e46];}return _0x1171ff;}function cloneProfile(_0x139233){return isRecord(_0x139233)?{..._0x139233}:{};}function collectWorkspaceProfileOverrides(_0x1c0c54){const _0x3ceaed=a163_0x44ac2b,_0x3e36a4={},_0x410c1f=_0x1c0c54[_0x3ceaed(0x9e)]('env'),_0x157c13=_0x1c0c54['str'](_0x3ceaed(0x9f)),_0x6419f8=_0x1c0c54['str'](_0x3ceaed(0xb8)),_0x468aa1=_0x1c0c54[_0x3ceaed(0xb3)](_0x3ceaed(0x9b)),_0x366e7c=_0x1c0c54[_0x3ceaed(0x9e)](_0x3ceaed(0xc0)),_0x5f2f85=_0x1c0c54[_0x3ceaed(0x9e)](_0x3ceaed(0xa6));if(_0x410c1f)_0x3e36a4[_0x3ceaed(0x9a)]=_0x410c1f;if(_0x157c13)_0x3e36a4[_0x3ceaed(0x9f)]=_0x157c13;if(_0x6419f8)_0x3e36a4[_0x3ceaed(0x9d)]=_0x6419f8;if(_0x468aa1!==undefined&&_0x468aa1!=='')_0x3e36a4['pageSize']=Number(_0x468aa1);if(_0x366e7c)_0x3e36a4['riskLevel']=_0x366e7c;if(_0x5f2f85)_0x3e36a4['locale']=_0x5f2f85;return _0x3e36a4;}async function validateWorkspaceArgs(_0xe67deb){const _0x51b2f4=a163_0x44ac2b,_0x10c8f1=_0xe67deb[_0x51b2f4(0x9e)](_0x51b2f4(0xb2))[_0x51b2f4(0xa7)](),_0xfdb823=_0xe67deb[_0x51b2f4(0x9e)](_0x51b2f4(0xc7))[_0x51b2f4(0xa7)]();if(!_0x10c8f1&&!_0xfdb823)throw CliErrors[_0x51b2f4(0xad)](_0x51b2f4(0xa4),'Use\x20`'+CLI_BIN_NAME+_0x51b2f4(0xc5)+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`.');if(_0xfdb823)assertValidAppcode(_0xfdb823);}function resolveKnownApps(){const _0xbddf83=a163_0x44ac2b,{config:_0x564e18,layers:_0x4afdfd}=readRawConfigWithLayers(),_0xc801b8=isRecord(_0x564e18['apps'])?_0x564e18['apps']:{},_0x51ea04=isRecord(_0x4afdfd['globalConfig']['apps'])?_0x4afdfd[_0xbddf83(0xa2)][_0xbddf83(0x97)]:{};return{..._0x51ea04,..._0xc801b8};}async function configureWorkspace(_0x403a3d,_0x3f8e83){const _0x4b6e73=a163_0x44ac2b,_0x3ee906=_0x403a3d['str'](_0x4b6e73(0xb2))[_0x4b6e73(0xa7)](),_0xac0383=_0x403a3d[_0x4b6e73(0x9e)]('appcode')[_0x4b6e73(0xa7)](),_0xd66088=_0x3ee906||_0xac0383;if(!_0xd66088)throw CliErrors[_0x4b6e73(0xad)](_0x4b6e73(0xa4),_0x4b6e73(0xa5)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'+CLI_BIN_NAME+_0x4b6e73(0xbe));if(_0xac0383)assertValidAppcode(_0xac0383);const _0x3690f2=resolveWriteConfigPath(_0x4b6e73(0xc3)),_0x2c0a6c=readConfigFile(_0x3690f2),_0x1afebf=resolveKnownApps(),_0x1aeb00=isRecord(_0x2c0a6c['apps'])?{..._0x2c0a6c[_0x4b6e73(0x97)]}:{},_0x1b0913=cloneProfile(_0x1aeb00[_0xd66088]),_0x45c6c8=sanitizeProfile(_0x1afebf[_0xd66088]),_0x3dbb49=_0xac0383?{}:_0x45c6c8,_0x4ae4b4=_0xac0383||_0x3dbb49[_0x4b6e73(0xc7)];if(!_0x4ae4b4){const _0x1d06e2=Object[_0x4b6e73(0xca)](_0x1afebf),_0x111267=_0x1d06e2[_0x4b6e73(0xb7)]===0x0?_0x4b6e73(0xa5)+CLI_BIN_NAME+_0x4b6e73(0x99)+_0x3f8e83+_0x4b6e73(0xb6)+_0xd66088+_0x4b6e73(0xa1):_0x4b6e73(0xbc)+_0x1d06e2[_0x4b6e73(0xa8)](',\x20');throw CliErrors[_0x4b6e73(0xad)](_0x4b6e73(0xac)+_0xd66088+_0x4b6e73(0xae),_0x111267);}assertValidAppcode(String(_0x4ae4b4));const _0x1abda8={..._0x3dbb49,..._0x1b0913,'appcode':String(_0x4ae4b4),...collectWorkspaceProfileOverrides(_0x403a3d)};return _0x1aeb00[_0xd66088]=_0x1abda8,_0x2c0a6c[_0x4b6e73(0x97)]=_0x1aeb00,_0x2c0a6c[_0x4b6e73(0xb1)]=_0xd66088,delete _0x2c0a6c['appcode'],delete _0x2c0a6c[_0x4b6e73(0xb2)],_0x1abda8[_0x4b6e73(0x9a)]&&(_0x2c0a6c['env']=_0x1abda8[_0x4b6e73(0x9a)]),writeConfigFile(_0x3690f2,_0x2c0a6c),{'ok':!![],'message':'Workspace\x20'+(_0x3f8e83===_0x4b6e73(0xb4)?'initialized':'updated')+':\x20'+_0xd66088+_0x4b6e73(0xcd)+_0x1abda8[_0x4b6e73(0xc7)]+_0x4b6e73(0xcc)+_0x3690f2+_0x4b6e73(0x9c),'data':{'operation':_0x4b6e73(0xb0)+_0x3f8e83,'configPath':_0x3690f2,'app':_0xd66088,'appcode':_0x1abda8[_0x4b6e73(0xc7)],'env':_0x1abda8[_0x4b6e73(0x9a)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':a163_0x44ac2b(0xaf),'command':'init','description':a163_0x44ac2b(0xbd),'risk':a163_0x44ac2b(0xc8),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x4d01da=>configureWorkspace(_0x4d01da,a163_0x44ac2b(0xb4))},workspaceUseDefinition={'service':a163_0x44ac2b(0xaf),'command':a163_0x44ac2b(0xaa),'description':a163_0x44ac2b(0x98),'risk':a163_0x44ac2b(0xc8),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x22847a=>configureWorkspace(_0x22847a,a163_0x44ac2b(0xaa))};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
1
+ const a163_0x2af64c=a163_0x2189;(function(_0x5d8859,_0x3037d2){const _0x4517a3=a163_0x2189,_0x406f1f=_0x5d8859();while(!![]){try{const _0x4254be=-parseInt(_0x4517a3(0x179))/0x1*(-parseInt(_0x4517a3(0x184))/0x2)+-parseInt(_0x4517a3(0x16a))/0x3+-parseInt(_0x4517a3(0x16b))/0x4+parseInt(_0x4517a3(0x155))/0x5+-parseInt(_0x4517a3(0x159))/0x6*(-parseInt(_0x4517a3(0x150))/0x7)+-parseInt(_0x4517a3(0x170))/0x8*(-parseInt(_0x4517a3(0x16e))/0x9)+-parseInt(_0x4517a3(0x169))/0xa;if(_0x4254be===_0x3037d2)break;else _0x406f1f['push'](_0x406f1f['shift']());}catch(_0x15c2f8){_0x406f1f['push'](_0x406f1f['shift']());}}}(a163_0x204c,0x8ac91));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';import{workspaceAddDefinition}from'../../commands/workspace/add.js';import{workspaceRemoveDefinition}from'../../commands/workspace/remove.js';const WORKSPACE_USAGE=CLI_BIN_NAME+a163_0x2af64c(0x161),SAFE_PROFILE_KEYS=[a163_0x2af64c(0x17e),'env',a163_0x2af64c(0x152),a163_0x2af64c(0x177),a163_0x2af64c(0x168),a163_0x2af64c(0x16c),a163_0x2af64c(0x17b)],workspaceFlags=[{'name':'app','type':a163_0x2af64c(0x154),'description':a163_0x2af64c(0x158)},{'name':a163_0x2af64c(0x17e),'type':a163_0x2af64c(0x154),'description':a163_0x2af64c(0x178)},{'name':'env','type':'string','description':a163_0x2af64c(0x181),'enum':[...RABETBASE_ENV_VALUES]},{'name':a163_0x2af64c(0x152),'type':a163_0x2af64c(0x154),'description':a163_0x2af64c(0x14e)},{'name':a163_0x2af64c(0x171),'type':a163_0x2af64c(0x154),'description':'Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':'pageSize','type':a163_0x2af64c(0x15c),'description':a163_0x2af64c(0x17c)},{'name':a163_0x2af64c(0x16c),'type':a163_0x2af64c(0x154),'description':a163_0x2af64c(0x15f),'enum':[...RISK_LEVEL_VALUES]},{'name':a163_0x2af64c(0x17b),'type':a163_0x2af64c(0x154),'description':a163_0x2af64c(0x166)}];function a163_0x204c(){const _0x3fda55=['3818740quSmoA','initialized','\x20(appcode:\x20','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','24VCvjbJ','App\x20\x22','object','number','validation','Switch\x20the\x20current\x20workspace\x20app\x20binding','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','Initialize\x20the\x20current\x20workspace\x20app\x20binding','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','\x20workspace\x20use\x20--app\x20<name>`.','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','Use\x20`','Invalid\x20appcode:\x20','Locale\x20for\x20this\x20workspace\x20app\x20profile','Workspace\x20','pageSize','4529270wDxfLX','791085dVNZdR','3428600KpRhPO','riskLevel','write','7199046EmEZbm','app','8Xifcta','defaultFormat','\x20--app\x20','\x20--appcode\x20<code>`.','\x22\x20not\x20found.','use','isArray','format','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','3KIrvhS','env','locale','Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile','str','appcode','trim','workspace.','Target\x20environment','init','updated','77194LFcyJx','join','apps','length',').\x20Config:\x20','API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile','defaultApp','809907EVVfHb','globalConfig','apiDir','Missing\x20workspace\x20app\x20selector.','string'];a163_0x204c=function(){return _0x3fda55;};return a163_0x204c();}function isRecord(_0x4f0945){const _0x2501a9=a163_0x2af64c;return!!_0x4f0945&&typeof _0x4f0945===_0x2501a9(0x15b)&&!Array[_0x2501a9(0x176)](_0x4f0945);}function assertValidAppcode(_0x392ac3){const _0xe4ce41=a163_0x2af64c,{valid:_0x5cf707,message:_0x31d625}=validateAppcode(_0x392ac3);if(!_0x5cf707)throw CliErrors['validation'](_0xe4ce41(0x165)+_0x392ac3,_0x31d625);}function sanitizeProfile(_0x230fa4){if(!isRecord(_0x230fa4))return{};const _0x325eba={};for(const _0x5006bb of SAFE_PROFILE_KEYS){if(_0x230fa4[_0x5006bb]!==undefined)_0x325eba[_0x5006bb]=_0x230fa4[_0x5006bb];}return _0x325eba;}function cloneProfile(_0x43831c){return isRecord(_0x43831c)?{..._0x43831c}:{};}function collectWorkspaceProfileOverrides(_0x499b99){const _0x2de1b0=a163_0x2af64c,_0x3dab88={},_0x4a8c59=_0x499b99['str']('env'),_0x2aa117=_0x499b99[_0x2de1b0(0x17d)](_0x2de1b0(0x152)),_0x4a574a=_0x499b99[_0x2de1b0(0x17d)](_0x2de1b0(0x171)),_0x1b1eba=_0x499b99['flag'](_0x2de1b0(0x168)),_0xad416c=_0x499b99[_0x2de1b0(0x17d)](_0x2de1b0(0x16c)),_0x1cf258=_0x499b99[_0x2de1b0(0x17d)](_0x2de1b0(0x17b));if(_0x4a8c59)_0x3dab88[_0x2de1b0(0x17a)]=_0x4a8c59;if(_0x2aa117)_0x3dab88[_0x2de1b0(0x152)]=_0x2aa117;if(_0x4a574a)_0x3dab88[_0x2de1b0(0x177)]=_0x4a574a;if(_0x1b1eba!==undefined&&_0x1b1eba!=='')_0x3dab88[_0x2de1b0(0x168)]=Number(_0x1b1eba);if(_0xad416c)_0x3dab88[_0x2de1b0(0x16c)]=_0xad416c;if(_0x1cf258)_0x3dab88['locale']=_0x1cf258;return _0x3dab88;}function a163_0x2189(_0x13c525,_0x3dd875){_0x13c525=_0x13c525-0x14b;const _0x204cfa=a163_0x204c();let _0x218990=_0x204cfa[_0x13c525];return _0x218990;}async function validateWorkspaceArgs(_0x534be6){const _0x2ed292=a163_0x2af64c,_0x1e5bde=_0x534be6[_0x2ed292(0x17d)](_0x2ed292(0x16f))[_0x2ed292(0x17f)](),_0x7bc4ee=_0x534be6[_0x2ed292(0x17d)](_0x2ed292(0x17e))[_0x2ed292(0x17f)]();if(!_0x1e5bde&&!_0x7bc4ee)throw CliErrors[_0x2ed292(0x15d)](_0x2ed292(0x153),_0x2ed292(0x164)+CLI_BIN_NAME+_0x2ed292(0x163)+CLI_BIN_NAME+_0x2ed292(0x162));if(_0x7bc4ee)assertValidAppcode(_0x7bc4ee);}function resolveKnownApps(){const _0x40ea4f=a163_0x2af64c,{config:_0xebcd00,layers:_0x489486}=readRawConfigWithLayers(),_0x39509d=isRecord(_0xebcd00[_0x40ea4f(0x14b)])?_0xebcd00[_0x40ea4f(0x14b)]:{},_0x37e24c=isRecord(_0x489486['globalConfig']['apps'])?_0x489486[_0x40ea4f(0x151)][_0x40ea4f(0x14b)]:{};return{..._0x37e24c,..._0x39509d};}async function configureWorkspace(_0x7c926d,_0x190c2f){const _0x307c1b=a163_0x2af64c,_0x28fdf3=_0x7c926d[_0x307c1b(0x17d)](_0x307c1b(0x16f))[_0x307c1b(0x17f)](),_0x46fd88=_0x7c926d[_0x307c1b(0x17d)](_0x307c1b(0x17e))[_0x307c1b(0x17f)](),_0x177980=_0x28fdf3||_0x46fd88;if(!_0x177980)throw CliErrors['validation'](_0x307c1b(0x153),'Use\x20`'+CLI_BIN_NAME+_0x307c1b(0x163)+CLI_BIN_NAME+_0x307c1b(0x162));if(_0x46fd88)assertValidAppcode(_0x46fd88);const _0x42aa45=resolveWriteConfigPath('project'),_0x418224=readConfigFile(_0x42aa45),_0x292d29=resolveKnownApps(),_0x597e12=isRecord(_0x418224[_0x307c1b(0x14b)])?{..._0x418224['apps']}:{},_0x4af12b=cloneProfile(_0x597e12[_0x177980]),_0x1e0df5=sanitizeProfile(_0x292d29[_0x177980]),_0x56bdd6=_0x46fd88?{}:_0x1e0df5,_0xe2d2eb=_0x46fd88||_0x56bdd6[_0x307c1b(0x17e)];if(!_0xe2d2eb){const _0x495e77=Object['keys'](_0x292d29),_0x5244f4=_0x495e77[_0x307c1b(0x14c)]===0x0?_0x307c1b(0x164)+CLI_BIN_NAME+'\x20workspace\x20'+_0x190c2f+_0x307c1b(0x172)+_0x177980+_0x307c1b(0x173):'Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20'+_0x495e77[_0x307c1b(0x185)](',\x20');throw CliErrors['validation'](_0x307c1b(0x15a)+_0x177980+_0x307c1b(0x174),_0x5244f4);}assertValidAppcode(String(_0xe2d2eb));const _0x87f67c={..._0x56bdd6,..._0x4af12b,'appcode':String(_0xe2d2eb),...collectWorkspaceProfileOverrides(_0x7c926d)};return _0x597e12[_0x177980]=_0x87f67c,_0x418224[_0x307c1b(0x14b)]=_0x597e12,_0x418224[_0x307c1b(0x14f)]=_0x177980,delete _0x418224[_0x307c1b(0x17e)],delete _0x418224[_0x307c1b(0x16f)],_0x87f67c[_0x307c1b(0x17a)]&&(_0x418224[_0x307c1b(0x17a)]=_0x87f67c[_0x307c1b(0x17a)]),writeConfigFile(_0x42aa45,_0x418224),{'ok':!![],'message':_0x307c1b(0x167)+(_0x190c2f===_0x307c1b(0x182)?_0x307c1b(0x156):_0x307c1b(0x183))+':\x20'+_0x177980+_0x307c1b(0x157)+_0x87f67c[_0x307c1b(0x17e)]+_0x307c1b(0x14d)+_0x42aa45+'.\x20Credentials:\x20not\x20written.','data':{'operation':_0x307c1b(0x180)+_0x190c2f,'configPath':_0x42aa45,'app':_0x177980,'appcode':_0x87f67c[_0x307c1b(0x17e)],'env':_0x87f67c[_0x307c1b(0x17a)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':'workspace','command':a163_0x2af64c(0x182),'description':a163_0x2af64c(0x160),'risk':a163_0x2af64c(0x16d),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x1fe418=>configureWorkspace(_0x1fe418,'init')},workspaceUseDefinition={'service':'workspace','command':a163_0x2af64c(0x175),'description':a163_0x2af64c(0x15e),'risk':a163_0x2af64c(0x16d),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x1087d7=>configureWorkspace(_0x1087d7,a163_0x2af64c(0x175))};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
@@ -1 +1 @@
1
- const a164_0x3d5191=a164_0x29e8;(function(_0x225c5b,_0x40866c){const _0x33caea=a164_0x29e8,_0x3e2d6a=_0x225c5b();while(!![]){try{const _0x69d6d9=parseInt(_0x33caea(0x8f))/0x1+-parseInt(_0x33caea(0x93))/0x2+-parseInt(_0x33caea(0x97))/0x3+parseInt(_0x33caea(0x98))/0x4+parseInt(_0x33caea(0x92))/0x5+-parseInt(_0x33caea(0x94))/0x6+parseInt(_0x33caea(0x99))/0x7;if(_0x69d6d9===_0x40866c)break;else _0x3e2d6a['push'](_0x3e2d6a['shift']());}catch(_0xf8d8cf){_0x3e2d6a['push'](_0x3e2d6a['shift']());}}}(a164_0x5f36,0xe7cb0));import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';function a164_0x29e8(_0x54b41b,_0x2d1624){_0x54b41b=_0x54b41b-0x8f;const _0x5f369b=a164_0x5f36();let _0x29e890=_0x5f369b[_0x54b41b];return _0x29e890;}export const workspaceRemoveDefinition={'service':a164_0x3d5191(0x90),'command':a164_0x3d5191(0x96),'description':a164_0x3d5191(0x91),'risk':'high-risk-write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a164_0x3d5191(0x95),'description':'App\x20profile\x20name\x20to\x20remove','required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x53f7ac=>validateAppName(_0x53f7ac,'workspace\x20remove'),'execute':_0x1ce94f=>runAppRemove(_0x1ce94f,a164_0x3d5191(0x9a))};function a164_0x5f36(){const _0x16e826=['Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','5983715dHLoQu','2602840YJEZPv','9958752pODBcF','name','remove','545160kxplTz','4139388FvSLCM','2409736UKCAcU','workspace\x20remove','1516518Agocnh','workspace'];a164_0x5f36=function(){return _0x16e826;};return a164_0x5f36();}
1
+ const a164_0x32eb92=a164_0xe195;(function(_0xfbf0fe,_0x3352d0){const _0x360ca9=a164_0xe195,_0x3ef69f=_0xfbf0fe();while(!![]){try{const _0x3858e5=parseInt(_0x360ca9(0xa4))/0x1*(-parseInt(_0x360ca9(0xa0))/0x2)+-parseInt(_0x360ca9(0xa2))/0x3*(-parseInt(_0x360ca9(0xa3))/0x4)+-parseInt(_0x360ca9(0x99))/0x5+-parseInt(_0x360ca9(0x9f))/0x6+parseInt(_0x360ca9(0xa8))/0x7+-parseInt(_0x360ca9(0x9a))/0x8+parseInt(_0x360ca9(0xa1))/0x9;if(_0x3858e5===_0x3352d0)break;else _0x3ef69f['push'](_0x3ef69f['shift']());}catch(_0x290cc5){_0x3ef69f['push'](_0x3ef69f['shift']());}}}(a164_0x1159,0x1f1a2));import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';function a164_0x1159(){const _0x264d8e=['remove','App\x20profile\x20name\x20to\x20remove','1030032WRTqsQ','36418TLiwAN','3983238XTCKdn','187386ywhuuh','4ekgauG','1ReTZOj','workspace\x20remove','name','high-risk-write','84070tzBHDU','363610HGwwrm','1016456lHNqiR','Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','workspace'];a164_0x1159=function(){return _0x264d8e;};return a164_0x1159();}function a164_0xe195(_0x2ce577,_0x59ac3b){_0x2ce577=_0x2ce577-0x99;const _0x115971=a164_0x1159();let _0xe19519=_0x115971[_0x2ce577];return _0xe19519;}export const workspaceRemoveDefinition={'service':a164_0x32eb92(0x9c),'command':a164_0x32eb92(0x9d),'description':a164_0x32eb92(0x9b),'risk':a164_0x32eb92(0xa7),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a164_0x32eb92(0xa6),'description':a164_0x32eb92(0x9e),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x29d3c5=>validateAppName(_0x29d3c5,a164_0x32eb92(0xa5)),'execute':_0x4c8434=>runAppRemove(_0x4c8434,'workspace\x20remove')};
@@ -1 +1 @@
1
- const a165_0x364542=a165_0xce96;(function(_0xcaa8aa,_0x131c77){const _0x4b7b5a=a165_0xce96,_0x2c7beb=_0xcaa8aa();while(!![]){try{const _0x58f3d5=parseInt(_0x4b7b5a(0xcc))/0x1*(-parseInt(_0x4b7b5a(0xf0))/0x2)+parseInt(_0x4b7b5a(0xca))/0x3+parseInt(_0x4b7b5a(0xd9))/0x4+parseInt(_0x4b7b5a(0xd5))/0x5*(-parseInt(_0x4b7b5a(0xd7))/0x6)+-parseInt(_0x4b7b5a(0xe6))/0x7*(-parseInt(_0x4b7b5a(0xe4))/0x8)+-parseInt(_0x4b7b5a(0xe5))/0x9+parseInt(_0x4b7b5a(0xf1))/0xa;if(_0x58f3d5===_0x131c77)break;else _0x2c7beb['push'](_0x2c7beb['shift']());}catch(_0x1c3ab0){_0x2c7beb['push'](_0x2c7beb['shift']());}}}(a165_0x13a3,0x4375e));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',a165_0x364542(0xda),'locale',a165_0x364542(0xcd),a165_0x364542(0xef)];export const TOP_LEVEL_CONFIG_KEYS=new Set([a165_0x364542(0xc8),a165_0x364542(0xdf),'locale',a165_0x364542(0xcd),a165_0x364542(0xe2),a165_0x364542(0xda),a165_0x364542(0xd4)]);function a165_0xce96(_0x4e5695,_0x227cfd){_0x4e5695=_0x4e5695-0xc8;const _0x13a350=a165_0x13a3();let _0xce9611=_0x13a350[_0x4e5695];return _0xce9611;}export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x2acee5){const _0x5c4eb4=a165_0x364542;return[..._0x2acee5][_0x5c4eb4(0xd1)](',\x20');}function a165_0x13a3(){const _0x202bc5=['cookie','filter','8gPWjvN','3548520UyrSsM','1846481cUZRUB','Locale','Auth\x20cookie','trim','Target\x20environment','API\x20directory\x20path','pageSize','string','has','riskLevel','8Pfvyej','5998310eOlesj','appcode','Risk\x20level','1644159dZnqGM','locale','134843WqfNCC','format','zh-CN','defaultApp','inherit','join','keys','app','apiDir','85GQVoCF','en-US','114918XEVYRM','number','495616WASpdQ','accessKey','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','Default\x20page\x20size','apps','toLowerCase','env','Config\x20key\x20(','length'];a165_0x13a3=function(){return _0x202bc5;};return a165_0x13a3();}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x2dbe63){const _0x13cfad=a165_0x364542;return TOP_LEVEL_CONFIG_KEYS[_0x13cfad(0xee)](_0x2dbe63);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x13df37=a165_0x364542;return _0x13df37(0xe0)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':a165_0x364542(0xdf),'apiDir':a165_0x364542(0xd4),'cookie':a165_0x364542(0xe2),'accessKey':a165_0x364542(0xda),'defaultFormat':a165_0x364542(0xcd),'pageSize':a165_0x364542(0xec),'riskLevel':'riskLevel','locale':'locale'};export function getAppProfileFlagDefs(){const _0x4fa24a=a165_0x364542;return[{'name':'env','type':_0x4fa24a(0xed),'description':_0x4fa24a(0xea),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x4fa24a(0xd4),'type':_0x4fa24a(0xed),'description':_0x4fa24a(0xeb)},{'name':_0x4fa24a(0xe2),'type':_0x4fa24a(0xed),'description':_0x4fa24a(0xe8),'hidden':!![]},{'name':_0x4fa24a(0xda),'type':_0x4fa24a(0xed),'description':'Access\x20key','hidden':!![]},{'name':'defaultFormat','type':'string','description':_0x4fa24a(0xdb),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':'pageSize','type':_0x4fa24a(0xd8),'description':_0x4fa24a(0xdc)},{'name':_0x4fa24a(0xef),'type':_0x4fa24a(0xed),'description':_0x4fa24a(0xc9),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x4fa24a(0xcb),'type':'string','description':_0x4fa24a(0xe7)}];}export function collectAppProfileOverrides(_0x33a22e){const _0xb29959=a165_0x364542,_0x480e5c={};for(const [_0x477f00,_0x65c0a]of Object['entries'](APP_PROFILE_FLAG_KEY_MAP)){const _0x4961a9=_0x33a22e(_0x477f00);if(!_0x4961a9)continue;_0x480e5c[_0x65c0a]=_0x65c0a===_0xb29959(0xec)?Number(_0x4961a9):_0x4961a9;}return _0x480e5c;}export function buildAppProfileListFields(_0x48bdd7){const _0x5121e4=a165_0x364542;return{'env':_0x48bdd7[_0x5121e4(0xdf)]??null,'apiDir':_0x48bdd7[_0x5121e4(0xd4)]??null,'hasCookie':!!_0x48bdd7[_0x5121e4(0xe2)],'hasAccessKey':!!_0x48bdd7[_0x5121e4(0xda)],'format':_0x48bdd7[_0x5121e4(0xcd)]??null,'pageSize':_0x48bdd7[_0x5121e4(0xec)]??null,'riskLevel':_0x48bdd7['riskLevel']??null,'locale':_0x48bdd7[_0x5121e4(0xcb)]??null};}export function buildAppDoctorFields(_0x32092f,_0x330356){const _0x1741ec=a165_0x364542;return{'env':{'value':_0x32092f['env']||_0x330356[_0x1741ec(0xdf)],'source':_0x32092f['env']?_0x1741ec(0xd3):_0x1741ec(0xd0)},'apiDir':{'value':_0x32092f[_0x1741ec(0xd4)]||_0x330356[_0x1741ec(0xd4)],'source':_0x32092f[_0x1741ec(0xd4)]?_0x1741ec(0xd3):_0x1741ec(0xd0)},'cookie':{'value':_0x32092f[_0x1741ec(0xe2)]||_0x330356[_0x1741ec(0xe2)],'source':_0x32092f[_0x1741ec(0xe2)]?_0x1741ec(0xd3):_0x1741ec(0xd0)},'accessKey':{'value':_0x32092f[_0x1741ec(0xda)]||_0x330356['accessKey'],'source':_0x32092f['accessKey']?_0x1741ec(0xd3):_0x1741ec(0xd0)}};}export function buildCanonicalAppConfig(_0x2ca8e2,_0x2cd22a){const _0x37db93=a165_0x364542,_0x2dd3a6=_0x2ca8e2['map'](_0x4754c9=>String(_0x4754c9||'')[_0x37db93(0xe9)]())[_0x37db93(0xe3)](Boolean);if(_0x2dd3a6[_0x37db93(0xe1)]===0x0)return{};const _0x2e79fe={};for(const _0x55144a of _0x2dd3a6){_0x2e79fe[_0x55144a]=_0x2cd22a?{'appcode':_0x55144a,'env':_0x2cd22a}:{'appcode':_0x55144a};}return{'apps':_0x2e79fe,'defaultApp':_0x2dd3a6[0x0]};}export function buildCanonicalProjectConfig(_0x1b2ce2,_0x40a7bc){const _0x53f1e8=a165_0x364542,{appCodes:appCodes=[],env:_0x1e8e87,metadata:_0x53340d}=_0x40a7bc,_0x164ac8={..._0x1b2ce2,..._0x53340d||{}};delete _0x164ac8[_0x53f1e8(0xc8)],delete _0x164ac8[_0x53f1e8(0xd3)];if(_0x1e8e87)_0x164ac8[_0x53f1e8(0xdf)]=_0x1e8e87;else!_0x164ac8[_0x53f1e8(0xdf)]&&(_0x164ac8[_0x53f1e8(0xdf)]=DEFAULT_CONFIG_VALUES[_0x53f1e8(0xdf)]);const _0x41ed8c=buildCanonicalAppConfig(appCodes,_0x164ac8[_0x53f1e8(0xdf)]);return Object[_0x53f1e8(0xd2)](_0x41ed8c)[_0x53f1e8(0xe1)]>0x0&&(_0x164ac8[_0x53f1e8(0xdd)]=_0x41ed8c[_0x53f1e8(0xdd)],_0x164ac8[_0x53f1e8(0xcf)]=_0x41ed8c[_0x53f1e8(0xcf)]),_0x164ac8;}const LOCALE_MAP={'zh':a165_0x364542(0xce),'zh-cn':'zh-CN','zh_cn':a165_0x364542(0xce),'en':a165_0x364542(0xd6),'en-us':a165_0x364542(0xd6),'en_us':a165_0x364542(0xd6)};export function normalizeLocale(_0x359f2b){const _0x1dd88e=a165_0x364542;if(!_0x359f2b)return null;return LOCALE_MAP[_0x359f2b[_0x1dd88e(0xde)]()]??null;}
1
+ const a165_0x242934=a165_0xc836;function a165_0x16c1(){const _0x330baa=['425nfEKtC','app','apps','zh-CN','filter','en-US','API\x20directory\x20path','format','join','toLowerCase','trim','87814JBQWLq','keys','308sIXiIY','env','accessKey','has','382096XjPXXI','2789034JLpeBV','Default\x20page\x20size','entries','riskLevel','41324Gadtuv','32556uSGtGC','length','number','Config\x20key\x20(','defaultFormat','Risk\x20level','cookie','inherit','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','string','pageSize','48344hBHzLW','locale','apiDir','map','Access\x20key','16371KXMRIP','5990eVXycQ','appcode','Auth\x20cookie','Target\x20environment','defaultApp'];a165_0x16c1=function(){return _0x330baa;};return a165_0x16c1();}(function(_0x4d6836,_0x9c015e){const _0x1bbdd9=a165_0xc836,_0x580aac=_0x4d6836();while(!![]){try{const _0x33e65f=parseInt(_0x1bbdd9(0x8e))/0x1+-parseInt(_0x1bbdd9(0x94))/0x2+parseInt(_0x1bbdd9(0x95))/0x3+parseInt(_0x1bbdd9(0x99))/0x4+parseInt(_0x1bbdd9(0x83))/0x5*(parseInt(_0x1bbdd9(0x9a))/0x6)+parseInt(_0x1bbdd9(0x90))/0x7*(parseInt(_0x1bbdd9(0x78))/0x8)+parseInt(_0x1bbdd9(0x7d))/0x9*(-parseInt(_0x1bbdd9(0x7e))/0xa);if(_0x33e65f===_0x9c015e)break;else _0x580aac['push'](_0x580aac['shift']());}catch(_0x841560){_0x580aac['push'](_0x580aac['shift']());}}}(a165_0x16c1,0x73cb8));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',a165_0x242934(0x92),a165_0x242934(0x79),a165_0x242934(0x8a),a165_0x242934(0x98)];export const TOP_LEVEL_CONFIG_KEYS=new Set(['appcode',a165_0x242934(0x91),a165_0x242934(0x79),a165_0x242934(0x8a),a165_0x242934(0x73),'accessKey',a165_0x242934(0x7a)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x30a096){const _0xa02488=a165_0x242934;return[..._0x30a096][_0xa02488(0x8b)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x424383){const _0x4df333=a165_0x242934;return TOP_LEVEL_CONFIG_KEYS[_0x4df333(0x93)](_0x424383);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x22346f=a165_0x242934;return _0x22346f(0x9d)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':'env','apiDir':'apiDir','cookie':a165_0x242934(0x73),'accessKey':a165_0x242934(0x92),'defaultFormat':a165_0x242934(0x8a),'pageSize':'pageSize','riskLevel':a165_0x242934(0x98),'locale':a165_0x242934(0x79)};export function getAppProfileFlagDefs(){const _0x1684f4=a165_0x242934;return[{'name':_0x1684f4(0x91),'type':'string','description':_0x1684f4(0x81),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x1684f4(0x7a),'type':'string','description':_0x1684f4(0x89)},{'name':_0x1684f4(0x73),'type':_0x1684f4(0x76),'description':_0x1684f4(0x80),'hidden':!![]},{'name':_0x1684f4(0x92),'type':_0x1684f4(0x76),'description':_0x1684f4(0x7c),'hidden':!![]},{'name':_0x1684f4(0x9e),'type':_0x1684f4(0x76),'description':_0x1684f4(0x75),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':'pageSize','type':_0x1684f4(0x9c),'description':_0x1684f4(0x96)},{'name':'riskLevel','type':'string','description':_0x1684f4(0x9f),'enum':[...RISK_LEVEL_VALUES]},{'name':'locale','type':'string','description':'Locale'}];}export function collectAppProfileOverrides(_0x591ab7){const _0x1fda7c=a165_0x242934,_0x190499={};for(const [_0xfe6b1f,_0xeea780]of Object[_0x1fda7c(0x97)](APP_PROFILE_FLAG_KEY_MAP)){const _0x49797e=_0x591ab7(_0xfe6b1f);if(!_0x49797e)continue;_0x190499[_0xeea780]=_0xeea780===_0x1fda7c(0x77)?Number(_0x49797e):_0x49797e;}return _0x190499;}export function buildAppProfileListFields(_0x235777){const _0x2e3115=a165_0x242934;return{'env':_0x235777[_0x2e3115(0x91)]??null,'apiDir':_0x235777[_0x2e3115(0x7a)]??null,'hasCookie':!!_0x235777[_0x2e3115(0x73)],'hasAccessKey':!!_0x235777['accessKey'],'format':_0x235777[_0x2e3115(0x8a)]??null,'pageSize':_0x235777[_0x2e3115(0x77)]??null,'riskLevel':_0x235777[_0x2e3115(0x98)]??null,'locale':_0x235777[_0x2e3115(0x79)]??null};}export function buildAppDoctorFields(_0x54b6ae,_0xee12ed){const _0x3bd6b3=a165_0x242934;return{'env':{'value':_0x54b6ae[_0x3bd6b3(0x91)]||_0xee12ed[_0x3bd6b3(0x91)],'source':_0x54b6ae[_0x3bd6b3(0x91)]?_0x3bd6b3(0x84):'inherit'},'apiDir':{'value':_0x54b6ae[_0x3bd6b3(0x7a)]||_0xee12ed[_0x3bd6b3(0x7a)],'source':_0x54b6ae[_0x3bd6b3(0x7a)]?_0x3bd6b3(0x84):_0x3bd6b3(0x74)},'cookie':{'value':_0x54b6ae['cookie']||_0xee12ed[_0x3bd6b3(0x73)],'source':_0x54b6ae[_0x3bd6b3(0x73)]?_0x3bd6b3(0x84):_0x3bd6b3(0x74)},'accessKey':{'value':_0x54b6ae[_0x3bd6b3(0x92)]||_0xee12ed[_0x3bd6b3(0x92)],'source':_0x54b6ae['accessKey']?_0x3bd6b3(0x84):_0x3bd6b3(0x74)}};}export function buildCanonicalAppConfig(_0x69bb53,_0x10c331){const _0x2c40a7=a165_0x242934,_0x307160=_0x69bb53[_0x2c40a7(0x7b)](_0x53f6f9=>String(_0x53f6f9||'')[_0x2c40a7(0x8d)]())[_0x2c40a7(0x87)](Boolean);if(_0x307160[_0x2c40a7(0x9b)]===0x0)return{};const _0x1c2a76={};for(const _0xa882a1 of _0x307160){_0x1c2a76[_0xa882a1]=_0x10c331?{'appcode':_0xa882a1,'env':_0x10c331}:{'appcode':_0xa882a1};}return{'apps':_0x1c2a76,'defaultApp':_0x307160[0x0]};}export function buildCanonicalProjectConfig(_0xe0c898,_0x2c6339){const _0x2115ee=a165_0x242934,{appCodes:appCodes=[],env:_0x1ae976,metadata:_0x23e002}=_0x2c6339,_0x5ebd05={..._0xe0c898,..._0x23e002||{}};delete _0x5ebd05[_0x2115ee(0x7f)],delete _0x5ebd05[_0x2115ee(0x84)];if(_0x1ae976)_0x5ebd05[_0x2115ee(0x91)]=_0x1ae976;else!_0x5ebd05[_0x2115ee(0x91)]&&(_0x5ebd05[_0x2115ee(0x91)]=DEFAULT_CONFIG_VALUES[_0x2115ee(0x91)]);const _0x2293df=buildCanonicalAppConfig(appCodes,_0x5ebd05[_0x2115ee(0x91)]);return Object[_0x2115ee(0x8f)](_0x2293df)[_0x2115ee(0x9b)]>0x0&&(_0x5ebd05['apps']=_0x2293df[_0x2115ee(0x85)],_0x5ebd05[_0x2115ee(0x82)]=_0x2293df[_0x2115ee(0x82)]),_0x5ebd05;}function a165_0xc836(_0xba731f,_0x1aca8d){_0xba731f=_0xba731f-0x73;const _0x16c153=a165_0x16c1();let _0xc8361e=_0x16c153[_0xba731f];return _0xc8361e;}const LOCALE_MAP={'zh':a165_0x242934(0x86),'zh-cn':a165_0x242934(0x86),'zh_cn':'zh-CN','en':a165_0x242934(0x88),'en-us':'en-US','en_us':'en-US'};export function normalizeLocale(_0x217102){const _0x4c0e9d=a165_0x242934;if(!_0x217102)return null;return LOCALE_MAP[_0x217102[_0x4c0e9d(0x8c)]()]??null;}
@@ -1 +1 @@
1
- const a166_0x366675=a166_0x2d26;function a166_0x4ce5(){const _0xfb39d3=['2wIxkkV','791520diXeKd','https://g.lovrabet.com/dist/rabetbase-cli/config/index.json','16689664BobtxR','1578530ZkNlgp','3994697ibcdGX','3770776ZJyeol','533915fWaaLx','2345352FroubD'];a166_0x4ce5=function(){return _0xfb39d3;};return a166_0x4ce5();}(function(_0x3f8718,_0x1ab05a){const _0x3cd41e=a166_0x2d26,_0x5d8c6b=_0x3f8718();while(!![]){try{const _0x164144=-parseInt(_0x3cd41e(0xce))/0x1*(parseInt(_0x3cd41e(0xd0))/0x2)+-parseInt(_0x3cd41e(0xd1))/0x3+-parseInt(_0x3cd41e(0xcd))/0x4+parseInt(_0x3cd41e(0xcb))/0x5+parseInt(_0x3cd41e(0xcf))/0x6+-parseInt(_0x3cd41e(0xcc))/0x7+parseInt(_0x3cd41e(0xd3))/0x8;if(_0x164144===_0x1ab05a)break;else _0x5d8c6b['push'](_0x5d8c6b['shift']());}catch(_0x4e4e84){_0x5d8c6b['push'](_0x5d8c6b['shift']());}}}(a166_0x4ce5,0x75996));function a166_0x2d26(_0x8ba882,_0x4a7caa){_0x8ba882=_0x8ba882-0xcb;const _0x4ce529=a166_0x4ce5();let _0x2d26bb=_0x4ce529[_0x8ba882];return _0x2d26bb;}export const CLI_VERSION_POLICY_URL=a166_0x366675(0xd2);
1
+ function a166_0x4789(_0x22b2c8,_0xfbe408){_0x22b2c8=_0x22b2c8-0x8b;const _0x23f049=a166_0x23f0();let _0x4789ed=_0x23f049[_0x22b2c8];return _0x4789ed;}(function(_0x28b4df,_0x374795){const _0x26d858=a166_0x4789,_0x5f0870=_0x28b4df();while(!![]){try{const _0x397761=parseInt(_0x26d858(0x94))/0x1+parseInt(_0x26d858(0x8d))/0x2+parseInt(_0x26d858(0x90))/0x3*(-parseInt(_0x26d858(0x8c))/0x4)+parseInt(_0x26d858(0x8e))/0x5*(parseInt(_0x26d858(0x93))/0x6)+parseInt(_0x26d858(0x8b))/0x7*(-parseInt(_0x26d858(0x8f))/0x8)+-parseInt(_0x26d858(0x92))/0x9+parseInt(_0x26d858(0x91))/0xa;if(_0x397761===_0x374795)break;else _0x5f0870['push'](_0x5f0870['shift']());}catch(_0x51a32c){_0x5f0870['push'](_0x5f0870['shift']());}}}(a166_0x23f0,0xd2573));export const CLI_VERSION_POLICY_URL='https://g.lovrabet.com/dist/rabetbase-cli/config/index.json';function a166_0x23f0(){const _0x4fe3f5=['11577910slDMxh','3835008HrMneu','6XVBhRV','306880QlTUim','735XeSRFZ','16LSbxEp','1342786YkVhTU','7813230yKixsU','98328PRlaQR','840366SaKbgE'];a166_0x23f0=function(){return _0x4fe3f5;};return a166_0x23f0();}
@@ -1 +1 @@
1
- const a167_0x1b5098=a167_0x2654;(function(_0x107906,_0x47a44d){const _0x4cc5f8=a167_0x2654,_0x3a8e64=_0x107906();while(!![]){try{const _0x36786b=-parseInt(_0x4cc5f8(0x1f6))/0x1*(-parseInt(_0x4cc5f8(0x20b))/0x2)+parseInt(_0x4cc5f8(0x1df))/0x3*(parseInt(_0x4cc5f8(0x217))/0x4)+parseInt(_0x4cc5f8(0x1d2))/0x5*(parseInt(_0x4cc5f8(0x21d))/0x6)+-parseInt(_0x4cc5f8(0x20f))/0x7+parseInt(_0x4cc5f8(0x1e8))/0x8*(parseInt(_0x4cc5f8(0x232))/0x9)+-parseInt(_0x4cc5f8(0x21f))/0xa+parseInt(_0x4cc5f8(0x1ea))/0xb*(-parseInt(_0x4cc5f8(0x1ec))/0xc);if(_0x36786b===_0x47a44d)break;else _0x3a8e64['push'](_0x3a8e64['shift']());}catch(_0x2eeb5d){_0x3a8e64['push'](_0x3a8e64['shift']());}}}(a167_0x4c97,0x57ad5));function a167_0x4c97(){const _0x3cbda4=['Skip\x20confirmation\x20for\x20high-risk\x20writes','Select\x20app\x20profile\x20by\x20name','target','Confirm\x20destructive\x20action','app','Output\x20format','rabetbase','Show\x20help','Type\x20filter','functionNode','Page\x20size','2RPxLbT','all','dbid','Tags','208348DqURJi','Read\x20value\x20from\x20environment\x20variable','sqlcode','Rabetbase\x20CLI','file','SQL\x20code','Title','dryRun','96BEuqmT','Target\x20path','Config\x20key','Force\x20non-interactive\x20mode\x20(CI)','enable-bff-save','verbose','102RPlkBk','production\x20|\x20daily','1945230rFfPmW','map','Keyword\x20filter','schemas','Reveal\x20sensitive\x20value','remote','confirm','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','File\x20path','reveal','format','Apply\x20to\x20all','non-interactive','Schemas','SQL\x20name','skipImports','sql-name','Force\x20overwrite','Dataset\x20code','2339271glkHFx','@lovrabet/rabetbase-cli','enableBffSave','JSON\x20params','Page\x20number','sqlname','type','global','<expr>','Watch\x20mode','db-id','value','Preview\x20operation\x20without\x20executing','Override\x20appcode','Use\x20project\x20config\x20scope','60195eGXXmC','Use\x20global\x20config\x20scope','datasetcode','json\x20|\x20pretty\x20|\x20compress','yes','Verbose\x20output','watch','appcode','force','Clear','fromEnv','fromEntries','Use\x20remote','303fGSYQs','Environment','operation','dbId','tags','key','help','function-node','string','16NoUOVf','keyword','4301CvYTbk','title','19632xXpZBc','meowKey','boolean','project','description','Skip\x20import\x20generation','sql','env','Operation\x20type','params','496163gPGPoU','clear','sqlName','Record\x20ID','page','output','Read\x20value\x20from\x20stdin','from-env','nonInteractive','skip-imports'];a167_0x4c97=function(){return _0x3cbda4;};return a167_0x4c97();}export const CLI_BIN_NAME=a167_0x1b5098(0x206);export const CLI_DISPLAY_NAME=a167_0x1b5098(0x212);export const NPM_PACKAGE_NAME=a167_0x1b5098(0x233);function a167_0x2654(_0x2e4d8,_0x578e2d){_0x2e4d8=_0x2e4d8-0x1c8;const _0x4c975d=a167_0x4c97();let _0x265412=_0x4c975d[_0x2e4d8];return _0x265412;}export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':'appcode','type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x1d0),'hint':'<code>'},{'name':a167_0x1b5098(0x204),'meowKey':a167_0x1b5098(0x204),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x201),'hint':'<name>'},{'name':a167_0x1b5098(0x1f3),'meowKey':a167_0x1b5098(0x1f3),'type':'string','description':a167_0x1b5098(0x1e0),'hint':a167_0x1b5098(0x21e)},{'name':a167_0x1b5098(0x229),'meowKey':a167_0x1b5098(0x229),'type':'string','description':a167_0x1b5098(0x205),'hint':a167_0x1b5098(0x1d5)},{'name':'jq','meowKey':'jq','type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x226),'hint':a167_0x1b5098(0x1cb)},{'name':'dry-run','meowKey':a167_0x1b5098(0x216),'type':'boolean','description':a167_0x1b5098(0x1cf)},{'name':'yes','meowKey':a167_0x1b5098(0x1d6),'type':'boolean','description':a167_0x1b5098(0x200)},{'name':'non-interactive','meowKey':a167_0x1b5098(0x1fe),'type':'boolean','description':a167_0x1b5098(0x21a)},{'name':a167_0x1b5098(0x1ca),'meowKey':a167_0x1b5098(0x1ca),'type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x1d3)},{'name':a167_0x1b5098(0x1ef),'meowKey':a167_0x1b5098(0x1ef),'type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x1d1)},{'name':'ci','meowKey':'ci','type':a167_0x1b5098(0x1ee),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':a167_0x1b5098(0x1e5),'meowKey':a167_0x1b5098(0x1e5),'type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x207)},{'name':'name','meowKey':'name','type':'string','description':'Name','hidden':!![]},{'name':a167_0x1b5098(0x1eb),'meowKey':a167_0x1b5098(0x1eb),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x215),'hidden':!![]},{'name':a167_0x1b5098(0x1f7),'meowKey':a167_0x1b5098(0x1f7),'type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x1db),'hidden':!![]},{'name':a167_0x1b5098(0x1d8),'meowKey':'watch','type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x1cc),'hidden':!![]},{'name':a167_0x1b5098(0x1fb),'meowKey':a167_0x1b5098(0x1fb),'type':a167_0x1b5098(0x1e7),'description':'Output\x20path','hidden':!![]},{'name':a167_0x1b5098(0x1f5),'meowKey':a167_0x1b5098(0x1f5),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x235),'hidden':!![]},{'name':'datasetcode','meowKey':a167_0x1b5098(0x1d4),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x231),'hidden':!![]},{'name':a167_0x1b5098(0x20c),'meowKey':a167_0x1b5098(0x20c),'type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x22a),'hidden':!![]},{'name':a167_0x1b5098(0x21b),'meowKey':a167_0x1b5098(0x234),'type':'boolean','description':'Enable\x20BFF\x20save','hidden':!![]},{'name':'id','meowKey':'id','type':'string','description':a167_0x1b5098(0x1f9),'hidden':!![]},{'name':a167_0x1b5098(0x1c9),'meowKey':'type','type':'string','description':a167_0x1b5098(0x208),'hidden':!![]},{'name':a167_0x1b5098(0x213),'meowKey':'file','type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x227),'hidden':!![]},{'name':a167_0x1b5098(0x211),'meowKey':a167_0x1b5098(0x211),'type':'string','description':a167_0x1b5098(0x214),'hidden':!![]},{'name':a167_0x1b5098(0x22f),'meowKey':a167_0x1b5098(0x1f8),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x22d),'hidden':!![]},{'name':'sqlname','meowKey':a167_0x1b5098(0x1c8),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x22d),'hidden':!![]},{'name':a167_0x1b5098(0x1cd),'meowKey':a167_0x1b5098(0x1e2),'type':a167_0x1b5098(0x1e7),'description':'DB\x20ID','hidden':!![]},{'name':'dbid','meowKey':a167_0x1b5098(0x20d),'type':'string','description':'DB\x20ID','hidden':!![]},{'name':a167_0x1b5098(0x1f0),'meowKey':a167_0x1b5098(0x1f0),'type':'string','description':'Description','hidden':!![]},{'name':'description-file','meowKey':'descriptionFile','type':'string','description':'Description\x20file','hidden':!![]},{'name':a167_0x1b5098(0x1fa),'meowKey':a167_0x1b5098(0x1fa),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x236),'hidden':!![]},{'name':'pagesize','meowKey':'pagesize','type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x20a),'hidden':!![]},{'name':a167_0x1b5098(0x1e9),'meowKey':a167_0x1b5098(0x1e9),'type':'string','description':a167_0x1b5098(0x221),'hidden':!![]},{'name':'code','meowKey':'code','type':'string','description':'Code\x20filter','hidden':!![]},{'name':a167_0x1b5098(0x1f2),'meowKey':a167_0x1b5098(0x1f2),'type':a167_0x1b5098(0x1e7),'description':'SQL\x20string','hidden':!![]},{'name':a167_0x1b5098(0x222),'meowKey':a167_0x1b5098(0x222),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x22c),'hidden':!![]},{'name':a167_0x1b5098(0x1e1),'meowKey':a167_0x1b5098(0x1e1),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x1f4),'hidden':!![]},{'name':a167_0x1b5098(0x202),'meowKey':a167_0x1b5098(0x202),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x218),'hidden':!![]},{'name':a167_0x1b5098(0x1ff),'meowKey':a167_0x1b5098(0x22e),'type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x1f1),'hidden':!![]},{'name':'key','meowKey':a167_0x1b5098(0x1e4),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x219),'hidden':!![]},{'name':a167_0x1b5098(0x1ce),'meowKey':a167_0x1b5098(0x1ce),'type':a167_0x1b5098(0x1e7),'description':'Config\x20value','hidden':!![]},{'name':'tags','meowKey':a167_0x1b5098(0x1e3),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x20e),'hidden':!![]},{'name':'stdin','meowKey':'stdin','type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x1fc),'hidden':!![]},{'name':a167_0x1b5098(0x1fd),'meowKey':a167_0x1b5098(0x1dc),'type':a167_0x1b5098(0x1e7),'description':a167_0x1b5098(0x210),'hidden':!![]},{'name':a167_0x1b5098(0x228),'meowKey':a167_0x1b5098(0x228),'type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x223),'hidden':!![]},{'name':a167_0x1b5098(0x1da),'meowKey':a167_0x1b5098(0x1da),'type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x230),'hidden':!![]},{'name':'confirm','meowKey':a167_0x1b5098(0x225),'type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x203),'hidden':!![]},{'name':a167_0x1b5098(0x224),'meowKey':'remote','type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x1de),'hidden':!![]},{'name':a167_0x1b5098(0x21c),'meowKey':a167_0x1b5098(0x21c),'type':a167_0x1b5098(0x1ee),'description':a167_0x1b5098(0x1d7),'hidden':!![]},{'name':'expected-count','meowKey':'expectedCount','type':'string','description':'Expected\x20affected\x20count','hidden':!![]},{'name':'operation-type','meowKey':'operationType','type':'string','description':a167_0x1b5098(0x1f4),'hidden':!![]},{'name':a167_0x1b5098(0x1e6),'meowKey':a167_0x1b5098(0x209),'type':a167_0x1b5098(0x1e7),'description':'Function\x20node','hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a167_0x1b5098(0x1d9),a167_0x1b5098(0x204),a167_0x1b5098(0x1f3),a167_0x1b5098(0x229),'jq','dry-run',a167_0x1b5098(0x1d6),a167_0x1b5098(0x22b),'ci']);export function buildMeowFlags(){const _0x843115=a167_0x1b5098;return Object[_0x843115(0x1dd)](GLOBAL_FLAGS[_0x843115(0x220)](_0x58340b=>[_0x58340b[_0x843115(0x1ed)],{'type':_0x58340b[_0x843115(0x1c9)]}]));}
1
+ const a167_0x59ad30=a167_0x3dfe;(function(_0x38f961,_0x28dcaa){const _0x4e6db3=a167_0x3dfe,_0x370e6f=_0x38f961();while(!![]){try{const _0x1069ad=-parseInt(_0x4e6db3(0x167))/0x1+parseInt(_0x4e6db3(0x1b0))/0x2*(parseInt(_0x4e6db3(0x195))/0x3)+-parseInt(_0x4e6db3(0x17d))/0x4*(parseInt(_0x4e6db3(0x182))/0x5)+-parseInt(_0x4e6db3(0x17c))/0x6+parseInt(_0x4e6db3(0x1a1))/0x7+-parseInt(_0x4e6db3(0x179))/0x8+-parseInt(_0x4e6db3(0x185))/0x9*(-parseInt(_0x4e6db3(0x1b3))/0xa);if(_0x1069ad===_0x28dcaa)break;else _0x370e6f['push'](_0x370e6f['shift']());}catch(_0x342fe6){_0x370e6f['push'](_0x370e6f['shift']());}}}(a167_0x1d2f,0x988b4));export const CLI_BIN_NAME=a167_0x59ad30(0x18f);export const CLI_DISPLAY_NAME=a167_0x59ad30(0x1a3);export const NPM_PACKAGE_NAME=a167_0x59ad30(0x16f);function a167_0x3dfe(_0x179f6f,_0x518389){_0x179f6f=_0x179f6f-0x15e;const _0x1d2f2b=a167_0x1d2f();let _0x3dfea6=_0x1d2f2b[_0x179f6f];return _0x3dfea6;}export const GLOBAL_FLAGS=[{'name':a167_0x59ad30(0x15f),'meowKey':a167_0x59ad30(0x15f),'type':a167_0x59ad30(0x1ba),'description':a167_0x59ad30(0x16d),'hint':'<code>'},{'name':a167_0x59ad30(0x183),'meowKey':a167_0x59ad30(0x183),'type':a167_0x59ad30(0x1ba),'description':a167_0x59ad30(0x160),'hint':a167_0x59ad30(0x1c2)},{'name':a167_0x59ad30(0x1a9),'meowKey':a167_0x59ad30(0x1a9),'type':a167_0x59ad30(0x1ba),'description':a167_0x59ad30(0x1a2),'hint':'production\x20|\x20daily'},{'name':a167_0x59ad30(0x198),'meowKey':a167_0x59ad30(0x198),'type':a167_0x59ad30(0x1ba),'description':a167_0x59ad30(0x16b),'hint':'json\x20|\x20pretty\x20|\x20compress'},{'name':'jq','meowKey':'jq','type':a167_0x59ad30(0x1ba),'description':a167_0x59ad30(0x17e),'hint':'<expr>'},{'name':a167_0x59ad30(0x192),'meowKey':'dryRun','type':'boolean','description':a167_0x59ad30(0x171)},{'name':'yes','meowKey':a167_0x59ad30(0x1ac),'type':'boolean','description':a167_0x59ad30(0x17f)},{'name':a167_0x59ad30(0x15e),'meowKey':a167_0x59ad30(0x1cb),'type':a167_0x59ad30(0x1af),'description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':a167_0x59ad30(0x188),'meowKey':'global','type':a167_0x59ad30(0x1af),'description':a167_0x59ad30(0x161)},{'name':a167_0x59ad30(0x16a),'meowKey':a167_0x59ad30(0x16a),'type':a167_0x59ad30(0x1af),'description':'Use\x20project\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a167_0x59ad30(0x1af),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':a167_0x59ad30(0x1b1),'meowKey':a167_0x59ad30(0x1b1),'type':a167_0x59ad30(0x1af),'description':a167_0x59ad30(0x1bf)},{'name':a167_0x59ad30(0x1c5),'meowKey':a167_0x59ad30(0x1c5),'type':a167_0x59ad30(0x1ba),'description':a167_0x59ad30(0x17b),'hidden':!![]},{'name':'title','meowKey':a167_0x59ad30(0x1bb),'type':a167_0x59ad30(0x1ba),'description':'Title','hidden':!![]},{'name':a167_0x59ad30(0x1ad),'meowKey':a167_0x59ad30(0x1ad),'type':a167_0x59ad30(0x1af),'description':a167_0x59ad30(0x1ca),'hidden':!![]},{'name':a167_0x59ad30(0x181),'meowKey':'watch','type':a167_0x59ad30(0x1af),'description':a167_0x59ad30(0x1ae),'hidden':!![]},{'name':a167_0x59ad30(0x186),'meowKey':'output','type':a167_0x59ad30(0x1ba),'description':a167_0x59ad30(0x189),'hidden':!![]},{'name':a167_0x59ad30(0x1c1),'meowKey':a167_0x59ad30(0x1c1),'type':a167_0x59ad30(0x1ba),'description':a167_0x59ad30(0x1c7),'hidden':!![]},{'name':a167_0x59ad30(0x1b9),'meowKey':a167_0x59ad30(0x1b9),'type':a167_0x59ad30(0x1ba),'description':a167_0x59ad30(0x1be),'hidden':!![]},{'name':a167_0x59ad30(0x1cc),'meowKey':'all','type':a167_0x59ad30(0x1af),'description':'Apply\x20to\x20all','hidden':!![]},{'name':a167_0x59ad30(0x175),'meowKey':a167_0x59ad30(0x191),'type':'boolean','description':'Enable\x20BFF\x20save','hidden':!![]},{'name':'id','meowKey':'id','type':a167_0x59ad30(0x1ba),'description':a167_0x59ad30(0x1a0),'hidden':!![]},{'name':a167_0x59ad30(0x17a),'meowKey':a167_0x59ad30(0x17a),'type':a167_0x59ad30(0x1ba),'description':a167_0x59ad30(0x16e),'hidden':!![]},{'name':a167_0x59ad30(0x174),'meowKey':a167_0x59ad30(0x174),'type':a167_0x59ad30(0x1ba),'description':a167_0x59ad30(0x19c),'hidden':!![]},{'name':a167_0x59ad30(0x1bd),'meowKey':'sqlcode','type':a167_0x59ad30(0x1ba),'description':a167_0x59ad30(0x18a),'hidden':!![]},{'name':a167_0x59ad30(0x1a5),'meowKey':a167_0x59ad30(0x16c),'type':'string','description':a167_0x59ad30(0x1b7),'hidden':!![]},{'name':a167_0x59ad30(0x1a7),'meowKey':'sqlname','type':a167_0x59ad30(0x1ba),'description':a167_0x59ad30(0x1b7),'hidden':!![]},{'name':a167_0x59ad30(0x1b8),'meowKey':a167_0x59ad30(0x170),'type':a167_0x59ad30(0x1ba),'description':a167_0x59ad30(0x180),'hidden':!![]},{'name':'dbid','meowKey':'dbid','type':a167_0x59ad30(0x1ba),'description':'DB\x20ID','hidden':!![]},{'name':a167_0x59ad30(0x1a8),'meowKey':'description','type':a167_0x59ad30(0x1ba),'description':a167_0x59ad30(0x187),'hidden':!![]},{'name':a167_0x59ad30(0x199),'meowKey':a167_0x59ad30(0x18e),'type':'string','description':a167_0x59ad30(0x164),'hidden':!![]},{'name':a167_0x59ad30(0x1a6),'meowKey':a167_0x59ad30(0x1a6),'type':a167_0x59ad30(0x1ba),'description':a167_0x59ad30(0x176),'hidden':!![]},{'name':a167_0x59ad30(0x19f),'meowKey':'pagesize','type':a167_0x59ad30(0x1ba),'description':'Page\x20size','hidden':!![]},{'name':a167_0x59ad30(0x18b),'meowKey':'keyword','type':'string','description':a167_0x59ad30(0x1c4),'hidden':!![]},{'name':a167_0x59ad30(0x1bc),'meowKey':a167_0x59ad30(0x1bc),'type':'string','description':a167_0x59ad30(0x190),'hidden':!![]},{'name':'sql','meowKey':a167_0x59ad30(0x1c8),'type':a167_0x59ad30(0x1ba),'description':a167_0x59ad30(0x19d),'hidden':!![]},{'name':a167_0x59ad30(0x165),'meowKey':a167_0x59ad30(0x165),'type':a167_0x59ad30(0x1ba),'description':a167_0x59ad30(0x173),'hidden':!![]},{'name':a167_0x59ad30(0x1cd),'meowKey':'operation','type':a167_0x59ad30(0x1ba),'description':a167_0x59ad30(0x196),'hidden':!![]},{'name':a167_0x59ad30(0x1ab),'meowKey':a167_0x59ad30(0x1ab),'type':'string','description':a167_0x59ad30(0x172),'hidden':!![]},{'name':a167_0x59ad30(0x1b6),'meowKey':a167_0x59ad30(0x169),'type':a167_0x59ad30(0x1af),'description':'Skip\x20import\x20generation','hidden':!![]},{'name':'key','meowKey':'key','type':a167_0x59ad30(0x1ba),'description':a167_0x59ad30(0x1b5),'hidden':!![]},{'name':a167_0x59ad30(0x19b),'meowKey':'value','type':a167_0x59ad30(0x1ba),'description':'Config\x20value','hidden':!![]},{'name':a167_0x59ad30(0x1a4),'meowKey':'tags','type':a167_0x59ad30(0x1ba),'description':a167_0x59ad30(0x177),'hidden':!![]},{'name':a167_0x59ad30(0x193),'meowKey':'stdin','type':a167_0x59ad30(0x1af),'description':a167_0x59ad30(0x1b2),'hidden':!![]},{'name':'from-env','meowKey':a167_0x59ad30(0x162),'type':a167_0x59ad30(0x1ba),'description':'Read\x20value\x20from\x20environment\x20variable','hidden':!![]},{'name':a167_0x59ad30(0x1c0),'meowKey':a167_0x59ad30(0x1c0),'type':'boolean','description':a167_0x59ad30(0x163),'hidden':!![]},{'name':a167_0x59ad30(0x168),'meowKey':a167_0x59ad30(0x168),'type':a167_0x59ad30(0x1af),'description':a167_0x59ad30(0x19a),'hidden':!![]},{'name':a167_0x59ad30(0x1c6),'meowKey':a167_0x59ad30(0x1c6),'type':a167_0x59ad30(0x1af),'description':'Confirm\x20destructive\x20action','hidden':!![]},{'name':a167_0x59ad30(0x1b4),'meowKey':a167_0x59ad30(0x1b4),'type':a167_0x59ad30(0x1af),'description':a167_0x59ad30(0x1c9),'hidden':!![]},{'name':a167_0x59ad30(0x18d),'meowKey':a167_0x59ad30(0x18d),'type':a167_0x59ad30(0x1af),'description':a167_0x59ad30(0x194),'hidden':!![]},{'name':'expected-count','meowKey':a167_0x59ad30(0x18c),'type':a167_0x59ad30(0x1ba),'description':a167_0x59ad30(0x184),'hidden':!![]},{'name':'operation-type','meowKey':a167_0x59ad30(0x19e),'type':'string','description':'Operation\x20type','hidden':!![]},{'name':a167_0x59ad30(0x178),'meowKey':'functionNode','type':a167_0x59ad30(0x1ba),'description':a167_0x59ad30(0x166),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a167_0x59ad30(0x15f),a167_0x59ad30(0x183),'env','format','jq',a167_0x59ad30(0x192),a167_0x59ad30(0x1ac),a167_0x59ad30(0x15e),'ci']);function a167_0x1d2f(){const _0x185430=['DB\x20ID','watch','5ZZEzth','app','Expected\x20affected\x20count','837ngLpiY','output','Description','global','Output\x20path','SQL\x20code','keyword','expectedCount','verbose','descriptionFile','rabetbase','Code\x20filter','enableBffSave','dry-run','stdin','Verbose\x20output','42345LyNylm','Operation\x20type','meowKey','format','description-file','Force\x20overwrite','value','File\x20path','SQL\x20string','operationType','pagesize','Record\x20ID','6987211HWIQYG','Environment','Rabetbase\x20CLI','tags','sql-name','page','sqlname','description','env','fromEntries','target','yes','clear','Watch\x20mode','boolean','44fChLTL','help','Read\x20value\x20from\x20stdin','175590oJvGXq','remote','Config\x20key','skip-imports','SQL\x20name','db-id','datasetcode','string','title','code','sqlcode','Dataset\x20code','Show\x20help','reveal','params','<name>','map','Keyword\x20filter','name','confirm','JSON\x20params','sql','Use\x20remote','Clear','nonInteractive','all','operation','non-interactive','appcode','Select\x20app\x20profile\x20by\x20name','Use\x20global\x20config\x20scope','fromEnv','Reveal\x20sensitive\x20value','Description\x20file','schemas','Function\x20node','786833rrWZXD','force','skipImports','project','Output\x20format','sqlName','Override\x20appcode','Type\x20filter','@lovrabet/rabetbase-cli','dbId','Preview\x20operation\x20without\x20executing','Target\x20path','Schemas','file','enable-bff-save','Page\x20number','Tags','function-node','9477080YzxkHK','type','Name','1937022rySnZQ','90260FSxUXx','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','Skip\x20confirmation\x20for\x20high-risk\x20writes'];a167_0x1d2f=function(){return _0x185430;};return a167_0x1d2f();}export function buildMeowFlags(){const _0x3dc417=a167_0x59ad30;return Object[_0x3dc417(0x1aa)](GLOBAL_FLAGS[_0x3dc417(0x1c3)](_0x4ded9c=>[_0x4ded9c[_0x3dc417(0x197)],{'type':_0x4ded9c[_0x3dc417(0x17a)]}]));}
@@ -1 +1 @@
1
- function a168_0xec81(){const _0x3cf756=['2215510PlsiuJ','2IJmSCY','en-US','1169253vRRLIZ','155022PHGCMh','compress','13454KceiNz','243906oJHYug','567693XbfbjT','high-risk-write','1400UuyyTP','104ZcTuyb','59525IMrQGA','10NOLuSl'];a168_0xec81=function(){return _0x3cf756;};return a168_0xec81();}const a168_0xc80119=a168_0x405f;(function(_0x4f9107,_0x3976b7){const _0x12eb00=a168_0x405f,_0x50a9be=_0x4f9107();while(!![]){try{const _0x371565=-parseInt(_0x12eb00(0x1f0))/0x1*(parseInt(_0x12eb00(0x1ea))/0x2)+parseInt(_0x12eb00(0x1f1))/0x3+parseInt(_0x12eb00(0x1e6))/0x4*(parseInt(_0x12eb00(0x1e7))/0x5)+-parseInt(_0x12eb00(0x1ed))/0x6+parseInt(_0x12eb00(0x1ef))/0x7*(-parseInt(_0x12eb00(0x1e5))/0x8)+-parseInt(_0x12eb00(0x1ec))/0x9*(-parseInt(_0x12eb00(0x1e8))/0xa)+parseInt(_0x12eb00(0x1e9))/0xb;if(_0x371565===_0x3976b7)break;else _0x50a9be['push'](_0x50a9be['shift']());}catch(_0x4e9fb3){_0x50a9be['push'](_0x50a9be['shift']());}}}(a168_0xec81,0x36afb));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':'production','format':a168_0xc80119(0x1ee),'locale':a168_0xc80119(0x1eb),'riskLevel':a168_0xc80119(0x1f2),'apiDir':DEFAULT_API_DIR};function a168_0x405f(_0x536489,_0x51ee50){_0x536489=_0x536489-0x1e5;const _0xec81d5=a168_0xec81();let _0x405f89=_0xec81d5[_0x536489];return _0x405f89;}export const DEFAULT_COMMAND_OUTPUT_FORMAT=a168_0xc80119(0x1ee);
1
+ function a168_0x3d8e(_0x544842,_0x437788){_0x544842=_0x544842-0x1e5;const _0x374ce2=a168_0x374c();let _0x3d8e52=_0x374ce2[_0x544842];return _0x3d8e52;}const a168_0x214ca8=a168_0x3d8e;function a168_0x374c(){const _0x300ee4=['152673nDpIut','381858kMGBLU','96JdGJAV','860882IZkriZ','5WbttOI','3880196uJquzu','1171998EKrCli','compress','758233Egvmff','1865550mQmbIM','high-risk-write','production','18kbirBQ','80cndqpK','70WuioIo','en-US'];a168_0x374c=function(){return _0x300ee4;};return a168_0x374c();}(function(_0x524c1f,_0x3776f8){const _0x143e94=a168_0x3d8e,_0x58c754=_0x524c1f();while(!![]){try{const _0x2ee9a9=parseInt(_0x143e94(0x1e9))/0x1+-parseInt(_0x143e94(0x1f4))/0x2*(-parseInt(_0x143e94(0x1e8))/0x3)+parseInt(_0x143e94(0x1ed))/0x4*(-parseInt(_0x143e94(0x1ec))/0x5)+parseInt(_0x143e94(0x1f1))/0x6+parseInt(_0x143e94(0x1f0))/0x7*(-parseInt(_0x143e94(0x1e5))/0x8)+-parseInt(_0x143e94(0x1ee))/0x9*(-parseInt(_0x143e94(0x1e6))/0xa)+-parseInt(_0x143e94(0x1eb))/0xb*(-parseInt(_0x143e94(0x1ea))/0xc);if(_0x2ee9a9===_0x3776f8)break;else _0x58c754['push'](_0x58c754['shift']());}catch(_0x547c16){_0x58c754['push'](_0x58c754['shift']());}}}(a168_0x374c,0x9b14d));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a168_0x214ca8(0x1f3),'format':a168_0x214ca8(0x1ef),'locale':a168_0x214ca8(0x1e7),'riskLevel':a168_0x214ca8(0x1f2),'apiDir':DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a168_0x214ca8(0x1ef);
@@ -1 +1 @@
1
- const a169_0x177587=a169_0x2626;(function(_0x2e171a,_0x90e66){const _0x41c96e=a169_0x2626,_0x1440bb=_0x2e171a();while(!![]){try{const _0x3e8269=parseInt(_0x41c96e(0x15e))/0x1*(parseInt(_0x41c96e(0x166))/0x2)+parseInt(_0x41c96e(0x170))/0x3+-parseInt(_0x41c96e(0x16d))/0x4+-parseInt(_0x41c96e(0x160))/0x5+-parseInt(_0x41c96e(0x164))/0x6+parseInt(_0x41c96e(0x168))/0x7*(parseInt(_0x41c96e(0x167))/0x8)+parseInt(_0x41c96e(0x16f))/0x9;if(_0x3e8269===_0x90e66)break;else _0x1440bb['push'](_0x1440bb['shift']());}catch(_0x50ee5c){_0x1440bb['push'](_0x1440bb['shift']());}}}(a169_0x4833,0x720ae));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x19b609){const _0x21550e=a169_0x2626;customApiDomain=_0x19b609?.[_0x21550e(0x16b)],customUserDomain=_0x19b609?.[_0x21550e(0x15f)],customRuntimeDomain=_0x19b609?.[_0x21550e(0x16e)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a169_0x177587(0x16a):a169_0x177587(0x15c));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a169_0x177587(0x165):a169_0x177587(0x162));function a169_0x2626(_0x88b7c3,_0x408487){_0x88b7c3=_0x88b7c3-0x15c;const _0x483359=a169_0x4833();let _0x26267d=_0x483359[_0x88b7c3];return _0x26267d;}function a169_0x4833(){const _0x4b86ba=['https://user.lovrabet.com','apiDomain','https://app.lovrabet.com','1527232KCEkqk','runtimeDomain','15019902MOTPLy','30504ilbdYf','https://user-daily.lovrabet.com','/web-app/app/','206OdLVEx','userDomain','3065260sUYrya','https://daily.lovrabet.com','https://daily-api.lovrabet.com','https://runtime.lovrabet.com','5216448cJxGvs','https://api.lovrabet.com','1868dKevKC','1152bOKYyR','22358gyROAZ','trim'];a169_0x4833=function(){return _0x4b86ba;};return a169_0x4833();}export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a169_0x177587(0x163):'https://daily-runtime.lovrabet.com');export const getAppDomain=()=>isProduction(getEnv())?a169_0x177587(0x16c):a169_0x177587(0x161);export const getAppBaseUrl=_0xd3253b=>{const _0x20e38a=a169_0x177587,_0x2348bf=encodeURIComponent(_0xd3253b[_0x20e38a(0x169)]());return isProduction(getEnv())?getAppDomain()+'/app/'+_0x2348bf:getAppDomain()+_0x20e38a(0x15d)+_0x2348bf;};
1
+ const a169_0x333e4b=a169_0x41fc;(function(_0x50be94,_0x53dc59){const _0x31f217=a169_0x41fc,_0x4d669e=_0x50be94();while(!![]){try{const _0x42756a=-parseInt(_0x31f217(0x1b8))/0x1+-parseInt(_0x31f217(0x1ba))/0x2+-parseInt(_0x31f217(0x1c9))/0x3*(parseInt(_0x31f217(0x1c5))/0x4)+-parseInt(_0x31f217(0x1c7))/0x5+parseInt(_0x31f217(0x1c2))/0x6*(-parseInt(_0x31f217(0x1be))/0x7)+-parseInt(_0x31f217(0x1c8))/0x8*(parseInt(_0x31f217(0x1c3))/0x9)+parseInt(_0x31f217(0x1c1))/0xa*(parseInt(_0x31f217(0x1bd))/0xb);if(_0x42756a===_0x53dc59)break;else _0x4d669e['push'](_0x4d669e['shift']());}catch(_0x3f2505){_0x4d669e['push'](_0x4d669e['shift']());}}}(a169_0x1ca3,0xd9eeb));function a169_0x41fc(_0x1b9691,_0x4d64c1){_0x1b9691=_0x1b9691-0x1b8;const _0x1ca3f5=a169_0x1ca3();let _0x41fc58=_0x1ca3f5[_0x1b9691];return _0x41fc58;}import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x2fbc10){const _0x186a86=a169_0x41fc;customApiDomain=_0x2fbc10?.['apiDomain'],customUserDomain=_0x2fbc10?.['userDomain'],customRuntimeDomain=_0x2fbc10?.[_0x186a86(0x1bf)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?'https://user.lovrabet.com':a169_0x333e4b(0x1c4));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a169_0x333e4b(0x1bb):a169_0x333e4b(0x1c0));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a169_0x333e4b(0x1b9):a169_0x333e4b(0x1bc));export const getAppDomain=()=>isProduction(getEnv())?'https://app.lovrabet.com':'https://daily.lovrabet.com';export const getAppBaseUrl=_0x1ddfcf=>{const _0x53fdcf=a169_0x333e4b,_0x1066bf=encodeURIComponent(_0x1ddfcf[_0x53fdcf(0x1c6)]());return isProduction(getEnv())?getAppDomain()+'/app/'+_0x1066bf:getAppDomain()+'/web-app/app/'+_0x1066bf;};function a169_0x1ca3(){const _0x409945=['https://api.lovrabet.com','https://daily-runtime.lovrabet.com','149875mjwMUN','21QkyvWG','runtimeDomain','https://daily-api.lovrabet.com','6110OfTxIM','3567726DGaCET','63yDmrvw','https://user-daily.lovrabet.com','637264oONYLA','trim','5015205xKXPTs','1529920uvblSm','33tVmZcG','182103NOBnwH','https://runtime.lovrabet.com','2744122hHeZta'];a169_0x1ca3=function(){return _0x409945;};return a169_0x1ca3();}
@@ -1 +1 @@
1
- const a170_0x2be509=a170_0x5d4c;function a170_0x5d4c(_0x25bde4,_0x9466ae){_0x25bde4=_0x25bde4-0x84;const _0x346bb2=a170_0x346b();let _0x5d4cb2=_0x346bb2[_0x25bde4];return _0x5d4cb2;}(function(_0xff6ad8,_0x3f48be){const _0x934f71=a170_0x5d4c,_0x53256d=_0xff6ad8();while(!![]){try{const _0x33c499=-parseInt(_0x934f71(0x8b))/0x1+parseInt(_0x934f71(0x84))/0x2*(-parseInt(_0x934f71(0x85))/0x3)+-parseInt(_0x934f71(0x93))/0x4*(-parseInt(_0x934f71(0x8d))/0x5)+parseInt(_0x934f71(0x89))/0x6*(-parseInt(_0x934f71(0x8e))/0x7)+-parseInt(_0x934f71(0x88))/0x8*(-parseInt(_0x934f71(0x92))/0x9)+parseInt(_0x934f71(0x91))/0xa+parseInt(_0x934f71(0x86))/0xb;if(_0x33c499===_0x3f48be)break;else _0x53256d['push'](_0x53256d['shift']());}catch(_0x2364e9){_0x53256d['push'](_0x53256d['shift']());}}}(a170_0x346b,0x627a8));export const RABETBASE_ENV_VALUES=[a170_0x2be509(0x87),a170_0x2be509(0x90)];export function normalizeEnv(_0x49eb01){const _0x4f9f77=a170_0x2be509;return _0x49eb01===_0x4f9f77(0x8f)?_0x4f9f77(0x87):_0x49eb01;}export function isProduction(_0x5beed1){const _0x56d09a=a170_0x2be509;return normalizeEnv(_0x5beed1)===_0x56d09a(0x87);}export function isDaily(_0xa5b677){return normalizeEnv(_0xa5b677)==='daily';}export function isDev(_0x543fa6){const _0x1499a1=a170_0x2be509,_0x149dd4=normalizeEnv(_0x543fa6);return _0x149dd4===_0x1499a1(0x8c)||_0x149dd4===_0x1499a1(0x8a);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a170_0x2be509(0x87));export function getEnv(){return env;}export function initEnv(_0x387134){env=normalizeEnv(_0x387134);}function a170_0x346b(){const _0x4f4198=['6YPnhqH','dev','356585gSnsxH','development','61175uSraVm','3446492wYDgru','online','daily','1846410JyiBOv','1341JNUadd','36JrnCbu','249122FtBfPO','9GDeVCS','12053976XVGvWE','production','12640vIldSL'];a170_0x346b=function(){return _0x4f4198;};return a170_0x346b();}
1
+ const a170_0x57ec0f=a170_0x2b07;(function(_0x8500a4,_0x41442f){const _0x5abbdb=a170_0x2b07,_0x3f4da3=_0x8500a4();while(!![]){try{const _0x3c74a9=-parseInt(_0x5abbdb(0x1e7))/0x1+parseInt(_0x5abbdb(0x1df))/0x2+-parseInt(_0x5abbdb(0x1e3))/0x3+-parseInt(_0x5abbdb(0x1e0))/0x4+-parseInt(_0x5abbdb(0x1e2))/0x5*(-parseInt(_0x5abbdb(0x1e1))/0x6)+parseInt(_0x5abbdb(0x1de))/0x7+-parseInt(_0x5abbdb(0x1e5))/0x8;if(_0x3c74a9===_0x41442f)break;else _0x3f4da3['push'](_0x3f4da3['shift']());}catch(_0xe1ab19){_0x3f4da3['push'](_0x3f4da3['shift']());}}}(a170_0x2363,0x57b9a));function a170_0x2b07(_0x3652cb,_0x13653e){_0x3652cb=_0x3652cb-0x1de;const _0x2363da=a170_0x2363();let _0x2b0705=_0x2363da[_0x3652cb];return _0x2b0705;}export const RABETBASE_ENV_VALUES=[a170_0x57ec0f(0x1e8),a170_0x57ec0f(0x1e4)];export function normalizeEnv(_0x255a42){const _0x3e5075=a170_0x57ec0f;return _0x255a42===_0x3e5075(0x1e6)?'production':_0x255a42;}export function isProduction(_0x5cab56){return normalizeEnv(_0x5cab56)==='production';}export function isDaily(_0x420019){const _0x2cba34=a170_0x57ec0f;return normalizeEnv(_0x420019)===_0x2cba34(0x1e4);}export function isDev(_0x5632dc){const _0x1cd9db=normalizeEnv(_0x5632dc);return _0x1cd9db==='development'||_0x1cd9db==='dev';}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||'production');export function getEnv(){return env;}export function initEnv(_0x335cdc){env=normalizeEnv(_0x335cdc);}function a170_0x2363(){const _0x395060=['daily','1129584DybSif','online','470996BIaeUs','production','3884860uqZElq','1237824XkGBGg','811508ZNJIQL','211506KENMxA','80GVNYDv','1690545yDaWsk'];a170_0x2363=function(){return _0x395060;};return a170_0x2363();}
@@ -1 +1 @@
1
- function a171_0x149b(){const _0x5ce56a=['77Lblyrd','1278804YEmWxw','7452888jXFgTX','9ONsoSS','982183gtrBRg','54fyZJGv','483960uexvJq','pretty','3721792BFsAvE','compress','2DnRzqc','556927eZGcGK','4491710vKFTlp','json'];a171_0x149b=function(){return _0x5ce56a;};return a171_0x149b();}const a171_0x5d8cc1=a171_0x45c2;function a171_0x45c2(_0x21567f,_0x4c6918){_0x21567f=_0x21567f-0x15d;const _0x149b89=a171_0x149b();let _0x45c227=_0x149b89[_0x21567f];return _0x45c227;}(function(_0x3a1988,_0x12b39e){const _0x55c666=a171_0x45c2,_0x3a03f0=_0x3a1988();while(!![]){try{const _0x51cc46=-parseInt(_0x55c666(0x161))/0x1*(parseInt(_0x55c666(0x167))/0x2)+-parseInt(_0x55c666(0x15e))/0x3+-parseInt(_0x55c666(0x165))/0x4+-parseInt(_0x55c666(0x163))/0x5+-parseInt(_0x55c666(0x162))/0x6*(-parseInt(_0x55c666(0x168))/0x7)+-parseInt(_0x55c666(0x15f))/0x8*(parseInt(_0x55c666(0x160))/0x9)+-parseInt(_0x55c666(0x169))/0xa*(-parseInt(_0x55c666(0x15d))/0xb);if(_0x51cc46===_0x12b39e)break;else _0x3a03f0['push'](_0x3a03f0['shift']());}catch(_0x383b56){_0x3a03f0['push'](_0x3a03f0['shift']());}}}(a171_0x149b,0x78590));export const RABETBASE_OUTPUT_FORMAT_VALUES=[a171_0x5d8cc1(0x16a),a171_0x5d8cc1(0x164),a171_0x5d8cc1(0x166)];
1
+ function a171_0x27d6(_0x3904cb,_0x328c12){_0x3904cb=_0x3904cb-0x6a;const _0x1b5f36=a171_0x1b5f();let _0x27d6d0=_0x1b5f36[_0x3904cb];return _0x27d6d0;}const a171_0x4a5357=a171_0x27d6;function a171_0x1b5f(){const _0x4e4604=['json','603186bnWWIi','563455lTVGgu','259171bJnvWi','compress','pretty','20Eyqcvd','16VXyavb','1314027rhCKns','11097cOPexb','1978333YUxusl','1794948iRawqP','220Iideet','430vuhKmb'];a171_0x1b5f=function(){return _0x4e4604;};return a171_0x1b5f();}(function(_0x471117,_0x3827fa){const _0x7753f2=a171_0x27d6,_0x39a5b0=_0x471117();while(!![]){try{const _0x2717e1=parseInt(_0x7753f2(0x77))/0x1+-parseInt(_0x7753f2(0x74))/0x2*(parseInt(_0x7753f2(0x71))/0x3)+-parseInt(_0x7753f2(0x6e))/0x4*(-parseInt(_0x7753f2(0x6a))/0x5)+parseInt(_0x7753f2(0x73))/0x6+parseInt(_0x7753f2(0x72))/0x7*(parseInt(_0x7753f2(0x6f))/0x8)+-parseInt(_0x7753f2(0x70))/0x9+parseInt(_0x7753f2(0x75))/0xa*(-parseInt(_0x7753f2(0x6b))/0xb);if(_0x2717e1===_0x3827fa)break;else _0x39a5b0['push'](_0x39a5b0['shift']());}catch(_0x33af86){_0x39a5b0['push'](_0x39a5b0['shift']());}}}(a171_0x1b5f,0x7187d));export const RABETBASE_OUTPUT_FORMAT_VALUES=[a171_0x4a5357(0x76),a171_0x4a5357(0x6d),a171_0x4a5357(0x6c)];
@@ -1 +1 @@
1
- const a172_0x31254b=a172_0x5aa2;(function(_0x491f96,_0xc8457f){const _0x2895bb=a172_0x5aa2,_0x307ffb=_0x491f96();while(!![]){try{const _0x5bef33=-parseInt(_0x2895bb(0xdb))/0x1*(-parseInt(_0x2895bb(0xdd))/0x2)+-parseInt(_0x2895bb(0xd7))/0x3+-parseInt(_0x2895bb(0xde))/0x4*(parseInt(_0x2895bb(0xdc))/0x5)+-parseInt(_0x2895bb(0xd9))/0x6+-parseInt(_0x2895bb(0xda))/0x7*(parseInt(_0x2895bb(0xd4))/0x8)+-parseInt(_0x2895bb(0xd8))/0x9*(parseInt(_0x2895bb(0xdf))/0xa)+parseInt(_0x2895bb(0xd6))/0xb;if(_0x5bef33===_0xc8457f)break;else _0x307ffb['push'](_0x307ffb['shift']());}catch(_0x328eff){_0x307ffb['push'](_0x307ffb['shift']());}}}(a172_0x3262,0xe9ccf));export const DEFAULT_API_DIR=a172_0x31254b(0xd5);function a172_0x5aa2(_0x25ecbc,_0x22016f){_0x25ecbc=_0x25ecbc-0xd4;const _0x326270=a172_0x3262();let _0x5aa2fb=_0x326270[_0x25ecbc];return _0x5aa2fb;}function a172_0x3262(){const _0x37312f=['49GHsCNR','374047saXQCi','115lipjva','4pFJBhs','135864YroppK','1829530FMASAQ','823536ZzOave','./src/api','32297782MkSdWX','123468TGxoRv','45DCwGgg','1613256qZhjly'];a172_0x3262=function(){return _0x37312f;};return a172_0x3262();}
1
+ (function(_0x48c0a5,_0x187724){const _0x15c47d=a172_0xa389,_0x38e6fd=_0x48c0a5();while(!![]){try{const _0x10dc3c=-parseInt(_0x15c47d(0x161))/0x1+-parseInt(_0x15c47d(0x160))/0x2+parseInt(_0x15c47d(0x15f))/0x3+parseInt(_0x15c47d(0x159))/0x4*(-parseInt(_0x15c47d(0x15e))/0x5)+-parseInt(_0x15c47d(0x15c))/0x6+-parseInt(_0x15c47d(0x15a))/0x7+-parseInt(_0x15c47d(0x15d))/0x8*(-parseInt(_0x15c47d(0x15b))/0x9);if(_0x10dc3c===_0x187724)break;else _0x38e6fd['push'](_0x38e6fd['shift']());}catch(_0x30bdcf){_0x38e6fd['push'](_0x38e6fd['shift']());}}}(a172_0x5d34,0x65f79));function a172_0xa389(_0x3a713d,_0x7a5257){_0x3a713d=_0x3a713d-0x159;const _0x5d34a3=a172_0x5d34();let _0xa389d2=_0x5d34a3[_0x3a713d];return _0xa389d2;}export const DEFAULT_API_DIR='./src/api';function a172_0x5d34(){const _0x374347=['813510nomoJt','312nwsVcf','25OTWSqd','2453880WasNNw','594770RjuMhA','628502YXjIQz','611852JgbZVn','2843379HSzDdn','422811KDUOpF'];a172_0x5d34=function(){return _0x374347;};return a172_0x5d34();}
@@ -1 +1 @@
1
- const a173_0x6eb73a=a173_0x16ba;function a173_0x16ba(_0x250fb0,_0x196b60){_0x250fb0=_0x250fb0-0xab;const _0x3f70fa=a173_0x3f70();let _0x16ba30=_0x3f70fa[_0x250fb0];return _0x16ba30;}(function(_0x1f6658,_0x1e0f11){const _0x1cb049=a173_0x16ba,_0x343ccd=_0x1f6658();while(!![]){try{const _0x5977f4=-parseInt(_0x1cb049(0xac))/0x1*(parseInt(_0x1cb049(0xae))/0x2)+-parseInt(_0x1cb049(0xaf))/0x3+-parseInt(_0x1cb049(0xab))/0x4+parseInt(_0x1cb049(0xb5))/0x5+parseInt(_0x1cb049(0xb4))/0x6*(-parseInt(_0x1cb049(0xb0))/0x7)+parseInt(_0x1cb049(0xb3))/0x8+parseInt(_0x1cb049(0xb2))/0x9;if(_0x5977f4===_0x1e0f11)break;else _0x343ccd['push'](_0x343ccd['shift']());}catch(_0x326db1){_0x343ccd['push'](_0x343ccd['shift']());}}}(a173_0x3f70,0xc0431));function a173_0x3f70(){const _0x36bd6e=['2FkPcLt','3545346qMNHqr','147UoNSvt','write','13071330NLngNl','6369696ojLtjx','188322Enxxew','7523905uPLums','1019600TqHIMF','870049pQxzVb','high-risk-write'];a173_0x3f70=function(){return _0x36bd6e;};return a173_0x3f70();}export const RISK_LEVEL_VALUES=['read',a173_0x6eb73a(0xb1),a173_0x6eb73a(0xad)];
1
+ function a173_0x487c(){const _0x4d31c1=['1340UQorHA','7LSHPSX','9351BhtwoQ','187190WueeIB','1996716tVwEEV','5578661SeIxLO','755037nocheE','1353168xKqDMk','1EiZqEC','232865nnMGUU','read','4OqgvFj'];a173_0x487c=function(){return _0x4d31c1;};return a173_0x487c();}const a173_0x298fd9=a173_0x1b98;function a173_0x1b98(_0x2b4d01,_0x343618){_0x2b4d01=_0x2b4d01-0x84;const _0x487cf4=a173_0x487c();let _0x1b98b5=_0x487cf4[_0x2b4d01];return _0x1b98b5;}(function(_0x219487,_0x354e15){const _0x285458=a173_0x1b98,_0x31cbd2=_0x219487();while(!![]){try{const _0xe41f30=-parseInt(_0x285458(0x86))/0x1*(parseInt(_0x285458(0x8d))/0x2)+-parseInt(_0x285458(0x84))/0x3+parseInt(_0x285458(0x89))/0x4*(parseInt(_0x285458(0x87))/0x5)+parseInt(_0x285458(0x8e))/0x6*(-parseInt(_0x285458(0x8b))/0x7)+parseInt(_0x285458(0x85))/0x8+-parseInt(_0x285458(0x8c))/0x9*(-parseInt(_0x285458(0x8a))/0xa)+parseInt(_0x285458(0x8f))/0xb;if(_0xe41f30===_0x354e15)break;else _0x31cbd2['push'](_0x31cbd2['shift']());}catch(_0x4ff5e7){_0x31cbd2['push'](_0x31cbd2['shift']());}}}(a173_0x487c,0x2cee4));export const RISK_LEVEL_VALUES=[a173_0x298fd9(0x88),'write','high-risk-write'];