@lovrabet/rabetbase-cli 2.3.5 → 2.3.6

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_0x58b92b=a157_0x2e17;(function(_0xd9cfa6,_0x37b2d9){const _0x29cb59=a157_0x2e17,_0x440f04=_0xd9cfa6();while(!![]){try{const _0x5b81ec=-parseInt(_0x29cb59(0xdb))/0x1*(parseInt(_0x29cb59(0xfc))/0x2)+parseInt(_0x29cb59(0xff))/0x3+-parseInt(_0x29cb59(0xfe))/0x4*(-parseInt(_0x29cb59(0xef))/0x5)+parseInt(_0x29cb59(0xe8))/0x6+-parseInt(_0x29cb59(0xe9))/0x7+-parseInt(_0x29cb59(0x106))/0x8*(-parseInt(_0x29cb59(0x101))/0x9)+parseInt(_0x29cb59(0x115))/0xa*(-parseInt(_0x29cb59(0xf2))/0xb);if(_0x5b81ec===_0x37b2d9)break;else _0x440f04['push'](_0x440f04['shift']());}catch(_0x375223){_0x440f04['push'](_0x440f04['shift']());}}}(a157_0x15ba,0x62cd1));import{mkdir,readFile,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{updateSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{getDbName,listDatabases}from'../../core/db-resolver.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{fileExists}from'../../core/bff/file-system.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildSqlLockEntry,stripLocalSqlMetadata}from'./shared.js';import{buildDbDirectoryName}from'../../core/sql-sync/utils.js';async function getTargetSqlQueries(_0x141c0b,_0x41ced9,_0x440519){const _0x2b5a5c=a157_0x2e17,_0x32022b=await scanLocalSqlQueries(_0x141c0b),_0x5addb5=new Map();for(const _0x1ce246 of _0x32022b){if(_0x440519&&_0x1ce246[_0x2b5a5c(0xe7)]!==_0x440519)continue;const _0x5d325b=_0x5addb5['get'](_0x1ce246[_0x2b5a5c(0xe7)])??[];_0x5d325b[_0x2b5a5c(0xec)](_0x1ce246),_0x5addb5[_0x2b5a5c(0x10d)](_0x1ce246['sqlCode'],_0x5d325b);}if(_0x440519&&!_0x5addb5[_0x2b5a5c(0xe4)](_0x440519))throw CliErrors[_0x2b5a5c(0xdd)](_0x2b5a5c(0xe1)+_0x440519);const _0x4bf22a=[];for(const [_0x19e4a4,_0x52e3ca]of _0x5addb5[_0x2b5a5c(0x10b)]()){if(_0x52e3ca[_0x2b5a5c(0x110)]===0x1){_0x4bf22a[_0x2b5a5c(0xec)](_0x52e3ca[0x0]);continue;}const _0xefa5bd=_0x41ced9[_0x2b5a5c(0xf8)][_0x19e4a4],_0xbc4c46=_0xefa5bd?.[_0x2b5a5c(0xd5)],_0x4deb23=_0xbc4c46?_0x52e3ca[_0x2b5a5c(0x104)](_0x4e64b3=>_0x4e64b3[_0x2b5a5c(0xed)]!==_0xbc4c46):_0x52e3ca;if(_0xefa5bd&&_0x4deb23[_0x2b5a5c(0x110)]===0x1){_0x4bf22a[_0x2b5a5c(0xec)](_0x4deb23[0x0]);continue;}throw CliErrors[_0x2b5a5c(0xdd)](_0x2b5a5c(0xe2)+_0x19e4a4+'.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.');}return _0x4bf22a;}export const sqlPush={'service':a157_0x58b92b(0xd9),'command':a157_0x58b92b(0xec),'description':a157_0x58b92b(0xe0),'risk':a157_0x58b92b(0xf9),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a157_0x58b92b(0x109),'type':a157_0x58b92b(0xda),'description':a157_0x58b92b(0xf7)}],async 'dryRun'(_0x283483){const _0x1ecd8e=a157_0x58b92b,_0x26506d=loadSqlProjectConfig(_0x283483[_0x1ecd8e(0xfa)]),_0x3a3055=await readSqlLockFile(_0x26506d['lockFilePath']),{appLock:_0x54c362}=ensureSqlLockScope(_0x3a3055??createEmptySqlLock(),_0x283483[_0x1ecd8e(0xfa)],_0x26506d[_0x1ecd8e(0x108)],_0x1ecd8e(0xec)),_0x3509f4=await getTargetSqlQueries(_0x26506d,_0x54c362,_0x283483['str']('sqlcode')||undefined),_0x1b3428=[];for(const _0x5bf54c of _0x3509f4){const _0x464e19=await computeSqlFileHash(_0x5bf54c[_0x1ecd8e(0xe6)]),_0x474271=_0x54c362[_0x1ecd8e(0xf8)][_0x5bf54c[_0x1ecd8e(0xe7)]],_0x29fa01=!!_0x474271&&(_0x474271[_0x1ecd8e(0xd5)]!==_0x5bf54c['relativePath']||!!_0x5bf54c[_0x1ecd8e(0x100)]&&_0x474271['sqlName']!==_0x5bf54c[_0x1ecd8e(0x100)]);if(!_0x283483[_0x1ecd8e(0x111)]('force')&&_0x474271&&_0x474271[_0x1ecd8e(0x113)]===_0x464e19&&!_0x29fa01)continue;_0x1b3428[_0x1ecd8e(0xec)](_0x5bf54c['sqlCode']);}return{'method':'POST','url':'/smartapi/custom/updateUserCustomSql','body':{'sqlCodes':_0x1b3428,'appCode':_0x283483[_0x1ecd8e(0xfa)]},'description':_0x1ecd8e(0xdc)+_0x1b3428[_0x1ecd8e(0x110)]+'\x20SQL\x20file(s)'};},async 'execute'(_0x2adbff){const _0x2b19f6=a157_0x58b92b,_0x6084ee=loadSqlProjectConfig(_0x2adbff[_0x2b19f6(0xfa)]),_0x256791=await readSqlLockFile(_0x6084ee[_0x2b19f6(0xd1)]),{lockData:_0x26c127,appLock:_0x98fbcf}=ensureSqlLockScope(_0x256791??createEmptySqlLock(),_0x2adbff[_0x2b19f6(0xfa)],_0x6084ee[_0x2b19f6(0x108)],_0x2b19f6(0xec)),_0x471f80=await getTargetSqlQueries(_0x6084ee,_0x98fbcf,_0x2adbff['str']('sqlcode')||undefined);if(_0x471f80[_0x2b19f6(0x110)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x2b19f6(0x105)};const _0x247b73=[],_0x1372a2=[],_0x1dd6f3=[];for(const _0x563460 of _0x471f80){const _0x353a77=_0x98fbcf[_0x2b19f6(0xf8)][_0x563460[_0x2b19f6(0xe7)]];if(!_0x353a77){_0x1dd6f3[_0x2b19f6(0xec)]({'sqlCode':_0x563460[_0x2b19f6(0xe7)],'error':_0x2b19f6(0x107)});continue;}try{const _0x25e1aa=await computeSqlFileHash(_0x563460[_0x2b19f6(0xe6)]),_0x2af8ae=_0x353a77[_0x2b19f6(0xd5)]!==_0x563460[_0x2b19f6(0xed)]||!!_0x563460[_0x2b19f6(0x100)]&&_0x353a77[_0x2b19f6(0x100)]!==_0x563460[_0x2b19f6(0x100)];if(!_0x2adbff['bool'](_0x2b19f6(0x109))&&_0x353a77['hash']===_0x25e1aa&&!_0x2af8ae){_0x1372a2[_0x2b19f6(0xec)]({'sqlCode':_0x563460[_0x2b19f6(0xe7)],'reason':_0x2b19f6(0xf5)});continue;}if(_0x353a77[_0x2b19f6(0xf6)]==null){_0x1dd6f3[_0x2b19f6(0xec)]({'sqlCode':_0x563460['sqlCode'],'error':_0x2b19f6(0xea)});continue;}const _0x1f516c=await readFile(_0x563460[_0x2b19f6(0xe6)],_0x2b19f6(0x10c)),_0x4a2d31=stripLocalSqlMetadata(_0x1f516c,_0x563460[_0x2b19f6(0xee)]),_0x58f3eb=_0x563460[_0x2b19f6(0x100)]||_0x353a77['sqlName'],_0x4f068a=await resolveTargetDbBinding(_0x2adbff[_0x2b19f6(0xfa)],_0x563460,_0x353a77),_0x4d05cc=await updateSqlQuery({'id':_0x353a77[_0x2b19f6(0xe5)],'appCode':_0x2adbff['appCode'],'sqlCode':_0x563460[_0x2b19f6(0xe7)],'sqlName':_0x58f3eb,'dbId':_0x4f068a[_0x2b19f6(0xd3)],'version':_0x353a77[_0x2b19f6(0xf6)],'sqlContent':_0x4a2d31,'sqlConfig':_0x353a77[_0x2b19f6(0x112)]??undefined}),_0x243e6b=_0x4d05cc[_0x2b19f6(0xd3)]?await getDbName(_0x2adbff[_0x2b19f6(0xfa)],Number(_0x4d05cc[_0x2b19f6(0xd3)]))[_0x2b19f6(0xd7)](()=>_0x4f068a[_0x2b19f6(0xd2)]):_0x4f068a[_0x2b19f6(0xd2)];_0x98fbcf[_0x2b19f6(0xf8)][_0x563460['sqlCode']]={...buildSqlLockEntry(_0x4d05cc,_0x4a2d31,_0x25e1aa,{'dbName':_0x243e6b}),'path':_0x563460[_0x2b19f6(0xed)],'mode':_0x353a77[_0x2b19f6(0xee)]},await archivePreviousSqlFileIfNeeded(_0x6084ee,_0x353a77[_0x2b19f6(0xd5)],_0x563460[_0x2b19f6(0xed)]),_0x247b73[_0x2b19f6(0xec)]({'sqlCode':_0x563460['sqlCode'],'remoteId':_0x353a77[_0x2b19f6(0xe5)]});}catch(_0x3a1d10){_0x1dd6f3[_0x2b19f6(0xec)]({'sqlCode':_0x563460['sqlCode'],'error':_0x3a1d10 instanceof Error?_0x3a1d10[_0x2b19f6(0x102)]:String(_0x3a1d10)});}}return _0x98fbcf[_0x2b19f6(0x10f)]=new Date()[_0x2b19f6(0x10e)](),await writeSqlLockFile(_0x6084ee[_0x2b19f6(0xd1)],_0x26c127),{'ok':_0x1dd6f3[_0x2b19f6(0x110)]===0x0,'data':{'pushed':_0x247b73,'skipped':_0x1372a2,'failed':_0x1dd6f3},'message':_0x2b19f6(0x114)+_0x247b73['length']+_0x2b19f6(0xde)+_0x1372a2[_0x2b19f6(0x110)]+_0x2b19f6(0xdf)+_0x1dd6f3[_0x2b19f6(0x110)]+_0x2b19f6(0xf4)};}};async function archivePreviousSqlFileIfNeeded(_0x5da45b,_0xac6fa5,_0x2c2832){const _0x50fc11=a157_0x58b92b;if(!_0xac6fa5||_0xac6fa5===_0x2c2832)return;const _0xd7f849=join(_0x5da45b['sqlRootDir'],_0xac6fa5);if(!await fileExists(_0xd7f849))return;const _0x455547=await moveToTrash(_0x5da45b[_0x50fc11(0x116)],_0x5da45b[_0x50fc11(0xeb)],_0xd7f849);await cleanupEmptyDirectories(dirname(_0xd7f849),_0x5da45b[_0x50fc11(0xe3)]),void _0x455547;}async function moveToTrash(_0x1b3a2b,_0x17956c,_0x4d75c9){const _0x34d5c4=a157_0x58b92b,_0x40aa82=new Date()[_0x34d5c4(0x10e)]()[_0x34d5c4(0xf3)](/[:.]/g,'-'),_0x4a6c90=relative(_0x1b3a2b,_0x4d75c9),_0x44354a=join(_0x17956c,_0x40aa82,_0x4a6c90);return await mkdir(dirname(_0x44354a),{'recursive':!![]}),await rename(_0x4d75c9,_0x44354a),_0x44354a;}async function cleanupEmptyDirectories(_0x492fd1,_0x336f5c){const _0x446e3c=a157_0x58b92b;let _0x2286c7=resolve(_0x492fd1);const _0x3cd2bb=resolve(_0x336f5c);while(_0x2286c7[_0x446e3c(0xf0)](''+_0x3cd2bb+sep)||_0x2286c7===_0x3cd2bb){if(_0x2286c7===_0x3cd2bb)return;try{const _0x22c95b=await readdir(_0x2286c7);if(_0x22c95b[_0x446e3c(0x110)]>0x0)return;await rmdir(_0x2286c7);}catch{return;}_0x2286c7=dirname(_0x2286c7);}}function a157_0x2e17(_0x37cc9c,_0x55cce2){_0x37cc9c=_0x37cc9c-0xd1;const _0x15baa2=a157_0x15ba();let _0x2e17e6=_0x15baa2[_0x37cc9c];return _0x2e17e6;}function a157_0x15ba(){const _0x288b68=['57HXiMVX','Would\x20push\x20','validation','\x20pushed,\x20','\x20skipped,\x20','Push\x20local\x20SQL\x20files\x20to\x20remote','Local\x20SQL\x20not\x20found:\x20','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','sqlRootDir','has','remoteId','filePath','sqlCode','3034740sdewdr','1306893IuGqvl','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','trashDir','push','relativePath','mode','1941275ITvEkW','startsWith','Local\x20directory\x20\x22','1833502WpdAGO','replace','\x20failed','unchanged','version','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','sqls','high-risk-write','appCode','isFinite','21918iBSWwd','\x22\x20for\x20sqlCode\x20','4okGxzo','1541580ZwwKsd','sqlName','7155PsmNuq','message','join','filter','No\x20local\x20SQL\x20files\x20found.','1424tqNSUh','local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first','sqlRoot','force','dbDirectory','entries','utf8','set','toISOString','lastSync','length','bool','sqlConfig','hash','Push\x20complete:\x20','20bpXBQk','projectRoot','lockFilePath','dbName','dbId','exec','path','No\x20database\x20matches\x20local\x20directory\x20\x22','catch','map','sql','boolean'];a157_0x15ba=function(){return _0x288b68;};return a157_0x15ba();}async function resolveTargetDbBinding(_0x4c60ce,_0x2d6e91,_0x2c80e5){const _0xffeba4=a157_0x58b92b,_0x49beb7=_0x2d6e91[_0xffeba4(0x10a)];if(!_0x49beb7)return{'dbId':_0x2c80e5[_0xffeba4(0xd3)],'dbName':_0x2c80e5[_0xffeba4(0xd2)]};const _0x19879e=buildDbDirectoryName(_0x2c80e5[_0xffeba4(0xd2)],_0x2c80e5['dbId']);if(_0x49beb7===_0x19879e)return{'dbId':_0x2c80e5['dbId'],'dbName':_0x2c80e5['dbName']};const _0x1801ab=parseExplicitDbDirectory(_0x49beb7);if(_0x1801ab!=null)return{'dbId':_0x1801ab,'dbName':await getDbName(_0x4c60ce,_0x1801ab)[_0xffeba4(0xd7)](()=>undefined)};const _0x3c5d6f=await listDatabases(_0x4c60ce),_0xba45af=_0x3c5d6f[_0xffeba4(0x104)](_0x562c4a=>buildDbDirectoryName(_0x562c4a['dbName'],_0x562c4a['dbId'])===_0x49beb7);if(_0xba45af[_0xffeba4(0x110)]===0x1)return{'dbId':_0xba45af[0x0]['dbId'],'dbName':_0xba45af[0x0][_0xffeba4(0xd2)]};if(_0xba45af['length']===0x0)throw CliErrors[_0xffeba4(0xdd)](_0xffeba4(0xd6)+_0x49beb7+_0xffeba4(0xfd)+_0x2d6e91['sqlCode']+'.');const _0x4e9190=_0xba45af[_0xffeba4(0xd8)](_0x510ba7=>_0x510ba7[_0xffeba4(0xd2)]+'\x20('+_0x510ba7['dbId']+')')[_0xffeba4(0x103)](',\x20');throw CliErrors['validation'](_0xffeba4(0xf1)+_0x49beb7+'\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20'+_0x2d6e91[_0xffeba4(0xe7)]+':\x20'+_0x4e9190);}function parseExplicitDbDirectory(_0x4e1799){const _0x29cf83=a157_0x58b92b,_0x3a907e=/^db-(\d+)$/[_0x29cf83(0xd4)](_0x4e1799);if(!_0x3a907e)return null;const _0x568adc=Number(_0x3a907e[0x1]);return Number[_0x29cf83(0xfb)](_0x568adc)&&_0x568adc>0x0?_0x568adc:null;}
1
+ const a157_0x56aecf=a157_0x5cbd;(function(_0x40b394,_0xc0ea85){const _0x2ebd98=a157_0x5cbd,_0x20ac40=_0x40b394();while(!![]){try{const _0x4a75b4=parseInt(_0x2ebd98(0x20f))/0x1+-parseInt(_0x2ebd98(0x213))/0x2+-parseInt(_0x2ebd98(0x1fa))/0x3*(parseInt(_0x2ebd98(0x1ec))/0x4)+parseInt(_0x2ebd98(0x212))/0x5*(-parseInt(_0x2ebd98(0x1fb))/0x6)+parseInt(_0x2ebd98(0x216))/0x7*(-parseInt(_0x2ebd98(0x1ea))/0x8)+parseInt(_0x2ebd98(0x1e0))/0x9+-parseInt(_0x2ebd98(0x1f6))/0xa*(-parseInt(_0x2ebd98(0x1e4))/0xb);if(_0x4a75b4===_0xc0ea85)break;else _0x20ac40['push'](_0x20ac40['shift']());}catch(_0x18568c){_0x20ac40['push'](_0x20ac40['shift']());}}}(a157_0x2389,0x20236));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';function a157_0x5cbd(_0x40ff17,_0x250070){_0x40ff17=_0x40ff17-0x1de;const _0x238913=a157_0x2389();let _0x5cbde3=_0x238913[_0x40ff17];return _0x5cbde3;}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(_0xce3a56,_0x33d505,_0x15f998){const _0xe8132c=a157_0x5cbd,_0x41a9af=await scanLocalSqlQueries(_0xce3a56),_0x3a2b37=new Map();for(const _0x513815 of _0x41a9af){if(_0x15f998&&_0x513815['sqlCode']!==_0x15f998)continue;const _0x16cd93=_0x3a2b37[_0xe8132c(0x202)](_0x513815[_0xe8132c(0x1f0)])??[];_0x16cd93[_0xe8132c(0x1ed)](_0x513815),_0x3a2b37['set'](_0x513815[_0xe8132c(0x1f0)],_0x16cd93);}if(_0x15f998&&!_0x3a2b37[_0xe8132c(0x20d)](_0x15f998))throw CliErrors[_0xe8132c(0x1f3)]('Local\x20SQL\x20not\x20found:\x20'+_0x15f998);const _0x32298d=[];for(const [_0x13153f,_0x48f35b]of _0x3a2b37['entries']()){if(_0x48f35b[_0xe8132c(0x219)]===0x1){_0x32298d['push'](_0x48f35b[0x0]);continue;}const _0x285978=_0x33d505[_0xe8132c(0x203)][_0x13153f],_0x2f28f2=_0x285978?.[_0xe8132c(0x210)],_0x429421=_0x2f28f2?_0x48f35b[_0xe8132c(0x20b)](_0xbd7961=>_0xbd7961['relativePath']!==_0x2f28f2):_0x48f35b;if(_0x285978&&_0x429421['length']===0x1){_0x32298d[_0xe8132c(0x1ed)](_0x429421[0x0]);continue;}throw CliErrors[_0xe8132c(0x1f3)](_0xe8132c(0x1e5)+_0x13153f+_0xe8132c(0x1de));}return _0x32298d;}function a157_0x2389(){const _0x4b3227=['version','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','20qIRWRb','filePath','lockFilePath','sqlName','123TCFOaj','1098KapPCg','\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20','POST','sqlConfig','\x22\x20for\x20sqlCode\x20','Would\x20push\x20','str','get','sqls','bool','sqlcode','map','dbId','appCode','force','relativePath','filter','trashDir','has','Local\x20directory\x20\x22','208080HjRfsx','path','Push\x20complete:\x20','1095XvKrcB','407616aNPVfY','utf8','unchanged','1587362GokHlB','No\x20database\x20matches\x20local\x20directory\x20\x22','hash','length','sqlRoot','join','\x20failed','.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.','message','711270GaPNGm','catch','toISOString','remoteId','2940135XkJtNk','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','dbDirectory','dbName','high-risk-write','8zlPzni','\x20SQL\x20file(s)','21404qbOAZK','push','mode','isFinite','sqlCode','sqlRootDir','No\x20local\x20SQL\x20files\x20found.','validation'];a157_0x2389=function(){return _0x4b3227;};return a157_0x2389();}export const sqlPush={'service':'sql','command':'push','description':'Push\x20local\x20SQL\x20files\x20to\x20remote','risk':a157_0x56aecf(0x1e9),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a157_0x56aecf(0x209),'type':'boolean','description':a157_0x56aecf(0x1f5)}],async 'dryRun'(_0x5edde3){const _0x1eedd8=a157_0x56aecf,_0x57c869=loadSqlProjectConfig(_0x5edde3[_0x1eedd8(0x208)]),_0x1f8ac8=await readSqlLockFile(_0x57c869['lockFilePath']),{appLock:_0x50e948}=ensureSqlLockScope(_0x1f8ac8??createEmptySqlLock(),_0x5edde3[_0x1eedd8(0x208)],_0x57c869['sqlRoot'],'push'),_0x4a7aee=await getTargetSqlQueries(_0x57c869,_0x50e948,_0x5edde3[_0x1eedd8(0x201)](_0x1eedd8(0x205))||undefined),_0x24ddd8=[];for(const _0x3df94b of _0x4a7aee){const _0x193ca9=await computeSqlFileHash(_0x3df94b[_0x1eedd8(0x1f7)]),_0x3f1b7b=_0x50e948[_0x1eedd8(0x203)][_0x3df94b['sqlCode']],_0x20af68=!!_0x3f1b7b&&(_0x3f1b7b[_0x1eedd8(0x210)]!==_0x3df94b[_0x1eedd8(0x20a)]||!!_0x3df94b['sqlName']&&_0x3f1b7b['sqlName']!==_0x3df94b[_0x1eedd8(0x1f9)]);if(!_0x5edde3['bool'](_0x1eedd8(0x209))&&_0x3f1b7b&&_0x3f1b7b[_0x1eedd8(0x218)]===_0x193ca9&&!_0x20af68)continue;_0x24ddd8[_0x1eedd8(0x1ed)](_0x3df94b[_0x1eedd8(0x1f0)]);}return{'method':_0x1eedd8(0x1fd),'url':'/smartapi/custom/updateUserCustomSql','body':{'sqlCodes':_0x24ddd8,'appCode':_0x5edde3[_0x1eedd8(0x208)]},'description':_0x1eedd8(0x200)+_0x24ddd8[_0x1eedd8(0x219)]+_0x1eedd8(0x1eb)};},async 'execute'(_0x488fd7){const _0x2b5c2b=a157_0x56aecf,_0xc39d10=loadSqlProjectConfig(_0x488fd7[_0x2b5c2b(0x208)]),_0x5aef8b=await readSqlLockFile(_0xc39d10[_0x2b5c2b(0x1f8)]),{lockData:_0x423d35,appLock:_0x2af636}=ensureSqlLockScope(_0x5aef8b??createEmptySqlLock(),_0x488fd7[_0x2b5c2b(0x208)],_0xc39d10[_0x2b5c2b(0x21a)],_0x2b5c2b(0x1ed)),_0x5aed48=await getTargetSqlQueries(_0xc39d10,_0x2af636,_0x488fd7['str'](_0x2b5c2b(0x205))||undefined);if(_0x5aed48[_0x2b5c2b(0x219)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x2b5c2b(0x1f2)};const _0x4bd865=[],_0x57de41=[],_0x2f8167=[];for(const _0x42b5dd of _0x5aed48){const _0x47528b=_0x2af636[_0x2b5c2b(0x203)][_0x42b5dd['sqlCode']];if(!_0x47528b){_0x2f8167[_0x2b5c2b(0x1ed)]({'sqlCode':_0x42b5dd[_0x2b5c2b(0x1f0)],'error':'local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first'});continue;}try{const _0x367cdc=await computeSqlFileHash(_0x42b5dd['filePath']),_0x4c4717=_0x47528b[_0x2b5c2b(0x210)]!==_0x42b5dd[_0x2b5c2b(0x20a)]||!!_0x42b5dd[_0x2b5c2b(0x1f9)]&&_0x47528b[_0x2b5c2b(0x1f9)]!==_0x42b5dd[_0x2b5c2b(0x1f9)];if(!_0x488fd7[_0x2b5c2b(0x204)](_0x2b5c2b(0x209))&&_0x47528b[_0x2b5c2b(0x218)]===_0x367cdc&&!_0x4c4717){_0x57de41[_0x2b5c2b(0x1ed)]({'sqlCode':_0x42b5dd[_0x2b5c2b(0x1f0)],'reason':_0x2b5c2b(0x215)});continue;}if(_0x47528b[_0x2b5c2b(0x1f4)]==null){_0x2f8167[_0x2b5c2b(0x1ed)]({'sqlCode':_0x42b5dd[_0x2b5c2b(0x1f0)],'error':_0x2b5c2b(0x1e6)});continue;}const _0xfa3cf4=await readFile(_0x42b5dd[_0x2b5c2b(0x1f7)],_0x2b5c2b(0x214)),_0x2b24b1=stripLocalSqlMetadata(_0xfa3cf4,_0x42b5dd[_0x2b5c2b(0x1ee)]),_0xe64964=_0x42b5dd[_0x2b5c2b(0x1f9)]||_0x47528b[_0x2b5c2b(0x1f9)],_0xdc586=await resolveTargetDbBinding(_0x488fd7['appCode'],_0x42b5dd,_0x47528b),_0x46a0f3=await updateSqlQuery({'id':_0x47528b[_0x2b5c2b(0x1e3)],'appCode':_0x488fd7[_0x2b5c2b(0x208)],'sqlCode':_0x42b5dd[_0x2b5c2b(0x1f0)],'sqlName':_0xe64964,'dbId':_0xdc586[_0x2b5c2b(0x207)],'version':_0x47528b[_0x2b5c2b(0x1f4)],'sqlContent':_0x2b24b1,'sqlConfig':_0x47528b[_0x2b5c2b(0x1fe)]??undefined}),_0x4fa353=_0x46a0f3['dbId']?await getDbName(_0x488fd7[_0x2b5c2b(0x208)],Number(_0x46a0f3[_0x2b5c2b(0x207)]))[_0x2b5c2b(0x1e1)](()=>_0xdc586[_0x2b5c2b(0x1e8)]):_0xdc586['dbName'];_0x2af636[_0x2b5c2b(0x203)][_0x42b5dd[_0x2b5c2b(0x1f0)]]={...buildSqlLockEntry(_0x46a0f3,_0x2b24b1,_0x367cdc,{'dbName':_0x4fa353}),'path':_0x42b5dd[_0x2b5c2b(0x20a)],'mode':_0x47528b['mode']},await archivePreviousSqlFileIfNeeded(_0xc39d10,_0x47528b[_0x2b5c2b(0x210)],_0x42b5dd['relativePath']),_0x4bd865[_0x2b5c2b(0x1ed)]({'sqlCode':_0x42b5dd[_0x2b5c2b(0x1f0)],'remoteId':_0x47528b['remoteId']});}catch(_0x1a2f57){_0x2f8167[_0x2b5c2b(0x1ed)]({'sqlCode':_0x42b5dd[_0x2b5c2b(0x1f0)],'error':_0x1a2f57 instanceof Error?_0x1a2f57[_0x2b5c2b(0x1df)]:String(_0x1a2f57)});}}return _0x2af636['lastSync']=new Date()['toISOString'](),await writeSqlLockFile(_0xc39d10[_0x2b5c2b(0x1f8)],_0x423d35),{'ok':_0x2f8167[_0x2b5c2b(0x219)]===0x0,'data':{'pushed':_0x4bd865,'skipped':_0x57de41,'failed':_0x2f8167},'message':_0x2b5c2b(0x211)+_0x4bd865[_0x2b5c2b(0x219)]+'\x20pushed,\x20'+_0x57de41[_0x2b5c2b(0x219)]+'\x20skipped,\x20'+_0x2f8167['length']+_0x2b5c2b(0x21c)};}};async function archivePreviousSqlFileIfNeeded(_0x5a75ba,_0x451885,_0x5cca12){const _0xcb273b=a157_0x56aecf;if(!_0x451885||_0x451885===_0x5cca12)return;const _0x2f69a3=join(_0x5a75ba[_0xcb273b(0x1f1)],_0x451885);if(!await fileExists(_0x2f69a3))return;const _0x3b21cb=await moveToTrash(_0x5a75ba['projectRoot'],_0x5a75ba[_0xcb273b(0x20c)],_0x2f69a3);await cleanupEmptyDirectories(dirname(_0x2f69a3),_0x5a75ba[_0xcb273b(0x1f1)]),void _0x3b21cb;}async function moveToTrash(_0x5be437,_0x4ec202,_0x1e8ed7){const _0x563556=a157_0x56aecf,_0x148f65=new Date()[_0x563556(0x1e2)]()['replace'](/[:.]/g,'-'),_0x4eb31d=relative(_0x5be437,_0x1e8ed7),_0x574865=join(_0x4ec202,_0x148f65,_0x4eb31d);return await mkdir(dirname(_0x574865),{'recursive':!![]}),await rename(_0x1e8ed7,_0x574865),_0x574865;}async function cleanupEmptyDirectories(_0x1b6319,_0x11aa82){const _0xd4636a=a157_0x56aecf;let _0x4203dc=resolve(_0x1b6319);const _0x3fcff1=resolve(_0x11aa82);while(_0x4203dc['startsWith'](''+_0x3fcff1+sep)||_0x4203dc===_0x3fcff1){if(_0x4203dc===_0x3fcff1)return;try{const _0x44b5ac=await readdir(_0x4203dc);if(_0x44b5ac[_0xd4636a(0x219)]>0x0)return;await rmdir(_0x4203dc);}catch{return;}_0x4203dc=dirname(_0x4203dc);}}async function resolveTargetDbBinding(_0x4a4c8c,_0x1995a6,_0x3caabf){const _0xa21b76=a157_0x56aecf,_0x5b0df3=_0x1995a6[_0xa21b76(0x1e7)];if(!_0x5b0df3)return{'dbId':_0x3caabf[_0xa21b76(0x207)],'dbName':_0x3caabf[_0xa21b76(0x1e8)]};const _0x4e67f6=buildDbDirectoryName(_0x3caabf[_0xa21b76(0x1e8)],_0x3caabf['dbId']);if(_0x5b0df3===_0x4e67f6)return{'dbId':_0x3caabf[_0xa21b76(0x207)],'dbName':_0x3caabf[_0xa21b76(0x1e8)]};const _0x4225a9=parseExplicitDbDirectory(_0x5b0df3);if(_0x4225a9!=null)return{'dbId':_0x4225a9,'dbName':await getDbName(_0x4a4c8c,_0x4225a9)['catch'](()=>undefined)};const _0x1f869e=await listDatabases(_0x4a4c8c),_0x13dcb7=_0x1f869e['filter'](_0x132830=>buildDbDirectoryName(_0x132830['dbName'],_0x132830[_0xa21b76(0x207)])===_0x5b0df3);if(_0x13dcb7[_0xa21b76(0x219)]===0x1)return{'dbId':_0x13dcb7[0x0]['dbId'],'dbName':_0x13dcb7[0x0]['dbName']};if(_0x13dcb7[_0xa21b76(0x219)]===0x0)throw CliErrors[_0xa21b76(0x1f3)](_0xa21b76(0x217)+_0x5b0df3+_0xa21b76(0x1ff)+_0x1995a6['sqlCode']+'.');const _0x215c04=_0x13dcb7[_0xa21b76(0x206)](_0x5483ec=>_0x5483ec[_0xa21b76(0x1e8)]+'\x20('+_0x5483ec[_0xa21b76(0x207)]+')')[_0xa21b76(0x21b)](',\x20');throw CliErrors[_0xa21b76(0x1f3)](_0xa21b76(0x20e)+_0x5b0df3+_0xa21b76(0x1fc)+_0x1995a6[_0xa21b76(0x1f0)]+':\x20'+_0x215c04);}function parseExplicitDbDirectory(_0x458c51){const _0x2346e3=a157_0x56aecf,_0x1c509c=/^db-(\d+)$/['exec'](_0x458c51);if(!_0x1c509c)return null;const _0x8d8cfa=Number(_0x1c509c[0x1]);return Number[_0x2346e3(0x1ef)](_0x8d8cfa)&&_0x8d8cfa>0x0?_0x8d8cfa:null;}
@@ -1 +1 @@
1
- const a158_0x1fe889=a158_0x490a;function a158_0x490a(_0x399eac,_0x28aac8){_0x399eac=_0x399eac-0x16c;const _0x1d74f5=a158_0x1d74();let _0x490afb=_0x1d74f5[_0x399eac];return _0x490afb;}(function(_0x363d43,_0x211ec){const _0x9ba1d6=a158_0x490a,_0x3c5a24=_0x363d43();while(!![]){try{const _0x4d2a17=-parseInt(_0x9ba1d6(0x180))/0x1+parseInt(_0x9ba1d6(0x17e))/0x2+parseInt(_0x9ba1d6(0x171))/0x3+-parseInt(_0x9ba1d6(0x176))/0x4+parseInt(_0x9ba1d6(0x17b))/0x5+parseInt(_0x9ba1d6(0x17a))/0x6*(-parseInt(_0x9ba1d6(0x181))/0x7)+parseInt(_0x9ba1d6(0x173))/0x8*(parseInt(_0x9ba1d6(0x175))/0x9);if(_0x4d2a17===_0x211ec)break;else _0x3c5a24['push'](_0x3c5a24['shift']());}catch(_0x3957ce){_0x3c5a24['push'](_0x3c5a24['shift']());}}}(a158_0x1d74,0x21b64));function a158_0x1d74(){const _0x1982a3=['118805EsvtVZ','Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.','Query\x20description','137640CGZJFq','file','216420qTUBIs','217qHDAeq','Path\x20to\x20the\x20SQL\x20file','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)','save','SQL\x20query\x20display\x20name','95823MJIwkP','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`.','16kxylgV','write','1536993OhJIHT','408220VcjAuF','string','sqlname','validation','1842RESysZ'];a158_0x1d74=function(){return _0x1982a3;};return a158_0x1d74();}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.',a158_0x1fe889(0x17c),a158_0x1fe889(0x172)]['join']('\x0a');export const sqlSave={'service':'sql','command':a158_0x1fe889(0x16f),'description':a158_0x1fe889(0x16d),'risk':a158_0x1fe889(0x174),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a158_0x1fe889(0x17f),'type':a158_0x1fe889(0x177),'required':!![],'description':a158_0x1fe889(0x16c)},SQLCODE_FLAG_OPTIONAL,{'name':a158_0x1fe889(0x178),'type':a158_0x1fe889(0x177),'description':a158_0x1fe889(0x170)},{'name':'db','type':a158_0x1fe889(0x177),'description':a158_0x1fe889(0x16e)},{'name':'description','type':a158_0x1fe889(0x177),'description':a158_0x1fe889(0x17d)}],async 'validate'(){throw CliErrors['validation'](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){const _0xcf2381=a158_0x1fe889;throw CliErrors[_0xcf2381(0x179)](SQL_SAVE_DEPRECATED_HINT);}};
1
+ const a158_0x42f38d=a158_0x4b7f;(function(_0x5111e9,_0x555f5a){const _0x363505=a158_0x4b7f,_0x50c028=_0x5111e9();while(!![]){try{const _0x37b149=-parseInt(_0x363505(0x1e9))/0x1*(-parseInt(_0x363505(0x1eb))/0x2)+-parseInt(_0x363505(0x1df))/0x3*(parseInt(_0x363505(0x1d5))/0x4)+-parseInt(_0x363505(0x1dd))/0x5*(parseInt(_0x363505(0x1e7))/0x6)+-parseInt(_0x363505(0x1da))/0x7*(parseInt(_0x363505(0x1db))/0x8)+-parseInt(_0x363505(0x1d4))/0x9*(parseInt(_0x363505(0x1e2))/0xa)+parseInt(_0x363505(0x1e0))/0xb*(-parseInt(_0x363505(0x1e8))/0xc)+parseInt(_0x363505(0x1e6))/0xd*(parseInt(_0x363505(0x1d3))/0xe);if(_0x37b149===_0x555f5a)break;else _0x50c028['push'](_0x50c028['shift']());}catch(_0x54cd19){_0x50c028['push'](_0x50c028['shift']());}}}(a158_0x34a5,0x508c2));import{CliErrors}from'../../errors.js';function a158_0x34a5(){const _0x12982c=['Query\x20description','5teZZSB','sqlname','812874cHBMuE','352MthBUC','SQL\x20query\x20display\x20name','200ILTtty','sql','write','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','1354327lfdLtj','1835178nSLMdr','40128UAUbGI','1YagpXl','validation','678856vilUbt','description','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`.','154byWGCg','183069gouHkY','4IhPzFW','Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.','save','Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','string','226891srQUun','16ojROfK'];a158_0x34a5=function(){return _0x12982c;};return a158_0x34a5();}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a158_0x4b7f(_0xa91bac,_0x11ac35){_0xa91bac=_0xa91bac-0x1d3;const _0x34a512=a158_0x34a5();let _0x4b7f8e=_0x34a512[_0xa91bac];return _0x4b7f8e;}const SQL_SAVE_DEPRECATED_HINT=['`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.',a158_0x42f38d(0x1d6),a158_0x42f38d(0x1ed)]['join']('\x0a');export const sqlSave={'service':a158_0x42f38d(0x1e3),'command':a158_0x42f38d(0x1d7),'description':a158_0x42f38d(0x1d8),'risk':a158_0x42f38d(0x1e4),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':'file','type':a158_0x42f38d(0x1d9),'required':!![],'description':'Path\x20to\x20the\x20SQL\x20file'},SQLCODE_FLAG_OPTIONAL,{'name':a158_0x42f38d(0x1de),'type':a158_0x42f38d(0x1d9),'description':a158_0x42f38d(0x1e1)},{'name':'db','type':a158_0x42f38d(0x1d9),'description':a158_0x42f38d(0x1e5)},{'name':a158_0x42f38d(0x1ec),'type':a158_0x42f38d(0x1d9),'description':a158_0x42f38d(0x1dc)}],async 'validate'(){const _0x1132d2=a158_0x42f38d;throw CliErrors[_0x1132d2(0x1ea)](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){const _0x184c57=a158_0x42f38d;throw CliErrors[_0x184c57(0x1ea)](SQL_SAVE_DEPRECATED_HINT);}};
@@ -1 +1 @@
1
- const a159_0x4cc746=a159_0x2015;(function(_0x496d60,_0x288727){const _0x577478=a159_0x2015,_0x330551=_0x496d60();while(!![]){try{const _0x2dcc0a=-parseInt(_0x577478(0x151))/0x1*(-parseInt(_0x577478(0x153))/0x2)+-parseInt(_0x577478(0x136))/0x3*(-parseInt(_0x577478(0x13c))/0x4)+parseInt(_0x577478(0x144))/0x5+parseInt(_0x577478(0x139))/0x6+-parseInt(_0x577478(0x15b))/0x7*(-parseInt(_0x577478(0x130))/0x8)+parseInt(_0x577478(0x14f))/0x9*(-parseInt(_0x577478(0x135))/0xa)+-parseInt(_0x577478(0x14a))/0xb;if(_0x2dcc0a===_0x288727)break;else _0x330551['push'](_0x330551['shift']());}catch(_0x1465b9){_0x330551['push'](_0x330551['shift']());}}}(a159_0x5aea,0xd11af));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_0x4cc746(0x134);export function buildSqlLockEntry(_0x531adb,_0x2c87ba,_0x4bdc59,_0x5314d9){const _0x143d89=a159_0x4cc746,_0xa82993=detectSqlMode(_0x2c87ba);return{'path':buildSqlRelativePath(_0x531adb['sqlCode'],_0x531adb[_0x143d89(0x149)],_0x5314d9?.[_0x143d89(0x131)],_0xa82993,_0x531adb[_0x143d89(0x146)]),'hash':_0x4bdc59,'remoteId':_0x531adb['id'],'version':_0x531adb['version'],'dbId':Number(_0x531adb['dbId']),'dbName':_0x5314d9?.['dbName'],'sqlName':_0x531adb['sqlName'],'sqlConfig':_0x531adb[_0x143d89(0x14d)]??undefined,'mode':_0xa82993};}export function cloneSqlLockData(_0x12f302){const _0x5ab176=a159_0x4cc746;return{'apps':Object[_0x5ab176(0x14c)](Object[_0x5ab176(0x132)](_0x12f302[_0x5ab176(0x13a)])['map'](([_0x3049cb,_0x49f8e7])=>[_0x3049cb,{'sqlRoot':_0x49f8e7['sqlRoot'],'lastSync':_0x49f8e7[_0x5ab176(0x159)],'sqls':{..._0x49f8e7[_0x5ab176(0x13d)]}}]))};}export function ensureRemoteSqlContent(_0x39fb03){const _0x51707d=a159_0x4cc746;return _0x39fb03[_0x51707d(0x155)]??'';}export function buildLocalSqlFileContent(_0x4c7cd8,_0x5423a5,_0x56285b){const _0x5a44d1=a159_0x4cc746,_0x5f42e8=_0x56285b?.['mode']??detectSqlMode(_0x5423a5),_0x21fac3=stripLocalSqlMetadata(_0x5423a5,_0x5f42e8)[_0x5a44d1(0x14e)](),_0x43388b=[...buildMetadataHeaderLines({'sqlCode':_0x4c7cd8[_0x5a44d1(0x141)],'sqlName':_0x4c7cd8['sqlName'],'dbId':_0x4c7cd8[_0x5a44d1(0x146)],'dbName':_0x56285b?.[_0x5a44d1(0x131)],'mode':_0x5f42e8,'syncedAt':_0x56285b?.['syncedAt'],'description':_0x56285b?.[_0x5a44d1(0x158)]},_0x5f42e8),'',_0x21fac3],_0x4d8649=_0x43388b[_0x5a44d1(0x13b)]('\x0a');return _0x4d8649[_0x5a44d1(0x133)]('\x0a')?_0x4d8649:_0x4d8649+'\x0a';}export function stripLocalSqlMetadata(_0x50b200,_0x4caa6b){const _0x4a4234=a159_0x4cc746,_0x42dd1a=_0x50b200[_0x4a4234(0x150)](/\r\n/g,'\x0a')[_0x4a4234(0x145)]('\x0a'),_0x2bed8d=[];let _0xa5953a=0x0;if(_0x4caa6b===_0x4a4234(0x15c))while(_0xa5953a<_0x42dd1a[_0x4a4234(0x156)]){const _0x7a46ad=_0x42dd1a[_0xa5953a]??'';if(/^\s*<!--\s*@lovrabet\./[_0x4a4234(0x15a)](_0x7a46ad)){_0xa5953a++;continue;}if(_0x7a46ad[_0x4a4234(0x14e)]()===''&&_0xa5953a>0x0){_0xa5953a++;continue;}break;}else while(_0xa5953a<_0x42dd1a[_0x4a4234(0x156)]){const _0x330449=_0x42dd1a[_0xa5953a]??'';if(/^\s*--\s*@lovrabet\./[_0x4a4234(0x15a)](_0x330449)){_0xa5953a++;continue;}if(_0x330449[_0x4a4234(0x14e)]()===''&&_0xa5953a>0x0){_0xa5953a++;continue;}break;}for(;_0xa5953a<_0x42dd1a[_0x4a4234(0x156)];_0xa5953a++){_0x2bed8d['push'](_0x42dd1a[_0xa5953a]);}return _0x2bed8d[_0x4a4234(0x13b)]('\x0a')[_0x4a4234(0x137)]();}export function resolveSqlMode(_0x3677d1,_0x56a600){const _0xbf8fbc=a159_0x4cc746;if(_0x56a600?.[_0xbf8fbc(0x13e)])return _0x56a600[_0xbf8fbc(0x13e)];return detectSqlMode(_0x3677d1);}export function resolveSqlFileName(_0x2b59e3,_0x24c0e1,_0x5c41da){const _0x2c1978=a159_0x4cc746;if(_0x5c41da?.[_0x2c1978(0x147)])return _0x5c41da[_0x2c1978(0x147)];if(_0x5c41da?.[_0x2c1978(0x149)]||_0x5c41da?.['dbName'])return buildSqlRelativePath(_0x2b59e3,_0x5c41da?.[_0x2c1978(0x149)],_0x5c41da?.[_0x2c1978(0x131)],resolveSqlMode(_0x24c0e1,_0x5c41da),_0x5c41da?.[_0x2c1978(0x146)]);return buildDefaultSqlFileName(_0x2b59e3,resolveSqlMode(_0x24c0e1,_0x5c41da));}export function resolveSqlLocalDir(_0x3f5045,_0x403c3e){return join(_0x3f5045,SQL_LOCAL_REL_DIR,_0x403c3e);}export async function confirmForceOverwrite(_0x242f9e){const _0x2b34fb=a159_0x4cc746,_0x1aae31=createInterface({'input':process['stdin'],'output':process[_0x2b34fb(0x157)]}),_0x352e91=await new Promise(_0x3085dc=>{const _0x5698d5=_0x2b34fb;_0x1aae31[_0x5698d5(0x138)](_0x242f9e+_0x5698d5(0x148),_0x3085dc);});return _0x1aae31['close'](),['y',_0x2b34fb(0x152)]['includes'](_0x352e91[_0x2b34fb(0x14e)]()[_0x2b34fb(0x13f)]());}function a159_0x2015(_0x5a0d1d,_0x19f870){_0x5a0d1d=_0x5a0d1d-0x130;const _0x5aea4e=a159_0x5aea();let _0x20154=_0x5aea4e[_0x5a0d1d];return _0x20154;}function a159_0x5aea(){const _0x51aa12=['.rabetbase/sql','30JjAeMf','15sDObLp','trimStart','question','5860050BOsmgs','apps','join','1167340WHNsOk','sqls','mode','toLowerCase','\x20-->','sqlCode','filter','syncedAt','4378085DpQVDC','split','dbId','path','\x20[y/N]\x20','sqlName','37418612tclTDp','<!--\x20@lovrabet.','fromEntries','sqlConfig','trim','3548007LFKEFG','replace','301066YGbEoC','yes','4oMXsym','map','sqlContent','length','stderr','description','lastSync','test','10690799ERWXhi','mybatisXml','8FtQleA','dbName','entries','endsWith'];a159_0x5aea=function(){return _0x51aa12;};return a159_0x5aea();}export function findSqlLockScope(_0x2e7525,_0x1204b6){const _0x1e9f21=a159_0x4cc746;return _0x2e7525[_0x1e9f21(0x13a)][_0x1204b6];}function buildMetadataHeaderLines(_0x2c2a75,_0x43dd35){const _0x575cfe=a159_0x4cc746,_0x117a16=[['sqlCode',_0x2c2a75[_0x575cfe(0x141)]],['sqlName',_0x2c2a75[_0x575cfe(0x149)]],['dbId',_0x2c2a75[_0x575cfe(0x146)]],[_0x575cfe(0x131),_0x2c2a75['dbName']],[_0x575cfe(0x13e),_0x2c2a75[_0x575cfe(0x13e)]],['syncedAt',_0x2c2a75[_0x575cfe(0x143)]],[_0x575cfe(0x158),_0x2c2a75[_0x575cfe(0x158)]]];if(_0x43dd35===_0x575cfe(0x15c))return _0x117a16[_0x575cfe(0x142)](([,_0x52acf3])=>_0x52acf3!==undefined&&_0x52acf3!==null&&String(_0x52acf3)[_0x575cfe(0x14e)]()!=='')[_0x575cfe(0x154)](([_0x4c4946,_0x52fc87])=>_0x575cfe(0x14b)+_0x4c4946+':\x20'+String(_0x52fc87)+_0x575cfe(0x140));return _0x117a16[_0x575cfe(0x142)](([,_0x588889])=>_0x588889!==undefined&&_0x588889!==null&&String(_0x588889)[_0x575cfe(0x14e)]()!=='')[_0x575cfe(0x154)](([_0x4ce1b9,_0x430334])=>'--\x20@lovrabet.'+_0x4ce1b9+':\x20'+String(_0x430334));}
1
+ const a159_0x51b696=a159_0x2c52;(function(_0x3e47df,_0x4168b9){const _0x13d4f2=a159_0x2c52,_0x355535=_0x3e47df();while(!![]){try{const _0x25f292=parseInt(_0x13d4f2(0x169))/0x1*(parseInt(_0x13d4f2(0x15d))/0x2)+parseInt(_0x13d4f2(0x16a))/0x3*(parseInt(_0x13d4f2(0x17c))/0x4)+-parseInt(_0x13d4f2(0x179))/0x5*(-parseInt(_0x13d4f2(0x158))/0x6)+parseInt(_0x13d4f2(0x176))/0x7+parseInt(_0x13d4f2(0x16d))/0x8*(parseInt(_0x13d4f2(0x170))/0x9)+-parseInt(_0x13d4f2(0x15e))/0xa+parseInt(_0x13d4f2(0x173))/0xb*(-parseInt(_0x13d4f2(0x15a))/0xc);if(_0x25f292===_0x4168b9)break;else _0x355535['push'](_0x355535['shift']());}catch(_0x5bc5e4){_0x355535['push'](_0x355535['shift']());}}}(a159_0x4665,0x364db));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_0x51b696(0x165);export function buildSqlLockEntry(_0x512134,_0x3e1807,_0x5cdcbb,_0x1dcab1){const _0x19c812=a159_0x51b696,_0x5a718a=detectSqlMode(_0x3e1807);return{'path':buildSqlRelativePath(_0x512134[_0x19c812(0x15b)],_0x512134[_0x19c812(0x164)],_0x1dcab1?.[_0x19c812(0x157)],_0x5a718a,_0x512134[_0x19c812(0x178)]),'hash':_0x5cdcbb,'remoteId':_0x512134['id'],'version':_0x512134[_0x19c812(0x159)],'dbId':Number(_0x512134[_0x19c812(0x178)]),'dbName':_0x1dcab1?.[_0x19c812(0x157)],'sqlName':_0x512134[_0x19c812(0x164)],'sqlConfig':_0x512134['sqlConfig']??undefined,'mode':_0x5a718a};}export function cloneSqlLockData(_0x3428da){const _0x46c589=a159_0x51b696;return{'apps':Object['fromEntries'](Object[_0x46c589(0x167)](_0x3428da[_0x46c589(0x17a)])[_0x46c589(0x16b)](([_0x184ee5,_0x102d9d])=>[_0x184ee5,{'sqlRoot':_0x102d9d['sqlRoot'],'lastSync':_0x102d9d[_0x46c589(0x155)],'sqls':{..._0x102d9d[_0x46c589(0x17d)]}}]))};}export function ensureRemoteSqlContent(_0x4ca172){const _0x5d8ef0=a159_0x51b696;return _0x4ca172[_0x5d8ef0(0x156)]??'';}export function buildLocalSqlFileContent(_0x33a456,_0x10a0d2,_0x9c2af){const _0x1bc11d=a159_0x51b696,_0xf2c1d5=_0x9c2af?.['mode']??detectSqlMode(_0x10a0d2),_0x2cf53a=stripLocalSqlMetadata(_0x10a0d2,_0xf2c1d5)[_0x1bc11d(0x175)](),_0x9d01df=[...buildMetadataHeaderLines({'sqlCode':_0x33a456[_0x1bc11d(0x15b)],'sqlName':_0x33a456['sqlName'],'dbId':_0x33a456[_0x1bc11d(0x178)],'dbName':_0x9c2af?.[_0x1bc11d(0x157)],'mode':_0xf2c1d5,'syncedAt':_0x9c2af?.['syncedAt'],'description':_0x9c2af?.[_0x1bc11d(0x172)]},_0xf2c1d5),'',_0x2cf53a],_0x2dec9a=_0x9d01df['join']('\x0a');return _0x2dec9a[_0x1bc11d(0x161)]('\x0a')?_0x2dec9a:_0x2dec9a+'\x0a';}export function stripLocalSqlMetadata(_0x5ec39e,_0x4db95d){const _0x128c5d=a159_0x51b696,_0x27b276=_0x5ec39e[_0x128c5d(0x153)](/\r\n/g,'\x0a')['split']('\x0a'),_0x56536e=[];let _0x430940=0x0;if(_0x4db95d===_0x128c5d(0x17e))while(_0x430940<_0x27b276[_0x128c5d(0x151)]){const _0x5ea238=_0x27b276[_0x430940]??'';if(/^\s*<!--\s*@lovrabet\./['test'](_0x5ea238)){_0x430940++;continue;}if(_0x5ea238[_0x128c5d(0x175)]()===''&&_0x430940>0x0){_0x430940++;continue;}break;}else while(_0x430940<_0x27b276[_0x128c5d(0x151)]){const _0x251cd1=_0x27b276[_0x430940]??'';if(/^\s*--\s*@lovrabet\./[_0x128c5d(0x160)](_0x251cd1)){_0x430940++;continue;}if(_0x251cd1[_0x128c5d(0x175)]()===''&&_0x430940>0x0){_0x430940++;continue;}break;}for(;_0x430940<_0x27b276['length'];_0x430940++){_0x56536e[_0x128c5d(0x15f)](_0x27b276[_0x430940]);}return _0x56536e[_0x128c5d(0x152)]('\x0a')['trimStart']();}export function resolveSqlMode(_0x3b9b12,_0x354dc1){const _0x546375=a159_0x51b696;if(_0x354dc1?.[_0x546375(0x171)])return _0x354dc1['mode'];return detectSqlMode(_0x3b9b12);}function a159_0x2c52(_0x528cee,_0x23fbab){_0x528cee=_0x528cee-0x151;const _0x466542=a159_0x4665();let _0x2c521a=_0x466542[_0x528cee];return _0x2c521a;}export function resolveSqlFileName(_0x1c45dd,_0x2a2e17,_0x3a90ba){const _0x53c9d5=a159_0x51b696;if(_0x3a90ba?.[_0x53c9d5(0x163)])return _0x3a90ba[_0x53c9d5(0x163)];if(_0x3a90ba?.[_0x53c9d5(0x164)]||_0x3a90ba?.[_0x53c9d5(0x157)])return buildSqlRelativePath(_0x1c45dd,_0x3a90ba?.[_0x53c9d5(0x164)],_0x3a90ba?.['dbName'],resolveSqlMode(_0x2a2e17,_0x3a90ba),_0x3a90ba?.[_0x53c9d5(0x178)]);return buildDefaultSqlFileName(_0x1c45dd,resolveSqlMode(_0x2a2e17,_0x3a90ba));}export function resolveSqlLocalDir(_0x4be3ea,_0x461ced){return join(_0x4be3ea,SQL_LOCAL_REL_DIR,_0x461ced);}export async function confirmForceOverwrite(_0x3880ec){const _0x14d056=a159_0x51b696,_0x2b00af=createInterface({'input':process[_0x14d056(0x162)],'output':process[_0x14d056(0x17f)]}),_0x167720=await new Promise(_0x597215=>{const _0x474d14=_0x14d056;_0x2b00af[_0x474d14(0x174)](_0x3880ec+'\x20[y/N]\x20',_0x597215);});return _0x2b00af[_0x14d056(0x16c)](),['y',_0x14d056(0x16e)][_0x14d056(0x168)](_0x167720['trim']()[_0x14d056(0x17b)]());}export function findSqlLockScope(_0x19c777,_0x30fe5f){const _0x31d70d=a159_0x51b696;return _0x19c777[_0x31d70d(0x17a)][_0x30fe5f];}function a159_0x4665(){const _0x3984e5=['stderr','length','join','replace','--\x20@lovrabet.','lastSync','sqlContent','dbName','6njZACs','version','468FVzVeY','sqlCode','filter','170938TjdewD','428600oFpmWj','push','test','endsWith','stdin','path','sqlName','.rabetbase/sql','syncedAt','entries','includes','1aAPIGn','727818gavgBN','map','close','3736mYXeAD','yes','<!--\x20@lovrabet.','45oxKVtH','mode','description','128623VYBqMU','question','trim','1067822utfegu','\x20-->','dbId','1191790iUypYB','apps','toLowerCase','4rehGbR','sqls','mybatisXml'];a159_0x4665=function(){return _0x3984e5;};return a159_0x4665();}function buildMetadataHeaderLines(_0x3a81de,_0x5cf837){const _0x53e6e0=a159_0x51b696,_0x6ba7b9=[['sqlCode',_0x3a81de[_0x53e6e0(0x15b)]],[_0x53e6e0(0x164),_0x3a81de['sqlName']],[_0x53e6e0(0x178),_0x3a81de['dbId']],[_0x53e6e0(0x157),_0x3a81de[_0x53e6e0(0x157)]],[_0x53e6e0(0x171),_0x3a81de['mode']],['syncedAt',_0x3a81de[_0x53e6e0(0x166)]],[_0x53e6e0(0x172),_0x3a81de[_0x53e6e0(0x172)]]];if(_0x5cf837==='mybatisXml')return _0x6ba7b9[_0x53e6e0(0x15c)](([,_0x289214])=>_0x289214!==undefined&&_0x289214!==null&&String(_0x289214)[_0x53e6e0(0x175)]()!=='')['map'](([_0x3de2ec,_0x579f8e])=>_0x53e6e0(0x16f)+_0x3de2ec+':\x20'+String(_0x579f8e)+_0x53e6e0(0x177));return _0x6ba7b9[_0x53e6e0(0x15c)](([,_0x108722])=>_0x108722!==undefined&&_0x108722!==null&&String(_0x108722)[_0x53e6e0(0x175)]()!=='')[_0x53e6e0(0x16b)](([_0x562358,_0x1fc5cf])=>_0x53e6e0(0x154)+_0x562358+':\x20'+String(_0x1fc5cf));}
@@ -1 +1 @@
1
- const a160_0x3ff90b=a160_0x929f;(function(_0xb2f12,_0x3b9641){const _0xd8f84e=a160_0x929f,_0xabfb9c=_0xb2f12();while(!![]){try{const _0x416f86=parseInt(_0xd8f84e(0xa8))/0x1+-parseInt(_0xd8f84e(0xbb))/0x2*(parseInt(_0xd8f84e(0xba))/0x3)+-parseInt(_0xd8f84e(0xb1))/0x4+parseInt(_0xd8f84e(0xac))/0x5*(-parseInt(_0xd8f84e(0xa1))/0x6)+parseInt(_0xd8f84e(0x9f))/0x7*(parseInt(_0xd8f84e(0x9e))/0x8)+-parseInt(_0xd8f84e(0xab))/0x9+-parseInt(_0xd8f84e(0x9d))/0xa*(-parseInt(_0xd8f84e(0xad))/0xb);if(_0x416f86===_0x3b9641)break;else _0xabfb9c['push'](_0xabfb9c['shift']());}catch(_0x38f7a4){_0xabfb9c['push'](_0xabfb9c['shift']());}}}(a160_0x469a,0xa76a7));import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';function a160_0x469a(){const _0x43abbf=['remote','sqlName','hash','\x20remote-only','push','relativePath','tableData','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','1924662NzIZkd','4PIzIlG','has','length','sqls','\x20added,\x20','lockKey','\x20unchanged','70UeCEkC','8ZwnNqe','3956078IYGlkN','sqlCode','18gsMKLR','All\x20SQL\x20queries\x20are\x20in\x20sync.','paging','status','keys','\x20missing,\x20','path','1153144SdeJmB','bool','map','11819034bCQoqt','265125sweZkO','3367507COxOLk','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','sqlRoot','appCode','1680452waaoCZ'];a160_0x469a=function(){return _0x43abbf;};return a160_0x469a();}import{computeSqlFileHash}from'../../core/sql-sync/hash.js';function a160_0x929f(_0x41821f,_0x1dfec6){_0x41821f=_0x41821f-0x99;const _0x469a80=a160_0x469a();let _0x929fc4=_0x469a80[_0x41821f];return _0x929fc4;}import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x31aa3d){const _0x4429c6=a160_0x929f,_0x57630a=[];let _0x5347a0=0x1;while(!![]){const _0x2ee63b=await listSqlQueries(_0x31aa3d,{'currentPage':_0x5347a0,'pageSize':PAGE_SIZE}),_0x9ac81a=_0x2ee63b[_0x4429c6(0xb8)]??[];_0x57630a[_0x4429c6(0xb6)](..._0x9ac81a[_0x4429c6(0xaa)](_0x12927a=>_0x12927a[_0x4429c6(0xa0)]));if(_0x9ac81a['length']===0x0)break;const _0x50c9ba=_0x2ee63b[_0x4429c6(0xa3)]?.['totalCount'];if(_0x50c9ba!=null?_0x57630a['length']>=_0x50c9ba:_0x9ac81a[_0x4429c6(0xbd)]<PAGE_SIZE)break;_0x5347a0++;}return _0x57630a;}export const sqlStatus={'service':'sql','command':a160_0x3ff90b(0xa4),'description':a160_0x3ff90b(0xb9),'risk':'read','flags':[{'name':'remote','type':'boolean','description':a160_0x3ff90b(0xae)}],async 'execute'(_0x14f0f0){const _0x338892=a160_0x3ff90b,_0x55d542=loadSqlProjectConfig(_0x14f0f0[_0x338892(0xb0)]),_0x3c6ee6=await readSqlLockFile(_0x55d542['lockFilePath']),{appLock:_0x527d3c}=ensureSqlLockScope(_0x3c6ee6??createEmptySqlLock(),_0x55d542[_0x338892(0xb0)],_0x55d542[_0x338892(0xaf)],_0x338892(0xa4)),_0x528827=await scanLocalSqlQueries(_0x55d542),_0x13d0a3=[],_0x416a5f=[],_0x2a8b88=[],_0x52bde5=[],_0x1050b6=new Set(_0x528827[_0x338892(0xaa)](_0x2e5e24=>_0x2e5e24[_0x338892(0x9b)]));for(const _0x1ca730 of _0x528827){const _0x3aeba9=await computeSqlFileHash(_0x1ca730['filePath']),_0x57d74b=_0x527d3c[_0x338892(0x99)][_0x1ca730[_0x338892(0x9b)]],_0x404d8d=!!_0x57d74b&&_0x57d74b[_0x338892(0xa7)]!==_0x1ca730[_0x338892(0xb7)],_0x54e68f=!!_0x57d74b&&!!_0x1ca730[_0x338892(0xb3)]&&_0x57d74b[_0x338892(0xb3)]!==_0x1ca730[_0x338892(0xb3)];if(!_0x57d74b)_0x13d0a3['push'](_0x1ca730[_0x338892(0x9b)]);else _0x57d74b[_0x338892(0xb4)]!==_0x3aeba9||_0x404d8d||_0x54e68f?_0x416a5f[_0x338892(0xb6)](_0x1ca730['lockKey']):_0x2a8b88[_0x338892(0xb6)](_0x1ca730[_0x338892(0x9b)]);}for(const _0xc58186 of Object[_0x338892(0xa5)](_0x527d3c[_0x338892(0x99)])){!_0x1050b6[_0x338892(0xbc)](_0xc58186)&&_0x52bde5[_0x338892(0xb6)](_0xc58186);}const _0x58ae64=[];if(_0x14f0f0[_0x338892(0xa9)](_0x338892(0xb2))){const _0x2f8350=await fetchAllSqlCodes(_0x14f0f0[_0x338892(0xb0)]);for(const _0x2039ab of _0x2f8350){!_0x1050b6[_0x338892(0xbc)](_0x2039ab)&&!_0x527d3c[_0x338892(0x99)][_0x2039ab]&&_0x58ae64['push'](_0x2039ab);}}const _0x4c86c5=_0x13d0a3['length']===0x0&&_0x416a5f[_0x338892(0xbd)]===0x0&&_0x52bde5[_0x338892(0xbd)]===0x0&&_0x58ae64[_0x338892(0xbd)]===0x0;return{'ok':!![],'data':{'added':_0x13d0a3,'modified':_0x416a5f,'missing':_0x52bde5,'unchanged':_0x2a8b88,'remoteOnly':_0x58ae64},'message':_0x4c86c5?_0x338892(0xa2):_0x13d0a3[_0x338892(0xbd)]+_0x338892(0x9a)+_0x416a5f['length']+'\x20modified,\x20'+_0x52bde5[_0x338892(0xbd)]+_0x338892(0xa6)+_0x2a8b88['length']+_0x338892(0x9c)+(_0x58ae64[_0x338892(0xbd)]>0x0?',\x20'+_0x58ae64[_0x338892(0xbd)]+_0x338892(0xb5):'')};}};
1
+ const a160_0x477f4e=a160_0x2f12;(function(_0x3ef2b8,_0x30d24f){const _0x83b1a6=a160_0x2f12,_0x244660=_0x3ef2b8();while(!![]){try{const _0x528410=parseInt(_0x83b1a6(0x75))/0x1*(parseInt(_0x83b1a6(0x8f))/0x2)+parseInt(_0x83b1a6(0x7c))/0x3*(-parseInt(_0x83b1a6(0x84))/0x4)+-parseInt(_0x83b1a6(0x91))/0x5+parseInt(_0x83b1a6(0x78))/0x6+parseInt(_0x83b1a6(0x80))/0x7*(parseInt(_0x83b1a6(0x7d))/0x8)+-parseInt(_0x83b1a6(0x79))/0x9+parseInt(_0x83b1a6(0x86))/0xa*(parseInt(_0x83b1a6(0x82))/0xb);if(_0x528410===_0x30d24f)break;else _0x244660['push'](_0x244660['shift']());}catch(_0x3e9974){_0x244660['push'](_0x244660['shift']());}}}(a160_0x2ead,0xeffe9));function a160_0x2f12(_0x144f3f,_0x17c0cd){_0x144f3f=_0x144f3f-0x73;const _0x2eadcd=a160_0x2ead();let _0x2f12b5=_0x2eadcd[_0x144f3f];return _0x2f12b5;}import{listSqlQueries}from'../../core/api-client.js';function a160_0x2ead(){const _0x4d8528=['tableData','11CMKkab','bool','24egEJdV','lockKey','1496270MpCETA','paging','sql','length','boolean','\x20modified,\x20','relativePath','All\x20SQL\x20queries\x20are\x20in\x20sync.','\x20unchanged','46JjsEKV','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','5664325CiCUWs','hash','push','map','appCode','remote','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','sqlRoot','totalCount','sqlCode','filePath','28497Wivlbp','\x20remote-only','keys','10212600cBiYwP','4193847PnMZpe','status','sqls','466530GgVztz','8ZGRjUb','sqlName','has','7054369NpkgJn'];a160_0x2ead=function(){return _0x4d8528;};return a160_0x2ead();}import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x3f8047){const _0x3e1857=a160_0x2f12,_0x487f61=[];let _0x56a383=0x1;while(!![]){const _0x2457bf=await listSqlQueries(_0x3f8047,{'currentPage':_0x56a383,'pageSize':PAGE_SIZE}),_0xf06c63=_0x2457bf[_0x3e1857(0x81)]??[];_0x487f61[_0x3e1857(0x93)](..._0xf06c63[_0x3e1857(0x94)](_0x4005c4=>_0x4005c4[_0x3e1857(0x73)]));if(_0xf06c63[_0x3e1857(0x89)]===0x0)break;const _0x50c153=_0x2457bf[_0x3e1857(0x87)]?.[_0x3e1857(0x99)];if(_0x50c153!=null?_0x487f61[_0x3e1857(0x89)]>=_0x50c153:_0xf06c63[_0x3e1857(0x89)]<PAGE_SIZE)break;_0x56a383++;}return _0x487f61;}export const sqlStatus={'service':a160_0x477f4e(0x88),'command':a160_0x477f4e(0x7a),'description':a160_0x477f4e(0x90),'risk':'read','flags':[{'name':'remote','type':a160_0x477f4e(0x8a),'description':a160_0x477f4e(0x97)}],async 'execute'(_0x288337){const _0x1ac3ab=a160_0x477f4e,_0x707c98=loadSqlProjectConfig(_0x288337[_0x1ac3ab(0x95)]),_0x5e5255=await readSqlLockFile(_0x707c98['lockFilePath']),{appLock:_0x3454bc}=ensureSqlLockScope(_0x5e5255??createEmptySqlLock(),_0x707c98[_0x1ac3ab(0x95)],_0x707c98[_0x1ac3ab(0x98)],_0x1ac3ab(0x7a)),_0x4c35e7=await scanLocalSqlQueries(_0x707c98),_0x4225f7=[],_0x2b7f31=[],_0x180396=[],_0x4a286b=[],_0x11aa20=new Set(_0x4c35e7[_0x1ac3ab(0x94)](_0x4f47dc=>_0x4f47dc[_0x1ac3ab(0x85)]));for(const _0x2cf570 of _0x4c35e7){const _0x5a8583=await computeSqlFileHash(_0x2cf570[_0x1ac3ab(0x74)]),_0x4d2871=_0x3454bc[_0x1ac3ab(0x7b)][_0x2cf570['lockKey']],_0x20e5b3=!!_0x4d2871&&_0x4d2871['path']!==_0x2cf570[_0x1ac3ab(0x8c)],_0x9eded9=!!_0x4d2871&&!!_0x2cf570[_0x1ac3ab(0x7e)]&&_0x4d2871[_0x1ac3ab(0x7e)]!==_0x2cf570['sqlName'];if(!_0x4d2871)_0x4225f7['push'](_0x2cf570['lockKey']);else _0x4d2871[_0x1ac3ab(0x92)]!==_0x5a8583||_0x20e5b3||_0x9eded9?_0x2b7f31[_0x1ac3ab(0x93)](_0x2cf570['lockKey']):_0x180396[_0x1ac3ab(0x93)](_0x2cf570[_0x1ac3ab(0x85)]);}for(const _0xb1b972 of Object[_0x1ac3ab(0x77)](_0x3454bc['sqls'])){!_0x11aa20[_0x1ac3ab(0x7f)](_0xb1b972)&&_0x4a286b[_0x1ac3ab(0x93)](_0xb1b972);}const _0x1927d8=[];if(_0x288337[_0x1ac3ab(0x83)](_0x1ac3ab(0x96))){const _0x1f9aa6=await fetchAllSqlCodes(_0x288337[_0x1ac3ab(0x95)]);for(const _0x311e90 of _0x1f9aa6){!_0x11aa20[_0x1ac3ab(0x7f)](_0x311e90)&&!_0x3454bc[_0x1ac3ab(0x7b)][_0x311e90]&&_0x1927d8[_0x1ac3ab(0x93)](_0x311e90);}}const _0x37f96b=_0x4225f7[_0x1ac3ab(0x89)]===0x0&&_0x2b7f31[_0x1ac3ab(0x89)]===0x0&&_0x4a286b[_0x1ac3ab(0x89)]===0x0&&_0x1927d8[_0x1ac3ab(0x89)]===0x0;return{'ok':!![],'data':{'added':_0x4225f7,'modified':_0x2b7f31,'missing':_0x4a286b,'unchanged':_0x180396,'remoteOnly':_0x1927d8},'message':_0x37f96b?_0x1ac3ab(0x8d):_0x4225f7[_0x1ac3ab(0x89)]+'\x20added,\x20'+_0x2b7f31[_0x1ac3ab(0x89)]+_0x1ac3ab(0x8b)+_0x4a286b[_0x1ac3ab(0x89)]+'\x20missing,\x20'+_0x180396[_0x1ac3ab(0x89)]+_0x1ac3ab(0x8e)+(_0x1927d8[_0x1ac3ab(0x89)]>0x0?',\x20'+_0x1927d8[_0x1ac3ab(0x89)]+_0x1ac3ab(0x76):'')};}};
@@ -1 +1 @@
1
- const a161_0x56a312=a161_0x337e;(function(_0x57b261,_0x43a7e5){const _0x4b9367=a161_0x337e,_0x540342=_0x57b261();while(!![]){try{const _0x103fea=-parseInt(_0x4b9367(0xbb))/0x1*(-parseInt(_0x4b9367(0xa3))/0x2)+parseInt(_0x4b9367(0x9c))/0x3*(-parseInt(_0x4b9367(0xae))/0x4)+-parseInt(_0x4b9367(0xbf))/0x5*(-parseInt(_0x4b9367(0xb4))/0x6)+parseInt(_0x4b9367(0x93))/0x7*(parseInt(_0x4b9367(0xb5))/0x8)+parseInt(_0x4b9367(0xa7))/0x9+-parseInt(_0x4b9367(0xc1))/0xa*(parseInt(_0x4b9367(0xa8))/0xb)+-parseInt(_0x4b9367(0xb3))/0xc;if(_0x103fea===_0x43a7e5)break;else _0x540342['push'](_0x540342['shift']());}catch(_0x3e03b){_0x540342['push'](_0x540342['shift']());}}}(a161_0x23d3,0x95c13));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';export const sqlValidate={'service':a161_0x56a312(0xac),'command':a161_0x56a312(0x98),'description':a161_0x56a312(0xba),'risk':a161_0x56a312(0x8f),'flags':[{'name':a161_0x56a312(0xa2),'type':'string','description':a161_0x56a312(0x8e)},{'name':a161_0x56a312(0xac),'type':'string','description':a161_0x56a312(0xaa)},{'name':'schemas','type':'string','description':a161_0x56a312(0xbe)}],async 'execute'(_0x502576){const _0x45f7e5=a161_0x56a312,_0x458a98=_0x502576['str'](_0x45f7e5(0xa2)),_0x56fa95=_0x502576[_0x45f7e5(0xa0)](_0x45f7e5(0xac));if(!_0x458a98&&!_0x56fa95)throw CliErrors[_0x45f7e5(0xaf)](_0x45f7e5(0xa2),_0x45f7e5(0x91));let _0x205daa;if(_0x458a98){const _0x16face=resolve(process[_0x45f7e5(0x97)](),_0x458a98);if(!existsSync(_0x16face))throw CliErrors[_0x45f7e5(0xa5)](_0x45f7e5(0xab)+_0x16face);_0x205daa=readFileSync(_0x16face,_0x45f7e5(0xb1));}else _0x205daa=_0x56fa95;const _0x4d5088=validateSql(_0x205daa),_0x2f1035={'valid':_0x4d5088[_0x45f7e5(0xb7)],'sqlType':_0x4d5088['sqlType'][_0x45f7e5(0xb9)],'isSelectOnly':_0x4d5088[_0x45f7e5(0x9f)][_0x45f7e5(0x94)],'isDangerous':_0x4d5088[_0x45f7e5(0x9f)][_0x45f7e5(0xad)],'tables':_0x4d5088[_0x45f7e5(0xb0)],'parameters':_0x4d5088[_0x45f7e5(0xc2)],'message':_0x4d5088[_0x45f7e5(0x99)]};_0x4d5088[_0x45f7e5(0x9f)][_0x45f7e5(0x95)]&&(_0x2f1035[_0x45f7e5(0x95)]=_0x4d5088[_0x45f7e5(0x9f)]['reason']);const _0x44a68b=_0x502576[_0x45f7e5(0xa0)](_0x45f7e5(0x90));if(_0x44a68b&&_0x4d5088['valid']){const _0x4ede37=_0x44a68b[_0x45f7e5(0xb6)](',')[_0x45f7e5(0x9a)](_0x32aa6c=>_0x32aa6c['trim']())['filter'](Boolean),_0x4637bd=[],_0x4d1574=filterDbTableBackedDatasets(await listDatasets(_0x502576[_0x45f7e5(0x8d)])),_0x31d62b=new Map(_0x4d1574[_0x45f7e5(0x9a)](_0x269bb8=>[_0x269bb8[_0x45f7e5(0xa1)]?.[_0x45f7e5(0xa6)]?.['toLowerCase'](),_0x269bb8]));for(const _0x3b582d of _0x4d5088[_0x45f7e5(0xb0)]){const _0x215395=_0x31d62b['get'](_0x3b582d[_0x45f7e5(0xbd)]());!_0x215395&&_0x4637bd[_0x45f7e5(0xb2)](_0x45f7e5(0x96)+_0x3b582d+_0x45f7e5(0xbc));}for(const _0xccb8a9 of _0x4ede37){let _0x33c330;try{_0x33c330=await getDatasetDetail(_0xccb8a9);}catch{_0x4637bd[_0x45f7e5(0xb2)](_0x45f7e5(0x9b)+_0xccb8a9+'\x22\x20not\x20found\x20or\x20not\x20accessible');continue;}assertDatasetIsDbTableBacked(_0x33c330,_0x45f7e5(0xa4));const _0x11ba37=Array[_0x45f7e5(0x9e)](_0x33c330[_0x45f7e5(0x92)])?_0x33c330[_0x45f7e5(0x92)]:[],_0xb78961=new Set(_0x11ba37[_0x45f7e5(0x9a)](_0x3eff78=>_0x3eff78[_0x45f7e5(0x8c)]?.['toLowerCase']())),_0x22196a=_0x33c330['dbtableConfig']?.[_0x45f7e5(0xa6)]||_0x33c330[_0x45f7e5(0xa6)]||_0xccb8a9;_0x2f1035[_0x45f7e5(0x9d)+_0x22196a]={'code':_0xccb8a9,'tableName':_0x22196a,'fieldCount':_0xb78961[_0x45f7e5(0xb8)],'fields':Array[_0x45f7e5(0xc0)](_0xb78961)};}_0x4637bd[_0x45f7e5(0xa9)]>0x0&&(_0x2f1035['schemaWarnings']=_0x4637bd);}return{'ok':_0x4d5088['valid'],'data':_0x2f1035,'message':_0x4d5088[_0x45f7e5(0x99)]};}};function a161_0x337e(_0x47dab1,_0x48f823){_0x47dab1=_0x47dab1-0x8c;const _0x23d399=a161_0x23d3();let _0x337ed2=_0x23d399[_0x47dab1];return _0x337ed2;}function a161_0x23d3(){const _0x320fa8=['isDangerous','20BIiADw','flagMissing','tables','utf-8','push','19732476sxadhd','6748746qWaxMy','9816YHdQpL','split','valid','size','type','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','468qahYbw','\x22\x20not\x20found\x20in\x20any\x20dataset','toLowerCase','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','5otfAPZ','from','1869850sSXQVB','parameters','name','appCode','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','read','schemas','Provide\x20--file\x20or\x20--sql','fields','1169EOaIJh','isSelectOnly','reason','Table\x20\x22','cwd','validate','message','map','Dataset\x20\x22','199947fYZWaI','schema:','isArray','sqlType','str','dbtableConfig','file','1882BNGicb','SQL\x20schema\x20validation','validation','tableName','9071190TaRKuB','11srPlIp','length','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','File\x20not\x20found:\x20','sql'];a161_0x23d3=function(){return _0x320fa8;};return a161_0x23d3();}
1
+ const a161_0x56bce1=a161_0x4442;(function(_0x26ad0d,_0x3999f0){const _0xa33b6a=a161_0x4442,_0x342d5e=_0x26ad0d();while(!![]){try{const _0x16cbef=parseInt(_0xa33b6a(0x136))/0x1+-parseInt(_0xa33b6a(0x116))/0x2+-parseInt(_0xa33b6a(0x115))/0x3+-parseInt(_0xa33b6a(0x112))/0x4*(-parseInt(_0xa33b6a(0x12d))/0x5)+parseInt(_0xa33b6a(0x12e))/0x6*(parseInt(_0xa33b6a(0x11b))/0x7)+parseInt(_0xa33b6a(0x11e))/0x8+-parseInt(_0xa33b6a(0x140))/0x9*(-parseInt(_0xa33b6a(0x117))/0xa);if(_0x16cbef===_0x3999f0)break;else _0x342d5e['push'](_0x342d5e['shift']());}catch(_0x33e1ae){_0x342d5e['push'](_0x342d5e['shift']());}}}(a161_0x5330,0x4dd00));function a161_0x4442(_0x1e06bb,_0xd0ff03){_0x1e06bb=_0x1e06bb-0x10f;const _0x53304e=a161_0x5330();let _0x4442b1=_0x53304e[_0x1e06bb];return _0x4442b1;}import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';function a161_0x5330(){const _0x59ccb9=['1224570JxltAm','1244302LDqzNy','61140WrPzez','appCode','Provide\x20--file\x20or\x20--sql','size','1562162WkjUnf','toLowerCase','dbtableConfig','606384AGHPkG','schema:','sql','parameters','tables','isDangerous','isSelectOnly','Table\x20\x22','\x22\x20not\x20found\x20or\x20not\x20accessible','length','schemas','from','isArray','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','sqlType','1457930jOIHIn','6BqYDZE','tableName','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','schemaWarnings','filter','cwd','validation','trim','424127cMcZYJ','utf-8','flagMissing','fields','string','valid','str','map','name','push','63gKdzUd','SQL\x20schema\x20validation','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','message','8RerHBv','Dataset\x20\x22','reason'];a161_0x5330=function(){return _0x59ccb9;};return a161_0x5330();}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':a161_0x56bce1(0x120),'command':'validate','description':a161_0x56bce1(0x110),'risk':'read','flags':[{'name':'file','type':a161_0x56bce1(0x13a),'description':a161_0x56bce1(0x12b)},{'name':a161_0x56bce1(0x120),'type':a161_0x56bce1(0x13a),'description':'Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)'},{'name':a161_0x56bce1(0x128),'type':'string','description':a161_0x56bce1(0x130)}],async 'execute'(_0x4c1dfa){const _0x12a836=a161_0x56bce1,_0x612c4d=_0x4c1dfa[_0x12a836(0x13c)]('file'),_0x47ea13=_0x4c1dfa[_0x12a836(0x13c)](_0x12a836(0x120));if(!_0x612c4d&&!_0x47ea13)throw CliErrors[_0x12a836(0x138)]('file',_0x12a836(0x119));let _0x42c6ce;if(_0x612c4d){const _0x4a6abd=resolve(process[_0x12a836(0x133)](),_0x612c4d);if(!existsSync(_0x4a6abd))throw CliErrors[_0x12a836(0x134)]('File\x20not\x20found:\x20'+_0x4a6abd);_0x42c6ce=readFileSync(_0x4a6abd,_0x12a836(0x137));}else _0x42c6ce=_0x47ea13;const _0x207810=validateSql(_0x42c6ce),_0x3808c8={'valid':_0x207810['valid'],'sqlType':_0x207810[_0x12a836(0x12c)]['type'],'isSelectOnly':_0x207810[_0x12a836(0x12c)][_0x12a836(0x124)],'isDangerous':_0x207810[_0x12a836(0x12c)][_0x12a836(0x123)],'tables':_0x207810[_0x12a836(0x122)],'parameters':_0x207810[_0x12a836(0x121)],'message':_0x207810[_0x12a836(0x111)]};_0x207810['sqlType'][_0x12a836(0x114)]&&(_0x3808c8['reason']=_0x207810['sqlType'][_0x12a836(0x114)]);const _0x28b6f1=_0x4c1dfa[_0x12a836(0x13c)]('schemas');if(_0x28b6f1&&_0x207810[_0x12a836(0x13b)]){const _0x77bbca=_0x28b6f1['split'](',')['map'](_0x249fca=>_0x249fca[_0x12a836(0x135)]())[_0x12a836(0x132)](Boolean),_0x157374=[],_0x13e007=filterDbTableBackedDatasets(await listDatasets(_0x4c1dfa[_0x12a836(0x118)])),_0x1769ca=new Map(_0x13e007[_0x12a836(0x13d)](_0x9464e2=>[_0x9464e2[_0x12a836(0x11d)]?.[_0x12a836(0x12f)]?.['toLowerCase'](),_0x9464e2]));for(const _0x3fb344 of _0x207810['tables']){const _0x1ff828=_0x1769ca['get'](_0x3fb344[_0x12a836(0x11c)]());!_0x1ff828&&_0x157374[_0x12a836(0x13f)](_0x12a836(0x125)+_0x3fb344+'\x22\x20not\x20found\x20in\x20any\x20dataset');}for(const _0x2cf93d of _0x77bbca){let _0x5aa9ab;try{_0x5aa9ab=await getDatasetDetail(_0x2cf93d);}catch{_0x157374['push'](_0x12a836(0x113)+_0x2cf93d+_0x12a836(0x126));continue;}assertDatasetIsDbTableBacked(_0x5aa9ab,_0x12a836(0x10f));const _0x3f2c5b=Array[_0x12a836(0x12a)](_0x5aa9ab[_0x12a836(0x139)])?_0x5aa9ab[_0x12a836(0x139)]:[],_0x52973c=new Set(_0x3f2c5b[_0x12a836(0x13d)](_0x161e44=>_0x161e44[_0x12a836(0x13e)]?.[_0x12a836(0x11c)]())),_0x1012a1=_0x5aa9ab[_0x12a836(0x11d)]?.['tableName']||_0x5aa9ab[_0x12a836(0x12f)]||_0x2cf93d;_0x3808c8[_0x12a836(0x11f)+_0x1012a1]={'code':_0x2cf93d,'tableName':_0x1012a1,'fieldCount':_0x52973c[_0x12a836(0x11a)],'fields':Array[_0x12a836(0x129)](_0x52973c)};}_0x157374[_0x12a836(0x127)]>0x0&&(_0x3808c8[_0x12a836(0x131)]=_0x157374);}return{'ok':_0x207810[_0x12a836(0x13b)],'data':_0x3808c8,'message':_0x207810[_0x12a836(0x111)]};}};
@@ -1 +1 @@
1
- const a162_0x78e0cf=a162_0x45b7;function a162_0x45b7(_0x136b18,_0x3e3c48){_0x136b18=_0x136b18-0xf4;const _0x175667=a162_0x1756();let _0x45b76c=_0x175667[_0x136b18];return _0x45b76c;}(function(_0x2456bc,_0x44c489){const _0xb43cc1=a162_0x45b7,_0x5c5d07=_0x2456bc();while(!![]){try{const _0x28cfcf=parseInt(_0xb43cc1(0xfa))/0x1*(-parseInt(_0xb43cc1(0xf5))/0x2)+parseInt(_0xb43cc1(0x105))/0x3+-parseInt(_0xb43cc1(0xf9))/0x4*(parseInt(_0xb43cc1(0xff))/0x5)+-parseInt(_0xb43cc1(0x102))/0x6*(parseInt(_0xb43cc1(0xfd))/0x7)+-parseInt(_0xb43cc1(0xf6))/0x8*(parseInt(_0xb43cc1(0x103))/0x9)+-parseInt(_0xb43cc1(0xf4))/0xa+parseInt(_0xb43cc1(0xfc))/0xb;if(_0x28cfcf===_0x44c489)break;else _0x5c5d07['push'](_0x5c5d07['shift']());}catch(_0x1fdf45){_0x5c5d07['push'](_0x5c5d07['shift']());}}}(a162_0x1756,0x724e1));function a162_0x1756(){const _0x11234f=['name','Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','6yEjMEJ','1687167TSRanf','add','2252988MEheUS','9090650FktAKe','14MPUAJS','8ADvLdy','write','workspace\x20add','24504dHrjGq','102367UBYAAv','App\x20profile\x20name','27908859COnIpg','3145863GHwmfi','workspace','455aJTFiH'];a162_0x1756=function(){return _0x11234f;};return a162_0x1756();}import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';export const workspaceAddDefinition={'service':a162_0x78e0cf(0xfe),'command':a162_0x78e0cf(0x104),'description':a162_0x78e0cf(0x101),'risk':a162_0x78e0cf(0xf7),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a162_0x78e0cf(0x100),'description':a162_0x78e0cf(0xfb),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0x1255d=>validateAppName(_0x1255d,a162_0x78e0cf(0xf8)),'execute':_0x586c54=>runAppAdd(_0x586c54,a162_0x78e0cf(0xf8))};
1
+ const a162_0x3d611e=a162_0x10a3;(function(_0x2c5b17,_0x5dd729){const _0x25ef97=a162_0x10a3,_0x170416=_0x2c5b17();while(!![]){try{const _0x543d3b=-parseInt(_0x25ef97(0x11d))/0x1*(-parseInt(_0x25ef97(0x11f))/0x2)+-parseInt(_0x25ef97(0x121))/0x3*(-parseInt(_0x25ef97(0x124))/0x4)+parseInt(_0x25ef97(0x118))/0x5+-parseInt(_0x25ef97(0x116))/0x6*(parseInt(_0x25ef97(0x11c))/0x7)+parseInt(_0x25ef97(0x123))/0x8+parseInt(_0x25ef97(0x127))/0x9*(parseInt(_0x25ef97(0x11a))/0xa)+-parseInt(_0x25ef97(0x122))/0xb*(parseInt(_0x25ef97(0x120))/0xc);if(_0x543d3b===_0x5dd729)break;else _0x170416['push'](_0x170416['shift']());}catch(_0x387484){_0x170416['push'](_0x170416['shift']());}}}(a162_0x1224,0xd68f5));import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';function a162_0x10a3(_0x242e46,_0x45e176){_0x242e46=_0x242e46-0x116;const _0x122451=a162_0x1224();let _0x10a317=_0x122451[_0x242e46];return _0x10a317;}export const workspaceAddDefinition={'service':'workspace','command':a162_0x3d611e(0x11b),'description':a162_0x3d611e(0x11e),'risk':a162_0x3d611e(0x119),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a162_0x3d611e(0x125),'description':a162_0x3d611e(0x126),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0x2557c2=>validateAppName(_0x2557c2,a162_0x3d611e(0x117)),'execute':_0x475189=>runAppAdd(_0x475189,'workspace\x20add')};function a162_0x1224(){const _0x2700b2=['44CZgKGG','13392200jHKpsu','19324PJzoyL','name','App\x20profile\x20name','1044XYiwjg','13866fQTjcx','workspace\x20add','6518615GPXPtm','write','81920oxbVnI','add','3458QFSJhO','17yKuapu','Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','149314VoaPck','11704104lZVvJj','450cKfHoE'];a162_0x1224=function(){return _0x2700b2;};return a162_0x1224();}
@@ -1 +1 @@
1
- const a163_0x576ad4=a163_0x428a;(function(_0x5a3c17,_0x4ab4f2){const _0x202dd8=a163_0x428a,_0x3491c6=_0x5a3c17();while(!![]){try{const _0x49c704=parseInt(_0x202dd8(0x172))/0x1+parseInt(_0x202dd8(0x165))/0x2*(parseInt(_0x202dd8(0x158))/0x3)+-parseInt(_0x202dd8(0x15e))/0x4+-parseInt(_0x202dd8(0x16e))/0x5*(-parseInt(_0x202dd8(0x16c))/0x6)+-parseInt(_0x202dd8(0x145))/0x7+parseInt(_0x202dd8(0x155))/0x8*(parseInt(_0x202dd8(0x156))/0x9)+-parseInt(_0x202dd8(0x14a))/0xa;if(_0x49c704===_0x4ab4f2)break;else _0x3491c6['push'](_0x3491c6['shift']());}catch(_0x34cad9){_0x3491c6['push'](_0x3491c6['shift']());}}}(a163_0x5ef7,0x4fa4b));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_0x576ad4(0x15f),SAFE_PROFILE_KEYS=[a163_0x576ad4(0x152),a163_0x576ad4(0x160),a163_0x576ad4(0x153),a163_0x576ad4(0x15a),a163_0x576ad4(0x179),'riskLevel',a163_0x576ad4(0x157)],workspaceFlags=[{'name':a163_0x576ad4(0x168),'type':a163_0x576ad4(0x162),'description':a163_0x576ad4(0x148)},{'name':'appcode','type':a163_0x576ad4(0x162),'description':a163_0x576ad4(0x15b)},{'name':'env','type':a163_0x576ad4(0x162),'description':'Target\x20environment','enum':[...RABETBASE_ENV_VALUES]},{'name':a163_0x576ad4(0x153),'type':a163_0x576ad4(0x162),'description':a163_0x576ad4(0x14b)},{'name':a163_0x576ad4(0x166),'type':a163_0x576ad4(0x162),'description':a163_0x576ad4(0x144),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':'pageSize','type':'number','description':'Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile'},{'name':a163_0x576ad4(0x14c),'type':'string','description':a163_0x576ad4(0x161),'enum':[...RISK_LEVEL_VALUES]},{'name':a163_0x576ad4(0x157),'type':a163_0x576ad4(0x162),'description':a163_0x576ad4(0x147)}];function isRecord(_0x35b7cd){const _0x930749=a163_0x576ad4;return!!_0x35b7cd&&typeof _0x35b7cd==='object'&&!Array[_0x930749(0x150)](_0x35b7cd);}function assertValidAppcode(_0x56cb9f){const _0x3d4655=a163_0x576ad4,{valid:_0x4093d7,message:_0x70ed57}=validateAppcode(_0x56cb9f);if(!_0x4093d7)throw CliErrors['validation'](_0x3d4655(0x174)+_0x56cb9f,_0x70ed57);}function sanitizeProfile(_0x534416){if(!isRecord(_0x534416))return{};const _0x41209e={};for(const _0x3c6e0d of SAFE_PROFILE_KEYS){if(_0x534416[_0x3c6e0d]!==undefined)_0x41209e[_0x3c6e0d]=_0x534416[_0x3c6e0d];}return _0x41209e;}function a163_0x5ef7(){const _0x1e33ed=['429499IgzVvb','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','Invalid\x20appcode:\x20','write','validation','\x20--appcode\x20<code>`.','Missing\x20workspace\x20app\x20selector.','pageSize',').\x20Config:\x20','initialized','Workspace\x20','Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','3585162DyBoiF','keys','Locale\x20for\x20this\x20workspace\x20app\x20profile','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','\x22\x20not\x20found.','523310DxtDOL','API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile','riskLevel','project','workspace','workspace.','isArray','trim','appcode','apiDir','Use\x20`','24ePYYcH','1117179tpJelu','locale','153552ZmZFOL','Switch\x20the\x20current\x20workspace\x20app\x20binding','format','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','flag','str','2421364kHmZnB','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','env','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','string','apps','\x20workspace\x20use\x20--app\x20<name>`.','22zPcnPF','defaultFormat','defaultApp','app','init','.\x20Credentials:\x20not\x20written.','use','1194YHWYbo','updated','3295ShngKs','globalConfig','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','\x20(appcode:\x20'];a163_0x5ef7=function(){return _0x1e33ed;};return a163_0x5ef7();}function cloneProfile(_0x3aa957){return isRecord(_0x3aa957)?{..._0x3aa957}:{};}function a163_0x428a(_0x4276ff,_0x262577){_0x4276ff=_0x4276ff-0x142;const _0x5ef722=a163_0x5ef7();let _0x428a41=_0x5ef722[_0x4276ff];return _0x428a41;}function collectWorkspaceProfileOverrides(_0x14227a){const _0xa31753=a163_0x576ad4,_0x436fb3={},_0xb3f71=_0x14227a[_0xa31753(0x15d)](_0xa31753(0x160)),_0x54c849=_0x14227a[_0xa31753(0x15d)](_0xa31753(0x153)),_0x13c392=_0x14227a[_0xa31753(0x15d)](_0xa31753(0x166)),_0x1d4841=_0x14227a[_0xa31753(0x15c)](_0xa31753(0x179)),_0x2467d6=_0x14227a[_0xa31753(0x15d)]('riskLevel'),_0x351e0b=_0x14227a['str']('locale');if(_0xb3f71)_0x436fb3[_0xa31753(0x160)]=_0xb3f71;if(_0x54c849)_0x436fb3[_0xa31753(0x153)]=_0x54c849;if(_0x13c392)_0x436fb3[_0xa31753(0x15a)]=_0x13c392;if(_0x1d4841!==undefined&&_0x1d4841!=='')_0x436fb3['pageSize']=Number(_0x1d4841);if(_0x2467d6)_0x436fb3[_0xa31753(0x14c)]=_0x2467d6;if(_0x351e0b)_0x436fb3[_0xa31753(0x157)]=_0x351e0b;return _0x436fb3;}async function validateWorkspaceArgs(_0x17f2a3){const _0x5e493b=a163_0x576ad4,_0x570db4=_0x17f2a3[_0x5e493b(0x15d)](_0x5e493b(0x168))[_0x5e493b(0x151)](),_0x1db4f2=_0x17f2a3[_0x5e493b(0x15d)](_0x5e493b(0x152))[_0x5e493b(0x151)]();if(!_0x570db4&&!_0x1db4f2)throw CliErrors[_0x5e493b(0x176)](_0x5e493b(0x178),_0x5e493b(0x154)+CLI_BIN_NAME+_0x5e493b(0x170)+CLI_BIN_NAME+_0x5e493b(0x164));if(_0x1db4f2)assertValidAppcode(_0x1db4f2);}function resolveKnownApps(){const _0x2f5521=a163_0x576ad4,{config:_0x56bf70,layers:_0x52d66a}=readRawConfigWithLayers(),_0xfbb323=isRecord(_0x56bf70[_0x2f5521(0x163)])?_0x56bf70[_0x2f5521(0x163)]:{},_0x3fc369=isRecord(_0x52d66a[_0x2f5521(0x16f)]['apps'])?_0x52d66a[_0x2f5521(0x16f)][_0x2f5521(0x163)]:{};return{..._0x3fc369,..._0xfbb323};}async function configureWorkspace(_0x1f8d0e,_0x3753e1){const _0x2146e0=a163_0x576ad4,_0x4bd885=_0x1f8d0e[_0x2146e0(0x15d)](_0x2146e0(0x168))['trim'](),_0x38b0b6=_0x1f8d0e[_0x2146e0(0x15d)]('appcode')[_0x2146e0(0x151)](),_0x262b01=_0x4bd885||_0x38b0b6;if(!_0x262b01)throw CliErrors[_0x2146e0(0x176)](_0x2146e0(0x178),_0x2146e0(0x154)+CLI_BIN_NAME+_0x2146e0(0x170)+CLI_BIN_NAME+_0x2146e0(0x164));if(_0x38b0b6)assertValidAppcode(_0x38b0b6);const _0xf95568=resolveWriteConfigPath(_0x2146e0(0x14d)),_0x2b90cf=readConfigFile(_0xf95568),_0x36e3c3=resolveKnownApps(),_0x232574=isRecord(_0x2b90cf[_0x2146e0(0x163)])?{..._0x2b90cf['apps']}:{},_0x5c3b4d=cloneProfile(_0x232574[_0x262b01]),_0x3c100=sanitizeProfile(_0x36e3c3[_0x262b01]),_0x71b86d=_0x38b0b6?{}:_0x3c100,_0x89037f=_0x38b0b6||_0x71b86d[_0x2146e0(0x152)];if(!_0x89037f){const _0x307335=Object[_0x2146e0(0x146)](_0x36e3c3),_0x19461d=_0x307335['length']===0x0?_0x2146e0(0x154)+CLI_BIN_NAME+'\x20workspace\x20'+_0x3753e1+'\x20--app\x20'+_0x262b01+_0x2146e0(0x177):_0x2146e0(0x173)+_0x307335['join'](',\x20');throw CliErrors['validation']('App\x20\x22'+_0x262b01+_0x2146e0(0x149),_0x19461d);}assertValidAppcode(String(_0x89037f));const _0x1c4589={..._0x71b86d,..._0x5c3b4d,'appcode':String(_0x89037f),...collectWorkspaceProfileOverrides(_0x1f8d0e)};return _0x232574[_0x262b01]=_0x1c4589,_0x2b90cf[_0x2146e0(0x163)]=_0x232574,_0x2b90cf[_0x2146e0(0x167)]=_0x262b01,delete _0x2b90cf['appcode'],delete _0x2b90cf[_0x2146e0(0x168)],_0x1c4589[_0x2146e0(0x160)]&&(_0x2b90cf[_0x2146e0(0x160)]=_0x1c4589['env']),writeConfigFile(_0xf95568,_0x2b90cf),{'ok':!![],'message':_0x2146e0(0x143)+(_0x3753e1===_0x2146e0(0x169)?_0x2146e0(0x142):_0x2146e0(0x16d))+':\x20'+_0x262b01+_0x2146e0(0x171)+_0x1c4589[_0x2146e0(0x152)]+_0x2146e0(0x17a)+_0xf95568+_0x2146e0(0x16a),'data':{'operation':_0x2146e0(0x14f)+_0x3753e1,'configPath':_0xf95568,'app':_0x262b01,'appcode':_0x1c4589[_0x2146e0(0x152)],'env':_0x1c4589[_0x2146e0(0x160)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':a163_0x576ad4(0x14e),'command':a163_0x576ad4(0x169),'description':'Initialize\x20the\x20current\x20workspace\x20app\x20binding','risk':a163_0x576ad4(0x175),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x1dfdee=>configureWorkspace(_0x1dfdee,a163_0x576ad4(0x169))},workspaceUseDefinition={'service':a163_0x576ad4(0x14e),'command':'use','description':a163_0x576ad4(0x159),'risk':a163_0x576ad4(0x175),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x1040d3=>configureWorkspace(_0x1040d3,a163_0x576ad4(0x16b))};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
1
+ const a163_0x114526=a163_0x5651;(function(_0x228372,_0x2026f1){const _0x193be1=a163_0x5651,_0x8578bc=_0x228372();while(!![]){try{const _0x26dc8c=-parseInt(_0x193be1(0xc1))/0x1*(parseInt(_0x193be1(0x9d))/0x2)+parseInt(_0x193be1(0xb5))/0x3*(-parseInt(_0x193be1(0x99))/0x4)+parseInt(_0x193be1(0x94))/0x5+parseInt(_0x193be1(0xbc))/0x6*(parseInt(_0x193be1(0xab))/0x7)+parseInt(_0x193be1(0xac))/0x8*(parseInt(_0x193be1(0xc0))/0x9)+parseInt(_0x193be1(0xb9))/0xa+parseInt(_0x193be1(0x9e))/0xb;if(_0x26dc8c===_0x2026f1)break;else _0x8578bc['push'](_0x8578bc['shift']());}catch(_0x57cab2){_0x8578bc['push'](_0x8578bc['shift']());}}}(a163_0x2610,0x5be29));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a163_0x5651(_0x320ed1,_0x59b61d){_0x320ed1=_0x320ed1-0x8f;const _0x26100e=a163_0x2610();let _0x565113=_0x26100e[_0x320ed1];return _0x565113;}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';function a163_0x2610(){const _0x5c2ff9=['str','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','444830yLRfAk','join','Workspace\x20','Initialize\x20the\x20current\x20workspace\x20app\x20binding','defaultApp','8sQuKRI','Missing\x20workspace\x20app\x20selector.','riskLevel',').\x20Config:\x20','3362noUqMV','2306007XxjDko','pageSize','object','use','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','length','workspace','trim','\x20workspace\x20','.\x20Credentials:\x20not\x20written.','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','project','defaultFormat','2191swJOlu','720iKsQHn','format','keys','write','\x22\x20not\x20found.','app','locale','\x20--appcode\x20<code>`.','App\x20\x22','979125dpkZrA','apiDir','init','\x20(appcode:\x20','1706630uPxLjO','Switch\x20the\x20current\x20workspace\x20app\x20binding','string','12912SFcIWC','workspace.','Use\x20`','apps','34182PPySEb','271cFMhqK','env','validation','\x20workspace\x20use\x20--app\x20<name>`.','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','globalConfig','appcode'];a163_0x2610=function(){return _0x5c2ff9;};return a163_0x2610();}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+'\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]',SAFE_PROFILE_KEYS=[a163_0x114526(0x91),a163_0x114526(0xc2),a163_0x114526(0xb6),a163_0x114526(0xad),a163_0x114526(0x9f),'riskLevel',a163_0x114526(0xb2)],workspaceFlags=[{'name':a163_0x114526(0xb1),'type':'string','description':a163_0x114526(0xa2)},{'name':a163_0x114526(0x91),'type':'string','description':'App\x20code\x20to\x20bind\x20to\x20this\x20workspace'},{'name':a163_0x114526(0xc2),'type':'string','description':'Target\x20environment','enum':[...RABETBASE_ENV_VALUES]},{'name':'apiDir','type':'string','description':'API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile'},{'name':a163_0x114526(0xaa),'type':a163_0x114526(0xbb),'description':'Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a163_0x114526(0x9f),'type':'number','description':'Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile'},{'name':a163_0x114526(0x9b),'type':a163_0x114526(0xbb),'description':a163_0x114526(0xa8),'enum':[...RISK_LEVEL_VALUES]},{'name':a163_0x114526(0xb2),'type':a163_0x114526(0xbb),'description':'Locale\x20for\x20this\x20workspace\x20app\x20profile'}];function isRecord(_0x20ea6f){const _0x4edb5c=a163_0x114526;return!!_0x20ea6f&&typeof _0x20ea6f===_0x4edb5c(0xa0)&&!Array['isArray'](_0x20ea6f);}function assertValidAppcode(_0x1c4ffb){const _0xdfcb90=a163_0x114526,{valid:_0x4285da,message:_0x4164d5}=validateAppcode(_0x1c4ffb);if(!_0x4285da)throw CliErrors[_0xdfcb90(0xc3)]('Invalid\x20appcode:\x20'+_0x1c4ffb,_0x4164d5);}function sanitizeProfile(_0x17d167){if(!isRecord(_0x17d167))return{};const _0x21569c={};for(const _0xdb2ecd of SAFE_PROFILE_KEYS){if(_0x17d167[_0xdb2ecd]!==undefined)_0x21569c[_0xdb2ecd]=_0x17d167[_0xdb2ecd];}return _0x21569c;}function cloneProfile(_0x102063){return isRecord(_0x102063)?{..._0x102063}:{};}function collectWorkspaceProfileOverrides(_0x231850){const _0xd948e4=a163_0x114526,_0x46e376={},_0x225505=_0x231850[_0xd948e4(0x92)](_0xd948e4(0xc2)),_0x1dc235=_0x231850[_0xd948e4(0x92)](_0xd948e4(0xb6)),_0x1d7ee5=_0x231850[_0xd948e4(0x92)](_0xd948e4(0xaa)),_0x6431cd=_0x231850['flag'](_0xd948e4(0x9f)),_0x2a30e4=_0x231850[_0xd948e4(0x92)](_0xd948e4(0x9b)),_0x4a5601=_0x231850[_0xd948e4(0x92)]('locale');if(_0x225505)_0x46e376['env']=_0x225505;if(_0x1dc235)_0x46e376[_0xd948e4(0xb6)]=_0x1dc235;if(_0x1d7ee5)_0x46e376[_0xd948e4(0xad)]=_0x1d7ee5;if(_0x6431cd!==undefined&&_0x6431cd!=='')_0x46e376[_0xd948e4(0x9f)]=Number(_0x6431cd);if(_0x2a30e4)_0x46e376['riskLevel']=_0x2a30e4;if(_0x4a5601)_0x46e376['locale']=_0x4a5601;return _0x46e376;}async function validateWorkspaceArgs(_0x4a3ace){const _0x5c72e4=a163_0x114526,_0x5689e6=_0x4a3ace[_0x5c72e4(0x92)](_0x5c72e4(0xb1))[_0x5c72e4(0xa5)](),_0x4549cd=_0x4a3ace['str'](_0x5c72e4(0x91))[_0x5c72e4(0xa5)]();if(!_0x5689e6&&!_0x4549cd)throw CliErrors[_0x5c72e4(0xc3)](_0x5c72e4(0x9a),'Use\x20`'+CLI_BIN_NAME+_0x5c72e4(0x93)+CLI_BIN_NAME+_0x5c72e4(0xc4));if(_0x4549cd)assertValidAppcode(_0x4549cd);}function resolveKnownApps(){const _0x323f38=a163_0x114526,{config:_0x49e571,layers:_0x2ca8d2}=readRawConfigWithLayers(),_0x13cf8f=isRecord(_0x49e571[_0x323f38(0xbf)])?_0x49e571[_0x323f38(0xbf)]:{},_0x1f787a=isRecord(_0x2ca8d2[_0x323f38(0x90)][_0x323f38(0xbf)])?_0x2ca8d2[_0x323f38(0x90)][_0x323f38(0xbf)]:{};return{..._0x1f787a,..._0x13cf8f};}async function configureWorkspace(_0xc54c1e,_0x418274){const _0x4baa0d=a163_0x114526,_0x310531=_0xc54c1e[_0x4baa0d(0x92)](_0x4baa0d(0xb1))[_0x4baa0d(0xa5)](),_0x574d17=_0xc54c1e[_0x4baa0d(0x92)](_0x4baa0d(0x91))[_0x4baa0d(0xa5)](),_0x12aec=_0x310531||_0x574d17;if(!_0x12aec)throw CliErrors[_0x4baa0d(0xc3)]('Missing\x20workspace\x20app\x20selector.',_0x4baa0d(0xbe)+CLI_BIN_NAME+_0x4baa0d(0x93)+CLI_BIN_NAME+_0x4baa0d(0xc4));if(_0x574d17)assertValidAppcode(_0x574d17);const _0x3241c8=resolveWriteConfigPath(_0x4baa0d(0xa9)),_0x1a31b0=readConfigFile(_0x3241c8),_0x2b5b58=resolveKnownApps(),_0xdee4ea=isRecord(_0x1a31b0[_0x4baa0d(0xbf)])?{..._0x1a31b0['apps']}:{},_0x3155f4=cloneProfile(_0xdee4ea[_0x12aec]),_0x42553e=sanitizeProfile(_0x2b5b58[_0x12aec]),_0x57de4f=_0x574d17?{}:_0x42553e,_0x2814d8=_0x574d17||_0x57de4f[_0x4baa0d(0x91)];if(!_0x2814d8){const _0x573980=Object[_0x4baa0d(0xae)](_0x2b5b58),_0x2f92b5=_0x573980[_0x4baa0d(0xa3)]===0x0?_0x4baa0d(0xbe)+CLI_BIN_NAME+_0x4baa0d(0xa6)+_0x418274+'\x20--app\x20'+_0x12aec+_0x4baa0d(0xb3):_0x4baa0d(0x8f)+_0x573980[_0x4baa0d(0x95)](',\x20');throw CliErrors[_0x4baa0d(0xc3)](_0x4baa0d(0xb4)+_0x12aec+_0x4baa0d(0xb0),_0x2f92b5);}assertValidAppcode(String(_0x2814d8));const _0x8e3ea5={..._0x57de4f,..._0x3155f4,'appcode':String(_0x2814d8),...collectWorkspaceProfileOverrides(_0xc54c1e)};return _0xdee4ea[_0x12aec]=_0x8e3ea5,_0x1a31b0[_0x4baa0d(0xbf)]=_0xdee4ea,_0x1a31b0[_0x4baa0d(0x98)]=_0x12aec,delete _0x1a31b0[_0x4baa0d(0x91)],delete _0x1a31b0['app'],_0x8e3ea5[_0x4baa0d(0xc2)]&&(_0x1a31b0[_0x4baa0d(0xc2)]=_0x8e3ea5[_0x4baa0d(0xc2)]),writeConfigFile(_0x3241c8,_0x1a31b0),{'ok':!![],'message':_0x4baa0d(0x96)+(_0x418274==='init'?'initialized':'updated')+':\x20'+_0x12aec+_0x4baa0d(0xb8)+_0x8e3ea5[_0x4baa0d(0x91)]+_0x4baa0d(0x9c)+_0x3241c8+_0x4baa0d(0xa7),'data':{'operation':_0x4baa0d(0xbd)+_0x418274,'configPath':_0x3241c8,'app':_0x12aec,'appcode':_0x8e3ea5[_0x4baa0d(0x91)],'env':_0x8e3ea5[_0x4baa0d(0xc2)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':'workspace','command':'init','description':a163_0x114526(0x97),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x50992b=>configureWorkspace(_0x50992b,a163_0x114526(0xb7))},workspaceUseDefinition={'service':a163_0x114526(0xa4),'command':a163_0x114526(0xa1),'description':a163_0x114526(0xba),'risk':a163_0x114526(0xaf),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x2afc54=>configureWorkspace(_0x2afc54,a163_0x114526(0xa1))};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
@@ -1 +1 @@
1
- function a164_0x511a(_0x33b9be,_0x3319bf){_0x33b9be=_0x33b9be-0xd7;const _0x341968=a164_0x3419();let _0x511a85=_0x341968[_0x33b9be];return _0x511a85;}const a164_0x320af0=a164_0x511a;(function(_0x4144d1,_0x2f23fc){const _0x48ac6b=a164_0x511a,_0x5c96c6=_0x4144d1();while(!![]){try{const _0x94d0b3=parseInt(_0x48ac6b(0xe3))/0x1*(-parseInt(_0x48ac6b(0xdc))/0x2)+-parseInt(_0x48ac6b(0xdf))/0x3+parseInt(_0x48ac6b(0xe0))/0x4+-parseInt(_0x48ac6b(0xde))/0x5+-parseInt(_0x48ac6b(0xe1))/0x6+parseInt(_0x48ac6b(0xdb))/0x7+-parseInt(_0x48ac6b(0xe2))/0x8*(-parseInt(_0x48ac6b(0xd7))/0x9);if(_0x94d0b3===_0x2f23fc)break;else _0x5c96c6['push'](_0x5c96c6['shift']());}catch(_0x3d19cf){_0x5c96c6['push'](_0x5c96c6['shift']());}}}(a164_0x3419,0xa66cb));function a164_0x3419(){const _0x175cfd=['3975710NvPsCH','3152355YXtvdA','2707900HrXTTU','2137224SIJKKN','23720768QFQaUN','1REjENQ','name','9xnDMps','Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','workspace\x20remove','remove','3716538pNcUPy','2578398CjLtGE','workspace'];a164_0x3419=function(){return _0x175cfd;};return a164_0x3419();}import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const workspaceRemoveDefinition={'service':a164_0x320af0(0xdd),'command':a164_0x320af0(0xda),'description':a164_0x320af0(0xd8),'risk':'high-risk-write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a164_0x320af0(0xe4),'description':'App\x20profile\x20name\x20to\x20remove','required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x776a4d=>validateAppName(_0x776a4d,a164_0x320af0(0xd9)),'execute':_0x404e0d=>runAppRemove(_0x404e0d,a164_0x320af0(0xd9))};
1
+ const a164_0x5a2d11=a164_0xd968;function a164_0xd968(_0x3c571f,_0x56d38d){_0x3c571f=_0x3c571f-0xf8;const _0x48703e=a164_0x4870();let _0xd968a4=_0x48703e[_0x3c571f];return _0xd968a4;}(function(_0x2321c1,_0x3e6693){const _0x2e1aad=a164_0xd968,_0x45f147=_0x2321c1();while(!![]){try{const _0x155514=parseInt(_0x2e1aad(0xf8))/0x1+-parseInt(_0x2e1aad(0x109))/0x2+-parseInt(_0x2e1aad(0xfd))/0x3*(-parseInt(_0x2e1aad(0x100))/0x4)+parseInt(_0x2e1aad(0xfc))/0x5*(parseInt(_0x2e1aad(0x107))/0x6)+-parseInt(_0x2e1aad(0x105))/0x7*(-parseInt(_0x2e1aad(0x101))/0x8)+-parseInt(_0x2e1aad(0xff))/0x9*(parseInt(_0x2e1aad(0xfb))/0xa)+-parseInt(_0x2e1aad(0x102))/0xb*(parseInt(_0x2e1aad(0x104))/0xc);if(_0x155514===_0x3e6693)break;else _0x45f147['push'](_0x45f147['shift']());}catch(_0x9eff29){_0x45f147['push'](_0x45f147['shift']());}}}(a164_0x4870,0x359ea));import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const workspaceRemoveDefinition={'service':a164_0x5a2d11(0xfe),'command':a164_0x5a2d11(0x106),'description':a164_0x5a2d11(0x103),'risk':a164_0x5a2d11(0xfa),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'name','description':a164_0x5a2d11(0xf9),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x13b125=>validateAppName(_0x13b125,a164_0x5a2d11(0x108)),'execute':_0x1942a0=>runAppRemove(_0x1942a0,a164_0x5a2d11(0x108))};function a164_0x4870(){const _0x22fc55=['Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','13908amktdu','2252642gbFEFP','remove','2290506ufDrxV','workspace\x20remove','564628Xnjvqc','245538xSWBnf','App\x20profile\x20name\x20to\x20remove','high-risk-write','2630ltMdbO','5BxoRjH','9EdIFkc','workspace','8172yizeOn','419144duDGWu','8suGKZR','4961PtCtqO'];a164_0x4870=function(){return _0x22fc55;};return a164_0x4870();}
@@ -1 +1 @@
1
- const a165_0x15935e=a165_0x5aa7;(function(_0x1083c4,_0x18a4bc){const _0x2cc202=a165_0x5aa7,_0x270090=_0x1083c4();while(!![]){try{const _0x56d979=parseInt(_0x2cc202(0x187))/0x1*(parseInt(_0x2cc202(0x172))/0x2)+parseInt(_0x2cc202(0x17b))/0x3+parseInt(_0x2cc202(0x18a))/0x4*(-parseInt(_0x2cc202(0x16c))/0x5)+parseInt(_0x2cc202(0x179))/0x6+parseInt(_0x2cc202(0x176))/0x7+parseInt(_0x2cc202(0x190))/0x8*(-parseInt(_0x2cc202(0x18b))/0x9)+-parseInt(_0x2cc202(0x180))/0xa*(parseInt(_0x2cc202(0x18c))/0xb);if(_0x56d979===_0x18a4bc)break;else _0x270090['push'](_0x270090['shift']());}catch(_0x2a84dc){_0x270090['push'](_0x270090['shift']());}}}(a165_0x269c,0x4b0b5));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=[a165_0x15935e(0x185),a165_0x15935e(0x17a),'locale',a165_0x15935e(0x178),a165_0x15935e(0x17f)];export const TOP_LEVEL_CONFIG_KEYS=new Set([a165_0x15935e(0x16a),'env',a165_0x15935e(0x16e),a165_0x15935e(0x178),a165_0x15935e(0x185),a165_0x15935e(0x17a),'apiDir']);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x14914c){const _0x3906a0=a165_0x15935e;return[..._0x14914c][_0x3906a0(0x182)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x3d7490){const _0x218e4c=a165_0x15935e;return TOP_LEVEL_CONFIG_KEYS[_0x218e4c(0x171)](_0x3d7490);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}function a165_0x5aa7(_0x4b04c1,_0x54abfa){_0x4b04c1=_0x4b04c1-0x16a;const _0x269cd5=a165_0x269c();let _0x5aa793=_0x269cd5[_0x4b04c1];return _0x5aa793;}export function getConfigCommandKeyDescription(){return'Config\x20key\x20('+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':'env','apiDir':'apiDir','cookie':a165_0x15935e(0x185),'accessKey':a165_0x15935e(0x17a),'defaultFormat':a165_0x15935e(0x178),'pageSize':a165_0x15935e(0x16d),'riskLevel':a165_0x15935e(0x17f),'locale':a165_0x15935e(0x16e)};export function getAppProfileFlagDefs(){const _0x5d6797=a165_0x15935e;return[{'name':_0x5d6797(0x183),'type':_0x5d6797(0x17c),'description':'Target\x20environment','enum':[...RABETBASE_ENV_VALUES]},{'name':_0x5d6797(0x188),'type':_0x5d6797(0x17c),'description':_0x5d6797(0x18e)},{'name':'cookie','type':_0x5d6797(0x17c),'description':_0x5d6797(0x16f),'hidden':!![]},{'name':'accessKey','type':_0x5d6797(0x17c),'description':'Access\x20key','hidden':!![]},{'name':'defaultFormat','type':'string','description':'Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0x5d6797(0x16d),'type':_0x5d6797(0x16b),'description':'Default\x20page\x20size'},{'name':_0x5d6797(0x17f),'type':_0x5d6797(0x17c),'description':_0x5d6797(0x18d),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x5d6797(0x16e),'type':'string','description':_0x5d6797(0x181)}];}export function collectAppProfileOverrides(_0x203d2a){const _0x3c225c=a165_0x15935e,_0x93e724={};for(const [_0x54f700,_0xbb5861]of Object[_0x3c225c(0x174)](APP_PROFILE_FLAG_KEY_MAP)){const _0x13435e=_0x203d2a(_0x54f700);if(!_0x13435e)continue;_0x93e724[_0xbb5861]=_0xbb5861==='pageSize'?Number(_0x13435e):_0x13435e;}return _0x93e724;}function a165_0x269c(){const _0x305d03=['inherit','has','75918jtnlGH','trim','entries','zh-CN','2212098XBoajW','toLowerCase','format','1080006hdrMfj','accessKey','1777347nqcDLa','string','en-US','keys','riskLevel','82990vKmNNu','Locale','join','env','apps','cookie','app','11XEYMxz','apiDir','map','8204QcNfMv','158913DcldZQ','561qCgHrU','Risk\x20level','API\x20directory\x20path','defaultApp','224pSfmzS','appcode','number','685pfKbhr','pageSize','locale','Auth\x20cookie'];a165_0x269c=function(){return _0x305d03;};return a165_0x269c();}export function buildAppProfileListFields(_0x3fb317){const _0x46c46e=a165_0x15935e;return{'env':_0x3fb317[_0x46c46e(0x183)]??null,'apiDir':_0x3fb317[_0x46c46e(0x188)]??null,'hasCookie':!!_0x3fb317[_0x46c46e(0x185)],'hasAccessKey':!!_0x3fb317['accessKey'],'format':_0x3fb317['format']??null,'pageSize':_0x3fb317[_0x46c46e(0x16d)]??null,'riskLevel':_0x3fb317[_0x46c46e(0x17f)]??null,'locale':_0x3fb317[_0x46c46e(0x16e)]??null};}export function buildAppDoctorFields(_0x4a5b4a,_0x456b8b){const _0xee1c5e=a165_0x15935e;return{'env':{'value':_0x4a5b4a[_0xee1c5e(0x183)]||_0x456b8b[_0xee1c5e(0x183)],'source':_0x4a5b4a['env']?_0xee1c5e(0x186):_0xee1c5e(0x170)},'apiDir':{'value':_0x4a5b4a[_0xee1c5e(0x188)]||_0x456b8b[_0xee1c5e(0x188)],'source':_0x4a5b4a[_0xee1c5e(0x188)]?_0xee1c5e(0x186):_0xee1c5e(0x170)},'cookie':{'value':_0x4a5b4a[_0xee1c5e(0x185)]||_0x456b8b['cookie'],'source':_0x4a5b4a['cookie']?'app':_0xee1c5e(0x170)},'accessKey':{'value':_0x4a5b4a['accessKey']||_0x456b8b['accessKey'],'source':_0x4a5b4a[_0xee1c5e(0x17a)]?_0xee1c5e(0x186):_0xee1c5e(0x170)}};}export function buildCanonicalAppConfig(_0xd5011f,_0x4423fd){const _0x437941=a165_0x15935e,_0x1d243e=_0xd5011f[_0x437941(0x189)](_0x3aa27e=>String(_0x3aa27e||'')[_0x437941(0x173)]())['filter'](Boolean);if(_0x1d243e['length']===0x0)return{};const _0x197325={};for(const _0x1de1a5 of _0x1d243e){_0x197325[_0x1de1a5]=_0x4423fd?{'appcode':_0x1de1a5,'env':_0x4423fd}:{'appcode':_0x1de1a5};}return{'apps':_0x197325,'defaultApp':_0x1d243e[0x0]};}export function buildCanonicalProjectConfig(_0x165e85,_0x581242){const _0x19f64c=a165_0x15935e,{appCodes:appCodes=[],env:_0x3629b2,metadata:_0x17b770}=_0x581242,_0x223da1={..._0x165e85,..._0x17b770||{}};delete _0x223da1[_0x19f64c(0x16a)],delete _0x223da1[_0x19f64c(0x186)];if(_0x3629b2)_0x223da1[_0x19f64c(0x183)]=_0x3629b2;else!_0x223da1[_0x19f64c(0x183)]&&(_0x223da1[_0x19f64c(0x183)]=DEFAULT_CONFIG_VALUES[_0x19f64c(0x183)]);const _0x459061=buildCanonicalAppConfig(appCodes,_0x223da1[_0x19f64c(0x183)]);return Object[_0x19f64c(0x17e)](_0x459061)['length']>0x0&&(_0x223da1[_0x19f64c(0x184)]=_0x459061['apps'],_0x223da1['defaultApp']=_0x459061[_0x19f64c(0x18f)]),_0x223da1;}const LOCALE_MAP={'zh':'zh-CN','zh-cn':a165_0x15935e(0x175),'zh_cn':'zh-CN','en':'en-US','en-us':a165_0x15935e(0x17d),'en_us':a165_0x15935e(0x17d)};export function normalizeLocale(_0x4eeea9){const _0x41a3e9=a165_0x15935e;if(!_0x4eeea9)return null;return LOCALE_MAP[_0x4eeea9[_0x41a3e9(0x177)]()]??null;}
1
+ const a165_0x27d9bf=a165_0x3f92;(function(_0x394da8,_0x15fc3b){const _0x367b8c=a165_0x3f92,_0x4b4510=_0x394da8();while(!![]){try{const _0x386a03=-parseInt(_0x367b8c(0xa2))/0x1*(-parseInt(_0x367b8c(0x90))/0x2)+parseInt(_0x367b8c(0x97))/0x3*(parseInt(_0x367b8c(0x9d))/0x4)+-parseInt(_0x367b8c(0x85))/0x5+-parseInt(_0x367b8c(0xa1))/0x6*(-parseInt(_0x367b8c(0x83))/0x7)+parseInt(_0x367b8c(0x88))/0x8*(parseInt(_0x367b8c(0x8d))/0x9)+-parseInt(_0x367b8c(0xa4))/0xa+-parseInt(_0x367b8c(0x9f))/0xb*(-parseInt(_0x367b8c(0x95))/0xc);if(_0x386a03===_0x15fc3b)break;else _0x4b4510['push'](_0x4b4510['shift']());}catch(_0xfc51f8){_0x4b4510['push'](_0x4b4510['shift']());}}}(a165_0x5483,0xc4823));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';function a165_0x5483(){const _0x414ce7=['join','3471564tdfOkf','entries','297cnlqkT','app','1488zCokQa','7185zBqEhN','trim','7665850tZiRFb','keys','Default\x20page\x20size','defaultApp','filter','has','number','pageSize','Locale','env','zh-CN','accessKey','riskLevel','10381wzmrht','length','2090905prfCAl','Config\x20key\x20(','cookie','64MXBkpS','locale','appcode','API\x20directory\x20path','Auth\x20cookie','266841GdQpuP','Risk\x20level','Target\x20environment','66vNUMhH','format','defaultFormat','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','en-US','124308totKgy','apps','3LrTVZL','string','inherit','apiDir','toLowerCase'];a165_0x5483=function(){return _0x414ce7;};return a165_0x5483();}export const PROJECT_CREATE_INHERITABLE_KEYS=[a165_0x27d9bf(0x87),a165_0x27d9bf(0xaf),a165_0x27d9bf(0x89),'format',a165_0x27d9bf(0xb0)];export const TOP_LEVEL_CONFIG_KEYS=new Set(['appcode',a165_0x27d9bf(0xad),a165_0x27d9bf(0x89),a165_0x27d9bf(0x91),a165_0x27d9bf(0x87),a165_0x27d9bf(0xaf),a165_0x27d9bf(0x9a)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0xde21bb){const _0x3649dc=a165_0x27d9bf;return[..._0xde21bb][_0x3649dc(0x9c)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x3251a4){const _0xc3a345=a165_0x27d9bf;return TOP_LEVEL_CONFIG_KEYS[_0xc3a345(0xa9)](_0x3251a4);}function a165_0x3f92(_0x56c745,_0x26c8f1){_0x56c745=_0x56c745-0x83;const _0x5483cc=a165_0x5483();let _0x3f9237=_0x5483cc[_0x56c745];return _0x3f9237;}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0xc6207f=a165_0x27d9bf;return _0xc6207f(0x86)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':a165_0x27d9bf(0xad),'apiDir':a165_0x27d9bf(0x9a),'cookie':a165_0x27d9bf(0x87),'accessKey':a165_0x27d9bf(0xaf),'defaultFormat':a165_0x27d9bf(0x91),'pageSize':a165_0x27d9bf(0xab),'riskLevel':a165_0x27d9bf(0xb0),'locale':a165_0x27d9bf(0x89)};export function getAppProfileFlagDefs(){const _0x5ce1f3=a165_0x27d9bf;return[{'name':_0x5ce1f3(0xad),'type':'string','description':_0x5ce1f3(0x8f),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x5ce1f3(0x9a),'type':_0x5ce1f3(0x98),'description':_0x5ce1f3(0x8b)},{'name':_0x5ce1f3(0x87),'type':_0x5ce1f3(0x98),'description':_0x5ce1f3(0x8c),'hidden':!![]},{'name':'accessKey','type':_0x5ce1f3(0x98),'description':'Access\x20key','hidden':!![]},{'name':_0x5ce1f3(0x92),'type':_0x5ce1f3(0x98),'description':_0x5ce1f3(0x93),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0x5ce1f3(0xab),'type':_0x5ce1f3(0xaa),'description':_0x5ce1f3(0xa6)},{'name':_0x5ce1f3(0xb0),'type':_0x5ce1f3(0x98),'description':_0x5ce1f3(0x8e),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x5ce1f3(0x89),'type':_0x5ce1f3(0x98),'description':_0x5ce1f3(0xac)}];}export function collectAppProfileOverrides(_0x50e425){const _0x4684f5=a165_0x27d9bf,_0x13c316={};for(const [_0x415b1d,_0x1cd9e2]of Object[_0x4684f5(0x9e)](APP_PROFILE_FLAG_KEY_MAP)){const _0x4bcdce=_0x50e425(_0x415b1d);if(!_0x4bcdce)continue;_0x13c316[_0x1cd9e2]=_0x1cd9e2===_0x4684f5(0xab)?Number(_0x4bcdce):_0x4bcdce;}return _0x13c316;}export function buildAppProfileListFields(_0x400c01){const _0x111f74=a165_0x27d9bf;return{'env':_0x400c01[_0x111f74(0xad)]??null,'apiDir':_0x400c01[_0x111f74(0x9a)]??null,'hasCookie':!!_0x400c01[_0x111f74(0x87)],'hasAccessKey':!!_0x400c01[_0x111f74(0xaf)],'format':_0x400c01['format']??null,'pageSize':_0x400c01[_0x111f74(0xab)]??null,'riskLevel':_0x400c01[_0x111f74(0xb0)]??null,'locale':_0x400c01[_0x111f74(0x89)]??null};}export function buildAppDoctorFields(_0x4571a5,_0x3e6b78){const _0x526ed4=a165_0x27d9bf;return{'env':{'value':_0x4571a5['env']||_0x3e6b78[_0x526ed4(0xad)],'source':_0x4571a5['env']?_0x526ed4(0xa0):_0x526ed4(0x99)},'apiDir':{'value':_0x4571a5['apiDir']||_0x3e6b78[_0x526ed4(0x9a)],'source':_0x4571a5['apiDir']?_0x526ed4(0xa0):_0x526ed4(0x99)},'cookie':{'value':_0x4571a5[_0x526ed4(0x87)]||_0x3e6b78[_0x526ed4(0x87)],'source':_0x4571a5[_0x526ed4(0x87)]?_0x526ed4(0xa0):_0x526ed4(0x99)},'accessKey':{'value':_0x4571a5[_0x526ed4(0xaf)]||_0x3e6b78[_0x526ed4(0xaf)],'source':_0x4571a5['accessKey']?_0x526ed4(0xa0):_0x526ed4(0x99)}};}export function buildCanonicalAppConfig(_0x1c7a8d,_0x52bb83){const _0x30f871=a165_0x27d9bf,_0x483ce3=_0x1c7a8d['map'](_0x248bd5=>String(_0x248bd5||'')[_0x30f871(0xa3)]())[_0x30f871(0xa8)](Boolean);if(_0x483ce3[_0x30f871(0x84)]===0x0)return{};const _0x5bb022={};for(const _0x511376 of _0x483ce3){_0x5bb022[_0x511376]=_0x52bb83?{'appcode':_0x511376,'env':_0x52bb83}:{'appcode':_0x511376};}return{'apps':_0x5bb022,'defaultApp':_0x483ce3[0x0]};}export function buildCanonicalProjectConfig(_0x5f1568,_0x276f52){const _0x288da0=a165_0x27d9bf,{appCodes:appCodes=[],env:_0x367e72,metadata:_0xce77}=_0x276f52,_0x40957d={..._0x5f1568,..._0xce77||{}};delete _0x40957d[_0x288da0(0x8a)],delete _0x40957d[_0x288da0(0xa0)];if(_0x367e72)_0x40957d[_0x288da0(0xad)]=_0x367e72;else!_0x40957d['env']&&(_0x40957d[_0x288da0(0xad)]=DEFAULT_CONFIG_VALUES[_0x288da0(0xad)]);const _0x269ad0=buildCanonicalAppConfig(appCodes,_0x40957d[_0x288da0(0xad)]);return Object[_0x288da0(0xa5)](_0x269ad0)[_0x288da0(0x84)]>0x0&&(_0x40957d['apps']=_0x269ad0[_0x288da0(0x96)],_0x40957d[_0x288da0(0xa7)]=_0x269ad0[_0x288da0(0xa7)]),_0x40957d;}const LOCALE_MAP={'zh':a165_0x27d9bf(0xae),'zh-cn':a165_0x27d9bf(0xae),'zh_cn':a165_0x27d9bf(0xae),'en':a165_0x27d9bf(0x94),'en-us':a165_0x27d9bf(0x94),'en_us':'en-US'};export function normalizeLocale(_0x4c6462){const _0x25a17e=a165_0x27d9bf;if(!_0x4c6462)return null;return LOCALE_MAP[_0x4c6462[_0x25a17e(0x9b)]()]??null;}
@@ -1 +1 @@
1
- function a166_0x2dd3(_0x3f7111,_0x419456){_0x3f7111=_0x3f7111-0x17d;const _0x5483bf=a166_0x5483();let _0x2dd318=_0x5483bf[_0x3f7111];return _0x2dd318;}const a166_0x37e199=a166_0x2dd3;(function(_0x47d920,_0x2d4e54){const _0x3f321b=a166_0x2dd3,_0x32091b=_0x47d920();while(!![]){try{const _0x24a74e=parseInt(_0x3f321b(0x17d))/0x1*(-parseInt(_0x3f321b(0x17f))/0x2)+-parseInt(_0x3f321b(0x185))/0x3+-parseInt(_0x3f321b(0x183))/0x4+-parseInt(_0x3f321b(0x180))/0x5+parseInt(_0x3f321b(0x184))/0x6+-parseInt(_0x3f321b(0x17e))/0x7+-parseInt(_0x3f321b(0x181))/0x8*(-parseInt(_0x3f321b(0x182))/0x9);if(_0x24a74e===_0x2d4e54)break;else _0x32091b['push'](_0x32091b['shift']());}catch(_0x559e2b){_0x32091b['push'](_0x32091b['shift']());}}}(a166_0x5483,0x19463));function a166_0x5483(){const _0x50ef78=['54eXvgQI','796360aQakid','137244LgxYQN','354684ETqjhE','https://g.lovrabet.com/dist/rabetbase-cli/config/index.json','58cBQyqg','1344504TVQSXm','1924LsdZiU','1034845lQdjaj','1137072nyQgBZ'];a166_0x5483=function(){return _0x50ef78;};return a166_0x5483();}export const CLI_VERSION_POLICY_URL=a166_0x37e199(0x186);
1
+ function a166_0x2a93(){const _0x17ed95=['253192KPhKfy','27IJicgv','873954VypaWo','8CACNcF','1012914qthuEL','706210SyBslp','18ZrrWOP','2112910FnWdwZ','18232280rHAict','112448SCaFss','30zYIYba'];a166_0x2a93=function(){return _0x17ed95;};return a166_0x2a93();}(function(_0x176c4f,_0x1a3b01){const _0x27887a=a166_0x5573,_0x3825f5=_0x176c4f();while(!![]){try{const _0x276e08=parseInt(_0x27887a(0x9b))/0x1+parseInt(_0x27887a(0x94))/0x2+parseInt(_0x27887a(0x9c))/0x3*(-parseInt(_0x27887a(0x9d))/0x4)+parseInt(_0x27887a(0x97))/0x5*(-parseInt(_0x27887a(0x98))/0x6)+parseInt(_0x27887a(0x96))/0x7*(-parseInt(_0x27887a(0x95))/0x8)+-parseInt(_0x27887a(0x9e))/0x9*(parseInt(_0x27887a(0x99))/0xa)+parseInt(_0x27887a(0x9a))/0xb;if(_0x276e08===_0x1a3b01)break;else _0x3825f5['push'](_0x3825f5['shift']());}catch(_0x3c48b2){_0x3825f5['push'](_0x3825f5['shift']());}}}(a166_0x2a93,0x5aba8));function a166_0x5573(_0x5e7040,_0x3dd722){_0x5e7040=_0x5e7040-0x94;const _0x2a9380=a166_0x2a93();let _0x5573fc=_0x2a9380[_0x5e7040];return _0x5573fc;}export const CLI_VERSION_POLICY_URL='https://g.lovrabet.com/dist/rabetbase-cli/config/index.json';
@@ -1 +1 @@
1
- const a167_0x1f05ee=a167_0x58ab;(function(_0x2585a2,_0x39f50e){const _0x2df390=a167_0x58ab,_0x4db205=_0x2585a2();while(!![]){try{const _0x19f0c9=-parseInt(_0x2df390(0xf0))/0x1+parseInt(_0x2df390(0x117))/0x2*(parseInt(_0x2df390(0xe5))/0x3)+parseInt(_0x2df390(0xdb))/0x4*(-parseInt(_0x2df390(0xf3))/0x5)+-parseInt(_0x2df390(0x119))/0x6+parseInt(_0x2df390(0xef))/0x7*(-parseInt(_0x2df390(0x129))/0x8)+-parseInt(_0x2df390(0xf5))/0x9*(-parseInt(_0x2df390(0x106))/0xa)+-parseInt(_0x2df390(0xff))/0xb*(-parseInt(_0x2df390(0x10e))/0xc);if(_0x19f0c9===_0x39f50e)break;else _0x4db205['push'](_0x4db205['shift']());}catch(_0x4636ab){_0x4db205['push'](_0x4db205['shift']());}}}(a167_0x5ad6,0x1ba0c));export const CLI_BIN_NAME='rabetbase';function a167_0x58ab(_0x47b5f7,_0x2dc560){_0x47b5f7=_0x47b5f7-0xce;const _0x5ad68d=a167_0x5ad6();let _0x58abed=_0x5ad68d[_0x47b5f7];return _0x58abed;}export const CLI_DISPLAY_NAME=a167_0x1f05ee(0xf1);export const NPM_PACKAGE_NAME=a167_0x1f05ee(0x12d);export const GLOBAL_FLAGS=[{'name':a167_0x1f05ee(0xe2),'meowKey':a167_0x1f05ee(0xe2),'type':'string','description':a167_0x1f05ee(0xfa),'hint':a167_0x1f05ee(0xf4)},{'name':'app','meowKey':'app','type':'string','description':a167_0x1f05ee(0xd2),'hint':a167_0x1f05ee(0x109)},{'name':a167_0x1f05ee(0x124),'meowKey':a167_0x1f05ee(0x124),'type':a167_0x1f05ee(0x12a),'description':'Environment','hint':a167_0x1f05ee(0x116)},{'name':a167_0x1f05ee(0x12f),'meowKey':a167_0x1f05ee(0x12f),'type':'string','description':a167_0x1f05ee(0x113),'hint':a167_0x1f05ee(0xe3)},{'name':'jq','meowKey':'jq','type':'string','description':'Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','hint':'<expr>'},{'name':a167_0x1f05ee(0xdc),'meowKey':a167_0x1f05ee(0x13c),'type':a167_0x1f05ee(0x127),'description':a167_0x1f05ee(0x11d)},{'name':a167_0x1f05ee(0xfc),'meowKey':a167_0x1f05ee(0xfc),'type':a167_0x1f05ee(0x127),'description':a167_0x1f05ee(0x13d)},{'name':a167_0x1f05ee(0x12b),'meowKey':a167_0x1f05ee(0xdd),'type':a167_0x1f05ee(0x127),'description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':'global','meowKey':'global','type':a167_0x1f05ee(0x127),'description':a167_0x1f05ee(0xfd)},{'name':'project','meowKey':a167_0x1f05ee(0xd4),'type':'boolean','description':'Use\x20project\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a167_0x1f05ee(0x127),'description':a167_0x1f05ee(0xd7),'hidden':!![]},{'name':a167_0x1f05ee(0x122),'meowKey':a167_0x1f05ee(0x122),'type':a167_0x1f05ee(0x127),'description':a167_0x1f05ee(0x105)},{'name':'name','meowKey':a167_0x1f05ee(0x10d),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x10c),'hidden':!![]},{'name':'title','meowKey':a167_0x1f05ee(0xed),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x10b),'hidden':!![]},{'name':a167_0x1f05ee(0xe4),'meowKey':a167_0x1f05ee(0xe4),'type':a167_0x1f05ee(0x127),'description':a167_0x1f05ee(0xee),'hidden':!![]},{'name':a167_0x1f05ee(0xf6),'meowKey':a167_0x1f05ee(0xf6),'type':a167_0x1f05ee(0x127),'description':'Watch\x20mode','hidden':!![]},{'name':'output','meowKey':a167_0x1f05ee(0xe0),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0xf8),'hidden':!![]},{'name':'params','meowKey':'params','type':a167_0x1f05ee(0x12a),'description':'JSON\x20params','hidden':!![]},{'name':'datasetcode','meowKey':a167_0x1f05ee(0x120),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x10a),'hidden':!![]},{'name':'all','meowKey':a167_0x1f05ee(0x12c),'type':a167_0x1f05ee(0x127),'description':a167_0x1f05ee(0x104),'hidden':!![]},{'name':a167_0x1f05ee(0x102),'meowKey':'enableBffSave','type':a167_0x1f05ee(0x127),'description':a167_0x1f05ee(0x13a),'hidden':!![]},{'name':'id','meowKey':'id','type':'string','description':a167_0x1f05ee(0x101),'hidden':!![]},{'name':a167_0x1f05ee(0xdf),'meowKey':a167_0x1f05ee(0xdf),'type':'string','description':a167_0x1f05ee(0xd8),'hidden':!![]},{'name':a167_0x1f05ee(0x111),'meowKey':a167_0x1f05ee(0x111),'type':a167_0x1f05ee(0x12a),'description':'File\x20path','hidden':!![]},{'name':a167_0x1f05ee(0x11c),'meowKey':a167_0x1f05ee(0x11c),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x114),'hidden':!![]},{'name':a167_0x1f05ee(0x134),'meowKey':a167_0x1f05ee(0x135),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x107),'hidden':!![]},{'name':a167_0x1f05ee(0xd9),'meowKey':'sqlname','type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x107),'hidden':!![]},{'name':a167_0x1f05ee(0xeb),'meowKey':a167_0x1f05ee(0x136),'type':a167_0x1f05ee(0x12a),'description':'DB\x20ID','hidden':!![]},{'name':'dbid','meowKey':'dbid','type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x11b),'hidden':!![]},{'name':a167_0x1f05ee(0xe9),'meowKey':a167_0x1f05ee(0xe9),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x12e),'hidden':!![]},{'name':a167_0x1f05ee(0xfb),'meowKey':a167_0x1f05ee(0xd3),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x110),'hidden':!![]},{'name':a167_0x1f05ee(0xd0),'meowKey':a167_0x1f05ee(0xd0),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0xda),'hidden':!![]},{'name':'pagesize','meowKey':a167_0x1f05ee(0xfe),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x132),'hidden':!![]},{'name':a167_0x1f05ee(0xd6),'meowKey':a167_0x1f05ee(0xd6),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x133),'hidden':!![]},{'name':a167_0x1f05ee(0xe6),'meowKey':a167_0x1f05ee(0xe6),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x108),'hidden':!![]},{'name':'sql','meowKey':a167_0x1f05ee(0x139),'type':a167_0x1f05ee(0x12a),'description':'SQL\x20string','hidden':!![]},{'name':a167_0x1f05ee(0x103),'meowKey':'schemas','type':'string','description':'Schemas','hidden':!![]},{'name':'operation','meowKey':a167_0x1f05ee(0x131),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x11f),'hidden':!![]},{'name':a167_0x1f05ee(0xd5),'meowKey':a167_0x1f05ee(0xd5),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x100),'hidden':!![]},{'name':a167_0x1f05ee(0x115),'meowKey':a167_0x1f05ee(0x11a),'type':a167_0x1f05ee(0x127),'description':a167_0x1f05ee(0xd1),'hidden':!![]},{'name':a167_0x1f05ee(0x126),'meowKey':a167_0x1f05ee(0x126),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0xf2),'hidden':!![]},{'name':a167_0x1f05ee(0x121),'meowKey':a167_0x1f05ee(0x121),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x118),'hidden':!![]},{'name':a167_0x1f05ee(0x11e),'meowKey':a167_0x1f05ee(0x11e),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0xe1),'hidden':!![]},{'name':'stdin','meowKey':'stdin','type':'boolean','description':a167_0x1f05ee(0x128),'hidden':!![]},{'name':'from-env','meowKey':a167_0x1f05ee(0x137),'type':'string','description':a167_0x1f05ee(0x10f),'hidden':!![]},{'name':a167_0x1f05ee(0x138),'meowKey':a167_0x1f05ee(0x138),'type':'boolean','description':a167_0x1f05ee(0x125),'hidden':!![]},{'name':a167_0x1f05ee(0xe7),'meowKey':a167_0x1f05ee(0xe7),'type':'boolean','description':a167_0x1f05ee(0xec),'hidden':!![]},{'name':a167_0x1f05ee(0xcf),'meowKey':a167_0x1f05ee(0xcf),'type':a167_0x1f05ee(0x127),'description':a167_0x1f05ee(0xf7),'hidden':!![]},{'name':'remote','meowKey':a167_0x1f05ee(0xde),'type':a167_0x1f05ee(0x127),'description':'Use\x20remote','hidden':!![]},{'name':'verbose','meowKey':a167_0x1f05ee(0xea),'type':a167_0x1f05ee(0x127),'description':'Verbose\x20output','hidden':!![]},{'name':'expected-count','meowKey':a167_0x1f05ee(0xf9),'type':a167_0x1f05ee(0x12a),'description':'Expected\x20affected\x20count','hidden':!![]},{'name':'operation-type','meowKey':a167_0x1f05ee(0x130),'type':a167_0x1f05ee(0x12a),'description':'Operation\x20type','hidden':!![]},{'name':'function-node','meowKey':a167_0x1f05ee(0x112),'type':a167_0x1f05ee(0x12a),'description':a167_0x1f05ee(0x13b),'hidden':!![]}];function a167_0x5ad6(){const _0x41a22f=['clear','543ffDRWM','code','force','meowKey','description','verbose','db-id','Force\x20overwrite','title','Clear','318073mlKBnK','41270ZjrDyG','Rabetbase\x20CLI','Config\x20key','12680vcxuOv','<code>','8163QGWmMz','watch','Confirm\x20destructive\x20action','Output\x20path','expectedCount','Override\x20appcode','description-file','yes','Use\x20global\x20config\x20scope','pagesize','11pZXBOp','Target\x20path','Record\x20ID','enable-bff-save','schemas','Apply\x20to\x20all','Show\x20help','310CZccxG','SQL\x20name','Code\x20filter','<name>','Dataset\x20code','Title','Name','name','2054772zSHmxI','Read\x20value\x20from\x20environment\x20variable','Description\x20file','file','functionNode','Output\x20format','SQL\x20code','skip-imports','production\x20|\x20daily','1202yUsNoc','Config\x20value','482160nPshXt','skipImports','DB\x20ID','sqlcode','Preview\x20operation\x20without\x20executing','tags','Operation\x20type','datasetcode','value','help','fromEntries','env','Reveal\x20sensitive\x20value','key','boolean','Read\x20value\x20from\x20stdin','8gfgphP','string','non-interactive','all','@lovrabet/rabetbase-cli','Description','format','operationType','operation','Page\x20size','Keyword\x20filter','sql-name','sqlName','dbId','fromEnv','reveal','sql','Enable\x20BFF\x20save','Function\x20node','dryRun','Skip\x20confirmation\x20for\x20high-risk\x20writes','app','confirm','page','Skip\x20import\x20generation','Select\x20app\x20profile\x20by\x20name','descriptionFile','project','target','keyword','Alias\x20for\x20--non-interactive','Type\x20filter','sqlname','Page\x20number','44lqohLE','dry-run','nonInteractive','remote','type','output','Tags','appcode','json\x20|\x20pretty\x20|\x20compress'];a167_0x5ad6=function(){return _0x41a22f;};return a167_0x5ad6();}export const PIPELINE_FLAG_NAMES=new Set(['appcode',a167_0x1f05ee(0xce),a167_0x1f05ee(0x124),a167_0x1f05ee(0x12f),'jq',a167_0x1f05ee(0xdc),a167_0x1f05ee(0xfc),a167_0x1f05ee(0x12b),'ci']);export function buildMeowFlags(){const _0x12ad6e=a167_0x1f05ee;return Object[_0x12ad6e(0x123)](GLOBAL_FLAGS['map'](_0x267b40=>[_0x267b40[_0x12ad6e(0xe8)],{'type':_0x267b40['type']}]));}
1
+ function a167_0x680f(){const _0x1a2346=['Name','code','expected-count','yes','Force\x20overwrite','format','Apply\x20to\x20all','rabetbase','<code>','SQL\x20string','dbid','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','Override\x20appcode','Page\x20number','operationType','Clear','118vmgqdN','title','help','32759860niNFHV','Read\x20value\x20from\x20environment\x20variable','description-file','18295LPKGcF','Confirm\x20destructive\x20action','Keyword\x20filter','project','keyword','functionNode','env','stdin','string','value','clear','Function\x20node','Code\x20filter','DB\x20ID','Watch\x20mode','datasetcode','Dataset\x20code','Output\x20format','description','Page\x20size','dry-run','SQL\x20code','verbose','Rabetbase\x20CLI','242505pSqyxv','target','global','Config\x20key','6CvduDm','Record\x20ID','fromEntries','confirm','enable-bff-save','Use\x20remote','Target\x20path','file','Environment','type','Skip\x20import\x20generation','Enable\x20BFF\x20save','operation-type','4987283zbTjNP','Config\x20value','output','sqlcode','operation','json\x20|\x20pretty\x20|\x20compress','remote','page','<name>','reveal','Title','8eOZypV','sql','non-interactive','2138115RXNpLr','Select\x20app\x20profile\x20by\x20name','appcode','function-node','2893940dPLNDZ','skip-imports','expectedCount','Alias\x20for\x20--non-interactive','sqlName','File\x20path','key','boolean','Type\x20filter','schemas','meowKey','Operation\x20type','pagesize','Tags','params','Verbose\x20output','dbId','skipImports','force','Reveal\x20sensitive\x20value','SQL\x20name','sql-name','sqlname','all','descriptionFile','name','watch','Force\x20non-interactive\x20mode\x20(CI)','Preview\x20operation\x20without\x20executing','11836521WvTklN','Use\x20project\x20config\x20scope','tags','fromEnv','app','@lovrabet/rabetbase-cli'];a167_0x680f=function(){return _0x1a2346;};return a167_0x680f();}const a167_0x1f567d=a167_0x1064;function a167_0x1064(_0x1c42a9,_0x534aa6){_0x1c42a9=_0x1c42a9-0x71;const _0x680f73=a167_0x680f();let _0x1064a4=_0x680f73[_0x1c42a9];return _0x1064a4;}(function(_0x16b4e8,_0x5ceafa){const _0x115690=a167_0x1064,_0x57d53d=_0x16b4e8();while(!![]){try{const _0x4af244=parseInt(_0x115690(0xae))/0x1*(parseInt(_0x115690(0xa8))/0x2)+-parseInt(_0x115690(0xc6))/0x3+parseInt(_0x115690(0x75))/0x4+parseInt(_0x115690(0x71))/0x5+-parseInt(_0x115690(0xca))/0x6*(-parseInt(_0x115690(0xd7))/0x7)+parseInt(_0x115690(0xe2))/0x8*(parseInt(_0x115690(0x92))/0x9)+-parseInt(_0x115690(0xab))/0xa;if(_0x4af244===_0x5ceafa)break;else _0x57d53d['push'](_0x57d53d['shift']());}catch(_0x241405){_0x57d53d['push'](_0x57d53d['shift']());}}}(a167_0x680f,0xdc0d2));export const CLI_BIN_NAME=a167_0x1f567d(0x9f);export const CLI_DISPLAY_NAME=a167_0x1f567d(0xc5);export const NPM_PACKAGE_NAME=a167_0x1f567d(0x97);export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':a167_0x1f567d(0x73),'type':a167_0x1f567d(0xb6),'description':a167_0x1f567d(0xa4),'hint':a167_0x1f567d(0xa0)},{'name':a167_0x1f567d(0x96),'meowKey':a167_0x1f567d(0x96),'type':a167_0x1f567d(0xb6),'description':a167_0x1f567d(0x72),'hint':a167_0x1f567d(0xdf)},{'name':'env','meowKey':'env','type':'string','description':a167_0x1f567d(0xd2),'hint':'production\x20|\x20daily'},{'name':a167_0x1f567d(0x9d),'meowKey':a167_0x1f567d(0x9d),'type':a167_0x1f567d(0xb6),'description':a167_0x1f567d(0xbf),'hint':a167_0x1f567d(0xdc)},{'name':'jq','meowKey':'jq','type':a167_0x1f567d(0xb6),'description':a167_0x1f567d(0xa3),'hint':'<expr>'},{'name':a167_0x1f567d(0xc2),'meowKey':'dryRun','type':a167_0x1f567d(0x7c),'description':a167_0x1f567d(0x91)},{'name':a167_0x1f567d(0x9b),'meowKey':a167_0x1f567d(0x9b),'type':'boolean','description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':'non-interactive','meowKey':'nonInteractive','type':a167_0x1f567d(0x7c),'description':a167_0x1f567d(0x90)},{'name':'global','meowKey':a167_0x1f567d(0xc8),'type':'boolean','description':'Use\x20global\x20config\x20scope'},{'name':'project','meowKey':a167_0x1f567d(0xb1),'type':a167_0x1f567d(0x7c),'description':a167_0x1f567d(0x93)},{'name':'ci','meowKey':'ci','type':a167_0x1f567d(0x7c),'description':a167_0x1f567d(0x78),'hidden':!![]},{'name':a167_0x1f567d(0xaa),'meowKey':'help','type':a167_0x1f567d(0x7c),'description':'Show\x20help'},{'name':a167_0x1f567d(0x8e),'meowKey':a167_0x1f567d(0x8e),'type':'string','description':a167_0x1f567d(0x98),'hidden':!![]},{'name':'title','meowKey':a167_0x1f567d(0xa9),'type':'string','description':a167_0x1f567d(0xe1),'hidden':!![]},{'name':'clear','meowKey':a167_0x1f567d(0xb8),'type':a167_0x1f567d(0x7c),'description':a167_0x1f567d(0xa7),'hidden':!![]},{'name':a167_0x1f567d(0x8f),'meowKey':a167_0x1f567d(0x8f),'type':'boolean','description':a167_0x1f567d(0xbc),'hidden':!![]},{'name':'output','meowKey':a167_0x1f567d(0xd9),'type':'string','description':'Output\x20path','hidden':!![]},{'name':a167_0x1f567d(0x83),'meowKey':'params','type':a167_0x1f567d(0xb6),'description':'JSON\x20params','hidden':!![]},{'name':a167_0x1f567d(0xbd),'meowKey':'datasetcode','type':a167_0x1f567d(0xb6),'description':a167_0x1f567d(0xbe),'hidden':!![]},{'name':a167_0x1f567d(0x8c),'meowKey':a167_0x1f567d(0x8c),'type':a167_0x1f567d(0x7c),'description':a167_0x1f567d(0x9e),'hidden':!![]},{'name':a167_0x1f567d(0xce),'meowKey':'enableBffSave','type':a167_0x1f567d(0x7c),'description':a167_0x1f567d(0xd5),'hidden':!![]},{'name':'id','meowKey':'id','type':a167_0x1f567d(0xb6),'description':a167_0x1f567d(0xcb),'hidden':!![]},{'name':a167_0x1f567d(0xd3),'meowKey':'type','type':a167_0x1f567d(0xb6),'description':a167_0x1f567d(0x7d),'hidden':!![]},{'name':a167_0x1f567d(0xd1),'meowKey':a167_0x1f567d(0xd1),'type':'string','description':a167_0x1f567d(0x7a),'hidden':!![]},{'name':a167_0x1f567d(0xda),'meowKey':a167_0x1f567d(0xda),'type':a167_0x1f567d(0xb6),'description':a167_0x1f567d(0xc3),'hidden':!![]},{'name':a167_0x1f567d(0x8a),'meowKey':a167_0x1f567d(0x79),'type':a167_0x1f567d(0xb6),'description':'SQL\x20name','hidden':!![]},{'name':a167_0x1f567d(0x8b),'meowKey':a167_0x1f567d(0x8b),'type':'string','description':a167_0x1f567d(0x89),'hidden':!![]},{'name':'db-id','meowKey':a167_0x1f567d(0x85),'type':a167_0x1f567d(0xb6),'description':'DB\x20ID','hidden':!![]},{'name':'dbid','meowKey':a167_0x1f567d(0xa2),'type':'string','description':a167_0x1f567d(0xbb),'hidden':!![]},{'name':a167_0x1f567d(0xc0),'meowKey':a167_0x1f567d(0xc0),'type':a167_0x1f567d(0xb6),'description':'Description','hidden':!![]},{'name':a167_0x1f567d(0xad),'meowKey':a167_0x1f567d(0x8d),'type':'string','description':'Description\x20file','hidden':!![]},{'name':a167_0x1f567d(0xde),'meowKey':a167_0x1f567d(0xde),'type':'string','description':a167_0x1f567d(0xa5),'hidden':!![]},{'name':a167_0x1f567d(0x81),'meowKey':a167_0x1f567d(0x81),'type':a167_0x1f567d(0xb6),'description':a167_0x1f567d(0xc1),'hidden':!![]},{'name':a167_0x1f567d(0xb2),'meowKey':'keyword','type':a167_0x1f567d(0xb6),'description':a167_0x1f567d(0xb0),'hidden':!![]},{'name':a167_0x1f567d(0x99),'meowKey':a167_0x1f567d(0x99),'type':a167_0x1f567d(0xb6),'description':a167_0x1f567d(0xba),'hidden':!![]},{'name':'sql','meowKey':a167_0x1f567d(0xe3),'type':'string','description':a167_0x1f567d(0xa1),'hidden':!![]},{'name':a167_0x1f567d(0x7e),'meowKey':a167_0x1f567d(0x7e),'type':a167_0x1f567d(0xb6),'description':'Schemas','hidden':!![]},{'name':'operation','meowKey':a167_0x1f567d(0xdb),'type':a167_0x1f567d(0xb6),'description':a167_0x1f567d(0x80),'hidden':!![]},{'name':a167_0x1f567d(0xc7),'meowKey':a167_0x1f567d(0xc7),'type':a167_0x1f567d(0xb6),'description':a167_0x1f567d(0xd0),'hidden':!![]},{'name':a167_0x1f567d(0x76),'meowKey':a167_0x1f567d(0x86),'type':a167_0x1f567d(0x7c),'description':a167_0x1f567d(0xd4),'hidden':!![]},{'name':a167_0x1f567d(0x7b),'meowKey':a167_0x1f567d(0x7b),'type':a167_0x1f567d(0xb6),'description':a167_0x1f567d(0xc9),'hidden':!![]},{'name':'value','meowKey':a167_0x1f567d(0xb7),'type':a167_0x1f567d(0xb6),'description':a167_0x1f567d(0xd8),'hidden':!![]},{'name':a167_0x1f567d(0x94),'meowKey':a167_0x1f567d(0x94),'type':a167_0x1f567d(0xb6),'description':a167_0x1f567d(0x82),'hidden':!![]},{'name':a167_0x1f567d(0xb5),'meowKey':'stdin','type':a167_0x1f567d(0x7c),'description':'Read\x20value\x20from\x20stdin','hidden':!![]},{'name':'from-env','meowKey':a167_0x1f567d(0x95),'type':a167_0x1f567d(0xb6),'description':a167_0x1f567d(0xac),'hidden':!![]},{'name':a167_0x1f567d(0xe0),'meowKey':a167_0x1f567d(0xe0),'type':a167_0x1f567d(0x7c),'description':a167_0x1f567d(0x88),'hidden':!![]},{'name':a167_0x1f567d(0x87),'meowKey':'force','type':'boolean','description':a167_0x1f567d(0x9c),'hidden':!![]},{'name':a167_0x1f567d(0xcd),'meowKey':a167_0x1f567d(0xcd),'type':a167_0x1f567d(0x7c),'description':a167_0x1f567d(0xaf),'hidden':!![]},{'name':a167_0x1f567d(0xdd),'meowKey':a167_0x1f567d(0xdd),'type':'boolean','description':a167_0x1f567d(0xcf),'hidden':!![]},{'name':'verbose','meowKey':a167_0x1f567d(0xc4),'type':a167_0x1f567d(0x7c),'description':a167_0x1f567d(0x84),'hidden':!![]},{'name':a167_0x1f567d(0x9a),'meowKey':a167_0x1f567d(0x77),'type':a167_0x1f567d(0xb6),'description':'Expected\x20affected\x20count','hidden':!![]},{'name':a167_0x1f567d(0xd6),'meowKey':a167_0x1f567d(0xa6),'type':a167_0x1f567d(0xb6),'description':a167_0x1f567d(0x80),'hidden':!![]},{'name':a167_0x1f567d(0x74),'meowKey':a167_0x1f567d(0xb3),'type':'string','description':a167_0x1f567d(0xb9),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a167_0x1f567d(0x73),a167_0x1f567d(0x96),a167_0x1f567d(0xb4),a167_0x1f567d(0x9d),'jq','dry-run','yes',a167_0x1f567d(0xe4),'ci']);export function buildMeowFlags(){const _0x44c419=a167_0x1f567d;return Object[_0x44c419(0xcc)](GLOBAL_FLAGS['map'](_0x36977b=>[_0x36977b[_0x44c419(0x7f)],{'type':_0x36977b[_0x44c419(0xd3)]}]));}
@@ -1 +1 @@
1
- const a168_0x2512e8=a168_0x3ed5;(function(_0x1f47fa,_0x520e31){const _0x234e8e=a168_0x3ed5,_0x397883=_0x1f47fa();while(!![]){try{const _0x4c9cb7=parseInt(_0x234e8e(0x64))/0x1+parseInt(_0x234e8e(0x70))/0x2+-parseInt(_0x234e8e(0x67))/0x3*(-parseInt(_0x234e8e(0x69))/0x4)+-parseInt(_0x234e8e(0x66))/0x5+-parseInt(_0x234e8e(0x68))/0x6+-parseInt(_0x234e8e(0x6d))/0x7*(-parseInt(_0x234e8e(0x6e))/0x8)+-parseInt(_0x234e8e(0x6a))/0x9;if(_0x4c9cb7===_0x520e31)break;else _0x397883['push'](_0x397883['shift']());}catch(_0x3d0307){_0x397883['push'](_0x397883['shift']());}}}(a168_0x123d,0xe849c));function a168_0x3ed5(_0x4f0308,_0x41f3c1){_0x4f0308=_0x4f0308-0x64;const _0x123d22=a168_0x123d();let _0x3ed569=_0x123d22[_0x4f0308];return _0x3ed569;}import{DEFAULT_API_DIR}from'../constant/paths.js';function a168_0x123d(){const _0x4536df=['4634810crtluQ','106068iFyjcf','2064780GbukDI','8ldBjHI','28647153Wuvmes','high-risk-write','compress','14zspxXg','7096872zmyjjo','en-US','3734126MJguiZ','1693568mDYVxs','production'];a168_0x123d=function(){return _0x4536df;};return a168_0x123d();}export const DEFAULT_CONFIG_VALUES={'env':a168_0x2512e8(0x65),'format':a168_0x2512e8(0x6c),'locale':a168_0x2512e8(0x6f),'riskLevel':a168_0x2512e8(0x6b),'apiDir':DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';
1
+ function a168_0x49d6(){const _0x4d944e=['en-US','9OjBFGj','production','502049JgEMok','high-risk-write','23090naIomy','1652644IiONan','7NsyFfX','14pnmyoJ','3817310rUWLBp','25037397wdJRQs','2604592nIiMXp','714ExHQgN','170301MQyOch'];a168_0x49d6=function(){return _0x4d944e;};return a168_0x49d6();}function a168_0x1c28(_0x478475,_0x2313fb){_0x478475=_0x478475-0x147;const _0x49d656=a168_0x49d6();let _0x1c28c4=_0x49d656[_0x478475];return _0x1c28c4;}const a168_0x2a2dc9=a168_0x1c28;(function(_0x13159e,_0xdd0fd1){const _0xc151e6=a168_0x1c28,_0x2697d8=_0x13159e();while(!![]){try{const _0x44f7e6=parseInt(_0xc151e6(0x14f))/0x1+parseInt(_0xc151e6(0x154))/0x2*(parseInt(_0xc151e6(0x14b))/0x3)+parseInt(_0xc151e6(0x152))/0x4+parseInt(_0xc151e6(0x151))/0x5*(parseInt(_0xc151e6(0x14a))/0x6)+-parseInt(_0xc151e6(0x153))/0x7*(-parseInt(_0xc151e6(0x149))/0x8)+parseInt(_0xc151e6(0x14d))/0x9*(parseInt(_0xc151e6(0x147))/0xa)+-parseInt(_0xc151e6(0x148))/0xb;if(_0x44f7e6===_0xdd0fd1)break;else _0x2697d8['push'](_0x2697d8['shift']());}catch(_0x4aa820){_0x2697d8['push'](_0x2697d8['shift']());}}}(a168_0x49d6,0x479b3));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a168_0x2a2dc9(0x14e),'format':'compress','locale':a168_0x2a2dc9(0x14c),'riskLevel':a168_0x2a2dc9(0x150),'apiDir':DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';
@@ -1 +1 @@
1
- const a169_0x23c927=a169_0x5ae3;(function(_0x76e624,_0x1760f1){const _0x3c08a8=a169_0x5ae3,_0x29d7b2=_0x76e624();while(!![]){try{const _0x237471=parseInt(_0x3c08a8(0xeb))/0x1*(parseInt(_0x3c08a8(0xfa))/0x2)+parseInt(_0x3c08a8(0xfd))/0x3*(parseInt(_0x3c08a8(0xfb))/0x4)+-parseInt(_0x3c08a8(0xf8))/0x5*(parseInt(_0x3c08a8(0xec))/0x6)+-parseInt(_0x3c08a8(0xfe))/0x7+-parseInt(_0x3c08a8(0xf4))/0x8+parseInt(_0x3c08a8(0xf1))/0x9+parseInt(_0x3c08a8(0xed))/0xa;if(_0x237471===_0x1760f1)break;else _0x29d7b2['push'](_0x29d7b2['shift']());}catch(_0x439345){_0x29d7b2['push'](_0x29d7b2['shift']());}}}(a169_0x117c,0x28c7c));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;function a169_0x5ae3(_0x14518f,_0x118709){_0x14518f=_0x14518f-0xeb;const _0x117c0f=a169_0x117c();let _0x5ae385=_0x117c0f[_0x14518f];return _0x5ae385;}export function initDomains(_0x2d7e7a){const _0x49b06b=a169_0x5ae3;customApiDomain=_0x2d7e7a?.['apiDomain'],customUserDomain=_0x2d7e7a?.[_0x49b06b(0xf9)],customRuntimeDomain=_0x2d7e7a?.[_0x49b06b(0xf2)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a169_0x23c927(0xfc):a169_0x23c927(0xf5));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?'https://api.lovrabet.com':a169_0x23c927(0xf3));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a169_0x23c927(0xf6):'https://daily-runtime.lovrabet.com');export const getAppDomain=()=>isProduction(getEnv())?a169_0x23c927(0xef):a169_0x23c927(0xf0);export const getAppBaseUrl=_0x7cc447=>{const _0x279400=a169_0x23c927,_0x4c8f04=encodeURIComponent(_0x7cc447[_0x279400(0xf7)]());return isProduction(getEnv())?getAppDomain()+_0x279400(0xee)+_0x4c8f04:getAppDomain()+'/web-app/app/'+_0x4c8f04;};function a169_0x117c(){const _0x976c31=['https://app.lovrabet.com','https://daily.lovrabet.com','1145124dNVuxf','runtimeDomain','https://daily-api.lovrabet.com','2422672cCtxjO','https://user-daily.lovrabet.com','https://runtime.lovrabet.com','trim','5pzayTX','userDomain','6820rhWRym','4nxfsdw','https://user.lovrabet.com','662469XRfnLY','678748KvzwvJ','67SxcobN','507090pZAjDJ','748200tjoRky','/app/'];a169_0x117c=function(){return _0x976c31;};return a169_0x117c();}
1
+ const a169_0x3b3346=a169_0x2c7c;(function(_0x13c7ef,_0x476e22){const _0x4a88cf=a169_0x2c7c,_0x45d87a=_0x13c7ef();while(!![]){try{const _0x5e9a66=parseInt(_0x4a88cf(0x108))/0x1*(-parseInt(_0x4a88cf(0x110))/0x2)+parseInt(_0x4a88cf(0x114))/0x3+-parseInt(_0x4a88cf(0x10b))/0x4+parseInt(_0x4a88cf(0x10f))/0x5*(-parseInt(_0x4a88cf(0x102))/0x6)+-parseInt(_0x4a88cf(0x109))/0x7+-parseInt(_0x4a88cf(0x10a))/0x8+parseInt(_0x4a88cf(0x104))/0x9;if(_0x5e9a66===_0x476e22)break;else _0x45d87a['push'](_0x45d87a['shift']());}catch(_0x4b1af1){_0x45d87a['push'](_0x45d87a['shift']());}}}(a169_0x4b65,0xcfc2e));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x5c1a4d){const _0x47900e=a169_0x2c7c;customApiDomain=_0x5c1a4d?.[_0x47900e(0x107)],customUserDomain=_0x5c1a4d?.[_0x47900e(0x10c)],customRuntimeDomain=_0x5c1a4d?.['runtimeDomain'];}function a169_0x4b65(){const _0x2301bd=['https://user.lovrabet.com','https://daily-runtime.lovrabet.com','apiDomain','4285JlOOip','5303977hSsLBZ','1651192BiSvrm','6659604UAQOCa','userDomain','https://api.lovrabet.com','https://user-daily.lovrabet.com','5DKIhjJ','296HGJmkg','https://runtime.lovrabet.com','https://daily.lovrabet.com','/web-app/app/','42030EMPlCI','1959906TmPGXs','trim','39841398DIshJS'];a169_0x4b65=function(){return _0x2301bd;};return a169_0x4b65();}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a169_0x3b3346(0x105):a169_0x3b3346(0x10e));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a169_0x3b3346(0x10d):'https://daily-api.lovrabet.com');export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a169_0x3b3346(0x111):a169_0x3b3346(0x106));export const getAppDomain=()=>isProduction(getEnv())?'https://app.lovrabet.com':a169_0x3b3346(0x112);function a169_0x2c7c(_0x2ed253,_0x39c1a5){_0x2ed253=_0x2ed253-0x102;const _0x4b6594=a169_0x4b65();let _0x2c7c5b=_0x4b6594[_0x2ed253];return _0x2c7c5b;}export const getAppBaseUrl=_0x41c332=>{const _0x321bdd=a169_0x3b3346,_0x4e3153=encodeURIComponent(_0x41c332[_0x321bdd(0x103)]());return isProduction(getEnv())?getAppDomain()+'/app/'+_0x4e3153:getAppDomain()+_0x321bdd(0x113)+_0x4e3153;};
@@ -1 +1 @@
1
- function a170_0x2036(){const _0x107476=['daily','9453186DXmyfs','354011rLCrPX','20BHRBTU','online','1059090LaylTT','342184AZxFFJ','development','14VcQURF','dev','1027800iEYOnH','392752wZkPGl','production','315200NNIUkh'];a170_0x2036=function(){return _0x107476;};return a170_0x2036();}const a170_0x30097c=a170_0x423f;function a170_0x423f(_0x21819b,_0x1be59a){_0x21819b=_0x21819b-0xf0;const _0x203602=a170_0x2036();let _0x423fe2=_0x203602[_0x21819b];return _0x423fe2;}(function(_0x25b4a9,_0x2815d4){const _0x2b6899=a170_0x423f,_0x25422c=_0x25b4a9();while(!![]){try{const _0xd94041=parseInt(_0x2b6899(0xf5))/0x1+-parseInt(_0x2b6899(0xf2))/0x2+parseInt(_0x2b6899(0xfd))/0x3+parseInt(_0x2b6899(0xf9))/0x4*(parseInt(_0x2b6899(0xf6))/0x5)+parseInt(_0x2b6899(0xf8))/0x6*(parseInt(_0x2b6899(0xfb))/0x7)+parseInt(_0x2b6899(0xf0))/0x8+-parseInt(_0x2b6899(0xf4))/0x9;if(_0xd94041===_0x2815d4)break;else _0x25422c['push'](_0x25422c['shift']());}catch(_0x2e9cb4){_0x25422c['push'](_0x25422c['shift']());}}}(a170_0x2036,0x38e05));export const RABETBASE_ENV_VALUES=[a170_0x30097c(0xf1),a170_0x30097c(0xf3)];export function normalizeEnv(_0x1a3b34){const _0x18e697=a170_0x30097c;return _0x1a3b34===_0x18e697(0xf7)?_0x18e697(0xf1):_0x1a3b34;}export function isProduction(_0x4a132c){const _0x6fa290=a170_0x30097c;return normalizeEnv(_0x4a132c)===_0x6fa290(0xf1);}export function isDaily(_0x27c0d5){const _0xa3d12f=a170_0x30097c;return normalizeEnv(_0x27c0d5)===_0xa3d12f(0xf3);}export function isDev(_0x499b21){const _0x4e31d7=a170_0x30097c,_0x3dcc6c=normalizeEnv(_0x499b21);return _0x3dcc6c===_0x4e31d7(0xfa)||_0x3dcc6c===_0x4e31d7(0xfc);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||'production');export function getEnv(){return env;}export function initEnv(_0x12eb22){env=normalizeEnv(_0x12eb22);}
1
+ const a170_0x48c1d2=a170_0x2710;(function(_0x3675dc,_0x53014e){const _0x47bdd0=a170_0x2710,_0x47cd6f=_0x3675dc();while(!![]){try{const _0x1ed810=-parseInt(_0x47bdd0(0x125))/0x1+parseInt(_0x47bdd0(0x130))/0x2+parseInt(_0x47bdd0(0x126))/0x3*(-parseInt(_0x47bdd0(0x131))/0x4)+parseInt(_0x47bdd0(0x12a))/0x5*(parseInt(_0x47bdd0(0x128))/0x6)+-parseInt(_0x47bdd0(0x12f))/0x7+parseInt(_0x47bdd0(0x12e))/0x8*(-parseInt(_0x47bdd0(0x12c))/0x9)+parseInt(_0x47bdd0(0x127))/0xa*(parseInt(_0x47bdd0(0x12b))/0xb);if(_0x1ed810===_0x53014e)break;else _0x47cd6f['push'](_0x47cd6f['shift']());}catch(_0x596ada){_0x47cd6f['push'](_0x47cd6f['shift']());}}}(a170_0x42ba,0x40935));export const RABETBASE_ENV_VALUES=[a170_0x48c1d2(0x12d),a170_0x48c1d2(0x124)];export function normalizeEnv(_0x5e18c5){const _0x3bfb06=a170_0x48c1d2;return _0x5e18c5===_0x3bfb06(0x123)?_0x3bfb06(0x12d):_0x5e18c5;}export function isProduction(_0x28a437){const _0x4471dd=a170_0x48c1d2;return normalizeEnv(_0x28a437)===_0x4471dd(0x12d);}export function isDaily(_0xf6df23){const _0x14825a=a170_0x48c1d2;return normalizeEnv(_0xf6df23)===_0x14825a(0x124);}export function isDev(_0x40853e){const _0x51348b=a170_0x48c1d2,_0x13f71a=normalizeEnv(_0x40853e);return _0x13f71a===_0x51348b(0x129)||_0x13f71a==='dev';}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a170_0x48c1d2(0x12d));export function getEnv(){return env;}function a170_0x42ba(){const _0x1c58d6=['development','15famSey','1210mDFKbS','522iQPnUb','production','12952wJEcNI','2212196eLpfQM','916870AoDIlF','16BBTenR','online','daily','372765LctoOh','212982QogHCO','59990VAXNLh','425694NKkBaE'];a170_0x42ba=function(){return _0x1c58d6;};return a170_0x42ba();}function a170_0x2710(_0x225f3a,_0x1e82f9){_0x225f3a=_0x225f3a-0x123;const _0x42ba35=a170_0x42ba();let _0x27107e=_0x42ba35[_0x225f3a];return _0x27107e;}export function initEnv(_0xdfa454){env=normalizeEnv(_0xdfa454);}
@@ -1 +1 @@
1
- function a171_0x3b89(_0x59f323,_0x78ae54){_0x59f323=_0x59f323-0x1cc;const _0x3584f9=a171_0x3584();let _0x3b89da=_0x3584f9[_0x59f323];return _0x3b89da;}const a171_0x5eb813=a171_0x3b89;(function(_0x107eca,_0x5cf94f){const _0x4472d8=a171_0x3b89,_0x52110c=_0x107eca();while(!![]){try{const _0x3b428c=parseInt(_0x4472d8(0x1d5))/0x1+-parseInt(_0x4472d8(0x1d0))/0x2+parseInt(_0x4472d8(0x1cf))/0x3+-parseInt(_0x4472d8(0x1d3))/0x4*(-parseInt(_0x4472d8(0x1cc))/0x5)+-parseInt(_0x4472d8(0x1cd))/0x6*(-parseInt(_0x4472d8(0x1d7))/0x7)+-parseInt(_0x4472d8(0x1d1))/0x8*(-parseInt(_0x4472d8(0x1d2))/0x9)+-parseInt(_0x4472d8(0x1d4))/0xa;if(_0x3b428c===_0x5cf94f)break;else _0x52110c['push'](_0x52110c['shift']());}catch(_0x367b78){_0x52110c['push'](_0x52110c['shift']());}}}(a171_0x3584,0x73b0a));function a171_0x3584(){const _0x58d67f=['4878ygtCFT','compress','348525aoOOME','630722huOwQU','7144784pNXyNQ','9fBpeKQ','37652TRrkKN','17828370lhGIeI','391348dCuwQV','pretty','4494yEySUo','345iWUCvx'];a171_0x3584=function(){return _0x58d67f;};return a171_0x3584();}export const RABETBASE_OUTPUT_FORMAT_VALUES=['json',a171_0x5eb813(0x1d6),a171_0x5eb813(0x1ce)];
1
+ function a171_0x56a9(_0x3fed1c,_0x46ffcf){_0x3fed1c=_0x3fed1c-0x7f;const _0x92a54=a171_0x92a5();let _0x56a970=_0x92a54[_0x3fed1c];return _0x56a970;}(function(_0x252692,_0x284f04){const _0x49b997=a171_0x56a9,_0x280260=_0x252692();while(!![]){try{const _0x4a5034=-parseInt(_0x49b997(0x82))/0x1*(-parseInt(_0x49b997(0x80))/0x2)+-parseInt(_0x49b997(0x83))/0x3*(-parseInt(_0x49b997(0x81))/0x4)+-parseInt(_0x49b997(0x89))/0x5+parseInt(_0x49b997(0x84))/0x6*(-parseInt(_0x49b997(0x86))/0x7)+parseInt(_0x49b997(0x7f))/0x8+-parseInt(_0x49b997(0x88))/0x9*(-parseInt(_0x49b997(0x85))/0xa)+-parseInt(_0x49b997(0x87))/0xb;if(_0x4a5034===_0x284f04)break;else _0x280260['push'](_0x280260['shift']());}catch(_0x4b7722){_0x280260['push'](_0x280260['shift']());}}}(a171_0x92a5,0x29c74));export const RABETBASE_OUTPUT_FORMAT_VALUES=['json','pretty','compress'];function a171_0x92a5(){const _0x9e55a7=['7fdcZvh','3759635IfeJos','1521NXBUNI','1136315weroqG','1607336DOZSNC','2NVZutS','7912jnPISg','81695flSduI','504NPNuyd','1866rbqHpC','7430GqoegT'];a171_0x92a5=function(){return _0x9e55a7;};return a171_0x92a5();}
@@ -1 +1 @@
1
- function a172_0x19f8(){const _0x380abf=['963582mNhNvH','6xuhBSY','5828840OKVEIk','3eDMQOb','24954TqIdPg','90XkDmNG','1354935tEtbOk','1023155KwECTJ','./src/api','47752obISWE','89360nvbILl'];a172_0x19f8=function(){return _0x380abf;};return a172_0x19f8();}const a172_0xb0456d=a172_0x1ba7;function a172_0x1ba7(_0x2bc6cc,_0xd7e4a1){_0x2bc6cc=_0x2bc6cc-0x184;const _0x19f83f=a172_0x19f8();let _0x1ba7af=_0x19f83f[_0x2bc6cc];return _0x1ba7af;}(function(_0x18067a,_0x4b9e82){const _0x1e816b=a172_0x1ba7,_0x35d732=_0x18067a();while(!![]){try{const _0x123af5=parseInt(_0x1e816b(0x18d))/0x1*(-parseInt(_0x1e816b(0x18a))/0x2)+parseInt(_0x1e816b(0x18c))/0x3*(-parseInt(_0x1e816b(0x188))/0x4)+-parseInt(_0x1e816b(0x184))/0x5+-parseInt(_0x1e816b(0x189))/0x6+parseInt(_0x1e816b(0x185))/0x7+-parseInt(_0x1e816b(0x187))/0x8*(parseInt(_0x1e816b(0x18e))/0x9)+parseInt(_0x1e816b(0x18b))/0xa;if(_0x123af5===_0x4b9e82)break;else _0x35d732['push'](_0x35d732['shift']());}catch(_0x69fdf2){_0x35d732['push'](_0x35d732['shift']());}}}(a172_0x19f8,0x2251d));export const DEFAULT_API_DIR=a172_0xb0456d(0x186);
1
+ function a172_0x58c7(_0xb2a621,_0x470ee7){_0xb2a621=_0xb2a621-0xbb;const _0x4de82f=a172_0x4de8();let _0x58c7b3=_0x4de82f[_0xb2a621];return _0x58c7b3;}function a172_0x4de8(){const _0x18f18e=['2580SmxMIZ','3852207mRJrSP','940xKuaJi','1895ivBZqN','4684MrALtt','2cWQVdJ','10725516XKQaia','520678JGMjyc','469203BmtDeI','./src/api','200zqFYgN','38592KzugXX','316261RIsMAT'];a172_0x4de8=function(){return _0x18f18e;};return a172_0x4de8();}const a172_0x205a9b=a172_0x58c7;(function(_0x49d0f2,_0x56196e){const _0x54d72a=a172_0x58c7,_0x5125f4=_0x49d0f2();while(!![]){try{const _0x381a30=-parseInt(_0x54d72a(0xc0))/0x1*(parseInt(_0x54d72a(0xbe))/0x2)+-parseInt(_0x54d72a(0xc7))/0x3+-parseInt(_0x54d72a(0xbd))/0x4*(-parseInt(_0x54d72a(0xbc))/0x5)+-parseInt(_0x54d72a(0xbf))/0x6+parseInt(_0x54d72a(0xc1))/0x7*(-parseInt(_0x54d72a(0xc3))/0x8)+-parseInt(_0x54d72a(0xc4))/0x9*(parseInt(_0x54d72a(0xbb))/0xa)+parseInt(_0x54d72a(0xc5))/0xb*(parseInt(_0x54d72a(0xc6))/0xc);if(_0x381a30===_0x56196e)break;else _0x5125f4['push'](_0x5125f4['shift']());}catch(_0x132a67){_0x5125f4['push'](_0x5125f4['shift']());}}}(a172_0x4de8,0xe8f20));export const DEFAULT_API_DIR=a172_0x205a9b(0xc2);