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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (419) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/api-group.d.ts +22 -0
  3. package/lib/api/api-group.js +1 -0
  4. package/lib/api/fetch-model-list.js +1 -1
  5. package/lib/api/generate-api-file.d.ts +18 -2
  6. package/lib/api/generate-api-file.js +1 -1
  7. package/lib/api/generate-sdk-config-file.js +1 -1
  8. package/lib/api/legacy-api-file.d.ts +11 -0
  9. package/lib/api/legacy-api-file.js +1 -0
  10. package/lib/api/model-registry-file.d.ts +36 -0
  11. package/lib/api/model-registry-file.js +1 -0
  12. package/lib/api/model-registry-scaffold.d.ts +7 -0
  13. package/lib/api/model-registry-scaffold.js +1 -0
  14. package/lib/api/model-source.d.ts +6 -0
  15. package/lib/api/model-source.js +1 -0
  16. package/lib/auth/auth-server-ui.js +1 -1
  17. package/lib/auth/auth-server.js +1 -1
  18. package/lib/auth/constant.js +1 -1
  19. package/lib/auth/get-cookie.js +1 -1
  20. package/lib/auth/get-session-user.js +1 -1
  21. package/lib/auth/is-session-valid.js +1 -1
  22. package/lib/auth/login-success-html.js +1 -1
  23. package/lib/auth/logout.js +1 -1
  24. package/lib/cli-flags.js +1 -1
  25. package/lib/cli.js +1 -1
  26. package/lib/commands/api/generate.js +1 -1
  27. package/lib/commands/api/index.js +1 -1
  28. package/lib/commands/api/list.js +1 -1
  29. package/lib/commands/api/pull.js +1 -1
  30. package/lib/commands/api/shared.js +1 -1
  31. package/lib/commands/app/index.js +1 -1
  32. package/lib/commands/app/list.js +1 -1
  33. package/lib/commands/app/members-list.js +1 -1
  34. package/lib/commands/app/remote-directory.js +1 -1
  35. package/lib/commands/app/shared.js +1 -1
  36. package/lib/commands/app-config/delete.js +1 -1
  37. package/lib/commands/app-config/get.js +1 -1
  38. package/lib/commands/app-config/index.js +1 -1
  39. package/lib/commands/app-config/list.js +1 -1
  40. package/lib/commands/app-config/set.js +1 -1
  41. package/lib/commands/app-config/shared.js +1 -1
  42. package/lib/commands/auth/index.js +1 -1
  43. package/lib/commands/bff/create.js +1 -1
  44. package/lib/commands/bff/delete.js +1 -1
  45. package/lib/commands/bff/detail.js +1 -1
  46. package/lib/commands/bff/index.js +1 -1
  47. package/lib/commands/bff/list.js +1 -1
  48. package/lib/commands/bff/logs.d.ts +7 -0
  49. package/lib/commands/bff/logs.js +1 -0
  50. package/lib/commands/bff/pull.js +1 -1
  51. package/lib/commands/bff/push.js +1 -1
  52. package/lib/commands/bff/status.js +1 -1
  53. package/lib/commands/cli-skill/index.js +1 -1
  54. package/lib/commands/cli-update.js +1 -1
  55. package/lib/commands/codegen/index.js +1 -1
  56. package/lib/commands/codegen/sdk.js +1 -1
  57. package/lib/commands/codegen/sql.js +1 -1
  58. package/lib/commands/common/app-registry.js +1 -1
  59. package/lib/commands/common/app-selector.js +1 -1
  60. package/lib/commands/common/async-task.js +1 -1
  61. package/lib/commands/common/dry-run.js +1 -1
  62. package/lib/commands/common/flags.d.ts +7 -0
  63. package/lib/commands/common/flags.js +1 -1
  64. package/lib/commands/common/local-file.js +1 -1
  65. package/lib/commands/common/validate.js +1 -1
  66. package/lib/commands/config/delete.js +1 -1
  67. package/lib/commands/config/get.js +1 -1
  68. package/lib/commands/config/index.js +1 -1
  69. package/lib/commands/config/init.js +1 -1
  70. package/lib/commands/config/list.js +1 -1
  71. package/lib/commands/config/set.js +1 -1
  72. package/lib/commands/config/shared.js +1 -1
  73. package/lib/commands/dataset/batch-design.d.ts +21 -0
  74. package/lib/commands/dataset/batch-design.js +1 -0
  75. package/lib/commands/dataset/business-group-update.js +1 -1
  76. package/lib/commands/dataset/business-groups.js +1 -1
  77. package/lib/commands/dataset/capability.js +1 -1
  78. package/lib/commands/dataset/cross-relation-create.d.ts +2 -0
  79. package/lib/commands/dataset/cross-relation-create.js +1 -0
  80. package/lib/commands/dataset/cross-relation-delete.d.ts +2 -0
  81. package/lib/commands/dataset/cross-relation-delete.js +1 -0
  82. package/lib/commands/dataset/cross-relation-list.d.ts +2 -0
  83. package/lib/commands/dataset/cross-relation-list.js +1 -0
  84. package/lib/commands/dataset/cross-relation-shared.d.ts +190 -0
  85. package/lib/commands/dataset/cross-relation-shared.js +1 -0
  86. package/lib/commands/dataset/cross-relation-update.d.ts +2 -0
  87. package/lib/commands/dataset/cross-relation-update.js +1 -0
  88. package/lib/commands/dataset/delete.js +1 -1
  89. package/lib/commands/dataset/detail.js +1 -1
  90. package/lib/commands/dataset/extend-update.js +1 -1
  91. package/lib/commands/dataset/field-restore.js +1 -1
  92. package/lib/commands/dataset/field-update.js +1 -1
  93. package/lib/commands/dataset/generate.js +1 -1
  94. package/lib/commands/dataset/index.js +1 -1
  95. package/lib/commands/dataset/list.js +1 -1
  96. package/lib/commands/dataset/operations.js +1 -1
  97. package/lib/commands/dataset/relation-audit.js +1 -1
  98. package/lib/commands/dataset/relation-create.js +1 -1
  99. package/lib/commands/dataset/relation-delete.js +1 -1
  100. package/lib/commands/dataset/relation-shared.js +1 -1
  101. package/lib/commands/dataset/relation-update.js +1 -1
  102. package/lib/commands/dataset/relations.js +1 -1
  103. package/lib/commands/dataset/rename.js +1 -1
  104. package/lib/commands/dataset/restore.js +1 -1
  105. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  106. package/lib/commands/db/analysis-batching.js +1 -1
  107. package/lib/commands/db/analyze-batch-plan.js +1 -1
  108. package/lib/commands/db/analyze-cancel.js +1 -1
  109. package/lib/commands/db/analyze-start.js +1 -1
  110. package/lib/commands/db/analyze-status.js +1 -1
  111. package/lib/commands/db/create.js +1 -1
  112. package/lib/commands/db/delete.js +1 -1
  113. package/lib/commands/db/detail.js +1 -1
  114. package/lib/commands/db/diff-refresh-start.js +1 -1
  115. package/lib/commands/db/diff-refresh-status.js +1 -1
  116. package/lib/commands/db/diff.js +1 -1
  117. package/lib/commands/db/index.js +1 -1
  118. package/lib/commands/db/list.js +1 -1
  119. package/lib/commands/db/shared.js +1 -1
  120. package/lib/commands/db/table-diff-shared.js +1 -1
  121. package/lib/commands/db/tables.js +1 -1
  122. package/lib/commands/db/test.js +1 -1
  123. package/lib/commands/db/update.js +1 -1
  124. package/lib/commands/deployment/index.js +1 -1
  125. package/lib/commands/deployment/sync-all.js +1 -1
  126. package/lib/commands/deployment/sync-jobs.js +1 -1
  127. package/lib/commands/deployment/sync-status.js +1 -1
  128. package/lib/commands/doctor.js +1 -1
  129. package/lib/commands/file/index.js +1 -1
  130. package/lib/commands/flow/create.d.ts +2 -0
  131. package/lib/commands/flow/create.js +1 -0
  132. package/lib/commands/flow/detail.d.ts +2 -0
  133. package/lib/commands/flow/detail.js +1 -0
  134. package/lib/commands/flow/index.d.ts +3 -0
  135. package/lib/commands/flow/index.js +1 -0
  136. package/lib/commands/flow/list.d.ts +2 -0
  137. package/lib/commands/flow/list.js +1 -0
  138. package/lib/commands/flow/publish.d.ts +2 -0
  139. package/lib/commands/flow/publish.js +1 -0
  140. package/lib/commands/flow/runtime-resources-shared.d.ts +40 -0
  141. package/lib/commands/flow/runtime-resources-shared.js +1 -0
  142. package/lib/commands/flow/runtime-role-list.d.ts +2 -0
  143. package/lib/commands/flow/runtime-role-list.js +1 -0
  144. package/lib/commands/flow/runtime-role-user-list.d.ts +2 -0
  145. package/lib/commands/flow/runtime-role-user-list.js +1 -0
  146. package/lib/commands/flow/runtime-user-search.d.ts +2 -0
  147. package/lib/commands/flow/runtime-user-search.js +1 -0
  148. package/lib/commands/flow/shared.d.ts +41 -0
  149. package/lib/commands/flow/shared.js +1 -0
  150. package/lib/commands/flow/update.d.ts +2 -0
  151. package/lib/commands/flow/update.js +1 -0
  152. package/lib/commands/flow/validate.d.ts +3 -0
  153. package/lib/commands/flow/validate.js +1 -0
  154. package/lib/commands/instant-api-policy/current.js +1 -1
  155. package/lib/commands/instant-api-policy/index.js +1 -1
  156. package/lib/commands/instant-api-policy/init.js +1 -1
  157. package/lib/commands/instant-api-policy/publish.js +1 -1
  158. package/lib/commands/instant-api-policy/pull.js +1 -1
  159. package/lib/commands/instant-api-policy/revision.js +1 -1
  160. package/lib/commands/instant-api-policy/revisions.js +1 -1
  161. package/lib/commands/instant-api-policy/rollback.js +1 -1
  162. package/lib/commands/instant-api-policy/shared.js +1 -1
  163. package/lib/commands/instant-api-policy/validate.js +1 -1
  164. package/lib/commands/issue/index.js +1 -1
  165. package/lib/commands/issue/nudge.js +1 -1
  166. package/lib/commands/issue/report.js +1 -1
  167. package/lib/commands/issue/shared.js +1 -1
  168. package/lib/commands/kb/create.js +1 -1
  169. package/lib/commands/kb/delete.js +1 -1
  170. package/lib/commands/kb/detail.js +1 -1
  171. package/lib/commands/kb/index.js +1 -1
  172. package/lib/commands/kb/list.js +1 -1
  173. package/lib/commands/kb/search.js +1 -1
  174. package/lib/commands/kb/shared.js +1 -1
  175. package/lib/commands/kb/update.js +1 -1
  176. package/lib/commands/logs/index.js +1 -1
  177. package/lib/commands/menu/asset-update.js +1 -1
  178. package/lib/commands/menu/delete.js +1 -1
  179. package/lib/commands/menu/external-link-create.js +1 -1
  180. package/lib/commands/menu/external-link-update.js +1 -1
  181. package/lib/commands/menu/group-create.js +1 -1
  182. package/lib/commands/menu/group-update.js +1 -1
  183. package/lib/commands/menu/index.js +1 -1
  184. package/lib/commands/menu/list.js +1 -1
  185. package/lib/commands/menu/move.js +1 -1
  186. package/lib/commands/menu/regroup-start.js +1 -1
  187. package/lib/commands/menu/rename.js +1 -1
  188. package/lib/commands/menu/shared/compare-table.js +1 -1
  189. package/lib/commands/menu/shared/delete-plan.js +1 -1
  190. package/lib/commands/menu/shared/facts.js +1 -1
  191. package/lib/commands/menu/shared/index.js +1 -1
  192. package/lib/commands/menu/shared/inquirer.js +1 -1
  193. package/lib/commands/menu/shared/local-pages.js +1 -1
  194. package/lib/commands/menu/shared/logic.js +1 -1
  195. package/lib/commands/menu/shared/mutations.js +1 -1
  196. package/lib/commands/menu/shared/service.js +1 -1
  197. package/lib/commands/menu/shared/sync-core.js +1 -1
  198. package/lib/commands/menu/shared/update-core.js +1 -1
  199. package/lib/commands/menu/shared/valid-url.js +1 -1
  200. package/lib/commands/menu/sync.js +1 -1
  201. package/lib/commands/menu/visibility-update.js +1 -1
  202. package/lib/commands/notification/config-create.js +1 -1
  203. package/lib/commands/notification/config-delete.js +1 -1
  204. package/lib/commands/notification/config-list.js +1 -1
  205. package/lib/commands/notification/config-update.js +1 -1
  206. package/lib/commands/notification/index.js +1 -1
  207. package/lib/commands/notification/shared.js +1 -1
  208. package/lib/commands/ocr/index.js +1 -1
  209. package/lib/commands/page/create.js +1 -1
  210. package/lib/commands/page/custom/detail.js +1 -1
  211. package/lib/commands/page/custom/list.js +1 -1
  212. package/lib/commands/page/custom/publish.js +1 -1
  213. package/lib/commands/page/custom/shared.js +1 -1
  214. package/lib/commands/page/custom/syntax.js +1 -1
  215. package/lib/commands/page/custom/update.js +1 -1
  216. package/lib/commands/page/data-list-status.js +1 -1
  217. package/lib/commands/page/generate-start.js +1 -1
  218. package/lib/commands/page/generate-status.js +1 -1
  219. package/lib/commands/page/index.js +1 -1
  220. package/lib/commands/page/pull.js +1 -1
  221. package/lib/commands/page/push.js +1 -1
  222. package/lib/commands/page/relation-audit.js +1 -1
  223. package/lib/commands/page/restore.js +1 -1
  224. package/lib/commands/page/shared.js +1 -1
  225. package/lib/commands/page/sync.js +1 -1
  226. package/lib/commands/project/api-architecture-upgrade.d.ts +28 -0
  227. package/lib/commands/project/api-architecture-upgrade.js +1 -0
  228. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  229. package/lib/commands/project/create/format-elapsed.js +1 -1
  230. package/lib/commands/project/create/main.js +1 -1
  231. package/lib/commands/project/create/materialize-project-template.js +1 -1
  232. package/lib/commands/project/create/project-name.js +1 -1
  233. package/lib/commands/project/create/project-template-archive.js +1 -1
  234. package/lib/commands/project/create/project-template-path.js +1 -1
  235. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  236. package/lib/commands/project/create/use-format-code.js +1 -1
  237. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  238. package/lib/commands/project/domain-routing-sync.js +1 -1
  239. package/lib/commands/project/index.js +1 -1
  240. package/lib/commands/project/upgrade.d.ts +30 -1
  241. package/lib/commands/project/upgrade.js +1 -1
  242. package/lib/commands/registry.js +1 -1
  243. package/lib/commands/role/delete.js +1 -1
  244. package/lib/commands/role/detail.js +1 -1
  245. package/lib/commands/role/index.js +1 -1
  246. package/lib/commands/role/list.js +1 -1
  247. package/lib/commands/role/shared.js +1 -1
  248. package/lib/commands/role/update.js +1 -1
  249. package/lib/commands/role/user-add.js +1 -1
  250. package/lib/commands/role/user-remove.js +1 -1
  251. package/lib/commands/role/user-resolve.js +1 -1
  252. package/lib/commands/rule/get.js +1 -1
  253. package/lib/commands/rule/index.js +1 -1
  254. package/lib/commands/rule/list.js +1 -1
  255. package/lib/commands/rule/set.js +1 -1
  256. package/lib/commands/rule/shared.js +1 -1
  257. package/lib/commands/run/index.js +1 -1
  258. package/lib/commands/schema.js +1 -1
  259. package/lib/commands/sql/create.js +1 -1
  260. package/lib/commands/sql/delete.js +1 -1
  261. package/lib/commands/sql/detail.js +1 -1
  262. package/lib/commands/sql/exec.js +1 -1
  263. package/lib/commands/sql/index.js +1 -1
  264. package/lib/commands/sql/list.js +1 -1
  265. package/lib/commands/sql/pull.js +1 -1
  266. package/lib/commands/sql/push.js +1 -1
  267. package/lib/commands/sql/shared.js +1 -1
  268. package/lib/commands/sql/status.js +1 -1
  269. package/lib/commands/sql/validate.js +1 -1
  270. package/lib/commands/task/index.js +1 -1
  271. package/lib/commands/task/status.js +1 -1
  272. package/lib/commands/tenant/index.js +1 -1
  273. package/lib/commands/tenant/members-list.js +1 -1
  274. package/lib/commands/tenant/shared.js +1 -1
  275. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  276. package/lib/commands/user-account/index.js +1 -1
  277. package/lib/commands/workspace/add.js +1 -1
  278. package/lib/commands/workspace/index.js +1 -1
  279. package/lib/commands/workspace/remove.js +1 -1
  280. package/lib/config/domain-config.js +1 -1
  281. package/lib/config/project-domain-routing.js +1 -1
  282. package/lib/config/region-config.js +1 -1
  283. package/lib/config/schema.js +1 -1
  284. package/lib/constant/cdn.js +1 -1
  285. package/lib/constant/cli.js +1 -1
  286. package/lib/constant/defaults.js +1 -1
  287. package/lib/constant/domain.js +1 -1
  288. package/lib/constant/env.js +1 -1
  289. package/lib/constant/output.js +1 -1
  290. package/lib/constant/paths.js +1 -1
  291. package/lib/constant/region.js +1 -1
  292. package/lib/constant/risk.js +1 -1
  293. package/lib/constant/routing-profile.js +1 -1
  294. package/lib/context/app-resolver.d.ts +2 -0
  295. package/lib/context/app-resolver.js +1 -1
  296. package/lib/context/auth-resolver.js +1 -1
  297. package/lib/context/config-loader.js +1 -1
  298. package/lib/context.d.ts +2 -1
  299. package/lib/context.js +1 -1
  300. package/lib/core/alias-resolver.d.ts +13 -17
  301. package/lib/core/alias-resolver.js +1 -1
  302. package/lib/core/api-client.d.ts +176 -1
  303. package/lib/core/api-client.js +1 -1
  304. package/lib/core/bff/config.js +1 -1
  305. package/lib/core/bff/file-system.js +1 -1
  306. package/lib/core/bff/hash.js +1 -1
  307. package/lib/core/bff/hook-directory.d.ts +55 -0
  308. package/lib/core/bff/hook-directory.js +1 -0
  309. package/lib/core/bff/lock.js +1 -1
  310. package/lib/core/bff/types.d.ts +15 -0
  311. package/lib/core/bff/utils.js +1 -1
  312. package/lib/core/cross-db-relation.d.ts +41 -0
  313. package/lib/core/cross-db-relation.js +1 -0
  314. package/lib/core/db-resolver.js +1 -1
  315. package/lib/core/flow-config.d.ts +628 -0
  316. package/lib/core/flow-config.js +1 -0
  317. package/lib/core/instant-api-policy/config.js +1 -1
  318. package/lib/core/kb-search-client.js +1 -1
  319. package/lib/core/page/file-system.js +1 -1
  320. package/lib/core/page/hash.js +1 -1
  321. package/lib/core/page/lock.js +1 -1
  322. package/lib/core/page/lr-smart-jsx.js +1 -1
  323. package/lib/core/sql-index-auditor.js +1 -1
  324. package/lib/core/sql-sync/config.js +1 -1
  325. package/lib/core/sql-sync/file-system.js +1 -1
  326. package/lib/core/sql-sync/hash.js +1 -1
  327. package/lib/core/sql-sync/lock.js +1 -1
  328. package/lib/core/sql-sync/utils.js +1 -1
  329. package/lib/core/sql-validator.js +1 -1
  330. package/lib/errors.js +1 -1
  331. package/lib/framework/build-all-flags.js +1 -1
  332. package/lib/framework/error-output.js +1 -1
  333. package/lib/framework/explicit-yes.js +1 -1
  334. package/lib/framework/flags.js +1 -1
  335. package/lib/framework/help.js +1 -1
  336. package/lib/framework/index.js +1 -1
  337. package/lib/framework/output.js +1 -1
  338. package/lib/framework/response.js +1 -1
  339. package/lib/framework/runner-alias.d.ts +1 -1
  340. package/lib/framework/runner-alias.js +1 -1
  341. package/lib/framework/runner.js +1 -1
  342. package/lib/framework/schema-export.js +1 -1
  343. package/lib/framework/supported-flags.js +1 -1
  344. package/lib/framework/types.js +1 -1
  345. package/lib/generated/build-info.d.ts +4 -4
  346. package/lib/generated/build-info.js +1 -1
  347. package/lib/generated/official-routing.js +1 -1
  348. package/lib/generated/routing-contract.js +1 -1
  349. package/lib/help.js +1 -1
  350. package/lib/postinstall.js +1 -1
  351. package/lib/runtime/confirmation.js +1 -1
  352. package/lib/runtime/event.js +1 -1
  353. package/lib/runtime/index.js +1 -1
  354. package/lib/runtime/queue.js +1 -1
  355. package/lib/runtime/resolve.js +1 -1
  356. package/lib/skills/builtin-skill.js +1 -1
  357. package/lib/skills/main.js +1 -1
  358. package/lib/skills/npx-skills-add.d.ts +0 -10
  359. package/lib/skills/npx-skills-add.js +1 -1
  360. package/lib/skills/skill-presence.js +1 -1
  361. package/lib/telemetry/cli-command-trace.js +1 -1
  362. package/lib/telemetry/cli-help-trace.js +1 -1
  363. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  364. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  365. package/lib/telemetry/send-cli-trace-log.js +1 -1
  366. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  367. package/lib/types/index.d.ts +11 -1
  368. package/lib/utils/ai_config.js +1 -1
  369. package/lib/utils/apply-jq-filter.js +1 -1
  370. package/lib/utils/cdn-config.js +1 -1
  371. package/lib/utils/check-sdk-version.js +1 -1
  372. package/lib/utils/cli-version-check.js +1 -1
  373. package/lib/utils/cli-version-policy.d.ts +12 -0
  374. package/lib/utils/cli-version-policy.js +1 -1
  375. package/lib/utils/config.js +1 -1
  376. package/lib/utils/entity-with-id.js +1 -1
  377. package/lib/utils/file-utils.js +1 -1
  378. package/lib/utils/guides-cdn.js +1 -1
  379. package/lib/utils/http-client.js +1 -1
  380. package/lib/utils/is-non-interactive.js +1 -1
  381. package/lib/utils/logger.js +1 -1
  382. package/lib/utils/params.js +1 -1
  383. package/lib/utils/platform.js +1 -1
  384. package/lib/utils/sleep.js +1 -1
  385. package/lib/utils/template-replacer.js +1 -1
  386. package/lib/utils/update-notice.js +1 -1
  387. package/lib/utils/version.js +1 -1
  388. package/lib/utils/with-active-cookie.js +1 -1
  389. package/lib/utils/write-cli-side-channel.js +1 -1
  390. package/package.json +4 -1
  391. package/skills/rabetbase/SKILL.md +31 -9
  392. package/skills/rabetbase/guides/approval-flow-development-workflow.md +137 -0
  393. package/skills/rabetbase/guides/backend-function.md +19 -9
  394. package/skills/rabetbase/guides/bff-creation-workflow.md +10 -1
  395. package/skills/rabetbase/guides/conflict-detection.md +2 -0
  396. package/skills/rabetbase/guides/sdk-client-generation.md +112 -60
  397. package/skills/rabetbase/guides/typescript-sdk.md +9 -0
  398. package/skills/rabetbase/knowledge/approval-flow/config-json-schema.md +290 -0
  399. package/skills/rabetbase/references/rabetbase-api-pull.md +30 -19
  400. package/skills/rabetbase/references/rabetbase-app-list.md +1 -1
  401. package/skills/rabetbase/references/rabetbase-bff-create.md +1 -1
  402. package/skills/rabetbase/references/rabetbase-bff-logs.md +47 -0
  403. package/skills/rabetbase/references/rabetbase-bff-pull.md +7 -3
  404. package/skills/rabetbase/references/rabetbase-bff-push.md +10 -2
  405. package/skills/rabetbase/references/rabetbase-config.md +2 -1
  406. package/skills/rabetbase/references/rabetbase-dataset-cross-relations.md +60 -0
  407. package/skills/rabetbase/references/rabetbase-dataset-generate.md +52 -2
  408. package/skills/rabetbase/references/rabetbase-flow-commands.md +86 -0
  409. package/skills/rabetbase/references/rabetbase-flow-resources.md +83 -0
  410. package/skills/rabetbase/references/rabetbase-flow-runtime-boundary.md +25 -0
  411. package/skills/rabetbase/references/rabetbase-instant-api-policy.md +103 -11
  412. package/skills/rabetbase/references/rabetbase-notification-config-list.md +17 -0
  413. package/skills/rabetbase/references/rabetbase-project-create.md +3 -3
  414. package/skills/rabetbase/references/rabetbase-project-upgrade.md +24 -13
  415. package/skills/rabetbase.manifest.json +10 -3
  416. package/templates/README.md +16 -4
  417. package/templates/generate-api/model-runtime.ts.tpl +101 -0
  418. package/templates/generate-api/profile-api.ts.tpl +21 -0
  419. package/templates/generate-api/profile-client.ts.tpl +14 -0
