@lovrabet/rabetbase-cli 2.4.6 → 2.4.7-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 (297) 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/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/business-groups.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-refresh-start.js +1 -1
  88. package/lib/commands/db/diff-refresh-status.js +1 -1
  89. package/lib/commands/db/diff.js +1 -1
  90. package/lib/commands/db/index.js +1 -1
  91. package/lib/commands/db/list.js +1 -1
  92. package/lib/commands/db/shared.js +1 -1
  93. package/lib/commands/db/tables.js +1 -1
  94. package/lib/commands/db/test.js +1 -1
  95. package/lib/commands/db/update.js +1 -1
  96. package/lib/commands/doctor.js +1 -1
  97. package/lib/commands/file/index.js +1 -1
  98. package/lib/commands/init/index.js +1 -1
  99. package/lib/commands/issue/index.js +1 -1
  100. package/lib/commands/issue/nudge.js +1 -1
  101. package/lib/commands/issue/report.js +1 -1
  102. package/lib/commands/issue/shared.js +1 -1
  103. package/lib/commands/kb/create.js +1 -1
  104. package/lib/commands/kb/delete.js +1 -1
  105. package/lib/commands/kb/detail.js +1 -1
  106. package/lib/commands/kb/index.js +1 -1
  107. package/lib/commands/kb/list.js +1 -1
  108. package/lib/commands/kb/search.d.ts +2 -0
  109. package/lib/commands/kb/search.js +1 -0
  110. package/lib/commands/kb/shared.js +1 -1
  111. package/lib/commands/kb/update.js +1 -1
  112. package/lib/commands/logs/index.js +1 -1
  113. package/lib/commands/menu/asset-update.js +1 -1
  114. package/lib/commands/menu/delete.js +1 -1
  115. package/lib/commands/menu/external-link-create.js +1 -1
  116. package/lib/commands/menu/external-link-update.js +1 -1
  117. package/lib/commands/menu/group-create.js +1 -1
  118. package/lib/commands/menu/group-update.js +1 -1
  119. package/lib/commands/menu/index.js +1 -1
  120. package/lib/commands/menu/list.js +1 -1
  121. package/lib/commands/menu/move.js +1 -1
  122. package/lib/commands/menu/regroup-start.js +1 -1
  123. package/lib/commands/menu/rename.js +1 -1
  124. package/lib/commands/menu/shared/compare-table.js +1 -1
  125. package/lib/commands/menu/shared/delete-plan.js +1 -1
  126. package/lib/commands/menu/shared/facts.js +1 -1
  127. package/lib/commands/menu/shared/index.js +1 -1
  128. package/lib/commands/menu/shared/inquirer.js +1 -1
  129. package/lib/commands/menu/shared/local-pages.js +1 -1
  130. package/lib/commands/menu/shared/logic.js +1 -1
  131. package/lib/commands/menu/shared/mutations.js +1 -1
  132. package/lib/commands/menu/shared/service.js +1 -1
  133. package/lib/commands/menu/shared/sync-core.js +1 -1
  134. package/lib/commands/menu/shared/update-core.js +1 -1
  135. package/lib/commands/menu/shared/valid-url.js +1 -1
  136. package/lib/commands/menu/sync.js +1 -1
  137. package/lib/commands/menu/visibility-update.js +1 -1
  138. package/lib/commands/notification/config-create.js +1 -1
  139. package/lib/commands/notification/config-delete.js +1 -1
  140. package/lib/commands/notification/config-list.js +1 -1
  141. package/lib/commands/notification/config-update.js +1 -1
  142. package/lib/commands/notification/index.js +1 -1
  143. package/lib/commands/notification/shared.js +1 -1
  144. package/lib/commands/ocr/index.js +1 -1
  145. package/lib/commands/page/create.js +1 -1
  146. package/lib/commands/page/custom/detail.js +1 -1
  147. package/lib/commands/page/custom/list.js +1 -1
  148. package/lib/commands/page/custom/publish.js +1 -1
  149. package/lib/commands/page/custom/shared.js +1 -1
  150. package/lib/commands/page/custom/syntax.js +1 -1
  151. package/lib/commands/page/custom/template.js +1 -1
  152. package/lib/commands/page/custom/update.js +1 -1
  153. package/lib/commands/page/data-list-status.js +1 -1
  154. package/lib/commands/page/generate-start.js +1 -1
  155. package/lib/commands/page/generate-status.js +1 -1
  156. package/lib/commands/page/index.js +1 -1
  157. package/lib/commands/page/pull.js +1 -1
  158. package/lib/commands/page/push.js +1 -1
  159. package/lib/commands/page/relation-audit.js +1 -1
  160. package/lib/commands/page/restore.js +1 -1
  161. package/lib/commands/page/shared.js +1 -1
  162. package/lib/commands/page/sync.js +1 -1
  163. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  164. package/lib/commands/project/create/format-elapsed.js +1 -1
  165. package/lib/commands/project/create/main.js +1 -1
  166. package/lib/commands/project/create/materialize-project-template.js +1 -1
  167. package/lib/commands/project/create/project-name.js +1 -1
  168. package/lib/commands/project/create/project-template-archive.js +1 -1
  169. package/lib/commands/project/create/project-template-path.js +1 -1
  170. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  171. package/lib/commands/project/create/use-format-code.js +1 -1
  172. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  173. package/lib/commands/project/index.js +1 -1
  174. package/lib/commands/project/upgrade.js +1 -1
  175. package/lib/commands/registry.js +1 -1
  176. package/lib/commands/role/delete.js +1 -1
  177. package/lib/commands/role/detail.js +1 -1
  178. package/lib/commands/role/index.js +1 -1
  179. package/lib/commands/role/list.js +1 -1
  180. package/lib/commands/role/shared.js +1 -1
  181. package/lib/commands/role/update.js +1 -1
  182. package/lib/commands/role/user-add.js +1 -1
  183. package/lib/commands/role/user-remove.js +1 -1
  184. package/lib/commands/role/user-resolve.js +1 -1
  185. package/lib/commands/run/index.js +1 -1
  186. package/lib/commands/schema.js +1 -1
  187. package/lib/commands/sql/create.js +1 -1
  188. package/lib/commands/sql/delete.js +1 -1
  189. package/lib/commands/sql/detail.js +1 -1
  190. package/lib/commands/sql/exec.js +1 -1
  191. package/lib/commands/sql/index.js +1 -1
  192. package/lib/commands/sql/list.js +1 -1
  193. package/lib/commands/sql/pull.js +1 -1
  194. package/lib/commands/sql/push.js +1 -1
  195. package/lib/commands/sql/shared.js +1 -1
  196. package/lib/commands/sql/status.js +1 -1
  197. package/lib/commands/sql/validate.js +1 -1
  198. package/lib/commands/task/index.js +1 -1
  199. package/lib/commands/task/status.js +1 -1
  200. package/lib/commands/tenant/index.js +1 -1
  201. package/lib/commands/tenant/members-list.js +1 -1
  202. package/lib/commands/tenant/shared.js +1 -1
  203. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  204. package/lib/commands/user-account/index.js +1 -1
  205. package/lib/commands/workspace/add.js +1 -1
  206. package/lib/commands/workspace/index.js +1 -1
  207. package/lib/commands/workspace/remove.js +1 -1
  208. package/lib/config/schema.js +1 -1
  209. package/lib/constant/cdn.js +1 -1
  210. package/lib/constant/cli.js +1 -1
  211. package/lib/constant/defaults.js +1 -1
  212. package/lib/constant/domain.js +1 -1
  213. package/lib/constant/env.js +1 -1
  214. package/lib/constant/output.js +1 -1
  215. package/lib/constant/paths.js +1 -1
  216. package/lib/constant/risk.js +1 -1
  217. package/lib/context/app-resolver.js +1 -1
  218. package/lib/context/auth-resolver.js +1 -1
  219. package/lib/context/config-loader.js +1 -1
  220. package/lib/context.js +1 -1
  221. package/lib/core/alias-resolver.js +1 -1
  222. package/lib/core/api-client.d.ts +16 -0
  223. package/lib/core/api-client.js +1 -1
  224. package/lib/core/bff/config.js +1 -1
  225. package/lib/core/bff/file-system.js +1 -1
  226. package/lib/core/bff/hash.js +1 -1
  227. package/lib/core/bff/lock.js +1 -1
  228. package/lib/core/bff/utils.js +1 -1
  229. package/lib/core/db-resolver.js +1 -1
  230. package/lib/core/page/file-system.js +1 -1
  231. package/lib/core/page/hash.js +1 -1
  232. package/lib/core/page/lock.js +1 -1
  233. package/lib/core/sql-index-auditor.js +1 -1
  234. package/lib/core/sql-sync/config.js +1 -1
  235. package/lib/core/sql-sync/file-system.js +1 -1
  236. package/lib/core/sql-sync/hash.js +1 -1
  237. package/lib/core/sql-sync/lock.js +1 -1
  238. package/lib/core/sql-sync/utils.js +1 -1
  239. package/lib/core/sql-validator.js +1 -1
  240. package/lib/errors.js +1 -1
  241. package/lib/framework/build-all-flags.js +1 -1
  242. package/lib/framework/error-output.js +1 -1
  243. package/lib/framework/explicit-yes.js +1 -1
  244. package/lib/framework/flags.js +1 -1
  245. package/lib/framework/help.js +1 -1
  246. package/lib/framework/index.js +1 -1
  247. package/lib/framework/output.js +1 -1
  248. package/lib/framework/response.js +1 -1
  249. package/lib/framework/runner-alias.js +1 -1
  250. package/lib/framework/runner.js +1 -1
  251. package/lib/framework/schema-export.js +1 -1
  252. package/lib/framework/types.js +1 -1
  253. package/lib/generated/build-info.d.ts +4 -4
  254. package/lib/generated/build-info.js +1 -1
  255. package/lib/help.js +1 -1
  256. package/lib/postinstall.js +1 -1
  257. package/lib/runtime/confirmation.js +1 -1
  258. package/lib/runtime/event.js +1 -1
  259. package/lib/runtime/index.js +1 -1
  260. package/lib/runtime/queue.js +1 -1
  261. package/lib/runtime/resolve.js +1 -1
  262. package/lib/skills/builtin-skill.js +1 -1
  263. package/lib/skills/main.js +1 -1
  264. package/lib/skills/npx-skills-add.js +1 -1
  265. package/lib/skills/skill-presence.js +1 -1
  266. package/lib/telemetry/cli-command-trace.js +1 -1
  267. package/lib/telemetry/cli-help-trace.js +1 -1
  268. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  269. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  270. package/lib/telemetry/send-cli-trace-log.js +1 -1
  271. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  272. package/lib/utils/ai_config.js +1 -1
  273. package/lib/utils/apply-jq-filter.js +1 -1
  274. package/lib/utils/cdn-config.js +1 -1
  275. package/lib/utils/check-sdk-version.js +1 -1
  276. package/lib/utils/cli-version-check.js +1 -1
  277. package/lib/utils/cli-version-policy.js +1 -1
  278. package/lib/utils/config.js +1 -1
  279. package/lib/utils/entity-with-id.js +1 -1
  280. package/lib/utils/file-utils.js +1 -1
  281. package/lib/utils/guides-cdn.js +1 -1
  282. package/lib/utils/http-client.js +1 -1
  283. package/lib/utils/is-non-interactive.js +1 -1
  284. package/lib/utils/logger.js +1 -1
  285. package/lib/utils/params.js +1 -1
  286. package/lib/utils/platform.js +1 -1
  287. package/lib/utils/rules-cdn.js +1 -1
  288. package/lib/utils/sleep.js +1 -1
  289. package/lib/utils/template-replacer.js +1 -1
  290. package/lib/utils/update-notice.js +1 -1
  291. package/lib/utils/version.js +1 -1
  292. package/lib/utils/with-active-cookie.js +1 -1
  293. package/lib/utils/write-cli-side-channel.js +1 -1
  294. package/package.json +1 -1
  295. package/skills/rabetbase/SKILL.md +4 -4
  296. package/skills/rabetbase/references/rabetbase-kb.md +13 -3
  297. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a191_0x4bda62=a191_0x3825;(function(_0x4892fa,_0x1a4008){const _0x39b95d=a191_0x3825,_0x3b38e4=_0x4892fa();while(!![]){try{const _0x518d10=parseInt(_0x39b95d(0xf2))/0x1+-parseInt(_0x39b95d(0xe9))/0x2*(-parseInt(_0x39b95d(0xfe))/0x3)+-parseInt(_0x39b95d(0xd5))/0x4+-parseInt(_0x39b95d(0x10b))/0x5+-parseInt(_0x39b95d(0xdd))/0x6*(parseInt(_0x39b95d(0xeb))/0x7)+-parseInt(_0x39b95d(0xd4))/0x8+parseInt(_0x39b95d(0xff))/0x9*(parseInt(_0x39b95d(0xe6))/0xa);if(_0x518d10===_0x1a4008)break;else _0x3b38e4['push'](_0x3b38e4['shift']());}catch(_0x4c08b7){_0x3b38e4['push'](_0x3b38e4['shift']());}}}(a191_0x3018,0xbcd1d));import{readFile,rm,writeFile}from'node:fs/promises';import{join}from'node:path';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';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(_0x208d7e,_0x3c34fe){const _0x227272=a191_0x3825,_0x242fba=[];let _0xd7593b=0x1;while(!![]){const _0x4de09d=await listSqlQueries(_0x208d7e,{'currentPage':_0xd7593b,'pageSize':PAGE_SIZE,'sqlCode':_0x3c34fe[_0x227272(0xe8)],'sqlName':_0x3c34fe['sqlName']}),_0x17b380=_0x4de09d[_0x227272(0xfb)]??[];_0x242fba[_0x227272(0xfc)](..._0x17b380);if(_0x17b380[_0x227272(0x105)]===0x0)break;const _0x3d7850=_0x4de09d[_0x227272(0xfd)]?.[_0x227272(0x10c)];if(_0x3d7850!=null?_0x242fba[_0x227272(0x105)]>=_0x3d7850:_0x17b380[_0x227272(0x105)]<PAGE_SIZE)break;_0xd7593b++;}return _0x242fba;}async function ensureSqlContent(_0x58fed5){const _0x2042f7=a191_0x3825;if(_0x58fed5[_0x2042f7(0xda)]!=null&&String(_0x58fed5[_0x2042f7(0xda)])[_0x2042f7(0x105)]>0x0)return _0x58fed5;return getSqlQueryDetail(_0x58fed5[_0x2042f7(0xe8)]);}export const sqlPull={'service':a191_0x4bda62(0x102),'command':a191_0x4bda62(0x104),'description':a191_0x4bda62(0xd3),'risk':a191_0x4bda62(0xf0),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a191_0x4bda62(0x101),'type':'string','description':a191_0x4bda62(0xea)},{'name':a191_0x4bda62(0xe4),'type':a191_0x4bda62(0xfa),'description':'Force\x20overwrite\x20local\x20unsynced\x20changes'}],async 'dryRun'(_0x15be5a){const _0x3bfa1b=a191_0x4bda62,_0x218ec5=loadSqlProjectConfig(_0x15be5a['appCode']),_0x30c09d=await readSqlLockFile(_0x218ec5[_0x3bfa1b(0xd7)]),{appLock:_0x23d806}=ensureSqlLockScope(_0x30c09d??createEmptySqlLock(),_0x218ec5[_0x3bfa1b(0xf6)],_0x218ec5[_0x3bfa1b(0xec)],_0x3bfa1b(0x104)),_0x50454b=await fetchAllSqlQueries(_0x15be5a[_0x3bfa1b(0xf6)],{'sqlCode':_0x15be5a[_0x3bfa1b(0xe5)](_0x3bfa1b(0xef))||undefined,'sqlName':_0x15be5a['str']('name')||undefined}),_0x2ded6b=[];for(const _0x3f982c of _0x50454b){const _0x58e7b7=await ensureSqlContent(_0x3f982c),_0x42c692=ensureRemoteSqlContent(_0x58e7b7),_0x490b5d=detectModeFromSql(_0x58e7b7),_0x32855c=_0x58e7b7[_0x3bfa1b(0xf8)]?await getDbName(_0x15be5a[_0x3bfa1b(0xf6)],Number(_0x58e7b7[_0x3bfa1b(0xf8)]))['catch'](()=>undefined):undefined,_0x55cbff=buildLocalSqlFileContent({'sqlCode':_0x58e7b7[_0x3bfa1b(0xe8)],'sqlName':_0x58e7b7['sqlName'],'dbId':_0x58e7b7[_0x3bfa1b(0xf8)]},_0x42c692,{'dbName':_0x32855c,'mode':_0x490b5d,'syncedAt':new Date()[_0x3bfa1b(0xe0)](),'description':_0x58e7b7[_0x3bfa1b(0x100)]}),_0x4b815c=buildSqlLockEntry(_0x58e7b7,_0x42c692,'',{'dbName':_0x32855c}),_0x2c0ddd=resolveLocalSqlFilePath(_0x218ec5,_0x58e7b7[_0x3bfa1b(0xe8)],_0x4b815c);let _0x23aec9=_0x3bfa1b(0xdb),_0x66acff;if(await fileExists(_0x2c0ddd)){const _0x52a8b8=await readFile(_0x2c0ddd,_0x3bfa1b(0x109));isEquivalentPulledSqlFile(_0x52a8b8,_0x55cbff,_0x490b5d)?(_0x23aec9=_0x3bfa1b(0xf4),_0x66acff=_0x3bfa1b(0xd8)):(_0x23aec9=_0x3bfa1b(0xd9),_0x66acff=_0x3bfa1b(0xe3));}_0x2ded6b['push']({'sqlCode':_0x58e7b7[_0x3bfa1b(0xe8)],'sqlName':_0x58e7b7[_0x3bfa1b(0x106)],'filePath':_0x2c0ddd,'status':_0x23aec9,'reason':_0x66acff});}return{'method':'POST','url':_0x3bfa1b(0xdf),'body':{'appCode':_0x15be5a[_0x3bfa1b(0xf6)],'sqlCode':_0x15be5a['str'](_0x3bfa1b(0xef))||null,'sqlName':_0x15be5a[_0x3bfa1b(0xe5)]('name')||null,'files':_0x2ded6b},'description':_0x3bfa1b(0xf5)+_0x2ded6b['length']+'\x20SQL\x20file(s)\x20into\x20'+_0x218ec5[_0x3bfa1b(0xe2)]};},async 'execute'(_0x2cd19a){const _0x352ef0=a191_0x4bda62,_0x2efad5=loadSqlProjectConfig(_0x2cd19a['appCode']),_0x340d51=await readSqlLockFile(_0x2efad5[_0x352ef0(0xd7)]),{lockData:_0x19a1d4,appLock:_0x13b30d}=ensureSqlLockScope(_0x340d51??createEmptySqlLock(),_0x2efad5[_0x352ef0(0xf6)],_0x2efad5[_0x352ef0(0xec)],_0x352ef0(0x104)),_0x11d61d=_0x2cd19a[_0x352ef0(0xe1)](_0x352ef0(0xe4)),_0x119186=await fetchAllSqlQueries(_0x2cd19a['appCode'],{'sqlCode':_0x2cd19a[_0x352ef0(0xe5)](_0x352ef0(0xef))||undefined,'sqlName':_0x2cd19a[_0x352ef0(0xe5)]('name')||undefined});if(_0x119186[_0x352ef0(0x105)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':'No\x20remote\x20SQL\x20queries\x20matched.'};const _0x72134c=[],_0x8547af=[];for(const _0x8bef8 of _0x119186){try{_0x72134c['push'](await ensureSqlContent(_0x8bef8));}catch(_0x2d2df5){_0x8547af[_0x352ef0(0xfc)]({'sqlCode':_0x8bef8[_0x352ef0(0xe8)],'error':_0x2d2df5 instanceof Error?_0x2d2df5[_0x352ef0(0xf7)]:String(_0x2d2df5)});}}if(_0x11d61d&&!_0x2cd19a[_0x352ef0(0xf1)]){let _0x16f25e=![];for(const _0xab7420 of _0x72134c){const _0x113088=detectModeFromSql(_0xab7420),_0x5e111a=_0xab7420[_0x352ef0(0xf8)]?await getDbName(_0x2cd19a[_0x352ef0(0xf6)],Number(_0xab7420[_0x352ef0(0xf8)]))[_0x352ef0(0xde)](()=>undefined):undefined,_0x1a4b33=buildLocalSqlFileContent({'sqlCode':_0xab7420[_0x352ef0(0xe8)],'sqlName':_0xab7420[_0x352ef0(0x106)],'dbId':_0xab7420[_0x352ef0(0xf8)]},ensureRemoteSqlContent(_0xab7420),{'dbName':_0x5e111a,'mode':_0x113088,'syncedAt':new Date()['toISOString'](),'description':_0xab7420['description']}),_0x19ffaa=resolveLocalSqlFilePath(_0x2efad5,_0xab7420['sqlCode'],buildSqlLockEntry(_0xab7420,ensureRemoteSqlContent(_0xab7420),'',{'dbName':_0x5e111a}));if(await fileExists(_0x19ffaa)){const _0x3611fb=await readFile(_0x19ffaa,'utf8');if(!isEquivalentPulledSqlFile(_0x3611fb,_0x1a4b33,_0x113088)){_0x16f25e=!![];break;}}}if(_0x16f25e){const _0x276e17=await confirmForceOverwrite('Force\x20pull\x20will\x20overwrite\x20local\x20SQL\x20that\x20differs\x20from\x20remote.');if(!_0x276e17)throw CliErrors['cancelled'](_0x352ef0(0xf9));}}const _0x5406b6=cloneSqlLockData(_0x19a1d4),_0x46f227=_0x5406b6[_0x352ef0(0xdc)][_0x2efad5[_0x352ef0(0xf6)]],_0x454b53=[],_0x4f9608=[];for(const _0x4847f0 of _0x72134c){const _0x448201=_0x46f227[_0x352ef0(0x108)][_0x4847f0[_0x352ef0(0xe8)]],_0x169ec8=ensureRemoteSqlContent(_0x4847f0),_0xc956d8=detectModeFromSql(_0x4847f0),_0x3351a1=_0x4847f0[_0x352ef0(0xf8)]?await getDbName(_0x2cd19a[_0x352ef0(0xf6)],Number(_0x4847f0[_0x352ef0(0xf8)]))[_0x352ef0(0xde)](()=>undefined):undefined,_0x541be2=buildLocalSqlFileContent({'sqlCode':_0x4847f0[_0x352ef0(0xe8)],'sqlName':_0x4847f0['sqlName'],'dbId':_0x4847f0[_0x352ef0(0xf8)]},_0x169ec8,{'dbName':_0x3351a1,'mode':_0xc956d8,'syncedAt':new Date()[_0x352ef0(0xe0)](),'description':_0x4847f0[_0x352ef0(0x100)]}),_0x533098=buildSqlLockEntry(_0x4847f0,_0x169ec8,computeSqlContentHash(_0x541be2),{'dbName':_0x3351a1}),_0x6995f9=_0x533098['path'],_0x10cd08=join(_0x2efad5[_0x352ef0(0xe2)],_0x6995f9);try{if(await fileExists(_0x10cd08)){const _0x347f43=await readFile(_0x10cd08,_0x352ef0(0x109));if(isEquivalentPulledSqlFile(_0x347f43,_0x541be2,_0xc956d8)){_0x4f9608[_0x352ef0(0xfc)]({'sqlCode':_0x4847f0[_0x352ef0(0xe8)],'reason':_0x352ef0(0xd8)}),_0x46f227[_0x352ef0(0x108)][_0x4847f0[_0x352ef0(0xe8)]]={..._0x533098,'hash':computeSqlContentHash(_0x347f43),'path':_0x6995f9};continue;}if(!_0x11d61d){_0x4f9608['push']({'sqlCode':_0x4847f0[_0x352ef0(0xe8)],'reason':_0x352ef0(0x10a)});continue;}}const _0x52bb70=_0x448201?.[_0x352ef0(0xd2)]?join(_0x2efad5['sqlRootDir'],_0x448201[_0x352ef0(0xd2)]):undefined;_0x52bb70&&_0x52bb70!==_0x10cd08&&await fileExists(_0x52bb70)&&await rm(_0x52bb70,{'force':!![]}),await ensureParentDirectory(_0x10cd08),await writeFile(_0x10cd08,_0x541be2,_0x352ef0(0x109)),_0x46f227[_0x352ef0(0x108)][_0x4847f0['sqlCode']]={..._0x533098,'path':_0x6995f9},_0x454b53[_0x352ef0(0xfc)]({'sqlCode':_0x4847f0[_0x352ef0(0xe8)],'filePath':_0x10cd08});}catch(_0x158c7f){_0x8547af[_0x352ef0(0xfc)]({'sqlCode':_0x4847f0[_0x352ef0(0xe8)],'error':_0x158c7f instanceof Error?_0x158c7f[_0x352ef0(0xf7)]:String(_0x158c7f)});}}return _0x46f227[_0x352ef0(0xee)]=new Date()[_0x352ef0(0xe0)](),await writeSqlLockFile(_0x2efad5['lockFilePath'],_0x5406b6),{'ok':_0x8547af[_0x352ef0(0x105)]===0x0,'data':{'pulled':_0x454b53,'skipped':_0x4f9608,'failed':_0x8547af},'message':'Pull\x20complete:\x20'+_0x454b53[_0x352ef0(0x105)]+_0x352ef0(0xf3)+_0x4f9608[_0x352ef0(0x105)]+'\x20skipped,\x20'+_0x8547af[_0x352ef0(0x105)]+'\x20failed'};}};function detectModeFromSql(_0x267eb5){const _0x178d1f=a191_0x4bda62,_0xcfa822=ensureRemoteSqlContent(_0x267eb5),_0xe0dbbc=stripLocalSqlMetadata(_0xcfa822,_0x178d1f(0x103))[_0x178d1f(0xed)]();if(/^<(select|insert|update|delete)\b/i[_0x178d1f(0x107)](_0xe0dbbc))return _0x178d1f(0x103);return _0x178d1f(0x102);}function isEquivalentPulledSqlFile(_0x1fead9,_0xb5410a,_0x21f307){return normalizePullComparableContent(_0x1fead9,_0x21f307)===normalizePullComparableContent(_0xb5410a,_0x21f307);}function normalizePullComparableContent(_0x52197b,_0x338b67){const _0x4a8bac=a191_0x4bda62,_0x47a611=_0x52197b[_0x4a8bac(0xe7)](/\r\n/g,'\x0a')['split']('\x0a'),_0x438f6e=_0x47a611[_0x4a8bac(0xd6)](_0x1c1a89=>!isSyncedAtMetadataLine(_0x1c1a89,_0x338b67));return _0x438f6e['join']('\x0a');}function a191_0x3825(_0x4c8a4b,_0x1c8317){_0x4c8a4b=_0x4c8a4b-0xd2;const _0x3018bc=a191_0x3018();let _0x3825cc=_0x3018bc[_0x4c8a4b];return _0x3825cc;}function isSyncedAtMetadataLine(_0x28fece,_0x451b12){const _0x552663=a191_0x4bda62;if(_0x451b12===_0x552663(0x103))return/^\s*<!--\s*@lovrabet\.syncedAt:/[_0x552663(0x107)](_0x28fece);return/^\s*--\s*@lovrabet\.syncedAt:/['test'](_0x28fece);}function a191_0x3018(){const _0x184e92=['tableData','push','paging','201387PkfcdC','80847ScoSBY','description','name','sql','mybatisXml','pull','length','sqlName','test','sqls','utf8','local\x20differs\x20from\x20remote','4396990FWEKVc','totalCount','path','Pull\x20remote\x20SQL\x20queries\x20to\x20local\x20.rabetbase/sql/','1849768vetoTK','4920828rPNzSi','filter','lockFilePath','unchanged','conflict','sqlContent','would_pull','apps','5333694wBiZYn','catch','/smartapi/custom/queryUserCustomSqlList\x20+\x20/smartapi/custom/getUserCustomSql','toISOString','bool','sqlRootDir','local\x20differs\x20from\x20remote\x20(use\x20--force\x20to\x20overwrite)','force','str','3660UHEYRG','replace','sqlCode','2TteRQu','Filter\x20by\x20SQL\x20display\x20name','7tcWsQx','sqlRoot','trimStart','lastSync','sqlcode','read','nonInteractive','648273PKalQD','\x20written,\x20','skipped','Would\x20pull\x20','appCode','message','dbId','Force\x20pull\x20cancelled.','boolean'];a191_0x3018=function(){return _0x184e92;};return a191_0x3018();}
