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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (260) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/delete.js +1 -1
  103. package/lib/commands/menu/external-link-create.js +1 -1
  104. package/lib/commands/menu/group-create.js +1 -1
  105. package/lib/commands/menu/group-update.js +1 -1
  106. package/lib/commands/menu/index.js +1 -1
  107. package/lib/commands/menu/list.js +1 -1
  108. package/lib/commands/menu/move.js +1 -1
  109. package/lib/commands/menu/regroup-start.js +1 -1
  110. package/lib/commands/menu/shared/compare-table.js +1 -1
  111. package/lib/commands/menu/shared/delete-plan.js +1 -1
  112. package/lib/commands/menu/shared/facts.js +1 -1
  113. package/lib/commands/menu/shared/index.js +1 -1
  114. package/lib/commands/menu/shared/inquirer.js +1 -1
  115. package/lib/commands/menu/shared/local-pages.js +1 -1
  116. package/lib/commands/menu/shared/logic.js +1 -1
  117. package/lib/commands/menu/shared/mutations.js +1 -1
  118. package/lib/commands/menu/shared/service.js +1 -1
  119. package/lib/commands/menu/shared/sync-core.js +1 -1
  120. package/lib/commands/menu/shared/update-core.js +1 -1
  121. package/lib/commands/menu/shared/valid-url.js +1 -1
  122. package/lib/commands/menu/sync.js +1 -1
  123. package/lib/commands/menu/update.js +1 -1
  124. package/lib/commands/notification/config-list.js +1 -1
  125. package/lib/commands/notification/index.js +1 -1
  126. package/lib/commands/page/generate-start.js +1 -1
  127. package/lib/commands/page/generate-status.js +1 -1
  128. package/lib/commands/page/index.js +1 -1
  129. package/lib/commands/page/pull.js +1 -1
  130. package/lib/commands/page/push.js +1 -1
  131. package/lib/commands/page/relation-audit.js +1 -1
  132. package/lib/commands/page/shared.js +1 -1
  133. package/lib/commands/page/standard-page-status.js +1 -1
  134. package/lib/commands/page/sync.js +1 -1
  135. package/lib/commands/permit/index.js +1 -1
  136. package/lib/commands/permit/page-get.js +1 -1
  137. package/lib/commands/permit/page-set.js +1 -1
  138. package/lib/commands/permit/role-apis-set.js +1 -1
  139. package/lib/commands/permit/role-menus-set.js +1 -1
  140. package/lib/commands/permit/role-menus.js +1 -1
  141. package/lib/commands/permit/shared.js +1 -1
  142. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  143. package/lib/commands/project/create/format-elapsed.js +1 -1
  144. package/lib/commands/project/create/main.js +1 -1
  145. package/lib/commands/project/create/non-interactive.js +1 -1
  146. package/lib/commands/project/create/project-template-path.js +1 -1
  147. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  148. package/lib/commands/project/create/use-format-code.js +1 -1
  149. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  150. package/lib/commands/project/index.js +1 -1
  151. package/lib/commands/project/init.js +1 -1
  152. package/lib/commands/project/upgrade.js +1 -1
  153. package/lib/commands/registry.js +1 -1
  154. package/lib/commands/role/create.js +1 -1
  155. package/lib/commands/role/delete.js +1 -1
  156. package/lib/commands/role/detail.js +1 -1
  157. package/lib/commands/role/index.js +1 -1
  158. package/lib/commands/role/list.js +1 -1
  159. package/lib/commands/role/shared.js +1 -1
  160. package/lib/commands/role/update.js +1 -1
  161. package/lib/commands/role/user-add.js +1 -1
  162. package/lib/commands/role/user-remove.js +1 -1
  163. package/lib/commands/role/user-resolve.js +1 -1
  164. package/lib/commands/run/index.js +1 -1
  165. package/lib/commands/schema.js +1 -1
  166. package/lib/commands/sql/create.js +1 -1
  167. package/lib/commands/sql/delete.js +1 -1
  168. package/lib/commands/sql/detail.js +1 -1
  169. package/lib/commands/sql/exec.js +1 -1
  170. package/lib/commands/sql/index.js +1 -1
  171. package/lib/commands/sql/list.js +1 -1
  172. package/lib/commands/sql/pull.js +1 -1
  173. package/lib/commands/sql/push.js +1 -1
  174. package/lib/commands/sql/save.js +1 -1
  175. package/lib/commands/sql/shared.js +1 -1
  176. package/lib/commands/sql/status.js +1 -1
  177. package/lib/commands/sql/validate.js +1 -1
  178. package/lib/commands/task/index.js +1 -1
  179. package/lib/commands/task/status.js +1 -1
  180. package/lib/commands/workspace/add.js +1 -1
  181. package/lib/commands/workspace/index.js +1 -1
  182. package/lib/commands/workspace/remove.js +1 -1
  183. package/lib/config/schema.js +1 -1
  184. package/lib/constant/cdn.js +1 -1
  185. package/lib/constant/cli.js +1 -1
  186. package/lib/constant/defaults.js +1 -1
  187. package/lib/constant/domain.js +1 -1
  188. package/lib/constant/env.js +1 -1
  189. package/lib/constant/output.js +1 -1
  190. package/lib/constant/paths.js +1 -1
  191. package/lib/constant/risk.js +1 -1
  192. package/lib/context/app-resolver.js +1 -1
  193. package/lib/context/auth-resolver.js +1 -1
  194. package/lib/context/config-loader.js +1 -1
  195. package/lib/context.js +1 -1
  196. package/lib/core/alias-resolver.js +1 -1
  197. package/lib/core/api-client.js +1 -1
  198. package/lib/core/bff/config.js +1 -1
  199. package/lib/core/bff/file-system.js +1 -1
  200. package/lib/core/bff/hash.js +1 -1
  201. package/lib/core/bff/lock.js +1 -1
  202. package/lib/core/bff/utils.js +1 -1
  203. package/lib/core/db-resolver.js +1 -1
  204. package/lib/core/page/file-system.js +1 -1
  205. package/lib/core/page/hash.js +1 -1
  206. package/lib/core/page/lock.js +1 -1
  207. package/lib/core/sql-index-auditor.js +1 -1
  208. package/lib/core/sql-sync/config.js +1 -1
  209. package/lib/core/sql-sync/file-system.js +1 -1
  210. package/lib/core/sql-sync/hash.js +1 -1
  211. package/lib/core/sql-sync/lock.js +1 -1
  212. package/lib/core/sql-sync/utils.js +1 -1
  213. package/lib/core/sql-validator.js +1 -1
  214. package/lib/errors.js +1 -1
  215. package/lib/framework/build-all-flags.js +1 -1
  216. package/lib/framework/error-output.js +1 -1
  217. package/lib/framework/explicit-yes.js +1 -1
  218. package/lib/framework/flags.js +1 -1
  219. package/lib/framework/help.js +1 -1
  220. package/lib/framework/index.js +1 -1
  221. package/lib/framework/output.js +1 -1
  222. package/lib/framework/response.js +1 -1
  223. package/lib/framework/runner-alias.js +1 -1
  224. package/lib/framework/runner.js +1 -1
  225. package/lib/framework/schema-export.js +1 -1
  226. package/lib/framework/types.js +1 -1
  227. package/lib/generated/build-info.js +1 -1
  228. package/lib/help.js +1 -1
  229. package/lib/skills/main.js +1 -1
  230. package/lib/skills/npx-skills-add.js +1 -1
  231. package/lib/telemetry/cli-command-trace.js +1 -1
  232. package/lib/telemetry/cli-help-trace.js +1 -1
  233. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  234. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  235. package/lib/telemetry/send-cli-trace-log.js +1 -1
  236. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  237. package/lib/utils/ai_config.js +1 -1
  238. package/lib/utils/apply-jq-filter.js +1 -1
  239. package/lib/utils/cdn-config.js +1 -1
  240. package/lib/utils/check-sdk-version.js +1 -1
  241. package/lib/utils/cli-version-check.js +1 -1
  242. package/lib/utils/cli-version-policy.js +1 -1
  243. package/lib/utils/config.js +1 -1
  244. package/lib/utils/copy-directory.js +1 -1
  245. package/lib/utils/entity-with-id.js +1 -1
  246. package/lib/utils/file-utils.js +1 -1
  247. package/lib/utils/guides-cdn.js +1 -1
  248. package/lib/utils/http-client.js +1 -1
  249. package/lib/utils/is-non-interactive.js +1 -1
  250. package/lib/utils/logger.js +1 -1
  251. package/lib/utils/params.js +1 -1
  252. package/lib/utils/platform.js +1 -1
  253. package/lib/utils/rules-cdn.js +1 -1
  254. package/lib/utils/sleep.js +1 -1
  255. package/lib/utils/template-replacer.js +1 -1
  256. package/lib/utils/update-notice.js +1 -1
  257. package/lib/utils/version.js +1 -1
  258. package/lib/utils/with-active-cookie.js +1 -1
  259. package/lib/utils/write-cli-side-channel.js +1 -1
  260. package/package.json +1 -1
