@lovrabet/rabetbase-cli 2.3.11 → 2.3.12-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) 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/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/delete.js +1 -1
  103. package/lib/commands/menu/external-link-create.js +1 -1
  104. package/lib/commands/menu/group-create.js +1 -1
  105. package/lib/commands/menu/group-update.js +1 -1
  106. package/lib/commands/menu/index.js +1 -1
  107. package/lib/commands/menu/list.js +1 -1
  108. package/lib/commands/menu/move.js +1 -1
  109. package/lib/commands/menu/regroup-start.js +1 -1
  110. package/lib/commands/menu/shared/compare-table.js +1 -1
  111. package/lib/commands/menu/shared/delete-plan.js +1 -1
  112. package/lib/commands/menu/shared/facts.js +1 -1
  113. package/lib/commands/menu/shared/index.js +1 -1
  114. package/lib/commands/menu/shared/inquirer.js +1 -1
  115. package/lib/commands/menu/shared/local-pages.js +1 -1
  116. package/lib/commands/menu/shared/logic.js +1 -1
  117. package/lib/commands/menu/shared/mutations.js +1 -1
  118. package/lib/commands/menu/shared/service.js +1 -1
  119. package/lib/commands/menu/shared/sync-core.js +1 -1
  120. package/lib/commands/menu/shared/update-core.js +1 -1
  121. package/lib/commands/menu/shared/valid-url.js +1 -1
  122. package/lib/commands/menu/sync.js +1 -1
  123. package/lib/commands/menu/update.js +1 -1
  124. package/lib/commands/notification/config-list.js +1 -1
  125. package/lib/commands/notification/index.js +1 -1
  126. package/lib/commands/page/generate-start.js +1 -1
  127. package/lib/commands/page/generate-status.js +1 -1
  128. package/lib/commands/page/index.js +1 -1
  129. package/lib/commands/page/pull.js +1 -1
  130. package/lib/commands/page/push.js +1 -1
  131. package/lib/commands/page/relation-audit.js +1 -1
  132. package/lib/commands/page/shared.js +1 -1
  133. package/lib/commands/page/standard-page-status.js +1 -1
  134. package/lib/commands/page/sync.js +1 -1
  135. package/lib/commands/permit/index.js +1 -1
  136. package/lib/commands/permit/page-get.js +1 -1
  137. package/lib/commands/permit/page-set.js +1 -1
  138. package/lib/commands/permit/role-apis-set.js +1 -1
  139. package/lib/commands/permit/role-menus-set.js +1 -1
  140. package/lib/commands/permit/role-menus.js +1 -1
  141. package/lib/commands/permit/shared.js +1 -1
  142. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  143. package/lib/commands/project/create/format-elapsed.js +1 -1
  144. package/lib/commands/project/create/main.js +1 -1
  145. package/lib/commands/project/create/non-interactive.js +1 -1
  146. package/lib/commands/project/create/project-template-path.js +1 -1
  147. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  148. package/lib/commands/project/create/use-format-code.js +1 -1
  149. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  150. package/lib/commands/project/index.js +1 -1
  151. package/lib/commands/project/init.js +1 -1
  152. package/lib/commands/project/upgrade.js +1 -1
  153. package/lib/commands/registry.js +1 -1
  154. package/lib/commands/role/create.js +1 -1
  155. package/lib/commands/role/delete.js +1 -1
  156. package/lib/commands/role/detail.js +1 -1
  157. package/lib/commands/role/index.js +1 -1
  158. package/lib/commands/role/list.js +1 -1
  159. package/lib/commands/role/shared.js +1 -1
  160. package/lib/commands/role/update.js +1 -1
  161. package/lib/commands/role/user-add.js +1 -1
  162. package/lib/commands/role/user-remove.js +1 -1
  163. package/lib/commands/role/user-resolve.js +1 -1
  164. package/lib/commands/run/index.js +1 -1
  165. package/lib/commands/schema.js +1 -1
  166. package/lib/commands/sql/create.js +1 -1
  167. package/lib/commands/sql/delete.js +1 -1
  168. package/lib/commands/sql/detail.js +1 -1
  169. package/lib/commands/sql/exec.js +1 -1
  170. package/lib/commands/sql/index.js +1 -1
  171. package/lib/commands/sql/list.js +1 -1
  172. package/lib/commands/sql/pull.js +1 -1
  173. package/lib/commands/sql/push.js +1 -1
  174. package/lib/commands/sql/save.js +1 -1
  175. package/lib/commands/sql/shared.js +1 -1
  176. package/lib/commands/sql/status.js +1 -1
  177. package/lib/commands/sql/validate.js +1 -1
  178. package/lib/commands/task/index.js +1 -1
  179. package/lib/commands/task/status.js +1 -1
  180. package/lib/commands/workspace/add.js +1 -1
  181. package/lib/commands/workspace/index.js +1 -1
  182. package/lib/commands/workspace/remove.js +1 -1
  183. package/lib/config/schema.js +1 -1
  184. package/lib/constant/cdn.js +1 -1
  185. package/lib/constant/cli.js +1 -1
  186. package/lib/constant/defaults.js +1 -1
  187. package/lib/constant/domain.js +1 -1
  188. package/lib/constant/env.js +1 -1
  189. package/lib/constant/output.js +1 -1
  190. package/lib/constant/paths.js +1 -1
  191. package/lib/constant/risk.js +1 -1
  192. package/lib/context/app-resolver.js +1 -1
  193. package/lib/context/auth-resolver.js +1 -1
  194. package/lib/context/config-loader.js +1 -1
  195. package/lib/context.js +1 -1
  196. package/lib/core/alias-resolver.js +1 -1
  197. package/lib/core/api-client.js +1 -1
  198. package/lib/core/bff/config.js +1 -1
  199. package/lib/core/bff/file-system.js +1 -1
  200. package/lib/core/bff/hash.js +1 -1
  201. package/lib/core/bff/lock.js +1 -1
  202. package/lib/core/bff/utils.js +1 -1
  203. package/lib/core/db-resolver.js +1 -1
  204. package/lib/core/page/file-system.js +1 -1
  205. package/lib/core/page/hash.js +1 -1
  206. package/lib/core/page/lock.js +1 -1
  207. package/lib/core/sql-index-auditor.js +1 -1
  208. package/lib/core/sql-sync/config.js +1 -1
  209. package/lib/core/sql-sync/file-system.js +1 -1
  210. package/lib/core/sql-sync/hash.js +1 -1
  211. package/lib/core/sql-sync/lock.js +1 -1
  212. package/lib/core/sql-sync/utils.js +1 -1
  213. package/lib/core/sql-validator.js +1 -1
  214. package/lib/errors.js +1 -1
  215. package/lib/framework/build-all-flags.js +1 -1
  216. package/lib/framework/error-output.js +1 -1
  217. package/lib/framework/explicit-yes.js +1 -1
  218. package/lib/framework/flags.js +1 -1
  219. package/lib/framework/help.js +1 -1
  220. package/lib/framework/index.js +1 -1
  221. package/lib/framework/output.js +1 -1
  222. package/lib/framework/response.js +1 -1
  223. package/lib/framework/runner-alias.js +1 -1
  224. package/lib/framework/runner.js +1 -1
  225. package/lib/framework/schema-export.js +1 -1
  226. package/lib/framework/types.js +1 -1
  227. package/lib/generated/build-info.js +1 -1
  228. package/lib/help.js +1 -1
  229. package/lib/skills/main.js +1 -1
  230. package/lib/skills/npx-skills-add.js +1 -1
  231. package/lib/telemetry/cli-command-trace.js +1 -1
  232. package/lib/telemetry/cli-help-trace.js +1 -1
  233. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  234. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  235. package/lib/telemetry/send-cli-trace-log.js +1 -1
  236. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  237. package/lib/utils/ai_config.js +1 -1
  238. package/lib/utils/apply-jq-filter.js +1 -1
  239. package/lib/utils/cdn-config.js +1 -1
  240. package/lib/utils/check-sdk-version.js +1 -1
  241. package/lib/utils/cli-version-check.js +1 -1
  242. package/lib/utils/cli-version-policy.js +1 -1
  243. package/lib/utils/config.js +1 -1
  244. package/lib/utils/copy-directory.js +1 -1
  245. package/lib/utils/entity-with-id.js +1 -1
  246. package/lib/utils/file-utils.js +1 -1
  247. package/lib/utils/guides-cdn.js +1 -1
  248. package/lib/utils/http-client.js +1 -1
  249. package/lib/utils/is-non-interactive.js +1 -1
  250. package/lib/utils/logger.js +1 -1
  251. package/lib/utils/params.js +1 -1
  252. package/lib/utils/platform.js +1 -1
  253. package/lib/utils/rules-cdn.js +1 -1
  254. package/lib/utils/sleep.js +1 -1
  255. package/lib/utils/template-replacer.js +1 -1
  256. package/lib/utils/update-notice.js +1 -1
  257. package/lib/utils/version.js +1 -1
  258. package/lib/utils/with-active-cookie.js +1 -1
  259. package/lib/utils/write-cli-side-channel.js +1 -1
  260. package/package.json +1 -1