@@ -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(_0xfe782f,_0x46ff9a){const _0x38fae9=a266_0x4f43,_0x51eb03=_0xfe782f();while(!![]){try{const _0x4a0fb6=parseInt(_0x38fae9(0x171))/0x1+parseInt(_0x38fae9(0x17f))/0x2+-parseInt(_0x38fae9(0x16f))/0x3*(parseInt(_0x38fae9(0x187))/0x4)+parseInt(_0x38fae9(0x17d))/0x5*(parseInt(_0x38fae9(0x167))/0x6)+parseInt(_0x38fae9(0x175))/0x7+-parseInt(_0x38fae9(0x185))/0x8+parseInt(_0x38fae9(0x18c))/0x9*(parseInt(_0x38fae9(0x182))/0xa);if(_0x4a0fb6===_0x46ff9a)break;else _0x51eb03['push'](_0x51eb03['shift']());}catch(_0x28dc14){_0x51eb03['push'](_0x51eb03['shift']());}}}(a266_0xe5c4,0x88f2d));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(_0x2a23b5){const _0x232260=a266_0x4f43;return typeof _0x2a23b5==='string'&&_0x2a23b5[_0x232260(0x165)]()?_0x2a23b5[_0x232260(0x165)]():undefined;}function a266_0xe5c4(){const _0x8fc6d8=['length','129323mRPhDw','projectConfig','FORMAT','defaultApp','4924122NxRPPR','read','accessKey','format','string','object','high-risk-write','env','41920pNPlRU','ENV','1759540NuPYrP','appcode','locale','10TdzHGM','keys','value','6018680XymzOf','write','118504VPaEMW','app','VERBOSE','source','ACCESS_KEY','718461XioKwh','projectPath','trim','RISK_LEVEL','378okPiUR','globalConfig','apiDir','region','entries','APP','apps','riskLevel','102riATqX'];a266_0xe5c4=function(){return _0x8fc6d8;};return a266_0xe5c4();}function appProfiles(_0x691545){const _0x46ed3a=a266_0x4f43;return _0x691545[_0x46ed3a(0x16d)]&&typeof _0x691545[_0x46ed3a(0x16d)]==='object'?_0x691545['apps']:{};}function resolveDefaultAppName(_0x2072cf){const _0x23a42c=a266_0x4f43,_0x5c334a=stringConfigValue(_0x2072cf[_0x23a42c(0x174)]);if(_0x5c334a)return _0x5c334a;const _0x5d2ba0=Object[_0x23a42c(0x183)](appProfiles(_0x2072cf));return _0x5d2ba0['length']===0x1?_0x5d2ba0[0x0]:undefined;}function resolveTopLevelAppCode(_0x428ec5){const _0x1edf12=a266_0x4f43;return stringConfigValue(_0x428ec5[_0x1edf12(0x180)])||stringConfigValue(_0x428ec5[_0x1edf12(0x188)]);}function normalizeRiskCeiling(_0x3d4a0b){const _0x5ae7a2=a266_0x4f43;if(_0x3d4a0b===undefined||_0x3d4a0b===null)return undefined;if(_0x3d4a0b==='read'||_0x3d4a0b===_0x5ae7a2(0x186)||_0x3d4a0b===_0x5ae7a2(0x17b))return _0x3d4a0b;return _0x5ae7a2(0x176);}function a266_0x4f43(_0x472385,_0x519e22){_0x472385=_0x472385-0x165;const _0xe5c4ce=a266_0xe5c4();let _0x4f4363=_0xe5c4ce[_0x472385];return _0x4f4363;}function resolveRiskCeiling(..._0x215774){const _0x5df8d0=a266_0x4f43;let _0x122677;for(const _0x112d57 of _0x215774){const _0x45cdbf=normalizeRiskCeiling(_0x112d57);_0x45cdbf&&(!_0x122677||riskLevelOrder(_0x45cdbf)<riskLevelOrder(_0x122677))&&(_0x122677=_0x45cdbf);}return _0x122677??DEFAULT_CONFIG_VALUES[_0x5df8d0(0x16e)];}export function resolveAppConfig({raw:_0x32c868,flags:_0x2ee63b,layers:_0x1ad1b5,readEnv:_0x8c1cfa}){const _0x1e62cd=a266_0x4f43,_0x1e8b68=_0x1ad1b5?.[_0x1e62cd(0x172)]??{},_0x18d8a9=_0x1ad1b5?.[_0x1e62cd(0x168)]??{},_0x21b2a5=!!_0x1ad1b5?.[_0x1e62cd(0x18d)]||Object[_0x1e62cd(0x183)](_0x1e8b68)[_0x1e62cd(0x170)]>0x0,_0x3aae6b=!_0x21b2a5,_0x1f042d=_0x21b2a5?resolveDefaultAppName(_0x1e8b68):undefined,_0x2cc294=_0x3aae6b?resolveDefaultAppName(_0x18d8a9):undefined,_0x289ad0=stringConfigValue(_0x2ee63b[_0x1e62cd(0x188)]),_0xa1911f=_0x8c1cfa(_0x1e62cd(0x16c)),_0x29c03e={};if(_0x32c868[_0x1e62cd(0x16d)]&&typeof _0x32c868[_0x1e62cd(0x16d)]===_0x1e62cd(0x17a))for(const [_0x20f09e,_0x37b6f0]of Object[_0x1e62cd(0x16b)](_0x32c868[_0x1e62cd(0x16d)])){_0x37b6f0&&typeof _0x37b6f0===_0x1e62cd(0x17a)&&_0x37b6f0['appcode']&&(_0x29c03e[_0x20f09e]=_0x37b6f0);}const _0x3368a4=_0x1f042d||_0x2cc294||resolveDefaultAppName(_0x32c868),_0x27ecd9=Object[_0x1e62cd(0x183)](_0x29c03e)[_0x1e62cd(0x170)]>0x0,_0x239f14=_0x289ad0||_0x1f042d||_0xa1911f||_0x2cc294||_0x3368a4||undefined,_0x328b21=stringConfigValue(_0x2ee63b[_0x1e62cd(0x180)]),_0x4d2155=_0x328b21?Object[_0x1e62cd(0x16b)](_0x29c03e)['filter'](([,_0x6693b5])=>_0x6693b5?.[_0x1e62cd(0x180)]===_0x328b21):[],_0x27179e=_0x289ad0&&_0x29c03e[_0x289ad0]?.[_0x1e62cd(0x180)]===_0x328b21?[_0x289ad0,_0x29c03e[_0x289ad0]]:undefined,_0x4e0b4f=_0x27179e??(_0x4d2155['length']===0x1?_0x4d2155[0x0]:undefined),_0x3f2a6c=_0x4e0b4f?.[0x0],_0xea38b9=_0x4e0b4f?.[0x1],_0x52a2=_0x328b21?_0x3f2a6c:_0x239f14;let _0x1d6e5b=_0x52a2&&_0x29c03e[_0x52a2]?_0x29c03e[_0x52a2]:undefined;_0x328b21&&_0xea38b9&&(_0x1d6e5b=_0xea38b9);const _0x768ab0=_0x328b21?_0xea38b9??_0x1d6e5b:_0x1d6e5b,_0x4b8833=!_0x289ad0&&!_0x1f042d&&_0xa1911f&&_0x52a2===_0xa1911f,_0x76de97=_0x289ad0||(_0x4b8833?_0xa1911f:undefined)||(_0x328b21?_0x3f2a6c:undefined),_0x1d8cb3=_0x768ab0?.['appcode'],_0x332d19=_0x21b2a5?resolveTopLevelAppCode(_0x1e8b68):undefined,_0x322c99=_0x3aae6b?resolveTopLevelAppCode(_0x18d8a9):undefined,_0x5373ec=_0x289ad0||_0x1f042d?_0x1d8cb3:undefined,_0x1e018a=!_0x289ad0&&!_0x1f042d?_0x1d8cb3:undefined,_0xd5d528=_0x328b21||_0x5373ec||_0x332d19||_0x1e018a||_0x322c99||undefined,_0x1227d9=_0x21b2a5?stringConfigValue(_0x1e8b68[_0x1e62cd(0x17c)]):undefined,_0x3f553=_0x3aae6b?stringConfigValue(_0x18d8a9[_0x1e62cd(0x17c)]):undefined,_0x3b8d21=_0x2ee63b['env']||_0x768ab0?.[_0x1e62cd(0x17c)]||_0x1227d9||_0x8c1cfa(_0x1e62cd(0x17e))||_0x3f553||_0x32c868[_0x1e62cd(0x17c)]||DEFAULT_CONFIG_VALUES[_0x1e62cd(0x17c)],_0x5b1619=_0x768ab0?.[_0x1e62cd(0x181)]||_0x32c868['locale']||DEFAULT_CONFIG_VALUES[_0x1e62cd(0x181)],_0x249618=_0x8c1cfa('COOKIE')||_0x768ab0?.['cookie']||_0x32c868['cookie']||undefined,_0x1169ec=_0x8c1cfa(_0x1e62cd(0x18b))||_0x768ab0?.['accessKey']||_0x32c868[_0x1e62cd(0x177)]||undefined,_0x2b9b02=_0x2ee63b[_0x1e62cd(0x178)]||_0x8c1cfa(_0x1e62cd(0x173))||_0x768ab0?.[_0x1e62cd(0x178)]||_0x32c868[_0x1e62cd(0x178)],_0x1f875d=normalizeLegacyOutputFormat(_0x2b9b02),_0x1b30d0=_0x8c1cfa('PAGE_SIZE')||_0x768ab0?.['pageSize']||_0x32c868['pageSize'],_0x4ffa13=_0x1b30d0?Number(_0x1b30d0)||undefined:undefined,_0x421f63=_0x1ad1b5?[_0x1ad1b5[_0x1e62cd(0x168)][_0x1e62cd(0x16e)],_0x1ad1b5['projectConfig'][_0x1e62cd(0x16e)]]:[_0x32c868[_0x1e62cd(0x16e)]],_0x189f4f=resolveRiskCeiling(..._0x421f63,_0x768ab0?.[_0x1e62cd(0x16e)]),_0x449dec=resolveRiskCeiling(_0x189f4f,_0x8c1cfa(_0x1e62cd(0x166))),_0x5a502e=_0x8c1cfa(_0x1e62cd(0x189)),_0x5e2d43=_0x5a502e==='1'||_0x5a502e==='true',_0x3ebe64=_0x768ab0?.['apiDir']||_0x32c868[_0x1e62cd(0x169)]||DEFAULT_CONFIG_VALUES[_0x1e62cd(0x169)],_0x9a2711=selectConfiguredRegion({'appRegion':_0x768ab0?.[_0x1e62cd(0x16a)],'projectRegion':_0x21b2a5?_0x1e8b68[_0x1e62cd(0x16a)]:undefined,'globalRegion':_0x21b2a5||_0x3aae6b?_0x18d8a9[_0x1e62cd(0x16a)]:undefined,'mergedRegion':_0x32c868['region']}),_0x545954=normalizeLovrabetRegion(_0x9a2711[_0x1e62cd(0x184)])??DEFAULT_LOVRABET_REGION,_0x179429=isDaily(normalizeEnv(String(_0x3b8d21)))?'daily':'production';return{'appCode':typeof _0xd5d528===_0x1e62cd(0x179)&&_0xd5d528['trim']()?_0xd5d528[_0x1e62cd(0x165)]():undefined,'region':_0x545954,'regionConfiguredValue':_0x9a2711[_0x1e62cd(0x184)],'regionSource':_0x9a2711[_0x1e62cd(0x18a)],'env':_0x179429,'locale':_0x5b1619,'cookie':_0x249618,'accessKey':_0x1169ec,'format':_0x1f875d,'pageSize':_0x4ffa13,'riskLevel':_0x449dec,'verbose':_0x5e2d43,'apiDir':_0x3ebe64,'apps':_0x29c03e,'defaultApp':_0x3368a4,'currentApp':_0x27ecd9?_0x52a2:undefined,'explicitAppName':_0x76de97};}
@@ -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(_0x9bdc5c,_0x52eac6){const _0x40a855=a267_0x4997,_0x1bec8d=_0x9bdc5c();while(!![]){try{const _0x6e38fa=parseInt(_0x40a855(0x1bf))/0x1*(-parseInt(_0x40a855(0x1bb))/0x2)+parseInt(_0x40a855(0x1c4))/0x3*(-parseInt(_0x40a855(0x1c3))/0x4)+-parseInt(_0x40a855(0x1c2))/0x5*(-parseInt(_0x40a855(0x1bd))/0x6)+-parseInt(_0x40a855(0x1bc))/0x7+parseInt(_0x40a855(0x1c1))/0x8+parseInt(_0x40a855(0x1c5))/0x9+parseInt(_0x40a855(0x1c0))/0xa;if(_0x6e38fa===_0x52eac6)break;else _0x1bec8d['push'](_0x1bec8d['shift']());}catch(_0x6854f1){_0x1bec8d['push'](_0x1bec8d['shift']());}}}(a267_0x620a,0xaa63c));function a267_0x620a(){const _0x3add81=['authRequired','13XidDEH','12339430NrJLzy','730336PoIvrt','5gldWBf','256436poAAEw','27gPddPX','2003382DHKZWi','62260nmDXpk','2645965Csinhc','3058494iHVIjQ'];a267_0x620a=function(){return _0x3add81;};return a267_0x620a();}function a267_0x4997(_0x4fd5e2,_0x3cbc69){_0x4fd5e2=_0x4fd5e2-0x1bb;const _0x620ac4=a267_0x620a();let _0x499720=_0x620ac4[_0x4fd5e2];return _0x499720;}import{getIsSessionValid}from'../auth/is-session-valid.js';import{CliErrors}from'../errors.js';export async function buildAuth(_0x27d686){const {getCookie:_0xcebcac}=await import('../auth/get-cookie.js'),_0x470b5d=_0x27d686['cookie']||_0xcebcac(),_0x45343f=_0x470b5d?await getIsSessionValid():![];return{'cookie':_0x470b5d,'isLoggedIn':_0x45343f,async 'getOrLogin'(){const _0x1020d8=a267_0x4997;if(_0x470b5d&&_0x45343f)return _0x470b5d;throw CliErrors[_0x1020d8(0x1be)]();}};}
@@ -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
+ function a268_0x145c(_0x30ef7c,_0x48a040){_0x30ef7c=_0x30ef7c-0x78;const _0xcdd488=a268_0xcdd4();let _0x145cd0=_0xcdd488[_0x30ef7c];return _0x145cd0;}const a268_0x5a722f=a268_0x145c;(function(_0x4d723b,_0x29ca2f){const _0x1c3f5e=a268_0x145c,_0x47df5b=_0x4d723b();while(!![]){try{const _0x32a0bb=-parseInt(_0x1c3f5e(0x99))/0x1*(-parseInt(_0x1c3f5e(0xa8))/0x2)+parseInt(_0x1c3f5e(0x8e))/0x3*(-parseInt(_0x1c3f5e(0x9a))/0x4)+parseInt(_0x1c3f5e(0x86))/0x5+parseInt(_0x1c3f5e(0xa0))/0x6*(-parseInt(_0x1c3f5e(0x98))/0x7)+-parseInt(_0x1c3f5e(0x93))/0x8*(parseInt(_0x1c3f5e(0x92))/0x9)+-parseInt(_0x1c3f5e(0x89))/0xa*(parseInt(_0x1c3f5e(0xa3))/0xb)+parseInt(_0x1c3f5e(0xaf))/0xc*(-parseInt(_0x1c3f5e(0x96))/0xd);if(_0x32a0bb===_0x29ca2f)break;else _0x47df5b['push'](_0x47df5b['shift']());}catch(_0x34e60b){_0x47df5b['push'](_0x47df5b['shift']());}}}(a268_0xcdd4,0x451c3));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=a268_0x5a722f(0xa5);export const CONFIG_NAMES=[NEW_CONFIG_NAME];const normalizedWriteCache=new Map();export function resolveConfigPath(_0x2e4082){for(const _0x2ee9b3 of CONFIG_NAMES){const _0x27d603=resolve(_0x2e4082,_0x2ee9b3);if(existsSync(_0x27d603))return _0x27d603;}return undefined;}function a268_0xcdd4(){const _0x198f5f=['silent','status','2333148XOBCIl','message','accessKey','projectPath','length','pageSize','env','missing','format','data','runtimeDomain','empty','kbDomain','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','warn','userDomain','2820800sKpGIa','stringify','riskLevel','20pdptYI','keys','locale','Project','region','9neGZhK','cookie','project','apiDir','18ebILDP','32064SGSrbk','defaultApp','error','13LyKcJr','appcode','14zpWazt','1SIktSm','486392xRCUgU','trim','get','app','cwd','string','139362bTVCLm','utf8','appDomain','559339mfFhbS','parse','.rabetbase.json','object','config','868612zzvLfX','certificateDomain','localDomain','skillDomain','apps'];a268_0xcdd4=function(){return _0x198f5f;};return a268_0xcdd4();}export function findProjectRootDirectory(_0x3f6774=process[a268_0x5a722f(0x9e)]()){let _0xd5456f=resolve(_0x3f6774);const {root:_0x2ad2f9}=parse(_0xd5456f),_0x4380c0=homedir();while(!![]){if(resolveConfigPath(_0xd5456f)){if(_0xd5456f===_0x4380c0)break;return _0xd5456f;}if(_0xd5456f===_0x2ad2f9||_0xd5456f===_0x4380c0)break;const _0x334ab8=dirname(_0xd5456f);if(_0x334ab8===_0xd5456f)break;_0xd5456f=_0x334ab8;}return resolve(_0x3f6774);}export function getProjectConfigPath(){const _0x302bc4=a268_0x5a722f;return resolveConfigPath(process[_0x302bc4(0x9e)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x420693){const _0x19ae85=a268_0x5a722f;if(!existsSync(_0x420693))return{'status':_0x19ae85(0x7d)};try{const _0x57d96c=readFileSync(_0x420693,{'encoding':_0x19ae85(0xa1)});if(!_0x57d96c?.[_0x19ae85(0x9b)]())return{'status':_0x19ae85(0x81)};const _0x4ce252=JSON[_0x19ae85(0xa4)](_0x57d96c);return{'status':'ok','data':_0x4ce252};}catch(_0x1542ed){return{'status':_0x19ae85(0x95),'message':_0x1542ed instanceof Error?_0x1542ed[_0x19ae85(0xb0)]:String(_0x1542ed)};}}function parseCliConfigJsonFile(_0x5bdb73,_0x29349e,_0x28cc76){const _0x4ecd65=a268_0x5a722f,_0x43d896=inspectCliConfigJsonFile(_0x5bdb73);if(_0x43d896[_0x4ecd65(0xae)]===_0x4ecd65(0x7d)||_0x43d896[_0x4ecd65(0xae)]==='empty')return{};if(_0x43d896[_0x4ecd65(0xae)]==='ok')return _0x43d896[_0x4ecd65(0x7f)];return _0x29349e==='warn'&&_0x28cc76&&console[_0x4ecd65(0x95)](CLI_BIN_NAME+':\x20'+_0x28cc76+_0x4ecd65(0x83)+_0x5bdb73+'\x0a\x20\x20'+_0x43d896[_0x4ecd65(0xb0)]),{};}function normalizeLegacyConfigShape(_0x5ae9b0){const _0x4ebd24=a268_0x5a722f;if(!_0x5ae9b0||typeof _0x5ae9b0!==_0x4ebd24(0xa6))return{'config':{},'migrated':![]};const _0x5d832e={..._0x5ae9b0},_0x4107a4=_0x5d832e[_0x4ebd24(0xac)]&&typeof _0x5d832e['apps']===_0x4ebd24(0xa6)?{..._0x5d832e[_0x4ebd24(0xac)]}:{},_0x57485d=Object['keys'](_0x4107a4)[_0x4ebd24(0x7a)],_0xa54758=_0x5d832e[_0x4ebd24(0x97)]||_0x5d832e[_0x4ebd24(0x9d)];let _0x46f221=![];if(_0xa54758&&_0x57485d===0x0){const _0x10087a=typeof _0x5d832e[_0x4ebd24(0x94)]===_0x4ebd24(0x9f)&&_0x5d832e[_0x4ebd24(0x94)][_0x4ebd24(0x9b)]()?_0x5d832e['defaultApp']:String(_0xa54758)[_0x4ebd24(0x9b)]();_0x4107a4[_0x10087a]={'appcode':String(_0xa54758)[_0x4ebd24(0x9b)](),..._0x5d832e[_0x4ebd24(0x7c)]!=null?{'env':_0x5d832e[_0x4ebd24(0x7c)]}:{},..._0x5d832e['apiDir']!=null?{'apiDir':_0x5d832e[_0x4ebd24(0x91)]}:{},..._0x5d832e[_0x4ebd24(0x8f)]!=null?{'cookie':_0x5d832e['cookie']}:{},..._0x5d832e[_0x4ebd24(0x78)]!=null?{'accessKey':_0x5d832e['accessKey']}:{},..._0x5d832e[_0x4ebd24(0x7e)]!=null?{'format':_0x5d832e[_0x4ebd24(0x7e)]}:{},..._0x5d832e[_0x4ebd24(0x7b)]!=null?{'pageSize':_0x5d832e[_0x4ebd24(0x7b)]}:{},..._0x5d832e['riskLevel']!=null?{'riskLevel':_0x5d832e[_0x4ebd24(0x88)]}:{},..._0x5d832e[_0x4ebd24(0x8b)]!=null?{'locale':_0x5d832e[_0x4ebd24(0x8b)]}:{}},_0x5d832e[_0x4ebd24(0xac)]=_0x4107a4,delete _0x5d832e['defaultApp'],_0x46f221=!![];}return(_0x4ebd24(0x97)in _0x5d832e||_0x4ebd24(0x9d)in _0x5d832e)&&(delete _0x5d832e[_0x4ebd24(0x97)],delete _0x5d832e['app'],_0x46f221=!![]),{'config':_0x5d832e,'migrated':_0x46f221};}function writeNormalizedConfigIfNeeded(_0x1d72ce,_0x3cec9c){const _0x1e78c3=a268_0x5a722f,_0x4ea430=JSON[_0x1e78c3(0x87)](normalizeConfigForWrite(_0x3cec9c),null,0x2)+'\x0a';if(normalizedWriteCache[_0x1e78c3(0x9c)](_0x1d72ce)===_0x4ea430)return;writeConfigFile(_0x1d72ce,_0x3cec9c),normalizedWriteCache['set'](_0x1d72ce,_0x4ea430);}function parseAndNormalizeConfig(_0x3d928c,_0x4f30cf,_0x468d47){const _0x5be3ad=a268_0x5a722f,_0x3d90f5=parseCliConfigJsonFile(_0x3d928c,_0x4f30cf,_0x468d47),_0xae53fc=normalizeLegacyConfigShape(_0x3d90f5);if(_0xae53fc['migrated'])try{writeNormalizedConfigIfNeeded(_0x3d928c,_0xae53fc[_0x5be3ad(0xa7)]);}catch{}return _0xae53fc[_0x5be3ad(0xa7)];}export function loadRawConfigLayers(_0x40a693){const _0x253b28=a268_0x5a722f;let _0x3ed84c={},_0xeaa299={};const _0x1205a9=resolveConfigPath(homedir());_0x1205a9&&(_0x3ed84c=parseAndNormalizeConfig(_0x1205a9,'warn','Global'));const _0x241fea=_0x40a693??findProjectRootDirectory(),_0x10220f=resolveConfigPath(_0x241fea);return _0x10220f&&(_0xeaa299=parseAndNormalizeConfig(_0x10220f,_0x253b28(0x84),_0x253b28(0x8c))),{'globalPath':_0x1205a9,'projectPath':_0x10220f,'globalConfig':_0x3ed84c,'projectConfig':_0xeaa299};}const INHERIT_WHITELIST=['cookie',a268_0x5a722f(0x78),a268_0x5a722f(0x8b),a268_0x5a722f(0x7e),a268_0x5a722f(0x88),a268_0x5a722f(0x7b),a268_0x5a722f(0x8d),'routing',a268_0x5a722f(0x85),'apiDomain',a268_0x5a722f(0x80),a268_0x5a722f(0xab),a268_0x5a722f(0x82),a268_0x5a722f(0xa2),a268_0x5a722f(0xaa),a268_0x5a722f(0xa9)];export function mergeRawConfigLayers(_0xf06ed9){const _0x4af9b2=a268_0x5a722f,{globalConfig:_0x2b362d,projectConfig:_0x8abaa0}=_0xf06ed9,_0x499789=!!_0xf06ed9[_0x4af9b2(0x79)]||Object['keys'](_0x8abaa0)['length']>0x0;if(!_0x499789)return mergeGlobalOnly(_0x2b362d);return mergeProjectFirst(_0x2b362d,_0x8abaa0);}function mergeGlobalOnly(_0x52aff1){const _0x1ab01c=a268_0x5a722f,_0x21254b={..._0x52aff1};delete _0x21254b['inherit'];const _0x3d8278=_0x52aff1[_0x1ab01c(0xac)]&&typeof _0x52aff1['apps']==='object'?_0x52aff1['apps']:{};if(Object[_0x1ab01c(0x8a)](_0x3d8278)[_0x1ab01c(0x7a)]>0x0)_0x21254b['apps']=_0x3d8278;if(_0x52aff1[_0x1ab01c(0x94)])_0x21254b[_0x1ab01c(0x94)]=_0x52aff1[_0x1ab01c(0x94)];return _0x21254b;}function mergeProjectFirst(_0x5d6c05,_0x1f5535){const _0x4c590e=a268_0x5a722f,_0x8bfcc8={..._0x1f5535};delete _0x8bfcc8['inherit'];for(const _0x55b9e5 of INHERIT_WHITELIST){!(_0x55b9e5 in _0x8bfcc8)&&_0x55b9e5 in _0x5d6c05&&(_0x8bfcc8[_0x55b9e5]=_0x5d6c05[_0x55b9e5]);}const _0x507ad8=_0x1f5535[_0x4c590e(0xac)]&&typeof _0x1f5535[_0x4c590e(0xac)]===_0x4c590e(0xa6)?_0x1f5535[_0x4c590e(0xac)]:{};return Object['keys'](_0x507ad8)[_0x4c590e(0x7a)]>0x0?_0x8bfcc8['apps']=_0x507ad8:delete _0x8bfcc8[_0x4c590e(0xac)],_0x4c590e(0x94)in _0x1f5535?_0x8bfcc8[_0x4c590e(0x94)]=_0x1f5535['defaultApp']:delete _0x8bfcc8['defaultApp'],_0x8bfcc8;}export function readRawConfigWithLayers(_0x991358){const _0x46a3dc=loadRawConfigLayers(_0x991358);return{'config':mergeRawConfigLayers(_0x46a3dc),'layers':_0x46a3dc};}export function readRawConfig(_0x55c9d7){return mergeRawConfigLayers(loadRawConfigLayers(_0x55c9d7));}export function readConfigFile(_0x3bbc16){const _0x2a73aa=a268_0x5a722f;return parseAndNormalizeConfig(_0x3bbc16,_0x2a73aa(0xad));}export function writeConfigFile(_0x21d454,_0x2ce7ac){const _0x41c9f1=a268_0x5a722f,_0x2bc9f7=dirname(_0x21d454);!existsSync(_0x2bc9f7)&&mkdirSync(_0x2bc9f7,{'recursive':!![]});const _0x44b943=_0x21d454+'.tmp';try{const _0x184f85=normalizeConfigForWrite(_0x2ce7ac);writeFileSync(_0x44b943,JSON[_0x41c9f1(0x87)](_0x184f85,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0x44b943,_0x21d454);}catch(_0x20e561){try{unlinkSync(_0x44b943);}catch{}throw _0x20e561;}}export function resolveWriteConfigPath(_0x5a2a5b){const _0x584be5=a268_0x5a722f,_0x2107f0=_0x5a2a5b===_0x584be5(0x90)?process[_0x584be5(0x9e)]():homedir(),_0x29c9ed=resolveConfigPath(_0x2107f0);return _0x29c9ed??resolve(_0x2107f0,NEW_CONFIG_NAME);}
package/lib/context.d.ts CHANGED
@@ -64,6 +64,7 @@ export interface CLIEnv {
64
64
  export interface MultiAppConfig {
65
65
  name: string;
66
66
  appcode: string;
67
+ apiGroup?: string;
67
68
  isDefault: boolean;
68
69
  region: LovrabetRegion;
69
70
  regionSource: RegionConfigSource;
@@ -114,4 +115,4 @@ export declare function getTemplateBaseUrl(projectRoot?: string): string;
114
115
  *
115
116
  * 放在 context.ts 而非 alias-resolver.ts,因为需要读取 .rabetbase.json。
116
117
  */
117
- export declare function resolveApiFilePath(apiDir: string, appCode?: string): string;
118
+ export declare function resolveApiFilePath(apiDir: string, appCode?: string, selectedAppName?: string): string;
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 a269_0x250cc8=a269_0x16f4;(function(_0x369f74,_0x5335e5){const _0x102732=a269_0x16f4,_0xe17a8e=_0x369f74();while(!![]){try{const _0x3861fd=parseInt(_0x102732(0x11a))/0x1*(-parseInt(_0x102732(0x133))/0x2)+-parseInt(_0x102732(0x161))/0x3*(-parseInt(_0x102732(0x15d))/0x4)+parseInt(_0x102732(0x149))/0x5+-parseInt(_0x102732(0x13d))/0x6+parseInt(_0x102732(0x13e))/0x7*(-parseInt(_0x102732(0x158))/0x8)+parseInt(_0x102732(0x153))/0x9*(parseInt(_0x102732(0x12f))/0xa)+parseInt(_0x102732(0x138))/0xb*(-parseInt(_0x102732(0x12c))/0xc);if(_0x3861fd===_0x5335e5)break;else _0xe17a8e['push'](_0xe17a8e['shift']());}catch(_0x4fa19e){_0xe17a8e['push'](_0xe17a8e['shift']());}}}(a269_0x44e0,0x39c4a));import{CLI_BIN_NAME}from'./constant/cli.js';import{buildAuth}from'./context/auth-resolver.js';import{resolveAppConfig}from'./context/app-resolver.js';import{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';function a269_0x44e0(){const _0x45a6fa=['hasOwnProperty','project','3050968mnvNIT','source','domains','daily','./constant/env.js','937864wuuojf','agentDomain','regionSource','map','6aidNQc','setRawCommand','certificateDomain','skillHubDomain','158917aAXlDY','apiDomain','env','currentApp','defaultApp','object','config','entries','length','skillDomain','string','routing','cwd','kbDomain','global','join','app','globalConfig','1552596QHagpQ','keys','./utils/is-non-interactive.js','10UcxzYZ','./constant/domain.js','apps','apiGroup','4DNfdex','app\x20profile\x20\x22','argv','appcode','platformDomain','11RpmjZi','values','doctor','appDomain','https://g.lovrabet.com/dist/lovrabet-skill','1251408ldNjBp','7IuUmfu','project\x20Rabetbase\x20configuration','targetEnv','cdn','template_base_url','projectConfig','configuredRegion','cookie','apiDir','regionLocation','filePath','2266605KLbbrr','production','setLogPath','trim','raw','localDomain','filter','replace','Rabetbase\x20configuration','region','3163689NSBBWa','runtimeDomain','userDomain'];a269_0x44e0=function(){return _0x45a6fa;};return a269_0x44e0();}import{resolveConfiguredRegion,resolveEffectiveRegion}from'./config/region-config.js';import{resolveEnterpriseRoutingManifest}from'./config/domain-config.js';import{logger}from'./utils/logger.js';import{resolveApiModelSource}from'./api/model-source.js';export{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x2381fe){return process.env[`RABETBASE_${_0x2381fe}`]||process.env[`LOVRABET_${_0x2381fe}`]||undefined;}function optionalString(_0x51a76d){return typeof _0x51a76d==='string'&&_0x51a76d['trim']()?_0x51a76d['trim']():undefined;}export function isRoutingRecoveryService(_0x33b28a){const _0x4a2524=a269_0x16f4;return _0x33b28a===_0x4a2524(0x120)||_0x33b28a===_0x4a2524(0x13a);}export async function createContext(_0x4db87c){const _0x199828=a269_0x16f4,{config:_0x360ee0,layers:_0x33925b}=readRawConfigWithLayers(),_0x3edfdd=buildConfig(_0x360ee0,_0x4db87c,_0x33925b);await initGlobalEnvironment(_0x3edfdd);const {getUserDomain:_0x37dc94,getApiDomain:_0xe546fe}=await import(_0x199828(0x130)),_0x4e9e2={'apiDomain':_0xe546fe(),'userDomain':_0x37dc94()},_0x263836=await buildAuth(_0x3edfdd);logger[_0x199828(0x14b)](process[_0x199828(0x126)]());const _0x3114c4=(CLI_BIN_NAME+'\x20'+process[_0x199828(0x135)]['slice'](0x2)[_0x199828(0x129)]('\x20'))[_0x199828(0x14c)]();logger[_0x199828(0x162)](_0x3114c4);const {isNonInteractive:_0x3c5019}=await import(_0x199828(0x12e)),_0x48b445=_0x3c5019(_0x4db87c);return{'config':_0x3edfdd,'auth':_0x263836,'logger':logger,'env':_0x4e9e2,'nonInteractive':_0x48b445};}export function buildConfigFromFlags(_0x5f2043){const {config:_0x3dd285,layers:_0x5e0237}=readRawConfigWithLayers();return buildConfig(_0x3dd285,_0x5f2043,_0x5e0237);}export async function initGlobalEnvironment(_0x5855c7){const _0x2298ca=a269_0x16f4,_0x429144=_0x5855c7['regionSource']==='app'&&_0x5855c7[_0x2298ca(0x11d)]?_0x2298ca(0x134)+_0x5855c7['currentApp']+'\x22':_0x5855c7['regionSource']===_0x2298ca(0x157)?_0x2298ca(0x13f):_0x5855c7[_0x2298ca(0x15f)]===_0x2298ca(0x128)?'global\x20Rabetbase\x20configuration':_0x2298ca(0x151);await initConfiguredEnvironment({'raw':_0x5855c7[_0x2298ca(0x14d)],'configuredRegion':_0x5855c7['regionConfiguredValue']??_0x5855c7['raw']?.[_0x2298ca(0x152)]??_0x5855c7[_0x2298ca(0x152)],'regionLocation':_0x429144,'targetEnv':_0x5855c7[_0x2298ca(0x11c)]});}async function initConfiguredEnvironment(_0xf7e467){const _0xa277c1=a269_0x16f4,_0x57d257=resolveConfiguredRegion(_0xf7e467[_0xa277c1(0x144)],_0xf7e467[_0xa277c1(0x147)]),_0x2954b0=resolveEnterpriseRoutingManifest(_0xf7e467['raw']?.[_0xa277c1(0x125)]),_0x441d7c={'region':_0x57d257,'apiDomain':_0x2954b0?_0x2954b0[_0xa277c1(0x15a)][_0xa277c1(0x11b)]:optionalString(_0xf7e467[_0xa277c1(0x14d)]?.[_0xa277c1(0x11b)]),'userDomain':_0x2954b0?_0x2954b0[_0xa277c1(0x15a)][_0xa277c1(0x155)]:optionalString(_0xf7e467[_0xa277c1(0x14d)]?.[_0xa277c1(0x155)]),'runtimeDomain':_0x2954b0?_0x2954b0['domains'][_0xa277c1(0x154)]:optionalString(_0xf7e467[_0xa277c1(0x14d)]?.['runtimeDomain']),'skillDomain':_0x2954b0?_0x2954b0[_0xa277c1(0x15a)]['skillDomain']:optionalString(_0xf7e467['raw']?.[_0xa277c1(0x123)])||optionalString(_0xf7e467[_0xa277c1(0x14d)]?.[_0xa277c1(0x119)])||optionalString(_0xf7e467[_0xa277c1(0x14d)]?.[_0xa277c1(0x15e)])||optionalString(_0xf7e467[_0xa277c1(0x14d)]?.['platformDomain']),'kbDomain':_0x2954b0?_0x2954b0['domains'][_0xa277c1(0x127)]:optionalString(_0xf7e467[_0xa277c1(0x14d)]?.['kbDomain'])||optionalString(_0xf7e467[_0xa277c1(0x14d)]?.[_0xa277c1(0x15e)])||optionalString(_0xf7e467[_0xa277c1(0x14d)]?.[_0xa277c1(0x137)]),'appDomain':_0x2954b0?_0x2954b0[_0xa277c1(0x15a)][_0xa277c1(0x13b)]:optionalString(_0xf7e467['raw']?.['appDomain']),'localDomain':_0x2954b0?_0x2954b0[_0xa277c1(0x15a)][_0xa277c1(0x14e)]:optionalString(_0xf7e467['raw']?.['localDomain']),'certificateDomain':_0x2954b0?_0x2954b0[_0xa277c1(0x15a)][_0xa277c1(0x163)]:optionalString(_0xf7e467[_0xa277c1(0x14d)]?.[_0xa277c1(0x163)]),'cdn':_0x2954b0?.[_0xa277c1(0x141)]},{initEnv:_0x3e8b72}=await import(_0xa277c1(0x15c)),{initDomains:_0x13c5f6}=await import(_0xa277c1(0x130));_0x3e8b72(_0xf7e467[_0xa277c1(0x140)]),_0x13c5f6(_0x441d7c);}export async function initMultiAppEnvironment(_0x21693c){const _0x331384=a269_0x16f4;await initConfiguredEnvironment({'raw':_0x21693c['routingConfig'],'configuredRegion':_0x21693c[_0x331384(0x152)],'regionLocation':_0x331384(0x134)+_0x21693c['name']+'\x22','targetEnv':_0x21693c[_0x331384(0x11c)]===_0x331384(0x15b)?_0x331384(0x15b):_0x331384(0x14a)});}export function getConfigAppCode(_0x583af4){const _0x40a9a3=a269_0x16f4,_0x58ccd4=readRawConfig(_0x583af4);if(_0x58ccd4['apps']&&typeof _0x58ccd4['apps']===_0x40a9a3(0x11f)){const _0x1bec9d=_0x58ccd4[_0x40a9a3(0x11e)];if(_0x1bec9d)return _0x58ccd4[_0x40a9a3(0x131)][_0x1bec9d]?.[_0x40a9a3(0x136)]?String(_0x58ccd4[_0x40a9a3(0x131)][_0x1bec9d][_0x40a9a3(0x136)])[_0x40a9a3(0x14c)]():undefined;const _0x15f8ff=Object[_0x40a9a3(0x139)](_0x58ccd4[_0x40a9a3(0x131)]);if(_0x15f8ff[_0x40a9a3(0x122)]===0x1&&_0x15f8ff[0x0]?.['appcode'])return String(_0x15f8ff[0x0][_0x40a9a3(0x136)])[_0x40a9a3(0x14c)]();}const _0x4c42e7=_0x58ccd4[_0x40a9a3(0x136)]||_0x58ccd4[_0x40a9a3(0x12a)];if(typeof _0x4c42e7!=='string'||_0x4c42e7[_0x40a9a3(0x14c)]()==='')return undefined;return _0x4c42e7[_0x40a9a3(0x14c)]();}const CONNECTION_ROUTING_KEYS=[a269_0x250cc8(0x125),a269_0x250cc8(0x11b),a269_0x250cc8(0x155),a269_0x250cc8(0x154),a269_0x250cc8(0x123),'skillHubDomain',a269_0x250cc8(0x127),a269_0x250cc8(0x15e),a269_0x250cc8(0x137),a269_0x250cc8(0x13b),a269_0x250cc8(0x14e),'certificateDomain'];function pickConnectionRoutingConfig(_0x3c7e79,_0x4b6054){const _0x58e075={'region':_0x4b6054};for(const _0x5a227e of CONNECTION_ROUTING_KEYS){if(_0x3c7e79[_0x5a227e]!==undefined)_0x58e075[_0x5a227e]=_0x3c7e79[_0x5a227e];}return _0x58e075;}export function getMultiAppConfigs(_0xbe59f4=a269_0x250cc8(0x157),_0x3acd7d){const _0x4ca42d=a269_0x250cc8,_0x42e82c=loadRawConfigLayers(_0x3acd7d);let _0x5a0052,_0x57647e;const _0x34ac21=mergeRawConfigLayers(_0x42e82c),_0x403123=_0x42e82c[_0x4ca42d(0x12b)][_0x4ca42d(0x131)]&&typeof _0x42e82c[_0x4ca42d(0x12b)][_0x4ca42d(0x131)]===_0x4ca42d(0x11f)?_0x42e82c[_0x4ca42d(0x12b)][_0x4ca42d(0x131)]:{},_0x3112bb=_0x42e82c[_0x4ca42d(0x143)]['apps']&&typeof _0x42e82c[_0x4ca42d(0x143)][_0x4ca42d(0x131)]===_0x4ca42d(0x11f)?_0x42e82c['projectConfig'][_0x4ca42d(0x131)]:{};_0xbe59f4==='merged'?(_0x5a0052={..._0x403123,..._0x3112bb},_0x57647e=_0x34ac21[_0x4ca42d(0x11e)]):(_0x5a0052=_0x42e82c[_0x4ca42d(0x143)][_0x4ca42d(0x131)],_0x57647e=_0x42e82c[_0x4ca42d(0x143)][_0x4ca42d(0x11e)]);!_0x57647e&&_0x5a0052&&typeof _0x5a0052===_0x4ca42d(0x11f)&&Object[_0x4ca42d(0x12d)](_0x5a0052)[_0x4ca42d(0x122)]===0x1&&(_0x57647e=Object[_0x4ca42d(0x12d)](_0x5a0052)[0x0]);if(!_0x5a0052||typeof _0x5a0052!=='object'||Object[_0x4ca42d(0x12d)](_0x5a0052)[_0x4ca42d(0x122)]===0x0)return null;return Object[_0x4ca42d(0x121)](_0x5a0052)[_0x4ca42d(0x160)](([_0x3ba171,_0x3c45bb])=>{const _0x3d4b78=_0x4ca42d,_0x5873bd=_0xbe59f4===_0x3d4b78(0x157)||Object['prototype'][_0x3d4b78(0x156)]['call'](_0x3112bb,_0x3ba171),_0x53e8f4=_0x5873bd?_0x34ac21:_0x42e82c[_0x3d4b78(0x12b)],_0x4fabbe=resolveEffectiveRegion({'appRegion':_0x3c45bb?.[_0x3d4b78(0x152)],'projectRegion':_0x5873bd?_0x42e82c[_0x3d4b78(0x143)]['region']:undefined,'globalRegion':_0x42e82c[_0x3d4b78(0x12b)][_0x3d4b78(0x152)],'mergedRegion':_0x53e8f4[_0x3d4b78(0x152)],'appName':_0x3ba171});return{'name':_0x3ba171,'appcode':_0x3c45bb?.[_0x3d4b78(0x136)]||'','apiGroup':optionalString(_0x3c45bb?.[_0x3d4b78(0x132)]),'isDefault':_0x3ba171===_0x57647e,'region':_0x4fabbe['region'],'regionSource':_0x4fabbe[_0x3d4b78(0x159)],'env':_0x3c45bb?.[_0x3d4b78(0x11c)],'apiDir':optionalString(_0x3c45bb?.[_0x3d4b78(0x146)])||optionalString(_0x53e8f4['apiDir']),'cookie':_0x3c45bb?.[_0x3d4b78(0x145)]||undefined,'routingConfig':pickConnectionRoutingConfig(_0x53e8f4,_0x4fabbe['region'])};})[_0x4ca42d(0x14f)](_0x1b63ca=>_0x1b63ca[_0x4ca42d(0x136)]);}function a269_0x16f4(_0x3620d5,_0xbd1994){_0x3620d5=_0x3620d5-0x119;const _0x44e08c=a269_0x44e0();let _0x16f4bd=_0x44e08c[_0x3620d5];return _0x16f4bd;}export function getTemplateBaseUrl(_0x35ee30){const _0x334750=a269_0x250cc8,_0x54340a=readRawConfig(_0x35ee30);if(_0x54340a[_0x334750(0x142)]&&typeof _0x54340a[_0x334750(0x142)]===_0x334750(0x124))return _0x54340a[_0x334750(0x142)][_0x334750(0x150)](/\/$/,'');return _0x334750(0x13c);}function buildConfig(_0x67ae85,_0x43d73c,_0x5290f4){return{...resolveAppConfig({'raw':_0x67ae85,'flags':_0x43d73c,'layers':_0x5290f4,'readEnv':env}),'raw':_0x67ae85};}export function resolveApiFilePath(_0x2466e4,_0x40e26e,_0x364e65){const _0x3d1c9a=a269_0x250cc8;return resolveApiModelSource(_0x2466e4,_0x40e26e,_0x364e65)[_0x3d1c9a(0x148)];}
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * 通用数据集别名解析层
3
3
  *
4
- * 从 `rabetbase api pull` 生成的 api.ts 中提取 alias → datasetCode 映射。
5
- * --alias 参数接受 api.ts 中定义的 alias 名称,解析为对应的 datasetCode。
4
+ * 从 `rabetbase api pull` 生成的模型注册表或旧式 api.ts 中提取 alias → datasetCode 映射。
5
+ * --alias 参数接受生成模型中定义的 alias 名称,解析为对应的 datasetCode。
6
6
  *
7
- * 无 api.ts 时(CI 环境未 pull)返回 undefined,由调用方报错。
7
+ * 无生成模型事实时(CI 环境未 pull)返回 undefined,由调用方报错。
8
8
  */
9
9
  export interface AliasEntry {
10
10
  alias: string;
@@ -13,19 +13,15 @@ export interface AliasEntry {
13
13
  name: string;
14
14
  }
15
15
  /**
16
- * 加载并缓存指定 api 文件的别名映射。
16
+ * 加载并缓存指定模型事实文件的别名映射。
17
17
  *
18
- * @param apiDir api 目录(用于默认路径兜底)
19
- * @param appCode (已废弃,保留签名兼容)不再用于内部路径解析
20
- * @param resolvedFilePath 已解析好的 api.ts 绝对/相对路径;
21
- * 多应用场景由调用方通过 resolveApiFilePath() 传入
18
+ * @param apiDir api 目录(用于默认路径兜底)
19
+ * @param appCode (已废弃,保留签名兼容)不再用于内部路径解析
20
+ * @param resolvedFilePath 已解析好的模型注册表或兼容 api.ts 路径
21
+ * @param profileName 模型注册表中的目标 profile
22
22
  */
23
- export declare function loadAliasMap(apiDir: string, appCode?: string, resolvedFilePath?: string): AliasEntry[];
24
- /**
25
- * 通过 alias 名称解析 datasetCode。
26
- */
27
- export declare function resolveAlias(apiDir: string, alias: string, appCode?: string, resolvedFilePath?: string): string | undefined;
28
- /**
29
- * 列出所有可用的别名(用于 help、补全、错误提示等场景)
30
- */
31
- export declare function listAliases(apiDir: string, appCode?: string, resolvedFilePath?: string): AliasEntry[];
23
+ export declare function loadAliasMap(apiDir: string, appCode?: string, resolvedFilePath?: string, profileName?: string): AliasEntry[];
24
+ /** 通过 alias 名称解析 datasetCode。 */
25
+ export declare function resolveAlias(apiDir: string, alias: string, appCode?: string, resolvedFilePath?: string, profileName?: string): string | undefined;
26
+ /** 列出所有可用的别名(用于 help、补全、错误提示等场景)。 */
27
+ export declare function listAliases(apiDir: string, appCode?: string, resolvedFilePath?: string, profileName?: string): AliasEntry[];
@@ -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 a270_0x5ea829=a270_0x1c69;(function(_0xf2e65c,_0x16e822){const _0x5730d6=a270_0x1c69,_0x22defd=_0xf2e65c();while(!![]){try{const _0x1c23a2=parseInt(_0x5730d6(0x182))/0x1*(parseInt(_0x5730d6(0x16c))/0x2)+-parseInt(_0x5730d6(0x167))/0x3*(-parseInt(_0x5730d6(0x175))/0x4)+-parseInt(_0x5730d6(0x17b))/0x5*(parseInt(_0x5730d6(0x184))/0x6)+-parseInt(_0x5730d6(0x173))/0x7*(parseInt(_0x5730d6(0x170))/0x8)+-parseInt(_0x5730d6(0x16a))/0x9+-parseInt(_0x5730d6(0x181))/0xa*(-parseInt(_0x5730d6(0x179))/0xb)+parseInt(_0x5730d6(0x165))/0xc;if(_0x1c23a2===_0x16e822)break;else _0x22defd['push'](_0x22defd['shift']());}catch(_0x372917){_0x22defd['push'](_0x22defd['shift']());}}}(a270_0x19ce,0xab047));import{existsSync,readFileSync,realpathSync,statSync}from'node:fs';import{dirname,extname,isAbsolute,relative,resolve}from'node:path';import{MODEL_REGISTRY_FILE_NAME,getProfileModels,readModelRegistry}from'../api/model-registry-file.js';import{parseLegacyApiModels}from'../api/legacy-api-file.js';function a270_0x19ce(){const _0x407910=['size','set','.ts','flags','stringify','utf-8','has','14079540uTmtYt','.cjs','1135812YHgfeV','slice','.jsx','7670304kOmaGN','datasetCode','2gIGSbF','map','isFile','length','8PwezRR','../','.cts','9511026lXxlkr','flatMap','4KHYENq','.tsx','defaultProfile','alias','10590492NJuXWU','api.ts','4646885VopJvD','get','.js','endsWith','source','filter','10JDZdet','1326167gxVwJf','startsWith','6lYYKPl','push','.mts'];a270_0x19ce=function(){return _0x407910;};return a270_0x19ce();}import{findProjectRootDirectory}from'../context/config-loader.js';const cache=new Map(),MAX_LOCAL_REEXPORT_DEPTH=0x8,SOURCE_FILE_EXTENSIONS=[a270_0x5ea829(0x160),a270_0x5ea829(0x176),a270_0x5ea829(0x15d),a270_0x5ea829(0x172),a270_0x5ea829(0x17d),a270_0x5ea829(0x169),'.mjs',a270_0x5ea829(0x166)],LOCAL_REEXPORT_RE=/\bexport\s+(?:type\s+)?(?:\{[\s\S]*?\}|\*)\s+from\s*["']([^"']+)["']/g,SOURCE_EXTENSIONS_BY_RUNTIME_EXTENSION={'.js':[a270_0x5ea829(0x160),'.tsx'],'.jsx':['.tsx'],'.mjs':[a270_0x5ea829(0x15d)],'.cjs':[a270_0x5ea829(0x172)]};function parseApiFile(_0x1f32d0){const _0x3fcde0=a270_0x5ea829;return parseLegacyApiModels(_0x1f32d0)[_0x3fcde0(0x174)](_0x3061bd=>_0x3061bd[_0x3fcde0(0x178)]?[{'alias':_0x3061bd[_0x3fcde0(0x178)],'datasetCode':_0x3061bd['datasetCode'],'tableName':_0x3061bd['tableName'],'name':_0x3061bd['name']}]:[]);}function isWithinRoot(_0xad3f00,_0x54df31){const _0x428313=a270_0x5ea829,_0x2281b1=relative(_0xad3f00,_0x54df31);return _0x2281b1===''||!_0x2281b1[_0x428313(0x183)]('..')&&!isAbsolute(_0x2281b1);}function resolveExistingFile(_0x3a86ca){const _0x78a704=a270_0x5ea829;if(!existsSync(_0x3a86ca))return undefined;try{return statSync(_0x3a86ca)[_0x78a704(0x16e)]()?realpathSync(_0x3a86ca):undefined;}catch{return undefined;}}function reexportCandidatePaths(_0x55dc16){const _0x42283a=a270_0x5ea829,_0x4a2385=extname(_0x55dc16);if(!_0x4a2385)return[...SOURCE_FILE_EXTENSIONS[_0x42283a(0x16d)](_0x442378=>''+_0x55dc16+_0x442378),...SOURCE_FILE_EXTENSIONS[_0x42283a(0x16d)](_0x199530=>resolve(_0x55dc16,'index'+_0x199530))];const _0x4fec8b=SOURCE_EXTENSIONS_BY_RUNTIME_EXTENSION[_0x4a2385];if(!_0x4fec8b)return[_0x55dc16];const _0x100b13=_0x55dc16[_0x42283a(0x168)](0x0,-_0x4a2385[_0x42283a(0x16f)]);return[..._0x4fec8b[_0x42283a(0x16d)](_0x2e67de=>''+_0x100b13+_0x2e67de),_0x55dc16];}function a270_0x1c69(_0xe1dc89,_0x4f2651){_0xe1dc89=_0xe1dc89-0x15d;const _0x19cee1=a270_0x19ce();let _0x1c6963=_0x19cee1[_0xe1dc89];return _0x1c6963;}function resolveLocalReexport(_0xdc6853,_0x482813,_0x394125){const _0x1a0afd=a270_0x5ea829;if(!_0x482813[_0x1a0afd(0x183)]('./')&&!_0x482813[_0x1a0afd(0x183)](_0x1a0afd(0x171)))return undefined;const _0x321eee=resolve(dirname(_0xdc6853),_0x482813);if(!isWithinRoot(_0x394125,_0x321eee))return undefined;for(const _0x54e774 of reexportCandidatePaths(_0x321eee)){const _0x206dd6=resolveExistingFile(_0x54e774);if(_0x206dd6&&isWithinRoot(_0x394125,_0x206dd6))return _0x206dd6;}return undefined;}function parseApiFileTree(_0x4a58eb,_0x161260,_0x13c491,_0x4d1d90){const _0x1bc1ea=a270_0x5ea829,_0x413836=resolveExistingFile(_0x4a58eb);if(!_0x413836)return[];const _0x84e7c6=_0x13c491['get'](_0x413836);if(_0x84e7c6!==undefined&&_0x84e7c6<=_0x4d1d90)return[];_0x13c491[_0x1bc1ea(0x15f)](_0x413836,_0x4d1d90);const _0x114415=readFileSync(_0x413836,_0x1bc1ea(0x163)),_0x4b18cc=parseApiFile(_0x114415);if(_0x4d1d90>=MAX_LOCAL_REEXPORT_DEPTH)return _0x4b18cc;const _0x524247=new RegExp(LOCAL_REEXPORT_RE[_0x1bc1ea(0x17f)],LOCAL_REEXPORT_RE[_0x1bc1ea(0x161)]);let _0x1b7948;while((_0x1b7948=_0x524247['exec'](_0x114415))!==null){const _0x5530b9=resolveLocalReexport(_0x413836,_0x1b7948[0x1],_0x161260);_0x5530b9&&_0x4b18cc[_0x1bc1ea(0x185)](...parseApiFileTree(_0x5530b9,_0x161260,_0x13c491,_0x4d1d90+0x1));}return _0x4b18cc;}function aliasProjectRoot(_0x59dfcb){const _0x278763=findProjectRootDirectory(dirname(_0x59dfcb));try{return realpathSync(_0x278763);}catch{return _0x278763;}}function uniqueAliasEntries(_0x412527){const _0x29284c=a270_0x5ea829,_0x5a73e8=new Set();return _0x412527[_0x29284c(0x180)](_0x4f78d6=>{const _0x414598=_0x29284c,_0xdcd16a=JSON[_0x414598(0x162)](_0x4f78d6);if(_0x5a73e8['has'](_0xdcd16a))return![];return _0x5a73e8['add'](_0xdcd16a),!![];});}export function loadAliasMap(_0x350bf5,_0x2f99dd,_0x391489,_0xe0fe64){const _0x1aa00d=a270_0x5ea829,_0x6a97=resolve(_0x391489??resolve(process['cwd'](),_0x350bf5,_0x1aa00d(0x17a))),_0x5721c6=_0xe0fe64?_0x6a97+'#'+_0xe0fe64:_0x6a97;if(cache[_0x1aa00d(0x164)](_0x5721c6))return cache[_0x1aa00d(0x17c)](_0x5721c6);if(!existsSync(_0x6a97))return cache['set'](_0x5721c6,[]),[];try{if(_0x6a97[_0x1aa00d(0x17e)](MODEL_REGISTRY_FILE_NAME)){const _0x26a1b0=readModelRegistry(_0x6a97),_0x2238bb=_0xe0fe64??_0x26a1b0?.[_0x1aa00d(0x177)],_0x59a7e2=_0x2238bb&&_0x26a1b0?getProfileModels(_0x26a1b0,_0x2238bb):[],_0x12c13d=uniqueAliasEntries(_0x59a7e2['flatMap'](_0x2ca602=>_0x2ca602[_0x1aa00d(0x178)]?[{'alias':_0x2ca602[_0x1aa00d(0x178)],'datasetCode':_0x2ca602['datasetCode'],'tableName':_0x2ca602['tableName'],'name':_0x2ca602['name']}]:[]));return cache[_0x1aa00d(0x15f)](_0x5721c6,_0x12c13d),_0x12c13d;}const _0x8b2a34=uniqueAliasEntries(parseApiFileTree(_0x6a97,aliasProjectRoot(_0x6a97),new Map(),0x0));return cache[_0x1aa00d(0x15f)](_0x5721c6,_0x8b2a34),_0x8b2a34;}catch{return cache[_0x1aa00d(0x15f)](_0x5721c6,[]),[];}}export function resolveAlias(_0x57b7a2,_0x342936,_0x1a1504,_0x45321b,_0x37aab8){const _0x4a4cd4=a270_0x5ea829;if(!_0x342936)return undefined;const _0x1a4dff=loadAliasMap(_0x57b7a2,_0x1a1504,_0x45321b,_0x37aab8),_0x1c7d13=new Set(_0x1a4dff[_0x4a4cd4(0x180)](_0x1f47f0=>_0x1f47f0['alias']===_0x342936)[_0x4a4cd4(0x16d)](_0x4a959f=>_0x4a959f[_0x4a4cd4(0x16b)]));return _0x1c7d13[_0x4a4cd4(0x15e)]===0x1?[..._0x1c7d13][0x0]:undefined;}export function listAliases(_0x5dc12e,_0x132138,_0x2cec09,_0x370c75){return loadAliasMap(_0x5dc12e,_0x132138,_0x2cec09,_0x370c75);}
@@ -5,6 +5,7 @@
5
5
  * 统一认证、超时、错误处理;命令层通过导出函数调用。
6
6
  */
7
7
  import type { Paging } from "../framework/response.js";
8
+ import { type CrossDbRelationDetail, type CrossDbRelationMutation, type CrossDbRelationQuery, type CrossDbRelationSource } from "../core/cross-db-relation.js";
8
9
  import type { FetchDocOptions, FetchModelListResult } from "../types/index.js";
9
10
  export declare function setActiveCookie(cookie: string): void;
10
11
  export declare function clearActiveCookie(): void;
@@ -294,6 +295,14 @@ export interface BffScriptStatistics {
294
295
  beforeScriptId: number | null;
295
296
  afterScriptId: number | null;
296
297
  }
298
+ export interface BffScriptLogQuery {
299
+ appCode: string;
300
+ startTime: number;
301
+ endTime: number;
302
+ level?: string;
303
+ keyword?: string;
304
+ limit?: number;
305
+ }
297
306
  export declare const BFF_LIST_PAGE_SIZE = 100;
298
307
  export declare function listBffScripts(appCode: string, type?: string, options?: {
299
308
  scriptName?: string;
@@ -314,6 +323,14 @@ export declare function saveBffScript(params: {
314
323
  export declare function deleteBffScript(id: number): Promise<void>;
315
324
  export declare function getBffScriptStatistics(appCode: string): Promise<BffScriptStatistics[]>;
316
325
  export declare function clearBffScriptCache(): Promise<string>;
326
+ /**
327
+ * Query runtime Backend Function logs for development diagnostics.
328
+ *
329
+ * The runtime endpoint returns already-formatted log lines. Keep the raw
330
+ * lines intact so callers can search, display, or pipe them without losing
331
+ * trace and script metadata embedded by the server.
332
+ */
333
+ export declare function searchBffScriptLogs(query: BffScriptLogQuery): Promise<string[]>;
317
334
  export declare function listBffDatasetOperations(appCode: string, datasetId: number): Promise<Record<string, unknown> | null>;
318
335
  export interface SqlQuery {
319
336
  id: number;
@@ -504,12 +521,36 @@ export declare function listRecycleBinResources(appCode: string, resourceType: R
504
521
  paging?: Paging;
505
522
  }>;
506
523
  export declare function restoreRecycleBinResource(deleteLogId: number): Promise<void>;
507
- export interface TextGeneratedDatasetPreviewInput {
524
+ export type TextGeneratedDatasetPreviewInput = {
508
525
  datasetName: string;
509
526
  requirementDescription: string;
527
+ mode?: "single";
528
+ } | {
529
+ mode: "batch";
530
+ requirementDescription: string;
531
+ };
532
+ /** Server measurements for a single generation attempt; absent values are unknown. */
533
+ export interface DatasetGenerationMetrics {
534
+ schemaVersion?: number;
535
+ attemptId?: string;
536
+ attempt?: number;
537
+ datasetCount?: number;
538
+ fieldCount?: number;
539
+ previewDurationMs?: number;
540
+ queueWaitMs?: number;
541
+ executionDurationMs?: number;
542
+ resultReadDurationMs?: number;
543
+ stageDurationsMs?: Record<string, number>;
544
+ modelCallCount?: number;
545
+ retryCount?: number;
546
+ failedStage?: string;
547
+ previousAttempts?: DatasetGenerationMetrics[];
510
548
  }
511
549
  export declare function previewTextGeneratedDataset(appCode: string, input: TextGeneratedDatasetPreviewInput): Promise<any>;
512
550
  export interface TextGeneratedDatasetJobStartResult {
551
+ mode?: "single" | "batch";
552
+ metrics?: DatasetGenerationMetrics | null;
553
+ failedStage?: string | null;
513
554
  taskId?: string;
514
555
  operationId?: string;
515
556
  clientOperationId?: string;
@@ -522,6 +563,9 @@ export interface TextGeneratedDatasetJobStartResult {
522
563
  [key: string]: any;
523
564
  }
524
565
  export interface TextGeneratedDatasetJobStatus {
566
+ mode?: "single" | "batch";
567
+ metrics?: DatasetGenerationMetrics | null;
568
+ failedStage?: string | null;
525
569
  taskId?: string;
526
570
  operationId?: string;
527
571
  clientOperationId?: string;
@@ -535,6 +579,7 @@ export interface TextGeneratedDatasetJobStatus {
535
579
  }
536
580
  export declare function startTextGeneratedDataset(appCode: string, design: Record<string, any>, options?: {
537
581
  clientOperationId?: string;
582
+ mode?: "batch";
538
583
  }): Promise<TextGeneratedDatasetJobStartResult>;
539
584
  export declare function getTextGeneratedDatasetStatus(appCode: string, options: {
540
585
  taskId?: string;
@@ -922,6 +967,11 @@ export interface ErBusinessGroupSummary {
922
967
  }
923
968
  export declare function getErRelationDetail(appCode: string, relationId: number): Promise<ErRelationDetail | null>;
924
969
  export declare function createErRelation(payload: ErRelationMutationPayload): Promise<boolean>;
970
+ /** Cookie-authenticated POST query. Reject incomplete facts rather than treating them as absence. */
971
+ export declare function queryCrossDbRelations(payload: CrossDbRelationQuery): Promise<CrossDbRelationDetail[]>;
972
+ export declare function createCrossDbRelation(payload: Omit<CrossDbRelationMutation, "fromDblinkId">): Promise<true>;
973
+ export declare function updateCrossDbRelation(payload: CrossDbRelationMutation): Promise<true>;
974
+ export declare function deleteCrossDbRelation(payload: CrossDbRelationSource): Promise<true>;
925
975
  export declare function updateErRelation(payload: ErRelationMutationPayload): Promise<boolean>;
926
976
  export declare function deleteErRelation(payload: ErRelationDeletePayload): Promise<boolean>;
927
977
  export declare function updateErBusinessGroup(payload: ErBusinessGroupUpdatePayload): Promise<boolean>;
@@ -977,16 +1027,141 @@ export interface DbAnalysisStatus {
977
1027
  endTime?: number | string | null;
978
1028
  [key: string]: unknown;
979
1029
  }
1030
+ /** Runtime role exposed by lovrabet-runtime for approval assignee selection. */
1031
+ export interface ApprovalRuntimeRole {
1032
+ id: number;
1033
+ appCode?: string | null;
1034
+ roleName?: string | null;
1035
+ roleType?: string | null;
1036
+ remark?: string | null;
1037
+ userCount?: number | null;
1038
+ permitCount?: number | null;
1039
+ [key: string]: unknown;
1040
+ }
1041
+ /** Runtime app user exposed by /api/dept/queryAppUser. */
1042
+ export interface ApprovalRuntimeUser {
1043
+ code?: string | number | null;
1044
+ userName?: string | null;
1045
+ nickName?: string | null;
1046
+ displayName?: string | null;
1047
+ email?: string | null;
1048
+ status?: string | null;
1049
+ [key: string]: unknown;
1050
+ }
1051
+ /** Safe runtime role member fields used to inspect approval role membership. */
1052
+ export interface ApprovalRuntimeRoleMember {
1053
+ userId: string | number;
1054
+ username?: string | null;
1055
+ nickname?: string | null;
1056
+ [key: string]: unknown;
1057
+ }
1058
+ /** Runtime role and its current members. */
1059
+ export interface ApprovalRuntimeRoleUsers {
1060
+ id: number;
1061
+ roleName?: string | null;
1062
+ roleType?: string | null;
1063
+ userList?: ApprovalRuntimeRoleMember[] | null;
1064
+ [key: string]: unknown;
1065
+ }
1066
+ export interface ApprovalRuntimeRoleListOptions {
1067
+ roleId?: number;
1068
+ roleName?: string;
1069
+ currentPage?: number;
1070
+ pageSize?: number;
1071
+ }
1072
+ /** POST Runtime /api/permit/role/get-list: list roles from the runtime environment. */
1073
+ export declare function listApprovalRuntimeRoles(appCode: string, options?: ApprovalRuntimeRoleListOptions): Promise<{
1074
+ items: ApprovalRuntimeRole[];
1075
+ paging?: Paging;
1076
+ }>;
1077
+ /** GET Runtime /api/dept/queryAppUser: list users attached to the runtime app. */
1078
+ export declare function listApprovalRuntimeUsers(appCode: string): Promise<ApprovalRuntimeUser[]>;
1079
+ /** POST Runtime /api/permit/user-role/get-user-list: inspect runtime role members. */
1080
+ export declare function listApprovalRuntimeRoleUsers(appCode: string): Promise<ApprovalRuntimeRoleUsers[]>;
1081
+ /** Flow definition returned by SmartFlowController. */
1082
+ export interface FlowDefinition {
1083
+ id: number;
1084
+ flowCode?: string | null;
1085
+ appCode?: string | null;
1086
+ datasetCode?: string | null;
1087
+ pageId?: number | null;
1088
+ flowName?: string | null;
1089
+ flowDesc?: string | null;
1090
+ flowType?: string | null;
1091
+ sourceType?: string | null;
1092
+ version?: number | null;
1093
+ flowSchema?: string | null;
1094
+ draftSchema?: string | null;
1095
+ flowStatus?: string | null;
1096
+ templateName?: string | null;
1097
+ deployId?: string | null;
1098
+ procDefId?: string | null;
1099
+ procDefVersion?: number | null;
1100
+ flowConfig?: string | null;
1101
+ flowJson?: Record<string, unknown> | null;
1102
+ enabled?: boolean | null;
1103
+ createUserId?: string | null;
1104
+ updateUserId?: string | null;
1105
+ gmtCreate?: string | null;
1106
+ gmtModified?: string | null;
1107
+ [key: string]: unknown;
1108
+ }
1109
+ /** Exact writable fields exposed by FlowDefRequest. */
1110
+ export interface FlowDefinitionWriteRequest {
1111
+ id?: number;
1112
+ flowName: string;
1113
+ flowDesc?: string;
1114
+ flowType: "FORM_FLOW" | "INDEPENDENT_FLOW";
1115
+ appCode: string;
1116
+ datasetCode?: string;
1117
+ pageId?: number;
1118
+ flowJson: Record<string, unknown>;
1119
+ }
1120
+ /** Supported filters exposed by FlowDefQueryRequest. */
1121
+ export interface FlowDefinitionListOptions {
1122
+ flowCode?: string;
1123
+ flowName?: string;
1124
+ flowStatus?: string;
1125
+ datasetCode?: string;
1126
+ flowType?: string;
1127
+ pageNum?: number;
1128
+ pageSize?: number;
1129
+ }
1130
+ /** POST /smartapi/flow/page: list flow definitions for one app. */
1131
+ export declare function listFlowDefinitions(appCode: string, options?: FlowDefinitionListOptions): Promise<{
1132
+ items: FlowDefinition[];
1133
+ paging?: Paging;
1134
+ }>;
1135
+ /** POST /smartapi/flow/detail: read one flow definition by id and app. */
1136
+ export declare function getFlowDefinition(appCode: string, id: number): Promise<FlowDefinition>;
1137
+ /** POST /smartapi/flow/create: create a draft flow definition. */
1138
+ export declare function createFlowDefinition(input: FlowDefinitionWriteRequest): Promise<FlowDefinition>;
1139
+ /** POST /smartapi/flow/update: replace a flow definition draft. */
1140
+ export declare function updateFlowDefinition(input: FlowDefinitionWriteRequest & {
1141
+ id: number;
1142
+ }): Promise<FlowDefinition>;
1143
+ /** POST /smartapi/flow/publish: publish the current draft. */
1144
+ export declare function publishFlowDefinition(appCode: string, id: number): Promise<FlowDefinition>;
980
1145
  export type InstantApiPolicyAction = "allow" | "deny" | "route";
981
1146
  export interface InstantApiPolicyDatasetTarget {
982
1147
  datasetCode?: string | null;
983
1148
  tableName?: string | null;
984
1149
  }
1150
+ /**
1151
+ * 版本 2 规则中需要从匹配范围扣除的数据集与 API 组合。
1152
+ *
1153
+ * @author binggan
1154
+ */
1155
+ export interface InstantApiPolicyExclusion {
1156
+ datasets: InstantApiPolicyDatasetTarget[];
1157
+ apis: string[];
1158
+ }
985
1159
  export interface InstantApiPolicyRule {
986
1160
  name: string;
987
1161
  description?: string | null;
988
1162
  datasets: InstantApiPolicyDatasetTarget[];
989
1163
  apis: string[];
1164
+ excludes?: InstantApiPolicyExclusion[] | null;
990
1165
  action: InstantApiPolicyAction | string;
991
1166
  backendFunction?: string | null;
992
1167
  }