@lovrabet/rabetbase-cli 2.5.3-beta.2 → 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 (387) 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.js +1 -1
  49. package/lib/commands/bff/pull.js +1 -1
  50. package/lib/commands/bff/push.js +1 -1
  51. package/lib/commands/bff/status.js +1 -1
  52. package/lib/commands/cli-skill/index.js +1 -1
  53. package/lib/commands/cli-update.js +1 -1
  54. package/lib/commands/codegen/index.js +1 -1
  55. package/lib/commands/codegen/sdk.js +1 -1
  56. package/lib/commands/codegen/sql.js +1 -1
  57. package/lib/commands/common/app-registry.js +1 -1
  58. package/lib/commands/common/app-selector.js +1 -1
  59. package/lib/commands/common/async-task.js +1 -1
  60. package/lib/commands/common/dry-run.js +1 -1
  61. package/lib/commands/common/flags.d.ts +7 -0
  62. package/lib/commands/common/flags.js +1 -1
  63. package/lib/commands/common/local-file.js +1 -1
  64. package/lib/commands/common/validate.js +1 -1
  65. package/lib/commands/config/delete.js +1 -1
  66. package/lib/commands/config/get.js +1 -1
  67. package/lib/commands/config/index.js +1 -1
  68. package/lib/commands/config/init.js +1 -1
  69. package/lib/commands/config/list.js +1 -1
  70. package/lib/commands/config/set.js +1 -1
  71. package/lib/commands/config/shared.js +1 -1
  72. package/lib/commands/dataset/batch-design.js +1 -1
  73. package/lib/commands/dataset/business-group-update.js +1 -1
  74. package/lib/commands/dataset/business-groups.js +1 -1
  75. package/lib/commands/dataset/capability.js +1 -1
  76. package/lib/commands/dataset/cross-relation-create.d.ts +2 -0
  77. package/lib/commands/dataset/cross-relation-create.js +1 -0
  78. package/lib/commands/dataset/cross-relation-delete.d.ts +2 -0
  79. package/lib/commands/dataset/cross-relation-delete.js +1 -0
  80. package/lib/commands/dataset/cross-relation-list.d.ts +2 -0
  81. package/lib/commands/dataset/cross-relation-list.js +1 -0
  82. package/lib/commands/dataset/cross-relation-shared.d.ts +190 -0
  83. package/lib/commands/dataset/cross-relation-shared.js +1 -0
  84. package/lib/commands/dataset/cross-relation-update.d.ts +2 -0
  85. package/lib/commands/dataset/cross-relation-update.js +1 -0
  86. package/lib/commands/dataset/delete.js +1 -1
  87. package/lib/commands/dataset/detail.js +1 -1
  88. package/lib/commands/dataset/extend-update.js +1 -1
  89. package/lib/commands/dataset/field-restore.js +1 -1
  90. package/lib/commands/dataset/field-update.js +1 -1
  91. package/lib/commands/dataset/generate.js +1 -1
  92. package/lib/commands/dataset/index.js +1 -1
  93. package/lib/commands/dataset/list.js +1 -1
  94. package/lib/commands/dataset/operations.js +1 -1
  95. package/lib/commands/dataset/relation-audit.js +1 -1
  96. package/lib/commands/dataset/relation-create.js +1 -1
  97. package/lib/commands/dataset/relation-delete.js +1 -1
  98. package/lib/commands/dataset/relation-shared.js +1 -1
  99. package/lib/commands/dataset/relation-update.js +1 -1
  100. package/lib/commands/dataset/relations.js +1 -1
  101. package/lib/commands/dataset/rename.js +1 -1
  102. package/lib/commands/dataset/restore.js +1 -1
  103. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  104. package/lib/commands/db/analysis-batching.js +1 -1
  105. package/lib/commands/db/analyze-batch-plan.js +1 -1
  106. package/lib/commands/db/analyze-cancel.js +1 -1
  107. package/lib/commands/db/analyze-start.js +1 -1
  108. package/lib/commands/db/analyze-status.js +1 -1
  109. package/lib/commands/db/create.js +1 -1
  110. package/lib/commands/db/delete.js +1 -1
  111. package/lib/commands/db/detail.js +1 -1
  112. package/lib/commands/db/diff-refresh-start.js +1 -1
  113. package/lib/commands/db/diff-refresh-status.js +1 -1
  114. package/lib/commands/db/diff.js +1 -1
  115. package/lib/commands/db/index.js +1 -1
  116. package/lib/commands/db/list.js +1 -1
  117. package/lib/commands/db/shared.js +1 -1
  118. package/lib/commands/db/table-diff-shared.js +1 -1
  119. package/lib/commands/db/tables.js +1 -1
  120. package/lib/commands/db/test.js +1 -1
  121. package/lib/commands/db/update.js +1 -1
  122. package/lib/commands/deployment/index.js +1 -1
  123. package/lib/commands/deployment/sync-all.js +1 -1
  124. package/lib/commands/deployment/sync-jobs.js +1 -1
  125. package/lib/commands/deployment/sync-status.js +1 -1
  126. package/lib/commands/doctor.js +1 -1
  127. package/lib/commands/file/index.js +1 -1
  128. package/lib/commands/flow/create.js +1 -1
  129. package/lib/commands/flow/detail.js +1 -1
  130. package/lib/commands/flow/index.js +1 -1
  131. package/lib/commands/flow/list.js +1 -1
  132. package/lib/commands/flow/publish.js +1 -1
  133. package/lib/commands/flow/runtime-resources-shared.js +1 -1
  134. package/lib/commands/flow/runtime-role-list.js +1 -1
  135. package/lib/commands/flow/runtime-role-user-list.js +1 -1
  136. package/lib/commands/flow/runtime-user-search.js +1 -1
  137. package/lib/commands/flow/shared.js +1 -1
  138. package/lib/commands/flow/update.js +1 -1
  139. package/lib/commands/flow/validate.js +1 -1
  140. package/lib/commands/instant-api-policy/current.js +1 -1
  141. package/lib/commands/instant-api-policy/index.js +1 -1
  142. package/lib/commands/instant-api-policy/init.js +1 -1
  143. package/lib/commands/instant-api-policy/publish.js +1 -1
  144. package/lib/commands/instant-api-policy/pull.js +1 -1
  145. package/lib/commands/instant-api-policy/revision.js +1 -1
  146. package/lib/commands/instant-api-policy/revisions.js +1 -1
  147. package/lib/commands/instant-api-policy/rollback.js +1 -1
  148. package/lib/commands/instant-api-policy/shared.js +1 -1
  149. package/lib/commands/instant-api-policy/validate.js +1 -1
  150. package/lib/commands/issue/index.js +1 -1
  151. package/lib/commands/issue/nudge.js +1 -1
  152. package/lib/commands/issue/report.js +1 -1
  153. package/lib/commands/issue/shared.js +1 -1
  154. package/lib/commands/kb/create.js +1 -1
  155. package/lib/commands/kb/delete.js +1 -1
  156. package/lib/commands/kb/detail.js +1 -1
  157. package/lib/commands/kb/index.js +1 -1
  158. package/lib/commands/kb/list.js +1 -1
  159. package/lib/commands/kb/search.js +1 -1
  160. package/lib/commands/kb/shared.js +1 -1
  161. package/lib/commands/kb/update.js +1 -1
  162. package/lib/commands/logs/index.js +1 -1
  163. package/lib/commands/menu/asset-update.js +1 -1
  164. package/lib/commands/menu/delete.js +1 -1
  165. package/lib/commands/menu/external-link-create.js +1 -1
  166. package/lib/commands/menu/external-link-update.js +1 -1
  167. package/lib/commands/menu/group-create.js +1 -1
  168. package/lib/commands/menu/group-update.js +1 -1
  169. package/lib/commands/menu/index.js +1 -1
  170. package/lib/commands/menu/list.js +1 -1
  171. package/lib/commands/menu/move.js +1 -1
  172. package/lib/commands/menu/regroup-start.js +1 -1
  173. package/lib/commands/menu/rename.js +1 -1
  174. package/lib/commands/menu/shared/compare-table.js +1 -1
  175. package/lib/commands/menu/shared/delete-plan.js +1 -1
  176. package/lib/commands/menu/shared/facts.js +1 -1
  177. package/lib/commands/menu/shared/index.js +1 -1
  178. package/lib/commands/menu/shared/inquirer.js +1 -1
  179. package/lib/commands/menu/shared/local-pages.js +1 -1
  180. package/lib/commands/menu/shared/logic.js +1 -1
  181. package/lib/commands/menu/shared/mutations.js +1 -1
  182. package/lib/commands/menu/shared/service.js +1 -1
  183. package/lib/commands/menu/shared/sync-core.js +1 -1
  184. package/lib/commands/menu/shared/update-core.js +1 -1
  185. package/lib/commands/menu/shared/valid-url.js +1 -1
  186. package/lib/commands/menu/sync.js +1 -1
  187. package/lib/commands/menu/visibility-update.js +1 -1
  188. package/lib/commands/notification/config-create.js +1 -1
  189. package/lib/commands/notification/config-delete.js +1 -1
  190. package/lib/commands/notification/config-list.js +1 -1
  191. package/lib/commands/notification/config-update.js +1 -1
  192. package/lib/commands/notification/index.js +1 -1
  193. package/lib/commands/notification/shared.js +1 -1
  194. package/lib/commands/ocr/index.js +1 -1
  195. package/lib/commands/page/create.js +1 -1
  196. package/lib/commands/page/custom/detail.js +1 -1
  197. package/lib/commands/page/custom/list.js +1 -1
  198. package/lib/commands/page/custom/publish.js +1 -1
  199. package/lib/commands/page/custom/shared.js +1 -1
  200. package/lib/commands/page/custom/syntax.js +1 -1
  201. package/lib/commands/page/custom/update.js +1 -1
  202. package/lib/commands/page/data-list-status.js +1 -1
  203. package/lib/commands/page/generate-start.js +1 -1
  204. package/lib/commands/page/generate-status.js +1 -1
  205. package/lib/commands/page/index.js +1 -1
  206. package/lib/commands/page/pull.js +1 -1
  207. package/lib/commands/page/push.js +1 -1
  208. package/lib/commands/page/relation-audit.js +1 -1
  209. package/lib/commands/page/restore.js +1 -1
  210. package/lib/commands/page/shared.js +1 -1
  211. package/lib/commands/page/sync.js +1 -1
  212. package/lib/commands/project/api-architecture-upgrade.d.ts +28 -0
  213. package/lib/commands/project/api-architecture-upgrade.js +1 -0
  214. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  215. package/lib/commands/project/create/format-elapsed.js +1 -1
  216. package/lib/commands/project/create/main.js +1 -1
  217. package/lib/commands/project/create/materialize-project-template.js +1 -1
  218. package/lib/commands/project/create/project-name.js +1 -1
  219. package/lib/commands/project/create/project-template-archive.js +1 -1
  220. package/lib/commands/project/create/project-template-path.js +1 -1
  221. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  222. package/lib/commands/project/create/use-format-code.js +1 -1
  223. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  224. package/lib/commands/project/domain-routing-sync.js +1 -1
  225. package/lib/commands/project/index.js +1 -1
  226. package/lib/commands/project/upgrade.d.ts +30 -1
  227. package/lib/commands/project/upgrade.js +1 -1
  228. package/lib/commands/registry.js +1 -1
  229. package/lib/commands/role/delete.js +1 -1
  230. package/lib/commands/role/detail.js +1 -1
  231. package/lib/commands/role/index.js +1 -1
  232. package/lib/commands/role/list.js +1 -1
  233. package/lib/commands/role/shared.js +1 -1
  234. package/lib/commands/role/update.js +1 -1
  235. package/lib/commands/role/user-add.js +1 -1
  236. package/lib/commands/role/user-remove.js +1 -1
  237. package/lib/commands/role/user-resolve.js +1 -1
  238. package/lib/commands/rule/get.js +1 -1
  239. package/lib/commands/rule/index.js +1 -1
  240. package/lib/commands/rule/list.js +1 -1
  241. package/lib/commands/rule/set.js +1 -1
  242. package/lib/commands/rule/shared.js +1 -1
  243. package/lib/commands/run/index.js +1 -1
  244. package/lib/commands/schema.js +1 -1
  245. package/lib/commands/sql/create.js +1 -1
  246. package/lib/commands/sql/delete.js +1 -1
  247. package/lib/commands/sql/detail.js +1 -1
  248. package/lib/commands/sql/exec.js +1 -1
  249. package/lib/commands/sql/index.js +1 -1
  250. package/lib/commands/sql/list.js +1 -1
  251. package/lib/commands/sql/pull.js +1 -1
  252. package/lib/commands/sql/push.js +1 -1
  253. package/lib/commands/sql/shared.js +1 -1
  254. package/lib/commands/sql/status.js +1 -1
  255. package/lib/commands/sql/validate.js +1 -1
  256. package/lib/commands/task/index.js +1 -1
  257. package/lib/commands/task/status.js +1 -1
  258. package/lib/commands/tenant/index.js +1 -1
  259. package/lib/commands/tenant/members-list.js +1 -1
  260. package/lib/commands/tenant/shared.js +1 -1
  261. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  262. package/lib/commands/user-account/index.js +1 -1
  263. package/lib/commands/workspace/add.js +1 -1
  264. package/lib/commands/workspace/index.js +1 -1
  265. package/lib/commands/workspace/remove.js +1 -1
  266. package/lib/config/domain-config.js +1 -1
  267. package/lib/config/project-domain-routing.js +1 -1
  268. package/lib/config/region-config.js +1 -1
  269. package/lib/config/schema.js +1 -1
  270. package/lib/constant/cdn.js +1 -1
  271. package/lib/constant/cli.js +1 -1
  272. package/lib/constant/defaults.js +1 -1
  273. package/lib/constant/domain.js +1 -1
  274. package/lib/constant/env.js +1 -1
  275. package/lib/constant/output.js +1 -1
  276. package/lib/constant/paths.js +1 -1
  277. package/lib/constant/region.js +1 -1
  278. package/lib/constant/risk.js +1 -1
  279. package/lib/constant/routing-profile.js +1 -1
  280. package/lib/context/app-resolver.d.ts +2 -0
  281. package/lib/context/app-resolver.js +1 -1
  282. package/lib/context/auth-resolver.js +1 -1
  283. package/lib/context/config-loader.js +1 -1
  284. package/lib/context.d.ts +2 -1
  285. package/lib/context.js +1 -1
  286. package/lib/core/alias-resolver.d.ts +13 -17
  287. package/lib/core/alias-resolver.js +1 -1
  288. package/lib/core/api-client.d.ts +6 -0
  289. package/lib/core/api-client.js +1 -1
  290. package/lib/core/bff/config.js +1 -1
  291. package/lib/core/bff/file-system.js +1 -1
  292. package/lib/core/bff/hash.js +1 -1
  293. package/lib/core/bff/hook-directory.js +1 -1
  294. package/lib/core/bff/lock.js +1 -1
  295. package/lib/core/bff/utils.js +1 -1
  296. package/lib/core/cross-db-relation.d.ts +41 -0
  297. package/lib/core/cross-db-relation.js +1 -0
  298. package/lib/core/db-resolver.js +1 -1
  299. package/lib/core/flow-config.js +1 -1
  300. package/lib/core/instant-api-policy/config.js +1 -1
  301. package/lib/core/kb-search-client.js +1 -1
  302. package/lib/core/page/file-system.js +1 -1
  303. package/lib/core/page/hash.js +1 -1
  304. package/lib/core/page/lock.js +1 -1
  305. package/lib/core/page/lr-smart-jsx.js +1 -1
  306. package/lib/core/sql-index-auditor.js +1 -1
  307. package/lib/core/sql-sync/config.js +1 -1
  308. package/lib/core/sql-sync/file-system.js +1 -1
  309. package/lib/core/sql-sync/hash.js +1 -1
  310. package/lib/core/sql-sync/lock.js +1 -1
  311. package/lib/core/sql-sync/utils.js +1 -1
  312. package/lib/core/sql-validator.js +1 -1
  313. package/lib/errors.js +1 -1
  314. package/lib/framework/build-all-flags.js +1 -1
  315. package/lib/framework/error-output.js +1 -1
  316. package/lib/framework/explicit-yes.js +1 -1
  317. package/lib/framework/flags.js +1 -1
  318. package/lib/framework/help.js +1 -1
  319. package/lib/framework/index.js +1 -1
  320. package/lib/framework/output.js +1 -1
  321. package/lib/framework/response.js +1 -1
  322. package/lib/framework/runner-alias.d.ts +1 -1
  323. package/lib/framework/runner-alias.js +1 -1
  324. package/lib/framework/runner.js +1 -1
  325. package/lib/framework/schema-export.js +1 -1
  326. package/lib/framework/supported-flags.js +1 -1
  327. package/lib/framework/types.js +1 -1
  328. package/lib/generated/build-info.d.ts +4 -4
  329. package/lib/generated/build-info.js +1 -1
  330. package/lib/generated/official-routing.js +1 -1
  331. package/lib/generated/routing-contract.js +1 -1
  332. package/lib/help.js +1 -1
  333. package/lib/postinstall.js +1 -1
  334. package/lib/runtime/confirmation.js +1 -1
  335. package/lib/runtime/event.js +1 -1
  336. package/lib/runtime/index.js +1 -1
  337. package/lib/runtime/queue.js +1 -1
  338. package/lib/runtime/resolve.js +1 -1
  339. package/lib/skills/builtin-skill.js +1 -1
  340. package/lib/skills/main.js +1 -1
  341. package/lib/skills/npx-skills-add.d.ts +0 -10
  342. package/lib/skills/npx-skills-add.js +1 -1
  343. package/lib/skills/skill-presence.js +1 -1
  344. package/lib/telemetry/cli-command-trace.js +1 -1
  345. package/lib/telemetry/cli-help-trace.js +1 -1
  346. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  347. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  348. package/lib/telemetry/send-cli-trace-log.js +1 -1
  349. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  350. package/lib/types/index.d.ts +11 -1
  351. package/lib/utils/ai_config.js +1 -1
  352. package/lib/utils/apply-jq-filter.js +1 -1
  353. package/lib/utils/cdn-config.js +1 -1
  354. package/lib/utils/check-sdk-version.js +1 -1
  355. package/lib/utils/cli-version-check.js +1 -1
  356. package/lib/utils/cli-version-policy.d.ts +12 -0
  357. package/lib/utils/cli-version-policy.js +1 -1
  358. package/lib/utils/config.js +1 -1
  359. package/lib/utils/entity-with-id.js +1 -1
  360. package/lib/utils/file-utils.js +1 -1
  361. package/lib/utils/guides-cdn.js +1 -1
  362. package/lib/utils/http-client.js +1 -1
  363. package/lib/utils/is-non-interactive.js +1 -1
  364. package/lib/utils/logger.js +1 -1
  365. package/lib/utils/params.js +1 -1
  366. package/lib/utils/platform.js +1 -1
  367. package/lib/utils/sleep.js +1 -1
  368. package/lib/utils/template-replacer.js +1 -1
  369. package/lib/utils/update-notice.js +1 -1
  370. package/lib/utils/version.js +1 -1
  371. package/lib/utils/with-active-cookie.js +1 -1
  372. package/lib/utils/write-cli-side-channel.js +1 -1
  373. package/package.json +4 -1
  374. package/skills/rabetbase/SKILL.md +10 -6
  375. package/skills/rabetbase/guides/sdk-client-generation.md +112 -61
  376. package/skills/rabetbase/guides/typescript-sdk.md +9 -0
  377. package/skills/rabetbase/references/rabetbase-api-pull.md +30 -19
  378. package/skills/rabetbase/references/rabetbase-app-list.md +1 -1
  379. package/skills/rabetbase/references/rabetbase-config.md +2 -1
  380. package/skills/rabetbase/references/rabetbase-dataset-cross-relations.md +60 -0
  381. package/skills/rabetbase/references/rabetbase-project-create.md +3 -3
  382. package/skills/rabetbase/references/rabetbase-project-upgrade.md +24 -13
  383. package/skills/rabetbase.manifest.json +4 -3
  384. package/templates/README.md +16 -4
  385. package/templates/generate-api/model-runtime.ts.tpl +101 -0
  386. package/templates/generate-api/profile-api.ts.tpl +21 -0
  387. package/templates/generate-api/profile-client.ts.tpl +14 -0
