@lovrabet/rabetbase-cli 2.5.12 → 2.5.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (380) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/api/legacy-api-file.js +1 -1
  7. package/lib/api/model-registry-file.js +1 -1
  8. package/lib/api/model-registry-scaffold.js +1 -1
  9. package/lib/api/model-source.js +1 -1
  10. package/lib/auth/auth-server-ui.js +1 -1
  11. package/lib/auth/auth-server.js +1 -1
  12. package/lib/auth/constant.js +1 -1
  13. package/lib/auth/get-cookie.js +1 -1
  14. package/lib/auth/get-session-user.js +1 -1
  15. package/lib/auth/is-session-valid.js +1 -1
  16. package/lib/auth/login-success-html.js +1 -1
  17. package/lib/auth/logout.js +1 -1
  18. package/lib/cli-flags.js +1 -1
  19. package/lib/cli.js +1 -1
  20. package/lib/commands/api/generate.js +1 -1
  21. package/lib/commands/api/index.js +1 -1
  22. package/lib/commands/api/list.js +1 -1
  23. package/lib/commands/api/pull.js +1 -1
  24. package/lib/commands/api/shared.js +1 -1
  25. package/lib/commands/app/detail.js +1 -1
  26. package/lib/commands/app/index.js +1 -1
  27. package/lib/commands/app/list.js +1 -1
  28. package/lib/commands/app/members-list.js +1 -1
  29. package/lib/commands/app/remote-directory.js +1 -1
  30. package/lib/commands/app/shared.js +1 -1
  31. package/lib/commands/app-config/delete.js +1 -1
  32. package/lib/commands/app-config/get.js +1 -1
  33. package/lib/commands/app-config/index.js +1 -1
  34. package/lib/commands/app-config/list.js +1 -1
  35. package/lib/commands/app-config/set.js +1 -1
  36. package/lib/commands/app-config/shared.js +1 -1
  37. package/lib/commands/auth/index.js +1 -1
  38. package/lib/commands/bff/create.js +1 -1
  39. package/lib/commands/bff/delete.js +1 -1
  40. package/lib/commands/bff/detail.js +1 -1
  41. package/lib/commands/bff/index.js +1 -1
  42. package/lib/commands/bff/list.js +1 -1
  43. package/lib/commands/bff/logs.js +1 -1
  44. package/lib/commands/bff/pull.js +1 -1
  45. package/lib/commands/bff/push.js +1 -1
  46. package/lib/commands/bff/status.js +1 -1
  47. package/lib/commands/cli-skill/index.js +1 -1
  48. package/lib/commands/cli-update.js +1 -1
  49. package/lib/commands/codegen/index.js +1 -1
  50. package/lib/commands/codegen/sdk.js +1 -1
  51. package/lib/commands/codegen/sql.js +1 -1
  52. package/lib/commands/common/app-registry.js +1 -1
  53. package/lib/commands/common/app-selector.js +1 -1
  54. package/lib/commands/common/async-task.js +1 -1
  55. package/lib/commands/common/dry-run.js +1 -1
  56. package/lib/commands/common/flags.js +1 -1
  57. package/lib/commands/common/local-file.js +1 -1
  58. package/lib/commands/common/validate.js +1 -1
  59. package/lib/commands/config/delete.js +1 -1
  60. package/lib/commands/config/get.js +1 -1
  61. package/lib/commands/config/index.js +1 -1
  62. package/lib/commands/config/init.js +1 -1
  63. package/lib/commands/config/list.js +1 -1
  64. package/lib/commands/config/set.js +1 -1
  65. package/lib/commands/config/shared.js +1 -1
  66. package/lib/commands/dataset/batch-design.js +1 -1
  67. package/lib/commands/dataset/business-group-update.js +1 -1
  68. package/lib/commands/dataset/business-groups.js +1 -1
  69. package/lib/commands/dataset/capability.js +1 -1
  70. package/lib/commands/dataset/cross-relation-create.js +1 -1
  71. package/lib/commands/dataset/cross-relation-delete.js +1 -1
  72. package/lib/commands/dataset/cross-relation-list.js +1 -1
  73. package/lib/commands/dataset/cross-relation-shared.js +1 -1
  74. package/lib/commands/dataset/cross-relation-update.js +1 -1
  75. package/lib/commands/dataset/delete.js +1 -1
  76. package/lib/commands/dataset/design-context.js +1 -1
  77. package/lib/commands/dataset/design-start.js +1 -1
  78. package/lib/commands/dataset/design-status.js +1 -1
  79. package/lib/commands/dataset/design-sync-retry.js +1 -1
  80. package/lib/commands/dataset/design-sync-status.js +1 -1
  81. package/lib/commands/dataset/design-validate.js +1 -1
  82. package/lib/commands/dataset/detail.js +1 -1
  83. package/lib/commands/dataset/extend-update.js +1 -1
  84. package/lib/commands/dataset/field-restore.js +1 -1
  85. package/lib/commands/dataset/field-update.js +1 -1
  86. package/lib/commands/dataset/generate.js +1 -1
  87. package/lib/commands/dataset/index.js +1 -1
  88. package/lib/commands/dataset/list.js +1 -1
  89. package/lib/commands/dataset/operations.js +1 -1
  90. package/lib/commands/dataset/relation-audit.js +1 -1
  91. package/lib/commands/dataset/relation-create.js +1 -1
  92. package/lib/commands/dataset/relation-delete.js +1 -1
  93. package/lib/commands/dataset/relation-shared.js +1 -1
  94. package/lib/commands/dataset/relation-update.js +1 -1
  95. package/lib/commands/dataset/relations.js +1 -1
  96. package/lib/commands/dataset/rename.js +1 -1
  97. package/lib/commands/dataset/restore.js +1 -1
  98. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  99. package/lib/commands/db/analysis-batching.js +1 -1
  100. package/lib/commands/db/analyze-batch-plan.js +1 -1
  101. package/lib/commands/db/analyze-cancel.js +1 -1
  102. package/lib/commands/db/analyze-start.js +1 -1
  103. package/lib/commands/db/analyze-status.js +1 -1
  104. package/lib/commands/db/create.js +1 -1
  105. package/lib/commands/db/cross-db-analysis-shared.js +1 -1
  106. package/lib/commands/db/cross-db-analyze-latest.js +1 -1
  107. package/lib/commands/db/cross-db-analyze-start.js +1 -1
  108. package/lib/commands/db/cross-db-analyze-status.js +1 -1
  109. package/lib/commands/db/delete.js +1 -1
  110. package/lib/commands/db/detail.js +1 -1
  111. package/lib/commands/db/diff-refresh-start.js +1 -1
  112. package/lib/commands/db/diff-refresh-status.js +1 -1
  113. package/lib/commands/db/diff.js +1 -1
  114. package/lib/commands/db/index.js +1 -1
  115. package/lib/commands/db/list.js +1 -1
  116. package/lib/commands/db/shared.js +1 -1
  117. package/lib/commands/db/table-diff-shared.js +1 -1
  118. package/lib/commands/db/tables.js +1 -1
  119. package/lib/commands/db/test.js +1 -1
  120. package/lib/commands/db/update.js +1 -1
  121. package/lib/commands/deployment/index.js +1 -1
  122. package/lib/commands/deployment/sync-all.js +1 -1
  123. package/lib/commands/deployment/sync-jobs.js +1 -1
  124. package/lib/commands/deployment/sync-status.js +1 -1
  125. package/lib/commands/doctor.js +1 -1
  126. package/lib/commands/file/index.js +1 -1
  127. package/lib/commands/flow/create.js +1 -1
  128. package/lib/commands/flow/detail.js +1 -1
  129. package/lib/commands/flow/index.js +1 -1
  130. package/lib/commands/flow/list.js +1 -1
  131. package/lib/commands/flow/page-list.js +1 -1
  132. package/lib/commands/flow/publish.js +1 -1
  133. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  134. package/lib/commands/flow/runtime-role-list.js +1 -1
  135. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  136. package/lib/commands/flow/runtime-user-search.js +1 -1
  137. package/lib/commands/flow/shared.js +1 -1
  138. package/lib/commands/flow/update.js +1 -1
  139. package/lib/commands/flow/validate.js +1 -1
  140. package/lib/commands/instant-api-policy/current.js +1 -1
  141. package/lib/commands/instant-api-policy/index.js +1 -1
  142. package/lib/commands/instant-api-policy/init.js +1 -1
  143. package/lib/commands/instant-api-policy/publish.js +1 -1
  144. package/lib/commands/instant-api-policy/pull.js +1 -1
  145. package/lib/commands/instant-api-policy/revision.js +1 -1
  146. package/lib/commands/instant-api-policy/revisions.js +1 -1
  147. package/lib/commands/instant-api-policy/rollback.js +1 -1
  148. package/lib/commands/instant-api-policy/shared.js +1 -1
  149. package/lib/commands/instant-api-policy/validate.js +1 -1
  150. package/lib/commands/issue/context.js +1 -1
  151. package/lib/commands/issue/index.js +1 -1
  152. package/lib/commands/issue/nudge.js +1 -1
  153. package/lib/commands/issue/report.js +1 -1
  154. package/lib/commands/kb/create.js +1 -1
  155. package/lib/commands/kb/delete.js +1 -1
  156. package/lib/commands/kb/detail.js +1 -1
  157. package/lib/commands/kb/index.js +1 -1
  158. package/lib/commands/kb/list.js +1 -1
  159. package/lib/commands/kb/search.js +1 -1
  160. package/lib/commands/kb/shared.js +1 -1
  161. package/lib/commands/kb/update.js +1 -1
  162. package/lib/commands/logs/index.js +1 -1
  163. package/lib/commands/menu/asset-update.js +1 -1
  164. package/lib/commands/menu/delete.js +1 -1
  165. package/lib/commands/menu/external-link-create.js +1 -1
  166. package/lib/commands/menu/external-link-update.js +1 -1
  167. package/lib/commands/menu/group-create.js +1 -1
  168. package/lib/commands/menu/group-update.js +1 -1
  169. package/lib/commands/menu/index.js +1 -1
  170. package/lib/commands/menu/list.js +1 -1
  171. package/lib/commands/menu/move.js +1 -1
  172. package/lib/commands/menu/regroup-start.js +1 -1
  173. package/lib/commands/menu/rename.js +1 -1
  174. package/lib/commands/menu/shared/compare-table.js +1 -1
  175. package/lib/commands/menu/shared/delete-plan.js +1 -1
  176. package/lib/commands/menu/shared/facts.js +1 -1
  177. package/lib/commands/menu/shared/index.js +1 -1
  178. package/lib/commands/menu/shared/inquirer.js +1 -1
  179. package/lib/commands/menu/shared/local-pages.js +1 -1
  180. package/lib/commands/menu/shared/logic.js +1 -1
  181. package/lib/commands/menu/shared/mutations.js +1 -1
  182. package/lib/commands/menu/shared/path.js +1 -1
  183. package/lib/commands/menu/shared/service.js +1 -1
  184. package/lib/commands/menu/shared/subapp-assets.js +1 -1
  185. package/lib/commands/menu/shared/sync-core.js +1 -1
  186. package/lib/commands/menu/shared/update-core.js +1 -1
  187. package/lib/commands/menu/shared/valid-url.js +1 -1
  188. package/lib/commands/menu/subapp-assets-status.js +1 -1
  189. package/lib/commands/menu/subapp-assets-update.js +1 -1
  190. package/lib/commands/menu/sync.js +1 -1
  191. package/lib/commands/menu/visibility-update.js +1 -1
  192. package/lib/commands/notification/config-create.js +1 -1
  193. package/lib/commands/notification/config-delete.js +1 -1
  194. package/lib/commands/notification/config-list.js +1 -1
  195. package/lib/commands/notification/config-update.js +1 -1
  196. package/lib/commands/notification/index.js +1 -1
  197. package/lib/commands/notification/shared.js +1 -1
  198. package/lib/commands/ocr/index.js +1 -1
  199. package/lib/commands/page/create.js +1 -1
  200. package/lib/commands/page/custom/detail.js +1 -1
  201. package/lib/commands/page/custom/list.js +1 -1
  202. package/lib/commands/page/custom/publish.js +1 -1
  203. package/lib/commands/page/custom/shared.js +1 -1
  204. package/lib/commands/page/custom/syntax.js +1 -1
  205. package/lib/commands/page/custom/update.js +1 -1
  206. package/lib/commands/page/data-list-status.js +1 -1
  207. package/lib/commands/page/generate-start.js +1 -1
  208. package/lib/commands/page/generate-status.js +1 -1
  209. package/lib/commands/page/index.js +1 -1
  210. package/lib/commands/page/pull.js +1 -1
  211. package/lib/commands/page/push.js +1 -1
  212. package/lib/commands/page/relation-audit.js +1 -1
  213. package/lib/commands/page/restore.js +1 -1
  214. package/lib/commands/page/shared.js +1 -1
  215. package/lib/commands/page/sync.js +1 -1
  216. package/lib/commands/project/api-architecture-upgrade.js +1 -1
  217. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  218. package/lib/commands/project/create/format-elapsed.js +1 -1
  219. package/lib/commands/project/create/main.js +1 -1
  220. package/lib/commands/project/create/materialize-project-template.js +1 -1
  221. package/lib/commands/project/create/project-name.js +1 -1
  222. package/lib/commands/project/create/project-template-archive.js +1 -1
  223. package/lib/commands/project/create/project-template-path.js +1 -1
  224. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  225. package/lib/commands/project/create/use-format-code.js +1 -1
  226. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  227. package/lib/commands/project/domain-routing-sync.js +1 -1
  228. package/lib/commands/project/index.js +1 -1
  229. package/lib/commands/project/upgrade.js +1 -1
  230. package/lib/commands/registry.js +1 -1
  231. package/lib/commands/role/delete.js +1 -1
  232. package/lib/commands/role/detail.js +1 -1
  233. package/lib/commands/role/index.js +1 -1
  234. package/lib/commands/role/list.js +1 -1
  235. package/lib/commands/role/shared.js +1 -1
  236. package/lib/commands/role/update.js +1 -1
  237. package/lib/commands/role/user-add.js +1 -1
  238. package/lib/commands/role/user-remove.js +1 -1
  239. package/lib/commands/role/user-resolve.js +1 -1
  240. package/lib/commands/rule/get.js +1 -1
  241. package/lib/commands/rule/index.js +1 -1
  242. package/lib/commands/rule/list.js +1 -1
  243. package/lib/commands/rule/set.js +1 -1
  244. package/lib/commands/rule/shared.js +1 -1
  245. package/lib/commands/run/index.js +1 -1
  246. package/lib/commands/schema.js +1 -1
  247. package/lib/commands/sql/create.js +1 -1
  248. package/lib/commands/sql/delete.js +1 -1
  249. package/lib/commands/sql/detail.js +1 -1
  250. package/lib/commands/sql/exec.js +1 -1
  251. package/lib/commands/sql/index.js +1 -1
  252. package/lib/commands/sql/list.js +1 -1
  253. package/lib/commands/sql/pull.js +1 -1
  254. package/lib/commands/sql/push.js +1 -1
  255. package/lib/commands/sql/shared.js +1 -1
  256. package/lib/commands/sql/status.js +1 -1
  257. package/lib/commands/sql/validate.js +1 -1
  258. package/lib/commands/task/index.js +1 -1
  259. package/lib/commands/task/status.js +1 -1
  260. package/lib/commands/tenant/index.js +1 -1
  261. package/lib/commands/tenant/members-list.js +1 -1
  262. package/lib/commands/tenant/shared.js +1 -1
  263. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  264. package/lib/commands/user-account/feishu-bind.js +1 -1
  265. package/lib/commands/user-account/index.js +1 -1
  266. package/lib/commands/workspace/add.js +1 -1
  267. package/lib/commands/workspace/index.js +1 -1
  268. package/lib/commands/workspace/remove.js +1 -1
  269. package/lib/config/domain-config.js +1 -1
  270. package/lib/config/project-domain-routing.js +1 -1
  271. package/lib/config/region-config.js +1 -1
  272. package/lib/config/schema.js +1 -1
  273. package/lib/constant/cdn.js +1 -1
  274. package/lib/constant/cli.js +1 -1
  275. package/lib/constant/defaults.js +1 -1
  276. package/lib/constant/domain.js +1 -1
  277. package/lib/constant/env.js +1 -1
  278. package/lib/constant/output.js +1 -1
  279. package/lib/constant/paths.js +1 -1
  280. package/lib/constant/region.js +1 -1
  281. package/lib/constant/risk.js +1 -1
  282. package/lib/constant/routing-profile.js +1 -1
  283. package/lib/context/app-resolver.js +1 -1
  284. package/lib/context/auth-resolver.js +1 -1
  285. package/lib/context/config-loader.js +1 -1
  286. package/lib/context.js +1 -1
  287. package/lib/core/alias-resolver.js +1 -1
  288. package/lib/core/api-client.js +1 -1
  289. package/lib/core/bff/config.js +1 -1
  290. package/lib/core/bff/file-system.js +1 -1
  291. package/lib/core/bff/hash.js +1 -1
  292. package/lib/core/bff/hook-directory.js +1 -1
  293. package/lib/core/bff/lock.js +1 -1
  294. package/lib/core/bff/utils.js +1 -1
  295. package/lib/core/cross-db-analysis.js +1 -1
  296. package/lib/core/cross-db-relation.js +1 -1
  297. package/lib/core/db-resolver.js +1 -1
  298. package/lib/core/flow-config.js +1 -1
  299. package/lib/core/instant-api-policy/config.js +1 -1
  300. package/lib/core/instant-api-policy/endpoints.js +1 -1
  301. package/lib/core/kb-management-client.js +1 -1
  302. package/lib/core/kb-search-client.js +1 -1
  303. package/lib/core/page/file-system.js +1 -1
  304. package/lib/core/page/hash.js +1 -1
  305. package/lib/core/page/lock.js +1 -1
  306. package/lib/core/page/lr-smart-jsx.js +1 -1
  307. package/lib/core/sql-index-auditor.js +1 -1
  308. package/lib/core/sql-sync/config.js +1 -1
  309. package/lib/core/sql-sync/file-system.js +1 -1
  310. package/lib/core/sql-sync/hash.js +1 -1
  311. package/lib/core/sql-sync/lock.js +1 -1
  312. package/lib/core/sql-sync/utils.js +1 -1
  313. package/lib/core/sql-validator.js +1 -1
  314. package/lib/errors.js +1 -1
  315. package/lib/framework/build-all-flags.js +1 -1
  316. package/lib/framework/error-output.js +1 -1
  317. package/lib/framework/explicit-yes.js +1 -1
  318. package/lib/framework/flags.js +1 -1
  319. package/lib/framework/help.js +1 -1
  320. package/lib/framework/index.js +1 -1
  321. package/lib/framework/output.js +1 -1
  322. package/lib/framework/response.js +1 -1
  323. package/lib/framework/runner-alias.js +1 -1
  324. package/lib/framework/runner.js +1 -1
  325. package/lib/framework/schema-export.js +1 -1
  326. package/lib/framework/supported-flags.js +1 -1
  327. package/lib/framework/types.js +1 -1
  328. package/lib/generated/build-info.d.ts +4 -4
  329. package/lib/generated/build-info.js +1 -1
  330. package/lib/generated/official-routing.js +1 -1
  331. package/lib/generated/routing-contract.js +1 -1
  332. package/lib/help.js +1 -1
  333. package/lib/postinstall.js +1 -1
  334. package/lib/runtime/confirmation.js +1 -1
  335. package/lib/runtime/event.js +1 -1
  336. package/lib/runtime/index.js +1 -1
  337. package/lib/runtime/queue.js +1 -1
  338. package/lib/runtime/resolve.js +1 -1
  339. package/lib/services/dataset-design/checkpoint.js +1 -1
  340. package/lib/services/dataset-design/commands.js +1 -1
  341. package/lib/services/dataset-design/contract.js +1 -1
  342. package/lib/skills/builtin-skill.js +1 -1
  343. package/lib/skills/main.js +1 -1
  344. package/lib/skills/npx-skills-add.js +1 -1
  345. package/lib/skills/skill-presence.js +1 -1
  346. package/lib/telemetry/cli-command-trace.js +1 -1
  347. package/lib/telemetry/cli-help-trace.js +1 -1
  348. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  349. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  350. package/lib/telemetry/send-cli-trace-log.js +1 -1
  351. package/lib/utils/ai_config.js +1 -1
  352. package/lib/utils/apply-jq-filter.js +1 -1
  353. package/lib/utils/cdn-config.js +1 -1
  354. package/lib/utils/check-sdk-version.js +1 -1
  355. package/lib/utils/cli-version-check.js +1 -1
  356. package/lib/utils/cli-version-policy.js +1 -1
  357. package/lib/utils/config.js +1 -1
  358. package/lib/utils/entity-with-id.js +1 -1
  359. package/lib/utils/file-utils.js +1 -1
  360. package/lib/utils/guides-cdn.js +1 -1
  361. package/lib/utils/http-client.js +1 -1
  362. package/lib/utils/is-non-interactive.js +1 -1
  363. package/lib/utils/logger.js +1 -1
  364. package/lib/utils/params.js +1 -1
  365. package/lib/utils/platform.js +1 -1
  366. package/lib/utils/sleep.js +1 -1
  367. package/lib/utils/template-replacer.js +1 -1
  368. package/lib/utils/update-notice.js +1 -1
  369. package/lib/utils/version.js +1 -1
  370. package/lib/utils/with-active-cookie.js +1 -1
  371. package/lib/utils/write-cli-side-channel.js +1 -1
  372. package/package.json +1 -1
  373. package/skills/rabetbase/SKILL.md +1 -1
  374. package/skills/rabetbase/guides/custom-page-workflow.md +32 -2
  375. package/skills/rabetbase/knowledge/custom-page/generation-standards.md +106 -6
  376. package/skills/rabetbase-dataset-generation/SKILL.md +1 -1
  377. package/skills/rabetbase-page-generation/SKILL.md +1 -1
  378. package/skills/rabetbase.manifest.json +3 -3
  379. package/templates/custom-pages/blank.json +1 -1
  380. package/templates/custom-pages/dashboard.json +1 -1
