@lovrabet/rabetbase-cli 2.5.3-beta.1 → 2.5.3-beta.2

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 (374) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/api/generate-sdk-config-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/members-list.js +1 -1
  23. package/lib/commands/app/remote-directory.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/logs.d.ts +7 -0
  38. package/lib/commands/bff/logs.js +1 -0
  39. package/lib/commands/bff/pull.js +1 -1
  40. package/lib/commands/bff/push.js +1 -1
  41. package/lib/commands/bff/status.js +1 -1
  42. package/lib/commands/cli-skill/index.js +1 -1
  43. package/lib/commands/cli-update.js +1 -1
  44. package/lib/commands/codegen/index.js +1 -1
  45. package/lib/commands/codegen/sdk.js +1 -1
  46. package/lib/commands/codegen/sql.js +1 -1
  47. package/lib/commands/common/app-registry.js +1 -1
  48. package/lib/commands/common/app-selector.js +1 -1
  49. package/lib/commands/common/async-task.js +1 -1
  50. package/lib/commands/common/dry-run.js +1 -1
  51. package/lib/commands/common/flags.js +1 -1
  52. package/lib/commands/common/local-file.js +1 -1
  53. package/lib/commands/common/validate.js +1 -1
  54. package/lib/commands/config/delete.js +1 -1
  55. package/lib/commands/config/get.js +1 -1
  56. package/lib/commands/config/index.js +1 -1
  57. package/lib/commands/config/init.js +1 -1
  58. package/lib/commands/config/list.js +1 -1
  59. package/lib/commands/config/set.js +1 -1
  60. package/lib/commands/config/shared.js +1 -1
  61. package/lib/commands/dataset/batch-design.d.ts +21 -0
  62. package/lib/commands/dataset/batch-design.js +1 -0
  63. package/lib/commands/dataset/business-group-update.js +1 -1
  64. package/lib/commands/dataset/business-groups.js +1 -1
  65. package/lib/commands/dataset/capability.js +1 -1
  66. package/lib/commands/dataset/delete.js +1 -1
  67. package/lib/commands/dataset/detail.js +1 -1
  68. package/lib/commands/dataset/extend-update.js +1 -1
  69. package/lib/commands/dataset/field-restore.js +1 -1
  70. package/lib/commands/dataset/field-update.js +1 -1
  71. package/lib/commands/dataset/generate.js +1 -1
  72. package/lib/commands/dataset/index.js +1 -1
  73. package/lib/commands/dataset/list.js +1 -1
  74. package/lib/commands/dataset/operations.js +1 -1
  75. package/lib/commands/dataset/relation-audit.js +1 -1
  76. package/lib/commands/dataset/relation-create.js +1 -1
  77. package/lib/commands/dataset/relation-delete.js +1 -1
  78. package/lib/commands/dataset/relation-shared.js +1 -1
  79. package/lib/commands/dataset/relation-update.js +1 -1
  80. package/lib/commands/dataset/relations.js +1 -1
  81. package/lib/commands/dataset/rename.js +1 -1
  82. package/lib/commands/dataset/restore.js +1 -1
  83. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  84. package/lib/commands/db/analysis-batching.js +1 -1
  85. package/lib/commands/db/analyze-batch-plan.js +1 -1
  86. package/lib/commands/db/analyze-cancel.js +1 -1
  87. package/lib/commands/db/analyze-start.js +1 -1
  88. package/lib/commands/db/analyze-status.js +1 -1
  89. package/lib/commands/db/create.js +1 -1
  90. package/lib/commands/db/delete.js +1 -1
  91. package/lib/commands/db/detail.js +1 -1
  92. package/lib/commands/db/diff-refresh-start.js +1 -1
  93. package/lib/commands/db/diff-refresh-status.js +1 -1
  94. package/lib/commands/db/diff.js +1 -1
  95. package/lib/commands/db/index.js +1 -1
  96. package/lib/commands/db/list.js +1 -1
  97. package/lib/commands/db/shared.js +1 -1
  98. package/lib/commands/db/table-diff-shared.js +1 -1
  99. package/lib/commands/db/tables.js +1 -1
  100. package/lib/commands/db/test.js +1 -1
  101. package/lib/commands/db/update.js +1 -1
  102. package/lib/commands/deployment/index.js +1 -1
  103. package/lib/commands/deployment/sync-all.js +1 -1
  104. package/lib/commands/deployment/sync-jobs.js +1 -1
  105. package/lib/commands/deployment/sync-status.js +1 -1
  106. package/lib/commands/doctor.js +1 -1
  107. package/lib/commands/file/index.js +1 -1
  108. package/lib/commands/flow/create.d.ts +2 -0
  109. package/lib/commands/flow/create.js +1 -0
  110. package/lib/commands/flow/detail.d.ts +2 -0
  111. package/lib/commands/flow/detail.js +1 -0
  112. package/lib/commands/flow/index.d.ts +3 -0
  113. package/lib/commands/flow/index.js +1 -0
  114. package/lib/commands/flow/list.d.ts +2 -0
  115. package/lib/commands/flow/list.js +1 -0
  116. package/lib/commands/flow/publish.d.ts +2 -0
  117. package/lib/commands/flow/publish.js +1 -0
  118. package/lib/commands/flow/runtime-resources-shared.d.ts +40 -0
  119. package/lib/commands/flow/runtime-resources-shared.js +1 -0
  120. package/lib/commands/flow/runtime-role-list.d.ts +2 -0
  121. package/lib/commands/flow/runtime-role-list.js +1 -0
  122. package/lib/commands/flow/runtime-role-user-list.d.ts +2 -0
  123. package/lib/commands/flow/runtime-role-user-list.js +1 -0
  124. package/lib/commands/flow/runtime-user-search.d.ts +2 -0
  125. package/lib/commands/flow/runtime-user-search.js +1 -0
  126. package/lib/commands/flow/shared.d.ts +41 -0
  127. package/lib/commands/flow/shared.js +1 -0
  128. package/lib/commands/flow/update.d.ts +2 -0
  129. package/lib/commands/flow/update.js +1 -0
  130. package/lib/commands/flow/validate.d.ts +3 -0
  131. package/lib/commands/flow/validate.js +1 -0
  132. package/lib/commands/instant-api-policy/current.js +1 -1
  133. package/lib/commands/instant-api-policy/index.js +1 -1
  134. package/lib/commands/instant-api-policy/init.js +1 -1
  135. package/lib/commands/instant-api-policy/publish.js +1 -1
  136. package/lib/commands/instant-api-policy/pull.js +1 -1
  137. package/lib/commands/instant-api-policy/revision.js +1 -1
  138. package/lib/commands/instant-api-policy/revisions.js +1 -1
  139. package/lib/commands/instant-api-policy/rollback.js +1 -1
  140. package/lib/commands/instant-api-policy/shared.js +1 -1
  141. package/lib/commands/instant-api-policy/validate.js +1 -1
  142. package/lib/commands/issue/index.js +1 -1
  143. package/lib/commands/issue/nudge.js +1 -1
  144. package/lib/commands/issue/report.js +1 -1
  145. package/lib/commands/issue/shared.js +1 -1
  146. package/lib/commands/kb/create.js +1 -1
  147. package/lib/commands/kb/delete.js +1 -1
  148. package/lib/commands/kb/detail.js +1 -1
  149. package/lib/commands/kb/index.js +1 -1
  150. package/lib/commands/kb/list.js +1 -1
  151. package/lib/commands/kb/search.js +1 -1
  152. package/lib/commands/kb/shared.js +1 -1
  153. package/lib/commands/kb/update.js +1 -1
  154. package/lib/commands/logs/index.js +1 -1
  155. package/lib/commands/menu/asset-update.js +1 -1
  156. package/lib/commands/menu/delete.js +1 -1
  157. package/lib/commands/menu/external-link-create.js +1 -1
  158. package/lib/commands/menu/external-link-update.js +1 -1
  159. package/lib/commands/menu/group-create.js +1 -1
  160. package/lib/commands/menu/group-update.js +1 -1
  161. package/lib/commands/menu/index.js +1 -1
  162. package/lib/commands/menu/list.js +1 -1
  163. package/lib/commands/menu/move.js +1 -1
  164. package/lib/commands/menu/regroup-start.js +1 -1
  165. package/lib/commands/menu/rename.js +1 -1
  166. package/lib/commands/menu/shared/compare-table.js +1 -1
  167. package/lib/commands/menu/shared/delete-plan.js +1 -1
  168. package/lib/commands/menu/shared/facts.js +1 -1
  169. package/lib/commands/menu/shared/index.js +1 -1
  170. package/lib/commands/menu/shared/inquirer.js +1 -1
  171. package/lib/commands/menu/shared/local-pages.js +1 -1
  172. package/lib/commands/menu/shared/logic.js +1 -1
  173. package/lib/commands/menu/shared/mutations.js +1 -1
  174. package/lib/commands/menu/shared/service.js +1 -1
  175. package/lib/commands/menu/shared/sync-core.js +1 -1
  176. package/lib/commands/menu/shared/update-core.js +1 -1
  177. package/lib/commands/menu/shared/valid-url.js +1 -1
  178. package/lib/commands/menu/sync.js +1 -1
  179. package/lib/commands/menu/visibility-update.js +1 -1
  180. package/lib/commands/notification/config-create.js +1 -1
  181. package/lib/commands/notification/config-delete.js +1 -1
  182. package/lib/commands/notification/config-list.js +1 -1
  183. package/lib/commands/notification/config-update.js +1 -1
  184. package/lib/commands/notification/index.js +1 -1
  185. package/lib/commands/notification/shared.js +1 -1
  186. package/lib/commands/ocr/index.js +1 -1
  187. package/lib/commands/page/create.js +1 -1
  188. package/lib/commands/page/custom/detail.js +1 -1
  189. package/lib/commands/page/custom/list.js +1 -1
  190. package/lib/commands/page/custom/publish.js +1 -1
  191. package/lib/commands/page/custom/shared.js +1 -1
  192. package/lib/commands/page/custom/syntax.js +1 -1
  193. package/lib/commands/page/custom/update.js +1 -1
  194. package/lib/commands/page/data-list-status.js +1 -1
  195. package/lib/commands/page/generate-start.js +1 -1
  196. package/lib/commands/page/generate-status.js +1 -1
  197. package/lib/commands/page/index.js +1 -1
  198. package/lib/commands/page/pull.js +1 -1
  199. package/lib/commands/page/push.js +1 -1
  200. package/lib/commands/page/relation-audit.js +1 -1
  201. package/lib/commands/page/restore.js +1 -1
  202. package/lib/commands/page/shared.js +1 -1
  203. package/lib/commands/page/sync.js +1 -1
  204. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  205. package/lib/commands/project/create/format-elapsed.js +1 -1
  206. package/lib/commands/project/create/main.js +1 -1
  207. package/lib/commands/project/create/materialize-project-template.js +1 -1
  208. package/lib/commands/project/create/project-name.js +1 -1
  209. package/lib/commands/project/create/project-template-archive.js +1 -1
  210. package/lib/commands/project/create/project-template-path.js +1 -1
  211. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  212. package/lib/commands/project/create/use-format-code.js +1 -1
  213. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  214. package/lib/commands/project/domain-routing-sync.js +1 -1
  215. package/lib/commands/project/index.js +1 -1
  216. package/lib/commands/project/upgrade.js +1 -1
  217. package/lib/commands/registry.js +1 -1
  218. package/lib/commands/role/delete.js +1 -1
  219. package/lib/commands/role/detail.js +1 -1
  220. package/lib/commands/role/index.js +1 -1
  221. package/lib/commands/role/list.js +1 -1
  222. package/lib/commands/role/shared.js +1 -1
  223. package/lib/commands/role/update.js +1 -1
  224. package/lib/commands/role/user-add.js +1 -1
  225. package/lib/commands/role/user-remove.js +1 -1
  226. package/lib/commands/role/user-resolve.js +1 -1
  227. package/lib/commands/rule/get.js +1 -1
  228. package/lib/commands/rule/index.js +1 -1
  229. package/lib/commands/rule/list.js +1 -1
  230. package/lib/commands/rule/set.js +1 -1
  231. package/lib/commands/rule/shared.js +1 -1
  232. package/lib/commands/run/index.js +1 -1
  233. package/lib/commands/schema.js +1 -1
  234. package/lib/commands/sql/create.js +1 -1
  235. package/lib/commands/sql/delete.js +1 -1
  236. package/lib/commands/sql/detail.js +1 -1
  237. package/lib/commands/sql/exec.js +1 -1
  238. package/lib/commands/sql/index.js +1 -1
  239. package/lib/commands/sql/list.js +1 -1
  240. package/lib/commands/sql/pull.js +1 -1
  241. package/lib/commands/sql/push.js +1 -1
  242. package/lib/commands/sql/shared.js +1 -1
  243. package/lib/commands/sql/status.js +1 -1
  244. package/lib/commands/sql/validate.js +1 -1
  245. package/lib/commands/task/index.js +1 -1
  246. package/lib/commands/task/status.js +1 -1
  247. package/lib/commands/tenant/index.js +1 -1
  248. package/lib/commands/tenant/members-list.js +1 -1
  249. package/lib/commands/tenant/shared.js +1 -1
  250. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  251. package/lib/commands/user-account/index.js +1 -1
  252. package/lib/commands/workspace/add.js +1 -1
  253. package/lib/commands/workspace/index.js +1 -1
  254. package/lib/commands/workspace/remove.js +1 -1
  255. package/lib/config/domain-config.js +1 -1
  256. package/lib/config/project-domain-routing.js +1 -1
  257. package/lib/config/region-config.js +1 -1
  258. package/lib/config/schema.js +1 -1
  259. package/lib/constant/cdn.js +1 -1
  260. package/lib/constant/cli.js +1 -1
  261. package/lib/constant/defaults.js +1 -1
  262. package/lib/constant/domain.js +1 -1
  263. package/lib/constant/env.js +1 -1
  264. package/lib/constant/output.js +1 -1
  265. package/lib/constant/paths.js +1 -1
  266. package/lib/constant/region.js +1 -1
  267. package/lib/constant/risk.js +1 -1
  268. package/lib/constant/routing-profile.js +1 -1
  269. package/lib/context/app-resolver.js +1 -1
  270. package/lib/context/auth-resolver.js +1 -1
  271. package/lib/context/config-loader.js +1 -1
  272. package/lib/context.js +1 -1
  273. package/lib/core/alias-resolver.js +1 -1
  274. package/lib/core/api-client.d.ts +170 -1
  275. package/lib/core/api-client.js +1 -1
  276. package/lib/core/bff/config.js +1 -1
  277. package/lib/core/bff/file-system.js +1 -1
  278. package/lib/core/bff/hash.js +1 -1
  279. package/lib/core/bff/hook-directory.d.ts +55 -0
  280. package/lib/core/bff/hook-directory.js +1 -0
  281. package/lib/core/bff/lock.js +1 -1
  282. package/lib/core/bff/types.d.ts +15 -0
  283. package/lib/core/bff/utils.js +1 -1
  284. package/lib/core/db-resolver.js +1 -1
  285. package/lib/core/flow-config.d.ts +628 -0
  286. package/lib/core/flow-config.js +1 -0
  287. package/lib/core/instant-api-policy/config.js +1 -1
  288. package/lib/core/kb-search-client.js +1 -1
  289. package/lib/core/page/file-system.js +1 -1
  290. package/lib/core/page/hash.js +1 -1
  291. package/lib/core/page/lock.js +1 -1
  292. package/lib/core/page/lr-smart-jsx.js +1 -1
  293. package/lib/core/sql-index-auditor.js +1 -1
  294. package/lib/core/sql-sync/config.js +1 -1
  295. package/lib/core/sql-sync/file-system.js +1 -1
  296. package/lib/core/sql-sync/hash.js +1 -1
  297. package/lib/core/sql-sync/lock.js +1 -1
  298. package/lib/core/sql-sync/utils.js +1 -1
  299. package/lib/core/sql-validator.js +1 -1
  300. package/lib/errors.js +1 -1
  301. package/lib/framework/build-all-flags.js +1 -1
  302. package/lib/framework/error-output.js +1 -1
  303. package/lib/framework/explicit-yes.js +1 -1
  304. package/lib/framework/flags.js +1 -1
  305. package/lib/framework/help.js +1 -1
  306. package/lib/framework/index.js +1 -1
  307. package/lib/framework/output.js +1 -1
  308. package/lib/framework/response.js +1 -1
  309. package/lib/framework/runner-alias.js +1 -1
  310. package/lib/framework/runner.js +1 -1
  311. package/lib/framework/schema-export.js +1 -1
  312. package/lib/framework/supported-flags.js +1 -1
  313. package/lib/framework/types.js +1 -1
  314. package/lib/generated/build-info.d.ts +4 -4
  315. package/lib/generated/build-info.js +1 -1
  316. package/lib/generated/official-routing.js +1 -1
  317. package/lib/generated/routing-contract.js +1 -1
  318. package/lib/help.js +1 -1
  319. package/lib/postinstall.js +1 -1
  320. package/lib/runtime/confirmation.js +1 -1
  321. package/lib/runtime/event.js +1 -1
  322. package/lib/runtime/index.js +1 -1
  323. package/lib/runtime/queue.js +1 -1
  324. package/lib/runtime/resolve.js +1 -1
  325. package/lib/skills/builtin-skill.js +1 -1
  326. package/lib/skills/main.js +1 -1
  327. package/lib/skills/npx-skills-add.js +1 -1
  328. package/lib/skills/skill-presence.js +1 -1
  329. package/lib/telemetry/cli-command-trace.js +1 -1
  330. package/lib/telemetry/cli-help-trace.js +1 -1
  331. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  332. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  333. package/lib/telemetry/send-cli-trace-log.js +1 -1
  334. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  335. package/lib/utils/ai_config.js +1 -1
  336. package/lib/utils/apply-jq-filter.js +1 -1
  337. package/lib/utils/cdn-config.js +1 -1
  338. package/lib/utils/check-sdk-version.js +1 -1
  339. package/lib/utils/cli-version-check.js +1 -1
  340. package/lib/utils/cli-version-policy.js +1 -1
  341. package/lib/utils/config.js +1 -1
  342. package/lib/utils/entity-with-id.js +1 -1
  343. package/lib/utils/file-utils.js +1 -1
  344. package/lib/utils/guides-cdn.js +1 -1
  345. package/lib/utils/http-client.js +1 -1
  346. package/lib/utils/is-non-interactive.js +1 -1
  347. package/lib/utils/logger.js +1 -1
  348. package/lib/utils/params.js +1 -1
  349. package/lib/utils/platform.js +1 -1
  350. package/lib/utils/sleep.js +1 -1
  351. package/lib/utils/template-replacer.js +1 -1
  352. package/lib/utils/update-notice.js +1 -1
  353. package/lib/utils/version.js +1 -1
  354. package/lib/utils/with-active-cookie.js +1 -1
  355. package/lib/utils/write-cli-side-channel.js +1 -1
  356. package/package.json +1 -1
  357. package/skills/rabetbase/SKILL.md +22 -4
  358. package/skills/rabetbase/guides/approval-flow-development-workflow.md +137 -0
  359. package/skills/rabetbase/guides/backend-function.md +19 -9
  360. package/skills/rabetbase/guides/bff-creation-workflow.md +10 -1
  361. package/skills/rabetbase/guides/conflict-detection.md +2 -0
  362. package/skills/rabetbase/guides/sdk-client-generation.md +1 -0
  363. package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +290 -0
  364. package/skills/rabetbase/references/rabetbase-bff-create.md +1 -1
  365. package/skills/rabetbase/references/rabetbase-bff-logs.md +47 -0
  366. package/skills/rabetbase/references/rabetbase-bff-pull.md +7 -3
  367. package/skills/rabetbase/references/rabetbase-bff-push.md +10 -2
  368. package/skills/rabetbase/references/rabetbase-dataset-generate.md +52 -2
  369. package/skills/rabetbase/references/rabetbase-flow-commands.md +86 -0
  370. package/skills/rabetbase/references/rabetbase-flow-resources.md +83 -0
  371. package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +25 -0
  372. package/skills/rabetbase/references/rabetbase-instant-api-policy.md +103 -11
  373. package/skills/rabetbase/references/rabetbase-notification-config-list.md +17 -0
  374. package/skills/rabetbase.manifest.json +9 -3