@@ -1 +1 @@
1
- const a261_0x22e67d=a261_0x5a8f;function a261_0x5a8f(_0x303494,_0x37e476){_0x303494=_0x303494-0x152;const _0x178051=a261_0x1780();let _0x5a8fa1=_0x178051[_0x303494];return _0x5a8fa1;}(function(_0x2022da,_0x2e92b6){const _0x3676f5=a261_0x5a8f,_0x46886d=_0x2022da();while(!![]){try{const _0x4f0054=parseInt(_0x3676f5(0x159))/0x1*(-parseInt(_0x3676f5(0x15e))/0x2)+-parseInt(_0x3676f5(0x158))/0x3+parseInt(_0x3676f5(0x15f))/0x4*(-parseInt(_0x3676f5(0x155))/0x5)+-parseInt(_0x3676f5(0x15d))/0x6+-parseInt(_0x3676f5(0x160))/0x7+-parseInt(_0x3676f5(0x156))/0x8*(parseInt(_0x3676f5(0x157))/0x9)+parseInt(_0x3676f5(0x153))/0xa;if(_0x4f0054===_0x2e92b6)break;else _0x46886d['push'](_0x46886d['shift']());}catch(_0x571018){_0x46886d['push'](_0x46886d['shift']());}}}(a261_0x1780,0xdb782));import{resolve}from'node:path';function a261_0x1780(){const _0x31de91=['2GTfFGE','25332Arepyu','9339155kuIIyS','/bff','66095490bRZEGq','bff-trash','890XzSnVi','56OZsXQl','947709IUkCym','4587453OHEaDT','357013aAUivb','bff.lock.json','bff','.rabetbase','3755358xaiNlb'];a261_0x1780=function(){return _0x31de91;};return a261_0x1780();}import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a261_0x22e67d(0x15c),LOCK_FILE_NAME=a261_0x22e67d(0x15a),TRASH_DIR_NAME=a261_0x22e67d(0x154);export function loadBffProjectConfig(_0x36d51a,_0x548dad){const _0x188ad1=a261_0x22e67d,_0x4b6789=resolve(_0x548dad??findProjectRootDirectory()),_0x31044d=DOT_DIR+_0x188ad1(0x152),_0x280300=_0x31044d+'/'+_0x36d51a;return{'projectRoot':_0x4b6789,'appCode':_0x36d51a,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x31044d,'scriptsRoot':_0x280300,'scriptsRootDir':resolve(_0x4b6789,DOT_DIR,_0x188ad1(0x15b),_0x36d51a),'lockFilePath':resolve(_0x4b6789,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x4b6789,DOT_DIR,TRASH_DIR_NAME)};}
1
+ const a272_0x50a5cf=a272_0x2630;(function(_0x2e41fc,_0x9bbd3d){const _0xa954cb=a272_0x2630,_0x1ef5f1=_0x2e41fc();while(!![]){try{const _0x4ace9c=-parseInt(_0xa954cb(0xaa))/0x1+parseInt(_0xa954cb(0xa4))/0x2*(parseInt(_0xa954cb(0xab))/0x3)+parseInt(_0xa954cb(0xa2))/0x4+parseInt(_0xa954cb(0xac))/0x5+-parseInt(_0xa954cb(0xad))/0x6+-parseInt(_0xa954cb(0xa6))/0x7*(-parseInt(_0xa954cb(0xa9))/0x8)+parseInt(_0xa954cb(0xa8))/0x9;if(_0x4ace9c===_0x9bbd3d)break;else _0x1ef5f1['push'](_0x1ef5f1['shift']());}catch(_0xc8d244){_0x1ef5f1['push'](_0x1ef5f1['shift']());}}}(a272_0x5a8d,0x62187));function a272_0x5a8d(){const _0x49115c=['2870360zbdVjf','4186692PEVtuG','bff-trash','bff.lock.json','49404jTYyGs','bff','2388yMMTUy','/bff','780647uzQeGj','.rabetbase','1309419wyUkwI','24mQhbiK','51670TrBHUM','213pQaXwi'];a272_0x5a8d=function(){return _0x49115c;};return a272_0x5a8d();}function a272_0x2630(_0x40a0f7,_0xf2347d){_0x40a0f7=_0x40a0f7-0xa0;const _0x5a8de5=a272_0x5a8d();let _0x263016=_0x5a8de5[_0x40a0f7];return _0x263016;}import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a272_0x50a5cf(0xa7),LOCK_FILE_NAME=a272_0x50a5cf(0xa1),TRASH_DIR_NAME=a272_0x50a5cf(0xa0);export function loadBffProjectConfig(_0x43f45d,_0x3c5ed7){const _0x4c864a=a272_0x50a5cf,_0x4421e1=resolve(_0x3c5ed7??findProjectRootDirectory()),_0x1ca62d=DOT_DIR+_0x4c864a(0xa5),_0x473055=_0x1ca62d+'/'+_0x43f45d;return{'projectRoot':_0x4421e1,'appCode':_0x43f45d,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x1ca62d,'scriptsRoot':_0x473055,'scriptsRootDir':resolve(_0x4421e1,DOT_DIR,_0x4c864a(0xa3),_0x43f45d),'lockFilePath':resolve(_0x4421e1,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x4421e1,DOT_DIR,TRASH_DIR_NAME)};}
@@ -1 +1 @@
1
- const a262_0x2c27f7=a262_0x2870;(function(_0x20994f,_0x37bc81){const _0x136827=a262_0x2870,_0x1229a1=_0x20994f();while(!![]){try{const _0x2bda79=-parseInt(_0x136827(0x176))/0x1*(-parseInt(_0x136827(0x163))/0x2)+parseInt(_0x136827(0x17b))/0x3+parseInt(_0x136827(0x178))/0x4*(-parseInt(_0x136827(0x15b))/0x5)+-parseInt(_0x136827(0x162))/0x6*(parseInt(_0x136827(0x184))/0x7)+parseInt(_0x136827(0x170))/0x8+parseInt(_0x136827(0x16b))/0x9+-parseInt(_0x136827(0x15a))/0xa;if(_0x2bda79===_0x37bc81)break;else _0x1229a1['push'](_0x1229a1['shift']());}catch(_0x4b0a55){_0x1229a1['push'](_0x1229a1['shift']());}}}(a262_0x2948,0x3edbc));import{access,mkdir,readdir,stat}from'node:fs/promises';import{constants}from'node:fs';import{dirname,join,resolve,sep}from'node:path';import{findHookLocationByRemoteId,snakeToCamel}from'../../core/bff/utils.js';export const SUPPORTED_BFF_TYPES=['COMMON','ENDPOINT',a262_0x2c27f7(0x164)];export function normalizeBffType(_0x683656){const _0xae6aab=a262_0x2c27f7;if(!_0x683656)return undefined;const _0x62732a=_0x683656['trim']()[_0xae6aab(0x17c)]();return SUPPORTED_BFF_TYPES[_0xae6aab(0x16a)](_0x62732a)?_0x62732a:undefined;}function a262_0x2870(_0x58515f,_0x1e19e9){_0x58515f=_0x58515f-0x15a;const _0x2948f1=a262_0x2948();let _0x2870fc=_0x2948f1[_0x58515f];return _0x2870fc;}async function scanJsFilesRecursively(_0x867fe9,_0xe142b1){const _0x5df231=a262_0x2c27f7,_0x59a251=[];try{const _0x41f4d2=await readdir(_0x867fe9,{'withFileTypes':!![]});for(const _0x598d1c of _0x41f4d2){const _0x5050bd=join(_0x867fe9,_0x598d1c[_0x5df231(0x167)]);if(_0x598d1c['isDirectory']())_0x59a251[_0x5df231(0x15f)](...await scanJsFilesRecursively(_0x5050bd,_0xe142b1+'/'+_0x598d1c[_0x5df231(0x167)]));else _0x598d1c[_0x5df231(0x180)]()&&_0x598d1c[_0x5df231(0x167)][_0x5df231(0x16d)](_0x5df231(0x17d))&&_0x59a251[_0x5df231(0x15f)]({'lockKey':_0xe142b1+'/'+_0x598d1c[_0x5df231(0x167)]['replace'](/\.js$/,''),'filePath':_0x5050bd});}}catch(_0x11b1e2){if(_0x11b1e2[_0x5df231(0x181)]!==_0x5df231(0x17a))throw _0x11b1e2;}return _0x59a251;}async function scanFlatFunctions(_0x5c62a3,_0x25965b){const _0x4cdc4d=join(_0x5c62a3['scriptsRootDir'],_0x25965b),_0x5c6a14=await scanJsFilesRecursively(_0x4cdc4d,_0x25965b);return _0x5c6a14['map'](({lockKey:_0x3a0903,filePath:_0x270e5b})=>({'type':_0x25965b,'name':_0x3a0903['split']('/')['at'](-0x1)??'','filePath':_0x270e5b,'lockKey':_0x3a0903}));}async function scanHookFunctions(_0x84a3fc){const _0x20388d=a262_0x2c27f7,_0x32443b=join(_0x84a3fc[_0x20388d(0x15c)],_0x20388d(0x164)),_0x3af530=[];try{const _0x571eda=await readdir(_0x32443b,{'withFileTypes':!![]});for(const _0x27e8de of _0x571eda){if(!_0x27e8de[_0x20388d(0x177)]())continue;const _0xb8c9a9=_0x27e8de[_0x20388d(0x167)],_0x11c2c8=join(_0x32443b,_0xb8c9a9),_0x562c7c=await readdir(_0x11c2c8,{'withFileTypes':!![]});for(const _0x17f04d of _0x562c7c){if(!_0x17f04d[_0x20388d(0x177)]())continue;const _0x13ff58=_0x17f04d['name'],_0x735944=join(_0x11c2c8,_0x13ff58),_0x90f91d=await readdir(_0x735944,{'withFileTypes':!![]});for(const _0x617892 of _0x90f91d){if(!_0x617892[_0x20388d(0x177)]())continue;const _0x38902c=_0x617892[_0x20388d(0x167)],_0x38d352=join(_0x735944,_0x38902c),_0x5c244d=await readdir(_0x38d352,{'withFileTypes':!![]});for(const _0x401699 of _0x5c244d){if(!_0x401699['isFile']()||!_0x401699[_0x20388d(0x167)][_0x20388d(0x16d)](_0x20388d(0x17d)))continue;const _0x36f663=_0x401699[_0x20388d(0x167)]['replace'](/\.js$/,'');_0x3af530[_0x20388d(0x15f)]({'type':_0x20388d(0x164),'name':_0x36f663,'filePath':join(_0x38d352,_0x401699['name']),'lockKey':_0x20388d(0x175)+_0xb8c9a9+'/'+_0x13ff58+'/'+_0x38902c+'/'+_0x36f663,'alias':_0xb8c9a9,'operationType':_0x13ff58,'functionNode':_0x38902c});}}}}}catch(_0x266371){if(_0x266371['code']!==_0x20388d(0x17a))throw _0x266371;}return _0x3af530;}export async function scanLocalBffFunctions(_0x2d36cd,_0x22613e){const _0x70547a=a262_0x2c27f7;if(_0x22613e===_0x70547a(0x183)||_0x22613e==='ENDPOINT')return scanFlatFunctions(_0x2d36cd,_0x22613e);if(_0x22613e===_0x70547a(0x164))return scanHookFunctions(_0x2d36cd);const [_0x14545e,_0x498b96,_0x468ee8]=await Promise['all']([scanFlatFunctions(_0x2d36cd,'COMMON'),scanFlatFunctions(_0x2d36cd,_0x70547a(0x161)),scanHookFunctions(_0x2d36cd)]);return[..._0x14545e,..._0x498b96,..._0x468ee8];}const SAFE_LOCK_KEY_SEGMENT=/^[A-Za-z0-9_$.-]+$/;export function isSafeLockKeySegment(_0x15babc){const _0x57014a=a262_0x2c27f7;return SAFE_LOCK_KEY_SEGMENT[_0x57014a(0x15d)](_0x15babc)&&_0x15babc!=='.'&&_0x15babc!=='..';}export function resolveLocalFilePathFromLockKey(_0x3caba7,_0x5c8b1c){const _0x3a506b=a262_0x2c27f7,_0x2ed1ce=_0x5c8b1c[_0x3a506b(0x166)]('/');if(!_0x2ed1ce['every'](isSafeLockKeySegment))throw new Error('Unsafe\x20Backend\x20Function\x20lock\x20key\x20(traversal\x20or\x20invalid\x20segment):\x20'+_0x5c8b1c);const _0x3ee497=resolve(join(_0x3caba7[_0x3a506b(0x15c)],..._0x2ed1ce)+_0x3a506b(0x17d)),_0x3f630f=resolve(_0x3caba7[_0x3a506b(0x15c)]);if(_0x3ee497!==_0x3f630f&&!_0x3ee497[_0x3a506b(0x17f)](_0x3f630f+sep))throw new Error(_0x3a506b(0x168)+_0x3ee497);return _0x3ee497;}export function createHookLocationMap(_0x65bcba){const _0x5c7b2e=a262_0x2c27f7,_0x28ea90=new Map();for(const _0x20ead8 of _0x65bcba){_0x20ead8[_0x5c7b2e(0x165)]&&_0x28ea90['set'](_0x20ead8[_0x5c7b2e(0x165)],{'datasetCode':_0x20ead8['datasetCode'],'operationType':snakeToCamel(_0x20ead8[_0x5c7b2e(0x15e)]),'functionNode':_0x5c7b2e(0x16f)}),_0x20ead8[_0x5c7b2e(0x16e)]&&_0x28ea90[_0x5c7b2e(0x169)](_0x20ead8[_0x5c7b2e(0x16e)],{'datasetCode':_0x20ead8[_0x5c7b2e(0x16c)],'operationType':snakeToCamel(_0x20ead8[_0x5c7b2e(0x15e)]),'functionNode':_0x5c7b2e(0x17e)});}return _0x28ea90;}export function resolveRemoteScriptTarget(_0xe94af6,_0x497ae1,_0x3dc93f,_0x58777d,_0x5af3bf){const _0x15fe75=a262_0x2c27f7,_0x44ebce=normalizeBffType(_0x497ae1[_0x15fe75(0x179)]);if(!_0x44ebce||!_0x497ae1[_0x15fe75(0x160)])return null;if(_0x44ebce===_0x15fe75(0x164)){const _0x469b48=_0x497ae1['id']?_0x3dc93f[_0x15fe75(0x174)](_0x497ae1['id']):undefined,_0x2e0456=findHookLocationByRemoteId(_0x58777d,_0x497ae1['id']),_0x46e786=_0x469b48?{..._0x2e0456?.[_0x15fe75(0x16c)]===_0x469b48[_0x15fe75(0x16c)]?_0x2e0456:{},..._0x469b48}:_0x2e0456;if(!_0x46e786)return null;const _0x1d4cd7=_0x5af3bf[_0x15fe75(0x174)](_0x46e786['datasetCode'][_0x15fe75(0x173)]()),_0x549eb6=_0x1d4cd7??_0x46e786[_0x15fe75(0x16c)],_0x2246f3={..._0x46e786,'alias':_0x1d4cd7},_0x11cd4b=_0x15fe75(0x175)+_0x549eb6+'/'+_0x2246f3['operationType']+'/'+_0x2246f3[_0x15fe75(0x172)]+'/'+_0x497ae1[_0x15fe75(0x160)];if(!_0x11cd4b[_0x15fe75(0x166)]('/')[_0x15fe75(0x171)](isSafeLockKeySegment))return null;return{'lockKey':_0x11cd4b,'filePath':resolveLocalFilePathFromLockKey(_0xe94af6,_0x11cd4b),'type':_0x15fe75(0x164),'hookLocation':_0x2246f3};}const _0x23b2b4=_0x44ebce+'/'+_0x497ae1[_0x15fe75(0x160)];if(!_0x23b2b4[_0x15fe75(0x166)]('/')['every'](isSafeLockKeySegment))return null;return{'lockKey':_0x23b2b4,'filePath':resolveLocalFilePathFromLockKey(_0xe94af6,_0x23b2b4),'type':_0x44ebce};}export async function ensureParentDirectory(_0xbaca18){await mkdir(dirname(_0xbaca18),{'recursive':!![]});}export async function fileExists(_0x29e104){const _0x31b452=a262_0x2c27f7;try{return await access(_0x29e104,constants[_0x31b452(0x182)]),!![];}catch{return![];}}export async function directoryExists(_0x27fb36){const _0x57e055=a262_0x2c27f7;try{const _0x209547=await stat(_0x27fb36);return _0x209547[_0x57e055(0x177)]();}catch{return![];}}function a262_0x2948(){const _0x35b974=['6449680DZUvRA','1579255zaTfVE','scriptsRootDir','test','operationType','push','functionName','ENDPOINT','2490NTPjvF','10ntNFCv','HOOK','beforeScriptId','split','name','Resolved\x20Backend\x20Function\x20script\x20path\x20escapes\x20scripts\x20root:\x20','set','includes','1235034uYmsVA','datasetCode','endsWith','afterScriptId','before','3773584rPnXTJ','every','functionNode','toLowerCase','get','HOOK/','77489pLnZlY','isDirectory','4MKLEwE','scriptType','ENOENT','764109IPnCoz','toUpperCase','.js','after','startsWith','isFile','code','F_OK','COMMON','553IJyVsY'];a262_0x2948=function(){return _0x35b974;};return a262_0x2948();}
1
+ const a273_0x542a66=a273_0x4a4d;(function(_0x1c5095,_0x3d640f){const _0x591d32=a273_0x4a4d,_0x24fd83=_0x1c5095();while(!![]){try{const _0x4e876c=-parseInt(_0x591d32(0xe2))/0x1*(-parseInt(_0x591d32(0xe7))/0x2)+parseInt(_0x591d32(0xdc))/0x3*(-parseInt(_0x591d32(0xd8))/0x4)+parseInt(_0x591d32(0xdd))/0x5+parseInt(_0x591d32(0xd2))/0x6*(-parseInt(_0x591d32(0xef))/0x7)+-parseInt(_0x591d32(0xf4))/0x8+-parseInt(_0x591d32(0xea))/0x9*(parseInt(_0x591d32(0xd6))/0xa)+parseInt(_0x591d32(0xcc))/0xb*(parseInt(_0x591d32(0xed))/0xc);if(_0x4e876c===_0x3d640f)break;else _0x24fd83['push'](_0x24fd83['shift']());}catch(_0x20f7bb){_0x24fd83['push'](_0x24fd83['shift']());}}}(a273_0x365b,0x1c94f));import{access,mkdir,readdir,stat}from'node:fs/promises';import{constants}from'node:fs';import{dirname,join,resolve,sep}from'node:path';import{findHookLocationByRemoteId,snakeToCamel}from'../../core/bff/utils.js';export const SUPPORTED_BFF_TYPES=[a273_0x542a66(0xe9),a273_0x542a66(0xd0),a273_0x542a66(0xc7)];export function normalizeBffType(_0x49f6cd){const _0x58ceb3=a273_0x542a66;if(!_0x49f6cd)return undefined;const _0x4db017=_0x49f6cd[_0x58ceb3(0xdb)]()[_0x58ceb3(0xf3)]();return SUPPORTED_BFF_TYPES[_0x58ceb3(0xee)](_0x4db017)?_0x4db017:undefined;}function a273_0x4a4d(_0x58e3d0,_0xe4f429){_0x58e3d0=_0x58e3d0-0xc5;const _0x365b64=a273_0x365b();let _0x4a4da4=_0x365b64[_0x58e3d0];return _0x4a4da4;}async function scanJsFilesRecursively(_0x307e7e,_0x27ad0b){const _0x46d6ed=a273_0x542a66,_0x10897a=[];try{const _0x493625=await readdir(_0x307e7e,{'withFileTypes':!![]});for(const _0x3254ca of _0x493625){const _0x4814e9=join(_0x307e7e,_0x3254ca[_0x46d6ed(0xe1)]);if(_0x3254ca[_0x46d6ed(0xec)]())_0x10897a['push'](...await scanJsFilesRecursively(_0x4814e9,_0x27ad0b+'/'+_0x3254ca[_0x46d6ed(0xe1)]));else _0x3254ca['isFile']()&&_0x3254ca[_0x46d6ed(0xe1)][_0x46d6ed(0xe5)](_0x46d6ed(0xca))&&_0x10897a[_0x46d6ed(0xe4)]({'lockKey':_0x27ad0b+'/'+_0x3254ca[_0x46d6ed(0xe1)][_0x46d6ed(0xd4)](/\.js$/,''),'filePath':_0x4814e9});}}catch(_0x2ba4ea){if(_0x2ba4ea['code']!==_0x46d6ed(0xde))throw _0x2ba4ea;}return _0x10897a;}async function scanFlatFunctions(_0x5bb707,_0x3ba5d2){const _0x5f0d0f=a273_0x542a66,_0x5bce5b=join(_0x5bb707[_0x5f0d0f(0xd3)],_0x3ba5d2),_0x4d8e84=await scanJsFilesRecursively(_0x5bce5b,_0x3ba5d2);return _0x4d8e84[_0x5f0d0f(0xd9)](({lockKey:_0x49b8f4,filePath:_0x3bf3c2})=>({'type':_0x3ba5d2,'name':_0x49b8f4[_0x5f0d0f(0xc6)]('/')['at'](-0x1)??'','filePath':_0x3bf3c2,'lockKey':_0x49b8f4}));}async function scanHookFunctions(_0x4f659b){const _0x5b0d28=a273_0x542a66,_0x336b1e=join(_0x4f659b[_0x5b0d28(0xd3)],_0x5b0d28(0xc7)),_0x2c8289=[];try{const _0x3f71bf=await readdir(_0x336b1e,{'withFileTypes':!![]});for(const _0x166b83 of _0x3f71bf){if(!_0x166b83[_0x5b0d28(0xec)]())continue;const _0x537533=_0x166b83[_0x5b0d28(0xe1)],_0x21039b=join(_0x336b1e,_0x537533),_0x12777b=await readdir(_0x21039b,{'withFileTypes':!![]});for(const _0x15fdd3 of _0x12777b){if(!_0x15fdd3[_0x5b0d28(0xec)]())continue;const _0x19f41f=_0x15fdd3[_0x5b0d28(0xe1)],_0x101823=join(_0x21039b,_0x19f41f),_0x143cfa=await readdir(_0x101823,{'withFileTypes':!![]});for(const _0x13ab04 of _0x143cfa){if(!_0x13ab04[_0x5b0d28(0xec)]())continue;const _0x525f1d=_0x13ab04[_0x5b0d28(0xe1)],_0x733f51=join(_0x101823,_0x525f1d),_0x3f78d2=await readdir(_0x733f51,{'withFileTypes':!![]});for(const _0x2149c2 of _0x3f78d2){if(!_0x2149c2['isFile']()||!_0x2149c2[_0x5b0d28(0xe1)][_0x5b0d28(0xe5)](_0x5b0d28(0xca)))continue;const _0x1abae2=_0x2149c2[_0x5b0d28(0xe1)][_0x5b0d28(0xd4)](/\.js$/,'');_0x2c8289['push']({'type':_0x5b0d28(0xc7),'name':_0x1abae2,'filePath':join(_0x733f51,_0x2149c2[_0x5b0d28(0xe1)]),'lockKey':_0x5b0d28(0xc9)+_0x537533+'/'+_0x19f41f+'/'+_0x525f1d+'/'+_0x1abae2,'alias':_0x537533,'operationType':_0x19f41f,'functionNode':_0x525f1d});}}}}}catch(_0x1aaeea){if(_0x1aaeea[_0x5b0d28(0xe6)]!==_0x5b0d28(0xde))throw _0x1aaeea;}return _0x2c8289;}export async function scanLocalBffFunctions(_0x13ebb0,_0x3ee8c2){const _0x89e125=a273_0x542a66;if(_0x3ee8c2===_0x89e125(0xe9)||_0x3ee8c2===_0x89e125(0xd0))return scanFlatFunctions(_0x13ebb0,_0x3ee8c2);if(_0x3ee8c2===_0x89e125(0xc7))return scanHookFunctions(_0x13ebb0);const [_0x5cc137,_0x2431a2,_0x25fa9d]=await Promise[_0x89e125(0xda)]([scanFlatFunctions(_0x13ebb0,_0x89e125(0xe9)),scanFlatFunctions(_0x13ebb0,_0x89e125(0xd0)),scanHookFunctions(_0x13ebb0)]);return[..._0x5cc137,..._0x2431a2,..._0x25fa9d];}const SAFE_LOCK_KEY_SEGMENT=/^[A-Za-z0-9_$.-]+$/;export function isSafeLockKeySegment(_0x1755fe){const _0x280b8c=a273_0x542a66;return SAFE_LOCK_KEY_SEGMENT[_0x280b8c(0xd7)](_0x1755fe)&&_0x1755fe!=='.'&&_0x1755fe!=='..';}export function resolveLocalFilePathFromLockKey(_0x485aa4,_0x1e93e2){const _0x4412a4=a273_0x542a66,_0x33e101=_0x1e93e2[_0x4412a4(0xc6)]('/');if(!_0x33e101[_0x4412a4(0xd5)](isSafeLockKeySegment))throw new Error(_0x4412a4(0xe0)+_0x1e93e2);const _0x1c4bef=resolve(join(_0x485aa4[_0x4412a4(0xd3)],..._0x33e101)+_0x4412a4(0xca)),_0x2589ea=resolve(_0x485aa4[_0x4412a4(0xd3)]);if(_0x1c4bef!==_0x2589ea&&!_0x1c4bef[_0x4412a4(0xdf)](_0x2589ea+sep))throw new Error(_0x4412a4(0xe8)+_0x1c4bef);return _0x1c4bef;}export function createHookLocationMap(_0x4ec1aa){const _0x3ac100=a273_0x542a66,_0x2eca8e=new Map();for(const _0x1d56f1 of _0x4ec1aa){_0x1d56f1['beforeScriptId']&&_0x2eca8e[_0x3ac100(0xcf)](_0x1d56f1[_0x3ac100(0xd1)],{'datasetCode':_0x1d56f1[_0x3ac100(0xc8)],'operationType':snakeToCamel(_0x1d56f1[_0x3ac100(0xeb)]),'functionNode':_0x3ac100(0xf1)}),_0x1d56f1[_0x3ac100(0xf2)]&&_0x2eca8e[_0x3ac100(0xcf)](_0x1d56f1[_0x3ac100(0xf2)],{'datasetCode':_0x1d56f1['datasetCode'],'operationType':snakeToCamel(_0x1d56f1[_0x3ac100(0xeb)]),'functionNode':'after'});}return _0x2eca8e;}export function resolveRemoteScriptTarget(_0x21f10f,_0x1d57e2,_0x114aa0,_0x320458,_0x3d95fa){const _0x57b2e0=a273_0x542a66,_0x599a4f=normalizeBffType(_0x1d57e2[_0x57b2e0(0xe3)]);if(!_0x599a4f||!_0x1d57e2[_0x57b2e0(0xcb)])return null;if(_0x599a4f===_0x57b2e0(0xc7)){const _0x1d6b59=_0x1d57e2['id']?_0x114aa0[_0x57b2e0(0xf0)](_0x1d57e2['id']):undefined,_0x59d3ae=findHookLocationByRemoteId(_0x320458,_0x1d57e2['id']),_0x2b256c=_0x1d6b59?{..._0x59d3ae?.[_0x57b2e0(0xc8)]===_0x1d6b59[_0x57b2e0(0xc8)]?_0x59d3ae:{},..._0x1d6b59}:_0x59d3ae;if(!_0x2b256c)return null;const _0x2300a3=_0x3d95fa[_0x57b2e0(0xf0)](_0x2b256c[_0x57b2e0(0xc8)][_0x57b2e0(0xce)]()),_0x368169=_0x2300a3??_0x2b256c[_0x57b2e0(0xc8)],_0x471d73={..._0x2b256c,'alias':_0x2300a3},_0x140316=_0x57b2e0(0xc9)+_0x368169+'/'+_0x471d73[_0x57b2e0(0xeb)]+'/'+_0x471d73[_0x57b2e0(0xc5)]+'/'+_0x1d57e2[_0x57b2e0(0xcb)];if(!_0x140316[_0x57b2e0(0xc6)]('/')[_0x57b2e0(0xd5)](isSafeLockKeySegment))return null;return{'lockKey':_0x140316,'filePath':resolveLocalFilePathFromLockKey(_0x21f10f,_0x140316),'type':_0x57b2e0(0xc7),'hookLocation':_0x471d73};}const _0x497a96=_0x599a4f+'/'+_0x1d57e2[_0x57b2e0(0xcb)];if(!_0x497a96['split']('/')[_0x57b2e0(0xd5)](isSafeLockKeySegment))return null;return{'lockKey':_0x497a96,'filePath':resolveLocalFilePathFromLockKey(_0x21f10f,_0x497a96),'type':_0x599a4f};}export async function ensureParentDirectory(_0x4237ce){await mkdir(dirname(_0x4237ce),{'recursive':!![]});}function a273_0x365b(){const _0x4f0cf4=['1590ROfWwF','328030WiYAgu','ENOENT','startsWith','Unsafe\x20Backend\x20Function\x20lock\x20key\x20(traversal\x20or\x20invalid\x20segment):\x20','name','850UsxqeB','scriptType','push','endsWith','code','326NebZmX','Resolved\x20Backend\x20Function\x20script\x20path\x20escapes\x20scripts\x20root:\x20','COMMON','9BmMKTa','operationType','isDirectory','276JkOaPb','includes','7aCiWUD','get','before','afterScriptId','toUpperCase','412536GzQdeK','functionNode','split','HOOK','datasetCode','HOOK/','.js','functionName','165517YeAFvf','F_OK','toLowerCase','set','ENDPOINT','beforeScriptId','1323978MhAxfp','scriptsRootDir','replace','every','332060dymBBu','test','964mgAYmq','map','all','trim'];a273_0x365b=function(){return _0x4f0cf4;};return a273_0x365b();}export async function fileExists(_0xf1dd7a){const _0x14ddaf=a273_0x542a66;try{return await access(_0xf1dd7a,constants[_0x14ddaf(0xcd)]),!![];}catch{return![];}}export async function directoryExists(_0x1a988a){const _0x25a7ea=a273_0x542a66;try{const _0x28c7d1=await stat(_0x1a988a);return _0x28c7d1[_0x25a7ea(0xec)]();}catch{return![];}}
@@ -1 +1 @@
1
- function a263_0x5caa(){const _0x4f7750=['230495edUqPK','33cIuoGg','3698400yEgtpc','564670HmgQEM','76476AtirDD','utf8','16cfuWgj','654EaRurI','128msbgPX','digest','53468bpyoWm','425412aREMvv','hex','5031OmKOmN','45969icWepD','110edmTrC','md5'];a263_0x5caa=function(){return _0x4f7750;};return a263_0x5caa();}(function(_0x2db083,_0x21b7c1){const _0x5bdba2=a263_0x3023,_0x1e9fcc=_0x2db083();while(!![]){try{const _0x30ae19=-parseInt(_0x5bdba2(0x18d))/0x1*(parseInt(_0x5bdba2(0x182))/0x2)+-parseInt(_0x5bdba2(0x18f))/0x3+-parseInt(_0x5bdba2(0x186))/0x4*(-parseInt(_0x5bdba2(0x18b))/0x5)+-parseInt(_0x5bdba2(0x183))/0x6*(-parseInt(_0x5bdba2(0x18a))/0x7)+-parseInt(_0x5bdba2(0x184))/0x8*(-parseInt(_0x5bdba2(0x187))/0x9)+-parseInt(_0x5bdba2(0x190))/0xa*(parseInt(_0x5bdba2(0x18e))/0xb)+parseInt(_0x5bdba2(0x180))/0xc*(parseInt(_0x5bdba2(0x189))/0xd);if(_0x30ae19===_0x21b7c1)break;else _0x1e9fcc['push'](_0x1e9fcc['shift']());}catch(_0x44959f){_0x1e9fcc['push'](_0x1e9fcc['shift']());}}}(a263_0x5caa,0xf0cf3));function a263_0x3023(_0x5df9ca,_0x27d344){_0x5df9ca=_0x5df9ca-0x180;const _0x5caa84=a263_0x5caa();let _0x3023b8=_0x5caa84[_0x5df9ca];return _0x3023b8;}import{readFile}from'node:fs/promises';import a263_0x229490 from'node:crypto';export function computeContentHash(_0x48df12){const _0x3ac09b=a263_0x3023;return a263_0x229490['createHash'](_0x3ac09b(0x18c))['update'](_0x48df12)[_0x3ac09b(0x185)](_0x3ac09b(0x188));}export async function computeFileHash(_0x2570f2){const _0x1071f3=a263_0x3023,_0x3b747=await readFile(_0x2570f2,_0x1071f3(0x181));return computeContentHash(_0x3b747);}
1
+ function a274_0x54b6(){const _0x3359fc=['9UYqYfT','21ozXbuf','12HRLYgv','3413104zzKaDI','utf8','47381147rpprte','digest','282jReGyo','287126BCQdCo','1311505HWkCjL','7575580KIgAvD','8757UjaZVE','25225SnqByD','4528ygByec','md5','hex'];a274_0x54b6=function(){return _0x3359fc;};return a274_0x54b6();}(function(_0x239d42,_0x3b1dc3){const _0x3386fe=a274_0xab58,_0x3a1f08=_0x239d42();while(!![]){try{const _0x47fea8=-parseInt(_0x3386fe(0x98))/0x1+-parseInt(_0x3386fe(0x97))/0x2*(parseInt(_0x3386fe(0xa0))/0x3)+-parseInt(_0x3386fe(0x92))/0x4+parseInt(_0x3386fe(0x9b))/0x5*(-parseInt(_0x3386fe(0x96))/0x6)+parseInt(_0x3386fe(0x9a))/0x7*(parseInt(_0x3386fe(0x9c))/0x8)+parseInt(_0x3386fe(0x9f))/0x9*(-parseInt(_0x3386fe(0x99))/0xa)+parseInt(_0x3386fe(0x94))/0xb*(parseInt(_0x3386fe(0xa1))/0xc);if(_0x47fea8===_0x3b1dc3)break;else _0x3a1f08['push'](_0x3a1f08['shift']());}catch(_0x22ed88){_0x3a1f08['push'](_0x3a1f08['shift']());}}}(a274_0x54b6,0xcfc68));import{readFile}from'node:fs/promises';import a274_0x4dc640 from'node:crypto';export function computeContentHash(_0x34b2b2){const _0xc6beeb=a274_0xab58;return a274_0x4dc640['createHash'](_0xc6beeb(0x9d))['update'](_0x34b2b2)[_0xc6beeb(0x95)](_0xc6beeb(0x9e));}function a274_0xab58(_0x1d2b0d,_0x5d7c5e){_0x1d2b0d=_0x1d2b0d-0x92;const _0x54b6d0=a274_0x54b6();let _0xab58f5=_0x54b6d0[_0x1d2b0d];return _0xab58f5;}export async function computeFileHash(_0x37d4a8){const _0x230f6b=a274_0xab58,_0x47569a=await readFile(_0x37d4a8,_0x230f6b(0x93));return computeContentHash(_0x47569a);}
@@ -1 +1 @@
1
- (function(_0x5ac1da,_0x13d4b6){const _0x18b2ee=a264_0x5f0d,_0x3cefb5=_0x5ac1da();while(!![]){try{const _0x1871cf=parseInt(_0x18b2ee(0x11b))/0x1*(parseInt(_0x18b2ee(0x11c))/0x2)+-parseInt(_0x18b2ee(0x104))/0x3*(-parseInt(_0x18b2ee(0x110))/0x4)+parseInt(_0x18b2ee(0x10b))/0x5+parseInt(_0x18b2ee(0x10c))/0x6+parseInt(_0x18b2ee(0xf1))/0x7*(-parseInt(_0x18b2ee(0x113))/0x8)+-parseInt(_0x18b2ee(0x116))/0x9*(parseInt(_0x18b2ee(0x121))/0xa)+-parseInt(_0x18b2ee(0x11a))/0xb;if(_0x1871cf===_0x13d4b6)break;else _0x3cefb5['push'](_0x3cefb5['shift']());}catch(_0x4c2503){_0x3cefb5['push'](_0x3cefb5['shift']());}}}(a264_0x12d6,0x9038b));function a264_0x5f0d(_0x46ae2d,_0x5c9f51){_0x46ae2d=_0x46ae2d-0xee;const _0x12d6c2=a264_0x12d6();let _0x5f0d44=_0x12d6c2[_0x46ae2d];return _0x5f0d44;}function a264_0x12d6(){const _0x28d3bf=['HOOK_ALIAS_AMBIGUOUS','length','normalize','message','SDK\x20alias\x20\x22','values','size','Cannot\x20resolve\x20HOOK\x20directory\x20\x22','includes','alias','datasetCode','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','push','HOOK_DATASET_NOT_FOUND','HOOK\x20directory\x20\x22','HOOK_DATASET_CODE_AMBIGUOUS','\x22\x20resolves\x20to\x20multiple\x20Datasets.','1215PViwfG','datasetCodeToDatasets','toLowerCase','lockKey','\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20','set','entries','4899110WLBDXx','4928616fILJnn','get','functions','code','3364YzTena','HOOK_DIRECTORY_UNRESOLVED','HOOK_DIRECTORY_AMBIGUOUS','91384wHTuXd','name','join','827208keoNgq','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','add','HOOK_MAPPING_DRIFT','8719799xKjmmR','1ICPvaP','1580036tDGCiV','HOOK_DUPLICATE_DIRECTORIES','Dataset\x20\x22','\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22','\x22\x20to\x20\x22','120ETzqLN','type','split','details','Dataset\x20code\x20\x22','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','HOOK','map','\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.','273rlcVsN','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20'];a264_0x12d6=function(){return _0x28d3bf;};return a264_0x12d6();}import{CliError}from'../../errors.js';export function trackedHookDirectoryMappings(_0x39bf4a){const _0x4effa3=a264_0x5f0d,_0x3144eb=[];for(const [_0x57b91f,_0x3418ea]of Object[_0x4effa3(0x10a)](_0x39bf4a[_0x4effa3(0x10e)])){const [_0x292985,_0x24a407]=_0x57b91f[_0x4effa3(0x123)]('/');if(_0x292985!==_0x4effa3(0xee)||!_0x24a407||!_0x3418ea[_0x4effa3(0xfd)])continue;_0x3144eb[_0x4effa3(0xff)]({'alias':_0x24a407,'datasetCode':_0x3418ea[_0x4effa3(0xfd)]});}return _0x3144eb;}export function uniqueTrackedHookDirectoryByDataset(_0x4f1123){const _0x63c1a8=a264_0x5f0d,_0x3380ce=new Map();for(const _0x4133ac of trackedHookDirectoryMappings(_0x4f1123)){const _0x3215c0=directoryIdentity(_0x4133ac[_0x63c1a8(0xfd)]),_0x39215a=_0x3380ce[_0x63c1a8(0x10d)](_0x3215c0)??new Map();_0x39215a['set'](directoryIdentity(_0x4133ac[_0x63c1a8(0xfc)]),_0x4133ac[_0x63c1a8(0xfc)]),_0x3380ce[_0x63c1a8(0x109)](_0x3215c0,_0x39215a);}const _0x42f797=new Map();for(const [_0x300e11,_0x374c23]of _0x3380ce){if(_0x374c23[_0x63c1a8(0xf9)]>0x1)throw hookDirectoryError('HOOK_DUPLICATE_DIRECTORIES',_0x63c1a8(0x11e)+_0x300e11+_0x63c1a8(0x108)+[..._0x374c23[_0x63c1a8(0xf8)]()][_0x63c1a8(0x115)](',\x20')+'.',{'datasetCode':_0x300e11,'directories':[..._0x374c23[_0x63c1a8(0xf8)]()]});_0x42f797[_0x63c1a8(0x109)](_0x300e11,[..._0x374c23[_0x63c1a8(0xf8)]()][0x0]);}return _0x42f797;}export function assertUnambiguousHookDirectoryMappings(_0x2e894d){const _0x565a06=a264_0x5f0d,_0x296e04=new Map();for(const {alias:_0x25ef7c,datasetCode:_0x3bad42}of _0x2e894d){const _0x37874c=directoryIdentity(_0x25ef7c),_0x28d61e=_0x296e04[_0x565a06(0x10d)](_0x37874c)??new Set();_0x28d61e['add'](_0x3bad42),_0x296e04[_0x565a06(0x109)](_0x37874c,_0x28d61e);}for(const [_0x1af008,_0x25c462]of _0x296e04){if(_0x25c462[_0x565a06(0xf9)]>0x1)throw hookDirectoryError(_0x565a06(0x112),_0x565a06(0x101)+_0x1af008+_0x565a06(0x103),{'directoryName':_0x1af008,'datasetCodes':[..._0x25c462]});}}export function assertUnambiguousHookAliases(_0x1649a8){const _0x1a0e7c=a264_0x5f0d,_0x13cbf9=[..._0x1649a8],_0x5b8240=new Map(),_0x1c89a5=new Map();for(const {alias:_0x5b373e,datasetCode:_0x4f3e02}of _0x13cbf9){const _0x20bd53=directoryIdentity(_0x5b373e),_0x4400c8=directoryIdentity(_0x4f3e02),_0x3ee9ab=_0x5b8240[_0x1a0e7c(0x10d)](_0x20bd53)??new Set();_0x3ee9ab[_0x1a0e7c(0x118)](_0x4f3e02),_0x5b8240['set'](_0x20bd53,_0x3ee9ab);const _0x139786=_0x1c89a5['get'](_0x4400c8)??new Set();_0x139786[_0x1a0e7c(0x118)](_0x5b373e),_0x1c89a5[_0x1a0e7c(0x109)](_0x4400c8,_0x139786);}for(const [_0x1b16d9,_0x1ee982]of _0x5b8240){if(_0x1ee982[_0x1a0e7c(0xf9)]>0x1)throw hookDirectoryError('HOOK_ALIAS_AMBIGUOUS',_0x1a0e7c(0xf7)+_0x1b16d9+_0x1a0e7c(0x103),{'alias':_0x1b16d9,'datasetCodes':[..._0x1ee982]});}for(const [_0x38c647,_0x25fefd]of _0x1c89a5){if(_0x25fefd['size']>0x1)throw hookDirectoryError(_0x1a0e7c(0xf3),_0x1a0e7c(0x11e)+_0x38c647+_0x1a0e7c(0xfe),{'datasetCode':_0x38c647,'aliases':[..._0x25fefd]});}}export function buildHookDirectoryIndexes(_0x55a4ed,_0x493493=[]){const _0x579c34=a264_0x5f0d,_0x1a4f21=[..._0x493493];assertUnambiguousHookDirectoryMappings(_0x1a4f21[_0x579c34(0xef)](([_0xaceab3,_0x5379e9])=>({'alias':_0xaceab3,'datasetCode':_0x5379e9})));const _0x1ff66d=new Map(),_0x247afe=new Map();for(const _0x5dcc02 of _0x55a4ed){appendUnique(_0x1ff66d,directoryIdentity(_0x5dcc02['code']),_0x5dcc02,_0x5ea8f4=>_0x5ea8f4[_0x579c34(0x10f)]);}for(const [_0x5bad93,_0x392a18]of _0x1a4f21){appendUnique(_0x247afe,directoryIdentity(_0x5bad93),_0x392a18,_0xbbe7db=>_0xbbe7db);}return{'datasetCodeToDatasets':_0x1ff66d,'aliasToDatasetCodes':_0x247afe};}export function resolvePushHookDirectory(_0x2e550d,_0x3b622b,_0x5c24f6){const _0x4c2178=a264_0x5f0d,_0x32693b=directoryIdentity(_0x2e550d),_0x39d10f=_0x5c24f6[_0x4c2178(0x105)][_0x4c2178(0x10d)](_0x32693b)??[],_0x57e307=_0x5c24f6['aliasToDatasetCodes']['get'](_0x32693b)??[],_0x1cd824=new Set([..._0x39d10f[_0x4c2178(0xef)](_0x50b299=>_0x50b299[_0x4c2178(0x10f)]),..._0x57e307]);if(_0x1cd824[_0x4c2178(0xf9)]>0x1)throw hookDirectoryError(_0x4c2178(0x112),_0x4c2178(0x101)+_0x2e550d+_0x4c2178(0x126),{'directoryName':_0x2e550d,'datasetCodes':[..._0x1cd824]});const _0xb6abdb=[..._0x1cd824][0x0];if(_0xb6abdb&&_0x3b622b?.[_0x4c2178(0xfd)]&&_0xb6abdb!==_0x3b622b['datasetCode'])throw hookDirectoryError(_0x4c2178(0x119),'HOOK\x20directory\x20\x22'+_0x2e550d+_0x4c2178(0x11f)+_0x3b622b[_0x4c2178(0xfd)]+_0x4c2178(0x120)+_0xb6abdb+'\x22.',{'directoryName':_0x2e550d,'datasetCode':_0xb6abdb,'lockedDatasetCode':_0x3b622b[_0x4c2178(0xfd)]});const _0x37282b=_0xb6abdb?findDatasetByCode(_0x5c24f6,_0xb6abdb):undefined,_0x2b84ee=!!_0xb6abdb&&_0x57e307[_0x4c2178(0xfb)](_0xb6abdb);if(_0x37282b)return{'dataset':_0x37282b,'datasetCode':_0x37282b[_0x4c2178(0x10f)],..._0x2b84ee?{'alias':_0x2e550d}:{},'directoryProtocol':_0x2b84ee?_0x4c2178(0xfc):_0x4c2178(0xfd),'warnings':[]};const _0x461abf=_0x3b622b?.[_0x4c2178(0xfd)];if(_0x461abf){const _0xe1c9d8=findDatasetByCode(_0x5c24f6,_0x461abf);if(_0xe1c9d8)return{'dataset':_0xe1c9d8,'datasetCode':_0xe1c9d8[_0x4c2178(0x10f)],..._0x3b622b[_0x4c2178(0xfc)]?{'alias':_0x3b622b[_0x4c2178(0xfc)]}:{},'directoryProtocol':_0x3b622b[_0x4c2178(0xfc)]?_0x4c2178(0xfc):_0x4c2178(0xfd),'warnings':[]};}if(_0xb6abdb||_0x461abf){const _0x2e2e64=_0xb6abdb??_0x461abf;throw hookDirectoryError(_0x4c2178(0x100),_0x4c2178(0x101)+_0x2e550d+'\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.',{'directoryName':_0x2e550d,'datasetCode':_0x2e2e64});}throw hookDirectoryError(_0x4c2178(0x111),_0x4c2178(0xfa)+_0x2e550d+_0x4c2178(0xf0),{'directoryName':_0x2e550d});}export function preflightPushHookDirectories(_0x1a2f6f,_0x2f4f5f,_0x212c92,_0x2ff915){const _0x38a646=a264_0x5f0d,_0x6e41c3=new Map(),_0x877fa2=new Map();for(const _0x26c4bc of _0x1a2f6f){if(_0x26c4bc[_0x38a646(0x122)]!==_0x38a646(0xee))continue;const _0x326aff=_0x26c4bc['alias'];if(!_0x326aff)throw hookDirectoryError(_0x38a646(0x111),'Incomplete\x20HOOK\x20path:\x20'+_0x26c4bc[_0x38a646(0x107)],{'lockKey':_0x26c4bc['lockKey']});let _0x5cb81a;try{_0x5cb81a=resolvePushHookDirectory(_0x326aff,_0x2f4f5f[_0x38a646(0x10e)][_0x26c4bc[_0x38a646(0x107)]],_0x212c92);}catch(_0x561e1f){if(_0x2ff915&&_0x561e1f instanceof CliError&&[_0x38a646(0x100),_0x38a646(0x111)][_0x38a646(0xfb)](_0x561e1f['code'])){_0x2ff915[_0x38a646(0x109)](_0x26c4bc[_0x38a646(0x107)],_0x561e1f[_0x38a646(0xf6)]);continue;}throw _0x561e1f;}_0x6e41c3[_0x38a646(0x109)](_0x26c4bc[_0x38a646(0x107)],_0x5cb81a);const _0x1a9260=_0x877fa2[_0x38a646(0x10d)](_0x5cb81a[_0x38a646(0xfd)])??new Set();_0x1a9260[_0x38a646(0x118)](_0x326aff),_0x877fa2[_0x38a646(0x109)](_0x5cb81a[_0x38a646(0xfd)],_0x1a9260);}for(const [_0x47b2b6,_0x540e4e]of _0x877fa2){if(_0x540e4e[_0x38a646(0xf9)]>0x1)throw hookDirectoryError(_0x38a646(0x11d),'Dataset\x20\x22'+_0x47b2b6+_0x38a646(0xf2)+[..._0x540e4e]['join'](',\x20')+'.',{'datasetCode':_0x47b2b6,'directories':[..._0x540e4e]});}return _0x6e41c3;}export function hookDirectoryError(_0x3f32d0,_0x4b7677,_0x20b865){const _0x1417a5=a264_0x5f0d,_0xd25010=new CliError(_0x3f32d0,0x2,_0x3f32d0+':\x20'+_0x4b7677);return _0xd25010[_0x1417a5(0x124)]=_0x20b865,_0xd25010;}function findDatasetByCode(_0x5914b7,_0x44016d){const _0x5b00c4=a264_0x5f0d,_0x27a2e8=_0x5914b7[_0x5b00c4(0x105)][_0x5b00c4(0x10d)](directoryIdentity(_0x44016d))??[];if(_0x27a2e8[_0x5b00c4(0xf4)]>0x1)throw hookDirectoryError(_0x5b00c4(0x102),_0x5b00c4(0x125)+_0x44016d+_0x5b00c4(0x117),{'datasetCode':_0x44016d,'candidates':_0x27a2e8[_0x5b00c4(0xef)](datasetFact)});return _0x27a2e8[0x0];}function directoryIdentity(_0x504b08){const _0xd5aaad=a264_0x5f0d;return _0x504b08[_0xd5aaad(0xf5)]('NFC')[_0xd5aaad(0x106)]();}function appendUnique(_0x1e418f,_0x521e2f,_0x3d90d1,_0x23bece){const _0x2ad3d3=a264_0x5f0d,_0x15e40d=_0x1e418f[_0x2ad3d3(0x10d)](_0x521e2f)??[];!_0x15e40d['some'](_0x10b03b=>_0x23bece(_0x10b03b)===_0x23bece(_0x3d90d1))&&_0x15e40d[_0x2ad3d3(0xff)](_0x3d90d1),_0x1e418f['set'](_0x521e2f,_0x15e40d);}function datasetFact(_0x5ee582){const _0x2e5ac3=a264_0x5f0d;return{'id':_0x5ee582['id'],'name':_0x5ee582[_0x2e5ac3(0x114)],'datasetCode':_0x5ee582['code']};}
1
+ (function(_0x22cd45,_0xeb6741){const _0x40e167=a275_0x58ce,_0x493bd3=_0x22cd45();while(!![]){try{const _0x472543=-parseInt(_0x40e167(0x91))/0x1+parseInt(_0x40e167(0x76))/0x2*(parseInt(_0x40e167(0x7c))/0x3)+parseInt(_0x40e167(0x71))/0x4+-parseInt(_0x40e167(0x8d))/0x5+-parseInt(_0x40e167(0x98))/0x6*(-parseInt(_0x40e167(0x69))/0x7)+parseInt(_0x40e167(0x6b))/0x8+-parseInt(_0x40e167(0x79))/0x9;if(_0x472543===_0xeb6741)break;else _0x493bd3['push'](_0x493bd3['shift']());}catch(_0x59920c){_0x493bd3['push'](_0x493bd3['shift']());}}}(a275_0x847d,0xc124b));import{CliError}from'../../errors.js';function a275_0x847d(){const _0x11d3b9=['1267GjvqOV','datasetCode','9919136LCnugW','alias','\x22\x20changed\x20mapping\x20from\x20Dataset\x20\x22','get','Dataset\x20\x22','values','1139016cNcNmN','NFC','HOOK_ALIAS_AMBIGUOUS','HOOK_DIRECTORY_UNRESOLVED','HOOK_DIRECTORY_AMBIGUOUS','943442njgwds','HOOK\x20directory\x20\x22','toLowerCase','21579021GOVsJx','aliasToDatasetCodes','size','9ZaNGdQ','map','Incomplete\x20HOOK\x20path:\x20','\x22\x20points\x20to\x20a\x20Dataset\x20that\x20is\x20absent\x20from\x20current\x20platform\x20metadata.','HOOK','\x22\x20to\x20a\x20Dataset\x20alias\x20or\x20datasetCode.','add','includes','type','some','HOOK_DUPLICATE_DIRECTORIES','\x22\x20differs\x20only\x20by\x20case\x20from\x20another\x20Dataset\x20code.','datasetCodeToDatasets','\x22\x20has\x20multiple\x20SDK\x20aliases\x20and\x20has\x20no\x20unique\x20HOOK\x20directory.','\x22\x20resolves\x20to\x20multiple\x20Datasets.','set','push','2673300eLaOcG','message','functions','\x22\x20collides\x20across\x20datasetCode\x20and\x20alias\x20namespaces.','238472BPtKIj','lockKey','details','\x22\x20is\x20represented\x20by\x20multiple\x20HOOK\x20directories:\x20','join','SDK\x20alias\x20\x22','split','33882sDCtQD','HOOK_DATASET_NOT_FOUND','entries','Cannot\x20resolve\x20HOOK\x20directory\x20\x22','code'];a275_0x847d=function(){return _0x11d3b9;};return a275_0x847d();}export function trackedHookDirectoryMappings(_0x1934da){const _0x5cc7e4=a275_0x58ce,_0x7676a8=[];for(const [_0x240ce6,_0x396e05]of Object[_0x5cc7e4(0x66)](_0x1934da[_0x5cc7e4(0x8f)])){const [_0x571320,_0x1f614a]=_0x240ce6[_0x5cc7e4(0x97)]('/');if(_0x571320!==_0x5cc7e4(0x80)||!_0x1f614a||!_0x396e05[_0x5cc7e4(0x6a)])continue;_0x7676a8[_0x5cc7e4(0x8c)]({'alias':_0x1f614a,'datasetCode':_0x396e05[_0x5cc7e4(0x6a)]});}return _0x7676a8;}export function uniqueTrackedHookDirectoryByDataset(_0xc6b479){const _0x2f3c98=a275_0x58ce,_0x73f30a=new Map();for(const _0x305d58 of trackedHookDirectoryMappings(_0xc6b479)){const _0xa9eb8e=directoryIdentity(_0x305d58[_0x2f3c98(0x6a)]),_0x195a0f=_0x73f30a[_0x2f3c98(0x6e)](_0xa9eb8e)??new Map();_0x195a0f[_0x2f3c98(0x8b)](directoryIdentity(_0x305d58[_0x2f3c98(0x6c)]),_0x305d58[_0x2f3c98(0x6c)]),_0x73f30a[_0x2f3c98(0x8b)](_0xa9eb8e,_0x195a0f);}const _0x5e117e=new Map();for(const [_0x48c15d,_0x385aa3]of _0x73f30a){if(_0x385aa3[_0x2f3c98(0x7b)]>0x1)throw hookDirectoryError(_0x2f3c98(0x86),_0x2f3c98(0x6f)+_0x48c15d+'\x22\x20has\x20multiple\x20tracked\x20HOOK\x20directories:\x20'+[..._0x385aa3[_0x2f3c98(0x70)]()][_0x2f3c98(0x95)](',\x20')+'.',{'datasetCode':_0x48c15d,'directories':[..._0x385aa3['values']()]});_0x5e117e[_0x2f3c98(0x8b)](_0x48c15d,[..._0x385aa3[_0x2f3c98(0x70)]()][0x0]);}return _0x5e117e;}function a275_0x58ce(_0x11e368,_0x13a07a){_0x11e368=_0x11e368-0x66;const _0x847d05=a275_0x847d();let _0x58ce31=_0x847d05[_0x11e368];return _0x58ce31;}export function assertUnambiguousHookDirectoryMappings(_0x131188){const _0x11ddd5=a275_0x58ce,_0x5ebc8d=new Map();for(const {alias:_0x8e8fdd,datasetCode:_0x1191fa}of _0x131188){const _0x2fc225=directoryIdentity(_0x8e8fdd),_0x27284a=_0x5ebc8d[_0x11ddd5(0x6e)](_0x2fc225)??new Set();_0x27284a['add'](_0x1191fa),_0x5ebc8d[_0x11ddd5(0x8b)](_0x2fc225,_0x27284a);}for(const [_0x3da4ab,_0x207677]of _0x5ebc8d){if(_0x207677[_0x11ddd5(0x7b)]>0x1)throw hookDirectoryError(_0x11ddd5(0x75),_0x11ddd5(0x77)+_0x3da4ab+'\x22\x20resolves\x20to\x20multiple\x20Datasets.',{'directoryName':_0x3da4ab,'datasetCodes':[..._0x207677]});}}export function assertUnambiguousHookAliases(_0x53768c){const _0x3bb833=a275_0x58ce,_0x2e9b65=[..._0x53768c],_0x57c351=new Map(),_0x5bff91=new Map();for(const {alias:_0x581e25,datasetCode:_0x410cd2}of _0x2e9b65){const _0x5c18e6=directoryIdentity(_0x581e25),_0x1e3bcd=directoryIdentity(_0x410cd2),_0x3925b5=_0x57c351['get'](_0x5c18e6)??new Set();_0x3925b5[_0x3bb833(0x82)](_0x410cd2),_0x57c351[_0x3bb833(0x8b)](_0x5c18e6,_0x3925b5);const _0x37f742=_0x5bff91[_0x3bb833(0x6e)](_0x1e3bcd)??new Set();_0x37f742[_0x3bb833(0x82)](_0x581e25),_0x5bff91[_0x3bb833(0x8b)](_0x1e3bcd,_0x37f742);}for(const [_0x35d21e,_0x5b7048]of _0x57c351){if(_0x5b7048[_0x3bb833(0x7b)]>0x1)throw hookDirectoryError(_0x3bb833(0x73),_0x3bb833(0x96)+_0x35d21e+_0x3bb833(0x8a),{'alias':_0x35d21e,'datasetCodes':[..._0x5b7048]});}for(const [_0x143c73,_0x37c378]of _0x5bff91){if(_0x37c378[_0x3bb833(0x7b)]>0x1)throw hookDirectoryError(_0x3bb833(0x73),_0x3bb833(0x6f)+_0x143c73+_0x3bb833(0x89),{'datasetCode':_0x143c73,'aliases':[..._0x37c378]});}}export function buildHookDirectoryIndexes(_0x588e14,_0x39732c=[]){const _0x1762bf=a275_0x58ce,_0x4964d5=[..._0x39732c];assertUnambiguousHookDirectoryMappings(_0x4964d5[_0x1762bf(0x7d)](([_0xa0cc1a,_0x225905])=>({'alias':_0xa0cc1a,'datasetCode':_0x225905})));const _0x515e5f=new Map(),_0x41a128=new Map();for(const _0x4a31e2 of _0x588e14){appendUnique(_0x515e5f,directoryIdentity(_0x4a31e2[_0x1762bf(0x68)]),_0x4a31e2,_0x747605=>_0x747605[_0x1762bf(0x68)]);}for(const [_0x125151,_0xe73929]of _0x4964d5){appendUnique(_0x41a128,directoryIdentity(_0x125151),_0xe73929,_0x4903f8=>_0x4903f8);}return{'datasetCodeToDatasets':_0x515e5f,'aliasToDatasetCodes':_0x41a128};}export function resolvePushHookDirectory(_0x348007,_0x130916,_0x2f25b2){const _0x3337eb=a275_0x58ce,_0x4a9647=directoryIdentity(_0x348007),_0x3cfa1c=_0x2f25b2['datasetCodeToDatasets']['get'](_0x4a9647)??[],_0x3a0aed=_0x2f25b2[_0x3337eb(0x7a)][_0x3337eb(0x6e)](_0x4a9647)??[],_0x4b4f21=new Set([..._0x3cfa1c[_0x3337eb(0x7d)](_0x31cf29=>_0x31cf29[_0x3337eb(0x68)]),..._0x3a0aed]);if(_0x4b4f21['size']>0x1)throw hookDirectoryError('HOOK_DIRECTORY_AMBIGUOUS',_0x3337eb(0x77)+_0x348007+_0x3337eb(0x90),{'directoryName':_0x348007,'datasetCodes':[..._0x4b4f21]});const _0x5dbbd1=[..._0x4b4f21][0x0];if(_0x5dbbd1&&_0x130916?.[_0x3337eb(0x6a)]&&_0x5dbbd1!==_0x130916['datasetCode'])throw hookDirectoryError('HOOK_MAPPING_DRIFT',_0x3337eb(0x77)+_0x348007+_0x3337eb(0x6d)+_0x130916['datasetCode']+'\x22\x20to\x20\x22'+_0x5dbbd1+'\x22.',{'directoryName':_0x348007,'datasetCode':_0x5dbbd1,'lockedDatasetCode':_0x130916[_0x3337eb(0x6a)]});const _0x5b5bab=_0x5dbbd1?findDatasetByCode(_0x2f25b2,_0x5dbbd1):undefined,_0x3d052e=!!_0x5dbbd1&&_0x3a0aed[_0x3337eb(0x83)](_0x5dbbd1);if(_0x5b5bab)return{'dataset':_0x5b5bab,'datasetCode':_0x5b5bab['code'],..._0x3d052e?{'alias':_0x348007}:{},'directoryProtocol':_0x3d052e?'alias':_0x3337eb(0x6a),'warnings':[]};const _0x85ebc9=_0x130916?.['datasetCode'];if(_0x85ebc9){const _0x5d7eb3=findDatasetByCode(_0x2f25b2,_0x85ebc9);if(_0x5d7eb3)return{'dataset':_0x5d7eb3,'datasetCode':_0x5d7eb3[_0x3337eb(0x68)],..._0x130916[_0x3337eb(0x6c)]?{'alias':_0x130916[_0x3337eb(0x6c)]}:{},'directoryProtocol':_0x130916[_0x3337eb(0x6c)]?_0x3337eb(0x6c):_0x3337eb(0x6a),'warnings':[]};}if(_0x5dbbd1||_0x85ebc9){const _0x3db567=_0x5dbbd1??_0x85ebc9;throw hookDirectoryError(_0x3337eb(0x99),_0x3337eb(0x77)+_0x348007+_0x3337eb(0x7f),{'directoryName':_0x348007,'datasetCode':_0x3db567});}throw hookDirectoryError(_0x3337eb(0x74),_0x3337eb(0x67)+_0x348007+_0x3337eb(0x81),{'directoryName':_0x348007});}export function preflightPushHookDirectories(_0x472fd2,_0x352bdc,_0xd71155,_0x1a5ac7){const _0x2bfc39=a275_0x58ce,_0x28ac70=new Map(),_0x18e06d=new Map();for(const _0x162b19 of _0x472fd2){if(_0x162b19[_0x2bfc39(0x84)]!=='HOOK')continue;const _0x3bf5c4=_0x162b19[_0x2bfc39(0x6c)];if(!_0x3bf5c4)throw hookDirectoryError('HOOK_DIRECTORY_UNRESOLVED',_0x2bfc39(0x7e)+_0x162b19['lockKey'],{'lockKey':_0x162b19['lockKey']});let _0xc7d1d1;try{_0xc7d1d1=resolvePushHookDirectory(_0x3bf5c4,_0x352bdc[_0x2bfc39(0x8f)][_0x162b19[_0x2bfc39(0x92)]],_0xd71155);}catch(_0x3a56b0){if(_0x1a5ac7&&_0x3a56b0 instanceof CliError&&[_0x2bfc39(0x99),_0x2bfc39(0x74)][_0x2bfc39(0x83)](_0x3a56b0[_0x2bfc39(0x68)])){_0x1a5ac7[_0x2bfc39(0x8b)](_0x162b19[_0x2bfc39(0x92)],_0x3a56b0[_0x2bfc39(0x8e)]);continue;}throw _0x3a56b0;}_0x28ac70[_0x2bfc39(0x8b)](_0x162b19[_0x2bfc39(0x92)],_0xc7d1d1);const _0xd5b7b5=_0x18e06d[_0x2bfc39(0x6e)](_0xc7d1d1['datasetCode'])??new Set();_0xd5b7b5['add'](_0x3bf5c4),_0x18e06d[_0x2bfc39(0x8b)](_0xc7d1d1[_0x2bfc39(0x6a)],_0xd5b7b5);}for(const [_0x459b5b,_0x4512fb]of _0x18e06d){if(_0x4512fb['size']>0x1)throw hookDirectoryError(_0x2bfc39(0x86),_0x2bfc39(0x6f)+_0x459b5b+_0x2bfc39(0x94)+[..._0x4512fb]['join'](',\x20')+'.',{'datasetCode':_0x459b5b,'directories':[..._0x4512fb]});}return _0x28ac70;}export function hookDirectoryError(_0x35475d,_0xe84a56,_0x25cc18){const _0x43246c=a275_0x58ce,_0x2f45b5=new CliError(_0x35475d,0x2,_0x35475d+':\x20'+_0xe84a56);return _0x2f45b5[_0x43246c(0x93)]=_0x25cc18,_0x2f45b5;}function findDatasetByCode(_0x114594,_0x2925d7){const _0x5fb741=a275_0x58ce,_0x518136=_0x114594[_0x5fb741(0x88)]['get'](directoryIdentity(_0x2925d7))??[];if(_0x518136['length']>0x1)throw hookDirectoryError('HOOK_DATASET_CODE_AMBIGUOUS','Dataset\x20code\x20\x22'+_0x2925d7+_0x5fb741(0x87),{'datasetCode':_0x2925d7,'candidates':_0x518136['map'](datasetFact)});return _0x518136[0x0];}function directoryIdentity(_0x4fb738){const _0x1f8877=a275_0x58ce;return _0x4fb738['normalize'](_0x1f8877(0x72))[_0x1f8877(0x78)]();}function appendUnique(_0xddc69d,_0x3bd63b,_0x5af620,_0x2c05c7){const _0x3dfa51=a275_0x58ce,_0x290845=_0xddc69d[_0x3dfa51(0x6e)](_0x3bd63b)??[];!_0x290845[_0x3dfa51(0x85)](_0x7e7535=>_0x2c05c7(_0x7e7535)===_0x2c05c7(_0x5af620))&&_0x290845[_0x3dfa51(0x8c)](_0x5af620),_0xddc69d[_0x3dfa51(0x8b)](_0x3bd63b,_0x290845);}function datasetFact(_0x2afc30){return{'id':_0x2afc30['id'],'name':_0x2afc30['name'],'datasetCode':_0x2afc30['code']};}
@@ -1 +1 @@
1
- (function(_0x543fc6,_0x39cc47){const _0x3cbb1f=a265_0x2ca4,_0x166027=_0x543fc6();while(!![]){try{const _0x23ca29=parseInt(_0x3cbb1f(0x104))/0x1+parseInt(_0x3cbb1f(0x113))/0x2*(parseInt(_0x3cbb1f(0x117))/0x3)+parseInt(_0x3cbb1f(0x106))/0x4*(parseInt(_0x3cbb1f(0x11a))/0x5)+parseInt(_0x3cbb1f(0x10b))/0x6+-parseInt(_0x3cbb1f(0x107))/0x7*(parseInt(_0x3cbb1f(0x112))/0x8)+-parseInt(_0x3cbb1f(0x114))/0x9+parseInt(_0x3cbb1f(0x111))/0xa;if(_0x23ca29===_0x39cc47)break;else _0x166027['push'](_0x166027['shift']());}catch(_0x530bf0){_0x166027['push'](_0x166027['shift']());}}}(a265_0x9e15,0xaaf57));import{mkdir,readFile,writeFile}from'node:fs/promises';function a265_0x2ca4(_0x3257c7,_0x12f4cc){_0x3257c7=_0x3257c7-0x104;const _0x9e15c7=a265_0x9e15();let _0x2ca4f8=_0x9e15c7[_0x3257c7];return _0x2ca4f8;}import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x1abcb7,_0x56f94c,_0xeb74a8,_0x2f1ba8){const _0x5acfd2=a265_0x2ca4,_0x1cb820={'apps':_0x1abcb7[_0x5acfd2(0x10d)]&&typeof _0x1abcb7['apps']===_0x5acfd2(0x115)?_0x1abcb7[_0x5acfd2(0x10d)]:{}};let _0x468080=_0x1cb820[_0x5acfd2(0x10d)][_0x56f94c];if(!_0x468080)return _0x468080={'scriptsRoot':_0xeb74a8,'lastSync':'','functions':{}},_0x1cb820[_0x5acfd2(0x10d)][_0x56f94c]=_0x468080,{'lockData':_0x1cb820,'appLock':_0x468080};if(!_0x468080['scriptsRoot'])_0x468080[_0x5acfd2(0x10a)]=_0xeb74a8;else{if(_0x468080[_0x5acfd2(0x10a)]!==_0xeb74a8)throw new Error(_0x2f1ba8+_0x5acfd2(0x118)+(_0x5acfd2(0x110)+_0xeb74a8+_0x5acfd2(0x10e)+_0x468080[_0x5acfd2(0x10a)]+_0x5acfd2(0x108))+_0x5acfd2(0x119));}return!_0x468080[_0x5acfd2(0x10f)]&&(_0x468080[_0x5acfd2(0x10f)]={}),!_0x468080[_0x5acfd2(0x109)]&&(_0x468080[_0x5acfd2(0x109)]=''),{'lockData':_0x1cb820,'appLock':_0x468080};}export async function readBffLockFile(_0x5e1cbb){const _0x2b1ca4=a265_0x2ca4;try{const _0x49584a=await readFile(_0x5e1cbb,_0x2b1ca4(0x116)),_0x4e5e35=JSON[_0x2b1ca4(0x105)](_0x49584a);return{'apps':_0x4e5e35[_0x2b1ca4(0x10d)]&&typeof _0x4e5e35[_0x2b1ca4(0x10d)]===_0x2b1ca4(0x115)?_0x4e5e35['apps']:{}};}catch(_0x192e85){if(_0x192e85['code']==='ENOENT')return null;throw new Error(_0x2b1ca4(0x10c)+String(_0x192e85));}}export async function writeBffLockFile(_0x2bdd93,_0x456820){const _0x38457e=a265_0x2ca4;await mkdir(dirname(_0x2bdd93),{'recursive':!![]}),await writeFile(_0x2bdd93,JSON['stringify'](_0x456820,null,0x2),_0x38457e(0x116));}function a265_0x9e15(){const _0x4dace1=['1005YFirNo','808328oNYjQg','parse','2980dzvKrP','70BLwMHH','\x22.\x20','lastSync','scriptsRoot','3176622DJBLjf','Failed\x20to\x20read\x20Backend\x20Function\x20lock\x20file:\x20','apps','\x22\x20vs\x20lock\x20\x22','functions','current\x20\x22','11897820USjxTH','927632bADiUJ','4axKiPo','12154887RblSbl','object','utf8','799557CTSlUB',':\x20scriptsRoot\x20mismatch\x20—\x20','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.'];a265_0x9e15=function(){return _0x4dace1;};return a265_0x9e15();}
1
+ (function(_0x4cf327,_0x51051d){const _0x6337fd=a276_0x3823,_0x4768f3=_0x4cf327();while(!![]){try{const _0x1f448d=parseInt(_0x6337fd(0x15d))/0x1+-parseInt(_0x6337fd(0x14d))/0x2+parseInt(_0x6337fd(0x156))/0x3+-parseInt(_0x6337fd(0x15e))/0x4*(-parseInt(_0x6337fd(0x160))/0x5)+parseInt(_0x6337fd(0x157))/0x6+parseInt(_0x6337fd(0x14f))/0x7*(-parseInt(_0x6337fd(0x158))/0x8)+parseInt(_0x6337fd(0x153))/0x9;if(_0x1f448d===_0x51051d)break;else _0x4768f3['push'](_0x4768f3['shift']());}catch(_0x58192f){_0x4768f3['push'](_0x4768f3['shift']());}}}(a276_0x17bb,0x6d260));import{mkdir,readFile,writeFile}from'node:fs/promises';function a276_0x17bb(){const _0x1cf243=['functions','2725470EQZbpE','code','utf8','885528OyodQJ','1324224JZGSZS','8iqVoco',':\x20scriptsRoot\x20mismatch\x20—\x20','current\x20\x22','Failed\x20to\x20read\x20Backend\x20Function\x20lock\x20file:\x20','\x22.\x20','556532GQOhoT','2820UZXKqj','apps','470HfbdFq','ENOENT','object','211700JhLHSE','scriptsRoot','6220130jMnWRU','lastSync','parse'];a276_0x17bb=function(){return _0x1cf243;};return a276_0x17bb();}function a276_0x3823(_0x3ec916,_0x4b37ad){_0x3ec916=_0x3ec916-0x14b;const _0x17bb81=a276_0x17bb();let _0x3823cd=_0x17bb81[_0x3ec916];return _0x3823cd;}import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x1712d3,_0x1651ae,_0x4f6ff1,_0x957f36){const _0x540d36=a276_0x3823,_0x4a1a1f={'apps':_0x1712d3[_0x540d36(0x15f)]&&typeof _0x1712d3['apps']==='object'?_0x1712d3[_0x540d36(0x15f)]:{}};let _0x39a71b=_0x4a1a1f['apps'][_0x1651ae];if(!_0x39a71b)return _0x39a71b={'scriptsRoot':_0x4f6ff1,'lastSync':'','functions':{}},_0x4a1a1f['apps'][_0x1651ae]=_0x39a71b,{'lockData':_0x4a1a1f,'appLock':_0x39a71b};if(!_0x39a71b[_0x540d36(0x14e)])_0x39a71b[_0x540d36(0x14e)]=_0x4f6ff1;else{if(_0x39a71b[_0x540d36(0x14e)]!==_0x4f6ff1)throw new Error(_0x957f36+_0x540d36(0x159)+(_0x540d36(0x15a)+_0x4f6ff1+'\x22\x20vs\x20lock\x20\x22'+_0x39a71b['scriptsRoot']+_0x540d36(0x15c))+'Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.');}return!_0x39a71b['functions']&&(_0x39a71b[_0x540d36(0x152)]={}),!_0x39a71b[_0x540d36(0x150)]&&(_0x39a71b[_0x540d36(0x150)]=''),{'lockData':_0x4a1a1f,'appLock':_0x39a71b};}export async function readBffLockFile(_0x13ea89){const _0x3a68d6=a276_0x3823;try{const _0xd936d8=await readFile(_0x13ea89,_0x3a68d6(0x155)),_0x4bef2c=JSON[_0x3a68d6(0x151)](_0xd936d8);return{'apps':_0x4bef2c['apps']&&typeof _0x4bef2c[_0x3a68d6(0x15f)]===_0x3a68d6(0x14c)?_0x4bef2c['apps']:{}};}catch(_0x2af50f){if(_0x2af50f[_0x3a68d6(0x154)]===_0x3a68d6(0x14b))return null;throw new Error(_0x3a68d6(0x15b)+String(_0x2af50f));}}export async function writeBffLockFile(_0x5f1d27,_0x4cbd9c){await mkdir(dirname(_0x5f1d27),{'recursive':!![]}),await writeFile(_0x5f1d27,JSON['stringify'](_0x4cbd9c,null,0x2),'utf8');}
@@ -1 +1 @@
1
- const a267_0x1c58f5=a267_0x50d5;function a267_0x50d5(_0x218b0d,_0x3f8ed4){_0x218b0d=_0x218b0d-0x1c9;const _0x4fd0ba=a267_0x4fd0();let _0x50d527=_0x4fd0ba[_0x218b0d];return _0x50d527;}(function(_0x414627,_0x5507b6){const _0x4a2733=a267_0x50d5,_0x4b1155=_0x414627();while(!![]){try{const _0x208d60=parseInt(_0x4a2733(0x1ca))/0x1*(-parseInt(_0x4a2733(0x1e1))/0x2)+-parseInt(_0x4a2733(0x1d7))/0x3*(parseInt(_0x4a2733(0x1d1))/0x4)+parseInt(_0x4a2733(0x1e0))/0x5+parseInt(_0x4a2733(0x1d5))/0x6+parseInt(_0x4a2733(0x1dc))/0x7*(parseInt(_0x4a2733(0x1d2))/0x8)+parseInt(_0x4a2733(0x1cf))/0x9*(-parseInt(_0x4a2733(0x1cd))/0xa)+parseInt(_0x4a2733(0x1e4))/0xb*(-parseInt(_0x4a2733(0x1d9))/0xc);if(_0x208d60===_0x5507b6)break;else _0x4b1155['push'](_0x4b1155['shift']());}catch(_0x1bf3f0){_0x4b1155['push'](_0x4b1155['shift']());}}}(a267_0x4fd0,0x632ea));export const DEFAULT_BFF_SCRIPT_DESCRIPTION=a267_0x1c58f5(0x1cc);const LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION=a267_0x1c58f5(0x1d8);function a267_0x4fd0(){const _0x32b174=['map','split','2165400bFqihf','some','12NTNAxn','TODO:\x20add\x20script\x20description','376392KrgmEM','after','toLowerCase','7ybcKAh','trim','toUpperCase','remoteId','3690615kOxLVE','10eeyZMt','replace','test','11hRRquP','functionNode','startsWith','before','entries','10552vmDCAc','alias','TODO:\x20补充脚本功能描述','380480nhJSZv','match','126UOrvrq','operationType','431968piRGQY','2847944NZUsfv'];a267_0x4fd0=function(){return _0x32b174;};return a267_0x4fd0();}export function snakeToCamel(_0x576a17){const _0x1b91f8=a267_0x1c58f5;return _0x576a17[_0x1b91f8(0x1db)]()[_0x1b91f8(0x1e2)](/_([a-z])/g,(_0xdab82a,_0x4ae2f2)=>_0x4ae2f2[_0x1b91f8(0x1de)]());}export function findHookLocationByRemoteId(_0x27cb04,_0x23c4cb){const _0x50dc14=a267_0x1c58f5;if(!_0x23c4cb)return undefined;for(const [_0x383cc7,_0x540e62]of Object[_0x50dc14(0x1c9)](_0x27cb04)){if(_0x540e62[_0x50dc14(0x1df)]===_0x23c4cb&&_0x540e62['datasetCode']&&_0x540e62['operationType']&&_0x540e62[_0x50dc14(0x1e5)]){const _0x3912b8=_0x383cc7[_0x50dc14(0x1d4)]('/')[0x1];return{'alias':_0x3912b8||_0x540e62[_0x50dc14(0x1cb)],'datasetCode':_0x540e62['datasetCode'],'operationType':_0x540e62[_0x50dc14(0x1d0)],'functionNode':_0x540e62[_0x50dc14(0x1e5)]};}}return undefined;}export function extractScriptDescription(_0x51cb68){const _0x260372=a267_0x1c58f5,_0x140468=_0x51cb68[_0x260372(0x1ce)](/^\s*\/\*\*([\s\S]*?)\*\//);if(!_0x140468?.[0x1])return undefined;const _0x112c89=_0x140468[0x1],_0x21c469=_0x54cccb=>{const _0x242b7d=_0x260372,_0x314f38=_0x54cccb?.[_0x242b7d(0x1dd)]();if(!_0x314f38||_0x314f38===DEFAULT_BFF_SCRIPT_DESCRIPTION||_0x314f38===LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION)return undefined;return _0x314f38;},_0x3357d2=_0x112c89[_0x260372(0x1ce)](/^\s*\*\s*\[\s*脚本描述\s*]\s*(.+)$/m);if(_0x3357d2)return _0x21c469(_0x3357d2[0x1]);const _0x56a45f=_0x112c89[_0x260372(0x1d4)](/\r?\n/)[_0x260372(0x1d3)](_0x52c555=>_0x52c555[_0x260372(0x1e2)](/^\s*\*\s?/,'')[_0x260372(0x1dd)]()),_0x4b9067=_0x56a45f[_0x260372(0x1d6)](_0x2aa8fb=>/^\[\s*脚本类型\s*]\s*\S+/['test'](_0x2aa8fb))&&_0x56a45f[_0x260372(0x1d6)](_0x2314ce=>/^\[\s*脚本名称\s*]\s*\S+/[_0x260372(0x1e3)](_0x2314ce));if(!_0x4b9067)return undefined;for(const _0x344418 of _0x56a45f){if(!_0x344418||_0x344418[_0x260372(0x1e6)]('@')||/^\[[^\]]+]\s*/[_0x260372(0x1e3)](_0x344418))continue;return _0x21c469(_0x344418);}return undefined;}export function isValidBffFunctionName(_0x2ac4d6){const _0x451369=a267_0x1c58f5;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x451369(0x1e3)](_0x2ac4d6);}export function normalizeHookFunctionNode(_0x5a2775){const _0x295a79=a267_0x1c58f5;if(!_0x5a2775)return undefined;const _0x3291de=_0x5a2775[_0x295a79(0x1dd)]()[_0x295a79(0x1db)]();if(_0x3291de===_0x295a79(0x1e7)||_0x3291de===_0x295a79(0x1da))return _0x3291de;return undefined;}
1
+ const a278_0x34c79e=a278_0xa445;(function(_0x6e6b35,_0x2e5335){const _0x1aca95=a278_0xa445,_0x9ece8=_0x6e6b35();while(!![]){try{const _0x9c4c4f=parseInt(_0x1aca95(0x1a8))/0x1*(parseInt(_0x1aca95(0x1a4))/0x2)+parseInt(_0x1aca95(0x1b7))/0x3+-parseInt(_0x1aca95(0x19f))/0x4*(parseInt(_0x1aca95(0x1ad))/0x5)+-parseInt(_0x1aca95(0x1ab))/0x6+parseInt(_0x1aca95(0x1a9))/0x7*(-parseInt(_0x1aca95(0x1b6))/0x8)+parseInt(_0x1aca95(0x1b5))/0x9*(-parseInt(_0x1aca95(0x1a5))/0xa)+parseInt(_0x1aca95(0x1b4))/0xb;if(_0x9c4c4f===_0x2e5335)break;else _0x9ece8['push'](_0x9ece8['shift']());}catch(_0x3434ef){_0x9ece8['push'](_0x9ece8['shift']());}}}(a278_0x5d3d,0xc29b3));export const DEFAULT_BFF_SCRIPT_DESCRIPTION=a278_0x34c79e(0x1b2);const LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION=a278_0x34c79e(0x1b1);export function snakeToCamel(_0x2f3d7){const _0x3cfc45=a278_0x34c79e;return _0x2f3d7[_0x3cfc45(0x1ae)]()[_0x3cfc45(0x1a3)](/_([a-z])/g,(_0x37982f,_0x43a8a1)=>_0x43a8a1[_0x3cfc45(0x1a1)]());}function a278_0xa445(_0x441553,_0x46abb5){_0x441553=_0x441553-0x19f;const _0x5d3dc4=a278_0x5d3d();let _0xa4458c=_0x5d3dc4[_0x441553];return _0xa4458c;}export function findHookLocationByRemoteId(_0x1459ef,_0xa83cb0){const _0x1a9450=a278_0x34c79e;if(!_0xa83cb0)return undefined;for(const [_0x8d24af,_0xfdc945]of Object[_0x1a9450(0x1a6)](_0x1459ef)){if(_0xfdc945[_0x1a9450(0x1af)]===_0xa83cb0&&_0xfdc945['datasetCode']&&_0xfdc945['operationType']&&_0xfdc945[_0x1a9450(0x1a0)]){const _0x2a6ff4=_0x8d24af[_0x1a9450(0x1b0)]('/')[0x1];return{'alias':_0x2a6ff4||_0xfdc945['alias'],'datasetCode':_0xfdc945[_0x1a9450(0x1ac)],'operationType':_0xfdc945['operationType'],'functionNode':_0xfdc945[_0x1a9450(0x1a0)]};}}return undefined;}export function extractScriptDescription(_0x577b34){const _0x402e76=a278_0x34c79e,_0x323a3b=_0x577b34['match'](/^\s*\/\*\*([\s\S]*?)\*\//);if(!_0x323a3b?.[0x1])return undefined;const _0x3c9968=_0x323a3b[0x1],_0x17ed79=_0x4c551d=>{const _0x5c344d=a278_0xa445,_0x46341d=_0x4c551d?.[_0x5c344d(0x1a7)]();if(!_0x46341d||_0x46341d===DEFAULT_BFF_SCRIPT_DESCRIPTION||_0x46341d===LEGACY_DEFAULT_BFF_SCRIPT_DESCRIPTION)return undefined;return _0x46341d;},_0x29229a=_0x3c9968[_0x402e76(0x1a2)](/^\s*\*\s*\[\s*脚本描述\s*]\s*(.+)$/m);if(_0x29229a)return _0x17ed79(_0x29229a[0x1]);const _0x455f91=_0x3c9968[_0x402e76(0x1b0)](/\r?\n/)[_0x402e76(0x1b9)](_0x26c203=>_0x26c203[_0x402e76(0x1a3)](/^\s*\*\s?/,'')[_0x402e76(0x1a7)]()),_0x49200c=_0x455f91[_0x402e76(0x1aa)](_0x21cd0b=>/^\[\s*脚本类型\s*]\s*\S+/[_0x402e76(0x1b3)](_0x21cd0b))&&_0x455f91[_0x402e76(0x1aa)](_0x41a3ac=>/^\[\s*脚本名称\s*]\s*\S+/[_0x402e76(0x1b3)](_0x41a3ac));if(!_0x49200c)return undefined;for(const _0x147076 of _0x455f91){if(!_0x147076||_0x147076['startsWith']('@')||/^\[[^\]]+]\s*/['test'](_0x147076))continue;return _0x17ed79(_0x147076);}return undefined;}export function isValidBffFunctionName(_0x323ac0){const _0x5badaf=a278_0x34c79e;return/^[A-Za-z_$][A-Za-z0-9_$]*$/[_0x5badaf(0x1b3)](_0x323ac0);}function a278_0x5d3d(){const _0x5097fc=['map','3760736DzPqMT','functionNode','toUpperCase','match','replace','6FAupQD','664220ElTjWr','entries','trim','333255LqfLZq','154EVUWcy','some','5059380ndbpWn','datasetCode','5vbWdKR','toLowerCase','remoteId','split','TODO:\x20add\x20script\x20description','TODO:\x20补充脚本功能描述','test','36635335uMFOwF','126zRbnnc','513176wsXqbP','1774239ssjnfr','after'];a278_0x5d3d=function(){return _0x5097fc;};return a278_0x5d3d();}export function normalizeHookFunctionNode(_0x2aefa1){const _0x27dcba=a278_0x34c79e;if(!_0x2aefa1)return undefined;const _0x3408c5=_0x2aefa1[_0x27dcba(0x1a7)]()['toLowerCase']();if(_0x3408c5==='before'||_0x3408c5===_0x27dcba(0x1b8))return _0x3408c5;return undefined;}
@@ -0,0 +1,41 @@
1
+ import type { ErRelationCardinality } from "../core/api-client.js";
2
+ export declare const CROSS_DB_RELATION_PATHS: {
3
+ readonly list: "/smartapi/cross-db-relation/query";
4
+ readonly create: "/smartapi/cross-db-relation/create";
5
+ readonly update: "/smartapi/cross-db-relation/update";
6
+ readonly delete: "/smartapi/cross-db-relation/delete";
7
+ };
8
+ export interface CrossDbRelationSource {
9
+ appCode: string;
10
+ fromDatasetCode: string;
11
+ fromField: string;
12
+ fromDblinkId?: number;
13
+ }
14
+ export interface CrossDbRelationMutation extends CrossDbRelationSource {
15
+ toDatasetCode: string;
16
+ toField: string;
17
+ refTableLabelName?: string;
18
+ cardinality?: ErRelationCardinality;
19
+ }
20
+ export interface CrossDbRelationQuery {
21
+ appCode: string;
22
+ fromDblinkId: number;
23
+ fromDatasetCode?: string;
24
+ fromField?: string;
25
+ }
26
+ export interface CrossDbRelationDetail {
27
+ relationId: number | string;
28
+ fromDblinkId: number;
29
+ fromDatasetCode: string | null;
30
+ fromDatasetName: string | null;
31
+ fromTableName: string;
32
+ fromField: string;
33
+ toDblinkId: number;
34
+ toDatasetCode: string | null;
35
+ toDatasetName: string | null;
36
+ toTableName: string;
37
+ toField: string;
38
+ refTableLabelName: string;
39
+ cardinality: ErRelationCardinality | null;
40
+ relationType: number;
41
+ }
@@ -0,0 +1 @@
1
+ function a279_0x5eab(){const _0x5ec3b5=['12MqKlGm','141200UtXNgU','/smartapi/cross-db-relation/create','12GqBhuh','1875657jIKTTi','681655TSXBxk','361521inztYK','/smartapi/cross-db-relation/delete','12pvktmy','24tTGtPS','/smartapi/cross-db-relation/query','2729243JdNBvI','560317Aboqge','/smartapi/cross-db-relation/update','237884ARYbfb','16BOoBJl'];a279_0x5eab=function(){return _0x5ec3b5;};return a279_0x5eab();}function a279_0x3303(_0x3581a4,_0x3eec4e){_0x3581a4=_0x3581a4-0xd6;const _0x5eab1f=a279_0x5eab();let _0x33032c=_0x5eab1f[_0x3581a4];return _0x33032c;}const a279_0x312b32=a279_0x3303;(function(_0x5860f4,_0x4b090c){const _0x14b06f=a279_0x3303,_0x4c4770=_0x5860f4();while(!![]){try{const _0x38dcff=-parseInt(_0x14b06f(0xe5))/0x1+parseInt(_0x14b06f(0xd7))/0x2*(parseInt(_0x14b06f(0xe1))/0x3)+parseInt(_0x14b06f(0xd8))/0x4*(-parseInt(_0x14b06f(0xde))/0x5)+parseInt(_0x14b06f(0xd9))/0x6*(parseInt(_0x14b06f(0xdd))/0x7)+parseInt(_0x14b06f(0xe2))/0x8*(parseInt(_0x14b06f(0xdf))/0x9)+parseInt(_0x14b06f(0xda))/0xa+parseInt(_0x14b06f(0xe4))/0xb*(parseInt(_0x14b06f(0xdc))/0xc);if(_0x38dcff===_0x4b090c)break;else _0x4c4770['push'](_0x4c4770['shift']());}catch(_0xf6114e){_0x4c4770['push'](_0x4c4770['shift']());}}}(a279_0x5eab,0x46801));export const CROSS_DB_RELATION_PATHS={'list':a279_0x312b32(0xe3),'create':a279_0x312b32(0xdb),'update':a279_0x312b32(0xd6),'delete':a279_0x312b32(0xe0)};
@@ -1 +1 @@
1
- function a268_0x4d3f(_0x2524e5,_0x376935){_0x2524e5=_0x2524e5-0x6c;const _0x38ba48=a268_0x38ba();let _0x4d3f7f=_0x38ba48[_0x2524e5];return _0x4d3f7f;}(function(_0x258b4c,_0x5af54c){const _0x514df1=a268_0x4d3f,_0x201222=_0x258b4c();while(!![]){try{const _0x38ff3f=parseInt(_0x514df1(0x87))/0x1+-parseInt(_0x514df1(0x7e))/0x2+parseInt(_0x514df1(0x82))/0x3*(parseInt(_0x514df1(0x77))/0x4)+-parseInt(_0x514df1(0x83))/0x5+-parseInt(_0x514df1(0x73))/0x6+parseInt(_0x514df1(0x74))/0x7+parseInt(_0x514df1(0x76))/0x8;if(_0x38ff3f===_0x5af54c)break;else _0x201222['push'](_0x201222['shift']());}catch(_0x55cad3){_0x201222['push'](_0x201222['shift']());}}}(a268_0x38ba,0x8ee44));function a268_0x38ba(){const _0x5818fd=['Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','\x22\x20under\x20app\x20\x22','toLowerCase','has','entries','.\x20Be\x20more\x20specific.','3625398MTPBaM','4894421PyRvjH','isNaN','7074712LTLQKo','376KoqzlA','No\x20database\x20matching\x20\x22','join','dbtableConfig','map','filter','\x22\x20matches\x20multiple\x20databases:\x20','1003180GlJnBW','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','\x22.\x20Available:\x20','\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','3891wXGmMd','2685420XNUiwU','length','dbName','find','522731JCrKlY','includes','dbId','set'];a268_0x38ba=function(){return _0x5818fd;};return a268_0x38ba();}import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0x4f3d0b){const _0x20ef59=a268_0x4d3f;if(cache[_0x20ef59(0x70)](_0x4f3d0b))return cache['get'](_0x4f3d0b);const _0x4ffe04=await listDatasets(_0x4f3d0b),_0x103617=new Map();for(const _0xc03eb9 of _0x4ffe04){const _0x44d749=_0xc03eb9[_0x20ef59(0x7a)];_0x44d749?.[_0x20ef59(0x89)]!=null&&_0x103617[_0x20ef59(0x6c)](_0x44d749[_0x20ef59(0x89)],_0x44d749[_0x20ef59(0x85)]??'db-'+_0x44d749[_0x20ef59(0x89)]);}const _0x55cf37=[..._0x103617[_0x20ef59(0x71)]()][_0x20ef59(0x7b)](([_0x496253,_0x5a07fd])=>({'dbId':_0x496253,'dbName':_0x5a07fd}));return cache['set'](_0x4f3d0b,_0x55cf37),_0x55cf37;}export async function resolveDb(_0x3fd658,_0x3c6b86){const _0x4c12d1=a268_0x4d3f,_0xfb7f27=await listDatabases(_0x3fd658);if(_0xfb7f27[_0x4c12d1(0x84)]===0x0)return{'resolved':[],'error':_0x4c12d1(0x7f)+_0x3fd658+_0x4c12d1(0x81)};if(!_0x3c6b86)return{'resolved':_0xfb7f27};const _0x2c0abd=Number(_0x3c6b86);if(!Number[_0x4c12d1(0x75)](_0x2c0abd)){const _0x220d5d=_0xfb7f27['find'](_0x51cfb3=>_0x51cfb3[_0x4c12d1(0x89)]===_0x2c0abd);if(_0x220d5d)return{'resolved':[_0x220d5d]};}const _0x321655=_0x3c6b86['toLowerCase'](),_0x5c19c0=_0xfb7f27[_0x4c12d1(0x7c)](_0x57cc05=>_0x57cc05[_0x4c12d1(0x85)][_0x4c12d1(0x6f)]()[_0x4c12d1(0x88)](_0x321655));if(_0x5c19c0[_0x4c12d1(0x84)]>0x0)return{'resolved':_0x5c19c0};const _0x3572d5=_0xfb7f27[_0x4c12d1(0x7b)](_0x4c99ab=>_0x4c99ab[_0x4c12d1(0x85)]+'\x20('+_0x4c99ab[_0x4c12d1(0x89)]+')')[_0x4c12d1(0x79)](',\x20');return{'resolved':[],'error':_0x4c12d1(0x78)+_0x3c6b86+_0x4c12d1(0x6e)+_0x3fd658+_0x4c12d1(0x80)+_0x3572d5+'.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.'};}export async function resolveOneDb(_0x12dff2,_0x2486a0){const _0x483b28=a268_0x4d3f,{resolved:_0x256456,error:_0x43e016}=await resolveDb(_0x12dff2,_0x2486a0);if(_0x43e016)return{'db':null,'error':_0x43e016};if(_0x256456['length']===0x1)return{'db':_0x256456[0x0]};if(!_0x2486a0){const _0x568b59=_0x256456[_0x483b28(0x7b)](_0x2df257=>_0x2df257[_0x483b28(0x85)]+'\x20('+_0x2df257['dbId']+')')[_0x483b28(0x79)](',\x20');return{'db':null,'error':_0x483b28(0x6d)+_0x568b59};}const _0x52e84f=_0x256456[_0x483b28(0x7b)](_0x109484=>_0x109484['dbName']+'\x20('+_0x109484['dbId']+')')[_0x483b28(0x79)](',\x20');return{'db':null,'error':'\x22'+_0x2486a0+_0x483b28(0x7d)+_0x52e84f+_0x483b28(0x72)};}export async function getDbName(_0x5a13f9,_0x4dd83f){const _0x30933b=a268_0x4d3f,_0x1fd203=await listDatabases(_0x5a13f9);return _0x1fd203[_0x30933b(0x86)](_0x5a251f=>_0x5a251f['dbId']===_0x4dd83f)?.[_0x30933b(0x85)];}
1
+ (function(_0x247533,_0x2e715b){const _0x5462b6=a280_0x16fa,_0x436d40=_0x247533();while(!![]){try{const _0x1ba1ae=-parseInt(_0x5462b6(0x1b1))/0x1+-parseInt(_0x5462b6(0x1b0))/0x2+parseInt(_0x5462b6(0x1ca))/0x3*(-parseInt(_0x5462b6(0x1be))/0x4)+parseInt(_0x5462b6(0x1b5))/0x5*(-parseInt(_0x5462b6(0x1cd))/0x6)+-parseInt(_0x5462b6(0x1bc))/0x7*(parseInt(_0x5462b6(0x1ba))/0x8)+parseInt(_0x5462b6(0x1c1))/0x9+-parseInt(_0x5462b6(0x1af))/0xa*(-parseInt(_0x5462b6(0x1bf))/0xb);if(_0x1ba1ae===_0x2e715b)break;else _0x436d40['push'](_0x436d40['shift']());}catch(_0x3e7b75){_0x436d40['push'](_0x436d40['shift']());}}}(a280_0xe26c,0x98f5a));import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0x1c2547){const _0x54a5e8=a280_0x16fa;if(cache[_0x54a5e8(0x1b2)](_0x1c2547))return cache[_0x54a5e8(0x1b8)](_0x1c2547);const _0x2410c2=await listDatasets(_0x1c2547),_0x383169=new Map();for(const _0x1e002b of _0x2410c2){const _0x662b99=_0x1e002b[_0x54a5e8(0x1b6)];_0x662b99?.[_0x54a5e8(0x1ae)]!=null&&_0x383169['set'](_0x662b99['dbId'],_0x662b99[_0x54a5e8(0x1c6)]??_0x54a5e8(0x1cb)+_0x662b99[_0x54a5e8(0x1ae)]);}const _0x1d3223=[..._0x383169[_0x54a5e8(0x1c8)]()]['map'](([_0x62bc27,_0x421889])=>({'dbId':_0x62bc27,'dbName':_0x421889}));return cache['set'](_0x1c2547,_0x1d3223),_0x1d3223;}export async function resolveDb(_0xecb642,_0x5cbdf3){const _0x1bdc77=a280_0x16fa,_0x2dfc26=await listDatabases(_0xecb642);if(_0x2dfc26[_0x1bdc77(0x1c0)]===0x0)return{'resolved':[],'error':_0x1bdc77(0x1bb)+_0xecb642+_0x1bdc77(0x1c2)};if(!_0x5cbdf3)return{'resolved':_0x2dfc26};const _0x52b11a=Number(_0x5cbdf3);if(!Number[_0x1bdc77(0x1c4)](_0x52b11a)){const _0x352fcf=_0x2dfc26[_0x1bdc77(0x1bd)](_0x2db41e=>_0x2db41e[_0x1bdc77(0x1ae)]===_0x52b11a);if(_0x352fcf)return{'resolved':[_0x352fcf]};}const _0x10cdc1=_0x5cbdf3[_0x1bdc77(0x1b7)](),_0x5211b9=_0x2dfc26[_0x1bdc77(0x1c7)](_0x5afe33=>_0x5afe33[_0x1bdc77(0x1c6)][_0x1bdc77(0x1b7)]()['includes'](_0x10cdc1));if(_0x5211b9[_0x1bdc77(0x1c0)]>0x0)return{'resolved':_0x5211b9};const _0x62db79=_0x2dfc26[_0x1bdc77(0x1cc)](_0x153b3b=>_0x153b3b[_0x1bdc77(0x1c6)]+'\x20('+_0x153b3b[_0x1bdc77(0x1ae)]+')')[_0x1bdc77(0x1c9)](',\x20');return{'resolved':[],'error':_0x1bdc77(0x1b3)+_0x5cbdf3+'\x22\x20under\x20app\x20\x22'+_0xecb642+_0x1bdc77(0x1c3)+_0x62db79+_0x1bdc77(0x1c5)};}function a280_0xe26c(){const _0x162114=['filter','entries','join','6FxgXVG','db-','map','1616298YLXmGc','dbId','51410dbfGdL','2429366NwnNBq','639230gegRQD','has','No\x20database\x20matching\x20\x22','\x22\x20matches\x20multiple\x20databases:\x20','10qjXizu','dbtableConfig','toLowerCase','get','.\x20Be\x20more\x20specific.','116584QvzjuB','No\x20linked\x20databases\x20found\x20under\x20app\x20\x22','126AoVEAd','find','403604WNKzOP','4862EPCLmq','length','10898955iteQdG','\x22.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','\x22.\x20Available:\x20','isNaN','.\x20If\x20this\x20db\x20belongs\x20to\x20another\x20app,\x20rerun\x20with\x20--appcode\x20<appCode>.','dbName'];a280_0xe26c=function(){return _0x162114;};return a280_0xe26c();}function a280_0x16fa(_0x493d19,_0x525631){_0x493d19=_0x493d19-0x1ae;const _0xe26cdb=a280_0xe26c();let _0x16fae7=_0xe26cdb[_0x493d19];return _0x16fae7;}export async function resolveOneDb(_0xc2bbdb,_0x28c2bf){const _0x11c204=a280_0x16fa,{resolved:_0x33bfaa,error:_0x5b6960}=await resolveDb(_0xc2bbdb,_0x28c2bf);if(_0x5b6960)return{'db':null,'error':_0x5b6960};if(_0x33bfaa[_0x11c204(0x1c0)]===0x1)return{'db':_0x33bfaa[0x0]};if(!_0x28c2bf){const _0x302fff=_0x33bfaa[_0x11c204(0x1cc)](_0x2d2695=>_0x2d2695[_0x11c204(0x1c6)]+'\x20('+_0x2d2695[_0x11c204(0x1ae)]+')')[_0x11c204(0x1c9)](',\x20');return{'db':null,'error':'Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20'+_0x302fff};}const _0x57be6d=_0x33bfaa['map'](_0x2816c3=>_0x2816c3['dbName']+'\x20('+_0x2816c3[_0x11c204(0x1ae)]+')')[_0x11c204(0x1c9)](',\x20');return{'db':null,'error':'\x22'+_0x28c2bf+_0x11c204(0x1b4)+_0x57be6d+_0x11c204(0x1b9)};}export async function getDbName(_0x595658,_0x16c475){const _0x6dd01d=a280_0x16fa,_0x46cab8=await listDatabases(_0x595658);return _0x46cab8[_0x6dd01d(0x1bd)](_0x19acef=>_0x19acef[_0x6dd01d(0x1ae)]===_0x16c475)?.[_0x6dd01d(0x1c6)];}