@lovrabet/rabetbase-cli 2.5.12 → 2.5.13

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 (380) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/detail.js +1 -1
  26. package/lib/commands/app/index.js +1 -1
  27. package/lib/commands/app/list.js +1 -1
  28. package/lib/commands/app/members-list.js +1 -1
  29. package/lib/commands/app/remote-directory.js +1 -1
  30. package/lib/commands/app/shared.js +1 -1
  31. package/lib/commands/app-config/delete.js +1 -1
  32. package/lib/commands/app-config/get.js +1 -1
  33. package/lib/commands/app-config/index.js +1 -1
  34. package/lib/commands/app-config/list.js +1 -1
  35. package/lib/commands/app-config/set.js +1 -1
  36. package/lib/commands/app-config/shared.js +1 -1
  37. package/lib/commands/auth/index.js +1 -1
  38. package/lib/commands/bff/create.js +1 -1
  39. package/lib/commands/bff/delete.js +1 -1
  40. package/lib/commands/bff/detail.js +1 -1
  41. package/lib/commands/bff/index.js +1 -1
  42. package/lib/commands/bff/list.js +1 -1
  43. package/lib/commands/bff/logs.js +1 -1
  44. package/lib/commands/bff/pull.js +1 -1
  45. package/lib/commands/bff/push.js +1 -1
  46. package/lib/commands/bff/status.js +1 -1
  47. package/lib/commands/cli-skill/index.js +1 -1
  48. package/lib/commands/cli-update.js +1 -1
  49. package/lib/commands/codegen/index.js +1 -1
  50. package/lib/commands/codegen/sdk.js +1 -1
  51. package/lib/commands/codegen/sql.js +1 -1
  52. package/lib/commands/common/app-registry.js +1 -1
  53. package/lib/commands/common/app-selector.js +1 -1
  54. package/lib/commands/common/async-task.js +1 -1
  55. package/lib/commands/common/dry-run.js +1 -1
  56. package/lib/commands/common/flags.js +1 -1
  57. package/lib/commands/common/local-file.js +1 -1
  58. package/lib/commands/common/validate.js +1 -1
  59. package/lib/commands/config/delete.js +1 -1
  60. package/lib/commands/config/get.js +1 -1
  61. package/lib/commands/config/index.js +1 -1
  62. package/lib/commands/config/init.js +1 -1
  63. package/lib/commands/config/list.js +1 -1
  64. package/lib/commands/config/set.js +1 -1
  65. package/lib/commands/config/shared.js +1 -1
  66. package/lib/commands/dataset/batch-design.js +1 -1
  67. package/lib/commands/dataset/business-group-update.js +1 -1
  68. package/lib/commands/dataset/business-groups.js +1 -1
  69. package/lib/commands/dataset/capability.js +1 -1
  70. package/lib/commands/dataset/cross-relation-create.js +1 -1
  71. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  72. package/lib/commands/dataset/cross-relation-list.js +1 -1
  73. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  74. package/lib/commands/dataset/cross-relation-update.js +1 -1
  75. package/lib/commands/dataset/delete.js +1 -1
  76. package/lib/commands/dataset/design-context.js +1 -1
  77. package/lib/commands/dataset/design-start.js +1 -1
  78. package/lib/commands/dataset/design-status.js +1 -1
  79. package/lib/commands/dataset/design-sync-retry.js +1 -1
  80. package/lib/commands/dataset/design-sync-status.js +1 -1
  81. package/lib/commands/dataset/design-validate.js +1 -1
  82. package/lib/commands/dataset/detail.js +1 -1
  83. package/lib/commands/dataset/extend-update.js +1 -1
  84. package/lib/commands/dataset/field-restore.js +1 -1
  85. package/lib/commands/dataset/field-update.js +1 -1
  86. package/lib/commands/dataset/generate.js +1 -1
  87. package/lib/commands/dataset/index.js +1 -1
  88. package/lib/commands/dataset/list.js +1 -1
  89. package/lib/commands/dataset/operations.js +1 -1
  90. package/lib/commands/dataset/relation-audit.js +1 -1
  91. package/lib/commands/dataset/relation-create.js +1 -1
  92. package/lib/commands/dataset/relation-delete.js +1 -1
  93. package/lib/commands/dataset/relation-shared.js +1 -1
  94. package/lib/commands/dataset/relation-update.js +1 -1
  95. package/lib/commands/dataset/relations.js +1 -1
  96. package/lib/commands/dataset/rename.js +1 -1
  97. package/lib/commands/dataset/restore.js +1 -1
  98. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  99. package/lib/commands/db/analysis-batching.js +1 -1
  100. package/lib/commands/db/analyze-batch-plan.js +1 -1
  101. package/lib/commands/db/analyze-cancel.js +1 -1
  102. package/lib/commands/db/analyze-start.js +1 -1
  103. package/lib/commands/db/analyze-status.js +1 -1
  104. package/lib/commands/db/create.js +1 -1
  105. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  106. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  107. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  109. package/lib/commands/db/delete.js +1 -1
  110. package/lib/commands/db/detail.js +1 -1
  111. package/lib/commands/db/diff-refresh-start.js +1 -1
  112. package/lib/commands/db/diff-refresh-status.js +1 -1
  113. package/lib/commands/db/diff.js +1 -1
  114. package/lib/commands/db/index.js +1 -1
  115. package/lib/commands/db/list.js +1 -1
  116. package/lib/commands/db/shared.js +1 -1
  117. package/lib/commands/db/table-diff-shared.js +1 -1
  118. package/lib/commands/db/tables.js +1 -1
  119. package/lib/commands/db/test.js +1 -1
  120. package/lib/commands/db/update.js +1 -1
  121. package/lib/commands/deployment/index.js +1 -1
  122. package/lib/commands/deployment/sync-all.js +1 -1
  123. package/lib/commands/deployment/sync-jobs.js +1 -1
  124. package/lib/commands/deployment/sync-status.js +1 -1
  125. package/lib/commands/doctor.js +1 -1
  126. package/lib/commands/file/index.js +1 -1
  127. package/lib/commands/flow/create.js +1 -1
  128. package/lib/commands/flow/detail.js +1 -1
  129. package/lib/commands/flow/index.js +1 -1
  130. package/lib/commands/flow/list.js +1 -1
  131. package/lib/commands/flow/page-list.js +1 -1
  132. package/lib/commands/flow/publish.js +1 -1
  133. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  134. package/lib/commands/flow/runtime-role-list.js +1 -1
  135. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  136. package/lib/commands/flow/runtime-user-search.js +1 -1
  137. package/lib/commands/flow/shared.js +1 -1
  138. package/lib/commands/flow/update.js +1 -1
  139. package/lib/commands/flow/validate.js +1 -1
  140. package/lib/commands/instant-api-policy/current.js +1 -1
  141. package/lib/commands/instant-api-policy/index.js +1 -1
  142. package/lib/commands/instant-api-policy/init.js +1 -1
  143. package/lib/commands/instant-api-policy/publish.js +1 -1
  144. package/lib/commands/instant-api-policy/pull.js +1 -1
  145. package/lib/commands/instant-api-policy/revision.js +1 -1
  146. package/lib/commands/instant-api-policy/revisions.js +1 -1
  147. package/lib/commands/instant-api-policy/rollback.js +1 -1
  148. package/lib/commands/instant-api-policy/shared.js +1 -1
  149. package/lib/commands/instant-api-policy/validate.js +1 -1
  150. package/lib/commands/issue/context.js +1 -1
  151. package/lib/commands/issue/index.js +1 -1
  152. package/lib/commands/issue/nudge.js +1 -1
  153. package/lib/commands/issue/report.js +1 -1
  154. package/lib/commands/kb/create.js +1 -1
  155. package/lib/commands/kb/delete.js +1 -1
  156. package/lib/commands/kb/detail.js +1 -1
  157. package/lib/commands/kb/index.js +1 -1
  158. package/lib/commands/kb/list.js +1 -1
  159. package/lib/commands/kb/search.js +1 -1
  160. package/lib/commands/kb/shared.js +1 -1
  161. package/lib/commands/kb/update.js +1 -1
  162. package/lib/commands/logs/index.js +1 -1
  163. package/lib/commands/menu/asset-update.js +1 -1
  164. package/lib/commands/menu/delete.js +1 -1
  165. package/lib/commands/menu/external-link-create.js +1 -1
  166. package/lib/commands/menu/external-link-update.js +1 -1
  167. package/lib/commands/menu/group-create.js +1 -1
  168. package/lib/commands/menu/group-update.js +1 -1
  169. package/lib/commands/menu/index.js +1 -1
  170. package/lib/commands/menu/list.js +1 -1
  171. package/lib/commands/menu/move.js +1 -1
  172. package/lib/commands/menu/regroup-start.js +1 -1
  173. package/lib/commands/menu/rename.js +1 -1
  174. package/lib/commands/menu/shared/compare-table.js +1 -1
  175. package/lib/commands/menu/shared/delete-plan.js +1 -1
  176. package/lib/commands/menu/shared/facts.js +1 -1
  177. package/lib/commands/menu/shared/index.js +1 -1
  178. package/lib/commands/menu/shared/inquirer.js +1 -1
  179. package/lib/commands/menu/shared/local-pages.js +1 -1
  180. package/lib/commands/menu/shared/logic.js +1 -1
  181. package/lib/commands/menu/shared/mutations.js +1 -1
  182. package/lib/commands/menu/shared/path.js +1 -1
  183. package/lib/commands/menu/shared/service.js +1 -1
  184. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  185. package/lib/commands/menu/shared/sync-core.js +1 -1
  186. package/lib/commands/menu/shared/update-core.js +1 -1
  187. package/lib/commands/menu/shared/valid-url.js +1 -1
  188. package/lib/commands/menu/subapp-assets-status.js +1 -1
  189. package/lib/commands/menu/subapp-assets-update.js +1 -1
  190. package/lib/commands/menu/sync.js +1 -1
  191. package/lib/commands/menu/visibility-update.js +1 -1
  192. package/lib/commands/notification/config-create.js +1 -1
  193. package/lib/commands/notification/config-delete.js +1 -1
  194. package/lib/commands/notification/config-list.js +1 -1
  195. package/lib/commands/notification/config-update.js +1 -1
  196. package/lib/commands/notification/index.js +1 -1
  197. package/lib/commands/notification/shared.js +1 -1
  198. package/lib/commands/ocr/index.js +1 -1
  199. package/lib/commands/page/create.js +1 -1
  200. package/lib/commands/page/custom/detail.js +1 -1
  201. package/lib/commands/page/custom/list.js +1 -1
  202. package/lib/commands/page/custom/publish.js +1 -1
  203. package/lib/commands/page/custom/shared.js +1 -1
  204. package/lib/commands/page/custom/syntax.js +1 -1
  205. package/lib/commands/page/custom/update.js +1 -1
  206. package/lib/commands/page/data-list-status.js +1 -1
  207. package/lib/commands/page/generate-start.js +1 -1
  208. package/lib/commands/page/generate-status.js +1 -1
  209. package/lib/commands/page/index.js +1 -1
  210. package/lib/commands/page/pull.js +1 -1
  211. package/lib/commands/page/push.js +1 -1
  212. package/lib/commands/page/relation-audit.js +1 -1
  213. package/lib/commands/page/restore.js +1 -1
  214. package/lib/commands/page/shared.js +1 -1
  215. package/lib/commands/page/sync.js +1 -1
  216. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  217. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  218. package/lib/commands/project/create/format-elapsed.js +1 -1
  219. package/lib/commands/project/create/main.js +1 -1
  220. package/lib/commands/project/create/materialize-project-template.js +1 -1
  221. package/lib/commands/project/create/project-name.js +1 -1
  222. package/lib/commands/project/create/project-template-archive.js +1 -1
  223. package/lib/commands/project/create/project-template-path.js +1 -1
  224. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  225. package/lib/commands/project/create/use-format-code.js +1 -1
  226. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  227. package/lib/commands/project/domain-routing-sync.js +1 -1
  228. package/lib/commands/project/index.js +1 -1
  229. package/lib/commands/project/upgrade.js +1 -1
  230. package/lib/commands/registry.js +1 -1
  231. package/lib/commands/role/delete.js +1 -1
  232. package/lib/commands/role/detail.js +1 -1
  233. package/lib/commands/role/index.js +1 -1
  234. package/lib/commands/role/list.js +1 -1
  235. package/lib/commands/role/shared.js +1 -1
  236. package/lib/commands/role/update.js +1 -1
  237. package/lib/commands/role/user-add.js +1 -1
  238. package/lib/commands/role/user-remove.js +1 -1
  239. package/lib/commands/role/user-resolve.js +1 -1
  240. package/lib/commands/rule/get.js +1 -1
  241. package/lib/commands/rule/index.js +1 -1
  242. package/lib/commands/rule/list.js +1 -1
  243. package/lib/commands/rule/set.js +1 -1
  244. package/lib/commands/rule/shared.js +1 -1
  245. package/lib/commands/run/index.js +1 -1
  246. package/lib/commands/schema.js +1 -1
  247. package/lib/commands/sql/create.js +1 -1
  248. package/lib/commands/sql/delete.js +1 -1
  249. package/lib/commands/sql/detail.js +1 -1
  250. package/lib/commands/sql/exec.js +1 -1
  251. package/lib/commands/sql/index.js +1 -1
  252. package/lib/commands/sql/list.js +1 -1
  253. package/lib/commands/sql/pull.js +1 -1
  254. package/lib/commands/sql/push.js +1 -1
  255. package/lib/commands/sql/shared.js +1 -1
  256. package/lib/commands/sql/status.js +1 -1
  257. package/lib/commands/sql/validate.js +1 -1
  258. package/lib/commands/task/index.js +1 -1
  259. package/lib/commands/task/status.js +1 -1
  260. package/lib/commands/tenant/index.js +1 -1
  261. package/lib/commands/tenant/members-list.js +1 -1
  262. package/lib/commands/tenant/shared.js +1 -1
  263. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  264. package/lib/commands/user-account/feishu-bind.js +1 -1
  265. package/lib/commands/user-account/index.js +1 -1
  266. package/lib/commands/workspace/add.js +1 -1
  267. package/lib/commands/workspace/index.js +1 -1
  268. package/lib/commands/workspace/remove.js +1 -1
  269. package/lib/config/domain-config.js +1 -1
  270. package/lib/config/project-domain-routing.js +1 -1
  271. package/lib/config/region-config.js +1 -1
  272. package/lib/config/schema.js +1 -1
  273. package/lib/constant/cdn.js +1 -1
  274. package/lib/constant/cli.js +1 -1
  275. package/lib/constant/defaults.js +1 -1
  276. package/lib/constant/domain.js +1 -1
  277. package/lib/constant/env.js +1 -1
  278. package/lib/constant/output.js +1 -1
  279. package/lib/constant/paths.js +1 -1
  280. package/lib/constant/region.js +1 -1
  281. package/lib/constant/risk.js +1 -1
  282. package/lib/constant/routing-profile.js +1 -1
  283. package/lib/context/app-resolver.js +1 -1
  284. package/lib/context/auth-resolver.js +1 -1
  285. package/lib/context/config-loader.js +1 -1
  286. package/lib/context.js +1 -1
  287. package/lib/core/alias-resolver.js +1 -1
  288. package/lib/core/api-client.js +1 -1
  289. package/lib/core/bff/config.js +1 -1
  290. package/lib/core/bff/file-system.js +1 -1
  291. package/lib/core/bff/hash.js +1 -1
  292. package/lib/core/bff/hook-directory.js +1 -1
  293. package/lib/core/bff/lock.js +1 -1
  294. package/lib/core/bff/utils.js +1 -1
  295. package/lib/core/cross-db-analysis.js +1 -1
  296. package/lib/core/cross-db-relation.js +1 -1
  297. package/lib/core/db-resolver.js +1 -1
  298. package/lib/core/flow-config.js +1 -1
  299. package/lib/core/instant-api-policy/config.js +1 -1
  300. package/lib/core/instant-api-policy/endpoints.js +1 -1
  301. package/lib/core/kb-management-client.js +1 -1
  302. package/lib/core/kb-search-client.js +1 -1
  303. package/lib/core/page/file-system.js +1 -1
  304. package/lib/core/page/hash.js +1 -1
  305. package/lib/core/page/lock.js +1 -1
  306. package/lib/core/page/lr-smart-jsx.js +1 -1
  307. package/lib/core/sql-index-auditor.js +1 -1
  308. package/lib/core/sql-sync/config.js +1 -1
  309. package/lib/core/sql-sync/file-system.js +1 -1
  310. package/lib/core/sql-sync/hash.js +1 -1
  311. package/lib/core/sql-sync/lock.js +1 -1
  312. package/lib/core/sql-sync/utils.js +1 -1
  313. package/lib/core/sql-validator.js +1 -1
  314. package/lib/errors.js +1 -1
  315. package/lib/framework/build-all-flags.js +1 -1
  316. package/lib/framework/error-output.js +1 -1
  317. package/lib/framework/explicit-yes.js +1 -1
  318. package/lib/framework/flags.js +1 -1
  319. package/lib/framework/help.js +1 -1
  320. package/lib/framework/index.js +1 -1
  321. package/lib/framework/output.js +1 -1
  322. package/lib/framework/response.js +1 -1
  323. package/lib/framework/runner-alias.js +1 -1
  324. package/lib/framework/runner.js +1 -1
  325. package/lib/framework/schema-export.js +1 -1
  326. package/lib/framework/supported-flags.js +1 -1
  327. package/lib/framework/types.js +1 -1
  328. package/lib/generated/build-info.d.ts +4 -4
  329. package/lib/generated/build-info.js +1 -1
  330. package/lib/generated/official-routing.js +1 -1
  331. package/lib/generated/routing-contract.js +1 -1
  332. package/lib/help.js +1 -1
  333. package/lib/postinstall.js +1 -1
  334. package/lib/runtime/confirmation.js +1 -1
  335. package/lib/runtime/event.js +1 -1
  336. package/lib/runtime/index.js +1 -1
  337. package/lib/runtime/queue.js +1 -1
  338. package/lib/runtime/resolve.js +1 -1
  339. package/lib/services/dataset-design/checkpoint.js +1 -1
  340. package/lib/services/dataset-design/commands.js +1 -1
  341. package/lib/services/dataset-design/contract.js +1 -1
  342. package/lib/skills/builtin-skill.js +1 -1
  343. package/lib/skills/main.js +1 -1
  344. package/lib/skills/npx-skills-add.js +1 -1
  345. package/lib/skills/skill-presence.js +1 -1
  346. package/lib/telemetry/cli-command-trace.js +1 -1
  347. package/lib/telemetry/cli-help-trace.js +1 -1
  348. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  349. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  350. package/lib/telemetry/send-cli-trace-log.js +1 -1
  351. package/lib/utils/ai_config.js +1 -1
  352. package/lib/utils/apply-jq-filter.js +1 -1
  353. package/lib/utils/cdn-config.js +1 -1
  354. package/lib/utils/check-sdk-version.js +1 -1
  355. package/lib/utils/cli-version-check.js +1 -1
  356. package/lib/utils/cli-version-policy.js +1 -1
  357. package/lib/utils/config.js +1 -1
  358. package/lib/utils/entity-with-id.js +1 -1
  359. package/lib/utils/file-utils.js +1 -1
  360. package/lib/utils/guides-cdn.js +1 -1
  361. package/lib/utils/http-client.js +1 -1
  362. package/lib/utils/is-non-interactive.js +1 -1
  363. package/lib/utils/logger.js +1 -1
  364. package/lib/utils/params.js +1 -1
  365. package/lib/utils/platform.js +1 -1
  366. package/lib/utils/sleep.js +1 -1
  367. package/lib/utils/template-replacer.js +1 -1
  368. package/lib/utils/update-notice.js +1 -1
  369. package/lib/utils/version.js +1 -1
  370. package/lib/utils/with-active-cookie.js +1 -1
  371. package/lib/utils/write-cli-side-channel.js +1 -1
  372. package/package.json +1 -1
  373. package/skills/rabetbase/SKILL.md +1 -1
  374. package/skills/rabetbase/guides/custom-page-workflow.md +32 -2
  375. package/skills/rabetbase/knowledge/custom-page/generation-standards.md +106 -6
  376. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  377. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  378. package/skills/rabetbase.manifest.json +3 -3
  379. package/templates/custom-pages/blank.json +1 -1
  380. package/templates/custom-pages/dashboard.json +1 -1
