@lovrabet/rabetbase-cli 2.3.13-beta.2 → 2.3.13-beta.3

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 (263) hide show
  1. package/README.md +1 -1
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/add.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/remove.js +1 -1
  25. package/lib/commands/app/shared.js +1 -1
  26. package/lib/commands/app-config/delete.js +1 -1
  27. package/lib/commands/app-config/get.js +1 -1
  28. package/lib/commands/app-config/index.js +1 -1
  29. package/lib/commands/app-config/list.js +1 -1
  30. package/lib/commands/app-config/set.js +1 -1
  31. package/lib/commands/app-config/shared.js +1 -1
  32. package/lib/commands/auth/index.js +1 -1
  33. package/lib/commands/bff/create.js +1 -1
  34. package/lib/commands/bff/delete.js +1 -1
  35. package/lib/commands/bff/detail.js +1 -1
  36. package/lib/commands/bff/index.js +1 -1
  37. package/lib/commands/bff/list.js +1 -1
  38. package/lib/commands/bff/pull.js +1 -1
  39. package/lib/commands/bff/push.js +1 -1
  40. package/lib/commands/bff/status.js +1 -1
  41. package/lib/commands/cli-skill/index.js +1 -1
  42. package/lib/commands/cli-update.js +1 -1
  43. package/lib/commands/codegen/index.js +1 -1
  44. package/lib/commands/codegen/sdk.js +1 -1
  45. package/lib/commands/codegen/sql.js +1 -1
  46. package/lib/commands/common/app-registry.js +1 -1
  47. package/lib/commands/common/app-selector.js +1 -1
  48. package/lib/commands/common/async-task.js +1 -1
  49. package/lib/commands/common/dry-run.js +1 -1
  50. package/lib/commands/common/flags.js +1 -1
  51. package/lib/commands/common/local-file.js +1 -1
  52. package/lib/commands/common/validate.js +1 -1
  53. package/lib/commands/config/get.js +1 -1
  54. package/lib/commands/config/index.js +1 -1
  55. package/lib/commands/config/list.js +1 -1
  56. package/lib/commands/config/set.js +1 -1
  57. package/lib/commands/config/shared.js +1 -1
  58. package/lib/commands/data/filter.js +1 -1
  59. package/lib/commands/data/getOne.js +1 -1
  60. package/lib/commands/data/index.js +1 -1
  61. package/lib/commands/data/shared.js +1 -1
  62. package/lib/commands/dataset/business-group-update.js +1 -1
  63. package/lib/commands/dataset/capability.js +1 -1
  64. package/lib/commands/dataset/delete.js +1 -1
  65. package/lib/commands/dataset/detail.js +1 -1
  66. package/lib/commands/dataset/extend-update.js +1 -1
  67. package/lib/commands/dataset/field-update.js +1 -1
  68. package/lib/commands/dataset/generate.js +1 -1
  69. package/lib/commands/dataset/index.js +1 -1
  70. package/lib/commands/dataset/list.js +1 -1
  71. package/lib/commands/dataset/operations.js +1 -1
  72. package/lib/commands/dataset/relation-audit.js +1 -1
  73. package/lib/commands/dataset/relation-create.js +1 -1
  74. package/lib/commands/dataset/relation-delete.js +1 -1
  75. package/lib/commands/dataset/relation-shared.js +1 -1
  76. package/lib/commands/dataset/relation-update.js +1 -1
  77. package/lib/commands/dataset/relations.js +1 -1
  78. package/lib/commands/dataset/rename.js +1 -1
  79. package/lib/commands/dataset/restore.js +1 -1
  80. package/lib/commands/db/analysis-batching.js +1 -1
  81. package/lib/commands/db/analyze-batch-plan.js +1 -1
  82. package/lib/commands/db/analyze-cancel.js +1 -1
  83. package/lib/commands/db/analyze-start.js +1 -1
  84. package/lib/commands/db/analyze-status.js +1 -1
  85. package/lib/commands/db/create.js +1 -1
  86. package/lib/commands/db/delete.js +1 -1
  87. package/lib/commands/db/detail.js +1 -1
  88. package/lib/commands/db/diff.js +1 -1
  89. package/lib/commands/db/index.js +1 -1
  90. package/lib/commands/db/list.js +1 -1
  91. package/lib/commands/db/shared.js +1 -1
  92. package/lib/commands/db/tables.js +1 -1
  93. package/lib/commands/db/test.js +1 -1
  94. package/lib/commands/db/update.js +1 -1
  95. package/lib/commands/doctor.js +1 -1
  96. package/lib/commands/file/index.js +1 -1
  97. package/lib/commands/init/index.js +1 -1
  98. package/lib/commands/issue/index.js +1 -1
  99. package/lib/commands/issue/nudge.js +1 -1
  100. package/lib/commands/issue/report.js +1 -1
  101. package/lib/commands/issue/shared.js +1 -1
  102. package/lib/commands/logs/index.js +1 -1
  103. package/lib/commands/menu/asset-update.js +1 -0
  104. package/lib/commands/menu/delete.js +1 -1
  105. package/lib/commands/menu/external-link-create.js +1 -1
  106. package/lib/commands/menu/external-link-update.js +1 -0
  107. package/lib/commands/menu/group-create.js +1 -1
  108. package/lib/commands/menu/group-update.js +1 -1
  109. package/lib/commands/menu/index.js +1 -1
  110. package/lib/commands/menu/list.js +1 -1
  111. package/lib/commands/menu/move.js +1 -1
  112. package/lib/commands/menu/regroup-start.js +1 -1
  113. package/lib/commands/menu/shared/compare-table.js +1 -1
  114. package/lib/commands/menu/shared/delete-plan.js +1 -1
  115. package/lib/commands/menu/shared/facts.js +1 -1
  116. package/lib/commands/menu/shared/index.js +1 -1
  117. package/lib/commands/menu/shared/inquirer.js +1 -1
  118. package/lib/commands/menu/shared/local-pages.js +1 -1
  119. package/lib/commands/menu/shared/logic.js +1 -1
  120. package/lib/commands/menu/shared/mutations.js +1 -1
  121. package/lib/commands/menu/shared/service.js +1 -1
  122. package/lib/commands/menu/shared/sync-core.js +1 -1
  123. package/lib/commands/menu/shared/update-core.js +1 -1
  124. package/lib/commands/menu/shared/valid-url.js +1 -1
  125. package/lib/commands/menu/sync.js +1 -1
  126. package/lib/commands/notification/config-list.js +1 -1
  127. package/lib/commands/notification/index.js +1 -1
  128. package/lib/commands/page/generate-start.js +1 -1
  129. package/lib/commands/page/generate-status.js +1 -1
  130. package/lib/commands/page/index.js +1 -1
  131. package/lib/commands/page/pull.js +1 -1
  132. package/lib/commands/page/push.js +1 -1
  133. package/lib/commands/page/relation-audit.js +1 -1
  134. package/lib/commands/page/shared.js +1 -1
  135. package/lib/commands/page/standard-page-status.js +1 -1
  136. package/lib/commands/page/sync.js +1 -1
  137. package/lib/commands/permit/index.js +1 -1
  138. package/lib/commands/permit/page-get.js +1 -1
  139. package/lib/commands/permit/page-set.js +1 -1
  140. package/lib/commands/permit/role-apis-set.js +1 -1
  141. package/lib/commands/permit/role-menus-set.js +1 -1
  142. package/lib/commands/permit/role-menus.js +1 -1
  143. package/lib/commands/permit/shared.js +1 -1
  144. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  145. package/lib/commands/project/create/format-elapsed.js +1 -1
  146. package/lib/commands/project/create/main.js +1 -1
  147. package/lib/commands/project/create/non-interactive.js +1 -1
  148. package/lib/commands/project/create/project-template-path.js +1 -1
  149. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  150. package/lib/commands/project/create/use-format-code.js +1 -1
  151. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  152. package/lib/commands/project/index.js +1 -1
  153. package/lib/commands/project/init.js +1 -1
  154. package/lib/commands/project/upgrade.js +1 -1
  155. package/lib/commands/registry.js +1 -1
  156. package/lib/commands/role/create.js +1 -1
  157. package/lib/commands/role/delete.js +1 -1
  158. package/lib/commands/role/detail.js +1 -1
  159. package/lib/commands/role/index.js +1 -1
  160. package/lib/commands/role/list.js +1 -1
  161. package/lib/commands/role/shared.js +1 -1
  162. package/lib/commands/role/update.js +1 -1
  163. package/lib/commands/role/user-add.js +1 -1
  164. package/lib/commands/role/user-remove.js +1 -1
  165. package/lib/commands/role/user-resolve.js +1 -1
  166. package/lib/commands/run/index.js +1 -1
  167. package/lib/commands/schema.js +1 -1
  168. package/lib/commands/sql/create.js +1 -1
  169. package/lib/commands/sql/delete.js +1 -1
  170. package/lib/commands/sql/detail.js +1 -1
  171. package/lib/commands/sql/exec.js +1 -1
  172. package/lib/commands/sql/index.js +1 -1
  173. package/lib/commands/sql/list.js +1 -1
  174. package/lib/commands/sql/pull.js +1 -1
  175. package/lib/commands/sql/push.js +1 -1
  176. package/lib/commands/sql/save.js +1 -1
  177. package/lib/commands/sql/shared.js +1 -1
  178. package/lib/commands/sql/status.js +1 -1
  179. package/lib/commands/sql/validate.js +1 -1
  180. package/lib/commands/task/index.js +1 -1
  181. package/lib/commands/task/status.js +1 -1
  182. package/lib/commands/workspace/add.js +1 -1
  183. package/lib/commands/workspace/index.js +1 -1
  184. package/lib/commands/workspace/remove.js +1 -1
  185. package/lib/config/schema.js +1 -1
  186. package/lib/constant/cdn.js +1 -1
  187. package/lib/constant/cli.js +1 -1
  188. package/lib/constant/defaults.js +1 -1
  189. package/lib/constant/domain.js +1 -1
  190. package/lib/constant/env.js +1 -1
  191. package/lib/constant/output.js +1 -1
  192. package/lib/constant/paths.js +1 -1
  193. package/lib/constant/risk.js +1 -1
  194. package/lib/context/app-resolver.js +1 -1
  195. package/lib/context/auth-resolver.js +1 -1
  196. package/lib/context/config-loader.js +1 -1
  197. package/lib/context.js +1 -1
  198. package/lib/core/alias-resolver.js +1 -1
  199. package/lib/core/api-client.js +1 -1
  200. package/lib/core/bff/config.js +1 -1
  201. package/lib/core/bff/file-system.js +1 -1
  202. package/lib/core/bff/hash.js +1 -1
  203. package/lib/core/bff/lock.js +1 -1
  204. package/lib/core/bff/utils.js +1 -1
  205. package/lib/core/db-resolver.js +1 -1
  206. package/lib/core/page/file-system.js +1 -1
  207. package/lib/core/page/hash.js +1 -1
  208. package/lib/core/page/lock.js +1 -1
  209. package/lib/core/sql-index-auditor.js +1 -1
  210. package/lib/core/sql-sync/config.js +1 -1
  211. package/lib/core/sql-sync/file-system.js +1 -1
  212. package/lib/core/sql-sync/hash.js +1 -1
  213. package/lib/core/sql-sync/lock.js +1 -1
  214. package/lib/core/sql-sync/utils.js +1 -1
  215. package/lib/core/sql-validator.js +1 -1
  216. package/lib/errors.js +1 -1
  217. package/lib/framework/build-all-flags.js +1 -1
  218. package/lib/framework/error-output.js +1 -1
  219. package/lib/framework/explicit-yes.js +1 -1
  220. package/lib/framework/flags.js +1 -1
  221. package/lib/framework/help.js +1 -1
  222. package/lib/framework/index.js +1 -1
  223. package/lib/framework/output.js +1 -1
  224. package/lib/framework/response.js +1 -1
  225. package/lib/framework/runner-alias.js +1 -1
  226. package/lib/framework/runner.js +1 -1
  227. package/lib/framework/schema-export.js +1 -1
  228. package/lib/framework/types.js +1 -1
  229. package/lib/generated/build-info.js +1 -1
  230. package/lib/help.js +1 -1
  231. package/lib/skills/main.js +1 -1
  232. package/lib/skills/npx-skills-add.js +1 -1
  233. package/lib/telemetry/cli-command-trace.js +1 -1
  234. package/lib/telemetry/cli-help-trace.js +1 -1
  235. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  236. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  237. package/lib/telemetry/send-cli-trace-log.js +1 -1
  238. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  239. package/lib/utils/ai_config.js +1 -1
  240. package/lib/utils/apply-jq-filter.js +1 -1
  241. package/lib/utils/cdn-config.js +1 -1
  242. package/lib/utils/check-sdk-version.js +1 -1
  243. package/lib/utils/cli-version-check.js +1 -1
  244. package/lib/utils/cli-version-policy.js +1 -1
  245. package/lib/utils/config.js +1 -1
  246. package/lib/utils/copy-directory.js +1 -1
  247. package/lib/utils/entity-with-id.js +1 -1
  248. package/lib/utils/file-utils.js +1 -1
  249. package/lib/utils/guides-cdn.js +1 -1
  250. package/lib/utils/http-client.js +1 -1
  251. package/lib/utils/is-non-interactive.js +1 -1
  252. package/lib/utils/logger.js +1 -1
  253. package/lib/utils/params.js +1 -1
  254. package/lib/utils/platform.js +1 -1
  255. package/lib/utils/rules-cdn.js +1 -1
  256. package/lib/utils/sleep.js +1 -1
  257. package/lib/utils/template-replacer.js +1 -1
  258. package/lib/utils/update-notice.js +1 -1
  259. package/lib/utils/version.js +1 -1
  260. package/lib/utils/with-active-cookie.js +1 -1
  261. package/lib/utils/write-cli-side-channel.js +1 -1
  262. package/package.json +1 -1
  263. package/lib/commands/menu/update.js +0 -1