@@ -1 +1 @@
1
- const a172_0x491d84=a172_0x51f2;(function(_0x396239,_0x2beebe){const _0x88f509=a172_0x51f2,_0x345ff4=_0x396239();while(!![]){try{const _0x51c227=parseInt(_0x88f509(0x170))/0x1+-parseInt(_0x88f509(0x15f))/0x2*(parseInt(_0x88f509(0x182))/0x3)+parseInt(_0x88f509(0x180))/0x4*(-parseInt(_0x88f509(0x16b))/0x5)+-parseInt(_0x88f509(0x162))/0x6*(parseInt(_0x88f509(0x15e))/0x7)+parseInt(_0x88f509(0x17b))/0x8+-parseInt(_0x88f509(0x148))/0x9*(parseInt(_0x88f509(0x14a))/0xa)+parseInt(_0x88f509(0x149))/0xb;if(_0x51c227===_0x2beebe)break;else _0x345ff4['push'](_0x345ff4['shift']());}catch(_0x1fa40b){_0x345ff4['push'](_0x345ff4['shift']());}}}(a172_0x402b,0xe8e7b));import{readFile,rm,writeFile}from'node:fs/promises';import{join}from'node:path';import{getSqlQueryDetail,listSqlQueries}from'../../core/api-client.js';function a172_0x402b(){const _0x3c5fa6=['40DLgZRH','description','length','sqlcode','name','1713672OJSbOD','catch','Force\x20overwrite\x20local\x20unsynced\x20changes','dbId','unchanged','skipped','paging','\x20skipped,\x20','conflict','replace','path','8938320GOlwSW','sql','force','Pull\x20complete:\x20','nonInteractive','592548gupYMZ','Would\x20pull\x20','2736651LcVmVw','377802FOmYES','18121026TwigFf','290YRhcom','sqlCode','tableData','Force\x20pull\x20will\x20overwrite\x20local\x20SQL\x20that\x20differs\x20from\x20remote.','filter','mybatisXml','pull','sqlRoot','totalCount','cancelled','No\x20remote\x20SQL\x20queries\x20matched.','boolean','appCode','Pull\x20remote\x20SQL\x20queries\x20to\x20local\x20.rabetbase/sql/','trimStart','lockFilePath','sqlName','sqlRootDir','local\x20differs\x20from\x20remote\x20(use\x20--force\x20to\x20overwrite)','message','14wxUEnD','2KBmmmp','str','lastSync','629022tZVUCV','utf8','sqlContent','toISOString','/smartapi/custom/queryUserCustomSqlList\x20+\x20/smartapi/custom/getUserCustomSql','push','string','Filter\x20by\x20SQL\x20display\x20name','sqls'];a172_0x402b=function(){return _0x3c5fa6;};return a172_0x402b();}import{ensureParentDirectory,fileExists}from'../../core/bff/file-system.js';import{getDbName}from'../../core/db-resolver.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';function a172_0x51f2(_0x175468,_0x346226){_0x175468=_0x175468-0x148;const _0x402bc2=a172_0x402b();let _0x51f20c=_0x402bc2[_0x175468];return _0x51f20c;}import{computeSqlContentHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{resolveLocalSqlFilePath}from'../../core/sql-sync/file-system.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildLocalSqlFileContent,buildSqlLockEntry,cloneSqlLockData,confirmForceOverwrite,ensureRemoteSqlContent,stripLocalSqlMetadata}from'./shared.js';const PAGE_SIZE=0x64;async function fetchAllSqlQueries(_0x385ff1,_0x23582e){const _0x39d846=a172_0x51f2,_0x236f60=[];let _0x5888fd=0x1;while(!![]){const _0x565401=await listSqlQueries(_0x385ff1,{'currentPage':_0x5888fd,'pageSize':PAGE_SIZE,'sqlCode':_0x23582e[_0x39d846(0x14b)],'sqlName':_0x23582e['sqlName']}),_0x54d493=_0x565401[_0x39d846(0x14c)]??[];_0x236f60[_0x39d846(0x167)](..._0x54d493);if(_0x54d493[_0x39d846(0x16d)]===0x0)break;const _0x1cb6b5=_0x565401[_0x39d846(0x176)]?.[_0x39d846(0x152)];if(_0x1cb6b5!=null?_0x236f60['length']>=_0x1cb6b5:_0x54d493[_0x39d846(0x16d)]<PAGE_SIZE)break;_0x5888fd++;}return _0x236f60;}async function ensureSqlContent(_0x40b419){const _0x907d47=a172_0x51f2;if(_0x40b419[_0x907d47(0x164)]!=null&&String(_0x40b419[_0x907d47(0x164)])[_0x907d47(0x16d)]>0x0)return _0x40b419;return getSqlQueryDetail(_0x40b419[_0x907d47(0x14b)]);}export const sqlPull={'service':a172_0x491d84(0x17c),'command':a172_0x491d84(0x150),'description':a172_0x491d84(0x157),'risk':'write','flags':[SQLCODE_FLAG_OPTIONAL,{'name':a172_0x491d84(0x16f),'type':a172_0x491d84(0x168),'description':a172_0x491d84(0x169)},{'name':a172_0x491d84(0x17d),'type':a172_0x491d84(0x155),'description':a172_0x491d84(0x172)}],async 'dryRun'(_0x1ed1de){const _0x107bbd=a172_0x491d84,_0xd0a08=loadSqlProjectConfig(_0x1ed1de[_0x107bbd(0x156)]),_0x362be3=await readSqlLockFile(_0xd0a08['lockFilePath']),{appLock:_0x54fa9f}=ensureSqlLockScope(_0x362be3??createEmptySqlLock(),_0xd0a08[_0x107bbd(0x156)],_0xd0a08[_0x107bbd(0x151)],_0x107bbd(0x150)),_0x574845=await fetchAllSqlQueries(_0x1ed1de[_0x107bbd(0x156)],{'sqlCode':_0x1ed1de[_0x107bbd(0x160)]('sqlcode')||undefined,'sqlName':_0x1ed1de[_0x107bbd(0x160)]('name')||undefined}),_0x312667=[];for(const _0x500d38 of _0x574845){const _0xba6c89=await ensureSqlContent(_0x500d38),_0x19428c=ensureRemoteSqlContent(_0xba6c89),_0x43915e=detectModeFromSql(_0xba6c89),_0xafae28=_0xba6c89[_0x107bbd(0x173)]?await getDbName(_0x1ed1de['appCode'],Number(_0xba6c89[_0x107bbd(0x173)]))[_0x107bbd(0x171)](()=>undefined):undefined,_0xdaed8b=buildLocalSqlFileContent({'sqlCode':_0xba6c89[_0x107bbd(0x14b)],'sqlName':_0xba6c89[_0x107bbd(0x15a)],'dbId':_0xba6c89[_0x107bbd(0x173)]},_0x19428c,{'dbName':_0xafae28,'mode':_0x43915e,'syncedAt':new Date()[_0x107bbd(0x165)](),'description':_0xba6c89['description']}),_0x1f72aa=buildSqlLockEntry(_0xba6c89,_0x19428c,'',{'dbName':_0xafae28}),_0x49f292=resolveLocalSqlFilePath(_0xd0a08,_0xba6c89[_0x107bbd(0x14b)],_0x1f72aa);let _0x175733='would_pull',_0x35e404;if(await fileExists(_0x49f292)){const _0x606e78=await readFile(_0x49f292,_0x107bbd(0x163));isEquivalentPulledSqlFile(_0x606e78,_0xdaed8b,_0x43915e)?(_0x175733=_0x107bbd(0x175),_0x35e404=_0x107bbd(0x174)):(_0x175733=_0x107bbd(0x178),_0x35e404=_0x107bbd(0x15c));}_0x312667[_0x107bbd(0x167)]({'sqlCode':_0xba6c89[_0x107bbd(0x14b)],'sqlName':_0xba6c89[_0x107bbd(0x15a)],'filePath':_0x49f292,'status':_0x175733,'reason':_0x35e404});}return{'method':'POST','url':_0x107bbd(0x166),'body':{'appCode':_0x1ed1de[_0x107bbd(0x156)],'sqlCode':_0x1ed1de[_0x107bbd(0x160)](_0x107bbd(0x16e))||null,'sqlName':_0x1ed1de[_0x107bbd(0x160)](_0x107bbd(0x16f))||null,'files':_0x312667},'description':_0x107bbd(0x181)+_0x312667[_0x107bbd(0x16d)]+'\x20SQL\x20file(s)\x20into\x20'+_0xd0a08[_0x107bbd(0x15b)]};},async 'execute'(_0x14b08e){const _0x4dc777=a172_0x491d84,_0x1ed3e8=loadSqlProjectConfig(_0x14b08e[_0x4dc777(0x156)]),_0x38aea6=await readSqlLockFile(_0x1ed3e8[_0x4dc777(0x159)]),{lockData:_0x3b6229,appLock:_0x116637}=ensureSqlLockScope(_0x38aea6??createEmptySqlLock(),_0x1ed3e8[_0x4dc777(0x156)],_0x1ed3e8['sqlRoot'],_0x4dc777(0x150)),_0x4759ce=_0x14b08e['bool']('force'),_0x1b76a1=await fetchAllSqlQueries(_0x14b08e[_0x4dc777(0x156)],{'sqlCode':_0x14b08e[_0x4dc777(0x160)](_0x4dc777(0x16e))||undefined,'sqlName':_0x14b08e[_0x4dc777(0x160)](_0x4dc777(0x16f))||undefined});if(_0x1b76a1['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x4dc777(0x154)};const _0x47f847=[],_0x3a8b0e=[];for(const _0x5f11cf of _0x1b76a1){try{_0x47f847[_0x4dc777(0x167)](await ensureSqlContent(_0x5f11cf));}catch(_0x2a0968){_0x3a8b0e[_0x4dc777(0x167)]({'sqlCode':_0x5f11cf[_0x4dc777(0x14b)],'error':_0x2a0968 instanceof Error?_0x2a0968[_0x4dc777(0x15d)]:String(_0x2a0968)});}}if(_0x4759ce&&!_0x14b08e[_0x4dc777(0x17f)]){let _0x4b4982=![];for(const _0x33fedf of _0x47f847){const _0xe29d53=detectModeFromSql(_0x33fedf),_0x48d5e7=_0x33fedf[_0x4dc777(0x173)]?await getDbName(_0x14b08e['appCode'],Number(_0x33fedf[_0x4dc777(0x173)]))[_0x4dc777(0x171)](()=>undefined):undefined,_0x457190=buildLocalSqlFileContent({'sqlCode':_0x33fedf['sqlCode'],'sqlName':_0x33fedf['sqlName'],'dbId':_0x33fedf[_0x4dc777(0x173)]},ensureRemoteSqlContent(_0x33fedf),{'dbName':_0x48d5e7,'mode':_0xe29d53,'syncedAt':new Date()[_0x4dc777(0x165)](),'description':_0x33fedf[_0x4dc777(0x16c)]}),_0x55e319=resolveLocalSqlFilePath(_0x1ed3e8,_0x33fedf[_0x4dc777(0x14b)],buildSqlLockEntry(_0x33fedf,ensureRemoteSqlContent(_0x33fedf),'',{'dbName':_0x48d5e7}));if(await fileExists(_0x55e319)){const _0x20eef7=await readFile(_0x55e319,_0x4dc777(0x163));if(!isEquivalentPulledSqlFile(_0x20eef7,_0x457190,_0xe29d53)){_0x4b4982=!![];break;}}}if(_0x4b4982){const _0x1d73b6=await confirmForceOverwrite(_0x4dc777(0x14d));if(!_0x1d73b6)throw CliErrors[_0x4dc777(0x153)]('Force\x20pull\x20cancelled.');}}const _0x379931=cloneSqlLockData(_0x3b6229),_0xb0b34d=_0x379931['apps'][_0x1ed3e8['appCode']],_0x1c6ccb=[],_0x5b5339=[];for(const _0x14357d of _0x47f847){const _0x511ad5=_0xb0b34d[_0x4dc777(0x16a)][_0x14357d[_0x4dc777(0x14b)]],_0x13547d=ensureRemoteSqlContent(_0x14357d),_0x1ba919=detectModeFromSql(_0x14357d),_0x3e2e17=_0x14357d[_0x4dc777(0x173)]?await getDbName(_0x14b08e['appCode'],Number(_0x14357d[_0x4dc777(0x173)]))[_0x4dc777(0x171)](()=>undefined):undefined,_0x5bbab6=buildLocalSqlFileContent({'sqlCode':_0x14357d[_0x4dc777(0x14b)],'sqlName':_0x14357d['sqlName'],'dbId':_0x14357d['dbId']},_0x13547d,{'dbName':_0x3e2e17,'mode':_0x1ba919,'syncedAt':new Date()[_0x4dc777(0x165)](),'description':_0x14357d['description']}),_0x43bbfb=buildSqlLockEntry(_0x14357d,_0x13547d,computeSqlContentHash(_0x5bbab6),{'dbName':_0x3e2e17}),_0x317623=_0x43bbfb[_0x4dc777(0x17a)],_0x4f4d69=join(_0x1ed3e8[_0x4dc777(0x15b)],_0x317623);try{if(await fileExists(_0x4f4d69)){const _0x51abae=await readFile(_0x4f4d69,_0x4dc777(0x163));if(isEquivalentPulledSqlFile(_0x51abae,_0x5bbab6,_0x1ba919)){_0x5b5339[_0x4dc777(0x167)]({'sqlCode':_0x14357d[_0x4dc777(0x14b)],'reason':'unchanged'}),_0xb0b34d[_0x4dc777(0x16a)][_0x14357d['sqlCode']]={..._0x43bbfb,'hash':computeSqlContentHash(_0x51abae),'path':_0x317623};continue;}if(!_0x4759ce){_0x5b5339['push']({'sqlCode':_0x14357d[_0x4dc777(0x14b)],'reason':'local\x20differs\x20from\x20remote'});continue;}}const _0xf6164b=_0x511ad5?.[_0x4dc777(0x17a)]?join(_0x1ed3e8['sqlRootDir'],_0x511ad5[_0x4dc777(0x17a)]):undefined;_0xf6164b&&_0xf6164b!==_0x4f4d69&&await fileExists(_0xf6164b)&&await rm(_0xf6164b,{'force':!![]}),await ensureParentDirectory(_0x4f4d69),await writeFile(_0x4f4d69,_0x5bbab6,_0x4dc777(0x163)),_0xb0b34d[_0x4dc777(0x16a)][_0x14357d[_0x4dc777(0x14b)]]={..._0x43bbfb,'path':_0x317623},_0x1c6ccb[_0x4dc777(0x167)]({'sqlCode':_0x14357d[_0x4dc777(0x14b)],'filePath':_0x4f4d69});}catch(_0x48d933){_0x3a8b0e[_0x4dc777(0x167)]({'sqlCode':_0x14357d[_0x4dc777(0x14b)],'error':_0x48d933 instanceof Error?_0x48d933[_0x4dc777(0x15d)]:String(_0x48d933)});}}return _0xb0b34d[_0x4dc777(0x161)]=new Date()['toISOString'](),await writeSqlLockFile(_0x1ed3e8[_0x4dc777(0x159)],_0x379931),{'ok':_0x3a8b0e[_0x4dc777(0x16d)]===0x0,'data':{'pulled':_0x1c6ccb,'skipped':_0x5b5339,'failed':_0x3a8b0e},'message':_0x4dc777(0x17e)+_0x1c6ccb[_0x4dc777(0x16d)]+'\x20written,\x20'+_0x5b5339[_0x4dc777(0x16d)]+_0x4dc777(0x177)+_0x3a8b0e['length']+'\x20failed'};}};function detectModeFromSql(_0x31558f){const _0x3fc9d6=a172_0x491d84,_0xb61b28=ensureRemoteSqlContent(_0x31558f),_0x20865d=stripLocalSqlMetadata(_0xb61b28,_0x3fc9d6(0x14f))[_0x3fc9d6(0x158)]();if(/^<(select|insert|update|delete)\b/i['test'](_0x20865d))return _0x3fc9d6(0x14f);return _0x3fc9d6(0x17c);}function isEquivalentPulledSqlFile(_0x5b9eff,_0x301e18,_0x9a023){return normalizePullComparableContent(_0x5b9eff,_0x9a023)===normalizePullComparableContent(_0x301e18,_0x9a023);}function normalizePullComparableContent(_0x1de437,_0x4d3911){const _0x138c98=a172_0x491d84,_0x344577=_0x1de437[_0x138c98(0x179)](/\r\n/g,'\x0a')['split']('\x0a'),_0x1b5cb9=_0x344577[_0x138c98(0x14e)](_0x666feb=>!isSyncedAtMetadataLine(_0x666feb,_0x4d3911));return _0x1b5cb9['join']('\x0a');}function isSyncedAtMetadataLine(_0x7985b4,_0x52bd00){const _0x262b86=a172_0x491d84;if(_0x52bd00===_0x262b86(0x14f))return/^\s*<!--\s*@lovrabet\.syncedAt:/['test'](_0x7985b4);return/^\s*--\s*@lovrabet\.syncedAt:/['test'](_0x7985b4);}
1
+ const a172_0x5be294=a172_0x7049;(function(_0x4acaff,_0x5eedd4){const _0x4836fb=a172_0x7049,_0x5c63e3=_0x4acaff();while(!![]){try{const _0x429018=parseInt(_0x4836fb(0x1f4))/0x1+parseInt(_0x4836fb(0x1d5))/0x2+parseInt(_0x4836fb(0x1e3))/0x3*(-parseInt(_0x4836fb(0x207))/0x4)+-parseInt(_0x4836fb(0x1fe))/0x5*(parseInt(_0x4836fb(0x1fa))/0x6)+-parseInt(_0x4836fb(0x202))/0x7*(parseInt(_0x4836fb(0x1e5))/0x8)+-parseInt(_0x4836fb(0x1db))/0x9+-parseInt(_0x4836fb(0x1d3))/0xa*(-parseInt(_0x4836fb(0x206))/0xb);if(_0x429018===_0x5eedd4)break;else _0x5c63e3['push'](_0x5c63e3['shift']());}catch(_0x473356){_0x5c63e3['push'](_0x5c63e3['shift']());}}}(a172_0x59d1,0x5d85b));import{readFile,rm,writeFile}from'node:fs/promises';import{join}from'node:path';function a172_0x7049(_0x740445,_0x50f38e){_0x740445=_0x740445-0x1ce;const _0x59d10f=a172_0x59d1();let _0x7049bd=_0x59d10f[_0x740445];return _0x7049bd;}import{getSqlQueryDetail,listSqlQueries}from'../../core/api-client.js';import{ensureParentDirectory,fileExists}from'../../core/bff/file-system.js';import{getDbName}from'../../core/db-resolver.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{computeSqlContentHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{resolveLocalSqlFilePath}from'../../core/sql-sync/file-system.js';import{CliErrors}from'../../errors.js';function a172_0x59d1(){const _0x382da8=['Force\x20pull\x20cancelled.','apps','59838ClOnbO','appCode','length','toISOString','265BGeKdb','pull','Pull\x20complete:\x20','/smartapi/custom/queryUserCustomSqlList\x20+\x20/smartapi/custom/getUserCustomSql','419223WFXGut','Would\x20pull\x20','filter','local\x20differs\x20from\x20remote\x20(use\x20--force\x20to\x20overwrite)','22EtbadP','1222472XukNVk','POST','name','write','unchanged','path','push','sqlRoot','8019590BxGwbO','tableData','1004528JVhdrt','utf8','sqls','mybatisXml','dbId','test','4973760qXORnI','sql','sqlRootDir','cancelled','sqlcode','sqlContent','lockFilePath','trimStart','6ywVvHH','Force\x20overwrite\x20local\x20unsynced\x20changes','88uELttE','No\x20remote\x20SQL\x20queries\x20matched.','split','Pull\x20remote\x20SQL\x20queries\x20to\x20local\x20.rabetbase/sql/','sqlName','force','string','nonInteractive','lastSync','paging','boolean','catch','\x20SQL\x20file(s)\x20into\x20','str','sqlCode','628109DuXuGg','\x20failed','message','replace'];a172_0x59d1=function(){return _0x382da8;};return a172_0x59d1();}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildLocalSqlFileContent,buildSqlLockEntry,cloneSqlLockData,confirmForceOverwrite,ensureRemoteSqlContent,stripLocalSqlMetadata}from'./shared.js';const PAGE_SIZE=0x64;async function fetchAllSqlQueries(_0x1a41a2,_0x3025a2){const _0x990949=a172_0x7049,_0x4c24dd=[];let _0x119c28=0x1;while(!![]){const _0x42c274=await listSqlQueries(_0x1a41a2,{'currentPage':_0x119c28,'pageSize':PAGE_SIZE,'sqlCode':_0x3025a2['sqlCode'],'sqlName':_0x3025a2['sqlName']}),_0x18c0ad=_0x42c274[_0x990949(0x1d4)]??[];_0x4c24dd['push'](..._0x18c0ad);if(_0x18c0ad[_0x990949(0x1fc)]===0x0)break;const _0x4adffa=_0x42c274[_0x990949(0x1ee)]?.['totalCount'];if(_0x4adffa!=null?_0x4c24dd[_0x990949(0x1fc)]>=_0x4adffa:_0x18c0ad[_0x990949(0x1fc)]<PAGE_SIZE)break;_0x119c28++;}return _0x4c24dd;}async function ensureSqlContent(_0x1270ea){const _0x46d2ec=a172_0x7049;if(_0x1270ea[_0x46d2ec(0x1e0)]!=null&&String(_0x1270ea[_0x46d2ec(0x1e0)])['length']>0x0)return _0x1270ea;return getSqlQueryDetail(_0x1270ea[_0x46d2ec(0x1f3)]);}export const sqlPull={'service':a172_0x5be294(0x1dc),'command':a172_0x5be294(0x1ff),'description':a172_0x5be294(0x1e8),'risk':a172_0x5be294(0x1ce),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a172_0x5be294(0x209),'type':a172_0x5be294(0x1eb),'description':'Filter\x20by\x20SQL\x20display\x20name'},{'name':a172_0x5be294(0x1ea),'type':a172_0x5be294(0x1ef),'description':a172_0x5be294(0x1e4)}],async 'dryRun'(_0x1a3fa6){const _0x1ed66e=a172_0x5be294,_0x599127=loadSqlProjectConfig(_0x1a3fa6[_0x1ed66e(0x1fb)]),_0x390b6f=await readSqlLockFile(_0x599127[_0x1ed66e(0x1e1)]),{appLock:_0x1e7fea}=ensureSqlLockScope(_0x390b6f??createEmptySqlLock(),_0x599127[_0x1ed66e(0x1fb)],_0x599127[_0x1ed66e(0x1d2)],_0x1ed66e(0x1ff)),_0x4fb3cf=await fetchAllSqlQueries(_0x1a3fa6[_0x1ed66e(0x1fb)],{'sqlCode':_0x1a3fa6[_0x1ed66e(0x1f2)]('sqlcode')||undefined,'sqlName':_0x1a3fa6['str'](_0x1ed66e(0x209))||undefined}),_0x24e14e=[];for(const _0xc1a635 of _0x4fb3cf){const _0x6cce35=await ensureSqlContent(_0xc1a635),_0x443399=ensureRemoteSqlContent(_0x6cce35),_0x18cafb=detectModeFromSql(_0x6cce35),_0x9de1c4=_0x6cce35[_0x1ed66e(0x1d9)]?await getDbName(_0x1a3fa6['appCode'],Number(_0x6cce35[_0x1ed66e(0x1d9)]))['catch'](()=>undefined):undefined,_0x35de20=buildLocalSqlFileContent({'sqlCode':_0x6cce35[_0x1ed66e(0x1f3)],'sqlName':_0x6cce35['sqlName'],'dbId':_0x6cce35['dbId']},_0x443399,{'dbName':_0x9de1c4,'mode':_0x18cafb,'syncedAt':new Date()[_0x1ed66e(0x1fd)](),'description':_0x6cce35['description']}),_0x1a4b3a=buildSqlLockEntry(_0x6cce35,_0x443399,'',{'dbName':_0x9de1c4}),_0x32b7a3=resolveLocalSqlFilePath(_0x599127,_0x6cce35[_0x1ed66e(0x1f3)],_0x1a4b3a);let _0x4f561d='would_pull',_0x241f3c;if(await fileExists(_0x32b7a3)){const _0x8afb1c=await readFile(_0x32b7a3,_0x1ed66e(0x1d6));isEquivalentPulledSqlFile(_0x8afb1c,_0x35de20,_0x18cafb)?(_0x4f561d='skipped',_0x241f3c='unchanged'):(_0x4f561d='conflict',_0x241f3c=_0x1ed66e(0x205));}_0x24e14e[_0x1ed66e(0x1d1)]({'sqlCode':_0x6cce35['sqlCode'],'sqlName':_0x6cce35[_0x1ed66e(0x1e9)],'filePath':_0x32b7a3,'status':_0x4f561d,'reason':_0x241f3c});}return{'method':_0x1ed66e(0x208),'url':_0x1ed66e(0x201),'body':{'appCode':_0x1a3fa6['appCode'],'sqlCode':_0x1a3fa6[_0x1ed66e(0x1f2)](_0x1ed66e(0x1df))||null,'sqlName':_0x1a3fa6['str']('name')||null,'files':_0x24e14e},'description':_0x1ed66e(0x203)+_0x24e14e[_0x1ed66e(0x1fc)]+_0x1ed66e(0x1f1)+_0x599127['sqlRootDir']};},async 'execute'(_0x5a8d20){const _0x32103d=a172_0x5be294,_0x2628ab=loadSqlProjectConfig(_0x5a8d20[_0x32103d(0x1fb)]),_0x275910=await readSqlLockFile(_0x2628ab[_0x32103d(0x1e1)]),{lockData:_0xb1cd73,appLock:_0x10f00a}=ensureSqlLockScope(_0x275910??createEmptySqlLock(),_0x2628ab[_0x32103d(0x1fb)],_0x2628ab[_0x32103d(0x1d2)],_0x32103d(0x1ff)),_0x368f11=_0x5a8d20['bool']('force'),_0x5abc02=await fetchAllSqlQueries(_0x5a8d20[_0x32103d(0x1fb)],{'sqlCode':_0x5a8d20[_0x32103d(0x1f2)](_0x32103d(0x1df))||undefined,'sqlName':_0x5a8d20[_0x32103d(0x1f2)](_0x32103d(0x209))||undefined});if(_0x5abc02['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x32103d(0x1e6)};const _0x4f0604=[],_0x3215db=[];for(const _0x51bd36 of _0x5abc02){try{_0x4f0604[_0x32103d(0x1d1)](await ensureSqlContent(_0x51bd36));}catch(_0x5b1a2e){_0x3215db[_0x32103d(0x1d1)]({'sqlCode':_0x51bd36[_0x32103d(0x1f3)],'error':_0x5b1a2e instanceof Error?_0x5b1a2e[_0x32103d(0x1f6)]:String(_0x5b1a2e)});}}if(_0x368f11&&!_0x5a8d20[_0x32103d(0x1ec)]){let _0x297d54=![];for(const _0x50f1d3 of _0x4f0604){const _0x157255=detectModeFromSql(_0x50f1d3),_0x464627=_0x50f1d3['dbId']?await getDbName(_0x5a8d20['appCode'],Number(_0x50f1d3['dbId']))[_0x32103d(0x1f0)](()=>undefined):undefined,_0x180b52=buildLocalSqlFileContent({'sqlCode':_0x50f1d3[_0x32103d(0x1f3)],'sqlName':_0x50f1d3['sqlName'],'dbId':_0x50f1d3[_0x32103d(0x1d9)]},ensureRemoteSqlContent(_0x50f1d3),{'dbName':_0x464627,'mode':_0x157255,'syncedAt':new Date()['toISOString'](),'description':_0x50f1d3['description']}),_0x280e45=resolveLocalSqlFilePath(_0x2628ab,_0x50f1d3['sqlCode'],buildSqlLockEntry(_0x50f1d3,ensureRemoteSqlContent(_0x50f1d3),'',{'dbName':_0x464627}));if(await fileExists(_0x280e45)){const _0x1f30b2=await readFile(_0x280e45,_0x32103d(0x1d6));if(!isEquivalentPulledSqlFile(_0x1f30b2,_0x180b52,_0x157255)){_0x297d54=!![];break;}}}if(_0x297d54){const _0x113b00=await confirmForceOverwrite('Force\x20pull\x20will\x20overwrite\x20local\x20SQL\x20that\x20differs\x20from\x20remote.');if(!_0x113b00)throw CliErrors[_0x32103d(0x1de)](_0x32103d(0x1f8));}}const _0x15cd7f=cloneSqlLockData(_0xb1cd73),_0x2444da=_0x15cd7f[_0x32103d(0x1f9)][_0x2628ab[_0x32103d(0x1fb)]],_0x120401=[],_0x15cf41=[];for(const _0x2bd5e5 of _0x4f0604){const _0x585da8=_0x2444da['sqls'][_0x2bd5e5[_0x32103d(0x1f3)]],_0x29057c=ensureRemoteSqlContent(_0x2bd5e5),_0x3f150c=detectModeFromSql(_0x2bd5e5),_0x25735a=_0x2bd5e5['dbId']?await getDbName(_0x5a8d20[_0x32103d(0x1fb)],Number(_0x2bd5e5[_0x32103d(0x1d9)]))[_0x32103d(0x1f0)](()=>undefined):undefined,_0x171286=buildLocalSqlFileContent({'sqlCode':_0x2bd5e5[_0x32103d(0x1f3)],'sqlName':_0x2bd5e5[_0x32103d(0x1e9)],'dbId':_0x2bd5e5['dbId']},_0x29057c,{'dbName':_0x25735a,'mode':_0x3f150c,'syncedAt':new Date()['toISOString'](),'description':_0x2bd5e5['description']}),_0x4d4ad4=buildSqlLockEntry(_0x2bd5e5,_0x29057c,computeSqlContentHash(_0x171286),{'dbName':_0x25735a}),_0x41bf29=_0x4d4ad4['path'],_0x135aca=join(_0x2628ab['sqlRootDir'],_0x41bf29);try{if(await fileExists(_0x135aca)){const _0x389bdb=await readFile(_0x135aca,_0x32103d(0x1d6));if(isEquivalentPulledSqlFile(_0x389bdb,_0x171286,_0x3f150c)){_0x15cf41[_0x32103d(0x1d1)]({'sqlCode':_0x2bd5e5[_0x32103d(0x1f3)],'reason':_0x32103d(0x1cf)}),_0x2444da[_0x32103d(0x1d7)][_0x2bd5e5[_0x32103d(0x1f3)]]={..._0x4d4ad4,'hash':computeSqlContentHash(_0x389bdb),'path':_0x41bf29};continue;}if(!_0x368f11){_0x15cf41[_0x32103d(0x1d1)]({'sqlCode':_0x2bd5e5[_0x32103d(0x1f3)],'reason':'local\x20differs\x20from\x20remote'});continue;}}const _0x36f2c4=_0x585da8?.[_0x32103d(0x1d0)]?join(_0x2628ab[_0x32103d(0x1dd)],_0x585da8[_0x32103d(0x1d0)]):undefined;_0x36f2c4&&_0x36f2c4!==_0x135aca&&await fileExists(_0x36f2c4)&&await rm(_0x36f2c4,{'force':!![]}),await ensureParentDirectory(_0x135aca),await writeFile(_0x135aca,_0x171286,_0x32103d(0x1d6)),_0x2444da['sqls'][_0x2bd5e5['sqlCode']]={..._0x4d4ad4,'path':_0x41bf29},_0x120401[_0x32103d(0x1d1)]({'sqlCode':_0x2bd5e5[_0x32103d(0x1f3)],'filePath':_0x135aca});}catch(_0x359f14){_0x3215db['push']({'sqlCode':_0x2bd5e5[_0x32103d(0x1f3)],'error':_0x359f14 instanceof Error?_0x359f14[_0x32103d(0x1f6)]:String(_0x359f14)});}}return _0x2444da[_0x32103d(0x1ed)]=new Date()['toISOString'](),await writeSqlLockFile(_0x2628ab[_0x32103d(0x1e1)],_0x15cd7f),{'ok':_0x3215db[_0x32103d(0x1fc)]===0x0,'data':{'pulled':_0x120401,'skipped':_0x15cf41,'failed':_0x3215db},'message':_0x32103d(0x200)+_0x120401[_0x32103d(0x1fc)]+'\x20written,\x20'+_0x15cf41['length']+'\x20skipped,\x20'+_0x3215db[_0x32103d(0x1fc)]+_0x32103d(0x1f5)};}};function detectModeFromSql(_0x288a71){const _0x4dbccb=a172_0x5be294,_0x271b9f=ensureRemoteSqlContent(_0x288a71),_0x1a3d01=stripLocalSqlMetadata(_0x271b9f,_0x4dbccb(0x1d8))[_0x4dbccb(0x1e2)]();if(/^<(select|insert|update|delete)\b/i[_0x4dbccb(0x1da)](_0x1a3d01))return _0x4dbccb(0x1d8);return'sql';}function isEquivalentPulledSqlFile(_0x44f7cc,_0x48afea,_0x17f323){return normalizePullComparableContent(_0x44f7cc,_0x17f323)===normalizePullComparableContent(_0x48afea,_0x17f323);}function normalizePullComparableContent(_0xb66c69,_0x54948a){const _0x497ca1=a172_0x5be294,_0x4d1c44=_0xb66c69[_0x497ca1(0x1f7)](/\r\n/g,'\x0a')[_0x497ca1(0x1e7)]('\x0a'),_0x5dbdcd=_0x4d1c44[_0x497ca1(0x204)](_0x208daa=>!isSyncedAtMetadataLine(_0x208daa,_0x54948a));return _0x5dbdcd['join']('\x0a');}function isSyncedAtMetadataLine(_0x227fd5,_0x2b14aa){const _0x3f9024=a172_0x5be294;if(_0x2b14aa==='mybatisXml')return/^\s*<!--\s*@lovrabet\.syncedAt:/[_0x3f9024(0x1da)](_0x227fd5);return/^\s*--\s*@lovrabet\.syncedAt:/['test'](_0x227fd5);}
@@ -1 +1 @@
1
- function a173_0x49e7(_0x46eefb,_0x1ec85f){_0x46eefb=_0x46eefb-0x1a8;const _0x514c2f=a173_0x514c();let _0x49e745=_0x514c2f[_0x46eefb];return _0x49e745;}const a173_0x3a5554=a173_0x49e7;(function(_0x3e926c,_0x229699){const _0x41dd26=a173_0x49e7,_0x3352f2=_0x3e926c();while(!![]){try{const _0x55535c=-parseInt(_0x41dd26(0x1e0))/0x1*(parseInt(_0x41dd26(0x1e4))/0x2)+-parseInt(_0x41dd26(0x1ae))/0x3+-parseInt(_0x41dd26(0x1af))/0x4+-parseInt(_0x41dd26(0x1de))/0x5*(-parseInt(_0x41dd26(0x1b4))/0x6)+parseInt(_0x41dd26(0x1c0))/0x7+parseInt(_0x41dd26(0x1d8))/0x8*(parseInt(_0x41dd26(0x1b7))/0x9)+-parseInt(_0x41dd26(0x1cb))/0xa*(parseInt(_0x41dd26(0x1aa))/0xb);if(_0x55535c===_0x229699)break;else _0x3352f2['push'](_0x3352f2['shift']());}catch(_0x375ff3){_0x3352f2['push'](_0x3352f2['shift']());}}}(a173_0x514c,0x7a583));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(_0x5dced7,_0x31240c,_0x2f1da6){const _0x40a156=a173_0x49e7,_0x5169f2=await scanLocalSqlQueries(_0x5dced7),_0xd5a0d5=new Map();for(const _0x5bb304 of _0x5169f2){if(_0x2f1da6&&_0x5bb304[_0x40a156(0x1ca)]!==_0x2f1da6)continue;const _0x21f2c4=_0xd5a0d5[_0x40a156(0x1df)](_0x5bb304[_0x40a156(0x1ca)])??[];_0x21f2c4['push'](_0x5bb304),_0xd5a0d5['set'](_0x5bb304['sqlCode'],_0x21f2c4);}if(_0x2f1da6&&!_0xd5a0d5[_0x40a156(0x1b3)](_0x2f1da6))throw CliErrors['validation'](_0x40a156(0x1dd)+_0x2f1da6);const _0x481c4d=[];for(const [_0x52a391,_0x33ce6d]of _0xd5a0d5[_0x40a156(0x1ed)]()){if(_0x33ce6d['length']===0x1){_0x481c4d[_0x40a156(0x1b8)](_0x33ce6d[0x0]);continue;}const _0x2d9062=_0x31240c[_0x40a156(0x1d4)][_0x52a391],_0x6650f1=_0x2d9062?.[_0x40a156(0x1d5)],_0x3840c8=_0x6650f1?_0x33ce6d[_0x40a156(0x1c4)](_0x3c1482=>_0x3c1482['relativePath']!==_0x6650f1):_0x33ce6d;if(_0x2d9062&&_0x3840c8[_0x40a156(0x1c2)]===0x1){_0x481c4d[_0x40a156(0x1b8)](_0x3840c8[0x0]);continue;}throw CliErrors[_0x40a156(0x1d1)](_0x40a156(0x1d9)+_0x52a391+_0x40a156(0x1db));}return _0x481c4d;}export const sqlPush={'service':a173_0x3a5554(0x1be),'command':a173_0x3a5554(0x1b8),'description':'Push\x20local\x20SQL\x20files\x20to\x20remote','risk':a173_0x3a5554(0x1b6),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a173_0x3a5554(0x1b0),'type':a173_0x3a5554(0x1e2),'description':a173_0x3a5554(0x1bd)}],async 'dryRun'(_0x4d9a51){const _0x2ac10f=a173_0x3a5554,_0x355ff7=loadSqlProjectConfig(_0x4d9a51[_0x2ac10f(0x1ab)]),_0x534962=await readSqlLockFile(_0x355ff7[_0x2ac10f(0x1c3)]),{appLock:_0x5cd4d4}=ensureSqlLockScope(_0x534962??createEmptySqlLock(),_0x4d9a51[_0x2ac10f(0x1ab)],_0x355ff7[_0x2ac10f(0x1c8)],_0x2ac10f(0x1b8)),_0x41eb1f=await getTargetSqlQueries(_0x355ff7,_0x5cd4d4,_0x4d9a51[_0x2ac10f(0x1cd)](_0x2ac10f(0x1ee))||undefined),_0x5ede22=[];for(const _0x1dabf5 of _0x41eb1f){const _0xafd3f6=await computeSqlFileHash(_0x1dabf5[_0x2ac10f(0x1b9)]),_0x337c56=_0x5cd4d4[_0x2ac10f(0x1d4)][_0x1dabf5[_0x2ac10f(0x1ca)]],_0x2a92c4=!!_0x337c56&&(_0x337c56[_0x2ac10f(0x1d5)]!==_0x1dabf5[_0x2ac10f(0x1e6)]||!!_0x1dabf5['sqlName']&&_0x337c56['sqlName']!==_0x1dabf5[_0x2ac10f(0x1c5)]);if(!_0x4d9a51['bool'](_0x2ac10f(0x1b0))&&_0x337c56&&_0x337c56[_0x2ac10f(0x1e5)]===_0xafd3f6&&!_0x2a92c4)continue;_0x5ede22[_0x2ac10f(0x1b8)](_0x1dabf5[_0x2ac10f(0x1ca)]);}return{'method':'POST','url':'/smartapi/custom/updateUserCustomSql','body':{'sqlCodes':_0x5ede22,'appCode':_0x4d9a51['appCode']},'description':_0x2ac10f(0x1c9)+_0x5ede22['length']+_0x2ac10f(0x1b1)};},async 'execute'(_0x513fa5){const _0x52608b=a173_0x3a5554,_0x28d014=loadSqlProjectConfig(_0x513fa5[_0x52608b(0x1ab)]),_0x4e1c56=await readSqlLockFile(_0x28d014[_0x52608b(0x1c3)]),{lockData:_0x56a7ee,appLock:_0x726994}=ensureSqlLockScope(_0x4e1c56??createEmptySqlLock(),_0x513fa5[_0x52608b(0x1ab)],_0x28d014[_0x52608b(0x1c8)],_0x52608b(0x1b8)),_0x623f09=await getTargetSqlQueries(_0x28d014,_0x726994,_0x513fa5[_0x52608b(0x1cd)]('sqlcode')||undefined);if(_0x623f09['length']===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x52608b(0x1e7)};const _0x338f14=[],_0xce6020=[],_0x58f05b=[];for(const _0x1740a3 of _0x623f09){const _0x109360=_0x726994[_0x52608b(0x1d4)][_0x1740a3['sqlCode']];if(!_0x109360){_0x58f05b[_0x52608b(0x1b8)]({'sqlCode':_0x1740a3['sqlCode'],'error':_0x52608b(0x1bb)});continue;}try{const _0x562c42=await computeSqlFileHash(_0x1740a3[_0x52608b(0x1b9)]),_0x469979=_0x109360['path']!==_0x1740a3[_0x52608b(0x1e6)]||!!_0x1740a3[_0x52608b(0x1c5)]&&_0x109360[_0x52608b(0x1c5)]!==_0x1740a3[_0x52608b(0x1c5)];if(!_0x513fa5[_0x52608b(0x1ce)]('force')&&_0x109360[_0x52608b(0x1e5)]===_0x562c42&&!_0x469979){_0xce6020[_0x52608b(0x1b8)]({'sqlCode':_0x1740a3[_0x52608b(0x1ca)],'reason':'unchanged'});continue;}if(_0x109360[_0x52608b(0x1ea)]==null){_0x58f05b[_0x52608b(0x1b8)]({'sqlCode':_0x1740a3[_0x52608b(0x1ca)],'error':_0x52608b(0x1e9)});continue;}const _0x1b6255=await readFile(_0x1740a3[_0x52608b(0x1b9)],_0x52608b(0x1cc)),_0x7f3f70=stripLocalSqlMetadata(_0x1b6255,_0x1740a3[_0x52608b(0x1da)]),_0x449e80=_0x1740a3[_0x52608b(0x1c5)]||_0x109360['sqlName'],_0x4a1391=await resolveTargetDbBinding(_0x513fa5[_0x52608b(0x1ab)],_0x1740a3,_0x109360),_0x20df15=await updateSqlQuery({'id':_0x109360[_0x52608b(0x1d7)],'appCode':_0x513fa5[_0x52608b(0x1ab)],'sqlCode':_0x1740a3[_0x52608b(0x1ca)],'sqlName':_0x449e80,'dbId':_0x4a1391[_0x52608b(0x1d3)],'version':_0x109360[_0x52608b(0x1ea)],'sqlContent':_0x7f3f70,'sqlConfig':_0x109360[_0x52608b(0x1c7)]??undefined}),_0x2ba3bd=_0x20df15[_0x52608b(0x1d3)]?await getDbName(_0x513fa5['appCode'],Number(_0x20df15[_0x52608b(0x1d3)]))[_0x52608b(0x1e1)](()=>_0x4a1391[_0x52608b(0x1a9)]):_0x4a1391[_0x52608b(0x1a9)];_0x726994['sqls'][_0x1740a3['sqlCode']]={...buildSqlLockEntry(_0x20df15,_0x7f3f70,_0x562c42,{'dbName':_0x2ba3bd}),'path':_0x1740a3[_0x52608b(0x1e6)],'mode':_0x109360[_0x52608b(0x1da)]},await archivePreviousSqlFileIfNeeded(_0x28d014,_0x109360[_0x52608b(0x1d5)],_0x1740a3['relativePath']),_0x338f14[_0x52608b(0x1b8)]({'sqlCode':_0x1740a3[_0x52608b(0x1ca)],'remoteId':_0x109360[_0x52608b(0x1d7)]});}catch(_0x55f4c8){_0x58f05b['push']({'sqlCode':_0x1740a3[_0x52608b(0x1ca)],'error':_0x55f4c8 instanceof Error?_0x55f4c8[_0x52608b(0x1c1)]:String(_0x55f4c8)});}}return _0x726994[_0x52608b(0x1b2)]=new Date()[_0x52608b(0x1bf)](),await writeSqlLockFile(_0x28d014[_0x52608b(0x1c3)],_0x56a7ee),{'ok':_0x58f05b[_0x52608b(0x1c2)]===0x0,'data':{'pushed':_0x338f14,'skipped':_0xce6020,'failed':_0x58f05b},'message':_0x52608b(0x1b5)+_0x338f14[_0x52608b(0x1c2)]+_0x52608b(0x1ac)+_0xce6020[_0x52608b(0x1c2)]+'\x20skipped,\x20'+_0x58f05b[_0x52608b(0x1c2)]+_0x52608b(0x1bc)};}};function a173_0x514c(){const _0x38eefd=['sqlCode','321130HsUMTm','utf8','str','bool','projectRoot','No\x20database\x20matches\x20local\x20directory\x20\x22','validation','join','dbId','sqls','path','startsWith','remoteId','32CdXaRS','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','mode','.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.','map','Local\x20SQL\x20not\x20found:\x20','5nCzxLQ','get','5253HReqat','catch','boolean','sqlRootDir','2ZgOvsW','hash','relativePath','No\x20local\x20SQL\x20files\x20found.','replace','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','version','isFinite','dbDirectory','entries','sqlcode','exec','dbName','429inKoay','appCode','\x20pushed,\x20','trashDir','1012758CdIYtx','991724vHMmVm','force','\x20SQL\x20file(s)','lastSync','has','4491222WkvTBH','Push\x20complete:\x20','high-risk-write','2078181IIoIvb','push','filePath','\x22\x20for\x20sqlCode\x20','local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first','\x20failed','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','sql','toISOString','4704889YlpyKm','message','length','lockFilePath','filter','sqlName','Local\x20directory\x20\x22','sqlConfig','sqlRoot','Would\x20push\x20'];a173_0x514c=function(){return _0x38eefd;};return a173_0x514c();}async function archivePreviousSqlFileIfNeeded(_0x2c13a7,_0x1b6def,_0x367159){const _0x73eb05=a173_0x3a5554;if(!_0x1b6def||_0x1b6def===_0x367159)return;const _0x708189=join(_0x2c13a7[_0x73eb05(0x1e3)],_0x1b6def);if(!await fileExists(_0x708189))return;const _0x2e97f6=await moveToTrash(_0x2c13a7[_0x73eb05(0x1cf)],_0x2c13a7[_0x73eb05(0x1ad)],_0x708189);await cleanupEmptyDirectories(dirname(_0x708189),_0x2c13a7[_0x73eb05(0x1e3)]),void _0x2e97f6;}async function moveToTrash(_0x1f8d06,_0x2b082c,_0x2940e4){const _0x31983a=a173_0x3a5554,_0x481797=new Date()[_0x31983a(0x1bf)]()[_0x31983a(0x1e8)](/[:.]/g,'-'),_0x5560da=relative(_0x1f8d06,_0x2940e4),_0x4b44e4=join(_0x2b082c,_0x481797,_0x5560da);return await mkdir(dirname(_0x4b44e4),{'recursive':!![]}),await rename(_0x2940e4,_0x4b44e4),_0x4b44e4;}async function cleanupEmptyDirectories(_0x58fd8b,_0x4f0d6e){const _0x1f93f6=a173_0x3a5554;let _0x286be4=resolve(_0x58fd8b);const _0x2130ae=resolve(_0x4f0d6e);while(_0x286be4[_0x1f93f6(0x1d6)](''+_0x2130ae+sep)||_0x286be4===_0x2130ae){if(_0x286be4===_0x2130ae)return;try{const _0x1c33bf=await readdir(_0x286be4);if(_0x1c33bf[_0x1f93f6(0x1c2)]>0x0)return;await rmdir(_0x286be4);}catch{return;}_0x286be4=dirname(_0x286be4);}}async function resolveTargetDbBinding(_0x13ee88,_0x540016,_0x2969c4){const _0x3bbcda=a173_0x3a5554,_0x20c5ab=_0x540016[_0x3bbcda(0x1ec)];if(!_0x20c5ab)return{'dbId':_0x2969c4[_0x3bbcda(0x1d3)],'dbName':_0x2969c4['dbName']};const _0x3c1423=buildDbDirectoryName(_0x2969c4[_0x3bbcda(0x1a9)],_0x2969c4[_0x3bbcda(0x1d3)]);if(_0x20c5ab===_0x3c1423)return{'dbId':_0x2969c4[_0x3bbcda(0x1d3)],'dbName':_0x2969c4['dbName']};const _0x68cef=parseExplicitDbDirectory(_0x20c5ab);if(_0x68cef!=null)return{'dbId':_0x68cef,'dbName':await getDbName(_0x13ee88,_0x68cef)[_0x3bbcda(0x1e1)](()=>undefined)};const _0x30d5df=await listDatabases(_0x13ee88),_0x529b02=_0x30d5df['filter'](_0x76b1e7=>buildDbDirectoryName(_0x76b1e7[_0x3bbcda(0x1a9)],_0x76b1e7['dbId'])===_0x20c5ab);if(_0x529b02[_0x3bbcda(0x1c2)]===0x1)return{'dbId':_0x529b02[0x0][_0x3bbcda(0x1d3)],'dbName':_0x529b02[0x0]['dbName']};if(_0x529b02['length']===0x0)throw CliErrors[_0x3bbcda(0x1d1)](_0x3bbcda(0x1d0)+_0x20c5ab+_0x3bbcda(0x1ba)+_0x540016[_0x3bbcda(0x1ca)]+'.');const _0xce3768=_0x529b02[_0x3bbcda(0x1dc)](_0xf95f7f=>_0xf95f7f['dbName']+'\x20('+_0xf95f7f[_0x3bbcda(0x1d3)]+')')[_0x3bbcda(0x1d2)](',\x20');throw CliErrors[_0x3bbcda(0x1d1)](_0x3bbcda(0x1c6)+_0x20c5ab+'\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20'+_0x540016['sqlCode']+':\x20'+_0xce3768);}function parseExplicitDbDirectory(_0x3eae12){const _0x296d64=a173_0x3a5554,_0xb5bc64=/^db-(\d+)$/[_0x296d64(0x1a8)](_0x3eae12);if(!_0xb5bc64)return null;const _0x585186=Number(_0xb5bc64[0x1]);return Number[_0x296d64(0x1eb)](_0x585186)&&_0x585186>0x0?_0x585186:null;}
1
+ const a173_0x1839b9=a173_0x4ab2;(function(_0x4e4a00,_0x176912){const _0x54eb03=a173_0x4ab2,_0x2f2e2a=_0x4e4a00();while(!![]){try{const _0x20de16=-parseInt(_0x54eb03(0x1b5))/0x1+-parseInt(_0x54eb03(0x1b6))/0x2*(-parseInt(_0x54eb03(0x1a8))/0x3)+-parseInt(_0x54eb03(0x1a9))/0x4+parseInt(_0x54eb03(0x1c5))/0x5+parseInt(_0x54eb03(0x1b9))/0x6+parseInt(_0x54eb03(0x1ae))/0x7+parseInt(_0x54eb03(0x1ba))/0x8;if(_0x20de16===_0x176912)break;else _0x2f2e2a['push'](_0x2f2e2a['shift']());}catch(_0x500938){_0x2f2e2a['push'](_0x2f2e2a['shift']());}}}(a173_0x4d07,0xb11ba));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(_0x49c6a0,_0x49c781,_0x16ed82){const _0x402b79=a173_0x4ab2,_0xc1d513=await scanLocalSqlQueries(_0x49c6a0),_0x2ed495=new Map();for(const _0x1844bc of _0xc1d513){if(_0x16ed82&&_0x1844bc[_0x402b79(0x1d2)]!==_0x16ed82)continue;const _0x1b0e3f=_0x2ed495['get'](_0x1844bc['sqlCode'])??[];_0x1b0e3f[_0x402b79(0x1c7)](_0x1844bc),_0x2ed495[_0x402b79(0x1b1)](_0x1844bc[_0x402b79(0x1d2)],_0x1b0e3f);}if(_0x16ed82&&!_0x2ed495[_0x402b79(0x1bd)](_0x16ed82))throw CliErrors[_0x402b79(0x1df)](_0x402b79(0x1b8)+_0x16ed82);const _0x13ed8a=[];for(const [_0x16c361,_0x154b48]of _0x2ed495[_0x402b79(0x1de)]()){if(_0x154b48['length']===0x1){_0x13ed8a[_0x402b79(0x1c7)](_0x154b48[0x0]);continue;}const _0x46dbaf=_0x49c781['sqls'][_0x16c361],_0x3d2f13=_0x46dbaf?.[_0x402b79(0x1cf)],_0x34beb9=_0x3d2f13?_0x154b48[_0x402b79(0x1d5)](_0x4828c2=>_0x4828c2[_0x402b79(0x1dc)]!==_0x3d2f13):_0x154b48;if(_0x46dbaf&&_0x34beb9['length']===0x1){_0x13ed8a['push'](_0x34beb9[0x0]);continue;}throw CliErrors['validation'](_0x402b79(0x1bf)+_0x16c361+'.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.');}return _0x13ed8a;}export const sqlPush={'service':a173_0x1839b9(0x1dd),'command':a173_0x1839b9(0x1c7),'description':a173_0x1839b9(0x1d6),'risk':a173_0x1839b9(0x1c4),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a173_0x1839b9(0x1c6),'type':a173_0x1839b9(0x1cb),'description':a173_0x1839b9(0x1ab)}],async 'dryRun'(_0x51006e){const _0x579cfd=a173_0x1839b9,_0x4242c0=loadSqlProjectConfig(_0x51006e[_0x579cfd(0x1e5)]),_0x9bf743=await readSqlLockFile(_0x4242c0[_0x579cfd(0x1da)]),{appLock:_0x546f71}=ensureSqlLockScope(_0x9bf743??createEmptySqlLock(),_0x51006e[_0x579cfd(0x1e5)],_0x4242c0[_0x579cfd(0x1c9)],_0x579cfd(0x1c7)),_0x16c233=await getTargetSqlQueries(_0x4242c0,_0x546f71,_0x51006e['str'](_0x579cfd(0x1c1))||undefined),_0x51851c=[];for(const _0x32dc7a of _0x16c233){const _0x41e885=await computeSqlFileHash(_0x32dc7a['filePath']),_0x3bae87=_0x546f71[_0x579cfd(0x1ce)][_0x32dc7a[_0x579cfd(0x1d2)]],_0x19405c=!!_0x3bae87&&(_0x3bae87[_0x579cfd(0x1cf)]!==_0x32dc7a[_0x579cfd(0x1dc)]||!!_0x32dc7a[_0x579cfd(0x1d9)]&&_0x3bae87['sqlName']!==_0x32dc7a[_0x579cfd(0x1d9)]);if(!_0x51006e[_0x579cfd(0x1db)]('force')&&_0x3bae87&&_0x3bae87['hash']===_0x41e885&&!_0x19405c)continue;_0x51851c[_0x579cfd(0x1c7)](_0x32dc7a[_0x579cfd(0x1d2)]);}return{'method':_0x579cfd(0x1af),'url':_0x579cfd(0x1ca),'body':{'sqlCodes':_0x51851c,'appCode':_0x51006e[_0x579cfd(0x1e5)]},'description':_0x579cfd(0x1e8)+_0x51851c[_0x579cfd(0x1e9)]+_0x579cfd(0x1d1)};},async 'execute'(_0x5ad2e3){const _0x5be17a=a173_0x1839b9,_0x15efec=loadSqlProjectConfig(_0x5ad2e3[_0x5be17a(0x1e5)]),_0x1c6de3=await readSqlLockFile(_0x15efec['lockFilePath']),{lockData:_0x203a26,appLock:_0x751eb9}=ensureSqlLockScope(_0x1c6de3??createEmptySqlLock(),_0x5ad2e3[_0x5be17a(0x1e5)],_0x15efec['sqlRoot'],_0x5be17a(0x1c7)),_0x357842=await getTargetSqlQueries(_0x15efec,_0x751eb9,_0x5ad2e3[_0x5be17a(0x1ac)](_0x5be17a(0x1c1))||undefined);if(_0x357842[_0x5be17a(0x1e9)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x5be17a(0x1d7)};const _0x1f2c08=[],_0x21aa2e=[],_0x4074b7=[];for(const _0x4df687 of _0x357842){const _0x13e3cc=_0x751eb9[_0x5be17a(0x1ce)][_0x4df687[_0x5be17a(0x1d2)]];if(!_0x13e3cc){_0x4074b7[_0x5be17a(0x1c7)]({'sqlCode':_0x4df687[_0x5be17a(0x1d2)],'error':'local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first'});continue;}try{const _0x231d9d=await computeSqlFileHash(_0x4df687[_0x5be17a(0x1e6)]),_0x396737=_0x13e3cc[_0x5be17a(0x1cf)]!==_0x4df687['relativePath']||!!_0x4df687[_0x5be17a(0x1d9)]&&_0x13e3cc[_0x5be17a(0x1d9)]!==_0x4df687[_0x5be17a(0x1d9)];if(!_0x5ad2e3[_0x5be17a(0x1db)](_0x5be17a(0x1c6))&&_0x13e3cc[_0x5be17a(0x1e0)]===_0x231d9d&&!_0x396737){_0x21aa2e['push']({'sqlCode':_0x4df687[_0x5be17a(0x1d2)],'reason':'unchanged'});continue;}if(_0x13e3cc[_0x5be17a(0x1e7)]==null){_0x4074b7[_0x5be17a(0x1c7)]({'sqlCode':_0x4df687[_0x5be17a(0x1d2)],'error':_0x5be17a(0x1b3)});continue;}const _0x4d9e38=await readFile(_0x4df687[_0x5be17a(0x1e6)],_0x5be17a(0x1d3)),_0x1d1f7e=stripLocalSqlMetadata(_0x4d9e38,_0x4df687[_0x5be17a(0x1c2)]),_0x549d61=_0x4df687['sqlName']||_0x13e3cc[_0x5be17a(0x1d9)],_0x4dc4bd=await resolveTargetDbBinding(_0x5ad2e3[_0x5be17a(0x1e5)],_0x4df687,_0x13e3cc),_0x332976=await updateSqlQuery({'id':_0x13e3cc['remoteId'],'appCode':_0x5ad2e3[_0x5be17a(0x1e5)],'sqlCode':_0x4df687['sqlCode'],'sqlName':_0x549d61,'dbId':_0x4dc4bd['dbId'],'version':_0x13e3cc[_0x5be17a(0x1e7)],'sqlContent':_0x1d1f7e,'sqlConfig':_0x13e3cc[_0x5be17a(0x1e4)]??undefined}),_0x1b439d=_0x332976[_0x5be17a(0x1c3)]?await getDbName(_0x5ad2e3[_0x5be17a(0x1e5)],Number(_0x332976[_0x5be17a(0x1c3)]))[_0x5be17a(0x1e2)](()=>_0x4dc4bd[_0x5be17a(0x1be)]):_0x4dc4bd[_0x5be17a(0x1be)];_0x751eb9[_0x5be17a(0x1ce)][_0x4df687['sqlCode']]={...buildSqlLockEntry(_0x332976,_0x1d1f7e,_0x231d9d,{'dbName':_0x1b439d}),'path':_0x4df687[_0x5be17a(0x1dc)],'mode':_0x13e3cc['mode']},await archivePreviousSqlFileIfNeeded(_0x15efec,_0x13e3cc['path'],_0x4df687[_0x5be17a(0x1dc)]),_0x1f2c08['push']({'sqlCode':_0x4df687[_0x5be17a(0x1d2)],'remoteId':_0x13e3cc['remoteId']});}catch(_0x7265e9){_0x4074b7[_0x5be17a(0x1c7)]({'sqlCode':_0x4df687[_0x5be17a(0x1d2)],'error':_0x7265e9 instanceof Error?_0x7265e9[_0x5be17a(0x1b2)]:String(_0x7265e9)});}}return _0x751eb9[_0x5be17a(0x1b0)]=new Date()['toISOString'](),await writeSqlLockFile(_0x15efec['lockFilePath'],_0x203a26),{'ok':_0x4074b7[_0x5be17a(0x1e9)]===0x0,'data':{'pushed':_0x1f2c08,'skipped':_0x21aa2e,'failed':_0x4074b7},'message':_0x5be17a(0x1cc)+_0x1f2c08[_0x5be17a(0x1e9)]+_0x5be17a(0x1d4)+_0x21aa2e[_0x5be17a(0x1e9)]+_0x5be17a(0x1b7)+_0x4074b7['length']+_0x5be17a(0x1c8)};}};function a173_0x4d07(){const _0x2354a8=['990026dmbdrj','\x20skipped,\x20','Local\x20SQL\x20not\x20found:\x20','2188098GkqNjS','9325880bqIbts','isFinite','join','has','dbName','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','\x22\x20for\x20sqlCode\x20','sqlcode','mode','dbId','high-risk-write','127310lHhrpM','force','push','\x20failed','sqlRoot','/smartapi/custom/updateUserCustomSql','boolean','Push\x20complete:\x20','toISOString','sqls','path','replace','\x20SQL\x20file(s)','sqlCode','utf8','\x20pushed,\x20','filter','Push\x20local\x20SQL\x20files\x20to\x20remote','No\x20local\x20SQL\x20files\x20found.','sqlRootDir','sqlName','lockFilePath','bool','relativePath','sql','entries','validation','hash','trashDir','catch','No\x20database\x20matches\x20local\x20directory\x20\x22','sqlConfig','appCode','filePath','version','Would\x20push\x20','length','exec','3zJdbxT','3139020vteTOG','startsWith','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','str','\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20','6095152CiEhxC','POST','lastSync','set','message','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','projectRoot','1411440VKboer'];a173_0x4d07=function(){return _0x2354a8;};return a173_0x4d07();}function a173_0x4ab2(_0x46573c,_0x5401ec){_0x46573c=_0x46573c-0x1a8;const _0x4d07a0=a173_0x4d07();let _0x4ab24b=_0x4d07a0[_0x46573c];return _0x4ab24b;}async function archivePreviousSqlFileIfNeeded(_0x1d9705,_0x17611c,_0x4c3bc1){const _0x59aa34=a173_0x1839b9;if(!_0x17611c||_0x17611c===_0x4c3bc1)return;const _0x585135=join(_0x1d9705['sqlRootDir'],_0x17611c);if(!await fileExists(_0x585135))return;const _0x191caa=await moveToTrash(_0x1d9705[_0x59aa34(0x1b4)],_0x1d9705[_0x59aa34(0x1e1)],_0x585135);await cleanupEmptyDirectories(dirname(_0x585135),_0x1d9705[_0x59aa34(0x1d8)]),void _0x191caa;}async function moveToTrash(_0x22710a,_0x3e81a4,_0x21176b){const _0x3ee9b8=a173_0x1839b9,_0x59b0c4=new Date()[_0x3ee9b8(0x1cd)]()[_0x3ee9b8(0x1d0)](/[:.]/g,'-'),_0xeb372d=relative(_0x22710a,_0x21176b),_0x9b88cc=join(_0x3e81a4,_0x59b0c4,_0xeb372d);return await mkdir(dirname(_0x9b88cc),{'recursive':!![]}),await rename(_0x21176b,_0x9b88cc),_0x9b88cc;}async function cleanupEmptyDirectories(_0x3eab05,_0x19adf1){const _0x109e45=a173_0x1839b9;let _0x2f1e4e=resolve(_0x3eab05);const _0x145892=resolve(_0x19adf1);while(_0x2f1e4e[_0x109e45(0x1aa)](''+_0x145892+sep)||_0x2f1e4e===_0x145892){if(_0x2f1e4e===_0x145892)return;try{const _0x53f95d=await readdir(_0x2f1e4e);if(_0x53f95d[_0x109e45(0x1e9)]>0x0)return;await rmdir(_0x2f1e4e);}catch{return;}_0x2f1e4e=dirname(_0x2f1e4e);}}async function resolveTargetDbBinding(_0x3188ef,_0x4ad894,_0x34202b){const _0x1de28c=a173_0x1839b9,_0x440ac4=_0x4ad894['dbDirectory'];if(!_0x440ac4)return{'dbId':_0x34202b[_0x1de28c(0x1c3)],'dbName':_0x34202b[_0x1de28c(0x1be)]};const _0x3b815c=buildDbDirectoryName(_0x34202b[_0x1de28c(0x1be)],_0x34202b['dbId']);if(_0x440ac4===_0x3b815c)return{'dbId':_0x34202b['dbId'],'dbName':_0x34202b[_0x1de28c(0x1be)]};const _0x52375d=parseExplicitDbDirectory(_0x440ac4);if(_0x52375d!=null)return{'dbId':_0x52375d,'dbName':await getDbName(_0x3188ef,_0x52375d)['catch'](()=>undefined)};const _0x48f845=await listDatabases(_0x3188ef),_0x4596f8=_0x48f845[_0x1de28c(0x1d5)](_0x1d6783=>buildDbDirectoryName(_0x1d6783['dbName'],_0x1d6783[_0x1de28c(0x1c3)])===_0x440ac4);if(_0x4596f8[_0x1de28c(0x1e9)]===0x1)return{'dbId':_0x4596f8[0x0][_0x1de28c(0x1c3)],'dbName':_0x4596f8[0x0][_0x1de28c(0x1be)]};if(_0x4596f8['length']===0x0)throw CliErrors['validation'](_0x1de28c(0x1e3)+_0x440ac4+_0x1de28c(0x1c0)+_0x4ad894[_0x1de28c(0x1d2)]+'.');const _0x5ebc6a=_0x4596f8['map'](_0xb53095=>_0xb53095[_0x1de28c(0x1be)]+'\x20('+_0xb53095['dbId']+')')[_0x1de28c(0x1bc)](',\x20');throw CliErrors[_0x1de28c(0x1df)]('Local\x20directory\x20\x22'+_0x440ac4+_0x1de28c(0x1ad)+_0x4ad894['sqlCode']+':\x20'+_0x5ebc6a);}function parseExplicitDbDirectory(_0x571bdd){const _0x58afc8=a173_0x1839b9,_0xe4a8b7=/^db-(\d+)$/[_0x58afc8(0x1ea)](_0x571bdd);if(!_0xe4a8b7)return null;const _0x153dca=Number(_0xe4a8b7[0x1]);return Number[_0x58afc8(0x1bb)](_0x153dca)&&_0x153dca>0x0?_0x153dca:null;}
@@ -1 +1 @@
1
- const a174_0x2e39d3=a174_0x3231;(function(_0x436e71,_0x2d17c8){const _0x72b908=a174_0x3231,_0x72a691=_0x436e71();while(!![]){try{const _0x11c91e=parseInt(_0x72b908(0x1fa))/0x1+parseInt(_0x72b908(0x1fe))/0x2+parseInt(_0x72b908(0x1f0))/0x3*(parseInt(_0x72b908(0x1f7))/0x4)+parseInt(_0x72b908(0x202))/0x5+parseInt(_0x72b908(0x1f8))/0x6+-parseInt(_0x72b908(0x1ff))/0x7*(parseInt(_0x72b908(0x205))/0x8)+-parseInt(_0x72b908(0x1f9))/0x9*(parseInt(_0x72b908(0x1fc))/0xa);if(_0x11c91e===_0x2d17c8)break;else _0x72a691['push'](_0x72a691['shift']());}catch(_0x25a643){_0x72a691['push'](_0x72a691['shift']());}}}(a174_0x5e50,0x9812d));function a174_0x3231(_0x4f46a2,_0x30b9a6){_0x4f46a2=_0x4f46a2-0x1f0;const _0x5e5003=a174_0x5e50();let _0x323135=_0x5e5003[_0x4f46a2];return _0x323135;}import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const SQL_SAVE_DEPRECATED_HINT=[a174_0x2e39d3(0x1fd),'Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.','Update\x20existing\x20SQL\x20by\x20editing\x20the\x20synced\x20file\x20under\x20`.rabetbase/sql/<appCode>/<dbName|db-<id>>/`\x20and\x20then\x20running\x20`rabetbase\x20sql\x20push\x20--sqlcode\x20<code>\x20--yes`.']['join']('\x0a');function a174_0x5e50(){const _0x2fb015=['sql','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','1381475HXWktz','validation','description','592DVCcek','32505usfkOa','save','file','Path\x20to\x20the\x20SQL\x20file','write','sqlname','SQL\x20query\x20display\x20name','344IpisFK','1097904scZmvG','5799393igYavC','614025rzslVE','string','20wfGqfD','`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.','1774362zHevXP','92764GTXDDr'];a174_0x5e50=function(){return _0x2fb015;};return a174_0x5e50();}export const sqlSave={'service':a174_0x2e39d3(0x200),'command':a174_0x2e39d3(0x1f1),'description':'Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','risk':a174_0x2e39d3(0x1f4),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a174_0x2e39d3(0x1f2),'type':a174_0x2e39d3(0x1fb),'required':!![],'description':a174_0x2e39d3(0x1f3)},SQLCODE_FLAG_OPTIONAL,{'name':a174_0x2e39d3(0x1f5),'type':a174_0x2e39d3(0x1fb),'description':a174_0x2e39d3(0x1f6)},{'name':'db','type':'string','description':a174_0x2e39d3(0x201)},{'name':a174_0x2e39d3(0x204),'type':a174_0x2e39d3(0x1fb),'description':'Query\x20description'}],async 'validate'(){const _0xc3b172=a174_0x2e39d3;throw CliErrors[_0xc3b172(0x203)](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){const _0xb0c4cd=a174_0x2e39d3;throw CliErrors[_0xb0c4cd(0x203)](SQL_SAVE_DEPRECATED_HINT);}};
1
+ const a174_0x226cf1=a174_0x12b6;(function(_0x5a8760,_0x78c429){const _0x46da75=a174_0x12b6,_0x252600=_0x5a8760();while(!![]){try{const _0x19f2aa=-parseInt(_0x46da75(0x173))/0x1*(-parseInt(_0x46da75(0x183))/0x2)+parseInt(_0x46da75(0x17d))/0x3*(-parseInt(_0x46da75(0x180))/0x4)+-parseInt(_0x46da75(0x170))/0x5+parseInt(_0x46da75(0x176))/0x6*(parseInt(_0x46da75(0x184))/0x7)+parseInt(_0x46da75(0x182))/0x8+parseInt(_0x46da75(0x178))/0x9+-parseInt(_0x46da75(0x172))/0xa;if(_0x19f2aa===_0x78c429)break;else _0x252600['push'](_0x252600['shift']());}catch(_0x50c881){_0x252600['push'](_0x252600['shift']());}}}(a174_0x28ad,0x24826));function a174_0x28ad(){const _0x13c164=['write','string','786279CPodxr','Query\x20description','join','4BHaOkN','file','2325976YbMyVT','2yGZvit','22162EXDitL','sql','`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.','737435giBhag','SQL\x20query\x20display\x20name','2197390CWtOrV','163019fsnUGf','sqlname','validation','396rhsxou','Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.','1045251Mtvtbi','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`.','Path\x20to\x20the\x20SQL\x20file'];a174_0x28ad=function(){return _0x13c164;};return a174_0x28ad();}import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a174_0x12b6(_0x2bb56d,_0x66edcb){_0x2bb56d=_0x2bb56d-0x16f;const _0x28ad08=a174_0x28ad();let _0x12b6a2=_0x28ad08[_0x2bb56d];return _0x12b6a2;}const SQL_SAVE_DEPRECATED_HINT=[a174_0x226cf1(0x16f),a174_0x226cf1(0x177),a174_0x226cf1(0x179)][a174_0x226cf1(0x17f)]('\x0a');export const sqlSave={'service':a174_0x226cf1(0x185),'command':'save','description':'Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','risk':a174_0x226cf1(0x17b),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a174_0x226cf1(0x181),'type':a174_0x226cf1(0x17c),'required':!![],'description':a174_0x226cf1(0x17a)},SQLCODE_FLAG_OPTIONAL,{'name':a174_0x226cf1(0x174),'type':'string','description':a174_0x226cf1(0x171)},{'name':'db','type':a174_0x226cf1(0x17c),'description':'Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)'},{'name':'description','type':'string','description':a174_0x226cf1(0x17e)}],async 'validate'(){const _0x457aa4=a174_0x226cf1;throw CliErrors[_0x457aa4(0x175)](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){const _0x4f82e5=a174_0x226cf1;throw CliErrors[_0x4f82e5(0x175)](SQL_SAVE_DEPRECATED_HINT);}};
@@ -1 +1 @@
1
- const a175_0x1bc82f=a175_0x43c9;(function(_0xacf104,_0x56edc9){const _0xa56629=a175_0x43c9,_0x446145=_0xacf104();while(!![]){try{const _0x28e78a=-parseInt(_0xa56629(0x1de))/0x1+-parseInt(_0xa56629(0x1dd))/0x2+-parseInt(_0xa56629(0x1e5))/0x3+-parseInt(_0xa56629(0x1e4))/0x4+-parseInt(_0xa56629(0x1f5))/0x5+-parseInt(_0xa56629(0x1f2))/0x6+parseInt(_0xa56629(0x1df))/0x7;if(_0x28e78a===_0x56edc9)break;else _0x446145['push'](_0x446145['shift']());}catch(_0x233263){_0x446145['push'](_0x446145['shift']());}}}(a175_0xe647,0x410ad));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=a175_0x1bc82f(0x1f7);export function buildSqlLockEntry(_0xc3a6c2,_0x275150,_0x34bec1,_0x6de0de){const _0x39a1e0=a175_0x1bc82f,_0x1b8391=detectSqlMode(_0x275150);return{'path':buildSqlRelativePath(_0xc3a6c2[_0x39a1e0(0x1f3)],_0xc3a6c2[_0x39a1e0(0x1e6)],_0x6de0de?.[_0x39a1e0(0x1e0)],_0x1b8391,_0xc3a6c2[_0x39a1e0(0x1f0)]),'hash':_0x34bec1,'remoteId':_0xc3a6c2['id'],'version':_0xc3a6c2['version'],'dbId':Number(_0xc3a6c2[_0x39a1e0(0x1f0)]),'dbName':_0x6de0de?.[_0x39a1e0(0x1e0)],'sqlName':_0xc3a6c2[_0x39a1e0(0x1e6)],'sqlConfig':_0xc3a6c2[_0x39a1e0(0x1d2)]??undefined,'mode':_0x1b8391};}export function cloneSqlLockData(_0x4da7ae){const _0x5e58ec=a175_0x1bc82f;return{'apps':Object[_0x5e58ec(0x1ef)](Object[_0x5e58ec(0x1e1)](_0x4da7ae[_0x5e58ec(0x1e7)])[_0x5e58ec(0x1d7)](([_0x4f8a95,_0xa51dd5])=>[_0x4f8a95,{'sqlRoot':_0xa51dd5[_0x5e58ec(0x1db)],'lastSync':_0xa51dd5[_0x5e58ec(0x1d0)],'sqls':{..._0xa51dd5[_0x5e58ec(0x1eb)]}}]))};}export function ensureRemoteSqlContent(_0x4d6f11){return _0x4d6f11['sqlContent']??'';}export function buildLocalSqlFileContent(_0x15ba21,_0x20454c,_0x2216a7){const _0xd03eb8=a175_0x1bc82f,_0x194c6a=_0x2216a7?.[_0xd03eb8(0x1ed)]??detectSqlMode(_0x20454c),_0x44c2b1=stripLocalSqlMetadata(_0x20454c,_0x194c6a)[_0xd03eb8(0x1ea)](),_0x32b948=[...buildMetadataHeaderLines({'sqlCode':_0x15ba21[_0xd03eb8(0x1f3)],'sqlName':_0x15ba21['sqlName'],'dbId':_0x15ba21['dbId'],'dbName':_0x2216a7?.[_0xd03eb8(0x1e0)],'mode':_0x194c6a,'syncedAt':_0x2216a7?.[_0xd03eb8(0x1f1)],'description':_0x2216a7?.[_0xd03eb8(0x1d1)]},_0x194c6a),'',_0x44c2b1],_0x1e99b0=_0x32b948[_0xd03eb8(0x1e2)]('\x0a');return _0x1e99b0['endsWith']('\x0a')?_0x1e99b0:_0x1e99b0+'\x0a';}export function stripLocalSqlMetadata(_0x111f07,_0x405bf2){const _0x2ff39c=a175_0x1bc82f,_0xf50fe9=_0x111f07[_0x2ff39c(0x1d8)](/\r\n/g,'\x0a')[_0x2ff39c(0x1d4)]('\x0a'),_0x5ec0c4=[];let _0x6bdd70=0x0;if(_0x405bf2===_0x2ff39c(0x1cf))while(_0x6bdd70<_0xf50fe9[_0x2ff39c(0x1d9)]){const _0x5813ae=_0xf50fe9[_0x6bdd70]??'';if(/^\s*<!--\s*@lovrabet\./[_0x2ff39c(0x1dc)](_0x5813ae)){_0x6bdd70++;continue;}if(_0x5813ae['trim']()===''&&_0x6bdd70>0x0){_0x6bdd70++;continue;}break;}else while(_0x6bdd70<_0xf50fe9['length']){const _0x64db5d=_0xf50fe9[_0x6bdd70]??'';if(/^\s*--\s*@lovrabet\./[_0x2ff39c(0x1dc)](_0x64db5d)){_0x6bdd70++;continue;}if(_0x64db5d['trim']()===''&&_0x6bdd70>0x0){_0x6bdd70++;continue;}break;}for(;_0x6bdd70<_0xf50fe9[_0x2ff39c(0x1d9)];_0x6bdd70++){_0x5ec0c4[_0x2ff39c(0x1f6)](_0xf50fe9[_0x6bdd70]);}return _0x5ec0c4['join']('\x0a')['trimStart']();}function a175_0xe647(){const _0x41a304=['424355uvxgDy','push','.rabetbase/sql','mybatisXml','lastSync','description','sqlConfig','\x20-->','split','toLowerCase','path','map','replace','length','filter','sqlRoot','test','627070JPReOR','389632cBxnZu','13690439aNsZcu','dbName','entries','join','yes','719668zRZYid','1061766ugldOr','sqlName','apps','includes','\x20[y/N]\x20','trim','sqls','stdin','mode','<!--\x20@lovrabet.','fromEntries','dbId','syncedAt','2204922bhfbnN','sqlCode','close'];a175_0xe647=function(){return _0x41a304;};return a175_0xe647();}export function resolveSqlMode(_0x203010,_0x545e64){const _0x5aeb5f=a175_0x1bc82f;if(_0x545e64?.['mode'])return _0x545e64[_0x5aeb5f(0x1ed)];return detectSqlMode(_0x203010);}export function resolveSqlFileName(_0x5f0f35,_0x58d439,_0x46a089){const _0x56bfd1=a175_0x1bc82f;if(_0x46a089?.[_0x56bfd1(0x1d6)])return _0x46a089[_0x56bfd1(0x1d6)];if(_0x46a089?.[_0x56bfd1(0x1e6)]||_0x46a089?.['dbName'])return buildSqlRelativePath(_0x5f0f35,_0x46a089?.[_0x56bfd1(0x1e6)],_0x46a089?.[_0x56bfd1(0x1e0)],resolveSqlMode(_0x58d439,_0x46a089),_0x46a089?.[_0x56bfd1(0x1f0)]);return buildDefaultSqlFileName(_0x5f0f35,resolveSqlMode(_0x58d439,_0x46a089));}export function resolveSqlLocalDir(_0x309378,_0x157b5b){return join(_0x309378,SQL_LOCAL_REL_DIR,_0x157b5b);}function a175_0x43c9(_0x30427f,_0x1e27e9){_0x30427f=_0x30427f-0x1cf;const _0xe6476e=a175_0xe647();let _0x43c94a=_0xe6476e[_0x30427f];return _0x43c94a;}export async function confirmForceOverwrite(_0x20f625){const _0x111457=a175_0x1bc82f,_0x37ed56=createInterface({'input':process[_0x111457(0x1ec)],'output':process['stderr']}),_0x2e09f4=await new Promise(_0x174be6=>{const _0x7304cf=_0x111457;_0x37ed56['question'](_0x20f625+_0x7304cf(0x1e9),_0x174be6);});return _0x37ed56[_0x111457(0x1f4)](),['y',_0x111457(0x1e3)][_0x111457(0x1e8)](_0x2e09f4[_0x111457(0x1ea)]()[_0x111457(0x1d5)]());}export function findSqlLockScope(_0x316bbf,_0x500499){return _0x316bbf['apps'][_0x500499];}function buildMetadataHeaderLines(_0x5b8414,_0x549951){const _0x52434c=a175_0x1bc82f,_0x4f9887=[[_0x52434c(0x1f3),_0x5b8414['sqlCode']],[_0x52434c(0x1e6),_0x5b8414[_0x52434c(0x1e6)]],[_0x52434c(0x1f0),_0x5b8414[_0x52434c(0x1f0)]],['dbName',_0x5b8414['dbName']],[_0x52434c(0x1ed),_0x5b8414['mode']],[_0x52434c(0x1f1),_0x5b8414[_0x52434c(0x1f1)]],[_0x52434c(0x1d1),_0x5b8414['description']]];if(_0x549951===_0x52434c(0x1cf))return _0x4f9887[_0x52434c(0x1da)](([,_0x26813c])=>_0x26813c!==undefined&&_0x26813c!==null&&String(_0x26813c)['trim']()!=='')[_0x52434c(0x1d7)](([_0x19b76c,_0x5807e1])=>_0x52434c(0x1ee)+_0x19b76c+':\x20'+String(_0x5807e1)+_0x52434c(0x1d3));return _0x4f9887[_0x52434c(0x1da)](([,_0x222a10])=>_0x222a10!==undefined&&_0x222a10!==null&&String(_0x222a10)[_0x52434c(0x1ea)]()!=='')['map'](([_0x527c24,_0x196958])=>'--\x20@lovrabet.'+_0x527c24+':\x20'+String(_0x196958));}
1
+ const a175_0x454287=a175_0x401d;(function(_0x4cfd46,_0x109656){const _0x147fa3=a175_0x401d,_0x1ec9c0=_0x4cfd46();while(!![]){try{const _0x1f6cf1=-parseInt(_0x147fa3(0x79))/0x1+-parseInt(_0x147fa3(0x66))/0x2*(parseInt(_0x147fa3(0x8f))/0x3)+-parseInt(_0x147fa3(0x80))/0x4*(parseInt(_0x147fa3(0x91))/0x5)+-parseInt(_0x147fa3(0x81))/0x6+parseInt(_0x147fa3(0x72))/0x7+parseInt(_0x147fa3(0x77))/0x8+parseInt(_0x147fa3(0x76))/0x9;if(_0x1f6cf1===_0x109656)break;else _0x1ec9c0['push'](_0x1ec9c0['shift']());}catch(_0x161f12){_0x1ec9c0['push'](_0x1ec9c0['shift']());}}}(a175_0x3001,0xc9918));function a175_0x401d(_0x21c90e,_0x574445){_0x21c90e=_0x21c90e-0x65;const _0x3001d7=a175_0x3001();let _0x401d4a=_0x3001d7[_0x21c90e];return _0x401d4a;}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=a175_0x454287(0x73);export function buildSqlLockEntry(_0x2d64f8,_0x3850b3,_0x2b22e8,_0x571fc7){const _0x4f9c51=a175_0x454287,_0xebf4d9=detectSqlMode(_0x3850b3);return{'path':buildSqlRelativePath(_0x2d64f8[_0x4f9c51(0x83)],_0x2d64f8['sqlName'],_0x571fc7?.[_0x4f9c51(0x69)],_0xebf4d9,_0x2d64f8[_0x4f9c51(0x6f)]),'hash':_0x2b22e8,'remoteId':_0x2d64f8['id'],'version':_0x2d64f8[_0x4f9c51(0x87)],'dbId':Number(_0x2d64f8[_0x4f9c51(0x6f)]),'dbName':_0x571fc7?.[_0x4f9c51(0x69)],'sqlName':_0x2d64f8['sqlName'],'sqlConfig':_0x2d64f8[_0x4f9c51(0x6c)]??undefined,'mode':_0xebf4d9};}export function cloneSqlLockData(_0x2a2845){const _0x434b19=a175_0x454287;return{'apps':Object[_0x434b19(0x75)](Object[_0x434b19(0x84)](_0x2a2845['apps'])[_0x434b19(0x74)](([_0x1506b9,_0x5d9a3c])=>[_0x1506b9,{'sqlRoot':_0x5d9a3c['sqlRoot'],'lastSync':_0x5d9a3c[_0x434b19(0x8b)],'sqls':{..._0x5d9a3c['sqls']}}]))};}export function ensureRemoteSqlContent(_0x3fe3cb){return _0x3fe3cb['sqlContent']??'';}export function buildLocalSqlFileContent(_0x410db5,_0x233d2c,_0x10ed9c){const _0x21f3ca=a175_0x454287,_0x46e706=_0x10ed9c?.['mode']??detectSqlMode(_0x233d2c),_0x2c8d09=stripLocalSqlMetadata(_0x233d2c,_0x46e706)[_0x21f3ca(0x85)](),_0x13a82a=[...buildMetadataHeaderLines({'sqlCode':_0x410db5['sqlCode'],'sqlName':_0x410db5[_0x21f3ca(0x67)],'dbId':_0x410db5[_0x21f3ca(0x6f)],'dbName':_0x10ed9c?.[_0x21f3ca(0x69)],'mode':_0x46e706,'syncedAt':_0x10ed9c?.[_0x21f3ca(0x7d)],'description':_0x10ed9c?.[_0x21f3ca(0x70)]},_0x46e706),'',_0x2c8d09],_0x5d1dd5=_0x13a82a[_0x21f3ca(0x65)]('\x0a');return _0x5d1dd5[_0x21f3ca(0x89)]('\x0a')?_0x5d1dd5:_0x5d1dd5+'\x0a';}export function stripLocalSqlMetadata(_0x29a4e8,_0xa2dc02){const _0x2ce52a=a175_0x454287,_0x566641=_0x29a4e8[_0x2ce52a(0x7c)](/\r\n/g,'\x0a')[_0x2ce52a(0x68)]('\x0a'),_0x356457=[];let _0x57bdf4=0x0;if(_0xa2dc02===_0x2ce52a(0x78))while(_0x57bdf4<_0x566641[_0x2ce52a(0x90)]){const _0x437625=_0x566641[_0x57bdf4]??'';if(/^\s*<!--\s*@lovrabet\./[_0x2ce52a(0x86)](_0x437625)){_0x57bdf4++;continue;}if(_0x437625['trim']()===''&&_0x57bdf4>0x0){_0x57bdf4++;continue;}break;}else while(_0x57bdf4<_0x566641[_0x2ce52a(0x90)]){const _0x3d2dc2=_0x566641[_0x57bdf4]??'';if(/^\s*--\s*@lovrabet\./[_0x2ce52a(0x86)](_0x3d2dc2)){_0x57bdf4++;continue;}if(_0x3d2dc2['trim']()===''&&_0x57bdf4>0x0){_0x57bdf4++;continue;}break;}for(;_0x57bdf4<_0x566641[_0x2ce52a(0x90)];_0x57bdf4++){_0x356457[_0x2ce52a(0x88)](_0x566641[_0x57bdf4]);}return _0x356457[_0x2ce52a(0x65)]('\x0a')[_0x2ce52a(0x6a)]();}export function resolveSqlMode(_0xb6724,_0x5a03b3){if(_0x5a03b3?.['mode'])return _0x5a03b3['mode'];return detectSqlMode(_0xb6724);}function a175_0x3001(){const _0x456edb=['sqlConfig','question','includes','dbId','description','path','2345560LEAEeC','.rabetbase/sql','map','fromEntries','17097867YdyOqd','11588920LigAhD','mybatisXml','395198zoBVpp','filter','mode','replace','syncedAt','\x20[y/N]\x20','close','4lwBeRc','4182528qLXOyc','toLowerCase','sqlCode','entries','trim','test','version','push','endsWith','\x20-->','lastSync','apps','yes','stdin','1576866mhPddX','length','6199630syhktI','join','2nKoGbl','sqlName','split','dbName','trimStart','--\x20@lovrabet.'];a175_0x3001=function(){return _0x456edb;};return a175_0x3001();}export function resolveSqlFileName(_0x4ea6de,_0x4bd37e,_0x4c579f){const _0x5823ec=a175_0x454287;if(_0x4c579f?.[_0x5823ec(0x71)])return _0x4c579f[_0x5823ec(0x71)];if(_0x4c579f?.[_0x5823ec(0x67)]||_0x4c579f?.[_0x5823ec(0x69)])return buildSqlRelativePath(_0x4ea6de,_0x4c579f?.[_0x5823ec(0x67)],_0x4c579f?.['dbName'],resolveSqlMode(_0x4bd37e,_0x4c579f),_0x4c579f?.['dbId']);return buildDefaultSqlFileName(_0x4ea6de,resolveSqlMode(_0x4bd37e,_0x4c579f));}export function resolveSqlLocalDir(_0x37357b,_0xb701d2){return join(_0x37357b,SQL_LOCAL_REL_DIR,_0xb701d2);}export async function confirmForceOverwrite(_0x2f11eb){const _0x35413d=a175_0x454287,_0x2a54cb=createInterface({'input':process[_0x35413d(0x8e)],'output':process['stderr']}),_0x5ad00f=await new Promise(_0x251d28=>{const _0x31d83b=_0x35413d;_0x2a54cb[_0x31d83b(0x6d)](_0x2f11eb+_0x31d83b(0x7e),_0x251d28);});return _0x2a54cb[_0x35413d(0x7f)](),['y',_0x35413d(0x8d)][_0x35413d(0x6e)](_0x5ad00f[_0x35413d(0x85)]()[_0x35413d(0x82)]());}export function findSqlLockScope(_0x1672b3,_0x54c717){const _0x5064ee=a175_0x454287;return _0x1672b3[_0x5064ee(0x8c)][_0x54c717];}function buildMetadataHeaderLines(_0x2ee808,_0x125a4d){const _0x2192ba=a175_0x454287,_0x41d8eb=[[_0x2192ba(0x83),_0x2ee808['sqlCode']],[_0x2192ba(0x67),_0x2ee808[_0x2192ba(0x67)]],[_0x2192ba(0x6f),_0x2ee808[_0x2192ba(0x6f)]],[_0x2192ba(0x69),_0x2ee808[_0x2192ba(0x69)]],[_0x2192ba(0x7b),_0x2ee808['mode']],[_0x2192ba(0x7d),_0x2ee808[_0x2192ba(0x7d)]],[_0x2192ba(0x70),_0x2ee808[_0x2192ba(0x70)]]];if(_0x125a4d==='mybatisXml')return _0x41d8eb[_0x2192ba(0x7a)](([,_0x39875c])=>_0x39875c!==undefined&&_0x39875c!==null&&String(_0x39875c)['trim']()!=='')[_0x2192ba(0x74)](([_0x467208,_0x5e8966])=>'<!--\x20@lovrabet.'+_0x467208+':\x20'+String(_0x5e8966)+_0x2192ba(0x8a));return _0x41d8eb[_0x2192ba(0x7a)](([,_0x226bdc])=>_0x226bdc!==undefined&&_0x226bdc!==null&&String(_0x226bdc)[_0x2192ba(0x85)]()!=='')[_0x2192ba(0x74)](([_0x3d992c,_0x18cc6e])=>_0x2192ba(0x6b)+_0x3d992c+':\x20'+String(_0x18cc6e));}
@@ -1 +1 @@
1
- const a176_0x1094c5=a176_0x550d;function a176_0x52c3(){const _0x3d1ca7=['\x20remote-only','1203665asGYwe','path','tableData','boolean','map','relativePath','6nAlGzO','filePath','lockFilePath','226449IprfGC','\x20modified,\x20','\x20added,\x20','status','has','bool','lockKey','\x20unchanged','528380gmbSqF','appCode','1378629NQdnsa','168660haUjah','read','sql','push','\x20missing,\x20','sqlCode','sqls','totalCount','sqlRoot','693024GTfpJV','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','keys','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','length','184QZzntm','remote','351804BiKAzs','sqlName'];a176_0x52c3=function(){return _0x3d1ca7;};return a176_0x52c3();}(function(_0x499ca3,_0x5294bf){const _0x29ac64=a176_0x550d,_0x42ed9e=_0x499ca3();while(!![]){try{const _0x425b1d=-parseInt(_0x29ac64(0x17d))/0x1+-parseInt(_0x29ac64(0x191))/0x2+parseInt(_0x29ac64(0x194))/0x3+-parseInt(_0x29ac64(0x176))/0x4+parseInt(_0x29ac64(0x180))/0x5*(parseInt(_0x29ac64(0x186))/0x6)+parseInt(_0x29ac64(0x193))/0x7+parseInt(_0x29ac64(0x17b))/0x8*(parseInt(_0x29ac64(0x189))/0x9);if(_0x425b1d===_0x5294bf)break;else _0x42ed9e['push'](_0x42ed9e['shift']());}catch(_0x396300){_0x42ed9e['push'](_0x42ed9e['shift']());}}}(a176_0x52c3,0x452d9));import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';function a176_0x550d(_0x2247b7,_0x4d3a9c){_0x2247b7=_0x2247b7-0x173;const _0x52c3a5=a176_0x52c3();let _0x550dd5=_0x52c3a5[_0x2247b7];return _0x550dd5;}import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x58503f){const _0x1c10f1=a176_0x550d,_0x31e044=[];let _0x58c23e=0x1;while(!![]){const _0x533e57=await listSqlQueries(_0x58503f,{'currentPage':_0x58c23e,'pageSize':PAGE_SIZE}),_0x133939=_0x533e57[_0x1c10f1(0x182)]??[];_0x31e044[_0x1c10f1(0x197)](..._0x133939[_0x1c10f1(0x184)](_0x2f0f4e=>_0x2f0f4e[_0x1c10f1(0x199)]));if(_0x133939[_0x1c10f1(0x17a)]===0x0)break;const _0x405f34=_0x533e57['paging']?.[_0x1c10f1(0x174)];if(_0x405f34!=null?_0x31e044[_0x1c10f1(0x17a)]>=_0x405f34:_0x133939[_0x1c10f1(0x17a)]<PAGE_SIZE)break;_0x58c23e++;}return _0x31e044;}export const sqlStatus={'service':a176_0x1094c5(0x196),'command':'status','description':a176_0x1094c5(0x179),'risk':a176_0x1094c5(0x195),'flags':[{'name':'remote','type':a176_0x1094c5(0x183),'description':a176_0x1094c5(0x177)}],async 'execute'(_0x1548b2){const _0xe4d36b=a176_0x1094c5,_0x33c02f=loadSqlProjectConfig(_0x1548b2[_0xe4d36b(0x192)]),_0xf2c3ff=await readSqlLockFile(_0x33c02f[_0xe4d36b(0x188)]),{appLock:_0x5dfa0c}=ensureSqlLockScope(_0xf2c3ff??createEmptySqlLock(),_0x33c02f[_0xe4d36b(0x192)],_0x33c02f[_0xe4d36b(0x175)],_0xe4d36b(0x18c)),_0x4ab523=await scanLocalSqlQueries(_0x33c02f),_0x47f4bf=[],_0xdff39=[],_0x309c72=[],_0x3cdefe=[],_0x26a42a=new Set(_0x4ab523[_0xe4d36b(0x184)](_0x36e086=>_0x36e086[_0xe4d36b(0x18f)]));for(const _0x2ffda6 of _0x4ab523){const _0x2ccafd=await computeSqlFileHash(_0x2ffda6[_0xe4d36b(0x187)]),_0x599bb5=_0x5dfa0c['sqls'][_0x2ffda6['lockKey']],_0x3bfd31=!!_0x599bb5&&_0x599bb5[_0xe4d36b(0x181)]!==_0x2ffda6[_0xe4d36b(0x185)],_0x42f424=!!_0x599bb5&&!!_0x2ffda6[_0xe4d36b(0x17e)]&&_0x599bb5[_0xe4d36b(0x17e)]!==_0x2ffda6[_0xe4d36b(0x17e)];if(!_0x599bb5)_0x47f4bf[_0xe4d36b(0x197)](_0x2ffda6['lockKey']);else _0x599bb5['hash']!==_0x2ccafd||_0x3bfd31||_0x42f424?_0xdff39[_0xe4d36b(0x197)](_0x2ffda6[_0xe4d36b(0x18f)]):_0x309c72['push'](_0x2ffda6['lockKey']);}for(const _0x5d63b3 of Object[_0xe4d36b(0x178)](_0x5dfa0c[_0xe4d36b(0x173)])){!_0x26a42a[_0xe4d36b(0x18d)](_0x5d63b3)&&_0x3cdefe[_0xe4d36b(0x197)](_0x5d63b3);}const _0x7e2d95=[];if(_0x1548b2[_0xe4d36b(0x18e)](_0xe4d36b(0x17c))){const _0x45da4f=await fetchAllSqlCodes(_0x1548b2['appCode']);for(const _0x12c895 of _0x45da4f){!_0x26a42a['has'](_0x12c895)&&!_0x5dfa0c[_0xe4d36b(0x173)][_0x12c895]&&_0x7e2d95[_0xe4d36b(0x197)](_0x12c895);}}const _0x2eead7=_0x47f4bf['length']===0x0&&_0xdff39[_0xe4d36b(0x17a)]===0x0&&_0x3cdefe['length']===0x0&&_0x7e2d95[_0xe4d36b(0x17a)]===0x0;return{'ok':!![],'data':{'added':_0x47f4bf,'modified':_0xdff39,'missing':_0x3cdefe,'unchanged':_0x309c72,'remoteOnly':_0x7e2d95},'message':_0x2eead7?'All\x20SQL\x20queries\x20are\x20in\x20sync.':_0x47f4bf[_0xe4d36b(0x17a)]+_0xe4d36b(0x18b)+_0xdff39[_0xe4d36b(0x17a)]+_0xe4d36b(0x18a)+_0x3cdefe[_0xe4d36b(0x17a)]+_0xe4d36b(0x198)+_0x309c72[_0xe4d36b(0x17a)]+_0xe4d36b(0x190)+(_0x7e2d95[_0xe4d36b(0x17a)]>0x0?',\x20'+_0x7e2d95['length']+_0xe4d36b(0x17f):'')};}};
1
+ const a176_0x26594b=a176_0x5ee4;(function(_0x2006cb,_0x43993e){const _0x2c1c83=a176_0x5ee4,_0xd20ed6=_0x2006cb();while(!![]){try{const _0x15b802=parseInt(_0x2c1c83(0x199))/0x1+-parseInt(_0x2c1c83(0x189))/0x2*(parseInt(_0x2c1c83(0x184))/0x3)+parseInt(_0x2c1c83(0x190))/0x4*(-parseInt(_0x2c1c83(0x187))/0x5)+-parseInt(_0x2c1c83(0x188))/0x6+-parseInt(_0x2c1c83(0x1a4))/0x7+parseInt(_0x2c1c83(0x183))/0x8+-parseInt(_0x2c1c83(0x195))/0x9*(-parseInt(_0x2c1c83(0x1a3))/0xa);if(_0x15b802===_0x43993e)break;else _0xd20ed6['push'](_0xd20ed6['shift']());}catch(_0x32aff5){_0xd20ed6['push'](_0xd20ed6['shift']());}}}(a176_0x350d,0x3e69b));import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';function a176_0x350d(){const _0x413d18=['\x20added,\x20','sqlCode','3062628OahtnP','sqlRoot','keys','has','84343aJMSkM','path','sqls','\x20unchanged','paging','read','relativePath','filePath','status','totalCount','20usskyj','1292130MYlxUJ','\x20modified,\x20','remote','appCode','3064272uQRheq','243sqZdvq','sqlName','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','225dJdYgG','1700322xNXwsZ','5052EUJMcI','map','tableData','\x20missing,\x20','All\x20SQL\x20queries\x20are\x20in\x20sync.','lockKey','push','19532dYhKQy','sql','length'];a176_0x350d=function(){return _0x413d18;};return a176_0x350d();}import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';function a176_0x5ee4(_0x591b7a,_0x8697f2){_0x591b7a=_0x591b7a-0x183;const _0x350d1f=a176_0x350d();let _0x5ee4e3=_0x350d1f[_0x591b7a];return _0x5ee4e3;}const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x5bdc32){const _0x130ef3=a176_0x5ee4,_0x3e8d35=[];let _0x109574=0x1;while(!![]){const _0x905b32=await listSqlQueries(_0x5bdc32,{'currentPage':_0x109574,'pageSize':PAGE_SIZE}),_0x21c5b7=_0x905b32[_0x130ef3(0x18b)]??[];_0x3e8d35[_0x130ef3(0x18f)](..._0x21c5b7[_0x130ef3(0x18a)](_0x4b0b9b=>_0x4b0b9b[_0x130ef3(0x194)]));if(_0x21c5b7['length']===0x0)break;const _0x437955=_0x905b32[_0x130ef3(0x19d)]?.[_0x130ef3(0x1a2)];if(_0x437955!=null?_0x3e8d35[_0x130ef3(0x192)]>=_0x437955:_0x21c5b7[_0x130ef3(0x192)]<PAGE_SIZE)break;_0x109574++;}return _0x3e8d35;}export const sqlStatus={'service':a176_0x26594b(0x191),'command':a176_0x26594b(0x1a1),'description':a176_0x26594b(0x186),'risk':a176_0x26594b(0x19e),'flags':[{'name':a176_0x26594b(0x1a6),'type':'boolean','description':'Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally'}],async 'execute'(_0x4349a6){const _0x488251=a176_0x26594b,_0x506100=loadSqlProjectConfig(_0x4349a6['appCode']),_0x20d54a=await readSqlLockFile(_0x506100['lockFilePath']),{appLock:_0x33b341}=ensureSqlLockScope(_0x20d54a??createEmptySqlLock(),_0x506100[_0x488251(0x1a7)],_0x506100[_0x488251(0x196)],_0x488251(0x1a1)),_0x313889=await scanLocalSqlQueries(_0x506100),_0x38f698=[],_0x3389c8=[],_0x20211f=[],_0x535649=[],_0x42bf83=new Set(_0x313889[_0x488251(0x18a)](_0x3eb024=>_0x3eb024[_0x488251(0x18e)]));for(const _0x58285d of _0x313889){const _0x1a37af=await computeSqlFileHash(_0x58285d[_0x488251(0x1a0)]),_0x10c223=_0x33b341['sqls'][_0x58285d[_0x488251(0x18e)]],_0x54442b=!!_0x10c223&&_0x10c223[_0x488251(0x19a)]!==_0x58285d[_0x488251(0x19f)],_0x1ae8a6=!!_0x10c223&&!!_0x58285d['sqlName']&&_0x10c223[_0x488251(0x185)]!==_0x58285d[_0x488251(0x185)];if(!_0x10c223)_0x38f698[_0x488251(0x18f)](_0x58285d[_0x488251(0x18e)]);else _0x10c223['hash']!==_0x1a37af||_0x54442b||_0x1ae8a6?_0x3389c8[_0x488251(0x18f)](_0x58285d[_0x488251(0x18e)]):_0x20211f[_0x488251(0x18f)](_0x58285d[_0x488251(0x18e)]);}for(const _0x37bb12 of Object[_0x488251(0x197)](_0x33b341[_0x488251(0x19b)])){!_0x42bf83[_0x488251(0x198)](_0x37bb12)&&_0x535649[_0x488251(0x18f)](_0x37bb12);}const _0x44e464=[];if(_0x4349a6['bool'](_0x488251(0x1a6))){const _0x1466d9=await fetchAllSqlCodes(_0x4349a6[_0x488251(0x1a7)]);for(const _0x202817 of _0x1466d9){!_0x42bf83['has'](_0x202817)&&!_0x33b341[_0x488251(0x19b)][_0x202817]&&_0x44e464[_0x488251(0x18f)](_0x202817);}}const _0x42ca94=_0x38f698[_0x488251(0x192)]===0x0&&_0x3389c8['length']===0x0&&_0x535649[_0x488251(0x192)]===0x0&&_0x44e464[_0x488251(0x192)]===0x0;return{'ok':!![],'data':{'added':_0x38f698,'modified':_0x3389c8,'missing':_0x535649,'unchanged':_0x20211f,'remoteOnly':_0x44e464},'message':_0x42ca94?_0x488251(0x18d):_0x38f698['length']+_0x488251(0x193)+_0x3389c8[_0x488251(0x192)]+_0x488251(0x1a5)+_0x535649[_0x488251(0x192)]+_0x488251(0x18c)+_0x20211f[_0x488251(0x192)]+_0x488251(0x19c)+(_0x44e464[_0x488251(0x192)]>0x0?',\x20'+_0x44e464[_0x488251(0x192)]+'\x20remote-only':'')};}};
@@ -1 +1 @@
1
- function a177_0x39d2(){const _0x5a68f0=['4158535MMXRUB','validation','bool','string','utf-8','index_columns','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','indexes','size','950476OHVcVu','filter','tables','Table\x20\x22','10464744JbHZJD','schema:','isDangerous','file','schemas','dataset','9wzsweY','push','24228180XsUbjR','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','1926792hUxjet','reason','unshift','isArray','name','dbtableConfig','boolean','pkField','fields','\x22\x20not\x20found\x20or\x20not\x20accessible','sqlType','validate','Provide\x20--file\x20or\x20--sql','39nBKTXH','\x22\x20not\x20found\x20in\x20any\x20dataset','flagMissing','SQL\x20schema\x20validation','isSelectOnly','indexName','str','columns','tableName','find','cwd','7222QIYysx','length','Audit\x20top-level\x20JOIN\x20equality\x20predicates\x20against\x20dataset\x20index\x20metadata','message','parameters','appCode','columnNames','4NAicHc','index_name','trim','valid','10529099BnrHBt','map','sql','flatMap','index_type','split','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate'];a177_0x39d2=function(){return _0x5a68f0;};return a177_0x39d2();}const a177_0x3989c5=a177_0x1a88;(function(_0x457387,_0x3a0753){const _0x33e731=a177_0x1a88,_0x33e816=_0x457387();while(!![]){try{const _0x1c2ae5=-parseInt(_0x33e731(0x223))/0x1+-parseInt(_0x33e731(0x208))/0x2*(parseInt(_0x33e731(0x1fd))/0x3)+-parseInt(_0x33e731(0x20f))/0x4*(-parseInt(_0x33e731(0x21a))/0x5)+parseInt(_0x33e731(0x227))/0x6+parseInt(_0x33e731(0x213))/0x7+parseInt(_0x33e731(0x1f0))/0x8+parseInt(_0x33e731(0x22d))/0x9*(-parseInt(_0x33e731(0x22f))/0xa);if(_0x1c2ae5===_0x3a0753)break;else _0x33e816['push'](_0x33e816['shift']());}catch(_0x5aafef){_0x33e816['push'](_0x33e816['shift']());}}}(a177_0x39d2,0xdbdf8));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';import{auditSqlJoinIndexes}from'../../core/sql-index-auditor.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';function a177_0x1a88(_0x575876,_0x2055a4){_0x575876=_0x575876-0x1f0;const _0x39d229=a177_0x39d2();let _0x1a8885=_0x39d229[_0x575876];return _0x1a8885;}export const sqlValidate={'service':a177_0x3989c5(0x215),'command':a177_0x3989c5(0x1fb),'description':a177_0x3989c5(0x220),'risk':'read','flags':[{'name':'file','type':'string','description':a177_0x3989c5(0x219)},{'name':'sql','type':a177_0x3989c5(0x21d),'description':'Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)'},{'name':a177_0x3989c5(0x22b),'type':'string','description':a177_0x3989c5(0x230)},{'name':'check-indexes','type':a177_0x3989c5(0x1f6),'description':a177_0x3989c5(0x20a)}],async 'execute'(_0x25538b){const _0x5786bb=a177_0x3989c5,_0x471b6e=_0x25538b[_0x5786bb(0x203)]('file'),_0x1d5bc6=_0x25538b[_0x5786bb(0x203)]('sql'),_0x5cf127=_0x25538b[_0x5786bb(0x203)](_0x5786bb(0x22b)),_0x249f0e=_0x25538b[_0x5786bb(0x21c)]('check-indexes');if(!_0x471b6e&&!_0x1d5bc6)throw CliErrors[_0x5786bb(0x1ff)](_0x5786bb(0x22a),_0x5786bb(0x1fc));if(_0x249f0e&&!_0x5cf127)throw CliErrors[_0x5786bb(0x21b)]('--check-indexes\x20requires\x20--schemas.');let _0x68f2c;if(_0x471b6e){const _0x140639=resolve(process[_0x5786bb(0x207)](),_0x471b6e);if(!existsSync(_0x140639))throw CliErrors[_0x5786bb(0x21b)]('File\x20not\x20found:\x20'+_0x140639);_0x68f2c=readFileSync(_0x140639,_0x5786bb(0x21e));}else _0x68f2c=_0x1d5bc6;const _0x2c8ccf=validateSql(_0x68f2c),_0x4f373e={'valid':_0x2c8ccf[_0x5786bb(0x212)],'sqlType':_0x2c8ccf['sqlType']['type'],'isSelectOnly':_0x2c8ccf[_0x5786bb(0x1fa)][_0x5786bb(0x201)],'isDangerous':_0x2c8ccf[_0x5786bb(0x1fa)][_0x5786bb(0x229)],'tables':_0x2c8ccf[_0x5786bb(0x225)],'parameters':_0x2c8ccf[_0x5786bb(0x20c)],'message':_0x2c8ccf[_0x5786bb(0x20b)]};_0x2c8ccf[_0x5786bb(0x1fa)]['reason']&&(_0x4f373e[_0x5786bb(0x1f1)]=_0x2c8ccf['sqlType']['reason']);if(_0x5cf127&&_0x2c8ccf[_0x5786bb(0x212)]){const _0x414b30=_0x5cf127[_0x5786bb(0x218)](',')[_0x5786bb(0x214)](_0x29d5be=>_0x29d5be[_0x5786bb(0x211)]())[_0x5786bb(0x224)](Boolean),_0x3c045e=[],_0x1df1fc=[],_0x50e4fb=filterDbTableBackedDatasets(await listDatasets(_0x25538b[_0x5786bb(0x20d)])),_0x24fed5=new Map(_0x50e4fb[_0x5786bb(0x214)](_0x30bcb3=>[_0x30bcb3[_0x5786bb(0x1f5)]?.[_0x5786bb(0x205)]?.['toLowerCase'](),_0x30bcb3]));for(const _0x4dc4c of _0x2c8ccf[_0x5786bb(0x225)]){const _0x39a877=_0x24fed5['get'](_0x4dc4c['toLowerCase']());!_0x39a877&&_0x3c045e[_0x5786bb(0x22e)](_0x5786bb(0x226)+_0x4dc4c+_0x5786bb(0x1fe));}for(const _0x201f73 of _0x414b30){let _0x1a9f84;try{_0x1a9f84=await getDatasetDetail(_0x201f73);}catch{_0x3c045e[_0x5786bb(0x22e)]('Dataset\x20\x22'+_0x201f73+_0x5786bb(0x1f9));continue;}assertDatasetIsDbTableBacked(_0x1a9f84,_0x5786bb(0x200));const _0x34ac76=Array[_0x5786bb(0x1f3)](_0x1a9f84[_0x5786bb(0x1f8)])?_0x1a9f84[_0x5786bb(0x1f8)]:[],_0x190be7=new Set(_0x34ac76[_0x5786bb(0x214)](_0x1f87d4=>_0x1f87d4['name']?.['toLowerCase']())),_0x171cf7=_0x1a9f84['dbtableConfig']?.[_0x5786bb(0x205)]||_0x1a9f84[_0x5786bb(0x205)]||_0x201f73;_0x4f373e[_0x5786bb(0x228)+_0x171cf7]={'code':_0x201f73,'tableName':_0x171cf7,'fieldCount':_0x190be7[_0x5786bb(0x222)],'fields':Array['from'](_0x190be7)};if(_0x249f0e){const _0x52d041=normalizeDatasetIndexes(_0x1a9f84);_0x1df1fc[_0x5786bb(0x22e)]({'tableName':_0x171cf7,..._0x52d041});}}_0x3c045e['length']>0x0&&(_0x4f373e['schemaWarnings']=_0x3c045e),_0x249f0e&&(_0x4f373e['joinAudit']=auditSqlJoinIndexes(_0x68f2c,_0x1df1fc));}return{'ok':_0x2c8ccf[_0x5786bb(0x212)],'data':_0x4f373e,'message':_0x2c8ccf[_0x5786bb(0x20b)]};}};function normalizeDatasetIndexes(_0x3691a4){const _0x3b5de5=a177_0x3989c5,_0x5970aa=Array[_0x3b5de5(0x1f3)](_0x3691a4?.[_0x3b5de5(0x22c)]?.[_0x3b5de5(0x221)])?_0x3691a4[_0x3b5de5(0x22c)][_0x3b5de5(0x221)]:Array['isArray'](_0x3691a4?.[_0x3b5de5(0x221)])?_0x3691a4['indexes']:[],_0x49cac7=_0x5970aa[_0x3b5de5(0x216)](_0x253ebb=>{const _0x1332c4=_0x3b5de5,_0x27c38c=Array[_0x1332c4(0x1f3)](_0x253ebb?.[_0x1332c4(0x21f)])?_0x253ebb['index_columns']:Array[_0x1332c4(0x1f3)](_0x253ebb?.[_0x1332c4(0x20e)])?_0x253ebb['columnNames']:Array[_0x1332c4(0x1f3)](_0x253ebb?.[_0x1332c4(0x204)])?_0x253ebb[_0x1332c4(0x204)]:[],_0x155395=_0x27c38c[_0x1332c4(0x224)](_0x3e3387=>typeof _0x3e3387==='string')[_0x1332c4(0x214)](_0x56970f=>_0x56970f['trim']())[_0x1332c4(0x224)](Boolean);if(_0x155395['length']===0x0)return[];const _0x2f9537=[_0x253ebb?.[_0x1332c4(0x202)],_0x253ebb?.[_0x1332c4(0x210)],_0x253ebb?.[_0x1332c4(0x1f4)]][_0x1332c4(0x206)](_0x2b244c=>typeof _0x2b244c===_0x1332c4(0x21d)&&_0x2b244c[_0x1332c4(0x211)]()),_0xc7c68=[_0x253ebb?.[_0x1332c4(0x217)],_0x253ebb?.['type']]['find'](_0x4bda84=>typeof _0x4bda84===_0x1332c4(0x21d)&&_0x4bda84[_0x1332c4(0x211)]());return[{..._0x2f9537?{'name':_0x2f9537[_0x1332c4(0x211)]()}:{},..._0xc7c68?{'type':_0xc7c68['trim']()}:{},'columns':_0x155395}];}),_0x46d5fc=[..._0x49cac7],_0x5587af=typeof _0x3691a4?.[_0x3b5de5(0x1f5)]?.[_0x3b5de5(0x1f7)]===_0x3b5de5(0x21d)?_0x3691a4['dbtableConfig'][_0x3b5de5(0x1f7)][_0x3b5de5(0x218)](',')[_0x3b5de5(0x214)](_0x379291=>_0x379291[_0x3b5de5(0x211)]())[_0x3b5de5(0x224)](Boolean):[];return _0x5587af[_0x3b5de5(0x209)]>0x0&&_0x46d5fc[_0x3b5de5(0x1f2)]({'type':'primary','columns':_0x5587af}),{'indexes':_0x46d5fc,'metadataAvailable':_0x49cac7[_0x3b5de5(0x209)]>0x0};}
1
+ const a177_0x5ba0a6=a177_0x13ef;function a177_0x13ef(_0x423b05,_0x293b20){_0x423b05=_0x423b05-0x12d;const _0xc7fe9=a177_0xc7fe();let _0x13ef3c=_0xc7fe9[_0x423b05];return _0x13ef3c;}(function(_0xb0c1b2,_0x326ccb){const _0xe6b4d=a177_0x13ef,_0x598f8d=_0xb0c1b2();while(!![]){try{const _0x516652=parseInt(_0xe6b4d(0x144))/0x1+parseInt(_0xe6b4d(0x140))/0x2+parseInt(_0xe6b4d(0x154))/0x3+parseInt(_0xe6b4d(0x132))/0x4*(parseInt(_0xe6b4d(0x16b))/0x5)+parseInt(_0xe6b4d(0x142))/0x6+parseInt(_0xe6b4d(0x161))/0x7*(-parseInt(_0xe6b4d(0x148))/0x8)+-parseInt(_0xe6b4d(0x133))/0x9;if(_0x516652===_0x326ccb)break;else _0x598f8d['push'](_0x598f8d['shift']());}catch(_0x3a7f5b){_0x598f8d['push'](_0x598f8d['shift']());}}}(a177_0xc7fe,0x67fd2));import{readFileSync,existsSync}from'node:fs';function a177_0xc7fe(){const _0x5859c3=['1764183TyPUle','Table\x20\x22','string','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','unshift','cwd','tables','split','name','File\x20not\x20found:\x20','dbtableConfig','type','35XYNQLx','size','utf-8','sql','read','length','Dataset\x20\x22','index_name','reason','isArray','193405dEqnuQ','validate','primary','SQL\x20schema\x20validation','tableName','valid','fields','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','index_columns','indexName','isSelectOnly','16gFzHvr','13100013pYPwer','file','isDangerous','filter','map','pkField','flagMissing','\x22\x20not\x20found\x20in\x20any\x20dataset','str','push','Audit\x20top-level\x20JOIN\x20equality\x20predicates\x20against\x20dataset\x20index\x20metadata','trim','toLowerCase','1257148ShRVLD','\x22\x20not\x20found\x20or\x20not\x20accessible','3904296JQKWHc','validation','78410WiRCcB','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','schemaWarnings','joinAudit','350384AnmjnY','columnNames','sqlType','message','--check-indexes\x20requires\x20--schemas.','columns','find','schema:','indexes','dataset','appCode','bool'];a177_0xc7fe=function(){return _0x5859c3;};return a177_0xc7fe();}import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';import{auditSqlJoinIndexes}from'../../core/sql-index-auditor.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';export const sqlValidate={'service':'sql','command':a177_0x5ba0a6(0x16c),'description':a177_0x5ba0a6(0x158),'risk':a177_0x5ba0a6(0x165),'flags':[{'name':a177_0x5ba0a6(0x134),'type':'string','description':a177_0x5ba0a6(0x157)},{'name':a177_0x5ba0a6(0x164),'type':a177_0x5ba0a6(0x156),'description':a177_0x5ba0a6(0x12e)},{'name':'schemas','type':a177_0x5ba0a6(0x156),'description':a177_0x5ba0a6(0x145)},{'name':'check-indexes','type':'boolean','description':a177_0x5ba0a6(0x13d)}],async 'execute'(_0x2ef567){const _0x271630=a177_0x5ba0a6,_0x235eef=_0x2ef567[_0x271630(0x13b)]('file'),_0x39a8a0=_0x2ef567['str'](_0x271630(0x164)),_0x23c65f=_0x2ef567[_0x271630(0x13b)]('schemas'),_0x4d0a26=_0x2ef567[_0x271630(0x153)]('check-indexes');if(!_0x235eef&&!_0x39a8a0)throw CliErrors[_0x271630(0x139)]('file','Provide\x20--file\x20or\x20--sql');if(_0x4d0a26&&!_0x23c65f)throw CliErrors[_0x271630(0x143)](_0x271630(0x14c));let _0x225469;if(_0x235eef){const _0x22db05=resolve(process[_0x271630(0x15a)](),_0x235eef);if(!existsSync(_0x22db05))throw CliErrors[_0x271630(0x143)](_0x271630(0x15e)+_0x22db05);_0x225469=readFileSync(_0x22db05,_0x271630(0x163));}else _0x225469=_0x39a8a0;const _0x1f4f87=validateSql(_0x225469),_0x4825a4={'valid':_0x1f4f87[_0x271630(0x170)],'sqlType':_0x1f4f87[_0x271630(0x14a)][_0x271630(0x160)],'isSelectOnly':_0x1f4f87[_0x271630(0x14a)][_0x271630(0x131)],'isDangerous':_0x1f4f87[_0x271630(0x14a)][_0x271630(0x135)],'tables':_0x1f4f87[_0x271630(0x15b)],'parameters':_0x1f4f87['parameters'],'message':_0x1f4f87[_0x271630(0x14b)]};_0x1f4f87['sqlType']['reason']&&(_0x4825a4[_0x271630(0x169)]=_0x1f4f87[_0x271630(0x14a)][_0x271630(0x169)]);if(_0x23c65f&&_0x1f4f87[_0x271630(0x170)]){const _0x30bd02=_0x23c65f[_0x271630(0x15c)](',')[_0x271630(0x137)](_0x30830f=>_0x30830f['trim']())['filter'](Boolean),_0x2bfa36=[],_0x407120=[],_0x3b3f56=filterDbTableBackedDatasets(await listDatasets(_0x2ef567[_0x271630(0x152)])),_0x258477=new Map(_0x3b3f56['map'](_0x55ad43=>[_0x55ad43[_0x271630(0x15f)]?.[_0x271630(0x16f)]?.[_0x271630(0x13f)](),_0x55ad43]));for(const _0x246594 of _0x1f4f87[_0x271630(0x15b)]){const _0x47a230=_0x258477['get'](_0x246594['toLowerCase']());!_0x47a230&&_0x2bfa36[_0x271630(0x13c)](_0x271630(0x155)+_0x246594+_0x271630(0x13a));}for(const _0x27c46a of _0x30bd02){let _0x77201d;try{_0x77201d=await getDatasetDetail(_0x27c46a);}catch{_0x2bfa36['push'](_0x271630(0x167)+_0x27c46a+_0x271630(0x141));continue;}assertDatasetIsDbTableBacked(_0x77201d,_0x271630(0x16e));const _0x487d54=Array[_0x271630(0x16a)](_0x77201d[_0x271630(0x12d)])?_0x77201d['fields']:[],_0x2cecbb=new Set(_0x487d54[_0x271630(0x137)](_0x50f5c7=>_0x50f5c7['name']?.[_0x271630(0x13f)]())),_0x2b6f83=_0x77201d['dbtableConfig']?.['tableName']||_0x77201d[_0x271630(0x16f)]||_0x27c46a;_0x4825a4[_0x271630(0x14f)+_0x2b6f83]={'code':_0x27c46a,'tableName':_0x2b6f83,'fieldCount':_0x2cecbb[_0x271630(0x162)],'fields':Array['from'](_0x2cecbb)};if(_0x4d0a26){const _0xd0fdc6=normalizeDatasetIndexes(_0x77201d);_0x407120[_0x271630(0x13c)]({'tableName':_0x2b6f83,..._0xd0fdc6});}}_0x2bfa36[_0x271630(0x166)]>0x0&&(_0x4825a4[_0x271630(0x146)]=_0x2bfa36),_0x4d0a26&&(_0x4825a4[_0x271630(0x147)]=auditSqlJoinIndexes(_0x225469,_0x407120));}return{'ok':_0x1f4f87[_0x271630(0x170)],'data':_0x4825a4,'message':_0x1f4f87[_0x271630(0x14b)]};}};function normalizeDatasetIndexes(_0x311dbf){const _0x3432a7=a177_0x5ba0a6,_0x2b7a18=Array[_0x3432a7(0x16a)](_0x311dbf?.['dataset']?.[_0x3432a7(0x150)])?_0x311dbf[_0x3432a7(0x151)][_0x3432a7(0x150)]:Array['isArray'](_0x311dbf?.[_0x3432a7(0x150)])?_0x311dbf['indexes']:[],_0x46a843=_0x2b7a18['flatMap'](_0xb2c781=>{const _0x4dd727=_0x3432a7,_0x5a07b0=Array[_0x4dd727(0x16a)](_0xb2c781?.[_0x4dd727(0x12f)])?_0xb2c781[_0x4dd727(0x12f)]:Array['isArray'](_0xb2c781?.[_0x4dd727(0x149)])?_0xb2c781[_0x4dd727(0x149)]:Array[_0x4dd727(0x16a)](_0xb2c781?.[_0x4dd727(0x14d)])?_0xb2c781[_0x4dd727(0x14d)]:[],_0x1ad05b=_0x5a07b0[_0x4dd727(0x136)](_0x56d6ca=>typeof _0x56d6ca===_0x4dd727(0x156))[_0x4dd727(0x137)](_0x348d3a=>_0x348d3a[_0x4dd727(0x13e)]())[_0x4dd727(0x136)](Boolean);if(_0x1ad05b[_0x4dd727(0x166)]===0x0)return[];const _0x20c985=[_0xb2c781?.[_0x4dd727(0x130)],_0xb2c781?.[_0x4dd727(0x168)],_0xb2c781?.[_0x4dd727(0x15d)]][_0x4dd727(0x14e)](_0x55e7ee=>typeof _0x55e7ee==='string'&&_0x55e7ee[_0x4dd727(0x13e)]()),_0x3bfa04=[_0xb2c781?.['index_type'],_0xb2c781?.[_0x4dd727(0x160)]][_0x4dd727(0x14e)](_0x64c876=>typeof _0x64c876===_0x4dd727(0x156)&&_0x64c876[_0x4dd727(0x13e)]());return[{..._0x20c985?{'name':_0x20c985[_0x4dd727(0x13e)]()}:{},..._0x3bfa04?{'type':_0x3bfa04['trim']()}:{},'columns':_0x1ad05b}];}),_0x4be95b=[..._0x46a843],_0x35cd30=typeof _0x311dbf?.[_0x3432a7(0x15f)]?.[_0x3432a7(0x138)]===_0x3432a7(0x156)?_0x311dbf[_0x3432a7(0x15f)][_0x3432a7(0x138)][_0x3432a7(0x15c)](',')['map'](_0x2bc520=>_0x2bc520['trim']())[_0x3432a7(0x136)](Boolean):[];return _0x35cd30[_0x3432a7(0x166)]>0x0&&_0x4be95b[_0x3432a7(0x159)]({'type':_0x3432a7(0x16d),'columns':_0x35cd30}),{'indexes':_0x4be95b,'metadataAvailable':_0x46a843[_0x3432a7(0x166)]>0x0};}
@@ -1 +1 @@
1
- (function(_0x1ff6f7,_0x260841){const _0x369d76=a178_0x3cf8,_0x2634f8=_0x1ff6f7();while(!![]){try{const _0x1a65cc=-parseInt(_0x369d76(0x8a))/0x1*(parseInt(_0x369d76(0x90))/0x2)+-parseInt(_0x369d76(0x8b))/0x3*(parseInt(_0x369d76(0x8f))/0x4)+-parseInt(_0x369d76(0x8e))/0x5*(-parseInt(_0x369d76(0x86))/0x6)+-parseInt(_0x369d76(0x88))/0x7+-parseInt(_0x369d76(0x8d))/0x8+-parseInt(_0x369d76(0x87))/0x9+-parseInt(_0x369d76(0x8c))/0xa*(-parseInt(_0x369d76(0x89))/0xb);if(_0x1a65cc===_0x260841)break;else _0x2634f8['push'](_0x2634f8['shift']());}catch(_0x50613d){_0x2634f8['push'](_0x2634f8['shift']());}}}(a178_0x4eb5,0x8b97b));import{taskStatus}from'../../commands/task/status.js';export const taskDefinitions=[taskStatus];function a178_0x3cf8(_0x2e65d3,_0xacdecb){_0x2e65d3=_0x2e65d3-0x86;const _0x4eb5b6=a178_0x4eb5();let _0x3cf8c8=_0x4eb5b6[_0x2e65d3];return _0x3cf8c8;}function a178_0x4eb5(){const _0x1810ad=['4fCTXBJ','6106BPKZtp','6234hOlEuc','795492ylUpqj','5816013kWicyP','3096082bvvbem','213AruOMa','539811jqRlZI','60NRrfsk','52104yUbota','3075fRJYGj'];a178_0x4eb5=function(){return _0x1810ad;};return a178_0x4eb5();}
1
+ (function(_0x3e4e70,_0xfc9252){const _0x9e7fe=a178_0x3db5,_0x45a4fc=_0x3e4e70();while(!![]){try{const _0x2f0457=parseInt(_0x9e7fe(0x8a))/0x1+parseInt(_0x9e7fe(0x8c))/0x2*(parseInt(_0x9e7fe(0x89))/0x3)+-parseInt(_0x9e7fe(0x88))/0x4*(parseInt(_0x9e7fe(0x94))/0x5)+parseInt(_0x9e7fe(0x8b))/0x6*(-parseInt(_0x9e7fe(0x90))/0x7)+-parseInt(_0x9e7fe(0x91))/0x8*(parseInt(_0x9e7fe(0x93))/0x9)+-parseInt(_0x9e7fe(0x92))/0xa*(parseInt(_0x9e7fe(0x8d))/0xb)+parseInt(_0x9e7fe(0x8f))/0xc*(parseInt(_0x9e7fe(0x8e))/0xd);if(_0x2f0457===_0xfc9252)break;else _0x45a4fc['push'](_0x45a4fc['shift']());}catch(_0x48db33){_0x45a4fc['push'](_0x45a4fc['shift']());}}}(a178_0x11c5,0xca657));function a178_0x3db5(_0x29c06d,_0x1c02f2){_0x29c06d=_0x29c06d-0x88;const _0x11c5e9=a178_0x11c5();let _0x3db5fe=_0x11c5e9[_0x29c06d];return _0x3db5fe;}function a178_0x11c5(){const _0x4f281b=['16gTIapn','6178670RuqJxa','5472783PtpcrP','80zMAqeC','164596zOINYO','10311SrORpY','312805KcRrRO','6WGoULh','470SFVFIT','11sXKIhy','468LsEhnM','960060umGsdr','4754680kfjZkH'];a178_0x11c5=function(){return _0x4f281b;};return a178_0x11c5();}import{taskStatus}from'../../commands/task/status.js';export const taskDefinitions=[taskStatus];
@@ -1 +1 @@
1
- const a179_0x20959a=a179_0x1949;(function(_0x5ca224,_0x1f9471){const _0x255aee=a179_0x1949,_0xbeb9eb=_0x5ca224();while(!![]){try{const _0x206b26=parseInt(_0x255aee(0x1e2))/0x1+-parseInt(_0x255aee(0x1e0))/0x2*(-parseInt(_0x255aee(0x1d6))/0x3)+-parseInt(_0x255aee(0x1da))/0x4+-parseInt(_0x255aee(0x1d9))/0x5*(parseInt(_0x255aee(0x1de))/0x6)+parseInt(_0x255aee(0x1db))/0x7+-parseInt(_0x255aee(0x1d7))/0x8*(parseInt(_0x255aee(0x1e4))/0x9)+-parseInt(_0x255aee(0x1e5))/0xa*(-parseInt(_0x255aee(0x1dd))/0xb);if(_0x206b26===_0x1f9471)break;else _0xbeb9eb['push'](_0xbeb9eb['shift']());}catch(_0x5f4289){_0xbeb9eb['push'](_0xbeb9eb['shift']());}}}(a179_0x9c2a,0x650e9));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a179_0x1949(_0x5487e6,_0x3353f8){_0x5487e6=_0x5487e6-0x1ce;const _0x9c2a60=a179_0x9c2a();let _0x1949ac=_0x9c2a60[_0x5487e6];return _0x1949ac;}function a179_0x9c2a(){const _0x3f602e=['1042915zgOalW','1766016YipzmU','716891fhdZUB','task','32021pVGkDf','6cRdYWH','appCode','2VEfiYm','taskId','542480NnkQvT',',\x20received\x20','1284282ZbAZeo','1310DSlnpt','string','compress','task-id','trim','str','Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','apiError','Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command','flagMissing','1397628pyaRNt','24SEWYca','cookie'];a179_0x9c2a=function(){return _0x3f602e;};return a179_0x9c2a();}import{asyncTaskMessage,buildAsyncTaskStatusCommand,normalizeAsyncTask}from'../../commands/common/async-task.js';import{getAsyncTaskStatus}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const taskStatus={'service':a179_0x20959a(0x1dc),'command':'status','description':a179_0x20959a(0x1d2),'risk':'read','defaultOutputFormat':a179_0x20959a(0x1ce),'structuredErrors':!![],'flags':[{'name':a179_0x20959a(0x1cf),'type':a179_0x20959a(0x1e6),'required':!![],'description':a179_0x20959a(0x1d4)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xc38601){const _0x40f1ec=a179_0x20959a;if(!_0xc38601[_0x40f1ec(0x1d1)](_0x40f1ec(0x1cf))[_0x40f1ec(0x1d0)]())throw CliErrors[_0x40f1ec(0x1d5)](_0x40f1ec(0x1cf));},async 'execute'(_0x47fa45){const _0x5273aa=a179_0x20959a,_0x437d1f=_0x47fa45[_0x5273aa(0x1d1)](_0x5273aa(0x1cf))[_0x5273aa(0x1d0)](),_0x8d43d3=normalizeAsyncTask(await getAsyncTaskStatus(_0x437d1f,_0x47fa45[_0x5273aa(0x1df)],_0x47fa45[_0x5273aa(0x1d8)]));if(_0x8d43d3[_0x5273aa(0x1e1)]!==_0x437d1f)throw CliErrors[_0x5273aa(0x1d3)]('Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20'+_0x437d1f+_0x5273aa(0x1e3)+_0x8d43d3[_0x5273aa(0x1e1)]+'.');const _0x5e2449=buildAsyncTaskStatusCommand(_0x8d43d3[_0x5273aa(0x1e1)],_0x47fa45[_0x5273aa(0x1df)]);return{'ok':!![],'message':asyncTaskMessage(_0x8d43d3),'data':{'appCode':_0x47fa45[_0x5273aa(0x1df)],..._0x8d43d3,'query':_0x8d43d3['isTerminal']?null:{'command':_0x5e2449}}};}};
1
+ const a179_0x3f1ecd=a179_0x496b;(function(_0x46805f,_0x11cbf1){const _0x563b79=a179_0x496b,_0x474e6b=_0x46805f();while(!![]){try{const _0x11c0ec=-parseInt(_0x563b79(0x1f5))/0x1+parseInt(_0x563b79(0x1f8))/0x2*(parseInt(_0x563b79(0x204))/0x3)+parseInt(_0x563b79(0x1fd))/0x4+-parseInt(_0x563b79(0x202))/0x5+-parseInt(_0x563b79(0x209))/0x6*(parseInt(_0x563b79(0x1fa))/0x7)+-parseInt(_0x563b79(0x207))/0x8+parseInt(_0x563b79(0x1f6))/0x9;if(_0x11c0ec===_0x11cbf1)break;else _0x474e6b['push'](_0x474e6b['shift']());}catch(_0x4d50a4){_0x474e6b['push'](_0x474e6b['shift']());}}}(a179_0x364e,0x48709));function a179_0x496b(_0x3640cb,_0x2c4bb9){_0x3640cb=_0x3640cb-0x1f1;const _0x364e3f=a179_0x364e();let _0x496bd5=_0x364e3f[_0x3640cb];return _0x496bd5;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asyncTaskMessage,buildAsyncTaskStatusCommand,normalizeAsyncTask}from'../../commands/common/async-task.js';import{getAsyncTaskStatus}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a179_0x364e(){const _0x3cf77b=['2877228daTJTw','task','346lilJaH',',\x20received\x20','77SZNljy','Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command','apiError','999612DhEbOx','trim','string','cookie','read','1035130uXKqPn','isTerminal','8868VyVSnq','Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','flagMissing','2622088HOhPvW','appCode','7206YJjJmg','taskId','status','str','task-id','236272mdbQVN'];a179_0x364e=function(){return _0x3cf77b;};return a179_0x364e();}export const taskStatus={'service':a179_0x3f1ecd(0x1f7),'command':a179_0x3f1ecd(0x1f2),'description':a179_0x3f1ecd(0x205),'risk':a179_0x3f1ecd(0x201),'defaultOutputFormat':'compress','structuredErrors':!![],'flags':[{'name':a179_0x3f1ecd(0x1f4),'type':a179_0x3f1ecd(0x1ff),'required':!![],'description':a179_0x3f1ecd(0x1fb)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x32af57){const _0x486742=a179_0x3f1ecd;if(!_0x32af57[_0x486742(0x1f3)](_0x486742(0x1f4))[_0x486742(0x1fe)]())throw CliErrors[_0x486742(0x206)](_0x486742(0x1f4));},async 'execute'(_0x2b8fb6){const _0x271049=a179_0x3f1ecd,_0x3b4dd1=_0x2b8fb6[_0x271049(0x1f3)](_0x271049(0x1f4))[_0x271049(0x1fe)](),_0x5f4267=normalizeAsyncTask(await getAsyncTaskStatus(_0x3b4dd1,_0x2b8fb6[_0x271049(0x208)],_0x2b8fb6[_0x271049(0x200)]));if(_0x5f4267['taskId']!==_0x3b4dd1)throw CliErrors[_0x271049(0x1fc)]('Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20'+_0x3b4dd1+_0x271049(0x1f9)+_0x5f4267[_0x271049(0x1f1)]+'.');const _0x2a4fd6=buildAsyncTaskStatusCommand(_0x5f4267[_0x271049(0x1f1)],_0x2b8fb6[_0x271049(0x208)]);return{'ok':!![],'message':asyncTaskMessage(_0x5f4267),'data':{'appCode':_0x2b8fb6[_0x271049(0x208)],..._0x5f4267,'query':_0x5f4267[_0x271049(0x203)]?null:{'command':_0x2a4fd6}}};}};
@@ -1 +1 @@
1
- const a180_0x1c5476=a180_0x25bd;(function(_0x2ae4ec,_0x30e2e5){const _0x3eee7a=a180_0x25bd,_0x596ac0=_0x2ae4ec();while(!![]){try{const _0x1ea0d6=-parseInt(_0x3eee7a(0x16d))/0x1*(parseInt(_0x3eee7a(0x166))/0x2)+-parseInt(_0x3eee7a(0x16e))/0x3*(parseInt(_0x3eee7a(0x171))/0x4)+-parseInt(_0x3eee7a(0x173))/0x5+-parseInt(_0x3eee7a(0x16c))/0x6*(-parseInt(_0x3eee7a(0x169))/0x7)+parseInt(_0x3eee7a(0x164))/0x8*(-parseInt(_0x3eee7a(0x165))/0x9)+-parseInt(_0x3eee7a(0x16f))/0xa+-parseInt(_0x3eee7a(0x163))/0xb*(-parseInt(_0x3eee7a(0x167))/0xc);if(_0x1ea0d6===_0x30e2e5)break;else _0x596ac0['push'](_0x596ac0['shift']());}catch(_0x5e67e1){_0x596ac0['push'](_0x596ac0['shift']());}}}(a180_0x9761,0xbd0a1));function a180_0x9761(){const _0x15b9ac=['4358mSiptZ','48jouyYD','Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','5842123xvwdlC','add','workspace','6tvTbys','467lAxIuv','273381hQAlxc','10512570fXutIM','workspace\x20add','24cyqvfl','write','3232885ACykQl','App\x20profile\x20name','9206351toURCA','166696cyKvIl','63YvkCIp'];a180_0x9761=function(){return _0x15b9ac;};return a180_0x9761();}import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';function a180_0x25bd(_0x1ff8e9,_0x34d7a3){_0x1ff8e9=_0x1ff8e9-0x163;const _0x976134=a180_0x9761();let _0x25bd20=_0x976134[_0x1ff8e9];return _0x25bd20;}export const workspaceAddDefinition={'service':a180_0x1c5476(0x16b),'command':a180_0x1c5476(0x16a),'description':a180_0x1c5476(0x168),'risk':a180_0x1c5476(0x172),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'name','description':a180_0x1c5476(0x174),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0x509d94=>validateAppName(_0x509d94,'workspace\x20add'),'execute':_0x5a4e7a=>runAppAdd(_0x5a4e7a,a180_0x1c5476(0x170))};
1
+ const a180_0xe48f08=a180_0x3c04;(function(_0x196eb3,_0xef70a3){const _0x516d10=a180_0x3c04,_0x513cfa=_0x196eb3();while(!![]){try{const _0x535462=-parseInt(_0x516d10(0x94))/0x1+parseInt(_0x516d10(0x8e))/0x2+parseInt(_0x516d10(0x8f))/0x3+-parseInt(_0x516d10(0x91))/0x4*(parseInt(_0x516d10(0x96))/0x5)+parseInt(_0x516d10(0x93))/0x6+parseInt(_0x516d10(0x92))/0x7+-parseInt(_0x516d10(0x95))/0x8;if(_0x535462===_0xef70a3)break;else _0x513cfa['push'](_0x513cfa['shift']());}catch(_0x5a4bc6){_0x513cfa['push'](_0x513cfa['shift']());}}}(a180_0x1da1,0x704c0));function a180_0x3c04(_0x33a4b4,_0x2daec7){_0x33a4b4=_0x33a4b4-0x8a;const _0x1da15e=a180_0x1da1();let _0x3c0422=_0x1da15e[_0x33a4b4];return _0x3c0422;}import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';function a180_0x1da1(){const _0xcaf71d=['write','workspace\x20add','add','1127170ayCyLG','2108901WyvTCm','App\x20profile\x20name','289924ZXrrAK','4768456YKIVnr','2576634LADrIg','858979wYQFRS','7306320LmpDWi','10wjfOVV','Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)'];a180_0x1da1=function(){return _0xcaf71d;};return a180_0x1da1();}export const workspaceAddDefinition={'service':'workspace','command':a180_0xe48f08(0x8d),'description':a180_0xe48f08(0x8a),'risk':a180_0xe48f08(0x8b),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'name','description':a180_0xe48f08(0x90),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0x4d6184=>validateAppName(_0x4d6184,'workspace\x20add'),'execute':_0xc5918d=>runAppAdd(_0xc5918d,a180_0xe48f08(0x8c))};
@@ -1 +1 @@
1
- const a181_0x49c081=a181_0x1dab;(function(_0x39b546,_0x4ffdf1){const _0x592cc4=a181_0x1dab,_0x45a0a1=_0x39b546();while(!![]){try{const _0x57a61d=-parseInt(_0x592cc4(0x1d9))/0x1*(parseInt(_0x592cc4(0x1f5))/0x2)+parseInt(_0x592cc4(0x1e0))/0x3+-parseInt(_0x592cc4(0x1ee))/0x4*(-parseInt(_0x592cc4(0x1e7))/0x5)+-parseInt(_0x592cc4(0x1db))/0x6*(parseInt(_0x592cc4(0x1fd))/0x7)+-parseInt(_0x592cc4(0x20c))/0x8+parseInt(_0x592cc4(0x1ea))/0x9*(-parseInt(_0x592cc4(0x1fb))/0xa)+-parseInt(_0x592cc4(0x202))/0xb*(-parseInt(_0x592cc4(0x204))/0xc);if(_0x57a61d===_0x4ffdf1)break;else _0x45a0a1['push'](_0x45a0a1['shift']());}catch(_0x12dbcf){_0x45a0a1['push'](_0x45a0a1['shift']());}}}(a181_0x3736,0x25d8c));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';function a181_0x3736(){const _0x5074b2=['\x20--app\x20','keys','workspace','format','Missing\x20workspace\x20app\x20selector.','4WhGFbg','app','length','Workspace\x20','number','workspace.','370XEiHty','Locale\x20for\x20this\x20workspace\x20app\x20profile','56567VIXViS','init','write','initialized','pageSize','88OkmkHv','updated','930072xIhADi','\x20workspace\x20','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','locale','\x20workspace\x20use\x20--app\x20<name>`.','App\x20\x22','riskLevel','appcode','1589920KdBaMe','string','\x20(appcode:\x20','validation','project','129123dyMhiR','Use\x20`','72NwQNTm','globalConfig','flag','trim','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','162357fYYjZe','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','apiDir','env','str','\x22\x20not\x20found.','2725YUbvkT','\x20--appcode\x20<code>`.','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','2403RMWIqI','defaultFormat','use','apps','328kbbnJl','.\x20Credentials:\x20not\x20written.'];a181_0x3736=function(){return _0x5074b2;};return a181_0x3736();}const WORKSPACE_USAGE=CLI_BIN_NAME+a181_0x49c081(0x1e1),SAFE_PROFILE_KEYS=['appcode','env',a181_0x49c081(0x1e3),a181_0x49c081(0x1f3),a181_0x49c081(0x201),'riskLevel',a181_0x49c081(0x207)],workspaceFlags=[{'name':a181_0x49c081(0x1f6),'type':a181_0x49c081(0x20d),'description':a181_0x49c081(0x1e9)},{'name':'appcode','type':a181_0x49c081(0x20d),'description':a181_0x49c081(0x206)},{'name':a181_0x49c081(0x1e4),'type':a181_0x49c081(0x20d),'description':'Target\x20environment','enum':[...RABETBASE_ENV_VALUES]},{'name':'apiDir','type':a181_0x49c081(0x20d),'description':'API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile'},{'name':a181_0x49c081(0x1eb),'type':a181_0x49c081(0x20d),'description':'Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a181_0x49c081(0x201),'type':a181_0x49c081(0x1f9),'description':'Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile'},{'name':'riskLevel','type':a181_0x49c081(0x20d),'description':'Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RISK_LEVEL_VALUES]},{'name':'locale','type':'string','description':a181_0x49c081(0x1fc)}];function isRecord(_0x5e6d1d){return!!_0x5e6d1d&&typeof _0x5e6d1d==='object'&&!Array['isArray'](_0x5e6d1d);}function assertValidAppcode(_0x4edd4c){const _0x4dcdd4=a181_0x49c081,{valid:_0x45d421,message:_0x9a27ef}=validateAppcode(_0x4edd4c);if(!_0x45d421)throw CliErrors[_0x4dcdd4(0x1d7)]('Invalid\x20appcode:\x20'+_0x4edd4c,_0x9a27ef);}function sanitizeProfile(_0x5db1c5){if(!isRecord(_0x5db1c5))return{};const _0x1d3fe4={};for(const _0x41a08e of SAFE_PROFILE_KEYS){if(_0x5db1c5[_0x41a08e]!==undefined)_0x1d3fe4[_0x41a08e]=_0x5db1c5[_0x41a08e];}return _0x1d3fe4;}function cloneProfile(_0x823b53){return isRecord(_0x823b53)?{..._0x823b53}:{};}function a181_0x1dab(_0x1057dc,_0x4a49da){_0x1057dc=_0x1057dc-0x1d6;const _0x3736ab=a181_0x3736();let _0x1dab48=_0x3736ab[_0x1057dc];return _0x1dab48;}function collectWorkspaceProfileOverrides(_0x562dae){const _0x561fa4=a181_0x49c081,_0x22a90f={},_0x3a555f=_0x562dae[_0x561fa4(0x1e5)](_0x561fa4(0x1e4)),_0x31c917=_0x562dae[_0x561fa4(0x1e5)](_0x561fa4(0x1e3)),_0x3d73d2=_0x562dae['str'](_0x561fa4(0x1eb)),_0x17e213=_0x562dae[_0x561fa4(0x1dd)](_0x561fa4(0x201)),_0x5b7a31=_0x562dae[_0x561fa4(0x1e5)](_0x561fa4(0x20a)),_0x5f3f2c=_0x562dae[_0x561fa4(0x1e5)](_0x561fa4(0x207));if(_0x3a555f)_0x22a90f[_0x561fa4(0x1e4)]=_0x3a555f;if(_0x31c917)_0x22a90f[_0x561fa4(0x1e3)]=_0x31c917;if(_0x3d73d2)_0x22a90f[_0x561fa4(0x1f3)]=_0x3d73d2;if(_0x17e213!==undefined&&_0x17e213!=='')_0x22a90f[_0x561fa4(0x201)]=Number(_0x17e213);if(_0x5b7a31)_0x22a90f['riskLevel']=_0x5b7a31;if(_0x5f3f2c)_0x22a90f[_0x561fa4(0x207)]=_0x5f3f2c;return _0x22a90f;}async function validateWorkspaceArgs(_0xb2aa07){const _0x4d7a21=a181_0x49c081,_0x19e296=_0xb2aa07[_0x4d7a21(0x1e5)]('app')[_0x4d7a21(0x1de)](),_0x486099=_0xb2aa07[_0x4d7a21(0x1e5)]('appcode')['trim']();if(!_0x19e296&&!_0x486099)throw CliErrors[_0x4d7a21(0x1d7)](_0x4d7a21(0x1f4),'Use\x20`'+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'+CLI_BIN_NAME+_0x4d7a21(0x208));if(_0x486099)assertValidAppcode(_0x486099);}function resolveKnownApps(){const _0x272153=a181_0x49c081,{config:_0x2066f2,layers:_0x33b413}=readRawConfigWithLayers(),_0x66daff=isRecord(_0x2066f2['apps'])?_0x2066f2[_0x272153(0x1ed)]:{},_0x378e1f=isRecord(_0x33b413['globalConfig'][_0x272153(0x1ed)])?_0x33b413[_0x272153(0x1dc)][_0x272153(0x1ed)]:{};return{..._0x378e1f,..._0x66daff};}async function configureWorkspace(_0x5a2395,_0x345aa8){const _0x5a3e56=a181_0x49c081,_0xb98535=_0x5a2395[_0x5a3e56(0x1e5)](_0x5a3e56(0x1f6))[_0x5a3e56(0x1de)](),_0xcad01d=_0x5a2395[_0x5a3e56(0x1e5)](_0x5a3e56(0x20b))['trim'](),_0x52cf5e=_0xb98535||_0xcad01d;if(!_0x52cf5e)throw CliErrors[_0x5a3e56(0x1d7)](_0x5a3e56(0x1f4),_0x5a3e56(0x1da)+CLI_BIN_NAME+_0x5a3e56(0x1df)+CLI_BIN_NAME+_0x5a3e56(0x208));if(_0xcad01d)assertValidAppcode(_0xcad01d);const _0x3b8fd4=resolveWriteConfigPath(_0x5a3e56(0x1d8)),_0x68c1d2=readConfigFile(_0x3b8fd4),_0x1de465=resolveKnownApps(),_0x3c573f=isRecord(_0x68c1d2[_0x5a3e56(0x1ed)])?{..._0x68c1d2[_0x5a3e56(0x1ed)]}:{},_0x450208=cloneProfile(_0x3c573f[_0x52cf5e]),_0x14176e=sanitizeProfile(_0x1de465[_0x52cf5e]),_0xdea612=_0xcad01d?{}:_0x14176e,_0x520ac0=_0xcad01d||_0xdea612[_0x5a3e56(0x20b)];if(!_0x520ac0){const _0x2a249d=Object[_0x5a3e56(0x1f1)](_0x1de465),_0x1fea7f=_0x2a249d[_0x5a3e56(0x1f7)]===0x0?_0x5a3e56(0x1da)+CLI_BIN_NAME+_0x5a3e56(0x205)+_0x345aa8+_0x5a3e56(0x1f0)+_0x52cf5e+_0x5a3e56(0x1e8):_0x5a3e56(0x1e2)+_0x2a249d['join'](',\x20');throw CliErrors[_0x5a3e56(0x1d7)](_0x5a3e56(0x209)+_0x52cf5e+_0x5a3e56(0x1e6),_0x1fea7f);}assertValidAppcode(String(_0x520ac0));const _0x1f1a7d={..._0xdea612,..._0x450208,'appcode':String(_0x520ac0),...collectWorkspaceProfileOverrides(_0x5a2395)};return _0x3c573f[_0x52cf5e]=_0x1f1a7d,_0x68c1d2[_0x5a3e56(0x1ed)]=_0x3c573f,_0x68c1d2['defaultApp']=_0x52cf5e,delete _0x68c1d2[_0x5a3e56(0x20b)],delete _0x68c1d2['app'],_0x1f1a7d[_0x5a3e56(0x1e4)]&&(_0x68c1d2[_0x5a3e56(0x1e4)]=_0x1f1a7d['env']),writeConfigFile(_0x3b8fd4,_0x68c1d2),{'ok':!![],'message':_0x5a3e56(0x1f8)+(_0x345aa8===_0x5a3e56(0x1fe)?_0x5a3e56(0x200):_0x5a3e56(0x203))+':\x20'+_0x52cf5e+_0x5a3e56(0x1d6)+_0x1f1a7d['appcode']+').\x20Config:\x20'+_0x3b8fd4+_0x5a3e56(0x1ef),'data':{'operation':_0x5a3e56(0x1fa)+_0x345aa8,'configPath':_0x3b8fd4,'app':_0x52cf5e,'appcode':_0x1f1a7d['appcode'],'env':_0x1f1a7d['env']??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':'workspace','command':'init','description':'Initialize\x20the\x20current\x20workspace\x20app\x20binding','risk':a181_0x49c081(0x1ff),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x5a2a0e=>configureWorkspace(_0x5a2a0e,'init')},workspaceUseDefinition={'service':a181_0x49c081(0x1f2),'command':a181_0x49c081(0x1ec),'description':'Switch\x20the\x20current\x20workspace\x20app\x20binding','risk':a181_0x49c081(0x1ff),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x3c2786=>configureWorkspace(_0x3c2786,a181_0x49c081(0x1ec))};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
1
+ function a181_0x5c4d(){const _0x22cc1a=['64YmIWYO','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','str','19582qjmuMR','app','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','295827YxCrBX','apiDir','\x20workspace\x20use\x20--app\x20<name>`.','trim','\x22\x20not\x20found.','use','join','16kbecXb','Missing\x20workspace\x20app\x20selector.','5Yxfhva','.\x20Credentials:\x20not\x20written.','project','format','App\x20\x22','number','17141399reYyco','Target\x20environment','validation','Use\x20`','1046715yWiKIG','workspace','string','appcode','Switch\x20the\x20current\x20workspace\x20app\x20binding','Invalid\x20appcode:\x20','Workspace\x20','pageSize','locale','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','keys','Initialize\x20the\x20current\x20workspace\x20app\x20binding','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','workspace.','object','write','defaultApp','env','init','\x20(appcode:\x20','3862470ppfyby','1130630GeXQsX','apps','81JpgJFE','riskLevel','442107kEhlTQ','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','\x20--appcode\x20<code>`.','isArray','API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile','flag','globalConfig','\x20workspace\x20','Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile'];a181_0x5c4d=function(){return _0x22cc1a;};return a181_0x5c4d();}const a181_0x36751e=a181_0x7a0f;(function(_0x28aa23,_0x30f6b7){const _0x5185ac=a181_0x7a0f,_0x5c0feb=_0x28aa23();while(!![]){try{const _0x3344b7=parseInt(_0x5185ac(0x114))/0x1*(parseInt(_0x5185ac(0xe7))/0x2)+parseInt(_0x5185ac(0xfd))/0x3*(-parseInt(_0x5185ac(0xf1))/0x4)+parseInt(_0x5185ac(0xf3))/0x5*(-parseInt(_0x5185ac(0x111))/0x6)+parseInt(_0x5185ac(0xea))/0x7*(parseInt(_0x5185ac(0x11f))/0x8)+-parseInt(_0x5185ac(0x116))/0x9+parseInt(_0x5185ac(0x112))/0xa+parseInt(_0x5185ac(0xf9))/0xb;if(_0x3344b7===_0x30f6b7)break;else _0x5c0feb['push'](_0x5c0feb['shift']());}catch(_0x2486af){_0x5c0feb['push'](_0x5c0feb['shift']());}}}(a181_0x5c4d,0xae53b));function a181_0x7a0f(_0x38d276,_0x2f2db7){_0x38d276=_0x38d276-0xe6;const _0x5c4d48=a181_0x5c4d();let _0x7a0f5b=_0x5c4d48[_0x38d276];return _0x7a0f5b;}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+a181_0x36751e(0x109),SAFE_PROFILE_KEYS=[a181_0x36751e(0x100),a181_0x36751e(0x10e),a181_0x36751e(0xeb),a181_0x36751e(0xf6),'pageSize',a181_0x36751e(0x115),a181_0x36751e(0x105)],workspaceFlags=[{'name':a181_0x36751e(0xe8),'type':'string','description':a181_0x36751e(0xe9)},{'name':a181_0x36751e(0x100),'type':a181_0x36751e(0xff),'description':a181_0x36751e(0x106)},{'name':a181_0x36751e(0x10e),'type':'string','description':a181_0x36751e(0xfa),'enum':[...RABETBASE_ENV_VALUES]},{'name':a181_0x36751e(0xeb),'type':'string','description':a181_0x36751e(0x11a)},{'name':'defaultFormat','type':a181_0x36751e(0xff),'description':'Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a181_0x36751e(0x104),'type':a181_0x36751e(0xf8),'description':a181_0x36751e(0x11e)},{'name':a181_0x36751e(0x115),'type':a181_0x36751e(0xff),'description':a181_0x36751e(0x120),'enum':[...RISK_LEVEL_VALUES]},{'name':a181_0x36751e(0x105),'type':a181_0x36751e(0xff),'description':'Locale\x20for\x20this\x20workspace\x20app\x20profile'}];function isRecord(_0x56a87e){const _0x16c4d7=a181_0x36751e;return!!_0x56a87e&&typeof _0x56a87e===_0x16c4d7(0x10b)&&!Array[_0x16c4d7(0x119)](_0x56a87e);}function assertValidAppcode(_0x5c3418){const _0x3334f9=a181_0x36751e,{valid:_0x8c9633,message:_0x25bb2e}=validateAppcode(_0x5c3418);if(!_0x8c9633)throw CliErrors[_0x3334f9(0xfb)](_0x3334f9(0x102)+_0x5c3418,_0x25bb2e);}function sanitizeProfile(_0x26dfaf){if(!isRecord(_0x26dfaf))return{};const _0x4efcf9={};for(const _0x54ecce of SAFE_PROFILE_KEYS){if(_0x26dfaf[_0x54ecce]!==undefined)_0x4efcf9[_0x54ecce]=_0x26dfaf[_0x54ecce];}return _0x4efcf9;}function cloneProfile(_0x11a57c){return isRecord(_0x11a57c)?{..._0x11a57c}:{};}function collectWorkspaceProfileOverrides(_0x59b1fb){const _0x2bd4aa=a181_0x36751e,_0x247a2e={},_0x3463c7=_0x59b1fb['str'](_0x2bd4aa(0x10e)),_0x50aeff=_0x59b1fb[_0x2bd4aa(0xe6)](_0x2bd4aa(0xeb)),_0x40719f=_0x59b1fb[_0x2bd4aa(0xe6)]('defaultFormat'),_0x28267f=_0x59b1fb[_0x2bd4aa(0x11b)](_0x2bd4aa(0x104)),_0x13446f=_0x59b1fb['str'](_0x2bd4aa(0x115)),_0x59cbf1=_0x59b1fb[_0x2bd4aa(0xe6)](_0x2bd4aa(0x105));if(_0x3463c7)_0x247a2e[_0x2bd4aa(0x10e)]=_0x3463c7;if(_0x50aeff)_0x247a2e[_0x2bd4aa(0xeb)]=_0x50aeff;if(_0x40719f)_0x247a2e['format']=_0x40719f;if(_0x28267f!==undefined&&_0x28267f!=='')_0x247a2e[_0x2bd4aa(0x104)]=Number(_0x28267f);if(_0x13446f)_0x247a2e[_0x2bd4aa(0x115)]=_0x13446f;if(_0x59cbf1)_0x247a2e[_0x2bd4aa(0x105)]=_0x59cbf1;return _0x247a2e;}async function validateWorkspaceArgs(_0x2a5057){const _0x326c0d=a181_0x36751e,_0x5c78b=_0x2a5057[_0x326c0d(0xe6)](_0x326c0d(0xe8))['trim'](),_0x3279f6=_0x2a5057[_0x326c0d(0xe6)](_0x326c0d(0x100))['trim']();if(!_0x5c78b&&!_0x3279f6)throw CliErrors['validation']('Missing\x20workspace\x20app\x20selector.',_0x326c0d(0xfc)+CLI_BIN_NAME+_0x326c0d(0x117)+CLI_BIN_NAME+_0x326c0d(0xec));if(_0x3279f6)assertValidAppcode(_0x3279f6);}function resolveKnownApps(){const _0x1fb8e0=a181_0x36751e,{config:_0x5c89f1,layers:_0x13a514}=readRawConfigWithLayers(),_0x157306=isRecord(_0x5c89f1['apps'])?_0x5c89f1[_0x1fb8e0(0x113)]:{},_0x2c072d=isRecord(_0x13a514[_0x1fb8e0(0x11c)][_0x1fb8e0(0x113)])?_0x13a514[_0x1fb8e0(0x11c)][_0x1fb8e0(0x113)]:{};return{..._0x2c072d,..._0x157306};}async function configureWorkspace(_0x52ecd3,_0x520cc7){const _0x5b170e=a181_0x36751e,_0x211840=_0x52ecd3['str'](_0x5b170e(0xe8))[_0x5b170e(0xed)](),_0x209f4c=_0x52ecd3[_0x5b170e(0xe6)](_0x5b170e(0x100))[_0x5b170e(0xed)](),_0x57929e=_0x211840||_0x209f4c;if(!_0x57929e)throw CliErrors['validation'](_0x5b170e(0xf2),_0x5b170e(0xfc)+CLI_BIN_NAME+_0x5b170e(0x117)+CLI_BIN_NAME+_0x5b170e(0xec));if(_0x209f4c)assertValidAppcode(_0x209f4c);const _0xbc4185=resolveWriteConfigPath(_0x5b170e(0xf5)),_0x397211=readConfigFile(_0xbc4185),_0x1db72a=resolveKnownApps(),_0x22766e=isRecord(_0x397211[_0x5b170e(0x113)])?{..._0x397211[_0x5b170e(0x113)]}:{},_0x221740=cloneProfile(_0x22766e[_0x57929e]),_0x25fa4a=sanitizeProfile(_0x1db72a[_0x57929e]),_0xcbc499=_0x209f4c?{}:_0x25fa4a,_0x2af131=_0x209f4c||_0xcbc499['appcode'];if(!_0x2af131){const _0x4337a4=Object[_0x5b170e(0x107)](_0x1db72a),_0x585af1=_0x4337a4['length']===0x0?_0x5b170e(0xfc)+CLI_BIN_NAME+_0x5b170e(0x11d)+_0x520cc7+'\x20--app\x20'+_0x57929e+_0x5b170e(0x118):'Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20'+_0x4337a4[_0x5b170e(0xf0)](',\x20');throw CliErrors[_0x5b170e(0xfb)](_0x5b170e(0xf7)+_0x57929e+_0x5b170e(0xee),_0x585af1);}assertValidAppcode(String(_0x2af131));const _0x226347={..._0xcbc499,..._0x221740,'appcode':String(_0x2af131),...collectWorkspaceProfileOverrides(_0x52ecd3)};return _0x22766e[_0x57929e]=_0x226347,_0x397211[_0x5b170e(0x113)]=_0x22766e,_0x397211[_0x5b170e(0x10d)]=_0x57929e,delete _0x397211[_0x5b170e(0x100)],delete _0x397211[_0x5b170e(0xe8)],_0x226347[_0x5b170e(0x10e)]&&(_0x397211[_0x5b170e(0x10e)]=_0x226347[_0x5b170e(0x10e)]),writeConfigFile(_0xbc4185,_0x397211),{'ok':!![],'message':_0x5b170e(0x103)+(_0x520cc7==='init'?'initialized':'updated')+':\x20'+_0x57929e+_0x5b170e(0x110)+_0x226347[_0x5b170e(0x100)]+').\x20Config:\x20'+_0xbc4185+_0x5b170e(0xf4),'data':{'operation':_0x5b170e(0x10a)+_0x520cc7,'configPath':_0xbc4185,'app':_0x57929e,'appcode':_0x226347[_0x5b170e(0x100)],'env':_0x226347[_0x5b170e(0x10e)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':'workspace','command':a181_0x36751e(0x10f),'description':a181_0x36751e(0x108),'risk':a181_0x36751e(0x10c),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x555005=>configureWorkspace(_0x555005,a181_0x36751e(0x10f))},workspaceUseDefinition={'service':a181_0x36751e(0xfe),'command':a181_0x36751e(0xef),'description':a181_0x36751e(0x101),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x8a20d8=>configureWorkspace(_0x8a20d8,a181_0x36751e(0xef))};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
@@ -1 +1 @@
1
- const a182_0xa8f236=a182_0x7734;function a182_0x7734(_0x2f2eff,_0x516e8a){_0x2f2eff=_0x2f2eff-0x11c;const _0x3dfc42=a182_0x3dfc();let _0x77344d=_0x3dfc42[_0x2f2eff];return _0x77344d;}(function(_0x49c86b,_0x55153a){const _0x202678=a182_0x7734,_0x573ce6=_0x49c86b();while(!![]){try{const _0x291763=-parseInt(_0x202678(0x127))/0x1+parseInt(_0x202678(0x125))/0x2*(-parseInt(_0x202678(0x11f))/0x3)+parseInt(_0x202678(0x122))/0x4*(-parseInt(_0x202678(0x123))/0x5)+-parseInt(_0x202678(0x12b))/0x6*(parseInt(_0x202678(0x124))/0x7)+-parseInt(_0x202678(0x121))/0x8*(parseInt(_0x202678(0x120))/0x9)+parseInt(_0x202678(0x12a))/0xa*(-parseInt(_0x202678(0x11e))/0xb)+parseInt(_0x202678(0x126))/0xc;if(_0x291763===_0x55153a)break;else _0x573ce6['push'](_0x573ce6['shift']());}catch(_0x1c6146){_0x573ce6['push'](_0x573ce6['shift']());}}}(a182_0x3dfc,0x280f8));import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';function a182_0x3dfc(){const _0x57b5e3=['name','App\x20profile\x20name\x20to\x20remove','high-risk-write','4763ZLNSeB','6PEIlEY','40113dirmJa','368eAuvXh','972FSDazl','6700kSnanZ','7sfLZSa','19562fcaWKw','14470296WIivFi','4540JCymad','remove','workspace\x20remove','6590zWqWLs','1210074yCjWEh'];a182_0x3dfc=function(){return _0x57b5e3;};return a182_0x3dfc();}export const workspaceRemoveDefinition={'service':'workspace','command':a182_0xa8f236(0x128),'description':'Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','risk':a182_0xa8f236(0x11d),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a182_0xa8f236(0x12c),'description':a182_0xa8f236(0x11c),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x289c07=>validateAppName(_0x289c07,a182_0xa8f236(0x129)),'execute':_0xa456af=>runAppRemove(_0xa456af,a182_0xa8f236(0x129))};
1
+ function a182_0x5df3(){const _0x53d6f9=['Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','workspace','3773862vcMWFT','4390992VeTjcZ','16PPFlFF','1201930epySbV','492264eGtXKr','34982PkiBRZ','2087085HNhKKI','431324YqxESy','high-risk-write','name','3AWnWQu','remove'];a182_0x5df3=function(){return _0x53d6f9;};return a182_0x5df3();}function a182_0x1f4d(_0x35890c,_0x439258){_0x35890c=_0x35890c-0xf8;const _0x5df3ca=a182_0x5df3();let _0x1f4d6e=_0x5df3ca[_0x35890c];return _0x1f4d6e;}const a182_0x3cc9e2=a182_0x1f4d;(function(_0x4e7d5b,_0x449c60){const _0x47721e=a182_0x1f4d,_0x12d79d=_0x4e7d5b();while(!![]){try{const _0x1dac1d=parseInt(_0x47721e(0xfc))/0x1+-parseInt(_0x47721e(0xfd))/0x2*(-parseInt(_0x47721e(0x102))/0x3)+parseInt(_0x47721e(0xff))/0x4+-parseInt(_0x47721e(0xfb))/0x5+parseInt(_0x47721e(0xf8))/0x6+parseInt(_0x47721e(0xfe))/0x7+-parseInt(_0x47721e(0xfa))/0x8*(parseInt(_0x47721e(0xf9))/0x9);if(_0x1dac1d===_0x449c60)break;else _0x12d79d['push'](_0x12d79d['shift']());}catch(_0xff35cf){_0x12d79d['push'](_0x12d79d['shift']());}}}(a182_0x5df3,0x5036c));import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const workspaceRemoveDefinition={'service':a182_0x3cc9e2(0x105),'command':a182_0x3cc9e2(0x103),'description':a182_0x3cc9e2(0x104),'risk':a182_0x3cc9e2(0x100),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a182_0x3cc9e2(0x101),'description':'App\x20profile\x20name\x20to\x20remove','required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x25beb9=>validateAppName(_0x25beb9,'workspace\x20remove'),'execute':_0x21aebd=>runAppRemove(_0x21aebd,'workspace\x20remove')};
@@ -1 +1 @@
1
- const a183_0x59b812=a183_0x5efe;(function(_0x3fc460,_0x5b5efe){const _0x337dac=a183_0x5efe,_0x3f61a8=_0x3fc460();while(!![]){try{const _0xd5a3a7=parseInt(_0x337dac(0x71))/0x1*(-parseInt(_0x337dac(0x78))/0x2)+parseInt(_0x337dac(0x7c))/0x3*(parseInt(_0x337dac(0x68))/0x4)+-parseInt(_0x337dac(0x6a))/0x5+-parseInt(_0x337dac(0x66))/0x6+-parseInt(_0x337dac(0x88))/0x7+parseInt(_0x337dac(0x74))/0x8*(parseInt(_0x337dac(0x87))/0x9)+-parseInt(_0x337dac(0x7d))/0xa*(-parseInt(_0x337dac(0x7b))/0xb);if(_0xd5a3a7===_0x5b5efe)break;else _0x3f61a8['push'](_0x3f61a8['shift']());}catch(_0xb3c099){_0x3f61a8['push'](_0x3f61a8['shift']());}}}(a183_0x4664,0x29192));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=[a183_0x59b812(0x7a),a183_0x59b812(0x6d),a183_0x59b812(0x70),'format',a183_0x59b812(0x6b)];function a183_0x5efe(_0x101ea6,_0x32abcc){_0x101ea6=_0x101ea6-0x66;const _0x4664a3=a183_0x4664();let _0x5efe50=_0x4664a3[_0x101ea6];return _0x5efe50;}export const TOP_LEVEL_CONFIG_KEYS=new Set([a183_0x59b812(0x8b),a183_0x59b812(0x75),'locale',a183_0x59b812(0x82),'cookie','accessKey',a183_0x59b812(0x8d)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};function a183_0x4664(){const _0x12c3b0=['appcode','apps','apiDir','join','436080swFnRP','number','167224vMnPnH','Config\x20key\x20(','835680zHKEit','riskLevel','API\x20directory\x20path','accessKey','defaultFormat','length','locale','11NDXdqL','Auth\x20cookie','trim','623608zhOFny','env','keys','inherit','29406LECZOy','pageSize','cookie','146366VVBKlA','24pSVikk','130qFeZDe','defaultApp','string','Default\x20page\x20size','entries','format','en-US','zh-CN','Locale','app','36hFhdpY','1745401FzWFEX','has','Risk\x20level'];a183_0x4664=function(){return _0x12c3b0;};return a183_0x4664();}export function formatConfigKeyList(_0x2101a0){const _0xea1ac3=a183_0x59b812;return[..._0x2101a0][_0xea1ac3(0x8e)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x1474df){const _0x78277f=a183_0x59b812;return TOP_LEVEL_CONFIG_KEYS[_0x78277f(0x89)](_0x1474df);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x445f77=a183_0x59b812;return _0x445f77(0x69)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':a183_0x59b812(0x75),'apiDir':a183_0x59b812(0x8d),'cookie':'cookie','accessKey':a183_0x59b812(0x6d),'defaultFormat':a183_0x59b812(0x82),'pageSize':'pageSize','riskLevel':a183_0x59b812(0x6b),'locale':a183_0x59b812(0x70)};export function getAppProfileFlagDefs(){const _0x1c90aa=a183_0x59b812;return[{'name':_0x1c90aa(0x75),'type':_0x1c90aa(0x7f),'description':'Target\x20environment','enum':[...RABETBASE_ENV_VALUES]},{'name':'apiDir','type':_0x1c90aa(0x7f),'description':_0x1c90aa(0x6c)},{'name':'cookie','type':'string','description':_0x1c90aa(0x72),'hidden':!![]},{'name':_0x1c90aa(0x6d),'type':_0x1c90aa(0x7f),'description':'Access\x20key','hidden':!![]},{'name':_0x1c90aa(0x6e),'type':_0x1c90aa(0x7f),'description':'Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':'pageSize','type':_0x1c90aa(0x67),'description':_0x1c90aa(0x80)},{'name':_0x1c90aa(0x6b),'type':_0x1c90aa(0x7f),'description':_0x1c90aa(0x8a),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x1c90aa(0x70),'type':_0x1c90aa(0x7f),'description':_0x1c90aa(0x85)}];}export function collectAppProfileOverrides(_0x252cc9){const _0xf7c9a9=a183_0x59b812,_0x111ef3={};for(const [_0x1d2bf7,_0x3b938c]of Object[_0xf7c9a9(0x81)](APP_PROFILE_FLAG_KEY_MAP)){const _0x2c438d=_0x252cc9(_0x1d2bf7);if(!_0x2c438d)continue;_0x111ef3[_0x3b938c]=_0x3b938c===_0xf7c9a9(0x79)?Number(_0x2c438d):_0x2c438d;}return _0x111ef3;}export function buildAppProfileListFields(_0x331272){const _0x4e0fa3=a183_0x59b812;return{'env':_0x331272[_0x4e0fa3(0x75)]??null,'apiDir':_0x331272[_0x4e0fa3(0x8d)]??null,'hasCookie':!!_0x331272['cookie'],'hasAccessKey':!!_0x331272[_0x4e0fa3(0x6d)],'format':_0x331272['format']??null,'pageSize':_0x331272[_0x4e0fa3(0x79)]??null,'riskLevel':_0x331272[_0x4e0fa3(0x6b)]??null,'locale':_0x331272['locale']??null};}export function buildAppDoctorFields(_0xb53168,_0x5e303c){const _0xcc8354=a183_0x59b812;return{'env':{'value':_0xb53168['env']||_0x5e303c['env'],'source':_0xb53168['env']?_0xcc8354(0x86):'inherit'},'apiDir':{'value':_0xb53168[_0xcc8354(0x8d)]||_0x5e303c[_0xcc8354(0x8d)],'source':_0xb53168['apiDir']?_0xcc8354(0x86):_0xcc8354(0x77)},'cookie':{'value':_0xb53168[_0xcc8354(0x7a)]||_0x5e303c['cookie'],'source':_0xb53168['cookie']?_0xcc8354(0x86):_0xcc8354(0x77)},'accessKey':{'value':_0xb53168[_0xcc8354(0x6d)]||_0x5e303c[_0xcc8354(0x6d)],'source':_0xb53168[_0xcc8354(0x6d)]?'app':'inherit'}};}export function buildCanonicalAppConfig(_0x5c1b6c,_0x1ca9c3){const _0x2fdcef=a183_0x59b812,_0x1b94de=_0x5c1b6c['map'](_0xa4dd0b=>String(_0xa4dd0b||'')[_0x2fdcef(0x73)]())['filter'](Boolean);if(_0x1b94de[_0x2fdcef(0x6f)]===0x0)return{};const _0x53df2c={};for(const _0xdf8b70 of _0x1b94de){_0x53df2c[_0xdf8b70]=_0x1ca9c3?{'appcode':_0xdf8b70,'env':_0x1ca9c3}:{'appcode':_0xdf8b70};}return{'apps':_0x53df2c,'defaultApp':_0x1b94de[0x0]};}export function buildCanonicalProjectConfig(_0x1febaf,_0x4b12dc){const _0x52aeaf=a183_0x59b812,{appCodes:appCodes=[],env:_0x29c0d1,metadata:_0xdd0d31}=_0x4b12dc,_0x1b8b02={..._0x1febaf,..._0xdd0d31||{}};delete _0x1b8b02[_0x52aeaf(0x8b)],delete _0x1b8b02[_0x52aeaf(0x86)];if(_0x29c0d1)_0x1b8b02[_0x52aeaf(0x75)]=_0x29c0d1;else!_0x1b8b02['env']&&(_0x1b8b02['env']=DEFAULT_CONFIG_VALUES[_0x52aeaf(0x75)]);const _0x3feea6=buildCanonicalAppConfig(appCodes,_0x1b8b02[_0x52aeaf(0x75)]);return Object[_0x52aeaf(0x76)](_0x3feea6)[_0x52aeaf(0x6f)]>0x0&&(_0x1b8b02[_0x52aeaf(0x8c)]=_0x3feea6[_0x52aeaf(0x8c)],_0x1b8b02[_0x52aeaf(0x7e)]=_0x3feea6[_0x52aeaf(0x7e)]),_0x1b8b02;}const LOCALE_MAP={'zh':a183_0x59b812(0x84),'zh-cn':a183_0x59b812(0x84),'zh_cn':a183_0x59b812(0x84),'en':a183_0x59b812(0x83),'en-us':a183_0x59b812(0x83),'en_us':a183_0x59b812(0x83)};export function normalizeLocale(_0x193709){if(!_0x193709)return null;return LOCALE_MAP[_0x193709['toLowerCase']()]??null;}
1
+ const a183_0x1cbbb2=a183_0x1bb3;(function(_0x19f015,_0x4c9f2c){const _0x47049e=a183_0x1bb3,_0x470a98=_0x19f015();while(!![]){try{const _0x1c61c4=parseInt(_0x47049e(0x1f0))/0x1+parseInt(_0x47049e(0x1fc))/0x2*(-parseInt(_0x47049e(0x209))/0x3)+-parseInt(_0x47049e(0x1fb))/0x4+-parseInt(_0x47049e(0x207))/0x5+-parseInt(_0x47049e(0x204))/0x6+-parseInt(_0x47049e(0x213))/0x7*(-parseInt(_0x47049e(0x210))/0x8)+parseInt(_0x47049e(0x20a))/0x9*(parseInt(_0x47049e(0x1f9))/0xa);if(_0x1c61c4===_0x4c9f2c)break;else _0x470a98['push'](_0x470a98['shift']());}catch(_0x2a5efd){_0x470a98['push'](_0x470a98['shift']());}}}(a183_0x7eba,0xb4693));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RABETBASE_ENV_VALUES}from'../constant/env.js';import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{RISK_LEVEL_VALUES}from'../constant/risk.js';export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=['cookie',a183_0x1cbbb2(0x214),a183_0x1cbbb2(0x1f8),a183_0x1cbbb2(0x1f3),a183_0x1cbbb2(0x201)];function a183_0x7eba(){const _0x1a7702=['5360892OkjPIF','148102WDGjAr','app','defaultFormat','trim','filter','riskLevel','appcode','pageSize','1737168dxdlbT','Config\x20key\x20(','entries','2981065ioWZQz','defaultApp','15yyCilN','10633203azPSGQ','number','zh-CN','cookie','Target\x20environment','env','152ONyCwp','apiDir','length','283024hzfcrs','accessKey','toLowerCase','Risk\x20level','apps','Locale','1385507jBfyOA','string','Auth\x20cookie','format','map','inherit','Access\x20key','has','locale','10kUozWe','en-US'];a183_0x7eba=function(){return _0x1a7702;};return a183_0x7eba();}export const TOP_LEVEL_CONFIG_KEYS=new Set([a183_0x1cbbb2(0x202),a183_0x1cbbb2(0x20f),a183_0x1cbbb2(0x1f8),a183_0x1cbbb2(0x1f3),a183_0x1cbbb2(0x20d),'accessKey',a183_0x1cbbb2(0x211)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x287d1c){return[..._0x287d1c]['join'](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x3bd955){const _0x557696=a183_0x1cbbb2;return TOP_LEVEL_CONFIG_KEYS[_0x557696(0x1f7)](_0x3bd955);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x23b0a6=a183_0x1cbbb2;return _0x23b0a6(0x205)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':a183_0x1cbbb2(0x20f),'apiDir':a183_0x1cbbb2(0x211),'cookie':a183_0x1cbbb2(0x20d),'accessKey':a183_0x1cbbb2(0x214),'defaultFormat':a183_0x1cbbb2(0x1f3),'pageSize':a183_0x1cbbb2(0x203),'riskLevel':a183_0x1cbbb2(0x201),'locale':'locale'};export function getAppProfileFlagDefs(){const _0x18f492=a183_0x1cbbb2;return[{'name':_0x18f492(0x20f),'type':_0x18f492(0x1f1),'description':_0x18f492(0x20e),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x18f492(0x211),'type':'string','description':'API\x20directory\x20path'},{'name':_0x18f492(0x20d),'type':_0x18f492(0x1f1),'description':_0x18f492(0x1f2),'hidden':!![]},{'name':_0x18f492(0x214),'type':_0x18f492(0x1f1),'description':_0x18f492(0x1f6),'hidden':!![]},{'name':_0x18f492(0x1fe),'type':_0x18f492(0x1f1),'description':'Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0x18f492(0x203),'type':_0x18f492(0x20b),'description':'Default\x20page\x20size'},{'name':_0x18f492(0x201),'type':_0x18f492(0x1f1),'description':_0x18f492(0x216),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x18f492(0x1f8),'type':'string','description':_0x18f492(0x218)}];}export function collectAppProfileOverrides(_0x48ce21){const _0x192992=a183_0x1cbbb2,_0x570852={};for(const [_0x448177,_0x1b52d5]of Object[_0x192992(0x206)](APP_PROFILE_FLAG_KEY_MAP)){const _0x71b332=_0x48ce21(_0x448177);if(!_0x71b332)continue;_0x570852[_0x1b52d5]=_0x1b52d5===_0x192992(0x203)?Number(_0x71b332):_0x71b332;}return _0x570852;}export function buildAppProfileListFields(_0x14b72e){const _0x5f2e3a=a183_0x1cbbb2;return{'env':_0x14b72e['env']??null,'apiDir':_0x14b72e['apiDir']??null,'hasCookie':!!_0x14b72e[_0x5f2e3a(0x20d)],'hasAccessKey':!!_0x14b72e[_0x5f2e3a(0x214)],'format':_0x14b72e[_0x5f2e3a(0x1f3)]??null,'pageSize':_0x14b72e[_0x5f2e3a(0x203)]??null,'riskLevel':_0x14b72e[_0x5f2e3a(0x201)]??null,'locale':_0x14b72e['locale']??null};}export function buildAppDoctorFields(_0x24ad27,_0x2c0a01){const _0x4d2317=a183_0x1cbbb2;return{'env':{'value':_0x24ad27['env']||_0x2c0a01[_0x4d2317(0x20f)],'source':_0x24ad27['env']?_0x4d2317(0x1fd):_0x4d2317(0x1f5)},'apiDir':{'value':_0x24ad27[_0x4d2317(0x211)]||_0x2c0a01[_0x4d2317(0x211)],'source':_0x24ad27['apiDir']?_0x4d2317(0x1fd):_0x4d2317(0x1f5)},'cookie':{'value':_0x24ad27[_0x4d2317(0x20d)]||_0x2c0a01[_0x4d2317(0x20d)],'source':_0x24ad27[_0x4d2317(0x20d)]?_0x4d2317(0x1fd):_0x4d2317(0x1f5)},'accessKey':{'value':_0x24ad27['accessKey']||_0x2c0a01[_0x4d2317(0x214)],'source':_0x24ad27[_0x4d2317(0x214)]?_0x4d2317(0x1fd):_0x4d2317(0x1f5)}};}export function buildCanonicalAppConfig(_0x17f2a8,_0x5776ef){const _0x5e327d=a183_0x1cbbb2,_0x1ae078=_0x17f2a8[_0x5e327d(0x1f4)](_0x143182=>String(_0x143182||'')[_0x5e327d(0x1ff)]())[_0x5e327d(0x200)](Boolean);if(_0x1ae078[_0x5e327d(0x212)]===0x0)return{};const _0x5e9260={};for(const _0x8fce83 of _0x1ae078){_0x5e9260[_0x8fce83]=_0x5776ef?{'appcode':_0x8fce83,'env':_0x5776ef}:{'appcode':_0x8fce83};}return{'apps':_0x5e9260,'defaultApp':_0x1ae078[0x0]};}export function buildCanonicalProjectConfig(_0x4f9fee,_0x3fbc1e){const _0x38082d=a183_0x1cbbb2,{appCodes:appCodes=[],env:_0x329f97,metadata:_0x97a313}=_0x3fbc1e,_0x4efe91={..._0x4f9fee,..._0x97a313||{}};delete _0x4efe91['appcode'],delete _0x4efe91[_0x38082d(0x1fd)];if(_0x329f97)_0x4efe91[_0x38082d(0x20f)]=_0x329f97;else!_0x4efe91[_0x38082d(0x20f)]&&(_0x4efe91[_0x38082d(0x20f)]=DEFAULT_CONFIG_VALUES[_0x38082d(0x20f)]);const _0xcc81c5=buildCanonicalAppConfig(appCodes,_0x4efe91[_0x38082d(0x20f)]);return Object['keys'](_0xcc81c5)['length']>0x0&&(_0x4efe91['apps']=_0xcc81c5[_0x38082d(0x217)],_0x4efe91[_0x38082d(0x208)]=_0xcc81c5[_0x38082d(0x208)]),_0x4efe91;}function a183_0x1bb3(_0x447a81,_0x41d2da){_0x447a81=_0x447a81-0x1f0;const _0x7ebad8=a183_0x7eba();let _0x1bb3ad=_0x7ebad8[_0x447a81];return _0x1bb3ad;}const LOCALE_MAP={'zh':'zh-CN','zh-cn':a183_0x1cbbb2(0x20c),'zh_cn':a183_0x1cbbb2(0x20c),'en':a183_0x1cbbb2(0x1fa),'en-us':a183_0x1cbbb2(0x1fa),'en_us':'en-US'};export function normalizeLocale(_0x28d329){const _0x538c05=a183_0x1cbbb2;if(!_0x28d329)return null;return LOCALE_MAP[_0x28d329[_0x538c05(0x215)]()]??null;}
@@ -1 +1 @@
1
- function a184_0x9eca(){const _0x506bff=['96537uFBCft','2933073eAegSK','8XkSWaN','2898900tMZKrw','99szrszl','https://g.lovrabet.com/dist/rabetbase-cli/config/index.json','3CASISd','3887051SMkeqe','258RWCRqz','10WiWmdJ','65360jLgMDF','2131400NXiGRI','1334884vdXIJR'];a184_0x9eca=function(){return _0x506bff;};return a184_0x9eca();}function a184_0x549b(_0x14da45,_0x12631b){_0x14da45=_0x14da45-0x79;const _0x9ecaff=a184_0x9eca();let _0x549b90=_0x9ecaff[_0x14da45];return _0x549b90;}const a184_0x126a35=a184_0x549b;(function(_0x5983bb,_0x1be19e){const _0x5c90c3=a184_0x549b,_0x5e371e=_0x5983bb();while(!![]){try{const _0x1cf86c=-parseInt(_0x5c90c3(0x7f))/0x1+-parseInt(_0x5c90c3(0x7e))/0x2*(-parseInt(_0x5c90c3(0x85))/0x3)+parseInt(_0x5c90c3(0x7d))/0x4+parseInt(_0x5c90c3(0x7c))/0x5*(parseInt(_0x5c90c3(0x7a))/0x6)+-parseInt(_0x5c90c3(0x79))/0x7*(-parseInt(_0x5c90c3(0x81))/0x8)+-parseInt(_0x5c90c3(0x80))/0x9*(-parseInt(_0x5c90c3(0x7b))/0xa)+parseInt(_0x5c90c3(0x83))/0xb*(-parseInt(_0x5c90c3(0x82))/0xc);if(_0x1cf86c===_0x1be19e)break;else _0x5e371e['push'](_0x5e371e['shift']());}catch(_0x552577){_0x5e371e['push'](_0x5e371e['shift']());}}}(a184_0x9eca,0x5b082));export const CLI_VERSION_POLICY_URL=a184_0x126a35(0x84);
1
+ const a184_0xeca7d2=a184_0x1e50;function a184_0x1e50(_0x2d8fb1,_0x1fe31b){_0x2d8fb1=_0x2d8fb1-0xc3;const _0x2cabe6=a184_0x2cab();let _0x1e5072=_0x2cabe6[_0x2d8fb1];return _0x1e5072;}(function(_0x3dd6cc,_0x6595fe){const _0xd4de7=a184_0x1e50,_0x290996=_0x3dd6cc();while(!![]){try{const _0x277662=parseInt(_0xd4de7(0xc7))/0x1+-parseInt(_0xd4de7(0xc3))/0x2+parseInt(_0xd4de7(0xcb))/0x3+-parseInt(_0xd4de7(0xc6))/0x4*(parseInt(_0xd4de7(0xc8))/0x5)+parseInt(_0xd4de7(0xc9))/0x6+parseInt(_0xd4de7(0xc4))/0x7+parseInt(_0xd4de7(0xc5))/0x8;if(_0x277662===_0x6595fe)break;else _0x290996['push'](_0x290996['shift']());}catch(_0x32d0aa){_0x290996['push'](_0x290996['shift']());}}}(a184_0x2cab,0x95126));export const CLI_VERSION_POLICY_URL=a184_0xeca7d2(0xca);function a184_0x2cab(){const _0x524cb1=['1495690xktpTd','2637460AFDfky','3134672CtOKGg','52oxXGHQ','593991wyeKYH','299900SIurob','3568428jMEsHf','https://g.lovrabet.com/dist/rabetbase-cli/config/index.json','542520BliwQq'];a184_0x2cab=function(){return _0x524cb1;};return a184_0x2cab();}