@lovrabet/rabetbase-cli 2.4.3 → 2.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (381) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/members-list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app-config/delete.js +1 -1
  25. package/lib/commands/app-config/get.js +1 -1
  26. package/lib/commands/app-config/index.js +1 -1
  27. package/lib/commands/app-config/list.js +1 -1
  28. package/lib/commands/app-config/set.js +1 -1
  29. package/lib/commands/app-config/shared.js +1 -1
  30. package/lib/commands/auth/index.js +1 -1
  31. package/lib/commands/bff/create.js +1 -1
  32. package/lib/commands/bff/delete.js +1 -1
  33. package/lib/commands/bff/detail.js +1 -1
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/bff/list.js +1 -1
  36. package/lib/commands/bff/pull.js +1 -1
  37. package/lib/commands/bff/push.js +1 -1
  38. package/lib/commands/bff/status.js +1 -1
  39. package/lib/commands/cli-skill/index.js +1 -1
  40. package/lib/commands/cli-update.js +1 -1
  41. package/lib/commands/codegen/index.js +1 -1
  42. package/lib/commands/codegen/sdk.js +1 -1
  43. package/lib/commands/codegen/sql.js +1 -1
  44. package/lib/commands/common/app-registry.js +1 -1
  45. package/lib/commands/common/app-selector.js +1 -1
  46. package/lib/commands/common/async-task.js +1 -1
  47. package/lib/commands/common/dry-run.js +1 -1
  48. package/lib/commands/common/flags.js +1 -1
  49. package/lib/commands/common/local-file.js +1 -1
  50. package/lib/commands/common/validate.js +1 -1
  51. package/lib/commands/config/get.js +1 -1
  52. package/lib/commands/config/index.js +1 -1
  53. package/lib/commands/config/list.js +1 -1
  54. package/lib/commands/config/set.js +1 -1
  55. package/lib/commands/config/shared.js +1 -1
  56. package/lib/commands/data/filter.js +1 -1
  57. package/lib/commands/data/getOne.js +1 -1
  58. package/lib/commands/data/index.js +1 -1
  59. package/lib/commands/data/shared.js +1 -1
  60. package/lib/commands/dataset/business-group-update.js +1 -1
  61. package/lib/commands/dataset/capability.js +1 -1
  62. package/lib/commands/dataset/delete.js +1 -1
  63. package/lib/commands/dataset/detail.js +1 -1
  64. package/lib/commands/dataset/extend-update.js +1 -1
  65. package/lib/commands/dataset/field-update.js +1 -1
  66. package/lib/commands/dataset/generate.js +1 -1
  67. package/lib/commands/dataset/index.js +1 -1
  68. package/lib/commands/dataset/list.js +1 -1
  69. package/lib/commands/dataset/operations.js +1 -1
  70. package/lib/commands/dataset/relation-audit.js +1 -1
  71. package/lib/commands/dataset/relation-create.js +1 -1
  72. package/lib/commands/dataset/relation-delete.js +1 -1
  73. package/lib/commands/dataset/relation-shared.js +1 -1
  74. package/lib/commands/dataset/relation-update.js +1 -1
  75. package/lib/commands/dataset/relations.js +1 -1
  76. package/lib/commands/dataset/rename.js +1 -1
  77. package/lib/commands/dataset/restore.js +1 -1
  78. package/lib/commands/db/analysis-batching.js +1 -1
  79. package/lib/commands/db/analyze-batch-plan.js +1 -1
  80. package/lib/commands/db/analyze-cancel.js +1 -1
  81. package/lib/commands/db/analyze-start.js +1 -1
  82. package/lib/commands/db/analyze-status.js +1 -1
  83. package/lib/commands/db/create.js +1 -1
  84. package/lib/commands/db/delete.js +1 -1
  85. package/lib/commands/db/detail.js +1 -1
  86. package/lib/commands/db/diff-refresh-start.d.ts +2 -0
  87. package/lib/commands/db/diff-refresh-start.js +1 -0
  88. package/lib/commands/db/diff-refresh-status.d.ts +2 -0
  89. package/lib/commands/db/diff-refresh-status.js +1 -0
  90. package/lib/commands/db/diff.js +1 -1
  91. package/lib/commands/db/index.js +1 -1
  92. package/lib/commands/db/list.js +1 -1
  93. package/lib/commands/db/shared.js +1 -1
  94. package/lib/commands/db/tables.js +1 -1
  95. package/lib/commands/db/test.js +1 -1
  96. package/lib/commands/db/update.js +1 -1
  97. package/lib/commands/doctor.js +1 -1
  98. package/lib/commands/file/index.js +1 -1
  99. package/lib/commands/init/index.js +1 -1
  100. package/lib/commands/issue/index.js +1 -1
  101. package/lib/commands/issue/nudge.js +1 -1
  102. package/lib/commands/issue/report.js +1 -1
  103. package/lib/commands/issue/shared.js +1 -1
  104. package/lib/commands/kb/create.js +1 -1
  105. package/lib/commands/kb/delete.js +1 -1
  106. package/lib/commands/kb/detail.js +1 -1
  107. package/lib/commands/kb/index.js +1 -1
  108. package/lib/commands/kb/list.js +1 -1
  109. package/lib/commands/kb/shared.js +1 -1
  110. package/lib/commands/kb/update.js +1 -1
  111. package/lib/commands/logs/index.js +1 -1
  112. package/lib/commands/menu/asset-update.js +1 -1
  113. package/lib/commands/menu/delete.js +1 -1
  114. package/lib/commands/menu/external-link-create.js +1 -1
  115. package/lib/commands/menu/external-link-update.js +1 -1
  116. package/lib/commands/menu/group-create.js +1 -1
  117. package/lib/commands/menu/group-update.js +1 -1
  118. package/lib/commands/menu/index.js +1 -1
  119. package/lib/commands/menu/list.js +1 -1
  120. package/lib/commands/menu/move.js +1 -1
  121. package/lib/commands/menu/regroup-start.js +1 -1
  122. package/lib/commands/menu/rename.js +1 -1
  123. package/lib/commands/menu/shared/compare-table.js +1 -1
  124. package/lib/commands/menu/shared/delete-plan.js +1 -1
  125. package/lib/commands/menu/shared/facts.js +1 -1
  126. package/lib/commands/menu/shared/index.js +1 -1
  127. package/lib/commands/menu/shared/inquirer.js +1 -1
  128. package/lib/commands/menu/shared/local-pages.js +1 -1
  129. package/lib/commands/menu/shared/logic.js +1 -1
  130. package/lib/commands/menu/shared/mutations.js +1 -1
  131. package/lib/commands/menu/shared/service.js +1 -1
  132. package/lib/commands/menu/shared/sync-core.js +1 -1
  133. package/lib/commands/menu/shared/update-core.js +1 -1
  134. package/lib/commands/menu/shared/valid-url.js +1 -1
  135. package/lib/commands/menu/sync.js +1 -1
  136. package/lib/commands/notification/config-create.d.ts +2 -0
  137. package/lib/commands/notification/config-create.js +1 -0
  138. package/lib/commands/notification/config-delete.d.ts +2 -0
  139. package/lib/commands/notification/config-delete.js +1 -0
  140. package/lib/commands/notification/config-list.js +1 -1
  141. package/lib/commands/notification/config-update.d.ts +2 -0
  142. package/lib/commands/notification/config-update.js +1 -0
  143. package/lib/commands/notification/index.js +1 -1
  144. package/lib/commands/notification/shared.d.ts +97 -0
  145. package/lib/commands/notification/shared.js +1 -0
  146. package/lib/commands/ocr/index.js +1 -1
  147. package/lib/commands/page/generate-start.js +1 -1
  148. package/lib/commands/page/generate-status.js +1 -1
  149. package/lib/commands/page/index.js +1 -1
  150. package/lib/commands/page/pull.js +1 -1
  151. package/lib/commands/page/push.js +1 -1
  152. package/lib/commands/page/react/create.js +1 -1
  153. package/lib/commands/page/react/detail.js +1 -1
  154. package/lib/commands/page/react/list.js +1 -1
  155. package/lib/commands/page/react/publish.js +1 -1
  156. package/lib/commands/page/react/shared.js +1 -1
  157. package/lib/commands/page/react/syntax.js +1 -1
  158. package/lib/commands/page/react/template.js +1 -1
  159. package/lib/commands/page/react/update.js +1 -1
  160. package/lib/commands/page/relation-audit.js +1 -1
  161. package/lib/commands/page/restore.js +1 -1
  162. package/lib/commands/page/shared.js +1 -1
  163. package/lib/commands/page/standard-page-status.js +1 -1
  164. package/lib/commands/page/sync.js +1 -1
  165. package/lib/commands/permit/index.js +1 -1
  166. package/lib/commands/permit/page-get.js +1 -1
  167. package/lib/commands/permit/page-set.js +1 -1
  168. package/lib/commands/permit/role-apis-set.js +1 -1
  169. package/lib/commands/permit/role-menus-set.js +1 -1
  170. package/lib/commands/permit/role-menus.js +1 -1
  171. package/lib/commands/permit/shared.js +1 -1
  172. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  173. package/lib/commands/project/create/format-elapsed.js +1 -1
  174. package/lib/commands/project/create/main.d.ts +1 -0
  175. package/lib/commands/project/create/main.js +1 -1
  176. package/lib/commands/project/create/materialize-project-template.d.ts +11 -0
  177. package/lib/commands/project/create/materialize-project-template.js +1 -0
  178. package/lib/commands/project/create/project-name.d.ts +2 -0
  179. package/lib/commands/project/create/project-name.js +1 -0
  180. package/lib/commands/project/create/project-template-archive.d.ts +6 -0
  181. package/lib/commands/project/create/project-template-archive.js +1 -0
  182. package/lib/commands/project/create/project-template-path.d.ts +1 -3
  183. package/lib/commands/project/create/project-template-path.js +1 -1
  184. package/lib/commands/project/create/use-copy-project-template.d.ts +2 -1
  185. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  186. package/lib/commands/project/create/use-format-code.js +1 -1
  187. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  188. package/lib/commands/project/index.js +1 -1
  189. package/lib/commands/project/upgrade.js +1 -1
  190. package/lib/commands/registry.js +1 -1
  191. package/lib/commands/role/create.js +1 -1
  192. package/lib/commands/role/delete.js +1 -1
  193. package/lib/commands/role/detail.js +1 -1
  194. package/lib/commands/role/index.js +1 -1
  195. package/lib/commands/role/list.js +1 -1
  196. package/lib/commands/role/shared.js +1 -1
  197. package/lib/commands/role/update.js +1 -1
  198. package/lib/commands/role/user-add.js +1 -1
  199. package/lib/commands/role/user-remove.js +1 -1
  200. package/lib/commands/role/user-resolve.js +1 -1
  201. package/lib/commands/run/index.js +1 -1
  202. package/lib/commands/schema.js +1 -1
  203. package/lib/commands/sql/create.js +1 -1
  204. package/lib/commands/sql/delete.js +1 -1
  205. package/lib/commands/sql/detail.js +1 -1
  206. package/lib/commands/sql/exec.js +1 -1
  207. package/lib/commands/sql/index.js +1 -1
  208. package/lib/commands/sql/list.js +1 -1
  209. package/lib/commands/sql/pull.js +1 -1
  210. package/lib/commands/sql/push.js +1 -1
  211. package/lib/commands/sql/shared.js +1 -1
  212. package/lib/commands/sql/status.js +1 -1
  213. package/lib/commands/sql/validate.js +1 -1
  214. package/lib/commands/task/index.js +1 -1
  215. package/lib/commands/task/status.js +1 -1
  216. package/lib/commands/tenant/index.js +1 -1
  217. package/lib/commands/tenant/members-list.js +1 -1
  218. package/lib/commands/tenant/shared.js +1 -1
  219. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  220. package/lib/commands/user-account/index.js +1 -1
  221. package/lib/commands/workspace/add.js +1 -1
  222. package/lib/commands/workspace/index.js +1 -1
  223. package/lib/commands/workspace/remove.js +1 -1
  224. package/lib/config/schema.js +1 -1
  225. package/lib/constant/cdn.d.ts +2 -0
  226. package/lib/constant/cdn.js +1 -1
  227. package/lib/constant/cli.js +1 -1
  228. package/lib/constant/defaults.js +1 -1
  229. package/lib/constant/domain.js +1 -1
  230. package/lib/constant/env.js +1 -1
  231. package/lib/constant/output.js +1 -1
  232. package/lib/constant/paths.js +1 -1
  233. package/lib/constant/risk.js +1 -1
  234. package/lib/context/app-resolver.js +1 -1
  235. package/lib/context/auth-resolver.js +1 -1
  236. package/lib/context/config-loader.js +1 -1
  237. package/lib/context.d.ts +1 -1
  238. package/lib/context.js +1 -1
  239. package/lib/core/alias-resolver.js +1 -1
  240. package/lib/core/api-client.d.ts +29 -2
  241. package/lib/core/api-client.js +1 -1
  242. package/lib/core/bff/config.js +1 -1
  243. package/lib/core/bff/file-system.js +1 -1
  244. package/lib/core/bff/hash.js +1 -1
  245. package/lib/core/bff/lock.js +1 -1
  246. package/lib/core/bff/utils.js +1 -1
  247. package/lib/core/db-resolver.js +1 -1
  248. package/lib/core/page/file-system.js +1 -1
  249. package/lib/core/page/hash.js +1 -1
  250. package/lib/core/page/lock.js +1 -1
  251. package/lib/core/sql-index-auditor.js +1 -1
  252. package/lib/core/sql-sync/config.js +1 -1
  253. package/lib/core/sql-sync/file-system.js +1 -1
  254. package/lib/core/sql-sync/hash.js +1 -1
  255. package/lib/core/sql-sync/lock.js +1 -1
  256. package/lib/core/sql-sync/utils.js +1 -1
  257. package/lib/core/sql-validator.js +1 -1
  258. package/lib/errors.js +1 -1
  259. package/lib/framework/build-all-flags.js +1 -1
  260. package/lib/framework/error-output.js +1 -1
  261. package/lib/framework/explicit-yes.js +1 -1
  262. package/lib/framework/flags.js +1 -1
  263. package/lib/framework/help.js +1 -1
  264. package/lib/framework/index.js +1 -1
  265. package/lib/framework/output.js +1 -1
  266. package/lib/framework/response.js +1 -1
  267. package/lib/framework/runner-alias.js +1 -1
  268. package/lib/framework/runner.js +1 -1
  269. package/lib/framework/schema-export.js +1 -1
  270. package/lib/framework/types.js +1 -1
  271. package/lib/generated/build-info.d.ts +4 -4
  272. package/lib/generated/build-info.js +1 -1
  273. package/lib/help.js +1 -1
  274. package/lib/postinstall.js +1 -1
  275. package/lib/runtime/confirmation.js +1 -1
  276. package/lib/runtime/event.js +1 -1
  277. package/lib/runtime/index.js +1 -1
  278. package/lib/runtime/queue.js +1 -1
  279. package/lib/runtime/resolve.js +1 -1
  280. package/lib/skills/builtin-skill.js +1 -1
  281. package/lib/skills/main.js +1 -1
  282. package/lib/skills/npx-skills-add.js +1 -1
  283. package/lib/skills/skill-presence.js +1 -1
  284. package/lib/telemetry/cli-command-trace.js +1 -1
  285. package/lib/telemetry/cli-help-trace.js +1 -1
  286. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  287. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  288. package/lib/telemetry/send-cli-trace-log.js +1 -1
  289. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  290. package/lib/utils/ai_config.js +1 -1
  291. package/lib/utils/apply-jq-filter.js +1 -1
  292. package/lib/utils/cdn-config.js +1 -1
  293. package/lib/utils/check-sdk-version.js +1 -1
  294. package/lib/utils/cli-version-check.js +1 -1
  295. package/lib/utils/cli-version-policy.d.ts +13 -0
  296. package/lib/utils/cli-version-policy.js +1 -1
  297. package/lib/utils/config.js +1 -1
  298. package/lib/utils/entity-with-id.js +1 -1
  299. package/lib/utils/file-utils.js +1 -1
  300. package/lib/utils/guides-cdn.js +1 -1
  301. package/lib/utils/http-client.js +1 -1
  302. package/lib/utils/is-non-interactive.js +1 -1
  303. package/lib/utils/logger.js +1 -1
  304. package/lib/utils/params.js +1 -1
  305. package/lib/utils/platform.js +1 -1
  306. package/lib/utils/rules-cdn.js +1 -1
  307. package/lib/utils/sleep.js +1 -1
  308. package/lib/utils/template-replacer.js +1 -1
  309. package/lib/utils/update-notice.js +1 -1
  310. package/lib/utils/version.js +1 -1
  311. package/lib/utils/with-active-cookie.js +1 -1
  312. package/lib/utils/write-cli-side-channel.js +1 -1
  313. package/package.json +9 -4
  314. package/skills/rabetbase/SKILL.md +33 -22
  315. package/skills/rabetbase/guides/backend-function.md +5 -3
  316. package/skills/rabetbase/guides/bff-creation-workflow.md +2 -2
  317. package/skills/rabetbase/guides/conflict-detection.md +2 -2
  318. package/skills/rabetbase/guides/database-connection-workflow.md +39 -5
  319. package/skills/rabetbase/guides/react-custom-page-workflow.md +16 -4
  320. package/skills/rabetbase/guides/sql-creation-workflow.md +4 -2
  321. package/skills/rabetbase/guides/sql-mybatis.md +2 -2
  322. package/skills/rabetbase/knowledge/page-schema/YtPage.md +3 -37
  323. package/skills/rabetbase/knowledge/react-page/generation-standards.md +14 -3
  324. package/skills/rabetbase/references/rabetbase-app-config.md +2 -2
  325. package/skills/rabetbase/references/rabetbase-bff-push.md +4 -5
  326. package/skills/rabetbase/references/rabetbase-bff-save.md +3 -3
  327. package/skills/rabetbase/references/rabetbase-config.md +2 -2
  328. package/skills/rabetbase/references/rabetbase-db-analyze.md +2 -2
  329. package/skills/rabetbase/references/rabetbase-db-detail.md +3 -0
  330. package/skills/rabetbase/references/rabetbase-db-diff-refresh.md +53 -0
  331. package/skills/rabetbase/references/rabetbase-db-diff.md +40 -21
  332. package/skills/rabetbase/references/rabetbase-db-list.md +1 -1
  333. package/skills/rabetbase/references/rabetbase-kb.md +5 -3
  334. package/skills/rabetbase/references/rabetbase-menu-asset-update.md +9 -10
  335. package/skills/rabetbase/references/rabetbase-menu-external-link-update.md +1 -3
  336. package/skills/rabetbase/references/rabetbase-menu-regroup-start.md +2 -3
  337. package/skills/rabetbase/references/rabetbase-notification-config-list.md +2 -2
  338. package/skills/rabetbase/references/rabetbase-notification-config-mutations.md +56 -0
  339. package/skills/rabetbase/references/rabetbase-page-react-detail.md +1 -1
  340. package/skills/rabetbase/references/rabetbase-page-react-list.md +1 -1
  341. package/skills/rabetbase/references/rabetbase-page-react-publish.md +2 -2
  342. package/skills/rabetbase/references/rabetbase-project-create.md +3 -0
  343. package/skills/rabetbase/references/rabetbase-run.md +1 -1
  344. package/skills/rabetbase/references/rabetbase-sql-create.md +1 -1
  345. package/skills/rabetbase/references/rabetbase-sql-push.md +3 -4
  346. package/skills/rabetbase/references/rabetbase-user-account.md +0 -1
  347. package/skills/rabetbase.manifest.json +5 -5
  348. package/templates/README.md +14 -2
  349. package/lib/commands/project/create/non-interactive.d.ts +0 -9
  350. package/lib/commands/project/create/non-interactive.js +0 -1
  351. package/lib/utils/copy-directory.d.ts +0 -1
  352. package/lib/utils/copy-directory.js +0 -1
  353. package/skills/rabetbase/knowledge/page-schema/LrSmartEcharts.md +0 -291
  354. package/skills/rabetbase/knowledge/page-schema/LrSmartStatistic.md +0 -223
  355. package/templates/projects/sub-app-react-demo/.prettierrc +0 -1
  356. package/templates/projects/sub-app-react-demo/CHANGELOG.md +0 -67
  357. package/templates/projects/sub-app-react-demo/README.md +0 -246
  358. package/templates/projects/sub-app-react-demo/docs/quick-start.md +0 -245
  359. package/templates/projects/sub-app-react-demo/index.html +0 -27
  360. package/templates/projects/sub-app-react-demo/package.json +0 -34
  361. package/templates/projects/sub-app-react-demo/public/logo.svg +0 -1
  362. package/templates/projects/sub-app-react-demo/public/vite.svg +0 -1
  363. package/templates/projects/sub-app-react-demo/src/api/api.ts +0 -26
  364. package/templates/projects/sub-app-react-demo/src/api/client.ts +0 -32
  365. package/templates/projects/sub-app-react-demo/src/components/demo-page-container/DemoPageContainer.module.css +0 -28
  366. package/templates/projects/sub-app-react-demo/src/components/demo-page-container/DemoPageContainer.tsx +0 -55
  367. package/templates/projects/sub-app-react-demo/src/layouts/MainLayout.tsx +0 -308
  368. package/templates/projects/sub-app-react-demo/src/main.tsx +0 -52
  369. package/templates/projects/sub-app-react-demo/src/pages/dashboard/index.tsx +0 -570
  370. package/templates/projects/sub-app-react-demo/src/pages/data-screen/index.tsx +0 -531
  371. package/templates/projects/sub-app-react-demo/src/pages/index.module.css +0 -500
  372. package/templates/projects/sub-app-react-demo/src/pages/index.tsx +0 -641
  373. package/templates/projects/sub-app-react-demo/src/pages/sdk-demo/index.tsx +0 -536
  374. package/templates/projects/sub-app-react-demo/src/pages/workbench/index.module.css +0 -295
  375. package/templates/projects/sub-app-react-demo/src/pages/workbench/index.tsx +0 -242
  376. package/templates/projects/sub-app-react-demo/src/router/index.tsx +0 -30
  377. package/templates/projects/sub-app-react-demo/src/style.css +0 -108
  378. package/templates/projects/sub-app-react-demo/src/utils/api.ts +0 -12
  379. package/templates/projects/sub-app-react-demo/src/vite-env.d.ts +0 -2
  380. package/templates/projects/sub-app-react-demo/tsconfig.json +0 -26
  381. package/templates/projects/sub-app-react-demo/vite.config.ts +0 -111