@@ -1 +1 @@
1
- (function(_0x25a0ab,_0x19fc0b){const _0x2a1a08=a241_0x9925,_0x5d6494=_0x25a0ab();while(!![]){try{const _0x287964=parseInt(_0x2a1a08(0x1f1))/0x1+parseInt(_0x2a1a08(0x1f9))/0x2+-parseInt(_0x2a1a08(0x204))/0x3+parseInt(_0x2a1a08(0x1ec))/0x4*(parseInt(_0x2a1a08(0x1f7))/0x5)+-parseInt(_0x2a1a08(0x205))/0x6+parseInt(_0x2a1a08(0x1e8))/0x7*(parseInt(_0x2a1a08(0x1fc))/0x8)+-parseInt(_0x2a1a08(0x211))/0x9*(parseInt(_0x2a1a08(0x1ff))/0xa);if(_0x287964===_0x19fc0b)break;else _0x5d6494['push'](_0x5d6494['shift']());}catch(_0x5ebb21){_0x5d6494['push'](_0x5d6494['shift']());}}}(a241_0x28ab,0x561cc));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat,riskLevelOrder}from'../framework/types.js';import{DEFAULT_LOVRABET_REGION,normalizeLovrabetRegion}from'../constant/region.js';import{selectConfiguredRegion}from'../config/region-config.js';function stringConfigValue(_0x47b221){const _0x47ef22=a241_0x9925;return typeof _0x47b221===_0x47ef22(0x202)&&_0x47b221[_0x47ef22(0x20b)]()?_0x47b221[_0x47ef22(0x20b)]():undefined;}function appProfiles(_0x1e2573){const _0x3eec2=a241_0x9925;return _0x1e2573[_0x3eec2(0x1ee)]&&typeof _0x1e2573[_0x3eec2(0x1ee)]==='object'?_0x1e2573[_0x3eec2(0x1ee)]:{};}function resolveDefaultAppName(_0x469443){const _0x45d64f=a241_0x9925,_0xf138a5=stringConfigValue(_0x469443[_0x45d64f(0x209)]);if(_0xf138a5)return _0xf138a5;const _0xf0c653=Object[_0x45d64f(0x1ed)](appProfiles(_0x469443));return _0xf0c653[_0x45d64f(0x20c)]===0x1?_0xf0c653[0x0]:undefined;}function a241_0x9925(_0x420a5d,_0x3b53bb){_0x420a5d=_0x420a5d-0x1e7;const _0x28ab63=a241_0x28ab();let _0x9925b1=_0x28ab63[_0x420a5d];return _0x9925b1;}function resolveTopLevelAppCode(_0x8b558d){const _0x494144=a241_0x9925;return stringConfigValue(_0x8b558d[_0x494144(0x20d)])||stringConfigValue(_0x8b558d['app']);}function normalizeRiskCeiling(_0x4de670){const _0x13a143=a241_0x9925;if(_0x4de670===undefined||_0x4de670===null)return undefined;if(_0x4de670===_0x13a143(0x20e)||_0x4de670===_0x13a143(0x1e9)||_0x4de670===_0x13a143(0x1fd))return _0x4de670;return _0x13a143(0x20e);}function a241_0x28ab(){const _0x3eb76b=['length','appcode','read','format','object','36EAyOTE','accessKey','ENV','true','1400441hGWKiP','write','COOKIE','projectConfig','8oxaoWW','keys','apps','app','source','654911vsZFSM','RISK_LEVEL','pageSize','locale','entries','APP','384945KRqnVJ','value','883090uSMHcD','apiDir','daily','16LJEGvp','high-risk-write','production','2191660qWqTkp','cookie','globalConfig','string','riskLevel','668277eniAmJ','1190526xBpORz','projectPath','region','env','defaultApp','VERBOSE','trim'];a241_0x28ab=function(){return _0x3eb76b;};return a241_0x28ab();}function resolveRiskCeiling(..._0x20f25f){const _0x46258e=a241_0x9925;let _0x36a63c;for(const _0x1ff560 of _0x20f25f){const _0x3ba821=normalizeRiskCeiling(_0x1ff560);_0x3ba821&&(!_0x36a63c||riskLevelOrder(_0x3ba821)<riskLevelOrder(_0x36a63c))&&(_0x36a63c=_0x3ba821);}return _0x36a63c??DEFAULT_CONFIG_VALUES[_0x46258e(0x203)];}export function resolveAppConfig({raw:_0x102dd1,flags:_0x4adcbb,layers:_0x125e47,readEnv:_0x15fd6c}){const _0x9b42c6=a241_0x9925,_0x307b83=_0x125e47?.[_0x9b42c6(0x1eb)]??{},_0x401357=_0x125e47?.['globalConfig']??{},_0x3dc1ae=!!_0x125e47?.[_0x9b42c6(0x206)]||Object[_0x9b42c6(0x1ed)](_0x307b83)[_0x9b42c6(0x20c)]>0x0,_0xc8bec8=!_0x3dc1ae,_0x13a2ad=_0x3dc1ae?resolveDefaultAppName(_0x307b83):undefined,_0x5aff99=_0xc8bec8?resolveDefaultAppName(_0x401357):undefined,_0x556d17=stringConfigValue(_0x4adcbb[_0x9b42c6(0x1ef)]),_0x2da9fc=_0x15fd6c(_0x9b42c6(0x1f6)),_0x579b82={};if(_0x102dd1[_0x9b42c6(0x1ee)]&&typeof _0x102dd1['apps']==='object')for(const [_0x507ccf,_0x298704]of Object[_0x9b42c6(0x1f5)](_0x102dd1['apps'])){_0x298704&&typeof _0x298704===_0x9b42c6(0x210)&&_0x298704[_0x9b42c6(0x20d)]&&(_0x579b82[_0x507ccf]=_0x298704);}const _0x302d8f=_0x13a2ad||_0x5aff99||resolveDefaultAppName(_0x102dd1),_0x5e54f7=Object[_0x9b42c6(0x1ed)](_0x579b82)[_0x9b42c6(0x20c)]>0x0,_0x2f849=_0x556d17||_0x13a2ad||_0x2da9fc||_0x5aff99||_0x302d8f||undefined,_0x17a934=stringConfigValue(_0x4adcbb['appcode']),_0xc95b06=_0x17a934?Object[_0x9b42c6(0x1f5)](_0x579b82)['find'](([,_0x56e99f])=>_0x56e99f?.[_0x9b42c6(0x20d)]===_0x17a934):undefined,_0x307165=_0xc95b06?.[0x0],_0x34d823=_0xc95b06?.[0x1],_0x54d9aa=_0x17a934?_0x307165:_0x2f849;let _0x499ee8=_0x54d9aa&&_0x579b82[_0x54d9aa]?_0x579b82[_0x54d9aa]:undefined;_0x17a934&&_0x34d823&&(_0x499ee8=_0x34d823);const _0x53fb26=_0x17a934?_0x34d823??_0x499ee8:_0x499ee8,_0x285dd9=!_0x556d17&&!_0x13a2ad&&_0x2da9fc&&_0x54d9aa===_0x2da9fc,_0x11fd59=_0x556d17||(_0x285dd9?_0x2da9fc:undefined)||(_0x17a934?_0x307165:undefined),_0x189b9c=_0x53fb26?.[_0x9b42c6(0x20d)],_0x3f7e4b=_0x3dc1ae?resolveTopLevelAppCode(_0x307b83):undefined,_0x48faf1=_0xc8bec8?resolveTopLevelAppCode(_0x401357):undefined,_0x362623=_0x556d17||_0x13a2ad?_0x189b9c:undefined,_0x56e1d2=!_0x556d17&&!_0x13a2ad?_0x189b9c:undefined,_0x3d2f4f=_0x17a934||_0x362623||_0x3f7e4b||_0x56e1d2||_0x48faf1||undefined,_0x4db0eb=_0x3dc1ae?stringConfigValue(_0x307b83[_0x9b42c6(0x208)]):undefined,_0x2de782=_0xc8bec8?stringConfigValue(_0x401357[_0x9b42c6(0x208)]):undefined,_0x105366=_0x4adcbb[_0x9b42c6(0x208)]||_0x53fb26?.[_0x9b42c6(0x208)]||_0x4db0eb||_0x15fd6c(_0x9b42c6(0x213))||_0x2de782||_0x102dd1[_0x9b42c6(0x208)]||DEFAULT_CONFIG_VALUES[_0x9b42c6(0x208)],_0x83e4cd=_0x53fb26?.['locale']||_0x102dd1[_0x9b42c6(0x1f4)]||DEFAULT_CONFIG_VALUES[_0x9b42c6(0x1f4)],_0x4eed5b=_0x15fd6c(_0x9b42c6(0x1ea))||_0x53fb26?.['cookie']||_0x102dd1[_0x9b42c6(0x200)]||undefined,_0x198b07=_0x15fd6c('ACCESS_KEY')||_0x53fb26?.[_0x9b42c6(0x212)]||_0x102dd1['accessKey']||undefined,_0xf7e8c=_0x4adcbb[_0x9b42c6(0x20f)]||_0x15fd6c('FORMAT')||_0x53fb26?.[_0x9b42c6(0x20f)]||_0x102dd1[_0x9b42c6(0x20f)],_0x8a59dc=normalizeLegacyOutputFormat(_0xf7e8c),_0x40634d=_0x15fd6c('PAGE_SIZE')||_0x53fb26?.[_0x9b42c6(0x1f3)]||_0x102dd1[_0x9b42c6(0x1f3)],_0x4e2757=_0x40634d?Number(_0x40634d)||undefined:undefined,_0x44fcb2=_0x125e47?[_0x125e47[_0x9b42c6(0x201)][_0x9b42c6(0x203)],_0x125e47['projectConfig'][_0x9b42c6(0x203)]]:[_0x102dd1['riskLevel']],_0xa4a837=resolveRiskCeiling(..._0x44fcb2,_0x53fb26?.[_0x9b42c6(0x203)]),_0x44d3c3=resolveRiskCeiling(_0xa4a837,_0x15fd6c(_0x9b42c6(0x1f2))),_0xd5b4e4=_0x15fd6c(_0x9b42c6(0x20a)),_0x320e86=_0xd5b4e4==='1'||_0xd5b4e4===_0x9b42c6(0x1e7),_0x64d052=_0x53fb26?.[_0x9b42c6(0x1fa)]||_0x102dd1[_0x9b42c6(0x1fa)]||DEFAULT_CONFIG_VALUES[_0x9b42c6(0x1fa)],_0x284c6f=selectConfiguredRegion({'appRegion':_0x53fb26?.['region'],'projectRegion':_0x3dc1ae?_0x307b83[_0x9b42c6(0x207)]:undefined,'globalRegion':_0x3dc1ae||_0xc8bec8?_0x401357['region']:undefined,'mergedRegion':_0x102dd1['region']}),_0x2a0335=normalizeLovrabetRegion(_0x284c6f[_0x9b42c6(0x1f8)])??DEFAULT_LOVRABET_REGION,_0x2d25b5=isDaily(normalizeEnv(String(_0x105366)))?_0x9b42c6(0x1fb):_0x9b42c6(0x1fe);return{'appCode':typeof _0x3d2f4f==='string'&&_0x3d2f4f[_0x9b42c6(0x20b)]()?_0x3d2f4f[_0x9b42c6(0x20b)]():undefined,'region':_0x2a0335,'regionConfiguredValue':_0x284c6f['value'],'regionSource':_0x284c6f[_0x9b42c6(0x1f0)],'env':_0x2d25b5,'locale':_0x83e4cd,'cookie':_0x4eed5b,'accessKey':_0x198b07,'format':_0x8a59dc,'pageSize':_0x4e2757,'riskLevel':_0x44d3c3,'verbose':_0x320e86,'apiDir':_0x64d052,'apps':_0x579b82,'defaultApp':_0x302d8f,'currentApp':_0x5e54f7?_0x54d9aa:undefined,'explicitAppName':_0x11fd59};}
1
+ (function(_0x5c023f,_0x1bf5df){const _0x2f076b=a255_0x4248,_0x3f2a7b=_0x5c023f();while(!![]){try{const _0x513eed=parseInt(_0x2f076b(0x132))/0x1+parseInt(_0x2f076b(0x122))/0x2*(-parseInt(_0x2f076b(0x135))/0x3)+-parseInt(_0x2f076b(0x121))/0x4*(parseInt(_0x2f076b(0x120))/0x5)+-parseInt(_0x2f076b(0x126))/0x6+-parseInt(_0x2f076b(0x13e))/0x7*(parseInt(_0x2f076b(0x147))/0x8)+-parseInt(_0x2f076b(0x140))/0x9*(-parseInt(_0x2f076b(0x12a))/0xa)+parseInt(_0x2f076b(0x142))/0xb*(parseInt(_0x2f076b(0x14a))/0xc);if(_0x513eed===_0x1bf5df)break;else _0x3f2a7b['push'](_0x3f2a7b['shift']());}catch(_0x1ab888){_0x3f2a7b['push'](_0x3f2a7b['shift']());}}}(a255_0x2b3b,0xd0173));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat,riskLevelOrder}from'../framework/types.js';import{DEFAULT_LOVRABET_REGION,normalizeLovrabetRegion}from'../constant/region.js';import{selectConfiguredRegion}from'../config/region-config.js';function a255_0x4248(_0x5f0543,_0x2a7149){_0x5f0543=_0x5f0543-0x11d;const _0x2b3b0d=a255_0x2b3b();let _0x4248e7=_0x2b3b0d[_0x5f0543];return _0x4248e7;}function stringConfigValue(_0x193d93){const _0x580a7d=a255_0x4248;return typeof _0x193d93===_0x580a7d(0x12c)&&_0x193d93[_0x580a7d(0x12f)]()?_0x193d93[_0x580a7d(0x12f)]():undefined;}function appProfiles(_0x31f30e){const _0x224754=a255_0x4248;return _0x31f30e[_0x224754(0x139)]&&typeof _0x31f30e['apps']===_0x224754(0x131)?_0x31f30e['apps']:{};}function resolveDefaultAppName(_0x354ba9){const _0x486e82=a255_0x4248,_0x7c9dfa=stringConfigValue(_0x354ba9[_0x486e82(0x128)]);if(_0x7c9dfa)return _0x7c9dfa;const _0x51ad8f=Object['keys'](appProfiles(_0x354ba9));return _0x51ad8f[_0x486e82(0x130)]===0x1?_0x51ad8f[0x0]:undefined;}function a255_0x2b3b(){const _0x499ba0=['444pQOBxM','production','cookie','PAGE_SIZE','24375iKNARf','948WSxeZT','254AFLWaL','env','source','projectConfig','3213978RaCqJP','accessKey','defaultApp','ENV','250dWBOYk','region','string','entries','APP','trim','length','object','370923CYeItL','locale','appcode','23181XjmsqZ','COOKIE','riskLevel','globalConfig','apps','find','value','ACCESS_KEY','FORMAT','216391AmfhEW','high-risk-write','380970kkfjpa','keys','641377QFWaPT','read','pageSize','projectPath','format','16lHHBza','apiDir','app'];a255_0x2b3b=function(){return _0x499ba0;};return a255_0x2b3b();}function resolveTopLevelAppCode(_0x561aba){const _0x4e30d3=a255_0x4248;return stringConfigValue(_0x561aba[_0x4e30d3(0x134)])||stringConfigValue(_0x561aba[_0x4e30d3(0x149)]);}function normalizeRiskCeiling(_0x4d5116){const _0x340773=a255_0x4248;if(_0x4d5116===undefined||_0x4d5116===null)return undefined;if(_0x4d5116===_0x340773(0x143)||_0x4d5116==='write'||_0x4d5116===_0x340773(0x13f))return _0x4d5116;return'read';}function resolveRiskCeiling(..._0x2ca4d1){const _0x48a0d9=a255_0x4248;let _0x112546;for(const _0x135d3b of _0x2ca4d1){const _0x5b7c7e=normalizeRiskCeiling(_0x135d3b);_0x5b7c7e&&(!_0x112546||riskLevelOrder(_0x5b7c7e)<riskLevelOrder(_0x112546))&&(_0x112546=_0x5b7c7e);}return _0x112546??DEFAULT_CONFIG_VALUES[_0x48a0d9(0x137)];}export function resolveAppConfig({raw:_0x46a8be,flags:_0x49bf70,layers:_0x31a6a8,readEnv:_0x3020ad}){const _0x32b0b6=a255_0x4248,_0x57cefd=_0x31a6a8?.[_0x32b0b6(0x125)]??{},_0x56094b=_0x31a6a8?.[_0x32b0b6(0x138)]??{},_0x2de0c4=!!_0x31a6a8?.[_0x32b0b6(0x145)]||Object[_0x32b0b6(0x141)](_0x57cefd)[_0x32b0b6(0x130)]>0x0,_0x5d48b5=!_0x2de0c4,_0x754448=_0x2de0c4?resolveDefaultAppName(_0x57cefd):undefined,_0x4680b4=_0x5d48b5?resolveDefaultAppName(_0x56094b):undefined,_0x10c78a=stringConfigValue(_0x49bf70[_0x32b0b6(0x149)]),_0xef135c=_0x3020ad(_0x32b0b6(0x12e)),_0x12daf7={};if(_0x46a8be[_0x32b0b6(0x139)]&&typeof _0x46a8be[_0x32b0b6(0x139)]==='object')for(const [_0x113b87,_0x233564]of Object[_0x32b0b6(0x12d)](_0x46a8be['apps'])){_0x233564&&typeof _0x233564===_0x32b0b6(0x131)&&_0x233564['appcode']&&(_0x12daf7[_0x113b87]=_0x233564);}const _0x2b13a3=_0x754448||_0x4680b4||resolveDefaultAppName(_0x46a8be),_0x1cdf11=Object['keys'](_0x12daf7)[_0x32b0b6(0x130)]>0x0,_0x115ad6=_0x10c78a||_0x754448||_0xef135c||_0x4680b4||_0x2b13a3||undefined,_0x20beee=stringConfigValue(_0x49bf70[_0x32b0b6(0x134)]),_0x4b2d2f=_0x20beee?Object['entries'](_0x12daf7)[_0x32b0b6(0x13a)](([,_0x53db3d])=>_0x53db3d?.[_0x32b0b6(0x134)]===_0x20beee):undefined,_0x5f67d1=_0x4b2d2f?.[0x0],_0x932226=_0x4b2d2f?.[0x1],_0x526cd0=_0x20beee?_0x5f67d1:_0x115ad6;let _0x4d1050=_0x526cd0&&_0x12daf7[_0x526cd0]?_0x12daf7[_0x526cd0]:undefined;_0x20beee&&_0x932226&&(_0x4d1050=_0x932226);const _0x12cbd4=_0x20beee?_0x932226??_0x4d1050:_0x4d1050,_0x5564f7=!_0x10c78a&&!_0x754448&&_0xef135c&&_0x526cd0===_0xef135c,_0x1b262e=_0x10c78a||(_0x5564f7?_0xef135c:undefined)||(_0x20beee?_0x5f67d1:undefined),_0x5971a0=_0x12cbd4?.['appcode'],_0x1f2c43=_0x2de0c4?resolveTopLevelAppCode(_0x57cefd):undefined,_0x2f9245=_0x5d48b5?resolveTopLevelAppCode(_0x56094b):undefined,_0x3fa170=_0x10c78a||_0x754448?_0x5971a0:undefined,_0xdf937b=!_0x10c78a&&!_0x754448?_0x5971a0:undefined,_0x125360=_0x20beee||_0x3fa170||_0x1f2c43||_0xdf937b||_0x2f9245||undefined,_0xd3c68c=_0x2de0c4?stringConfigValue(_0x57cefd['env']):undefined,_0xc1d6ab=_0x5d48b5?stringConfigValue(_0x56094b[_0x32b0b6(0x123)]):undefined,_0x24751c=_0x49bf70[_0x32b0b6(0x123)]||_0x12cbd4?.['env']||_0xd3c68c||_0x3020ad(_0x32b0b6(0x129))||_0xc1d6ab||_0x46a8be['env']||DEFAULT_CONFIG_VALUES[_0x32b0b6(0x123)],_0x35e00c=_0x12cbd4?.['locale']||_0x46a8be['locale']||DEFAULT_CONFIG_VALUES[_0x32b0b6(0x133)],_0x5c0e52=_0x3020ad(_0x32b0b6(0x136))||_0x12cbd4?.[_0x32b0b6(0x11e)]||_0x46a8be[_0x32b0b6(0x11e)]||undefined,_0xe5e851=_0x3020ad(_0x32b0b6(0x13c))||_0x12cbd4?.[_0x32b0b6(0x127)]||_0x46a8be[_0x32b0b6(0x127)]||undefined,_0x51f3cb=_0x49bf70['format']||_0x3020ad(_0x32b0b6(0x13d))||_0x12cbd4?.['format']||_0x46a8be[_0x32b0b6(0x146)],_0x63b411=normalizeLegacyOutputFormat(_0x51f3cb),_0x9e493e=_0x3020ad(_0x32b0b6(0x11f))||_0x12cbd4?.[_0x32b0b6(0x144)]||_0x46a8be['pageSize'],_0x1eccd7=_0x9e493e?Number(_0x9e493e)||undefined:undefined,_0x3f3c29=_0x31a6a8?[_0x31a6a8[_0x32b0b6(0x138)][_0x32b0b6(0x137)],_0x31a6a8['projectConfig']['riskLevel']]:[_0x46a8be[_0x32b0b6(0x137)]],_0x538d28=resolveRiskCeiling(..._0x3f3c29,_0x12cbd4?.[_0x32b0b6(0x137)]),_0x9b2475=resolveRiskCeiling(_0x538d28,_0x3020ad('RISK_LEVEL')),_0x90dad6=_0x3020ad('VERBOSE'),_0x5e6fdb=_0x90dad6==='1'||_0x90dad6==='true',_0x34e2f2=_0x12cbd4?.['apiDir']||_0x46a8be[_0x32b0b6(0x148)]||DEFAULT_CONFIG_VALUES[_0x32b0b6(0x148)],_0x1848cb=selectConfiguredRegion({'appRegion':_0x12cbd4?.[_0x32b0b6(0x12b)],'projectRegion':_0x2de0c4?_0x57cefd[_0x32b0b6(0x12b)]:undefined,'globalRegion':_0x2de0c4||_0x5d48b5?_0x56094b[_0x32b0b6(0x12b)]:undefined,'mergedRegion':_0x46a8be[_0x32b0b6(0x12b)]}),_0x1f1f27=normalizeLovrabetRegion(_0x1848cb[_0x32b0b6(0x13b)])??DEFAULT_LOVRABET_REGION,_0x37746e=isDaily(normalizeEnv(String(_0x24751c)))?'daily':_0x32b0b6(0x11d);return{'appCode':typeof _0x125360===_0x32b0b6(0x12c)&&_0x125360[_0x32b0b6(0x12f)]()?_0x125360[_0x32b0b6(0x12f)]():undefined,'region':_0x1f1f27,'regionConfiguredValue':_0x1848cb[_0x32b0b6(0x13b)],'regionSource':_0x1848cb[_0x32b0b6(0x124)],'env':_0x37746e,'locale':_0x35e00c,'cookie':_0x5c0e52,'accessKey':_0xe5e851,'format':_0x63b411,'pageSize':_0x1eccd7,'riskLevel':_0x9b2475,'verbose':_0x5e6fdb,'apiDir':_0x34e2f2,'apps':_0x12daf7,'defaultApp':_0x2b13a3,'currentApp':_0x1cdf11?_0x526cd0:undefined,'explicitAppName':_0x1b262e};}
@@ -1 +1 @@
1
- (function(_0x57a91b,_0x4b50de){const _0x54aeb0=a242_0x1e1c,_0xe00e0a=_0x57a91b();while(!![]){try{const _0x498c98=parseInt(_0x54aeb0(0x177))/0x1+-parseInt(_0x54aeb0(0x17a))/0x2+parseInt(_0x54aeb0(0x17b))/0x3+-parseInt(_0x54aeb0(0x178))/0x4*(-parseInt(_0x54aeb0(0x17c))/0x5)+-parseInt(_0x54aeb0(0x172))/0x6+-parseInt(_0x54aeb0(0x176))/0x7+parseInt(_0x54aeb0(0x173))/0x8;if(_0x498c98===_0x4b50de)break;else _0xe00e0a['push'](_0xe00e0a['shift']());}catch(_0x34f072){_0xe00e0a['push'](_0xe00e0a['shift']());}}}(a242_0x7073,0xc1fd6));function a242_0x1e1c(_0x2c74a9,_0x379e4d){_0x2c74a9=_0x2c74a9-0x172;const _0x707368=a242_0x7073();let _0x1e1c46=_0x707368[_0x2c74a9];return _0x1e1c46;}import{getIsSessionValid}from'../auth/is-session-valid.js';import{CliErrors}from'../errors.js';export async function buildAuth(_0x4c4fa1){const _0x5c7795=a242_0x1e1c,{getCookie:_0x277bd8}=await import(_0x5c7795(0x174)),_0x11041e=_0x4c4fa1[_0x5c7795(0x175)]||_0x277bd8(),_0xa64a17=_0x11041e?await getIsSessionValid():![];return{'cookie':_0x11041e,'isLoggedIn':_0xa64a17,async 'getOrLogin'(){const _0x12947d=_0x5c7795;if(_0x11041e&&_0xa64a17)return _0x11041e;throw CliErrors[_0x12947d(0x179)]();}};}function a242_0x7073(){const _0x1a36e7=['1028868dmSuGI','authRequired','1061774pJxYVe','959943AwKasr','10zuMwsZ','1029804DsDMkv','7519248xRpNoX','../auth/get-cookie.js','cookie','10987319hHZHOw','1292399wavWYV'];a242_0x7073=function(){return _0x1a36e7;};return a242_0x7073();}
1
+ function a256_0x2232(){const _0x198a6e=['12231zXhlDO','21990asfXSy','467690NNwCXb','101199iYCggB','1358tAgaLl','9432610XXZSyt','256648JFqjnO','45xWSAoe','authRequired','2NxEVGj','1797072mLwDdt','4590OSpaVT','../auth/get-cookie.js'];a256_0x2232=function(){return _0x198a6e;};return a256_0x2232();}(function(_0x5b5fb1,_0x519909){const _0x4b056d=a256_0x9d36,_0x37374e=_0x5b5fb1();while(!![]){try{const _0x430d2e=parseInt(_0x4b056d(0x12a))/0x1+-parseInt(_0x4b056d(0x124))/0x2*(-parseInt(_0x4b056d(0x11e))/0x3)+-parseInt(_0x4b056d(0x121))/0x4*(-parseInt(_0x4b056d(0x122))/0x5)+parseInt(_0x4b056d(0x129))/0x6*(-parseInt(_0x4b056d(0x11f))/0x7)+-parseInt(_0x4b056d(0x125))/0x8+-parseInt(_0x4b056d(0x128))/0x9*(parseInt(_0x4b056d(0x126))/0xa)+parseInt(_0x4b056d(0x120))/0xb;if(_0x430d2e===_0x519909)break;else _0x37374e['push'](_0x37374e['shift']());}catch(_0xf9590e){_0x37374e['push'](_0x37374e['shift']());}}}(a256_0x2232,0x5c086));function a256_0x9d36(_0x5ecba0,_0x3f263c){_0x5ecba0=_0x5ecba0-0x11e;const _0x2232ad=a256_0x2232();let _0x9d3663=_0x2232ad[_0x5ecba0];return _0x9d3663;}import{getIsSessionValid}from'../auth/is-session-valid.js';import{CliErrors}from'../errors.js';export async function buildAuth(_0x9461e3){const _0x101551=a256_0x9d36,{getCookie:_0x2fc927}=await import(_0x101551(0x127)),_0x58d38d=_0x9461e3['cookie']||_0x2fc927(),_0x5da4f3=_0x58d38d?await getIsSessionValid():![];return{'cookie':_0x58d38d,'isLoggedIn':_0x5da4f3,async 'getOrLogin'(){const _0x463d63=_0x101551;if(_0x58d38d&&_0x5da4f3)return _0x58d38d;throw CliErrors[_0x463d63(0x123)]();}};}
@@ -1 +1 @@
1
- const a243_0x124cd6=a243_0x2598;(function(_0x446979,_0x1c0817){const _0x3448f7=a243_0x2598,_0x54059c=_0x446979();while(!![]){try{const _0x4421f8=-parseInt(_0x3448f7(0x70))/0x1+-parseInt(_0x3448f7(0x68))/0x2+parseInt(_0x3448f7(0x66))/0x3+-parseInt(_0x3448f7(0x65))/0x4+parseInt(_0x3448f7(0x8e))/0x5+parseInt(_0x3448f7(0x7c))/0x6+-parseInt(_0x3448f7(0x7d))/0x7*(-parseInt(_0x3448f7(0x84))/0x8);if(_0x4421f8===_0x1c0817)break;else _0x54059c['push'](_0x54059c['shift']());}catch(_0x49868f){_0x54059c['push'](_0x54059c['shift']());}}}(a243_0x55bd,0x5a30f));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=a243_0x124cd6(0x7b);function a243_0x55bd(){const _0x30c6c8=['appcode','object','apiDomain','apiDir','inherit','.rabetbase.json','2963346ImTCqO','2779RyUeJl','cwd','message','Global','utf8','migrated','routing','12088BpJsSE','string','warn','project','region','config','parse','locale','status','length','2483325NHFELu','error','keys','silent','appDomain','set','format','Project','skillDomain','pageSize','empty','1465960Spkzrg','588042HNJrav','apps','1052182bsHTUt','localDomain','userDomain','stringify','.tmp','data','riskLevel','projectPath','524433WTwEyy','accessKey','cookie','trim','app','defaultApp'];a243_0x55bd=function(){return _0x30c6c8;};return a243_0x55bd();}export const CONFIG_NAMES=[NEW_CONFIG_NAME];const normalizedWriteCache=new Map();export function resolveConfigPath(_0x4ff5b2){for(const _0x529521 of CONFIG_NAMES){const _0x15d093=resolve(_0x4ff5b2,_0x529521);if(existsSync(_0x15d093))return _0x15d093;}return undefined;}export function findProjectRootDirectory(_0x5cf2ba=process[a243_0x124cd6(0x7e)]()){let _0x678389=resolve(_0x5cf2ba);const {root:_0x28bce4}=parse(_0x678389),_0x3c8705=homedir();while(!![]){if(resolveConfigPath(_0x678389)){if(_0x678389===_0x3c8705)break;return _0x678389;}if(_0x678389===_0x28bce4||_0x678389===_0x3c8705)break;const _0xbbf2f0=dirname(_0x678389);if(_0xbbf2f0===_0x678389)break;_0x678389=_0xbbf2f0;}return resolve(_0x5cf2ba);}export function getProjectConfigPath(){const _0x3b6bfa=a243_0x124cd6;return resolveConfigPath(process[_0x3b6bfa(0x7e)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}function a243_0x2598(_0x1cf3f2,_0x716d60){_0x1cf3f2=_0x1cf3f2-0x65;const _0x55bd03=a243_0x55bd();let _0x259885=_0x55bd03[_0x1cf3f2];return _0x259885;}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x142118){const _0x518ce9=a243_0x124cd6;if(!existsSync(_0x142118))return{'status':'missing'};try{const _0x5acd11=readFileSync(_0x142118,{'encoding':_0x518ce9(0x81)});if(!_0x5acd11?.[_0x518ce9(0x73)]())return{'status':'empty'};const _0x21088a=JSON[_0x518ce9(0x8a)](_0x5acd11);return{'status':'ok','data':_0x21088a};}catch(_0x1cd941){return{'status':_0x518ce9(0x8f),'message':_0x1cd941 instanceof Error?_0x1cd941['message']:String(_0x1cd941)};}}function parseCliConfigJsonFile(_0x527dc7,_0x427891,_0x5f0b29){const _0x4233c8=a243_0x124cd6,_0x8d00be=inspectCliConfigJsonFile(_0x527dc7);if(_0x8d00be[_0x4233c8(0x8c)]==='missing'||_0x8d00be[_0x4233c8(0x8c)]===_0x4233c8(0x98))return{};if(_0x8d00be['status']==='ok')return _0x8d00be[_0x4233c8(0x6d)];return _0x427891===_0x4233c8(0x86)&&_0x5f0b29&&console['error'](CLI_BIN_NAME+':\x20'+_0x5f0b29+'\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20'+_0x527dc7+'\x0a\x20\x20'+_0x8d00be[_0x4233c8(0x7f)]),{};}function normalizeLegacyConfigShape(_0x1f98b9){const _0x52e601=a243_0x124cd6;if(!_0x1f98b9||typeof _0x1f98b9!==_0x52e601(0x77))return{'config':{},'migrated':![]};const _0x431613={..._0x1f98b9},_0x58c143=_0x431613['apps']&&typeof _0x431613[_0x52e601(0x67)]===_0x52e601(0x77)?{..._0x431613[_0x52e601(0x67)]}:{},_0x49001f=Object['keys'](_0x58c143)['length'],_0x2fe96c=_0x431613[_0x52e601(0x76)]||_0x431613[_0x52e601(0x74)];let _0x38c536=![];if(_0x2fe96c&&_0x49001f===0x0){const _0x262bd4=typeof _0x431613['defaultApp']===_0x52e601(0x85)&&_0x431613[_0x52e601(0x75)][_0x52e601(0x73)]()?_0x431613[_0x52e601(0x75)]:String(_0x2fe96c)[_0x52e601(0x73)]();_0x58c143[_0x262bd4]={'appcode':String(_0x2fe96c)[_0x52e601(0x73)](),..._0x431613['env']!=null?{'env':_0x431613['env']}:{},..._0x431613[_0x52e601(0x79)]!=null?{'apiDir':_0x431613[_0x52e601(0x79)]}:{},..._0x431613[_0x52e601(0x72)]!=null?{'cookie':_0x431613['cookie']}:{},..._0x431613[_0x52e601(0x71)]!=null?{'accessKey':_0x431613[_0x52e601(0x71)]}:{},..._0x431613[_0x52e601(0x94)]!=null?{'format':_0x431613[_0x52e601(0x94)]}:{},..._0x431613[_0x52e601(0x97)]!=null?{'pageSize':_0x431613[_0x52e601(0x97)]}:{},..._0x431613['riskLevel']!=null?{'riskLevel':_0x431613[_0x52e601(0x6e)]}:{},..._0x431613[_0x52e601(0x8b)]!=null?{'locale':_0x431613[_0x52e601(0x8b)]}:{}},_0x431613['apps']=_0x58c143,delete _0x431613['defaultApp'],_0x38c536=!![];}return(_0x52e601(0x76)in _0x431613||'app'in _0x431613)&&(delete _0x431613[_0x52e601(0x76)],delete _0x431613[_0x52e601(0x74)],_0x38c536=!![]),{'config':_0x431613,'migrated':_0x38c536};}function writeNormalizedConfigIfNeeded(_0x4ecdcc,_0x314ca8){const _0x3783a3=a243_0x124cd6,_0x21b32d=JSON[_0x3783a3(0x6b)](normalizeConfigForWrite(_0x314ca8),null,0x2)+'\x0a';if(normalizedWriteCache['get'](_0x4ecdcc)===_0x21b32d)return;writeConfigFile(_0x4ecdcc,_0x314ca8),normalizedWriteCache[_0x3783a3(0x93)](_0x4ecdcc,_0x21b32d);}function parseAndNormalizeConfig(_0xebf1a5,_0x657e01,_0x2295df){const _0x394bc6=a243_0x124cd6,_0x4f3122=parseCliConfigJsonFile(_0xebf1a5,_0x657e01,_0x2295df),_0x59d55f=normalizeLegacyConfigShape(_0x4f3122);if(_0x59d55f[_0x394bc6(0x82)])try{writeNormalizedConfigIfNeeded(_0xebf1a5,_0x59d55f[_0x394bc6(0x89)]);}catch{}return _0x59d55f[_0x394bc6(0x89)];}export function loadRawConfigLayers(_0x3252c4){const _0x4d287f=a243_0x124cd6;let _0x21392f={},_0x1cf747={};const _0x1b2b80=resolveConfigPath(homedir());_0x1b2b80&&(_0x21392f=parseAndNormalizeConfig(_0x1b2b80,'warn',_0x4d287f(0x80)));const _0xaf544e=_0x3252c4??findProjectRootDirectory(),_0xee8c91=resolveConfigPath(_0xaf544e);return _0xee8c91&&(_0x1cf747=parseAndNormalizeConfig(_0xee8c91,_0x4d287f(0x86),_0x4d287f(0x95))),{'globalPath':_0x1b2b80,'projectPath':_0xee8c91,'globalConfig':_0x21392f,'projectConfig':_0x1cf747};}const INHERIT_WHITELIST=['cookie',a243_0x124cd6(0x71),a243_0x124cd6(0x8b),a243_0x124cd6(0x94),'riskLevel',a243_0x124cd6(0x97),a243_0x124cd6(0x88),a243_0x124cd6(0x83),a243_0x124cd6(0x6a),a243_0x124cd6(0x78),'runtimeDomain',a243_0x124cd6(0x96),'kbDomain',a243_0x124cd6(0x92),a243_0x124cd6(0x69),'certificateDomain'];export function mergeRawConfigLayers(_0x75b351){const _0x5d489d=a243_0x124cd6,{globalConfig:_0x30d0c7,projectConfig:_0x1d695a}=_0x75b351,_0x28c294=!!_0x75b351[_0x5d489d(0x6f)]||Object[_0x5d489d(0x90)](_0x1d695a)[_0x5d489d(0x8d)]>0x0;if(!_0x28c294)return mergeGlobalOnly(_0x30d0c7);return mergeProjectFirst(_0x30d0c7,_0x1d695a);}function mergeGlobalOnly(_0x5ce961){const _0x1e2de0=a243_0x124cd6,_0x1e575b={..._0x5ce961};delete _0x1e575b['inherit'];const _0x259359=_0x5ce961['apps']&&typeof _0x5ce961['apps']===_0x1e2de0(0x77)?_0x5ce961[_0x1e2de0(0x67)]:{};if(Object[_0x1e2de0(0x90)](_0x259359)[_0x1e2de0(0x8d)]>0x0)_0x1e575b['apps']=_0x259359;if(_0x5ce961[_0x1e2de0(0x75)])_0x1e575b['defaultApp']=_0x5ce961[_0x1e2de0(0x75)];return _0x1e575b;}function mergeProjectFirst(_0x2a730f,_0x484b0f){const _0x386d56=a243_0x124cd6,_0xe7ed14={..._0x484b0f};delete _0xe7ed14[_0x386d56(0x7a)];for(const _0x424f34 of INHERIT_WHITELIST){!(_0x424f34 in _0xe7ed14)&&_0x424f34 in _0x2a730f&&(_0xe7ed14[_0x424f34]=_0x2a730f[_0x424f34]);}const _0x27ff41=_0x484b0f[_0x386d56(0x67)]&&typeof _0x484b0f[_0x386d56(0x67)]==='object'?_0x484b0f['apps']:{};return Object[_0x386d56(0x90)](_0x27ff41)[_0x386d56(0x8d)]>0x0?_0xe7ed14[_0x386d56(0x67)]=_0x27ff41:delete _0xe7ed14[_0x386d56(0x67)],'defaultApp'in _0x484b0f?_0xe7ed14[_0x386d56(0x75)]=_0x484b0f['defaultApp']:delete _0xe7ed14[_0x386d56(0x75)],_0xe7ed14;}export function readRawConfigWithLayers(_0x4176fb){const _0x44fc7c=loadRawConfigLayers(_0x4176fb);return{'config':mergeRawConfigLayers(_0x44fc7c),'layers':_0x44fc7c};}export function readRawConfig(_0x1b1c15){return mergeRawConfigLayers(loadRawConfigLayers(_0x1b1c15));}export function readConfigFile(_0xfecc93){const _0x516264=a243_0x124cd6;return parseAndNormalizeConfig(_0xfecc93,_0x516264(0x91));}export function writeConfigFile(_0x4e2981,_0xec49c9){const _0x28376c=a243_0x124cd6,_0x5df883=dirname(_0x4e2981);!existsSync(_0x5df883)&&mkdirSync(_0x5df883,{'recursive':!![]});const _0x3ea229=_0x4e2981+_0x28376c(0x6c);try{const _0x120cba=normalizeConfigForWrite(_0xec49c9);writeFileSync(_0x3ea229,JSON[_0x28376c(0x6b)](_0x120cba,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0x3ea229,_0x4e2981);}catch(_0x4a6d12){try{unlinkSync(_0x3ea229);}catch{}throw _0x4a6d12;}}export function resolveWriteConfigPath(_0x37de11){const _0xf84f60=a243_0x124cd6,_0x523772=_0x37de11===_0xf84f60(0x87)?process['cwd']():homedir(),_0xee8e54=resolveConfigPath(_0x523772);return _0xee8e54??resolve(_0x523772,NEW_CONFIG_NAME);}
1
+ const a257_0x210273=a257_0x4878;(function(_0x17719b,_0x295a12){const _0x43e02d=a257_0x4878,_0x5456d7=_0x17719b();while(!![]){try{const _0x4da11a=-parseInt(_0x43e02d(0x16d))/0x1+parseInt(_0x43e02d(0x153))/0x2+parseInt(_0x43e02d(0x180))/0x3*(parseInt(_0x43e02d(0x158))/0x4)+parseInt(_0x43e02d(0x169))/0x5*(parseInt(_0x43e02d(0x148))/0x6)+parseInt(_0x43e02d(0x17b))/0x7*(parseInt(_0x43e02d(0x165))/0x8)+parseInt(_0x43e02d(0x163))/0x9*(-parseInt(_0x43e02d(0x154))/0xa)+-parseInt(_0x43e02d(0x17d))/0xb*(parseInt(_0x43e02d(0x14d))/0xc);if(_0x4da11a===_0x295a12)break;else _0x5456d7['push'](_0x5456d7['shift']());}catch(_0x177aa9){_0x5456d7['push'](_0x5456d7['shift']());}}}(a257_0x428f,0x1c94e));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='.rabetbase.json';export const CONFIG_NAMES=[NEW_CONFIG_NAME];const normalizedWriteCache=new Map();export function resolveConfigPath(_0xeb8536){for(const _0x5c1f9a of CONFIG_NAMES){const _0x789eab=resolve(_0xeb8536,_0x5c1f9a);if(existsSync(_0x789eab))return _0x789eab;}return undefined;}export function findProjectRootDirectory(_0x2c62cb=process['cwd']()){let _0x21d9c2=resolve(_0x2c62cb);const {root:_0x4e2c2f}=parse(_0x21d9c2),_0x243c42=homedir();while(!![]){if(resolveConfigPath(_0x21d9c2)){if(_0x21d9c2===_0x243c42)break;return _0x21d9c2;}if(_0x21d9c2===_0x4e2c2f||_0x21d9c2===_0x243c42)break;const _0x6a7ee1=dirname(_0x21d9c2);if(_0x6a7ee1===_0x21d9c2)break;_0x21d9c2=_0x6a7ee1;}return resolve(_0x2c62cb);}export function getProjectConfigPath(){const _0x188d1d=a257_0x4878;return resolveConfigPath(process[_0x188d1d(0x14f)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x58d46d){const _0x41a320=a257_0x4878;if(!existsSync(_0x58d46d))return{'status':_0x41a320(0x178)};try{const _0x4ff0c5=readFileSync(_0x58d46d,{'encoding':_0x41a320(0x15a)});if(!_0x4ff0c5?.[_0x41a320(0x162)]())return{'status':_0x41a320(0x167)};const _0x1cce29=JSON[_0x41a320(0x168)](_0x4ff0c5);return{'status':'ok','data':_0x1cce29};}catch(_0x389222){return{'status':_0x41a320(0x14c),'message':_0x389222 instanceof Error?_0x389222[_0x41a320(0x157)]:String(_0x389222)};}}function parseCliConfigJsonFile(_0x146e77,_0x3c04aa,_0x5ae3bf){const _0x5eb86d=a257_0x4878,_0x161bfb=inspectCliConfigJsonFile(_0x146e77);if(_0x161bfb[_0x5eb86d(0x16a)]===_0x5eb86d(0x178)||_0x161bfb[_0x5eb86d(0x16a)]==='empty')return{};if(_0x161bfb['status']==='ok')return _0x161bfb[_0x5eb86d(0x17e)];return _0x3c04aa===_0x5eb86d(0x176)&&_0x5ae3bf&&console['error'](CLI_BIN_NAME+':\x20'+_0x5ae3bf+'\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20'+_0x146e77+_0x5eb86d(0x170)+_0x161bfb[_0x5eb86d(0x157)]),{};}function normalizeLegacyConfigShape(_0x4af9c2){const _0x213486=a257_0x4878;if(!_0x4af9c2||typeof _0x4af9c2!==_0x213486(0x152))return{'config':{},'migrated':![]};const _0x4f8ac4={..._0x4af9c2},_0x577c83=_0x4f8ac4[_0x213486(0x15e)]&&typeof _0x4f8ac4['apps']==='object'?{..._0x4f8ac4['apps']}:{},_0x411adb=Object[_0x213486(0x16e)](_0x577c83)['length'],_0x6be48=_0x4f8ac4[_0x213486(0x166)]||_0x4f8ac4[_0x213486(0x171)];let _0x29f9d1=![];if(_0x6be48&&_0x411adb===0x0){const _0x4a09d7=typeof _0x4f8ac4['defaultApp']==='string'&&_0x4f8ac4[_0x213486(0x155)][_0x213486(0x162)]()?_0x4f8ac4[_0x213486(0x155)]:String(_0x6be48)[_0x213486(0x162)]();_0x577c83[_0x4a09d7]={'appcode':String(_0x6be48)['trim'](),..._0x4f8ac4[_0x213486(0x149)]!=null?{'env':_0x4f8ac4['env']}:{},..._0x4f8ac4[_0x213486(0x160)]!=null?{'apiDir':_0x4f8ac4[_0x213486(0x160)]}:{},..._0x4f8ac4['cookie']!=null?{'cookie':_0x4f8ac4[_0x213486(0x16c)]}:{},..._0x4f8ac4[_0x213486(0x175)]!=null?{'accessKey':_0x4f8ac4[_0x213486(0x175)]}:{},..._0x4f8ac4['format']!=null?{'format':_0x4f8ac4[_0x213486(0x172)]}:{},..._0x4f8ac4['pageSize']!=null?{'pageSize':_0x4f8ac4[_0x213486(0x159)]}:{},..._0x4f8ac4['riskLevel']!=null?{'riskLevel':_0x4f8ac4[_0x213486(0x177)]}:{},..._0x4f8ac4['locale']!=null?{'locale':_0x4f8ac4[_0x213486(0x17c)]}:{}},_0x4f8ac4['apps']=_0x577c83,delete _0x4f8ac4['defaultApp'],_0x29f9d1=!![];}return(_0x213486(0x166)in _0x4f8ac4||'app'in _0x4f8ac4)&&(delete _0x4f8ac4[_0x213486(0x166)],delete _0x4f8ac4[_0x213486(0x171)],_0x29f9d1=!![]),{'config':_0x4f8ac4,'migrated':_0x29f9d1};}function writeNormalizedConfigIfNeeded(_0x3e4dbc,_0x131193){const _0x434ea9=a257_0x4878,_0x5b28e7=JSON[_0x434ea9(0x173)](normalizeConfigForWrite(_0x131193),null,0x2)+'\x0a';if(normalizedWriteCache[_0x434ea9(0x14a)](_0x3e4dbc)===_0x5b28e7)return;writeConfigFile(_0x3e4dbc,_0x131193),normalizedWriteCache[_0x434ea9(0x147)](_0x3e4dbc,_0x5b28e7);}function parseAndNormalizeConfig(_0xbaa9,_0x736b44,_0x28c89f){const _0x5fa55f=a257_0x4878,_0x8c26fe=parseCliConfigJsonFile(_0xbaa9,_0x736b44,_0x28c89f),_0x575ade=normalizeLegacyConfigShape(_0x8c26fe);if(_0x575ade[_0x5fa55f(0x15b)])try{writeNormalizedConfigIfNeeded(_0xbaa9,_0x575ade['config']);}catch{}return _0x575ade[_0x5fa55f(0x179)];}export function loadRawConfigLayers(_0x545196){const _0x4142dc=a257_0x4878;let _0x133a75={},_0x27131b={};const _0x430fc4=resolveConfigPath(homedir());_0x430fc4&&(_0x133a75=parseAndNormalizeConfig(_0x430fc4,_0x4142dc(0x176),_0x4142dc(0x16f)));const _0x4f7191=_0x545196??findProjectRootDirectory(),_0x1e237a=resolveConfigPath(_0x4f7191);return _0x1e237a&&(_0x27131b=parseAndNormalizeConfig(_0x1e237a,'warn',_0x4142dc(0x15f))),{'globalPath':_0x430fc4,'projectPath':_0x1e237a,'globalConfig':_0x133a75,'projectConfig':_0x27131b};}const INHERIT_WHITELIST=[a257_0x210273(0x16c),a257_0x210273(0x175),a257_0x210273(0x17c),a257_0x210273(0x172),a257_0x210273(0x177),a257_0x210273(0x159),a257_0x210273(0x15c),a257_0x210273(0x174),a257_0x210273(0x16b),'apiDomain',a257_0x210273(0x150),'skillDomain',a257_0x210273(0x17f),a257_0x210273(0x14b),a257_0x210273(0x14e),a257_0x210273(0x161)];export function mergeRawConfigLayers(_0x1aea1d){const _0x50aa21=a257_0x210273,{globalConfig:_0x47e07b,projectConfig:_0x10cc91}=_0x1aea1d,_0x2fdf68=!!_0x1aea1d[_0x50aa21(0x164)]||Object['keys'](_0x10cc91)[_0x50aa21(0x17a)]>0x0;if(!_0x2fdf68)return mergeGlobalOnly(_0x47e07b);return mergeProjectFirst(_0x47e07b,_0x10cc91);}function mergeGlobalOnly(_0x3f1ef9){const _0x3aeedc=a257_0x210273,_0xcd3aae={..._0x3f1ef9};delete _0xcd3aae[_0x3aeedc(0x156)];const _0x4673d1=_0x3f1ef9['apps']&&typeof _0x3f1ef9['apps']===_0x3aeedc(0x152)?_0x3f1ef9[_0x3aeedc(0x15e)]:{};if(Object[_0x3aeedc(0x16e)](_0x4673d1)[_0x3aeedc(0x17a)]>0x0)_0xcd3aae[_0x3aeedc(0x15e)]=_0x4673d1;if(_0x3f1ef9[_0x3aeedc(0x155)])_0xcd3aae['defaultApp']=_0x3f1ef9['defaultApp'];return _0xcd3aae;}function a257_0x4878(_0x1313b7,_0xea3048){_0x1313b7=_0x1313b7-0x147;const _0x428fbb=a257_0x428f();let _0x4878d0=_0x428fbb[_0x1313b7];return _0x4878d0;}function mergeProjectFirst(_0x5b4648,_0x49d67f){const _0x38dc01=a257_0x210273,_0xa689bb={..._0x49d67f};delete _0xa689bb[_0x38dc01(0x156)];for(const _0x5b0569 of INHERIT_WHITELIST){!(_0x5b0569 in _0xa689bb)&&_0x5b0569 in _0x5b4648&&(_0xa689bb[_0x5b0569]=_0x5b4648[_0x5b0569]);}const _0xfecfb3=_0x49d67f['apps']&&typeof _0x49d67f[_0x38dc01(0x15e)]===_0x38dc01(0x152)?_0x49d67f[_0x38dc01(0x15e)]:{};return Object[_0x38dc01(0x16e)](_0xfecfb3)[_0x38dc01(0x17a)]>0x0?_0xa689bb['apps']=_0xfecfb3:delete _0xa689bb[_0x38dc01(0x15e)],_0x38dc01(0x155)in _0x49d67f?_0xa689bb[_0x38dc01(0x155)]=_0x49d67f[_0x38dc01(0x155)]:delete _0xa689bb[_0x38dc01(0x155)],_0xa689bb;}export function readRawConfigWithLayers(_0x2341ed){const _0x207d35=loadRawConfigLayers(_0x2341ed);return{'config':mergeRawConfigLayers(_0x207d35),'layers':_0x207d35};}function a257_0x428f(){const _0x453c5e=['942486PXifZu','env','get','appDomain','error','3288WHaIJX','localDomain','cwd','runtimeDomain','silent','object','259464JinwLJ','1794830NqTmSj','defaultApp','inherit','message','232roaJuM','pageSize','utf8','migrated','region','.tmp','apps','Project','apiDir','certificateDomain','trim','9MsXaoM','projectPath','1102216ocFLLk','appcode','empty','parse','5phWYyH','status','userDomain','cookie','135557waymvh','keys','Global','\x0a\x20\x20','app','format','stringify','routing','accessKey','warn','riskLevel','missing','config','length','7cnyqmb','locale','6765ELvxKe','data','kbDomain','9105NDzSkv','set'];a257_0x428f=function(){return _0x453c5e;};return a257_0x428f();}export function readRawConfig(_0x4ae1e7){return mergeRawConfigLayers(loadRawConfigLayers(_0x4ae1e7));}export function readConfigFile(_0x2389c3){const _0xfbcf6a=a257_0x210273;return parseAndNormalizeConfig(_0x2389c3,_0xfbcf6a(0x151));}export function writeConfigFile(_0x2cd2fd,_0x39192c){const _0x104599=a257_0x210273,_0x1782b1=dirname(_0x2cd2fd);!existsSync(_0x1782b1)&&mkdirSync(_0x1782b1,{'recursive':!![]});const _0x1c00a8=_0x2cd2fd+_0x104599(0x15d);try{const _0x8c126=normalizeConfigForWrite(_0x39192c);writeFileSync(_0x1c00a8,JSON['stringify'](_0x8c126,null,0x2)+'\x0a',{'encoding':_0x104599(0x15a),'mode':0x180}),renameSync(_0x1c00a8,_0x2cd2fd);}catch(_0x211e12){try{unlinkSync(_0x1c00a8);}catch{}throw _0x211e12;}}export function resolveWriteConfigPath(_0x568db8){const _0x4fc240=a257_0x210273,_0x232138=_0x568db8==='project'?process[_0x4fc240(0x14f)]():homedir(),_0x52b7ec=resolveConfigPath(_0x232138);return _0x52b7ec??resolve(_0x232138,NEW_CONFIG_NAME);}
package/lib/context.js CHANGED
@@ -1 +1 @@
1
- const a244_0x3084ab=a244_0x5d02;(function(_0x3503df,_0x6efb39){const _0x5e939c=a244_0x5d02,_0x2dde36=_0x3503df();while(!![]){try{const _0x147c6f=-parseInt(_0x5e939c(0x1ac))/0x1+-parseInt(_0x5e939c(0x1a8))/0x2*(parseInt(_0x5e939c(0x1d1))/0x3)+parseInt(_0x5e939c(0x1bc))/0x4+parseInt(_0x5e939c(0x1df))/0x5+parseInt(_0x5e939c(0x1a1))/0x6+parseInt(_0x5e939c(0x1d2))/0x7+-parseInt(_0x5e939c(0x1ca))/0x8;if(_0x147c6f===_0x6efb39)break;else _0x2dde36['push'](_0x2dde36['shift']());}catch(_0x4bf535){_0x2dde36['push'](_0x2dde36['shift']());}}}(a244_0x5854,0x57dcd));import{resolve}from'node:path';import{CLI_BIN_NAME}from'./constant/cli.js';import{buildAuth}from'./context/auth-resolver.js';function a244_0x5854(){const _0xd7fd59=['apiDomain','name','hasOwnProperty','setLogPath','platformDomain','prototype','api.ts','entries','length','skillDomain','projectConfig','filter','config','replace','doctor','1627036FQbhPV','production','region','userDomain','app','global','cookie','globalConfig','configuredRegion','defaultApp','template_base_url','appDomain','env','raw','443096SchKRn','agentDomain','apiDir','runtimeDomain','Rabetbase\x20configuration','-api.ts','call','364125dmSSdu','4917605ftfsNd','find','cdn','./constant/domain.js','routing','regionConfiguredValue','certificateDomain','domains','app\x20profile\x20\x22','appcode','argv','cwd','global\x20Rabetbase\x20configuration','786875LMmMzc','object','./utils/is-non-interactive.js','regionLocation','kbDomain','values','apps','daily','keys','regionSource','localDomain','1500216YZiEHs','string','join','skillHubDomain','trim','routingConfig','project','10NQOCnR','slice','https://g.lovrabet.com/dist/lovrabet-skill','currentApp','494538ADwXSC'];a244_0x5854=function(){return _0xd7fd59;};return a244_0x5854();}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';import{logger}from'./utils/logger.js';export{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x4a63c8){return process.env[`RABETBASE_${_0x4a63c8}`]||process.env[`LOVRABET_${_0x4a63c8}`]||undefined;}function optionalString(_0x37011c){const _0x3bfe8d=a244_0x5d02;return typeof _0x37011c===_0x3bfe8d(0x1a2)&&_0x37011c['trim']()?_0x37011c['trim']():undefined;}export function isRoutingRecoveryService(_0x375edc){const _0x5499e2=a244_0x5d02;return _0x375edc===_0x5499e2(0x1b9)||_0x375edc===_0x5499e2(0x1bb);}export async function createContext(_0x5cb91c){const _0x1a6afd=a244_0x5d02,{config:_0x13e5a7,layers:_0x5f2195}=readRawConfigWithLayers(),_0x1319a0=buildConfig(_0x13e5a7,_0x5cb91c,_0x5f2195);await initGlobalEnvironment(_0x1319a0);const {getUserDomain:_0x18e4f7,getApiDomain:_0xe8250e}=await import('./constant/domain.js'),_0xe1f2e8={'apiDomain':_0xe8250e(),'userDomain':_0x18e4f7()},_0x21d4a0=await buildAuth(_0x1319a0);logger[_0x1a6afd(0x1b0)](process[_0x1a6afd(0x1dd)]());const _0xeb89e0=(CLI_BIN_NAME+'\x20'+process[_0x1a6afd(0x1dc)][_0x1a6afd(0x1a9)](0x2)[_0x1a6afd(0x1a3)]('\x20'))[_0x1a6afd(0x1a5)]();logger['setRawCommand'](_0xeb89e0);const {isNonInteractive:_0x43e2e2}=await import(_0x1a6afd(0x1e1)),_0x1230ce=_0x43e2e2(_0x5cb91c);return{'config':_0x1319a0,'auth':_0x21d4a0,'logger':logger,'env':_0xe1f2e8,'nonInteractive':_0x1230ce};}export function buildConfigFromFlags(_0x339093){const {config:_0x31d8f5,layers:_0x4edc0a}=readRawConfigWithLayers();return buildConfig(_0x31d8f5,_0x339093,_0x4edc0a);}export async function initGlobalEnvironment(_0x5e7dd2){const _0x3192b8=a244_0x5d02,_0xfa1319=_0x5e7dd2[_0x3192b8(0x19f)]==='app'&&_0x5e7dd2[_0x3192b8(0x1ab)]?_0x3192b8(0x1da)+_0x5e7dd2[_0x3192b8(0x1ab)]+'\x22':_0x5e7dd2['regionSource']===_0x3192b8(0x1a7)?'project\x20Rabetbase\x20configuration':_0x5e7dd2[_0x3192b8(0x19f)]===_0x3192b8(0x1c1)?_0x3192b8(0x1de):_0x3192b8(0x1ce);await initConfiguredEnvironment({'raw':_0x5e7dd2['raw'],'configuredRegion':_0x5e7dd2[_0x3192b8(0x1d7)]??_0x5e7dd2[_0x3192b8(0x1c9)]?.[_0x3192b8(0x1be)]??_0x5e7dd2[_0x3192b8(0x1be)],'regionLocation':_0xfa1319,'targetEnv':_0x5e7dd2[_0x3192b8(0x1c8)]});}async function initConfiguredEnvironment(_0x2bfedb){const _0x530251=a244_0x5d02,_0x207883=resolveConfiguredRegion(_0x2bfedb[_0x530251(0x1c4)],_0x2bfedb[_0x530251(0x1e2)]),_0x14e444=resolveEnterpriseRoutingManifest(_0x2bfedb[_0x530251(0x1c9)]?.[_0x530251(0x1d6)]),_0x31cb15={'region':_0x207883,'apiDomain':_0x14e444?_0x14e444[_0x530251(0x1d9)][_0x530251(0x1ad)]:optionalString(_0x2bfedb[_0x530251(0x1c9)]?.[_0x530251(0x1ad)]),'userDomain':_0x14e444?_0x14e444[_0x530251(0x1d9)][_0x530251(0x1bf)]:optionalString(_0x2bfedb[_0x530251(0x1c9)]?.[_0x530251(0x1bf)]),'runtimeDomain':_0x14e444?_0x14e444[_0x530251(0x1d9)][_0x530251(0x1cd)]:optionalString(_0x2bfedb['raw']?.[_0x530251(0x1cd)]),'skillDomain':_0x14e444?_0x14e444[_0x530251(0x1d9)]['skillDomain']:optionalString(_0x2bfedb['raw']?.[_0x530251(0x1b6)])||optionalString(_0x2bfedb[_0x530251(0x1c9)]?.['skillHubDomain'])||optionalString(_0x2bfedb[_0x530251(0x1c9)]?.[_0x530251(0x1cb)])||optionalString(_0x2bfedb['raw']?.[_0x530251(0x1b1)]),'kbDomain':_0x14e444?_0x14e444['domains']['kbDomain']:optionalString(_0x2bfedb[_0x530251(0x1c9)]?.[_0x530251(0x1e3)])||optionalString(_0x2bfedb['raw']?.['agentDomain'])||optionalString(_0x2bfedb[_0x530251(0x1c9)]?.[_0x530251(0x1b1)]),'appDomain':_0x14e444?_0x14e444[_0x530251(0x1d9)][_0x530251(0x1c7)]:optionalString(_0x2bfedb[_0x530251(0x1c9)]?.['appDomain']),'localDomain':_0x14e444?_0x14e444[_0x530251(0x1d9)]['localDomain']:optionalString(_0x2bfedb[_0x530251(0x1c9)]?.['localDomain']),'certificateDomain':_0x14e444?_0x14e444[_0x530251(0x1d9)][_0x530251(0x1d8)]:optionalString(_0x2bfedb[_0x530251(0x1c9)]?.[_0x530251(0x1d8)]),'cdn':_0x14e444?.[_0x530251(0x1d4)]},{initEnv:_0x3528a0}=await import('./constant/env.js'),{initDomains:_0x2cad7e}=await import(_0x530251(0x1d5));_0x3528a0(_0x2bfedb['targetEnv']),_0x2cad7e(_0x31cb15);}export async function initMultiAppEnvironment(_0x33296d){const _0x55f01d=a244_0x5d02;await initConfiguredEnvironment({'raw':_0x33296d[_0x55f01d(0x1a6)],'configuredRegion':_0x33296d[_0x55f01d(0x1be)],'regionLocation':_0x55f01d(0x1da)+_0x33296d[_0x55f01d(0x1ae)]+'\x22','targetEnv':_0x33296d[_0x55f01d(0x1c8)]==='daily'?_0x55f01d(0x19d):_0x55f01d(0x1bd)});}export function getConfigAppCode(_0x4ef55a){const _0x545990=a244_0x5d02,_0x1150fd=readRawConfig(_0x4ef55a);if(_0x1150fd[_0x545990(0x1e5)]&&typeof _0x1150fd[_0x545990(0x1e5)]===_0x545990(0x1e0)){const _0xa7eeda=_0x1150fd['defaultApp'];if(_0xa7eeda)return _0x1150fd[_0x545990(0x1e5)][_0xa7eeda]?.[_0x545990(0x1db)]?String(_0x1150fd[_0x545990(0x1e5)][_0xa7eeda][_0x545990(0x1db)])['trim']():undefined;const _0x35f331=Object[_0x545990(0x1e4)](_0x1150fd[_0x545990(0x1e5)]);if(_0x35f331['length']===0x1&&_0x35f331[0x0]?.[_0x545990(0x1db)])return String(_0x35f331[0x0]['appcode'])['trim']();}const _0xd80df2=_0x1150fd[_0x545990(0x1db)]||_0x1150fd[_0x545990(0x1c0)];if(typeof _0xd80df2!==_0x545990(0x1a2)||_0xd80df2[_0x545990(0x1a5)]()==='')return undefined;return _0xd80df2[_0x545990(0x1a5)]();}function a244_0x5d02(_0x5708e3,_0x168f35){_0x5708e3=_0x5708e3-0x19d;const _0x5854ed=a244_0x5854();let _0x5d02c5=_0x5854ed[_0x5708e3];return _0x5d02c5;}const CONNECTION_ROUTING_KEYS=[a244_0x3084ab(0x1d6),'apiDomain','userDomain',a244_0x3084ab(0x1cd),a244_0x3084ab(0x1b6),a244_0x3084ab(0x1a4),'kbDomain','agentDomain','platformDomain',a244_0x3084ab(0x1c7),a244_0x3084ab(0x1a0),a244_0x3084ab(0x1d8)];function pickConnectionRoutingConfig(_0x12c5d0,_0x48f2c9){const _0x4088a4={'region':_0x48f2c9};for(const _0xb39a71 of CONNECTION_ROUTING_KEYS){if(_0x12c5d0[_0xb39a71]!==undefined)_0x4088a4[_0xb39a71]=_0x12c5d0[_0xb39a71];}return _0x4088a4;}export function getMultiAppConfigs(_0x3d2f52=a244_0x3084ab(0x1a7),_0x543728){const _0x2241d7=a244_0x3084ab,_0x2a927e=loadRawConfigLayers(_0x543728);let _0x38ec5b,_0x46ca1d;const _0x234a9d=mergeRawConfigLayers(_0x2a927e),_0x24b246=_0x2a927e[_0x2241d7(0x1c3)][_0x2241d7(0x1e5)]&&typeof _0x2a927e[_0x2241d7(0x1c3)][_0x2241d7(0x1e5)]===_0x2241d7(0x1e0)?_0x2a927e['globalConfig'][_0x2241d7(0x1e5)]:{},_0x268e9e=_0x2a927e['projectConfig'][_0x2241d7(0x1e5)]&&typeof _0x2a927e[_0x2241d7(0x1b7)]['apps']===_0x2241d7(0x1e0)?_0x2a927e[_0x2241d7(0x1b7)][_0x2241d7(0x1e5)]:{};_0x3d2f52==='merged'?(_0x38ec5b={..._0x24b246,..._0x268e9e},_0x46ca1d=_0x234a9d[_0x2241d7(0x1c5)]):(_0x38ec5b=_0x2a927e['projectConfig'][_0x2241d7(0x1e5)],_0x46ca1d=_0x2a927e[_0x2241d7(0x1b7)]['defaultApp']);!_0x46ca1d&&_0x38ec5b&&typeof _0x38ec5b===_0x2241d7(0x1e0)&&Object[_0x2241d7(0x19e)](_0x38ec5b)[_0x2241d7(0x1b5)]===0x1&&(_0x46ca1d=Object[_0x2241d7(0x19e)](_0x38ec5b)[0x0]);if(!_0x38ec5b||typeof _0x38ec5b!==_0x2241d7(0x1e0)||Object[_0x2241d7(0x19e)](_0x38ec5b)[_0x2241d7(0x1b5)]===0x0)return null;return Object[_0x2241d7(0x1b4)](_0x38ec5b)['map'](([_0xd0b1e2,_0x349c60])=>{const _0x153ed5=_0x2241d7,_0x350f4d=_0x3d2f52===_0x153ed5(0x1a7)||Object[_0x153ed5(0x1b2)][_0x153ed5(0x1af)][_0x153ed5(0x1d0)](_0x268e9e,_0xd0b1e2),_0x1921f9=_0x350f4d?_0x234a9d:_0x2a927e['globalConfig'],_0x17fe30=resolveEffectiveRegion({'appRegion':_0x349c60?.['region'],'projectRegion':_0x350f4d?_0x2a927e[_0x153ed5(0x1b7)][_0x153ed5(0x1be)]:undefined,'globalRegion':_0x2a927e['globalConfig']['region'],'mergedRegion':_0x1921f9[_0x153ed5(0x1be)],'appName':_0xd0b1e2});return{'name':_0xd0b1e2,'appcode':_0x349c60?.[_0x153ed5(0x1db)]||'','isDefault':_0xd0b1e2===_0x46ca1d,'region':_0x17fe30[_0x153ed5(0x1be)],'regionSource':_0x17fe30['source'],'env':_0x349c60?.['env'],'apiDir':_0x349c60?.[_0x153ed5(0x1cc)],'cookie':_0x349c60?.[_0x153ed5(0x1c2)]||undefined,'routingConfig':pickConnectionRoutingConfig(_0x1921f9,_0x17fe30['region'])};})[_0x2241d7(0x1b8)](_0x1b1023=>_0x1b1023[_0x2241d7(0x1db)]);}export function getTemplateBaseUrl(_0x278a5f){const _0x5f6ae5=a244_0x3084ab,_0xdbe835=readRawConfig(_0x278a5f);if(_0xdbe835[_0x5f6ae5(0x1c6)]&&typeof _0xdbe835[_0x5f6ae5(0x1c6)]===_0x5f6ae5(0x1a2))return _0xdbe835[_0x5f6ae5(0x1c6)][_0x5f6ae5(0x1ba)](/\/$/,'');return _0x5f6ae5(0x1aa);}function buildConfig(_0x262cd5,_0x38412b,_0xd154b1){return{...resolveAppConfig({'raw':_0x262cd5,'flags':_0x38412b,'layers':_0xd154b1,'readEnv':env}),'raw':_0x262cd5};}export function resolveApiFilePath(_0x54f547,_0x5d7944){const _0x99d849=a244_0x3084ab,_0x2c49d2=resolve(process[_0x99d849(0x1dd)](),_0x54f547),_0x3aed45=resolve(_0x2c49d2,_0x99d849(0x1b3));if(!_0x5d7944)return _0x3aed45;const _0x4f65ed=readRawConfig(),_0x276426=_0x4f65ed[_0x99d849(0x1e5)]&&typeof _0x4f65ed[_0x99d849(0x1e5)]===_0x99d849(0x1e0)?_0x4f65ed[_0x99d849(0x1e5)]:{},_0x2d7873=Object[_0x99d849(0x1b4)](_0x276426)[_0x99d849(0x1d3)](([,_0x45ed9b])=>_0x45ed9b?.['appcode']===_0x5d7944);if(!_0x2d7873)return _0x3aed45;const [_0x339ac5,_0x373bc7]=_0x2d7873,_0x360725=typeof _0x4f65ed[_0x99d849(0x1c5)]==='string'?_0x4f65ed[_0x99d849(0x1c5)]:undefined;if(_0x373bc7?.[_0x99d849(0x1cc)])return _0x3aed45;if(_0x360725&&_0x339ac5!==_0x360725)return resolve(_0x2c49d2,_0x339ac5+_0x99d849(0x1cf));return _0x3aed45;}
1
+ const a258_0x25662d=a258_0x5880;(function(_0x126891,_0x1e5eeb){const _0x653858=a258_0x5880,_0x215d23=_0x126891();while(!![]){try{const _0x261382=parseInt(_0x653858(0x1a7))/0x1+parseInt(_0x653858(0x1aa))/0x2*(parseInt(_0x653858(0x1ae))/0x3)+-parseInt(_0x653858(0x18b))/0x4+parseInt(_0x653858(0x1ba))/0x5+-parseInt(_0x653858(0x190))/0x6*(-parseInt(_0x653858(0x1ad))/0x7)+-parseInt(_0x653858(0x1b3))/0x8*(parseInt(_0x653858(0x1a8))/0x9)+parseInt(_0x653858(0x1a3))/0xa*(-parseInt(_0x653858(0x189))/0xb);if(_0x261382===_0x1e5eeb)break;else _0x215d23['push'](_0x215d23['shift']());}catch(_0x363c54){_0x215d23['push'](_0x215d23['shift']());}}}(a258_0x458c,0xc893d));import{resolve}from'node:path';import{CLI_BIN_NAME}from'./constant/cli.js';function a258_0x458c(){const _0x592ac9=['392904iDChHB','userDomain','cwd','regionSource','production','raw','app','1243060FcDbCi','targetEnv','project\x20Rabetbase\x20configuration','appDomain','template_base_url','length','certificateDomain','name','defaultApp','keys','object','setLogPath','string','appcode','cookie','argv','skillDomain','domains','api.ts','slice','env','globalConfig','routing','Rabetbase\x20configuration','skillHubDomain','global\x20Rabetbase\x20configuration','values','11tDxjxx','hasOwnProperty','664276llTzmC','join','https://g.lovrabet.com/dist/lovrabet-skill','agentDomain','runtimeDomain','79626dsNOlK','currentApp','source','prototype','projectConfig','doctor','apiDir','region','apps','project','trim','./constant/domain.js','merged','platformDomain','localDomain','kbDomain','app\x20profile\x20\x22','daily','global','16183190FEQRXL','configuredRegion','./constant/env.js','regionLocation','1495965AQvEJh','117ZMorAb','./utils/is-non-interactive.js','10WooRDI','find','replace','420zQjCEI','422151hQrfbH','entries','call','apiDomain','setRawCommand'];a258_0x458c=function(){return _0x592ac9;};return a258_0x458c();}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';import{logger}from'./utils/logger.js';export{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x256ba7){return process.env[`RABETBASE_${_0x256ba7}`]||process.env[`LOVRABET_${_0x256ba7}`]||undefined;}function optionalString(_0x56bba7){const _0x2f39c4=a258_0x5880;return typeof _0x56bba7===_0x2f39c4(0x17a)&&_0x56bba7[_0x2f39c4(0x19a)]()?_0x56bba7['trim']():undefined;}export function isRoutingRecoveryService(_0x84b1cf){const _0xbfa591=a258_0x5880;return _0x84b1cf==='config'||_0x84b1cf===_0xbfa591(0x195);}export async function createContext(_0x273bec){const _0x221583=a258_0x5880,{config:_0x56bd69,layers:_0x19a853}=readRawConfigWithLayers(),_0x3a2fe8=buildConfig(_0x56bd69,_0x273bec,_0x19a853);await initGlobalEnvironment(_0x3a2fe8);const {getUserDomain:_0xd89414,getApiDomain:_0x51bf0a}=await import(_0x221583(0x19b)),_0x464589={'apiDomain':_0x51bf0a(),'userDomain':_0xd89414()},_0x1ee919=await buildAuth(_0x3a2fe8);logger[_0x221583(0x1c5)](process[_0x221583(0x1b5)]());const _0x3471b0=(CLI_BIN_NAME+'\x20'+process[_0x221583(0x17d)][_0x221583(0x181)](0x2)[_0x221583(0x18c)]('\x20'))['trim']();logger[_0x221583(0x1b2)](_0x3471b0);const {isNonInteractive:_0x405e2a}=await import(_0x221583(0x1a9)),_0x6b63ee=_0x405e2a(_0x273bec);return{'config':_0x3a2fe8,'auth':_0x1ee919,'logger':logger,'env':_0x464589,'nonInteractive':_0x6b63ee};}export function buildConfigFromFlags(_0x56215a){const {config:_0x57fdec,layers:_0x5b46ea}=readRawConfigWithLayers();return buildConfig(_0x57fdec,_0x56215a,_0x5b46ea);}export async function initGlobalEnvironment(_0x3ee606){const _0x2a0b78=a258_0x5880,_0x57ebac=_0x3ee606[_0x2a0b78(0x1b6)]===_0x2a0b78(0x1b9)&&_0x3ee606[_0x2a0b78(0x191)]?'app\x20profile\x20\x22'+_0x3ee606[_0x2a0b78(0x191)]+'\x22':_0x3ee606['regionSource']==='project'?_0x2a0b78(0x1bc):_0x3ee606[_0x2a0b78(0x1b6)]===_0x2a0b78(0x1a2)?_0x2a0b78(0x187):_0x2a0b78(0x185);await initConfiguredEnvironment({'raw':_0x3ee606[_0x2a0b78(0x1b8)],'configuredRegion':_0x3ee606['regionConfiguredValue']??_0x3ee606[_0x2a0b78(0x1b8)]?.[_0x2a0b78(0x197)]??_0x3ee606['region'],'regionLocation':_0x57ebac,'targetEnv':_0x3ee606[_0x2a0b78(0x182)]});}async function initConfiguredEnvironment(_0x5c8846){const _0x2f92d2=a258_0x5880,_0xfbb48e=resolveConfiguredRegion(_0x5c8846[_0x2f92d2(0x1a4)],_0x5c8846[_0x2f92d2(0x1a6)]),_0x25f1fb=resolveEnterpriseRoutingManifest(_0x5c8846[_0x2f92d2(0x1b8)]?.[_0x2f92d2(0x184)]),_0x2d4a25={'region':_0xfbb48e,'apiDomain':_0x25f1fb?_0x25f1fb[_0x2f92d2(0x17f)]['apiDomain']:optionalString(_0x5c8846[_0x2f92d2(0x1b8)]?.[_0x2f92d2(0x1b1)]),'userDomain':_0x25f1fb?_0x25f1fb[_0x2f92d2(0x17f)]['userDomain']:optionalString(_0x5c8846[_0x2f92d2(0x1b8)]?.[_0x2f92d2(0x1b4)]),'runtimeDomain':_0x25f1fb?_0x25f1fb[_0x2f92d2(0x17f)][_0x2f92d2(0x18f)]:optionalString(_0x5c8846['raw']?.[_0x2f92d2(0x18f)]),'skillDomain':_0x25f1fb?_0x25f1fb[_0x2f92d2(0x17f)][_0x2f92d2(0x17e)]:optionalString(_0x5c8846[_0x2f92d2(0x1b8)]?.['skillDomain'])||optionalString(_0x5c8846[_0x2f92d2(0x1b8)]?.[_0x2f92d2(0x186)])||optionalString(_0x5c8846[_0x2f92d2(0x1b8)]?.['agentDomain'])||optionalString(_0x5c8846[_0x2f92d2(0x1b8)]?.[_0x2f92d2(0x19d)]),'kbDomain':_0x25f1fb?_0x25f1fb[_0x2f92d2(0x17f)]['kbDomain']:optionalString(_0x5c8846[_0x2f92d2(0x1b8)]?.['kbDomain'])||optionalString(_0x5c8846['raw']?.['agentDomain'])||optionalString(_0x5c8846['raw']?.[_0x2f92d2(0x19d)]),'appDomain':_0x25f1fb?_0x25f1fb[_0x2f92d2(0x17f)][_0x2f92d2(0x1bd)]:optionalString(_0x5c8846[_0x2f92d2(0x1b8)]?.['appDomain']),'localDomain':_0x25f1fb?_0x25f1fb[_0x2f92d2(0x17f)][_0x2f92d2(0x19e)]:optionalString(_0x5c8846[_0x2f92d2(0x1b8)]?.[_0x2f92d2(0x19e)]),'certificateDomain':_0x25f1fb?_0x25f1fb[_0x2f92d2(0x17f)][_0x2f92d2(0x1c0)]:optionalString(_0x5c8846[_0x2f92d2(0x1b8)]?.[_0x2f92d2(0x1c0)]),'cdn':_0x25f1fb?.['cdn']},{initEnv:_0x4a7395}=await import(_0x2f92d2(0x1a5)),{initDomains:_0x58d6c1}=await import(_0x2f92d2(0x19b));_0x4a7395(_0x5c8846[_0x2f92d2(0x1bb)]),_0x58d6c1(_0x2d4a25);}export async function initMultiAppEnvironment(_0x1032d0){const _0x2da189=a258_0x5880;await initConfiguredEnvironment({'raw':_0x1032d0['routingConfig'],'configuredRegion':_0x1032d0[_0x2da189(0x197)],'regionLocation':_0x2da189(0x1a0)+_0x1032d0[_0x2da189(0x1c1)]+'\x22','targetEnv':_0x1032d0[_0x2da189(0x182)]===_0x2da189(0x1a1)?_0x2da189(0x1a1):_0x2da189(0x1b7)});}export function getConfigAppCode(_0x4b1700){const _0x58e9f3=a258_0x5880,_0xe34182=readRawConfig(_0x4b1700);if(_0xe34182[_0x58e9f3(0x198)]&&typeof _0xe34182[_0x58e9f3(0x198)]==='object'){const _0xca3443=_0xe34182[_0x58e9f3(0x1c2)];if(_0xca3443)return _0xe34182['apps'][_0xca3443]?.[_0x58e9f3(0x17b)]?String(_0xe34182[_0x58e9f3(0x198)][_0xca3443][_0x58e9f3(0x17b)])[_0x58e9f3(0x19a)]():undefined;const _0x310250=Object[_0x58e9f3(0x188)](_0xe34182[_0x58e9f3(0x198)]);if(_0x310250[_0x58e9f3(0x1bf)]===0x1&&_0x310250[0x0]?.['appcode'])return String(_0x310250[0x0][_0x58e9f3(0x17b)])[_0x58e9f3(0x19a)]();}const _0x364975=_0xe34182[_0x58e9f3(0x17b)]||_0xe34182[_0x58e9f3(0x1b9)];if(typeof _0x364975!==_0x58e9f3(0x17a)||_0x364975['trim']()==='')return undefined;return _0x364975['trim']();}const CONNECTION_ROUTING_KEYS=['routing',a258_0x25662d(0x1b1),a258_0x25662d(0x1b4),a258_0x25662d(0x18f),a258_0x25662d(0x17e),a258_0x25662d(0x186),a258_0x25662d(0x19f),a258_0x25662d(0x18e),a258_0x25662d(0x19d),a258_0x25662d(0x1bd),a258_0x25662d(0x19e),'certificateDomain'];function pickConnectionRoutingConfig(_0x5de954,_0x253766){const _0x338d09={'region':_0x253766};for(const _0x567be1 of CONNECTION_ROUTING_KEYS){if(_0x5de954[_0x567be1]!==undefined)_0x338d09[_0x567be1]=_0x5de954[_0x567be1];}return _0x338d09;}function a258_0x5880(_0x172188,_0x39f28e){_0x172188=_0x172188-0x17a;const _0x458cac=a258_0x458c();let _0x588085=_0x458cac[_0x172188];return _0x588085;}export function getMultiAppConfigs(_0x346114=a258_0x25662d(0x199),_0x34d603){const _0x4823f2=a258_0x25662d,_0x49a70c=loadRawConfigLayers(_0x34d603);let _0x542932,_0x2933bf;const _0x133c8e=mergeRawConfigLayers(_0x49a70c),_0x31b090=_0x49a70c[_0x4823f2(0x183)][_0x4823f2(0x198)]&&typeof _0x49a70c['globalConfig'][_0x4823f2(0x198)]==='object'?_0x49a70c[_0x4823f2(0x183)][_0x4823f2(0x198)]:{},_0x12476f=_0x49a70c[_0x4823f2(0x194)][_0x4823f2(0x198)]&&typeof _0x49a70c['projectConfig'][_0x4823f2(0x198)]===_0x4823f2(0x1c4)?_0x49a70c[_0x4823f2(0x194)][_0x4823f2(0x198)]:{};_0x346114===_0x4823f2(0x19c)?(_0x542932={..._0x31b090,..._0x12476f},_0x2933bf=_0x133c8e[_0x4823f2(0x1c2)]):(_0x542932=_0x49a70c[_0x4823f2(0x194)][_0x4823f2(0x198)],_0x2933bf=_0x49a70c[_0x4823f2(0x194)][_0x4823f2(0x1c2)]);!_0x2933bf&&_0x542932&&typeof _0x542932===_0x4823f2(0x1c4)&&Object[_0x4823f2(0x1c3)](_0x542932)[_0x4823f2(0x1bf)]===0x1&&(_0x2933bf=Object[_0x4823f2(0x1c3)](_0x542932)[0x0]);if(!_0x542932||typeof _0x542932!==_0x4823f2(0x1c4)||Object[_0x4823f2(0x1c3)](_0x542932)[_0x4823f2(0x1bf)]===0x0)return null;return Object[_0x4823f2(0x1af)](_0x542932)['map'](([_0x46dccb,_0x50e4ca])=>{const _0x74720f=_0x4823f2,_0x2027f=_0x346114===_0x74720f(0x199)||Object[_0x74720f(0x193)][_0x74720f(0x18a)][_0x74720f(0x1b0)](_0x12476f,_0x46dccb),_0x14bc2b=_0x2027f?_0x133c8e:_0x49a70c['globalConfig'],_0x3f60fa=resolveEffectiveRegion({'appRegion':_0x50e4ca?.['region'],'projectRegion':_0x2027f?_0x49a70c[_0x74720f(0x194)][_0x74720f(0x197)]:undefined,'globalRegion':_0x49a70c[_0x74720f(0x183)][_0x74720f(0x197)],'mergedRegion':_0x14bc2b[_0x74720f(0x197)],'appName':_0x46dccb});return{'name':_0x46dccb,'appcode':_0x50e4ca?.[_0x74720f(0x17b)]||'','isDefault':_0x46dccb===_0x2933bf,'region':_0x3f60fa[_0x74720f(0x197)],'regionSource':_0x3f60fa[_0x74720f(0x192)],'env':_0x50e4ca?.[_0x74720f(0x182)],'apiDir':_0x50e4ca?.[_0x74720f(0x196)],'cookie':_0x50e4ca?.[_0x74720f(0x17c)]||undefined,'routingConfig':pickConnectionRoutingConfig(_0x14bc2b,_0x3f60fa['region'])};})['filter'](_0x4d5558=>_0x4d5558[_0x4823f2(0x17b)]);}export function getTemplateBaseUrl(_0x378306){const _0xd073c7=a258_0x25662d,_0x45fa33=readRawConfig(_0x378306);if(_0x45fa33[_0xd073c7(0x1be)]&&typeof _0x45fa33[_0xd073c7(0x1be)]==='string')return _0x45fa33[_0xd073c7(0x1be)][_0xd073c7(0x1ac)](/\/$/,'');return _0xd073c7(0x18d);}function buildConfig(_0x5a356d,_0x1bfa8a,_0x535c5f){return{...resolveAppConfig({'raw':_0x5a356d,'flags':_0x1bfa8a,'layers':_0x535c5f,'readEnv':env}),'raw':_0x5a356d};}export function resolveApiFilePath(_0x576fc8,_0x2c21ea){const _0x44c2a1=a258_0x25662d,_0x35ae75=resolve(process[_0x44c2a1(0x1b5)](),_0x576fc8),_0x4cc349=resolve(_0x35ae75,_0x44c2a1(0x180));if(!_0x2c21ea)return _0x4cc349;const _0x41fa34=readRawConfig(),_0x502d71=_0x41fa34['apps']&&typeof _0x41fa34[_0x44c2a1(0x198)]===_0x44c2a1(0x1c4)?_0x41fa34[_0x44c2a1(0x198)]:{},_0x2bdcf0=Object[_0x44c2a1(0x1af)](_0x502d71)[_0x44c2a1(0x1ab)](([,_0x53cc9b])=>_0x53cc9b?.[_0x44c2a1(0x17b)]===_0x2c21ea);if(!_0x2bdcf0)return _0x4cc349;const [_0x41b36a,_0x3c661e]=_0x2bdcf0,_0x4087ea=typeof _0x41fa34[_0x44c2a1(0x1c2)]==='string'?_0x41fa34[_0x44c2a1(0x1c2)]:undefined;if(_0x3c661e?.['apiDir'])return _0x4cc349;if(_0x4087ea&&_0x41b36a!==_0x4087ea)return resolve(_0x35ae75,_0x41b36a+'-api.ts');return _0x4cc349;}
@@ -1 +1 @@
1
- (function(_0x5c7a26,_0x23901f){const _0x2db7a7=a245_0x4ac4,_0x3d052f=_0x5c7a26();while(!![]){try{const _0x578f0a=parseInt(_0x2db7a7(0x12b))/0x1+parseInt(_0x2db7a7(0x130))/0x2+parseInt(_0x2db7a7(0x129))/0x3+parseInt(_0x2db7a7(0x133))/0x4*(-parseInt(_0x2db7a7(0x13a))/0x5)+-parseInt(_0x2db7a7(0x134))/0x6+parseInt(_0x2db7a7(0x135))/0x7*(-parseInt(_0x2db7a7(0x139))/0x8)+-parseInt(_0x2db7a7(0x128))/0x9*(parseInt(_0x2db7a7(0x132))/0xa);if(_0x578f0a===_0x23901f)break;else _0x3d052f['push'](_0x3d052f['shift']());}catch(_0x24b2a8){_0x3d052f['push'](_0x3d052f['shift']());}}}(a245_0x9893,0x9a629));function a245_0x4ac4(_0x46890f,_0xec9a46){_0x46890f=_0x46890f-0x128;const _0x98937e=a245_0x9893();let _0x4ac484=_0x98937e[_0x46890f];return _0x4ac484;}import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';const cache=new Map();function a245_0x9893(){const _0x29250c=['push','407349FCHqgf','cwd','set','api.ts','get','2100452YYuIFc','find','211310JwPBXl','492WBueuH','1200792ohNTaO','1974ylJctC','exec','alias','utf-8','13848fHpirc','23415KlGoAx','99BBOqdv','2014530zOeSRi'];a245_0x9893=function(){return _0x29250c;};return a245_0x9893();}function parseApiFile(_0x5249bc){const _0x1ceb62=a245_0x4ac4,_0x59afbc=[],_0x432787=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x34a179;while((_0x34a179=_0x432787[_0x1ceb62(0x136)](_0x5249bc))!==null){_0x59afbc[_0x1ceb62(0x12a)]({'datasetCode':_0x34a179[0x1],'tableName':_0x34a179[0x2],'name':_0x34a179[0x3],'alias':_0x34a179[0x4]});}return _0x59afbc;}export function loadAliasMap(_0x59325e,_0x5ed313,_0x5ab081){const _0x16eca9=a245_0x4ac4,_0x30c368=_0x5ab081??resolve(process[_0x16eca9(0x12c)](),_0x59325e,_0x16eca9(0x12e));if(cache['has'](_0x30c368))return cache[_0x16eca9(0x12f)](_0x30c368);if(!existsSync(_0x30c368))return cache['set'](_0x30c368,[]),[];try{const _0xf3dae6=readFileSync(_0x30c368,_0x16eca9(0x138)),_0x48521a=parseApiFile(_0xf3dae6);return cache[_0x16eca9(0x12d)](_0x30c368,_0x48521a),_0x48521a;}catch{return cache[_0x16eca9(0x12d)](_0x30c368,[]),[];}}export function resolveAlias(_0x347acc,_0x4c0adf,_0x134217,_0x3b7cc7){const _0x432638=a245_0x4ac4;if(!_0x4c0adf)return undefined;const _0x2c54a8=loadAliasMap(_0x347acc,_0x134217,_0x3b7cc7),_0x391383=_0x2c54a8[_0x432638(0x131)](_0x557fbf=>_0x557fbf[_0x432638(0x137)]===_0x4c0adf);return _0x391383?.['datasetCode'];}export function listAliases(_0x5a6bef,_0x1d00b4,_0x24bab2){return loadAliasMap(_0x5a6bef,_0x1d00b4,_0x24bab2);}
1
+ const a259_0x20d828=a259_0x133e;(function(_0x32a7cf,_0x410820){const _0x13b34b=a259_0x133e,_0xb30680=_0x32a7cf();while(!![]){try{const _0x594ebd=-parseInt(_0x13b34b(0x78))/0x1*(parseInt(_0x13b34b(0x72))/0x2)+-parseInt(_0x13b34b(0x83))/0x3*(-parseInt(_0x13b34b(0x8d))/0x4)+parseInt(_0x13b34b(0x76))/0x5+-parseInt(_0x13b34b(0x7e))/0x6*(parseInt(_0x13b34b(0x8a))/0x7)+parseInt(_0x13b34b(0x7b))/0x8+-parseInt(_0x13b34b(0x86))/0x9*(-parseInt(_0x13b34b(0x77))/0xa)+-parseInt(_0x13b34b(0x75))/0xb;if(_0x594ebd===_0x410820)break;else _0xb30680['push'](_0xb30680['shift']());}catch(_0x47b1f6){_0xb30680['push'](_0xb30680['shift']());}}}(a259_0x2daa,0x84cc1));import{existsSync,readFileSync,realpathSync,statSync}from'node:fs';import{dirname,extname,isAbsolute,relative,resolve}from'node:path';import{findProjectRootDirectory}from'../context/config-loader.js';const cache=new Map(),MAX_LOCAL_REEXPORT_DEPTH=0x8,SOURCE_FILE_EXTENSIONS=[a259_0x20d828(0x71),a259_0x20d828(0x85),a259_0x20d828(0x7d),a259_0x20d828(0x7a),a259_0x20d828(0x88),a259_0x20d828(0x73),a259_0x20d828(0x74),a259_0x20d828(0x6c)],LOCAL_REEXPORT_RE=/\bexport\s+(?:type\s+)?(?:\{[\s\S]*?\}|\*)\s+from\s*["']([^"']+)["']/g,SOURCE_EXTENSIONS_BY_RUNTIME_EXTENSION={'.js':[a259_0x20d828(0x71),a259_0x20d828(0x85)],'.jsx':['.tsx'],'.mjs':['.mts'],'.cjs':[a259_0x20d828(0x7a)]};function parseApiFile(_0x27992d){const _0x48ecdf=a259_0x20d828,_0x396de9=[],_0x280860=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x4b7f79;while((_0x4b7f79=_0x280860[_0x48ecdf(0x82)](_0x27992d))!==null){_0x396de9[_0x48ecdf(0x81)]({'datasetCode':_0x4b7f79[0x1],'tableName':_0x4b7f79[0x2],'name':_0x4b7f79[0x3],'alias':_0x4b7f79[0x4]});}return _0x396de9;}function isWithinRoot(_0x4eb188,_0x25fdf0){const _0x4036d6=a259_0x20d828,_0x131dfc=relative(_0x4eb188,_0x25fdf0);return _0x131dfc===''||!_0x131dfc[_0x4036d6(0x7c)]('..')&&!isAbsolute(_0x131dfc);}function resolveExistingFile(_0x4e3bb7){const _0x36ab39=a259_0x20d828;if(!existsSync(_0x4e3bb7))return undefined;try{return statSync(_0x4e3bb7)[_0x36ab39(0x80)]()?realpathSync(_0x4e3bb7):undefined;}catch{return undefined;}}function reexportCandidatePaths(_0x108ec0){const _0x1d4f75=a259_0x20d828,_0x49d3d7=extname(_0x108ec0);if(!_0x49d3d7)return[...SOURCE_FILE_EXTENSIONS[_0x1d4f75(0x6e)](_0x490b81=>''+_0x108ec0+_0x490b81),...SOURCE_FILE_EXTENSIONS['map'](_0x54ccd5=>resolve(_0x108ec0,'index'+_0x54ccd5))];const _0x5d009b=SOURCE_EXTENSIONS_BY_RUNTIME_EXTENSION[_0x49d3d7];if(!_0x5d009b)return[_0x108ec0];const _0x5144bf=_0x108ec0[_0x1d4f75(0x8b)](0x0,-_0x49d3d7[_0x1d4f75(0x8f)]);return[..._0x5d009b[_0x1d4f75(0x6e)](_0x550bb9=>''+_0x5144bf+_0x550bb9),_0x108ec0];}function resolveLocalReexport(_0x56c2f7,_0x52bc57,_0x3c3928){const _0x57a0ff=a259_0x20d828;if(!_0x52bc57['startsWith']('./')&&!_0x52bc57[_0x57a0ff(0x7c)](_0x57a0ff(0x87)))return undefined;const _0xc5ec6b=resolve(dirname(_0x56c2f7),_0x52bc57);if(!isWithinRoot(_0x3c3928,_0xc5ec6b))return undefined;for(const _0x4cb472 of reexportCandidatePaths(_0xc5ec6b)){const _0x21425e=resolveExistingFile(_0x4cb472);if(_0x21425e&&isWithinRoot(_0x3c3928,_0x21425e))return _0x21425e;}return undefined;}function parseApiFileTree(_0x347653,_0x309b59,_0x12ccc7,_0x107375){const _0x58e83c=a259_0x20d828,_0x4afe21=resolveExistingFile(_0x347653);if(!_0x4afe21)return[];const _0x2a4f83=_0x12ccc7[_0x58e83c(0x89)](_0x4afe21);if(_0x2a4f83!==undefined&&_0x2a4f83<=_0x107375)return[];_0x12ccc7[_0x58e83c(0x8e)](_0x4afe21,_0x107375);const _0x36b0e0=readFileSync(_0x4afe21,'utf-8'),_0x384a9b=parseApiFile(_0x36b0e0);if(_0x107375>=MAX_LOCAL_REEXPORT_DEPTH)return _0x384a9b;const _0x46c587=new RegExp(LOCAL_REEXPORT_RE[_0x58e83c(0x6a)],LOCAL_REEXPORT_RE[_0x58e83c(0x7f)]);let _0x27bde6;while((_0x27bde6=_0x46c587[_0x58e83c(0x82)](_0x36b0e0))!==null){const _0x3893e0=resolveLocalReexport(_0x4afe21,_0x27bde6[0x1],_0x309b59);_0x3893e0&&_0x384a9b[_0x58e83c(0x81)](...parseApiFileTree(_0x3893e0,_0x309b59,_0x12ccc7,_0x107375+0x1));}return _0x384a9b;}function aliasProjectRoot(_0x100718){const _0x3c4950=findProjectRootDirectory(dirname(_0x100718));try{return realpathSync(_0x3c4950);}catch{return _0x3c4950;}}function a259_0x2daa(){const _0x1d75e8=['api.ts','.tsx','568638zUnWve','../','.js','get','70odcZWz','slice','stringify','4pgvANt','set','length','has','source','add','.cjs','cwd','map','datasetCode','alias','.ts','5164cxeAAG','.jsx','.mjs','14433716LdTsSq','4414040sQeHpZ','10uPeEKP','39nnCEcr','size','.cts','4866776WzGgdz','startsWith','.mts','323832iqOiHb','flags','isFile','push','exec','2826522OUiBnn'];a259_0x2daa=function(){return _0x1d75e8;};return a259_0x2daa();}function uniqueAliasEntries(_0x1ccbb7){const _0x5d4c13=new Set();return _0x1ccbb7['filter'](_0x27e79a=>{const _0x47b63c=a259_0x133e,_0x45cff5=JSON[_0x47b63c(0x8c)](_0x27e79a);if(_0x5d4c13[_0x47b63c(0x90)](_0x45cff5))return![];return _0x5d4c13[_0x47b63c(0x6b)](_0x45cff5),!![];});}export function loadAliasMap(_0x39520e,_0x2d0043,_0x565462){const _0x5c9448=a259_0x20d828,_0x1ec09e=resolve(_0x565462??resolve(process[_0x5c9448(0x6d)](),_0x39520e,_0x5c9448(0x84)));if(cache[_0x5c9448(0x90)](_0x1ec09e))return cache[_0x5c9448(0x89)](_0x1ec09e);if(!existsSync(_0x1ec09e))return cache[_0x5c9448(0x8e)](_0x1ec09e,[]),[];try{const _0x38a259=uniqueAliasEntries(parseApiFileTree(_0x1ec09e,aliasProjectRoot(_0x1ec09e),new Map(),0x0));return cache[_0x5c9448(0x8e)](_0x1ec09e,_0x38a259),_0x38a259;}catch{return cache['set'](_0x1ec09e,[]),[];}}export function resolveAlias(_0x50bcbe,_0x1fb8b7,_0x82d6c1,_0x1146e3){const _0x3abf14=a259_0x20d828;if(!_0x1fb8b7)return undefined;const _0x269b6e=loadAliasMap(_0x50bcbe,_0x82d6c1,_0x1146e3),_0x15bc2e=new Set(_0x269b6e['filter'](_0x569706=>_0x569706[_0x3abf14(0x70)]===_0x1fb8b7)['map'](_0x3b44a6=>_0x3b44a6[_0x3abf14(0x6f)]));return _0x15bc2e[_0x3abf14(0x79)]===0x1?[..._0x15bc2e][0x0]:undefined;}function a259_0x133e(_0x1bf9d6,_0x2ff35f){_0x1bf9d6=_0x1bf9d6-0x6a;const _0x2daabe=a259_0x2daa();let _0x133ee0=_0x2daabe[_0x1bf9d6];return _0x133ee0;}export function listAliases(_0x3291ff,_0x416e9c,_0x5254e8){return loadAliasMap(_0x3291ff,_0x416e9c,_0x5254e8);}
@@ -294,6 +294,14 @@ export interface BffScriptStatistics {
294
294
  beforeScriptId: number | null;
295
295
  afterScriptId: number | null;
296
296
  }
297
+ export interface BffScriptLogQuery {
298
+ appCode: string;
299
+ startTime: number;
300
+ endTime: number;
301
+ level?: string;
302
+ keyword?: string;
303
+ limit?: number;
304
+ }
297
305
  export declare const BFF_LIST_PAGE_SIZE = 100;
298
306
  export declare function listBffScripts(appCode: string, type?: string, options?: {
299
307
  scriptName?: string;
@@ -314,6 +322,14 @@ export declare function saveBffScript(params: {
314
322
  export declare function deleteBffScript(id: number): Promise<void>;
315
323
  export declare function getBffScriptStatistics(appCode: string): Promise<BffScriptStatistics[]>;
316
324
  export declare function clearBffScriptCache(): Promise<string>;
325
+ /**
326
+ * Query runtime Backend Function logs for development diagnostics.
327
+ *
328
+ * The runtime endpoint returns already-formatted log lines. Keep the raw
329
+ * lines intact so callers can search, display, or pipe them without losing
330
+ * trace and script metadata embedded by the server.
331
+ */
332
+ export declare function searchBffScriptLogs(query: BffScriptLogQuery): Promise<string[]>;
317
333
  export declare function listBffDatasetOperations(appCode: string, datasetId: number): Promise<Record<string, unknown> | null>;
318
334
  export interface SqlQuery {
319
335
  id: number;
@@ -504,12 +520,36 @@ export declare function listRecycleBinResources(appCode: string, resourceType: R
504
520
  paging?: Paging;
505
521
  }>;
506
522
  export declare function restoreRecycleBinResource(deleteLogId: number): Promise<void>;
507
- export interface TextGeneratedDatasetPreviewInput {
523
+ export type TextGeneratedDatasetPreviewInput = {
508
524
  datasetName: string;
509
525
  requirementDescription: string;
526
+ mode?: "single";
527
+ } | {
528
+ mode: "batch";
529
+ requirementDescription: string;
530
+ };
531
+ /** Server measurements for a single generation attempt; absent values are unknown. */
532
+ export interface DatasetGenerationMetrics {
533
+ schemaVersion?: number;
534
+ attemptId?: string;
535
+ attempt?: number;
536
+ datasetCount?: number;
537
+ fieldCount?: number;
538
+ previewDurationMs?: number;
539
+ queueWaitMs?: number;
540
+ executionDurationMs?: number;
541
+ resultReadDurationMs?: number;
542
+ stageDurationsMs?: Record<string, number>;
543
+ modelCallCount?: number;
544
+ retryCount?: number;
545
+ failedStage?: string;
546
+ previousAttempts?: DatasetGenerationMetrics[];
510
547
  }
511
548
  export declare function previewTextGeneratedDataset(appCode: string, input: TextGeneratedDatasetPreviewInput): Promise<any>;
512
549
  export interface TextGeneratedDatasetJobStartResult {
550
+ mode?: "single" | "batch";
551
+ metrics?: DatasetGenerationMetrics | null;
552
+ failedStage?: string | null;
513
553
  taskId?: string;
514
554
  operationId?: string;
515
555
  clientOperationId?: string;
@@ -522,6 +562,9 @@ export interface TextGeneratedDatasetJobStartResult {
522
562
  [key: string]: any;
523
563
  }
524
564
  export interface TextGeneratedDatasetJobStatus {
565
+ mode?: "single" | "batch";
566
+ metrics?: DatasetGenerationMetrics | null;
567
+ failedStage?: string | null;
525
568
  taskId?: string;
526
569
  operationId?: string;
527
570
  clientOperationId?: string;
@@ -535,6 +578,7 @@ export interface TextGeneratedDatasetJobStatus {
535
578
  }
536
579
  export declare function startTextGeneratedDataset(appCode: string, design: Record<string, any>, options?: {
537
580
  clientOperationId?: string;
581
+ mode?: "batch";
538
582
  }): Promise<TextGeneratedDatasetJobStartResult>;
539
583
  export declare function getTextGeneratedDatasetStatus(appCode: string, options: {
540
584
  taskId?: string;
@@ -977,16 +1021,141 @@ export interface DbAnalysisStatus {
977
1021
  endTime?: number | string | null;
978
1022
  [key: string]: unknown;
979
1023
  }
1024
+ /** Runtime role exposed by lovrabet-runtime for approval assignee selection. */
1025
+ export interface ApprovalRuntimeRole {
1026
+ id: number;
1027
+ appCode?: string | null;
1028
+ roleName?: string | null;
1029
+ roleType?: string | null;
1030
+ remark?: string | null;
1031
+ userCount?: number | null;
1032
+ permitCount?: number | null;
1033
+ [key: string]: unknown;
1034
+ }
1035
+ /** Runtime app user exposed by /api/dept/queryAppUser. */
1036
+ export interface ApprovalRuntimeUser {
1037
+ code?: string | number | null;
1038
+ userName?: string | null;
1039
+ nickName?: string | null;
1040
+ displayName?: string | null;
1041
+ email?: string | null;
1042
+ status?: string | null;
1043
+ [key: string]: unknown;
1044
+ }
1045
+ /** Safe runtime role member fields used to inspect approval role membership. */
1046
+ export interface ApprovalRuntimeRoleMember {
1047
+ userId: string | number;
1048
+ username?: string | null;
1049
+ nickname?: string | null;
1050
+ [key: string]: unknown;
1051
+ }
1052
+ /** Runtime role and its current members. */
1053
+ export interface ApprovalRuntimeRoleUsers {
1054
+ id: number;
1055
+ roleName?: string | null;
1056
+ roleType?: string | null;
1057
+ userList?: ApprovalRuntimeRoleMember[] | null;
1058
+ [key: string]: unknown;
1059
+ }
1060
+ export interface ApprovalRuntimeRoleListOptions {
1061
+ roleId?: number;
1062
+ roleName?: string;
1063
+ currentPage?: number;
1064
+ pageSize?: number;
1065
+ }
1066
+ /** POST Runtime /api/permit/role/get-list: list roles from the runtime environment. */
1067
+ export declare function listApprovalRuntimeRoles(appCode: string, options?: ApprovalRuntimeRoleListOptions): Promise<{
1068
+ items: ApprovalRuntimeRole[];
1069
+ paging?: Paging;
1070
+ }>;
1071
+ /** GET Runtime /api/dept/queryAppUser: list users attached to the runtime app. */
1072
+ export declare function listApprovalRuntimeUsers(appCode: string): Promise<ApprovalRuntimeUser[]>;
1073
+ /** POST Runtime /api/permit/user-role/get-user-list: inspect runtime role members. */
1074
+ export declare function listApprovalRuntimeRoleUsers(appCode: string): Promise<ApprovalRuntimeRoleUsers[]>;
1075
+ /** Flow definition returned by SmartFlowController. */
1076
+ export interface FlowDefinition {
1077
+ id: number;
1078
+ flowCode?: string | null;
1079
+ appCode?: string | null;
1080
+ datasetCode?: string | null;
1081
+ pageId?: number | null;
1082
+ flowName?: string | null;
1083
+ flowDesc?: string | null;
1084
+ flowType?: string | null;
1085
+ sourceType?: string | null;
1086
+ version?: number | null;
1087
+ flowSchema?: string | null;
1088
+ draftSchema?: string | null;
1089
+ flowStatus?: string | null;
1090
+ templateName?: string | null;
1091
+ deployId?: string | null;
1092
+ procDefId?: string | null;
1093
+ procDefVersion?: number | null;
1094
+ flowConfig?: string | null;
1095
+ flowJson?: Record<string, unknown> | null;
1096
+ enabled?: boolean | null;
1097
+ createUserId?: string | null;
1098
+ updateUserId?: string | null;
1099
+ gmtCreate?: string | null;
1100
+ gmtModified?: string | null;
1101
+ [key: string]: unknown;
1102
+ }
1103
+ /** Exact writable fields exposed by FlowDefRequest. */
1104
+ export interface FlowDefinitionWriteRequest {
1105
+ id?: number;
1106
+ flowName: string;
1107
+ flowDesc?: string;
1108
+ flowType: "FORM_FLOW" | "INDEPENDENT_FLOW";
1109
+ appCode: string;
1110
+ datasetCode?: string;
1111
+ pageId?: number;
1112
+ flowJson: Record<string, unknown>;
1113
+ }
1114
+ /** Supported filters exposed by FlowDefQueryRequest. */
1115
+ export interface FlowDefinitionListOptions {
1116
+ flowCode?: string;
1117
+ flowName?: string;
1118
+ flowStatus?: string;
1119
+ datasetCode?: string;
1120
+ flowType?: string;
1121
+ pageNum?: number;
1122
+ pageSize?: number;
1123
+ }
1124
+ /** POST /smartapi/flow/page: list flow definitions for one app. */
1125
+ export declare function listFlowDefinitions(appCode: string, options?: FlowDefinitionListOptions): Promise<{
1126
+ items: FlowDefinition[];
1127
+ paging?: Paging;
1128
+ }>;
1129
+ /** POST /smartapi/flow/detail: read one flow definition by id and app. */
1130
+ export declare function getFlowDefinition(appCode: string, id: number): Promise<FlowDefinition>;
1131
+ /** POST /smartapi/flow/create: create a draft flow definition. */
1132
+ export declare function createFlowDefinition(input: FlowDefinitionWriteRequest): Promise<FlowDefinition>;
1133
+ /** POST /smartapi/flow/update: replace a flow definition draft. */
1134
+ export declare function updateFlowDefinition(input: FlowDefinitionWriteRequest & {
1135
+ id: number;
1136
+ }): Promise<FlowDefinition>;
1137
+ /** POST /smartapi/flow/publish: publish the current draft. */
1138
+ export declare function publishFlowDefinition(appCode: string, id: number): Promise<FlowDefinition>;
980
1139
  export type InstantApiPolicyAction = "allow" | "deny" | "route";
981
1140
  export interface InstantApiPolicyDatasetTarget {
982
1141
  datasetCode?: string | null;
983
1142
  tableName?: string | null;
984
1143
  }
1144
+ /**
1145
+ * 版本 2 规则中需要从匹配范围扣除的数据集与 API 组合。
1146
+ *
1147
+ * @author binggan
1148
+ */
1149
+ export interface InstantApiPolicyExclusion {
1150
+ datasets: InstantApiPolicyDatasetTarget[];
1151
+ apis: string[];
1152
+ }
985
1153
  export interface InstantApiPolicyRule {
986
1154
  name: string;
987
1155
  description?: string | null;
988
1156
  datasets: InstantApiPolicyDatasetTarget[];
989
1157
  apis: string[];
1158
+ excludes?: InstantApiPolicyExclusion[] | null;
990
1159
  action: InstantApiPolicyAction | string;
991
1160
  backendFunction?: string | null;
992
1161
  }