@@ -1 +1 @@
1
- const a155_0x447026=a155_0x169e;(function(_0x3ca521,_0x346b12){const _0x5d180a=a155_0x169e,_0xe2dfc0=_0x3ca521();while(!![]){try{const _0x3be6fd=-parseInt(_0x5d180a(0x1c6))/0x1*(parseInt(_0x5d180a(0x1c9))/0x2)+-parseInt(_0x5d180a(0x1c2))/0x3+-parseInt(_0x5d180a(0x1bb))/0x4*(-parseInt(_0x5d180a(0x1c5))/0x5)+parseInt(_0x5d180a(0x1b5))/0x6*(parseInt(_0x5d180a(0x1c1))/0x7)+parseInt(_0x5d180a(0x1bc))/0x8*(-parseInt(_0x5d180a(0x1b7))/0x9)+parseInt(_0x5d180a(0x1ca))/0xa+parseInt(_0x5d180a(0x1c3))/0xb;if(_0x3be6fd===_0x346b12)break;else _0xe2dfc0['push'](_0xe2dfc0['shift']());}catch(_0x8bdb78){_0xe2dfc0['push'](_0xe2dfc0['shift']());}}}(a155_0x3a43,0xa4263));function a155_0x169e(_0x330b27,_0x49b0b7){_0x330b27=_0x330b27-0x1b4;const _0x3a4332=a155_0x3a43();let _0x169e29=_0x3a4332[_0x330b27];return _0x169e29;}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=a155_0x447026(0x1bf);export const roleDelete={'service':'role','command':a155_0x447026(0x1be),'description':'Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','risk':a155_0x447026(0x1c0),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x46dd3e){const _0x55e1b1=a155_0x447026,_0x2f2663=_0x46dd3e['num']('id'),_0x375094=await getRoleById(_0x46dd3e[_0x55e1b1(0x1c8)],_0x2f2663);return assertCustomRole(_0x375094,_0x55e1b1(0x1be)),asDryRunResult({'operation':_0x55e1b1(0x1be),'selector':{'appCode':_0x46dd3e[_0x55e1b1(0x1c8)],'roleId':_0x2f2663,'roleName':_0x375094['roleName']},'before':projectRole(_0x375094),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x375094[_0x55e1b1(0x1b4)]>0x0?[_0x55e1b1(0x1bd)+_0x375094['userCount']+_0x55e1b1(0x1b6)]:[]},{'method':'POST','url':DELETE_PATH});},async 'execute'(_0x5d8d8f){const _0x2a04fd=a155_0x447026,_0x33c959=_0x5d8d8f[_0x2a04fd(0x1c4)]('id'),_0x22e377=await getRoleById(_0x5d8d8f[_0x2a04fd(0x1c8)],_0x33c959);return assertCustomRole(_0x22e377,_0x2a04fd(0x1be)),await deleteAppRole(_0x33c959),{'ok':!![],'data':{'operation':_0x2a04fd(0x1be),'selector':{'appCode':_0x5d8d8f[_0x2a04fd(0x1c8)],'roleId':_0x33c959,'roleName':_0x22e377[_0x2a04fd(0x1ba)]},'before':projectRole(_0x22e377),'after':null,'dryRun':![],'backend':{'method':_0x2a04fd(0x1c7),'path':DELETE_PATH},'warnings':[]},'message':_0x2a04fd(0x1b8)+_0x22e377[_0x2a04fd(0x1ba)]+_0x2a04fd(0x1b9)+_0x33c959+')'};}};function a155_0x3a43(){const _0x213e2d=['\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','2421dXRZAy','Deleted\x20role\x20','\x20(id=','roleName','57788UsXEbb','29504xBGVyh','Role\x20still\x20has\x20','delete','/smartapi/permit/role/delete','high-risk-write','2697884cqzMab','3768765HMEjlf','26172047xwaPEa','num','15vvMegJ','129msmcjo','POST','appCode','17834MRJHxO','4921210DLbrGu','userCount','18KkcuQN'];a155_0x3a43=function(){return _0x213e2d;};return a155_0x3a43();}
1
+ const a155_0x309357=a155_0x5d6e;(function(_0x49e5a6,_0x1b8eae){const _0x473210=a155_0x5d6e,_0x1079e2=_0x49e5a6();while(!![]){try{const _0x3fb1fe=-parseInt(_0x473210(0x191))/0x1*(parseInt(_0x473210(0x181))/0x2)+parseInt(_0x473210(0x195))/0x3+-parseInt(_0x473210(0x190))/0x4+parseInt(_0x473210(0x18e))/0x5*(-parseInt(_0x473210(0x18b))/0x6)+parseInt(_0x473210(0x182))/0x7+-parseInt(_0x473210(0x185))/0x8+parseInt(_0x473210(0x184))/0x9*(parseInt(_0x473210(0x197))/0xa);if(_0x3fb1fe===_0x1b8eae)break;else _0x1079e2['push'](_0x1079e2['shift']());}catch(_0x2e54be){_0x1079e2['push'](_0x1079e2['shift']());}}}(a155_0x526d,0x706ec));import{deleteAppRole}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a155_0x526d(){const _0x43911c=['Role\x20still\x20has\x20','userCount','\x20member(s);\x20they\x20will\x20lose\x20this\x20group.','3680550Tinoxw','POST','roleName','5JVgQTA','num','401272QBVEEy','3buglJN','delete','\x20(id=','Deleted\x20role\x20','357378nHrYpb','appCode','2420QvSVZt','250894JncJya','3510304mlkkhE','high-risk-write','44127tWPfUb','2052128HLdGma','Delete\x20a\x20CUSTOM\x20role\x20(DEV/ADMIN\x20rejected);\x20requires\x20--yes','/smartapi/permit/role/delete'];a155_0x526d=function(){return _0x43911c;};return a155_0x526d();}function a155_0x5d6e(_0x57691e,_0x63c5a9){_0x57691e=_0x57691e-0x181;const _0x526db3=a155_0x526d();let _0x5d6e10=_0x526db3[_0x57691e];return _0x5d6e10;}import{assertCustomRole,getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';const DELETE_PATH=a155_0x309357(0x187);export const roleDelete={'service':'role','command':a155_0x309357(0x192),'description':a155_0x309357(0x186),'risk':a155_0x309357(0x183),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x10ef92){const _0x1bae03=a155_0x309357,_0x5e077a=_0x10ef92[_0x1bae03(0x18f)]('id'),_0x444c3f=await getRoleById(_0x10ef92['appCode'],_0x5e077a);return assertCustomRole(_0x444c3f,_0x1bae03(0x192)),asDryRunResult({'operation':_0x1bae03(0x192),'selector':{'appCode':_0x10ef92['appCode'],'roleId':_0x5e077a,'roleName':_0x444c3f[_0x1bae03(0x18d)]},'before':projectRole(_0x444c3f),'after':null,'dryRun':!![],'backend':{'method':'POST','path':DELETE_PATH},'warnings':_0x444c3f[_0x1bae03(0x189)]>0x0?[_0x1bae03(0x188)+_0x444c3f[_0x1bae03(0x189)]+_0x1bae03(0x18a)]:[]},{'method':_0x1bae03(0x18c),'url':DELETE_PATH});},async 'execute'(_0x5a2b9f){const _0x2be3b8=a155_0x309357,_0x531aad=_0x5a2b9f[_0x2be3b8(0x18f)]('id'),_0x39df95=await getRoleById(_0x5a2b9f[_0x2be3b8(0x196)],_0x531aad);return assertCustomRole(_0x39df95,_0x2be3b8(0x192)),await deleteAppRole(_0x531aad),{'ok':!![],'data':{'operation':_0x2be3b8(0x192),'selector':{'appCode':_0x5a2b9f[_0x2be3b8(0x196)],'roleId':_0x531aad,'roleName':_0x39df95['roleName']},'before':projectRole(_0x39df95),'after':null,'dryRun':![],'backend':{'method':_0x2be3b8(0x18c),'path':DELETE_PATH},'warnings':[]},'message':_0x2be3b8(0x194)+_0x39df95['roleName']+_0x2be3b8(0x193)+_0x531aad+')'};}};
@@ -1 +1 @@
1
- const a156_0x5be79a=a156_0xc58b;(function(_0x5b4f2a,_0x2f31f9){const _0x13fa7b=a156_0xc58b,_0x38047f=_0x5b4f2a();while(!![]){try{const _0x17e876=parseInt(_0x13fa7b(0x8c))/0x1+-parseInt(_0x13fa7b(0x8e))/0x2+parseInt(_0x13fa7b(0x8d))/0x3+parseInt(_0x13fa7b(0x8f))/0x4+-parseInt(_0x13fa7b(0x90))/0x5*(-parseInt(_0x13fa7b(0x83))/0x6)+-parseInt(_0x13fa7b(0x86))/0x7*(-parseInt(_0x13fa7b(0x84))/0x8)+-parseInt(_0x13fa7b(0x8a))/0x9*(parseInt(_0x13fa7b(0x89))/0xa);if(_0x17e876===_0x2f31f9)break;else _0x38047f['push'](_0x38047f['shift']());}catch(_0x2c79c2){_0x38047f['push'](_0x38047f['shift']());}}}(a156_0x281e,0xd53b2));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a156_0xc58b(_0x4fe355,_0x57dd80){_0x4fe355=_0x4fe355-0x82;const _0x281ec9=a156_0x281e();let _0xc58b9c=_0x281ec9[_0x4fe355];return _0xc58b9c;}function a156_0x281e(){const _0x506145=['9cXtAOM','detail','1485563guEOtW','3083604rRlVvj','1565806lvSnhr','806332lvCNMS','50aUdLjc','read','roleName','478938bheFTZ','104Lnpzar','role','62146gvZQmP','Role\x20','Show\x20a\x20single\x20role\x27s\x20detail','19723610qIiBla'];a156_0x281e=function(){return _0x506145;};return a156_0x281e();}import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a156_0x5be79a(0x85),'command':a156_0x5be79a(0x8b),'description':a156_0x5be79a(0x88),'risk':a156_0x5be79a(0x91),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x407454){const _0x296168=a156_0x5be79a,_0x4b535a=_0x407454['num']('id'),_0x279c75=await getRoleById(_0x407454['appCode'],_0x4b535a);return{'ok':!![],'data':{'role':projectRole(_0x279c75)},'message':_0x296168(0x87)+_0x279c75[_0x296168(0x82)]+'\x20('+_0x279c75['roleType']+')'};}};
1
+ const a156_0x5a4c59=a156_0x86bb;(function(_0x4c6e1a,_0x198324){const _0x2d2ee0=a156_0x86bb,_0x543c3f=_0x4c6e1a();while(!![]){try{const _0x203c40=-parseInt(_0x2d2ee0(0x90))/0x1+-parseInt(_0x2d2ee0(0x89))/0x2+parseInt(_0x2d2ee0(0x87))/0x3*(-parseInt(_0x2d2ee0(0x8b))/0x4)+parseInt(_0x2d2ee0(0x93))/0x5*(-parseInt(_0x2d2ee0(0x8f))/0x6)+-parseInt(_0x2d2ee0(0x8c))/0x7+-parseInt(_0x2d2ee0(0x8d))/0x8*(parseInt(_0x2d2ee0(0x88))/0x9)+parseInt(_0x2d2ee0(0x8e))/0xa;if(_0x203c40===_0x198324)break;else _0x543c3f['push'](_0x543c3f['shift']());}catch(_0x559c5f){_0x543c3f['push'](_0x543c3f['shift']());}}}(a156_0x2aad,0x44f11));function a156_0x2aad(){const _0x250d07=['192AmghZg','454755QuQQzi','detail','appCode','74390GftNzi','roleType','read','Show\x20a\x20single\x20role\x27s\x20detail','role','num','1081137OtRfAw','213093ixNoWQ','565436hYcfGk','roleName','4qZACYF','1209243grKgql','144vUDQlO','24552680SBHROY'];a156_0x2aad=function(){return _0x250d07;};return a156_0x2aad();}function a156_0x86bb(_0x5466bb,_0x286584){_0x5466bb=_0x5466bb-0x86;const _0x2aadd3=a156_0x2aad();let _0x86bbd7=_0x2aadd3[_0x5466bb];return _0x86bbd7;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{getRoleById,projectRole,ROLE_ID_FLAG}from'../../commands/role/shared.js';export const roleDetail={'service':a156_0x5a4c59(0x97),'command':a156_0x5a4c59(0x91),'description':a156_0x5a4c59(0x96),'risk':a156_0x5a4c59(0x95),'flags':[ROLE_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x217478){const _0x3ce935=a156_0x5a4c59,_0x4ed48c=_0x217478[_0x3ce935(0x86)]('id'),_0x2fc4ad=await getRoleById(_0x217478[_0x3ce935(0x92)],_0x4ed48c);return{'ok':!![],'data':{'role':projectRole(_0x2fc4ad)},'message':'Role\x20'+_0x2fc4ad[_0x3ce935(0x8a)]+'\x20('+_0x2fc4ad[_0x3ce935(0x94)]+')'};}};
@@ -1 +1 @@
1
- function a157_0x1496(){const _0x149ef6=['2788auqgxv','20qRpxhW','1245902tSfKdv','304290BziQbG','941wXQwAn','42oLMqXF','8435427lZFcrs','6441550cdpvda','31615qAsvsm','3992WeYcVe','9837wghbSO'];a157_0x1496=function(){return _0x149ef6;};return a157_0x1496();}function a157_0x30a2(_0x197ef0,_0x3212c0){_0x197ef0=_0x197ef0-0x185;const _0x149671=a157_0x1496();let _0x30a267=_0x149671[_0x197ef0];return _0x30a267;}(function(_0x23be9a,_0x2dc95c){const _0x4170e1=a157_0x30a2,_0xd73d35=_0x23be9a();while(!![]){try{const _0x33859c=-parseInt(_0x4170e1(0x18f))/0x1*(parseInt(_0x4170e1(0x18b))/0x2)+parseInt(_0x4170e1(0x18e))/0x3+-parseInt(_0x4170e1(0x18c))/0x4*(parseInt(_0x4170e1(0x188))/0x5)+-parseInt(_0x4170e1(0x185))/0x6*(-parseInt(_0x4170e1(0x18d))/0x7)+-parseInt(_0x4170e1(0x189))/0x8*(-parseInt(_0x4170e1(0x18a))/0x9)+-parseInt(_0x4170e1(0x187))/0xa+parseInt(_0x4170e1(0x186))/0xb;if(_0x33859c===_0x2dc95c)break;else _0xd73d35['push'](_0xd73d35['shift']());}catch(_0x518789){_0xd73d35['push'](_0xd73d35['shift']());}}}(a157_0x1496,0xa4148));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleCreate}from'../../commands/role/create.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,roleCreate,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
1
+ (function(_0x35c5ba,_0x4cd01f){const _0x5d2a5d=a157_0x1443,_0x1b3fd8=_0x35c5ba();while(!![]){try{const _0x55215f=-parseInt(_0x5d2a5d(0x185))/0x1*(-parseInt(_0x5d2a5d(0x190))/0x2)+parseInt(_0x5d2a5d(0x18d))/0x3*(parseInt(_0x5d2a5d(0x18c))/0x4)+-parseInt(_0x5d2a5d(0x186))/0x5*(-parseInt(_0x5d2a5d(0x18b))/0x6)+-parseInt(_0x5d2a5d(0x18a))/0x7*(parseInt(_0x5d2a5d(0x183))/0x8)+-parseInt(_0x5d2a5d(0x18f))/0x9*(-parseInt(_0x5d2a5d(0x18e))/0xa)+-parseInt(_0x5d2a5d(0x187))/0xb*(parseInt(_0x5d2a5d(0x188))/0xc)+-parseInt(_0x5d2a5d(0x184))/0xd*(-parseInt(_0x5d2a5d(0x189))/0xe);if(_0x55215f===_0x4cd01f)break;else _0x1b3fd8['push'](_0x1b3fd8['shift']());}catch(_0xee6c5){_0x1b3fd8['push'](_0x1b3fd8['shift']());}}}(a157_0x5f33,0xc210c));import{roleList}from'../../commands/role/list.js';import{roleDetail}from'../../commands/role/detail.js';import{roleCreate}from'../../commands/role/create.js';function a157_0x1443(_0x3d1c07,_0x1ea734){_0x3d1c07=_0x3d1c07-0x183;const _0x5f33dd=a157_0x5f33();let _0x1443ef=_0x5f33dd[_0x3d1c07];return _0x1443ef;}function a157_0x5f33(){const _0x4dbd20=['480575loyBsb','15712708WjmAzA','12qiKDYA','1064434RZgvqx','77aAdtyc','30QLISsY','452VaFHiz','19545vHSIno','623820OrvFvo','90EGmYMF','373564Hwgjak','797512dkwdjA','221HhznmH','1CwjIut'];a157_0x5f33=function(){return _0x4dbd20;};return a157_0x5f33();}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,roleCreate,roleUpdate,roleDelete,roleUserResolve,roleUserAdd,roleUserRemove];
@@ -1 +1 @@
1
- const a158_0xd97405=a158_0x41d0;(function(_0x5aaf32,_0x37d22e){const _0x99f687=a158_0x41d0,_0x184964=_0x5aaf32();while(!![]){try{const _0x4d5e32=parseInt(_0x99f687(0x171))/0x1*(-parseInt(_0x99f687(0x152))/0x2)+-parseInt(_0x99f687(0x167))/0x3+parseInt(_0x99f687(0x170))/0x4*(-parseInt(_0x99f687(0x156))/0x5)+-parseInt(_0x99f687(0x15a))/0x6*(parseInt(_0x99f687(0x150))/0x7)+parseInt(_0x99f687(0x155))/0x8*(-parseInt(_0x99f687(0x173))/0x9)+parseInt(_0x99f687(0x16a))/0xa+parseInt(_0x99f687(0x15b))/0xb;if(_0x4d5e32===_0x37d22e)break;else _0x184964['push'](_0x184964['shift']());}catch(_0x2eed92){_0x184964['push'](_0x184964['shift']());}}}(a158_0x19d7,0x69b46));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a158_0x19d7(){const _0x354df0=['Filter\x20by\x20role\x20type','Invalid\x20--type\x20\x22','str','includes','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','join','number','validation','2534523IrgbjX','USER','pagesize','3975470UNPGeG','trim','role','appCode','type','roleType','2154108ufudUU','2dHTWKM','list','7767NzjCoa','Found\x20','map','--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.','DEV','\x20role(s)','num','7ySmtLb','Page\x20size\x20(1-100)','95286PIjPlM','Page\x20index\x20(1-based)','--pagesize\x20must\x20be\x20between\x201\x20and\x20100.','2848pgPyYX','5OcTeHD','CUSTOM','ADMIN','page','5096028zvNODO','29377029MiDBKX','toUpperCase','read','filter'];a158_0x19d7=function(){return _0x354df0;};return a158_0x19d7();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a158_0xd97405(0x158),a158_0xd97405(0x177),a158_0xd97405(0x168),a158_0xd97405(0x157)];function a158_0x41d0(_0x5dfb2b,_0x2312e9){_0x5dfb2b=_0x5dfb2b-0x14e;const _0x19d7c7=a158_0x19d7();let _0x41d0ec=_0x19d7c7[_0x5dfb2b];return _0x41d0ec;}export const roleList={'service':a158_0xd97405(0x16c),'command':a158_0xd97405(0x172),'description':a158_0xd97405(0x163),'risk':a158_0xd97405(0x15d),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a158_0xd97405(0x16e),'type':'string','required':![],'description':a158_0xd97405(0x15f),'enum':ROLE_TYPES},{'name':a158_0xd97405(0x159),'type':a158_0xd97405(0x165),'description':a158_0xd97405(0x153),'default':0x1},{'name':a158_0xd97405(0x169),'type':a158_0xd97405(0x165),'description':a158_0xd97405(0x151),'default':0x64}],async 'validate'(_0x56e96f){const _0x309fc0=a158_0xd97405,_0x4492f2=_0x56e96f[_0x309fc0(0x161)](_0x309fc0(0x16e))[_0x309fc0(0x16b)]();if(_0x4492f2&&!ROLE_TYPES[_0x309fc0(0x162)](_0x4492f2[_0x309fc0(0x15c)]()))throw CliErrors['validation'](_0x309fc0(0x160)+_0x4492f2+'\x22.','Use\x20one\x20of:\x20'+ROLE_TYPES[_0x309fc0(0x164)](',\x20')+'.');const _0x3b6272=_0x56e96f['num']('page',0x1),_0x3215b4=_0x56e96f[_0x309fc0(0x14f)](_0x309fc0(0x169),0x64);if(_0x3b6272<0x1)throw CliErrors['validation'](_0x309fc0(0x176));if(_0x3215b4<0x1||_0x3215b4>0x64)throw CliErrors[_0x309fc0(0x166)](_0x309fc0(0x154));},async 'execute'(_0xab6533){const _0x1e15b1=a158_0xd97405,_0x9abe7d=_0xab6533[_0x1e15b1(0x14f)](_0x1e15b1(0x159),0x1)||0x1,_0x5f4611=_0xab6533[_0x1e15b1(0x14f)](_0x1e15b1(0x169),0x64)||0x64,_0xa05177=_0xab6533[_0x1e15b1(0x161)](_0x1e15b1(0x16e))['trim']()[_0x1e15b1(0x15c)](),{items:_0x13c06e,paging:_0x5da0ab}=await listAppRoles(_0xab6533[_0x1e15b1(0x16d)],{'currentPage':_0x9abe7d,'pageSize':_0x5f4611}),_0x1f3123=_0xa05177?_0x13c06e[_0x1e15b1(0x15e)](_0x96ee38=>_0x96ee38[_0x1e15b1(0x16f)]===_0xa05177):_0x13c06e,_0x21259a=_0x1f3123[_0x1e15b1(0x175)](projectRole);return{'ok':!![],'data':{'roles':_0x21259a,'paging':_0x5da0ab},'message':_0x1e15b1(0x174)+_0x21259a['length']+_0x1e15b1(0x14e)};}};
1
+ const a158_0x408e01=a158_0x2011;function a158_0x2a53(){const _0x611baf=['role','List\x20user\x20groups\x20(roles)\x20for\x20the\x20current\x20app','1502872NclEDf','Found\x20','ADMIN','pagesize','validation','2515938YFMijL','1072236RcKrRb','str','6890712LPucXh','list','CUSTOM','join','Invalid\x20--type\x20\x22','string','1047650GgMwjK','7hcCXXA','3984309ZXVbls','Page\x20size\x20(1-100)','19991286hQpYeF','25XPcLAR','type','map','length','Page\x20index\x20(1-based)','num','DEV','roleType','page','USER','appCode','read','Filter\x20by\x20role\x20type','trim','toUpperCase','number','filter'];a158_0x2a53=function(){return _0x611baf;};return a158_0x2a53();}(function(_0x53cd48,_0xc90a7e){const _0x4e0025=a158_0x2011,_0x78c5af=_0x53cd48();while(!![]){try{const _0x5b3de3=-parseInt(_0x4e0025(0xea))/0x1+parseInt(_0x4e0025(0x107))/0x2+-parseInt(_0x4e0025(0xec))/0x3+-parseInt(_0x4e0025(0xe2))/0x4*(parseInt(_0x4e0025(0xef))/0x5)+parseInt(_0x4e0025(0xe4))/0x6+parseInt(_0x4e0025(0xeb))/0x7*(-parseInt(_0x4e0025(0x102))/0x8)+parseInt(_0x4e0025(0xee))/0x9;if(_0x5b3de3===_0xc90a7e)break;else _0x78c5af['push'](_0x78c5af['shift']());}catch(_0x515e79){_0x78c5af['push'](_0x78c5af['shift']());}}}(a158_0x2a53,0xb0b38));import{listAppRoles}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a158_0x2011(_0x1d84f4,_0x1fd3dc){_0x1d84f4=_0x1d84f4-0xe2;const _0x2a53be=a158_0x2a53();let _0x201199=_0x2a53be[_0x1d84f4];return _0x201199;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{projectRole}from'../../commands/role/shared.js';const ROLE_TYPES=[a158_0x408e01(0x104),a158_0x408e01(0xf5),a158_0x408e01(0xf8),a158_0x408e01(0xe6)];export const roleList={'service':a158_0x408e01(0x100),'command':a158_0x408e01(0xe5),'description':a158_0x408e01(0x101),'risk':a158_0x408e01(0xfa),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a158_0x408e01(0xf0),'type':a158_0x408e01(0xe9),'required':![],'description':a158_0x408e01(0xfb),'enum':ROLE_TYPES},{'name':'page','type':a158_0x408e01(0xfe),'description':a158_0x408e01(0xf3),'default':0x1},{'name':'pagesize','type':a158_0x408e01(0xfe),'description':a158_0x408e01(0xed),'default':0x64}],async 'validate'(_0x26b791){const _0x3aff76=a158_0x408e01,_0xc5a291=_0x26b791['str']('type')[_0x3aff76(0xfc)]();if(_0xc5a291&&!ROLE_TYPES['includes'](_0xc5a291[_0x3aff76(0xfd)]()))throw CliErrors['validation'](_0x3aff76(0xe8)+_0xc5a291+'\x22.','Use\x20one\x20of:\x20'+ROLE_TYPES[_0x3aff76(0xe7)](',\x20')+'.');const _0x2394e5=_0x26b791[_0x3aff76(0xf4)]('page',0x1),_0x255477=_0x26b791[_0x3aff76(0xf4)](_0x3aff76(0x105),0x64);if(_0x2394e5<0x1)throw CliErrors['validation']('--page\x20must\x20be\x20greater\x20than\x20or\x20equal\x20to\x201.');if(_0x255477<0x1||_0x255477>0x64)throw CliErrors[_0x3aff76(0x106)]('--pagesize\x20must\x20be\x20between\x201\x20and\x20100.');},async 'execute'(_0x161243){const _0x487798=a158_0x408e01,_0x15b295=_0x161243[_0x487798(0xf4)](_0x487798(0xf7),0x1)||0x1,_0x9fbd60=_0x161243[_0x487798(0xf4)]('pagesize',0x64)||0x64,_0x421be=_0x161243[_0x487798(0xe3)](_0x487798(0xf0))['trim']()[_0x487798(0xfd)](),{items:_0x137a1c,paging:_0x2974c9}=await listAppRoles(_0x161243[_0x487798(0xf9)],{'currentPage':_0x15b295,'pageSize':_0x9fbd60}),_0x390db1=_0x421be?_0x137a1c[_0x487798(0xff)](_0x55498c=>_0x55498c[_0x487798(0xf6)]===_0x421be):_0x137a1c,_0x383f91=_0x390db1[_0x487798(0xf1)](projectRole);return{'ok':!![],'data':{'roles':_0x383f91,'paging':_0x2974c9},'message':_0x487798(0x103)+_0x383f91[_0x487798(0xf2)]+'\x20role(s)'};}};
@@ -1 +1 @@
1
- const a159_0x117748=a159_0xa3f7;(function(_0x4a79fe,_0xe6872b){const _0x28bbc4=a159_0xa3f7,_0x130f36=_0x4a79fe();while(!![]){try{const _0x5aa06c=-parseInt(_0x28bbc4(0x91))/0x1*(-parseInt(_0x28bbc4(0xa6))/0x2)+parseInt(_0x28bbc4(0x8d))/0x3*(parseInt(_0x28bbc4(0xbb))/0x4)+-parseInt(_0x28bbc4(0x90))/0x5+-parseInt(_0x28bbc4(0x80))/0x6*(-parseInt(_0x28bbc4(0xbf))/0x7)+parseInt(_0x28bbc4(0x9c))/0x8+-parseInt(_0x28bbc4(0x9b))/0x9*(-parseInt(_0x28bbc4(0x84))/0xa)+-parseInt(_0x28bbc4(0x96))/0xb;if(_0x5aa06c===_0xe6872b)break;else _0x130f36['push'](_0x130f36['shift']());}catch(_0x53e464){_0x130f36['push'](_0x130f36['shift']());}}}(a159_0xa201,0xbeb65));import{getAppRole,getTenantMembers,listAppRoles,listRoleUsers}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`)'};function a159_0xa3f7(_0x1ef433,_0x230a01){_0x1ef433=_0x1ef433-0x80;const _0xa201d2=a159_0xa201();let _0xa3f71b=_0xa201d2[_0x1ef433];return _0xa3f71b;}export const ROLE_REF_FLAG={'name':a159_0x117748(0xb5),'type':a159_0x117748(0xa5),'required':!![],'description':'Role\x20id\x20or\x20role\x20name\x20(CUSTOM\x20roles\x20may\x20be\x20referenced\x20by\x20name)'};export const USER_REF_FLAG={'name':'user','type':a159_0x117748(0xa5),'required':!![],'description':a159_0x117748(0x87)};export const NAME_FLAG={'name':a159_0x117748(0xb2),'type':'string','required':!![],'description':a159_0x117748(0x81)};export const USER_NAME_FLAG={'name':'name','type':a159_0x117748(0xa5),'required':!![],'description':a159_0x117748(0xa4)};export const REMARK_FLAG={'name':'remark','type':a159_0x117748(0xa5),'required':![],'description':a159_0x117748(0xa9)};export const EXPECT_USER_COUNT_FLAG={'name':a159_0x117748(0x9f),'type':a159_0x117748(0x9e),'required':![],'description':a159_0x117748(0xc9)};export const BUILTIN_ROLE_TYPES=[a159_0x117748(0x8a),'DEV','USER'];function a159_0xa201(){const _0x3896c2=['username','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','Disambiguate\x20with\x20--role\x20<id>.','includes','push',';\x20no\x20change.','nickname','No\x20tenant\x20member\x20matches\x20\x22','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','splice','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','\x20member(s)\x20but\x20role\x20has\x20','Role\x20name\x20\x22','trim','userList','roleType','test','8907174myxCQu','Role\x20name','tenant','\x20not\x20found\x20in\x20app\x20','619270KlAKLy','expectUserCount','CUSTOM','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','Anti-drift\x20check\x20failed:\x20expected\x20','User\x20','ADMIN','flagMissing','/smartapi/permit/user-role/update-user-list','267xlxuWL','str','Cannot\x20','3013280TLPajA','733297StPlez','Multiple\x20tenant\x20members\x20match\x20\x22','filter','dryRun','appCode','52571596CbYFap','\x20built-in\x20role\x20','user-add','flag','roleName','135PPrhMS','8071176tbCMMN','\x22:\x20','number','expect-user-count','\x22\x20is\x20ambiguous\x20(ids:\x20','map','Missing\x20role\x20reference.','DEV','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','string','4FomHBR','userId','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','Optional\x20role\x20remark/description','\x20is\x20already\x20a\x20member\x20of\x20role\x20','userCount','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','Pass\x20--role\x20<id|name>.','findIndex','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','toLowerCase','Pass\x20--user\x20<id|name>.','name','validation','length','role','Disambiguate\x20with\x20--user\x20<id>.','\x20not\x20found\x20in\x20the\x20user-role\x20list.','Role\x20id\x20','Missing\x20user\x20reference.','POST','57264nGXHmU','join','user','find','7zOxlDO','authRequired'];a159_0xa201=function(){return _0x3896c2;};return a159_0xa201();}export function isBuiltinRole(_0xf4f569){return BUILTIN_ROLE_TYPES['includes'](_0xf4f569);}export function assertCustomRole(_0x438ab1,_0x255577){const _0x1a6838=a159_0x117748;if(_0x438ab1['roleType']!==_0x1a6838(0x86))throw CliErrors[_0x1a6838(0xb3)](_0x1a6838(0x8f)+_0x255577+_0x1a6838(0x97)+_0x438ab1[_0x1a6838(0x9a)]+'\x20('+_0x438ab1[_0x1a6838(0xd0)]+').',_0x1a6838(0xc2));}export function assertPermConfigurable(_0x124895){const _0x4a8d4b=a159_0x117748;if(_0x124895[_0x4a8d4b(0xd0)]===_0x4a8d4b(0xa3)||_0x124895['roleType']==='ADMIN')throw CliErrors[_0x4a8d4b(0xb3)]('Cannot\x20change\x20the\x20permission\x20matrix\x20of\x20built-in\x20role\x20'+_0x124895[_0x4a8d4b(0x9a)]+'\x20('+_0x124895[_0x4a8d4b(0xd0)]+').','DEV\x20/\x20ADMIN\x20keep\x20full\x20access\x20by\x20design;\x20configure\x20a\x20CUSTOM\x20role\x20instead.');}export function projectRole(_0x508ac8){const _0x5a7e86=a159_0x117748;return{'id':_0x508ac8['id'],'roleName':_0x508ac8[_0x5a7e86(0x9a)],'roleType':_0x508ac8['roleType'],'remark':_0x508ac8['remark'],'userCount':_0x508ac8[_0x5a7e86(0xab)],'permitCount':_0x508ac8['permitCount'],'builtin':isBuiltinRole(_0x508ac8[_0x5a7e86(0xd0)])};}export async function resolveRoleRef(_0x4976e8,_0x966cc2){const _0x11d436=a159_0x117748,_0x17f4c8=_0x966cc2[_0x11d436(0xce)]();if(!_0x17f4c8)throw CliErrors[_0x11d436(0xb3)](_0x11d436(0xa2),'Pass\x20--role\x20<id|name>.');if(/^\d+$/[_0x11d436(0xd1)](_0x17f4c8))return getRoleById(_0x4976e8,Number(_0x17f4c8));const _0x5ebe20=await listAllAppRoles(_0x4976e8),_0x223818=_0x5ebe20[_0x11d436(0x93)](_0x2411ab=>_0x2411ab[_0x11d436(0x9a)]===_0x17f4c8);if(_0x223818[_0x11d436(0xb4)]===0x0)throw CliErrors[_0x11d436(0xb3)](_0x11d436(0xcd)+_0x17f4c8+'\x22\x20not\x20found\x20in\x20app\x20'+_0x4976e8+'.',_0x11d436(0xaf));if(_0x223818[_0x11d436(0xb4)]>0x1){const _0x400249=_0x223818['map'](_0x26e64f=>_0x26e64f['id'])[_0x11d436(0xbc)](',\x20');throw CliErrors[_0x11d436(0xb3)](_0x11d436(0xcd)+_0x17f4c8+_0x11d436(0xa0)+_0x400249+').',_0x11d436(0xc3));}return _0x223818[0x0];}export async function getRoleById(_0x53da63,_0x2e4a03){const _0xc28b55=a159_0x117748,_0x215c4b=await getAppRole(_0x2e4a03);if(!_0x215c4b)throw CliErrors['validation'](_0xc28b55(0xb8)+_0x2e4a03+_0xc28b55(0x83)+_0x53da63+'.',_0xc28b55(0xa8));return _0x215c4b;}async function listAllAppRoles(_0x5b0886){const _0x3bb9d6=a159_0x117748,_0x5339ab=0x64,_0x5ca574=[];for(let _0x77319c=0x1;;_0x77319c+=0x1){const {items:_0xe0fc4f,paging:_0x416144}=await listAppRoles(_0x5b0886,{'currentPage':_0x77319c,'pageSize':_0x5339ab});_0x5ca574[_0x3bb9d6(0xc5)](..._0xe0fc4f);if(_0xe0fc4f[_0x3bb9d6(0xb4)]<_0x5339ab||_0x416144&&_0x5ca574[_0x3bb9d6(0xb4)]>=_0x416144['totalCount'])return _0x5ca574;}}export async function resolveTenantCode(){const _0x4d6762=a159_0x117748,_0x58dd37=await getSessionUserInfo(),_0x343917=_0x58dd37?.['user']?.[_0x4d6762(0x82)]?.['tenant_code'];if(!_0x343917)throw CliErrors[_0x4d6762(0xc0)](_0x4d6762(0xac));return _0x343917;}function matchMember(_0x363e97,_0x509b41){const _0x116afe=a159_0x117748,_0x94ebe1=_0x509b41['trim']()[_0x116afe(0xb0)]();return(_0x363e97['nickname']??'')[_0x116afe(0xb0)]()===_0x94ebe1||(_0x363e97[_0x116afe(0xc1)]??'')[_0x116afe(0xb0)]()===_0x94ebe1;}export async function resolveUserRef(_0x4b3563){const _0x462904=a159_0x117748,_0xdc658b=_0x4b3563[_0x462904(0xce)]();if(!_0xdc658b)throw CliErrors[_0x462904(0xb3)](_0x462904(0xb9),_0x462904(0xb1));const _0x4fb61d=await resolveTenantCode(),_0x34265a=await getTenantMembers(_0x4fb61d);if(/^\d+$/[_0x462904(0xd1)](_0xdc658b)){const _0x5c68ba=Number(_0xdc658b),_0x28f8b5=_0x34265a[_0x462904(0xbe)](_0x1f68c7=>_0x1f68c7[_0x462904(0xa7)]===_0x5c68ba);return{'userId':_0x5c68ba,'username':_0x28f8b5?.[_0x462904(0xc1)]??String(_0x5c68ba),'nickname':_0x28f8b5?.['nickname'],'matchedBy':'id'};}const _0x182bec=_0x34265a[_0x462904(0x93)](_0x25deaf=>matchMember(_0x25deaf,_0xdc658b));if(_0x182bec[_0x462904(0xb4)]===0x0)throw CliErrors[_0x462904(0xb3)](_0x462904(0xc8)+_0xdc658b+'\x22.','Check\x20the\x20nickname/username,\x20or\x20pass\x20--user\x20<id>.');if(_0x182bec[_0x462904(0xb4)]>0x1){const _0x146454=_0x182bec[_0x462904(0xa1)](_0x31a436=>(_0x31a436['nickname']??_0x31a436[_0x462904(0xc1)]??'?')+'('+_0x31a436['userId']+')')[_0x462904(0xbc)](',\x20');throw CliErrors[_0x462904(0xb3)](_0x462904(0x92)+_0xdc658b+_0x462904(0x9d)+_0x146454+'.',_0x462904(0xb6));}const _0x12462e=_0x182bec[0x0];return{'userId':_0x12462e[_0x462904(0xa7)],'username':_0x12462e['username']??String(_0x12462e[_0x462904(0xa7)]),'nickname':_0x12462e[_0x462904(0xc7)],'matchedBy':_0x462904(0xb2)};}export const UPDATE_USER_LIST_PATH=a159_0x117748(0x8c);function userIdsOf(_0x5e4c94){const _0x1ffa42=a159_0x117748;return(_0x5e4c94?.[_0x1ffa42(0xcf)]??[])[_0x1ffa42(0xa1)](_0x283297=>_0x283297[_0x1ffa42(0xa7)]);}export function computeRoleUserMutation(_0x3b5dac){const _0x5a9ed3=a159_0x117748,{operation:_0x5d2359,appCode:_0x1b98e7,roleUsers:_0x4cf3e8,targetRoleId:_0x2b1236,user:_0x1deed8}=_0x3b5dac,_0x287abb=_0x4cf3e8[_0x5a9ed3(0xbe)](_0x1954a6=>_0x1954a6['id']===_0x2b1236);if(!_0x287abb)throw CliErrors[_0x5a9ed3(0xb3)](_0x5a9ed3(0xb8)+_0x2b1236+_0x5a9ed3(0xb7),_0x5a9ed3(0xa8));const _0x1a0f75=userIdsOf(_0x287abb),_0x2378a5=[];if(_0x3b5dac[_0x5a9ed3(0x85)]!==undefined&&_0x3b5dac['expectUserCount']!==_0x1a0f75['length'])throw CliErrors['validation'](_0x5a9ed3(0x88)+_0x3b5dac[_0x5a9ed3(0x85)]+_0x5a9ed3(0xcc)+_0x1a0f75[_0x5a9ed3(0xb4)]+'.',_0x5a9ed3(0xcb));const _0x416d66=_0x1a0f75[_0x5a9ed3(0xc4)](_0x1deed8[_0x5a9ed3(0xa7)]);let _0x94150=![];const _0xec7841=[..._0x287abb[_0x5a9ed3(0xcf)]];if(_0x5d2359===_0x5a9ed3(0x98))_0x416d66?_0x2378a5[_0x5a9ed3(0xc5)]('User\x20'+_0x1deed8[_0x5a9ed3(0xa7)]+_0x5a9ed3(0xaa)+_0x287abb[_0x5a9ed3(0x9a)]+';\x20no\x20change.'):(_0xec7841[_0x5a9ed3(0xc5)]({'userId':_0x1deed8[_0x5a9ed3(0xa7)],'username':_0x1deed8[_0x5a9ed3(0xc1)],..._0x1deed8[_0x5a9ed3(0xc7)]?{'nickname':_0x1deed8[_0x5a9ed3(0xc7)]}:{}}),_0x94150=!![]);else{if(!_0x416d66)_0x2378a5[_0x5a9ed3(0xc5)](_0x5a9ed3(0x89)+_0x1deed8[_0x5a9ed3(0xa7)]+'\x20is\x20not\x20a\x20member\x20of\x20role\x20'+_0x287abb[_0x5a9ed3(0x9a)]+_0x5a9ed3(0xc6));else{const _0x2fb23c=_0xec7841[_0x5a9ed3(0xae)](_0x44fa55=>_0x44fa55[_0x5a9ed3(0xa7)]===_0x1deed8['userId']);if(_0x2fb23c>=0x0)_0xec7841[_0x5a9ed3(0xca)](_0x2fb23c,0x1);_0x94150=!![];}}const _0x443d65=_0x4cf3e8[_0x5a9ed3(0xa1)](_0x4bd8d6=>_0x4bd8d6['id']===_0x2b1236?{..._0x4bd8d6,'userList':_0xec7841}:_0x4bd8d6),_0x2592da=_0xec7841[_0x5a9ed3(0xa1)](_0x4c27cf=>_0x4c27cf['userId']),_0xb27b4b={'operation':_0x5d2359,'selector':{'appCode':_0x1b98e7,'roleId':_0x2b1236,'roleName':_0x287abb['roleName'],'userId':_0x1deed8[_0x5a9ed3(0xa7)]},'before':{'userIds':_0x1a0f75},'after':{'userIds':_0x2592da},'dryRun':_0x3b5dac[_0x5a9ed3(0x94)],'backend':{'method':_0x5a9ed3(0xba),'path':UPDATE_USER_LIST_PATH},'warnings':_0x2378a5};return{'roleList':_0x443d65,'mutation':_0xb27b4b,'changed':_0x94150};}export async function loadRoleUsers(_0x85d9b9){return listRoleUsers(_0x85d9b9);}export function readRoleRef(_0x4d272b){const _0x5e64e4=a159_0x117748,_0x3feadb=_0x4d272b[_0x5e64e4(0x8e)](_0x5e64e4(0xb5))[_0x5e64e4(0xce)]();if(!_0x3feadb)throw CliErrors['flagMissing'](_0x5e64e4(0xb5),_0x5e64e4(0xad));return _0x3feadb;}export async function prepareUserMutation(_0xa83f04,_0x25acd8,_0x48f1f8){const _0x26f33b=a159_0x117748,_0x4c60d9=readRoleRef(_0xa83f04),_0x2ce28d=_0xa83f04[_0x26f33b(0x8e)](_0x26f33b(0xbd))[_0x26f33b(0xce)]();if(!_0x2ce28d)throw CliErrors[_0x26f33b(0x8b)](_0x26f33b(0xbd),_0x26f33b(0xb1));const _0x55fba6=_0xa83f04[_0x26f33b(0x99)](_0x26f33b(0x9f)),_0x3b6588=_0x55fba6===undefined||_0x55fba6===null?undefined:Number(_0x55fba6),_0x44ab47=await resolveRoleRef(_0xa83f04[_0x26f33b(0x95)],_0x4c60d9),_0x67c442=await resolveUserRef(_0x2ce28d),_0x39a63f=await loadRoleUsers(_0xa83f04['appCode']);return computeRoleUserMutation({'operation':_0x25acd8,'appCode':_0xa83f04[_0x26f33b(0x95)],'roleUsers':_0x39a63f,'targetRoleId':_0x44ab47['id'],'user':{'userId':_0x67c442[_0x26f33b(0xa7)],'username':_0x67c442[_0x26f33b(0xc1)],'nickname':_0x67c442[_0x26f33b(0xc7)]},'dryRun':_0x48f1f8,..._0x3b6588!==undefined?{'expectUserCount':_0x3b6588}:{}});}
1
+ const a159_0x2b9f00=a159_0x2b7c;(function(_0x22c7e2,_0x7efe7a){const _0x597fa2=a159_0x2b7c,_0x44ede2=_0x22c7e2();while(!![]){try{const _0x4d9881=parseInt(_0x597fa2(0x1f2))/0x1*(parseInt(_0x597fa2(0x1ed))/0x2)+parseInt(_0x597fa2(0x1f8))/0x3+-parseInt(_0x597fa2(0x1ce))/0x4*(parseInt(_0x597fa2(0x1cb))/0x5)+-parseInt(_0x597fa2(0x1ea))/0x6+-parseInt(_0x597fa2(0x1d2))/0x7*(-parseInt(_0x597fa2(0x1fd))/0x8)+parseInt(_0x597fa2(0x1ff))/0x9+parseInt(_0x597fa2(0x1d7))/0xa*(-parseInt(_0x597fa2(0x1b4))/0xb);if(_0x4d9881===_0x7efe7a)break;else _0x44ede2['push'](_0x44ede2['shift']());}catch(_0x16a898){_0x44ede2['push'](_0x44ede2['shift']());}}}(a159_0x3f4a,0x840aa));import{getAppRole,getTenantMembers,listAppRoles,listRoleUsers}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':a159_0x2b9f00(0x1ee),'required':!![],'description':'Role\x20id\x20(from\x20`role\x20list`)'};export const ROLE_REF_FLAG={'name':a159_0x2b9f00(0x1d1),'type':a159_0x2b9f00(0x1eb),'required':!![],'description':a159_0x2b9f00(0x1ca)};export const USER_REF_FLAG={'name':'user','type':'string','required':!![],'description':a159_0x2b9f00(0x1b1)};export const NAME_FLAG={'name':'name','type':'string','required':!![],'description':a159_0x2b9f00(0x1cc)};export const USER_NAME_FLAG={'name':a159_0x2b9f00(0x1b6),'type':a159_0x2b9f00(0x1eb),'required':!![],'description':a159_0x2b9f00(0x202)};export const REMARK_FLAG={'name':'remark','type':'string','required':![],'description':a159_0x2b9f00(0x1e8)};export const EXPECT_USER_COUNT_FLAG={'name':a159_0x2b9f00(0x1b5),'type':a159_0x2b9f00(0x1ee),'required':![],'description':a159_0x2b9f00(0x1cf)};export const BUILTIN_ROLE_TYPES=[a159_0x2b9f00(0x1f5),a159_0x2b9f00(0x1e9),a159_0x2b9f00(0x1ef)];export function isBuiltinRole(_0x5dbb2c){const _0x406fe1=a159_0x2b9f00;return BUILTIN_ROLE_TYPES[_0x406fe1(0x1f4)](_0x5dbb2c);}export function assertCustomRole(_0x33328f,_0x2a8a84){const _0x252dbc=a159_0x2b9f00;if(_0x33328f[_0x252dbc(0x1d8)]!=='CUSTOM')throw CliErrors[_0x252dbc(0x1c8)](_0x252dbc(0x1f1)+_0x2a8a84+'\x20built-in\x20role\x20'+_0x33328f[_0x252dbc(0x1d0)]+'\x20('+_0x33328f[_0x252dbc(0x1d8)]+').',_0x252dbc(0x201));}export function assertPermConfigurable(_0x4cf64b){const _0x511ec9=a159_0x2b9f00;if(_0x4cf64b[_0x511ec9(0x1d8)]===_0x511ec9(0x1e9)||_0x4cf64b[_0x511ec9(0x1d8)]==='ADMIN')throw CliErrors[_0x511ec9(0x1c8)](_0x511ec9(0x1c0)+_0x4cf64b[_0x511ec9(0x1d0)]+'\x20('+_0x4cf64b[_0x511ec9(0x1d8)]+').',_0x511ec9(0x1fa));}export function projectRole(_0x24196b){const _0x3495c6=a159_0x2b9f00;return{'id':_0x24196b['id'],'roleName':_0x24196b[_0x3495c6(0x1d0)],'roleType':_0x24196b['roleType'],'remark':_0x24196b[_0x3495c6(0x1c6)],'userCount':_0x24196b[_0x3495c6(0x1e0)],'permitCount':_0x24196b['permitCount'],'builtin':isBuiltinRole(_0x24196b[_0x3495c6(0x1d8)])};}export async function resolveRoleRef(_0x3febdb,_0x127fb8){const _0x2c1483=a159_0x2b9f00,_0x2ae97b=_0x127fb8[_0x2c1483(0x200)]();if(!_0x2ae97b)throw CliErrors[_0x2c1483(0x1c8)](_0x2c1483(0x1f6),'Pass\x20--role\x20<id|name>.');if(/^\d+$/[_0x2c1483(0x1bc)](_0x2ae97b))return getRoleById(_0x3febdb,Number(_0x2ae97b));const _0xd9ddd5=await listAllAppRoles(_0x3febdb),_0x846fd5=_0xd9ddd5[_0x2c1483(0x1da)](_0x1dfaf9=>_0x1dfaf9[_0x2c1483(0x1d0)]===_0x2ae97b);if(_0x846fd5['length']===0x0)throw CliErrors[_0x2c1483(0x1c8)](_0x2c1483(0x1c9)+_0x2ae97b+_0x2c1483(0x1d3)+_0x3febdb+'.',_0x2c1483(0x1c2));if(_0x846fd5[_0x2c1483(0x1dc)]>0x1){const _0x1d0eff=_0x846fd5['map'](_0x1daa14=>_0x1daa14['id'])[_0x2c1483(0x1e7)](',\x20');throw CliErrors[_0x2c1483(0x1c8)](_0x2c1483(0x1c9)+_0x2ae97b+_0x2c1483(0x1b2)+_0x1d0eff+').',_0x2c1483(0x1b8));}return _0x846fd5[0x0];}export async function getRoleById(_0x30d157,_0x47410d){const _0x47b232=a159_0x2b9f00,_0x69e615=await getAppRole(_0x47410d);if(!_0x69e615)throw CliErrors[_0x47b232(0x1c8)]('Role\x20id\x20'+_0x47410d+_0x47b232(0x1d5)+_0x30d157+'.',_0x47b232(0x1bd));return _0x69e615;}function a159_0x2b7c(_0x38a45c,_0x1d6288){_0x38a45c=_0x38a45c-0x1b0;const _0x3f4a04=a159_0x3f4a();let _0x2b7c97=_0x3f4a04[_0x38a45c];return _0x2b7c97;}async function listAllAppRoles(_0xc13232){const _0x1dd2d2=a159_0x2b9f00,_0x567a00=0x64,_0x1160d8=[];for(let _0x49bdec=0x1;;_0x49bdec+=0x1){const {items:_0x4daa6b,paging:_0xc7cfab}=await listAppRoles(_0xc13232,{'currentPage':_0x49bdec,'pageSize':_0x567a00});_0x1160d8[_0x1dd2d2(0x1e3)](..._0x4daa6b);if(_0x4daa6b[_0x1dd2d2(0x1dc)]<_0x567a00||_0xc7cfab&&_0x1160d8['length']>=_0xc7cfab[_0x1dd2d2(0x1fb)])return _0x1160d8;}}export async function resolveTenantCode(){const _0x308a2b=a159_0x2b9f00,_0x21f8a8=await getSessionUserInfo(),_0x538416=_0x21f8a8?.['user']?.[_0x308a2b(0x205)]?.[_0x308a2b(0x1e5)];if(!_0x538416)throw CliErrors['authRequired'](_0x308a2b(0x1c5));return _0x538416;}function matchMember(_0x1217d8,_0x37da8d){const _0x49dd61=a159_0x2b9f00,_0x257bf2=_0x37da8d[_0x49dd61(0x200)]()[_0x49dd61(0x1c1)]();return(_0x1217d8[_0x49dd61(0x1cd)]??'')[_0x49dd61(0x1c1)]()===_0x257bf2||(_0x1217d8[_0x49dd61(0x1f9)]??'')[_0x49dd61(0x1c1)]()===_0x257bf2;}export async function resolveUserRef(_0x2dfc6){const _0x1c627b=a159_0x2b9f00,_0x670be3=_0x2dfc6[_0x1c627b(0x200)]();if(!_0x670be3)throw CliErrors[_0x1c627b(0x1c8)](_0x1c627b(0x1fc),_0x1c627b(0x1b7));const _0x21cfe6=await resolveTenantCode(),_0x5b775c=await getTenantMembers(_0x21cfe6);if(/^\d+$/['test'](_0x670be3)){const _0x437e24=Number(_0x670be3),_0x3de7ca=_0x5b775c[_0x1c627b(0x203)](_0xc38d61=>_0xc38d61['userId']===_0x437e24);return{'userId':_0x437e24,'username':_0x3de7ca?.[_0x1c627b(0x1f9)]??String(_0x437e24),'nickname':_0x3de7ca?.['nickname'],'matchedBy':'id'};}const _0x1fa87f=_0x5b775c[_0x1c627b(0x1da)](_0x19c5f8=>matchMember(_0x19c5f8,_0x670be3));if(_0x1fa87f[_0x1c627b(0x1dc)]===0x0)throw CliErrors['validation'](_0x1c627b(0x1c7)+_0x670be3+'\x22.',_0x1c627b(0x1d6));if(_0x1fa87f[_0x1c627b(0x1dc)]>0x1){const _0x3ac3dc=_0x1fa87f['map'](_0x2f48df=>(_0x2f48df['nickname']??_0x2f48df[_0x1c627b(0x1f9)]??'?')+'('+_0x2f48df[_0x1c627b(0x1c3)]+')')[_0x1c627b(0x1e7)](',\x20');throw CliErrors[_0x1c627b(0x1c8)](_0x1c627b(0x1d9)+_0x670be3+_0x1c627b(0x1bf)+_0x3ac3dc+'.',_0x1c627b(0x1b3));}const _0x517c28=_0x1fa87f[0x0];return{'userId':_0x517c28['userId'],'username':_0x517c28['username']??String(_0x517c28['userId']),'nickname':_0x517c28[_0x1c627b(0x1cd)],'matchedBy':_0x1c627b(0x1b6)};}export const UPDATE_USER_LIST_PATH=a159_0x2b9f00(0x1db);function userIdsOf(_0x8f722a){const _0x1dd6e4=a159_0x2b9f00;return(_0x8f722a?.[_0x1dd6e4(0x1e2)]??[])[_0x1dd6e4(0x1fe)](_0x14a666=>_0x14a666[_0x1dd6e4(0x1c3)]);}export function computeRoleUserMutation(_0x3401e4){const _0x3943ce=a159_0x2b9f00,{operation:_0x3b5cc2,appCode:_0x551cc3,roleUsers:_0x5243ac,targetRoleId:_0x34d98e,user:_0x57ceea}=_0x3401e4,_0x434cac=_0x5243ac[_0x3943ce(0x203)](_0x119c41=>_0x119c41['id']===_0x34d98e);if(!_0x434cac)throw CliErrors[_0x3943ce(0x1c8)](_0x3943ce(0x204)+_0x34d98e+_0x3943ce(0x1b9),_0x3943ce(0x1bd));const _0x332280=userIdsOf(_0x434cac),_0x5b7ca8=[];if(_0x3401e4[_0x3943ce(0x1de)]!==undefined&&_0x3401e4[_0x3943ce(0x1de)]!==_0x332280[_0x3943ce(0x1dc)])throw CliErrors[_0x3943ce(0x1c8)]('Anti-drift\x20check\x20failed:\x20expected\x20'+_0x3401e4[_0x3943ce(0x1de)]+_0x3943ce(0x1d4)+_0x332280[_0x3943ce(0x1dc)]+'.',_0x3943ce(0x1b0));const _0x5b0b93=_0x332280[_0x3943ce(0x1f4)](_0x57ceea[_0x3943ce(0x1c3)]);let _0x250fbd=![];const _0x2ecfa6=[..._0x434cac[_0x3943ce(0x1e2)]];if(_0x3b5cc2===_0x3943ce(0x1e1))_0x5b0b93?_0x5b7ca8[_0x3943ce(0x1e3)](_0x3943ce(0x1f0)+_0x57ceea[_0x3943ce(0x1c3)]+_0x3943ce(0x1ec)+_0x434cac['roleName']+_0x3943ce(0x1f7)):(_0x2ecfa6[_0x3943ce(0x1e3)]({'userId':_0x57ceea[_0x3943ce(0x1c3)],'username':_0x57ceea[_0x3943ce(0x1f9)],..._0x57ceea[_0x3943ce(0x1cd)]?{'nickname':_0x57ceea[_0x3943ce(0x1cd)]}:{}}),_0x250fbd=!![]);else{if(!_0x5b0b93)_0x5b7ca8['push'](_0x3943ce(0x1f0)+_0x57ceea[_0x3943ce(0x1c3)]+_0x3943ce(0x1df)+_0x434cac[_0x3943ce(0x1d0)]+';\x20no\x20change.');else{const _0x1fcda9=_0x2ecfa6[_0x3943ce(0x1bb)](_0x15c812=>_0x15c812[_0x3943ce(0x1c3)]===_0x57ceea['userId']);if(_0x1fcda9>=0x0)_0x2ecfa6[_0x3943ce(0x1dd)](_0x1fcda9,0x1);_0x250fbd=!![];}}const _0x4ae16a=_0x5243ac[_0x3943ce(0x1fe)](_0x559a29=>_0x559a29['id']===_0x34d98e?{..._0x559a29,'userList':_0x2ecfa6}:_0x559a29),_0x58b2db=_0x2ecfa6['map'](_0x5e1335=>_0x5e1335['userId']),_0x2787d5={'operation':_0x3b5cc2,'selector':{'appCode':_0x551cc3,'roleId':_0x34d98e,'roleName':_0x434cac[_0x3943ce(0x1d0)],'userId':_0x57ceea[_0x3943ce(0x1c3)]},'before':{'userIds':_0x332280},'after':{'userIds':_0x58b2db},'dryRun':_0x3401e4[_0x3943ce(0x1c4)],'backend':{'method':_0x3943ce(0x1e4),'path':UPDATE_USER_LIST_PATH},'warnings':_0x5b7ca8};return{'roleList':_0x4ae16a,'mutation':_0x2787d5,'changed':_0x250fbd};}export async function loadRoleUsers(_0x50e3a3){return listRoleUsers(_0x50e3a3);}export function readRoleRef(_0x3f40b5){const _0x26b612=a159_0x2b9f00,_0x2714=_0x3f40b5['str'](_0x26b612(0x1d1))[_0x26b612(0x200)]();if(!_0x2714)throw CliErrors[_0x26b612(0x1e6)](_0x26b612(0x1d1),'Pass\x20--role\x20<id|name>.');return _0x2714;}export async function prepareUserMutation(_0x155845,_0x14d805,_0x5b3166){const _0x5b3a2c=a159_0x2b9f00,_0x36f149=readRoleRef(_0x155845),_0x77a4bf=_0x155845['str']('user')[_0x5b3a2c(0x200)]();if(!_0x77a4bf)throw CliErrors['flagMissing'](_0x5b3a2c(0x1ba),_0x5b3a2c(0x1b7));const _0x1575bd=_0x155845[_0x5b3a2c(0x1f3)](_0x5b3a2c(0x1b5)),_0x3b2f1f=_0x1575bd===undefined||_0x1575bd===null?undefined:Number(_0x1575bd),_0x410812=await resolveRoleRef(_0x155845[_0x5b3a2c(0x1be)],_0x36f149),_0x50258d=await resolveUserRef(_0x77a4bf),_0x4535d1=await loadRoleUsers(_0x155845['appCode']);return computeRoleUserMutation({'operation':_0x14d805,'appCode':_0x155845[_0x5b3a2c(0x1be)],'roleUsers':_0x4535d1,'targetRoleId':_0x410812['id'],'user':{'userId':_0x50258d[_0x5b3a2c(0x1c3)],'username':_0x50258d[_0x5b3a2c(0x1f9)],'nickname':_0x50258d['nickname']},'dryRun':_0x5b3166,..._0x3b2f1f!==undefined?{'expectUserCount':_0x3b2f1f}:{}});}function a159_0x3f4a(){const _0x4d02de=['No\x20tenant\x20member\x20matches\x20\x22','validation','Role\x20name\x20\x22','Role\x20id\x20or\x20role\x20name\x20(CUSTOM\x20roles\x20may\x20be\x20referenced\x20by\x20name)','3410siJGRJ','Role\x20name','nickname','2264bgDfSV','Anti-drift\x20guard:\x20fail\x20if\x20the\x20role\x27s\x20current\x20member\x20count\x20differs','roleName','role','133SWpeQO','\x22\x20not\x20found\x20in\x20app\x20','\x20member(s)\x20but\x20role\x20has\x20','\x20not\x20found\x20in\x20app\x20','Check\x20the\x20nickname/username,\x20or\x20pass\x20--user\x20<id>.','1051040CqQiKJ','roleType','Multiple\x20tenant\x20members\x20match\x20\x22','filter','/smartapi/permit/user-role/update-user-list','length','splice','expectUserCount','\x20is\x20not\x20a\x20member\x20of\x20role\x20','userCount','user-add','userList','push','POST','tenant_code','flagMissing','join','Optional\x20role\x20remark/description','DEV','375432unObvN','string','\x20is\x20already\x20a\x20member\x20of\x20role\x20','6XsUjRa','number','USER','User\x20','Cannot\x20','53039iNIgSk','flag','includes','ADMIN','Missing\x20role\x20reference.',';\x20no\x20change.','1165743qIuhuH','username','DEV\x20/\x20ADMIN\x20keep\x20full\x20access\x20by\x20design;\x20configure\x20a\x20CUSTOM\x20role\x20instead.','totalCount','Missing\x20user\x20reference.','280120shunRv','map','1771731NKuzSn','trim','Only\x20CUSTOM\x20roles\x20can\x20be\x20modified\x20or\x20deleted.','Nickname\x20or\x20username\x20to\x20resolve\x20to\x20a\x20userId','find','Role\x20id\x20','tenant','Re-run\x20`role\x20detail`\x20/\x20`role\x20list`\x20and\x20retry\x20with\x20the\x20current\x20count.','User\x20id,\x20username,\x20or\x20nickname\x20to\x20resolve\x20to\x20a\x20userId','\x22\x20is\x20ambiguous\x20(ids:\x20','Disambiguate\x20with\x20--user\x20<id>.','44RoOjaS','expect-user-count','name','Pass\x20--user\x20<id|name>.','Disambiguate\x20with\x20--role\x20<id>.','\x20not\x20found\x20in\x20the\x20user-role\x20list.','user','findIndex','test','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles.','appCode','\x22:\x20','Cannot\x20change\x20the\x20permission\x20matrix\x20of\x20built-in\x20role\x20','toLowerCase','Run\x20`role\x20list`\x20to\x20see\x20available\x20roles,\x20or\x20pass\x20--role\x20<id>.','userId','dryRun','Cannot\x20resolve\x20current\x20tenant.\x20Run\x20`rabetbase\x20auth\x20login`\x20first.','remark'];a159_0x3f4a=function(){return _0x4d02de;};return a159_0x3f4a();}
@@ -1 +1 @@
1
- function a160_0x2744(_0x43f307,_0x564bed){_0x43f307=_0x43f307-0x120;const _0x62f850=a160_0x62f8();let _0x27445f=_0x62f850[_0x43f307];return _0x27445f;}const a160_0x2f68de=a160_0x2744;(function(_0x164ab0,_0x4cbb3d){const _0x2e65af=a160_0x2744,_0x1c7630=_0x164ab0();while(!![]){try{const _0xadad7d=-parseInt(_0x2e65af(0x121))/0x1*(parseInt(_0x2e65af(0x138))/0x2)+-parseInt(_0x2e65af(0x12c))/0x3+-parseInt(_0x2e65af(0x139))/0x4*(-parseInt(_0x2e65af(0x137))/0x5)+parseInt(_0x2e65af(0x127))/0x6*(-parseInt(_0x2e65af(0x12f))/0x7)+parseInt(_0x2e65af(0x128))/0x8+-parseInt(_0x2e65af(0x130))/0x9+parseInt(_0x2e65af(0x136))/0xa;if(_0xadad7d===_0x4cbb3d)break;else _0x1c7630['push'](_0x1c7630['shift']());}catch(_0x23c14f){_0x1c7630['push'](_0x1c7630['shift']());}}}(a160_0x62f8,0xde759));import{updateAppRole}from'../../core/api-client.js';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';function a160_0x62f8(){const _0x1453ef=['flag','1603EQAvXU','2148579EALPDr','roleName','Updated\x20role\x20','/smartapi/permit/role/update','remark','Role\x20name\x20cannot\x20exceed\x2064\x20characters.','18567660DlOQZp','1797595dEinPQ','4mAlhpW','4hLPXgg','num','Nothing\x20to\x20update.','New\x20role\x20name','role','update','--name\x20cannot\x20be\x20empty.','13630EaQxVt','POST','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(DEV/ADMIN\x20rejected)','appCode','validation','\x20(id=','28716qUxeME','14032056jEICKo','name','string','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.','5091342VLVtNZ','length'];a160_0x62f8=function(){return _0x1453ef;};return a160_0x62f8();}const UPDATE_PATH=a160_0x2f68de(0x133);function readPatch(_0x289d32){const _0x5c3be0=a160_0x2f68de,_0x3cd3d1=_0x289d32[_0x5c3be0(0x12e)](_0x5c3be0(0x129)),_0x541e95=_0x289d32[_0x5c3be0(0x12e)](_0x5c3be0(0x134)),_0x1d3ac2={};if(_0x3cd3d1!==undefined&&_0x3cd3d1!==null){const _0x241734=String(_0x3cd3d1)['trim']();if(!_0x241734)throw CliErrors[_0x5c3be0(0x125)](_0x5c3be0(0x120));if(_0x241734[_0x5c3be0(0x12d)]>0x40)throw CliErrors[_0x5c3be0(0x125)](_0x5c3be0(0x135));_0x1d3ac2['roleName']=_0x241734;}_0x541e95!==undefined&&_0x541e95!==null&&(_0x1d3ac2[_0x5c3be0(0x134)]=String(_0x541e95));if(_0x1d3ac2[_0x5c3be0(0x131)]===undefined&&_0x1d3ac2[_0x5c3be0(0x134)]===undefined)throw CliErrors['validation'](_0x5c3be0(0x13b),_0x5c3be0(0x12b));return _0x1d3ac2;}export const roleUpdate={'service':a160_0x2f68de(0x13d),'command':'update','description':a160_0x2f68de(0x123),'risk':'write','flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a160_0x2f68de(0x129),'type':a160_0x2f68de(0x12a),'required':![],'description':a160_0x2f68de(0x13c)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x49ff98){readPatch(_0x49ff98);},async 'dryRun'(_0x58c491){const _0x5450c0=a160_0x2f68de,_0x268c20=_0x58c491[_0x5450c0(0x13a)]('id'),_0x21f37c=readPatch(_0x58c491),_0x5dc3d1=await getRoleById(_0x58c491[_0x5450c0(0x124)],_0x268c20);return assertCustomRole(_0x5dc3d1,_0x5450c0(0x13e)),asDryRunResult({'operation':_0x5450c0(0x13e),'selector':{'appCode':_0x58c491[_0x5450c0(0x124)],'roleId':_0x268c20,'roleName':_0x5dc3d1[_0x5450c0(0x131)]},'before':projectRole(_0x5dc3d1),'after':projectRole({..._0x5dc3d1,..._0x21f37c[_0x5450c0(0x131)]!==undefined?{'roleName':_0x21f37c['roleName']}:{},..._0x21f37c['remark']!==undefined?{'remark':_0x21f37c[_0x5450c0(0x134)]}:{}}),'dryRun':!![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[]},{'method':_0x5450c0(0x122),'url':UPDATE_PATH});},async 'execute'(_0x153902){const _0x278c21=a160_0x2f68de,_0x288445=_0x153902[_0x278c21(0x13a)]('id'),_0x3d28b6=readPatch(_0x153902),_0x1ee0e2=await getRoleById(_0x153902[_0x278c21(0x124)],_0x288445);assertCustomRole(_0x1ee0e2,'update'),await updateAppRole({'id':_0x288445,'appCode':_0x153902['appCode'],..._0x3d28b6[_0x278c21(0x131)]!==undefined?{'roleName':_0x3d28b6[_0x278c21(0x131)]}:{},..._0x3d28b6[_0x278c21(0x134)]!==undefined?{'remark':_0x3d28b6[_0x278c21(0x134)]}:{}});const _0x368e40=await getRoleById(_0x153902[_0x278c21(0x124)],_0x288445);return{'ok':!![],'data':{'operation':'update','selector':{'appCode':_0x153902[_0x278c21(0x124)],'roleId':_0x288445,'roleName':_0x368e40['roleName']},'before':projectRole(_0x1ee0e2),'after':projectRole(_0x368e40),'dryRun':![],'backend':{'method':_0x278c21(0x122),'path':UPDATE_PATH},'warnings':[]},'message':_0x278c21(0x132)+_0x368e40[_0x278c21(0x131)]+_0x278c21(0x126)+_0x288445+')'};}};
1
+ const a160_0x157a8a=a160_0x12e0;(function(_0x1b4ee4,_0x24af76){const _0x2c9ae1=a160_0x12e0,_0x64ecf0=_0x1b4ee4();while(!![]){try{const _0x361f44=-parseInt(_0x2c9ae1(0xa0))/0x1*(-parseInt(_0x2c9ae1(0x96))/0x2)+-parseInt(_0x2c9ae1(0x9e))/0x3+-parseInt(_0x2c9ae1(0x9b))/0x4*(-parseInt(_0x2c9ae1(0x92))/0x5)+parseInt(_0x2c9ae1(0x8e))/0x6*(-parseInt(_0x2c9ae1(0xa6))/0x7)+parseInt(_0x2c9ae1(0x99))/0x8+-parseInt(_0x2c9ae1(0xa5))/0x9+-parseInt(_0x2c9ae1(0x91))/0xa;if(_0x361f44===_0x24af76)break;else _0x64ecf0['push'](_0x64ecf0['shift']());}catch(_0x3a6c27){_0x64ecf0['push'](_0x64ecf0['shift']());}}}(a160_0x40cb,0x97e43));import{updateAppRole}from'../../core/api-client.js';function a160_0x40cb(){const _0x1b9af8=['205Iagwpq','update','remark','Updated\x20role\x20','2ipvhvM','roleName','num','8713248pfGqdP','Update\x20a\x20CUSTOM\x20role\x27s\x20name/remark\x20(DEV/ADMIN\x20rejected)','103036vxaISy','name','length','246117YXgkYt','New\x20role\x20name','845333sedpKU','appCode','Pass\x20at\x20least\x20one\x20of\x20--name\x20/\x20--remark.','string','flag','11114757XDthRS','301yvhbLa','\x20(id=','validation','role','write','--name\x20cannot\x20be\x20empty.','39306GpYFcK','POST','Nothing\x20to\x20update.','7697560auvLmy'];a160_0x40cb=function(){return _0x1b9af8;};return a160_0x40cb();}import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a160_0x12e0(_0x877e4e,_0x212784){_0x877e4e=_0x877e4e-0x8e;const _0x40cb1c=a160_0x40cb();let _0x12e03f=_0x40cb1c[_0x877e4e];return _0x12e03f;}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='/smartapi/permit/role/update';function readPatch(_0x9456ab){const _0x2c70d7=a160_0x12e0,_0x3129db=_0x9456ab[_0x2c70d7(0xa4)]('name'),_0x51b134=_0x9456ab['flag'](_0x2c70d7(0x94)),_0xc6fd73={};if(_0x3129db!==undefined&&_0x3129db!==null){const _0xbe6223=String(_0x3129db)['trim']();if(!_0xbe6223)throw CliErrors[_0x2c70d7(0xa8)](_0x2c70d7(0xab));if(_0xbe6223[_0x2c70d7(0x9d)]>0x40)throw CliErrors[_0x2c70d7(0xa8)]('Role\x20name\x20cannot\x20exceed\x2064\x20characters.');_0xc6fd73[_0x2c70d7(0x97)]=_0xbe6223;}_0x51b134!==undefined&&_0x51b134!==null&&(_0xc6fd73[_0x2c70d7(0x94)]=String(_0x51b134));if(_0xc6fd73[_0x2c70d7(0x97)]===undefined&&_0xc6fd73[_0x2c70d7(0x94)]===undefined)throw CliErrors[_0x2c70d7(0xa8)](_0x2c70d7(0x90),_0x2c70d7(0xa2));return _0xc6fd73;}export const roleUpdate={'service':a160_0x157a8a(0xa9),'command':a160_0x157a8a(0x93),'description':a160_0x157a8a(0x9a),'risk':a160_0x157a8a(0xaa),'flags':[ROLE_ID_FLAG,{...REMARK_FLAG},{'name':a160_0x157a8a(0x9c),'type':a160_0x157a8a(0xa3),'required':![],'description':a160_0x157a8a(0x9f)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x62b27e){readPatch(_0x62b27e);},async 'dryRun'(_0x56fa7e){const _0x4dfe93=a160_0x157a8a,_0x1c5341=_0x56fa7e[_0x4dfe93(0x98)]('id'),_0x527fa2=readPatch(_0x56fa7e),_0xdb5352=await getRoleById(_0x56fa7e[_0x4dfe93(0xa1)],_0x1c5341);return assertCustomRole(_0xdb5352,_0x4dfe93(0x93)),asDryRunResult({'operation':_0x4dfe93(0x93),'selector':{'appCode':_0x56fa7e[_0x4dfe93(0xa1)],'roleId':_0x1c5341,'roleName':_0xdb5352[_0x4dfe93(0x97)]},'before':projectRole(_0xdb5352),'after':projectRole({..._0xdb5352,..._0x527fa2['roleName']!==undefined?{'roleName':_0x527fa2[_0x4dfe93(0x97)]}:{},..._0x527fa2[_0x4dfe93(0x94)]!==undefined?{'remark':_0x527fa2[_0x4dfe93(0x94)]}:{}}),'dryRun':!![],'backend':{'method':_0x4dfe93(0x8f),'path':UPDATE_PATH},'warnings':[]},{'method':_0x4dfe93(0x8f),'url':UPDATE_PATH});},async 'execute'(_0x2c2d39){const _0x193559=a160_0x157a8a,_0x4e8473=_0x2c2d39[_0x193559(0x98)]('id'),_0x585f55=readPatch(_0x2c2d39),_0xc3a137=await getRoleById(_0x2c2d39[_0x193559(0xa1)],_0x4e8473);assertCustomRole(_0xc3a137,_0x193559(0x93)),await updateAppRole({'id':_0x4e8473,'appCode':_0x2c2d39['appCode'],..._0x585f55['roleName']!==undefined?{'roleName':_0x585f55[_0x193559(0x97)]}:{},..._0x585f55[_0x193559(0x94)]!==undefined?{'remark':_0x585f55[_0x193559(0x94)]}:{}});const _0x1f3c42=await getRoleById(_0x2c2d39[_0x193559(0xa1)],_0x4e8473);return{'ok':!![],'data':{'operation':_0x193559(0x93),'selector':{'appCode':_0x2c2d39[_0x193559(0xa1)],'roleId':_0x4e8473,'roleName':_0x1f3c42['roleName']},'before':projectRole(_0xc3a137),'after':projectRole(_0x1f3c42),'dryRun':![],'backend':{'method':'POST','path':UPDATE_PATH},'warnings':[]},'message':_0x193559(0x95)+_0x1f3c42[_0x193559(0x97)]+_0x193559(0xa7)+_0x4e8473+')'};}};
@@ -1 +1 @@
1
- const a161_0xd5c4fb=a161_0x598d;(function(_0x30555d,_0x207669){const _0xd00d3d=a161_0x598d,_0x16b0f0=_0x30555d();while(!![]){try{const _0x1cea7d=-parseInt(_0xd00d3d(0x137))/0x1*(-parseInt(_0xd00d3d(0x127))/0x2)+-parseInt(_0xd00d3d(0x133))/0x3+-parseInt(_0xd00d3d(0x13c))/0x4+-parseInt(_0xd00d3d(0x136))/0x5+parseInt(_0xd00d3d(0x129))/0x6*(-parseInt(_0xd00d3d(0x13a))/0x7)+parseInt(_0xd00d3d(0x139))/0x8*(-parseInt(_0xd00d3d(0x134))/0x9)+parseInt(_0xd00d3d(0x12f))/0xa;if(_0x1cea7d===_0x207669)break;else _0x16b0f0['push'](_0x16b0f0['shift']());}catch(_0x200771){_0x16b0f0['push'](_0x16b0f0['shift']());}}}(a161_0x5e75,0x458ea));import{updateRoleUsers}from'../../core/api-client.js';function a161_0x5e75(){const _0x1d5286=['572106BHhUcj','user-add','high-risk-write','role','No\x20change:\x20user\x20','selector','18103020zJvoCs','appCode','roleName','\x20already\x20in\x20role\x20','1607139ZZbEyx','42759EpVOGb','userId','920065BcsmJb','844fLjQCG','\x20to\x20role\x20','808QDFttQ','7zkGerp','POST','1333744vziXlm','244cPYKov','Added\x20user\x20'];a161_0x5e75=function(){return _0x1d5286;};return a161_0x5e75();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';import{EXPECT_USER_COUNT_FLAG,prepareUserMutation,ROLE_REF_FLAG,UPDATE_USER_LIST_PATH,USER_REF_FLAG}from'../../commands/role/shared.js';function a161_0x598d(_0x2a4aae,_0x181a0f){_0x2a4aae=_0x2a4aae-0x127;const _0x5e752d=a161_0x5e75();let _0x598da4=_0x5e752d[_0x2a4aae];return _0x598da4;}export const roleUserAdd={'service':a161_0xd5c4fb(0x12c),'command':a161_0xd5c4fb(0x12a),'description':'Add\x20a\x20user\x20to\x20a\x20role\x20(internal\x20merge\x20+\x20anti-drift);\x20requires\x20--yes','risk':a161_0xd5c4fb(0x12b),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x3fb647){const _0x1f82ea=a161_0xd5c4fb,{mutation:_0x4a34b2}=await prepareUserMutation(_0x3fb647,_0x1f82ea(0x12a),!![]);return asDryRunResult(_0x4a34b2,{'method':_0x1f82ea(0x13b),'url':UPDATE_USER_LIST_PATH});},async 'execute'(_0x32032c){const _0x55e2f3=a161_0xd5c4fb,{roleList:_0x484a0e,mutation:_0x228a68,changed:_0x5414bf}=await prepareUserMutation(_0x32032c,_0x55e2f3(0x12a),![]);return _0x5414bf&&await updateRoleUsers(_0x32032c[_0x55e2f3(0x130)],_0x484a0e),{'ok':!![],'data':_0x228a68,'message':_0x5414bf?_0x55e2f3(0x128)+_0x228a68['selector'][_0x55e2f3(0x135)]+_0x55e2f3(0x138)+_0x228a68[_0x55e2f3(0x12e)]['roleName']:_0x55e2f3(0x12d)+_0x228a68[_0x55e2f3(0x12e)][_0x55e2f3(0x135)]+_0x55e2f3(0x132)+_0x228a68[_0x55e2f3(0x12e)][_0x55e2f3(0x131)]};}};
1
+ const a161_0xae86ec=a161_0x2b16;(function(_0x29c173,_0x4ee0d6){const _0x202e4c=a161_0x2b16,_0x45ef2e=_0x29c173();while(!![]){try{const _0x299ef9=parseInt(_0x202e4c(0x14b))/0x1*(parseInt(_0x202e4c(0x152))/0x2)+-parseInt(_0x202e4c(0x143))/0x3+parseInt(_0x202e4c(0x14a))/0x4+-parseInt(_0x202e4c(0x147))/0x5*(-parseInt(_0x202e4c(0x156))/0x6)+parseInt(_0x202e4c(0x14d))/0x7+-parseInt(_0x202e4c(0x155))/0x8*(-parseInt(_0x202e4c(0x151))/0x9)+parseInt(_0x202e4c(0x141))/0xa*(-parseInt(_0x202e4c(0x14f))/0xb);if(_0x299ef9===_0x4ee0d6)break;else _0x45ef2e['push'](_0x45ef2e['shift']());}catch(_0x56dd6e){_0x45ef2e['push'](_0x45ef2e['shift']());}}}(a161_0x3e62,0x619f4));import{updateRoleUsers}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asDryRunResult}from'../../commands/common/dry-run.js';function a161_0x2b16(_0x3946e9,_0x5ed6d8){_0x3946e9=_0x3946e9-0x141;const _0x3e62b4=a161_0x3e62();let _0x2b16d3=_0x3e62b4[_0x3946e9];return _0x2b16d3;}import{EXPECT_USER_COUNT_FLAG,prepareUserMutation,ROLE_REF_FLAG,UPDATE_USER_LIST_PATH,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserAdd={'service':a161_0xae86ec(0x14e),'command':a161_0xae86ec(0x153),'description':a161_0xae86ec(0x150),'risk':a161_0xae86ec(0x149),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x165c83){const _0x4e5620=a161_0xae86ec,{mutation:_0x3b9628}=await prepareUserMutation(_0x165c83,_0x4e5620(0x153),!![]);return asDryRunResult(_0x3b9628,{'method':'POST','url':UPDATE_USER_LIST_PATH});},async 'execute'(_0x485805){const _0x47886b=a161_0xae86ec,{roleList:_0x5b7a33,mutation:_0x67f2e7,changed:_0x13b321}=await prepareUserMutation(_0x485805,_0x47886b(0x153),![]);return _0x13b321&&await updateRoleUsers(_0x485805[_0x47886b(0x154)],_0x5b7a33),{'ok':!![],'data':_0x67f2e7,'message':_0x13b321?_0x47886b(0x145)+_0x67f2e7[_0x47886b(0x148)][_0x47886b(0x144)]+'\x20to\x20role\x20'+_0x67f2e7[_0x47886b(0x148)][_0x47886b(0x142)]:_0x47886b(0x14c)+_0x67f2e7['selector']['userId']+_0x47886b(0x146)+_0x67f2e7[_0x47886b(0x148)][_0x47886b(0x142)]};}};function a161_0x3e62(){const _0x565191=['appCode','152sRfbjf','222cVEIXd','129810pckUxz','roleName','1532829yoQufp','userId','Added\x20user\x20','\x20already\x20in\x20role\x20','3170IzxlJK','selector','high-risk-write','2536012TXaOto','1rbNZsS','No\x20change:\x20user\x20','4626762jUlWGA','role','781BjcDWv','Add\x20a\x20user\x20to\x20a\x20role\x20(internal\x20merge\x20+\x20anti-drift);\x20requires\x20--yes','87750UyrOSI','657554chMRoF','user-add'];a161_0x3e62=function(){return _0x565191;};return a161_0x3e62();}
@@ -1 +1 @@
1
- const a162_0x21210d=a162_0x4d4b;(function(_0x7d3ad1,_0xba3bd3){const _0x1008da=a162_0x4d4b,_0x4df9ac=_0x7d3ad1();while(!![]){try{const _0x5d155f=-parseInt(_0x1008da(0x1a2))/0x1*(parseInt(_0x1008da(0x196))/0x2)+-parseInt(_0x1008da(0x199))/0x3+-parseInt(_0x1008da(0x19a))/0x4*(parseInt(_0x1008da(0x18f))/0x5)+parseInt(_0x1008da(0x194))/0x6+-parseInt(_0x1008da(0x18e))/0x7+-parseInt(_0x1008da(0x19b))/0x8+-parseInt(_0x1008da(0x19d))/0x9*(-parseInt(_0x1008da(0x191))/0xa);if(_0x5d155f===_0xba3bd3)break;else _0x4df9ac['push'](_0x4df9ac['shift']());}catch(_0x4e9e3e){_0x4df9ac['push'](_0x4df9ac['shift']());}}}(a162_0xc189,0x98f3c));function a162_0x4d4b(_0x1158a2,_0x26d179){_0x1158a2=_0x1158a2-0x18d;const _0xc189dc=a162_0xc189();let _0x4d4b34=_0xc189dc[_0x1158a2];return _0x4d4b34;}import{updateRoleUsers}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,prepareUserMutation,ROLE_REF_FLAG,UPDATE_USER_LIST_PATH,USER_REF_FLAG}from'../../commands/role/shared.js';export const roleUserRemove={'service':a162_0x21210d(0x19c),'command':a162_0x21210d(0x1a1),'description':a162_0x21210d(0x19e),'risk':a162_0x21210d(0x1a0),'flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x553874){const _0x2c3b04=a162_0x21210d,{mutation:_0x15b2ff}=await prepareUserMutation(_0x553874,_0x2c3b04(0x1a1),!![]);return asDryRunResult(_0x15b2ff,{'method':_0x2c3b04(0x18d),'url':UPDATE_USER_LIST_PATH});},async 'execute'(_0x3e912a){const _0x3bb419=a162_0x21210d,{roleList:_0x8ccbdf,mutation:_0x42a3d6,changed:_0x1f7688}=await prepareUserMutation(_0x3e912a,_0x3bb419(0x1a1),![]);return _0x1f7688&&await updateRoleUsers(_0x3e912a[_0x3bb419(0x195)],_0x8ccbdf),{'ok':!![],'data':_0x42a3d6,'message':_0x1f7688?_0x3bb419(0x197)+_0x42a3d6[_0x3bb419(0x192)]['userId']+_0x3bb419(0x190)+_0x42a3d6[_0x3bb419(0x192)][_0x3bb419(0x19f)]:_0x3bb419(0x198)+_0x42a3d6['selector']['userId']+_0x3bb419(0x193)+_0x42a3d6['selector']['roleName']};}};function a162_0xc189(){const _0x547c79=['31143483vSozNm','Remove\x20a\x20user\x20from\x20a\x20role\x20(internal\x20merge\x20+\x20anti-drift);\x20requires\x20--yes','roleName','high-risk-write','user-remove','58187YUNLXr','POST','3452407Oyxngj','125390LqaWqu','\x20from\x20role\x20','10rbDhPP','selector','\x20not\x20in\x20role\x20','1400208TWPBMa','appCode','36CwLrqX','Removed\x20user\x20','No\x20change:\x20user\x20','1137495jFpzgR','136YhKSOi','2359032RMACVU','role'];a162_0xc189=function(){return _0x547c79;};return a162_0xc189();}
1
+ const a162_0x444845=a162_0x25ab;(function(_0x5e1bc5,_0x480e10){const _0x598df3=a162_0x25ab,_0x17fca8=_0x5e1bc5();while(!![]){try{const _0xfeac31=parseInt(_0x598df3(0x100))/0x1*(-parseInt(_0x598df3(0xfe))/0x2)+-parseInt(_0x598df3(0xfc))/0x3*(parseInt(_0x598df3(0x104))/0x4)+-parseInt(_0x598df3(0xf4))/0x5+parseInt(_0x598df3(0xf2))/0x6*(parseInt(_0x598df3(0xf6))/0x7)+parseInt(_0x598df3(0x106))/0x8+parseInt(_0x598df3(0xff))/0x9*(parseInt(_0x598df3(0x101))/0xa)+parseInt(_0x598df3(0xf8))/0xb;if(_0xfeac31===_0x480e10)break;else _0x17fca8['push'](_0x17fca8['shift']());}catch(_0x373600){_0x17fca8['push'](_0x17fca8['shift']());}}}(a162_0xa644,0x458df));function a162_0xa644(){const _0x5a474b=['\x20not\x20in\x20role\x20','4KrEkBs','appCode','813008kEPoRW','42nIwsHG','roleName','2529320zElYrM','role','528010LhCnVL','user-remove','2332803wUvrlN','\x20from\x20role\x20','Remove\x20a\x20user\x20from\x20a\x20role\x20(internal\x20merge\x20+\x20anti-drift);\x20requires\x20--yes','selector','278412zKwMbY','POST','14aAptxM','209673tBluNW','43943fJCzGL','150ChehDo','userId'];a162_0xa644=function(){return _0x5a474b;};return a162_0xa644();}import{updateRoleUsers}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,prepareUserMutation,ROLE_REF_FLAG,UPDATE_USER_LIST_PATH,USER_REF_FLAG}from'../../commands/role/shared.js';function a162_0x25ab(_0x413970,_0x29c7d6){_0x413970=_0x413970-0xf2;const _0xa64430=a162_0xa644();let _0x25abfb=_0xa64430[_0x413970];return _0x25abfb;}export const roleUserRemove={'service':a162_0x444845(0xf5),'command':a162_0x444845(0xf7),'description':a162_0x444845(0xfa),'risk':'high-risk-write','flags':[ROLE_REF_FLAG,USER_REF_FLAG,EXPECT_USER_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x562b4e){const _0x168999=a162_0x444845,{mutation:_0x148652}=await prepareUserMutation(_0x562b4e,_0x168999(0xf7),!![]);return asDryRunResult(_0x148652,{'method':_0x168999(0xfd),'url':UPDATE_USER_LIST_PATH});},async 'execute'(_0x194897){const _0x3e17c5=a162_0x444845,{roleList:_0x34657e,mutation:_0x36667e,changed:_0x3764b7}=await prepareUserMutation(_0x194897,_0x3e17c5(0xf7),![]);return _0x3764b7&&await updateRoleUsers(_0x194897[_0x3e17c5(0x105)],_0x34657e),{'ok':!![],'data':_0x36667e,'message':_0x3764b7?'Removed\x20user\x20'+_0x36667e[_0x3e17c5(0xfb)]['userId']+_0x3e17c5(0xf9)+_0x36667e['selector'][_0x3e17c5(0xf3)]:'No\x20change:\x20user\x20'+_0x36667e[_0x3e17c5(0xfb)][_0x3e17c5(0x102)]+_0x3e17c5(0x103)+_0x36667e[_0x3e17c5(0xfb)][_0x3e17c5(0xf3)]};}};
@@ -1 +1 @@
1
- const a163_0x34741b=a163_0x36c2;(function(_0x28140f,_0x33d51e){const _0x373f99=a163_0x36c2,_0x5569a7=_0x28140f();while(!![]){try{const _0x4c2b64=parseInt(_0x373f99(0x93))/0x1+parseInt(_0x373f99(0x7e))/0x2+parseInt(_0x373f99(0x8b))/0x3+parseInt(_0x373f99(0x90))/0x4+parseInt(_0x373f99(0x81))/0x5*(-parseInt(_0x373f99(0x8f))/0x6)+-parseInt(_0x373f99(0x7f))/0x7+parseInt(_0x373f99(0x92))/0x8*(-parseInt(_0x373f99(0x8a))/0x9);if(_0x4c2b64===_0x33d51e)break;else _0x5569a7['push'](_0x5569a7['shift']());}catch(_0x2a5fa4){_0x5569a7['push'](_0x5569a7['shift']());}}}(a163_0x4c61,0x649e3));import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{resolveUserRef,USER_NAME_FLAG}from'../../commands/role/shared.js';function a163_0x36c2(_0x186714,_0x557305){_0x186714=_0x186714-0x7e;const _0x4c6130=a163_0x4c61();let _0x36c2d5=_0x4c6130[_0x186714];return _0x36c2d5;}export const roleUserResolve={'service':a163_0x34741b(0x86),'command':a163_0x34741b(0x8c),'description':a163_0x34741b(0x84),'risk':a163_0x34741b(0x8d),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1b8248){const _0x55e10a=a163_0x34741b;if(!_0x1b8248[_0x55e10a(0x80)](_0x55e10a(0x88))[_0x55e10a(0x83)]())throw CliErrors[_0x55e10a(0x87)](_0x55e10a(0x88),_0x55e10a(0x91));},async 'execute'(_0x5b297e){const _0x1e263f=a163_0x34741b,_0x3f8482=_0x5b297e['str'](_0x1e263f(0x88))['trim'](),_0x2c746c=await resolveUserRef(_0x3f8482);return{'ok':!![],'data':{'user':{'userId':_0x2c746c[_0x1e263f(0x85)],'username':_0x2c746c[_0x1e263f(0x82)],'nickname':_0x2c746c[_0x1e263f(0x8e)],'matchedBy':_0x2c746c[_0x1e263f(0x89)]}},'message':'Resolved\x20\x22'+_0x3f8482+'\x22\x20→\x20userId\x20'+_0x2c746c[_0x1e263f(0x85)]};}};function a163_0x4c61(){const _0x4f9b64=['name','matchedBy','33039UMPnoV','1843089ssCkRu','user-resolve','read','nickname','2946pnZMVH','693276txMSNF','Pass\x20--name\x20<nickname|username>.','1928ufzPKJ','593839Huyexc','1118974yVJovS','4340749GdkyOj','str','245DEmnkm','username','trim','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','userId','role','flagMissing'];a163_0x4c61=function(){return _0x4f9b64;};return a163_0x4c61();}
1
+ function a163_0x542e(){const _0x38e90a=['role','41ejdHxv','2269494JrZCyb','trim','name','username','Resolve\x20a\x20nickname/username\x20to\x20a\x20userId\x20(tenant\x20member\x20directory)','str','Pass\x20--name\x20<nickname|username>.','flagMissing','matchedBy','8TrMCuo','4838589RnSBLI','5mBDmMR','37730uqqKfV','user-resolve','997760cNWRmc','userId','3503144ryFUuR','381174LeUoLg','\x22\x20→\x20userId\x20','read','4329045SzVegU','Resolved\x20\x22'];a163_0x542e=function(){return _0x38e90a;};return a163_0x542e();}const a163_0x3e0c64=a163_0x3d79;function a163_0x3d79(_0x1f9630,_0x370e03){_0x1f9630=_0x1f9630-0x76;const _0x542e81=a163_0x542e();let _0x3d79a0=_0x542e81[_0x1f9630];return _0x3d79a0;}(function(_0x4d2fda,_0x5d171f){const _0x9048fb=a163_0x3d79,_0x293145=_0x4d2fda();while(!![]){try{const _0x145bd6=parseInt(_0x9048fb(0x7b))/0x1*(parseInt(_0x9048fb(0x88))/0x2)+-parseInt(_0x9048fb(0x8d))/0x3*(parseInt(_0x9048fb(0x85))/0x4)+-parseInt(_0x9048fb(0x87))/0x5*(parseInt(_0x9048fb(0x7c))/0x6)+-parseInt(_0x9048fb(0x78))/0x7+parseInt(_0x9048fb(0x8c))/0x8+parseInt(_0x9048fb(0x86))/0x9+-parseInt(_0x9048fb(0x8a))/0xa;if(_0x145bd6===_0x5d171f)break;else _0x293145['push'](_0x293145['shift']());}catch(_0x388f5f){_0x293145['push'](_0x293145['shift']());}}}(a163_0x542e,0x61443));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':a163_0x3e0c64(0x7a),'command':a163_0x3e0c64(0x89),'description':a163_0x3e0c64(0x80),'risk':a163_0x3e0c64(0x77),'flags':[USER_NAME_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x46642a){const _0x1576a4=a163_0x3e0c64;if(!_0x46642a[_0x1576a4(0x81)]('name')[_0x1576a4(0x7d)]())throw CliErrors[_0x1576a4(0x83)](_0x1576a4(0x7e),_0x1576a4(0x82));},async 'execute'(_0x22818e){const _0x4548ff=a163_0x3e0c64,_0x8955f0=_0x22818e[_0x4548ff(0x81)](_0x4548ff(0x7e))[_0x4548ff(0x7d)](),_0x528efe=await resolveUserRef(_0x8955f0);return{'ok':!![],'data':{'user':{'userId':_0x528efe[_0x4548ff(0x8b)],'username':_0x528efe[_0x4548ff(0x7f)],'nickname':_0x528efe['nickname'],'matchedBy':_0x528efe[_0x4548ff(0x84)]}},'message':_0x4548ff(0x79)+_0x8955f0+_0x4548ff(0x76)+_0x528efe[_0x4548ff(0x8b)]};}};
@@ -1 +1 @@
1
- const a164_0x22a4ad=a164_0x3ba6;(function(_0x309c5c,_0x51ff2a){const _0x5f0265=a164_0x3ba6,_0xcfe03=_0x309c5c();while(!![]){try{const _0x4145f1=parseInt(_0x5f0265(0x211))/0x1*(parseInt(_0x5f0265(0x207))/0x2)+parseInt(_0x5f0265(0x1d9))/0x3+parseInt(_0x5f0265(0x20d))/0x4*(-parseInt(_0x5f0265(0x1e7))/0x5)+parseInt(_0x5f0265(0x208))/0x6*(-parseInt(_0x5f0265(0x1e6))/0x7)+parseInt(_0x5f0265(0x1fc))/0x8*(-parseInt(_0x5f0265(0x1ea))/0x9)+-parseInt(_0x5f0265(0x1fd))/0xa*(parseInt(_0x5f0265(0x1d3))/0xb)+-parseInt(_0x5f0265(0x200))/0xc*(-parseInt(_0x5f0265(0x1f8))/0xd);if(_0x4145f1===_0x51ff2a)break;else _0xcfe03['push'](_0xcfe03['shift']());}catch(_0x2aec25){_0xcfe03['push'](_0xcfe03['shift']());}}}(a164_0x16b5,0x1fca3));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';import{resolve,delimiter,join}from'node:path';import{spawn}from'node:child_process';import{CliErrors}from'../../errors.js';function a164_0x16b5(){const _0x26c3b0=['511mEUVbC','1265WDoueO','npm','preview','77598yjBJRY','package.json','join','validation','build','node_modules','(none)','\x20\x20EXAMPLES','log','\x20run\x20','args','Run\x20a\x20package.json\x20script','\x22\x20not\x20found\x20in\x20package.json.','needsUpgrade','13kyFjSO','\x20\x20\x20\x20','pnpm','boolean','88oovBku','10nXzTJx','error','No\x20scripts\x20defined\x20in\x20package.json.','3325776bzqrti','all','watch','slice','No\x20package.json\x20found\x20in\x20current\x20directory.','Available:\x20','bun.lockb','77486WAENJT','3054cDJiKf','pnpm-lock.yaml','bun','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','utf-8','628rKIKzB','bun.lock','inherit','yarn.lock','5gmHexB','script','close','length','\x0a\x20\x20Available\x20scripts:\x0a','.bin','Script\x20\x22','2731641MBCGLF','dev','yarn','push','run','\x20run\x20preview\x20--watch','238197nvizAq','start','\x20run\x20preview','Script\x20name\x20defined\x20in\x20package.json','\x20exited\x20with\x20code\x20','vite','keys','parse','read','Enable\x20watch\x20mode\x20for\x20preview','vite\x20preview\x20exited\x20with\x20code\x20','scripts','\x20run\x20start'];a164_0x16b5=function(){return _0x26c3b0;};return a164_0x16b5();}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([a164_0x22a4ad(0x1da),a164_0x22a4ad(0x1d4)]);function readPackageScripts(_0x51ec52){const _0x5b22c8=a164_0x22a4ad,_0x4dd889=resolve(_0x51ec52,_0x5b22c8(0x1eb));if(!existsSync(_0x4dd889))return null;try{const _0xba07cf=JSON[_0x5b22c8(0x1e0)](readFileSync(_0x4dd889,_0x5b22c8(0x20c)));return _0xba07cf[_0x5b22c8(0x1e4)]??{};}catch{return null;}}function detectPackageManager(_0x241453){const _0x39b1f8=a164_0x22a4ad;if(existsSync(resolve(_0x241453,_0x39b1f8(0x206)))||existsSync(resolve(_0x241453,_0x39b1f8(0x20e))))return _0x39b1f8(0x20a);if(existsSync(resolve(_0x241453,_0x39b1f8(0x209))))return _0x39b1f8(0x1fa);if(existsSync(resolve(_0x241453,_0x39b1f8(0x210))))return _0x39b1f8(0x1d5);return _0x39b1f8(0x1e8);}async function versionCheck(_0x233a74){const _0x3ef598=a164_0x22a4ad,_0x1fd4f9=await checkCliVersion();(_0x1fd4f9[_0x3ef598(0x1f7)]||_0x1fd4f9['belowMinimum'])&&(printCliUpgradeWarning(_0x1fd4f9),assertCliVersionSupported(_0x1fd4f9));const _0x364ddf=await checkSdkVersion(_0x233a74);if(_0x364ddf[_0x3ef598(0x1f7)])printSdkUpgradeWarning(_0x364ddf);}function a164_0x3ba6(_0x8eb9d6,_0x85b99f){_0x8eb9d6=_0x8eb9d6-0x1cf;const _0x16b5fb=a164_0x16b5();let _0x3ba60a=_0x16b5fb[_0x8eb9d6];return _0x3ba60a;}function spawnScript(_0x59589b,_0x18dd57,_0x329042,_0x30371a){return new Promise((_0x58c698,_0x348c87)=>{const _0x4c96b2=a164_0x3ba6,_0x2bfaa5=[_0x4c96b2(0x1d7),_0x18dd57,..._0x329042],_0x51730c=spawn(_0x59589b,_0x2bfaa5,{'cwd':_0x30371a,'stdio':_0x4c96b2(0x20f),'shell':!![],'env':{...process.env,'PATH':''+join(_0x30371a,_0x4c96b2(0x1ef),_0x4c96b2(0x1d1))+delimiter+process.env.PATH}});_0x51730c['on'](_0x4c96b2(0x213),_0x5bc3e2=>{const _0x3ac603=_0x4c96b2;if(_0x5bc3e2===0x0||_0x5bc3e2===null)_0x58c698();else _0x348c87(new Error(_0x59589b+_0x3ac603(0x1f3)+_0x18dd57+_0x3ac603(0x1dd)+_0x5bc3e2));}),_0x51730c['on'](_0x4c96b2(0x1fe),_0x348c87);});}function spawnViteBuildWatch(_0x4ea02c){return new Promise((_0x595059,_0x414753)=>{const _0x5496ba=a164_0x3ba6,_0x546e79=spawn('vite',[_0x5496ba(0x1ee),'--watch'],{'cwd':_0x4ea02c,'stdio':_0x5496ba(0x20f),'shell':!![],'env':{...process.env,'PATH':''+join(_0x4ea02c,_0x5496ba(0x1ef),'.bin')+delimiter+process.env.PATH}});_0x546e79['on']('close',_0x455aab=>{const _0x2545b7=_0x5496ba;if(_0x455aab===0x0||_0x455aab===null)_0x595059();else _0x414753(new Error(_0x2545b7(0x20b)+_0x455aab));}),_0x546e79['on'](_0x5496ba(0x1fe),_0x414753);});}function spawnVitePreview(_0x3944c){return new Promise((_0x5b6131,_0xa9a187)=>{const _0x331fba=a164_0x3ba6,_0x4f1c6b=spawn(_0x331fba(0x1de),[_0x331fba(0x1e9)],{'cwd':_0x3944c,'stdio':_0x331fba(0x20f),'shell':!![],'env':{...process.env,'PATH':''+join(_0x3944c,_0x331fba(0x1ef),_0x331fba(0x1d1))+delimiter+process.env.PATH}});_0x4f1c6b['on'](_0x331fba(0x213),_0x50ba76=>{const _0x3e8ce5=_0x331fba;if(_0x50ba76===0x0||_0x50ba76===null)_0x5b6131();else _0xa9a187(new Error(_0x3e8ce5(0x1e3)+_0x50ba76));}),_0x4f1c6b['on'](_0x331fba(0x1fe),_0xa9a187);});}const runFlags=[{'name':a164_0x22a4ad(0x202),'type':a164_0x22a4ad(0x1fb),'description':a164_0x22a4ad(0x1e2),'default':![]}];export const runDefinition={'service':a164_0x22a4ad(0x1d7),'command':a164_0x22a4ad(0x1d7),'description':a164_0x22a4ad(0x1f5),'risk':a164_0x22a4ad(0x1e1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a164_0x22a4ad(0x212),'description':a164_0x22a4ad(0x1dc),'required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x105d99=a164_0x22a4ad,_0xfd032f=[];return _0xfd032f[_0x105d99(0x1d6)](_0x105d99(0x1f1)),_0xfd032f[_0x105d99(0x1d6)](_0x105d99(0x1f9)+CLI_BIN_NAME+_0x105d99(0x1e5)),_0xfd032f['push'](_0x105d99(0x1f9)+CLI_BIN_NAME+'\x20run\x20build'),_0xfd032f[_0x105d99(0x1d6)](_0x105d99(0x1f9)+CLI_BIN_NAME+_0x105d99(0x1db)),_0xfd032f[_0x105d99(0x1d6)](_0x105d99(0x1f9)+CLI_BIN_NAME+_0x105d99(0x1d8)),_0xfd032f[_0x105d99(0x1ec)]('\x0a');},async 'execute'(_0x1336d2){const _0x493e1f=a164_0x22a4ad,_0x1d406b=process['cwd'](),_0x4f6e81=_0x1336d2['args'][0x0],_0x7a1a80=_0x1336d2[_0x493e1f(0x1f4)][_0x493e1f(0x203)](0x1),_0x16ebf8=readPackageScripts(_0x1d406b);if(!_0x16ebf8)throw CliErrors[_0x493e1f(0x1ed)](_0x493e1f(0x204));if(!_0x4f6e81){const _0x520a56=Object[_0x493e1f(0x1df)](_0x16ebf8);if(_0x520a56[_0x493e1f(0x1cf)]===0x0)console[_0x493e1f(0x1f2)](_0x493e1f(0x1ff));else{console[_0x493e1f(0x1f2)](_0x493e1f(0x1d0));for(const _0x14b30e of _0x520a56){console[_0x493e1f(0x1f2)](_0x493e1f(0x1f9)+_0x14b30e);}console[_0x493e1f(0x1f2)]('\x0a\x20\x20Usage:\x20'+CLI_BIN_NAME+'\x20run\x20<script>\x0a');}return{'ok':!![]};}if(!_0x16ebf8[_0x4f6e81])throw CliErrors[_0x493e1f(0x1ed)](_0x493e1f(0x1d2)+_0x4f6e81+_0x493e1f(0x1f6),_0x493e1f(0x205)+(Object[_0x493e1f(0x1df)](_0x16ebf8)[_0x493e1f(0x1ec)](',\x20')||_0x493e1f(0x1f0)));const _0x4f91fc=detectPackageManager(_0x1d406b);VERSION_CHECK_SCRIPTS['has'](_0x4f6e81)&&await versionCheck(_0x1d406b);if(_0x4f6e81===_0x493e1f(0x1e9)&&_0x1336d2['bool'](_0x493e1f(0x202)))return await Promise[_0x493e1f(0x201)]([spawnViteBuildWatch(_0x1d406b),spawnVitePreview(_0x1d406b)]),{'ok':!![]};return await spawnScript(_0x4f91fc,_0x4f6e81,_0x7a1a80,_0x1d406b),{'ok':!![]};}};
1
+ const a164_0x3e24ef=a164_0x8146;(function(_0x349284,_0x34c8e0){const _0x317f74=a164_0x8146,_0x2f3fde=_0x349284();while(!![]){try{const _0x175b23=-parseInt(_0x317f74(0xbe))/0x1+-parseInt(_0x317f74(0xb2))/0x2+-parseInt(_0x317f74(0xa8))/0x3+-parseInt(_0x317f74(0x9a))/0x4*(parseInt(_0x317f74(0xa5))/0x5)+-parseInt(_0x317f74(0x9c))/0x6*(parseInt(_0x317f74(0x8f))/0x7)+parseInt(_0x317f74(0x99))/0x8*(-parseInt(_0x317f74(0xc7))/0x9)+parseInt(_0x317f74(0xbf))/0xa*(parseInt(_0x317f74(0xca))/0xb);if(_0x175b23===_0x34c8e0)break;else _0x2f3fde['push'](_0x2f3fde['shift']());}catch(_0x3c3c35){_0x2f3fde['push'](_0x2f3fde['shift']());}}}(a164_0xa78c,0xc8b8f));import{readFileSync,existsSync}from'node:fs';import{CLI_BIN_NAME}from'../../constant/cli.js';import{resolve,delimiter,join}from'node:path';import{spawn}from'node:child_process';import{CliErrors}from'../../errors.js';import{checkSdkVersion,printSdkUpgradeWarning}from'../../utils/check-sdk-version.js';import{assertCliVersionSupported,checkCliVersion,printCliUpgradeWarning}from'../../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set([a164_0x3e24ef(0x94),a164_0x3e24ef(0x9d)]);function readPackageScripts(_0x3b1494){const _0x3ec3d5=a164_0x3e24ef,_0x47e9ac=resolve(_0x3b1494,_0x3ec3d5(0xc5));if(!existsSync(_0x47e9ac))return null;try{const _0x169cc8=JSON['parse'](readFileSync(_0x47e9ac,_0x3ec3d5(0xb1)));return _0x169cc8[_0x3ec3d5(0x97)]??{};}catch{return null;}}function a164_0x8146(_0x583ea5,_0x28e001){_0x583ea5=_0x583ea5-0x8c;const _0xa78c9e=a164_0xa78c();let _0x814672=_0xa78c9e[_0x583ea5];return _0x814672;}function detectPackageManager(_0x361c33){const _0x2e0730=a164_0x3e24ef;if(existsSync(resolve(_0x361c33,_0x2e0730(0x95)))||existsSync(resolve(_0x361c33,_0x2e0730(0xb8))))return _0x2e0730(0xc2);if(existsSync(resolve(_0x361c33,_0x2e0730(0x96))))return _0x2e0730(0x8e);if(existsSync(resolve(_0x361c33,'yarn.lock')))return'yarn';return _0x2e0730(0xc9);}async function versionCheck(_0x2494ea){const _0x57e4b5=a164_0x3e24ef,_0x530258=await checkCliVersion();(_0x530258[_0x57e4b5(0xb7)]||_0x530258[_0x57e4b5(0xb6)])&&(printCliUpgradeWarning(_0x530258),assertCliVersionSupported(_0x530258));const _0x3ac32d=await checkSdkVersion(_0x2494ea);if(_0x3ac32d['needsUpgrade'])printSdkUpgradeWarning(_0x3ac32d);}function spawnScript(_0x3d08ac,_0x30da5e,_0xed3c53,_0x26f40e){return new Promise((_0x5ac411,_0x7fbdc8)=>{const _0x9b0bb9=a164_0x8146,_0xbd4fb7=[_0x9b0bb9(0xa7),_0x30da5e,..._0xed3c53],_0x130be0=spawn(_0x3d08ac,_0xbd4fb7,{'cwd':_0x26f40e,'stdio':_0x9b0bb9(0xc4),'shell':!![],'env':{...process.env,'PATH':''+join(_0x26f40e,_0x9b0bb9(0xc6),_0x9b0bb9(0x8c))+delimiter+process.env.PATH}});_0x130be0['on'](_0x9b0bb9(0xc8),_0x956290=>{const _0x543163=_0x9b0bb9;if(_0x956290===0x0||_0x956290===null)_0x5ac411();else _0x7fbdc8(new Error(_0x3d08ac+_0x543163(0xa1)+_0x30da5e+_0x543163(0xbd)+_0x956290));}),_0x130be0['on']('error',_0x7fbdc8);});}function spawnViteBuildWatch(_0x35c09f){return new Promise((_0x14f520,_0xa61ef9)=>{const _0x7b873=a164_0x8146,_0x485a5f=spawn('vite',['build',_0x7b873(0xab)],{'cwd':_0x35c09f,'stdio':_0x7b873(0xc4),'shell':!![],'env':{...process.env,'PATH':''+join(_0x35c09f,_0x7b873(0xc6),_0x7b873(0x8c))+delimiter+process.env.PATH}});_0x485a5f['on']('close',_0x2970d8=>{const _0x3e9df3=_0x7b873;if(_0x2970d8===0x0||_0x2970d8===null)_0x14f520();else _0xa61ef9(new Error(_0x3e9df3(0x9e)+_0x2970d8));}),_0x485a5f['on'](_0x7b873(0x8d),_0xa61ef9);});}function a164_0xa78c(){const _0x457be9=['9zpxHCD','close','npm','627GhdTAO','args','.bin','error','pnpm','389109pPQPXW','vite\x20preview\x20exited\x20with\x20code\x20','join','keys','has','start','bun.lockb','pnpm-lock.yaml','scripts','\x22\x20not\x20found\x20in\x20package.json.','4440496JmyewD','251108UtwIEP','validation','78ZKIhEP','dev','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','\x20\x20\x20\x20','\x20run\x20preview','\x20run\x20','No\x20package.json\x20found\x20in\x20current\x20directory.','Script\x20\x22','preview','115JNkezE','push','run','1107168XlWPrC','\x20run\x20build','all','--watch','cwd','(none)','No\x20scripts\x20defined\x20in\x20package.json.','vite','log','utf-8','2219308YMJbXQ','bool','Available:\x20','watch','belowMinimum','needsUpgrade','bun.lock','\x20\x20EXAMPLES','Enable\x20watch\x20mode\x20for\x20preview','boolean','length','\x20exited\x20with\x20code\x20','814196KBbkfV','1023970lQpfrQ','\x20run\x20<script>\x0a','\x20run\x20start','bun','Run\x20a\x20package.json\x20script','inherit','package.json','node_modules'];a164_0xa78c=function(){return _0x457be9;};return a164_0xa78c();}function spawnVitePreview(_0x568709){return new Promise((_0x3b0834,_0x3f6469)=>{const _0xf67b75=a164_0x8146,_0xe43ac4=spawn(_0xf67b75(0xaf),[_0xf67b75(0xa4)],{'cwd':_0x568709,'stdio':_0xf67b75(0xc4),'shell':!![],'env':{...process.env,'PATH':''+join(_0x568709,_0xf67b75(0xc6),_0xf67b75(0x8c))+delimiter+process.env.PATH}});_0xe43ac4['on'](_0xf67b75(0xc8),_0x543b9a=>{const _0x4ac8d7=_0xf67b75;if(_0x543b9a===0x0||_0x543b9a===null)_0x3b0834();else _0x3f6469(new Error(_0x4ac8d7(0x90)+_0x543b9a));}),_0xe43ac4['on'](_0xf67b75(0x8d),_0x3f6469);});}const runFlags=[{'name':'watch','type':a164_0x3e24ef(0xbb),'description':a164_0x3e24ef(0xba),'default':![]}];export const runDefinition={'service':a164_0x3e24ef(0xa7),'command':a164_0x3e24ef(0xa7),'description':a164_0x3e24ef(0xc3),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'script','description':'Script\x20name\x20defined\x20in\x20package.json','required':![]}],'flags':runFlags,'helpExtra':()=>{const _0x588f4a=a164_0x3e24ef,_0x33dbb3=[];return _0x33dbb3['push'](_0x588f4a(0xb9)),_0x33dbb3[_0x588f4a(0xa6)](_0x588f4a(0x9f)+CLI_BIN_NAME+_0x588f4a(0xc1)),_0x33dbb3[_0x588f4a(0xa6)](_0x588f4a(0x9f)+CLI_BIN_NAME+_0x588f4a(0xa9)),_0x33dbb3['push'](_0x588f4a(0x9f)+CLI_BIN_NAME+_0x588f4a(0xa0)),_0x33dbb3[_0x588f4a(0xa6)](_0x588f4a(0x9f)+CLI_BIN_NAME+'\x20run\x20preview\x20--watch'),_0x33dbb3[_0x588f4a(0x91)]('\x0a');},async 'execute'(_0x243974){const _0x305169=a164_0x3e24ef,_0x5808ce=process[_0x305169(0xac)](),_0x4f6ae0=_0x243974[_0x305169(0xcb)][0x0],_0x29f845=_0x243974[_0x305169(0xcb)]['slice'](0x1),_0x2dcd6d=readPackageScripts(_0x5808ce);if(!_0x2dcd6d)throw CliErrors['validation'](_0x305169(0xa2));if(!_0x4f6ae0){const _0x1cbcfc=Object[_0x305169(0x92)](_0x2dcd6d);if(_0x1cbcfc[_0x305169(0xbc)]===0x0)console[_0x305169(0xb0)](_0x305169(0xae));else{console[_0x305169(0xb0)]('\x0a\x20\x20Available\x20scripts:\x0a');for(const _0x503c94 of _0x1cbcfc){console['log'](_0x305169(0x9f)+_0x503c94);}console[_0x305169(0xb0)]('\x0a\x20\x20Usage:\x20'+CLI_BIN_NAME+_0x305169(0xc0));}return{'ok':!![]};}if(!_0x2dcd6d[_0x4f6ae0])throw CliErrors[_0x305169(0x9b)](_0x305169(0xa3)+_0x4f6ae0+_0x305169(0x98),_0x305169(0xb4)+(Object['keys'](_0x2dcd6d)[_0x305169(0x91)](',\x20')||_0x305169(0xad)));const _0x8e3403=detectPackageManager(_0x5808ce);VERSION_CHECK_SCRIPTS[_0x305169(0x93)](_0x4f6ae0)&&await versionCheck(_0x5808ce);if(_0x4f6ae0===_0x305169(0xa4)&&_0x243974[_0x305169(0xb3)](_0x305169(0xb5)))return await Promise[_0x305169(0xaa)]([spawnViteBuildWatch(_0x5808ce),spawnVitePreview(_0x5808ce)]),{'ok':!![]};return await spawnScript(_0x8e3403,_0x4f6ae0,_0x29f845,_0x5808ce),{'ok':!![]};}};
@@ -1 +1 @@
1
- const a165_0x1d8312=a165_0x38ed;function a165_0x38ed(_0x5bc4e3,_0x36bb01){_0x5bc4e3=_0x5bc4e3-0x67;const _0x4c2467=a165_0x4c24();let _0x38ed3b=_0x4c2467[_0x5bc4e3];return _0x38ed3b;}(function(_0x4a5357,_0x3ea57d){const _0x44ac65=a165_0x38ed,_0x4b9a82=_0x4a5357();while(!![]){try{const _0x26f485=-parseInt(_0x44ac65(0x6d))/0x1*(-parseInt(_0x44ac65(0x6e))/0x2)+parseInt(_0x44ac65(0x6f))/0x3*(parseInt(_0x44ac65(0x69))/0x4)+-parseInt(_0x44ac65(0x74))/0x5*(parseInt(_0x44ac65(0x70))/0x6)+parseInt(_0x44ac65(0x6c))/0x7*(-parseInt(_0x44ac65(0x76))/0x8)+-parseInt(_0x44ac65(0x75))/0x9+parseInt(_0x44ac65(0x67))/0xa*(parseInt(_0x44ac65(0x6a))/0xb)+-parseInt(_0x44ac65(0x72))/0xc*(-parseInt(_0x44ac65(0x73))/0xd);if(_0x26f485===_0x3ea57d)break;else _0x4b9a82['push'](_0x4b9a82['shift']());}catch(_0x2604a2){_0x4b9a82['push'](_0x4b9a82['shift']());}}}(a165_0x4c24,0xe4862));function a165_0x4c24(){const _0x552f66=['13lsAsrG','5AtoXmt','16010748UVURUn','80HxKCLb','70ZmcSBn','schema','16bweyWK','649JrznZr','json','728266fBLTRu','489347BIhPsb','2SQZhMj','688236azXsbB','7147482tJtqTF','Export\x20machine-readable\x20command\x20schema\x20(JSON)','42470700tXZwEk'];a165_0x4c24=function(){return _0x552f66;};return a165_0x4c24();}import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x48e7e9){const _0x47e83e=await buildSchemaPayload();return{'ok':!![],'data':_0x47e83e};}export const schemaDefinition={'service':a165_0x1d8312(0x68),'command':'export','description':a165_0x1d8312(0x71),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a165_0x1d8312(0x6b),'flags':[],'execute':execute};
1
+ const a165_0x36eaf0=a165_0x5462;(function(_0x71699e,_0x55560d){const _0x24b80e=a165_0x5462,_0x575913=_0x71699e();while(!![]){try{const _0x13806f=parseInt(_0x24b80e(0x1bd))/0x1+-parseInt(_0x24b80e(0x1bb))/0x2+parseInt(_0x24b80e(0x1c3))/0x3+-parseInt(_0x24b80e(0x1b9))/0x4*(-parseInt(_0x24b80e(0x1c5))/0x5)+parseInt(_0x24b80e(0x1c6))/0x6*(-parseInt(_0x24b80e(0x1c4))/0x7)+-parseInt(_0x24b80e(0x1bc))/0x8+parseInt(_0x24b80e(0x1bf))/0x9*(-parseInt(_0x24b80e(0x1c0))/0xa);if(_0x13806f===_0x55560d)break;else _0x575913['push'](_0x575913['shift']());}catch(_0x28f361){_0x575913['push'](_0x575913['shift']());}}}(a165_0x5f17,0x5c14a));function a165_0x5462(_0x656a8,_0x2c8acc){_0x656a8=_0x656a8-0x1b9;const _0x5f17e6=a165_0x5f17();let _0x546264=_0x5f17e6[_0x656a8];return _0x546264;}import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x8616d2){const _0x4f4383=await buildSchemaPayload();return{'ok':!![],'data':_0x4f4383};}export const schemaDefinition={'service':a165_0x36eaf0(0x1c2),'command':a165_0x36eaf0(0x1c1),'description':'Export\x20machine-readable\x20command\x20schema\x20(JSON)','risk':a165_0x36eaf0(0x1be),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'defaultOutputFormat':a165_0x36eaf0(0x1ba),'flags':[],'execute':execute};function a165_0x5f17(){const _0x1f1cd9=['844462XhUfWQ','136304xpyZYK','331890mOQKAv','read','9fySJVx','3102640WIOKwp','export','schema','1237341azeWnF','196ImGWcs','742310fHfZNL','13506FDquNt','12oejScJ','json'];a165_0x5f17=function(){return _0x1f1cd9;};return a165_0x5f17();}
@@ -1 +1 @@
1
- const a166_0x327c5e=a166_0x37ac;(function(_0x1cf99a,_0x5ec971){const _0x351cc5=a166_0x37ac,_0x2177bd=_0x1cf99a();while(!![]){try{const _0x3df1de=-parseInt(_0x351cc5(0x1e4))/0x1+parseInt(_0x351cc5(0x1d7))/0x2+parseInt(_0x351cc5(0x1d3))/0x3*(-parseInt(_0x351cc5(0x1df))/0x4)+-parseInt(_0x351cc5(0x1d4))/0x5*(parseInt(_0x351cc5(0x1f8))/0x6)+-parseInt(_0x351cc5(0x1bf))/0x7*(parseInt(_0x351cc5(0x1fa))/0x8)+-parseInt(_0x351cc5(0x1c7))/0x9+parseInt(_0x351cc5(0x1c0))/0xa;if(_0x3df1de===_0x5ec971)break;else _0x2177bd['push'](_0x2177bd['shift']());}catch(_0x303718){_0x2177bd['push'](_0x2177bd['shift']());}}}(a166_0x37f1,0x6bb81));function a166_0x37f1(){const _0x50b97a=['SQL\x20名称不能为空','description','dbName','appCode','high-risk-write','--db-id\x20is\x20required\x20in\x20non-interactive\x20mode.','catch','5124189FIkknF','28623780crSVpt','SQL\x20query\x20display\x20name','请选择本地\x20SQL\x20模式:','--mode\x20is\x20required\x20in\x20non-interactive\x20mode.','--name\x20is\x20required\x20in\x20non-interactive\x20mode.','请输入目标数据库\x20dbId:','POST','5285241cGEASP','sql','parse','str','mode','flagMissing','Created\x20SQL\x20query\x20','<select\x20id=\x22query\x22\x20resultType=\x22map\x22>','</select>','Local\x20SQL\x20file\x20mode','\x20\x20SELECT\x201\x20AS\x20id','trim','869163hoFMLx','5eQPsdw','name','File\x20already\x20exists:\x20','30018yOWXwo','Target\x20database\x20ID','普通\x20SQL(sql)','mybatisXml','Would\x20create\x20a\x20new\x20SQL\x20query\x20and\x20scaffold\x20it\x20under\x20','map','flag','适合带动态标签的\x20MyBatis\x20XML\x20SQL','4bbUjKb','string','create','length','sqlName','340107dfHJZi','join','sqlRoot','new','lockFilePath','请选择目标数据库:','isFinite','sqls','isInteger','__manual__','dbId','sqlCode','toISOString','nonInteractive','validation','<server-generated-sqlCode>','db-id','SELECT\x201\x20AS\x20id;','适合直接执行的普通\x20SELECT\x20/\x20INSERT\x20/\x20UPDATE\x20/\x20DELETE\x20语句','number','2922396aHNqYM','Invalid\x20database\x20selection\x20payload:\x20','8yGpHhT','sqlRootDir','请输入\x20SQL\x20名称:'];a166_0x37f1=function(){return _0x50b97a;};return a166_0x37f1();}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';function a166_0x37ac(_0x2a4050,_0x19f194){_0x2a4050=_0x2a4050-0x1bf;const _0x37f1dd=a166_0x37f1();let _0x37acb4=_0x37f1dd[_0x2a4050];return _0x37acb4;}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(_0x466c35){const _0x398a65=a166_0x37ac;if(_0x466c35===_0x398a65(0x1da))return[_0x398a65(0x1ce),_0x398a65(0x1d1),_0x398a65(0x1cf),'']['join']('\x0a');return[_0x398a65(0x1f5),''][_0x398a65(0x1e5)]('\x0a');}export const sqlCreate={'service':'sql','command':a166_0x327c5e(0x1e1),'description':'Create\x20a\x20new\x20custom\x20SQL\x20and\x20scaffold\x20it\x20locally','risk':a166_0x327c5e(0x201),'flags':[{'name':a166_0x327c5e(0x1d5),'type':'string','description':a166_0x327c5e(0x1c1)},{'name':a166_0x327c5e(0x1f4),'type':a166_0x327c5e(0x1f7),'description':a166_0x327c5e(0x1d8)},{'name':a166_0x327c5e(0x1cb),'type':a166_0x327c5e(0x1e0),'enum':[a166_0x327c5e(0x1c8),a166_0x327c5e(0x1da)],'description':a166_0x327c5e(0x1d0)}],async 'validate'(_0x430456){const _0x254dc1=a166_0x327c5e;if(!_0x430456['nonInteractive'])return;if(!_0x430456[_0x254dc1(0x1ca)](_0x254dc1(0x1d5))[_0x254dc1(0x1d2)]())throw CliErrors['flagMissing'](_0x254dc1(0x1d5),_0x254dc1(0x1c4));const _0x14281c=resolveProvidedDbId(_0x430456);if(typeof _0x14281c!=='number'||!Number[_0x254dc1(0x1ea)](_0x14281c)||_0x14281c<=0x0)throw CliErrors['flagMissing'](_0x254dc1(0x1f4),_0x254dc1(0x202));if(!_0x430456[_0x254dc1(0x1ca)](_0x254dc1(0x1cb))[_0x254dc1(0x1d2)]())throw CliErrors[_0x254dc1(0x1cc)](_0x254dc1(0x1cb),_0x254dc1(0x1c3));},async 'dryRun'(_0x4780f2){const _0x32dc37=a166_0x327c5e,_0x3c1d56=loadSqlProjectConfig(_0x4780f2[_0x32dc37(0x200)]),{sqlName:_0x33b1a2,dbId:_0xd30844,dbName:_0x54d373,mode:_0x58d9e6}=await resolveSqlNewInputs(_0x4780f2),_0x278523=buildSqlRelativePath(_0x32dc37(0x1f3),_0x33b1a2,_0x54d373,_0x58d9e6,_0xd30844),_0x188c21=_0x3c1d56[_0x32dc37(0x1fb)]+'/'+_0x278523;return{'method':_0x32dc37(0x1c6),'url':'/smartapi/custom/saveUserCustomSql','body':{'appCode':_0x4780f2[_0x32dc37(0x200)],'sqlName':_0x33b1a2,'dbId':_0xd30844,'mode':_0x58d9e6,'localPath':_0x188c21},'description':_0x32dc37(0x1db)+_0x3c1d56[_0x32dc37(0x1fb)]};},async 'execute'(_0x41dc3c){const _0x226745=a166_0x327c5e,_0x5e451d=loadSqlProjectConfig(_0x41dc3c[_0x226745(0x200)]),{sqlName:_0x42f439,dbId:_0x1936c2,dbName:_0x1a7018,mode:_0x33ed77}=await resolveSqlNewInputs(_0x41dc3c),_0x4cb2d5=generateSqlTemplate(_0x33ed77),_0x18e9e6=await createSqlQuery({'appCode':_0x41dc3c[_0x226745(0x200)],'sqlName':_0x42f439,'dbId':_0x1936c2,'sqlContent':_0x4cb2d5}),_0x485cfa=ensureRemoteSqlContent(_0x18e9e6),_0x54fdda=_0x1a7018||await getDbName(_0x41dc3c[_0x226745(0x200)],_0x1936c2)[_0x226745(0x203)](()=>undefined),_0x10f909=buildSqlRelativePath(_0x18e9e6[_0x226745(0x1ef)],_0x18e9e6[_0x226745(0x1e3)],_0x54fdda,_0x33ed77,_0x1936c2),_0x3551be=_0x5e451d[_0x226745(0x1fb)]+'/'+_0x10f909,_0x5c46e5=buildLocalSqlFileContent({'sqlCode':_0x18e9e6[_0x226745(0x1ef)],'sqlName':_0x18e9e6[_0x226745(0x1e3)],'dbId':_0x18e9e6['dbId']},_0x485cfa,{'dbName':_0x54fdda,'mode':_0x33ed77,'syncedAt':new Date()[_0x226745(0x1f0)](),'description':_0x18e9e6[_0x226745(0x1fe)]});if(await fileExists(_0x3551be))throw CliErrors[_0x226745(0x1f2)](_0x226745(0x1d6)+_0x3551be);await ensureParentDirectory(_0x3551be),await writeFile(_0x3551be,_0x5c46e5,'utf8');const _0x1ea4f0=await readSqlLockFile(_0x5e451d[_0x226745(0x1e8)]),{lockData:_0x3bca2b,appLock:_0x316d45}=ensureSqlLockScope(_0x1ea4f0??createEmptySqlLock(),_0x5e451d[_0x226745(0x200)],_0x5e451d[_0x226745(0x1e6)],_0x226745(0x1e7));return _0x316d45[_0x226745(0x1eb)][_0x18e9e6[_0x226745(0x1ef)]]={...buildSqlLockEntry(_0x18e9e6,_0x485cfa,computeSqlContentHash(_0x5c46e5),{'dbName':_0x54fdda}),'path':_0x10f909,'mode':_0x33ed77},_0x316d45['lastSync']=new Date()[_0x226745(0x1f0)](),await writeSqlLockFile(_0x5e451d[_0x226745(0x1e8)],_0x3bca2b),{'ok':!![],'data':{'id':_0x18e9e6['id'],'sqlCode':_0x18e9e6[_0x226745(0x1ef)],'sqlName':_0x18e9e6['sqlName'],'dbId':_0x18e9e6['dbId'],'path':_0x3551be,'mode':_0x33ed77},'message':_0x226745(0x1cd)+_0x18e9e6['sqlCode']};}};async function resolveSqlNewInputs(_0xf3ea01){const _0x45904e=await resolveSqlNameInput(_0xf3ea01),{dbId:_0x1b3599,dbName:_0x536a5e}=await resolveDbSelection(_0xf3ea01),_0x532168=await resolveSqlModeInput(_0xf3ea01);return{'sqlName':_0x45904e,'dbId':_0x1b3599,'dbName':_0x536a5e,'mode':_0x532168};}async function resolveSqlNameInput(_0x1a975c){const _0x40d247=a166_0x327c5e,_0x4c0a83=_0x1a975c[_0x40d247(0x1ca)]('name')[_0x40d247(0x1d2)]();if(_0x4c0a83)return _0x4c0a83;if(_0x1a975c[_0x40d247(0x1f1)])throw CliErrors[_0x40d247(0x1cc)](_0x40d247(0x1d5),_0x40d247(0x1c4));return(await input({'message':_0x40d247(0x1fc),'validate':_0x229515=>_0x229515[_0x40d247(0x1d2)]()?!![]:_0x40d247(0x1fd)}))[_0x40d247(0x1d2)]();}async function resolveDbSelection(_0x1c5837){const _0x29394b=a166_0x327c5e,_0x5f34a2=resolveProvidedDbId(_0x1c5837);if(typeof _0x5f34a2===_0x29394b(0x1f7)&&Number[_0x29394b(0x1ea)](_0x5f34a2)&&_0x5f34a2>0x0)return{'dbId':_0x5f34a2,'dbName':await getDbName(_0x1c5837['appCode'],_0x5f34a2)[_0x29394b(0x203)](()=>undefined)};if(_0x1c5837[_0x29394b(0x1f1)])throw CliErrors['flagMissing'](_0x29394b(0x1f4),_0x29394b(0x202));const _0x40d9d0=await listDatabases(_0x1c5837[_0x29394b(0x200)])['catch'](()=>[]);if(_0x40d9d0[_0x29394b(0x1e2)]===0x1)return{'dbId':_0x40d9d0[0x0][_0x29394b(0x1ee)],'dbName':_0x40d9d0[0x0][_0x29394b(0x1ff)]};if(_0x40d9d0[_0x29394b(0x1e2)]>0x1){const _0x4ce6ca=await select({'message':_0x29394b(0x1e9),'choices':[..._0x40d9d0[_0x29394b(0x1dc)](_0x2eb15d=>({'name':_0x2eb15d['dbName']+'\x20('+_0x2eb15d[_0x29394b(0x1ee)]+')','value':serializeDbSelection(_0x2eb15d)})),{'name':'✎\x20手动输入\x20dbId','value':_0x29394b(0x1ed)}]});if(_0x4ce6ca!==_0x29394b(0x1ed))return deserializeDbSelection(_0x4ce6ca);}const _0x111be8=await input({'message':_0x29394b(0x1c5),'validate':_0x1fb447=>{const _0x452e30=_0x29394b,_0x49dadb=_0x1fb447[_0x452e30(0x1d2)]();if(!_0x49dadb)return'dbId\x20不能为空';const _0x1374b4=Number(_0x49dadb);if(!Number[_0x452e30(0x1ec)](_0x1374b4)||_0x1374b4<=0x0)return'dbId\x20必须为正整数';return!![];}});return{'dbId':Number(_0x111be8[_0x29394b(0x1d2)]())};}async function resolveSqlModeInput(_0x478f6e){const _0x3c959e=a166_0x327c5e,_0xeef00=_0x478f6e[_0x3c959e(0x1ca)](_0x3c959e(0x1cb))[_0x3c959e(0x1d2)]();if(_0xeef00===_0x3c959e(0x1c8)||_0xeef00===_0x3c959e(0x1da))return _0xeef00;if(_0x478f6e[_0x3c959e(0x1f1)])throw CliErrors[_0x3c959e(0x1cc)](_0x3c959e(0x1cb),_0x3c959e(0x1c3));return await select({'message':_0x3c959e(0x1c2),'choices':[{'name':_0x3c959e(0x1d9),'value':_0x3c959e(0x1c8),'description':_0x3c959e(0x1f6)},{'name':'MyBatis\x20XML(mybatisXml)','value':_0x3c959e(0x1da),'description':_0x3c959e(0x1de)}]});}function serializeDbSelection(_0x59037c){const _0x4128d7=a166_0x327c5e;return JSON['stringify']({'dbId':_0x59037c[_0x4128d7(0x1ee)],'dbName':_0x59037c[_0x4128d7(0x1ff)]});}function deserializeDbSelection(_0x5308f0){const _0x1a6fa7=a166_0x327c5e;try{const _0xd68d0e=JSON[_0x1a6fa7(0x1c9)](_0x5308f0);if(typeof _0xd68d0e['dbId']===_0x1a6fa7(0x1f7)&&Number[_0x1a6fa7(0x1ea)](_0xd68d0e[_0x1a6fa7(0x1ee)]))return{'dbId':_0xd68d0e[_0x1a6fa7(0x1ee)],'dbName':_0xd68d0e['dbName']};}catch{}throw CliErrors[_0x1a6fa7(0x1f2)](_0x1a6fa7(0x1f9)+_0x5308f0);}function resolveProvidedDbId(_0x44da04){const _0x25d5f0=a166_0x327c5e,_0x3b1bee=_0x44da04[_0x25d5f0(0x1dd)](_0x25d5f0(0x1f4));if(typeof _0x3b1bee===_0x25d5f0(0x1f7)&&Number[_0x25d5f0(0x1ea)](_0x3b1bee))return _0x3b1bee;return undefined;}
1
+ const a166_0x3cf64e=a166_0x3f31;(function(_0x4b280d,_0x153a92){const _0x7ae830=a166_0x3f31,_0x5d0e23=_0x4b280d();while(!![]){try{const _0x4b247d=parseInt(_0x7ae830(0xb2))/0x1*(parseInt(_0x7ae830(0x99))/0x2)+-parseInt(_0x7ae830(0x7e))/0x3+-parseInt(_0x7ae830(0x9b))/0x4*(-parseInt(_0x7ae830(0xbb))/0x5)+parseInt(_0x7ae830(0xae))/0x6*(parseInt(_0x7ae830(0x87))/0x7)+parseInt(_0x7ae830(0xab))/0x8*(parseInt(_0x7ae830(0x80))/0x9)+parseInt(_0x7ae830(0x81))/0xa+-parseInt(_0x7ae830(0x7f))/0xb*(parseInt(_0x7ae830(0x92))/0xc);if(_0x4b247d===_0x153a92)break;else _0x5d0e23['push'](_0x5d0e23['shift']());}catch(_0x3e23bd){_0x5d0e23['push'](_0x5d0e23['shift']());}}}(a166_0x2caf,0x66912));function a166_0x2caf(){const _0x184d06=['--db-id\x20is\x20required\x20in\x20non-interactive\x20mode.','18bYoEef','</select>','db-id','lockFilePath','554335khSGVu','POST','toISOString','name','--name\x20is\x20required\x20in\x20non-interactive\x20mode.','--mode\x20is\x20required\x20in\x20non-interactive\x20mode.','sqlRootDir','length','catch','5xCEJbW','high-risk-write','sql','lastSync','str','description','314571gplKTZ','11MmOmNw','9ZLSNhF','1176530coLyMW','trim','appCode','__manual__','stringify','flagMissing','386554lZrjAg','sqls','validation','Create\x20a\x20new\x20custom\x20SQL\x20and\x20scaffold\x20it\x20locally','Would\x20create\x20a\x20new\x20SQL\x20query\x20and\x20scaffold\x20it\x20under\x20','dbId\x20不能为空','<server-generated-sqlCode>','<select\x20id=\x22query\x22\x20resultType=\x22map\x22>','✎\x20手动输入\x20dbId','适合带动态标签的\x20MyBatis\x20XML\x20SQL','flag','19281180zcuykM','mybatisXml','请选择目标数据库:','sqlRoot','Created\x20SQL\x20query\x20','utf8','请选择本地\x20SQL\x20模式:','2bMaPqp','mode','1965464OKAHbt','dbName','/smartapi/custom/saveUserCustomSql','普通\x20SQL(sql)','请输入\x20SQL\x20名称:','create','nonInteractive','Target\x20database\x20ID','sqlName','适合直接执行的普通\x20SELECT\x20/\x20INSERT\x20/\x20UPDATE\x20/\x20DELETE\x20语句','number','string','SQL\x20query\x20display\x20name','dbId','File\x20already\x20exists:\x20','isFinite','6421728pkXOXC','sqlCode'];a166_0x2caf=function(){return _0x184d06;};return a166_0x2caf();}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';function a166_0x3f31(_0x40154d,_0x120cf2){_0x40154d=_0x40154d-0x79;const _0x2cafd2=a166_0x2caf();let _0x3f312b=_0x2cafd2[_0x40154d];return _0x3f312b;}import{CliErrors}from'../../errors.js';import{buildLocalSqlFileContent,buildSqlLockEntry,ensureRemoteSqlContent}from'./shared.js';function generateSqlTemplate(_0x494806){const _0x1b9f7d=a166_0x3f31;if(_0x494806===_0x1b9f7d(0x93))return[_0x1b9f7d(0x8e),'\x20\x20SELECT\x201\x20AS\x20id',_0x1b9f7d(0xaf),'']['join']('\x0a');return['SELECT\x201\x20AS\x20id;','']['join']('\x0a');}export const sqlCreate={'service':a166_0x3cf64e(0x7a),'command':a166_0x3cf64e(0xa0),'description':a166_0x3cf64e(0x8a),'risk':a166_0x3cf64e(0x79),'flags':[{'name':a166_0x3cf64e(0xb5),'type':a166_0x3cf64e(0xa6),'description':a166_0x3cf64e(0xa7)},{'name':'db-id','type':a166_0x3cf64e(0xa5),'description':a166_0x3cf64e(0xa2)},{'name':a166_0x3cf64e(0x9a),'type':a166_0x3cf64e(0xa6),'enum':[a166_0x3cf64e(0x7a),'mybatisXml'],'description':'Local\x20SQL\x20file\x20mode'}],async 'validate'(_0x558b29){const _0x408255=a166_0x3cf64e;if(!_0x558b29[_0x408255(0xa1)])return;if(!_0x558b29[_0x408255(0x7c)](_0x408255(0xb5))[_0x408255(0x82)]())throw CliErrors[_0x408255(0x86)](_0x408255(0xb5),_0x408255(0xb6));const _0x34b1f1=resolveProvidedDbId(_0x558b29);if(typeof _0x34b1f1!=='number'||!Number[_0x408255(0xaa)](_0x34b1f1)||_0x34b1f1<=0x0)throw CliErrors[_0x408255(0x86)](_0x408255(0xb0),_0x408255(0xad));if(!_0x558b29[_0x408255(0x7c)](_0x408255(0x9a))['trim']())throw CliErrors['flagMissing'](_0x408255(0x9a),'--mode\x20is\x20required\x20in\x20non-interactive\x20mode.');},async 'dryRun'(_0x1e99ad){const _0x35109b=a166_0x3cf64e,_0x3fdc49=loadSqlProjectConfig(_0x1e99ad[_0x35109b(0x83)]),{sqlName:_0x5d7aa1,dbId:_0x3d945d,dbName:_0x5b4ab5,mode:_0x296fb1}=await resolveSqlNewInputs(_0x1e99ad),_0x220fa0=buildSqlRelativePath(_0x35109b(0x8d),_0x5d7aa1,_0x5b4ab5,_0x296fb1,_0x3d945d),_0x160e6e=_0x3fdc49[_0x35109b(0xb8)]+'/'+_0x220fa0;return{'method':_0x35109b(0xb3),'url':_0x35109b(0x9d),'body':{'appCode':_0x1e99ad['appCode'],'sqlName':_0x5d7aa1,'dbId':_0x3d945d,'mode':_0x296fb1,'localPath':_0x160e6e},'description':_0x35109b(0x8b)+_0x3fdc49[_0x35109b(0xb8)]};},async 'execute'(_0x208343){const _0x2e4af2=a166_0x3cf64e,_0x49a4b5=loadSqlProjectConfig(_0x208343[_0x2e4af2(0x83)]),{sqlName:_0x297f51,dbId:_0x5b3973,dbName:_0x8f3107,mode:_0x3a4199}=await resolveSqlNewInputs(_0x208343),_0x595f20=generateSqlTemplate(_0x3a4199),_0x262c29=await createSqlQuery({'appCode':_0x208343[_0x2e4af2(0x83)],'sqlName':_0x297f51,'dbId':_0x5b3973,'sqlContent':_0x595f20}),_0x5094fc=ensureRemoteSqlContent(_0x262c29),_0x5509e1=_0x8f3107||await getDbName(_0x208343[_0x2e4af2(0x83)],_0x5b3973)[_0x2e4af2(0xba)](()=>undefined),_0x358df0=buildSqlRelativePath(_0x262c29[_0x2e4af2(0xac)],_0x262c29['sqlName'],_0x5509e1,_0x3a4199,_0x5b3973),_0x23495b=_0x49a4b5[_0x2e4af2(0xb8)]+'/'+_0x358df0,_0x4c9c3b=buildLocalSqlFileContent({'sqlCode':_0x262c29[_0x2e4af2(0xac)],'sqlName':_0x262c29[_0x2e4af2(0xa3)],'dbId':_0x262c29[_0x2e4af2(0xa8)]},_0x5094fc,{'dbName':_0x5509e1,'mode':_0x3a4199,'syncedAt':new Date()[_0x2e4af2(0xb4)](),'description':_0x262c29[_0x2e4af2(0x7d)]});if(await fileExists(_0x23495b))throw CliErrors[_0x2e4af2(0x89)](_0x2e4af2(0xa9)+_0x23495b);await ensureParentDirectory(_0x23495b),await writeFile(_0x23495b,_0x4c9c3b,_0x2e4af2(0x97));const _0x3ca64c=await readSqlLockFile(_0x49a4b5[_0x2e4af2(0xb1)]),{lockData:_0x5932d4,appLock:_0x219024}=ensureSqlLockScope(_0x3ca64c??createEmptySqlLock(),_0x49a4b5[_0x2e4af2(0x83)],_0x49a4b5[_0x2e4af2(0x95)],'new');return _0x219024[_0x2e4af2(0x88)][_0x262c29[_0x2e4af2(0xac)]]={...buildSqlLockEntry(_0x262c29,_0x5094fc,computeSqlContentHash(_0x4c9c3b),{'dbName':_0x5509e1}),'path':_0x358df0,'mode':_0x3a4199},_0x219024[_0x2e4af2(0x7b)]=new Date()[_0x2e4af2(0xb4)](),await writeSqlLockFile(_0x49a4b5[_0x2e4af2(0xb1)],_0x5932d4),{'ok':!![],'data':{'id':_0x262c29['id'],'sqlCode':_0x262c29[_0x2e4af2(0xac)],'sqlName':_0x262c29['sqlName'],'dbId':_0x262c29[_0x2e4af2(0xa8)],'path':_0x23495b,'mode':_0x3a4199},'message':_0x2e4af2(0x96)+_0x262c29[_0x2e4af2(0xac)]};}};async function resolveSqlNewInputs(_0x39edd4){const _0x212aac=await resolveSqlNameInput(_0x39edd4),{dbId:_0x1f56ad,dbName:_0x161fc5}=await resolveDbSelection(_0x39edd4),_0x2538ba=await resolveSqlModeInput(_0x39edd4);return{'sqlName':_0x212aac,'dbId':_0x1f56ad,'dbName':_0x161fc5,'mode':_0x2538ba};}async function resolveSqlNameInput(_0x1b147c){const _0x563533=a166_0x3cf64e,_0xa7f95d=_0x1b147c[_0x563533(0x7c)]('name')[_0x563533(0x82)]();if(_0xa7f95d)return _0xa7f95d;if(_0x1b147c[_0x563533(0xa1)])throw CliErrors[_0x563533(0x86)]('name',_0x563533(0xb6));return(await input({'message':_0x563533(0x9f),'validate':_0x2e9b7e=>_0x2e9b7e['trim']()?!![]:'SQL\x20名称不能为空'}))[_0x563533(0x82)]();}async function resolveDbSelection(_0x4f4d50){const _0xf837bf=a166_0x3cf64e,_0x244e36=resolveProvidedDbId(_0x4f4d50);if(typeof _0x244e36===_0xf837bf(0xa5)&&Number[_0xf837bf(0xaa)](_0x244e36)&&_0x244e36>0x0)return{'dbId':_0x244e36,'dbName':await getDbName(_0x4f4d50[_0xf837bf(0x83)],_0x244e36)[_0xf837bf(0xba)](()=>undefined)};if(_0x4f4d50[_0xf837bf(0xa1)])throw CliErrors[_0xf837bf(0x86)](_0xf837bf(0xb0),_0xf837bf(0xad));const _0x3a8530=await listDatabases(_0x4f4d50['appCode'])[_0xf837bf(0xba)](()=>[]);if(_0x3a8530[_0xf837bf(0xb9)]===0x1)return{'dbId':_0x3a8530[0x0][_0xf837bf(0xa8)],'dbName':_0x3a8530[0x0][_0xf837bf(0x9c)]};if(_0x3a8530[_0xf837bf(0xb9)]>0x1){const _0xe2b1c5=await select({'message':_0xf837bf(0x94),'choices':[..._0x3a8530['map'](_0xef2951=>({'name':_0xef2951['dbName']+'\x20('+_0xef2951[_0xf837bf(0xa8)]+')','value':serializeDbSelection(_0xef2951)})),{'name':_0xf837bf(0x8f),'value':'__manual__'}]});if(_0xe2b1c5!==_0xf837bf(0x84))return deserializeDbSelection(_0xe2b1c5);}const _0x4ad779=await input({'message':'请输入目标数据库\x20dbId:','validate':_0x4b78f8=>{const _0x1c923f=_0xf837bf,_0x131639=_0x4b78f8[_0x1c923f(0x82)]();if(!_0x131639)return _0x1c923f(0x8c);const _0x2c851e=Number(_0x131639);if(!Number['isInteger'](_0x2c851e)||_0x2c851e<=0x0)return'dbId\x20必须为正整数';return!![];}});return{'dbId':Number(_0x4ad779[_0xf837bf(0x82)]())};}async function resolveSqlModeInput(_0x23b164){const _0x546b05=a166_0x3cf64e,_0x449471=_0x23b164[_0x546b05(0x7c)]('mode')[_0x546b05(0x82)]();if(_0x449471===_0x546b05(0x7a)||_0x449471===_0x546b05(0x93))return _0x449471;if(_0x23b164[_0x546b05(0xa1)])throw CliErrors['flagMissing'](_0x546b05(0x9a),_0x546b05(0xb7));return await select({'message':_0x546b05(0x98),'choices':[{'name':_0x546b05(0x9e),'value':_0x546b05(0x7a),'description':_0x546b05(0xa4)},{'name':'MyBatis\x20XML(mybatisXml)','value':_0x546b05(0x93),'description':_0x546b05(0x90)}]});}function serializeDbSelection(_0x58c014){const _0x51944b=a166_0x3cf64e;return JSON[_0x51944b(0x85)]({'dbId':_0x58c014[_0x51944b(0xa8)],'dbName':_0x58c014[_0x51944b(0x9c)]});}function deserializeDbSelection(_0x33dca3){const _0x260123=a166_0x3cf64e;try{const _0x464fa7=JSON['parse'](_0x33dca3);if(typeof _0x464fa7[_0x260123(0xa8)]===_0x260123(0xa5)&&Number[_0x260123(0xaa)](_0x464fa7[_0x260123(0xa8)]))return{'dbId':_0x464fa7[_0x260123(0xa8)],'dbName':_0x464fa7[_0x260123(0x9c)]};}catch{}throw CliErrors[_0x260123(0x89)]('Invalid\x20database\x20selection\x20payload:\x20'+_0x33dca3);}function resolveProvidedDbId(_0x34e3e6){const _0x32e7af=a166_0x3cf64e,_0x10d983=_0x34e3e6[_0x32e7af(0x91)]('db-id');if(typeof _0x10d983===_0x32e7af(0xa5)&&Number[_0x32e7af(0xaa)](_0x10d983))return _0x10d983;return undefined;}
@@ -1 +1 @@
1
- const a167_0x5da502=a167_0x4951;(function(_0x504453,_0x362375){const _0x2e19c9=a167_0x4951,_0x3c0e02=_0x504453();while(!![]){try{const _0x24a101=parseInt(_0x2e19c9(0x107))/0x1+-parseInt(_0x2e19c9(0xf6))/0x2*(-parseInt(_0x2e19c9(0xfc))/0x3)+parseInt(_0x2e19c9(0xf2))/0x4*(-parseInt(_0x2e19c9(0xee))/0x5)+-parseInt(_0x2e19c9(0x10b))/0x6*(parseInt(_0x2e19c9(0x104))/0x7)+-parseInt(_0x2e19c9(0xfa))/0x8+-parseInt(_0x2e19c9(0xed))/0x9*(parseInt(_0x2e19c9(0x10e))/0xa)+parseInt(_0x2e19c9(0xef))/0xb;if(_0x24a101===_0x362375)break;else _0x3c0e02['push'](_0x3c0e02['shift']());}catch(_0x36efaf){_0x3c0e02['push'](_0x3c0e02['shift']());}}}(a167_0x5482,0x2a3eb));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';function a167_0x5482(){const _0x5a15bf=['remoteId','delete','Deleted\x20','56WhQlaK','POST','str','sqlRoot','369408nxlqSg','No\x20SQL\x20lock\x20entry\x20found\x20for\x20\x22','29523Lvqggn','lockFilePath','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20','Delete\x20a\x20SQL\x20query\x20from\x20remote\x20and\x20local','trashDir','SQL\x20lock\x20file\x20not\x20found.\x20Run\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first.','high-risk-write','/smartapi/custom/deleteUserCustomSql','14xsWcAj','validation','sqls','320884PLkdMv','fromEntries','sqlRootDir','appCode','340506peZalS','toISOString','entries','20atrDjb','207639ZMFklb','20crlLKB','814869KSLcxk','sqlcode','\x20(local\x20file\x20moved\x20to\x20trash)','291656wQwnFi'];a167_0x5482=function(){return _0x5a15bf;};return a167_0x5482();}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';function a167_0x4951(_0x7524c,_0x58778d){_0x7524c=_0x7524c-0xed;const _0x548280=a167_0x5482();let _0x49514e=_0x548280[_0x7524c];return _0x49514e;}import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const sqlDelete={'service':'sql','command':a167_0x5da502(0xf4),'description':a167_0x5da502(0xff),'risk':a167_0x5da502(0x102),'flags':[SQLCODE_FLAG],async 'validate'(_0x27f92d){const _0x9e1f03=a167_0x5da502,_0x223f02=loadSqlProjectConfig(_0x27f92d[_0x9e1f03(0x10a)]),_0x4f1136=await readSqlLockFile(_0x223f02[_0x9e1f03(0xfd)]);if(!_0x4f1136)throw CliErrors[_0x9e1f03(0x105)](_0x9e1f03(0x101));},async 'dryRun'(_0x164c33){const _0x545afe=a167_0x5da502,_0x44d5f4=loadSqlProjectConfig(_0x164c33['appCode']),_0xc13881=await readSqlLockFile(_0x44d5f4['lockFilePath']);if(!_0xc13881)throw CliErrors[_0x545afe(0x105)](_0x545afe(0x101));const {appLock:_0x593f50}=ensureSqlLockScope(_0xc13881,_0x164c33[_0x545afe(0x10a)],_0x44d5f4[_0x545afe(0xf9)],_0x545afe(0xf4)),_0x4d7d35=_0x164c33[_0x545afe(0xf8)]('sqlcode'),_0x2ce56d=_0x593f50[_0x545afe(0x106)][_0x4d7d35];if(!_0x2ce56d)throw CliErrors[_0x545afe(0x105)](_0x545afe(0xfb)+_0x4d7d35+'\x22.');return{'method':_0x545afe(0xf7),'url':_0x545afe(0x103),'body':{'sqlCode':_0x4d7d35,'id':_0x2ce56d[_0x545afe(0xf3)],'localPath':resolveLocalSqlFilePath(_0x44d5f4,_0x4d7d35,_0x2ce56d)},'description':'Would\x20delete\x20SQL\x20'+_0x4d7d35+_0x545afe(0xfe)+_0x44d5f4['trashDir']};},async 'execute'(_0x7262d2){const _0x29915d=a167_0x5da502,_0x48ee6d=loadSqlProjectConfig(_0x7262d2[_0x29915d(0x10a)]),_0x4e0d4b=await readSqlLockFile(_0x48ee6d['lockFilePath']);if(!_0x4e0d4b)throw CliErrors[_0x29915d(0x105)]('SQL\x20lock\x20file\x20not\x20found.');const {lockData:_0x3cf31f,appLock:_0x43040e}=ensureSqlLockScope(_0x4e0d4b,_0x7262d2['appCode'],_0x48ee6d['sqlRoot'],_0x29915d(0xf4)),_0x3f4d96=_0x7262d2[_0x29915d(0xf8)](_0x29915d(0xf0)),_0x2d6b09=_0x43040e[_0x29915d(0x106)][_0x3f4d96];if(!_0x2d6b09)throw CliErrors[_0x29915d(0x105)]('No\x20SQL\x20lock\x20entry\x20found\x20for\x20\x22'+_0x3f4d96+'\x22.');await deleteSqlQuery({'id':_0x2d6b09['remoteId'],'sqlCode':_0x3f4d96}),_0x43040e[_0x29915d(0x106)]=Object[_0x29915d(0x108)](Object[_0x29915d(0x10d)](_0x43040e[_0x29915d(0x106)])['filter'](([_0x35e4c6])=>_0x35e4c6!==_0x3f4d96)),_0x43040e['lastSync']=new Date()[_0x29915d(0x10c)](),await writeSqlLockFile(_0x48ee6d[_0x29915d(0xfd)],_0x3cf31f);const _0x23b98f=resolveLocalSqlFilePath(_0x48ee6d,_0x3f4d96,_0x2d6b09);let _0x2f2d6e;await fileExists(_0x23b98f)&&(_0x2f2d6e=await moveToTrash(_0x48ee6d['projectRoot'],_0x48ee6d[_0x29915d(0x100)],_0x23b98f),await cleanupEmptyDirectories(dirname(_0x23b98f),_0x48ee6d[_0x29915d(0x109)]));const _0x3d074d={'deleted':_0x3f4d96,'remoteId':_0x2d6b09[_0x29915d(0xf3)]};if(_0x2f2d6e)_0x3d074d['trashedTo']=_0x2f2d6e;return{'ok':!![],'data':_0x3d074d,'message':_0x29915d(0xf5)+_0x3f4d96+(_0x2f2d6e?_0x29915d(0xf1):'')};}};async function moveToTrash(_0x2a4d48,_0xb2a246,_0x55d876){const _0x4f595f=a167_0x5da502,_0x37c486=new Date()[_0x4f595f(0x10c)]()['replace'](/[:.]/g,'-'),_0x19f876=relative(_0x2a4d48,_0x55d876),_0x1ce5a3=join(_0xb2a246,_0x37c486,_0x19f876);return await mkdir(dirname(_0x1ce5a3),{'recursive':!![]}),await rename(_0x55d876,_0x1ce5a3),_0x1ce5a3;}async function cleanupEmptyDirectories(_0x27eee5,_0x4b5e91){let _0x10edd0=resolve(_0x27eee5);const _0x396c1e=resolve(_0x4b5e91);while(_0x10edd0['startsWith'](''+_0x396c1e+sep)||_0x10edd0===_0x396c1e){if(_0x10edd0===_0x396c1e)return;try{const _0x149952=await readdir(_0x10edd0);if(_0x149952['length']>0x0)return;await rmdir(_0x10edd0);}catch{return;}_0x10edd0=dirname(_0x10edd0);}}
1
+ const a167_0x1a6b2c=a167_0x1681;(function(_0x590953,_0x43af1f){const _0xbdc4da=a167_0x1681,_0x2c5095=_0x590953();while(!![]){try{const _0x28892d=-parseInt(_0xbdc4da(0x11c))/0x1*(parseInt(_0xbdc4da(0x128))/0x2)+-parseInt(_0xbdc4da(0x132))/0x3*(parseInt(_0xbdc4da(0x139))/0x4)+parseInt(_0xbdc4da(0x12f))/0x5+-parseInt(_0xbdc4da(0x138))/0x6+parseInt(_0xbdc4da(0x137))/0x7+-parseInt(_0xbdc4da(0x11b))/0x8+-parseInt(_0xbdc4da(0x12a))/0x9*(-parseInt(_0xbdc4da(0x129))/0xa);if(_0x28892d===_0x43af1f)break;else _0x2c5095['push'](_0x2c5095['shift']());}catch(_0x5d1834){_0x2c5095['push'](_0x2c5095['shift']());}}}(a167_0x1cc4,0x50d77));import{mkdir,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{deleteSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';function a167_0x1681(_0x2dea11,_0x47924c){_0x2dea11=_0x2dea11-0x11b;const _0x1cc427=a167_0x1cc4();let _0x168154=_0x1cc427[_0x2dea11];return _0x168154;}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':a167_0x1a6b2c(0x125),'command':a167_0x1a6b2c(0x127),'description':a167_0x1a6b2c(0x133),'risk':a167_0x1a6b2c(0x13a),'flags':[SQLCODE_FLAG],async 'validate'(_0x1ac8cd){const _0x54964d=a167_0x1a6b2c,_0x85ad8c=loadSqlProjectConfig(_0x1ac8cd['appCode']),_0x205636=await readSqlLockFile(_0x85ad8c['lockFilePath']);if(!_0x205636)throw CliErrors['validation'](_0x54964d(0x130));},async 'dryRun'(_0x4150e6){const _0xa6e054=a167_0x1a6b2c,_0x1dceff=loadSqlProjectConfig(_0x4150e6['appCode']),_0x2e9f47=await readSqlLockFile(_0x1dceff['lockFilePath']);if(!_0x2e9f47)throw CliErrors['validation']('SQL\x20lock\x20file\x20not\x20found.\x20Run\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first.');const {appLock:_0x5a7c94}=ensureSqlLockScope(_0x2e9f47,_0x4150e6[_0xa6e054(0x124)],_0x1dceff[_0xa6e054(0x13b)],_0xa6e054(0x127)),_0x176560=_0x4150e6[_0xa6e054(0x13d)](_0xa6e054(0x120)),_0x4b6ba3=_0x5a7c94[_0xa6e054(0x123)][_0x176560];if(!_0x4b6ba3)throw CliErrors['validation'](_0xa6e054(0x11f)+_0x176560+'\x22.');return{'method':'POST','url':'/smartapi/custom/deleteUserCustomSql','body':{'sqlCode':_0x176560,'id':_0x4b6ba3['remoteId'],'localPath':resolveLocalSqlFilePath(_0x1dceff,_0x176560,_0x4b6ba3)},'description':_0xa6e054(0x126)+_0x176560+_0xa6e054(0x136)+_0x1dceff[_0xa6e054(0x131)]};},async 'execute'(_0x1540a9){const _0x18fcc7=a167_0x1a6b2c,_0x2ce3fd=loadSqlProjectConfig(_0x1540a9[_0x18fcc7(0x124)]),_0xb51726=await readSqlLockFile(_0x2ce3fd[_0x18fcc7(0x121)]);if(!_0xb51726)throw CliErrors['validation']('SQL\x20lock\x20file\x20not\x20found.');const {lockData:_0x8f194c,appLock:_0x1a32be}=ensureSqlLockScope(_0xb51726,_0x1540a9[_0x18fcc7(0x124)],_0x2ce3fd[_0x18fcc7(0x13b)],_0x18fcc7(0x127)),_0x1dc282=_0x1540a9['str'](_0x18fcc7(0x120)),_0x5b227c=_0x1a32be[_0x18fcc7(0x123)][_0x1dc282];if(!_0x5b227c)throw CliErrors[_0x18fcc7(0x122)](_0x18fcc7(0x11f)+_0x1dc282+'\x22.');await deleteSqlQuery({'id':_0x5b227c[_0x18fcc7(0x12b)],'sqlCode':_0x1dc282}),_0x1a32be[_0x18fcc7(0x123)]=Object['fromEntries'](Object[_0x18fcc7(0x135)](_0x1a32be['sqls'])['filter'](([_0x498946])=>_0x498946!==_0x1dc282)),_0x1a32be[_0x18fcc7(0x11e)]=new Date()[_0x18fcc7(0x134)](),await writeSqlLockFile(_0x2ce3fd['lockFilePath'],_0x8f194c);const _0x4aa554=resolveLocalSqlFilePath(_0x2ce3fd,_0x1dc282,_0x5b227c);let _0x366a41;await fileExists(_0x4aa554)&&(_0x366a41=await moveToTrash(_0x2ce3fd[_0x18fcc7(0x11d)],_0x2ce3fd[_0x18fcc7(0x131)],_0x4aa554),await cleanupEmptyDirectories(dirname(_0x4aa554),_0x2ce3fd[_0x18fcc7(0x12d)]));const _0x46f807={'deleted':_0x1dc282,'remoteId':_0x5b227c['remoteId']};if(_0x366a41)_0x46f807[_0x18fcc7(0x13c)]=_0x366a41;return{'ok':!![],'data':_0x46f807,'message':'Deleted\x20'+_0x1dc282+(_0x366a41?'\x20(local\x20file\x20moved\x20to\x20trash)':'')};}};async function moveToTrash(_0x18d911,_0x1acd3b,_0x7f83f3){const _0x3bc32f=new Date()['toISOString']()['replace'](/[:.]/g,'-'),_0x2ce79a=relative(_0x18d911,_0x7f83f3),_0x120f54=join(_0x1acd3b,_0x3bc32f,_0x2ce79a);return await mkdir(dirname(_0x120f54),{'recursive':!![]}),await rename(_0x7f83f3,_0x120f54),_0x120f54;}async function cleanupEmptyDirectories(_0x2146cd,_0x30385a){const _0x3c5c30=a167_0x1a6b2c;let _0x30dd5b=resolve(_0x2146cd);const _0x39daea=resolve(_0x30385a);while(_0x30dd5b[_0x3c5c30(0x12e)](''+_0x39daea+sep)||_0x30dd5b===_0x39daea){if(_0x30dd5b===_0x39daea)return;try{const _0x2a279f=await readdir(_0x30dd5b);if(_0x2a279f[_0x3c5c30(0x12c)]>0x0)return;await rmdir(_0x30dd5b);}catch{return;}_0x30dd5b=dirname(_0x30dd5b);}}function a167_0x1cc4(){const _0x1692f3=['lockFilePath','validation','sqls','appCode','sql','Would\x20delete\x20SQL\x20','delete','6rwIrPA','15055650DTjqDy','9VVwboy','remoteId','length','sqlRootDir','startsWith','1508035nuUSWc','SQL\x20lock\x20file\x20not\x20found.\x20Run\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first.','trashDir','33429zhMDqP','Delete\x20a\x20SQL\x20query\x20from\x20remote\x20and\x20local','toISOString','entries','\x20from\x20remote\x20and\x20move\x20local\x20file\x20to\x20','1557920AFQkrM','186240edIrpl','236tSfmzI','high-risk-write','sqlRoot','trashedTo','str','4816016dBbCZV','136042CxWWvo','projectRoot','lastSync','No\x20SQL\x20lock\x20entry\x20found\x20for\x20\x22','sqlcode'];a167_0x1cc4=function(){return _0x1692f3;};return a167_0x1cc4();}
@@ -1 +1 @@
1
- function a168_0x4439(_0x1c9488,_0x3deee5){_0x1c9488=_0x1c9488-0xc1;const _0x9234fb=a168_0x9234();let _0x443933=_0x9234fb[_0x1c9488];return _0x443933;}const a168_0x40cb9a=a168_0x4439;(function(_0x1ebad0,_0x2093c4){const _0x5223e7=a168_0x4439,_0x2c60bf=_0x1ebad0();while(!![]){try{const _0x298ecb=parseInt(_0x5223e7(0xcd))/0x1*(parseInt(_0x5223e7(0xd1))/0x2)+parseInt(_0x5223e7(0xd5))/0x3*(parseInt(_0x5223e7(0xd0))/0x4)+parseInt(_0x5223e7(0xd2))/0x5+parseInt(_0x5223e7(0xc9))/0x6+-parseInt(_0x5223e7(0xd4))/0x7*(-parseInt(_0x5223e7(0xc4))/0x8)+parseInt(_0x5223e7(0xc1))/0x9*(-parseInt(_0x5223e7(0xc2))/0xa)+-parseInt(_0x5223e7(0xcb))/0xb;if(_0x298ecb===_0x2093c4)break;else _0x2c60bf['push'](_0x2c60bf['shift']());}catch(_0x591194){_0x2c60bf['push'](_0x2c60bf['shift']());}}}(a168_0x9234,0x7b4ad));function a168_0x9234(){const _0x35b5c8=['402eiJStI','sql','bool','279JmHrHW','252410VytUvF','description','16tNjBxb','sqlcode','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','appCode','str','1577832IXLUVf','boolean','11700337AVfLxP','verbose','2uPyZXE','dbId','sqlName','18924xGOKTP','254102jlYGWW','2290165OGgZTV','sqlContent','2597287sZypHd'];a168_0x9234=function(){return _0x35b5c8;};return a168_0x9234();}import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':a168_0x40cb9a(0xd6),'command':'detail','description':a168_0x40cb9a(0xc6),'risk':'read','flags':[SQLCODE_FLAG,{'name':a168_0x40cb9a(0xcc),'type':a168_0x40cb9a(0xca),'description':'Return\x20full\x20raw\x20SQL\x20query\x20object'}],async 'execute'(_0x20dbbc){const _0xdbb60c=a168_0x40cb9a,_0x358a8f=await getSqlQueryInfo(_0x20dbbc[_0xdbb60c(0xc7)],_0x20dbbc[_0xdbb60c(0xc8)](_0xdbb60c(0xc5))),_0x5cf044=_0x20dbbc[_0xdbb60c(0xd7)](_0xdbb60c(0xcc));if(_0x5cf044)return{'ok':!![],'data':_0x358a8f};const _0x295e84=_0x358a8f[_0xdbb60c(0xce)]?await getDbName(_0x20dbbc['appCode'],_0x358a8f[_0xdbb60c(0xce)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x358a8f['sqlCode'],'sqlName':_0x358a8f[_0xdbb60c(0xcf)],'db':_0x295e84?_0x295e84+'\x20('+_0x358a8f[_0xdbb60c(0xce)]+')':_0x358a8f['dbId']??'','description':_0x358a8f[_0xdbb60c(0xc3)]??'','sqlContent':_0x358a8f[_0xdbb60c(0xd3)]??''}};}};
1
+ const a168_0x1faa6f=a168_0x1234;(function(_0x975320,_0x2e506e){const _0x49ab29=a168_0x1234,_0x417526=_0x975320();while(!![]){try{const _0x2fce01=parseInt(_0x49ab29(0x137))/0x1+parseInt(_0x49ab29(0x139))/0x2+-parseInt(_0x49ab29(0x138))/0x3+-parseInt(_0x49ab29(0x131))/0x4+parseInt(_0x49ab29(0x133))/0x5*(-parseInt(_0x49ab29(0x12a))/0x6)+-parseInt(_0x49ab29(0x136))/0x7+-parseInt(_0x49ab29(0x134))/0x8*(-parseInt(_0x49ab29(0x132))/0x9);if(_0x2fce01===_0x2e506e)break;else _0x417526['push'](_0x417526['shift']());}catch(_0x4423cc){_0x417526['push'](_0x417526['shift']());}}}(a168_0x4663,0x75e11));function a168_0x4663(){const _0x491adc=['22045IGVDPn','8GMPnoE','boolean','311360RpPaNF','81275zYrfCL','7329MKvjcy','143700dJReGX','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','appCode','sqlCode','sqlName','sqlContent','354guPCie','dbId','description','read','sqlcode','sql','verbose','670004InOjhi','7238367mCqIYQ'];a168_0x4663=function(){return _0x491adc;};return a168_0x4663();}import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';function a168_0x1234(_0x20dc14,_0x5517d2){_0x20dc14=_0x20dc14-0x128;const _0x466324=a168_0x4663();let _0x1234c9=_0x466324[_0x20dc14];return _0x1234c9;}export const sqlDetail={'service':a168_0x1faa6f(0x12f),'command':'detail','description':a168_0x1faa6f(0x13a),'risk':a168_0x1faa6f(0x12d),'flags':[SQLCODE_FLAG,{'name':'verbose','type':a168_0x1faa6f(0x135),'description':'Return\x20full\x20raw\x20SQL\x20query\x20object'}],async 'execute'(_0x344432){const _0xdabb8f=a168_0x1faa6f,_0xe2c379=await getSqlQueryInfo(_0x344432['appCode'],_0x344432['str'](_0xdabb8f(0x12e))),_0x16c6a5=_0x344432['bool'](_0xdabb8f(0x130));if(_0x16c6a5)return{'ok':!![],'data':_0xe2c379};const _0x15f507=_0xe2c379[_0xdabb8f(0x12b)]?await getDbName(_0x344432[_0xdabb8f(0x13b)],_0xe2c379[_0xdabb8f(0x12b)]):undefined;return{'ok':!![],'data':{'sqlCode':_0xe2c379[_0xdabb8f(0x13c)],'sqlName':_0xe2c379[_0xdabb8f(0x128)],'db':_0x15f507?_0x15f507+'\x20('+_0xe2c379[_0xdabb8f(0x12b)]+')':_0xe2c379[_0xdabb8f(0x12b)]??'','description':_0xe2c379[_0xdabb8f(0x12c)]??'','sqlContent':_0xe2c379[_0xdabb8f(0x129)]??''}};}};
@@ -1 +1 @@
1
- function a169_0x2df5(){const _0x250932=['params','execError','34518MzPnfI','str','now','read','isArray','3738hulMUX','9133430TtvqCx','2135VeYkzg','5752840OAJMKV','22536LlUwvp','exec','SQL\x20parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','length','SQL\x20execution\x20failed','9428tpGgCW','2515kxWRoC','Returned\x20','24396ATmnEE','appCode','1449782GkhfBR','execResult','9XZyoIg','1618GYtEhz'];a169_0x2df5=function(){return _0x250932;};return a169_0x2df5();}const a169_0x4f0f10=a169_0x50c3;(function(_0x37b519,_0x16591c){const _0x24c32c=a169_0x50c3,_0x4b7489=_0x37b519();while(!![]){try{const _0x29a1b6=-parseInt(_0x24c32c(0x19c))/0x1+parseInt(_0x24c32c(0x19f))/0x2*(-parseInt(_0x24c32c(0x18e))/0x3)+-parseInt(_0x24c32c(0x197))/0x4*(parseInt(_0x24c32c(0x198))/0x5)+-parseInt(_0x24c32c(0x19a))/0x6*(parseInt(_0x24c32c(0x190))/0x7)+parseInt(_0x24c32c(0x191))/0x8+parseInt(_0x24c32c(0x19e))/0x9*(-parseInt(_0x24c32c(0x18f))/0xa)+-parseInt(_0x24c32c(0x189))/0xb*(-parseInt(_0x24c32c(0x192))/0xc);if(_0x29a1b6===_0x16591c)break;else _0x4b7489['push'](_0x4b7489['shift']());}catch(_0x2c6c33){_0x4b7489['push'](_0x4b7489['shift']());}}}(a169_0x2df5,0xc7145));import{executeSql}from'../../core/api-client.js';import{SQLCODE_FLAG}from'../../commands/common/flags.js';import{parseJsonParams}from'../../utils/params.js';function a169_0x50c3(_0x3844f6,_0x258ce8){_0x3844f6=_0x3844f6-0x189;const _0x2df56c=a169_0x2df5();let _0x50c33f=_0x2df56c[_0x3844f6];return _0x50c33f;}export const sqlExec={'service':'sql','command':a169_0x4f0f10(0x193),'description':'Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','risk':a169_0x4f0f10(0x18c),'flags':[SQLCODE_FLAG,{'name':a169_0x4f0f10(0x1a0),'type':'string','description':a169_0x4f0f10(0x194)}],async 'execute'(_0xdf8b2f){const _0x45e5cf=a169_0x4f0f10,_0x3dd66d=parseJsonParams(_0xdf8b2f[_0x45e5cf(0x18a)](_0x45e5cf(0x1a0))),_0x482e54=Date[_0x45e5cf(0x18b)](),_0x184f35=await executeSql(_0xdf8b2f[_0x45e5cf(0x19b)],_0xdf8b2f[_0x45e5cf(0x18a)]('sqlcode'),_0x3dd66d),_0x404e77=Date[_0x45e5cf(0x18b)]()-_0x482e54,_0xf6de90=_0x184f35?.[_0x45e5cf(0x19d)]??_0x184f35,_0x1ac7cf=_0x184f35?.['execSuccess']??!![];if(!_0x1ac7cf)return{'ok':![],'data':{'error':_0x184f35?.[_0x45e5cf(0x1a1)]||'SQL\x20execution\x20failed','elapsed':_0x404e77},'message':_0x45e5cf(0x196)};const _0x2df03c=Array[_0x45e5cf(0x18d)](_0xf6de90)?_0xf6de90:[];return{'ok':!![],'data':{'rows':_0x2df03c,'rowCount':_0x2df03c[_0x45e5cf(0x195)],'elapsed':_0x404e77},'message':_0x45e5cf(0x199)+_0x2df03c[_0x45e5cf(0x195)]+'\x20row(s)\x20in\x20'+_0x404e77+'ms'};}};
1
+ const a169_0x58c0cf=a169_0x251b;function a169_0x251b(_0x5bd49d,_0x2549b0){_0x5bd49d=_0x5bd49d-0xa2;const _0x30027e=a169_0x3002();let _0x251bc1=_0x30027e[_0x5bd49d];return _0x251bc1;}(function(_0xa844cc,_0x23502c){const _0x5416e0=a169_0x251b,_0x3fe793=_0xa844cc();while(!![]){try{const _0xd18b7c=parseInt(_0x5416e0(0xb9))/0x1*(parseInt(_0x5416e0(0xaf))/0x2)+-parseInt(_0x5416e0(0xb4))/0x3+parseInt(_0x5416e0(0xa5))/0x4+parseInt(_0x5416e0(0xbd))/0x5*(-parseInt(_0x5416e0(0xa7))/0x6)+parseInt(_0x5416e0(0xa6))/0x7*(parseInt(_0x5416e0(0xab))/0x8)+parseInt(_0x5416e0(0xb8))/0x9+parseInt(_0x5416e0(0xb6))/0xa*(parseInt(_0x5416e0(0xb5))/0xb);if(_0xd18b7c===_0x23502c)break;else _0x3fe793['push'](_0x3fe793['shift']());}catch(_0x56b864){_0x3fe793['push'](_0x3fe793['shift']());}}}(a169_0x3002,0xcdb7a));import{executeSql}from'../../core/api-client.js';function a169_0x3002(){const _0x5badc1=['5313FvlPhD','198606eUjwBp','\x20row(s)\x20in\x20','sql','exec','11080HQaUwk','sqlcode','SQL\x20parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','str','3446LcVpCG','length','appCode','execResult','isArray','3616068klOQEx','22nqTZXI','3258080qlmZCc','now','648099xmyAvm','32jVktmT','execSuccess','read','Returned\x20','50TuMgjz','params','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','execError','2196024Czajpg'];a169_0x3002=function(){return _0x5badc1;};return a169_0x3002();}import{SQLCODE_FLAG}from'../../commands/common/flags.js';import{parseJsonParams}from'../../utils/params.js';export const sqlExec={'service':a169_0x58c0cf(0xa9),'command':a169_0x58c0cf(0xaa),'description':a169_0x58c0cf(0xa3),'risk':a169_0x58c0cf(0xbb),'flags':[SQLCODE_FLAG,{'name':a169_0x58c0cf(0xa2),'type':'string','description':a169_0x58c0cf(0xad)}],async 'execute'(_0xc57a9){const _0x8de298=a169_0x58c0cf,_0x2d0133=parseJsonParams(_0xc57a9[_0x8de298(0xae)](_0x8de298(0xa2))),_0x2b7825=Date['now'](),_0x5724a2=await executeSql(_0xc57a9[_0x8de298(0xb1)],_0xc57a9[_0x8de298(0xae)](_0x8de298(0xac)),_0x2d0133),_0x260f49=Date[_0x8de298(0xb7)]()-_0x2b7825,_0x472627=_0x5724a2?.[_0x8de298(0xb2)]??_0x5724a2,_0xb3995e=_0x5724a2?.[_0x8de298(0xba)]??!![];if(!_0xb3995e)return{'ok':![],'data':{'error':_0x5724a2?.[_0x8de298(0xa4)]||'SQL\x20execution\x20failed','elapsed':_0x260f49},'message':'SQL\x20execution\x20failed'};const _0x1b3328=Array[_0x8de298(0xb3)](_0x472627)?_0x472627:[];return{'ok':!![],'data':{'rows':_0x1b3328,'rowCount':_0x1b3328[_0x8de298(0xb0)],'elapsed':_0x260f49},'message':_0x8de298(0xbc)+_0x1b3328[_0x8de298(0xb0)]+_0x8de298(0xa8)+_0x260f49+'ms'};}};
@@ -1 +1 @@
1
- (function(_0x3b994b,_0x34cc09){const _0x3be7ef=a170_0x3bff,_0x326dc4=_0x3b994b();while(!![]){try{const _0x585786=-parseInt(_0x3be7ef(0x177))/0x1*(parseInt(_0x3be7ef(0x174))/0x2)+-parseInt(_0x3be7ef(0x176))/0x3+-parseInt(_0x3be7ef(0x178))/0x4+-parseInt(_0x3be7ef(0x173))/0x5+parseInt(_0x3be7ef(0x171))/0x6*(-parseInt(_0x3be7ef(0x170))/0x7)+-parseInt(_0x3be7ef(0x175))/0x8*(parseInt(_0x3be7ef(0x179))/0x9)+parseInt(_0x3be7ef(0x172))/0xa;if(_0x585786===_0x34cc09)break;else _0x326dc4['push'](_0x326dc4['shift']());}catch(_0x46aa74){_0x326dc4['push'](_0x326dc4['shift']());}}}(a170_0x29f0,0x4d849));function a170_0x3bff(_0x37ba7a,_0x4b79f7){_0x37ba7a=_0x37ba7a-0x170;const _0x29f040=a170_0x29f0();let _0x3bff02=_0x29f040[_0x37ba7a];return _0x3bff02;}import{sqlList}from'../../commands/sql/list.js';import{sqlDetail}from'../../commands/sql/detail.js';import{sqlValidate}from'../../commands/sql/validate.js';function a170_0x29f0(){const _0x9d9669=['112oBZfnB','141468lVIjLC','20208880xKkWFG','1458915NDkGUr','214mAHoEB','34192VwIjIz','922170fTHvKe','1015RkhJFO','1174100SEhVdn','684xfehbu'];a170_0x29f0=function(){return _0x9d9669;};return a170_0x29f0();}import{sqlSave}from'../../commands/sql/save.js';import{sqlExec}from'../../commands/sql/exec.js';import{sqlPull}from'../../commands/sql/pull.js';import{sqlCreate}from'../../commands/sql/create.js';import{sqlStatus}from'../../commands/sql/status.js';import{sqlPush}from'../../commands/sql/push.js';import{sqlDelete}from'../../commands/sql/delete.js';export const sqlDefinitions=[sqlList,sqlDetail,sqlStatus,sqlCreate,sqlPush,sqlValidate,sqlSave,sqlExec,sqlPull,sqlDelete];
1
+ (function(_0x7e368f,_0x220c75){const _0x458dc6=a170_0x12da,_0x30bed2=_0x7e368f();while(!![]){try{const _0x42bdd1=parseInt(_0x458dc6(0x1d3))/0x1+-parseInt(_0x458dc6(0x1d4))/0x2+-parseInt(_0x458dc6(0x1d5))/0x3*(-parseInt(_0x458dc6(0x1d9))/0x4)+parseInt(_0x458dc6(0x1d1))/0x5+-parseInt(_0x458dc6(0x1d8))/0x6*(parseInt(_0x458dc6(0x1d7))/0x7)+-parseInt(_0x458dc6(0x1da))/0x8*(-parseInt(_0x458dc6(0x1d0))/0x9)+-parseInt(_0x458dc6(0x1d6))/0xa*(parseInt(_0x458dc6(0x1d2))/0xb);if(_0x42bdd1===_0x220c75)break;else _0x30bed2['push'](_0x30bed2['shift']());}catch(_0x282e6f){_0x30bed2['push'](_0x30bed2['shift']());}}}(a170_0x239d,0xa0817));import{sqlList}from'../../commands/sql/list.js';import{sqlDetail}from'../../commands/sql/detail.js';import{sqlValidate}from'../../commands/sql/validate.js';import{sqlSave}from'../../commands/sql/save.js';import{sqlExec}from'../../commands/sql/exec.js';import{sqlPull}from'../../commands/sql/pull.js';import{sqlCreate}from'../../commands/sql/create.js';function a170_0x12da(_0x56589f,_0x2572e7){_0x56589f=_0x56589f-0x1d0;const _0x239d55=a170_0x239d();let _0x12da01=_0x239d55[_0x56589f];return _0x12da01;}import{sqlStatus}from'../../commands/sql/status.js';import{sqlPush}from'../../commands/sql/push.js';import{sqlDelete}from'../../commands/sql/delete.js';function a170_0x239d(){const _0x59cb3c=['3983930LOiJHt','946UijICD','1151319ePIwpB','933298kEiKCM','33AIjNNa','287930BlXDjX','365421gfyfth','78YzBgEw','407788MDHBdi','15992JipmJe','5445THYywA'];a170_0x239d=function(){return _0x59cb3c;};return a170_0x239d();}export const sqlDefinitions=[sqlList,sqlDetail,sqlStatus,sqlCreate,sqlPush,sqlValidate,sqlSave,sqlExec,sqlPull,sqlDelete];
@@ -1 +1 @@
1
- function a171_0x504b(_0xffe642,_0x37af91){_0xffe642=_0xffe642-0xe5;const _0x3eb015=a171_0x3eb0();let _0x504bdd=_0x3eb015[_0xffe642];return _0x504bdd;}const a171_0x4fd8f7=a171_0x504b;(function(_0x12280e,_0xf0d70c){const _0x547b00=a171_0x504b,_0x50a7e6=_0x12280e();while(!![]){try{const _0x28c85d=-parseInt(_0x547b00(0xe8))/0x1*(parseInt(_0x547b00(0xf5))/0x2)+-parseInt(_0x547b00(0x104))/0x3*(parseInt(_0x547b00(0xff))/0x4)+parseInt(_0x547b00(0xed))/0x5*(parseInt(_0x547b00(0xf2))/0x6)+-parseInt(_0x547b00(0x102))/0x7+parseInt(_0x547b00(0xfa))/0x8+parseInt(_0x547b00(0xfe))/0x9+parseInt(_0x547b00(0xeb))/0xa;if(_0x28c85d===_0xf0d70c)break;else _0x50a7e6['push'](_0x50a7e6['shift']());}catch(_0x1a540a){_0x50a7e6['push'](_0x50a7e6['shift']());}}}(a171_0x3eb0,0x98ce1));import{listSqlQueries}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlList={'service':a171_0x4fd8f7(0xea),'command':a171_0x4fd8f7(0xf8),'description':a171_0x4fd8f7(0xfd),'risk':'read','flags':[SQLCODE_FLAG_OPTIONAL,{'name':a171_0x4fd8f7(0xf3),'type':a171_0x4fd8f7(0xf7),'description':a171_0x4fd8f7(0xf0)},{'name':a171_0x4fd8f7(0xec),'type':a171_0x4fd8f7(0x101),'description':a171_0x4fd8f7(0xe7),'default':0x1},{'name':a171_0x4fd8f7(0x106),'type':a171_0x4fd8f7(0x101),'description':'Page\x20size'},{'name':a171_0x4fd8f7(0x109),'type':a171_0x4fd8f7(0xfb),'description':a171_0x4fd8f7(0x103)}],async 'execute'(_0x80f404){const _0x26ae5e=a171_0x4fd8f7,_0x41d339=await listSqlQueries(_0x80f404['appCode'],{'sqlCode':_0x80f404['str'](_0x26ae5e(0x108))||undefined,'sqlName':_0x80f404[_0x26ae5e(0x105)](_0x26ae5e(0xf3))||undefined,'currentPage':_0x80f404['num'](_0x26ae5e(0xec)),'pageSize':_0x80f404['num'](_0x26ae5e(0x106),0x32)}),_0xa4a5c3=_0x80f404[_0x26ae5e(0xf6)](_0x26ae5e(0x109)),_0x527271=_0x41d339[_0x26ae5e(0xee)]??[],_0x500fde=_0x41d339[_0x26ae5e(0x100)]?.[_0x26ae5e(0xf9)]??_0x527271['length'];let _0x3f4ad6;return _0xa4a5c3?_0x3f4ad6=_0x527271:_0x3f4ad6=await Promise['all'](_0x527271[_0x26ae5e(0x107)](async _0x2e267a=>{const _0x2bbba9=_0x26ae5e;let _0x4b684f;try{_0x4b684f=_0x2e267a['dbId']?await getDbName(_0x80f404[_0x2bbba9(0xe5)],_0x2e267a[_0x2bbba9(0xf4)]):undefined;}catch{}return{'sqlCode':_0x2e267a[_0x2bbba9(0xfc)],'sqlName':_0x2e267a['sqlName'],'description':_0x2e267a[_0x2bbba9(0xf1)]??'','db':_0x4b684f?_0x4b684f+'\x20('+_0x2e267a['dbId']+')':_0x2e267a[_0x2bbba9(0xf4)]??''};})),{'ok':!![],'data':_0x3f4ad6,'message':_0x527271[_0x26ae5e(0xef)]===0x0?_0x26ae5e(0xe6):'Found\x20'+_0x527271[_0x26ae5e(0xef)]+_0x26ae5e(0xe9)+_0x500fde+').'};}};function a171_0x3eb0(){const _0xca2ea1=['name','dbId','335858uukqvv','bool','string','list','totalCount','4683896gebeku','boolean','sqlCode','List\x20custom\x20SQL\x20queries','8016633xbQUal','116mNhekH','paging','number','7932344qzsuwd','Return\x20full\x20SQL\x20query\x20objects\x20including\x20parameters\x20and\x20SQL\x20content','112758DvKLYQ','str','pagesize','map','sqlcode','verbose','appCode','No\x20custom\x20SQL\x20queries\x20found.','Page\x20number','1FbmApq','\x20SQL\x20queries\x20(total:\x20','sql','9848910PvLLsr','page','2935NiZXFn','tableData','length','Filter\x20by\x20SQL\x20name','description','5682IESluf'];a171_0x3eb0=function(){return _0xca2ea1;};return a171_0x3eb0();}
1
+ const a171_0x3e7d10=a171_0x522d;(function(_0x25a805,_0xe3828c){const _0x482a1f=a171_0x522d,_0x258846=_0x25a805();while(!![]){try{const _0x126b8a=-parseInt(_0x482a1f(0x138))/0x1*(parseInt(_0x482a1f(0x121))/0x2)+-parseInt(_0x482a1f(0x137))/0x3*(parseInt(_0x482a1f(0x139))/0x4)+-parseInt(_0x482a1f(0x124))/0x5*(parseInt(_0x482a1f(0x141))/0x6)+parseInt(_0x482a1f(0x134))/0x7+parseInt(_0x482a1f(0x123))/0x8+-parseInt(_0x482a1f(0x126))/0x9*(-parseInt(_0x482a1f(0x120))/0xa)+parseInt(_0x482a1f(0x135))/0xb;if(_0x126b8a===_0xe3828c)break;else _0x258846['push'](_0x258846['shift']());}catch(_0x3c4bed){_0x258846['push'](_0x258846['shift']());}}}(a171_0x5850,0x29a91));function a171_0x522d(_0x117a88,_0x252aee){_0x117a88=_0x117a88-0x11f;const _0x5850e0=a171_0x5850();let _0x522dd2=_0x5850e0[_0x117a88];return _0x522dd2;}function a171_0x5850(){const _0x1bb55d=['sql','List\x20custom\x20SQL\x20queries','\x20SQL\x20queries\x20(total:\x20','paging','map','name','description','str','verbose','num','length','boolean','Return\x20full\x20SQL\x20query\x20objects\x20including\x20parameters\x20and\x20SQL\x20content','568953RysiKp','6287556yFImvN','appCode','226020CSHeZJ','58854pLAVjy','16flDbmU','dbId','pagesize','totalCount','number','list','page','all','12fUNeUf','Page\x20size','230210oUVvky','2GhdrNb','Filter\x20by\x20SQL\x20name','413256CdmBwj','491745YnXVem','Found\x20','9kFLYzm'];a171_0x5850=function(){return _0x1bb55d;};return a171_0x5850();}import{listSqlQueries}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';export const sqlList={'service':a171_0x3e7d10(0x127),'command':a171_0x3e7d10(0x13e),'description':a171_0x3e7d10(0x128),'risk':'read','flags':[SQLCODE_FLAG_OPTIONAL,{'name':a171_0x3e7d10(0x12c),'type':'string','description':a171_0x3e7d10(0x122)},{'name':a171_0x3e7d10(0x13f),'type':'number','description':'Page\x20number','default':0x1},{'name':a171_0x3e7d10(0x13b),'type':a171_0x3e7d10(0x13d),'description':a171_0x3e7d10(0x11f)},{'name':a171_0x3e7d10(0x12f),'type':a171_0x3e7d10(0x132),'description':a171_0x3e7d10(0x133)}],async 'execute'(_0x16573f){const _0x35b8a4=a171_0x3e7d10,_0x3b8199=await listSqlQueries(_0x16573f[_0x35b8a4(0x136)],{'sqlCode':_0x16573f[_0x35b8a4(0x12e)]('sqlcode')||undefined,'sqlName':_0x16573f[_0x35b8a4(0x12e)](_0x35b8a4(0x12c))||undefined,'currentPage':_0x16573f[_0x35b8a4(0x130)](_0x35b8a4(0x13f)),'pageSize':_0x16573f[_0x35b8a4(0x130)](_0x35b8a4(0x13b),0x32)}),_0x1d84a2=_0x16573f['bool'](_0x35b8a4(0x12f)),_0x482442=_0x3b8199['tableData']??[],_0x4a0ef7=_0x3b8199[_0x35b8a4(0x12a)]?.[_0x35b8a4(0x13c)]??_0x482442[_0x35b8a4(0x131)];let _0x445a07;return _0x1d84a2?_0x445a07=_0x482442:_0x445a07=await Promise[_0x35b8a4(0x140)](_0x482442[_0x35b8a4(0x12b)](async _0x128a82=>{const _0xbe6db7=_0x35b8a4;let _0x2241ee;try{_0x2241ee=_0x128a82[_0xbe6db7(0x13a)]?await getDbName(_0x16573f['appCode'],_0x128a82['dbId']):undefined;}catch{}return{'sqlCode':_0x128a82['sqlCode'],'sqlName':_0x128a82['sqlName'],'description':_0x128a82[_0xbe6db7(0x12d)]??'','db':_0x2241ee?_0x2241ee+'\x20('+_0x128a82[_0xbe6db7(0x13a)]+')':_0x128a82[_0xbe6db7(0x13a)]??''};})),{'ok':!![],'data':_0x445a07,'message':_0x482442[_0x35b8a4(0x131)]===0x0?'No\x20custom\x20SQL\x20queries\x20found.':_0x35b8a4(0x125)+_0x482442[_0x35b8a4(0x131)]+_0x35b8a4(0x129)+_0x4a0ef7+').'};}};