@lovrabet/rabetbase-cli 2.5.0-beta.2 → 2.5.0-beta.4

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 (304) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/api/generate-sdk-config-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/delete.js +1 -1
  53. package/lib/commands/config/get.js +1 -1
  54. package/lib/commands/config/index.js +1 -1
  55. package/lib/commands/config/init.js +1 -1
  56. package/lib/commands/config/list.js +1 -1
  57. package/lib/commands/config/set.js +1 -1
  58. package/lib/commands/config/shared.js +1 -1
  59. package/lib/commands/dataset/business-group-update.js +1 -1
  60. package/lib/commands/dataset/business-groups.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analysis-batching.js +1 -1
  79. package/lib/commands/db/analyze-batch-plan.js +1 -1
  80. package/lib/commands/db/analyze-cancel.js +1 -1
  81. package/lib/commands/db/analyze-start.js +1 -1
  82. package/lib/commands/db/analyze-status.js +1 -1
  83. package/lib/commands/db/create.js +1 -1
  84. package/lib/commands/db/delete.js +1 -1
  85. package/lib/commands/db/detail.js +1 -1
  86. package/lib/commands/db/diff-refresh-start.js +1 -1
  87. package/lib/commands/db/diff-refresh-status.js +1 -1
  88. package/lib/commands/db/diff.js +1 -1
  89. package/lib/commands/db/index.js +1 -1
  90. package/lib/commands/db/list.js +1 -1
  91. package/lib/commands/db/shared.js +1 -1
  92. package/lib/commands/db/table-diff-shared.d.ts +13 -0
  93. package/lib/commands/db/table-diff-shared.js +1 -0
  94. package/lib/commands/db/tables.js +1 -1
  95. package/lib/commands/db/test.js +1 -1
  96. package/lib/commands/db/update.js +1 -1
  97. package/lib/commands/doctor.js +1 -1
  98. package/lib/commands/file/index.js +1 -1
  99. package/lib/commands/issue/index.js +1 -1
  100. package/lib/commands/issue/nudge.js +1 -1
  101. package/lib/commands/issue/report.js +1 -1
  102. package/lib/commands/issue/shared.js +1 -1
  103. package/lib/commands/kb/create.js +1 -1
  104. package/lib/commands/kb/delete.js +1 -1
  105. package/lib/commands/kb/detail.js +1 -1
  106. package/lib/commands/kb/index.js +1 -1
  107. package/lib/commands/kb/list.js +1 -1
  108. package/lib/commands/kb/search.js +1 -1
  109. package/lib/commands/kb/shared.js +1 -1
  110. package/lib/commands/kb/update.js +1 -1
  111. package/lib/commands/logs/index.js +1 -1
  112. package/lib/commands/menu/asset-update.js +1 -1
  113. package/lib/commands/menu/delete.js +1 -1
  114. package/lib/commands/menu/external-link-create.js +1 -1
  115. package/lib/commands/menu/external-link-update.js +1 -1
  116. package/lib/commands/menu/group-create.js +1 -1
  117. package/lib/commands/menu/group-update.js +1 -1
  118. package/lib/commands/menu/index.js +1 -1
  119. package/lib/commands/menu/list.js +1 -1
  120. package/lib/commands/menu/move.js +1 -1
  121. package/lib/commands/menu/regroup-start.js +1 -1
  122. package/lib/commands/menu/rename.js +1 -1
  123. package/lib/commands/menu/shared/compare-table.js +1 -1
  124. package/lib/commands/menu/shared/delete-plan.js +1 -1
  125. package/lib/commands/menu/shared/facts.js +1 -1
  126. package/lib/commands/menu/shared/index.js +1 -1
  127. package/lib/commands/menu/shared/inquirer.js +1 -1
  128. package/lib/commands/menu/shared/local-pages.js +1 -1
  129. package/lib/commands/menu/shared/logic.js +1 -1
  130. package/lib/commands/menu/shared/mutations.js +1 -1
  131. package/lib/commands/menu/shared/service.js +1 -1
  132. package/lib/commands/menu/shared/sync-core.js +1 -1
  133. package/lib/commands/menu/shared/update-core.js +1 -1
  134. package/lib/commands/menu/shared/valid-url.js +1 -1
  135. package/lib/commands/menu/sync.js +1 -1
  136. package/lib/commands/menu/visibility-update.js +1 -1
  137. package/lib/commands/notification/config-create.js +1 -1
  138. package/lib/commands/notification/config-delete.js +1 -1
  139. package/lib/commands/notification/config-list.js +1 -1
  140. package/lib/commands/notification/config-update.js +1 -1
  141. package/lib/commands/notification/index.js +1 -1
  142. package/lib/commands/notification/shared.js +1 -1
  143. package/lib/commands/ocr/index.js +1 -1
  144. package/lib/commands/page/create.js +1 -1
  145. package/lib/commands/page/custom/detail.js +1 -1
  146. package/lib/commands/page/custom/list.js +1 -1
  147. package/lib/commands/page/custom/publish.js +1 -1
  148. package/lib/commands/page/custom/shared.js +1 -1
  149. package/lib/commands/page/custom/syntax.js +1 -1
  150. package/lib/commands/page/custom/template.js +1 -1
  151. package/lib/commands/page/custom/update.js +1 -1
  152. package/lib/commands/page/data-list-status.js +1 -1
  153. package/lib/commands/page/generate-start.js +1 -1
  154. package/lib/commands/page/generate-status.js +1 -1
  155. package/lib/commands/page/index.js +1 -1
  156. package/lib/commands/page/pull.js +1 -1
  157. package/lib/commands/page/push.js +1 -1
  158. package/lib/commands/page/relation-audit.js +1 -1
  159. package/lib/commands/page/restore.js +1 -1
  160. package/lib/commands/page/shared.js +1 -1
  161. package/lib/commands/page/sync.js +1 -1
  162. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  163. package/lib/commands/project/create/format-elapsed.js +1 -1
  164. package/lib/commands/project/create/main.js +1 -1
  165. package/lib/commands/project/create/materialize-project-template.js +1 -1
  166. package/lib/commands/project/create/project-name.js +1 -1
  167. package/lib/commands/project/create/project-template-archive.js +1 -1
  168. package/lib/commands/project/create/project-template-path.js +1 -1
  169. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  170. package/lib/commands/project/create/use-format-code.js +1 -1
  171. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  172. package/lib/commands/project/index.js +1 -1
  173. package/lib/commands/project/upgrade.js +1 -1
  174. package/lib/commands/registry.js +1 -1
  175. package/lib/commands/role/delete.js +1 -1
  176. package/lib/commands/role/detail.js +1 -1
  177. package/lib/commands/role/index.js +1 -1
  178. package/lib/commands/role/list.js +1 -1
  179. package/lib/commands/role/shared.js +1 -1
  180. package/lib/commands/role/update.js +1 -1
  181. package/lib/commands/role/user-add.js +1 -1
  182. package/lib/commands/role/user-remove.js +1 -1
  183. package/lib/commands/role/user-resolve.js +1 -1
  184. package/lib/commands/run/index.js +1 -1
  185. package/lib/commands/schema.js +1 -1
  186. package/lib/commands/sql/create.js +1 -1
  187. package/lib/commands/sql/delete.js +1 -1
  188. package/lib/commands/sql/detail.js +1 -1
  189. package/lib/commands/sql/exec.js +1 -1
  190. package/lib/commands/sql/index.js +1 -1
  191. package/lib/commands/sql/list.js +1 -1
  192. package/lib/commands/sql/pull.js +1 -1
  193. package/lib/commands/sql/push.js +1 -1
  194. package/lib/commands/sql/shared.js +1 -1
  195. package/lib/commands/sql/status.js +1 -1
  196. package/lib/commands/sql/validate.js +1 -1
  197. package/lib/commands/task/index.js +1 -1
  198. package/lib/commands/task/status.js +1 -1
  199. package/lib/commands/tenant/index.js +1 -1
  200. package/lib/commands/tenant/members-list.js +1 -1
  201. package/lib/commands/tenant/shared.js +1 -1
  202. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  203. package/lib/commands/user-account/index.js +1 -1
  204. package/lib/commands/workspace/add.js +1 -1
  205. package/lib/commands/workspace/index.js +1 -1
  206. package/lib/commands/workspace/remove.js +1 -1
  207. package/lib/config/domain-config.js +1 -1
  208. package/lib/config/schema.js +1 -1
  209. package/lib/constant/cdn.js +1 -1
  210. package/lib/constant/cli.js +1 -1
  211. package/lib/constant/defaults.js +1 -1
  212. package/lib/constant/domain.js +1 -1
  213. package/lib/constant/env.js +1 -1
  214. package/lib/constant/output.js +1 -1
  215. package/lib/constant/paths.js +1 -1
  216. package/lib/constant/region.js +1 -1
  217. package/lib/constant/risk.js +1 -1
  218. package/lib/context/app-resolver.js +1 -1
  219. package/lib/context/auth-resolver.js +1 -1
  220. package/lib/context/config-loader.js +1 -1
  221. package/lib/context.js +1 -1
  222. package/lib/core/alias-resolver.js +1 -1
  223. package/lib/core/api-client.d.ts +1 -7
  224. package/lib/core/api-client.js +1 -1
  225. package/lib/core/bff/config.js +1 -1
  226. package/lib/core/bff/file-system.js +1 -1
  227. package/lib/core/bff/hash.js +1 -1
  228. package/lib/core/bff/lock.js +1 -1
  229. package/lib/core/bff/utils.js +1 -1
  230. package/lib/core/db-resolver.js +1 -1
  231. package/lib/core/page/file-system.js +1 -1
  232. package/lib/core/page/hash.js +1 -1
  233. package/lib/core/page/lock.js +1 -1
  234. package/lib/core/sql-index-auditor.js +1 -1
  235. package/lib/core/sql-sync/config.js +1 -1
  236. package/lib/core/sql-sync/file-system.js +1 -1
  237. package/lib/core/sql-sync/hash.js +1 -1
  238. package/lib/core/sql-sync/lock.js +1 -1
  239. package/lib/core/sql-sync/utils.js +1 -1
  240. package/lib/core/sql-validator.js +1 -1
  241. package/lib/errors.js +1 -1
  242. package/lib/framework/build-all-flags.js +1 -1
  243. package/lib/framework/error-output.js +1 -1
  244. package/lib/framework/explicit-yes.js +1 -1
  245. package/lib/framework/flags.js +1 -1
  246. package/lib/framework/help.js +1 -1
  247. package/lib/framework/index.js +1 -1
  248. package/lib/framework/output.js +1 -1
  249. package/lib/framework/response.js +1 -1
  250. package/lib/framework/runner-alias.js +1 -1
  251. package/lib/framework/runner.js +1 -1
  252. package/lib/framework/schema-export.js +1 -1
  253. package/lib/framework/types.js +1 -1
  254. package/lib/generated/build-info.d.ts +4 -4
  255. package/lib/generated/build-info.js +1 -1
  256. package/lib/help.js +1 -1
  257. package/lib/postinstall.js +1 -1
  258. package/lib/runtime/confirmation.js +1 -1
  259. package/lib/runtime/event.js +1 -1
  260. package/lib/runtime/index.js +1 -1
  261. package/lib/runtime/queue.js +1 -1
  262. package/lib/runtime/resolve.js +1 -1
  263. package/lib/skills/builtin-skill.js +1 -1
  264. package/lib/skills/main.js +1 -1
  265. package/lib/skills/npx-skills-add.js +1 -1
  266. package/lib/skills/skill-presence.js +1 -1
  267. package/lib/telemetry/cli-command-trace.js +1 -1
  268. package/lib/telemetry/cli-help-trace.js +1 -1
  269. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  270. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  271. package/lib/telemetry/send-cli-trace-log.js +1 -1
  272. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  273. package/lib/utils/ai_config.js +1 -1
  274. package/lib/utils/apply-jq-filter.js +1 -1
  275. package/lib/utils/cdn-config.js +1 -1
  276. package/lib/utils/check-sdk-version.js +1 -1
  277. package/lib/utils/cli-version-check.js +1 -1
  278. package/lib/utils/cli-version-policy.js +1 -1
  279. package/lib/utils/config.js +1 -1
  280. package/lib/utils/entity-with-id.js +1 -1
  281. package/lib/utils/file-utils.js +1 -1
  282. package/lib/utils/guides-cdn.js +1 -1
  283. package/lib/utils/http-client.js +1 -1
  284. package/lib/utils/is-non-interactive.js +1 -1
  285. package/lib/utils/logger.js +1 -1
  286. package/lib/utils/params.js +1 -1
  287. package/lib/utils/platform.js +1 -1
  288. package/lib/utils/sleep.js +1 -1
  289. package/lib/utils/template-replacer.js +1 -1
  290. package/lib/utils/update-notice.js +1 -1
  291. package/lib/utils/version.js +1 -1
  292. package/lib/utils/with-active-cookie.js +1 -1
  293. package/lib/utils/write-cli-side-channel.js +1 -1
  294. package/package.json +1 -1
  295. package/skills/rabetbase/SKILL.md +6 -6
  296. package/skills/rabetbase/guides/custom-page-workflow.md +1 -1
  297. package/skills/rabetbase/guides/database-connection-workflow.md +9 -9
  298. package/skills/rabetbase/references/rabetbase-config.md +2 -3
  299. package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -2
  300. package/skills/rabetbase/references/rabetbase-db-diff-refresh.md +4 -3
  301. package/skills/rabetbase/references/rabetbase-db-diff.md +7 -22
  302. package/skills/rabetbase/references/rabetbase-db-tables.md +14 -2
  303. package/skills/rabetbase/references/rabetbase-page-custom-list.md +5 -2
  304. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- const a173_0x2dbc70=a173_0x4060;(function(_0x3f5353,_0x1eda5e){const _0x33d9cc=a173_0x4060,_0x2b017c=_0x3f5353();while(!![]){try{const _0x396661=parseInt(_0x33d9cc(0xe6))/0x1*(parseInt(_0x33d9cc(0xe2))/0x2)+-parseInt(_0x33d9cc(0xe8))/0x3*(parseInt(_0x33d9cc(0xef))/0x4)+-parseInt(_0x33d9cc(0xf1))/0x5*(-parseInt(_0x33d9cc(0xe9))/0x6)+-parseInt(_0x33d9cc(0xdd))/0x7*(parseInt(_0x33d9cc(0xed))/0x8)+parseInt(_0x33d9cc(0xe7))/0x9*(parseInt(_0x33d9cc(0xda))/0xa)+-parseInt(_0x33d9cc(0xec))/0xb+parseInt(_0x33d9cc(0xdc))/0xc*(parseInt(_0x33d9cc(0xe1))/0xd);if(_0x396661===_0x1eda5e)break;else _0x2b017c['push'](_0x2b017c['shift']());}catch(_0x464ca7){_0x2b017c['push'](_0x2b017c['shift']());}}}(a173_0x5e41,0xf3a44));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH='/smartapi/permit/role/delete';function a173_0x4060(_0x5992bf,_0x5d7794){_0x5992bf=_0x5992bf-0xda;const _0x5e411c=a173_0x5e41();let _0x40608b=_0x5e411c[_0x5992bf];return _0x40608b;}export const roleDelete={'service':a173_0x2dbc70(0xe4),'command':a173_0x2dbc70(0xf0),'description':a173_0x2dbc70(0xdf),'risk':a173_0x2dbc70(0xee),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x269f94){const _0x2bf7e8=a173_0x2dbc70,_0x55e2b9=_0x269f94[_0x2bf7e8(0xea)]('id'),_0xdbf076=await getRoleById(_0x269f94[_0x2bf7e8(0xe5)],_0x55e2b9);return assertCustomRole(_0xdbf076,_0x2bf7e8(0xf0)),asDryRunResult({'scope':_0x2bf7e8(0xe3),'operation':'delete','selector':{'appCode':_0x269f94[_0x2bf7e8(0xe5)],'roleId':_0x55e2b9,'roleName':_0xdbf076[_0x2bf7e8(0xf2)]},'before':projectRole(_0xdbf076),'after':null,'dryRun':!![],'backend':{'method':_0x2bf7e8(0xde),'path':DELETE_PATH},'warnings':_0xdbf076[_0x2bf7e8(0xe0)]>0x0?['Role\x20still\x20has\x20'+_0xdbf076[_0x2bf7e8(0xe0)]+_0x2bf7e8(0xeb)]:[]},{'method':_0x2bf7e8(0xde),'url':DELETE_PATH});},async 'execute'(_0x49a88c){const _0x254e9e=a173_0x2dbc70,_0x72295c=_0x49a88c[_0x254e9e(0xea)]('id'),_0x5737f3=await getRoleById(_0x49a88c['appCode'],_0x72295c);return assertCustomRole(_0x5737f3,_0x254e9e(0xf0)),await deleteAppRole(_0x72295c),{'ok':!![],'data':{'scope':'dev','operation':_0x254e9e(0xf0),'selector':{'appCode':_0x49a88c[_0x254e9e(0xe5)],'roleId':_0x72295c,'roleName':_0x5737f3['roleName']},'before':projectRole(_0x5737f3),'after':null,'dryRun':![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':[]},'message':'Deleted\x20role\x20'+_0x5737f3[_0x254e9e(0xf2)]+_0x254e9e(0xdb)+_0x72295c+')'};}};function a173_0x5e41(){const _0x5821a4=['high-risk-write','4JpkbJF','delete','5YXpZfk','roleName','10683670ikYZLC','\x20(id=','56244ymGWgW','322aEmwMp','POST','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','userCount','4043RVBCVd','23810oHWaqF','dev','role','appCode','97wbFJob','9eUGdhW','1106268IFkljf','1964154DYEzOU','num','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','7431094RxXvLQ','341896HXUiME'];a173_0x5e41=function(){return _0x5821a4;};return a173_0x5e41();}
1
+ function a174_0x44b5(){const _0x569c32=['9zaNUjQ','\x20(id=','dev','appCode','POST','Deleted\x20role\x20','906740RjYOpM','10560880kWwPCZ','6wmWaAx','delete','4967300pdfJcq','3674785fViaoR','4397028dBEbvW','296PpEjbM','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','userCount','roleName','Role\x20still\x20has\x20','288477XtgGEx','1116419BcQDNv','Delete\x20a\x20CUSTOM\x20role\x20(built-in\x20roles\x20rejected);\x20requires\x20--yes','role','3WZszaR','/smartapi/permit/role/delete','num'];a174_0x44b5=function(){return _0x569c32;};return a174_0x44b5();}function a174_0x49d5(_0x563ca4,_0xee911f){_0x563ca4=_0x563ca4-0x1c9;const _0x44b50a=a174_0x44b5();let _0x49d575=_0x44b50a[_0x563ca4];return _0x49d575;}const a174_0x14be88=a174_0x49d5;(function(_0x8765aa,_0x56d7f9){const _0x42fe2d=a174_0x49d5,_0x1317cd=_0x8765aa();while(!![]){try{const _0x479d5a=parseInt(_0x42fe2d(0x1ca))/0x1+parseInt(_0x42fe2d(0x1d6))/0x2*(parseInt(_0x42fe2d(0x1cd))/0x3)+-parseInt(_0x42fe2d(0x1dc))/0x4+parseInt(_0x42fe2d(0x1db))/0x5*(-parseInt(_0x42fe2d(0x1d8))/0x6)+-parseInt(_0x42fe2d(0x1c9))/0x7*(-parseInt(_0x42fe2d(0x1dd))/0x8)+-parseInt(_0x42fe2d(0x1d0))/0x9*(-parseInt(_0x42fe2d(0x1da))/0xa)+-parseInt(_0x42fe2d(0x1d7))/0xb;if(_0x479d5a===_0x56d7f9)break;else _0x1317cd['push'](_0x1317cd['shift']());}catch(_0x4655af){_0x1317cd['push'](_0x1317cd['shift']());}}}(a174_0x44b5,0xc2968));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH=a174_0x14be88(0x1ce);export const roleDelete={'service':a174_0x14be88(0x1cc),'command':a174_0x14be88(0x1d9),'description':a174_0x14be88(0x1cb),'risk':'high-risk-write','flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x35f4fc){const _0x2a552b=a174_0x14be88,_0x46064b=_0x35f4fc[_0x2a552b(0x1cf)]('id'),_0x1e78df=await getRoleById(_0x35f4fc[_0x2a552b(0x1d3)],_0x46064b);return assertCustomRole(_0x1e78df,_0x2a552b(0x1d9)),asDryRunResult({'scope':_0x2a552b(0x1d2),'operation':_0x2a552b(0x1d9),'selector':{'appCode':_0x35f4fc[_0x2a552b(0x1d3)],'roleId':_0x46064b,'roleName':_0x1e78df['roleName']},'before':projectRole(_0x1e78df),'after':null,'dryRun':!![],'backend':{'method':_0x2a552b(0x1d4),'path':DELETE_PATH},'warnings':_0x1e78df[_0x2a552b(0x1df)]>0x0?[_0x2a552b(0x1e1)+_0x1e78df[_0x2a552b(0x1df)]+_0x2a552b(0x1de)]:[]},{'method':_0x2a552b(0x1d4),'url':DELETE_PATH});},async 'execute'(_0x3826aa){const _0xab74c9=a174_0x14be88,_0x19fcaf=_0x3826aa[_0xab74c9(0x1cf)]('id'),_0x50830a=await getRoleById(_0x3826aa[_0xab74c9(0x1d3)],_0x19fcaf);return assertCustomRole(_0x50830a,_0xab74c9(0x1d9)),await deleteAppRole(_0x19fcaf),{'ok':!![],'data':{'scope':_0xab74c9(0x1d2),'operation':_0xab74c9(0x1d9),'selector':{'appCode':_0x3826aa[_0xab74c9(0x1d3)],'roleId':_0x19fcaf,'roleName':_0x50830a[_0xab74c9(0x1e0)]},'before':projectRole(_0x50830a),'after':null,'dryRun':![],'backend':{'method':_0xab74c9(0x1d4),'path':DELETE_PATH},'warnings':[]},'message':_0xab74c9(0x1d5)+_0x50830a[_0xab74c9(0x1e0)]+_0xab74c9(0x1d1)+_0x19fcaf+')'};}};
@@ -1 +1 @@
1
- const a174_0x5e1716=a174_0x59bb;(function(_0x5801c8,_0x596c8f){const _0x38b82b=a174_0x59bb,_0x2e35ce=_0x5801c8();while(!![]){try{const _0x1b9cde=parseInt(_0x38b82b(0xea))/0x1+-parseInt(_0x38b82b(0xef))/0x2*(parseInt(_0x38b82b(0xe3))/0x3)+-parseInt(_0x38b82b(0xe8))/0x4+parseInt(_0x38b82b(0xf5))/0x5*(parseInt(_0x38b82b(0xe4))/0x6)+parseInt(_0x38b82b(0xe9))/0x7+-parseInt(_0x38b82b(0xf2))/0x8*(-parseInt(_0x38b82b(0xec))/0x9)+-parseInt(_0x38b82b(0xe5))/0xa;if(_0x1b9cde===_0x596c8f)break;else _0x2e35ce['push'](_0x2e35ce['shift']());}catch(_0x3454ab){_0x2e35ce['push'](_0x2e35ce['shift']());}}}(a174_0x28e8,0xb0c42));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a174_0x59bb(_0x550c4e,_0x4b881e){_0x550c4e=_0x550c4e-0xe2;const _0x28e82=a174_0x28e8();let _0x59bb20=_0x28e82[_0x550c4e];return _0x59bb20;}import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a174_0x28e8(){const _0x5933b1=['roleType','33926SbkWNO','detail','dev','24EAMpxU','Role\x20','num','432455CjsWUs','appCode','177PufJBP','78dazgdb','4071920JhosGG','roleName','Show\x20a\x20single\x20role\x27s\x20detail','4222720GPAFWn','2459471RQdlSc','599824LnqrmO','role','3336489tyUddl','read'];a174_0x28e8=function(){return _0x5933b1;};return a174_0x28e8();}export const roleDetail={'service':a174_0x5e1716(0xeb),'command':a174_0x5e1716(0xf0),'description':a174_0x5e1716(0xe7),'risk':a174_0x5e1716(0xed),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2f85e4){const _0x218e2e=a174_0x5e1716,_0x8cd7b7=_0x2f85e4[_0x218e2e(0xf4)]('id'),_0x150545=await getRoleById(_0x2f85e4[_0x218e2e(0xe2)],_0x8cd7b7);return{'ok':!![],'data':{'scope':_0x218e2e(0xf1),'role':projectRole(_0x150545)},'message':_0x218e2e(0xf3)+_0x150545[_0x218e2e(0xe6)]+'\x20('+_0x150545[_0x218e2e(0xee)]+')'};}};
1
+ const a175_0x57fe64=a175_0x1103;function a175_0x1103(_0x29212,_0x57f6f8){_0x29212=_0x29212-0x18c;const _0x218f2b=a175_0x218f();let _0x1103f0=_0x218f2b[_0x29212];return _0x1103f0;}(function(_0x5a8967,_0x2aef2c){const _0x31db69=a175_0x1103,_0x539b48=_0x5a8967();while(!![]){try{const _0x192c81=-parseInt(_0x31db69(0x19a))/0x1*(-parseInt(_0x31db69(0x19b))/0x2)+-parseInt(_0x31db69(0x195))/0x3+-parseInt(_0x31db69(0x18e))/0x4+-parseInt(_0x31db69(0x190))/0x5+-parseInt(_0x31db69(0x18c))/0x6+-parseInt(_0x31db69(0x194))/0x7+parseInt(_0x31db69(0x18d))/0x8;if(_0x192c81===_0x2aef2c)break;else _0x539b48['push'](_0x539b48['shift']());}catch(_0x38b37a){_0x539b48['push'](_0x539b48['shift']());}}}(a175_0x218f,0x82481));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a175_0x218f(){const _0x352ff5=['num','Role\x20','Show\x20a\x20single\x20role\x27s\x20detail','822182Cwhiib','2EEslpR','3751488sjXbzJ','22376664LagfzN','2064280YiAjSS','appCode','3616760Gdoozd','detail','dev','read','6593160rprLdC','837246EVsGEP','roleType'];a175_0x218f=function(){return _0x352ff5;};return a175_0x218f();}import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':'role','command':a175_0x57fe64(0x191),'description':a175_0x57fe64(0x199),'risk':a175_0x57fe64(0x193),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x54e76c){const _0x615a68=a175_0x57fe64,_0x8e0890=_0x54e76c[_0x615a68(0x197)]('id'),_0x5361e6=await getRoleById(_0x54e76c[_0x615a68(0x18f)],_0x8e0890);return{'ok':!![],'data':{'scope':_0x615a68(0x192),'role':projectRole(_0x5361e6)},'message':_0x615a68(0x198)+_0x5361e6['roleName']+'\x20('+_0x5361e6[_0x615a68(0x196)]+')'};}};
@@ -1 +1 @@
1
- function a175_0x572f(){const _0xc3ae61=['754026Fbcnpx','1557fLDIFe','885276KqALdY','39594PvCLLB','150rUuEgB','2NGrRHt','183053GfwOZD','703680nuGMWQ','15367ZtORNV','13584nTPkAO','5880WciqlP'];a175_0x572f=function(){return _0xc3ae61;};return a175_0x572f();}(function(_0x1bb762,_0x5dc779){const _0x245b55=a175_0x5016,_0x573d6f=_0x1bb762();while(!![]){try{const _0x43ce19=-parseInt(_0x245b55(0x156))/0x1*(-parseInt(_0x245b55(0x155))/0x2)+parseInt(_0x245b55(0x150))/0x3+parseInt(_0x245b55(0x157))/0x4+-parseInt(_0x245b55(0x154))/0x5*(-parseInt(_0x245b55(0x153))/0x6)+-parseInt(_0x245b55(0x152))/0x7+-parseInt(_0x245b55(0x159))/0x8*(-parseInt(_0x245b55(0x151))/0x9)+parseInt(_0x245b55(0x15a))/0xa*(-parseInt(_0x245b55(0x158))/0xb);if(_0x43ce19===_0x5dc779)break;else _0x573d6f['push'](_0x573d6f['shift']());}catch(_0x5ad340){_0x573d6f['push'](_0x573d6f['shift']());}}}(a175_0x572f,0x25a17));import{roleList}from'../../commands/role/list.js';function a175_0x5016(_0x36b0a4,_0x3a36bb){_0x36b0a4=_0x36b0a4-0x150;const _0x572fc4=a175_0x572f();let _0x50164c=_0x572fc4[_0x36b0a4];return _0x50164c;}import{roleDetail}from'../../commands/role/detail.js';import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
1
+ (function(_0x13569,_0x4710e0){const _0x1cfdd5=a176_0x5789,_0x52926f=_0x13569();while(!![]){try{const _0x5e08a8=-parseInt(_0x1cfdd5(0xde))/0x1+parseInt(_0x1cfdd5(0xdd))/0x2*(-parseInt(_0x1cfdd5(0xdb))/0x3)+parseInt(_0x1cfdd5(0xdc))/0x4*(-parseInt(_0x1cfdd5(0xd7))/0x5)+-parseInt(_0x1cfdd5(0xd6))/0x6+parseInt(_0x1cfdd5(0xd8))/0x7*(-parseInt(_0x1cfdd5(0xd5))/0x8)+-parseInt(_0x1cfdd5(0xd9))/0x9+parseInt(_0x1cfdd5(0xda))/0xa;if(_0x5e08a8===_0x4710e0)break;else _0x52926f['push'](_0x52926f['shift']());}catch(_0x580c20){_0x52926f['push'](_0x52926f['shift']());}}}(a176_0x2f10,0x2f62e));function a176_0x2f10(){const _0x977018=['7651bGxTKI','1977075LQUvjz','10689510wPoffZ','261723ZieEat','246916mggGNw','6iJxngL','61140cskVAB','72wgsriW','1564518cquASy','5oZpShk'];a176_0x2f10=function(){return _0x977018;};return a176_0x2f10();}import{roleList}from'../../commands/role/list.js';function a176_0x5789(_0x3af55a,_0x229974){_0x3af55a=_0x3af55a-0xd5;const _0x2f10f8=a176_0x2f10();let _0x57894d=_0x2f10f8[_0x3af55a];return _0x57894d;}import{roleDetail}from'../../commands/role/detail.js';import{roleUpdate}from'../../commands/role/update.js';import{roleDelete}from'../../commands/role/delete.js';import{roleUserResolve}from'../../commands/role/user-resolve.js';import{roleUserAdd}from'../../commands/role/user-add.js';import{roleUserRemove}from'../../commands/role/user-remove.js';export const roleDefinitions=[roleList,roleDetail,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
@@ -1 +1 @@
1
- const a176_0x2f12d6=a176_0xc4ab;function a176_0xc4ab(_0x455a1b,_0x35ecd0){_0x455a1b=_0x455a1b-0x1ae;const _0x1dd824=a176_0x1dd8();let _0xc4ab3d=_0x1dd824[_0x455a1b];return _0xc4ab3d;}(function(_0xa557eb,_0xf4aebb){const _0x5818dc=a176_0xc4ab,_0x26d217=_0xa557eb();while(!![]){try{const _0x56c022=parseInt(_0x5818dc(0x1c5))/0x1*(parseInt(_0x5818dc(0x1c0))/0x2)+-parseInt(_0x5818dc(0x1b3))/0x3+parseInt(_0x5818dc(0x1b2))/0x4*(-parseInt(_0x5818dc(0x1c3))/0x5)+-parseInt(_0x5818dc(0x1cf))/0x6*(parseInt(_0x5818dc(0x1af))/0x7)+parseInt(_0x5818dc(0x1c1))/0x8+-parseInt(_0x5818dc(0x1c4))/0x9+-parseInt(_0x5818dc(0x1be))/0xa*(-parseInt(_0x5818dc(0x1b4))/0xb);if(_0x56c022===_0xf4aebb)break;else _0x26d217['push'](_0x26d217['shift']());}catch(_0x212b71){_0x26d217['push'](_0x26d217['shift']());}}}(a176_0x1dd8,0xbca6d));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a176_0x2f12d6(0x1d1),a176_0x2f12d6(0x1b6),'OWNER',a176_0x2f12d6(0x1b7)];export const roleList={'service':a176_0x2f12d6(0x1b8),'command':a176_0x2f12d6(0x1bd),'description':'List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','risk':a176_0x2f12d6(0x1c6),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a176_0x2f12d6(0x1cd),'type':a176_0x2f12d6(0x1cc),'required':![],'description':'Filter\x20by\x20role\x20type','enum':ROLE_TYPES},{'name':a176_0x2f12d6(0x1b1),'type':'number','description':a176_0x2f12d6(0x1b0),'default':0x1},{'name':a176_0x2f12d6(0x1ae),'type':a176_0x2f12d6(0x1c7),'description':'Page\x20size\x20(1-100)','default':0x64}],async 'validate'(_0x491949){const _0x4adf02=a176_0x2f12d6,_0x26d76a=_0x491949['str'](_0x4adf02(0x1cd))[_0x4adf02(0x1c9)]();if(_0x26d76a&&!ROLE_TYPES[_0x4adf02(0x1d2)](_0x26d76a['toUpperCase']()))throw CliErrors[_0x4adf02(0x1bf)](_0x4adf02(0x1b5)+_0x26d76a+'\x22.',_0x4adf02(0x1ce)+ROLE_TYPES[_0x4adf02(0x1b9)](',\x20')+'.');const _0x1ae9b8=_0x491949['num']('page',0x1),_0xd45a00=_0x491949[_0x4adf02(0x1d0)](_0x4adf02(0x1ae),0x64);if(_0x1ae9b8<0x1)throw CliErrors['validation'](_0x4adf02(0x1bb));if(_0xd45a00<0x1||_0xd45a00>0x64)throw CliErrors['validation'](_0x4adf02(0x1ca));},async 'execute'(_0x4fd728){const _0x4a431a=a176_0x2f12d6,_0x179e62=_0x4fd728['num']('page',0x1)||0x1,_0x429eb9=_0x4fd728['num']('pagesize',0x64)||0x64,_0x58fc77=_0x4fd728[_0x4a431a(0x1cb)](_0x4a431a(0x1cd))[_0x4a431a(0x1c9)]()[_0x4a431a(0x1c2)](),{items:_0x3a702e,paging:_0x47f25b}=await listAppRoles(_0x4fd728[_0x4a431a(0x1d3)],{'currentPage':_0x179e62,'pageSize':_0x429eb9}),_0x53eb7f=_0x58fc77?_0x3a702e[_0x4a431a(0x1bc)](_0x22ca37=>_0x22ca37['roleType']===_0x58fc77):_0x3a702e,_0x408f85=_0x53eb7f[_0x4a431a(0x1c8)](projectRole);return{'ok':!![],'data':{'scope':'dev','roles':_0x408f85,'paging':_0x47f25b},'message':'Found\x20'+_0x408f85['length']+_0x4a431a(0x1ba)};}};function a176_0x1dd8(){const _0x555f9d=['CUSTOM','role','join','\x20role(s)','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','filter','list','12512760SXxQfw','validation','18gLNGjU','6823744zSDrvH','toUpperCase','5PfqZBV','6754338rXWUsQ','74017oEaKPA','read','number','map','trim','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','str','string','type','Use\x20one\x20of:\x20','1488ObIQjU','num','ADMIN','includes','appCode','pagesize','2961CPJFOf','Page\x20index\x20(1-based)','page','4013468gyOcKh','4170609awNQbe','22NogKgu','Invalid\x20--type\x20\x22','DEV'];a176_0x1dd8=function(){return _0x555f9d;};return a176_0x1dd8();}
1
+ const a177_0x426358=a177_0x2405;(function(_0x4e613c,_0xacc8e0){const _0x2007ff=a177_0x2405,_0x1f2d82=_0x4e613c();while(!![]){try{const _0xfcf1e2=parseInt(_0x2007ff(0x16e))/0x1+parseInt(_0x2007ff(0x177))/0x2+parseInt(_0x2007ff(0x16c))/0x3+-parseInt(_0x2007ff(0x160))/0x4*(-parseInt(_0x2007ff(0x163))/0x5)+parseInt(_0x2007ff(0x172))/0x6*(parseInt(_0x2007ff(0x15c))/0x7)+parseInt(_0x2007ff(0x15b))/0x8*(parseInt(_0x2007ff(0x171))/0x9)+-parseInt(_0x2007ff(0x17b))/0xa*(parseInt(_0x2007ff(0x167))/0xb);if(_0xfcf1e2===_0xacc8e0)break;else _0x1f2d82['push'](_0x1f2d82['shift']());}catch(_0x1411c0){_0x1f2d82['push'](_0x1f2d82['shift']());}}}(a177_0x3c2c,0x4e7ec));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a177_0x2405(_0x426ee0,_0x1b4925){_0x426ee0=_0x426ee0-0x159;const _0x3c2cca=a177_0x3c2c();let _0x240541=_0x3c2cca[_0x426ee0];return _0x240541;}import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a177_0x426358(0x170),a177_0x426358(0x15d),a177_0x426358(0x16b),'CUSTOM'];export const roleList={'service':a177_0x426358(0x165),'command':'list','description':a177_0x426358(0x161),'risk':a177_0x426358(0x174),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a177_0x426358(0x17a),'type':'string','required':![],'description':a177_0x426358(0x16f),'enum':ROLE_TYPES},{'name':a177_0x426358(0x178),'type':a177_0x426358(0x162),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':a177_0x426358(0x176),'type':a177_0x426358(0x162),'description':a177_0x426358(0x17c),'default':0x64}],async 'validate'(_0x182f3f){const _0x37127b=a177_0x426358,_0x6c287a=_0x182f3f[_0x37127b(0x15e)](_0x37127b(0x17a))[_0x37127b(0x166)]();if(_0x6c287a&&!ROLE_TYPES[_0x37127b(0x16a)](_0x6c287a[_0x37127b(0x179)]()))throw CliErrors[_0x37127b(0x15f)]('Invalid\x20--type\x20\x22'+_0x6c287a+'\x22.',_0x37127b(0x15a)+ROLE_TYPES[_0x37127b(0x164)](',\x20')+'.');const _0xf339df=_0x182f3f[_0x37127b(0x169)](_0x37127b(0x178),0x1),_0x5621e4=_0x182f3f[_0x37127b(0x169)](_0x37127b(0x176),0x64);if(_0xf339df<0x1)throw CliErrors[_0x37127b(0x15f)]('--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.');if(_0x5621e4<0x1||_0x5621e4>0x64)throw CliErrors['validation']('--pagesize\x20must\x20be\x20between\x201\x20and\x20100.');},async 'execute'(_0x2655ca){const _0x3cae68=a177_0x426358,_0x6b0a1=_0x2655ca[_0x3cae68(0x169)](_0x3cae68(0x178),0x1)||0x1,_0x34429e=_0x2655ca[_0x3cae68(0x169)]('pagesize',0x64)||0x64,_0x333e2e=_0x2655ca[_0x3cae68(0x15e)]('type')[_0x3cae68(0x166)]()[_0x3cae68(0x179)](),{items:_0x584e26,paging:_0x1751e7}=await listAppRoles(_0x2655ca['appCode'],{'currentPage':_0x6b0a1,'pageSize':_0x34429e}),_0x32a0a8=_0x333e2e?_0x584e26[_0x3cae68(0x16d)](_0x21060d=>_0x21060d[_0x3cae68(0x173)]===_0x333e2e):_0x584e26,_0x568bc5=_0x32a0a8['map'](projectRole);return{'ok':!![],'data':{'scope':_0x3cae68(0x168),'roles':_0x568bc5,'paging':_0x1751e7},'message':_0x3cae68(0x175)+_0x568bc5[_0x3cae68(0x159)]+_0x3cae68(0x17d)};}};function a177_0x3c2c(){const _0x4a6b82=['List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','number','1248855powrgz','join','role','trim','902nnvTuR','dev','num','includes','OWNER','1082559BQfAYC','filter','611478ncOxWO','Filter\x20by\x20role\x20type','ADMIN','18CuesUE','6KKmFiU','roleType','read','Found\x20','pagesize','557564NUcmbZ','page','toUpperCase','type','199660uAWXIc','Page\x20size\x20(1-100)','\x20role(s)','length','Use\x20one\x20of:\x20','355064SWXeWy','835149qdSBLR','DEV','str','validation','8XLGAYM'];a177_0x3c2c=function(){return _0x4a6b82;};return a177_0x3c2c();}
@@ -1 +1 @@
1
- const a177_0x30c665=a177_0x36d7;(function(_0x2e1484,_0x5b9147){const _0x490156=a177_0x36d7,_0x2b87e0=_0x2e1484();while(!![]){try{const _0x21842f=parseInt(_0x490156(0x147))/0x1*(-parseInt(_0x490156(0x13d))/0x2)+parseInt(_0x490156(0x157))/0x3*(-parseInt(_0x490156(0x127))/0x4)+-parseInt(_0x490156(0x12a))/0x5+-parseInt(_0x490156(0x11f))/0x6+parseInt(_0x490156(0x139))/0x7*(-parseInt(_0x490156(0x159))/0x8)+-parseInt(_0x490156(0x13c))/0x9*(-parseInt(_0x490156(0x122))/0xa)+parseInt(_0x490156(0x138))/0xb*(parseInt(_0x490156(0x12b))/0xc);if(_0x21842f===_0x5b9147)break;else _0x2b87e0['push'](_0x2b87e0['shift']());}catch(_0x543208){_0x2b87e0['push'](_0x2b87e0['shift']());}}}(a177_0x1073,0x35f17));import{getTenantMembers,listDevUserRoleRelations,listAppRoles}from'../../core/api-client.js';import{getSessionUserInfo}from'../../auth/get-session-user.js';function a177_0x36d7(_0x4b0ba,_0x2c87bf){_0x4b0ba=_0x4b0ba-0x113;const _0x10734f=a177_0x1073();let _0x36d713=_0x10734f[_0x4b0ba];return _0x36d713;}import{CliErrors}from'../../errors.js';export const ROLE_ID_FLAG={'name':'id','type':a177_0x30c665(0x12e),'required':!![],'description':a177_0x30c665(0x161)};export const ROLE_REF_FLAG={'name':'role','type':a177_0x30c665(0x152),'required':!![],'description':a177_0x30c665(0x123)};export const USER_REF_FLAG={'name':a177_0x30c665(0x118),'type':'string','required':!![],'description':a177_0x30c665(0x129)};export const NAME_FLAG={'name':a177_0x30c665(0x145),'type':'string','required':!![],'description':a177_0x30c665(0x15a)};export const USER_NAME_FLAG={'name':a177_0x30c665(0x145),'type':'string','required':!![],'description':'Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId'};export const REMARK_FLAG={'name':a177_0x30c665(0x11b),'type':'string','required':![],'description':'Optional\x20role\x20remark/description'};export const EXPECT_USER_COUNT_FLAG={'name':a177_0x30c665(0x125),'type':'number','required':![],'description':a177_0x30c665(0x15c)};export const BUILTIN_ROLE_TYPES=[a177_0x30c665(0x12d),a177_0x30c665(0x134),a177_0x30c665(0x126)];function a177_0x1073(){const _0x501ab8=['\x20is\x20already\x20a\x20member\x20of\x20role\x20','toLowerCase','\x22\x20not\x20found\x20in\x20app\x20','\x22:\x20','nickname','filter','name','Pass\x20--user\x20<id|name>.','46362wtfXjz','POST','Missing\x20role\x20reference.','Role\x20name\x20\x22',';\x20no\x20change.','Pass\x20--role\x20<id|name>.','dryRun','/smartapi/permit/user-role/delete','CUSTOM','totalCount','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','string','/smartapi/permit/user-role/create','\x20duplicate\x20memberships\x20for\x20user\x20','user-add','flagMissing','4749xGqOwZ','userId','95896SdzQeU','Role\x20name','tenant','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','\x20members\x20of\x20the\x20OWNER\x20role.','flag','length','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.','Role\x20id\x20(from\x20`role\x20list`)','Check\x20the\x20nickname/username.\x20','\x20member(s)\x20but\x20role\x20has\x20','map','Missing\x20user\x20reference.','str','appCode','tenant_code','expectUserCount','user','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','roleName','remark','role','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','\x22\x20is\x20ambiguous\x20(ids:\x20','1138182wDmtUn','permitCount','push','30GqUDbJ','Role\x20id\x20or\x20exact\x20role\x20name','validation','expect-user-count','OWNER','456CkCLdi','dev','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','1256810cRqvLA','7238688wdXiUq','userCount','ADMIN','number','test','join','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','Disambiguate\x20with\x20--role\x20<id>.','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','DEV','roleType','username','find','22aXuZIN','35uUWuvl','trim','User\x20','200565zLzTae','16weuaYI','No\x20tenant\x20member\x20matches\x20\x22'];a177_0x1073=function(){return _0x501ab8;};return a177_0x1073();}export function isBuiltinRole(_0x53afc5){return BUILTIN_ROLE_TYPES['includes'](_0x53afc5);}export function assertCustomRole(_0x2d9754,_0x252f96){const _0xe26c31=a177_0x30c665;if(_0x2d9754[_0xe26c31(0x135)]!==_0xe26c31(0x14f))throw CliErrors[_0xe26c31(0x124)]('Cannot\x20'+_0x252f96+'\x20built-in\x20role\x20'+_0x2d9754[_0xe26c31(0x11a)]+'\x20('+_0x2d9754[_0xe26c31(0x135)]+').',_0xe26c31(0x151));}export function projectRole(_0x57dca6){const _0x3aa6d5=a177_0x30c665;return{'id':_0x57dca6['id'],'roleName':_0x57dca6[_0x3aa6d5(0x11a)],'roleType':_0x57dca6[_0x3aa6d5(0x135)],'remark':_0x57dca6['remark'],'userCount':_0x57dca6[_0x3aa6d5(0x12c)],'permitCount':_0x57dca6[_0x3aa6d5(0x120)],'builtin':isBuiltinRole(_0x57dca6[_0x3aa6d5(0x135)])};}export async function resolveRoleRef(_0x2200e0,_0x4aa7fc){const _0x3ba70c=a177_0x30c665,_0x51b436=_0x4aa7fc[_0x3ba70c(0x13a)]();if(!_0x51b436)throw CliErrors[_0x3ba70c(0x124)](_0x3ba70c(0x149),_0x3ba70c(0x14c));if(/^\d+$/['test'](_0x51b436))return getRoleById(_0x2200e0,Number(_0x51b436));const _0x48e641=await listAllAppRoles(_0x2200e0),_0x1cddcd=_0x48e641['filter'](_0xf329fa=>_0xf329fa[_0x3ba70c(0x11a)]===_0x51b436);if(_0x1cddcd[_0x3ba70c(0x15f)]===0x0)throw CliErrors[_0x3ba70c(0x124)](_0x3ba70c(0x14a)+_0x51b436+_0x3ba70c(0x141)+_0x2200e0+'.',_0x3ba70c(0x133));if(_0x1cddcd['length']>0x1){const _0x350adf=_0x1cddcd[_0x3ba70c(0x164)](_0x5af15f=>_0x5af15f['id'])[_0x3ba70c(0x130)](',\x20');throw CliErrors['validation']('Role\x20name\x20\x22'+_0x51b436+_0x3ba70c(0x11e)+_0x350adf+').',_0x3ba70c(0x132));}return _0x1cddcd[0x0];}export async function getRoleById(_0x65fecf,_0x2851a7){const _0x24a70c=a177_0x30c665,_0xaaafa=await listAllAppRoles(_0x65fecf),_0x59d11b=_0xaaafa[_0x24a70c(0x144)](_0x1caa53=>_0x1caa53['id']===_0x2851a7&&(!_0x1caa53[_0x24a70c(0x115)]||_0x1caa53[_0x24a70c(0x115)]===_0x65fecf));if(_0x59d11b[_0x24a70c(0x15f)]!==0x1)throw CliErrors[_0x24a70c(0x124)]('Role\x20id\x20'+_0x2851a7+'\x20not\x20found\x20in\x20app\x20'+_0x65fecf+'.',_0x24a70c(0x131));return _0x59d11b[0x0];}async function listAllAppRoles(_0x1be02e){const _0x21ea8a=a177_0x30c665,_0xfe3e4d=0x64,_0x2b30ca=[];for(let _0x598df6=0x1;;_0x598df6+=0x1){const {items:_0x315781,paging:_0x132d98}=await listAppRoles(_0x1be02e,{'currentPage':_0x598df6,'pageSize':_0xfe3e4d});_0x2b30ca[_0x21ea8a(0x121)](..._0x315781);if(_0x315781[_0x21ea8a(0x15f)]<_0xfe3e4d||_0x132d98&&_0x2b30ca[_0x21ea8a(0x15f)]>=_0x132d98[_0x21ea8a(0x150)])return _0x2b30ca;}}export async function resolveTenantCode(){const _0x247e22=a177_0x30c665,_0x226f79=await getSessionUserInfo(),_0x1bd467=_0x226f79?.['user']?.[_0x247e22(0x15b)]?.[_0x247e22(0x116)];if(!_0x1bd467)throw CliErrors['authRequired'](_0x247e22(0x119));return _0x1bd467;}function matchMember(_0x3e6577,_0x3742a5){const _0x547022=a177_0x30c665,_0x1120d9=_0x3742a5[_0x547022(0x13a)]()[_0x547022(0x140)]();return(_0x3e6577[_0x547022(0x143)]??'')[_0x547022(0x140)]()===_0x1120d9||(_0x3e6577[_0x547022(0x136)]??'')['toLowerCase']()===_0x1120d9;}export async function resolveUserRef(_0x5d3384,_0x2f8f13='Pass\x20--user\x20<id>.'){const _0xa3d98d=a177_0x30c665,_0x3472ea=_0x5d3384[_0xa3d98d(0x13a)]();if(!_0x3472ea)throw CliErrors[_0xa3d98d(0x124)](_0xa3d98d(0x113),'Pass\x20--user\x20<id|name>.');const _0xbb0f8d=await resolveTenantCode(),_0x366e64=await getTenantMembers(_0xbb0f8d);if(/^\d+$/[_0xa3d98d(0x12f)](_0x3472ea)){const _0x410811=Number(_0x3472ea),_0x1391c1=_0x366e64[_0xa3d98d(0x137)](_0xe1ac6b=>_0xe1ac6b[_0xa3d98d(0x158)]===_0x410811);return{'userId':_0x410811,'username':_0x1391c1?.[_0xa3d98d(0x136)]??String(_0x410811),'nickname':_0x1391c1?.['nickname'],'matchedBy':'id'};}const _0x504ac4=_0x366e64['filter'](_0x2f6846=>matchMember(_0x2f6846,_0x3472ea));if(_0x504ac4['length']===0x0)throw CliErrors[_0xa3d98d(0x124)](_0xa3d98d(0x13e)+_0x3472ea+'\x22.',_0xa3d98d(0x162)+_0x2f8f13);if(_0x504ac4['length']>0x1){const _0x4e8d6f=_0x504ac4['map'](_0x2a0092=>(_0x2a0092[_0xa3d98d(0x143)]??_0x2a0092['username']??'?')+'('+_0x2a0092[_0xa3d98d(0x158)]+')')[_0xa3d98d(0x130)](',\x20');throw CliErrors['validation']('Multiple\x20tenant\x20members\x20match\x20\x22'+_0x3472ea+_0xa3d98d(0x142)+_0x4e8d6f+'.',_0x2f8f13);}const _0x15262f=_0x504ac4[0x0];return{'userId':_0x15262f[_0xa3d98d(0x158)],'username':_0x15262f[_0xa3d98d(0x136)]??String(_0x15262f[_0xa3d98d(0x158)]),'nickname':_0x15262f[_0xa3d98d(0x143)],'matchedBy':'name'};}export const CREATE_USER_ROLE_PATH=a177_0x30c665(0x153);export const DELETE_USER_ROLE_PATH=a177_0x30c665(0x14e);export function computeRoleUserMutation(_0x46db58){const _0x4d8778=a177_0x30c665,{operation:_0x381cd2,appCode:_0x5ad49b,role:_0x1ccceb,relations:_0x20d3fd,user:_0xa7980a}=_0x46db58,_0x2b6c57=[...new Set(_0x20d3fd['map'](_0x5fb61c=>_0x5fb61c['userId']))],_0xd23f08=[];if(_0x46db58[_0x4d8778(0x117)]!==undefined&&_0x46db58['expectUserCount']!==_0x2b6c57['length'])throw CliErrors[_0x4d8778(0x124)]('Anti-drift\x20check\x20failed:\x20expected\x20'+_0x46db58[_0x4d8778(0x117)]+_0x4d8778(0x163)+_0x2b6c57[_0x4d8778(0x15f)]+'.',_0x4d8778(0x11d));const _0x41b8c6=_0x2b6c57['includes'](_0xa7980a[_0x4d8778(0x158)]),_0x2ce033=_0x20d3fd['filter'](_0x4210bd=>_0x4210bd[_0x4d8778(0x158)]===_0xa7980a[_0x4d8778(0x158)])[_0x4d8778(0x164)](_0x4cbbde=>_0x4cbbde['id']),_0x331cc5=_0x381cd2===_0x4d8778(0x155)?!_0x41b8c6:_0x41b8c6;let _0x29e655=_0x2b6c57;_0x381cd2===_0x4d8778(0x155)?_0x41b8c6?_0xd23f08['push'](_0x4d8778(0x13b)+_0xa7980a[_0x4d8778(0x158)]+_0x4d8778(0x13f)+_0x1ccceb[_0x4d8778(0x11a)]+';\x20no\x20change.'):_0x29e655=[..._0x2b6c57,_0xa7980a[_0x4d8778(0x158)]]:!_0x41b8c6?_0xd23f08[_0x4d8778(0x121)](_0x4d8778(0x13b)+_0xa7980a[_0x4d8778(0x158)]+'\x20is\x20not\x20a\x20member\x20of\x20role\x20'+_0x1ccceb[_0x4d8778(0x11a)]+_0x4d8778(0x14b)):(_0x29e655=_0x2b6c57['filter'](_0x21a1bf=>_0x21a1bf!==_0xa7980a['userId']),_0x2ce033['length']>0x1&&_0xd23f08[_0x4d8778(0x121)]('Removed\x20'+_0x2ce033[_0x4d8778(0x15f)]+_0x4d8778(0x154)+_0xa7980a[_0x4d8778(0x158)]+'.'));const _0x29ca2f={'scope':_0x4d8778(0x128),'operation':_0x381cd2,'selector':{'appCode':_0x5ad49b,'roleId':_0x1ccceb['id'],'roleName':_0x1ccceb[_0x4d8778(0x11a)],'userId':_0xa7980a[_0x4d8778(0x158)]},'before':{'userIds':_0x2b6c57},'after':{'userIds':_0x29e655},'dryRun':_0x46db58[_0x4d8778(0x14d)],'backend':{'method':_0x4d8778(0x148),'path':_0x381cd2===_0x4d8778(0x155)?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0xd23f08};return{'mutation':_0x29ca2f,'changed':_0x331cc5,'matchingRelationIds':_0x2ce033};}export async function loadDevRoleRelations(_0x531964,_0x32b54b){const _0x4051fd=a177_0x30c665,_0x2f8013=0x64,_0x5b999b=[];for(let _0x5c0142=0x1;;_0x5c0142+=0x1){const {items:_0x49e90b,paging:_0x39c1d9}=await listDevUserRoleRelations(_0x531964,{'roleId':_0x32b54b,'currentPage':_0x5c0142,'pageSize':_0x2f8013});_0x5b999b[_0x4051fd(0x121)](..._0x49e90b);if(_0x49e90b['length']<_0x2f8013||_0x39c1d9&&_0x5b999b[_0x4051fd(0x15f)]>=_0x39c1d9[_0x4051fd(0x150)])return _0x5b999b;}}export function readRoleRef(_0x165123){const _0x4a9f00=a177_0x30c665,_0x4fbc29=_0x165123[_0x4a9f00(0x114)](_0x4a9f00(0x11c))[_0x4a9f00(0x13a)]();if(!_0x4fbc29)throw CliErrors[_0x4a9f00(0x156)]('role','Pass\x20--role\x20<id|name>.');return _0x4fbc29;}export async function prepareUserMutation(_0x497c9c,_0x1fbec3,_0x180cb4){const _0x158909=a177_0x30c665,_0x5ac347=readRoleRef(_0x497c9c),_0x1ea66b=_0x497c9c[_0x158909(0x114)](_0x158909(0x118))[_0x158909(0x13a)]();if(!_0x1ea66b)throw CliErrors[_0x158909(0x156)]('user',_0x158909(0x146));const _0x32289c=_0x497c9c[_0x158909(0x15e)](_0x158909(0x125)),_0x2d8a45=_0x32289c===undefined||_0x32289c===null?undefined:Number(_0x32289c),_0x1fe342=await resolveRoleRef(_0x497c9c[_0x158909(0x115)],_0x5ac347);if(_0x1fe342[_0x158909(0x135)]===_0x158909(0x126))throw CliErrors[_0x158909(0x124)]('Cannot\x20'+_0x1fbec3+_0x158909(0x15d),_0x158909(0x160));const _0x11df16=await resolveUserRef(_0x1ea66b),_0x5a4dce=await loadDevRoleRelations(_0x497c9c['appCode'],_0x1fe342['id']);return{...computeRoleUserMutation({'operation':_0x1fbec3,'appCode':_0x497c9c['appCode'],'role':_0x1fe342,'relations':_0x5a4dce,'user':{'userId':_0x11df16[_0x158909(0x158)],'username':_0x11df16[_0x158909(0x136)],'nickname':_0x11df16['nickname']},'dryRun':_0x180cb4,..._0x2d8a45!==undefined?{'expectUserCount':_0x2d8a45}:{}}),'role':_0x1fe342,'user':_0x11df16};}
1
+ const a178_0x5584a3=a178_0x3abb;(function(_0x2d2736,_0x267c01){const _0x3fcb1a=a178_0x3abb,_0x515b73=_0x2d2736();while(!![]){try{const _0x3dd831=parseInt(_0x3fcb1a(0x1cf))/0x1+parseInt(_0x3fcb1a(0x206))/0x2*(parseInt(_0x3fcb1a(0x1c1))/0x3)+parseInt(_0x3fcb1a(0x1d0))/0x4*(-parseInt(_0x3fcb1a(0x1f7))/0x5)+parseInt(_0x3fcb1a(0x20f))/0x6+parseInt(_0x3fcb1a(0x1d2))/0x7*(-parseInt(_0x3fcb1a(0x1da))/0x8)+-parseInt(_0x3fcb1a(0x216))/0x9*(parseInt(_0x3fcb1a(0x20d))/0xa)+-parseInt(_0x3fcb1a(0x1e7))/0xb*(parseInt(_0x3fcb1a(0x202))/0xc);if(_0x3dd831===_0x267c01)break;else _0x515b73['push'](_0x515b73['shift']());}catch(_0x137230){_0x515b73['push'](_0x515b73['shift']());}}}(a178_0x3195,0xe59d8));import{getTenantMembers,listDevUserRoleRelations,listAppRoles}from'../../core/api-client.js';import{getSessionUserInfo}from'../../auth/get-session-user.js';import{CliErrors}from'../../errors.js';export const ROLE_ID_FLAG={'name':'id','type':'number','required':!![],'description':'Role\x20id\x20(from\x20`role\x20list`)'};export const ROLE_REF_FLAG={'name':a178_0x5584a3(0x1fb),'type':a178_0x5584a3(0x1f9),'required':!![],'description':a178_0x5584a3(0x1c0)};export const USER_REF_FLAG={'name':a178_0x5584a3(0x1f2),'type':a178_0x5584a3(0x1f9),'required':!![],'description':a178_0x5584a3(0x1ec)};export const NAME_FLAG={'name':a178_0x5584a3(0x20a),'type':a178_0x5584a3(0x1f9),'required':!![],'description':a178_0x5584a3(0x1e5)};export const USER_NAME_FLAG={'name':a178_0x5584a3(0x20a),'type':a178_0x5584a3(0x1f9),'required':!![],'description':a178_0x5584a3(0x1d3)};export const REMARK_FLAG={'name':a178_0x5584a3(0x1cb),'type':'string','required':![],'description':a178_0x5584a3(0x204)};function a178_0x3195(){const _0xc1b9d7=['8624262vwkgVs','Pass\x20--role\x20<id|name>.','/smartapi/permit/user-role/create','DEV','length','/smartapi/permit/user-role/delete','join','27evGBaT','OWNER','Cannot\x20','Role\x20id\x20or\x20exact\x20role\x20name','33QjURxs','str','map','Pass\x20--user\x20<id>.','Removed\x20','userId','\x20is\x20already\x20a\x20member\x20of\x20role\x20','\x22\x20not\x20found\x20in\x20app\x20','\x20duplicate\x20memberships\x20for\x20user\x20','Anti-drift\x20check\x20failed:\x20expected\x20','remark','CUSTOM','\x22:\x20','\x22\x20is\x20ambiguous\x20(ids:\x20','1879918vOgYMW','789636TQzwjk','includes','133UiSWUl','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','trim','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','\x20members\x20of\x20the\x20OWNER\x20role.','dryRun','username','Pass\x20--user\x20<id|name>.','44168DiCVUq','appCode','roleType','Use\x20the\x20platform\x20ownership-transfer\x20workflow\x20to\x20change\x20the\x20application\x20owner.',';\x20no\x20change.','Disambiguate\x20with\x20--role\x20<id>.','Multiple\x20tenant\x20members\x20match\x20\x22','expect-user-count','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','\x20not\x20found\x20in\x20app\x20','nickname','Role\x20name','ADMIN','11RtEsIv','\x20is\x20not\x20a\x20member\x20of\x20role\x20','Missing\x20role\x20reference.','validation','tenant_code','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','number','find','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','\x20built-in\x20role\x20','Role\x20id\x20','user','userCount','push','flagMissing','Check\x20the\x20nickname/username.\x20','20SYUGTs','flag','string','User\x20','role','Role\x20name\x20\x22','totalCount','user-add','toLowerCase','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','expectUserCount','34959588EdczMH','\x20member(s)\x20but\x20role\x20has\x20','Optional\x20role\x20remark/description','permitCount','265084CApNjq','No\x20tenant\x20member\x20matches\x20\x22','roleName','test','name','filter','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','89730EyJEDN','authRequired'];a178_0x3195=function(){return _0xc1b9d7;};return a178_0x3195();}export const EXPECT_USER_COUNT_FLAG={'name':a178_0x5584a3(0x1e1),'type':a178_0x5584a3(0x1ed),'required':![],'description':a178_0x5584a3(0x1ef)};export const BUILTIN_ROLE_TYPES=[a178_0x5584a3(0x1e6),a178_0x5584a3(0x212),'OWNER'];export function isBuiltinRole(_0x34b6ba){const _0x2bd8fc=a178_0x5584a3;return BUILTIN_ROLE_TYPES[_0x2bd8fc(0x1d1)](_0x34b6ba);}export function assertCustomRole(_0x73a7b5,_0x2de209){const _0x10091a=a178_0x5584a3;if(_0x73a7b5[_0x10091a(0x1dc)]!==_0x10091a(0x1cc))throw CliErrors[_0x10091a(0x1ea)]('Cannot\x20'+_0x2de209+_0x10091a(0x1f0)+_0x73a7b5[_0x10091a(0x208)]+'\x20('+_0x73a7b5['roleType']+').','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.');}export function projectRole(_0x2e74b7){const _0x140ff7=a178_0x5584a3;return{'id':_0x2e74b7['id'],'roleName':_0x2e74b7[_0x140ff7(0x208)],'roleType':_0x2e74b7[_0x140ff7(0x1dc)],'remark':_0x2e74b7[_0x140ff7(0x1cb)],'userCount':_0x2e74b7[_0x140ff7(0x1f3)],'permitCount':_0x2e74b7[_0x140ff7(0x205)],'builtin':isBuiltinRole(_0x2e74b7[_0x140ff7(0x1dc)])};}export async function resolveRoleRef(_0x1fe697,_0x253afe){const _0x57d16e=a178_0x5584a3,_0x2bb742=_0x253afe[_0x57d16e(0x1d4)]();if(!_0x2bb742)throw CliErrors[_0x57d16e(0x1ea)](_0x57d16e(0x1e9),_0x57d16e(0x210));if(/^\d+$/[_0x57d16e(0x209)](_0x2bb742))return getRoleById(_0x1fe697,Number(_0x2bb742));const _0x50c206=await listAllAppRoles(_0x1fe697),_0x17b2ad=_0x50c206['filter'](_0xcf39ab=>_0xcf39ab['roleName']===_0x2bb742);if(_0x17b2ad[_0x57d16e(0x213)]===0x0)throw CliErrors[_0x57d16e(0x1ea)](_0x57d16e(0x1fc)+_0x2bb742+_0x57d16e(0x1c8)+_0x1fe697+'.',_0x57d16e(0x20c));if(_0x17b2ad[_0x57d16e(0x213)]>0x1){const _0x3c213b=_0x17b2ad[_0x57d16e(0x1c3)](_0x41851f=>_0x41851f['id'])[_0x57d16e(0x215)](',\x20');throw CliErrors[_0x57d16e(0x1ea)](_0x57d16e(0x1fc)+_0x2bb742+_0x57d16e(0x1ce)+_0x3c213b+').',_0x57d16e(0x1df));}return _0x17b2ad[0x0];}export async function getRoleById(_0x59383f,_0x351719){const _0x488a09=a178_0x5584a3,_0x46d04a=await listAllAppRoles(_0x59383f),_0x11842c=_0x46d04a[_0x488a09(0x20b)](_0xe230c3=>_0xe230c3['id']===_0x351719&&(!_0xe230c3[_0x488a09(0x1db)]||_0xe230c3[_0x488a09(0x1db)]===_0x59383f));if(_0x11842c['length']!==0x1)throw CliErrors['validation'](_0x488a09(0x1f1)+_0x351719+_0x488a09(0x1e3)+_0x59383f+'.',_0x488a09(0x1e2));return _0x11842c[0x0];}function a178_0x3abb(_0x2bff80,_0x2f20bf){_0x2bff80=_0x2bff80-0x1bf;const _0x319599=a178_0x3195();let _0x3abbc7=_0x319599[_0x2bff80];return _0x3abbc7;}async function listAllAppRoles(_0x3a878f){const _0x3ef0ed=a178_0x5584a3,_0x22d7f3=0x64,_0xfc725b=[];for(let _0x19fd46=0x1;;_0x19fd46+=0x1){const {items:_0x3ff8ba,paging:_0x8bfaa8}=await listAppRoles(_0x3a878f,{'currentPage':_0x19fd46,'pageSize':_0x22d7f3});_0xfc725b[_0x3ef0ed(0x1f4)](..._0x3ff8ba);if(_0x3ff8ba[_0x3ef0ed(0x213)]<_0x22d7f3||_0x8bfaa8&&_0xfc725b[_0x3ef0ed(0x213)]>=_0x8bfaa8['totalCount'])return _0xfc725b;}}export async function resolveTenantCode(){const _0x5849aa=a178_0x5584a3,_0x21f477=await getSessionUserInfo(),_0xff0807=_0x21f477?.[_0x5849aa(0x1f2)]?.['tenant']?.[_0x5849aa(0x1eb)];if(!_0xff0807)throw CliErrors[_0x5849aa(0x20e)](_0x5849aa(0x200));return _0xff0807;}function matchMember(_0x2728b8,_0x332911){const _0x27d1d4=a178_0x5584a3,_0x59a750=_0x332911[_0x27d1d4(0x1d4)]()[_0x27d1d4(0x1ff)]();return(_0x2728b8['nickname']??'')[_0x27d1d4(0x1ff)]()===_0x59a750||(_0x2728b8[_0x27d1d4(0x1d8)]??'')[_0x27d1d4(0x1ff)]()===_0x59a750;}export async function resolveUserRef(_0x3f1000,_0x42d915=a178_0x5584a3(0x1c4)){const _0x38e36e=a178_0x5584a3,_0xfd501e=_0x3f1000[_0x38e36e(0x1d4)]();if(!_0xfd501e)throw CliErrors[_0x38e36e(0x1ea)]('Missing\x20user\x20reference.','Pass\x20--user\x20<id|name>.');const _0x490bd8=await resolveTenantCode(),_0x374de8=await getTenantMembers(_0x490bd8);if(/^\d+$/[_0x38e36e(0x209)](_0xfd501e)){const _0x211a7f=Number(_0xfd501e),_0x5c2f21=_0x374de8[_0x38e36e(0x1ee)](_0x1e2561=>_0x1e2561['userId']===_0x211a7f);return{'userId':_0x211a7f,'username':_0x5c2f21?.[_0x38e36e(0x1d8)]??String(_0x211a7f),'nickname':_0x5c2f21?.[_0x38e36e(0x1e4)],'matchedBy':'id'};}const _0x5f1bda=_0x374de8[_0x38e36e(0x20b)](_0x952073=>matchMember(_0x952073,_0xfd501e));if(_0x5f1bda[_0x38e36e(0x213)]===0x0)throw CliErrors[_0x38e36e(0x1ea)](_0x38e36e(0x207)+_0xfd501e+'\x22.',_0x38e36e(0x1f6)+_0x42d915);if(_0x5f1bda[_0x38e36e(0x213)]>0x1){const _0x4e1145=_0x5f1bda['map'](_0x2c978f=>(_0x2c978f[_0x38e36e(0x1e4)]??_0x2c978f[_0x38e36e(0x1d8)]??'?')+'('+_0x2c978f[_0x38e36e(0x1c6)]+')')['join'](',\x20');throw CliErrors[_0x38e36e(0x1ea)](_0x38e36e(0x1e0)+_0xfd501e+_0x38e36e(0x1cd)+_0x4e1145+'.',_0x42d915);}const _0x34c3cd=_0x5f1bda[0x0];return{'userId':_0x34c3cd[_0x38e36e(0x1c6)],'username':_0x34c3cd[_0x38e36e(0x1d8)]??String(_0x34c3cd[_0x38e36e(0x1c6)]),'nickname':_0x34c3cd[_0x38e36e(0x1e4)],'matchedBy':_0x38e36e(0x20a)};}export const CREATE_USER_ROLE_PATH=a178_0x5584a3(0x211);export const DELETE_USER_ROLE_PATH=a178_0x5584a3(0x214);export function computeRoleUserMutation(_0x2af2c4){const _0x1bbdc3=a178_0x5584a3,{operation:_0x44a132,appCode:_0x3c42fd,role:_0x51647f,relations:_0x2eb851,user:_0x5638a8}=_0x2af2c4,_0x288771=[...new Set(_0x2eb851[_0x1bbdc3(0x1c3)](_0x1a8322=>_0x1a8322[_0x1bbdc3(0x1c6)]))],_0x10b5bb=[];if(_0x2af2c4[_0x1bbdc3(0x201)]!==undefined&&_0x2af2c4['expectUserCount']!==_0x288771[_0x1bbdc3(0x213)])throw CliErrors[_0x1bbdc3(0x1ea)](_0x1bbdc3(0x1ca)+_0x2af2c4['expectUserCount']+_0x1bbdc3(0x203)+_0x288771['length']+'.',_0x1bbdc3(0x1d5));const _0x332f08=_0x288771[_0x1bbdc3(0x1d1)](_0x5638a8[_0x1bbdc3(0x1c6)]),_0x7e0a8=_0x2eb851[_0x1bbdc3(0x20b)](_0x5c72f1=>_0x5c72f1[_0x1bbdc3(0x1c6)]===_0x5638a8[_0x1bbdc3(0x1c6)])[_0x1bbdc3(0x1c3)](_0x89b3b4=>_0x89b3b4['id']),_0x5c7873=_0x44a132==='user-add'?!_0x332f08:_0x332f08;let _0x391897=_0x288771;_0x44a132===_0x1bbdc3(0x1fe)?_0x332f08?_0x10b5bb[_0x1bbdc3(0x1f4)](_0x1bbdc3(0x1fa)+_0x5638a8[_0x1bbdc3(0x1c6)]+_0x1bbdc3(0x1c7)+_0x51647f[_0x1bbdc3(0x208)]+_0x1bbdc3(0x1de)):_0x391897=[..._0x288771,_0x5638a8[_0x1bbdc3(0x1c6)]]:!_0x332f08?_0x10b5bb[_0x1bbdc3(0x1f4)](_0x1bbdc3(0x1fa)+_0x5638a8['userId']+_0x1bbdc3(0x1e8)+_0x51647f['roleName']+_0x1bbdc3(0x1de)):(_0x391897=_0x288771[_0x1bbdc3(0x20b)](_0x3b2d2a=>_0x3b2d2a!==_0x5638a8['userId']),_0x7e0a8[_0x1bbdc3(0x213)]>0x1&&_0x10b5bb[_0x1bbdc3(0x1f4)](_0x1bbdc3(0x1c5)+_0x7e0a8[_0x1bbdc3(0x213)]+_0x1bbdc3(0x1c9)+_0x5638a8[_0x1bbdc3(0x1c6)]+'.'));const _0x10deec={'scope':'dev','operation':_0x44a132,'selector':{'appCode':_0x3c42fd,'roleId':_0x51647f['id'],'roleName':_0x51647f[_0x1bbdc3(0x208)],'userId':_0x5638a8[_0x1bbdc3(0x1c6)]},'before':{'userIds':_0x288771},'after':{'userIds':_0x391897},'dryRun':_0x2af2c4[_0x1bbdc3(0x1d7)],'backend':{'method':'POST','path':_0x44a132==='user-add'?CREATE_USER_ROLE_PATH:DELETE_USER_ROLE_PATH},'warnings':_0x10b5bb};return{'mutation':_0x10deec,'changed':_0x5c7873,'matchingRelationIds':_0x7e0a8};}export async function loadDevRoleRelations(_0x3709b7,_0x404d32){const _0x4227d5=a178_0x5584a3,_0x26dc6a=0x64,_0x56d630=[];for(let _0x5d0a68=0x1;;_0x5d0a68+=0x1){const {items:_0x64dbdc,paging:_0x58396f}=await listDevUserRoleRelations(_0x3709b7,{'roleId':_0x404d32,'currentPage':_0x5d0a68,'pageSize':_0x26dc6a});_0x56d630[_0x4227d5(0x1f4)](..._0x64dbdc);if(_0x64dbdc[_0x4227d5(0x213)]<_0x26dc6a||_0x58396f&&_0x56d630[_0x4227d5(0x213)]>=_0x58396f[_0x4227d5(0x1fd)])return _0x56d630;}}export function readRoleRef(_0x343442){const _0x447d0c=a178_0x5584a3,_0x10a8b5=_0x343442[_0x447d0c(0x1c2)](_0x447d0c(0x1fb))[_0x447d0c(0x1d4)]();if(!_0x10a8b5)throw CliErrors[_0x447d0c(0x1f5)](_0x447d0c(0x1fb),_0x447d0c(0x210));return _0x10a8b5;}export async function prepareUserMutation(_0x33baad,_0x2d01e5,_0x129daf){const _0x96b53a=a178_0x5584a3,_0x4e0546=readRoleRef(_0x33baad),_0x24e2bd=_0x33baad[_0x96b53a(0x1c2)](_0x96b53a(0x1f2))[_0x96b53a(0x1d4)]();if(!_0x24e2bd)throw CliErrors[_0x96b53a(0x1f5)](_0x96b53a(0x1f2),_0x96b53a(0x1d9));const _0x3020ca=_0x33baad[_0x96b53a(0x1f8)](_0x96b53a(0x1e1)),_0x1c79b5=_0x3020ca===undefined||_0x3020ca===null?undefined:Number(_0x3020ca),_0x123a8a=await resolveRoleRef(_0x33baad[_0x96b53a(0x1db)],_0x4e0546);if(_0x123a8a['roleType']===_0x96b53a(0x217))throw CliErrors[_0x96b53a(0x1ea)](_0x96b53a(0x1bf)+_0x2d01e5+_0x96b53a(0x1d6),_0x96b53a(0x1dd));const _0x463ab1=await resolveUserRef(_0x24e2bd),_0x3323dc=await loadDevRoleRelations(_0x33baad[_0x96b53a(0x1db)],_0x123a8a['id']);return{...computeRoleUserMutation({'operation':_0x2d01e5,'appCode':_0x33baad[_0x96b53a(0x1db)],'role':_0x123a8a,'relations':_0x3323dc,'user':{'userId':_0x463ab1[_0x96b53a(0x1c6)],'username':_0x463ab1['username'],'nickname':_0x463ab1[_0x96b53a(0x1e4)]},'dryRun':_0x129daf,..._0x1c79b5!==undefined?{'expectUserCount':_0x1c79b5}:{}}),'role':_0x123a8a,'user':_0x463ab1};}
@@ -1 +1 @@
1
- const a178_0x3c3014=a178_0x4517;(function(_0xd80ae3,_0x11cb1b){const _0xfddf5=a178_0x4517,_0x23bec5=_0xd80ae3();while(!![]){try{const _0xa82953=-parseInt(_0xfddf5(0x1e7))/0x1+-parseInt(_0xfddf5(0x1f6))/0x2*(-parseInt(_0xfddf5(0x1e9))/0x3)+-parseInt(_0xfddf5(0x1f3))/0x4+-parseInt(_0xfddf5(0x1ee))/0x5+parseInt(_0xfddf5(0x1ed))/0x6*(-parseInt(_0xfddf5(0x1ea))/0x7)+parseInt(_0xfddf5(0x1e0))/0x8+parseInt(_0xfddf5(0x1fa))/0x9;if(_0xa82953===_0x11cb1b)break;else _0x23bec5['push'](_0x23bec5['shift']());}catch(_0x3097f0){_0x23bec5['push'](_0x23bec5['shift']());}}}(a178_0x4230,0x958c2));function a178_0x4230(){const _0x3aa7ef=['Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','2ckDJhr','\x20(id=','dev','trim','32550003uRDkZU','num','Updated\x20role\x20','roleName','7181392IZWfbI','validation','name','Nothing\x20to\x20update.','POST','/smartapi/permit/role/update','update','900687gViPho','string','691617jbiZHf','91DJlPbu','--name\x20cannot\x20be\x20empty.','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.','562344mkmTGC','5833170rFUhib','appCode','role','remark','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','3386404PdMyzv','flag'];a178_0x4230=function(){return _0x3aa7ef;};return a178_0x4230();}import{updateAppRole}from'../../core/api-client.js';function a178_0x4517(_0x2165c5,_0x194fd2){_0x2165c5=_0x2165c5-0x1e0;const _0x4230da=a178_0x4230();let _0x451747=_0x4230da[_0x2165c5];return _0x451747;}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,REMARK_FLAG,ROLE_ID_FLAG}from'../../commands/role/shared.js';const UPDATE_PATH=a178_0x3c3014(0x1e5);function readPatch(_0x52a97c){const _0x2f609d=a178_0x3c3014,_0x55622c=_0x52a97c['flag'](_0x2f609d(0x1e2)),_0xaa1170=_0x52a97c[_0x2f609d(0x1f4)](_0x2f609d(0x1f1)),_0x59173e={};if(_0x55622c!==undefined&&_0x55622c!==null){const _0x13939b=String(_0x55622c)[_0x2f609d(0x1f9)]();if(!_0x13939b)throw CliErrors[_0x2f609d(0x1e1)](_0x2f609d(0x1eb));if(_0x13939b['length']>0x40)throw CliErrors[_0x2f609d(0x1e1)](_0x2f609d(0x1f2));_0x59173e['roleName']=_0x13939b;}_0xaa1170!==undefined&&_0xaa1170!==null&&(_0x59173e[_0x2f609d(0x1f1)]=String(_0xaa1170));if(_0x59173e[_0x2f609d(0x1fd)]===undefined&&_0x59173e[_0x2f609d(0x1f1)]===undefined)throw CliErrors[_0x2f609d(0x1e1)](_0x2f609d(0x1e3),_0x2f609d(0x1ec));return _0x59173e;}export const roleUpdate={'service':a178_0x3c3014(0x1f0),'command':a178_0x3c3014(0x1e6),'description':a178_0x3c3014(0x1f5),'risk':'write','flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a178_0x3c3014(0x1e2),'type':a178_0x3c3014(0x1e8),'required':![],'description':'New\x20role\x20name'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x30eb1f){readPatch(_0x30eb1f);},async 'dryRun'(_0x18a7f1){const _0x4c50fb=a178_0x3c3014,_0x3b7fbd=_0x18a7f1[_0x4c50fb(0x1fb)]('id'),_0x58c8bb=readPatch(_0x18a7f1),_0xc4457b=await getRoleById(_0x18a7f1[_0x4c50fb(0x1ef)],_0x3b7fbd);return assertCustomRole(_0xc4457b,_0x4c50fb(0x1e6)),asDryRunResult({'scope':'dev','operation':'update','selector':{'appCode':_0x18a7f1[_0x4c50fb(0x1ef)],'roleId':_0x3b7fbd,'roleName':_0xc4457b[_0x4c50fb(0x1fd)]},'before':projectRole(_0xc4457b),'after':projectRole({..._0xc4457b,..._0x58c8bb['roleName']!==undefined?{'roleName':_0x58c8bb['roleName']}:{},..._0x58c8bb[_0x4c50fb(0x1f1)]!==undefined?{'remark':_0x58c8bb[_0x4c50fb(0x1f1)]}:{}}),'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[]},{'method':_0x4c50fb(0x1e4),'url':UPDATE_PATH});},async 'execute'(_0x2af476){const _0x1b0579=a178_0x3c3014,_0x3476c5=_0x2af476[_0x1b0579(0x1fb)]('id'),_0x2ede37=readPatch(_0x2af476),_0x2cb24b=await getRoleById(_0x2af476[_0x1b0579(0x1ef)],_0x3476c5);assertCustomRole(_0x2cb24b,_0x1b0579(0x1e6)),await updateAppRole({'id':_0x3476c5,'appCode':_0x2af476[_0x1b0579(0x1ef)],..._0x2ede37[_0x1b0579(0x1fd)]!==undefined?{'roleName':_0x2ede37[_0x1b0579(0x1fd)]}:{},..._0x2ede37[_0x1b0579(0x1f1)]!==undefined?{'remark':_0x2ede37['remark']}:{}});const _0x40dc33=await getRoleById(_0x2af476[_0x1b0579(0x1ef)],_0x3476c5);return{'ok':!![],'data':{'scope':_0x1b0579(0x1f8),'operation':_0x1b0579(0x1e6),'selector':{'appCode':_0x2af476[_0x1b0579(0x1ef)],'roleId':_0x3476c5,'roleName':_0x40dc33[_0x1b0579(0x1fd)]},'before':projectRole(_0x2cb24b),'after':projectRole(_0x40dc33),'dryRun':![],'backend':{'method':_0x1b0579(0x1e4),'path':UPDATE_PATH},'warnings':[]},'message':_0x1b0579(0x1fc)+_0x40dc33[_0x1b0579(0x1fd)]+_0x1b0579(0x1f7)+_0x3476c5+')'};}};
1
+ const a179_0x60d659=a179_0x33fd;(function(_0x2ae82b,_0x8344b9){const _0x311e63=a179_0x33fd,_0x420436=_0x2ae82b();while(!![]){try{const _0x43c9fc=parseInt(_0x311e63(0x7e))/0x1+-parseInt(_0x311e63(0x83))/0x2+parseInt(_0x311e63(0x8b))/0x3*(-parseInt(_0x311e63(0x9a))/0x4)+parseInt(_0x311e63(0x7f))/0x5*(-parseInt(_0x311e63(0x88))/0x6)+-parseInt(_0x311e63(0x81))/0x7+-parseInt(_0x311e63(0x82))/0x8*(parseInt(_0x311e63(0x87))/0x9)+-parseInt(_0x311e63(0x94))/0xa*(-parseInt(_0x311e63(0x8a))/0xb);if(_0x43c9fc===_0x8344b9)break;else _0x420436['push'](_0x420436['shift']());}catch(_0x20b597){_0x420436['push'](_0x420436['shift']());}}}(a179_0x3f7f,0x2edd6));import{updateAppRole}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a179_0x3f7f(){const _0x20c15e=['15bsPmQH','New\x20role\x20name','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','flag','name','Updated\x20role\x20','roleName','--name\x20cannot\x20be\x20empty.','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.','30mcTcNK','num','/smartapi/permit/role/update','trim','update','remark','119300DytPHV','Nothing\x20to\x20update.','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(built-in\x20roles\x20rejected)','appCode','dev','352483IHQiSQ','61570Xyomnq','POST','1809829nIfEwI','84552HpEZXm','257790urzmox','\x20(id=','length','validation','261pSkgMy','114NILQTK','role','3360533nAECJF'];a179_0x3f7f=function(){return _0x20c15e;};return a179_0x3f7f();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{assertCustomRole,getRoleById,projectRole,REMARK_FLAG,ROLE_ID_FLAG}from'../../commands/role/shared.js';function a179_0x33fd(_0xdabf55,_0x3777ca){_0xdabf55=_0xdabf55-0x7a;const _0x3f7fe0=a179_0x3f7f();let _0x33fd19=_0x3f7fe0[_0xdabf55];return _0x33fd19;}const UPDATE_PATH=a179_0x60d659(0x96);function readPatch(_0x211acc){const _0x4c2e0f=a179_0x60d659,_0x2d1d11=_0x211acc['flag'](_0x4c2e0f(0x8f)),_0x10abd9=_0x211acc[_0x4c2e0f(0x8e)]('remark'),_0x4635e6={};if(_0x2d1d11!==undefined&&_0x2d1d11!==null){const _0x5e1225=String(_0x2d1d11)[_0x4c2e0f(0x97)]();if(!_0x5e1225)throw CliErrors['validation'](_0x4c2e0f(0x92));if(_0x5e1225[_0x4c2e0f(0x85)]>0x40)throw CliErrors['validation'](_0x4c2e0f(0x8d));_0x4635e6[_0x4c2e0f(0x91)]=_0x5e1225;}_0x10abd9!==undefined&&_0x10abd9!==null&&(_0x4635e6[_0x4c2e0f(0x99)]=String(_0x10abd9));if(_0x4635e6[_0x4c2e0f(0x91)]===undefined&&_0x4635e6[_0x4c2e0f(0x99)]===undefined)throw CliErrors[_0x4c2e0f(0x86)](_0x4c2e0f(0x7a),_0x4c2e0f(0x93));return _0x4635e6;}export const roleUpdate={'service':a179_0x60d659(0x89),'command':a179_0x60d659(0x98),'description':a179_0x60d659(0x7b),'risk':'write','flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a179_0x60d659(0x8f),'type':'string','required':![],'description':a179_0x60d659(0x8c)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x20146f){readPatch(_0x20146f);},async 'dryRun'(_0x17e851){const _0x2a934a=a179_0x60d659,_0x4047a3=_0x17e851[_0x2a934a(0x95)]('id'),_0x515cb0=readPatch(_0x17e851),_0x12c950=await getRoleById(_0x17e851['appCode'],_0x4047a3);return assertCustomRole(_0x12c950,_0x2a934a(0x98)),asDryRunResult({'scope':'dev','operation':_0x2a934a(0x98),'selector':{'appCode':_0x17e851[_0x2a934a(0x7c)],'roleId':_0x4047a3,'roleName':_0x12c950[_0x2a934a(0x91)]},'before':projectRole(_0x12c950),'after':projectRole({..._0x12c950,..._0x515cb0[_0x2a934a(0x91)]!==undefined?{'roleName':_0x515cb0[_0x2a934a(0x91)]}:{},..._0x515cb0[_0x2a934a(0x99)]!==undefined?{'remark':_0x515cb0[_0x2a934a(0x99)]}:{}}),'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[]},{'method':_0x2a934a(0x80),'url':UPDATE_PATH});},async 'execute'(_0x341845){const _0x265bc5=a179_0x60d659,_0xd17e9c=_0x341845[_0x265bc5(0x95)]('id'),_0x503577=readPatch(_0x341845),_0x1163d8=await getRoleById(_0x341845['appCode'],_0xd17e9c);assertCustomRole(_0x1163d8,_0x265bc5(0x98)),await updateAppRole({'id':_0xd17e9c,'appCode':_0x341845['appCode'],..._0x503577[_0x265bc5(0x91)]!==undefined?{'roleName':_0x503577[_0x265bc5(0x91)]}:{},..._0x503577['remark']!==undefined?{'remark':_0x503577['remark']}:{}});const _0x1796e1=await getRoleById(_0x341845['appCode'],_0xd17e9c);return{'ok':!![],'data':{'scope':_0x265bc5(0x7d),'operation':_0x265bc5(0x98),'selector':{'appCode':_0x341845['appCode'],'roleId':_0xd17e9c,'roleName':_0x1796e1[_0x265bc5(0x91)]},'before':projectRole(_0x1163d8),'after':projectRole(_0x1796e1),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[]},'message':_0x265bc5(0x90)+_0x1796e1['roleName']+_0x265bc5(0x84)+_0xd17e9c+')'};}};
@@ -1 +1 @@
1
- const a179_0x1e9441=a179_0x1b69;(function(_0x82b654,_0xcc8e7a){const _0x3825cc=a179_0x1b69,_0x3fe189=_0x82b654();while(!![]){try{const _0x400e7e=parseInt(_0x3825cc(0x13b))/0x1*(parseInt(_0x3825cc(0x12d))/0x2)+parseInt(_0x3825cc(0x136))/0x3*(-parseInt(_0x3825cc(0x131))/0x4)+parseInt(_0x3825cc(0x137))/0x5*(-parseInt(_0x3825cc(0x140))/0x6)+parseInt(_0x3825cc(0x13f))/0x7*(-parseInt(_0x3825cc(0x130))/0x8)+parseInt(_0x3825cc(0x12f))/0x9*(parseInt(_0x3825cc(0x143))/0xa)+-parseInt(_0x3825cc(0x13e))/0xb+-parseInt(_0x3825cc(0x142))/0xc*(-parseInt(_0x3825cc(0x12e))/0xd);if(_0x400e7e===_0xcc8e7a)break;else _0x3fe189['push'](_0x3fe189['shift']());}catch(_0x9e1b6c){_0x3fe189['push'](_0x3fe189['shift']());}}}(a179_0x540d,0x77707));import{createDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a179_0x1b69(_0x39966e,_0xde3e04){_0x39966e=_0x39966e-0x12a;const _0x540df5=a179_0x540d();let _0x1b69a3=_0x540df5[_0x39966e];return _0x1b69a3;}function a179_0x540d(){const _0xb4e122=['userId','POST','6450466gqcFcw','1358YDrpYv','813726kzZblL','Added\x20user\x20','11547552ekDDtj','80pGsNxu','\x20already\x20in\x20role\x20','selector','No\x20change:\x20user\x20','4cftylW','13kiypew','571797nTmomy','9608ibHdYK','6056AIHttv','Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','\x20to\x20role\x20','roleName','roleType','1338rJqkdM','5bSZhtG','username','high-risk-write','user-add','324464hnkEqi'];a179_0x540d=function(){return _0xb4e122;};return a179_0x540d();}import{EXPECT_USER_COUNT_FLAG,CREATE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':'role','command':a179_0x1e9441(0x13a),'description':a179_0x1e9441(0x132),'risk':a179_0x1e9441(0x139),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x44a382){const _0x518df6=a179_0x1e9441,{mutation:_0x1ea0be}=await prepareUserMutation(_0x44a382,_0x518df6(0x13a),!![]);return asDryRunResult(_0x1ea0be,{'method':_0x518df6(0x13d),'url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x4d19c2){const _0x12811b=a179_0x1e9441,{mutation:_0x53c86d,changed:_0x18dea9,role:_0x2d26da,user:_0x4c7473}=await prepareUserMutation(_0x4d19c2,'user-add',![]);return _0x18dea9&&await createDevUserRole({'appCode':_0x4d19c2['appCode'],'userId':_0x4c7473[_0x12811b(0x13c)],'username':_0x4c7473[_0x12811b(0x138)],'roleType':_0x2d26da[_0x12811b(0x135)],'roleId':_0x53c86d[_0x12811b(0x12b)]['roleId']}),{'ok':!![],'data':_0x53c86d,'message':_0x18dea9?_0x12811b(0x141)+_0x53c86d['selector']['userId']+_0x12811b(0x133)+_0x53c86d[_0x12811b(0x12b)][_0x12811b(0x134)]:_0x12811b(0x12c)+_0x53c86d[_0x12811b(0x12b)][_0x12811b(0x13c)]+_0x12811b(0x12a)+_0x53c86d[_0x12811b(0x12b)]['roleName']};}};
1
+ const a180_0x33f05a=a180_0x3eb3;(function(_0x10cd3a,_0x31298e){const _0x36828b=a180_0x3eb3,_0x589c34=_0x10cd3a();while(!![]){try{const _0x3e9b02=parseInt(_0x36828b(0x87))/0x1+-parseInt(_0x36828b(0x82))/0x2*(-parseInt(_0x36828b(0x85))/0x3)+-parseInt(_0x36828b(0x86))/0x4*(parseInt(_0x36828b(0x7d))/0x5)+parseInt(_0x36828b(0x84))/0x6+-parseInt(_0x36828b(0x8e))/0x7*(parseInt(_0x36828b(0x94))/0x8)+-parseInt(_0x36828b(0x81))/0x9*(parseInt(_0x36828b(0x8c))/0xa)+parseInt(_0x36828b(0x83))/0xb;if(_0x3e9b02===_0x31298e)break;else _0x589c34['push'](_0x589c34['shift']());}catch(_0x58d958){_0x589c34['push'](_0x589c34['shift']());}}}(a180_0x34d8,0xea4cc));function a180_0x34d8(){const _0xe8bbe1=['272616PhQvpc','No\x20change:\x20user\x20','5DHNsHr','selector','Added\x20user\x20','roleType','1838709XjIKka','2vdSHAW','39123084BxPuNJ','100974aSroLM','4539207vJIEnI','2114156ROUNwT','80556ZVDXEO','role','appCode','\x20to\x20role\x20','POST','90BlmQhZ','roleName','378pQVctn','\x20already\x20in\x20role\x20','userId','high-risk-write','roleId','Add\x20a\x20user\x20to\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes'];a180_0x34d8=function(){return _0xe8bbe1;};return a180_0x34d8();}import{createDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,CREATE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';function a180_0x3eb3(_0x6af33f,_0x3b7875){_0x6af33f=_0x6af33f-0x7c;const _0x34d83c=a180_0x34d8();let _0x3eb35d=_0x34d83c[_0x6af33f];return _0x3eb35d;}export const roleUserAdd={'service':a180_0x33f05a(0x88),'command':'user-add','description':a180_0x33f05a(0x93),'risk':a180_0x33f05a(0x91),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x861924){const _0x420353=a180_0x33f05a,{mutation:_0x44cdca}=await prepareUserMutation(_0x861924,'user-add',!![]);return asDryRunResult(_0x44cdca,{'method':_0x420353(0x8b),'url':CREATE_USER_ROLE_PATH});},async 'execute'(_0x529c05){const _0x5e38ec=a180_0x33f05a,{mutation:_0x23a2cc,changed:_0x2ba684,role:_0x48a640,user:_0x5745bd}=await prepareUserMutation(_0x529c05,'user-add',![]);return _0x2ba684&&await createDevUserRole({'appCode':_0x529c05[_0x5e38ec(0x89)],'userId':_0x5745bd[_0x5e38ec(0x90)],'username':_0x5745bd['username'],'roleType':_0x48a640[_0x5e38ec(0x80)],'roleId':_0x23a2cc['selector'][_0x5e38ec(0x92)]}),{'ok':!![],'data':_0x23a2cc,'message':_0x2ba684?_0x5e38ec(0x7f)+_0x23a2cc[_0x5e38ec(0x7e)]['userId']+_0x5e38ec(0x8a)+_0x23a2cc[_0x5e38ec(0x7e)][_0x5e38ec(0x8d)]:_0x5e38ec(0x7c)+_0x23a2cc[_0x5e38ec(0x7e)][_0x5e38ec(0x90)]+_0x5e38ec(0x8f)+_0x23a2cc['selector'][_0x5e38ec(0x8d)]};}};
@@ -1 +1 @@
1
- const a180_0x176137=a180_0x3687;(function(_0x218885,_0xdc806d){const _0x19f146=a180_0x3687,_0x58f139=_0x218885();while(!![]){try{const _0x3b9ab2=-parseInt(_0x19f146(0x8c))/0x1*(parseInt(_0x19f146(0x80))/0x2)+parseInt(_0x19f146(0x8a))/0x3*(-parseInt(_0x19f146(0x84))/0x4)+-parseInt(_0x19f146(0x8d))/0x5+-parseInt(_0x19f146(0x7f))/0x6+-parseInt(_0x19f146(0x7c))/0x7*(parseInt(_0x19f146(0x88))/0x8)+parseInt(_0x19f146(0x86))/0x9+parseInt(_0x19f146(0x82))/0xa*(parseInt(_0x19f146(0x81))/0xb);if(_0x3b9ab2===_0xdc806d)break;else _0x58f139['push'](_0x58f139['shift']());}catch(_0x1c4d41){_0x58f139['push'](_0x58f139['shift']());}}}(a180_0x5e62,0x242af));function a180_0x3687(_0x4645dd,_0xcae26d){_0x4645dd=_0x4645dd-0x7a;const _0x5e6273=a180_0x5e62();let _0x3687b6=_0x5e6273[_0x4645dd];return _0x3687b6;}import{deleteDevUserRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,DELETE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':'role','command':a180_0x176137(0x8b),'description':'Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','risk':a180_0x176137(0x7e),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x578096){const _0x437bb2=a180_0x176137,{mutation:_0x4187f5}=await prepareUserMutation(_0x578096,'user-remove',!![]);return asDryRunResult(_0x4187f5,{'method':_0x437bb2(0x8e),'url':DELETE_USER_ROLE_PATH});},async 'execute'(_0x15c508){const _0x516086=a180_0x176137,{matchingRelationIds:_0xb038c7,mutation:_0x20e7ca,changed:_0x5f1e08}=await prepareUserMutation(_0x15c508,_0x516086(0x8b),![]);if(_0x5f1e08)for(const _0x1a8136 of _0xb038c7){await deleteDevUserRole(_0x1a8136);}return{'ok':!![],'data':_0x20e7ca,'message':_0x5f1e08?_0x516086(0x89)+_0x20e7ca[_0x516086(0x85)][_0x516086(0x7b)]+_0x516086(0x83)+_0x20e7ca[_0x516086(0x85)][_0x516086(0x87)]:_0x516086(0x7a)+_0x20e7ca[_0x516086(0x85)]['userId']+_0x516086(0x7d)+_0x20e7ca[_0x516086(0x85)][_0x516086(0x87)]};}};function a180_0x5e62(){const _0x56591f=['1315458hbGaUi','roleName','600bHXeYm','Removed\x20user\x20','3wmczWn','user-remove','21LoZZHr','617995dkjhPu','POST','No\x20change:\x20user\x20','userId','16289JRYoKT','\x20not\x20in\x20role\x20','high-risk-write','358776SsHKXz','9602sbfvof','77jJNYrG','700830MakGuu','\x20from\x20role\x20','119436pQpkNL','selector'];a180_0x5e62=function(){return _0x56591f;};return a180_0x5e62();}
1
+ const a181_0x1e8a73=a181_0xd365;(function(_0x4bcf7f,_0x3a827a){const _0x2ed901=a181_0xd365,_0x3752f9=_0x4bcf7f();while(!![]){try{const _0x40e587=parseInt(_0x2ed901(0xfb))/0x1*(-parseInt(_0x2ed901(0xf2))/0x2)+parseInt(_0x2ed901(0xf3))/0x3*(-parseInt(_0x2ed901(0xf8))/0x4)+parseInt(_0x2ed901(0xf7))/0x5+parseInt(_0x2ed901(0xeb))/0x6+parseInt(_0x2ed901(0xfd))/0x7+parseInt(_0x2ed901(0xf5))/0x8*(-parseInt(_0x2ed901(0xf6))/0x9)+-parseInt(_0x2ed901(0xf9))/0xa;if(_0x40e587===_0x3a827a)break;else _0x3752f9['push'](_0x3752f9['shift']());}catch(_0x718be1){_0x3752f9['push'](_0x3752f9['shift']());}}}(a181_0x3d8c,0xb385c));import{deleteDevUserRole}from'../../core/api-client.js';function a181_0x3d8c(){const _0x541bf4=['9khYRhp','1732095qssxfJ','240140nQuvzX','1126140WsKLoQ','roleName','1359871zaBGdA','high-risk-write','8737841kNdjWl','userId','POST','7964454rmrUgg','role','selector','Remove\x20a\x20user\x20from\x20a\x20role\x20(OWNER\x20rejected);\x20requires\x20--yes','user-remove','\x20not\x20in\x20role\x20','\x20from\x20role\x20','2FKZUfV','33FDPOlI','Removed\x20user\x20','431176mVDUYC'];a181_0x3d8c=function(){return _0x541bf4;};return a181_0x3d8c();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a181_0xd365(_0x32caad,_0x2a3d06){_0x32caad=_0x32caad-0xeb;const _0x3d8c02=a181_0x3d8c();let _0xd365d7=_0x3d8c02[_0x32caad];return _0xd365d7;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,DELETE_USER_ROLE_PATH,prepareUserMutation,ROLE_REF_FLAG,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':a181_0x1e8a73(0xec),'command':a181_0x1e8a73(0xef),'description':a181_0x1e8a73(0xee),'risk':a181_0x1e8a73(0xfc),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x214be0){const _0x1a4733=a181_0x1e8a73,{mutation:_0x8df161}=await prepareUserMutation(_0x214be0,_0x1a4733(0xef),!![]);return asDryRunResult(_0x8df161,{'method':_0x1a4733(0xff),'url':DELETE_USER_ROLE_PATH});},async 'execute'(_0x4c4796){const _0x596ce7=a181_0x1e8a73,{matchingRelationIds:_0x34bc64,mutation:_0x51008d,changed:_0x297159}=await prepareUserMutation(_0x4c4796,_0x596ce7(0xef),![]);if(_0x297159)for(const _0xe1d887 of _0x34bc64){await deleteDevUserRole(_0xe1d887);}return{'ok':!![],'data':_0x51008d,'message':_0x297159?_0x596ce7(0xf4)+_0x51008d[_0x596ce7(0xed)][_0x596ce7(0xfe)]+_0x596ce7(0xf1)+_0x51008d['selector'][_0x596ce7(0xfa)]:'No\x20change:\x20user\x20'+_0x51008d[_0x596ce7(0xed)][_0x596ce7(0xfe)]+_0x596ce7(0xf0)+_0x51008d['selector']['roleName']};}};
@@ -1 +1 @@
1
- const a181_0x463809=a181_0x23c0;(function(_0x21994c,_0x2d2b22){const _0x315d42=a181_0x23c0,_0x20aa9c=_0x21994c();while(!![]){try{const _0x93058d=-parseInt(_0x315d42(0x1ce))/0x1*(-parseInt(_0x315d42(0x1c6))/0x2)+parseInt(_0x315d42(0x1c3))/0x3*(parseInt(_0x315d42(0x1c5))/0x4)+-parseInt(_0x315d42(0x1d8))/0x5+parseInt(_0x315d42(0x1c2))/0x6*(parseInt(_0x315d42(0x1d4))/0x7)+-parseInt(_0x315d42(0x1cc))/0x8*(-parseInt(_0x315d42(0x1cb))/0x9)+parseInt(_0x315d42(0x1c7))/0xa+-parseInt(_0x315d42(0x1c0))/0xb*(parseInt(_0x315d42(0x1c4))/0xc);if(_0x93058d===_0x2d2b22)break;else _0x20aa9c['push'](_0x20aa9c['shift']());}catch(_0x423152){_0x20aa9c['push'](_0x20aa9c['shift']());}}}(a181_0x4779,0x6e045));import{CliErrors}from'../../errors.js';function a181_0x4779(){const _0x486bcf=['24932bnqIok','flagMissing','\x22\x20→\x20userId\x20','name','Pass\x20--name\x20<nickname|username>.','Resolved\x20\x22','182wKwfCA','username','trim','userId','3174330kgnhyH','11PbzBtI','Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.','3456hGVoxJ','1899507nhBUvH','6551976SyIKuA','4VGoiBE','26xRzsGy','106800sXfnYL','read','nickname','str','15948GqrtXP','2928KqozQm','user-resolve'];a181_0x4779=function(){return _0x486bcf;};return a181_0x4779();}function a181_0x23c0(_0x2b6283,_0x45626e){_0x2b6283=_0x2b6283-0x1c0;const _0x47799d=a181_0x4779();let _0x23c03b=_0x47799d[_0x2b6283];return _0x23c03b;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';export const roleUserResolve={'service':'role','command':a181_0x463809(0x1cd),'description':'Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','risk':a181_0x463809(0x1c8),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2a89cb){const _0xea2190=a181_0x463809;if(!_0x2a89cb[_0xea2190(0x1ca)](_0xea2190(0x1d1))[_0xea2190(0x1d6)]())throw CliErrors[_0xea2190(0x1cf)](_0xea2190(0x1d1),_0xea2190(0x1d2));},async 'execute'(_0x112ba6){const _0x503bf4=a181_0x463809,_0x38b17e=_0x112ba6['str'](_0x503bf4(0x1d1))['trim'](),_0x5f105a=await resolveUserRef(_0x38b17e,_0x503bf4(0x1c1));return{'ok':!![],'data':{'user':{'userId':_0x5f105a[_0x503bf4(0x1d7)],'username':_0x5f105a[_0x503bf4(0x1d5)],'nickname':_0x5f105a[_0x503bf4(0x1c9)],'matchedBy':_0x5f105a['matchedBy']}},'message':_0x503bf4(0x1d3)+_0x38b17e+_0x503bf4(0x1d0)+_0x5f105a['userId']};}};
1
+ const a182_0x54ac4d=a182_0x745d;function a182_0x43e5(){const _0x5e1bdf=['1992924ahSGai','1832525kLlUYS','name','userId','887084QyvXOd','3774231qilJVt','8547590qGIOcG','Pass\x20--name\x20<nickname|username>.','flagMissing','str','trim','6BGTMfw','nickname','8uMScNK','Resolved\x20\x22','username','role','3493waZQgw','read','Select\x20a\x20listed\x20userId,\x20then\x20pass\x20it\x20to\x20`role\x20user-add`\x20or\x20`role\x20user-remove`\x20with\x20--user\x20<id>.','186699qPXyca','8248jbpjYQ','\x22\x20→\x20userId\x20'];a182_0x43e5=function(){return _0x5e1bdf;};return a182_0x43e5();}function a182_0x745d(_0x3829c7,_0x5f1771){_0x3829c7=_0x3829c7-0x1d6;const _0x43e597=a182_0x43e5();let _0x745d48=_0x43e597[_0x3829c7];return _0x745d48;}(function(_0x19df01,_0x8d56b2){const _0x34c142=a182_0x745d,_0x121751=_0x19df01();while(!![]){try{const _0x3de1e3=-parseInt(_0x34c142(0x1db))/0x1*(parseInt(_0x34c142(0x1eb))/0x2)+parseInt(_0x34c142(0x1e9))/0x3*(parseInt(_0x34c142(0x1e2))/0x4)+parseInt(_0x34c142(0x1df))/0x5+parseInt(_0x34c142(0x1de))/0x6+-parseInt(_0x34c142(0x1d8))/0x7*(-parseInt(_0x34c142(0x1dc))/0x8)+parseInt(_0x34c142(0x1e3))/0x9+-parseInt(_0x34c142(0x1e4))/0xa;if(_0x3de1e3===_0x8d56b2)break;else _0x121751['push'](_0x121751['shift']());}catch(_0x5a7c7d){_0x121751['push'](_0x121751['shift']());}}}(a182_0x43e5,0x73d6a));import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';export const roleUserResolve={'service':a182_0x54ac4d(0x1d7),'command':'user-resolve','description':'Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','risk':a182_0x54ac4d(0x1d9),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4496a3){const _0x2e9668=a182_0x54ac4d;if(!_0x4496a3[_0x2e9668(0x1e7)](_0x2e9668(0x1e0))[_0x2e9668(0x1e8)]())throw CliErrors[_0x2e9668(0x1e6)](_0x2e9668(0x1e0),_0x2e9668(0x1e5));},async 'execute'(_0x3a0748){const _0xda4987=a182_0x54ac4d,_0x2d4e61=_0x3a0748[_0xda4987(0x1e7)]('name')[_0xda4987(0x1e8)](),_0x5745c8=await resolveUserRef(_0x2d4e61,_0xda4987(0x1da));return{'ok':!![],'data':{'user':{'userId':_0x5745c8['userId'],'username':_0x5745c8[_0xda4987(0x1d6)],'nickname':_0x5745c8[_0xda4987(0x1ea)],'matchedBy':_0x5745c8['matchedBy']}},'message':_0xda4987(0x1ec)+_0x2d4e61+_0xda4987(0x1dd)+_0x5745c8[_0xda4987(0x1e1)]};}};
@@ -1 +1 @@
1
- const a182_0x5ad14a=a182_0x15e2;function a182_0x15e2(_0x3f05a2,_0x387af0){_0x3f05a2=_0x3f05a2-0x173;const _0x3b521d=a182_0x3b52();let _0x15e2a2=_0x3b521d[_0x3f05a2];return _0x15e2a2;}(function(_0x236e2d,_0x1b56ba){const _0x1bfdf3=a182_0x15e2,_0x60e152=_0x236e2d();while(!![]){try{const _0x92fe52=parseInt(_0x1bfdf3(0x1a3))/0x1+parseInt(_0x1bfdf3(0x199))/0x2*(parseInt(_0x1bfdf3(0x17d))/0x3)+-parseInt(_0x1bfdf3(0x1a1))/0x4+parseInt(_0x1bfdf3(0x17f))/0x5*(parseInt(_0x1bfdf3(0x184))/0x6)+parseInt(_0x1bfdf3(0x176))/0x7+parseInt(_0x1bfdf3(0x1a7))/0x8+-parseInt(_0x1bfdf3(0x1b0))/0x9;if(_0x92fe52===_0x1b56ba)break;else _0x60e152['push'](_0x60e152['shift']());}catch(_0x36ff64){_0x60e152['push'](_0x60e152['shift']());}}}(a182_0x3b52,0xb4bd1));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';import{resolve,delimiter,join}from'node:path';function a182_0x3b52(){const _0x3be995=['has','cwd','boolean','build','bun','yarn','inherit','No\x20scripts\x20defined\x20in\x20package.json.','needsUpgrade','Script\x20\x22','write','Enable\x20watch\x20mode\x20for\x20preview','\x0a\x20\x20Available\x20scripts:\x0a','package.json','15188jzLAYh','utf-8','pnpm-lock.yaml','watch','vite','run','\x20\x20\x20\x20','length','3806672oMJRMp','bool','685414RmAmgj','push','Available:\x20','\x20exited\x20with\x20code\x20','6392800USSxdK','\x20run\x20<script>\x0a','bun.lockb','yarn.lock','close','\x20run\x20','\x22\x20not\x20found\x20in\x20package.json.','Script\x20name\x20defined\x20in\x20package.json','keys','18996795ctiGlE','\x0a\x20\x20Usage:\x20','vite\x20preview\x20exited\x20with\x20code\x20','all','\x20run\x20preview\x20--watch','node_modules','4901666OtueFM','log','slice','join','No\x20package.json\x20found\x20in\x20current\x20directory.','start','scripts','159JgMrtd','.bin','62015MTFxZr','parse','\x20run\x20preview','(none)','\x20run\x20start','588OTlvzD','dev','--watch','error','validation','preview','bun.lock'];a182_0x3b52=function(){return _0x3be995;};return a182_0x3b52();}import{spawn}from'node:child_process';import{CliErrors}from'../../errors.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([a182_0x5ad14a(0x17b),a182_0x5ad14a(0x185)]);function readPackageScripts(_0x478b70){const _0x555dde=a182_0x5ad14a,_0x56149d=resolve(_0x478b70,_0x555dde(0x198));if(!existsSync(_0x56149d))return null;try{const _0x1daaf0=JSON[_0x555dde(0x180)](readFileSync(_0x56149d,_0x555dde(0x19a)));return _0x1daaf0[_0x555dde(0x17c)]??{};}catch{return null;}}function detectPackageManager(_0x1f50ec){const _0x5c8c2b=a182_0x5ad14a;if(existsSync(resolve(_0x1f50ec,_0x5c8c2b(0x1a9)))||existsSync(resolve(_0x1f50ec,_0x5c8c2b(0x18a))))return _0x5c8c2b(0x18f);if(existsSync(resolve(_0x1f50ec,_0x5c8c2b(0x19b))))return'pnpm';if(existsSync(resolve(_0x1f50ec,_0x5c8c2b(0x1aa))))return _0x5c8c2b(0x190);return'npm';}async function versionCheck(_0x5a65be){const _0x3f2058=a182_0x5ad14a,_0x4450c4=await checkCliVersion();(_0x4450c4[_0x3f2058(0x193)]||_0x4450c4['belowMinimum'])&&(printCliUpgradeWarning(_0x4450c4),assertCliVersionSupported(_0x4450c4));const _0x356c0e=await checkSdkVersion(_0x5a65be);if(_0x356c0e[_0x3f2058(0x193)])printSdkUpgradeWarning(_0x356c0e);}function spawnScript(_0x336413,_0x30c1e8,_0x59d267,_0x376add){return new Promise((_0x3ab8ac,_0x4000ac)=>{const _0xccaa33=a182_0x15e2,_0x59edcb=[_0xccaa33(0x19e),_0x30c1e8,..._0x59d267],_0x1399f6=spawn(_0x336413,_0x59edcb,{'cwd':_0x376add,'stdio':_0xccaa33(0x191),'shell':!![],'env':{...process.env,'PATH':''+join(_0x376add,_0xccaa33(0x175),_0xccaa33(0x17e))+delimiter+process.env.PATH}});_0x1399f6['on'](_0xccaa33(0x1ab),_0x4d1f15=>{const _0x2e75b1=_0xccaa33;if(_0x4d1f15===0x0||_0x4d1f15===null)_0x3ab8ac();else _0x4000ac(new Error(_0x336413+_0x2e75b1(0x1ac)+_0x30c1e8+_0x2e75b1(0x1a6)+_0x4d1f15));}),_0x1399f6['on'](_0xccaa33(0x187),_0x4000ac);});}function spawnViteBuildWatch(_0x56c1da){return new Promise((_0x114546,_0x5eab9e)=>{const _0x5503d8=a182_0x15e2,_0x2b432c=spawn('vite',[_0x5503d8(0x18e),_0x5503d8(0x186)],{'cwd':_0x56c1da,'stdio':_0x5503d8(0x191),'shell':!![],'env':{...process.env,'PATH':''+join(_0x56c1da,_0x5503d8(0x175),_0x5503d8(0x17e))+delimiter+process.env.PATH}});_0x2b432c['on']('close',_0x5785d1=>{if(_0x5785d1===0x0||_0x5785d1===null)_0x114546();else _0x5eab9e(new Error('vite\x20build\x20--watch\x20exited\x20with\x20code\x20'+_0x5785d1));}),_0x2b432c['on']('error',_0x5eab9e);});}function spawnVitePreview(_0x43f7ae){return new Promise((_0x2b73c5,_0x16aecd)=>{const _0x39070f=a182_0x15e2,_0x13be73=spawn(_0x39070f(0x19d),[_0x39070f(0x189)],{'cwd':_0x43f7ae,'stdio':_0x39070f(0x191),'shell':!![],'env':{...process.env,'PATH':''+join(_0x43f7ae,_0x39070f(0x175),_0x39070f(0x17e))+delimiter+process.env.PATH}});_0x13be73['on'](_0x39070f(0x1ab),_0x16359a=>{const _0x30f5ad=_0x39070f;if(_0x16359a===0x0||_0x16359a===null)_0x2b73c5();else _0x16aecd(new Error(_0x30f5ad(0x1b2)+_0x16359a));}),_0x13be73['on']('error',_0x16aecd);});}const runFlags=[{'name':'watch','type':a182_0x5ad14a(0x18d),'description':a182_0x5ad14a(0x196),'default':![]}];export const runDefinition={'service':a182_0x5ad14a(0x19e),'command':a182_0x5ad14a(0x19e),'description':'Run\x20a\x20package.json\x20script','risk':a182_0x5ad14a(0x195),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'script','description':a182_0x5ad14a(0x1ae),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x542351=a182_0x5ad14a,_0x2c3a0c=[];return _0x2c3a0c['push']('\x20\x20EXAMPLES'),_0x2c3a0c[_0x542351(0x1a4)](_0x542351(0x19f)+CLI_BIN_NAME+_0x542351(0x183)),_0x2c3a0c[_0x542351(0x1a4)](_0x542351(0x19f)+CLI_BIN_NAME+'\x20run\x20build'),_0x2c3a0c[_0x542351(0x1a4)](_0x542351(0x19f)+CLI_BIN_NAME+_0x542351(0x181)),_0x2c3a0c['push'](_0x542351(0x19f)+CLI_BIN_NAME+_0x542351(0x174)),_0x2c3a0c[_0x542351(0x179)]('\x0a');},async 'execute'(_0x42c5c2){const _0x3f0dc5=a182_0x5ad14a,_0x37a0c7=process[_0x3f0dc5(0x18c)](),_0x36ae6c=_0x42c5c2['args'][0x0],_0x262b5d=_0x42c5c2['args'][_0x3f0dc5(0x178)](0x1),_0x3e8f70=readPackageScripts(_0x37a0c7);if(!_0x3e8f70)throw CliErrors[_0x3f0dc5(0x188)](_0x3f0dc5(0x17a));if(!_0x36ae6c){const _0x416533=Object[_0x3f0dc5(0x1af)](_0x3e8f70);if(_0x416533[_0x3f0dc5(0x1a0)]===0x0)console[_0x3f0dc5(0x177)](_0x3f0dc5(0x192));else{console['log'](_0x3f0dc5(0x197));for(const _0x6e71a5 of _0x416533){console[_0x3f0dc5(0x177)]('\x20\x20\x20\x20'+_0x6e71a5);}console[_0x3f0dc5(0x177)](_0x3f0dc5(0x1b1)+CLI_BIN_NAME+_0x3f0dc5(0x1a8));}return{'ok':!![]};}if(!_0x3e8f70[_0x36ae6c])throw CliErrors['validation'](_0x3f0dc5(0x194)+_0x36ae6c+_0x3f0dc5(0x1ad),_0x3f0dc5(0x1a5)+(Object[_0x3f0dc5(0x1af)](_0x3e8f70)['join'](',\x20')||_0x3f0dc5(0x182)));const _0x29d1f7=detectPackageManager(_0x37a0c7);VERSION_CHECK_SCRIPTS[_0x3f0dc5(0x18b)](_0x36ae6c)&&await versionCheck(_0x37a0c7);if(_0x36ae6c===_0x3f0dc5(0x189)&&_0x42c5c2[_0x3f0dc5(0x1a2)](_0x3f0dc5(0x19c)))return await Promise[_0x3f0dc5(0x173)]([spawnViteBuildWatch(_0x37a0c7),spawnVitePreview(_0x37a0c7)]),{'ok':!![]};return await spawnScript(_0x29d1f7,_0x36ae6c,_0x262b5d,_0x37a0c7),{'ok':!![]};}};
1
+ const a183_0x4ed15b=a183_0x4c10;(function(_0x323755,_0x30f1ee){const _0x280def=a183_0x4c10,_0x1bac3b=_0x323755();while(!![]){try{const _0x34851a=-parseInt(_0x280def(0x18f))/0x1*(-parseInt(_0x280def(0x1b3))/0x2)+-parseInt(_0x280def(0x184))/0x3+-parseInt(_0x280def(0x19e))/0x4*(-parseInt(_0x280def(0x183))/0x5)+parseInt(_0x280def(0x1a2))/0x6*(-parseInt(_0x280def(0x1ae))/0x7)+parseInt(_0x280def(0x1a4))/0x8+parseInt(_0x280def(0x1b9))/0x9*(parseInt(_0x280def(0x18b))/0xa)+-parseInt(_0x280def(0x1be))/0xb;if(_0x34851a===_0x30f1ee)break;else _0x1bac3b['push'](_0x1bac3b['shift']());}catch(_0x59ec2c){_0x1bac3b['push'](_0x1bac3b['shift']());}}}(a183_0x4b23,0xe6c30));import{readFileSync,existsSync}from'node:fs';function a183_0x4c10(_0xc4153e,_0x1effa5){_0xc4153e=_0xc4153e-0x182;const _0x4b239f=a183_0x4b23();let _0x4c10f8=_0x4b239f[_0xc4153e];return _0x4c10f8;}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{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set([a183_0x4ed15b(0x197),a183_0x4ed15b(0x19b)]);function readPackageScripts(_0x1423e8){const _0x3d0a96=a183_0x4ed15b,_0x333818=resolve(_0x1423e8,_0x3d0a96(0x189));if(!existsSync(_0x333818))return null;try{const _0x8533cf=JSON['parse'](readFileSync(_0x333818,_0x3d0a96(0x18e)));return _0x8533cf[_0x3d0a96(0x1ba)]??{};}catch{return null;}}function detectPackageManager(_0x1d3de1){const _0x4b6dde=a183_0x4ed15b;if(existsSync(resolve(_0x1d3de1,_0x4b6dde(0x18c)))||existsSync(resolve(_0x1d3de1,_0x4b6dde(0x191))))return'bun';if(existsSync(resolve(_0x1d3de1,'pnpm-lock.yaml')))return _0x4b6dde(0x1a3);if(existsSync(resolve(_0x1d3de1,_0x4b6dde(0x1b4))))return _0x4b6dde(0x19f);return _0x4b6dde(0x192);}function a183_0x4b23(){const _0x1d8de6=['\x20run\x20build','6bfpvmZ','pnpm','4985360NeBdeh','vite\x20preview\x20exited\x20with\x20code\x20','error','\x20run\x20<script>\x0a','\x20run\x20preview','\x0a\x20\x20Usage:\x20','vite','bool','\x20\x20\x20\x20','No\x20package.json\x20found\x20in\x20current\x20directory.','9937179KUCnen','push','join','\x20run\x20start','\x20run\x20preview\x20--watch','233516pRNsaO','yarn.lock','log','boolean','has','No\x20scripts\x20defined\x20in\x20package.json.','14146047BOvIDQ','scripts','watch','Script\x20\x22','length','9195714JHEJvl','script','\x20exited\x20with\x20code\x20','819435UGaIXE','2378043LYHZRM','(none)','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','Script\x20name\x20defined\x20in\x20package.json','--watch','package.json','build','10OWRjjg','bun.lockb','all','utf-8','14rwAPoR','node_modules','bun.lock','npm','\x20run\x20','needsUpgrade','inherit','\x0a\x20\x20Available\x20scripts:\x0a','start','validation','.bin','keys','dev','Run\x20a\x20package.json\x20script','\x22\x20not\x20found\x20in\x20package.json.','4xVnihl','yarn','run'];a183_0x4b23=function(){return _0x1d8de6;};return a183_0x4b23();}async function versionCheck(_0x4d2ea7){const _0x5553ef=a183_0x4ed15b,_0x2bf87c=await checkCliVersion();(_0x2bf87c['needsUpgrade']||_0x2bf87c['belowMinimum'])&&(printCliUpgradeWarning(_0x2bf87c),assertCliVersionSupported(_0x2bf87c));const _0x57f6a3=await checkSdkVersion(_0x4d2ea7);if(_0x57f6a3[_0x5553ef(0x194)])printSdkUpgradeWarning(_0x57f6a3);}function spawnScript(_0x3aef50,_0x472909,_0x2e8104,_0x3fc707){return new Promise((_0x357c95,_0x2071a0)=>{const _0x15ea5d=a183_0x4c10,_0x51d325=[_0x15ea5d(0x1a0),_0x472909,..._0x2e8104],_0x308d7f=spawn(_0x3aef50,_0x51d325,{'cwd':_0x3fc707,'stdio':_0x15ea5d(0x195),'shell':!![],'env':{...process.env,'PATH':''+join(_0x3fc707,_0x15ea5d(0x190),_0x15ea5d(0x199))+delimiter+process.env.PATH}});_0x308d7f['on']('close',_0xffd052=>{const _0x195cd4=_0x15ea5d;if(_0xffd052===0x0||_0xffd052===null)_0x357c95();else _0x2071a0(new Error(_0x3aef50+_0x195cd4(0x193)+_0x472909+_0x195cd4(0x182)+_0xffd052));}),_0x308d7f['on'](_0x15ea5d(0x1a6),_0x2071a0);});}function spawnViteBuildWatch(_0x3f181f){return new Promise((_0x3dc1cb,_0xb6469c)=>{const _0x1c08f6=a183_0x4c10,_0x130b86=spawn(_0x1c08f6(0x1aa),[_0x1c08f6(0x18a),_0x1c08f6(0x188)],{'cwd':_0x3f181f,'stdio':_0x1c08f6(0x195),'shell':!![],'env':{...process.env,'PATH':''+join(_0x3f181f,'node_modules',_0x1c08f6(0x199))+delimiter+process.env.PATH}});_0x130b86['on']('close',_0x104713=>{const _0x42f83d=_0x1c08f6;if(_0x104713===0x0||_0x104713===null)_0x3dc1cb();else _0xb6469c(new Error(_0x42f83d(0x186)+_0x104713));}),_0x130b86['on']('error',_0xb6469c);});}function spawnVitePreview(_0x511292){return new Promise((_0x1de20d,_0x23303c)=>{const _0x55f02d=a183_0x4c10,_0x34dc64=spawn(_0x55f02d(0x1aa),['preview'],{'cwd':_0x511292,'stdio':_0x55f02d(0x195),'shell':!![],'env':{...process.env,'PATH':''+join(_0x511292,'node_modules',_0x55f02d(0x199))+delimiter+process.env.PATH}});_0x34dc64['on']('close',_0x1b8d87=>{const _0x2cb600=_0x55f02d;if(_0x1b8d87===0x0||_0x1b8d87===null)_0x1de20d();else _0x23303c(new Error(_0x2cb600(0x1a5)+_0x1b8d87));}),_0x34dc64['on'](_0x55f02d(0x1a6),_0x23303c);});}const runFlags=[{'name':a183_0x4ed15b(0x1bb),'type':a183_0x4ed15b(0x1b6),'description':'Enable\x20watch\x20mode\x20for\x20preview','default':![]}];export const runDefinition={'service':'run','command':a183_0x4ed15b(0x1a0),'description':a183_0x4ed15b(0x19c),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a183_0x4ed15b(0x1bf),'description':a183_0x4ed15b(0x187),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x171e05=a183_0x4ed15b,_0x156683=[];return _0x156683[_0x171e05(0x1af)]('\x20\x20EXAMPLES'),_0x156683[_0x171e05(0x1af)](_0x171e05(0x1ac)+CLI_BIN_NAME+_0x171e05(0x1b1)),_0x156683['push'](_0x171e05(0x1ac)+CLI_BIN_NAME+_0x171e05(0x1a1)),_0x156683[_0x171e05(0x1af)](_0x171e05(0x1ac)+CLI_BIN_NAME+_0x171e05(0x1a8)),_0x156683[_0x171e05(0x1af)](_0x171e05(0x1ac)+CLI_BIN_NAME+_0x171e05(0x1b2)),_0x156683[_0x171e05(0x1b0)]('\x0a');},async 'execute'(_0x2604a4){const _0x44ba5c=a183_0x4ed15b,_0x1e5401=process['cwd'](),_0x373cae=_0x2604a4['args'][0x0],_0x330617=_0x2604a4['args']['slice'](0x1),_0x384dff=readPackageScripts(_0x1e5401);if(!_0x384dff)throw CliErrors[_0x44ba5c(0x198)](_0x44ba5c(0x1ad));if(!_0x373cae){const _0x175666=Object[_0x44ba5c(0x19a)](_0x384dff);if(_0x175666[_0x44ba5c(0x1bd)]===0x0)console['log'](_0x44ba5c(0x1b8));else{console[_0x44ba5c(0x1b5)](_0x44ba5c(0x196));for(const _0x2bc711 of _0x175666){console[_0x44ba5c(0x1b5)](_0x44ba5c(0x1ac)+_0x2bc711);}console['log'](_0x44ba5c(0x1a9)+CLI_BIN_NAME+_0x44ba5c(0x1a7));}return{'ok':!![]};}if(!_0x384dff[_0x373cae])throw CliErrors[_0x44ba5c(0x198)](_0x44ba5c(0x1bc)+_0x373cae+_0x44ba5c(0x19d),'Available:\x20'+(Object['keys'](_0x384dff)[_0x44ba5c(0x1b0)](',\x20')||_0x44ba5c(0x185)));const _0x586ea7=detectPackageManager(_0x1e5401);VERSION_CHECK_SCRIPTS[_0x44ba5c(0x1b7)](_0x373cae)&&await versionCheck(_0x1e5401);if(_0x373cae==='preview'&&_0x2604a4[_0x44ba5c(0x1ab)](_0x44ba5c(0x1bb)))return await Promise[_0x44ba5c(0x18d)]([spawnViteBuildWatch(_0x1e5401),spawnVitePreview(_0x1e5401)]),{'ok':!![]};return await spawnScript(_0x586ea7,_0x373cae,_0x330617,_0x1e5401),{'ok':!![]};}};
@@ -1 +1 @@
1
- function a183_0x4edf(_0x1df2b9,_0xe5952d){_0x1df2b9=_0x1df2b9-0x17d;const _0x590db7=a183_0x590d();let _0x4edfdb=_0x590db7[_0x1df2b9];return _0x4edfdb;}function a183_0x590d(){const _0xb238e8=['json','2081970tQMmVR','schema','export','read','226604cMmdWa','343317sMvkNF','2OzcoiK','565HhmwRA','4113uiDytD','172446JrWFOw','4088dezZKs','1073730TLTwbn','8310uutXfU'];a183_0x590d=function(){return _0xb238e8;};return a183_0x590d();}const a183_0x2405ff=a183_0x4edf;(function(_0x485fd9,_0x154315){const _0x3d511a=a183_0x4edf,_0x9fb4fa=_0x485fd9();while(!![]){try{const _0x1bc094=parseInt(_0x3d511a(0x189))/0x1+parseInt(_0x3d511a(0x186))/0x2*(parseInt(_0x3d511a(0x185))/0x3)+-parseInt(_0x3d511a(0x184))/0x4+parseInt(_0x3d511a(0x187))/0x5*(parseInt(_0x3d511a(0x17e))/0x6)+-parseInt(_0x3d511a(0x17d))/0x7+-parseInt(_0x3d511a(0x18a))/0x8*(-parseInt(_0x3d511a(0x188))/0x9)+-parseInt(_0x3d511a(0x180))/0xa;if(_0x1bc094===_0x154315)break;else _0x9fb4fa['push'](_0x9fb4fa['shift']());}catch(_0x963083){_0x9fb4fa['push'](_0x9fb4fa['shift']());}}}(a183_0x590d,0x3f277));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x2654b2){const _0x2ec945=await buildSchemaPayload();return{'ok':!![],'data':_0x2ec945};}export const schemaDefinition={'service':a183_0x2405ff(0x181),'command':a183_0x2405ff(0x182),'description':'Export\x20machine-readable\x20command\x20schema\x20(JSON)','risk':a183_0x2405ff(0x183),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a183_0x2405ff(0x17f),'flags':[],'execute':execute};
1
+ function a184_0x3504(_0x10d9e8,_0x113dea){_0x10d9e8=_0x10d9e8-0xb5;const _0x303601=a184_0x3036();let _0x350482=_0x303601[_0x10d9e8];return _0x350482;}const a184_0x3b3968=a184_0x3504;(function(_0xdc9c4e,_0x2d5a0f){const _0x3c9628=a184_0x3504,_0x958289=_0xdc9c4e();while(!![]){try{const _0x32207e=-parseInt(_0x3c9628(0xbc))/0x1+-parseInt(_0x3c9628(0xc2))/0x2+-parseInt(_0x3c9628(0xc0))/0x3+-parseInt(_0x3c9628(0xbb))/0x4*(parseInt(_0x3c9628(0xc1))/0x5)+parseInt(_0x3c9628(0xb9))/0x6*(parseInt(_0x3c9628(0xb7))/0x7)+parseInt(_0x3c9628(0xb6))/0x8*(-parseInt(_0x3c9628(0xbe))/0x9)+parseInt(_0x3c9628(0xbd))/0xa;if(_0x32207e===_0x2d5a0f)break;else _0x958289['push'](_0x958289['shift']());}catch(_0x95bc62){_0x958289['push'](_0x958289['shift']());}}}(a184_0x3036,0x66b9b));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x460005){const _0x36aaa7=await buildSchemaPayload();return{'ok':!![],'data':_0x36aaa7};}export const schemaDefinition={'service':a184_0x3b3968(0xbf),'command':a184_0x3b3968(0xb5),'description':a184_0x3b3968(0xba),'risk':a184_0x3b3968(0xb8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':'json','flags':[],'execute':execute};function a184_0x3036(){const _0x57c791=['766230IoNdGq','3157450YEEfBJ','291760zUfuxm','export','43696mHntgm','189zHAqaV','read','153678jntTTh','Export\x20machine-readable\x20command\x20schema\x20(JSON)','4vQMtGx','40134JNiOzd','13974840cFokTN','981TSBjzD','schema'];a184_0x3036=function(){return _0x57c791;};return a184_0x3036();}
@@ -1 +1 @@
1
- function a184_0x13fa(){const _0x51fdf7=['132IPMbZC','utf8','✎\x20Enter\x20dbId\x20manually','trim','validation','MyBatis\x20XML\x20(mybatisXml)','sqlCode','For\x20SELECT\x20/\x20INSERT\x20/\x20UPDATE\x20/\x20DELETE\x20statements\x20that\x20run\x20directly','lockFilePath','sqlName','mode','dbId\x20cannot\x20be\x20empty','name','write','mybatisXml','File\x20already\x20exists:\x20','SQL\x20query\x20display\x20name','dbId\x20must\x20be\x20a\x20positive\x20integer','For\x20MyBatis\x20XML\x20SQL\x20with\x20dynamic\x20tags','9JbEGiB','join','Local\x20SQL\x20file\x20mode','POST','</select>','appCode','toISOString','<select\x20id=\x22query\x22\x20resultType=\x22map\x22>','nonInteractive','17935YJBnUA','890028nFlmDw','Target\x20database\x20ID','flagMissing','7ydvhvr','Select\x20the\x20local\x20SQL\x20mode:','SELECT\x201\x20AS\x20id;','sql','sqlRoot','db-id','--db-id\x20is\x20required\x20in\x20non-interactive\x20mode.','Target\x20database\x20dbId:','create','dbId','new','string','37130PtQsyi','sqlRootDir','str','--mode\x20is\x20required\x20in\x20non-interactive\x20mode.','/smartapi/custom/saveUserCustomSql','length','\x20\x20SELECT\x201\x20AS\x20id','SQL\x20name:','Created\x20SQL\x20query\x20','number','flag','598899nxDnQy','SQL\x20name\x20cannot\x20be\x20empty','5644740aShzjW','isInteger','Select\x20the\x20target\x20database:','__manual__','description','150960YppQNv','145204EjmrzK','parse','catch','dbName','Create\x20a\x20new\x20custom\x20SQL\x20and\x20scaffold\x20it\x20locally','Invalid\x20database\x20selection\x20payload:\x20','--name\x20is\x20required\x20in\x20non-interactive\x20mode.','isFinite'];a184_0x13fa=function(){return _0x51fdf7;};return a184_0x13fa();}const a184_0x698090=a184_0x4380;function a184_0x4380(_0x1a5907,_0xda1138){_0x1a5907=_0x1a5907-0x1ad;const _0x13fa7b=a184_0x13fa();let _0x4380c0=_0x13fa7b[_0x1a5907];return _0x4380c0;}(function(_0x45c37b,_0x5afdd5){const _0x5d540a=a184_0x4380,_0x656a91=_0x45c37b();while(!![]){try{const _0x33c701=-parseInt(_0x5d540a(0x1be))/0x1+parseInt(_0x5d540a(0x1d1))/0x2+-parseInt(_0x5d540a(0x1c9))/0x3+parseInt(_0x5d540a(0x1d9))/0x4*(-parseInt(_0x5d540a(0x1ae))/0x5)+-parseInt(_0x5d540a(0x1af))/0x6+parseInt(_0x5d540a(0x1b2))/0x7*(-parseInt(_0x5d540a(0x1d0))/0x8)+-parseInt(_0x5d540a(0x1ec))/0x9*(-parseInt(_0x5d540a(0x1cb))/0xa);if(_0x33c701===_0x5afdd5)break;else _0x656a91['push'](_0x656a91['shift']());}catch(_0x5a96f0){_0x656a91['push'](_0x656a91['shift']());}}}(a184_0x13fa,0x1c02e));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(_0x46c07a){const _0xe1052f=a184_0x4380;if(_0x46c07a===_0xe1052f(0x1e7))return[_0xe1052f(0x1f3),_0xe1052f(0x1c4),_0xe1052f(0x1f0),'']['join']('\x0a');return[_0xe1052f(0x1b4),''][_0xe1052f(0x1ed)]('\x0a');}export const sqlCreate={'service':a184_0x698090(0x1b5),'command':a184_0x698090(0x1ba),'description':a184_0x698090(0x1d5),'risk':a184_0x698090(0x1e6),'flags':[{'name':a184_0x698090(0x1e5),'type':a184_0x698090(0x1bd),'description':a184_0x698090(0x1e9)},{'name':a184_0x698090(0x1b7),'type':a184_0x698090(0x1c7),'description':a184_0x698090(0x1b0)},{'name':a184_0x698090(0x1e3),'type':a184_0x698090(0x1bd),'enum':['sql',a184_0x698090(0x1e7)],'description':a184_0x698090(0x1ee)}],async 'validate'(_0x415025){const _0x3bfe75=a184_0x698090;if(!_0x415025[_0x3bfe75(0x1ad)])return;if(!_0x415025['str'](_0x3bfe75(0x1e5))[_0x3bfe75(0x1dc)]())throw CliErrors['flagMissing'](_0x3bfe75(0x1e5),_0x3bfe75(0x1d7));const _0x47ae1e=resolveProvidedDbId(_0x415025);if(typeof _0x47ae1e!==_0x3bfe75(0x1c7)||!Number[_0x3bfe75(0x1d8)](_0x47ae1e)||_0x47ae1e<=0x0)throw CliErrors[_0x3bfe75(0x1b1)](_0x3bfe75(0x1b7),'--db-id\x20is\x20required\x20in\x20non-interactive\x20mode.');if(!_0x415025[_0x3bfe75(0x1c0)](_0x3bfe75(0x1e3))[_0x3bfe75(0x1dc)]())throw CliErrors['flagMissing']('mode','--mode\x20is\x20required\x20in\x20non-interactive\x20mode.');},async 'dryRun'(_0x4b283d){const _0x110d14=a184_0x698090,_0x5b9df8=loadSqlProjectConfig(_0x4b283d[_0x110d14(0x1f1)]),{sqlName:_0x2a4d6d,dbId:_0x4008e1,dbName:_0x3cc21b,mode:_0x1391f1}=await resolveSqlNewInputs(_0x4b283d),_0x2b59c1=buildSqlRelativePath('<server-generated-sqlCode>',_0x2a4d6d,_0x3cc21b,_0x1391f1,_0x4008e1),_0x45ddd=_0x5b9df8[_0x110d14(0x1bf)]+'/'+_0x2b59c1;return{'method':_0x110d14(0x1ef),'url':_0x110d14(0x1c2),'body':{'appCode':_0x4b283d[_0x110d14(0x1f1)],'sqlName':_0x2a4d6d,'dbId':_0x4008e1,'mode':_0x1391f1,'localPath':_0x45ddd},'description':'Would\x20create\x20a\x20new\x20SQL\x20query\x20and\x20scaffold\x20it\x20under\x20'+_0x5b9df8[_0x110d14(0x1bf)]};},async 'execute'(_0x2a9a45){const _0x58cc3c=a184_0x698090,_0x5f40e6=loadSqlProjectConfig(_0x2a9a45[_0x58cc3c(0x1f1)]),{sqlName:_0x31cb44,dbId:_0x2975b8,dbName:_0xf56a6c,mode:_0x1d1cc0}=await resolveSqlNewInputs(_0x2a9a45),_0x4db404=generateSqlTemplate(_0x1d1cc0),_0x5410c=await createSqlQuery({'appCode':_0x2a9a45[_0x58cc3c(0x1f1)],'sqlName':_0x31cb44,'dbId':_0x2975b8,'sqlContent':_0x4db404}),_0x306a99=ensureRemoteSqlContent(_0x5410c),_0x2bfa4d=_0xf56a6c||await getDbName(_0x2a9a45[_0x58cc3c(0x1f1)],_0x2975b8)[_0x58cc3c(0x1d3)](()=>undefined),_0x3607c1=buildSqlRelativePath(_0x5410c[_0x58cc3c(0x1df)],_0x5410c[_0x58cc3c(0x1e2)],_0x2bfa4d,_0x1d1cc0,_0x2975b8),_0x17b426=_0x5f40e6[_0x58cc3c(0x1bf)]+'/'+_0x3607c1,_0x16e8a3=buildLocalSqlFileContent({'sqlCode':_0x5410c[_0x58cc3c(0x1df)],'sqlName':_0x5410c[_0x58cc3c(0x1e2)],'dbId':_0x5410c[_0x58cc3c(0x1bb)]},_0x306a99,{'dbName':_0x2bfa4d,'mode':_0x1d1cc0,'syncedAt':new Date()[_0x58cc3c(0x1f2)](),'description':_0x5410c[_0x58cc3c(0x1cf)]});if(await fileExists(_0x17b426))throw CliErrors['validation'](_0x58cc3c(0x1e8)+_0x17b426);await ensureParentDirectory(_0x17b426),await writeFile(_0x17b426,_0x16e8a3,_0x58cc3c(0x1da));const _0x5918ef=await readSqlLockFile(_0x5f40e6[_0x58cc3c(0x1e1)]),{lockData:_0x410bdf,appLock:_0x2fe973}=ensureSqlLockScope(_0x5918ef??createEmptySqlLock(),_0x5f40e6['appCode'],_0x5f40e6[_0x58cc3c(0x1b6)],_0x58cc3c(0x1bc));return _0x2fe973['sqls'][_0x5410c[_0x58cc3c(0x1df)]]={...buildSqlLockEntry(_0x5410c,_0x306a99,computeSqlContentHash(_0x16e8a3),{'dbName':_0x2bfa4d}),'path':_0x3607c1,'mode':_0x1d1cc0},_0x2fe973['lastSync']=new Date()[_0x58cc3c(0x1f2)](),await writeSqlLockFile(_0x5f40e6[_0x58cc3c(0x1e1)],_0x410bdf),{'ok':!![],'data':{'id':_0x5410c['id'],'sqlCode':_0x5410c[_0x58cc3c(0x1df)],'sqlName':_0x5410c['sqlName'],'dbId':_0x5410c[_0x58cc3c(0x1bb)],'path':_0x17b426,'mode':_0x1d1cc0},'message':_0x58cc3c(0x1c6)+_0x5410c['sqlCode']};}};async function resolveSqlNewInputs(_0x5c4887){const _0x3fe2ad=await resolveSqlNameInput(_0x5c4887),{dbId:_0x42e2b6,dbName:_0x5ab92e}=await resolveDbSelection(_0x5c4887),_0x31742d=await resolveSqlModeInput(_0x5c4887);return{'sqlName':_0x3fe2ad,'dbId':_0x42e2b6,'dbName':_0x5ab92e,'mode':_0x31742d};}async function resolveSqlNameInput(_0x5b764d){const _0x3986c6=a184_0x698090,_0x98b215=_0x5b764d['str'](_0x3986c6(0x1e5))[_0x3986c6(0x1dc)]();if(_0x98b215)return _0x98b215;if(_0x5b764d['nonInteractive'])throw CliErrors[_0x3986c6(0x1b1)]('name',_0x3986c6(0x1d7));return(await input({'message':_0x3986c6(0x1c5),'validate':_0x2734bb=>_0x2734bb[_0x3986c6(0x1dc)]()?!![]:_0x3986c6(0x1ca)}))[_0x3986c6(0x1dc)]();}async function resolveDbSelection(_0x19d4f3){const _0x4b3651=a184_0x698090,_0x4c45bf=resolveProvidedDbId(_0x19d4f3);if(typeof _0x4c45bf==='number'&&Number[_0x4b3651(0x1d8)](_0x4c45bf)&&_0x4c45bf>0x0)return{'dbId':_0x4c45bf,'dbName':await getDbName(_0x19d4f3[_0x4b3651(0x1f1)],_0x4c45bf)[_0x4b3651(0x1d3)](()=>undefined)};if(_0x19d4f3[_0x4b3651(0x1ad)])throw CliErrors[_0x4b3651(0x1b1)](_0x4b3651(0x1b7),_0x4b3651(0x1b8));const _0x6a1f2a=await listDatabases(_0x19d4f3[_0x4b3651(0x1f1)])['catch'](()=>[]);if(_0x6a1f2a[_0x4b3651(0x1c3)]===0x1)return{'dbId':_0x6a1f2a[0x0][_0x4b3651(0x1bb)],'dbName':_0x6a1f2a[0x0][_0x4b3651(0x1d4)]};if(_0x6a1f2a['length']>0x1){const _0x4f2e32=await select({'message':_0x4b3651(0x1cd),'choices':[..._0x6a1f2a['map'](_0x3eae75=>({'name':_0x3eae75[_0x4b3651(0x1d4)]+'\x20('+_0x3eae75[_0x4b3651(0x1bb)]+')','value':serializeDbSelection(_0x3eae75)})),{'name':_0x4b3651(0x1db),'value':_0x4b3651(0x1ce)}]});if(_0x4f2e32!==_0x4b3651(0x1ce))return deserializeDbSelection(_0x4f2e32);}const _0x4020ea=await input({'message':_0x4b3651(0x1b9),'validate':_0x432ff5=>{const _0x2c1c22=_0x4b3651,_0x1dd7cd=_0x432ff5[_0x2c1c22(0x1dc)]();if(!_0x1dd7cd)return _0x2c1c22(0x1e4);const _0x352034=Number(_0x1dd7cd);if(!Number[_0x2c1c22(0x1cc)](_0x352034)||_0x352034<=0x0)return _0x2c1c22(0x1ea);return!![];}});return{'dbId':Number(_0x4020ea[_0x4b3651(0x1dc)]())};}async function resolveSqlModeInput(_0x3448a0){const _0x39c0f9=a184_0x698090,_0xfafe2a=_0x3448a0[_0x39c0f9(0x1c0)]('mode')['trim']();if(_0xfafe2a===_0x39c0f9(0x1b5)||_0xfafe2a===_0x39c0f9(0x1e7))return _0xfafe2a;if(_0x3448a0[_0x39c0f9(0x1ad)])throw CliErrors[_0x39c0f9(0x1b1)]('mode',_0x39c0f9(0x1c1));return await select({'message':_0x39c0f9(0x1b3),'choices':[{'name':'Plain\x20SQL\x20(sql)','value':_0x39c0f9(0x1b5),'description':_0x39c0f9(0x1e0)},{'name':_0x39c0f9(0x1de),'value':_0x39c0f9(0x1e7),'description':_0x39c0f9(0x1eb)}]});}function serializeDbSelection(_0x3faa06){return JSON['stringify']({'dbId':_0x3faa06['dbId'],'dbName':_0x3faa06['dbName']});}function deserializeDbSelection(_0xd9dc63){const _0x596054=a184_0x698090;try{const _0x1af83a=JSON[_0x596054(0x1d2)](_0xd9dc63);if(typeof _0x1af83a['dbId']===_0x596054(0x1c7)&&Number[_0x596054(0x1d8)](_0x1af83a[_0x596054(0x1bb)]))return{'dbId':_0x1af83a['dbId'],'dbName':_0x1af83a[_0x596054(0x1d4)]};}catch{}throw CliErrors[_0x596054(0x1dd)](_0x596054(0x1d6)+_0xd9dc63);}function resolveProvidedDbId(_0x1bd261){const _0x31bda0=a184_0x698090,_0x113931=_0x1bd261[_0x31bda0(0x1c8)](_0x31bda0(0x1b7));if(typeof _0x113931===_0x31bda0(0x1c7)&&Number[_0x31bda0(0x1d8)](_0x113931))return _0x113931;return undefined;}
1
+ const a185_0x3ba458=a185_0x6264;(function(_0x466e30,_0x9f748d){const _0x407cb6=a185_0x6264,_0x158fbb=_0x466e30();while(!![]){try{const _0x84ae18=-parseInt(_0x407cb6(0x1f6))/0x1*(parseInt(_0x407cb6(0x216))/0x2)+-parseInt(_0x407cb6(0x202))/0x3*(parseInt(_0x407cb6(0x1fa))/0x4)+-parseInt(_0x407cb6(0x1f7))/0x5+-parseInt(_0x407cb6(0x206))/0x6*(parseInt(_0x407cb6(0x1e9))/0x7)+-parseInt(_0x407cb6(0x1e6))/0x8+parseInt(_0x407cb6(0x20e))/0x9*(-parseInt(_0x407cb6(0x207))/0xa)+parseInt(_0x407cb6(0x20a))/0xb;if(_0x84ae18===_0x9f748d)break;else _0x158fbb['push'](_0x158fbb['shift']());}catch(_0x2a2ff0){_0x158fbb['push'](_0x158fbb['shift']());}}}(a185_0x3737,0x9064e));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(_0x13796b){const _0x5891f2=a185_0x6264;if(_0x13796b===_0x5891f2(0x219))return[_0x5891f2(0x20b),_0x5891f2(0x211),_0x5891f2(0x1ee),''][_0x5891f2(0x1eb)]('\x0a');return[_0x5891f2(0x1d6),''][_0x5891f2(0x1eb)]('\x0a');}export const sqlCreate={'service':a185_0x3ba458(0x1f1),'command':a185_0x3ba458(0x1dd),'description':a185_0x3ba458(0x1db),'risk':a185_0x3ba458(0x1e3),'flags':[{'name':a185_0x3ba458(0x1fc),'type':a185_0x3ba458(0x21a),'description':a185_0x3ba458(0x1d9)},{'name':a185_0x3ba458(0x1ef),'type':a185_0x3ba458(0x201),'description':a185_0x3ba458(0x209)},{'name':'mode','type':a185_0x3ba458(0x21a),'enum':[a185_0x3ba458(0x1f1),a185_0x3ba458(0x219)],'description':'Local\x20SQL\x20file\x20mode'}],async 'validate'(_0xf768cb){const _0x101e8d=a185_0x3ba458;if(!_0xf768cb['nonInteractive'])return;if(!_0xf768cb[_0x101e8d(0x214)](_0x101e8d(0x1fc))[_0x101e8d(0x1e4)]())throw CliErrors['flagMissing'](_0x101e8d(0x1fc),_0x101e8d(0x1fe));const _0x58de27=resolveProvidedDbId(_0xf768cb);if(typeof _0x58de27!==_0x101e8d(0x201)||!Number[_0x101e8d(0x218)](_0x58de27)||_0x58de27<=0x0)throw CliErrors['flagMissing'](_0x101e8d(0x1ef),_0x101e8d(0x20d));if(!_0xf768cb['str']('mode')[_0x101e8d(0x1e4)]())throw CliErrors['flagMissing']('mode',_0x101e8d(0x1fd));},async 'dryRun'(_0x4223a7){const _0x3a7718=a185_0x3ba458,_0x26fb35=loadSqlProjectConfig(_0x4223a7[_0x3a7718(0x1f0)]),{sqlName:_0x33baf2,dbId:_0x59c953,dbName:_0x166821,mode:_0xccc066}=await resolveSqlNewInputs(_0x4223a7),_0xe43f8=buildSqlRelativePath(_0x3a7718(0x1f9),_0x33baf2,_0x166821,_0xccc066,_0x59c953),_0x2b5452=_0x26fb35[_0x3a7718(0x208)]+'/'+_0xe43f8;return{'method':_0x3a7718(0x217),'url':'/smartapi/custom/saveUserCustomSql','body':{'appCode':_0x4223a7[_0x3a7718(0x1f0)],'sqlName':_0x33baf2,'dbId':_0x59c953,'mode':_0xccc066,'localPath':_0x2b5452},'description':_0x3a7718(0x20c)+_0x26fb35[_0x3a7718(0x208)]};},async 'execute'(_0xa3ca){const _0xb40d60=a185_0x3ba458,_0x3630e9=loadSqlProjectConfig(_0xa3ca['appCode']),{sqlName:_0x3155fb,dbId:_0x5e550a,dbName:_0x3d49fe,mode:_0xf5feef}=await resolveSqlNewInputs(_0xa3ca),_0x19db0d=generateSqlTemplate(_0xf5feef),_0x3712b6=await createSqlQuery({'appCode':_0xa3ca['appCode'],'sqlName':_0x3155fb,'dbId':_0x5e550a,'sqlContent':_0x19db0d}),_0x2f9e03=ensureRemoteSqlContent(_0x3712b6),_0x3f5e65=_0x3d49fe||await getDbName(_0xa3ca[_0xb40d60(0x1f0)],_0x5e550a)['catch'](()=>undefined),_0x465a85=buildSqlRelativePath(_0x3712b6[_0xb40d60(0x1e2)],_0x3712b6[_0xb40d60(0x1f8)],_0x3f5e65,_0xf5feef,_0x5e550a),_0xd3f91=_0x3630e9[_0xb40d60(0x208)]+'/'+_0x465a85,_0x51daba=buildLocalSqlFileContent({'sqlCode':_0x3712b6[_0xb40d60(0x1e2)],'sqlName':_0x3712b6[_0xb40d60(0x1f8)],'dbId':_0x3712b6['dbId']},_0x2f9e03,{'dbName':_0x3f5e65,'mode':_0xf5feef,'syncedAt':new Date()[_0xb40d60(0x1e5)](),'description':_0x3712b6[_0xb40d60(0x200)]});if(await fileExists(_0xd3f91))throw CliErrors[_0xb40d60(0x1df)]('File\x20already\x20exists:\x20'+_0xd3f91);await ensureParentDirectory(_0xd3f91),await writeFile(_0xd3f91,_0x51daba,_0xb40d60(0x1da));const _0x4782a0=await readSqlLockFile(_0x3630e9['lockFilePath']),{lockData:_0x1725ea,appLock:_0x67be98}=ensureSqlLockScope(_0x4782a0??createEmptySqlLock(),_0x3630e9[_0xb40d60(0x1f0)],_0x3630e9[_0xb40d60(0x1ec)],_0xb40d60(0x1f4));return _0x67be98[_0xb40d60(0x215)][_0x3712b6[_0xb40d60(0x1e2)]]={...buildSqlLockEntry(_0x3712b6,_0x2f9e03,computeSqlContentHash(_0x51daba),{'dbName':_0x3f5e65}),'path':_0x465a85,'mode':_0xf5feef},_0x67be98['lastSync']=new Date()['toISOString'](),await writeSqlLockFile(_0x3630e9[_0xb40d60(0x1ed)],_0x1725ea),{'ok':!![],'data':{'id':_0x3712b6['id'],'sqlCode':_0x3712b6[_0xb40d60(0x1e2)],'sqlName':_0x3712b6[_0xb40d60(0x1f8)],'dbId':_0x3712b6[_0xb40d60(0x205)],'path':_0xd3f91,'mode':_0xf5feef},'message':_0xb40d60(0x1ff)+_0x3712b6['sqlCode']};}};async function resolveSqlNewInputs(_0x12e3ff){const _0x2b9dd3=await resolveSqlNameInput(_0x12e3ff),{dbId:_0x106f01,dbName:_0x16ea6d}=await resolveDbSelection(_0x12e3ff),_0x2d24ff=await resolveSqlModeInput(_0x12e3ff);return{'sqlName':_0x2b9dd3,'dbId':_0x106f01,'dbName':_0x16ea6d,'mode':_0x2d24ff};}function a185_0x6264(_0x1cb691,_0x54c087){_0x1cb691=_0x1cb691-0x1d6;const _0x3737c1=a185_0x3737();let _0x6264cd=_0x3737c1[_0x1cb691];return _0x6264cd;}async function resolveSqlNameInput(_0x431d0b){const _0x4170dc=a185_0x3ba458,_0x46f352=_0x431d0b[_0x4170dc(0x214)](_0x4170dc(0x1fc))[_0x4170dc(0x1e4)]();if(_0x46f352)return _0x46f352;if(_0x431d0b[_0x4170dc(0x203)])throw CliErrors[_0x4170dc(0x1d7)](_0x4170dc(0x1fc),_0x4170dc(0x1fe));return(await input({'message':'SQL\x20name:','validate':_0x4a02f1=>_0x4a02f1[_0x4170dc(0x1e4)]()?!![]:_0x4170dc(0x1e7)}))['trim']();}async function resolveDbSelection(_0x361797){const _0xaeda22=a185_0x3ba458,_0x3e7581=resolveProvidedDbId(_0x361797);if(typeof _0x3e7581===_0xaeda22(0x201)&&Number[_0xaeda22(0x218)](_0x3e7581)&&_0x3e7581>0x0)return{'dbId':_0x3e7581,'dbName':await getDbName(_0x361797[_0xaeda22(0x1f0)],_0x3e7581)[_0xaeda22(0x1e0)](()=>undefined)};if(_0x361797[_0xaeda22(0x203)])throw CliErrors[_0xaeda22(0x1d7)](_0xaeda22(0x1ef),_0xaeda22(0x20d));const _0x15f139=await listDatabases(_0x361797['appCode'])[_0xaeda22(0x1e0)](()=>[]);if(_0x15f139[_0xaeda22(0x1f5)]===0x1)return{'dbId':_0x15f139[0x0][_0xaeda22(0x205)],'dbName':_0x15f139[0x0][_0xaeda22(0x1ea)]};if(_0x15f139['length']>0x1){const _0x34b43a=await select({'message':_0xaeda22(0x1d8),'choices':[..._0x15f139['map'](_0x373148=>({'name':_0x373148[_0xaeda22(0x1ea)]+'\x20('+_0x373148[_0xaeda22(0x205)]+')','value':serializeDbSelection(_0x373148)})),{'name':_0xaeda22(0x1fb),'value':_0xaeda22(0x1de)}]});if(_0x34b43a!==_0xaeda22(0x1de))return deserializeDbSelection(_0x34b43a);}const _0x5f5587=await input({'message':_0xaeda22(0x1f2),'validate':_0x581d18=>{const _0x13da51=_0xaeda22,_0x4ef75c=_0x581d18[_0x13da51(0x1e4)]();if(!_0x4ef75c)return _0x13da51(0x1dc);const _0x4fd455=Number(_0x4ef75c);if(!Number[_0x13da51(0x212)](_0x4fd455)||_0x4fd455<=0x0)return _0x13da51(0x20f);return!![];}});return{'dbId':Number(_0x5f5587[_0xaeda22(0x1e4)]())};}async function resolveSqlModeInput(_0x29f14){const _0x347464=a185_0x3ba458,_0x4335cd=_0x29f14['str'](_0x347464(0x1f3))[_0x347464(0x1e4)]();if(_0x4335cd===_0x347464(0x1f1)||_0x4335cd===_0x347464(0x219))return _0x4335cd;if(_0x29f14[_0x347464(0x203)])throw CliErrors['flagMissing']('mode','--mode\x20is\x20required\x20in\x20non-interactive\x20mode.');return await select({'message':'Select\x20the\x20local\x20SQL\x20mode:','choices':[{'name':_0x347464(0x1e1),'value':_0x347464(0x1f1),'description':_0x347464(0x21b)},{'name':_0x347464(0x213),'value':_0x347464(0x219),'description':'For\x20MyBatis\x20XML\x20SQL\x20with\x20dynamic\x20tags'}]});}function a185_0x3737(){const _0x584a43=['parse','21uhizOA','dbName','join','sqlRoot','lockFilePath','</select>','db-id','appCode','sql','Target\x20database\x20dbId:','mode','new','length','19489gttART','2102435OoSGUW','sqlName','<server-generated-sqlCode>','42892aNRdpd','✎\x20Enter\x20dbId\x20manually','name','--mode\x20is\x20required\x20in\x20non-interactive\x20mode.','--name\x20is\x20required\x20in\x20non-interactive\x20mode.','Created\x20SQL\x20query\x20','description','number','318GNuWXo','nonInteractive','Invalid\x20database\x20selection\x20payload:\x20','dbId','2298132TeSQea','10BCxhGz','sqlRootDir','Target\x20database\x20ID','53020627vbWmhE','<select\x20id=\x22query\x22\x20resultType=\x22map\x22>','Would\x20create\x20a\x20new\x20SQL\x20query\x20and\x20scaffold\x20it\x20under\x20','--db-id\x20is\x20required\x20in\x20non-interactive\x20mode.','6759063FnvFKG','dbId\x20must\x20be\x20a\x20positive\x20integer','flag','\x20\x20SELECT\x201\x20AS\x20id','isInteger','MyBatis\x20XML\x20(mybatisXml)','str','sqls','22SepbZs','POST','isFinite','mybatisXml','string','For\x20SELECT\x20/\x20INSERT\x20/\x20UPDATE\x20/\x20DELETE\x20statements\x20that\x20run\x20directly','SELECT\x201\x20AS\x20id;','flagMissing','Select\x20the\x20target\x20database:','SQL\x20query\x20display\x20name','utf8','Create\x20a\x20new\x20custom\x20SQL\x20and\x20scaffold\x20it\x20locally','dbId\x20cannot\x20be\x20empty','create','__manual__','validation','catch','Plain\x20SQL\x20(sql)','sqlCode','write','trim','toISOString','4456336IHKDsw','SQL\x20name\x20cannot\x20be\x20empty'];a185_0x3737=function(){return _0x584a43;};return a185_0x3737();}function serializeDbSelection(_0x28571d){const _0x22a3ad=a185_0x3ba458;return JSON['stringify']({'dbId':_0x28571d[_0x22a3ad(0x205)],'dbName':_0x28571d[_0x22a3ad(0x1ea)]});}function deserializeDbSelection(_0xcdbe51){const _0x5d53ec=a185_0x3ba458;try{const _0x397662=JSON[_0x5d53ec(0x1e8)](_0xcdbe51);if(typeof _0x397662['dbId']===_0x5d53ec(0x201)&&Number['isFinite'](_0x397662[_0x5d53ec(0x205)]))return{'dbId':_0x397662[_0x5d53ec(0x205)],'dbName':_0x397662[_0x5d53ec(0x1ea)]};}catch{}throw CliErrors[_0x5d53ec(0x1df)](_0x5d53ec(0x204)+_0xcdbe51);}function resolveProvidedDbId(_0x1d269a){const _0x3d304d=a185_0x3ba458,_0x354171=_0x1d269a[_0x3d304d(0x210)](_0x3d304d(0x1ef));if(typeof _0x354171==='number'&&Number[_0x3d304d(0x218)](_0x354171))return _0x354171;return undefined;}
@@ -1 +1 @@
1
- const a185_0x1eead5=a185_0x3ce6;(function(_0x32550d,_0x861079){const _0x27f741=a185_0x3ce6,_0x43d517=_0x32550d();while(!![]){try{const _0x361a19=parseInt(_0x27f741(0x1b1))/0x1*(-parseInt(_0x27f741(0x1a1))/0x2)+parseInt(_0x27f741(0x1ad))/0x3+-parseInt(_0x27f741(0x1b3))/0x4+-parseInt(_0x27f741(0x192))/0x5+-parseInt(_0x27f741(0x1a6))/0x6*(-parseInt(_0x27f741(0x1a7))/0x7)+parseInt(_0x27f741(0x194))/0x8+parseInt(_0x27f741(0x19e))/0x9*(parseInt(_0x27f741(0x1a9))/0xa);if(_0x361a19===_0x861079)break;else _0x43d517['push'](_0x43d517['shift']());}catch(_0x5ed5a4){_0x43d517['push'](_0x43d517['shift']());}}}(a185_0xe4ef,0x3d96d));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';function a185_0x3ce6(_0x5a2d53,_0x4f3f45){_0x5a2d53=_0x5a2d53-0x190;const _0xe4efa8=a185_0xe4ef();let _0x3ce669=_0xe4efa8[_0x5a2d53];return _0x3ce669;}import{dirname,join,relative,resolve,sep}from'node:path';import{deleteSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';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':a185_0x1eead5(0x1a0),'command':a185_0x1eead5(0x19c),'description':a185_0x1eead5(0x1a3),'risk':'high-risk-write','flags':[SQLCODE_FLAG],async 'validate'(_0x564594){const _0x58c340=a185_0x1eead5,_0x5d4fac=loadSqlProjectConfig(_0x564594[_0x58c340(0x199)]),_0xc41558=await readSqlLockFile(_0x5d4fac['lockFilePath']);if(!_0xc41558)throw CliErrors[_0x58c340(0x19b)](_0x58c340(0x191));},async 'dryRun'(_0x89a062){const _0x5e4584=a185_0x1eead5,_0x8e2ca9=loadSqlProjectConfig(_0x89a062[_0x5e4584(0x199)]),_0x1ac521=await readSqlLockFile(_0x8e2ca9[_0x5e4584(0x1b0)]);if(!_0x1ac521)throw CliErrors['validation']('SQL\x20lock\x20file\x20not\x20found.\x20Run\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first.');const {appLock:_0x3115fd}=ensureSqlLockScope(_0x1ac521,_0x89a062['appCode'],_0x8e2ca9[_0x5e4584(0x1ac)],_0x5e4584(0x19c)),_0x17503e=_0x89a062[_0x5e4584(0x1a8)](_0x5e4584(0x196)),_0x4df838=_0x3115fd['sqls'][_0x17503e];if(!_0x4df838)throw CliErrors['validation'](_0x5e4584(0x1aa)+_0x17503e+'\x22.');return{'method':_0x5e4584(0x1b4),'url':'/smartapi/custom/deleteUserCustomSql','body':{'sqlCode':_0x17503e,'id':_0x4df838['remoteId'],'localPath':resolveLocalSqlFilePath(_0x8e2ca9,_0x17503e,_0x4df838)},'description':_0x5e4584(0x1af)+_0x17503e+'\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20'+_0x8e2ca9[_0x5e4584(0x1a4)]};},async 'execute'(_0x1e0d86){const _0xa94e20=a185_0x1eead5,_0x434816=loadSqlProjectConfig(_0x1e0d86[_0xa94e20(0x199)]),_0x2724b1=await readSqlLockFile(_0x434816[_0xa94e20(0x1b0)]);if(!_0x2724b1)throw CliErrors[_0xa94e20(0x19b)](_0xa94e20(0x1a5));const {lockData:_0x195d1c,appLock:_0x249c93}=ensureSqlLockScope(_0x2724b1,_0x1e0d86['appCode'],_0x434816[_0xa94e20(0x1ac)],_0xa94e20(0x19c)),_0x4cff19=_0x1e0d86[_0xa94e20(0x1a8)](_0xa94e20(0x196)),_0x5708b6=_0x249c93['sqls'][_0x4cff19];if(!_0x5708b6)throw CliErrors[_0xa94e20(0x19b)](_0xa94e20(0x1aa)+_0x4cff19+'\x22.');await deleteSqlQuery({'id':_0x5708b6[_0xa94e20(0x190)],'sqlCode':_0x4cff19}),_0x249c93[_0xa94e20(0x19f)]=Object[_0xa94e20(0x19a)](Object[_0xa94e20(0x19d)](_0x249c93['sqls'])[_0xa94e20(0x195)](([_0x2abb9])=>_0x2abb9!==_0x4cff19)),_0x249c93['lastSync']=new Date()[_0xa94e20(0x1a2)](),await writeSqlLockFile(_0x434816[_0xa94e20(0x1b0)],_0x195d1c);const _0x9164f1=resolveLocalSqlFilePath(_0x434816,_0x4cff19,_0x5708b6);let _0x33c385;await fileExists(_0x9164f1)&&(_0x33c385=await moveToTrash(_0x434816[_0xa94e20(0x1ab)],_0x434816[_0xa94e20(0x1a4)],_0x9164f1),await cleanupEmptyDirectories(dirname(_0x9164f1),_0x434816[_0xa94e20(0x1b2)]));const _0x42f74e={'deleted':_0x4cff19,'remoteId':_0x5708b6[_0xa94e20(0x190)]};if(_0x33c385)_0x42f74e[_0xa94e20(0x1ae)]=_0x33c385;return{'ok':!![],'data':_0x42f74e,'message':_0xa94e20(0x193)+_0x4cff19+(_0x33c385?'\x20(local\x20file\x20moved\x20to\x20trash)':'')};}};async function moveToTrash(_0x564370,_0x5eb9fb,_0x5a35f0){const _0x4e3e63=a185_0x1eead5,_0x2486f5=new Date()[_0x4e3e63(0x1a2)]()['replace'](/[:.]/g,'-'),_0xf72f88=relative(_0x564370,_0x5a35f0),_0x31c741=join(_0x5eb9fb,_0x2486f5,_0xf72f88);return await mkdir(dirname(_0x31c741),{'recursive':!![]}),await rename(_0x5a35f0,_0x31c741),_0x31c741;}function a185_0xe4ef(){const _0x1178cd=['sqlRootDir','78420JdzccS','POST','remoteId','SQL\x20lock\x20file\x20not\x20found.\x20Run\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first.','1901625aepKib','Deleted\x20','131512lbvAmi','filter','sqlcode','startsWith','length','appCode','fromEntries','validation','delete','entries','27eiGYCS','sqls','sql','21354NsJonb','toISOString','Delete\x20a\x20SQL\x20query\x20from\x20remote\x20and\x20local','trashDir','SQL\x20lock\x20file\x20not\x20found.','2544vpCgsQ','581MZrBID','str','1427730crmKiS','No\x20SQL\x20lock\x20entry\x20found\x20for\x20\x22','projectRoot','sqlRoot','676902CCighy','trashedTo','Would\x20delete\x20SQL\x20','lockFilePath','5krOVEv'];a185_0xe4ef=function(){return _0x1178cd;};return a185_0xe4ef();}async function cleanupEmptyDirectories(_0x2b1702,_0x13e1fd){const _0x489d71=a185_0x1eead5;let _0x4e9c60=resolve(_0x2b1702);const _0x594130=resolve(_0x13e1fd);while(_0x4e9c60[_0x489d71(0x197)](''+_0x594130+sep)||_0x4e9c60===_0x594130){if(_0x4e9c60===_0x594130)return;try{const _0x5f379c=await readdir(_0x4e9c60);if(_0x5f379c[_0x489d71(0x198)]>0x0)return;await rmdir(_0x4e9c60);}catch{return;}_0x4e9c60=dirname(_0x4e9c60);}}
1
+ const a186_0x5b8031=a186_0x5146;(function(_0x1fcf61,_0x409e60){const _0x330a34=a186_0x5146,_0x3370dd=_0x1fcf61();while(!![]){try{const _0xf5bb4a=-parseInt(_0x330a34(0x1c1))/0x1+parseInt(_0x330a34(0x1c6))/0x2*(parseInt(_0x330a34(0x1b6))/0x3)+parseInt(_0x330a34(0x1d3))/0x4*(-parseInt(_0x330a34(0x1b4))/0x5)+-parseInt(_0x330a34(0x1ba))/0x6*(parseInt(_0x330a34(0x1b5))/0x7)+-parseInt(_0x330a34(0x1cc))/0x8*(-parseInt(_0x330a34(0x1b1))/0x9)+parseInt(_0x330a34(0x1c4))/0xa+-parseInt(_0x330a34(0x1be))/0xb*(-parseInt(_0x330a34(0x1bb))/0xc);if(_0xf5bb4a===_0x409e60)break;else _0x3370dd['push'](_0x3370dd['shift']());}catch(_0x2d9055){_0x3370dd['push'](_0x3370dd['shift']());}}}(a186_0x2e35,0x76814));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';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';function a186_0x5146(_0xd15005,_0x514d83){_0xd15005=_0xd15005-0x1b0;const _0x2e35d1=a186_0x2e35();let _0x51466d=_0x2e35d1[_0xd15005];return _0x51466d;}export const sqlDelete={'service':'sql','command':a186_0x5b8031(0x1b2),'description':a186_0x5b8031(0x1d0),'risk':a186_0x5b8031(0x1bd),'flags':[SQLCODE_FLAG],async 'validate'(_0x10dd54){const _0x39c63a=a186_0x5b8031,_0x316d0b=loadSqlProjectConfig(_0x10dd54[_0x39c63a(0x1cb)]),_0x23956e=await readSqlLockFile(_0x316d0b[_0x39c63a(0x1d2)]);if(!_0x23956e)throw CliErrors[_0x39c63a(0x1c3)](_0x39c63a(0x1cf));},async 'dryRun'(_0x408f55){const _0x205f00=a186_0x5b8031,_0x1cccc0=loadSqlProjectConfig(_0x408f55[_0x205f00(0x1cb)]),_0x5c05bf=await readSqlLockFile(_0x1cccc0['lockFilePath']);if(!_0x5c05bf)throw CliErrors[_0x205f00(0x1c3)](_0x205f00(0x1cf));const {appLock:_0xe053e2}=ensureSqlLockScope(_0x5c05bf,_0x408f55[_0x205f00(0x1cb)],_0x1cccc0[_0x205f00(0x1b3)],'delete'),_0xae91ab=_0x408f55[_0x205f00(0x1cd)](_0x205f00(0x1b9)),_0x557314=_0xe053e2['sqls'][_0xae91ab];if(!_0x557314)throw CliErrors[_0x205f00(0x1c3)](_0x205f00(0x1c2)+_0xae91ab+'\x22.');return{'method':'POST','url':_0x205f00(0x1ca),'body':{'sqlCode':_0xae91ab,'id':_0x557314[_0x205f00(0x1c0)],'localPath':resolveLocalSqlFilePath(_0x1cccc0,_0xae91ab,_0x557314)},'description':_0x205f00(0x1bf)+_0xae91ab+'\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20'+_0x1cccc0[_0x205f00(0x1d1)]};},async 'execute'(_0x4b6d8d){const _0x3408a1=a186_0x5b8031,_0x23e118=loadSqlProjectConfig(_0x4b6d8d[_0x3408a1(0x1cb)]),_0x1194a2=await readSqlLockFile(_0x23e118[_0x3408a1(0x1d2)]);if(!_0x1194a2)throw CliErrors[_0x3408a1(0x1c3)]('SQL\x20lock\x20file\x20not\x20found.');const {lockData:_0x426696,appLock:_0x12f1c3}=ensureSqlLockScope(_0x1194a2,_0x4b6d8d[_0x3408a1(0x1cb)],_0x23e118['sqlRoot'],_0x3408a1(0x1b2)),_0x18a984=_0x4b6d8d['str'](_0x3408a1(0x1b9)),_0x171570=_0x12f1c3[_0x3408a1(0x1b7)][_0x18a984];if(!_0x171570)throw CliErrors[_0x3408a1(0x1c3)](_0x3408a1(0x1c2)+_0x18a984+'\x22.');await deleteSqlQuery({'id':_0x171570[_0x3408a1(0x1c0)],'sqlCode':_0x18a984}),_0x12f1c3[_0x3408a1(0x1b7)]=Object[_0x3408a1(0x1d4)](Object['entries'](_0x12f1c3[_0x3408a1(0x1b7)])[_0x3408a1(0x1c7)](([_0x149fda])=>_0x149fda!==_0x18a984)),_0x12f1c3[_0x3408a1(0x1c5)]=new Date()[_0x3408a1(0x1c9)](),await writeSqlLockFile(_0x23e118[_0x3408a1(0x1d2)],_0x426696);const _0xa6ccee=resolveLocalSqlFilePath(_0x23e118,_0x18a984,_0x171570);let _0x1732d7;await fileExists(_0xa6ccee)&&(_0x1732d7=await moveToTrash(_0x23e118[_0x3408a1(0x1bc)],_0x23e118[_0x3408a1(0x1d1)],_0xa6ccee),await cleanupEmptyDirectories(dirname(_0xa6ccee),_0x23e118[_0x3408a1(0x1c8)]));const _0x306c75={'deleted':_0x18a984,'remoteId':_0x171570[_0x3408a1(0x1c0)]};if(_0x1732d7)_0x306c75['trashedTo']=_0x1732d7;return{'ok':!![],'data':_0x306c75,'message':'Deleted\x20'+_0x18a984+(_0x1732d7?'\x20(local\x20file\x20moved\x20to\x20trash)':'')};}};function a186_0x2e35(){const _0x32b79a=['lockFilePath','410556uVqEOK','fromEntries','length','1336194VYtZRb','delete','sqlRoot','5cORZCI','105nqQewd','312777wHsqos','sqls','startsWith','sqlcode','426LkIhox','2710788QTrTQk','projectRoot','high-risk-write','11GoZtFe','Would\x20delete\x20SQL\x20','remoteId','468652LFBtqX','No\x20SQL\x20lock\x20entry\x20found\x20for\x20\x22','validation','3706100tHFuuv','lastSync','6zatpfM','filter','sqlRootDir','toISOString','/smartapi/custom/deleteUserCustomSql','appCode','8TragSK','str','replace','SQL\x20lock\x20file\x20not\x20found.\x20Run\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first.','Delete\x20a\x20SQL\x20query\x20from\x20remote\x20and\x20local','trashDir'];a186_0x2e35=function(){return _0x32b79a;};return a186_0x2e35();}async function moveToTrash(_0x2c68cd,_0x29528e,_0x54ccbc){const _0x13c7bd=a186_0x5b8031,_0x4a8929=new Date()['toISOString']()[_0x13c7bd(0x1ce)](/[:.]/g,'-'),_0x30d53b=relative(_0x2c68cd,_0x54ccbc),_0x5482fa=join(_0x29528e,_0x4a8929,_0x30d53b);return await mkdir(dirname(_0x5482fa),{'recursive':!![]}),await rename(_0x54ccbc,_0x5482fa),_0x5482fa;}async function cleanupEmptyDirectories(_0xa660f7,_0x1dc4d6){const _0x14e8c2=a186_0x5b8031;let _0x1e498d=resolve(_0xa660f7);const _0x579a7a=resolve(_0x1dc4d6);while(_0x1e498d[_0x14e8c2(0x1b8)](''+_0x579a7a+sep)||_0x1e498d===_0x579a7a){if(_0x1e498d===_0x579a7a)return;try{const _0x1467d2=await readdir(_0x1e498d);if(_0x1467d2[_0x14e8c2(0x1b0)]>0x0)return;await rmdir(_0x1e498d);}catch{return;}_0x1e498d=dirname(_0x1e498d);}}
@@ -1 +1 @@
1
- function a186_0x1d52(_0x37d525,_0x5d8cb){_0x37d525=_0x37d525-0x1bd;const _0x154fc3=a186_0x154f();let _0x1d52da=_0x154fc3[_0x37d525];return _0x1d52da;}const a186_0x3816d6=a186_0x1d52;(function(_0xf9f74a,_0x260411){const _0xd5949c=a186_0x1d52,_0x275942=_0xf9f74a();while(!![]){try{const _0x13a41b=parseInt(_0xd5949c(0x1cd))/0x1+-parseInt(_0xd5949c(0x1c5))/0x2*(parseInt(_0xd5949c(0x1d1))/0x3)+-parseInt(_0xd5949c(0x1ce))/0x4+-parseInt(_0xd5949c(0x1cf))/0x5*(parseInt(_0xd5949c(0x1c1))/0x6)+-parseInt(_0xd5949c(0x1be))/0x7+-parseInt(_0xd5949c(0x1c4))/0x8*(-parseInt(_0xd5949c(0x1ca))/0x9)+parseInt(_0xd5949c(0x1c8))/0xa*(-parseInt(_0xd5949c(0x1d4))/0xb);if(_0x13a41b===_0x260411)break;else _0x275942['push'](_0x275942['shift']());}catch(_0x59bf94){_0x275942['push'](_0x275942['shift']());}}}(a186_0x154f,0xc47a7));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';function a186_0x154f(){const _0x5683ef=['sqlCode','872llebhQ','24406plaHVP','str','Return\x20full\x20raw\x20SQL\x20query\x20object','1961330oVIHNE','sqlContent','103689GEQRWA','appCode','read','1266869ZlaDRk','383264xyHUMr','40855CimQFD','dbId','108PpkNFF','boolean','bool','22ANrucV','verbose','271327FwKObL','sqlcode','sqlName','552UfHYPW','detail'];a186_0x154f=function(){return _0x5683ef;};return a186_0x154f();}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':'sql','command':a186_0x3816d6(0x1c2),'description':'Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','risk':a186_0x3816d6(0x1cc),'flags':[SQLCODE_FLAG,{'name':a186_0x3816d6(0x1bd),'type':a186_0x3816d6(0x1d2),'description':a186_0x3816d6(0x1c7)}],async 'execute'(_0x1533ac){const _0x5d3679=a186_0x3816d6,_0x45ebd3=await getSqlQueryInfo(_0x1533ac[_0x5d3679(0x1cb)],_0x1533ac[_0x5d3679(0x1c6)](_0x5d3679(0x1bf))),_0x24cecf=_0x1533ac[_0x5d3679(0x1d3)]('verbose');if(_0x24cecf)return{'ok':!![],'data':_0x45ebd3};const _0x552db9=_0x45ebd3[_0x5d3679(0x1d0)]?await getDbName(_0x1533ac[_0x5d3679(0x1cb)],_0x45ebd3[_0x5d3679(0x1d0)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x45ebd3[_0x5d3679(0x1c3)],'sqlName':_0x45ebd3[_0x5d3679(0x1c0)],'db':_0x552db9?_0x552db9+'\x20('+_0x45ebd3['dbId']+')':_0x45ebd3[_0x5d3679(0x1d0)]??'','description':_0x45ebd3['description']??'','sqlContent':_0x45ebd3[_0x5d3679(0x1c9)]??''}};}};
1
+ const a187_0x457a9b=a187_0xc4ae;(function(_0x4c51d5,_0x2c451c){const _0x54efc7=a187_0xc4ae,_0x572a1b=_0x4c51d5();while(!![]){try{const _0x25d9d6=-parseInt(_0x54efc7(0x91))/0x1+parseInt(_0x54efc7(0x7e))/0x2*(-parseInt(_0x54efc7(0x81))/0x3)+parseInt(_0x54efc7(0x85))/0x4*(-parseInt(_0x54efc7(0x8f))/0x5)+-parseInt(_0x54efc7(0x83))/0x6*(-parseInt(_0x54efc7(0x82))/0x7)+-parseInt(_0x54efc7(0x90))/0x8+parseInt(_0x54efc7(0x89))/0x9*(-parseInt(_0x54efc7(0x7c))/0xa)+parseInt(_0x54efc7(0x80))/0xb;if(_0x25d9d6===_0x2c451c)break;else _0x572a1b['push'](_0x572a1b['shift']());}catch(_0x2854bb){_0x572a1b['push'](_0x572a1b['shift']());}}}(a187_0x2b89,0xb252a));import{getSqlQueryInfo}from'../../core/api-client.js';function a187_0x2b89(){const _0x332ad5=['42zxwjAF','788064aUTSyt','sql','324kSbzrw','description','boolean','dbId','5319DiYsAQ','verbose','appCode','sqlcode','read','str','8535HFayef','10861856uBGgKR','969861BoGMxq','21910ygfGMD','sqlName','4EwTwMf','bool','43345247vPOalc','356085WBGLvH'];a187_0x2b89=function(){return _0x332ad5;};return a187_0x2b89();}import{getDbName}from'../../core/db-resolver.js';function a187_0xc4ae(_0x249b8a,_0x3ee58d){_0x249b8a=_0x249b8a-0x7c;const _0x2b89a7=a187_0x2b89();let _0xc4aed2=_0x2b89a7[_0x249b8a];return _0xc4aed2;}import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':a187_0x457a9b(0x84),'command':'detail','description':'Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','risk':a187_0x457a9b(0x8d),'flags':[SQLCODE_FLAG,{'name':a187_0x457a9b(0x8a),'type':a187_0x457a9b(0x87),'description':'Return\x20full\x20raw\x20SQL\x20query\x20object'}],async 'execute'(_0x2660dc){const _0x328240=a187_0x457a9b,_0x5c818f=await getSqlQueryInfo(_0x2660dc['appCode'],_0x2660dc[_0x328240(0x8e)](_0x328240(0x8c))),_0x3d04e4=_0x2660dc[_0x328240(0x7f)](_0x328240(0x8a));if(_0x3d04e4)return{'ok':!![],'data':_0x5c818f};const _0xbf1b41=_0x5c818f['dbId']?await getDbName(_0x2660dc[_0x328240(0x8b)],_0x5c818f[_0x328240(0x88)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x5c818f['sqlCode'],'sqlName':_0x5c818f[_0x328240(0x7d)],'db':_0xbf1b41?_0xbf1b41+'\x20('+_0x5c818f[_0x328240(0x88)]+')':_0x5c818f['dbId']??'','description':_0x5c818f[_0x328240(0x86)]??'','sqlContent':_0x5c818f['sqlContent']??''}};}};
@@ -1 +1 @@
1
- function a187_0x2f4a(_0x587e1a,_0x40eed0){_0x587e1a=_0x587e1a-0xbf;const _0x5f0d47=a187_0x5f0d();let _0x2f4ab1=_0x5f0d47[_0x587e1a];return _0x2f4ab1;}const a187_0x5d37dd=a187_0x2f4a;(function(_0x34f477,_0x5e152c){const _0x280338=a187_0x2f4a,_0x2a154b=_0x34f477();while(!![]){try{const _0x303614=parseInt(_0x280338(0xcd))/0x1*(parseInt(_0x280338(0xbf))/0x2)+-parseInt(_0x280338(0xc8))/0x3*(parseInt(_0x280338(0xc4))/0x4)+parseInt(_0x280338(0xd2))/0x5+-parseInt(_0x280338(0xd6))/0x6+-parseInt(_0x280338(0xd7))/0x7*(-parseInt(_0x280338(0xc7))/0x8)+-parseInt(_0x280338(0xd4))/0x9+parseInt(_0x280338(0xc5))/0xa;if(_0x303614===_0x5e152c)break;else _0x2a154b['push'](_0x2a154b['shift']());}catch(_0x25da99){_0x2a154b['push'](_0x2a154b['shift']());}}}(a187_0x5f0d,0x8adbe));import{executeSql}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';import{parseJsonParams}from'../../utils/params.js';function a187_0x5f0d(){const _0x1a62b1=['69825PtdyxR','SQL\x20execution\x20failed','exec','301222QLhyJU','length','execError','now','isArray','4hZPlLJ','13919530oaPypc','str','320xOhEEm','652551YyNAxJ','\x20row(s)\x20in\x20','appCode','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','sqlcode','1uKbDdg','string','execResult','Returned\x20','SQL\x20parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','710350Gdmirf','execSuccess','8133984VzXxQQ','params','2361450nsicMz'];a187_0x5f0d=function(){return _0x1a62b1;};return a187_0x5f0d();}export const sqlExec={'service':'sql','command':a187_0x5d37dd(0xd9),'description':a187_0x5d37dd(0xcb),'risk':'read','flags':[SQLCODE_FLAG,{'name':a187_0x5d37dd(0xd5),'type':a187_0x5d37dd(0xce),'description':a187_0x5d37dd(0xd1)}],async 'execute'(_0x52d17e){const _0x28038c=a187_0x5d37dd,_0x1e36f0=parseJsonParams(_0x52d17e[_0x28038c(0xc6)]('params')),_0x40bc9b=Date[_0x28038c(0xc2)](),_0x596444=await executeSql(_0x52d17e[_0x28038c(0xca)],_0x52d17e[_0x28038c(0xc6)](_0x28038c(0xcc)),_0x1e36f0),_0x6bcc91=Date['now']()-_0x40bc9b,_0xe743b=_0x596444?.[_0x28038c(0xcf)]??_0x596444,_0x6b8222=_0x596444?.[_0x28038c(0xd3)]??!![];if(!_0x6b8222)return{'ok':![],'data':{'error':_0x596444?.[_0x28038c(0xc1)]||_0x28038c(0xd8),'elapsed':_0x6bcc91},'message':_0x28038c(0xd8)};const _0x1736a7=Array[_0x28038c(0xc3)](_0xe743b)?_0xe743b:[];return{'ok':!![],'data':{'rows':_0x1736a7,'rowCount':_0x1736a7['length'],'elapsed':_0x6bcc91},'message':_0x28038c(0xd0)+_0x1736a7[_0x28038c(0xc0)]+_0x28038c(0xc9)+_0x6bcc91+'ms'};}};
1
+ const a188_0xf271f9=a188_0x2ed6;function a188_0x854f(){const _0x12c57e=['20RXOKXh','1078728qrsBds','appCode','sqlcode','now','309113HtYDrU','34893iAYfaA','params','7233974UimtkB','280wwrreJ','7302516FSpHhx','exec','290796bRTQtI','SQL\x20execution\x20failed','32vGvSQD','355890ueaoub','length','execResult','str','SQL\x20parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','4CFZdxq','sql','execSuccess'];a188_0x854f=function(){return _0x12c57e;};return a188_0x854f();}(function(_0x48e356,_0x5d2e41){const _0x18c7a7=a188_0x2ed6,_0x13bb4f=_0x48e356();while(!![]){try{const _0x525c33=parseInt(_0x18c7a7(0x1ad))/0x1+parseInt(_0x18c7a7(0x1a9))/0x2*(-parseInt(_0x18c7a7(0x1a4))/0x3)+parseInt(_0x18c7a7(0x1a1))/0x4*(parseInt(_0x18c7a7(0x1ac))/0x5)+-parseInt(_0x18c7a7(0x1b6))/0x6+-parseInt(_0x18c7a7(0x1b1))/0x7*(-parseInt(_0x18c7a7(0x1a3))/0x8)+-parseInt(_0x18c7a7(0x1b2))/0x9*(parseInt(_0x18c7a7(0x1b5))/0xa)+parseInt(_0x18c7a7(0x1b4))/0xb;if(_0x525c33===_0x5d2e41)break;else _0x13bb4f['push'](_0x13bb4f['shift']());}catch(_0x431f75){_0x13bb4f['push'](_0x13bb4f['shift']());}}}(a188_0x854f,0x9c77c));function a188_0x2ed6(_0x512489,_0x9c8327){_0x512489=_0x512489-0x1a1;const _0x854f51=a188_0x854f();let _0x2ed67e=_0x854f51[_0x512489];return _0x2ed67e;}import{executeSql}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';import{parseJsonParams}from'../../utils/params.js';export const sqlExec={'service':a188_0xf271f9(0x1aa),'command':a188_0xf271f9(0x1b7),'description':'Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','risk':'read','flags':[SQLCODE_FLAG,{'name':a188_0xf271f9(0x1b3),'type':'string','description':a188_0xf271f9(0x1a8)}],async 'execute'(_0x50ae3d){const _0xd3e92a=a188_0xf271f9,_0x3572b5=parseJsonParams(_0x50ae3d[_0xd3e92a(0x1a7)](_0xd3e92a(0x1b3))),_0x579c9c=Date[_0xd3e92a(0x1b0)](),_0x8cb23=await executeSql(_0x50ae3d[_0xd3e92a(0x1ae)],_0x50ae3d[_0xd3e92a(0x1a7)](_0xd3e92a(0x1af)),_0x3572b5),_0x1da2af=Date[_0xd3e92a(0x1b0)]()-_0x579c9c,_0x403a9d=_0x8cb23?.[_0xd3e92a(0x1a6)]??_0x8cb23,_0x160b81=_0x8cb23?.[_0xd3e92a(0x1ab)]??!![];if(!_0x160b81)return{'ok':![],'data':{'error':_0x8cb23?.['execError']||_0xd3e92a(0x1a2),'elapsed':_0x1da2af},'message':_0xd3e92a(0x1a2)};const _0x127ff5=Array['isArray'](_0x403a9d)?_0x403a9d:[];return{'ok':!![],'data':{'rows':_0x127ff5,'rowCount':_0x127ff5['length'],'elapsed':_0x1da2af},'message':'Returned\x20'+_0x127ff5[_0xd3e92a(0x1a5)]+'\x20row(s)\x20in\x20'+_0x1da2af+'ms'};}};
@@ -1 +1 @@
1
- (function(_0x285cd5,_0x41c087){const _0x1e7e31=a188_0x48bc,_0x1a3d88=_0x285cd5();while(!![]){try{const _0x4162f1=-parseInt(_0x1e7e31(0x18c))/0x1+parseInt(_0x1e7e31(0x187))/0x2+-parseInt(_0x1e7e31(0x189))/0x3*(parseInt(_0x1e7e31(0x183))/0x4)+parseInt(_0x1e7e31(0x18d))/0x5*(parseInt(_0x1e7e31(0x186))/0x6)+-parseInt(_0x1e7e31(0x185))/0x7+parseInt(_0x1e7e31(0x18b))/0x8*(-parseInt(_0x1e7e31(0x184))/0x9)+parseInt(_0x1e7e31(0x18a))/0xa*(parseInt(_0x1e7e31(0x188))/0xb);if(_0x4162f1===_0x41c087)break;else _0x1a3d88['push'](_0x1a3d88['shift']());}catch(_0x3f5600){_0x1a3d88['push'](_0x1a3d88['shift']());}}}(a188_0x225e,0xa6b18));import{sqlList}from'../../commands/sql/list.js';import{sqlDetail}from'../../commands/sql/detail.js';import{sqlValidate}from'../../commands/sql/validate.js';function a188_0x225e(){const _0x3956cf=['1638396kATDbW','7407603nRwEdZ','23778PKkdmY','622972yZqdAk','4235253QRPNxX','791676NbAVBD','100GlvaLV','56POpmzd','189910GbOYJg','125SJEgtF','16XwtxCB'];a188_0x225e=function(){return _0x3956cf;};return a188_0x225e();}function a188_0x48bc(_0x2324c7,_0x523dde){_0x2324c7=_0x2324c7-0x183;const _0x225e73=a188_0x225e();let _0x48bcad=_0x225e73[_0x2324c7];return _0x48bcad;}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';export const sqlDefinitions=[sqlList,sqlDetail,sqlStatus,sqlCreate,sqlPush,sqlValidate,sqlExec,sqlPull,sqlDelete];
1
+ (function(_0x3ee798,_0x4a75c8){const _0x1589d7=a189_0xf29d,_0x145f58=_0x3ee798();while(!![]){try{const _0xa89f0a=-parseInt(_0x1589d7(0x10d))/0x1*(parseInt(_0x1589d7(0x108))/0x2)+-parseInt(_0x1589d7(0x10f))/0x3*(parseInt(_0x1589d7(0x109))/0x4)+-parseInt(_0x1589d7(0x10e))/0x5*(parseInt(_0x1589d7(0x10a))/0x6)+parseInt(_0x1589d7(0x10c))/0x7+parseInt(_0x1589d7(0x105))/0x8+parseInt(_0x1589d7(0x107))/0x9*(-parseInt(_0x1589d7(0x110))/0xa)+-parseInt(_0x1589d7(0x106))/0xb*(-parseInt(_0x1589d7(0x10b))/0xc);if(_0xa89f0a===_0x4a75c8)break;else _0x145f58['push'](_0x145f58['shift']());}catch(_0xcfccf3){_0x145f58['push'](_0x145f58['shift']());}}}(a189_0x4453,0xaf158));import{sqlList}from'../../commands/sql/list.js';import{sqlDetail}from'../../commands/sql/detail.js';function a189_0xf29d(_0x26680a,_0x21d632){_0x26680a=_0x26680a-0x105;const _0x4453c8=a189_0x4453();let _0xf29d3b=_0x4453c8[_0x26680a];return _0xf29d3b;}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 a189_0x4453(){const _0x53c022=['27avxLeC','1876pfCEsm','1972XXqbBS','1764qvYjrt','222948wwGawV','297339MZsIxq','601uxpJoQ','17865UBdMPk','939MgKhFN','2468710UVgJXG','8377632xrNvTi','1265mrPIGw'];a189_0x4453=function(){return _0x53c022;};return a189_0x4453();}import{sqlDelete}from'../../commands/sql/delete.js';export const sqlDefinitions=[sqlList,sqlDetail,sqlStatus,sqlCreate,sqlPush,sqlValidate,sqlExec,sqlPull,sqlDelete];
@@ -1 +1 @@
1
- const a189_0x39cd9d=a189_0x39f7;function a189_0x4e10(){const _0x452e83=['length','2543814FaAKTQ','70969CNnRrT','sqlCode','Page\x20number','Page\x20size','4578080VaNxAJ','appCode','read','1296240SpGJzF','string','boolean','pagesize','1225049lijsgD','\x20SQL\x20queries\x20(total:\x20','sqlcode','Return\x20full\x20SQL\x20query\x20objects\x20including\x20parameters\x20and\x20SQL\x20content','dbId','verbose','number','19013013Jrijek','description','2356XXFGOj','name','list','num','5379stXpeY','map','Found\x20','22rFrcPb','all','bool','List\x20custom\x20SQL\x20queries'];a189_0x4e10=function(){return _0x452e83;};return a189_0x4e10();}(function(_0x52dfa8,_0x310651){const _0x5c2b23=a189_0x39f7,_0x542347=_0x52dfa8();while(!![]){try{const _0x2af983=-parseInt(_0x5c2b23(0x1ac))/0x1*(-parseInt(_0x5c2b23(0x1a6))/0x2)+-parseInt(_0x5c2b23(0x1a3))/0x3*(-parseInt(_0x5c2b23(0x19f))/0x4)+parseInt(_0x5c2b23(0x1b0))/0x5+-parseInt(_0x5c2b23(0x1ab))/0x6+parseInt(_0x5c2b23(0x1b7))/0x7+parseInt(_0x5c2b23(0x1b3))/0x8+-parseInt(_0x5c2b23(0x1be))/0x9;if(_0x2af983===_0x310651)break;else _0x542347['push'](_0x542347['shift']());}catch(_0xa10232){_0x542347['push'](_0x542347['shift']());}}}(a189_0x4e10,0x86f9f));import{listSqlQueries}from'../../core/api-client.js';function a189_0x39f7(_0x41da30,_0x3896d7){_0x41da30=_0x41da30-0x19e;const _0x4e106c=a189_0x4e10();let _0x39f7df=_0x4e106c[_0x41da30];return _0x39f7df;}import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlList={'service':'sql','command':a189_0x39cd9d(0x1a1),'description':a189_0x39cd9d(0x1a9),'risk':a189_0x39cd9d(0x1b2),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a189_0x39cd9d(0x1a0),'type':a189_0x39cd9d(0x1b4),'description':'Filter\x20by\x20SQL\x20name'},{'name':'page','type':a189_0x39cd9d(0x1bd),'description':a189_0x39cd9d(0x1ae),'default':0x1},{'name':a189_0x39cd9d(0x1b6),'type':a189_0x39cd9d(0x1bd),'description':a189_0x39cd9d(0x1af)},{'name':a189_0x39cd9d(0x1bc),'type':a189_0x39cd9d(0x1b5),'description':a189_0x39cd9d(0x1ba)}],async 'execute'(_0x206011){const _0x50f5c2=a189_0x39cd9d,_0x4e1631=await listSqlQueries(_0x206011[_0x50f5c2(0x1b1)],{'sqlCode':_0x206011['str'](_0x50f5c2(0x1b9))||undefined,'sqlName':_0x206011['str'](_0x50f5c2(0x1a0))||undefined,'currentPage':_0x206011[_0x50f5c2(0x1a2)]('page'),'pageSize':_0x206011[_0x50f5c2(0x1a2)](_0x50f5c2(0x1b6),0x32)}),_0x4cfc7a=_0x206011[_0x50f5c2(0x1a8)](_0x50f5c2(0x1bc)),_0xfde8c3=_0x4e1631['tableData']??[],_0xcd0fb7=_0x4e1631['paging']?.['totalCount']??_0xfde8c3[_0x50f5c2(0x1aa)];let _0x346b56;return _0x4cfc7a?_0x346b56=_0xfde8c3:_0x346b56=await Promise[_0x50f5c2(0x1a7)](_0xfde8c3[_0x50f5c2(0x1a4)](async _0x42c044=>{const _0x30b69a=_0x50f5c2;let _0x1f759f;try{_0x1f759f=_0x42c044[_0x30b69a(0x1bb)]?await getDbName(_0x206011[_0x30b69a(0x1b1)],_0x42c044[_0x30b69a(0x1bb)]):undefined;}catch{}return{'sqlCode':_0x42c044[_0x30b69a(0x1ad)],'sqlName':_0x42c044['sqlName'],'description':_0x42c044[_0x30b69a(0x19e)]??'','db':_0x1f759f?_0x1f759f+'\x20('+_0x42c044[_0x30b69a(0x1bb)]+')':_0x42c044['dbId']??''};})),{'ok':!![],'data':_0x346b56,'message':_0xfde8c3[_0x50f5c2(0x1aa)]===0x0?'No\x20custom\x20SQL\x20queries\x20found.':_0x50f5c2(0x1a5)+_0xfde8c3[_0x50f5c2(0x1aa)]+_0x50f5c2(0x1b8)+_0xcd0fb7+').'};}};
1
+ const a190_0x2e0e91=a190_0x54f7;(function(_0x6e5085,_0x50345c){const _0x2b2447=a190_0x54f7,_0x1300a4=_0x6e5085();while(!![]){try{const _0x482153=parseInt(_0x2b2447(0x1bf))/0x1*(-parseInt(_0x2b2447(0x1cf))/0x2)+-parseInt(_0x2b2447(0x1ca))/0x3*(parseInt(_0x2b2447(0x1cd))/0x4)+parseInt(_0x2b2447(0x1c5))/0x5+parseInt(_0x2b2447(0x1d4))/0x6*(-parseInt(_0x2b2447(0x1c9))/0x7)+-parseInt(_0x2b2447(0x1c1))/0x8+-parseInt(_0x2b2447(0x1be))/0x9*(-parseInt(_0x2b2447(0x1c4))/0xa)+-parseInt(_0x2b2447(0x1df))/0xb*(parseInt(_0x2b2447(0x1e1))/0xc);if(_0x482153===_0x50345c)break;else _0x1300a4['push'](_0x1300a4['shift']());}catch(_0xa15303){_0x1300a4['push'](_0x1300a4['shift']());}}}(a190_0x5146,0x1c479));import{listSqlQueries}from'../../core/api-client.js';function a190_0x54f7(_0x16500d,_0x26654d){_0x16500d=_0x16500d-0x1bd;const _0x514665=a190_0x5146();let _0x54f701=_0x514665[_0x16500d];return _0x54f701;}import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlList={'service':a190_0x2e0e91(0x1dc),'command':a190_0x2e0e91(0x1d6),'description':a190_0x2e0e91(0x1da),'risk':a190_0x2e0e91(0x1d3),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a190_0x2e0e91(0x1c7),'type':a190_0x2e0e91(0x1e4),'description':'Filter\x20by\x20SQL\x20name'},{'name':'page','type':a190_0x2e0e91(0x1d5),'description':a190_0x2e0e91(0x1cb),'default':0x1},{'name':a190_0x2e0e91(0x1bd),'type':'number','description':a190_0x2e0e91(0x1c6)},{'name':a190_0x2e0e91(0x1d9),'type':a190_0x2e0e91(0x1ce),'description':a190_0x2e0e91(0x1c2)}],async 'execute'(_0x43344b){const _0x48e292=a190_0x2e0e91,_0x54b3e9=await listSqlQueries(_0x43344b['appCode'],{'sqlCode':_0x43344b[_0x48e292(0x1c0)]('sqlcode')||undefined,'sqlName':_0x43344b[_0x48e292(0x1c0)](_0x48e292(0x1c7))||undefined,'currentPage':_0x43344b[_0x48e292(0x1d8)](_0x48e292(0x1dd)),'pageSize':_0x43344b[_0x48e292(0x1d8)]('pagesize',0x32)}),_0x32df52=_0x43344b[_0x48e292(0x1e0)](_0x48e292(0x1d9)),_0x52d702=_0x54b3e9[_0x48e292(0x1d0)]??[],_0x32b2b1=_0x54b3e9[_0x48e292(0x1cc)]?.[_0x48e292(0x1db)]??_0x52d702[_0x48e292(0x1d1)];let _0x5783e0;return _0x32df52?_0x5783e0=_0x52d702:_0x5783e0=await Promise['all'](_0x52d702[_0x48e292(0x1d2)](async _0x23f4fd=>{const _0x5bf1a1=_0x48e292;let _0x4ce53e;try{_0x4ce53e=_0x23f4fd[_0x5bf1a1(0x1de)]?await getDbName(_0x43344b['appCode'],_0x23f4fd['dbId']):undefined;}catch{}return{'sqlCode':_0x23f4fd[_0x5bf1a1(0x1d7)],'sqlName':_0x23f4fd[_0x5bf1a1(0x1e2)],'description':_0x23f4fd[_0x5bf1a1(0x1c8)]??'','db':_0x4ce53e?_0x4ce53e+'\x20('+_0x23f4fd[_0x5bf1a1(0x1de)]+')':_0x23f4fd['dbId']??''};})),{'ok':!![],'data':_0x5783e0,'message':_0x52d702['length']===0x0?_0x48e292(0x1c3):'Found\x20'+_0x52d702[_0x48e292(0x1d1)]+_0x48e292(0x1e3)+_0x32b2b1+').'};}};function a190_0x5146(){const _0x29e0d6=['60rhcIqu','sqlName','\x20SQL\x20queries\x20(total:\x20','string','pagesize','216513FgjVZv','3739pwofJe','str','185016FnPHFj','Return\x20full\x20SQL\x20query\x20objects\x20including\x20parameters\x20and\x20SQL\x20content','No\x20custom\x20SQL\x20queries\x20found.','90howSxp','1058960tTYYBi','Page\x20size','name','description','14KSZYmd','3zWRKNN','Page\x20number','paging','528764QiUGhc','boolean','58GHdvKR','tableData','length','map','read','5724pCgIHM','number','list','sqlCode','num','verbose','List\x20custom\x20SQL\x20queries','totalCount','sql','page','dbId','102993NYzlWb','bool'];a190_0x5146=function(){return _0x29e0d6;};return a190_0x5146();}