@@ -1 +1 @@
1
- const a285_0xd52c16=a285_0x5646;(function(_0x3c17c6,_0x407b5c){const _0x4a57f2=a285_0x5646,_0x2d0b8a=_0x3c17c6();while(!![]){try{const _0x27bfcf=parseInt(_0x4a57f2(0x1fd))/0x1*(-parseInt(_0x4a57f2(0x20b))/0x2)+parseInt(_0x4a57f2(0x1e9))/0x3+-parseInt(_0x4a57f2(0x1fc))/0x4*(parseInt(_0x4a57f2(0x1f5))/0x5)+-parseInt(_0x4a57f2(0x1f4))/0x6*(-parseInt(_0x4a57f2(0x1fb))/0x7)+-parseInt(_0x4a57f2(0x1f8))/0x8*(parseInt(_0x4a57f2(0x1e0))/0x9)+-parseInt(_0x4a57f2(0x1ee))/0xa+parseInt(_0x4a57f2(0x1d5))/0xb*(parseInt(_0x4a57f2(0x20a))/0xc);if(_0x27bfcf===_0x407b5c)break;else _0x2d0b8a['push'](_0x2d0b8a['shift']());}catch(_0x466fee){_0x2d0b8a['push'](_0x2d0b8a['shift']());}}}(a285_0x1d13,0xf41dd));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';import{normalizeConfigForWrite}from'../config/schema.js';export const NEW_CONFIG_NAME=a285_0xd52c16(0x207);export const CONFIG_NAMES=[NEW_CONFIG_NAME];const normalizedWriteCache=new Map();export function resolveConfigPath(_0x2f3cac){for(const _0x232ad0 of CONFIG_NAMES){const _0x214528=resolve(_0x2f3cac,_0x232ad0);if(existsSync(_0x214528))return _0x214528;}return undefined;}export function findProjectRootDirectory(_0x154608=process[a285_0xd52c16(0x1dd)]()){let _0x2f3040=resolve(_0x154608);const {root:_0x9c0e56}=parse(_0x2f3040),_0x4f3415=homedir();while(!![]){if(resolveConfigPath(_0x2f3040)){if(_0x2f3040===_0x4f3415)break;return _0x2f3040;}if(_0x2f3040===_0x9c0e56||_0x2f3040===_0x4f3415)break;const _0x3fb40d=dirname(_0x2f3040);if(_0x3fb40d===_0x2f3040)break;_0x2f3040=_0x3fb40d;}return resolve(_0x154608);}export function getProjectConfigPath(){const _0x20f9dd=a285_0xd52c16;return resolveConfigPath(process[_0x20f9dd(0x1dd)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x24e74c){const _0x263d4d=a285_0xd52c16;if(!existsSync(_0x24e74c))return{'status':_0x263d4d(0x1f2)};try{const _0x43613c=readFileSync(_0x24e74c,{'encoding':'utf8'});if(!_0x43613c?.[_0x263d4d(0x1dc)]())return{'status':_0x263d4d(0x206)};const _0x2e0a09=JSON[_0x263d4d(0x1eb)](_0x43613c);return{'status':'ok','data':_0x2e0a09};}catch(_0x3b0089){return{'status':_0x263d4d(0x20e),'message':_0x3b0089 instanceof Error?_0x3b0089[_0x263d4d(0x1de)]:String(_0x3b0089)};}}function parseCliConfigJsonFile(_0x3da95a,_0x3c98f4,_0x50c26f){const _0x2f18cb=a285_0xd52c16,_0x41cbe4=inspectCliConfigJsonFile(_0x3da95a);if(_0x41cbe4[_0x2f18cb(0x1ec)]===_0x2f18cb(0x1f2)||_0x41cbe4['status']===_0x2f18cb(0x206))return{};if(_0x41cbe4[_0x2f18cb(0x1ec)]==='ok')return _0x41cbe4[_0x2f18cb(0x1db)];return _0x3c98f4===_0x2f18cb(0x1e6)&&_0x50c26f&&console['error'](CLI_BIN_NAME+':\x20'+_0x50c26f+_0x2f18cb(0x1d1)+_0x3da95a+_0x2f18cb(0x1f7)+_0x41cbe4[_0x2f18cb(0x1de)]),{};}function a285_0x1d13(){const _0x1ef2fc=['format','parse','status','kbDomain','18858340aSocXr','keys','.tmp','app','missing','Project','750xzzZSz','990kVNpSV','silent','\x0a\x20\x20','40jlZyeA','apiDomain','Global','104573Yslmui','36172EGBUDq','649AJYXAI','defaultApp','get','kbServiceDomain','riskLevel','object','locale','skillDomain','env','empty','.rabetbase.json','projectPath','routing','12iBLOtO','1902cCBmam','config','set','error','length','localDomain','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','apiDir','utf8','migrated','54801406PcHsWC','runtimeDomain','string','accessKey','cookie','inherit','data','trim','cwd','message','userDomain','3336993DTsRbY','region','stringify','appcode','certificateDomain','pageSize','warn','apps','appDomain','894036prQlvi'];a285_0x1d13=function(){return _0x1ef2fc;};return a285_0x1d13();}function normalizeLegacyConfigShape(_0x2b0494){const _0x23a201=a285_0xd52c16;if(!_0x2b0494||typeof _0x2b0494!==_0x23a201(0x202))return{'config':{},'migrated':![]};const _0x5a14f8={..._0x2b0494},_0x566a95=_0x5a14f8['apps']&&typeof _0x5a14f8[_0x23a201(0x1e7)]===_0x23a201(0x202)?{..._0x5a14f8[_0x23a201(0x1e7)]}:{},_0x46055a=Object['keys'](_0x566a95)[_0x23a201(0x20f)],_0x4cecd4=_0x5a14f8[_0x23a201(0x1e3)]||_0x5a14f8[_0x23a201(0x1f1)];let _0x595940=![];if(_0x4cecd4&&_0x46055a===0x0){const _0xe06374=typeof _0x5a14f8[_0x23a201(0x1fe)]===_0x23a201(0x1d7)&&_0x5a14f8[_0x23a201(0x1fe)][_0x23a201(0x1dc)]()?_0x5a14f8[_0x23a201(0x1fe)]:String(_0x4cecd4)[_0x23a201(0x1dc)]();_0x566a95[_0xe06374]={'appcode':String(_0x4cecd4)[_0x23a201(0x1dc)](),..._0x5a14f8['env']!=null?{'env':_0x5a14f8[_0x23a201(0x205)]}:{},..._0x5a14f8['apiDir']!=null?{'apiDir':_0x5a14f8[_0x23a201(0x1d2)]}:{},..._0x5a14f8['cookie']!=null?{'cookie':_0x5a14f8[_0x23a201(0x1d9)]}:{},..._0x5a14f8[_0x23a201(0x1d8)]!=null?{'accessKey':_0x5a14f8[_0x23a201(0x1d8)]}:{},..._0x5a14f8[_0x23a201(0x1ea)]!=null?{'format':_0x5a14f8[_0x23a201(0x1ea)]}:{},..._0x5a14f8[_0x23a201(0x1e5)]!=null?{'pageSize':_0x5a14f8[_0x23a201(0x1e5)]}:{},..._0x5a14f8[_0x23a201(0x201)]!=null?{'riskLevel':_0x5a14f8['riskLevel']}:{},..._0x5a14f8['locale']!=null?{'locale':_0x5a14f8[_0x23a201(0x203)]}:{}},_0x5a14f8['apps']=_0x566a95,delete _0x5a14f8[_0x23a201(0x1fe)],_0x595940=!![];}return(_0x23a201(0x1e3)in _0x5a14f8||_0x23a201(0x1f1)in _0x5a14f8)&&(delete _0x5a14f8[_0x23a201(0x1e3)],delete _0x5a14f8[_0x23a201(0x1f1)],_0x595940=!![]),{'config':_0x5a14f8,'migrated':_0x595940};}function writeNormalizedConfigIfNeeded(_0x2414cf,_0x3dbf3f){const _0x5e54a0=a285_0xd52c16,_0x576de8=JSON['stringify'](normalizeConfigForWrite(_0x3dbf3f),null,0x2)+'\x0a';if(normalizedWriteCache[_0x5e54a0(0x1ff)](_0x2414cf)===_0x576de8)return;writeConfigFile(_0x2414cf,_0x3dbf3f),normalizedWriteCache[_0x5e54a0(0x20d)](_0x2414cf,_0x576de8);}function parseAndNormalizeConfig(_0x385426,_0x56bfa7,_0x403431){const _0x365b54=a285_0xd52c16,_0x11c358=parseCliConfigJsonFile(_0x385426,_0x56bfa7,_0x403431),_0x13cc20=normalizeLegacyConfigShape(_0x11c358);if(_0x13cc20[_0x365b54(0x1d4)])try{writeNormalizedConfigIfNeeded(_0x385426,_0x13cc20[_0x365b54(0x20c)]);}catch{}return _0x13cc20[_0x365b54(0x20c)];}export function loadRawConfigLayers(_0x6e308a){const _0x3c7222=a285_0xd52c16;let _0xbda179={},_0x90766c={};const _0x1601f0=resolveConfigPath(homedir());_0x1601f0&&(_0xbda179=parseAndNormalizeConfig(_0x1601f0,_0x3c7222(0x1e6),_0x3c7222(0x1fa)));const _0x20a243=_0x6e308a??findProjectRootDirectory(),_0x49983a=resolveConfigPath(_0x20a243);return _0x49983a&&(_0x90766c=parseAndNormalizeConfig(_0x49983a,_0x3c7222(0x1e6),_0x3c7222(0x1f3))),{'globalPath':_0x1601f0,'projectPath':_0x49983a,'globalConfig':_0xbda179,'projectConfig':_0x90766c};}const INHERIT_WHITELIST=[a285_0xd52c16(0x1d9),a285_0xd52c16(0x1d8),'locale',a285_0xd52c16(0x1ea),a285_0xd52c16(0x201),a285_0xd52c16(0x1e5),a285_0xd52c16(0x1e1),a285_0xd52c16(0x209),a285_0xd52c16(0x1df),a285_0xd52c16(0x1f9),a285_0xd52c16(0x1d6),a285_0xd52c16(0x204),a285_0xd52c16(0x1ed),a285_0xd52c16(0x200),a285_0xd52c16(0x1e8),a285_0xd52c16(0x1d0),a285_0xd52c16(0x1e4)];function a285_0x5646(_0x2d0475,_0x1f0aef){_0x2d0475=_0x2d0475-0x1d0;const _0x1d132b=a285_0x1d13();let _0x5646a1=_0x1d132b[_0x2d0475];return _0x5646a1;}export function mergeRawConfigLayers(_0x297108){const _0x543381=a285_0xd52c16,{globalConfig:_0x523113,projectConfig:_0x111e47}=_0x297108,_0x5691fc=!!_0x297108[_0x543381(0x208)]||Object[_0x543381(0x1ef)](_0x111e47)[_0x543381(0x20f)]>0x0;if(!_0x5691fc)return mergeGlobalOnly(_0x523113);return mergeProjectFirst(_0x523113,_0x111e47);}function mergeGlobalOnly(_0x4e7625){const _0x8a7933=a285_0xd52c16,_0x543908={..._0x4e7625};delete _0x543908[_0x8a7933(0x1da)];const _0x4e5d85=_0x4e7625['apps']&&typeof _0x4e7625[_0x8a7933(0x1e7)]===_0x8a7933(0x202)?_0x4e7625[_0x8a7933(0x1e7)]:{};if(Object[_0x8a7933(0x1ef)](_0x4e5d85)[_0x8a7933(0x20f)]>0x0)_0x543908['apps']=_0x4e5d85;if(_0x4e7625[_0x8a7933(0x1fe)])_0x543908['defaultApp']=_0x4e7625[_0x8a7933(0x1fe)];return _0x543908;}function mergeProjectFirst(_0x3b92be,_0x458924){const _0x1e6e79=a285_0xd52c16,_0x1de9e5={..._0x458924};delete _0x1de9e5[_0x1e6e79(0x1da)];for(const _0x1bb785 of INHERIT_WHITELIST){!(_0x1bb785 in _0x1de9e5)&&_0x1bb785 in _0x3b92be&&(_0x1de9e5[_0x1bb785]=_0x3b92be[_0x1bb785]);}const _0x488131=_0x458924['apps']&&typeof _0x458924[_0x1e6e79(0x1e7)]===_0x1e6e79(0x202)?_0x458924[_0x1e6e79(0x1e7)]:{};return Object[_0x1e6e79(0x1ef)](_0x488131)[_0x1e6e79(0x20f)]>0x0?_0x1de9e5[_0x1e6e79(0x1e7)]=_0x488131:delete _0x1de9e5[_0x1e6e79(0x1e7)],_0x1e6e79(0x1fe)in _0x458924?_0x1de9e5[_0x1e6e79(0x1fe)]=_0x458924[_0x1e6e79(0x1fe)]:delete _0x1de9e5[_0x1e6e79(0x1fe)],_0x1de9e5;}export function readRawConfigWithLayers(_0x2a6a36){const _0x249367=loadRawConfigLayers(_0x2a6a36);return{'config':mergeRawConfigLayers(_0x249367),'layers':_0x249367};}export function readRawConfig(_0x44ca42){return mergeRawConfigLayers(loadRawConfigLayers(_0x44ca42));}export function readConfigFile(_0x2f9ce7){const _0x6527f4=a285_0xd52c16;return parseAndNormalizeConfig(_0x2f9ce7,_0x6527f4(0x1f6));}export function writeConfigFile(_0x50acc9,_0x3993d8){const _0x31d13b=a285_0xd52c16,_0x4592cb=dirname(_0x50acc9);!existsSync(_0x4592cb)&&mkdirSync(_0x4592cb,{'recursive':!![]});const _0x60b7d1=_0x50acc9+_0x31d13b(0x1f0);try{const _0x1bac71=normalizeConfigForWrite(_0x3993d8);writeFileSync(_0x60b7d1,JSON[_0x31d13b(0x1e2)](_0x1bac71,null,0x2)+'\x0a',{'encoding':_0x31d13b(0x1d3),'mode':0x180}),renameSync(_0x60b7d1,_0x50acc9);}catch(_0x40f73b){try{unlinkSync(_0x60b7d1);}catch{}throw _0x40f73b;}}export function resolveWriteConfigPath(_0x3348cd){const _0x2aa250=_0x3348cd==='project'?process['cwd']():homedir(),_0x5d2359=resolveConfigPath(_0x2aa250);return _0x5d2359??resolve(_0x2aa250,NEW_CONFIG_NAME);}
1
+ const a285_0x300e91=a285_0x1349;(function(_0x142828,_0x163d55){const _0x4709e8=a285_0x1349,_0x4ae367=_0x142828();while(!![]){try{const _0x2757eb=-parseInt(_0x4709e8(0x181))/0x1+parseInt(_0x4709e8(0x198))/0x2+-parseInt(_0x4709e8(0x1a7))/0x3+-parseInt(_0x4709e8(0x179))/0x4*(parseInt(_0x4709e8(0x1a1))/0x5)+parseInt(_0x4709e8(0x174))/0x6*(parseInt(_0x4709e8(0x18b))/0x7)+parseInt(_0x4709e8(0x177))/0x8+parseInt(_0x4709e8(0x1a2))/0x9*(parseInt(_0x4709e8(0x170))/0xa);if(_0x2757eb===_0x163d55)break;else _0x4ae367['push'](_0x4ae367['shift']());}catch(_0x35d3c8){_0x4ae367['push'](_0x4ae367['shift']());}}}(a285_0x4f6e,0x5a0c1));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';import{normalizeConfigForWrite}from'../config/schema.js';export const NEW_CONFIG_NAME=a285_0x300e91(0x182);export const CONFIG_NAMES=[NEW_CONFIG_NAME];const normalizedWriteCache=new Map();export function resolveConfigPath(_0x1af0c6){for(const _0x2916fd of CONFIG_NAMES){const _0x20550f=resolve(_0x1af0c6,_0x2916fd);if(existsSync(_0x20550f))return _0x20550f;}return undefined;}export function findProjectRootDirectory(_0x29b73c=process[a285_0x300e91(0x189)]()){let _0x476ebb=resolve(_0x29b73c);const {root:_0x1a9eb0}=parse(_0x476ebb),_0x4974e2=homedir();while(!![]){if(resolveConfigPath(_0x476ebb)){if(_0x476ebb===_0x4974e2)break;return _0x476ebb;}if(_0x476ebb===_0x1a9eb0||_0x476ebb===_0x4974e2)break;const _0x3b0f22=dirname(_0x476ebb);if(_0x3b0f22===_0x476ebb)break;_0x476ebb=_0x3b0f22;}return resolve(_0x29b73c);}export function getProjectConfigPath(){const _0x342888=a285_0x300e91;return resolveConfigPath(process[_0x342888(0x189)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x2c4002){const _0x309e87=a285_0x300e91;if(!existsSync(_0x2c4002))return{'status':_0x309e87(0x188)};try{const _0x4fb7a4=readFileSync(_0x2c4002,{'encoding':_0x309e87(0x18e)});if(!_0x4fb7a4?.[_0x309e87(0x171)]())return{'status':_0x309e87(0x1a4)};const _0x12b7dc=JSON[_0x309e87(0x1a5)](_0x4fb7a4);return{'status':'ok','data':_0x12b7dc};}catch(_0x3bf679){return{'status':_0x309e87(0x16e),'message':_0x3bf679 instanceof Error?_0x3bf679[_0x309e87(0x187)]:String(_0x3bf679)};}}function parseCliConfigJsonFile(_0x23393f,_0x3cabe2,_0x979a3e){const _0x19c46a=a285_0x300e91,_0x1544f0=inspectCliConfigJsonFile(_0x23393f);if(_0x1544f0['status']===_0x19c46a(0x188)||_0x1544f0[_0x19c46a(0x16f)]===_0x19c46a(0x1a4))return{};if(_0x1544f0[_0x19c46a(0x16f)]==='ok')return _0x1544f0['data'];return _0x3cabe2===_0x19c46a(0x19a)&&_0x979a3e&&console[_0x19c46a(0x16e)](CLI_BIN_NAME+':\x20'+_0x979a3e+_0x19c46a(0x1a3)+_0x23393f+_0x19c46a(0x17e)+_0x1544f0[_0x19c46a(0x187)]),{};}function normalizeLegacyConfigShape(_0x3591df){const _0x534aeb=a285_0x300e91;if(!_0x3591df||typeof _0x3591df!==_0x534aeb(0x186))return{'config':{},'migrated':![]};const _0x11a159={..._0x3591df},_0xf8c208=_0x11a159[_0x534aeb(0x184)]&&typeof _0x11a159['apps']===_0x534aeb(0x186)?{..._0x11a159[_0x534aeb(0x184)]}:{},_0x2ada9a=Object[_0x534aeb(0x185)](_0xf8c208)[_0x534aeb(0x17a)],_0x3c0dc8=_0x11a159[_0x534aeb(0x19b)]||_0x11a159['app'];let _0xe2610f=![];if(_0x3c0dc8&&_0x2ada9a===0x0){const _0x2c6cdb=typeof _0x11a159['defaultApp']===_0x534aeb(0x195)&&_0x11a159[_0x534aeb(0x19f)][_0x534aeb(0x171)]()?_0x11a159[_0x534aeb(0x19f)]:String(_0x3c0dc8)[_0x534aeb(0x171)]();_0xf8c208[_0x2c6cdb]={'appcode':String(_0x3c0dc8)[_0x534aeb(0x171)](),..._0x11a159[_0x534aeb(0x19d)]!=null?{'env':_0x11a159[_0x534aeb(0x19d)]}:{},..._0x11a159[_0x534aeb(0x178)]!=null?{'apiDir':_0x11a159[_0x534aeb(0x178)]}:{},..._0x11a159[_0x534aeb(0x194)]!=null?{'cookie':_0x11a159[_0x534aeb(0x194)]}:{},..._0x11a159[_0x534aeb(0x18c)]!=null?{'accessKey':_0x11a159[_0x534aeb(0x18c)]}:{},..._0x11a159['format']!=null?{'format':_0x11a159[_0x534aeb(0x199)]}:{},..._0x11a159[_0x534aeb(0x18f)]!=null?{'pageSize':_0x11a159[_0x534aeb(0x18f)]}:{},..._0x11a159[_0x534aeb(0x176)]!=null?{'riskLevel':_0x11a159[_0x534aeb(0x176)]}:{},..._0x11a159[_0x534aeb(0x196)]!=null?{'locale':_0x11a159[_0x534aeb(0x196)]}:{}},_0x11a159[_0x534aeb(0x184)]=_0xf8c208,delete _0x11a159[_0x534aeb(0x19f)],_0xe2610f=!![];}return(_0x534aeb(0x19b)in _0x11a159||_0x534aeb(0x172)in _0x11a159)&&(delete _0x11a159['appcode'],delete _0x11a159[_0x534aeb(0x172)],_0xe2610f=!![]),{'config':_0x11a159,'migrated':_0xe2610f};}function writeNormalizedConfigIfNeeded(_0x441201,_0x6d86db){const _0x52bece=a285_0x300e91,_0x3b2055=JSON['stringify'](normalizeConfigForWrite(_0x6d86db),null,0x2)+'\x0a';if(normalizedWriteCache[_0x52bece(0x190)](_0x441201)===_0x3b2055)return;writeConfigFile(_0x441201,_0x6d86db),normalizedWriteCache[_0x52bece(0x173)](_0x441201,_0x3b2055);}function parseAndNormalizeConfig(_0x4b1e57,_0x55ba48,_0x4391a1){const _0x4d8563=a285_0x300e91,_0x5125d5=parseCliConfigJsonFile(_0x4b1e57,_0x55ba48,_0x4391a1),_0x1b1538=normalizeLegacyConfigShape(_0x5125d5);if(_0x1b1538['migrated'])try{writeNormalizedConfigIfNeeded(_0x4b1e57,_0x1b1538[_0x4d8563(0x1a6)]);}catch{}return _0x1b1538[_0x4d8563(0x1a6)];}export function loadRawConfigLayers(_0x5ae311){const _0x1bff9c=a285_0x300e91;let _0x112037={},_0x4d64bf={};const _0x540daa=resolveConfigPath(homedir());_0x540daa&&(_0x112037=parseAndNormalizeConfig(_0x540daa,'warn',_0x1bff9c(0x19e)));const _0x48a14e=_0x5ae311??findProjectRootDirectory(),_0x442837=resolveConfigPath(_0x48a14e);return _0x442837&&(_0x4d64bf=parseAndNormalizeConfig(_0x442837,_0x1bff9c(0x19a),_0x1bff9c(0x18d))),{'globalPath':_0x540daa,'projectPath':_0x442837,'globalConfig':_0x112037,'projectConfig':_0x4d64bf};}const INHERIT_WHITELIST=['cookie','accessKey',a285_0x300e91(0x196),'format','riskLevel',a285_0x300e91(0x18f),a285_0x300e91(0x17f),a285_0x300e91(0x193),'userDomain',a285_0x300e91(0x17d),a285_0x300e91(0x197),a285_0x300e91(0x16d),a285_0x300e91(0x183),a285_0x300e91(0x180),a285_0x300e91(0x191),a285_0x300e91(0x17c),a285_0x300e91(0x17b)];export function mergeRawConfigLayers(_0x2ac990){const _0x455f72=a285_0x300e91,{globalConfig:_0x55367f,projectConfig:_0x54d58c}=_0x2ac990,_0x4e6ee7=!!_0x2ac990[_0x455f72(0x19c)]||Object[_0x455f72(0x185)](_0x54d58c)[_0x455f72(0x17a)]>0x0;if(!_0x4e6ee7)return mergeGlobalOnly(_0x55367f);return mergeProjectFirst(_0x55367f,_0x54d58c);}function mergeGlobalOnly(_0xdacea1){const _0x3b87ff=a285_0x300e91,_0x2eb989={..._0xdacea1};delete _0x2eb989[_0x3b87ff(0x192)];const _0x36aa52=_0xdacea1[_0x3b87ff(0x184)]&&typeof _0xdacea1['apps']===_0x3b87ff(0x186)?_0xdacea1[_0x3b87ff(0x184)]:{};if(Object['keys'](_0x36aa52)[_0x3b87ff(0x17a)]>0x0)_0x2eb989[_0x3b87ff(0x184)]=_0x36aa52;if(_0xdacea1['defaultApp'])_0x2eb989['defaultApp']=_0xdacea1[_0x3b87ff(0x19f)];return _0x2eb989;}function mergeProjectFirst(_0x2b5049,_0x3973de){const _0x1ed3bc=a285_0x300e91,_0x424950={..._0x3973de};delete _0x424950['inherit'];for(const _0x2a6864 of INHERIT_WHITELIST){!(_0x2a6864 in _0x424950)&&_0x2a6864 in _0x2b5049&&(_0x424950[_0x2a6864]=_0x2b5049[_0x2a6864]);}const _0xff1fbf=_0x3973de['apps']&&typeof _0x3973de[_0x1ed3bc(0x184)]===_0x1ed3bc(0x186)?_0x3973de[_0x1ed3bc(0x184)]:{};return Object[_0x1ed3bc(0x185)](_0xff1fbf)[_0x1ed3bc(0x17a)]>0x0?_0x424950['apps']=_0xff1fbf:delete _0x424950[_0x1ed3bc(0x184)],'defaultApp'in _0x3973de?_0x424950[_0x1ed3bc(0x19f)]=_0x3973de[_0x1ed3bc(0x19f)]:delete _0x424950[_0x1ed3bc(0x19f)],_0x424950;}export function readRawConfigWithLayers(_0x43f23b){const _0x11a4d6=loadRawConfigLayers(_0x43f23b);return{'config':mergeRawConfigLayers(_0x11a4d6),'layers':_0x11a4d6};}export function readRawConfig(_0xdb9950){return mergeRawConfigLayers(loadRawConfigLayers(_0xdb9950));}export function readConfigFile(_0x5926e1){const _0x5222ef=a285_0x300e91;return parseAndNormalizeConfig(_0x5926e1,_0x5222ef(0x175));}export function writeConfigFile(_0x232bab,_0x9edf1f){const _0x1aa9a6=a285_0x300e91,_0x1eee31=dirname(_0x232bab);!existsSync(_0x1eee31)&&mkdirSync(_0x1eee31,{'recursive':!![]});const _0x3f1423=_0x232bab+_0x1aa9a6(0x1a0);try{const _0x33b35a=normalizeConfigForWrite(_0x9edf1f);writeFileSync(_0x3f1423,JSON[_0x1aa9a6(0x18a)](_0x33b35a,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0x3f1423,_0x232bab);}catch(_0x45b67f){try{unlinkSync(_0x3f1423);}catch{}throw _0x45b67f;}}function a285_0x4f6e(){const _0x48c941=['utf8','pageSize','get','appDomain','inherit','routing','cookie','string','locale','runtimeDomain','906898cMlPSr','format','warn','appcode','projectPath','env','Global','defaultApp','.tmp','1690UNtAcI','3978702Srdpjs','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','empty','parse','config','1659648saRDin','skillDomain','error','status','20EqIHUe','trim','app','set','402474xbathx','silent','riskLevel','600136YTLiKj','apiDir','3676dzqrcb','length','certificateDomain','localDomain','apiDomain','\x0a\x20\x20','region','kbServiceDomain','314109TdWXMj','.rabetbase.json','kbDomain','apps','keys','object','message','missing','cwd','stringify','14VNAEMd','accessKey','Project'];a285_0x4f6e=function(){return _0x48c941;};return a285_0x4f6e();}function a285_0x1349(_0x2b25ce,_0x1712ca){_0x2b25ce=_0x2b25ce-0x16d;const _0x4f6e99=a285_0x4f6e();let _0x1349a0=_0x4f6e99[_0x2b25ce];return _0x1349a0;}export function resolveWriteConfigPath(_0x567388){const _0x19edc2=a285_0x300e91,_0xcf8d7d=_0x567388==='project'?process[_0x19edc2(0x189)]():homedir(),_0x2a0475=resolveConfigPath(_0xcf8d7d);return _0x2a0475??resolve(_0xcf8d7d,NEW_CONFIG_NAME);}
package/lib/context.js CHANGED
@@ -1 +1 @@
1
- const a286_0xd59356=a286_0x1e7d;(function(_0x5d1761,_0x479d52){const _0x2af36c=a286_0x1e7d,_0x316bd3=_0x5d1761();while(!![]){try{const _0x2d25b9=parseInt(_0x2af36c(0x138))/0x1+parseInt(_0x2af36c(0x11f))/0x2*(parseInt(_0x2af36c(0x119))/0x3)+parseInt(_0x2af36c(0x126))/0x4*(-parseInt(_0x2af36c(0x12e))/0x5)+-parseInt(_0x2af36c(0x146))/0x6*(-parseInt(_0x2af36c(0x136))/0x7)+-parseInt(_0x2af36c(0x131))/0x8+-parseInt(_0x2af36c(0x13d))/0x9*(-parseInt(_0x2af36c(0x124))/0xa)+parseInt(_0x2af36c(0x108))/0xb*(-parseInt(_0x2af36c(0x10f))/0xc);if(_0x2d25b9===_0x479d52)break;else _0x316bd3['push'](_0x316bd3['shift']());}catch(_0x3bbd03){_0x316bd3['push'](_0x316bd3['shift']());}}}(a286_0x4033,0x60e03));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,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';import{resolveConfiguredRegion,resolveEffectiveRegion}from'./config/region-config.js';import{resolveEnterpriseRoutingManifest}from'./config/domain-config.js';function a286_0x4033(){const _0x1d2e8f=['3860tEDpiF','doctor','620HSvytl','argv','env','agentDomain','values','call','object','regionSource','14735JiydMG','daily','string','5794656LTmwGN','apiGroup','region','https://g.lovrabet.com/dist/lovrabet-skill','apps','819pFutHU','filter','389877JJCCWc','appDomain','filePath','prototype','replace','11574lISvuD','configuredRegion','userDomain','currentApp','template_base_url','projectConfig','localDomain','./utils/is-non-interactive.js','skillDomain','37998uVBwOg','app\x20profile\x20\x22','domains','apiDir','routing','name','apiDomain','routingConfig','cookie','Rabetbase\x20configuration','raw','trim','./constant/domain.js','setLogPath','kbServiceDomain','source','297AnDWBN','appcode','regionConfiguredValue','runtimeDomain','project\x20Rabetbase\x20configuration','certificateDomain','entries','66876QCoskg','cwd','production','project','globalConfig','regionLocation','hasOwnProperty','length','skillHubDomain','setRawCommand','303471eUTJuW','defaultApp','keys','config','map','merged','2KBmJVs','some','kbDomain','targetEnv','app'];a286_0x4033=function(){return _0x1d2e8f;};return a286_0x4033();}import{logger}from'./utils/logger.js';import{resolveApiModelSource}from'./api/model-source.js';function a286_0x1e7d(_0x4e139c,_0x50a919){_0x4e139c=_0x4e139c-0xff;const _0x4033a9=a286_0x4033();let _0x1e7dbc=_0x4033a9[_0x4e139c];return _0x1e7dbc;}export{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x21566d){return process.env[`RABETBASE_${_0x21566d}`]||process.env[`LOVRABET_${_0x21566d}`]||undefined;}function optionalString(_0x782c29){const _0x553b98=a286_0x1e7d;return typeof _0x782c29===_0x553b98(0x130)&&_0x782c29['trim']()?_0x782c29[_0x553b98(0x103)]():undefined;}export function isRoutingRecoveryService(_0x2f92c2){const _0x313dc5=a286_0x1e7d;return _0x2f92c2===_0x313dc5(0x11c)||_0x2f92c2===_0x313dc5(0x125);}export async function createContext(_0x3db59c){const _0x15bd59=a286_0x1e7d,{config:_0x4b4f81,layers:_0x1d93da}=readRawConfigWithLayers(),_0x384a76=buildConfig(_0x4b4f81,_0x3db59c,_0x1d93da);await initGlobalEnvironment(_0x384a76);const {getUserDomain:_0x4c2e0,getApiDomain:_0x26df01}=await import(_0x15bd59(0x104)),_0x7f8ac={'apiDomain':_0x26df01(),'userDomain':_0x4c2e0()},_0x46b9e7=await buildAuth(_0x384a76);logger[_0x15bd59(0x105)](process[_0x15bd59(0x110)]());const _0x47301c=(CLI_BIN_NAME+'\x20'+process[_0x15bd59(0x127)]['slice'](0x2)['join']('\x20'))['trim']();logger[_0x15bd59(0x118)](_0x47301c);const {isNonInteractive:_0x17cd14}=await import(_0x15bd59(0x144)),_0x35ff83=_0x17cd14(_0x3db59c);return{'config':_0x384a76,'auth':_0x46b9e7,'logger':logger,'env':_0x7f8ac,'nonInteractive':_0x35ff83};}export function buildConfigFromFlags(_0x55e527){const {config:_0x13fa7a,layers:_0x4c8fd6}=readRawConfigWithLayers();return buildConfig(_0x13fa7a,_0x55e527,_0x4c8fd6);}export async function initGlobalEnvironment(_0x495d5e){const _0x3d4dc0=a286_0x1e7d,_0x56ca27=_0x495d5e[_0x3d4dc0(0x12d)]===_0x3d4dc0(0x123)&&_0x495d5e[_0x3d4dc0(0x140)]?_0x3d4dc0(0x147)+_0x495d5e[_0x3d4dc0(0x140)]+'\x22':_0x495d5e[_0x3d4dc0(0x12d)]===_0x3d4dc0(0x112)?_0x3d4dc0(0x10c):_0x495d5e['regionSource']==='global'?'global\x20Rabetbase\x20configuration':_0x3d4dc0(0x101);await initConfiguredEnvironment({'raw':_0x495d5e[_0x3d4dc0(0x102)],'configuredRegion':_0x495d5e[_0x3d4dc0(0x10a)]??_0x495d5e['raw']?.[_0x3d4dc0(0x133)]??_0x495d5e['region'],'regionLocation':_0x56ca27,'targetEnv':_0x495d5e[_0x3d4dc0(0x128)]});}async function initConfiguredEnvironment(_0x5191cf){const _0x3297f4=a286_0x1e7d,_0x56ec00=resolveConfiguredRegion(_0x5191cf[_0x3297f4(0x13e)],_0x5191cf[_0x3297f4(0x114)]),_0xf919cc=resolveEnterpriseRoutingManifest(_0x5191cf[_0x3297f4(0x102)]?.['routing']),_0x446c51={'region':_0x56ec00,'apiDomain':_0xf919cc?_0xf919cc[_0x3297f4(0x148)][_0x3297f4(0x14c)]:optionalString(_0x5191cf['raw']?.[_0x3297f4(0x14c)]),'userDomain':_0xf919cc?_0xf919cc[_0x3297f4(0x148)][_0x3297f4(0x13f)]:optionalString(_0x5191cf[_0x3297f4(0x102)]?.[_0x3297f4(0x13f)]),'runtimeDomain':_0xf919cc?_0xf919cc[_0x3297f4(0x148)][_0x3297f4(0x10b)]:optionalString(_0x5191cf['raw']?.[_0x3297f4(0x10b)]),'skillDomain':_0xf919cc?_0xf919cc[_0x3297f4(0x148)][_0x3297f4(0x145)]:optionalString(_0x5191cf[_0x3297f4(0x102)]?.[_0x3297f4(0x145)])||optionalString(_0x5191cf[_0x3297f4(0x102)]?.[_0x3297f4(0x117)])||optionalString(_0x5191cf[_0x3297f4(0x102)]?.[_0x3297f4(0x129)])||optionalString(_0x5191cf[_0x3297f4(0x102)]?.['platformDomain']),'kbDomain':_0xf919cc?_0xf919cc[_0x3297f4(0x148)][_0x3297f4(0x121)]:optionalString(_0x5191cf[_0x3297f4(0x102)]?.[_0x3297f4(0x121)])||optionalString(_0x5191cf[_0x3297f4(0x102)]?.[_0x3297f4(0x129)])||optionalString(_0x5191cf[_0x3297f4(0x102)]?.['platformDomain']),'kbServiceDomain':_0xf919cc?_0xf919cc[_0x3297f4(0x148)][_0x3297f4(0x106)]:optionalString(_0x5191cf[_0x3297f4(0x102)]?.[_0x3297f4(0x106)]),'appDomain':_0xf919cc?_0xf919cc[_0x3297f4(0x148)]['appDomain']:optionalString(_0x5191cf['raw']?.['appDomain']),'localDomain':_0xf919cc?_0xf919cc['domains'][_0x3297f4(0x143)]:optionalString(_0x5191cf[_0x3297f4(0x102)]?.[_0x3297f4(0x143)]),'certificateDomain':_0xf919cc?_0xf919cc[_0x3297f4(0x148)][_0x3297f4(0x10d)]:optionalString(_0x5191cf[_0x3297f4(0x102)]?.[_0x3297f4(0x10d)]),'cdn':_0xf919cc?.['cdn'],'allowOfficialKbServiceDefault':!(_0xf919cc!==undefined||['apiDomain',_0x3297f4(0x13f),'runtimeDomain',_0x3297f4(0x145),_0x3297f4(0x117),_0x3297f4(0x121),_0x3297f4(0x106),_0x3297f4(0x129),'platformDomain',_0x3297f4(0x139),_0x3297f4(0x143),_0x3297f4(0x10d)][_0x3297f4(0x120)](_0x129d60=>Object['prototype'][_0x3297f4(0x115)][_0x3297f4(0x12b)](_0x5191cf[_0x3297f4(0x102)]??{},_0x129d60)))},{initEnv:_0x583291}=await import('./constant/env.js'),{initDomains:_0x26a572}=await import(_0x3297f4(0x104));_0x583291(_0x5191cf[_0x3297f4(0x122)]),_0x26a572(_0x446c51);}export async function initMultiAppEnvironment(_0x239b5a){const _0x3ee5e0=a286_0x1e7d;await initConfiguredEnvironment({'raw':_0x239b5a[_0x3ee5e0(0xff)],'configuredRegion':_0x239b5a[_0x3ee5e0(0x133)],'regionLocation':'app\x20profile\x20\x22'+_0x239b5a[_0x3ee5e0(0x14b)]+'\x22','targetEnv':_0x239b5a['env']===_0x3ee5e0(0x12f)?'daily':_0x3ee5e0(0x111)});}export function getConfigAppCode(_0x5a617c){const _0x5d40a7=a286_0x1e7d,_0x265b8a=readRawConfig(_0x5a617c);if(_0x265b8a[_0x5d40a7(0x135)]&&typeof _0x265b8a[_0x5d40a7(0x135)]===_0x5d40a7(0x12c)){const _0x2a6677=_0x265b8a[_0x5d40a7(0x11a)];if(_0x2a6677)return _0x265b8a[_0x5d40a7(0x135)][_0x2a6677]?.[_0x5d40a7(0x109)]?String(_0x265b8a[_0x5d40a7(0x135)][_0x2a6677][_0x5d40a7(0x109)])[_0x5d40a7(0x103)]():undefined;const _0x46cb64=Object[_0x5d40a7(0x12a)](_0x265b8a[_0x5d40a7(0x135)]);if(_0x46cb64[_0x5d40a7(0x116)]===0x1&&_0x46cb64[0x0]?.[_0x5d40a7(0x109)])return String(_0x46cb64[0x0]['appcode'])[_0x5d40a7(0x103)]();}const _0x2349fe=_0x265b8a[_0x5d40a7(0x109)]||_0x265b8a[_0x5d40a7(0x123)];if(typeof _0x2349fe!==_0x5d40a7(0x130)||_0x2349fe[_0x5d40a7(0x103)]()==='')return undefined;return _0x2349fe[_0x5d40a7(0x103)]();}const CONNECTION_ROUTING_KEYS=[a286_0xd59356(0x14a),a286_0xd59356(0x14c),'userDomain',a286_0xd59356(0x10b),a286_0xd59356(0x145),a286_0xd59356(0x117),'kbDomain',a286_0xd59356(0x106),a286_0xd59356(0x129),'platformDomain',a286_0xd59356(0x139),a286_0xd59356(0x143),a286_0xd59356(0x10d)];function withAppProfileRouting(_0xa7a361,_0x1ab3e9){const _0x2335ed=a286_0xd59356;if(!_0x1ab3e9||_0x1ab3e9[_0x2335ed(0x106)]===undefined)return _0xa7a361;return{..._0xa7a361,'kbServiceDomain':_0x1ab3e9[_0x2335ed(0x106)]};}function pickConnectionRoutingConfig(_0x124acb,_0xb3f5b0){const _0x55fb8f={'region':_0xb3f5b0};for(const _0x28a315 of CONNECTION_ROUTING_KEYS){if(_0x124acb[_0x28a315]!==undefined)_0x55fb8f[_0x28a315]=_0x124acb[_0x28a315];}return _0x55fb8f;}export function getMultiAppConfigs(_0x22a17f=a286_0xd59356(0x112),_0x23a077){const _0x19129f=a286_0xd59356,_0x37ceca=loadRawConfigLayers(_0x23a077);let _0x126e15,_0x1e4008;const _0x471409=mergeRawConfigLayers(_0x37ceca),_0x1f44e6=_0x37ceca[_0x19129f(0x113)][_0x19129f(0x135)]&&typeof _0x37ceca[_0x19129f(0x113)]['apps']===_0x19129f(0x12c)?_0x37ceca[_0x19129f(0x113)][_0x19129f(0x135)]:{},_0x4e0038=_0x37ceca[_0x19129f(0x142)]['apps']&&typeof _0x37ceca[_0x19129f(0x142)][_0x19129f(0x135)]==='object'?_0x37ceca[_0x19129f(0x142)]['apps']:{};_0x22a17f===_0x19129f(0x11e)?(_0x126e15={..._0x1f44e6,..._0x4e0038},_0x1e4008=_0x471409[_0x19129f(0x11a)]):(_0x126e15=_0x37ceca[_0x19129f(0x142)][_0x19129f(0x135)],_0x1e4008=_0x37ceca['projectConfig']['defaultApp']);!_0x1e4008&&_0x126e15&&typeof _0x126e15===_0x19129f(0x12c)&&Object[_0x19129f(0x11b)](_0x126e15)[_0x19129f(0x116)]===0x1&&(_0x1e4008=Object[_0x19129f(0x11b)](_0x126e15)[0x0]);if(!_0x126e15||typeof _0x126e15!=='object'||Object[_0x19129f(0x11b)](_0x126e15)[_0x19129f(0x116)]===0x0)return null;return Object[_0x19129f(0x10e)](_0x126e15)[_0x19129f(0x11d)](([_0x4ff4b4,_0x2018e7])=>{const _0x31e483=_0x19129f,_0x342e63=_0x22a17f===_0x31e483(0x112)||Object[_0x31e483(0x13b)][_0x31e483(0x115)][_0x31e483(0x12b)](_0x4e0038,_0x4ff4b4),_0xf12ee3=withAppProfileRouting(_0x342e63?_0x471409:_0x37ceca[_0x31e483(0x113)],_0x2018e7),_0x2a4f8a=resolveEffectiveRegion({'appRegion':_0x2018e7?.[_0x31e483(0x133)],'projectRegion':_0x342e63?_0x37ceca[_0x31e483(0x142)][_0x31e483(0x133)]:undefined,'globalRegion':_0x37ceca[_0x31e483(0x113)]['region'],'mergedRegion':_0xf12ee3['region'],'appName':_0x4ff4b4});return{'name':_0x4ff4b4,'appcode':_0x2018e7?.['appcode']||'','apiGroup':optionalString(_0x2018e7?.[_0x31e483(0x132)]),'isDefault':_0x4ff4b4===_0x1e4008,'region':_0x2a4f8a[_0x31e483(0x133)],'regionSource':_0x2a4f8a[_0x31e483(0x107)],'env':_0x2018e7?.[_0x31e483(0x128)],'apiDir':optionalString(_0x2018e7?.[_0x31e483(0x149)])||optionalString(_0xf12ee3[_0x31e483(0x149)]),'cookie':_0x2018e7?.[_0x31e483(0x100)]||undefined,'routingConfig':pickConnectionRoutingConfig(_0xf12ee3,_0x2a4f8a[_0x31e483(0x133)])};})[_0x19129f(0x137)](_0x3db9fa=>_0x3db9fa[_0x19129f(0x109)]);}export function getTemplateBaseUrl(_0x164bfb){const _0xc4ab86=a286_0xd59356,_0x375a0a=readRawConfig(_0x164bfb);if(_0x375a0a['template_base_url']&&typeof _0x375a0a[_0xc4ab86(0x141)]==='string')return _0x375a0a['template_base_url'][_0xc4ab86(0x13c)](/\/$/,'');return _0xc4ab86(0x134);}function buildConfig(_0x135aa8,_0x457115,_0x1c7f29){const _0x38e38f=a286_0xd59356,_0x3587b3=resolveAppConfig({'raw':_0x135aa8,'flags':_0x457115,'layers':_0x1c7f29,'readEnv':env}),_0x366b78=_0x3587b3[_0x38e38f(0x140)]?_0x3587b3[_0x38e38f(0x135)][_0x3587b3['currentApp']]:undefined;return{..._0x3587b3,'raw':withAppProfileRouting(_0x135aa8,_0x366b78)};}export function resolveApiFilePath(_0x40424a,_0xadc153,_0x5abc29){const _0x266ce3=a286_0xd59356;return resolveApiModelSource(_0x40424a,_0xadc153,_0x5abc29)[_0x266ce3(0x13a)];}
1
+ const a286_0x3d138f=a286_0x4f3d;(function(_0x5ec47b,_0x5cf523){const _0x3a6456=a286_0x4f3d,_0x2acfa6=_0x5ec47b();while(!![]){try{const _0x4a787a=-parseInt(_0x3a6456(0x1b1))/0x1+parseInt(_0x3a6456(0x188))/0x2+-parseInt(_0x3a6456(0x1b6))/0x3*(-parseInt(_0x3a6456(0x1c6))/0x4)+-parseInt(_0x3a6456(0x1af))/0x5*(-parseInt(_0x3a6456(0x1cd))/0x6)+parseInt(_0x3a6456(0x1bf))/0x7+parseInt(_0x3a6456(0x1cc))/0x8*(parseInt(_0x3a6456(0x1a7))/0x9)+-parseInt(_0x3a6456(0x19d))/0xa;if(_0x4a787a===_0x5cf523)break;else _0x2acfa6['push'](_0x2acfa6['shift']());}catch(_0x30ddc7){_0x2acfa6['push'](_0x2acfa6['shift']());}}}(a286_0x17a1,0xd58de));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,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';import{resolveConfiguredRegion,resolveEffectiveRegion}from'./config/region-config.js';import{resolveEnterpriseRoutingManifest}from'./config/domain-config.js';function a286_0x4f3d(_0x3b7d7f,_0x4db4e9){_0x3b7d7f=_0x3b7d7f-0x185;const _0x17a188=a286_0x17a1();let _0x4f3d62=_0x17a188[_0x3b7d7f];return _0x4f3d62;}import{logger}from'./utils/logger.js';import{resolveApiModelSource}from'./api/model-source.js';export{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x5933ae){return process.env[`RABETBASE_${_0x5933ae}`]||process.env[`LOVRABET_${_0x5933ae}`]||undefined;}function optionalString(_0x3e22f3){const _0x33b9f8=a286_0x4f3d;return typeof _0x3e22f3===_0x33b9f8(0x1c4)&&_0x3e22f3[_0x33b9f8(0x1b7)]()?_0x3e22f3[_0x33b9f8(0x1b7)]():undefined;}export function isRoutingRecoveryService(_0xcad1a7){const _0x5bcbc0=a286_0x4f3d;return _0xcad1a7==='config'||_0xcad1a7===_0x5bcbc0(0x1bc);}export async function createContext(_0x27b596){const _0x4f78ff=a286_0x4f3d,{config:_0x17eccf,layers:_0x34c8a1}=readRawConfigWithLayers(),_0x1835c0=buildConfig(_0x17eccf,_0x27b596,_0x34c8a1);await initGlobalEnvironment(_0x1835c0);const {getUserDomain:_0x1ab99d,getApiDomain:_0x4b398b}=await import('./constant/domain.js'),_0x3ae79b={'apiDomain':_0x4b398b(),'userDomain':_0x1ab99d()},_0x4dd7ee=await buildAuth(_0x1835c0);logger[_0x4f78ff(0x1c5)](process[_0x4f78ff(0x1a2)]());const _0x2b106e=(CLI_BIN_NAME+'\x20'+process[_0x4f78ff(0x1c9)][_0x4f78ff(0x191)](0x2)[_0x4f78ff(0x1aa)]('\x20'))[_0x4f78ff(0x1b7)]();logger['setRawCommand'](_0x2b106e);const {isNonInteractive:_0x2690cb}=await import(_0x4f78ff(0x1cf)),_0x96b060=_0x2690cb(_0x27b596);return{'config':_0x1835c0,'auth':_0x4dd7ee,'logger':logger,'env':_0x3ae79b,'nonInteractive':_0x96b060};}export function buildConfigFromFlags(_0x2d255a){const {config:_0x1d9f88,layers:_0x30164a}=readRawConfigWithLayers();return buildConfig(_0x1d9f88,_0x2d255a,_0x30164a);}export async function initGlobalEnvironment(_0x4e485d){const _0x434038=a286_0x4f3d,_0x4f1bb5=_0x4e485d[_0x434038(0x18a)]===_0x434038(0x1be)&&_0x4e485d[_0x434038(0x1ba)]?_0x434038(0x197)+_0x4e485d['currentApp']+'\x22':_0x4e485d['regionSource']===_0x434038(0x196)?_0x434038(0x1b0):_0x4e485d[_0x434038(0x18a)]===_0x434038(0x18d)?_0x434038(0x185):_0x434038(0x19a);await initConfiguredEnvironment({'raw':_0x4e485d['raw'],'configuredRegion':_0x4e485d[_0x434038(0x1a0)]??_0x4e485d[_0x434038(0x19b)]?.[_0x434038(0x187)]??_0x4e485d[_0x434038(0x187)],'regionLocation':_0x4f1bb5,'targetEnv':_0x4e485d[_0x434038(0x1c8)]});}async function initConfiguredEnvironment(_0x10851d){const _0x749d07=a286_0x4f3d,_0x705a6e=resolveConfiguredRegion(_0x10851d[_0x749d07(0x1d0)],_0x10851d[_0x749d07(0x194)]),_0x124c76=resolveEnterpriseRoutingManifest(_0x10851d['raw']?.[_0x749d07(0x1ce)]),_0x8d2942={'region':_0x705a6e,'apiDomain':_0x124c76?_0x124c76['domains'][_0x749d07(0x1a3)]:optionalString(_0x10851d[_0x749d07(0x19b)]?.[_0x749d07(0x1a3)]),'userDomain':_0x124c76?_0x124c76[_0x749d07(0x1a5)][_0x749d07(0x19c)]:optionalString(_0x10851d[_0x749d07(0x19b)]?.[_0x749d07(0x19c)]),'runtimeDomain':_0x124c76?_0x124c76[_0x749d07(0x1a5)][_0x749d07(0x190)]:optionalString(_0x10851d[_0x749d07(0x19b)]?.[_0x749d07(0x190)]),'skillDomain':_0x124c76?_0x124c76[_0x749d07(0x1a5)][_0x749d07(0x1a9)]:optionalString(_0x10851d[_0x749d07(0x19b)]?.[_0x749d07(0x1a9)])||optionalString(_0x10851d['raw']?.[_0x749d07(0x1a4)])||optionalString(_0x10851d[_0x749d07(0x19b)]?.['agentDomain'])||optionalString(_0x10851d[_0x749d07(0x19b)]?.[_0x749d07(0x198)]),'kbDomain':_0x124c76?_0x124c76[_0x749d07(0x1a5)]['kbDomain']:optionalString(_0x10851d[_0x749d07(0x19b)]?.[_0x749d07(0x1c3)])||optionalString(_0x10851d[_0x749d07(0x19b)]?.[_0x749d07(0x1c1)])||optionalString(_0x10851d[_0x749d07(0x19b)]?.['platformDomain']),'kbServiceDomain':_0x124c76?_0x124c76[_0x749d07(0x1a5)][_0x749d07(0x186)]:optionalString(_0x10851d[_0x749d07(0x19b)]?.[_0x749d07(0x186)]),'appDomain':_0x124c76?_0x124c76[_0x749d07(0x1a5)][_0x749d07(0x18b)]:optionalString(_0x10851d[_0x749d07(0x19b)]?.[_0x749d07(0x18b)]),'localDomain':_0x124c76?_0x124c76[_0x749d07(0x1a5)]['localDomain']:optionalString(_0x10851d[_0x749d07(0x19b)]?.['localDomain']),'certificateDomain':_0x124c76?_0x124c76[_0x749d07(0x1a5)][_0x749d07(0x1b2)]:optionalString(_0x10851d['raw']?.[_0x749d07(0x1b2)]),'cdn':_0x124c76?.['cdn'],'allowOfficialKbServiceDefault':!(_0x124c76!==undefined||[_0x749d07(0x1a3),'userDomain',_0x749d07(0x190),_0x749d07(0x1a9),_0x749d07(0x1a4),_0x749d07(0x1c3),'kbServiceDomain',_0x749d07(0x1c1),_0x749d07(0x198),_0x749d07(0x18b),_0x749d07(0x1a6),_0x749d07(0x1b2)]['some'](_0x30c828=>Object[_0x749d07(0x19e)][_0x749d07(0x19f)][_0x749d07(0x1ae)](_0x10851d[_0x749d07(0x19b)]??{},_0x30c828)))},{initEnv:_0x428208}=await import(_0x749d07(0x1b4)),{initDomains:_0x1faaa3}=await import(_0x749d07(0x18e));_0x428208(_0x10851d['targetEnv']),_0x1faaa3(_0x8d2942);}export async function initMultiAppEnvironment(_0x53b4da){const _0x52c7ab=a286_0x4f3d;await initConfiguredEnvironment({'raw':_0x53b4da[_0x52c7ab(0x18f)],'configuredRegion':_0x53b4da[_0x52c7ab(0x187)],'regionLocation':'app\x20profile\x20\x22'+_0x53b4da[_0x52c7ab(0x1d1)]+'\x22','targetEnv':_0x53b4da[_0x52c7ab(0x1c8)]===_0x52c7ab(0x18c)?_0x52c7ab(0x18c):_0x52c7ab(0x1a8)});}function a286_0x17a1(){const _0x5b5f49=['apps','kbDomain','string','setLogPath','54916AcUZoQ','keys','env','argv','source','appcode','24oAjfcH','30oLKgqJ','routing','./utils/is-non-interactive.js','configuredRegion','name','global\x20Rabetbase\x20configuration','kbServiceDomain','region','514818tguXfq','cookie','regionSource','appDomain','daily','global','./constant/domain.js','routingConfig','runtimeDomain','slice','globalConfig','defaultApp','regionLocation','entries','project','app\x20profile\x20\x22','platformDomain','map','Rabetbase\x20configuration','raw','userDomain','21703510qtgWzJ','prototype','hasOwnProperty','regionConfiguredValue','length','cwd','apiDomain','skillHubDomain','domains','localDomain','2923173JfCgCh','production','skillDomain','join','filter','object','apiDir','call','1714120Frmwwu','project\x20Rabetbase\x20configuration','766082EExFPB','certificateDomain','filePath','./constant/env.js','apiGroup','141RPJQLQ','trim','https://g.lovrabet.com/dist/lovrabet-skill','replace','currentApp','projectConfig','doctor','template_base_url','app','1539776farGdF','merged','agentDomain'];a286_0x17a1=function(){return _0x5b5f49;};return a286_0x17a1();}export function getConfigAppCode(_0x483a78){const _0x4e38d8=a286_0x4f3d,_0x1e924e=readRawConfig(_0x483a78);if(_0x1e924e['apps']&&typeof _0x1e924e['apps']===_0x4e38d8(0x1ac)){const _0x2e9982=_0x1e924e[_0x4e38d8(0x193)];if(_0x2e9982)return _0x1e924e[_0x4e38d8(0x1c2)][_0x2e9982]?.[_0x4e38d8(0x1cb)]?String(_0x1e924e[_0x4e38d8(0x1c2)][_0x2e9982][_0x4e38d8(0x1cb)])[_0x4e38d8(0x1b7)]():undefined;const _0x89a748=Object['values'](_0x1e924e[_0x4e38d8(0x1c2)]);if(_0x89a748['length']===0x1&&_0x89a748[0x0]?.[_0x4e38d8(0x1cb)])return String(_0x89a748[0x0]['appcode'])[_0x4e38d8(0x1b7)]();}const _0x1186f0=_0x1e924e[_0x4e38d8(0x1cb)]||_0x1e924e[_0x4e38d8(0x1be)];if(typeof _0x1186f0!==_0x4e38d8(0x1c4)||_0x1186f0[_0x4e38d8(0x1b7)]()==='')return undefined;return _0x1186f0[_0x4e38d8(0x1b7)]();}const CONNECTION_ROUTING_KEYS=[a286_0x3d138f(0x1ce),a286_0x3d138f(0x1a3),'userDomain',a286_0x3d138f(0x190),a286_0x3d138f(0x1a9),a286_0x3d138f(0x1a4),a286_0x3d138f(0x1c3),a286_0x3d138f(0x186),a286_0x3d138f(0x1c1),'platformDomain',a286_0x3d138f(0x18b),a286_0x3d138f(0x1a6),a286_0x3d138f(0x1b2)];function withAppProfileRouting(_0x2065bd,_0x4ade16){const _0x312ec2=a286_0x3d138f;if(!_0x4ade16||_0x4ade16[_0x312ec2(0x186)]===undefined)return _0x2065bd;return{..._0x2065bd,'kbServiceDomain':_0x4ade16[_0x312ec2(0x186)]};}function pickConnectionRoutingConfig(_0x3a2e4b,_0x23b9fa){const _0x3d3d53={'region':_0x23b9fa};for(const _0x2dacb9 of CONNECTION_ROUTING_KEYS){if(_0x3a2e4b[_0x2dacb9]!==undefined)_0x3d3d53[_0x2dacb9]=_0x3a2e4b[_0x2dacb9];}return _0x3d3d53;}export function getMultiAppConfigs(_0x1fc28c='project',_0x5f4482){const _0x289f9d=a286_0x3d138f,_0x1bd6e7=loadRawConfigLayers(_0x5f4482);let _0x49b1ca,_0x5cdc10;const _0x4cf499=mergeRawConfigLayers(_0x1bd6e7),_0x51c658=_0x1bd6e7[_0x289f9d(0x192)][_0x289f9d(0x1c2)]&&typeof _0x1bd6e7['globalConfig'][_0x289f9d(0x1c2)]===_0x289f9d(0x1ac)?_0x1bd6e7[_0x289f9d(0x192)][_0x289f9d(0x1c2)]:{},_0x43e6a4=_0x1bd6e7['projectConfig'][_0x289f9d(0x1c2)]&&typeof _0x1bd6e7['projectConfig'][_0x289f9d(0x1c2)]===_0x289f9d(0x1ac)?_0x1bd6e7[_0x289f9d(0x1bb)]['apps']:{};_0x1fc28c===_0x289f9d(0x1c0)?(_0x49b1ca={..._0x51c658,..._0x43e6a4},_0x5cdc10=_0x4cf499[_0x289f9d(0x193)]):(_0x49b1ca=_0x1bd6e7[_0x289f9d(0x1bb)][_0x289f9d(0x1c2)],_0x5cdc10=_0x1bd6e7['projectConfig'][_0x289f9d(0x193)]);!_0x5cdc10&&_0x49b1ca&&typeof _0x49b1ca===_0x289f9d(0x1ac)&&Object[_0x289f9d(0x1c7)](_0x49b1ca)['length']===0x1&&(_0x5cdc10=Object[_0x289f9d(0x1c7)](_0x49b1ca)[0x0]);if(!_0x49b1ca||typeof _0x49b1ca!==_0x289f9d(0x1ac)||Object['keys'](_0x49b1ca)[_0x289f9d(0x1a1)]===0x0)return null;return Object[_0x289f9d(0x195)](_0x49b1ca)[_0x289f9d(0x199)](([_0x8060eb,_0x26bb97])=>{const _0x5cffb8=_0x289f9d,_0x4fdc4d=_0x1fc28c===_0x5cffb8(0x196)||Object[_0x5cffb8(0x19e)][_0x5cffb8(0x19f)][_0x5cffb8(0x1ae)](_0x43e6a4,_0x8060eb),_0x82279d=withAppProfileRouting(_0x4fdc4d?_0x4cf499:_0x1bd6e7[_0x5cffb8(0x192)],_0x26bb97),_0x4b4cf9=resolveEffectiveRegion({'appRegion':_0x26bb97?.[_0x5cffb8(0x187)],'projectRegion':_0x4fdc4d?_0x1bd6e7['projectConfig'][_0x5cffb8(0x187)]:undefined,'globalRegion':_0x1bd6e7[_0x5cffb8(0x192)]['region'],'mergedRegion':_0x82279d['region'],'appName':_0x8060eb});return{'name':_0x8060eb,'appcode':_0x26bb97?.[_0x5cffb8(0x1cb)]||'','apiGroup':optionalString(_0x26bb97?.[_0x5cffb8(0x1b5)]),'isDefault':_0x8060eb===_0x5cdc10,'region':_0x4b4cf9[_0x5cffb8(0x187)],'regionSource':_0x4b4cf9[_0x5cffb8(0x1ca)],'env':_0x26bb97?.[_0x5cffb8(0x1c8)],'apiDir':optionalString(_0x26bb97?.[_0x5cffb8(0x1ad)])||optionalString(_0x82279d[_0x5cffb8(0x1ad)]),'cookie':_0x26bb97?.[_0x5cffb8(0x189)]||undefined,'routingConfig':pickConnectionRoutingConfig(_0x82279d,_0x4b4cf9[_0x5cffb8(0x187)])};})[_0x289f9d(0x1ab)](_0x506a74=>_0x506a74[_0x289f9d(0x1cb)]);}export function getTemplateBaseUrl(_0x450109){const _0x3d049f=a286_0x3d138f,_0x23bf0e=readRawConfig(_0x450109);if(_0x23bf0e[_0x3d049f(0x1bd)]&&typeof _0x23bf0e['template_base_url']===_0x3d049f(0x1c4))return _0x23bf0e[_0x3d049f(0x1bd)][_0x3d049f(0x1b9)](/\/$/,'');return _0x3d049f(0x1b8);}function buildConfig(_0x1087d6,_0x896d20,_0x38edb2){const _0x572164=a286_0x3d138f,_0x4223e5=resolveAppConfig({'raw':_0x1087d6,'flags':_0x896d20,'layers':_0x38edb2,'readEnv':env}),_0x164106=_0x4223e5[_0x572164(0x1ba)]?_0x4223e5[_0x572164(0x1c2)][_0x4223e5['currentApp']]:undefined;return{..._0x4223e5,'raw':withAppProfileRouting(_0x1087d6,_0x164106)};}export function resolveApiFilePath(_0xf8da8,_0x322c4d,_0x342429){const _0x378439=a286_0x3d138f;return resolveApiModelSource(_0xf8da8,_0x322c4d,_0x342429)[_0x378439(0x1b3)];}
@@ -1 +1 @@
1
- const a287_0x211503=a287_0x152b;(function(_0xbad508,_0x405c91){const _0x89d476=a287_0x152b,_0x5133dc=_0xbad508();while(!![]){try{const _0x4ee669=parseInt(_0x89d476(0x1ef))/0x1+parseInt(_0x89d476(0x1f1))/0x2+parseInt(_0x89d476(0x1dc))/0x3+-parseInt(_0x89d476(0x1e6))/0x4*(parseInt(_0x89d476(0x1d6))/0x5)+parseInt(_0x89d476(0x1e5))/0x6+-parseInt(_0x89d476(0x1e3))/0x7+parseInt(_0x89d476(0x1df))/0x8*(parseInt(_0x89d476(0x1ec))/0x9);if(_0x4ee669===_0x405c91)break;else _0x5133dc['push'](_0x5133dc['shift']());}catch(_0x2782ff){_0x5133dc['push'](_0x5133dc['shift']());}}}(a287_0x5919,0xa2df2));import{existsSync,readFileSync,realpathSync,statSync}from'node:fs';function a287_0x5919(){const _0x3fdde1=['../','1223854PAjRcB','endsWith','flatMap','datasetCode','utf-8','add','.mts','startsWith','map','.tsx','.cts','has','length','1074495YXwbiQ','push','exec','.mjs','size','defaultProfile','2626764DzeVXS','index','name','3108344eZxBdE','set','.jsx','.ts','5698182pXjioK','source','2509626EeLsNq','20jRzPMo','.cjs','cwd','alias','get','filter','9FswPFO','slice','api.ts','261314qqxCKC'];a287_0x5919=function(){return _0x3fdde1;};return a287_0x5919();}import{dirname,extname,isAbsolute,relative,resolve}from'node:path';import{MODEL_REGISTRY_FILE_NAME,getProfileModels,readModelRegistry}from'../api/model-registry-file.js';import{parseLegacyApiModels}from'../api/legacy-api-file.js';import{findProjectRootDirectory}from'../context/config-loader.js';function a287_0x152b(_0x5910a6,_0x24a8f6){_0x5910a6=_0x5910a6-0x1d5;const _0x591965=a287_0x5919();let _0x152b2f=_0x591965[_0x5910a6];return _0x152b2f;}const cache=new Map(),MAX_LOCAL_REEXPORT_DEPTH=0x8,SOURCE_FILE_EXTENSIONS=[a287_0x211503(0x1e2),a287_0x211503(0x1fa),'.mts',a287_0x211503(0x1fb),'.js',a287_0x211503(0x1e1),a287_0x211503(0x1d9),a287_0x211503(0x1e7)],LOCAL_REEXPORT_RE=/\bexport\s+(?:type\s+)?(?:\{[\s\S]*?\}|\*)\s+from\s*["']([^"']+)["']/g,SOURCE_EXTENSIONS_BY_RUNTIME_EXTENSION={'.js':['.ts',a287_0x211503(0x1fa)],'.jsx':[a287_0x211503(0x1fa)],'.mjs':[a287_0x211503(0x1f7)],'.cjs':[a287_0x211503(0x1fb)]};function parseApiFile(_0x4da56a){const _0xe14e5c=a287_0x211503;return parseLegacyApiModels(_0x4da56a)[_0xe14e5c(0x1f3)](_0x4548a7=>_0x4548a7[_0xe14e5c(0x1e9)]?[{'alias':_0x4548a7[_0xe14e5c(0x1e9)],'datasetCode':_0x4548a7[_0xe14e5c(0x1f4)],'tableName':_0x4548a7['tableName'],'name':_0x4548a7[_0xe14e5c(0x1de)]}]:[]);}function isWithinRoot(_0x2e9144,_0x2fd956){const _0x10cc98=relative(_0x2e9144,_0x2fd956);return _0x10cc98===''||!_0x10cc98['startsWith']('..')&&!isAbsolute(_0x10cc98);}function resolveExistingFile(_0x5b1e63){if(!existsSync(_0x5b1e63))return undefined;try{return statSync(_0x5b1e63)['isFile']()?realpathSync(_0x5b1e63):undefined;}catch{return undefined;}}function reexportCandidatePaths(_0xaf4b80){const _0x12e7ce=a287_0x211503,_0x33c024=extname(_0xaf4b80);if(!_0x33c024)return[...SOURCE_FILE_EXTENSIONS[_0x12e7ce(0x1f9)](_0x52c629=>''+_0xaf4b80+_0x52c629),...SOURCE_FILE_EXTENSIONS['map'](_0x4108a5=>resolve(_0xaf4b80,_0x12e7ce(0x1dd)+_0x4108a5))];const _0x816355=SOURCE_EXTENSIONS_BY_RUNTIME_EXTENSION[_0x33c024];if(!_0x816355)return[_0xaf4b80];const _0x15df2d=_0xaf4b80[_0x12e7ce(0x1ed)](0x0,-_0x33c024[_0x12e7ce(0x1d5)]);return[..._0x816355[_0x12e7ce(0x1f9)](_0x30e143=>''+_0x15df2d+_0x30e143),_0xaf4b80];}function resolveLocalReexport(_0x269b46,_0x5ad493,_0x11d5b4){const _0x8a283a=a287_0x211503;if(!_0x5ad493[_0x8a283a(0x1f8)]('./')&&!_0x5ad493[_0x8a283a(0x1f8)](_0x8a283a(0x1f0)))return undefined;const _0x207993=resolve(dirname(_0x269b46),_0x5ad493);if(!isWithinRoot(_0x11d5b4,_0x207993))return undefined;for(const _0x38324c of reexportCandidatePaths(_0x207993)){const _0x1696d0=resolveExistingFile(_0x38324c);if(_0x1696d0&&isWithinRoot(_0x11d5b4,_0x1696d0))return _0x1696d0;}return undefined;}function parseApiFileTree(_0x137750,_0x410c59,_0xfbbfdf,_0xf33228){const _0x32ac78=a287_0x211503,_0x4a7e9b=resolveExistingFile(_0x137750);if(!_0x4a7e9b)return[];const _0x4fae39=_0xfbbfdf['get'](_0x4a7e9b);if(_0x4fae39!==undefined&&_0x4fae39<=_0xf33228)return[];_0xfbbfdf[_0x32ac78(0x1e0)](_0x4a7e9b,_0xf33228);const _0x19e3ce=readFileSync(_0x4a7e9b,_0x32ac78(0x1f5)),_0x52e7e9=parseApiFile(_0x19e3ce);if(_0xf33228>=MAX_LOCAL_REEXPORT_DEPTH)return _0x52e7e9;const _0x4252ed=new RegExp(LOCAL_REEXPORT_RE[_0x32ac78(0x1e4)],LOCAL_REEXPORT_RE['flags']);let _0x56ab77;while((_0x56ab77=_0x4252ed[_0x32ac78(0x1d8)](_0x19e3ce))!==null){const _0x26018a=resolveLocalReexport(_0x4a7e9b,_0x56ab77[0x1],_0x410c59);_0x26018a&&_0x52e7e9[_0x32ac78(0x1d7)](...parseApiFileTree(_0x26018a,_0x410c59,_0xfbbfdf,_0xf33228+0x1));}return _0x52e7e9;}function aliasProjectRoot(_0x70a0b6){const _0x2161d9=findProjectRootDirectory(dirname(_0x70a0b6));try{return realpathSync(_0x2161d9);}catch{return _0x2161d9;}}function uniqueAliasEntries(_0x356fbd){const _0x4a2630=a287_0x211503,_0x25a54e=new Set();return _0x356fbd[_0x4a2630(0x1eb)](_0x550d56=>{const _0x34d279=_0x4a2630,_0x2d9e2d=JSON['stringify'](_0x550d56);if(_0x25a54e[_0x34d279(0x1fc)](_0x2d9e2d))return![];return _0x25a54e[_0x34d279(0x1f6)](_0x2d9e2d),!![];});}export function loadAliasMap(_0x595a7f,_0x1190ac,_0x3ea727,_0x40d823){const _0x312711=a287_0x211503,_0x4a5613=resolve(_0x3ea727??resolve(process[_0x312711(0x1e8)](),_0x595a7f,_0x312711(0x1ee))),_0x56e8d9=_0x40d823?_0x4a5613+'#'+_0x40d823:_0x4a5613;if(cache[_0x312711(0x1fc)](_0x56e8d9))return cache[_0x312711(0x1ea)](_0x56e8d9);if(!existsSync(_0x4a5613))return cache[_0x312711(0x1e0)](_0x56e8d9,[]),[];try{if(_0x4a5613[_0x312711(0x1f2)](MODEL_REGISTRY_FILE_NAME)){const _0xf1e74c=readModelRegistry(_0x4a5613),_0x336525=_0x40d823??_0xf1e74c?.[_0x312711(0x1db)],_0x55b29b=_0x336525&&_0xf1e74c?getProfileModels(_0xf1e74c,_0x336525):[],_0x59e817=uniqueAliasEntries(_0x55b29b[_0x312711(0x1f3)](_0x1aa112=>_0x1aa112[_0x312711(0x1e9)]?[{'alias':_0x1aa112['alias'],'datasetCode':_0x1aa112[_0x312711(0x1f4)],'tableName':_0x1aa112['tableName'],'name':_0x1aa112['name']}]:[]));return cache['set'](_0x56e8d9,_0x59e817),_0x59e817;}const _0x2bd1bf=uniqueAliasEntries(parseApiFileTree(_0x4a5613,aliasProjectRoot(_0x4a5613),new Map(),0x0));return cache[_0x312711(0x1e0)](_0x56e8d9,_0x2bd1bf),_0x2bd1bf;}catch{return cache['set'](_0x56e8d9,[]),[];}}export function resolveAlias(_0x5f1cb1,_0x1c7b86,_0x25239f,_0x54e644,_0x13b3e9){const _0x5d4f2a=a287_0x211503;if(!_0x1c7b86)return undefined;const _0x307cf8=loadAliasMap(_0x5f1cb1,_0x25239f,_0x54e644,_0x13b3e9),_0x176c6d=new Set(_0x307cf8[_0x5d4f2a(0x1eb)](_0xc4b711=>_0xc4b711[_0x5d4f2a(0x1e9)]===_0x1c7b86)[_0x5d4f2a(0x1f9)](_0x24d252=>_0x24d252[_0x5d4f2a(0x1f4)]));return _0x176c6d[_0x5d4f2a(0x1da)]===0x1?[..._0x176c6d][0x0]:undefined;}export function listAliases(_0x276063,_0x5d78d0,_0x3a212f,_0x1dc613){return loadAliasMap(_0x276063,_0x5d78d0,_0x3a212f,_0x1dc613);}
1
+ const a287_0x2bfddd=a287_0x9903;(function(_0x40b63a,_0x42c438){const _0x23a989=a287_0x9903,_0x415b76=_0x40b63a();while(!![]){try{const _0x1b5ad8=parseInt(_0x23a989(0x1f6))/0x1*(parseInt(_0x23a989(0x1d6))/0x2)+parseInt(_0x23a989(0x1d7))/0x3+-parseInt(_0x23a989(0x1e1))/0x4*(-parseInt(_0x23a989(0x1ed))/0x5)+parseInt(_0x23a989(0x1dd))/0x6*(-parseInt(_0x23a989(0x1dc))/0x7)+parseInt(_0x23a989(0x1fc))/0x8+-parseInt(_0x23a989(0x1f9))/0x9*(parseInt(_0x23a989(0x1e2))/0xa)+-parseInt(_0x23a989(0x1de))/0xb*(parseInt(_0x23a989(0x1f0))/0xc);if(_0x1b5ad8===_0x42c438)break;else _0x415b76['push'](_0x415b76['shift']());}catch(_0x32ae0d){_0x415b76['push'](_0x415b76['shift']());}}}(a287_0x5c2a,0x1f0d1));import{existsSync,readFileSync,realpathSync,statSync}from'node:fs';import{dirname,extname,isAbsolute,relative,resolve}from'node:path';import{MODEL_REGISTRY_FILE_NAME,getProfileModels,readModelRegistry}from'../api/model-registry-file.js';function a287_0x9903(_0x40b067,_0x344f85){_0x40b067=_0x40b067-0x1d6;const _0x5c2a27=a287_0x5c2a();let _0x99036f=_0x5c2a27[_0x40b067];return _0x99036f;}function a287_0x5c2a(){const _0x27f2e8=['6417qOoPtZ','flatMap','push','288704WjvjjH','flags','.mts','324634hqaiee','533337lhRUsj','.tsx','.jsx','datasetCode','isFile','14LrmGhe','82632KpAwSp','1047233vBfKMV','defaultProfile','get','4276pQXBPp','1440LASTgB','endsWith','startsWith','length','.cjs','size','utf-8','index','map','.ts','set','335WSiING','name','.cts','24cWhToS','has','slice','source','api.ts','add','1jCwesH','alias','cwd'];a287_0x5c2a=function(){return _0x27f2e8;};return a287_0x5c2a();}import{parseLegacyApiModels}from'../api/legacy-api-file.js';import{findProjectRootDirectory}from'../context/config-loader.js';const cache=new Map(),MAX_LOCAL_REEXPORT_DEPTH=0x8,SOURCE_FILE_EXTENSIONS=[a287_0x2bfddd(0x1eb),a287_0x2bfddd(0x1d8),a287_0x2bfddd(0x1fe),a287_0x2bfddd(0x1ef),'.js',a287_0x2bfddd(0x1d9),'.mjs',a287_0x2bfddd(0x1e6)],LOCAL_REEXPORT_RE=/\bexport\s+(?:type\s+)?(?:\{[\s\S]*?\}|\*)\s+from\s*["']([^"']+)["']/g,SOURCE_EXTENSIONS_BY_RUNTIME_EXTENSION={'.js':[a287_0x2bfddd(0x1eb),a287_0x2bfddd(0x1d8)],'.jsx':['.tsx'],'.mjs':[a287_0x2bfddd(0x1fe)],'.cjs':['.cts']};function parseApiFile(_0x4fb790){const _0x55c4a3=a287_0x2bfddd;return parseLegacyApiModels(_0x4fb790)[_0x55c4a3(0x1fa)](_0x16cc49=>_0x16cc49[_0x55c4a3(0x1f7)]?[{'alias':_0x16cc49['alias'],'datasetCode':_0x16cc49[_0x55c4a3(0x1da)],'tableName':_0x16cc49['tableName'],'name':_0x16cc49[_0x55c4a3(0x1ee)]}]:[]);}function isWithinRoot(_0x4e2748,_0x69d8ab){const _0x339062=relative(_0x4e2748,_0x69d8ab);return _0x339062===''||!_0x339062['startsWith']('..')&&!isAbsolute(_0x339062);}function resolveExistingFile(_0x46cd04){const _0x4c0d17=a287_0x2bfddd;if(!existsSync(_0x46cd04))return undefined;try{return statSync(_0x46cd04)[_0x4c0d17(0x1db)]()?realpathSync(_0x46cd04):undefined;}catch{return undefined;}}function reexportCandidatePaths(_0x242ad3){const _0x3637ce=a287_0x2bfddd,_0x19d7f7=extname(_0x242ad3);if(!_0x19d7f7)return[...SOURCE_FILE_EXTENSIONS[_0x3637ce(0x1ea)](_0x1dcc4c=>''+_0x242ad3+_0x1dcc4c),...SOURCE_FILE_EXTENSIONS[_0x3637ce(0x1ea)](_0x4fbe11=>resolve(_0x242ad3,_0x3637ce(0x1e9)+_0x4fbe11))];const _0x33c1c7=SOURCE_EXTENSIONS_BY_RUNTIME_EXTENSION[_0x19d7f7];if(!_0x33c1c7)return[_0x242ad3];const _0x3e4b1b=_0x242ad3[_0x3637ce(0x1f2)](0x0,-_0x19d7f7[_0x3637ce(0x1e5)]);return[..._0x33c1c7[_0x3637ce(0x1ea)](_0x19887d=>''+_0x3e4b1b+_0x19887d),_0x242ad3];}function resolveLocalReexport(_0x220370,_0x553cdf,_0x3360b4){const _0x5b808b=a287_0x2bfddd;if(!_0x553cdf[_0x5b808b(0x1e4)]('./')&&!_0x553cdf['startsWith']('../'))return undefined;const _0x355cbe=resolve(dirname(_0x220370),_0x553cdf);if(!isWithinRoot(_0x3360b4,_0x355cbe))return undefined;for(const _0x28ff92 of reexportCandidatePaths(_0x355cbe)){const _0x5980f3=resolveExistingFile(_0x28ff92);if(_0x5980f3&&isWithinRoot(_0x3360b4,_0x5980f3))return _0x5980f3;}return undefined;}function parseApiFileTree(_0x3586f0,_0x3f0dd4,_0x1d6a26,_0x3dfa65){const _0x2b1544=a287_0x2bfddd,_0x2e3335=resolveExistingFile(_0x3586f0);if(!_0x2e3335)return[];const _0x3e2e40=_0x1d6a26['get'](_0x2e3335);if(_0x3e2e40!==undefined&&_0x3e2e40<=_0x3dfa65)return[];_0x1d6a26[_0x2b1544(0x1ec)](_0x2e3335,_0x3dfa65);const _0x513ef0=readFileSync(_0x2e3335,_0x2b1544(0x1e8)),_0x44c72d=parseApiFile(_0x513ef0);if(_0x3dfa65>=MAX_LOCAL_REEXPORT_DEPTH)return _0x44c72d;const _0x448ee1=new RegExp(LOCAL_REEXPORT_RE[_0x2b1544(0x1f3)],LOCAL_REEXPORT_RE[_0x2b1544(0x1fd)]);let _0x2adf29;while((_0x2adf29=_0x448ee1['exec'](_0x513ef0))!==null){const _0x592046=resolveLocalReexport(_0x2e3335,_0x2adf29[0x1],_0x3f0dd4);_0x592046&&_0x44c72d[_0x2b1544(0x1fb)](...parseApiFileTree(_0x592046,_0x3f0dd4,_0x1d6a26,_0x3dfa65+0x1));}return _0x44c72d;}function aliasProjectRoot(_0x4fc644){const _0x172e29=findProjectRootDirectory(dirname(_0x4fc644));try{return realpathSync(_0x172e29);}catch{return _0x172e29;}}function uniqueAliasEntries(_0x5a1d4b){const _0x24e7de=new Set();return _0x5a1d4b['filter'](_0x23cca8=>{const _0x58f624=a287_0x9903,_0x4741c6=JSON['stringify'](_0x23cca8);if(_0x24e7de['has'](_0x4741c6))return![];return _0x24e7de[_0x58f624(0x1f5)](_0x4741c6),!![];});}export function loadAliasMap(_0x82b108,_0x4cc401,_0x5a8da7,_0x2f6cbc){const _0x29590a=a287_0x2bfddd,_0x219085=resolve(_0x5a8da7??resolve(process[_0x29590a(0x1f8)](),_0x82b108,_0x29590a(0x1f4))),_0x45b1f2=_0x2f6cbc?_0x219085+'#'+_0x2f6cbc:_0x219085;if(cache[_0x29590a(0x1f1)](_0x45b1f2))return cache[_0x29590a(0x1e0)](_0x45b1f2);if(!existsSync(_0x219085))return cache[_0x29590a(0x1ec)](_0x45b1f2,[]),[];try{if(_0x219085[_0x29590a(0x1e3)](MODEL_REGISTRY_FILE_NAME)){const _0x51b950=readModelRegistry(_0x219085),_0x1079c9=_0x2f6cbc??_0x51b950?.[_0x29590a(0x1df)],_0x18a538=_0x1079c9&&_0x51b950?getProfileModels(_0x51b950,_0x1079c9):[],_0x1963c6=uniqueAliasEntries(_0x18a538[_0x29590a(0x1fa)](_0x422fbd=>_0x422fbd[_0x29590a(0x1f7)]?[{'alias':_0x422fbd[_0x29590a(0x1f7)],'datasetCode':_0x422fbd['datasetCode'],'tableName':_0x422fbd['tableName'],'name':_0x422fbd['name']}]:[]));return cache[_0x29590a(0x1ec)](_0x45b1f2,_0x1963c6),_0x1963c6;}const _0x27158f=uniqueAliasEntries(parseApiFileTree(_0x219085,aliasProjectRoot(_0x219085),new Map(),0x0));return cache['set'](_0x45b1f2,_0x27158f),_0x27158f;}catch{return cache[_0x29590a(0x1ec)](_0x45b1f2,[]),[];}}export function resolveAlias(_0x52c14c,_0x547fb8,_0x25f79b,_0x560166,_0x4daf1e){const _0x442202=a287_0x2bfddd;if(!_0x547fb8)return undefined;const _0x4f1e1e=loadAliasMap(_0x52c14c,_0x25f79b,_0x560166,_0x4daf1e),_0x49f07d=new Set(_0x4f1e1e['filter'](_0x476ec5=>_0x476ec5[_0x442202(0x1f7)]===_0x547fb8)[_0x442202(0x1ea)](_0x45ee10=>_0x45ee10[_0x442202(0x1da)]));return _0x49f07d[_0x442202(0x1e7)]===0x1?[..._0x49f07d][0x0]:undefined;}export function listAliases(_0x5aa8dc,_0x59273b,_0x481572,_0x40e963){return loadAliasMap(_0x5aa8dc,_0x59273b,_0x481572,_0x40e963);}