@@ -1 +1 @@
1
- const a187_0x505f5e=a187_0x9483;(function(_0x2c2091,_0x471193){const _0x2ab01e=a187_0x9483,_0x42f216=_0x2c2091();while(!![]){try{const _0x337264=parseInt(_0x2ab01e(0x130))/0x1+parseInt(_0x2ab01e(0x12c))/0x2*(-parseInt(_0x2ab01e(0x13a))/0x3)+parseInt(_0x2ab01e(0x134))/0x4+parseInt(_0x2ab01e(0x137))/0x5+-parseInt(_0x2ab01e(0x139))/0x6+parseInt(_0x2ab01e(0x135))/0x7+-parseInt(_0x2ab01e(0x12d))/0x8;if(_0x337264===_0x471193)break;else _0x42f216['push'](_0x42f216['shift']());}catch(_0x1513c2){_0x42f216['push'](_0x42f216['shift']());}}}(a187_0x3b11,0x9e3a7));import{getEnv,isProduction}from'../constant/env.js';function a187_0x9483(_0x59eb2f,_0x117434){_0x59eb2f=_0x59eb2f-0x12c;const _0x3b11ab=a187_0x3b11();let _0x9483f9=_0x3b11ab[_0x59eb2f];return _0x9483f9;}let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x46d304){const _0x9597d=a187_0x9483;customApiDomain=_0x46d304?.[_0x9597d(0x133)],customUserDomain=_0x46d304?.[_0x9597d(0x132)],customRuntimeDomain=_0x46d304?.[_0x9597d(0x136)];}function a187_0x3b11(){const _0x4cad38=['https://app.lovrabet.com','5426706ucIOhO','214719AYkSqz','/web-app/app/','trim','https://user.lovrabet.com','10PqGPxI','11706256BLAfim','https://user-daily.lovrabet.com','https://daily-runtime.lovrabet.com','1073602BbWzYU','/app/','userDomain','apiDomain','3013312creoLr','5457424PXqPav','runtimeDomain','3835695wVbJve'];a187_0x3b11=function(){return _0x4cad38;};return a187_0x3b11();}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a187_0x505f5e(0x13d):a187_0x505f5e(0x12e));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?'https://api.lovrabet.com':'https://daily-api.lovrabet.com');export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?'https://runtime.lovrabet.com':a187_0x505f5e(0x12f));export const getAppDomain=()=>isProduction(getEnv())?a187_0x505f5e(0x138):'https://daily.lovrabet.com';export const getAppBaseUrl=_0x37469e=>{const _0x59df64=a187_0x505f5e,_0x21b493=encodeURIComponent(_0x37469e[_0x59df64(0x13c)]());return isProduction(getEnv())?getAppDomain()+_0x59df64(0x131)+_0x21b493:getAppDomain()+_0x59df64(0x13b)+_0x21b493;};
1
+ const a188_0x5d9e4c=a188_0x1119;(function(_0xd6f0c1,_0x2bc356){const _0x186709=a188_0x1119,_0x168f29=_0xd6f0c1();while(!![]){try{const _0x5ce88a=parseInt(_0x186709(0xc4))/0x1+-parseInt(_0x186709(0xcb))/0x2+parseInt(_0x186709(0xcc))/0x3*(parseInt(_0x186709(0xc2))/0x4)+-parseInt(_0x186709(0xc7))/0x5+-parseInt(_0x186709(0xd0))/0x6*(-parseInt(_0x186709(0xd4))/0x7)+parseInt(_0x186709(0xd2))/0x8*(-parseInt(_0x186709(0xc0))/0x9)+parseInt(_0x186709(0xd1))/0xa*(parseInt(_0x186709(0xca))/0xb);if(_0x5ce88a===_0x2bc356)break;else _0x168f29['push'](_0x168f29['shift']());}catch(_0x1d6b50){_0x168f29['push'](_0x168f29['shift']());}}}(a188_0x207e,0x8cd11));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;function a188_0x1119(_0x4c8761,_0xdd35dc){_0x4c8761=_0x4c8761-0xc0;const _0x207e2d=a188_0x207e();let _0x111968=_0x207e2d[_0x4c8761];return _0x111968;}function a188_0x207e(){const _0x17d9c5=['66492rlKAjl','https://user-daily.lovrabet.com','44ESqYtn','https://daily-api.lovrabet.com','242643RnhWGW','apiDomain','runtimeDomain','4284035cgjnkT','/app/','trim','107558MCQNNd','1809506jwAdon','218181VKXNWf','https://daily-runtime.lovrabet.com','/web-app/app/','userDomain','727626ggNwor','1730kuPIeL','560djGqoN','https://app.lovrabet.com','7BDHkBN'];a188_0x207e=function(){return _0x17d9c5;};return a188_0x207e();}export function initDomains(_0x10cdc2){const _0x307024=a188_0x1119;customApiDomain=_0x10cdc2?.[_0x307024(0xc5)],customUserDomain=_0x10cdc2?.[_0x307024(0xcf)],customRuntimeDomain=_0x10cdc2?.[_0x307024(0xc6)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?'https://user.lovrabet.com':a188_0x5d9e4c(0xc1));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?'https://api.lovrabet.com':a188_0x5d9e4c(0xc3));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?'https://runtime.lovrabet.com':a188_0x5d9e4c(0xcd));export const getAppDomain=()=>isProduction(getEnv())?a188_0x5d9e4c(0xd3):'https://daily.lovrabet.com';export const getAppBaseUrl=_0x5b9db2=>{const _0x3f8ab1=a188_0x5d9e4c,_0x3af3c8=encodeURIComponent(_0x5b9db2[_0x3f8ab1(0xc9)]());return isProduction(getEnv())?getAppDomain()+_0x3f8ab1(0xc8)+_0x3af3c8:getAppDomain()+_0x3f8ab1(0xce)+_0x3af3c8;};
@@ -1 +1 @@
1
- const a188_0x22eb3a=a188_0x59cf;(function(_0xcc7bb1,_0x303297){const _0x4cfeb5=a188_0x59cf,_0xcedf9d=_0xcc7bb1();while(!![]){try{const _0x3a772e=-parseInt(_0x4cfeb5(0x8f))/0x1+-parseInt(_0x4cfeb5(0x97))/0x2+parseInt(_0x4cfeb5(0x9e))/0x3+-parseInt(_0x4cfeb5(0x9c))/0x4*(parseInt(_0x4cfeb5(0x95))/0x5)+parseInt(_0x4cfeb5(0x99))/0x6*(parseInt(_0x4cfeb5(0x96))/0x7)+parseInt(_0x4cfeb5(0x92))/0x8*(-parseInt(_0x4cfeb5(0x9a))/0x9)+parseInt(_0x4cfeb5(0x94))/0xa*(parseInt(_0x4cfeb5(0x9b))/0xb);if(_0x3a772e===_0x303297)break;else _0xcedf9d['push'](_0xcedf9d['shift']());}catch(_0x441545){_0xcedf9d['push'](_0xcedf9d['shift']());}}}(a188_0x586e,0x7e06a));export const RABETBASE_ENV_VALUES=['production',a188_0x22eb3a(0x93)];export function normalizeEnv(_0x1af71a){const _0x2551bc=a188_0x22eb3a;return _0x1af71a===_0x2551bc(0x91)?'production':_0x1af71a;}function a188_0x59cf(_0x318b76,_0x285695){_0x318b76=_0x318b76-0x8f;const _0x586e3d=a188_0x586e();let _0x59cf8e=_0x586e3d[_0x318b76];return _0x59cf8e;}function a188_0x586e(){const _0xcf80d1=['1400408JFDrad','production','29208MzCVCc','9KKkvgb','154sANntS','210524bvrZwq','development','858285kmGIwM','668682OhjkYD','dev','online','2443432rNmGeK','daily','1394620VBQgFP','30pnsCFN','385CHsklF'];a188_0x586e=function(){return _0xcf80d1;};return a188_0x586e();}export function isProduction(_0x7dc97c){const _0x395e4f=a188_0x22eb3a;return normalizeEnv(_0x7dc97c)===_0x395e4f(0x98);}export function isDaily(_0xd374ce){const _0x1ed045=a188_0x22eb3a;return normalizeEnv(_0xd374ce)===_0x1ed045(0x93);}export function isDev(_0x5be526){const _0x117ec4=a188_0x22eb3a,_0x48566f=normalizeEnv(_0x5be526);return _0x48566f===_0x117ec4(0x9d)||_0x48566f===_0x117ec4(0x90);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||'production');export function getEnv(){return env;}export function initEnv(_0x579713){env=normalizeEnv(_0x579713);}
1
+ function a189_0x4651(){const _0x5143e9=['1042310OqwAdX','63IkTKiO','123963WwExWR','2091236RTjLax','232HPaRQS','3NhJMyr','867392umXuxZ','development','21481428Nzyrba','6CJLCux','dev','daily','11rPvQtw','5761475Iwcczj','online','production','2832628Eevhqy'];a189_0x4651=function(){return _0x5143e9;};return a189_0x4651();}const a189_0x3499f2=a189_0x4856;(function(_0x5bf06c,_0x15fff1){const _0x25198d=a189_0x4856,_0xae7d17=_0x5bf06c();while(!![]){try{const _0x56dd84=parseInt(_0x25198d(0xcd))/0x1+-parseInt(_0x25198d(0xca))/0x2*(-parseInt(_0x25198d(0xcc))/0x3)+-parseInt(_0x25198d(0xc6))/0x4+parseInt(_0x25198d(0xd4))/0x5*(parseInt(_0x25198d(0xd0))/0x6)+-parseInt(_0x25198d(0xc9))/0x7*(parseInt(_0x25198d(0xcb))/0x8)+-parseInt(_0x25198d(0xc8))/0x9*(-parseInt(_0x25198d(0xc7))/0xa)+-parseInt(_0x25198d(0xd3))/0xb*(parseInt(_0x25198d(0xcf))/0xc);if(_0x56dd84===_0x15fff1)break;else _0xae7d17['push'](_0xae7d17['shift']());}catch(_0x48d8ce){_0xae7d17['push'](_0xae7d17['shift']());}}}(a189_0x4651,0xbf2ed));export const RABETBASE_ENV_VALUES=['production',a189_0x3499f2(0xd2)];export function normalizeEnv(_0xd24dee){const _0x4a8d81=a189_0x3499f2;return _0xd24dee===_0x4a8d81(0xc4)?_0x4a8d81(0xc5):_0xd24dee;}export function isProduction(_0x563357){const _0x10df5b=a189_0x3499f2;return normalizeEnv(_0x563357)===_0x10df5b(0xc5);}export function isDaily(_0x4874c4){const _0x98c37c=a189_0x3499f2;return normalizeEnv(_0x4874c4)===_0x98c37c(0xd2);}export function isDev(_0xfab55e){const _0x5b0512=a189_0x3499f2,_0x447f55=normalizeEnv(_0xfab55e);return _0x447f55===_0x5b0512(0xce)||_0x447f55===_0x5b0512(0xd1);}function a189_0x4856(_0x5568b9,_0x277f40){_0x5568b9=_0x5568b9-0xc4;const _0x46518f=a189_0x4651();let _0x485654=_0x46518f[_0x5568b9];return _0x485654;}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a189_0x3499f2(0xc5));export function getEnv(){return env;}export function initEnv(_0x4d9fba){env=normalizeEnv(_0x4d9fba);}
@@ -1 +1 @@
1
- function a189_0x7e7f(_0xcc1a11,_0x5ecef4){_0xcc1a11=_0xcc1a11-0xea;const _0xb5663b=a189_0xb566();let _0x7e7fe5=_0xb5663b[_0xcc1a11];return _0x7e7fe5;}function a189_0xb566(){const _0x5c9219=['json','3739460dKAZGP','1007166QttNZd','pretty','111690vlnUEk','6632nTBftE','229152LybSpG','136jFyQAL','7TlxRGM','705mizmBw','10680fdMGAC','3357BGWbQG'];a189_0xb566=function(){return _0x5c9219;};return a189_0xb566();}const a189_0x4bdb64=a189_0x7e7f;(function(_0x36ed90,_0x3829dc){const _0x4af311=a189_0x7e7f,_0x41ee44=_0x36ed90();while(!![]){try{const _0x2b1836=-parseInt(_0x4af311(0xed))/0x1+parseInt(_0x4af311(0xf3))/0x2+-parseInt(_0x4af311(0xef))/0x3+-parseInt(_0x4af311(0xee))/0x4*(parseInt(_0x4af311(0xf2))/0x5)+parseInt(_0x4af311(0xeb))/0x6*(parseInt(_0x4af311(0xf1))/0x7)+-parseInt(_0x4af311(0xf0))/0x8*(parseInt(_0x4af311(0xf4))/0x9)+parseInt(_0x4af311(0xea))/0xa;if(_0x2b1836===_0x3829dc)break;else _0x41ee44['push'](_0x41ee44['shift']());}catch(_0x4ff999){_0x41ee44['push'](_0x41ee44['shift']());}}}(a189_0xb566,0x1d0aa));export const RABETBASE_OUTPUT_FORMAT_VALUES=[a189_0x4bdb64(0xf5),a189_0x4bdb64(0xec),'compress'];
1
+ const a190_0x2ed03a=a190_0xe618;(function(_0x225090,_0x45a282){const _0x3da2be=a190_0xe618,_0x519b61=_0x225090();while(!![]){try{const _0x2eebf3=-parseInt(_0x3da2be(0x8e))/0x1+-parseInt(_0x3da2be(0x93))/0x2+parseInt(_0x3da2be(0x94))/0x3*(-parseInt(_0x3da2be(0x97))/0x4)+parseInt(_0x3da2be(0x91))/0x5*(-parseInt(_0x3da2be(0x90))/0x6)+parseInt(_0x3da2be(0x98))/0x7+-parseInt(_0x3da2be(0x92))/0x8+parseInt(_0x3da2be(0x99))/0x9*(parseInt(_0x3da2be(0x96))/0xa);if(_0x2eebf3===_0x45a282)break;else _0x519b61['push'](_0x519b61['shift']());}catch(_0x312262){_0x519b61['push'](_0x519b61['shift']());}}}(a190_0x4a27,0xa113d));function a190_0x4a27(){const _0x13ac3c=['14214UpgYdL','515lrbeGE','6121056zhZMnn','703250kFPcat','123AJIGcH','compress','10UFDNXf','35444RNWvhr','5415956ZkrAzI','20239803MoPVVj','638737yucqUW','pretty'];a190_0x4a27=function(){return _0x13ac3c;};return a190_0x4a27();}function a190_0xe618(_0x8ef3eb,_0x43f0b3){_0x8ef3eb=_0x8ef3eb-0x8e;const _0x4a2776=a190_0x4a27();let _0xe618a3=_0x4a2776[_0x8ef3eb];return _0xe618a3;}export const RABETBASE_OUTPUT_FORMAT_VALUES=['json',a190_0x2ed03a(0x8f),a190_0x2ed03a(0x95)];
@@ -1 +1 @@
1
- function a190_0x3d8c(_0x296fd8,_0x10858d){_0x296fd8=_0x296fd8-0xc3;const _0x495a0f=a190_0x495a();let _0x3d8c7f=_0x495a0f[_0x296fd8];return _0x3d8c7f;}(function(_0x43fd96,_0x3fe4be){const _0x478893=a190_0x3d8c,_0x3061b7=_0x43fd96();while(!![]){try{const _0xecf3d8=parseInt(_0x478893(0xcc))/0x1+parseInt(_0x478893(0xc5))/0x2*(-parseInt(_0x478893(0xca))/0x3)+-parseInt(_0x478893(0xc9))/0x4*(parseInt(_0x478893(0xcb))/0x5)+-parseInt(_0x478893(0xc4))/0x6+parseInt(_0x478893(0xc8))/0x7+parseInt(_0x478893(0xc7))/0x8+parseInt(_0x478893(0xc6))/0x9*(-parseInt(_0x478893(0xc3))/0xa);if(_0xecf3d8===_0x3fe4be)break;else _0x3061b7['push'](_0x3061b7['shift']());}catch(_0x2d7053){_0x3061b7['push'](_0x3061b7['shift']());}}}(a190_0x495a,0x31561));function a190_0x495a(){const _0x44c608=['399UAiTUq','1945EZbQhP','366940joQTMw','4899480YSLdbm','1337934AeBwtX','18lzqSdh','9CBTGKR','2837384ZzBRBU','2622963yArfsm','1852HFhIcZ'];a190_0x495a=function(){return _0x44c608;};return a190_0x495a();}export const DEFAULT_API_DIR='./src/api';
1
+ function a191_0x386c(){const _0x27a65f=['204253zgqwsH','1148585qyFCfm','9VEyidM','3162676CzYnME','259054hyowUY','18iJaTyT','353641NwioHV','1505400iNzgzD','./src/api','10082728VtYjPV'];a191_0x386c=function(){return _0x27a65f;};return a191_0x386c();}const a191_0x1e20b4=a191_0x39df;function a191_0x39df(_0x50f39a,_0x480b67){_0x50f39a=_0x50f39a-0x185;const _0x386c6c=a191_0x386c();let _0x39dfbe=_0x386c6c[_0x50f39a];return _0x39dfbe;}(function(_0x16211c,_0x6fed8c){const _0x3e0950=a191_0x39df,_0x31ea77=_0x16211c();while(!![]){try{const _0x2a3711=-parseInt(_0x3e0950(0x18b))/0x1+parseInt(_0x3e0950(0x189))/0x2*(-parseInt(_0x3e0950(0x187))/0x3)+-parseInt(_0x3e0950(0x188))/0x4+-parseInt(_0x3e0950(0x186))/0x5+-parseInt(_0x3e0950(0x18c))/0x6+-parseInt(_0x3e0950(0x185))/0x7+parseInt(_0x3e0950(0x18e))/0x8*(parseInt(_0x3e0950(0x18a))/0x9);if(_0x2a3711===_0x6fed8c)break;else _0x31ea77['push'](_0x31ea77['shift']());}catch(_0x347bbc){_0x31ea77['push'](_0x31ea77['shift']());}}}(a191_0x386c,0x74b2b));export const DEFAULT_API_DIR=a191_0x1e20b4(0x18d);
@@ -1 +1 @@
1
- const a191_0x3eed69=a191_0x11f6;function a191_0x4661(){const _0x175e0b=['2048475guZuAm','66nImNXy','397098qGjOHR','1265360OnAiXF','1433226wqRqNT','read','27nXpFkN','4wPmhyW','7dioFfu','629457YaYypb','high-risk-write','1PoXIrd','26yTlpyO','412616imgWsD','1280592VkVwQl','write'];a191_0x4661=function(){return _0x175e0b;};return a191_0x4661();}function a191_0x11f6(_0x5c63ad,_0x367e13){_0x5c63ad=_0x5c63ad-0x83;const _0x466153=a191_0x4661();let _0x11f637=_0x466153[_0x5c63ad];return _0x11f637;}(function(_0x11a1f7,_0x44544f){const _0x1c356e=a191_0x11f6,_0x34aa77=_0x11a1f7();while(!![]){try{const _0x2cadfe=-parseInt(_0x1c356e(0x8a))/0x1*(parseInt(_0x1c356e(0x91))/0x2)+-parseInt(_0x1c356e(0x88))/0x3*(parseInt(_0x1c356e(0x86))/0x4)+-parseInt(_0x1c356e(0x8f))/0x5+parseInt(_0x1c356e(0x83))/0x6*(parseInt(_0x1c356e(0x87))/0x7)+-parseInt(_0x1c356e(0x8c))/0x8*(-parseInt(_0x1c356e(0x85))/0x9)+parseInt(_0x1c356e(0x92))/0xa*(parseInt(_0x1c356e(0x90))/0xb)+parseInt(_0x1c356e(0x8d))/0xc*(parseInt(_0x1c356e(0x8b))/0xd);if(_0x2cadfe===_0x44544f)break;else _0x34aa77['push'](_0x34aa77['shift']());}catch(_0x415cd4){_0x34aa77['push'](_0x34aa77['shift']());}}}(a191_0x4661,0x85d5b));export const RISK_LEVEL_VALUES=[a191_0x3eed69(0x84),a191_0x3eed69(0x8e),a191_0x3eed69(0x89)];
1
+ const a192_0x2a44f5=a192_0x2b67;function a192_0x2b67(_0x80e60,_0x133cf4){_0x80e60=_0x80e60-0x64;const _0x34c943=a192_0x34c9();let _0x2b67aa=_0x34c943[_0x80e60];return _0x2b67aa;}(function(_0x983875,_0x2cc0b5){const _0x513aa6=a192_0x2b67,_0x6a3771=_0x983875();while(!![]){try{const _0x3811bf=-parseInt(_0x513aa6(0x6a))/0x1+parseInt(_0x513aa6(0x66))/0x2*(parseInt(_0x513aa6(0x6d))/0x3)+-parseInt(_0x513aa6(0x68))/0x4+parseInt(_0x513aa6(0x65))/0x5+parseInt(_0x513aa6(0x6f))/0x6*(-parseInt(_0x513aa6(0x69))/0x7)+parseInt(_0x513aa6(0x6b))/0x8+-parseInt(_0x513aa6(0x67))/0x9*(-parseInt(_0x513aa6(0x64))/0xa);if(_0x3811bf===_0x2cc0b5)break;else _0x6a3771['push'](_0x6a3771['shift']());}catch(_0x22c940){_0x6a3771['push'](_0x6a3771['shift']());}}}(a192_0x34c9,0xac675));function a192_0x34c9(){const _0x145732=['2403rMrSEZ','write','1632VnnGIQ','high-risk-write','13190Kactes','4851315RVxHsW','1810NWvNht','1161KYjLer','379212NjijTO','35609UDYFhf','84855wZNsJE','3233344iBxvuv','read'];a192_0x34c9=function(){return _0x145732;};return a192_0x34c9();}export const RISK_LEVEL_VALUES=[a192_0x2a44f5(0x6c),a192_0x2a44f5(0x6e),a192_0x2a44f5(0x70)];
@@ -1 +1 @@
1
- (function(_0x3ac319,_0x1b21d5){const _0x43a298=a192_0x3832,_0x1bd02e=_0x3ac319();while(!![]){try{const _0x381a5b=-parseInt(_0x43a298(0x179))/0x1*(parseInt(_0x43a298(0x186))/0x2)+parseInt(_0x43a298(0x168))/0x3+parseInt(_0x43a298(0x180))/0x4*(-parseInt(_0x43a298(0x176))/0x5)+parseInt(_0x43a298(0x167))/0x6+-parseInt(_0x43a298(0x170))/0x7+parseInt(_0x43a298(0x16e))/0x8*(-parseInt(_0x43a298(0x16d))/0x9)+parseInt(_0x43a298(0x17a))/0xa;if(_0x381a5b===_0x1b21d5)break;else _0x1bd02e['push'](_0x1bd02e['shift']());}catch(_0x291c8b){_0x1bd02e['push'](_0x1bd02e['shift']());}}}(a192_0x5c44,0x9317c));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat}from'../framework/types.js';function stringConfigValue(_0x58c6c2){const _0x3a958a=a192_0x3832;return typeof _0x58c6c2===_0x3a958a(0x16f)&&_0x58c6c2[_0x3a958a(0x17d)]()?_0x58c6c2[_0x3a958a(0x17d)]():undefined;}function a192_0x3832(_0x20822d,_0x463aa0){_0x20822d=_0x20822d-0x165;const _0x5c446c=a192_0x5c44();let _0x3832e3=_0x5c446c[_0x20822d];return _0x3832e3;}function appProfiles(_0x20b23b){const _0x52f987=a192_0x3832;return _0x20b23b[_0x52f987(0x18b)]&&typeof _0x20b23b['apps']===_0x52f987(0x187)?_0x20b23b['apps']:{};}function a192_0x5c44(){const _0x2f2b33=['accessKey','apps','format','ENV','keys','1565280vChozX','2442522PoJUuh','env','globalConfig','find','production','1541655iwGwuo','16KUpLvu','string','888643jANVqy','app','RISK_LEVEL','riskLevel','appcode','length','312115SfnZvP','PAGE_SIZE','projectConfig','1ljZdJp','15673170KNuMUu','cookie','MAX_RISK','trim','daily','defaultApp','68wZpBMK','entries','true','apiDir','write','locale','1018298hOiPWZ','object','read','pageSize'];a192_0x5c44=function(){return _0x2f2b33;};return a192_0x5c44();}function resolveDefaultAppName(_0x3e6a50){const _0x32f388=a192_0x3832,_0x3943c3=stringConfigValue(_0x3e6a50['defaultApp']);if(_0x3943c3)return _0x3943c3;return Object[_0x32f388(0x166)](appProfiles(_0x3e6a50))[0x0];}function resolveTopLevelAppCode(_0x5ebdd3){const _0x238628=a192_0x3832;return stringConfigValue(_0x5ebdd3['appcode'])||stringConfigValue(_0x5ebdd3[_0x238628(0x171)]);}export function resolveAppConfig({raw:_0x2f4ca9,flags:_0x268999,layers:_0x398ccf,readEnv:_0x1ecf13}){const _0x231320=a192_0x3832,_0x245d07=_0x398ccf?.[_0x231320(0x178)]??{},_0x2c5475=_0x398ccf?.[_0x231320(0x16a)]??{},_0x2e9a91=Object[_0x231320(0x166)](_0x245d07)[_0x231320(0x175)]>0x0,_0x33c250=!_0x2e9a91||_0x245d07['inherit']===!![],_0x162823=_0x2e9a91?resolveDefaultAppName(_0x245d07):undefined,_0x250058=_0x33c250?resolveDefaultAppName(_0x2c5475):undefined,_0x37f279=stringConfigValue(_0x268999[_0x231320(0x171)]),_0x1cf35b=_0x1ecf13('APP'),_0xbce7e2={};if(_0x2f4ca9[_0x231320(0x18b)]&&typeof _0x2f4ca9[_0x231320(0x18b)]===_0x231320(0x187))for(const [_0x57de79,_0x6e3fd]of Object[_0x231320(0x181)](_0x2f4ca9[_0x231320(0x18b)])){_0x6e3fd&&typeof _0x6e3fd===_0x231320(0x187)&&_0x6e3fd['appcode']&&(_0xbce7e2[_0x57de79]=_0x6e3fd);}const _0x5ccf7d=_0x2f4ca9[_0x231320(0x17f)]||undefined,_0x30b346=Object['keys'](_0xbce7e2)[_0x231320(0x175)]>0x0,_0xea72c9=_0x37f279||_0x162823||_0x1cf35b||_0x250058||_0x5ccf7d||undefined,_0x30cbad=stringConfigValue(_0x268999[_0x231320(0x174)]),_0x31f28b=_0x30cbad?Object[_0x231320(0x181)](_0xbce7e2)[_0x231320(0x16b)](([,_0x150928])=>_0x150928?.[_0x231320(0x174)]===_0x30cbad):undefined,_0x305426=_0x31f28b?.[0x0],_0x46ee4c=_0x31f28b?.[0x1],_0x4e52d5=_0x30cbad?_0x305426:_0xea72c9;let _0x22b73e=_0x4e52d5&&_0xbce7e2[_0x4e52d5]?_0xbce7e2[_0x4e52d5]:undefined;_0x30cbad&&_0x46ee4c&&(_0x22b73e=_0x46ee4c);const _0x4dc884=_0x30cbad?_0x46ee4c??_0x22b73e:_0x22b73e,_0x82f2ef=!_0x37f279&&!_0x162823&&_0x1cf35b&&_0x4e52d5===_0x1cf35b,_0x395b47=_0x37f279||(_0x82f2ef?_0x1cf35b:undefined)||(_0x30cbad?_0x305426:undefined),_0x37c6d1=_0x4dc884?.[_0x231320(0x174)],_0x129cd8=_0x2e9a91?resolveTopLevelAppCode(_0x245d07):undefined,_0x3f3df5=_0x33c250?resolveTopLevelAppCode(_0x2c5475):undefined,_0x74bbd5=_0x37f279||_0x162823?_0x37c6d1:undefined,_0x1cabd4=!_0x37f279&&!_0x162823?_0x37c6d1:undefined,_0x2d9192=_0x30cbad||_0x74bbd5||_0x129cd8||_0x1cabd4||_0x3f3df5||undefined,_0x522d54=_0x2e9a91?stringConfigValue(_0x245d07['env']):undefined,_0x25b1b6=_0x33c250?stringConfigValue(_0x2c5475['env']):undefined,_0x475ed6=_0x268999[_0x231320(0x169)]||_0x4dc884?.['env']||_0x522d54||_0x1ecf13(_0x231320(0x165))||_0x25b1b6||_0x2f4ca9[_0x231320(0x169)]||DEFAULT_CONFIG_VALUES['env'],_0x22afa7=_0x4dc884?.['locale']||_0x2f4ca9[_0x231320(0x185)]||DEFAULT_CONFIG_VALUES['locale'],_0x4f5cb6=_0x1ecf13('COOKIE')||_0x4dc884?.[_0x231320(0x17b)]||_0x2f4ca9[_0x231320(0x17b)]||undefined,_0xfd04a1=_0x1ecf13('ACCESS_KEY')||_0x4dc884?.[_0x231320(0x18a)]||_0x2f4ca9[_0x231320(0x18a)]||undefined,_0x552923=_0x268999[_0x231320(0x18c)]||_0x1ecf13('FORMAT')||_0x4dc884?.[_0x231320(0x18c)]||_0x2f4ca9[_0x231320(0x18c)],_0x1fc43b=normalizeLegacyOutputFormat(_0x552923),_0x516dec=_0x1ecf13(_0x231320(0x177))||_0x4dc884?.[_0x231320(0x189)]||_0x2f4ca9['pageSize'],_0x4ced8e=_0x516dec?Number(_0x516dec)||undefined:undefined,_0x4beacb=_0x1ecf13(_0x231320(0x172))||_0x1ecf13(_0x231320(0x17c))||_0x4dc884?.[_0x231320(0x173)]||_0x2f4ca9[_0x231320(0x173)]||_0x2f4ca9['maxRisk'],_0x176a03=_0x4beacb===_0x231320(0x188)||_0x4beacb===_0x231320(0x184)?_0x4beacb:DEFAULT_CONFIG_VALUES[_0x231320(0x173)],_0x3e02a9=_0x1ecf13('VERBOSE'),_0x387039=_0x3e02a9==='1'||_0x3e02a9===_0x231320(0x182),_0x5bae1a=_0x4dc884?.['apiDir']||_0x2f4ca9[_0x231320(0x183)]||DEFAULT_CONFIG_VALUES[_0x231320(0x183)],_0x2416c3=isDaily(normalizeEnv(String(_0x475ed6)))?_0x231320(0x17e):_0x231320(0x16c);return{'appCode':typeof _0x2d9192===_0x231320(0x16f)&&_0x2d9192[_0x231320(0x17d)]()?_0x2d9192[_0x231320(0x17d)]():undefined,'env':_0x2416c3,'locale':_0x22afa7,'cookie':_0x4f5cb6,'accessKey':_0xfd04a1,'format':_0x1fc43b,'pageSize':_0x4ced8e,'riskLevel':_0x176a03,'verbose':_0x387039,'apiDir':_0x5bae1a,'apps':_0xbce7e2,'defaultApp':_0x5ccf7d,'currentApp':_0x30b346?_0x4e52d5:undefined,'explicitAppName':_0x395b47};}
1
+ (function(_0x43d098,_0x20356f){const _0x3b219f=a193_0x4a9c,_0x1adb54=_0x43d098();while(!![]){try{const _0x3a6351=parseInt(_0x3b219f(0xb6))/0x1+-parseInt(_0x3b219f(0xc1))/0x2+-parseInt(_0x3b219f(0xc8))/0x3+-parseInt(_0x3b219f(0xd4))/0x4+-parseInt(_0x3b219f(0xca))/0x5*(parseInt(_0x3b219f(0xd9))/0x6)+-parseInt(_0x3b219f(0xcf))/0x7*(parseInt(_0x3b219f(0xd6))/0x8)+parseInt(_0x3b219f(0xdb))/0x9;if(_0x3a6351===_0x20356f)break;else _0x1adb54['push'](_0x1adb54['shift']());}catch(_0x5c1da1){_0x1adb54['push'](_0x1adb54['shift']());}}}(a193_0x267e,0xedb5a));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';function a193_0x267e(){const _0x243683=['entries','globalConfig','10905276ffBMlP','riskLevel','58210236TfPQIt','length','APP','FORMAT','appcode','1035680gbbHSo','VERBOSE','RISK_LEVEL','pageSize','env','daily','apps','production','locale','read','format','2705116blxSuX','cookie','inherit','projectConfig','trim','maxRisk','COOKIE','1695258tzuLHp','defaultApp','5LKENPB','keys','true','app','find','938BzXpTO','ACCESS_KEY','string','write','apiDir','3438168ykEmre','object','115528TbGiFf'];a193_0x267e=function(){return _0x243683;};return a193_0x267e();}import{normalizeLegacyOutputFormat}from'../framework/types.js';function stringConfigValue(_0x39e161){const _0xaabc62=a193_0x4a9c;return typeof _0x39e161===_0xaabc62(0xd1)&&_0x39e161[_0xaabc62(0xc5)]()?_0x39e161[_0xaabc62(0xc5)]():undefined;}function appProfiles(_0x5bd12e){const _0x3e0b56=a193_0x4a9c;return _0x5bd12e['apps']&&typeof _0x5bd12e[_0x3e0b56(0xbc)]==='object'?_0x5bd12e['apps']:{};}function a193_0x4a9c(_0x2d4a41,_0x46d7e4){_0x2d4a41=_0x2d4a41-0xb2;const _0x267e1d=a193_0x267e();let _0x4a9cfe=_0x267e1d[_0x2d4a41];return _0x4a9cfe;}function resolveDefaultAppName(_0x14b148){const _0x148e8a=a193_0x4a9c,_0x6eb4ad=stringConfigValue(_0x14b148[_0x148e8a(0xc9)]);if(_0x6eb4ad)return _0x6eb4ad;return Object[_0x148e8a(0xcb)](appProfiles(_0x14b148))[0x0];}function resolveTopLevelAppCode(_0x3e77cc){const _0x1f5b2b=a193_0x4a9c;return stringConfigValue(_0x3e77cc[_0x1f5b2b(0xb5)])||stringConfigValue(_0x3e77cc[_0x1f5b2b(0xcd)]);}export function resolveAppConfig({raw:_0x104864,flags:_0x354c96,layers:_0x30ebba,readEnv:_0x413559}){const _0x2e1194=a193_0x4a9c,_0x553d6a=_0x30ebba?.[_0x2e1194(0xc4)]??{},_0x1cf27f=_0x30ebba?.[_0x2e1194(0xd8)]??{},_0x408f19=Object['keys'](_0x553d6a)['length']>0x0,_0xf5f3f2=!_0x408f19||_0x553d6a[_0x2e1194(0xc3)]===!![],_0x35d23a=_0x408f19?resolveDefaultAppName(_0x553d6a):undefined,_0x4375a0=_0xf5f3f2?resolveDefaultAppName(_0x1cf27f):undefined,_0x3def79=stringConfigValue(_0x354c96[_0x2e1194(0xcd)]),_0x51cd1e=_0x413559(_0x2e1194(0xb3)),_0x4165d1={};if(_0x104864[_0x2e1194(0xbc)]&&typeof _0x104864[_0x2e1194(0xbc)]===_0x2e1194(0xd5))for(const [_0x1f1a52,_0x536a3f]of Object['entries'](_0x104864[_0x2e1194(0xbc)])){_0x536a3f&&typeof _0x536a3f===_0x2e1194(0xd5)&&_0x536a3f[_0x2e1194(0xb5)]&&(_0x4165d1[_0x1f1a52]=_0x536a3f);}const _0x41a1fa=_0x104864['defaultApp']||undefined,_0x434ad6=Object[_0x2e1194(0xcb)](_0x4165d1)[_0x2e1194(0xb2)]>0x0,_0x567b1f=_0x3def79||_0x35d23a||_0x51cd1e||_0x4375a0||_0x41a1fa||undefined,_0x5971d5=stringConfigValue(_0x354c96[_0x2e1194(0xb5)]),_0x3803bd=_0x5971d5?Object[_0x2e1194(0xd7)](_0x4165d1)[_0x2e1194(0xce)](([,_0x5a9ec0])=>_0x5a9ec0?.['appcode']===_0x5971d5):undefined,_0x4a0e8a=_0x3803bd?.[0x0],_0x472ca2=_0x3803bd?.[0x1],_0x42d095=_0x5971d5?_0x4a0e8a:_0x567b1f;let _0x1a653f=_0x42d095&&_0x4165d1[_0x42d095]?_0x4165d1[_0x42d095]:undefined;_0x5971d5&&_0x472ca2&&(_0x1a653f=_0x472ca2);const _0x3bbea9=_0x5971d5?_0x472ca2??_0x1a653f:_0x1a653f,_0xc6cda2=!_0x3def79&&!_0x35d23a&&_0x51cd1e&&_0x42d095===_0x51cd1e,_0x580244=_0x3def79||(_0xc6cda2?_0x51cd1e:undefined)||(_0x5971d5?_0x4a0e8a:undefined),_0x22a518=_0x3bbea9?.['appcode'],_0x1dc1cc=_0x408f19?resolveTopLevelAppCode(_0x553d6a):undefined,_0x519dd3=_0xf5f3f2?resolveTopLevelAppCode(_0x1cf27f):undefined,_0x5ab3f7=_0x3def79||_0x35d23a?_0x22a518:undefined,_0x543c33=!_0x3def79&&!_0x35d23a?_0x22a518:undefined,_0x222416=_0x5971d5||_0x5ab3f7||_0x1dc1cc||_0x543c33||_0x519dd3||undefined,_0x2204e3=_0x408f19?stringConfigValue(_0x553d6a[_0x2e1194(0xba)]):undefined,_0x1a7a2b=_0xf5f3f2?stringConfigValue(_0x1cf27f[_0x2e1194(0xba)]):undefined,_0x39163b=_0x354c96[_0x2e1194(0xba)]||_0x3bbea9?.['env']||_0x2204e3||_0x413559('ENV')||_0x1a7a2b||_0x104864[_0x2e1194(0xba)]||DEFAULT_CONFIG_VALUES[_0x2e1194(0xba)],_0x1c9381=_0x3bbea9?.[_0x2e1194(0xbe)]||_0x104864[_0x2e1194(0xbe)]||DEFAULT_CONFIG_VALUES['locale'],_0x8dbbf0=_0x413559(_0x2e1194(0xc7))||_0x3bbea9?.[_0x2e1194(0xc2)]||_0x104864[_0x2e1194(0xc2)]||undefined,_0x475cd7=_0x413559(_0x2e1194(0xd0))||_0x3bbea9?.['accessKey']||_0x104864['accessKey']||undefined,_0x3d9017=_0x354c96[_0x2e1194(0xc0)]||_0x413559(_0x2e1194(0xb4))||_0x3bbea9?.[_0x2e1194(0xc0)]||_0x104864[_0x2e1194(0xc0)],_0x28b641=normalizeLegacyOutputFormat(_0x3d9017),_0x497c48=_0x413559('PAGE_SIZE')||_0x3bbea9?.[_0x2e1194(0xb9)]||_0x104864['pageSize'],_0x16b367=_0x497c48?Number(_0x497c48)||undefined:undefined,_0x25722b=_0x413559(_0x2e1194(0xb8))||_0x413559('MAX_RISK')||_0x3bbea9?.[_0x2e1194(0xda)]||_0x104864['riskLevel']||_0x104864[_0x2e1194(0xc6)],_0x55a194=_0x25722b===_0x2e1194(0xbf)||_0x25722b===_0x2e1194(0xd2)?_0x25722b:DEFAULT_CONFIG_VALUES['riskLevel'],_0x4381af=_0x413559(_0x2e1194(0xb7)),_0x49a9d4=_0x4381af==='1'||_0x4381af===_0x2e1194(0xcc),_0x287aba=_0x3bbea9?.['apiDir']||_0x104864[_0x2e1194(0xd3)]||DEFAULT_CONFIG_VALUES[_0x2e1194(0xd3)],_0x50c4dc=isDaily(normalizeEnv(String(_0x39163b)))?_0x2e1194(0xbb):_0x2e1194(0xbd);return{'appCode':typeof _0x222416===_0x2e1194(0xd1)&&_0x222416['trim']()?_0x222416[_0x2e1194(0xc5)]():undefined,'env':_0x50c4dc,'locale':_0x1c9381,'cookie':_0x8dbbf0,'accessKey':_0x475cd7,'format':_0x28b641,'pageSize':_0x16b367,'riskLevel':_0x55a194,'verbose':_0x49a9d4,'apiDir':_0x287aba,'apps':_0x4165d1,'defaultApp':_0x41a1fa,'currentApp':_0x434ad6?_0x42d095:undefined,'explicitAppName':_0x580244};}
@@ -1 +1 @@
1
- function a193_0x530a(){const _0x1097de=['2xYSizT','555100nWBpdf','38015uZjfJs','360NWfaNa','324wsBFfb','cookie','162687rxvfKS','10617975SQYrbK','383171HNwvIr','2652435PHFlHR','1819510WrYgRz'];a193_0x530a=function(){return _0x1097de;};return a193_0x530a();}function a193_0x3591(_0x543867,_0x21c28b){_0x543867=_0x543867-0x185;const _0x530a3d=a193_0x530a();let _0x359172=_0x530a3d[_0x543867];return _0x359172;}(function(_0x1c1bca,_0x2e378d){const _0x17fd81=a193_0x3591,_0x3e0f82=_0x1c1bca();while(!![]){try{const _0x40b7aa=-parseInt(_0x17fd81(0x18d))/0x1*(parseInt(_0x17fd81(0x185))/0x2)+-parseInt(_0x17fd81(0x18e))/0x3+-parseInt(_0x17fd81(0x186))/0x4+parseInt(_0x17fd81(0x187))/0x5*(-parseInt(_0x17fd81(0x189))/0x6)+-parseInt(_0x17fd81(0x18b))/0x7*(-parseInt(_0x17fd81(0x188))/0x8)+parseInt(_0x17fd81(0x18c))/0x9+parseInt(_0x17fd81(0x18f))/0xa;if(_0x40b7aa===_0x2e378d)break;else _0x3e0f82['push'](_0x3e0f82['shift']());}catch(_0x4f4fce){_0x3e0f82['push'](_0x3e0f82['shift']());}}}(a193_0x530a,0x90446));import{getIsSessionValid}from'../auth/is-session-valid.js';import{CliErrors}from'../errors.js';export async function buildAuth(_0x995ec8){const _0x75f30d=a193_0x3591,{getCookie:_0x34c6f3}=await import('../auth/get-cookie.js'),_0x54f4be=_0x995ec8[_0x75f30d(0x18a)]||_0x34c6f3(),_0x48987f=_0x54f4be?await getIsSessionValid():![];return{'cookie':_0x54f4be,'isLoggedIn':_0x48987f,async 'getOrLogin'(){if(_0x54f4be&&_0x48987f)return _0x54f4be;throw CliErrors['authRequired']();}};}
1
+ (function(_0x300b97,_0x5c825b){const _0x1af4df=a194_0x3a31,_0x19ef31=_0x300b97();while(!![]){try{const _0x5179d6=-parseInt(_0x1af4df(0x139))/0x1+parseInt(_0x1af4df(0x140))/0x2+-parseInt(_0x1af4df(0x13e))/0x3*(-parseInt(_0x1af4df(0x135))/0x4)+-parseInt(_0x1af4df(0x13d))/0x5*(-parseInt(_0x1af4df(0x13f))/0x6)+-parseInt(_0x1af4df(0x13a))/0x7*(-parseInt(_0x1af4df(0x138))/0x8)+parseInt(_0x1af4df(0x137))/0x9*(parseInt(_0x1af4df(0x136))/0xa)+parseInt(_0x1af4df(0x13b))/0xb*(-parseInt(_0x1af4df(0x13c))/0xc);if(_0x5179d6===_0x5c825b)break;else _0x19ef31['push'](_0x19ef31['shift']());}catch(_0x3220e6){_0x19ef31['push'](_0x19ef31['shift']());}}}(a194_0x5f0e,0x99253));import{getIsSessionValid}from'../auth/is-session-valid.js';function a194_0x5f0e(){const _0x58a685=['1083132PgdcFs','3074744sDDkoo','986711ptZwdl','21fLxYgj','4337553dwbhgO','48hhjrTw','9905UtUBzC','3RhoxJs','606RHTSiu','1680978cffLEo','authRequired','2546572ecRZMq','30xZCHMn'];a194_0x5f0e=function(){return _0x58a685;};return a194_0x5f0e();}import{CliErrors}from'../errors.js';function a194_0x3a31(_0x3dba5e,_0x4f41b7){_0x3dba5e=_0x3dba5e-0x135;const _0x5f0e7f=a194_0x5f0e();let _0x3a3185=_0x5f0e7f[_0x3dba5e];return _0x3a3185;}export async function buildAuth(_0x36e20d){const {getCookie:_0x2c057f}=await import('../auth/get-cookie.js'),_0xf63d47=_0x36e20d['cookie']||_0x2c057f(),_0x33b2ff=_0xf63d47?await getIsSessionValid():![];return{'cookie':_0xf63d47,'isLoggedIn':_0x33b2ff,async 'getOrLogin'(){const _0x509a3a=a194_0x3a31;if(_0xf63d47&&_0x33b2ff)return _0xf63d47;throw CliErrors[_0x509a3a(0x141)]();}};}
@@ -1 +1 @@
1
- const a194_0x863e2=a194_0x1ebb;(function(_0x400e44,_0xfa06e9){const _0x3cdd88=a194_0x1ebb,_0x2aa892=_0x400e44();while(!![]){try{const _0xcc2f12=-parseInt(_0x3cdd88(0x89))/0x1*(-parseInt(_0x3cdd88(0x8c))/0x2)+parseInt(_0x3cdd88(0x8f))/0x3*(parseInt(_0x3cdd88(0x85))/0x4)+parseInt(_0x3cdd88(0x94))/0x5*(parseInt(_0x3cdd88(0x84))/0x6)+parseInt(_0x3cdd88(0x7c))/0x7+parseInt(_0x3cdd88(0x83))/0x8+parseInt(_0x3cdd88(0x7e))/0x9*(parseInt(_0x3cdd88(0x9a))/0xa)+-parseInt(_0x3cdd88(0x97))/0xb;if(_0xcc2f12===_0xfa06e9)break;else _0x2aa892['push'](_0x2aa892['shift']());}catch(_0x29abe0){_0x2aa892['push'](_0x2aa892['shift']());}}}(a194_0x49d8,0xdd99c));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{dirname,parse,resolve}from'node:path';import{homedir}from'node:os';import{CLI_BIN_NAME}from'../constant/cli.js';export const NEW_CONFIG_NAME=a194_0x863e2(0x79);export const CONFIG_NAMES=[a194_0x863e2(0x79),a194_0x863e2(0xa1),'.lovrabetrc'];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a194_0x863e2(0x81)](_0x28557f=>_0x28557f!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();export function resolveConfigPath(_0x1e5551){for(const _0x47d8a5 of CONFIG_NAMES){const _0x48de88=resolve(_0x1e5551,_0x47d8a5);if(existsSync(_0x48de88))return _0x48de88;}return undefined;}export function findProjectRootDirectory(_0x3f008c=process[a194_0x863e2(0x87)]()){let _0x22f7df=resolve(_0x3f008c);const {root:_0x451542}=parse(_0x22f7df),_0x59bdc1=homedir();while(!![]){if(resolveConfigPath(_0x22f7df)){if(_0x22f7df===_0x59bdc1)break;return _0x22f7df;}if(_0x22f7df===_0x451542||_0x22f7df===_0x59bdc1)break;const _0x519aa2=dirname(_0x22f7df);if(_0x519aa2===_0x22f7df)break;_0x22f7df=_0x519aa2;}return resolve(_0x3f008c);}export function getProjectConfigPath(){const _0x346e83=a194_0x863e2;return resolveConfigPath(process[_0x346e83(0x87)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x3ebf21){const _0x5414a3=a194_0x863e2;if(!existsSync(_0x3ebf21))return{'status':_0x5414a3(0x9d)};try{const _0x1953c5=readFileSync(_0x3ebf21,{'encoding':_0x5414a3(0x92)});if(!_0x1953c5?.['trim']())return{'status':_0x5414a3(0x88)};const _0x2573bc=JSON[_0x5414a3(0xa0)](_0x1953c5);return{'status':'ok','data':_0x2573bc};}catch(_0x4fe2f1){return{'status':'error','message':_0x4fe2f1 instanceof Error?_0x4fe2f1[_0x5414a3(0x7f)]:String(_0x4fe2f1)};}}function parseCliConfigJsonFile(_0x1a33e7,_0x3474f9,_0x476288){const _0x490eef=a194_0x863e2,_0x4af66e=inspectCliConfigJsonFile(_0x1a33e7);if(_0x4af66e['status']===_0x490eef(0x9d)||_0x4af66e[_0x490eef(0xa4)]===_0x490eef(0x88))return{};if(_0x4af66e[_0x490eef(0xa4)]==='ok')return _0x4af66e['data'];return _0x3474f9===_0x490eef(0xa3)&&_0x476288&&console[_0x490eef(0x8d)](CLI_BIN_NAME+':\x20'+_0x476288+'\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20'+_0x1a33e7+_0x490eef(0x9b)+_0x4af66e[_0x490eef(0x7f)]),{};}function normalizeLegacyConfigShape(_0x98fa37){const _0x4171f3=a194_0x863e2;if(!_0x98fa37||typeof _0x98fa37!==_0x4171f3(0xa6))return{'config':{},'migrated':![]};const _0x6757c0={..._0x98fa37},_0x590ed0=_0x6757c0[_0x4171f3(0x7b)]&&typeof _0x6757c0['apps']==='object'?{..._0x6757c0[_0x4171f3(0x7b)]}:{},_0x300c3f=Object[_0x4171f3(0x82)](_0x590ed0)['length'],_0x2fe86d=_0x6757c0[_0x4171f3(0x95)]||_0x6757c0[_0x4171f3(0x98)];let _0x3c2454=![];if(_0x2fe86d&&_0x300c3f===0x0){const _0x3d5cd3=typeof _0x6757c0[_0x4171f3(0x9c)]==='string'&&_0x6757c0['defaultApp'][_0x4171f3(0x7d)]()?_0x6757c0[_0x4171f3(0x9c)]:String(_0x2fe86d)[_0x4171f3(0x7d)]();_0x590ed0[_0x3d5cd3]={'appcode':String(_0x2fe86d)[_0x4171f3(0x7d)](),..._0x6757c0[_0x4171f3(0x99)]!=null?{'env':_0x6757c0['env']}:{},..._0x6757c0[_0x4171f3(0x80)]!=null?{'apiDir':_0x6757c0[_0x4171f3(0x80)]}:{},..._0x6757c0[_0x4171f3(0x96)]!=null?{'cookie':_0x6757c0[_0x4171f3(0x96)]}:{},..._0x6757c0[_0x4171f3(0x91)]!=null?{'accessKey':_0x6757c0[_0x4171f3(0x91)]}:{},..._0x6757c0[_0x4171f3(0xa8)]!=null?{'format':_0x6757c0[_0x4171f3(0xa8)]}:{},..._0x6757c0[_0x4171f3(0xa2)]!=null?{'pageSize':_0x6757c0['pageSize']}:{},..._0x6757c0[_0x4171f3(0xaa)]!=null?{'riskLevel':_0x6757c0['riskLevel']}:{},..._0x6757c0[_0x4171f3(0x8a)]!=null?{'locale':_0x6757c0[_0x4171f3(0x8a)]}:{}},_0x6757c0['apps']=_0x590ed0;if(!_0x6757c0[_0x4171f3(0x9c)])_0x6757c0[_0x4171f3(0x9c)]=_0x3d5cd3;_0x3c2454=!![];}return(_0x4171f3(0x95)in _0x6757c0||_0x4171f3(0x98)in _0x6757c0)&&(delete _0x6757c0[_0x4171f3(0x95)],delete _0x6757c0['app'],_0x3c2454=!![]),{'config':_0x6757c0,'migrated':_0x3c2454};}function writeNormalizedConfigIfNeeded(_0x29ba21,_0x214556){const _0x59205b=a194_0x863e2,_0x4cd93f=JSON[_0x59205b(0x9e)](_0x214556,null,0x2)+'\x0a';if(normalizedWriteCache[_0x59205b(0x9f)](_0x29ba21)===_0x4cd93f)return;writeConfigFile(_0x29ba21,_0x214556),normalizedWriteCache[_0x59205b(0x8e)](_0x29ba21,_0x4cd93f);}function parseAndNormalizeConfig(_0x11b4ae,_0x52d796,_0x99c051){const _0x3641cd=a194_0x863e2,_0x195fe8=parseCliConfigJsonFile(_0x11b4ae,_0x52d796,_0x99c051),_0x316077=normalizeLegacyConfigShape(_0x195fe8);if(_0x316077[_0x3641cd(0x86)])try{writeNormalizedConfigIfNeeded(_0x11b4ae,_0x316077['config']);}catch{}return _0x316077[_0x3641cd(0x90)];}export function loadRawConfigLayers(_0x218191){const _0x58c30f=a194_0x863e2;let _0x41eeb5={},_0xc2edce={};const _0x1ba7a9=resolveConfigPath(homedir());_0x1ba7a9&&(_0x41eeb5=parseAndNormalizeConfig(_0x1ba7a9,_0x58c30f(0xa3),_0x58c30f(0x93)));const _0x5c2444=_0x218191??findProjectRootDirectory(),_0x437d41=resolveConfigPath(_0x5c2444);return _0x437d41&&(_0xc2edce=parseAndNormalizeConfig(_0x437d41,_0x58c30f(0xa3),_0x58c30f(0xa9))),{'globalPath':_0x1ba7a9,'projectPath':_0x437d41,'globalConfig':_0x41eeb5,'projectConfig':_0xc2edce};}const INHERIT_WHITELIST=[a194_0x863e2(0x96),a194_0x863e2(0x91),a194_0x863e2(0x8a),a194_0x863e2(0xa8),'riskLevel',a194_0x863e2(0xa2)];export function mergeRawConfigLayers(_0x5034c5){const _0x16a375=a194_0x863e2,{globalConfig:_0x120e4c,projectConfig:_0x25f483}=_0x5034c5,_0x34e7a3=Object[_0x16a375(0x82)](_0x25f483)[_0x16a375(0xa5)]>0x0;if(!_0x34e7a3)return mergeGlobalOnly(_0x120e4c);if(_0x25f483[_0x16a375(0x7a)]===!![])return mergeFullInherit(_0x120e4c,_0x25f483);if(_0x25f483['inherit']===![])return mergeIsolated(_0x25f483);return mergeProjectFirst(_0x120e4c,_0x25f483);}function mergeGlobalOnly(_0x29383f){const _0x4437c6=a194_0x863e2,_0x3f3697={..._0x29383f},_0x39d47b=_0x29383f['apps']&&typeof _0x29383f['apps']===_0x4437c6(0xa6)?_0x29383f['apps']:{};if(Object[_0x4437c6(0x82)](_0x39d47b)[_0x4437c6(0xa5)]>0x0)_0x3f3697[_0x4437c6(0x7b)]=_0x39d47b;if(_0x29383f['defaultApp'])_0x3f3697[_0x4437c6(0x9c)]=_0x29383f[_0x4437c6(0x9c)];else{const _0x171752=Object['keys'](_0x39d47b);if(_0x171752[_0x4437c6(0xa5)]>0x0)_0x3f3697[_0x4437c6(0x9c)]=_0x171752[0x0];}return _0x3f3697;}function mergeIsolated(_0x111e0a){const _0xa9e4ae=a194_0x863e2,_0x3514a5={..._0x111e0a};delete _0x3514a5[_0xa9e4ae(0x7a)];const _0x135a07=_0x111e0a[_0xa9e4ae(0x7b)]&&typeof _0x111e0a['apps']===_0xa9e4ae(0xa6)?_0x111e0a[_0xa9e4ae(0x7b)]:{};Object[_0xa9e4ae(0x82)](_0x135a07)[_0xa9e4ae(0xa5)]>0x0?_0x3514a5[_0xa9e4ae(0x7b)]=_0x135a07:delete _0x3514a5[_0xa9e4ae(0x7b)];if(_0xa9e4ae(0x9c)in _0x111e0a)_0x3514a5[_0xa9e4ae(0x9c)]=_0x111e0a[_0xa9e4ae(0x9c)];else Object[_0xa9e4ae(0x82)](_0x135a07)[_0xa9e4ae(0xa5)]>0x0?_0x3514a5['defaultApp']=Object[_0xa9e4ae(0x82)](_0x135a07)[0x0]:delete _0x3514a5['defaultApp'];return _0x3514a5;}function a194_0x1ebb(_0x589df8,_0x3613f9){_0x589df8=_0x589df8-0x79;const _0x49d8e2=a194_0x49d8();let _0x1ebb01=_0x49d8e2[_0x589df8];return _0x1ebb01;}function a194_0x49d8(){const _0x20937=['trim','46647gNbRtc','message','apiDir','filter','keys','7174872yFNmzw','4164ZGtJds','628fdAtzI','migrated','cwd','empty','1021569ADpZdC','locale','project','2VBNvqP','error','set','11670iqAJux','config','accessKey','utf8','Global','1485XXzIef','appcode','cookie','45384350GlnXkb','app','env','2410lniDgb','\x0a\x20\x20','defaultApp','missing','stringify','get','parse','.lovrabet.json','pageSize','warn','status','length','object','.tmp','format','Project','riskLevel','.rabetbase.json','inherit','apps','7344029fcSqRX'];a194_0x49d8=function(){return _0x20937;};return a194_0x49d8();}function mergeProjectFirst(_0x26ab78,_0x23db2a){const _0x4cf385=a194_0x863e2,_0x513c39={..._0x23db2a};delete _0x513c39[_0x4cf385(0x7a)];for(const _0x44b8c5 of INHERIT_WHITELIST){!(_0x44b8c5 in _0x513c39)&&_0x44b8c5 in _0x26ab78&&(_0x513c39[_0x44b8c5]=_0x26ab78[_0x44b8c5]);}const _0x136bdb=_0x23db2a[_0x4cf385(0x7b)]&&typeof _0x23db2a[_0x4cf385(0x7b)]===_0x4cf385(0xa6)?_0x23db2a[_0x4cf385(0x7b)]:{};Object[_0x4cf385(0x82)](_0x136bdb)[_0x4cf385(0xa5)]>0x0?_0x513c39[_0x4cf385(0x7b)]=_0x136bdb:delete _0x513c39['apps'];if(_0x4cf385(0x9c)in _0x23db2a)_0x513c39[_0x4cf385(0x9c)]=_0x23db2a['defaultApp'];else Object[_0x4cf385(0x82)](_0x136bdb)[_0x4cf385(0xa5)]>0x0?_0x513c39[_0x4cf385(0x9c)]=Object['keys'](_0x136bdb)[0x0]:delete _0x513c39[_0x4cf385(0x9c)];return _0x513c39;}function mergeFullInherit(_0x1852e3,_0x208658){const _0x52fc1e=a194_0x863e2,_0xdbebd7=_0x1852e3['apps']&&typeof _0x1852e3['apps']===_0x52fc1e(0xa6)?_0x1852e3[_0x52fc1e(0x7b)]:{},_0x3af840=_0x208658[_0x52fc1e(0x7b)]&&typeof _0x208658[_0x52fc1e(0x7b)]===_0x52fc1e(0xa6)?_0x208658['apps']:{},_0x2f0856={..._0xdbebd7,..._0x3af840},_0x3be3e2={..._0x1852e3,..._0x208658};delete _0x3be3e2[_0x52fc1e(0x7a)];if(Object[_0x52fc1e(0x82)](_0x2f0856)[_0x52fc1e(0xa5)]>0x0)_0x3be3e2[_0x52fc1e(0x7b)]=_0x2f0856;if(_0x52fc1e(0x9c)in _0x208658)_0x3be3e2[_0x52fc1e(0x9c)]=_0x208658[_0x52fc1e(0x9c)];else{if(Object['keys'](_0x3af840)[_0x52fc1e(0xa5)]>0x0)_0x3be3e2['defaultApp']=Object[_0x52fc1e(0x82)](_0x3af840)[0x0];else{if(_0x1852e3[_0x52fc1e(0x9c)])_0x3be3e2['defaultApp']=_0x1852e3[_0x52fc1e(0x9c)];else{const _0x15d48e=Object[_0x52fc1e(0x82)](_0xdbebd7);if(_0x15d48e['length']>0x0)_0x3be3e2['defaultApp']=_0x15d48e[0x0];}}}return _0x3be3e2;}export function readRawConfigWithLayers(_0x31fe1e){const _0x5b7b23=loadRawConfigLayers(_0x31fe1e);return{'config':mergeRawConfigLayers(_0x5b7b23),'layers':_0x5b7b23};}export function readRawConfig(_0x20519e){return mergeRawConfigLayers(loadRawConfigLayers(_0x20519e));}export function readConfigFile(_0x45fe8d){return parseAndNormalizeConfig(_0x45fe8d,'silent');}export function writeConfigFile(_0x402df2,_0x520813){const _0x31ee73=a194_0x863e2,_0x4752a1=dirname(_0x402df2);!existsSync(_0x4752a1)&&mkdirSync(_0x4752a1,{'recursive':!![]});const _0xb8bc55=_0x402df2+_0x31ee73(0xa7);try{writeFileSync(_0xb8bc55,JSON[_0x31ee73(0x9e)](_0x520813,null,0x2)+'\x0a',{'encoding':_0x31ee73(0x92),'mode':0x180}),renameSync(_0xb8bc55,_0x402df2);}catch(_0x571556){try{unlinkSync(_0xb8bc55);}catch{}throw _0x571556;}}export function resolveWriteConfigPath(_0x5b3ddd){const _0x22dcfa=a194_0x863e2,_0x212f3a=_0x5b3ddd===_0x22dcfa(0x8b)?process[_0x22dcfa(0x87)]():homedir(),_0x3c059d=resolveConfigPath(_0x212f3a);return _0x3c059d??resolve(_0x212f3a,NEW_CONFIG_NAME);}
1
+ const a195_0x414066=a195_0x386b;(function(_0x1a6ea9,_0x4d237f){const _0xae1d8d=a195_0x386b,_0x3711b1=_0x1a6ea9();while(!![]){try{const _0x4e2296=-parseInt(_0xae1d8d(0x195))/0x1+parseInt(_0xae1d8d(0x1bd))/0x2*(parseInt(_0xae1d8d(0x1c2))/0x3)+parseInt(_0xae1d8d(0x1ae))/0x4+parseInt(_0xae1d8d(0x191))/0x5*(-parseInt(_0xae1d8d(0x19b))/0x6)+-parseInt(_0xae1d8d(0x1b4))/0x7*(-parseInt(_0xae1d8d(0x19f))/0x8)+-parseInt(_0xae1d8d(0x1b1))/0x9+parseInt(_0xae1d8d(0x1a2))/0xa;if(_0x4e2296===_0x4d237f)break;else _0x3711b1['push'](_0x3711b1['shift']());}catch(_0x57a599){_0x3711b1['push'](_0x3711b1['shift']());}}}(a195_0x2a28,0x19947));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{dirname,parse,resolve}from'node:path';import{homedir}from'node:os';import{CLI_BIN_NAME}from'../constant/cli.js';export const NEW_CONFIG_NAME=a195_0x414066(0x192);export const CONFIG_NAMES=[a195_0x414066(0x192),'.lovrabet.json',a195_0x414066(0x1ac)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a195_0x414066(0x1af)](_0x31fad0=>_0x31fad0!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();export function resolveConfigPath(_0x4f747b){for(const _0x11038b of CONFIG_NAMES){const _0x3c2b2b=resolve(_0x4f747b,_0x11038b);if(existsSync(_0x3c2b2b))return _0x3c2b2b;}return undefined;}export function findProjectRootDirectory(_0x3d00c8=process['cwd']()){let _0x3def66=resolve(_0x3d00c8);const {root:_0x65a692}=parse(_0x3def66),_0x9b83ac=homedir();while(!![]){if(resolveConfigPath(_0x3def66)){if(_0x3def66===_0x9b83ac)break;return _0x3def66;}if(_0x3def66===_0x65a692||_0x3def66===_0x9b83ac)break;const _0x3f7682=dirname(_0x3def66);if(_0x3f7682===_0x3def66)break;_0x3def66=_0x3f7682;}return resolve(_0x3d00c8);}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x39d0cf){const _0x3cf54d=a195_0x414066;if(!existsSync(_0x39d0cf))return{'status':_0x3cf54d(0x1a1)};try{const _0x56c803=readFileSync(_0x39d0cf,{'encoding':'utf8'});if(!_0x56c803?.[_0x3cf54d(0x1b6)]())return{'status':'empty'};const _0x3d38cb=JSON[_0x3cf54d(0x1a0)](_0x56c803);return{'status':'ok','data':_0x3d38cb};}catch(_0x1f2327){return{'status':_0x3cf54d(0x1bf),'message':_0x1f2327 instanceof Error?_0x1f2327[_0x3cf54d(0x1a8)]:String(_0x1f2327)};}}function parseCliConfigJsonFile(_0x4a9f38,_0x1a4849,_0x3420af){const _0x26fd58=a195_0x414066,_0x3a87ff=inspectCliConfigJsonFile(_0x4a9f38);if(_0x3a87ff[_0x26fd58(0x1a9)]==='missing'||_0x3a87ff['status']===_0x26fd58(0x19d))return{};if(_0x3a87ff[_0x26fd58(0x1a9)]==='ok')return _0x3a87ff[_0x26fd58(0x1b8)];return _0x1a4849===_0x26fd58(0x1be)&&_0x3420af&&console['error'](CLI_BIN_NAME+':\x20'+_0x3420af+'\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20'+_0x4a9f38+_0x26fd58(0x1c1)+_0x3a87ff[_0x26fd58(0x1a8)]),{};}function normalizeLegacyConfigShape(_0x2f418){const _0x414698=a195_0x414066;if(!_0x2f418||typeof _0x2f418!==_0x414698(0x1ab))return{'config':{},'migrated':![]};const _0x550fac={..._0x2f418},_0x4609fd=_0x550fac[_0x414698(0x19a)]&&typeof _0x550fac[_0x414698(0x19a)]===_0x414698(0x1ab)?{..._0x550fac[_0x414698(0x19a)]}:{},_0x1a9292=Object[_0x414698(0x193)](_0x4609fd)[_0x414698(0x1c0)],_0x3c7273=_0x550fac[_0x414698(0x1ad)]||_0x550fac[_0x414698(0x1a4)];let _0xe296f=![];if(_0x3c7273&&_0x1a9292===0x0){const _0x5ddab6=typeof _0x550fac[_0x414698(0x1b0)]===_0x414698(0x1b9)&&_0x550fac['defaultApp']['trim']()?_0x550fac[_0x414698(0x1b0)]:String(_0x3c7273)[_0x414698(0x1b6)]();_0x4609fd[_0x5ddab6]={'appcode':String(_0x3c7273)['trim'](),..._0x550fac[_0x414698(0x1b3)]!=null?{'env':_0x550fac[_0x414698(0x1b3)]}:{},..._0x550fac[_0x414698(0x190)]!=null?{'apiDir':_0x550fac[_0x414698(0x190)]}:{},..._0x550fac[_0x414698(0x194)]!=null?{'cookie':_0x550fac['cookie']}:{},..._0x550fac[_0x414698(0x1a3)]!=null?{'accessKey':_0x550fac['accessKey']}:{},..._0x550fac[_0x414698(0x1a6)]!=null?{'format':_0x550fac['format']}:{},..._0x550fac[_0x414698(0x19c)]!=null?{'pageSize':_0x550fac[_0x414698(0x19c)]}:{},..._0x550fac[_0x414698(0x1a7)]!=null?{'riskLevel':_0x550fac[_0x414698(0x1a7)]}:{},..._0x550fac['locale']!=null?{'locale':_0x550fac[_0x414698(0x1ba)]}:{}},_0x550fac[_0x414698(0x19a)]=_0x4609fd;if(!_0x550fac['defaultApp'])_0x550fac[_0x414698(0x1b0)]=_0x5ddab6;_0xe296f=!![];}return(_0x414698(0x1ad)in _0x550fac||_0x414698(0x1a4)in _0x550fac)&&(delete _0x550fac[_0x414698(0x1ad)],delete _0x550fac[_0x414698(0x1a4)],_0xe296f=!![]),{'config':_0x550fac,'migrated':_0xe296f};}function a195_0x386b(_0x300af0,_0xd9c684){_0x300af0=_0x300af0-0x190;const _0x2a283b=a195_0x2a28();let _0x386b36=_0x2a283b[_0x300af0];return _0x386b36;}function writeNormalizedConfigIfNeeded(_0x4b664a,_0xfd02be){const _0x2ec6e0=a195_0x414066,_0x2a3320=JSON[_0x2ec6e0(0x1bc)](_0xfd02be,null,0x2)+'\x0a';if(normalizedWriteCache[_0x2ec6e0(0x1a5)](_0x4b664a)===_0x2a3320)return;writeConfigFile(_0x4b664a,_0xfd02be),normalizedWriteCache[_0x2ec6e0(0x1b7)](_0x4b664a,_0x2a3320);}function parseAndNormalizeConfig(_0xcf03f0,_0x3b4671,_0x18994f){const _0x4cb566=a195_0x414066,_0x416b18=parseCliConfigJsonFile(_0xcf03f0,_0x3b4671,_0x18994f),_0x7de00d=normalizeLegacyConfigShape(_0x416b18);if(_0x7de00d[_0x4cb566(0x1bb)])try{writeNormalizedConfigIfNeeded(_0xcf03f0,_0x7de00d[_0x4cb566(0x196)]);}catch{}return _0x7de00d['config'];}export function loadRawConfigLayers(_0x175825){const _0x1b1cf2=a195_0x414066;let _0x2571c7={},_0x32a59a={};const _0x5dd87f=resolveConfigPath(homedir());_0x5dd87f&&(_0x2571c7=parseAndNormalizeConfig(_0x5dd87f,_0x1b1cf2(0x1be),_0x1b1cf2(0x1b2)));const _0x254cf6=_0x175825??findProjectRootDirectory(),_0x14d158=resolveConfigPath(_0x254cf6);return _0x14d158&&(_0x32a59a=parseAndNormalizeConfig(_0x14d158,'warn',_0x1b1cf2(0x1aa))),{'globalPath':_0x5dd87f,'projectPath':_0x14d158,'globalConfig':_0x2571c7,'projectConfig':_0x32a59a};}const INHERIT_WHITELIST=['cookie','accessKey',a195_0x414066(0x1ba),a195_0x414066(0x1a6),a195_0x414066(0x1a7),a195_0x414066(0x19c)];export function mergeRawConfigLayers(_0x28ba8d){const _0x2b97e6=a195_0x414066,{globalConfig:_0x4a44ec,projectConfig:_0x5a19e6}=_0x28ba8d,_0x55aa24=Object[_0x2b97e6(0x193)](_0x5a19e6)[_0x2b97e6(0x1c0)]>0x0;if(!_0x55aa24)return mergeGlobalOnly(_0x4a44ec);if(_0x5a19e6[_0x2b97e6(0x1b5)]===!![])return mergeFullInherit(_0x4a44ec,_0x5a19e6);if(_0x5a19e6['inherit']===![])return mergeIsolated(_0x5a19e6);return mergeProjectFirst(_0x4a44ec,_0x5a19e6);}function mergeGlobalOnly(_0x581423){const _0x2cb1eb=a195_0x414066,_0x92c11a={..._0x581423},_0xc07a18=_0x581423[_0x2cb1eb(0x19a)]&&typeof _0x581423[_0x2cb1eb(0x19a)]===_0x2cb1eb(0x1ab)?_0x581423[_0x2cb1eb(0x19a)]:{};if(Object['keys'](_0xc07a18)[_0x2cb1eb(0x1c0)]>0x0)_0x92c11a[_0x2cb1eb(0x19a)]=_0xc07a18;if(_0x581423['defaultApp'])_0x92c11a[_0x2cb1eb(0x1b0)]=_0x581423[_0x2cb1eb(0x1b0)];else{const _0x22600d=Object[_0x2cb1eb(0x193)](_0xc07a18);if(_0x22600d[_0x2cb1eb(0x1c0)]>0x0)_0x92c11a[_0x2cb1eb(0x1b0)]=_0x22600d[0x0];}return _0x92c11a;}function mergeIsolated(_0x484765){const _0x2c766c=a195_0x414066,_0x3e1657={..._0x484765};delete _0x3e1657['inherit'];const _0x2f2c7c=_0x484765[_0x2c766c(0x19a)]&&typeof _0x484765[_0x2c766c(0x19a)]===_0x2c766c(0x1ab)?_0x484765[_0x2c766c(0x19a)]:{};Object[_0x2c766c(0x193)](_0x2f2c7c)[_0x2c766c(0x1c0)]>0x0?_0x3e1657[_0x2c766c(0x19a)]=_0x2f2c7c:delete _0x3e1657[_0x2c766c(0x19a)];if('defaultApp'in _0x484765)_0x3e1657['defaultApp']=_0x484765['defaultApp'];else Object[_0x2c766c(0x193)](_0x2f2c7c)['length']>0x0?_0x3e1657[_0x2c766c(0x1b0)]=Object['keys'](_0x2f2c7c)[0x0]:delete _0x3e1657[_0x2c766c(0x1b0)];return _0x3e1657;}function mergeProjectFirst(_0x4599da,_0x36c6c7){const _0x331d4e=a195_0x414066,_0x24bc44={..._0x36c6c7};delete _0x24bc44[_0x331d4e(0x1b5)];for(const _0x9bd8e7 of INHERIT_WHITELIST){!(_0x9bd8e7 in _0x24bc44)&&_0x9bd8e7 in _0x4599da&&(_0x24bc44[_0x9bd8e7]=_0x4599da[_0x9bd8e7]);}const _0x277350=_0x36c6c7[_0x331d4e(0x19a)]&&typeof _0x36c6c7['apps']===_0x331d4e(0x1ab)?_0x36c6c7[_0x331d4e(0x19a)]:{};Object[_0x331d4e(0x193)](_0x277350)[_0x331d4e(0x1c0)]>0x0?_0x24bc44[_0x331d4e(0x19a)]=_0x277350:delete _0x24bc44[_0x331d4e(0x19a)];if(_0x331d4e(0x1b0)in _0x36c6c7)_0x24bc44['defaultApp']=_0x36c6c7[_0x331d4e(0x1b0)];else Object[_0x331d4e(0x193)](_0x277350)['length']>0x0?_0x24bc44[_0x331d4e(0x1b0)]=Object[_0x331d4e(0x193)](_0x277350)[0x0]:delete _0x24bc44[_0x331d4e(0x1b0)];return _0x24bc44;}function mergeFullInherit(_0x295607,_0x146ecd){const _0x133cb9=a195_0x414066,_0x38507a=_0x295607['apps']&&typeof _0x295607[_0x133cb9(0x19a)]===_0x133cb9(0x1ab)?_0x295607['apps']:{},_0x2a58d5=_0x146ecd[_0x133cb9(0x19a)]&&typeof _0x146ecd[_0x133cb9(0x19a)]===_0x133cb9(0x1ab)?_0x146ecd['apps']:{},_0x1c95cc={..._0x38507a,..._0x2a58d5},_0x3b483b={..._0x295607,..._0x146ecd};delete _0x3b483b[_0x133cb9(0x1b5)];if(Object[_0x133cb9(0x193)](_0x1c95cc)[_0x133cb9(0x1c0)]>0x0)_0x3b483b[_0x133cb9(0x19a)]=_0x1c95cc;if(_0x133cb9(0x1b0)in _0x146ecd)_0x3b483b[_0x133cb9(0x1b0)]=_0x146ecd['defaultApp'];else{if(Object[_0x133cb9(0x193)](_0x2a58d5)[_0x133cb9(0x1c0)]>0x0)_0x3b483b[_0x133cb9(0x1b0)]=Object[_0x133cb9(0x193)](_0x2a58d5)[0x0];else{if(_0x295607[_0x133cb9(0x1b0)])_0x3b483b[_0x133cb9(0x1b0)]=_0x295607[_0x133cb9(0x1b0)];else{const _0x12b4d6=Object[_0x133cb9(0x193)](_0x38507a);if(_0x12b4d6[_0x133cb9(0x1c0)]>0x0)_0x3b483b['defaultApp']=_0x12b4d6[0x0];}}}return _0x3b483b;}export function readRawConfigWithLayers(_0x2de5a1){const _0x24130d=loadRawConfigLayers(_0x2de5a1);return{'config':mergeRawConfigLayers(_0x24130d),'layers':_0x24130d};}export function readRawConfig(_0x1189c1){return mergeRawConfigLayers(loadRawConfigLayers(_0x1189c1));}function a195_0x2a28(){const _0x40ccd1=['data','string','locale','migrated','stringify','4nBQlTE','warn','error','length','\x0a\x20\x20','35079qBwwZS','apiDir','5tFmAQx','.rabetbase.json','keys','cookie','19996tfkzxQ','config','cwd','utf8','.tmp','apps','503364ZwHSzF','pageSize','empty','project','20504MVDFQt','parse','missing','365040MEWIdY','accessKey','app','get','format','riskLevel','message','status','Project','object','.lovrabetrc','appcode','543048PoXomS','filter','defaultApp','644094DNhBSw','Global','env','231LbBnyy','inherit','trim','set'];a195_0x2a28=function(){return _0x40ccd1;};return a195_0x2a28();}export function readConfigFile(_0x216b15){return parseAndNormalizeConfig(_0x216b15,'silent');}export function writeConfigFile(_0x3720b4,_0x3ee3a6){const _0x175524=a195_0x414066,_0x5d5799=dirname(_0x3720b4);!existsSync(_0x5d5799)&&mkdirSync(_0x5d5799,{'recursive':!![]});const _0x44dee4=_0x3720b4+_0x175524(0x199);try{writeFileSync(_0x44dee4,JSON['stringify'](_0x3ee3a6,null,0x2)+'\x0a',{'encoding':_0x175524(0x198),'mode':0x180}),renameSync(_0x44dee4,_0x3720b4);}catch(_0x8c50f2){try{unlinkSync(_0x44dee4);}catch{}throw _0x8c50f2;}}export function resolveWriteConfigPath(_0x2774bc){const _0x38f16f=a195_0x414066,_0x297d67=_0x2774bc===_0x38f16f(0x19e)?process[_0x38f16f(0x197)]():homedir(),_0x2afb90=resolveConfigPath(_0x297d67);return _0x2afb90??resolve(_0x297d67,NEW_CONFIG_NAME);}
package/lib/context.js CHANGED
@@ -1 +1 @@
1
- const a195_0x311b41=a195_0x276b;(function(_0x5bea64,_0x46aa85){const _0x1e2bd2=a195_0x276b,_0x5e57d1=_0x5bea64();while(!![]){try{const _0x20c990=-parseInt(_0x1e2bd2(0x15b))/0x1*(-parseInt(_0x1e2bd2(0x15e))/0x2)+-parseInt(_0x1e2bd2(0x152))/0x3*(-parseInt(_0x1e2bd2(0x159))/0x4)+-parseInt(_0x1e2bd2(0x161))/0x5*(-parseInt(_0x1e2bd2(0x158))/0x6)+parseInt(_0x1e2bd2(0x165))/0x7*(-parseInt(_0x1e2bd2(0x16b))/0x8)+parseInt(_0x1e2bd2(0x168))/0x9*(parseInt(_0x1e2bd2(0x15d))/0xa)+parseInt(_0x1e2bd2(0x15a))/0xb+parseInt(_0x1e2bd2(0x14f))/0xc*(-parseInt(_0x1e2bd2(0x147))/0xd);if(_0x20c990===_0x46aa85)break;else _0x5e57d1['push'](_0x5e57d1['shift']());}catch(_0x38da2a){_0x5e57d1['push'](_0x5e57d1['shift']());}}}(a195_0x1f00,0xe5e1b));function a195_0x276b(_0x463960,_0x7cd022){_0x463960=_0x463960-0x144;const _0x1f007d=a195_0x1f00();let _0x276b24=_0x1f007d[_0x463960];return _0x276b24;}import{resolve}from'node:path';import{CLI_BIN_NAME}from'./constant/cli.js';import{buildAuth}from'./context/auth-resolver.js';import{resolveAppConfig}from'./context/app-resolver.js';import{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';import{logger}from'./utils/logger.js';export{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x5018a5){return process.env[`RABETBASE_${_0x5018a5}`]||process.env[`LOVRABET_${_0x5018a5}`]||undefined;}export async function createContext(_0x363ff4){const _0x571d2e=a195_0x276b,{config:_0x3c7d20,layers:_0x5f31c2}=readRawConfigWithLayers(),_0x225868=buildConfig(_0x3c7d20,_0x363ff4,_0x5f31c2),{initEnv:_0x16c3b2}=await import(_0x571d2e(0x16f));if(_0x225868[_0x571d2e(0x14b)])_0x16c3b2(_0x225868[_0x571d2e(0x14b)]);else _0x363ff4[_0x571d2e(0x14b)]&&typeof _0x363ff4[_0x571d2e(0x14b)]==='string'&&_0x16c3b2(_0x363ff4[_0x571d2e(0x14b)]);const {initDomains:_0x5f0c8a,getUserDomain:_0x210776,getApiDomain:_0x49d2fd}=await import(_0x571d2e(0x14a));_0x5f0c8a({'apiDomain':_0x3c7d20[_0x571d2e(0x153)]||undefined,'userDomain':_0x3c7d20[_0x571d2e(0x146)]||undefined,'runtimeDomain':_0x3c7d20[_0x571d2e(0x163)]||undefined});const _0x341b04={'apiDomain':_0x49d2fd(),'userDomain':_0x210776()},_0xd12030=await buildAuth(_0x225868);logger['setLogPath'](process[_0x571d2e(0x169)]());const _0x4d4483=(CLI_BIN_NAME+'\x20'+process[_0x571d2e(0x166)]['slice'](0x2)[_0x571d2e(0x148)]('\x20'))[_0x571d2e(0x157)]();logger[_0x571d2e(0x167)](_0x4d4483);const {isNonInteractive:_0x557cac}=await import(_0x571d2e(0x150)),_0x17a60d=_0x557cac(_0x363ff4);return{'config':_0x225868,'auth':_0xd12030,'logger':logger,'env':_0x341b04,'nonInteractive':_0x17a60d};}export function buildConfigFromFlags(_0x3725b7){const {config:_0xa6ad4c,layers:_0xcd27da}=readRawConfigWithLayers();return buildConfig(_0xa6ad4c,_0x3725b7,_0xcd27da);}export function getConfigAppCode(_0x2d6ecb){const _0x5cc14e=a195_0x276b,_0x448f5b=readRawConfig(_0x2d6ecb);if(_0x448f5b[_0x5cc14e(0x156)]&&typeof _0x448f5b[_0x5cc14e(0x156)]==='object'){const _0x585d88=_0x448f5b['defaultApp'];if(_0x585d88&&_0x448f5b[_0x5cc14e(0x156)][_0x585d88]?.[_0x5cc14e(0x144)])return String(_0x448f5b[_0x5cc14e(0x156)][_0x585d88]['appcode'])['trim']();const _0x56f0d2=Object['values'](_0x448f5b[_0x5cc14e(0x156)])[0x0];if(_0x56f0d2?.['appcode'])return String(_0x56f0d2[_0x5cc14e(0x144)])[_0x5cc14e(0x157)]();}const _0x5820a9=_0x448f5b[_0x5cc14e(0x144)]||_0x448f5b[_0x5cc14e(0x16a)];if(typeof _0x5820a9!=='string'||_0x5820a9['trim']()==='')return undefined;return _0x5820a9[_0x5cc14e(0x157)]();}export function getMultiAppConfigs(_0x35c0d1=a195_0x311b41(0x14d),_0x375c20){const _0x3d200f=a195_0x311b41,_0x49c3a8=loadRawConfigLayers(_0x375c20);let _0x27a291,_0x222ae6;if(_0x35c0d1===_0x3d200f(0x16c)){const _0x213089=_0x49c3a8['globalConfig'][_0x3d200f(0x156)]&&typeof _0x49c3a8['globalConfig']['apps']===_0x3d200f(0x16d)?_0x49c3a8[_0x3d200f(0x160)][_0x3d200f(0x156)]:{},_0x4afe01=_0x49c3a8['projectConfig'][_0x3d200f(0x156)]&&typeof _0x49c3a8['projectConfig'][_0x3d200f(0x156)]===_0x3d200f(0x16d)?_0x49c3a8['projectConfig'][_0x3d200f(0x156)]:{};_0x27a291={..._0x213089,..._0x4afe01};const _0x3b221d=readRawConfig(_0x375c20);_0x222ae6=_0x3b221d[_0x3d200f(0x14c)];}else _0x27a291=_0x49c3a8[_0x3d200f(0x149)][_0x3d200f(0x156)],_0x222ae6=_0x49c3a8[_0x3d200f(0x149)]['defaultApp'];if(!_0x27a291||typeof _0x27a291!==_0x3d200f(0x16d)||Object[_0x3d200f(0x151)](_0x27a291)[_0x3d200f(0x162)]===0x0)return null;return Object[_0x3d200f(0x164)](_0x27a291)[_0x3d200f(0x154)](([_0x4abcdb,_0x17014b])=>({'name':_0x4abcdb,'appcode':_0x17014b?.[_0x3d200f(0x144)]||'','isDefault':_0x4abcdb===_0x222ae6,'env':_0x17014b?.[_0x3d200f(0x14b)],'apiDir':_0x17014b?.[_0x3d200f(0x155)],'cookie':_0x17014b?.['cookie']||undefined}))[_0x3d200f(0x15c)](_0x494349=>_0x494349[_0x3d200f(0x144)]);}function a195_0x1f00(){const _0x30130a=['20gFkmON','https://g.lovrabet.com/dist/lovrabet-skill','globalConfig','18035EuKLju','length','runtimeDomain','entries','44198duhFSs','argv','setRawCommand','2103471jXRgEF','cwd','app','1160IlhxAs','merged','object','template_base_url','./constant/env.js','appcode','string','userDomain','26PUbrkl','join','projectConfig','./constant/domain.js','env','defaultApp','project','find','33196980lvZzYC','./utils/is-non-interactive.js','keys','85539CyWvDU','apiDomain','map','apiDir','apps','trim','1008svIkem','224SWXuBP','19188048pZKpWG','180685tdyYZq','filter','70wAWMHY'];a195_0x1f00=function(){return _0x30130a;};return a195_0x1f00();}export function getTemplateBaseUrl(_0x257a71){const _0x5b6f6a=a195_0x311b41,_0x4d9835=readRawConfig(_0x257a71);if(_0x4d9835['template_base_url']&&typeof _0x4d9835[_0x5b6f6a(0x16e)]===_0x5b6f6a(0x145))return _0x4d9835[_0x5b6f6a(0x16e)]['replace'](/\/$/,'');return _0x5b6f6a(0x15f);}function buildConfig(_0x3bd4db,_0x2869ee,_0x4c9563){return{...resolveAppConfig({'raw':_0x3bd4db,'flags':_0x2869ee,'layers':_0x4c9563,'readEnv':env}),'raw':_0x3bd4db};}export function resolveApiFilePath(_0x7304c7,_0x3f5161){const _0x527066=a195_0x311b41,_0xb2a46a=resolve(process[_0x527066(0x169)](),_0x7304c7),_0x155c74=resolve(_0xb2a46a,'api.ts');if(!_0x3f5161)return _0x155c74;const _0x5d9a0f=readRawConfig(),_0x4a36d8=_0x5d9a0f[_0x527066(0x156)]&&typeof _0x5d9a0f[_0x527066(0x156)]==='object'?_0x5d9a0f['apps']:{},_0x359ecf=Object[_0x527066(0x164)](_0x4a36d8)[_0x527066(0x14e)](([,_0x3fb123])=>_0x3fb123?.[_0x527066(0x144)]===_0x3f5161);if(!_0x359ecf)return _0x155c74;const [_0x4b5238,_0xecd217]=_0x359ecf,_0x5b5a38=typeof _0x5d9a0f[_0x527066(0x14c)]===_0x527066(0x145)?_0x5d9a0f[_0x527066(0x14c)]:undefined;if(_0xecd217?.[_0x527066(0x155)])return _0x155c74;if(_0x5b5a38&&_0x4b5238!==_0x5b5a38)return resolve(_0xb2a46a,_0x4b5238+'-api.ts');return _0x155c74;}
1
+ function a196_0x5941(){const _0x4623ee=['cookie','2784172svRyYd','cwd','3496036pBkmvw','https://g.lovrabet.com/dist/lovrabet-skill','projectConfig','5126270azIYwc','apiDir','join','1317363OystdM','defaultApp','project','appcode','18968VGjrEX','3148878LuHOcG','4542405gbeyRr','apiDomain','runtimeDomain','slice','replace','keys','./constant/domain.js','./utils/is-non-interactive.js','env','8267UKDegk','template_base_url','trim','values','string','userDomain','map','globalConfig','setLogPath','apps','object','-api.ts','app'];a196_0x5941=function(){return _0x4623ee;};return a196_0x5941();}const a196_0x3b7e82=a196_0x1580;function a196_0x1580(_0x66c447,_0xc58b5d){_0x66c447=_0x66c447-0x1d6;const _0x59415c=a196_0x5941();let _0x158029=_0x59415c[_0x66c447];return _0x158029;}(function(_0x11fe49,_0x141bb9){const _0xf51cfb=a196_0x1580,_0x4c3c25=_0x11fe49();while(!![]){try{const _0x516c45=-parseInt(_0xf51cfb(0x1d8))/0x1+parseInt(_0xf51cfb(0x1f5))/0x2+-parseInt(_0xf51cfb(0x1de))/0x3+-parseInt(_0xf51cfb(0x1f7))/0x4+parseInt(_0xf51cfb(0x1fa))/0x5+-parseInt(_0xf51cfb(0x1dd))/0x6+-parseInt(_0xf51cfb(0x1e7))/0x7*(-parseInt(_0xf51cfb(0x1dc))/0x8);if(_0x516c45===_0x141bb9)break;else _0x4c3c25['push'](_0x4c3c25['shift']());}catch(_0x5297e6){_0x4c3c25['push'](_0x4c3c25['shift']());}}}(a196_0x5941,0xf1023));import{resolve}from'node:path';import{CLI_BIN_NAME}from'./constant/cli.js';import{buildAuth}from'./context/auth-resolver.js';import{resolveAppConfig}from'./context/app-resolver.js';import{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';import{logger}from'./utils/logger.js';export{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x2823d5){return process.env[`RABETBASE_${_0x2823d5}`]||process.env[`LOVRABET_${_0x2823d5}`]||undefined;}export async function createContext(_0x3f00d7){const _0x2f164f=a196_0x1580,{config:_0x185ab3,layers:_0x35ab7d}=readRawConfigWithLayers(),_0x28dda8=buildConfig(_0x185ab3,_0x3f00d7,_0x35ab7d),{initEnv:_0x2a3c53}=await import('./constant/env.js');if(_0x28dda8[_0x2f164f(0x1e6)])_0x2a3c53(_0x28dda8[_0x2f164f(0x1e6)]);else _0x3f00d7[_0x2f164f(0x1e6)]&&typeof _0x3f00d7[_0x2f164f(0x1e6)]===_0x2f164f(0x1eb)&&_0x2a3c53(_0x3f00d7['env']);const {initDomains:_0x4b4778,getUserDomain:_0x111bd8,getApiDomain:_0x3e4afb}=await import(_0x2f164f(0x1e4));_0x4b4778({'apiDomain':_0x185ab3[_0x2f164f(0x1df)]||undefined,'userDomain':_0x185ab3[_0x2f164f(0x1ec)]||undefined,'runtimeDomain':_0x185ab3[_0x2f164f(0x1e0)]||undefined});const _0x41b111={'apiDomain':_0x3e4afb(),'userDomain':_0x111bd8()},_0x24d191=await buildAuth(_0x28dda8);logger[_0x2f164f(0x1ef)](process['cwd']());const _0x1af463=(CLI_BIN_NAME+'\x20'+process['argv'][_0x2f164f(0x1e1)](0x2)[_0x2f164f(0x1d7)]('\x20'))[_0x2f164f(0x1e9)]();logger['setRawCommand'](_0x1af463);const {isNonInteractive:_0x353a65}=await import(_0x2f164f(0x1e5)),_0x3b66f0=_0x353a65(_0x3f00d7);return{'config':_0x28dda8,'auth':_0x24d191,'logger':logger,'env':_0x41b111,'nonInteractive':_0x3b66f0};}export function buildConfigFromFlags(_0x7205f3){const {config:_0x1f06e4,layers:_0x26ac57}=readRawConfigWithLayers();return buildConfig(_0x1f06e4,_0x7205f3,_0x26ac57);}export function getConfigAppCode(_0x7b1a2c){const _0x44ddaf=a196_0x1580,_0x53dced=readRawConfig(_0x7b1a2c);if(_0x53dced[_0x44ddaf(0x1f0)]&&typeof _0x53dced[_0x44ddaf(0x1f0)]===_0x44ddaf(0x1f1)){const _0x399427=_0x53dced[_0x44ddaf(0x1d9)];if(_0x399427&&_0x53dced['apps'][_0x399427]?.['appcode'])return String(_0x53dced[_0x44ddaf(0x1f0)][_0x399427][_0x44ddaf(0x1db)])[_0x44ddaf(0x1e9)]();const _0x41d9cf=Object[_0x44ddaf(0x1ea)](_0x53dced[_0x44ddaf(0x1f0)])[0x0];if(_0x41d9cf?.[_0x44ddaf(0x1db)])return String(_0x41d9cf['appcode'])['trim']();}const _0xa8c76f=_0x53dced[_0x44ddaf(0x1db)]||_0x53dced[_0x44ddaf(0x1f3)];if(typeof _0xa8c76f!==_0x44ddaf(0x1eb)||_0xa8c76f['trim']()==='')return undefined;return _0xa8c76f[_0x44ddaf(0x1e9)]();}export function getMultiAppConfigs(_0x30012c=a196_0x3b7e82(0x1da),_0x33c67e){const _0x59274e=a196_0x3b7e82,_0x43202f=loadRawConfigLayers(_0x33c67e);let _0x3b42cb,_0x3df210;if(_0x30012c==='merged'){const _0x339e0a=_0x43202f[_0x59274e(0x1ee)][_0x59274e(0x1f0)]&&typeof _0x43202f[_0x59274e(0x1ee)][_0x59274e(0x1f0)]==='object'?_0x43202f[_0x59274e(0x1ee)][_0x59274e(0x1f0)]:{},_0xa926fe=_0x43202f[_0x59274e(0x1f9)]['apps']&&typeof _0x43202f['projectConfig']['apps']===_0x59274e(0x1f1)?_0x43202f[_0x59274e(0x1f9)][_0x59274e(0x1f0)]:{};_0x3b42cb={..._0x339e0a,..._0xa926fe};const _0xa147c1=readRawConfig(_0x33c67e);_0x3df210=_0xa147c1[_0x59274e(0x1d9)];}else _0x3b42cb=_0x43202f['projectConfig'][_0x59274e(0x1f0)],_0x3df210=_0x43202f[_0x59274e(0x1f9)][_0x59274e(0x1d9)];if(!_0x3b42cb||typeof _0x3b42cb!==_0x59274e(0x1f1)||Object[_0x59274e(0x1e3)](_0x3b42cb)['length']===0x0)return null;return Object['entries'](_0x3b42cb)[_0x59274e(0x1ed)](([_0x3886e9,_0x38f97f])=>({'name':_0x3886e9,'appcode':_0x38f97f?.[_0x59274e(0x1db)]||'','isDefault':_0x3886e9===_0x3df210,'env':_0x38f97f?.[_0x59274e(0x1e6)],'apiDir':_0x38f97f?.[_0x59274e(0x1d6)],'cookie':_0x38f97f?.[_0x59274e(0x1f4)]||undefined}))['filter'](_0x2b06f6=>_0x2b06f6['appcode']);}export function getTemplateBaseUrl(_0x59a91a){const _0x709a26=a196_0x3b7e82,_0x63de2f=readRawConfig(_0x59a91a);if(_0x63de2f[_0x709a26(0x1e8)]&&typeof _0x63de2f['template_base_url']==='string')return _0x63de2f[_0x709a26(0x1e8)][_0x709a26(0x1e2)](/\/$/,'');return _0x709a26(0x1f8);}function buildConfig(_0x25557e,_0x9becda,_0x1c92a2){return{...resolveAppConfig({'raw':_0x25557e,'flags':_0x9becda,'layers':_0x1c92a2,'readEnv':env}),'raw':_0x25557e};}export function resolveApiFilePath(_0x3bc12e,_0x3a9a22){const _0x5b8717=a196_0x3b7e82,_0x39433b=resolve(process[_0x5b8717(0x1f6)](),_0x3bc12e),_0x315a0f=resolve(_0x39433b,'api.ts');if(!_0x3a9a22)return _0x315a0f;const _0x361f81=readRawConfig(),_0x481dd3=_0x361f81[_0x5b8717(0x1f0)]&&typeof _0x361f81[_0x5b8717(0x1f0)]===_0x5b8717(0x1f1)?_0x361f81[_0x5b8717(0x1f0)]:{},_0x2cdae7=Object['entries'](_0x481dd3)['find'](([,_0x4cfaae])=>_0x4cfaae?.[_0x5b8717(0x1db)]===_0x3a9a22);if(!_0x2cdae7)return _0x315a0f;const [_0xb23f17,_0x1b8d93]=_0x2cdae7,_0xba6cf1=typeof _0x361f81[_0x5b8717(0x1d9)]==='string'?_0x361f81[_0x5b8717(0x1d9)]:undefined;if(_0x1b8d93?.[_0x5b8717(0x1d6)])return _0x315a0f;if(_0xba6cf1&&_0xb23f17!==_0xba6cf1)return resolve(_0x39433b,_0xb23f17+_0x5b8717(0x1f2));return _0x315a0f;}
@@ -1 +1 @@
1
- (function(_0x3bda44,_0x23bfd6){const _0x199844=a196_0x41e5,_0x5464f2=_0x3bda44();while(!![]){try{const _0x4d074e=-parseInt(_0x199844(0xb9))/0x1*(-parseInt(_0x199844(0xa9))/0x2)+-parseInt(_0x199844(0xae))/0x3*(parseInt(_0x199844(0xa8))/0x4)+-parseInt(_0x199844(0xac))/0x5*(-parseInt(_0x199844(0xaf))/0x6)+-parseInt(_0x199844(0xb6))/0x7+-parseInt(_0x199844(0xb7))/0x8*(-parseInt(_0x199844(0xa7))/0x9)+-parseInt(_0x199844(0xb3))/0xa*(parseInt(_0x199844(0xa6))/0xb)+-parseInt(_0x199844(0xb0))/0xc*(-parseInt(_0x199844(0xb8))/0xd);if(_0x4d074e===_0x23bfd6)break;else _0x5464f2['push'](_0x5464f2['shift']());}catch(_0xcde760){_0x5464f2['push'](_0x5464f2['shift']());}}}(a196_0x1e52,0x93412));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';function a196_0x41e5(_0x56f670,_0x3d9344){_0x56f670=_0x56f670-0xa6;const _0x1e5284=a196_0x1e52();let _0x41e537=_0x1e5284[_0x56f670];return _0x41e537;}const cache=new Map();function parseApiFile(_0x50a8df){const _0x12ec0e=[],_0x2a202e=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x2d58e4;while((_0x2d58e4=_0x2a202e['exec'](_0x50a8df))!==null){_0x12ec0e['push']({'datasetCode':_0x2d58e4[0x1],'tableName':_0x2d58e4[0x2],'name':_0x2d58e4[0x3],'alias':_0x2d58e4[0x4]});}return _0x12ec0e;}function a196_0x1e52(){const _0x7d11ba=['cwd','768445YRQGfv','alias','76611ciDYlU','18sQmlZs','18114420nGfbrD','datasetCode','get','10qhOsHf','api.ts','find','2957059LmXnil','24EXsGyV','13yKVBQE','11HYlFLt','10614703SSVmlC','189153EaaadN','60ZqypmV','61812UKeICH','set'];a196_0x1e52=function(){return _0x7d11ba;};return a196_0x1e52();}export function loadAliasMap(_0x599e5b,_0x42a2e3,_0x75f848){const _0x20cbc2=a196_0x41e5,_0x259f4d=_0x75f848??resolve(process[_0x20cbc2(0xab)](),_0x599e5b,_0x20cbc2(0xb4));if(cache['has'](_0x259f4d))return cache[_0x20cbc2(0xb2)](_0x259f4d);if(!existsSync(_0x259f4d))return cache[_0x20cbc2(0xaa)](_0x259f4d,[]),[];try{const _0x5d9c4d=readFileSync(_0x259f4d,'utf-8'),_0x1c26c9=parseApiFile(_0x5d9c4d);return cache[_0x20cbc2(0xaa)](_0x259f4d,_0x1c26c9),_0x1c26c9;}catch{return cache['set'](_0x259f4d,[]),[];}}export function resolveAlias(_0x38ba53,_0x5b8813,_0x4be7f3,_0x5e089c){const _0x3f96f9=a196_0x41e5;if(!_0x5b8813)return undefined;const _0x9988e7=loadAliasMap(_0x38ba53,_0x4be7f3,_0x5e089c),_0x2329a4=_0x9988e7[_0x3f96f9(0xb5)](_0x69d3f1=>_0x69d3f1[_0x3f96f9(0xad)]===_0x5b8813);return _0x2329a4?.[_0x3f96f9(0xb1)];}export function listAliases(_0x21876b,_0x81759e,_0x327081){return loadAliasMap(_0x21876b,_0x81759e,_0x327081);}
1
+ (function(_0x5d9293,_0x3f3e0b){const _0x10c521=a197_0x5104,_0xcbd68f=_0x5d9293();while(!![]){try{const _0x17e33f=-parseInt(_0x10c521(0x1b1))/0x1+-parseInt(_0x10c521(0x1b4))/0x2*(-parseInt(_0x10c521(0x1af))/0x3)+parseInt(_0x10c521(0x1b5))/0x4+-parseInt(_0x10c521(0x1b8))/0x5+parseInt(_0x10c521(0x1ad))/0x6*(parseInt(_0x10c521(0x1b9))/0x7)+parseInt(_0x10c521(0x1ba))/0x8*(parseInt(_0x10c521(0x1b2))/0x9)+-parseInt(_0x10c521(0x1bb))/0xa;if(_0x17e33f===_0x3f3e0b)break;else _0xcbd68f['push'](_0xcbd68f['shift']());}catch(_0x3ea4e8){_0xcbd68f['push'](_0xcbd68f['shift']());}}}(a197_0x5746,0x7e319));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';function a197_0x5746(){const _0x53ef2e=['has','alias','api.ts','datasetCode','utf-8','16584SfNkqq','cwd','1023caHtib','exec','405156tAVIPr','117FtXEdy','push','34WsLSGf','3681416vbgQdF','find','set','2743410jNCKEK','1470EQVUbB','535336hGQgST','9057850zNTIoU'];a197_0x5746=function(){return _0x53ef2e;};return a197_0x5746();}const cache=new Map();function parseApiFile(_0x2b1202){const _0x21e980=a197_0x5104,_0x4b4ce6=[],_0x5966e2=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x5e39a0;while((_0x5e39a0=_0x5966e2[_0x21e980(0x1b0)](_0x2b1202))!==null){_0x4b4ce6[_0x21e980(0x1b3)]({'datasetCode':_0x5e39a0[0x1],'tableName':_0x5e39a0[0x2],'name':_0x5e39a0[0x3],'alias':_0x5e39a0[0x4]});}return _0x4b4ce6;}export function loadAliasMap(_0x22c0c3,_0x46d582,_0xde90f0){const _0x75ef2e=a197_0x5104,_0x338de9=_0xde90f0??resolve(process[_0x75ef2e(0x1ae)](),_0x22c0c3,_0x75ef2e(0x1be));if(cache[_0x75ef2e(0x1bc)](_0x338de9))return cache['get'](_0x338de9);if(!existsSync(_0x338de9))return cache[_0x75ef2e(0x1b7)](_0x338de9,[]),[];try{const _0x3caf98=readFileSync(_0x338de9,_0x75ef2e(0x1c0)),_0x169b1c=parseApiFile(_0x3caf98);return cache[_0x75ef2e(0x1b7)](_0x338de9,_0x169b1c),_0x169b1c;}catch{return cache[_0x75ef2e(0x1b7)](_0x338de9,[]),[];}}export function resolveAlias(_0x131e0c,_0x2ac02c,_0x1a840e,_0x2fed6f){const _0x43a840=a197_0x5104;if(!_0x2ac02c)return undefined;const _0x432c44=loadAliasMap(_0x131e0c,_0x1a840e,_0x2fed6f),_0x1c2ae4=_0x432c44[_0x43a840(0x1b6)](_0x341988=>_0x341988[_0x43a840(0x1bd)]===_0x2ac02c);return _0x1c2ae4?.[_0x43a840(0x1bf)];}function a197_0x5104(_0x2710ee,_0x2d6655){_0x2710ee=_0x2710ee-0x1ad;const _0x5746af=a197_0x5746();let _0x5104c8=_0x5746af[_0x2710ee];return _0x5104c8;}export function listAliases(_0x1c0482,_0x16a0e5,_0x3c3609){return loadAliasMap(_0x1c0482,_0x16a0e5,_0x3c3609);}
@@ -1 +1 @@
1
- (function(_0x5ab5c4,_0x5b730f){const _0x10d01e=a197_0x5bbb,_0x4b1325=_0x5ab5c4();while(!![]){try{const _0x558448=-parseInt(_0x10d01e(0x1c1))/0x1*(-parseInt(_0x10d01e(0x23c))/0x2)+-parseInt(_0x10d01e(0x1c5))/0x3*(-parseInt(_0x10d01e(0x187))/0x4)+parseInt(_0x10d01e(0x216))/0x5+-parseInt(_0x10d01e(0x188))/0x6*(-parseInt(_0x10d01e(0x1c0))/0x7)+-parseInt(_0x10d01e(0x1ce))/0x8*(parseInt(_0x10d01e(0x24d))/0x9)+parseInt(_0x10d01e(0x1aa))/0xa+-parseInt(_0x10d01e(0x208))/0xb;if(_0x558448===_0x5b730f)break;else _0x4b1325['push'](_0x4b1325['shift']());}catch(_0x266360){_0x4b1325['push'](_0x4b1325['shift']());}}}(a197_0x47ae,0xd0d95));import{readFile}from'node:fs/promises';import{basename}from'node:path';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{getEnv}from'../constant/env.js';import{CliError,CliErrors}from'../errors.js';import{extractList,extractPaging}from'../framework/response.js';import{normalizeEntityWithIdResponse}from'../utils/entity-with-id.js';import{logger}from'../utils/logger.js';let _activeCookie;export function setActiveCookie(_0x450a23){_activeCookie=_0x450a23||undefined;}export function clearActiveCookie(){_activeCookie=undefined;}const DEFAULT_REQUEST_TIMEOUT_MS=0x7530,ER_CONFIG_REQUEST_TIMEOUT_MS=0x1d4c0,TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS=0x2bf20;function createFetchFailureError(_0x536f6e,_0x6a2c60){const _0x4098f1=a197_0x5bbb,_0x3500b4=_0x6a2c60 instanceof Error?_0x6a2c60[_0x4098f1(0x169)]:String(_0x6a2c60);return CliErrors[_0x4098f1(0x18a)](_0x4098f1(0x1d6)+_0x536f6e+(_0x3500b4?'\x20('+_0x3500b4+')':''),'Check\x20network\x20connectivity\x20and\x20try\x20again.');}async function apiRequest(_0x350bfe,_0x39ec13={}){const _0x3d2165=a197_0x5bbb,{method:method=_0x3d2165(0x207),body:_0x4ca006,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![],allowNonJsonSuccess:allowNonJsonSuccess=![]}=_0x39ec13,_0x108192=useRuntime?getRuntimeDomain():getApiDomain(),_0x289de0=_activeCookie||getCookie(),_0x19b6c2=''+_0x108192+_0x350bfe,_0x11cb92=new AbortController(),_0x22f7fe=setTimeout(()=>_0x11cb92[_0x3d2165(0x18d)](),timeout);try{const _0x41a849=await fetch(_0x19b6c2,{'method':method,'headers':{'Content-Type':_0x3d2165(0x1e5),'Cookie':_0x289de0,'X-Invoke-Source':_0x3d2165(0x201),...headers},'body':_0x4ca006?JSON[_0x3d2165(0x172)](_0x4ca006):undefined,'signal':_0x11cb92[_0x3d2165(0x249)]});let _0x43af3a;try{_0x43af3a=await _0x41a849[_0x3d2165(0x21f)]();}catch(_0x502cd8){if(_0x502cd8 instanceof Error&&_0x502cd8[_0x3d2165(0x1ca)]===_0x3d2165(0x195))throw CliErrors[_0x3d2165(0x18a)]('Request\x20timeout:\x20'+_0x19b6c2);if(_0x41a849['ok']&&allowNonJsonSuccess)return{'success':!![],'data':undefined};throw CliErrors[_0x3d2165(0x18a)](_0x3d2165(0x1f6)+_0x41a849['status']+')',_0x41a849[_0x3d2165(0x186)]>=0x190?_0x3d2165(0x170):undefined);}if(!_0x41a849['ok']||_0x43af3a[_0x3d2165(0x1cd)]===![])throw CliErrors[_0x3d2165(0x18a)](_0x43af3a[_0x3d2165(0x1bd)]||_0x43af3a[_0x3d2165(0x169)]||'API\x20error:\x20'+_0x41a849['status'],_0x43af3a[_0x3d2165(0x1ac)]?_0x3d2165(0x1a4)+_0x43af3a[_0x3d2165(0x1ac)]:undefined);return _0x43af3a;}catch(_0x2ce62c){if(_0x2ce62c instanceof CliError)throw _0x2ce62c;if(_0x2ce62c instanceof Error&&_0x2ce62c[_0x3d2165(0x1ca)]===_0x3d2165(0x195))throw CliErrors['apiError'](_0x3d2165(0x1da)+_0x19b6c2);throw createFetchFailureError(_0x19b6c2,_0x2ce62c);}finally{clearTimeout(_0x22f7fe);}}async function apiFormRequest(_0x27ec29,_0x133631,_0x576e8b={}){const _0x28a732=a197_0x5bbb,{timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS}=_0x576e8b,_0x1546b9=_activeCookie||getCookie(),_0x674537=''+getApiDomain()+_0x27ec29,_0x5d7c52=new AbortController(),_0x483cf4=setTimeout(()=>_0x5d7c52[_0x28a732(0x18d)](),timeout);try{const _0x2e823d=await fetch(_0x674537,{'method':'POST','headers':{'Cookie':_0x1546b9,'X-Invoke-Source':_0x28a732(0x201)},'body':_0x133631,'signal':_0x5d7c52[_0x28a732(0x249)]});let _0xb8f029;try{_0xb8f029=await _0x2e823d[_0x28a732(0x21f)]();}catch(_0x12df97){if(_0x12df97 instanceof Error&&_0x12df97[_0x28a732(0x1ca)]===_0x28a732(0x195))throw CliErrors['apiError'](_0x28a732(0x1da)+_0x674537);throw CliErrors[_0x28a732(0x18a)]('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x2e823d[_0x28a732(0x186)]+')',_0x2e823d[_0x28a732(0x186)]>=0x190?_0x28a732(0x170):undefined);}if(!_0x2e823d['ok']||_0xb8f029[_0x28a732(0x1cd)]===![])throw CliErrors[_0x28a732(0x18a)](_0xb8f029[_0x28a732(0x1bd)]||_0xb8f029[_0x28a732(0x169)]||_0x28a732(0x1e9)+_0x2e823d[_0x28a732(0x186)],_0xb8f029[_0x28a732(0x1ac)]?_0x28a732(0x1a4)+_0xb8f029[_0x28a732(0x1ac)]:undefined);return _0xb8f029;}catch(_0x33bd68){if(_0x33bd68 instanceof CliError)throw _0x33bd68;if(_0x33bd68 instanceof Error&&_0x33bd68['name']===_0x28a732(0x195))throw CliErrors[_0x28a732(0x18a)](_0x28a732(0x1da)+_0x674537);throw createFetchFailureError(_0x674537,_0x33bd68);}finally{clearTimeout(_0x483cf4);}}export async function uploadDevelopmentFile(_0x41134a,_0x32ae36){const _0x2a7efc=a197_0x5bbb,_0x494e86=await readFile(_0x32ae36),_0x5e1f95=new FormData();_0x5e1f95[_0x2a7efc(0x1b0)](_0x2a7efc(0x1e4),_0x41134a),_0x5e1f95[_0x2a7efc(0x1b0)](_0x2a7efc(0x16a),new Blob([new Uint8Array(_0x494e86)]),basename(_0x32ae36));const _0x354fed=await apiFormRequest(_0x2a7efc(0x21e),_0x5e1f95);return _0x354fed[_0x2a7efc(0x1ef)];}export async function queryDevelopmentFileUrl(_0x2448b1,_0x1b3455={}){const _0x2a7ced=a197_0x5bbb,_0x248307=await apiRequest(_0x2a7ced(0x1de),{'method':'POST','body':{'filePath':_0x2448b1,'downloadFlag':_0x1b3455[_0x2a7ced(0x247)]??![],..._0x1b3455[_0x2a7ced(0x24e)]?{'longTerm':!![]}:{}}});return _0x248307[_0x2a7ced(0x1ef)];}function isAuthFailure(_0x37d38f){const _0x257154=a197_0x5bbb,_0x2d28d0=_0x37d38f['errorMsg']||_0x37d38f[_0x257154(0x169)]||_0x37d38f[_0x257154(0x1ef)]?.['message']||_0x37d38f['errorMessage']||_0x37d38f[_0x257154(0x241)]||'';return _0x37d38f[_0x257154(0x1ac)]===_0x257154(0x22a)||_0x37d38f[_0x257154(0x168)]===0x191||_0x37d38f[_0x257154(0x168)]===_0x257154(0x22d)||_0x2d28d0[_0x257154(0x1f3)](_0x257154(0x22d))||_0x2d28d0[_0x257154(0x1f3)](_0x257154(0x245))||_0x2d28d0[_0x257154(0x1f3)]('登录')||_0x2d28d0[_0x257154(0x1f3)]('认证');}export async function platformFetch(_0x374c65,_0xfe58dd){const _0xcd150d=a197_0x5bbb;let _0x5429f3;try{_0x5429f3=await fetch(_0x374c65,{'method':_0xfe58dd['method']??_0xcd150d(0x207),'headers':{'Content-Type':_0xcd150d(0x1e5),'Cookie':_0xfe58dd[_0xcd150d(0x22f)],'X-Invoke-Source':_0xcd150d(0x201)},..._0xfe58dd[_0xcd150d(0x21c)]&&{'body':JSON[_0xcd150d(0x172)](_0xfe58dd[_0xcd150d(0x21c)])}});}catch(_0x2e6a66){throw createFetchFailureError(_0x374c65,_0x2e6a66);}if(!_0x5429f3['ok']){if(_0x5429f3[_0xcd150d(0x186)]===0x191)throw CliErrors[_0xcd150d(0x19f)]();throw CliErrors[_0xcd150d(0x18a)](_0xfe58dd[_0xcd150d(0x1b7)]+_0xcd150d(0x1a2)+_0x5429f3[_0xcd150d(0x186)]);}const _0x56971d=await _0x5429f3[_0xcd150d(0x21f)]();if(_0x56971d[_0xcd150d(0x1cd)]===![]){if(isAuthFailure(_0x56971d))throw CliErrors[_0xcd150d(0x19f)]();throw CliErrors['apiError'](_0x56971d[_0xcd150d(0x1bd)]||_0x56971d[_0xcd150d(0x169)]||_0xfe58dd[_0xcd150d(0x1b7)]+_0xcd150d(0x243));}return _0x56971d[_0xcd150d(0x1ef)];}function a197_0x5bbb(_0xf2dc4d,_0x264234){_0xf2dc4d=_0xf2dc4d-0x165;const _0x47ae95=a197_0x47ae();let _0x5bbb58=_0x47ae95[_0xf2dc4d];return _0x5bbb58;}export async function platformRequest(_0x5b9c0a,_0x43cb65){const _0x5838c8=a197_0x5bbb;if(/^https?:\/\//i[_0x5838c8(0x16d)](_0x5b9c0a))throw CliErrors[_0x5838c8(0x203)](_0x5838c8(0x1fd)+_0x5b9c0a,_0x5838c8(0x1cf));const _0x2cb21c=_0x5b9c0a['startsWith']('/')?_0x5b9c0a:'/'+_0x5b9c0a;return platformFetch(''+getApiDomain()+_0x2cb21c,_0x43cb65);}function cleanNewlines(_0x4fd30c){const _0xb4afc1=a197_0x5bbb;return _0x4fd30c['replace'](/[\r\n]+/g,'\x20')[_0xb4afc1(0x189)]();}function cleanDatasetName(_0x40d275){const _0x3cea53=a197_0x5bbb;if(!_0x40d275['name'])return _0x40d275;return{..._0x40d275,'name':cleanNewlines(_0x40d275[_0x3cea53(0x1ca)])};}export async function fetchModelList(_0x16a1b8,_0xeda044){const _0x3fcb08=a197_0x5bbb,_0x308698=getEnv(),_0x563261=new URLSearchParams({'appcode':_0x16a1b8,'otype':'array'}),_0x44f286='/api/node-toolbox/dataset/model-list?'+_0x563261[_0x3fcb08(0x202)]();logger['info'](_0x3fcb08(0x1bb),_0x3fcb08(0x239)+_0x308698+')',{'apiPath':_0x44f286});const _0x5bc09c=await platformRequest(_0x44f286,{'cookie':_0xeda044,'label':_0x3fcb08(0x23e)}),_0x4538c4=(_0x5bc09c[_0x3fcb08(0x1c9)]??[])[_0x3fcb08(0x1fb)](cleanDatasetName);return{'configArray':_0x4538c4,'count':_0x4538c4[_0x3fcb08(0x1f2)]};}export async function fetchDatasetDoc(_0x4c45da){const _0x29e687=a197_0x5bbb,{appCode:_0x84a8fc,cookie:_0x50211e,datasetCode:_0x12596e,datasetId:_0x496381,extraParams:_0x4d934a}=_0x4c45da,_0x404bc8=await platformRequest('/api/node-toolbox/api-doc-generator',{'method':_0x29e687(0x1ec),'body':{'appCode':_0x84a8fc,'datasetCode':_0x12596e,'datasetId':_0x496381,..._0x4d934a||{}},'cookie':_0x50211e,'label':_0x29e687(0x171)+_0x12596e+')'});if(!_0x404bc8||typeof _0x404bc8['markdown']!==_0x29e687(0x223))throw new Error('Invalid\x20response\x20format\x20('+_0x12596e+_0x29e687(0x16f));return _0x404bc8[_0x29e687(0x1c3)];}export async function getMenuTree(_0x13a4e8,_0x38c003){const _0x12c19d=a197_0x5bbb,_0x44c852=new URLSearchParams({'appCode':_0x13a4e8});return platformRequest(_0x12c19d(0x23a)+_0x44c852['toString'](),{'cookie':_0x38c003,'label':'Fetch\x20menu\x20list'});}export async function createMenuRecord(_0x282cf7,_0x1f62b3,_0x3a07cd){const _0x519574=a197_0x5bbb;return platformRequest(_0x519574(0x19e),{'method':'POST','body':_0x282cf7,'cookie':_0x1f62b3,'label':_0x3a07cd});}export async function updateMenuRecord(_0x390c76,_0x184668,_0x5d402a){const _0x46b399=a197_0x5bbb;return platformRequest(_0x46b399(0x20f),{'method':_0x46b399(0x1ec),'body':_0x390c76,'cookie':_0x184668,'label':_0x5d402a});}export async function deleteMenuRecord(_0x3f2792,_0x2aaa23,_0x8875eb){const _0x279336=a197_0x5bbb;return platformRequest(_0x279336(0x20e),{'method':'POST','body':{'id':_0x3f2792},'cookie':_0x2aaa23,'label':_0x8875eb});}export async function batchDeleteMenuRecords(_0x462370,_0x2226d9,_0x3ce2df){const _0x421a3e=a197_0x5bbb;return platformRequest(_0x421a3e(0x1f1),{'method':_0x421a3e(0x1ec),'body':{'idList':_0x462370},'cookie':_0x2226d9,'label':_0x3ce2df});}export async function startMenuRegroup(_0x312f15,_0x16c3ee,_0x5d9c3a){return platformRequest('/smartapi/menu/regroup',{'method':'POST','body':_0x312f15,'cookie':_0x16c3ee,'label':_0x5d9c3a});}export async function getAsyncTaskStatus(_0x5a3dcf,_0x207d02,_0x664ac3){const _0x46e7c8=a197_0x5bbb,_0x153d1f=new URLSearchParams({'appCode':_0x207d02});return platformRequest(_0x46e7c8(0x222)+encodeURIComponent(_0x5a3dcf)+'?'+_0x153d1f[_0x46e7c8(0x202)](),{'cookie':_0x664ac3,'label':_0x46e7c8(0x246)+_0x5a3dcf});}export async function listBffScripts(_0x3c7cd7,_0x8ae362,_0xa5f264){const _0x47fb0b=a197_0x5bbb;let _0x15f479=_0x47fb0b(0x1ae)+_0x3c7cd7;if(_0x8ae362)_0x15f479+=_0x47fb0b(0x23d)+_0x8ae362;const _0x1971bc=await apiRequest(_0x15f479);let _0x235044=extractList(_0x1971bc[_0x47fb0b(0x1ef)]);if(_0xa5f264?.['scriptName']){const _0x10175b=_0xa5f264[_0x47fb0b(0x234)][_0x47fb0b(0x1cc)]();_0x235044=_0x235044[_0x47fb0b(0x237)](_0x3f13fc=>_0x3f13fc[_0x47fb0b(0x233)]?.[_0x47fb0b(0x1cc)]()['includes'](_0x10175b)||_0x3f13fc[_0x47fb0b(0x20a)]?.[_0x47fb0b(0x1cc)]()['includes'](_0x10175b));}return _0x235044;}export async function getBffScriptInfo(_0x2152c4){const _0x70bcf0=a197_0x5bbb,_0x50e412=await apiRequest(_0x70bcf0(0x1ee)+_0x2152c4);if(!_0x50e412[_0x70bcf0(0x1ef)])throw CliErrors[_0x70bcf0(0x203)]('BFF\x20script\x20not\x20found:\x20id='+_0x2152c4);return _0x50e412[_0x70bcf0(0x1ef)];}export async function saveBffScript(_0x3f5965){const _0x55e51b=a197_0x5bbb,_0x4c0fde=await apiRequest(_0x55e51b(0x173),{'method':_0x55e51b(0x1ec),'body':_0x3f5965}),{id:_0x2001fd,entity:_0x329065}=normalizeEntityWithIdResponse(_0x4c0fde[_0x55e51b(0x1ef)]);if(_0x2001fd!==undefined){const _0x32b1fe=typeof _0x329065[_0x55e51b(0x233)]===_0x55e51b(0x223)||typeof _0x329065['scriptType']===_0x55e51b(0x223)?_0x329065:undefined;return{'id':_0x2001fd,'script':_0x32b1fe};}throw CliErrors[_0x55e51b(0x18a)](_0x55e51b(0x228));}export async function deleteBffScript(_0x248145){const _0x5b9b48=a197_0x5bbb;await apiRequest(_0x5b9b48(0x1ea),{'method':_0x5b9b48(0x1ec),'body':{'id':_0x248145}});}function a197_0x47ae(){const _0x2b95e9=['roleName','needSelf','/smartapi/permit/role/update','tags','9465990uQtuNs','const\x20data\x20=\x20await\x20client.sql.execute({','errorCode','operations','/api/management/library/scripts/list?appCode=','export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{','append','dbId','.filter({','/smartapi/permit/role/delete','/smartapi/custom/getUserCustomSql?id=','Operation\x20\x22','key','label','/smartapi/lovrabet/dataset/','isArray','/smartapi/app-config/getByKey','fetch-model-list','ENABLE','errorMsg','const\x20results\x20=\x20data.execResult\x20||\x20[];','/smartapi/dataset/text-generate/preview','7TLyyVD','1491209bkbDSr','username','markdown','/smartapi/dataset/get-dataset-list','4843941CMbTKg','set','//\x20SQL:\x20','permits','configArray','name','/smartapi/dblink/create','toLowerCase','success','8qMRfCu','Use\x20platformFetch\x20only\x20for\x20legacy\x20absolute-URL\x20calls.','\x20\x20sqlCode:\x20\x27','physicalTableCount','/smartapi/permit/page/get-one','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','requirementDescription','\x20\x20currentPage:\x201,','Request\x20failed:\x20','\x20\x20return\x20rows;','/smartapi/app/getList','/smartapi/dataset/get-dataset-operation','Request\x20timeout:\x20','DATA_NOT_EXIST','/smartapi/db-analysis/start','.getOne(id);','/smartapi/common/queryFileUrl','/smartapi/app-config/create','userTenantRelationList','/smartapi/permit/page/save','join','/smartapi/db-analysis/status/','appCode','application/json','currentPage','\x20\x20});','tableList','API\x20error:\x20','/api/management/library/scripts/delete','/api/','POST','SQL\x20query\x20not\x20found:\x20','/api/management/library/scripts/info?id=','data','value','/smartapi/menu/batchDelete','length','includes','list','find','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','/smartapi/dblink/getOne','/smartapi/custom/saveUserCustomSql','relation','map','/smartapi/dblink/testConnect','platformRequest\x20expects\x20an\x20API\x20path,\x20got\x20absolute\x20URL:\x20','\x20apps.\x20','object','Use\x20the\x20platform\x20console\x20to\x20see\x20all.','cli:rabetbase','toString','validation','warn','max','/smartapi/custom/queryUserCustomSqlList','GET','44782881EWrZCl','.update(id,\x20{\x20/*\x20fields\x20*/\x20});','description','/smartapi/dataset/delete-dataset','enabled','delete','/smartapi/menu/delete','/smartapi/menu/update','/smartapi/dblink/update','/smartapi/permit/user-role/get-user-list','/smartapi/dblink/delete','/smartapi/lovrabet/update-page','/smartapi/dataset/restore-dataset','version','4296000BWDgue','\x22\x20not\x20found\x20in\x20dataset\x20','/smartapi/question/er-config/cli/erCreate','tableName','isFinite','nickname','body','\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({','/smartapi/common/uploadFile','json','Page\x20not\x20found:\x20','remark','/smartapi/tasks/','string','needPublic','sqlCode','totalCount','/notification/channel-config/list','BFF\x20save\x20returned\x20no\x20valid\x20id','/generate-standard-pages/status?','UNAUTHORIZED','has','deleted','401','clientOperationId','cookie','.remove(id);','avatar','/smartapi/question/er-config/business-group/edit','functionName','scriptName','summary','/smartapi/custom/deleteUserCustomSql','filter','/smartapi/db-analysis/jobs/cancel','正在从服务器拉取模型列表...\x20(环境:\x20','/smartapi/menu/find?','operationId','2sxEknx','&type=','Fetch\x20datasets','dbtableConfig','/smartapi/dblink/getTableDiffV2ByPage','error','/api/management/library/scripts/statistics?appCode=','\x20failed','\x20of\x20','Unauthorized','Fetch\x20async\x20task\x20','download','responseFields','signal','/smartapi/dataset/text-generate/status?','entries','/smartapi/permit/role/get-permit-list','12688146qOVDvV','longTerm','userId','/filter','/sync-to-pages','code','message','file','requestFields','remove','test','ER\x20relation\x20does\x20not\x20exist','):\x20missing\x20data.markdown\x20field','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','Fetch\x20doc\x20(','stringify','/api/management/library/scripts/save','API\x20error\x20code:\x20306','//\x20','/smartapi/dblink/getAllTableList','\x20\x20pageSize:\x2020,','hint','target','/smartapi/question/er-config/cli/update-single','const\x20result\x20=\x20await\x20client.models.','getOne','?sqlCode=','/smartapi/question/er-config/cli/delete-single','/smartapi/app-config/delete','/smartapi/permit/resource/get-api-list','api_error','Warning:\x20showing\x20first\x20','/smartapi/dataset/update-driven-data','pageSize','if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);','status','4zUUlBz','8548530XLEphE','trim','apiError','});','/smartapi/permit/role/get-one','abort','tableData','includeImports','displayName','/api/custom/executeSql','create','operationName','push','AbortError','dataset_','table','min','modelId','modelCode','CUSTOM','sqlName','datasetName','/smartapi/menu/create','authRequired','datasetTableCount','replace','\x20failed,\x20HTTP\x20','(/*\x20params\x20*/);','API\x20error\x20code:\x20','Dataset\x20not\x20found:\x20'];a197_0x47ae=function(){return _0x2b95e9;};return a197_0x47ae();}export async function getBffScriptStatistics(_0x545248){const _0x430a78=a197_0x5bbb,_0x286fe4=await apiRequest(_0x430a78(0x242)+_0x545248);return extractList(_0x286fe4[_0x430a78(0x1ef)]);}export async function clearBffScriptCache(){const _0x3ed70f=a197_0x5bbb,_0x10e6d2=await apiRequest('/api/management/script/cache/clear',{'method':_0x3ed70f(0x1ec),'useRuntime':!![]});return typeof _0x10e6d2[_0x3ed70f(0x1ef)]===_0x3ed70f(0x223)?_0x10e6d2['data']:'';}export async function listBffDatasetOperations(_0x5ab5c5,_0x5eb3df){const _0x279d91=a197_0x5bbb,_0x4db196=await apiRequest(_0x279d91(0x1d9),{'method':_0x279d91(0x1ec),'body':{'appCode':_0x5ab5c5,'datasetId':_0x5eb3df}});return _0x4db196[_0x279d91(0x1ef)];}export async function listSqlQueries(_0xc53e7b,_0x508164){const _0x72eebf=a197_0x5bbb,_0x5ac5fb=await apiRequest(_0x72eebf(0x206),{'method':'POST','body':{'appCode':_0xc53e7b,'currentPage':_0x508164?.[_0x72eebf(0x1e6)]??0x1,'pageSize':_0x508164?.[_0x72eebf(0x184)]??0x32,'sqlCode':_0x508164?.[_0x72eebf(0x225)],'sqlName':_0x508164?.[_0x72eebf(0x19c)]}});return _0x5ac5fb[_0x72eebf(0x1ef)];}export async function getSqlQueryInfo(_0x43dfde,_0x532320){const _0x2969c8=a197_0x5bbb,_0xdbc388=await listSqlQueries(_0x43dfde,{'sqlCode':_0x532320}),_0x11cc96=_0xdbc388['tableData']?.[0x0];if(!_0x11cc96)throw CliErrors['validation'](_0x2969c8(0x1ed)+_0x532320);return _0x11cc96;}export async function getSqlQueryDetail(_0x5712f2){const _0x4c1582=a197_0x5bbb,_0x135c69=await apiRequest('/smartapi/custom/getUserCustomSql'+(_0x4c1582(0x17d)+encodeURIComponent(_0x5712f2)));if(!_0x135c69[_0x4c1582(0x1ef)])throw CliErrors[_0x4c1582(0x203)](_0x4c1582(0x1ed)+_0x5712f2);return _0x135c69['data'];}export async function getSqlQueryDetailById(_0x5e3357){const _0x528152=a197_0x5bbb,_0x3f7456=await apiRequest(_0x528152(0x1b4)+_0x5e3357);if(!_0x3f7456['data'])throw CliErrors[_0x528152(0x203)]('SQL\x20query\x20not\x20found:\x20id='+_0x5e3357);return _0x3f7456[_0x528152(0x1ef)];}export async function createSqlQuery(_0x39b8b4){const _0x3e0afe=a197_0x5bbb,_0x575d5b=await apiRequest(_0x3e0afe(0x1f9),{'method':_0x3e0afe(0x1ec),'body':_0x39b8b4}),{id:_0x552e9,entity:_0x4fb7bd}=normalizeEntityWithIdResponse(_0x575d5b['data']);if(!(_0x3e0afe(0x225)in _0x4fb7bd)&&_0x552e9)return getSqlQueryDetailById(_0x552e9);return normalizeSqlQueryEntity(_0x4fb7bd);}export async function updateSqlQuery(_0x42a636){const _0x381532=a197_0x5bbb,_0x273e6a=await apiRequest('/smartapi/custom/updateUserCustomSql',{'method':_0x381532(0x1ec),'body':_0x42a636}),{id:_0x10be0d,entity:_0x1229b0}=normalizeEntityWithIdResponse(_0x273e6a['data']);if(!('sqlCode'in _0x1229b0)){if(_0x42a636[_0x381532(0x225)])return getSqlQueryDetail(_0x42a636[_0x381532(0x225)]);if(_0x10be0d)return getSqlQueryDetailById(_0x10be0d);}return normalizeSqlQueryEntity(_0x1229b0);}export async function deleteSqlQuery(_0x5adeac){const _0x4096c0=a197_0x5bbb;await apiRequest(_0x4096c0(0x236),{'method':_0x4096c0(0x1ec),'body':_0x5adeac});}export async function saveSqlQuery(_0x570dcc){const _0x2d9852=a197_0x5bbb,_0x1b23ea=await apiRequest('/api/node-toolbox/sql/save',{'method':_0x2d9852(0x1ec),'body':_0x570dcc});return _0x1b23ea[_0x2d9852(0x1ef)];}function normalizeSqlQueryEntity(_0x1a5767){const _0x10380a=a197_0x5bbb;return{..._0x1a5767,'id':Number(_0x1a5767['id']),'dbId':_0x1a5767['dbId']==null?undefined:Number(_0x1a5767[_0x10380a(0x1b1)]),'version':_0x1a5767['version']==null?undefined:Number(_0x1a5767[_0x10380a(0x215)])};}export async function executeSql(_0x646e41,_0x3e78a7,_0xf8697){const _0x5f086f=a197_0x5bbb,_0x2e71d9=await apiRequest(_0x5f086f(0x191),{'method':_0x5f086f(0x1ec),'body':{'appCode':_0x646e41,'sqlCode':_0x3e78a7,..._0xf8697&&{'params':_0xf8697}},'useRuntime':!![]});return _0x2e71d9['data'];}export async function executeDatasetDataOperation(_0x9753a,_0x4039a7,_0x1c89a2,_0x3b1a67={}){const _0x6a769d=a197_0x5bbb;try{const _0x2b5123=await apiRequest('/api/'+_0x9753a+'/'+_0x4039a7+'/'+_0x1c89a2,{'method':'POST','body':_0x3b1a67,'useRuntime':!![]});return _0x2b5123['data'];}catch(_0xf4c624){if(_0x1c89a2===_0x6a769d(0x17c)&&_0xf4c624 instanceof CliError&&_0xf4c624['code']==='api_error'&&_0x3b1a67['id']!==undefined&&_0x3b1a67['id']!==null&&_0x3b1a67['id']!==''){const _0x3fc574=await apiRequest(_0x6a769d(0x1eb)+_0x9753a+'/'+_0x4039a7+_0x6a769d(0x166),{'method':'POST','body':{'where':{'id':{'$eq':_0x3b1a67['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0x1d755f=Array[_0x6a769d(0x1b9)](_0x3fc574[_0x6a769d(0x1ef)]?.[_0x6a769d(0x18e)])?_0x3fc574[_0x6a769d(0x1ef)][_0x6a769d(0x18e)]:[];return _0x1d755f[0x0]??null;}throw _0xf4c624;}}export async function listDatasets(_0x4d1e00,_0x21633e){const _0x241d79=a197_0x5bbb,_0x329c54={'appCode':_0x4d1e00,'deleted':_0x21633e?.[_0x241d79(0x22c)]??![]};if(_0x21633e?.[_0x241d79(0x168)])_0x329c54[_0x241d79(0x168)]=_0x21633e['code'];if(_0x21633e?.[_0x241d79(0x1ca)])_0x329c54['name']=_0x21633e[_0x241d79(0x1ca)];const _0x1640c1=await apiRequest(_0x241d79(0x1c4),{'method':_0x241d79(0x1ec),'body':_0x329c54});return extractList(_0x1640c1[_0x241d79(0x1ef)]);}export async function deleteDataset(_0x48c678,_0xbb4d73){const _0x156504=a197_0x5bbb;await apiRequest(_0x156504(0x20b),{'method':_0x156504(0x1ec),'body':{'appCode':_0x48c678,'datasetId':_0xbb4d73}});}export async function restoreDataset(_0x5e048b,_0x1bb126){const _0x3db57d=a197_0x5bbb;await apiRequest(_0x3db57d(0x214),{'method':'POST','body':{'appCode':_0x5e048b,'datasetId':_0x1bb126}});}export async function previewTextGeneratedDataset(_0x5e2c18,_0x400be2){const _0x50ed83=a197_0x5bbb,_0x1f893f=await apiRequest(_0x50ed83(0x1bf),{'method':_0x50ed83(0x1ec),'body':{'appCode':_0x5e2c18,'datasetName':_0x400be2[_0x50ed83(0x19d)],'requirementDescription':_0x400be2[_0x50ed83(0x1d4)]},'timeout':TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS});return _0x1f893f[_0x50ed83(0x1ef)];}export async function startTextGeneratedDataset(_0x56eb11,_0x4ca5fd,_0x31df0e){const _0x1cf7fa=a197_0x5bbb,_0x5db664=await apiRequest('/smartapi/dataset/text-generate/start',{'method':'POST','body':{'appCode':_0x56eb11,..._0x31df0e?.[_0x1cf7fa(0x22e)]?{'clientOperationId':_0x31df0e[_0x1cf7fa(0x22e)]}:{},'design':_0x4ca5fd},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x5db664[_0x1cf7fa(0x1ef)];}export async function getTextGeneratedDatasetStatus(_0x4f02ff,_0x583990){const _0xb9c1fd=a197_0x5bbb,_0x167cec=new URLSearchParams({'appCode':_0x4f02ff});_0x583990[_0xb9c1fd(0x23b)]&&_0x167cec[_0xb9c1fd(0x1c6)](_0xb9c1fd(0x23b),_0x583990[_0xb9c1fd(0x23b)]);_0x583990[_0xb9c1fd(0x22e)]&&_0x167cec[_0xb9c1fd(0x1c6)]('clientOperationId',_0x583990['clientOperationId']);const _0x56a378=await apiRequest(_0xb9c1fd(0x24a)+_0x167cec[_0xb9c1fd(0x202)]());return _0x56a378[_0xb9c1fd(0x1ef)];}export async function searchDatasets(_0x4ee543,_0x1ccbc0){const _0x576b22=a197_0x5bbb,_0x21bc4d=await listDatasets(_0x4ee543,{'name':_0x1ccbc0}),_0x4fad04=_0x1ccbc0[_0x576b22(0x1cc)](),_0x48c0b0=new Set(_0x21bc4d[_0x576b22(0x1fb)](_0x3634b2=>_0x3634b2['id'])),_0x134793=_0x21bc4d[_0x576b22(0x237)](_0x328169=>_0x328169[_0x576b22(0x23f)]?.['tableName']?.['toLowerCase']()[_0x576b22(0x1f3)](_0x4fad04)||_0x328169[_0x576b22(0x20a)]?.[_0x576b22(0x1cc)]()['includes'](_0x4fad04)),_0x539192=await listDatasets(_0x4ee543,{'code':_0x1ccbc0});for(const _0x45c65d of _0x539192){!_0x48c0b0[_0x576b22(0x22b)](_0x45c65d['id'])&&(_0x21bc4d[_0x576b22(0x194)](_0x45c65d),_0x48c0b0['add'](_0x45c65d['id']));}return _0x21bc4d;}export function normalizeDatasetOperations(_0x497579){const _0x500974=a197_0x5bbb;if(Array[_0x500974(0x1b9)](_0x497579))return _0x497579[_0x500974(0x237)](_0x2fab00=>_0x2fab00!=null&&typeof _0x2fab00===_0x500974(0x1ff));if(_0x497579&&typeof _0x497579==='object')return Object[_0x500974(0x24b)](_0x497579)[_0x500974(0x237)](([,_0x16b4d3])=>_0x16b4d3!=null&&typeof _0x16b4d3===_0x500974(0x1ff))['map'](([_0x3b9ead,_0x2d0222])=>({..._0x2d0222,'name':_0x2d0222[_0x500974(0x1ca)]??_0x2d0222[_0x500974(0x193)]??_0x3b9ead}));return[];}export async function getDatasetDetail(_0x3a2cb5){const _0x4ff7bb=a197_0x5bbb,_0x47ce18=/^\d+$/['test'](_0x3a2cb5)?'id':_0x4ff7bb(0x168),_0x4918fd=await apiRequest('/smartapi/dataset/get-driven-data?'+_0x47ce18+'='+_0x3a2cb5);return _0x4918fd[_0x4ff7bb(0x1ef)];}export async function updateDrivenData(_0x1b25c0){const _0x56197e=a197_0x5bbb,_0x31028e=await apiRequest(_0x56197e(0x183),{'method':_0x56197e(0x1ec),'body':_0x1b25c0});return _0x31028e[_0x56197e(0x1ef)];}export async function getDatasetOperations(_0xbb3b84){const _0x4f7f52=a197_0x5bbb,_0x252ae0=await getDatasetDetail(_0xbb3b84),_0xaa62fb=normalizeDatasetOperations(_0x252ae0[_0x4f7f52(0x1ad)])[_0x4f7f52(0x1fb)](_0x457754=>({'name':_0x457754['name']||_0x457754[_0x4f7f52(0x193)],'displayName':_0x457754[_0x4f7f52(0x190)]||_0x457754['name'],'type':_0x457754['type'],'method':_0x457754['method'],'path':_0x457754['path'],'enabled':_0x457754[_0x4f7f52(0x20c)]??!![],'requestFields':_0x457754[_0x4f7f52(0x16b)],'responseFields':_0x457754[_0x4f7f52(0x248)]}));return{'dataset':{'id':_0x252ae0['id']??_0x252ae0[_0x4f7f52(0x199)],'name':_0x252ae0[_0x4f7f52(0x1ca)],'code':_0x252ae0[_0x4f7f52(0x168)]||_0x252ae0[_0x4f7f52(0x19a)],'tableName':_0x252ae0[_0x4f7f52(0x219)]||_0x252ae0[_0x4f7f52(0x23f)]?.[_0x4f7f52(0x219)]},'operations':_0xaa62fb};}export async function getOperationDetail(_0x50fc15,_0x5c0037,_0x5200c9){const _0x13c2a5=a197_0x5bbb;let _0x4d41c5=_0x5c0037;if(!/^\d+$/[_0x13c2a5(0x16d)](_0x5c0037)){const _0x27adb3=await listDatasets(_0x50fc15,{'code':_0x5c0037}),_0x3fa2fa=_0x27adb3['find'](_0x100acc=>_0x100acc['code']===_0x5c0037||String(_0x100acc['id'])===_0x5c0037);if(!_0x3fa2fa)throw CliErrors[_0x13c2a5(0x203)](_0x13c2a5(0x1a5)+_0x5c0037);_0x4d41c5=String(_0x3fa2fa['id']);}const _0x552fcd=await getDatasetDetail(_0x4d41c5),_0x4c2292=normalizeDatasetOperations(_0x552fcd['operations'])[_0x13c2a5(0x1f5)](_0x2f3e33=>(_0x2f3e33[_0x13c2a5(0x1ca)]||_0x2f3e33['operationName'])===_0x5200c9);if(!_0x4c2292)throw CliErrors[_0x13c2a5(0x203)](_0x13c2a5(0x1b5)+_0x5200c9+_0x13c2a5(0x217)+_0x5c0037);return{'dataset':{'id':_0x552fcd['id']??_0x552fcd['modelId'],'name':_0x552fcd['name'],'code':_0x552fcd[_0x13c2a5(0x168)]||_0x552fcd['modelCode'],'tableName':_0x552fcd[_0x13c2a5(0x219)]||_0x552fcd[_0x13c2a5(0x23f)]?.[_0x13c2a5(0x219)]},'operation':_0x4c2292};}export async function startGenerateStandardPages(_0x1e56b7,_0x3dfb3a,_0xc695ce){const _0xdd79bc=a197_0x5bbb,_0x1b3d78=await apiRequest(_0xdd79bc(0x1b8)+_0x3dfb3a+'/generate-standard-pages/start',{'method':_0xdd79bc(0x1ec),'body':{'appCode':_0x1e56b7,..._0xc695ce?.['clientOperationId']?{'clientOperationId':_0xc695ce[_0xdd79bc(0x22e)]}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x1b3d78[_0xdd79bc(0x1ef)];}export async function getGenerateStandardPagesStatus(_0x24eca2,_0xda3d9c,_0x4b6943){const _0x5585e0=a197_0x5bbb,_0x20b135=new URLSearchParams({'appCode':_0x24eca2});_0x4b6943[_0x5585e0(0x23b)]&&_0x20b135[_0x5585e0(0x1c6)]('operationId',_0x4b6943['operationId']);_0x4b6943[_0x5585e0(0x22e)]&&_0x20b135[_0x5585e0(0x1c6)](_0x5585e0(0x22e),_0x4b6943[_0x5585e0(0x22e)]);const _0x33eb4f=await apiRequest(_0x5585e0(0x1b8)+_0xda3d9c+_0x5585e0(0x229)+_0x20b135[_0x5585e0(0x202)]());return _0x33eb4f[_0x5585e0(0x1ef)];}export async function getStandardPageStatus(_0x25ae13,_0x3ccac2){const _0x16d5ad=a197_0x5bbb,_0x4bb5e3=await apiRequest(_0x16d5ad(0x1b8)+_0x3ccac2+'/standard-page-status?appCode='+encodeURIComponent(_0x25ae13));return _0x4bb5e3[_0x16d5ad(0x1ef)];}export async function tryGetStandardPageStatus(_0x564f0d,_0x2bc3b2){const _0x109100=a197_0x5bbb;try{return await getStandardPageStatus(_0x564f0d,_0x2bc3b2);}catch(_0x2d3630){if(_0x2d3630 instanceof CliError&&_0x2d3630[_0x109100(0x168)]===_0x109100(0x181)&&/404|not found|non-json response/i['test'](_0x2d3630[_0x109100(0x169)]))return null;throw _0x2d3630;}}export async function syncStandardPages(_0x356d8f,_0x54b583){const _0x22d275=a197_0x5bbb,_0x960db0=await apiRequest(_0x22d275(0x1b8)+_0x54b583+_0x22d275(0x167),{'method':_0x22d275(0x1ec),'body':{'appCode':_0x356d8f}});return _0x960db0[_0x22d275(0x1ef)];}export async function getPageDetail(_0x3f27a2){const _0x13efd5=a197_0x5bbb,_0x508201=await apiRequest('/smartapi/lovrabet/detail?pageId='+_0x3f27a2);if(!_0x508201[_0x13efd5(0x1ef)])throw CliErrors['validation'](_0x13efd5(0x220)+_0x3f27a2);return _0x508201[_0x13efd5(0x1ef)];}export async function updatePage(_0x4931a6,_0x287c88,_0x242f4d,_0x139d39){const _0x25afe1=a197_0x5bbb,_0x15f447=await apiRequest(_0x25afe1(0x213),{'method':_0x25afe1(0x1ec),'body':{'appCode':_0x4931a6,'pageId':_0x287c88,'code':_0x242f4d,'datasetIds':_0x139d39}});return _0x15f447['data'];}export function generateSdkCode(_0x5a7626,_0x284037,_0x483d48){const _0x4fc71b=a197_0x5bbb,_0x31ff62=_0x483d48?.[_0x4fc71b(0x18f)]??!![],_0x1680ec=_0x4fc71b(0x196)+_0x5a7626[_0x4fc71b(0x168)]?.[_0x4fc71b(0x1a1)](/-/g,'_'),_0x37719c=_0x284037[_0x4fc71b(0x1ca)]||_0x284037[_0x4fc71b(0x193)]||_0x4fc71b(0x237),_0x452493=[];_0x31ff62&&_0x452493[_0x4fc71b(0x194)]('import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','',_0x4fc71b(0x1d3),'');_0x452493[_0x4fc71b(0x194)](_0x4fc71b(0x175)+_0x5a7626[_0x4fc71b(0x1ca)]+'\x20('+(_0x5a7626[_0x4fc71b(0x219)]||_0x4fc71b(0x197))+')');if(_0x37719c===_0x4fc71b(0x237))_0x452493[_0x4fc71b(0x194)](_0x4fc71b(0x17b)+_0x1680ec+_0x4fc71b(0x1b2),'\x20\x20where:\x20{},',_0x4fc71b(0x177),_0x4fc71b(0x1d5),_0x4fc71b(0x18b));else{if(_0x37719c===_0x4fc71b(0x17c))_0x452493[_0x4fc71b(0x194)](_0x4fc71b(0x17b)+_0x1680ec+_0x4fc71b(0x1dd));else{if(_0x37719c===_0x4fc71b(0x192))_0x452493[_0x4fc71b(0x194)]('const\x20result\x20=\x20await\x20client.models.'+_0x1680ec+'.create({\x20/*\x20fields\x20*/\x20});');else{if(_0x37719c==='update')_0x452493[_0x4fc71b(0x194)]('const\x20result\x20=\x20await\x20client.models.'+_0x1680ec+_0x4fc71b(0x209));else _0x37719c===_0x4fc71b(0x20d)||_0x37719c===_0x4fc71b(0x16c)?_0x452493[_0x4fc71b(0x194)](_0x4fc71b(0x17b)+_0x1680ec+_0x4fc71b(0x230)):_0x452493[_0x4fc71b(0x194)]('const\x20result\x20=\x20await\x20client.models.'+_0x1680ec+'.'+_0x37719c+_0x4fc71b(0x1a3));}}}return _0x452493[_0x4fc71b(0x1e2)]('\x0a');}export function generateSqlCodeTemplate(_0xa55b94,_0x492579){const _0x14c4d4=a197_0x5bbb,_0x4ba472=_0x492579?.[_0x14c4d4(0x179)]??'sdk',_0x7ed42c=_0x492579?.[_0x14c4d4(0x18f)]??!![],_0x4b5df8=[];return _0x4b5df8[_0x14c4d4(0x194)](_0x14c4d4(0x1c7)+_0xa55b94[_0x14c4d4(0x19c)]+'\x20('+_0xa55b94[_0x14c4d4(0x225)]+')'),_0x4ba472==='sdk'?(_0x7ed42c&&_0x4b5df8[_0x14c4d4(0x194)]('import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','',_0x14c4d4(0x1d3),''),_0x4b5df8[_0x14c4d4(0x194)](_0x14c4d4(0x1ab),_0x14c4d4(0x1d0)+_0xa55b94[_0x14c4d4(0x225)]+'\x27,',_0x14c4d4(0x1f7),_0x14c4d4(0x18b),_0x14c4d4(0x185),_0x14c4d4(0x1be))):_0x4b5df8[_0x14c4d4(0x194)]('//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly',_0x14c4d4(0x1af),_0x14c4d4(0x21d),'\x20\x20\x20\x20sqlCode:\x20\x27'+_0xa55b94[_0x14c4d4(0x225)]+'\x27,','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},',_0x14c4d4(0x1e7),_0x14c4d4(0x1d7),'}'),_0x4b5df8[_0x14c4d4(0x1e2)]('\x0a');}export async function getErConfig(_0x409e29,_0x2d4756){const _0x470877=a197_0x5bbb,_0x31e32f=await apiRequest('/smartapi/question/er-config',{'method':_0x470877(0x1ec),'body':{'appCode':_0x409e29,'dblinkId':_0x2d4756},'timeout':ER_CONFIG_REQUEST_TIMEOUT_MS});return _0x31e32f[_0x470877(0x1ef)];}export async function getErRelationDetail(_0x4101ec,_0x313756){const _0x2e3def=a197_0x5bbb,_0x3d0719=new URLSearchParams({'appCode':_0x4101ec,'relationId':String(_0x313756)});try{const _0x608c96=await apiRequest('/smartapi/question/er-config/cli/detail?'+_0x3d0719[_0x2e3def(0x202)]());return _0x608c96['data']?.[_0x2e3def(0x1fa)]??null;}catch(_0x4edfe2){if(_0x4edfe2 instanceof CliError&&_0x4edfe2[_0x2e3def(0x168)]===_0x2e3def(0x181)&&(_0x4edfe2['hint']?.[_0x2e3def(0x1f3)](_0x2e3def(0x1db))||_0x4edfe2[_0x2e3def(0x178)]===_0x2e3def(0x174)&&_0x4edfe2[_0x2e3def(0x169)]===_0x2e3def(0x16e)))return null;throw _0x4edfe2;}}export async function createErRelation(_0x492cf2){const _0x58ead5=a197_0x5bbb,_0x3b527a=await apiRequest(_0x58ead5(0x218),{'method':'POST','body':_0x492cf2,'allowNonJsonSuccess':!![]});return _0x3b527a['data'];}export async function updateErRelation(_0x433bbc){const _0x1d70f0=a197_0x5bbb,_0x4460fb=await apiRequest(_0x1d70f0(0x17a),{'method':'POST','body':_0x433bbc,'allowNonJsonSuccess':!![]});return _0x4460fb[_0x1d70f0(0x1ef)];}export async function deleteErRelation(_0xbdab2c){const _0x46bb23=a197_0x5bbb,_0x21f46a=await apiRequest(_0x46bb23(0x17e),{'method':'POST','body':_0xbdab2c,'allowNonJsonSuccess':!![]});return _0x21f46a[_0x46bb23(0x1ef)];}export async function updateErBusinessGroup(_0x33cced){const _0xc9bcef=a197_0x5bbb,_0x140f49=await apiRequest(_0xc9bcef(0x232),{'method':_0xc9bcef(0x1ec),'body':_0x33cced,'allowNonJsonSuccess':!![]});return _0x140f49[_0xc9bcef(0x1ef)];}function buildQuery(_0x778852){const _0x2aeb47=a197_0x5bbb,_0x325ce9=new URLSearchParams();for(const [_0x3fa6d4,_0x21cd3a]of Object[_0x2aeb47(0x24b)](_0x778852)){if(_0x21cd3a===undefined||_0x21cd3a==='')continue;_0x325ce9[_0x2aeb47(0x1c6)](_0x3fa6d4,String(_0x21cd3a));}const _0x1ee56b=_0x325ce9['toString']();return _0x1ee56b?'?'+_0x1ee56b:'';}export async function listNotificationChannelConfigs(_0x479cd1,_0x48e821){const _0x3d0421=a197_0x5bbb,_0x31d9bf=await apiRequest(_0x3d0421(0x227)+buildQuery({'appCode':_0x479cd1,'channelType':_0x48e821}));return Array['isArray'](_0x31d9bf['data'])?_0x31d9bf['data']:[];}export async function listAppConfigs(_0x2f5ed7,_0x11074f){const _0x168a0d=a197_0x5bbb,_0x3883a2=await apiRequest('/smartapi/app-config/list',{'method':_0x168a0d(0x1ec),'body':{'appCode':_0x2f5ed7,..._0x11074f?.['key']?{'key':_0x11074f[_0x168a0d(0x1b6)]}:{},..._0x11074f?.[_0x168a0d(0x1a9)]?{'tags':_0x11074f[_0x168a0d(0x1a9)]}:{}}});return extractAppConfigList(_0x3883a2[_0x168a0d(0x1ef)]);}export async function getAppConfigByKey(_0x48a214,_0x42791a){const _0x1d594e=a197_0x5bbb,_0xbc98df=await apiRequest(_0x1d594e(0x1ba)+buildQuery({'appCode':_0x48a214,'key':_0x42791a}));return _0xbc98df[_0x1d594e(0x1ef)]??null;}export async function createAppConfig(_0x49718e){const _0xcad6e3=a197_0x5bbb,_0x950022=await apiRequest(_0xcad6e3(0x1df),{'method':_0xcad6e3(0x1ec),'body':{'appCode':_0x49718e['appCode'],'key':_0x49718e[_0xcad6e3(0x1b6)],'value':_0x49718e[_0xcad6e3(0x1f0)],..._0x49718e['tags']?{'tags':_0x49718e['tags']}:{}}});return _0x950022[_0xcad6e3(0x1ef)];}export async function updateAppConfig(_0x3d4a87){const _0x2e7e7a=a197_0x5bbb;await apiRequest('/smartapi/app-config/update',{'method':_0x2e7e7a(0x1ec),'body':{'id':_0x3d4a87['id'],'appCode':_0x3d4a87[_0x2e7e7a(0x1e4)],'key':_0x3d4a87[_0x2e7e7a(0x1b6)],'value':_0x3d4a87[_0x2e7e7a(0x1f0)],..._0x3d4a87[_0x2e7e7a(0x1a9)]?{'tags':_0x3d4a87[_0x2e7e7a(0x1a9)]}:{}}});}export async function deleteAppConfig(_0x1d3054){const _0x43459e=a197_0x5bbb;await apiRequest(_0x43459e(0x17f),{'method':_0x43459e(0x1ec),'body':_0x1d3054});}function extractAppConfigList(_0xb4bf42){const _0x44801c=a197_0x5bbb;if(Array['isArray'](_0xb4bf42))return _0xb4bf42;if(_0xb4bf42&&typeof _0xb4bf42==='object'&&Array[_0x44801c(0x1b9)](_0xb4bf42[_0x44801c(0x1f4)]))return _0xb4bf42[_0x44801c(0x1f4)];return extractList(_0xb4bf42);}export async function listDbLinks(_0x57a27f,_0x62af32){const _0x5e9aa6=a197_0x5bbb,_0x16e3b2=await apiRequest('/smartapi/dblink/getList',{'method':_0x5e9aa6(0x1ec),'body':{'appCode':_0x57a27f,'currentPage':_0x62af32?.['currentPage']??0x1,'pageSize':_0x62af32?.[_0x5e9aa6(0x184)]??0x64}});return{'items':extractList(_0x16e3b2['data']),'paging':extractPaging(_0x16e3b2[_0x5e9aa6(0x1ef)])};}export async function getDbLinkInfo(_0x58b8dd){const _0x500c23=a197_0x5bbb,_0x3ce4d2=await apiRequest(_0x500c23(0x1f8)+buildQuery({'id':_0x58b8dd}));return _0x3ce4d2[_0x500c23(0x1ef)];}export async function createDbLink(_0x209b5d){const _0x1b2741=a197_0x5bbb,_0x2d6ff6=await apiRequest(_0x1b2741(0x1cb),{'method':_0x1b2741(0x1ec),'body':_0x209b5d});return _0x2d6ff6[_0x1b2741(0x1ef)];}export async function updateDbLink(_0x840f6d){const _0x108ae1=a197_0x5bbb,_0x3b0a15=await apiRequest(_0x108ae1(0x210),{'method':_0x108ae1(0x1ec),'body':_0x840f6d});return _0x3b0a15[_0x108ae1(0x1ef)];}export async function deleteDbLink(_0x4318f6){const _0x2db96e=a197_0x5bbb;await apiRequest(_0x2db96e(0x212),{'method':_0x2db96e(0x1ec),'body':{'id':_0x4318f6}});}export async function testDbLinkConnect(_0x47ce47){const _0x4ca56c=a197_0x5bbb,_0x2a5487=await apiRequest(_0x4ca56c(0x1fc)+buildQuery({'id':_0x47ce47}));return _0x2a5487[_0x4ca56c(0x1ef)];}export async function startDbAnalysis(_0x478b36,_0x5d652d){const _0x55bd30=a197_0x5bbb,_0xc8f7=await apiRequest(_0x55bd30(0x1dc),{'method':'POST','body':{'dbLinkId':_0x478b36,..._0x5d652d&&_0x5d652d[_0x55bd30(0x1f2)]>0x0?{'tableNames':_0x5d652d}:{}}});return _0xc8f7[_0x55bd30(0x1ef)];}export async function cancelDbAnalysis(_0x2f57aa){const _0x46198=a197_0x5bbb;await apiRequest(_0x46198(0x238)+buildQuery({'planId':_0x2f57aa}),{'method':_0x46198(0x1ec)});}export async function getDbAnalysisStatus(_0xe888b6){const _0x4a898e=a197_0x5bbb,_0x394fe5=await apiRequest(_0x4a898e(0x1e3)+encodeURIComponent(_0xe888b6));return _0x394fe5[_0x4a898e(0x1ef)];}export async function getDbAllTableList(_0x2d03a,_0x161483){const _0x1c49e7=a197_0x5bbb,_0x51dec2=await apiRequest(_0x1c49e7(0x176)+buildQuery({'appCode':_0x2d03a,'dbLinkId':_0x161483})),_0x3e0ad1=_0x51dec2['data'];if(Array[_0x1c49e7(0x1b9)](_0x3e0ad1))return _0x3e0ad1;return extractList(_0x3e0ad1);}export async function getDbTableDiff(_0x5c258a,_0x29e1e8,_0x4f22a4){const _0x30b7c7=a197_0x5bbb,_0x5e27c9=await apiRequest(_0x30b7c7(0x240)+buildQuery({'appCode':_0x5c258a,'dbLinkId':_0x29e1e8,'pageIndex':_0x4f22a4?.['pageIndex']??0x1,'pageSize':_0x4f22a4?.['pageSize']??0x14,'tableName':_0x4f22a4?.[_0x30b7c7(0x219)]})),_0x3ce5cd=_0x5e27c9[_0x30b7c7(0x1ef)];return{'totalCount':_0x3ce5cd?.['totalCount']??0x0,'physicalTableCount':_0x3ce5cd?.[_0x30b7c7(0x1d1)]??0x0,'datasetTableCount':_0x3ce5cd?.[_0x30b7c7(0x1a0)]??0x0,..._0x3ce5cd?.[_0x30b7c7(0x235)]?{'summary':_0x3ce5cd[_0x30b7c7(0x235)]}:{},'tableList':Array[_0x30b7c7(0x1b9)](_0x3ce5cd?.['tableList'])?_0x3ce5cd[_0x30b7c7(0x1e8)]:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0x29233a=a197_0x5bbb,_0x1dd71f=await apiRequest(_0x29233a(0x1d8),{'method':_0x29233a(0x1ec),'body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0x1d4171=extractList(_0x1dd71f[_0x29233a(0x1ef)]),_0x160bf1=extractPaging(_0x1dd71f[_0x29233a(0x1ef)]);return _0x160bf1&&_0x160bf1['totalCount']>REMOTE_APP_PAGE_SIZE&&console[_0x29233a(0x204)](_0x29233a(0x182)+REMOTE_APP_PAGE_SIZE+_0x29233a(0x244)+_0x160bf1[_0x29233a(0x226)]+_0x29233a(0x1fe)+_0x29233a(0x200)),_0x1d4171;}const APP_ROLE_PAGE_SIZE_MAX=0x64;export async function listAppRoles(_0x2c5efd,_0x1d8f7e){const _0x3e3969=a197_0x5bbb,_0x442eda=Math[_0x3e3969(0x198)](Math[_0x3e3969(0x205)](_0x1d8f7e?.[_0x3e3969(0x184)]??APP_ROLE_PAGE_SIZE_MAX,0x1),APP_ROLE_PAGE_SIZE_MAX),_0x441d98=await apiRequest('/smartapi/permit/role/get-list',{'method':_0x3e3969(0x1ec),'body':{'appCode':_0x2c5efd,'currentPage':_0x1d8f7e?.[_0x3e3969(0x1e6)]??0x1,'pageSize':_0x442eda}});return{'items':extractList(_0x441d98[_0x3e3969(0x1ef)]),'paging':extractPaging(_0x441d98['data'])};}export async function getAppRole(_0x247085){const _0x2a47c9=a197_0x5bbb,_0x19dc5a=await apiRequest(_0x2a47c9(0x18c)+buildQuery({'id':_0x247085}));return _0x19dc5a[_0x2a47c9(0x1ef)];}export async function createAppRole(_0x436c6e){const _0x2b44c6=a197_0x5bbb,_0x18cfef=await apiRequest('/smartapi/permit/role/create',{'method':_0x2b44c6(0x1ec),'body':{'appCode':_0x436c6e[_0x2b44c6(0x1e4)],'roleName':_0x436c6e[_0x2b44c6(0x1a6)],'roleType':_0x2b44c6(0x19b),..._0x436c6e[_0x2b44c6(0x221)]?{'remark':_0x436c6e[_0x2b44c6(0x221)]}:{}}});return _0x18cfef[_0x2b44c6(0x1ef)];}export async function updateAppRole(_0xf8d291){const _0xdc3569=a197_0x5bbb,_0x38e89d=await apiRequest(_0xdc3569(0x1a8),{'method':'POST','body':{'id':_0xf8d291['id'],'appCode':_0xf8d291[_0xdc3569(0x1e4)],..._0xf8d291['roleType']?{'roleType':_0xf8d291['roleType']}:{},..._0xf8d291['roleName']!==undefined?{'roleName':_0xf8d291[_0xdc3569(0x1a6)]}:{},..._0xf8d291['remark']!==undefined?{'remark':_0xf8d291[_0xdc3569(0x221)]}:{},..._0xf8d291['permits']?{'permits':_0xf8d291[_0xdc3569(0x1c8)]}:{}}});return _0x38e89d['data'];}export async function deleteAppRole(_0x202f61){const _0x3e2e91=a197_0x5bbb;await apiRequest(_0x3e2e91(0x1b3),{'method':'POST','body':{'id':_0x202f61}});}export async function listPermitRoles(_0x266908,_0x3657bc){const _0xcdb959=a197_0x5bbb,_0x3e7d47=await apiRequest(_0xcdb959(0x24c),{'method':_0xcdb959(0x1ec),'body':{'appCode':_0x266908,..._0x3657bc?.[_0xcdb959(0x1a7)]!==undefined?{'needSelf':_0x3657bc[_0xcdb959(0x1a7)]}:{},..._0x3657bc?.[_0xcdb959(0x224)]!==undefined?{'needPublic':_0x3657bc[_0xcdb959(0x224)]}:{}}});return extractList(_0x3e7d47['data']);}export async function getRoleMenuResources(_0x3b8dc4,_0x43d71f){const _0x15850a=a197_0x5bbb,_0x362172=await apiRequest('/smartapi/permit/resource/get-menu-list',{'method':_0x15850a(0x1ec),'body':{'appCode':_0x3b8dc4,'roleId':_0x43d71f}});return extractList(_0x362172['data']);}export async function getRoleApiResources(_0x428ed3,_0x461bfd){const _0x5d8acb=a197_0x5bbb,_0x2f25fe=await apiRequest(_0x5d8acb(0x180),{'method':'POST','body':{'appCode':_0x428ed3,'roleId':_0x461bfd}});return extractList(_0x2f25fe['data']);}export async function listRoleUsers(_0x551e16){const _0x27e276=a197_0x5bbb,_0x58c208=await apiRequest(_0x27e276(0x211),{'method':_0x27e276(0x1ec),'body':{'appCode':_0x551e16}});return extractList(_0x58c208[_0x27e276(0x1ef)]);}export async function updateRoleUsers(_0x3af755,_0x421564){const _0x4fc4cd=a197_0x5bbb;await apiRequest('/smartapi/permit/user-role/update-user-list',{'method':_0x4fc4cd(0x1ec),'body':{'appCode':_0x3af755,'roleList':_0x421564}});}export async function getPagePermit(_0x1f280e){const _0x1459c8=a197_0x5bbb,_0x43f61e=await apiRequest(_0x1459c8(0x1d2)+buildQuery({'menuId':_0x1f280e}));return _0x43f61e['data'];}export async function savePagePermit(_0x2a8de5){const _0x2567d0=a197_0x5bbb,_0x89d873=await apiRequest(_0x2567d0(0x1e1),{'method':_0x2567d0(0x1ec),'body':_0x2a8de5});return _0x89d873[_0x2567d0(0x1ef)];}export async function getTenantMembers(_0x4a695a){const _0x2255b7=a197_0x5bbb,_0x4c7164=await apiRequest('/userTenant/getByTenantCode'+buildQuery({'code':_0x4a695a})),_0xea670e=_0x4c7164[_0x2255b7(0x1ef)]??{},_0x280b97=Array[_0x2255b7(0x1b9)](_0xea670e?.['userTenantRelationList'])?_0xea670e[_0x2255b7(0x1e0)]:[];return _0x280b97[_0x2255b7(0x237)](_0x2622a6=>_0x2622a6?.[_0x2255b7(0x186)]===_0x2255b7(0x1bc)||_0x2622a6?.['status']===undefined)[_0x2255b7(0x1fb)](_0x37c2d3=>({'userId':Number(_0x37c2d3['userId']??_0x37c2d3['id']),'username':_0x37c2d3[_0x2255b7(0x1c2)],'nickname':_0x37c2d3[_0x2255b7(0x21b)],'status':_0x37c2d3[_0x2255b7(0x186)],'email':_0x37c2d3['email'],'mobile':_0x37c2d3['mobile'],'avatar':_0x37c2d3[_0x2255b7(0x231)]}))[_0x2255b7(0x237)](_0xe444cc=>Number[_0x2255b7(0x21a)](_0xe444cc[_0x2255b7(0x165)])&&_0xe444cc['userId']>0x0);}
1
+ (function(_0x244e45,_0x153b77){const _0x5e4727=a198_0x42d3,_0x37864a=_0x244e45();while(!![]){try{const _0x5f17fa=-parseInt(_0x5e4727(0x1a1))/0x1+parseInt(_0x5e4727(0x1d0))/0x2*(parseInt(_0x5e4727(0x13b))/0x3)+parseInt(_0x5e4727(0x135))/0x4+-parseInt(_0x5e4727(0x179))/0x5*(-parseInt(_0x5e4727(0x188))/0x6)+-parseInt(_0x5e4727(0xfc))/0x7*(-parseInt(_0x5e4727(0x173))/0x8)+-parseInt(_0x5e4727(0x183))/0x9+-parseInt(_0x5e4727(0x169))/0xa;if(_0x5f17fa===_0x153b77)break;else _0x37864a['push'](_0x37864a['shift']());}catch(_0xda691b){_0x37864a['push'](_0x37864a['shift']());}}}(a198_0x3464,0xbb42d));import{readFile}from'node:fs/promises';import{basename}from'node:path';import{getCookie}from'../auth/get-cookie.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{getEnv}from'../constant/env.js';import{CliError,CliErrors}from'../errors.js';import{extractList,extractPaging}from'../framework/response.js';import{normalizeEntityWithIdResponse}from'../utils/entity-with-id.js';import{logger}from'../utils/logger.js';let _activeCookie;export function setActiveCookie(_0x26fd76){_activeCookie=_0x26fd76||undefined;}export function clearActiveCookie(){_activeCookie=undefined;}const DEFAULT_REQUEST_TIMEOUT_MS=0x7530,ER_CONFIG_REQUEST_TIMEOUT_MS=0x1d4c0,TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS=0x2bf20;function createFetchFailureError(_0x4ebe30,_0x30f9fa){const _0x2e141d=a198_0x42d3,_0x49f355=_0x30f9fa instanceof Error?_0x30f9fa[_0x2e141d(0x137)]:String(_0x30f9fa);return CliErrors[_0x2e141d(0x1b8)]('Request\x20failed:\x20'+_0x4ebe30+(_0x49f355?'\x20('+_0x49f355+')':''),'Check\x20network\x20connectivity\x20and\x20try\x20again.');}async function apiRequest(_0x520a80,_0x489785={}){const _0xdf65c9=a198_0x42d3,{method:method=_0xdf65c9(0x1a8),body:_0x32890e,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![],allowNonJsonSuccess:allowNonJsonSuccess=![]}=_0x489785,_0x21eb3b=useRuntime?getRuntimeDomain():getApiDomain(),_0x1b22fd=_activeCookie||getCookie(),_0x48dd58=''+_0x21eb3b+_0x520a80,_0x52e0da=new AbortController(),_0x80ceb8=setTimeout(()=>_0x52e0da[_0xdf65c9(0x10d)](),timeout);try{const _0x44d526=await fetch(_0x48dd58,{'method':method,'headers':{'Content-Type':_0xdf65c9(0x17c),'Cookie':_0x1b22fd,'X-Invoke-Source':_0xdf65c9(0x1d8),...headers},'body':_0x32890e?JSON[_0xdf65c9(0x187)](_0x32890e):undefined,'signal':_0x52e0da['signal']});let _0xc2c830;try{_0xc2c830=await _0x44d526[_0xdf65c9(0x100)]();}catch(_0x2a37ae){if(_0x2a37ae instanceof Error&&_0x2a37ae[_0xdf65c9(0x146)]===_0xdf65c9(0x161))throw CliErrors[_0xdf65c9(0x1b8)](_0xdf65c9(0x114)+_0x48dd58);if(_0x44d526['ok']&&allowNonJsonSuccess)return{'success':!![],'data':undefined};throw CliErrors[_0xdf65c9(0x1b8)](_0xdf65c9(0x123)+_0x44d526['status']+')',_0x44d526[_0xdf65c9(0x162)]>=0x190?_0xdf65c9(0x1cf):undefined);}if(!_0x44d526['ok']||_0xc2c830[_0xdf65c9(0x125)]===![])throw CliErrors[_0xdf65c9(0x1b8)](_0xc2c830[_0xdf65c9(0x11c)]||_0xc2c830['message']||_0xdf65c9(0x133)+_0x44d526[_0xdf65c9(0x162)],_0xc2c830[_0xdf65c9(0x1c2)]?_0xdf65c9(0x16b)+_0xc2c830[_0xdf65c9(0x1c2)]:undefined);return _0xc2c830;}catch(_0x338a75){if(_0x338a75 instanceof CliError)throw _0x338a75;if(_0x338a75 instanceof Error&&_0x338a75[_0xdf65c9(0x146)]===_0xdf65c9(0x161))throw CliErrors[_0xdf65c9(0x1b8)]('Request\x20timeout:\x20'+_0x48dd58);throw createFetchFailureError(_0x48dd58,_0x338a75);}finally{clearTimeout(_0x80ceb8);}}async function apiFormRequest(_0x14aa17,_0x354aa8,_0x4a3d52={}){const _0x51f700=a198_0x42d3,{timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS}=_0x4a3d52,_0x29b903=_activeCookie||getCookie(),_0x2575d7=''+getApiDomain()+_0x14aa17,_0x4c3403=new AbortController(),_0x1eaf87=setTimeout(()=>_0x4c3403[_0x51f700(0x10d)](),timeout);try{const _0x107ebb=await fetch(_0x2575d7,{'method':_0x51f700(0x165),'headers':{'Cookie':_0x29b903,'X-Invoke-Source':'cli:rabetbase'},'body':_0x354aa8,'signal':_0x4c3403[_0x51f700(0x19a)]});let _0x12e1d6;try{_0x12e1d6=await _0x107ebb[_0x51f700(0x100)]();}catch(_0x4434f7){if(_0x4434f7 instanceof Error&&_0x4434f7[_0x51f700(0x146)]==='AbortError')throw CliErrors[_0x51f700(0x1b8)](_0x51f700(0x114)+_0x2575d7);throw CliErrors[_0x51f700(0x1b8)]('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x107ebb['status']+')',_0x107ebb[_0x51f700(0x162)]>=0x190?_0x51f700(0x1cf):undefined);}if(!_0x107ebb['ok']||_0x12e1d6[_0x51f700(0x125)]===![])throw CliErrors['apiError'](_0x12e1d6[_0x51f700(0x11c)]||_0x12e1d6[_0x51f700(0x137)]||_0x51f700(0x133)+_0x107ebb[_0x51f700(0x162)],_0x12e1d6[_0x51f700(0x1c2)]?_0x51f700(0x16b)+_0x12e1d6[_0x51f700(0x1c2)]:undefined);return _0x12e1d6;}catch(_0x1fa22f){if(_0x1fa22f instanceof CliError)throw _0x1fa22f;if(_0x1fa22f instanceof Error&&_0x1fa22f[_0x51f700(0x146)]===_0x51f700(0x161))throw CliErrors[_0x51f700(0x1b8)](_0x51f700(0x114)+_0x2575d7);throw createFetchFailureError(_0x2575d7,_0x1fa22f);}finally{clearTimeout(_0x1eaf87);}}export async function uploadDevelopmentFile(_0x406c93,_0x5c6b38){const _0xaa8f93=a198_0x42d3,_0x5caea1=await readFile(_0x5c6b38),_0x386c13=new FormData();_0x386c13[_0xaa8f93(0x17f)]('appCode',_0x406c93),_0x386c13['append'](_0xaa8f93(0x10c),new Blob([new Uint8Array(_0x5caea1)]),basename(_0x5c6b38));const _0x2191f8=await apiFormRequest('/smartapi/common/uploadFile',_0x386c13);return _0x2191f8[_0xaa8f93(0xf9)];}export async function queryDevelopmentFileUrl(_0x5463e3,_0x281e2e={}){const _0x9643aa=a198_0x42d3,_0x3bfd05=await apiRequest(_0x9643aa(0x12e),{'method':'POST','body':{'filePath':_0x5463e3,'downloadFlag':_0x281e2e[_0x9643aa(0x110)]??![],..._0x281e2e[_0x9643aa(0x122)]?{'longTerm':!![]}:{}}});return _0x3bfd05[_0x9643aa(0xf9)];}function isAuthFailure(_0x496a78){const _0x560d03=a198_0x42d3,_0x1b281f=_0x496a78['errorMsg']||_0x496a78[_0x560d03(0x137)]||_0x496a78['data']?.[_0x560d03(0x137)]||_0x496a78[_0x560d03(0x1a2)]||_0x496a78['error']||'';return _0x496a78[_0x560d03(0x1c2)]===_0x560d03(0x1d7)||_0x496a78[_0x560d03(0x118)]===0x191||_0x496a78[_0x560d03(0x118)]===_0x560d03(0x120)||_0x1b281f[_0x560d03(0x16d)](_0x560d03(0x120))||_0x1b281f[_0x560d03(0x16d)](_0x560d03(0xfe))||_0x1b281f['includes']('登录')||_0x1b281f[_0x560d03(0x16d)]('认证');}export async function platformFetch(_0x3b8e67,_0x3fcb49){const _0x57e16c=a198_0x42d3;let _0x56d641;try{_0x56d641=await fetch(_0x3b8e67,{'method':_0x3fcb49[_0x57e16c(0x1c4)]??_0x57e16c(0x1a8),'headers':{'Content-Type':_0x57e16c(0x17c),'Cookie':_0x3fcb49[_0x57e16c(0x18c)],'X-Invoke-Source':'cli:rabetbase'},..._0x3fcb49[_0x57e16c(0x18a)]&&{'body':JSON[_0x57e16c(0x187)](_0x3fcb49[_0x57e16c(0x18a)])}});}catch(_0x507297){throw createFetchFailureError(_0x3b8e67,_0x507297);}if(!_0x56d641['ok']){if(_0x56d641['status']===0x191)throw CliErrors['authRequired']();throw CliErrors[_0x57e16c(0x1b8)](_0x3fcb49[_0x57e16c(0x11e)]+_0x57e16c(0x105)+_0x56d641['status']);}const _0x56ae95=await _0x56d641[_0x57e16c(0x100)]();if(_0x56ae95['success']===![]){if(isAuthFailure(_0x56ae95))throw CliErrors[_0x57e16c(0x144)]();throw CliErrors[_0x57e16c(0x1b8)](_0x56ae95[_0x57e16c(0x11c)]||_0x56ae95[_0x57e16c(0x137)]||_0x3fcb49[_0x57e16c(0x11e)]+_0x57e16c(0x18b));}return _0x56ae95[_0x57e16c(0xf9)];}export async function platformRequest(_0x1bd513,_0x210996){const _0x29f5d3=a198_0x42d3;if(/^https?:\/\//i['test'](_0x1bd513))throw CliErrors[_0x29f5d3(0x107)]('platformRequest\x20expects\x20an\x20API\x20path,\x20got\x20absolute\x20URL:\x20'+_0x1bd513,_0x29f5d3(0x1d1));const _0x4cf639=_0x1bd513['startsWith']('/')?_0x1bd513:'/'+_0x1bd513;return platformFetch(''+getApiDomain()+_0x4cf639,_0x210996);}function cleanNewlines(_0x24ca18){const _0x440bbd=a198_0x42d3;return _0x24ca18[_0x440bbd(0x15c)](/[\r\n]+/g,'\x20')['trim']();}function cleanDatasetName(_0x1db50a){const _0x52db55=a198_0x42d3;if(!_0x1db50a[_0x52db55(0x146)])return _0x1db50a;return{..._0x1db50a,'name':cleanNewlines(_0x1db50a[_0x52db55(0x146)])};}export async function fetchModelList(_0x9ceadd,_0x5c4a55){const _0x438cbc=a198_0x42d3,_0x3fbd88=getEnv(),_0x258eb8=new URLSearchParams({'appcode':_0x9ceadd,'otype':_0x438cbc(0x138)}),_0x1c326e='/api/node-toolbox/dataset/model-list?'+_0x258eb8[_0x438cbc(0x14d)]();logger[_0x438cbc(0x174)]('fetch-model-list',_0x438cbc(0x1c1)+_0x3fbd88+')',{'apiPath':_0x1c326e});const _0x3e7bf2=await platformRequest(_0x1c326e,{'cookie':_0x5c4a55,'label':_0x438cbc(0x12c)}),_0x4c0adf=(_0x3e7bf2['configArray']??[])['map'](cleanDatasetName);return{'configArray':_0x4c0adf,'count':_0x4c0adf[_0x438cbc(0x1c7)]};}export async function fetchDatasetDoc(_0x1efd1c){const _0x5102c8=a198_0x42d3,{appCode:_0xe55ed5,cookie:_0x3ea436,datasetCode:_0x486f5f,datasetId:_0x106f3b,extraParams:_0x62b2fe}=_0x1efd1c,_0x4515e4=await platformRequest(_0x5102c8(0x1ba),{'method':'POST','body':{'appCode':_0xe55ed5,'datasetCode':_0x486f5f,'datasetId':_0x106f3b,..._0x62b2fe||{}},'cookie':_0x3ea436,'label':_0x5102c8(0x119)+_0x486f5f+')'});if(!_0x4515e4||typeof _0x4515e4['markdown']!==_0x5102c8(0x140))throw new Error(_0x5102c8(0x1c6)+_0x486f5f+_0x5102c8(0xf6));return _0x4515e4[_0x5102c8(0x184)];}export async function getMenuTree(_0x5e6ef5,_0x459729){const _0x25dc9a=a198_0x42d3,_0xa9c7e6=new URLSearchParams({'appCode':_0x5e6ef5});return platformRequest('/smartapi/menu/find?'+_0xa9c7e6['toString'](),{'cookie':_0x459729,'label':_0x25dc9a(0x1ca)});}export async function createMenuRecord(_0x2c8b2e,_0x536e4d,_0x1ed6a0){const _0x2d76d2=a198_0x42d3;return platformRequest(_0x2d76d2(0x1a4),{'method':_0x2d76d2(0x165),'body':_0x2c8b2e,'cookie':_0x536e4d,'label':_0x1ed6a0});}export async function updateMenuRecord(_0x5bf32f,_0x4ed34c,_0x24da46){const _0x230058=a198_0x42d3;return platformRequest(_0x230058(0x1bb),{'method':_0x230058(0x165),'body':_0x5bf32f,'cookie':_0x4ed34c,'label':_0x24da46});}function a198_0x42d3(_0x1be1a6,_0x33dd9e){_0x1be1a6=_0x1be1a6-0xf4;const _0x3464e3=a198_0x3464();let _0x42d3aa=_0x3464e3[_0x1be1a6];return _0x42d3aa;}export async function deleteMenuRecord(_0xb655fc,_0x3ffc4f,_0x137157){const _0x3956ae=a198_0x42d3;return platformRequest('/smartapi/menu/delete',{'method':_0x3956ae(0x165),'body':{'id':_0xb655fc},'cookie':_0x3ffc4f,'label':_0x137157});}export async function batchDeleteMenuRecords(_0x509eaf,_0x11e43d,_0x105f6d){const _0x3ce1e0=a198_0x42d3;return platformRequest(_0x3ce1e0(0x14e),{'method':_0x3ce1e0(0x165),'body':{'idList':_0x509eaf},'cookie':_0x11e43d,'label':_0x105f6d});}export async function startMenuRegroup(_0x4768fe,_0x5aaf6d,_0xba98d5){return platformRequest('/smartapi/menu/regroup',{'method':'POST','body':_0x4768fe,'cookie':_0x5aaf6d,'label':_0xba98d5});}export async function getAsyncTaskStatus(_0x4635b9,_0x1aa994,_0x42c442){const _0x4bc909=a198_0x42d3,_0x3b2d8e=new URLSearchParams({'appCode':_0x1aa994});return platformRequest(_0x4bc909(0x152)+encodeURIComponent(_0x4635b9)+'?'+_0x3b2d8e['toString'](),{'cookie':_0x42c442,'label':'Fetch\x20async\x20task\x20'+_0x4635b9});}export async function listBffScripts(_0x3853ec,_0xc78ac,_0x2eee5b){const _0x33a1a5=a198_0x42d3;let _0x21dd1d=_0x33a1a5(0x197)+_0x3853ec;if(_0xc78ac)_0x21dd1d+=_0x33a1a5(0xfd)+_0xc78ac;const _0x272b0d=await apiRequest(_0x21dd1d);let _0x10cd2b=extractList(_0x272b0d['data']);if(_0x2eee5b?.['scriptName']){const _0x125090=_0x2eee5b[_0x33a1a5(0x167)][_0x33a1a5(0x1aa)]();_0x10cd2b=_0x10cd2b[_0x33a1a5(0x10a)](_0x14b25c=>_0x14b25c[_0x33a1a5(0x10e)]?.[_0x33a1a5(0x1aa)]()['includes'](_0x125090)||_0x14b25c['description']?.['toLowerCase']()[_0x33a1a5(0x16d)](_0x125090));}return _0x10cd2b;}export async function getBffScriptInfo(_0x395519){const _0x2421ad=a198_0x42d3,_0x2a9318=await apiRequest(_0x2421ad(0x1c8)+_0x395519);if(!_0x2a9318[_0x2421ad(0xf9)])throw CliErrors[_0x2421ad(0x107)]('BFF\x20script\x20not\x20found:\x20id='+_0x395519);return _0x2a9318[_0x2421ad(0xf9)];}export async function saveBffScript(_0x41f2a1){const _0x4d2e40=a198_0x42d3,_0x1668e5=await apiRequest(_0x4d2e40(0x18f),{'method':_0x4d2e40(0x165),'body':_0x41f2a1}),{id:_0x3e293f,entity:_0x5c71d3}=normalizeEntityWithIdResponse(_0x1668e5['data']);if(_0x3e293f!==undefined){const _0x54953a=typeof _0x5c71d3[_0x4d2e40(0x10e)]===_0x4d2e40(0x140)||typeof _0x5c71d3[_0x4d2e40(0x12a)]===_0x4d2e40(0x140)?_0x5c71d3:undefined;return{'id':_0x3e293f,'script':_0x54953a};}throw CliErrors[_0x4d2e40(0x1b8)]('BFF\x20save\x20returned\x20no\x20valid\x20id');}function a198_0x3464(){const _0x24abc1=['/smartapi/dataset/text-generate/start','type','/smartapi/dataset/get-dataset-list','datasetTableCount','AbortError','status','avatar','/smartapi/question/er-config/cli/update-single','POST','.filter({','scriptName','const\x20result\x20=\x20await\x20client.models.','16632020sAsqEK','object','API\x20error\x20code:\x20','?sqlCode=','includes','/smartapi/permit/role/get-permit-list','version','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','ENABLE','/smartapi/custom/updateUserCustomSql','112Nvahml','info','join','permits','/smartapi/db-analysis/start','getOne','572765UdyDhK','/smartapi/dataset/text-generate/preview','/notification/channel-config/list','application/json','/smartapi/permit/role/delete','/smartapi/permit/resource/get-menu-list','append','sqlCode','dbId','remark','5318433rtwofR','markdown','pageSize','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','stringify','12vCnlmN','modelCode','body','\x20failed','cookie','\x20\x20currentPage:\x201,','tableName','/api/management/library/scripts/save','description','});','/smartapi/permit/user-role/get-user-list','/smartapi/dataset/delete-dataset','/smartapi/db-analysis/status/','/smartapi/lovrabet/update-page','CUSTOM','/api/management/library/scripts/list?appCode=','requestFields','(/*\x20params\x20*/);','signal','enabled','\x20\x20sqlCode:\x20\x27','/smartapi/dblink/getOne','needSelf','tableList','userTenantRelationList','654396fIwpEy','errorMessage','pageIndex','/smartapi/menu/create','summary','\x20\x20where:\x20{},','responseFields','GET','modelId','toLowerCase','remove','/smartapi/app/getList','list','username','/smartapi/app-config/getByKey','set','has','/smartapi/dataset/update-driven-data','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','userId','isFinite','Page\x20not\x20found:\x20','.update(id,\x20{\x20/*\x20fields\x20*/\x20});','apiError','dbtableConfig','/api/node-toolbox/api-doc-generator','/smartapi/menu/update','/smartapi/question/er-config/business-group/edit','/filter','.create({\x20/*\x20fields\x20*/\x20});','delete','totalCount','正在从服务器拉取模型列表...\x20(环境:\x20','errorCode','/smartapi/app-config/create','method','SQL\x20query\x20not\x20found:\x20id=','Invalid\x20response\x20format\x20(','length','/api/management/library/scripts/info?id=','/smartapi/custom/saveUserCustomSql','Fetch\x20menu\x20list','/smartapi/permit/role/get-list','relation','/smartapi/custom/queryUserCustomSqlList','SQL\x20query\x20not\x20found:\x20','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','577502KxHLlq','Use\x20platformFetch\x20only\x20for\x20legacy\x20absolute-URL\x20calls.','/smartapi/question/er-config/cli/detail?','mobile','/standard-page-status?appCode=','path','if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);','UNAUTHORIZED','cli:rabetbase','\x20\x20});','clientOperationId','):\x20missing\x20data.markdown\x20field','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','/smartapi/app-config/list','data','datasetName','/smartapi/custom/getUserCustomSql?id=','328622SUsXSc','&type=','Unauthorized','/api/custom/executeSql','json','email','/api/management/library/scripts/delete','/sync-to-pages','.getOne(id);','\x20failed,\x20HTTP\x20','displayName','validation','/smartapi/permit/page/get-one','/generate-standard-pages/start','filter','api_error','file','abort','functionName','find','download','\x20of\x20','/smartapi/custom/getUserCustomSql','tableData','Request\x20timeout:\x20','add','needPublic','roleType','code','Fetch\x20doc\x20(','DATA_NOT_EXIST','\x20\x20pageSize:\x2020,','errorMsg','\x22\x20not\x20found\x20in\x20dataset\x20','label','/smartapi/db-analysis/jobs/cancel','401','//\x20SQL:\x20','longTerm','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','ER\x20relation\x20does\x20not\x20exist','success','sqlName','operations','/smartapi/question/er-config/cli/erCreate','max','scriptType','Dataset\x20not\x20found:\x20','Fetch\x20datasets','map','/smartapi/common/queryFileUrl','/smartapi/lovrabet/dataset/','\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({','tags','/smartapi/question/er-config/cli/delete-single','API\x20error:\x20','/smartapi/custom/deleteUserCustomSql','5381804eWnmVp','operationId','message','array','roleName','isArray','15zVKEwL','/smartapi/permit/role/create','hint','min','deleted','string','sdk','test','appCode','authRequired','requirementDescription','name','value','\x20\x20return\x20rows;','table','key','/generate-standard-pages/status?','dataset_','toString','/smartapi/menu/batchDelete','/api/','/smartapi/permit/role/update','entries','/smartapi/tasks/','Warning:\x20showing\x20first\x20','/smartapi/dblink/delete','/smartapi/dblink/getAllTableList','/smartapi/dblink/getTableDiffV2ByPage','Use\x20the\x20platform\x20console\x20to\x20see\x20all.','//\x20','operationName','push','/api/management/script/cache/clear','replace'];a198_0x3464=function(){return _0x24abc1;};return a198_0x3464();}export async function deleteBffScript(_0x29562c){const _0x378df3=a198_0x42d3;await apiRequest(_0x378df3(0x102),{'method':_0x378df3(0x165),'body':{'id':_0x29562c}});}export async function getBffScriptStatistics(_0xf71835){const _0x56670d=a198_0x42d3,_0x5a6540=await apiRequest('/api/management/library/scripts/statistics?appCode='+_0xf71835);return extractList(_0x5a6540[_0x56670d(0xf9)]);}export async function clearBffScriptCache(){const _0x247673=a198_0x42d3,_0x3e4845=await apiRequest(_0x247673(0x15b),{'method':_0x247673(0x165),'useRuntime':!![]});return typeof _0x3e4845['data']==='string'?_0x3e4845[_0x247673(0xf9)]:'';}export async function listBffDatasetOperations(_0x4a587d,_0x1ce8be){const _0xdb33a3=await apiRequest('/smartapi/dataset/get-dataset-operation',{'method':'POST','body':{'appCode':_0x4a587d,'datasetId':_0x1ce8be}});return _0xdb33a3['data'];}export async function listSqlQueries(_0x2ed29e,_0x5a9e04){const _0x1647d9=a198_0x42d3,_0x204a73=await apiRequest(_0x1647d9(0x1cd),{'method':_0x1647d9(0x165),'body':{'appCode':_0x2ed29e,'currentPage':_0x5a9e04?.['currentPage']??0x1,'pageSize':_0x5a9e04?.[_0x1647d9(0x185)]??0x32,'sqlCode':_0x5a9e04?.[_0x1647d9(0x180)],'sqlName':_0x5a9e04?.[_0x1647d9(0x126)]}});return _0x204a73[_0x1647d9(0xf9)];}export async function getSqlQueryInfo(_0x3bf6f9,_0x811297){const _0x348e6e=a198_0x42d3,_0xbedfcc=await listSqlQueries(_0x3bf6f9,{'sqlCode':_0x811297}),_0x1f17f0=_0xbedfcc[_0x348e6e(0x113)]?.[0x0];if(!_0x1f17f0)throw CliErrors[_0x348e6e(0x107)](_0x348e6e(0x1ce)+_0x811297);return _0x1f17f0;}export async function getSqlQueryDetail(_0x4b2c3c){const _0xd31da8=a198_0x42d3,_0x5d3907=await apiRequest(_0xd31da8(0x112)+(_0xd31da8(0x16c)+encodeURIComponent(_0x4b2c3c)));if(!_0x5d3907[_0xd31da8(0xf9)])throw CliErrors[_0xd31da8(0x107)]('SQL\x20query\x20not\x20found:\x20'+_0x4b2c3c);return _0x5d3907[_0xd31da8(0xf9)];}export async function getSqlQueryDetailById(_0x36b073){const _0x4055fc=a198_0x42d3,_0xcd84e5=await apiRequest(_0x4055fc(0xfb)+_0x36b073);if(!_0xcd84e5[_0x4055fc(0xf9)])throw CliErrors[_0x4055fc(0x107)](_0x4055fc(0x1c5)+_0x36b073);return _0xcd84e5[_0x4055fc(0xf9)];}export async function createSqlQuery(_0x241a24){const _0x980fa9=a198_0x42d3,_0x41aff6=await apiRequest(_0x980fa9(0x1c9),{'method':'POST','body':_0x241a24}),{id:_0x2e5085,entity:_0x1afd45}=normalizeEntityWithIdResponse(_0x41aff6[_0x980fa9(0xf9)]);if(!(_0x980fa9(0x180)in _0x1afd45)&&_0x2e5085)return getSqlQueryDetailById(_0x2e5085);return normalizeSqlQueryEntity(_0x1afd45);}export async function updateSqlQuery(_0x2c829e){const _0x31f138=a198_0x42d3,_0x47467a=await apiRequest(_0x31f138(0x172),{'method':_0x31f138(0x165),'body':_0x2c829e}),{id:_0x48b9cc,entity:_0x3394a1}=normalizeEntityWithIdResponse(_0x47467a[_0x31f138(0xf9)]);if(!(_0x31f138(0x180)in _0x3394a1)){if(_0x2c829e[_0x31f138(0x180)])return getSqlQueryDetail(_0x2c829e[_0x31f138(0x180)]);if(_0x48b9cc)return getSqlQueryDetailById(_0x48b9cc);}return normalizeSqlQueryEntity(_0x3394a1);}export async function deleteSqlQuery(_0x83749a){const _0x3b52b0=a198_0x42d3;await apiRequest(_0x3b52b0(0x134),{'method':_0x3b52b0(0x165),'body':_0x83749a});}export async function saveSqlQuery(_0x3a1f7e){const _0x46c445=a198_0x42d3,_0xc0047a=await apiRequest('/api/node-toolbox/sql/save',{'method':_0x46c445(0x165),'body':_0x3a1f7e});return _0xc0047a[_0x46c445(0xf9)];}function normalizeSqlQueryEntity(_0x2b488d){const _0x5bbcd7=a198_0x42d3;return{..._0x2b488d,'id':Number(_0x2b488d['id']),'dbId':_0x2b488d[_0x5bbcd7(0x181)]==null?undefined:Number(_0x2b488d[_0x5bbcd7(0x181)]),'version':_0x2b488d[_0x5bbcd7(0x16f)]==null?undefined:Number(_0x2b488d[_0x5bbcd7(0x16f)])};}export async function executeSql(_0x112045,_0x5144ca,_0x21c386){const _0x41a483=a198_0x42d3,_0x4b3fce=await apiRequest(_0x41a483(0xff),{'method':_0x41a483(0x165),'body':{'appCode':_0x112045,'sqlCode':_0x5144ca,..._0x21c386&&{'params':_0x21c386}},'useRuntime':!![]});return _0x4b3fce[_0x41a483(0xf9)];}export async function executeDatasetDataOperation(_0x1441e6,_0x3b4210,_0x339a7b,_0x3af4bb={}){const _0x3045b3=a198_0x42d3;try{const _0x4004b0=await apiRequest(_0x3045b3(0x14f)+_0x1441e6+'/'+_0x3b4210+'/'+_0x339a7b,{'method':_0x3045b3(0x165),'body':_0x3af4bb,'useRuntime':!![]});return _0x4004b0[_0x3045b3(0xf9)];}catch(_0x158e25){if(_0x339a7b===_0x3045b3(0x178)&&_0x158e25 instanceof CliError&&_0x158e25[_0x3045b3(0x118)]===_0x3045b3(0x10b)&&_0x3af4bb['id']!==undefined&&_0x3af4bb['id']!==null&&_0x3af4bb['id']!==''){const _0x3e2668=await apiRequest(_0x3045b3(0x14f)+_0x1441e6+'/'+_0x3b4210+_0x3045b3(0x1bd),{'method':_0x3045b3(0x165),'body':{'where':{'id':{'$eq':_0x3af4bb['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0x131467=Array[_0x3045b3(0x13a)](_0x3e2668[_0x3045b3(0xf9)]?.[_0x3045b3(0x113)])?_0x3e2668[_0x3045b3(0xf9)][_0x3045b3(0x113)]:[];return _0x131467[0x0]??null;}throw _0x158e25;}}export async function listDatasets(_0x20454e,_0x330597){const _0x4de41d=a198_0x42d3,_0x18cfee={'appCode':_0x20454e,'deleted':_0x330597?.[_0x4de41d(0x13f)]??![]};if(_0x330597?.[_0x4de41d(0x118)])_0x18cfee[_0x4de41d(0x118)]=_0x330597[_0x4de41d(0x118)];if(_0x330597?.[_0x4de41d(0x146)])_0x18cfee[_0x4de41d(0x146)]=_0x330597[_0x4de41d(0x146)];const _0x2d52fd=await apiRequest(_0x4de41d(0x15f),{'method':_0x4de41d(0x165),'body':_0x18cfee});return extractList(_0x2d52fd['data']);}export async function deleteDataset(_0x2b24ef,_0x1a1699){const _0xf5b0cd=a198_0x42d3;await apiRequest(_0xf5b0cd(0x193),{'method':_0xf5b0cd(0x165),'body':{'appCode':_0x2b24ef,'datasetId':_0x1a1699}});}export async function restoreDataset(_0x3c9392,_0x14f6df){const _0x27472d=a198_0x42d3;await apiRequest('/smartapi/dataset/restore-dataset',{'method':_0x27472d(0x165),'body':{'appCode':_0x3c9392,'datasetId':_0x14f6df}});}export async function previewTextGeneratedDataset(_0x423f26,_0x2779d5){const _0x333c77=a198_0x42d3,_0x260aa2=await apiRequest(_0x333c77(0x17a),{'method':_0x333c77(0x165),'body':{'appCode':_0x423f26,'datasetName':_0x2779d5[_0x333c77(0xfa)],'requirementDescription':_0x2779d5[_0x333c77(0x145)]},'timeout':TEXT_GENERATED_DATASET_PREVIEW_TIMEOUT_MS});return _0x260aa2[_0x333c77(0xf9)];}export async function startTextGeneratedDataset(_0x115130,_0x54f942,_0x329d4a){const _0x3c9b31=a198_0x42d3,_0x470f78=await apiRequest(_0x3c9b31(0x15d),{'method':'POST','body':{'appCode':_0x115130,..._0x329d4a?.[_0x3c9b31(0xf5)]?{'clientOperationId':_0x329d4a[_0x3c9b31(0xf5)]}:{},'design':_0x54f942},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x470f78[_0x3c9b31(0xf9)];}export async function getTextGeneratedDatasetStatus(_0x1921db,_0x179162){const _0x36ff22=a198_0x42d3,_0x494ec6=new URLSearchParams({'appCode':_0x1921db});_0x179162['operationId']&&_0x494ec6['set'](_0x36ff22(0x136),_0x179162[_0x36ff22(0x136)]);_0x179162[_0x36ff22(0xf5)]&&_0x494ec6[_0x36ff22(0x1b0)](_0x36ff22(0xf5),_0x179162[_0x36ff22(0xf5)]);const _0x1be9b3=await apiRequest('/smartapi/dataset/text-generate/status?'+_0x494ec6['toString']());return _0x1be9b3[_0x36ff22(0xf9)];}export async function searchDatasets(_0x3efa17,_0x83a674){const _0x2d589b=a198_0x42d3,_0x580098=await listDatasets(_0x3efa17,{'name':_0x83a674}),_0x10efb8=_0x83a674[_0x2d589b(0x1aa)](),_0x3812b4=new Set(_0x580098[_0x2d589b(0x12d)](_0x4f0184=>_0x4f0184['id'])),_0x5a225b=_0x580098['filter'](_0x1277a6=>_0x1277a6[_0x2d589b(0x1b9)]?.[_0x2d589b(0x18e)]?.['toLowerCase']()[_0x2d589b(0x16d)](_0x10efb8)||_0x1277a6[_0x2d589b(0x190)]?.[_0x2d589b(0x1aa)]()[_0x2d589b(0x16d)](_0x10efb8)),_0x1d14e6=await listDatasets(_0x3efa17,{'code':_0x83a674});for(const _0x323116 of _0x1d14e6){!_0x3812b4[_0x2d589b(0x1b1)](_0x323116['id'])&&(_0x580098[_0x2d589b(0x15a)](_0x323116),_0x3812b4[_0x2d589b(0x115)](_0x323116['id']));}return _0x580098;}export function normalizeDatasetOperations(_0x129ed6){const _0x20d613=a198_0x42d3;if(Array['isArray'](_0x129ed6))return _0x129ed6[_0x20d613(0x10a)](_0x3655ac=>_0x3655ac!=null&&typeof _0x3655ac===_0x20d613(0x16a));if(_0x129ed6&&typeof _0x129ed6===_0x20d613(0x16a))return Object['entries'](_0x129ed6)[_0x20d613(0x10a)](([,_0x51ee5a])=>_0x51ee5a!=null&&typeof _0x51ee5a===_0x20d613(0x16a))[_0x20d613(0x12d)](([_0x60c9ee,_0x5f395b])=>({..._0x5f395b,'name':_0x5f395b[_0x20d613(0x146)]??_0x5f395b[_0x20d613(0x159)]??_0x60c9ee}));return[];}export async function getDatasetDetail(_0x51c753){const _0x535592=a198_0x42d3,_0x3ee21e=/^\d+$/[_0x535592(0x142)](_0x51c753)?'id':_0x535592(0x118),_0x2c28c5=await apiRequest('/smartapi/dataset/get-driven-data?'+_0x3ee21e+'='+_0x51c753);return _0x2c28c5['data'];}export async function updateDrivenData(_0x379f16){const _0x577d34=a198_0x42d3,_0xc3acd7=await apiRequest(_0x577d34(0x1b2),{'method':_0x577d34(0x165),'body':_0x379f16});return _0xc3acd7[_0x577d34(0xf9)];}export async function getDatasetOperations(_0x74b32c){const _0x4efd4e=a198_0x42d3,_0x42bc87=await getDatasetDetail(_0x74b32c),_0xc7fca7=normalizeDatasetOperations(_0x42bc87[_0x4efd4e(0x127)])[_0x4efd4e(0x12d)](_0x2e6ef3=>({'name':_0x2e6ef3[_0x4efd4e(0x146)]||_0x2e6ef3[_0x4efd4e(0x159)],'displayName':_0x2e6ef3[_0x4efd4e(0x106)]||_0x2e6ef3['name'],'type':_0x2e6ef3[_0x4efd4e(0x15e)],'method':_0x2e6ef3[_0x4efd4e(0x1c4)],'path':_0x2e6ef3[_0x4efd4e(0x1d5)],'enabled':_0x2e6ef3[_0x4efd4e(0x19b)]??!![],'requestFields':_0x2e6ef3[_0x4efd4e(0x198)],'responseFields':_0x2e6ef3[_0x4efd4e(0x1a7)]}));return{'dataset':{'id':_0x42bc87['id']??_0x42bc87[_0x4efd4e(0x1a9)],'name':_0x42bc87[_0x4efd4e(0x146)],'code':_0x42bc87[_0x4efd4e(0x118)]||_0x42bc87[_0x4efd4e(0x189)],'tableName':_0x42bc87[_0x4efd4e(0x18e)]||_0x42bc87['dbtableConfig']?.[_0x4efd4e(0x18e)]},'operations':_0xc7fca7};}export async function getOperationDetail(_0x17aabc,_0x360f67,_0x26b1e5){const _0x43f727=a198_0x42d3;let _0x56378e=_0x360f67;if(!/^\d+$/[_0x43f727(0x142)](_0x360f67)){const _0x20fd3a=await listDatasets(_0x17aabc,{'code':_0x360f67}),_0x58c932=_0x20fd3a[_0x43f727(0x10f)](_0x40e7a8=>_0x40e7a8[_0x43f727(0x118)]===_0x360f67||String(_0x40e7a8['id'])===_0x360f67);if(!_0x58c932)throw CliErrors[_0x43f727(0x107)](_0x43f727(0x12b)+_0x360f67);_0x56378e=String(_0x58c932['id']);}const _0x5263ee=await getDatasetDetail(_0x56378e),_0x4b13fa=normalizeDatasetOperations(_0x5263ee[_0x43f727(0x127)])[_0x43f727(0x10f)](_0x28c0ee=>(_0x28c0ee[_0x43f727(0x146)]||_0x28c0ee[_0x43f727(0x159)])===_0x26b1e5);if(!_0x4b13fa)throw CliErrors[_0x43f727(0x107)]('Operation\x20\x22'+_0x26b1e5+_0x43f727(0x11d)+_0x360f67);return{'dataset':{'id':_0x5263ee['id']??_0x5263ee[_0x43f727(0x1a9)],'name':_0x5263ee[_0x43f727(0x146)],'code':_0x5263ee[_0x43f727(0x118)]||_0x5263ee['modelCode'],'tableName':_0x5263ee[_0x43f727(0x18e)]||_0x5263ee[_0x43f727(0x1b9)]?.[_0x43f727(0x18e)]},'operation':_0x4b13fa};}export async function startGenerateStandardPages(_0x207812,_0x4fb898,_0x442862){const _0x295c9e=a198_0x42d3,_0x2b1566=await apiRequest(_0x295c9e(0x12f)+_0x4fb898+_0x295c9e(0x109),{'method':_0x295c9e(0x165),'body':{'appCode':_0x207812,..._0x442862?.[_0x295c9e(0xf5)]?{'clientOperationId':_0x442862[_0x295c9e(0xf5)]}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x2b1566['data'];}export async function getGenerateStandardPagesStatus(_0x311dd3,_0x37deca,_0x5d84f3){const _0x143eec=a198_0x42d3,_0x310ae3=new URLSearchParams({'appCode':_0x311dd3});_0x5d84f3[_0x143eec(0x136)]&&_0x310ae3[_0x143eec(0x1b0)](_0x143eec(0x136),_0x5d84f3['operationId']);_0x5d84f3[_0x143eec(0xf5)]&&_0x310ae3[_0x143eec(0x1b0)](_0x143eec(0xf5),_0x5d84f3[_0x143eec(0xf5)]);const _0x362078=await apiRequest(_0x143eec(0x12f)+_0x37deca+_0x143eec(0x14b)+_0x310ae3['toString']());return _0x362078['data'];}export async function getStandardPageStatus(_0x2d73e9,_0x3d268b){const _0x3027a1=a198_0x42d3,_0x38013c=await apiRequest(_0x3027a1(0x12f)+_0x3d268b+_0x3027a1(0x1d4)+encodeURIComponent(_0x2d73e9));return _0x38013c[_0x3027a1(0xf9)];}export async function tryGetStandardPageStatus(_0x184170,_0xff4e81){const _0x51011e=a198_0x42d3;try{return await getStandardPageStatus(_0x184170,_0xff4e81);}catch(_0x3ca30e){if(_0x3ca30e instanceof CliError&&_0x3ca30e[_0x51011e(0x118)]===_0x51011e(0x10b)&&/404|not found|non-json response/i[_0x51011e(0x142)](_0x3ca30e[_0x51011e(0x137)]))return null;throw _0x3ca30e;}}export async function syncStandardPages(_0x967d6d,_0x304113){const _0x56d586=a198_0x42d3,_0x238f45=await apiRequest(_0x56d586(0x12f)+_0x304113+_0x56d586(0x103),{'method':_0x56d586(0x165),'body':{'appCode':_0x967d6d}});return _0x238f45[_0x56d586(0xf9)];}export async function getPageDetail(_0x135aff){const _0x3e38f2=a198_0x42d3,_0x51a545=await apiRequest('/smartapi/lovrabet/detail?pageId='+_0x135aff);if(!_0x51a545['data'])throw CliErrors[_0x3e38f2(0x107)](_0x3e38f2(0x1b6)+_0x135aff);return _0x51a545[_0x3e38f2(0xf9)];}export async function updatePage(_0x52352c,_0x4044ac,_0x17ba89,_0x5a3636){const _0x1fd21e=a198_0x42d3,_0x51744b=await apiRequest(_0x1fd21e(0x195),{'method':_0x1fd21e(0x165),'body':{'appCode':_0x52352c,'pageId':_0x4044ac,'code':_0x17ba89,'datasetIds':_0x5a3636}});return _0x51744b[_0x1fd21e(0xf9)];}export function generateSdkCode(_0x1d2792,_0x4691be,_0xb216d9){const _0x507f83=a198_0x42d3,_0x56a547=_0xb216d9?.['includeImports']??!![],_0x4cc5dc=_0x507f83(0x14c)+_0x1d2792[_0x507f83(0x118)]?.['replace'](/-/g,'_'),_0x3f0139=_0x4691be[_0x507f83(0x146)]||_0x4691be['operationName']||_0x507f83(0x10a),_0x5e3146=[];_0x56a547&&_0x5e3146['push'](_0x507f83(0xf7),'','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','');_0x5e3146[_0x507f83(0x15a)](_0x507f83(0x158)+_0x1d2792[_0x507f83(0x146)]+'\x20('+(_0x1d2792[_0x507f83(0x18e)]||_0x507f83(0x149))+')');if(_0x3f0139===_0x507f83(0x10a))_0x5e3146['push'](_0x507f83(0x168)+_0x4cc5dc+_0x507f83(0x166),_0x507f83(0x1a6),_0x507f83(0x11b),_0x507f83(0x18d),'});');else{if(_0x3f0139===_0x507f83(0x178))_0x5e3146[_0x507f83(0x15a)](_0x507f83(0x168)+_0x4cc5dc+_0x507f83(0x104));else{if(_0x3f0139==='create')_0x5e3146['push']('const\x20result\x20=\x20await\x20client.models.'+_0x4cc5dc+_0x507f83(0x1be));else{if(_0x3f0139==='update')_0x5e3146[_0x507f83(0x15a)](_0x507f83(0x168)+_0x4cc5dc+_0x507f83(0x1b7));else _0x3f0139===_0x507f83(0x1bf)||_0x3f0139===_0x507f83(0x1ab)?_0x5e3146[_0x507f83(0x15a)]('const\x20result\x20=\x20await\x20client.models.'+_0x4cc5dc+'.remove(id);'):_0x5e3146[_0x507f83(0x15a)](_0x507f83(0x168)+_0x4cc5dc+'.'+_0x3f0139+_0x507f83(0x199));}}}return _0x5e3146['join']('\x0a');}export function generateSqlCodeTemplate(_0xbca9d6,_0x28a169){const _0x5804f1=a198_0x42d3,_0x13b73d=_0x28a169?.['target']??'sdk',_0x67c275=_0x28a169?.['includeImports']??!![],_0xa32d96=[];return _0xa32d96['push'](_0x5804f1(0x121)+_0xbca9d6['sqlName']+'\x20('+_0xbca9d6[_0x5804f1(0x180)]+')'),_0x13b73d===_0x5804f1(0x141)?(_0x67c275&&_0xa32d96[_0x5804f1(0x15a)](_0x5804f1(0xf7),'',_0x5804f1(0x170),''),_0xa32d96[_0x5804f1(0x15a)]('const\x20data\x20=\x20await\x20client.sql.execute({',_0x5804f1(0x19c)+_0xbca9d6[_0x5804f1(0x180)]+'\x27,',_0x5804f1(0x186),_0x5804f1(0x191),_0x5804f1(0x1d6),'const\x20results\x20=\x20data.execResult\x20||\x20[];')):_0xa32d96[_0x5804f1(0x15a)]('//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly','export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{',_0x5804f1(0x130),'\x20\x20\x20\x20sqlCode:\x20\x27'+_0xbca9d6[_0x5804f1(0x180)]+'\x27,',_0x5804f1(0x1b3),_0x5804f1(0xf4),_0x5804f1(0x148),'}'),_0xa32d96[_0x5804f1(0x175)]('\x0a');}export async function getErConfig(_0x1c613c,_0x1f53b0){const _0x1f2a52=a198_0x42d3,_0x1b2ea9=await apiRequest('/smartapi/question/er-config',{'method':'POST','body':{'appCode':_0x1c613c,'dblinkId':_0x1f53b0},'timeout':ER_CONFIG_REQUEST_TIMEOUT_MS});return _0x1b2ea9[_0x1f2a52(0xf9)];}export async function getErRelationDetail(_0x2a8f7e,_0x5e473f){const _0x553ba8=a198_0x42d3,_0x31bfd6=new URLSearchParams({'appCode':_0x2a8f7e,'relationId':String(_0x5e473f)});try{const _0x133e3b=await apiRequest(_0x553ba8(0x1d2)+_0x31bfd6[_0x553ba8(0x14d)]());return _0x133e3b[_0x553ba8(0xf9)]?.[_0x553ba8(0x1cc)]??null;}catch(_0x459008){if(_0x459008 instanceof CliError&&_0x459008[_0x553ba8(0x118)]===_0x553ba8(0x10b)&&(_0x459008['hint']?.[_0x553ba8(0x16d)](_0x553ba8(0x11a))||_0x459008[_0x553ba8(0x13d)]==='API\x20error\x20code:\x20306'&&_0x459008[_0x553ba8(0x137)]===_0x553ba8(0x124)))return null;throw _0x459008;}}export async function createErRelation(_0x44bd69){const _0x18e0d7=a198_0x42d3,_0xef1b9=await apiRequest(_0x18e0d7(0x128),{'method':_0x18e0d7(0x165),'body':_0x44bd69,'allowNonJsonSuccess':!![]});return _0xef1b9[_0x18e0d7(0xf9)];}export async function updateErRelation(_0x40eb2b){const _0x51cb1b=a198_0x42d3,_0x11c1ef=await apiRequest(_0x51cb1b(0x164),{'method':_0x51cb1b(0x165),'body':_0x40eb2b,'allowNonJsonSuccess':!![]});return _0x11c1ef[_0x51cb1b(0xf9)];}export async function deleteErRelation(_0x49bfcf){const _0x206426=a198_0x42d3,_0x257e3f=await apiRequest(_0x206426(0x132),{'method':_0x206426(0x165),'body':_0x49bfcf,'allowNonJsonSuccess':!![]});return _0x257e3f[_0x206426(0xf9)];}export async function updateErBusinessGroup(_0x1a05f0){const _0x3965b5=a198_0x42d3,_0x38d42b=await apiRequest(_0x3965b5(0x1bc),{'method':_0x3965b5(0x165),'body':_0x1a05f0,'allowNonJsonSuccess':!![]});return _0x38d42b[_0x3965b5(0xf9)];}function buildQuery(_0x156e87){const _0x2e572b=a198_0x42d3,_0x1ba649=new URLSearchParams();for(const [_0x7142f0,_0x3e098a]of Object[_0x2e572b(0x151)](_0x156e87)){if(_0x3e098a===undefined||_0x3e098a==='')continue;_0x1ba649[_0x2e572b(0x1b0)](_0x7142f0,String(_0x3e098a));}const _0x2c460d=_0x1ba649[_0x2e572b(0x14d)]();return _0x2c460d?'?'+_0x2c460d:'';}export async function listNotificationChannelConfigs(_0x4d79c2,_0x189216){const _0x47e4c0=a198_0x42d3,_0x2cf777=await apiRequest(_0x47e4c0(0x17b)+buildQuery({'appCode':_0x4d79c2,'channelType':_0x189216}));return Array[_0x47e4c0(0x13a)](_0x2cf777[_0x47e4c0(0xf9)])?_0x2cf777[_0x47e4c0(0xf9)]:[];}export async function listAppConfigs(_0x53b159,_0x528b65){const _0x4fe7bc=a198_0x42d3,_0x13219b=await apiRequest(_0x4fe7bc(0xf8),{'method':_0x4fe7bc(0x165),'body':{'appCode':_0x53b159,..._0x528b65?.[_0x4fe7bc(0x14a)]?{'key':_0x528b65[_0x4fe7bc(0x14a)]}:{},..._0x528b65?.[_0x4fe7bc(0x131)]?{'tags':_0x528b65['tags']}:{}}});return extractAppConfigList(_0x13219b[_0x4fe7bc(0xf9)]);}export async function getAppConfigByKey(_0x2094eb,_0x4b8724){const _0x35d463=a198_0x42d3,_0xd85556=await apiRequest(_0x35d463(0x1af)+buildQuery({'appCode':_0x2094eb,'key':_0x4b8724}));return _0xd85556[_0x35d463(0xf9)]??null;}export async function createAppConfig(_0x392f28){const _0x87c5bc=a198_0x42d3,_0x16421c=await apiRequest(_0x87c5bc(0x1c3),{'method':_0x87c5bc(0x165),'body':{'appCode':_0x392f28[_0x87c5bc(0x143)],'key':_0x392f28[_0x87c5bc(0x14a)],'value':_0x392f28[_0x87c5bc(0x147)],..._0x392f28[_0x87c5bc(0x131)]?{'tags':_0x392f28[_0x87c5bc(0x131)]}:{}}});return _0x16421c[_0x87c5bc(0xf9)];}export async function updateAppConfig(_0xb7a66b){const _0x2299e6=a198_0x42d3;await apiRequest('/smartapi/app-config/update',{'method':_0x2299e6(0x165),'body':{'id':_0xb7a66b['id'],'appCode':_0xb7a66b[_0x2299e6(0x143)],'key':_0xb7a66b[_0x2299e6(0x14a)],'value':_0xb7a66b[_0x2299e6(0x147)],..._0xb7a66b[_0x2299e6(0x131)]?{'tags':_0xb7a66b[_0x2299e6(0x131)]}:{}}});}export async function deleteAppConfig(_0xd3eac0){const _0x7865f3=a198_0x42d3;await apiRequest('/smartapi/app-config/delete',{'method':_0x7865f3(0x165),'body':_0xd3eac0});}function extractAppConfigList(_0x43f287){const _0x48bb80=a198_0x42d3;if(Array['isArray'](_0x43f287))return _0x43f287;if(_0x43f287&&typeof _0x43f287===_0x48bb80(0x16a)&&Array[_0x48bb80(0x13a)](_0x43f287['list']))return _0x43f287[_0x48bb80(0x1ad)];return extractList(_0x43f287);}export async function listDbLinks(_0xeb572c,_0x3251af){const _0x1e754f=a198_0x42d3,_0x165bed=await apiRequest('/smartapi/dblink/getList',{'method':_0x1e754f(0x165),'body':{'appCode':_0xeb572c,'currentPage':_0x3251af?.['currentPage']??0x1,'pageSize':_0x3251af?.['pageSize']??0x64}});return{'items':extractList(_0x165bed[_0x1e754f(0xf9)]),'paging':extractPaging(_0x165bed[_0x1e754f(0xf9)])};}export async function getDbLinkInfo(_0x176f94){const _0x379c21=a198_0x42d3,_0x3db815=await apiRequest(_0x379c21(0x19d)+buildQuery({'id':_0x176f94}));return _0x3db815[_0x379c21(0xf9)];}export async function createDbLink(_0x11b87e){const _0x165498=a198_0x42d3,_0x287338=await apiRequest('/smartapi/dblink/create',{'method':_0x165498(0x165),'body':_0x11b87e});return _0x287338[_0x165498(0xf9)];}export async function updateDbLink(_0x2b0846){const _0x12f03e=a198_0x42d3,_0x3962cf=await apiRequest('/smartapi/dblink/update',{'method':_0x12f03e(0x165),'body':_0x2b0846});return _0x3962cf[_0x12f03e(0xf9)];}export async function deleteDbLink(_0x1b7669){const _0x2054dc=a198_0x42d3;await apiRequest(_0x2054dc(0x154),{'method':'POST','body':{'id':_0x1b7669}});}export async function testDbLinkConnect(_0x454596){const _0x55bf61=a198_0x42d3,_0x3df695=await apiRequest('/smartapi/dblink/testConnect'+buildQuery({'id':_0x454596}));return _0x3df695[_0x55bf61(0xf9)];}export async function startDbAnalysis(_0x337309,_0x587731){const _0x4e7a91=a198_0x42d3,_0x3d2290=await apiRequest(_0x4e7a91(0x177),{'method':_0x4e7a91(0x165),'body':{'dbLinkId':_0x337309,..._0x587731&&_0x587731[_0x4e7a91(0x1c7)]>0x0?{'tableNames':_0x587731}:{}}});return _0x3d2290[_0x4e7a91(0xf9)];}export async function cancelDbAnalysis(_0x37ec83){const _0x252499=a198_0x42d3;await apiRequest(_0x252499(0x11f)+buildQuery({'planId':_0x37ec83}),{'method':_0x252499(0x165)});}export async function getDbAnalysisStatus(_0x3346f2){const _0x268063=a198_0x42d3,_0x26831c=await apiRequest(_0x268063(0x194)+encodeURIComponent(_0x3346f2));return _0x26831c[_0x268063(0xf9)];}export async function getDbAllTableList(_0x42a111,_0x592b91){const _0x3fd83c=a198_0x42d3,_0x5edfc3=await apiRequest(_0x3fd83c(0x155)+buildQuery({'appCode':_0x42a111,'dbLinkId':_0x592b91})),_0x327a32=_0x5edfc3[_0x3fd83c(0xf9)];if(Array[_0x3fd83c(0x13a)](_0x327a32))return _0x327a32;return extractList(_0x327a32);}export async function getDbTableDiff(_0x12c386,_0x252730,_0x3baaff){const _0x3460ca=a198_0x42d3,_0x328d41=await apiRequest(_0x3460ca(0x156)+buildQuery({'appCode':_0x12c386,'dbLinkId':_0x252730,'pageIndex':_0x3baaff?.[_0x3460ca(0x1a3)]??0x1,'pageSize':_0x3baaff?.[_0x3460ca(0x185)]??0x14,'tableName':_0x3baaff?.['tableName']})),_0x2ad220=_0x328d41[_0x3460ca(0xf9)];return{'totalCount':_0x2ad220?.[_0x3460ca(0x1c0)]??0x0,'physicalTableCount':_0x2ad220?.['physicalTableCount']??0x0,'datasetTableCount':_0x2ad220?.[_0x3460ca(0x160)]??0x0,..._0x2ad220?.[_0x3460ca(0x1a5)]?{'summary':_0x2ad220[_0x3460ca(0x1a5)]}:{},'tableList':Array[_0x3460ca(0x13a)](_0x2ad220?.['tableList'])?_0x2ad220[_0x3460ca(0x19f)]:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0x33b469=a198_0x42d3,_0x3089a0=await apiRequest(_0x33b469(0x1ac),{'method':_0x33b469(0x165),'body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0xb9da1c=extractList(_0x3089a0[_0x33b469(0xf9)]),_0x5972dc=extractPaging(_0x3089a0['data']);return _0x5972dc&&_0x5972dc['totalCount']>REMOTE_APP_PAGE_SIZE&&console['warn'](_0x33b469(0x153)+REMOTE_APP_PAGE_SIZE+_0x33b469(0x111)+_0x5972dc[_0x33b469(0x1c0)]+'\x20apps.\x20'+_0x33b469(0x157)),_0xb9da1c;}const APP_ROLE_PAGE_SIZE_MAX=0x64;export async function listAppRoles(_0x327703,_0x4ee246){const _0x515a55=a198_0x42d3,_0x4dcf8a=Math[_0x515a55(0x13e)](Math[_0x515a55(0x129)](_0x4ee246?.[_0x515a55(0x185)]??APP_ROLE_PAGE_SIZE_MAX,0x1),APP_ROLE_PAGE_SIZE_MAX),_0xaf7077=await apiRequest(_0x515a55(0x1cb),{'method':'POST','body':{'appCode':_0x327703,'currentPage':_0x4ee246?.['currentPage']??0x1,'pageSize':_0x4dcf8a}});return{'items':extractList(_0xaf7077['data']),'paging':extractPaging(_0xaf7077[_0x515a55(0xf9)])};}export async function getAppRole(_0x3ee6a9){const _0x243119=a198_0x42d3,_0xcdf7f9=await apiRequest('/smartapi/permit/role/get-one'+buildQuery({'id':_0x3ee6a9}));return _0xcdf7f9[_0x243119(0xf9)];}export async function createAppRole(_0x2542d7){const _0x4188db=a198_0x42d3,_0x399eb1=await apiRequest(_0x4188db(0x13c),{'method':_0x4188db(0x165),'body':{'appCode':_0x2542d7[_0x4188db(0x143)],'roleName':_0x2542d7['roleName'],'roleType':_0x4188db(0x196),..._0x2542d7[_0x4188db(0x182)]?{'remark':_0x2542d7[_0x4188db(0x182)]}:{}}});return _0x399eb1[_0x4188db(0xf9)];}export async function updateAppRole(_0xceb8ae){const _0x371e53=a198_0x42d3,_0x23961a=await apiRequest(_0x371e53(0x150),{'method':_0x371e53(0x165),'body':{'id':_0xceb8ae['id'],'appCode':_0xceb8ae[_0x371e53(0x143)],..._0xceb8ae['roleType']?{'roleType':_0xceb8ae[_0x371e53(0x117)]}:{},..._0xceb8ae[_0x371e53(0x139)]!==undefined?{'roleName':_0xceb8ae[_0x371e53(0x139)]}:{},..._0xceb8ae[_0x371e53(0x182)]!==undefined?{'remark':_0xceb8ae['remark']}:{},..._0xceb8ae[_0x371e53(0x176)]?{'permits':_0xceb8ae[_0x371e53(0x176)]}:{}}});return _0x23961a['data'];}export async function deleteAppRole(_0x48207f){const _0x173de1=a198_0x42d3;await apiRequest(_0x173de1(0x17d),{'method':_0x173de1(0x165),'body':{'id':_0x48207f}});}export async function listPermitRoles(_0x1d71a0,_0x115262){const _0x3d7e24=a198_0x42d3,_0x381b79=await apiRequest(_0x3d7e24(0x16e),{'method':_0x3d7e24(0x165),'body':{'appCode':_0x1d71a0,..._0x115262?.[_0x3d7e24(0x19e)]!==undefined?{'needSelf':_0x115262['needSelf']}:{},..._0x115262?.[_0x3d7e24(0x116)]!==undefined?{'needPublic':_0x115262['needPublic']}:{}}});return extractList(_0x381b79[_0x3d7e24(0xf9)]);}export async function getRoleMenuResources(_0x51c16b,_0x5093b1){const _0x49983f=a198_0x42d3,_0x1868be=await apiRequest(_0x49983f(0x17e),{'method':_0x49983f(0x165),'body':{'appCode':_0x51c16b,'roleId':_0x5093b1}});return extractList(_0x1868be[_0x49983f(0xf9)]);}export async function getRoleApiResources(_0x47b455,_0x30d939){const _0x27718b=a198_0x42d3,_0xe6c05f=await apiRequest('/smartapi/permit/resource/get-api-list',{'method':_0x27718b(0x165),'body':{'appCode':_0x47b455,'roleId':_0x30d939}});return extractList(_0xe6c05f[_0x27718b(0xf9)]);}export async function listRoleUsers(_0x4e07e6){const _0x1e2f3e=a198_0x42d3,_0x518363=await apiRequest(_0x1e2f3e(0x192),{'method':'POST','body':{'appCode':_0x4e07e6}});return extractList(_0x518363[_0x1e2f3e(0xf9)]);}export async function updateRoleUsers(_0x3a6a3d,_0xc242d9){await apiRequest('/smartapi/permit/user-role/update-user-list',{'method':'POST','body':{'appCode':_0x3a6a3d,'roleList':_0xc242d9}});}export async function getPagePermit(_0x25ccca){const _0x1a0c4a=a198_0x42d3,_0x520213=await apiRequest(_0x1a0c4a(0x108)+buildQuery({'menuId':_0x25ccca}));return _0x520213[_0x1a0c4a(0xf9)];}export async function savePagePermit(_0x486998){const _0x45a869=a198_0x42d3,_0x380dac=await apiRequest('/smartapi/permit/page/save',{'method':'POST','body':_0x486998});return _0x380dac[_0x45a869(0xf9)];}export async function getTenantMembers(_0x283196){const _0x34de96=a198_0x42d3,_0x17da68=await apiRequest('/userTenant/getByTenantCode'+buildQuery({'code':_0x283196})),_0x3e3bd0=_0x17da68[_0x34de96(0xf9)]??{},_0xbc42b1=Array[_0x34de96(0x13a)](_0x3e3bd0?.[_0x34de96(0x1a0)])?_0x3e3bd0[_0x34de96(0x1a0)]:[];return _0xbc42b1[_0x34de96(0x10a)](_0x1b3327=>_0x1b3327?.[_0x34de96(0x162)]===_0x34de96(0x171)||_0x1b3327?.[_0x34de96(0x162)]===undefined)[_0x34de96(0x12d)](_0x36f45b=>({'userId':Number(_0x36f45b[_0x34de96(0x1b4)]??_0x36f45b['id']),'username':_0x36f45b[_0x34de96(0x1ae)],'nickname':_0x36f45b['nickname'],'status':_0x36f45b[_0x34de96(0x162)],'email':_0x36f45b[_0x34de96(0x101)],'mobile':_0x36f45b[_0x34de96(0x1d3)],'avatar':_0x36f45b[_0x34de96(0x163)]}))['filter'](_0x691c89=>Number[_0x34de96(0x1b5)](_0x691c89['userId'])&&_0x691c89[_0x34de96(0x1b4)]>0x0);}
@@ -1 +1 @@
1
- const a198_0x51555a=a198_0x1050;(function(_0x42e475,_0x4bdd9b){const _0x3b20c3=a198_0x1050,_0x577542=_0x42e475();while(!![]){try{const _0x5efc1f=parseInt(_0x3b20c3(0x76))/0x1*(parseInt(_0x3b20c3(0x7b))/0x2)+-parseInt(_0x3b20c3(0x7c))/0x3+parseInt(_0x3b20c3(0x71))/0x4*(-parseInt(_0x3b20c3(0x7a))/0x5)+parseInt(_0x3b20c3(0x77))/0x6+parseInt(_0x3b20c3(0x73))/0x7+-parseInt(_0x3b20c3(0x74))/0x8+-parseInt(_0x3b20c3(0x79))/0x9;if(_0x5efc1f===_0x4bdd9b)break;else _0x577542['push'](_0x577542['shift']());}catch(_0x478d7d){_0x577542['push'](_0x577542['shift']());}}}(a198_0x1e39,0xccf2f));function a198_0x1050(_0x1dbe9f,_0x304c6c){_0x1dbe9f=_0x1dbe9f-0x71;const _0x1e3901=a198_0x1e39();let _0x1050aa=_0x1e3901[_0x1dbe9f];return _0x1050aa;}import{resolve}from'node:path';function a198_0x1e39(){const _0xe6008d=['.rabetbase','14838JcgAPM','8999586KUzFcL','/bff','3668913xFDWQZ','1434935SWvZuk','126MemLrS','156024tKjkJi','bff.lock.json','8ZxmYMr','bff-trash','2228394innOwW','7039656vHCmnF'];a198_0x1e39=function(){return _0xe6008d;};return a198_0x1e39();}import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a198_0x51555a(0x75),LOCK_FILE_NAME=a198_0x51555a(0x7d),TRASH_DIR_NAME=a198_0x51555a(0x72);export function loadBffProjectConfig(_0x2c57de,_0x520eeb){const _0x52f606=a198_0x51555a,_0x419504=resolve(_0x520eeb??findProjectRootDirectory()),_0x1c47b2=DOT_DIR+_0x52f606(0x78),_0x1642bd=_0x1c47b2+'/'+_0x2c57de;return{'projectRoot':_0x419504,'appCode':_0x2c57de,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x1c47b2,'scriptsRoot':_0x1642bd,'scriptsRootDir':resolve(_0x419504,DOT_DIR,'bff',_0x2c57de),'lockFilePath':resolve(_0x419504,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x419504,DOT_DIR,TRASH_DIR_NAME)};}
1
+ const a199_0x16ce8a=a199_0x26fa;(function(_0x43127c,_0x1c47fb){const _0x1a3ea4=a199_0x26fa,_0x5b7f0e=_0x43127c();while(!![]){try{const _0x489094=-parseInt(_0x1a3ea4(0x1d7))/0x1+-parseInt(_0x1a3ea4(0x1d6))/0x2+parseInt(_0x1a3ea4(0x1e1))/0x3*(parseInt(_0x1a3ea4(0x1dc))/0x4)+-parseInt(_0x1a3ea4(0x1d9))/0x5+parseInt(_0x1a3ea4(0x1d5))/0x6+parseInt(_0x1a3ea4(0x1da))/0x7+parseInt(_0x1a3ea4(0x1df))/0x8;if(_0x489094===_0x1c47fb)break;else _0x5b7f0e['push'](_0x5b7f0e['shift']());}catch(_0x2770fe){_0x5b7f0e['push'](_0x5b7f0e['shift']());}}}(a199_0x57d9,0xc33b0));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';function a199_0x57d9(){const _0x94253=['bff-trash','bff.lock.json','8725568YlJmSl','bff','21759rSIBXd','795000Kojosa','1166936EdubUJ','24910ewOoyS','.rabetbase','5967550bGSftL','3911369avlJfJ','/bff','452EFqneb'];a199_0x57d9=function(){return _0x94253;};return a199_0x57d9();}function a199_0x26fa(_0x166e37,_0x5eeb2a){_0x166e37=_0x166e37-0x1d5;const _0x57d9b4=a199_0x57d9();let _0x26fa3c=_0x57d9b4[_0x166e37];return _0x26fa3c;}const DOT_DIR=a199_0x16ce8a(0x1d8),LOCK_FILE_NAME=a199_0x16ce8a(0x1de),TRASH_DIR_NAME=a199_0x16ce8a(0x1dd);export function loadBffProjectConfig(_0x47ebdc,_0x1af52f){const _0x565bef=a199_0x16ce8a,_0x2485c6=resolve(_0x1af52f??findProjectRootDirectory()),_0x5b4cad=DOT_DIR+_0x565bef(0x1db),_0xd9cd25=_0x5b4cad+'/'+_0x47ebdc;return{'projectRoot':_0x2485c6,'appCode':_0x47ebdc,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x5b4cad,'scriptsRoot':_0xd9cd25,'scriptsRootDir':resolve(_0x2485c6,DOT_DIR,_0x565bef(0x1e0),_0x47ebdc),'lockFilePath':resolve(_0x2485c6,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x2485c6,DOT_DIR,TRASH_DIR_NAME)};}