@@ -1 +1 @@
1
- const a242_0x2ba4ea=a242_0x18e6;function a242_0x24fa(){const _0x2d49cb=['2DEOsoU','125112CzirXP','2334876aOdOrf','2465460ZRrTkB','map','list','1580910LokZhs','rule','all','length','read','appCode','932251jBztaO','1913232LGlocr','182lOKzbK','Loaded\x20app\x20rule\x20configuration\x20for\x20','2224260iCZlmo'];a242_0x24fa=function(){return _0x2d49cb;};return a242_0x24fa();}(function(_0x42108c,_0x435cd7){const _0x46edb8=a242_0x18e6,_0x5eb383=_0x42108c();while(!![]){try{const _0x5ae0ae=-parseInt(_0x46edb8(0x181))/0x1*(-parseInt(_0x46edb8(0x186))/0x2)+-parseInt(_0x46edb8(0x188))/0x3+parseInt(_0x46edb8(0x189))/0x4+parseInt(_0x46edb8(0x18c))/0x5+parseInt(_0x46edb8(0x182))/0x6+parseInt(_0x46edb8(0x183))/0x7*(-parseInt(_0x46edb8(0x187))/0x8)+-parseInt(_0x46edb8(0x185))/0x9;if(_0x5ae0ae===_0x435cd7)break;else _0x5eb383['push'](_0x5eb383['shift']());}catch(_0x21d0fd){_0x5eb383['push'](_0x5eb383['shift']());}}}(a242_0x24fa,0xb7808));import{getAppRule}from'../../core/api-client.js';function a242_0x18e6(_0x2962fe,_0x14a0d9){_0x2962fe=_0x2962fe-0x181;const _0x24fa1d=a242_0x24fa();let _0x18e673=_0x24fa1d[_0x2962fe];return _0x18e673;}import{APP_RULE_TYPES,projectAppRule}from'../../commands/rule/shared.js';export const ruleList={'service':a242_0x2ba4ea(0x18d),'command':a242_0x2ba4ea(0x18b),'description':'List\x20agent\x20context\x20rules\x20for\x20the\x20resolved\x20app','risk':a242_0x2ba4ea(0x190),'requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x348cca){const _0x1702d0=a242_0x2ba4ea,_0x478a15=await Promise[_0x1702d0(0x18e)](APP_RULE_TYPES['map'](_0x672516=>getAppRule(_0x348cca['cookie'],{'appCode':_0x348cca[_0x1702d0(0x191)],'type':_0x672516}))),_0x50736f=APP_RULE_TYPES[_0x1702d0(0x18a)]((_0x13a2d7,_0x390e0e)=>projectAppRule(_0x13a2d7,_0x478a15[_0x390e0e]??null));return{'ok':!![],'data':{'total':_0x50736f[_0x1702d0(0x18f)],'rules':_0x50736f},'message':_0x1702d0(0x184)+_0x348cca['appCode']};}};
1
+ const a242_0x88f392=a242_0x4f84;(function(_0x2f09b7,_0xd05d9e){const _0x29bb5a=a242_0x4f84,_0x189567=_0x2f09b7();while(!![]){try{const _0x167138=parseInt(_0x29bb5a(0x176))/0x1+parseInt(_0x29bb5a(0x171))/0x2+parseInt(_0x29bb5a(0x179))/0x3+-parseInt(_0x29bb5a(0x16f))/0x4+parseInt(_0x29bb5a(0x177))/0x5*(-parseInt(_0x29bb5a(0x17a))/0x6)+parseInt(_0x29bb5a(0x172))/0x7*(-parseInt(_0x29bb5a(0x173))/0x8)+parseInt(_0x29bb5a(0x17b))/0x9*(parseInt(_0x29bb5a(0x174))/0xa);if(_0x167138===_0xd05d9e)break;else _0x189567['push'](_0x189567['shift']());}catch(_0x5b1a50){_0x189567['push'](_0x189567['shift']());}}}(a242_0x8634,0x3b48e));function a242_0x4f84(_0x49aa89,_0x443b6b){_0x49aa89=_0x49aa89-0x16e;const _0x86343=a242_0x8634();let _0x4f84a1=_0x86343[_0x49aa89];return _0x4f84a1;}import{getAppRule}from'../../core/api-client.js';import{APP_RULE_TYPES,projectAppRule}from'../../commands/rule/shared.js';export const ruleList={'service':'rule','command':a242_0x88f392(0x175),'description':a242_0x88f392(0x16e),'risk':'read','requiresAppCode':!![],'structuredErrors':!![],'flags':[],async 'execute'(_0x4a578f){const _0x51b8a7=a242_0x88f392,_0x3b0e32=await Promise['all'](APP_RULE_TYPES[_0x51b8a7(0x178)](_0xebc869=>getAppRule(_0x4a578f[_0x51b8a7(0x17c)],{'appCode':_0x4a578f[_0x51b8a7(0x17e)],'type':_0xebc869}))),_0x2a598b=APP_RULE_TYPES[_0x51b8a7(0x178)]((_0x3406c2,_0x521fac)=>projectAppRule(_0x3406c2,_0x3b0e32[_0x521fac]??null));return{'ok':!![],'data':{'total':_0x2a598b[_0x51b8a7(0x17d)],'rules':_0x2a598b},'message':_0x51b8a7(0x170)+_0x4a578f['appCode']};}};function a242_0x8634(){const _0x3ed61c=['46382pEYNvh','24dzTZmO','650150nepswg','list','340654lcTxWC','7915qSXYCM','map','79866yopCHt','36ekqVet','9faQYzp','cookie','length','appCode','List\x20agent\x20context\x20rules\x20for\x20the\x20resolved\x20app','1050740GvoSuW','Loaded\x20app\x20rule\x20configuration\x20for\x20','205200KiwiJL'];a242_0x8634=function(){return _0x3ed61c;};return a242_0x8634();}
@@ -1 +1 @@
1
- const a243_0x106366=a243_0x4652;function a243_0x13bb(){const _0x33eaa4=['424450WlewAb','DATABASE','1531392ZDFklG','Set\x20','isSafeInteger','\x20does\x20not\x20prove\x20the\x20requested\x20set\x20state.','appCode','Pass\x20a\x20UTF-8\x20Markdown\x20file.','set','version','update','270HhcEXP','create','rules','expectedVersion','--file\x20is\x20required.','app_rule_version_mismatch','cookie','input','297493ZGKXmN','app_rule_expected_version_invalid','content','planned','\x20for\x20','rule','trim','144YJFNXl','unconfigured','RULES\x20content\x20exceeds\x202000\x20UTF-16\x20units.','164175biTZOG',';\x20current\x20version\x20is\x20','defineProperty','751293eWROHR','The\x20set\x20request\x20was\x20sent,\x20but\x20','before','file','2984448YHbeIa','app_rule_verification_unavailable','UTF-8\x20Markdown\x20file\x20(RULES:\x202000\x20UTF-16\x20units;\x20DATABASE:\x205242880\x20units)','str','number','\x20--format\x20compress','Expected\x20','app_rule_set_outcome_unknown','replacement','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','contentHash','cause','length','5dZJnpt','beforeRecord','POST','\x20could\x20not\x20be\x20verified.','write','rabetbase\x20rule\x20get\x20--type\x20','expected-version','push','type','verified','1437024AGERYO'];a243_0x13bb=function(){return _0x33eaa4;};return a243_0x13bb();}(function(_0x1f2a83,_0x4eae5b){const _0x3cd4c1=a243_0x4652,_0x260f7b=_0x1f2a83();while(!![]){try{const _0x2bc982=-parseInt(_0x3cd4c1(0xfd))/0x1+-parseInt(_0x3cd4c1(0xc3))/0x2+parseInt(_0x3cd4c1(0xde))/0x3+parseInt(_0x3cd4c1(0xe5))/0x4+parseInt(_0x3cd4c1(0xf2))/0x5*(-parseInt(_0x3cd4c1(0xfc))/0x6)+parseInt(_0x3cd4c1(0xd4))/0x7*(-parseInt(_0x3cd4c1(0xdb))/0x8)+-parseInt(_0x3cd4c1(0xe1))/0x9*(-parseInt(_0x3cd4c1(0xcc))/0xa);if(_0x2bc982===_0x4eae5b)break;else _0x260f7b['push'](_0x260f7b['shift']());}catch(_0x4ca133){_0x260f7b['push'](_0x260f7b['shift']());}}}(a243_0x13bb,0xd1fb4));import{knowledgeDocumentsPath}from'../../core/api-client.js';import{getAppRule,isPlatformTransportFailure,saveAppRule}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a243_0x4652(_0x43982c,_0x1f006a){_0x43982c=_0x43982c-0xc3;const _0x13bbbd=a243_0x13bb();let _0x4652cd=_0x13bbbd[_0x43982c];return _0x4652cd;}import{APP_RULE_TYPE_FLAG,appRuleContextScope,appRuleError,appRuleFileName,inspectAppRuleContent,projectAppRule,readAppRuleFile,readAppRuleType}from'../../commands/rule/shared.js';function readSetInput(_0xc1fe2a){const _0x4e7e8a=a243_0x4652,_0x280ce6=readAppRuleType(_0xc1fe2a),_0x2a7cc2=_0xc1fe2a[_0x4e7e8a(0xe8)](_0x4e7e8a(0xe4))[_0x4e7e8a(0xda)]();if(!_0x2a7cc2)throw appRuleError('app_rule_file_required',_0x4e7e8a(0xd0),_0x4e7e8a(0xc8));const _0x516761=_0xc1fe2a['flag'](_0x4e7e8a(0xf8));let _0x49566d;if(_0x516761!==undefined){_0x49566d=Number(_0x516761);if(!Number[_0x4e7e8a(0xc5)](_0x49566d)||_0x49566d<0x0)throw appRuleError(_0x4e7e8a(0xd5),_0x4e7e8a(0xee));}return{'type':_0x280ce6,'file':_0x2a7cc2,'expectedVersion':_0x49566d};}async function prepareSet(_0x3b03d0){const _0x20070c=a243_0x4652,_0x4caa9d=readSetInput(_0x3b03d0),_0x2cb035=await readAppRuleFile(_0x4caa9d['file']);if(_0x4caa9d[_0x20070c(0xfa)]==='rules'&&_0x2cb035['content'][_0x20070c(0xf1)]>0x7d0)throw appRuleError('app_rule_content_too_large',_0x20070c(0xdd));const _0x1ab456=await getAppRule(_0x3b03d0['cookie'],{'appCode':_0x3b03d0['appCode'],'type':_0x4caa9d[_0x20070c(0xfa)]});if(_0x4caa9d[_0x20070c(0xcf)]!==undefined&&(_0x1ab456?.[_0x20070c(0xca)]??0x0)!==_0x4caa9d['expectedVersion'])throw appRuleError(_0x20070c(0xd1),appRuleFileName(_0x4caa9d[_0x20070c(0xfa)])+'\x20version\x20changed\x20before\x20write.',_0x20070c(0xeb)+_0x4caa9d[_0x20070c(0xcf)]+_0x20070c(0xdf)+(_0x1ab456?.[_0x20070c(0xca)]??_0x20070c(0xdc))+'.\x20Run\x20rule\x20get\x20and\x20review\x20before\x20retrying.');return{'input':_0x4caa9d,'replacement':_0x2cb035,'beforeRecord':_0x1ab456,'before':projectAppRule(_0x4caa9d[_0x20070c(0xfa)],_0x1ab456),'planned':{'type':_0x4caa9d[_0x20070c(0xfa)],'fileName':appRuleFileName(_0x4caa9d['type']),'contextScope':appRuleContextScope(_0x4caa9d[_0x20070c(0xfa)]),'enabled':!![],'appCode':_0x3b03d0['appCode'],'scope':_0x20070c(0xce),'contentByteSize':_0x2cb035['byteSize'],'contentHash':_0x2cb035['contentHash']}};}function warningsFor(_0x250eda){return[];}export const ruleSet={'service':a243_0x106366(0xd9),'command':a243_0x106366(0xc9),'description':'Set\x20an\x20agent\x20context\x20rule\x20from\x20a\x20UTF-8\x20Markdown\x20file','risk':a243_0x106366(0xf6),'requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG,{'name':'file','type':'string','required':!![],'description':a243_0x106366(0xe7)},{'name':'expected-version','type':a243_0x106366(0xe9),'required':![],'description':'Require\x20the\x20current\x20version\x20before\x20atomic\x20compare-and-set'}],async 'validate'(_0x4a147d){readSetInput(_0x4a147d);},async 'dryRun'(_0x1357a1){const _0x1480f3=a243_0x106366,_0xa18528=await prepareSet(_0x1357a1);return asDryRunResult({'operation':_0x1480f3(0xc9),'selector':{'appCode':_0x1357a1[_0x1480f3(0xc7)],'scope':_0x1480f3(0xce),'type':_0xa18528[_0x1480f3(0xd3)][_0x1480f3(0xfa)]},'before':_0xa18528[_0x1480f3(0xe3)],'after':_0xa18528[_0x1480f3(0xd7)],'dryRun':!![],'backend':{'method':'POST','path':knowledgeDocumentsPath(_0x1480f3(0xce),_0xa18528['beforeRecord']?_0x1480f3(0xcb):_0x1480f3(0xcd)),'body':{'appCode':_0x1357a1[_0x1480f3(0xc7)],..._0xa18528[_0x1480f3(0xf3)]?{'id':_0xa18528['beforeRecord']['id']}:{},'title':_0xa18528[_0x1480f3(0xd3)]['type']===_0x1480f3(0xce)?'RULES':_0x1480f3(0xfe),'contentHash':_0xa18528[_0x1480f3(0xed)][_0x1480f3(0xef)],'contentByteSize':_0xa18528[_0x1480f3(0xed)]['byteSize'],..._0xa18528[_0x1480f3(0xf3)]?{'expectedVersion':_0xa18528['beforeRecord'][_0x1480f3(0xca)]}:{}}},'warnings':warningsFor(_0xa18528[_0x1480f3(0xd3)][_0x1480f3(0xcf)]),'verification':{'expectedVersion':_0xa18528[_0x1480f3(0xf3)]?.[_0x1480f3(0xca)]??0x0,'atomicCompareAndSet':!![],'lookupCommand':_0x1480f3(0xf7)+_0xa18528['input']['type']+_0x1480f3(0xea)}},{'method':_0x1480f3(0xf4),'url':knowledgeDocumentsPath('rules',_0xa18528[_0x1480f3(0xf3)]?_0x1480f3(0xcb):_0x1480f3(0xcd))});},async 'execute'(_0x344cbd){const _0x2bcbd6=a243_0x106366,_0x51381c=await prepareSet(_0x344cbd),_0x78d873=_0x51381c['beforeRecord']===null?0x1:_0x51381c['beforeRecord'][_0x2bcbd6(0xca)]+(_0x51381c[_0x2bcbd6(0xf3)]['content']===_0x51381c['replacement'][_0x2bcbd6(0xd6)]?0x0:0x1);let _0x1e543f,_0x127573=![];try{_0x1e543f=await saveAppRule(_0x344cbd['cookie'],{'appCode':_0x344cbd[_0x2bcbd6(0xc7)],'type':_0x51381c[_0x2bcbd6(0xd3)][_0x2bcbd6(0xfa)],'content':_0x51381c[_0x2bcbd6(0xed)][_0x2bcbd6(0xd6)],'expectedVersion':_0x51381c[_0x2bcbd6(0xf3)]?.[_0x2bcbd6(0xca)]??0x0,..._0x51381c[_0x2bcbd6(0xf3)]?{'id':_0x51381c[_0x2bcbd6(0xf3)]['id']}:{}});if(_0x1e543f[_0x2bcbd6(0xca)]!==_0x78d873||_0x1e543f['content']!==_0x51381c[_0x2bcbd6(0xed)][_0x2bcbd6(0xd6)]||_0x51381c[_0x2bcbd6(0xf3)]!==null&&_0x1e543f['id']!==_0x51381c[_0x2bcbd6(0xf3)]['id'])throw appRuleError('app_rule_verification_failed','The\x20received\x20rule\x20state\x20contradicts\x20the\x20requested\x20changes.','Use\x20read-only\x20rule\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.');}catch(_0x4055db){if(!isPlatformTransportFailure(_0x4055db))throw _0x4055db;_0x127573=!![];}let _0x5ab953;try{_0x5ab953=await getAppRule(_0x344cbd[_0x2bcbd6(0xd2)],{'appCode':_0x344cbd[_0x2bcbd6(0xc7)],'type':_0x51381c[_0x2bcbd6(0xd3)]['type']});}catch(_0x4420d4){const _0x314ec0=appRuleError(_0x127573?_0x2bcbd6(0xec):_0x2bcbd6(0xe6),_0x2bcbd6(0xe2)+appRuleFileName(_0x51381c[_0x2bcbd6(0xd3)][_0x2bcbd6(0xfa)])+_0x2bcbd6(0xf5),'Do\x20not\x20resubmit\x20automatically.\x20Inspect\x20the\x20exact\x20rule\x20state\x20before\x20retrying.');Object[_0x2bcbd6(0xe0)](_0x314ec0,_0x2bcbd6(0xf0),{'value':_0x4420d4,'enumerable':![]});throw _0x314ec0;}const _0x2938e7=_0x5ab953&&inspectAppRuleContent(_0x5ab953['content'])[_0x2bcbd6(0xef)]===_0x51381c[_0x2bcbd6(0xed)][_0x2bcbd6(0xef)],_0x52547e=_0x5ab953&&_0x5ab953['version']===_0x78d873&&(!_0x1e543f||_0x5ab953['id']===_0x1e543f['id']&&_0x5ab953[_0x2bcbd6(0xca)]===_0x1e543f[_0x2bcbd6(0xca)]);if(!_0x5ab953||!_0x2938e7||!_0x52547e||_0x51381c[_0x2bcbd6(0xf3)]!==null&&_0x5ab953['id']!==_0x51381c['beforeRecord']['id'])throw appRuleError(_0x127573?_0x2bcbd6(0xec):'app_rule_verification_failed',appRuleFileName(_0x51381c[_0x2bcbd6(0xd3)][_0x2bcbd6(0xfa)])+_0x2bcbd6(0xc6),'Inspect\x20it\x20with\x20`rabetbase\x20rule\x20get\x20--type\x20'+_0x51381c[_0x2bcbd6(0xd3)][_0x2bcbd6(0xfa)]+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');const _0x367b81=warningsFor(_0x51381c[_0x2bcbd6(0xd3)]['expectedVersion']);_0x127573&&_0x367b81[_0x2bcbd6(0xf9)]('Set\x20response\x20was\x20unavailable;\x20verified\x20the\x20exact\x20content\x20readback\x20without\x20resubmitting.');const _0x4b3f30=projectAppRule(_0x51381c[_0x2bcbd6(0xd3)][_0x2bcbd6(0xfa)],_0x5ab953);return{'ok':!![],'data':{'operation':_0x2bcbd6(0xc9),'selector':{'appCode':_0x344cbd[_0x2bcbd6(0xc7)],'scope':_0x2bcbd6(0xce),'type':_0x51381c[_0x2bcbd6(0xd3)][_0x2bcbd6(0xfa)]},'before':_0x51381c['before'],'after':_0x4b3f30,'dryRun':![],'backend':{'method':_0x2bcbd6(0xf4),'path':knowledgeDocumentsPath(_0x2bcbd6(0xce),_0x51381c['beforeRecord']?_0x2bcbd6(0xcb):_0x2bcbd6(0xcd))},'warnings':_0x367b81,'verification':{'status':_0x2bcbd6(0xfb),'recoveredAfterUnknownResponse':_0x127573,'expectedVersion':_0x51381c['beforeRecord']?.[_0x2bcbd6(0xca)]??0x0,'atomicCompareAndSet':!![],'lookupCommand':_0x2bcbd6(0xf7)+_0x51381c[_0x2bcbd6(0xd3)][_0x2bcbd6(0xfa)]+_0x2bcbd6(0xea)}},'message':_0x2bcbd6(0xc4)+appRuleFileName(_0x51381c[_0x2bcbd6(0xd3)]['type'])+_0x2bcbd6(0xd8)+_0x344cbd['appCode']};}};
1
+ const a243_0x469320=a243_0x2c8b;(function(_0x4d52ab,_0xe170da){const _0x3b154c=a243_0x2c8b,_0x3d3dba=_0x4d52ab();while(!![]){try{const _0x5dcdec=parseInt(_0x3b154c(0xab))/0x1+parseInt(_0x3b154c(0x90))/0x2*(-parseInt(_0x3b154c(0xa6))/0x3)+-parseInt(_0x3b154c(0x9d))/0x4*(-parseInt(_0x3b154c(0x89))/0x5)+parseInt(_0x3b154c(0xa3))/0x6+-parseInt(_0x3b154c(0x93))/0x7+parseInt(_0x3b154c(0x8c))/0x8*(parseInt(_0x3b154c(0x91))/0x9)+parseInt(_0x3b154c(0x9b))/0xa*(-parseInt(_0x3b154c(0x86))/0xb);if(_0x5dcdec===_0xe170da)break;else _0x3d3dba['push'](_0x3d3dba['shift']());}catch(_0x52f04e){_0x3d3dba['push'](_0x3d3dba['shift']());}}}(a243_0x2217,0x61e7c));import{knowledgeDocumentsPath}from'../../core/api-client.js';import{getAppRule,isPlatformTransportFailure,saveAppRule}from'../../core/api-client.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{APP_RULE_TYPE_FLAG,appRuleContextScope,appRuleError,appRuleFileName,inspectAppRuleContent,projectAppRule,readAppRuleFile,readAppRuleType}from'../../commands/rule/shared.js';function a243_0x2217(){const _0x3804ee=['658904LZXudx','rule','expected-version','app_rule_content_too_large','251572lCNOKO','54umGqwA','--file\x20is\x20required.','2721292jCsBpX','push','RULES','app_rule_verification_failed','flag','version','Do\x20not\x20resubmit\x20automatically.\x20Inspect\x20the\x20exact\x20rule\x20state\x20before\x20retrying.','app_rule_file_required','13792780TKtiDa','\x20does\x20not\x20prove\x20the\x20requested\x20set\x20state.','2386768vsymVh','\x20--format\x20compress','replacement','content','Inspect\x20it\x20with\x20`rabetbase\x20rule\x20get\x20--type\x20','unconfigured','4665744uMWnbd','app_rule_set_outcome_unknown','rabetbase\x20rule\x20get\x20--type\x20','6nFFinK','cause','planned','--expected-version\x20must\x20be\x20a\x20non-negative\x20safe\x20integer.','appCode','552132veUErJ','contentHash','beforeRecord','.\x20Run\x20rule\x20get\x20and\x20review\x20before\x20retrying.','DATABASE','byteSize','before','update','trim','app_rule_verification_unavailable','Set\x20','\x20could\x20not\x20be\x20verified.','input','str','set','\x20version\x20changed\x20before\x20write.','app_rule_expected_version_invalid','app_rule_version_mismatch','expectedVersion','create','POST','rules','The\x20received\x20rule\x20state\x20contradicts\x20the\x20requested\x20changes.','file',';\x20current\x20version\x20is\x20','verified','type','11cxHxRO','Use\x20read-only\x20rule\x20reconciliation;\x20do\x20not\x20resubmit\x20automatically.','cookie','5uazjkK','RULES\x20content\x20exceeds\x202000\x20UTF-16\x20units.','number'];a243_0x2217=function(){return _0x3804ee;};return a243_0x2217();}function readSetInput(_0x7f8d6d){const _0xbacc73=a243_0x2c8b,_0x563062=readAppRuleType(_0x7f8d6d),_0x22b906=_0x7f8d6d[_0xbacc73(0xb8)](_0xbacc73(0x82))[_0xbacc73(0xb3)]();if(!_0x22b906)throw appRuleError(_0xbacc73(0x9a),_0xbacc73(0x92),'Pass\x20a\x20UTF-8\x20Markdown\x20file.');const _0x565212=_0x7f8d6d[_0xbacc73(0x97)](_0xbacc73(0x8e));let _0x588326;if(_0x565212!==undefined){_0x588326=Number(_0x565212);if(!Number['isSafeInteger'](_0x588326)||_0x588326<0x0)throw appRuleError(_0xbacc73(0x7b),_0xbacc73(0xa9));}return{'type':_0x563062,'file':_0x22b906,'expectedVersion':_0x588326};}async function prepareSet(_0x281346){const _0x55fdd9=a243_0x2c8b,_0x12e92a=readSetInput(_0x281346),_0x4f83d6=await readAppRuleFile(_0x12e92a['file']);if(_0x12e92a[_0x55fdd9(0x85)]===_0x55fdd9(0x80)&&_0x4f83d6[_0x55fdd9(0xa0)]['length']>0x7d0)throw appRuleError(_0x55fdd9(0x8f),_0x55fdd9(0x8a));const _0x4fe725=await getAppRule(_0x281346['cookie'],{'appCode':_0x281346[_0x55fdd9(0xaa)],'type':_0x12e92a['type']});if(_0x12e92a['expectedVersion']!==undefined&&(_0x4fe725?.['version']??0x0)!==_0x12e92a[_0x55fdd9(0x7d)])throw appRuleError(_0x55fdd9(0x7c),appRuleFileName(_0x12e92a[_0x55fdd9(0x85)])+_0x55fdd9(0x7a),'Expected\x20'+_0x12e92a['expectedVersion']+_0x55fdd9(0x83)+(_0x4fe725?.[_0x55fdd9(0x98)]??_0x55fdd9(0xa2))+_0x55fdd9(0xae));return{'input':_0x12e92a,'replacement':_0x4f83d6,'beforeRecord':_0x4fe725,'before':projectAppRule(_0x12e92a[_0x55fdd9(0x85)],_0x4fe725),'planned':{'type':_0x12e92a[_0x55fdd9(0x85)],'fileName':appRuleFileName(_0x12e92a[_0x55fdd9(0x85)]),'contextScope':appRuleContextScope(_0x12e92a['type']),'enabled':!![],'appCode':_0x281346[_0x55fdd9(0xaa)],'scope':_0x55fdd9(0x80),'contentByteSize':_0x4f83d6[_0x55fdd9(0xb0)],'contentHash':_0x4f83d6[_0x55fdd9(0xac)]}};}function warningsFor(_0x24ee10){return[];}function a243_0x2c8b(_0x182a65,_0x355fcb){_0x182a65=_0x182a65-0x79;const _0x2217a1=a243_0x2217();let _0x2c8be0=_0x2217a1[_0x182a65];return _0x2c8be0;}export const ruleSet={'service':a243_0x469320(0x8d),'command':a243_0x469320(0x79),'description':'Set\x20an\x20agent\x20context\x20rule\x20from\x20a\x20UTF-8\x20Markdown\x20file','risk':'write','requiresAppCode':!![],'structuredErrors':!![],'flags':[APP_RULE_TYPE_FLAG,{'name':a243_0x469320(0x82),'type':'string','required':!![],'description':'UTF-8\x20Markdown\x20file\x20(RULES:\x202000\x20UTF-16\x20units;\x20DATABASE:\x205242880\x20units)'},{'name':a243_0x469320(0x8e),'type':a243_0x469320(0x8b),'required':![],'description':'Require\x20the\x20current\x20version\x20before\x20atomic\x20compare-and-set'}],async 'validate'(_0x4b6b5a){readSetInput(_0x4b6b5a);},async 'dryRun'(_0x28b51f){const _0x31838d=a243_0x469320,_0x45f010=await prepareSet(_0x28b51f);return asDryRunResult({'operation':_0x31838d(0x79),'selector':{'appCode':_0x28b51f[_0x31838d(0xaa)],'scope':'rules','type':_0x45f010[_0x31838d(0xb7)][_0x31838d(0x85)]},'before':_0x45f010[_0x31838d(0xb1)],'after':_0x45f010[_0x31838d(0xa8)],'dryRun':!![],'backend':{'method':_0x31838d(0x7f),'path':knowledgeDocumentsPath(_0x31838d(0x80),_0x45f010[_0x31838d(0xad)]?_0x31838d(0xb2):_0x31838d(0x7e)),'body':{'appCode':_0x28b51f[_0x31838d(0xaa)],..._0x45f010[_0x31838d(0xad)]?{'id':_0x45f010[_0x31838d(0xad)]['id']}:{},'title':_0x45f010[_0x31838d(0xb7)][_0x31838d(0x85)]===_0x31838d(0x80)?_0x31838d(0x95):_0x31838d(0xaf),'contentHash':_0x45f010[_0x31838d(0x9f)][_0x31838d(0xac)],'contentByteSize':_0x45f010['replacement']['byteSize'],..._0x45f010[_0x31838d(0xad)]?{'expectedVersion':_0x45f010[_0x31838d(0xad)][_0x31838d(0x98)]}:{}}},'warnings':warningsFor(_0x45f010['input'][_0x31838d(0x7d)]),'verification':{'expectedVersion':_0x45f010[_0x31838d(0xad)]?.[_0x31838d(0x98)]??0x0,'atomicCompareAndSet':!![],'lookupCommand':_0x31838d(0xa5)+_0x45f010[_0x31838d(0xb7)][_0x31838d(0x85)]+_0x31838d(0x9e)}},{'method':_0x31838d(0x7f),'url':knowledgeDocumentsPath(_0x31838d(0x80),_0x45f010[_0x31838d(0xad)]?_0x31838d(0xb2):_0x31838d(0x7e))});},async 'execute'(_0x152327){const _0x22bdff=a243_0x469320,_0x5a7585=await prepareSet(_0x152327),_0x5698f2=_0x5a7585[_0x22bdff(0xad)]===null?0x1:_0x5a7585['beforeRecord'][_0x22bdff(0x98)]+(_0x5a7585[_0x22bdff(0xad)][_0x22bdff(0xa0)]===_0x5a7585[_0x22bdff(0x9f)][_0x22bdff(0xa0)]?0x0:0x1);let _0x3aaee1,_0x19e4da=![];try{_0x3aaee1=await saveAppRule(_0x152327[_0x22bdff(0x88)],{'appCode':_0x152327['appCode'],'type':_0x5a7585['input'][_0x22bdff(0x85)],'content':_0x5a7585[_0x22bdff(0x9f)][_0x22bdff(0xa0)],'expectedVersion':_0x5a7585[_0x22bdff(0xad)]?.['version']??0x0,..._0x5a7585[_0x22bdff(0xad)]?{'id':_0x5a7585[_0x22bdff(0xad)]['id']}:{}});if(_0x3aaee1['version']!==_0x5698f2||_0x3aaee1[_0x22bdff(0xa0)]!==_0x5a7585[_0x22bdff(0x9f)]['content']||_0x5a7585['beforeRecord']!==null&&_0x3aaee1['id']!==_0x5a7585[_0x22bdff(0xad)]['id'])throw appRuleError(_0x22bdff(0x96),_0x22bdff(0x81),_0x22bdff(0x87));}catch(_0x33f02e){if(!isPlatformTransportFailure(_0x33f02e))throw _0x33f02e;_0x19e4da=!![];}let _0x1e8c91;try{_0x1e8c91=await getAppRule(_0x152327['cookie'],{'appCode':_0x152327[_0x22bdff(0xaa)],'type':_0x5a7585[_0x22bdff(0xb7)][_0x22bdff(0x85)]});}catch(_0x52a3c2){const _0x5221fd=appRuleError(_0x19e4da?_0x22bdff(0xa4):_0x22bdff(0xb4),'The\x20set\x20request\x20was\x20sent,\x20but\x20'+appRuleFileName(_0x5a7585[_0x22bdff(0xb7)][_0x22bdff(0x85)])+_0x22bdff(0xb6),_0x22bdff(0x99));Object['defineProperty'](_0x5221fd,_0x22bdff(0xa7),{'value':_0x52a3c2,'enumerable':![]});throw _0x5221fd;}const _0x3ff671=_0x1e8c91&&inspectAppRuleContent(_0x1e8c91['content'])[_0x22bdff(0xac)]===_0x5a7585['replacement'][_0x22bdff(0xac)],_0x18463b=_0x1e8c91&&_0x1e8c91[_0x22bdff(0x98)]===_0x5698f2&&(!_0x3aaee1||_0x1e8c91['id']===_0x3aaee1['id']&&_0x1e8c91[_0x22bdff(0x98)]===_0x3aaee1['version']);if(!_0x1e8c91||!_0x3ff671||!_0x18463b||_0x5a7585['beforeRecord']!==null&&_0x1e8c91['id']!==_0x5a7585[_0x22bdff(0xad)]['id'])throw appRuleError(_0x19e4da?_0x22bdff(0xa4):_0x22bdff(0x96),appRuleFileName(_0x5a7585[_0x22bdff(0xb7)][_0x22bdff(0x85)])+_0x22bdff(0x9c),_0x22bdff(0xa1)+_0x5a7585[_0x22bdff(0xb7)][_0x22bdff(0x85)]+'\x20--format\x20compress`;\x20do\x20not\x20resubmit\x20automatically.');const _0x37a7dc=warningsFor(_0x5a7585[_0x22bdff(0xb7)][_0x22bdff(0x7d)]);_0x19e4da&&_0x37a7dc[_0x22bdff(0x94)]('Set\x20response\x20was\x20unavailable;\x20verified\x20the\x20exact\x20content\x20readback\x20without\x20resubmitting.');const _0x4957d8=projectAppRule(_0x5a7585['input'][_0x22bdff(0x85)],_0x1e8c91);return{'ok':!![],'data':{'operation':_0x22bdff(0x79),'selector':{'appCode':_0x152327[_0x22bdff(0xaa)],'scope':'rules','type':_0x5a7585[_0x22bdff(0xb7)][_0x22bdff(0x85)]},'before':_0x5a7585['before'],'after':_0x4957d8,'dryRun':![],'backend':{'method':_0x22bdff(0x7f),'path':knowledgeDocumentsPath(_0x22bdff(0x80),_0x5a7585['beforeRecord']?_0x22bdff(0xb2):_0x22bdff(0x7e))},'warnings':_0x37a7dc,'verification':{'status':_0x22bdff(0x84),'recoveredAfterUnknownResponse':_0x19e4da,'expectedVersion':_0x5a7585['beforeRecord']?.['version']??0x0,'atomicCompareAndSet':!![],'lookupCommand':_0x22bdff(0xa5)+_0x5a7585[_0x22bdff(0xb7)]['type']+_0x22bdff(0x9e)}},'message':_0x22bdff(0xb5)+appRuleFileName(_0x5a7585[_0x22bdff(0xb7)][_0x22bdff(0x85)])+'\x20for\x20'+_0x152327[_0x22bdff(0xaa)]};}};
@@ -1 +1 @@
1
- function a244_0x5b84(_0x1c6a37,_0x2c8301){_0x1c6a37=_0x1c6a37-0x172;const _0x88026=a244_0x8802();let _0x5b84a8=_0x88026[_0x1c6a37];return _0x5b84a8;}const a244_0x1b57f6=a244_0x5b84;(function(_0x33c0ab,_0x2e0197){const _0x139313=a244_0x5b84,_0x2d4f66=_0x33c0ab();while(!![]){try{const _0x19ce0d=parseInt(_0x139313(0x173))/0x1*(parseInt(_0x139313(0x199))/0x2)+parseInt(_0x139313(0x1a4))/0x3+-parseInt(_0x139313(0x19d))/0x4*(-parseInt(_0x139313(0x1a2))/0x5)+-parseInt(_0x139313(0x196))/0x6+-parseInt(_0x139313(0x17e))/0x7+-parseInt(_0x139313(0x185))/0x8*(parseInt(_0x139313(0x17d))/0x9)+-parseInt(_0x139313(0x191))/0xa;if(_0x19ce0d===_0x2e0197)break;else _0x2d4f66['push'](_0x2d4f66['shift']());}catch(_0x4155ff){_0x2d4f66['push'](_0x2d4f66['shift']());}}}(a244_0x8802,0x1ae2a));import{createHash}from'node:crypto';import{readFile,stat}from'node:fs/promises';import{resolve}from'node:path';import{TextDecoder}from'node:util';import{CliError}from'../../errors.js';export const APP_RULE_TYPES=[a244_0x1b57f6(0x19c),a244_0x1b57f6(0x176)];export const MAX_APP_RULE_UNITS=0x5*0x400*0x400;export const MAX_APP_RULE_BYTES=MAX_APP_RULE_UNITS*0x4;const APP_RULE_FILES={'rules':a244_0x1b57f6(0x198),'database':a244_0x1b57f6(0x18d)},APP_RULE_CONTEXT_SCOPES={'rules':a244_0x1b57f6(0x195),'database':a244_0x1b57f6(0x17b)};export function appRuleError(_0x282cbb,_0x259735,_0x50e41a){return new CliError(_0x282cbb,0x1,_0x259735,_0x50e41a);}export function readAppRuleType(_0x53ced8){const _0x1a21ed=a244_0x1b57f6,_0x5dc8d7=_0x53ced8['str'](_0x1a21ed(0x1a0))[_0x1a21ed(0x193)]()[_0x1a21ed(0x19b)]();if(_0x5dc8d7!==_0x1a21ed(0x19c)&&_0x5dc8d7!==_0x1a21ed(0x176))throw appRuleError(_0x1a21ed(0x172),_0x1a21ed(0x1a7));return _0x5dc8d7;}export function appRuleFileName(_0x578ab6){return APP_RULE_FILES[_0x578ab6];}export function appRuleContextScope(_0x5a0730){return APP_RULE_CONTEXT_SCOPES[_0x5a0730];}function a244_0x8802(){const _0x4436c6=['database','App\x20rule\x20file\x20is\x20blank:\x20','scope','Context\x20rule\x20type:\x20rules\x20for\x20page/API\x20development\x20agents\x20(DB\x20Agent\x20excluded),\x20database\x20for\x20DB\x20Agent\x20database\x20analysis','size','database-analysis','Pass\x20a\x20UTF-8\x20Markdown\x20file.','514341oUeDwW','230027fNyWvN','App\x20rule\x20content\x20exceeds\x205242880\x20UTF-16\x20units.','digest','App\x20rule\x20content\x20exceeds\x20the\x20bounded\x20UTF-8\x20file\x20limit.','app_rule_file_required','length','createTime','8XHUcpF','indexStatus','Cannot\x20access\x20app\x20rule\x20file:\x20','updateTime','isFile','decode','utf-8','utf8','DATABASE.md','app_rule_file_invalid','appCode','byteSize','2363360tpAEhd','from','trim','sha256:','page-api-development','939240LmyqDS','--file\x20is\x20required.','RULES.md','129502LCMcAJ','App\x20rule\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','toLowerCase','rules','851416xRGVGW','string','app_rule_content_too_large','type','content','5fGKyIe','update','557703hZZEmy','App\x20rule\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','app_rule_content_invalid','--type\x20must\x20be\x20either\x20rules\x20or\x20database.','app_rule_type_invalid','3QPzuTu','sha256','version'];a244_0x8802=function(){return _0x4436c6;};return a244_0x8802();}export function inspectAppRuleContent(_0x4e5e2b){const _0x437210=a244_0x1b57f6,_0xb3aa98=Buffer[_0x437210(0x192)](_0x4e5e2b,_0x437210(0x18c));return{'content':_0x4e5e2b,'byteSize':_0xb3aa98['byteLength'],'contentHash':_0x437210(0x194)+createHash(_0x437210(0x174))[_0x437210(0x1a3)](_0xb3aa98)[_0x437210(0x180)]('hex')};}export async function readAppRuleFile(_0x3746e5){const _0x5a8c48=a244_0x1b57f6,_0xf518c=_0x3746e5['trim']();if(!_0xf518c)throw appRuleError(_0x5a8c48(0x182),_0x5a8c48(0x197),_0x5a8c48(0x17c));const _0x5d1b96=resolve(_0xf518c);let _0x194e0e;try{_0x194e0e=await stat(_0x5d1b96);}catch(_0x281db0){throw appRuleError('app_rule_file_unreadable',_0x5a8c48(0x187)+_0xf518c,_0x281db0 instanceof Error?_0x281db0['message']:String(_0x281db0));}if(!_0x194e0e[_0x5a8c48(0x189)]())throw appRuleError(_0x5a8c48(0x18e),_0x5a8c48(0x19a)+_0xf518c);if(_0x194e0e[_0x5a8c48(0x17a)]>MAX_APP_RULE_BYTES)throw appRuleError(_0x5a8c48(0x19f),_0x5a8c48(0x181));let _0x2927a5;try{_0x2927a5=await readFile(_0x5d1b96);}catch(_0x2f5586){throw appRuleError('app_rule_file_unreadable','Cannot\x20read\x20app\x20rule\x20file:\x20'+_0xf518c,_0x2f5586 instanceof Error?_0x2f5586['message']:String(_0x2f5586));}if(_0x2927a5['byteLength']>MAX_APP_RULE_BYTES)throw appRuleError(_0x5a8c48(0x19f),_0x5a8c48(0x181));let _0x3105b7;try{_0x3105b7=new TextDecoder(_0x5a8c48(0x18b),{'fatal':!![],'ignoreBOM':!![]})[_0x5a8c48(0x18a)](_0x2927a5);}catch{throw appRuleError(_0x5a8c48(0x1a6),_0x5a8c48(0x1a5)+_0xf518c);}if(_0x3105b7[_0x5a8c48(0x183)]>MAX_APP_RULE_UNITS)throw appRuleError(_0x5a8c48(0x19f),_0x5a8c48(0x17f));if(!_0x3105b7[_0x5a8c48(0x193)]())throw appRuleError(_0x5a8c48(0x1a6),_0x5a8c48(0x177)+_0xf518c);return inspectAppRuleContent(_0x3105b7);}export function projectAppRule(_0x35f986,_0x1f8df4){const _0x3eaf45=a244_0x1b57f6;if(!_0x1f8df4)return{'type':_0x35f986,'fileName':appRuleFileName(_0x35f986),'contextScope':appRuleContextScope(_0x35f986),'enabled':![]};const _0xf5f65e=inspectAppRuleContent(_0x1f8df4[_0x3eaf45(0x1a1)]);return{'type':_0x35f986,'fileName':appRuleFileName(_0x35f986),'contextScope':appRuleContextScope(_0x35f986),'enabled':!![],'id':_0x1f8df4['id'],'scope':_0x1f8df4[_0x3eaf45(0x178)],'appCode':_0x1f8df4[_0x3eaf45(0x18f)],'version':_0x1f8df4[_0x3eaf45(0x175)],..._0x1f8df4[_0x3eaf45(0x186)]!==undefined?{'indexStatus':_0x1f8df4[_0x3eaf45(0x186)]}:{},'contentByteSize':_0xf5f65e[_0x3eaf45(0x190)],'contentHash':_0xf5f65e['contentHash'],..._0x1f8df4[_0x3eaf45(0x184)]!==undefined&&_0x1f8df4[_0x3eaf45(0x184)]!==null?{'createTime':_0x1f8df4[_0x3eaf45(0x184)]}:{},..._0x1f8df4[_0x3eaf45(0x188)]!==undefined&&_0x1f8df4[_0x3eaf45(0x188)]!==null?{'updateTime':_0x1f8df4[_0x3eaf45(0x188)]}:{}};}export const APP_RULE_TYPE_FLAG={'name':a244_0x1b57f6(0x1a0),'type':a244_0x1b57f6(0x19e),'required':!![],'description':a244_0x1b57f6(0x179),'enum':[...APP_RULE_TYPES]};
1
+ const a244_0x356b0f=a244_0x525c;(function(_0x21c8e6,_0x21db9e){const _0x4430a8=a244_0x525c,_0x2ec67c=_0x21c8e6();while(!![]){try{const _0x7b8dab=-parseInt(_0x4430a8(0xdf))/0x1*(parseInt(_0x4430a8(0xbc))/0x2)+-parseInt(_0x4430a8(0xd9))/0x3+-parseInt(_0x4430a8(0xb3))/0x4+parseInt(_0x4430a8(0xd1))/0x5*(-parseInt(_0x4430a8(0xd7))/0x6)+parseInt(_0x4430a8(0xd3))/0x7+parseInt(_0x4430a8(0xc2))/0x8*(-parseInt(_0x4430a8(0xc7))/0x9)+parseInt(_0x4430a8(0xcb))/0xa;if(_0x7b8dab===_0x21db9e)break;else _0x2ec67c['push'](_0x2ec67c['shift']());}catch(_0x4815a0){_0x2ec67c['push'](_0x2ec67c['shift']());}}}(a244_0x23bd,0x6febd));import{createHash}from'node:crypto';import{readFile,stat}from'node:fs/promises';import{resolve}from'node:path';import{TextDecoder}from'node:util';import{CliError}from'../../errors.js';export const APP_RULE_TYPES=[a244_0x356b0f(0xb5),a244_0x356b0f(0xc9)];export const MAX_APP_RULE_UNITS=0x5*0x400*0x400;export const MAX_APP_RULE_BYTES=MAX_APP_RULE_UNITS*0x4;const APP_RULE_FILES={'rules':a244_0x356b0f(0xb7),'database':a244_0x356b0f(0xde)},APP_RULE_CONTEXT_SCOPES={'rules':a244_0x356b0f(0xc0),'database':'database-analysis'};export function appRuleError(_0x4eba76,_0x2b632f,_0x54f02b){return new CliError(_0x4eba76,0x1,_0x2b632f,_0x54f02b);}export function readAppRuleType(_0x1a96ad){const _0x1e1e9f=a244_0x356b0f,_0x15ee8f=_0x1a96ad['str']('type')[_0x1e1e9f(0xdc)]()[_0x1e1e9f(0xc6)]();if(_0x15ee8f!==_0x1e1e9f(0xb5)&&_0x15ee8f!==_0x1e1e9f(0xc9))throw appRuleError(_0x1e1e9f(0xd5),_0x1e1e9f(0xd6));return _0x15ee8f;}function a244_0x23bd(){const _0x48f5f1=['6060gkdory','App\x20rule\x20content\x20exceeds\x20the\x20bounded\x20UTF-8\x20file\x20limit.','3851624lmQTpc','scope','app_rule_type_invalid','--type\x20must\x20be\x20either\x20rules\x20or\x20database.','2868xqZoZq','app_rule_content_too_large','1666407VyWvDq','app_rule_file_required','App\x20rule\x20path\x20is\x20not\x20a\x20regular\x20file:\x20','trim','version','DATABASE.md','108ALbNqb','type','appCode','3156236guYTHl','contentHash','rules','Context\x20rule\x20type:\x20rules\x20for\x20page/API\x20development\x20agents\x20(DB\x20Agent\x20excluded),\x20database\x20for\x20DB\x20Agent\x20database\x20analysis','RULES.md','isFile','utf-8','message','byteLength','5736sakHFx','app_rule_file_invalid','Cannot\x20read\x20app\x20rule\x20file:\x20','hex','page-api-development','Cannot\x20access\x20app\x20rule\x20file:\x20','1167560SEcLKE','app_rule_file_unreadable','createTime','updateTime','toLowerCase','27KnLSnU','indexStatus','database','app_rule_content_invalid','25796400OAmutm','content','--file\x20is\x20required.','App\x20rule\x20file\x20is\x20not\x20valid\x20UTF-8:\x20','update','from'];a244_0x23bd=function(){return _0x48f5f1;};return a244_0x23bd();}export function appRuleFileName(_0xe38029){return APP_RULE_FILES[_0xe38029];}export function appRuleContextScope(_0x349364){return APP_RULE_CONTEXT_SCOPES[_0x349364];}export function inspectAppRuleContent(_0x24971c){const _0x1eb3b9=a244_0x356b0f,_0x5f510d=Buffer[_0x1eb3b9(0xd0)](_0x24971c,'utf8');return{'content':_0x24971c,'byteSize':_0x5f510d[_0x1eb3b9(0xbb)],'contentHash':'sha256:'+createHash('sha256')[_0x1eb3b9(0xcf)](_0x5f510d)['digest'](_0x1eb3b9(0xbf))};}export async function readAppRuleFile(_0x240173){const _0x30e207=a244_0x356b0f,_0x1421ad=_0x240173[_0x30e207(0xdc)]();if(!_0x1421ad)throw appRuleError(_0x30e207(0xda),_0x30e207(0xcd),'Pass\x20a\x20UTF-8\x20Markdown\x20file.');const _0x9417e=resolve(_0x1421ad);let _0x4d5a11;try{_0x4d5a11=await stat(_0x9417e);}catch(_0x2e7420){throw appRuleError(_0x30e207(0xc3),_0x30e207(0xc1)+_0x1421ad,_0x2e7420 instanceof Error?_0x2e7420[_0x30e207(0xba)]:String(_0x2e7420));}if(!_0x4d5a11[_0x30e207(0xb8)]())throw appRuleError(_0x30e207(0xbd),_0x30e207(0xdb)+_0x1421ad);if(_0x4d5a11['size']>MAX_APP_RULE_BYTES)throw appRuleError(_0x30e207(0xd8),'App\x20rule\x20content\x20exceeds\x20the\x20bounded\x20UTF-8\x20file\x20limit.');let _0x43bf17;try{_0x43bf17=await readFile(_0x9417e);}catch(_0x255675){throw appRuleError(_0x30e207(0xc3),_0x30e207(0xbe)+_0x1421ad,_0x255675 instanceof Error?_0x255675[_0x30e207(0xba)]:String(_0x255675));}if(_0x43bf17[_0x30e207(0xbb)]>MAX_APP_RULE_BYTES)throw appRuleError(_0x30e207(0xd8),_0x30e207(0xd2));let _0x20b17f;try{_0x20b17f=new TextDecoder(_0x30e207(0xb9),{'fatal':!![],'ignoreBOM':!![]})['decode'](_0x43bf17);}catch{throw appRuleError(_0x30e207(0xca),_0x30e207(0xce)+_0x1421ad);}if(_0x20b17f['length']>MAX_APP_RULE_UNITS)throw appRuleError(_0x30e207(0xd8),'App\x20rule\x20content\x20exceeds\x205242880\x20UTF-16\x20units.');if(!_0x20b17f[_0x30e207(0xdc)]())throw appRuleError(_0x30e207(0xca),'App\x20rule\x20file\x20is\x20blank:\x20'+_0x1421ad);return inspectAppRuleContent(_0x20b17f);}function a244_0x525c(_0x421b66,_0x3fb902){_0x421b66=_0x421b66-0xb1;const _0x23bd74=a244_0x23bd();let _0x525c1a=_0x23bd74[_0x421b66];return _0x525c1a;}export function projectAppRule(_0x529d44,_0x28ee2b){const _0x19ef31=a244_0x356b0f;if(!_0x28ee2b)return{'type':_0x529d44,'fileName':appRuleFileName(_0x529d44),'contextScope':appRuleContextScope(_0x529d44),'enabled':![]};const _0x58dee1=inspectAppRuleContent(_0x28ee2b[_0x19ef31(0xcc)]);return{'type':_0x529d44,'fileName':appRuleFileName(_0x529d44),'contextScope':appRuleContextScope(_0x529d44),'enabled':!![],'id':_0x28ee2b['id'],'scope':_0x28ee2b[_0x19ef31(0xd4)],'appCode':_0x28ee2b[_0x19ef31(0xb2)],'version':_0x28ee2b[_0x19ef31(0xdd)],..._0x28ee2b[_0x19ef31(0xc8)]!==undefined?{'indexStatus':_0x28ee2b[_0x19ef31(0xc8)]}:{},'contentByteSize':_0x58dee1['byteSize'],'contentHash':_0x58dee1[_0x19ef31(0xb4)],..._0x28ee2b[_0x19ef31(0xc4)]!==undefined&&_0x28ee2b['createTime']!==null?{'createTime':_0x28ee2b[_0x19ef31(0xc4)]}:{},..._0x28ee2b[_0x19ef31(0xc5)]!==undefined&&_0x28ee2b[_0x19ef31(0xc5)]!==null?{'updateTime':_0x28ee2b[_0x19ef31(0xc5)]}:{}};}export const APP_RULE_TYPE_FLAG={'name':a244_0x356b0f(0xb1),'type':'string','required':!![],'description':a244_0x356b0f(0xb6),'enum':[...APP_RULE_TYPES]};
@@ -1 +1 @@
1
- const a245_0x5089f2=a245_0xc42e;(function(_0x5a7332,_0x3b698a){const _0x445f87=a245_0xc42e,_0x1ec976=_0x5a7332();while(!![]){try{const _0x5cf0cb=parseInt(_0x445f87(0xeb))/0x1+-parseInt(_0x445f87(0x101))/0x2*(parseInt(_0x445f87(0xef))/0x3)+parseInt(_0x445f87(0xe7))/0x4+-parseInt(_0x445f87(0xf3))/0x5+parseInt(_0x445f87(0xee))/0x6+parseInt(_0x445f87(0xf7))/0x7+-parseInt(_0x445f87(0xf5))/0x8;if(_0x5cf0cb===_0x3b698a)break;else _0x1ec976['push'](_0x1ec976['shift']());}catch(_0x4728a7){_0x1ec976['push'](_0x1ec976['shift']());}}}(a245_0x44d0,0x1d454));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';import{resolve,delimiter,join}from'node:path';import{spawn}from'node:child_process';import{CliErrors}from'../../errors.js';import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';function a245_0xc42e(_0x71deab,_0x1a21fc){_0x71deab=_0x71deab-0xe5;const _0x44d008=a245_0x44d0();let _0xc42e0b=_0x44d008[_0x71deab];return _0xc42e0b;}function a245_0x44d0(){const _0x41e2a3=['cwd','has','749682DXJjov','5886VtzddD','needsUpgrade','\x20exited\x20with\x20code\x20','\x20run\x20preview\x20--watch','578445PYXUuN','yarn','841184posuOa','\x20run\x20<script>\x0a','177135vHFtDy','log','parse','\x0a\x20\x20Usage:\x20','inherit','Available:\x20','\x20run\x20build','slice','Enable\x20watch\x20mode\x20for\x20preview','(none)','134hrHugr','keys','Run\x20a\x20package.json\x20script','vite\x20preview\x20exited\x20with\x20code\x20','preview','\x20run\x20start','error','\x20\x20\x20\x20','\x22\x20not\x20found\x20in\x20package.json.','write','vite','run','push','start','\x20\x20EXAMPLES','Script\x20\x22','belowMinimum','bun.lock','close','build','utf-8','No\x20scripts\x20defined\x20in\x20package.json.','boolean','package.json','yarn.lock','Domain\x20routing\x20synchronized:\x20','bun.lockb','\x0a\x20\x20Available\x20scripts:\x0a','validation','args','pnpm-lock.yaml','path','459352wAbUdo','node_modules','watch','.bin','207093aMmKtL'];a245_0x44d0=function(){return _0x41e2a3;};return a245_0x44d0();}const VERSION_CHECK_SCRIPTS=new Set([a245_0x5089f2(0x10e),'dev']),DOMAIN_ROUTING_SYNC_SCRIPTS=new Set([a245_0x5089f2(0x10e),'dev',a245_0x5089f2(0x114),a245_0x5089f2(0x105)]);export function syncProjectDomainRoutingBeforeScript(_0x6cab4b,_0x2291ed){const _0x4ed5c2=a245_0x5089f2;if(!DOMAIN_ROUTING_SYNC_SCRIPTS[_0x4ed5c2(0xed)](_0x2291ed))return null;const _0x13b941=findProjectRootDirectory(_0x6cab4b);if(!resolveConfigPath(_0x13b941))return null;const _0x1fc121=writeProjectDomainRoutingManifest(_0x13b941);return{'path':_0x1fc121[_0x4ed5c2(0xe6)],'changed':_0x1fc121['changed']};}function readPackageScripts(_0x4aaa72){const _0x5c8bf0=a245_0x5089f2,_0x3c7380=resolve(_0x4aaa72,_0x5c8bf0(0x118));if(!existsSync(_0x3c7380))return null;try{const _0x5751e2=JSON[_0x5c8bf0(0xf9)](readFileSync(_0x3c7380,_0x5c8bf0(0x115)));return _0x5751e2['scripts']??{};}catch{return null;}}function detectPackageManager(_0x584219){const _0x3e817a=a245_0x5089f2;if(existsSync(resolve(_0x584219,_0x3e817a(0x11b)))||existsSync(resolve(_0x584219,_0x3e817a(0x112))))return'bun';if(existsSync(resolve(_0x584219,_0x3e817a(0xe5))))return'pnpm';if(existsSync(resolve(_0x584219,_0x3e817a(0x119))))return _0x3e817a(0xf4);return'npm';}async function versionCheck(_0x49dee8){const _0x572641=a245_0x5089f2,_0x46d0e1=await checkCliVersion();(_0x46d0e1[_0x572641(0xf0)]||_0x46d0e1[_0x572641(0x111)])&&(printCliUpgradeWarning(_0x46d0e1),assertCliVersionSupported(_0x46d0e1));const _0x1e4ebb=await checkSdkVersion(_0x49dee8);if(_0x1e4ebb[_0x572641(0xf0)])printSdkUpgradeWarning(_0x1e4ebb);}function spawnScript(_0x28a9e9,_0x324655,_0x27d74c,_0x1d380f){return new Promise((_0x1b65a5,_0x4b00dc)=>{const _0x2757a9=a245_0xc42e,_0x3b6c46=[_0x2757a9(0x10c),_0x324655,..._0x27d74c],_0x873589=spawn(_0x28a9e9,_0x3b6c46,{'cwd':_0x1d380f,'stdio':_0x2757a9(0xfb),'shell':!![],'env':{...process.env,'PATH':''+join(_0x1d380f,'node_modules',_0x2757a9(0xea))+delimiter+process.env.PATH}});_0x873589['on']('close',_0xfa6165=>{const _0x50b614=_0x2757a9;if(_0xfa6165===0x0||_0xfa6165===null)_0x1b65a5();else _0x4b00dc(new Error(_0x28a9e9+'\x20run\x20'+_0x324655+_0x50b614(0xf1)+_0xfa6165));}),_0x873589['on'](_0x2757a9(0x107),_0x4b00dc);});}function spawnViteBuildWatch(_0x4f3b68){return new Promise((_0x57298d,_0x4fa097)=>{const _0x891216=a245_0xc42e,_0x327767=spawn(_0x891216(0x10b),[_0x891216(0x114),'--watch'],{'cwd':_0x4f3b68,'stdio':_0x891216(0xfb),'shell':!![],'env':{...process.env,'PATH':''+join(_0x4f3b68,'node_modules',_0x891216(0xea))+delimiter+process.env.PATH}});_0x327767['on']('close',_0x579203=>{if(_0x579203===0x0||_0x579203===null)_0x57298d();else _0x4fa097(new Error('vite\x20build\x20--watch\x20exited\x20with\x20code\x20'+_0x579203));}),_0x327767['on'](_0x891216(0x107),_0x4fa097);});}function spawnVitePreview(_0x535ce9){return new Promise((_0x29d88e,_0x1863a2)=>{const _0x4b007b=a245_0xc42e,_0x39387a=spawn(_0x4b007b(0x10b),[_0x4b007b(0x105)],{'cwd':_0x535ce9,'stdio':_0x4b007b(0xfb),'shell':!![],'env':{...process.env,'PATH':''+join(_0x535ce9,_0x4b007b(0xe8),_0x4b007b(0xea))+delimiter+process.env.PATH}});_0x39387a['on'](_0x4b007b(0x113),_0x1b7b37=>{const _0x52c4e4=_0x4b007b;if(_0x1b7b37===0x0||_0x1b7b37===null)_0x29d88e();else _0x1863a2(new Error(_0x52c4e4(0x104)+_0x1b7b37));}),_0x39387a['on'](_0x4b007b(0x107),_0x1863a2);});}const runFlags=[{'name':'watch','type':a245_0x5089f2(0x117),'description':a245_0x5089f2(0xff),'default':![]}];export const runDefinition={'service':'run','command':a245_0x5089f2(0x10c),'description':a245_0x5089f2(0x103),'risk':a245_0x5089f2(0x10a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'script','description':'Script\x20name\x20defined\x20in\x20package.json','required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x3bf6bf=a245_0x5089f2,_0x435584=[];return _0x435584[_0x3bf6bf(0x10d)](_0x3bf6bf(0x10f)),_0x435584[_0x3bf6bf(0x10d)](_0x3bf6bf(0x108)+CLI_BIN_NAME+_0x3bf6bf(0x106)),_0x435584['push']('\x20\x20\x20\x20'+CLI_BIN_NAME+_0x3bf6bf(0xfd)),_0x435584[_0x3bf6bf(0x10d)]('\x20\x20\x20\x20'+CLI_BIN_NAME+'\x20run\x20preview'),_0x435584[_0x3bf6bf(0x10d)](_0x3bf6bf(0x108)+CLI_BIN_NAME+_0x3bf6bf(0xf2)),_0x435584['join']('\x0a');},async 'execute'(_0x2b7790){const _0x964cf3=a245_0x5089f2,_0x4dc946=process[_0x964cf3(0xec)](),_0x2eb9d3=_0x2b7790[_0x964cf3(0x11e)][0x0],_0xc276b2=_0x2b7790[_0x964cf3(0x11e)][_0x964cf3(0xfe)](0x1),_0xc19c0=readPackageScripts(_0x4dc946);if(!_0xc19c0)throw CliErrors[_0x964cf3(0x11d)]('No\x20package.json\x20found\x20in\x20current\x20directory.');if(!_0x2eb9d3){const _0x1d9f09=Object[_0x964cf3(0x102)](_0xc19c0);if(_0x1d9f09['length']===0x0)console[_0x964cf3(0xf8)](_0x964cf3(0x116));else{console[_0x964cf3(0xf8)](_0x964cf3(0x11c));for(const _0x26675 of _0x1d9f09){console[_0x964cf3(0xf8)](_0x964cf3(0x108)+_0x26675);}console['log'](_0x964cf3(0xfa)+CLI_BIN_NAME+_0x964cf3(0xf6));}return{'ok':!![]};}if(!_0xc19c0[_0x2eb9d3])throw CliErrors[_0x964cf3(0x11d)](_0x964cf3(0x110)+_0x2eb9d3+_0x964cf3(0x109),_0x964cf3(0xfc)+(Object['keys'](_0xc19c0)['join'](',\x20')||_0x964cf3(0x100)));const _0x23d82c=detectPackageManager(_0x4dc946),_0x5bf681=syncProjectDomainRoutingBeforeScript(_0x4dc946,_0x2eb9d3);_0x5bf681?.['changed']&&console[_0x964cf3(0x107)](_0x964cf3(0x11a)+_0x5bf681['path']);VERSION_CHECK_SCRIPTS[_0x964cf3(0xed)](_0x2eb9d3)&&await versionCheck(_0x4dc946);if(_0x2eb9d3==='preview'&&_0x2b7790['bool'](_0x964cf3(0xe9)))return await Promise['all']([spawnViteBuildWatch(_0x4dc946),spawnVitePreview(_0x4dc946)]),{'ok':!![]};return await spawnScript(_0x23d82c,_0x2eb9d3,_0xc276b2,_0x4dc946),{'ok':!![]};}};
1
+ const a245_0x508598=a245_0x4efe;(function(_0x398bb1,_0x3120e4){const _0x597852=a245_0x4efe,_0x24edf8=_0x398bb1();while(!![]){try{const _0x3f62ab=-parseInt(_0x597852(0x13d))/0x1*(-parseInt(_0x597852(0x11b))/0x2)+-parseInt(_0x597852(0x118))/0x3*(parseInt(_0x597852(0x139))/0x4)+parseInt(_0x597852(0x111))/0x5*(parseInt(_0x597852(0x115))/0x6)+-parseInt(_0x597852(0x125))/0x7*(-parseInt(_0x597852(0x11d))/0x8)+parseInt(_0x597852(0x122))/0x9*(parseInt(_0x597852(0x13f))/0xa)+parseInt(_0x597852(0x119))/0xb*(parseInt(_0x597852(0x127))/0xc)+-parseInt(_0x597852(0x142))/0xd;if(_0x3f62ab===_0x3120e4)break;else _0x24edf8['push'](_0x24edf8['shift']());}catch(_0x2be4a2){_0x24edf8['push'](_0x24edf8['shift']());}}}(a245_0x5209,0x7bf44));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';import{resolve,delimiter,join}from'node:path';function a245_0x4efe(_0x42aaa5,_0x24ce04){_0x42aaa5=_0x42aaa5-0x110;const _0x5209ad=a245_0x5209();let _0x4efe04=_0x5209ad[_0x42aaa5];return _0x4efe04;}import{spawn}from'node:child_process';import{CliErrors}from'../../errors.js';import{findProjectRootDirectory,resolveConfigPath}from'../../context/config-loader.js';import{writeProjectDomainRoutingManifest}from'../../config/project-domain-routing.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set(['start',a245_0x508598(0x138)]),DOMAIN_ROUTING_SYNC_SCRIPTS=new Set([a245_0x508598(0x13e),'dev','build',a245_0x508598(0x11a)]);export function syncProjectDomainRoutingBeforeScript(_0xf14f53,_0x106d63){const _0x4848e8=a245_0x508598;if(!DOMAIN_ROUTING_SYNC_SCRIPTS[_0x4848e8(0x120)](_0x106d63))return null;const _0x4bbac0=findProjectRootDirectory(_0xf14f53);if(!resolveConfigPath(_0x4bbac0))return null;const _0x124b5=writeProjectDomainRoutingManifest(_0x4bbac0);return{'path':_0x124b5[_0x4848e8(0x14e)],'changed':_0x124b5[_0x4848e8(0x14b)]};}function readPackageScripts(_0x13c348){const _0x41aebe=a245_0x508598,_0x382373=resolve(_0x13c348,_0x41aebe(0x12c));if(!existsSync(_0x382373))return null;try{const _0x2250dd=JSON[_0x41aebe(0x143)](readFileSync(_0x382373,_0x41aebe(0x14c)));return _0x2250dd['scripts']??{};}catch{return null;}}function detectPackageManager(_0x5d376a){const _0x12d8f1=a245_0x508598;if(existsSync(resolve(_0x5d376a,_0x12d8f1(0x147)))||existsSync(resolve(_0x5d376a,_0x12d8f1(0x130))))return _0x12d8f1(0x141);if(existsSync(resolve(_0x5d376a,_0x12d8f1(0x112))))return _0x12d8f1(0x116);if(existsSync(resolve(_0x5d376a,_0x12d8f1(0x114))))return'yarn';return'npm';}async function versionCheck(_0xd7af5a){const _0x2395fd=a245_0x508598,_0x120b1b=await checkCliVersion();(_0x120b1b['needsUpgrade']||_0x120b1b['belowMinimum'])&&(printCliUpgradeWarning(_0x120b1b),assertCliVersionSupported(_0x120b1b));const _0x210853=await checkSdkVersion(_0xd7af5a);if(_0x210853[_0x2395fd(0x123)])printSdkUpgradeWarning(_0x210853);}function spawnScript(_0x15f182,_0x5507d1,_0x24953e,_0x535695){return new Promise((_0x3a0765,_0x437379)=>{const _0x4d6c62=a245_0x4efe,_0x5cf14c=[_0x4d6c62(0x148),_0x5507d1,..._0x24953e],_0x3c9ba8=spawn(_0x15f182,_0x5cf14c,{'cwd':_0x535695,'stdio':'inherit','shell':!![],'env':{...process.env,'PATH':''+join(_0x535695,_0x4d6c62(0x113),_0x4d6c62(0x110))+delimiter+process.env.PATH}});_0x3c9ba8['on']('close',_0x4a40b6=>{const _0x591813=_0x4d6c62;if(_0x4a40b6===0x0||_0x4a40b6===null)_0x3a0765();else _0x437379(new Error(_0x15f182+_0x591813(0x13b)+_0x5507d1+_0x591813(0x12e)+_0x4a40b6));}),_0x3c9ba8['on'](_0x4d6c62(0x146),_0x437379);});}function spawnViteBuildWatch(_0xc870db){return new Promise((_0x4e4521,_0x57da73)=>{const _0x28948e=a245_0x4efe,_0x5a520e=spawn(_0x28948e(0x149),[_0x28948e(0x121),'--watch'],{'cwd':_0xc870db,'stdio':_0x28948e(0x140),'shell':!![],'env':{...process.env,'PATH':''+join(_0xc870db,_0x28948e(0x113),'.bin')+delimiter+process.env.PATH}});_0x5a520e['on'](_0x28948e(0x124),_0x33b923=>{const _0x447f5f=_0x28948e;if(_0x33b923===0x0||_0x33b923===null)_0x4e4521();else _0x57da73(new Error(_0x447f5f(0x11c)+_0x33b923));}),_0x5a520e['on'](_0x28948e(0x146),_0x57da73);});}function spawnVitePreview(_0x250e03){return new Promise((_0x53de58,_0xd60f0d)=>{const _0x4f97b4=a245_0x4efe,_0x86c1b9=spawn('vite',[_0x4f97b4(0x11a)],{'cwd':_0x250e03,'stdio':_0x4f97b4(0x140),'shell':!![],'env':{...process.env,'PATH':''+join(_0x250e03,'node_modules',_0x4f97b4(0x110))+delimiter+process.env.PATH}});_0x86c1b9['on'](_0x4f97b4(0x124),_0x4474d5=>{const _0x403c9=_0x4f97b4;if(_0x4474d5===0x0||_0x4474d5===null)_0x53de58();else _0xd60f0d(new Error(_0x403c9(0x145)+_0x4474d5));}),_0x86c1b9['on'](_0x4f97b4(0x146),_0xd60f0d);});}const runFlags=[{'name':a245_0x508598(0x12d),'type':a245_0x508598(0x12a),'description':a245_0x508598(0x12b),'default':![]}];export const runDefinition={'service':a245_0x508598(0x148),'command':a245_0x508598(0x148),'description':a245_0x508598(0x135),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'script','description':'Script\x20name\x20defined\x20in\x20package.json','required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x4f51ef=a245_0x508598,_0x2cf706=[];return _0x2cf706[_0x4f51ef(0x129)]('\x20\x20EXAMPLES'),_0x2cf706[_0x4f51ef(0x129)](_0x4f51ef(0x134)+CLI_BIN_NAME+'\x20run\x20start'),_0x2cf706['push'](_0x4f51ef(0x134)+CLI_BIN_NAME+_0x4f51ef(0x13c)),_0x2cf706[_0x4f51ef(0x129)](_0x4f51ef(0x134)+CLI_BIN_NAME+_0x4f51ef(0x131)),_0x2cf706[_0x4f51ef(0x129)]('\x20\x20\x20\x20'+CLI_BIN_NAME+'\x20run\x20preview\x20--watch'),_0x2cf706[_0x4f51ef(0x117)]('\x0a');},async 'execute'(_0x3ffbac){const _0x59c5bd=a245_0x508598,_0x5ed125=process[_0x59c5bd(0x11f)](),_0x2859d9=_0x3ffbac[_0x59c5bd(0x144)][0x0],_0x7750da=_0x3ffbac[_0x59c5bd(0x144)]['slice'](0x1),_0xf11507=readPackageScripts(_0x5ed125);if(!_0xf11507)throw CliErrors[_0x59c5bd(0x13a)]('No\x20package.json\x20found\x20in\x20current\x20directory.');if(!_0x2859d9){const _0x3756bf=Object['keys'](_0xf11507);if(_0x3756bf[_0x59c5bd(0x11e)]===0x0)console[_0x59c5bd(0x136)](_0x59c5bd(0x133));else{console['log'](_0x59c5bd(0x12f));for(const _0xc98352 of _0x3756bf){console[_0x59c5bd(0x136)](_0x59c5bd(0x134)+_0xc98352);}console[_0x59c5bd(0x136)]('\x0a\x20\x20Usage:\x20'+CLI_BIN_NAME+_0x59c5bd(0x14d));}return{'ok':!![]};}if(!_0xf11507[_0x2859d9])throw CliErrors[_0x59c5bd(0x13a)](_0x59c5bd(0x128)+_0x2859d9+'\x22\x20not\x20found\x20in\x20package.json.',_0x59c5bd(0x126)+(Object[_0x59c5bd(0x14a)](_0xf11507)[_0x59c5bd(0x117)](',\x20')||_0x59c5bd(0x132)));const _0x21351e=detectPackageManager(_0x5ed125),_0x207d94=syncProjectDomainRoutingBeforeScript(_0x5ed125,_0x2859d9);_0x207d94?.[_0x59c5bd(0x14b)]&&console[_0x59c5bd(0x146)](_0x59c5bd(0x137)+_0x207d94[_0x59c5bd(0x14e)]);VERSION_CHECK_SCRIPTS[_0x59c5bd(0x120)](_0x2859d9)&&await versionCheck(_0x5ed125);if(_0x2859d9===_0x59c5bd(0x11a)&&_0x3ffbac['bool'](_0x59c5bd(0x12d)))return await Promise['all']([spawnViteBuildWatch(_0x5ed125),spawnVitePreview(_0x5ed125)]),{'ok':!![]};return await spawnScript(_0x21351e,_0x2859d9,_0x7750da,_0x5ed125),{'ok':!![]};}};function a245_0x5209(){const _0x51f743=['21786AMmHdk','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','16owyWhc','length','cwd','has','build','6583419AuTaYg','needsUpgrade','close','1843716OCMCzL','Available:\x20','153372ZiPCbL','Script\x20\x22','push','boolean','Enable\x20watch\x20mode\x20for\x20preview','package.json','watch','\x20exited\x20with\x20code\x20','\x0a\x20\x20Available\x20scripts:\x0a','bun.lock','\x20run\x20preview','(none)','No\x20scripts\x20defined\x20in\x20package.json.','\x20\x20\x20\x20','Run\x20a\x20package.json\x20script','log','Domain\x20routing\x20synchronized:\x20','dev','4172TVYDQb','validation','\x20run\x20','\x20run\x20build','25JBRdSu','start','10bLbTsT','inherit','bun','31030155GlzzbI','parse','args','vite\x20preview\x20exited\x20with\x20code\x20','error','bun.lockb','run','vite','keys','changed','utf-8','\x20run\x20<script>\x0a','path','.bin','1275oPMrFc','pnpm-lock.yaml','node_modules','yarn.lock','19974SAzPBf','pnpm','join','99dmgKPO','473fgVWXW','preview'];a245_0x5209=function(){return _0x51f743;};return a245_0x5209();}
@@ -1 +1 @@
1
- function a246_0x4be8(_0x4d8274,_0x586421){_0x4d8274=_0x4d8274-0x87;const _0x2a4534=a246_0x2a45();let _0x4be8bd=_0x2a4534[_0x4d8274];return _0x4be8bd;}const a246_0x4e41d8=a246_0x4be8;(function(_0x29cf30,_0x16ca14){const _0x2629e6=a246_0x4be8,_0x4f02b8=_0x29cf30();while(!![]){try{const _0xd66559=-parseInt(_0x2629e6(0x8a))/0x1+-parseInt(_0x2629e6(0x92))/0x2*(parseInt(_0x2629e6(0x90))/0x3)+parseInt(_0x2629e6(0x88))/0x4+parseInt(_0x2629e6(0x91))/0x5+-parseInt(_0x2629e6(0x87))/0x6+-parseInt(_0x2629e6(0x8d))/0x7*(parseInt(_0x2629e6(0x8b))/0x8)+parseInt(_0x2629e6(0x8c))/0x9;if(_0xd66559===_0x16ca14)break;else _0x4f02b8['push'](_0x4f02b8['shift']());}catch(_0x4603ee){_0x4f02b8['push'](_0x4f02b8['shift']());}}}(a246_0x2a45,0x811dd));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x1b71b8){const _0x44f44c=await buildSchemaPayload();return{'ok':!![],'data':_0x44f44c};}export const schemaDefinition={'service':a246_0x4e41d8(0x8f),'command':a246_0x4e41d8(0x89),'description':a246_0x4e41d8(0x8e),'risk':a246_0x4e41d8(0x93),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':'json','flags':[],'execute':execute};function a246_0x2a45(){const _0x5a8e81=['3994566blGxcC','3391160DuMUSe','export','442170pqGPDM','23224jQHDva','15747021HmoJKE','2373YEQrqY','Export\x20machine-readable\x20command\x20schema\x20(JSON)','schema','126624hAGwQZ','4127010WRBhRq','38VEAiRo','read'];a246_0x2a45=function(){return _0x5a8e81;};return a246_0x2a45();}
1
+ const a246_0x853e63=a246_0xce5c;(function(_0x3e1397,_0x442beb){const _0xe692db=a246_0xce5c,_0x1b1d4d=_0x3e1397();while(!![]){try{const _0x5a175f=parseInt(_0xe692db(0xdd))/0x1*(parseInt(_0xe692db(0xd9))/0x2)+parseInt(_0xe692db(0xd6))/0x3+parseInt(_0xe692db(0xdb))/0x4*(-parseInt(_0xe692db(0xdc))/0x5)+-parseInt(_0xe692db(0xd7))/0x6+parseInt(_0xe692db(0xda))/0x7+parseInt(_0xe692db(0xd3))/0x8+-parseInt(_0xe692db(0xde))/0x9*(parseInt(_0xe692db(0xd1))/0xa);if(_0x5a175f===_0x442beb)break;else _0x1b1d4d['push'](_0x1b1d4d['shift']());}catch(_0x3110d0){_0x1b1d4d['push'](_0x1b1d4d['shift']());}}}(a246_0x28c2,0x7cbb6));function a246_0xce5c(_0x11ce6e,_0x577727){_0x11ce6e=_0x11ce6e-0xd0;const _0x28c2c1=a246_0x28c2();let _0xce5c62=_0x28c2c1[_0x11ce6e];return _0xce5c62;}import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x54d8fe){const _0x69c8cc=await buildSchemaPayload();return{'ok':!![],'data':_0x69c8cc};}export const schemaDefinition={'service':a246_0x853e63(0xd4),'command':a246_0x853e63(0xd8),'description':a246_0x853e63(0xd0),'risk':a246_0x853e63(0xd2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a246_0x853e63(0xd5),'flags':[],'execute':execute};function a246_0x28c2(){const _0x40503d=['read','7938888kAAwuT','schema','json','1034595yFRgon','3854982MoEbxt','export','109708iFdVzY','3463838vrgcsW','20peNqWj','378415IrBfKL','14nZosFo','9DeQEkr','Export\x20machine-readable\x20command\x20schema\x20(JSON)','10682020odRgFn'];a246_0x28c2=function(){return _0x40503d;};return a246_0x28c2();}
@@ -1 +1 @@
1
- const a247_0x23c4da=a247_0x131c;(function(_0x45951c,_0x3fd2b0){const _0x30cd9b=a247_0x131c,_0x3e8eeb=_0x45951c();while(!![]){try{const _0x1014a3=parseInt(_0x30cd9b(0x138))/0x1*(parseInt(_0x30cd9b(0x13d))/0x2)+parseInt(_0x30cd9b(0x117))/0x3*(-parseInt(_0x30cd9b(0x135))/0x4)+parseInt(_0x30cd9b(0x11b))/0x5*(parseInt(_0x30cd9b(0x13f))/0x6)+-parseInt(_0x30cd9b(0x144))/0x7*(-parseInt(_0x30cd9b(0x111))/0x8)+parseInt(_0x30cd9b(0x10a))/0x9+parseInt(_0x30cd9b(0x13a))/0xa*(-parseInt(_0x30cd9b(0x118))/0xb)+-parseInt(_0x30cd9b(0x145))/0xc;if(_0x1014a3===_0x3fd2b0)break;else _0x3e8eeb['push'](_0x3e8eeb['shift']());}catch(_0x3e1f33){_0x3e8eeb['push'](_0x3e8eeb['shift']());}}}(a247_0x5a08,0xb0751));import{writeFile}from'node:fs/promises';import{input,select}from'@inquirer/prompts';import{createSqlQuery}from'../../core/api-client.js';import{getDbName,listDatabases}from'../../core/db-resolver.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{ensureParentDirectory,fileExists}from'../../core/bff/file-system.js';import{computeSqlContentHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{buildSqlRelativePath}from'../../core/sql-sync/utils.js';import{CliErrors}from'../../errors.js';import{buildLocalSqlFileContent,buildSqlLockEntry,ensureRemoteSqlContent}from'./shared.js';function generateSqlTemplate(_0x49ea50){const _0x218c05=a247_0x131c;if(_0x49ea50===_0x218c05(0x119))return[_0x218c05(0x114),_0x218c05(0x123),_0x218c05(0x12e),'']['join']('\x0a');return[_0x218c05(0x132),''][_0x218c05(0x11d)]('\x0a');}export const sqlCreate={'service':'sql','command':a247_0x23c4da(0x112),'description':a247_0x23c4da(0x140),'risk':a247_0x23c4da(0x130),'flags':[{'name':a247_0x23c4da(0x116),'type':'string','description':a247_0x23c4da(0x139)},{'name':a247_0x23c4da(0x124),'type':a247_0x23c4da(0x12c),'description':a247_0x23c4da(0x11e)},{'name':a247_0x23c4da(0x13e),'type':a247_0x23c4da(0x12b),'enum':[a247_0x23c4da(0x129),a247_0x23c4da(0x119)],'description':a247_0x23c4da(0x133)}],async 'validate'(_0x139bd6){const _0x4fab1f=a247_0x23c4da;if(!_0x139bd6['nonInteractive'])return;if(!_0x139bd6[_0x4fab1f(0x125)](_0x4fab1f(0x116))[_0x4fab1f(0x110)]())throw CliErrors[_0x4fab1f(0x136)](_0x4fab1f(0x116),_0x4fab1f(0x10e));const _0x3a03f1=resolveProvidedDbId(_0x139bd6);if(typeof _0x3a03f1!==_0x4fab1f(0x12c)||!Number['isFinite'](_0x3a03f1)||_0x3a03f1<=0x0)throw CliErrors[_0x4fab1f(0x136)]('db-id',_0x4fab1f(0x104));if(!_0x139bd6[_0x4fab1f(0x125)]('mode')[_0x4fab1f(0x110)]())throw CliErrors['flagMissing'](_0x4fab1f(0x13e),_0x4fab1f(0x11c));},async 'dryRun'(_0x5d3141){const _0x55df21=a247_0x23c4da,_0x4548d5=loadSqlProjectConfig(_0x5d3141[_0x55df21(0x10d)]),{sqlName:_0x142375,dbId:_0x55fd78,dbName:_0x43388f,mode:_0x9e20c0}=await resolveSqlNewInputs(_0x5d3141),_0x320e4f=buildSqlRelativePath(_0x55df21(0x10b),_0x142375,_0x43388f,_0x9e20c0,_0x55fd78),_0x45a4bf=_0x4548d5[_0x55df21(0x128)]+'/'+_0x320e4f;return{'method':'POST','url':'/smartapi/custom/saveUserCustomSql','body':{'appCode':_0x5d3141[_0x55df21(0x10d)],'sqlName':_0x142375,'dbId':_0x55fd78,'mode':_0x9e20c0,'localPath':_0x45a4bf},'description':'Would\x20create\x20a\x20new\x20SQL\x20query\x20and\x20scaffold\x20it\x20under\x20'+_0x4548d5[_0x55df21(0x128)]};},async 'execute'(_0x3be550){const _0x2b1d01=a247_0x23c4da,_0x6521a1=loadSqlProjectConfig(_0x3be550['appCode']),{sqlName:_0x344e92,dbId:_0x428044,dbName:_0x44b5d6,mode:_0x57e938}=await resolveSqlNewInputs(_0x3be550),_0x5061cd=generateSqlTemplate(_0x57e938),_0x116118=await createSqlQuery({'appCode':_0x3be550[_0x2b1d01(0x10d)],'sqlName':_0x344e92,'dbId':_0x428044,'sqlContent':_0x5061cd}),_0x4d1149=ensureRemoteSqlContent(_0x116118),_0x256fa8=_0x44b5d6||await getDbName(_0x3be550[_0x2b1d01(0x10d)],_0x428044)[_0x2b1d01(0x10f)](()=>undefined),_0x5adc09=buildSqlRelativePath(_0x116118[_0x2b1d01(0x127)],_0x116118[_0x2b1d01(0x148)],_0x256fa8,_0x57e938,_0x428044),_0x4133ef=_0x6521a1[_0x2b1d01(0x128)]+'/'+_0x5adc09,_0x41f928=buildLocalSqlFileContent({'sqlCode':_0x116118[_0x2b1d01(0x127)],'sqlName':_0x116118['sqlName'],'dbId':_0x116118[_0x2b1d01(0x13c)]},_0x4d1149,{'dbName':_0x256fa8,'mode':_0x57e938,'syncedAt':new Date()[_0x2b1d01(0x147)](),'description':_0x116118[_0x2b1d01(0x137)]});if(await fileExists(_0x4133ef))throw CliErrors['validation'](_0x2b1d01(0x134)+_0x4133ef);await ensureParentDirectory(_0x4133ef),await writeFile(_0x4133ef,_0x41f928,_0x2b1d01(0x146));const _0x8ae610=await readSqlLockFile(_0x6521a1['lockFilePath']),{lockData:_0x363255,appLock:_0x4b74b0}=ensureSqlLockScope(_0x8ae610??createEmptySqlLock(),_0x6521a1[_0x2b1d01(0x10d)],_0x6521a1[_0x2b1d01(0x126)],'new');return _0x4b74b0['sqls'][_0x116118[_0x2b1d01(0x127)]]={...buildSqlLockEntry(_0x116118,_0x4d1149,computeSqlContentHash(_0x41f928),{'dbName':_0x256fa8}),'path':_0x5adc09,'mode':_0x57e938},_0x4b74b0[_0x2b1d01(0x12f)]=new Date()[_0x2b1d01(0x147)](),await writeSqlLockFile(_0x6521a1['lockFilePath'],_0x363255),{'ok':!![],'data':{'id':_0x116118['id'],'sqlCode':_0x116118[_0x2b1d01(0x127)],'sqlName':_0x116118[_0x2b1d01(0x148)],'dbId':_0x116118[_0x2b1d01(0x13c)],'path':_0x4133ef,'mode':_0x57e938},'message':_0x2b1d01(0x141)+_0x116118['sqlCode']};}};async function resolveSqlNewInputs(_0x16d84e){const _0x53d57c=await resolveSqlNameInput(_0x16d84e),{dbId:_0x2ba84f,dbName:_0x3bb57d}=await resolveDbSelection(_0x16d84e),_0x233651=await resolveSqlModeInput(_0x16d84e);return{'sqlName':_0x53d57c,'dbId':_0x2ba84f,'dbName':_0x3bb57d,'mode':_0x233651};}async function resolveSqlNameInput(_0x319460){const _0x504b92=a247_0x23c4da,_0x2be16f=_0x319460['str']('name')[_0x504b92(0x110)]();if(_0x2be16f)return _0x2be16f;if(_0x319460[_0x504b92(0x108)])throw CliErrors[_0x504b92(0x136)](_0x504b92(0x116),_0x504b92(0x10e));return(await input({'message':'SQL\x20name:','validate':_0x35f0b7=>_0x35f0b7[_0x504b92(0x110)]()?!![]:_0x504b92(0x13b)}))['trim']();}async function resolveDbSelection(_0x55d6e9){const _0x3666a4=a247_0x23c4da,_0x1ce638=resolveProvidedDbId(_0x55d6e9);if(typeof _0x1ce638===_0x3666a4(0x12c)&&Number['isFinite'](_0x1ce638)&&_0x1ce638>0x0)return{'dbId':_0x1ce638,'dbName':await getDbName(_0x55d6e9[_0x3666a4(0x10d)],_0x1ce638)[_0x3666a4(0x10f)](()=>undefined)};if(_0x55d6e9['nonInteractive'])throw CliErrors[_0x3666a4(0x136)]('db-id',_0x3666a4(0x104));const _0x140cef=await listDatabases(_0x55d6e9[_0x3666a4(0x10d)])[_0x3666a4(0x10f)](()=>[]);if(_0x140cef[_0x3666a4(0x113)]===0x1)return{'dbId':_0x140cef[0x0][_0x3666a4(0x13c)],'dbName':_0x140cef[0x0]['dbName']};if(_0x140cef[_0x3666a4(0x113)]>0x1){const _0xe234e6=await select({'message':'Select\x20the\x20target\x20database:','choices':[..._0x140cef[_0x3666a4(0x143)](_0x3ba4f6=>({'name':_0x3ba4f6[_0x3666a4(0x122)]+'\x20('+_0x3ba4f6[_0x3666a4(0x13c)]+')','value':serializeDbSelection(_0x3ba4f6)})),{'name':_0x3666a4(0x11f),'value':_0x3666a4(0x120)}]});if(_0xe234e6!==_0x3666a4(0x120))return deserializeDbSelection(_0xe234e6);}const _0x106920=await input({'message':_0x3666a4(0x115),'validate':_0x44dd2c=>{const _0x3d5687=_0x3666a4,_0x535266=_0x44dd2c[_0x3d5687(0x110)]();if(!_0x535266)return _0x3d5687(0x10c);const _0x400813=Number(_0x535266);if(!Number['isInteger'](_0x400813)||_0x400813<=0x0)return _0x3d5687(0x107);return!![];}});return{'dbId':Number(_0x106920[_0x3666a4(0x110)]())};}function a247_0x5a08(){const _0x238697=['write','For\x20MyBatis\x20XML\x20SQL\x20with\x20dynamic\x20tags','SELECT\x201\x20AS\x20id;','Local\x20SQL\x20file\x20mode','File\x20already\x20exists:\x20','1316kYtKQo','flagMissing','description','1DsBgHO','SQL\x20query\x20display\x20name','310rxUlUr','SQL\x20name\x20cannot\x20be\x20empty','dbId','1422134sjKRwE','mode','2709318ZdOIeb','Create\x20a\x20new\x20custom\x20SQL\x20and\x20scaffold\x20it\x20locally','Created\x20SQL\x20query\x20','MyBatis\x20XML\x20(mybatisXml)','map','193655ErZZQN','20523996TsbQCk','utf8','toISOString','sqlName','parse','--db-id\x20is\x20required\x20in\x20non-interactive\x20mode.','flag','Select\x20the\x20local\x20SQL\x20mode:','dbId\x20must\x20be\x20a\x20positive\x20integer','nonInteractive','For\x20SELECT\x20/\x20INSERT\x20/\x20UPDATE\x20/\x20DELETE\x20statements\x20that\x20run\x20directly','9729495gzcIhL','<server-generated-sqlCode>','dbId\x20cannot\x20be\x20empty','appCode','--name\x20is\x20required\x20in\x20non-interactive\x20mode.','catch','trim','152HTyIWm','create','length','<select\x20id=\x22query\x22\x20resultType=\x22map\x22>','Target\x20database\x20dbId:','name','1260nYXjLh','70268mdaUzj','mybatisXml','Plain\x20SQL\x20(sql)','5WTnOKJ','--mode\x20is\x20required\x20in\x20non-interactive\x20mode.','join','Target\x20database\x20ID','✎\x20Enter\x20dbId\x20manually','__manual__','isFinite','dbName','\x20\x20SELECT\x201\x20AS\x20id','db-id','str','sqlRoot','sqlCode','sqlRootDir','sql','stringify','string','number','Invalid\x20database\x20selection\x20payload:\x20','</select>','lastSync'];a247_0x5a08=function(){return _0x238697;};return a247_0x5a08();}async function resolveSqlModeInput(_0x118ef4){const _0x3fdefd=a247_0x23c4da,_0x5d61e5=_0x118ef4[_0x3fdefd(0x125)]('mode')['trim']();if(_0x5d61e5==='sql'||_0x5d61e5===_0x3fdefd(0x119))return _0x5d61e5;if(_0x118ef4[_0x3fdefd(0x108)])throw CliErrors[_0x3fdefd(0x136)]('mode',_0x3fdefd(0x11c));return await select({'message':_0x3fdefd(0x106),'choices':[{'name':_0x3fdefd(0x11a),'value':_0x3fdefd(0x129),'description':_0x3fdefd(0x109)},{'name':_0x3fdefd(0x142),'value':'mybatisXml','description':_0x3fdefd(0x131)}]});}function serializeDbSelection(_0x3fec29){const _0x55833a=a247_0x23c4da;return JSON[_0x55833a(0x12a)]({'dbId':_0x3fec29['dbId'],'dbName':_0x3fec29['dbName']});}function deserializeDbSelection(_0x373d81){const _0xb2a11=a247_0x23c4da;try{const _0x5cc218=JSON[_0xb2a11(0x103)](_0x373d81);if(typeof _0x5cc218[_0xb2a11(0x13c)]===_0xb2a11(0x12c)&&Number[_0xb2a11(0x121)](_0x5cc218[_0xb2a11(0x13c)]))return{'dbId':_0x5cc218['dbId'],'dbName':_0x5cc218[_0xb2a11(0x122)]};}catch{}throw CliErrors['validation'](_0xb2a11(0x12d)+_0x373d81);}function a247_0x131c(_0x5a5b36,_0x5e5000){_0x5a5b36=_0x5a5b36-0x103;const _0x5a08ec=a247_0x5a08();let _0x131c46=_0x5a08ec[_0x5a5b36];return _0x131c46;}function resolveProvidedDbId(_0x5aee3b){const _0x5d90c0=a247_0x23c4da,_0x126a5b=_0x5aee3b[_0x5d90c0(0x105)](_0x5d90c0(0x124));if(typeof _0x126a5b==='number'&&Number[_0x5d90c0(0x121)](_0x126a5b))return _0x126a5b;return undefined;}
1
+ const a247_0x498c40=a247_0x5dac;(function(_0x430240,_0x33c08f){const _0x37ef96=a247_0x5dac,_0x439e8a=_0x430240();while(!![]){try{const _0x46f8aa=-parseInt(_0x37ef96(0x1ef))/0x1+-parseInt(_0x37ef96(0x1db))/0x2*(-parseInt(_0x37ef96(0x1be))/0x3)+parseInt(_0x37ef96(0x1eb))/0x4*(-parseInt(_0x37ef96(0x1cd))/0x5)+parseInt(_0x37ef96(0x1f1))/0x6*(-parseInt(_0x37ef96(0x1df))/0x7)+-parseInt(_0x37ef96(0x1e5))/0x8*(-parseInt(_0x37ef96(0x1d6))/0x9)+-parseInt(_0x37ef96(0x1cb))/0xa*(-parseInt(_0x37ef96(0x1e2))/0xb)+parseInt(_0x37ef96(0x1d9))/0xc;if(_0x46f8aa===_0x33c08f)break;else _0x439e8a['push'](_0x439e8a['shift']());}catch(_0x55b64c){_0x439e8a['push'](_0x439e8a['shift']());}}}(a247_0x72ba,0x46a35));import{writeFile}from'node:fs/promises';import{input,select}from'@inquirer/prompts';import{createSqlQuery}from'../../core/api-client.js';function a247_0x72ba(){const _0x317fe0=['8FQQVsa','Would\x20create\x20a\x20new\x20SQL\x20query\x20and\x20scaffold\x20it\x20under\x20','mode','str','Created\x20SQL\x20query\x20','length','8nfSDzl','isFinite','join','sql','516651JThaUQ','For\x20SELECT\x20/\x20INSERT\x20/\x20UPDATE\x20/\x20DELETE\x20statements\x20that\x20run\x20directly','1818yrmFBw','nonInteractive','dbId\x20cannot\x20be\x20empty','Select\x20the\x20target\x20database:','<select\x20id=\x22query\x22\x20resultType=\x22map\x22>','lockFilePath','string','Plain\x20SQL\x20(sql)','appCode','trim','MyBatis\x20XML\x20(mybatisXml)','flag','__manual__','Create\x20a\x20new\x20custom\x20SQL\x20and\x20scaffold\x20it\x20locally','<server-generated-sqlCode>','1395DhKgsB','utf8','Target\x20database\x20dbId:','--name\x20is\x20required\x20in\x20non-interactive\x20mode.','Select\x20the\x20local\x20SQL\x20mode:','name','isInteger','db-id','catch','lastSync','dbName','dbId','For\x20MyBatis\x20XML\x20SQL\x20with\x20dynamic\x20tags','70ciVCsr','/smartapi/custom/saveUserCustomSql','1140065fQJIvU','SQL\x20query\x20display\x20name','validation','sqlCode','number','sqlName','mybatisXml','new','File\x20already\x20exists:\x20','1859157IWMtqZ','sqlRootDir','parse','10377792swjZnI','map','514NoIoTJ','stringify','sqlRoot','SELECT\x201\x20AS\x20id;','10843lLHacQ','Target\x20database\x20ID','flagMissing','849299KYTVPs','</select>','SQL\x20name:'];a247_0x72ba=function(){return _0x317fe0;};return a247_0x72ba();}import{getDbName,listDatabases}from'../../core/db-resolver.js';function a247_0x5dac(_0x3c8651,_0x3cfebf){_0x3c8651=_0x3c8651-0x1b2;const _0x72ba7a=a247_0x72ba();let _0x5dac1b=_0x72ba7a[_0x3c8651];return _0x5dac1b;}import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{ensureParentDirectory,fileExists}from'../../core/bff/file-system.js';import{computeSqlContentHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{buildSqlRelativePath}from'../../core/sql-sync/utils.js';import{CliErrors}from'../../errors.js';import{buildLocalSqlFileContent,buildSqlLockEntry,ensureRemoteSqlContent}from'./shared.js';function generateSqlTemplate(_0x5a4958){const _0x4e8d46=a247_0x5dac;if(_0x5a4958===_0x4e8d46(0x1d3))return[_0x4e8d46(0x1b3),'\x20\x20SELECT\x201\x20AS\x20id',_0x4e8d46(0x1e3),''][_0x4e8d46(0x1ed)]('\x0a');return[_0x4e8d46(0x1de),''][_0x4e8d46(0x1ed)]('\x0a');}export const sqlCreate={'service':'sql','command':'create','description':a247_0x498c40(0x1bc),'risk':'write','flags':[{'name':a247_0x498c40(0x1c3),'type':a247_0x498c40(0x1b5),'description':a247_0x498c40(0x1ce)},{'name':a247_0x498c40(0x1c5),'type':'number','description':a247_0x498c40(0x1e0)},{'name':'mode','type':a247_0x498c40(0x1b5),'enum':[a247_0x498c40(0x1ee),a247_0x498c40(0x1d3)],'description':'Local\x20SQL\x20file\x20mode'}],async 'validate'(_0x84f6ef){const _0x26591c=a247_0x498c40;if(!_0x84f6ef[_0x26591c(0x1f2)])return;if(!_0x84f6ef[_0x26591c(0x1e8)](_0x26591c(0x1c3))['trim']())throw CliErrors[_0x26591c(0x1e1)](_0x26591c(0x1c3),_0x26591c(0x1c1));const _0x1ee3ea=resolveProvidedDbId(_0x84f6ef);if(typeof _0x1ee3ea!=='number'||!Number[_0x26591c(0x1ec)](_0x1ee3ea)||_0x1ee3ea<=0x0)throw CliErrors['flagMissing'](_0x26591c(0x1c5),'--db-id\x20is\x20required\x20in\x20non-interactive\x20mode.');if(!_0x84f6ef[_0x26591c(0x1e8)]('mode')[_0x26591c(0x1b8)]())throw CliErrors['flagMissing'](_0x26591c(0x1e7),'--mode\x20is\x20required\x20in\x20non-interactive\x20mode.');},async 'dryRun'(_0x5f1963){const _0x3bc200=a247_0x498c40,_0x3e11b6=loadSqlProjectConfig(_0x5f1963[_0x3bc200(0x1b7)]),{sqlName:_0x4ad04a,dbId:_0x3b77f9,dbName:_0x179aa1,mode:_0x8734f}=await resolveSqlNewInputs(_0x5f1963),_0x56d375=buildSqlRelativePath(_0x3bc200(0x1bd),_0x4ad04a,_0x179aa1,_0x8734f,_0x3b77f9),_0x5757d8=_0x3e11b6['sqlRootDir']+'/'+_0x56d375;return{'method':'POST','url':_0x3bc200(0x1cc),'body':{'appCode':_0x5f1963['appCode'],'sqlName':_0x4ad04a,'dbId':_0x3b77f9,'mode':_0x8734f,'localPath':_0x5757d8},'description':_0x3bc200(0x1e6)+_0x3e11b6[_0x3bc200(0x1d7)]};},async 'execute'(_0x2c72cc){const _0xdac758=a247_0x498c40,_0x1f0cac=loadSqlProjectConfig(_0x2c72cc['appCode']),{sqlName:_0x10f951,dbId:_0x96bbb,dbName:_0x4eaa36,mode:_0x38f341}=await resolveSqlNewInputs(_0x2c72cc),_0x5421f8=generateSqlTemplate(_0x38f341),_0x4c839a=await createSqlQuery({'appCode':_0x2c72cc[_0xdac758(0x1b7)],'sqlName':_0x10f951,'dbId':_0x96bbb,'sqlContent':_0x5421f8}),_0x33b55e=ensureRemoteSqlContent(_0x4c839a),_0x8a112c=_0x4eaa36||await getDbName(_0x2c72cc[_0xdac758(0x1b7)],_0x96bbb)[_0xdac758(0x1c6)](()=>undefined),_0x575c80=buildSqlRelativePath(_0x4c839a[_0xdac758(0x1d0)],_0x4c839a[_0xdac758(0x1d2)],_0x8a112c,_0x38f341,_0x96bbb),_0x3e31c0=_0x1f0cac[_0xdac758(0x1d7)]+'/'+_0x575c80,_0x22c9aa=buildLocalSqlFileContent({'sqlCode':_0x4c839a[_0xdac758(0x1d0)],'sqlName':_0x4c839a[_0xdac758(0x1d2)],'dbId':_0x4c839a[_0xdac758(0x1c9)]},_0x33b55e,{'dbName':_0x8a112c,'mode':_0x38f341,'syncedAt':new Date()['toISOString'](),'description':_0x4c839a['description']});if(await fileExists(_0x3e31c0))throw CliErrors['validation'](_0xdac758(0x1d5)+_0x3e31c0);await ensureParentDirectory(_0x3e31c0),await writeFile(_0x3e31c0,_0x22c9aa,_0xdac758(0x1bf));const _0x3e1944=await readSqlLockFile(_0x1f0cac[_0xdac758(0x1b4)]),{lockData:_0xf6b17e,appLock:_0x190a7b}=ensureSqlLockScope(_0x3e1944??createEmptySqlLock(),_0x1f0cac[_0xdac758(0x1b7)],_0x1f0cac[_0xdac758(0x1dd)],_0xdac758(0x1d4));return _0x190a7b['sqls'][_0x4c839a[_0xdac758(0x1d0)]]={...buildSqlLockEntry(_0x4c839a,_0x33b55e,computeSqlContentHash(_0x22c9aa),{'dbName':_0x8a112c}),'path':_0x575c80,'mode':_0x38f341},_0x190a7b[_0xdac758(0x1c7)]=new Date()['toISOString'](),await writeSqlLockFile(_0x1f0cac[_0xdac758(0x1b4)],_0xf6b17e),{'ok':!![],'data':{'id':_0x4c839a['id'],'sqlCode':_0x4c839a[_0xdac758(0x1d0)],'sqlName':_0x4c839a[_0xdac758(0x1d2)],'dbId':_0x4c839a[_0xdac758(0x1c9)],'path':_0x3e31c0,'mode':_0x38f341},'message':_0xdac758(0x1e9)+_0x4c839a[_0xdac758(0x1d0)]};}};async function resolveSqlNewInputs(_0x4e0a1e){const _0x2dfad7=await resolveSqlNameInput(_0x4e0a1e),{dbId:_0x2ede41,dbName:_0x4f43a9}=await resolveDbSelection(_0x4e0a1e),_0x2127f9=await resolveSqlModeInput(_0x4e0a1e);return{'sqlName':_0x2dfad7,'dbId':_0x2ede41,'dbName':_0x4f43a9,'mode':_0x2127f9};}async function resolveSqlNameInput(_0x30ab45){const _0x29aafc=a247_0x498c40,_0x4c1732=_0x30ab45['str'](_0x29aafc(0x1c3))[_0x29aafc(0x1b8)]();if(_0x4c1732)return _0x4c1732;if(_0x30ab45[_0x29aafc(0x1f2)])throw CliErrors['flagMissing'](_0x29aafc(0x1c3),_0x29aafc(0x1c1));return(await input({'message':_0x29aafc(0x1e4),'validate':_0x260b2e=>_0x260b2e[_0x29aafc(0x1b8)]()?!![]:'SQL\x20name\x20cannot\x20be\x20empty'}))['trim']();}async function resolveDbSelection(_0x5618ff){const _0x3e7747=a247_0x498c40,_0x5cdccc=resolveProvidedDbId(_0x5618ff);if(typeof _0x5cdccc===_0x3e7747(0x1d1)&&Number[_0x3e7747(0x1ec)](_0x5cdccc)&&_0x5cdccc>0x0)return{'dbId':_0x5cdccc,'dbName':await getDbName(_0x5618ff[_0x3e7747(0x1b7)],_0x5cdccc)['catch'](()=>undefined)};if(_0x5618ff['nonInteractive'])throw CliErrors[_0x3e7747(0x1e1)](_0x3e7747(0x1c5),'--db-id\x20is\x20required\x20in\x20non-interactive\x20mode.');const _0x33e315=await listDatabases(_0x5618ff[_0x3e7747(0x1b7)])['catch'](()=>[]);if(_0x33e315[_0x3e7747(0x1ea)]===0x1)return{'dbId':_0x33e315[0x0][_0x3e7747(0x1c9)],'dbName':_0x33e315[0x0]['dbName']};if(_0x33e315[_0x3e7747(0x1ea)]>0x1){const _0x8bc652=await select({'message':_0x3e7747(0x1b2),'choices':[..._0x33e315[_0x3e7747(0x1da)](_0x2559c2=>({'name':_0x2559c2[_0x3e7747(0x1c8)]+'\x20('+_0x2559c2['dbId']+')','value':serializeDbSelection(_0x2559c2)})),{'name':'✎\x20Enter\x20dbId\x20manually','value':'__manual__'}]});if(_0x8bc652!==_0x3e7747(0x1bb))return deserializeDbSelection(_0x8bc652);}const _0x387732=await input({'message':_0x3e7747(0x1c0),'validate':_0x4764ba=>{const _0x2a9056=_0x3e7747,_0xf57a05=_0x4764ba['trim']();if(!_0xf57a05)return _0x2a9056(0x1f3);const _0x2bfc14=Number(_0xf57a05);if(!Number[_0x2a9056(0x1c4)](_0x2bfc14)||_0x2bfc14<=0x0)return'dbId\x20must\x20be\x20a\x20positive\x20integer';return!![];}});return{'dbId':Number(_0x387732[_0x3e7747(0x1b8)]())};}async function resolveSqlModeInput(_0x695f07){const _0x38421e=a247_0x498c40,_0x151737=_0x695f07['str'](_0x38421e(0x1e7))['trim']();if(_0x151737===_0x38421e(0x1ee)||_0x151737===_0x38421e(0x1d3))return _0x151737;if(_0x695f07[_0x38421e(0x1f2)])throw CliErrors['flagMissing']('mode','--mode\x20is\x20required\x20in\x20non-interactive\x20mode.');return await select({'message':_0x38421e(0x1c2),'choices':[{'name':_0x38421e(0x1b6),'value':_0x38421e(0x1ee),'description':_0x38421e(0x1f0)},{'name':_0x38421e(0x1b9),'value':'mybatisXml','description':_0x38421e(0x1ca)}]});}function serializeDbSelection(_0x45166c){const _0x51c5ea=a247_0x498c40;return JSON[_0x51c5ea(0x1dc)]({'dbId':_0x45166c[_0x51c5ea(0x1c9)],'dbName':_0x45166c[_0x51c5ea(0x1c8)]});}function deserializeDbSelection(_0x3534bc){const _0x277ac0=a247_0x498c40;try{const _0x1dfe75=JSON[_0x277ac0(0x1d8)](_0x3534bc);if(typeof _0x1dfe75['dbId']===_0x277ac0(0x1d1)&&Number[_0x277ac0(0x1ec)](_0x1dfe75[_0x277ac0(0x1c9)]))return{'dbId':_0x1dfe75[_0x277ac0(0x1c9)],'dbName':_0x1dfe75[_0x277ac0(0x1c8)]};}catch{}throw CliErrors[_0x277ac0(0x1cf)]('Invalid\x20database\x20selection\x20payload:\x20'+_0x3534bc);}function resolveProvidedDbId(_0x5b4e9b){const _0x25ee00=a247_0x498c40,_0x20bee2=_0x5b4e9b[_0x25ee00(0x1ba)](_0x25ee00(0x1c5));if(typeof _0x20bee2===_0x25ee00(0x1d1)&&Number['isFinite'](_0x20bee2))return _0x20bee2;return undefined;}
@@ -1 +1 @@
1
- const a248_0x49093f=a248_0x1526;function a248_0x1526(_0x1924bf,_0x5588ca){_0x1924bf=_0x1924bf-0x18d;const _0x3ac6b7=a248_0x3ac6();let _0x152678=_0x3ac6b7[_0x1924bf];return _0x152678;}(function(_0x168900,_0x4f353d){const _0x315d77=a248_0x1526,_0x3f641f=_0x168900();while(!![]){try{const _0x27e2e2=-parseInt(_0x315d77(0x196))/0x1+parseInt(_0x315d77(0x1a7))/0x2*(-parseInt(_0x315d77(0x19d))/0x3)+-parseInt(_0x315d77(0x1b2))/0x4+parseInt(_0x315d77(0x198))/0x5*(parseInt(_0x315d77(0x191))/0x6)+-parseInt(_0x315d77(0x1a3))/0x7*(-parseInt(_0x315d77(0x1ad))/0x8)+parseInt(_0x315d77(0x194))/0x9+-parseInt(_0x315d77(0x19b))/0xa*(-parseInt(_0x315d77(0x18e))/0xb);if(_0x27e2e2===_0x4f353d)break;else _0x3f641f['push'](_0x3f641f['shift']());}catch(_0x16cea7){_0x3f641f['push'](_0x3f641f['shift']());}}}(a248_0x3ac6,0x7939d));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';function a248_0x3ac6(){const _0x17a70a=['7kmTOME','POST','fromEntries','remoteId','34xDAHBK','Would\x20delete\x20SQL\x20','delete','projectRoot','SQL\x20lock\x20file\x20not\x20found.\x20Run\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first.','filter','3141592hRYbnm','toISOString','sqlRootDir','sqlRoot','No\x20SQL\x20lock\x20entry\x20found\x20for\x20\x22','3557404rNfIZf','trashDir','898502Xsjyoj','replace','sqlcode','41052aNttke','length','validation','8078229HlIiqh','lastSync','374171crddaa','appCode','685qLThmF','entries','high-risk-write','10bEuUdD','sqls','96927RrJhHi','/smartapi/custom/deleteUserCustomSql','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20','str','lockFilePath','startsWith'];a248_0x3ac6=function(){return _0x17a70a;};return a248_0x3ac6();}import{fileExists}from'../../core/bff/file-system.js';import{resolveLocalSqlFilePath}from'../../core/sql-sync/file-system.js';import{ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const sqlDelete={'service':'sql','command':'delete','description':'Delete\x20a\x20SQL\x20query\x20from\x20remote\x20and\x20local','risk':a248_0x49093f(0x19a),'flags':[SQLCODE_FLAG],async 'validate'(_0x6ff45f){const _0x3b7ede=a248_0x49093f,_0x3cdeec=loadSqlProjectConfig(_0x6ff45f[_0x3b7ede(0x197)]),_0x3ae53d=await readSqlLockFile(_0x3cdeec[_0x3b7ede(0x1a1)]);if(!_0x3ae53d)throw CliErrors[_0x3b7ede(0x193)](_0x3b7ede(0x1ab));},async 'dryRun'(_0x167249){const _0x4d3f87=a248_0x49093f,_0x4a62ca=loadSqlProjectConfig(_0x167249[_0x4d3f87(0x197)]),_0x2b371f=await readSqlLockFile(_0x4a62ca['lockFilePath']);if(!_0x2b371f)throw CliErrors[_0x4d3f87(0x193)](_0x4d3f87(0x1ab));const {appLock:_0x1ca0be}=ensureSqlLockScope(_0x2b371f,_0x167249[_0x4d3f87(0x197)],_0x4a62ca[_0x4d3f87(0x1b0)],_0x4d3f87(0x1a9)),_0x3bca78=_0x167249[_0x4d3f87(0x1a0)](_0x4d3f87(0x190)),_0x505bae=_0x1ca0be[_0x4d3f87(0x19c)][_0x3bca78];if(!_0x505bae)throw CliErrors[_0x4d3f87(0x193)](_0x4d3f87(0x1b1)+_0x3bca78+'\x22.');return{'method':_0x4d3f87(0x1a4),'url':_0x4d3f87(0x19e),'body':{'sqlCode':_0x3bca78,'id':_0x505bae[_0x4d3f87(0x1a6)],'localPath':resolveLocalSqlFilePath(_0x4a62ca,_0x3bca78,_0x505bae)},'description':_0x4d3f87(0x1a8)+_0x3bca78+_0x4d3f87(0x19f)+_0x4a62ca[_0x4d3f87(0x18d)]};},async 'execute'(_0x3d6eeb){const _0x2a19cc=a248_0x49093f,_0x5c38a7=loadSqlProjectConfig(_0x3d6eeb[_0x2a19cc(0x197)]),_0xb3042=await readSqlLockFile(_0x5c38a7[_0x2a19cc(0x1a1)]);if(!_0xb3042)throw CliErrors[_0x2a19cc(0x193)]('SQL\x20lock\x20file\x20not\x20found.');const {lockData:_0x1b3a11,appLock:_0x2ee96d}=ensureSqlLockScope(_0xb3042,_0x3d6eeb[_0x2a19cc(0x197)],_0x5c38a7[_0x2a19cc(0x1b0)],'delete'),_0x44b4eb=_0x3d6eeb[_0x2a19cc(0x1a0)]('sqlcode'),_0x1ee187=_0x2ee96d[_0x2a19cc(0x19c)][_0x44b4eb];if(!_0x1ee187)throw CliErrors[_0x2a19cc(0x193)]('No\x20SQL\x20lock\x20entry\x20found\x20for\x20\x22'+_0x44b4eb+'\x22.');await deleteSqlQuery({'id':_0x1ee187[_0x2a19cc(0x1a6)],'sqlCode':_0x44b4eb}),_0x2ee96d['sqls']=Object[_0x2a19cc(0x1a5)](Object[_0x2a19cc(0x199)](_0x2ee96d[_0x2a19cc(0x19c)])[_0x2a19cc(0x1ac)](([_0x16af45])=>_0x16af45!==_0x44b4eb)),_0x2ee96d[_0x2a19cc(0x195)]=new Date()[_0x2a19cc(0x1ae)](),await writeSqlLockFile(_0x5c38a7[_0x2a19cc(0x1a1)],_0x1b3a11);const _0x504579=resolveLocalSqlFilePath(_0x5c38a7,_0x44b4eb,_0x1ee187);let _0x573e92;await fileExists(_0x504579)&&(_0x573e92=await moveToTrash(_0x5c38a7[_0x2a19cc(0x1aa)],_0x5c38a7[_0x2a19cc(0x18d)],_0x504579),await cleanupEmptyDirectories(dirname(_0x504579),_0x5c38a7[_0x2a19cc(0x1af)]));const _0x1d3982={'deleted':_0x44b4eb,'remoteId':_0x1ee187['remoteId']};if(_0x573e92)_0x1d3982['trashedTo']=_0x573e92;return{'ok':!![],'data':_0x1d3982,'message':'Deleted\x20'+_0x44b4eb+(_0x573e92?'\x20(local\x20file\x20moved\x20to\x20trash)':'')};}};async function moveToTrash(_0x1ac90d,_0x1362cd,_0x25a63b){const _0x38d230=a248_0x49093f,_0x4fbb41=new Date()['toISOString']()[_0x38d230(0x18f)](/[:.]/g,'-'),_0x53d275=relative(_0x1ac90d,_0x25a63b),_0x36e69d=join(_0x1362cd,_0x4fbb41,_0x53d275);return await mkdir(dirname(_0x36e69d),{'recursive':!![]}),await rename(_0x25a63b,_0x36e69d),_0x36e69d;}async function cleanupEmptyDirectories(_0x42168c,_0x230a4b){const _0x37a56c=a248_0x49093f;let _0x399687=resolve(_0x42168c);const _0x2dcd8c=resolve(_0x230a4b);while(_0x399687[_0x37a56c(0x1a2)](''+_0x2dcd8c+sep)||_0x399687===_0x2dcd8c){if(_0x399687===_0x2dcd8c)return;try{const _0x422504=await readdir(_0x399687);if(_0x422504[_0x37a56c(0x192)]>0x0)return;await rmdir(_0x399687);}catch{return;}_0x399687=dirname(_0x399687);}}
1
+ const a248_0x551ee5=a248_0x1a08;(function(_0x18e9b6,_0x30d6a1){const _0x463e98=a248_0x1a08,_0x1ef392=_0x18e9b6();while(!![]){try{const _0x4d4321=-parseInt(_0x463e98(0x177))/0x1+parseInt(_0x463e98(0x17b))/0x2+-parseInt(_0x463e98(0x186))/0x3*(parseInt(_0x463e98(0x179))/0x4)+-parseInt(_0x463e98(0x18a))/0x5+parseInt(_0x463e98(0x170))/0x6*(parseInt(_0x463e98(0x183))/0x7)+parseInt(_0x463e98(0x172))/0x8+parseInt(_0x463e98(0x16c))/0x9;if(_0x4d4321===_0x30d6a1)break;else _0x1ef392['push'](_0x1ef392['shift']());}catch(_0xa141d5){_0x1ef392['push'](_0x1ef392['shift']());}}}(a248_0x11a4,0x91d2f));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';function a248_0x11a4(){const _0xa3a681=['POST','validation','lastSync','\x20(local\x20file\x20moved\x20to\x20trash)','sqlRootDir','sqlRoot','appCode','133oyMdng','sql','remoteId','369nxBFPw','trashedTo','filter','fromEntries','694130EFlVUD','/smartapi/custom/deleteUserCustomSql','sqls','high-risk-write','Deleted\x20','11876202abLmcN','str','delete','lockFilePath','99780wgjWHz','SQL\x20lock\x20file\x20not\x20found.','6973656vtxvHZ','startsWith','Would\x20delete\x20SQL\x20','toISOString','No\x20SQL\x20lock\x20entry\x20found\x20for\x20\x22','968200DwuKjO','replace','30476Tilqjr','SQL\x20lock\x20file\x20not\x20found.\x20Run\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first.','268406ZNjUSA'];a248_0x11a4=function(){return _0xa3a681;};return a248_0x11a4();}import{fileExists}from'../../core/bff/file-system.js';function a248_0x1a08(_0x23e804,_0x3ab45c){_0x23e804=_0x23e804-0x16a;const _0x11a411=a248_0x11a4();let _0x1a08b8=_0x11a411[_0x23e804];return _0x1a08b8;}import{resolveLocalSqlFilePath}from'../../core/sql-sync/file-system.js';import{ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const sqlDelete={'service':a248_0x551ee5(0x184),'command':a248_0x551ee5(0x16e),'description':'Delete\x20a\x20SQL\x20query\x20from\x20remote\x20and\x20local','risk':a248_0x551ee5(0x16a),'flags':[SQLCODE_FLAG],async 'validate'(_0x184339){const _0x5ba5a1=a248_0x551ee5,_0x575338=loadSqlProjectConfig(_0x184339[_0x5ba5a1(0x182)]),_0x4f5cd2=await readSqlLockFile(_0x575338['lockFilePath']);if(!_0x4f5cd2)throw CliErrors[_0x5ba5a1(0x17d)]('SQL\x20lock\x20file\x20not\x20found.\x20Run\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first.');},async 'dryRun'(_0x16b11c){const _0x453bb7=a248_0x551ee5,_0x5297c3=loadSqlProjectConfig(_0x16b11c[_0x453bb7(0x182)]),_0x24ff25=await readSqlLockFile(_0x5297c3[_0x453bb7(0x16f)]);if(!_0x24ff25)throw CliErrors[_0x453bb7(0x17d)](_0x453bb7(0x17a));const {appLock:_0x92a19e}=ensureSqlLockScope(_0x24ff25,_0x16b11c['appCode'],_0x5297c3[_0x453bb7(0x181)],_0x453bb7(0x16e)),_0x5ad32a=_0x16b11c[_0x453bb7(0x16d)]('sqlcode'),_0x58aac9=_0x92a19e[_0x453bb7(0x18c)][_0x5ad32a];if(!_0x58aac9)throw CliErrors[_0x453bb7(0x17d)](_0x453bb7(0x176)+_0x5ad32a+'\x22.');return{'method':_0x453bb7(0x17c),'url':_0x453bb7(0x18b),'body':{'sqlCode':_0x5ad32a,'id':_0x58aac9[_0x453bb7(0x185)],'localPath':resolveLocalSqlFilePath(_0x5297c3,_0x5ad32a,_0x58aac9)},'description':_0x453bb7(0x174)+_0x5ad32a+'\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20'+_0x5297c3['trashDir']};},async 'execute'(_0x42da45){const _0x1fac0d=a248_0x551ee5,_0x14f9b7=loadSqlProjectConfig(_0x42da45[_0x1fac0d(0x182)]),_0x2722ed=await readSqlLockFile(_0x14f9b7[_0x1fac0d(0x16f)]);if(!_0x2722ed)throw CliErrors[_0x1fac0d(0x17d)](_0x1fac0d(0x171));const {lockData:_0x1533c3,appLock:_0x1979a4}=ensureSqlLockScope(_0x2722ed,_0x42da45[_0x1fac0d(0x182)],_0x14f9b7[_0x1fac0d(0x181)],_0x1fac0d(0x16e)),_0x56e721=_0x42da45[_0x1fac0d(0x16d)]('sqlcode'),_0x24d210=_0x1979a4[_0x1fac0d(0x18c)][_0x56e721];if(!_0x24d210)throw CliErrors[_0x1fac0d(0x17d)](_0x1fac0d(0x176)+_0x56e721+'\x22.');await deleteSqlQuery({'id':_0x24d210[_0x1fac0d(0x185)],'sqlCode':_0x56e721}),_0x1979a4[_0x1fac0d(0x18c)]=Object[_0x1fac0d(0x189)](Object['entries'](_0x1979a4['sqls'])[_0x1fac0d(0x188)](([_0x38c889])=>_0x38c889!==_0x56e721)),_0x1979a4[_0x1fac0d(0x17e)]=new Date()[_0x1fac0d(0x175)](),await writeSqlLockFile(_0x14f9b7[_0x1fac0d(0x16f)],_0x1533c3);const _0x47b710=resolveLocalSqlFilePath(_0x14f9b7,_0x56e721,_0x24d210);let _0x4f457a;await fileExists(_0x47b710)&&(_0x4f457a=await moveToTrash(_0x14f9b7['projectRoot'],_0x14f9b7['trashDir'],_0x47b710),await cleanupEmptyDirectories(dirname(_0x47b710),_0x14f9b7[_0x1fac0d(0x180)]));const _0x1cad83={'deleted':_0x56e721,'remoteId':_0x24d210[_0x1fac0d(0x185)]};if(_0x4f457a)_0x1cad83[_0x1fac0d(0x187)]=_0x4f457a;return{'ok':!![],'data':_0x1cad83,'message':_0x1fac0d(0x16b)+_0x56e721+(_0x4f457a?_0x1fac0d(0x17f):'')};}};async function moveToTrash(_0x582952,_0x2de0f2,_0x37e691){const _0x11c0e4=a248_0x551ee5,_0xbe038=new Date()['toISOString']()[_0x11c0e4(0x178)](/[:.]/g,'-'),_0x5c2cca=relative(_0x582952,_0x37e691),_0x2e928e=join(_0x2de0f2,_0xbe038,_0x5c2cca);return await mkdir(dirname(_0x2e928e),{'recursive':!![]}),await rename(_0x37e691,_0x2e928e),_0x2e928e;}async function cleanupEmptyDirectories(_0x2c22c9,_0x1f6ebb){const _0x526b0c=a248_0x551ee5;let _0x20d36c=resolve(_0x2c22c9);const _0x3a08ca=resolve(_0x1f6ebb);while(_0x20d36c[_0x526b0c(0x173)](''+_0x3a08ca+sep)||_0x20d36c===_0x3a08ca){if(_0x20d36c===_0x3a08ca)return;try{const _0x4a741d=await readdir(_0x20d36c);if(_0x4a741d['length']>0x0)return;await rmdir(_0x20d36c);}catch{return;}_0x20d36c=dirname(_0x20d36c);}}
@@ -1 +1 @@
1
- function a249_0x51e0(_0xd4ef64,_0x47a89c){_0xd4ef64=_0xd4ef64-0x8c;const _0x24c7e9=a249_0x24c7();let _0x51e03f=_0x24c7e9[_0xd4ef64];return _0x51e03f;}const a249_0x157550=a249_0x51e0;(function(_0x4b940b,_0x117e51){const _0x451d64=a249_0x51e0,_0x41a2d1=_0x4b940b();while(!![]){try{const _0x3c169b=-parseInt(_0x451d64(0x91))/0x1+-parseInt(_0x451d64(0x9c))/0x2*(parseInt(_0x451d64(0x9b))/0x3)+parseInt(_0x451d64(0x93))/0x4+parseInt(_0x451d64(0x95))/0x5+parseInt(_0x451d64(0x8f))/0x6+-parseInt(_0x451d64(0x9e))/0x7+parseInt(_0x451d64(0x8c))/0x8;if(_0x3c169b===_0x117e51)break;else _0x41a2d1['push'](_0x41a2d1['shift']());}catch(_0x1b6030){_0x41a2d1['push'](_0x41a2d1['shift']());}}}(a249_0x24c7,0xab3c8));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a249_0x24c7(){const _0xf04ba0=['boolean','1085208WFttLV','detail','125499GvEbdw','description','5014008SefNKG','Return\x20full\x20raw\x20SQL\x20query\x20object','6035265CpjQmT','sqlContent','dbId','verbose','sql','str','6pPXbAf','965778NeBnFk','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','6328371ChzJJS','bool','sqlcode','442328uTzCcR','read'];a249_0x24c7=function(){return _0xf04ba0;};return a249_0x24c7();}export const sqlDetail={'service':a249_0x157550(0x99),'command':a249_0x157550(0x90),'description':a249_0x157550(0x9d),'risk':a249_0x157550(0x8d),'flags':[SQLCODE_FLAG,{'name':'verbose','type':a249_0x157550(0x8e),'description':a249_0x157550(0x94)}],async 'execute'(_0x5857c9){const _0x10da92=a249_0x157550,_0x24adc8=await getSqlQueryInfo(_0x5857c9['appCode'],_0x5857c9[_0x10da92(0x9a)](_0x10da92(0xa0))),_0x4c53b4=_0x5857c9[_0x10da92(0x9f)](_0x10da92(0x98));if(_0x4c53b4)return{'ok':!![],'data':_0x24adc8};const _0x38f322=_0x24adc8[_0x10da92(0x97)]?await getDbName(_0x5857c9['appCode'],_0x24adc8[_0x10da92(0x97)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x24adc8['sqlCode'],'sqlName':_0x24adc8['sqlName'],'db':_0x38f322?_0x38f322+'\x20('+_0x24adc8[_0x10da92(0x97)]+')':_0x24adc8[_0x10da92(0x97)]??'','description':_0x24adc8[_0x10da92(0x92)]??'','sqlContent':_0x24adc8[_0x10da92(0x96)]??''}};}};
1
+ const a249_0x34eab3=a249_0x4781;(function(_0x3407cb,_0x5f5949){const _0x2136a6=a249_0x4781,_0x6c075=_0x3407cb();while(!![]){try{const _0x35ae63=parseInt(_0x2136a6(0x6d))/0x1*(-parseInt(_0x2136a6(0x7c))/0x2)+-parseInt(_0x2136a6(0x7b))/0x3+-parseInt(_0x2136a6(0x6f))/0x4*(-parseInt(_0x2136a6(0x6b))/0x5)+parseInt(_0x2136a6(0x7f))/0x6*(-parseInt(_0x2136a6(0x78))/0x7)+parseInt(_0x2136a6(0x69))/0x8+-parseInt(_0x2136a6(0x7e))/0x9+parseInt(_0x2136a6(0x7d))/0xa;if(_0x35ae63===_0x5f5949)break;else _0x6c075['push'](_0x6c075['shift']());}catch(_0x1c840f){_0x6c075['push'](_0x6c075['shift']());}}}(a249_0x47ea,0xb1edd));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';function a249_0x4781(_0x1dffa7,_0x21916c){_0x1dffa7=_0x1dffa7-0x69;const _0x47ea7a=a249_0x47ea();let _0x47818b=_0x47ea7a[_0x1dffa7];return _0x47818b;}import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a249_0x47ea(){const _0xc89773=['2827176pxCUEi','sqlCode','1670710EAHXWJ','sqlcode','24AbWOEG','sqlName','8RTFlyc','boolean','appCode','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','detail','read','dbId','sqlContent','description','35aDtVqs','Return\x20full\x20raw\x20SQL\x20query\x20object','bool','2575326UbJpsR','81710mZdDWr','34808170dQtnjR','9872766pyuFqO','1005318tFCEZP'];a249_0x47ea=function(){return _0xc89773;};return a249_0x47ea();}export const sqlDetail={'service':'sql','command':a249_0x34eab3(0x73),'description':a249_0x34eab3(0x72),'risk':a249_0x34eab3(0x74),'flags':[SQLCODE_FLAG,{'name':'verbose','type':a249_0x34eab3(0x70),'description':a249_0x34eab3(0x79)}],async 'execute'(_0x2e8491){const _0x18003c=a249_0x34eab3,_0x36fb84=await getSqlQueryInfo(_0x2e8491[_0x18003c(0x71)],_0x2e8491['str'](_0x18003c(0x6c))),_0x13b55c=_0x2e8491[_0x18003c(0x7a)]('verbose');if(_0x13b55c)return{'ok':!![],'data':_0x36fb84};const _0x407f10=_0x36fb84[_0x18003c(0x75)]?await getDbName(_0x2e8491['appCode'],_0x36fb84[_0x18003c(0x75)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x36fb84[_0x18003c(0x6a)],'sqlName':_0x36fb84[_0x18003c(0x6e)],'db':_0x407f10?_0x407f10+'\x20('+_0x36fb84['dbId']+')':_0x36fb84['dbId']??'','description':_0x36fb84[_0x18003c(0x77)]??'','sqlContent':_0x36fb84[_0x18003c(0x76)]??''}};}};
@@ -1 +1 @@
1
- const a250_0x59f96f=a250_0x6606;(function(_0x3c4996,_0x375460){const _0x5f5bb0=a250_0x6606,_0x5047a5=_0x3c4996();while(!![]){try{const _0x59de48=-parseInt(_0x5f5bb0(0x1a1))/0x1+parseInt(_0x5f5bb0(0x1a5))/0x2+parseInt(_0x5f5bb0(0x1ab))/0x3+parseInt(_0x5f5bb0(0x1a0))/0x4*(-parseInt(_0x5f5bb0(0x19f))/0x5)+parseInt(_0x5f5bb0(0x1a8))/0x6+-parseInt(_0x5f5bb0(0x19e))/0x7+parseInt(_0x5f5bb0(0x19c))/0x8;if(_0x59de48===_0x375460)break;else _0x5047a5['push'](_0x5047a5['shift']());}catch(_0x355a5d){_0x5047a5['push'](_0x5047a5['shift']());}}}(a250_0x2445,0xb32a1));import{executeSql}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';import{parseJsonParams}from'../../utils/params.js';function a250_0x6606(_0x1a9ff5,_0x14b3af){_0x1a9ff5=_0x1a9ff5-0x198;const _0x2445e1=a250_0x2445();let _0x660652=_0x2445e1[_0x1a9ff5];return _0x660652;}function a250_0x2445(){const _0x4d0073=['935936IPcTwu','execSuccess','length','3613320yhmidu','execResult','read','3389100NwsnrD','appCode','SQL\x20execution\x20failed','exec','Returned\x20','sqlcode','\x20row(s)\x20in\x20','6626304SHmWmq','sql','463540ogrUAG','115mDhfGD','205720JLZRUo','1045209DbnPBK','str','now','params'];a250_0x2445=function(){return _0x4d0073;};return a250_0x2445();}export const sqlExec={'service':a250_0x59f96f(0x19d),'command':a250_0x59f96f(0x198),'description':'Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','risk':a250_0x59f96f(0x1aa),'flags':[SQLCODE_FLAG,{'name':a250_0x59f96f(0x1a4),'type':'string','description':'SQL\x20parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)'}],async 'execute'(_0x5dde47){const _0x3ca454=a250_0x59f96f,_0x2aaaf1=parseJsonParams(_0x5dde47['str'](_0x3ca454(0x1a4))),_0x2fec10=Date['now'](),_0x23f244=await executeSql(_0x5dde47[_0x3ca454(0x1ac)],_0x5dde47[_0x3ca454(0x1a2)](_0x3ca454(0x19a)),_0x2aaaf1),_0x54d731=Date[_0x3ca454(0x1a3)]()-_0x2fec10,_0x1b140e=_0x23f244?.[_0x3ca454(0x1a9)]??_0x23f244,_0xbeb177=_0x23f244?.[_0x3ca454(0x1a6)]??!![];if(!_0xbeb177)return{'ok':![],'data':{'error':_0x23f244?.['execError']||_0x3ca454(0x1ad),'elapsed':_0x54d731},'message':'SQL\x20execution\x20failed'};const _0x400de6=Array['isArray'](_0x1b140e)?_0x1b140e:[];return{'ok':!![],'data':{'rows':_0x400de6,'rowCount':_0x400de6[_0x3ca454(0x1a7)],'elapsed':_0x54d731},'message':_0x3ca454(0x199)+_0x400de6[_0x3ca454(0x1a7)]+_0x3ca454(0x19b)+_0x54d731+'ms'};}};
1
+ const a250_0x4cfbb1=a250_0x57a9;(function(_0x152d35,_0x455ebd){const _0x15619a=a250_0x57a9,_0x5aaafc=_0x152d35();while(!![]){try{const _0x530cf8=-parseInt(_0x15619a(0x124))/0x1+-parseInt(_0x15619a(0x118))/0x2+parseInt(_0x15619a(0x120))/0x3+-parseInt(_0x15619a(0x117))/0x4+-parseInt(_0x15619a(0x11d))/0x5*(parseInt(_0x15619a(0x121))/0x6)+-parseInt(_0x15619a(0x11c))/0x7*(-parseInt(_0x15619a(0x122))/0x8)+parseInt(_0x15619a(0x110))/0x9;if(_0x530cf8===_0x455ebd)break;else _0x5aaafc['push'](_0x5aaafc['shift']());}catch(_0x31a3db){_0x5aaafc['push'](_0x5aaafc['shift']());}}}(a250_0x5a87,0x6e62a));import{executeSql}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';import{parseJsonParams}from'../../utils/params.js';function a250_0x57a9(_0xbec578,_0x32140c){_0xbec578=_0xbec578-0x10c;const _0x5a8777=a250_0x5a87();let _0x57a9cd=_0x5a8777[_0xbec578];return _0x57a9cd;}function a250_0x5a87(){const _0xdf8f5b=['4688046HBoozS','params','appCode','\x20row(s)\x20in\x20','now','execError','read','1251340SvFufF','231352waqpuY','execResult','str','Returned\x20','394807dvqvDj','10485FhgpsR','SQL\x20execution\x20failed','length','908007FJQSaF','1158LsAAAs','112DybBAG','SQL\x20parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','327807gQtdXC','execSuccess','exec','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','sqlcode','string','isArray'];a250_0x5a87=function(){return _0xdf8f5b;};return a250_0x5a87();}export const sqlExec={'service':'sql','command':a250_0x4cfbb1(0x126),'description':a250_0x4cfbb1(0x10c),'risk':a250_0x4cfbb1(0x116),'flags':[SQLCODE_FLAG,{'name':a250_0x4cfbb1(0x111),'type':a250_0x4cfbb1(0x10e),'description':a250_0x4cfbb1(0x123)}],async 'execute'(_0x1f224c){const _0x157a45=a250_0x4cfbb1,_0x16063f=parseJsonParams(_0x1f224c['str'](_0x157a45(0x111))),_0x2691e9=Date[_0x157a45(0x114)](),_0xf79d=await executeSql(_0x1f224c[_0x157a45(0x112)],_0x1f224c[_0x157a45(0x11a)](_0x157a45(0x10d)),_0x16063f),_0x32bd9e=Date[_0x157a45(0x114)]()-_0x2691e9,_0x305a60=_0xf79d?.[_0x157a45(0x119)]??_0xf79d,_0xf1d914=_0xf79d?.[_0x157a45(0x125)]??!![];if(!_0xf1d914)return{'ok':![],'data':{'error':_0xf79d?.[_0x157a45(0x115)]||_0x157a45(0x11e),'elapsed':_0x32bd9e},'message':_0x157a45(0x11e)};const _0x20d36f=Array[_0x157a45(0x10f)](_0x305a60)?_0x305a60:[];return{'ok':!![],'data':{'rows':_0x20d36f,'rowCount':_0x20d36f[_0x157a45(0x11f)],'elapsed':_0x32bd9e},'message':_0x157a45(0x11b)+_0x20d36f['length']+_0x157a45(0x113)+_0x32bd9e+'ms'};}};
@@ -1 +1 @@
1
- (function(_0x30ce2e,_0x5bf229){const _0x1eae30=a251_0xff78,_0x2b4c4d=_0x30ce2e();while(!![]){try{const _0x1b28fb=parseInt(_0x1eae30(0x19c))/0x1*(parseInt(_0x1eae30(0x195))/0x2)+-parseInt(_0x1eae30(0x196))/0x3+-parseInt(_0x1eae30(0x197))/0x4+parseInt(_0x1eae30(0x19a))/0x5*(-parseInt(_0x1eae30(0x19b))/0x6)+-parseInt(_0x1eae30(0x199))/0x7*(parseInt(_0x1eae30(0x194))/0x8)+parseInt(_0x1eae30(0x193))/0x9+parseInt(_0x1eae30(0x198))/0xa;if(_0x1b28fb===_0x5bf229)break;else _0x2b4c4d['push'](_0x2b4c4d['shift']());}catch(_0x2c1125){_0x2b4c4d['push'](_0x2b4c4d['shift']());}}}(a251_0x543a,0x5a4b1));import{sqlList}from'../../commands/sql/list.js';function a251_0xff78(_0x16d99f,_0x59db94){_0x16d99f=_0x16d99f-0x193;const _0x543a45=a251_0x543a();let _0xff782a=_0x543a45[_0x16d99f];return _0xff782a;}import{sqlDetail}from'../../commands/sql/detail.js';import{sqlValidate}from'../../commands/sql/validate.js';import{sqlExec}from'../../commands/sql/exec.js';import{sqlPull}from'../../commands/sql/pull.js';import{sqlCreate}from'../../commands/sql/create.js';import{sqlStatus}from'../../commands/sql/status.js';import{sqlPush}from'../../commands/sql/push.js';function a251_0x543a(){const _0x28823a=['1490eXzCnV','272430hlwrYi','142792UbEImo','5000930oeGtOF','77pEQiHs','10gOHNdn','1681368Adyaji','916oXtKrw','670329RZTiwp','145592WlCisc'];a251_0x543a=function(){return _0x28823a;};return a251_0x543a();}import{sqlDelete}from'../../commands/sql/delete.js';export const sqlDefinitions=[sqlList,sqlDetail,sqlStatus,sqlCreate,sqlPush,sqlValidate,sqlExec,sqlPull,sqlDelete];
1
+ (function(_0x167845,_0xda54ba){const _0x4766a8=a251_0x3158,_0x1e4085=_0x167845();while(!![]){try{const _0x5cfbf9=parseInt(_0x4766a8(0x1bc))/0x1+parseInt(_0x4766a8(0x1be))/0x2*(parseInt(_0x4766a8(0x1c5))/0x3)+parseInt(_0x4766a8(0x1bd))/0x4*(-parseInt(_0x4766a8(0x1c1))/0x5)+parseInt(_0x4766a8(0x1c2))/0x6*(-parseInt(_0x4766a8(0x1c3))/0x7)+parseInt(_0x4766a8(0x1bb))/0x8*(-parseInt(_0x4766a8(0x1c0))/0x9)+parseInt(_0x4766a8(0x1c4))/0xa+parseInt(_0x4766a8(0x1bf))/0xb*(parseInt(_0x4766a8(0x1c6))/0xc);if(_0x5cfbf9===_0xda54ba)break;else _0x1e4085['push'](_0x1e4085['shift']());}catch(_0x1283ce){_0x1e4085['push'](_0x1e4085['shift']());}}}(a251_0x3e43,0x6b093));import{sqlList}from'../../commands/sql/list.js';import{sqlDetail}from'../../commands/sql/detail.js';function a251_0x3158(_0x444270,_0x13cf0f){_0x444270=_0x444270-0x1bb;const _0x3e43f4=a251_0x3e43();let _0x31582b=_0x3e43f4[_0x444270];return _0x31582b;}import{sqlValidate}from'../../commands/sql/validate.js';import{sqlExec}from'../../commands/sql/exec.js';import{sqlPull}from'../../commands/sql/pull.js';import{sqlCreate}from'../../commands/sql/create.js';import{sqlStatus}from'../../commands/sql/status.js';import{sqlPush}from'../../commands/sql/push.js';import{sqlDelete}from'../../commands/sql/delete.js';function a251_0x3e43(){const _0x2653b5=['161484FgXfIJ','2PLqRPj','2484119Eiknqe','9FnleZu','70MFDdxf','518214atbfAH','21HqGNeK','4431850nmYqQY','202497bekhSf','24iopXVD','2058504RjWckg','557691WlqqKf'];a251_0x3e43=function(){return _0x2653b5;};return a251_0x3e43();}export const sqlDefinitions=[sqlList,sqlDetail,sqlStatus,sqlCreate,sqlPush,sqlValidate,sqlExec,sqlPull,sqlDelete];
@@ -1 +1 @@
1
- const a252_0x2cb769=a252_0xc893;function a252_0x2516(){const _0x57ec6f=['1457198yLJIjI','map','21ERCvRu','Return\x20full\x20SQL\x20query\x20objects\x20including\x20parameters\x20and\x20SQL\x20content','Page\x20size','appCode','length','sqlName','3512331ulewIR','boolean','tableData','paging','sqlCode','pagesize','read','Page\x20number','9069168GhkHJs','618087eegGFb','name','number','str','num','30ApsNQO','273uEMJRa','Filter\x20by\x20SQL\x20name','1601870LIXAKQ','bool','dbId','\x20SQL\x20queries\x20(total:\x20','verbose','all','135570juEKPT','sqlcode','list','page','464652rsfdst'];a252_0x2516=function(){return _0x57ec6f;};return a252_0x2516();}(function(_0x48b951,_0x383768){const _0x33a7b0=a252_0xc893,_0x2fbcf3=_0x48b951();while(!![]){try{const _0x3344fb=-parseInt(_0x33a7b0(0x136))/0x1+-parseInt(_0x33a7b0(0x125))/0x2+parseInt(_0x33a7b0(0x127))/0x3*(parseInt(_0x33a7b0(0x124))/0x4)+-parseInt(_0x33a7b0(0x13e))/0x5+parseInt(_0x33a7b0(0x144))/0x6*(-parseInt(_0x33a7b0(0x13c))/0x7)+parseInt(_0x33a7b0(0x135))/0x8+parseInt(_0x33a7b0(0x12d))/0x9*(parseInt(_0x33a7b0(0x13b))/0xa);if(_0x3344fb===_0x383768)break;else _0x2fbcf3['push'](_0x2fbcf3['shift']());}catch(_0x544b61){_0x2fbcf3['push'](_0x2fbcf3['shift']());}}}(a252_0x2516,0x8afd3));import{listSqlQueries}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';function a252_0xc893(_0x350b88,_0x5513d3){_0x350b88=_0x350b88-0x121;const _0x2516e5=a252_0x2516();let _0xc89392=_0x2516e5[_0x350b88];return _0xc89392;}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlList={'service':'sql','command':a252_0x2cb769(0x122),'description':'List\x20custom\x20SQL\x20queries','risk':a252_0x2cb769(0x133),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a252_0x2cb769(0x137),'type':'string','description':a252_0x2cb769(0x13d)},{'name':a252_0x2cb769(0x123),'type':'number','description':a252_0x2cb769(0x134),'default':0x1},{'name':a252_0x2cb769(0x132),'type':a252_0x2cb769(0x138),'description':a252_0x2cb769(0x129)},{'name':a252_0x2cb769(0x142),'type':a252_0x2cb769(0x12e),'description':a252_0x2cb769(0x128)}],async 'execute'(_0x358fdb){const _0x5c9e2d=a252_0x2cb769,_0x1b6ba4=await listSqlQueries(_0x358fdb['appCode'],{'sqlCode':_0x358fdb['str'](_0x5c9e2d(0x121))||undefined,'sqlName':_0x358fdb[_0x5c9e2d(0x139)](_0x5c9e2d(0x137))||undefined,'currentPage':_0x358fdb[_0x5c9e2d(0x13a)]('page'),'pageSize':_0x358fdb['num'](_0x5c9e2d(0x132),0x32)}),_0x2b3539=_0x358fdb[_0x5c9e2d(0x13f)]('verbose'),_0x16c945=_0x1b6ba4[_0x5c9e2d(0x12f)]??[],_0x4e3aa7=_0x1b6ba4[_0x5c9e2d(0x130)]?.['totalCount']??_0x16c945[_0x5c9e2d(0x12b)];let _0x209738;return _0x2b3539?_0x209738=_0x16c945:_0x209738=await Promise[_0x5c9e2d(0x143)](_0x16c945[_0x5c9e2d(0x126)](async _0x54219e=>{const _0x63e70=_0x5c9e2d;let _0x1c1f28;try{_0x1c1f28=_0x54219e['dbId']?await getDbName(_0x358fdb[_0x63e70(0x12a)],_0x54219e[_0x63e70(0x140)]):undefined;}catch{}return{'sqlCode':_0x54219e[_0x63e70(0x131)],'sqlName':_0x54219e[_0x63e70(0x12c)],'description':_0x54219e['description']??'','db':_0x1c1f28?_0x1c1f28+'\x20('+_0x54219e[_0x63e70(0x140)]+')':_0x54219e[_0x63e70(0x140)]??''};})),{'ok':!![],'data':_0x209738,'message':_0x16c945[_0x5c9e2d(0x12b)]===0x0?'No\x20custom\x20SQL\x20queries\x20found.':'Found\x20'+_0x16c945[_0x5c9e2d(0x12b)]+_0x5c9e2d(0x141)+_0x4e3aa7+').'};}};
1
+ const a252_0xbc5cd3=a252_0x1c58;(function(_0x4fdabd,_0xd7fabf){const _0x5a026c=a252_0x1c58,_0x4b0ce0=_0x4fdabd();while(!![]){try{const _0x3e02d3=parseInt(_0x5a026c(0x198))/0x1*(-parseInt(_0x5a026c(0x17b))/0x2)+parseInt(_0x5a026c(0x190))/0x3*(parseInt(_0x5a026c(0x18e))/0x4)+parseInt(_0x5a026c(0x182))/0x5*(parseInt(_0x5a026c(0x17e))/0x6)+-parseInt(_0x5a026c(0x183))/0x7*(-parseInt(_0x5a026c(0x19c))/0x8)+parseInt(_0x5a026c(0x18a))/0x9+parseInt(_0x5a026c(0x181))/0xa*(-parseInt(_0x5a026c(0x189))/0xb)+-parseInt(_0x5a026c(0x17f))/0xc*(parseInt(_0x5a026c(0x195))/0xd);if(_0x3e02d3===_0xd7fabf)break;else _0x4b0ce0['push'](_0x4b0ce0['shift']());}catch(_0x51b985){_0x4b0ce0['push'](_0x4b0ce0['shift']());}}}(a252_0x596a,0x2510b));import{listSqlQueries}from'../../core/api-client.js';function a252_0x596a(){const _0x2d8620=['boolean','tableData','44uxoiKg','No\x20custom\x20SQL\x20queries\x20found.','verbose','3624rwDABw','7843296lAGurk','sqlName','1047930QIuIPk','2485wOeqmA','407743iJKRKU','sql','pagesize','\x20SQL\x20queries\x20(total:\x20','dbId','Return\x20full\x20SQL\x20query\x20objects\x20including\x20parameters\x20and\x20SQL\x20content','11prSemr','2486880jqwcAS','Page\x20size','all','list','275684pUYSiB','page','9toHQdL','bool','Found\x20','number','description','13gQIZxn','read','name','7468XZddWl','num','length','string','40lSlIFd','List\x20custom\x20SQL\x20queries','map','str','paging'];a252_0x596a=function(){return _0x2d8620;};return a252_0x596a();}import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a252_0x1c58(_0x116e6f,_0x4dec5c){_0x116e6f=_0x116e6f-0x178;const _0x596aff=a252_0x596a();let _0x1c582b=_0x596aff[_0x116e6f];return _0x1c582b;}export const sqlList={'service':a252_0xbc5cd3(0x184),'command':a252_0xbc5cd3(0x18d),'description':a252_0xbc5cd3(0x19d),'risk':a252_0xbc5cd3(0x196),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a252_0xbc5cd3(0x197),'type':a252_0xbc5cd3(0x19b),'description':'Filter\x20by\x20SQL\x20name'},{'name':a252_0xbc5cd3(0x18f),'type':a252_0xbc5cd3(0x193),'description':'Page\x20number','default':0x1},{'name':a252_0xbc5cd3(0x185),'type':a252_0xbc5cd3(0x193),'description':a252_0xbc5cd3(0x18b)},{'name':a252_0xbc5cd3(0x17d),'type':a252_0xbc5cd3(0x179),'description':a252_0xbc5cd3(0x188)}],async 'execute'(_0x541a9f){const _0x2d40d2=a252_0xbc5cd3,_0x3f0154=await listSqlQueries(_0x541a9f['appCode'],{'sqlCode':_0x541a9f[_0x2d40d2(0x19f)]('sqlcode')||undefined,'sqlName':_0x541a9f['str'](_0x2d40d2(0x197))||undefined,'currentPage':_0x541a9f[_0x2d40d2(0x199)](_0x2d40d2(0x18f)),'pageSize':_0x541a9f[_0x2d40d2(0x199)](_0x2d40d2(0x185),0x32)}),_0x23d53b=_0x541a9f[_0x2d40d2(0x191)]('verbose'),_0x1e610b=_0x3f0154[_0x2d40d2(0x17a)]??[],_0x24611c=_0x3f0154[_0x2d40d2(0x178)]?.['totalCount']??_0x1e610b[_0x2d40d2(0x19a)];let _0x3e2021;return _0x23d53b?_0x3e2021=_0x1e610b:_0x3e2021=await Promise[_0x2d40d2(0x18c)](_0x1e610b[_0x2d40d2(0x19e)](async _0x4db8ca=>{const _0xc2eb88=_0x2d40d2;let _0x57d026;try{_0x57d026=_0x4db8ca[_0xc2eb88(0x187)]?await getDbName(_0x541a9f['appCode'],_0x4db8ca[_0xc2eb88(0x187)]):undefined;}catch{}return{'sqlCode':_0x4db8ca['sqlCode'],'sqlName':_0x4db8ca[_0xc2eb88(0x180)],'description':_0x4db8ca[_0xc2eb88(0x194)]??'','db':_0x57d026?_0x57d026+'\x20('+_0x4db8ca['dbId']+')':_0x4db8ca[_0xc2eb88(0x187)]??''};})),{'ok':!![],'data':_0x3e2021,'message':_0x1e610b[_0x2d40d2(0x19a)]===0x0?_0x2d40d2(0x17c):_0x2d40d2(0x192)+_0x1e610b[_0x2d40d2(0x19a)]+_0x2d40d2(0x186)+_0x24611c+').'};}};
@@ -1 +1 @@
1
- const a253_0x1e67f3=a253_0x4366;(function(_0x54e302,_0x58ee71){const _0x100569=a253_0x4366,_0x1fb9c1=_0x54e302();while(!![]){try{const _0x9075b5=-parseInt(_0x100569(0xdd))/0x1+-parseInt(_0x100569(0x10b))/0x2+parseInt(_0x100569(0xde))/0x3*(parseInt(_0x100569(0xed))/0x4)+parseInt(_0x100569(0xe4))/0x5*(parseInt(_0x100569(0x109))/0x6)+parseInt(_0x100569(0x10e))/0x7+parseInt(_0x100569(0xf4))/0x8*(parseInt(_0x100569(0xf5))/0x9)+-parseInt(_0x100569(0x114))/0xa;if(_0x9075b5===_0x58ee71)break;else _0x1fb9c1['push'](_0x1fb9c1['shift']());}catch(_0x3c3861){_0x1fb9c1['push'](_0x1fb9c1['shift']());}}}(a253_0x29d8,0x97d12));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';function a253_0x29d8(){const _0x4dafea=['read','499510FXHwfD','3UJMAdZ','dbId','find','sql','trim','boolean','1350feUBJr','would_pull','unchanged','sqlName','test','apps','No\x20remote\x20SQL\x20queries\x20matched.','tableData','sqlContent','1877116dtcCfS','message','content','file','mybatisXml','local\x20differs\x20from\x20remote','endsWith','4735912SmcSKj','9LgDTZa','\x20failed','sqlRoot','lastSync','str','.xml','equivalent','path','Force\x20pull\x20cancelled.','filter','Force\x20overwrite\x20local\x20unsynced\x20changes','appCode','description','some','sqlCode','conflict','isCanonical','\x20written,\x20','toISOString','hash','8172hYLLez','force','779366MoJVVB','catch','string','4284399QAJvSJ','Pull\x20complete:\x20','split','totalCount','sqlcode','/smartapi/custom/queryUserCustomSqlList\x20+\x20/smartapi/custom/getUserCustomSql','5300300cIPFbw','sqls','\x20SQL\x20file(s)\x20into\x20','lockFilePath','local\x20differs\x20from\x20remote\x20(use\x20--force\x20to\x20overwrite)','pull','POST','length','skipped','utf8','Force\x20pull\x20will\x20overwrite\x20local\x20SQL\x20that\x20differs\x20from\x20remote.','replace','nonInteractive','name','push','bool','sqlRootDir','mode'];a253_0x29d8=function(){return _0x4dafea;};return a253_0x29d8();}import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{resolveLocalSqlFilePath}from'../../core/sql-sync/file-system.js';function a253_0x4366(_0x3546de,_0xd26feb){_0x3546de=_0x3546de-0xcb;const _0x29d884=a253_0x29d8();let _0x43665e=_0x29d884[_0x3546de];return _0x43665e;}import{detectSqlMode}from'../../core/sql-sync/utils.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(_0x1e4e26,_0x44ec1e){const _0x3aa413=a253_0x4366,_0x2c8c9e=[];let _0x21214d=0x1;while(!![]){const _0x359cbe=await listSqlQueries(_0x1e4e26,{'currentPage':_0x21214d,'pageSize':PAGE_SIZE,'sqlCode':_0x44ec1e['sqlCode'],'sqlName':_0x44ec1e[_0x3aa413(0xe7)]}),_0x5bfabe=_0x359cbe[_0x3aa413(0xeb)]??[];_0x2c8c9e[_0x3aa413(0xd8)](..._0x5bfabe);if(_0x5bfabe[_0x3aa413(0xd1)]===0x0)break;const _0x26ea79=_0x359cbe['paging']?.[_0x3aa413(0x111)];if(_0x26ea79!=null?_0x2c8c9e[_0x3aa413(0xd1)]>=_0x26ea79:_0x5bfabe[_0x3aa413(0xd1)]<PAGE_SIZE)break;_0x21214d++;}return _0x2c8c9e;}async function ensureSqlContent(_0x330ac8){const _0x14ce9f=a253_0x4366;if(_0x330ac8[_0x14ce9f(0xec)]!=null&&String(_0x330ac8[_0x14ce9f(0xec)])[_0x14ce9f(0xd1)]>0x0)return _0x330ac8;return getSqlQueryDetail(_0x330ac8[_0x14ce9f(0x103)]);}export const sqlPull={'service':a253_0x1e67f3(0xe1),'command':a253_0x1e67f3(0xcf),'description':'Pull\x20remote\x20SQL\x20queries\x20to\x20local\x20.rabetbase/sql/','risk':a253_0x1e67f3(0xdc),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a253_0x1e67f3(0xd7),'type':a253_0x1e67f3(0x10d),'description':'Filter\x20by\x20SQL\x20display\x20name'},{'name':a253_0x1e67f3(0x10a),'type':a253_0x1e67f3(0xe3),'description':a253_0x1e67f3(0xff)}],async 'dryRun'(_0xf30cc3){const _0x381ced=a253_0x1e67f3,_0x273639=loadSqlProjectConfig(_0xf30cc3[_0x381ced(0x100)]),_0x46d681=await readSqlLockFile(_0x273639[_0x381ced(0xcd)]),{appLock:_0x5d8eef}=ensureSqlLockScope(_0x46d681??createEmptySqlLock(),_0x273639['appCode'],_0x273639[_0x381ced(0xf7)],'pull'),_0xa84d4b=await fetchAllSqlQueries(_0xf30cc3[_0x381ced(0x100)],{'sqlCode':_0xf30cc3[_0x381ced(0xf9)](_0x381ced(0x112))||undefined,'sqlName':_0xf30cc3['str'](_0x381ced(0xd7))||undefined}),_0x42ce9a=[];for(const _0x5c144d of _0xa84d4b){const _0x2e59eb=await ensureSqlContent(_0x5c144d),_0x4ae43a=ensureRemoteSqlContent(_0x2e59eb),_0x5ab0be=detectSqlMode(_0x4ae43a),_0x520d4a=_0x2e59eb[_0x381ced(0xdf)]?await getDbName(_0xf30cc3[_0x381ced(0x100)],Number(_0x2e59eb[_0x381ced(0xdf)]))[_0x381ced(0x10c)](()=>undefined):undefined,_0x2a09ee=buildLocalSqlFileContent({'sqlCode':_0x2e59eb['sqlCode'],'sqlName':_0x2e59eb[_0x381ced(0xe7)],'dbId':_0x2e59eb['dbId']},_0x4ae43a,{'dbName':_0x520d4a,'mode':_0x5ab0be,'syncedAt':new Date()[_0x381ced(0x107)](),'description':_0x2e59eb[_0x381ced(0x101)]}),_0x4e62b8=buildSqlLockEntry(_0x2e59eb,_0x4ae43a,'',{'dbName':_0x520d4a}),_0x2baa5f=resolveLocalSqlFilePath(_0x273639,_0x2e59eb[_0x381ced(0x103)],_0x4e62b8);let _0x3bb179=_0x381ced(0xe5),_0x18279b;const _0x73b716=await findExistingSqlFiles(_0x273639,_0x2baa5f,_0x5ab0be,_0x5d8eef['sqls'][_0x2e59eb['sqlCode']]);if(_0x73b716[_0x381ced(0xd1)]>0x0){const _0x44b205=await compareExistingSqlFiles(_0x73b716,_0x2a09ee,_0x5ab0be);if(_0x44b205[_0x381ced(0x102)](({equivalent:_0x52966f})=>!_0x52966f))_0x3bb179=_0x381ced(0x104),_0x18279b=_0x381ced(0xce);else _0x44b205[_0x381ced(0xd1)]===0x1&&_0x44b205[0x0]?.['file'][_0x381ced(0x105)]&&(_0x3bb179=_0x381ced(0xd2),_0x18279b=_0x381ced(0xe6));}_0x42ce9a['push']({'sqlCode':_0x2e59eb[_0x381ced(0x103)],'sqlName':_0x2e59eb[_0x381ced(0xe7)],'filePath':_0x2baa5f,'status':_0x3bb179,'reason':_0x18279b});}return{'method':_0x381ced(0xd0),'url':_0x381ced(0x113),'body':{'appCode':_0xf30cc3['appCode'],'sqlCode':_0xf30cc3[_0x381ced(0xf9)](_0x381ced(0x112))||null,'sqlName':_0xf30cc3[_0x381ced(0xf9)]('name')||null,'files':_0x42ce9a},'description':'Would\x20pull\x20'+_0x42ce9a[_0x381ced(0xd1)]+_0x381ced(0xcc)+_0x273639[_0x381ced(0xda)]};},async 'execute'(_0x5449b0){const _0x5a5342=a253_0x1e67f3,_0x3d1b46=loadSqlProjectConfig(_0x5449b0[_0x5a5342(0x100)]),_0x489721=await readSqlLockFile(_0x3d1b46[_0x5a5342(0xcd)]),{lockData:_0x28f563,appLock:_0x1a3459}=ensureSqlLockScope(_0x489721??createEmptySqlLock(),_0x3d1b46[_0x5a5342(0x100)],_0x3d1b46[_0x5a5342(0xf7)],'pull'),_0x3cdfa3=_0x5449b0[_0x5a5342(0xd9)]('force'),_0x5dc565=await fetchAllSqlQueries(_0x5449b0[_0x5a5342(0x100)],{'sqlCode':_0x5449b0[_0x5a5342(0xf9)](_0x5a5342(0x112))||undefined,'sqlName':_0x5449b0[_0x5a5342(0xf9)](_0x5a5342(0xd7))||undefined});if(_0x5dc565[_0x5a5342(0xd1)]===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':_0x5a5342(0xea)};const _0x5309ed=[],_0x20c24c=[];for(const _0xc5375d of _0x5dc565){try{_0x5309ed[_0x5a5342(0xd8)](await ensureSqlContent(_0xc5375d));}catch(_0x4b47e2){_0x20c24c[_0x5a5342(0xd8)]({'sqlCode':_0xc5375d[_0x5a5342(0x103)],'error':_0x4b47e2 instanceof Error?_0x4b47e2['message']:String(_0x4b47e2)});}}if(_0x3cdfa3&&!_0x5449b0[_0x5a5342(0xd6)]){let _0x9c640b=![];for(const _0x8fc1e5 of _0x5309ed){const _0x55b38a=detectSqlMode(ensureRemoteSqlContent(_0x8fc1e5)),_0x492496=_0x8fc1e5['dbId']?await getDbName(_0x5449b0[_0x5a5342(0x100)],Number(_0x8fc1e5[_0x5a5342(0xdf)]))[_0x5a5342(0x10c)](()=>undefined):undefined,_0x2669ff=buildLocalSqlFileContent({'sqlCode':_0x8fc1e5[_0x5a5342(0x103)],'sqlName':_0x8fc1e5[_0x5a5342(0xe7)],'dbId':_0x8fc1e5[_0x5a5342(0xdf)]},ensureRemoteSqlContent(_0x8fc1e5),{'dbName':_0x492496,'mode':_0x55b38a,'syncedAt':new Date()[_0x5a5342(0x107)](),'description':_0x8fc1e5[_0x5a5342(0x101)]}),_0x22e57b=resolveLocalSqlFilePath(_0x3d1b46,_0x8fc1e5['sqlCode'],buildSqlLockEntry(_0x8fc1e5,ensureRemoteSqlContent(_0x8fc1e5),'',{'dbName':_0x492496})),_0x35d3f4=await findExistingSqlFiles(_0x3d1b46,_0x22e57b,_0x55b38a,_0x1a3459[_0x5a5342(0xcb)][_0x8fc1e5['sqlCode']]),_0x5e49f8=await compareExistingSqlFiles(_0x35d3f4,_0x2669ff,_0x55b38a);if(_0x5e49f8[_0x5a5342(0x102)](({equivalent:_0xb5147f})=>!_0xb5147f)){_0x9c640b=!![];break;}}if(_0x9c640b){const _0x39efb2=await confirmForceOverwrite(_0x5a5342(0xd4));if(!_0x39efb2)throw CliErrors['cancelled'](_0x5a5342(0xfd));}}const _0x14dd09=cloneSqlLockData(_0x28f563),_0x50a486=_0x14dd09[_0x5a5342(0xe9)][_0x3d1b46[_0x5a5342(0x100)]],_0x147bb8=[],_0x4c5496=[];for(const _0x15ce43 of _0x5309ed){const _0x31b376=_0x50a486[_0x5a5342(0xcb)][_0x15ce43['sqlCode']],_0x5cfb91=ensureRemoteSqlContent(_0x15ce43),_0x1dd701=detectSqlMode(_0x5cfb91),_0x34f573=_0x15ce43[_0x5a5342(0xdf)]?await getDbName(_0x5449b0[_0x5a5342(0x100)],Number(_0x15ce43[_0x5a5342(0xdf)]))[_0x5a5342(0x10c)](()=>undefined):undefined,_0x2f2b28=buildLocalSqlFileContent({'sqlCode':_0x15ce43[_0x5a5342(0x103)],'sqlName':_0x15ce43[_0x5a5342(0xe7)],'dbId':_0x15ce43[_0x5a5342(0xdf)]},_0x5cfb91,{'dbName':_0x34f573,'mode':_0x1dd701,'syncedAt':new Date()[_0x5a5342(0x107)](),'description':_0x15ce43[_0x5a5342(0x101)]}),_0x128c03=buildSqlLockEntry(_0x15ce43,_0x5cfb91,computeSqlContentHash(_0x2f2b28),{'dbName':_0x34f573}),_0x2e8c92=_0x128c03[_0x5a5342(0xfc)],_0x49f59d=join(_0x3d1b46[_0x5a5342(0xda)],_0x2e8c92);try{const _0x49a1a9=await findExistingSqlFiles(_0x3d1b46,_0x49f59d,_0x1dd701,_0x31b376),_0x7114d7=await compareExistingSqlFiles(_0x49a1a9,_0x2f2b28,_0x1dd701);if(!_0x3cdfa3&&_0x7114d7['some'](({equivalent:_0x4476ac})=>!_0x4476ac)){_0x4c5496['push']({'sqlCode':_0x15ce43[_0x5a5342(0x103)],'reason':_0x5a5342(0xf2)});continue;}const _0x4435ec=_0x7114d7[_0x5a5342(0xe0)](({file:_0x4af0eb})=>_0x4af0eb['isCanonical']),_0x28bf4c=_0x7114d7[_0x5a5342(0xe0)](({file:_0x437580})=>!_0x437580[_0x5a5342(0x105)]);if(_0x4435ec?.[_0x5a5342(0xfb)]&&!_0x28bf4c){_0x4c5496['push']({'sqlCode':_0x15ce43[_0x5a5342(0x103)],'reason':_0x5a5342(0xe6)}),_0x50a486['sqls'][_0x15ce43[_0x5a5342(0x103)]]={..._0x128c03,'hash':computeSqlContentHash(_0x4435ec[_0x5a5342(0xef)]),'path':_0x2e8c92};continue;}!_0x4435ec?.[_0x5a5342(0xfb)]&&(await ensureParentDirectory(_0x49f59d),await writeFile(_0x49f59d,_0x2f2b28,_0x5a5342(0xd3))),_0x28bf4c&&await rm(_0x28bf4c[_0x5a5342(0xf0)]['filePath'],{'force':!![]}),_0x50a486['sqls'][_0x15ce43[_0x5a5342(0x103)]]={..._0x128c03,'hash':_0x4435ec?.['equivalent']?computeSqlContentHash(_0x4435ec[_0x5a5342(0xef)]):_0x128c03[_0x5a5342(0x108)],'path':_0x2e8c92},_0x147bb8[_0x5a5342(0xd8)]({'sqlCode':_0x15ce43[_0x5a5342(0x103)],'filePath':_0x49f59d});}catch(_0x1c8ded){_0x20c24c[_0x5a5342(0xd8)]({'sqlCode':_0x15ce43[_0x5a5342(0x103)],'error':_0x1c8ded instanceof Error?_0x1c8ded[_0x5a5342(0xee)]:String(_0x1c8ded)});}}return _0x50a486[_0x5a5342(0xf8)]=new Date()['toISOString'](),await writeSqlLockFile(_0x3d1b46[_0x5a5342(0xcd)],_0x14dd09),{'ok':_0x20c24c['length']===0x0,'data':{'pulled':_0x147bb8,'skipped':_0x4c5496,'failed':_0x20c24c},'message':_0x5a5342(0x10f)+_0x147bb8[_0x5a5342(0xd1)]+_0x5a5342(0x106)+_0x4c5496['length']+'\x20skipped,\x20'+_0x20c24c[_0x5a5342(0xd1)]+_0x5a5342(0xf6)};}};function isEquivalentPulledSqlFile(_0x2be404,_0x4c950a,_0x1037df,_0x1d5b4c){if(_0x1037df!==_0x1d5b4c)return normalizePulledSqlBody(_0x2be404,_0x1037df)===normalizePulledSqlBody(_0x4c950a,_0x1d5b4c);return normalizePullComparableContent(_0x2be404,_0x1037df)===normalizePullComparableContent(_0x4c950a,_0x1d5b4c);}async function findExistingSqlFiles(_0x30a540,_0x3c67de,_0x449604,_0xadeabb){const _0x51d7cf=a253_0x1e67f3,_0x59fa4c=[];await fileExists(_0x3c67de)&&_0x59fa4c[_0x51d7cf(0xd8)]({'filePath':_0x3c67de,'mode':_0x449604,'isCanonical':!![]});if(!_0xadeabb?.['path'])return _0x59fa4c;const _0x52472b=join(_0x30a540[_0x51d7cf(0xda)],_0xadeabb[_0x51d7cf(0xfc)]);if(_0x52472b===_0x3c67de)return _0x59fa4c;return await fileExists(_0x52472b)&&_0x59fa4c[_0x51d7cf(0xd8)]({'filePath':_0x52472b,'mode':_0xadeabb[_0x51d7cf(0xdb)]??modeFromFilePath(_0x52472b),'isCanonical':![]}),_0x59fa4c;}async function compareExistingSqlFiles(_0x597757,_0x48aba1,_0xdff5cf){return Promise['all'](_0x597757['map'](async _0x5f10d6=>{const _0x70b06a=a253_0x4366,_0x3bac0c=await readFile(_0x5f10d6['filePath'],_0x70b06a(0xd3));return{'file':_0x5f10d6,'content':_0x3bac0c,'equivalent':isEquivalentPulledSqlFile(_0x3bac0c,_0x48aba1,_0x5f10d6[_0x70b06a(0xdb)],_0xdff5cf)};}));}function modeFromFilePath(_0x26bdde){const _0x186cd2=a253_0x1e67f3;return _0x26bdde['toLowerCase']()[_0x186cd2(0xf3)](_0x186cd2(0xfa))?_0x186cd2(0xf1):_0x186cd2(0xe1);}function normalizePulledSqlBody(_0x17a3b9,_0xb4b3cd){const _0x2c3ded=a253_0x1e67f3;return stripLocalSqlMetadata(_0x17a3b9,_0xb4b3cd)[_0x2c3ded(0xd5)](/\r\n/g,'\x0a')[_0x2c3ded(0xe2)]();}function normalizePullComparableContent(_0x132cf2,_0x50474a){const _0x577441=a253_0x1e67f3,_0x198a44=_0x132cf2[_0x577441(0xd5)](/\r\n/g,'\x0a')[_0x577441(0x110)]('\x0a'),_0x5112c7=_0x198a44[_0x577441(0xfe)](_0x3dc631=>!isSyncedAtMetadataLine(_0x3dc631,_0x50474a));return _0x5112c7['join']('\x0a');}function isSyncedAtMetadataLine(_0xcabb70,_0x47d9b5){const _0x431e3b=a253_0x1e67f3;if(_0x47d9b5===_0x431e3b(0xf1))return/^\s*<!--\s*@lovrabet\.syncedAt:/[_0x431e3b(0xe8)](_0xcabb70);return/^\s*--\s*@lovrabet\.syncedAt:/[_0x431e3b(0xe8)](_0xcabb70);}
1
+ const a253_0x4dea89=a253_0x1789;(function(_0x1d5a27,_0x4900f0){const _0xf9fa73=a253_0x1789,_0x469dbb=_0x1d5a27();while(!![]){try{const _0x458011=parseInt(_0xf9fa73(0x1ae))/0x1*(parseInt(_0xf9fa73(0x1b7))/0x2)+parseInt(_0xf9fa73(0x1a8))/0x3*(parseInt(_0xf9fa73(0x192))/0x4)+-parseInt(_0xf9fa73(0x1a2))/0x5+parseInt(_0xf9fa73(0x187))/0x6+parseInt(_0xf9fa73(0x1bd))/0x7+parseInt(_0xf9fa73(0x1b9))/0x8+parseInt(_0xf9fa73(0x18e))/0x9*(-parseInt(_0xf9fa73(0x1cb))/0xa);if(_0x458011===_0x4900f0)break;else _0x469dbb['push'](_0x469dbb['shift']());}catch(_0x504042){_0x469dbb['push'](_0x469dbb['shift']());}}}(a253_0x281e,0x3d861));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{detectSqlMode}from'../../core/sql-sync/utils.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;function a253_0x281e(){const _0x2a3f6a=['some','boolean','string','filter','message','pull','str','local\x20differs\x20from\x20remote\x20(use\x20--force\x20to\x20overwrite)','114RdlvBh','sqlRoot','803000SUFNKa','Force\x20overwrite\x20local\x20unsynced\x20changes','sql','totalCount','1475971oKfHfD','force','read','sqlContent','dbId','hash','appCode','skipped','join','utf8','replace','find','\x20skipped,\x20','apps','30DLmugF','sqls','local\x20differs\x20from\x20remote','isCanonical','.xml','nonInteractive','equivalent','toISOString','paging','sqlRootDir','filePath','344022kGFKZD','description','unchanged','would_pull','Would\x20pull\x20','bool','split','922203KouCIO','Force\x20pull\x20will\x20overwrite\x20local\x20SQL\x20that\x20differs\x20from\x20remote.','map','all','8tguqtB','conflict','tableData','lastSync','name','POST','file','sqlCode','catch','Pull\x20remote\x20SQL\x20queries\x20to\x20local\x20.rabetbase/sql/','toLowerCase','test','Pull\x20complete:\x20','endsWith','mybatisXml','mode','1019310LnIBjA','trim','sqlcode','sqlName','push','/smartapi/custom/queryUserCustomSqlList\x20+\x20/smartapi/custom/getUserCustomSql','276468mfVWOg','\x20written,\x20','path','Force\x20pull\x20cancelled.','lockFilePath','length','3691YqBgmh'];a253_0x281e=function(){return _0x2a3f6a;};return a253_0x281e();}async function fetchAllSqlQueries(_0x24884d,_0x395e1d){const _0x5026bb=a253_0x1789,_0x41bc7f=[];let _0x6ca3b=0x1;while(!![]){const _0xa78ac9=await listSqlQueries(_0x24884d,{'currentPage':_0x6ca3b,'pageSize':PAGE_SIZE,'sqlCode':_0x395e1d[_0x5026bb(0x199)],'sqlName':_0x395e1d[_0x5026bb(0x1a5)]}),_0x4d525c=_0xa78ac9[_0x5026bb(0x194)]??[];_0x41bc7f['push'](..._0x4d525c);if(_0x4d525c[_0x5026bb(0x1ad)]===0x0)break;const _0x2802bc=_0xa78ac9[_0x5026bb(0x184)]?.[_0x5026bb(0x1bc)];if(_0x2802bc!=null?_0x41bc7f[_0x5026bb(0x1ad)]>=_0x2802bc:_0x4d525c[_0x5026bb(0x1ad)]<PAGE_SIZE)break;_0x6ca3b++;}return _0x41bc7f;}async function ensureSqlContent(_0x493784){const _0xc38abd=a253_0x1789;if(_0x493784['sqlContent']!=null&&String(_0x493784[_0xc38abd(0x1c0)])[_0xc38abd(0x1ad)]>0x0)return _0x493784;return getSqlQueryDetail(_0x493784[_0xc38abd(0x199)]);}export const sqlPull={'service':'sql','command':a253_0x4dea89(0x1b4),'description':a253_0x4dea89(0x19b),'risk':a253_0x4dea89(0x1bf),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a253_0x4dea89(0x196),'type':a253_0x4dea89(0x1b1),'description':'Filter\x20by\x20SQL\x20display\x20name'},{'name':a253_0x4dea89(0x1be),'type':a253_0x4dea89(0x1b0),'description':a253_0x4dea89(0x1ba)}],async 'dryRun'(_0x18348a){const _0x562036=a253_0x4dea89,_0x8e4a3d=loadSqlProjectConfig(_0x18348a[_0x562036(0x1c3)]),_0xe73c13=await readSqlLockFile(_0x8e4a3d[_0x562036(0x1ac)]),{appLock:_0x5cec64}=ensureSqlLockScope(_0xe73c13??createEmptySqlLock(),_0x8e4a3d[_0x562036(0x1c3)],_0x8e4a3d['sqlRoot'],_0x562036(0x1b4)),_0x3e37bc=await fetchAllSqlQueries(_0x18348a[_0x562036(0x1c3)],{'sqlCode':_0x18348a[_0x562036(0x1b5)](_0x562036(0x1a4))||undefined,'sqlName':_0x18348a[_0x562036(0x1b5)](_0x562036(0x196))||undefined}),_0x1ec708=[];for(const _0x40c3a2 of _0x3e37bc){const _0x54f4a7=await ensureSqlContent(_0x40c3a2),_0x4a9810=ensureRemoteSqlContent(_0x54f4a7),_0x3b59a1=detectSqlMode(_0x4a9810),_0x2d7b57=_0x54f4a7[_0x562036(0x1c1)]?await getDbName(_0x18348a[_0x562036(0x1c3)],Number(_0x54f4a7[_0x562036(0x1c1)]))[_0x562036(0x19a)](()=>undefined):undefined,_0x55f1d4=buildLocalSqlFileContent({'sqlCode':_0x54f4a7[_0x562036(0x199)],'sqlName':_0x54f4a7[_0x562036(0x1a5)],'dbId':_0x54f4a7[_0x562036(0x1c1)]},_0x4a9810,{'dbName':_0x2d7b57,'mode':_0x3b59a1,'syncedAt':new Date()['toISOString'](),'description':_0x54f4a7[_0x562036(0x188)]}),_0x1e1e45=buildSqlLockEntry(_0x54f4a7,_0x4a9810,'',{'dbName':_0x2d7b57}),_0x31fbd9=resolveLocalSqlFilePath(_0x8e4a3d,_0x54f4a7[_0x562036(0x199)],_0x1e1e45);let _0xf78700=_0x562036(0x18a),_0x4df20d;const _0x23ee5c=await findExistingSqlFiles(_0x8e4a3d,_0x31fbd9,_0x3b59a1,_0x5cec64[_0x562036(0x1cc)][_0x54f4a7[_0x562036(0x199)]]);if(_0x23ee5c[_0x562036(0x1ad)]>0x0){const _0x385cc0=await compareExistingSqlFiles(_0x23ee5c,_0x55f1d4,_0x3b59a1);if(_0x385cc0[_0x562036(0x1af)](({equivalent:_0x5f20d8})=>!_0x5f20d8))_0xf78700=_0x562036(0x193),_0x4df20d=_0x562036(0x1b6);else _0x385cc0[_0x562036(0x1ad)]===0x1&&_0x385cc0[0x0]?.[_0x562036(0x198)][_0x562036(0x1ce)]&&(_0xf78700=_0x562036(0x1c4),_0x4df20d=_0x562036(0x189));}_0x1ec708[_0x562036(0x1a6)]({'sqlCode':_0x54f4a7['sqlCode'],'sqlName':_0x54f4a7['sqlName'],'filePath':_0x31fbd9,'status':_0xf78700,'reason':_0x4df20d});}return{'method':_0x562036(0x197),'url':_0x562036(0x1a7),'body':{'appCode':_0x18348a[_0x562036(0x1c3)],'sqlCode':_0x18348a[_0x562036(0x1b5)](_0x562036(0x1a4))||null,'sqlName':_0x18348a[_0x562036(0x1b5)]('name')||null,'files':_0x1ec708},'description':_0x562036(0x18b)+_0x1ec708[_0x562036(0x1ad)]+'\x20SQL\x20file(s)\x20into\x20'+_0x8e4a3d[_0x562036(0x185)]};},async 'execute'(_0x2e3108){const _0x3b282b=a253_0x4dea89,_0x3f9118=loadSqlProjectConfig(_0x2e3108[_0x3b282b(0x1c3)]),_0x55a043=await readSqlLockFile(_0x3f9118[_0x3b282b(0x1ac)]),{lockData:_0x5b87a7,appLock:_0xf9403d}=ensureSqlLockScope(_0x55a043??createEmptySqlLock(),_0x3f9118[_0x3b282b(0x1c3)],_0x3f9118[_0x3b282b(0x1b8)],'pull'),_0x52f50b=_0x2e3108[_0x3b282b(0x18c)](_0x3b282b(0x1be)),_0x4f336e=await fetchAllSqlQueries(_0x2e3108[_0x3b282b(0x1c3)],{'sqlCode':_0x2e3108[_0x3b282b(0x1b5)]('sqlcode')||undefined,'sqlName':_0x2e3108[_0x3b282b(0x1b5)](_0x3b282b(0x196))||undefined});if(_0x4f336e['length']===0x0)return{'ok':!![],'data':{'pulled':[],'skipped':[],'failed':[]},'message':'No\x20remote\x20SQL\x20queries\x20matched.'};const _0x5dbbda=[],_0x40c637=[];for(const _0x391768 of _0x4f336e){try{_0x5dbbda[_0x3b282b(0x1a6)](await ensureSqlContent(_0x391768));}catch(_0x1da90a){_0x40c637[_0x3b282b(0x1a6)]({'sqlCode':_0x391768[_0x3b282b(0x199)],'error':_0x1da90a instanceof Error?_0x1da90a[_0x3b282b(0x1b3)]:String(_0x1da90a)});}}if(_0x52f50b&&!_0x2e3108[_0x3b282b(0x181)]){let _0x2de042=![];for(const _0x39af53 of _0x5dbbda){const _0x32ee50=detectSqlMode(ensureRemoteSqlContent(_0x39af53)),_0x2808f8=_0x39af53[_0x3b282b(0x1c1)]?await getDbName(_0x2e3108[_0x3b282b(0x1c3)],Number(_0x39af53['dbId']))['catch'](()=>undefined):undefined,_0x402641=buildLocalSqlFileContent({'sqlCode':_0x39af53[_0x3b282b(0x199)],'sqlName':_0x39af53[_0x3b282b(0x1a5)],'dbId':_0x39af53[_0x3b282b(0x1c1)]},ensureRemoteSqlContent(_0x39af53),{'dbName':_0x2808f8,'mode':_0x32ee50,'syncedAt':new Date()[_0x3b282b(0x183)](),'description':_0x39af53[_0x3b282b(0x188)]}),_0x590b26=resolveLocalSqlFilePath(_0x3f9118,_0x39af53[_0x3b282b(0x199)],buildSqlLockEntry(_0x39af53,ensureRemoteSqlContent(_0x39af53),'',{'dbName':_0x2808f8})),_0x1231d1=await findExistingSqlFiles(_0x3f9118,_0x590b26,_0x32ee50,_0xf9403d[_0x3b282b(0x1cc)][_0x39af53[_0x3b282b(0x199)]]),_0x553430=await compareExistingSqlFiles(_0x1231d1,_0x402641,_0x32ee50);if(_0x553430[_0x3b282b(0x1af)](({equivalent:_0xd5ea58})=>!_0xd5ea58)){_0x2de042=!![];break;}}if(_0x2de042){const _0x52d534=await confirmForceOverwrite(_0x3b282b(0x18f));if(!_0x52d534)throw CliErrors['cancelled'](_0x3b282b(0x1ab));}}const _0x6f202f=cloneSqlLockData(_0x5b87a7),_0x2f0ab8=_0x6f202f[_0x3b282b(0x1ca)][_0x3f9118['appCode']],_0xbc2e07=[],_0x19f4e4=[];for(const _0x448b4b of _0x5dbbda){const _0x5837fe=_0x2f0ab8[_0x3b282b(0x1cc)][_0x448b4b['sqlCode']],_0x4877e9=ensureRemoteSqlContent(_0x448b4b),_0x46bfcf=detectSqlMode(_0x4877e9),_0x4439ba=_0x448b4b[_0x3b282b(0x1c1)]?await getDbName(_0x2e3108[_0x3b282b(0x1c3)],Number(_0x448b4b[_0x3b282b(0x1c1)]))['catch'](()=>undefined):undefined,_0x4ace3c=buildLocalSqlFileContent({'sqlCode':_0x448b4b['sqlCode'],'sqlName':_0x448b4b['sqlName'],'dbId':_0x448b4b[_0x3b282b(0x1c1)]},_0x4877e9,{'dbName':_0x4439ba,'mode':_0x46bfcf,'syncedAt':new Date()['toISOString'](),'description':_0x448b4b[_0x3b282b(0x188)]}),_0x209f5a=buildSqlLockEntry(_0x448b4b,_0x4877e9,computeSqlContentHash(_0x4ace3c),{'dbName':_0x4439ba}),_0x1d8f20=_0x209f5a[_0x3b282b(0x1aa)],_0x2d82e9=join(_0x3f9118[_0x3b282b(0x185)],_0x1d8f20);try{const _0xf88e93=await findExistingSqlFiles(_0x3f9118,_0x2d82e9,_0x46bfcf,_0x5837fe),_0x38a956=await compareExistingSqlFiles(_0xf88e93,_0x4ace3c,_0x46bfcf);if(!_0x52f50b&&_0x38a956[_0x3b282b(0x1af)](({equivalent:_0x1838dc})=>!_0x1838dc)){_0x19f4e4[_0x3b282b(0x1a6)]({'sqlCode':_0x448b4b['sqlCode'],'reason':_0x3b282b(0x1cd)});continue;}const _0x113df3=_0x38a956[_0x3b282b(0x1c8)](({file:_0x321e91})=>_0x321e91['isCanonical']),_0x3612f0=_0x38a956[_0x3b282b(0x1c8)](({file:_0x3e25f6})=>!_0x3e25f6[_0x3b282b(0x1ce)]);if(_0x113df3?.[_0x3b282b(0x182)]&&!_0x3612f0){_0x19f4e4['push']({'sqlCode':_0x448b4b[_0x3b282b(0x199)],'reason':_0x3b282b(0x189)}),_0x2f0ab8[_0x3b282b(0x1cc)][_0x448b4b[_0x3b282b(0x199)]]={..._0x209f5a,'hash':computeSqlContentHash(_0x113df3['content']),'path':_0x1d8f20};continue;}!_0x113df3?.['equivalent']&&(await ensureParentDirectory(_0x2d82e9),await writeFile(_0x2d82e9,_0x4ace3c,_0x3b282b(0x1c6))),_0x3612f0&&await rm(_0x3612f0['file'][_0x3b282b(0x186)],{'force':!![]}),_0x2f0ab8[_0x3b282b(0x1cc)][_0x448b4b[_0x3b282b(0x199)]]={..._0x209f5a,'hash':_0x113df3?.[_0x3b282b(0x182)]?computeSqlContentHash(_0x113df3['content']):_0x209f5a[_0x3b282b(0x1c2)],'path':_0x1d8f20},_0xbc2e07[_0x3b282b(0x1a6)]({'sqlCode':_0x448b4b[_0x3b282b(0x199)],'filePath':_0x2d82e9});}catch(_0x739f17){_0x40c637[_0x3b282b(0x1a6)]({'sqlCode':_0x448b4b[_0x3b282b(0x199)],'error':_0x739f17 instanceof Error?_0x739f17[_0x3b282b(0x1b3)]:String(_0x739f17)});}}return _0x2f0ab8[_0x3b282b(0x195)]=new Date()[_0x3b282b(0x183)](),await writeSqlLockFile(_0x3f9118['lockFilePath'],_0x6f202f),{'ok':_0x40c637[_0x3b282b(0x1ad)]===0x0,'data':{'pulled':_0xbc2e07,'skipped':_0x19f4e4,'failed':_0x40c637},'message':_0x3b282b(0x19e)+_0xbc2e07['length']+_0x3b282b(0x1a9)+_0x19f4e4['length']+_0x3b282b(0x1c9)+_0x40c637['length']+'\x20failed'};}};function a253_0x1789(_0x5934b1,_0x1ab0ac){_0x5934b1=_0x5934b1-0x181;const _0x281ebc=a253_0x281e();let _0x17896b=_0x281ebc[_0x5934b1];return _0x17896b;}function isEquivalentPulledSqlFile(_0x3d75a5,_0x3e356e,_0x4e1dbf,_0x2c11bc){if(_0x4e1dbf!==_0x2c11bc)return normalizePulledSqlBody(_0x3d75a5,_0x4e1dbf)===normalizePulledSqlBody(_0x3e356e,_0x2c11bc);return normalizePullComparableContent(_0x3d75a5,_0x4e1dbf)===normalizePullComparableContent(_0x3e356e,_0x2c11bc);}async function findExistingSqlFiles(_0x594699,_0x1efa70,_0x1e0f4d,_0x31432d){const _0x33d807=a253_0x4dea89,_0x45acd9=[];await fileExists(_0x1efa70)&&_0x45acd9[_0x33d807(0x1a6)]({'filePath':_0x1efa70,'mode':_0x1e0f4d,'isCanonical':!![]});if(!_0x31432d?.[_0x33d807(0x1aa)])return _0x45acd9;const _0x13070a=join(_0x594699[_0x33d807(0x185)],_0x31432d[_0x33d807(0x1aa)]);if(_0x13070a===_0x1efa70)return _0x45acd9;return await fileExists(_0x13070a)&&_0x45acd9['push']({'filePath':_0x13070a,'mode':_0x31432d[_0x33d807(0x1a1)]??modeFromFilePath(_0x13070a),'isCanonical':![]}),_0x45acd9;}async function compareExistingSqlFiles(_0x4e9522,_0x276e6e,_0x4dd06f){const _0x3b5a85=a253_0x4dea89;return Promise[_0x3b5a85(0x191)](_0x4e9522[_0x3b5a85(0x190)](async _0x12c88c=>{const _0xe84ad8=_0x3b5a85,_0x4320bb=await readFile(_0x12c88c['filePath'],_0xe84ad8(0x1c6));return{'file':_0x12c88c,'content':_0x4320bb,'equivalent':isEquivalentPulledSqlFile(_0x4320bb,_0x276e6e,_0x12c88c[_0xe84ad8(0x1a1)],_0x4dd06f)};}));}function modeFromFilePath(_0x852495){const _0x265cad=a253_0x4dea89;return _0x852495[_0x265cad(0x19c)]()[_0x265cad(0x19f)](_0x265cad(0x1cf))?_0x265cad(0x1a0):_0x265cad(0x1bb);}function normalizePulledSqlBody(_0x14f7b2,_0x5921d9){const _0x1ab6ef=a253_0x4dea89;return stripLocalSqlMetadata(_0x14f7b2,_0x5921d9)[_0x1ab6ef(0x1c7)](/\r\n/g,'\x0a')[_0x1ab6ef(0x1a3)]();}function normalizePullComparableContent(_0x30739a,_0x4918ab){const _0x3eac18=a253_0x4dea89,_0x22a08f=_0x30739a[_0x3eac18(0x1c7)](/\r\n/g,'\x0a')[_0x3eac18(0x18d)]('\x0a'),_0x5bf637=_0x22a08f[_0x3eac18(0x1b2)](_0x47d11e=>!isSyncedAtMetadataLine(_0x47d11e,_0x4918ab));return _0x5bf637[_0x3eac18(0x1c5)]('\x0a');}function isSyncedAtMetadataLine(_0x5aa04c,_0x1043b1){const _0x64aaa7=a253_0x4dea89;if(_0x1043b1==='mybatisXml')return/^\s*<!--\s*@lovrabet\.syncedAt:/[_0x64aaa7(0x19d)](_0x5aa04c);return/^\s*--\s*@lovrabet\.syncedAt:/['test'](_0x5aa04c);}