@@ -1 +1 @@
1
- (function(_0x226338,_0x4f87e6){const _0x16c2b6=a213_0x574a,_0x1b775f=_0x226338();while(!![]){try{const _0x2c1912=-parseInt(_0x16c2b6(0x214))/0x1*(parseInt(_0x16c2b6(0x21b))/0x2)+parseInt(_0x16c2b6(0x21a))/0x3*(parseInt(_0x16c2b6(0x1ff))/0x4)+-parseInt(_0x16c2b6(0x200))/0x5+parseInt(_0x16c2b6(0x1fd))/0x6+-parseInt(_0x16c2b6(0x1ef))/0x7*(-parseInt(_0x16c2b6(0x1f6))/0x8)+parseInt(_0x16c2b6(0x1fa))/0x9*(parseInt(_0x16c2b6(0x203))/0xa)+-parseInt(_0x16c2b6(0x1f4))/0xb;if(_0x2c1912===_0x4f87e6)break;else _0x1b775f['push'](_0x1b775f['shift']());}catch(_0x1b1937){_0x1b775f['push'](_0x1b775f['shift']());}}}(a213_0x479c,0xe7ff8));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat,riskLevelOrder}from'../framework/types.js';function stringConfigValue(_0x63cb76){const _0x47ae22=a213_0x574a;return typeof _0x63cb76===_0x47ae22(0x212)&&_0x63cb76[_0x47ae22(0x20e)]()?_0x63cb76['trim']():undefined;}function appProfiles(_0x1787fe){const _0x30b30c=a213_0x574a;return _0x1787fe['apps']&&typeof _0x1787fe[_0x30b30c(0x208)]===_0x30b30c(0x207)?_0x1787fe[_0x30b30c(0x208)]:{};}function resolveDefaultAppName(_0x46a151){const _0x4e9933=a213_0x574a,_0x35e536=stringConfigValue(_0x46a151[_0x4e9933(0x1f5)]);if(_0x35e536)return _0x35e536;return Object['keys'](appProfiles(_0x46a151))[0x0];}function resolveTopLevelAppCode(_0x88bd8b){const _0x42e755=a213_0x574a;return stringConfigValue(_0x88bd8b['appcode'])||stringConfigValue(_0x88bd8b[_0x42e755(0x20d)]);}function normalizeRiskCeiling(_0x2bb383){const _0x21f3b9=a213_0x574a;if(_0x2bb383===undefined||_0x2bb383===null)return undefined;if(_0x2bb383==='read'||_0x2bb383===_0x21f3b9(0x20a)||_0x2bb383===_0x21f3b9(0x1f2))return _0x2bb383;return'read';}function resolveRiskCeiling(..._0x1b6d78){const _0x44a539=a213_0x574a;let _0x21452f=DEFAULT_CONFIG_VALUES[_0x44a539(0x205)];for(const _0x3984c1 of _0x1b6d78){const _0x4c9576=normalizeRiskCeiling(_0x3984c1);_0x4c9576&&riskLevelOrder(_0x4c9576)<riskLevelOrder(_0x21452f)&&(_0x21452f=_0x4c9576);}return _0x21452f;}function a213_0x479c(){const _0x1901a3=['FORMAT','locale','high-risk-write','globalConfig','28548740kwVrNH','defaultApp','12123512rgFtbN','env','call','ENV','211293wfPmkD','maxRisk','pageSize','11255838taNdLG','RISK_LEVEL','4odQyFK','7066705FiETFO','apiDir','prototype','660EAyYZw','PAGE_SIZE','riskLevel','find','object','apps','COOKIE','write','VERBOSE','cookie','app','trim','format','true','accessKey','string','hasOwnProperty','14VVbhrg','appcode','inherit','entries','APP','projectConfig','2064147petJxa','95714LUELev','keys','daily','MAX_RISK','production','7dCHZNz'];a213_0x479c=function(){return _0x1901a3;};return a213_0x479c();}function a213_0x574a(_0x31b24f,_0x1867c9){_0x31b24f=_0x31b24f-0x1ec;const _0x479cd0=a213_0x479c();let _0x574aa0=_0x479cd0[_0x31b24f];return _0x574aa0;}function configuredRiskCeilings(_0x28b1cb){const _0x5605cb=a213_0x574a;return[...Object[_0x5605cb(0x202)][_0x5605cb(0x213)][_0x5605cb(0x1f8)](_0x28b1cb,'maxRisk')?[_0x28b1cb[_0x5605cb(0x1fb)]]:[],...Object['prototype']['hasOwnProperty'][_0x5605cb(0x1f8)](_0x28b1cb,'riskLevel')?[_0x28b1cb[_0x5605cb(0x205)]]:[]];}export function resolveAppConfig({raw:_0x23a1ef,flags:_0x54a45e,layers:_0x729743,readEnv:_0x39939b}){const _0x56d013=a213_0x574a,_0x5a8dbd=_0x729743?.[_0x56d013(0x219)]??{},_0x1cb248=_0x729743?.[_0x56d013(0x1f3)]??{},_0x86d10b=Object[_0x56d013(0x21c)](_0x5a8dbd)['length']>0x0,_0x44ffd1=!_0x86d10b||_0x5a8dbd[_0x56d013(0x216)]===!![],_0x5b4083=_0x86d10b?resolveDefaultAppName(_0x5a8dbd):undefined,_0x405bba=_0x44ffd1?resolveDefaultAppName(_0x1cb248):undefined,_0x5e2690=stringConfigValue(_0x54a45e[_0x56d013(0x20d)]),_0x17b6d6=_0x39939b(_0x56d013(0x218)),_0x64bd73={};if(_0x23a1ef[_0x56d013(0x208)]&&typeof _0x23a1ef[_0x56d013(0x208)]===_0x56d013(0x207))for(const [_0x775204,_0x18f5cc]of Object['entries'](_0x23a1ef[_0x56d013(0x208)])){_0x18f5cc&&typeof _0x18f5cc===_0x56d013(0x207)&&_0x18f5cc['appcode']&&(_0x64bd73[_0x775204]=_0x18f5cc);}const _0x4cf593=_0x23a1ef['defaultApp']||undefined,_0x1fee01=Object['keys'](_0x64bd73)['length']>0x0,_0x4ae0f3=_0x5e2690||_0x5b4083||_0x17b6d6||_0x405bba||_0x4cf593||undefined,_0x552d81=stringConfigValue(_0x54a45e[_0x56d013(0x215)]),_0xe02ee7=_0x552d81?Object[_0x56d013(0x217)](_0x64bd73)[_0x56d013(0x206)](([,_0x5312e8])=>_0x5312e8?.['appcode']===_0x552d81):undefined,_0x187992=_0xe02ee7?.[0x0],_0x47421d=_0xe02ee7?.[0x1],_0x54861c=_0x552d81?_0x187992:_0x4ae0f3;let _0x430900=_0x54861c&&_0x64bd73[_0x54861c]?_0x64bd73[_0x54861c]:undefined;_0x552d81&&_0x47421d&&(_0x430900=_0x47421d);const _0x5ecfdc=_0x552d81?_0x47421d??_0x430900:_0x430900,_0x10d51a=!_0x5e2690&&!_0x5b4083&&_0x17b6d6&&_0x54861c===_0x17b6d6,_0x3079e7=_0x5e2690||(_0x10d51a?_0x17b6d6:undefined)||(_0x552d81?_0x187992:undefined),_0xfbbceb=_0x5ecfdc?.[_0x56d013(0x215)],_0x4386d4=_0x86d10b?resolveTopLevelAppCode(_0x5a8dbd):undefined,_0x1ea0a7=_0x44ffd1?resolveTopLevelAppCode(_0x1cb248):undefined,_0x22a8d5=_0x5e2690||_0x5b4083?_0xfbbceb:undefined,_0x1617fe=!_0x5e2690&&!_0x5b4083?_0xfbbceb:undefined,_0x42e066=_0x552d81||_0x22a8d5||_0x4386d4||_0x1617fe||_0x1ea0a7||undefined,_0x45decf=_0x86d10b?stringConfigValue(_0x5a8dbd[_0x56d013(0x1f7)]):undefined,_0x2403b5=_0x44ffd1?stringConfigValue(_0x1cb248[_0x56d013(0x1f7)]):undefined,_0x105d3a=_0x54a45e['env']||_0x5ecfdc?.['env']||_0x45decf||_0x39939b(_0x56d013(0x1f9))||_0x2403b5||_0x23a1ef['env']||DEFAULT_CONFIG_VALUES[_0x56d013(0x1f7)],_0x2e699b=_0x5ecfdc?.[_0x56d013(0x1f1)]||_0x23a1ef[_0x56d013(0x1f1)]||DEFAULT_CONFIG_VALUES[_0x56d013(0x1f1)],_0x517904=_0x39939b(_0x56d013(0x209))||_0x5ecfdc?.['cookie']||_0x23a1ef[_0x56d013(0x20c)]||undefined,_0x3f572a=_0x39939b('ACCESS_KEY')||_0x5ecfdc?.[_0x56d013(0x211)]||_0x23a1ef[_0x56d013(0x211)]||undefined,_0x58552b=_0x54a45e[_0x56d013(0x20f)]||_0x39939b(_0x56d013(0x1f0))||_0x5ecfdc?.['format']||_0x23a1ef[_0x56d013(0x20f)],_0x56c74a=normalizeLegacyOutputFormat(_0x58552b),_0x547a87=_0x39939b(_0x56d013(0x204))||_0x5ecfdc?.[_0x56d013(0x1fc)]||_0x23a1ef[_0x56d013(0x1fc)],_0x59f93f=_0x547a87?Number(_0x547a87)||undefined:undefined,_0x2404d2=_0x729743?[...configuredRiskCeilings(_0x729743['globalConfig']),...configuredRiskCeilings(_0x729743[_0x56d013(0x219)])]:configuredRiskCeilings(_0x23a1ef),_0x22e5af=resolveRiskCeiling(..._0x2404d2,_0x5ecfdc?.['riskLevel'],_0x39939b(_0x56d013(0x1fe)),_0x39939b(_0x56d013(0x1ed))),_0x55748d=_0x39939b(_0x56d013(0x20b)),_0x405e8e=_0x55748d==='1'||_0x55748d===_0x56d013(0x210),_0x47400c=_0x5ecfdc?.[_0x56d013(0x201)]||_0x23a1ef[_0x56d013(0x201)]||DEFAULT_CONFIG_VALUES['apiDir'],_0x463250=isDaily(normalizeEnv(String(_0x105d3a)))?_0x56d013(0x1ec):_0x56d013(0x1ee);return{'appCode':typeof _0x42e066===_0x56d013(0x212)&&_0x42e066[_0x56d013(0x20e)]()?_0x42e066['trim']():undefined,'env':_0x463250,'locale':_0x2e699b,'cookie':_0x517904,'accessKey':_0x3f572a,'format':_0x56c74a,'pageSize':_0x59f93f,'riskLevel':_0x22e5af,'verbose':_0x405e8e,'apiDir':_0x47400c,'apps':_0x64bd73,'defaultApp':_0x4cf593,'currentApp':_0x1fee01?_0x54861c:undefined,'explicitAppName':_0x3079e7};}
1
+ (function(_0x538735,_0x3a60cc){const _0x24ab71=a221_0x3f27,_0x38b0c9=_0x538735();while(!![]){try{const _0x1de17b=-parseInt(_0x24ab71(0x1ea))/0x1*(parseInt(_0x24ab71(0x1d1))/0x2)+parseInt(_0x24ab71(0x1c8))/0x3*(parseInt(_0x24ab71(0x1cc))/0x4)+-parseInt(_0x24ab71(0x1d3))/0x5*(-parseInt(_0x24ab71(0x1e6))/0x6)+parseInt(_0x24ab71(0x1e9))/0x7+-parseInt(_0x24ab71(0x1cb))/0x8+-parseInt(_0x24ab71(0x1d8))/0x9*(-parseInt(_0x24ab71(0x1d9))/0xa)+-parseInt(_0x24ab71(0x1e1))/0xb;if(_0x1de17b===_0x3a60cc)break;else _0x38b0c9['push'](_0x38b0c9['shift']());}catch(_0x50a854){_0x38b0c9['push'](_0x38b0c9['shift']());}}}(a221_0x2a8e,0xa314a));function a221_0x2a8e(){const _0xd8d370=['ENV','high-risk-write','APP','6471VclvoH','6590WgXZqa','ACCESS_KEY','env','call','find','globalConfig','daily','trim','1424214hzhreR','format','prototype','VERBOSE','maxRisk','929694QjyndE','object','hasOwnProperty','6748343jQLAsc','1HImGTW','accessKey','length','apps','riskLevel','projectConfig','keys','app','read','appcode','FORMAT','locale','3TEuXlj','inherit','apiDir','6175752xgyEAK','1448728vetLDJ','production','pageSize','write','entries','1700854kSFYfK','string','20pQafIw','defaultApp'];a221_0x2a8e=function(){return _0xd8d370;};return a221_0x2a8e();}function a221_0x3f27(_0x5a70c3,_0x161825){_0x5a70c3=_0x5a70c3-0x1bf;const _0x2a8ec8=a221_0x2a8e();let _0x3f2762=_0x2a8ec8[_0x5a70c3];return _0x3f2762;}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat,riskLevelOrder}from'../framework/types.js';function stringConfigValue(_0x25c63a){const _0x7c0b35=a221_0x3f27;return typeof _0x25c63a===_0x7c0b35(0x1d2)&&_0x25c63a[_0x7c0b35(0x1e0)]()?_0x25c63a['trim']():undefined;}function appProfiles(_0x3c8d18){const _0x41604d=a221_0x3f27;return _0x3c8d18[_0x41604d(0x1bf)]&&typeof _0x3c8d18[_0x41604d(0x1bf)]==='object'?_0x3c8d18[_0x41604d(0x1bf)]:{};}function resolveDefaultAppName(_0x280215){const _0x2a7240=a221_0x3f27,_0x25f370=stringConfigValue(_0x280215[_0x2a7240(0x1d4)]);if(_0x25f370)return _0x25f370;return Object[_0x2a7240(0x1c2)](appProfiles(_0x280215))[0x0];}function resolveTopLevelAppCode(_0x4a4434){const _0x46f271=a221_0x3f27;return stringConfigValue(_0x4a4434[_0x46f271(0x1c5)])||stringConfigValue(_0x4a4434[_0x46f271(0x1c3)]);}function normalizeRiskCeiling(_0x46332a){const _0x1722f9=a221_0x3f27;if(_0x46332a===undefined||_0x46332a===null)return undefined;if(_0x46332a===_0x1722f9(0x1c4)||_0x46332a===_0x1722f9(0x1cf)||_0x46332a===_0x1722f9(0x1d6))return _0x46332a;return _0x1722f9(0x1c4);}function resolveRiskCeiling(..._0x43836f){const _0x35fe33=a221_0x3f27;let _0x4d48ef;for(const _0x327b72 of _0x43836f){const _0x436bb0=normalizeRiskCeiling(_0x327b72);_0x436bb0&&(!_0x4d48ef||riskLevelOrder(_0x436bb0)<riskLevelOrder(_0x4d48ef))&&(_0x4d48ef=_0x436bb0);}return _0x4d48ef??DEFAULT_CONFIG_VALUES[_0x35fe33(0x1c0)];}function configuredRiskCeilings(_0x57261d){const _0x5d4b6a=a221_0x3f27;return[...Object[_0x5d4b6a(0x1e3)][_0x5d4b6a(0x1e8)][_0x5d4b6a(0x1dc)](_0x57261d,_0x5d4b6a(0x1e5))?[_0x57261d['maxRisk']]:[],...Object[_0x5d4b6a(0x1e3)][_0x5d4b6a(0x1e8)]['call'](_0x57261d,_0x5d4b6a(0x1c0))?[_0x57261d[_0x5d4b6a(0x1c0)]]:[]];}export function resolveAppConfig({raw:_0x3ff131,flags:_0x2af0c4,layers:_0x1c985f,readEnv:_0x32ff91}){const _0x16c9bf=a221_0x3f27,_0x40880d=_0x1c985f?.[_0x16c9bf(0x1c1)]??{},_0x11006f=_0x1c985f?.[_0x16c9bf(0x1de)]??{},_0x226da6=Object['keys'](_0x40880d)[_0x16c9bf(0x1ec)]>0x0,_0x97c486=!_0x226da6||_0x40880d[_0x16c9bf(0x1c9)]===!![],_0x42d08b=_0x226da6?resolveDefaultAppName(_0x40880d):undefined,_0x15c42c=_0x97c486?resolveDefaultAppName(_0x11006f):undefined,_0x3619da=stringConfigValue(_0x2af0c4[_0x16c9bf(0x1c3)]),_0x1f0e26=_0x32ff91(_0x16c9bf(0x1d7)),_0x51f25d={};if(_0x3ff131[_0x16c9bf(0x1bf)]&&typeof _0x3ff131[_0x16c9bf(0x1bf)]==='object')for(const [_0x137be3,_0x9fbca7]of Object['entries'](_0x3ff131[_0x16c9bf(0x1bf)])){_0x9fbca7&&typeof _0x9fbca7===_0x16c9bf(0x1e7)&&_0x9fbca7['appcode']&&(_0x51f25d[_0x137be3]=_0x9fbca7);}const _0x303bf3=_0x3ff131[_0x16c9bf(0x1d4)]||undefined,_0x50b830=Object[_0x16c9bf(0x1c2)](_0x51f25d)[_0x16c9bf(0x1ec)]>0x0,_0x4c46ea=_0x3619da||_0x42d08b||_0x1f0e26||_0x15c42c||_0x303bf3||undefined,_0x2b44ee=stringConfigValue(_0x2af0c4[_0x16c9bf(0x1c5)]),_0x17d173=_0x2b44ee?Object[_0x16c9bf(0x1d0)](_0x51f25d)[_0x16c9bf(0x1dd)](([,_0x17dec4])=>_0x17dec4?.['appcode']===_0x2b44ee):undefined,_0x25f522=_0x17d173?.[0x0],_0xb0af26=_0x17d173?.[0x1],_0x180f64=_0x2b44ee?_0x25f522:_0x4c46ea;let _0x1103e1=_0x180f64&&_0x51f25d[_0x180f64]?_0x51f25d[_0x180f64]:undefined;_0x2b44ee&&_0xb0af26&&(_0x1103e1=_0xb0af26);const _0x968be9=_0x2b44ee?_0xb0af26??_0x1103e1:_0x1103e1,_0x374aac=!_0x3619da&&!_0x42d08b&&_0x1f0e26&&_0x180f64===_0x1f0e26,_0x2a528c=_0x3619da||(_0x374aac?_0x1f0e26:undefined)||(_0x2b44ee?_0x25f522:undefined),_0x44910c=_0x968be9?.[_0x16c9bf(0x1c5)],_0x25d291=_0x226da6?resolveTopLevelAppCode(_0x40880d):undefined,_0x58d367=_0x97c486?resolveTopLevelAppCode(_0x11006f):undefined,_0x562614=_0x3619da||_0x42d08b?_0x44910c:undefined,_0xacb446=!_0x3619da&&!_0x42d08b?_0x44910c:undefined,_0x46477e=_0x2b44ee||_0x562614||_0x25d291||_0xacb446||_0x58d367||undefined,_0x373472=_0x226da6?stringConfigValue(_0x40880d[_0x16c9bf(0x1db)]):undefined,_0x1cd81b=_0x97c486?stringConfigValue(_0x11006f[_0x16c9bf(0x1db)]):undefined,_0x487b70=_0x2af0c4[_0x16c9bf(0x1db)]||_0x968be9?.[_0x16c9bf(0x1db)]||_0x373472||_0x32ff91(_0x16c9bf(0x1d5))||_0x1cd81b||_0x3ff131[_0x16c9bf(0x1db)]||DEFAULT_CONFIG_VALUES[_0x16c9bf(0x1db)],_0x38dec4=_0x968be9?.[_0x16c9bf(0x1c7)]||_0x3ff131['locale']||DEFAULT_CONFIG_VALUES[_0x16c9bf(0x1c7)],_0x35e566=_0x32ff91('COOKIE')||_0x968be9?.['cookie']||_0x3ff131['cookie']||undefined,_0x41aa1b=_0x32ff91(_0x16c9bf(0x1da))||_0x968be9?.[_0x16c9bf(0x1eb)]||_0x3ff131['accessKey']||undefined,_0x33de65=_0x2af0c4[_0x16c9bf(0x1e2)]||_0x32ff91(_0x16c9bf(0x1c6))||_0x968be9?.['format']||_0x3ff131[_0x16c9bf(0x1e2)],_0x47e6b2=normalizeLegacyOutputFormat(_0x33de65),_0x5068dc=_0x32ff91('PAGE_SIZE')||_0x968be9?.[_0x16c9bf(0x1ce)]||_0x3ff131[_0x16c9bf(0x1ce)],_0x2e5e46=_0x5068dc?Number(_0x5068dc)||undefined:undefined,_0x241a64=_0x1c985f?[...configuredRiskCeilings(_0x1c985f[_0x16c9bf(0x1de)]),...configuredRiskCeilings(_0x1c985f[_0x16c9bf(0x1c1)])]:configuredRiskCeilings(_0x3ff131),_0x5d5001=resolveRiskCeiling(..._0x241a64,_0x968be9?.[_0x16c9bf(0x1c0)]),_0x5abca1=resolveRiskCeiling(_0x5d5001,_0x32ff91('RISK_LEVEL'),_0x32ff91('MAX_RISK')),_0x288302=_0x32ff91(_0x16c9bf(0x1e4)),_0x47c55f=_0x288302==='1'||_0x288302==='true',_0x3c6ef6=_0x968be9?.['apiDir']||_0x3ff131[_0x16c9bf(0x1ca)]||DEFAULT_CONFIG_VALUES['apiDir'],_0x4b3d43=isDaily(normalizeEnv(String(_0x487b70)))?_0x16c9bf(0x1df):_0x16c9bf(0x1cd);return{'appCode':typeof _0x46477e==='string'&&_0x46477e['trim']()?_0x46477e[_0x16c9bf(0x1e0)]():undefined,'env':_0x4b3d43,'locale':_0x38dec4,'cookie':_0x35e566,'accessKey':_0x41aa1b,'format':_0x47e6b2,'pageSize':_0x2e5e46,'riskLevel':_0x5abca1,'verbose':_0x47c55f,'apiDir':_0x3c6ef6,'apps':_0x51f25d,'defaultApp':_0x303bf3,'currentApp':_0x50b830?_0x180f64:undefined,'explicitAppName':_0x2a528c};}
@@ -1 +1 @@
1
- (function(_0xf3bbd,_0x59c772){const _0x3e5d8c=a214_0x366e,_0x7a552d=_0xf3bbd();while(!![]){try{const _0x31e5b5=parseInt(_0x3e5d8c(0x12e))/0x1*(parseInt(_0x3e5d8c(0x12b))/0x2)+parseInt(_0x3e5d8c(0x127))/0x3+parseInt(_0x3e5d8c(0x128))/0x4*(parseInt(_0x3e5d8c(0x12d))/0x5)+-parseInt(_0x3e5d8c(0x12a))/0x6+parseInt(_0x3e5d8c(0x129))/0x7*(parseInt(_0x3e5d8c(0x126))/0x8)+parseInt(_0x3e5d8c(0x12c))/0x9+parseInt(_0x3e5d8c(0x130))/0xa;if(_0x31e5b5===_0x59c772)break;else _0x7a552d['push'](_0x7a552d['shift']());}catch(_0x73363b){_0x7a552d['push'](_0x7a552d['shift']());}}}(a214_0x48aa,0x49d35));import{getIsSessionValid}from'../auth/is-session-valid.js';function a214_0x48aa(){const _0x12d30c=['14gYUrsB','3539766XnsSEq','697122llUJgP','351405wPkNii','5ufhXRC','1DvwWUY','authRequired','2083720qtVAgP','49232oNYyEH','475449CeqKrO','502324lslCYx'];a214_0x48aa=function(){return _0x12d30c;};return a214_0x48aa();}function a214_0x366e(_0x398114,_0x5d9080){_0x398114=_0x398114-0x126;const _0x48aaec=a214_0x48aa();let _0x366ea9=_0x48aaec[_0x398114];return _0x366ea9;}import{CliErrors}from'../errors.js';export async function buildAuth(_0x1631cf){const {getCookie:_0x82086b}=await import('../auth/get-cookie.js'),_0x57d8af=_0x1631cf['cookie']||_0x82086b(),_0x2bf673=_0x57d8af?await getIsSessionValid():![];return{'cookie':_0x57d8af,'isLoggedIn':_0x2bf673,async 'getOrLogin'(){const _0x14de19=a214_0x366e;if(_0x57d8af&&_0x2bf673)return _0x57d8af;throw CliErrors[_0x14de19(0x12f)]();}};}
1
+ (function(_0x22823a,_0xe57ea5){const _0x5931fd=a222_0x1f1f,_0x64af1e=_0x22823a();while(!![]){try{const _0x12ae25=-parseInt(_0x5931fd(0x108))/0x1*(-parseInt(_0x5931fd(0x110))/0x2)+parseInt(_0x5931fd(0x10f))/0x3*(parseInt(_0x5931fd(0x10e))/0x4)+parseInt(_0x5931fd(0x10a))/0x5*(parseInt(_0x5931fd(0x105))/0x6)+-parseInt(_0x5931fd(0x10d))/0x7+parseInt(_0x5931fd(0x106))/0x8+parseInt(_0x5931fd(0x10c))/0x9+-parseInt(_0x5931fd(0x107))/0xa;if(_0x12ae25===_0xe57ea5)break;else _0x64af1e['push'](_0x64af1e['shift']());}catch(_0x535d29){_0x64af1e['push'](_0x64af1e['shift']());}}}(a222_0x2eff,0x323c5));function a222_0x1f1f(_0x14084b,_0x426b24){_0x14084b=_0x14084b-0x105;const _0x2eff31=a222_0x2eff();let _0x1f1fe1=_0x2eff31[_0x14084b];return _0x1f1fe1;}function a222_0x2eff(){const _0x303342=['3BbenII','70DWfTyo','cookie','6elqlvj','927104KDWGHJ','5819900BYQBsW','6524BcoIHI','authRequired','1632760tgaZnr','../auth/get-cookie.js','1231875drnnas','365967HNWMes','129524qFlcjG'];a222_0x2eff=function(){return _0x303342;};return a222_0x2eff();}import{getIsSessionValid}from'../auth/is-session-valid.js';import{CliErrors}from'../errors.js';export async function buildAuth(_0x20685c){const _0x3dca15=a222_0x1f1f,{getCookie:_0x37ae97}=await import(_0x3dca15(0x10b)),_0x515345=_0x20685c[_0x3dca15(0x111)]||_0x37ae97(),_0x20a3e7=_0x515345?await getIsSessionValid():![];return{'cookie':_0x515345,'isLoggedIn':_0x20a3e7,async 'getOrLogin'(){const _0x4e7e07=_0x3dca15;if(_0x515345&&_0x20a3e7)return _0x515345;throw CliErrors[_0x4e7e07(0x109)]();}};}
@@ -1 +1 @@
1
- const a215_0x41aea3=a215_0xa5fc;(function(_0x4a7746,_0x475ca9){const _0x175328=a215_0xa5fc,_0x3c0a9d=_0x4a7746();while(!![]){try{const _0x279dd5=-parseInt(_0x175328(0x1f7))/0x1+-parseInt(_0x175328(0x1f9))/0x2+parseInt(_0x175328(0x1fc))/0x3*(-parseInt(_0x175328(0x1dd))/0x4)+-parseInt(_0x175328(0x1dc))/0x5*(parseInt(_0x175328(0x1df))/0x6)+parseInt(_0x175328(0x1e1))/0x7+-parseInt(_0x175328(0x1f0))/0x8+-parseInt(_0x175328(0x1d9))/0x9*(-parseInt(_0x175328(0x1e2))/0xa);if(_0x279dd5===_0x475ca9)break;else _0x3c0a9d['push'](_0x3c0a9d['shift']());}catch(_0xc89a81){_0x3c0a9d['push'](_0x3c0a9d['shift']());}}}(a215_0x3ab2,0x26b5d));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=a215_0x41aea3(0x1d2);export const CONFIG_NAMES=[a215_0x41aea3(0x1d2),'.lovrabet.json','.lovrabetrc'];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a215_0x41aea3(0x1ec)](_0x1df4eb=>_0x1df4eb!==NEW_CONFIG_NAME);const normalizedWriteCache=new Map();export function resolveConfigPath(_0x5da467){for(const _0x30cfa0 of CONFIG_NAMES){const _0x572cde=resolve(_0x5da467,_0x30cfa0);if(existsSync(_0x572cde))return _0x572cde;}return undefined;}export function findProjectRootDirectory(_0x522bdc=process[a215_0x41aea3(0x1ed)]()){let _0x1c8415=resolve(_0x522bdc);const {root:_0x3addf7}=parse(_0x1c8415),_0x32fadc=homedir();while(!![]){if(resolveConfigPath(_0x1c8415)){if(_0x1c8415===_0x32fadc)break;return _0x1c8415;}if(_0x1c8415===_0x3addf7||_0x1c8415===_0x32fadc)break;const _0x4235c2=dirname(_0x1c8415);if(_0x4235c2===_0x1c8415)break;_0x1c8415=_0x4235c2;}return resolve(_0x522bdc);}export function getProjectConfigPath(){const _0x56ca30=a215_0x41aea3;return resolveConfigPath(process[_0x56ca30(0x1ed)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x451049){const _0x39ca1a=a215_0x41aea3;if(!existsSync(_0x451049))return{'status':_0x39ca1a(0x1e4)};try{const _0x4daed7=readFileSync(_0x451049,{'encoding':'utf8'});if(!_0x4daed7?.[_0x39ca1a(0x1f4)]())return{'status':_0x39ca1a(0x1d8)};const _0xaee8b6=JSON[_0x39ca1a(0x1e3)](_0x4daed7);return{'status':'ok','data':_0xaee8b6};}catch(_0x49c987){return{'status':_0x39ca1a(0x1e7),'message':_0x49c987 instanceof Error?_0x49c987['message']:String(_0x49c987)};}}function parseCliConfigJsonFile(_0x16a1a5,_0x1202bf,_0x54480d){const _0x52484d=a215_0x41aea3,_0x79dce5=inspectCliConfigJsonFile(_0x16a1a5);if(_0x79dce5[_0x52484d(0x1d4)]==='missing'||_0x79dce5[_0x52484d(0x1d4)]==='empty')return{};if(_0x79dce5[_0x52484d(0x1d4)]==='ok')return _0x79dce5['data'];return _0x1202bf===_0x52484d(0x1d6)&&_0x54480d&&console[_0x52484d(0x1e7)](CLI_BIN_NAME+':\x20'+_0x54480d+_0x52484d(0x1fb)+_0x16a1a5+'\x0a\x20\x20'+_0x79dce5[_0x52484d(0x1de)]),{};}function a215_0x3ab2(){const _0x177303=['warn','set','empty','45ATLOmj','apiDir','apps','20oQRfRr','4iLrGfC','message','464874qoKDoV','pageSize','2016791UNjKHx','1467210FIUbaB','parse','missing','object','app','error','keys','appcode','format','accessKey','filter','cwd','config','cookie','2171064zjPcBM','defaultApp','length','inherit','trim','locale','stringify','8542GHIOqp','project','236334ggvmIV','env','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','465459cbKDQq','riskLevel','.rabetbase.json','.tmp','status','utf8'];a215_0x3ab2=function(){return _0x177303;};return a215_0x3ab2();}function normalizeLegacyConfigShape(_0x1e60ca){const _0x32feff=a215_0x41aea3;if(!_0x1e60ca||typeof _0x1e60ca!==_0x32feff(0x1e5))return{'config':{},'migrated':![]};const _0xf5936c={..._0x1e60ca},_0x3d1939=_0xf5936c['apps']&&typeof _0xf5936c[_0x32feff(0x1db)]===_0x32feff(0x1e5)?{..._0xf5936c[_0x32feff(0x1db)]}:{},_0x28cb8f=Object['keys'](_0x3d1939)[_0x32feff(0x1f2)],_0x41003a=_0xf5936c[_0x32feff(0x1e9)]||_0xf5936c[_0x32feff(0x1e6)];let _0x2dfd6e=![];if(_0x41003a&&_0x28cb8f===0x0){const _0x2c7f67=typeof _0xf5936c['defaultApp']==='string'&&_0xf5936c[_0x32feff(0x1f1)]['trim']()?_0xf5936c[_0x32feff(0x1f1)]:String(_0x41003a)['trim']();_0x3d1939[_0x2c7f67]={'appcode':String(_0x41003a)['trim'](),..._0xf5936c[_0x32feff(0x1fa)]!=null?{'env':_0xf5936c[_0x32feff(0x1fa)]}:{},..._0xf5936c[_0x32feff(0x1da)]!=null?{'apiDir':_0xf5936c[_0x32feff(0x1da)]}:{},..._0xf5936c[_0x32feff(0x1ef)]!=null?{'cookie':_0xf5936c[_0x32feff(0x1ef)]}:{},..._0xf5936c[_0x32feff(0x1eb)]!=null?{'accessKey':_0xf5936c[_0x32feff(0x1eb)]}:{},..._0xf5936c['format']!=null?{'format':_0xf5936c[_0x32feff(0x1ea)]}:{},..._0xf5936c[_0x32feff(0x1e0)]!=null?{'pageSize':_0xf5936c[_0x32feff(0x1e0)]}:{},..._0xf5936c[_0x32feff(0x1d1)]!=null?{'riskLevel':_0xf5936c[_0x32feff(0x1d1)]}:{},..._0xf5936c[_0x32feff(0x1f5)]!=null?{'locale':_0xf5936c[_0x32feff(0x1f5)]}:{}},_0xf5936c[_0x32feff(0x1db)]=_0x3d1939;if(!_0xf5936c[_0x32feff(0x1f1)])_0xf5936c['defaultApp']=_0x2c7f67;_0x2dfd6e=!![];}return(_0x32feff(0x1e9)in _0xf5936c||_0x32feff(0x1e6)in _0xf5936c)&&(delete _0xf5936c[_0x32feff(0x1e9)],delete _0xf5936c[_0x32feff(0x1e6)],_0x2dfd6e=!![]),{'config':_0xf5936c,'migrated':_0x2dfd6e};}function writeNormalizedConfigIfNeeded(_0x3cef50,_0xcdab44){const _0x18f29a=a215_0x41aea3,_0xa7502d=JSON[_0x18f29a(0x1f6)](_0xcdab44,null,0x2)+'\x0a';if(normalizedWriteCache['get'](_0x3cef50)===_0xa7502d)return;writeConfigFile(_0x3cef50,_0xcdab44),normalizedWriteCache[_0x18f29a(0x1d7)](_0x3cef50,_0xa7502d);}function a215_0xa5fc(_0x3493aa,_0x1e5884){_0x3493aa=_0x3493aa-0x1d1;const _0x3ab20e=a215_0x3ab2();let _0xa5fcb0=_0x3ab20e[_0x3493aa];return _0xa5fcb0;}function parseAndNormalizeConfig(_0x33b910,_0x355657,_0x104cbe){const _0x261d62=a215_0x41aea3,_0x2cb4f6=parseCliConfigJsonFile(_0x33b910,_0x355657,_0x104cbe),_0x30bc9c=normalizeLegacyConfigShape(_0x2cb4f6);if(_0x30bc9c['migrated'])try{writeNormalizedConfigIfNeeded(_0x33b910,_0x30bc9c[_0x261d62(0x1ee)]);}catch{}return _0x30bc9c[_0x261d62(0x1ee)];}export function loadRawConfigLayers(_0x414001){const _0x44b0b3=a215_0x41aea3;let _0x38a75a={},_0x5f0ec1={};const _0x23be89=resolveConfigPath(homedir());_0x23be89&&(_0x38a75a=parseAndNormalizeConfig(_0x23be89,_0x44b0b3(0x1d6),'Global'));const _0x1b39fd=_0x414001??findProjectRootDirectory(),_0x128a8d=resolveConfigPath(_0x1b39fd);return _0x128a8d&&(_0x5f0ec1=parseAndNormalizeConfig(_0x128a8d,'warn','Project')),{'globalPath':_0x23be89,'projectPath':_0x128a8d,'globalConfig':_0x38a75a,'projectConfig':_0x5f0ec1};}const INHERIT_WHITELIST=[a215_0x41aea3(0x1ef),a215_0x41aea3(0x1eb),a215_0x41aea3(0x1f5),a215_0x41aea3(0x1ea),a215_0x41aea3(0x1d1),'pageSize'];export function mergeRawConfigLayers(_0x5770a0){const _0x41a200=a215_0x41aea3,{globalConfig:_0x291bb0,projectConfig:_0x198f43}=_0x5770a0,_0x48e646=Object['keys'](_0x198f43)[_0x41a200(0x1f2)]>0x0;if(!_0x48e646)return mergeGlobalOnly(_0x291bb0);if(_0x198f43['inherit']===!![])return mergeFullInherit(_0x291bb0,_0x198f43);if(_0x198f43[_0x41a200(0x1f3)]===![])return mergeIsolated(_0x198f43);return mergeProjectFirst(_0x291bb0,_0x198f43);}function mergeGlobalOnly(_0x1ed769){const _0x2e014c=a215_0x41aea3,_0x4d4989={..._0x1ed769},_0x5596a0=_0x1ed769[_0x2e014c(0x1db)]&&typeof _0x1ed769[_0x2e014c(0x1db)]===_0x2e014c(0x1e5)?_0x1ed769[_0x2e014c(0x1db)]:{};if(Object[_0x2e014c(0x1e8)](_0x5596a0)[_0x2e014c(0x1f2)]>0x0)_0x4d4989[_0x2e014c(0x1db)]=_0x5596a0;if(_0x1ed769[_0x2e014c(0x1f1)])_0x4d4989[_0x2e014c(0x1f1)]=_0x1ed769[_0x2e014c(0x1f1)];else{const _0x6f9d9e=Object[_0x2e014c(0x1e8)](_0x5596a0);if(_0x6f9d9e[_0x2e014c(0x1f2)]>0x0)_0x4d4989[_0x2e014c(0x1f1)]=_0x6f9d9e[0x0];}return _0x4d4989;}function mergeIsolated(_0x4f0b9b){const _0xc241e8=a215_0x41aea3,_0x510018={..._0x4f0b9b};delete _0x510018['inherit'];const _0xb1b8f1=_0x4f0b9b['apps']&&typeof _0x4f0b9b['apps']===_0xc241e8(0x1e5)?_0x4f0b9b['apps']:{};Object[_0xc241e8(0x1e8)](_0xb1b8f1)['length']>0x0?_0x510018[_0xc241e8(0x1db)]=_0xb1b8f1:delete _0x510018['apps'];if(_0xc241e8(0x1f1)in _0x4f0b9b)_0x510018[_0xc241e8(0x1f1)]=_0x4f0b9b['defaultApp'];else Object[_0xc241e8(0x1e8)](_0xb1b8f1)[_0xc241e8(0x1f2)]>0x0?_0x510018[_0xc241e8(0x1f1)]=Object['keys'](_0xb1b8f1)[0x0]:delete _0x510018[_0xc241e8(0x1f1)];return _0x510018;}function mergeProjectFirst(_0x2f5fe8,_0x22d775){const _0x344764=a215_0x41aea3,_0x43e517={..._0x22d775};delete _0x43e517[_0x344764(0x1f3)];for(const _0x54deed of INHERIT_WHITELIST){!(_0x54deed in _0x43e517)&&_0x54deed in _0x2f5fe8&&(_0x43e517[_0x54deed]=_0x2f5fe8[_0x54deed]);}const _0x38ccba=_0x22d775[_0x344764(0x1db)]&&typeof _0x22d775[_0x344764(0x1db)]===_0x344764(0x1e5)?_0x22d775[_0x344764(0x1db)]:{};Object['keys'](_0x38ccba)['length']>0x0?_0x43e517[_0x344764(0x1db)]=_0x38ccba:delete _0x43e517['apps'];if(_0x344764(0x1f1)in _0x22d775)_0x43e517['defaultApp']=_0x22d775[_0x344764(0x1f1)];else Object['keys'](_0x38ccba)['length']>0x0?_0x43e517['defaultApp']=Object[_0x344764(0x1e8)](_0x38ccba)[0x0]:delete _0x43e517[_0x344764(0x1f1)];return _0x43e517;}function mergeFullInherit(_0x2888c8,_0x2c56ec){const _0xe0a350=a215_0x41aea3,_0x2d3ae4=_0x2888c8[_0xe0a350(0x1db)]&&typeof _0x2888c8[_0xe0a350(0x1db)]==='object'?_0x2888c8['apps']:{},_0x35b0ad=_0x2c56ec[_0xe0a350(0x1db)]&&typeof _0x2c56ec[_0xe0a350(0x1db)]==='object'?_0x2c56ec[_0xe0a350(0x1db)]:{},_0x1047d9={..._0x2d3ae4,..._0x35b0ad},_0x119db8={..._0x2888c8,..._0x2c56ec};delete _0x119db8['inherit'];if(Object[_0xe0a350(0x1e8)](_0x1047d9)[_0xe0a350(0x1f2)]>0x0)_0x119db8['apps']=_0x1047d9;if(_0xe0a350(0x1f1)in _0x2c56ec)_0x119db8['defaultApp']=_0x2c56ec[_0xe0a350(0x1f1)];else{if(Object[_0xe0a350(0x1e8)](_0x35b0ad)['length']>0x0)_0x119db8[_0xe0a350(0x1f1)]=Object['keys'](_0x35b0ad)[0x0];else{if(_0x2888c8[_0xe0a350(0x1f1)])_0x119db8[_0xe0a350(0x1f1)]=_0x2888c8['defaultApp'];else{const _0x3fa50b=Object[_0xe0a350(0x1e8)](_0x2d3ae4);if(_0x3fa50b[_0xe0a350(0x1f2)]>0x0)_0x119db8['defaultApp']=_0x3fa50b[0x0];}}}return _0x119db8;}export function readRawConfigWithLayers(_0x2ec146){const _0x1f0723=loadRawConfigLayers(_0x2ec146);return{'config':mergeRawConfigLayers(_0x1f0723),'layers':_0x1f0723};}export function readRawConfig(_0x1384f5){return mergeRawConfigLayers(loadRawConfigLayers(_0x1384f5));}export function readConfigFile(_0x4a4b49){return parseAndNormalizeConfig(_0x4a4b49,'silent');}export function writeConfigFile(_0xc02460,_0x3a7d6a){const _0x2413b1=a215_0x41aea3,_0x2af709=dirname(_0xc02460);!existsSync(_0x2af709)&&mkdirSync(_0x2af709,{'recursive':!![]});const _0x53ebd0=_0xc02460+_0x2413b1(0x1d3);try{writeFileSync(_0x53ebd0,JSON[_0x2413b1(0x1f6)](_0x3a7d6a,null,0x2)+'\x0a',{'encoding':_0x2413b1(0x1d5),'mode':0x180}),renameSync(_0x53ebd0,_0xc02460);}catch(_0x34316b){try{unlinkSync(_0x53ebd0);}catch{}throw _0x34316b;}}export function resolveWriteConfigPath(_0x2317f8){const _0x403ec3=a215_0x41aea3,_0x10f69c=_0x2317f8===_0x403ec3(0x1f8)?process[_0x403ec3(0x1ed)]():homedir(),_0x209733=resolveConfigPath(_0x10f69c);return _0x209733??resolve(_0x10f69c,NEW_CONFIG_NAME);}
1
+ const a223_0x548894=a223_0x1392;(function(_0xc82b15,_0xfb7753){const _0x4e082f=a223_0x1392,_0x531188=_0xc82b15();while(!![]){try{const _0x176728=-parseInt(_0x4e082f(0x11c))/0x1*(parseInt(_0x4e082f(0xf8))/0x2)+-parseInt(_0x4e082f(0x123))/0x3+parseInt(_0x4e082f(0x100))/0x4*(-parseInt(_0x4e082f(0xfd))/0x5)+parseInt(_0x4e082f(0xf9))/0x6*(-parseInt(_0x4e082f(0x102))/0x7)+-parseInt(_0x4e082f(0x116))/0x8*(-parseInt(_0x4e082f(0xf3))/0x9)+parseInt(_0x4e082f(0x117))/0xa+-parseInt(_0x4e082f(0x126))/0xb*(-parseInt(_0x4e082f(0xf6))/0xc);if(_0x176728===_0xfb7753)break;else _0x531188['push'](_0x531188['shift']());}catch(_0x32c465){_0x531188['push'](_0x531188['shift']());}}}(a223_0x4359,0x430e6));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=a223_0x548894(0x11a);function a223_0x1392(_0x3cccce,_0x1a0a36){_0x3cccce=_0x3cccce-0xf3;const _0x435940=a223_0x4359();let _0x139217=_0x435940[_0x3cccce];return _0x139217;}export const CONFIG_NAMES=[a223_0x548894(0x11a),a223_0x548894(0x107),a223_0x548894(0x122)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0x512f58=>_0x512f58!==NEW_CONFIG_NAME);function a223_0x4359(){const _0x55ab65=['\x0a\x20\x20','11836OCbfVc','utf8','2240fNteRz','defaultApp','inherit','riskLevel','Global','.lovrabet.json','cookie','app','Project','missing','warn','env','empty','migrated','status','format','accessKey','stringify','message','length','24tZSVoQ','4593810JDMQZt','trim','cwd','.rabetbase.json','config','2128CeIueg','apiDir','pageSize','get','object','data','.lovrabetrc','513081deNSJd','appcode','keys','4758809AKlUmI','project','501813pIGpNs','string','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','24UPtFkP','set','418bLPprd','7338CmXIOM','apps','locale','parse','355WXKtQt','error'];a223_0x4359=function(){return _0x55ab65;};return a223_0x4359();}const normalizedWriteCache=new Map();export function resolveConfigPath(_0x3ae648){for(const _0x4c4628 of CONFIG_NAMES){const _0xcb5c35=resolve(_0x3ae648,_0x4c4628);if(existsSync(_0xcb5c35))return _0xcb5c35;}return undefined;}export function findProjectRootDirectory(_0x42cc32=process[a223_0x548894(0x119)]()){let _0x1da0b6=resolve(_0x42cc32);const {root:_0x515b62}=parse(_0x1da0b6),_0x10e29f=homedir();while(!![]){if(resolveConfigPath(_0x1da0b6)){if(_0x1da0b6===_0x10e29f)break;return _0x1da0b6;}if(_0x1da0b6===_0x515b62||_0x1da0b6===_0x10e29f)break;const _0x620300=dirname(_0x1da0b6);if(_0x620300===_0x1da0b6)break;_0x1da0b6=_0x620300;}return resolve(_0x42cc32);}export function getProjectConfigPath(){const _0x1fa995=a223_0x548894;return resolveConfigPath(process[_0x1fa995(0x119)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x1e64c0){const _0x171763=a223_0x548894;if(!existsSync(_0x1e64c0))return{'status':_0x171763(0x10b)};try{const _0x1c8b9a=readFileSync(_0x1e64c0,{'encoding':_0x171763(0x101)});if(!_0x1c8b9a?.[_0x171763(0x118)]())return{'status':_0x171763(0x10e)};const _0x268c3f=JSON[_0x171763(0xfc)](_0x1c8b9a);return{'status':'ok','data':_0x268c3f};}catch(_0x2ef22f){return{'status':_0x171763(0xfe),'message':_0x2ef22f instanceof Error?_0x2ef22f[_0x171763(0x114)]:String(_0x2ef22f)};}}function parseCliConfigJsonFile(_0x41d98b,_0x140e89,_0x5a8e0f){const _0x4014da=a223_0x548894,_0x38dd7c=inspectCliConfigJsonFile(_0x41d98b);if(_0x38dd7c[_0x4014da(0x110)]==='missing'||_0x38dd7c['status']===_0x4014da(0x10e))return{};if(_0x38dd7c[_0x4014da(0x110)]==='ok')return _0x38dd7c[_0x4014da(0x121)];return _0x140e89===_0x4014da(0x10c)&&_0x5a8e0f&&console[_0x4014da(0xfe)](CLI_BIN_NAME+':\x20'+_0x5a8e0f+_0x4014da(0xf5)+_0x41d98b+_0x4014da(0xff)+_0x38dd7c['message']),{};}function normalizeLegacyConfigShape(_0x1562a0){const _0x54f51d=a223_0x548894;if(!_0x1562a0||typeof _0x1562a0!==_0x54f51d(0x120))return{'config':{},'migrated':![]};const _0x3503c0={..._0x1562a0},_0x48b845=_0x3503c0[_0x54f51d(0xfa)]&&typeof _0x3503c0[_0x54f51d(0xfa)]==='object'?{..._0x3503c0[_0x54f51d(0xfa)]}:{},_0x548bef=Object['keys'](_0x48b845)[_0x54f51d(0x115)],_0x1d38b3=_0x3503c0[_0x54f51d(0x124)]||_0x3503c0[_0x54f51d(0x109)];let _0x122f90=![];if(_0x1d38b3&&_0x548bef===0x0){const _0x59bc9a=typeof _0x3503c0[_0x54f51d(0x103)]===_0x54f51d(0xf4)&&_0x3503c0['defaultApp'][_0x54f51d(0x118)]()?_0x3503c0['defaultApp']:String(_0x1d38b3)['trim']();_0x48b845[_0x59bc9a]={'appcode':String(_0x1d38b3)[_0x54f51d(0x118)](),..._0x3503c0[_0x54f51d(0x10d)]!=null?{'env':_0x3503c0[_0x54f51d(0x10d)]}:{},..._0x3503c0[_0x54f51d(0x11d)]!=null?{'apiDir':_0x3503c0[_0x54f51d(0x11d)]}:{},..._0x3503c0[_0x54f51d(0x108)]!=null?{'cookie':_0x3503c0[_0x54f51d(0x108)]}:{},..._0x3503c0['accessKey']!=null?{'accessKey':_0x3503c0['accessKey']}:{},..._0x3503c0[_0x54f51d(0x111)]!=null?{'format':_0x3503c0['format']}:{},..._0x3503c0['pageSize']!=null?{'pageSize':_0x3503c0['pageSize']}:{},..._0x3503c0[_0x54f51d(0x105)]!=null?{'riskLevel':_0x3503c0[_0x54f51d(0x105)]}:{},..._0x3503c0[_0x54f51d(0xfb)]!=null?{'locale':_0x3503c0[_0x54f51d(0xfb)]}:{}},_0x3503c0[_0x54f51d(0xfa)]=_0x48b845;if(!_0x3503c0[_0x54f51d(0x103)])_0x3503c0[_0x54f51d(0x103)]=_0x59bc9a;_0x122f90=!![];}return(_0x54f51d(0x124)in _0x3503c0||_0x54f51d(0x109)in _0x3503c0)&&(delete _0x3503c0[_0x54f51d(0x124)],delete _0x3503c0[_0x54f51d(0x109)],_0x122f90=!![]),{'config':_0x3503c0,'migrated':_0x122f90};}function writeNormalizedConfigIfNeeded(_0x2c47e1,_0x28eafd){const _0x55617f=a223_0x548894,_0x35a4a3=JSON[_0x55617f(0x113)](_0x28eafd,null,0x2)+'\x0a';if(normalizedWriteCache[_0x55617f(0x11f)](_0x2c47e1)===_0x35a4a3)return;writeConfigFile(_0x2c47e1,_0x28eafd),normalizedWriteCache[_0x55617f(0xf7)](_0x2c47e1,_0x35a4a3);}function parseAndNormalizeConfig(_0x186ac5,_0x174b37,_0x1f1ea9){const _0xcf780e=a223_0x548894,_0x805df3=parseCliConfigJsonFile(_0x186ac5,_0x174b37,_0x1f1ea9),_0x26f6c3=normalizeLegacyConfigShape(_0x805df3);if(_0x26f6c3[_0xcf780e(0x10f)])try{writeNormalizedConfigIfNeeded(_0x186ac5,_0x26f6c3[_0xcf780e(0x11b)]);}catch{}return _0x26f6c3[_0xcf780e(0x11b)];}export function loadRawConfigLayers(_0x398c74){const _0x552d75=a223_0x548894;let _0x4b6e46={},_0x40bc82={};const _0x40258a=resolveConfigPath(homedir());_0x40258a&&(_0x4b6e46=parseAndNormalizeConfig(_0x40258a,_0x552d75(0x10c),_0x552d75(0x106)));const _0x4f5fe0=_0x398c74??findProjectRootDirectory(),_0x346ce1=resolveConfigPath(_0x4f5fe0);return _0x346ce1&&(_0x40bc82=parseAndNormalizeConfig(_0x346ce1,'warn',_0x552d75(0x10a))),{'globalPath':_0x40258a,'projectPath':_0x346ce1,'globalConfig':_0x4b6e46,'projectConfig':_0x40bc82};}const INHERIT_WHITELIST=[a223_0x548894(0x108),a223_0x548894(0x112),'locale',a223_0x548894(0x111),a223_0x548894(0x105),a223_0x548894(0x11e)];export function mergeRawConfigLayers(_0x6a0b49){const _0x169cd6=a223_0x548894,{globalConfig:_0x10bae5,projectConfig:_0x60cd90}=_0x6a0b49,_0x298ad5=Object['keys'](_0x60cd90)[_0x169cd6(0x115)]>0x0;if(!_0x298ad5)return mergeGlobalOnly(_0x10bae5);if(_0x60cd90['inherit']===!![])return mergeFullInherit(_0x10bae5,_0x60cd90);if(_0x60cd90[_0x169cd6(0x104)]===![])return mergeIsolated(_0x60cd90);return mergeProjectFirst(_0x10bae5,_0x60cd90);}function mergeGlobalOnly(_0x5ecef2){const _0x5aface=a223_0x548894,_0xf0b31c={..._0x5ecef2},_0xbbd7c9=_0x5ecef2['apps']&&typeof _0x5ecef2[_0x5aface(0xfa)]==='object'?_0x5ecef2['apps']:{};if(Object[_0x5aface(0x125)](_0xbbd7c9)['length']>0x0)_0xf0b31c[_0x5aface(0xfa)]=_0xbbd7c9;if(_0x5ecef2[_0x5aface(0x103)])_0xf0b31c[_0x5aface(0x103)]=_0x5ecef2[_0x5aface(0x103)];else{const _0x105151=Object[_0x5aface(0x125)](_0xbbd7c9);if(_0x105151[_0x5aface(0x115)]>0x0)_0xf0b31c[_0x5aface(0x103)]=_0x105151[0x0];}return _0xf0b31c;}function mergeIsolated(_0x445826){const _0x450ab7=a223_0x548894,_0x8984f5={..._0x445826};delete _0x8984f5['inherit'];const _0x25979a=_0x445826['apps']&&typeof _0x445826[_0x450ab7(0xfa)]===_0x450ab7(0x120)?_0x445826[_0x450ab7(0xfa)]:{};Object[_0x450ab7(0x125)](_0x25979a)['length']>0x0?_0x8984f5['apps']=_0x25979a:delete _0x8984f5['apps'];if(_0x450ab7(0x103)in _0x445826)_0x8984f5['defaultApp']=_0x445826[_0x450ab7(0x103)];else Object['keys'](_0x25979a)[_0x450ab7(0x115)]>0x0?_0x8984f5[_0x450ab7(0x103)]=Object[_0x450ab7(0x125)](_0x25979a)[0x0]:delete _0x8984f5['defaultApp'];return _0x8984f5;}function mergeProjectFirst(_0xe32542,_0x2e0277){const _0x2fd65a=a223_0x548894,_0x34a2d4={..._0x2e0277};delete _0x34a2d4[_0x2fd65a(0x104)];for(const _0x4ada1a of INHERIT_WHITELIST){!(_0x4ada1a in _0x34a2d4)&&_0x4ada1a in _0xe32542&&(_0x34a2d4[_0x4ada1a]=_0xe32542[_0x4ada1a]);}const _0x56a1f0=_0x2e0277[_0x2fd65a(0xfa)]&&typeof _0x2e0277[_0x2fd65a(0xfa)]===_0x2fd65a(0x120)?_0x2e0277[_0x2fd65a(0xfa)]:{};Object[_0x2fd65a(0x125)](_0x56a1f0)[_0x2fd65a(0x115)]>0x0?_0x34a2d4['apps']=_0x56a1f0:delete _0x34a2d4[_0x2fd65a(0xfa)];if('defaultApp'in _0x2e0277)_0x34a2d4[_0x2fd65a(0x103)]=_0x2e0277['defaultApp'];else Object[_0x2fd65a(0x125)](_0x56a1f0)[_0x2fd65a(0x115)]>0x0?_0x34a2d4[_0x2fd65a(0x103)]=Object['keys'](_0x56a1f0)[0x0]:delete _0x34a2d4[_0x2fd65a(0x103)];return _0x34a2d4;}function mergeFullInherit(_0x6c5deb,_0x59b07f){const _0x27ad50=a223_0x548894,_0x5c4777=_0x6c5deb['apps']&&typeof _0x6c5deb['apps']===_0x27ad50(0x120)?_0x6c5deb[_0x27ad50(0xfa)]:{},_0x3a64a0=_0x59b07f['apps']&&typeof _0x59b07f[_0x27ad50(0xfa)]===_0x27ad50(0x120)?_0x59b07f[_0x27ad50(0xfa)]:{},_0x4d8f4d={..._0x5c4777,..._0x3a64a0},_0x34f0ec={..._0x6c5deb,..._0x59b07f};delete _0x34f0ec[_0x27ad50(0x104)];if(Object[_0x27ad50(0x125)](_0x4d8f4d)[_0x27ad50(0x115)]>0x0)_0x34f0ec['apps']=_0x4d8f4d;if('defaultApp'in _0x59b07f)_0x34f0ec[_0x27ad50(0x103)]=_0x59b07f['defaultApp'];else{if(Object['keys'](_0x3a64a0)['length']>0x0)_0x34f0ec['defaultApp']=Object[_0x27ad50(0x125)](_0x3a64a0)[0x0];else{if(_0x6c5deb[_0x27ad50(0x103)])_0x34f0ec[_0x27ad50(0x103)]=_0x6c5deb[_0x27ad50(0x103)];else{const _0x59a539=Object['keys'](_0x5c4777);if(_0x59a539[_0x27ad50(0x115)]>0x0)_0x34f0ec['defaultApp']=_0x59a539[0x0];}}}return _0x34f0ec;}export function readRawConfigWithLayers(_0x22325b){const _0x6c8491=loadRawConfigLayers(_0x22325b);return{'config':mergeRawConfigLayers(_0x6c8491),'layers':_0x6c8491};}export function readRawConfig(_0x4c45a2){return mergeRawConfigLayers(loadRawConfigLayers(_0x4c45a2));}export function readConfigFile(_0x3102d5){return parseAndNormalizeConfig(_0x3102d5,'silent');}export function writeConfigFile(_0x3cddf1,_0x552cb8){const _0x134e0a=a223_0x548894,_0x18e85c=dirname(_0x3cddf1);!existsSync(_0x18e85c)&&mkdirSync(_0x18e85c,{'recursive':!![]});const _0x352fef=_0x3cddf1+'.tmp';try{writeFileSync(_0x352fef,JSON[_0x134e0a(0x113)](_0x552cb8,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0x352fef,_0x3cddf1);}catch(_0x363ea8){try{unlinkSync(_0x352fef);}catch{}throw _0x363ea8;}}export function resolveWriteConfigPath(_0x1a205a){const _0x5be000=a223_0x548894,_0x3335a6=_0x1a205a===_0x5be000(0x127)?process[_0x5be000(0x119)]():homedir(),_0x21f91f=resolveConfigPath(_0x3335a6);return _0x21f91f??resolve(_0x3335a6,NEW_CONFIG_NAME);}
package/lib/context.d.ts CHANGED
@@ -24,7 +24,7 @@ export interface CLIConfig {
24
24
  pageSize: number | undefined;
25
25
  /**
26
26
  * 允许执行的最高风险等级,超出则拒绝执行。
27
- * read < write < high-risk-write(默认 high-risk-write,即不限制)
27
+ * read < write < high-risk-write(默认 write,高危写操作需由用户手动提升)
28
28
  */
29
29
  riskLevel: Risk;
30
30
  /**
package/lib/context.js CHANGED
@@ -1 +1 @@
1
- (function(_0x203fde,_0x103c2d){const _0x52909e=a216_0x3124,_0x25c4bd=_0x203fde();while(!![]){try{const _0x25f770=parseInt(_0x52909e(0xf9))/0x1*(-parseInt(_0x52909e(0x10a))/0x2)+-parseInt(_0x52909e(0xfd))/0x3+-parseInt(_0x52909e(0x108))/0x4*(parseInt(_0x52909e(0xf2))/0x5)+parseInt(_0x52909e(0xfe))/0x6+-parseInt(_0x52909e(0x103))/0x7+parseInt(_0x52909e(0xe7))/0x8*(parseInt(_0x52909e(0x101))/0x9)+-parseInt(_0x52909e(0xf8))/0xa*(-parseInt(_0x52909e(0xf4))/0xb);if(_0x25f770===_0x103c2d)break;else _0x25c4bd['push'](_0x25c4bd['shift']());}catch(_0x330b19){_0x25c4bd['push'](_0x25c4bd['shift']());}}}(a216_0x2287,0xf290b));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';function a216_0x2287(){const _0x265636=['projectConfig','argv','./utils/is-non-interactive.js','3536216fxPYIm','-api.ts','./constant/domain.js','./constant/env.js','appcode','app','env','raw','entries','setRawCommand','string','250uXfwUB','cookie','44NaHbtU','cwd','userDomain','values','7156840DqOnEA','409031nUlWaN','join','trim','replace','1940205YGXBRk','8900454WSFfUN','apiDomain','slice','9ypmfUD','apps','10980263bPLBwf','https://g.lovrabet.com/dist/lovrabet-skill','runtimeDomain','globalConfig','object','93620PlXRxk','length','2XzoAhQ','apiDir','map','filter','template_base_url','merged','defaultApp'];a216_0x2287=function(){return _0x265636;};return a216_0x2287();}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(_0x56183f){return process.env[`RABETBASE_${_0x56183f}`]||process.env[`LOVRABET_${_0x56183f}`]||undefined;}function optionalString(_0x2f7d22){const _0x5a6dc0=a216_0x3124;return typeof _0x2f7d22===_0x5a6dc0(0xf1)&&_0x2f7d22[_0x5a6dc0(0xfb)]()?_0x2f7d22[_0x5a6dc0(0xfb)]():undefined;}export async function createContext(_0x101687){const _0x187bba=a216_0x3124,{config:_0x2a480f,layers:_0x5db037}=readRawConfigWithLayers(),_0x29b892=buildConfig(_0x2a480f,_0x101687,_0x5db037);await initGlobalEnvironment(_0x29b892);const {getUserDomain:_0x5cb767,getApiDomain:_0x1db70e}=await import(_0x187bba(0xe9)),_0x31c3ff={'apiDomain':_0x1db70e(),'userDomain':_0x5cb767()},_0x1a84fa=await buildAuth(_0x29b892);logger['setLogPath'](process[_0x187bba(0xf5)]());const _0x3f69e4=(CLI_BIN_NAME+'\x20'+process[_0x187bba(0xe5)][_0x187bba(0x100)](0x2)[_0x187bba(0xfa)]('\x20'))[_0x187bba(0xfb)]();logger[_0x187bba(0xf0)](_0x3f69e4);const {isNonInteractive:_0x392d84}=await import(_0x187bba(0xe6)),_0x24fe5c=_0x392d84(_0x101687);return{'config':_0x29b892,'auth':_0x1a84fa,'logger':logger,'env':_0x31c3ff,'nonInteractive':_0x24fe5c};}export function buildConfigFromFlags(_0x1e5217){const {config:_0x31b41f,layers:_0x5db92a}=readRawConfigWithLayers();return buildConfig(_0x31b41f,_0x1e5217,_0x5db92a);}export async function initGlobalEnvironment(_0x4319ae){const _0x47c2b9=a216_0x3124,{initEnv:_0x3bb4aa}=await import(_0x47c2b9(0xea));_0x3bb4aa(_0x4319ae[_0x47c2b9(0xed)]);const {initDomains:_0x27330b}=await import(_0x47c2b9(0xe9));_0x27330b({'apiDomain':optionalString(_0x4319ae[_0x47c2b9(0xee)]?.[_0x47c2b9(0xff)]),'userDomain':optionalString(_0x4319ae[_0x47c2b9(0xee)]?.[_0x47c2b9(0xf6)]),'runtimeDomain':optionalString(_0x4319ae['raw']?.[_0x47c2b9(0x105)])});}function a216_0x3124(_0x1e6b36,_0x1a014c){_0x1e6b36=_0x1e6b36-0xe4;const _0x228769=a216_0x2287();let _0x312455=_0x228769[_0x1e6b36];return _0x312455;}export function getConfigAppCode(_0x306784){const _0x23a36e=a216_0x3124,_0x4afce3=readRawConfig(_0x306784);if(_0x4afce3[_0x23a36e(0x102)]&&typeof _0x4afce3['apps']===_0x23a36e(0x107)){const _0x5bf330=_0x4afce3[_0x23a36e(0x110)];if(_0x5bf330&&_0x4afce3[_0x23a36e(0x102)][_0x5bf330]?.[_0x23a36e(0xeb)])return String(_0x4afce3[_0x23a36e(0x102)][_0x5bf330][_0x23a36e(0xeb)])[_0x23a36e(0xfb)]();const _0xa339da=Object[_0x23a36e(0xf7)](_0x4afce3[_0x23a36e(0x102)])[0x0];if(_0xa339da?.['appcode'])return String(_0xa339da['appcode'])[_0x23a36e(0xfb)]();}const _0x456d38=_0x4afce3[_0x23a36e(0xeb)]||_0x4afce3[_0x23a36e(0xec)];if(typeof _0x456d38!=='string'||_0x456d38[_0x23a36e(0xfb)]()==='')return undefined;return _0x456d38[_0x23a36e(0xfb)]();}export function getMultiAppConfigs(_0x1f125a='project',_0x369b54){const _0x2ffc17=a216_0x3124,_0x256765=loadRawConfigLayers(_0x369b54);let _0x45fe29,_0x341734;if(_0x1f125a===_0x2ffc17(0x10f)){const _0x55a6a8=_0x256765['globalConfig'][_0x2ffc17(0x102)]&&typeof _0x256765['globalConfig'][_0x2ffc17(0x102)]===_0x2ffc17(0x107)?_0x256765[_0x2ffc17(0x106)][_0x2ffc17(0x102)]:{},_0x5ad8de=_0x256765[_0x2ffc17(0xe4)][_0x2ffc17(0x102)]&&typeof _0x256765['projectConfig'][_0x2ffc17(0x102)]===_0x2ffc17(0x107)?_0x256765[_0x2ffc17(0xe4)][_0x2ffc17(0x102)]:{};_0x45fe29={..._0x55a6a8,..._0x5ad8de};const _0x31c232=readRawConfig(_0x369b54);_0x341734=_0x31c232[_0x2ffc17(0x110)];}else _0x45fe29=_0x256765[_0x2ffc17(0xe4)][_0x2ffc17(0x102)],_0x341734=_0x256765[_0x2ffc17(0xe4)][_0x2ffc17(0x110)];if(!_0x45fe29||typeof _0x45fe29!==_0x2ffc17(0x107)||Object['keys'](_0x45fe29)[_0x2ffc17(0x109)]===0x0)return null;return Object[_0x2ffc17(0xef)](_0x45fe29)[_0x2ffc17(0x10c)](([_0x3f38b3,_0x368ef8])=>({'name':_0x3f38b3,'appcode':_0x368ef8?.[_0x2ffc17(0xeb)]||'','isDefault':_0x3f38b3===_0x341734,'env':_0x368ef8?.[_0x2ffc17(0xed)],'apiDir':_0x368ef8?.[_0x2ffc17(0x10b)],'cookie':_0x368ef8?.[_0x2ffc17(0xf3)]||undefined}))[_0x2ffc17(0x10d)](_0x8502ab=>_0x8502ab[_0x2ffc17(0xeb)]);}export function getTemplateBaseUrl(_0x535b64){const _0x3472db=a216_0x3124,_0x2f5098=readRawConfig(_0x535b64);if(_0x2f5098['template_base_url']&&typeof _0x2f5098[_0x3472db(0x10e)]===_0x3472db(0xf1))return _0x2f5098[_0x3472db(0x10e)][_0x3472db(0xfc)](/\/$/,'');return _0x3472db(0x104);}function buildConfig(_0x366952,_0x178159,_0x6ae8d7){return{...resolveAppConfig({'raw':_0x366952,'flags':_0x178159,'layers':_0x6ae8d7,'readEnv':env}),'raw':_0x366952};}export function resolveApiFilePath(_0x3d9950,_0x42ec3a){const _0x505ce7=a216_0x3124,_0x14f454=resolve(process[_0x505ce7(0xf5)](),_0x3d9950),_0x49bf75=resolve(_0x14f454,'api.ts');if(!_0x42ec3a)return _0x49bf75;const _0x1ff3bf=readRawConfig(),_0x554756=_0x1ff3bf[_0x505ce7(0x102)]&&typeof _0x1ff3bf[_0x505ce7(0x102)]===_0x505ce7(0x107)?_0x1ff3bf[_0x505ce7(0x102)]:{},_0x2dc810=Object[_0x505ce7(0xef)](_0x554756)['find'](([,_0x619759])=>_0x619759?.[_0x505ce7(0xeb)]===_0x42ec3a);if(!_0x2dc810)return _0x49bf75;const [_0x404520,_0x1a405f]=_0x2dc810,_0x5b73c8=typeof _0x1ff3bf[_0x505ce7(0x110)]===_0x505ce7(0xf1)?_0x1ff3bf[_0x505ce7(0x110)]:undefined;if(_0x1a405f?.[_0x505ce7(0x10b)])return _0x49bf75;if(_0x5b73c8&&_0x404520!==_0x5b73c8)return resolve(_0x14f454,_0x404520+_0x505ce7(0xe8));return _0x49bf75;}
1
+ (function(_0x33b860,_0x40f788){const _0x45d97a=a224_0x1896,_0x542ec3=_0x33b860();while(!![]){try{const _0x50f61e=-parseInt(_0x45d97a(0xff))/0x1*(-parseInt(_0x45d97a(0x103))/0x2)+parseInt(_0x45d97a(0x10e))/0x3+-parseInt(_0x45d97a(0x11c))/0x4+parseInt(_0x45d97a(0x11a))/0x5+parseInt(_0x45d97a(0x118))/0x6+-parseInt(_0x45d97a(0x110))/0x7*(parseInt(_0x45d97a(0x10a))/0x8)+-parseInt(_0x45d97a(0x10c))/0x9;if(_0x50f61e===_0x40f788)break;else _0x542ec3['push'](_0x542ec3['shift']());}catch(_0x44edee){_0x542ec3['push'](_0x542ec3['shift']());}}}(a224_0x3bf5,0x63c36));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';function a224_0x3bf5(){const _0x2f8228=['https://g.lovrabet.com/dist/lovrabet-skill','./constant/env.js','setLogPath','178GUlYqW','raw','defaultApp','join','length','env','object','8iAcsfU','trim','5203251RjImBs','./utils/is-non-interactive.js','232740JDpWCq','string','2189145bjTImf','find','argv','slice','apiDomain','cwd','runtimeDomain','entries','2385450NkNcQe','map','1700865kqGSLx','appcode','349884JOGXgn','filter','apps','globalConfig','userDomain','template_base_url','app','apiDir','api.ts','cookie','projectConfig','6423kbHpVl'];a224_0x3bf5=function(){return _0x2f8228;};return a224_0x3bf5();}export{CONFIG_NAMES,LEGACY_CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x4f81da){return process.env[`RABETBASE_${_0x4f81da}`]||process.env[`LOVRABET_${_0x4f81da}`]||undefined;}function optionalString(_0x557a67){const _0x1a775d=a224_0x1896;return typeof _0x557a67===_0x1a775d(0x10f)&&_0x557a67[_0x1a775d(0x10b)]()?_0x557a67[_0x1a775d(0x10b)]():undefined;}export async function createContext(_0x152632){const _0x1fc9c3=a224_0x1896,{config:_0x2292c6,layers:_0x365896}=readRawConfigWithLayers(),_0x500414=buildConfig(_0x2292c6,_0x152632,_0x365896);await initGlobalEnvironment(_0x500414);const {getUserDomain:_0x3c115e,getApiDomain:_0x33b9a0}=await import('./constant/domain.js'),_0x509ad5={'apiDomain':_0x33b9a0(),'userDomain':_0x3c115e()},_0x5d286b=await buildAuth(_0x500414);logger[_0x1fc9c3(0x102)](process[_0x1fc9c3(0x115)]());const _0x32431f=(CLI_BIN_NAME+'\x20'+process[_0x1fc9c3(0x112)][_0x1fc9c3(0x113)](0x2)[_0x1fc9c3(0x106)]('\x20'))[_0x1fc9c3(0x10b)]();logger['setRawCommand'](_0x32431f);const {isNonInteractive:_0xb7117f}=await import(_0x1fc9c3(0x10d)),_0x1b24e4=_0xb7117f(_0x152632);return{'config':_0x500414,'auth':_0x5d286b,'logger':logger,'env':_0x509ad5,'nonInteractive':_0x1b24e4};}export function buildConfigFromFlags(_0xf568ff){const {config:_0x237a2b,layers:_0x59fb20}=readRawConfigWithLayers();return buildConfig(_0x237a2b,_0xf568ff,_0x59fb20);}export async function initGlobalEnvironment(_0x10b01b){const _0x2e5343=a224_0x1896,{initEnv:_0xbc1b53}=await import(_0x2e5343(0x101));_0xbc1b53(_0x10b01b[_0x2e5343(0x108)]);const {initDomains:_0x12afd4}=await import('./constant/domain.js');_0x12afd4({'apiDomain':optionalString(_0x10b01b[_0x2e5343(0x104)]?.[_0x2e5343(0x114)]),'userDomain':optionalString(_0x10b01b['raw']?.[_0x2e5343(0x120)]),'runtimeDomain':optionalString(_0x10b01b[_0x2e5343(0x104)]?.[_0x2e5343(0x116)])});}export function getConfigAppCode(_0x3b4d0d){const _0x49841e=a224_0x1896,_0x452d05=readRawConfig(_0x3b4d0d);if(_0x452d05[_0x49841e(0x11e)]&&typeof _0x452d05[_0x49841e(0x11e)]===_0x49841e(0x109)){const _0x52cfaf=_0x452d05[_0x49841e(0x105)];if(_0x52cfaf&&_0x452d05['apps'][_0x52cfaf]?.[_0x49841e(0x11b)])return String(_0x452d05[_0x49841e(0x11e)][_0x52cfaf][_0x49841e(0x11b)])['trim']();const _0x122417=Object['values'](_0x452d05[_0x49841e(0x11e)])[0x0];if(_0x122417?.[_0x49841e(0x11b)])return String(_0x122417[_0x49841e(0x11b)])['trim']();}const _0x3f3a1d=_0x452d05[_0x49841e(0x11b)]||_0x452d05[_0x49841e(0x122)];if(typeof _0x3f3a1d!=='string'||_0x3f3a1d[_0x49841e(0x10b)]()==='')return undefined;return _0x3f3a1d[_0x49841e(0x10b)]();}function a224_0x1896(_0x4ee192,_0x53f71e){_0x4ee192=_0x4ee192-0xfe;const _0x3bf559=a224_0x3bf5();let _0x189649=_0x3bf559[_0x4ee192];return _0x189649;}export function getMultiAppConfigs(_0x284852='project',_0x39d1ac){const _0x3d5e08=a224_0x1896,_0x3a61aa=loadRawConfigLayers(_0x39d1ac);let _0x5ded8e,_0x1e8b17;if(_0x284852==='merged'){const _0x410f4b=_0x3a61aa[_0x3d5e08(0x11f)][_0x3d5e08(0x11e)]&&typeof _0x3a61aa['globalConfig'][_0x3d5e08(0x11e)]==='object'?_0x3a61aa['globalConfig'][_0x3d5e08(0x11e)]:{},_0x3a42a6=_0x3a61aa[_0x3d5e08(0xfe)][_0x3d5e08(0x11e)]&&typeof _0x3a61aa[_0x3d5e08(0xfe)][_0x3d5e08(0x11e)]===_0x3d5e08(0x109)?_0x3a61aa[_0x3d5e08(0xfe)][_0x3d5e08(0x11e)]:{};_0x5ded8e={..._0x410f4b,..._0x3a42a6};const _0x1b6f9e=readRawConfig(_0x39d1ac);_0x1e8b17=_0x1b6f9e[_0x3d5e08(0x105)];}else _0x5ded8e=_0x3a61aa[_0x3d5e08(0xfe)][_0x3d5e08(0x11e)],_0x1e8b17=_0x3a61aa[_0x3d5e08(0xfe)]['defaultApp'];if(!_0x5ded8e||typeof _0x5ded8e!==_0x3d5e08(0x109)||Object['keys'](_0x5ded8e)[_0x3d5e08(0x107)]===0x0)return null;return Object['entries'](_0x5ded8e)[_0x3d5e08(0x119)](([_0x19ec02,_0x399355])=>({'name':_0x19ec02,'appcode':_0x399355?.[_0x3d5e08(0x11b)]||'','isDefault':_0x19ec02===_0x1e8b17,'env':_0x399355?.[_0x3d5e08(0x108)],'apiDir':_0x399355?.[_0x3d5e08(0x123)],'cookie':_0x399355?.[_0x3d5e08(0x125)]||undefined}))[_0x3d5e08(0x11d)](_0xe50af8=>_0xe50af8[_0x3d5e08(0x11b)]);}export function getTemplateBaseUrl(_0x566746){const _0x40f3b2=a224_0x1896,_0x273ec4=readRawConfig(_0x566746);if(_0x273ec4[_0x40f3b2(0x121)]&&typeof _0x273ec4[_0x40f3b2(0x121)]===_0x40f3b2(0x10f))return _0x273ec4['template_base_url']['replace'](/\/$/,'');return _0x40f3b2(0x100);}function buildConfig(_0x25fad1,_0x4fbcbf,_0x2a2f1a){return{...resolveAppConfig({'raw':_0x25fad1,'flags':_0x4fbcbf,'layers':_0x2a2f1a,'readEnv':env}),'raw':_0x25fad1};}export function resolveApiFilePath(_0x5662b5,_0x25644c){const _0x3f4e7f=a224_0x1896,_0x5b425c=resolve(process[_0x3f4e7f(0x115)](),_0x5662b5),_0x3a8fc3=resolve(_0x5b425c,_0x3f4e7f(0x124));if(!_0x25644c)return _0x3a8fc3;const _0x5e7ea4=readRawConfig(),_0x3573ca=_0x5e7ea4[_0x3f4e7f(0x11e)]&&typeof _0x5e7ea4[_0x3f4e7f(0x11e)]===_0x3f4e7f(0x109)?_0x5e7ea4[_0x3f4e7f(0x11e)]:{},_0x2dcb62=Object[_0x3f4e7f(0x117)](_0x3573ca)[_0x3f4e7f(0x111)](([,_0x1e3c16])=>_0x1e3c16?.[_0x3f4e7f(0x11b)]===_0x25644c);if(!_0x2dcb62)return _0x3a8fc3;const [_0x4baad7,_0x336f8a]=_0x2dcb62,_0xb5b265=typeof _0x5e7ea4['defaultApp']===_0x3f4e7f(0x10f)?_0x5e7ea4[_0x3f4e7f(0x105)]:undefined;if(_0x336f8a?.['apiDir'])return _0x3a8fc3;if(_0xb5b265&&_0x4baad7!==_0xb5b265)return resolve(_0x5b425c,_0x4baad7+'-api.ts');return _0x3a8fc3;}
@@ -1 +1 @@
1
- (function(_0x287ec9,_0x54c08a){const _0x511070=a217_0x337e,_0x3f418=_0x287ec9();while(!![]){try{const _0x9e39ba=-parseInt(_0x511070(0xd0))/0x1*(parseInt(_0x511070(0xd5))/0x2)+parseInt(_0x511070(0xc4))/0x3*(-parseInt(_0x511070(0xc8))/0x4)+parseInt(_0x511070(0xce))/0x5*(-parseInt(_0x511070(0xc9))/0x6)+-parseInt(_0x511070(0xcd))/0x7+-parseInt(_0x511070(0xcc))/0x8+parseInt(_0x511070(0xca))/0x9*(-parseInt(_0x511070(0xcb))/0xa)+parseInt(_0x511070(0xcf))/0xb;if(_0x9e39ba===_0x54c08a)break;else _0x3f418['push'](_0x3f418['shift']());}catch(_0x388e74){_0x3f418['push'](_0x3f418['shift']());}}}(a217_0x4149,0x57452));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';const cache=new Map();function a217_0x337e(_0x44e4d8,_0x397121){_0x44e4d8=_0x44e4d8-0xc3;const _0x414939=a217_0x4149();let _0x337e94=_0x414939[_0x44e4d8];return _0x337e94;}function parseApiFile(_0x4c6bf4){const _0x5aaf85=a217_0x337e,_0x556b7e=[],_0xa93816=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x55597e;while((_0x55597e=_0xa93816['exec'](_0x4c6bf4))!==null){_0x556b7e[_0x5aaf85(0xc5)]({'datasetCode':_0x55597e[0x1],'tableName':_0x55597e[0x2],'name':_0x55597e[0x3],'alias':_0x55597e[0x4]});}return _0x556b7e;}export function loadAliasMap(_0xd8b5e,_0x2a0ae2,_0x3fde9c){const _0x448db5=a217_0x337e,_0x4e3d44=_0x3fde9c??resolve(process[_0x448db5(0xd3)](),_0xd8b5e,'api.ts');if(cache[_0x448db5(0xc3)](_0x4e3d44))return cache[_0x448db5(0xc7)](_0x4e3d44);if(!existsSync(_0x4e3d44))return cache['set'](_0x4e3d44,[]),[];try{const _0x44539b=readFileSync(_0x4e3d44,_0x448db5(0xd1)),_0x24581c=parseApiFile(_0x44539b);return cache[_0x448db5(0xd4)](_0x4e3d44,_0x24581c),_0x24581c;}catch{return cache[_0x448db5(0xd4)](_0x4e3d44,[]),[];}}export function resolveAlias(_0x4645b4,_0x944c54,_0x4a4e88,_0x2d5720){const _0x454dd9=a217_0x337e;if(!_0x944c54)return undefined;const _0x5dab6a=loadAliasMap(_0x4645b4,_0x4a4e88,_0x2d5720),_0x3ec605=_0x5dab6a[_0x454dd9(0xc6)](_0xfdc073=>_0xfdc073[_0x454dd9(0xd2)]===_0x944c54);return _0x3ec605?.[_0x454dd9(0xd6)];}function a217_0x4149(){const _0x46afe4=['set','10smuvCe','datasetCode','has','51zMaBFt','push','find','get','11796WILhzN','42kVjiGo','3456YWKsbS','14870aHZzWW','236448BWFrAZ','4144385WuFoNC','436675CeyrRW','31313810qEeCSD','127031oyLWNt','utf-8','alias','cwd'];a217_0x4149=function(){return _0x46afe4;};return a217_0x4149();}export function listAliases(_0x26db96,_0x476f6c,_0x26191e){return loadAliasMap(_0x26db96,_0x476f6c,_0x26191e);}
1
+ (function(_0x396a01,_0x1378ae){const _0x475051=a225_0xc6a6,_0x143b46=_0x396a01();while(!![]){try{const _0x48f0d5=parseInt(_0x475051(0xf6))/0x1+parseInt(_0x475051(0xfc))/0x2*(parseInt(_0x475051(0xf4))/0x3)+parseInt(_0x475051(0xff))/0x4*(parseInt(_0x475051(0xf1))/0x5)+parseInt(_0x475051(0xf8))/0x6*(-parseInt(_0x475051(0xef))/0x7)+parseInt(_0x475051(0xf3))/0x8+-parseInt(_0x475051(0x100))/0x9*(parseInt(_0x475051(0xfd))/0xa)+-parseInt(_0x475051(0xf7))/0xb*(parseInt(_0x475051(0xf2))/0xc);if(_0x48f0d5===_0x1378ae)break;else _0x143b46['push'](_0x143b46['shift']());}catch(_0xc1c7d){_0x143b46['push'](_0x143b46['shift']());}}}(a225_0x3847,0x208df));import{readFileSync,existsSync}from'node:fs';function a225_0x3847(){const _0x29ca4f=['36ZEBpak','get','399jNyGTR','alias','8430nXxXtY','12vSSDUB','450720QTqXKe','607080ReNxwY','push','126291IFvSEi','5105364bNPynK','3240dRNkkZ','set','has','cwd','2rIXUkd','57830caGjsQ','utf-8','632eYUkxt'];a225_0x3847=function(){return _0x29ca4f;};return a225_0x3847();}import{resolve}from'node:path';const cache=new Map();function parseApiFile(_0x517cc2){const _0x2ff169=a225_0xc6a6,_0x57cb98=[],_0x429239=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x4dd788;while((_0x4dd788=_0x429239['exec'](_0x517cc2))!==null){_0x57cb98[_0x2ff169(0xf5)]({'datasetCode':_0x4dd788[0x1],'tableName':_0x4dd788[0x2],'name':_0x4dd788[0x3],'alias':_0x4dd788[0x4]});}return _0x57cb98;}export function loadAliasMap(_0x3ee38f,_0x352c0e,_0x143bb3){const _0x32750a=a225_0xc6a6,_0x4c46a2=_0x143bb3??resolve(process[_0x32750a(0xfb)](),_0x3ee38f,'api.ts');if(cache[_0x32750a(0xfa)](_0x4c46a2))return cache[_0x32750a(0xee)](_0x4c46a2);if(!existsSync(_0x4c46a2))return cache['set'](_0x4c46a2,[]),[];try{const _0x1379a8=readFileSync(_0x4c46a2,_0x32750a(0xfe)),_0x8fb608=parseApiFile(_0x1379a8);return cache[_0x32750a(0xf9)](_0x4c46a2,_0x8fb608),_0x8fb608;}catch{return cache['set'](_0x4c46a2,[]),[];}}function a225_0xc6a6(_0x1f1550,_0x39a2a0){_0x1f1550=_0x1f1550-0xee;const _0x3847a3=a225_0x3847();let _0xc6a638=_0x3847a3[_0x1f1550];return _0xc6a638;}export function resolveAlias(_0x3cf8a9,_0x3e70b7,_0xf47bb6,_0x14e062){const _0x2f47d6=a225_0xc6a6;if(!_0x3e70b7)return undefined;const _0x4b93a9=loadAliasMap(_0x3cf8a9,_0xf47bb6,_0x14e062),_0x1716d4=_0x4b93a9['find'](_0x37d674=>_0x37d674[_0x2f47d6(0xf0)]===_0x3e70b7);return _0x1716d4?.['datasetCode'];}export function listAliases(_0x392ea4,_0x2aa417,_0x17f2c7){return loadAliasMap(_0x392ea4,_0x2aa417,_0x17f2c7);}
@@ -848,6 +848,7 @@ export interface DbLinkInfo {
848
848
  latestAnalysisStatus?: string | null;
849
849
  latestAnalysisTraceId?: string;
850
850
  latestAnalysisSuccessTime?: string;
851
+ tableCount?: number;
851
852
  [key: string]: unknown;
852
853
  }
853
854
  export interface DbTableInfo {
@@ -867,11 +868,15 @@ export interface DbTableDiffInfo {
867
868
  }
868
869
  export interface DbTableDiffResult {
869
870
  totalCount: number;
870
- physicalTableCount: number;
871
- datasetTableCount: number;
871
+ physicalTableCount?: number;
872
+ datasetTableCount?: number;
872
873
  summary?: string;
873
874
  tableList: DbTableDiffInfo[];
874
875
  }
876
+ export interface DbTableDiffRefreshStartResult {
877
+ traceId: string;
878
+ status?: string;
879
+ }
875
880
  export interface DbAnalysisStatus {
876
881
  status?: string | null;
877
882
  inputParams?: string | null;
@@ -898,6 +903,16 @@ export interface NotificationChannelConfigItem {
898
903
  updateTime?: string | null;
899
904
  [key: string]: unknown;
900
905
  }
906
+ export interface NotificationChannelConfigMutationInput {
907
+ appCode: string;
908
+ configName: string;
909
+ channelType: NotificationChannelType;
910
+ endpointUrl?: string | null;
911
+ channelConfig?: string | null;
912
+ description?: string | null;
913
+ connectTimeout?: number | null;
914
+ readTimeout?: number | null;
915
+ }
901
916
  /**
902
917
  * GET /notification/channel-config/list:查询当前应用的应用级通知渠道配置。
903
918
  *
@@ -905,6 +920,12 @@ export interface NotificationChannelConfigItem {
905
920
  * 只输出 configCode 和用于人工选择的描述字段。
906
921
  */
907
922
  export declare function listNotificationChannelConfigs(appCode: string, channelType: NotificationChannelType): Promise<NotificationChannelConfigItem[]>;
923
+ export declare function getNotificationChannelConfig(id: number, appCode: string): Promise<NotificationChannelConfigItem>;
924
+ export declare function createNotificationChannelConfig(input: NotificationChannelConfigMutationInput): Promise<number>;
925
+ export declare function updateNotificationChannelConfig(input: NotificationChannelConfigMutationInput & {
926
+ id: number;
927
+ }): Promise<void>;
928
+ export declare function deleteNotificationChannelConfig(id: number, appCode: string): Promise<void>;
908
929
  export interface AppConfigItem {
909
930
  id?: number;
910
931
  appCode: string;
@@ -963,6 +984,12 @@ export declare function getDbTableDiff(appCode: string, dbLinkId: number, opts?:
963
984
  pageSize?: number;
964
985
  tableName?: string;
965
986
  }): Promise<DbTableDiffResult>;
987
+ export declare function getDbLiveTableDiff(appCode: string, dbLinkId: number, opts?: {
988
+ pageIndex?: number;
989
+ pageSize?: number;
990
+ tableName?: string;
991
+ }): Promise<DbTableDiffResult>;
992
+ export declare function startDbTableDiffRefresh(appCode: string, dbLinkId: number): Promise<DbTableDiffRefreshStartResult>;
966
993
  export interface RemoteApp {
967
994
  id?: number | string;
968
995
  appCode: string;