1
+ const a192_0x31a16e=a192_0x4950;(function(_0x4fc993,_0x570ee7){const _0x11843b=a192_0x4950,_0x345665=_0x4fc993();while(!![]){try{const _0x39e117=-parseInt(_0x11843b(0x147))/0x1*(-parseInt(_0x11843b(0x149))/0x2)+parseInt(_0x11843b(0x161))/0x3*(parseInt(_0x11843b(0x145))/0x4)+parseInt(_0x11843b(0x146))/0x5+-parseInt(_0x11843b(0x139))/0x6+-parseInt(_0x11843b(0x166))/0x7*(-parseInt(_0x11843b(0x138))/0x8)+parseInt(_0x11843b(0x14b))/0x9+-parseInt(_0x11843b(0x154))/0xa;if(_0x39e117===_0x570ee7)break;else _0x345665['push'](_0x345665['shift']());}catch(_0x15a956){_0x345665['push'](_0x345665['shift']());}}}(a192_0x2804,0x2909f));import{readFile,rm,writeFile}from'node:fs/promises';import{join}from'node:path';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';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildLocalSqlFileContent,buildSqlLockEntry,cloneSqlLockData,confirmForceOverwrite,ensureRemoteSqlContent,stripLocalSqlMetadata}from'./shared.js';function a192_0x4950(_0xb96f5b,_0x2a8740){_0xb96f5b=_0xb96f5b-0x133;const _0x280418=a192_0x2804();let _0x495064=_0x280418[_0xb96f5b];return _0x495064;}const PAGE_SIZE=0x64;async function fetchAllSqlQueries(_0x248299,_0x425bd1){const _0x5332ca=a192_0x4950,_0x562c81=[];let _0x183776=0x1;while(!![]){const _0x57323f=await listSqlQueries(_0x248299,{'currentPage':_0x183776,'pageSize':PAGE_SIZE,'sqlCode':_0x425bd1[_0x5332ca(0x13a)],'sqlName':_0x425bd1['sqlName']}),_0x303406=_0x57323f['tableData']??[];_0x562c81[_0x5332ca(0x165)](..._0x303406);if(_0x303406[_0x5332ca(0x134)]===0x0)break;const _0x40ee2e=_0x57323f[_0x5332ca(0x159)]?.[_0x5332ca(0x14f)];if(_0x40ee2e!=null?_0x562c81[_0x5332ca(0x134)]>=_0x40ee2e:_0x303406[_0x5332ca(0x134)]<PAGE_SIZE)break;_0x183776++;}return _0x562c81;}async function ensureSqlContent(_0x4de109){const _0x17987d=a192_0x4950;if(_0x4de109[_0x17987d(0x13c)]!=null&&String(_0x4de109[_0x17987d(0x13c)])[_0x17987d(0x134)]>0x0)return _0x4de109;return getSqlQueryDetail(_0x4de109[_0x17987d(0x13a)]);}export const sqlPull={'service':a192_0x31a16e(0x140),'command':a192_0x31a16e(0x137),'description':'Pull\x20remote\x20SQL\x20queries\x20to\x20local\x20.rabetbase/sql/','risk':a192_0x31a16e(0x162),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a192_0x31a16e(0x14d),'type':'string','description':a192_0x31a16e(0x133)},{'name':'force','type':'boolean','description':'Force\x20overwrite\x20local\x20unsynced\x20changes'}],async 'dryRun'(_0x385fa3){const _0x5a4d2a=a192_0x31a16e,_0x3d288d=loadSqlProjectConfig(_0x385fa3[_0x5a4d2a(0x143)]),_0x441b44=await readSqlLockFile(_0x3d288d[_0x5a4d2a(0x164)]),{appLock:_0x3600db}=ensureSqlLockScope(_0x441b44??createEmptySqlLock(),_0x3d288d[_0x5a4d2a(0x143)],_0x3d288d[_0x5a4d2a(0x15c)],'pull'),_0x12b88f=await fetchAllSqlQueries(_0x385fa3[_0x5a4d2a(0x143)],{'sqlCode':_0x385fa3[_0x5a4d2a(0x160)](_0x5a4d2a(0x142))||undefined,'sqlName':_0x385fa3[_0x5a4d2a(0x160)](_0x5a4d2a(0x14d))||undefined}),_0x11f302=[];for(const _0x1da2ff of _0x12b88f){const _0x31996a=await ensureSqlContent(_0x1da2ff),_0x10c48b=ensureRemoteSqlContent(_0x31996a),_0x150219=detectModeFromSql(_0x31996a),_0x4f625b=_0x31996a[_0x5a4d2a(0x168)]?await getDbName(_0x385fa3[_0x5a4d2a(0x143)],Number(_0x31996a[_0x5a4d2a(0x168)]))[_0x5a4d2a(0x13f)](()=>undefined):undefined,_0x3ff9cd=buildLocalSqlFileContent({'sqlCode':_0x31996a['sqlCode'],'sqlName':_0x31996a[_0x5a4d2a(0x14a)],'dbId':_0x31996a[_0x5a4d2a(0x168)]},_0x10c48b,{'dbName':_0x4f625b,'mode':_0x150219,'syncedAt':new Date()[_0x5a4d2a(0x14c)](),'description':_0x31996a[_0x5a4d2a(0x141)]}),_0x153c59=buildSqlLockEntry(_0x31996a,_0x10c48b,'',{'dbName':_0x4f625b}),_0x13cfba=resolveLocalSqlFilePath(_0x3d288d,_0x31996a[_0x5a4d2a(0x13a)],_0x153c59);let _0x238cb2='would_pull',_0x474867;if(await fileExists(_0x13cfba)){const _0x11720a=await readFile(_0x13cfba,_0x5a4d2a(0x13d));isEquivalentPulledSqlFile(_0x11720a,_0x3ff9cd,_0x150219)?(_0x238cb2=_0x5a4d2a(0x144),_0x474867=_0x5a4d2a(0x157)):(_0x238cb2=_0x5a4d2a(0x148),_0x474867=_0x5a4d2a(0x13b));}_0x11f302[_0x5a4d2a(0x165)]({'sqlCode':_0x31996a[_0x5a4d2a(0x13a)],'sqlName':_0x31996a[_0x5a4d2a(0x14a)],'filePath':_0x13cfba,'status':_0x238cb2,'reason':_0x474867});}return{'method':_0x5a4d2a(0x151),'url':_0x5a4d2a(0x15d),'body':{'appCode':_0x385fa3[_0x5a4d2a(0x143)],'sqlCode':_0x385fa3[_0x5a4d2a(0x160)](_0x5a4d2a(0x142))||null,'sqlName':_0x385fa3[_0x5a4d2a(0x160)](_0x5a4d2a(0x14d))||null,'files':_0x11f302},'description':_0x5a4d2a(0x136)+_0x11f302[_0x5a4d2a(0x134)]+_0x5a4d2a(0x163)+_0x3d288d[_0x5a4d2a(0x14e)]};},async 'execute'(_0x5b7e23){const _0x20514e=a192_0x31a16e,_0x2d9a86=loadSqlProjectConfig(_0x5b7e23[_0x20514e(0x143)]),_0x4de9c1=await readSqlLockFile(_0x2d9a86[_0x20514e(0x164)]),{lockData:_0x118542,appLock:_0x45667c}=ensureSqlLockScope(_0x4de9c1??createEmptySqlLock(),_0x2d9a86[_0x20514e(0x143)],_0x2d9a86[_0x20514e(0x15c)],'pull'),_0x1c5835=_0x5b7e23[_0x20514e(0x158)]('force'),_0x3420bb=await fetchAllSqlQueries(_0x5b7e23[_0x20514e(0x143)],{'sqlCode':_0x5b7e23[_0x20514e(0x160)](_0x20514e(0x142))||undefined,'sqlName':_0x5b7e23[_0x20514e(0x160)](_0x20514e(0x14d))||undefined});if(_0x3420bb[_0x20514e(0x134)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x20514e(0x155)};const _0x854567=[],_0x572bd2=[];for(const _0x393fd9 of _0x3420bb){try{_0x854567['push'](await ensureSqlContent(_0x393fd9));}catch(_0x34d42f){_0x572bd2[_0x20514e(0x165)]({'sqlCode':_0x393fd9[_0x20514e(0x13a)],'error':_0x34d42f instanceof Error?_0x34d42f[_0x20514e(0x153)]:String(_0x34d42f)});}}if(_0x1c5835&&!_0x5b7e23['nonInteractive']){let _0x23ac94=![];for(const _0x47893a of _0x854567){const _0x5b66fc=detectModeFromSql(_0x47893a),_0x1fbfa8=_0x47893a['dbId']?await getDbName(_0x5b7e23[_0x20514e(0x143)],Number(_0x47893a[_0x20514e(0x168)]))['catch'](()=>undefined):undefined,_0x570b90=buildLocalSqlFileContent({'sqlCode':_0x47893a[_0x20514e(0x13a)],'sqlName':_0x47893a[_0x20514e(0x14a)],'dbId':_0x47893a[_0x20514e(0x168)]},ensureRemoteSqlContent(_0x47893a),{'dbName':_0x1fbfa8,'mode':_0x5b66fc,'syncedAt':new Date()[_0x20514e(0x14c)](),'description':_0x47893a['description']}),_0x1afc92=resolveLocalSqlFilePath(_0x2d9a86,_0x47893a['sqlCode'],buildSqlLockEntry(_0x47893a,ensureRemoteSqlContent(_0x47893a),'',{'dbName':_0x1fbfa8}));if(await fileExists(_0x1afc92)){const _0x89978b=await readFile(_0x1afc92,'utf8');if(!isEquivalentPulledSqlFile(_0x89978b,_0x570b90,_0x5b66fc)){_0x23ac94=!![];break;}}}if(_0x23ac94){const _0x44b8d3=await confirmForceOverwrite('Force\x20pull\x20will\x20overwrite\x20local\x20SQL\x20that\x20differs\x20from\x20remote.');if(!_0x44b8d3)throw CliErrors[_0x20514e(0x156)]('Force\x20pull\x20cancelled.');}}const _0x4c19da=cloneSqlLockData(_0x118542),_0x5b6e16=_0x4c19da['apps'][_0x2d9a86[_0x20514e(0x143)]],_0x4ec1e4=[],_0x561362=[];for(const _0x25aed7 of _0x854567){const _0x402df2=_0x5b6e16[_0x20514e(0x15a)][_0x25aed7['sqlCode']],_0x36054e=ensureRemoteSqlContent(_0x25aed7),_0x15e0dd=detectModeFromSql(_0x25aed7),_0x40a40c=_0x25aed7[_0x20514e(0x168)]?await getDbName(_0x5b7e23[_0x20514e(0x143)],Number(_0x25aed7['dbId']))['catch'](()=>undefined):undefined,_0x1cd2a1=buildLocalSqlFileContent({'sqlCode':_0x25aed7[_0x20514e(0x13a)],'sqlName':_0x25aed7[_0x20514e(0x14a)],'dbId':_0x25aed7[_0x20514e(0x168)]},_0x36054e,{'dbName':_0x40a40c,'mode':_0x15e0dd,'syncedAt':new Date()['toISOString'](),'description':_0x25aed7[_0x20514e(0x141)]}),_0x16fdd0=buildSqlLockEntry(_0x25aed7,_0x36054e,computeSqlContentHash(_0x1cd2a1),{'dbName':_0x40a40c}),_0x2ab329=_0x16fdd0[_0x20514e(0x152)],_0x4022b4=join(_0x2d9a86[_0x20514e(0x14e)],_0x2ab329);try{if(await fileExists(_0x4022b4)){const _0x2a64f6=await readFile(_0x4022b4,_0x20514e(0x13d));if(isEquivalentPulledSqlFile(_0x2a64f6,_0x1cd2a1,_0x15e0dd)){_0x561362['push']({'sqlCode':_0x25aed7[_0x20514e(0x13a)],'reason':_0x20514e(0x157)}),_0x5b6e16[_0x20514e(0x15a)][_0x25aed7[_0x20514e(0x13a)]]={..._0x16fdd0,'hash':computeSqlContentHash(_0x2a64f6),'path':_0x2ab329};continue;}if(!_0x1c5835){_0x561362[_0x20514e(0x165)]({'sqlCode':_0x25aed7['sqlCode'],'reason':_0x20514e(0x15b)});continue;}}const _0x34a970=_0x402df2?.[_0x20514e(0x152)]?join(_0x2d9a86[_0x20514e(0x14e)],_0x402df2['path']):undefined;_0x34a970&&_0x34a970!==_0x4022b4&&await fileExists(_0x34a970)&&await rm(_0x34a970,{'force':!![]}),await ensureParentDirectory(_0x4022b4),await writeFile(_0x4022b4,_0x1cd2a1,_0x20514e(0x13d)),_0x5b6e16['sqls'][_0x25aed7[_0x20514e(0x13a)]]={..._0x16fdd0,'path':_0x2ab329},_0x4ec1e4['push']({'sqlCode':_0x25aed7['sqlCode'],'filePath':_0x4022b4});}catch(_0x4ba36e){_0x572bd2[_0x20514e(0x165)]({'sqlCode':_0x25aed7[_0x20514e(0x13a)],'error':_0x4ba36e instanceof Error?_0x4ba36e['message']:String(_0x4ba36e)});}}return _0x5b6e16[_0x20514e(0x135)]=new Date()[_0x20514e(0x14c)](),await writeSqlLockFile(_0x2d9a86[_0x20514e(0x164)],_0x4c19da),{'ok':_0x572bd2[_0x20514e(0x134)]===0x0,'data':{'pulled':_0x4ec1e4,'skipped':_0x561362,'failed':_0x572bd2},'message':_0x20514e(0x150)+_0x4ec1e4['length']+_0x20514e(0x15f)+_0x561362['length']+'\x20skipped,\x20'+_0x572bd2[_0x20514e(0x134)]+'\x20failed'};}};function a192_0x2804(){const _0x341844=['3klijnR','conflict','141254QSViBE','sqlName','1806606cmcEOx','toISOString','name','sqlRootDir','totalCount','Pull\x20complete:\x20','POST','path','message','6201360WIqmDg','No\x20remote\x20SQL\x20queries\x20matched.','cancelled','unchanged','bool','paging','sqls','local\x20differs\x20from\x20remote','sqlRoot','/smartapi/custom/queryUserCustomSqlList\x20+\x20/smartapi/custom/getUserCustomSql','mybatisXml','\x20written,\x20','str','120768uVEQBn','read','\x20SQL\x20file(s)\x20into\x20','lockFilePath','push','1113126ZcMtNT','test','dbId','Filter\x20by\x20SQL\x20display\x20name','length','lastSync','Would\x20pull\x20','pull','8RjxNdo','1267080nCWdGX','sqlCode','local\x20differs\x20from\x20remote\x20(use\x20--force\x20to\x20overwrite)','sqlContent','utf8','trimStart','catch','sql','description','sqlcode','appCode','skipped','24WaBhHO','931210sDkSdA'];a192_0x2804=function(){return _0x341844;};return a192_0x2804();}function detectModeFromSql(_0x5dea40){const _0x510ea1=a192_0x31a16e,_0xb268e3=ensureRemoteSqlContent(_0x5dea40),_0x57da95=stripLocalSqlMetadata(_0xb268e3,'mybatisXml')[_0x510ea1(0x13e)]();if(/^<(select|insert|update|delete)\b/i[_0x510ea1(0x167)](_0x57da95))return'mybatisXml';return _0x510ea1(0x140);}function isEquivalentPulledSqlFile(_0x3ca97e,_0x935234,_0x4f24f2){return normalizePullComparableContent(_0x3ca97e,_0x4f24f2)===normalizePullComparableContent(_0x935234,_0x4f24f2);}function normalizePullComparableContent(_0x119bbc,_0x2f970d){const _0x54badd=_0x119bbc['replace'](/\r\n/g,'\x0a')['split']('\x0a'),_0x4c4224=_0x54badd['filter'](_0x180793=>!isSyncedAtMetadataLine(_0x180793,_0x2f970d));return _0x4c4224['join']('\x0a');}function isSyncedAtMetadataLine(_0x2d270d,_0x42ed1d){const _0x45e6fd=a192_0x31a16e;if(_0x42ed1d===_0x45e6fd(0x15e))return/^\s*<!--\s*@lovrabet\.syncedAt:/[_0x45e6fd(0x167)](_0x2d270d);return/^\s*--\s*@lovrabet\.syncedAt:/['test'](_0x2d270d);}
@@ -1 +1 @@
1
- const a192_0x2afa8e=a192_0x592f;(function(_0x31fde0,_0xc1ea60){const _0x5f06f1=a192_0x592f,_0x8de190=_0x31fde0();while(!![]){try{const _0x373209=-parseInt(_0x5f06f1(0x1a6))/0x1*(-parseInt(_0x5f06f1(0x1b9))/0x2)+-parseInt(_0x5f06f1(0x19c))/0x3+parseInt(_0x5f06f1(0x19e))/0x4*(-parseInt(_0x5f06f1(0x1b8))/0x5)+parseInt(_0x5f06f1(0x182))/0x6+parseInt(_0x5f06f1(0x188))/0x7*(-parseInt(_0x5f06f1(0x1af))/0x8)+parseInt(_0x5f06f1(0x1a7))/0x9+parseInt(_0x5f06f1(0x1a0))/0xa;if(_0x373209===_0xc1ea60)break;else _0x8de190['push'](_0x8de190['shift']());}catch(_0xe8d436){_0x8de190['push'](_0x8de190['shift']());}}}(a192_0x591e,0x4c73e));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';function a192_0x592f(_0x15ac59,_0x53e353){_0x15ac59=_0x15ac59-0x17f;const _0x591ed5=a192_0x591e();let _0x592f27=_0x591ed5[_0x15ac59];return _0x592f27;}import{getDbName,listDatabases}from'../../core/db-resolver.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';function a192_0x591e(){const _0x28869b=['35iJiDqh','sqlName','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','lastSync','validation','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20','/smartapi/custom/updateUserCustomSql','appCode','isFinite','remoteId','lockFilePath','\x22\x20for\x20sqlCode\x20','Push\x20complete:\x20','filter','toISOString','trashDir','force','mode','hash','570309RSEMpD','str','4uZpzhh','Would\x20push\x20','5312330lwOvyi','Local\x20SQL\x20not\x20found:\x20','bool','sqlRoot','sqlCode','sqls','18742aPCCLE','1177056ObDJCU','replace','push','sql','\x20SQL\x20file(s)','catch','path','relativePath','935624wFWDTM','write','unchanged','boolean','get','\x20skipped,\x20','dbId','sqlConfig','length','1212280pUbWgx','62riWEPJ','map','sqlRootDir','exec','No\x20local\x20SQL\x20files\x20found.','entries','524730fRnSey','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','sqlcode','filePath','local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first','dbName'];a192_0x591e=function(){return _0x28869b;};return a192_0x591e();}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(_0x33a654,_0x42aa87,_0x2f1c71){const _0x918c23=a192_0x592f,_0x546863=await scanLocalSqlQueries(_0x33a654),_0x99b501=new Map();for(const _0x6a175a of _0x546863){if(_0x2f1c71&&_0x6a175a['sqlCode']!==_0x2f1c71)continue;const _0x2188b2=_0x99b501[_0x918c23(0x1b3)](_0x6a175a[_0x918c23(0x1a4)])??[];_0x2188b2[_0x918c23(0x1a9)](_0x6a175a),_0x99b501['set'](_0x6a175a['sqlCode'],_0x2188b2);}if(_0x2f1c71&&!_0x99b501['has'](_0x2f1c71))throw CliErrors[_0x918c23(0x18c)](_0x918c23(0x1a1)+_0x2f1c71);const _0xc0acfe=[];for(const [_0x439cfe,_0x4e60a2]of _0x99b501[_0x918c23(0x181)]()){if(_0x4e60a2[_0x918c23(0x1b7)]===0x1){_0xc0acfe[_0x918c23(0x1a9)](_0x4e60a2[0x0]);continue;}const _0x1165a1=_0x42aa87[_0x918c23(0x1a5)][_0x439cfe],_0x433d2a=_0x1165a1?.[_0x918c23(0x1ad)],_0x2cc875=_0x433d2a?_0x4e60a2[_0x918c23(0x196)](_0x442d59=>_0x442d59[_0x918c23(0x1ae)]!==_0x433d2a):_0x4e60a2;if(_0x1165a1&&_0x2cc875[_0x918c23(0x1b7)]===0x1){_0xc0acfe[_0x918c23(0x1a9)](_0x2cc875[0x0]);continue;}throw CliErrors['validation'](_0x918c23(0x183)+_0x439cfe+'.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.');}return _0xc0acfe;}export const sqlPush={'service':a192_0x2afa8e(0x1aa),'command':a192_0x2afa8e(0x1a9),'description':'Push\x20local\x20SQL\x20files\x20to\x20remote','risk':a192_0x2afa8e(0x1b0),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a192_0x2afa8e(0x199),'type':a192_0x2afa8e(0x1b2),'description':a192_0x2afa8e(0x18d)}],async 'dryRun'(_0x1b886c){const _0x13690a=a192_0x2afa8e,_0xf73c=loadSqlProjectConfig(_0x1b886c[_0x13690a(0x190)]),_0x51f3ad=await readSqlLockFile(_0xf73c[_0x13690a(0x193)]),{appLock:_0x15ee89}=ensureSqlLockScope(_0x51f3ad??createEmptySqlLock(),_0x1b886c[_0x13690a(0x190)],_0xf73c[_0x13690a(0x1a3)],'push'),_0x28c129=await getTargetSqlQueries(_0xf73c,_0x15ee89,_0x1b886c[_0x13690a(0x19d)](_0x13690a(0x184))||undefined),_0x156b68=[];for(const _0x3a92e3 of _0x28c129){const _0x1e6aac=await computeSqlFileHash(_0x3a92e3[_0x13690a(0x185)]),_0x11f513=_0x15ee89[_0x13690a(0x1a5)][_0x3a92e3['sqlCode']],_0x2b2271=!!_0x11f513&&(_0x11f513[_0x13690a(0x1ad)]!==_0x3a92e3[_0x13690a(0x1ae)]||!!_0x3a92e3['sqlName']&&_0x11f513[_0x13690a(0x189)]!==_0x3a92e3[_0x13690a(0x189)]);if(!_0x1b886c[_0x13690a(0x1a2)](_0x13690a(0x199))&&_0x11f513&&_0x11f513[_0x13690a(0x19b)]===_0x1e6aac&&!_0x2b2271)continue;_0x156b68['push'](_0x3a92e3['sqlCode']);}return{'method':'POST','url':_0x13690a(0x18f),'body':{'sqlCodes':_0x156b68,'appCode':_0x1b886c['appCode']},'description':_0x13690a(0x19f)+_0x156b68[_0x13690a(0x1b7)]+_0x13690a(0x1ab)};},async 'execute'(_0x264a5c){const _0x3af700=a192_0x2afa8e,_0x513b9a=loadSqlProjectConfig(_0x264a5c[_0x3af700(0x190)]),_0x1d521a=await readSqlLockFile(_0x513b9a['lockFilePath']),{lockData:_0x1b25ec,appLock:_0xe430f2}=ensureSqlLockScope(_0x1d521a??createEmptySqlLock(),_0x264a5c[_0x3af700(0x190)],_0x513b9a[_0x3af700(0x1a3)],_0x3af700(0x1a9)),_0x18b646=await getTargetSqlQueries(_0x513b9a,_0xe430f2,_0x264a5c['str'](_0x3af700(0x184))||undefined);if(_0x18b646[_0x3af700(0x1b7)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x3af700(0x180)};const _0x62d7b=[],_0x5228cc=[],_0x3abe4d=[];for(const _0x426972 of _0x18b646){const _0x56e389=_0xe430f2['sqls'][_0x426972['sqlCode']];if(!_0x56e389){_0x3abe4d[_0x3af700(0x1a9)]({'sqlCode':_0x426972[_0x3af700(0x1a4)],'error':_0x3af700(0x186)});continue;}try{const _0x24f9da=await computeSqlFileHash(_0x426972[_0x3af700(0x185)]),_0x313c45=_0x56e389[_0x3af700(0x1ad)]!==_0x426972['relativePath']||!!_0x426972[_0x3af700(0x189)]&&_0x56e389[_0x3af700(0x189)]!==_0x426972[_0x3af700(0x189)];if(!_0x264a5c[_0x3af700(0x1a2)]('force')&&_0x56e389['hash']===_0x24f9da&&!_0x313c45){_0x5228cc[_0x3af700(0x1a9)]({'sqlCode':_0x426972[_0x3af700(0x1a4)],'reason':_0x3af700(0x1b1)});continue;}if(_0x56e389['version']==null){_0x3abe4d[_0x3af700(0x1a9)]({'sqlCode':_0x426972[_0x3af700(0x1a4)],'error':_0x3af700(0x18a)});continue;}const _0x2ea55a=await readFile(_0x426972[_0x3af700(0x185)],'utf8'),_0x24b634=stripLocalSqlMetadata(_0x2ea55a,_0x426972[_0x3af700(0x19a)]),_0x3d87ff=_0x426972[_0x3af700(0x189)]||_0x56e389[_0x3af700(0x189)],_0x1213b4=await resolveTargetDbBinding(_0x264a5c[_0x3af700(0x190)],_0x426972,_0x56e389),_0x2d07e3=await updateSqlQuery({'id':_0x56e389['remoteId'],'appCode':_0x264a5c[_0x3af700(0x190)],'sqlCode':_0x426972[_0x3af700(0x1a4)],'sqlName':_0x3d87ff,'dbId':_0x1213b4[_0x3af700(0x1b5)],'version':_0x56e389['version'],'sqlContent':_0x24b634,'sqlConfig':_0x56e389[_0x3af700(0x1b6)]??undefined}),_0x29cef3=_0x2d07e3['dbId']?await getDbName(_0x264a5c['appCode'],Number(_0x2d07e3['dbId']))['catch'](()=>_0x1213b4[_0x3af700(0x187)]):_0x1213b4[_0x3af700(0x187)];_0xe430f2['sqls'][_0x426972[_0x3af700(0x1a4)]]={...buildSqlLockEntry(_0x2d07e3,_0x24b634,_0x24f9da,{'dbName':_0x29cef3}),'path':_0x426972[_0x3af700(0x1ae)],'mode':_0x56e389[_0x3af700(0x19a)]},await archivePreviousSqlFileIfNeeded(_0x513b9a,_0x56e389[_0x3af700(0x1ad)],_0x426972[_0x3af700(0x1ae)]),_0x62d7b['push']({'sqlCode':_0x426972[_0x3af700(0x1a4)],'remoteId':_0x56e389[_0x3af700(0x192)]});}catch(_0x2869c4){_0x3abe4d[_0x3af700(0x1a9)]({'sqlCode':_0x426972['sqlCode'],'error':_0x2869c4 instanceof Error?_0x2869c4['message']:String(_0x2869c4)});}}return _0xe430f2[_0x3af700(0x18b)]=new Date()['toISOString'](),await writeSqlLockFile(_0x513b9a['lockFilePath'],_0x1b25ec),{'ok':_0x3abe4d[_0x3af700(0x1b7)]===0x0,'data':{'pushed':_0x62d7b,'skipped':_0x5228cc,'failed':_0x3abe4d},'message':_0x3af700(0x195)+_0x62d7b[_0x3af700(0x1b7)]+'\x20pushed,\x20'+_0x5228cc['length']+_0x3af700(0x1b4)+_0x3abe4d[_0x3af700(0x1b7)]+'\x20failed'};}};async function archivePreviousSqlFileIfNeeded(_0x730b63,_0x1bcad1,_0x2c6a9a){const _0x2e81e0=a192_0x2afa8e;if(!_0x1bcad1||_0x1bcad1===_0x2c6a9a)return;const _0x28a0bb=join(_0x730b63[_0x2e81e0(0x1bb)],_0x1bcad1);if(!await fileExists(_0x28a0bb))return;const _0x18dc66=await moveToTrash(_0x730b63['projectRoot'],_0x730b63[_0x2e81e0(0x198)],_0x28a0bb);await cleanupEmptyDirectories(dirname(_0x28a0bb),_0x730b63[_0x2e81e0(0x1bb)]),void _0x18dc66;}async function moveToTrash(_0x1cb374,_0x206b23,_0x35ee23){const _0x5ac1f8=a192_0x2afa8e,_0x3683f1=new Date()[_0x5ac1f8(0x197)]()[_0x5ac1f8(0x1a8)](/[:.]/g,'-'),_0x39b3bc=relative(_0x1cb374,_0x35ee23),_0x30d429=join(_0x206b23,_0x3683f1,_0x39b3bc);return await mkdir(dirname(_0x30d429),{'recursive':!![]}),await rename(_0x35ee23,_0x30d429),_0x30d429;}async function cleanupEmptyDirectories(_0x29be4c,_0x29c4fa){const _0x1f3254=a192_0x2afa8e;let _0x49f85b=resolve(_0x29be4c);const _0xeb2266=resolve(_0x29c4fa);while(_0x49f85b['startsWith'](''+_0xeb2266+sep)||_0x49f85b===_0xeb2266){if(_0x49f85b===_0xeb2266)return;try{const _0x44d858=await readdir(_0x49f85b);if(_0x44d858[_0x1f3254(0x1b7)]>0x0)return;await rmdir(_0x49f85b);}catch{return;}_0x49f85b=dirname(_0x49f85b);}}async function resolveTargetDbBinding(_0x3a338e,_0x32f6d5,_0x12a56e){const _0x59ef3c=a192_0x2afa8e,_0x30b983=_0x32f6d5['dbDirectory'];if(!_0x30b983)return{'dbId':_0x12a56e[_0x59ef3c(0x1b5)],'dbName':_0x12a56e['dbName']};const _0x41b0be=buildDbDirectoryName(_0x12a56e[_0x59ef3c(0x187)],_0x12a56e[_0x59ef3c(0x1b5)]);if(_0x30b983===_0x41b0be)return{'dbId':_0x12a56e[_0x59ef3c(0x1b5)],'dbName':_0x12a56e[_0x59ef3c(0x187)]};const _0xc7edae=parseExplicitDbDirectory(_0x30b983);if(_0xc7edae!=null)return{'dbId':_0xc7edae,'dbName':await getDbName(_0x3a338e,_0xc7edae)[_0x59ef3c(0x1ac)](()=>undefined)};const _0x225d22=await listDatabases(_0x3a338e),_0x3228f2=_0x225d22[_0x59ef3c(0x196)](_0x5d7aff=>buildDbDirectoryName(_0x5d7aff[_0x59ef3c(0x187)],_0x5d7aff['dbId'])===_0x30b983);if(_0x3228f2[_0x59ef3c(0x1b7)]===0x1)return{'dbId':_0x3228f2[0x0]['dbId'],'dbName':_0x3228f2[0x0]['dbName']};if(_0x3228f2[_0x59ef3c(0x1b7)]===0x0)throw CliErrors['validation']('No\x20database\x20matches\x20local\x20directory\x20\x22'+_0x30b983+_0x59ef3c(0x194)+_0x32f6d5[_0x59ef3c(0x1a4)]+'.');const _0x11421b=_0x3228f2[_0x59ef3c(0x1ba)](_0x10d034=>_0x10d034[_0x59ef3c(0x187)]+'\x20('+_0x10d034[_0x59ef3c(0x1b5)]+')')['join'](',\x20');throw CliErrors[_0x59ef3c(0x18c)]('Local\x20directory\x20\x22'+_0x30b983+_0x59ef3c(0x18e)+_0x32f6d5[_0x59ef3c(0x1a4)]+':\x20'+_0x11421b);}function parseExplicitDbDirectory(_0x150f14){const _0x3f5546=a192_0x2afa8e,_0x4b39c6=/^db-(\d+)$/[_0x3f5546(0x17f)](_0x150f14);if(!_0x4b39c6)return null;const _0x5c2e66=Number(_0x4b39c6[0x1]);return Number[_0x3f5546(0x191)](_0x5c2e66)&&_0x5c2e66>0x0?_0x5c2e66:null;}
1
+ const a193_0x579b6e=a193_0x1b34;(function(_0x237eb6,_0x1e6c45){const _0x1a4cb2=a193_0x1b34,_0x3ea555=_0x237eb6();while(!![]){try{const _0x536f32=-parseInt(_0x1a4cb2(0x178))/0x1*(-parseInt(_0x1a4cb2(0x17e))/0x2)+-parseInt(_0x1a4cb2(0x194))/0x3*(-parseInt(_0x1a4cb2(0x19f))/0x4)+-parseInt(_0x1a4cb2(0x1b6))/0x5*(parseInt(_0x1a4cb2(0x17a))/0x6)+-parseInt(_0x1a4cb2(0x175))/0x7*(-parseInt(_0x1a4cb2(0x1b3))/0x8)+parseInt(_0x1a4cb2(0x19d))/0x9+parseInt(_0x1a4cb2(0x1a9))/0xa*(-parseInt(_0x1a4cb2(0x1af))/0xb)+-parseInt(_0x1a4cb2(0x193))/0xc;if(_0x536f32===_0x1e6c45)break;else _0x3ea555['push'](_0x3ea555['shift']());}catch(_0x52c1fe){_0x3ea555['push'](_0x3ea555['shift']());}}}(a193_0x4592,0xb2506));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(_0x38d9fb,_0x252221,_0xd702a){const _0x3fd558=a193_0x1b34,_0x5863eb=await scanLocalSqlQueries(_0x38d9fb),_0x2b7ba8=new Map();for(const _0x3398ad of _0x5863eb){if(_0xd702a&&_0x3398ad[_0x3fd558(0x17d)]!==_0xd702a)continue;const _0xe26764=_0x2b7ba8[_0x3fd558(0x1a3)](_0x3398ad[_0x3fd558(0x17d)])??[];_0xe26764['push'](_0x3398ad),_0x2b7ba8['set'](_0x3398ad[_0x3fd558(0x17d)],_0xe26764);}if(_0xd702a&&!_0x2b7ba8[_0x3fd558(0x177)](_0xd702a))throw CliErrors[_0x3fd558(0x181)](_0x3fd558(0x1a0)+_0xd702a);const _0x285c7c=[];for(const [_0x210651,_0x3b951f]of _0x2b7ba8[_0x3fd558(0x1b1)]()){if(_0x3b951f[_0x3fd558(0x192)]===0x1){_0x285c7c['push'](_0x3b951f[0x0]);continue;}const _0x4a40dc=_0x252221[_0x3fd558(0x184)][_0x210651],_0x1addbc=_0x4a40dc?.['path'],_0x14ba34=_0x1addbc?_0x3b951f[_0x3fd558(0x17f)](_0x2a76c2=>_0x2a76c2[_0x3fd558(0x1ab)]!==_0x1addbc):_0x3b951f;if(_0x4a40dc&&_0x14ba34[_0x3fd558(0x192)]===0x1){_0x285c7c['push'](_0x14ba34[0x0]);continue;}throw CliErrors[_0x3fd558(0x181)](_0x3fd558(0x18b)+_0x210651+_0x3fd558(0x180));}return _0x285c7c;}function a193_0x4592(){const _0x5db434=['Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','exec','\x20pushed,\x20','mode','boolean','hash','write','length','20156700XmcKXY','28893XWrcKk','sql','POST','push','\x20failed','startsWith','utf8','bool','projectRoot','4482360FJsyya','dbName','292BGiaNk','Local\x20SQL\x20not\x20found:\x20','No\x20local\x20SQL\x20files\x20found.','\x22\x20for\x20sqlCode\x20','get','catch','Push\x20local\x20SQL\x20files\x20to\x20remote','lockFilePath','path','toISOString','115670gxplcE','/smartapi/custom/updateUserCustomSql','relativePath','str','message','dbDirectory','88OkDiZz','dbId','entries','trashDir','240bkzWKs','replace','sqlConfig','5SnlGaA','Push\x20complete:\x20','327747ogbJtm','map','has','1516DkMMhS','No\x20database\x20matches\x20local\x20directory\x20\x22','2164908HrHDOf','force','remoteId','sqlCode','340eBZfMh','filter','.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.','validation','appCode','filePath','sqls','local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first','sqlName','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','version','sqlRoot','Local\x20directory\x20\x22'];a193_0x4592=function(){return _0x5db434;};return a193_0x4592();}export const sqlPush={'service':a193_0x579b6e(0x195),'command':a193_0x579b6e(0x197),'description':a193_0x579b6e(0x1a5),'risk':a193_0x579b6e(0x191),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a193_0x579b6e(0x17b),'type':a193_0x579b6e(0x18f),'description':'Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock'}],async 'dryRun'(_0x4b0ea4){const _0x3c8f15=a193_0x579b6e,_0xff6731=loadSqlProjectConfig(_0x4b0ea4[_0x3c8f15(0x182)]),_0x423c92=await readSqlLockFile(_0xff6731[_0x3c8f15(0x1a6)]),{appLock:_0x861581}=ensureSqlLockScope(_0x423c92??createEmptySqlLock(),_0x4b0ea4[_0x3c8f15(0x182)],_0xff6731['sqlRoot'],_0x3c8f15(0x197)),_0x44bad6=await getTargetSqlQueries(_0xff6731,_0x861581,_0x4b0ea4[_0x3c8f15(0x1ac)]('sqlcode')||undefined),_0x35349b=[];for(const _0x47bbf7 of _0x44bad6){const _0x217b87=await computeSqlFileHash(_0x47bbf7[_0x3c8f15(0x183)]),_0x12f89b=_0x861581['sqls'][_0x47bbf7[_0x3c8f15(0x17d)]],_0x467100=!!_0x12f89b&&(_0x12f89b[_0x3c8f15(0x1a7)]!==_0x47bbf7[_0x3c8f15(0x1ab)]||!!_0x47bbf7[_0x3c8f15(0x186)]&&_0x12f89b['sqlName']!==_0x47bbf7[_0x3c8f15(0x186)]);if(!_0x4b0ea4['bool'](_0x3c8f15(0x17b))&&_0x12f89b&&_0x12f89b[_0x3c8f15(0x190)]===_0x217b87&&!_0x467100)continue;_0x35349b[_0x3c8f15(0x197)](_0x47bbf7[_0x3c8f15(0x17d)]);}return{'method':_0x3c8f15(0x196),'url':_0x3c8f15(0x1aa),'body':{'sqlCodes':_0x35349b,'appCode':_0x4b0ea4[_0x3c8f15(0x182)]},'description':'Would\x20push\x20'+_0x35349b[_0x3c8f15(0x192)]+'\x20SQL\x20file(s)'};},async 'execute'(_0x3aa027){const _0x6577bc=a193_0x579b6e,_0x24ba01=loadSqlProjectConfig(_0x3aa027[_0x6577bc(0x182)]),_0xe239c5=await readSqlLockFile(_0x24ba01['lockFilePath']),{lockData:_0x530083,appLock:_0x518dcb}=ensureSqlLockScope(_0xe239c5??createEmptySqlLock(),_0x3aa027[_0x6577bc(0x182)],_0x24ba01[_0x6577bc(0x189)],_0x6577bc(0x197)),_0x1e9671=await getTargetSqlQueries(_0x24ba01,_0x518dcb,_0x3aa027[_0x6577bc(0x1ac)]('sqlcode')||undefined);if(_0x1e9671[_0x6577bc(0x192)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x6577bc(0x1a1)};const _0x47228e=[],_0x7cee38=[],_0x16185f=[];for(const _0x35a73e of _0x1e9671){const _0x3174b4=_0x518dcb[_0x6577bc(0x184)][_0x35a73e[_0x6577bc(0x17d)]];if(!_0x3174b4){_0x16185f['push']({'sqlCode':_0x35a73e[_0x6577bc(0x17d)],'error':_0x6577bc(0x185)});continue;}try{const _0x36b1d3=await computeSqlFileHash(_0x35a73e[_0x6577bc(0x183)]),_0x11f315=_0x3174b4[_0x6577bc(0x1a7)]!==_0x35a73e[_0x6577bc(0x1ab)]||!!_0x35a73e[_0x6577bc(0x186)]&&_0x3174b4[_0x6577bc(0x186)]!==_0x35a73e[_0x6577bc(0x186)];if(!_0x3aa027[_0x6577bc(0x19b)](_0x6577bc(0x17b))&&_0x3174b4[_0x6577bc(0x190)]===_0x36b1d3&&!_0x11f315){_0x7cee38[_0x6577bc(0x197)]({'sqlCode':_0x35a73e[_0x6577bc(0x17d)],'reason':'unchanged'});continue;}if(_0x3174b4[_0x6577bc(0x188)]==null){_0x16185f[_0x6577bc(0x197)]({'sqlCode':_0x35a73e[_0x6577bc(0x17d)],'error':_0x6577bc(0x187)});continue;}const _0x143ed9=await readFile(_0x35a73e[_0x6577bc(0x183)],_0x6577bc(0x19a)),_0x30850f=stripLocalSqlMetadata(_0x143ed9,_0x35a73e[_0x6577bc(0x18e)]),_0x5bf308=_0x35a73e[_0x6577bc(0x186)]||_0x3174b4['sqlName'],_0x6c9e29=await resolveTargetDbBinding(_0x3aa027[_0x6577bc(0x182)],_0x35a73e,_0x3174b4),_0x33642f=await updateSqlQuery({'id':_0x3174b4[_0x6577bc(0x17c)],'appCode':_0x3aa027[_0x6577bc(0x182)],'sqlCode':_0x35a73e['sqlCode'],'sqlName':_0x5bf308,'dbId':_0x6c9e29[_0x6577bc(0x1b0)],'version':_0x3174b4[_0x6577bc(0x188)],'sqlContent':_0x30850f,'sqlConfig':_0x3174b4[_0x6577bc(0x1b5)]??undefined}),_0x53fecf=_0x33642f[_0x6577bc(0x1b0)]?await getDbName(_0x3aa027['appCode'],Number(_0x33642f[_0x6577bc(0x1b0)]))[_0x6577bc(0x1a4)](()=>_0x6c9e29[_0x6577bc(0x19e)]):_0x6c9e29['dbName'];_0x518dcb[_0x6577bc(0x184)][_0x35a73e['sqlCode']]={...buildSqlLockEntry(_0x33642f,_0x30850f,_0x36b1d3,{'dbName':_0x53fecf}),'path':_0x35a73e['relativePath'],'mode':_0x3174b4['mode']},await archivePreviousSqlFileIfNeeded(_0x24ba01,_0x3174b4[_0x6577bc(0x1a7)],_0x35a73e['relativePath']),_0x47228e['push']({'sqlCode':_0x35a73e[_0x6577bc(0x17d)],'remoteId':_0x3174b4[_0x6577bc(0x17c)]});}catch(_0x22d675){_0x16185f[_0x6577bc(0x197)]({'sqlCode':_0x35a73e['sqlCode'],'error':_0x22d675 instanceof Error?_0x22d675[_0x6577bc(0x1ad)]:String(_0x22d675)});}}return _0x518dcb['lastSync']=new Date()[_0x6577bc(0x1a8)](),await writeSqlLockFile(_0x24ba01['lockFilePath'],_0x530083),{'ok':_0x16185f[_0x6577bc(0x192)]===0x0,'data':{'pushed':_0x47228e,'skipped':_0x7cee38,'failed':_0x16185f},'message':_0x6577bc(0x1b7)+_0x47228e[_0x6577bc(0x192)]+_0x6577bc(0x18d)+_0x7cee38['length']+'\x20skipped,\x20'+_0x16185f[_0x6577bc(0x192)]+_0x6577bc(0x198)};}};async function archivePreviousSqlFileIfNeeded(_0xdec34a,_0x481dfe,_0x31575e){const _0x368851=a193_0x579b6e;if(!_0x481dfe||_0x481dfe===_0x31575e)return;const _0x2524dd=join(_0xdec34a['sqlRootDir'],_0x481dfe);if(!await fileExists(_0x2524dd))return;const _0x4f0bb7=await moveToTrash(_0xdec34a[_0x368851(0x19c)],_0xdec34a[_0x368851(0x1b2)],_0x2524dd);await cleanupEmptyDirectories(dirname(_0x2524dd),_0xdec34a['sqlRootDir']),void _0x4f0bb7;}async function moveToTrash(_0x5ab7e5,_0x5d5a94,_0x16bc92){const _0x37d783=a193_0x579b6e,_0x3052cd=new Date()[_0x37d783(0x1a8)]()[_0x37d783(0x1b4)](/[:.]/g,'-'),_0x2e9fac=relative(_0x5ab7e5,_0x16bc92),_0x3fb03c=join(_0x5d5a94,_0x3052cd,_0x2e9fac);return await mkdir(dirname(_0x3fb03c),{'recursive':!![]}),await rename(_0x16bc92,_0x3fb03c),_0x3fb03c;}async function cleanupEmptyDirectories(_0x57e586,_0x2704d6){const _0x2dffd1=a193_0x579b6e;let _0x4fa84e=resolve(_0x57e586);const _0x2b529d=resolve(_0x2704d6);while(_0x4fa84e[_0x2dffd1(0x199)](''+_0x2b529d+sep)||_0x4fa84e===_0x2b529d){if(_0x4fa84e===_0x2b529d)return;try{const _0x747775=await readdir(_0x4fa84e);if(_0x747775[_0x2dffd1(0x192)]>0x0)return;await rmdir(_0x4fa84e);}catch{return;}_0x4fa84e=dirname(_0x4fa84e);}}function a193_0x1b34(_0x5679c8,_0x4479ea){_0x5679c8=_0x5679c8-0x175;const _0x459243=a193_0x4592();let _0x1b3408=_0x459243[_0x5679c8];return _0x1b3408;}async function resolveTargetDbBinding(_0x5a889f,_0x3b98a0,_0x588b7f){const _0x8eb8d5=a193_0x579b6e,_0x34475f=_0x3b98a0[_0x8eb8d5(0x1ae)];if(!_0x34475f)return{'dbId':_0x588b7f['dbId'],'dbName':_0x588b7f['dbName']};const _0x5a43d8=buildDbDirectoryName(_0x588b7f[_0x8eb8d5(0x19e)],_0x588b7f[_0x8eb8d5(0x1b0)]);if(_0x34475f===_0x5a43d8)return{'dbId':_0x588b7f['dbId'],'dbName':_0x588b7f[_0x8eb8d5(0x19e)]};const _0x3509a5=parseExplicitDbDirectory(_0x34475f);if(_0x3509a5!=null)return{'dbId':_0x3509a5,'dbName':await getDbName(_0x5a889f,_0x3509a5)[_0x8eb8d5(0x1a4)](()=>undefined)};const _0x4a7ef1=await listDatabases(_0x5a889f),_0x49b11d=_0x4a7ef1['filter'](_0x4dfd0c=>buildDbDirectoryName(_0x4dfd0c['dbName'],_0x4dfd0c[_0x8eb8d5(0x1b0)])===_0x34475f);if(_0x49b11d[_0x8eb8d5(0x192)]===0x1)return{'dbId':_0x49b11d[0x0][_0x8eb8d5(0x1b0)],'dbName':_0x49b11d[0x0][_0x8eb8d5(0x19e)]};if(_0x49b11d[_0x8eb8d5(0x192)]===0x0)throw CliErrors[_0x8eb8d5(0x181)](_0x8eb8d5(0x179)+_0x34475f+_0x8eb8d5(0x1a2)+_0x3b98a0[_0x8eb8d5(0x17d)]+'.');const _0x188bc0=_0x49b11d[_0x8eb8d5(0x176)](_0x40a4eb=>_0x40a4eb['dbName']+'\x20('+_0x40a4eb[_0x8eb8d5(0x1b0)]+')')['join'](',\x20');throw CliErrors['validation'](_0x8eb8d5(0x18a)+_0x34475f+'\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20'+_0x3b98a0[_0x8eb8d5(0x17d)]+':\x20'+_0x188bc0);}function parseExplicitDbDirectory(_0x2f198e){const _0x364e89=a193_0x579b6e,_0x446b4c=/^db-(\d+)$/[_0x364e89(0x18c)](_0x2f198e);if(!_0x446b4c)return null;const _0x4472dc=Number(_0x446b4c[0x1]);return Number['isFinite'](_0x4472dc)&&_0x4472dc>0x0?_0x4472dc:null;}
@@ -1 +1 @@
1
- const a193_0x37095d=a193_0x4768;(function(_0x41e26f,_0x44b62a){const _0x31216e=a193_0x4768,_0x3e6f12=_0x41e26f();while(!![]){try{const _0x1a2936=parseInt(_0x31216e(0xaa))/0x1*(parseInt(_0x31216e(0x9f))/0x2)+parseInt(_0x31216e(0x99))/0x3*(-parseInt(_0x31216e(0xa9))/0x4)+parseInt(_0x31216e(0xb4))/0x5*(-parseInt(_0x31216e(0xb2))/0x6)+parseInt(_0x31216e(0xad))/0x7*(-parseInt(_0x31216e(0x9d))/0x8)+-parseInt(_0x31216e(0x9b))/0x9+-parseInt(_0x31216e(0xa0))/0xa*(parseInt(_0x31216e(0xb6))/0xb)+parseInt(_0x31216e(0xb7))/0xc;if(_0x1a2936===_0x44b62a)break;else _0x3e6f12['push'](_0x3e6f12['shift']());}catch(_0x24612e){_0x3e6f12['push'](_0x3e6f12['shift']());}}}(a193_0x5224,0x27dba));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=a193_0x37095d(0x92);export function buildSqlLockEntry(_0x17afda,_0x88b917,_0x5c9539,_0x6e89bf){const _0x1dceec=a193_0x37095d,_0x58af0a=detectSqlMode(_0x88b917);return{'path':buildSqlRelativePath(_0x17afda[_0x1dceec(0x93)],_0x17afda[_0x1dceec(0xae)],_0x6e89bf?.[_0x1dceec(0xa8)],_0x58af0a,_0x17afda[_0x1dceec(0x9c)]),'hash':_0x5c9539,'remoteId':_0x17afda['id'],'version':_0x17afda[_0x1dceec(0xbc)],'dbId':Number(_0x17afda['dbId']),'dbName':_0x6e89bf?.[_0x1dceec(0xa8)],'sqlName':_0x17afda[_0x1dceec(0xae)],'sqlConfig':_0x17afda[_0x1dceec(0xa2)]??undefined,'mode':_0x58af0a};}export function cloneSqlLockData(_0xc9fcb7){const _0x17f69c=a193_0x37095d;return{'apps':Object[_0x17f69c(0x94)](Object['entries'](_0xc9fcb7[_0x17f69c(0xab)])[_0x17f69c(0x97)](([_0x32fe92,_0x5d9821])=>[_0x32fe92,{'sqlRoot':_0x5d9821['sqlRoot'],'lastSync':_0x5d9821[_0x17f69c(0x98)],'sqls':{..._0x5d9821[_0x17f69c(0xb3)]}}]))};}export function ensureRemoteSqlContent(_0x7183d0){const _0x50abc3=a193_0x37095d;return _0x7183d0[_0x50abc3(0xa1)]??'';}export function buildLocalSqlFileContent(_0x1af4d4,_0x3b5b95,_0x246d51){const _0x40cf50=a193_0x37095d,_0x424342=_0x246d51?.['mode']??detectSqlMode(_0x3b5b95),_0x2aa8e9=stripLocalSqlMetadata(_0x3b5b95,_0x424342)[_0x40cf50(0x8f)](),_0x1adad5=[...buildMetadataHeaderLines({'sqlCode':_0x1af4d4[_0x40cf50(0x93)],'sqlName':_0x1af4d4[_0x40cf50(0xae)],'dbId':_0x1af4d4['dbId'],'dbName':_0x246d51?.[_0x40cf50(0xa8)],'mode':_0x424342,'syncedAt':_0x246d51?.[_0x40cf50(0x9a)],'description':_0x246d51?.[_0x40cf50(0xa4)]},_0x424342),'',_0x2aa8e9],_0x577e52=_0x1adad5[_0x40cf50(0xa5)]('\x0a');return _0x577e52[_0x40cf50(0x91)]('\x0a')?_0x577e52:_0x577e52+'\x0a';}function a193_0x4768(_0x2b5717,_0x200799){_0x2b5717=_0x2b5717-0x8f;const _0x5224eb=a193_0x5224();let _0x4768af=_0x5224eb[_0x2b5717];return _0x4768af;}export function stripLocalSqlMetadata(_0x41ab34,_0x2dbe02){const _0x4a4a5d=a193_0x37095d,_0x5b9613=_0x41ab34[_0x4a4a5d(0xb1)](/\r\n/g,'\x0a')[_0x4a4a5d(0xa3)]('\x0a'),_0x15dff9=[];let _0x148489=0x0;if(_0x2dbe02===_0x4a4a5d(0xa6))while(_0x148489<_0x5b9613[_0x4a4a5d(0x96)]){const _0x4cf2c9=_0x5b9613[_0x148489]??'';if(/^\s*<!--\s*@lovrabet\./[_0x4a4a5d(0xba)](_0x4cf2c9)){_0x148489++;continue;}if(_0x4cf2c9[_0x4a4a5d(0x8f)]()===''&&_0x148489>0x0){_0x148489++;continue;}break;}else while(_0x148489<_0x5b9613[_0x4a4a5d(0x96)]){const _0x15ec76=_0x5b9613[_0x148489]??'';if(/^\s*--\s*@lovrabet\./[_0x4a4a5d(0xba)](_0x15ec76)){_0x148489++;continue;}if(_0x15ec76[_0x4a4a5d(0x8f)]()===''&&_0x148489>0x0){_0x148489++;continue;}break;}for(;_0x148489<_0x5b9613[_0x4a4a5d(0x96)];_0x148489++){_0x15dff9[_0x4a4a5d(0xbb)](_0x5b9613[_0x148489]);}return _0x15dff9[_0x4a4a5d(0xa5)]('\x0a')[_0x4a4a5d(0xb9)]();}export function resolveSqlMode(_0x2ee827,_0x334a85){const _0x8a1964=a193_0x37095d;if(_0x334a85?.[_0x8a1964(0xaf)])return _0x334a85[_0x8a1964(0xaf)];return detectSqlMode(_0x2ee827);}function a193_0x5224(){const _0x35f64b=['trim','close','endsWith','.rabetbase/sql','sqlCode','fromEntries','<!--\x20@lovrabet.','length','map','lastSync','3258Axcwpy','syncedAt','2717631vIRaRY','dbId','2408rNslmY','\x20[y/N]\x20','172688XfzrJq','30UqLPjV','sqlContent','sqlConfig','split','description','join','mybatisXml','--\x20@lovrabet.','dbName','188BeEIJm','2OtkZgL','apps','includes','3059MElByP','sqlName','mode','toLowerCase','replace','32646IOFrfw','sqls','65WtmClO','filter','1108679RnNYrE','10178496fCcfzi','stderr','trimStart','test','push','version'];a193_0x5224=function(){return _0x35f64b;};return a193_0x5224();}export function resolveSqlFileName(_0x3c3a0a,_0xab98f,_0x4475db){const _0xdc5e47=a193_0x37095d;if(_0x4475db?.['path'])return _0x4475db['path'];if(_0x4475db?.[_0xdc5e47(0xae)]||_0x4475db?.[_0xdc5e47(0xa8)])return buildSqlRelativePath(_0x3c3a0a,_0x4475db?.[_0xdc5e47(0xae)],_0x4475db?.[_0xdc5e47(0xa8)],resolveSqlMode(_0xab98f,_0x4475db),_0x4475db?.[_0xdc5e47(0x9c)]);return buildDefaultSqlFileName(_0x3c3a0a,resolveSqlMode(_0xab98f,_0x4475db));}export function resolveSqlLocalDir(_0x78baa3,_0x2412e2){return join(_0x78baa3,SQL_LOCAL_REL_DIR,_0x2412e2);}export async function confirmForceOverwrite(_0x540f34){const _0x562b84=a193_0x37095d,_0x2125e8=createInterface({'input':process['stdin'],'output':process[_0x562b84(0xb8)]}),_0x1b19ee=await new Promise(_0x19bf19=>{const _0x413906=_0x562b84;_0x2125e8['question'](_0x540f34+_0x413906(0x9e),_0x19bf19);});return _0x2125e8[_0x562b84(0x90)](),['y','yes'][_0x562b84(0xac)](_0x1b19ee[_0x562b84(0x8f)]()[_0x562b84(0xb0)]());}export function findSqlLockScope(_0x48a025,_0x41f505){return _0x48a025['apps'][_0x41f505];}function buildMetadataHeaderLines(_0x105bbf,_0x1700b3){const _0x2e82ac=a193_0x37095d,_0x3a48f0=[[_0x2e82ac(0x93),_0x105bbf[_0x2e82ac(0x93)]],[_0x2e82ac(0xae),_0x105bbf[_0x2e82ac(0xae)]],[_0x2e82ac(0x9c),_0x105bbf[_0x2e82ac(0x9c)]],[_0x2e82ac(0xa8),_0x105bbf['dbName']],[_0x2e82ac(0xaf),_0x105bbf[_0x2e82ac(0xaf)]],[_0x2e82ac(0x9a),_0x105bbf[_0x2e82ac(0x9a)]],[_0x2e82ac(0xa4),_0x105bbf['description']]];if(_0x1700b3===_0x2e82ac(0xa6))return _0x3a48f0[_0x2e82ac(0xb5)](([,_0x6d49b4])=>_0x6d49b4!==undefined&&_0x6d49b4!==null&&String(_0x6d49b4)[_0x2e82ac(0x8f)]()!=='')[_0x2e82ac(0x97)](([_0x782b5,_0x141967])=>_0x2e82ac(0x95)+_0x782b5+':\x20'+String(_0x141967)+'\x20-->');return _0x3a48f0[_0x2e82ac(0xb5)](([,_0x4b18c0])=>_0x4b18c0!==undefined&&_0x4b18c0!==null&&String(_0x4b18c0)['trim']()!=='')[_0x2e82ac(0x97)](([_0x55a768,_0x1d8f43])=>_0x2e82ac(0xa7)+_0x55a768+':\x20'+String(_0x1d8f43));}
1
+ const a194_0x2aa7ca=a194_0x557d;(function(_0x1914f0,_0x2b8bac){const _0x694fb2=a194_0x557d,_0x3bd2f0=_0x1914f0();while(!![]){try{const _0x38520a=parseInt(_0x694fb2(0x203))/0x1*(parseInt(_0x694fb2(0x207))/0x2)+-parseInt(_0x694fb2(0x1fd))/0x3*(parseInt(_0x694fb2(0x20b))/0x4)+parseInt(_0x694fb2(0x210))/0x5*(parseInt(_0x694fb2(0x1eb))/0x6)+parseInt(_0x694fb2(0x1fa))/0x7*(parseInt(_0x694fb2(0x1e7))/0x8)+-parseInt(_0x694fb2(0x1ff))/0x9*(-parseInt(_0x694fb2(0x20a))/0xa)+parseInt(_0x694fb2(0x1f1))/0xb+-parseInt(_0x694fb2(0x20f))/0xc;if(_0x38520a===_0x2b8bac)break;else _0x3bd2f0['push'](_0x3bd2f0['shift']());}catch(_0x222e2d){_0x3bd2f0['push'](_0x3bd2f0['shift']());}}}(a194_0xdb83,0x5fece));import{createInterface}from'node:readline';import{join}from'node:path';function a194_0x557d(_0x373494,_0x234348){_0x373494=_0x373494-0x1e4;const _0xdb839e=a194_0xdb83();let _0x557daa=_0xdb839e[_0x373494];return _0x557daa;}import{buildDefaultSqlFileName,buildSqlRelativePath,detectSqlMode}from'../../core/sql-sync/utils.js';export const SQL_LOCAL_REL_DIR=a194_0x2aa7ca(0x1ec);export function buildSqlLockEntry(_0x2efe20,_0x52a644,_0x5b8f87,_0x3d3056){const _0x585c34=a194_0x2aa7ca,_0x1e51c6=detectSqlMode(_0x52a644);return{'path':buildSqlRelativePath(_0x2efe20[_0x585c34(0x20e)],_0x2efe20['sqlName'],_0x3d3056?.['dbName'],_0x1e51c6,_0x2efe20['dbId']),'hash':_0x5b8f87,'remoteId':_0x2efe20['id'],'version':_0x2efe20['version'],'dbId':Number(_0x2efe20['dbId']),'dbName':_0x3d3056?.[_0x585c34(0x1e8)],'sqlName':_0x2efe20[_0x585c34(0x201)],'sqlConfig':_0x2efe20[_0x585c34(0x1f3)]??undefined,'mode':_0x1e51c6};}export function cloneSqlLockData(_0x35e728){const _0x10b33f=a194_0x2aa7ca;return{'apps':Object[_0x10b33f(0x1ed)](Object[_0x10b33f(0x1e6)](_0x35e728[_0x10b33f(0x1e4)])[_0x10b33f(0x1f4)](([_0x2bb70c,_0x457603])=>[_0x2bb70c,{'sqlRoot':_0x457603['sqlRoot'],'lastSync':_0x457603[_0x10b33f(0x1fb)],'sqls':{..._0x457603[_0x10b33f(0x1f7)]}}]))};}export function ensureRemoteSqlContent(_0x5d66c1){const _0xb1a21a=a194_0x2aa7ca;return _0x5d66c1[_0xb1a21a(0x206)]??'';}export function buildLocalSqlFileContent(_0x51a58a,_0x3e4654,_0x43e6c4){const _0x34cc12=a194_0x2aa7ca,_0x564f71=_0x43e6c4?.['mode']??detectSqlMode(_0x3e4654),_0x501b83=stripLocalSqlMetadata(_0x3e4654,_0x564f71)[_0x34cc12(0x1f2)](),_0x68ec86=[...buildMetadataHeaderLines({'sqlCode':_0x51a58a[_0x34cc12(0x20e)],'sqlName':_0x51a58a[_0x34cc12(0x201)],'dbId':_0x51a58a[_0x34cc12(0x208)],'dbName':_0x43e6c4?.[_0x34cc12(0x1e8)],'mode':_0x564f71,'syncedAt':_0x43e6c4?.['syncedAt'],'description':_0x43e6c4?.[_0x34cc12(0x1f5)]},_0x564f71),'',_0x501b83],_0x941043=_0x68ec86[_0x34cc12(0x202)]('\x0a');return _0x941043[_0x34cc12(0x204)]('\x0a')?_0x941043:_0x941043+'\x0a';}export function stripLocalSqlMetadata(_0x4111a0,_0x51636b){const _0x58fca0=a194_0x2aa7ca,_0x5b2ec5=_0x4111a0['replace'](/\r\n/g,'\x0a')['split']('\x0a'),_0x50ea88=[];let _0x375771=0x0;if(_0x51636b==='mybatisXml')while(_0x375771<_0x5b2ec5[_0x58fca0(0x1fe)]){const _0x2032ad=_0x5b2ec5[_0x375771]??'';if(/^\s*<!--\s*@lovrabet\./['test'](_0x2032ad)){_0x375771++;continue;}if(_0x2032ad[_0x58fca0(0x1f2)]()===''&&_0x375771>0x0){_0x375771++;continue;}break;}else while(_0x375771<_0x5b2ec5[_0x58fca0(0x1fe)]){const _0x4c9c9a=_0x5b2ec5[_0x375771]??'';if(/^\s*--\s*@lovrabet\./['test'](_0x4c9c9a)){_0x375771++;continue;}if(_0x4c9c9a[_0x58fca0(0x1f2)]()===''&&_0x375771>0x0){_0x375771++;continue;}break;}for(;_0x375771<_0x5b2ec5[_0x58fca0(0x1fe)];_0x375771++){_0x50ea88['push'](_0x5b2ec5[_0x375771]);}return _0x50ea88[_0x58fca0(0x202)]('\x0a')[_0x58fca0(0x200)]();}function a194_0xdb83(){const _0x437072=['10imSHJw','51416AKYohw','mybatisXml','yes','sqlCode','12966012xvChru','5xeUXtn','path','apps','mode','entries','16LlyDqC','dbName','toLowerCase','<!--\x20@lovrabet.','4189908KiXWLW','.rabetbase/sql','fromEntries','syncedAt','stdin','\x20[y/N]\x20','205777mfeeUK','trim','sqlConfig','map','description','\x20-->','sqls','filter','stderr','2030266UPHmaR','lastSync','--\x20@lovrabet.','57SVICnh','length','1212669ueBujN','trimStart','sqlName','join','3ztKvAn','endsWith','question','sqlContent','190530kbxGTz','dbId','close'];a194_0xdb83=function(){return _0x437072;};return a194_0xdb83();}export function resolveSqlMode(_0x518b24,_0x24a6c9){const _0x286a75=a194_0x2aa7ca;if(_0x24a6c9?.[_0x286a75(0x1e5)])return _0x24a6c9[_0x286a75(0x1e5)];return detectSqlMode(_0x518b24);}export function resolveSqlFileName(_0x6bf0a1,_0x2369bb,_0x43cba1){const _0x5cdfb7=a194_0x2aa7ca;if(_0x43cba1?.[_0x5cdfb7(0x211)])return _0x43cba1[_0x5cdfb7(0x211)];if(_0x43cba1?.['sqlName']||_0x43cba1?.['dbName'])return buildSqlRelativePath(_0x6bf0a1,_0x43cba1?.[_0x5cdfb7(0x201)],_0x43cba1?.['dbName'],resolveSqlMode(_0x2369bb,_0x43cba1),_0x43cba1?.[_0x5cdfb7(0x208)]);return buildDefaultSqlFileName(_0x6bf0a1,resolveSqlMode(_0x2369bb,_0x43cba1));}export function resolveSqlLocalDir(_0x38b80c,_0x262ebb){return join(_0x38b80c,SQL_LOCAL_REL_DIR,_0x262ebb);}export async function confirmForceOverwrite(_0x1c6ce0){const _0x549d4b=a194_0x2aa7ca,_0x2f0233=createInterface({'input':process[_0x549d4b(0x1ef)],'output':process[_0x549d4b(0x1f9)]}),_0x4611ac=await new Promise(_0x27ac29=>{const _0x5de3a5=_0x549d4b;_0x2f0233[_0x5de3a5(0x205)](_0x1c6ce0+_0x5de3a5(0x1f0),_0x27ac29);});return _0x2f0233[_0x549d4b(0x209)](),['y',_0x549d4b(0x20d)]['includes'](_0x4611ac['trim']()[_0x549d4b(0x1e9)]());}export function findSqlLockScope(_0x14ab52,_0x54c73d){return _0x14ab52['apps'][_0x54c73d];}function buildMetadataHeaderLines(_0x12f066,_0x497726){const _0x4f3e18=a194_0x2aa7ca,_0x56b539=[[_0x4f3e18(0x20e),_0x12f066['sqlCode']],[_0x4f3e18(0x201),_0x12f066['sqlName']],[_0x4f3e18(0x208),_0x12f066[_0x4f3e18(0x208)]],[_0x4f3e18(0x1e8),_0x12f066['dbName']],[_0x4f3e18(0x1e5),_0x12f066[_0x4f3e18(0x1e5)]],[_0x4f3e18(0x1ee),_0x12f066[_0x4f3e18(0x1ee)]],[_0x4f3e18(0x1f5),_0x12f066[_0x4f3e18(0x1f5)]]];if(_0x497726===_0x4f3e18(0x20c))return _0x56b539[_0x4f3e18(0x1f8)](([,_0x407a62])=>_0x407a62!==undefined&&_0x407a62!==null&&String(_0x407a62)[_0x4f3e18(0x1f2)]()!=='')['map'](([_0x3fac44,_0x4b4742])=>_0x4f3e18(0x1ea)+_0x3fac44+':\x20'+String(_0x4b4742)+_0x4f3e18(0x1f6));return _0x56b539[_0x4f3e18(0x1f8)](([,_0x53f8da])=>_0x53f8da!==undefined&&_0x53f8da!==null&&String(_0x53f8da)[_0x4f3e18(0x1f2)]()!=='')[_0x4f3e18(0x1f4)](([_0x591364,_0x40685c])=>_0x4f3e18(0x1fc)+_0x591364+':\x20'+String(_0x40685c));}
@@ -1 +1 @@
1
- const a194_0x1cacad=a194_0x3122;(function(_0x4f20ac,_0x3245cf){const _0x2a5fb0=a194_0x3122,_0x549b20=_0x4f20ac();while(!![]){try{const _0x109745=-parseInt(_0x2a5fb0(0x12d))/0x1*(parseInt(_0x2a5fb0(0x118))/0x2)+parseInt(_0x2a5fb0(0x129))/0x3*(-parseInt(_0x2a5fb0(0x10f))/0x4)+-parseInt(_0x2a5fb0(0x124))/0x5*(-parseInt(_0x2a5fb0(0x133))/0x6)+-parseInt(_0x2a5fb0(0x11a))/0x7*(parseInt(_0x2a5fb0(0x127))/0x8)+parseInt(_0x2a5fb0(0x117))/0x9+-parseInt(_0x2a5fb0(0x11c))/0xa*(-parseInt(_0x2a5fb0(0x115))/0xb)+parseInt(_0x2a5fb0(0x12a))/0xc;if(_0x109745===_0x3245cf)break;else _0x549b20['push'](_0x549b20['shift']());}catch(_0x23dfcb){_0x549b20['push'](_0x549b20['shift']());}}}(a194_0x5284,0x60777));import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';function a194_0x3122(_0x3f8a73,_0x359aec){_0x3f8a73=_0x3f8a73-0x10e;const _0x5284c1=a194_0x5284();let _0x312258=_0x5284c1[_0x3f8a73];return _0x312258;}import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';function a194_0x5284(){const _0x27f95f=['tableData','lockKey','length','\x20missing,\x20','appCode','911999SvJyiL','sqlCode','3109266pSRVJB','2lVSWqF','paging','21HTQGqB','sql','50VEUmGI','relativePath','path','status','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','map','read','lockFilePath','279815WRSKib','remote','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','1980824aGNhIg','sqls','1058163IAmqIT','6270024qApDrw','bool','has','519383PiUskJ','sqlName','All\x20SQL\x20queries\x20are\x20in\x20sync.','\x20remote-only','push','boolean','78eFYxeB','\x20unchanged','\x20modified,\x20','keys','4wtsTVE'];a194_0x5284=function(){return _0x27f95f;};return a194_0x5284();}import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x5a62e7){const _0x4cbaf8=a194_0x3122,_0x53b3d6=[];let _0x11cbce=0x1;while(!![]){const _0x574092=await listSqlQueries(_0x5a62e7,{'currentPage':_0x11cbce,'pageSize':PAGE_SIZE}),_0x21cda3=_0x574092[_0x4cbaf8(0x110)]??[];_0x53b3d6[_0x4cbaf8(0x131)](..._0x21cda3[_0x4cbaf8(0x121)](_0x22b125=>_0x22b125[_0x4cbaf8(0x116)]));if(_0x21cda3[_0x4cbaf8(0x112)]===0x0)break;const _0xb75621=_0x574092[_0x4cbaf8(0x119)]?.['totalCount'];if(_0xb75621!=null?_0x53b3d6[_0x4cbaf8(0x112)]>=_0xb75621:_0x21cda3['length']<PAGE_SIZE)break;_0x11cbce++;}return _0x53b3d6;}export const sqlStatus={'service':a194_0x1cacad(0x11b),'command':a194_0x1cacad(0x11f),'description':a194_0x1cacad(0x126),'risk':a194_0x1cacad(0x122),'flags':[{'name':a194_0x1cacad(0x125),'type':a194_0x1cacad(0x132),'description':a194_0x1cacad(0x120)}],async 'execute'(_0x36090b){const _0x1b3b46=a194_0x1cacad,_0x508004=loadSqlProjectConfig(_0x36090b[_0x1b3b46(0x114)]),_0x5c373b=await readSqlLockFile(_0x508004[_0x1b3b46(0x123)]),{appLock:_0x5de9f8}=ensureSqlLockScope(_0x5c373b??createEmptySqlLock(),_0x508004['appCode'],_0x508004['sqlRoot'],_0x1b3b46(0x11f)),_0x38a133=await scanLocalSqlQueries(_0x508004),_0x408648=[],_0x3b7dcc=[],_0x5ec4e4=[],_0xfa08c6=[],_0x5988ff=new Set(_0x38a133[_0x1b3b46(0x121)](_0x502efa=>_0x502efa['lockKey']));for(const _0x44e76c of _0x38a133){const _0x519d31=await computeSqlFileHash(_0x44e76c['filePath']),_0x426fce=_0x5de9f8[_0x1b3b46(0x128)][_0x44e76c['lockKey']],_0x539d40=!!_0x426fce&&_0x426fce[_0x1b3b46(0x11e)]!==_0x44e76c[_0x1b3b46(0x11d)],_0x4833ce=!!_0x426fce&&!!_0x44e76c['sqlName']&&_0x426fce[_0x1b3b46(0x12e)]!==_0x44e76c[_0x1b3b46(0x12e)];if(!_0x426fce)_0x408648[_0x1b3b46(0x131)](_0x44e76c[_0x1b3b46(0x111)]);else _0x426fce['hash']!==_0x519d31||_0x539d40||_0x4833ce?_0x3b7dcc[_0x1b3b46(0x131)](_0x44e76c['lockKey']):_0x5ec4e4[_0x1b3b46(0x131)](_0x44e76c[_0x1b3b46(0x111)]);}for(const _0x19018b of Object[_0x1b3b46(0x10e)](_0x5de9f8[_0x1b3b46(0x128)])){!_0x5988ff[_0x1b3b46(0x12c)](_0x19018b)&&_0xfa08c6[_0x1b3b46(0x131)](_0x19018b);}const _0x209492=[];if(_0x36090b[_0x1b3b46(0x12b)](_0x1b3b46(0x125))){const _0x229794=await fetchAllSqlCodes(_0x36090b['appCode']);for(const _0x179c78 of _0x229794){!_0x5988ff['has'](_0x179c78)&&!_0x5de9f8['sqls'][_0x179c78]&&_0x209492[_0x1b3b46(0x131)](_0x179c78);}}const _0x491a23=_0x408648[_0x1b3b46(0x112)]===0x0&&_0x3b7dcc[_0x1b3b46(0x112)]===0x0&&_0xfa08c6['length']===0x0&&_0x209492[_0x1b3b46(0x112)]===0x0;return{'ok':!![],'data':{'added':_0x408648,'modified':_0x3b7dcc,'missing':_0xfa08c6,'unchanged':_0x5ec4e4,'remoteOnly':_0x209492},'message':_0x491a23?_0x1b3b46(0x12f):_0x408648[_0x1b3b46(0x112)]+'\x20added,\x20'+_0x3b7dcc[_0x1b3b46(0x112)]+_0x1b3b46(0x135)+_0xfa08c6[_0x1b3b46(0x112)]+_0x1b3b46(0x113)+_0x5ec4e4[_0x1b3b46(0x112)]+_0x1b3b46(0x134)+(_0x209492['length']>0x0?',\x20'+_0x209492[_0x1b3b46(0x112)]+_0x1b3b46(0x130):'')};}};
1
+ function a195_0x3569(){const _0xfbf471=['status','bool','sqls','filePath','sqlRoot','33334RznsnU','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','push','387684xZWWGv','hash','lockFilePath','lockKey','981HiQSht','keys','paging','remote','\x20modified,\x20','1084988NoULwV','length','sqlCode','76552HuvCNk','sqlName','\x20remote-only','174xuRxIR','168446jfrknH','304308buPljO','has','relativePath','path','\x20missing,\x20','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','appCode','\x20added,\x20','2589890lYhjgh','map','All\x20SQL\x20queries\x20are\x20in\x20sync.','read','totalCount','boolean'];a195_0x3569=function(){return _0xfbf471;};return a195_0x3569();}const a195_0x5a864b=a195_0x1d4b;(function(_0x5397a1,_0x3f1a31){const _0x2902cd=a195_0x1d4b,_0x1373c9=_0x5397a1();while(!![]){try{const _0x551214=parseInt(_0x2902cd(0x1ed))/0x1+parseInt(_0x2902cd(0x20d))/0x2+-parseInt(_0x2902cd(0x1ee))/0x3+parseInt(_0x2902cd(0x204))/0x4+parseInt(_0x2902cd(0x1f6))/0x5+parseInt(_0x2902cd(0x1ec))/0x6*(parseInt(_0x2902cd(0x201))/0x7)+parseInt(_0x2902cd(0x1e9))/0x8*(-parseInt(_0x2902cd(0x208))/0x9);if(_0x551214===_0x3f1a31)break;else _0x1373c9['push'](_0x1373c9['shift']());}catch(_0x2bd108){_0x1373c9['push'](_0x1373c9['shift']());}}}(a195_0x3569,0x4dff8));import{listSqlQueries}from'../../core/api-client.js';function a195_0x1d4b(_0x291b7a,_0x4f42d8){_0x291b7a=_0x291b7a-0x1e9;const _0x35693d=a195_0x3569();let _0x1d4b71=_0x35693d[_0x291b7a];return _0x1d4b71;}import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x4859e5){const _0x114188=a195_0x1d4b,_0x4a31df=[];let _0x701a3b=0x1;while(!![]){const _0x55bd36=await listSqlQueries(_0x4859e5,{'currentPage':_0x701a3b,'pageSize':PAGE_SIZE}),_0x2d4b5b=_0x55bd36['tableData']??[];_0x4a31df[_0x114188(0x203)](..._0x2d4b5b[_0x114188(0x1f7)](_0x3bf154=>_0x3bf154[_0x114188(0x20f)]));if(_0x2d4b5b['length']===0x0)break;const _0x4a4acc=_0x55bd36[_0x114188(0x20a)]?.[_0x114188(0x1fa)];if(_0x4a4acc!=null?_0x4a31df[_0x114188(0x20e)]>=_0x4a4acc:_0x2d4b5b[_0x114188(0x20e)]<PAGE_SIZE)break;_0x701a3b++;}return _0x4a31df;}export const sqlStatus={'service':'sql','command':'status','description':a195_0x5a864b(0x1f3),'risk':a195_0x5a864b(0x1f9),'flags':[{'name':a195_0x5a864b(0x20b),'type':a195_0x5a864b(0x1fb),'description':a195_0x5a864b(0x202)}],async 'execute'(_0x5d8de1){const _0x2c43e4=a195_0x5a864b,_0x34a925=loadSqlProjectConfig(_0x5d8de1[_0x2c43e4(0x1f4)]),_0x4495df=await readSqlLockFile(_0x34a925[_0x2c43e4(0x206)]),{appLock:_0x345d9d}=ensureSqlLockScope(_0x4495df??createEmptySqlLock(),_0x34a925[_0x2c43e4(0x1f4)],_0x34a925[_0x2c43e4(0x200)],_0x2c43e4(0x1fc)),_0x19c28b=await scanLocalSqlQueries(_0x34a925),_0x69d7f3=[],_0x3e9b31=[],_0x1ea744=[],_0x4d7a29=[],_0x405000=new Set(_0x19c28b[_0x2c43e4(0x1f7)](_0x2e8435=>_0x2e8435['lockKey']));for(const _0x49e850 of _0x19c28b){const _0x4a9eb8=await computeSqlFileHash(_0x49e850[_0x2c43e4(0x1ff)]),_0x5196d2=_0x345d9d['sqls'][_0x49e850[_0x2c43e4(0x207)]],_0x3e90c4=!!_0x5196d2&&_0x5196d2[_0x2c43e4(0x1f1)]!==_0x49e850[_0x2c43e4(0x1f0)],_0x3e3693=!!_0x5196d2&&!!_0x49e850[_0x2c43e4(0x1ea)]&&_0x5196d2[_0x2c43e4(0x1ea)]!==_0x49e850[_0x2c43e4(0x1ea)];if(!_0x5196d2)_0x69d7f3[_0x2c43e4(0x203)](_0x49e850[_0x2c43e4(0x207)]);else _0x5196d2[_0x2c43e4(0x205)]!==_0x4a9eb8||_0x3e90c4||_0x3e3693?_0x3e9b31[_0x2c43e4(0x203)](_0x49e850[_0x2c43e4(0x207)]):_0x1ea744['push'](_0x49e850[_0x2c43e4(0x207)]);}for(const _0x4288c7 of Object[_0x2c43e4(0x209)](_0x345d9d[_0x2c43e4(0x1fe)])){!_0x405000[_0x2c43e4(0x1ef)](_0x4288c7)&&_0x4d7a29[_0x2c43e4(0x203)](_0x4288c7);}const _0x1637ee=[];if(_0x5d8de1[_0x2c43e4(0x1fd)](_0x2c43e4(0x20b))){const _0x15bfd6=await fetchAllSqlCodes(_0x5d8de1[_0x2c43e4(0x1f4)]);for(const _0xb5ec37 of _0x15bfd6){!_0x405000[_0x2c43e4(0x1ef)](_0xb5ec37)&&!_0x345d9d[_0x2c43e4(0x1fe)][_0xb5ec37]&&_0x1637ee[_0x2c43e4(0x203)](_0xb5ec37);}}const _0x524c55=_0x69d7f3[_0x2c43e4(0x20e)]===0x0&&_0x3e9b31[_0x2c43e4(0x20e)]===0x0&&_0x4d7a29[_0x2c43e4(0x20e)]===0x0&&_0x1637ee[_0x2c43e4(0x20e)]===0x0;return{'ok':!![],'data':{'added':_0x69d7f3,'modified':_0x3e9b31,'missing':_0x4d7a29,'unchanged':_0x1ea744,'remoteOnly':_0x1637ee},'message':_0x524c55?_0x2c43e4(0x1f8):_0x69d7f3['length']+_0x2c43e4(0x1f5)+_0x3e9b31[_0x2c43e4(0x20e)]+_0x2c43e4(0x20c)+_0x4d7a29[_0x2c43e4(0x20e)]+_0x2c43e4(0x1f2)+_0x1ea744['length']+'\x20unchanged'+(_0x1637ee['length']>0x0?',\x20'+_0x1637ee['length']+_0x2c43e4(0x1eb):'')};}};
@@ -1 +1 @@
1
- const a195_0x3fbe76=a195_0x1862;(function(_0x10fe5b,_0x58d92d){const _0x437c2=a195_0x1862,_0x507d2d=_0x10fe5b();while(!![]){try{const _0x16e1b8=parseInt(_0x437c2(0xe8))/0x1*(-parseInt(_0x437c2(0xf3))/0x2)+-parseInt(_0x437c2(0xdf))/0x3+-parseInt(_0x437c2(0xb9))/0x4+parseInt(_0x437c2(0xb6))/0x5+parseInt(_0x437c2(0xe7))/0x6*(parseInt(_0x437c2(0xb7))/0x7)+-parseInt(_0x437c2(0xc9))/0x8*(parseInt(_0x437c2(0xb4))/0x9)+parseInt(_0x437c2(0xde))/0xa;if(_0x16e1b8===_0x58d92d)break;else _0x507d2d['push'](_0x507d2d['shift']());}catch(_0x49102b){_0x507d2d['push'](_0x507d2d['shift']());}}}(a195_0x48e8,0x61e06));function a195_0x1862(_0x43a969,_0x2c29f2){_0x43a969=_0x43a969-0xaf;const _0x48e877=a195_0x48e8();let _0x186209=_0x48e877[_0x43a969];return _0x186209;}import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';function a195_0x48e8(){const _0x5af827=['boolean','valid','cwd','read','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','\x22\x20not\x20found\x20in\x20any\x20dataset','SQL\x20schema\x20validation','tableName','sql','split','str','toLowerCase','trim','isArray','appCode','File\x20not\x20found:\x20','15642180IeWbar','873981ikCGYA','columns','index_type','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','columnNames','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','index_columns','Dataset\x20\x22','23454AySFKr','157639htEKNo','get','\x22\x20not\x20found\x20or\x20not\x20accessible','Audit\x20top-level\x20JOIN\x20equality\x20predicates\x20against\x20dataset\x20index\x20metadata','indexes','joinAudit','find','isDangerous','size','file','name','4aZLynb','filter','message','bool','dataset','indexName','fields','--check-indexes\x20requires\x20--schemas.','Table\x20\x22','145953WatTUl','length','2428245VnJRmY','231XtohcH','check-indexes','2025840qUxvPH','flagMissing','index_name','map','pkField','utf-8','dbtableConfig','tables','string','push','validation','schemaWarnings','parameters','validate','primary','type','328zRJwnm','schemas','sqlType','unshift','schema:'];a195_0x48e8=function(){return _0x5af827;};return a195_0x48e8();}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':a195_0x3fbe76(0xd6),'command':a195_0x3fbe76(0xc6),'description':a195_0x3fbe76(0xd2),'risk':a195_0x3fbe76(0xd1),'flags':[{'name':'file','type':a195_0x3fbe76(0xc1),'description':a195_0x3fbe76(0xe4)},{'name':a195_0x3fbe76(0xd6),'type':a195_0x3fbe76(0xc1),'description':'Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)'},{'name':a195_0x3fbe76(0xca),'type':a195_0x3fbe76(0xc1),'description':a195_0x3fbe76(0xe2)},{'name':a195_0x3fbe76(0xb8),'type':a195_0x3fbe76(0xce),'description':a195_0x3fbe76(0xeb)}],async 'execute'(_0x2de055){const _0x236a06=a195_0x3fbe76,_0x3c7f2b=_0x2de055[_0x236a06(0xd8)](_0x236a06(0xf1)),_0xf7c153=_0x2de055[_0x236a06(0xd8)](_0x236a06(0xd6)),_0x288064=_0x2de055['str'](_0x236a06(0xca)),_0x3c76a1=_0x2de055[_0x236a06(0xf6)](_0x236a06(0xb8));if(!_0x3c7f2b&&!_0xf7c153)throw CliErrors[_0x236a06(0xba)](_0x236a06(0xf1),'Provide\x20--file\x20or\x20--sql');if(_0x3c76a1&&!_0x288064)throw CliErrors[_0x236a06(0xc3)](_0x236a06(0xb2));let _0x13dbb9;if(_0x3c7f2b){const _0x2bb78e=resolve(process[_0x236a06(0xd0)](),_0x3c7f2b);if(!existsSync(_0x2bb78e))throw CliErrors[_0x236a06(0xc3)](_0x236a06(0xdd)+_0x2bb78e);_0x13dbb9=readFileSync(_0x2bb78e,_0x236a06(0xbe));}else _0x13dbb9=_0xf7c153;const _0x3b33f0=validateSql(_0x13dbb9),_0x2ed9cc={'valid':_0x3b33f0[_0x236a06(0xcf)],'sqlType':_0x3b33f0['sqlType']['type'],'isSelectOnly':_0x3b33f0[_0x236a06(0xcb)]['isSelectOnly'],'isDangerous':_0x3b33f0[_0x236a06(0xcb)][_0x236a06(0xef)],'tables':_0x3b33f0[_0x236a06(0xc0)],'parameters':_0x3b33f0[_0x236a06(0xc5)],'message':_0x3b33f0[_0x236a06(0xf5)]};_0x3b33f0['sqlType']['reason']&&(_0x2ed9cc['reason']=_0x3b33f0[_0x236a06(0xcb)]['reason']);if(_0x288064&&_0x3b33f0[_0x236a06(0xcf)]){const _0xa6faa5=_0x288064[_0x236a06(0xd7)](',')[_0x236a06(0xbc)](_0x17792a=>_0x17792a[_0x236a06(0xda)]())[_0x236a06(0xf4)](Boolean),_0xf738c=[],_0x1323cd=[],_0xe4db6c=filterDbTableBackedDatasets(await listDatasets(_0x2de055[_0x236a06(0xdc)])),_0x2c8e83=new Map(_0xe4db6c[_0x236a06(0xbc)](_0x39275d=>[_0x39275d['dbtableConfig']?.[_0x236a06(0xd5)]?.[_0x236a06(0xd9)](),_0x39275d]));for(const _0x19ea0c of _0x3b33f0[_0x236a06(0xc0)]){const _0x3f1a69=_0x2c8e83[_0x236a06(0xe9)](_0x19ea0c[_0x236a06(0xd9)]());!_0x3f1a69&&_0xf738c[_0x236a06(0xc2)](_0x236a06(0xb3)+_0x19ea0c+_0x236a06(0xd3));}for(const _0x4a63e9 of _0xa6faa5){let _0x4d3cd7;try{_0x4d3cd7=await getDatasetDetail(_0x4a63e9);}catch{_0xf738c[_0x236a06(0xc2)](_0x236a06(0xe6)+_0x4a63e9+_0x236a06(0xea));continue;}assertDatasetIsDbTableBacked(_0x4d3cd7,_0x236a06(0xd4));const _0x492978=Array[_0x236a06(0xdb)](_0x4d3cd7['fields'])?_0x4d3cd7[_0x236a06(0xb1)]:[],_0x506b05=new Set(_0x492978[_0x236a06(0xbc)](_0x27b3cc=>_0x27b3cc[_0x236a06(0xf2)]?.[_0x236a06(0xd9)]())),_0x3a8ace=_0x4d3cd7[_0x236a06(0xbf)]?.[_0x236a06(0xd5)]||_0x4d3cd7[_0x236a06(0xd5)]||_0x4a63e9;_0x2ed9cc[_0x236a06(0xcd)+_0x3a8ace]={'code':_0x4a63e9,'tableName':_0x3a8ace,'fieldCount':_0x506b05[_0x236a06(0xf0)],'fields':Array['from'](_0x506b05)};if(_0x3c76a1){const _0x2ad63c=normalizeDatasetIndexes(_0x4d3cd7);_0x1323cd[_0x236a06(0xc2)]({'tableName':_0x3a8ace,..._0x2ad63c});}}_0xf738c[_0x236a06(0xb5)]>0x0&&(_0x2ed9cc[_0x236a06(0xc4)]=_0xf738c),_0x3c76a1&&(_0x2ed9cc[_0x236a06(0xed)]=auditSqlJoinIndexes(_0x13dbb9,_0x1323cd));}return{'ok':_0x3b33f0[_0x236a06(0xcf)],'data':_0x2ed9cc,'message':_0x3b33f0[_0x236a06(0xf5)]};}};function normalizeDatasetIndexes(_0x4b6a08){const _0x4f15e3=a195_0x3fbe76,_0x1178d0=Array[_0x4f15e3(0xdb)](_0x4b6a08?.[_0x4f15e3(0xaf)]?.[_0x4f15e3(0xec)])?_0x4b6a08[_0x4f15e3(0xaf)][_0x4f15e3(0xec)]:Array['isArray'](_0x4b6a08?.['indexes'])?_0x4b6a08[_0x4f15e3(0xec)]:[],_0x2da224=_0x1178d0['flatMap'](_0x42f5be=>{const _0x4f28f4=_0x4f15e3,_0x2f6392=Array[_0x4f28f4(0xdb)](_0x42f5be?.[_0x4f28f4(0xe5)])?_0x42f5be[_0x4f28f4(0xe5)]:Array[_0x4f28f4(0xdb)](_0x42f5be?.[_0x4f28f4(0xe3)])?_0x42f5be[_0x4f28f4(0xe3)]:Array['isArray'](_0x42f5be?.[_0x4f28f4(0xe0)])?_0x42f5be[_0x4f28f4(0xe0)]:[],_0x338f53=_0x2f6392[_0x4f28f4(0xf4)](_0x3bbbfa=>typeof _0x3bbbfa===_0x4f28f4(0xc1))[_0x4f28f4(0xbc)](_0x1849a6=>_0x1849a6[_0x4f28f4(0xda)]())['filter'](Boolean);if(_0x338f53[_0x4f28f4(0xb5)]===0x0)return[];const _0xb6716=[_0x42f5be?.[_0x4f28f4(0xb0)],_0x42f5be?.[_0x4f28f4(0xbb)],_0x42f5be?.[_0x4f28f4(0xf2)]][_0x4f28f4(0xee)](_0xb36c04=>typeof _0xb36c04===_0x4f28f4(0xc1)&&_0xb36c04['trim']()),_0x178052=[_0x42f5be?.[_0x4f28f4(0xe1)],_0x42f5be?.[_0x4f28f4(0xc8)]]['find'](_0x2a4fa2=>typeof _0x2a4fa2===_0x4f28f4(0xc1)&&_0x2a4fa2[_0x4f28f4(0xda)]());return[{..._0xb6716?{'name':_0xb6716[_0x4f28f4(0xda)]()}:{},..._0x178052?{'type':_0x178052[_0x4f28f4(0xda)]()}:{},'columns':_0x338f53}];}),_0x4ea844=[..._0x2da224],_0x2a4548=typeof _0x4b6a08?.[_0x4f15e3(0xbf)]?.[_0x4f15e3(0xbd)]===_0x4f15e3(0xc1)?_0x4b6a08[_0x4f15e3(0xbf)][_0x4f15e3(0xbd)][_0x4f15e3(0xd7)](',')['map'](_0x4b3b81=>_0x4b3b81[_0x4f15e3(0xda)]())[_0x4f15e3(0xf4)](Boolean):[];return _0x2a4548[_0x4f15e3(0xb5)]>0x0&&_0x4ea844[_0x4f15e3(0xcc)]({'type':_0x4f15e3(0xc7),'columns':_0x2a4548}),{'indexes':_0x4ea844,'metadataAvailable':_0x2da224['length']>0x0};}
1
+ function a196_0x5d4a(){const _0x592bf1=['push','Provide\x20--file\x20or\x20--sql','reason','read','381DVsYoe','dataset','File\x20not\x20found:\x20','6ujIjLS','unshift','validate','schemas','pkField','indexName','SQL\x20schema\x20validation','flagMissing','schema:','16004PfSFBe','appCode','check-indexes','validation','bool','utf-8','type','isDangerous','split','from','columnNames','indexes','1688700MGQlQD','size','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','isSelectOnly','length','joinAudit','tables','Table\x20\x22','isArray','index_columns','get','filter','name','trim','\x22\x20not\x20found\x20or\x20not\x20accessible','primary','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','columns','1635256kXzXLx','string','411530AHHDfj','sql','find','20168cXRMqN','tableName','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','dbtableConfig','sqlType','parameters','str','valid','1075KwXZQG','1251mRuklm','schemaWarnings','index_name','696dEEibn','cwd','1831705IzvMTJ','index_type','message','99GtvObW','--check-indexes\x20requires\x20--schemas.','file','fields','toLowerCase','map','\x22\x20not\x20found\x20in\x20any\x20dataset'];a196_0x5d4a=function(){return _0x592bf1;};return a196_0x5d4a();}const a196_0x49b37f=a196_0x3cd7;(function(_0x44d0c3,_0x420a3a){const _0x3c7e69=a196_0x3cd7,_0x51704e=_0x44d0c3();while(!![]){try{const _0x2a2818=-parseInt(_0x3c7e69(0x1b4))/0x1*(-parseInt(_0x3c7e69(0x1b8))/0x2)+-parseInt(_0x3c7e69(0x1c8))/0x3*(parseInt(_0x3c7e69(0x1d4))/0x4)+parseInt(_0x3c7e69(0x1ba))/0x5*(parseInt(_0x3c7e69(0x1cb))/0x6)+parseInt(_0x3c7e69(0x1a7))/0x7+parseInt(_0x3c7e69(0x1ac))/0x8*(-parseInt(_0x3c7e69(0x1b5))/0x9)+parseInt(_0x3c7e69(0x1a9))/0xa*(parseInt(_0x3c7e69(0x1bd))/0xb)+-parseInt(_0x3c7e69(0x1e0))/0xc;if(_0x2a2818===_0x420a3a)break;else _0x51704e['push'](_0x51704e['shift']());}catch(_0x1dcb13){_0x51704e['push'](_0x51704e['shift']());}}}(a196_0x5d4a,0x54443));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';function a196_0x3cd7(_0x1aee4f,_0x583ea7){_0x1aee4f=_0x1aee4f-0x19a;const _0x5d4a30=a196_0x5d4a();let _0x3cd749=_0x5d4a30[_0x1aee4f];return _0x3cd749;}import{CliErrors}from'../../errors.js';import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';export const sqlValidate={'service':a196_0x49b37f(0x1aa),'command':a196_0x49b37f(0x1cd),'description':a196_0x49b37f(0x1a5),'risk':a196_0x49b37f(0x1c7),'flags':[{'name':a196_0x49b37f(0x1bf),'type':a196_0x49b37f(0x1a8),'description':a196_0x49b37f(0x1e2)},{'name':a196_0x49b37f(0x1aa),'type':a196_0x49b37f(0x1a8),'description':'Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)'},{'name':a196_0x49b37f(0x1ce),'type':a196_0x49b37f(0x1a8),'description':a196_0x49b37f(0x1ae)},{'name':'check-indexes','type':'boolean','description':'Audit\x20top-level\x20JOIN\x20equality\x20predicates\x20against\x20dataset\x20index\x20metadata'}],async 'execute'(_0x1e0259){const _0x4a71d5=a196_0x49b37f,_0x8ebc8d=_0x1e0259[_0x4a71d5(0x1b2)]('file'),_0x23bca7=_0x1e0259[_0x4a71d5(0x1b2)]('sql'),_0x4510a9=_0x1e0259[_0x4a71d5(0x1b2)](_0x4a71d5(0x1ce)),_0x1db20d=_0x1e0259[_0x4a71d5(0x1d8)](_0x4a71d5(0x1d6));if(!_0x8ebc8d&&!_0x23bca7)throw CliErrors[_0x4a71d5(0x1d2)](_0x4a71d5(0x1bf),_0x4a71d5(0x1c5));if(_0x1db20d&&!_0x4510a9)throw CliErrors[_0x4a71d5(0x1d7)](_0x4a71d5(0x1be));let _0x508787;if(_0x8ebc8d){const _0x59b843=resolve(process[_0x4a71d5(0x1b9)](),_0x8ebc8d);if(!existsSync(_0x59b843))throw CliErrors['validation'](_0x4a71d5(0x1ca)+_0x59b843);_0x508787=readFileSync(_0x59b843,_0x4a71d5(0x1d9));}else _0x508787=_0x23bca7;const _0x40f720=validateSql(_0x508787),_0x221929={'valid':_0x40f720[_0x4a71d5(0x1b3)],'sqlType':_0x40f720[_0x4a71d5(0x1b0)][_0x4a71d5(0x1da)],'isSelectOnly':_0x40f720[_0x4a71d5(0x1b0)][_0x4a71d5(0x1e3)],'isDangerous':_0x40f720[_0x4a71d5(0x1b0)][_0x4a71d5(0x1db)],'tables':_0x40f720[_0x4a71d5(0x19b)],'parameters':_0x40f720[_0x4a71d5(0x1b1)],'message':_0x40f720[_0x4a71d5(0x1bc)]};_0x40f720[_0x4a71d5(0x1b0)][_0x4a71d5(0x1c6)]&&(_0x221929[_0x4a71d5(0x1c6)]=_0x40f720['sqlType'][_0x4a71d5(0x1c6)]);if(_0x4510a9&&_0x40f720['valid']){const _0x4b4c1b=_0x4510a9[_0x4a71d5(0x1dc)](',')['map'](_0x5b7583=>_0x5b7583[_0x4a71d5(0x1a2)]())['filter'](Boolean),_0x2cd82c=[],_0x370a6e=[],_0x388298=filterDbTableBackedDatasets(await listDatasets(_0x1e0259[_0x4a71d5(0x1d5)])),_0xebcb53=new Map(_0x388298[_0x4a71d5(0x1c2)](_0x2cb959=>[_0x2cb959['dbtableConfig']?.[_0x4a71d5(0x1ad)]?.[_0x4a71d5(0x1c1)](),_0x2cb959]));for(const _0x5a4ebb of _0x40f720[_0x4a71d5(0x19b)]){const _0x600fb8=_0xebcb53[_0x4a71d5(0x19f)](_0x5a4ebb[_0x4a71d5(0x1c1)]());!_0x600fb8&&_0x2cd82c['push'](_0x4a71d5(0x19c)+_0x5a4ebb+_0x4a71d5(0x1c3));}for(const _0x310538 of _0x4b4c1b){let _0x33bc95;try{_0x33bc95=await getDatasetDetail(_0x310538);}catch{_0x2cd82c[_0x4a71d5(0x1c4)]('Dataset\x20\x22'+_0x310538+_0x4a71d5(0x1a3));continue;}assertDatasetIsDbTableBacked(_0x33bc95,_0x4a71d5(0x1d1));const _0x3eda5f=Array[_0x4a71d5(0x19d)](_0x33bc95[_0x4a71d5(0x1c0)])?_0x33bc95[_0x4a71d5(0x1c0)]:[],_0x1b946c=new Set(_0x3eda5f[_0x4a71d5(0x1c2)](_0x1f243b=>_0x1f243b[_0x4a71d5(0x1a1)]?.[_0x4a71d5(0x1c1)]())),_0x15586e=_0x33bc95[_0x4a71d5(0x1af)]?.[_0x4a71d5(0x1ad)]||_0x33bc95[_0x4a71d5(0x1ad)]||_0x310538;_0x221929[_0x4a71d5(0x1d3)+_0x15586e]={'code':_0x310538,'tableName':_0x15586e,'fieldCount':_0x1b946c[_0x4a71d5(0x1e1)],'fields':Array[_0x4a71d5(0x1dd)](_0x1b946c)};if(_0x1db20d){const _0x40b8fe=normalizeDatasetIndexes(_0x33bc95);_0x370a6e[_0x4a71d5(0x1c4)]({'tableName':_0x15586e,..._0x40b8fe});}}_0x2cd82c[_0x4a71d5(0x1e4)]>0x0&&(_0x221929[_0x4a71d5(0x1b6)]=_0x2cd82c),_0x1db20d&&(_0x221929[_0x4a71d5(0x19a)]=auditSqlJoinIndexes(_0x508787,_0x370a6e));}return{'ok':_0x40f720[_0x4a71d5(0x1b3)],'data':_0x221929,'message':_0x40f720[_0x4a71d5(0x1bc)]};}};function normalizeDatasetIndexes(_0x1fed22){const _0x2bc9b8=a196_0x49b37f,_0x1bbfdf=Array[_0x2bc9b8(0x19d)](_0x1fed22?.[_0x2bc9b8(0x1c9)]?.['indexes'])?_0x1fed22['dataset'][_0x2bc9b8(0x1df)]:Array[_0x2bc9b8(0x19d)](_0x1fed22?.[_0x2bc9b8(0x1df)])?_0x1fed22[_0x2bc9b8(0x1df)]:[],_0x26c6f0=_0x1bbfdf['flatMap'](_0x40e1e6=>{const _0x183eab=_0x2bc9b8,_0x2b0c51=Array[_0x183eab(0x19d)](_0x40e1e6?.['index_columns'])?_0x40e1e6[_0x183eab(0x19e)]:Array['isArray'](_0x40e1e6?.['columnNames'])?_0x40e1e6[_0x183eab(0x1de)]:Array[_0x183eab(0x19d)](_0x40e1e6?.[_0x183eab(0x1a6)])?_0x40e1e6[_0x183eab(0x1a6)]:[],_0x25b0aa=_0x2b0c51['filter'](_0x13a40d=>typeof _0x13a40d===_0x183eab(0x1a8))[_0x183eab(0x1c2)](_0x9f8aae=>_0x9f8aae[_0x183eab(0x1a2)]())[_0x183eab(0x1a0)](Boolean);if(_0x25b0aa[_0x183eab(0x1e4)]===0x0)return[];const _0x60c880=[_0x40e1e6?.[_0x183eab(0x1d0)],_0x40e1e6?.[_0x183eab(0x1b7)],_0x40e1e6?.[_0x183eab(0x1a1)]][_0x183eab(0x1ab)](_0x4779d7=>typeof _0x4779d7==='string'&&_0x4779d7[_0x183eab(0x1a2)]()),_0x8a63cb=[_0x40e1e6?.[_0x183eab(0x1bb)],_0x40e1e6?.[_0x183eab(0x1da)]][_0x183eab(0x1ab)](_0x42fecb=>typeof _0x42fecb===_0x183eab(0x1a8)&&_0x42fecb[_0x183eab(0x1a2)]());return[{..._0x60c880?{'name':_0x60c880[_0x183eab(0x1a2)]()}:{},..._0x8a63cb?{'type':_0x8a63cb[_0x183eab(0x1a2)]()}:{},'columns':_0x25b0aa}];}),_0x48fa42=[..._0x26c6f0],_0x2f0d16=typeof _0x1fed22?.[_0x2bc9b8(0x1af)]?.[_0x2bc9b8(0x1cf)]===_0x2bc9b8(0x1a8)?_0x1fed22[_0x2bc9b8(0x1af)][_0x2bc9b8(0x1cf)][_0x2bc9b8(0x1dc)](',')['map'](_0x471ee8=>_0x471ee8['trim']())[_0x2bc9b8(0x1a0)](Boolean):[];return _0x2f0d16[_0x2bc9b8(0x1e4)]>0x0&&_0x48fa42[_0x2bc9b8(0x1cc)]({'type':_0x2bc9b8(0x1a4),'columns':_0x2f0d16}),{'indexes':_0x48fa42,'metadataAvailable':_0x26c6f0[_0x2bc9b8(0x1e4)]>0x0};}
@@ -1 +1 @@
1
- (function(_0xe06eec,_0x397835){const _0x38434c=a196_0x5e3e,_0x12895f=_0xe06eec();while(!![]){try{const _0xfb3777=parseInt(_0x38434c(0x165))/0x1+-parseInt(_0x38434c(0x169))/0x2+parseInt(_0x38434c(0x16a))/0x3+parseInt(_0x38434c(0x168))/0x4+-parseInt(_0x38434c(0x166))/0x5+parseInt(_0x38434c(0x16b))/0x6+-parseInt(_0x38434c(0x167))/0x7;if(_0xfb3777===_0x397835)break;else _0x12895f['push'](_0x12895f['shift']());}catch(_0x585482){_0x12895f['push'](_0x12895f['shift']());}}}(a196_0x14be,0xd3a36));import{taskStatus}from'../../commands/task/status.js';function a196_0x5e3e(_0x2868c5,_0x5995a0){_0x2868c5=_0x2868c5-0x165;const _0x14be59=a196_0x14be();let _0x5e3e2e=_0x14be59[_0x2868c5];return _0x5e3e2e;}function a196_0x14be(){const _0x3b8ad4=['6191125pWzthe','1608208ApahVI','2781476wcbjqK','2260536XQWBpR','3866499KsYiuP','2406972rbFmzz','1079743mhUTOD'];a196_0x14be=function(){return _0x3b8ad4;};return a196_0x14be();}export const taskDefinitions=[taskStatus];
1
+ function a197_0x3caa(_0x244b56,_0x4d6f5e){_0x244b56=_0x244b56-0x8e;const _0x1c64be=a197_0x1c64();let _0x3caa81=_0x1c64be[_0x244b56];return _0x3caa81;}(function(_0x595879,_0x23da6b){const _0x43e11c=a197_0x3caa,_0x29793c=_0x595879();while(!![]){try{const _0x5931cc=parseInt(_0x43e11c(0x95))/0x1+-parseInt(_0x43e11c(0x92))/0x2+-parseInt(_0x43e11c(0x8f))/0x3+-parseInt(_0x43e11c(0x90))/0x4+-parseInt(_0x43e11c(0x93))/0x5+parseInt(_0x43e11c(0x8e))/0x6+-parseInt(_0x43e11c(0x94))/0x7*(-parseInt(_0x43e11c(0x91))/0x8);if(_0x5931cc===_0x23da6b)break;else _0x29793c['push'](_0x29793c['shift']());}catch(_0x243e7d){_0x29793c['push'](_0x29793c['shift']());}}}(a197_0x1c64,0x60b01));import{taskStatus}from'../../commands/task/status.js';function a197_0x1c64(){const _0x14e6ce=['1625605hiRZqM','8287937PaQsSD','13513gsKEfp','4405878smLOfa','417966WgDxcd','1207284PlgguU','8ECnJiF','1539040ycghqK'];a197_0x1c64=function(){return _0x14e6ce;};return a197_0x1c64();}export const taskDefinitions=[taskStatus];
@@ -1 +1 @@
1
- const a197_0x5a5c26=a197_0x59c2;(function(_0x102364,_0x1584cd){const _0x3b486c=a197_0x59c2,_0x503fa6=_0x102364();while(!![]){try{const _0x1c4dd8=-parseInt(_0x3b486c(0x90))/0x1+-parseInt(_0x3b486c(0xa4))/0x2+-parseInt(_0x3b486c(0x9e))/0x3+-parseInt(_0x3b486c(0x92))/0x4+parseInt(_0x3b486c(0xa6))/0x5+-parseInt(_0x3b486c(0x91))/0x6+parseInt(_0x3b486c(0x96))/0x7*(parseInt(_0x3b486c(0x8f))/0x8);if(_0x1c4dd8===_0x1584cd)break;else _0x503fa6['push'](_0x503fa6['shift']());}catch(_0x19e71b){_0x503fa6['push'](_0x503fa6['shift']());}}}(a197_0x2774,0xb413c));function a197_0x2774(){const _0x481934=['apiError','Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20','5316899aQsrYy','string','taskId','task','Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','compress','appCode','isTerminal','2982516CbLyJa','Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command','status','read','task-id','flagMissing','1978088zEgbMP','trim','3130710JshTvY','cookie','str','56hiaDnl','933451GldKSe','7654440BKhzHN','4052152pyjEDb',',\x20received\x20'];a197_0x2774=function(){return _0x481934;};return a197_0x2774();}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';function a197_0x59c2(_0x1f8aa2,_0x58d665){_0x1f8aa2=_0x1f8aa2-0x8f;const _0x277435=a197_0x2774();let _0x59c209=_0x277435[_0x1f8aa2];return _0x59c209;}import{CliErrors}from'../../errors.js';export const taskStatus={'service':a197_0x5a5c26(0x99),'command':a197_0x5a5c26(0xa0),'description':a197_0x5a5c26(0x9a),'risk':a197_0x5a5c26(0xa1),'defaultOutputFormat':a197_0x5a5c26(0x9b),'structuredErrors':!![],'flags':[{'name':a197_0x5a5c26(0xa2),'type':a197_0x5a5c26(0x97),'required':!![],'description':a197_0x5a5c26(0x9f)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x5aa618){const _0x2e4e32=a197_0x5a5c26;if(!_0x5aa618['str'](_0x2e4e32(0xa2))['trim']())throw CliErrors[_0x2e4e32(0xa3)]('task-id');},async 'execute'(_0x313240){const _0x50a188=a197_0x5a5c26,_0xeb8ea0=_0x313240[_0x50a188(0xa8)](_0x50a188(0xa2))[_0x50a188(0xa5)](),_0x531559=normalizeAsyncTask(await getAsyncTaskStatus(_0xeb8ea0,_0x313240['appCode'],_0x313240[_0x50a188(0xa7)]));if(_0x531559[_0x50a188(0x98)]!==_0xeb8ea0)throw CliErrors[_0x50a188(0x94)](_0x50a188(0x95)+_0xeb8ea0+_0x50a188(0x93)+_0x531559['taskId']+'.');const _0x2774c1=buildAsyncTaskStatusCommand(_0x531559[_0x50a188(0x98)],_0x313240[_0x50a188(0x9c)]);return{'ok':!![],'message':asyncTaskMessage(_0x531559),'data':{'appCode':_0x313240[_0x50a188(0x9c)],..._0x531559,'query':_0x531559[_0x50a188(0x9d)]?null:{'command':_0x2774c1}}};}};
1
+ const a198_0xeef410=a198_0x2892;(function(_0x1d730e,_0x563c62){const _0x23e1bb=a198_0x2892,_0xe60908=_0x1d730e();while(!![]){try{const _0x129a5d=-parseInt(_0x23e1bb(0xb5))/0x1+parseInt(_0x23e1bb(0xaf))/0x2*(parseInt(_0x23e1bb(0xa3))/0x3)+-parseInt(_0x23e1bb(0xa7))/0x4+-parseInt(_0x23e1bb(0x9f))/0x5*(-parseInt(_0x23e1bb(0xa2))/0x6)+-parseInt(_0x23e1bb(0xb3))/0x7*(-parseInt(_0x23e1bb(0xab))/0x8)+-parseInt(_0x23e1bb(0xb0))/0x9+parseInt(_0x23e1bb(0xad))/0xa*(parseInt(_0x23e1bb(0xaa))/0xb);if(_0x129a5d===_0x563c62)break;else _0xe60908['push'](_0xe60908['shift']());}catch(_0x1bbba2){_0xe60908['push'](_0xe60908['shift']());}}}(a198_0x25c6,0x1b613));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asyncTaskMessage,buildAsyncTaskStatusCommand,normalizeAsyncTask}from'../../commands/common/async-task.js';function a198_0x25c6(){const _0x1d61d8=['25392qqddHM','31062RTFUyr','task-id','Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','cookie','26576meDTpl','read','compress','77NeBWQi','82664IJGNbN','apiError','122930tWjwlC','trim','10PFqEyw','991125sxgmOh','Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20','appCode','28YpGJCz','string','30645teytCl','taskId','task','95oaBziE','str','status'];a198_0x25c6=function(){return _0x1d61d8;};return a198_0x25c6();}import{getAsyncTaskStatus}from'../../core/api-client.js';function a198_0x2892(_0x20cdc3,_0x2f6a4c){_0x20cdc3=_0x20cdc3-0x9d;const _0x25c6ed=a198_0x25c6();let _0x289260=_0x25c6ed[_0x20cdc3];return _0x289260;}import{CliErrors}from'../../errors.js';export const taskStatus={'service':a198_0xeef410(0x9e),'command':a198_0xeef410(0xa1),'description':a198_0xeef410(0xa5),'risk':a198_0xeef410(0xa8),'defaultOutputFormat':a198_0xeef410(0xa9),'structuredErrors':!![],'flags':[{'name':a198_0xeef410(0xa4),'type':a198_0xeef410(0xb4),'required':!![],'description':'Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x579a48){const _0x51519a=a198_0xeef410;if(!_0x579a48[_0x51519a(0xa0)](_0x51519a(0xa4))[_0x51519a(0xae)]())throw CliErrors['flagMissing'](_0x51519a(0xa4));},async 'execute'(_0x18b44c){const _0x4ed67c=a198_0xeef410,_0x1e7528=_0x18b44c['str']('task-id')['trim'](),_0x9ce7=normalizeAsyncTask(await getAsyncTaskStatus(_0x1e7528,_0x18b44c['appCode'],_0x18b44c[_0x4ed67c(0xa6)]));if(_0x9ce7[_0x4ed67c(0x9d)]!==_0x1e7528)throw CliErrors[_0x4ed67c(0xac)](_0x4ed67c(0xb1)+_0x1e7528+',\x20received\x20'+_0x9ce7[_0x4ed67c(0x9d)]+'.');const _0x34a5ca=buildAsyncTaskStatusCommand(_0x9ce7['taskId'],_0x18b44c[_0x4ed67c(0xb2)]);return{'ok':!![],'message':asyncTaskMessage(_0x9ce7),'data':{'appCode':_0x18b44c[_0x4ed67c(0xb2)],..._0x9ce7,'query':_0x9ce7['isTerminal']?null:{'command':_0x34a5ca}}};}};
@@ -1 +1 @@
1
- (function(_0x52515a,_0x35ab1f){const _0x587cfa=a198_0x592b,_0x4db737=_0x52515a();while(!![]){try{const _0x1ba921=parseInt(_0x587cfa(0x12a))/0x1+parseInt(_0x587cfa(0x12c))/0x2+parseInt(_0x587cfa(0x12b))/0x3*(parseInt(_0x587cfa(0x123))/0x4)+-parseInt(_0x587cfa(0x126))/0x5+parseInt(_0x587cfa(0x127))/0x6*(parseInt(_0x587cfa(0x125))/0x7)+-parseInt(_0x587cfa(0x129))/0x8+parseInt(_0x587cfa(0x124))/0x9*(-parseInt(_0x587cfa(0x128))/0xa);if(_0x1ba921===_0x35ab1f)break;else _0x4db737['push'](_0x4db737['shift']());}catch(_0x5ade45){_0x4db737['push'](_0x4db737['shift']());}}}(a198_0x574e,0x6faf6));import{tenantMembersListDefinition}from'../../commands/tenant/members-list.js';export const tenantDefinitions=[tenantMembersListDefinition];function a198_0x592b(_0x26b217,_0x1e75c4){_0x26b217=_0x26b217-0x123;const _0x574ec7=a198_0x574e();let _0x592bf0=_0x574ec7[_0x26b217];return _0x592bf0;}function a198_0x574e(){const _0x2fc383=['10oVrqqx','59976ovCYZU','55959HuSLbh','24954ELEMKP','1233568jXSceM','164FCaAEP','5146137kzSIGq','3717rlugvM','1087860GtTVsM','2718JIWOYY'];a198_0x574e=function(){return _0x2fc383;};return a198_0x574e();}
1
+ (function(_0x53a7ac,_0x50a0a0){const _0x2ed1d8=a199_0x218f,_0x55dd71=_0x53a7ac();while(!![]){try{const _0x2badaf=parseInt(_0x2ed1d8(0xec))/0x1*(parseInt(_0x2ed1d8(0xe8))/0x2)+parseInt(_0x2ed1d8(0xe6))/0x3+-parseInt(_0x2ed1d8(0xeb))/0x4+-parseInt(_0x2ed1d8(0xe9))/0x5+parseInt(_0x2ed1d8(0xe7))/0x6+-parseInt(_0x2ed1d8(0xea))/0x7+parseInt(_0x2ed1d8(0xe5))/0x8;if(_0x2badaf===_0x50a0a0)break;else _0x55dd71['push'](_0x55dd71['shift']());}catch(_0x2bffc5){_0x55dd71['push'](_0x55dd71['shift']());}}}(a199_0x5433,0xed46a));function a199_0x5433(){const _0x3b00d5=['439596KYpKNw','100815sqAstX','13107598ThTgjw','4847512qIKUxq','7BKssoI','7376528OOmgnr','537393OZMnNp','8619924VpmAHu'];a199_0x5433=function(){return _0x3b00d5;};return a199_0x5433();}function a199_0x218f(_0x5f1691,_0x57b06f){_0x5f1691=_0x5f1691-0xe5;const _0x54339d=a199_0x5433();let _0x218f61=_0x54339d[_0x5f1691];return _0x218f61;}import{tenantMembersListDefinition}from'../../commands/tenant/members-list.js';export const tenantDefinitions=[tenantMembersListDefinition];
@@ -1 +1 @@
1
- const a199_0x3199a3=a199_0x1693;function a199_0x1693(_0x3276ec,_0x3e53bc){_0x3276ec=_0x3276ec-0xec;const _0x326ea4=a199_0x326e();let _0x1693f5=_0x326ea4[_0x3276ec];return _0x1693f5;}(function(_0x3f46fe,_0x129e18){const _0x2c688e=a199_0x1693,_0x5764b0=_0x3f46fe();while(!![]){try{const _0x409930=-parseInt(_0x2c688e(0xf8))/0x1*(-parseInt(_0x2c688e(0xf3))/0x2)+-parseInt(_0x2c688e(0xfc))/0x3*(parseInt(_0x2c688e(0xec))/0x4)+parseInt(_0x2c688e(0xf7))/0x5+parseInt(_0x2c688e(0xff))/0x6*(-parseInt(_0x2c688e(0xfb))/0x7)+-parseInt(_0x2c688e(0xef))/0x8*(parseInt(_0x2c688e(0xf6))/0x9)+parseInt(_0x2c688e(0xed))/0xa*(parseInt(_0x2c688e(0xf2))/0xb)+parseInt(_0x2c688e(0xfd))/0xc;if(_0x409930===_0x129e18)break;else _0x5764b0['push'](_0x5764b0['shift']());}catch(_0x45ebb0){_0x5764b0['push'](_0x5764b0['shift']());}}}(a199_0x326e,0x603a4));function a199_0x326e(){const _0x461578=['1kPZGpy','Pass\x20--tenant-code\x20<code>.','\x20tenant\x20member(s)','119oTvSRH','39suvgKq','3929028uoJlez','trim','131994VGNBfH','str','191792VMtWYY','6376030dDVrlJ','members-list','16uFHYBc','length','tenant','11Lcotid','681282WPjjuQ','tenant-code','List\x20members\x20of\x20a\x20tenant\x20available\x20to\x20the\x20current\x20account','1636569QAsosw','2247370XILDnC'];a199_0x326e=function(){return _0x461578;};return a199_0x326e();}import{listCurrentUserTenantMemberships,listTenantDirectoryMembers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{assertTenantAccessible,projectTenantMembers}from'../../commands/tenant/shared.js';export const tenantMembersListDefinition={'service':a199_0x3199a3(0xf1),'command':a199_0x3199a3(0xee),'description':a199_0x3199a3(0xf5),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a199_0x3199a3(0xf4),'type':'string','required':!![],'description':'Exact\x20tenant\x20code'}],async 'validate'(_0x2b5911){const _0x477227=a199_0x3199a3;if(!_0x2b5911[_0x477227(0x100)]('tenant-code')[_0x477227(0xfe)]())throw CliErrors['flagMissing'](_0x477227(0xf4),_0x477227(0xf9));},async 'execute'(_0x16a34e){const _0x18fa8a=a199_0x3199a3,_0x56f522=_0x16a34e[_0x18fa8a(0x100)](_0x18fa8a(0xf4))['trim'](),_0x1fa51b=await listCurrentUserTenantMemberships();assertTenantAccessible(_0x56f522,_0x1fa51b);const _0x58ac8b=projectTenantMembers(await listTenantDirectoryMembers(_0x56f522));return{'ok':!![],'data':{'tenantCode':_0x56f522,'items':_0x58ac8b,'totalCount':_0x58ac8b[_0x18fa8a(0xf0)]},'message':'Found\x20'+_0x58ac8b[_0x18fa8a(0xf0)]+_0x18fa8a(0xfa)};}};
1
+ const a200_0x2a4097=a200_0x189d;(function(_0x49545f,_0x55dc26){const _0x139b45=a200_0x189d,_0x56dd08=_0x49545f();while(!![]){try{const _0x50a58a=parseInt(_0x139b45(0x13a))/0x1*(-parseInt(_0x139b45(0x142))/0x2)+-parseInt(_0x139b45(0x139))/0x3*(-parseInt(_0x139b45(0x13e))/0x4)+parseInt(_0x139b45(0x131))/0x5+parseInt(_0x139b45(0x135))/0x6*(-parseInt(_0x139b45(0x13c))/0x7)+parseInt(_0x139b45(0x141))/0x8+parseInt(_0x139b45(0x143))/0x9*(parseInt(_0x139b45(0x13d))/0xa)+-parseInt(_0x139b45(0x145))/0xb;if(_0x50a58a===_0x55dc26)break;else _0x56dd08['push'](_0x56dd08['shift']());}catch(_0x287030){_0x56dd08['push'](_0x56dd08['shift']());}}}(a200_0x283c,0xf2079));function a200_0x283c(){const _0x1f02ab=['Found\x20','35160hASkHu','List\x20members\x20of\x20a\x20tenant\x20available\x20to\x20the\x20current\x20account','str','tenant','56817ByNegp','660799eBvhqf','Exact\x20tenant\x20code','861sQfvgW','10RSkixz','164iQcNUe','string','trim','625960pmusML','2KAxPBW','5221773PjHIFD','length','6888816NGeYPf','members-list','7821235yXpNno','tenant-code','flagMissing'];a200_0x283c=function(){return _0x1f02ab;};return a200_0x283c();}import{listCurrentUserTenantMemberships,listTenantDirectoryMembers}from'../../core/api-client.js';function a200_0x189d(_0x325866,_0xebe29a){_0x325866=_0x325866-0x131;const _0x283cc5=a200_0x283c();let _0x189d17=_0x283cc5[_0x325866];return _0x189d17;}import{CliErrors}from'../../errors.js';import{assertTenantAccessible,projectTenantMembers}from'../../commands/tenant/shared.js';export const tenantMembersListDefinition={'service':a200_0x2a4097(0x138),'command':a200_0x2a4097(0x146),'description':a200_0x2a4097(0x136),'risk':'read','requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a200_0x2a4097(0x132),'type':a200_0x2a4097(0x13f),'required':!![],'description':a200_0x2a4097(0x13b)}],async 'validate'(_0x33ef4f){const _0x4ad933=a200_0x2a4097;if(!_0x33ef4f[_0x4ad933(0x137)]('tenant-code')[_0x4ad933(0x140)]())throw CliErrors[_0x4ad933(0x133)]('tenant-code','Pass\x20--tenant-code\x20<code>.');},async 'execute'(_0x4f5952){const _0x1e4a6b=a200_0x2a4097,_0x56c86b=_0x4f5952[_0x1e4a6b(0x137)]('tenant-code')[_0x1e4a6b(0x140)](),_0x2d4766=await listCurrentUserTenantMemberships();assertTenantAccessible(_0x56c86b,_0x2d4766);const _0x22960d=projectTenantMembers(await listTenantDirectoryMembers(_0x56c86b));return{'ok':!![],'data':{'tenantCode':_0x56c86b,'items':_0x22960d,'totalCount':_0x22960d[_0x1e4a6b(0x144)]},'message':_0x1e4a6b(0x134)+_0x22960d[_0x1e4a6b(0x144)]+'\x20tenant\x20member(s)'};}};
@@ -1 +1 @@
1
- (function(_0x5dedf7,_0x238a48){const _0x3b3a98=a200_0x1719,_0x49f83d=_0x5dedf7();while(!![]){try{const _0x2fbb41=-parseInt(_0x3b3a98(0x14b))/0x1+-parseInt(_0x3b3a98(0x148))/0x2*(-parseInt(_0x3b3a98(0x13f))/0x3)+-parseInt(_0x3b3a98(0x151))/0x4+parseInt(_0x3b3a98(0x144))/0x5*(parseInt(_0x3b3a98(0x155))/0x6)+-parseInt(_0x3b3a98(0x158))/0x7+parseInt(_0x3b3a98(0x13c))/0x8+-parseInt(_0x3b3a98(0x142))/0x9*(-parseInt(_0x3b3a98(0x154))/0xa);if(_0x2fbb41===_0x238a48)break;else _0x49f83d['push'](_0x49f83d['shift']());}catch(_0x2fdd23){_0x49f83d['push'](_0x49f83d['shift']());}}}(a200_0x2583,0x51693));function a200_0x1719(_0x35b1bb,_0x33b188){_0x35b1bb=_0x35b1bb-0x13c;const _0x2583e8=a200_0x2583();let _0x17196b=_0x2583e8[_0x35b1bb];return _0x17196b;}import{CliErrors}from'../../errors.js';function textOrNull(_0x24a528){const _0x327658=a200_0x1719,_0x1a9584=_0x24a528?.[_0x327658(0x156)]();return _0x1a9584?_0x1a9584:null;}export function projectTenantMembers(_0x5150da){const _0x3b385a=a200_0x1719,_0x17e0fb=new Map();for(const _0x42fb68 of _0x5150da){const _0xe1d811=Number(_0x42fb68[_0x3b385a(0x141)]);if(!Number[_0x3b385a(0x150)](_0xe1d811)||_0xe1d811<=0x0)continue;const _0x165b11={'userId':_0xe1d811,'username':textOrNull(_0x42fb68['username']),'displayName':textOrNull(_0x42fb68[_0x3b385a(0x143)]),'role':_0x42fb68[_0x3b385a(0x14c)]===!![]?'ADMIN':_0x3b385a(0x145),'status':textOrNull(_0x42fb68[_0x3b385a(0x153)])},_0x100095=_0x17e0fb['get'](_0xe1d811);if(!_0x100095){_0x17e0fb[_0x3b385a(0x152)](_0xe1d811,_0x165b11);continue;}_0x100095[_0x3b385a(0x13e)]??=_0x165b11[_0x3b385a(0x13e)],_0x100095[_0x3b385a(0x14a)]??=_0x165b11[_0x3b385a(0x14a)],_0x100095[_0x3b385a(0x153)]??=_0x165b11[_0x3b385a(0x153)];if(_0x165b11[_0x3b385a(0x149)]===_0x3b385a(0x157))_0x100095[_0x3b385a(0x149)]=_0x3b385a(0x157);}return[..._0x17e0fb[_0x3b385a(0x140)]()][_0x3b385a(0x14d)]((_0x3cc979,_0x203897)=>_0x3cc979[_0x3b385a(0x141)]-_0x203897[_0x3b385a(0x141)]);}export function assertTenantAccessible(_0x2396c0,_0x4d51c0){const _0x2034b3=a200_0x1719;if(_0x4d51c0[_0x2034b3(0x14e)](_0x334ae8=>_0x334ae8[_0x2034b3(0x146)]===_0x2396c0))return;throw CliErrors[_0x2034b3(0x13d)]('Tenant\x20\x22'+_0x2396c0+_0x2034b3(0x147),_0x2034b3(0x14f));}function a200_0x2583(){const _0x5000d9=['validation','username','15scscFv','values','userId','865395dpWerd','nickname','1811830TcTysX','MEMBER','tenantCode','\x22\x20is\x20not\x20available\x20to\x20the\x20current\x20account.','86638fjAUYD','role','displayName','663468ZrwmKa','adminFlag','sort','some','Check\x20--tenant-code\x20or\x20login\x20with\x20an\x20account\x20that\x20belongs\x20to\x20this\x20tenant.','isFinite','875412wYZaUy','set','status','10iLKtpu','6jfsscq','trim','ADMIN','243894CxXedj','4604048ElZdpE'];a200_0x2583=function(){return _0x5000d9;};return a200_0x2583();}
1
+ function a201_0x4c64(_0x199c8d,_0x171e71){_0x199c8d=_0x199c8d-0x1ae;const _0x37fdb4=a201_0x37fd();let _0x4c64e6=_0x37fdb4[_0x199c8d];return _0x4c64e6;}(function(_0x98bd,_0xb00745){const _0x38603e=a201_0x4c64,_0x4f1989=_0x98bd();while(!![]){try{const _0xea2b94=-parseInt(_0x38603e(0x1b4))/0x1+parseInt(_0x38603e(0x1bc))/0x2+parseInt(_0x38603e(0x1bb))/0x3*(parseInt(_0x38603e(0x1ba))/0x4)+parseInt(_0x38603e(0x1c4))/0x5*(-parseInt(_0x38603e(0x1b6))/0x6)+-parseInt(_0x38603e(0x1c5))/0x7*(-parseInt(_0x38603e(0x1b1))/0x8)+-parseInt(_0x38603e(0x1c3))/0x9+-parseInt(_0x38603e(0x1c6))/0xa*(-parseInt(_0x38603e(0x1ae))/0xb);if(_0xea2b94===_0xb00745)break;else _0x4f1989['push'](_0x4f1989['shift']());}catch(_0x183190){_0x4f1989['push'](_0x4f1989['shift']());}}}(a201_0x37fd,0x2eefb));function a201_0x37fd(){const _0x1e0cfd=['311824UWYSYJ','username','ADMIN','253013iogWao','Check\x20--tenant-code\x20or\x20login\x20with\x20an\x20account\x20that\x20belongs\x20to\x20this\x20tenant.','6eDBcHl','status','trim','some','712304qnUaxe','6RERIfx','455330ajPihM','isFinite','\x22\x20is\x20not\x20available\x20to\x20the\x20current\x20account.','displayName','set','adminFlag','userId','3035331uUEkru','1753375aMdetw','14YASCqw','8650mbTmpN','5995ZmQlKA','Tenant\x20\x22','sort'];a201_0x37fd=function(){return _0x1e0cfd;};return a201_0x37fd();}import{CliErrors}from'../../errors.js';function textOrNull(_0xf5c907){const _0x194bf4=a201_0x4c64,_0x2c677e=_0xf5c907?.[_0x194bf4(0x1b8)]();return _0x2c677e?_0x2c677e:null;}export function projectTenantMembers(_0x5715ea){const _0x12d60c=a201_0x4c64,_0x218b78=new Map();for(const _0x4f493b of _0x5715ea){const _0x2c2636=Number(_0x4f493b[_0x12d60c(0x1c2)]);if(!Number[_0x12d60c(0x1bd)](_0x2c2636)||_0x2c2636<=0x0)continue;const _0x42b135={'userId':_0x2c2636,'username':textOrNull(_0x4f493b[_0x12d60c(0x1b2)]),'displayName':textOrNull(_0x4f493b['nickname']),'role':_0x4f493b[_0x12d60c(0x1c1)]===!![]?_0x12d60c(0x1b3):'MEMBER','status':textOrNull(_0x4f493b[_0x12d60c(0x1b7)])},_0x3a830=_0x218b78['get'](_0x2c2636);if(!_0x3a830){_0x218b78[_0x12d60c(0x1c0)](_0x2c2636,_0x42b135);continue;}_0x3a830[_0x12d60c(0x1b2)]??=_0x42b135[_0x12d60c(0x1b2)],_0x3a830[_0x12d60c(0x1bf)]??=_0x42b135['displayName'],_0x3a830[_0x12d60c(0x1b7)]??=_0x42b135[_0x12d60c(0x1b7)];if(_0x42b135['role']===_0x12d60c(0x1b3))_0x3a830['role']=_0x12d60c(0x1b3);}return[..._0x218b78['values']()][_0x12d60c(0x1b0)]((_0x5752e4,_0x2b55a2)=>_0x5752e4[_0x12d60c(0x1c2)]-_0x2b55a2[_0x12d60c(0x1c2)]);}export function assertTenantAccessible(_0xb244d0,_0x5dfbce){const _0x367941=a201_0x4c64;if(_0x5dfbce[_0x367941(0x1b9)](_0x23e2fc=>_0x23e2fc['tenantCode']===_0xb244d0))return;throw CliErrors['validation'](_0x367941(0x1af)+_0xb244d0+_0x367941(0x1be),_0x367941(0x1b5));}
@@ -1 +1 @@
1
- const a201_0x3fb417=a201_0x3c8d;(function(_0x1ef707,_0x42a6e2){const _0x58b297=a201_0x3c8d,_0x2f13aa=_0x1ef707();while(!![]){try{const _0x36d99e=-parseInt(_0x58b297(0x8e))/0x1*(-parseInt(_0x58b297(0x9a))/0x2)+parseInt(_0x58b297(0x91))/0x3+parseInt(_0x58b297(0x99))/0x4+-parseInt(_0x58b297(0x9d))/0x5+parseInt(_0x58b297(0x96))/0x6*(parseInt(_0x58b297(0x9e))/0x7)+-parseInt(_0x58b297(0x93))/0x8*(parseInt(_0x58b297(0x90))/0x9)+-parseInt(_0x58b297(0x97))/0xa;if(_0x36d99e===_0x42a6e2)break;else _0x2f13aa['push'](_0x2f13aa['shift']());}catch(_0x571fba){_0x2f13aa['push'](_0x2f13aa['shift']());}}}(a201_0xad87,0xd595a));import{asDryRunResult}from'../../commands/common/dry-run.js';function a201_0x3c8d(_0x21bb32,_0xc31a39){_0x21bb32=_0x21bb32-0x8c;const _0xad8753=a201_0xad87();let _0x3c8d84=_0xad8753[_0x21bb32];return _0x3c8d84;}import{bindDingTalkSandboxAccount,DING_TALK_SANDBOX_BIND_PATH}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const PROVIDER_ID='dingding-sandbox',CURRENT_BINDING_WARNING=a201_0x3fb417(0x98);function readDingTalkUserId(_0x2e30b4){const _0x2a3a06=a201_0x3fb417,_0x3ac43e=_0x2e30b4['str'](_0x2a3a06(0xa2))[_0x2a3a06(0x8c)]();if(!_0x3ac43e)throw CliErrors[_0x2a3a06(0x8d)](_0x2a3a06(0x92),'Pass\x20the\x20DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox.');return _0x3ac43e;}function buildBindingData(_0x56cad5,_0x3480bf){const _0x327434=a201_0x3fb417;return{'operation':'bind','selector':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x56cad5},'before':null,'after':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x56cad5,'bound':!![]},'dryRun':_0x3480bf,'backend':{'method':_0x327434(0x95),'path':DING_TALK_SANDBOX_BIND_PATH},'warnings':[CURRENT_BINDING_WARNING]};}export const dingTalkSandboxBind={'service':a201_0x3fb417(0x9f),'command':'dingding-sandbox-bind','description':a201_0x3fb417(0xa1),'risk':a201_0x3fb417(0xa0),'requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a201_0x3fb417(0xa2),'type':a201_0x3fb417(0x8f),'required':!![],'description':'DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox'}],async 'validate'(_0x5de0f0){readDingTalkUserId(_0x5de0f0);},async 'dryRun'(_0x6adeee){const _0x150f67=readDingTalkUserId(_0x6adeee);return asDryRunResult(buildBindingData(_0x150f67,!![]),{'method':'POST','url':DING_TALK_SANDBOX_BIND_PATH});},async 'execute'(_0x4cfaca){const _0x214f5e=a201_0x3fb417,_0x235665=readDingTalkUserId(_0x4cfaca),_0x5bec91=await bindDingTalkSandboxAccount(_0x235665);if(_0x5bec91!==!![])throw CliErrors[_0x214f5e(0xa3)](_0x214f5e(0x9c),_0x214f5e(0x94));return{'ok':!![],'data':buildBindingData(_0x235665,![]),'message':_0x214f5e(0x9b)};}};function a201_0xad87(){const _0x337508=['trim','validation','53005THvXbX','string','23967LNERMX','2158731tOTBxE','--ding-talk-user-id\x20cannot\x20be\x20empty.','2816ilKfme','Retry\x20with\x20the\x20same\x20--ding-talk-user-id\x20only\x20after\x20checking\x20the\x20current\x20platform\x20session.','POST','834UyvqkS','10639040LTNfvC','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','3746460PpkCGm','42HilgnS','Bound\x20current\x20user\x20to\x20DingTalk\x20sandbox\x20account.','DingTalk\x20sandbox\x20account\x20binding\x20was\x20not\x20confirmed.','5210745PqzMXN','57862XIsCuI','user-account','write','Bind\x20the\x20current\x20platform\x20user\x20to\x20a\x20DingTalk\x20sandbox\x20account','ding-talk-user-id','apiError'];a201_0xad87=function(){return _0x337508;};return a201_0xad87();}
1
+ const a202_0xd2d60b=a202_0x417d;(function(_0x3f892b,_0x2b66cd){const _0x321c1f=a202_0x417d,_0xa216ac=_0x3f892b();while(!![]){try{const _0x55d38b=parseInt(_0x321c1f(0xe4))/0x1*(parseInt(_0x321c1f(0xf8))/0x2)+parseInt(_0x321c1f(0xe7))/0x3+parseInt(_0x321c1f(0xe9))/0x4*(-parseInt(_0x321c1f(0xe6))/0x5)+-parseInt(_0x321c1f(0xfc))/0x6*(parseInt(_0x321c1f(0xf5))/0x7)+-parseInt(_0x321c1f(0xf7))/0x8+parseInt(_0x321c1f(0xfa))/0x9*(parseInt(_0x321c1f(0xef))/0xa)+-parseInt(_0x321c1f(0xf2))/0xb;if(_0x55d38b===_0x2b66cd)break;else _0xa216ac['push'](_0xa216ac['shift']());}catch(_0x2f6965){_0xa216ac['push'](_0xa216ac['shift']());}}}(a202_0x36a8,0x88946));import{asDryRunResult}from'../../commands/common/dry-run.js';import{bindDingTalkSandboxAccount,DING_TALK_SANDBOX_BIND_PATH}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a202_0x417d(_0x241129,_0x55e309){_0x241129=_0x241129-0xe4;const _0x36a865=a202_0x36a8();let _0x417d3f=_0x36a865[_0x241129];return _0x417d3f;}const PROVIDER_ID=a202_0xd2d60b(0xf9),CURRENT_BINDING_WARNING=a202_0xd2d60b(0xf1);function readDingTalkUserId(_0x104730){const _0x5b8d73=a202_0xd2d60b,_0xda7316=_0x104730['str'](_0x5b8d73(0xe8))['trim']();if(!_0xda7316)throw CliErrors[_0x5b8d73(0xf6)](_0x5b8d73(0xee),_0x5b8d73(0xed));return _0xda7316;}function a202_0x36a8(){const _0x3c2a90=['43515XONEZN','bind','5111844dbEHqJ','217941thKfBd','write','88105GWjmGH','1729467vGghqJ','ding-talk-user-id','52ozuuMF','Bound\x20current\x20user\x20to\x20DingTalk\x20sandbox\x20account.','Retry\x20with\x20the\x20same\x20--ding-talk-user-id\x20only\x20after\x20checking\x20the\x20current\x20platform\x20session.','dingding-sandbox-bind','Pass\x20the\x20DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox.','--ding-talk-user-id\x20cannot\x20be\x20empty.','1130zXWmUo','user-account','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','4551272xvkSFm','string','Bind\x20the\x20current\x20platform\x20user\x20to\x20a\x20DingTalk\x20sandbox\x20account','7noaQaH','validation','1266560bPWECv','10bzVHUR','dingding-sandbox'];a202_0x36a8=function(){return _0x3c2a90;};return a202_0x36a8();}function buildBindingData(_0x10aa6f,_0x198131){const _0x2c9d44=a202_0xd2d60b;return{'operation':_0x2c9d44(0xfb),'selector':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x10aa6f},'before':null,'after':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x10aa6f,'bound':!![]},'dryRun':_0x198131,'backend':{'method':'POST','path':DING_TALK_SANDBOX_BIND_PATH},'warnings':[CURRENT_BINDING_WARNING]};}export const dingTalkSandboxBind={'service':a202_0xd2d60b(0xf0),'command':a202_0xd2d60b(0xec),'description':a202_0xd2d60b(0xf4),'risk':a202_0xd2d60b(0xe5),'requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a202_0xd2d60b(0xe8),'type':a202_0xd2d60b(0xf3),'required':!![],'description':'DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox'}],async 'validate'(_0x2780c7){readDingTalkUserId(_0x2780c7);},async 'dryRun'(_0x1e1f72){const _0xc92e41=readDingTalkUserId(_0x1e1f72);return asDryRunResult(buildBindingData(_0xc92e41,!![]),{'method':'POST','url':DING_TALK_SANDBOX_BIND_PATH});},async 'execute'(_0x113bc0){const _0x296113=a202_0xd2d60b,_0x19b7e6=readDingTalkUserId(_0x113bc0),_0x2f619e=await bindDingTalkSandboxAccount(_0x19b7e6);if(_0x2f619e!==!![])throw CliErrors['apiError']('DingTalk\x20sandbox\x20account\x20binding\x20was\x20not\x20confirmed.',_0x296113(0xeb));return{'ok':!![],'data':buildBindingData(_0x19b7e6,![]),'message':_0x296113(0xea)};}};
@@ -1 +1 @@
1
- (function(_0x5d65d4,_0x1fc8df){const _0x15f57b=a202_0x2776,_0x2c1a3c=_0x5d65d4();while(!![]){try{const _0x153ea1=-parseInt(_0x15f57b(0x141))/0x1*(parseInt(_0x15f57b(0x140))/0x2)+-parseInt(_0x15f57b(0x143))/0x3+parseInt(_0x15f57b(0x142))/0x4+-parseInt(_0x15f57b(0x147))/0x5+-parseInt(_0x15f57b(0x146))/0x6+parseInt(_0x15f57b(0x145))/0x7+parseInt(_0x15f57b(0x144))/0x8;if(_0x153ea1===_0x1fc8df)break;else _0x2c1a3c['push'](_0x2c1a3c['shift']());}catch(_0x54c100){_0x2c1a3c['push'](_0x2c1a3c['shift']());}}}(a202_0x29f0,0xa09a9));function a202_0x2776(_0x477574,_0x61bcf1){_0x477574=_0x477574-0x140;const _0x29f09e=a202_0x29f0();let _0x2776c7=_0x29f09e[_0x477574];return _0x2776c7;}import{dingTalkSandboxBind}from'../../commands/user-account/dingding-sandbox-bind.js';export const userAccountDefinitions=[dingTalkSandboxBind];function a202_0x29f0(){const _0x2876fc=['23853cdSnrC','4197112ryDaqp','3634323GjZDMC','10125528yerCbi','7757295GYmdqR','1309698CUSFcl','6439455SWeZSO','4gTpMTj'];a202_0x29f0=function(){return _0x2876fc;};return a202_0x29f0();}
1
+ (function(_0x1addc5,_0x2b691e){const _0x784e98=a203_0x37d5,_0xbd2bac=_0x1addc5();while(!![]){try{const _0x3b7059=-parseInt(_0x784e98(0xd6))/0x1*(-parseInt(_0x784e98(0xd7))/0x2)+parseInt(_0x784e98(0xdc))/0x3+parseInt(_0x784e98(0xda))/0x4+-parseInt(_0x784e98(0xd9))/0x5+-parseInt(_0x784e98(0xdb))/0x6*(parseInt(_0x784e98(0xde))/0x7)+parseInt(_0x784e98(0xd5))/0x8*(-parseInt(_0x784e98(0xd8))/0x9)+-parseInt(_0x784e98(0xdd))/0xa;if(_0x3b7059===_0x2b691e)break;else _0xbd2bac['push'](_0xbd2bac['shift']());}catch(_0x445030){_0xbd2bac['push'](_0xbd2bac['shift']());}}}(a203_0x5d61,0x25abe));function a203_0x5d61(){const _0x247c68=['40pMGmuv','14836lVmrmF','30NOdHHk','389979SkLFzV','405gMNGpg','685388nlLApk','89142YGmHvg','884037qONjSn','946730CMMmXK','105INdYqJ'];a203_0x5d61=function(){return _0x247c68;};return a203_0x5d61();}function a203_0x37d5(_0x38c97e,_0x3351c2){_0x38c97e=_0x38c97e-0xd5;const _0x5d6199=a203_0x5d61();let _0x37d563=_0x5d6199[_0x38c97e];return _0x37d563;}import{dingTalkSandboxBind}from'../../commands/user-account/dingding-sandbox-bind.js';export const userAccountDefinitions=[dingTalkSandboxBind];
@@ -1 +1 @@
1
- const a203_0x352b95=a203_0x22fb;function a203_0x22fb(_0x36dab6,_0xb9efe8){_0x36dab6=_0x36dab6-0x1bf;const _0x5df078=a203_0x5df0();let _0x22fbee=_0x5df078[_0x36dab6];return _0x22fbee;}(function(_0x1c99be,_0x38c9fc){const _0x500714=a203_0x22fb,_0x58b1df=_0x1c99be();while(!![]){try{const _0x5a95ae=parseInt(_0x500714(0x1c8))/0x1*(parseInt(_0x500714(0x1c4))/0x2)+parseInt(_0x500714(0x1c1))/0x3*(parseInt(_0x500714(0x1c5))/0x4)+-parseInt(_0x500714(0x1cf))/0x5+-parseInt(_0x500714(0x1ca))/0x6*(-parseInt(_0x500714(0x1c6))/0x7)+parseInt(_0x500714(0x1c9))/0x8+parseInt(_0x500714(0x1cd))/0x9*(-parseInt(_0x500714(0x1ce))/0xa)+-parseInt(_0x500714(0x1c0))/0xb;if(_0x5a95ae===_0x38c9fc)break;else _0x58b1df['push'](_0x58b1df['shift']());}catch(_0x1938f6){_0x58b1df['push'](_0x58b1df['shift']());}}}(a203_0x5df0,0xa44cf));function a203_0x5df0(){const _0x2ba691=['18821121RkyFIX','6kwdVxw','App\x20profile\x20name','add','2ppLwDO','950172xFYDyD','21kXAzEe','workspace','300079wzlqfz','7238792wpiHgV','2299884vXclEv','write','name','7587nqLPIt','2320FmKqaE','1251970sNQGTT','Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','workspace\x20add'];a203_0x5df0=function(){return _0x2ba691;};return a203_0x5df0();}import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';export const workspaceAddDefinition={'service':a203_0x352b95(0x1c7),'command':a203_0x352b95(0x1c3),'description':a203_0x352b95(0x1d0),'risk':a203_0x352b95(0x1cb),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a203_0x352b95(0x1cc),'description':a203_0x352b95(0x1c2),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0x1f6022=>validateAppName(_0x1f6022,'workspace\x20add'),'execute':_0x588a0d=>runAppAdd(_0x588a0d,a203_0x352b95(0x1bf))};
1
+ const a204_0x18e530=a204_0x2dc1;function a204_0x2dc1(_0x56c9a7,_0x56b3de){_0x56c9a7=_0x56c9a7-0x103;const _0xbed823=a204_0xbed8();let _0x2dc124=_0xbed823[_0x56c9a7];return _0x2dc124;}(function(_0x22de2f,_0x76d3f0){const _0x501a76=a204_0x2dc1,_0x360a9a=_0x22de2f();while(!![]){try{const _0x462f0f=-parseInt(_0x501a76(0x112))/0x1+-parseInt(_0x501a76(0x106))/0x2*(-parseInt(_0x501a76(0x10d))/0x3)+parseInt(_0x501a76(0x107))/0x4+parseInt(_0x501a76(0x10a))/0x5*(-parseInt(_0x501a76(0x111))/0x6)+parseInt(_0x501a76(0x10c))/0x7*(parseInt(_0x501a76(0x105))/0x8)+-parseInt(_0x501a76(0x10f))/0x9+-parseInt(_0x501a76(0x110))/0xa*(-parseInt(_0x501a76(0x10e))/0xb);if(_0x462f0f===_0x76d3f0)break;else _0x360a9a['push'](_0x360a9a['shift']());}catch(_0x522224){_0x360a9a['push'](_0x360a9a['shift']());}}}(a204_0xbed8,0x6509e));import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';function a204_0xbed8(){const _0x465d4e=['477462ZuBGWa','Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','name','2392400qVvwRV','2928ebWvIs','333380SiRqhj','workspace','App\x20profile\x20name','33260EsWWdK','workspace\x20add','7cCmUvj','207rMArFm','602525ApZwmt','166950fwFcxv','90UFULWe','60MTnJyL'];a204_0xbed8=function(){return _0x465d4e;};return a204_0xbed8();}export const workspaceAddDefinition={'service':a204_0x18e530(0x108),'command':'add','description':a204_0x18e530(0x103),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a204_0x18e530(0x104),'description':a204_0x18e530(0x109),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0x23c444=>validateAppName(_0x23c444,a204_0x18e530(0x10b)),'execute':_0xac2f76=>runAppAdd(_0xac2f76,a204_0x18e530(0x10b))};
@@ -1 +1 @@
1
- const a204_0x31d777=a204_0x260f;(function(_0x12c0b1,_0x3b6f89){const _0x4ce789=a204_0x260f,_0x289e71=_0x12c0b1();while(!![]){try{const _0xbd0328=-parseInt(_0x4ce789(0x18b))/0x1+parseInt(_0x4ce789(0x186))/0x2*(parseInt(_0x4ce789(0x1a9))/0x3)+parseInt(_0x4ce789(0x1a4))/0x4*(-parseInt(_0x4ce789(0x18d))/0x5)+parseInt(_0x4ce789(0x1b0))/0x6*(-parseInt(_0x4ce789(0x18e))/0x7)+-parseInt(_0x4ce789(0x1ad))/0x8+-parseInt(_0x4ce789(0x1a1))/0x9*(parseInt(_0x4ce789(0x191))/0xa)+parseInt(_0x4ce789(0x182))/0xb*(parseInt(_0x4ce789(0x190))/0xc);if(_0xbd0328===_0x3b6f89)break;else _0x289e71['push'](_0x289e71['shift']());}catch(_0x3450ea){_0x289e71['push'](_0x289e71['shift']());}}}(a204_0x25ff,0x3a540));function a204_0x260f(_0x252ff2,_0x269b13){_0x252ff2=_0x252ff2-0x17d;const _0x25fffc=a204_0x25ff();let _0x260f1c=_0x25fffc[_0x252ff2];return _0x260f1c;}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a204_0x25ff(){const _0x4f0dff=['12972619MeWDhE','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','flag','apiDir','532006uaCINm','riskLevel','isArray','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','appcode','152140QkUtBT','Switch\x20the\x20current\x20workspace\x20app\x20binding','60DZltXC','343zKWVWP','format','12rYaPqN','690aAfFGQ','Workspace\x20','Initialize\x20the\x20current\x20workspace\x20app\x20binding','workspace','join','workspace.','string','env','length','app','project','use','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','validation','\x20--app\x20','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','22554nipjky','keys','Missing\x20workspace\x20app\x20selector.','135672nGBVbK','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','trim','apps','\x20workspace\x20use\x20--app\x20<name>`.','3OyGHtR','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','locale','updated','802664nriDZV','write','API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile','45798tKnpaQ','defaultApp','str','\x20--appcode\x20<code>`.','Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','init','App\x20\x22','Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile','pageSize','Use\x20`','defaultFormat','.\x20Credentials:\x20not\x20written.'];a204_0x25ff=function(){return _0x4f0dff;};return a204_0x25ff();}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+a204_0x31d777(0x183),SAFE_PROFILE_KEYS=['appcode',a204_0x31d777(0x198),a204_0x31d777(0x185),a204_0x31d777(0x18f),a204_0x31d777(0x17e),a204_0x31d777(0x187),a204_0x31d777(0x1ab)],workspaceFlags=[{'name':a204_0x31d777(0x19a),'type':a204_0x31d777(0x197),'description':a204_0x31d777(0x19d)},{'name':'appcode','type':'string','description':a204_0x31d777(0x1a0)},{'name':a204_0x31d777(0x198),'type':'string','description':'Target\x20environment','enum':[...RABETBASE_ENV_VALUES]},{'name':a204_0x31d777(0x185),'type':'string','description':a204_0x31d777(0x1af)},{'name':a204_0x31d777(0x180),'type':a204_0x31d777(0x197),'description':a204_0x31d777(0x1b4),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a204_0x31d777(0x17e),'type':'number','description':a204_0x31d777(0x17d)},{'name':a204_0x31d777(0x187),'type':a204_0x31d777(0x197),'description':a204_0x31d777(0x1a5),'enum':[...RISK_LEVEL_VALUES]},{'name':a204_0x31d777(0x1ab),'type':a204_0x31d777(0x197),'description':'Locale\x20for\x20this\x20workspace\x20app\x20profile'}];function isRecord(_0x30b81d){const _0x2d8b55=a204_0x31d777;return!!_0x30b81d&&typeof _0x30b81d==='object'&&!Array[_0x2d8b55(0x188)](_0x30b81d);}function assertValidAppcode(_0xd77f54){const {valid:_0x495137,message:_0x3a3a85}=validateAppcode(_0xd77f54);if(!_0x495137)throw CliErrors['validation']('Invalid\x20appcode:\x20'+_0xd77f54,_0x3a3a85);}function sanitizeProfile(_0x253ad0){if(!isRecord(_0x253ad0))return{};const _0x7e6da1={};for(const _0x3f5dd1 of SAFE_PROFILE_KEYS){if(_0x253ad0[_0x3f5dd1]!==undefined)_0x7e6da1[_0x3f5dd1]=_0x253ad0[_0x3f5dd1];}return _0x7e6da1;}function cloneProfile(_0x2fd502){return isRecord(_0x2fd502)?{..._0x2fd502}:{};}function collectWorkspaceProfileOverrides(_0x330905){const _0x59d30a=a204_0x31d777,_0x10bb55={},_0x3a1961=_0x330905[_0x59d30a(0x1b2)](_0x59d30a(0x198)),_0x2d9817=_0x330905[_0x59d30a(0x1b2)](_0x59d30a(0x185)),_0x271781=_0x330905[_0x59d30a(0x1b2)]('defaultFormat'),_0x469ead=_0x330905[_0x59d30a(0x184)](_0x59d30a(0x17e)),_0x3d84e8=_0x330905[_0x59d30a(0x1b2)](_0x59d30a(0x187)),_0x54658d=_0x330905[_0x59d30a(0x1b2)](_0x59d30a(0x1ab));if(_0x3a1961)_0x10bb55[_0x59d30a(0x198)]=_0x3a1961;if(_0x2d9817)_0x10bb55[_0x59d30a(0x185)]=_0x2d9817;if(_0x271781)_0x10bb55[_0x59d30a(0x18f)]=_0x271781;if(_0x469ead!==undefined&&_0x469ead!=='')_0x10bb55[_0x59d30a(0x17e)]=Number(_0x469ead);if(_0x3d84e8)_0x10bb55[_0x59d30a(0x187)]=_0x3d84e8;if(_0x54658d)_0x10bb55[_0x59d30a(0x1ab)]=_0x54658d;return _0x10bb55;}async function validateWorkspaceArgs(_0x4108dd){const _0x9f2be=a204_0x31d777,_0x2b7a31=_0x4108dd[_0x9f2be(0x1b2)](_0x9f2be(0x19a))['trim'](),_0xef894c=_0x4108dd['str'](_0x9f2be(0x18a))['trim']();if(!_0x2b7a31&&!_0xef894c)throw CliErrors['validation'](_0x9f2be(0x1a3),_0x9f2be(0x17f)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`.');if(_0xef894c)assertValidAppcode(_0xef894c);}function resolveKnownApps(){const _0x24e75d=a204_0x31d777,{config:_0x36996e,layers:_0x20643b}=readRawConfigWithLayers(),_0x78739f=isRecord(_0x36996e[_0x24e75d(0x1a7)])?_0x36996e[_0x24e75d(0x1a7)]:{},_0xc31c99=isRecord(_0x20643b['globalConfig'][_0x24e75d(0x1a7)])?_0x20643b['globalConfig'][_0x24e75d(0x1a7)]:{};return{..._0xc31c99,..._0x78739f};}async function configureWorkspace(_0x2b1cd1,_0x2f10b4){const _0x530595=a204_0x31d777,_0x19dec3=_0x2b1cd1['str'](_0x530595(0x19a))[_0x530595(0x1a6)](),_0xeb33b0=_0x2b1cd1['str'](_0x530595(0x18a))['trim'](),_0xb3b126=_0x19dec3||_0xeb33b0;if(!_0xb3b126)throw CliErrors['validation']('Missing\x20workspace\x20app\x20selector.',_0x530595(0x17f)+CLI_BIN_NAME+_0x530595(0x1aa)+CLI_BIN_NAME+_0x530595(0x1a8));if(_0xeb33b0)assertValidAppcode(_0xeb33b0);const _0x5e99b7=resolveWriteConfigPath(_0x530595(0x19b)),_0xadb51=readConfigFile(_0x5e99b7),_0x37a223=resolveKnownApps(),_0x51f576=isRecord(_0xadb51[_0x530595(0x1a7)])?{..._0xadb51['apps']}:{},_0x5624bf=cloneProfile(_0x51f576[_0xb3b126]),_0x134188=sanitizeProfile(_0x37a223[_0xb3b126]),_0x4742ba=_0xeb33b0?{}:_0x134188,_0x883b07=_0xeb33b0||_0x4742ba[_0x530595(0x18a)];if(!_0x883b07){const _0x4d4f21=Object[_0x530595(0x1a2)](_0x37a223),_0x4e729f=_0x4d4f21[_0x530595(0x199)]===0x0?_0x530595(0x17f)+CLI_BIN_NAME+'\x20workspace\x20'+_0x2f10b4+_0x530595(0x19f)+_0xb3b126+_0x530595(0x1b3):_0x530595(0x189)+_0x4d4f21[_0x530595(0x195)](',\x20');throw CliErrors[_0x530595(0x19e)](_0x530595(0x1b6)+_0xb3b126+'\x22\x20not\x20found.',_0x4e729f);}assertValidAppcode(String(_0x883b07));const _0x208158={..._0x4742ba,..._0x5624bf,'appcode':String(_0x883b07),...collectWorkspaceProfileOverrides(_0x2b1cd1)};return _0x51f576[_0xb3b126]=_0x208158,_0xadb51[_0x530595(0x1a7)]=_0x51f576,_0xadb51[_0x530595(0x1b1)]=_0xb3b126,delete _0xadb51[_0x530595(0x18a)],delete _0xadb51[_0x530595(0x19a)],_0x208158['env']&&(_0xadb51[_0x530595(0x198)]=_0x208158['env']),writeConfigFile(_0x5e99b7,_0xadb51),{'ok':!![],'message':_0x530595(0x192)+(_0x2f10b4===_0x530595(0x1b5)?'initialized':_0x530595(0x1ac))+':\x20'+_0xb3b126+'\x20(appcode:\x20'+_0x208158[_0x530595(0x18a)]+').\x20Config:\x20'+_0x5e99b7+_0x530595(0x181),'data':{'operation':_0x530595(0x196)+_0x2f10b4,'configPath':_0x5e99b7,'app':_0xb3b126,'appcode':_0x208158['appcode'],'env':_0x208158[_0x530595(0x198)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':a204_0x31d777(0x194),'command':a204_0x31d777(0x1b5),'description':a204_0x31d777(0x193),'risk':a204_0x31d777(0x1ae),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x12567f=>configureWorkspace(_0x12567f,a204_0x31d777(0x1b5))},workspaceUseDefinition={'service':a204_0x31d777(0x194),'command':a204_0x31d777(0x19c),'description':a204_0x31d777(0x18c),'risk':a204_0x31d777(0x1ae),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x245ece=>configureWorkspace(_0x245ece,'use')};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
1
+ const a205_0x1bab41=a205_0x4f6b;(function(_0x4efe61,_0x55ba46){const _0x5cff9e=a205_0x4f6b,_0x2d5571=_0x4efe61();while(!![]){try{const _0xf6cce4=-parseInt(_0x5cff9e(0xa3))/0x1*(-parseInt(_0x5cff9e(0xa9))/0x2)+-parseInt(_0x5cff9e(0xa6))/0x3*(-parseInt(_0x5cff9e(0xc5))/0x4)+-parseInt(_0x5cff9e(0xcb))/0x5+parseInt(_0x5cff9e(0xb3))/0x6*(parseInt(_0x5cff9e(0xa7))/0x7)+parseInt(_0x5cff9e(0xb0))/0x8+parseInt(_0x5cff9e(0xc8))/0x9+-parseInt(_0x5cff9e(0xab))/0xa*(parseInt(_0x5cff9e(0xbd))/0xb);if(_0xf6cce4===_0x55ba46)break;else _0x2d5571['push'](_0x2d5571['shift']());}catch(_0xd6efaa){_0x2d5571['push'](_0x2d5571['shift']());}}}(a205_0x22a1,0x1c4e7));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';function a205_0x4f6b(_0x4460a8,_0x3abc2c){_0x4460a8=_0x4460a8-0x97;const _0x22a1fe=a205_0x22a1();let _0x4f6b02=_0x22a1fe[_0x4460a8];return _0x4f6b02;}import{workspaceRemoveDefinition}from'../../commands/workspace/remove.js';const WORKSPACE_USAGE=CLI_BIN_NAME+a205_0x1bab41(0xa2),SAFE_PROFILE_KEYS=[a205_0x1bab41(0xc4),'env',a205_0x1bab41(0xa8),'format',a205_0x1bab41(0xd5),a205_0x1bab41(0xc3),a205_0x1bab41(0xae)],workspaceFlags=[{'name':a205_0x1bab41(0xb6),'type':a205_0x1bab41(0xc9),'description':a205_0x1bab41(0xd1)},{'name':'appcode','type':a205_0x1bab41(0xc9),'description':a205_0x1bab41(0x99)},{'name':a205_0x1bab41(0xc0),'type':a205_0x1bab41(0xc9),'description':a205_0x1bab41(0xaf),'enum':[...RABETBASE_ENV_VALUES]},{'name':a205_0x1bab41(0xa8),'type':'string','description':a205_0x1bab41(0xb1)},{'name':a205_0x1bab41(0xc2),'type':a205_0x1bab41(0xc9),'description':a205_0x1bab41(0xac),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a205_0x1bab41(0xd5),'type':a205_0x1bab41(0xcf),'description':a205_0x1bab41(0xba)},{'name':'riskLevel','type':'string','description':a205_0x1bab41(0xd0),'enum':[...RISK_LEVEL_VALUES]},{'name':a205_0x1bab41(0xae),'type':'string','description':a205_0x1bab41(0xc6)}];function isRecord(_0x45ab73){const _0x4eca41=a205_0x1bab41;return!!_0x45ab73&&typeof _0x45ab73===_0x4eca41(0xb7)&&!Array['isArray'](_0x45ab73);}function assertValidAppcode(_0x20be77){const _0x103a94=a205_0x1bab41,{valid:_0x150681,message:_0x230166}=validateAppcode(_0x20be77);if(!_0x150681)throw CliErrors[_0x103a94(0xcc)](_0x103a94(0xb5)+_0x20be77,_0x230166);}function sanitizeProfile(_0x1d85df){if(!isRecord(_0x1d85df))return{};const _0x4e392c={};for(const _0x2ba029 of SAFE_PROFILE_KEYS){if(_0x1d85df[_0x2ba029]!==undefined)_0x4e392c[_0x2ba029]=_0x1d85df[_0x2ba029];}return _0x4e392c;}function cloneProfile(_0x4ff30f){return isRecord(_0x4ff30f)?{..._0x4ff30f}:{};}function collectWorkspaceProfileOverrides(_0x4e5a87){const _0x15179d=a205_0x1bab41,_0x26b4cc={},_0x631e0=_0x4e5a87[_0x15179d(0xbf)](_0x15179d(0xc0)),_0xe5db82=_0x4e5a87[_0x15179d(0xbf)](_0x15179d(0xa8)),_0xca9c43=_0x4e5a87['str'](_0x15179d(0xc2)),_0xaf3457=_0x4e5a87[_0x15179d(0xa0)](_0x15179d(0xd5)),_0x22ab4f=_0x4e5a87[_0x15179d(0xbf)](_0x15179d(0xc3)),_0x5694cb=_0x4e5a87[_0x15179d(0xbf)](_0x15179d(0xae));if(_0x631e0)_0x26b4cc['env']=_0x631e0;if(_0xe5db82)_0x26b4cc[_0x15179d(0xa8)]=_0xe5db82;if(_0xca9c43)_0x26b4cc[_0x15179d(0xb8)]=_0xca9c43;if(_0xaf3457!==undefined&&_0xaf3457!=='')_0x26b4cc['pageSize']=Number(_0xaf3457);if(_0x22ab4f)_0x26b4cc[_0x15179d(0xc3)]=_0x22ab4f;if(_0x5694cb)_0x26b4cc[_0x15179d(0xae)]=_0x5694cb;return _0x26b4cc;}async function validateWorkspaceArgs(_0x121917){const _0x25e8be=a205_0x1bab41,_0x48db93=_0x121917['str']('app')['trim'](),_0x2e78c6=_0x121917[_0x25e8be(0xbf)](_0x25e8be(0xc4))[_0x25e8be(0xa5)]();if(!_0x48db93&&!_0x2e78c6)throw CliErrors['validation'](_0x25e8be(0xca),_0x25e8be(0xc1)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'+CLI_BIN_NAME+_0x25e8be(0xbc));if(_0x2e78c6)assertValidAppcode(_0x2e78c6);}function resolveKnownApps(){const _0x15f297=a205_0x1bab41,{config:_0x485daf,layers:_0x486b33}=readRawConfigWithLayers(),_0x4ebf13=isRecord(_0x485daf[_0x15f297(0xaa)])?_0x485daf[_0x15f297(0xaa)]:{},_0x2d1696=isRecord(_0x486b33[_0x15f297(0x9b)]['apps'])?_0x486b33[_0x15f297(0x9b)][_0x15f297(0xaa)]:{};return{..._0x2d1696,..._0x4ebf13};}function a205_0x22a1(){const _0x276b17=['App\x20\x22','globalConfig','length','workspace.','defaultApp','\x20(appcode:\x20','flag','\x22\x20not\x20found.','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','3qLqhkL','initialized','trim','367851KIdXSE','84qyUrPp','apiDir','52626IGOTtz','apps','1690ZhmVLu','Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','join','locale','Target\x20environment','686744ZlFXUt','API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile',').\x20Config:\x20','1866nVQgRX','write','Invalid\x20appcode:\x20','app','object','format','use','Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile','Workspace\x20','\x20workspace\x20use\x20--app\x20<name>`.','14861LMoRQG','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','str','env','Use\x20`','defaultFormat','riskLevel','appcode','4CryXDi','Locale\x20for\x20this\x20workspace\x20app\x20profile','Initialize\x20the\x20current\x20workspace\x20app\x20binding','1780776xLYGAo','string','Missing\x20workspace\x20app\x20selector.','723665qyWPQU','validation','project','Switch\x20the\x20current\x20workspace\x20app\x20binding','number','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','\x20workspace\x20','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','.\x20Credentials:\x20not\x20written.','pageSize','workspace','init','App\x20code\x20to\x20bind\x20to\x20this\x20workspace'];a205_0x22a1=function(){return _0x276b17;};return a205_0x22a1();}async function configureWorkspace(_0x144657,_0x386037){const _0x8c72bb=a205_0x1bab41,_0x3e2bc3=_0x144657[_0x8c72bb(0xbf)](_0x8c72bb(0xb6))['trim'](),_0x28da5c=_0x144657['str']('appcode')[_0x8c72bb(0xa5)](),_0x2e0c0b=_0x3e2bc3||_0x28da5c;if(!_0x2e0c0b)throw CliErrors[_0x8c72bb(0xcc)](_0x8c72bb(0xca),'Use\x20`'+CLI_BIN_NAME+_0x8c72bb(0xbe)+CLI_BIN_NAME+_0x8c72bb(0xbc));if(_0x28da5c)assertValidAppcode(_0x28da5c);const _0x597cea=resolveWriteConfigPath(_0x8c72bb(0xcd)),_0xf40023=readConfigFile(_0x597cea),_0x5946e2=resolveKnownApps(),_0x1109d8=isRecord(_0xf40023['apps'])?{..._0xf40023[_0x8c72bb(0xaa)]}:{},_0x3fcf74=cloneProfile(_0x1109d8[_0x2e0c0b]),_0x56c0a2=sanitizeProfile(_0x5946e2[_0x2e0c0b]),_0x174d52=_0x28da5c?{}:_0x56c0a2,_0x555f0d=_0x28da5c||_0x174d52[_0x8c72bb(0xc4)];if(!_0x555f0d){const _0x528cca=Object['keys'](_0x5946e2),_0x4c9ffa=_0x528cca[_0x8c72bb(0x9c)]===0x0?'Use\x20`'+CLI_BIN_NAME+_0x8c72bb(0xd2)+_0x386037+'\x20--app\x20'+_0x2e0c0b+'\x20--appcode\x20<code>`.':_0x8c72bb(0xd3)+_0x528cca[_0x8c72bb(0xad)](',\x20');throw CliErrors[_0x8c72bb(0xcc)](_0x8c72bb(0x9a)+_0x2e0c0b+_0x8c72bb(0xa1),_0x4c9ffa);}assertValidAppcode(String(_0x555f0d));const _0x5b7e9c={..._0x174d52,..._0x3fcf74,'appcode':String(_0x555f0d),...collectWorkspaceProfileOverrides(_0x144657)};return _0x1109d8[_0x2e0c0b]=_0x5b7e9c,_0xf40023[_0x8c72bb(0xaa)]=_0x1109d8,_0xf40023[_0x8c72bb(0x9e)]=_0x2e0c0b,delete _0xf40023['appcode'],delete _0xf40023[_0x8c72bb(0xb6)],_0x5b7e9c[_0x8c72bb(0xc0)]&&(_0xf40023['env']=_0x5b7e9c['env']),writeConfigFile(_0x597cea,_0xf40023),{'ok':!![],'message':_0x8c72bb(0xbb)+(_0x386037===_0x8c72bb(0x98)?_0x8c72bb(0xa4):'updated')+':\x20'+_0x2e0c0b+_0x8c72bb(0x9f)+_0x5b7e9c[_0x8c72bb(0xc4)]+_0x8c72bb(0xb2)+_0x597cea+_0x8c72bb(0xd4),'data':{'operation':_0x8c72bb(0x9d)+_0x386037,'configPath':_0x597cea,'app':_0x2e0c0b,'appcode':_0x5b7e9c[_0x8c72bb(0xc4)],'env':_0x5b7e9c[_0x8c72bb(0xc0)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':a205_0x1bab41(0x97),'command':a205_0x1bab41(0x98),'description':a205_0x1bab41(0xc7),'risk':a205_0x1bab41(0xb4),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0xb11bbe=>configureWorkspace(_0xb11bbe,'init')},workspaceUseDefinition={'service':a205_0x1bab41(0x97),'command':'use','description':a205_0x1bab41(0xce),'risk':a205_0x1bab41(0xb4),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x1e0c6e=>configureWorkspace(_0x1e0c6e,a205_0x1bab41(0xb9))};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
@@ -1 +1 @@
1
- function a205_0x14c3(_0x4fe4d0,_0xb87cf2){_0x4fe4d0=_0x4fe4d0-0xd8;const _0x6f5a90=a205_0x6f5a();let _0x14c398=_0x6f5a90[_0x4fe4d0];return _0x14c398;}const a205_0x2b78cb=a205_0x14c3;(function(_0x30bfdc,_0x4ca3e4){const _0x227445=a205_0x14c3,_0x27625f=_0x30bfdc();while(!![]){try{const _0x4b4916=parseInt(_0x227445(0xe3))/0x1*(-parseInt(_0x227445(0xdf))/0x2)+-parseInt(_0x227445(0xdc))/0x3+parseInt(_0x227445(0xe5))/0x4+-parseInt(_0x227445(0xd8))/0x5*(parseInt(_0x227445(0xde))/0x6)+parseInt(_0x227445(0xd9))/0x7+parseInt(_0x227445(0xe1))/0x8+parseInt(_0x227445(0xe0))/0x9;if(_0x4b4916===_0x4ca3e4)break;else _0x27625f['push'](_0x27625f['shift']());}catch(_0x21dff5){_0x27625f['push'](_0x27625f['shift']());}}}(a205_0x6f5a,0x5c1fd));import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';function a205_0x6f5a(){const _0x2c0cd8=['2507576iQbCCg','659535xClKOx','3359986caUwyA','App\x20profile\x20name\x20to\x20remove','remove','465531ZjgYaJ','name','18KKDAgC','6044AplPay','674667UXqiPk','3797488HzvhcO','workspace\x20remove','241QvqYTp','Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)'];a205_0x6f5a=function(){return _0x2c0cd8;};return a205_0x6f5a();}export const workspaceRemoveDefinition={'service':'workspace','command':a205_0x2b78cb(0xdb),'description':a205_0x2b78cb(0xe4),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a205_0x2b78cb(0xdd),'description':a205_0x2b78cb(0xda),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x4817c8=>validateAppName(_0x4817c8,a205_0x2b78cb(0xe2)),'execute':_0x8e61dd=>runAppRemove(_0x8e61dd,a205_0x2b78cb(0xe2))};
1
+ const a206_0x14c215=a206_0x4f70;(function(_0x356074,_0x359db9){const _0xaf48ca=a206_0x4f70,_0x58ddcd=_0x356074();while(!![]){try{const _0x587290=-parseInt(_0xaf48ca(0x10d))/0x1*(parseInt(_0xaf48ca(0x110))/0x2)+parseInt(_0xaf48ca(0x113))/0x3+-parseInt(_0xaf48ca(0x10b))/0x4+parseInt(_0xaf48ca(0x116))/0x5+parseInt(_0xaf48ca(0x10a))/0x6*(parseInt(_0xaf48ca(0x111))/0x7)+-parseInt(_0xaf48ca(0x109))/0x8+-parseInt(_0xaf48ca(0x115))/0x9;if(_0x587290===_0x359db9)break;else _0x58ddcd['push'](_0x58ddcd['shift']());}catch(_0x23d74e){_0x58ddcd['push'](_0x58ddcd['shift']());}}}(a206_0x2eaf,0xc16c7));import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';function a206_0x4f70(_0x3025cb,_0x455828){_0x3025cb=_0x3025cb-0x109;const _0x2eaf22=a206_0x2eaf();let _0x4f70f3=_0x2eaf22[_0x3025cb];return _0x4f70f3;}function a206_0x2eaf(){const _0x2abdf8=['remove','25115gJmGIr','Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','App\x20profile\x20name\x20to\x20remove','22ZKyJcO','7qxYrDJ','name','3232782nGGZMj','workspace','2522079JsiSow','1939980krDNWQ','5328416FuYCgI','3512304yJbqKG','144652dnZLgI'];a206_0x2eaf=function(){return _0x2abdf8;};return a206_0x2eaf();}export const workspaceRemoveDefinition={'service':a206_0x14c215(0x114),'command':a206_0x14c215(0x10c),'description':a206_0x14c215(0x10e),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a206_0x14c215(0x112),'description':a206_0x14c215(0x10f),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x386fb2=>validateAppName(_0x386fb2,'workspace\x20remove'),'execute':_0x4f5639=>runAppRemove(_0x4f5639,'workspace\x20remove')};